Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

Symfony version(s) affected

7.3

Description

The serializer component in version 7.3-74 contains a usage to the function array_any and do not have the polyfill as dependency.

if (array_any($tags, $closure = fn (array $tag) => (bool) $tag)) {

Note: I'm opening an issue after #63702 to track this error.

How to reproduce

It is not often an error because the installation of the polyfill is done by the installer of Symfony. But in my case, I installed Sf on my computer with a recent version of PHP before to figure out that the PHP version was not the right one.

So I downgraded all the versions of Symfony from 8.0 to 7.4 manually in my composer.json then I used (with the right version of PHP, which was 8.3):

rm -rf vendor composer.lock
composer install

The installation does not complete because of the missing function array_any.

Possible Solution

Adding the polyfill as a dependency in the versions that requires it.

Additional Context

No response

You must be logged in to vote

Replies: 3 comments · 2 replies

Comment options

As previously said, the polyfill is present as dependency in symfony/serializer for 7.3 and 7.4:

https://github.com/symfony/symfony/blob/7.3/src/Symfony/Component/Serializer/composer.json#L22

https://github.com/symfony/symfony/blob/7.4/src/Symfony/Component/Serializer/composer.json#L22

Could you post here the output of the composer install executed for downgrade?

You must be logged in to vote
0 replies
Comment options

But in my case, I installed Sf on my computer with a recent version of PHP before to figure out that the PHP version was not the right one.

what does your composer.json looks like ?
Dependencies are resolved by composer, not by the symfony CLI.

You must be logged in to vote
0 replies
Comment options

@Nek- Did you remove symfony/polyfill-php84 from the replace section in composer.json when downgrading?

You must be logged in to vote
2 replies
@Nek-
Comment options

No indeed, that's definitely the issue!

@Nek-
Comment options

For the record, here is the reproducer: https://asciinema.org/a/co3J3yBELhKYSH15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
4 participants
Converted from issue

This discussion was converted from issue #63707 on March 20, 2026 18:59.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.