-
-
Notifications
You must be signed in to change notification settings - Fork 421
Add Symfony String #613
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
base: 1.x
Are you sure you want to change the base?
Add Symfony String #613
Conversation
@@ -40,7 +44,7 @@ public static function hasSuffix(string $value, string $suffix): bool | |||
*/ | |||
public static function addSuffix(string $value, string $suffix): string | |||
{ | |||
return self::removeSuffix($value, $suffix).$suffix; | |||
return self::removeSuffix($value, $suffix) . $suffix; |
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.
This can be updated as return u($value)->ensureEnd($suffix);
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.
test failed => addSuffix('Generatecommand', 'Command')
produce GeneratecommandCommand
instead of GenerateCommand
@@ -22,7 +22,8 @@ | |||
"symfony/filesystem": "^3.4|^4.0|^5.0", | |||
"symfony/finder": "^3.4|^4.0|^5.0", | |||
"symfony/framework-bundle": "^3.4|^4.0|^5.0", | |||
"symfony/http-kernel": "^3.4|^4.0|^5.0" | |||
"symfony/http-kernel": "^3.4|^4.0|^5.0", | |||
"symfony/string": "^5.0" |
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.
There's a practical problem that I don't know if we can overcome. If a project uses Symfony 4.4, and has extra.symfony.require
set to 4.4.*
, I don't think they will be able to install Maker. They would get an error that no symfony/string
version was found, because Flex filters it to only match 4.4 (but we should actually try this to be sure).
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.
Btw, can we drop 3.4 support for a min version with 4.4 ?
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.
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.
This specific combinations should work because String is not in 4.4, this is not bounded by the extra require constraint.
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.
Btw, can we drop 3.4 support for a min version with 4.4 ?
@LeJeanbono IMO this is not needed, as you can install 3.4
when using 7.2.5
php afterwards 👍
@@ -13,7 +13,7 @@ | |||
], | |||
"minimum-stability": "dev", | |||
"require": { | |||
"php": "^7.1.3", | |||
"php": "^7.2.5", |
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.
Playing devils advocate - How would this affect support for Symfony 3.4 && why not bump to 7.3.x as 7.2 ends security support at the end of November?
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.
Its not needed, 7.2.5 is the minimum version for symfony string 👍
#522