When i was upgrading from laravel 4.2 to laravel 5 i got this error while installing packages from composer
Call to undefined method Illuminate\Config\Repository::package()
This problem is because the package you're trying to use has not yet been updated to work with Laravel 5.
There is no work around or fix, you must wait for the package to be updated, or fork it and submit a PR
add this to your composer.json
"require": {
"laravel/framework": "dev-master#846c935194a036901ba6b4397c8897fa51e19111",
...
}
for more information see link below:
https://laracasts.com/discuss/channels/general-discussion/l5-latest-commit-breaks-if-using-waygenerators-or-image-internvention
Related
I have updated the composer.json file as instructed on the upgrade guide on Laravel 5.2 Documentation and run composer update.
Everything was updated correctly, but composer dumped the error below while generating autoload files.
Class 'Illuminate\Routing\ControllerService Provider' not found in /home/vagrant/Code/homework/vendor/laravel/framework /src/Illuminate/Foundation/ProviderRepository.php on line 146
Make sure you remove Illuminate\Routing\ControllerServiceProvider from your /config/app.php.
https://www.laravel.com/docs/5.2/upgrade (see the "Service Providers" section)
Problem is with your composer.json.It may got corrupted. Make sure
"require": {
"laravel/framework": "5.2.*"
},
exists.Then run composer update.
I am new with laravel. I have no idea how to install aimeos in laravel 5.1, since the installation guide for laravel 5.0, there is a different service provider in between L5 and L5.1.
I got this error:
C:\xampp\htdocs\classic>composer require aimeos/aimeos-laravel
Using version ^1.0 for aimeos/aimeos-laravel
./composer.json has been updated
[Symfony\Component\Debug\Exception\FatalErrorException]
Class 'Aimeos\Shop\ShopServiceProvider' not found
Script php artisan clear-compiled handling the pre-update-cmd event returned with an error
Please help me.
There's no difference between Laravel 5.0 and 5.1 when installing the Aimeos web shop package:
https://aimeos.org/docs/Laravel/Install_Aimeos
Update:
There seems to be a problem due to a recent change in Laravel 5.1.x because the service provider is now used before composer installs the package. I've fixed this in my test installation by
removing the the provider from config/app.php
removing the Aimeos related artisan commands in the "scripts" section of the composer.json file
running "composer update" afterwards with the aimeos-laravel package as requirement
executing the artisan tasks ("vendor:publish", "migrate", "aimeos:setup", "aimeos:cache") afterwards by hand
Download https://github.com/aimeos/aimeos-laravel.
place package to root or desired folder and while updating the composer set
"require": {
.......
"laravel/framework": "^5.1.11",
......
}
then brows
https://aimeos.org/docs/Laravel/Install_Aimeos#Laravel_5.0.2F5.1_and_Aimeos_1.0 Link and follow the instructions.
I want to use the Mailgun service in Laravel 5. This requires Guzzle 5 to be installed. I've added the following to composer.json, and installed it:
"guzzlehttp/guzzle": "~5.0"
However, my app is giving me this error:
FatalErrorException in MailgunTransport.php line 121:
Class 'GuzzleHttp\Client' not found
I've ran composer dump-autoload. What am I missing? Thanks.
I solve this by using:
"laravel/framework": "5.0.16",
"guzzlehttp/guzzle": "5.2",
composer update
and that is all.
composer install installs the packages (including exact versions) listed in composer.lock. When adding a new package or changing the version requirements, you need composer update (or you can use composer require) as the new package isn't in the lock file yet.
Running composer install when the composer.json has been updated since the last update/require should generate a warning saying Warning: The lock file is not up to date with the latest changes in composer.json, you may be getting outdated dependencies, run update to update them.
How I can add this repo https://github.com/twbs/bootstrap-sass/tree/2.1-stable to my composer.json?
I tryed this:
"minimum-stability": "dev",
"require-dev": {
"twbs/bootstrap-sass": "dev-2.1-stable"
}
but got error:
The requested package twbs/bootstrap-sass could not be found in any version, there may be a typo in the package name
dev-2.1-stable isnt in the package:
https://packagist.org/packages/twbs/bootstrap-sass
its a branch in their git repo, but they havent submitted those versions to packagist (or the tags they have given on the branches arent valid for packagist to pick them up on its own: https://packagist.org/about)
I am assuming you know they have a version 3 available. Also, do you not have Ruby gems installed? To install using their instructions add the package to your Gemfile, not to composer.
If you do want to install via composer, it has to be a composer package, which from https://packagist.org/packages/twbs/bootstrap-sass looks like only version 3 and up are available.
Try using:
"require-dev": {
"twbs/bootstrap-sass": "3.2.*"
}
Notice the 3 above, I tried 2.1.* and it couldn't be found. 3.2.* worked fine.
Also, incase you're wondering the * just means 'latest'. If you want 2.1 you might have to do it via Ruby Gems.
I'm updating my app from Symfony2.0 to Symfony2.1.
When I run composer install I receive a fatal exception about JMS/SerializerBundle not being found when it reaches the generating autoload files step. I think cache:clear is causing this.
I've added it to composer.json:
"jms/serializer-bundle": "dev-master",
And in my appKernel:
new JMS\SerializerBundle\JMSSerializerBundle($this),
I basically followed the steps.
I also can not find the file in the vendor directory. The composer stated 'Nothing to install or update' though. It does not matter if I put in a version number. Think this is the same for the stof doctrine extension.
How do I resolve this?
Setting symfony to 2.1.0 allowed me to install the extra repositories.