If I clone a fresh copy of magento2 and run vendor/bin/phpunit -c dev/tests/static/phpunit.xml.dist, the ComposerTest fails because each packaged module has a 'version' property.

Version must not be specified in the root and package composer JSON files in Git
Failed asserting that object of class "stdClass" does not have attribute "version".

Am I missing something? I could mark the ComposerTest as skipped but it seems a bit messy. Does php bin/magento dev:tests:run static handle multiple composer files any better?

1 Answer 1


It emerged that, on older branches of magento/magento2, Magento modules specify a version in their composer files, which results in the above error. However, on the latest 2.3-develop branch the composer files do not display a version and therefore pass the ComposerTest - so I'm testing against that going forward.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.