8000 Update `framework.exceptions` XML and PHP configuration examples by MatTheCat · Pull Request #17455 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Update framework.exceptions XML and PHP configuration examples #17455

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
Jan 11, 2023

Conversation

MatTheCat
Copy link
Contributor
@MatTheCat MatTheCat commented Nov 22, 2022

@carsonbot carsonbot added this to the 5.4 milestone Nov 22, 2022
@MatTheCat MatTheCat force-pushed the framework-exceptions-config branch from a540745 to 6527016 Compare November 22, 2022 09:13
@OskarStark OskarStark added the Waiting Code Merge Docs for features pending to be merged label Nov 22, 2022
@carsonbot carsonbot modified the milestones: 5.4, next Nov 22, 2022
@MatTheCat MatTheCat force-pushed the framework-exceptions-config branch from 6527016 to 246b741 Compare December 4, 2022 21:20
@MatTheCat MatTheCat changed the title Fix framework.exceptions XML and PHP configuration examples Update framework.exceptions XML and PHP configuration examples Dec 5, 2022
nicolas-grekas added a commit to symfony/symfony that referenced this pull request Dec 13, 2022
… with a config builder (MatTheCat)

This PR was squashed before being merged into the 5.4 branch.

Discussion
----------

[FrameworkBundle] Allow configuring `framework.exceptions` with a config builder

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #48191
| License       | MIT
| Doc PR        | symfony/symfony-docs#17455

It seems the `framework.exceptions` definition has been wrongly configured for XML. As a result it is not possible to set its value using a config builder.

This pull request adds a “right” way to configure `framework.exceptions` using XML. The old one should be deprecated for `6.3` and removed for `7.0`.

[The documentation](https://symfony.com/doc/current/reference/configuration/framework.html#exceptions) is also wrong and should be fixed (ideally after this pull request is merged).

Guidance is requested to add a test (current failures unrelated) 🙏

Commits
-------

57e28f6 [FrameworkBundle] Allow configuring `framework.exceptions` with a config builder
symfony-splitter pushed a commit to symfony/framework-bundle that referenced this pull request Dec 13, 2022
… with a config builder (MatTheCat)

This PR was squashed before being merged into the 5.4 branch.

Discussion
----------
8000


[FrameworkBundle] Allow configuring `framework.exceptions` with a config builder

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #48191
| License       | MIT
| Doc PR        | symfony/symfony-docs#17455

It seems the `framework.exceptions` definition has been wrongly configured for XML. As a result it is not possible to set its value using a config builder.

This pull request adds a “right” way to configure `framework.exceptions` using XML. The old one should be deprecated for `6.3` and removed for `7.0`.

[The documentation](https://symfony.com/doc/current/reference/configuration/framework.html#exceptions) is also wrong and should be fixed (ideally after this pull request is merged).

Guidance is requested to add a test (current failures unrelated) 🙏

Commits
-------

57e28f6bda [FrameworkBundle] Allow configuring `framework.exceptions` with a config builder
->status_code(422);
$framework->exception(BadRequestHttpException::class)
->logLevel('debug')
->statusCode(422)
;
};

Copy link
Contributor

Choose a reason for hiding this comment

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

Deprecated directive for version 6.3 is missing. Can you add it?

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 that really necessary since the deprecated format was never documented?

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree, it is not necessary

@OskarStark OskarStark removed the Waiting Code Merge Docs for features pending to be merged label Jan 11, 2023
@OskarStark
Copy link
Contributor

Thanks Mathieu.

@OskarStark OskarStark merged commit 8b8cf56 into symfony:5.4 Jan 11, 2023
@MatTheCat MatTheCat deleted the framework-exceptions-config branch February 8, 2023 19:03
symfony-splitter pushed a commit to symfony/framework-bundle that referenced this pull request Jul 28, 2023
… with a config builder (MatTheCat)

This PR was squashed before being merged into the 5.4 branch.

Discussion
----------

[FrameworkBundle] Allow configuring `framework.exceptions` with a config builder

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #48191
| License       | MIT
| Doc PR        | symfony/symfony-docs#17455

It seems the `framework.exceptions` definition has been wrongly configured for XML. As a result it is not possible to set its value using a config builder.

This pull request adds a “right” way to configure `framework.exceptions` using XML. The old one should be deprecated for `6.3` and removed for `7.0`.

[The documentation](https://symfony.com/doc/current/reference/configuration/framework.html#exceptions) is also wrong and should be fixed (ideally after this pull request is merged).

Guidance is requested to add a test (current failures unrelated) 🙏

Commits
-------

57e28f6bda [FrameworkBundle] Allow configuring `framework.exceptions` with a config builder
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