Commit Graph

6122 Commits

Author SHA1 Message Date
Fabien Potencier 86f5bdccc2 minor #3892 range example leads to Array to string conversion exception (devojifr)
This PR was merged into the 3.x branch.

Discussion
----------

range example leads to Array to string conversion exception

In templates documentation, a range example is displayed and leads to an Array to string conversion exception without a join filter.

Commits
-------

53496507 range example leads to Array to string conversion exception
2023-10-20 17:33:15 +02:00
Fabien Potencier e4780e9cdf minor #3894 fix NumberFormatter::TYPE_CURRENCY being deprecated in PHP 8.3 (mbolli)
This PR was merged into the 3.x branch.

Discussion
----------

fix `NumberFormatter::TYPE_CURRENCY` being deprecated in PHP 8.3

It was never used anyway (by Twig and by PHP), so removing it should not have any side-effects.

Commits
-------

223ba6ec fix `NumberFormatter::TYPE_CURRENCY` being deprecated in PHP 8.3
2023-10-20 17:30:58 +02:00
Michael Bolli 223ba6ecde fix NumberFormatter::TYPE_CURRENCY being deprecated in PHP 8.3 2023-10-20 16:28:22 +02:00
devojifr 5349650781 range example leads to Array to string conversion exception
In templates documentation, a range example is displayed and leads to an Array to string conversion exception without a join filter.
2023-10-14 11:22:02 +02:00
Fabien Potencier 90647839ac minor #3889 Add Twiggy extension for VS Code to docs. (moetelo)
This PR was merged into the 3.x branch.

Discussion
----------

Add `Twiggy` extension for VS Code to docs.

Commits
-------

81799a74 Add `Twiggy` extension for VS Code to docs.
2023-10-12 08:35:06 +02:00
Mikhail Gunin 81799a7461 Add Twiggy extension for VS Code to docs. 2023-10-11 16:09:47 +03:00
Fabien Potencier e5d989fcfa bug #3887 restore return type annotations (xabbuh)
This PR was merged into the 3.x branch.

Discussion
----------

restore return type annotations

Commits
-------

41f1b037 restore return type annotations
2023-10-09 09:05:06 +02:00
Christian Flothmann 41f1b0370a restore return type annotations 2023-10-08 20:59:56 +02:00
Fabien Potencier 2d37866aa2 minor #3882 Fix CS (fabpot)
This PR was merged into the 3.x branch.

Discussion
----------

Fix CS

Commits
-------

5193653e Fix CS
2023-10-08 09:10:40 +02:00
Fabien Potencier 5193653ecb Fix CS 2023-10-08 09:05:22 +02:00
Fabien Potencier 3ae6fb8723 Merge branch '2.x' into 3.x
* 2.x:
  Set Twig 2 end of maintenance to December 2023
2023-09-15 08:04:59 +02:00
Fabien Potencier b83a0446cf Set Twig 2 end of maintenance to December 2023 2023-09-15 07:23:59 +02:00
Fabien Potencier 25382c09cc Merge branch '2.x' into 3.x
* 2.x:
  Remove Drupal tests
2023-09-11 17:41:35 +02:00
Fabien Potencier 974c866961 Remove Drupal tests 2023-09-11 17:40:51 +02:00
Fabien Potencier 0dcf775161 minor #3878 Fix CI (fabpot)
This PR was merged into the 3.x branch.

Discussion
----------

Fix CI

Commits
-------

5f7c48ca Fix tests
2023-09-11 17:39:57 +02:00
Fabien Potencier 5f7c48ca7d Fix tests 2023-09-11 17:36:13 +02:00
Fabien Potencier 680e74e649 minor #3877 allow Symfony 7 packages to be installed (xabbuh)
This PR was merged into the 3.x branch.

Discussion
----------

allow Symfony 7 packages to be installed

Commits
-------

b8b0c396 allow Symfony 7 packages to be installed
2023-09-11 15:24:56 +02:00
Christian Flothmann b8b0c39663 allow Symfony 7 packages to be installed 2023-09-11 13:25:50 +02:00
Fabien Potencier 8ca93d8563 Merge branch '2.x' into 3.x
* 2.x:
  Bump CI actions
2023-09-11 13:19:19 +02:00
Fabien Potencier 4d800d7632 Bump CI actions 2023-09-11 13:19:11 +02:00
Fabien Potencier fd8f61b626 Bump version 2023-08-28 13:10:15 +02:00
Fabien Potencier a0ce373a0c Prepare the 3.7.1 release v3.7.1 2023-08-28 13:09:02 +02:00
Fabien Potencier 9503959e64 Update CHANGELOG 2023-08-28 13:08:35 +02:00
Fabien Potencier fea9dfc028 Merge branch '2.x' into 3.x
* 2.x:
  Reorganize some information
  Add `Twig Language Server` and `Modern Twig` extension to docs
2023-08-02 10:55:38 +02:00
Fabien Potencier ef655c4d6e Reorganize some information 2023-08-02 10:55:33 +02:00
Fabien Potencier 93c664f4c9 minor #3868 Add Twig Language Server and Modern Twig extension to docs (kaermorchen)
This PR was submitted for the 3.x branch but it was merged into the 2.x branch instead.

Discussion
----------

Add `Twig Language Server` and `Modern Twig` extension to docs

Commits
-------

a949600c Add `Twig Language Server` and `Modern Twig` extension to docs
2023-08-02 10:53:44 +02:00
Stanislav Romanov a949600c4b Add Twig Language Server and Modern Twig extension to docs 2023-08-02 10:53:41 +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 b60ed3e085 minor #3865 Bump min deps (fabpot)
This PR was merged into the 2.x branch.

Discussion
----------

Bump min deps

Commits
-------

c12990f9 Bump min deps
2023-07-29 17:33:29 +02:00
Fabien Potencier c12990f9e7 Bump min deps 2023-07-29 13:31:08 +02:00
Fabien Potencier 2e0286630e Merge branch '2.x' into 3.x
* 2.x:
  Fix BC break
  Update Drupal version in tests
  Fix code
  Bump PHP version used by Drupal tests
  add return type for Symfony 7 compatibility
2023-07-29 13:21:17 +02:00
Fabien Potencier 244d5de454 Fix BC break 2023-07-29 13:21:11 +02:00
Fabien Potencier e3804ae8aa bug #3864 Bump PHP version used by Drupal tests (fabpot)
This PR was squashed before being merged into the 2.x branch.

Discussion
----------

Bump PHP version used by Drupal tests

Commits
-------

da38e858 Update Drupal version in tests
64543c3c Fix code
4c4f73ca Bump PHP version used by Drupal tests
2023-07-29 13:19:42 +02:00
Fabien Potencier da38e858e3 Update Drupal version in tests 2023-07-28 12:21:15 +02:00
Fabien Potencier 64543c3c49 Fix code 2023-07-28 12:18:03 +02:00
Fabien Potencier 4c4f73ca70 Bump PHP version used by Drupal tests 2023-07-28 11:59:50 +02:00
Fabien Potencier ae105b385b minor #3862 Fix callable phpdoc for twig elements (VincentLanglet)
This PR was merged into the 3.x branch.

Discussion
----------

Fix callable phpdoc for twig elements

Hi `@fabpot`
I made a stupid mistake in https://github.com/twigphp/Twig/pull/3856

The correct phpdoc is `array{class-string, string}` and not `array<class-string, string>`.

Code is used this way
```
$compiler->raw(sprintf('$this->env->getRuntime(\'%s\')->%s', $callable[0], $callable[1]));
```
which means the key 0 is a class string, and the key 1 is a string.

`array{class-string, string}` is same as `array{0: class-string, 1: string}`
`array<class-string, string>` is saying all the keys are class-string, and values are string.

Commits
-------

1b58589d Fix callable phpdoc
2023-07-28 11:58:50 +02:00
Fabien Potencier 91a42f7f22 minor #3863 add return type for Symfony 7 compatibility (xabbuh)
This PR was merged into the 2.x branch.

Discussion
----------

add return type for Symfony 7 compatibility

Commits
-------

fac08ec7 add return type for Symfony 7 compatibility
2023-07-28 11:54:15 +02:00
Christian Flothmann fac08ec7d3 add return type for Symfony 7 compatibility 2023-07-27 11:30:49 +02:00
Vincent Langlet 1b58589d56 Fix callable phpdoc 2023-07-27 10:17:36 +02:00
Fabien Potencier 9a9580fff9 Bump version 2023-07-26 09:17:41 +02:00
Fabien Potencier 5cf942bbab Prepare the 3.7.0 release v3.7.0 2023-07-26 09:16:09 +02:00
Fabien Potencier 07c4b11399 Update CHANGELOG 2023-07-26 09:15:15 +02:00
Nicolas Grekas 4ef92bf092 minor #3860 Fix spread operator implementation (nicolas-grekas)
This PR was merged into the 3.x branch.

Discussion
----------

Fix spread operator implementation

#3839 is too invasive, leading to failures like https://github.com/symfony/symfony/actions/runs/5612246672/jobs/10269741115

Commits
-------

75efa5e1 Fix spread operator implementation
2023-07-20 18:36:01 +02:00
Nicolas Grekas 75efa5e1ba Fix spread operator implementation 2023-07-20 18:11:45 +02:00
Fabien Potencier 09177a7006 feature #3839 Adding support for the ...spread operator on arrays and hashes (weaverryan)
This PR was squashed before being merged into the 3.x branch.

Discussion
----------

Adding support for the ...spread operator on arrays and hashes

Hi!

Long time user, first time contributor of a real future. I hope I didn't miss anything - but this seemed quite straightforward in the end.

Notes:
* In PHP 7.3 or lower, using the spread operator will result in a Twig syntax error.
* In 8.0 or lower, using the spread operator on a hash will result in a Twig syntax error.

fabbot failures are unrelated, so I'm not touching them.

Cheers!

Commits
-------

ba4fe3ba Adding support for the ...spread operator on arrays and hashes
2023-07-20 16:08:59 +02:00
Ryan Weaver ba4fe3ba34 Adding support for the ...spread operator on arrays and hashes 2023-07-20 16:08:57 +02:00
Fabien Potencier e145d36266 minor #3856 Fix callable phpdoc for twig elements (VincentLanglet)
This PR was merged into the 3.x branch.

Discussion
----------

Fix callable phpdoc for twig elements

Hi `@fabpot`
```
[MyRuntime::class, 'myMethod]
```
is not a valid callable in PHP 8 https://3v4l.org/tWqPs

But this syntax is supported because twig has a special behavior
```
$compiler->raw(sprintf('$this->env->getRuntime(\'%s\')->%s', $callable[0], $callable[1]));
```

The PHPDoc should be updated in order to reflect the real behavior and solve static analysis errors.
A phpstan discussion can be found here: https://github.com/phpstan/phpstan/discussions/9567

Commits
-------

cd68de5e Fix callable phpdoc for twig elements
2023-07-05 12:13:55 +02:00
Vincent Langlet cd68de5e06 Fix callable phpdoc for twig elements 2023-07-05 11:30:59 +02:00
Fabien Potencier 58f7b22081 minor #3854 add extra example to slice filter (expedition-robin-martijn)
This PR was merged into the 3.x branch.

Discussion
----------

add extra example to slice filter

Commits
-------

0170dc3c add extra example to slice filter
2023-06-30 08:17:55 +02:00