From 21054932ec236cbbd00f29e4fdb2e696a4b16b31 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 28 Aug 2026 20:50:48 +0000 Subject: [PATCH 1/9] Add PHP 8.5 audit harness and feature fixtures Temporary audit-branch artifacts: weaves PHP 8.1-8.5 feature fixtures (pipe operator, clone-with, closures in constant expressions, attributes on constants, #[NoDiscard], final promoted properties, static asymmetric visibility, enum const-expr cases, non-scalar attribute args, new in initializers) through the real WeavingTransformer and lints the woven trait and generated proxy. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01WFMYyvE4hYRUoMS8mtKrHP --- .../Transformer/Php85AuditScratchTest.php | 190 ++++++++++++++++++ .../_files/audit/Php81EnumConstExprCases.php | 19 ++ .../_files/audit/Php81NewInInitializers.php | 27 +++ .../audit/Php81NonScalarAttributeArgs.php | 31 +++ .../_files/audit/Php85CloneWith.php | 24 +++ .../_files/audit/Php85ClosuresInConstExpr.php | 33 +++ .../_files/audit/Php85ConstAttributes.php | 27 +++ .../audit/Php85FinalPromotionAsymStatic.php | 22 ++ .../_files/audit/Php85NoDiscard.php | 19 ++ .../_files/audit/Php85PipeOperator.php | 21 ++ 10 files changed, 413 insertions(+) create mode 100644 tests/Instrument/Transformer/Php85AuditScratchTest.php create mode 100644 tests/Instrument/Transformer/_files/audit/Php81EnumConstExprCases.php create mode 100644 tests/Instrument/Transformer/_files/audit/Php81NewInInitializers.php create mode 100644 tests/Instrument/Transformer/_files/audit/Php81NonScalarAttributeArgs.php create mode 100644 tests/Instrument/Transformer/_files/audit/Php85CloneWith.php create mode 100644 tests/Instrument/Transformer/_files/audit/Php85ClosuresInConstExpr.php create mode 100644 tests/Instrument/Transformer/_files/audit/Php85ConstAttributes.php create mode 100644 tests/Instrument/Transformer/_files/audit/Php85FinalPromotionAsymStatic.php create mode 100644 tests/Instrument/Transformer/_files/audit/Php85NoDiscard.php create mode 100644 tests/Instrument/Transformer/_files/audit/Php85PipeOperator.php diff --git a/tests/Instrument/Transformer/Php85AuditScratchTest.php b/tests/Instrument/Transformer/Php85AuditScratchTest.php new file mode 100644 index 00000000..4945d31b --- /dev/null +++ b/tests/Instrument/Transformer/Php85AuditScratchTest.php @@ -0,0 +1,190 @@ +unmount(); + } + + public function setUp(): void + { + $container = $this->getContainerMock(); + $loader = $this + ->getMockBuilder(AspectLoader::class) + ->setConstructorArgs([$container]) + ->getMock(); + + $this->kernel = $this->getKernelMock( + [ + 'appDir' => dirname(__DIR__), + 'cacheDir' => 'vfs://', + 'cacheFileMode' => 0770, + 'includePaths' => [], + 'excludePaths' => [] + ], + $container + ); + $this->cachePathManager = new CachePathManager($this->kernel); + + $this->transformer = new WeavingTransformer( + $this->kernel, + $this->getInterceptEverythingMatcher(), + $this->cachePathManager, + $loader + ); + } + + /** + * @return array + */ + public static function fixtureNames(): array + { + $names = []; + foreach (glob(__DIR__ . '/_files/audit/*.php') as $file) { + $name = basename($file, '.php'); + $names[$name] = [$name]; + } + + return $names; + } + + #[DataProvider('fixtureNames')] + public function testWeaveAndLint(string $name): void + { + $metadata = $this->loadTestMetadata('audit/' . $name); + + try { + $result = $this->transformer->transform($metadata); + } catch (\Throwable $e) { + file_put_contents(self::OUT_DIR . "/$name.ERROR.txt", (string) $e); + $this->fail("TRANSFORM ERROR for $name: {$e->getMessage()}"); + } + + $woven = $metadata->source; + file_put_contents(self::OUT_DIR . "/$name-woven.php", $woven); + $this->assertLints(self::OUT_DIR . "/$name-woven.php", "$name woven trait"); + + if (preg_match_all("/AOP_CACHE_DIR . '(.+)';$/m", $woven, $matches)) { + foreach ($matches[1] as $i => $proxyPath) { + $proxyContent = (string) file_get_contents('vfs://' . $proxyPath); + $suffix = $i > 0 ? "-$i" : ''; + file_put_contents(self::OUT_DIR . "/$name-proxy$suffix.php", $proxyContent); + $this->assertLints(self::OUT_DIR . "/$name-proxy$suffix.php", "$name proxy #$i"); + } + } + } + + private function assertLints(string $file, string $label): void + { + exec(escapeshellarg(PHP_BINARY) . ' -l ' . escapeshellarg($file) . ' 2>&1', $output, $code); + $this->assertSame(0, $code, "$label does not lint:\n" . implode("\n", $output)); + } + + private function getInterceptEverythingMatcher(): AdviceMatcherInterface + { + $mock = $this->createMock(AdviceMatcherInterface::class); + $mock + ->method('getAdvicesForClass') + ->willReturnCallback(function (ReflectionClass $refClass) { + $advices = []; + foreach ($refClass->getMethods() as $method) { + if ($method->getDeclaringClass()->name !== $refClass->name) { + continue; + } + $advisorId = "advisor.{$refClass->name}->{$method->name}"; + $advices[AspectContainer::METHOD_PREFIX][$method->name][$advisorId] = true; + } + foreach ($refClass->getProperties() as $property) { + if ($property->getDeclaringClass()->name !== $refClass->name) { + continue; + } + if ($property->isReadOnly()) { + continue; + } + $advisorId = "advisor.{$refClass->name}->{$property->name}"; + $advices[AspectContainer::PROPERTY_PREFIX][$property->name][$advisorId] = true; + } + return $advices; + }); + $mock->method('getAdvicesForFunctions')->willReturn([]); + + return $mock; + } + + protected function getKernelMock(array $options, AspectContainer $container): AspectKernel + { + $mock = $this->getMockBuilder(AspectKernel::class) + ->disableOriginalConstructor() + ->onlyMethods(['configureAop', 'getOptions', 'getContainer', 'hasFeature']) + ->getMock(); + + $mock->method('getOptions')->willReturn($options); + $mock->method('getContainer')->willReturn($container); + + return $mock; + } + + private function loadTestMetadata(string $name): StreamMetaData + { + $fileName = __DIR__ . '/_files/' . $name . '.php'; + $stream = fopen('php://filter/string.tolower/resource=' . $fileName, 'r'); + $source = file_get_contents($fileName); + $metadata = new StreamMetaData($stream, $source); + fclose($stream); + + return $metadata; + } + + private function getContainerMock(): AspectContainer + { + $container = $this->createMock(AspectContainer::class); + $container + ->method('getServicesByInterface') + ->willReturnMap([ + [Advisor::class, []] + ]); + + return $container; + } +} diff --git a/tests/Instrument/Transformer/_files/audit/Php81EnumConstExprCases.php b/tests/Instrument/Transformer/_files/audit/Php81EnumConstExprCases.php new file mode 100644 index 00000000..0e054d2f --- /dev/null +++ b/tests/Instrument/Transformer/_files/audit/Php81EnumConstExprCases.php @@ -0,0 +1,19 @@ +name . '=' . $this->value; + } +} diff --git a/tests/Instrument/Transformer/_files/audit/Php81NewInInitializers.php b/tests/Instrument/Transformer/_files/audit/Php81NewInInitializers.php new file mode 100644 index 00000000..d714d085 --- /dev/null +++ b/tests/Instrument/Transformer/_files/audit/Php81NewInInitializers.php @@ -0,0 +1,27 @@ +service->tag . '/' . $helper->tag; + } +} diff --git a/tests/Instrument/Transformer/_files/audit/Php81NonScalarAttributeArgs.php b/tests/Instrument/Transformer/_files/audit/Php81NonScalarAttributeArgs.php new file mode 100644 index 00000000..677fb4ac --- /dev/null +++ b/tests/Instrument/Transformer/_files/audit/Php81NonScalarAttributeArgs.php @@ -0,0 +1,31 @@ + $name]); + } + + public function bump(): static + { + return clone($this, ['count' => $this->count + 1, 'name' => $this->name . '+']); + } +} diff --git a/tests/Instrument/Transformer/_files/audit/Php85ClosuresInConstExpr.php b/tests/Instrument/Transformer/_files/audit/Php85ClosuresInConstExpr.php new file mode 100644 index 00000000..b36617ce --- /dev/null +++ b/tests/Instrument/Transformer/_files/audit/Php85ClosuresInConstExpr.php @@ -0,0 +1,33 @@ +identity . '#' . $this->version; + } +} diff --git a/tests/Instrument/Transformer/_files/audit/Php85NoDiscard.php b/tests/Instrument/Transformer/_files/audit/Php85NoDiscard.php new file mode 100644 index 00000000..e6361d49 --- /dev/null +++ b/tests/Instrument/Transformer/_files/audit/Php85NoDiscard.php @@ -0,0 +1,19 @@ +computeTotal(1, 2); + } +} diff --git a/tests/Instrument/Transformer/_files/audit/Php85PipeOperator.php b/tests/Instrument/Transformer/_files/audit/Php85PipeOperator.php new file mode 100644 index 00000000..f2ca0820 --- /dev/null +++ b/tests/Instrument/Transformer/_files/audit/Php85PipeOperator.php @@ -0,0 +1,21 @@ + trim(...) + |> (fn(string $x) => strtoupper($x)) + |> strrev(...); + } + + public function withNewOnRhs(string $value): \ArrayObject + { + return [$value] |> (fn(array $items) => new \ArrayObject($items)); + } +} From 2822ca772ad0f4df8411133e7fbfd1d4719c1526 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 28 Aug 2026 21:09:32 +0000 Subject: [PATCH 2/9] Reorganize audit fixtures into own autoload root; encode confirmed gaps - Move audit fixtures to tests/Fixtures/audit/src (Go\Tests\Audit) so the functional test project is not polluted by intentionally-broken inputs (one poisoned file aborted debug:advisor for the whole project) - One class per file so the parser-reflection locator can resolve them - Add isolation fixtures: class-level attribute on plain class, global constant in attribute argument - Harness now asserts KNOWN_GAPS (issues #598-#603): a fixture that weaves+lints cleanly is asserted to stay clean; a known-broken one must stay broken until its fix PR removes the entry Audit results (PHP 8.4 / 8.5.10 / 8.6.0beta2): pipe operator, clone-with, NoDiscard, attributes on constants, closure param defaults all weave cleanly; class-level attributes (#598), promoted-property interception (#599), enum const-expr cases (#600), non-scalar attribute args (#601), global consts in attr args (#602) confirmed broken; suite otherwise green on all three PHP versions, phpstan level 10 clean. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01WFMYyvE4hYRUoMS8mtKrHP --- composer.json | 3 +- tests/Fixtures/audit/src/Collaborator.php | 12 +++ tests/Fixtures/audit/src/ConstAttr.php | 13 +++ tests/Fixtures/audit/src/ExprAttr.php | 13 +++ .../audit/src/Php80ClassAttrPlain.php | 14 +++ .../audit/src/Php80GlobalConstAttrArg.php | 14 +++ .../audit/src}/Php81EnumConstExprCases.php | 2 +- .../audit/src}/Php81NewInInitializers.php | 9 +- .../audit/src/Php81NonScalarAttributeArgs.php | 15 +++ .../audit/src}/Php85CloneWith.php | 2 +- .../audit/src}/Php85ClosuresInConstExpr.php | 10 +- .../audit/src}/Php85ConstAttributes.php | 10 +- .../src}/Php85FinalPromotionAsymStatic.php | 2 +- .../audit/src}/Php85NoDiscard.php | 2 +- .../audit/src}/Php85PipeOperator.php | 2 +- tests/Fixtures/audit/src/RichAttr.php | 15 +++ tests/Fixtures/audit/src/Status.php | 11 +++ .../Transformer/Php85AuditScratchTest.php | 97 +++++++++++++++---- .../audit/Php81NonScalarAttributeArgs.php | 31 ------ .../out/Php81EnumConstExprCases.ERROR.txt | 31 ++++++ .../out/Php81NewInInitializers.ERROR.txt | 30 ++++++ .../out/Php81NonScalarAttributeArgs.ERROR.txt | 31 ++++++ .../_files/audit/out/Php85CloneWith.ERROR.txt | 30 ++++++ .../out/Php85ClosuresInConstExpr.ERROR.txt | 30 ++++++ .../audit/out/Php85ConstAttributes.ERROR.txt | 30 ++++++ .../Php85FinalPromotionAsymStatic.ERROR.txt | 30 ++++++ .../_files/audit/out/Php85NoDiscard-proxy.php | 26 +++++ .../_files/audit/out/Php85NoDiscard-woven.php | 20 ++++ .../audit/out/Php85PipeOperator-proxy.php | 25 +++++ .../audit/out/Php85PipeOperator-woven.php | 22 +++++ 30 files changed, 501 insertions(+), 81 deletions(-) create mode 100644 tests/Fixtures/audit/src/Collaborator.php create mode 100644 tests/Fixtures/audit/src/ConstAttr.php create mode 100644 tests/Fixtures/audit/src/ExprAttr.php create mode 100644 tests/Fixtures/audit/src/Php80ClassAttrPlain.php create mode 100644 tests/Fixtures/audit/src/Php80GlobalConstAttrArg.php rename tests/{Instrument/Transformer/_files/audit => Fixtures/audit/src}/Php81EnumConstExprCases.php (91%) rename tests/{Instrument/Transformer/_files/audit => Fixtures/audit/src}/Php81NewInInitializers.php (77%) create mode 100644 tests/Fixtures/audit/src/Php81NonScalarAttributeArgs.php rename tests/{Instrument/Transformer/_files/audit => Fixtures/audit/src}/Php85CloneWith.php (94%) rename tests/{Instrument/Transformer/_files/audit => Fixtures/audit/src}/Php85ClosuresInConstExpr.php (79%) rename tests/{Instrument/Transformer/_files/audit => Fixtures/audit/src}/Php85ConstAttributes.php (62%) rename tests/{Instrument/Transformer/_files/audit => Fixtures/audit/src}/Php85FinalPromotionAsymStatic.php (93%) rename tests/{Instrument/Transformer/_files/audit => Fixtures/audit/src}/Php85NoDiscard.php (91%) rename tests/{Instrument/Transformer/_files/audit => Fixtures/audit/src}/Php85PipeOperator.php (93%) create mode 100644 tests/Fixtures/audit/src/RichAttr.php create mode 100644 tests/Fixtures/audit/src/Status.php delete mode 100644 tests/Instrument/Transformer/_files/audit/Php81NonScalarAttributeArgs.php create mode 100644 tests/Instrument/Transformer/_files/audit/out/Php81EnumConstExprCases.ERROR.txt create mode 100644 tests/Instrument/Transformer/_files/audit/out/Php81NewInInitializers.ERROR.txt create mode 100644 tests/Instrument/Transformer/_files/audit/out/Php81NonScalarAttributeArgs.ERROR.txt create mode 100644 tests/Instrument/Transformer/_files/audit/out/Php85CloneWith.ERROR.txt create mode 100644 tests/Instrument/Transformer/_files/audit/out/Php85ClosuresInConstExpr.ERROR.txt create mode 100644 tests/Instrument/Transformer/_files/audit/out/Php85ConstAttributes.ERROR.txt create mode 100644 tests/Instrument/Transformer/_files/audit/out/Php85FinalPromotionAsymStatic.ERROR.txt create mode 100644 tests/Instrument/Transformer/_files/audit/out/Php85NoDiscard-proxy.php create mode 100644 tests/Instrument/Transformer/_files/audit/out/Php85NoDiscard-woven.php create mode 100644 tests/Instrument/Transformer/_files/audit/out/Php85PipeOperator-proxy.php create mode 100644 tests/Instrument/Transformer/_files/audit/out/Php85PipeOperator-woven.php diff --git a/composer.json b/composer.json index 775b1160..269a69fa 100644 --- a/composer.json +++ b/composer.json @@ -52,7 +52,8 @@ }, "psr-4": { "Go\\": "tests/", - "Go\\Tests\\TestProject\\": "tests/Fixtures/project/src/" + "Go\\Tests\\TestProject\\": "tests/Fixtures/project/src/", + "Go\\Tests\\Audit\\": "tests/Fixtures/audit/src/" }, "files": [ "tests/functions.php", diff --git a/tests/Fixtures/audit/src/Collaborator.php b/tests/Fixtures/audit/src/Collaborator.php new file mode 100644 index 00000000..4890df44 --- /dev/null +++ b/tests/Fixtures/audit/src/Collaborator.php @@ -0,0 +1,12 @@ +unmount(); @@ -81,7 +86,7 @@ public function setUp(): void public static function fixtureNames(): array { $names = []; - foreach (glob(__DIR__ . '/_files/audit/*.php') as $file) { + foreach (glob(self::FIXTURE_DIR . '/*.php') as $file) { $name = basename($file, '.php'); $names[$name] = [$name]; } @@ -89,36 +94,91 @@ public static function fixtureNames(): array return $names; } + /** + * Fixtures currently known to produce a broken weave, keyed to their tracking issue. + * A fix PR that resolves one of these MUST remove the entry (the test then asserts success). + */ + private const KNOWN_GAPS = [ + 'Php80ClassAttrPlain' => 'https://github.com/goaop/framework/issues/598', + 'ExprAttr' => 'https://github.com/goaop/framework/issues/598 + 599', + 'ConstAttr' => 'https://github.com/goaop/framework/issues/598 + 599', + 'RichAttr' => 'https://github.com/goaop/framework/issues/598 + 599', + 'Collaborator' => 'https://github.com/goaop/framework/issues/599', + 'Php81EnumConstExprCases' => 'https://github.com/goaop/framework/issues/600', + 'Php81NonScalarAttributeArgs' => 'https://github.com/goaop/framework/issues/601', + 'Php85ClosuresInConstExpr' => 'https://github.com/goaop/framework/issues/601', + 'Php80GlobalConstAttrArg' => 'https://github.com/goaop/framework/issues/602', + ]; + #[DataProvider('fixtureNames')] public function testWeaveAndLint(string $name): void { - $metadata = $this->loadTestMetadata('audit/' . $name); + // 8.5-only syntax cannot lint (nor natively reflect) on older runtimes + if (str_starts_with($name, 'Php85') && PHP_VERSION_ID < 80500) { + $this->markTestSkipped('Fixture uses PHP 8.5 syntax'); + } + + $problems = $this->weaveAndCollectProblems($name); + + if (isset(self::KNOWN_GAPS[$name])) { + $issue = self::KNOWN_GAPS[$name]; + $this->assertNotSame( + [], + $problems, + "$name weaves cleanly now — the gap tracked in $issue looks fixed. " . + 'Remove it from KNOWN_GAPS so this stays asserted.' + ); + $this->addToAssertionCount(1); + + return; + } + + $this->assertSame([], $problems, "$name should weave cleanly:\n" . implode("\n---\n", $problems)); + } + + /** + * @return list Problems encountered (transform exception or lint failures); empty = clean weave + */ + private function weaveAndCollectProblems(string $name): array + { + $metadata = $this->loadAuditMetadata($name); try { - $result = $this->transformer->transform($metadata); + $this->transformer->transform($metadata); } catch (\Throwable $e) { - file_put_contents(self::OUT_DIR . "/$name.ERROR.txt", (string) $e); - $this->fail("TRANSFORM ERROR for $name: {$e->getMessage()}"); + file_put_contents(self::outDir() . "/$name.ERROR.txt", (string) $e); + + return ["TRANSFORM ERROR: {$e->getMessage()}"]; } - $woven = $metadata->source; - file_put_contents(self::OUT_DIR . "/$name-woven.php", $woven); - $this->assertLints(self::OUT_DIR . "/$name-woven.php", "$name woven trait"); + $problems = []; + $woven = $metadata->source; + file_put_contents(self::outDir() . "/$name-woven.php", $woven); + $problems = [...$problems, ...$this->lintProblems(self::outDir() . "/$name-woven.php", "$name woven trait")]; if (preg_match_all("/AOP_CACHE_DIR . '(.+)';$/m", $woven, $matches)) { foreach ($matches[1] as $i => $proxyPath) { $proxyContent = (string) file_get_contents('vfs://' . $proxyPath); $suffix = $i > 0 ? "-$i" : ''; - file_put_contents(self::OUT_DIR . "/$name-proxy$suffix.php", $proxyContent); - $this->assertLints(self::OUT_DIR . "/$name-proxy$suffix.php", "$name proxy #$i"); + file_put_contents(self::outDir() . "/$name-proxy$suffix.php", $proxyContent); + $problems = [...$problems, ...$this->lintProblems(self::outDir() . "/$name-proxy$suffix.php", "$name proxy #$i")]; } } + + return $problems; } - private function assertLints(string $file, string $label): void + /** + * @return list + */ + private function lintProblems(string $file, string $label): array { exec(escapeshellarg(PHP_BINARY) . ' -l ' . escapeshellarg($file) . ' 2>&1', $output, $code); - $this->assertSame(0, $code, "$label does not lint:\n" . implode("\n", $output)); + if ($code !== 0) { + return ["$label does not lint:\n" . implode("\n", $output)]; + } + + return []; } private function getInterceptEverythingMatcher(): AdviceMatcherInterface @@ -139,7 +199,8 @@ private function getInterceptEverythingMatcher(): AdviceMatcherInterface if ($property->getDeclaringClass()->name !== $refClass->name) { continue; } - if ($property->isReadOnly()) { + // Mirror the real AdviceMatcher gates (static/readonly/hooked are not interceptable) + if ($property->isStatic() || $property->isReadOnly() || $property->hasHooks()) { continue; } $advisorId = "advisor.{$refClass->name}->{$property->name}"; @@ -165,9 +226,9 @@ protected function getKernelMock(array $options, AspectContainer $container): As return $mock; } - private function loadTestMetadata(string $name): StreamMetaData + private function loadAuditMetadata(string $name): StreamMetaData { - $fileName = __DIR__ . '/_files/' . $name . '.php'; + $fileName = self::FIXTURE_DIR . '/' . $name . '.php'; $stream = fopen('php://filter/string.tolower/resource=' . $fileName, 'r'); $source = file_get_contents($fileName); $metadata = new StreamMetaData($stream, $source); diff --git a/tests/Instrument/Transformer/_files/audit/Php81NonScalarAttributeArgs.php b/tests/Instrument/Transformer/_files/audit/Php81NonScalarAttributeArgs.php deleted file mode 100644 index 677fb4ac..00000000 --- a/tests/Instrument/Transformer/_files/audit/Php81NonScalarAttributeArgs.php +++ /dev/null @@ -1,31 +0,0 @@ -__construct() +#3 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(119): Go\ParserReflection\ReflectionProperty->getDeclaringClass() +#4 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(857): Go\ParserReflection\ReflectionProperty->__construct() +#5 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(830): Go\ParserReflection\ReflectionProperty::createEnumNameProperty() +#6 /home/user/framework/vendor/goaop/parser-reflection/src/Traits/ReflectionClassLikeTrait.php(546): Go\ParserReflection\ReflectionProperty::collectFromClassNode() +#7 /home/user/framework/tests/Instrument/Transformer/Php85AuditScratchTest.php(138): Go\ParserReflection\ReflectionClass->getProperties() +#8 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnCallback.php(34): Go\Instrument\Transformer\Php85AuditScratchTest->{closure:Go\Instrument\Transformer\Php85AuditScratchTest::getInterceptEverythingMatcher():129}() +#9 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Matcher.php(150): PHPUnit\Framework\MockObject\Stub\ReturnCallback->invoke() +#10 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/InvocationHandler.php(155): PHPUnit\Framework\MockObject\Matcher->invoked() +#11 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledClass.php(51) : eval()'d code(75): PHPUnit\Framework\MockObject\InvocationHandler->invoke() +#12 /home/user/framework/src/Instrument/Transformer/WeavingTransformer.php(141): MockObject_AdviceMatcherInterface_88a2b02d->getAdvicesForClass() +#13 /home/user/framework/src/Instrument/Transformer/WeavingTransformer.php(109): Go\Instrument\Transformer\WeavingTransformer->processSingleClass() +#14 /home/user/framework/tests/Instrument/Transformer/Php85AuditScratchTest.php(98): Go\Instrument\Transformer\WeavingTransformer->transform() +#15 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(1461): Go\Instrument\Transformer\Php85AuditScratchTest->testWeaveAndLint() +#16 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(1475): PHPUnit\Framework\TestCase->invokeTestMethod() +#17 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(496): PHPUnit\Framework\TestCase->runTest() +#18 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestRunner/TestRunner.php(126): PHPUnit\Framework\TestCase->runBare() +#19 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(328): PHPUnit\Framework\TestRunner\TestRunner->run() +#20 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(627): PHPUnit\Framework\TestCase->run() +#21 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(420): PHPUnit\Framework\TestSuite->runTests() +#22 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(627): PHPUnit\Framework\TestSuite->run() +#23 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(420): PHPUnit\Framework\TestSuite->runTests() +#24 /home/user/framework/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(64): PHPUnit\Framework\TestSuite->run() +#25 /home/user/framework/vendor/phpunit/phpunit/src/TextUI/Application.php(255): PHPUnit\TextUI\TestRunner->run() +#26 /home/user/framework/vendor/phpunit/phpunit/phpunit(104): PHPUnit\TextUI\Application->run() +#27 /home/user/framework/vendor/bin/phpunit(122): include('...') +#28 {main} \ No newline at end of file diff --git a/tests/Instrument/Transformer/_files/audit/out/Php81NewInInitializers.ERROR.txt b/tests/Instrument/Transformer/_files/audit/out/Php81NewInInitializers.ERROR.txt new file mode 100644 index 00000000..c0956336 --- /dev/null +++ b/tests/Instrument/Transformer/_files/audit/out/Php81NewInInitializers.ERROR.txt @@ -0,0 +1,30 @@ +InvalidArgumentException: Class Repro\Collaborator was not found by locator in /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionEngine.php:109 +Stack trace: +#0 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionEngine.php(120): Go\ParserReflection\ReflectionEngine::locateClassFile() +#1 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionClass.php(67): Go\ParserReflection\ReflectionEngine::parseClass() +#2 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(205): Go\ParserReflection\ReflectionClass->__construct() +#3 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(119): Go\ParserReflection\ReflectionProperty->getDeclaringClass() +#4 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(817): Go\ParserReflection\ReflectionProperty->__construct() +#5 /home/user/framework/vendor/goaop/parser-reflection/src/Traits/ReflectionClassLikeTrait.php(546): Go\ParserReflection\ReflectionProperty::collectFromClassNode() +#6 /home/user/framework/tests/Instrument/Transformer/Php85AuditScratchTest.php(138): Go\ParserReflection\ReflectionClass->getProperties() +#7 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnCallback.php(34): Go\Instrument\Transformer\Php85AuditScratchTest->{closure:Go\Instrument\Transformer\Php85AuditScratchTest::getInterceptEverythingMatcher():129}() +#8 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Matcher.php(150): PHPUnit\Framework\MockObject\Stub\ReturnCallback->invoke() +#9 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/InvocationHandler.php(155): PHPUnit\Framework\MockObject\Matcher->invoked() +#10 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledClass.php(51) : eval()'d code(75): PHPUnit\Framework\MockObject\InvocationHandler->invoke() +#11 /home/user/framework/src/Instrument/Transformer/WeavingTransformer.php(141): MockObject_AdviceMatcherInterface_88a2b02d->getAdvicesForClass() +#12 /home/user/framework/src/Instrument/Transformer/WeavingTransformer.php(109): Go\Instrument\Transformer\WeavingTransformer->processSingleClass() +#13 /home/user/framework/tests/Instrument/Transformer/Php85AuditScratchTest.php(98): Go\Instrument\Transformer\WeavingTransformer->transform() +#14 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(1461): Go\Instrument\Transformer\Php85AuditScratchTest->testWeaveAndLint() +#15 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(1475): PHPUnit\Framework\TestCase->invokeTestMethod() +#16 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(496): PHPUnit\Framework\TestCase->runTest() +#17 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestRunner/TestRunner.php(126): PHPUnit\Framework\TestCase->runBare() +#18 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(328): PHPUnit\Framework\TestRunner\TestRunner->run() +#19 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(627): PHPUnit\Framework\TestCase->run() +#20 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(420): PHPUnit\Framework\TestSuite->runTests() +#21 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(627): PHPUnit\Framework\TestSuite->run() +#22 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(420): PHPUnit\Framework\TestSuite->runTests() +#23 /home/user/framework/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(64): PHPUnit\Framework\TestSuite->run() +#24 /home/user/framework/vendor/phpunit/phpunit/src/TextUI/Application.php(255): PHPUnit\TextUI\TestRunner->run() +#25 /home/user/framework/vendor/phpunit/phpunit/phpunit(104): PHPUnit\TextUI\Application->run() +#26 /home/user/framework/vendor/bin/phpunit(122): include('...') +#27 {main} \ No newline at end of file diff --git a/tests/Instrument/Transformer/_files/audit/out/Php81NonScalarAttributeArgs.ERROR.txt b/tests/Instrument/Transformer/_files/audit/out/Php81NonScalarAttributeArgs.ERROR.txt new file mode 100644 index 00000000..141723e0 --- /dev/null +++ b/tests/Instrument/Transformer/_files/audit/out/Php81NonScalarAttributeArgs.ERROR.txt @@ -0,0 +1,31 @@ +InvalidArgumentException: Class Repro\Status was not found by locator in /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionEngine.php:109 +Stack trace: +#0 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionEngine.php(120): Go\ParserReflection\ReflectionEngine::locateClassFile() +#1 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionClass.php(67): Go\ParserReflection\ReflectionEngine::parseClass() +#2 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(205): Go\ParserReflection\ReflectionClass->__construct() +#3 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(119): Go\ParserReflection\ReflectionProperty->getDeclaringClass() +#4 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(857): Go\ParserReflection\ReflectionProperty->__construct() +#5 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(830): Go\ParserReflection\ReflectionProperty::createEnumNameProperty() +#6 /home/user/framework/vendor/goaop/parser-reflection/src/Traits/ReflectionClassLikeTrait.php(546): Go\ParserReflection\ReflectionProperty::collectFromClassNode() +#7 /home/user/framework/tests/Instrument/Transformer/Php85AuditScratchTest.php(138): Go\ParserReflection\ReflectionClass->getProperties() +#8 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnCallback.php(34): Go\Instrument\Transformer\Php85AuditScratchTest->{closure:Go\Instrument\Transformer\Php85AuditScratchTest::getInterceptEverythingMatcher():129}() +#9 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Matcher.php(150): PHPUnit\Framework\MockObject\Stub\ReturnCallback->invoke() +#10 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/InvocationHandler.php(155): PHPUnit\Framework\MockObject\Matcher->invoked() +#11 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledClass.php(51) : eval()'d code(75): PHPUnit\Framework\MockObject\InvocationHandler->invoke() +#12 /home/user/framework/src/Instrument/Transformer/WeavingTransformer.php(141): MockObject_AdviceMatcherInterface_88a2b02d->getAdvicesForClass() +#13 /home/user/framework/src/Instrument/Transformer/WeavingTransformer.php(109): Go\Instrument\Transformer\WeavingTransformer->processSingleClass() +#14 /home/user/framework/tests/Instrument/Transformer/Php85AuditScratchTest.php(98): Go\Instrument\Transformer\WeavingTransformer->transform() +#15 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(1461): Go\Instrument\Transformer\Php85AuditScratchTest->testWeaveAndLint() +#16 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(1475): PHPUnit\Framework\TestCase->invokeTestMethod() +#17 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(496): PHPUnit\Framework\TestCase->runTest() +#18 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestRunner/TestRunner.php(126): PHPUnit\Framework\TestCase->runBare() +#19 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(328): PHPUnit\Framework\TestRunner\TestRunner->run() +#20 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(627): PHPUnit\Framework\TestCase->run() +#21 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(420): PHPUnit\Framework\TestSuite->runTests() +#22 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(627): PHPUnit\Framework\TestSuite->run() +#23 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(420): PHPUnit\Framework\TestSuite->runTests() +#24 /home/user/framework/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(64): PHPUnit\Framework\TestSuite->run() +#25 /home/user/framework/vendor/phpunit/phpunit/src/TextUI/Application.php(255): PHPUnit\TextUI\TestRunner->run() +#26 /home/user/framework/vendor/phpunit/phpunit/phpunit(104): PHPUnit\TextUI\Application->run() +#27 /home/user/framework/vendor/bin/phpunit(122): include('...') +#28 {main} \ No newline at end of file diff --git a/tests/Instrument/Transformer/_files/audit/out/Php85CloneWith.ERROR.txt b/tests/Instrument/Transformer/_files/audit/out/Php85CloneWith.ERROR.txt new file mode 100644 index 00000000..5fe54e26 --- /dev/null +++ b/tests/Instrument/Transformer/_files/audit/out/Php85CloneWith.ERROR.txt @@ -0,0 +1,30 @@ +InvalidArgumentException: Class Repro\Php85CloneWith was not found by locator in /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionEngine.php:109 +Stack trace: +#0 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionEngine.php(120): Go\ParserReflection\ReflectionEngine::locateClassFile() +#1 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionClass.php(67): Go\ParserReflection\ReflectionEngine::parseClass() +#2 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(205): Go\ParserReflection\ReflectionClass->__construct() +#3 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(119): Go\ParserReflection\ReflectionProperty->getDeclaringClass() +#4 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(817): Go\ParserReflection\ReflectionProperty->__construct() +#5 /home/user/framework/vendor/goaop/parser-reflection/src/Traits/ReflectionClassLikeTrait.php(546): Go\ParserReflection\ReflectionProperty::collectFromClassNode() +#6 /home/user/framework/tests/Instrument/Transformer/Php85AuditScratchTest.php(138): Go\ParserReflection\ReflectionClass->getProperties() +#7 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnCallback.php(34): Go\Instrument\Transformer\Php85AuditScratchTest->{closure:Go\Instrument\Transformer\Php85AuditScratchTest::getInterceptEverythingMatcher():129}() +#8 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Matcher.php(150): PHPUnit\Framework\MockObject\Stub\ReturnCallback->invoke() +#9 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/InvocationHandler.php(155): PHPUnit\Framework\MockObject\Matcher->invoked() +#10 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledClass.php(51) : eval()'d code(75): PHPUnit\Framework\MockObject\InvocationHandler->invoke() +#11 /home/user/framework/src/Instrument/Transformer/WeavingTransformer.php(141): MockObject_AdviceMatcherInterface_88a2b02d->getAdvicesForClass() +#12 /home/user/framework/src/Instrument/Transformer/WeavingTransformer.php(109): Go\Instrument\Transformer\WeavingTransformer->processSingleClass() +#13 /home/user/framework/tests/Instrument/Transformer/Php85AuditScratchTest.php(98): Go\Instrument\Transformer\WeavingTransformer->transform() +#14 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(1461): Go\Instrument\Transformer\Php85AuditScratchTest->testWeaveAndLint() +#15 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(1475): PHPUnit\Framework\TestCase->invokeTestMethod() +#16 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(496): PHPUnit\Framework\TestCase->runTest() +#17 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestRunner/TestRunner.php(126): PHPUnit\Framework\TestCase->runBare() +#18 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(328): PHPUnit\Framework\TestRunner\TestRunner->run() +#19 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(627): PHPUnit\Framework\TestCase->run() +#20 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(420): PHPUnit\Framework\TestSuite->runTests() +#21 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(627): PHPUnit\Framework\TestSuite->run() +#22 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(420): PHPUnit\Framework\TestSuite->runTests() +#23 /home/user/framework/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(64): PHPUnit\Framework\TestSuite->run() +#24 /home/user/framework/vendor/phpunit/phpunit/src/TextUI/Application.php(255): PHPUnit\TextUI\TestRunner->run() +#25 /home/user/framework/vendor/phpunit/phpunit/phpunit(104): PHPUnit\TextUI\Application->run() +#26 /home/user/framework/vendor/bin/phpunit(122): include('...') +#27 {main} \ No newline at end of file diff --git a/tests/Instrument/Transformer/_files/audit/out/Php85ClosuresInConstExpr.ERROR.txt b/tests/Instrument/Transformer/_files/audit/out/Php85ClosuresInConstExpr.ERROR.txt new file mode 100644 index 00000000..144bf64f --- /dev/null +++ b/tests/Instrument/Transformer/_files/audit/out/Php85ClosuresInConstExpr.ERROR.txt @@ -0,0 +1,30 @@ +InvalidArgumentException: Class Repro\ExprAttr was not found by locator in /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionEngine.php:109 +Stack trace: +#0 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionEngine.php(120): Go\ParserReflection\ReflectionEngine::locateClassFile() +#1 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionClass.php(67): Go\ParserReflection\ReflectionEngine::parseClass() +#2 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(205): Go\ParserReflection\ReflectionClass->__construct() +#3 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(119): Go\ParserReflection\ReflectionProperty->getDeclaringClass() +#4 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(817): Go\ParserReflection\ReflectionProperty->__construct() +#5 /home/user/framework/vendor/goaop/parser-reflection/src/Traits/ReflectionClassLikeTrait.php(546): Go\ParserReflection\ReflectionProperty::collectFromClassNode() +#6 /home/user/framework/tests/Instrument/Transformer/Php85AuditScratchTest.php(138): Go\ParserReflection\ReflectionClass->getProperties() +#7 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnCallback.php(34): Go\Instrument\Transformer\Php85AuditScratchTest->{closure:Go\Instrument\Transformer\Php85AuditScratchTest::getInterceptEverythingMatcher():129}() +#8 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Matcher.php(150): PHPUnit\Framework\MockObject\Stub\ReturnCallback->invoke() +#9 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/InvocationHandler.php(155): PHPUnit\Framework\MockObject\Matcher->invoked() +#10 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledClass.php(51) : eval()'d code(75): PHPUnit\Framework\MockObject\InvocationHandler->invoke() +#11 /home/user/framework/src/Instrument/Transformer/WeavingTransformer.php(141): MockObject_AdviceMatcherInterface_88a2b02d->getAdvicesForClass() +#12 /home/user/framework/src/Instrument/Transformer/WeavingTransformer.php(109): Go\Instrument\Transformer\WeavingTransformer->processSingleClass() +#13 /home/user/framework/tests/Instrument/Transformer/Php85AuditScratchTest.php(98): Go\Instrument\Transformer\WeavingTransformer->transform() +#14 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(1461): Go\Instrument\Transformer\Php85AuditScratchTest->testWeaveAndLint() +#15 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(1475): PHPUnit\Framework\TestCase->invokeTestMethod() +#16 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(496): PHPUnit\Framework\TestCase->runTest() +#17 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestRunner/TestRunner.php(126): PHPUnit\Framework\TestCase->runBare() +#18 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(328): PHPUnit\Framework\TestRunner\TestRunner->run() +#19 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(627): PHPUnit\Framework\TestCase->run() +#20 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(420): PHPUnit\Framework\TestSuite->runTests() +#21 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(627): PHPUnit\Framework\TestSuite->run() +#22 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(420): PHPUnit\Framework\TestSuite->runTests() +#23 /home/user/framework/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(64): PHPUnit\Framework\TestSuite->run() +#24 /home/user/framework/vendor/phpunit/phpunit/src/TextUI/Application.php(255): PHPUnit\TextUI\TestRunner->run() +#25 /home/user/framework/vendor/phpunit/phpunit/phpunit(104): PHPUnit\TextUI\Application->run() +#26 /home/user/framework/vendor/bin/phpunit(122): include('...') +#27 {main} \ No newline at end of file diff --git a/tests/Instrument/Transformer/_files/audit/out/Php85ConstAttributes.ERROR.txt b/tests/Instrument/Transformer/_files/audit/out/Php85ConstAttributes.ERROR.txt new file mode 100644 index 00000000..f118179a --- /dev/null +++ b/tests/Instrument/Transformer/_files/audit/out/Php85ConstAttributes.ERROR.txt @@ -0,0 +1,30 @@ +InvalidArgumentException: Class Repro\ConstAttr was not found by locator in /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionEngine.php:109 +Stack trace: +#0 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionEngine.php(120): Go\ParserReflection\ReflectionEngine::locateClassFile() +#1 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionClass.php(67): Go\ParserReflection\ReflectionEngine::parseClass() +#2 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(205): Go\ParserReflection\ReflectionClass->__construct() +#3 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(119): Go\ParserReflection\ReflectionProperty->getDeclaringClass() +#4 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(817): Go\ParserReflection\ReflectionProperty->__construct() +#5 /home/user/framework/vendor/goaop/parser-reflection/src/Traits/ReflectionClassLikeTrait.php(546): Go\ParserReflection\ReflectionProperty::collectFromClassNode() +#6 /home/user/framework/tests/Instrument/Transformer/Php85AuditScratchTest.php(138): Go\ParserReflection\ReflectionClass->getProperties() +#7 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnCallback.php(34): Go\Instrument\Transformer\Php85AuditScratchTest->{closure:Go\Instrument\Transformer\Php85AuditScratchTest::getInterceptEverythingMatcher():129}() +#8 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Matcher.php(150): PHPUnit\Framework\MockObject\Stub\ReturnCallback->invoke() +#9 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/InvocationHandler.php(155): PHPUnit\Framework\MockObject\Matcher->invoked() +#10 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledClass.php(51) : eval()'d code(75): PHPUnit\Framework\MockObject\InvocationHandler->invoke() +#11 /home/user/framework/src/Instrument/Transformer/WeavingTransformer.php(141): MockObject_AdviceMatcherInterface_88a2b02d->getAdvicesForClass() +#12 /home/user/framework/src/Instrument/Transformer/WeavingTransformer.php(109): Go\Instrument\Transformer\WeavingTransformer->processSingleClass() +#13 /home/user/framework/tests/Instrument/Transformer/Php85AuditScratchTest.php(98): Go\Instrument\Transformer\WeavingTransformer->transform() +#14 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(1461): Go\Instrument\Transformer\Php85AuditScratchTest->testWeaveAndLint() +#15 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(1475): PHPUnit\Framework\TestCase->invokeTestMethod() +#16 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(496): PHPUnit\Framework\TestCase->runTest() +#17 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestRunner/TestRunner.php(126): PHPUnit\Framework\TestCase->runBare() +#18 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(328): PHPUnit\Framework\TestRunner\TestRunner->run() +#19 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(627): PHPUnit\Framework\TestCase->run() +#20 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(420): PHPUnit\Framework\TestSuite->runTests() +#21 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(627): PHPUnit\Framework\TestSuite->run() +#22 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(420): PHPUnit\Framework\TestSuite->runTests() +#23 /home/user/framework/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(64): PHPUnit\Framework\TestSuite->run() +#24 /home/user/framework/vendor/phpunit/phpunit/src/TextUI/Application.php(255): PHPUnit\TextUI\TestRunner->run() +#25 /home/user/framework/vendor/phpunit/phpunit/phpunit(104): PHPUnit\TextUI\Application->run() +#26 /home/user/framework/vendor/bin/phpunit(122): include('...') +#27 {main} \ No newline at end of file diff --git a/tests/Instrument/Transformer/_files/audit/out/Php85FinalPromotionAsymStatic.ERROR.txt b/tests/Instrument/Transformer/_files/audit/out/Php85FinalPromotionAsymStatic.ERROR.txt new file mode 100644 index 00000000..3d875efe --- /dev/null +++ b/tests/Instrument/Transformer/_files/audit/out/Php85FinalPromotionAsymStatic.ERROR.txt @@ -0,0 +1,30 @@ +InvalidArgumentException: Class Repro\Php85FinalPromotionAsymStatic was not found by locator in /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionEngine.php:109 +Stack trace: +#0 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionEngine.php(120): Go\ParserReflection\ReflectionEngine::locateClassFile() +#1 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionClass.php(67): Go\ParserReflection\ReflectionEngine::parseClass() +#2 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(205): Go\ParserReflection\ReflectionClass->__construct() +#3 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(98): Go\ParserReflection\ReflectionProperty->getDeclaringClass() +#4 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(802): Go\ParserReflection\ReflectionProperty->__construct() +#5 /home/user/framework/vendor/goaop/parser-reflection/src/Traits/ReflectionClassLikeTrait.php(546): Go\ParserReflection\ReflectionProperty::collectFromClassNode() +#6 /home/user/framework/tests/Instrument/Transformer/Php85AuditScratchTest.php(138): Go\ParserReflection\ReflectionClass->getProperties() +#7 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnCallback.php(34): Go\Instrument\Transformer\Php85AuditScratchTest->{closure:Go\Instrument\Transformer\Php85AuditScratchTest::getInterceptEverythingMatcher():129}() +#8 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Matcher.php(150): PHPUnit\Framework\MockObject\Stub\ReturnCallback->invoke() +#9 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/InvocationHandler.php(155): PHPUnit\Framework\MockObject\Matcher->invoked() +#10 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledClass.php(51) : eval()'d code(75): PHPUnit\Framework\MockObject\InvocationHandler->invoke() +#11 /home/user/framework/src/Instrument/Transformer/WeavingTransformer.php(141): MockObject_AdviceMatcherInterface_88a2b02d->getAdvicesForClass() +#12 /home/user/framework/src/Instrument/Transformer/WeavingTransformer.php(109): Go\Instrument\Transformer\WeavingTransformer->processSingleClass() +#13 /home/user/framework/tests/Instrument/Transformer/Php85AuditScratchTest.php(98): Go\Instrument\Transformer\WeavingTransformer->transform() +#14 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(1461): Go\Instrument\Transformer\Php85AuditScratchTest->testWeaveAndLint() +#15 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(1475): PHPUnit\Framework\TestCase->invokeTestMethod() +#16 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(496): PHPUnit\Framework\TestCase->runTest() +#17 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestRunner/TestRunner.php(126): PHPUnit\Framework\TestCase->runBare() +#18 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(328): PHPUnit\Framework\TestRunner\TestRunner->run() +#19 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(627): PHPUnit\Framework\TestCase->run() +#20 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(420): PHPUnit\Framework\TestSuite->runTests() +#21 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(627): PHPUnit\Framework\TestSuite->run() +#22 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(420): PHPUnit\Framework\TestSuite->runTests() +#23 /home/user/framework/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(64): PHPUnit\Framework\TestSuite->run() +#24 /home/user/framework/vendor/phpunit/phpunit/src/TextUI/Application.php(255): PHPUnit\TextUI\TestRunner->run() +#25 /home/user/framework/vendor/phpunit/phpunit/phpunit(104): PHPUnit\TextUI\Application->run() +#26 /home/user/framework/vendor/bin/phpunit(122): include('...') +#27 {main} \ No newline at end of file diff --git a/tests/Instrument/Transformer/_files/audit/out/Php85NoDiscard-proxy.php b/tests/Instrument/Transformer/_files/audit/out/Php85NoDiscard-proxy.php new file mode 100644 index 00000000..9823a2bf --- /dev/null +++ b/tests/Instrument/Transformer/_files/audit/out/Php85NoDiscard-proxy.php @@ -0,0 +1,26 @@ + $__joinPoint */ + static $__joinPoint = InterceptorInjector::forMethod(self::class, 'computeTotal', ['advisor.Repro\Php85NoDiscard->computeTotal'], $this->__aop__computeTotal(...)); + return $__joinPoint->__invoke($this, [$a, $b]); + } + public function caller(): int + { + /** @var DynamicMethodInvocation $__joinPoint */ + static $__joinPoint = InterceptorInjector::forMethod(self::class, 'caller', ['advisor.Repro\Php85NoDiscard->caller'], $this->__aop__caller(...)); + return $__joinPoint->__invoke($this); + } +} \ No newline at end of file diff --git a/tests/Instrument/Transformer/_files/audit/out/Php85NoDiscard-woven.php b/tests/Instrument/Transformer/_files/audit/out/Php85NoDiscard-woven.php new file mode 100644 index 00000000..48208f95 --- /dev/null +++ b/tests/Instrument/Transformer/_files/audit/out/Php85NoDiscard-woven.php @@ -0,0 +1,20 @@ +computeTotal(1, 2); + } +} +include_once AOP_CACHE_DIR . '/Transformer/_files/audit/Php85NoDiscard.php'; diff --git a/tests/Instrument/Transformer/_files/audit/out/Php85PipeOperator-proxy.php b/tests/Instrument/Transformer/_files/audit/out/Php85PipeOperator-proxy.php new file mode 100644 index 00000000..12c65914 --- /dev/null +++ b/tests/Instrument/Transformer/_files/audit/out/Php85PipeOperator-proxy.php @@ -0,0 +1,25 @@ + $__joinPoint */ + static $__joinPoint = InterceptorInjector::forMethod(self::class, 'transform', ['advisor.Repro\Php85PipeOperator->transform'], $this->__aop__transform(...)); + return $__joinPoint->__invoke($this, [$input]); + } + public function withNewOnRhs(string $value): \ArrayObject + { + /** @var DynamicMethodInvocation $__joinPoint */ + static $__joinPoint = InterceptorInjector::forMethod(self::class, 'withNewOnRhs', ['advisor.Repro\Php85PipeOperator->withNewOnRhs'], $this->__aop__withNewOnRhs(...)); + return $__joinPoint->__invoke($this, [$value]); + } +} \ No newline at end of file diff --git a/tests/Instrument/Transformer/_files/audit/out/Php85PipeOperator-woven.php b/tests/Instrument/Transformer/_files/audit/out/Php85PipeOperator-woven.php new file mode 100644 index 00000000..7a7bbef3 --- /dev/null +++ b/tests/Instrument/Transformer/_files/audit/out/Php85PipeOperator-woven.php @@ -0,0 +1,22 @@ + trim(...) + |> (fn(string $x) => strtoupper($x)) + |> strrev(...); + } + + public function withNewOnRhs(string $value): \ArrayObject + { + return [$value] |> (fn(array $items) => new \ArrayObject($items)); + } +} +include_once AOP_CACHE_DIR . '/Transformer/_files/audit/Php85PipeOperator.php'; From fcaeed931ddf20087ed565450f77dfef54277cbc Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 28 Aug 2026 21:09:40 +0000 Subject: [PATCH 3/9] Remove stale audit output artifacts from tree Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01WFMYyvE4hYRUoMS8mtKrHP --- .../out/Php81EnumConstExprCases.ERROR.txt | 31 ------------------- .../out/Php81NewInInitializers.ERROR.txt | 30 ------------------ .../out/Php81NonScalarAttributeArgs.ERROR.txt | 31 ------------------- .../_files/audit/out/Php85CloneWith.ERROR.txt | 30 ------------------ .../out/Php85ClosuresInConstExpr.ERROR.txt | 30 ------------------ .../audit/out/Php85ConstAttributes.ERROR.txt | 30 ------------------ .../Php85FinalPromotionAsymStatic.ERROR.txt | 30 ------------------ .../_files/audit/out/Php85NoDiscard-proxy.php | 26 ---------------- .../_files/audit/out/Php85NoDiscard-woven.php | 20 ------------ .../audit/out/Php85PipeOperator-proxy.php | 25 --------------- .../audit/out/Php85PipeOperator-woven.php | 22 ------------- 11 files changed, 305 deletions(-) delete mode 100644 tests/Instrument/Transformer/_files/audit/out/Php81EnumConstExprCases.ERROR.txt delete mode 100644 tests/Instrument/Transformer/_files/audit/out/Php81NewInInitializers.ERROR.txt delete mode 100644 tests/Instrument/Transformer/_files/audit/out/Php81NonScalarAttributeArgs.ERROR.txt delete mode 100644 tests/Instrument/Transformer/_files/audit/out/Php85CloneWith.ERROR.txt delete mode 100644 tests/Instrument/Transformer/_files/audit/out/Php85ClosuresInConstExpr.ERROR.txt delete mode 100644 tests/Instrument/Transformer/_files/audit/out/Php85ConstAttributes.ERROR.txt delete mode 100644 tests/Instrument/Transformer/_files/audit/out/Php85FinalPromotionAsymStatic.ERROR.txt delete mode 100644 tests/Instrument/Transformer/_files/audit/out/Php85NoDiscard-proxy.php delete mode 100644 tests/Instrument/Transformer/_files/audit/out/Php85NoDiscard-woven.php delete mode 100644 tests/Instrument/Transformer/_files/audit/out/Php85PipeOperator-proxy.php delete mode 100644 tests/Instrument/Transformer/_files/audit/out/Php85PipeOperator-woven.php diff --git a/tests/Instrument/Transformer/_files/audit/out/Php81EnumConstExprCases.ERROR.txt b/tests/Instrument/Transformer/_files/audit/out/Php81EnumConstExprCases.ERROR.txt deleted file mode 100644 index 6bbcd57b..00000000 --- a/tests/Instrument/Transformer/_files/audit/out/Php81EnumConstExprCases.ERROR.txt +++ /dev/null @@ -1,31 +0,0 @@ -InvalidArgumentException: Class Repro\Php81EnumConstExprCases was not found by locator in /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionEngine.php:109 -Stack trace: -#0 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionEngine.php(120): Go\ParserReflection\ReflectionEngine::locateClassFile() -#1 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionClass.php(67): Go\ParserReflection\ReflectionEngine::parseClass() -#2 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(205): Go\ParserReflection\ReflectionClass->__construct() -#3 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(119): Go\ParserReflection\ReflectionProperty->getDeclaringClass() -#4 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(857): Go\ParserReflection\ReflectionProperty->__construct() -#5 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(830): Go\ParserReflection\ReflectionProperty::createEnumNameProperty() -#6 /home/user/framework/vendor/goaop/parser-reflection/src/Traits/ReflectionClassLikeTrait.php(546): Go\ParserReflection\ReflectionProperty::collectFromClassNode() -#7 /home/user/framework/tests/Instrument/Transformer/Php85AuditScratchTest.php(138): Go\ParserReflection\ReflectionClass->getProperties() -#8 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnCallback.php(34): Go\Instrument\Transformer\Php85AuditScratchTest->{closure:Go\Instrument\Transformer\Php85AuditScratchTest::getInterceptEverythingMatcher():129}() -#9 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Matcher.php(150): PHPUnit\Framework\MockObject\Stub\ReturnCallback->invoke() -#10 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/InvocationHandler.php(155): PHPUnit\Framework\MockObject\Matcher->invoked() -#11 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledClass.php(51) : eval()'d code(75): PHPUnit\Framework\MockObject\InvocationHandler->invoke() -#12 /home/user/framework/src/Instrument/Transformer/WeavingTransformer.php(141): MockObject_AdviceMatcherInterface_88a2b02d->getAdvicesForClass() -#13 /home/user/framework/src/Instrument/Transformer/WeavingTransformer.php(109): Go\Instrument\Transformer\WeavingTransformer->processSingleClass() -#14 /home/user/framework/tests/Instrument/Transformer/Php85AuditScratchTest.php(98): Go\Instrument\Transformer\WeavingTransformer->transform() -#15 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(1461): Go\Instrument\Transformer\Php85AuditScratchTest->testWeaveAndLint() -#16 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(1475): PHPUnit\Framework\TestCase->invokeTestMethod() -#17 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(496): PHPUnit\Framework\TestCase->runTest() -#18 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestRunner/TestRunner.php(126): PHPUnit\Framework\TestCase->runBare() -#19 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(328): PHPUnit\Framework\TestRunner\TestRunner->run() -#20 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(627): PHPUnit\Framework\TestCase->run() -#21 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(420): PHPUnit\Framework\TestSuite->runTests() -#22 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(627): PHPUnit\Framework\TestSuite->run() -#23 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(420): PHPUnit\Framework\TestSuite->runTests() -#24 /home/user/framework/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(64): PHPUnit\Framework\TestSuite->run() -#25 /home/user/framework/vendor/phpunit/phpunit/src/TextUI/Application.php(255): PHPUnit\TextUI\TestRunner->run() -#26 /home/user/framework/vendor/phpunit/phpunit/phpunit(104): PHPUnit\TextUI\Application->run() -#27 /home/user/framework/vendor/bin/phpunit(122): include('...') -#28 {main} \ No newline at end of file diff --git a/tests/Instrument/Transformer/_files/audit/out/Php81NewInInitializers.ERROR.txt b/tests/Instrument/Transformer/_files/audit/out/Php81NewInInitializers.ERROR.txt deleted file mode 100644 index c0956336..00000000 --- a/tests/Instrument/Transformer/_files/audit/out/Php81NewInInitializers.ERROR.txt +++ /dev/null @@ -1,30 +0,0 @@ -InvalidArgumentException: Class Repro\Collaborator was not found by locator in /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionEngine.php:109 -Stack trace: -#0 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionEngine.php(120): Go\ParserReflection\ReflectionEngine::locateClassFile() -#1 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionClass.php(67): Go\ParserReflection\ReflectionEngine::parseClass() -#2 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(205): Go\ParserReflection\ReflectionClass->__construct() -#3 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(119): Go\ParserReflection\ReflectionProperty->getDeclaringClass() -#4 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(817): Go\ParserReflection\ReflectionProperty->__construct() -#5 /home/user/framework/vendor/goaop/parser-reflection/src/Traits/ReflectionClassLikeTrait.php(546): Go\ParserReflection\ReflectionProperty::collectFromClassNode() -#6 /home/user/framework/tests/Instrument/Transformer/Php85AuditScratchTest.php(138): Go\ParserReflection\ReflectionClass->getProperties() -#7 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnCallback.php(34): Go\Instrument\Transformer\Php85AuditScratchTest->{closure:Go\Instrument\Transformer\Php85AuditScratchTest::getInterceptEverythingMatcher():129}() -#8 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Matcher.php(150): PHPUnit\Framework\MockObject\Stub\ReturnCallback->invoke() -#9 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/InvocationHandler.php(155): PHPUnit\Framework\MockObject\Matcher->invoked() -#10 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledClass.php(51) : eval()'d code(75): PHPUnit\Framework\MockObject\InvocationHandler->invoke() -#11 /home/user/framework/src/Instrument/Transformer/WeavingTransformer.php(141): MockObject_AdviceMatcherInterface_88a2b02d->getAdvicesForClass() -#12 /home/user/framework/src/Instrument/Transformer/WeavingTransformer.php(109): Go\Instrument\Transformer\WeavingTransformer->processSingleClass() -#13 /home/user/framework/tests/Instrument/Transformer/Php85AuditScratchTest.php(98): Go\Instrument\Transformer\WeavingTransformer->transform() -#14 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(1461): Go\Instrument\Transformer\Php85AuditScratchTest->testWeaveAndLint() -#15 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(1475): PHPUnit\Framework\TestCase->invokeTestMethod() -#16 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(496): PHPUnit\Framework\TestCase->runTest() -#17 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestRunner/TestRunner.php(126): PHPUnit\Framework\TestCase->runBare() -#18 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(328): PHPUnit\Framework\TestRunner\TestRunner->run() -#19 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(627): PHPUnit\Framework\TestCase->run() -#20 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(420): PHPUnit\Framework\TestSuite->runTests() -#21 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(627): PHPUnit\Framework\TestSuite->run() -#22 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(420): PHPUnit\Framework\TestSuite->runTests() -#23 /home/user/framework/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(64): PHPUnit\Framework\TestSuite->run() -#24 /home/user/framework/vendor/phpunit/phpunit/src/TextUI/Application.php(255): PHPUnit\TextUI\TestRunner->run() -#25 /home/user/framework/vendor/phpunit/phpunit/phpunit(104): PHPUnit\TextUI\Application->run() -#26 /home/user/framework/vendor/bin/phpunit(122): include('...') -#27 {main} \ No newline at end of file diff --git a/tests/Instrument/Transformer/_files/audit/out/Php81NonScalarAttributeArgs.ERROR.txt b/tests/Instrument/Transformer/_files/audit/out/Php81NonScalarAttributeArgs.ERROR.txt deleted file mode 100644 index 141723e0..00000000 --- a/tests/Instrument/Transformer/_files/audit/out/Php81NonScalarAttributeArgs.ERROR.txt +++ /dev/null @@ -1,31 +0,0 @@ -InvalidArgumentException: Class Repro\Status was not found by locator in /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionEngine.php:109 -Stack trace: -#0 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionEngine.php(120): Go\ParserReflection\ReflectionEngine::locateClassFile() -#1 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionClass.php(67): Go\ParserReflection\ReflectionEngine::parseClass() -#2 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(205): Go\ParserReflection\ReflectionClass->__construct() -#3 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(119): Go\ParserReflection\ReflectionProperty->getDeclaringClass() -#4 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(857): Go\ParserReflection\ReflectionProperty->__construct() -#5 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(830): Go\ParserReflection\ReflectionProperty::createEnumNameProperty() -#6 /home/user/framework/vendor/goaop/parser-reflection/src/Traits/ReflectionClassLikeTrait.php(546): Go\ParserReflection\ReflectionProperty::collectFromClassNode() -#7 /home/user/framework/tests/Instrument/Transformer/Php85AuditScratchTest.php(138): Go\ParserReflection\ReflectionClass->getProperties() -#8 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnCallback.php(34): Go\Instrument\Transformer\Php85AuditScratchTest->{closure:Go\Instrument\Transformer\Php85AuditScratchTest::getInterceptEverythingMatcher():129}() -#9 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Matcher.php(150): PHPUnit\Framework\MockObject\Stub\ReturnCallback->invoke() -#10 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/InvocationHandler.php(155): PHPUnit\Framework\MockObject\Matcher->invoked() -#11 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledClass.php(51) : eval()'d code(75): PHPUnit\Framework\MockObject\InvocationHandler->invoke() -#12 /home/user/framework/src/Instrument/Transformer/WeavingTransformer.php(141): MockObject_AdviceMatcherInterface_88a2b02d->getAdvicesForClass() -#13 /home/user/framework/src/Instrument/Transformer/WeavingTransformer.php(109): Go\Instrument\Transformer\WeavingTransformer->processSingleClass() -#14 /home/user/framework/tests/Instrument/Transformer/Php85AuditScratchTest.php(98): Go\Instrument\Transformer\WeavingTransformer->transform() -#15 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(1461): Go\Instrument\Transformer\Php85AuditScratchTest->testWeaveAndLint() -#16 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(1475): PHPUnit\Framework\TestCase->invokeTestMethod() -#17 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(496): PHPUnit\Framework\TestCase->runTest() -#18 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestRunner/TestRunner.php(126): PHPUnit\Framework\TestCase->runBare() -#19 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(328): PHPUnit\Framework\TestRunner\TestRunner->run() -#20 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(627): PHPUnit\Framework\TestCase->run() -#21 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(420): PHPUnit\Framework\TestSuite->runTests() -#22 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(627): PHPUnit\Framework\TestSuite->run() -#23 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(420): PHPUnit\Framework\TestSuite->runTests() -#24 /home/user/framework/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(64): PHPUnit\Framework\TestSuite->run() -#25 /home/user/framework/vendor/phpunit/phpunit/src/TextUI/Application.php(255): PHPUnit\TextUI\TestRunner->run() -#26 /home/user/framework/vendor/phpunit/phpunit/phpunit(104): PHPUnit\TextUI\Application->run() -#27 /home/user/framework/vendor/bin/phpunit(122): include('...') -#28 {main} \ No newline at end of file diff --git a/tests/Instrument/Transformer/_files/audit/out/Php85CloneWith.ERROR.txt b/tests/Instrument/Transformer/_files/audit/out/Php85CloneWith.ERROR.txt deleted file mode 100644 index 5fe54e26..00000000 --- a/tests/Instrument/Transformer/_files/audit/out/Php85CloneWith.ERROR.txt +++ /dev/null @@ -1,30 +0,0 @@ -InvalidArgumentException: Class Repro\Php85CloneWith was not found by locator in /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionEngine.php:109 -Stack trace: -#0 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionEngine.php(120): Go\ParserReflection\ReflectionEngine::locateClassFile() -#1 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionClass.php(67): Go\ParserReflection\ReflectionEngine::parseClass() -#2 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(205): Go\ParserReflection\ReflectionClass->__construct() -#3 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(119): Go\ParserReflection\ReflectionProperty->getDeclaringClass() -#4 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(817): Go\ParserReflection\ReflectionProperty->__construct() -#5 /home/user/framework/vendor/goaop/parser-reflection/src/Traits/ReflectionClassLikeTrait.php(546): Go\ParserReflection\ReflectionProperty::collectFromClassNode() -#6 /home/user/framework/tests/Instrument/Transformer/Php85AuditScratchTest.php(138): Go\ParserReflection\ReflectionClass->getProperties() -#7 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnCallback.php(34): Go\Instrument\Transformer\Php85AuditScratchTest->{closure:Go\Instrument\Transformer\Php85AuditScratchTest::getInterceptEverythingMatcher():129}() -#8 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Matcher.php(150): PHPUnit\Framework\MockObject\Stub\ReturnCallback->invoke() -#9 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/InvocationHandler.php(155): PHPUnit\Framework\MockObject\Matcher->invoked() -#10 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledClass.php(51) : eval()'d code(75): PHPUnit\Framework\MockObject\InvocationHandler->invoke() -#11 /home/user/framework/src/Instrument/Transformer/WeavingTransformer.php(141): MockObject_AdviceMatcherInterface_88a2b02d->getAdvicesForClass() -#12 /home/user/framework/src/Instrument/Transformer/WeavingTransformer.php(109): Go\Instrument\Transformer\WeavingTransformer->processSingleClass() -#13 /home/user/framework/tests/Instrument/Transformer/Php85AuditScratchTest.php(98): Go\Instrument\Transformer\WeavingTransformer->transform() -#14 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(1461): Go\Instrument\Transformer\Php85AuditScratchTest->testWeaveAndLint() -#15 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(1475): PHPUnit\Framework\TestCase->invokeTestMethod() -#16 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(496): PHPUnit\Framework\TestCase->runTest() -#17 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestRunner/TestRunner.php(126): PHPUnit\Framework\TestCase->runBare() -#18 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(328): PHPUnit\Framework\TestRunner\TestRunner->run() -#19 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(627): PHPUnit\Framework\TestCase->run() -#20 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(420): PHPUnit\Framework\TestSuite->runTests() -#21 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(627): PHPUnit\Framework\TestSuite->run() -#22 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(420): PHPUnit\Framework\TestSuite->runTests() -#23 /home/user/framework/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(64): PHPUnit\Framework\TestSuite->run() -#24 /home/user/framework/vendor/phpunit/phpunit/src/TextUI/Application.php(255): PHPUnit\TextUI\TestRunner->run() -#25 /home/user/framework/vendor/phpunit/phpunit/phpunit(104): PHPUnit\TextUI\Application->run() -#26 /home/user/framework/vendor/bin/phpunit(122): include('...') -#27 {main} \ No newline at end of file diff --git a/tests/Instrument/Transformer/_files/audit/out/Php85ClosuresInConstExpr.ERROR.txt b/tests/Instrument/Transformer/_files/audit/out/Php85ClosuresInConstExpr.ERROR.txt deleted file mode 100644 index 144bf64f..00000000 --- a/tests/Instrument/Transformer/_files/audit/out/Php85ClosuresInConstExpr.ERROR.txt +++ /dev/null @@ -1,30 +0,0 @@ -InvalidArgumentException: Class Repro\ExprAttr was not found by locator in /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionEngine.php:109 -Stack trace: -#0 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionEngine.php(120): Go\ParserReflection\ReflectionEngine::locateClassFile() -#1 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionClass.php(67): Go\ParserReflection\ReflectionEngine::parseClass() -#2 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(205): Go\ParserReflection\ReflectionClass->__construct() -#3 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(119): Go\ParserReflection\ReflectionProperty->getDeclaringClass() -#4 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(817): Go\ParserReflection\ReflectionProperty->__construct() -#5 /home/user/framework/vendor/goaop/parser-reflection/src/Traits/ReflectionClassLikeTrait.php(546): Go\ParserReflection\ReflectionProperty::collectFromClassNode() -#6 /home/user/framework/tests/Instrument/Transformer/Php85AuditScratchTest.php(138): Go\ParserReflection\ReflectionClass->getProperties() -#7 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnCallback.php(34): Go\Instrument\Transformer\Php85AuditScratchTest->{closure:Go\Instrument\Transformer\Php85AuditScratchTest::getInterceptEverythingMatcher():129}() -#8 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Matcher.php(150): PHPUnit\Framework\MockObject\Stub\ReturnCallback->invoke() -#9 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/InvocationHandler.php(155): PHPUnit\Framework\MockObject\Matcher->invoked() -#10 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledClass.php(51) : eval()'d code(75): PHPUnit\Framework\MockObject\InvocationHandler->invoke() -#11 /home/user/framework/src/Instrument/Transformer/WeavingTransformer.php(141): MockObject_AdviceMatcherInterface_88a2b02d->getAdvicesForClass() -#12 /home/user/framework/src/Instrument/Transformer/WeavingTransformer.php(109): Go\Instrument\Transformer\WeavingTransformer->processSingleClass() -#13 /home/user/framework/tests/Instrument/Transformer/Php85AuditScratchTest.php(98): Go\Instrument\Transformer\WeavingTransformer->transform() -#14 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(1461): Go\Instrument\Transformer\Php85AuditScratchTest->testWeaveAndLint() -#15 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(1475): PHPUnit\Framework\TestCase->invokeTestMethod() -#16 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(496): PHPUnit\Framework\TestCase->runTest() -#17 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestRunner/TestRunner.php(126): PHPUnit\Framework\TestCase->runBare() -#18 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(328): PHPUnit\Framework\TestRunner\TestRunner->run() -#19 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(627): PHPUnit\Framework\TestCase->run() -#20 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(420): PHPUnit\Framework\TestSuite->runTests() -#21 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(627): PHPUnit\Framework\TestSuite->run() -#22 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(420): PHPUnit\Framework\TestSuite->runTests() -#23 /home/user/framework/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(64): PHPUnit\Framework\TestSuite->run() -#24 /home/user/framework/vendor/phpunit/phpunit/src/TextUI/Application.php(255): PHPUnit\TextUI\TestRunner->run() -#25 /home/user/framework/vendor/phpunit/phpunit/phpunit(104): PHPUnit\TextUI\Application->run() -#26 /home/user/framework/vendor/bin/phpunit(122): include('...') -#27 {main} \ No newline at end of file diff --git a/tests/Instrument/Transformer/_files/audit/out/Php85ConstAttributes.ERROR.txt b/tests/Instrument/Transformer/_files/audit/out/Php85ConstAttributes.ERROR.txt deleted file mode 100644 index f118179a..00000000 --- a/tests/Instrument/Transformer/_files/audit/out/Php85ConstAttributes.ERROR.txt +++ /dev/null @@ -1,30 +0,0 @@ -InvalidArgumentException: Class Repro\ConstAttr was not found by locator in /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionEngine.php:109 -Stack trace: -#0 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionEngine.php(120): Go\ParserReflection\ReflectionEngine::locateClassFile() -#1 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionClass.php(67): Go\ParserReflection\ReflectionEngine::parseClass() -#2 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(205): Go\ParserReflection\ReflectionClass->__construct() -#3 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(119): Go\ParserReflection\ReflectionProperty->getDeclaringClass() -#4 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(817): Go\ParserReflection\ReflectionProperty->__construct() -#5 /home/user/framework/vendor/goaop/parser-reflection/src/Traits/ReflectionClassLikeTrait.php(546): Go\ParserReflection\ReflectionProperty::collectFromClassNode() -#6 /home/user/framework/tests/Instrument/Transformer/Php85AuditScratchTest.php(138): Go\ParserReflection\ReflectionClass->getProperties() -#7 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnCallback.php(34): Go\Instrument\Transformer\Php85AuditScratchTest->{closure:Go\Instrument\Transformer\Php85AuditScratchTest::getInterceptEverythingMatcher():129}() -#8 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Matcher.php(150): PHPUnit\Framework\MockObject\Stub\ReturnCallback->invoke() -#9 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/InvocationHandler.php(155): PHPUnit\Framework\MockObject\Matcher->invoked() -#10 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledClass.php(51) : eval()'d code(75): PHPUnit\Framework\MockObject\InvocationHandler->invoke() -#11 /home/user/framework/src/Instrument/Transformer/WeavingTransformer.php(141): MockObject_AdviceMatcherInterface_88a2b02d->getAdvicesForClass() -#12 /home/user/framework/src/Instrument/Transformer/WeavingTransformer.php(109): Go\Instrument\Transformer\WeavingTransformer->processSingleClass() -#13 /home/user/framework/tests/Instrument/Transformer/Php85AuditScratchTest.php(98): Go\Instrument\Transformer\WeavingTransformer->transform() -#14 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(1461): Go\Instrument\Transformer\Php85AuditScratchTest->testWeaveAndLint() -#15 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(1475): PHPUnit\Framework\TestCase->invokeTestMethod() -#16 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(496): PHPUnit\Framework\TestCase->runTest() -#17 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestRunner/TestRunner.php(126): PHPUnit\Framework\TestCase->runBare() -#18 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(328): PHPUnit\Framework\TestRunner\TestRunner->run() -#19 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(627): PHPUnit\Framework\TestCase->run() -#20 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(420): PHPUnit\Framework\TestSuite->runTests() -#21 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(627): PHPUnit\Framework\TestSuite->run() -#22 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(420): PHPUnit\Framework\TestSuite->runTests() -#23 /home/user/framework/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(64): PHPUnit\Framework\TestSuite->run() -#24 /home/user/framework/vendor/phpunit/phpunit/src/TextUI/Application.php(255): PHPUnit\TextUI\TestRunner->run() -#25 /home/user/framework/vendor/phpunit/phpunit/phpunit(104): PHPUnit\TextUI\Application->run() -#26 /home/user/framework/vendor/bin/phpunit(122): include('...') -#27 {main} \ No newline at end of file diff --git a/tests/Instrument/Transformer/_files/audit/out/Php85FinalPromotionAsymStatic.ERROR.txt b/tests/Instrument/Transformer/_files/audit/out/Php85FinalPromotionAsymStatic.ERROR.txt deleted file mode 100644 index 3d875efe..00000000 --- a/tests/Instrument/Transformer/_files/audit/out/Php85FinalPromotionAsymStatic.ERROR.txt +++ /dev/null @@ -1,30 +0,0 @@ -InvalidArgumentException: Class Repro\Php85FinalPromotionAsymStatic was not found by locator in /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionEngine.php:109 -Stack trace: -#0 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionEngine.php(120): Go\ParserReflection\ReflectionEngine::locateClassFile() -#1 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionClass.php(67): Go\ParserReflection\ReflectionEngine::parseClass() -#2 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(205): Go\ParserReflection\ReflectionClass->__construct() -#3 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(98): Go\ParserReflection\ReflectionProperty->getDeclaringClass() -#4 /home/user/framework/vendor/goaop/parser-reflection/src/ReflectionProperty.php(802): Go\ParserReflection\ReflectionProperty->__construct() -#5 /home/user/framework/vendor/goaop/parser-reflection/src/Traits/ReflectionClassLikeTrait.php(546): Go\ParserReflection\ReflectionProperty::collectFromClassNode() -#6 /home/user/framework/tests/Instrument/Transformer/Php85AuditScratchTest.php(138): Go\ParserReflection\ReflectionClass->getProperties() -#7 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Stub/ReturnCallback.php(34): Go\Instrument\Transformer\Php85AuditScratchTest->{closure:Go\Instrument\Transformer\Php85AuditScratchTest::getInterceptEverythingMatcher():129}() -#8 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/Matcher.php(150): PHPUnit\Framework\MockObject\Stub\ReturnCallback->invoke() -#9 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Runtime/InvocationHandler.php(155): PHPUnit\Framework\MockObject\Matcher->invoked() -#10 /home/user/framework/vendor/phpunit/phpunit/src/Framework/MockObject/Generator/DoubledClass.php(51) : eval()'d code(75): PHPUnit\Framework\MockObject\InvocationHandler->invoke() -#11 /home/user/framework/src/Instrument/Transformer/WeavingTransformer.php(141): MockObject_AdviceMatcherInterface_88a2b02d->getAdvicesForClass() -#12 /home/user/framework/src/Instrument/Transformer/WeavingTransformer.php(109): Go\Instrument\Transformer\WeavingTransformer->processSingleClass() -#13 /home/user/framework/tests/Instrument/Transformer/Php85AuditScratchTest.php(98): Go\Instrument\Transformer\WeavingTransformer->transform() -#14 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(1461): Go\Instrument\Transformer\Php85AuditScratchTest->testWeaveAndLint() -#15 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(1475): PHPUnit\Framework\TestCase->invokeTestMethod() -#16 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(496): PHPUnit\Framework\TestCase->runTest() -#17 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestRunner/TestRunner.php(126): PHPUnit\Framework\TestCase->runBare() -#18 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestCase.php(328): PHPUnit\Framework\TestRunner\TestRunner->run() -#19 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(627): PHPUnit\Framework\TestCase->run() -#20 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(420): PHPUnit\Framework\TestSuite->runTests() -#21 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(627): PHPUnit\Framework\TestSuite->run() -#22 /home/user/framework/vendor/phpunit/phpunit/src/Framework/TestSuite.php(420): PHPUnit\Framework\TestSuite->runTests() -#23 /home/user/framework/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(64): PHPUnit\Framework\TestSuite->run() -#24 /home/user/framework/vendor/phpunit/phpunit/src/TextUI/Application.php(255): PHPUnit\TextUI\TestRunner->run() -#25 /home/user/framework/vendor/phpunit/phpunit/phpunit(104): PHPUnit\TextUI\Application->run() -#26 /home/user/framework/vendor/bin/phpunit(122): include('...') -#27 {main} \ No newline at end of file diff --git a/tests/Instrument/Transformer/_files/audit/out/Php85NoDiscard-proxy.php b/tests/Instrument/Transformer/_files/audit/out/Php85NoDiscard-proxy.php deleted file mode 100644 index 9823a2bf..00000000 --- a/tests/Instrument/Transformer/_files/audit/out/Php85NoDiscard-proxy.php +++ /dev/null @@ -1,26 +0,0 @@ - $__joinPoint */ - static $__joinPoint = InterceptorInjector::forMethod(self::class, 'computeTotal', ['advisor.Repro\Php85NoDiscard->computeTotal'], $this->__aop__computeTotal(...)); - return $__joinPoint->__invoke($this, [$a, $b]); - } - public function caller(): int - { - /** @var DynamicMethodInvocation $__joinPoint */ - static $__joinPoint = InterceptorInjector::forMethod(self::class, 'caller', ['advisor.Repro\Php85NoDiscard->caller'], $this->__aop__caller(...)); - return $__joinPoint->__invoke($this); - } -} \ No newline at end of file diff --git a/tests/Instrument/Transformer/_files/audit/out/Php85NoDiscard-woven.php b/tests/Instrument/Transformer/_files/audit/out/Php85NoDiscard-woven.php deleted file mode 100644 index 48208f95..00000000 --- a/tests/Instrument/Transformer/_files/audit/out/Php85NoDiscard-woven.php +++ /dev/null @@ -1,20 +0,0 @@ -computeTotal(1, 2); - } -} -include_once AOP_CACHE_DIR . '/Transformer/_files/audit/Php85NoDiscard.php'; diff --git a/tests/Instrument/Transformer/_files/audit/out/Php85PipeOperator-proxy.php b/tests/Instrument/Transformer/_files/audit/out/Php85PipeOperator-proxy.php deleted file mode 100644 index 12c65914..00000000 --- a/tests/Instrument/Transformer/_files/audit/out/Php85PipeOperator-proxy.php +++ /dev/null @@ -1,25 +0,0 @@ - $__joinPoint */ - static $__joinPoint = InterceptorInjector::forMethod(self::class, 'transform', ['advisor.Repro\Php85PipeOperator->transform'], $this->__aop__transform(...)); - return $__joinPoint->__invoke($this, [$input]); - } - public function withNewOnRhs(string $value): \ArrayObject - { - /** @var DynamicMethodInvocation $__joinPoint */ - static $__joinPoint = InterceptorInjector::forMethod(self::class, 'withNewOnRhs', ['advisor.Repro\Php85PipeOperator->withNewOnRhs'], $this->__aop__withNewOnRhs(...)); - return $__joinPoint->__invoke($this, [$value]); - } -} \ No newline at end of file diff --git a/tests/Instrument/Transformer/_files/audit/out/Php85PipeOperator-woven.php b/tests/Instrument/Transformer/_files/audit/out/Php85PipeOperator-woven.php deleted file mode 100644 index 7a7bbef3..00000000 --- a/tests/Instrument/Transformer/_files/audit/out/Php85PipeOperator-woven.php +++ /dev/null @@ -1,22 +0,0 @@ - trim(...) - |> (fn(string $x) => strtoupper($x)) - |> strrev(...); - } - - public function withNewOnRhs(string $value): \ArrayObject - { - return [$value] |> (fn(array $items) => new \ArrayObject($items)); - } -} -include_once AOP_CACHE_DIR . '/Transformer/_files/audit/Php85PipeOperator.php'; From 69c36d3e1beca85ad5f0bcf50d4ba00a69a8b2ba Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 28 Aug 2026 21:31:30 +0000 Subject: [PATCH 4/9] Move audit fixtures into existing tests/Stubs folder Relocate the audit stub classes from a dedicated tests/Fixtures/audit root into tests/Stubs/Audit, which is covered by the existing Go\ autoload mapping, and drop the extra composer.json autoload-dev entry. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01WFMYyvE4hYRUoMS8mtKrHP --- composer.json | 3 +-- tests/Instrument/Transformer/Php85AuditScratchTest.php | 2 +- tests/{Fixtures/audit/src => Stubs/Audit}/Collaborator.php | 2 +- tests/{Fixtures/audit/src => Stubs/Audit}/ConstAttr.php | 2 +- tests/{Fixtures/audit/src => Stubs/Audit}/ExprAttr.php | 2 +- .../audit/src => Stubs/Audit}/Php80ClassAttrPlain.php | 2 +- .../audit/src => Stubs/Audit}/Php80GlobalConstAttrArg.php | 2 +- .../audit/src => Stubs/Audit}/Php81EnumConstExprCases.php | 2 +- .../audit/src => Stubs/Audit}/Php81NewInInitializers.php | 2 +- .../audit/src => Stubs/Audit}/Php81NonScalarAttributeArgs.php | 2 +- tests/{Fixtures/audit/src => Stubs/Audit}/Php85CloneWith.php | 2 +- .../audit/src => Stubs/Audit}/Php85ClosuresInConstExpr.php | 2 +- .../audit/src => Stubs/Audit}/Php85ConstAttributes.php | 2 +- .../src => Stubs/Audit}/Php85FinalPromotionAsymStatic.php | 2 +- tests/{Fixtures/audit/src => Stubs/Audit}/Php85NoDiscard.php | 2 +- .../{Fixtures/audit/src => Stubs/Audit}/Php85PipeOperator.php | 2 +- tests/{Fixtures/audit/src => Stubs/Audit}/RichAttr.php | 2 +- tests/{Fixtures/audit/src => Stubs/Audit}/Status.php | 2 +- 18 files changed, 18 insertions(+), 19 deletions(-) rename tests/{Fixtures/audit/src => Stubs/Audit}/Collaborator.php (83%) rename tests/{Fixtures/audit/src => Stubs/Audit}/ConstAttr.php (88%) rename tests/{Fixtures/audit/src => Stubs/Audit}/ExprAttr.php (86%) rename tests/{Fixtures/audit/src => Stubs/Audit}/Php80ClassAttrPlain.php (84%) rename tests/{Fixtures/audit/src => Stubs/Audit}/Php80GlobalConstAttrArg.php (86%) rename tests/{Fixtures/audit/src => Stubs/Audit}/Php81EnumConstExprCases.php (91%) rename tests/{Fixtures/audit/src => Stubs/Audit}/Php81NewInInitializers.php (93%) rename tests/{Fixtures/audit/src => Stubs/Audit}/Php81NonScalarAttributeArgs.php (91%) rename tests/{Fixtures/audit/src => Stubs/Audit}/Php85CloneWith.php (94%) rename tests/{Fixtures/audit/src => Stubs/Audit}/Php85ClosuresInConstExpr.php (95%) rename tests/{Fixtures/audit/src => Stubs/Audit}/Php85ConstAttributes.php (92%) rename tests/{Fixtures/audit/src => Stubs/Audit}/Php85FinalPromotionAsymStatic.php (93%) rename tests/{Fixtures/audit/src => Stubs/Audit}/Php85NoDiscard.php (91%) rename tests/{Fixtures/audit/src => Stubs/Audit}/Php85PipeOperator.php (93%) rename tests/{Fixtures/audit/src => Stubs/Audit}/RichAttr.php (88%) rename tests/{Fixtures/audit/src => Stubs/Audit}/Status.php (81%) diff --git a/composer.json b/composer.json index 269a69fa..775b1160 100644 --- a/composer.json +++ b/composer.json @@ -52,8 +52,7 @@ }, "psr-4": { "Go\\": "tests/", - "Go\\Tests\\TestProject\\": "tests/Fixtures/project/src/", - "Go\\Tests\\Audit\\": "tests/Fixtures/audit/src/" + "Go\\Tests\\TestProject\\": "tests/Fixtures/project/src/" }, "files": [ "tests/functions.php", diff --git a/tests/Instrument/Transformer/Php85AuditScratchTest.php b/tests/Instrument/Transformer/Php85AuditScratchTest.php index 3a9997e7..e632048a 100644 --- a/tests/Instrument/Transformer/Php85AuditScratchTest.php +++ b/tests/Instrument/Transformer/Php85AuditScratchTest.php @@ -24,7 +24,7 @@ #[\PHPUnit\Framework\Attributes\AllowMockObjectsWithoutExpectations] class Php85AuditScratchTest extends TestCase { - private const FIXTURE_DIR = __DIR__ . '/../../Fixtures/audit/src'; + private const FIXTURE_DIR = __DIR__ . '/../../Stubs/Audit'; protected static FileSystem $fileSystem; diff --git a/tests/Fixtures/audit/src/Collaborator.php b/tests/Stubs/Audit/Collaborator.php similarity index 83% rename from tests/Fixtures/audit/src/Collaborator.php rename to tests/Stubs/Audit/Collaborator.php index 4890df44..213c5065 100644 --- a/tests/Fixtures/audit/src/Collaborator.php +++ b/tests/Stubs/Audit/Collaborator.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Go\Tests\Audit; +namespace Go\Stubs\Audit; class Collaborator { diff --git a/tests/Fixtures/audit/src/ConstAttr.php b/tests/Stubs/Audit/ConstAttr.php similarity index 88% rename from tests/Fixtures/audit/src/ConstAttr.php rename to tests/Stubs/Audit/ConstAttr.php index 407b22e0..c4e08bd6 100644 --- a/tests/Fixtures/audit/src/ConstAttr.php +++ b/tests/Stubs/Audit/ConstAttr.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Go\Tests\Audit; +namespace Go\Stubs\Audit; #[\Attribute(\Attribute::TARGET_CONSTANT | \Attribute::TARGET_CLASS_CONSTANT)] class ConstAttr diff --git a/tests/Fixtures/audit/src/ExprAttr.php b/tests/Stubs/Audit/ExprAttr.php similarity index 86% rename from tests/Fixtures/audit/src/ExprAttr.php rename to tests/Stubs/Audit/ExprAttr.php index 74f80e16..ec0e3342 100644 --- a/tests/Fixtures/audit/src/ExprAttr.php +++ b/tests/Stubs/Audit/ExprAttr.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Go\Tests\Audit; +namespace Go\Stubs\Audit; #[\Attribute(\Attribute::TARGET_ALL)] class ExprAttr diff --git a/tests/Fixtures/audit/src/Php80ClassAttrPlain.php b/tests/Stubs/Audit/Php80ClassAttrPlain.php similarity index 84% rename from tests/Fixtures/audit/src/Php80ClassAttrPlain.php rename to tests/Stubs/Audit/Php80ClassAttrPlain.php index 9219d55c..f6257edb 100644 --- a/tests/Fixtures/audit/src/Php80ClassAttrPlain.php +++ b/tests/Stubs/Audit/Php80ClassAttrPlain.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Go\Tests\Audit; +namespace Go\Stubs\Audit; #[ExprAttr] class Php80ClassAttrPlain diff --git a/tests/Fixtures/audit/src/Php80GlobalConstAttrArg.php b/tests/Stubs/Audit/Php80GlobalConstAttrArg.php similarity index 86% rename from tests/Fixtures/audit/src/Php80GlobalConstAttrArg.php rename to tests/Stubs/Audit/Php80GlobalConstAttrArg.php index f7c00d9d..cc631cb1 100644 --- a/tests/Fixtures/audit/src/Php80GlobalConstAttrArg.php +++ b/tests/Stubs/Audit/Php80GlobalConstAttrArg.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Go\Tests\Audit; +namespace Go\Stubs\Audit; class Php80GlobalConstAttrArg { diff --git a/tests/Fixtures/audit/src/Php81EnumConstExprCases.php b/tests/Stubs/Audit/Php81EnumConstExprCases.php similarity index 91% rename from tests/Fixtures/audit/src/Php81EnumConstExprCases.php rename to tests/Stubs/Audit/Php81EnumConstExprCases.php index 38fa377d..d39d529e 100644 --- a/tests/Fixtures/audit/src/Php81EnumConstExprCases.php +++ b/tests/Stubs/Audit/Php81EnumConstExprCases.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Go\Tests\Audit; +namespace Go\Stubs\Audit; enum Php81EnumConstExprCases: int { diff --git a/tests/Fixtures/audit/src/Php81NewInInitializers.php b/tests/Stubs/Audit/Php81NewInInitializers.php similarity index 93% rename from tests/Fixtures/audit/src/Php81NewInInitializers.php rename to tests/Stubs/Audit/Php81NewInInitializers.php index 8b8ebe02..004ea63f 100644 --- a/tests/Fixtures/audit/src/Php81NewInInitializers.php +++ b/tests/Stubs/Audit/Php81NewInInitializers.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Go\Tests\Audit; +namespace Go\Stubs\Audit; class Php81NewInInitializers { diff --git a/tests/Fixtures/audit/src/Php81NonScalarAttributeArgs.php b/tests/Stubs/Audit/Php81NonScalarAttributeArgs.php similarity index 91% rename from tests/Fixtures/audit/src/Php81NonScalarAttributeArgs.php rename to tests/Stubs/Audit/Php81NonScalarAttributeArgs.php index a9b83c50..18727158 100644 --- a/tests/Fixtures/audit/src/Php81NonScalarAttributeArgs.php +++ b/tests/Stubs/Audit/Php81NonScalarAttributeArgs.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Go\Tests\Audit; +namespace Go\Stubs\Audit; #[RichAttr(Status::Active, new \ArrayObject([1, 2]))] class Php81NonScalarAttributeArgs diff --git a/tests/Fixtures/audit/src/Php85CloneWith.php b/tests/Stubs/Audit/Php85CloneWith.php similarity index 94% rename from tests/Fixtures/audit/src/Php85CloneWith.php rename to tests/Stubs/Audit/Php85CloneWith.php index c29afa1d..5fe140c9 100644 --- a/tests/Fixtures/audit/src/Php85CloneWith.php +++ b/tests/Stubs/Audit/Php85CloneWith.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Go\Tests\Audit; +namespace Go\Stubs\Audit; class Php85CloneWith { diff --git a/tests/Fixtures/audit/src/Php85ClosuresInConstExpr.php b/tests/Stubs/Audit/Php85ClosuresInConstExpr.php similarity index 95% rename from tests/Fixtures/audit/src/Php85ClosuresInConstExpr.php rename to tests/Stubs/Audit/Php85ClosuresInConstExpr.php index 4761ba5e..3b045268 100644 --- a/tests/Fixtures/audit/src/Php85ClosuresInConstExpr.php +++ b/tests/Stubs/Audit/Php85ClosuresInConstExpr.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Go\Tests\Audit; +namespace Go\Stubs\Audit; #[ExprAttr(static function (int $x): int { return $x * 2; })] class Php85ClosuresInConstExpr diff --git a/tests/Fixtures/audit/src/Php85ConstAttributes.php b/tests/Stubs/Audit/Php85ConstAttributes.php similarity index 92% rename from tests/Fixtures/audit/src/Php85ConstAttributes.php rename to tests/Stubs/Audit/Php85ConstAttributes.php index badd0a2d..64d8bb1d 100644 --- a/tests/Fixtures/audit/src/Php85ConstAttributes.php +++ b/tests/Stubs/Audit/Php85ConstAttributes.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Go\Tests\Audit; +namespace Go\Stubs\Audit; class Php85ConstAttributes { diff --git a/tests/Fixtures/audit/src/Php85FinalPromotionAsymStatic.php b/tests/Stubs/Audit/Php85FinalPromotionAsymStatic.php similarity index 93% rename from tests/Fixtures/audit/src/Php85FinalPromotionAsymStatic.php rename to tests/Stubs/Audit/Php85FinalPromotionAsymStatic.php index 9f07ba4f..37ca3fd2 100644 --- a/tests/Fixtures/audit/src/Php85FinalPromotionAsymStatic.php +++ b/tests/Stubs/Audit/Php85FinalPromotionAsymStatic.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Go\Tests\Audit; +namespace Go\Stubs\Audit; class Php85FinalPromotionAsymStatic { diff --git a/tests/Fixtures/audit/src/Php85NoDiscard.php b/tests/Stubs/Audit/Php85NoDiscard.php similarity index 91% rename from tests/Fixtures/audit/src/Php85NoDiscard.php rename to tests/Stubs/Audit/Php85NoDiscard.php index 1e37b4c4..f7385194 100644 --- a/tests/Fixtures/audit/src/Php85NoDiscard.php +++ b/tests/Stubs/Audit/Php85NoDiscard.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Go\Tests\Audit; +namespace Go\Stubs\Audit; class Php85NoDiscard { diff --git a/tests/Fixtures/audit/src/Php85PipeOperator.php b/tests/Stubs/Audit/Php85PipeOperator.php similarity index 93% rename from tests/Fixtures/audit/src/Php85PipeOperator.php rename to tests/Stubs/Audit/Php85PipeOperator.php index 899ca522..5673967d 100644 --- a/tests/Fixtures/audit/src/Php85PipeOperator.php +++ b/tests/Stubs/Audit/Php85PipeOperator.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Go\Tests\Audit; +namespace Go\Stubs\Audit; class Php85PipeOperator { diff --git a/tests/Fixtures/audit/src/RichAttr.php b/tests/Stubs/Audit/RichAttr.php similarity index 88% rename from tests/Fixtures/audit/src/RichAttr.php rename to tests/Stubs/Audit/RichAttr.php index 4a2271d3..0fc000c4 100644 --- a/tests/Fixtures/audit/src/RichAttr.php +++ b/tests/Stubs/Audit/RichAttr.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Go\Tests\Audit; +namespace Go\Stubs\Audit; #[\Attribute(\Attribute::TARGET_ALL)] class RichAttr diff --git a/tests/Fixtures/audit/src/Status.php b/tests/Stubs/Audit/Status.php similarity index 81% rename from tests/Fixtures/audit/src/Status.php rename to tests/Stubs/Audit/Status.php index 61b0d2bc..76050589 100644 --- a/tests/Fixtures/audit/src/Status.php +++ b/tests/Stubs/Audit/Status.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Go\Tests\Audit; +namespace Go\Stubs\Audit; enum Status: string { From a12817d0928239015f8c61a2749f46dacc642527 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 28 Aug 2026 21:33:30 +0000 Subject: [PATCH 5/9] Merge master; flip audit expectations for fixed #601/#602 The attribute-arguments fix (PR #611) resolves the non-scalar and global-constant attribute argument gaps. Php81NonScalarAttributeArgs and Php85ClosuresInConstExpr still fail on their class-level attributes, which is issue #598, so they stay pinned to that issue; Php80GlobalConstAttrArg now weaves cleanly and is asserted to stay clean. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01WFMYyvE4hYRUoMS8mtKrHP --- tests/Instrument/Transformer/Php85AuditScratchTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/Instrument/Transformer/Php85AuditScratchTest.php b/tests/Instrument/Transformer/Php85AuditScratchTest.php index e632048a..8ee51952 100644 --- a/tests/Instrument/Transformer/Php85AuditScratchTest.php +++ b/tests/Instrument/Transformer/Php85AuditScratchTest.php @@ -105,9 +105,9 @@ public static function fixtureNames(): array 'RichAttr' => 'https://github.com/goaop/framework/issues/598 + 599', 'Collaborator' => 'https://github.com/goaop/framework/issues/599', 'Php81EnumConstExprCases' => 'https://github.com/goaop/framework/issues/600', - 'Php81NonScalarAttributeArgs' => 'https://github.com/goaop/framework/issues/601', - 'Php85ClosuresInConstExpr' => 'https://github.com/goaop/framework/issues/601', - 'Php80GlobalConstAttrArg' => 'https://github.com/goaop/framework/issues/602', + // #601/#602 are fixed; these two still carry a class-level attribute, so #598 remains + 'Php81NonScalarAttributeArgs' => 'https://github.com/goaop/framework/issues/598', + 'Php85ClosuresInConstExpr' => 'https://github.com/goaop/framework/issues/598', ]; #[DataProvider('fixtureNames')] From 7235861f7db0f0fa187e90199b201912ec5aa967 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 28 Aug 2026 21:54:58 +0000 Subject: [PATCH 6/9] Sync with master after #613; pin follow-up gaps #615/#616 Class-level attributes, promoted-property interception and new-in-const-expr guards are fixed, so those fixtures are asserted clean now. The fixes exposed two narrower follow-ups, reported as #615 (#[Attribute] classes cannot be woven into traits) and #616 (new-in-initializer default copied onto the proxy hook property), and pinned here. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01WFMYyvE4hYRUoMS8mtKrHP --- .../Transformer/Php85AuditScratchTest.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/Instrument/Transformer/Php85AuditScratchTest.php b/tests/Instrument/Transformer/Php85AuditScratchTest.php index 8ee51952..2827e31a 100644 --- a/tests/Instrument/Transformer/Php85AuditScratchTest.php +++ b/tests/Instrument/Transformer/Php85AuditScratchTest.php @@ -99,15 +99,15 @@ public static function fixtureNames(): array * A fix PR that resolves one of these MUST remove the entry (the test then asserts success). */ private const KNOWN_GAPS = [ - 'Php80ClassAttrPlain' => 'https://github.com/goaop/framework/issues/598', - 'ExprAttr' => 'https://github.com/goaop/framework/issues/598 + 599', - 'ConstAttr' => 'https://github.com/goaop/framework/issues/598 + 599', - 'RichAttr' => 'https://github.com/goaop/framework/issues/598 + 599', - 'Collaborator' => 'https://github.com/goaop/framework/issues/599', - 'Php81EnumConstExprCases' => 'https://github.com/goaop/framework/issues/600', - // #601/#602 are fixed; these two still carry a class-level attribute, so #598 remains - 'Php81NonScalarAttributeArgs' => 'https://github.com/goaop/framework/issues/598', - 'Php85ClosuresInConstExpr' => 'https://github.com/goaop/framework/issues/598', + // #598/#599/#601/#602/#603 are fixed on master; #600 lands with PR #614 + 'Php81EnumConstExprCases' => 'https://github.com/goaop/framework/issues/600', + // Follow-ups found after the #598/#599 fixes landed: + // #[\Attribute] itself is compile-invalid on the woven trait + 'ConstAttr' => 'https://github.com/goaop/framework/issues/615', + 'ExprAttr' => 'https://github.com/goaop/framework/issues/615', + 'RichAttr' => 'https://github.com/goaop/framework/issues/615', + // new-in-initializer default copied onto the proxy hook property + 'Php81NewInInitializers' => 'https://github.com/goaop/framework/issues/616', ]; #[DataProvider('fixtureNames')] From 2723ad838dca4a9a23bf2db333fb6803a6e3f592 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 28 Aug 2026 21:57:42 +0000 Subject: [PATCH 7/9] Make #615 gap expectation version-aware PHP only rejects #[Attribute] on a trait at compile time since 8.5, so the attribute-class fixtures weave cleanly on 8.4 and fatal on 8.5+. Assert the version-specific behavior explicitly. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01WFMYyvE4hYRUoMS8mtKrHP --- .../Instrument/Transformer/Php85AuditScratchTest.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/Instrument/Transformer/Php85AuditScratchTest.php b/tests/Instrument/Transformer/Php85AuditScratchTest.php index 2827e31a..06d06285 100644 --- a/tests/Instrument/Transformer/Php85AuditScratchTest.php +++ b/tests/Instrument/Transformer/Php85AuditScratchTest.php @@ -102,7 +102,8 @@ public static function fixtureNames(): array // #598/#599/#601/#602/#603 are fixed on master; #600 lands with PR #614 'Php81EnumConstExprCases' => 'https://github.com/goaop/framework/issues/600', // Follow-ups found after the #598/#599 fixes landed: - // #[\Attribute] itself is compile-invalid on the woven trait + // #[\Attribute] on a trait only became a compile error in PHP 8.5, + // so these three are gaps on 8.5+ but weave cleanly on 8.4 'ConstAttr' => 'https://github.com/goaop/framework/issues/615', 'ExprAttr' => 'https://github.com/goaop/framework/issues/615', 'RichAttr' => 'https://github.com/goaop/framework/issues/615', @@ -110,6 +111,9 @@ public static function fixtureNames(): array 'Php81NewInInitializers' => 'https://github.com/goaop/framework/issues/616', ]; + /** Fixtures whose KNOWN_GAPS entry applies only on PHP >= 8.5 (see above). */ + private const GAP_ONLY_ON_85 = ['ConstAttr' => true, 'ExprAttr' => true, 'RichAttr' => true]; + #[DataProvider('fixtureNames')] public function testWeaveAndLint(string $name): void { @@ -120,7 +124,10 @@ public function testWeaveAndLint(string $name): void $problems = $this->weaveAndCollectProblems($name); - if (isset(self::KNOWN_GAPS[$name])) { + $isKnownGap = isset(self::KNOWN_GAPS[$name]) + && (!isset(self::GAP_ONLY_ON_85[$name]) || PHP_VERSION_ID >= 80500); + + if ($isKnownGap) { $issue = self::KNOWN_GAPS[$name]; $this->assertNotSame( [], From 44d1b2cc4de73ba248e80e295911049d3e83d48a Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 29 Aug 2026 07:53:20 +0000 Subject: [PATCH 8/9] Sync with master after #614; enum const-expression cases now asserted clean Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01WFMYyvE4hYRUoMS8mtKrHP --- tests/Instrument/Transformer/Php85AuditScratchTest.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/Instrument/Transformer/Php85AuditScratchTest.php b/tests/Instrument/Transformer/Php85AuditScratchTest.php index 06d06285..0afaa2e7 100644 --- a/tests/Instrument/Transformer/Php85AuditScratchTest.php +++ b/tests/Instrument/Transformer/Php85AuditScratchTest.php @@ -99,9 +99,7 @@ public static function fixtureNames(): array * A fix PR that resolves one of these MUST remove the entry (the test then asserts success). */ private const KNOWN_GAPS = [ - // #598/#599/#601/#602/#603 are fixed on master; #600 lands with PR #614 - 'Php81EnumConstExprCases' => 'https://github.com/goaop/framework/issues/600', - // Follow-ups found after the #598/#599 fixes landed: + // #598-#603 are all fixed on master. Remaining follow-ups (#615/#616, fixed by PR #617): // #[\Attribute] on a trait only became a compile error in PHP 8.5, // so these three are gaps on 8.5+ but weave cleanly on 8.4 'ConstAttr' => 'https://github.com/goaop/framework/issues/615', From fedc6f9d38a0e3302864e85193dccd37feee11ea Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 29 Aug 2026 08:36:06 +0000 Subject: [PATCH 9/9] Flatten audit stubs into tests/Stubs Drop the Audit sub-namespace: the stub classes live directly in tests/Stubs (Go\Stubs), and the harness selects them by explicit list instead of globbing the directory. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01WFMYyvE4hYRUoMS8mtKrHP --- .../Transformer/Php85AuditScratchTest.php | 25 ++++++++++++++++--- tests/Stubs/{Audit => }/Collaborator.php | 2 +- tests/Stubs/{Audit => }/ConstAttr.php | 2 +- tests/Stubs/{Audit => }/ExprAttr.php | 2 +- .../Stubs/{Audit => }/Php80ClassAttrPlain.php | 2 +- .../{Audit => }/Php80GlobalConstAttrArg.php | 2 +- .../{Audit => }/Php81EnumConstExprCases.php | 2 +- .../{Audit => }/Php81NewInInitializers.php | 2 +- .../Php81NonScalarAttributeArgs.php | 2 +- tests/Stubs/{Audit => }/Php85CloneWith.php | 2 +- .../{Audit => }/Php85ClosuresInConstExpr.php | 2 +- .../{Audit => }/Php85ConstAttributes.php | 2 +- .../Php85FinalPromotionAsymStatic.php | 2 +- tests/Stubs/{Audit => }/Php85NoDiscard.php | 2 +- tests/Stubs/{Audit => }/Php85PipeOperator.php | 2 +- tests/Stubs/{Audit => }/RichAttr.php | 2 +- tests/Stubs/{Audit => }/Status.php | 2 +- 17 files changed, 38 insertions(+), 19 deletions(-) rename tests/Stubs/{Audit => }/Collaborator.php (83%) rename tests/Stubs/{Audit => }/ConstAttr.php (88%) rename tests/Stubs/{Audit => }/ExprAttr.php (86%) rename tests/Stubs/{Audit => }/Php80ClassAttrPlain.php (84%) rename tests/Stubs/{Audit => }/Php80GlobalConstAttrArg.php (86%) rename tests/Stubs/{Audit => }/Php81EnumConstExprCases.php (91%) rename tests/Stubs/{Audit => }/Php81NewInInitializers.php (93%) rename tests/Stubs/{Audit => }/Php81NonScalarAttributeArgs.php (91%) rename tests/Stubs/{Audit => }/Php85CloneWith.php (94%) rename tests/Stubs/{Audit => }/Php85ClosuresInConstExpr.php (95%) rename tests/Stubs/{Audit => }/Php85ConstAttributes.php (92%) rename tests/Stubs/{Audit => }/Php85FinalPromotionAsymStatic.php (93%) rename tests/Stubs/{Audit => }/Php85NoDiscard.php (91%) rename tests/Stubs/{Audit => }/Php85PipeOperator.php (93%) rename tests/Stubs/{Audit => }/RichAttr.php (88%) rename tests/Stubs/{Audit => }/Status.php (81%) diff --git a/tests/Instrument/Transformer/Php85AuditScratchTest.php b/tests/Instrument/Transformer/Php85AuditScratchTest.php index 0afaa2e7..fbdc1106 100644 --- a/tests/Instrument/Transformer/Php85AuditScratchTest.php +++ b/tests/Instrument/Transformer/Php85AuditScratchTest.php @@ -24,7 +24,27 @@ #[\PHPUnit\Framework\Attributes\AllowMockObjectsWithoutExpectations] class Php85AuditScratchTest extends TestCase { - private const FIXTURE_DIR = __DIR__ . '/../../Stubs/Audit'; + private const FIXTURE_DIR = __DIR__ . '/../../Stubs'; + + /** Audit fixture stubs living in tests/Stubs alongside the general-purpose stubs. */ + private const AUDIT_FIXTURES = [ + 'Collaborator', + 'ConstAttr', + 'ExprAttr', + 'Php80ClassAttrPlain', + 'Php80GlobalConstAttrArg', + 'Php81EnumConstExprCases', + 'Php81NewInInitializers', + 'Php81NonScalarAttributeArgs', + 'Php85CloneWith', + 'Php85ClosuresInConstExpr', + 'Php85ConstAttributes', + 'Php85FinalPromotionAsymStatic', + 'Php85NoDiscard', + 'Php85PipeOperator', + 'RichAttr', + 'Status', + ]; protected static FileSystem $fileSystem; @@ -86,8 +106,7 @@ public function setUp(): void public static function fixtureNames(): array { $names = []; - foreach (glob(self::FIXTURE_DIR . '/*.php') as $file) { - $name = basename($file, '.php'); + foreach (self::AUDIT_FIXTURES as $name) { $names[$name] = [$name]; } diff --git a/tests/Stubs/Audit/Collaborator.php b/tests/Stubs/Collaborator.php similarity index 83% rename from tests/Stubs/Audit/Collaborator.php rename to tests/Stubs/Collaborator.php index 213c5065..ca9e5775 100644 --- a/tests/Stubs/Audit/Collaborator.php +++ b/tests/Stubs/Collaborator.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Go\Stubs\Audit; +namespace Go\Stubs; class Collaborator { diff --git a/tests/Stubs/Audit/ConstAttr.php b/tests/Stubs/ConstAttr.php similarity index 88% rename from tests/Stubs/Audit/ConstAttr.php rename to tests/Stubs/ConstAttr.php index c4e08bd6..d2381b7f 100644 --- a/tests/Stubs/Audit/ConstAttr.php +++ b/tests/Stubs/ConstAttr.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Go\Stubs\Audit; +namespace Go\Stubs; #[\Attribute(\Attribute::TARGET_CONSTANT | \Attribute::TARGET_CLASS_CONSTANT)] class ConstAttr diff --git a/tests/Stubs/Audit/ExprAttr.php b/tests/Stubs/ExprAttr.php similarity index 86% rename from tests/Stubs/Audit/ExprAttr.php rename to tests/Stubs/ExprAttr.php index ec0e3342..42465dc0 100644 --- a/tests/Stubs/Audit/ExprAttr.php +++ b/tests/Stubs/ExprAttr.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Go\Stubs\Audit; +namespace Go\Stubs; #[\Attribute(\Attribute::TARGET_ALL)] class ExprAttr diff --git a/tests/Stubs/Audit/Php80ClassAttrPlain.php b/tests/Stubs/Php80ClassAttrPlain.php similarity index 84% rename from tests/Stubs/Audit/Php80ClassAttrPlain.php rename to tests/Stubs/Php80ClassAttrPlain.php index f6257edb..4cd358b9 100644 --- a/tests/Stubs/Audit/Php80ClassAttrPlain.php +++ b/tests/Stubs/Php80ClassAttrPlain.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Go\Stubs\Audit; +namespace Go\Stubs; #[ExprAttr] class Php80ClassAttrPlain diff --git a/tests/Stubs/Audit/Php80GlobalConstAttrArg.php b/tests/Stubs/Php80GlobalConstAttrArg.php similarity index 86% rename from tests/Stubs/Audit/Php80GlobalConstAttrArg.php rename to tests/Stubs/Php80GlobalConstAttrArg.php index cc631cb1..430152c2 100644 --- a/tests/Stubs/Audit/Php80GlobalConstAttrArg.php +++ b/tests/Stubs/Php80GlobalConstAttrArg.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Go\Stubs\Audit; +namespace Go\Stubs; class Php80GlobalConstAttrArg { diff --git a/tests/Stubs/Audit/Php81EnumConstExprCases.php b/tests/Stubs/Php81EnumConstExprCases.php similarity index 91% rename from tests/Stubs/Audit/Php81EnumConstExprCases.php rename to tests/Stubs/Php81EnumConstExprCases.php index d39d529e..96501ebf 100644 --- a/tests/Stubs/Audit/Php81EnumConstExprCases.php +++ b/tests/Stubs/Php81EnumConstExprCases.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Go\Stubs\Audit; +namespace Go\Stubs; enum Php81EnumConstExprCases: int { diff --git a/tests/Stubs/Audit/Php81NewInInitializers.php b/tests/Stubs/Php81NewInInitializers.php similarity index 93% rename from tests/Stubs/Audit/Php81NewInInitializers.php rename to tests/Stubs/Php81NewInInitializers.php index 004ea63f..a596a4a9 100644 --- a/tests/Stubs/Audit/Php81NewInInitializers.php +++ b/tests/Stubs/Php81NewInInitializers.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Go\Stubs\Audit; +namespace Go\Stubs; class Php81NewInInitializers { diff --git a/tests/Stubs/Audit/Php81NonScalarAttributeArgs.php b/tests/Stubs/Php81NonScalarAttributeArgs.php similarity index 91% rename from tests/Stubs/Audit/Php81NonScalarAttributeArgs.php rename to tests/Stubs/Php81NonScalarAttributeArgs.php index 18727158..a870d35b 100644 --- a/tests/Stubs/Audit/Php81NonScalarAttributeArgs.php +++ b/tests/Stubs/Php81NonScalarAttributeArgs.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Go\Stubs\Audit; +namespace Go\Stubs; #[RichAttr(Status::Active, new \ArrayObject([1, 2]))] class Php81NonScalarAttributeArgs diff --git a/tests/Stubs/Audit/Php85CloneWith.php b/tests/Stubs/Php85CloneWith.php similarity index 94% rename from tests/Stubs/Audit/Php85CloneWith.php rename to tests/Stubs/Php85CloneWith.php index 5fe140c9..1cbaef4e 100644 --- a/tests/Stubs/Audit/Php85CloneWith.php +++ b/tests/Stubs/Php85CloneWith.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Go\Stubs\Audit; +namespace Go\Stubs; class Php85CloneWith { diff --git a/tests/Stubs/Audit/Php85ClosuresInConstExpr.php b/tests/Stubs/Php85ClosuresInConstExpr.php similarity index 95% rename from tests/Stubs/Audit/Php85ClosuresInConstExpr.php rename to tests/Stubs/Php85ClosuresInConstExpr.php index 3b045268..0742f3f6 100644 --- a/tests/Stubs/Audit/Php85ClosuresInConstExpr.php +++ b/tests/Stubs/Php85ClosuresInConstExpr.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Go\Stubs\Audit; +namespace Go\Stubs; #[ExprAttr(static function (int $x): int { return $x * 2; })] class Php85ClosuresInConstExpr diff --git a/tests/Stubs/Audit/Php85ConstAttributes.php b/tests/Stubs/Php85ConstAttributes.php similarity index 92% rename from tests/Stubs/Audit/Php85ConstAttributes.php rename to tests/Stubs/Php85ConstAttributes.php index 64d8bb1d..dc55349e 100644 --- a/tests/Stubs/Audit/Php85ConstAttributes.php +++ b/tests/Stubs/Php85ConstAttributes.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Go\Stubs\Audit; +namespace Go\Stubs; class Php85ConstAttributes { diff --git a/tests/Stubs/Audit/Php85FinalPromotionAsymStatic.php b/tests/Stubs/Php85FinalPromotionAsymStatic.php similarity index 93% rename from tests/Stubs/Audit/Php85FinalPromotionAsymStatic.php rename to tests/Stubs/Php85FinalPromotionAsymStatic.php index 37ca3fd2..0b23d671 100644 --- a/tests/Stubs/Audit/Php85FinalPromotionAsymStatic.php +++ b/tests/Stubs/Php85FinalPromotionAsymStatic.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Go\Stubs\Audit; +namespace Go\Stubs; class Php85FinalPromotionAsymStatic { diff --git a/tests/Stubs/Audit/Php85NoDiscard.php b/tests/Stubs/Php85NoDiscard.php similarity index 91% rename from tests/Stubs/Audit/Php85NoDiscard.php rename to tests/Stubs/Php85NoDiscard.php index f7385194..f2d266d2 100644 --- a/tests/Stubs/Audit/Php85NoDiscard.php +++ b/tests/Stubs/Php85NoDiscard.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Go\Stubs\Audit; +namespace Go\Stubs; class Php85NoDiscard { diff --git a/tests/Stubs/Audit/Php85PipeOperator.php b/tests/Stubs/Php85PipeOperator.php similarity index 93% rename from tests/Stubs/Audit/Php85PipeOperator.php rename to tests/Stubs/Php85PipeOperator.php index 5673967d..dd9b7596 100644 --- a/tests/Stubs/Audit/Php85PipeOperator.php +++ b/tests/Stubs/Php85PipeOperator.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Go\Stubs\Audit; +namespace Go\Stubs; class Php85PipeOperator { diff --git a/tests/Stubs/Audit/RichAttr.php b/tests/Stubs/RichAttr.php similarity index 88% rename from tests/Stubs/Audit/RichAttr.php rename to tests/Stubs/RichAttr.php index 0fc000c4..e67e19f9 100644 --- a/tests/Stubs/Audit/RichAttr.php +++ b/tests/Stubs/RichAttr.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Go\Stubs\Audit; +namespace Go\Stubs; #[\Attribute(\Attribute::TARGET_ALL)] class RichAttr diff --git a/tests/Stubs/Audit/Status.php b/tests/Stubs/Status.php similarity index 81% rename from tests/Stubs/Audit/Status.php rename to tests/Stubs/Status.php index 76050589..f7d9790d 100644 --- a/tests/Stubs/Audit/Status.php +++ b/tests/Stubs/Status.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Go\Stubs\Audit; +namespace Go\Stubs; enum Status: string {