You tried to run php ./bin/console cache:clear
(or similar) on a Windows Network by UNC path like //my-network-folder/my-app
?
Now you're in trouble as the command doesn't work? You tested that it works perfectly in our local copy and is not a mistake in your code?
Then I guess you ran into the same problem as I did with Windows UNC network path and PHP? (not yet sure where the root cause is...)
Errors showing up, Symfony console doesn't work as expected
Errors look like this, as "something" in the call chain doesn't seem to be able to resolve the paths correctly:
In XmlFileLoader.php line 386:
Unable to parse file "\\xxx\vendor\sensio\fra
mework-extra-bundle\src\DependencyInjection/../Resources/config\annotations
.xml": [WARNING 1549] failed to load external entity "file://///xxx/vendor/symfony/dependency-injection/Loader/schema/
dic/services/services-1.0.xsd" (in n/a - line 0, column 0)
[WARNING 3084] Element '{http://www.w3.org/2001/XMLSchema}import': Failed t
o locate a schema at location 'file://///xxx/vendor/symfony/dependency-injection/Loader/schema/dic/services/services-1
.0.xsd'. Skipping the import. (in in_memory_buffer - line 8, column 0)
[ERROR 1845] Element '{http://symfony.com/schema/dic/services}container': N
o matching global declaration available for the validation root. (in //xxx/htdocs$/xxx/ - line 5, column 0)
In XmlUtils.php line 107:
[WARNING 1549] failed to load external entity "file://///xxx/vendor/symfony/dependency-injection/Loader/schema/dic/ser
vices/services-1.0.xsd" (in n/a - line 0, column 0)
[WARNING 3084] Element '{http://www.w3.org/2001/XMLSchema}import': Failed t
o locate a schema at location 'file://///xxx/vendor/symfony/dependency-injection/Loader/schema/dic/services/services-1
.0.xsd'. Skipping the import. (in in_memory_buffer - line 8, column 0)
[ERROR 1845] Element '{http://symfony.com/schema/dic/services}container': N
o matching global declaration available for the validation root. (in //xxx/htdocs$/xxx/ - line 5, column 0)
Solution
I found an issue where a similar problem is discussed: https://stackoverflow.com/questions/28836337/symfony-invalidargumentexc… and I can confirm the accepted answer: The only thing that worked reliable for me was to create a Windows network drive and use it instead of the UNC network path.
You can see here how that can be done: https://support.microsoft.com/en-us/windows/map-a-network-drive-in-wind…
So finally the problem behind is the same one as here: https://julian.pustkuchen.com/en/composer-cli-windows-unc-network-path-…
If you should find any better, final solution, please contact me to update the blog article.
Otherwise, I hope I was able to help you with this mad bug.