Skip to content

Commit

Permalink
chore: Compatibility with PHP 8.4 (#FRAM-177)
Browse files Browse the repository at this point in the history
  • Loading branch information
vincent4vx committed Oct 9, 2024
1 parent 12fc55d commit 672cb40
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
php-versions: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
name: PHP ${{ matrix.php-versions }}

steps:
Expand Down
2 changes: 1 addition & 1 deletion src/AbstractElementBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ abstract class AbstractElementBuilder implements ElementBuilderInterface
*
* @param RegistryInterface|null $registry
*/
public function __construct(RegistryInterface $registry = null)
public function __construct(?RegistryInterface $registry = null)
{
$this->registry = $registry ?: new Registry();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Aggregate/ArrayChildBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class ArrayChildBuilder extends ChildBuilder
* @param ArrayElementBuilder $elementBuilder
* @param RegistryInterface|null $registry
*/
public function __construct(string $name, ElementBuilderInterface $elementBuilder, RegistryInterface $registry = null)
public function __construct(string $name, ElementBuilderInterface $elementBuilder, ?RegistryInterface $registry = null)
{
parent::__construct($name, $elementBuilder, $registry);

Expand Down
2 changes: 1 addition & 1 deletion src/Aggregate/ArrayElementBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class ArrayElementBuilder implements ElementBuilderInterface
*
* @param RegistryInterface|null $registry
*/
public function __construct(RegistryInterface $registry = null)
public function __construct(?RegistryInterface $registry = null)
{
$this->registry = $registry ?? new Registry();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Child/ChildBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class ChildBuilder implements ChildBuilderInterface
* @param B $elementBuilder
* @param RegistryInterface|null $registry
*/
public function __construct(string $name, ElementBuilderInterface $elementBuilder, RegistryInterface $registry = null)
public function __construct(string $name, ElementBuilderInterface $elementBuilder, ?RegistryInterface $registry = null)
{
$this->name = $name;
$this->elementBuilder = $elementBuilder;
Expand Down
2 changes: 1 addition & 1 deletion src/Leaf/NumberElementBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ abstract class NumberElementBuilder extends AbstractElementBuilder
*
* @param RegistryInterface|null $registry
*/
public function __construct(RegistryInterface $registry = null)
public function __construct(?RegistryInterface $registry = null)
{
parent::__construct($registry);

Expand Down
2 changes: 1 addition & 1 deletion src/Phone/PhoneChildBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class PhoneChildBuilder extends ChildBuilder
*
* @param PhoneElementBuilder $elementBuilder
*/
public function __construct(string $name, ElementBuilderInterface $elementBuilder, RegistryInterface $registry = null)
public function __construct(string $name, ElementBuilderInterface $elementBuilder, ?RegistryInterface $registry = null)
{
parent::__construct($name, $elementBuilder, $registry);

Expand Down
2 changes: 1 addition & 1 deletion src/Phone/PhoneElementBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class PhoneElementBuilder extends AbstractElementBuilder
*
* @param RegistryInterface|null $registry
*/
public function __construct(RegistryInterface $registry = null)
public function __construct(?RegistryInterface $registry = null)
{
parent::__construct($registry);

Expand Down
2 changes: 1 addition & 1 deletion src/View/FieldViewTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function choices(): ?array
/**
* {@inheritdoc}
*/
public function render(FieldViewRendererInterface $renderer = null): string
public function render(?FieldViewRendererInterface $renderer = null): string
{
return ($renderer ?? $this->defaultRenderer())->render($this, $this->attributes);
}
Expand Down
4 changes: 2 additions & 2 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

// Disable session cookies for CSRF tests
ini_set("session.use_cookies",0);
ini_set("session.use_only_cookies",0);
ini_set("session.use_trans_sid",1);
//ini_set("session.use_only_cookies",0);
//ini_set("session.use_trans_sid",1);
@session_start();

Locale::setDefault('en_US');
Expand Down

0 comments on commit 672cb40

Please sign in to comment.