Problem/Motivation

#2152073: Bump Drupal core's PHP requirement to 5.4.2 bumped Drupal core's PHP requirement, but between making those patches and the time they were committed, #2176065: Introduce a composer.json for Drupal\Component\Utility was committed as well, which still contained the original PHP 5.3.10 requirement.

Proposed resolution

Bump this requirement to 5.4.2 as well.

Remaining tasks

None.

User interface changes

None.

API changes

None, since this code was supposed to be compliant with PHP 5.4.2 anyway.

CommentFileSizeAuthor
#1 drupal_2210257_1.patch443 bytesXano
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Xano’s picture

Status: Active » Needs review
FileSize
443 bytes
sun’s picture

Status: Needs review » Reviewed & tested by the community
EclipseGc’s picture

Status: Reviewed & tested by the community » Closed (works as designed)

I'm not sure I see a reason to do this. Utility doesn't require 5.4.x, do you really want to force it on people who don't need it? The composer file actually means stuff, so... I'd personally say let's not do this. I'm closing this, if you have serious reasoning to the contrary, feel free to re-open, but unless Utility actually needs 5.4.x my position would be that it has no need to require it.

Eclipse

Xano’s picture

Status: Closed (works as designed) » Reviewed & tested by the community

Drupal's system requirements, as a project, say our Drupal 8 code base in its entirety needs PHP 5.4.2. Some parts will work fine on PHP 4, others on 5.2 or 5.3, and only few bits of code will require 5.4. The code base's required version is still 5.4.2, though.

Even though \Drupal\Component\Utility's composer.json only covers part of our code base, this still falls within our global requirement for PHP 5.4.2. If we don't want that, then we should move this part of our code base to a separate project and include it in core.

Xano’s picture

Status: Reviewed & tested by the community » Closed (works as designed)

@EclipseGc is a convincing man indeed.

sun’s picture

FWIW, I'm not convinced.

I can see and understand @EclipseGc's point, but if we go that route, then someone is going to be responsible for double-checking that the actual code in Utility is still compatible with PHP 5.3 prior to the release of Drupal 8.0.0.

I and everyone else is certainly not going to remember that the PHP compatibility version in composer.json needs to be updated, as soon as the first PHP 5.4 code line is introduced in Utility (which is only a matter of days). Our tests won't notice.

Therefore, I'd prefer to update the PHP compatibility version for the reason of consistency, and to prevent that a stale and wrong compatibility version is stated in there.

Xano’s picture

@EclipseGc told me he is working on getting the components out of the Drupal core project. If that works, I see no reason to bump the requirement. If we end up shipping D8 with these components, I think it may be a good idea to bump the requirement after all. On the other hand, we can also bump now, and lower the requirement later once we removed the components from core and are sure no PHP 5.4 (for instance) code was introduced in the meantime.

sun’s picture

To my knowledge, @Dries only agreed to having composer.json files for the sake of performing subtree splits from core (in the same way Symfony is doing it).

I do not think that there is an agreement to moving the components in Drupal\Component entirely out of the core code base. It is very unlikely that's going to happen for D8.

EclipseGc’s picture

Sun is correct, the code is unlikely to change its position physically, it will just be able to be served independently, it won't actually be removed from core.

I don't think this has any bearing personally. We need to get used to the fact that these Component things exist, and that they have a life of their own and need the same respect we afford Drupal itself in terms of dotting our i's and crossing our t's. To that end, a LOT of people seem to understand that at some level as many of the people involved in the code for any component get asked to review that code before it's committed. Numerous times during the D8 cycle I've reviewed a patch to plugins that would have made it NOT a component (functionally) anymore and my feedback has been utilized in order to keep that split appropriately respected. That gives me a lot of hope that we can and will generally succeed at respecting the composer files once everyone understands what they are and what they mean. That's not to say we won't have missteps, but I think a bigger problem could be caused by caving on this point too earlier. If we find this is seriously problematic, or that we're just consistently failing at it, we can always revisit a policy at some later date. It will not break BC for Drupal itself to do so.

Eclipse