Support the ongoing development of Laravel.io →
Installation Configuration Cache
Last updated 2 years ago.
0

HI. I have the same problem.

0

Hi. Remove ../storage/framework/compiled.php

0

Yes, "php artisan clear-compiled" command does it but it is only temporary solution.

0

I played with this a bit and figured out the fix.

If you open the file "/vendor/laravel/framework/src/Illuminate/Foundation/Console/Optimize" and scroll down to line ~200 you'll see the following:

    $basePath.'/vendor/symfony/finder/Symfony/Component/Finder/Expression/Expression.php',
    $basePath.'/vendor/symfony/finder/Symfony/Component/Finder/Iterator/MultiplePcreFilterIterator.php',
    $basePath.'/vendor/symfony/finder/Symfony/Component/Finder/Iterator/PathFilterIterator.php',
    $basePath.'/vendor/symfony/finder/Symfony/Component/Finder/Iterator/ExcludeDirectoryFilterIterator.php',
    $basePath.'/vendor/symfony/finder/Symfony/Component/Finder/Iterator/RecursiveDirectoryIterator.php',
    $basePath.'/vendor/symfony/finder/Symfony/Component/Finder/Iterator/FilterIterator.php',
    $basePath.'/vendor/symfony/finder/Symfony/Component/Finder/Iterator/FileTypeFilterIterator.php',
    $basePath.'/vendor/symfony/finder/Symfony/Component/Finder/Shell/Shell.php',

Move the line ending in "FilterIterator.php" above "MultiplePcreFilterIterator.php" like so:

    $basePath.'/vendor/symfony/finder/Symfony/Component/Finder/Expression/Expression.php',
    $basePath.'/vendor/symfony/finder/Symfony/Component/Finder/Iterator/FilterIterator.php',
    $basePath.'/vendor/symfony/finder/Symfony/Component/Finder/Iterator/MultiplePcreFilterIterator.php',
    $basePath.'/vendor/symfony/finder/Symfony/Component/Finder/Iterator/PathFilterIterator.php',
    $basePath.'/vendor/symfony/finder/Symfony/Component/Finder/Iterator/ExcludeDirectoryFilterIterator.php',
    $basePath.'/vendor/symfony/finder/Symfony/Component/Finder/Iterator/RecursiveDirectoryIterator.php',
    $basePath.'/vendor/symfony/finder/Symfony/Component/Finder/Iterator/FileTypeFilterIterator.php',
    $basePath.'/vendor/symfony/finder/Symfony/Component/Finder/Shell/Shell.php',

Now you should be able to run php artisan optimize and your app will work

Last updated 9 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.