Hello,
That deprecated messages appear when using an old version of phpdocx and a new PHP version. For example, PHP 7.3 is supported since the release of phpdocx 8.5 (https://www.phpdocx.com/news/post/phpdocx-v8-5-release-notes/217).
We recommend you to upgrade to the latest release of phpdocx. Otherwise, you'd need to hide notices and deprecated messages with PHP.
Regards.