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 4y | Sep 23, 2021, 4:20:24 PM


Login to add comment

Other posts in this group

New in Symfony 7.3: Invokable Commands and Input Attributes

This is the first article in a series showcasing the most important new features introduced by Symfony 7.3, which will be released at the end of May 2025.

Apr 22, 2025, 9:10:36 AM | Symfony
A Week of Symfony #955 (April 14–20, 2025)

This week, the upcoming Symfony 7.3 version improved the AsAlias attribute by adding a new argument, introduced Clock support for UriSigner, and refined the return type of the ContainerInterface::get(

Apr 20, 2025, 8:30:06 AM | Symfony
SymfonyOnline June 2025: Rethinking File Handling in Symfony

SymfonyOnline June 2025 is almost here, starting in almost 2 months on:

June 10-11: Workshop days. It is possible to attend 1 two-day training or 2 one-day trainings. June 12-13: Online confe

Apr 16, 2025, 4:30:02 PM | Symfony
SymfonyLive Paris 2025: Recap and replay!

SymfonyLive Paris 2025 took place three weeks ago — a big thank you to everyone who joined us! The conference was held entirely in French, and now you can relive the best moments: replays, hig

Apr 15, 2025, 2:50:24 PM | Symfony
A Week of Symfony #954 (April 7–13, 2025)

This week, Symfony 7.3 entered its "feature freeze" period in preparation for its release at the end of May 2025. Development activity focused on refining and polishing its new features, including a n

Apr 13, 2025, 9:40:02 AM | Symfony
SymfonyOnline June 2025: What's New in Symfony 7.3

SymfonyOnline June 2025 is almost here, starting in almost 2 months on:

June 10-11: Workshop days. It is possible to attend 1 two-day training or 2 one-day trainings. June 12-13: Online confe

Apr 10, 2025, 4:40:34 PM | Symfony
SymfonyCon Amsterdam 2025: Last days to enjoy early bird tickets!

The international Symfony conference of the year, SymfonyCon Amsterdam 2025, will take place in the Netherlands on November 27 & 28, 2025!

⏳ Early bird registration ends this Wednesday! D

Apr 8, 2025, 9:10:13 AM | Symfony