-
-
Notifications
You must be signed in to change notification settings - Fork 421
[make:form] fix generated field options_code indentation #1469
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
fd7a6fc
to
460b499
Compare
460b499
to
f58b535
Compare
@@ -59,7 +59,7 @@ public function lintPhpTemplate(string|array $templateFilePath): void | |||
$templateFilePath = [$templateFilePath]; | |||
} | |||
|
|||
$ignoreEnv = str_contains(strtolower(\PHP_OS), 'win') ? 'set PHP_CS_FIXER_IGNORE_ENV=1&' : 'PHP_CS_FIXER_IGNORE_ENV=1 '; | |||
$ignoreEnv = str_starts_with(strtolower(\PHP_OS), 'win') ? 'set PHP_CS_FIXER_IGNORE_ENV=1& ' : 'PHP_CS_FIXER_IGNORE_ENV=1 '; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jrushlow i also made changes on this as these changes didn't seem right https://github.com/symfony/maker-bundle/pull/1435/files#diff-63196606ee883ed9470b1dfceed2cc28540986c0180afdb82e274812fa4690daR59
using str_contains
, it was affect Darwin
as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, Thank you @IndraGunawan
This PR was merged into the 1.x-dev branch. Discussion ---------- Fix indentation of options_code Similar to #1469 but doesn't rely on any CS fixer. Note that using PHP_EOL was wrong: this constant is meant to be used ONLY when outputting something on a terminal. NOT when dealing with new lines in files. Commits ------- 91b7ce0 Fix indentation of options_code
when generating form with
EntityType
, the indentation ofoptions_code
looks wrongbelow example is
Foo <-- ManyToMany --> Bar
Before
After