anime-db / anime-db

Anime DB

Home Page:http://anime-db.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Insight] Absolute path constants __DIR__ and __FILE__ should not be used

peter-gribanov opened this issue · comments

in src/Event/Dispatcher.php, line 60

__DIR__ and __FILE__ constants may conflict with the Symfony resource overriding system

    /**
     * Shipping deferred events
     */
    public function shippingDeferredEvents()
    {
        if ($this->driver && file_exists(__DIR__.self::EVENTS_DIR)) {
            $finder = new Finder();
            $finder->files()->in(__DIR__.self::EVENTS_DIR)->name('*.meta')->sortByName();

            /* @var $file \Symfony\Component\Finder\SplFileInfo */
            foreach ($finder as $file) {