Fabien Potencier
9d2d35faa7
Make extra integration tests compatible with Twig 4
2026-09-06 22:35:36 +02:00
Dylan Pulver
c072ff85b3
Fix html_attr dropping style declarations whose value is zero
...
InlineStyle::getValue() skipped a declaration when empty($value) was true,
which also matches 0, 0.0 and '0'. Those are ordinary CSS values (opacity: 0,
z-index: 0, margin: 0, flex-grow: 0), so they were silently dropped, and a
style map containing only such declarations omitted the attribute entirely.
The sibling SeparatedTokenList::getValue() already uses an explicit
null/false test, so class token lists keep a 0 while style declarations did
not. The numeric-key branch of InlineStyle itself never consulted empty(),
so {style: ['opacity: 0']} printed while {style: {opacity: 0}} did not.
2026-09-03 20:24:11 +03:00
Hugo Alliaume
9b18e3757d
Extract htmlAttrValue() from html_attr for standalone attribute rendering
2026-08-26 16:46:53 +02:00
Fabien Potencier
9c6d76b61c
Add void return type hint even in tests
2026-07-12 13:43:08 +02:00
Fabien Potencier
9323a82eb9
Render backed enums using their backing value in the html_attr function
2026-06-25 08:50:01 +02:00
Matthias Pigulla
25bfb5957c
Add two tests for error conditions in #3930
2026-03-17 08:24:08 +01:00
Matthias Pigulla
42c12fa720
Add an html_attr function to make outputting HTML attributes easier
2026-03-17 07:39:33 +01:00
Fabien Potencier
861215c507
Fix CS
2026-02-07 09:07:38 +01:00
jmsche
ff327e4163
Add .gitignore & .gitattributes to all .gitattributes
2025-12-02 15:45:16 +01:00
Javier Eguiluz
9a8a1dc1dd
Allow Symfony 8 packages in Twig extra packages
2025-11-02 12:00:49 +01:00
Younes ENNAJI
64c87eeaa3
Fix array typehint for $variants in HtmlExtension
2025-10-30 01:26:03 +01:00
Alexandre Daubois
9c6b95f2a6
Make in_array() calls strict
2025-02-19 15:29:33 +01:00
Fabien Potencier
151aa4ecda
Fix CS
2025-02-14 12:57:03 +01:00
Fabien Potencier
dc6356268b
Bump min PHP version to 8.1
2025-01-31 21:45:36 +01:00
Nicolas Lemoine
8158dabc17
Add support for Twig\Markup
...
Co-authored-by: Fabien Potencier <fabien@potencier.org >
2024-12-29 11:29:59 +01:00
Fabien Potencier
2a6c986e85
Add a test
2024-12-18 07:46:55 +01:00
Fabien Potencier
4e08e3ef5f
Fix tests
2024-09-30 08:41:48 +02:00
Fabien Potencier
0da899d911
Use get_debug_type() everywhere
2024-09-29 18:08:29 +02:00
Alexander M. Turek
18f4203827
Prepare IntegrationTestCase for static data providers
2024-09-03 15:08:40 +02:00
Fabien Potencier
031c7bda4d
Allow extra extensions to use Twig 4
2024-09-01 22:39:12 +02:00
Fabien Potencier
675cb2d141
Fix CS
2024-08-18 19:25:19 +02:00
Matheo Daninos
e3ac14e1c8
Introduce CVA to html-extra
2024-08-18 09:36:16 +02:00
Ruud Kamphuis
8ef12588ea
Remove escape
2024-08-11 18:59:31 +02:00
Fabien Potencier
c070cd719c
Drop support for 8.0
2024-08-10 12:32:24 +02:00
Fabien Potencier
da4592793b
minor #4109 Update PHPUnit config (fabpot)
...
This PR was merged into the 3.x branch.
Discussion
----------
Update PHPUnit config
Commits
-------
b78dee86 Update PHPUnit config
2024-06-21 08:25:01 +02:00
Fabien Potencier
b78dee8682
Update PHPUnit config
2024-06-21 08:22:31 +02:00
Fabien Potencier
b63bde3063
Optimize sprintf() calls for PHP 8.4
2024-06-21 08:16:55 +02:00
Fabien Potencier
761aa56a6f
Revert "minor #4042 Auto-close PRs on subtree-splits (kbond)"
...
This reverts commit 12625c0c05 , reversing
changes made to ad934312cd .
2024-05-11 09:35:57 +02:00
Fabien Potencier
b222be9974
Fix CS
2024-05-01 16:06:53 +02:00
Fabien Potencier
68a826cf61
minor #3969 [html-extra] filter classes (kbond)
...
This PR was merged into the 3.x branch.
Discussion
----------
[html-extra] filter classes
A small formatting change to avoid double spaces:
```twig
class="{{ html_classes('a', false ? 'b', true ? 'c') }}"
{# before #}
class="a c"
{# after #}
class="a c"
```
Commits
-------
a517c14f [html-extra] filter classes
2024-04-29 21:43:39 +02:00
Kevin Bond
a517c14f19
[html-extra] filter classes
2024-04-29 21:42:05 +02:00
Kevin Bond
b212f1bb2f
Auto-close PRs on subtree-splits
2024-04-19 08:34:22 +02:00
Fabien Potencier
f7f11ea410
Fix CS
2024-02-10 09:52:03 +01:00
Fabien Potencier
b1a8feaa55
Remove support for Twig 2.x and unmaintained Symfony versions
2024-01-25 08:19:28 +01:00
Fabien Potencier
aa7c454e2d
Fix CS
2023-12-10 20:34:32 +01:00
Fabien Potencier
6a18cda5aa
Move functions for HtmlExtension
2023-12-09 18:39:01 +01:00
Fabien Potencier
fdb9d9eddf
Bump dependencies
2023-11-21 15:02:01 +01:00
Christian Flothmann
b8b0c39663
allow Symfony 7 packages to be installed
2023-09-11 13:25:50 +02:00
Fabien Potencier
fa5f1d4c2e
Merge branch '2.x' into 3.x
...
* 2.x:
Bump min deps
2023-07-29 17:34:56 +02:00
Fabien Potencier
c12990f9e7
Bump min deps
2023-07-29 13:31:08 +02:00
Fabien Potencier
08d2037f26
Bump version to 3.6
2023-02-09 07:45:16 +01:00
Fabien Potencier
4650d37fb2
Merge branch '2.x' into 3.x
...
* 2.x:
Fix LICENSE year
2023-02-08 08:44:55 +01:00
Fabien Potencier
872646a70f
Fix LICENSE year
2023-02-08 08:44:48 +01:00
Fabien Potencier
0cfb6f55e9
Merge branch '2.x' into 3.x
...
* 2.x:
Bump LICENSE year
Bump version
Prepare the 2.15.4 release
2023-01-01 09:43:26 +01:00
Fabien Potencier
eb8bde3c41
Bump LICENSE year
2023-01-01 09:42:51 +01:00
Fabien Potencier
0c8f5b2ea4
Bump version to 3.5
2022-12-27 13:23:36 +01:00
Fabien Potencier
5aad8295af
Merge branch '2.x' into 3.x
...
* 2.x:
Bump license year
Typo fix : "flexiblity" ➤ "flexibility"
allow translation-contracts:^3
2022-01-02 11:02:25 +01:00
Fabien Potencier
ce97157b43
Bump license year
2022-01-02 11:02:19 +01:00
Fabien Potencier
33ed3b7e33
Merge branch '2.x' into 3.x
...
* 2.x:
Upgrade to version 4.4 lts at least
2021-11-13 17:20:21 +01:00
noniagriconomie
315e16f5df
Upgrade to version 4.4 lts at least
2021-11-08 13:29:10 +01:00