Reputation: 819
I am trying to Update to Shopware 6.5 from 6.4 and I am getting the following error message when running composer require symfony/flex:~2 symfony/runtime:~6.2
:
!! PHP Fatal error: Uncaught Symfony\Component\DependencyInjection\Exception\EnvParameterException: Environment variables "string:OPENSEARCH_URL" are never used.
The error occurs while composer is running assets:install
and the error is caused on cache:clear
aswell.
Why does that occur and how do I fix that?
Upvotes: 3
Views: 812
Reputation: 35008
In case you don't use elasticsearch I believe this problem also might disappear by not just requiring the shopware/elasticsearch
module.
Upvotes: 3
Reputation: 13161
It's fairly obvious why that error occurs, but I couldn't reproduce it. Could it be, that you don't have shopware/elasticsearch
installed? That package his this configuration to avoid that error. However if that package wasn't installed, you should have no references to this parameter at all and as such no unused ones either.
Here's something you could try. Within the root directory of Shopware, navigate to config/packages
and create a file z-shopware.yaml
. Edit that file and insert the following content (make sure to keep the indentation as it is).
parameters:
some_dummy_parameter_for_usage: "%env(string:OPENSEARCH_URL)%"
This should count as usage of the environment variable and thus resolve the error. Also try to clear the cache manually once from inside the root directory: rm -rf var/cache
Upvotes: 3