-
Notifications
You must be signed in to change notification settings - Fork 95
Add support for DenormalizerInterface::denormalize #54
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
Conversation
Hi, if the code is the same it shouldn't be done with copy-pasting source code but with reusing the same class as a different DI service.
028dbc8 to
d96eaa0
Compare
Yes only getClass and isMethodSupported methods change.
But I'm not sure to know what you mean behind
reusing the same class as a different DI service.
You want to inject through the constructor the variable stuff ? or by inheritance and override concerned methods ?
d96eaa0 to
4a4f888
Compare
Injecting in constructor. Register it in extension.neon multiple times with different arguments.
98c6d26 to
d369fe8
Compare
d369fe8 to
4073030
Compare
Ok, here it is !
But I'm not sure to know why tests with highest dependencies fail. If anyone can help on this, please let me know.
PHPStan\Type\Symfony\EnvelopeReturnTypeExtensionTest::testAll with data set #0 ('$test1', 'array<Symfony\Component\Messe...Stamp>')
ArgumentCountError: Too few arguments to function PHPStan\Analyser\NodeScopeResolver::__construct(), 9 passed in /home/travis/build/phpstan/phpstan-symfony/tests/Type/Symfony/ExtensionTestCase.php on line 55 and exactly 10 expected
/home/travis/build/phpstan/phpstan-symfony/vendor/phpstan/phpstan/src/Analyser/NodeScopeResolver.php:140
/home/travis/build/phpstan/phpstan-symfony/tests/Type/Symfony/ExtensionTestCase.php:55
/home/travis/build/phpstan/phpstan-symfony/tests/Type/Symfony/EnvelopeReturnTypeExtensionTest.php:21
Indeed here is the commit that breaks test highest deps :
phpstan/phpstan@22f904a
I updated to change ExtensionTestCase by adding true to the NodeScopeResolver constructor.
edit: unfortunately this change breaks the lowest deps.
Please let me know what is the best solution for you.
I'll take a look tonight. We might have to do some fancy schmancy magic to accomodate for both old and new PHPStan versions..
You should open 0.12-dev before merging this, that will make your job easier.
alsciende
commented
Aug 3, 2019
Any hope this will be merged soon?
NavyCoat
commented
Oct 1, 2019
We still need to find a way to make both world (lowest and highest deps) green. I should admit I am using my fork for now as I failed to make it green ^^
Guys, sorry, I completely forgot about this. I will fix and merge it this weekend during a hackathon. Thank you for your patience.
Thanks!
Great! Thanks for your help!
I guess we are close to publish a new release ?
0.11.6...master
Hi people,
As SerializerInterface, DenormalizerInterface has the same trouble.
So I just copy the code and adapt it to work with DenormalizerInterface.