diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c7fc597..524af2d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,6 +7,7 @@ on: pull_request: branches: - master + workflow_dispatch: jobs: composer: @@ -33,12 +34,13 @@ jobs: COMPOSER_CACHE_KEY: 'composer-7.2' with: path: vendor - key: ${{ env.COMPOSER_CACHE_KEY }} + key: ${{ env.COMPOSER_CACHE_KEY }}-${{ hashFiles('composer.json') }} restore-keys: ${{ env.COMPOSER_CACHE_KEY }} - name: Install dependencies - if: steps.composer-cache.outputs.cache-hit != 'true' - run: composer install --prefer-dist --no-progress --no-suggest + run: | + /opt/spaceonfire/bin/select-composer.sh v2 + composer install --prefer-dist --no-progress - name: Check coding standard run: vendor/bin/ecs check --no-progress-bar --no-interaction @@ -57,12 +59,13 @@ jobs: COMPOSER_CACHE_KEY: 'composer-7.2' with: path: vendor - key: ${{ env.COMPOSER_CACHE_KEY }} + key: ${{ env.COMPOSER_CACHE_KEY }}-${{ hashFiles('composer.json') }} restore-keys: ${{ env.COMPOSER_CACHE_KEY }} - name: Install dependencies - if: steps.composer-cache.outputs.cache-hit != 'true' - run: composer install --prefer-dist --no-progress --no-suggest + run: | + /opt/spaceonfire/bin/select-composer.sh v2 + composer install --prefer-dist --no-progress - name: PHPStan run: vendor/bin/phpstan analyse --no-progress --no-interaction @@ -75,6 +78,7 @@ jobs: - '7.2' - '7.3' - '7.4' + - '8.0' container: spaceonfire/nginx-php-fpm:latest-${{ matrix.php-version }} steps: - name: Checkout @@ -87,18 +91,19 @@ jobs: COMPOSER_CACHE_KEY: 'composer-${{ matrix.php-version }}' with: path: vendor - key: ${{ env.COMPOSER_CACHE_KEY }} + key: ${{ env.COMPOSER_CACHE_KEY }}-${{ hashFiles('composer.json') }} restore-keys: ${{ env.COMPOSER_CACHE_KEY }} - name: Install dependencies - if: steps.composer-cache.outputs.cache-hit != 'true' - run: composer install --prefer-dist --no-progress --no-suggest + run: | + /opt/spaceonfire/bin/select-composer.sh v2 + composer install --prefer-dist --no-progress - name: PHPUnit run: | apk update docker-php-ext-enable xdebug - vendor/bin/phpunit --no-interaction + php -d xdebug.mode=coverage vendor/bin/phpunit --no-interaction cat build/coverage.txt - name: PHPUnit Artifacts diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ec1537..8f34ce7 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,11 +22,21 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip - Nothing --> +## [1.1.1] - 2020-02-16 + +### Added + +- Support installation on PHP 8 + ## [1.1.0] - 2020-09-27 + ### Deprecated -- Namespace `spaceonfire\Criteria\Adapter` renamed to `spaceonfire\Criteria\Bridge`. - Class aliases provided for backwards compatibility, but will be removed in next major release. + +- Namespace `spaceonfire\Criteria\Adapter` renamed to `spaceonfire\Criteria\Bridge`. Class aliases provided for + backwards compatibility, but will be removed in next major release. ## [1.0.0] - 2020-05-27 + ### Added + - First stable release diff --git a/composer.json b/composer.json index 4018385..23941bf 100755 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ } ], "require": { - "php": "^7.2", + "php": "^7.2|^8.0", "symfony/property-access": "^4.0|^5.0", "webmozart/assert": "^1.3", "webmozart/expression": "^1.0" @@ -26,10 +26,10 @@ "doctrine/collections": "^1.6.4", "phpstan/phpstan": "^0.12", "phpstan/phpstan-webmozart-assert": "^0.12", - "phpunit/phpunit": "^8.0", + "phpunit/phpunit": "^8.5|^9.5", "roave/security-advisories": "dev-master", "spiral/pagination": "^2.2", - "symplify/easy-coding-standard-prefixed": "^8.3" + "symplify/easy-coding-standard-prefixed": "^8.3|^9.1" }, "suggest": { "spiral/pagination": "" @@ -45,7 +45,7 @@ } }, "scripts": { - "test": "phpunit", + "test": "@php -d xdebug.mode=coverage `which phpunit`", "codestyle": "ecs check --ansi", "lint": "phpstan analyze --memory-limit=512M --ansi" }, diff --git a/src/Bridge/DoctrineCollections/DoctrineCollectionsExpressionConverter.php b/src/Bridge/DoctrineCollections/DoctrineCollectionsExpressionConverter.php index cacbbe1..462083f 100755 --- a/src/Bridge/DoctrineCollections/DoctrineCollectionsExpressionConverter.php +++ b/src/Bridge/DoctrineCollections/DoctrineCollectionsExpressionConverter.php @@ -16,7 +16,6 @@ /** * Converts Expressions from Doctrine collections to webmozart expressions - * @package spaceonfire\Criteria\Bridge\DoctrineCollections */ class DoctrineCollectionsExpressionConverter extends ExpressionVisitor { diff --git a/src/Expression/AbstractExpressionDecorator.php b/src/Expression/AbstractExpressionDecorator.php index f3e085f..4bcc735 100755 --- a/src/Expression/AbstractExpressionDecorator.php +++ b/src/Expression/AbstractExpressionDecorator.php @@ -11,8 +11,8 @@ use Webmozart\Expression\Logic; /** - * Class AbstractExpressionAdapter - * @package spaceonfire\Criteria\Expression + * Class AbstractExpressionDecorator. + * * @method Logic\AndX andNot(Expression $expr) * @method Logic\AndX andMethod(string $methodName, mixed[] $args, Expression $expr) * @method Logic\AndX andAtLeast(int $count, Expression $expr) diff --git a/src/Expression/ExpressionFactory.php b/src/Expression/ExpressionFactory.php index 521aff2..1a00f37 100755 --- a/src/Expression/ExpressionFactory.php +++ b/src/Expression/ExpressionFactory.php @@ -38,8 +38,7 @@ use Webmozart\Expression\Selector\Method; /** - * Class ExpressionBuilder - * @package spaceonfire\Criteria\Expression + * Class ExpressionFactory. * * @method Not not(Expression $expr) * @method AndX andX(Expression[] $conjuncts) diff --git a/src/JsonApiCriteriaBuilder.php b/src/JsonApiCriteriaBuilder.php index 384fc10..f7ea530 100755 --- a/src/JsonApiCriteriaBuilder.php +++ b/src/JsonApiCriteriaBuilder.php @@ -12,8 +12,6 @@ * Provides a way to build criteria for JSON API request * * TODO: support parsing filter - * - * @package spaceonfire\Criteria */ class JsonApiCriteriaBuilder {