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

Use str_ends_with() and str_starts_with()#44482

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

@alexislefebvre
Copy link
Contributor

QA
Branch?4.4
Bug fix?no
New feature?no
Deprecations?no
Ticketsno
LicenseMIT
Doc PRno

Usestr_ends_with() andstr_starts_with() instead ofsubstr().

(replaces#44476)

$dir =realpath(__DIR__.'/../Fixtures/samples/charsets');
$sampleFp =opendir($dir);
while (false !==$encoding =readdir($sampleFp)) {
if ('.' ==substr($encoding,0,1)) {
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I wonder why the equality test ignored the type of the variables (no===).

Copy link
Member

@GromNaNGromNaN left a comment

Choose a reason for hiding this comment

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

All updated packages requiresymfony/polyfill-php80, exceptsymfony/framework: 4.4, can you add the dependency please.

@alexislefebvre
Copy link
ContributorAuthor

alexislefebvre commentedDec 6, 2021
edited
Loading

Thanks for your review.

I'm sorry butsymfony/frameworkdoesn't exist. Thecomposer.json ofsymfony/framework-bundle already requiressymfony/polyfill-php80 though:

"symfony/polyfill-php80":"^1.16",

If this is not the right file, please tell me the path of the file, because this PR didn't changed any file in the Framework namespace and I don't know what is the relevant file.

@GromNaN
Copy link
Member

GromNaN commentedDec 7, 2021
edited
Loading

My bad. That's the workflow component that needs this update. Sorry for the confusion.
https://github.com/symfony/symfony/blob/4.4/src/Symfony/Component/Workflow/composer.json

@fancyweb
Copy link
Contributor

@alexislefebvre I am very sorry but@nicolas-grekas warned me that such changes are not made on the lowest maintained branch anymore (4.4) to avoid as many possible regressions as possible. The policy has changed recently and I did not know about it. It was not the case yet for#41576, that's why this one was made on 4.4.

However it does not mean your work is lost, you just have to rebase it on 6.1, I guess most occurrences should still be there :-)@nicolas-grekas Can you confirm it plz? :-)

Nyholm and ogizanagi reacted with thumbs up emoji

@nicolas-grekas
Copy link
Member

I do confirm yes, we decided to be stricter now and merge only true bug fixes on lower branches.

@NyholmNyholm added this to the6.1 milestoneDec 7, 2021
@alexislefebvre
Copy link
ContributorAuthor

Thanks for your feedbacks. Psalm is trying to merge this PR in 4.4 and it fails. I opened a new PR:#44499

@alexislefebvrealexislefebvre deleted the use-str-starts-end-with-4.4 branchDecember 7, 2021 21:25
GromNaN added a commit that referenced this pull requestDec 7, 2021
This PR was squashed before being merged into the 6.1 branch.Discussion----------Use str_ends_with() and str_starts_with()| Q             | A| ------------- | ---| Branch?       | 6.1| Bug fix?      | no| New feature?  | no| Deprecations? | no| Tickets       | no| License       | MIT| Doc PR        | noUse `str_ends_with()` and `str_starts_with()` instead of `substr()`.(replaces#44482 and#44476 🥲)Commits-------28d4d6b Use str_ends_with() and str_starts_with()
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@GromNaNGromNaNGromNaN requested changes

@chalasrchalasrAwaiting requested review from chalasrchalasr is a code owner

@lyrixxlyrixxAwaiting requested review from lyrixxlyrixx is a code owner

@dunglasdunglasAwaiting requested review from dunglas

@wouterjwouterjAwaiting requested review from wouterj

@xabbuhxabbuhAwaiting requested review from xabbuh

@ycerutoycerutoAwaiting requested review from yceruto

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

6.1

Development

Successfully merging this pull request may close these issues.

5 participants

@alexislefebvre@GromNaN@fancyweb@nicolas-grekas@Nyholm

[8]ページ先頭

©2009-2025 Movatter.jp