-
-
Notifications
You must be signed in to change notification settings - Fork 481
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
[symfony/twig-bundle] Add name to {% endblock %}
#1289
Open
ThomasLandauer
wants to merge
1
commit into
symfony:main
Choose a base branch
from
ThomasLandauer:patch-2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Reasons: * It's good practice anyway IMO, especially when blocks are getting longer and longer... * Would solve the problem at symfony#1288 (comment) nicely :-)
Thanks for the PR 😍 How to test these changes in your application
Diff between recipe versionsIn order to help with the review stage, I'm in charge of computing the diff between the various versions of patched recipes. symfony/twig-bundle3.3 vs 4.4diff --git a/symfony/twig-bundle/3.3/config/packages/twig.yaml b/symfony/twig-bundle/4.4/config/packages/twig.yaml
index d1582a2..6403e6a 100644
--- a/symfony/twig-bundle/3.3/config/packages/twig.yaml
+++ b/symfony/twig-bundle/4.4/config/packages/twig.yaml
@@ -2,3 +2,4 @@ twig:
default_path: '%kernel.project_dir%/templates'
debug: '%kernel.debug%'
strict_variables: '%kernel.debug%'
+ exception_controller: null
diff --git a/symfony/twig-bundle/3.3/config/routes/dev/twig.yaml b/symfony/twig-bundle/3.3/config/routes/dev/twig.yaml
deleted file mode 100644
index f4ee839..0000000
--- a/symfony/twig-bundle/3.3/config/routes/dev/twig.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
-_errors:
- resource: '@TwigBundle/Resources/config/routing/errors.xml'
- prefix: /_error 4.4 vs 5.0diff --git a/symfony/twig-bundle/4.4/config/packages/twig.yaml b/symfony/twig-bundle/5.0/config/packages/twig.yaml
index 6403e6a..b3cdf30 100644
--- a/symfony/twig-bundle/4.4/config/packages/twig.yaml
+++ b/symfony/twig-bundle/5.0/config/packages/twig.yaml
@@ -1,5 +1,2 @@
twig:
default_path: '%kernel.project_dir%/templates'
- debug: '%kernel.debug%'
- strict_variables: '%kernel.debug%'
- exception_controller: null 5.0 vs 5.3diff --git a/symfony/twig-bundle/5.0/config/packages/test/twig.yaml b/symfony/twig-bundle/5.0/config/packages/test/twig.yaml
deleted file mode 100644
index 8c6e0b4..0000000
--- a/symfony/twig-bundle/5.0/config/packages/test/twig.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-twig:
- strict_variables: true
diff --git a/symfony/twig-bundle/5.0/config/packages/twig.yaml b/symfony/twig-bundle/5.3/config/packages/twig.yaml
index b3cdf30..f9f4cc5 100644
--- a/symfony/twig-bundle/5.0/config/packages/twig.yaml
+++ b/symfony/twig-bundle/5.3/config/packages/twig.yaml
@@ -1,2 +1,6 @@
twig:
default_path: '%kernel.project_dir%/templates'
+
+when@test:
+ twig:
+ strict_variables: true
diff --git a/symfony/twig-bundle/5.0/manifest.json b/symfony/twig-bundle/5.3/manifest.json
index 30d5643..c4835ac 100644
--- a/symfony/twig-bundle/5.0/manifest.json
+++ b/symfony/twig-bundle/5.3/manifest.json
@@ -5,5 +5,8 @@
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/",
"templates/": "templates/"
+ },
+ "conflict": {
+ "symfony/framework-bundle": "<5.3"
}
} 5.3 vs 5.4diff --git a/symfony/twig-bundle/5.3/templates/base.html.twig b/symfony/twig-bundle/5.4/templates/base.html.twig
index 16d7273..d4f83f7 100644
--- a/symfony/twig-bundle/5.3/templates/base.html.twig
+++ b/symfony/twig-bundle/5.4/templates/base.html.twig
@@ -3,14 +3,14 @@
<head>
<meta charset="UTF-8">
<title>{% block title %}Welcome!{% endblock %}</title>
- {# Run `composer require symfony/webpack-encore-bundle`
- and uncomment the following Encore helpers to start using Symfony UX #}
+ <link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text></svg>">
+ {# Run `composer require symfony/webpack-encore-bundle` to start using Symfony UX #}
{% block stylesheets %}
- {#{{ encore_entry_link_tags('app') }}#}
+ {{ encore_entry_link_tags('app') }}
{% endblock %}
{% block javascripts %}
- {#{{ encore_entry_script_tags('app') }}#}
+ {{ encore_entry_script_tags('app') }}
{% endblock %}
</head>
<body> 5.4 vs 6.3diff --git a/symfony/twig-bundle/5.4/templates/base.html.twig b/symfony/twig-bundle/6.3/templates/base.html.twig
index d4f83f7..67598ac 100644
--- a/symfony/twig-bundle/5.4/templates/base.html.twig
+++ b/symfony/twig-bundle/6.3/templates/base.html.twig
@@ -4,13 +4,10 @@
<meta charset="UTF-8">
<title>{% block title %}Welcome!{% endblock %}</title>
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text></svg>">
- {# Run `composer require symfony/webpack-encore-bundle` to start using Symfony UX #}
{% block stylesheets %}
- {{ encore_entry_link_tags('app') }}
{% endblock %}
{% block javascripts %}
- {{ encore_entry_script_tags('app') }}
{% endblock %}
</head>
<body> 6.3 vs 6.4diff --git a/symfony/twig-bundle/6.3/config/packages/twig.yaml b/symfony/twig-bundle/6.4/config/packages/twig.yaml
index f9f4cc5..3f795d9 100644
--- a/symfony/twig-bundle/6.3/config/packages/twig.yaml
+++ b/symfony/twig-bundle/6.4/config/packages/twig.yaml
@@ -1,5 +1,5 @@
twig:
- default_path: '%kernel.project_dir%/templates'
+ file_name_pattern: '*.twig'
when@test:
twig:
diff --git a/symfony/twig-bundle/6.3/templates/base.html.twig b/symfony/twig-bundle/6.4/templates/base.html.twig
index 67598ac..13932f5 100644
--- a/symfony/twig-bundle/6.3/templates/base.html.twig
+++ b/symfony/twig-bundle/6.4/templates/base.html.twig
@@ -3,14 +3,14 @@
<head>
<meta charset="UTF-8">
<title>{% block title %}Welcome!{% endblock %}</title>
- <link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text></svg>">
+ <link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text><text y=%221.3em%22 x=%220.2em%22 font-size=%2276%22 fill=%22%23fff%22>sf</text></svg>">
{% block stylesheets %}
- {% endblock %}
+ {% endblock stylesheets %}
{% block javascripts %}
- {% endblock %}
+ {% endblock javascripts %}
</head>
<body>
- {% block body %}{% endblock %}
+ {% block body %}{% endblock body %}
</body>
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reasons:
{% block importmap %}
*above*{% block javascripts %}
#1288 (comment) nicely :-)