I'm currently developing an app in Laravel and deploying it in Heroku.
I get this error when pushing:
symfony / polyfill-ctype v1.24.0 requires php >= 7.1
Anyone knows how to solve this?
The truth is that I investigated but I couldn't think of what to do. I already tried running composer update
and there is no solution either.
Im using Laravel Framework 8.78.1
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"php": "^7.3|^8.0",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
"laravel/framework": "^8.40",
"laravel/passport": "^10.2",
"laravel/tinker": "^2.5"
},
CodePudding user response:
Add the following to the require section of your composer.json file:
"symfony/polyfill-ctype": "~1.23.0",
"symfony/polyfill-iconv": "~1.23.0",
"symfony/polyfill-mbstring": "~1.23.1",
"symfony/polyfill-php80": "~1.23.1"
From Heroku support: "As symfony/polyfill-ctype declares ext-ctype as provided since v1.24.0 and this package is already bundled with the PHP package that Heroku provides, this leads to a conflict due to how Composer 1 resolves dependencies."
The 1.23 packages don't have this issue. Don't update to 1.24 until Heroku supports composer v2.