Symfony Flex is Going Serverless

Symfony Flex was introduced in 2017 as one of the key parts of the reimagined Symfony experience for the Symfony 4 launch. Symfony Flex is a tool (technically, a Composer plugin) that simplifies the installation/removal of packages in Symfony applications. This simplification is made possible thanks to "Flex recipes", which are a set of automated instructions that tell Symfony how to install, enable and configure packages into applications. These recipes are currently stored in two public GitHub repositories: main recipes repository and contrib recipes repository. The final piece that makes Flex possible is the Flex server at https://flex.symfony.com. In addition to showing the available recipes/packages in a web interface, this server communicates with the Flex Composer plugin to serve recipes.

Going Serverless As part of our continuous efforts to simplify operations, we recently asked ourselves: how could we simplify the Flex server infrastructure? Then we thought: what if we remove the Flex server entirely? And that's exactly what we're going to do. In the pull request #803 of the Symfony Flex package you can see that we're going to replace the proprietary flex.symfony.com endpoint by a new endpoint made of static JSON files hosted on GitHub. The JSON files are stored in this repository and are generated by GitHub Actions using this script thanks to a custom recipe checker tool. The existing Flex server endpoint will keep working for some time as a legacy service for applications that haven't been updated yet.

Using the New Endpoints Version 1.16 of symfony/flex has been released with support for the new endpoints, but they are behind a feature flag for now: you need to set the FLEX_SERVERLESS env var to 1 to enable the new endpoints. Please help us confirm that everything works as expected by enabling this feature flag. In a few weeks, version 1.17 will remove the feature flag and the new endpoints will be used by default. All users of legacy versions of symfony/flex will then see a warning inviting them to upgrade.

Custom Recipes A very nice side effect of this change is that you can quite easily host custom recipes in your own repositories. If you do so, add the URL of your recipe repository in the extra.symfony.endpoint config option of composer.json or in the SYMFONY_ENDPOINT env var. Moreover, now that the proprietary server is gone, you can add your own features on top of the Symfony Flex API. We're looking forward to learn about your ideas. Some of them could even be contributed back to the official Flex API.

                Sponsor the Symfony project.

http://feedproxy.google.com/~r/symfony/blog/~3/lahkEGNBPLs/symfony-flex-is-going-serverless

Created 3y | Sep 23, 2021, 4:20:24 PM


Login to add comment

Other posts in this group

Symfony 2024 Year in Review

This blog post highlights the key accomplishments of the Symfony project in 2024. We are grateful for your continuous support, which enabled the Symfony project to achieve a remarkable year.

Releases

Jan 7, 2025, 1:40:05 PM | Symfony
A Week of Symfony #940 (30 December 2024 - 5 January 2025)

This week, Symfony 6.4.17, 7.1.10 and 7.2.2 maintenance versions were released. In addition, we published more information about the upcoming SymfonyOnline January 2025 conference.

Symfony developmen

Jan 5, 2025, 10:30:12 AM | Symfony
SymfonyOnline January 2025: Join us in 2 weeks!

Get ready for the exciting SymfonyOnline January 2025, kicking off shortly on January 16-17! There’s still time to register and join the international online Symfony conference—along with pre-

Jan 2, 2025, 12:50:08 PM | Symfony
Symfony 6.4.17 released

Symfony 6.4.17 has just been released. Here is the list of the most important changes since 6.4.16:

bug #59304 [PropertyInfo] Remove @internal from PropertyReadInfo and PropertyWriteInfo (Dario G
Dec 31, 2024, 4:50:11 PM | Symfony
Symfony 7.1.10 released

Symfony 7.1.10 has just been released. Here is the list of the most important changes since 7.1.9:

bug #59304 [PropertyInfo] Remove @internal from PropertyReadInfo and PropertyWriteInfo (Dario Gu
Dec 31, 2024, 4:50:10 PM | Symfony
Symfony 7.2.2 released

Symfony 7.2.2 has just been released. Here is the list of the most important changes since 7.2.1:

bug #59304 [PropertyInfo] Remove @internal from PropertyReadInfo and PropertyWriteInfo (Dario Gua
Dec 31, 2024, 4:50:10 PM | Symfony
A Week of Symfony #939 (23-29 December 2024)

This week, we launched the new Twig playground, a tool that lets you test and experiment with Twig features in a safe, sandboxed environment. While Symfony development activity was lighter than usual

Dec 29, 2024, 11:30:09 AM | Symfony