Discrepancies when installing Sage vs cloning Sage from official repo

Sage 9 states that the minimum PHP version must be 7.1.3 or later.

However, when installing Sage 9 using composer create-project roots/sage your-theme-name on a PHP 7.0.x install, it will set up and install without issue. Indeed, the Sage project on Packagist at https://packagist.org/packages/roots/sage states the requirement is just PHP >= 7.0. This also occurs if you are working on a Sage theme initially installed in this manner and pushed up to a Git repository, which you later clone to your local system, and then run composer install to set it up.

However, if you clone the theme down from the Sage Git repo at https://github.com/roots/sage and run composer install, it will complain about the incorrect PHP version.

This is something that should be fixed, as it allows Sage 9 to be installed with incorrect PHP versions. If the requirement is stated as PHP >= 7.1.3 but the instructions allow installation on an earlier PHP version, this could have the side affect of things not functioning correctly after install. I haven’t run into this yet, but now I’m uncertain if it will be an issue later on.


This is an issue — Packagist is using 9.0.0 version not the master branch — but for now if you run:

composer create-project roots/sage my-theme dev-master

It will install the latest version.

I think the decrepancy is just in the docs, because the README uses the the above command to install Sage, while the docs omits dev-master. Creating an issue on the docs repo could be a good start to getting this resolved. :+1:

1 Like

I have created an issue at https://github.com/roots/docs/issues/140

In the meantime, it seems counter-intuitive to me that people would be asked to do an install by default off of a dev-master branch instead of just straight master branch (or in this case what appears to be the 9.0.0 branch or tag on Packagist).

In short, if the documents want users installing using composer create-project roots/sage my-theme, then the requirements should match those of the current Packagist install, AKA, PHP 7.0.x. It is confusing to not have the two match up; more people are likely to read the docs first than the github repo README.md file regarding install instructions.

Thanks for raising these issues.

I’ll tag a minor version of Sage soon which will show that 7.1.3 is now the requirement. I’ll also remove the dev-master part of the README, or at least make a note about it.