Skip to content

Commit

Permalink
minor #1118 [TwigComponent] Remove 3 futures deprecations (minor) (sm…
Browse files Browse the repository at this point in the history
…nandre)

This PR was squashed before being merged into the 2.x branch.

Discussion
----------

[TwigComponent] Remove 3 futures deprecations (minor)

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| License       | MIT

Fix deprecations

Framework
```
1x: Since symfony/framework-bundle 6.4: Not setting the "framework.handle_all_throwables" config option is deprecated. It will default to "true" in 7.0.
1x in ComponentFactoryTest::testTwigComponentServiceTagWithoutKeyButCollissionCausesAnException from Symfony\UX\TwigComponent\Tests\Integration

1x: Since symfony/framework-bundle 6.4: Not setting the "framework.php_errors.log" config option is deprecated. It will default to "true" in 7.0.
1x in ComponentFactoryTest::testTwigComponentServiceTagWithoutKeyButCollissionCausesAnException from Symfony\UX\TwigComponent\Tests\Integration
```

PHPUnit
```
1) Symfony\UX\TwigComponent\Tests\Unit\TwigPreLexerTest::testPreLex
Data Provider method Symfony\UX\TwigComponent\Tests\Unit\TwigPreLexerTest::getLexTests() is not static
```

Commits
-------

531700e [TwigComponent] Remove 3 futures deprecations (minor)
  • Loading branch information
weaverryan committed Sep 18, 2023
2 parents fe076a9 + 531700e commit c1c19b9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions src/TwigComponent/tests/Fixtures/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,19 @@ public function registerBundles(): iterable

protected function configureContainer(ContainerConfigurator $c): void
{
$c->extension('framework', [
$frameworkConfig = [
'secret' => 'S3CRET',
'test' => true,
'router' => ['utf8' => true],
'secrets' => false,
'http_method_override' => false,
]);
'php_errors' => ['log' => true],
];
if (self::VERSION_ID >= 60200) {
$frameworkConfig['handle_all_throwables'] = true;
}
$c->extension('framework', $frameworkConfig);

$c->extension('twig', [
'default_path' => '%kernel.project_dir%/tests/Fixtures/templates',
]);
Expand Down
2 changes: 1 addition & 1 deletion src/TwigComponent/tests/Unit/TwigPreLexerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function testPreLex(string $input, string $expectedOutput): void
$this->assertSame($expectedOutput, $lexer->preLexComponents($input));
}

public function getLexTests(): iterable
public static function getLexTests(): iterable
{
yield 'simple_component' => [
'<twig:foo />',
Expand Down

0 comments on commit c1c19b9

Please sign in to comment.