laravel-shopify
laravel-shopify copied to clipboard
I am getting using on while installing of shopify cli php to osiset package
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 what actual version numbers are you using for package, laravel and PHP?
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 @vijaypareek13
What is the cli command you are trying to run?
composer require osiset/laravel-shopify
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
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 - glad you got it working!