8000 remove all *.class parameters by Tobion · Pull Request #1208 · FriendsOfSymfony/FOSElasticaBundle · GitHub
[go: up one dir, main page]

Skip to content

remove all *.class parameters #1208

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

Merged
merged 1 commit into from
Feb 28, 2017
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
2 changes: 2 additions & 0 deletions CHANGELOG-5.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ in 5.0 versions.
* Add ability to close an index.
* Dropped PHP 5.5 support.
* Removed Symfony 3.0 support.
* Removed all `fos_elastica.*.class` parameters. Overwrite or decorate the service instead if you
need to change the definition.
* [BC break] Removed `ignore_unmapped` support for Paginator.
* [BC break] Removed `_boost`, `ttl` and `timestamp` config options.
* [BC break] Removed deprecated config options `servers`, `mappings` and `is_indexable_callback`.
Expand Down
15 changes: 5 additions & 10 deletions Resources/config/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,12 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

<parameters>
<parameter key="fos_elastica.client.class">FOS\ElasticaBundle\Elastica\Client</parameter>
<parameter key="fos_elastica.logger.class">FOS\ElasticaBundle\Logger\ElasticaLogger</parameter>
<parameter key="fos_elastica.data_collector.class">FOS\ElasticaBundle\DataCollector\ElasticaDataCollector</parameter>
<parameter key="fos_elastica.mapping_builder.class">FOS\ElasticaBundle\Index\MappingBuilder</parameter>
<parameter key="fos_elastica.property_accessor.class">Symfony\Component\PropertyAccess\PropertyAccessor</parameter>
<parameter key="fos_elastica.property_accessor.magicCall">false</parameter>
<parameter key="fos_elastica.property_accessor.throwExceptionOnInvalidIndex">false</parameter>
</parameters>

<services>
<service id="fos_elastica.client_prototype" class="%fos_elastica.client.class%" abstract="true">
<service id="fos_elastica.client_prototype" class="FOS\ElasticaBundle\Elastica\Client" abstract="true">
<argument type="collection" /> <!-- configuration -->
<argument /> <!-- callback -->

Expand All @@ -28,7 +23,7 @@
<argument type="collection" /> <!-- collection of SourceInterface services -->
</service>

<service id="fos_elastica.data_collector" class="%fos_elastica.data_collector.class%">
<service id="fos_elastica.data_collector" class="FOS\ElasticaBundle\DataCollector\ElasticaDataCollector">
<tag name="data_collector" template="FOSElasticaBundle:Collector:elastica" id="elastica" />
<argument type="service" id="fos_elastica.logger" />
</service>
Expand All @@ -38,15 +33,15 @@
<argument type="service" id="request_stack" />
</service>

<service id="fos_elastica.logger" class="%fos_elastica.logger.class%">
<service id="fos_elastica.logger" class="FOS\ElasticaBundle\Logger\ElasticaLogger">
<argument type="service" id="logger" on-invalid="null" />
<argument>%kernel.debug%</argument>
<tag name="monolog.logger" channel="elastica" />
</service>

<service id="fos_elastica.mapping_builder" class="%fos_elastica.mapping_builder.class%" />
<service id="fos_elastica.mapping_builder" class="FOS\ElasticaBundle\Index\MappingBuilder" />

<service id="fos_elastica.property_accessor" class="%fos_elastica.property_accessor.class%">
<service id="fos_elastica.property_accessor" class="Symfony\Component\PropertyAccess\PropertyAccessor">
<argument>%fos_elastica.property_accessor.magicCall%</argument>
<argument>%fos_elastica.property_accessor.throwExceptionOnInvalidIndex%</argument>
</service>
Expand Down
6 changes: 1 addition & 5 deletions Resources/config/event_listener.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,8 @@
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">

<parameters>
<parameter key="fos_elastica.populate_listener.class">FOS\ElasticaBundle\EventListener\PopulateListener</parameter>
</parameters>

<services>
<service id="fos_elastica.populate_listener" class="%fos_elastica.populate_listener.class%">
<service id="fos_elastica.populate_listener" class="FOS\ElasticaBundle\EventListener\PopulateListener">
<tag name="kernel.event_listener" event="elastica.index.index_post_populate" method="onPostIndexPopulate" priority="-9999"/>
<argument type="service" id="fos_elastica.resetter"/>
</service>
Expand Down
27 changes: 8 additions & 19 deletions Resources/config/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,44 +4,33 @@
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">

<parameters>
<parameter key="fos_elastica.alias_processor.class">FOS\ElasticaBundle\Index\AliasProcessor</parameter>
<parameter key="fos_elastica.finder.class">FOS\ElasticaBundle\Finder\TransformedFinder</parameter>
<parameter key="fos_elastica.index.class">FOS\ElasticaBundle\Elastica\Index</parameter>
<parameter key="fos_elastica.indexable.class">FOS\ElasticaBundle\Provider\Indexable</parameter>
<parameter key="fos_elastica.index_manager.class">FOS\ElasticaBundle\Index\IndexManager</parameter>
<parameter key="fos_elastica.resetter.class">FOS\ElasticaBundle\Index\Resetter</parameter>
<parameter key="fos_elastica.type.class">Elastica\Type</parameter>
<parameter key="fos_elastica.repository_manager.class">FOS\ElasticaBundle\Manager\RepositoryManager</parameter>
</parameters>

<services>
<service id="fos_elastica.repository_manager" class="%fos_elastica.repository_manager.class%" />
<service id="fos_elastica.repository_manager" class="FOS\ElasticaBundle\Manager\RepositoryManager" />

<service id="fos_elastica.alias_processor" class="%fos_elastica.alias_processor.class%" />
<service id="fos_elastica.alias_processor" class="FOS\ElasticaBundle\Index\AliasProcessor" />

<service id="fos_elastica.indexable" class="%fos_elastica.indexable.class%">
<service id="fos_elastica.indexable" class="FOS\ElasticaBundle\Provider\Indexable">
<argument type="collection" /> <!-- array of indexable callbacks keyed by type name -->
<call method="setContainer">
<argument type="service" id="service_container" />
</call>
</service>

<service id="fos_elastica.index_prototype" class="%fos_elastica.index.class%" abstract="true">
<service id="fos_elastica.index_prototype" class="FOS\ElasticaBundle\Elastica\Index" abstract="true">
<argument /> <!-- index name -->
<!-- tagged with fos_elastica.index in the Extension -->
</service>

<service id="fos_elastica.type_prototype" class="%fos_elastica.type.class%" abstract="true">
<service id="fos_elastica.type_prototype" class="Elastica\Type" abstract="true">
<argument /> <!-- type name -->
</service>

<service id="fos_elastica.index_manager" class="%fos_elastica.index_manager.class%">
<service id="fos_elastica.index_manager" class="FOS\ElasticaBundle\Index\IndexManager">
<argument /> <!-- indexes -->
<argument type="service" id="fos_elastica.index" /> <!-- default index -->
</service>

<service id="fos_elastica.resetter" class="%fos_elastica.resetter.class%">
<service id="fos_elastica.resetter" class="FOS\ElasticaBundle\Index\Resetter">
<argument type="service" id="fos_elastica.config_manager" />
<argument type="service" id="fos_elastica.index_manager" />
<argument type="service" id="fos_elastica.alias_processor" />
Expand All @@ -50,7 +39,7 @@
</service>

<!-- Abstract definition for all finders. -->
<service id="fos_elastica.finder" class="%fos_elastica.finder.class%" public="true" abstract="true">
<service id="fos_elastica.finder" class="FOS\ElasticaBundle\Finder\TransformedFinder" public="true" abstract="true">
<argument /> <!-- searchable -->
<argument /> <!-- transformer -->
</service>
Expand Down
18 changes: 5 additions & 13 deletions Resources/config/mongodb.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,11 @@
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">

<parameters>
<parameter key="fos_elastica.slice_fetcher.mongodb.class">FOS\ElasticaBundle\Doctrine\MongoDB\SliceFetcher</parameter>
<parameter key="fos_elastica.provider.prototype.mongodb.class">FOS\ElasticaBundle\Doctrine\MongoDB\Provider</parameter>
<parameter key="fos_elastica.listener.prototype.mongodb.class">FOS\ElasticaBundle\Doctrine\Listener</parameter>
<parameter key="fos_elastica.elastica_to_model_transformer.prototype.mongodb.class">FOS\ElasticaBundle\Doctrine\MongoDB\ElasticaToModelTransformer</parameter>
<parameter key="fos_elastica.manager.mongodb.class">FOS\ElasticaBundle\Doctrine\RepositoryManager</parameter>
</parameters>

<services>
<service id="fos_elastica.slice_fetcher.mongodb" class="%fos_elastica.slice_fetcher.mongodb.class%">
<service id="fos_elastica.slice_fetcher.mongodb" class="FOS\ElasticaBundle\Doctrine\MongoDB\SliceFetcher">
</service>

<service id="fos_elastica.provider.prototype.mongodb" class="%fos_elastica.provider.prototype.mongodb.class%" public="true" abstract="true">
<service id="fos_elastica.provider.prototype.mongodb" class="FOS\ElasticaBundle\Doctrine\MongoDB\Provider" public="true" abstract="true">
<argument /> <!-- object persister -->
<argument type="service" id="fos_elastica.indexable" />
<argument /> <!-- model -->
Expand All @@ -25,14 +17,14 @@
<argument type="service" id="fos_elastica.slice_fetcher.mongodb" /> <!-- slice fetcher -->
</service>

<service id="fos_elastica.listener.prototype.mongodb" class="%fos_elastica.listener.prototype.mongodb.class%" public="false" abstract="true">
<service id="fos_elastica.listener.prototype.mongodb" class="FOS\ElasticaBundle\Doctrine\Listener" public="false" abstract="true">
<argument /> <!-- object persister -->
<argument type="service" id="fos_elastica.indexable" />
<argument type="collection" /> <!-- configuration -->
<argument>null</argument> <!-- logger -->
</service>

<service id="fos_elastica.elastica_to_model_transformer.prototype.mongodb" class="%fos_elastica.elastica_to_model_transformer.prototype.mongodb.class%" public="false" abstract="true">
<service id="fos_elastica.elastica_to_model_transformer.prototype.mongodb" class="FOS\ElasticaBundle\Doctrine\MongoDB\ElasticaToModelTransformer" public="false" abstract="true">
<argument type="service" id="doctrine_mongodb" />
<argument /> <!-- model -->
<argument type="collection" /> <!-- options -->
Expand All @@ -41,7 +33,7 @@
</call>
</service>

<service id="fos_elastica.manager.mongodb" class="%fos_elastica.manager.mongodb.class%">
<service id="fos_elastica.manager.mongodb" class="FOS\ElasticaBundle\Doctrine\RepositoryManager">
<argument type="service" id="doctrine_mongodb"/>
<argument type="service" id="fos_elastica.repository_manager"/>
</service>
Expand Down
18 changes: 5 additions & 13 deletions Resources/config/orm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,11 @@
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">

<parameters>
<parameter key="fos_elastica.slice_fetcher.orm.class">FOS\ElasticaBundle\Doctrine\ORM\SliceFetcher</parameter>
<parameter key="fos_elastica.provider.prototype.orm.class">FOS\ElasticaBundle\Doctrine\ORM\Provider</parameter>
<parameter key="fos_elastica.listener.prototype.orm.class">FOS\ElasticaBundle\Doctrine\Listener</parameter>
<parameter key="fos_elastica.elastica_to_model_transformer.prototype.orm.class">FOS\ElasticaBundle\Doctrine\ORM\ElasticaToModelTransformer</parameter>
<parameter key="fos_elastica.manager.orm.class">FOS\ElasticaBundle\Doctrine\RepositoryManager</parameter>
</parameters>

<services>
<service id="fos_elastica.slice_fetcher.orm" class="%fos_elastica.slice_fetcher.orm.class%">
<service id="fos_elastica.slice_fetcher.orm" class="FOS\ElasticaBundle\Doctrine\ORM\SliceFetcher">
</service>

<service id="fos_elastica.provider.prototype.orm" class="%fos_elastica.provider.prototype.orm.class%" public="true" abstract="true">
<service id="fos_elastica.provider.prototype.orm" class="FOS\ElasticaBundle\Doctrine\ORM\Provider" public="true" abstract="true">
<argument /> <!-- object persister -->
<argument type="service" id="fos_elastica.indexable" />
<argument /> <!-- model -->
Expand All @@ -25,14 +17,14 @@
<argument type="service" id="fos_elastica.slice_fetcher.orm" /> <!-- slice fetcher -->
</service>

<service id="fos_elastica.listener.prototype.orm" class="%fos_elastica.listener.prototype.orm.class%" public="false" abstract="true">
<service id="fos_elastica.listener.prototype.orm" class="FOS\ElasticaBundle\Doctrine\Listener" public="false" abstract="true">
<argument /> <!-- object persister -->
<argument type="service" id="fos_elastica.indexable" />
<argument type="collection" /> <!-- configuration -->
<argument>null</argument> <!-- logger -->
</service>

<service id="fos_elastica.elastica_to_model_transformer.prototype.orm" class="%fos_elastica.elastica_to_model_transformer.prototype.orm.class%" public="false" abstract="true">
<service id="fos_elastica.elastica_to_model_transformer.prototype.orm" class="FOS\ElasticaBundle\Doctrine\ORM\ElasticaToModelTransformer" public="false" abstract="true">
<argument type="service" id="doctrine" />
<argument /> <!-- model -->
<argument type="collection" /> <!-- options -->
Expand All @@ -41,7 +33,7 @@
</call>
</service>

<service id="fos_elastica.manager.orm" class="%fos_elastica.manager.orm.class%">
<service id="fos_elastica.manager.orm" class="FOS\ElasticaBundle\Doctrine\RepositoryManager">
<argument type="service" id="doctrine" />
<argument type="service" id="fos_elastica.repository_manager" />
</service>
Expand Down
9 changes: 2 additions & 7 deletions Resources/config/persister.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,15 @@
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">

<parameters>
<parameter key="fos_elastica.object_persister.class">FOS\ElasticaBundle\Persister\ObjectPersister</parameter>
<parameter key="fos_elastica.object_serializer_persister.class">FOS\ElasticaBundle\Persister\ObjectSerializerPersister</parameter>
</parameters>

<services>
<service id="fos_elastica.object_persister" class="%fos_elastica.object_persister.class%" abstract="true">
<service id="fos_elastica.object_persister" class="FOS\ElasticaBundle\Persister\ObjectPersister" abstract="true">
<argument /> <!-- type -->
<argument /> <!-- model to elastica transformer -->
<argument /> <!-- model -->
<argument /> <!-- properties mapping -->
</service>

<service id="fos_elastica.object_serializer_persister" class="%fos_elastica.object_serializer_persister.class%" abstract="true">
<service id="fos_elastica.object_serializer_persister" class="FOS\ElasticaBundle\Persister\ObjectSerializerPersister" abstract="true">
<argument /> <!-- type -->
<argument /> <!-- model to elastica transformer -->
<argument /> <!-- model -->
Expand Down
18 changes: 5 additions & 13 deletions Resources/config/phpcr.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,11 @@
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">

<parameters>
<parameter key="fos_elastica.slice_fetcher.phpcr.class">FOS\ElasticaBundle\Doctrine\PHPCR\SliceFetcher</parameter>
<parameter key="fos_elastica.provider.prototype.phpcr.class">FOS\ElasticaBundle\Doctrine\PHPCR\Provider</parameter>
<parameter key="fos_elastica.listener.prototype.phpcr.class">FOS\ElasticaBundle\Doctrine\Listener</parameter>
<parameter key="fos_elastica.elastica_to_model_transformer.prototype.phpcr.class">FOS\ElasticaBundle\Doctrine\PHPCR\ElasticaToModelTransformer</parameter>
<parameter key="fos_elastica.manager.phpcr.class">FOS\ElasticaBundle\Doctrine\RepositoryManager</parameter>
</parameters>

<services>
<service id="fos_elastica.slice_fetcher.phpcr" class="%fos_elastica.slice_fetcher.phpcr.class%">
<service id="fos_elastica.slice_fetcher.phpcr" class="FOS\ElasticaBundle\Doctrine\PHPCR\SliceFetcher">
</service>

<service id="fos_elastica.provider.prototype.phpcr" class="%fos_elastica.provider.prototype.phpcr.class%" public="true" abstract="true">
<service id="fos_elastica.provider.prototype.phpcr" class="FOS\ElasticaBundle\Doctrine\PHPCR\Provider" public="true" abstract="true">
<argument /> <!-- object persister -->
<argument type="service" id="fos_elastica.indexable" />
<argument /> <!-- model -->
Expand All @@ -25,14 +17,14 @@
<argument type="service" id="fos_elastica.slice_fetcher.phpcr" /> <!-- slice fetcher -->
</service>

<service id="fos_elastica.listener.prototype.phpcr" class="%fos_elastica.listener.prototype.phpcr.class%" public="false" abstract="true">
<service id="fos_elastica.listener.prototype.phpcr" class="FOS\ElasticaBundle\Doctrine\Listener" public="false" abstract="true">
<argument /> <!-- object persister -->
<argument type="service" id="fos_elastica.indexable" />
<argument type="collection" /> <!-- configuration -->
<argument>null</argument> <!-- logger -->
</service>

<service id="fos_elastica.elastica_to_model_transformer.prototype.phpcr" class="%fos_elastica.elastica_to_model_transformer.prototype.phpcr.class%" public="false" abstract="true">
<service id="fos_elastica.elastica_to_model_transformer.prototype.phpcr" class="FOS\ElasticaBundle\Doctrine\PHPCR\ElasticaToModelTransformer" public="false" abstract="true">
<argument type="service" id="doctrine_phpcr" />
<argument /> <!-- model -->
<argument type="collection" /> <!-- options -->
Expand All @@ -41,7 +33,7 @@
</call>
</service>

<service id="fos_elastica.manager.phpcr" class="%fos_elastica.manager.phpcr.class%">
<service id="fos_elastica.manager.phpcr" class="FOS\ElasticaBundle\Doctrine\RepositoryManager">
<argument type="service" id="doctrine_phpcr" />
<argument type="service" id="fos_elastica.repository_manager" />
</service>
Expand Down
6 changes: 1 addition & 5 deletions Resources/config/provider.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,8 @@
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">

<parameters>
<parameter key="fos_elastica.provider_registry.class">FOS\ElasticaBundle\Provider\ProviderRegistry</parameter>
</parameters>

<services>
<service id="fos_elastica.provider_registry" class="%fos_elastica.provider_registry.class%">
<service id="fos_elastica.provider_registry" class="FOS\ElasticaBundle\Provider\ProviderRegistry">
<call method="setContainer">
<argument type="service" id="service_container" />
</call>
Expand Down
Loading
0