Exception during phrase collection

In case you are getting this error during Magento 2 phrase collection:

In Phrase.php line 90:

Missed phrase

you can be sure there is at least one phrase empty in your code. Magento consides any __('') as empty phrase. You can find it by running:

grep -rnw -E -i "__\((""|'')\)" app/

from your Magento root directory. This will find all empty phrases in your code.

You may also like

Unit testing Magento 1

Writing unit tests for Magento 1 running in Docker Container

XSD validation in your IDE

Validate your XML files against Magento 2 XSD schemas

Debugging Magento CLI running in Docker container

Debugging Magento CLI running in Docker container

An error "Missed phrase" during Magento 2 phrase collection

Exception during phrase collection

Magento release 2.4.6 - what's new

New release of Magento 2

Mailhog PHP sendmail path configuration

Sending mails from PHP within Docker with Mailhog

Our Pimcore 11 upgrade notes

What we learned during upgrading Pimcore 10.x to 11.x