Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should we enforce PHP 5.5/5.6 as a minimum ? #359

Closed
tostinni opened this issue Feb 20, 2018 · 3 comments
Closed

Should we enforce PHP 5.5/5.6 as a minimum ? #359

tostinni opened this issue Feb 20, 2018 · 3 comments

Comments

@tostinni
Copy link
Contributor

Drupal 8 supports PHP 5.5.9 as a minimum version (see Drupal 8 PHP requirements), however in composer.json there is no PHP version which can led to conflicts when you upgrade some packages.

For example this issue Doctrine/Common 2.8 requires PHP ~7.1 expose this problem when working in a PHP 5.5/5.6 environment.
One solution proposed there is to add "platform": {"php": "5.6"} to composer.json.

Should we consider doing the same for drupal-composer ?

@pfrenssen
Copy link
Collaborator

I think adding the platform version this is a good idea. It can be confusing to people that are new to composer that it will use the PHP version of the machine that runs the update command as a minimum in the composer.lock file. If we put it in we will achieve two goals:

  • Our users will end up with a build that actually works on an environment that meets the minimum requirements.
  • We demonstrate the proper way to change the minimum PHP version in a way that best matches people's expectations.

@tostinni
Copy link
Contributor Author

Sorry for the multiple commits, I was making some tests and fixing some typos.

I was thinking adding this directly to composer.json but it could be too restrictive to target PHP 5.5.9, so I added a FAQ section to README.md.

@webflo
Copy link
Member

webflo commented Mar 7, 2018

Thanks @tostinni

hawkeyetwolf pushed a commit to kalamuna/drupal-project that referenced this issue Mar 9, 2018
…m-project

* upstream/8.x:
  Improve update instructions (drupal-composer#366)
  Run tests with 8.6.x
  Update to Drupal 8.5
  Add platform version to FAQ to help user specifying PHP version, fixes drupal-composer#359. (drupal-composer#360)
  Update /drush dir for Drush9 (drupal-composer#350)
  Revert "Update /drush dir for Drush9"
  Update /drush dir for Drush9
  Replace require-dev with webflo/drupal-core-require-dev (drupal-composer#348)
  Bump drush version
  Replace GPL-2.0+ by GPL-2.0-or-later
  Run tests with 8.5.x (drupal-composer#329)
  Update README.md (drupal-composer#334)
  Update composer dependencies (drupal-composer#325)
  Declare compatibility with versions of Drush and CSS selector that are compatible with Drupal 8.4 and earlier.
  Added composer validate to CI.
  Update .travis.yml
  Update .travis.yml
  Add support for Drush 9 and Drupal 8.4
daften pushed a commit to district09/drupal8_project_template that referenced this issue Aug 9, 2018
* upstream/8.x: (22 commits)
  Remove unused use statement. (drupal-composer#406)
  Fix typo in README.md
  Remove "drupal-scaffold" from scripts (drupal-composer#275)
  Copy the editor config and gitattributes from drupal to the root. (drupal-composer#404)
  Fix tests on Travis CI (drupal-composer#405)
  Update drupal-composer/drupal-scaffold
  Fix installer path for drush commandfiles.
  Bump minimal version to 8.5.3
  Bump minimal version
  Updated argument name
  Remove extra whitespace (drupal-composer#371)
  Honor .env files and suggest usage (drupal-composer#351)
  Improve update instructions (drupal-composer#366)
  Run tests with 8.6.x
  Update to Drupal 8.5
  Add platform version to FAQ to help user specifying PHP version, fixes drupal-composer#359. (drupal-composer#360)
  Update /drush dir for Drush9 (drupal-composer#350)
  Revert "Update /drush dir for Drush9"
  Update /drush dir for Drush9
  Replace require-dev with webflo/drupal-core-require-dev (drupal-composer#348)
  ...

# Conflicts:
#	.gitignore
#	composer.json
#	drush/policy.drush.inc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants