Closed (fixed)
Project:
Drupal core
Version:
8.8.x-dev
Component:
base system
Priority:
Major
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
8 May 2019 at 10:28 UTC
Updated:
15 Oct 2019 at 03:10 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
alexpottNotes from looking at code
Comment #3
alexpottMore thoughts:
Comment #4
xjmCan this be deprecated?
Note that the logic browser testing paths for the warning on
DRUPAL_MINIMUM_PHPvs.DRUPAL_MINIMUM_INSTALL_PHPwith the warning should be left in place; we will need them again for dropping support for other PHP versions.Comment #5
alexpottYep I think \Drupal\Component\Assertion\Handle::register could be deprecated in favour of doing
in the calling code instead. I'll open a follow-up to do this as I think introducing deprecations is probably best done in their own issue.
Comment #7
mondrakeRe #2
That's not a workaround, it's a way to allow determining the size of a picture when rotated in
::transformDimensionsbased only on the starting width/height i.e. without invoking GD functions.Actually there would be #2918570: Drupal\KernelTests\Core\Image\ToolkitGdTest fails on PHP 7.1.x-dev and 7.0.x-dev following a PHP bugfix to review and a follow up in #2921123: Adjust Rectangle class to calculate rotated image dimensions according to libgd 2.2.2+ .
Comment #8
alexpottNow we no longer need TypedData::__sleep() no need to test it :)
Comment #9
alexpottComment #10
amateescu commentedWe have #1561866: Add support for built-in PHP session upload progress for that :)
Comment #11
gábor hojtsyI think this belongs as a requirement to open Drupal 9.
Comment #12
gábor hojtsyComment #13
mondrakeWrt #2 and #7, #2921123: Adjust Rectangle class to calculate rotated image dimensions according to libgd 2.2.2+ is actually independent from the other issue, so I unpostponed it. It's ready for review.
Comment #14
andypostComment #15
mile23Much like in #3039611: Update core PHP dependencies for 8.8.x... This change is based on what, exactly?
I've been trying to pin down honest constraints for the components in #2876669: Fix dependency version requirement declarations in components for quite a while. A maintainer could have saved me a lot of time and just said, "No, don't bother. We'll just arbitrarily assign them PHP >=7 later."
Comment #16
berdirAwww, so cute, a PHP4 => PHP5 hint :)
I think we could just as well remove "in PHP", because it seems pretty obvious that we are talking about that ;) Or even the whole sentence or rewrite it to something like "Objects are always passed by reference, if it is.. ". Actually, that sentence is not correct anyway, an object is not passed by reference, the point is that we are just passing a reference to the actual object: https://www.php.net/manual/en/language.oop5.references.php.
Wondering if we should remove the whole thing. Seems like an extremely rare use case to worry about and by now, most developers should know how objects behave?
> Much like in #3039611: Update core PHP dependencies for 8.8.x... This change is based on what, exactly?
It is based on the existing core/composer.json, we just remove the alternative PHP 5.x constraint there now. We don't have to be "honest" about the version we want to support, that's up to us to define, not what the code *currently* requires. By raising it to PHP 7, we can then *afterwards* starting using PHP7-only syntax in there.
Comment #17
alexpottI've added all the followups necessary and found existing issues - see issue summary. Where appropriate I've added a link to the @todo in the code as this makes things easier for everyone.
I've not created an issue about the comment that mentions PHP5.2 in \Drupal\Core\StreamWrapper\StreamWrapperInterface - I've confirmed that the php bug it references still exists in PHP 7.3.
The patch attached does not address @Berdir's comments in #16
Comment #18
alexpottRe #16 I'm not sure about removing the documentation on cloning objects - I think it is helpful even now. There are situations where we should be cloning objects to prevent side effects and we're not.
Added followup and @todo for #4 - see #3054072: Deprecate \Drupal\Component\Assertion\Handle::register()
Comment #19
alexpottFound some more things whilst grepping the codebase for "PHP.7". Opened:
As a result.
Comment #20
berdir#18: Fine, but I think we should at least reword it then? remove part or the whole first sentence, because as I wrote, "in PHP" seems strange. Obviously we are talking about PHP. That only made sense when it was about PHP5 (and unlike every other PHP 5 comment, it was about how PHP 5 is different to 4, so really PHP5+).
Comment #22
alexpottRemoved unnecessary test now we don't have fallback code in Crypt::randomBytes() and made the change @Berdir is suggesting (hopefully) by removing
in PHP.Comment #23
berdiranother one that seems a bit unnecessary now, as that is simply the minimum PHP version, we'd have to touch it again if we change it to 7.1 for example. So maybe just say PDO + PDO SQLite driver must be enabled?
Didn't find any explicit definition, but the example in https://www.drupal.org/docs/develop/standards/api-documentation-and-comm... has the link at the end after a "." and also starts with an uppercase character. Many of these new todos (which will hopfully only exist for a short time), look a bit strange right now.
This is also a bit confusing IMHO. the original comment is now part of the todo, one option might be to add the @todo below the comment, that's what I usually do and also other cases in this patch do, or rewrite the comment so it makes sense as a task that we need to do.
Should we then include the ~ again as all supported PHP versions should have a consistent result now (which they did for a long time now..)
Was wondering why this was removed for a second, but it was testing the custom implemntation of TypedData::__sleep() because we couldn't use the trait there. Now we do and we don't need the unit test anymore. Nice.
Comment #24
alexpottThanks for the review @Berdir
Re #23
Comment #25
alexpott@Berdir pointed out that this now doesn't make sense. Let's makes this way more to the point and merge with the next paragraph. @jhodgdon has pointed out that the next paragraph is not that well written either but that is beyond the scope of this issue.
Comment #26
berdirOk, I've went through the patch a few times, and I think as a patch, this is RTBC. This is touching quite a few strange parts, but I think this is doing enough and has lots of well documented follow-ups (nice work!) and corresponding @todo's.
What I don't know is what exactly is still needed to be able to actually commit this:
a) I assume so, but is the decision of a hard break of PHP 5 in 8.8 now final and we can commit this now (I don't see a reason to wait like we did with 8.7)?
b) I assume we somehow need to auto-update all existing test configurations that would use 8.8 + PHP 5.5 (there are quite a few of those in contrib), so we might need some sort of process to update all those to PHP 7(.1?) and disallow that configuration. Or do we say that maintainers are responsible for that themself?
c) Whatever other communication and documentation is necessary, release notes snippet is already there, so that's good.
Comment #27
MixologicI'll have a look at b. Theres a lot of other contrib testing setups that are not valid that need examining.
Comment #28
drummWe have a system in place for un-supporting testing configurations. They will show up on their project’s Automated testing tab as “disabled, testing configuration no longer available” and can be edited to something valid. I believe we’ve used this once, and emailed the affected project maintainers to let them know and encourage updating their testing configuration.
Comment #29
wim leersAwesome!
I see this got rid of all
phpversion()calls. JSON:API usedPHP_MAJOR_VERSIONinstead, but for the same purpose. It's the only occurrence of that in core. I think that should also be removed as part of this patch.Comment #30
alexpottThe additional change in #29 looks great. Thanks.
Comment #32
catchI know this is already there but we should fix the grammar here.
'If you do not have pdo_sqlite available on your system, there are'. Did this change on commit.
Committed/pushed to 8.8.x, thanks! Nice to be rid of so much of this.
Comment #33
mondrakeRest well, PHP5
Comment #34
xjmComment #35
alexpottWe've announced the end-of-life of PHP 5 in many many forums. The CR (based on this patch) wouldn't contain any instructions for developers or site owners so I'm not sure how it helps - but I might be wrong.
This was just mirroring the previous language. This type of thing is impossible to keep up to date but saying 7.2.17 is a lot better than 5.5.21 or 5.6.5
Comment #36
amateescu commentedAdded a new followup: #3058116: Remove paragonie/random_compat as a top-level dependency from 8.8.x
Comment #37
mondrakeComment #38
mondrakeShouldn't this issue be an active meta, to track the followups table?
Comment #39
alexpott@mondrake I don' think so. The follow-ups exist and they're not mandatory for completing the task here. Core no longer supports PHP 5.
Comment #41
Mixologicclosed, but related, not sure where else to link it to add visibility.
Comment #42
xjmComment #43
xjmPolishing the release note a little.