Apart from the CSpell warning (which will hopefully be addressed by #3494834: Add common words not in core dictionaries) our pipeline is currently also failing against PHP 8.4 and Drupal 11.2.

Issue fork search_api-3497473

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

drunken monkey created an issue. See original summary.

drunken monkey’s picture

Seems these are just deprecation warnings caused by other contrib modules. We can just ignore them here, they should be fixed in the respective modules (see #3496037: Fix implicitly nullable parameter type hints and #3497583: Fix deprecated implicitly nullable types).
I created an MR, let’s see if pipelines pass now (resp. report the one new deprecation I added for testing purposes).

drunken monkey’s picture

Huh. No idea why that didn’t work.
Especially: Why did the PHP 8.4 tests not report the newly added implicitly nullable type?
Trying again with a different regex.

drunken monkey’s picture

Still didn’t work.
Well, those should be resolved by the other modules anyways, so we can live with them for a week or two.

On the other hand, I now tried to fix the reported deprecations against Drupal 11.2 for using the deprecated Entity::$original property. Let’s see how that goes.

solideogloria’s picture

Here's all the Search API errors I get when rebuilding the cache in PHP 8.4:

Deprecated: Drupal\search_api\Datasource\DatasourceInterface::checkItemAccess(): Implicitly marking parameter $account as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/search_api/src/Datasource/DatasourceInterface.php on line 147
Deprecated: Drupal\search_api\Datasource\DatasourceInterface::getAffectedItemsForEntityChange(): Implicitly marking parameter $original_entity as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/search_api/src/Datasource/DatasourceInterface.php on line 302
Deprecated: Drupal\search_api\Datasource\DatasourceInterface::getItemAccessResult(): Implicitly marking parameter $account as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/search_api/src/Datasource/DatasourceInterface.php on line 161
Deprecated: Drupal\search_api\Datasource\DatasourcePluginBase::checkItemAccess(): Implicitly marking parameter $account as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/search_api/src/Datasource/DatasourcePluginBase.php on line 101
Deprecated: Drupal\search_api\Datasource\DatasourcePluginBase::getAffectedItemsForEntityChange(): Implicitly marking parameter $original_entity as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/search_api/src/Datasource/DatasourcePluginBase.php on line 171
Deprecated: Drupal\search_api\Datasource\DatasourcePluginBase::getItemAccessResult(): Implicitly marking parameter $account as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/search_api/src/Datasource/DatasourcePluginBase.php on line 109
Deprecated: Drupal\search_api\Plugin\search_api\datasource\ContentEntity::getAffectedItemsForEntityChange(): Implicitly marking parameter $original_entity as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/search_api/src/Plugin/search_api/datasource/ContentEntity.php on line 1136
Deprecated: Drupal\search_api\Plugin\search_api\datasource\ContentEntity::getPartialItemIds(): Implicitly marking parameter $bundles as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/search_api/src/Plugin/search_api/datasource/ContentEntity.php on line 812
Deprecated: Drupal\search_api\Plugin\search_api\datasource\ContentEntity::getPartialItemIds(): Implicitly marking parameter $languages as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/search_api/src/Plugin/search_api/datasource/ContentEntity.php on line 812
Deprecated: Drupal\search_api\Plugin\search_api\processor\AddURL::getPropertyDefinitions(): Implicitly marking parameter $datasource as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/search_api/src/Plugin/search_api/processor/AddURL.php on line 29
Deprecated: Drupal\search_api\Plugin\search_api\processor\AggregatedFields::getPropertyDefinitions(): Implicitly marking parameter $datasource as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/search_api/src/Plugin/search_api/processor/AggregatedFields.php on line 32
Deprecated: Drupal\search_api\Plugin\search_api\processor\ContentAccess::getPropertyDefinitions(): Implicitly marking parameter $datasource as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/search_api/src/Plugin/search_api/processor/ContentAccess.php on line 129
Deprecated: Drupal\search_api\Plugin\search_api\processor\CustomValue::getPropertyDefinitions(): Implicitly marking parameter $datasource as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/search_api/src/Plugin/search_api/processor/CustomValue.php on line 71
Deprecated: Drupal\search_api\Plugin\search_api\processor\EntityType::getPropertyDefinitions(): Implicitly marking parameter $datasource as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/search_api/src/Plugin/search_api/processor/EntityType.php on line 31
Deprecated: Drupal\search_api\Plugin\search_api\processor\Highlight::getFulltextFields(): Implicitly marking parameter $fulltext_fields as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/search_api/src/Plugin/search_api/processor/Highlight.php on line 376
Deprecated: Drupal\search_api\Plugin\search_api\processor\LanguageWithFallback::getPropertyDefinitions(): Implicitly marking parameter $datasource as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/search_api/src/Plugin/search_api/processor/LanguageWithFallback.php on line 107
Deprecated: Drupal\search_api\Plugin\search_api\processor\RenderedItem::getPropertyDefinitions(): Implicitly marking parameter $datasource as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/search_api/src/Plugin/search_api/processor/RenderedItem.php on line 152
Deprecated: Drupal\search_api\Plugin\search_api\processor\ReverseEntityReferences::getPropertyDefinitions(): Implicitly marking parameter $datasource as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/search_api/src/Plugin/search_api/processor/ReverseEntityReferences.php on line 228
Deprecated: Drupal\search_api\Plugin\search_api\processor\RoleAccess::getPropertyDefinitions(): Implicitly marking parameter $datasource as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/search_api/src/Plugin/search_api/processor/RoleAccess.php on line 131
Deprecated: Drupal\search_api\Processor\ProcessorInterface::getPropertyDefinitions(): Implicitly marking parameter $datasource as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/search_api/src/Processor/ProcessorInterface.php on line 151
Deprecated: Drupal\search_api\Processor\ProcessorInterface::requiresReindexing(): Implicitly marking parameter $new_settings as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/search_api/src/Processor/ProcessorInterface.php on line 229
Deprecated: Drupal\search_api\Processor\ProcessorInterface::requiresReindexing(): Implicitly marking parameter $old_settings as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/search_api/src/Processor/ProcessorInterface.php on line 229
Deprecated: Drupal\search_api\Processor\ProcessorPluginBase::getPropertyDefinitions(): Implicitly marking parameter $datasource as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/search_api/src/Processor/ProcessorPluginBase.php on line 148
Deprecated: Drupal\search_api\Processor\ProcessorPluginBase::requiresReindexing(): Implicitly marking parameter $new_settings as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/search_api/src/Processor/ProcessorPluginBase.php on line 185
Deprecated: Drupal\search_api\Processor\ProcessorPluginBase::requiresReindexing(): Implicitly marking parameter $old_settings as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/search_api/src/Processor/ProcessorPluginBase.php on line 185

Edit: also these


Deprecated: _search_api_views_handler_adjustments(): Implicitly marking parameter $sub_type as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/search_api/search_api.views.inc on line 445
Deprecated: Drupal\search_api\Entity\Index::setServer(): Implicitly marking parameter $server as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/search_api/src/Entity/Index.php on line 523
Deprecated: Drupal\search_api\IndexInterface::setServer(): Implicitly marking parameter $server as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/web/modules/contrib/search_api/src/IndexInterface.php on line 283
solideogloria’s picture

Status: Needs review » Needs work

These are not from other contrib modules, so the method signatures need to be fixed and made explicitly nullable.

scott_euser made their first commit to this issue’s fork.

scott_euser’s picture

Status: Needs work » Needs review

Deprecations raised in #6 are solved in this MR as far as I can see; are you sure you had the MR patch applied when rebuilding cache?

Fixed some more issues + suppressed the phpstan error from the backwards compatibility call (which is expected)

I don't understand the error from phpunit (next minor) though. Maybe something in the test coverage not properly UTF8 maybe?

solideogloria’s picture

I looked at the diff: https://git.drupalcode.org/project/search_api/-/merge_requests/208/diffs

It doesn't have a single changed method signature to add the nullable to the type.

scott_euser’s picture

But they all have a ? infront of them already, maybe fixed somewhere against dev branch? Or maybe I'm misunderstanding the issue - very possible :)

solideogloria’s picture

They must be already fixed in the dev branch, then.

liam morland made their first commit to this issue’s fork.

  • drunken monkey committed af9a92ad on 8.x-1.x
    Issue #3497473 by drunken monkey, scott_euser: Fixed failing pipelines.
    
drunken monkey’s picture

Status: Needs review » Fixed

Merged.
Thanks for bringing this over the finish line, Scott!

liam morland’s picture

Thanks. If max PHP testing is enabled, that would allow us to see that the nullable type deprecations have been fixed.

claudiu.cristea’s picture

I think we can add OPT_IN_TEST_MAX_PHP: 1 to see if we're PHP 8.4 ready

claudiu.cristea’s picture

Issue tags: +PHP 8.4
claudiu.cristea’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.