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

Remove deprecated assertContains#32977

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

@MarioBlazek
Copy link
Contributor

@MarioBlazekMarioBlazek commentedAug 6, 2019
edited
Loading

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

This PR replacesassertContains() withassertStringContainsString().

@nicolas-grekas
Copy link
Member

Thanks, we just merged#32971 which does the same on 3.4
Can you please rebase to target 4.3? I'm sure there are more there.

@MarioBlazekMarioBlazek changed the base branch from4.4 to4.3August 6, 2019 08:22
@MarioBlazekMarioBlazekforce-pushed thedeprec-phpunit-assertContains branch from7b09a9e to622c638CompareAugust 6, 2019 08:22
@MarioBlazek
Copy link
ContributorAuthor

@nicolas-grekas PR rebased against 4.3

@nicolas-grekasnicolas-grekas added this to the4.3 milestoneAug 6, 2019
@nicolas-grekas
Copy link
Member

All the cases that fail with "mb_strpos() expects parameter 1 to be string, array given" should use assertContainsEquals instead

@nicolas-grekas
Copy link
Member

Wait, assertContains isnot deprecated.Some uses of it are. This should be more selective about those.

$this->assertContains('BaseBundle:controller:custom.format.engine',$templates);
$this->assertContains('::this.is.a.template.format.engine',$templates);
$this->assertContains('::resource.format.engine',$templates);
$this->assertStringContainsString('BaseBundle::base.format.engine',$templates);
Copy link
Member

Choose a reason for hiding this comment

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

templates is an array, you should revert and keepassertContains.

The deprecation is about usingassertContains when the second argument is a string (ie.assertContains('foo', 'foobarbaz') )
Same comment for many changes bellow.

An easy way to spot theme, is to run test and revert reverting the failing tests ;-)

@jderussejderusse mentioned this pull requestAug 6, 2019
1 task
@MarioBlazek
Copy link
ContributorAuthor

Thank you guys, I will update PR accordingly asap.

@MarioBlazek
Copy link
ContributorAuthor

@nicolas-grekas@jderusse tests now pass, but build for some strange reason is hanging too long. Did you experienced something similar before?

@nicolas-grekas
Copy link
Member

@MarioBlazek tests should be back to OK with#33005

@MarioBlazek
Copy link
ContributorAuthor

Tests are now OK, thanks@nicolas-grekas

@nicolas-grekasnicolas-grekasforce-pushed thedeprec-phpunit-assertContains branch from7b9c145 to43acda6CompareAugust 7, 2019 08:23
@nicolas-grekas
Copy link
Member

Thank you@MarioBlazek.

@nicolas-grekasnicolas-grekas merged commit43acda6 intosymfony:4.3Aug 7, 2019
nicolas-grekas added a commit that referenced this pull requestAug 7, 2019
This PR was squashed before being merged into the 4.3 branch (closes#32977).Discussion----------Remove deprecated assertContains| Q             | A| ------------- | ---| Branch?       | 4.3| Bug fix?      | no| New feature?  | yes| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#32844| License       | MIT| Doc PR        | symfonyThis PR replaces `assertContains()` with `assertStringContainsString()`.Commits-------43acda6 Remove deprecated assertContains
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
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@jderussejderussejderusse left review comments

Assignees

No one assigned

Projects

None yet

Milestone

4.3

Development

Successfully merging this pull request may close these issues.

4 participants

@MarioBlazek@nicolas-grekas@jderusse@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp