wikimedia / composer-merge-plugin

Merge one or more additional composer.json files at Composer runtime
MIT License
938 stars 160 forks source link

Unexpected method call setReferences #240

Open reedy opened 2 years ago

reedy commented 2 years ago

Annoying...

There were 2 errors:

1) Wikimedia\Composer\Merge\V2\MergePluginTest::testHasBranchAlias with data set "with INIT event" (true)
Prophecy\Exception\Call\UnexpectedCallException: Unexpected method call on Double\Composer\Package\RootAliasPackage\P7:
  - setReferences(
        []
    )
expected calls were:
  - getAliasOf(

    )
  - getVersion(

    )
  - getPrettyVersion(

    )
  - getMinimumStability(

    )
  - getAliases(

    )
  - getAutoload(

    )
  - getConflicts(

    )
  - getDevAutoload(

    )
  - getDevRequires(

    )
  - getExtra(

    )
  - getProvides(

    )
  - getReferences(

    )
  - getReplaces(

    )
  - getRepositories(

    )
  - getRequires(

    )
  - getStabilityFlags(

    )
  - getSuggests(

    )
  - setDevRequires(
        type(array)
    )
  - setRequires(
        type(array)
    )
  - setAutoload(
        type(array)
    )
  - setConflicts(
        type(array)
    )
  - setDevAutoload(
        type(array)
    )
  - setProvides(
        type(array)
    )
  - setReplaces(
        type(array)
    )
  - setRepositories(
        type(array)
    )
  - setStabilityFlags(
        type(array)
    )
  - setSuggests(
        type(array)
    )

2) Wikimedia\Composer\Merge\V2\MergePluginTest::testHasBranchAlias with data set "without INIT event" (true)
Prophecy\Exception\Call\UnexpectedCallException: Unexpected method call on Double\Composer\Package\RootAliasPackage\P7:
  - setReferences(
        []
    )
expected calls were:
  - getAliasOf(

    )
  - getVersion(

    )
  - getPrettyVersion(

    )
  - getMinimumStability(

    )
  - getAliases(

    )
  - getAutoload(

    )
  - getConflicts(

    )
  - getDevAutoload(

    )
  - getDevRequires(

    )
  - getExtra(

    )
  - getProvides(

    )
  - getReferences(

    )
  - getReplaces(

    )
  - getRepositories(

    )
  - getRequires(

    )
  - getStabilityFlags(

    )
  - getSuggests(

    )
  - setDevRequires(
        type(array)
    )
  - setRequires(
        type(array)
    )
  - setAutoload(
        type(array)
    )
  - setConflicts(
        type(array)
    )
  - setDevAutoload(
        type(array)
    )
  - setProvides(
        type(array)
    )
  - setReplaces(
        type(array)
    )
  - setRepositories(
        type(array)
    )
  - setStabilityFlags(
        type(array)
    )
  - setSuggests(
        type(array)
    )
reedy commented 2 years ago

Try and fix for those... Then get

There were 2 failures:

1) Wikimedia\Composer\Merge\V2\MergePluginTest::testHasBranchAlias with data set "with INIT event" (true)
Some predictions failed:
Double\Composer\Package\RootPackage\P3:
  No calls have been made that match:
      Double\Composer\Package\RootPackage\P3->setReferences(type(array))
    but expected at least one.
  No calls have been made that match:
      Double\Composer\Package\RootPackage\P3->setAliases(type(array))
    but expected at least one.

2) Wikimedia\Composer\Merge\V2\MergePluginTest::testHasBranchAlias with data set "without INIT event" (true)
Some predictions failed:
Double\Composer\Package\RootPackage\P3:
  No calls have been made that match:
      Double\Composer\Package\RootPackage\P3->setReferences(type(array))
    but expected at least one.
  No calls have been made that match:
      Double\Composer\Package\RootPackage\P3->setAliases(type(array))
    but expected at least one.
reedy commented 2 years ago

6997316575b2e7ecf583c513bda3b1f9d2a09661 and reverted in 752c740ce34d537f65814b97bb77f7d3c2382c2f