diff --git a/phpunit/src/Build/CompilerGeneratorFingerprintTest.php b/phpunit/src/Build/CompilerGeneratorFingerprintTest.php index 6c62361e..9bec87c5 100644 --- a/phpunit/src/Build/CompilerGeneratorFingerprintTest.php +++ b/phpunit/src/Build/CompilerGeneratorFingerprintTest.php @@ -21,6 +21,11 @@ final class CompilerGeneratorFingerprintTest extends TestCase $method = (new ReflectionClass(\TypePhp\Translator::class))->getMethod('getIncrementalGeneratorFingerprint'); $native = $method->invoke($compiler); self::assertMatchesRegularExpression('/^[a-f0-9]{64}$/D', $native); + $reflection = new ReflectionClass($compiler); + while (!$reflection->hasProperty('opcodeBuildChecked')) { + $reflection = $reflection->getParentClass(); + } + self::assertFalse($reflection->getProperty('opcodeBuildChecked')->getValue($compiler)); self::assertSame($native, $method->invoke($compiler)); define('TYPEPHP_PHP_SCRIPT_ENTRY', true); self::assertNotSame($native, $method->invoke($compiler)); diff --git a/src/Build/IncrementalCompilationTrait.php b/src/Build/IncrementalCompilationTrait.php index be5e2697..038220eb 100644 --- a/src/Build/IncrementalCompilationTrait.php +++ b/src/Build/IncrementalCompilationTrait.php @@ -365,7 +365,6 @@ trait IncrementalCompilationTrait 'platform' => $this->targetPlatform, 'literalStrings' => !$this->noLiteralStrings, 'debug' => $this->debug, - 'anonymousOpcode' => $this->canEmbedAnonymousClassOpcode(), ])); // New self-hosted compiler builds embed their immutable source snapshot.