Confusion about wordpress installer packages

I currently have the roots/wordpress package as a direct dependency in my bedrock composer file. I also have roots/wordpress-core-installer referenced in the allow-plugins section of my config.

When I run composer outdated I see that there is a newer version of roots/wordpress-core-installer. It appears I’m using version 1.100.0, and there is a version 2 available.

But when I try to run composer require roots/wordpress-core-installer:^2 I get:

Problem 1
    - Root composer.json requires roots/wordpress-core-installer ^2, found roots/wordpress-core-installer[2.0.0] but these were not loaded, likely because it conflicts with another require.
  Problem 2
    - roots/wordpress is locked to version 6.8 and an update of this package was not requested.
    - roots/wordpress 6.8 requires roots/wordpress-core-installer ^1.0.0 -> found roots/wordpress-core-installer[1.0.0, 1.1.0, 1.100.0] but it conflicts with your root composer.json require (^2).

Below is my composer.json file:

{
  "name": "roots/bedrock",
  "type": "project",
  "license": "MIT",
  "description": "WordPress boilerplate with modern development tools, easier configuration, and an improved folder structure",
  "homepage": "http://roots.io/bedrock/",
  "authors": [
    {
      "name": "Scott Walkinshaw",
      "email": "scott.walkinshaw@gmail.com",
      "homepage": "http://github.com/swalkinshaw"
    },
    {
      "name": "Ben Word",
      "email": "ben@benword.com",
      "homepage": "http://github.com/retlehs"
    }
  ],
  "keywords": [
    "bedrock",
    "composer",
    "roots",
    "wordpress",
    "wp",
    "wp-config"
  ],
  "support": {
    "issues": "http://github.com/roots/bedrock/issues",
    "forum": "http://discourse.roots.io/category/bedrock"
  },
  "repositories": {
    "my-yoast": {
      "type": "composer",
      "url": "http://my.yoast.com/packages/"
    },
    "0": {
      "type": "composer",
      "url": "http://wpackagist.org",
      "only": [
        "wpackagist-plugin/*",
        "wpackagist-theme/*"
      ]
    }
  },
  "require": {
    "php": "^8.2",
    "composer/installers": "^2.2",
    "vlucas/phpdotenv": "^5.6",
    "oscarotero/env": "^2.1",
    "roots/bedrock-autoloader": "^1.0",
    "roots/bedrock-disallow-indexing": "^2.0",
    "roots/wordpress": "^6.4",
    "roots/wp-config": "^1.0.0",
    "wpackagist-plugin/enable-media-replace": "^4",
    "wpackagist-plugin/post-types-order": "^2",
    "wpackagist-plugin/user-role-editor": "^4.59.1",
    "wpackagist-plugin/gutenberg": "^20",
    "wpackagist-plugin/pretty-link": "^3",
    "wpackagist-plugin/akismet": "^5",
    "wikimedia/composer-merge-plugin": "^2.0",
    "wpackagist-plugin/w3-total-cache": "^2.8.4",
    "wpackagist-plugin/wp-ses": "^1.6.6",
    "wpackagist-plugin/wordpress-seo": "^24",
    "guzzlehttp/guzzle": "^7.9",
    "guzzlehttp/psr7": "^2.7"
  },
  "require-dev": {
    "roave/security-advisories": "dev-master",
    "squizlabs/php_codesniffer": "^3.11.3"
  },
  "config": {
    "optimize-autoloader": true,
    "preferred-install": "dist",
    "allow-plugins": {
      "nodejs-php-fallback/nodejs-php-fallback": true,
      "roots/wordpress-core-installer": true,
      "wikimedia/composer-merge-plugin": true,
      "composer/installers": true
    }
  },
  "minimum-stability": "dev",
  "prefer-stable": true,
  "extra": {
    "installer-paths": {
      "web/app/mu-plugins/{$name}/": [
        "type:wordpress-muplugin",
        "wpackagist-plugin/gutenberg"
      ],
      "web/app/plugins/{$name}/": [
        "type:wordpress-plugin"
      ],
      "web/app/themes/{$name}/": [
        "type:wordpress-theme"
      ]
    },
    "wordpress-install-dir": "web/wp"
  },
  "scripts": {
    "clear-views": "wp --allow-root acorn view:clear"
  }
}

We will get this updated in roots/wordpress in the near future but there hasn’t been any real changes outside of adjustments to the README.

If I’m not mistaken, 1.100.0 should’ve been 2.0.0 back in the day and for some reason it became 1.100.0 instead. The eventual bump to 2.0.0 will probably just be to right this wrong.

See Do not mislead users with 2.0 in README by szepeviktor · Pull Request #5 · roots/wordpress-core-installer · GitHub

1 Like