Skip to content

Commit

Permalink
Merge branch '2.6' into tagged_iterator_rules
Browse files Browse the repository at this point in the history
  • Loading branch information
mamazu committed May 10, 2024
2 parents 8021148 + 93f7f5b commit 0c4a28c
Show file tree
Hide file tree
Showing 135 changed files with 536 additions and 487 deletions.
226 changes: 113 additions & 113 deletions UPGRADE.md

Large diffs are not rendered by default.

40 changes: 0 additions & 40 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -12280,41 +12280,21 @@ parameters:
count: 1
path: src/Sulu/Bundle/HttpCacheBundle/Tests/Unit/EventSubscriber/InvalidationSubscriberTest.php

-
message: "#^Method Sulu\\\\Bundle\\\\HttpCacheBundle\\\\Tests\\\\Unit\\\\EventSubscriber\\\\InvalidationSubscriberTest\\:\\:testInvalidateDocumentBeforePublishing\\(\\) has parameter \\$request with no type specified\\.$#"
count: 1
path: src/Sulu/Bundle/HttpCacheBundle/Tests/Unit/EventSubscriber/InvalidationSubscriberTest.php

-
message: "#^Method Sulu\\\\Bundle\\\\HttpCacheBundle\\\\Tests\\\\Unit\\\\EventSubscriber\\\\InvalidationSubscriberTest\\:\\:testInvalidateDocumentBeforePublishing\\(\\) has parameter \\$scheme with no type specified\\.$#"
count: 1
path: src/Sulu/Bundle/HttpCacheBundle/Tests/Unit/EventSubscriber/InvalidationSubscriberTest.php

-
message: "#^Method Sulu\\\\Bundle\\\\HttpCacheBundle\\\\Tests\\\\Unit\\\\EventSubscriber\\\\InvalidationSubscriberTest\\:\\:testInvalidateDocumentBeforeRemoving\\(\\) has parameter \\$request with no type specified\\.$#"
count: 1
path: src/Sulu/Bundle/HttpCacheBundle/Tests/Unit/EventSubscriber/InvalidationSubscriberTest.php

-
message: "#^Method Sulu\\\\Bundle\\\\HttpCacheBundle\\\\Tests\\\\Unit\\\\EventSubscriber\\\\InvalidationSubscriberTest\\:\\:testInvalidateDocumentBeforeRemoving\\(\\) has parameter \\$scheme with no type specified\\.$#"
count: 1
path: src/Sulu/Bundle/HttpCacheBundle/Tests/Unit/EventSubscriber/InvalidationSubscriberTest.php

-
message: "#^Method Sulu\\\\Bundle\\\\HttpCacheBundle\\\\Tests\\\\Unit\\\\EventSubscriber\\\\InvalidationSubscriberTest\\:\\:testInvalidateDocumentBeforeRemovingLocale\\(\\) has parameter \\$request with no type specified\\.$#"
count: 1
path: src/Sulu/Bundle/HttpCacheBundle/Tests/Unit/EventSubscriber/InvalidationSubscriberTest.php

-
message: "#^Method Sulu\\\\Bundle\\\\HttpCacheBundle\\\\Tests\\\\Unit\\\\EventSubscriber\\\\InvalidationSubscriberTest\\:\\:testInvalidateDocumentBeforeRemovingLocale\\(\\) has parameter \\$scheme with no type specified\\.$#"
count: 1
path: src/Sulu/Bundle/HttpCacheBundle/Tests/Unit/EventSubscriber/InvalidationSubscriberTest.php

-
message: "#^Method Sulu\\\\Bundle\\\\HttpCacheBundle\\\\Tests\\\\Unit\\\\EventSubscriber\\\\InvalidationSubscriberTest\\:\\:testInvalidateDocumentBeforeUnpublishing\\(\\) has parameter \\$request with no type specified\\.$#"
count: 1
path: src/Sulu/Bundle/HttpCacheBundle/Tests/Unit/EventSubscriber/InvalidationSubscriberTest.php

-
message: "#^Method Sulu\\\\Bundle\\\\HttpCacheBundle\\\\Tests\\\\Unit\\\\EventSubscriber\\\\InvalidationSubscriberTest\\:\\:testInvalidateDocumentBeforeUnpublishing\\(\\) has parameter \\$scheme with no type specified\\.$#"
count: 1
Expand Down Expand Up @@ -34865,11 +34845,6 @@ parameters:
count: 1
path: src/Sulu/Component/Contact/Tests/Unit/SmartContent/AccountDataProviderTest.php

-
message: "#^Method Sulu\\\\Component\\\\Contact\\\\Tests\\\\Unit\\\\SmartContent\\\\AccountDataProviderTest\\:\\:createAccount\\(\\) has no return type specified\\.$#"
count: 1
path: src/Sulu/Component/Contact/Tests/Unit/SmartContent/AccountDataProviderTest.php

-
message: "#^Method Sulu\\\\Component\\\\Contact\\\\Tests\\\\Unit\\\\SmartContent\\\\AccountDataProviderTest\\:\\:createAccount\\(\\) has parameter \\$id with no type specified\\.$#"
count: 1
Expand Down Expand Up @@ -41810,16 +41785,6 @@ parameters:
count: 1
path: src/Sulu/Component/Content/Tests/Unit/Extension/ExtensionManagerTest.php

-
message: "#^Method Sulu\\\\Component\\\\Content\\\\Tests\\\\Unit\\\\Extension\\\\ExtensionManagerTest\\:\\:getExtension\\(\\) has no return type specified\\.$#"
count: 1
path: src/Sulu/Component/Content/Tests/Unit/Extension/ExtensionManagerTest.php

-
message: "#^Method Sulu\\\\Component\\\\Content\\\\Tests\\\\Unit\\\\Extension\\\\ExtensionManagerTest\\:\\:getExtension\\(\\) has parameter \\$name with no type specified\\.$#"
count: 1
path: src/Sulu/Component/Content/Tests/Unit/Extension/ExtensionManagerTest.php

-
message: "#^Method Sulu\\\\Component\\\\Content\\\\Tests\\\\Unit\\\\Extension\\\\ExtensionManagerTest\\:\\:getProvider\\(\\) has no return type specified\\.$#"
count: 1
Expand Down Expand Up @@ -46505,11 +46470,6 @@ parameters:
count: 1
path: src/Sulu/Component/Media/Tests/Unit/SmartContent/MediaDataProviderTest.php

-
message: "#^Method Sulu\\\\Component\\\\Media\\\\Tests\\\\Unit\\\\SmartContent\\\\MediaDataProviderTest\\:\\:createMedia\\(\\) has no return type specified\\.$#"
count: 1
path: src/Sulu/Component/Media/Tests/Unit/SmartContent/MediaDataProviderTest.php

-
message: "#^Method Sulu\\\\Component\\\\Media\\\\Tests\\\\Unit\\\\SmartContent\\\\MediaDataProviderTest\\:\\:createMedia\\(\\) has parameter \\$id with no type specified\\.$#"
count: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function setUp(): void
/**
* @return \Generator<mixed[]>
*/
public function provideCgetAction(): \Generator
public static function provideCgetAction(): \Generator
{
yield [
[],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function testBuildFormOverlayListViewWithoutListAdapters(): void
->getView();
}

public function provideBuildFormOverlayListView()
public static function provideBuildFormOverlayListView()
{
return [
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function testBuildFormViewWithoutResourceKey(): void
->getView();
}

public function provideBuildFormView()
public static function provideBuildFormView()
{
return [
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function testBuildListViewWithoutListAdapters(): void
->getView();
}

public function provideBuildListView()
public static function provideBuildListView()
{
return [
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function testBuildPreviewFormViewWithoutResourceKey(): void
->getView();
}

public function provideBuildPreviewFormView()
public static function provideBuildPreviewFormView()
{
return [
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function testBuildResourceTabViewWithoutResourceKey(): void
->getView();
}

public function provideBuildResourceTabView()
public static function provideBuildResourceTabView()
{
return [
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function testBuildTabViewWithClone(): void
$this->assertNotSame($viewBuilder->getView(), $viewBuilder->getView());
}

public function provideBuildTabView()
public static function provideBuildTabView()
{
return [
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

class ViewBuilderTest extends TestCase
{
public function provideBuildView()
public static function provideBuildView()
{
return [
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ public function testMetadataActionWithOptions(): void
$this->adminController->metadataAction('form', 'pages', $request);
}

public function provideTranslationsAction()
public static function provideTranslationsAction()
{
return [
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function testFindWithNotExistingCacheItem(): void
$this->assertNull($result);
}

public function provideUpdate()
public static function provideUpdate()
{
return [
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

class ArrayMetadataTest extends TestCase
{
public function provideToJsonSchema()
public static function provideToJsonSchema()
{
return [
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

class ConstMetadataTest extends TestCase
{
public function provideToJsonSchema()
public static function provideToJsonSchema()
{
return [
['Homepage', ['const' => 'Homepage']],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

class PropertyMetadataTest extends TestCase
{
public function provideGetter()
public static function provideGetter()
{
return [
['title', true],
Expand All @@ -36,7 +36,7 @@ public function testGetter($name, $mandatory): void
$this->assertEquals($mandatory, $property->isMandatory());
}

public function provideToJsonSchema()
public static function provideToJsonSchema()
{
return [
['title', false, null, null],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

/*
* This file is part of Sulu.
*
* (c) Sulu GmbH
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/

namespace Sulu\Bundle\AudienceTargetingBundle\DependencyInjection\Compiler;

use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;

/**
* @internal
* @deprecated
*/
class AddRulesPass implements CompilerPassInterface
{
public function process(ContainerBuilder $container)
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,18 @@
use Prophecy\PhpUnit\ProphecyTrait;
use Prophecy\Prophecy\ObjectProphecy;
use Sulu\Bundle\AudienceTargetingBundle\Controller\TargetGroupEvaluationController;
use Sulu\Bundle\AudienceTargetingBundle\Entity\TargetGroupInterface;
use Sulu\Bundle\AudienceTargetingBundle\Entity\TargetGroup;
use Sulu\Bundle\AudienceTargetingBundle\Entity\TargetGroupRepositoryInterface;
use Sulu\Bundle\AudienceTargetingBundle\Entity\TargetGroupRuleInterface;
use Sulu\Bundle\AudienceTargetingBundle\TargetGroup\TargetGroupEvaluatorInterface;
use Sulu\Bundle\AudienceTargetingBundle\TargetGroup\TargetGroupStoreInterface;
use Sulu\Bundle\TestBundle\Testing\SetGetPrivatePropertyTrait;
use Symfony\Component\HttpFoundation\Request;

class TargetGroupEvaluationControllerTest extends TestCase
{
use ProphecyTrait;
use SetGetPrivatePropertyTrait;

/**
* @var ObjectProphecy<TargetGroupEvaluatorInterface>
Expand Down Expand Up @@ -80,23 +82,22 @@ public function testTargetGroupAction($header, $currentTargetGroup, $targetGroup
$this->assertEquals($targetGroupId, $response->headers->get($header));
}

public function provideTargetGroup()
public static function provideTargetGroup()
{
$targetGroup1 = $this->prophesize(TargetGroupInterface::class);
$targetGroup1 = new TargetGroup();

$targetGroup2 = $this->prophesize(TargetGroupInterface::class);
$targetGroup2->getId()->willReturn(2);

$targetGroup3 = $this->prophesize(TargetGroupInterface::class);
$targetGroup3->getId()->willReturn(3);
$targetGroup4 = $this->prophesize(TargetGroupInterface::class);
$targetGroup4->getId()->willReturn(4);
$targetGroup2 = new TargetGroup();
self::setPrivateProperty($targetGroup2, 'id', 2);
$targetGroup3 = new TargetGroup();
self::setPrivateProperty($targetGroup3, 'id', 3);
$targetGroup4 = new TargetGroup();
self::setPrivateProperty($targetGroup4, 'id', 4);

return [
['X-Sulu-Target-Group-Hash', null, $targetGroup1->reveal(), null],
['X-Sulu-Target-Group-Hash', null, $targetGroup2->reveal(), 2],
['X-Sulu-Target-Group-Hash', null, $targetGroup1, null],
['X-Sulu-Target-Group-Hash', null, $targetGroup2, 2],
['X-Sulu-Target-Group', null, null, 0],
['X-Sulu-Target-Group', $targetGroup3->reveal(), $targetGroup4->reveal(), 4],
['X-Sulu-Target-Group', $targetGroup3, $targetGroup4, 4],
];
}

Expand Down Expand Up @@ -127,16 +128,16 @@ public function testTargetGroupHitAction($oldTargetGroup, $newTargetGroup, $newT
$targetGroupEvaluationController->targetGroupHitAction();
}

public function provideTargetGroupHit()
public static function provideTargetGroupHit()
{
$oldTargetGroup1 = $this->prophesize(TargetGroupInterface::class);
$oldTargetGroup1->getId()->willReturn(1);
$newTargetGroup1 = $this->prophesize(TargetGroupInterface::class);
$newTargetGroup1->getId()->willReturn(2);
$oldTargetGroup1 = new TargetGroup();
self::setPrivateProperty($oldTargetGroup1, 'id', 1);
$newTargetGroup1 = new TargetGroup();
self::setPrivateProperty($newTargetGroup1, 'id', 2);

return [
[$oldTargetGroup1->reveal(), $newTargetGroup1->reveal(), 2],
[$oldTargetGroup1->reveal(), null, null],
[$oldTargetGroup1, $newTargetGroup1, 2],
[$oldTargetGroup1, null, null],
];
}
}
Loading

0 comments on commit 0c4a28c

Please sign in to comment.