Doctrine configuration and data cleaning