Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change namespace from Setono\SyliusPeakWMSPlugin to Setono\SyliusPeakPlugin because it looks better #3

Merged
merged 1 commit into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Make sure you add it before `SyliusGridBundle`, otherwise you'll get
<?php
$bundles = [
// ...
Setono\SyliusPeakWMSPlugin\SetonoSyliusPeakWMSPlugin::class => ['all' => true],
Setono\SyliusPeakPlugin\SetonoSyliusPeakPlugin::class => ['all' => true],
Sylius\Bundle\GridBundle\SyliusGridBundle::class => ['all' => true],
// ...
];
Expand All @@ -31,15 +31,15 @@ $bundles = [
```yaml
# config/routes/setono_sylius_peak_wms.yaml
setono_sylius_peak_wms:
resource: "@SetonoSyliusPeakWMSPlugin/Resources/config/routes.yaml"
resource: "@SetonoSyliusPeakPlugin/Resources/config/routes.yaml"
```

or if your app doesn't use locales:

```yaml
# config/routes/setono_sylius_peak_wms.yaml
setono_sylius_peak_wms:
resource: "@SetonoSyliusPeakWMSPlugin/Resources/config/routes_no_locale.yaml"
resource: "@SetonoSyliusPeakPlugin/Resources/config/routes_no_locale.yaml"
```

### Add environment variables
Expand All @@ -65,8 +65,8 @@ declare(strict_types=1);

namespace App\Entity\Order;

use Setono\SyliusPeakWMSPlugin\Model\OrderInterface as PeakWMSOrderInterface;
use Setono\SyliusPeakWMSPlugin\Model\OrderTrait as PeakWMSOrderTrait;
use Setono\SyliusPeakPlugin\Model\OrderInterface as PeakOrderInterface;
use Setono\SyliusPeakPlugin\Model\OrderTrait as PeakOrderTrait;
use Sylius\Component\Core\Model\Order as BaseOrder;
use Doctrine\ORM\Mapping as ORM;

Expand All @@ -75,9 +75,9 @@ use Doctrine\ORM\Mapping as ORM;
*
* @ORM\Table(name="sylius_order")
*/
class Order extends BaseOrder implements PeakWMSOrderInterface
class Order extends BaseOrder implements PeakOrderInterface
{
use PeakWMSOrderTrait;
use PeakOrderTrait;
}
```

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@
"prefer-stable": true,
"autoload": {
"psr-4": {
"Setono\\SyliusPeakWMSPlugin\\": "src/"
"Setono\\SyliusPeakPlugin\\": "src/"
},
"files": [
"src/Resources/functions.php"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\Setono\\SyliusPeakWMSPlugin\\": "tests/"
"Tests\\Setono\\SyliusPeakPlugin\\": "tests/"
},
"classmap": [
"tests/Application/Kernel.php"
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</include>
</coverage>
<testsuites>
<testsuite name="SetonoSyliusPeakWMSPlugin Test Suite">
<testsuite name="SetonoSyliusPeakPlugin Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
Expand Down
4 changes: 2 additions & 2 deletions src/Command/ProcessCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace Setono\SyliusPeakWMSPlugin\Command;
namespace Setono\SyliusPeakPlugin\Command;

use Setono\SyliusPeakWMSPlugin\Processor\UploadOrderRequestProcessorInterface;
use Setono\SyliusPeakPlugin\Processor\UploadOrderRequestProcessorInterface;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
Expand Down
4 changes: 2 additions & 2 deletions src/Command/RegisterWebhooksCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace Setono\SyliusPeakWMSPlugin\Command;
namespace Setono\SyliusPeakPlugin\Command;

use Setono\SyliusPeakWMSPlugin\Message\Command\RegisterWebhooks;
use Setono\SyliusPeakPlugin\Message\Command\RegisterWebhooks;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

declare(strict_types=1);

namespace Setono\SyliusPeakWMSPlugin\Controller\Admin;
namespace Setono\SyliusPeakPlugin\Controller\Admin;

use Setono\PeakWMS\Client\ClientInterface;
use Setono\SyliusPeakWMSPlugin\Message\Command\RegisterWebhooks;
use Setono\SyliusPeakWMSPlugin\Registrar\WebhookRegistrarInterface;
use Setono\SyliusPeakPlugin\Message\Command\RegisterWebhooks;
use Setono\SyliusPeakPlugin\Registrar\WebhookRegistrarInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Messenger\MessageBusInterface;

final class PeakWMSController extends AbstractController
final class PeakController extends AbstractController
{
public function __construct(
private readonly MessageBusInterface $commandBus,
Expand All @@ -31,7 +31,7 @@
$apiError = 'There was an error connecting to the API. Please check your credentials and try again. If you continue to experience issues, did you forget to enable/disable the sandbox?';
}

return $this->render('@SetonoSyliusPeakWMSPlugin/admin/peak_wms/index.html.twig', [
return $this->render('@SetonoSyliusPeakPlugin/admin/peak_wms/index.html.twig', [

Check warning on line 34 in src/Controller/Admin/PeakController.php

View check run for this annotation

Codecov / codecov/patch

src/Controller/Admin/PeakController.php#L34

Added line #L34 was not covered by tests
'apiError' => $apiError,
'webhooksShouldBeRegistered' => $this->webhookRegistrar->outOfDate(),
]);
Expand Down
4 changes: 2 additions & 2 deletions src/Controller/HandleWebhookControllerAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

declare(strict_types=1);

namespace Setono\SyliusPeakWMSPlugin\Controller;
namespace Setono\SyliusPeakPlugin\Controller;

use Setono\PeakWMS\Parser\WebhookParser;
use Setono\PeakWMS\Parser\WebhookParserInterface;
use Setono\SyliusPeakWMSPlugin\WebhookHandler\WebhookHandlerInterface;
use Setono\SyliusPeakPlugin\WebhookHandler\WebhookHandlerInterface;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
Expand Down
6 changes: 3 additions & 3 deletions src/DataMapper/CompositeSalesOrderDataMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

declare(strict_types=1);

namespace Setono\SyliusPeakWMSPlugin\DataMapper;
namespace Setono\SyliusPeakPlugin\DataMapper;

use Psr\EventDispatcher\EventDispatcherInterface;
use Setono\CompositeCompilerPass\CompositeService;
use Setono\PeakWMS\DataTransferObject\SalesOrder\SalesOrder;
use Setono\SyliusPeakWMSPlugin\Event\SalesOrderMappedEvent;
use Setono\SyliusPeakWMSPlugin\Model\OrderInterface;
use Setono\SyliusPeakPlugin\Event\SalesOrderMappedEvent;
use Setono\SyliusPeakPlugin\Model\OrderInterface;

/**
* @extends CompositeService<SalesOrderDataMapperInterface>
Expand Down
4 changes: 2 additions & 2 deletions src/DataMapper/SalesOrderDataMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

declare(strict_types=1);

namespace Setono\SyliusPeakWMSPlugin\DataMapper;
namespace Setono\SyliusPeakPlugin\DataMapper;

use Setono\PeakWMS\DataTransferObject\Address;
use Setono\PeakWMS\DataTransferObject\SalesOrder\SalesOrder;
use Setono\SyliusPeakWMSPlugin\Model\OrderInterface;
use Setono\SyliusPeakPlugin\Model\OrderInterface;
use Sylius\Component\Core\Model\PaymentMethodInterface;
use Sylius\Component\Core\Model\ShippingMethodInterface;
use Webmozart\Assert\Assert;
Expand Down
4 changes: 2 additions & 2 deletions src/DataMapper/SalesOrderDataMapperInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

declare(strict_types=1);

namespace Setono\SyliusPeakWMSPlugin\DataMapper;
namespace Setono\SyliusPeakPlugin\DataMapper;

use Setono\PeakWMS\DataTransferObject\SalesOrder\SalesOrder;
use Setono\SyliusPeakWMSPlugin\Model\OrderInterface;
use Setono\SyliusPeakPlugin\Model\OrderInterface;

interface SalesOrderDataMapperInterface
{
Expand Down
8 changes: 4 additions & 4 deletions src/DataMapper/SalesOrderLinesSalesOrderDataMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

declare(strict_types=1);

namespace Setono\SyliusPeakWMSPlugin\DataMapper;
namespace Setono\SyliusPeakPlugin\DataMapper;

use Psr\EventDispatcher\EventDispatcherInterface;
use Setono\PeakWMS\DataTransferObject\SalesOrder\OrderLine\SalesOrderLine;
use Setono\PeakWMS\DataTransferObject\SalesOrder\SalesOrder;
use Setono\SyliusPeakWMSPlugin\Event\SalesOrderLineMappedEvent;
use function Setono\SyliusPeakWMSPlugin\formatAmount;
use Setono\SyliusPeakWMSPlugin\Model\OrderInterface;
use Setono\SyliusPeakPlugin\Event\SalesOrderLineMappedEvent;
use function Setono\SyliusPeakPlugin\formatAmount;
use Setono\SyliusPeakPlugin\Model\OrderInterface;
use Sylius\Component\Core\Model\OrderItemUnitInterface;
use Webmozart\Assert\Assert;

Expand Down
6 changes: 3 additions & 3 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

declare(strict_types=1);

namespace Setono\SyliusPeakWMSPlugin\DependencyInjection;
namespace Setono\SyliusPeakPlugin\DependencyInjection;

use Setono\SyliusPeakWMSPlugin\Model\RegisteredWebhooks;
use Setono\SyliusPeakWMSPlugin\Model\UploadOrderRequest;
use Setono\SyliusPeakPlugin\Model\RegisteredWebhooks;
use Setono\SyliusPeakPlugin\Model\UploadOrderRequest;
use Sylius\Component\Resource\Factory\Factory;
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
Expand Down
8 changes: 4 additions & 4 deletions src/DependencyInjection/SetonoSyliusPeakWMSExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

declare(strict_types=1);

namespace Setono\SyliusPeakWMSPlugin\DependencyInjection;
namespace Setono\SyliusPeakPlugin\DependencyInjection;

use Setono\SyliusPeakWMSPlugin\DataMapper\SalesOrderDataMapperInterface;
use Setono\SyliusPeakWMSPlugin\WebhookHandler\WebhookHandlerInterface;
use Setono\SyliusPeakWMSPlugin\Workflow\UploadOrderRequestWorkflow;
use Setono\SyliusPeakPlugin\DataMapper\SalesOrderDataMapperInterface;
use Setono\SyliusPeakPlugin\WebhookHandler\WebhookHandlerInterface;
use Setono\SyliusPeakPlugin\Workflow\UploadOrderRequestWorkflow;
use Sylius\Bundle\ResourceBundle\DependencyInjection\Extension\AbstractResourceExtension;
use Sylius\Bundle\ResourceBundle\SyliusResourceBundle;
use Symfony\Component\Config\FileLocator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Setono\SyliusPeakWMSPlugin\Event;
namespace Setono\SyliusPeakPlugin\Event;

use Doctrine\ORM\QueryBuilder;

Expand Down
4 changes: 2 additions & 2 deletions src/Event/SalesOrderLineMappedEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

declare(strict_types=1);

namespace Setono\SyliusPeakWMSPlugin\Event;
namespace Setono\SyliusPeakPlugin\Event;

use Setono\PeakWMS\DataTransferObject\SalesOrder\OrderLine\SalesOrderLine;
use Setono\SyliusPeakWMSPlugin\Model\OrderInterface;
use Setono\SyliusPeakPlugin\Model\OrderInterface;
use Sylius\Component\Core\Model\OrderItemInterface;

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Event/SalesOrderMappedEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

declare(strict_types=1);

namespace Setono\SyliusPeakWMSPlugin\Event;
namespace Setono\SyliusPeakPlugin\Event;

use Setono\PeakWMS\DataTransferObject\SalesOrder\SalesOrder;
use Setono\SyliusPeakWMSPlugin\Model\OrderInterface;
use Setono\SyliusPeakPlugin\Model\OrderInterface;

/**
* This event is dispatched after payment details has been mapped
Expand Down
8 changes: 4 additions & 4 deletions src/EventSubscriber/AddLinkToPeakSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

declare(strict_types=1);

namespace Setono\SyliusPeakWMSPlugin\EventSubscriber;
namespace Setono\SyliusPeakPlugin\EventSubscriber;

use Setono\SyliusPeakWMSPlugin\Model\OrderInterface;
use Setono\SyliusPeakWMSPlugin\Model\UploadOrderRequestInterface;
use Setono\SyliusPeakPlugin\Model\OrderInterface;
use Setono\SyliusPeakPlugin\Model\UploadOrderRequestInterface;
use Sylius\Bundle\AdminBundle\Event\OrderShowMenuBuilderEvent;
use Sylius\Bundle\AdminBundle\Menu\OrderShowMenuBuilder;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
Expand All @@ -16,19 +16,19 @@
{
}

public static function getSubscribedEvents(): array

Check failure on line 19 in src/EventSubscriber/AddLinkToPeakSubscriber.php

View workflow job for this annotation

GitHub Actions / Static Code Analysis (PHP8.1 | Deps: highest | SF~6.4.0)

MixedReturnTypeCoercion

src/EventSubscriber/AddLinkToPeakSubscriber.php:19:51: MixedReturnTypeCoercion: The declared return type 'array<string, array{0?: array{0: string, 1?: int}|string, 1?: array{0: string, 1?: int}|int, ...<int<0, max>, array{0: string, 1?: int}>}|string>' for Setono\SyliusPeakPlugin\EventSubscriber\AddLinkToPeakSubscriber::getSubscribedEvents is more specific than the inferred return type 'non-empty-array<array-key, 'addLink'>' (see https://psalm.dev/197)

Check failure on line 19 in src/EventSubscriber/AddLinkToPeakSubscriber.php

View workflow job for this annotation

GitHub Actions / Static Code Analysis (PHP8.2 | Deps: highest | SF~5.4.0)

MixedReturnTypeCoercion

src/EventSubscriber/AddLinkToPeakSubscriber.php:19:51: MixedReturnTypeCoercion: The declared return type 'array<string, array{0?: array{0: string, 1?: int}|string, 1?: array{0: string, 1?: int}|int, ...<int<0, max>, array{0: string, 1?: int}>}|string>' for Setono\SyliusPeakPlugin\EventSubscriber\AddLinkToPeakSubscriber::getSubscribedEvents is more specific than the inferred return type 'non-empty-array<array-key, 'addLink'>' (see https://psalm.dev/197)

Check failure on line 19 in src/EventSubscriber/AddLinkToPeakSubscriber.php

View workflow job for this annotation

GitHub Actions / Static Code Analysis (PHP8.1 | Deps: lowest | SF~6.4.0)

MixedReturnTypeCoercion

src/EventSubscriber/AddLinkToPeakSubscriber.php:19:51: MixedReturnTypeCoercion: The declared return type 'array<string, array{0?: array{0: string, 1?: int}|string, 1?: array{0: string, 1?: int}|int, ...<int<0, max>, array{0: string, 1?: int}>}|string>' for Setono\SyliusPeakPlugin\EventSubscriber\AddLinkToPeakSubscriber::getSubscribedEvents is more specific than the inferred return type 'non-empty-array<array-key, 'addLink'>' (see https://psalm.dev/197)
{
return [OrderShowMenuBuilder::EVENT_NAME => 'addLink'];

Check failure on line 21 in src/EventSubscriber/AddLinkToPeakSubscriber.php

View workflow job for this annotation

GitHub Actions / Static Code Analysis (PHP8.1 | Deps: highest | SF~6.4.0)

MixedArrayOffset

src/EventSubscriber/AddLinkToPeakSubscriber.php:21:16: MixedArrayOffset: Cannot create mixed offset – expecting array-key (see https://psalm.dev/031)

Check failure on line 21 in src/EventSubscriber/AddLinkToPeakSubscriber.php

View workflow job for this annotation

GitHub Actions / Static Code Analysis (PHP8.1 | Deps: highest | SF~6.4.0)

MixedReturnTypeCoercion

src/EventSubscriber/AddLinkToPeakSubscriber.php:21:16: MixedReturnTypeCoercion: The type 'non-empty-array<array-key, 'addLink'>' is more general than the declared return type 'array<string, array{0?: array{0: string, 1?: int}|string, 1?: array{0: string, 1?: int}|int, ...<int<0, max>, array{0: string, 1?: int}>}|string>' for Setono\SyliusPeakPlugin\EventSubscriber\AddLinkToPeakSubscriber::getSubscribedEvents (see https://psalm.dev/197)

Check failure on line 21 in src/EventSubscriber/AddLinkToPeakSubscriber.php

View workflow job for this annotation

GitHub Actions / Static Code Analysis (PHP8.1 | Deps: highest | SF~6.4.0)

UndefinedClass

src/EventSubscriber/AddLinkToPeakSubscriber.php:21:17: UndefinedClass: Class, interface or enum named Sylius\Bundle\AdminBundle\Menu\OrderShowMenuBuilder does not exist (see https://psalm.dev/019)

Check failure on line 21 in src/EventSubscriber/AddLinkToPeakSubscriber.php

View workflow job for this annotation

GitHub Actions / Static Code Analysis (PHP8.2 | Deps: highest | SF~5.4.0)

MixedArrayOffset

src/EventSubscriber/AddLinkToPeakSubscriber.php:21:16: MixedArrayOffset: Cannot create mixed offset – expecting array-key (see https://psalm.dev/031)

Check failure on line 21 in src/EventSubscriber/AddLinkToPeakSubscriber.php

View workflow job for this annotation

GitHub Actions / Static Code Analysis (PHP8.2 | Deps: highest | SF~5.4.0)

MixedReturnTypeCoercion

src/EventSubscriber/AddLinkToPeakSubscriber.php:21:16: MixedReturnTypeCoercion: The type 'non-empty-array<array-key, 'addLink'>' is more general than the declared return type 'array<string, array{0?: array{0: string, 1?: int}|string, 1?: array{0: string, 1?: int}|int, ...<int<0, max>, array{0: string, 1?: int}>}|string>' for Setono\SyliusPeakPlugin\EventSubscriber\AddLinkToPeakSubscriber::getSubscribedEvents (see https://psalm.dev/197)

Check failure on line 21 in src/EventSubscriber/AddLinkToPeakSubscriber.php

View workflow job for this annotation

GitHub Actions / Static Code Analysis (PHP8.2 | Deps: highest | SF~5.4.0)

UndefinedClass

src/EventSubscriber/AddLinkToPeakSubscriber.php:21:17: UndefinedClass: Class, interface or enum named Sylius\Bundle\AdminBundle\Menu\OrderShowMenuBuilder does not exist (see https://psalm.dev/019)

Check failure on line 21 in src/EventSubscriber/AddLinkToPeakSubscriber.php

View workflow job for this annotation

GitHub Actions / Static Code Analysis (PHP8.1 | Deps: lowest | SF~6.4.0)

MixedArrayOffset

src/EventSubscriber/AddLinkToPeakSubscriber.php:21:16: MixedArrayOffset: Cannot create mixed offset – expecting array-key (see https://psalm.dev/031)

Check failure on line 21 in src/EventSubscriber/AddLinkToPeakSubscriber.php

View workflow job for this annotation

GitHub Actions / Static Code Analysis (PHP8.1 | Deps: lowest | SF~6.4.0)

MixedReturnTypeCoercion

src/EventSubscriber/AddLinkToPeakSubscriber.php:21:16: MixedReturnTypeCoercion: The type 'non-empty-array<array-key, 'addLink'>' is more general than the declared return type 'array<string, array{0?: array{0: string, 1?: int}|string, 1?: array{0: string, 1?: int}|int, ...<int<0, max>, array{0: string, 1?: int}>}|string>' for Setono\SyliusPeakPlugin\EventSubscriber\AddLinkToPeakSubscriber::getSubscribedEvents (see https://psalm.dev/197)

Check failure on line 21 in src/EventSubscriber/AddLinkToPeakSubscriber.php

View workflow job for this annotation

GitHub Actions / Static Code Analysis (PHP8.1 | Deps: lowest | SF~6.4.0)

UndefinedClass

src/EventSubscriber/AddLinkToPeakSubscriber.php:21:17: UndefinedClass: Class, interface or enum named Sylius\Bundle\AdminBundle\Menu\OrderShowMenuBuilder does not exist (see https://psalm.dev/019)
}

public function addLink(OrderShowMenuBuilderEvent $event): void

Check failure on line 24 in src/EventSubscriber/AddLinkToPeakSubscriber.php

View workflow job for this annotation

GitHub Actions / Static Code Analysis (PHP8.1 | Deps: highest | SF~6.4.0)

UndefinedClass

src/EventSubscriber/AddLinkToPeakSubscriber.php:24:29: UndefinedClass: Class, interface or enum named Sylius\Bundle\AdminBundle\Event\OrderShowMenuBuilderEvent does not exist (see https://psalm.dev/019)

Check failure on line 24 in src/EventSubscriber/AddLinkToPeakSubscriber.php

View workflow job for this annotation

GitHub Actions / Static Code Analysis (PHP8.2 | Deps: highest | SF~5.4.0)

UndefinedClass

src/EventSubscriber/AddLinkToPeakSubscriber.php:24:29: UndefinedClass: Class, interface or enum named Sylius\Bundle\AdminBundle\Event\OrderShowMenuBuilderEvent does not exist (see https://psalm.dev/019)

Check failure on line 24 in src/EventSubscriber/AddLinkToPeakSubscriber.php

View workflow job for this annotation

GitHub Actions / Static Code Analysis (PHP8.1 | Deps: lowest | SF~6.4.0)

UndefinedClass

src/EventSubscriber/AddLinkToPeakSubscriber.php:24:29: UndefinedClass: Class, interface or enum named Sylius\Bundle\AdminBundle\Event\OrderShowMenuBuilderEvent does not exist (see https://psalm.dev/019)
{
$order = $event->getOrder();
if (!$order instanceof OrderInterface) {
return;
}

$uploadOrderRequest = $order->getPeakWMSUploadOrderRequest();
$uploadOrderRequest = $order->getPeakUploadOrderRequest();

Check warning on line 31 in src/EventSubscriber/AddLinkToPeakSubscriber.php

View check run for this annotation

Codecov / codecov/patch

src/EventSubscriber/AddLinkToPeakSubscriber.php#L31

Added line #L31 was not covered by tests
if ($uploadOrderRequest === null) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/EventSubscriber/AddMenuSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Setono\SyliusPeakWMSPlugin\EventSubscriber;
namespace Setono\SyliusPeakPlugin\EventSubscriber;

use Knp\Menu\ItemInterface;
use Sylius\Bundle\UiBundle\Menu\Event\MenuBuilderEvent;
Expand Down
8 changes: 4 additions & 4 deletions src/EventSubscriber/CreateUploadOrderRequestSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

declare(strict_types=1);

namespace Setono\SyliusPeakWMSPlugin\EventSubscriber;
namespace Setono\SyliusPeakPlugin\EventSubscriber;

use Doctrine\Persistence\ManagerRegistry;
use Setono\Doctrine\ORMTrait;
use Setono\SyliusPeakWMSPlugin\Factory\UploadOrderRequestFactoryInterface;
use Setono\SyliusPeakWMSPlugin\Model\OrderInterface;
use Setono\SyliusPeakPlugin\Factory\UploadOrderRequestFactoryInterface;
use Setono\SyliusPeakPlugin\Model\OrderInterface;
use Sylius\Bundle\ResourceBundle\Event\ResourceControllerEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Webmozart\Assert\Assert;
Expand Down Expand Up @@ -36,6 +36,6 @@
$order = $event->getSubject();
Assert::isInstanceOf($order, OrderInterface::class);

$order->setPeakWMSUploadOrderRequest($this->uploadOrderRequestFactory->createNew());
$order->setPeakUploadOrderRequest($this->uploadOrderRequestFactory->createNew());

Check warning on line 39 in src/EventSubscriber/CreateUploadOrderRequestSubscriber.php

View check run for this annotation

Codecov / codecov/patch

src/EventSubscriber/CreateUploadOrderRequestSubscriber.php#L39

Added line #L39 was not covered by tests
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Setono\SyliusPeakWMSPlugin\EventSubscriber\Grid;
namespace Setono\SyliusPeakPlugin\EventSubscriber\Grid;

use Sylius\Component\Grid\Definition\Field;
use Sylius\Component\Grid\Event\GridDefinitionConverterEvent;
Expand All @@ -21,9 +21,9 @@
{
$field = Field::fromNameAndType('peakWMSUploadOrderRequest', 'twig');
$field->setOptions([
'template' => '@SetonoSyliusPeakWMSPlugin/admin/order/grid/field/peak_wms_upload_order_request.html.twig',
'template' => '@SetonoSyliusPeakPlugin/admin/order/grid/field/peak_wms_upload_order_request.html.twig',

Check warning on line 24 in src/EventSubscriber/Grid/AddUploadOrderRequestColumnToOrderGridSubscriber.php

View check run for this annotation

Codecov / codecov/patch

src/EventSubscriber/Grid/AddUploadOrderRequestColumnToOrderGridSubscriber.php#L24

Added line #L24 was not covered by tests
'vars' => [
'labels' => '@SetonoSyliusPeakWMSPlugin/admin/order/grid/field/peak_wms_upload_order_request',
'labels' => '@SetonoSyliusPeakPlugin/admin/order/grid/field/peak_wms_upload_order_request',

Check warning on line 26 in src/EventSubscriber/Grid/AddUploadOrderRequestColumnToOrderGridSubscriber.php

View check run for this annotation

Codecov / codecov/patch

src/EventSubscriber/Grid/AddUploadOrderRequestColumnToOrderGridSubscriber.php#L26

Added line #L26 was not covered by tests
],
]);
$field->setLabel('setono_sylius_peak_wms.ui.peak_wms_state');
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/UnsupportedWebhookException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Setono\SyliusPeakWMSPlugin\Exception;
namespace Setono\SyliusPeakPlugin\Exception;

final class UnsupportedWebhookException extends \RuntimeException
{
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/WebhookRegistrationException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Setono\SyliusPeakWMSPlugin\Exception;
namespace Setono\SyliusPeakPlugin\Exception;

final class WebhookRegistrationException extends \RuntimeException
{
Expand Down
4 changes: 2 additions & 2 deletions src/Factory/RegisteredWebhooksFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace Setono\SyliusPeakWMSPlugin\Factory;
namespace Setono\SyliusPeakPlugin\Factory;

use Setono\SyliusPeakWMSPlugin\Model\RegisteredWebhooksInterface;
use Setono\SyliusPeakPlugin\Model\RegisteredWebhooksInterface;
use Sylius\Component\Resource\Factory\FactoryInterface;

final class RegisteredWebhooksFactory implements RegisteredWebhooksFactoryInterface
Expand Down
4 changes: 2 additions & 2 deletions src/Factory/RegisteredWebhooksFactoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

declare(strict_types=1);

namespace Setono\SyliusPeakWMSPlugin\Factory;
namespace Setono\SyliusPeakPlugin\Factory;

use Setono\PeakWMS\DataTransferObject\Webhook\Webhook;
use Setono\SyliusPeakWMSPlugin\Model\RegisteredWebhooksInterface;
use Setono\SyliusPeakPlugin\Model\RegisteredWebhooksInterface;
use Sylius\Component\Resource\Factory\FactoryInterface;

/**
Expand Down
Loading
Loading