i just installed a fresh laravel 5.2. But anytime i try to run an artisan command i get this error [Symfony\Component\Debug\Exception\FatalErrorException]
Call to undefined method Illuminate\Foundation\Application::bindShared()
bindshared() is a deprecated method since Laravel 5.1
Check the file that triggers the error using the -vvv flag on the artisan command:
php artisan {command} -vvv
This will display a complete stack trace and you'll be able to understand what's happening. After this, change the bindShared() call to singleton() in the file that triggers the error and probably everything will run properly. Consider the possibility that the error is triggered by an outdated additional package installed via composer.
You can edit the composer and from "laravel/framework": "5.1.*" you should edit that to "laravel/framework": "5.2.*".
That will solve the issue.
bindshared() is now deprecated. The laravel core is changed.
Related
I installed laravel-ckeditor via composer in my Laravel 5.5 project as described on their GitHub (https://github.com/UniSharp/laravel-ckeditor). Now i don't need it anymore and want to remove it. I executed composer remove unisharp/laravel-ckeditor but i get this error messge:
In ProviderRepository.php line 208:
Class 'Unisharp\Ckeditor\ServiceProvider' not found
I have on idea what causes this error. I tried reinstalling and removing it several times, but i always get the same error message.Thanks for any help.
Edit: The error is caused by artisan. I can't execute php artisan cache:clear anymore and directly before the error, composer prints
> #php artisan package:discover
into the console.
I'm working with Laravel 5.2 and i have an error when i run composer update or artisan optimize ..
i've searched on my vendor, i didn't found compiled.php file ! i try to generate this i run the artisan optimize, i have the same error
[InvalidArgumentException]
Please provide a valid cache path
Script php artisan clear-compiled handling the post-update-cmd event returned with error code 1
how i can resolve this ?
Please Try it:
create these folders under storage/framework:
sessions
views
cache
And also you can use this command to install:
sudo composer install
Its will be working.
I have an issue with the composer for creating migrations.
I just installed Laravel 4.2 via composer.
But i want to make migrations for my DB via composer, so i typed this command below:
php artisan migrate:make create_user_table
But then i get the error:
(I've tried it again to install Laravel 4.2, but i still get this error.)
Could not open input file: artisan
How can i fix this?
I haven't used composer or Laravel 4 during the last couple of weeks, today I created a new Laravel project and suddenly Monolog is causing a ton of problems.
At first I was unable to fully create the project, afterwards I was unable to create a migration, and now I can't run php artisan serve any more. I followed the steps on Laravel 4 Class not found in bootstrap/compiled.php and that helped the first time around, but after creating the second migration and wanting to run a php artisan migrate I get the following error:
PHP Fatal error: Class 'Monolog\Formatter\LineFormatter' not found in /bootstrap/compiled.php on line 7991
How do I fix this?
I have update composer using self-update, I have tried to use dump-autoload, and the other steps in the question I posted a link to.
I solved this issue by deleting the vendorfolder and then running a composer install to ensure a fresh install of all packages in the composer.json.
I'm not sure how you installed the project. If you're trying to impose Laravel 4 over an old project, I suggest you to install FRESH Laravel using this command
composer create-project laravel/laravel project_name --prefer-dist
This should not give you any installation related problem unless the Laravel installation itself is broken. Which is very unlikely to happen.
You can then copy your controllers, models, migrations etc from the old project.
Good luck.
I have created a new branch using Git, applied some updates to my code, checked out that branch on my staging server and I now can't run anything composer related.
I've added some new packages to composer.json which work on my development environment, but as soon as I try composer update on the staging environment I get class not found errors relating to the classes it's not yet downloaded.
I've tried
composer update
composer dump-autoload
php artisan clear-compiled
php artisan dump-autoload
php artisan optimize
But all result in the following error
PHP Fatal error: Class 'Artdarek\OAuth\OAuthServiceProvider' not found in
/var/www/sites/x/bootstrap/compiled.php on line 4321
Script php artisan clear-compiled handling the
pre-update-cmd event returned with an error
[RuntimeException]
Error Output: PHP Fatal error: Class 'Artdarek\OAuth\OAuthServiceProvider'
not found in /var/www/sites/x/bootstrap/compiled.php
on line 4321
What else can I try in order to get composer to download new files?
php artisan optimize --force
That command will re-generate /bootstrap/compiled.php
The --force arg is needed to re-generate the file when your environment is in debug mode.
I'm sure there is a more elegant way of dealing with this (and please accept any answer that provides that over this one) but this can probably be solved by deleting the entire vendor directory and running composer install again.
I know its not pretty but sometimes it's easier and quicker.
I had the exact same issue, which I solved by uploading the project again through filezilla to my server.
That doesn't solve the issues you are having with composer, however. Which begs the question: Assuming that you are working on a dedicated server, do you have composer installed globally in your server? If not you should still be able to do a php composer.phar update or just create an alias.
I might have misunderstood your question, and I realize that your question was asked a while back, but hopefully it will be helpful for someone else.