ongr-io / ElasticsearchBundle

Symfony bundle for Elasticsearch with steroids
MIT License
313 stars 189 forks source link

Class does not exists #961

Open castillotomupwork opened 4 years ago

castillotomupwork commented 4 years ago

https://github.com/ongr-io/ElasticsearchBundle/blob/ae8e87017df3b2bbf3a39c1a5b66c799253d9178/DependencyInjection/Compiler/MappingPass.php#L65

in this line I'm getting an error. I checked the value of $namespace and it contains only the name of the class excluding the namespace.

mappingpass error

in0de commented 4 years ago

Had the same error. Check your line endings. I am working on a windows machine but the site is running on a linux machine. In MappingPass.php there is a reg_match against a line ending and it would not recognize the windows line ending.

Long story short: Make sure your line endings match the OS your website is running on.

Hope that helps and good luck!

pawellen commented 3 years ago

@castillotomupwork I had the same problem: https://github.com/ongr-io/ElasticsearchBundle/issues/927

maluramichael commented 3 years ago

I had the same problem. In my src folder was a .preload.php file without a class which crashed the ReflectionClass constructor because the namespace was just \.