-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Can not require package, even with update-with-all-dependencies #7261
Comments
I can't say that I see what causes the issue, seems to be some weird edge case in the solver when doing a partial update.. |
isn't that
...of the package I am requiring and the ones listed in my projects
An issue from the UX point of view is that there are cases where you can not |
No it means what I said, only all dependencies of the package you are requiring, including those that you may have required in root that the pcakage also requires. I understand that it's a little confusing, but I am not sure that yet another flag would reduce confusion.. |
I meant that 😉 it's a little confusing 😄
To my understanding it's like so:
I don't think that's a very uncommon edge case, but advising to use
would be OK to me (that's what I've expected from "all"). Feel free to close it or mark as docs. CC: @cebe |
Well the odd thing is the |
Fixed by #7832 |
Would appreciate if you can confirm the fix works with latest snapshot build btw :) |
Does not work for me :(
|
Soo.. cebe/markdown is required by your root package as I can try to repro locally tomorrow see if I can fix it. Any repro details you have would be useful. |
I just created a |
Huh.. But if you have nothing installed yet and no lock file I don't quite see where it got that |
Sorry, my fault. I first ran an You should be able to reproduce with this:
|
ok @schmunk42 I could repro and it seems the issue is that the --update-with[-all]-dependencies only works for packages that are already installed. Otherwise we don't have their dependencies yet.. So really it makes sense for update but for require it's not so usable. This fixes it after a require --no-update:
As these two packages need to be downgraded to fit the yii2-apidoc deps:
This might be fixable in 2.0 after refactorings in the Installer class, but I am not sure to be honest, because for a package that is not installed yet, which versions would we take its dependencies from? It's not that simple. Leaving open for now. |
Actually.. duplicate of #5438 (just saw now you referenced that issue) so closing. #5438 (comment) explains why this is complex. |
My
composer.json
:Output of
composer diagnose
:When I run this command:
I get the following output:
And I expected this to happen:
An update with all dependencies
Workaround:
Related issues:
Background:
When running a full update the package
cebe/markdown
is updated:But it's a dependency of
So it's a dependency of a root dependency, maybe that's the reason why it is not touched.
According to help:
That should actually be
--update-with-root-dependencies
(?) or is there also an option to allow a full update?The text was updated successfully, but these errors were encountered: