Skip to main content
Separate the original answer from the official solution
Source Link
norman.lol
  • 19.1k
  • 6
  • 75
  • 129

In case anyone comes across this question in the future, the official solution is to use the lenient endpoint as described in Using Drupal's Lenient Composer Endpoint.

 

Instead of having to maintain a set of package repositories for each module that is not yet ready, my preferred solution is toAlternatively you can reach the same with Composer aliases. So you ask composerComposer to install Drupal 9 for me as if it were installing Drupal 8. This This solution is probably not compatible with installing a Drupal 9-only module, but it worked for me when I about 10 modules away from having a Drupal 9 compliant system. The trick is very simple, and the only drawback is that you'll need to keep updating the now fixed version of core.

The solution is simply to replaceReplace all:

"drupal/core-composer-scaffold": "^9.1.5", "drupal/core-recommended": "^9.1.5", 

With:

"drupal/core-composer-scaffold": "9.1.5 as 8.9.99", "drupal/core-recommended": "9.1.5 as 8.9.99", 

And the same for drupal/core-dev, if that is used in the require-dev section. This way, a Drupal 8-only module won't block your installation of Drupal 9. You'll still need to apply the D9-readiness patch, as Drupal core will complain if the core_version_requirement is not set correctly.

In case anyone comes across this question in the future, the official solution is to use the lenient endpoint as described in Using Drupal's Lenient Composer Endpoint.

Instead of having to maintain a set of package repositories for each module that is not yet ready, my preferred solution is to ask composer to install Drupal 9 for me as if it were installing Drupal 8. This solution is probably not compatible with installing a Drupal 9-only module, but it worked for me when I about 10 modules away from having a Drupal 9 compliant system. The trick is very simple, and the only drawback is that you'll need to keep updating the now fixed version of core.

The solution is simply to replace all:

"drupal/core-composer-scaffold": "^9.1.5", "drupal/core-recommended": "^9.1.5", 

With:

"drupal/core-composer-scaffold": "9.1.5 as 8.9.99", "drupal/core-recommended": "9.1.5 as 8.9.99", 

And the same for drupal/core-dev, if that is used in the require-dev section. This way, a Drupal 8-only module won't block your installation of Drupal 9. You'll still need to apply the D9-readiness patch, as Drupal core will complain if the core_version_requirement is not set correctly.

In case anyone comes across this question in the future, the official solution is to use the lenient endpoint as described in Using Drupal's Lenient Composer Endpoint.

 

Alternatively you can reach the same with Composer aliases. So you ask Composer to install Drupal 9 as if it were installing Drupal 8. This solution is probably not compatible with installing a Drupal 9-only module, but it worked for me when I about 10 modules away from having a Drupal 9 compliant system. The trick is very simple, and the only drawback is that you'll need to keep updating the now fixed version of core.

Replace all:

"drupal/core-composer-scaffold": "^9.1.5", "drupal/core-recommended": "^9.1.5", 

With:

"drupal/core-composer-scaffold": "9.1.5 as 8.9.99", "drupal/core-recommended": "9.1.5 as 8.9.99", 

And the same for drupal/core-dev, if that is used in the require-dev section. This way, a Drupal 8-only module won't block your installation of Drupal 9. You'll still need to apply the D9-readiness patch, as Drupal core will complain if the core_version_requirement is not set correctly.

merged two answers in one
Source Link
avpaderno
  • 98.1k
  • 15
  • 165
  • 284

In case anyone comes across this question in the future, the official solution is to use the lenient endpoint as described in Using Drupal's Lenient Composer Endpoint.

Instead of having to maintain a set of package repositories for each module that is not yet ready, my preferred solution is to ask composer to install Drupal 9 for me as if it were installing Drupal 8. This solution is probably not compatible with installing a Drupal 9-only module, but it worked for me when I about 10 modules away from having a Drupal 9 compliant system. The trick is very simple, and the only drawback is that you'll need to keep updating the now fixed version of core.

The solution is simply to replace all:

"drupal/core-composer-scaffold": "^9.1.5", "drupal/core-recommended": "^9.1.5", 

With:

"drupal/core-composer-scaffold": "9.1.5 as 8.9.99", "drupal/core-recommended": "9.1.5 as 8.9.99", 

And the same for drupal/core-dev, if that is used in the require-dev section. This way, a Drupal 8-only module won't block your installation of Drupal 9. You'll still need to apply the D9-readiness patch, as Drupal core will complain if the core_version_requirement is not set correctly.

Instead of having to maintain a set of package repositories for each module that is not yet ready, my preferred solution is to ask composer to install Drupal 9 for me as if it were installing Drupal 8. This solution is probably not compatible with installing a Drupal 9-only module, but it worked for me when I about 10 modules away from having a Drupal 9 compliant system. The trick is very simple, and the only drawback is that you'll need to keep updating the now fixed version of core.

The solution is simply to replace all:

"drupal/core-composer-scaffold": "^9.1.5", "drupal/core-recommended": "^9.1.5", 

With:

"drupal/core-composer-scaffold": "9.1.5 as 8.9.99", "drupal/core-recommended": "9.1.5 as 8.9.99", 

And the same for drupal/core-dev, if that is used in the require-dev section. This way, a Drupal 8-only module won't block your installation of Drupal 9. You'll still need to apply the D9-readiness patch, as Drupal core will complain if the core_version_requirement is not set correctly.

In case anyone comes across this question in the future, the official solution is to use the lenient endpoint as described in Using Drupal's Lenient Composer Endpoint.

Instead of having to maintain a set of package repositories for each module that is not yet ready, my preferred solution is to ask composer to install Drupal 9 for me as if it were installing Drupal 8. This solution is probably not compatible with installing a Drupal 9-only module, but it worked for me when I about 10 modules away from having a Drupal 9 compliant system. The trick is very simple, and the only drawback is that you'll need to keep updating the now fixed version of core.

The solution is simply to replace all:

"drupal/core-composer-scaffold": "^9.1.5", "drupal/core-recommended": "^9.1.5", 

With:

"drupal/core-composer-scaffold": "9.1.5 as 8.9.99", "drupal/core-recommended": "9.1.5 as 8.9.99", 

And the same for drupal/core-dev, if that is used in the require-dev section. This way, a Drupal 8-only module won't block your installation of Drupal 9. You'll still need to apply the D9-readiness patch, as Drupal core will complain if the core_version_requirement is not set correctly.

Source Link

Instead of having to maintain a set of package repositories for each module that is not yet ready, my preferred solution is to ask composer to install Drupal 9 for me as if it were installing Drupal 8. This solution is probably not compatible with installing a Drupal 9-only module, but it worked for me when I about 10 modules away from having a Drupal 9 compliant system. The trick is very simple, and the only drawback is that you'll need to keep updating the now fixed version of core.

The solution is simply to replace all:

"drupal/core-composer-scaffold": "^9.1.5", "drupal/core-recommended": "^9.1.5", 

With:

"drupal/core-composer-scaffold": "9.1.5 as 8.9.99", "drupal/core-recommended": "9.1.5 as 8.9.99", 

And the same for drupal/core-dev, if that is used in the require-dev section. This way, a Drupal 8-only module won't block your installation of Drupal 9. You'll still need to apply the D9-readiness patch, as Drupal core will complain if the core_version_requirement is not set correctly.