beyondcode / invoker-community

74 stars 2 forks source link

Errors when trying to update relation ID #184

Closed adamnlewis closed 3 years ago

adamnlewis commented 3 years ago

Hi

I get the following error on my Mac when trying to update a relation ID. Works fine on my Windows machine.

Thanks


OS: darwin Invoker Version: 2.4.0 Laravel Version: 6.1.0 Local project: unknown PHP Binary: /usr/local/bin/php Route: /project/index?class=App%5CUser&time=1619333332245&project=remote-2cFpAmcNjS8zsTktVwXLam

Error:

Symfony\Component\Debug\Exception\FatalThrowableError  : Class '' not found

  at phar:///tmp/invoker.phar/src/Actions/GetModelDefinitionAction.php:18
    14|     private $baseModel;
    15|     public function __construct(string $basePath, $request)
    16|     {
    17|         $this->className = $request->model;
  > 18|         $this->baseModel = new $this->className();
    19|     }
    20|     public function execute()
    21|     {
    22|         $attributes = $this->getAttributes();

  Exception trace:

  1   _HumbugBoxb27e6153cb07\Invoker\Actions\GetModelDefinitionAction::__construct("/home/forge/portal.wanderingwillows.co.uk", Object(stdClass))
      phar:///tmp/invoker.phar/src/ActionInvoker.php:65

  2   _HumbugBoxb27e6153cb07\Invoker\ActionInvoker::setUpAction(Object(stdClass))
      phar:///tmp/invoker.phar/src/ActionInvoker.php:26

  Please use the argument -v to see more details.
mpociot commented 3 years ago

Can you give me some more insights into the kind of relation you're editing? Seems like Invoker sees it as a stdClass object, that's why it doesn't work.

adamnlewis commented 3 years ago

Hi,

Really strange it was the standard laravel user mode with just a hasOne relation. Working fine though now for some reason. Just gremlins!

Thanks

On Wed, 28 Apr 2021, 08:50 Marcel Pociot, @.***> wrote:

Can you give me some more insights into the kind of relation you're editing? Seems like Invoker sees it as a stdClass object, that's why it doesn't work.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/beyondcode/invoker-community/issues/184#issuecomment-828232600, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH56TOS4KOT7J756WP6IZUTTK642PANCNFSM43Q6U6NA .