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

[PhpUnitBridge] Fix some errors when using serialized deprecations#31478

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

Conversation

@l-vo
Copy link
Contributor

@l-vol-vo commentedMay 11, 2019
edited
Loading

QA
Branch?master
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets
LicenseMIT
Doc PR

During the refactoring for#29211, some very minor problems seamed to appear. I created#31382 for fixing one of them but I forgot two others; sorry for that. Both problems occurs when using@runInSeparateProcess in tests too:

  • deprecationisSelf condition is inverted when using runInSeparateProcess
  • wrong trace stack is used to determineisIndirect state of the deprecation when using runInSeparateProcess

@l-vol-vo changed the titleFix some errors when using serialized deprecations[WIP][PhpUnitBridge] Fix some errors when using serialized deprecationsMay 11, 2019
@nicolas-grekasnicolas-grekas added this to the4.3 milestoneMay 12, 2019
@l-vol-voforce-pushed thefix_some_errors_when_using_serialized_deprecations branch 3 times, most recently from31b4188 to25da423CompareMay 15, 2019 19:46
@l-vol-vo changed the title[WIP][PhpUnitBridge] Fix some errors when using serialized deprecations[PhpUnitBridge] Fix some errors when using serialized deprecationsMay 15, 2019
@l-vol-vo marked this pull request as ready for reviewMay 15, 2019 19:51
@l-vo
Copy link
ContributorAuthor

l-vo commentedMay 15, 2019
edited
Loading

Tests fail, I think it's because they use the PhpUnitBridge of the master branch.

@greg0ire
Copy link
Contributor

greg0ire commentedMay 25, 2019
edited
Loading

I reproduce the build failure locally. I'm using php 7.3, what about you? Also, I'm running the tests from the directory of the component,src/Symfony/Bridge/PhpUnit

@greg0ire
Copy link
Contributor

greg0ire commentedMay 25, 2019
edited
Loading

Also, tests fail when I run them in another of the supported ways (which is not used in CI):

phpunit src/Symfony/Bridge/PhpUnit             PHPUnit 6.5.14 by Sebastian Bergmann and contributors.Testing src/Symfony/Bridge/PhpUnit..........S....................FFF..EE...................S......  64 / 64 (100%)Time: 467 ms, Memory: 10.00MBThere were 2 errors:1) Symfony\Bridge\PhpUnit\Tests\DeprecationErrorHandler\DeprecationTest::testIsIndirectUsesRightTrace with data set #1 (false, 'a:4:{s:11:"deprecation";s:22:...it";}}', array(array('myfunc1'), array('Symfony\Bridge\PhpUnit\Legacy...rForV5', 'mymethod')))Undefined index: function/home/greg/dev/symfony/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/DeprecationTest.php:1512) Symfony\Bridge\PhpUnit\Tests\DeprecationErrorHandler\DeprecationTest::testIsIndirectUsesRightTrace with data set #2 (true, 'a:4:{s:11:"deprecation";s:22:...it";}}', array(array('myfunc1'), array('Symfony\Bridge\PhpUnit\Legacy...rForV5', 'mymethod')))Undefined index: function/home/greg/dev/symfony/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/DeprecationTest.php:151--There were 3 failures:1) Symfony\Bridge\PhpUnit\Tests\DeprecationErrorHandler\DeprecationTest::testIsSelf with data set #2 (true, 'a:4:{s:5:"class";s:0:"";s:6:"...:0:{}}', 'Symfony\Bridge\PhpUnit\Legacy...rForV5', '')Failed asserting that false matches expected true./home/greg/dev/symfony/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/DeprecationTest.php:1012) Symfony\Bridge\PhpUnit\Tests\DeprecationErrorHandler\DeprecationTest::testIsSelf with data set #3 (true, 'a:5:{s:5:"class";s:0:"";s:6:"...:0:{}}', 'Symfony\Bridge\PhpUnit\Legacy...rForV5', '')Failed asserting that false matches expected true./home/greg/dev/symfony/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/DeprecationTest.php:1013) Symfony\Bridge\PhpUnit\Tests\DeprecationErrorHandler\DeprecationTest::testIsSelf with data set #4 (false, 'a:5:{s:5:"class";s:0:"";s:6:"...:0:{}}', 'Symfony\Bridge\PhpUnit\Legacy...rForV5', '')Failed asserting that true matches expected false./home/greg/dev/symfony/src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/DeprecationTest.php:101

Same with simplyphpunit , but that's probably because it is mixing old and new code, might be fixed one your code is merged.

@greg0ire
Copy link
Contributor

greg0ire commentedMay 26, 2019
edited
Loading

@l-vo how do you run the test suite locally? This is how I proceed:

cd src/Symfony/Bridge/PhpUnitphpunit

EDIT: and it fails on my machine, what about you?

@l-vo
Copy link
ContributorAuthor

@greg0ire from the repository root:

$ php phpunit src/Symfony/Bridge/PhpUnit

@greg0ire
Copy link
Contributor

Please try to make both methods work. The method that I use is used in CI. You will have to runcomposer update in the phpunit bridge directory first

@l-vol-voforce-pushed thefix_some_errors_when_using_serialized_deprecations branch 8 times, most recently froma2af18a to4149956CompareMay 28, 2019 09:14
@l-vol-voforce-pushed thefix_some_errors_when_using_serialized_deprecations branch 16 times, most recently fromc10ace7 toe9cf4dfCompareJune 1, 2019 18:29
@l-vo
Copy link
ContributorAuthor

l-vo commentedJun 1, 2019

@greg0ire I think I fixed the tests. They still fail on PHP 7.3 (deps=low); it is caused byProcessIsolationTest which use the modified behavior@runTestsInSeparateProcesses. I don't understand what the CI exactly do but I'm almost sure it's because it uses a not up-to-date version ofDeprecation.php (a version from the master branch from a vendor directory created by the CI).

@l-vo
Copy link
ContributorAuthor

l-vo commentedJun 1, 2019

Status: needs review

@l-vol-voforce-pushed thefix_some_errors_when_using_serialized_deprecations branch from31ab004 toedfdccfCompareJune 2, 2019 12:51
@l-vo
Copy link
ContributorAuthor

Closed in favour of#33820

@l-vol-vo closed thisOct 24, 2019
nicolas-grekas added a commit that referenced this pull requestFeb 4, 2020
…ecations (l-vo)This PR was submitted for the 4.3 branch but it was squashed and merged into the 4.4 branch instead.Discussion----------[PhpUnitBridge] Fix some errors when using serialized deprecations| Q             | A| ------------- | ---| Branch?       | 4.3| Bug fix?      | yes| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->| Tickets       | n/a| License       | MIT| Doc PR        | n/aThis PR attempts to fix conflicts that arose in#31478Creating as a draft for now as I think having separate test methods no longer make sense (`isSelf()` and `isIndirect()` have been replaced with `getType()`).@l-vo please review and confirm I did not loose anything valuable from your original contribution.Commits-------056d598 [PhpUnitBridge] Fix some errors when using serialized deprecations
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas left review comments

+1 more reviewer

@greg0iregreg0iregreg0ire left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

4.3

Development

Successfully merging this pull request may close these issues.

4 participants

@l-vo@greg0ire@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp