New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to switch from this composer template to the drupal/recommended-project template? #535
Comments
Thank you, @geerlingguy ! I would also like to know. |
+1 |
Maybe I can share a diff where I did this:
Note that the above diff has been edited to remove non-related lines. In addition to this, I deleted the scripts/composer/ScriptHandler.php file. |
is this the new "drupal" core way to do things? |
@worthwhileindustries According to this Drupal documentation it is: https://www.drupal.org/docs/8/update/update-core-via-composer#s-special-considerations-for-upgrading-to-drupal-880-and-later |
@worthwhileindustries i would think of it as "an emerging, minimalist, canonical example" and you'd stick with drupal-composer/drupal-project for a practical real-world example, at least for now. |
https://www.drupal.org/docs/8/update/update-core-via-composer#s-special-considerations-for-upgrading-to-drupal-880-and-later provides a working, excellent recipe to move away from webflo/drupal-core-strict and start with the new drupal/core-recommended. We need to provide an equally clear step-by-step documentation about how to migrate from drupal-composer/drupal-project to drupal/core-recommended. |
Can someone post step by step instructions? I don't know enough about the inner working of drupal-composer/drupal-project and composer to be confident. |
I did that. Do not follow blindly, you may want to keep some stuff. Migrate from .envUpdate web/sites/default/settings.php if you migrate from .env cleanup
Update your .gitignoreCompare your .gitignores with the default one from drupal Fix composer packages
Replace extra section in composer.json
Install drupal/core-recommended
|
Hi, @gagarine. You suggested a "rm -r scripts", though I got what mentioned below. [RuntimeException] So I supposed the directory should be left where it is, shouldn't it? Besides, I really hope, once the recommended project is in place, migrating to drupal 9 will be easy........ Thanks for you contribution and thanks in advance for what you may answer. Andrea |
@AppLEaDaY in your composer.json you may have something like:
Try to delete this autoload section. I would also delete the scripts part if you have one
|
@gagarine, thanks. I did try, with no luck, unfortunately. I report below the last command you suggested.
It seems this command is dependent on the cli php version, anyway I get, alternatively
What did I do wrong? I'm confused. And besides I was wondering what .gitignore you were referring to. Anyway I came across a guide that looks encouraging. https://drupalize.me/tutorial/update-drupal-versions-prior-88x-using-composer What about that? Thanks in advance! Andrea P.S. For the sake of completeness, I have to say the drupal-composer/drupal-project where I started didn't look in good order, since I was facing some dependency problem (I can't recall how many) even if tried to remove a module with composer. How much does this matter? |
This pull request/issue has been inactive for over a year and is being closed due to inactivity. If the issue still persists or the contribution is still relevant, please feel free to reopen it or create a new one. Thank you for your understanding and your contributions to the project! |
If I have a site with a codebase that was originally built with this Composer project template, I would like to know what steps are required to convert the codebase into one that is like
drupal/recommended-project
would produce.As an example, I noticed that this project includes
drush/drush
(and a number of other dependencies the core template does not). It also has aScriptHandler.php
class that is required to be present for CLI stuff to work, which is referenced in the projectcomposer.json
(core does not have this, at least not in any non-vendored location).Is there any easy way to switch a project built with this to the 'recommended-project' template? Or is it manual picking-apart to try to get the composer.json changes matched up?
The text was updated successfully, but these errors were encountered: