Fabien Potencier 2a52ec2596 minor #4690 Improve documentation examples for enum and enum_cases (Kocal)
This PR was merged into the 3.x branch.

Discussion
----------

Improve documentation examples for `enum` and `enum_cases`

It may be obvious, but I first thought initializing an BackendEnum with a specific value could be possible with `enum(FQCN, value)`, but it does not, it always returns the first case  instance (if exists).

Instead, `enum(FQCN).from(value)` must be used, and I think it's worth to improve `enum()` examples.

Commits
-------

def4abbd5e Improve documentation examples for `enum` and `enum_cases`
2025-09-15 07:46:50 +02:00
2025-07-29 09:57:34 +02:00
2025-07-29 10:07:07 +02:00
2025-07-29 10:07:07 +02:00
2025-02-14 08:38:53 +01:00
2025-07-29 10:07:07 +02:00
2025-05-03 09:23:07 +02:00
2025-01-31 21:45:36 +01:00
2023-02-08 08:44:48 +01:00
2024-11-20 20:05:33 +01:00
2024-09-03 10:17:14 +02:00
2023-12-09 12:45:27 +01:00

Twig, the flexible, fast, and secure template language for PHP
==============================================================

Twig is a template language for PHP.

Twig uses a syntax similar to the Django and Jinja template languages which
inspired the Twig runtime environment.

Sponsors
--------

.. raw:: html

    <a href="https://docs.blackfire.io/introduction?utm_source=twig&utm_medium=github_readme&utm_campaign=logo">
        <img src="https://static.blackfire.io/assets/intemporals/logo/png/blackfire-io_secondary_horizontal_transparent.png?1" width="255px" alt="Blackfire.io">
    </a>

More Information
----------------

Read the `documentation`_ for more information.

.. _documentation: https://twig.symfony.com/documentation
Languages
PHP 99.9%