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 28 commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@
</imports>

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

<service id="sylius.custom_factory.zone" class="Sylius\Component\Addressing\Factory\ZoneFactory" decorates="sylius.factory.zone" decoration-priority="256" public="false">
<service id="sylius.custom_factory.zone" class="Sylius\Component\Addressing\Factory\ZoneFactory" decorates="sylius.factory.zone" decoration-priority="256">
<argument type="service" id="sylius.custom_factory.zone.inner" />
<argument type="service" id="sylius.factory.zone_member" />
</service>
Expand All @@ -36,10 +34,10 @@
</service>
<service id="Sylius\Component\Addressing\Provider\ProvinceNamingProviderInterface" alias="sylius.provider.province_naming" />

<service id="sylius.matcher.zone" class="Sylius\Component\Addressing\Matcher\ZoneMatcher">
<service id="sylius.matcher.zone" class="Sylius\Component\Addressing\Matcher\ZoneMatcher" public="true">
<argument type="service" id="sylius.repository.zone" />
</service>
<service id="Sylius\Component\Addressing\Matcher\ZoneMatcherInterface" alias="sylius.matcher.zone" />
<service id="Sylius\Component\Addressing\Matcher\ZoneMatcherInterface" alias="sylius.matcher.zone" public="true" />

<service id="sylius.converter.country_name" class="Sylius\Component\Addressing\Converter\CountryNameConverter" />
<service id="Sylius\Component\Addressing\Converter\CountryNameConverterInterface" alias="sylius.converter.country_name" />
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.zone_deletion" class="Sylius\Component\Addressing\Checker\ZoneDeletionChecker">
<argument type="service" id="sylius.repository.zone_member" />
</service>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
</parameters>

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

<service id="sylius.form.type.address" class="Sylius\Bundle\AddressingBundle\Form\Type\AddressType">
<argument>%sylius.model.address.class%</argument>
<argument>%sylius.form.type.address.validation_groups%</argument>
Expand Down
8 changes: 3 additions & 5 deletions src/Sylius/Bundle/AdminBundle/Resources/config/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,14 @@
</parameters>

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

<service id="sylius_admin.console.command.create_admin_user" class="Sylius\Bundle\AdminBundle\Console\Command\CreateAdminUserCommand">
<service id="sylius_admin.console.command.create_admin_user" class="Sylius\Bundle\AdminBundle\Console\Command\CreateAdminUserCommand" public="true">
<argument type="service" id="sylius.command_bus" />
<argument>%sylius_locale.locale%</argument>
<argument type="service" id="sylius_admin.console.command_factory.question" />
<tag name="console.command" />
</service>

<service id="sylius_admin.console.command.change_admin_user_password" class="Sylius\Bundle\AdminBundle\Console\Command\ChangeAdminUserPasswordCommand">
<service id="sylius_admin.console.command.change_admin_user_password" class="Sylius\Bundle\AdminBundle\Console\Command\ChangeAdminUserPasswordCommand" public="true">
<argument type="service" id="sylius.repository.admin_user" />
<argument type="service" id="sylius.security.password_updater" />
<argument type="service" id="sylius_admin.console.command_factory.question" />
Expand Down Expand Up @@ -66,7 +64,7 @@
<tag name="sylius.uri_based_section_resolver" priority="20" />
</service>

<service id="sylius.http_client" alias="Psr\Http\Client\ClientInterface" public="false" />
<service id="sylius.http_client" alias="Psr\Http\Client\ClientInterface" />

<service id="sylius.attribute_type.select" class="Sylius\Component\Attribute\AttributeType\SelectAttributeType">
<tag name="sylius.attribute.type" attribute-type="select" label="Select"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@
id="sylius_admin.resource_controller.redirect_handler"
class="Sylius\Bundle\AdminBundle\Controller\RedirectHandler"
decorates="sylius.resource_controller.redirect_handler"
public="false"
mpysiak marked this conversation as resolved.
Show resolved Hide resolved
>
<argument type="service" id=".inner" />
<argument type="service" id="sylius.grid.filter_storage" />
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_admin.mailer.email_manager.shipment" class="Sylius\Bundle\CoreBundle\Mailer\ShipmentEmailManager">
<argument type="service" id="sylius.email_sender" />
</service>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,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">
<services>
<defaults public="true" />

<service id="sylius_admin.grid_filter.ux_autocomplete" class="Sylius\Component\Grid\Filter\EntityFilter">
<tag name="sylius.grid_filter" type="ux_autocomplete" form-type="Sylius\Bundle\AdminBundle\Form\Type\Grid\Filter\UxAutocompleteFilterType" />
</service>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,14 @@
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_admin.security.shop_user_impersonator" class="Sylius\Bundle\CoreBundle\Security\UserImpersonator" public="false">
<service id="sylius_admin.security.shop_user_impersonator" class="Sylius\Bundle\CoreBundle\Security\UserImpersonator">
<argument type="service" id="request_stack" />
<argument type="string">%sylius_shop.firewall_context_name%</argument>
<argument type="service" id="event_dispatcher" />
</service>
<service id="Sylius\Bundle\CoreBundle\Security\UserImpersonatorInterface" alias="sylius_admin.security.shop_user_impersonator" />

<service id="sylius_admin.controller.impersonate_user" class="Sylius\Bundle\AdminBundle\Controller\ImpersonateUserController">
<service id="sylius_admin.controller.impersonate_user" class="Sylius\Bundle\AdminBundle\Controller\ImpersonateUserController" public="true">
<argument type="service" id="sylius_admin.security.shop_user_impersonator" />
<argument type="service" id="security.authorization_checker" />
<argument type="service" id="sylius.shop_user_provider.email_or_name_based" />
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_admin.menu_builder.main" class="Sylius\Bundle\AdminBundle\Menu\MainMenuBuilder">
<argument type="service" id="knp_menu.factory" />
<argument type="service" id="event_dispatcher" />
Expand Down
2 changes: 0 additions & 2 deletions src/Sylius/Bundle/ApiBundle/Resources/config/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@
class="Sylius\Bundle\ApiBundle\ApiPlatform\Routing\IriConverter"
decorates="api_platform.symfony.iri_converter"
decoration-priority="64"
public="false"
>
<argument type="service" id=".inner" />
<argument type="service" id="sylius_api.provider.path_prefix" />
Expand All @@ -98,7 +97,6 @@
id="sylius_api.api_platform.routing.api_loader"
class="Sylius\Bundle\ApiBundle\ApiPlatform\Routing\ApiLoader"
decorates="api_platform.route_loader"
public="false"
>
<argument type="service" id=".inner" />
<argument>%sylius_api.operations_to_remove%</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_api.provider.payment_configuration" class="Sylius\Bundle\ApiBundle\Provider\CompositePaymentConfigurationProvider">
<argument type="tagged_iterator" tag="sylius.api.payment_method_handler" />
</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_api.command_handler.account.register_shop_user" class="Sylius\Bundle\ApiBundle\CommandHandler\Account\RegisterShopUserHandler">
<argument type="service" id="sylius.factory.shop_user" />
<argument type="service" id="sylius.manager.shop_user" />
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_api.context_builder.channel_code_aware"
class="Sylius\Bundle\ApiBundle\Serializer\ContextBuilder\ChannelCodeAwareContextBuilder"
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_api.context.user.token_based" class="Sylius\Bundle\ApiBundle\Context\TokenBasedUserContext">
<argument type="service" id="security.token_storage" />
</service>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
</parameter>
</parameters>
<services>
<defaults public="true" />

<service id="sylius_api.provider.path_prefix" class="Sylius\Bundle\ApiBundle\Provider\PathPrefixProvider">
<argument>%sylius.security.api_route%</argument>
<argument>%sylius.api_path_prefixes%</argument>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,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_api.section_resolver.admin_api_uri_based" class="Sylius\Bundle\ApiBundle\SectionResolver\AdminApiUriBasedSectionResolver">
<argument>%sylius.security.api_admin_route%</argument>
<tag name="sylius.uri_based_section_resolver" priority="30" />
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_api.denormalizer.address" class="Sylius\Bundle\ApiBundle\Serializer\Denormalizer\AddressDenormalizer">
<argument type="service" id="serializer.normalizer.object" />
<argument type="string">%sylius.model.address.class%</argument>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@
</parameters>

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

<service id="sylius.doctrine.orm.event_subscriber.load_metadata.attribute" class="Sylius\Bundle\AttributeBundle\Doctrine\ORM\Subscriber\LoadMetadataSubscriber">
<service id="sylius.doctrine.orm.event_subscriber.load_metadata.attribute" class="Sylius\Bundle\AttributeBundle\Doctrine\ORM\Subscriber\LoadMetadataSubscriber" public="true">
<argument>%sylius.attribute.subjects%</argument>
<tag name="doctrine.event_subscriber" />
</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.attribute_type.text" class="Sylius\Component\Attribute\AttributeType\TextAttributeType">
<tag name="sylius.attribute.type" attribute-type="text" label="Text"
form-type="Sylius\Bundle\AttributeBundle\Form\Type\AttributeType\TextAttributeType"
Expand Down
14 changes: 6 additions & 8 deletions src/Sylius/Bundle/ChannelBundle/Resources/config/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
</parameters>

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

<service id="sylius.custom_factory.channel" class="Sylius\Component\Channel\Factory\ChannelFactory" decorates="sylius.factory.channel" decoration-priority="256" public="false">
<argument type="service" id="sylius.custom_factory.channel.inner" />
</service>
Expand All @@ -45,29 +43,29 @@
<tag name="form.type" />
</service>

<service id="sylius.context.channel.composite" class="Sylius\Component\Channel\Context\CompositeChannelContext" public="false" />
<service id="sylius.context.channel.composite" class="Sylius\Component\Channel\Context\CompositeChannelContext" />
<service id="Sylius\Component\Channel\Context\ChannelContextInterface" alias="sylius.context.channel" />

<service id="sylius.context.channel.request_based" class="Sylius\Component\Channel\Context\RequestBased\ChannelContext" public="false">
<service id="sylius.context.channel.request_based" class="Sylius\Component\Channel\Context\RequestBased\ChannelContext">
<argument type="service" id="sylius.context.channel.request_based.resolver" />
<argument type="service" id="request_stack" />
<tag name="sylius.context.channel" />
</service>

<service id="sylius.context.channel.single_channel" class="Sylius\Component\Channel\Context\SingleChannelContext" public="false">
<service id="sylius.context.channel.single_channel" class="Sylius\Component\Channel\Context\SingleChannelContext">
<argument type="service" id="sylius.repository.channel" />
<tag name="sylius.context.channel" priority="-128"/>
</service>

<service id="sylius.context.channel.request_based.resolver.composite" class="Sylius\Component\Channel\Context\RequestBased\CompositeRequestResolver" public="false"/>
<service id="sylius.context.channel.request_based.resolver.composite" class="Sylius\Component\Channel\Context\RequestBased\CompositeRequestResolver" />
<service id="Sylius\Component\Channel\Context\RequestBased\RequestResolverInterface" alias="sylius.context.channel.request_based.resolver.composite" />

<service id="sylius.context.channel.request_based.resolver.hostname_based" class="Sylius\Component\Channel\Context\RequestBased\HostnameBasedRequestResolver" public="false">
<service id="sylius.context.channel.request_based.resolver.hostname_based" class="Sylius\Component\Channel\Context\RequestBased\HostnameBasedRequestResolver">
<argument type="service" id="sylius.repository.channel" />
<tag name="sylius.context.channel.request_based.resolver" />
</service>

<service id="sylius.collector.channel" class="Sylius\Bundle\ChannelBundle\Collector\ChannelCollector" public="false">
<service id="sylius.collector.channel" class="Sylius\Bundle\ChannelBundle\Collector\ChannelCollector">
<argument type="service" id="sylius.repository.channel" />
<argument type="service" id="sylius.context.channel" />
<argument>false</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.context.channel.fake_channel.persister" class="Sylius\Bundle\ChannelBundle\Context\FakeChannel\FakeChannelPersister">
<argument type="service" id="sylius.context.channel.fake_channel.code_provider" />
<tag name="kernel.event_listener" event="kernel.response" method="onKernelResponse" priority="-8192" />
Expand Down
Loading
Loading