WordPress stuck on v4.1 when composer.lock states v4.1.1

Hi, must be doing something wrong here, but not sure what. I’m using the following command to create a new WP project using bedrock:

$ composer create-project roots/bedrock my-wp-project
Installing roots/bedrock (1.3.3)
  - Installing roots/bedrock (1.3.3)
    Loading from cache

Created project in my-wp-project
Generate salts and append to .env file? [Y,n]?
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.
  - Installing composer/installers (v1.0.12)
    Loading from cache

  - Installing johnpbloch/wordpress-core-installer (0.2.0)
    Loading from cache

  - Installing johnpbloch/wordpress (4.1.1)
    Loading from cache

  - Installing vlucas/phpdotenv (v1.0.9)
    Loading from cache

Generating autoload files

During installation, everything seems fine. The messages all reference the latest version of packages: (roots/bedrock 1.3.3, johnpbloch/wordpress 4.1.1), but after the installation, while composer.json and composer.lock both reference v4.1.1 of the johnpbloch/wordpress package, the actual version of WP installed in web/wp is v4.1 (not 4.1.1)

Running composer update doesn’t seem to do anything.

I think I found the problem in roots/bedrock/composer.lock

Seems that when bedrock was updated recently to use WP 4.1.1, the version number for the johnpbloch/wordpress package was updated, but the “reference” field was not, which still points to the hash of WP 4.1

1 Like

Oops. Again, sorry guys :frowning:

Hey, no problem! It’s all a learning curve :wink:

Here’s how I would recommend updating the Bedrock project when a new version of WP is released…

$ composer remove johnpbloch/wordpress
$ composer require johnpbloch/wordpress:X.Y.Z (where X.Y.Z is the current WP version number)

Beats modifying composer files manually.

3 Likes