Fix Symfony Flex not registering the bundle - #78
Merged
Merged
Conversation
Without a recipe, Flex registers the bundle class it finds under the name `<Vendor><Package>Bundle` (`BrefSymfonyBridgeBundle`), whatever the package type, and ignores `extra.symfony.bundles`. `BrefBundle` was never registered, so the CloudWatch log formatter was never enabled on new applications. `BrefBundle` stays as a deprecated alias for applications that registered it. Claude-Session: https://claude.ai/code/session_0168N55uBK9UjfpL6r8oGjDm
This was referenced Sep 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BrefBundleenables Bref's CloudWatch log formatter on all Monolog handlers (#73), but the config that was supposed to register it didn't work.Why: the Flex configuration was invalid, and without one Flex auto-registers the bundle class it can guess from the PSR-4 namespace: for
Bref\SymfonyBridge\it looks forSymfonyBridgeBundleorBrefSymfonyBridgeBundle(Symfony's<Vendor><Package>Bundleconvention), whatever the package type.This renames the bundle to
BrefSymfonyBridgeBundle, keepsBrefBundleas a deprecated subclass for applications that registered it by hand, and removes theextrakey.Existing applications: nothing changes for them, and nothing breaks. Flex only applies recipes when a package is installed, so updating the bridge leaves
config/bundles.phpuntouched: their logs keep the format they have today, and applications that registeredBrefBundleby hand keep working. To get Bref's log format (and the request ID), they should add this line: