From 73de1c413dab6a9ce4a897f47146fb05afd1b1de Mon Sep 17 00:00:00 2001 From: Leo Feyer Date: Wed, 28 Sep 2022 17:58:23 +0200 Subject: [PATCH] Update the tools --- .../tests/Framework/ContaoFrameworkTest.php | 13 ++-- .../tests/Twig/Interop/ContextFactoryTest.php | 5 +- tools/phpstan/composer.lock | 60 +++++++++---------- tools/rector/composer.lock | 12 ++-- 4 files changed, 49 insertions(+), 41 deletions(-) diff --git a/core-bundle/tests/Framework/ContaoFrameworkTest.php b/core-bundle/tests/Framework/ContaoFrameworkTest.php index bf9bc1e2313..50f07800a84 100644 --- a/core-bundle/tests/Framework/ContaoFrameworkTest.php +++ b/core-bundle/tests/Framework/ContaoFrameworkTest.php @@ -283,6 +283,11 @@ public function testRegistersTheHookServices(): void $this->assertArrayHasKey('parseTemplate', $GLOBALS['TL_HOOKS']); $this->assertArrayHasKey('isVisibleElement', $GLOBALS['TL_HOOKS']); + $getPageLayout = $GLOBALS['TL_HOOKS']['getPageLayout']; + $generatePage = $GLOBALS['TL_HOOKS']['generatePage']; + $parseTemplate = $GLOBALS['TL_HOOKS']['parseTemplate']; + $isVisibleElement = $GLOBALS['TL_HOOKS']['isVisibleElement']; + // Test hooks with high priority are added before low and legacy hooks // Test legacy hooks are added before hooks with priority 0 $this->assertSame( @@ -291,7 +296,7 @@ public function testRegistersTheHookServices(): void ['test.listener.c', 'onGetPageLayout'], ['test.listener.b', 'onGetPageLayout'], ], - $GLOBALS['TL_HOOKS']['getPageLayout'] + $getPageLayout ); // Test hooks with negative priority are added at the end @@ -301,7 +306,7 @@ public function testRegistersTheHookServices(): void ['test.listener.b', 'onGeneratePage'], ['test.listener.a', 'onGeneratePage'], ], - $GLOBALS['TL_HOOKS']['generatePage'] + $generatePage ); // Test legacy hooks are kept when adding only hook listeners with high priority. @@ -310,7 +315,7 @@ public function testRegistersTheHookServices(): void ['test.listener.a', 'onParseTemplate'], ['test.listener.c', 'onParseTemplate'], ], - $GLOBALS['TL_HOOKS']['parseTemplate'] + $parseTemplate ); // Test legacy hooks are kept when adding only hook listeners with low priority. @@ -319,7 +324,7 @@ public function testRegistersTheHookServices(): void ['test.listener.c', 'onIsVisibleElement'], ['test.listener.a', 'onIsVisibleElement'], ], - $GLOBALS['TL_HOOKS']['isVisibleElement'] + $isVisibleElement ); } diff --git a/core-bundle/tests/Twig/Interop/ContextFactoryTest.php b/core-bundle/tests/Twig/Interop/ContextFactoryTest.php index 309d192ceab..4325afe7850 100644 --- a/core-bundle/tests/Twig/Interop/ContextFactoryTest.php +++ b/core-bundle/tests/Twig/Interop/ContextFactoryTest.php @@ -30,6 +30,9 @@ public function testCreateContextFromTemplate(): void $object = new \stdClass(); $object->x = 'y'; + // Work around https://github.com/phpstan/phpstan/issues/8078 + $closure = static fn (): string => 'evaluated Closure'; + $data = [ 'foo' => 'bar', 'a' => [1, 2], @@ -37,7 +40,7 @@ public function testCreateContextFromTemplate(): void 'lazy1' => static fn (): string => 'evaluated', 'lazy2' => static fn (int $n = 0): string => "evaluated: $n", 'lazy3' => static fn (): array => [1, 2], - 'lazy4' => (static fn (): string => 'evaluated Closure')(...), + 'lazy4' => $closure(...), 'value' => 'strtolower', // do not confuse with callable ]; diff --git a/tools/phpstan/composer.lock b/tools/phpstan/composer.lock index cb5c6b3fda0..7bb6332a56d 100644 --- a/tools/phpstan/composer.lock +++ b/tools/phpstan/composer.lock @@ -8,16 +8,16 @@ "packages": [ { "name": "nikic/php-parser", - "version": "v4.14.0", + "version": "v4.15.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1" + "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/34bea19b6e03d8153165d8f30bba4c3be86184c1", - "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/0ef6c55a3f47f89d7a374e6f835197a0b5fcf900", + "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900", "shasum": "" }, "require": { @@ -58,22 +58,22 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.14.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.1" }, - "time": "2022-05-31T20:59:12+00:00" + "time": "2022-09-04T07:30:47+00:00" }, { "name": "phpstan/phpstan", - "version": "1.8.2", + "version": "1.8.6", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "c53312ecc575caf07b0e90dee43883fdf90ca67c" + "reference": "c386ab2741e64cc9e21729f891b28b2b10fe6618" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/c53312ecc575caf07b0e90dee43883fdf90ca67c", - "reference": "c53312ecc575caf07b0e90dee43883fdf90ca67c", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/c386ab2741e64cc9e21729f891b28b2b10fe6618", + "reference": "c386ab2741e64cc9e21729f891b28b2b10fe6618", "shasum": "" }, "require": { @@ -97,9 +97,13 @@ "MIT" ], "description": "PHPStan - PHP Static Analysis Tool", + "keywords": [ + "dev", + "static analysis" + ], "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.8.2" + "source": "https://github.com/phpstan/phpstan/tree/1.8.6" }, "funding": [ { @@ -110,16 +114,12 @@ "url": "https://github.com/phpstan", "type": "github" }, - { - "url": "https://www.patreon.com/phpstan", - "type": "patreon" - }, { "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", "type": "tidelift" } ], - "time": "2022-07-20T09:57:31+00:00" + "time": "2022-09-23T09:54:39+00:00" }, { "name": "phpstan/phpstan-phpunit", @@ -175,16 +175,16 @@ }, { "name": "phpstan/phpstan-symfony", - "version": "1.2.9", + "version": "1.2.13", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-symfony.git", - "reference": "f4cb3b8915d3656e780f305f01c86b70ff933272" + "reference": "016e441a19a2af79ca0c60920ba0d61747b4e855" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-symfony/zipball/f4cb3b8915d3656e780f305f01c86b70ff933272", - "reference": "f4cb3b8915d3656e780f305f01c86b70ff933272", + "url": "https://api.github.com/repos/phpstan/phpstan-symfony/zipball/016e441a19a2af79ca0c60920ba0d61747b4e855", + "reference": "016e441a19a2af79ca0c60920ba0d61747b4e855", "shasum": "" }, "require": { @@ -202,15 +202,15 @@ "phpstan/phpstan-strict-rules": "^1.0", "phpunit/phpunit": "^9.5", "psr/container": "1.0 || 1.1.1", - "symfony/config": "^4.2 || ^5.0", - "symfony/console": "^4.0 || ^5.0", - "symfony/dependency-injection": "^4.0 || ^5.0", - "symfony/form": "^4.0 || ^5.0", - "symfony/framework-bundle": "^4.4 || ^5.0", - "symfony/http-foundation": "^5.1", - "symfony/messenger": "^4.2 || ^5.0", + "symfony/config": "^5.4 || ^6.1", + "symfony/console": "^5.4 || ^6.1", + "symfony/dependency-injection": "^5.4 || ^6.1", + "symfony/form": "^5.4 || ^6.1", + "symfony/framework-bundle": "^5.4 || ^6.1", + "symfony/http-foundation": "^5.4 || ^6.1", + "symfony/messenger": "^5.4", "symfony/polyfill-php80": "^1.24", - "symfony/serializer": "^4.0 || ^5.0" + "symfony/serializer": "^5.4" }, "type": "phpstan-extension", "extra": { @@ -240,9 +240,9 @@ "description": "Symfony Framework extensions and rules for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-symfony/issues", - "source": "https://github.com/phpstan/phpstan-symfony/tree/1.2.9" + "source": "https://github.com/phpstan/phpstan-symfony/tree/1.2.13" }, - "time": "2022-08-05T20:13:38+00:00" + "time": "2022-08-28T13:34:45+00:00" }, { "name": "slam/phpstan-extensions", diff --git a/tools/rector/composer.lock b/tools/rector/composer.lock index d79836ff905..43927b9f30d 100644 --- a/tools/rector/composer.lock +++ b/tools/rector/composer.lock @@ -8,16 +8,16 @@ "packages": [ { "name": "phpstan/phpstan", - "version": "1.8.5", + "version": "1.8.6", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "f6598a5ff12ca4499a836815e08b4d77a2ddeb20" + "reference": "c386ab2741e64cc9e21729f891b28b2b10fe6618" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/f6598a5ff12ca4499a836815e08b4d77a2ddeb20", - "reference": "f6598a5ff12ca4499a836815e08b4d77a2ddeb20", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/c386ab2741e64cc9e21729f891b28b2b10fe6618", + "reference": "c386ab2741e64cc9e21729f891b28b2b10fe6618", "shasum": "" }, "require": { @@ -47,7 +47,7 @@ ], "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.8.5" + "source": "https://github.com/phpstan/phpstan/tree/1.8.6" }, "funding": [ { @@ -63,7 +63,7 @@ "type": "tidelift" } ], - "time": "2022-09-07T16:05:32+00:00" + "time": "2022-09-23T09:54:39+00:00" }, { "name": "rector/rector",