Sage 9 + PHP 8.0

I was inquiring earlier about upgrading Sage 9 to work with PHP 8.0 and just found a public github fork of sage which does just that. I saw other inquiries about the same thing, so I thought I would write a message here for those who are looking for this:

Here is the changes in composer.json (not the full file, just the bit with changes):


  "autoload": {
    "psr-4": {
      "App\\": "app/"
    }
  },
  "repositories": [
    { "type": "vcs", "url": "https://github.com/jeh5256/sage-installer"},
    { "type":"vcs", "url":"https://github.com/jeh5256/sage-lib" }
  ],
  "require": {
    "php": ">=7.1",
    "composer/installers": "~2.0",
    "illuminate/support": "^8.0",
    "roots/sage-lib": "dev-master",
    "soberwp/controller": "~2.1.0"
  },
  "require-dev": {
    "squizlabs/php_codesniffer": "^2.8.0",
    "roots/sage-installer": "dev-master"
  },

So basicly just updated to use those github repos and version dev-master. Also had to update composer installer to 2.0 and illuminate/support to 8.0.

I haven’t had much time to test it but seems to work based on my quick test run.

So big thanks to Justin for this!

3 Likes

Thank you for sharing!

After now a bit of more testing and installing, I noticed that sage 9 does not get installed with roave/securityadvisories, because all illuminate/view v5… versions have this issue:

So considering that also, I think it would make a lot of sense to include this in the main sage v9, because it would provide the php8 support and get rid of that security issue.

1 Like