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] Mute deprecations triggered from phpunit#32443

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
nicolas-grekas merged 1 commit intosymfony:4.3fromgreg0ire:muted-deprecations
Jul 18, 2019

Conversation

@greg0ire
Copy link
Contributor

QA
Branch?4.3
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed ticketsn/a
LicenseMIT
Doc PRn/a

Request by@nicolas-grekas here:#32289 (comment)

@greg0ire
Copy link
ContributorAuthor

@phansys, please review, and maybe test?

phansys reacted with thumbs up emoji

@phansys
Copy link
Contributor

@phansys, please review, and maybe test?

Seehttps://travis-ci.org/symfony/symfony/jobs/556567606.

@greg0ire
Copy link
ContributorAuthor

Thanks for this, looks like it does not work yet. I will try to make your PoC run locally and debug this :)

@greg0ire
Copy link
ContributorAuthor

status: needs work

@greg0ire
Copy link
ContributorAuthor

Ah wait… the way to properly test this would be do addrm -fr vendor/symfony/phpunit-bridge -fr && cp -r src/Symfony/Bridge/PhpUnit/ vendor/symfony/phpunit-bridge somewhere in the build script

@greg0ire
Copy link
ContributorAuthor

I created my own PoC, but it does not work either… will have to investigatehttps://travis-ci.org/symfony/symfony/jobs/556660318

@nicolas-grekasnicolas-grekas added this to the4.3 milestoneJul 10, 2019
@greg0iregreg0ireforce-pushed themuted-deprecations branch 2 times, most recently fromb7a96eb toa686300CompareJuly 10, 2019 22:10
@greg0ire
Copy link
ContributorAuthor

greg0ire commentedJul 11, 2019
edited
Loading

Ok so I have fixed most occurences of the deprecation. Some remain because of

thrownewRuntimeException(sprintf('Invalid handler service "%s": type-hint of argument "$%s" in method "%s::__invoke()" must be a class , "%s" given.',$serviceId,$parameters[0]->getName(),$handlerClass->getName(),$type));

or because of the deprecation serialization system (I have to work on that one, I can probably reuse theoriginatingClass() method).

@greg0ire
Copy link
ContributorAuthor

because of the deprecation serialization system (I have to work on that one, I can probably reuse the originatingClass() method).

Actually, I don't think I should attempt to fix that one: I don't have enough information to achieve it in a robust manner:a:4:{s:11:"deprecation";s:51:"Function ReflectionType::__toString() is deprecated";s:5:"class";s:41:"Symfony\Bridge\Twig\Tests\AppVariableTest";s:6:"method";s:14:"testGetSession";s:15:"triggering_file";s:110:"/home/travis/build/greg0ire/symfony/.phpunit/phpunit-6.5/vendor/phpunit/phpunit-mock-objects/src/Generator.php";}

The interesting part here istrigerring_file, but detectingvendor/phpunit looks fragile. Should I go for it anyway? Or should I just give up in that particular case? Please advise@nicolas-grekas

@greg0ire
Copy link
ContributorAuthor

There are also a bunch of deprecations that don't seem to go through the bridge at all in theDebug component, I don't think I can do much about that…

@nicolas-grekas
Copy link
Member

Checking for/vendor/phpunit/ (using DIRECTORY_SEPARATOR) LGTM. That's a pragmatic choice for insulated tests.

greg0ire reacted with thumbs up emoji

@greg0iregreg0ireforce-pushed themuted-deprecations branch 2 times, most recently fromb28be9f to69ba9d0CompareJuly 15, 2019 21:16
@greg0ire
Copy link
ContributorAuthor

Done. Here is what it looks like on my PoC:https://travis-ci.org/greg0ire/symfony/jobs/559138971
The only occurences left are

  • when the bridge is not in use
  • when Symfony (in that case Messenger) is at fault.

@greg0ire
Copy link
ContributorAuthor

Status: needs review

@greg0ire
Copy link
ContributorAuthor

greg0ire commentedJul 16, 2019
edited
Loading

I met with Nicolas, and we established that I need to take care of the deprecations not going through the bridge error handler in the Debug component. We also established I need to make a separate PR to backport this to 3.4, where the code for the bridge is very different.

@greg0ire
Copy link
ContributorAuthor

Status: needs work

@greg0ire
Copy link
ContributorAuthor

Ok now we're only left with the Messenger deprecation, which should probably be fixed in another PR:https://travis-ci.org/greg0ire/symfony/jobs/559682090

Status: needs review

Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

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

thanks, let's fix the Messenger deprecation in the same PR, enough bureaucracy :)

@greg0iregreg0ireforce-pushed themuted-deprecations branch 2 times, most recently from54df46c to8724a39CompareJuly 17, 2019 22:06
@greg0ire
Copy link
ContributorAuthor

thanks, let's fix the Messenger deprecation in the same PR, enough bureaucracy :)

Ok! Done. Here is a proof of that claim:https://travis-ci.org/greg0ire/symfony/jobs/560211283

Please review again :)

@greg0ire
Copy link
ContributorAuthor

We also established I need to make a separate PR to backport this to 3.4, where the code for the bridge is very different.

Nicolas has realized that I actually don't need to do that PR since 3.4 is tested with the version 4 of the bridge, which will contain the fix.

A separate PR has been done regarding the Debug deprecations:#32592

As for the Messenger deprecation, the fix should stay in this PR since there is no Messenger on 3.4.

@nicolas-grekas
Copy link
Member

Can you please rebase?

@greg0ire
Copy link
ContributorAuthor

Done

@nicolas-grekas
Copy link
Member

Thank you@greg0ire.

greg0ire reacted with heart emoji

@nicolas-grekasnicolas-grekas merged commita4ab13d intosymfony:4.3Jul 18, 2019
nicolas-grekas added a commit that referenced this pull requestJul 18, 2019
…greg0ire)This PR was merged into the 4.3 branch.Discussion----------[PHPUnitBridge] Mute deprecations triggered from phpunit| Q             | A| ------------- | ---| Branch?       | 4.3| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | n/a| License       | MIT| Doc PR        | n/aRequest by@nicolas-grekas here:#32289 (comment)Commits-------a4ab13d Mute deprecations triggered from phpunit
@fabpotfabpot mentioned this pull requestJul 28, 2019
@greg0iregreg0ire deleted the muted-deprecations branchNovember 3, 2019 10:50
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

Assignees

No one assigned

Projects

None yet

Milestone

4.3

Development

Successfully merging this pull request may close these issues.

4 participants

@greg0ire@phansys@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp