Skip to content

Allow using composer config to guess settings #73

Open
@nochso

Description

@nochso

I'd like to suggest a new option to parse a projects composer.json:

--composer [optional path to file]

  • All paths from the autoload section will be automatically included in a search.
  • autoload-dev could be used to exclude, as this usually points to tests and not a public API.
  • If the path is not specified, look for a composer.json in source-before/after folders.

This should help with #69 Adding/Removing a class supertype:
Instead of starting to scan all files, take the fully qualified name of the supertype and map it using the autoload mapping. I've already written such a mapper and I'd be happy to share it: given a composer.json and a FQN it will return the filepath (supports PSR-0 and PSR-4).
That way you can keep parsing only relevant files.

Also makes setup easier for a lot of users, as composer is everywhere :)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions