Skip to content

Commit

Permalink
PHP 8.4 support (#454)
Browse files Browse the repository at this point in the history
* Fix test suite

* phpcbf

* Revert "phpcbf"

This reverts commit b4b739d.

* phpcbf

* revert ci.yml

* remove old code

* PHP 8.4 support
  • Loading branch information
bytestream authored Feb 12, 2025
1 parent 20a3e79 commit b1e0d2b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [ '8.1', '8.2', '8.3']
php: [ '8.1', '8.2', '8.3', '8.4']
laravel: [ '9', '10', '11' ]
exclude:
- laravel: 11
php: 8.1
- laravel: 9
php: 8.4

name: PHP ${{ matrix.php }}; Laravel ${{ matrix.laravel }}

Expand Down
2 changes: 1 addition & 1 deletion src/Bridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Bridge extends Environment
/**
* {@inheritdoc}
*/
public function __construct(LoaderInterface $loader, $options = [], Container $app = null)
public function __construct(LoaderInterface $loader, $options = [], ?Container $app = null)
{
// Twig 2.0 doesn't support `true` anymore
if (isset($options['autoescape']) && $options['autoescape'] === true) {
Expand Down
2 changes: 1 addition & 1 deletion tests/Extension/Laravel/Legacy/FacadesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public function testGetFunction()
$this->assertInstanceOf(TwigFunction::class, $facade->getFunction('foo_bar'));
}

protected function getFacade(Environment $twig = null)
protected function getFacade(?Environment $twig = null)
{
$app = $this->getApplication();

Expand Down

0 comments on commit b1e0d2b

Please sign in to comment.