Skip to content

Commit

Permalink
Added compatibility with PHP 8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
batumibiz committed Nov 22, 2024
1 parent 9d52d33 commit 52adf3e
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
tests:
strategy:
matrix:
php-versions: [ '8.2', '8.3' ]
php-versions: [ '8.2', '8.3', '8.4' ]

runs-on: ubuntu-latest

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": "~8.2 || ~8.3"
"php": "~8.2 || ~8.3 || ~8.4"
},
"require-dev": {
"phpunit/phpunit": "^11.4",
Expand Down
60 changes: 28 additions & 32 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/Template/Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public function stop(): void
/**
* Returns the content for a section block
*/
public function section(string $name, string $default = null): ?string
public function section(string $name, string $default = ''): string
{
if (! isset($this->sections[$name])) {
return $default;
Expand Down Expand Up @@ -231,9 +231,9 @@ public function batch(string $var, string $functions): mixed
/**
* Escape string
*/
public function e(string $string, string $functions = null): string
public function e(string $string, string $functions = ''): string
{
if (null !== $functions) {
if ('' !== $functions) {
$string = (string) $this->batch($string, $functions);
}

Expand Down

0 comments on commit 52adf3e

Please sign in to comment.