invoker-community icon indicating copy to clipboard operation
invoker-community copied to clipboard

Laravel application provides a DBAL EventSubscriber class, which prevents Invoker from working due to a type error

Open bfinlay opened this issue 4 years ago • 0 comments

  1. Service Provider provides instance of PostgisSchemaColumnDefinitionEventSubscriber like so:
$dbPlatform = $connection
    ->getDoctrineSchemaManager()
    ->getDatabasePlatform();

$dbPlatform->getEventManager()->addEventSubscriber(new PostgisSchemaColumnDefinitionEventSubscriber);
  1. PostgisSchemaColumnDefinitionEventSubscriber implements Doctrine\Common\EventSubscriber
  2. Inovker does not recognize Doctrine\Common\EventSubscriber as the same interface (instance of) as _HumbugBoxcd54a32bc978\Doctrine\Common\EventSubscriber (because it is not the same interface, as it is in a different namespace due to being in the humbug\box phar)
  3. Invoker displays message below when attempting any action.

Can this be fixed in invoker?

Any suggestions to work around?


OS: darwin Invoker Version: 2.8.0 Laravel Version: 8.59.0 Local project: true PHP Binary: /usr/local/bin/php Route: /project/index?class=App%5CImage&time=1631075207106&project=local-nsoVEWcmLKuEaNZm5vaZ8T

Error:

TypeError 

  Argument 1 passed to _HumbugBoxcd54a32bc978\Doctrine\Common\EventManager::addEventSubscriber() must be an instance of _HumbugBoxcd54a32bc978\Doctrine\Common\EventSubscriber, instance of AngelSourceLabs\LaravelSpatial\Doctrine\Event\Listeners\PostgisSchemaColumnDefinitionEventSubscriber given, called in /Users/brion/development/penguin/vendor/angel-source-labs/laravel-spatial/src/SpatialServiceProvider.php on line 94

  at phar:/Applications/Development/Invoker.app/Contents/Resources/invoker.phar/vendor/doctrine/event-manager/lib/Doctrine/Common/EventManager.php:41
     37▕         foreach ((array) $events as $event) {
     38▕             unset($this->_listeners[$event][$hash]);
     39▕         }
     40▕     }
  ➜  41▕     public function addEventSubscriber(\_HumbugBoxcd54a32bc978\Doctrine\Common\EventSubscriber $subscriber)
     42▕     {
     43▕         $this->addEventListener($subscriber->getSubscribedEvents(), $subscriber);
     44▕     }
     45▕     public function removeEventSubscriber(\_HumbugBoxcd54a32bc978\Doctrine\Common\EventSubscriber $subscriber)

      [2m+14 vendor frames [22m
  15  phar:/Applications/Development/Invoker.app/Contents/Resources/invoker.phar/src/Actions/IndexResourceAction.php:50
      Illuminate\Database\Eloquent\Model::query()

  16  phar:/Applications/Development/Invoker.app/Contents/Resources/invoker.phar/src/Actions/IndexResourceAction.php:36
      _HumbugBoxcd54a32bc978\Invoker\Actions\IndexResourceAction::buildQuery()

bfinlay avatar Sep 08 '21 05:09 bfinlay