Closed gregurco closed 7 years ago
First of all: Thank you so much for your time and ideas, @gregurco! I like the idea a lot. This gives us more flexibility in the future and I think more plugins could come so we can really put new features into plugins instead of overloading this bundle! 👍
Why are we not using the bundle by Matthias Noback? https://github.com/matthiasnoback/symfony-bundle-plugins If more bundles would follow this concept I think his library would be a nice base. So every bundle is following the same rules (interfaces, ...).
Thanks, I'm pleased to see positive feedback.
There are some pros and cons of usage matthiasnoback/symfony-bundle-plugins package. First of all I'm not sure that this package was developed with scope to be used in real packages. I thought it was created more as an example (for article). We can partially copy/paste interfaces to us. Finally we need only one interface: for bundle from plugin packages (this one: https://github.com/matthiasnoback/symfony-bundle-plugins/blob/master/src/BundlePlugin.php). What do you think? Any ideas or suggestions?
Yeah, when reading the article it seems to be an example. But when I'm going directly to the bundle the README.md tells me that it can be used. There are also some tests included. Looks like a solid library. And if there is no con I would love to get this bundle integrated. I hope that this plugin bundle will be seen and used as a standard when it comes to symfony bundles and plugin.
Fine. Later I will integrate it and do additional commit :+1:
@florianpreusner today I tried to implement symfony-bundle-plugins here and I met a big problem. This package works only with next configuration structure:
bundle_name:
first_plugin_name:
...
second_plugin_name:
...
But in our case we have a little bit another structure. And I can't rewrite, because:
So, my suggestion is not to use symfony-bundle-plugins package and to create our interfaces. I better understood the implementation of Matthias Noback today and I think I can make some changes and it will look good :) So, what's your opinion?
Alright, let's do this! 👍
@florianpreusner so, I think it's ready for review. Could you please take a look in this PR and in https://github.com/gregurco/GuzzleBundleWssePlugin/pull/1 ? I added tests, rewrote and optimized code. Probably I will add more tests. Write if something is wrong or could be written better :) Above I wrote how to install new version of bundle and wsse plugin.
Very nice! Thanks a lot, @gregurco
You are welcome :) I think #73, #79, #90 can be closed after release.
Fixed tickets: [#73, #79, #90] License: MIT
Info:
This pull request is a concept, how to make wsse plugin optional in guzzle bundle. Linked PR 1: https://github.com/8p/guzzle-wsse-middleware/pull/13 Linked PR 2: https://github.com/gregurco/GuzzleBundleWssePlugin/pull/1 Inspired from: https://matthiasnoback.nl/2015/07/a-plugin-system-for-bundles/
Important! It's not finished, it's a concept. I want to see any feedback, suggestion, criticism or questions :)
Usage:
All plugins will be activated/connected through GuzzleBundle constructor in AppKernel, like this:
How to help with testing:
Add in composer.json:
And run:
composer update