Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixExport() produces invalid FQCN on PHP 8.2 #28

Closed
IonBazan opened this issue Oct 13, 2022 · 0 comments · Fixed by #30
Closed

fixExport() produces invalid FQCN on PHP 8.2 #28

IonBazan opened this issue Oct 13, 2022 · 0 comments · Fixed by #30

Comments

@IonBazan
Copy link

IonBazan commented Oct 13, 2022

fixExport() introduced in #17 does not work correctly on PHP 8.2, where var_export() behaviour was changed:

1) ProxyManagerTest\Functional\MultipleProxyGenerationTest::testCanGenerateMultipleDifferentProxiesForSameClass with data set "php81defaults" (ProxyManagerTestAsset\ClassWithPhp81Defaults Object (...))
Error: Class "P\roxyManagerTestAsset\FooEnum" not found

proxy-manager-lts/tests/ProxyManagerTest/Functional/MultipleProxyGenerationTest.php:103

2) ProxyManagerTest\Functional\RemoteObjectFunctionalTest::testXmlRpcMethodCalls with data set "when using php8.1 defaults" ('ProxyManagerTestAsset\RemoteP...erface', 'php81Defaults', array(), array(ProxyManagerTestAsset\RemoteProxy\FooEnum Object (...), stdClass Object ()), 200)
Error: Class "P\roxyManagerTestAsset\RemoteProxy\FooEnum" not found

proxy-manager-lts/tests/ProxyManagerTest/Functional/RemoteObjectFunctionalTest.php:107

3) ProxyManagerTest\Functional\RemoteObjectFunctionalTest::testJsonRpcMethodCalls with data set "when using php8.1 defaults" ('ProxyManagerTestAsset\RemoteP...erface', 'php81Defaults', array(), array(ProxyManagerTestAsset\RemoteProxy\FooEnum Object (...), stdClass Object ()), 200)
Error: Class "P\roxyManagerTestAsset\RemoteProxy\FooEnum" not found

proxy-manager-lts/tests/ProxyManagerTest/Functional/RemoteObjectFunctionalTest.php:131

As you can see, it produces \P\roxyManagerTestAsset\FooEnum instead of \ProxyManagerTestAsset\FooEnum.

Ref: php/php-src#8232
Ref: php/php-src#8233

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant