webksde / ddev-vscode-devcontainer-drupal-template

Drupal DDEV based development container with attached Visual Studio Code
22 stars 3 forks source link

Place phpunit.xml in base directory - overwritten otherwise #140

Closed JPustkuchen closed 9 months ago

JPustkuchen commented 9 months ago

Currently the phpunit.xml is placed in web/core/, being copied there on init. See: https://github.com/search?q=repo%3Awebksde%2Fddev-vscode-devcontainer-drupal-template%20phpunit.xml&type=code

But web/core and its contents are being overwritten by composer and should not be modified. See:

If you are using Composer to manage Drupal core, then updating core will overwrite the core/ folder and delete yourphpunit.xml file. (https://www.drupal.org/docs/automated-testing/phpunit-in-drupal/running-phpunit-tests#s-configure-phpunit)

So instead we should place our custom phpunit file outside of these changing directories, presumably best at /

JPustkuchen commented 9 months ago

@joshsedl works great and fixes the issues for me perfectly. Please try yourself first.

https://github.com/webksde/ddev-vscode-devcontainer-drupal-template/pull/141

joshsedl commented 9 months ago

Commented the MR, we should test this extensively first before pushing. Also, I am quite sure, that there was something that expected the phpunit.xml to be in core. Might be wrong though.

JPustkuchen commented 9 months ago

@joshsedl yes, please plan testing this extensively. Anyway if we run into issues, we can revert this at any time and switch back to the old implementation. I think the chances for an improvement are great.

But test first, of course. If you can't find issues, let's do it!