Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.
/ criteria Public archive

Commit

Permalink
Merge pull request #3 from spaceonfire/php8
Browse files Browse the repository at this point in the history
chore: support installation on PHP 8
  • Loading branch information
tntrex authored Feb 16, 2021
2 parents 091fc7f + 044029a commit 93872b5
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 23 deletions.
25 changes: 15 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
pull_request:
branches:
- master
workflow_dispatch:

jobs:
composer:
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
14 changes: 12 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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": ""
Expand All @@ -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"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

/**
* Converts Expressions from Doctrine collections to webmozart expressions
* @package spaceonfire\Criteria\Bridge\DoctrineCollections
*/
class DoctrineCollectionsExpressionConverter extends ExpressionVisitor
{
Expand Down
4 changes: 2 additions & 2 deletions src/Expression/AbstractExpressionDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions src/Expression/ExpressionFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions src/JsonApiCriteriaBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
* Provides a way to build criteria for JSON API request
*
* TODO: support parsing filter
*
* @package spaceonfire\Criteria
*/
class JsonApiCriteriaBuilder
{
Expand Down

0 comments on commit 93872b5

Please sign in to comment.