What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

(Untitled)

U01JBB8LNTE
U01JBB8LNTE Posts: 207 πŸ§‘πŸ»β€πŸš€ - Cadet

Comments

  • U01JBB8LNTE
    U01JBB8LNTE Posts: 207 πŸ§‘πŸ»β€πŸš€ - Cadet

    Ok... so in terms of registering I think I need to actually create a directory src/Pyz/Zed/Process/ProcessDependencyProvider.php

    and add my custom middleware plugin from src/Zed/<module>/Communication/Plugin/Configuration/<some_name>ConfugurationPlugin.php

    to the profile stack...

  • U01JBB8LNTE
    U01JBB8LNTE Posts: 207 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited January 2021

    okee one step farther

    <?php
    
    namespace <project_name>\Zed\Process;
    
    use <project_name>\Zed\<module_name>\Communication\Plugin\Configuration\<module_name>ConfigurationProfilePlugin;
    use SprykerMiddleware\Zed\Process\Communication\Plugin\Configuration\DefaultConfigurationProfilePlugin;
    use SprykerMiddleware\Zed\Process\ProcessDependencyProvider as SprykerProcessDependencyProvider;
    
    class ProcessDependencyProvider extends SprykerProcessDependencyProvider
    {
        /**
         * @return \SprykerMiddleware\Zed\Process\Dependency\Plugin\Configuration\ConfigurationProfilePluginInterface[]
         */
        protected function getConfigurationProfilePluginsStack(): array
        {
            $profileStack = parent::getConfigurationProfilePluginsStack();
            $profileStack[] = new DefaultConfigurationProfilePlugin();
            $profileStack[] = new <module_name>ConfigurationProfilePlugin();
    
            return $profileStack;
        }
    }
    
  • U01JBB8LNTE
    U01JBB8LNTE Posts: 207 πŸ§‘πŸ»β€πŸš€ - Cadet

    but...

    The Process module doesn't seem to be aware of my ConfigurationProfilePlugin

    Error - Exception: Class 'ProjectName\Zed\ModuleName\Communication\Plugin\Configuration\ModuleNameConfigurationProfilePlugin' not found 
    

    Module exists at

    ProjectName\Zed\ModuleName\Communication\Plugin\Configuration\ModuleNameConfigurationProfilePlugin
    
    ````
    and is namespaced with
    
    

    <?php
    namespace ProjectName\Zed\ModuleName\Communication\Plugin\Configuration;
    ```

  • UPWG9AYH2
    UPWG9AYH2 Posts: 509 πŸ§‘πŸ»β€πŸš€ - Cadet

    since there is a custom project namespace involved: did you register your namespace in spryker config and made it known to composer autoload config?

  • UPWG9AYH2
    UPWG9AYH2 Posts: 509 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited January 2021

    If yes, i think there is still some namespace (typo?) issue somewhere

  • Stanislav Matveyev
    Stanislav Matveyev Tech Lead @ Spryker Sprykee Posts: 211 πŸ§‘πŸ»β€πŸš€ - Cadet

    why don't you use simple DataImport for csv files for your case? or you need to get data from some API directly?

  • U01JBB8LNTE
    U01JBB8LNTE Posts: 207 πŸ§‘πŸ»β€πŸš€ - Cadet

    yeh @UKBTMFXMJ eventually I want to attach this to an API, but if I can build off the DataImport as a first step then I'd be down. The middleware docs made me think that a stream pattern was necessary with all the steps involved in that... but hey if I can run a middleware command that imports and dumps the contents of the file into a log atm I'd be pretty happy.

  • U01JBB8LNTE
    U01JBB8LNTE Posts: 207 πŸ§‘πŸ»β€πŸš€ - Cadet

    @UPWG9AYH2 I'm using the Pyz space which apparently does not need setup? Seems to be a non-issue there.

    I'm thinking it is something lower level or like you were saying a typo, I'm kind of tacking a bunch of stuff together from examples atm.

    https://bitbucket.org/edwardweymouth/spryker-middleware/src/master/

    Made a public repo, because it start to get constrictive to try and talk about this stuff in screenshots and markdown.

    Most of the code is in the Zed process module and the IngestConnector module