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

Enum error in YamlLoader #11

Open
alexander-schranz opened this issue Dec 19, 2023 · 3 comments
Open

Enum error in YamlLoader #11

alexander-schranz opened this issue Dec 19, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@alexander-schranz
Copy link
Member

alexander-schranz commented Dec 19, 2023

Currently we have the following error:

  datana-gmbh/logz-io-handler/1.7/config .............................. FAILED  
    The command "'/usr/bin/php8.1' '/home/runner/work/symfony-recipes-php-contrib/symfony-recipes-php-contrib/vendor/bin/config-transformer' 'switch-format' '/home/runner/work/symfony-recipes-php-contrib/symfony-recipes-php-contrib/datana-gmbh/logz-io-handler/1.7/config'" failed.
Exit Code: 1
(General error) Working directory: /home/runner/work/symfony-recipes-php-contrib/symfony-recipes-php-contrib Output: ================ Error

Output: ================ In YamlFileLoader.php line 596: The file "/home/runner/work/symfony-recipes-php-contrib/symfony-recipes-php -contrib/datana-gmbh/logz-io-handler/1.7/config/packages/datana_logz_io_han dler.yaml" does not contain valid YAML:

The enum "Inpsyde\LogzIoMonolog\Enum\Host::EuCentral1" is not defined at line 8 (near "$host: !php/enum Inpsyde\LogzIoMonolog\Enum\Host::EuCentral1"). In Inline.php line 578: The enum "Inpsyde\LogzIoMonolog\Enum\Host::EuCentral1" i

We are converting without installing here things If I remember correctly but not sure. I don't know yet how we can fix that as the error is in the YamlFileLoader not able to ignore the Enum.

@TomasVotruba do you maybe have an idea?

@alexander-schranz alexander-schranz added the bug Something isn't working label Dec 19, 2023
@TomasVotruba
Copy link

Hi, this might be related to new symfony/yaml release, as I've tagged new package. Not sure what exactly.

@alexander-schranz
Copy link
Member Author

alexander-schranz commented Dec 19, 2023

@TomasVotruba I will do some testing with the newer config-transformer and symfony/yaml version I locked the versions as I not accidently wanted to get breaking changes. I will let you know if it disappears on newer version. But you do not remember any changes in the config-transformer itself fixing such problem with the YamlFileLoader.

If it does not work I maybe thinking about creating "Fake" enums by extract them via regex before transforming would that be something which make sense to contribute back to simplify/config-transformer package? Else I can keep it inside this package.

@TomasVotruba
Copy link

Tests were passing for config-transformer 👍 but I'm not sure if enums were working even before.
I only use it config-transformer on legacy projects, where it's mostly PHP 5.6-7.4 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants