Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

zaster's avatar

Laravel 5.5 - Php artisan issue

I am back to an old laravel project of mine and i can't run any php artisan commands

When i run php artisan in my development environment, this is what i get

Deprecated: Return type of Illuminate\Container\Container::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in myproject_path\vendor\laravel\framework\src\Illuminate\Container\Container.php on line 1182        

Deprecated: Return type of Illuminate\Container\Container::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in myproject_path\vendor\laravel\framework\src\Illuminate\Container\Container.php on line 1193

Deprecated: Return type of Illuminate\Container\Container::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, 
or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in myproject_path\vendor\laravel\framework\src\Illuminate\Container\Container.php on line 1205

Deprecated: Return type of Illuminate\Container\Container::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in myproject_path\vendor\laravel\framework\src\Illuminate\Container\Container.php on line 1218

Deprecated: Method ReflectionParameter::getClass() is deprecated in myproject_path\vendor\laravel\framework\src\Illuminate\Container\Container.php on line 811

Deprecated: Method ReflectionParameter::getClass() is deprecated in myproject_path\vendor\laravel\framework\src\Illuminate\Container\Container.php on line 885

Deprecated: Method ReflectionParameter::getClass() is deprecated in myproject_path\vendor\laravel\framework\src\Illuminate\Container\Container.php on line 811

Deprecated: Method ReflectionParameter::getClass() is deprecated in myproject_path\vendor\laravel\framework\src\Illuminate\Container\Container.php on line 885

Deprecated: auto_detect_line_endings is deprecated in myproject_path\vendor\vlucas\phpdotenv\src\Loader.php on line 168

Deprecated: Return type of Illuminate\Config\Repository::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in myproject_path\vendor\laravel\framework\src\Illuminate\Config\Repository.php on line 141

Deprecated: Return type of Illuminate\Config\Repository::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in myproject_path\vendor\laravel\framework\src\Illuminate\Config\Repository.php on line 152

Deprecated: Return type of Illuminate\Config\Repository::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in myproject_path\vendor\laravel\framework\src\Illuminate\Config\Repository.php on line 
164

Deprecated: Return type of Illuminate\Config\Repository::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in myproject_path\vendor\laravel\framework\src\Illuminate\Config\Repository.php on line 175

Deprecated: Return type of Symfony\Component\Finder\Finder::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in myproject_path\vendor\symfony\finder\Finder.php on line 566

Deprecated: Return type of Symfony\Component\Finder\Finder::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should 
be used to temporarily suppress the notice in myproject_path\vendor\symfony\finder\Finder.php on line 637

Deprecated: Return type of Symfony\Component\Finder\Iterator\FilterIterator::rewind() should either be compatible with FilterIterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in myproject_path\vendor\symfony\finder\Iterator\FilterIterator.php on line 32

Deprecated: Return type of Symfony\Component\Finder\Iterator\FileTypeFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in myproject_path\vendor\symfony\finder\Iterator\FileTypeFilterIterator.php on line 42

Deprecated: Return type of Symfony\Component\Finder\Iterator\RecursiveDirectoryIterator::getChildren() should either be compatible with RecursiveDirectoryIterator::getChildren(): RecursiveDirectoryIterator, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in myproject_path\vendor\symfony\finder\Iterator\RecursiveDirectoryIterator.php on line 89

Deprecated: Return type of Symfony\Component\Finder\Iterator\RecursiveDirectoryIterator::rewind() should either be compatible with FilesystemIterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in myproject_path\vendor\symfony\finder\Iterator\RecursiveDirectoryIterator.php on line 117   

Deprecated: Return type of Symfony\Component\Finder\Iterator\RecursiveDirectoryIterator::current() should either be compatible with FilesystemIterator::current(): SplFileInfo|FilesystemIterator|string, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in myproject_path\vendor\symfony\finder\Iterator\RecursiveDirectoryIterator.php on line 65

Deprecated: Return type of Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in myproject_path\vendor\symfony\finder\Iterator\ExcludeDirectoryFilterIterator.php on line 55
Deprecated: Return type of Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator::hasChildren() should either be compatible with RecursiveIterator::hasChildren(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in myproject_path\vendor\symfony\finder\Iterator\ExcludeDirectoryFilterIterator.php on line 71

Deprecated: Return type of Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator::getChildren() should either be compatible with RecursiveIterator::getChildren(): ?RecursiveIterator, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in myproject_path\vendor\symfony\finder\Iterator\ExcludeDirectoryFilterIterator.php on line 76

Deprecated: Return type of Symfony\Component\Finder\Iterator\FilterIterator::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in myproject_path\vendor\symfony\finder\Iterator\FilterIterator.php on line 32

Deprecated: Return type of Symfony\Component\Finder\Iterator\FilenameFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in myproject_path\vendor\symfony\finder\Iterator\FilenameFilterIterator.php on line 28

Deprecated: Return type of Symfony\Component\Finder\Iterator\PathFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in myproject_path\vendor\symfony\finder\Iterator\PathFilterIterator.php on line 27
0 likes
4 replies
Snapey's avatar
Snapey
Best Answer
Level 122

You need to run with php7.4 at the command line.

zaster's avatar

@snapey I get your point, the php version i am using currently is not php 7.4 It is php 8.1..13 I need to change it(trying to figure it out..)

Anyway how do you specifically say php 7.4 ? when this

https://laravel.com/docs/5.5

says

PHP >= 7.0.0

Snapey's avatar

@zaster you can install a version less than 7.4 if you can get hold of it. The point is, you can't run php 8

Windows or Mac?

Please or to participate in this conversation.