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

Class 'SuperClosure\Serializer' not found

Open Bujeas opened this issue 7 years ago • 8 comments

Try to install on Laravel 5.4. When run composer install got as below error. Please help me.

[Symfony\Component\Debug\Exception\FatalErrorException]
Class 'SuperClosure\Serializer' not found

Bujeas avatar Apr 12 '17 04:04 Bujeas

You need to add "jeremeamia/superclosure": "^2.0" to composer.json

FaCuZ avatar Apr 12 '17 04:04 FaCuZ

Thank you FacuZ but still no luck. After added "jeremeamia/superclosure": "^2.0" to composer.json, got this error:

[Symfony\Component\Debug\Exception\FatalErrorException]
Call to undefined method Illuminate\Foundation\Application::share()

Please advice. Thanks.

Bujeas avatar Apr 13 '17 04:04 Bujeas

To make it work you need edit the ThemeServiceProvider.php file inside the directory vendor/teepluss/theme/src/

This:

$this->app['asset'] = $this->app->share(function($app)

should be:

$this->app->singleton('asset', function ($app) {

This should be repeated to every method in the file.

Or you can use the console:

curl https://raw.githubusercontent.com/jandub/laravel-theme/27706197252015366b19cee4f9e5062b6eaf120f/src/ThemeServiceProvider.php > vendor/teepluss/theme/src/ThemeServiceProvider.php

Or you can try my version of this package: FaCuZ/laravel-theme

FaCuZ avatar Apr 13 '17 04:04 FaCuZ

Hi, I am getting the following error while installing the teeplus theme

[Symfony\Component\Debug\Exception\FatalThrowableError] Type error: Argument 1 passed to Illuminate\Console\Application::add() must be an instance of Symfony\Component\Console\Command\Command, null given, c alled in D:\xampp\htdocs\laravel\vendor\laravel\framework\src\Illuminate\Co nsole\Application.php on line 228

Please help.

mmoin64 avatar Sep 21 '17 11:09 mmoin64

Hi @FaCuZ Please help me on the above problem. I am very new to laravel. Thank you.

mmoin64 avatar Sep 21 '17 11:09 mmoin64

This statement was removed. Old: $this->app['foo'] = $this->app->share(function ($app) { New: $this->app->singleton('foo', function ($app) { It should edit the ThemeServiceProvider.php file inside the directory vendor/teepluss/theme/src/

For example: //$this->app['asset'] = $this->app->share(function($app) $this->app->singleton('asset', function ($app)

//$this->app['breadcrumb'] = $this->app->share(function($app) $this->app->singleton('breadcrumb', function ($app)

It worked for me. Check out: https://github.com/laravel/framework/commit/1a1969b6e6f793c3b2a479362641487ee9cbf736

wixys avatar Oct 12 '17 13:10 wixys

Hi, I am getting the following error while installing the teeplus theme

[Symfony\Component\Debug\Exception\FatalThrowableError] Type error: Argument 1 passed to Illuminate\Console\Application::add() must be an instance of Symfony\Component\Console\Command\Command, null given, c alled in D:\xampp\htdocs\laravel\vendor\laravel\framework\src\Illuminate\Co nsole\Application.php on line 228

Please help.

Hi i am facing same issue, did u fix this issue?

gtshift-dev avatar Dec 03 '18 10:12 gtshift-dev

Hi Facing, Did you try this https://github.com/laravel/framework/commit/1a1969b6e6f793c3b2a479362641487ee9cbf736 ?

wixys avatar Dec 03 '18 11:12 wixys