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

[DX] Make services private #17276

Merged
merged 29 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
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
Prev Previous commit
Next Next commit
CoreBundle changes
# Conflicts:
#	src/Sylius/Bundle/CoreBundle/Resources/config/services.xml
#	src/Sylius/Bundle/CoreBundle/Resources/config/services/calculators.xml
#	src/Sylius/Bundle/CoreBundle/Resources/config/services/catalog_promotion.xml
#	src/Sylius/Bundle/CoreBundle/Resources/config/services/catalog_promotion/command_handlers.xml
#	src/Sylius/Bundle/CoreBundle/Resources/config/services/catalog_promotion/listeners.xml
#	src/Sylius/Bundle/CoreBundle/Resources/config/services/checkout.xml
#	src/Sylius/Bundle/CoreBundle/Resources/config/services/fixtures_factories.xml
#	src/Sylius/Bundle/CoreBundle/Resources/config/services/fixtures_listeners.xml
#	src/Sylius/Bundle/CoreBundle/Resources/config/services/installer.xml
#	src/Sylius/Bundle/CoreBundle/Resources/config/services/installer_requirements.xml
#	src/Sylius/Bundle/CoreBundle/Resources/config/services/listeners/workflow/order_payment.xml
#	src/Sylius/Bundle/CoreBundle/Resources/config/services/listeners/workflow/order_shipping.xml
#	src/Sylius/Bundle/CoreBundle/Resources/config/services/listeners/workflow/payment.xml
#	src/Sylius/Bundle/CoreBundle/Resources/config/services/listeners/workflow/shipment.xml
#	src/Sylius/Bundle/CoreBundle/Resources/config/services/mailer.xml
#	src/Sylius/Bundle/CoreBundle/Resources/config/services/price_history/command_handler.xml
#	src/Sylius/Bundle/CoreBundle/Resources/config/services/price_history/listeners.xml
#	src/Sylius/Bundle/CoreBundle/Resources/config/services/providers.xml
#	src/Sylius/Bundle/CoreBundle/Resources/config/services/shipping.xml
  • Loading branch information
mpysiak committed Oct 22, 2024
commit 9a198cc380f4a497391edcce1ffbcd639105472c
16 changes: 7 additions & 9 deletions src/Sylius/Bundle/CoreBundle/Resources/config/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
</parameters>

<services>
<defaults public="true" />

<service id="sylius.distributor.integer" class="Sylius\Component\Core\Distributor\IntegerDistributor" />
<service id="Sylius\Component\Core\Distributor\IntegerDistributorInterface" alias="sylius.distributor.integer" />

Expand Down Expand Up @@ -60,7 +58,7 @@
/>
<service id="Sylius\Component\Core\Generator\ImagePathGeneratorInterface" alias="sylius.generator.image_path" />

<service id="sylius.collector.core" class="Sylius\Bundle\CoreBundle\Collector\SyliusCollector" public="false">
<service id="sylius.collector.core" class="Sylius\Bundle\CoreBundle\Collector\SyliusCollector">
<argument type="service" id="sylius.context.shopper" />
<argument>%kernel.bundles%</argument>
<argument>%locale%</argument>
Expand Down Expand Up @@ -116,17 +114,17 @@
<argument type="service" id="sylius.manager.product_variant" />
</service>

<service id="sylius.custom_factory.order_item" class="Sylius\Component\Core\Factory\CartItemFactory" decorates="sylius.factory.order_item" decoration-priority="256" public="false">
<service id="sylius.custom_factory.order_item" class="Sylius\Component\Core\Factory\CartItemFactory" decorates="sylius.factory.order_item" decoration-priority="256">
<argument type="service" id="sylius.custom_factory.order_item.inner" />
<argument type="service" id="sylius.resolver.product_variant" />
<argument type="service" id="sylius.modifier.order_item_quantity" />
</service>
<service id="sylius.factory.cart_item" alias="sylius.custom_factory.order_item" />
<service id="sylius.custom_factory.address" class="Sylius\Component\Core\Factory\AddressFactory" decorates="sylius.factory.address" decoration-priority="256" public="false">
<service id="sylius.custom_factory.address" class="Sylius\Component\Core\Factory\AddressFactory" decorates="sylius.factory.address" decoration-priority="256">
<argument type="service" id="sylius.custom_factory.address.inner" />
</service>

<service id="sylius.custom_factory.channel" class="Sylius\Component\Core\Factory\ChannelFactory" decorates="sylius.factory.channel" decoration-priority="256" public="false">
<service id="sylius.custom_factory.channel" class="Sylius\Component\Core\Factory\ChannelFactory" decorates="sylius.factory.channel" decoration-priority="256">
<argument type="service" id="sylius.custom_factory.channel.inner" />
<argument>order_items_based</argument>
<argument type="service" id="sylius.factory.channel_price_history_config" />
Expand All @@ -142,7 +140,7 @@
<tag name="twig.extension" />
</service>

<service id="sylius.twig.extension.checkout_steps" class="Sylius\Bundle\CoreBundle\Twig\CheckoutStepsExtension" public="false">
<service id="sylius.twig.extension.checkout_steps" class="Sylius\Bundle\CoreBundle\Twig\CheckoutStepsExtension">
<argument type="service" id="sylius.checker.order_payment_method_selection_requirement" />
<argument type="service" id="sylius.checker.order_shipping_method_selection_requirement" />
<tag name="twig.extension" />
Expand Down Expand Up @@ -233,12 +231,12 @@
<argument type="service" id="sylius.manager.order_sequence" />
</service>

<service id="sylius.custom_resource_controller.resource_update_handler" class="Sylius\Bundle\CoreBundle\Doctrine\ORM\Handler\ResourceUpdateHandler" decorates="sylius.resource_controller.resource_update_handler" public="false">
<service id="sylius.custom_resource_controller.resource_update_handler" class="Sylius\Bundle\CoreBundle\Doctrine\ORM\Handler\ResourceUpdateHandler" decorates="sylius.resource_controller.resource_update_handler">
<argument type="service" id="sylius.custom_resource_controller.resource_update_handler.inner" />
<argument type="service" id="doctrine.orm.entity_manager" />
</service>

<service id="sylius.custom_resource_controller.resource_delete_handler" class="Sylius\Bundle\CoreBundle\Doctrine\ORM\Handler\ResourceDeleteHandler" decorates="sylius.resource_controller.resource_delete_handler" public="false">
<service id="sylius.custom_resource_controller.resource_delete_handler" class="Sylius\Bundle\CoreBundle\Doctrine\ORM\Handler\ResourceDeleteHandler" decorates="sylius.resource_controller.resource_delete_handler">
<argument type="service" id="sylius.custom_resource_controller.resource_delete_handler.inner" />
<argument type="service" id="doctrine.orm.entity_manager" />
</service>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"
>
<services>
<defaults public="true" />

<service id="sylius.calculator.delay_stamp" class="Sylius\Bundle\CoreBundle\Calculator\DelayStampCalculator"/>
<service id="Sylius\Bundle\CoreBundle\Calculator\DelayStampCalculatorInterface" alias="sylius.calculator.delay_stamp"/>
</services>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
</imports>

<services>
<defaults public="true" />

<service id="sylius.discount_application_criteria.catalog_promotion.exclusive" class="Sylius\Bundle\CoreBundle\CatalogPromotion\DiscountApplicationCriteria\ExclusiveCriteria">
<tag name="sylius.catalog_promotion.applicator_criteria" />
</service>
Expand All @@ -39,6 +37,7 @@
<service
id="sylius.announcer.catalog_promotion"
class="Sylius\Bundle\CoreBundle\CatalogPromotion\Announcer\CatalogPromotionAnnouncer"
public="true"
>
<argument type="service" id="sylius.event_bus" />
<argument type="service" id="sylius.calculator.delay_stamp" />
Expand All @@ -49,6 +48,7 @@
<service
id="sylius.announcer.catalog_promotion.removal"
class="Sylius\Bundle\CoreBundle\CatalogPromotion\Announcer\CatalogPromotionRemovalAnnouncer"
public="true"
>
<argument type="service" id="sylius.command_bus" />
</service>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"
>
<services>
<defaults public="true" />

<service
id="sylius.applicator.catalog_promotion"
class="Sylius\Bundle\CoreBundle\CatalogPromotion\Applicator\CatalogPromotionApplicator"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"
>
<services>
<defaults public="true" />

<service
id="sylius.calculator.catalog_promotion.price"
class="Sylius\Bundle\CoreBundle\CatalogPromotion\Calculator\CatalogPromotionPriceCalculator"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"
>
<services>
<defaults public="true" />

<service
id="sylius.checker.catalog_promotion.product_variant_for_catalog_promotion_eligibility"
class="Sylius\Bundle\CoreBundle\CatalogPromotion\Checker\ProductVariantForCatalogPromotionEligibility"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"
>
<services>
<defaults public="true" />

<service id="sylius.command_handler.catalog_promotion.apply_variants" class="Sylius\Bundle\CoreBundle\CatalogPromotion\CommandHandler\ApplyCatalogPromotionsOnVariantsHandler">
<argument type="service" id="sylius.provider.eligible_catalog_promotions" />
<argument type="service" id="sylius.applicator.catalog_promotion"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"
>
<services>
<defaults public="true" />

<service
id="sylius.processor.catalog_promotion.all_product_variant"
class="Sylius\Bundle\CoreBundle\CatalogPromotion\Processor\AllProductVariantsCatalogPromotionsProcessor"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"
>
<services>
<defaults public="true" />

<service id="sylius.checker.order_shipping_method_selection_requirement" class="Sylius\Component\Core\Checker\OrderShippingMethodSelectionRequirementChecker">
<argument type="service" id="sylius.resolver.shipping_methods" />
</service>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
</parameters>

<services>
<defaults public="true" />

<service id="sylius.form.type.checkout.address" class="Sylius\Bundle\CoreBundle\Form\Type\Checkout\AddressType">
<argument type="service" id="sylius.comparator.address" />
<argument>%sylius.model.order.class%</argument>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"
>
<services>
<defaults public="true" />

<service id="sylius.context.channel.cached" class="Sylius\Component\Channel\Context\CachedPerRequestChannelContext" decorates="sylius.context.channel" decoration-priority="256" public="false">
<service id="sylius.context.channel.cached" class="Sylius\Component\Channel\Context\CachedPerRequestChannelContext" decorates="sylius.context.channel" decoration-priority="256">
<argument type="service" id="sylius.context.channel.cached.inner" />
<argument type="service" id="request_stack" />
</service>
Expand All @@ -32,7 +30,7 @@
</service>
<service id="Sylius\Component\Core\Context\ShopperContextInterface" alias="sylius.context.shopper" />

<service id="sylius.context.cart.new_shop_based" class="Sylius\Component\Core\Cart\Context\ShopBasedCartContext" decorates="sylius.context.cart.new" decoration-priority="256" public="false">
<service id="sylius.context.cart.new_shop_based" class="Sylius\Component\Core\Cart\Context\ShopBasedCartContext" decorates="sylius.context.cart.new" decoration-priority="256">
<argument type="service" id="sylius.context.cart.new_shop_based.inner" />
<argument type="service" id="sylius.context.shopper" />
<argument type="service" id="sylius.resolver.cart.created_by_guest_flag" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"
>
<services>
<defaults public="true" />

<service id="sylius.custom_factory.order" class="Sylius\Bundle\CoreBundle\Factory\OrderFactory" decorates="sylius.factory.order">
<argument type="service" id="sylius.custom_factory.order.inner" />
</service>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"
>
<services>
<defaults public="true" />

<service id="sylius.fixture.locale" class="Sylius\Bundle\CoreBundle\Fixture\LocaleFixture">
<argument type="service" id="sylius.factory.locale" />
<argument type="service" id="sylius.manager.locale" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@
</parameters>

<services>
<defaults public="true" />

<service id="sylius.form.extension.type.address" class="Sylius\Bundle\CoreBundle\Form\Extension\AddressTypeExtension">
<tag name="form.type_extension" priority="100" />
</service>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
<parameter key="sylius_installer_currency">USD</parameter>
</parameters>
<services>
<defaults public="true" />

<service id="sylius.checker.installer.command_directory" class="Sylius\Bundle\CoreBundle\Installer\Checker\CommandDirectoryChecker">
<argument type="service" id="filesystem" />
</service>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"
>
<services>
<defaults public="true" />

<service id="sylius.requirements.installer.sylius" class="Sylius\Bundle\CoreBundle\Installer\Requirement\SyliusRequirements">
<argument type="collection">
<argument type="service">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"
>
<services>
<defaults public="true" />

<service id="sylius.oauth.user_provider" class="Sylius\Bundle\CoreBundle\OAuth\UserProvider" lazy="true">
<argument type="string" id="%sylius.model.shop_user.class%" />
<argument type="service" id="sylius.factory.customer" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"
>
<services>
<defaults public="false" />

<service id="sylius.listener.workflow.order_payment.sell_order_inventory" class="Sylius\Bundle\CoreBundle\EventListener\Workflow\OrderPayment\SellOrderInventoryListener">
<argument type="service" id="sylius.operator.inventory.order_inventory" />
<tag name="kernel.event_listener" event="workflow.sylius_order_payment.completed.pay" priority="200"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"
>
<services>
<defaults public="false" />

<service id="sylius.listener.workflow.order_shipping.resolve_order_state" class="Sylius\Bundle\CoreBundle\EventListener\Workflow\OrderShipping\ResolveOrderStateListener">
<argument type="service" id="sylius.state_resolver.order" />
<tag name="kernel.event_listener" event="workflow.sylius_order_shipping.completed.ship" priority="100"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"
>
<services>
<defaults public="false" />

<service id="sylius.listener.workflow.payment.process_order" class="Sylius\Bundle\CoreBundle\EventListener\Workflow\Payment\ProcessOrderListener">
<argument type="service" id="sylius.order_processing.order_payment_processor.after_checkout" />
<tag name="kernel.event_listener" event="workflow.sylius_payment.completed.fail" priority="100" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"
>
<services>
<defaults public="false" />

<service id="sylius.listener.workflow.shipment.resolve_order_shipment_state" class="Sylius\Bundle\CoreBundle\EventListener\Workflow\Shipment\ResolveOrderShipmentStateListener">
<argument type="service" id="sylius.state_resolver.order_shipping" />
<tag name="kernel.event_listener"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,16 @@
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" />

<service id="sylius.listener.user_mailer" class="Sylius\Bundle\CoreBundle\EventListener\MailerListener" public="false">
<services>
<service id="sylius.listener.user_mailer" class="Sylius\Bundle\CoreBundle\EventListener\MailerListener" public="false">
mpysiak marked this conversation as resolved.
Show resolved Hide resolved
<argument type="service" id="sylius.email_sender" />
<argument type="service" id="sylius.context.channel" />
<argument type="service" id="sylius.context.locale" />
<tag name="kernel.event_listener" event="sylius.user.password_reset.request.token" method="sendResetPasswordTokenEmail" />
<tag name="kernel.event_listener" event="sylius.user.email_verification.token" method="sendVerificationTokenEmail" />
<tag name="kernel.event_listener" event="sylius.user.post_email_verification" method="sendVerificationSuccessEmail" />
<tag name="kernel.event_listener" event="sylius.customer.post_register" method="sendUserRegistrationEmail" />
</service>
</service>

<service id="sylius.mailer.contact_email_manager" class="Sylius\Bundle\CoreBundle\Mailer\ContactEmailManager">
<argument type="service" id="sylius.email_sender" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
</parameter>
</parameters>
<services>
<defaults public="true" />

<service id="sylius.order_processing.order_adjustments_clearer" class="Sylius\Component\Core\OrderProcessing\OrderAdjustmentsClearer">
<argument type="collection">
<argument type="constant">Sylius\Component\Core\Model\AdjustmentInterface::ORDER_ITEM_PROMOTION_ADJUSTMENT</argument>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"
>
<services>
<defaults public="true" />

<service id="sylius.custom_factory.payment_method" class="Sylius\Component\Core\Factory\PaymentMethodFactory" decorates="sylius.factory.payment_method" public="false">
<argument type="service" id="sylius.custom_factory.payment_method.inner" />
<argument type="service" id="sylius.factory.gateway_config" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"
>
<services>
<defaults public="true" />

<service
id="sylius.checker.product_variant_lowest_price_display"
class="Sylius\Component\Core\Checker\ProductVariantLowestPriceDisplayChecker"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"
>
<services>
<defaults public="true" />

<service
id="sylius.command_dispatcher.price_history.batched_apply_lowest_price_on_channel_pricings"
class="Sylius\Bundle\CoreBundle\PriceHistory\CommandDispatcher\BatchedApplyLowestPriceOnChannelPricingsCommandDispatcher"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"
>
<services>
<defaults public="true" />

<service id="sylius.command_handler.price_history.apply_lowest_price_on_channel_pricings" class="Sylius\Bundle\CoreBundle\PriceHistory\CommandHandler\ApplyLowestPriceOnChannelPricingsHandler">
<argument type="service" id="sylius.processor.price_history.product_lowest_price_before_discount" />
<argument type="service" id="sylius.repository.channel_pricing" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"
>
<services>
<defaults public="true" />

<service id="sylius.entity_observer.price_history.create_log_entry_on_price_change" class="Sylius\Bundle\CoreBundle\PriceHistory\EntityObserver\CreateLogEntryOnPriceChangeObserver">
<argument type="service" id="sylius.logger.price_history.price_change" />
<tag name="sylius.entity_observer" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"
>
<services>
<defaults public="true" />

<service
id="sylius.logger.price_history.price_change"
class="Sylius\Bundle\CoreBundle\PriceHistory\Logger\PriceChangeLogger"
Expand Down
Loading