Skip to content

Polyfills

Before version 6.4, PHP CompatInfo and its compatibility analyser was not able to detect packages that provides compatibility layers for some extensions and functions.

Since version 6.4, PHP CompatInfo used a polyfill architecture to detect such packages that backports features found in the latest PHP versions.

Each polyfill package must be supported both with PHP CompatInfoDB (since release 4.2.0) to identify PHP features (classes, constants, functions), and CompatInfo itself by services implementing the Bartlett\CompatInfo\Application\Polyfills\PolyfillInterface

Here is the list of available polyfill services supported (namespace Bartlett\CompatInfo\Application\Polyfills) :

Ctype extension

Polyfill class name Description
SymfonyCtype This polyfill detects PHP native ctype_* functions to users who run php versions without the ctype extension

Available since release 6.4.0

Iconv extension

Polyfill class name Description
SymfonyIconv This polyfill detects PHP native iconv_* functions to users who run php versions without the iconv extension

Available since release 6.4.0

Mbstring extension

Polyfill class name Description
SymfonyMbstring This polyfill detects PHP native mb_* functions to users who run php versions without the mbstring extension

Available since release 6.4.0

PHP 7.0

Polyfill class name Description
SymfonyPhp70 This polyfill detects features unavailable in releases prior to PHP 7.0

Available since release 6.4.0

PHP 7.1

Polyfill class name Description
SymfonyPhp71 This polyfill detects features unavailable in releases prior to PHP 7.1

Available since release 6.4.0

PHP 7.2

Polyfill class name Description
SymfonyPhp72 This polyfill detects features unavailable in releases prior to PHP 7.2

Available since release 6.4.0

PHP 7.3

Polyfill class name Description
SymfonyPhp73 This polyfill detects features unavailable in releases prior to PHP 7.3

Available since release 6.4.0

PHP 7.4

Polyfill class name Description
SymfonyPhp74 This polyfill detects features unavailable in releases prior to PHP 7.4

Available since release 6.4.0

PHP 8.0

Polyfill class name Description
SymfonyPhp80 This polyfill detects features unavailable in releases prior to PHP 8.0

Available since release 6.4.0

PHP 8.1

Polyfill class name Description
SymfonyPhp81 This polyfill detects features unavailable in releases prior to PHP 8.1

Available since release 6.4.0

PHP 8.2

Polyfill class name Description
SymfonyPhp82 This polyfill detects features unavailable in releases prior to PHP 8.2

Available since release 6.5.0