laravel-shopify icon indicating copy to clipboard operation
laravel-shopify copied to clipboard

I am getting using on while installing of shopify cli php to osiset package

Open vijaypareek13 opened this issue 2 years ago • 4 comments

Class name must be a valid object or a string

at C:\Users\Admin\Desktop\ShopifyAPP\seventh_app\vendor\osiset\laravel-shopify\src\ShopifyAppProvider.php:294 290▕ / 291▕ private function bootObservers(): void 292▕ { 293▕ $model = Util::getShopifyConfig('user_model'); ➜ 294▕ $model::observe($this->app->make(ShopObserver::class)); 295▕ } 296▕ 297▕ /* 298▕ * Boot the middlewares for the package.

1 C:\Users\Admin\Desktop\ShopifyAPP\seventh_app\vendor\osiset\laravel-shopify\src\ShopifyAppProvider.php:64 Osiset\ShopifyApp\ShopifyAppProvider::bootObservers()

2 C:\Users\Admin\Desktop\ShopifyAPP\seventh_app\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php:36 Osiset\ShopifyApp\ShopifyAppProvider::boot() Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1

  • Package Version: latest
  • Laravel Version: latest
  • PHP Version: latest

vijaypareek13 avatar May 13 '22 15:05 vijaypareek13

@vijaypareek13 what actual version numbers are you using for package, laravel and PHP?

Kyon147 avatar May 14 '22 08:05 Kyon147

I am also affected by this error. I used the shopify-cli tool 3.5.0 to install a php template which than installs laravel.

PHP and Node both run in the same Docker container.

Laravel Framework: 8.83.23 PHP: 8.1 Package: 17.1.1

Do you have any advice on how to resolve this?

hktudock avatar Aug 09 '22 07:08 hktudock

@hktudock @vijaypareek13

What is the cli command you are trying to run?

Kyon147 avatar Aug 09 '22 07:08 Kyon147

composer require osiset/laravel-shopify

hktudock avatar Aug 09 '22 07:08 hktudock

It's hard to diagnose without some more information at the moment.

What php template did the cli use? Did you follow these install steps? https://github.com/osiset/laravel-shopify/wiki/Installation

Kyon147 avatar Aug 26 '22 09:08 Kyon147

I didn't realize that the user model configuration is commented out if you use shopify-cli >v3 to bootstrap a shopify app. Commented in and error is gone.

hktudock avatar Sep 01 '22 15:09 hktudock

@hktudock - glad you got it working!

Kyon147 avatar Sep 11 '22 07:09 Kyon147