{"data":{"id":"magento2-38683","source":"github-pr","sourceRef":"magento/magento2#38683","title":"Static content deploy - Type error","pr":{"number":38683,"url":"https://github.com/magento/magento2/pull/38683","author":"Nuranto","mergedAt":"2024-05-28T15:06:24Z","mergeCommit":"a9532e179415dfeac328a04a6c1572dd8b7b2c08","headCommit":"c8adafcd54f1509c48c112176549949a89d9bc12","baseRef":"2.4-develop","diffSha256":"9e591ff4ea02a45dfc23faa4136ad1144afd76430d2664018bf038c9a673876e"},"issues":[{"number":38682,"url":"https://github.com/magento/magento2/issues/38682","title":"[Issue] Static content deploy - Type error","labels":["Area: Framework","Component: Theme","Issue: Confirmed","Priority: P3","Progress: done","Reported on 2.4.7","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","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-deploy"],"files":[{"path":"app/code/Magento/Deploy/Service/DeployPackage.php","change":"modified","package":"magento/module-deploy"},{"path":"app/code/Magento/Deploy/i18n/en_US.csv","change":"modified","package":"magento/module-deploy"}],"stripped":{"tests":[],"docs":[],"outsideCode":[]},"linesChanged":12,"mergeBatched":false,"excluded":null,"sections":{"description":"```\n Magento\\Framework\\Exception\\LocalizedException::__construct(): Argument #1 ($phrase) must be of type Magento\\Framework\\Phrase, string given, called in /var/www/html/vendor/magento/module-deploy/Service/DeployPackage.php on line 142\n```","stepsToReproduce":"1. Create an empty less file in your theme\n2. Launch `setup:static-content:deploy --force`","expectedResult":"The error \"LESS file is empty\" is displayed correctly","actualResult":"```\n Magento\\Framework\\Exception\\LocalizedException::__construct(): Argument #1 ($phrase) must be of type Magento\\Framework\\Phrase, string given, called in /var/www/html/vendor/magento/module-deploy/Service/DeployPackage.php on line 142\n```","source":"issue"},"signatures":["Magento\\Framework\\Exception\\LocalizedException::__construct(): Argument ($phrase) must be of type Magento\\Framework\\Phrase, string given, called"],"labels":{"area":["Framework"],"component":["Theme"],"priority":"P3","severity":null,"reportedOn":["2.4.7"]},"categories":[],"triage":{"model":"@cf/cloudflare/clef","requestHash":"7d104a1cd09b82d92db238aa10361da2fd2b624b17ed9eed72758cf9287cce0c","isBugfix":0.9785,"changeKind":{"choice":"bugfix","probabilities":{"bugfix":0.9659,"feature":0.0049,"refactor":0.0129,"tests_only":0.0054,"docs_only":0.0048,"dependency":0.0061},"confidence":0.9199},"scope":{"score":0.6708,"probabilities":{"0":0.391,"1":0.5471,"2":0.0619},"confidence":0.1841},"risk":{"score":0.1656,"probabilities":{"0":0.8532,"1":0.128,"2":0.0188},"confidence":0.617},"area":{"choice":"frontend","probabilities":{"catalog":0.0076,"checkout":0.0059,"customer":0.0052,"admin":0.0208,"graphql_api":0.0047,"framework":0.218,"frontend":0.694,"other":0.0438},"confidence":0.4648},"securityRelevant":0.0065,"reportedVersion":{"choice":"2.4.7","probabilities":{"2.4.0":0.0026,"2.4.0-p1":0.0027,"2.4.1":0.0024,"2.4.1-p1":0.0025,"2.4.2":0.0028,"2.4.2-p1":0.0028,"2.4.2-p2":0.003,"2.4.3":0.0031,"2.4.3-p1":0.0032,"2.4.3-p2":0.0037,"2.4.3-p3":0.0033,"2.4.4":0.003,"2.4.4-p1":0.003,"2.4.4-p10":0.0036,"2.4.4-p11":0.0035,"2.4.4-p12":0.0031,"2.4.4-p13":0.0037,"2.4.4-p14":0.0033,"2.4.4-p15":0.0031,"2.4.4-p16":0.0034,"2.4.4-p17":0.0032,"2.4.4-p18":0.0029,"2.4.4-p2":0.0023,"2.4.4-p3":0.0025,"2.4.4-p4":0.0027,"2.4.4-p5":0.0028,"2.4.4-p6":0.0031,"2.4.4-p7":0.003,"2.4.4-p8":0.0031,"2.4.4-p9":0.0028,"2.4.5":0.004,"2.4.5-p1":0.0032,"2.4.5-p10":0.003,"2.4.5-p11":0.0039,"2.4.5-p12":0.0042,"2.4.5-p13":0.0035,"2.4.5-p14":0.0038,"2.4.5-p15":0.0031,"2.4.5-p16":0.0033,"2.4.5-p17":0.0036,"2.4.5-p2":0.0027,"2.4.5-p3":0.0028,"2.4.5-p4":0.0031,"2.4.5-p5":0.0032,"2.4.5-p6":0.0035,"2.4.5-p7":0.0035,"2.4.5-p8":0.0032,"2.4.5-p9":0.0027,"2.4.6":0.0088,"2.4.6-p1":0.0114,"2.4.6-p10":0.0094,"2.4.6-p11":0.0085,"2.4.6-p12":0.0074,"2.4.6-p13":0.0066,"2.4.6-p14":0.0064,"2.4.6-p15":0.0067,"2.4.6-p2":0.0028,"2.4.6-p3":0.0044,"2.4.6-p4":0.0054,"2.4.6-p5":0.0041,"2.4.6-p6":0.0052,"2.4.6-p7":0.0068,"2.4.6-p8":0.0047,"2.4.6-p9":0.0032,"2.4.7":0.5638,"2.4.7-p1":0.0171,"2.4.7-p10":0.0098,"2.4.7-p2":0.0112,"2.4.7-p3":0.0116,"2.4.7-p4":0.0134,"2.4.7-p5":0.0116,"2.4.7-p6":0.0137,"2.4.7-p7":0.0182,"2.4.7-p8":0.0114,"2.4.7-p9":0.0092,"2.4.8":0.0058,"2.4.8-p1":0.0069,"2.4.8-p2":0.007,"2.4.8-p3":0.0081,"2.4.8-p4":0.0065,"2.4.8-p5":0.0069,"2.4.9":0.0069,"unspecified":0.0086},"confidence":0.313},"backportWorthy":{"score":1.3661,"probabilities":{"0":0.1995,"1":0.2349,"2":0.5656},"confidence":0.1223}},"curated":{"title":"Fixes the static content deploy type error when a theme has an empty LESS file","description":"With an empty LESS file in a theme, setup:static-content:deploy gets LocalizedException::__construct(): Argument #1 ($phrase) must be of type Phrase, string given, called in DeployPackage. DeployPackage now uses __('Compilation from source: %1') with the source path and exception message, so a Phrase is given and the \"LESS file is empty\" error is displayed correctly.","categories":[],"author":"claude-code/opus-5.5","date":"2026-10-06","reviewedBy":null},"tests":null},"_documentation":"https://magento.watch/api","_description":"Upstream fix magento2-38683 details"}