Skip to content

Commit

Permalink
Fix CS & Behat build
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbager committed Feb 2, 2018
1 parent 5540c0a commit d6496a4
Show file tree
Hide file tree
Showing 75 changed files with 167 additions and 188 deletions.
3 changes: 2 additions & 1 deletion behat.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
},
"autoload": {
"psr-4": {
"BitBag\\ShippingExportPlugin\\": "src/",
"Tests\\BitBag\\ShippingExportPlugin\\": "tests/"
"BitBag\\SyliusShippingExportPlugin\\": "src/",
"Tests\\BitBag\\SyliusShippingExportPlugin\\": "tests/"
}
},
"prefer-stable": true,
Expand Down
Empty file removed etc/build/.gitkeep
Empty file.
2 changes: 1 addition & 1 deletion phpspec.yml.dist
Original file line number Diff line number Diff line change
@@ -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 }
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
* an email on [email protected].
*/

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;

Expand Down
10 changes: 5 additions & 5 deletions src/Context/ShippingGatewayContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions src/Context/ShippingGatewayContextInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
6 changes: 3 additions & 3 deletions src/Controller/ShippingExportController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/ShippingGatewayController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
22 changes: 0 additions & 22 deletions src/DependencyInjection/AcmeSyliusExampleExtension.php

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/DependencyInjection/ShippingExportExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/ShippingExport.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

declare(strict_types=1);

namespace BitBag\ShippingExportPlugin\Entity;
namespace BitBag\SyliusShippingExportPlugin\Entity;

use Sylius\Component\Core\Model\ShipmentInterface;

Expand Down
2 changes: 1 addition & 1 deletion src/Entity/ShippingExportInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/ShippingGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/ShippingGatewayInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/Event/ExportShipmentEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 5 additions & 5 deletions src/EventListener/PlacingShipmentForGatewayEventListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/ShippingGatewayLabelNotFound.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

declare(strict_types=1);

namespace BitBag\ShippingExportPlugin\Exception;
namespace BitBag\SyliusShippingExportPlugin\Exception;

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

declare(strict_types=1);

namespace BitBag\ShippingExportPlugin\Exception;
namespace BitBag\SyliusShippingExportPlugin\Exception;

final class ShippingGatewayNotFoundException extends \Exception
{
Expand Down
6 changes: 3 additions & 3 deletions src/Form/Type/ShippingGatewayType.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Menu/ShippingExportMenuBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

declare(strict_types=1);

namespace BitBag\ShippingExportPlugin\Menu;
namespace BitBag\SyliusShippingExportPlugin\Menu;

use Sylius\Bundle\UiBundle\Menu\Event\MenuBuilderEvent;

Expand Down
2 changes: 1 addition & 1 deletion src/Menu/ShippingGatewayMenuBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

declare(strict_types=1);

namespace BitBag\ShippingExportPlugin\Menu;
namespace BitBag\SyliusShippingExportPlugin\Menu;

use Sylius\Bundle\UiBundle\Menu\Event\MenuBuilderEvent;

Expand Down
4 changes: 2 additions & 2 deletions src/Repository/ShippingExportRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/Repository/ShippingExportRepositoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/Repository/ShippingGatewayRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/Repository/ShippingGatewayRepositoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
14 changes: 7 additions & 7 deletions src/Resources/config/config.yml
Original file line number Diff line number Diff line change
@@ -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"
4 changes: 2 additions & 2 deletions src/Resources/config/doctrine/ShippingExport.orm.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BitBag\ShippingExportPlugin\Entity\ShippingExport:
BitBag\SyliusShippingExportPlugin\Entity\ShippingExport:
type: entity
table: bitbag_shipping_export
id:
Expand Down Expand Up @@ -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
4 changes: 2 additions & 2 deletions src/Resources/config/doctrine/ShippingGateway.orm.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BitBag\ShippingExportPlugin\Entity\ShippingGateway:
BitBag\SyliusShippingExportPlugin\Entity\ShippingGateway:
type: entity
table: bitbag_shipping_gateway
id:
Expand Down Expand Up @@ -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
12 changes: 6 additions & 6 deletions src/Resources/config/grids/bitbag_shipping_export.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -64,4 +64,4 @@ sylius_grid:
actions:
main:
create:
type: export_shipments
type: export_shipments
Loading

0 comments on commit d6496a4

Please sign in to comment.