-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Removed direct use of SessionManager class, used SessionManagerInterface instead #19359
Removed direct use of SessionManager class, used SessionManagerInterface instead #19359
Conversation
Hi @jaimin-ktpl. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
Hi @sivaschenko, thank you for the review. |
@sivaschenko just wondering, is such change backward-compatible in case we have custom code extending core classes? |
@orlangur yes, it is. Extended classes will simply have more strict control over constructor parameters requiring |
@orlangur Actually I checked the case and looks like you are correct the change will result in PHP Warning if these classes were extended. I will clarify our approach in this case and will get back to this PR |
b26a9cf
to
71150a2
Compare
Hi @jaimin-ktpl to keep backward compatibility it's required to keep the existing SessionManager dependency. It's still possible to introduce a new optional constructor parameter of SessionManagerInterface type. |
Hello, @sivaschenko , |
Hi @jaimin-ktpl ,
|
Thanks @sivaschenko , for your suggestions. I will update the code as per and will commit the changes. |
Hi @jaimin-ktpl would you like to continue progress on this contribution? |
Hello @sivaschenko , Apologies for the delay. I have updated the code as per your suggestions. Thanks. |
Hi @jaimin-ktpl , thanks for the update. Please pay attention that according to comment #19359 (comment) the constructur signature cannot be changed for |
Hello @sivaschenko ,
So I removed my code for that plugin.
I misunderstood it and removed the changes from that file where it should have applied. For third comment,
You stated that its okay to assign interface object, so I kept my changes for that file but with your latest comment you stated that
So I am little confused if I should keep the Interface object or not for that file. I am really sorry for the inconvenience but can you please confirm if I should keep Interface object for Context.php or remove it. |
Sorry for confusion @jaimin-ktpl . By As for other classes, you are required to add an additional optional dependency to the constructor, but you can assign this new dependency to |
Hello @sivaschenko, I have added an optional argument with |
Hi @jaimin-ktpl the approach looks correct to me, it will be easier to review the committed code. |
6960fae
to
8b30520
Compare
Hi @sivaschenko, thank you for the review. |
Hi @jaimin-ktpl, thank you for your contribution! |
…ManagerInterface instead #19359
Description (*)
Removed direct use of SessionManager class, used SessionManagerInterface instead.
Fixed Issues (if relevant)
Manual testing scenarios (*)
SessionManager
withSessionManagerInterface
classContribution checklist (*)