The idea behind that we did make the method of the ReindexProvider static:
public static function getIndex(): string;
was that static methods are able to be called without instantiate the class trigger lazy service to be loaded.
The problem is if we want reuse a ReindexProvider for example when creating a Index per language we would require to create a Reindex class also per language. As languages are in Sulu depending on other service it would be best to make it none static so something like:
public function getIndex(): string
{
return 'website' . $this->locale;
}
Can be implemented.
Sadly this would be kind of BC break: https://3v4l.org/nfFFJ not sure why but PHP does not allow that a implementation does make a method of interface static.
@Toflar think you also had in contao once request similar change? But as the name != real index name you could workaround it.
The idea behind that we did make the method of the ReindexProvider static:
was that static methods are able to be called without instantiate the class trigger lazy service to be loaded.
The problem is if we want reuse a ReindexProvider for example when creating a Index per language we would require to create a Reindex class also per language. As languages are in Sulu depending on other service it would be best to make it none static so something like:
Can be implemented.
Sadly this would be kind of BC break: https://3v4l.org/nfFFJ not sure why but PHP does not allow that a implementation does make a method of interface static.
@Toflar think you also had in contao once request similar change? But as the name != real index name you could workaround it.