Services/RouteCache.php
public function clear()
    {
        $finder = new Finder();

        /** @var \Symfony\Component\Finder\SplFileInfo $file */
        foreach ($finder->files()->in($this->cacheDir)->depth(0)->name(self::CACHE_PATH_REGEX) as $file) {
            @unlink($file->getRealPath());
        }
    }
public function clear()
    {
        $finder = new Finder();

        /** @var \Symfony\Component\Finder\SplFileInfo $file */
        foreach ($finder->files()->in($this->cacheDir)->depth(0)->name(self::CACHE_PATH_REGEX) as $file) {
            @unlink($file->getRealPath());
        }
    }
public function clear ( ) { $ finder = new Finder ( ) ; /** @var \Symfony\Component\Finder\SplFileInfo $file */ foreach ( $ finder -> files ( ) -> in ( $ this -> cacheDir ) -> depth ( 0 ) -> name ( self :: CACHE_PATH_REGEX ) as $ file ) { @ unlink ( $ file -> getRealPath ( ) ) ; } }
The routing cache needs to be cleared after a change.
This is faster then clearing the cache with the responsible command.
The routing cache needs to be cleared after a change . This is faster then clearing the cache with the responsible command .