There are a number of errors in the module:

Deprecated function: Creation of dynamic property Drupal\entity_ui\Form\EntityTabForm::$entityType is deprecated in Drupal\entity_ui\Form\EntityTabForm->init() (line 96 of modules/contrib/entity_ui/src/Form/EntityTabForm.php).

Deprecated function: Creation of dynamic property Drupal\entity_ui\Plugin\EntityTabContent\EntityForm::$entityTypeManager is deprecated in Drupal\entity_ui\Plugin\EntityTabContentBase->__construct() (line 64 of modules/contrib/entity_ui/src/Plugin/EntityTabContentBase.php).

Deprecated function: Creation of dynamic property Drupal\entity_ui\EntityHandler\EntityTabListBuilder::$target_entity_canonical_path is deprecated in Drupal\entity_ui\EntityHandler\EntityTabListBuilder->__construct() (line 121 of modules/contrib/entity_ui/src/EntityHandler/EntityTabListBuilder.php).

Deprecated function: reset(): Calling reset() on an object is deprecated in Drupal\entity_ui\Form\EntityTabForm->getRouteForEntityPath() (line 397 of modules/contrib/entity_ui/src/Form/EntityTabForm.php).

Deprecated function: Creation of dynamic property Drupal\entity_ui\Plugin\EntityTabContent\ActionsConfigurableAction::$actionPlugin is deprecated in Drupal\entity_ui\Plugin\EntityTabContent\ActionsConfigurableAction->__construct() (line 64 of modules/contrib/entity_ui/src/Plugin/EntityTabContent/ActionsConfigurableAction.php).

Comments

DamienMcKenna created an issue. See original summary.

damienmckenna’s picture

Issue summary: View changes
damienmckenna’s picture

Issue summary: View changes
damienmckenna’s picture

Issue summary: View changes
damienmckenna’s picture

Issue summary: View changes
damienmckenna’s picture

Status: Active » Needs review
StatusFileSize
new2.82 KB

I think this covers it, but the variable definitions need to be double-checked.

joachim’s picture

Status: Needs review » Needs work
+++ b/src/Form/EntityTabForm.php
@@ -379,8 +386,12 @@ protected function getRouteForEntityPath($target_entity_type_id, $path_component
+      if (is_array($route_iterator)) {
+        return reset($route_iterator);
+      }
+      else {
+        return $route_iterator;
+      }

I don't understand this change.

getIterator() returns an iterator. We're supposed to be returning Route|null.

How can we return $route_iterator?

damienmckenna’s picture

Status: Needs work » Needs review
StatusFileSize
new632 bytes
new2.71 KB

How about this?

joachim’s picture

Status: Needs review » Needs work

seek() doesn't return anything. Maybe this should be current()?

damienmckenna’s picture

Status: Needs work » Needs review
StatusFileSize
new2.71 KB
new635 bytes

Yeah, sorry, I didn't think of checking the method's return statement.

joachim’s picture

Status: Needs review » Fixed

Tested and committed.

Thanks!

  • joachim committed 4701df09 on 8.x-1.x
    Issue #3442824 by DamienMcKenna: Updated for PHP 8.2 compatibility.

Status: Fixed » Closed (fixed)

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