-
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
hard coupling to zend/diactoros and slim #24
Comments
I agree with @ppetermann , hard coupling creates more issues than solves.
We can collaborate on this issue and make a PR for it. @snapshotpl will you merge that PR? |
@spotman no problem man :) However first of all I prefer to release fix with support zend-diactoros 1 and 2. Your PR will be very welcome! |
@snapshotpl Thanks for quick response! I need some time to check your lib and to dive in the code. I'll let you know when I'll be ready to start working on this issue. |
@ppetermann I think slim dependency isn't a problem since is in |
I'm sorry, but I have no idea why having slim in require-dev would fix the hard coupling issue your package has. You use Slim here, aliasing it as SlimUri You use the aliased SlimUri here: which is used here: which is called here: which is basically your main function, being called from __invoke. thus, you've created a dependency which means slim must be installed in order for your lib to work. Which means: Which means:
|
slim dependency is define only in require-dev because I need it in tests. However if your code base missing slim, there is no problem because |
apologies, I wasn't aware that use and instanceof both don't need the class to be existing. However I'd still consider abstracting it away. |
@ppetermann :) Can you make PR for that? Also look at #27 |
@snapshotpl #27 seems a great improvement 👍 I'll see if i can prepare a PR as soon as i have some spare time for that, but its not on the highest priority looking at all the things I got on my plate right now - sorry for that. |
since we support psr-17 and slim is not required to install to lib work I think that we can close this issue |
the composer.json requires zend-diactoros, and require-dev's slim
PhpDebugBarMiddleware.php actually directly uses zend-diactoros, and makes use in an instanceof comparison of Slims Uri class.
The text was updated successfully, but these errors were encountered: