Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#244 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
laravel, php
領域
backend, tooling

調査の方向性

SpatialServiceProvider.php の 94 行目にある Laravel service provider で発生する失敗を再現し、エラーに表示されるバンドルされた Doctrine EventManager 型を調査します。そのインターフェースをアプリケーションの Doctrine\Common\EventSubscriber と比較し、その後 src/Actions/IndexResourceAction.php を通じて呼び出しを追跡します。報告されているデータベース依存のアクションが namespace/type エラーで失敗しなくなれば完了です。

索引モデルが issue の本文から書いたものです。

説明

  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)

      +14 vendor frames 
  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()
主要言語
言語のデータがありません
スター
76
フォーク
1
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

beyondcode/invoker-community のほかの issue

beyondcode/invoker-community の issue をすべて見る

似ている issue

Backend & API Design の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。