contentacms / contenta_jsonapi

Contenta CMS, the decoupled Drupal
http://www.contentacms.org/
GNU General Public License v2.0
328 stars 104 forks source link

Drupal 10 support #421

Closed lawxen closed 4 months ago

fadonascimento commented 11 months ago

In order to update contenta_jsonapi you need to run the commands below, since @e0ipso approved the PR related to Drupal 10 support.

composer require drupal/core-dev:^10.1 --dev --no-update --update-with-dependencies composer require drupal/core-recommended:^10.1 drupal/core-composer-scaffold:^10.1 drupal/core-project-message:^10.1 --no-update --update-with-all-dependencies composer update

Thanks a lot @e0ipso for quickly reviews, approvals and all effort to keep the profile up to date, I appreciate it.

rvovard commented 6 months ago

Hi there and thanks @fadonascimento for the PRs and the commands.

However, I don't get how it's supposed to work: contenta_jsonapi requires drupal/contentajs, which has not been set to support Drupal 10, and so requires... drupal/core ^8 || ^9. So I'm stuck because composer update won't work.

Am I missing something obvious? Thanks in advance if someone can help me with this issue :)

fadonascimento commented 6 months ago

Hi there and thanks @fadonascimento for the PRs and the commands.

However, I don't get how it's supposed to work: contenta_jsonapi requires drupal/contentajs, which has not been set to support Drupal 10, and so requires... drupal/core ^8 || ^9. So I'm stuck because composer update won't work.

Am I missing something obvious? Thanks in advance if someone can help me with this issue :)

Hi @rvovard I think you can use the package https://github.com/mglaman/composer-drupal-lenient to help you to upgrade your system After you install this package, you should run the below command to configure the contenta packages: composer config --merge --json extra.drupal-lenient.allowed-list '["contentacms/contenta_jsonapi", "drupal/contentajs"]'

And you can add in the composer.json of your project the patch for contentajs:

"patches": { "drupal/contentajs": { "Automated Drupal 10 compatibility fixes - https://www.drupal.org/project/contentajs/issues/3286752": "https://www.drupal.org/files/issues/2022-06-15/contentajs.2.x-dev.rector.patch" }, },

rvovard commented 6 months ago

Hi @rvovard I think you can use the package https://github.com/mglaman/composer-drupal-lenient to help you to upgrade your system After you install this package, you should run the below command to configure the contenta packages: composer config --merge --json extra.drupal-lenient.allowed-list '["contentacms/contenta_jsonapi", "drupal/contentajs"]'

This package is indeed very useful to manage Drupal upgrades, I used it with other plugins too in order to complete my migration to Drupal 10. But it worked! Thanks a lot @fadonascimento for the quick and useful reply 🤩 🙇

Hope it will help others going through the same process.