Cookbook

Logger and error reporting level

phpdocx includes logging messages to debug the library. Any PSR-3 logging library can be used (such as Monolog).

To use a logging library, it must be enabled:

The default error reporting level used by phpdocx for PHP 8 versions is:

E_ALL & ~E_NOTICE & ~E_DEPRECATED

The default error reporting level used by phpdocx for PHP 5.6 and PHP 7 versions is:

E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED

This default value can be customized easily by changing the PhpdocxLogger::$errorReporting static variable: