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..
Hey. A little bit stuck here, help would be appreciated! I have written a composer library (lets st
Hey. A little bit stuck here, help would be appreciated!
I have written a composer library (lets stay Lib) and I'm trying to load service in Zed that extends spryker as usual (e.g vendor/Lib/Service/UtilTextService), when I provide it in Dependency provider in zed it can't find it - just finds Spryker one.
I added my "Lib" namespace to CORE_NAMESPACES. What did I miss?
Comments
-
hi, maybe try
composer dump-autoload -o
0 -
hey, sadly tried it and still get
Return value of Lib\Zed\Module\DependencyProvider::Lib\Zed\Module{closure}() must be an instance of Lib\Service\UtilText\UtilTextServiceInterface, instance of Spryker\Service\UtilText\UtilTextService returned0 -
then check what you have as a return of our method. Maybe you return something from vendors. not from your classes
0 -
when I do
$container->set(static::SERVICE_UTIL_TEXT, static function (Container $container): UtilTextServiceInterface { return new UtilTextService(); (Lib namespace) });
it works π locator can't find it
0 -
with
return $container->getLocator()->utilText()->service();
0 -
I think it is a just a return type issue. Need to see a full code to say mo exact
0 -
both return types in dependency provider and business factory has Lib namespace if it weren't the "new UtilTextService" would fail too
0 -
maybe inside UtilTextService() class you init the vendor one and return it
0 -
stupid question but is your lib following conventions -> file naming, file position, implementing interfaces, extending proper base classes etc
0 -
everything looks as ok as usual, nvm I'll try to debug locator
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 77 Spryker News
- 938 Developer Corner
- 795 Spryker Development
- 90 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 27 Job Opportunities
- 3.2K π Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 33 Product & Business Questions
- 69 Spryker Safari Questions
- 50 Random