The method getAvailableVersion does only exist in BringYourOwnIdeas\Update...ComposerUpdateExtension, but not in Package.
It seems like the method you are trying to call exists only in some of the
possible types.
Let’s take a look at an example:
classA{publicfunctionfoo(){}}classBextendsA{publicfunctionbar(){}}/** * @param A|B $x */functionsomeFunction($x){$x->foo();// This call is fine as the method exists in A and B.$x->bar();// This method only exists in B and might cause an error.}
The method assertEmpty() does not seem to exist on object<BringYourOwnIdeas...serUpdateExtensionTest>.
This check looks for calls to methods that do not seem to exist on a given type.
It looks for the method on the type itself as well as in inherited classes or
implemented interfaces.
This is most likely a typographical error or the method has been renamed.
The method getAvailableVersion does only exist in BringYourOwnIdeas\Update...ComposerUpdateExtension, but not in Package.
It seems like the method you are trying to call exists only in some of the
possible types.
Let’s take a look at an example:
classA{publicfunctionfoo(){}}classBextendsA{publicfunctionbar(){}}/** * @param A|B $x */functionsomeFunction($x){$x->foo();// This call is fine as the method exists in A and B.$x->bar();// This method only exists in B and might cause an error.}
The method assertSame() does not seem to exist on object<BringYourOwnIdeas...serUpdateExtensionTest>.
This check looks for calls to methods that do not seem to exist on a given type.
It looks for the method on the type itself as well as in inherited classes or
implemented interfaces.
This is most likely a typographical error or the method has been renamed.
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: