-
Notifications
You must be signed in to change notification settings - Fork 20
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
Remove dependency on Pimple #70
Conversation
53693fc
to
b86fb86
Compare
@fabpot is it ok (from licensing point of view) to copy Pimple code under different namespace inside the project (this is what's done in this PR) to avoid conflicts when installed alongside with Silex? I've kept licensing comment in each Pimple file intact. |
From a licensing point of view, I don't have any problems. From a "technical" POV, I don't like this idea all. |
Any idea on solving? Having dependency on DIC (e.g. Pimple) creates a problems, when another library (e.g. Silex) is using incompatible version of same DIC. |
I have another idea. A simple solution would be to have a different package name; that would be enough as the class names are very different between Pimple 1 and Pimple 2/3. So, I propose to create Pimple 4, which would be the same code as Pimple 3 but with a different package name. Then, I would depend on Pimple for Silex, and everyone should then do the same. That way, you could use Pimple 1 and Pimple 4 in the same project. |
Sounds interesting. The Pimple 2.1.1 however does following in class_alias('Pimple\Container', 'Pimple'); So if Pimple 1 (from Silex) and Pimple 2.1.1 are used on one project, then it could be tricky, because:
|
I'm only talking about making Pimple 1 and 4 compatible, which should be enough for the vast majority of the projects out there. |
Then every project should migrate to that new pimple-4 package to allow installation together. Of course except Silex 1. And probably |
@fabpot , any update? |
So, we've tried to make it work and that's just too much work, we gave up. I'm still not very happy with coy/pasting but if that's the only solution... |
You mean you've tried to create a package on Packagist with Pimple 1.0 only and that didn't work? |
Doing copy-paste for such small thing as Pimple is fine IMHO. It reduces coupling and increases cohesion, which is good thing for a library. Other option would be to depend on |
Would this help? Now I'm depending on Pimple 1. After change I will depend on container interop and still depend on Pimple 1 it uses, nope? |
e3b7d84
to
c0230d6
Compare
The failing test on HHVM is due sebastianbergmann/phpunit#2109 bug of PHPUnit. Apparently HHVM doesn't like when |
@fabpot , any update on this? |
I suppose copy/pasting is the way to go. I just don't have time to investigate other solutions. |
OK. |
Closes #21