roots / wordpress

Automatically updated WordPress Composer package
https://roots.io/composer-wordpress-resources/
MIT License
167 stars 17 forks source link

Bug: Latest version not available #45

Closed EHLOVader closed 1 year ago

EHLOVader commented 1 year ago

Terms

Description

What's wrong?

What have you tried?

Looks like the GH actions have errored and this is now stuck on 6.0.2

What insights have you gained?

I've double checked and the wordpress-no-content does have the 6.0.3 release, this just needs to be updated and synced.

Temporary workarounds

I have decided to switch to wordpress-no-content. Maybe the announcement should be updated to indicate the latest about the two supporting wordpress repos. I also didn't know I had to include the core installer, I thought it was included like it is in this one, however it required both. Here is what I ran to switch.

composer remove roots/wordpress && composer require roots/wordpress-core-installer roots/wordpress-no-content

Steps To Reproduce

  1. composer require roots/wordpress
  2. No new updates

Expected Behavior

It should install 6.0.3 and update the lock file while tracking ^6.0

Actual Behavior

It doesn't install anything and believes it is up to date

Relevant Log Output

No response

Versions

^6.0

swalkinshaw commented 1 year ago

It's not an issue with the actions on this repo, but at https://github.com/roots/wordpress-packager/actions/workflows/meta-package.yml

I just ran it manually and it didn't find any tags πŸ€” https://github.com/roots/wordpress-packager/actions/runs/3307955609

cc @LeoColomb

LeoColomb commented 1 year ago

Not sure to understand where the issue is:

So… what's wrong @EHLOVader?

LeoColomb commented 1 year ago

I'm closing the ticket as everything looks fine regarding composer usage. You can check the version installed with the following commands:

composer show roots/wordpress-no-content
composer show roots/wordpress
EHLOVader commented 1 year ago

I'm not sure what the issue was but it isn't installing.

I jumped to the conclusion that it was the action because of the latest failed actions, here https://github.com/roots/wordpress/actions image

That is odd that the package and tag exist at 6.0.3, curious why the date is stuck at 6/1 too.

When I run show I get this

 ο€— 05:58:08 PM ❯ composer show roots/wordpress
name     : roots/wordpress
descrip. : WordPress is open source software you can use to create a beautiful website, blog, or app.
keywords : blog, cms, wordpress
versions : * 6.0.2
type     : metapackage
license  : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
license  : GNU General Public License v2.0 or later (GPL-2.0-or-later) (OSI approved) https://spdx.org/licenses/GPL-2.0-or-later.html#licenseText
homepage : https://wordpress.org/
source   : [git] https://github.com/roots/wordpress.git 41ff6e23ccbc3a1691406d69fe8c211a225514e2
dist     : [zip] https://api.github.com/repos/roots/wordpress/zipball/41ff6e23ccbc3a1691406d69fe8c211a225514e2 41ff6e23ccbc3a1691406d69fe8c211a225514e2
path     : /Users/jrichardson/src/zing/sites/content-zingermans
names    : roots/wordpress

support
issues : https://github.com/roots/wordpress/issues
source : https://github.com/roots/wordpress/tree/6.0.2

When I run composer require roots/wordpress I get this

 ο€— 05:58:59 PM ❯ composer require roots/wordpress
Info from https://repo.packagist.org: #StandWithUkraine
Using version ^6.0 for roots/wordpress
./composer.json has been updated
Running composer update roots/wordpress
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Writing lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Generating optimized autoload files
8 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found

I can explicitly install 6.0.3 but that is a bit more complex, I must run it --with-all-dependencies otherwise I get this

 ο€— 06:04:15 PM ❯ composer require roots/wordpress:6.0.3
./composer.json has been updated
Running composer update roots/wordpress
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires roots/wordpress 6.0.3 -> satisfiable by roots/wordpress[6.0.3].
    - roots/wordpress 6.0.3 requires roots/wordpress-no-content 6.0.3 -> found roots/wordpress-no-content[6.0.3] but the package is fixed to 6.0.2 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

Not sure if I am the only one, but my typical way of upgrading through composer was failing and I thought I'd open an issue to get it resolved, or suggest updates to documentation for the two other wordpress repos. Hopefully this additional information is useful.

LeoColomb commented 1 year ago

I believe this is how Composer is designed.

Output of initial requirement:

$ composer require roots/wordpress
Info from https://repo.packagist.org: #StandWithUkraine
Using version ^6.0 for roots/wordpress
./composer.json has been created
Running composer update roots/wordpress
Loading composer repositories with package information
Updating dependencies
Lock file operations: 3 installs, 0 updates, 0 removals
  - Locking roots/wordpress (6.0.3)
  - Locking roots/wordpress-core-installer (1.100.0)
  - Locking roots/wordpress-no-content (6.0.3)
...

Output after an update on a 6.0.2 base:

$ composer update
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 2 updates, 0 removals
  - Upgrading roots/wordpress (6.0.2 => 6.0.3)
  - Upgrading roots/wordpress-no-content (6.0.2 => 6.0.3)
...

@swalkinshaw Is it possible to disable the Actions on all wordpress* repos? (except for wordpress-packager, of course) It seems to be fairly confusing.

swalkinshaw commented 1 year ago

@LeoColomb done! Disabled

EHLOVader commented 1 year ago

I believe this is how Composer is designed.

This hasn't been my experience with composer until this happened with this package.

Composer install is what respects the lock file afaik

Composer Update will only update as far as the matching version in the composer.json (so minor and patches in this case but wouldn't work on major version) but composer require has always worked effectively for pulling the absolute latest version, even past the semver selector in the json up past major version changes.

Even in my repos that I've been installing against the ^6.0 a composer update roots/wordpress doesn't find anything new.

 ο€— 06:45:37 PM ❯ composer update roots/wordpress
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Generating optimized autoload files
8 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found

Really strange, I guess it is worth keeping this closed even though it seems to be more of a CNR. I'm not sure if I will be able to test later as I am going to have to move all of these over to the wordpress-no-content later, but in the next version release I might try and make sure all is good.

LeoColomb commented 1 year ago

a composer update roots/wordpress

... will not work. This is painful when using Composer, I know, but when there are children dependencies (often the case) the argument --with-dependencies (-w) is mandatory like 75% of the time.

but in the next version release I might try and make sure all is good

Sure, don't hesitate! 😊

EHLOVader commented 1 year ago

... will not work. This is painful when using Composer, I know, but when there are children dependencies (often the case) the argument --with-dependencies (-w) is mandatory like 75% of the time.

Yeah, but in that case it warns you. Like it did to me when I tried to install the 6.0.3 explicitly.

It did not do that, it said it's fine and it is already up to date. Nothing more to install.