Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
1. I am trying to upgrade one of my drupal 7 module
2. drush dmu-analyze mmodulename
ran successfully.
3. Tried to run the module upgrade command drush dmu-upgrade mymodulename
but it is throwing following error
PHP Fatal error: Undefined class constant 'DUMP_EXCEPTION_ON_INVALID_TYPE' in /var/www/html/drupal/core/lib/Drupal/Component/Serialization/YamlSymfony.php on line 22
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Undefined class constant 'DUMP_EXCEPTION_ON_INVALID_TYPE' in
/var/www/html/drupal/core/lib/Drupal/Component/Serialization/YamlSymfony.php, line 22
Using Drupal 8 version 8.5.x
Comments
Comment #2
HongPong CreditAttribution: HongPong as a volunteer and at kor group commentedSimilarly I got on 8.4.2,
drush dmu-analyze scrollbar --path=modules/custom/scrollbar
when I had in a custom subdirectory it gave the error here.Then trying to do
dmu-analyze scrollbar
did work. In some casesdrush cr
helps to push ahead.Comment #3
labboy0276 CreditAttribution: labboy0276 commentedI ran composer update in the Drupal Module Upgrader module itself and it fixed the DUMP_EXCEPTION_ON_INVALID_TYPE issue.
Comment #4
ryan.gibson CreditAttribution: ryan.gibson at Mediacurrent commentedA composer update within the contrib module did fix it. But that's with using the dev version of the module. So it seems like there's a few zigs and zags necessary to use it (hopefully use it correctly).
Comment #5
knyshuk.vova CreditAttribution: knyshuk.vova at Internetdevels commentedcomposer update in the Drupal Module Upgrader module itself works fine and resolve the issue for me.
Comment #6
nithinkolekar CreditAttribution: nithinkolekar commentedmodule's page needs to be updated with this working trick #3
and also Drush 8 as required version. ref:forum post
Comment #7
arunkumarkAm also facing the same issue on my Drupal instance. I have tried to clear the Drush cache, cleared the Drupal cache, updated the composer.
Comment #8
HongPong CreditAttribution: HongPong as a volunteer and at kor group commentedarunkumark what path is the module you are trying to examine at? if it is in "modules/custom" that didn't work for me and it had to be in "modules". Hope that helps a bit.
Comment #9
arunkumark@HongPong Yes am running the module keeping under the modules directory. The
drush dmu-analyze
is working fine but drushdmu-upgrade
get fails while running.Comment #10
arunkumarkI have resolved the issue by running the
composer update
inside the drupalmoduleupgrader module.As per the comment #3
Comment #11
AnybodyI can also confirm #10. Thanks a lot. It would be nice to have a new dev release with the 8.5.x conflicts removed. Marking this closed.
Comment #12
HongPong CreditAttribution: HongPong as a volunteer and at kor group commented@Anybody I'm aiming to tag a new release next week when I have some time - if there are any other issues here you can move to RTBC before then we can slide them in :) Thanks for helping clarify this one.
Comment #13
bennof CreditAttribution: bennof as a volunteer and at Geeks4Change commentedI confirm solutions #5 and #10
composer update
, thanks!