8000 fix tests · priyadi/symfony@d6352f8 · GitHub
[go: up one dir, main page]

Skip to content

Commit d6352f8

Browse files
committed
fix tests
1 parent 84c231e commit d6352f8

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/Symfony/Component/DependencyInjection/Tests/Fixtures/ReadonlyTest.php renamed to src/Symfony/Component/DependencyInjection/Tests/Fixtures/ReadOnlyClass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Symfony\Component\DependencyInjection\Tests\Fixtures;
1313

14-
readonly class ReadonlyTest
14+
readonly class ReadOnlyClass
1515
{
1616
public function say(): string
1717
{

src/Symfony/Component/DependencyInjection/Tests/LazyProxy/PhpDumper/LazyServiceDumperTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use Symfony\Component\DependencyInjection\Definition;
1717
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
1818
use Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\LazyServiceDumper;
19-
use Symfony\Component\DependencyInjection\Tests\Fixtures\ReadonlyTest;
19+
use Symfony\Component\DependencyInjection\Tests\Fixtures\ReadOnlyClass;
2020

2121
class LazyServiceDumperTest extends TestCase
2222
{
@@ -55,15 +55,15 @@ public function testInvalidClass()
5555
}
5656

5757
/**
58-
* @requires PHP 8.2
58+
* @requires PHP 8.3
5959
*/
6060
public function testReadonlyClass()
6161
{
6262
$dumper = new LazyServiceDumper();
63-
$definition = (new Definition(ReadonlyTest::class))->setLazy(true);
63+
$definition = (new Definition(ReadOnlyClass::class))->setLazy(true);
6464

6565
$this->assertTrue($dumper->isProxyCandidate($definition));
66-
$this->assertStringContainsString('readonly class ReadonlyTestGhost', $dumper->getProxyCode($definition));
66+
$this->assertStringContainsString('readonly class ReadOnlyClassGhost', $dumper->getProxyCode($definition));
6767
}
6868
}
6969

src/Symfony/Component/VarExporter/ProxyHelper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ final class ProxyHelper
2828
public static function generateLazyGhost(\ReflectionClass $class): string
2929
{
3030
if (\PHP_VERSION_ID >= 80200 && \PHP_VERSION_ID < 80300 && $class->isReadOnly()) {
31-
throw new LogicException(sprintf('Cannot generate lazy ghost: class "%s" is readonly.', $class->name));
31+
throw new LogicException(sprintf('Cannot generate lazy ghost with PHP < 8.3: class "%s" is readonly.', $class->name));
3232
}
3333
if ($class->isFinal()) {
3434
throw new LogicException(sprintf('Cannot generate lazy ghost: class "%s" is final.', $class->name));
@@ -92,7 +92,7 @@ public static function generateLazyProxy(?\ReflectionClass $class, array $interf
9292
throw new LogicException(sprintf('Cannot generate lazy proxy: class "%s" is final.', $class->name));
9393
}
9494
if (\PHP_VERSION_ID >= 80200 && \PHP_VERSION_ID < 80300 && $class?->isReadOnly()) {
95-
throw new LogicException(sprintf('Cannot generate lazy proxy: class "%s" is readonly.', $class->name));
95+
throw new LogicException(sprintf('Cannot generate lazy proxy with PHP < 8.3: class "%s" is readonly.', $class->name));
9696
}
9797

9898
$methodReflectors = [$class?->getMethods(\ReflectionMethod::IS_PUBLIC | \ReflectionMethod::IS_PROTECTED) ?? []];

0 commit comments

Comments
 (0)
0