From cf074fd874a96d57525c4d21989b3a355af3503e Mon Sep 17 00:00:00 2001 From: Konrad Oboza Date: Wed, 5 Jan 2022 15:04:10 +0100 Subject: [PATCH] Bumped PHP requirement (#70) --- .github/workflows/ci.yaml | 39 ++++++++++++++++++++-- composer.json | 21 +++++++----- src/lib/FieldType/Value/RowsCollection.php | 2 +- 3 files changed, 49 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f53dfd1..fea2d1a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -8,6 +8,40 @@ on: pull_request: ~ jobs: + cs-fix: + name: Run code style check + runs-on: "ubuntu-20.04" + strategy: + matrix: + php: + - '8.0' + steps: + - uses: actions/checkout@v2 + + - name: Setup PHP Action + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + coverage: none + extensions: 'pdo_sqlite, gd' + tools: cs2pr + + - name: Add composer keys for private packagist + run: | + composer config http-basic.updates.ibexa.co $SATIS_NETWORK_KEY $SATIS_NETWORK_TOKEN + composer config github-oauth.github.com $TRAVIS_GITHUB_TOKEN + env: + SATIS_NETWORK_KEY: ${{ secrets.SATIS_NETWORK_KEY }} + SATIS_NETWORK_TOKEN: ${{ secrets.SATIS_NETWORK_TOKEN }} + TRAVIS_GITHUB_TOKEN: ${{ secrets.TRAVIS_GITHUB_TOKEN }} + + - uses: "ramsey/composer-install@v1" + with: + dependency-versions: "highest" + + - name: Run code style check + run: composer run-script check-cs -- --format=checkstyle | cs2pr + tests: name: Tests runs-on: "ubuntu-20.04" @@ -19,6 +53,8 @@ jobs: php: - '7.3' - '7.4' + - '8.0' + - '8.1' composer_options: [ "" ] steps: @@ -40,8 +76,5 @@ jobs: - name: Setup problem matchers for PHPUnit run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - - name: Run code style check - run: composer run-script check-cs -- --format=checkstyle | cs2pr - - name: Run test suite run: composer run-script --timeout=600 test diff --git a/composer.json b/composer.json index 9cfbab5..d373934 100644 --- a/composer.json +++ b/composer.json @@ -21,12 +21,12 @@ } }, "require": { - "php": "^7.3", + "php": "^7.3 || ^8.0", "ext-libxml": "*", "ext-simplexml": "*", "ezsystems/ezplatform-kernel": "^1.3@dev", - "ezsystems/ezplatform-content-forms": "^1.0@dev", - "ezsystems/ezplatform-graphql": "^2.0@dev", + "ezsystems/ezplatform-content-forms": "^1.3@dev", + "ezsystems/ezplatform-graphql": "^2.3@dev", "symfony/http-kernel": "^5.0", "symfony/console": "^5.0", "symfony/config": "^5.0", @@ -38,15 +38,18 @@ "require-dev": { "ibexa/ci-scripts": "^0.1@dev", "ezsystems/doctrine-dbal-schema": "^1.0@dev", - "ezsystems/ez-support-tools": "^2.0@dev", - "ezsystems/ezplatform-admin-ui": "^2.0@dev", - "ezsystems/ezplatform-user": "^2.0@dev", - "ezsystems/ezplatform-richtext": "^2.0@dev", - "ezsystems/ezplatform-rest": "^1.0@dev", + "ezsystems/ez-support-tools": "^2.3@dev", + "ezsystems/ezplatform-admin-ui": "^2.3@dev", + "ezsystems/ezplatform-user": "^2.3@dev", + "ezsystems/ezplatform-richtext": "^2.3@dev", + "ezsystems/ezplatform-rest": "^1.3@dev", "ezsystems/ezplatform-design-engine": "^3.0@dev", "ezsystems/ezplatform-code-style": "^0.1.0", + "ezsystems/ezplatform-search": "^1.2@dev", + "ezsystems/ezplatform-core": "^2.3@dev", + "ezsystems/ezplatform-http-cache": "^2.3@dev", "friendsofphp/php-cs-fixer": "^2.16.0", - "phpunit/phpunit": "^6.4" + "phpunit/phpunit": "^9.5" }, "scripts": { "fix-cs": "php-cs-fixer fix -v --show-progress=estimating", diff --git a/src/lib/FieldType/Value/RowsCollection.php b/src/lib/FieldType/Value/RowsCollection.php index dd9e4bc..1813ded 100644 --- a/src/lib/FieldType/Value/RowsCollection.php +++ b/src/lib/FieldType/Value/RowsCollection.php @@ -33,7 +33,7 @@ public function __construct(array $elements = []) * * @throws \eZ\Publish\Core\Base\Exceptions\InvalidArgumentType */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { if (!$value instanceof Row) { throw new InvalidArgumentType(