-
-
Notifications
You must be signed in to change notification settings - Fork 35
Make ReindexProvider getIndex none static #615
Copy link
Copy link
Closed
Labels
DXImproves the developer experienceImproves the developer experienceRequire BC BreakRequires a BC Break and so new major versionRequires a BC Break and so new major versionSEAL CoreSeal Core related issueSeal Core related issue
Milestone
Metadata
Metadata
Assignees
Labels
DXImproves the developer experienceImproves the developer experienceRequire BC BreakRequires a BC Break and so new major versionRequires a BC Break and so new major versionSEAL CoreSeal Core related issueSeal Core related issue
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.