From 795437c85d6a444908abcecaca98a08b79a2beab Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 28 May 2024 15:52:06 +0200 Subject: [PATCH] Fixed deprecated namespaces usage (#70) For more details see https://github.com/ibexa/solr/pull/70 Key changes: * Fixed references to deprecated legacy namespaces * [Doc] Fixed references to legacy namespaces in document_field_mappers.md * [PHPStan] Aligned baseline after PHPStan release --- doc/specifications/document_field_mappers.md | 22 ++++++++++---------- ignore-lte-php7.4-errors.neon | 2 +- src/bundle/Resources/config/services.yml | 4 ++-- src/lib/Gateway/HttpClient/Stream.php | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/doc/specifications/document_field_mappers.md b/doc/specifications/document_field_mappers.md index 88cf5e1f..c01705d4 100644 --- a/doc/specifications/document_field_mappers.md +++ b/doc/specifications/document_field_mappers.md @@ -66,27 +66,27 @@ something like this: namespace My\WebinarApp; -use EzSystems\EzPlatformSolrSearchEngine\FieldMapper\ContentFieldMapper; -use eZ\Publish\SPI\Persistence\Content\Handler as ContentHandler; -use eZ\Publish\SPI\Persistence\Content\Location\Handler as LocationHandler; -use eZ\Publish\SPI\Persistence\Content; -use eZ\Publish\SPI\Search; +use Ibexa\Contracts\Solr\FieldMapper\ContentFieldMapper; +use Ibexa\Contracts\Core\Persistence\Content\Handler as ContentHandler; +use Ibexa\Contracts\Core\Persistence\Content\Location\Handler as LocationHandler; +use Ibexa\Contracts\Core\Persistence\Content; +use Ibexa\Contracts\Core\Search; class WebinarEventTitleFulltextFieldMapper extends ContentFieldMapper { /** - * @var \eZ\Publish\SPI\Persistence\Content\Type\Handler + * @var \Ibexa\Contracts\Core\Persistence\Content\Handler */ protected $contentHandler; /** - * @var \eZ\Publish\SPI\Persistence\Content\Location\Handler + * @var \Ibexa\Contracts\Core\Persistence\Content\Location\Handler */ protected $locationHandler; /** - * @param \eZ\Publish\SPI\Persistence\Content\Handler $contentHandler - * @param \eZ\Publish\SPI\Persistence\Content\Location\Handler $locationHandler + * @param \Ibexa\Contracts\Core\Persistence\Content\Handler $contentHandler + * @param \Ibexa\Contracts\Core\Persistence\Content\Location\Handler $locationHandler */ public function __construct( ContentHandler $contentHandler, @@ -127,8 +127,8 @@ this: my_webinar_app.webinar_event_title_fulltext_field_mapper: class: My\WebinarApp\WebinarEventTitleFulltextFieldMapper arguments: - - '@ezpublish.spi.persistence.content_handler' - - '@ezpublish.spi.persistence.location_handler' + $contentHandler: '@Ibexa\Contracts\Core\Persistence\Content\Handler' + $locationHandler: '@Ibexa\Contracts\Core\Persistence\Content\Location\Handler' tags: - {name: ibexa.search.solr.field.mapper.content} ``` diff --git a/ignore-lte-php7.4-errors.neon b/ignore-lte-php7.4-errors.neon index 22e0ed62..c0a225bb 100644 --- a/ignore-lte-php7.4-errors.neon +++ b/ignore-lte-php7.4-errors.neon @@ -1,6 +1,6 @@ parameters: ignoreErrors: - - message: "#^Anonymous function should return array but returns array\\\\|false\\.$#" + message: "#^Anonymous function should return array\\ but returns array\\\\|false\\.$#" count: 1 path: tests/lib/Search/ResultExtractor/AggregationResultExtractor/TermAggregationResultExtractorTest.php diff --git a/src/bundle/Resources/config/services.yml b/src/bundle/Resources/config/services.yml index 58f5bef0..2b076be4 100644 --- a/src/bundle/Resources/config/services.yml +++ b/src/bundle/Resources/config/services.yml @@ -1,7 +1,7 @@ parameters: ibexa.solr.default_connection: ~ - ibexa.solr.http_client.timeout: !php/const \EzSystems\EzPlatformSolrSearchEngineBundle\DependencyInjection\Configuration::SOLR_HTTP_CLIENT_DEFAULT_TIMEOUT - ibexa.solr.http_client.max_retries: !php/const \EzSystems\EzPlatformSolrSearchEngineBundle\DependencyInjection\Configuration::SOLR_HTTP_CLIENT_DEFAULT_MAX_RETRIES + ibexa.solr.http_client.timeout: !php/const \Ibexa\Bundle\Solr\DependencyInjection\Configuration::SOLR_HTTP_CLIENT_DEFAULT_TIMEOUT + ibexa.solr.http_client.max_retries: !php/const \Ibexa\Bundle\Solr\DependencyInjection\Configuration::SOLR_HTTP_CLIENT_DEFAULT_MAX_RETRIES services: ibexa.solr.http_client.retryable: diff --git a/src/lib/Gateway/HttpClient/Stream.php b/src/lib/Gateway/HttpClient/Stream.php index f8eb3a97..11b5e0a1 100644 --- a/src/lib/Gateway/HttpClient/Stream.php +++ b/src/lib/Gateway/HttpClient/Stream.php @@ -18,7 +18,7 @@ /** * Simple PHP stream based HTTP client. * - * @internal type-hint {@see \EzSystems\EzPlatformSolrSearchEngine\Gateway\HttpClient} instead. + * @internal type-hint {@see \Ibexa\Solr\Gateway\HttpClient} instead. */ class Stream implements HttpClient, LoggerAwareInterface {