FOSElasticaBundle
FOSElasticaBundle copied to clipboard
[v6.0.0-beta3] ObjectPersister argument 3 is null
Hi there.
I'm using Symfony 5.2.x with FoSElasticaBundle v6.0.0-beta3 and ElasticSearch 7.10.2
I've updated my code but I'm getting the error when running php bin/console lint:container
[ERROR] Invalid definition for service "fos_elastica.object_persister.stats": argument 3 of
"FOS\ElasticaBundle\Persister\ObjectPersister::__construct()" accepts "string", "null" passed.
My yaml config looks like this
fos_elastica:
clients:
default:
host: '%elastica.host%'
port: '%elastica.port%'
transport: '%elastica.transport%'
logger: '%elastica.logger%'
indexes:
stats:
settings:
index:
max_result_window: 500000
properties:
timestamp:
type: date
format: "yyyy/MM/dd HH:mm:ss||yyyy/MM/dd"
signupTime:
type: date
format: "yyyy/MM/dd HH:mm:ss||yyyy/MM/dd"
expiredTime:
type: date
format: "yyyy/MM/dd HH:mm:ss||yyyy/MM/dd"
someMoreFields:
....
persistence:
provider:
service: '%elastica.stats.provider.service%'
I don't need this to be persisted in the db at all, but rather in the elastic, therefore there is no model that this document can rely on. I've tried setting
listener:
enabled: false
but without luck. If I were to define some dummy model then all checks are passing.
So the question is, do I really need to define model and/or driver or that can be omitted in this case as I'm not using db for this index ?
Update Might be related to the 2nd part of #1780