I intentionally set my error_reporting, so I see the E_DEPRECATED warnings while developing.
Now on some ocations those warnings are not shown: I successfully get the warning
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ... has a deprecated constructor
But only if the file time changed. If I reload the page, the warning is gone. If I touch the file again on the filesystem and then reload the page, it is there.
I know how to fix the error, but how do I turn this "feature" off?
What do I have to do to get the warning always?
Just don't install opcache in your docker image, so edit this line:
docker-php-ext-install -j$(nproc) intl mysqli soap gd zip opcache && \
to just
docker-php-ext-install -j$(nproc) intl mysqli soap gd zip && \
and rebuild the image.
This will work for sure, but you probably can also edit the php.ini and disable opcache there