Because we have changed the constructor signature, all the existing instantiations of ItemsGateway are now broken. We need to find all the places in the code where the ItemsGateway class is instantiated, and change the instantiations to pass a properly-constructed
Db object and an ItemFactory.
To do so, we use our project-wide search facility to search using a regular expression for our changed class name:
Doing so will give us a list of all instantiations in the project. We need to review each result and change it by hand to instantiate the dependencies and pass them to the ItemsGateway.
For example, if a page script from the search results looks like this:
page_script.php 1 <?php 2 // ...