This issue is now fixed in the latest symfony version 4.4.29 release.
This article provides a solution for when deployment is stuck because there is an issue with code compilation. This issue is caused by a new version of symfony/console dependency (4.4.27, 4.4.28).
A new version of symfony/console dependency (4.4.27, 4.4.28) is causing dependency compilation process to fail.
Steps to reproduce:
When you install or upgrade Adobe Commerce or run composer update, the execution fails with the following error message:
Incompatible argument type: Required type: int. Actual type: string
The issue is caused by incompatibility of Adobe Commerce core code with the latest “symfony/console” dependency released in versions 4.4.27 and 4.4.28.
The issue will be resolved automatically once a new symfony/console version 4.2.29 is released (expected in August 2021).
How to fix on Adobe Commerce on-premise:
Adobe Commerce on-premises 2.4.x
Run the following command in the CLI/Terminal:
composer require symfony/console:">=4.4.0 <4.4.27 || ~4.4.29"
All 2.3.5+ Adobe Commerce on-premises merchants should run the following CLI command:
composer require symfony/console:"~4.1.0||~4.2.0||~4.3.0||>=4.4.0 <4.4.27 || ~4.4.29"
How to fix on Adobe Commerce on cloud infrastructure:
Run the above commands or upgrade to the latest ECE tools version (ece-tools: 2002.1.7), which will be available on Thursday, July 29. For steps, refer to Cloud for Adobe Commerce > Update ece-tools version in our developer documentation.
The complete fix will be released in Adobe Commerce (all deployment methods) 2.4.4.