Skip to content
Advertisement

HEROKU error: During inheritance of ArrayAccess

This is the log of heroku, previous version of my code was running perfect but I change some code and have this error. Rollback is no t solution same error now…

JavaScript

Advertisement

Answer

I got the exact same error recently. My local php version is 8.0.13 and it is working fine, but when I uploaded it to heroku (the php version used here is 8.1) I got the error.

To solve the problem, I specified my php version in the composer.json to the exact same local php version that I’m using like this:

JavaScript

Don’t forget to update the composer.lock, then upload it to heroku. Heroku will use that exact version.

I know it is not recommended to specify the exact version per https://devcenter.heroku.com/articles/php-support, but it is working fine as a workaround.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement