Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Yaml] Call to undefined function Symfony\Component\Yaml\array_is_list() #43943

Closed
dmaicher opened this issue Nov 5, 2021 · 4 comments · Fixed by #43944
Closed

[Yaml] Call to undefined function Symfony\Component\Yaml\array_is_list() #43943

dmaicher opened this issue Nov 5, 2021 · 4 comments · Fixed by #43944

Comments

@dmaicher
Copy link
Contributor

dmaicher commented Nov 5, 2021

Symfony version(s) affected

v5.4.0-BETA1

Description

I just tried installing v5.4.0-BETA1 on one of my projects.

Similar to #42280 it seems some polyfills are not loaded again:

> Incenteev\ParameterHandler\ScriptHandler::buildParameters
Updating the "app/config/parameters.yml" file
PHP Fatal error:  Uncaught Error: Call to undefined function Symfony\Component\Yaml\array_is_list() in /var/www/project/symfony/vendor/symfony/yaml/Inline.php:214
Stack trace:
#0 /var/www/project/symfony/vendor/symfony/yaml/Dumper.php(64): Symfony\Component\Yaml\Inline::isHash()
#1 /var/www/project/symfony/vendor/symfony/yaml/Yaml.php(100): Symfony\Component\Yaml\Dumper->dump()
#2 /var/www/project/symfony/vendor/incenteev/composer-parameter-handler/Processor.php(63): Symfony\Component\Yaml\Yaml::dump()
#3 /var/www/project/symfony/vendor/incenteev/composer-parameter-handler/ScriptHandler.php(34): Incenteev\ParameterHandler\Processor->processFile()
#4 phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(377): Incenteev\ParameterHandler\ScriptHandler::buildParameters()
#5 phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(236): Composer\EventDispatcher\EventDispatcher->executeEventPhpScript()
#6 phar:///usr/local/bin/composer/src/ in /var/www/project/symfony/vendor/symfony/yaml/Inline.php on line 214

How to reproduce

Use Incenteev\ParameterHandler\ScriptHandler::buildParameters in composer post-install-cmd

Possible Solution

Remove usages of array_is_list?

Additional Context

No response

@stof
Copy link
Member

stof commented Nov 5, 2021

This is the usual issue of autoload-files not being loaded in composer scripts.

@xabbuh
Copy link
Member

xabbuh commented Nov 5, 2021

I am on it.

@dmaicher
Copy link
Contributor Author

dmaicher commented Nov 5, 2021

Possibly we could just revert f4da7e4 ?

@xabbuh
Copy link
Member

xabbuh commented Nov 5, 2021

see #43944

@fabpot fabpot closed this as completed Nov 5, 2021
fabpot added a commit that referenced this issue Nov 5, 2021
…s (xabbuh)

This PR was merged into the 5.4 branch.

Discussion
----------

[Yaml] revert using functions provided by polyfill packages

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #43943
| License       | MIT
| Doc PR        |

This reverts #41431 for the same reason for which we merged #42296 (see #42280 and composer/composer#10024 for more information).

Commits
-------

3b9b700 revert using functions provided by polyfill packages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants