Skip to content
This repository was archived by the owner on Nov 28, 2022. It is now read-only.
This repository was archived by the owner on Nov 28, 2022. It is now read-only.

Classes of PHP extensions not detected via composer ext-* #28

Description

@marc-mabe

I have the following in my composer.json

    "require": {
        "ext-ds": "*",
    }

but I still get an error if I'm using Ds\\* classes:
App must only depend on dependencies in /app/tests/../composer.json (/app/tests/../composer.lock) but XXX depends on Ds\Map.

As workaround I had to add Ds\\ as explicitly allowed dependency:

        $composerParser = new ComposerFileParser(__DIR__ . '/../composer.json');
        $validator      = new MustOnlyDependOnComposerDependencies('App\\', $composerParser);

        // ext-ds is not listed as dev dependency
        $validator = new ExplicitlyAllowDependency($validator, 'App\\', 'Ds\\');

        $this->phpArch->validate($validator);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions