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

Fixed the nullable support for php 7.1 and below (2.7, 2.8, 3.0)#19811

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:2.7fromlinaori:fix/nullable-2-7
Sep 14, 2016
Merged

Fixed the nullable support for php 7.1 and below (2.7, 2.8, 3.0)#19811

fabpot merged 1 commit intosymfony:2.7fromlinaori:fix/nullable-2-7
Sep 14, 2016

Conversation

@linaori
Copy link
Contributor

QA
Branch?2.7, 2.8, 3.0
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#19784 (comment)
LicenseMIT
Doc PR~

Fixes the nullable support for 2.7, 2.8 and 3.0, can probably be partially merged into 3.1 but not 100% sure.

/ping@fabpot

* @param callable $controller
* @param \ReflectionParameter[] $parameters
*
* @return mixed[]

Choose a reason for hiding this comment

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

@return array The values to use when calling the controller

Copy link
ContributorAuthor

@linaorilinaoriSep 1, 2016
edited
Loading

Choose a reason for hiding this comment

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

Sounds good to me, is there any reasonarray is preferred overmixed[]?

edit:The arguments to use instead ofThe values to use, WDYT?

Choose a reason for hiding this comment

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

more common to me :)

@linaori
Copy link
ContributorAuthor

@dunglashttps://3v4l.org/3Vb4g if this is how you would expect it to work, I'd say it's nullable as default as long as it doesn't have a default value.

@dunglas
Copy link
Member

dunglas commentedSep 1, 2016
edited
Loading

@iltar looks good:https://3v4l.org/rn5gR

@linaori
Copy link
ContributorAuthor

@dunglas the problem is that it's not really nullable anymore. For the old 2.7, 2.8 and 3.0 it's fine, but for the new variant (argument value resolver) this is not a good solution imo. If I ask if something is nullable, I refer to the?string feature, while right now with allows null without type,$foo = '' is also nullable, e.g. it won't crash when called with null.

@dunglas
Copy link
Member

@iltar but it will never happen because ofhttps://github.com/symfony/symfony/pull/19811/files#diff-8518ab757bc9acd6d5a874a2e2737502R133 or am I missing something?

@linaori
Copy link
ContributorAuthor

@dunglas no, for this case it's fine, I'm referring tohttps://github.com/symfony/symfony/pull/19784/files#diff-d298199ac90f557ade8fffe47ab3f755R98

While not directly related to this PR, it's a small detail difference.

$controller =array(newNullableController(),'action');
$this->assertEquals(array('foo',new \stdClass(),'value','mandatory'),$resolver->getArguments($request,$controller));
}
/**

Choose a reason for hiding this comment

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

missing blank line before

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

is fabbot.io skipping test files?

@fabpot
Copy link
Member

👍

@fabpot
Copy link
Member

Thank you@iltar.

@fabpotfabpot merged commit9c48756 intosymfony:2.7Sep 14, 2016
fabpot added a commit that referenced this pull requestSep 14, 2016
…, 3.0) (iltar)This PR was merged into the 2.7 branch.Discussion----------Fixed the nullable support for php 7.1 and below (2.7, 2.8, 3.0)| Q             | A| ------------- | ---| Branch?       | 2.7, 2.8, 3.0| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#19784 (comment)| License       | MIT| Doc PR        | ~Fixes the nullable support for 2.7, 2.8 and 3.0, can probably be partially merged into 3.1 but not 100% sure./ping@fabpotCommits-------9c48756 Fixed the nullable support for php 7.1 and below
This was referencedOct 3, 2016
@linaorilinaori deleted the fix/nullable-2-7 branchFebruary 8, 2019 13:38
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

6 participants

@linaori@dunglas@fabpot@nicolas-grekas@wouterj@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp