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

[FrameworkBundle] remove dead conditions in Translation Commands#42390

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
fabpot merged 1 commit intosymfony:5.4fromacran:5.4
Aug 6, 2021

Conversation

@acran
Copy link
Contributor

QA
Branch?5.4
Bug fix?no
New feature?no
Deprecations?no
Tickets-
LicenseMIT
Doc PR-

This is just a trivial removal of unused code I stumbled upon while debugging#42361. In theoriginal code:

$transPaths = [$path.'/translations'];$codePaths = [$path.'/templates'];if (!is_dir($transPaths[0]) && !isset($transPaths[1])) {thrownewInvalidArgumentException(sprintf('"%s" is neither an enabled bundle nor a directory.',$transPaths[0]));}

The second part of the conditionisset($transPaths[1]) willalways evaluate to true, since$targetPath is just set 3 lines above but only has a single element.

This check was originally to support legacy paths which was removed inb6eb1f4:

Rebased from 5.3 to 5.4, see#42362
/cc@fabpot

Since $targetPath is directly set just 3 lines above!isset($targetPath[1]) will *always* evaluate to true.This check was originally to support legacy paths which was removed inb6eb1f4
@fabpot
Copy link
Member

Thank you@acran.

@fabpotfabpot merged commit2f8ac04 intosymfony:5.4Aug 6, 2021
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@ycerutoycerutoyceruto approved these changes

@chalasrchalasrchalasr approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

5.4

Development

Successfully merging this pull request may close these issues.

5 participants

@acran@fabpot@yceruto@chalasr@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp