Replies: 2   Views: 240
Publish config file when using the namespaces version
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by iulian-tsf  · 29-04-2020 - 09:05

Hi there,

My company just bought the 9.5 premium version and we're using it with composer (private repo);

The question is, how do I publish the config file that's now in vendor folder to be in the apps config directories?


Posted by admin  · 29-04-2020 - 09:40


phpdocxconfig.ini is handled in PhpdocxUtilities.php in the parseConfig method. There's no option to customize the path to phpdocxconfig.ini but changing this method, we move the request to the dev team to be added to the next release of phpdocx.

We recommend you to move the file to the new path and create a symlink in the config folder if you don't want to change the class.


Posted by iulian-tsf  · 29-04-2020 - 13:21

In case this will help others, I remembered Laravel introduced "stubs" (which are a sort of templates); so, I created my own stub with the phpdocxconfig.ini file and placed in my versioned code; on composer install and update, in the scripts section I call a dedicated command that reads from that stub and replaces the placeholders with config values; at the end, the command replaces the phpdocxconfig.ini from vendor with the new file and it seems to work ok.