Skip to content

Commit 1eaef8a

Browse files
committed
Resolve 8.2 deprecation warnings
1 parent 2535912 commit 1eaef8a

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

src/Post.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Timber\Post as TimberPost;
99
use Timber\Timber;
1010

11+
#[\AllowDynamicProperties]
1112
class Post extends TimberPost
1213
{
1314
use Macroable {
@@ -46,15 +47,15 @@ public static function __callStatic($name, $arguments)
4647
return call_user_func_array([$builder, $name], $arguments);
4748
}
4849

49-
trigger_error('Call to undefined method '.__CLASS__.'::'.$name.'()', E_USER_ERROR);
50+
trigger_error('Call to undefined method ' . __CLASS__ . '::' . $name . '()', E_USER_ERROR);
5051
}
5152

5253
/**
5354
* Create a QueryBuilder scoped to this Post type
5455
*
5556
* @return ScopedQueryBuilder
5657
*/
57-
public static function builder() : ScopedQueryBuilder
58+
public static function builder(): ScopedQueryBuilder
5859
{
5960
return new ScopedQueryBuilder(static::class);
6061
}

tests/Unit/ApplicationTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,8 @@ public function calling_detectWhenRequestHasNotBeenHandled_adds_actions()
552552

553553
class BootstrapperBootstrapTester
554554
{
555+
public $callback;
556+
555557
public function __construct($callback)
556558
{
557559
$this->callback = $callback;
@@ -560,6 +562,8 @@ public function __construct($callback)
560562

561563
abstract class TestBootstrapperBase
562564
{
565+
private BootstrapperBootstrapTester $tester;
566+
563567
public function __construct(BootstrapperBootstrapTester $tester)
564568
{
565569
$this->tester = $tester;

tests/Unit/PostQueryBuilderTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ class PostQueryBuilderTest extends TestCase
1515
use \Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration,
1616
\DMS\PHPUnitExtensions\ArraySubset\ArraySubsetAsserts;
1717

18+
private Application $app;
19+
1820
public function setUp(): void
1921
{
2022
$this->app = new Application;

tests/Unit/ScopedQueryBuilderTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ class ScopedQueryBuilderTest extends TestCase
1717
use \Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration,
1818
\DMS\PHPUnitExtensions\ArraySubset\ArraySubsetAsserts;
1919

20+
private Application $app;
21+
2022
public function setUp(): void
2123
{
2224
$this->app = new Application;

0 commit comments

Comments
 (0)