Problem/Motivation

The composer.json in core does not reflect the state of our required php extensions.

The issue has been discovered by therobyouknow in https://github.com/drupal-composer/drupal-project/issues/144

Proposed resolution

Add all required php extensions to core/composer.json

Remaining tasks

User interface changes

API changes

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

webflo created an issue. See original summary.

dawehner’s picture

Afaik

    'date',
    'dom',
    'filter',
    'gd',
    'hash',
    'json',
    'pcre',
    'pdo',
    'session',
    'SimpleXML',
    'SPL',
    'tokenizer',
    'xml',

is the list of extensions we require.

jibran’s picture

What about mbstring, mcrypt and apcu?

dawehner’s picture

Aren't those 3 actually optional?

jibran’s picture

Well I tired PHP 7 without mbstring, mcrypt and install.inc broke for me in BTB.

dawehner’s picture

Which place requires it? IMHO its fine for the testing system to require it, but the runtime for example should not require mbstring.

webflo’s picture

@jibran I couldn't reproduce the dependency on mbstring, mcrypt and apcu.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Mile23’s picture

I wonder how many installations we'd break by doing this. :-)

As far as which mb string library we require: http://cgit.drupalcode.org/drupal/tree/core/lib/Drupal/Component/Utility...

So it could be any of them, but not a hard dependency on any one.

Mile23’s picture

Grayside’s picture

Doesn't imagemagick potentially swap in for gd? How would contrib/custom modules that swap "reasonable" services like that keep dependencies minimal?

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Mile23’s picture

Version: 8.5.x-dev » 8.4.x-dev
FileSize
1.27 KB

Added all the extensions from #2 and updated the lock file.

Moved back to 8.4.x because this really is a bug.

Mile23’s picture

Status: Active » Needs review

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Nice, thank you @Mile23!

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 14: 2713073_14.patch, failed testing. View results

harsha012’s picture

Status: Needs work » Needs review
FileSize
1.29 KB
1.27 KB

Re-uploaded the patch to fix the patch issue in cli

borisson_’s picture

Status: Needs review » Reviewed & tested by the community

Not sure where there are 2 patch in #19, and I don't see any difference between them, but they are different in filesize.

However, it looks solid.

alexpott’s picture

Yep this list matches the list in system_requirements

  $required_extensions = [
    'date',
    'dom',
    'filter',
    'gd',
    'hash',
    'json',
    'pcre',
    'pdo',
    'session',
    'SimpleXML',
    'SPL',
    'tokenizer',
    'xml',
  ];

I checked the capitalisation of PDO and it is correct as far as the output of php -m for me.

Adding review credit.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed 2f5a36cb1a to 8.6.x and 9507c19af3 to 8.5.x. Thanks!

Backporting to 8.5.x since this is a low-risk bugfix that helps people install and use Drupal without unexpected issues.

  • alexpott committed 2f5a36c on 8.6.x
    Issue #2713073 by harsha012, Mile23, dawehner, webflo, jibran: Add...

  • alexpott committed 9507c19 on 8.5.x
    Issue #2713073 by harsha012, Mile23, dawehner, webflo, jibran: Add...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

jcnventura’s picture

Any chance of a backport of this to the D7 composer.json?

Current list of D7 PHP dependencies from drupal-composer/drupal-project:
php >=5.2.5
ext-curl
ext-gd
ext-json
ext-openssl
ext-pdo
ext-pdo_mysql
ext-xml