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

fix: add doctrine common to dependency list in composer.json #1746

Closed

Conversation

Ahummeling
Copy link

@Ahummeling Ahummeling commented Jan 23, 2024

As described in #1745 , the PR hopes to resolve a missing dependency on doctrine/common that is encountered when upgrading doctrine/orm to 3.0.x.

Running composer update --prefer-lowest installed the 2.0.x version of doctrine/orm.
Running composer why doctrine/common informed me that doctrine/orm 2.14.0 requires doctrine/common (^3.0.3)

Running composer req doctrine/common ^3.0.3 added the dependency as resulted in the change for this PR

After implementing this change, and installing this branch into my project, the issue was resolved.

@greg0ire
Copy link
Member

I think the right way to address this would be to use the DefaultProxyClassNameResolver introduced in doctrine/orm#11009

@Ahummeling
Copy link
Author

I think the right way to address this would be to use the DefaultProxyClassNameResolver introduced in doctrine/orm#11009

I agree that this is probably a better solution.
But doctrine/orm is currently a dev dependency (require-dev) of the bundle package. Please correct me if I'm wrong, but any application installing doctrine/doctrine-bundle without doctrine/orm, won't install doctrine/orm and the same error would occur. Right?

So in addition to using the DefaultProxyClassNameResolver, we'd also have to move doctrine/orm from require-dev to require and set the version to: ^2.17|^3.0, right?

I created a new PR (considering the change is entirely different) #1747. If you agree that that approach is more suited, please feel free to close this PR and we can work on getting the new one merged, thanks.

@greg0ire
Copy link
Member

the same error would occur

Sorry, the same error as what?

@Ahummeling
Copy link
Author

the same error would occur

Sorry, the same error as what?

The "class not found" error, but as discussed in the other PR, that will not be the case, because we have already confirmed doctrine/orm is installed at this point.

@Ahummeling Ahummeling closed this Jan 25, 2024
@Ahummeling Ahummeling deleted the fix/doctrine-common-dependency branch January 25, 2024 10:10
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

Successfully merging this pull request may close these issues.

None yet

2 participants