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 guys, i modify Pyz/CategoryStorage, and i want install it in another spryker project, i want add
Comments
-
Hi there!
I guess this is more a
composer
question.The easier way would be copying the code to the new project.
On the other hand, you could create a repo on Github (for instance) and adding the reference to your
composer.json
to that repo, and install the module from there.A quick google search gave me this two explanations:
β’ for the case where you want to create a composer package: https://blog.jgrossi.com/2013/creating-your-first-composer-packagist-package/
β’ for the case you want to install something from a private repo: https://barryvanveen.nl/blog/55-installing-a-private-package-with-composer
Just as a disclaimer: Iβve never done either of them π0 -
Some extra info - as you cannot add to the Spryker vendor namespaces you will have to update the config to add the namespace of your shared composer package. This is done with
$config[KernelConstants::CORE_NAMESPACES] = [ 'SprykerShop', 'SprykerMiddleware', 'SprykerEco', 'Spryker', 'MyNewNamespace', ];
0 -
Here's an example of one of our shared packages (sorry, shameless plug π )
https://packagist.org/packages/inviqa/spryker-debug0 -
@UKEP86J66 for example i change name (from catalogStorage to myCustomCatalogStorage), install it, add like above, and data about CatalogStorage should go from (myCustomCatalogStorage) not from (Spryker/CatalogStorage) ?
0 -
If you are overriding the module like you would in Pyz the module name would stay the same. Because we set the namespace in CORE_NAMESPACES the Spryker resolvers will find your code before Pyz
0 -
$config[KernelConstants::CORE_NAMESPACES] = [ 'SprykerShop', 'SprykerMiddleware', 'SprykerEco', 'Spryker', 'myCustomCatalogStorage', ];
and data about it will be goes from this point ?
0 -
So you need to
β’ CopyPyz/CategoryStorage
somewhere outside of the project, update the namespaces and push to packagist
β’ Update the config so Spryker can see the new namespace0 -
like above ?
0 -
@USLUHK9SQ - not quite like that. Packagist has 2 namespaces, a vendor name and a package name.
0 -
The package name will be the same as it is at the moment (
CategoryStorage
)0 -
The vendor name will be different. For our example our vendor name is
Inviqa
0 -
okey so package name will be kacper/CatalogStorage ? right ?
0 -
Yes looks good π
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 76 Spryker News
- 929 Developer Corner
- 787 Spryker Development
- 89 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
- 26 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
- 70 Spryker Safari Questions
- 50 Random