Improve usability:
see patch
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | drush8_and_drush9_compatibility-3082040-2.patch | 780 bytes | joseph.olstad |
Improve usability:
see patch
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | drush8_and_drush9_compatibility-3082040-2.patch | 780 bytes | joseph.olstad |
Comments
Comment #2
joseph.olstadsee patch
Comment #3
andypostNot sure that's right place to throw exception, and log it... because exception will be logged anyway
Meantime better to add hook_requirements to do this check
I bet it will not work because class_exists will not call autoloader
Comment #5
gábor hojtsyIf I understand this right, this will happen to someone who (a) does not install their Drupal 8 site with composer (b) did not install their drupalmoduleupgrader with composer either, but (d) drush dl-ed the module or had a git checkout of it.
I think its a fine improvement for that case.
Comment #7
gábor hojtsyHuh, I pulled the trigger too fast. Let's discuss.
Comment #8
joseph.olstadyes I double tested it before and after running composer up
to test this, delete your vendor folder in the drupalmoduleupgrader module
so ya, I downloaded Drupal 8.8.x (dev) core, installed it normally without composer
then I downloaded drupalmoduleupgrader
put it in the modules folder
this helpful message will come up if the composer up has not been run
so now if someone installs without composer and they run this they will get a helpful suggestion.
Comment #9
joseph.olstadcomposer 1.6.3 is what I'm running and Drupal 8.8.x core does not allow me to do a composer up from the drupal core folder
however I can do a composer up from the drupalmoduleupgrader
Drupal 8.7.x did not have this problem with composer version 1.6.3 (default version provided with Ubuntu 18.04 LTS)
It's pretty agressive when we're forced to use the bleeding edge ALL the time, maybe they will fix this before 8.8.x is released.
(it's still in dev)
a lot of people will have the same issue I have when 8.8.0 is released unless the core maintainers fix this.
Comment #10
joseph.olstadmessage from Drupal core 8.8.x: "Drupal core development requires Composer 1.9.0, but Composer 1.6.3 is installed."
luckily 'composer up' works for me from the drupalmoduleupgrader folder
this patch is helpful
Comment #11
gábor hojtsyI don't know how would composer figure out what to do if the directory you are running it is not managed by composer. What does composer update mean then? How did it work with 8.7.x with a non-composer Drupal core setup?
What should be fixed in core? To be able to run composer update from a non-composer managed directory? If you git checkout a Drupal module into your repo how would composer know it is there and it needs to manage it? It did not even install it in the first place.
The previous version of the readme suggested using https://www.drupal.org/project/composer_manager to merge core composer with module composer data so its managed within the high level composer file, but as you can see on that project it is deprecated since Drupal 8.1 (3.5 years ago) because core provides the necessary pieces to require modules as composer dependencies.
Comment #12
gábor hojtsyComment #13
gábor hojtsyComment #15
gábor hojtsyI don't contest that this improves the situation if composer was not yet used with the module. Let's get this in and then see what people say with the new release.
Comment #16
joseph.olstadDrupal 8.7.x core works with composer version 1.6.3
Drupal 8.8.x dev core does NOT work with composer version 1.6.3, requires minimum version 1.9.0 (bleeding edge version)
so, with 8.8.x , I CANNOT run 'composer up' from the root of drupal
however running 'composer up' from drupalmoduleupgrader does work with composer 1.6.3.
Composer 1.6.3 was released in 2018 , not very old at all, this is actually a very recent version of composer.
it is included in Ubuntu 18.04 repositories with millions of other people using Ubuntu 18.04 this is sure to cause more than some discomfort if 8.8.0 is released with this type of a constraint in december.
Comment #17
gábor hojtsy#3075785: Update composer/composer to ^1.9.1 has some background info, if you are installing Drupal core with composer then 1.9.0 is not required, just if you are developing core, which is the case if you use a git checkout rather than installing Drupal with composer.
Comment #18
joseph.olstadah ok thanks Gabor, ya there was a dns failure in drupal.org yesterday so I cloned core because I could not download it.
explains it, so this is good news, I don't have to upgrade composer 'yet'. hopefully should be good for a while.
Comment #19
joseph.olstadThanks