Skip to content

Commit ed6b336

Browse files
committed
Use >= operator in #[RequiresPhp] attributes to allow compatible versions
1 parent 374e1b0 commit ed6b336

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

Tests/LazyProxyTraitTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
use Symfony\Component\VarExporter\Tests\Fixtures\LazyProxy\TestWakeupClass;
3333
use Symfony\Component\VarExporter\Tests\Fixtures\SimpleObject;
3434

35-
#[RequiresPhp('8.4')]
35+
#[RequiresPhp('>=8.4')]
3636
class LazyProxyTraitTest extends TestCase
3737
{
3838
public function testGetter()
@@ -303,7 +303,7 @@ public function testReinitReadonlyLazyProxy()
303303
$this->assertSame(234, $object->foo);
304304
}
305305

306-
#[RequiresPhp('8.4')]
306+
#[RequiresPhp('>=8.4')]
307307
public function testConcretePropertyHooks()
308308
{
309309
$initialized = false;
@@ -330,7 +330,7 @@ public function testConcretePropertyHooks()
330330
$this->assertSame(345, $object->backed);
331331
}
332332

333-
#[RequiresPhp('8.4')]
333+
#[RequiresPhp('>=8.4')]
334334
public function testAbstractPropertyHooks()
335335
{
336336
$initialized = false;
@@ -362,7 +362,7 @@ public function testAbstractPropertyHooks()
362362
$this->assertTrue($initialized);
363363
}
364364

365-
#[RequiresPhp('8.4')]
365+
#[RequiresPhp('>=8.4')]
366366
public function testAsymmetricVisibility()
367367
{
368368
$object = $this->createLazyProxy(AsymmetricVisibility::class, function () {

Tests/LegacyLazyGhostTraitTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ public function testIndirectModification()
242242
$this->assertSame([123], $proxy->foo);
243243
}
244244

245-
#[RequiresPhp('8.3')]
245+
#[RequiresPhp('>=8.3')]
246246
public function testReadOnlyClass()
247247
{
248248
$proxy = $this->createLazyGhost(ReadOnlyClass::class, fn ($proxy) => $proxy->__construct(123));
@@ -296,7 +296,7 @@ public function testReinitLazyGhost()
296296
$this->assertSame(3, $object->public);
297297
}
298298

299-
#[RequiresPhp('8.4')]
299+
#[RequiresPhp('>=8.4')]
300300
public function testPropertyHooks()
301301
{
302302
$initialized = false;
@@ -319,7 +319,7 @@ public function testPropertyHooks()
319319
$this->assertSame(345, $object->backed);
320320
}
321321

322-
#[RequiresPhp('8.4')]
322+
#[RequiresPhp('>=8.4')]
323323
public function testPropertyHooksWithDefaultValue()
324324
{
325325
$initialized = false;
@@ -345,7 +345,7 @@ public function testPropertyHooksWithDefaultValue()
345345
$this->assertTrue($object->backedBoolWithDefault);
346346
}
347347

348-
#[RequiresPhp('8.4')]
348+
#[RequiresPhp('>=8.4')]
349349
public function testAsymmetricVisibility()
350350
{
351351
$object = $this->createLazyGhost(AsymmetricVisibility::class, function ($instance) {

Tests/ProxyHelperTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
use Symfony\Component\VarExporter\Tests\Fixtures\LazyProxy\Hooked;
1919
use Symfony\Component\VarExporter\Tests\Fixtures\LazyProxy\Php82NullStandaloneReturnType;
2020

21-
#[RequiresPhp('8.4')]
21+
#[RequiresPhp('>=8.4')]
2222
class ProxyHelperTest extends TestCase
2323
{
2424
#[DataProvider('provideExportSignature')]
@@ -278,7 +278,7 @@ public function testNullStandaloneReturnType()
278278
);
279279
}
280280

281-
#[RequiresPhp('8.4')]
281+
#[RequiresPhp('>=8.4')]
282282
public function testPropertyHooks()
283283
{
284284
$proxyCode = ProxyHelper::generateLazyProxy(new \ReflectionClass(Hooked::class));

0 commit comments

Comments
 (0)