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

Exclude include fixer from twigcsfixer #758

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions drainpipe-dev/scaffold/.twig-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
// default standard.
$ruleset->addStandard(new TwigCsFixer\Standard\TwigCsFixer());

// Remove the IncludeFunctionRule which breaks TwigJS.
$ruleset->removeRule(TwigCsFixer\Rules\Function\IncludeFunctionRule::class);
Comment on lines +35 to +36
Copy link
Member

Choose a reason for hiding this comment

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

Is it possible to do this by committing .twig-cs-fixer.php to your local repo? Then you could control this and anything else (since this twigjs isn't commonly used).

Copy link
Author

Choose a reason for hiding this comment

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

Agreed. This would be a good thing to just document over changing drainpipe... that is, assuming drainpipe doesn't overwrite files that are present, or the scaffolding can be controlled in composer.


$config = new TwigCsFixer\Config\Config();
$config->setRuleset($ruleset);
$config->addTwigExtension(new TwigExtension($renderer, $urlGenerator, $themeManager, $dateFormatter, $fileUrlGenerator));
Expand Down
Loading