Fix typo, invalid definition and add missing condition to check - #514
Merged
Merged
Conversation
HypeMC
commented
Aug 30, 2025
Comment on lines
-758
to
+762
| $hub = new Definition( | ||
| $hubId = \sprintf('monolog.handler.%s.hub', $name); | ||
| $hub = $container->setDefinition($hubId, new Definition( | ||
| 'Sentry\\State\\Hub', | ||
| [new Reference($clientId)] | ||
| ); | ||
| $container->setDefinition(\sprintf('monolog.handler.%s.hub', $name), $hub); | ||
| )); |
Member
Author
There was a problem hiding this comment.
This never worked correctly. The monolog.handler.%s.hub service was registered but never actually used. Instead, the entire definition was passed as an argument, resulting in the creation of two separate services: the unused monolog.handler.%s.hub service and an anonymous service that was passed to the handler.
HypeMC
commented
Aug 30, 2025
Comment on lines
-20
to
+29
| "symfony/monolog-bridge": "^5.4 || ^6.0 || ^7.0", | ||
| "symfony/dependency-injection": "^5.4 || ^6.0 || ^7.0", | ||
| "monolog/monolog": "^1.25.1 || ^2.0 || ^3.0", | ||
| "symfony/config": "^5.4 || ^6.0 || ^7.0", | ||
| "symfony/dependency-injection": "^5.4 || ^6.0 || ^7.0", | ||
| "symfony/http-kernel": "^5.4 || ^6.0 || ^7.0", | ||
| "monolog/monolog": "^1.25.1 || ^2.0 || ^3.0" | ||
| "symfony/monolog-bridge": "^5.4 || ^6.0 || ^7.0" | ||
| }, | ||
| "require-dev": { | ||
| "symfony/yaml": "^5.4 || ^6.0 || ^7.0", | ||
| "symfony/console": "^5.4 || ^6.0 || ^7.0", | ||
| "symfony/phpunit-bridge": "^7.1" | ||
| "symfony/phpunit-bridge": "^7.1", | ||
| "symfony/yaml": "^5.4 || ^6.0 || ^7.0" |
Member
Author
There was a problem hiding this comment.
Not really an issue, but I figure it can't hurt to have the dependencies sorted.
GromNaN
reviewed
Aug 30, 2025
| ->scalarNode('buffer_size')->defaultValue(0)->end() // fingers_crossed and buffer | ||
| ->booleanNode('flush_on_overflow')->defaultFalse()->end() // buffer | ||
| ->scalarNode('handler')->end() // fingers_crossed and buffer | ||
| ->scalarNode('handler')->end() // fingers_crossed, buffer, filter, deduplication, sampling |
Member
There was a problem hiding this comment.
Note for a future improvement, the info() method can be used to make this details more accessible.
Comment on lines
-758
to
+762
| $hub = new Definition( | ||
| $hubId = \sprintf('monolog.handler.%s.hub', $name); | ||
| $hub = $container->setDefinition($hubId, new Definition( | ||
| 'Sentry\\State\\Hub', | ||
| [new Reference($clientId)] | ||
| ); | ||
| $container->setDefinition(\sprintf('monolog.handler.%s.hub', $name), $hub); | ||
| )); |
GromNaN
approved these changes
Sep 5, 2025
Member
|
Thank you @HypeMC. |
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.
A few minor issues I noticed while working on some other PRs.