Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[HttpFoundation] Fix type of properties in Request class #51812

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
Oct 2, 2023

Conversation

nicolas-grekas
Copy link
Member

Q A
Branch? 6.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #51792
License MIT

Partially reverts #51121 where I didn't consider the behavior change reported in the linked issue.

@stof
Copy link
Member

stof commented Oct 2, 2023

@nicolas-grekas don't we have the same issue in TreeBuilder (and any other place using protected properties that are unset actually) ?

@nicolas-grekas
Copy link
Member Author

nicolas-grekas commented Oct 2, 2023

don't we have the same issue in TreeBuilder (and any other place using protected properties that are unset actually) ?

Correct, and fixed. I didn't find any other occurrence but I did change something in HttpClient because it made more sense to make the property nullable.

@fabpot
Copy link
Member

fabpot commented Oct 2, 2023

Thank you @nicolas-grekas.

@fabpot fabpot merged commit 1dcdb66 into symfony:6.4 Oct 2, 2023
@taylorotwell
Copy link
Contributor

Thanks all 👍 much appreciated.

@nicolas-grekas nicolas-grekas deleted the hf-fix-req branch October 2, 2023 22:17
fabpot added a commit that referenced this pull request Oct 10, 2023
…crynobone)

This PR was merged into the 6.4 branch.

Discussion
----------

[HttpFoundation] Fix type of properties in Request class

| Q             | A
| ------------- | ---
| Branch?       | 6.4
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #51792 <!-- prefix each issue number with "Fix #", no need to create an issue if none exists, explain below instead -->
| License       | MIT

Additional fixes to #51812

`static::$formats` can be `null` to allow lazy-loading:

https://github.com/symfony/symfony/blob/33fedcee2814947c59df2570952f8c800dfdb23e/src/Symfony/Component/HttpFoundation/Request.php#L1252-L1254

<!--
Replace this notice by a description of your feature/bugfix.
This will help reviewers and should be a good start for the documentation.

Additionally (see https://symfony.com/releases):
 - Always add tests and ensure they pass.
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against the latest branch.
 - For new features, provide some code snippets to help understand usage.
 - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry
 - Never break backward compatibility (see https://symfony.com/bc).
-->

Commits
-------

136044e [HttpFoundation] Fix type of properties in Request class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants