Skip to content

Commit ae389bf

Browse files
authored
Merge pull request #859 from loic425/feature/move-resource-actions
Move resource actions' namespace
2 parents bc611d9 + b6464eb commit ae389bf

File tree

5 files changed

+57
-0
lines changed

5 files changed

+57
-0
lines changed

phpstan.neon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ parameters:
3333
- %currentWorkingDirectory%/src/Component/legacy/src/Repository/*
3434
- %currentWorkingDirectory%/src/Component/legacy/src/StateMachine/*
3535
- %currentWorkingDirectory%/src/Component/legacy/src/Storage/*
36+
- %currentWorkingDirectory%/src/Component/legacy/src/ResourceActions.php
3637
- %currentWorkingDirectory%/src/Component/legacy/src/Translation/*
3738
- %currentWorkingDirectory%/src/Component/legacy/tests/*
3839
- %currentWorkingDirectory%/src/Component/spec/*

psalm.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<file name="src/Component/legacy/src/Model/TimestampableTrait.php" />
2020
<file name="src/Component/legacy/src/Model/ToggleableTrait.php" />
2121
<file name="src/Component/legacy/src/Model/TranslatableTrait.php" />
22+
<file name="src/Component/legacy/src/ResourceActions.php" />
2223
<file name="src/Component/legacy/src/StateMachine/StateMachine.php" />
2324
<file name="src/Component/legacy/src/StateMachine/StateMachineInterface.php" />
2425
<file name="src/Bundle/Controller/ControllerTrait.php" />
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Sylius package.
5+
*
6+
* (c) Sylius Sp. z o.o.
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
declare(strict_types=1);
13+
14+
namespace spec\Sylius\Component\Resource;
15+
16+
use PhpSpec\ObjectBehavior;
17+
use Sylius\Component\Resource\ResourceActions;
18+
use Sylius\Resource\ResourceActions as NewResourceActions;
19+
20+
final class ResourceActionsSpec extends ObjectBehavior
21+
{
22+
function it_is_initializable(): void
23+
{
24+
$this->shouldHaveType(ResourceActions::class);
25+
}
26+
27+
function it_is_an_alias_of_resource_actions(): void
28+
{
29+
$this->shouldHaveType(NewResourceActions::class);
30+
}
31+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Sylius package.
5+
*
6+
* (c) Sylius Sp. z o.o.
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
declare(strict_types=1);
13+
14+
namespace Sylius\Component\Resource;
15+
16+
class_exists(\Sylius\Resource\ResourceActions::class);
17+
18+
if (false) {
19+
final class ResourceActions extends \Sylius\Resource\ResourceActions
20+
{
21+
}
22+
}

src/Component/src/ResourceActions.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,5 @@ private function __construct()
3131
{
3232
}
3333
}
34+
35+
class_alias(ResourceActions::class, \Sylius\Component\Resource\ResourceActions::class);

0 commit comments

Comments
 (0)