packages.crudadmin.com.
Existing CrudAdmin 5 projects keep working until composer has to download the packages again, for example on a new server, in CI, or after the composer cache is cleared. Then the installation fails, because the old download links point to GitHub. Follow the steps below once in every CrudAdmin 5 project.
CrudAdmin 5 stays under the MIT license. Nothing changes in the code of your project, and the
license_key in config/admin.php stays the same. Only the place composer downloads the packages from changes.What changes
1. Add the repository
Addpackages.crudadmin.com to composer.json of the project:
composer.json
require, for example "crudadmin/crudadmin": "^5.0".
2. Store the credentials
CrudAdmin 5 projects use a shared CrudAdmin 5 access. It is public, and it can download only CrudAdmin 5 versions.auth.json
The same credentials can be stored with composer. Use
--global for all projects on the computer:
3. Update composer.lock
composer.lock still contains the old GitHub download links. Update the CrudAdmin packages once, so the lock file points to packages.crudadmin.com:
composer.lock.
4. Update your servers
Every server and CI job which runscomposer install needs the credentials from step 2, usually as COMPOSER_AUTH in the environment of the deployment user. Deploy the updated composer.lock after that.
Troubleshooting
The 'packages.crudadmin.com/packages.json' URL required authentication (HTTP 401)
The 'packages.crudadmin.com/packages.json' URL required authentication (HTTP 401)
Composer did not find the credentials, or they are not valid. Check that the key in
auth.json is exactly packages.crudadmin.com, without https://, and that COMPOSER_AUTH is set in the environment which runs composer.Could not find a version of package crudadmin/crudadmin
Could not find a version of package crudadmin/crudadmin
The credentials do not include the requested major version. The shared CrudAdmin 5 access downloads only CrudAdmin 5, check the constraint in
composer.json.The download from api.github.com fails with 404
The download from api.github.com fails with 404
composer.lock still points to GitHub. Run the update from step 3 and deploy the new lock file.The installation works on one computer but fails on another
The installation works on one computer but fails on another
A computer with access to the CrudAdmin GitHub organization can still clone the packages directly from GitHub, and composer silently falls back to it. Other computers can not. Complete all steps, so every environment downloads from
packages.crudadmin.com.