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
Pimple3 #54
Pimple3 #54
Conversation
Also fixes #43 |
Superseeds #47 |
@@ -1,7 +1,5 @@ | |||
vendor | |||
phpunit.xml | |||
cilex.phar | |||
.idea |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you remove the ignore for phpStorm's files?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be done from your global .gitignore file
Hello @henrikbjorn, First of all, thank you for spearheading this effort to have Cilex 2.0. It might have been better to split this PR into separate pieces as you are addressing separate issues (I see you removed the Vagrant setup, changed the application class around and more). I also wonder if all code is still properly covered by unit tests because Cilex had a 100% or near 100% test coverage. Because you made quite invasive decisions it would have been interesting if you could have provided some more information in your PR how you came to these decisions. |
Anything I can do to help here? Building a new thing with Cilex and it seems this 2.0 would be a lot better with Pimple 3 and require less hand-wiring of providers. @henrikbjorn it'd be great to split up the "opinionated" changes like removing vagrant into a new PR. If it helps I don't mind taking your PR as basis and removing those changes to have a PR with the cilex-related changes only. The rest can be argued later on. |
This PR is based off the work in #54 graciously provided by @henrikbjorn. Unfortunately the aforementioned PR removed too much that is in use by this project and I could not cherrypick the changes because they were not in separate commits (like this change; I am doing that wrong .. ). In this commit I have changed the code to become a little closer to Silex and to implement Pimple 3. For people to upgrade only one thing changes: All service providers are based off a different interface and have the register method receives an object of type Pimple\Container instead of Cilex\Application to make providers interchangeable with Silex.
Ow wow.. I did not expect you to make those fixes so fast! |
Issue is now that because there were parts of this PR that I would not want to merge and I wanted to check how it works I have created a new PR based on this one (#57) where I have attributed @henrikbjorn. I think the initiative and work in this PR was far from wasted (I copy-pasted parts of it). Though I have been a little more conservative by keeping some things, such as the ServiceProviders. Unfortunately Silex cancelled their silex-api and silex/providers package (see the Silex package on packagist; the latest version mentions replacing those packages). In addition is the ConfigServiceProvider unique to Cilex and in use by phpDocumentor. (as there are a few other things I wanted to keep) |
in Silex the dispatcher is in the Application that is why they HAVE to do the class and then hackish create an instance of it. Here the dispatcher is defined in a ServiceProvider and since we now use |
Ok .. this is a bit awkward. I feel I owe @henrikbjorn apologies for creating the secondary PR.. |
The ConfigServiceProvider can be done by other libraries and maybe even better such as github.com/flint/tacker also igor have a ConfigServiceProvider that could be used instead. As this is a new major version i think it would also mean changes to phpdocumentor (if you decided to use it) |
Ok, let me re-check what is preventing me from merging this PR right now |
maybe @Seldaek wants to chime in on the remaining changes |
.idea | ||
composer.phar | ||
docs/.build | ||
composer.lock |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we drop the phar installation altogether I can see this working because then there is no real need to have a lock file (if ppl install using composer that will ignore the local lockfile anyway)
#27 maybe we should change the name of |
What still misses here is that the Silex/Api and Silex/Provider packages by Silex are still outdated. I would also prefer to return the ConfigServiceProvider to minimize the BC impact. I agree that the other providers are better served from Silex/Provider since those are exact duplicates. We should probably make a tree subsplit for our providers; since we already have console, dispatcher and config it would make a good case I think |
I get that loosing the ConfigServiceProvider is a bit of a personal thing, but others to the same or better, sorry :) I changed a lot based on the comments, and removed the bin/compile since it didnt make sense if we deprecate the phar (which we should) |
Remove old ServiceProverInterface update travis remove lock file change dependency versions to match silex fix phpunit version constraint whitelist src directory
When developing cli only applications and with something as RAD as this, i am pretty sure it is not common to include a shell.
On the other hand; I don't think that many will use it and this is a major upgrade; never mind |
Sorry, wrong button |
Thank you for making the changes @henrikbjorn; I truly appreciate this and am going to merge this now. It will sit on develop while test out some changes and give @Seldaek time to check it out before merging to master and tagging 2.0. I would also prefer it if Silex/Api and Silex/Provider is upgraded so that we can remove the alias off the Pimple entry in composer.json before tagging 2.0 |
forgot to reply on this: let's take a look in another PR shall we? It is a good thing to separate features as much as we can in different PRs because it makes communication easier and it does not halt all changes when a single feature in a large PR is subject of discussion |
@mvriel igorw/ConfigServiceProvider#35 makes it possible to use with Cilex 2.0 |
Many thanks to both of you. I now upgraded to the following and it's working great:
That gives me twig rendering with translation support in cilex commands - I haven't much else to test with yet so I can't give much more feedback so far so good. I'll report back if I find any other issues. |
👍 |
This makes Cilex more inline with Silex 2.0 and uses pimple 3. there is an issue with silex/api as have not yet been updated with the pimple 3.0 requirement.
I removed a bunch of providers as they can now be used from silex/providers. Also i moved the ConsoleServiceProvider into Cilex directly, mostly because its a hard requirement. If we want a seperate package for it, we can use a subsplit on src/Cilex/Provider as the silex/providers package does.