Skip to content

Commit

Permalink
chore: Compatibility with PHP 8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
vincent4vx committed Jan 4, 2023
1 parent a0f5f01 commit b458a49
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/php.yml
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']
php-versions: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
name: PHP ${{ matrix.php-versions }}

steps:
Expand Down
6 changes: 4 additions & 2 deletions tests/Custom/CustomFormTest.php
Expand Up @@ -354,10 +354,10 @@ public function test_attach()
$person->firstName = 'John';
$person->lastName = 'Doe';
$person->birthDate = new \DateTime('1992-05-22');
$person->foo = 'bar';
$person->notDeclaredOnForm = 'foo';

$this->assertSame($this->form, $this->form->attach($person));
$this->assertEquals('bar', $this->form->value()->foo);
$this->assertSame('foo', $this->form->value()->notDeclaredOnForm);
$this->assertNull($this->form['firstName']->element()->value());
$this->assertNull($this->form['lastName']->element()->value());
$this->assertNull($this->form['birthDate']->element()->value());
Expand Down Expand Up @@ -505,4 +505,6 @@ class Person
public $firstName;
public $lastName;
public $birthDate;

public $notDeclaredOnForm;
}
2 changes: 1 addition & 1 deletion tests/Filter/TrimFilterTest.php
Expand Up @@ -28,7 +28,7 @@ public function test_trim_not_utf8()
{
$filter = new TrimFilter();

$this->assertEquals(utf8_decode('é'), $filter->filter(utf8_decode(' é '), $this->createMock(ChildInterface::class), null));
$this->assertEquals(mb_convert_encoding('é', 'ISO-8859-1'), $filter->filter(mb_convert_encoding(' é ', 'ISO-8859-1'), $this->createMock(ChildInterface::class), null));
}

public function test_instance()
Expand Down

0 comments on commit b458a49

Please sign in to comment.