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

Fix deprecations on 4.3#33000

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.3fromjderusse:deprec-43
Aug 8, 2019
Merged

Conversation

@jderusse
Copy link
Member

@jderussejderusse commentedAug 6, 2019
edited
Loading

QA
Branch?4.3
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#32844
LicenseMIT
Doc PRNA

Fix deprecations in branch 4.3
note: remaining deprecationassertStringContainsString will be fixed in#32977

@jderussejderusseforce-pushed thedeprec-43 branch 2 times, most recently fromab1d931 to39a4b52CompareAugust 7, 2019 07:49
@jderussejderusseforce-pushed thedeprec-43 branch 3 times, most recently from4d6765b tod485174CompareAugust 7, 2019 09:38
publicfunctiontestProcessNotExistingActionParam()
{
$this->expectException('Symfony\Component\DependencyInjection\Exception\AutowiringFailedException');
$this->expectExceptionMessage('Cannot autowire service "Symfony\Component\DependencyInjection\Tests\CompilerEslaAction": argument "$notExisting" of method "Symfony\Component\DependencyInjection\Tests\Compiler\ElsaAction::__construct()" has type "Symfony\Component\DependencyInjection\Tests\Compiler\NotExisting" but this class was not found.');
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

This assertion triggers an exception in PHPUnit BecauseAutowiringFailedException::message is not a string but a class with a __toString method

(newResolveClassPass())->process($container);
(newAutowirePass())->process($container);

$this->assertCount(1,$container->getDefinition('c')->getArguments());
Copy link
MemberAuthor

@jderussejderusseAug 7, 2019
edited
Loading

Choose a reason for hiding this comment

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

container->getDefinition('c')->getArguments() equals to 0.
This assert were never reached because call toprocess triggers an exception and cautch by the former$this->expectException('Symfony\Component\DependencyInjection\Exception\RuntimeException');

(newResolveClassPass())->process($container);
(newAutowirePass())->process($container);

$this->assertCount(3,$container->getDefinition('g')->getArguments());
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

same here

@jderussejderusseforce-pushed thedeprec-43 branch 2 times, most recently fromfd6568d to046e45eCompareAugust 7, 2019 10:18
@jderussejderusse changed the titleFix deprecations on 4.3WIP - Fix deprecations on 4.3Aug 7, 2019
@nicolas-grekasnicolas-grekas mentioned this pull requestAug 7, 2019
23 tasks
@jderussejderusseforce-pushed thedeprec-43 branch 5 times, most recently from68d1426 to4edb17cCompareAugust 7, 2019 22:16
$this->assertStringEqualsFile(__DIR__.'/Fixtures/proxy-factory.php',$factory);

require_once__DIR__.'/Fixtures/proxy-implem.php';
eval(preg_replace('/^<\?php/','',$implem));
Copy link
MemberAuthor

@jderussejderusseAug 7, 2019
edited
Loading

Choose a reason for hiding this comment

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

since ProxyManager 2.2 the suffix in properties is predictable, BUT it vary with version of dependencies installed. Which make a simpleassertEquals unusable. Now,proxy-implem.php contains a pattern to match, and$implem contains the true code to evaluate.

@jderussejderusse changed the titleWIP - Fix deprecations on 4.3Fix deprecations on 4.3Aug 8, 2019
@nicolas-grekas
Copy link
Member

Thank you@jderusse.

@nicolas-grekasnicolas-grekas merged commit8fd16a6 intosymfony:4.3Aug 8, 2019
nicolas-grekas added a commit that referenced this pull requestAug 8, 2019
This PR was merged into the 4.3 branch.Discussion----------Fix deprecations on 4.3| Q             | A| ------------- | ---| Branch?       | 4.3| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#32844| License       | MIT| Doc PR        | NAFix deprecations in branch 4.3note: remaining deprecation `assertStringContainsString` will be fixed in#32977* [ ] fix tests in branch 3.4 in#32981Commits-------8fd16a6 Fix deprecation on 4.3
@jderussejderusse deleted the deprec-43 branchMarch 5, 2020 20:03
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@ycerutoycerutoyceruto left review comments

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@dunglasdunglasAwaiting requested review from dunglas

Assignees

No one assigned

Projects

None yet

Milestone

4.3

Development

Successfully merging this pull request may close these issues.

4 participants

@jderusse@nicolas-grekas@yceruto@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp