Skip to content
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

Update drupal-composer #185

Closed
MPParsley opened this issue Aug 4, 2016 · 10 comments
Closed

Update drupal-composer #185

MPParsley opened this issue Aug 4, 2016 · 10 comments

Comments

@MPParsley
Copy link
Contributor

What is the best way to keep drupal-composer up to date?

@PatrickBauer
Copy link

Any news here?

@webflo
Copy link
Member

webflo commented Nov 5, 2016

I think doing a manual diff it still the best approach. Maybe we should file which contains the git revision from the initial install?

@bohart
Copy link

bohart commented Mar 25, 2017

We can add drupal-composer project as additional origin to GIT and cherry-pick one commit or range of commits to your current project.

git remote add drupal-composer https://github.com/drupal-composer/drupal-project.git
git cherry-pick hash_from^..latest_hash

There is a chance to have big troubles with merging some files (like .gitignore or composer.json). So, doing a manual diff it still the best approach in most cases.


The one quick thing that would be great to implement is to have versioning history of drupal-composer. So we will be able easily to detect version of drupal-composer we're using locally. And how long it is outdated from this repo.

@MXTcomunica
Copy link

MXTcomunica commented Jan 31, 2019

I have a "one year" old project (still in dev) based on drupal-composer and recently I've re-started to work on it.

I did a core upgrade from:
"drupal/core": "~8.4"
to
"drupal/core": "^8.6.0"

using:

composer update drupal/core webflo/drupal-core-require-dev symfony/* --with-dependencies

as advised in this project front page, and everything seems to have gone well despite the lack of 'webflo/drupal-core-require-dev' as dependency: no errors, the site is working.

obviously my composer.json is very dated, for example, as I wrote above, I still have this:

"require-dev": {
        "behat/mink": "~1.7",
        "behat/mink-goutte-driver": "~1.2",
        "drupal/devel": "^1.0",
        "jcalderonzumba/gastonjs": "~1.0.2",
        "jcalderonzumba/mink-phantomjs-driver": "~0.3.1",
        "mikey179/vfsstream": "~1.2",
        "phpunit/phpunit": ">=4.8.28 <5",
        "symfony/css-selector": "~2.8|~3.0"
    },

instead of recent:

"require-dev": {
    "webflo/drupal-core-require-dev": "^8.6.0"
  },

The question is: should I update the composer.json to the most recent one?

In this case: is the only action I have to do is to upgrade my old composer.json with a DIFF with the most recent one? Is this enough? Nothing else? (e.g. other drupal-composer folders/files, I don't know...)

Thank you for any clarification/help

@leymannx
Copy link
Collaborator

Refs #425

@allella
Copy link

allella commented Nov 20, 2019

Also, I'm looking to upgrade a couple year old project and it would be nice if the README at least mentioned that any updates to drupal-composer/drupal-project itself need to be done manually.

I'm about to start copying and pasting new bits from the new composer.json into the old and seeing what breaks, or not.

If there's a better way then please holler.

@allella
Copy link

allella commented Nov 20, 2019

I'm not sure how you automate it, but I upgraded to the latest version of this repo.

I copied any custom installed packages from our older, existing composer.json "require" and "require-dev" sections and appended them to the new composer.json from the latest repo. That combined file was the core of the upgrading.

Then, I manually copied new files and directories (/drush, /script) from a clone of the latest drupal-composer/drupal-project/ into the existing composer project I was upgrading.

It worked pretty seamlessly after the manual work, plus a composer install, drush updb, and drush cache-rebuild.

@simesy
Copy link

simesy commented Nov 20, 2019

I would do it manually. You don't need to do it regularly in my opinion but credit to anyone that is. I might revisit the scaffold every year. I take the latest composer.json (and anything else important like scripts) from composer-project, and then retrofit any customisations from my project into it the clean version.

@AlexSkrypnyk
Copy link
Collaborator

This project is a boilerplate, meaning that, once it is used for a project creation using composer create-project, any follow-up updates need to be handled manually.

@AlexSkrypnyk
Copy link
Collaborator

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants