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..
Hi! I would like to extract a Spryker module I created into another Git repo and to require it throu
Hi! I would like to extract a Spryker module I created into another Git repo and to require it through composer. It looks like Sprkyer is not looking into vendor/foobar/src/Pyz/... but only into "Spryker" directories (especially thinking about Zed controller and routes). Is there any way to achieve this?
Comments
-
You should overthink your vendor structure. For vendor packages you should adopt the spryker directories. for example vendor/vendor-name/src/package-name/VendorName/Zed/PackageName. Then you have to adjust on pyz the configuration for the new paths
0 -
KernelConfig for example check the getPathsToCoreModules() function
0 -
Also for router, twig, es, transfer, zed navigation etc
0 -
in global config file you also have to register the new namespace (
KernelConstants::PROJECT_NAMESPACES KernelConstants::CORE_NAMESPACES
0 -
Thanks for the hints! getPathsToCoreModules seems like the wrong place, since my module is not a core module, isn't it? Shouldn't it rather be getPathsToProjectModules π€
0 -
Do you know if there is any documentation about this?
0 -
I did what you said: added the Namespace to the CORE_NAMESPACES and also the path to getPathsToCoreModules..
Anyway the backoffice and gateway routes cannot be found π€·0 -
Forget what I said.. I was accessing the wrong route, since I was renaming my module before π€¦
With adding at these two places it works perfectly fine0 -
doesnt matter if its core module or not, you can add the paths there. Dunno if its documented. We create and add own vendor modules and had to take a closer look into the code to find the loading parts
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 73 Spryker News
- 911 Developer Corner
- 771 Spryker Development
- 87 Spryker Dev Environment
- 361 Spryker Releases
- 3 Oryx frontend framework
- 34 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 25 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
- 32 Product & Business Questions
- 69 Spryker Safari Questions
- 50 Random