Composer 2 requires a "only" config in composer.json, please see updated code below

Authenticating to packages.dxpr.com


  1. Ensure your composer version is 1.10 or higher
  2. In your project's composer.json file, add the DXPR composer repository:
        "repositories": [
            {
                "type": "composer",
                "url": "https://packages.dxpr.com/8",
                "only": ["dxpr/dxpr_builder", "dxpr/dxpr_builder_e"]
            },
            {
                "type": "composer",
                "url": "https://packages.drupal.org/8"
            },
            {
                "type": "composer",
                "url": "https://asset-packagist.org"
            }
    Example: Lightning DXPR composer.json 

  3. Get your composer token from the downloads page

  4. Run the following command to install the token: 
    composer config --global bearer.packages.dxpr.com <token value from #3>
  5. You can now install DXPR Builder by running the following command:
    composer require dxpr/dxpr_builder


If you upgrade from a business subscription to an enterprise subscription you need to update your token in order to access the DXPR Builder Enterprise module. You can do this by editing the file ~/.composer/auth.json.


Note: you can also install our new Drupal installation profile with Composer. Instructions here: https://github.com/dxpr/lightning_dxpr_project

Troubleshooting

Error: Invalid credentials for 'https://packages.dxpr.com/8/p2/drupal/some_project

Then you need to update your composer.json file for Composer 2 compatibility. Composer 2 requires an additional line to the config of the DXPR package repository. Replace the following:


    "repositories": [
        {
            "type": "composer",
            "url": "https://packages.dxpr.com/8"
        },

With the below config that contains an additional line:


    "repositories": [
        {
            "type": "composer",
            "url": "https://packages.dxpr.com/8",
            "only": ["dxpr/dxpr_builder", "dxpr/dxpr_builder_e"]
        },


Still experiencing authentication problems against packages.dxpr.com? Try the following:

  1. Check that ~/.composer/auth.json contains your JSON Web token. If it doesn't repeat the steps above and make sure you are logged in with the user account that is running composer commands on your server.
  2. Validate your token by entering the following URL into the browser:
    https://dxpr.com/dxpr-web-tokens/check/123

    Where you replace 123 with your token.