Comments (2)
@selul I've been looking into this too and it looks like using canonical: false
should fix the problem, but it doesn't.
After editing ~/.wp-cli/packages/composer.json
to mark the wp-cli composer repository as canonical: false
, if I run wp package list
, the resulting output correctly reports that an update is now available where it wasn't before.
However, running wp package update
still results in no change to the installed packages, and there does not seem to be a way to force this. Even removing the package and reinstalling it still installs the stale version of the package, even using Composer directly.
I found that adding packagist
to the list of repositories before wp-cli
fixed the problem for me (as my packages are all listed on Packagist (as is pressbooks/pb-cli
).
{
"name": "wp-cli/wp-cli",
"description": "Installed community packages used by WP-CLI",
"version": "2.5.0",
"authors": [
{
"name": "WP-CLI",
"email": "[email protected]"
}
],
"homepage": "https://wp-cli.org/package-index/",
"require": {
"aaemnnosttv/wp-cli-dotenv-command": "dev-master"
},
"require-dev": {},
"minimum-stability": "dev",
"prefer-stable": true,
"license": "MIT",
"repositories": {
+ "packagist": {
+ "type": "composer",
+ "url": "https://repo.packagist.org/"
+ },
"wp-cli": {
"type": "composer",
"url": "https://wp-cli.org/package-index/"
}
},
"config": {
"secure-http": true
}
}
If we had wp-cli
as a non-canonical Composer repository, I would expect this to have the same behavior (a newer version of the package existing in another repository), but it seems that this specifically may be an upstream bug.
It's probably a good idea to update the definition of the wp-cli
repository to use canonical: false
anyways since it's almost guaranteed to be out-of-date, so this would be the more accurate definition of the repository IMO. Assuming there is an upstream bug, the above packagist repo order workaround should no longer be necessary.
from package-command.
Might be solved if we set the WP-CLI Package Index as non-canonical, i.e canonical: false
, more details about this here
I can help to send a PR if this is a good idea.
from package-command.
Related Issues (20)
- installing package on Intranet HOT 3
- Unable to install packages on Windows and PHP7.3.1 HOT 13
- Adopt and enforce new `WP_CLI_CS` standard HOT 2
- Allow install from a Git repository specific branch HOT 1
- check_git_package_name hardcode reference to GitHub HOT 2
- Commands Cookbook link goes to a 404 HOT 1
- Lock framework to stable version again before release
- Compatibility with Composer 2 HOT 7
- Allow composer ^2.0 HOT 6
- SSL certificate problem: certificate has expired HOT 9
- Declaration of WP_CLI\ComposerIO::isVerbose() and others not compatible with Composer\IO\NullIO::isVerbose(): bool HOT 2
- Restore 'Install a package with a dependency' test
- Support for Composer 2.5 HOT 8
- Errors installing command into development environment HOT 3
- Add command to get information about single package HOT 4
- Move command over to new v2 structure
- Prefer packagist.org over Github
- Automatically rerun failed scenarios
- Broke composer commands when used with phpcodesniffer-composer-installer HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from package-command.