Missing class in tutorial


#1

I am not sure if I am wrong but in this tutorial

https://academy.spryker.com/enablement/tutorials_and_howtos/advanced_tutorials/t_customer_import.html#implement-customer-installer

I can’t find the AbstractInstaller class the CustomerInstaller class is extending from. Neither in the tutorial nor in vendor code. Did i miss something?

Best regards


#2

hey @JimPanse, it seems the abstract class has been replaced with an Interface.
i.e the docs mention InstallerFactory and I can see it’s equivalent in
vendor/spryker/newsletter/src/Spryker/Zed/Newsletter/Business/NewsletterBusinessFactory.php
it calls the Installer class (NewsletterTypeInstaller specifically) so I think you can start from there to figure out the difference


#3

Honestly that did not help. Whats the interface the abstract class was replaced with? Obviously i need access to a utilDataReaderService field which i hoped to find in the abstract class.
In your mentioned classes there are no equivalent fields.


#4

you should be able to reach the servicefactory by using:

        $utilDataReaderService = new UtilDataReaderServiceFactory();

along with use

use Spryker\Service\UtilDataReader\UtilDataReaderServiceFactory;

#5

Hi!

Unfortunately the tutorial is slightly outdated. We are working on a replacement. The referenced classes can be found in an older version of the demoshop (https://github.com/spryker/demoshop/blob/2.17/src/Pyz/Zed/Importer/Business/Installer/AbstractInstaller.php).

What is it you try to achieve i may ask?

Please do not directly instantiate the factory! You should pass the service like any other external dependency through the DependencyProvider (in this case via the locator) and then inject it in your model through the factory.

Hope that points you in the right direction!


#6

Hi!

I don’t want to do specific things. I try to do spryker tutorials randomly to understand the whole system. Unfortunately it’s very hard to follow all these patterns and concepts as a spryker novice. So its even more confusing if these tutorials are not accurate :confused:


#7

Hi,

If you are simply interested in learning more about Spryker. Maybe you would be interested in taking our free Bootcamp training?
Register here to take the course at training.spryker.com.

Best wishes,

Deborah Bennun
Spryker Academy


#8

This was a really good idea. Even though the tutorials are pretty the same, its much more easier to follow the lessons. The modularity and tests make it feel to have completed something you can measure at the end of the day. Too bad that there is only “basic stuff” … are there any additional training suites except this two?

Best wishes


#9

Hi,

I am so happy you liked the training. We are planing to provide more content in the future and you are welcome to suggest topics you would like to see covered by sending us a message to academy@spryker.com

Best wishes