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

[HttpFoundation] Revert getClientIp @return docblock#32682

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
fabpot merged 1 commit intosymfony:3.4fromossinkine:client-ip-not-null
Aug 4, 2019

Conversation

@ossinkine
Copy link
Contributor

QA
Branch?3.4
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
LicenseMIT

This PR reverts#22418, see the comment#22418 (comment)

@ossinkineossinkine changed the base branch from4.4 to3.4July 23, 2019 14:09
@nicolas-grekasnicolas-grekas added this to the3.4 milestoneJul 23, 2019
@nicolas-grekas
Copy link
Member

nicolas-grekas commentedJul 25, 2019
edited
Loading

I just tried running this and it returnednull, with no "undefined" notice:

$r =newRequest();var_dump($r->getClientIp());

@ossinkine
Copy link
ContributorAuthor

I think the docblock contains a type that must be, but not one that can be.
There is a lot of not null fields in Request class which will be null afternew Request().

@ostrolucky
Copy link
Contributor

No, docblock must specify type it returns

@ossinkine
Copy link
ContributorAuthor

But now it is not so, we must be consistent. If we want the docblock to contain what the method returns, we need to add|null to other fields and check that the field is not null when we call the getter, but we don’t do that, it is a huge number of redundant checks.

@fabpot
Copy link
Member

Thank you@ossinkine.

@fabpotfabpot merged commit7568d34 intosymfony:3.4Aug 4, 2019
fabpot added a commit that referenced this pull requestAug 4, 2019
…nkine)This PR was merged into the 3.4 branch.Discussion----------[HttpFoundation] Revert getClientIp@return docblock| Q             | A| ------------- | ---| Branch?       | 3.4| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| License       | MIT<!--Replace this notice by a short README for your feature/bugfix. This will help peopleunderstand your PR and can be used as a start for the documentation.Additionally (seehttps://symfony.com/roadmap): - 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 branch 4.4. - Legacy code removals go to the master branch.-->This PR reverts#22418, see the comment#22418 (comment)Commits-------7568d34 [HttpFoundation] Revert getClientIp@return docblock
This was referencedAug 26, 2019
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

3.4

Development

Successfully merging this pull request may close these issues.

5 participants

@ossinkine@nicolas-grekas@ostrolucky@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp