-
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
Why is SessionManager used instead of its Interface? #19274
Comments
Hi @dyuk1987. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
where @dyuk1987 do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
Hi @engcom-backlog-nazar. Thank you for working on this issue.
|
@engcom-backlog-nazar Thank you for verifying the issue. Based on the provided information internal tickets |
Hi @jaimin-ktpl. Thank you for working on this issue.
|
Hi @dyuk1987. Thank you for your report. The fix will be available with the upcoming 2.3.2 release. |
Hi @dyuk1987. Thank you for your report. The fix will be available with the upcoming 2.2.9 release. |
Summary (*)
I was trying to fix the issue mentioned in #12362, by injecting an updated version of SessionManager to replace the original Magento\Framework\Session\SessionManager, on a Magento 2.2.5. After a while, I managed to find a few exceptions being thrown around by some of the third-party modules I have previously installed. The main problem here is that some of the classes in those modules have directly included "Magento\Framework\Session\SessionManager" in the constructor (instead of Magento\Framework\Session\SessionManagerInterface). I was worried if the replacement would cause similar problems elsewhere in the system, so I have done a few greps to look for classes having the SessionManager directly injected into their constructors, and I managed to find a few of them in the core codepool, namely Paypal\Controller\Transparent\RequestSecureToken and Magento\Framework\View\Context.
I am not quite sure why it is so, but it seems to me the interface should be used instead.
Examples (*)
I don't really have an example here.
Proposed solution
To change Magento\Framework\Session\SessionManager to Magento\Framework\Session\SessionManagerInterface
In
The text was updated successfully, but these errors were encountered: