From 3297cccad39532118ec902fa9bd8a33c69481ba7 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 23 Dec 2020 09:48:00 +0100 Subject: [PATCH] Allow PHP 8 --- .github/workflows/continuous-integration.yml | 1 + composer.json | 4 ++-- download-box.sh | 2 +- lib/Doctrine/Migrations/SchemaDumper.php | 2 +- phpstan.neon.dist | 2 -- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index bc1c2fc1d1..a4dfb517db 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -32,6 +32,7 @@ jobs: - "7.2" - "7.3" - "7.4" + - "8.0" deps: - "normal" include: diff --git a/composer.json b/composer.json index 9ab1cdbbe7..d2b476d7e4 100644 --- a/composer.json +++ b/composer.json @@ -24,11 +24,11 @@ } ], "require": { - "php": "^7.2", + "php": "^7.2 || ^8.0", "composer/package-versions-deprecated": "^1.8", "doctrine/dbal": "^2.10", "doctrine/event-manager": "^1.0", - "ocramius/proxy-manager": "^2.0.2", + "friendsofphp/proxy-manager-lts": "^1.0", "psr/log": "^1.1.3", "symfony/console": "^3.4 || ^4.4.16 || ^5.0", "symfony/stopwatch": "^3.4 || ^4.0 || ^5.0" diff --git a/download-box.sh b/download-box.sh index 36f31d00e5..554a0dc725 100755 --- a/download-box.sh +++ b/download-box.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash if [ ! -f box.phar ]; then - wget https://github.com/box-project/box/releases/download/3.9.1/box.phar -O box.phar + wget https://github.com/box-project/box/releases/download/$(php -r 'echo PHP_VERSION_ID >= 70300 ? "3.11.0" : "3.9.1";')/box.phar -O box.phar fi diff --git a/lib/Doctrine/Migrations/SchemaDumper.php b/lib/Doctrine/Migrations/SchemaDumper.php index 5bc5993ac1..6c2b659a42 100644 --- a/lib/Doctrine/Migrations/SchemaDumper.php +++ b/lib/Doctrine/Migrations/SchemaDumper.php @@ -158,7 +158,7 @@ private static function pregMatch(string $pattern, string $subject, ?array &$mat { try { $errorMessages = []; - set_error_handler(static function (int $severity, string $message, string $file, int $line, array $params) use (&$errorMessages): bool { + set_error_handler(static function (int $severity, string $message, string $file, int $line) use (&$errorMessages): bool { $errorMessages[] = $message; return true; diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 476ba18882..4d4ffc30a7 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -9,8 +9,6 @@ parameters: excludes_analyse: - %currentWorkingDirectory%/tests/Doctrine/Migrations/Tests/Configuration/ConfigurationTestSource/Migrations/Version123.php ignoreErrors: - # Ignore proxy manager magic - - '~ProxyManager\\Proxy\\VirtualProxyInterface~' - '~Variable method call on Doctrine\\Migrations\\AbstractMigration~' - message: '~^Call to function in_array\(\) requires parameter #3 to be true\.$~'