Problem/Motivation

Errors when installing project on a Drupal 10 / PHP 8.1 project.

Steps to reproduce

* Drupal 10.0.1
* PHP 8.1
* Taxonomy Entity Index 1.11.0 or 1.x-dev

drush en taxonomy_entity_index

Error 1

Fatal error: Type of Drupal\taxonomy_entity_index\Commands\TaxonomyEntityIndexCommands::$logger must be ?Psr\Log\LoggerInterface (as in cl  
  ass Drush\Commands\DrushCommands) in /var/www/html/web/modules/contrib/taxonomy_entity_index/src/Commands/TaxonomyEntityIndexCommands.php   
  on line 13

Solution : remove $logger variable

Error 2

Drupal\Core\Entity\Query\QueryException: Entity queries must explicitly set whether the query should be access checked or not. See Drupal\Core\Entity\Query\QueryInterface::accessCheck().

Solution: add a accesCheck to FALSE when using EntityTypeManager.

CommentFileSizeAuthor
#4 3334811-error-on-installation.patch1.93 KBcrtlf
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

crtlf created an issue. See original summary.

crtlf’s picture

Making a patch.

crtlf’s picture

Title: Error on installation : $logger must be Psr\Log\LoggerInterface » Errors on installation with Drupal 10 / PHP 8.1
Issue summary: View changes
crtlf’s picture

StatusFileSize
new1.93 KB

Adding patch

larowlan’s picture

Status: Active » Needs review
larowlan’s picture

Changes look good, will merge and cut a new release if tests pass, thanks for opening

  • larowlan committed e4a5bae4 on 8.x-1.x authored by crtlf
    Issue #3334811 by crtlf: Errors on installation with Drupal 10 / PHP 8.1
    
larowlan’s picture

Status: Needs review » Fixed

Fixed, cutting 8.x-1.12 - thanks again

larowlan’s picture

crtlf’s picture

Thanks for the quick release

Status: Fixed » Closed (fixed)

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