Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[HttpKernel] Add support for custom HTTP status code for the#[MapQueryParameter] attribute#53209

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
nicolas-grekas merged 1 commit intosymfony:7.1fromovidiuenache:fix_52782
Jan 2, 2024

Conversation

@ovidiuenache
Copy link
Contributor

@ovidiuenacheovidiuenache commentedDec 25, 2023
edited
Loading

QA
Branch?7.1
Bug fix?no
New feature?yes
Deprecations?no
Issues#52782
LicenseMIT

Issue#52782 was created where the need to have a custom HTTP status code for the MapQueryParameter attribute was stated. As part of the discussion,@nicolas-grekas suggested an approach similar to the implementation of the MapQueryString attribute where such a status code can be provided in the attribute's constructor.

I believe having the possibility to control the status code returned for an invalid and non-nullable parameter with no default value would be a great addition so I took the liberty to create this PR.

This change is backward compatible.

@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has acontribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (seehttps://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (seehttps://symfony.com/releases)
  • Features and deprecations must be submitted against the 7.1 branch.

Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change.

When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@ovidiuenacheovidiuenache changed the base branch from6.4 to7.1December 26, 2023 16:42
@OskarStarkOskarStark changed the title[HttpKernel] Add support for custom HTTP status code for the MapQueryParameter attribute[HttpKernel] Add support for custom HTTP status code for the `#[MapQueryParameter] attributeDec 26, 2023
@OskarStarkOskarStark modified the milestones:6.4,7.1Dec 26, 2023
@OskarStarkOskarStark changed the title[HttpKernel] Add support for custom HTTP status code for the `#[MapQueryParameter] attribute[HttpKernel] Add support for custom HTTP status code for the#[MapQueryParameter] attributeDec 26, 2023
nicolas-grekas added a commit that referenced this pull requestDec 27, 2023
…colas-grekas)This PR was merged into the 7.1 branch.Discussion----------[HttpKernel] Add `HttpException::fromStatusCode()`| Q             | A| ------------- | ---| Branch?       | 7.1| Bug fix?      | no| New feature?  | yes| Deprecations? | no| Issues        | -| License       | MITA small helper idea that popped up when reviewing#53209Commits-------98f4fa1 [HttpKernel] Add `HttpException::fromStatusCode()`
Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

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

LGTM with one minor comment.

@nicolas-grekas
Copy link
Member

Thank you@ovidiuenache.

ovidiuenache reacted with thumbs up emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@OskarStarkOskarStarkOskarStark approved these changes

@xabbuhxabbuhAwaiting requested review from xabbuh

@lyrixxlyrixxAwaiting requested review from lyrixx

@dunglasdunglasAwaiting requested review from dunglas

@ycerutoycerutoAwaiting requested review from yceruto

@welcoMatticwelcoMatticAwaiting requested review from welcoMattic

@kbondkbondAwaiting requested review from kbond

@chalasrchalasrAwaiting requested review from chalasr

@jderussejderusseAwaiting requested review from jderusse

Assignees

No one assigned

Projects

None yet

Milestone

7.1

Development

Successfully merging this pull request may close these issues.

4 participants

@ovidiuenache@carsonbot@nicolas-grekas@OskarStark

[8]ページ先頭

©2009-2025 Movatter.jp