symfony / polyfill

PHP polyfills

Home Page:https://symfony.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`symfony/polyfill-php55` require `php>=7.1` from `v1.20.0`

uzulla opened this issue · comments

Hi.
I want to use symfony/polyfill-php55 with PHP 5.4 environment. But polyfill-php55 require PHP>=7.1.

https://github.com/symfony/polyfill-php55/blob/c17452124a883900e1d73961f9075a638399c1a0/composer.json#L18-L20

I got a bellow error when composer install.

# in composer.json
{
    "require": {
//snip
        "symfony/polyfill-php55": "^1.20"
//snip
# composer error
//snip
     - symfony/polyfill-php55 v1.20.0 requires php >=7.1 -> your php version (5.4.xx) does not satisfy that requirement.
//snip

I am using v1.19.0 to work around the problem now.

I believe polyfill-php55 made for php<5.5 users.
So, It could be seems something wrong.

Could I ask for any reason or suggestions?
(... must use php>=7.1 is the because? yeah I'm working for it now :) )

thanks.

This is not a mistake. We dropped PHP <7.1 in v1.20 for all polyfills. The version tagged as v1.20.0 is an empty metapackage to be used with newer PHP versions as a placeholder to fulfil peer dependencies and does not provide any polyfilling capability (the whole code base has been removed in 1.20: symfony/polyfill-php55@v1.19.0...v1.20.0).

If you plan to support PHP 5.4 in your application or library, you should set your constraint to ^1.19. This way composer will choose 1.19 on PHP 5.4 and 1.20 on PHP 7.1+ environment during dependency resolution.

My question is resolved.
Thank you!