- Issue created by @penyaskito
- Status changed to Needs review
over 1 year ago 10:58am 22 June 2023 - 🇪🇸Spain plopesc Valladolid
Patch using constructor promotion to simplify code.
- 🇪🇸Spain penyaskito Seville 💃, Spain 🇪🇸, UTC+2 🇪🇺
+++ b/src/DashboardListBuilder.php @@ -4,53 +4,14 @@ namespace Drupal\dashboard; - /** - * {@inheritdoc} - */ - public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) { - return new static( - $entity_type, - $container->get('entity_type.manager')->getStorage($entity_type->id()), - $container->get('messenger') - ); - }
I would merge this without even testing if it weren't for this removal. Not sure if we still need that.
- 🇪🇸Spain plopesc Valladolid
Parent class implements Messenger trait, so that service is redundant. It can be injected, though.
- Status changed to RTBC
over 1 year ago 3:50pm 22 June 2023 - 🇪🇸Spain penyaskito Seville 💃, Spain 🇪🇸, UTC+2 🇪🇺
Oh I missed you also added the github PR: https://github.com/penyaskito/dashboard-initiative/pull/20.
If tests pass we are good, and they passed. - 🇪🇸Spain penyaskito Seville 💃, Spain 🇪🇸, UTC+2 🇪🇺
I'm crediting @andypost here too
- Status changed to Fixed
over 1 year ago 3:54pm 22 June 2023 - 🇫🇷France andypost
Nice! reviewed and even inheritance valid
+++ b/src/DashboardAccessControlHandler.php @@ -19,11 +19,19 @@ use Symfony\Component\DependencyInjection\ContainerInterface; + public function __construct( + EntityTypeInterface $entity_type, + protected EntityTypeManagerInterface $entityTypeManager
++
Automatically closed - issue fixed for 2 weeks with no activity.
- Status changed to Fixed
11 months ago 11:37am 10 January 2024