PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, January 13, 2022

[FIXED] Cannot deploy Laravel App to Heroku - symfony/polyfill-ctype v1.24.0 requires php >=7.1

 January 13, 2022     heroku, laravel, php     No comments   

Issue

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"
},

Solution

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.

UPDATE Jan. 7, 2022: Heroku has hotfixed the issue. Declaring specific package versions should not be necessary. https://github.com/heroku/heroku-buildpack-php/issues/528



Answered By - brnd4n
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing