Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should the extension build command also work with bundles? #201

Closed
niklaswolf opened this issue Jun 21, 2023 · 5 comments
Closed

Should the extension build command also work with bundles? #201

niklaswolf opened this issue Jun 21, 2023 · 5 comments

Comments

@niklaswolf
Copy link

Question

I tried to run it for a Shopware-Bundle like so:

SHOPWARE_PROJECT_ROOT={PATH_TO_MY_ROOT} shopware-cli extension build PATH_TO_THE_BUNDLE_ROOT

Would be nice, as shopware bundles can also extend e.g. the administration :)

@shyim
Copy link
Member

shyim commented Jun 22, 2023

To build assets I need a Bundle Name + Bundle Path both informations are difficult to obtain for Bundles as I would need to run PHP and actual the Bundle code. And this can get really complicated if the Bundle code requires some environment variables and and...

I would suggest that we use a own composer type shopware-bundle with extra field

{
"name": "my-bundle",
"type": "shopware-bundle",
//...
"extra": {
   "bundles": {
    // Relative to bundle directory
     "MyBundle": "src/MyBundle"
   }
}
}

And for bundles included in an project we could use only that extra.bundles in the root composer.json

@niklaswolf
Copy link
Author

I see 😊
I don't see any reason against your suggestions, only one thing: I'd rather name the extra field also shopware-bundle to be a bit more specific and reduce risk of collisions, because bundle is quite generic in the symfony environment.

@shyim
Copy link
Member

shyim commented Sep 24, 2023

Pretty close to finish this. #227 needs more testing and tests to be fixed

@shyim
Copy link
Member

shyim commented Sep 24, 2023

https://sw-cli.fos.gg/bundle-support/

@shyim shyim closed this as completed Sep 24, 2023
@niklaswolf
Copy link
Author

Thanks for the effort! 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants