Skip to content
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

Twig min version #827

Merged
merged 2 commits into from Oct 7, 2020
Merged

Twig min version #827

merged 2 commits into from Oct 7, 2020

Conversation

ghost
Copy link

@ghost ghost commented Oct 2, 2020

Q A
Branch master
Bug fix? yes/no
New feature? no
BC breaks? yes/no
Deprecations? yes/no
Documented? yes/no
Fixed tickets

With the default settings for the twigcs task in Grumphp we require the >=4.0 versions:

$resolver->setDefaults([
'path' => '.',
'severity' => 'warning',
'ruleset' => 'FriendsOfTwig\Twigcs\Ruleset\Official',
'triggered_by' => ['twig'],
'exclude' => [],
]);

Earlier version like ^3.0 have a different namespace:

https://github.com/friendsoftwig/twigcs/blob/7c4bc76dad8d851045b9eeab4979a240550f8300/src/Ruleset/Official.php#L3

For that I think it's best that we change the documentation line to require the >=4 version of this package.

@ghost
Copy link
Author

ghost commented Oct 2, 2020

PS: I realize that people could still want to use ^3.0 versions. But even the 3.2.0 version is broken if you use the correct namespace for the class. Still think it's best to go >=4 without making it too complicated for inexperienced users.

@veewee veewee added this to the 1.1.0 milestone Oct 7, 2020
@veewee veewee merged commit 51928ce into phpro:master Oct 7, 2020
@veewee
Copy link
Contributor

veewee commented Oct 7, 2020

Makes sense to do it like this.
You can always use an older version and change the default namespace if you want to.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant