I need install Guzzle 6 in Laravel 5.6.
I run this code:
composer require php-http/guzzle6-adapter
But after run this code, show error:
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 3 installs, 0 updates, 0 removals
- Installing guzzlehttp/promises (v1.3.1): Downloading (100%)
- Installing guzzlehttp/guzzle (6.3.2): Downloading (100%)
- Installing php-http/guzzle6-adapter (v1.1.1): Downloading (100%)
Writing lock file
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> #php artisan package:discover
PHP Fatal error: Uncaught ReflectionException: Class
App\Console\Kernel does not exist in
/vendor/laravel/framework/src/Illuminate/Container/Container.php:767
Stack trace:
#0
/vendor/laravel/framework/src/Illuminate/Container/Container.php(767):
ReflectionClass->__construct('App\\Console\\Ker...')
#1
/vendor/laravel/framework/src/Illuminate/Container/Container.php(646):
Illuminate\Container\Container->build('App\\Console\\Ker...')
#2
vendor/laravel/framework/src/Illuminate/Container/Container.php(601):
Illuminate\Container\Container->resolve('App\\Console\\Ker...', Array)
#3 /ven
dor/laravel/framework/src/Illuminate/Foundation/Application.php(740):
Illuminate\Container\Container->make('App\\Console\\Ker...', Array)
#4
/vendor/laravel/framework/src/Illuminate/Container/Container.php(256):
Illuminate\Foundation\Appl in
/vendor/laravel/framework/src/Illuminate/Container/Container.php on
line 767
Script #php artisan package:discover handling the post-autoload-dump
event returned with error code 255
I wanted install mailgun pakage in laravel 5.6.
Update 1:
My Composer.json file is this code:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=7.1.3",
"bogardo/mailgun": "^5.0",
"cviebrock/eloquent-sluggable": "^4.5",
"fideloper/proxy": "~4.0",
"intervention/image": "^2.4",
"laravel/framework": "5.6.*",
"laravel/tinker": "~1.0",
"laravelcollective/html": "^5.6",
"php-http/guzzle6-adapter": "^1.1",
"pusher/pusher-php-server": "^3.0",
"uxweb/sweet-alert": "^1.4"
},
"require-dev": {
"filp/whoops": "~2.0",
"nunomaduro/collision": "~1.1",
"fzaninotto/faker": "~1.4",
"mockery/mockery": "~1.0",
"phpunit/phpunit": "~7.0",
"symfony/thanks": "^1.0"
},
"aXutoload": {
"classmap": [
"database/seeds",
"database/factories"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"extra": {
"laravel": {
"dont-discover": [
]
}
},
"scripts": {
"post-root-package-install": [
"#php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"#php artisan key:generate"
],
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"#php artisan package:discover"
]
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
},
"minimum-stability": "dev",
"prefer-stable": true
}
I need install Guzzle 6 in Laravel 5.6.
I use this package: https://packalyst.com/packages/package/bogardo/mailgun
How to issue this problem?
You must remove X in "aXutoload": !!!!!!
This is normally solved by doing this:
php artisan config:clear
php artisan cache:clear
composer dump-autoload
Related
I have a blank Laravel 9 install. The only extensions added are jetstream and livewire. I am trying to install spatie/laravel-comments package, but I get the following error.
Your requirements could not be resolved to an installable set of
packages.
Problem 1
- Root composer.json requires spatie/laravel-comments ^0.0.2 -> satisfiable by spatie/laravel-comments[0.0.2].
- spatie/laravel-comments 0.0.2 requires illuminate/contracts ^8.73 -> found illuminate/contracts[v8.73.0, ..., 8.x-dev] but these
were not loaded, likely because it conflicts with another require.
You can also try re-running composer require with an explicit version
constraint, e.g. "composer require spatie/laravel-comments:*" to
figure out if any version is installable, or "composer require
spatie/laravel-comments:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to
their original content.
The same error occurs if I specify a version to install or leave it open for latest. I have tried removing the composer.lock file and reinstalling everything, my composer.json looks like.
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"php": "^8.0.2",
"guzzlehttp/guzzle": "^7.2",
"laravel/framework": "^9.11",
"laravel/jetstream": "^2.8",
"laravel/sanctum": "^2.14.1",
"laravel/tinker": "^2.7",
"livewire/livewire": "^2.10"
},
"require-dev": {
"fakerphp/faker": "^1.9.1",
"laravel/sail": "^1.0.1",
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^6.1",
"phpunit/phpunit": "^9.5.10",
"spatie/laravel-ignition": "^1.0"
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"#php artisan package:discover --ansi"
],
"post-update-cmd": [
"#php artisan vendor:publish --tag=laravel-assets --ansi --force"
],
"post-root-package-install": [
"#php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"#php artisan key:generate --ansi"
]
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"minimum-stability": "dev",
"prefer-stable": true
}
Versions I'm using are:
composer -v = 2.4
php -v 8.1.3
and I'm on Windows
I've faced this issue once, and i think you need to run this command only
composer update
Hope this will fix.
and for Spatie installation you can find everything here SPATIE Installation
As you can see on the package's packagist overview, the package is not compatible with Laravel 9. But that is not the largest problem of that package: it is no longer available on Github, so downloading the code might fail.
You should use any other package that suits your needs, or contact the maintainers. Maybe Spatie will re-publish it, and make it compatible with Laravel 9?
I'm getting this error while installing Laravel Scout:
Problem 1
- laravel/scout[v9.1.0, ..., 9.x-dev] require illuminate/bus ^8.0 -> found illuminate/bus[v8.0.0, ..., 8.x-dev] but these were not loaded, likely because it conflicts with another require.
- Root composer.json requires laravel/scout ^9.1 -> satisfiable by laravel/scout[v9.1.0, 9.x-dev].
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Here is my composer.json file:
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.2.5|^8.0",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^6.3.1|^7.0.1",
"laravel/framework": "^7.29",
"laravel/tinker": "^2.5",
"laravel/ui": "^2.4"
},
"require-dev": {
"facade/ignition": "^2.0",
"fakerphp/faker": "^1.9.1",
"mockery/mockery": "^1.3.1",
"nunomaduro/collision": "^4.3",
"phpunit/phpunit": "^8.5.8|^9.3.3"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"psr-4": {
"App\\": "app/"
},
"classmap": [
"database/seeds",
"database/factories"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"#php artisan package:discover --ansi"
],
"post-root-package-install": [
"#php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"#php artisan key:generate --ansi"
]
}
}
In your composer you have "laravel/framework": "^7.29", wich is equivalent to >=7.29 <8.0.0 but you're requiring illuminate/bus[v8.0.0, ..., 8.x-dev] wich is part of laravel/framework >=8.0.0
So, you can't install laravel scount version >= 9.0
try installing version 8.6.1 wich is compatible with laravel 7.x with the command:
composer require "laravel/scout:^8.6.1"
You should just install ext-xml
sudo apt-get install php-xml
sudo apt-get install php-curl
I need to install guzzlehttp/guzzle to work with stripe in laravel 5.8 app but I got
error with installing :
$ composer require guzzlehttp/guzzle
Warning from https://repo.packagist.org: You are using an outdated version of Composer. Composer 2 is now available and you should upgrade. See https://getcomposer.org/2
Using version ^7.2 for guzzlehttp/guzzle
./composer.json has been updated
Loading composer repositories with package information
Warning from https://repo.packagist.org: You are using an outdated version of Composer. Composer 2 is now available and you should upgrade. See https://getcomposer.org/2
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for php-http/guzzle6-adapter (locked at v1.1.1, required as ^1.0) -> satisfiable by php-http/guzzle6-adapter[v1.1.1].
- Can only install one of: guzzlehttp/guzzle[7.2.0, 6.5.x-dev].
- Can only install one of: guzzlehttp/guzzle[7.3.x-dev, 6.5.x-dev].
- Conclusion: install guzzlehttp/guzzle 6.5.x-dev
- Installation request for guzzlehttp/guzzle ^7.2 -> satisfiable by guzzlehttp/guzzle[7.2.0, 7.3.x-dev].
My composer.json has :
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.2",
"clarification/sendgrid-laravel-driver": "^2.0",
"darkaonline/l5-swagger": "5.8.*",
"fideloper/proxy": "^4.0",
"jenssegers/agent": "^2.6",
"laravel/framework": "5.8.38",
"laravel/tinker": "^1.0",
"martinlindhe/laravel-vue-i18n-generator": "^0.1.46",
"paragonie/sodium_compat": "^1.14",
"php-http/guzzle6-adapter": "^1.0",
"guzzlehttp/guzzle": "^5.x",
"pusher/pusher-php-server": "^4.1.1",
"stripe/stripe-php": "^7.50",
"tintnaingwin/email-checker": "^2.0",
"spatie/browsershot": "^3.37",
"twilio/sdk": "^5.42"
},
"require-dev": {
"beyondcode/laravel-dump-server": "^1.0",
"filp/whoops": "^2.0",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^3.0",
"phpunit/phpunit": "^7.5"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"files": [
"app/library/helper.php"
],
"psr-4": {
"App\\": "app/"
},
"classmap": [
"database/seeds",
"database/factories"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"#php artisan package:discover --ansi"
],
"post-root-package-install": [
"#php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"#php artisan key:generate --ansi"
]
}
}
I use PHP 7.4.15 .
How can it be fixed ?
Thanks!
You have to update the version of your guzzlehttp/guzzle becasue it is required by php version
Try to Change "guzzlehttp/guzzle": "^5.x" to this "guzzlehttp/guzzle": "^7.2.0" and then run composer update and your current php version is ^7.2
you can find more about it in here https://packagist.org/packages/guzzlehttp/guzzle#6.5.5
There is a conflict with the lastest version, use this instead
composer require guzzlehttp/guzzle:^7.0
I'm trying to update my composer dependencies as I'm experiencing a weird error that in my Debug Pages I get the Symfony Page but not the Laravel one. As I tried to update my composer packages I saw that composer doens't even updates the laravel/framework package.
Composer output
Discovered Package: fideloper/proxy
Discovered Package: fruitcake/laravel-cors
Discovered Package: laravel/tinker
Discovered Package: nesbot/carbon
Package manifest generated successfully.
Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Nothing to install, update or remove
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> #php artisan package:discover --ansi
39 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
composer.json
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.2.5",
"fideloper/proxy": "^4.2",
"fruitcake/laravel-cors": "^1.0",
"guzzlehttp/guzzle": "^6.3",
"laravel/framework": "^7.0",
"laravel/tinker": "^2.0",
"ext-json": "*"
},
"require-dev": {
"facade/ignition": "^2.0",
"fzaninotto/faker": "^1.9.1",
"mockery/mockery": "^1.3.1",
"nunomaduro/collision": "^4.1",
"phpunit/phpunit": "^8.5"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"psr-4": {
"App\\": "app/"
},
"classmap": [
"database/seeds",
"database/factories"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"#php artisan package:discover --ansi"
],
"post-root-package-install": [
"#php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"#php artisan key:generate --ansi"
]
}
}
I'm using Plesk and can't access SSH.
I run php artisan config:clear or php artisan cache:clear or composer dump-autoload But show this error:
PHP Fatal error: Uncaught ReflectionException: Class App\Console\Kernel does not exist in
vendor/laravel/framework/src/Illuminate/Container/Container.php:767
Stack trace:
#0
vendor/laravel/framework/src/Illuminate/Container/Container.php(767): ReflectionClass->__construct('App\\Console\\Ker...')
#1
vendor/laravel/framework/src/Illuminate/Container/Container.php(646):
Illuminate\Container\Container->build('App\\Console\\Ker...')
#2
vendor/laravel/framework/src/Illuminate/Container/Container.php(601):
Illuminate\Container\Container->resolve('App\\Console\\Ker...', Array)
#3
vendor/laravel/framework/src/Illuminate/Foundation/Application.php(734):
Illuminate\Container\Container->make('App\\Console\\Ker...', Array)
#4
vendor/laravel/framework/src/Illuminate/Container/Container.php(256):
Illuminate\Foundation\Appl in
vendor/laravel/framework/src/Illuminate/Container/Container.php on
line 767
Laravel version is 5.6
I run php artisan config:clear or php artisan cache:clear or composer dump-autoload.
Show this error after run php artisan config:clear
Update 1:
My Composer.json file is this code:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=7.1.3",
"bogardo/mailgun": "^5.0",
"cviebrock/eloquent-sluggable": "^4.5",
"fideloper/proxy": "~4.0",
"intervention/image": "^2.4",
"laravel/framework": "5.6.*",
"laravel/tinker": "~1.0",
"laravelcollective/html": "^5.6",
"php-http/guzzle6-adapter": "^1.1",
"pusher/pusher-php-server": "^3.0",
"uxweb/sweet-alert": "^1.4"
},
"require-dev": {
"filp/whoops": "~2.0",
"nunomaduro/collision": "~1.1",
"fzaninotto/faker": "~1.4",
"mockery/mockery": "~1.0",
"phpunit/phpunit": "~7.0",
"symfony/thanks": "^1.0"
},
"aXutoload": {
"classmap": [
"database/seeds",
"database/factories"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"extra": {
"laravel": {
"dont-discover": [
]
}
},
"scripts": {
"post-root-package-install": [
"#php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"#php artisan key:generate"
],
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"#php artisan package:discover"
]
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
},
"minimum-stability": "dev",
"prefer-stable": true
}
This file is My composer.json.
How to issue this problem?
I got this same issue, to solve it delete the file config.php in bootstrap/cache, but if you run command php artisan config:cache,the same error will reappear
From Laravel doc
Laravel ^5.5
#php Blade Directive
The #php blade directive no longer accepts inline tags. Instead, use the full form of the directive:
#php
$teamMember = true;
#endphp
rename bootstrap/cache/config_old.php and also rename routes-v-old.php
i hope you got your solution .