Skip to content

Conversation

pocky
Copy link

@pocky pocky commented Jun 16, 2025

This PR improves the developer experience for writing recipes by allowing an array of strings for the content key in the add-lines configurator. First try was on symfony/flex#1034

To ensure 100% backward compatibility with all existing versions of symfony/flex, the implementation is twofold:

LintManifestsCommand: The linter is updated to validate and accept an array of strings for the content key. This allows the new, more readable format to be used in the source recipe repositories.

GenerateFlexEndpointCommand: During the generation of the public Flex endpoint, the command now automatically detects if content is an array and converts it back into a single, \n-separated string.

Recipe: https://github.com/MforMono/recipes/blob/main/friends-of-behat/mink-extension/2.4/manifest.json
Generated json: https://github.com/MforMono/recipes/blob/flex/main/friends-of-behat.mink-debug-extension.2.0.json

@pocky
Copy link
Author

pocky commented Jun 16, 2025

Ping @stof and @nicolas-grekas :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants