Support
Quality
Security
License
Reuse
kandi has reviewed framework and discovered the below as its top functions. This is intended to give you an instant insight into framework implemented functionality, and help decide if they suit your requirements.
Get all kandi verified functions for this library.
Get all kandi verified functions for this library.
Simple, fast routing engine.
Powerful dependency injection container.
Multiple back-ends for session and cache storage.
Database agnostic schema migrations.
Robust background job processing.
Real-time event broadcasting.
See all related Code Snippets
QUESTION
Error: While updating laravel 8 to 9. Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
Asked 2022-Mar-29 at 06:51Nothing to install, update or remove Generating optimized autoload files Class App\Helpers\Helper located in C:/wamp64/www/vuexylaravel/app\Helpers\helpers.php does not comply with psr-4 autoloading standard. Skipping. > Illuminate\Foundation\ComposerScripts::postAutoloadDump > @php artisan package:discover --ansi
Error
Undefined constant Illuminate\Http\Request::HEADER_X_FORWARDED_ALL
at C:\wamp64\www\vuexylaravel\vendor\fideloper\proxy\config\trustedproxy.php:48
44▕ * - 'HEADER_X_FORWARDED_AWS_ELB' (If you are using AWS Elastic Load Balancer)
45▕ *
46▕ * @link https://symfony.com/doc/current/deployment/proxies.html
47▕ */
➜ 48▕ 'headers' => Illuminate\Http\Request::HEADER_X_FORWARDED_ALL,
49▕
50▕ ];
51▕
1 C:\wamp64\www\vuexylaravel\vendor\laravel\framework\src\Illuminate\Support\ServiceProvider.php:138
require()
2 C:\wamp64\www\vuexylaravel\vendor\fideloper\proxy\src\TrustedProxyServiceProvider.php:28
Illuminate\Support\ServiceProvider::mergeConfigFrom("C:\wamp64\www\vuexylaravel\vendor\fideloper\proxy\config\trustedproxy.php", "trustedproxy")
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
ANSWER
Answered 2022-Feb-13 at 17:35If you are upgrading your Laravel 8 project to Laravel 9 by importing your existing application code into a totally new Laravel 9 application skeleton, you may need to update your application's "trusted proxy" middleware.
Within your app/Http/Middleware/TrustProxies.php file, update use Fideloper\Proxy\TrustProxies as Middleware to use Illuminate\Http\Middleware\TrustProxies as Middleware.
Next, within app/Http/Middleware/TrustProxies.php, you should update the $headers property definition:
// Before...
protected $headers = Request::HEADER_X_FORWARDED_ALL;
// After...
protected $headers =
Request::HEADER_X_FORWARDED_FOR |
Request::HEADER_X_FORWARDED_HOST |
Request::HEADER_X_FORWARDED_PORT |
Request::HEADER_X_FORWARDED_PROTO |
Request::HEADER_X_FORWARDED_AWS_ELB;
then run
composer update
Make sure you are using PHP 8.0
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
No vulnerabilities reported
Save this library and start creating your kit
See Similar Libraries in
Save this library and start creating your kit
Open Weaver – Develop Applications Faster with Open Source