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

[Validator] Ensure numeric subpaths do not cause errors on PHP 7.4#34097

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
Tobion merged 1 commit intosymfony:3.4fromalexpott:php74-property-path
Oct 25, 2019

Conversation

@alexpott
Copy link
Contributor

@alexpottalexpott commentedOct 24, 2019
edited
Loading

QA
Branch?3.4
Bug fix?yes
New feature?no
Deprecations?no
TicketsFix #...
LicenseMIT
Doc PRsymfony/symfony-docs#...

Drupal is testing on PHP7.4 and hitting a problem with the lineif ('[' === $subPath[0]) { because$subPath is not a string. We're already doing string casting in the method so we could do it once and be done. Note this is not a problem on the master branch / SF5 because of primitive typehinting.

Without this fix on PHP7.4 you see errors like...

1) Symfony\Component\Validator\Tests\Util\PropertyPathTest::testAppend with data set #5 ('0', 1, '0.1', 'Numeric subpaths do not cause...rrors.')Trying to access array offset on value of type int

@nicolas-grekasnicolas-grekas added this to the3.4 milestoneOct 25, 2019
@nicolas-grekasnicolas-grekas changed the titlePhp74 property path[Validator] Ensure numeric subpaths do not cause errors on PHP 7.4Oct 25, 2019
@Tobion
Copy link
Contributor

Thank you@alexpott.

Tobion added a commit that referenced this pull requestOct 25, 2019
…on PHP 7.4 (alexpott)This PR was squashed before being merged into the 3.4 branch (closes#34097).Discussion----------[Validator] Ensure numeric subpaths do not cause errors on PHP 7.4| Q             | A| ------------- | ---| Branch?       | 3.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 #... <!-- prefix each issue number with "Fix #", if any -->| License       | MIT| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->Drupal is testing on PHP7.4 and hitting a problem with the line `if ('[' === $subPath[0]) {` because `$subPath` is not a string. We're already doing string casting in the method so we could do it once and be done. Note this is not a problem on the master branch / SF5 because of primitive typehinting.Without this fix on PHP7.4 you see errors like...```1) Symfony\Component\Validator\Tests\Util\PropertyPathTest::testAppend with data set#5 ('0', 1, '0.1', 'Numeric subpaths do not cause...rrors.')Trying to access array offset on value of type int```Commits-------6244a1e [Validator] Ensure numeric subpaths do not cause errors on PHP 7.4
@TobionTobion merged commit6244a1e intosymfony:3.4Oct 25, 2019
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

+1 more reviewer

@TobionTobionTobion approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

3.4

Development

Successfully merging this pull request may close these issues.

4 participants

@alexpott@Tobion@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp