Skip to content

composer drupal:core:version-change command is failing #11

Description

@maarten-digitalpolygon

Context

  • For a client project we use bitbucket pipelines from where our code is built and deployed to Acquia cloud.
  • Since more than a week we have integrated the drupal-manifest plugin which has been working normally without any interruption
  • Now out of a sudden the pipelines break on the following command
    /usr/local/bin/composer drupal:core:version-change --latest-minor --no-interaction
  • The error is the following:
In ComposerUpdateDrupalCommand.php line 85:
                                                                               
  [TypeError]                                                                  
  Cannot assign null to property DigitalPolygon\Composer\Drupal\VersionChange  
  r\ComposerUpdateDrupalCommand::$targetDrupalCoreVersion of type string       
                                                                               
Exception trace:
  at /opt/atlassian/pipelines/agent/build/vendor/digitalpolygon/drupal-upgrade-plugin/src/ComposerUpdateDrupalCommand.php:85
 DigitalPolygon\Composer\Drupal\VersionChanger\ComposerUpdateDrupalCommand->setTargetDrupalCoreVersion() at /opt/atlassian/pipelines/agent/build/vendor/digitalpolygon/drupal-upgrade-plugin/src/ComposerUpdateDrupalCommand.php:100
 DigitalPolygon\Composer\Drupal\VersionChanger\ComposerUpdateDrupalCommand->validate() at /opt/atlassian/pipelines/agent/build/vendor/digitalpolygon/drupal-upgrade-plugin/src/ComposerUpdateDrupalCommand.php:113
 DigitalPolygon\Composer\Drupal\VersionChanger\ComposerUpdateDrupalCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php:298
 Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:1040
 Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:301
 Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:390
 Composer\Console\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:171
 Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:148
 Composer\Console\Application->run() at phar:///usr/local/bin/composer/bin/composer:93
 require() at /usr/local/bin/composer:29
drupal:core:version-change [--latest-minor] [--latest-major] [--next-major] [--] [<version>]
 [ExecStack]  Exit code 1  Time 2.171s
 [error]  Executing command '/usr/local/bin/composer drupal:core:version-change --latest-minor --no-interaction' failed. 
> Exited drupal:upgrade:composer...
  • the drupal core version returned by VersionManager::getLatestMinor is empty
  • When debugging locally and making targetDrupalCoreVersion nullable, the error becomes:
    No target version of Drupal core could be identified.
  • Drupal version: 10.4.7
  • PHP version: 8.3.12
  • Drush version: 12.5.3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions