Skip to content

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

Open
wants to merge 3 commits into
base: 1.x
Choose a base branch
from
Open

Conversation

LeJeanbono
Copy link
Contributor

@@ -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;
Copy link
Member

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);

Copy link
Contributor Author

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"
Copy link
Member

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).

Copy link
Contributor Author

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 ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Just for the record, looks like I can install symfony/string:^5.1 with symfony/maker-bundle:^1.21 + symfony.extra.require:4.4.*. But symfony/string is a direct dependency 🤔 Will it work with an indirect dependency by maker-bundle, too?

CleanShot 2020-10-23 at 20 34 11

Copy link
Member

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.

Copy link
Contributor

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",
Copy link
Collaborator

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?

Copy link
Contributor

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 👍

@jrushlow jrushlow added the Status: Needs Work Additional work is needed label Nov 9, 2020
@weaverryan weaverryan changed the base branch from master to main November 16, 2020 20:01
@jrushlow jrushlow added the Feature New Feature label May 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New Feature Status: Needs Work Additional work is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants