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

Splitting up the view repositories #362

Merged
merged 4 commits into from
Jan 3, 2019
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

declare(strict_types=1);

namespace spec\Sylius\ShopApiPlugin\ViewRepository;
namespace spec\Sylius\ShopApiPlugin\ViewRepository\Cart;

use PhpSpec\ObjectBehavior;
use Sylius\Component\Core\Model\OrderInterface;
use Sylius\Component\Core\Repository\OrderRepositoryInterface;
use Sylius\ShopApiPlugin\Factory\CartViewFactoryInterface;
use Sylius\ShopApiPlugin\View\CartSummaryView;
use Sylius\ShopApiPlugin\ViewRepository\CartViewRepositoryInterface;
use Sylius\ShopApiPlugin\ViewRepository\Cart\CartViewRepositoryInterface;

final class CartViewRepositorySpec extends ObjectBehavior
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace spec\Sylius\ShopApiPlugin\ViewRepository;
namespace spec\Sylius\ShopApiPlugin\ViewRepository\Order;

use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
Expand All @@ -13,7 +13,7 @@
use Sylius\Component\Core\Repository\OrderRepositoryInterface;
use Sylius\ShopApiPlugin\Factory\PlacedOrderViewFactoryInterface;
use Sylius\ShopApiPlugin\View\PlacedOrderView;
use Sylius\ShopApiPlugin\ViewRepository\PlacedOrderViewRepositoryInterface;
use Sylius\ShopApiPlugin\ViewRepository\Order\PlacedOrderViewRepositoryInterface;

final class PlacedOrderViewRepositorySpec extends ObjectBehavior
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace spec\Sylius\ShopApiPlugin\ViewRepository;
namespace spec\Sylius\ShopApiPlugin\ViewRepository\Product;

use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
Expand All @@ -13,7 +13,7 @@
use Sylius\ShopApiPlugin\Factory\ProductViewFactoryInterface;
use Sylius\ShopApiPlugin\Provider\SupportedLocaleProviderInterface;
use Sylius\ShopApiPlugin\View\ProductView;
use Sylius\ShopApiPlugin\ViewRepository\ProductDetailsViewRepositoryInterface;
use Sylius\ShopApiPlugin\ViewRepository\Product\ProductDetailsViewRepositoryInterface;

final class ProductDetailsViewRepositorySpec extends ObjectBehavior
{
Expand All @@ -31,7 +31,7 @@ function let(
);
}

function it_is_product_catalog(): void
function it_is_product_detail(): void
{
$this->shouldImplement(ProductDetailsViewRepositoryInterface::class);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Cart/AddCouponAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use League\Tactician\CommandBus;
use Sylius\ShopApiPlugin\Factory\ValidationErrorViewFactoryInterface;
use Sylius\ShopApiPlugin\Request\AddCouponRequest;
use Sylius\ShopApiPlugin\ViewRepository\CartViewRepositoryInterface;
use Sylius\ShopApiPlugin\ViewRepository\Cart\CartViewRepositoryInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Cart/ChangeItemQuantityAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use League\Tactician\CommandBus;
use Sylius\ShopApiPlugin\Factory\ValidationErrorViewFactoryInterface;
use Sylius\ShopApiPlugin\Request\ChangeItemQuantityRequest;
use Sylius\ShopApiPlugin\ViewRepository\CartViewRepositoryInterface;
use Sylius\ShopApiPlugin\ViewRepository\Cart\CartViewRepositoryInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Cart/PickupAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use League\Tactician\CommandBus;
use Sylius\ShopApiPlugin\Factory\ValidationErrorViewFactoryInterface;
use Sylius\ShopApiPlugin\Request\PickupCartRequest;
use Sylius\ShopApiPlugin\ViewRepository\CartViewRepositoryInterface;
use Sylius\ShopApiPlugin\ViewRepository\Cart\CartViewRepositoryInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Cart/PutItemToCartAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use Sylius\ShopApiPlugin\Request\PutOptionBasedConfigurableItemToCartRequest;
use Sylius\ShopApiPlugin\Request\PutSimpleItemToCartRequest;
use Sylius\ShopApiPlugin\Request\PutVariantBasedConfigurableItemToCartRequest;
use Sylius\ShopApiPlugin\ViewRepository\CartViewRepositoryInterface;
use Sylius\ShopApiPlugin\ViewRepository\Cart\CartViewRepositoryInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Cart/PutItemsToCartAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use Sylius\ShopApiPlugin\Request\PutSimpleItemToCartRequest;
use Sylius\ShopApiPlugin\Request\PutVariantBasedConfigurableItemToCartRequest;
use Sylius\ShopApiPlugin\View\ValidationErrorView;
use Sylius\ShopApiPlugin\ViewRepository\CartViewRepositoryInterface;
use Sylius\ShopApiPlugin\ViewRepository\Cart\CartViewRepositoryInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Cart/RemoveCouponAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use League\Tactician\CommandBus;
use Sylius\ShopApiPlugin\Factory\ValidationErrorViewFactoryInterface;
use Sylius\ShopApiPlugin\Request\RemoveCouponRequest;
use Sylius\ShopApiPlugin\ViewRepository\CartViewRepositoryInterface;
use Sylius\ShopApiPlugin\ViewRepository\Cart\CartViewRepositoryInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Cart/RemoveItemFromCartAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use League\Tactician\CommandBus;
use Sylius\ShopApiPlugin\Factory\ValidationErrorViewFactoryInterface;
use Sylius\ShopApiPlugin\Request\RemoveItemFromCartRequest;
use Sylius\ShopApiPlugin\ViewRepository\CartViewRepositoryInterface;
use Sylius\ShopApiPlugin\ViewRepository\Cart\CartViewRepositoryInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Cart/SummarizeAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use FOS\RestBundle\View\View;
use FOS\RestBundle\View\ViewHandlerInterface;
use Sylius\ShopApiPlugin\ViewRepository\CartViewRepositoryInterface;
use Sylius\ShopApiPlugin\ViewRepository\Cart\CartViewRepositoryInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Order/ShowOrderDetailsAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use FOS\RestBundle\View\ViewHandlerInterface;
use Sylius\Component\Core\Model\ShopUserInterface;
use Sylius\ShopApiPlugin\Provider\LoggedInUserProviderInterface;
use Sylius\ShopApiPlugin\ViewRepository\PlacedOrderViewRepositoryInterface;
use Sylius\ShopApiPlugin\ViewRepository\Order\PlacedOrderViewRepositoryInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Order/ShowOrdersListAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use FOS\RestBundle\View\ViewHandlerInterface;
use Sylius\Component\Core\Model\ShopUserInterface;
use Sylius\ShopApiPlugin\Provider\LoggedInUserProviderInterface;
use Sylius\ShopApiPlugin\ViewRepository\PlacedOrderViewRepositoryInterface;
use Sylius\ShopApiPlugin\ViewRepository\Order\PlacedOrderViewRepositoryInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Core\Exception\TokenNotFoundException;
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Product/ShowLatestProductAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use FOS\RestBundle\View\View;
use FOS\RestBundle\View\ViewHandlerInterface;
use Sylius\ShopApiPlugin\ViewRepository\ProductLatestViewRepositoryInterface;
use Sylius\ShopApiPlugin\ViewRepository\Product\ProductLatestViewRepositoryInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use FOS\RestBundle\View\View;
use FOS\RestBundle\View\ViewHandlerInterface;
use Sylius\ShopApiPlugin\Model\PaginatorDetails;
use Sylius\ShopApiPlugin\ViewRepository\ProductCatalogViewRepositoryInterface;
use Sylius\ShopApiPlugin\ViewRepository\Product\ProductCatalogViewRepositoryInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use FOS\RestBundle\View\View;
use FOS\RestBundle\View\ViewHandlerInterface;
use Sylius\ShopApiPlugin\Model\PaginatorDetails;
use Sylius\ShopApiPlugin\ViewRepository\ProductCatalogViewRepositoryInterface;
use Sylius\ShopApiPlugin\ViewRepository\Product\ProductCatalogViewRepositoryInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Product/ShowProductDetailsByCodeAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use FOS\RestBundle\View\View;
use FOS\RestBundle\View\ViewHandlerInterface;
use Sylius\ShopApiPlugin\ViewRepository\ProductDetailsViewRepositoryInterface;
use Sylius\ShopApiPlugin\ViewRepository\Product\ProductDetailsViewRepositoryInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Product/ShowProductDetailsBySlugAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use FOS\RestBundle\View\View;
use FOS\RestBundle\View\ViewHandlerInterface;
use Sylius\ShopApiPlugin\ViewRepository\ProductDetailsViewRepositoryInterface;
use Sylius\ShopApiPlugin\ViewRepository\Product\ProductDetailsViewRepositoryInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Product/ShowProductReviewsByCodeAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use FOS\RestBundle\View\View;
use FOS\RestBundle\View\ViewHandlerInterface;
use Sylius\ShopApiPlugin\Model\PaginatorDetails;
use Sylius\ShopApiPlugin\ViewRepository\ProductReviewsViewRepositoryInterface;
use Sylius\ShopApiPlugin\ViewRepository\Product\ProductReviewsViewRepositoryInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;

Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Product/ShowProductReviewsBySlugAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use FOS\RestBundle\View\View;
use FOS\RestBundle\View\ViewHandlerInterface;
use Sylius\ShopApiPlugin\Model\PaginatorDetails;
use Sylius\ShopApiPlugin\ViewRepository\ProductReviewsViewRepositoryInterface;
use Sylius\ShopApiPlugin\ViewRepository\Product\ProductReviewsViewRepositoryInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;

Expand Down
8 changes: 1 addition & 7 deletions src/Resources/config/services/controllers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@

<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<imports>
<import resource="actions/address_book.xml"/>
<import resource="actions/checkout.xml"/>
<import resource="actions/cart.xml"/>
<import resource="actions/customer.xml"/>
<import resource="actions/order.xml"/>
<import resource="actions/product.xml"/>
<import resource="actions/taxon.xml"/>
<import resource="actions/**/*"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we just use generic import from services.xml?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I'll try to do that. But some files aren't split up properly.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is ok. This PR may be merged, but first I need to make my mind with #351.

</imports>
</container>
8 changes: 1 addition & 7 deletions src/Resources/config/services/factories.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,7 @@
<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<imports>
<import resource="factories/address_book.xml"/>
<import resource="factories/cart.xml"/>
<import resource="factories/checkout.xml"/>
<import resource="factories/customer.xml"/>
<import resource="factories/order.xml"/>
<import resource="factories/product.xml"/>
<import resource="factories/taxon.xml"/>
<import resource="factories/**/*"/>
</imports>

<services>
Expand Down
5 changes: 1 addition & 4 deletions src/Resources/config/services/handlers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

<imports>
<import resource="handler/address_book.xml"/>
<import resource="handler/cart.xml"/>
<import resource="handler/customer.xml"/>
<import resource="handler/product.xml"/>
<import resource="handler/**/*"/>
</imports>

</container>
51 changes: 5 additions & 46 deletions src/Resources/config/services/queries.xml
Original file line number Diff line number Diff line change
@@ -1,50 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>

<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<services>
<defaults public="true" />
<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

<service id="sylius.shop_api_plugin.view_repository.cart_view_repository" class="Sylius\ShopApiPlugin\ViewRepository\CartViewRepository">
<argument type="service" id="sylius.repository.order" />
<argument type="service" id="sylius.shop_api_plugin.factory.cart_view_factory" />
</service>

<service id="sylius.shop_api_plugin.view_repository.placed_order_view_repository" class="Sylius\ShopApiPlugin\ViewRepository\PlacedOrderViewRepository">
<argument type="service" id="sylius.repository.order" />
<argument type="service" id="sylius.repository.customer" />
<argument type="service" id="sylius.shop_api_plugin.factory.placed_order_view_factory" />
</service>

<service id="sylius.shop_api_plugin.view_repository.product_details_view_repository" class="Sylius\ShopApiPlugin\ViewRepository\ProductDetailsViewRepository">
<argument type="service" id="sylius.repository.channel" />
<argument type="service" id="sylius.repository.product" />
<argument type="service" id="sylius.shop_api_plugin.factory.detailed_product_view_factory" />
<argument type="service" id="sylius.shop_api_plugin.provider.supported_locale_provider"/>
</service>

<service id="sylius.shop_api_plugin.view_repository.product_catalog_view_repository" class="Sylius\ShopApiPlugin\ViewRepository\ProductCatalogViewRepository">
<argument type="service" id="sylius.repository.channel" />
<argument type="service" id="sylius.repository.product" />
<argument type="service" id="sylius.repository.taxon" />
<argument type="service" id="sylius.shop_api_plugin.factory.list_product_view_factory" />
<argument type="service" id="sylius.shop_api_plugin.factory.page_view_factory" />
<argument type="service" id="sylius.shop_api_plugin.provider.supported_locale_provider"/>
</service>

<service id="sylius.shop_api_plugin.view_repository.product_reviews_view_repository" class="Sylius\ShopApiPlugin\ViewRepository\ProductReviewsViewRepository">
<argument type="service" id="sylius.repository.channel" />
<argument type="service" id="sylius.repository.product_review" />
<argument type="service" id="sylius.repository.product" />
<argument type="service" id="sylius.shop_api_plugin.factory.product_review_view_factory" />
<argument type="service" id="sylius.shop_api_plugin.factory.page_view_factory" />
<argument type="service" id="sylius.shop_api_plugin.provider.supported_locale_provider"/>
</service>

<service id="sylius.shop_api_plugin.view_repository.product_latest_view_repository" class="Sylius\ShopApiPlugin\ViewRepository\ProductLatestViewRepository">
<argument type="service" id="sylius.repository.channel" />
<argument type="service" id="sylius.repository.product" />
<argument type="service" id="sylius.shop_api_plugin.factory.list_product_view_factory" />
<argument type="service" id="sylius.shop_api_plugin.provider.supported_locale_provider"/>
</service>
</services>
<imports>
<import resource="repositories/**/*"/>
</imports>
</container>
11 changes: 11 additions & 0 deletions src/Resources/config/services/repositories/cart.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<container xmlns="http://symfony.com/schema/dic/services">
<services>
<defaults public="true" />

<service id="sylius.shop_api_plugin.view_repository.cart_view_repository"
class="Sylius\ShopApiPlugin\ViewRepository\Cart\CartViewRepository">
<argument type="service" id="sylius.repository.order" />
<argument type="service" id="sylius.shop_api_plugin.factory.cart_view_factory" />
</service>
</services>
</container>
12 changes: 12 additions & 0 deletions src/Resources/config/services/repositories/order.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<container xmlns="http://symfony.com/schema/dic/services">
<services>
<defaults public="true" />

<service id="sylius.shop_api_plugin.view_repository.placed_order_view_repository"
class="Sylius\ShopApiPlugin\ViewRepository\Order\PlacedOrderViewRepository">
<argument type="service" id="sylius.repository.order" />
<argument type="service" id="sylius.repository.customer" />
<argument type="service" id="sylius.shop_api_plugin.factory.placed_order_view_factory" />
</service>
</services>
</container>
41 changes: 41 additions & 0 deletions src/Resources/config/services/repositories/product.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<container xmlns="http://symfony.com/schema/dic/services">
<services>
<defaults public="true" />

<service id="sylius.shop_api_plugin.view_repository.product_details_view_repository"
class="Sylius\ShopApiPlugin\ViewRepository\Product\ProductDetailsViewRepository">
<argument type="service" id="sylius.repository.channel" />
<argument type="service" id="sylius.repository.product" />
<argument type="service" id="sylius.shop_api_plugin.factory.detailed_product_view_factory" />
<argument type="service" id="sylius.shop_api_plugin.provider.supported_locale_provider"/>
</service>

<service id="sylius.shop_api_plugin.view_repository.product_catalog_view_repository"
class="Sylius\ShopApiPlugin\ViewRepository\Product\ProductCatalogViewRepository">
<argument type="service" id="sylius.repository.channel" />
<argument type="service" id="sylius.repository.product" />
<argument type="service" id="sylius.repository.taxon" />
<argument type="service" id="sylius.shop_api_plugin.factory.list_product_view_factory" />
<argument type="service" id="sylius.shop_api_plugin.factory.page_view_factory" />
<argument type="service" id="sylius.shop_api_plugin.provider.supported_locale_provider"/>
</service>

<service id="sylius.shop_api_plugin.view_repository.product_reviews_view_repository"
class="Sylius\ShopApiPlugin\ViewRepository\Product\ProductReviewsViewRepository">
<argument type="service" id="sylius.repository.channel" />
<argument type="service" id="sylius.repository.product_review" />
<argument type="service" id="sylius.repository.product" />
<argument type="service" id="sylius.shop_api_plugin.factory.product_review_view_factory" />
<argument type="service" id="sylius.shop_api_plugin.factory.page_view_factory" />
<argument type="service" id="sylius.shop_api_plugin.provider.supported_locale_provider"/>
</service>

<service id="sylius.shop_api_plugin.view_repository.product_latest_view_repository"
class="Sylius\ShopApiPlugin\ViewRepository\Product\ProductLatestViewRepository">
<argument type="service" id="sylius.repository.channel" />
<argument type="service" id="sylius.repository.product" />
<argument type="service" id="sylius.shop_api_plugin.factory.list_product_view_factory" />
<argument type="service" id="sylius.shop_api_plugin.provider.supported_locale_provider"/>
</service>
</services>
</container>
5 changes: 1 addition & 4 deletions src/Resources/config/services/validators.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@

<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<imports>
<import resource="validators/address.xml"/>
<import resource="validators/cart.xml"/>
<import resource="validators/customer.xml"/>
<import resource="validators/product.xml"/>
<import resource="validators/**/*"/>
</imports>

<services>
Expand Down
Loading