diff --git a/components/polyfill_apcu.rst b/components/polyfill_apcu.rst new file mode 100644 index 00000000000..b3b60e95566 --- /dev/null +++ b/components/polyfill_apcu.rst @@ -0,0 +1,52 @@ +.. index:: + single: Polyfill + single: APC + single: Components; Polyfill + +The Symfony Polyfill / APCu Component +===================================== + + This component provides ``apcu_*`` functions and the ``APCUIterator`` class + to users of the legacy APC extension. + +Installation +------------ + +.. code-block:: terminal + + $ composer require symfony/polyfill-apcu + +Alternatively, you can clone the ``_ repository. + +.. include:: /components/require_autoload.rst.inc + +Usage +----- + +Once this component is installed in your application, you can use the following +classes and functions, no matter if the `PHP APCu extension`_ is installed or +not in your server. The only requirement is to have installed at least the +`legacy APC extension`_. + +Provided Classes +~~~~~~~~~~~~~~~~ + +* :phpclass:`APCUIterator` + +Provided Functions +~~~~~~~~~~~~~~~~~~ + +* :phpfunction:`apcu_add` +* :phpfunction:`apcu_delete` +* :phpfunction:`apcu_exists` +* :phpfunction:`apcu_fetch` +* :phpfunction:`apcu_store` +* :phpfunction:`apcu_cache_info` +* :phpfunction:`apcu_cas` +* :phpfunction:`apcu_clear_cache` +* :phpfunction:`apcu_dec` +* :phpfunction:`apcu_inc` +* :phpfunction:`apcu_sma_info` + +.. _`PHP APCu extension`: https://secure.php.net/manual/en/book.apcu.php +.. _`legacy APC extension`: https://secure.php.net/manual/en/book.apc.php diff --git a/components/polyfill_ctype.rst b/components/polyfill_ctype.rst new file mode 100644 index 00000000000..c77af0bc874 --- /dev/null +++ b/components/polyfill_ctype.rst @@ -0,0 +1,45 @@ +.. index:: + single: Polyfill + single: Ctype + single: Components; Polyfill + +The Symfony Polyfill / Ctype Component +====================================== + + This component provides ``ctype_*`` functions to users who run PHP versions + without the ctype extension. + +Installation +------------ + +.. code-block:: terminal + + $ composer require symfony/polyfill-ctype + +Alternatively, you can clone the ``_ repository. + +.. include:: /components/require_autoload.rst.inc + +Usage +----- + +Once this component is installed in your application, you can use the following +functions, no matter if the `PHP Ctype extension`_ is installed or not in your +server. + +Provided Functions +~~~~~~~~~~~~~~~~~~ + +* :phpfunction:`ctype_alnum` +* :phpfunction:`ctype_alpha` +* :phpfunction:`ctype_cntrl` +* :phpfunction:`ctype_digit` +* :phpfunction:`ctype_graph` +* :phpfunction:`ctype_lower` +* :phpfunction:`ctype_print` +* :phpfunction:`ctype_punct` +* :phpfunction:`ctype_space` +* :phpfunction:`ctype_upper` +* :phpfunction:`ctype_xdigit` + +.. _`PHP Ctype extension`: https://secure.php.net/manual/en/book.ctype.php diff --git a/components/polyfill_iconv.rst b/components/polyfill_iconv.rst new file mode 100644 index 00000000000..56346186c60 --- /dev/null +++ b/components/polyfill_iconv.rst @@ -0,0 +1,61 @@ +.. index:: + single: Polyfill + single: Iconv + single: Components; Polyfill + +The Symfony Polyfill / Iconv Component +====================================== + + This component provides a native PHP implementation of the ``iconv_*`` + functions to users who run PHP versions without the ``iconv`` extension. + +Installation +------------ + +.. code-block:: terminal + + $ composer require symfony/polyfill-iconv + +Alternatively, you can clone the ``_ repository. + +.. include:: /components/require_autoload.rst.inc + +Usage +----- + +Once this component is installed in your application, you can use the following +constants and functions, no matter if the `PHP iconv extension`_ is installed or +not in your server. The only function not implemented in this component is +:phpfunction:`ob_iconv_handler`. + +Provided Constants +~~~~~~~~~~~~~~~~~~ + +* ``ICONV_IMPL`` (value = ``'Symfony'``) +* ``ICONV_VERSION`` (value = ``'1.0'``) +* ``ICONV_MIME_DECODE_STRICT`` (value = ``1``) +* ``ICONV_MIME_DECODE_CONTINUE_ON_ERROR`` (value = ``2``) + +Provided Functions +~~~~~~~~~~~~~~~~~~ + +These functions are always available: + +* :phpfunction:`iconv` +* :phpfunction:`iconv_get_encoding` +* :phpfunction:`iconv_set_encoding` +* :phpfunction:`iconv_mime_encode` +* :phpfunction:`iconv_mime_decode_headers` + +These functions are only available when the ``mbstring`` or the ``xml`` +extension are installed: + +* :phpfunction:`iconv_strlen` +* :phpfunction:`iconv_strpos` +* :phpfunction:`iconv_strrpos` +* :phpfunction:`iconv_substr` +* :phpfunction:`iconv_mime_decode` + +.. _`PHP iconv extension`: https://secure.php.net/manual/en/book.iconv.php +.. _`mbstring`: https://secure.php.net/manual/en/book.mbstring.php +.. _`xml`: https://secure.php.net/manual/en/book.xml.php diff --git a/components/polyfill_intl_grapheme.rst b/components/polyfill_intl_grapheme.rst new file mode 100644 index 00000000000..bad42f179fc --- /dev/null +++ b/components/polyfill_intl_grapheme.rst @@ -0,0 +1,58 @@ +.. index:: + single: Polyfill + single: Intl + single: Components; Polyfill + +The Symfony Polyfill / Intl Grapheme Component +============================================== + + This component provides a partial, native PHP implementation of the + ``grapheme_*`` functions to users who run PHP versions without the ``intl`` + extension. + +Installation +------------ + +.. code-block:: terminal + + $ composer require symfony/polyfill-intl-grapheme + +Alternatively, you can clone the ``_ repository. + +.. include:: /components/require_autoload.rst.inc + +Usage +----- + +Once this component is installed in your application, you can use the following +constants and functions, no matter if the `PHP intl extension`_ is installed or +not in your server. + +Provided Constants +~~~~~~~~~~~~~~~~~~ + +* ``GRAPHEME_EXTR_COUNT`` (value = ``0``) +* ``GRAPHEME_EXTR_MAXBYTES`` (value = ``1``) +* ``GRAPHEME_EXTR_MAXCHARS`` (value = ``2``) + +Provided Functions +~~~~~~~~~~~~~~~~~~ + +* :phpfunction:`grapheme_extract` +* :phpfunction:`grapheme_stripos` +* :phpfunction:`grapheme_stristr` +* :phpfunction:`grapheme_strlen` +* :phpfunction:`grapheme_strpos` +* :phpfunction:`grapheme_strripos` +* :phpfunction:`grapheme_strrpos` +* :phpfunction:`grapheme_strstr` +* :phpfunction:`grapheme_substr` + +.. seealso:: + + The :doc:`polyfill-intl-icu ` and + :doc:`polyfill-intl-normalizer ` + components provide polyfills for other classes and functions related to the + Intl PHP extension. + +.. _`PHP intl extension`: https://secure.php.net/manual/en/book.intl.php diff --git a/components/polyfill_intl_icu.rst b/components/polyfill_intl_icu.rst new file mode 100644 index 00000000000..4dc7c503afc --- /dev/null +++ b/components/polyfill_intl_icu.rst @@ -0,0 +1,54 @@ +.. index:: + single: Polyfill + single: ICU + single: Components; Polyfill + +The Symfony Polyfill / Intl ICU Component +========================================= + + This component provides a native PHP implementation of several Intl + functions and classes to users who run PHP versions without the ``intl`` + extension. + +Installation +------------ + +.. code-block:: terminal + + $ composer require symfony/polyfill-intl-icu + +Alternatively, you can clone the ``_ repository. + +.. include:: /components/require_autoload.rst.inc + +Usage +----- + +Once this component is installed in your application, you can use the following +classes and functions, no matter if the `PHP intl extension`_ is installed or +not in your server. + +Provided Classes +~~~~~~~~~~~~~~~~ + +* :phpclass:`Collator` +* :phpclass:`IntlDateFormatter` +* :phpclass:`Locale` +* :phpclass:`NumberFormatter` + +Provided Functions +~~~~~~~~~~~~~~~~~~ + +* :phpfunction:`intl_error_name` +* :phpfunction:`intl_get_error_code` +* :phpfunction:`intl_get_error_message` +* :phpfunction:`intl_is_failure` + +.. seealso:: + + The :doc:`polyfill-intl-grapheme ` and + :doc:`polyfill-intl-normalizer ` + components provide polyfills for other classes and functions related to the + Intl PHP extension. + +.. _`PHP intl extension`: https://secure.php.net/manual/en/book.intl.php diff --git a/components/polyfill_intl_normalizer.rst b/components/polyfill_intl_normalizer.rst new file mode 100644 index 00000000000..4604f29a259 --- /dev/null +++ b/components/polyfill_intl_normalizer.rst @@ -0,0 +1,47 @@ +.. index:: + single: Polyfill + single: Normalizer + single: Components; Polyfill + +The Symfony Polyfill / Intl Normalizer Component +================================================ + + This component provides a fallback implementation for the ``Normalizer`` + class to users who run PHP versions without the ``intl`` extension. + +Installation +------------ + +.. code-block:: terminal + + $ composer require symfony/polyfill-intl-normalizer + +Alternatively, you can clone the ``_ repository. + +.. include:: /components/require_autoload.rst.inc + +Usage +----- + +Once this component is installed in your application, you can use the following +classes and functions, no matter if the `PHP intl extension`_ is installed or +not in your server. + +Provided Classes +~~~~~~~~~~~~~~~~ + +* :phpclass:`Normalizer` + +Provided Functions +~~~~~~~~~~~~~~~~~~ + +* :phpfunction:`normalizer_is_normalized` +* :phpfunction:`normalizer_normalize` + +.. seealso:: + + The :doc:`polyfill-intl-grapheme ` and + :doc:`polyfill-intl-icu ` components provide + polyfills for other classes and functions related to the Intl PHP extension. + +.. _`PHP intl extension`: https://secure.php.net/manual/en/book.intl.php diff --git a/components/polyfill_mbstring.rst b/components/polyfill_mbstring.rst new file mode 100644 index 00000000000..17d4f0c7928 --- /dev/null +++ b/components/polyfill_mbstring.rst @@ -0,0 +1,78 @@ +.. index:: + single: Polyfill + single: Mbstring + single: Components; Polyfill + +The Symfony Polyfill / Intl Mbstring Component +============================================== + + This component provides a partial, native PHP implementation for the + ``mbstring`` PHP extension. + +Installation +------------ + +.. code-block:: terminal + + $ composer require symfony/polyfill-mbstring + +Alternatively, you can clone the ``_ repository. + +.. include:: /components/require_autoload.rst.inc + +Usage +----- + +Once this component is installed in your application, you can use the following +constants and functions, no matter if the `PHP mbstring extension`_ is installed +or not in your server. + +Provided Constants +~~~~~~~~~~~~~~~~~~ + +* ``MB_CASE_UPPER`` (value = ``0``) +* ``MB_CASE_LOWER`` (value = ``1``) +* ``MB_CASE_TITLE`` (value = ``2``) + +Provided Functions +~~~~~~~~~~~~~~~~~~ + +* :phpfunction:`mb_check_encoding` +* :phpfunction:`mb_chr` +* :phpfunction:`mb_convert_case` +* :phpfunction:`mb_convert_encoding` +* :phpfunction:`mb_convert_variables` +* :phpfunction:`mb_decode_mimeheader` +* :phpfunction:`mb_decode_numericentity` +* :phpfunction:`mb_detect_encoding` +* :phpfunction:`mb_detect_order` +* :phpfunction:`mb_encode_mimeheader` +* :phpfunction:`mb_encode_numericentity` +* :phpfunction:`mb_encoding_aliases` +* :phpfunction:`mb_get_info` +* :phpfunction:`mb_http_input` +* :phpfunction:`mb_http_output` +* :phpfunction:`mb_internal_encoding` +* :phpfunction:`mb_language` +* :phpfunction:`mb_list_encodings` +* :phpfunction:`mb_ord` +* :phpfunction:`mb_output_handler` +* :phpfunction:`mb_parse_str` +* :phpfunction:`mb_scrub` +* :phpfunction:`mb_stripos` +* :phpfunction:`mb_stristr` +* :phpfunction:`mb_strlen` +* :phpfunction:`mb_strpos` +* :phpfunction:`mb_strrchr` +* :phpfunction:`mb_strrichr` +* :phpfunction:`mb_strripos` +* :phpfunction:`mb_strrpos` +* :phpfunction:`mb_strstr` +* :phpfunction:`mb_strtolower` +* :phpfunction:`mb_strtoupper` +* :phpfunction:`mb_strwidth` +* :phpfunction:`mb_substitute_character` +* :phpfunction:`mb_substr_count` +* :phpfunction:`mb_substr` + +.. _`PHP mbstring extension`: https://secure.php.net/manual/en/book.mbstring.php diff --git a/components/polyfill_php54.rst b/components/polyfill_php54.rst new file mode 100644 index 00000000000..e32a00f6f62 --- /dev/null +++ b/components/polyfill_php54.rst @@ -0,0 +1,35 @@ +.. index:: + single: Polyfill + single: PHP + single: Components; Polyfill + +The Symfony Polyfill / PHP 5.4 Component +======================================== + + This component provides some PHP 5.4 features to applications using earlier + PHP versions. + +Installation +------------ + +.. code-block:: terminal + + $ composer require symfony/polyfill-php54 + +Alternatively, you can clone the ``_ repository. + +.. include:: /components/require_autoload.rst.inc + +Usage +----- + +Once this component is installed in your application, you can use the following +functions, no matter if your PHP version is earlier than PHP 5.4. + +Provided Functions +~~~~~~~~~~~~~~~~~~ + +* :phpfunction:`class_uses` +* :phpfunction:`hex2bin` +* :phpfunction:`session_register_shutdown` +* :phpfunction:`trait_exists` diff --git a/components/polyfill_php55.rst b/components/polyfill_php55.rst new file mode 100644 index 00000000000..9ac1577dea1 --- /dev/null +++ b/components/polyfill_php55.rst @@ -0,0 +1,39 @@ +.. index:: + single: Polyfill + single: PHP + single: Components; Polyfill + +The Symfony Polyfill / PHP 5.5 Component +======================================== + + This component provides some PHP 5.5 features to applications using earlier + PHP versions. + +Installation +------------ + +.. code-block:: terminal + + $ composer require symfony/polyfill-php55 + +Alternatively, you can clone the ``_ repository. + +.. include:: /components/require_autoload.rst.inc + +Usage +----- + +Once this component is installed in your application, you can use the following +functions, no matter if your PHP version is earlier than PHP 5.5. + +Provided Functions +~~~~~~~~~~~~~~~~~~ + +* :phpfunction:`array_column` +* :phpfunction:`boolval` +* :phpfunction:`hash_pbkdf2` +* :phpfunction:`json_last_error_msg` +* :phpfunction:`password_get_info` +* :phpfunction:`password_hash` +* :phpfunction:`password_needs_rehash` +* :phpfunction:`password_verify` diff --git a/components/polyfill_php56.rst b/components/polyfill_php56.rst new file mode 100644 index 00000000000..44b8f69598b --- /dev/null +++ b/components/polyfill_php56.rst @@ -0,0 +1,39 @@ +.. index:: + single: Polyfill + single: PHP + single: Components; Polyfill + +The Symfony Polyfill / PHP 5.6 Component +======================================== + + This component provides some PHP 5.6 features to applications using earlier + PHP versions. + +Installation +------------ + +.. code-block:: terminal + + $ composer require symfony/polyfill-php56 + +Alternatively, you can clone the ``_ repository. + +.. include:: /components/require_autoload.rst.inc + +Usage +----- + +Once this component is installed in your application, you can use the following +constants and functions, no matter if your PHP version is earlier than PHP 5.6. + +Provided Constants +~~~~~~~~~~~~~~~~~~ + +* ``LDAP_ESCAPE_FILTER`` (value = ``1``) +* ``LDAP_ESCAPE_DN`` (value = ``2``) + +Provided Functions +~~~~~~~~~~~~~~~~~~ + +* :phpfunction:`hash_equals` +* :phpfunction:`ldap_escape` diff --git a/components/polyfill_php70.rst b/components/polyfill_php70.rst new file mode 100644 index 00000000000..e95ada92dcc --- /dev/null +++ b/components/polyfill_php70.rst @@ -0,0 +1,53 @@ +.. index:: + single: Polyfill + single: PHP + single: Components; Polyfill + +The Symfony Polyfill / PHP 7.0 Component +======================================== + + This component provides some PHP 7.0 features to applications using earlier + PHP versions. + +Installation +------------ + +.. code-block:: terminal + + $ composer require symfony/polyfill-php70 + +Alternatively, you can clone the ``_ repository. + +.. include:: /components/require_autoload.rst.inc + +Usage +----- + +Once this component is installed in your application, you can use the following +constants, classes and functions, no matter if your PHP version is earlier than +PHP 7.0. + +Provided Constants +~~~~~~~~~~~~~~~~~~ + +* ``PHP_INT_MIN`` (value = ``~PHP_INT_MAX``) + +Provided Classes +~~~~~~~~~~~~~~~~ + +* :phpclass:`ArithmeticError` +* :phpclass:`AssertionError` +* :phpclass:`DivisionByZeroError` +* :phpclass:`Error` +* :phpclass:`ParseError` +* :phpclass:`SessionUpdateTimestampHandlerInterface` +* :phpclass:`TypeError` + +Provided Functions +~~~~~~~~~~~~~~~~~~ + +* :phpfunction:`error_clear_last` +* :phpfunction:`intdiv` +* :phpfunction:`preg_replace_callback_array` +* :phpfunction:`random_bytes` +* :phpfunction:`random_int` diff --git a/components/polyfill_php71.rst b/components/polyfill_php71.rst new file mode 100644 index 00000000000..6e7f116403e --- /dev/null +++ b/components/polyfill_php71.rst @@ -0,0 +1,32 @@ +.. index:: + single: Polyfill + single: PHP + single: Components; Polyfill + +The Symfony Polyfill / PHP 7.1 Component +======================================== + + This component provides some PHP 7.1 features to applications using earlier + PHP versions. + +Installation +------------ + +.. code-block:: terminal + + $ composer require symfony/polyfill-php71 + +Alternatively, you can clone the ``_ repository. + +.. include:: /components/require_autoload.rst.inc + +Usage +----- + +Once this component is installed in your application, you can use the following +functions, no matter if your PHP version is earlier than PHP 7.1. + +Provided Functions +~~~~~~~~~~~~~~~~~~ + +* :phpfunction:`is_iterable` diff --git a/components/polyfill_php72.rst b/components/polyfill_php72.rst new file mode 100644 index 00000000000..b3c6c86198e --- /dev/null +++ b/components/polyfill_php72.rst @@ -0,0 +1,41 @@ +.. index:: + single: Polyfill + single: PHP + single: Components; Polyfill + +The Symfony Polyfill / PHP 7.2 Component +======================================== + + This component provides some PHP 7.2 features to applications using earlier + PHP versions. + +Installation +------------ + +.. code-block:: terminal + + $ composer require symfony/polyfill-php72 + +Alternatively, you can clone the ``_ repository. + +.. include:: /components/require_autoload.rst.inc + +Usage +----- + +Once this component is installed in your application, you can use the following +constants and functions, no matter if your PHP version is earlier than PHP 7.2. + +Provided Constants +~~~~~~~~~~~~~~~~~~ + +* ``PHP_OS_FAMILY`` (value = depends on your operating system) + +Provided Functions +~~~~~~~~~~~~~~~~~~ + +* :phpfunction:`sapi_windows_vt100_support` (only on Windows systems) +* :phpfunction:`spl_object_id` +* :phpfunction:`stream_isatty` +* :phpfunction:`utf8_decode` +* :phpfunction:`utf8_encode` diff --git a/components/polyfill_php73.rst b/components/polyfill_php73.rst new file mode 100644 index 00000000000..c8969b9ff5e --- /dev/null +++ b/components/polyfill_php73.rst @@ -0,0 +1,32 @@ +.. index:: + single: Polyfill + single: PHP + single: Components; Polyfill + +The Symfony Polyfill / PHP 7.3 Component +======================================== + + This component provides some PHP 7.3 features to applications using earlier + PHP versions. + +Installation +------------ + +.. code-block:: terminal + + $ composer require symfony/polyfill-php73 + +Alternatively, you can clone the ``_ repository. + +.. include:: /components/require_autoload.rst.inc + +Usage +----- + +Once this component is installed in your application, you can use the following +functions, no matter if your PHP version is earlier than PHP 7.3. + +Provided Functions +~~~~~~~~~~~~~~~~~~ + +* :phpfunction:`is_countable`