From d6496a4eeee387a5e77f5aa21ef1126aa61d335d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Kr=C3=B3l?= Date: Fri, 2 Feb 2018 15:02:53 +0100 Subject: [PATCH] Fix CS & Behat build --- behat.yml.dist | 3 +- composer.json | 4 +-- etc/build/.gitkeep | 0 phpspec.yml.dist | 2 +- ...gin.php => BitBagShippingExportPlugin.php} | 6 ++-- src/Context/ShippingGatewayContext.php | 10 +++---- .../ShippingGatewayContextInterface.php | 4 +-- src/Controller/ShippingExportController.php | 6 ++-- src/Controller/ShippingGatewayController.php | 2 +- .../AcmeSyliusExampleExtension.php | 22 -------------- .../RegisterShippingGatewayConfigTypePass.php | 2 +- .../ShippingExportExtension.php | 2 +- src/Entity/ShippingExport.php | 2 +- src/Entity/ShippingExportInterface.php | 2 +- src/Entity/ShippingGateway.php | 2 +- src/Entity/ShippingGatewayInterface.php | 2 +- src/Event/ExportShipmentEvent.php | 4 +-- ...PlacingShipmentForGatewayEventListener.php | 10 +++---- .../ShippingGatewayLabelNotFound.php | 2 +- .../ShippingGatewayNotFoundException.php | 2 +- src/Form/Type/ShippingGatewayType.php | 6 ++-- src/Menu/ShippingExportMenuBuilder.php | 2 +- src/Menu/ShippingGatewayMenuBuilder.php | 2 +- src/Repository/ShippingExportRepository.php | 4 +-- .../ShippingExportRepositoryInterface.php | 2 +- src/Repository/ShippingGatewayRepository.php | 4 +-- .../ShippingGatewayRepositoryInterface.php | 4 +-- src/Resources/config/config.yml | 14 ++++----- .../config/doctrine/ShippingExport.orm.yml | 4 +-- .../config/doctrine/ShippingGateway.orm.yml | 4 +-- .../config/grids/bitbag_shipping_export.yml | 12 ++++---- .../resource/bitbag_shipping_export.yml | 8 ++--- .../resource/bitbag_shipping_gateway.yml | 8 ++--- src/Resources/config/routing.yml | 4 +-- .../config/routing/bitbag_shipping_export.yml | 2 +- .../routing/bitbag_shipping_gateway.yml | 2 +- src/Resources/config/services.yml | 30 +++++++++---------- .../Action/_exportShipments.html.twig | 2 +- .../Grid/Field/exportedAt.html.twig | 2 +- .../Grid/Field/orderNumber.html.twig | 2 +- .../Grid/Field/shippingExportLabel.html.twig | 4 +-- .../Grid/Field/shippingMethod.html.twig | 2 +- .../ShippingExport/Grid/Field/state.html.twig | 2 +- .../Partial/_downloadShippingLabel.html.twig | 2 +- .../Partial/_exportShipment.html.twig | 2 +- .../views/ShippingGateway/_form.html.twig | 0 src/phpspec.yml.dist | 4 +-- .../Context/ShippingGatewayContextSpec.php | 10 +++---- src/spec/Entity/ShippingGatewaySpec.php | 8 ++--- src/spec/Event/ExportShipmentEventSpec.php | 6 ++-- ...ingShipmentForGatewayEventListenerSpec.php | 12 ++++---- .../ShippingGatewayLabelNotFoundSpec.php | 4 +-- .../ShippingGatewayNotFoundExceptionSpec.php | 4 +-- .../Menu/ShippingExportMenuBuilderSpec.php | 4 +-- .../Menu/ShippingGatewayMenuBuilderSpec.php | 4 +-- tests/Application/app/AppKernel.php | 2 +- tests/Application/app/config/config.yml | 2 +- tests/Application/app/config/routing.yml | 2 +- tests/Application/app/config/services.yml | 4 +-- tests/Behat/Behaviour/ContainsError.php | 2 +- .../Context/Hook/ShippingExportContext.php | 2 +- .../Context/Setup/ShippingExportContext.php | 10 +++---- .../Context/Setup/ShippingGatewayContext.php | 6 ++-- .../Ui/Admin/ShippingExportContext.php | 4 +-- .../Ui/Admin/ShippingGatewayContext.php | 8 ++--- ...FrankMartinShippingExportEventListener.php | 4 +-- .../Type/FrankMartinShippingGatewayType.php | 2 +- .../Page/Admin/ShippingExport/IndexPage.php | 2 +- .../ShippingExport/IndexPageInterface.php | 2 +- .../Page/Admin/ShippingGateway/CreatePage.php | 4 +-- .../ShippingGateway/CreatePageInterface.php | 2 +- .../Page/Admin/ShippingGateway/UpdatePage.php | 4 +-- .../ShippingGateway/UpdatePageInterface.php | 2 +- tests/Behat/Resources/contexts.yml | 10 +++---- tests/Behat/Resources/pages.yml | 6 ++-- 75 files changed, 167 insertions(+), 188 deletions(-) delete mode 100644 etc/build/.gitkeep rename src/{ShippingExportPlugin.php => BitBagShippingExportPlugin.php} (78%) delete mode 100644 src/DependencyInjection/AcmeSyliusExampleExtension.php delete mode 100644 src/Resources/views/ShippingGateway/_form.html.twig diff --git a/behat.yml.dist b/behat.yml.dist index 01c63a7..5e99366 100644 --- a/behat.yml.dist +++ b/behat.yml.dist @@ -7,7 +7,8 @@ default: FriendsOfBehat\ContextServiceExtension: imports: - vendor/sylius/sylius/src/Sylius/Behat/Resources/config/services.xml - - tests/Behat/Resources/services.xml + - tests/Behat/Resources/contexts.yml + - tests/Behat/Resources/pages.yml FriendsOfBehat\SymfonyExtension: kernel: diff --git a/composer.json b/composer.json index 3629fbd..b4d32da 100644 --- a/composer.json +++ b/composer.json @@ -37,8 +37,8 @@ }, "autoload": { "psr-4": { - "BitBag\\ShippingExportPlugin\\": "src/", - "Tests\\BitBag\\ShippingExportPlugin\\": "tests/" + "BitBag\\SyliusShippingExportPlugin\\": "src/", + "Tests\\BitBag\\SyliusShippingExportPlugin\\": "tests/" } }, "prefer-stable": true, diff --git a/etc/build/.gitkeep b/etc/build/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/phpspec.yml.dist b/phpspec.yml.dist index 30da405..46fd9bb 100644 --- a/phpspec.yml.dist +++ b/phpspec.yml.dist @@ -1,2 +1,2 @@ suites: - ShippingExportPlugin: { namespace: BitBag\ShippingExportPlugin, psr4_prefix: BitBag\ShippingExportPlugin, spec_path: src, src_path: src } + ShippingExportPlugin: { namespace: BitBag\SyliusShippingExportPlugin, psr4_prefix: BitBag\SyliusShippingExportPlugin, spec_path: src, src_path: src } diff --git a/src/ShippingExportPlugin.php b/src/BitBagShippingExportPlugin.php similarity index 78% rename from src/ShippingExportPlugin.php rename to src/BitBagShippingExportPlugin.php index 30de5e2..312b25c 100644 --- a/src/ShippingExportPlugin.php +++ b/src/BitBagShippingExportPlugin.php @@ -9,14 +9,14 @@ * an email on mikolaj.krol@bitbag.pl. */ -namespace BitBag\ShippingExportPlugin; +namespace BitBag\SyliusShippingExportPlugin; -use BitBag\ShippingExportPlugin\DependencyInjection\Compiler\RegisterShippingGatewayConfigTypePass; +use BitBag\SyliusShippingExportPlugin\DependencyInjection\Compiler\RegisterShippingGatewayConfigTypePass; use Sylius\Bundle\CoreBundle\Application\SyliusPluginTrait; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\HttpKernel\Bundle\Bundle; -final class ShippingExportPlugin extends Bundle +final class BitBagShippingExportPlugin extends Bundle { use SyliusPluginTrait; diff --git a/src/Context/ShippingGatewayContext.php b/src/Context/ShippingGatewayContext.php index 9f529f9..797d4c8 100644 --- a/src/Context/ShippingGatewayContext.php +++ b/src/Context/ShippingGatewayContext.php @@ -10,12 +10,12 @@ declare(strict_types=1); -namespace BitBag\ShippingExportPlugin\Context; +namespace BitBag\SyliusShippingExportPlugin\Context; -use BitBag\ShippingExportPlugin\Entity\ShippingGatewayInterface; -use BitBag\ShippingExportPlugin\Exception\ShippingGatewayLabelNotFound; -use BitBag\ShippingExportPlugin\Exception\ShippingGatewayNotFoundException; -use BitBag\ShippingExportPlugin\Repository\ShippingGatewayRepositoryInterface; +use BitBag\SyliusShippingExportPlugin\Entity\ShippingGatewayInterface; +use BitBag\SyliusShippingExportPlugin\Exception\ShippingGatewayLabelNotFound; +use BitBag\SyliusShippingExportPlugin\Exception\ShippingGatewayNotFoundException; +use BitBag\SyliusShippingExportPlugin\Repository\ShippingGatewayRepositoryInterface; use Sylius\Bundle\ResourceBundle\Form\Registry\FormTypeRegistryInterface; use Symfony\Component\HttpFoundation\RequestStack; diff --git a/src/Context/ShippingGatewayContextInterface.php b/src/Context/ShippingGatewayContextInterface.php index 4e339f9..4df547b 100644 --- a/src/Context/ShippingGatewayContextInterface.php +++ b/src/Context/ShippingGatewayContextInterface.php @@ -10,9 +10,9 @@ declare(strict_types=1); -namespace BitBag\ShippingExportPlugin\Context; +namespace BitBag\SyliusShippingExportPlugin\Context; -use BitBag\ShippingExportPlugin\Exception\ShippingGatewayNotFoundException; +use BitBag\SyliusShippingExportPlugin\Exception\ShippingGatewayNotFoundException; interface ShippingGatewayContextInterface { diff --git a/src/Controller/ShippingExportController.php b/src/Controller/ShippingExportController.php index 4cd1d58..d9886f6 100644 --- a/src/Controller/ShippingExportController.php +++ b/src/Controller/ShippingExportController.php @@ -10,10 +10,10 @@ declare(strict_types=1); -namespace BitBag\ShippingExportPlugin\Controller; +namespace BitBag\SyliusShippingExportPlugin\Controller; -use BitBag\ShippingExportPlugin\Entity\ShippingExportInterface; -use BitBag\ShippingExportPlugin\Event\ExportShipmentEvent; +use BitBag\SyliusShippingExportPlugin\Entity\ShippingExportInterface; +use BitBag\SyliusShippingExportPlugin\Event\ExportShipmentEvent; use Sylius\Bundle\ResourceBundle\Controller\ResourceController; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Request; diff --git a/src/Controller/ShippingGatewayController.php b/src/Controller/ShippingGatewayController.php index dac647d..776e494 100644 --- a/src/Controller/ShippingGatewayController.php +++ b/src/Controller/ShippingGatewayController.php @@ -10,7 +10,7 @@ declare(strict_types=1); -namespace BitBag\ShippingExportPlugin\Controller; +namespace BitBag\SyliusShippingExportPlugin\Controller; use FOS\RestBundle\View\View; use Sylius\Bundle\ResourceBundle\Controller\ResourceController; diff --git a/src/DependencyInjection/AcmeSyliusExampleExtension.php b/src/DependencyInjection/AcmeSyliusExampleExtension.php deleted file mode 100644 index d4adf2d..0000000 --- a/src/DependencyInjection/AcmeSyliusExampleExtension.php +++ /dev/null @@ -1,22 +0,0 @@ -processConfiguration($this->getConfiguration([], $container), $config); - $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); - } -} diff --git a/src/DependencyInjection/Compiler/RegisterShippingGatewayConfigTypePass.php b/src/DependencyInjection/Compiler/RegisterShippingGatewayConfigTypePass.php index 45e3791..1139b8b 100644 --- a/src/DependencyInjection/Compiler/RegisterShippingGatewayConfigTypePass.php +++ b/src/DependencyInjection/Compiler/RegisterShippingGatewayConfigTypePass.php @@ -10,7 +10,7 @@ declare(strict_types=1); -namespace BitBag\ShippingExportPlugin\DependencyInjection\Compiler; +namespace BitBag\SyliusShippingExportPlugin\DependencyInjection\Compiler; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; diff --git a/src/DependencyInjection/ShippingExportExtension.php b/src/DependencyInjection/ShippingExportExtension.php index c6247d9..bacf71e 100644 --- a/src/DependencyInjection/ShippingExportExtension.php +++ b/src/DependencyInjection/ShippingExportExtension.php @@ -10,7 +10,7 @@ declare(strict_types=1); -namespace BitBag\ShippingExportPlugin\DependencyInjection; +namespace BitBag\SyliusShippingExportPlugin\DependencyInjection; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Extension\Extension; diff --git a/src/Entity/ShippingExport.php b/src/Entity/ShippingExport.php index c6de2df..68a0d4c 100644 --- a/src/Entity/ShippingExport.php +++ b/src/Entity/ShippingExport.php @@ -10,7 +10,7 @@ declare(strict_types=1); -namespace BitBag\ShippingExportPlugin\Entity; +namespace BitBag\SyliusShippingExportPlugin\Entity; use Sylius\Component\Core\Model\ShipmentInterface; diff --git a/src/Entity/ShippingExportInterface.php b/src/Entity/ShippingExportInterface.php index e543681..69d89ef 100644 --- a/src/Entity/ShippingExportInterface.php +++ b/src/Entity/ShippingExportInterface.php @@ -10,7 +10,7 @@ declare(strict_types=1); -namespace BitBag\ShippingExportPlugin\Entity; +namespace BitBag\SyliusShippingExportPlugin\Entity; use Sylius\Component\Core\Model\ShipmentInterface; use Sylius\Component\Resource\Model\ResourceInterface; diff --git a/src/Entity/ShippingGateway.php b/src/Entity/ShippingGateway.php index ba0c1ee..bb061c5 100644 --- a/src/Entity/ShippingGateway.php +++ b/src/Entity/ShippingGateway.php @@ -10,7 +10,7 @@ declare(strict_types=1); -namespace BitBag\ShippingExportPlugin\Entity; +namespace BitBag\SyliusShippingExportPlugin\Entity; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; diff --git a/src/Entity/ShippingGatewayInterface.php b/src/Entity/ShippingGatewayInterface.php index 086b714..0bfc388 100644 --- a/src/Entity/ShippingGatewayInterface.php +++ b/src/Entity/ShippingGatewayInterface.php @@ -10,7 +10,7 @@ declare(strict_types=1); -namespace BitBag\ShippingExportPlugin\Entity; +namespace BitBag\SyliusShippingExportPlugin\Entity; use Sylius\Component\Core\Model\ShippingMethodInterface; use Sylius\Component\Resource\Model\ResourceInterface; diff --git a/src/Event/ExportShipmentEvent.php b/src/Event/ExportShipmentEvent.php index 0838879..e6ac657 100644 --- a/src/Event/ExportShipmentEvent.php +++ b/src/Event/ExportShipmentEvent.php @@ -10,9 +10,9 @@ declare(strict_types=1); -namespace BitBag\ShippingExportPlugin\Event; +namespace BitBag\SyliusShippingExportPlugin\Event; -use BitBag\ShippingExportPlugin\Entity\ShippingExportInterface; +use BitBag\SyliusShippingExportPlugin\Entity\ShippingExportInterface; use Doctrine\ORM\EntityManager; use Doctrine\ORM\EntityManagerInterface; use Symfony\Component\EventDispatcher\Event; diff --git a/src/EventListener/PlacingShipmentForGatewayEventListener.php b/src/EventListener/PlacingShipmentForGatewayEventListener.php index 95ce48b..6f4e8df 100644 --- a/src/EventListener/PlacingShipmentForGatewayEventListener.php +++ b/src/EventListener/PlacingShipmentForGatewayEventListener.php @@ -10,12 +10,12 @@ declare(strict_types=1); -namespace BitBag\ShippingExportPlugin\EventListener; +namespace BitBag\SyliusShippingExportPlugin\EventListener; -use BitBag\ShippingExportPlugin\Entity\ShippingExportInterface; -use BitBag\ShippingExportPlugin\Entity\ShippingGatewayInterface; -use BitBag\ShippingExportPlugin\Repository\ShippingExportRepositoryInterface; -use BitBag\ShippingExportPlugin\Repository\ShippingGatewayRepositoryInterface; +use BitBag\SyliusShippingExportPlugin\Entity\ShippingExportInterface; +use BitBag\SyliusShippingExportPlugin\Entity\ShippingGatewayInterface; +use BitBag\SyliusShippingExportPlugin\Repository\ShippingExportRepositoryInterface; +use BitBag\SyliusShippingExportPlugin\Repository\ShippingGatewayRepositoryInterface; use Sylius\Component\Core\Model\OrderInterface; use Sylius\Component\Core\Model\ShipmentInterface; use Sylius\Component\Resource\Factory\FactoryInterface; diff --git a/src/Exception/ShippingGatewayLabelNotFound.php b/src/Exception/ShippingGatewayLabelNotFound.php index d66a495..7f2bf59 100644 --- a/src/Exception/ShippingGatewayLabelNotFound.php +++ b/src/Exception/ShippingGatewayLabelNotFound.php @@ -10,7 +10,7 @@ declare(strict_types=1); -namespace BitBag\ShippingExportPlugin\Exception; +namespace BitBag\SyliusShippingExportPlugin\Exception; final class ShippingGatewayLabelNotFound extends \Exception { diff --git a/src/Exception/ShippingGatewayNotFoundException.php b/src/Exception/ShippingGatewayNotFoundException.php index 028b7c7..a1241f5 100644 --- a/src/Exception/ShippingGatewayNotFoundException.php +++ b/src/Exception/ShippingGatewayNotFoundException.php @@ -10,7 +10,7 @@ declare(strict_types=1); -namespace BitBag\ShippingExportPlugin\Exception; +namespace BitBag\SyliusShippingExportPlugin\Exception; final class ShippingGatewayNotFoundException extends \Exception { diff --git a/src/Form/Type/ShippingGatewayType.php b/src/Form/Type/ShippingGatewayType.php index 2ee9e27..5c07cc2 100644 --- a/src/Form/Type/ShippingGatewayType.php +++ b/src/Form/Type/ShippingGatewayType.php @@ -10,10 +10,10 @@ declare(strict_types=1); -namespace BitBag\ShippingExportPlugin\Form\Type; +namespace BitBag\SyliusShippingExportPlugin\Form\Type; -use BitBag\ShippingExportPlugin\Context\ShippingGatewayContextInterface; -use BitBag\ShippingExportPlugin\Entity\ShippingGatewayInterface; +use BitBag\SyliusShippingExportPlugin\Context\ShippingGatewayContextInterface; +use BitBag\SyliusShippingExportPlugin\Entity\ShippingGatewayInterface; use Doctrine\ORM\EntityRepository; use Sylius\Bundle\ResourceBundle\Form\Type\AbstractResourceType; use Sylius\Component\Core\Repository\ShippingMethodRepositoryInterface; diff --git a/src/Menu/ShippingExportMenuBuilder.php b/src/Menu/ShippingExportMenuBuilder.php index 36c015e..63663c2 100644 --- a/src/Menu/ShippingExportMenuBuilder.php +++ b/src/Menu/ShippingExportMenuBuilder.php @@ -10,7 +10,7 @@ declare(strict_types=1); -namespace BitBag\ShippingExportPlugin\Menu; +namespace BitBag\SyliusShippingExportPlugin\Menu; use Sylius\Bundle\UiBundle\Menu\Event\MenuBuilderEvent; diff --git a/src/Menu/ShippingGatewayMenuBuilder.php b/src/Menu/ShippingGatewayMenuBuilder.php index 6c0c5fa..58de2c4 100644 --- a/src/Menu/ShippingGatewayMenuBuilder.php +++ b/src/Menu/ShippingGatewayMenuBuilder.php @@ -10,7 +10,7 @@ declare(strict_types=1); -namespace BitBag\ShippingExportPlugin\Menu; +namespace BitBag\SyliusShippingExportPlugin\Menu; use Sylius\Bundle\UiBundle\Menu\Event\MenuBuilderEvent; diff --git a/src/Repository/ShippingExportRepository.php b/src/Repository/ShippingExportRepository.php index aa2c2f9..dcd8b2b 100644 --- a/src/Repository/ShippingExportRepository.php +++ b/src/Repository/ShippingExportRepository.php @@ -10,9 +10,9 @@ declare(strict_types=1); -namespace BitBag\ShippingExportPlugin\Repository; +namespace BitBag\SyliusShippingExportPlugin\Repository; -use BitBag\ShippingExportPlugin\Entity\ShippingExportInterface; +use BitBag\SyliusShippingExportPlugin\Entity\ShippingExportInterface; use Doctrine\ORM\QueryBuilder; use Sylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepository; diff --git a/src/Repository/ShippingExportRepositoryInterface.php b/src/Repository/ShippingExportRepositoryInterface.php index 2f02930..d6a3d2a 100644 --- a/src/Repository/ShippingExportRepositoryInterface.php +++ b/src/Repository/ShippingExportRepositoryInterface.php @@ -10,7 +10,7 @@ declare(strict_types=1); -namespace BitBag\ShippingExportPlugin\Repository; +namespace BitBag\SyliusShippingExportPlugin\Repository; use Doctrine\ORM\QueryBuilder; use Sylius\Component\Resource\Repository\RepositoryInterface; diff --git a/src/Repository/ShippingGatewayRepository.php b/src/Repository/ShippingGatewayRepository.php index 1185389..d81b5d0 100644 --- a/src/Repository/ShippingGatewayRepository.php +++ b/src/Repository/ShippingGatewayRepository.php @@ -10,9 +10,9 @@ declare(strict_types=1); -namespace BitBag\ShippingExportPlugin\Repository; +namespace BitBag\SyliusShippingExportPlugin\Repository; -use BitBag\ShippingExportPlugin\Entity\ShippingGatewayInterface; +use BitBag\SyliusShippingExportPlugin\Entity\ShippingGatewayInterface; use Doctrine\ORM\QueryBuilder; use Sylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepository; use Sylius\Component\Shipping\Model\ShippingMethodInterface; diff --git a/src/Repository/ShippingGatewayRepositoryInterface.php b/src/Repository/ShippingGatewayRepositoryInterface.php index 74520d7..28c7439 100644 --- a/src/Repository/ShippingGatewayRepositoryInterface.php +++ b/src/Repository/ShippingGatewayRepositoryInterface.php @@ -10,9 +10,9 @@ declare(strict_types=1); -namespace BitBag\ShippingExportPlugin\Repository; +namespace BitBag\SyliusShippingExportPlugin\Repository; -use BitBag\ShippingExportPlugin\Entity\ShippingGatewayInterface; +use BitBag\SyliusShippingExportPlugin\Entity\ShippingGatewayInterface; use Doctrine\ORM\QueryBuilder; use Sylius\Component\Resource\Repository\RepositoryInterface; use Sylius\Component\Shipping\Model\ShippingMethodInterface; diff --git a/src/Resources/config/config.yml b/src/Resources/config/config.yml index 0fc4b34..606ae6c 100644 --- a/src/Resources/config/config.yml +++ b/src/Resources/config/config.yml @@ -1,12 +1,12 @@ imports: - - { resource: "@ShippingExportPlugin/Resources/config/resource/bitbag_shipping_gateway.yml" } - - { resource: "@ShippingExportPlugin/Resources/config/resource/bitbag_shipping_export.yml" } - - { resource: "@ShippingExportPlugin/Resources/config/grids/bitbag_shipping_gateway.yml" } - - { resource: "@ShippingExportPlugin/Resources/config/grids/bitbag_shipping_export.yml" } - - { resource: "@ShippingExportPlugin/Resources/config/services.yml" } + - { resource: "@BitBagShippingExportPlugin/Resources/config/resource/bitbag_shipping_gateway.yml" } + - { resource: "@BitBagShippingExportPlugin/Resources/config/resource/bitbag_shipping_export.yml" } + - { resource: "@BitBagShippingExportPlugin/Resources/config/grids/bitbag_shipping_gateway.yml" } + - { resource: "@BitBagShippingExportPlugin/Resources/config/grids/bitbag_shipping_export.yml" } + - { resource: "@BitBagShippingExportPlugin/Resources/config/services.yml" } sylius_grid: templates: action: - create_shipping_gateway: "@ShippingExportPlugin/ShippingGateway/Action/_create.html.twig" - export_shipments: "@ShippingExportPlugin/ShippingExport/Action/_exportShipments.html.twig" + create_shipping_gateway: "@BitBagShippingExportPlugin/ShippingGateway/Action/_create.html.twig" + export_shipments: "@BitBagShippingExportPlugin/ShippingExport/Action/_exportShipments.html.twig" diff --git a/src/Resources/config/doctrine/ShippingExport.orm.yml b/src/Resources/config/doctrine/ShippingExport.orm.yml index 1520cce..93a8100 100644 --- a/src/Resources/config/doctrine/ShippingExport.orm.yml +++ b/src/Resources/config/doctrine/ShippingExport.orm.yml @@ -1,4 +1,4 @@ -BitBag\ShippingExportPlugin\Entity\ShippingExport: +BitBag\SyliusShippingExportPlugin\Entity\ShippingExport: type: entity table: bitbag_shipping_export id: @@ -26,7 +26,7 @@ BitBag\ShippingExportPlugin\Entity\ShippingExport: cascade: ['persist'] manyToOne: shippingGateway: - targetEntity: BitBag\ShippingExportPlugin\Entity\ShippingGateway + targetEntity: BitBag\SyliusShippingExportPlugin\Entity\ShippingGateway joinColumn: name: shipping_gateway_id referencedColumnName: id \ No newline at end of file diff --git a/src/Resources/config/doctrine/ShippingGateway.orm.yml b/src/Resources/config/doctrine/ShippingGateway.orm.yml index dc2c0c9..356743b 100644 --- a/src/Resources/config/doctrine/ShippingGateway.orm.yml +++ b/src/Resources/config/doctrine/ShippingGateway.orm.yml @@ -1,4 +1,4 @@ -BitBag\ShippingExportPlugin\Entity\ShippingGateway: +BitBag\SyliusShippingExportPlugin\Entity\ShippingGateway: type: entity table: bitbag_shipping_gateway id: @@ -26,6 +26,6 @@ BitBag\ShippingExportPlugin\Entity\ShippingGateway: referencedColumnName: id oneToMany: shippingExports: - targetEntity: BitBag\ShippingExportPlugin\Entity\ShippingExport + targetEntity: BitBag\SyliusShippingExportPlugin\Entity\ShippingExport mappedBy: shippingGateway orphanRemoval: true \ No newline at end of file diff --git a/src/Resources/config/grids/bitbag_shipping_export.yml b/src/Resources/config/grids/bitbag_shipping_export.yml index 2c9acc5..f792e35 100644 --- a/src/Resources/config/grids/bitbag_shipping_export.yml +++ b/src/Resources/config/grids/bitbag_shipping_export.yml @@ -16,7 +16,7 @@ sylius_grid: path: . sortable: shipment.order options: - template: "@ShippingExportPlugin/ShippingExport/Grid/Field/orderNumber.html.twig" + template: "@BitBagShippingExportPlugin/ShippingExport/Grid/Field/orderNumber.html.twig" shipment: type: datetime label: sylius.ui.created_at @@ -30,28 +30,28 @@ sylius_grid: path: . sortable: ~ options: - template: "@ShippingExportPlugin/ShippingExport/Grid/Field/exportedAt.html.twig" + template: "@BitBagShippingExportPlugin/ShippingExport/Grid/Field/exportedAt.html.twig" shippingMethod: type: twig label: sylius.ui.shipping_method path: . sortable: ~ options: - template: "@ShippingExportPlugin/ShippingExport/Grid/Field/shippingMethod.html.twig" + template: "@BitBagShippingExportPlugin/ShippingExport/Grid/Field/shippingMethod.html.twig" labelPath: type: twig label: bitbag.ui.shipping_export_label path: . sortable: ~ options: - template: "@ShippingExportPlugin/ShippingExport/Grid/Field/shippingExportLabel.html.twig" + template: "@BitBagShippingExportPlugin/ShippingExport/Grid/Field/shippingExportLabel.html.twig" state: type: twig label: sylius.ui.state path: . sortable: ~ options: - template: "@ShippingExportPlugin/ShippingExport/Grid/Field/state.html.twig" + template: "@BitBagShippingExportPlugin/ShippingExport/Grid/Field/state.html.twig" filters: search: type: string @@ -64,4 +64,4 @@ sylius_grid: actions: main: create: - type: export_shipments \ No newline at end of file + type: export_shipments diff --git a/src/Resources/config/resource/bitbag_shipping_export.yml b/src/Resources/config/resource/bitbag_shipping_export.yml index e554ff6..e25903e 100644 --- a/src/Resources/config/resource/bitbag_shipping_export.yml +++ b/src/Resources/config/resource/bitbag_shipping_export.yml @@ -2,7 +2,7 @@ sylius_resource: resources: bitbag.shipping_export: classes: - model: BitBag\ShippingExportPlugin\Entity\ShippingExport - repository: BitBag\ShippingExportPlugin\Repository\ShippingExportRepository - form: BitBag\ShippingExportPlugin\Form\Type\ShippingGatewayType - controller: BitBag\ShippingExportPlugin\Controller\ShippingExportController \ No newline at end of file + model: BitBag\SyliusShippingExportPlugin\Entity\ShippingExport + repository: BitBag\SyliusShippingExportPlugin\Repository\ShippingExportRepository + form: BitBag\SyliusShippingExportPlugin\Form\Type\ShippingGatewayType + controller: BitBag\SyliusShippingExportPlugin\Controller\ShippingExportController diff --git a/src/Resources/config/resource/bitbag_shipping_gateway.yml b/src/Resources/config/resource/bitbag_shipping_gateway.yml index 4f97f84..5f34812 100644 --- a/src/Resources/config/resource/bitbag_shipping_gateway.yml +++ b/src/Resources/config/resource/bitbag_shipping_gateway.yml @@ -2,7 +2,7 @@ sylius_resource: resources: bitbag.shipping_gateway: classes: - model: BitBag\ShippingExportPlugin\Entity\ShippingGateway - repository: BitBag\ShippingExportPlugin\Repository\ShippingGatewayRepository - form: BitBag\ShippingExportPlugin\Form\Type\ShippingGatewayType - controller: BitBag\ShippingExportPlugin\Controller\ShippingGatewayController \ No newline at end of file + model: BitBag\SyliusShippingExportPlugin\Entity\ShippingGateway + repository: BitBag\SyliusShippingExportPlugin\Repository\ShippingGatewayRepository + form: BitBag\SyliusShippingExportPlugin\Form\Type\ShippingGatewayType + controller: BitBag\SyliusShippingExportPlugin\Controller\ShippingGatewayController diff --git a/src/Resources/config/routing.yml b/src/Resources/config/routing.yml index 5328144..28772a9 100644 --- a/src/Resources/config/routing.yml +++ b/src/Resources/config/routing.yml @@ -1,5 +1,5 @@ bitbag_shipping_gateway: - resource: "@ShippingExportPlugin/Resources/config/routing/bitbag_shipping_gateway.yml" + resource: "@BitBagShippingExportPlugin/Resources/config/routing/bitbag_shipping_gateway.yml" bitbag_shipping_export: - resource: "@ShippingExportPlugin/Resources/config/routing/bitbag_shipping_export.yml" \ No newline at end of file + resource: "@BitBagShippingExportPlugin/Resources/config/routing/bitbag_shipping_export.yml" diff --git a/src/Resources/config/routing/bitbag_shipping_export.yml b/src/Resources/config/routing/bitbag_shipping_export.yml index 5e710dc..ff2cf92 100644 --- a/src/Resources/config/routing/bitbag_shipping_export.yml +++ b/src/Resources/config/routing/bitbag_shipping_export.yml @@ -33,4 +33,4 @@ bitbag_admin_export_single_shipment: bitbag_admin_get_shipping_label: path: /shipping-exports/label/{id} defaults: - _controller: bitbag.controller.shipping_export:getLabel \ No newline at end of file + _controller: bitbag.controller.shipping_export:getLabel diff --git a/src/Resources/config/routing/bitbag_shipping_gateway.yml b/src/Resources/config/routing/bitbag_shipping_gateway.yml index 2a1c6df..b699c1a 100644 --- a/src/Resources/config/routing/bitbag_shipping_gateway.yml +++ b/src/Resources/config/routing/bitbag_shipping_gateway.yml @@ -40,4 +40,4 @@ bitbag_admin_get_shipping_gateways: methods: [GET] defaults: _controller: bitbag.controller.shipping_gateway:getShippingGatewaysAction - template: ShippingExportPlugin:ShippingGateway/Gateways:shippingGateways.html.twig + template: BitBagShippingExportPlugin:ShippingGateway/Gateways:shippingGateways.html.twig diff --git a/src/Resources/config/services.yml b/src/Resources/config/services.yml index 3d6eb2f..89168d4 100644 --- a/src/Resources/config/services.yml +++ b/src/Resources/config/services.yml @@ -1,35 +1,35 @@ parameters: bitbag.shipping_gateway.validation_groups: ['bitbag'] - bitbag.shipping_labels_path: '%kernel.root_dir%/../shipping_labels' + bitbag.shipping_labels_path: "%kernel.root_dir%/../shipping_labels" services: bitbag.shipping_export_plugin.menu.shipping_gateway: - class: BitBag\ShippingExportPlugin\Menu\ShippingGatewayMenuBuilder + class: BitBag\SyliusShippingExportPlugin\Menu\ShippingGatewayMenuBuilder tags: - { name: kernel.event_listener, event: sylius.menu.admin.main, method: buildMenu } bitbag.shipping_export_plugin.menu.shipping_export: - class: BitBag\ShippingExportPlugin\Menu\ShippingExportMenuBuilder + class: BitBag\SyliusShippingExportPlugin\Menu\ShippingExportMenuBuilder tags: - { name: kernel.event_listener, event: sylius.menu.admin.main, method: buildMenu } bitbag.shipping_export_plugin.event_listener.placing_shipment_for_gateway: - class: BitBag\ShippingExportPlugin\EventListener\PlacingShipmentForGatewayEventListener + class: BitBag\SyliusShippingExportPlugin\EventListener\PlacingShipmentForGatewayEventListener arguments: - - '@bitbag.repository.shipping_gateway' - - '@bitbag.repository.shipping_export' - - '@bitbag.factory.shipping_export' + - "@bitbag.repository.shipping_gateway" + - "@bitbag.repository.shipping_export" + - "@bitbag.factory.shipping_export" tags: - { name: kernel.event_listener, event: sylius.order.post_complete, method: prepareShippingExport } bitbag.shipping_export_plugin.shipping_gateway.form.type: - class: BitBag\ShippingExportPlugin\Form\Type\ShippingGatewayType + class: BitBag\SyliusShippingExportPlugin\Form\Type\ShippingGatewayType arguments: - - '%bitbag.model.shipping_gateway.class%' - - '%bitbag.shipping_gateway.validation_groups%' - - '@bitbag.shipping_export_plugin.context.shipping_gateway_type' - - '@sylius.repository.shipping_method' - - '%sylius.model.shipping_method.class%' + - "%bitbag.model.shipping_gateway.class%" + - "%bitbag.shipping_gateway.validation_groups%" + - "@bitbag.shipping_export_plugin.context.shipping_gateway_type" + - "@sylius.repository.shipping_method" + - "%sylius.model.shipping_method.class%" tags: - { name: form.type } @@ -37,9 +37,9 @@ services: class: Sylius\Bundle\ResourceBundle\Form\Registry\FormTypeRegistry bitbag.shipping_export_plugin.context.shipping_gateway_type: - class: BitBag\ShippingExportPlugin\Context\ShippingGatewayContext + class: BitBag\SyliusShippingExportPlugin\Context\ShippingGatewayContext arguments: - "@request_stack" - "@bitbag.form_registry.shipping_gateway_config" - "@bitbag.repository.shipping_gateway" - - "%bitbag.shipping_gateways%" \ No newline at end of file + - "%bitbag.shipping_gateways%" diff --git a/src/Resources/views/ShippingExport/Action/_exportShipments.html.twig b/src/Resources/views/ShippingExport/Action/_exportShipments.html.twig index 25c0a52..ac8fc58 100644 --- a/src/Resources/views/ShippingExport/Action/_exportShipments.html.twig +++ b/src/Resources/views/ShippingExport/Action/_exportShipments.html.twig @@ -4,4 +4,4 @@ {{ 'bitbag.ui.export_all_new_shipments'|trans }} - \ No newline at end of file + diff --git a/src/Resources/views/ShippingExport/Grid/Field/exportedAt.html.twig b/src/Resources/views/ShippingExport/Grid/Field/exportedAt.html.twig index adda062..281d758 100644 --- a/src/Resources/views/ShippingExport/Grid/Field/exportedAt.html.twig +++ b/src/Resources/views/ShippingExport/Grid/Field/exportedAt.html.twig @@ -4,4 +4,4 @@ {{ 'bitbag.ui.not_exported_yet'|trans }} -{% endif %} \ No newline at end of file +{% endif %} diff --git a/src/Resources/views/ShippingExport/Grid/Field/orderNumber.html.twig b/src/Resources/views/ShippingExport/Grid/Field/orderNumber.html.twig index 2b62fb0..e9e5321 100644 --- a/src/Resources/views/ShippingExport/Grid/Field/orderNumber.html.twig +++ b/src/Resources/views/ShippingExport/Grid/Field/orderNumber.html.twig @@ -1 +1 @@ -#{{ data.shipment.order.number }} \ No newline at end of file +#{{ data.shipment.order.number }} diff --git a/src/Resources/views/ShippingExport/Grid/Field/shippingExportLabel.html.twig b/src/Resources/views/ShippingExport/Grid/Field/shippingExportLabel.html.twig index bff4fd6..91c52d9 100644 --- a/src/Resources/views/ShippingExport/Grid/Field/shippingExportLabel.html.twig +++ b/src/Resources/views/ShippingExport/Grid/Field/shippingExportLabel.html.twig @@ -1,7 +1,7 @@ {% if data.labelPath %} - {% include '@ShippingExportPlugin/ShippingExport/Partial/_downloadShippingLabel.html.twig' %} + {% include '@BitBagShippingExportPlugin/ShippingExport/Partial/_downloadShippingLabel.html.twig' %} {% else %} {{ 'bitbag.ui.no_shipping_label'|trans }} -{% endif %} \ No newline at end of file +{% endif %} diff --git a/src/Resources/views/ShippingExport/Grid/Field/shippingMethod.html.twig b/src/Resources/views/ShippingExport/Grid/Field/shippingMethod.html.twig index 01bf6ad..9a53735 100644 --- a/src/Resources/views/ShippingExport/Grid/Field/shippingMethod.html.twig +++ b/src/Resources/views/ShippingExport/Grid/Field/shippingMethod.html.twig @@ -1 +1 @@ -{{ data.shipment.method.name }} \ No newline at end of file +{{ data.shipment.method.name }} diff --git a/src/Resources/views/ShippingExport/Grid/Field/state.html.twig b/src/Resources/views/ShippingExport/Grid/Field/state.html.twig index c0c68bd..6b318bb 100644 --- a/src/Resources/views/ShippingExport/Grid/Field/state.html.twig +++ b/src/Resources/views/ShippingExport/Grid/Field/state.html.twig @@ -1,7 +1,7 @@ {% set value = 'bitbag.ui.' ~ data.state %} {% if data.state == 'new' %} - {% include 'ShippingExportPlugin:ShippingExport/Partial:_exportShipment.html.twig' %} + {% include '@BitBagShippingExportPlugin/ShippingExport/Partial/_exportShipment.html.twig' %} {% else %} {{ value|trans }} {% endif %} diff --git a/src/Resources/views/ShippingExport/Partial/_downloadShippingLabel.html.twig b/src/Resources/views/ShippingExport/Partial/_downloadShippingLabel.html.twig index f485951..ec4fbe6 100644 --- a/src/Resources/views/ShippingExport/Partial/_downloadShippingLabel.html.twig +++ b/src/Resources/views/ShippingExport/Partial/_downloadShippingLabel.html.twig @@ -2,4 +2,4 @@ - \ No newline at end of file + diff --git a/src/Resources/views/ShippingExport/Partial/_exportShipment.html.twig b/src/Resources/views/ShippingExport/Partial/_exportShipment.html.twig index f1ee84d..62c3e79 100644 --- a/src/Resources/views/ShippingExport/Partial/_exportShipment.html.twig +++ b/src/Resources/views/ShippingExport/Partial/_exportShipment.html.twig @@ -1,4 +1,4 @@
-
\ No newline at end of file + diff --git a/src/Resources/views/ShippingGateway/_form.html.twig b/src/Resources/views/ShippingGateway/_form.html.twig deleted file mode 100644 index e69de29..0000000 diff --git a/src/phpspec.yml.dist b/src/phpspec.yml.dist index 24ad7ff..c6042d9 100644 --- a/src/phpspec.yml.dist +++ b/src/phpspec.yml.dist @@ -1,5 +1,5 @@ suites: main: - namespace: BitBag\ShippingExportPlugin - psr4_prefix: BitBag\ShippingExportPlugin + namespace: BitBag\SyliusShippingExportPlugin + psr4_prefix: BitBag\SyliusShippingExportPlugin src_path: . diff --git a/src/spec/Context/ShippingGatewayContextSpec.php b/src/spec/Context/ShippingGatewayContextSpec.php index 40a61e1..eee98bf 100644 --- a/src/spec/Context/ShippingGatewayContextSpec.php +++ b/src/spec/Context/ShippingGatewayContextSpec.php @@ -9,12 +9,12 @@ * an email on mikolaj.krol@bitbag.pl. */ -namespace spec\BitBag\ShippingExportPlugin\Context; +namespace spec\BitBag\SyliusShippingExportPlugin\Context; -use BitBag\ShippingExportPlugin\Context\ShippingGatewayContext; -use BitBag\ShippingExportPlugin\Entity\ShippingGatewayInterface; -use BitBag\ShippingExportPlugin\Exception\ShippingGatewayNotFoundException; -use BitBag\ShippingExportPlugin\Repository\ShippingGatewayRepositoryInterface; +use BitBag\SyliusShippingExportPlugin\Context\ShippingGatewayContext; +use BitBag\SyliusShippingExportPlugin\Entity\ShippingGatewayInterface; +use BitBag\SyliusShippingExportPlugin\Exception\ShippingGatewayNotFoundException; +use BitBag\SyliusShippingExportPlugin\Repository\ShippingGatewayRepositoryInterface; use PhpSpec\ObjectBehavior; use Sylius\Bundle\ResourceBundle\Form\Registry\FormTypeRegistryInterface; use Symfony\Component\HttpFoundation\Request; diff --git a/src/spec/Entity/ShippingGatewaySpec.php b/src/spec/Entity/ShippingGatewaySpec.php index 670ffe4..9dbcf12 100644 --- a/src/spec/Entity/ShippingGatewaySpec.php +++ b/src/spec/Entity/ShippingGatewaySpec.php @@ -9,11 +9,11 @@ * an email on mikolaj.krol@bitbag.pl. */ -namespace spec\BitBag\ShippingExportPlugin\Entity; +namespace spec\BitBag\SyliusShippingExportPlugin\Entity; -use BitBag\ShippingExportPlugin\Entity\ShippingExportInterface; -use BitBag\ShippingExportPlugin\Entity\ShippingGateway; -use BitBag\ShippingExportPlugin\Entity\ShippingGatewayInterface; +use BitBag\SyliusShippingExportPlugin\Entity\ShippingExportInterface; +use BitBag\SyliusShippingExportPlugin\Entity\ShippingGateway; +use BitBag\SyliusShippingExportPlugin\Entity\ShippingGatewayInterface; use Doctrine\Common\Collections\Collection; use PhpSpec\ObjectBehavior; use Sylius\Component\Core\Model\ShippingMethodInterface; diff --git a/src/spec/Event/ExportShipmentEventSpec.php b/src/spec/Event/ExportShipmentEventSpec.php index c83dcab..1d0acf2 100644 --- a/src/spec/Event/ExportShipmentEventSpec.php +++ b/src/spec/Event/ExportShipmentEventSpec.php @@ -9,10 +9,10 @@ * an email on mikolaj.krol@bitbag.pl. */ -namespace spec\BitBag\ShippingExportPlugin\Event; +namespace spec\BitBag\SyliusShippingExportPlugin\Event; -use BitBag\ShippingExportPlugin\Entity\ShippingExportInterface; -use BitBag\ShippingExportPlugin\Event\ExportShipmentEvent; +use BitBag\SyliusShippingExportPlugin\Entity\ShippingExportInterface; +use BitBag\SyliusShippingExportPlugin\Event\ExportShipmentEvent; use Doctrine\ORM\EntityManagerInterface; use PhpSpec\ObjectBehavior; use Prophecy\Argument; diff --git a/src/spec/EventListener/PlacingShipmentForGatewayEventListenerSpec.php b/src/spec/EventListener/PlacingShipmentForGatewayEventListenerSpec.php index aa33995..b8be816 100644 --- a/src/spec/EventListener/PlacingShipmentForGatewayEventListenerSpec.php +++ b/src/spec/EventListener/PlacingShipmentForGatewayEventListenerSpec.php @@ -9,13 +9,13 @@ * an email on mikolaj.krol@bitbag.pl. */ -namespace spec\BitBag\ShippingExportPlugin\EventListener; +namespace spec\BitBag\SyliusShippingExportPlugin\EventListener; -use BitBag\ShippingExportPlugin\Entity\ShippingExportInterface; -use BitBag\ShippingExportPlugin\Entity\ShippingGatewayInterface; -use BitBag\ShippingExportPlugin\EventListener\PlacingShipmentForGatewayEventListener; -use BitBag\ShippingExportPlugin\Repository\ShippingExportRepositoryInterface; -use BitBag\ShippingExportPlugin\Repository\ShippingGatewayRepositoryInterface; +use BitBag\SyliusShippingExportPlugin\Entity\ShippingExportInterface; +use BitBag\SyliusShippingExportPlugin\Entity\ShippingGatewayInterface; +use BitBag\SyliusShippingExportPlugin\EventListener\PlacingShipmentForGatewayEventListener; +use BitBag\SyliusShippingExportPlugin\Repository\ShippingExportRepositoryInterface; +use BitBag\SyliusShippingExportPlugin\Repository\ShippingGatewayRepositoryInterface; use Doctrine\Common\Collections\ArrayCollection; use PhpSpec\ObjectBehavior; use Sylius\Component\Core\Model\OrderInterface; diff --git a/src/spec/Exception/ShippingGatewayLabelNotFoundSpec.php b/src/spec/Exception/ShippingGatewayLabelNotFoundSpec.php index 7251be1..7f79f7c 100644 --- a/src/spec/Exception/ShippingGatewayLabelNotFoundSpec.php +++ b/src/spec/Exception/ShippingGatewayLabelNotFoundSpec.php @@ -9,9 +9,9 @@ * an email on mikolaj.krol@bitbag.pl. */ -namespace spec\BitBag\ShippingExportPlugin\Exception; +namespace spec\BitBag\SyliusShippingExportPlugin\Exception; -use BitBag\ShippingExportPlugin\Exception\ShippingGatewayLabelNotFound; +use BitBag\SyliusShippingExportPlugin\Exception\ShippingGatewayLabelNotFound; use PhpSpec\ObjectBehavior; final class ShippingGatewayLabelNotFoundSpec extends ObjectBehavior diff --git a/src/spec/Exception/ShippingGatewayNotFoundExceptionSpec.php b/src/spec/Exception/ShippingGatewayNotFoundExceptionSpec.php index 6580f98..c854ea1 100644 --- a/src/spec/Exception/ShippingGatewayNotFoundExceptionSpec.php +++ b/src/spec/Exception/ShippingGatewayNotFoundExceptionSpec.php @@ -9,9 +9,9 @@ * an email on mikolaj.krol@bitbag.pl. */ -namespace spec\BitBag\ShippingExportPlugin\Exception; +namespace spec\BitBag\SyliusShippingExportPlugin\Exception; -use BitBag\ShippingExportPlugin\Exception\ShippingGatewayNotFoundException; +use BitBag\SyliusShippingExportPlugin\Exception\ShippingGatewayNotFoundException; use PhpSpec\ObjectBehavior; final class ShippingGatewayNotFoundExceptionSpec extends ObjectBehavior diff --git a/src/spec/Menu/ShippingExportMenuBuilderSpec.php b/src/spec/Menu/ShippingExportMenuBuilderSpec.php index a755fe7..cf57bed 100644 --- a/src/spec/Menu/ShippingExportMenuBuilderSpec.php +++ b/src/spec/Menu/ShippingExportMenuBuilderSpec.php @@ -9,9 +9,9 @@ * an email on mikolaj.krol@bitbag.pl. */ -namespace spec\BitBag\ShippingExportPlugin\Menu; +namespace spec\BitBag\SyliusShippingExportPlugin\Menu; -use BitBag\ShippingExportPlugin\Menu\ShippingExportMenuBuilder; +use BitBag\SyliusShippingExportPlugin\Menu\ShippingExportMenuBuilder; use Knp\Menu\ItemInterface; use PhpSpec\ObjectBehavior; use Sylius\Bundle\UiBundle\Menu\Event\MenuBuilderEvent; diff --git a/src/spec/Menu/ShippingGatewayMenuBuilderSpec.php b/src/spec/Menu/ShippingGatewayMenuBuilderSpec.php index 0949239..d969f0b 100644 --- a/src/spec/Menu/ShippingGatewayMenuBuilderSpec.php +++ b/src/spec/Menu/ShippingGatewayMenuBuilderSpec.php @@ -9,9 +9,9 @@ * an email on mikolaj.krol@bitbag.pl. */ -namespace spec\BitBag\ShippingExportPlugin\Menu; +namespace spec\BitBag\SyliusShippingExportPlugin\Menu; -use BitBag\ShippingExportPlugin\Menu\ShippingGatewayMenuBuilder; +use BitBag\SyliusShippingExportPlugin\Menu\ShippingGatewayMenuBuilder; use Knp\Menu\ItemInterface; use PhpSpec\ObjectBehavior; use Sylius\Bundle\UiBundle\Menu\Event\MenuBuilderEvent; diff --git a/tests/Application/app/AppKernel.php b/tests/Application/app/AppKernel.php index c7bb1d8..febc07e 100755 --- a/tests/Application/app/AppKernel.php +++ b/tests/Application/app/AppKernel.php @@ -18,7 +18,7 @@ public function registerBundles(): array new \FOS\OAuthServerBundle\FOSOAuthServerBundle(), // Required by SyliusApiBundle new \Sylius\Bundle\AdminApiBundle\SyliusAdminApiBundle(), - new \BitBag\ShippingExportPlugin\ShippingExportPlugin(), + new \BitBag\SyliusShippingExportPlugin\BitBagShippingExportPlugin(), ]); } diff --git a/tests/Application/app/config/config.yml b/tests/Application/app/config/config.yml index e1612bd..0c770a5 100755 --- a/tests/Application/app/config/config.yml +++ b/tests/Application/app/config/config.yml @@ -8,7 +8,7 @@ imports: - { resource: "@SyliusShopBundle/Resources/config/app/config.yml" } - { resource: "@SyliusAdminApiBundle/Resources/config/app/config.yml" } - - { resource: "@ShippingExportPlugin/Resources/config/config.yml" } + - { resource: "@BitBagShippingExportPlugin/Resources/config/config.yml" } - { resource: "../../../../vendor/sylius/sylius/app/config/security.yml" } diff --git a/tests/Application/app/config/routing.yml b/tests/Application/app/config/routing.yml index 2b3a1a0..7eef16b 100755 --- a/tests/Application/app/config/routing.yml +++ b/tests/Application/app/config/routing.yml @@ -2,5 +2,5 @@ sylius: resource: "../../../../vendor/sylius/sylius/app/config/routing.yml" bitbag_shipping_export_plugin: - resource: "@ShippingExportPlugin/Resources/config/routing.yml" + resource: "@BitBagShippingExportPlugin/Resources/config/routing.yml" prefix: /admin diff --git a/tests/Application/app/config/services.yml b/tests/Application/app/config/services.yml index a83b948..9410272 100644 --- a/tests/Application/app/config/services.yml +++ b/tests/Application/app/config/services.yml @@ -1,10 +1,10 @@ services: bitbag.shipping_gateway_plugin.mock.form.type.frank_martin_shipping_gateway: - class: Tests\BitBag\ShippingExportPlugin\Behat\Mock\Form\Type\FrankMartinShippingGatewayType + class: Tests\BitBag\SyliusShippingExportPlugin\Behat\Mock\Form\Type\FrankMartinShippingGatewayType tags: - { name: bitbag.shipping_gateway_configuration_type, type: "frank_martin_shipping_gateway", label: "Transporter Gateway" } bitbag.shipping_gateway_plugin.mock.event_listener.frank_martin_shipping_export: - class: Tests\BitBag\ShippingExportPlugin\Behat\Mock\EventListener\FrankMartinShippingExportEventListener + class: Tests\BitBag\SyliusShippingExportPlugin\Behat\Mock\EventListener\FrankMartinShippingExportEventListener tags: - { name: kernel.event_listener, event: 'bitbag.export_shipment', method: exportShipment } diff --git a/tests/Behat/Behaviour/ContainsError.php b/tests/Behat/Behaviour/ContainsError.php index ae70e7e..6794afb 100644 --- a/tests/Behat/Behaviour/ContainsError.php +++ b/tests/Behat/Behaviour/ContainsError.php @@ -9,7 +9,7 @@ * an email on mikolaj.krol@bitbag.pl. */ -namespace Tests\BitBag\ShippingExportPlugin\Behat\Behaviour; +namespace Tests\BitBag\SyliusShippingExportPlugin\Behat\Behaviour; use Behat\Mink\Element\NodeElement; use Sylius\Behat\Behaviour\DocumentAccessor; diff --git a/tests/Behat/Context/Hook/ShippingExportContext.php b/tests/Behat/Context/Hook/ShippingExportContext.php index a3262c1..e86e887 100644 --- a/tests/Behat/Context/Hook/ShippingExportContext.php +++ b/tests/Behat/Context/Hook/ShippingExportContext.php @@ -9,7 +9,7 @@ * an email on mikolaj.krol@bitbag.pl. */ -namespace Tests\BitBag\ShippingExportPlugin\Behat\Context\Hook; +namespace Tests\BitBag\SyliusShippingExportPlugin\Behat\Context\Hook; use Behat\Behat\Context\Context; use Symfony\Component\Filesystem\Exception\IOException; diff --git a/tests/Behat/Context/Setup/ShippingExportContext.php b/tests/Behat/Context/Setup/ShippingExportContext.php index 6fa9cb0..30e5146 100644 --- a/tests/Behat/Context/Setup/ShippingExportContext.php +++ b/tests/Behat/Context/Setup/ShippingExportContext.php @@ -9,13 +9,13 @@ * an email on mikolaj.krol@bitbag.pl. */ -namespace Tests\BitBag\ShippingExportPlugin\Behat\Context\Setup; +namespace Tests\BitBag\SyliusShippingExportPlugin\Behat\Context\Setup; use Behat\Behat\Context\Context; -use BitBag\ShippingExportPlugin\Entity\ShippingExport; -use BitBag\ShippingExportPlugin\Entity\ShippingGatewayInterface; -use BitBag\ShippingExportPlugin\Repository\ShippingExportRepositoryInterface; -use BitBag\ShippingExportPlugin\Repository\ShippingGatewayRepositoryInterface; +use BitBag\SyliusShippingExportPlugin\Entity\ShippingExport; +use BitBag\SyliusShippingExportPlugin\Entity\ShippingGatewayInterface; +use BitBag\SyliusShippingExportPlugin\Repository\ShippingExportRepositoryInterface; +use BitBag\SyliusShippingExportPlugin\Repository\ShippingGatewayRepositoryInterface; use Sylius\Behat\Service\SharedStorageInterface; use Sylius\Component\Core\Model\OrderInterface; use Sylius\Component\Core\Model\ShipmentInterface; diff --git a/tests/Behat/Context/Setup/ShippingGatewayContext.php b/tests/Behat/Context/Setup/ShippingGatewayContext.php index 4b0bb28..c81f42c 100644 --- a/tests/Behat/Context/Setup/ShippingGatewayContext.php +++ b/tests/Behat/Context/Setup/ShippingGatewayContext.php @@ -9,16 +9,16 @@ * an email on mikolaj.krol@bitbag.pl. */ -namespace Tests\BitBag\ShippingExportPlugin\Behat\Context\Setup; +namespace Tests\BitBag\SyliusShippingExportPlugin\Behat\Context\Setup; use Behat\Behat\Context\Context; -use BitBag\ShippingExportPlugin\Entity\ShippingGatewayInterface; +use BitBag\SyliusShippingExportPlugin\Entity\ShippingGatewayInterface; use Doctrine\ORM\EntityManagerInterface; use Sylius\Behat\Service\SharedStorageInterface; use Sylius\Component\Core\Model\ShippingMethodInterface; use Sylius\Component\Resource\Factory\FactoryInterface; use Sylius\Component\Resource\Repository\RepositoryInterface; -use Tests\BitBag\ShippingExportPlugin\Behat\Mock\EventListener\FrankMartinShippingExportEventListener; +use Tests\BitBag\SyliusShippingExportPlugin\Behat\Mock\EventListener\FrankMartinShippingExportEventListener; final class ShippingGatewayContext implements Context { diff --git a/tests/Behat/Context/Ui/Admin/ShippingExportContext.php b/tests/Behat/Context/Ui/Admin/ShippingExportContext.php index 1efe080..8aa4cb9 100644 --- a/tests/Behat/Context/Ui/Admin/ShippingExportContext.php +++ b/tests/Behat/Context/Ui/Admin/ShippingExportContext.php @@ -9,12 +9,12 @@ * an email on mikolaj.krol@bitbag.pl. */ -namespace Tests\BitBag\ShippingExportPlugin\Behat\Context\Ui\Admin; +namespace Tests\BitBag\SyliusShippingExportPlugin\Behat\Context\Ui\Admin; use Behat\Behat\Context\Context; use Sylius\Behat\NotificationType; use Sylius\Behat\Service\NotificationCheckerInterface; -use Tests\BitBag\ShippingExportPlugin\Behat\Page\Admin\ShippingExport\IndexPageInterface; +use Tests\BitBag\SyliusShippingExportPlugin\Behat\Page\Admin\ShippingExport\IndexPageInterface; use Webmozart\Assert\Assert; final class ShippingExportContext implements Context diff --git a/tests/Behat/Context/Ui/Admin/ShippingGatewayContext.php b/tests/Behat/Context/Ui/Admin/ShippingGatewayContext.php index 247f38a..bf904f1 100644 --- a/tests/Behat/Context/Ui/Admin/ShippingGatewayContext.php +++ b/tests/Behat/Context/Ui/Admin/ShippingGatewayContext.php @@ -9,7 +9,7 @@ * an email on mikolaj.krol@bitbag.pl. */ -namespace Tests\BitBag\ShippingExportPlugin\Behat\Context\Ui\Admin; +namespace Tests\BitBag\SyliusShippingExportPlugin\Behat\Context\Ui\Admin; use Behat\Behat\Context\Context; use Sylius\Behat\NotificationType; @@ -17,9 +17,9 @@ use Sylius\Behat\Service\NotificationCheckerInterface; use Sylius\Behat\Service\Resolver\CurrentPageResolverInterface; use Sylius\Behat\Service\SharedStorageInterface; -use Tests\BitBag\ShippingExportPlugin\Behat\Behaviour\ContainsError; -use Tests\BitBag\ShippingExportPlugin\Behat\Page\Admin\ShippingGateway\CreatePageInterface; -use Tests\BitBag\ShippingExportPlugin\Behat\Page\Admin\ShippingGateway\UpdatePageInterface; +use Tests\BitBag\SyliusShippingExportPlugin\Behat\Behaviour\ContainsError; +use Tests\BitBag\SyliusShippingExportPlugin\Behat\Page\Admin\ShippingGateway\CreatePageInterface; +use Tests\BitBag\SyliusShippingExportPlugin\Behat\Page\Admin\ShippingGateway\UpdatePageInterface; use Webmozart\Assert\Assert; final class ShippingGatewayContext implements Context diff --git a/tests/Behat/Mock/EventListener/FrankMartinShippingExportEventListener.php b/tests/Behat/Mock/EventListener/FrankMartinShippingExportEventListener.php index 2bbd0bb..c88de91 100644 --- a/tests/Behat/Mock/EventListener/FrankMartinShippingExportEventListener.php +++ b/tests/Behat/Mock/EventListener/FrankMartinShippingExportEventListener.php @@ -9,9 +9,9 @@ * an email on kontakt@bitbag.pl. */ -namespace Tests\BitBag\ShippingExportPlugin\Behat\Mock\EventListener; +namespace Tests\BitBag\SyliusShippingExportPlugin\Behat\Mock\EventListener; -use BitBag\ShippingExportPlugin\Event\ExportShipmentEvent; +use BitBag\SyliusShippingExportPlugin\Event\ExportShipmentEvent; /** * @author Mikołaj Król diff --git a/tests/Behat/Mock/Form/Type/FrankMartinShippingGatewayType.php b/tests/Behat/Mock/Form/Type/FrankMartinShippingGatewayType.php index d0910f9..89e311f 100644 --- a/tests/Behat/Mock/Form/Type/FrankMartinShippingGatewayType.php +++ b/tests/Behat/Mock/Form/Type/FrankMartinShippingGatewayType.php @@ -9,7 +9,7 @@ * an email on kontakt@bitbag.pl. */ -namespace Tests\BitBag\ShippingExportPlugin\Behat\Mock\Form\Type; +namespace Tests\BitBag\SyliusShippingExportPlugin\Behat\Mock\Form\Type; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\TextType; diff --git a/tests/Behat/Page/Admin/ShippingExport/IndexPage.php b/tests/Behat/Page/Admin/ShippingExport/IndexPage.php index 5f148ec..d02a255 100644 --- a/tests/Behat/Page/Admin/ShippingExport/IndexPage.php +++ b/tests/Behat/Page/Admin/ShippingExport/IndexPage.php @@ -9,7 +9,7 @@ * an email on kontakt@bitbag.pl. */ -namespace Tests\BitBag\ShippingExportPlugin\Behat\Page\Admin\ShippingExport; +namespace Tests\BitBag\SyliusShippingExportPlugin\Behat\Page\Admin\ShippingExport; use Behat\Mink\Element\ElementInterface; use Sylius\Behat\Page\Admin\Crud\IndexPage as BaseIndexPage; diff --git a/tests/Behat/Page/Admin/ShippingExport/IndexPageInterface.php b/tests/Behat/Page/Admin/ShippingExport/IndexPageInterface.php index 1d43d2b..f9d48b0 100644 --- a/tests/Behat/Page/Admin/ShippingExport/IndexPageInterface.php +++ b/tests/Behat/Page/Admin/ShippingExport/IndexPageInterface.php @@ -9,7 +9,7 @@ * an email on kontakt@bitbag.pl. */ -namespace Tests\BitBag\ShippingExportPlugin\Behat\Page\Admin\ShippingExport; +namespace Tests\BitBag\SyliusShippingExportPlugin\Behat\Page\Admin\ShippingExport; use Behat\Mink\Element\ElementInterface; use Sylius\Behat\Page\Admin\Crud\IndexPageInterface as BaseIndexPage; diff --git a/tests/Behat/Page/Admin/ShippingGateway/CreatePage.php b/tests/Behat/Page/Admin/ShippingGateway/CreatePage.php index 5dd70ff..958fef1 100644 --- a/tests/Behat/Page/Admin/ShippingGateway/CreatePage.php +++ b/tests/Behat/Page/Admin/ShippingGateway/CreatePage.php @@ -9,10 +9,10 @@ * an email on kontakt@bitbag.pl. */ -namespace Tests\BitBag\ShippingExportPlugin\Behat\Page\Admin\ShippingGateway; +namespace Tests\BitBag\SyliusShippingExportPlugin\Behat\Page\Admin\ShippingGateway; use Sylius\Behat\Page\Admin\Crud\CreatePage as BaseCreatePage; -use Tests\BitBag\ShippingExportPlugin\Behat\Behaviour\ContainsError; +use Tests\BitBag\SyliusShippingExportPlugin\Behat\Behaviour\ContainsError; /** * @author Mikołaj Król diff --git a/tests/Behat/Page/Admin/ShippingGateway/CreatePageInterface.php b/tests/Behat/Page/Admin/ShippingGateway/CreatePageInterface.php index a3e4a9a..cdcd5d7 100644 --- a/tests/Behat/Page/Admin/ShippingGateway/CreatePageInterface.php +++ b/tests/Behat/Page/Admin/ShippingGateway/CreatePageInterface.php @@ -9,7 +9,7 @@ * an email on kontakt@bitbag.pl. */ -namespace Tests\BitBag\ShippingExportPlugin\Behat\Page\Admin\ShippingGateway; +namespace Tests\BitBag\SyliusShippingExportPlugin\Behat\Page\Admin\ShippingGateway; use Sylius\Behat\Page\Admin\Crud\CreatePageInterface as BaseCreatePageInterface; diff --git a/tests/Behat/Page/Admin/ShippingGateway/UpdatePage.php b/tests/Behat/Page/Admin/ShippingGateway/UpdatePage.php index 25072f2..25311c6 100644 --- a/tests/Behat/Page/Admin/ShippingGateway/UpdatePage.php +++ b/tests/Behat/Page/Admin/ShippingGateway/UpdatePage.php @@ -9,10 +9,10 @@ * an email on kontakt@bitbag.pl. */ -namespace Tests\BitBag\ShippingExportPlugin\Behat\Page\Admin\ShippingGateway; +namespace Tests\BitBag\SyliusShippingExportPlugin\Behat\Page\Admin\ShippingGateway; use Sylius\Behat\Page\Admin\Crud\UpdatePage as BaseUpdatePage; -use Tests\BitBag\ShippingExportPlugin\Behat\Behaviour\ContainsError; +use Tests\BitBag\SyliusShippingExportPlugin\Behat\Behaviour\ContainsError; /** * @author Mikołaj Król diff --git a/tests/Behat/Page/Admin/ShippingGateway/UpdatePageInterface.php b/tests/Behat/Page/Admin/ShippingGateway/UpdatePageInterface.php index dd24017..2566287 100644 --- a/tests/Behat/Page/Admin/ShippingGateway/UpdatePageInterface.php +++ b/tests/Behat/Page/Admin/ShippingGateway/UpdatePageInterface.php @@ -9,7 +9,7 @@ * an email on kontakt@bitbag.pl. */ -namespace Tests\BitBag\ShippingExportPlugin\Behat\Page\Admin\ShippingGateway; +namespace Tests\BitBag\SyliusShippingExportPlugin\Behat\Page\Admin\ShippingGateway; use Sylius\Behat\Page\Admin\Crud\UpdatePageInterface as BaseUpdatePage; diff --git a/tests/Behat/Resources/contexts.yml b/tests/Behat/Resources/contexts.yml index a42a5be..f2cfd99 100644 --- a/tests/Behat/Resources/contexts.yml +++ b/tests/Behat/Resources/contexts.yml @@ -1,6 +1,6 @@ services: bitbag.behat.context.hook.shipping_export: - class: Tests\BitBag\ShippingExportPlugin\Behat\Context\Hook\ShippingExportContext + class: Tests\BitBag\SyliusShippingExportPlugin\Behat\Context\Hook\ShippingExportContext arguments: - '@__symfony__.filesystem' - '%__symfony__.bitbag.shipping_labels_path%' @@ -8,7 +8,7 @@ services: - { name: fob.context_service } bitbag.behat.context.setup.shipping_gateway: - class: Tests\BitBag\ShippingExportPlugin\Behat\Context\Setup\ShippingGatewayContext + class: Tests\BitBag\SyliusShippingExportPlugin\Behat\Context\Setup\ShippingGatewayContext arguments: - '@__symfony__.sylius.factory.shipping_method' - '@__symfony__.bitbag.factory.shipping_gateway' @@ -20,7 +20,7 @@ services: - { name: fob.context_service } bitbag.behat.context.setup.shipping_export: - class: Tests\BitBag\ShippingExportPlugin\Behat\Context\Setup\ShippingExportContext + class: Tests\BitBag\SyliusShippingExportPlugin\Behat\Context\Setup\ShippingExportContext arguments: - '@__symfony__.sylius.repository.order' - '@sylius.behat.shared_storage' @@ -34,7 +34,7 @@ services: - { name: fob.context_service } bitbag.behat.context.ui.admin.shipping_gateway: - class: Tests\BitBag\ShippingExportPlugin\Behat\Context\Ui\Admin\ShippingGatewayContext + class: Tests\BitBag\SyliusShippingExportPlugin\Behat\Context\Ui\Admin\ShippingGatewayContext arguments: - '@bitbag.behat.page.admin.shipping_gateway.create' - '@bitbag.behat.page.admin.shipping_gateway.update' @@ -45,7 +45,7 @@ services: - { name: fob.context_service } bitbag.behat.context.ui.admin.shipping_export: - class: Tests\BitBag\ShippingExportPlugin\Behat\Context\Ui\Admin\ShippingExportContext + class: Tests\BitBag\SyliusShippingExportPlugin\Behat\Context\Ui\Admin\ShippingExportContext arguments: - '@bitbag.behat.page.admin.shipping_export.index' - '@sylius.behat.notification_checker' diff --git a/tests/Behat/Resources/pages.yml b/tests/Behat/Resources/pages.yml index cf51a91..ffe2706 100644 --- a/tests/Behat/Resources/pages.yml +++ b/tests/Behat/Resources/pages.yml @@ -1,20 +1,20 @@ services: bitbag.behat.page.admin.shipping_gateway.create: - class: Tests\BitBag\ShippingExportPlugin\Behat\Page\Admin\ShippingGateway\CreatePage + class: Tests\BitBag\SyliusShippingExportPlugin\Behat\Page\Admin\ShippingGateway\CreatePage parent: sylius.behat.page.admin.crud.create public: false arguments: - 'bitbag_admin_shipping_gateway_create' bitbag.behat.page.admin.shipping_gateway.update: - class: Tests\BitBag\ShippingExportPlugin\Behat\Page\Admin\ShippingGateway\UpdatePage + class: Tests\BitBag\SyliusShippingExportPlugin\Behat\Page\Admin\ShippingGateway\UpdatePage parent: sylius.behat.page.admin.crud.update public: false arguments: - 'bitbag_admin_shipping_gateway_update' bitbag.behat.page.admin.shipping_export.index: - class: Tests\BitBag\ShippingExportPlugin\Behat\Page\Admin\ShippingExport\IndexPage + class: Tests\BitBag\SyliusShippingExportPlugin\Behat\Page\Admin\ShippingExport\IndexPage parent: sylius.behat.page.admin.crud.index public: false arguments: