Skip to content

bin/magento sampledata:deploy --no-update throws an exception #39344

@JeroenBoersma

Description

@JeroenBoersma

Preconditions and environment

  • Magento version 2.4.7-p3

Steps to reproduce

  • Install a clean version of Magento
  • In the console try to run bin/magento sampledata:deploy --no-update

Expected result

./composer.json has been updated Sample data modules have been added via composer. Please run bin/magento setup:upgrade 

Actual result

$ bin/magento sampledata:deploy --no-update In PackageDiscoveryTrait.php line 90: [TypeError] Composer\Command\RequireCommand::determineRequirements(): Argument #6 ($useBestVersionConstraint) must be of type bool, int given, called in /project/vendor/composer/composer/src/Composer/Command/RequireCom mand.php on line 213 Exception trace: at /project/vendor/composer/composer/src/Composer/Command/PackageDiscoveryTrait.php:90 Composer\Command\RequireCommand->determineRequirements() at /project/vendor/composer/composer/src/Composer/Command/RequireCommand.php:213 Composer\Command\RequireCommand->execute() at /project/vendor/symfony/console/Command/Command.php:326 Symfony\Component\Console\Command\Command->run() at /project/vendor/symfony/console/Application.php:1078 Symfony\Component\Console\Application->doRunCommand() at /project/vendor/symfony/console/Application.php:324 Symfony\Component\Console\Application->doRun() at /project/vendor/composer/composer/src/Composer/Console/Application.php:394 Composer\Console\Application->doRun() at /project/vendor/symfony/console/Application.php:175 Symfony\Component\Console\Application->run() at /project/vendor/composer/composer/src/Composer/Console/Application.php:148 Composer\Console\Application->run() at /project/vendor/magento/module-sample-data/Console/Command/SampleDataDeployCommand.php:106 Magento\SampleData\Console\Command\SampleDataDeployCommand->execute() at /project/vendor/symfony/console/Command/Command.php:326 Symfony\Component\Console\Command\Command->run() at /project/vendor/symfony/console/Application.php:1078 Symfony\Component\Console\Application->doRunCommand() at /project/vendor/symfony/console/Application.php:324 Symfony\Component\Console\Application->doRun() at /project/vendor/magento/framework/Console/Cli.php:118 Magento\Framework\Console\Cli->doRun() at /project/vendor/symfony/console/Application.php:175 Symfony\Component\Console\Application->run() at /project/bin/magento:23 require [--dev] [--dry-run] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--fixed] [--no-suggest] [--no-progress] [--no-update] [--no-install] [--no-audit] [--audit-format AUDIT-FORMAT] [- -update-no-dev] [-w|--update-with-dependencies] [-W|--update-with-all-dependencies] [--with-dependencies] [--with-all-dependencies] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer- stable] [--prefer-lowest] [-m|--minimal-changes] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--] [<packages>. ..] There is an error during sample data deployment. Composer file will be reverted. 

Additional information

vendor/magento/module-sample-data/Console/Command/SampleDataDeployCommand.php:93

-$commonArgs['--no-update'] =1; +$commonArgs['--no-update'] = true;

Release note

When using --no-update in the sampledata:deploy command an error was thrown because since newer PHP versions the argument must be a boolean, a int was given.

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

Labels

Area: CatalogComponent: SampleDataIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: doneReported on 2.4.7-p3Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions