Skip to content

Commit

Permalink
Merge pull request #1355 from Tobion/cleanup
Browse files Browse the repository at this point in the history
remove unused dependencies & deprecate propel support
  • Loading branch information
Tobion authored Dec 17, 2017
2 parents 599ec8a + 2ac0ee8 commit ef3a354
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 57 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-4.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ in 4.0 versions.
* Introduce InPlacePagerPersister.
* Add new options to populate command: --first-page, last-page, --max-per-page. They work only if you use v5 providers API.
* Deprecate some options of populate command: --batch-size and --offset.
* Deprecate Propel support

### 4.0.1 (2017-08-10)

Expand Down
4 changes: 4 additions & 0 deletions DependencyInjection/FOSElasticaExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,10 @@ private function loadDriver(ContainerBuilder $container, $driver)
return;
}

if ('propel' === $driver) {
@trigger_error('Support for Propel is deprecated since version 4.1 and will be removed in 5.0.', E_USER_DEPRECATED);
}

$loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load($driver.'.xml');
$this->loadedDrivers[] = $driver;
Expand Down
2 changes: 2 additions & 0 deletions Propel/ElasticaToModelTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
use Symfony\Component\PropertyAccess\PropertyAccessorInterface;

/**
* @deprecated since 4.1 will be removed in 5.x.
*
* Maps Elastica documents with Propel objects.
*
* This mapper assumes an exact match between Elastica document IDs and Propel
Expand Down
3 changes: 3 additions & 0 deletions Propel/Propel1PagerProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
use Pagerfanta\Adapter\PropelAdapter;
use Pagerfanta\Pagerfanta;

/**
* @deprecated since 4.1 will be removed in 5.x.
*/
final class Propel1PagerProvider implements PagerProviderInterface
{
/**
Expand Down
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@ FOSElasticaBundle
=================

This bundle provides integration with [ElasticSearch](http://www.elasticsearch.org) and [Elastica](https://github.com/ruflin/Elastica) with
Symfony2. Features include:
Symfony. Features include:

- Integrates the Elastica library into a Symfony2 environment
- Automatically generate mappings using a serializer
- Listeners for Doctrine events for automatic indexing

> **Note** Propel support is limited and contributions fixing issues are welcome!
[![Build Status](https://secure.travis-ci.org/FriendsOfSymfony/FOSElasticaBundle.png?branch=master)](http://travis-ci.org/FriendsOfSymfony/FOSElasticaBundle) [![Total Downloads](https://poser.pugx.org/FriendsOfSymfony/elastica-bundle/downloads.png)](https://packagist.org/packages/FriendsOfSymfony/elastica-bundle) [![Latest Stable Version](https://poser.pugx.org/FriendsOfSymfony/elastica-bundle/v/stable.png)](https://packagist.org/packages/FriendsOfSymfony/elastica-bundle) [![Latest Unstable Version](https://poser.pugx.org/friendsofsymfony/elastica-bundle/v/unstable.svg)](https://packagist.org/packages/friendsofsymfony/elastica-bundle)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/FriendsOfSymfony/FOSElasticaBundle/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/FriendsOfSymfony/FOSElasticaBundle/?branch=master)

Expand All @@ -18,18 +16,16 @@ Documentation

Documentation for FOSElasticaBundle is in `Resources/doc/index.md`

[Read the documentation for 4.0.x](https://github.com/FriendsOfSymfony/FOSElasticaBundle/blob/master/Resources/doc/index.md)
[Read the documentation for 4.x](Resources/doc/index.md)

[Read the documentation for 3.2.x](https://github.com/FriendsOfSymfony/FOSElasticaBundle/blob/3.2.x/Resources/doc/index.md)

Installation
------------

Installation instructions can be found in the [documentation](https://github.com/FriendsOfSymfony/FOSElasticaBundle/blob/master/Resources/doc/setup.md)
Installation instructions can be found in the [documentation](Resources/doc/setup.md)

License
-------

This bundle is under the MIT license. See the complete license in the bundle:

Resources/meta/LICENSE
This bundle is released under the MIT license. See the included [LICENSE](Resources/meta/LICENSE) file for more information.
10 changes: 5 additions & 5 deletions Resources/doc/cookbook/manual-provider.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Manual pager provider
====================

Create a service with the tag "fos_elastica.provider" and attributes for the
Create a service with the tag "fos_elastica.pager_provider" and attributes for the
index and type for which the service will provide.

```yaml
Expand Down Expand Up @@ -35,10 +35,10 @@ class UserPagerProvider implements PagerProviderInterface

There are some examples:

* [DoctrineORMPagerProvider](https://github.com/FriendsOfSymfony/FOSElasticaBundle/blob/master/Doctrine/DoctrineORMPagerProvider.php)
* [DoctrinePHPCRPagerProvider](https://github.com/FriendsOfSymfony/FOSElasticaBundle/blob/master/Doctrine/DoctrinePHPCRPagerProvider.php)
* [DoctrineMongoDBPagerProvider](https://github.com/FriendsOfSymfony/FOSElasticaBundle/blob/master/Doctrine/DoctrineMongoDBPagerProvider.php)
* [Propel1PagerProvider](https://github.com/FriendsOfSymfony/FOSElasticaBundle/blob/master/Propel/Propel1PagerProvider.php)
* [ORMPagerProvider](../../../Doctrine/ORMPagerProvider.php)
* [PHPCRPagerProvider](../../../Doctrine/PHPCRPagerProvider.php)
* [MongoDBPagerProvider](../../../Doctrine/MongoDBPagerProvider.php)
* [Propel1PagerProvider](../../../Propel/Propel1PagerProvider.php)


Manual Provider (DEPRECATED)
Expand Down
2 changes: 0 additions & 2 deletions Tests/Functional/app/Basic/bundles.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
<?php

use FOS\ElasticaBundle\FOSElasticaBundle;
use Knp\Bundle\PaginatorBundle\KnpPaginatorBundle;
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
use Symfony\Bundle\TwigBundle\TwigBundle;

return array(
new FrameworkBundle(),
new FOSElasticaBundle(),
new KnpPaginatorBundle(),
new TwigBundle(),
);
4 changes: 0 additions & 4 deletions Tests/Functional/app/Basic/config.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
imports:
- { resource: ./../config/config.yml }

framework:
templating:
engines: ['twig']

twig:
debug: %kernel.debug%

Expand Down
1 change: 0 additions & 1 deletion Tests/Functional/app/ORM/bundles.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@
new FrameworkBundle(),
new FOSElasticaBundle(),
new DoctrineBundle(),
new JMSSerializerBundle(),
);
3 changes: 2 additions & 1 deletion Tests/Functional/app/Serializer/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ fos_elastica:
clients:
default:
url: http://localhost:9200
serializer: ~
serializer:
serializer: jms_serializer
indexes:
index:
index_name: foselastica_ser_test_%kernel.environment%
Expand Down
6 changes: 0 additions & 6 deletions Tests/Functional/app/config/config.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
framework:
secret: secret
router: { resource: "%kernel.root_dir%/%kernel.test_case%/routing.yml" }
test: ~
default_locale: en
translator:
fallbacks: ['en']
templating:
engines: ['php']

services:
logger: { class: Psr\Log\NullLogger }
50 changes: 20 additions & 30 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "friendsofsymfony/elastica-bundle",
"type": "symfony-bundle",
"description": "Elasticsearch PHP integration for your Symfony2 project using Elastica",
"description": "Elasticsearch PHP integration for your Symfony project using Elastica",
"keywords": ["doctrine2", "elastica", "elasticsearch", "mongodb", "propel", "search"],
"homepage": "https://github.com/FriendsOfSymfony/FOSElasticaBundle",
"license": "MIT",
Expand All @@ -13,46 +13,36 @@
],
"require": {
"php": ">=5.5.0",
"symfony/framework-bundle": "^2.8|^3.4",
"symfony/console": "^2.8|^3.4",
"symfony/form": "^2.8|^3.4",
"symfony/property-access": "^2.8|^3.4",
"symfony/asset": "^2.8|^3.4",
"symfony/templating": "^2.8|^3.4",
"symfony/translation": "^2.8|^3.4",
"psr/log": "~1.0",
"symfony/framework-bundle": "^2.8|^3.2",
"symfony/console": "^2.8|^3.2",
"symfony/dependency-injection": "^2.8|^3.2",
"symfony/options-resolver" : "^2.8|^3.2",
"symfony/property-access": "^2.8|^3.2",
"psr/log": "^1.0",
"ruflin/elastica": "3.2.*"
},
"require-dev":{
"doctrine/orm": "~2.4",
"doctrine/doctrine-bundle": "~1.6",
"doctrine/phpcr-bundle": "~1.2",
"doctrine/phpcr-odm": "^1",
"jackalope/jackalope-doctrine-dbal": "~1.1",
"jms/serializer-bundle": "~1.1",
"phpunit/phpunit": "~4.8|~5.0",
"doctrine/orm": "^2.5",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/phpcr-bundle": "^1.3",
"doctrine/phpcr-odm": "^1.4",
"jackalope/jackalope-doctrine-dbal": "^1.2",
"jms/serializer-bundle": "^2.2",
"phpunit/phpunit": "^4.8|^5.0",
"propel/propel1": "^1.7",
"pagerfanta/pagerfanta": "^1.0.5",
"knplabs/knp-components": "~1.2",
"knplabs/knp-paginator-bundle": "~2.4",
"symfony/browser-kit" : "^2.8|^3.4",
"symfony/expression-language" : "^2.8|^3.4",
"knplabs/knp-components": "^1.2",
"symfony/browser-kit": "^2.8|^3.2",
"symfony/expression-language" : "^2.8|^3.2",
"symfony/twig-bundle": "^2.8|^3.4",
"symfony/serializer": "^2.8|^3.4",
"symfony/yaml": "^2.8|^3.4",
"symfony/dependency-injection": "^2.8|^3.4",
"symfony/validator": "^2.8|^3.4",
"symfony/stopwatch": "^2.8|^3.4"
"symfony/serializer": "^2.8|^3.2",
"symfony/yaml": "^2.8|^3.2",
"symfony/stopwatch": "^2.8|^3.2"
},
"suggest": {
"enqueue/elastica-bundle": "The bundle adds extra features to FOSElasticaBundle bundle. Aimed to improve performance."
},
"autoload": {
"psr-4": { "FOS\\ElasticaBundle\\": "" }
},
"extra": {
"branch-alias": {
"dev-master": "4.0.x-dev"
}
}
}

0 comments on commit ef3a354

Please sign in to comment.