Skip to content

Illuminate\Foundation\Console\ClearCompiledCommand uses methods not defined in contract #8229

@dankobiaka

Description

@dankobiaka

See https://github.com/laravel/framework/blob/5.0/src/Illuminate/Foundation/Console/ClearCompiledCommand.php#L28

Illuminate\Foundation\Console\ClearCompiledCommand::fire() uses two methods that are actually not part of the Illuminate\Contracts\Foundation\Application interface:

$compiledPath = $this->laravel->getCachedCompilePath(); $servicesPath = $this->laravel->getCachedServicesPath();

As the command objects depend on the Application contract / interface only (https://github.com/laravel/framework/blob/5.0/src/Illuminate/Console/Command.php#L382), not the Illuminate\Foundation\Application implementation, should any commands rely on methods not available in the interface?

The ClearCompiledCommand::fire() seems to be tightly-coupled to the implementation class, not the interface.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions