Active
Project:
Composer
Version:
8.x-1.4
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
11 May 2018 at 23:07 UTC
Updated:
26 May 2020 at 16:02 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
tjtj commentedI have this issue also. Composer works properly at home, but not on my hosting service. Same composer.json. php 7.2.5 at home, 7.3.17 on host.
I run 5 other sites and do not have this issue. I never see these repo lines elsewhere and do not know where they come from.
But none of the modules in web/modules/contrib are updated. The update page says the same modules need updating. No error message, even in watchdog.
If I try to update the modules in the GUI, they are downloaded, but at the next step, it says I am not authorized. I am admin, and get the same result from a different admin account. Composer.json is attached.
Module updates are coming out every few days, and it is infeasible to keep rebuilding my online site from one at home.
Comment #3
tjtj commentedWe need a fix for this please...
Comment #4
mmjvb commented`composer outdated` reports newer releases of packages regardless your specifications regarding version constraints.
`composer update` will update packages respecting the specification regarding version constraints.
My experience is that when it says "0 installs, 12 updates, 0 removals", it really updates 12 packages. Maybe run `composer update` again till it tells you there is nothing to update.
You might want to try the verbose options to see more details of what gets done. Or try --dry-run first to see which packages get replaced. Although it is possible to use `composer outdated` to verify `composer update`, it is hard to notice that you are missing 12 out of 50 that have updates. Even having updated within your constraints it could still be reported with outdated due to releases outside your constraints.
Consider your workflow a bad procedure, suggest to change it to:
- use outdated -Dm to restrict the available updates to within the same major version for the requirements mentioned in your root composer.json
- use prohibits [package] [version] to find out whether something is blocking that particular update
- use require [package:version constraint] --no-update to adjust blocking specifications
- file issues with projects with blocking dependencies
- once done with outdated -Dm, start with outdated -m
This is what dependency management is about, composer can help you with it, but you need to it. Remember that you are responsible for maintaining the specifications of your project (site).
You might want to reconsider minimum-stability and prefer-stable. A common mistake in the Drupal community is to set them to dev, true. Suggest to remove them to stick with the default of stable unless root requirement says otherwise. Do check with `composer show` and see which packages use other than stable releases. Make sure each of those are mentioned in the root of your project with appropriate constraint (@stability).
Personally, prefer a conservative approach only allowing patch releases. That requires constraints like ~#.#.# instead of ^*
This makes minor releases a conscience decision (require ... --no-update)
Comment #5
tjtj commentedThank you for responding to this. The thing is, I do not have this issue on my home server using the same contents of public_html, and same database (with required hosting changes). I get this behavior for any module I try to update.
And also on this site (on my hoster), I cannot update the database from the GUI. I always get a "you do not have permission..." message, and I have tried this from two admin accounts. I somehow think this is related.
Comment #6
mmjvb commentedSorry, my response was actually for OP.
Looks like things changed with `composer outdated` with respect to ignoring version constraints. Will have to look into it more to assess the impact on procedure desribed above.
Comment #7
tjtj commentedNothing got updated alas.
Comment #8
Webbeh