{"data":{"id":"magento2-39345","source":"github-pr","sourceRef":"magento/magento2#39345","title":"bin/magento sampledata:deploy --no-update throws an exception","pr":{"number":39345,"url":"https://github.com/magento/magento2/pull/39345","author":"JeroenBoersma","mergedAt":"2024-12-21T01:10:09Z","mergeCommit":"96e5bb7dd5b9819b3085fbffdd963b4702872b82","headCommit":"7a64a95cb3c00562b8abc1a2362e6e2d7e57e535","baseRef":"2.4-develop","diffSha256":"34e11381e97b57508a243beff840ed34d4d59358b7b8771e42e9f57f55c10773"},"issues":[{"number":39344,"url":"https://github.com/magento/magento2/issues/39344","title":"bin/magento sampledata:deploy --no-update throws an exception","labels":["Area: Catalog","Component: SampleData","Issue: Confirmed","Priority: P2","Progress: done","Reported on 2.4.7-p3","Reproduced on 2.4.x"],"kind":"human"}],"fixedIn":"2.4.8","containingTags":["2.4.8","2.4.8-p1","2.4.8-p2","2.4.8-p3","2.4.8-p4","2.4.8-p5","2.4.9"],"reportedOn":"2.4.7-p3","codeMatch":{"2.4.6":"clean","2.4.6-p1":"clean","2.4.6-p2":"clean","2.4.6-p3":"clean","2.4.6-p4":"clean","2.4.6-p5":"clean","2.4.6-p6":"clean","2.4.6-p7":"clean","2.4.6-p8":"clean","2.4.6-p9":"clean","2.4.6-p10":"clean","2.4.6-p11":"clean","2.4.6-p12":"clean","2.4.6-p13":"clean","2.4.6-p14":"clean","2.4.6-p15":"clean","2.4.7":"clean","2.4.7-p1":"clean","2.4.7-p2":"clean","2.4.7-p3":"clean","2.4.7-p4":"clean","2.4.7-p5":"clean","2.4.7-p6":"clean","2.4.7-p7":"clean","2.4.7-p8":"clean","2.4.7-p9":"clean","2.4.7-p10":"clean","2.4.8":"conflict","2.4.8-p1":"conflict","2.4.8-p2":"conflict","2.4.8-p3":"conflict","2.4.8-p4":"conflict","2.4.8-p5":"conflict","2.4.9":"conflict"},"affectedVersions":["2.4.6","2.4.6-p1","2.4.6-p2","2.4.6-p3","2.4.6-p4","2.4.6-p5","2.4.6-p6","2.4.6-p7","2.4.6-p8","2.4.6-p9","2.4.6-p10","2.4.6-p11","2.4.6-p12","2.4.6-p13","2.4.6-p14","2.4.6-p15","2.4.7","2.4.7-p1","2.4.7-p2","2.4.7-p3","2.4.7-p4","2.4.7-p5","2.4.7-p6","2.4.7-p7","2.4.7-p8","2.4.7-p9","2.4.7-p10"],"components":["magento/module-sample-data"],"files":[{"path":"app/code/Magento/SampleData/Console/Command/SampleDataDeployCommand.php","change":"modified","package":"magento/module-sample-data"},{"path":"app/code/Magento/SampleData/Console/Command/SampleDataRemoveCommand.php","change":"modified","package":"magento/module-sample-data"}],"stripped":{"tests":[],"docs":[],"outsideCode":[]},"linesChanged":12,"mergeBatched":false,"excluded":null,"sections":{"description":"```\n$ bin/magento sampledata:deploy --no-update\n                                                                                                         \nIn PackageDiscoveryTrait.php line 90:                                                                                                                                                                              \n                                                                                                                                                                                                                  \n  [TypeError]                                                                                                                                                                                                     \n  Composer\\Command\\RequireCommand::determineRequirements(): Argument #6 ($useBestVersionConstraint) must be of type bool, int given, called in /project/vendor/composer/composer/src/Composer/Command/RequireCom  \n  mand.php on line 213                                                                                                                                                                                            \n                                                                                                                                                                                                                  \n\nException trace:\n  at /project/vendor/composer/composer/src/Composer/Command/PackageDiscoveryTrait.php:90\n Composer\\Command\\RequireCommand->determineRequirements() at /project/vendor/composer/composer/src/Composer/Command/RequireCommand.php:213\n Composer\\Command\\RequireCommand->execute() at /project/vendor/symfony/console/Command/Command.php:326\n Symfony\\Component\\Console\\Command\\Command->run() at /project/vendor/symfony/console/Application.php:1078\n Symfony\\Component\\Console\\Application->doRunCommand() at /project/vendor/symfony/console/Application.php:324\n Symfony\\Component\\Console\\Application->doRun() at /project/vendor/composer/composer/src/Composer/Console/Application.php:394\n Composer\\Console\\Application->doRun() at /project/vendor/symfony/console/Application.php:175\n Symfony\\Component\\Console\\Application->run() at /project/vendor/composer/composer/src/Composer/Console/Application.php:148\n Composer\\Console\\Application->run() at /project/vendor/magento/module-sample-data/Console/Command/SampleDataDeployCommand.php:106\n Magento\\SampleData\\Console\\Command\\SampleDataDeployCommand->execute() at /project/vendor/symfony/console/Command/Command.php:326\n Symfony\\Component\\Console\\Command\\Command->run() at /project/vendor/symfony/console/Application.php:1078\n Symfony\\Component\\Console\\Application->doRunCommand() at /project/vendor/symfony/console/Application.php:324\n Symfony\\Component\\Console\\Application->doRun() at /project/vendor/magento/framework/Console/Cli.php:118\n Magento\\Framework\\Console\\Cli->doRun() at /project/vendor/symfony/console/Application.php:175\n Symfony\\Component\\Console\\Application->run() at /project/bin/magento:23\n\nrequire [--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] [-\n-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-\nstable] [--prefer-lowest] [-m|--minimal-changes] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--] [<packages>.\n..]                                                 \n\nThere is an error during sample data deployment. Composer file will be reverted.\n```","stepsToReproduce":"- Install a clean version of Magento\n- In the console try to run `bin/magento sampledata:deploy --no-update`","expectedResult":"```\n./composer.json has been updated                                                                                                                                                                                   \nSample data modules have been added via composer. Please run bin/magento setup:upgrade      \n```","actualResult":"```\n$ bin/magento sampledata:deploy --no-update\n                                                                                                         \nIn PackageDiscoveryTrait.php line 90:                                                                                                                                                                              \n                                                                                                                                                                                                                  \n  [TypeError]                                                                                                                                                                                                     \n  Composer\\Command\\RequireCommand::determineRequirements(): Argument #6 ($useBestVersionConstraint) must be of type bool, int given, called in /project/vendor/composer/composer/src/Composer/Command/RequireCom  \n  mand.php on line 213                                                                                                                                                                                            \n                                                                                                                                                                                                                  \n\nException trace:\n  at /project/vendor/composer/composer/src/Composer/Command/PackageDiscoveryTrait.php:90\n Composer\\Command\\RequireCommand->determineRequirements() at /project/vendor/composer/composer/src/Composer/Command/RequireCommand.php:213\n Composer\\Command\\RequireCommand->execute() at /project/vendor/symfony/console/Command/Command.php:326\n Symfony\\Component\\Console\\Command\\Command->run() at /project/vendor/symfony/console/Application.php:1078\n Symfony\\Component\\Console\\Application->doRunCommand() at /project/vendor/symfony/console/Application.php:324\n Symfony\\Component\\Console\\Application->doRun() at /project/vendor/composer/composer/src/Composer/Console/Application.php:394\n Composer\\Console\\Application->doRun() at /project/vendor/symfony/console/Application.php:175\n Symfony\\Component\\Console\\Application->run() at /project/vendor/composer/composer/src/Composer/Console/Application.php:148\n Composer\\Console\\Application->run() at /project/vendor/magento/module-sample-data/Console/Command/SampleDataDeployCommand.php:106\n Magento\\SampleData\\Console\\Command\\SampleDataDeployCommand->execute() at /project/vendor/symfony/console/Command/Command.php:326\n Symfony\\Component\\Console\\Command\\Command->run() at /project/vendor/symfony/console/Application.php:1078\n Symfony\\Component\\Console\\Application->doRunCommand() at /project/vendor/symfony/console/Application.php:324\n Symfony\\Component\\Console\\Application->doRun() at /project/vendor/magento/framework/Console/Cli.php:118\n Magento\\Framework\\Console\\Cli->doRun() at /project/vendor/symfony/console/Application.php:175\n Symfony\\Component\\Console\\Application->run() at /project/bin/magento:23\n\nrequire [--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] [-\n-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-\nstable] [--prefer-lowest] [-m|--minimal-changes] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--] [<packages>.\n..]                                                 \n\nThere is an error during sample data deployment. Composer file will be reverted.\n```","source":"issue"},"signatures":["[TypeError]","Exception trace:"],"labels":{"area":["Catalog"],"component":["SampleData"],"priority":"P2","severity":null,"reportedOn":["2.4.7-p3"]},"categories":[],"triage":{"model":"@cf/cloudflare/clef","requestHash":"21f19a78dc874f9288fda64c525e6cac84843cc3a0438ef0fbae98db151650e9","isBugfix":0.9736,"changeKind":{"choice":"bugfix","probabilities":{"bugfix":0.9614,"feature":0.005,"refactor":0.0117,"tests_only":0.0074,"docs_only":0.0048,"dependency":0.0097},"confidence":0.9095},"scope":{"score":0.5636,"probabilities":{"0":0.4975,"1":0.4415,"2":0.061},"confidence":0.1692},"risk":{"score":0.0544,"probabilities":{"0":0.9593,"1":0.027,"2":0.0137},"confidence":0.8818},"area":{"choice":"framework","probabilities":{"catalog":0.0914,"checkout":0.0116,"customer":0.0104,"admin":0.0761,"graphql_api":0.0079,"framework":0.4736,"frontend":0.0154,"other":0.3136},"confidence":0.2427},"securityRelevant":0.0053,"reportedVersion":{"choice":"2.4.7-p3","probabilities":{"2.4.0":0.0023,"2.4.0-p1":0.0025,"2.4.1":0.0021,"2.4.1-p1":0.0023,"2.4.2":0.0021,"2.4.2-p1":0.0023,"2.4.2-p2":0.0026,"2.4.3":0.0023,"2.4.3-p1":0.0026,"2.4.3-p2":0.0027,"2.4.3-p3":0.003,"2.4.4":0.0022,"2.4.4-p1":0.0026,"2.4.4-p10":0.0032,"2.4.4-p11":0.0035,"2.4.4-p12":0.0032,"2.4.4-p13":0.0039,"2.4.4-p14":0.0033,"2.4.4-p15":0.0033,"2.4.4-p16":0.0034,"2.4.4-p17":0.0035,"2.4.4-p18":0.0028,"2.4.4-p2":0.0021,"2.4.4-p3":0.0022,"2.4.4-p4":0.0023,"2.4.4-p5":0.0026,"2.4.4-p6":0.0032,"2.4.4-p7":0.0029,"2.4.4-p8":0.0028,"2.4.4-p9":0.0027,"2.4.5":0.0026,"2.4.5-p1":0.0029,"2.4.5-p10":0.0029,"2.4.5-p11":0.0031,"2.4.5-p12":0.0045,"2.4.5-p13":0.004,"2.4.5-p14":0.004,"2.4.5-p15":0.0029,"2.4.5-p16":0.0031,"2.4.5-p17":0.0029,"2.4.5-p2":0.0028,"2.4.5-p3":0.0031,"2.4.5-p4":0.0027,"2.4.5-p5":0.0029,"2.4.5-p6":0.0041,"2.4.5-p7":0.0034,"2.4.5-p8":0.0031,"2.4.5-p9":0.0026,"2.4.6":0.005,"2.4.6-p1":0.0051,"2.4.6-p10":0.0052,"2.4.6-p11":0.0065,"2.4.6-p12":0.0063,"2.4.6-p13":0.0056,"2.4.6-p14":0.0051,"2.4.6-p15":0.0043,"2.4.6-p2":0.003,"2.4.6-p3":0.0047,"2.4.6-p4":0.0057,"2.4.6-p5":0.0042,"2.4.6-p6":0.0047,"2.4.6-p7":0.0051,"2.4.6-p8":0.0038,"2.4.6-p9":0.0031,"2.4.7":0.0283,"2.4.7-p1":0.0076,"2.4.7-p10":0.0034,"2.4.7-p2":0.0089,"2.4.7-p3":0.6046,"2.4.7-p4":0.0315,"2.4.7-p5":0.013,"2.4.7-p6":0.0131,"2.4.7-p7":0.0092,"2.4.7-p8":0.0075,"2.4.7-p9":0.0055,"2.4.8":0.0063,"2.4.8-p1":0.0068,"2.4.8-p2":0.0066,"2.4.8-p3":0.0086,"2.4.8-p4":0.0064,"2.4.8-p5":0.0056,"2.4.9":0.0053,"unspecified":0.0043},"confidence":0.3614},"backportWorthy":{"score":1.523,"probabilities":{"0":0.1092,"1":0.2586,"2":0.6322},"confidence":0.2177}},"curated":{"title":"Fixes the TypeError from sampledata:deploy and remove with --no-update","description":"Running bin/magento sampledata:deploy --no-update throws a TypeError, because the --no-update argument must be of type boolean and an integer is given. SampleDataDeployCommand and SampleDataRemoveCommand now pass --no-update as true instead of 1.","categories":[],"author":"claude-code/opus-5.5","date":"2026-10-06","reviewedBy":null},"tests":null},"_documentation":"https://magento.watch/api","_description":"Upstream fix magento2-39345 details"}