Since Drupal 10 requires PHP 8.1+ there is no point in keeping the polyfill symfony/polyfill-php80.

symfony/polyfill-php74 Isn't currently required by any of our dependencies currently (72, 73 and 80 are).
Same goes for symfony/polyfill-php81.

So technically removing them, is not needed _now_.

Having stressed that last word: Why not be complete, it doesn't cause issues now and will prevent symfony/polyfill-php74 or -php81 hopping on board later on.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Chi created an issue. See original summary.

Spokje’s picture

Makes sense to me.

Looking at #3168514: Remove unnecessary polyfills from composer.lock we need to add symfony/polyfill-php80 to the replace-section of the root composer.json to truly get rid of it.

Spokje’s picture

Status: Active » Needs review
Spokje’s picture

longwave’s picture

+++ b/composer.json
@@ -41,7 +41,8 @@
+        "symfony/polyfill-php73": "*",
+        "symfony/polyfill-php80": "*"

For completeness should we also add symfony/polyfill-php74 here?

Spokje’s picture

Thought about this, and double-checked again:

"Weirdly" symfony/polyfill-php74 isn't required by any of our dependencies currently (72, 73 and 80 are).

So technically, it's not needed _now_.

Having stressed that last word: Why not be complete, it doesn't hurt now and will prevent symfony/polyfill-php74 hopping on board later on.

longwave’s picture

PHP 7.4 only added three really obscure functions that I guess nobody is using: https://github.com/symfony/polyfill-php74/blob/main/bootstrap.php

longwave’s picture

Status: Needs review » Reviewed & tested by the community

#6 looks great to me, RTBC assuming bot agrees.

quietone’s picture

Status: Reviewed & tested by the community » Needs work

Needs a reroll

Spokje’s picture

Assigned: Unassigned » Spokje
Spokje’s picture

Issue summary: View changes

Retitling and updating IS

Spokje’s picture

Issue summary: View changes
Spokje’s picture

Title: Remove symfony/polyfill-php80 dependency » Remove symfony/polyfill-php74 and symfony/polyfill-php80 dependencies

I'll get there in the end...

Spokje’s picture

Spokje’s picture

Status: Needs work » Needs review

Rerolled

Spokje’s picture

FileSize
2.7 KB

The last submitted patch, 14: 3296390-14.patch, failed testing. View results

Spokje’s picture

Status: Needs review » Needs work
Spokje’s picture

Note to self: More caffeine intake before posting the first patch of the day...

Spokje’s picture

FileSize
1.47 KB

...and the second interdiff of the day...

Spokje’s picture

Assigned: Spokje » Unassigned
Status: Needs work » Needs review
Spokje’s picture

Besides a (rare, but previously seen-by-me-before) random test failure in Drupal\Tests\book\Functional\BookTest::testGetTableOfContents that wasn't there in the retest, this seems fine now.

longwave’s picture

Status: Needs review » Reviewed & tested by the community

Thanks @Spokje. symfony/polyfill-php80 is removed and symfony/polyfill-php74 is also blocked from installing just in case.

catch’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs reroll

Needs another re-roll.

Spokje’s picture

Assigned: Unassigned » Spokje

Seemingly TestBot doesn't alert/kicks-back-to-NW issues that fail auto-2-daily-retesting?

Spokje’s picture

Spokje’s picture

Assigned: Spokje » Unassigned
Status: Needs work » Reviewed & tested by the community
Issue tags: -Needs reroll
Eric_A’s picture

Having stressed that last word: Why not be complete, it doesn't hurt now and will prevent symfony/polyfill-php74 hopping on board later on.

If we block unneeded php polyfills from installing, it seems logical to replace symfony/polyfill-php81 as well.

longwave’s picture

Status: Reviewed & tested by the community » Needs work

@Eric_A great point! NW to skip symfony/polyfill-php81 as well.

Spokje’s picture

Title: Remove symfony/polyfill-php74 and symfony/polyfill-php80 dependencies » Remove symfony/polyfill-php74, -php80 and -php81 dependencies
Issue summary: View changes
Status: Needs work » Needs review
FileSize
847 bytes
5.67 KB

symfony/polyfill-php81 is basically the same story as symfony/polyfill-php74: currently not required by any of our dependencies, but since we're being thorough, let's make sure it doesn't sneak in later.

Eric_A’s picture

(I suddenly realize that we've been replacing PHP polyfills in this project for some time but are not in drupal/recommended-project. Seems like an inconsistency... Anyway, out of scope here.)

Spokje’s picture

drupal/core-recommended is build every core release from the a.b.x-dev branches, so we're (should be) good.

Eric_A’s picture

(Projects drupal/legacy-project and drupal/recommended-project appear to be maintained manually.
In any case it's not something to worry about here. The perceived inconsistency in replaced packages is a pre-existing thing and can be addressed in its own issue if it is to be addressed.)

longwave’s picture

Status: Needs review » Reviewed & tested by the community

#30 looks OK to me.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 10.1.x and cherry-picked to 10.0.x, thanks!

  • catch committed 8a0273a on 10.0.x
    Issue #3296390 by Spokje, longwave, Eric_A, Chi: Remove symfony/polyfill...
  • catch committed 76a9c82 on 10.1.x
    Issue #3296390 by Spokje, longwave, Eric_A, Chi: Remove symfony/polyfill...
phenaproxima’s picture

Status: Fixed » Needs work
Issue tags: +Needs release note

I'm tagging this for a release note, even though I sort of doubt this change is disruptive enough to warrant one. These polyfills, by their nature, are not things you should notice the presence or absence of. Nonetheless, erring on the side of caution here.

longwave’s picture

I don't think this needs one. We are only preventing polyfills from installing where the functionality they add is already provided by the minimum version of PHP that we support. I'd rather not try and explain this in the release notes as I can't see how it would ever affect anyone.

catch’s picture

Status: Needs work » Fixed
Issue tags: -Needs release note

Yep agreed, won't affect anyone whether site owners or contrib. Moving back to fixed an untagging.

Status: Fixed » Closed (fixed)

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