From c08178978a52b396314a232090e9e1aab3710658 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 21 Aug 2020 14:41:08 +0200 Subject: [PATCH 1/3] [Filesystem] fix test on PHP 8 --- src/Symfony/Component/Filesystem/Filesystem.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Filesystem/Filesystem.php b/src/Symfony/Component/Filesystem/Filesystem.php index 0b5297ecf0..a78d81d723 100644 --- a/src/Symfony/Component/Filesystem/Filesystem.php +++ b/src/Symfony/Component/Filesystem/Filesystem.php @@ -198,7 +198,7 @@ class Filesystem public function chmod($files, $mode, $umask = 0000, $recursive = false) { foreach ($this->toIterable($files) as $file) { - if (true !== @chmod($file, $mode & ~$umask)) { + if ((\PHP_VERSION_ID < 80000 || \is_int($mode)) && true !== @chmod($file, $mode & ~$umask)) { throw new IOException(sprintf('Failed to chmod file "%s".', $file), 0, null, $file); } if ($recursive && is_dir($file) && !is_link($file)) { From 967331e63aad31bf05da89049e0e6d4a0ca89861 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 21 Aug 2020 13:57:31 +0200 Subject: [PATCH 2/3] allow Doctrine DBAL 3 --- composer.json | 2 +- src/Symfony/Bridge/Doctrine/composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 10887f2cde..b2f9c50293 100644 --- a/composer.json +++ b/composer.json @@ -105,7 +105,7 @@ "doctrine/cache": "~1.6", "doctrine/collections": "~1.0", "doctrine/data-fixtures": "^1.1", - "doctrine/dbal": "~2.4", + "doctrine/dbal": "~2.4|^3.0", "doctrine/orm": "~2.4,>=2.4.5", "doctrine/reflection": "~1.0", "doctrine/doctrine-bundle": "^1.5|^2.0", diff --git a/src/Symfony/Bridge/Doctrine/composer.json b/src/Symfony/Bridge/Doctrine/composer.json index 4194aa2037..5bc8ffd1b2 100644 --- a/src/Symfony/Bridge/Doctrine/composer.json +++ b/src/Symfony/Bridge/Doctrine/composer.json @@ -43,7 +43,7 @@ "doctrine/cache": "~1.6", "doctrine/collections": "~1.0", "doctrine/data-fixtures": "^1.1", - "doctrine/dbal": "~2.4", + "doctrine/dbal": "~2.4|^3.0", "doctrine/orm": "^2.6.3", "doctrine/reflection": "~1.0" }, From a55ce7c8bb70b3de948cb76cee374c9b3e0f05d8 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 21 Aug 2020 16:12:43 +0200 Subject: [PATCH 3/3] fix passing arguments to call_user_func_array() on PHP 8 --- .../Component/ExpressionLanguage/Node/GetAttrNode.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/ExpressionLanguage/Node/GetAttrNode.php b/src/Symfony/Component/ExpressionLanguage/Node/GetAttrNode.php index 1cf414aefe..dffe0e30f6 100644 --- a/src/Symfony/Component/ExpressionLanguage/Node/GetAttrNode.php +++ b/src/Symfony/Component/ExpressionLanguage/Node/GetAttrNode.php @@ -86,7 +86,13 @@ class GetAttrNode extends Node throw new \RuntimeException(sprintf('Unable to call method "%s" of object "%s".', $this->nodes['attribute']->attributes['value'], \get_class($obj))); } - return \call_user_func_array($toCall, $this->nodes['arguments']->evaluate($functions, $values)); + $arguments = $this->nodes['arguments']->evaluate($functions, $values); + + if (\PHP_VERSION_ID >= 80000) { + $arguments = array_values($arguments); + } + + return \call_user_func_array($toCall, $arguments); case self::ARRAY_CALL: $array = $this->nodes['node']->evaluate($functions, $values);