Skip to content

Commit ef3a354

Browse files
authored
Merge pull request #1355 from Tobion/cleanup
remove unused dependencies & deprecate propel support
2 parents 599ec8a + 2ac0ee8 commit ef3a354

File tree

12 files changed

+41
-57
lines changed

12 files changed

+41
-57
lines changed

CHANGELOG-4.0.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ in 4.0 versions.
1111
* Introduce InPlacePagerPersister.
1212
* Add new options to populate command: --first-page, last-page, --max-per-page. They work only if you use v5 providers API.
1313
* Deprecate some options of populate command: --batch-size and --offset.
14+
* Deprecate Propel support
1415

1516
### 4.0.1 (2017-08-10)
1617

DependencyInjection/FOSElasticaExtension.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,10 @@ private function loadDriver(ContainerBuilder $container, $driver)
714714
return;
715715
}
716716

717+
if ('propel' === $driver) {
718+
@trigger_error('Support for Propel is deprecated since version 4.1 and will be removed in 5.0.', E_USER_DEPRECATED);
719+
}
720+
717721
$loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
718722
$loader->load($driver.'.xml');
719723
$this->loadedDrivers[] = $driver;

Propel/ElasticaToModelTransformer.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
use Symfony\Component\PropertyAccess\PropertyAccessorInterface;
1010

1111
/**
12+
* @deprecated since 4.1 will be removed in 5.x.
13+
*
1214
* Maps Elastica documents with Propel objects.
1315
*
1416
* This mapper assumes an exact match between Elastica document IDs and Propel

Propel/Propel1PagerProvider.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
use Pagerfanta\Adapter\PropelAdapter;
1717
use Pagerfanta\Pagerfanta;
1818

19+
/**
20+
* @deprecated since 4.1 will be removed in 5.x.
21+
*/
1922
final class Propel1PagerProvider implements PagerProviderInterface
2023
{
2124
/**

README.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@ FOSElasticaBundle
22
=================
33

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

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

11-
> **Note** Propel support is limited and contributions fixing issues are welcome!
12-
1311
[![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)
1412
[![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)
1513

@@ -18,18 +16,16 @@ Documentation
1816

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

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

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

2523
Installation
2624
------------
2725

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

3028
License
3129
-------
3230

33-
This bundle is under the MIT license. See the complete license in the bundle:
34-
35-
Resources/meta/LICENSE
31+
This bundle is released under the MIT license. See the included [LICENSE](Resources/meta/LICENSE) file for more information.

Resources/doc/cookbook/manual-provider.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Manual pager provider
22
====================
33

4-
Create a service with the tag "fos_elastica.provider" and attributes for the
4+
Create a service with the tag "fos_elastica.pager_provider" and attributes for the
55
index and type for which the service will provide.
66

77
```yaml
@@ -35,10 +35,10 @@ class UserPagerProvider implements PagerProviderInterface
3535

3636
There are some examples:
3737

38-
* [DoctrineORMPagerProvider](https://github.com/FriendsOfSymfony/FOSElasticaBundle/blob/master/Doctrine/DoctrineORMPagerProvider.php)
39-
* [DoctrinePHPCRPagerProvider](https://github.com/FriendsOfSymfony/FOSElasticaBundle/blob/master/Doctrine/DoctrinePHPCRPagerProvider.php)
40-
* [DoctrineMongoDBPagerProvider](https://github.com/FriendsOfSymfony/FOSElasticaBundle/blob/master/Doctrine/DoctrineMongoDBPagerProvider.php)
41-
* [Propel1PagerProvider](https://github.com/FriendsOfSymfony/FOSElasticaBundle/blob/master/Propel/Propel1PagerProvider.php)
38+
* [ORMPagerProvider](../../../Doctrine/ORMPagerProvider.php)
39+
* [PHPCRPagerProvider](../../../Doctrine/PHPCRPagerProvider.php)
40+
* [MongoDBPagerProvider](../../../Doctrine/MongoDBPagerProvider.php)
41+
* [Propel1PagerProvider](../../../Propel/Propel1PagerProvider.php)
4242

4343

4444
Manual Provider (DEPRECATED)
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
<?php
22

33
use FOS\ElasticaBundle\FOSElasticaBundle;
4-
use Knp\Bundle\PaginatorBundle\KnpPaginatorBundle;
54
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
65
use Symfony\Bundle\TwigBundle\TwigBundle;
76

87
return array(
98
new FrameworkBundle(),
109
new FOSElasticaBundle(),
11-
new KnpPaginatorBundle(),
1210
new TwigBundle(),
1311
);

Tests/Functional/app/Basic/config.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
imports:
22
- { resource: ./../config/config.yml }
33

4-
framework:
5-
templating:
6-
engines: ['twig']
7-
84
twig:
95
debug: %kernel.debug%
106

Tests/Functional/app/ORM/bundles.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@
99
new FrameworkBundle(),
1010
new FOSElasticaBundle(),
1111
new DoctrineBundle(),
12-
new JMSSerializerBundle(),
1312
);

Tests/Functional/app/Serializer/config.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ fos_elastica:
2525
clients:
2626
default:
2727
url: http://localhost:9200
28-
serializer: ~
28+
serializer:
29+
serializer: jms_serializer
2930
indexes:
3031
index:
3132
index_name: foselastica_ser_test_%kernel.environment%

0 commit comments

Comments
 (0)