diff --git a/CHANGELOG.md b/CHANGELOG.md index d2e68704a..1a436e7ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [5.1.1] ### Fixed - PHP 7.1 compatibility issue: date constants are not available as part of DateTimeInterface before PHP 7.2.0 +- Use Symfony\Contracts\EventDispatcher\Event instead of deprecated Symfony\Component\EventDispatcher\Event ## [5.1.0] ### Fixed diff --git a/composer.json b/composer.json index 2ff8c4222..ad2f98421 100755 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ } ], "require": { - "php": "^7.1", + "php": "^7.1.3", "symfony/event-dispatcher": "^4.3", "symfony/cache": "^3.1 || ^4.0", "ext-json": "*" diff --git a/src/Core/Client/Client.php b/src/Core/Client/Client.php index 99c78264e..719f28055 100755 --- a/src/Core/Client/Client.php +++ b/src/Core/Client/Client.php @@ -59,7 +59,6 @@ use Solarium\QueryType\Terms\Result as TermsResult; use Solarium\QueryType\Update\Query\Query as UpdateQuery; use Solarium\QueryType\Update\Result as UpdateResult; -use Symfony\Component\EventDispatcher\Event; use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\EventDispatcher\LegacyEventDispatcherProxy; diff --git a/src/Core/Event/PostCreateQuery.php b/src/Core/Event/PostCreateQuery.php index 652796a55..f9249b1ec 100644 --- a/src/Core/Event/PostCreateQuery.php +++ b/src/Core/Event/PostCreateQuery.php @@ -3,7 +3,7 @@ namespace Solarium\Core\Event; use Solarium\Core\Query\QueryInterface; -use Symfony\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * PostCreateQuery event, see Events for details. diff --git a/src/Core/Event/PostCreateRequest.php b/src/Core/Event/PostCreateRequest.php index a002c5de9..500a51b38 100644 --- a/src/Core/Event/PostCreateRequest.php +++ b/src/Core/Event/PostCreateRequest.php @@ -4,7 +4,7 @@ use Solarium\Core\Client\Request; use Solarium\Core\Query\QueryInterface; -use Symfony\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * PostCreateRequest event, see Events for details. diff --git a/src/Core/Event/PostCreateResult.php b/src/Core/Event/PostCreateResult.php index 9240cda98..62544b2ab 100644 --- a/src/Core/Event/PostCreateResult.php +++ b/src/Core/Event/PostCreateResult.php @@ -5,7 +5,7 @@ use Solarium\Core\Client\Response; use Solarium\Core\Query\QueryInterface; use Solarium\Core\Query\Result\ResultInterface; -use Symfony\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * PostCreateResult event, see Events for details. diff --git a/src/Core/Event/PostExecute.php b/src/Core/Event/PostExecute.php index da5044bfc..8723365ce 100644 --- a/src/Core/Event/PostExecute.php +++ b/src/Core/Event/PostExecute.php @@ -4,7 +4,7 @@ use Solarium\Core\Query\QueryInterface; use Solarium\Core\Query\Result\ResultInterface; -use Symfony\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * PostExecute event, see Events for details. diff --git a/src/Core/Event/PostExecuteRequest.php b/src/Core/Event/PostExecuteRequest.php index 85934a02b..439f60e5d 100644 --- a/src/Core/Event/PostExecuteRequest.php +++ b/src/Core/Event/PostExecuteRequest.php @@ -5,7 +5,7 @@ use Solarium\Core\Client\Endpoint; use Solarium\Core\Client\Request; use Solarium\Core\Client\Response; -use Symfony\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * PostExecuteRequest event, see Events for details. diff --git a/src/Core/Event/PreCreateRequest.php b/src/Core/Event/PreCreateRequest.php index c094c16af..a1ed3b02d 100644 --- a/src/Core/Event/PreCreateRequest.php +++ b/src/Core/Event/PreCreateRequest.php @@ -4,7 +4,7 @@ use Solarium\Core\Client\Request; use Solarium\Core\Query\QueryInterface; -use Symfony\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * PreCreateRequest event, see Events for details. diff --git a/src/Core/Event/PreCreateResult.php b/src/Core/Event/PreCreateResult.php index 7d67b032f..f76f86327 100644 --- a/src/Core/Event/PreCreateResult.php +++ b/src/Core/Event/PreCreateResult.php @@ -5,7 +5,7 @@ use Solarium\Core\Client\Response; use Solarium\Core\Query\QueryInterface; use Solarium\Core\Query\Result\ResultInterface; -use Symfony\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * PreCreateResult event, see Events for details. diff --git a/src/Core/Event/PreExecute.php b/src/Core/Event/PreExecute.php index 99eed4fea..35e3dcece 100644 --- a/src/Core/Event/PreExecute.php +++ b/src/Core/Event/PreExecute.php @@ -4,7 +4,7 @@ use Solarium\Core\Query\QueryInterface; use Solarium\Core\Query\Result\ResultInterface; -use Symfony\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * PostExecute event, see Events for details. diff --git a/src/Core/Event/PreExecuteRequest.php b/src/Core/Event/PreExecuteRequest.php index 4a979b569..e83c0f87e 100644 --- a/src/Core/Event/PreExecuteRequest.php +++ b/src/Core/Event/PreExecuteRequest.php @@ -5,7 +5,7 @@ use Solarium\Core\Client\Endpoint; use Solarium\Core\Client\Request; use Solarium\Core\Client\Response; -use Symfony\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * PreExecuteRequest event, see Events for details. diff --git a/src/Plugin/BufferedAdd/Event/AddDocument.php b/src/Plugin/BufferedAdd/Event/AddDocument.php index 5d255428a..4fc688441 100644 --- a/src/Plugin/BufferedAdd/Event/AddDocument.php +++ b/src/Plugin/BufferedAdd/Event/AddDocument.php @@ -3,7 +3,7 @@ namespace Solarium\Plugin\BufferedAdd\Event; use Solarium\Core\Query\DocumentInterface; -use Symfony\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * AddDocument event, see Events for details. diff --git a/src/Plugin/BufferedAdd/Event/PostCommit.php b/src/Plugin/BufferedAdd/Event/PostCommit.php index 7fe78b746..dceefb98b 100644 --- a/src/Plugin/BufferedAdd/Event/PostCommit.php +++ b/src/Plugin/BufferedAdd/Event/PostCommit.php @@ -3,7 +3,7 @@ namespace Solarium\Plugin\BufferedAdd\Event; use Solarium\QueryType\Update\Result; -use Symfony\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * PostCommit event, see Events for details. diff --git a/src/Plugin/BufferedAdd/Event/PostFlush.php b/src/Plugin/BufferedAdd/Event/PostFlush.php index d53b80b53..a6c38b717 100644 --- a/src/Plugin/BufferedAdd/Event/PostFlush.php +++ b/src/Plugin/BufferedAdd/Event/PostFlush.php @@ -4,7 +4,7 @@ use Solarium\Core\Query\DocumentInterface; use Solarium\QueryType\Update\Result; -use Symfony\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * PostFlush event, see Events for details. diff --git a/src/Plugin/BufferedAdd/Event/PreCommit.php b/src/Plugin/BufferedAdd/Event/PreCommit.php index bd376c8d5..a038d3dca 100644 --- a/src/Plugin/BufferedAdd/Event/PreCommit.php +++ b/src/Plugin/BufferedAdd/Event/PreCommit.php @@ -3,7 +3,7 @@ namespace Solarium\Plugin\BufferedAdd\Event; use Solarium\Core\Query\DocumentInterface; -use Symfony\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * PreCommit event, see Events for details. diff --git a/src/Plugin/BufferedAdd/Event/PreFlush.php b/src/Plugin/BufferedAdd/Event/PreFlush.php index ecd91e99a..f244d5b34 100644 --- a/src/Plugin/BufferedAdd/Event/PreFlush.php +++ b/src/Plugin/BufferedAdd/Event/PreFlush.php @@ -3,7 +3,7 @@ namespace Solarium\Plugin\BufferedAdd\Event; use Solarium\Core\Query\DocumentInterface; -use Symfony\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * PreFlush event, see Events for details. diff --git a/src/Plugin/Loadbalancer/Event/EndpointFailure.php b/src/Plugin/Loadbalancer/Event/EndpointFailure.php index 8e4544ac8..ecf595430 100644 --- a/src/Plugin/Loadbalancer/Event/EndpointFailure.php +++ b/src/Plugin/Loadbalancer/Event/EndpointFailure.php @@ -4,7 +4,7 @@ use Solarium\Core\Client\Endpoint; use Solarium\Exception\HttpException; -use Symfony\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * EndpointFailure event, see Events for details. diff --git a/src/Plugin/ParallelExecution/Event/ExecuteEnd.php b/src/Plugin/ParallelExecution/Event/ExecuteEnd.php index 57bd712ed..08872eb19 100644 --- a/src/Plugin/ParallelExecution/Event/ExecuteEnd.php +++ b/src/Plugin/ParallelExecution/Event/ExecuteEnd.php @@ -2,7 +2,7 @@ namespace Solarium\Plugin\ParallelExecution\Event; -use Symfony\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * ExecuteEnd event, see Events for details. diff --git a/src/Plugin/ParallelExecution/Event/ExecuteStart.php b/src/Plugin/ParallelExecution/Event/ExecuteStart.php index e3fac1c72..1c5c4c27e 100644 --- a/src/Plugin/ParallelExecution/Event/ExecuteStart.php +++ b/src/Plugin/ParallelExecution/Event/ExecuteStart.php @@ -2,7 +2,7 @@ namespace Solarium\Plugin\ParallelExecution\Event; -use Symfony\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * ExecuteStart event, see Events for details.