is backed by Les-Tilleuls.coop. Les-Tilleuls.coop is a staff of fifty+ Symfony consultants who can assist you design, develop and repair your initiatives. We offer a variety {of professional} companies together with improvement, consulting, teaching, coaching and audits. We are also extremely expert in JS, Go and DevOps. We’re a employee cooperative!
is backed by Sulu. Sulu is the CMS for Symfony builders. It gives pre-built content-management options whereas giving builders the liberty to construct, deploy, and keep {custom} options utilizing full-stack Symfony. Sulu is right for creating advanced web sites, integrating exterior instruments, and constructing custom-built options.
Symfony launched PHP enums help in Symfony 5.4, which was launched on
November 2021. In Symfony 6.2 we continued including Enums helps in numerous
elements of the code.
Along with holding service objects, the container additionally holds configuration,
known as service parameters. They help every kind of PHP varieties (integers,
booleans, arrays, strings, constants, and so forth.) In Symfony 6.2, when utilizing PHP to
configure companies, you’ll be able to embody Enum values in these parameters:
Contributed by
Nicolas Grekas
in #46771.
The earlier characteristic solely works when defining companies in PHP. That is why in
Symfony 6.2 we have additionally added help to reference PHP Enums in YAML information utilizing
the particular prefix !php/enum
.
The earlier instance appears as follows when utilizing YAML:
Contributed by
Jack Worman
in #46564.
The setting variable processors supplied by Symfony rework the env var
values (which may solely be strings) into other forms of values wanted by your
utility (booleans, PHP constants, JSON paperwork, and so forth.)
In Symfony 6.2 we’re including a brand new env(enum:...)
processor to show env vars
into PHP BackedEnum varieties. Think about that you’ve got this enum outlined in your challenge:
In your YAML, XML or PHP configuration, now you can use one thing like this:
The worth saved within the APP_ENV
env var could be a string like 'dev'
however
the appliance will use the AppEnvironment::Growth
enum worth.