Skip to content
This repository was archived by the owner on Dec 9, 2019. It is now read-only.
This repository was archived by the owner on Dec 9, 2019. It is now read-only.

Installing along with extensions installs phpstan/phpstan as well #2

@jiripudil

Description

@jiripudil

What is the problem

provide doesn't work as expected. Consider this:

$ composer require --dev phpstan/phpstan-shim phpstan/phpstan-nette

It installs both phpstan-shim and phpstan. As a result, the bundled code only loads the
application's autoloader from cwd, which, obviously, fails to load the prefixed classes.

$ composer why phpstan/phpstan
phpstan/phpstan-nette  0.7  requires  phpstan/phpstan (^0.7)

What seems to be the cause

Looking at the docs, provide section talks about virtual packages, which would explain why there is one called phpstan/phpstan on packagist:

snimek obrazovky 2017-05-15 v 16 07 19

However, Composer seems to install the real package of the same name.

What could be the solution

Maybe replace would do the trick instead of provide?

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