floriansemm / SolrBundle

Solr-Integration into Symfony and Doctrine2
http://floriansemm.github.io/SolrBundle
MIT License
123 stars 73 forks source link

symfony 4 support #186

Open Nemo64 opened 6 years ago

Nemo64 commented 6 years ago

I'm not sure if im just overlooking something but I tried to use this bundle with symfony 4.1.

I added the bundle like in the new bundles.php like this:

    FS\SolrBundle\FSSolrBundle::class => ['all' => true],

And then: no commands. So I tried to manually add them in the service.yml by just blindly adding the command folder to autowire:

FS\SolrBundle\Command\:
    resource: '../vendor/floriansemm/solr-bundle/FS/SolrBundle/Command/*Command.php'

worked, now i have commands... but they don't work. All services are private by default since symfony 3.4 so just to check I made all services by default public within your bundle by modifying services.xml

<services>
    <defaults public="true" />
    ...
</services>

And horray, it seems to do something, i can now use solr:index:popuplate... but none of my fields are populated.

entepe85 commented 4 years ago

I'm also facing the issue of the index being not populated even though the bundle is installed and the command solr:index:populate does not throw an error. (Using Symfony 4.4)