From 47a98f25e4e22bc17aaa54fc1bd7c2e8801d2a3f Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Mon, 8 Mar 2021 22:41:17 +0100 Subject: [PATCH] Bump min version to PHP 7.3 (#617) --- .github/workflows/code_checks.yaml | 2 +- composer.json | 37 ++++++++++++------------- rector.php | 4 +++ src/Model/Tree/TreeNodeMethodsTrait.php | 2 +- 4 files changed, 24 insertions(+), 21 deletions(-) diff --git a/.github/workflows/code_checks.yaml b/.github/workflows/code_checks.yaml index 5ea4f259..521b0b9d 100644 --- a/.github/workflows/code_checks.yaml +++ b/.github/workflows/code_checks.yaml @@ -21,7 +21,7 @@ jobs: - name: 'Rector CI' - run: composer rector + run: vendor/bin/rector process --dry-run --ansi name: ${{ matrix.actions.name }} runs-on: ubuntu-latest diff --git a/composer.json b/composer.json index 1a33a5d3..50d3dd67 100644 --- a/composer.json +++ b/composer.json @@ -11,32 +11,32 @@ { "name": "Knplabs", "homepage": "http://knplabs.com" } ], "require": { - "php": "^7.2|^8.0", - "doctrine/common": "^2.7|^3.0", - "doctrine/persistence": "^1.3.4|^2.0", + "php": ">=7.3", + "doctrine/common": "^3.0", + "doctrine/persistence": "^2.0", "doctrine/dbal": "^2.9", - "doctrine/orm": "^2.7", - "symfony/cache": "^4.4|^5.1", - "symfony/dependency-injection": "^4.4|^5.1", - "symfony/http-kernel": "^4.4|^5.1", - "symfony/security-core": "^4.4|^5.1", - "symfony/framework-bundle": "^4.4|^5.1", - "symfony/string": "^5.0", - "symfony/translation-contracts": "^2.1", - "nette/utils": "^3.0", - "ramsey/uuid": "^3.9|^4.0", - "symfony/polyfill-php80": "^1.18" + "doctrine/orm": "^2.8", + "symfony/cache": "^4.4|^5.2", + "symfony/dependency-injection": "^4.4|^5.2", + "symfony/http-kernel": "^4.4|^5.2", + "symfony/security-core": "^4.4|^5.2", + "symfony/framework-bundle": "^4.4|^5.2", + "symfony/string": "^5.2", + "symfony/translation-contracts": "^2.3", + "nette/utils": "^3.2", + "ramsey/uuid": "^4.0", + "symfony/polyfill-php80": "^1.22" }, "require-dev": { "ext-pdo_sqlite": "*", "ext-pdo_mysql": "*", "ext-pdo_pgsql": "*", "psr/log": "^1.1", - "doctrine/annotations": "^1.8", - "doctrine/doctrine-bundle": "^2.0", + "doctrine/annotations": "^1.12", + "doctrine/doctrine-bundle": "^2.2", "php-parallel-lint/php-parallel-lint": "^1.2", "phpstan/phpstan": "^0.12.80", - "phpunit/phpunit": "^8.5|^9.2", + "phpunit/phpunit": "^9.5", "rector/rector-prefixed": "^0.9", "symplify/easy-coding-standard": "^9.2.6", "symplify/phpstan-extensions": "^9.2.6", @@ -59,7 +59,6 @@ "scripts": { "check-cs": "vendor/bin/ecs check --ansi", "fix-cs": "vendor/bin/ecs check --fix --ansi", - "phpstan": "vendor/bin/phpstan analyse --ansi --error-format symplify", - "rector": "vendor/bin/rector process --dry-run" + "phpstan": "vendor/bin/phpstan analyse --ansi --error-format symplify" } } diff --git a/rector.php b/rector.php index 2dd6ad79..995ad4bf 100644 --- a/rector.php +++ b/rector.php @@ -18,6 +18,10 @@ SetList::CODING_STYLE, SetList::NETTE_UTILS_CODE_QUALITY, SetList::NAMING, + SetList::PHP_70, + SetList::PHP_71, + SetList::PHP_72, + SetList::PHP_73, ]); $parameters->set(Option::SKIP, [ diff --git a/src/Model/Tree/TreeNodeMethodsTrait.php b/src/Model/Tree/TreeNodeMethodsTrait.php index ae514207..3c62bd13 100644 --- a/src/Model/Tree/TreeNodeMethodsTrait.php +++ b/src/Model/Tree/TreeNodeMethodsTrait.php @@ -103,7 +103,7 @@ public function addChildNode(TreeNodeInterface $treeNode): void public function isIndirectChildNodeOf(TreeNodeInterface $treeNode): bool { return $this->getRealMaterializedPath() !== $treeNode->getRealMaterializedPath() - && strpos($this->getRealMaterializedPath(), $treeNode->getRealMaterializedPath()) === 0; + && strpos($this->getRealMaterializedPath(), (string) $treeNode->getRealMaterializedPath()) === 0; } public function isChildNodeOf(TreeNodeInterface $treeNode): bool