Skip to content

Added docs for the missing Intl polyfills #11257

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions components/polyfill_intl_grapheme.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ Provided Functions

.. seealso::

The :doc:`polyfill-intl-icu </components/polyfill_intl_icu>` and
:doc:`polyfill-intl-normalizer </components/polyfill_intl_normalizer>`
components provide polyfills for other classes and functions related to the
Intl PHP extension.
Symfony provides more polyfills for other classes and functions related to
the Intl PHP extension:
:doc:`polyfill-intl-icu </components/polyfill_intl_icu>`,
:doc:`polyfill-intl-idn </components/polyfill_intl_idn>`,
:doc:`polyfill-intl-messageformatter </components/polyfill_intl_messageformatter>`,
and :doc:`polyfill-intl-normalizer </components/polyfill_intl_normalizer>`.

.. _`PHP intl extension`: https://secure.php.net/manual/en/book.intl.php
10 changes: 6 additions & 4 deletions components/polyfill_intl_icu.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ Provided Functions

.. seealso::

The :doc:`polyfill-intl-grapheme </components/polyfill_intl_grapheme>` and
:doc:`polyfill-intl-normalizer </components/polyfill_intl_normalizer>`
components provide polyfills for other classes and functions related to the
Intl PHP extension.
Symfony provides more polyfills for other classes and functions related to
the Intl PHP extension:
:doc:`polyfill-intl-grapheme </components/polyfill_intl_grapheme>`,
:doc:`polyfill-intl-idn </components/polyfill_intl_idn>`,
:doc:`polyfill-intl-messageformatter </components/polyfill_intl_messageformatter>`,
and :doc:`polyfill-intl-normalizer </components/polyfill_intl_normalizer>`.

.. _`PHP intl extension`: https://secure.php.net/manual/en/book.intl.php
45 changes: 45 additions & 0 deletions components/polyfill_intl_idn.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
.. index::
single: Polyfill
single: IDN
single: Components; Polyfill

The Symfony Polyfill / Intl IDN Component
=========================================

This component provides a collection of functions related to IDN when the
Intl extension is not installed.

Installation
------------

.. code-block:: terminal

$ composer require symfony/polyfill-intl-idn

Alternatively, you can clone the `<https://github.com/symfony/polyfill-intl-idn>`_ 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 intl extension`_ is installed or not in your
server.

Provided Functions
~~~~~~~~~~~~~~~~~~

* :phpfunction:`idn_to_ascii`
* :phpfunction:`idn_to_utf8`

.. seealso::

Symfony provides more polyfills for other classes and functions related to
the Intl PHP extension:
:doc:`polyfill-intl-grapheme </components/polyfill_intl_grapheme>`,
:doc:`polyfill-intl-icu </components/polyfill_intl_icu>`,
:doc:`polyfill-intl-messageformatter </components/polyfill_intl_messageformatter>`,
and :doc:`polyfill-intl-normalizer </components/polyfill_intl_normalizer>`.

.. _`PHP intl extension`: https://secure.php.net/manual/en/book.intl.php
50 changes: 50 additions & 0 deletions components/polyfill_intl_messageformatter.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
.. index::
single: Polyfill
single: MessageFormatter
single: Components; Polyfill

The Symfony Polyfill / Intl MessageFormatter Component
======================================================

This component provides a fallback implementation for the ``MessageFormatter``
class to users who run PHP versions without the ``intl`` extension.

Installation
------------

.. code-block:: terminal

$ composer require symfony/polyfill-intl-messageformatter

Alternatively, you can clone the `<https://github.com/symfony/polyfill-intl-messageformatter>`_ 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:`IntlException`
* :phpclass:`MessageFormatter`

Provided Functions
~~~~~~~~~~~~~~~~~~

* :phpfunction:`msgfmt_format_message`

.. seealso::

Symfony provides more polyfills for other classes and functions related to
the Intl PHP extension:
:doc:`polyfill-intl-grapheme </components/polyfill_intl_grapheme>`,
:doc:`polyfill-intl-idn </components/polyfill_intl_idn>`,
:doc:`polyfill-intl-icu </components/polyfill_intl_icu>`,
and :doc:`polyfill-intl-normalizer </components/polyfill_intl_normalizer>`.

.. _`PHP intl extension`: https://secure.php.net/manual/en/book.intl.php
9 changes: 6 additions & 3 deletions components/polyfill_intl_normalizer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,11 @@ Provided Functions

.. seealso::

The :doc:`polyfill-intl-grapheme </components/polyfill_intl_grapheme>` and
:doc:`polyfill-intl-icu </components/polyfill_intl_icu>` components provide
polyfills for other classes and functions related to the Intl PHP extension.
Symfony provides more polyfills for other classes and functions related to
the Intl PHP extension:
:doc:`polyfill-intl-grapheme </components/polyfill_intl_grapheme>`,
:doc:`polyfill-intl-idn </components/polyfill_intl_idn>`,
:doc:`polyfill-intl-icu </components/polyfill_intl_icu>`,
and :doc:`polyfill-intl-messageformatter </components/polyfill_intl_messageformatter>`.

.. _`PHP intl extension`: https://secure.php.net/manual/en/book.intl.php