i have setup a new project with symfony flex (symfony v4.2).
after that, i install with composer JMSSerializer-Bundle (v3.0).
Now i wan't to install FosRestBundle (v2.4), but when cache was cleared during composer, i got followed error:
In JMSHandlerRegistry.php line 24:
!!
!! Compile Error: Declaration of FOS\RestBundle\Serializer\JMSHandlerRegistry:
!! :registerSubscribingHandler(JMS\Serializer\Handler\SubscribingHandlerInterf
!! ace $handler) must be compatible with JMS\Serializer\Handler\HandlerRegistr
!! yInterface::registerSubscribingHandler(JMS\Serializer\Handler\SubscribingHa
!! ndlerInterface $handler): void
i have same problem
The changes required to make FOSRestBundle compatible with JMSSerizerBundle 3 have not been part of a release yet. You will need to allow development dependencies for it for the moment.
You mean install
composer req friendsofsymfony/rest-bundle "dev-master"
?
composer req friendsofsymfony/rest-bundle "dev-master"
resolved this error
Just ran into the same problem when trying to upgrade jms/serializer. Using rest-bundle dev-master indeed fixed the problem. When can we expect a release?
Please release as soon as possible. Thanks in advance :)
Using dev-master in the meanwhile
@xabbuh @GuilhemN What is the reason for the delay? I see that master also has compatibility with SF 4.2 solved and CI is running tests against PHP 7.3. So what else is blocking the release? I was unable to find any milestone or issue tracking the progress of the next version so even if someone wanted to help with a PR, right now they can't.
@enumag I guess it's #1972 that blocks the release. We need to get rid of deprecations with Symfony 4.2 before releasing a new version.
Note that upcoming release is dropping Symfony < 3.4 and JMS Serializer <1.13.
Until the release is out, please either lock your JMS Serializer at 1.13 or use FOSRestBundle dev-master (risky).
@xabbuh I think it can be closed, thanks to v2.5.0 release: #1976
Most helpful comment
composer req friendsofsymfony/rest-bundle "dev-master"
resolved this error