Skip to content

Commit

Permalink
Merge pull request #2213 from Haehnchen/feature/bundle-namespace-twig
Browse files Browse the repository at this point in the history
switch off old template Bundle naming convention by default (eg ::base.html.twig)
  • Loading branch information
Haehnchen authored Aug 24, 2023
2 parents 246f189 + ce6f951 commit c7f4a48
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public class Settings implements PersistentStateComponent<Settings> {
public boolean codeFoldingTwigConstant = true;
public boolean featureTwigIcon = true;

public boolean twigBundleNamespaceSupport = true;
public boolean twigBundleNamespaceSupport = false;

public boolean dismissEnableNotification = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<properties>
<selected value="true"/>
<text value="Support Bundle Namespaces"/>
<toolTipText value="Example: Foobar:Bar:Foo.html.twig"/>
<toolTipText value="Example: Foobar:Bar:Foo.html.twig (for older Symfony Versions)"/>
</properties>
</component>
</children>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.testFramework.VfsTestUtil;
import com.intellij.util.containers.ContainerUtil;
import fr.adrienbrault.idea.symfony2plugin.Settings;
import fr.adrienbrault.idea.symfony2plugin.extension.TwigNamespaceExtensionParameter;
import fr.adrienbrault.idea.symfony2plugin.templating.path.BundleTwigNamespaceExtension;
import fr.adrienbrault.idea.symfony2plugin.templating.path.TwigPath;
Expand All @@ -28,6 +29,8 @@ public String getTestDataPath() {
}

public void testThatBundleNamespacesAreAdded() {
Settings.getInstance(getProject()).twigBundleNamespaceSupport = true;

Collection<TwigPath> namespaces = new BundleTwigNamespaceExtension()
.getNamespaces(new TwigNamespaceExtensionParameter(getProject()));

Expand Down

0 comments on commit c7f4a48

Please sign in to comment.