Skip to content

Commit

Permalink
Feat(web-twig): Add support Twig 1.44.6 for Jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
janicekt authored and literat committed Jul 30, 2022
1 parent 535f024 commit 20aa0f0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/web-twig/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<!-- There should always be "Unreleased" section at the beginning. -->
## Unreleased
- Add support Twig 1.44.6 for Jobs

## 1.3.0 - 2022-03-22
- Add `ButtonLink`, `Container`, `Grid`, `Stack`, `TextField` and `CheckboxField` component
Expand Down
2 changes: 1 addition & 1 deletion packages/web-twig/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This is a Symfony bundle with Twig implementation of [Spirit Design System] comp
## Requirements
- PHP 7.4
- Symfony 3.4+ || 4.2+ || 5.0+
- Twig 2+
- Twig >=1.44.6 || >=2.12.5 || 3+

## Changelog
See [CHANGELOG](./CHANGELOG.md)
Expand Down
2 changes: 1 addition & 1 deletion packages/web-twig/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"symfony/http-foundation": "^3.4 || ^4.2 || ^5.0",
"symfony/http-kernel": "^3.4 || ^4.2 || ^5.0",
"symfony/polyfill-php80": "^1.23",
"twig/twig": "^2.12.5 || ^3.0.0"
"twig/twig": "^1.44.6 || ^2.12.5 || ^3.0.0"
},
"require-dev": {
"phpunit/phpunit": "^9",
Expand Down
7 changes: 6 additions & 1 deletion packages/web-twig/src/Compiler/ComponentLexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,13 @@ public function __construct(Environment $env, array $options, string $twigPathAl
$this->twigPathAlias = $twigPathAlias;
}

public function tokenize(Source $source): TokenStream
/**
* @param Source $source
* @param string|null $name
*/
public function tokenize($source, $name = null): TokenStream
{
assert($source instanceof Source);
$preparsed = $this->preparse($source->getCode());

return parent::tokenize(
Expand Down

0 comments on commit 20aa0f0

Please sign in to comment.