Skip to content

Commit

Permalink
Release 8.0.0 (#406)
Browse files Browse the repository at this point in the history
* Libs 8.0.0 release (#397)

* updating release 8.0.0 initial changes

* adding assets static cache helpers

* fixing cli for config commands

* adding event better and faster caching for blocks

* adding better errors for store trait

* fixing typo

* updating new wrapper and block render methods

* fixing getFullPath method with an alternative path

* adding fixes for wrong file name (#399)

* Feature/cli (#403)

* Major updates on WP-CLI and setup

* fixes

* fixes

* adding fixes for loading assets (#404)

* adding fixes for blocks limit

* adding additional options for caching

* adding additional options for caching (#405)

* release
  • Loading branch information
iruzevic authored Jun 5, 2024
1 parent a5f24a4 commit 443462b
Show file tree
Hide file tree
Showing 372 changed files with 5,061 additions and 14,188 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Continuous Integration

on:
push:
branches:
- "develop"
- "main"
paths-ignore:
- "**.md"
pull_request:
paths-ignore:
- "**.md"

concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

jobs:
phpstan:
name: PHP static code analysis using PHP - ${{ matrix.php }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [ '8.2', '8.3' ]
steps:
- name: PHP Static code analysis
uses: infinum/eightshift-deploy-actions-public/.github/actions/lint-php-static@main
with:
PHP_VERSION: ${{ matrix.php }}
PROJECT_PATH: ''

phpcs:
name: PHP check coding standards using PHP - ${{ matrix.php }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [ '8.2', '8.3' ]
steps:
- name: PHP check coding standards
uses: infinum/eightshift-deploy-actions-public/.github/actions/lint-php@main
with:
PHP_VERSION: ${{ matrix.php }}
PROJECT_PATH: ''
179 changes: 0 additions & 179 deletions .github/workflows/integrate.yml

This file was deleted.

8 changes: 0 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
vendor
node_modules
docs
.phpdoc/cache

composer.lock
package-lock.json

# Tests
tests/coverage/*
cliOutput
.phpunit.result.cache
latest_dump.tar.gz

# Editor settings
.vscode/settings.json
Expand Down
56 changes: 56 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,61 @@ All notable changes to this project will be documented in this file.

This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a CHANGELOG](https://keepachangelog.com/).

## [8.0.0]

### Changed
- Minimum PHP version is now 8.2.
- Complete refactor of the block registration process for faster and more efficient block registration.
- Custom post type and taxonomy registration labels usage is now more consistent and simplified.
- All enqueue methods now supports new scripts args introduced in WP 6.3.
- All enqueue methods now implements `manifestCache`interface for fetching manifest data.
- All AbstractGeolocation method now implements `manifestCache`interface for fetching manifest data.

### Added
- Internal caching in WordPress transients for faster manifest parsing and block registration.
- Blocks render method now uses the Helpers::render method for better performance and code readability.
- New ManifestCache CLI command with example.
- New CLI commands for config theme and plugin.
- - `Exception/InvalidBlock.php` method: `missingItemException`.
- `src/Exception/InvalidManifest.php` methods: `missingManifestKeyException`, `emptyOrErrorManifestException`, `notAllowedManifestPathException`, `notAllowedManifestPathItemException`, `missingCacheTopItemException`, `missingCacheSubItemException`.
- `src/Exception/InvalidPath.php` method: `missingDirectoryException`, `missingFileException`, `missingFileWithExampleException`, `wrongOrNotAllowedParentPathException`.
- New `src/Helpers/ApiTrait.php` helper for better API handling.
- New `recursiveArrayFind` helper for finding items in multidimensional arrays recursively.
- New casing helpers `camelToSnakeCase`, `kebabToSnakeCase`.
- New `getCurrentUrl` helper for getting the current URL with query parameters.
- New `cleanUrlParams` helper for cleaning URL parameters.
- New project info helpers: `getPluginVersion`, `getPluginName`, `getPluginTextDomain`, `getThemeVersion`, `getThemeName`, `getThemeTextDomain`, `getPluginDetails`.
- New constants for API handing in the `src/Rest/Routes/AbstractRoute.php`.

### Fixed
- Typo in block enqueue method for `getBlockFrontentScriptHandle` to `getBlockFrontendScriptHandle` method.

### Removed
- `src/Blocks/AbstractBlocks.php` method `renderWrapperView` is removed.
- `Config/AbstractConfigData.php` is removed as it is no longer needed. Use helpers instead.
- `Config/ConfigDataInterface.php` is removed as it is no longer needed.
- `LabelGeneratorTrait` is removed as it is no longer needed.
- All Enqueue methods no longer use `manifest` interface.
- `Exception/ComponentException.php` is removed as it is no longer needed.
- `Exception/FailedToLoadView.php` is removed as it is no longer needed.
- `Exception/FileMissing.php` is removed as it is no longer needed.
- `src/Exception/InvalidCallback.php` is removed as it is no longer needed.
- `src/Exception/InvalidNouns.php` is removed as it is no longer needed.
- `src/Exception/InvalidService.php` is removed as it is no longer needed.
- `src/Exception/PluginActivationFailure.php` is removed as it is no longer needed.
- `Exception/InvalidBlock.php` methods: `missingBlocksException`, `missingComponentsException`, `missingNameException`, `missingComponentNameException`, `missingVariationNameException`, `missingViewException`, `missingRenderViewException`, `missingSettingsManifestException`, `missingWrapperManifestException`, `missingComponentManifestException`, `missingWrapperViewException`, `missingNamespaceException`, `missingSettingsKeyException`, `wrongFunctionUsedException`, `missingFileException`, is removed as it is no longer needed.
- `src/Exception/InvalidManifest.php` method: `missingManifestItemException`.
- `src/Exception/InvalidPath.php` method: `fromUri`.
- `outputCssVariablesGlobal` method no longer requires parameters.
- `outputCssVariables` method is not longer supporting `globalManifest` parameter.
- all methods from `src/Helpers/ErrorLoggerTrait.php` trait are removed.
- All manifest classes are removed, `src/Manifest/AbstractManifest.php`, `src/Manifest/ManifestExample.php`, `src/Manifest/ManifestInterface.php`.

### Deprecated
- `Helpers>Components` class is deprecated and will be removed in the next major release. Use `Helpers>Blocks` class instead.
- `Helpers>Components>renderPartial` method is deprecated and will be removed in the next major release. Use `Helpers>Helpers>render` method instead.
- `Helpers>Components>getManifest` method is deprecated and will be removed in the next major release. Use `Helpers>Helpers>getManifestByDir` method instead.

## [7.1.2] - 2024-01-15

### Changed
Expand Down Expand Up @@ -489,6 +544,7 @@ Init setup

[Unreleased]: https://github.com/infinum/eightshift-libs/compare/main...HEAD

[8.0.0]: https://github.com/infinum/eightshift-libs/compare/7.1.2...8.0.0
[7.1.2]: https://github.com/infinum/eightshift-libs/compare/7.1.1...7.1.2
[7.1.1]: https://github.com/infinum/eightshift-libs/compare/7.1.0...7.1.1
[7.1.0]: https://github.com/infinum/eightshift-libs/compare/7.0.1...7.1.0
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Infinum and Eightshift
Copyright Infinum

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ Eightshift Libs is maintained and sponsored by
[Eightshift](https://eightshift.com) and [Infinum](https://infinum.com).

## License
Eightshift Libs ©2022 [Eightshift](https://eightshift.com) and [Infinum](https://infinum.com). It is free software, and may be redistributed under the terms specified in the LICENSE file.
Eightshift Libs [Eightshift](https://eightshift.com) and [Infinum](https://infinum.com). It is free software, and may be redistributed under the terms specified in the LICENSE file.
40 changes: 13 additions & 27 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,35 +24,26 @@
"source": "https://github.com/infinum/eightshift-libs"
},
"require": {
"php": "^7.4 || >=8.0",
"php": ">=8.2",
"ext-dom": "*",
"ext-json": "*",
"ext-libxml": "*",
"php-di/invoker": "^2.3.4",
"php-di/php-di": "^7"
"php-di/php-di": "^7.0.6"
},
"require-dev": {
"brain/monkey": "^2.6.1",
"captainhook/captainhook": "^5.10",
"dealerdirect/phpcodesniffer-composer-installer": "^v1.0.0",
"infinum/eightshift-coding-standards": "2.0.0-beta",
"pestphp/pest": "^1.20",
"php-parallel-lint/php-parallel-lint": "^1.3",
"php-stubs/wordpress-stubs": "^6.3",
"captainhook/captainhook": "^5.23.0",
"dealerdirect/phpcodesniffer-composer-installer": "v1.0.0",
"infinum/eightshift-coding-standards": "^3.0.0",
"php-parallel-lint/php-parallel-lint": "^v1.4.0",
"php-stubs/wordpress-stubs": "^v6.5.3",
"roave/security-advisories": "dev-master",
"szepeviktor/phpstan-wordpress": "^1.3",
"wp-cli/wp-cli": "^2.9",
"yoast/wp-test-utils": "^1.0"
"szepeviktor/phpstan-wordpress": "^v1.3.4",
"wp-cli/wp-cli": "^v2.10.0"
},
"autoload": {
"psr-4": {
"EightshiftLibs\\": "src/",
"EightshiftBoilerplate\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
"EightshiftLibs\\": "src/"
}
},
"minimum-stability": "dev",
Expand All @@ -64,7 +55,6 @@
"process-timeout": 2000,
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"pestphp/pest-plugin": true,
"composer/installers": true
}
},
Expand All @@ -73,15 +63,11 @@
"vendor/bin/captainhook install -f -s"
],
"test:types": "@php ./vendor/bin/phpstan analyze",
"test:standards": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --runtime-set testVersion 7.4-",
"test:unit": "@php ./vendor/bin/pest --group=unit",
"test:unit-report": "@php ./vendor/bin/pest --group=unit --log-junit tests/coverage/report.xml",
"test:coverage": "@php ./vendor/bin/pest --group=unit --coverage",
"standards:fix": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcbf --runtime-set testVersion 7.4-",
"test:standards": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --runtime-set testVersion 8.2-",
"standards:fix": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcbf --runtime-set testVersion 8.2-",
"test": [
"@test:standards",
"@test:types",
"@test:unit"
"@test:types"
]
}
}
Binary file removed package/intro.png
Binary file not shown.
Loading

0 comments on commit 443462b

Please sign in to comment.