By jhmnieuwenhuis on
Hi,
Tried to uprade to 8.5.1 from 8.5.0 using composer :
composer update drupal/core --with-dependencies
this does not upgrade drupal core.
There seems to be a dependency with webflo/drupal-core-require-dev
as you can see when using : composer prohibits drupal/core:8.5.1
so i used : composer update drupal/core webflo/drupal-core-require-dev --with-dependencies
That worked
Comments
I can confirm that this is
I can confirm that this is happening on my Drupal website as well. The command
composer update drupal/core webflo/drupal-core-require-dev --with-dependenciesthat you suggested has solved the issue for me too. This solution is also described on the update instructions page under 'known issues'.
This is my first time to
This is my first time to update my Drupal site with composer. I switched to the maintenance mode and tried the 2 options of the commands above, but still the ver remains 8.5.0 without updating to 8.5.1. Here output:
composer update drupal/core webflo/drupal-core-require-dev --with-dependencies
Package "drupal/core" listed for update is not installed. Ignoring.
Package "webflo/drupal-core-require-dev" listed for update is not installed. Ignoring.
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 33 installs, 0 updates, 0 removals
[RuntimeException]
/usr/share/nginx/html/vendor/symfony/css-selector does not exist and could not be created.
update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [--with-dependencies] [--with-all-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages>]...
Then tried to run following command with sudo and saw this message: "Do not run Composer as root/super user!" - I continued to run it anyway - hope there is no damage - and get this output - there a list of installing packages but here I put only one:
sudo composer update drupal/core --with-dependencies
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Package "drupal/core" listed for update is not installed. Ignoring.
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 33 installs, 0 updates, 0 removals
- Installing symfony/css-selector (v3.4.4): Downloading (100%)
> Drupal\Core\Composer\Composer::vendorTestCodeCleanup.....
Then I had run the second command with sudo:
sudo composer update drupal/core webflo/drupal-core-require-dev --with-dependencies
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Package "drupal/core" listed for update is not installed. Ignoring.
Package "webflo/drupal-core-require-dev" listed for update is not installed. Ignoring.
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
> Drupal\Core\Composer\Composer::preAutoloadDump
> Drupal\Core\Composer\Composer::ensureHtaccess
Finally I had run the command without sudo and get ErrorException:
composer update drupal/core webflo/drupal-core-require-dev --with-dependencies
Package "drupal/core" listed for update is not installed. Ignoring.
Package "webflo/drupal-core-require-dev" listed for update is not installed. Ignoring.
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
[ErrorException]
file_put_contents(/usr/share/nginx/html/vendor/composer/installed.json): failed to open stream: Permission denied
update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [--with-dependencies] [--with-all-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages>]...
I also checked with this command:
composer prohibits drupal/core:8.5.1
There is no installed package depending on "drupal/core" in versions not matching 8.5.1
Please advise how to update to 8.5.1?
question
Is this site installed using composer ?
If not, then it is not advisable/possible to upgrade is using composer.
Regards,
Hans
Oh, I did not notice any
Oh, I did not notice any remark in Drupla's Doc regarding avoiding updating with composer, in case site was not installed with composer...
Anyway, Drupal was installed manually - Can update with drush? I tried to run this command from Drupla's Docs but get problematic output:
drush up drupal
Command "up" is ambiguous.
Did you mean one of these?
ups The pm-updatestatus command was deprecated. Please see `composer show` and `composer outdated`. For secu...
upc The pm-updatecode command was deprecated. Please see `composer outdated` and `composer update`. For secu...
updatedb Apply any database updates required (as with running update.php).
updatedb:status List any pending database updates.
updatedb:batch-process Process operations in the specified batch set.
upwd Set the password for the user account with the specified name.
Please advise what is the right command to update with drush? If can not update with drush, please advise how to update from 8.5.0 to 8.5.1?
Thanks
First of all be sure to have
First of all be sure to have a complete backup of your site before trying the upgrade
Look at ways to upgrade : https://www.drupal.org/docs/8/update/options
There is : manual, drush, composer.
But drush version 9 nog longer supports upgrading core
There is also an article on drupal doc to get an existing site into composer.
take a look at :
https://www.drupal.org/docs/develop/using-composer/using-composer-to-manage-drupal-site-dependencies#managing-existing-site
maybe take a look at the plugin : Composerize Drupal
( https://github.com/grasmash/composerize-drupal )
Be carefull !!! stil in development
Regards,
Hans
OK - After considering your
OK - After considering your links, and due to the fact I am quite newbie's Drupal, I would prefer to not trying some complex & risks process. Since my site is very new and just upgraded from 8.45. to 8.5 last week, I would prefer to re-install Drupal but this time with composer. In this way I will be able to update Drupal by composer more easily. I have a backup, composer and drush already installed, so please inform what do you think about my decision, and if to choose the A option from this tutorial is ok? My system is raspberry PI3 with Raspbian (Debian linux) and nginx:
https://www.drupal.org/docs/develop/using-composer/using-composer-to-man...
Thanks
Best Way to go
I think thats the best way to go if you can affort it.
You will then start with a solid base.
Success and regards,
Hans
As a Linux's user I use to
As a Linux's user I use to update, change config. etc, by command line, so I would prefer to do it by composer, in regards of Drupal, as well. Hope Drupal's docs are ok and if you have any other good tutorial, please note link. But one thing did not find out how to do: How to keep my old configuration and set up, that already have done on the manually installed site? Can copy sites folder after new installing Drupal by composer? Since it is a quite new site, not much work have done, however, I would like to avoid doing again all the work from start...
Thanks
Same issue
This solution was helpful when updating from 8.5.1 to 8.5.2 as well. Thanks!
Had the same problem while
Had the same problem while upgrading from 8.5.1 to 8.5.3, I ran
composer prohibits drupal/core:8.5.3I got the following message
webflo/drupal-core-require-dev 8.5.1 requires drupal/core (8.5.1)I had to update core with the above package to upgrade to latest secure core version
composer update drupal/core webflo/drupal-core-require-dev --with-dependenciescomposer require
This worked for me
I am also trying to update
I am also trying to update from 8.5.1 to 8.5.3. Any idea what I am doing wrong?
I run this:
With these results:
Then I run update:
With "nothing up update" results:
I do get some "Cannot create cache directory" warnings. Not sure if that is preventing the update?
and what happens with this
and what happens with this command:
composer update drupal/core webflo/drupal-core-require-dev --with-dependenciesHmm, I thought the warning
Hmm, I thought the warning was only about the cache, but it also says "Package "drupal/core" listed for update is not installed" which is definitely not the case. Could it be that I am running the command from the wrong folder?
I am running from: ~/apps/drupal/htdocs$
Maybe this link can help:
Maybe this link can help: similar permission issue. adjust the relevant details:
https://stackoverflow.com/questions/35874482/cannot-create-cache-directo...
Thanks. I changed owner and
Thanks. I changed owner and got rid of the cache warnings, but still get "Package "drupal/core" listed for update is not installed."
How to update depends on your project.
Looks like your project doesn't contain a drupal/core In its require section. That means you need to check the update instructions of the project you used in composer create-project.
You could try to move drupal/core from replace section to require section. But, advise to follow instructions of the project you started with.
Thanks everyone. Removing the
Thanks everyone. Removing the replace section from composer.json and adding "drupal/core": "8.5.3" to require did the trick.
another case
I couldn't update from 8.5.2 to 8.5.3, until I have deleted version in "replace" section in composer.json
and use
, that added needed version 8.5.3 in "require" section.
Then
have done.
Hope, this will help somebody
Just want to know: I am quite
Just want to know: I am quite newbie to composer (and Drupal), and used following command to update from 8.5.2 to 8,5.3, without any issue:
composer update drupal/core webflo/drupal-core-require-dev –with-dependencies
Please advise when need to use this command?
composer prohibits drupal/core:8.5.3and when need to note the exact desired ver like this:BTW: when I run composer updating command there is a message:"Package "–with-dependencies" listed for update is not installed. Ignoring."Need to do something regarding this message, or can run it without –with-dependencies?
Wrong command!
-with-dependencies should read as --with-dependencies
2 - at the start, with 1 - it is treated as a package that it can't find. In addition it doesn't include the dependencies of the packages mentioned in the list.
With composer require you specify the requirements for your project. You define which packages are part of your project, the website you are creating. Normally composer update drupal/core --with-dependencies will get you the most recent versions of those packages. Unless your requirements tell it to use specific versions. In your case none of the dependencies are considered. By the typo you told composer to ignore them.
The composer prohibits drupal/core:8.5.3 tells you what in your specification prevents updating to 8.5.3, if anything. Normally used when you updated but noticed certain packages didn't update to a version you expected. Prohibits tells you what specification blocks that version. In your project you might allow any 8.5 but prevent it from updating to 8.6.*.
Advise against using specific version numbers. You would know when you need them.
As you have seen, the typo doesn't stop composer. However it didn't do what you expected. It ignored the dependencies. Suggest to run the command again, now with the correct option specified. You might add --dry-run, to see what would change.
mmjvb Hi,
mmjvb Hi,
Thanks a lot for your beautiful explanation - You saved a lot of time!
So I figure out from your advise that in general no need to note specific version, just in rare cases that I will be asking to.
I fixed this typo and have run again the correct command, and it was ok. However, still have a message in "status report" regarding: "Translation update status" - "Update available", and wonder if composer should take care of this updating, ot need to do it from the site itself? Any case, I tried to update from the site but get following message - Please inform if need any further info from log:
"
The specified filetemporary://fileqAW1EZcould not be moved/copied because the destination directory is not properly configured. This may be caused by a problem with file or directory permissions. More information is available in the system log.https://ftp.drupal.org/files/translations/8.x/drupal/drupal-8.5.3.he.po could not be saved to translations://.
The specified file temporary://fileZm5Eze could not be moved/copied because the destination directory is not properly configured. This may be caused by a problem with file or directory permissions. More information is available in the system log.
https://ftp.drupal.org/files/translations/8.x/rules/rules-8.x-3.0-alpha3... could not be saved to translations://.
4 translation files could not be imported. See the log for details. "
Exactly
Regarding the Status update, did you run update.php ?
The composer update takes care of the scripts, so you are running the new scripts, assuming cache was rebuilt. The update.php will make the updates to your database. Not familiar with Translation but it sounds like they would require an
followed by an update.php. Those modules would depend on Drupal/core, not the other way around.
When deciding on a composer managed project would advice against using traditional methods. Not convinced they can safely be used in parallel. Don't trust those reporting it works, most of the time they are reporting that they haven't seen it break down yet.
It could be just functionality of this modules discovering new data, nothing to do with the versions of the modules themselves.
As mentioned in the error the downloaded file couldn't be transferred to the target folder (translations://). The system log referred to probably tells you the destination which will likely be not writable by the web server. Suggest to check the documentation to figure out what to do.
Yes I was unable to update
Yes I was unable to update core with Composer, until I ran this:
composer update drupal/core webflo/drupal-core-require-dev --with-dependenciesand then all was well