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

v2 breaks support of PHP<8 due to symphony dependency #100

Open
daniel-lohse opened this issue Dec 18, 2023 · 3 comments
Open

v2 breaks support of PHP<8 due to symphony dependency #100

daniel-lohse opened this issue Dec 18, 2023 · 3 comments

Comments

@daniel-lohse
Copy link

By the introduction of the Symfony\Component\Cache\CacheItem
which is using a union-type declaration inside it will break the support for PHP lower than 8 already with v2.

Current Behavior

Using >=2.0 it will break with a php lower than v8 - so we are still on v7.4 and the union type of the symphony dependency breaks our code. You should update the min. stability to php>=8.0.0 thereby https://github.com/storyblok/storyblok-php-client/blob/master/composer.json#L9

@roberto-butti
Copy link
Collaborator

Hi @daniel-lohse thank you for the feedback,
Could you provide more info, for example the error message that you have with the composer install in a PHP 7.4 environment?
We introduced symfony cache but the way we configured the dependencies (in the composer json), should allow the usage with PHP 7.3.
The CICD on GitHub Actions uses multiple PHP version (also the PHP 7.3) and the test suite didn't raise any issues.
For example within PHP 7.3 composer through the configuration selects the old symfony/cache (v5.4.32)

Thank you.

@daniel-lohse
Copy link
Author

daniel-lohse commented Dec 18, 2023

Hi there, sure! The composer install is fine, no problems there.
The problem occurs while the interpreter compiles the code:
Parse error: syntax error, unexpected '\|', expecting variable (T_VARIABLE) in /vendor/symfony/cache/CacheItem.php on line 30
So it seems the wrong symfony/cache has been selected by installation. - We are still using PHP 7.4 atm.

For the moment I downgraded the version again to 1.6.0 as from >=2 we got such problems. Just wanted to raise this topic up, as others could potentially suffer the same problems here.

@roberto-butti
Copy link
Collaborator

thank you for the feedback.
Could you please share with me here the output of composer show , composer outdated and composer check please?
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants