Download & Extend

Allow install profiles to change the system requirements

Project:Drupal core
Version:8.x-dev
Component:install system
Category:task
Priority:normal
Assigned:Unassigned
Status:needs review

Issue Summary

imho there should be a way to change the constants defined for the system requirements
as 'DRUPAL_MINIMUM_PHP' or 'DRUPAL_MINIMUM_PHP_MEMORY_LIMIT'.
there could be some complex install profiles that requires "more power" from the system.
for example there's a Commerce Kickstart issue about this : #1763632: The install needs to check Kickstart requirements before starting.

Comments

#1

Status:active» needs review

here is a patch that allows that
bad approach

are there other system requirements constants that could be changed?

AttachmentSizeStatusTest resultOperations
allow_change_system-requirements_constants-1772316-1.patch605 bytesIdlePASSED: [[SimpleTest]]: [MySQL] 39,391 pass(es).View details | Re-test

#2

Title:Allow install profiles to change the system requirements constants» Allow install profiles to change the system requirements

here is a new approach for changing the php system requirements.
it uses the install_profile_info definition.

so what it's needed it's to specify new values in the info file of the profile

php = 5.3.12
php_memory_limit = 1234M

AttachmentSizeStatusTest resultOperations
allow_change_system-requirements-1772316-2.patch3.8 KBIdleFAILED: [[SimpleTest]]: [MySQL] 39,564 pass(es), 0 fail(s), and 423 exception(s).View details | Re-test

#3

Status:needs review» needs work

The last submitted patch, allow_change_system-requirements-1772316-2.patch, failed testing.

#4

Status:needs work» needs review

rebuilt the patch, i hope it's the right one

AttachmentSizeStatusTest resultOperations
allow_change_system-requirements-1772316-4.patch3.88 KBIdlePASSED: [[SimpleTest]]: [MySQL] 39,384 pass(es).View details | Re-test

#5

Version:7.x-dev» 8.x-dev

and here is the patch for Drupal 8

AttachmentSizeStatusTest resultOperations
allow_change_system-requirements-1772316-5.patch3.83 KBIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch allow_change_system-requirements-1772316-5.patch. Unable to apply patch. See the log in the details link for more information.View details | Re-test

#6

Component:configuration system» install system

#7

Looks like some D7 install profiles have been using #4 and it no longer applies to HEAD as of 7.22. :(

Added tags Needs reroll but there's no way to specify thats a D7 reroll since this is also being tracked as an 8.x issue - sorry.

#8

#9

Status:needs review» needs work

The last submitted patch, allow_change_system-requirements-1772316-5.patch, failed testing.

#10

Status:needs work» needs review

We need to get this into D8 before we worry about D7. I requeued the patch in #5 (I doubt it'll pass - last test run was in September). If that fails, lets reroll that, get it committed, then deal with D7.

#11

Status:needs review» needs work

Ah, cross posted with the bot. So yeah, need to reroll that patch.

#12

Let's give this a try. I moved around your new block of code in system.install so that we're not calling drupal_get_profile() multiple times - now it's just called once at the beginning of the function and used throughout.

AttachmentSizeStatusTest resultOperations
1772316_12-allow-profiles-to-override-php-requirements.patch4.98 KBIdleFAILED: [[SimpleTest]]: [MySQL] 54,160 pass(es), 0 fail(s), and 35 exception(s).View details | Re-test

#13

Status:needs work» needs review

#14

Status:needs review» needs work

The last submitted patch, 1772316_12-allow-profiles-to-override-php-requirements.patch, failed testing.

#15

Status:needs work» needs review

Made system.install default to DRUPAL_MINIMUM_PHP_MEMORY_LIMIT if it's not set in the profile (this is what caused the previous patch to fail).

#16

Patch failed to attach to last post.

AttachmentSizeStatusTest resultOperations
1772316_15-allow-profiles-to-override-php-requirements.patch5.11 KBIdlePASSED: [[SimpleTest]]: [MySQL] 55,418 pass(es).View details | Re-test

#17

I'm not sure about "Drupal requires at least PHP %version.", as this is not true if the profile uses a different max version than Drupal. Drupal with [name of profile] requires this version, yes. Also the same issue in the message about the memory limit.

nobody click here