1

After successfully installed Magento2-stable version, when I try to run php bin/magento di:compile, It gives me below error

Interception cache generation... 6/7 [========================>---]  85% 1 hr 566.0 MiBErrors during compilation:

        WrongArgumentsOrder
                Incompatible argument type: Required type: \stdClass. Actual type: \ClassExtendsDefaultPhpType; File: vendor/magento/framework/Code/Test/Unit/Reader/_files/ClassesForArgumentsReader.php

        ArgumentsOnSeparateLines
                Incompatible argument type: Required type: \stdClass. Actual type: \ClassExtendsDefaultPhpType; File: vendor/magento/framework/Code/Test/Unit/Reader/_files/ClassesForArgumentsReader.php

        ClassArgumentAlreadyInjectedIntoContext
                Incorrect dependency in class ClassArgumentAlreadyInjectedIntoContext in E:/wamp/www/magento2stable/vendor/magento/framework/Code/Test/Unit/Validator/_files/ClassesForConstructorIntegrity.php

\ClassA already exists in context object

        ClassArgumentWrongOrderForParentArguments
                Incompatible argument type: Required type: \Context. Actual type: \ClassA; File: vendor/magento/framework/Code/Test/Unit/Validator/_files/ClassesForConstructorIntegrity.php

        ClassArgumentWithWrongParentArgumentsType
                Incompatible argument type: Required type: array. Actual type: \ClassB; File: vendor/magento/framework/Code/Test/Unit/Validator/_files/ClassesForConstructorIntegrity.php

        ClassArgumentAlreadyInjectedInContext
                Incorrect dependency in class ClassArgumentAlreadyInjectedInContext in E:/wamp/www/magento2stable/vendor/magento/framework/Code/Test/Unit/Validator/_files/ClassesForContextAggregation.php

\ClassFirst already exists in context object

        ClassArgumentWithAlreadyInjectedInterface
                Incorrect dependency in class ClassArgumentWithAlreadyInjectedInterface in E:/wamp/www/magento2stable/vendor/magento/framework/Code/Test/Unit/Validator/_files/ClassesForContextAggregaton.php

\InterfaceFirst already exists in context object

        Magento\SomeModule\Model\Five\Test
                Missed required argument factory in parent::__construct call. File: E:/wamp/www/magento2stable/vendor/magento/framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Five/Test.php

        Magento\SomeModule\Model\Four\Test
                Extra parameters passed to parent construct: $factory. File: E:/wamp/www/magento2stable/vendor/magento/framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Four/Test.php

        Magento\SomeModule\Model\Six\Test
                Incompatible argument type: Required type: \Magento\SomeModule\Model\Proxy. Actual type: \Magento\SomeModule\Model\ElementFactory; File: vendor/magento/framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Six/Test.php

Total Errors Count: 10

Errors during compilation:
        WrongArgumentsOrder
                Incompatible argument type: Required type: \stdClass. Actual type: \ClassExtendsDefaultPhpType; File: vendor/magento/framework/Code/Test/Unit/Reader/_files/ClassesForArgumentsReader.php

        ArgumentsOnSeparateLines
                Incompatible argument type: Required type: \stdClass. Actual type: \ClassExtendsDefaultPhpType; File: vendor/magento/framework/Code/Test/Unit/Reader/_files/ClassesForArgumentsReader.php

        ClassArgumentAlreadyInjectedIntoContext
                Incorrect dependency in class ClassArgumentAlreadyInjectedIntoContext in E:/wamp/www/magento2stable/vendor/magento/framework/Code/Test/Unit/Validator/_files/ClassesForConstructorIntegrity.php

\ClassA already exists in context object

        ClassArgumentWrongOrderForParentArguments
                Incompatible argument type: Required type: \Context. Actual type: \ClassA; File: vendor/magento/framework/Code/Test/Unit/Validator/_files/ClassesForConstructorIntegrity.php

        ClassArgumentWithWrongParentArgumentsType
                Incompatible argument type: Required type: array. Actual type: \ClassB; File: vendor/magento/framework/Code/Test/Unit/Validator/_files/ClassesForConstructorIntegrity.php

        ClassArgumentAlreadyInjectedInContext
                Incorrect dependency in class ClassArgumentAlreadyInjectedInContext in E:/wamp/www/magento2stable/vendor/magento/framework/Code/Test/Unit/Validator/_files/ClassesForContextAggregation.php

\ClassFirst already exists in context object

        ClassArgumentWithAlreadyInjectedInterface
                Incorrect dependency in class ClassArgumentWithAlreadyInjectedInterface in E:/wamp/www/magento2stable/vendor/magento/framework/Code/Test/Unit/Validator/_files/ClassesForContextAggregation.php

\InterfaceFirst already exists in context object

        Magento\SomeModule\Model\Five\Test
                Missed required argument factory in parent::__construct call. File: E:/wamp/www/magento2stable/vendor/magento/framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Five/Test.php

        Magento\SomeModule\Model\Four\Test
                Extra parameters passed to parent construct: $factory. File: E:/wamp/www/magento2stable/vendor/magento/framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Four/Test.php

        Magento\SomeModule\Model\Six\Test
                Incompatible argument type: Required type: \Magento\SomeModule\Model\Proxy. Actual type: \Magento\SomeModule\Model\ElementFactory; File: vendor/magento/framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/Six/Test.php

Total Errors Count: 10

Can any one have faced the same error while di:compile?

1

It is a bug, I have already reported it on GutHub a week ago: https://github.com/magento/magento2/issues/2365

  • In stable version still it show the error? And Have you solved this error ? – Keyur Shah Nov 20 '15 at 9:29
  • 1
    My Magento 2 works in the Developer mode and does the compilation automatically on demand (on the first page load), so I just do no use di:compile yet. – Mage2.PRO Nov 20 '15 at 9:32
  • If I don't run this commnad and when I try to run php bin/magento setup:upgrade, then it gives me error like ,, Please re-run Magento compile command – Keyur Shah Nov 20 '15 at 9:39
  • 1
    Just ignore the message "Please re-run Magento compile command". – Mage2.PRO Nov 20 '15 at 9:46
  • 1
    Run php bin/magento setup:upgrade but ignore the "Please re-run Magento compile command" message – Mage2.PRO Nov 20 '15 at 9:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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