-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Expanded ReadInterface #10672
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expanded ReadInterface #10672
Conversation
…class implementing the ReadInterface should have this function in order to substitute the Read class. - Removed comment variable declarations from other file where the type is declared. This was necessary due to the missing function in the interface. Autocompleting this function now works properly, so these comments can be removed.
Interfaces (even non- There are a lot of code yet which rely on implementation rather than on interface, not sure whether |
I agree with @orlangur about BC policy. |
Hi @okorshenko, The reason I have created the PR this way is that the ReadFactory class actually has a hard dependency to the Read class. So at this point the Read class does not offer an extension point in Magento. Since the readAll function is called in several other modules I assumed this function has been forgotten to be included in the ReadInterface, so I added this function to that interface. Since no real extension point is offered at this moment I thought I would by wise to change the interface directely. The classes implementing the ReadInterface already have the readAll function in them. Even if someone did manage to overwrite the Read class, the readAll function is still necessary for Magento to even work. So that's why I have changed the interface directly. If you want this PR to be changed I would be happy to do so. Please guide me how you want me to do with this. I can create a ReadAllInterface which extends the ReadInterface. Then the Read class should implement the ReadAllInterface. Please share your toughts. |
Thank you @dverkade for the detailed explanation. In normal case we should follow BC policy. I talked to other Magento Architects in we agreed that in this particular case we can accept this change for 2.3. This interface does not have |
Hi @okorshenko, Thanks. When I make future PR's I'll try to add the reason in the comments why I opted to create the PR in a certain way. Hope this makes it easier for you to accept or reject a certain PR. |
@magento-team Will this be backported to 2.2? |
Expanded to ReadInterface to include the readAll function, since a class implementing the ReadInterface should have this function in order to substitute the Read class.
Removed comment variable declarations from other file where the type is declared. This was necessary due to the missing function in the interface. Autocompleting this function now works properly, so these comments can be removed.