[6.4] Understand Polyfill detection #350
llaville
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
With PHP CompatInfo 6.4.0, a new feature was added to be awareness of compatibility packages
When you install CompatInfo 6.4 on PHP 7.4 plateform, you should have these following dependencies installed too :
So, when you run
analyser:run
command on following snippet source code,you should get such Polyfill analysis results :
What does it means ?
ICONV_VERSION
constant is detected as a polyfill becauseBartlett\CompatInfo\Application\Polyfills\SymfonyIconv
service is loaded by default configuration, but no version is affected becausesymfony/polyfill-iconv
dependency is not installed.ctype_alnum
function is detected as a polyfill becauseBartlett\CompatInfo\Application\Polyfills\SymfonyCtype
service is loaded by default. Version is affected (PHP 7.1.0 min) becausesymfony/polyfill-ctype
dependency v1.25.0 is installed.mb_chr
function is detected as a polyfill by two different loaded services (Bartlett\CompatInfo\Application\Polyfills\SymfonyPhp72
,Bartlett\CompatInfo\Application\Polyfills\SymfonyMbstring
). Version is also affected becausesymfony/polyfill-mbstring
dependency v1.25.0 andsymfony/polyfill-php72
dependency v1.25.0 are installed.Beta Was this translation helpful? Give feedback.
All reactions