![]() Depending on your situation, I’d suggest the following addendums to this list: I recommend starting with the environment requirements in the official docs which lists Apache/Nginx, PHP, Database, and Drush. Also, it’s much easier to QA several small PRs than one enormous one. Given how many different systems you’re going to mess with it’s really easy to get stuck in various composer or git knots and end up having to redo a lot of work. It’s tempting to do all of these things in one fell swoop, but I recommend against that. The main things you’ll need to consider are local environment requirements, live environment requirements, deprecated contrib/custom code, and composer changes. Make a plan, take it slowįirst, you need to figure out what changes need to be made to the site for D9 compatibility and then build a plan around those requirements. This blog post isn’t a complete guide on how to upgrade to D9 it’s supplemental to the existing documentation found here. If you’ve found yourself in the middle of one such upgrade then you’ve come to the right place. While that usually is the case, some sites have their own set of hacks, oddities, and technical debt that make the upgrade process a lot more arduous. Otherwise you won't be able to install any Drupal updates.One of the major selling points of Drupal 9 is that the upgrade is really easy: fix your deprecated code, update your contrib modules, run some composer magic, and you’re done. ![]() If you used the less recommended method in step 3, change the entry "drupal/core" in your composer.json file.When complete, restore read-only access to the sites/default directory: chmod 755 web/sites/defaultĬhmod 644 web/sites/default/*settings.phpĬhmod 644 web/sites/default/*services.yml Run any pending database updates, required if you update module code and that module needs to update the database, either by visiting update.php in the browser, or with Drush: drush updatedb Now run composer require -update-with-dependencies with your whole list of dependencies appended to the command. add the explicit :^10 specification to Drupal core packages if Drupal 11 has already been released but you are trying to update to Drupal 10). or You can also make any other necessary version specifications at this time (e.g. If any of your dependencies are only compatible with the current release of Drupal core via an RC or alpha version, add the RC or alpha version specification to your list (e.g. Run composer show -no-dev -direct -name-only | xargs to print out a list of your dependencies. If you continue to receive a "Your requirements could not be resolved to an installable set of packages" error, you may need to update other dependencies of your project in order to update Drupal core. This can lead to problems with modules that are *explicitly* Drupal 10 only, as they will not work in this scenario, but it might get you past where you need to be. Make sure you replace the version numbers with the versions you are using in your installation. Īnother, less recommended way to get around this, is you can add an alias to drupal/core, such as: composer require "drupal/core:10.0.0 as 9.5.0" -no-update & composer update Refer to this documentation for more details on how to handle this situation. You can use that patch to 'upgrade' the project. To fix this, look in the issue queue for the project for a patch. Note: If any of your packages are not compatible, you may get a dependency error. Now, actually perform the update to the code itself: composer update ![]() If you have Drush installed (check recommended version): composer require 'drush/drush:^11' -no-update If you have drupal/core-dev installed: composer require 'drupal/core-dev:^10' -dev -update-with-dependencies -no-update ![]() We use -no-update to avoid a chicken-and-egg problem with mutual dependencies:Ĭomposer require 'drupal/core-recommended:^10' 'drupal/core-composer-scaffold:^10' 'drupal/core-project-message:^10' -update-with-dependencies -no-update Get both the core-recommended and dev-dependencies packages as dependencies.Temporarily add write access to protected files and directories:Ĭhmod 666 web/sites/default/*settings.phpĬhmod 666 web/sites/default/*services.yml.You must change the version numbers according to your needs. The examples show the instructions for updating from Drupal 9.5.0 to Drupal 10.0.0. Perform the following steps from your Drupal site's root (where composer.json lives).
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |