Skip to content

Commit

Permalink
Merge branch 'v1.0'
Browse files Browse the repository at this point in the history
Conflicts:
	README.md
  • Loading branch information
mdiyakov committed Apr 15, 2018
2 parents 5e9964b + 06ad2f3 commit e45ec13
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 31 deletions.
20 changes: 19 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,31 @@ php:
- 5.4
- 5.5
- 5.6
- 7.0
- 7.1
- 7.2

env:
- COMPOSER_FLAGS="--prefer-lowest"
- COMPOSER_FLAGS=""
- SYMFONY_VERSION=2.7.*
- SYMFONY_VERSION=3.0.*
- SYMFONY_VERSION=3.1.*
- SYMFONY_VERSION=3.4.*

before_script:
matrix:
exclude:
- php: 7.2
env: COMPOSER_FLAGS="--prefer-lowest"
- php: 5.4
env: SYMFONY_VERSION=3.0.*
- php: 5.4
env: SYMFONY_VERSION=3.1.*
- php: 5.4
env: SYMFONY_VERSION=3.4.*


before_install:
- if [ "$SYMFONY_VERSION" != "" ]; then composer require --update-with-all-dependencies "symfony/framework-bundle:$SYMFONY_VERSION"; fi

install: travis_retry composer update $COMPOSER_FLAGS
Expand Down
2 changes: 1 addition & 1 deletion Query/Suggest/Result/FieldResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class FieldResult
/**
* @var SuggestionResult[]
*/
private $suggestions;
private $suggestions = [];

/**
* FieldResult constructor.
Expand Down
2 changes: 1 addition & 1 deletion Query/Update/UpdateQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public function update()
}

foreach ($this->entityConditions as $fieldsConditions) {
/** @var \Solarium\QueryType\Update\Query\Document\Document $document */
/** @var \Solarium\QueryType\Update\Query\Document $document */
$document = $this->solrQuery->createDocument();
foreach ($fieldsConditions as $documentFieldName => $value) {
$document->addField($documentFieldName, $value);
Expand Down
44 changes: 22 additions & 22 deletions Resources/config/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ services:
mdiyakov_doctrine_solr.event_listener.doctrine_entity:
class: Mdiyakov\DoctrineSolrBundle\EventListener\DoctrineEntityListener
arguments:
indexProcessManager: "@mdiyakov_doctrine_solr.manager.index_process_manager"
- '@mdiyakov_doctrine_solr.manager.index_process_manager'

mdiyakov_doctrine_solr.manager.index_process_manager:
class: Mdiyakov\DoctrineSolrBundle\Manager\IndexProcessManager
arguments:
indexerBuilder: "@mdiyakov_doctrine_solr.indexer.builder"
validator: "@mdiyakov_doctrine_solr.filter.validator"
- '@mdiyakov_doctrine_solr.indexer.builder'
- '@mdiyakov_doctrine_solr.filter.validator'

mdiyakov_doctrine_solr.config.validator:
class: Mdiyakov\DoctrineSolrBundle\Config\ConfigValidator
Expand All @@ -27,61 +27,61 @@ services:
class: Mdiyakov\DoctrineSolrBundle\Indexer\IndexerBuilder
public: false
arguments:
config: "@mdiyakov_doctrine_solr.config.config"
queryBuilder: "@mdiyakov_doctrine_solr.query.update_builder"
- '@mdiyakov_doctrine_solr.config.config'
- '@mdiyakov_doctrine_solr.query.update_builder'

mdiyakov_doctrine_solr.filter.validator:
class: Mdiyakov\DoctrineSolrBundle\Filter\FilterValidator
public: false
arguments:
config: "@mdiyakov_doctrine_solr.config.config"
- '@mdiyakov_doctrine_solr.config.config'

mdiyakov_doctrine_solr.command.index_all_command:
class: Mdiyakov\DoctrineSolrBundle\Command\IndexEntitiesCommand
arguments:
config: "@mdiyakov_doctrine_solr.config.config"
indexProcessManager: "@mdiyakov_doctrine_solr.manager.index_process_manager"
em: "@doctrine.orm.default_entity_manager"
- '@mdiyakov_doctrine_solr.config.config'
- '@mdiyakov_doctrine_solr.manager.index_process_manager'
- '@doctrine.orm.default_entity_manager'
tags:
- { name: console.command }

mdiyakov_doctrine_solr.query.hydrator.builder:
class: Mdiyakov\DoctrineSolrBundle\Query\Hydrator\HydratorBuilder
public: false
arguments:
em: "@doctrine.orm.default_entity_manager"
config: "@mdiyakov_doctrine_solr.config.config"
- '@doctrine.orm.default_entity_manager'
- '@mdiyakov_doctrine_solr.config.config'

mdiyakov_doctrine_solr.query.select_builder:
class: Mdiyakov\DoctrineSolrBundle\Query\SelectQueryBuilder
arguments:
config: "@mdiyakov_doctrine_solr.config.config"
clientRegistry: "@solarium.client_registry"
hydratorBuilder: "@mdiyakov_doctrine_solr.query.hydrator.builder"
- '@mdiyakov_doctrine_solr.config.config'
- '@solarium.client_registry'
- '@mdiyakov_doctrine_solr.query.hydrator.builder'

mdiyakov_doctrine_solr.query.update_builder:
class: Mdiyakov\DoctrineSolrBundle\Query\UpdateQueryBuilder
arguments:
config: "@mdiyakov_doctrine_solr.config.config"
clientRegistry: "@solarium.client_registry"
- '@mdiyakov_doctrine_solr.config.config'
- '@solarium.client_registry'

mdiyakov_doctrine_solr.query.suggester_builder:
class: Mdiyakov\DoctrineSolrBundle\Query\SuggestQueryBuilder
arguments:
config: "@mdiyakov_doctrine_solr.config.config"
clientRegistry: "@solarium.client_registry"
- '@mdiyakov_doctrine_solr.config.config'
- '@solarium.client_registry'

mdiyakov_doctrine_solr.manager.finder:
class: Mdiyakov\DoctrineSolrBundle\Manager\FinderManager
arguments:
config: "@mdiyakov_doctrine_solr.config.config"
queryBuilder: "@mdiyakov_doctrine_solr.query.select_builder"
- '@mdiyakov_doctrine_solr.config.config'
- '@mdiyakov_doctrine_solr.query.select_builder'

mdiyakov_doctrine_solr.manager.suggester:
class: Mdiyakov\DoctrineSolrBundle\Manager\SuggesterManager
arguments:
config: "@mdiyakov_doctrine_solr.config.config"
queryBuilder: "@mdiyakov_doctrine_solr.query.suggester_builder"
- '@mdiyakov_doctrine_solr.config.config'
- '@mdiyakov_doctrine_solr.query.suggester_builder'

ds.suggester:
alias: mdiyakov_doctrine_solr.manager.suggester
Expand Down
2 changes: 1 addition & 1 deletion Tests/Config/config_fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ success_config:
filters: [ big_id ]
config:
- { name: type, value: page }
- { name: host, value: %solr_host% }
- { name: host, value: "%solr_host%" }
schemes:
my_schema:
client: my_client
Expand Down
2 changes: 1 addition & 1 deletion Tests/Schema/schema_fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ valid_schema:
- { config_field_name: 'host', document_field_name: 'app_source', discriminator: false, priority: 1 }
fields:
- { entity_field_name: 'id', document_field_name: 'd_id', field_type: int, entity_primary_key: true, priority: 1, suggester: '' }
- { entity_field_name: 'title', document_field_name: 'd_title' , priority: 100 , entity_primary_key: false, suggester: 'title', priority: 1, suggester: '', field_type: string }
- { entity_field_name: 'title', document_field_name: 'd_title' , priority: 100 , entity_primary_key: false, suggester: 'title', field_type: string }
- { entity_field_name: 'enabled', document_field_name: 'd_body', field_type: boolean, priority: 1, suggester: '', entity_primary_key: false }
- { entity_field_name: 'price', document_field_name: 'd_price', field_type: double, priority: 1, suggester: '', entity_primary_key: false }
- { entity_field_name: 'tags', document_field_name: 'd_tags' , field_type: array, priority: 1, suggester: '', entity_primary_key: false }
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@
"email": "[email protected]"
},
"require": {
"php": "^5.4",
"symfony/framework-bundle": "^2.3",
"php": "^5.4 || >=7.0 <7.3",
"symfony/framework-bundle": "^2.3 || ^3.0 ",
"doctrine/doctrine-bundle": "^1.5.0",
"doctrine/orm": "~2.4.0 || ~2.5.0",
"symfony/property-access": ">=2.3.0,<=3.0.9",
"symfony/property-access": ">=2.3.0",
"solarium/solarium": "^3.0",
"nelmio/solarium-bundle": "~2.1"
},
"require-dev": {
"phpunit/phpunit": "^4.7 || 5.*"
"phpunit/phpunit": "^4.7||~5"
},
"autoload": {
"psr-4": { "Mdiyakov\\DoctrineSolrBundle\\": "" }
Expand Down

0 comments on commit e45ec13

Please sign in to comment.