guzzle / psr7

PSR-7 HTTP message library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remove ralouphie/getallheaders dependency ?

alamirault opened this issue · comments

Hello,

On https://github.com/ralouphie/getallheaders description it's wrote

PHP getallheaders() polyfill. Compatible with PHP >= 5.3.

As this package require 7.2.5 || ^8.0, this package shouldn't be removed in require section ?

I'm not 100% due to this comment on original PR

It does a few extra things like Authorization headers.
#162 (comment)

Can you clarify this part ?

I don't understand what you are objecting to? That package works fine with all PHP versions we support.

My objective ? Minimize my vendor size if some package are not really needed

If you want to force it not to be included in your app vendor, you can mark your app as "replacing" the package. I do this all the time with the symfony pollyfills.

    "replace": {
        "paragonie/random_compat": "*",
        "paragonie/sodium_compat": "*",
        "symfony/polyfill-ctype": "*",
        "symfony/polyfill-iconv": "*",
        "symfony/polyfill-intl-grapheme": "*",
        "symfony/polyfill-intl-icu": "*",
        "symfony/polyfill-intl-idn": "*",
        "symfony/polyfill-intl-normalizer": "*",
        "symfony/polyfill-mbstring": "*",
        "symfony/polyfill-php56": "*",
        "symfony/polyfill-php70": "*",
        "symfony/polyfill-php71": "*",
        "symfony/polyfill-php72": "*",
        "symfony/polyfill-php73": "*",
        "symfony/polyfill-php74": "*",
        "symfony/polyfill-php80": "*",
        "symfony/polyfill-php81": "*",
        "symfony/polyfill-php82": "*"
    },

etc.

Though if you do this and there is code that is used that calls it, you will run into problems.

Thanks, not the best but it will be enough for my case