I installed this Cartalyst Stripe package for laravel which was nothing but trouble for me.. I just couldn't get it working and now I decided to remove it completely.
So, I remove the line that requires this package in composer.json.
I removed the line from confing/app.php from the providers & aliases array. I also removed all references of that Cartalyst package from my code..
Somehow, after I run composer update I still get this error..
[Symfony\Component\Debug\Exception\FatalThrowableError]
Class 'Cartalyst\Stripe\Laravel\StripeServiceProvider' not found
Script php artisan optimize handling the post-update-cmd event returned with error code 1
What am I missing here?
You need to clear config cache. Run php artisan config:clear command to fix this.
If you still see the error message when you run the artisan commands, clear the bootstrap/cache directory manually.
Related
Dears whenever i want to add any Packeg using composer i face below error
"Compiled Services Class Has been removed"
I search many solution like "composer update" etc but still i face this problem
due to this error my working is stop.
kindly help me whats the original solution.
thats the composer installation problem? or what ?
The message The compiled services file has been removed. is a info message from the clear compiled command: php artisan clear-compiled.
It is called from php artisan optimize that runs on every composer update or install.
The message is only a info reporting that the file bootstrap/cache/services.php has been removed.
The services.php file will be reconstructed at the next request.
So at the end its a normal info message.
I have encountered the same problem.
Just remove the "Vendor" folder then install the composer. It worked fine for me.
I work with Laravel 5.3, use barryvdh/laravel-ide-helper.
I've generated .phpstorm.meta.php and _ide_helper.php, but still marks PhpStorm classes like undefined.
What can I do with this problem?
You need to import the single classes instead of of the full qualified paths.
So change your imports from
use Illuminate\Http\Request to use Request
Also consider to install the "Laravel" plugin for PHPStorm. You can find it by browsing in the JetBrains plugin repository (can be found in the settings).
Before (re)generating your ide-helper files, try the following commands:
composer dumpauto
php artisan config:clear
php artisan clear-compiled
I'm getting problem when trying to execute php artisan "command". Does not matter the command.
For example, executing the command:
php artisan make:controller TestController
I have got the following result
[ErrorException]
Undefined variable: ths
What I have tried to do?
I have tried to update/install composer
composer update
composer install
composer dump-autoload
It's causing me a lot of problem for example I can't execute my migration in another words I can't take the next steps.
Would be great if someone has some idea how to fix that.
Thank's a lot
This error means that somewhere you have a class with $ths variable and it's not related to commands. I think you wrote some code and used $ths instead of $this. Check all last changes (custom commands, facades, service providers etc). Just fix it and commands will work again.
If you can't find $ths in your code, check Laravel error logs for extra info.
I suggest finding this in your code. If you use Sublime Text press:
The keyboard shortcut is Ctrl⇧+F on non-Mac (regular) keyboards, and ⌘⇧+F on a Mac.
And put $this on this variable instead of $ths
I tried to delete barryvdh/laravel-debugbar from my laravel installation, and it seems I didn't make something right.
What I did so far :
composer remove barryvdh/laravel-debugbar
I deleted then the references in config/app.php
And I've got an error :
[RuntimeException]
Error Output: PHP Fatal error:
Class 'Barryvdh\Debugbar\ServiceProvider' not found in
{mypath}\vendor\laravel\framework\src\Illuminate\Foundation\ProviderRepository.php on line 146
I tried dump-autoload, clear-compiled, but none works.
What did I miss ?
22/02/2016 Edit : I also tried to remove ALL the vendor folder, then install it again via composer install, but I got the error again when the command php artisan clear-compiled was run angain.
Ok, it seems I had played with artisan commands, and the configuration file was cached (via php artisan config:cache).
I deleted it (in bootstrap/cache/config.php) and everything works like a charm, but I also could have used the command php artisan config:clear to remove it.
When you installed Debugbar, after the package was install via composer you needed to add the class to the providers array in config/app.php. So you need to remove this line from there:
Barryvdh\Debugbar\ServiceProvider::class
If you also register the facade, then you need to remove the following from the aliases array from the same file:
'Debugbar' => Barryvdh\Debugbar\Facade::class
If you also ran php artisan vendor:publish (which is the final step described in the Installation Section from the package readme) then you can delete the config/debugbar.php file as well, although leaving that configuration file in place will not cause any issues.
Marc Brillault's answer is correct. I am adding more clarification to that answer:
I removed debug bar class manually from the catch files. present in (bootstrap/cache/config.php).
Steps for How to remove manually class.
1.) Open this two files
`bootstrap/cache/config.php`
`config/app.php`
2.) Find this two line and remove It.
Barryvdh\Debugbar\ServiceProvider::class,
'Debugbar' => Barryvdh\Debugbar\Facade::class,
3.) run command `php artisan config:clear`
after the following this step check command php artisan list is working well.
you must:
First. Delete the references to Debugbar in config/app.php
Second. composer remove barryvdh/laravel-debugbar
In that order. If you don't, Laravel get confused ;)
The best ways you need to do is delete all file manually in all composer files.
I'm a Ubuntu/git/composer noob, and I'm trying to follow the installation instructions here.
After running the php artisan config:publish loic-sharma/profiler command I get the following error:
PHP Fatal error: Class 'Profiler\ProfilerServiceProvider' not found in /var/www/epcr/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 158
I'm assuming the problem is that I haven't downloaded the code, but I'm not exactly sure how to go about doing that.
Most packages require you to manually add service provider in app/config/app.php. There is an array of providers inside.
Some providers require also facade alias.
So take a look at documentation, if it is provider, then it should be documented.
e.g.
'Miro\JSONSuite\JSONSuiteServiceProvider'
Try running composer dump-autoload
I needed to run composer update after I added the require to my composer.json file. After that I had a few permissions I needed to update and it worked after that.