Closed (fixed)
Project:
Advanced CSS/JS Aggregation
Version:
8.x-4.x-dev
Component:
Compression/Minification
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
2 Jun 2019 at 13:27 UTC
Updated:
16 May 2020 at 11:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jamesoakleyLooking at the code, this happens in a "default" section of the switch block. So of the two alternatives ("continue 2", "break"), "continue 2" would make no sense. So it seems safe to me to replace this with the "break" statement that the PHP devs are steering us towards.
Comment #3
thallesBut drupal 7 dont support php 7.3, @see: https://www.drupal.org/docs/7/system-requirements/php-requirements#php_r...
Comment #4
jamesoakleyBut we should presumably work to make as much core / contrib code 7.3 compatible as possible. It only becomes an issue if 7.3 compliance would then break the ability to work with older versions of PHP that are officially supported.
Making the change I'm proposing in the patch would not cause any problems for people running on older versions (unless someone with better PHP than me says otherwise). So there's nothing lost in fixing this.
Comment #5
thallesMake sense for me, thanks for your explanations!
Comment #7
thallesComment #9
rafal.sereda commentedHello, do you know that this issue still exists in the 8.x module version? I think there is no reason to not apply this patch to 8.x versions, WDYT?
Comment #10
jamesoakleyYou raise a good point, Rafal, because the corresponding line of code is there in 8.x-4.x, so will trigger the same warnings in PHP 7.3 and above.
Here's the equivalent patch. But, the continue statement to replace there was
continue 3, not just plaincontinue, so it may be that there are unwanted side effects of replacing it withbreakin this case.Comment #11
tobiasbThis already fixed in 8.x. See #3068558: JShrink and PHP 7.3 issues.
Comment #12
tobiasbComment #13
jamesoakleyThanks, yes - I've re-read https://www.php.net/manual/en/migration73.incompatible.php#migration73.i... and it's only vanilla "
continue" that triggers warnings inside aswitchblock.continue 2, (or in this casecontinue 3) is fine. So the section of code targeted by my patch above has already been fixed, as you say.Rafal - happy?