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

Update doctrine/instantiator to v2.x for PHP 8.1 #1483

Closed
JBlocks opened this issue Apr 14, 2023 · 5 comments
Closed

Update doctrine/instantiator to v2.x for PHP 8.1 #1483

JBlocks opened this issue Apr 14, 2023 · 5 comments

Comments

@JBlocks
Copy link

JBlocks commented Apr 14, 2023

Q A
Bug report? no
Feature request? yes
BC Break report? no

Steps required to reproduce the problem

  1. Using PHP >=v8.1
  2. Install jms serializer with composer composer req jms/serializer
  3. Installation failed with doctrine/instantiator[1.1.0, ..., 1.3.0] require php ^7.1 -> your php version (8.1.16) does not satisfy that requirement.

Expected Result

  • Update the dependency of doctrine/instantiator to v2.x to be compatible with php 8.1

Actual Result

  • Installation failed with doctrine/instantiator[1.1.0, ..., 1.3.0] require php ^7.1 -> your php version (8.1.16) does not satisfy that requirement.
@mbabker
Copy link
Contributor

mbabker commented Apr 14, 2023

The doctrine/instantiator package supports ^7.1 || ^8.0 as of its 1.3.1 release. Try updating that package first.

@goetas goetas closed this as completed Apr 16, 2023
@JBlocks
Copy link
Author

JBlocks commented Apr 17, 2023

Thanks for the feedback. Would it still be possible to bring the jms serializer to the new version 2 of doctrine/instantiator?

We currently have to resolve some dependencies, as e.g. the new TYPO3 CMS v12 uses the doctrine/instantiator:^2 package. The CMS and third-party providers will now increasingly update to the new versions. The doctrine/orm package also uses the v2 of doctrine/instantiator.

@scyzoryck
Copy link
Collaborator

Hi. Last time when I was checking it there were some troubles with its installation - conflicts with other library. However if you have some time feel free to take a look at it and submit MR. I will be glad to help you if you would need any help. I will add this to my personal todo list too, however it is hard to estimate when I will have some time to work on that.

@mbabker
Copy link
Contributor

mbabker commented Apr 17, 2023

I just checked a Symfony app on what requires the Instantiator package:

$ composer why doctrine/instantiator
doctrine/orm    2.14.2 requires doctrine/instantiator (^1.3)         
jms/serializer  3.23.0 requires doctrine/instantiator (^1.0.3)       
phpunit/phpunit 9.6.7  requires doctrine/instantiator (^1.3.1 || ^2)

Because doctrine/orm is a require-dev of jms/serializer, you still won't be able to install the Instantiator package with stable dependencies until ORM 2.15 ships doctrine/orm#10351. Since there aren't CI builds with optional dependencies removed, you're better off waiting for that ORM release to add the new major to the list.

@scyzoryck
Copy link
Collaborator

doctrine/orm has been released, however to run proper tests for the serialiser there is one more blocker - https://github.com/doctrine/phpcr-odm

➜  serializer git:(master) composer why-not doctrine/instantiator 2
jms/serializer     3.x-dev requires doctrine/instantiator (^1.0.3) 
doctrine/phpcr-odm 1.7.1   requires doctrine/instantiator (^1.0.1) 

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

No branches or pull requests

4 participants