8000 [FrameworkBundle] Allow to specify `null` for exception mapping configuration values by andrew-demb · Pull Request #46956 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[FrameworkBundle] Allow to specify null for exception mapping configuration values #46956

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 30, 2022

Conversation

andrew-demb
Copy link
Contributor
Q A
Branch? 5.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets
License MIT
Doc PR

null should be allowed because it is stated as allowed in the configuration info [1][2]
Marked as bugfix due to an existing mismatch between config description and behavior.

[1]

->scalarNode('log_level')
->info('The level of log message. Null to let Symfony decide.')

[2]
->scalarNode('status_code')
->info('The status code of the response. Null to let Symfony decide.')

@andrew-demb andrew-demb force-pushed the allow-omit-exception-mapping-value branch from ee0f479 to 26d12aa Compare July 28, 2022 10:00
@andrew-demb
Copy link
Contributor Author

Rebased on the latest 5.4 to resolve CI failures with doctrine deprecations

@carsonbot carsonbot changed the title Allow to specify null for exception mapping configuration values [FrameworkBundle] Allow to specify null for exception mapping configuration values Sep 28, 2022
@andrew-demb andrew-demb force-pushed the allow-omit-exception-mapping-value branch from 26d12aa to c1d5da3 Compare September 30, 2022 08:01
protected $exceptionsMapping;

/**
* @param array<class-string, array{log_level: string|null, status_code: int<100,599>|null}> $exceptionsMapping
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it welcome to explicitly specify typing for mapping structure in Symfony codebase for now?

Copy link
Member
@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good on my side, thanks.

@fabpot fabpot force-pushed the allow-omit-exception-mapping-value branch from bcd9033 to 1de8f3a Compare September 30, 2022 15:53
@fabpot
Copy link
Member
fabpot commented Sep 30, 2022

Thank you @andrew-demb.

@fabpot fabpot merged commit 2852cdb into symfony:5.4 Sep 30, 2022
@andrew-demb andrew-demb deleted the allow-omit-exception-mapping-value branch September 30, 2022 15:55
This was referenced Oct 12, 2022
@fabpot fabpot mentioned this pull request Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0