Closed (fixed)
Project:
Commerce Ajax Add to Cart
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
30 Oct 2017 at 06:54 UTC
Updated:
7 Dec 2017 at 06:19 UTC
Jump to comment: Most recent
It is a best practice to load services from the container. Read Lesson 8.3 - Dependency injection. Instead of statically loading services, use the container to load the services.
Change code in RefreshPageElementsHelper class. Load service from container.
Update kernel tests if necessary.
N/A
RefreshPageElementsHelper itself has to become a service. So we can no longer instantiate a new RefreshPageElementsHelper like this new RefreshPageElementsHelper(new AjaxResponse()). Instead RefreshPageElementsHelper has to be loaded from the container.
N/A
Comments
Comment #2
subhojit777Comment #3
subhojit777Comment #5
subhojit777