Skip to content

Commit e2a499d

Browse files
author
MateuszKolankowski
committed
Reverted changes
1 parent 78374e0 commit e2a499d

File tree

19 files changed

+238
-127
lines changed

19 files changed

+238
-127
lines changed

phpstan-baseline-gte-8.4.neon

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,39 @@ parameters:
4141
identifier: unset.possiblyHookedProperty
4242
count: 1
4343
path: tests/lib/Repository/Values/User/UserTest.php
44+
45+
-
46+
message: '#^Cannot unset property .* because it might have hooks in a subclass\.$#'
47+
identifier: unset.possiblyHookedProperty
48+
count: 3
49+
path: tests/bundle/Core/EventListener/BackgroundIndexingTerminateListenerTest.php
50+
51+
-
52+
message: '#^Cannot unset property .* because it might have hooks in a subclass\.$#'
53+
identifier: unset.possiblyHookedProperty
54+
count: 9
55+
path: tests/lib/Persistence/Cache/AbstractBaseHandlerTest.php
56+
57+
-
58+
message: '#^Cannot unset property .* because it might have hooks in a subclass\.$#'
59+
identifier: unset.possiblyHookedProperty
60+
count: 3
61+
path: tests/lib/Persistence/Cache/Adapter/InMemoryClearingProxyAdapterTest.php
62+
63+
-
64+
message: '#^Cannot unset property .* because it might have hooks in a subclass\.$#'
65+
identifier: unset.possiblyHookedProperty
66+
count: 1
67+
path: tests/lib/Persistence/Cache/InMemory/InMemoryCacheTest.php
68+
69+
-
70+
message: '#^Cannot unset property .* because it might have hooks in a subclass\.$#'
71+
identifier: unset.possiblyHookedProperty
72+
count: 1
73+
path: tests/lib/Persistence/Cache/PersistenceLoggerTest.php
74+
75+
-
76+
message: '#^Cannot unset property .* because it might have hooks in a subclass\.$#'
77+
identifier: unset.possiblyHookedProperty
78+
count: 3
79+
path: tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php

phpstan-baseline.neon

Lines changed: 131 additions & 101 deletions
Large diffs are not rendered by default.

phpstan-baseline.neon.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,10 @@
2424
$includes[] = __DIR__ . '/phpstan-baseline-lte-8.1.neon';
2525
}
2626

27-
if (PHP_VERSION_ID < 80400) {
28-
$includes[] = __DIR__ . '/phpstan-baseline-lte-8.3.neon';
29-
}
3027
if (PHP_VERSION_ID >= 80400) {
3128
$includes[] = __DIR__ . '/phpstan-baseline-gte-8.4.neon';
29+
} else {
30+
$includes[] = __DIR__ . '/phpstan-baseline-lte-8.3.neon';
3231
}
3332

3433
$versionParser = new VersionParser();

src/bundle/Core/Imagine/IORepositoryResolver.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ public function store(BinaryInterface $binary, $path, $filter)
9292
$tmpFile = tmpfile();
9393
fwrite($tmpFile, $binary->getContent());
9494
$tmpMetadata = stream_get_meta_data($tmpFile);
95+
9596
$binaryCreateStruct = $this->ioService->newBinaryCreateStructFromLocalFile($tmpMetadata['uri']);
9697
$binaryCreateStruct->id = $this->getFilePath($path, $filter);
9798
$this->ioService->createBinaryFile($binaryCreateStruct);

src/lib/Base/Exceptions/LimitationValidationException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class LimitationValidationException extends APILimitationValidationException imp
3434
*/
3535
public function __construct(array $errors)
3636
{
37-
$this->errors = $errors;
37+
$this->validationErrors = $errors;
3838
$this->setMessageTemplate('Limitations did not validate');
3939
parent::__construct($this->getBaseTranslation());
4040
}

tests/bundle/Core/DependencyInjection/Configuration/Parser/LanguagesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ protected function getContainerExtensions(): array
1919

2020
protected function getMinimalConfiguration(): array
2121
{
22-
return Yaml::parse(file_get_contents(__DIR__ . '/../../Fixtures/ezpublish_minimal.yml'));
22+
return $this->minimalConfig = Yaml::parse(file_get_contents(__DIR__ . '/../../Fixtures/ezpublish_minimal.yml'));
2323
}
2424

2525
public function testLanguagesSingleSiteaccess()

tests/bundle/Core/EventListener/BackgroundIndexingTerminateListenerTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ protected function setUp(): void
4040
);
4141
}
4242

43+
protected function tearDown(): void
44+
{
45+
unset($this->persistenceMock, $this->searchMock, $this->listener);
46+
parent::tearDown();
47+
}
48+
4349
public function testGetSubscribedEvents()
4450
{
4551
self::assertSame(

tests/bundle/Core/EventListener/RoutingListenerTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Ibexa\Core\MVC\Symfony\Routing\Generator\UrlAliasGenerator;
1515
use Ibexa\Core\MVC\Symfony\SiteAccess;
1616
use PHPUnit\Framework\TestCase;
17+
use Symfony\Component\DependencyInjection\ContainerInterface;
1718
use Symfony\Component\HttpFoundation\Request;
1819
use Symfony\Component\HttpKernel\HttpKernelInterface;
1920

@@ -31,6 +32,7 @@ class RoutingListenerTest extends TestCase
3132
protected function setUp(): void
3233
{
3334
parent::setUp();
35+
$this->container = $this->createMock(ContainerInterface::class);
3436
$this->configResolver = $this->createMock(ConfigResolverInterface::class);
3537
$this->urlAliasRouter = $this->createMock(UrlAliasRouter::class);
3638
$this->urlAliasGenerator = $this->createMock(UrlAliasGenerator::class);

tests/bundle/Core/EventListener/SessionSetDynamicNameListenerTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use PHPUnit\Framework\TestCase;
1515
use Symfony\Component\HttpFoundation\Request;
1616
use Symfony\Component\HttpFoundation\Session\Session;
17+
use Symfony\Component\HttpFoundation\Session\SessionInterface as SymfonySessionInterface;
1718
use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
1819
use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage;
1920
use Symfony\Component\HttpFoundation\Session\Storage\SessionStorageFactoryInterface;
@@ -36,6 +37,9 @@ protected function setUp(): void
3637
$this->configResolver = $this->getMockBuilder(ConfigResolverInterface::class)
3738
->disableOriginalConstructor()
3839
->getMock();
40+
$this->session = $this->getMockBuilder(SymfonySessionInterface::class)
41+
->disableOriginalConstructor()
42+
->getMock();
3943
$this->sessionStorage = $this->getMockBuilder(NativeSessionStorage::class)
4044
->disableOriginalConstructor()
4145
->getMock();

tests/bundle/Core/Routing/UrlAliasRouterTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
use Ibexa\Core\MVC\Symfony\View\Manager as ViewManager;
1818
use Ibexa\Core\Repository\Values\Content\Location;
1919
use Ibexa\Tests\Core\MVC\Symfony\Routing\UrlAliasRouterTest as BaseUrlAliasRouterTest;
20+
use Symfony\Component\DependencyInjection\ContainerInterface;
2021
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
2122
use Symfony\Component\Routing\RequestContext;
2223

@@ -57,6 +58,7 @@ protected function getRouter(LocationService $locationService, URLAliasService $
5758
protected function resetConfigResolver()
5859
{
5960
$this->configResolver = $this->createMock(ConfigResolverInterface::class);
61+
$this->container = $this->createMock(ContainerInterface::class);
6062
$this->router->setConfigResolver($this->configResolver);
6163
}
6264

0 commit comments

Comments
 (0)