I recently tried creating a new Laravel project using the laravel new command and going to the {projectname}.test domain returns the error Deprecated: Method ReflectionParameter::getClass() is deprecated in /Users/.../blog/vendor/laravel/framework/src/Illuminate/Container/Container.php
I have my computer's version of php 7.4 required in my composer.json file and I am using Laravel Installer 4.2.4. My projects created in a CMS built with Laravel all show up fine when typing their .test domains so I'm not sure what is wrong with this installation/the Illuminate container. Any advice greatly appreciated, thanks!
Related
I am new to Lumen so I just downloaded and installed a fresh lumen setup but unfortunately as soon as I hit postman it sends me above error. I have read many posts all says to use isset() i did so but still error persists therefore i request to help me.
Composer update also does not work.
Thanks!
It seems to be an issue between your version of PHP and Lumen 5.*
I found something here https://github.com/DarkaOnLine/SwaggerLume/issues/82
This worked for me
// in bootstrap/app.php
$app->configure('view');
I had create 3 laravel projetcs for versions 5.8, 6.* and 7.*.
$this->withoutExceptionHandling() doesn't work, i got "Call to undefined method". It only works on the v5.8 installation. It have been removed from newers versions of laravel?
ty
I have a project which is developed in laravel 5.1 now which client wants some updates where he want to upgrade laravel version to 5.8 but and to add some new functionality but this is 2nd issue 1st issue this terminal is throwing the error of each when run php srtisan
C:\xampp\zerodocs>php artisan
[ErrorException]
The each() function is deprecated. This message will be suppressed on further calls
The PHP each() function was deprecated in PHP 7.2. It seems you are using PHP 7.2 or higher. You will need to follow the upgrade guides and use composer to upgrade from Laravel 5.1 to 5.8.
https://laravel.com/docs/5.3/upgrade
https://laravel.com/docs/5.4/upgrade
https://laravel.com/docs/5.5/upgrade
https://laravel.com/docs/5.6/upgrade
https://laravel.com/docs/5.7/upgrade
https://laravel.com/docs/5.8/upgrade
Or, you will need switch to a compatible PHP version (e.g., PHP >= 5.5.9 as mentioned in the documentation for Laravel 5.1) to use the application.
i have installed the chat package:
https://github.com/dazzz1er/confer
Unfortunately i get an error when i try to publish it. Here is the error:
[Symfony\Component\Debug\Exception\FatalErrorException]
Call to undefined method Illuminate\Support\Facades\View::composer()
Thanks !
As correctly pointed out by #curious_coder confer is not compatible with Laravel 5.2 yet. Please keep an on the open Laravel 5.2 issue on Github and/or ask the author of this package for updates.
I am using Laravel 5.0.3 for one project few days ago. Now I create another project using the same version but I noticed the declaration (or whatever you call it) has changed from something like:
'Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode'
to
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class
and this is actually causing an FatalError. My idea is that this is something to do with the php version, but I don't want to update just yet.
What options do I have to sort this issue?
It's called class name resolution and a new feature that is implemented in PHP 5.5. The reason that you are getting that error is your PHP version of your PHP interpreter should be lower than PHP 5.5. Don't forget that Laravel 5.1 LTS package requires PHP 5.5.9 version minimum. You can keep your old configuration as 'Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode' instead of \Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class. But first, you should also downgrade your Laravel version from 5.1 to 5. Better and recommended is to upgrade your PHP version as PHP 5.4 will be soon deprecated.