You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to run the api:upgrade-resource command in preparation for v3.x fails:
$ console api:upgrade-resource
[2023-03-01T13:01:39.282475+01:00] console.CRITICAL: Error thrown while running command "api:upgrade-resource". Message: "Too few arguments to function SebastianBergmann\Diff\Differ::__construct(), 0 passed in /.../vendor/api-platform/core/src/Core/Bridge/Symfony/Bundle/Command/UpgradeApiResourceCommand.php on line 218 and exactly 1 expected" {"exception":"[object] (ArgumentCountError(code: 0): Too few arguments to function SebastianBergmann\\Diff\\Differ::__construct(), 0 passed in /.../vendor/api-platform/core/src/Core/Bridge/Symfony/Bundle/Command/UpgradeApiResourceCommand.php on line 218 and exactly 1 expected at /.../vendor/sebastian/diff/src/Differ.php:44)","command":"api:upgrade-resource","message":"Too few arguments to function SebastianBergmann\\Diff\\Differ::__construct(), 0 passed in /.../vendor/api-platform/core/src/Core/Bridge/Symfony/Bundle/Command/UpgradeApiResourceCommand.php on line 218 and exactly 1 expected"} []
[2023-03-01T13:01:39.283043+01:00] php.CRITICAL: Uncaught Error: Too few arguments to function SebastianBergmann\Diff\Differ::__construct(), 0 passed in /.../vendor/api-platform/core/src/Core/Bridge/Symfony/Bundle/Command/UpgradeApiResourceCommand.php on line 218 and exactly 1 expected {"exception":"[object] (ArgumentCountError(code: 0): Too few arguments to function SebastianBergmann\\Diff\\Differ::__construct(), 0 passed in /.../vendor/api-platform/core/src/Core/Bridge/Symfony/Bundle/Command/UpgradeApiResourceCommand.php on line 218 and exactly 1 expected at /.../vendor/sebastian/diff/src/Differ.php:44)"} []
In Differ.php line 44:
Too few arguments to function SebastianBergmann\Diff\Differ::__construct(), 0 passed in /.../vendor/api-platform/core/src/Core/Bridge/Symfony/Bundle/Command/UpgradeApiResourceCommand.php on line 218 and exactly 1 e
xpected
api:upgrade-resource [-d|--dry-run [DRY-RUN]] [-s|--silent] [-f|--force]
This is due to a constructor change of Differ with sebastian/diff 5.x:
* fix(symfony): update for PHPUnit 10
The Differ now expects a output builder as mandatory argument.
Fixes#5426
* support many phpunit versions
---------
Co-authored-by: Antoine Bluchet <[email protected]>
API Platform version(s) affected: v2.7.10
Description
Trying to run the
api:upgrade-resource
command in preparation for v3.x fails:This is due to a constructor change of
Differ
withsebastian/diff
5.x:sebastianbergmann/diff@6fb7a31
How to reproduce
api-platform/core
2.7 andphpunit/phpunit
10.x which requiressebastian/diff
5.xapi:upgrade-resource
console commandThe text was updated successfully, but these errors were encountered: