How can we exclude some tables (for example, country, city, etc) to be purged via doctrine:fixtures:load? Is there any yaml configuration file or sth else?
Yes, such options was implemented recently in https://github.com/doctrine/DoctrineFixturesBundle/pull/307
You could use --purge-exclusions
option now. Enjoy!
E.g.
php bin/console doctrine:fixtures:load --no-interaction --env=test --purge-exclusions=regions --purge-exclusions=countries
You could read to how customize purging behaviour https://symfony.com/doc/3.1/bundles/DoctrineFixturesBundle/index.html#specifying-purging-behavior
Be attention that this feature is available only since 3.4.0
release https://github.com/doctrine/DoctrineFixturesBundle/releases/tag/3.4.0