1

We are installing several modules and receiving the message Each method must have a doc block. See Magento\Eav\Api\AttributeSetRepositoryInterface::getList() after the command php bin/magento setup:upgrade

I can see an explanation is given here about docblocks https://devdocs.magento.com/guides/v2.3/coding-standards/docblock-standard-general.html

The problem we are facing is "where and how" are we not following standards ... a warning (actually error: because Magento crashes afterwards) is give

Question: how can we debug this and find the culprit? or can Magento be more specific where it is going wrong?

Update 24-4-19: we have disabled ALL non-core modules and removed all caches then run setup:upgrade again: and still the docblock issue remains how! on earth can the error still exist .. and we have no idea where to look

Update 25-4-19: we deleted rm -rf generated/* pub/static/* vendor/*, restored code to git from fresh install, reset file permissions, then imported DB to that point in time too. Same error.

3
  • after running upgrade command rum also compile then redeploy static view files
    – fmsthird
    Apr 24, 2019 at 22:45
  • thanks question updated. But: setup:upgrade is not finishing ... we dont compile code we are in developer modus ...
    – snh_nl
    Apr 25, 2019 at 11:36
  • we've just come across this error too moving a commerce 2.3.1 site from 1 server to another. Still hunting down the cause but will watch with interest. Did you find any other potentials?
    – pixiemedia
    Apr 25, 2019 at 15:31

1 Answer 1

1

If you are running opcache (and you really should) check the value of this setting in

/etc/php.d/opcache.ini

and look for;

; If disabled, all PHPDoc comments are dropped from the code to reduce the
; size of the optimized code.
opcache.save_comments=1

That needs to be set to 1 or the docs will be removed and throw the magento error.

1
  • this is a lifesaver by chance came to the same conclusion this week. Funny apparantly more people ran into this. One other solution is to disable opcache for CLI because this is whereyou run setup:upgrade. This has never been a problem in Magento 1 and this was the reason we had this setting to 0.
    – snh_nl
    Apr 26, 2019 at 7:08

Your Answer

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

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