I have 2 separate Symfony installations on different subdomains.
However, when I try to visit the 2nd domain, it says:
Fatal error: Cannot redeclare SymfonyComponentStringu() (previously declared in /var/www/public_api/releases/20200904200316/vendor/symfony/string/Resources/functions.php:14) in /var/www/public_test_api/releases/20200909003532/vendor/symfony/string/Resources/functions.php on line 14
Note that the conflict is between different directories, which have nothing to do with each other.
Is this a cache issue? How do I solve this? I tried to disable OPCache for the 2nd installation, but it didn’t change anything. APCu is enabled too.
I’m having the same problem with a 3rd party software too, which also uses Symfony.
Source: Symfony Questions