-
Notifications
You must be signed in to change notification settings - Fork 56
Split into separate discrete packages? #23
Comments
Yeah, I had this discussion other times, but not in github, so it's fine. The benefits of the "all-in-one" apropach:
The benefits of split packages:
I think both approaches are valid, but cannot live toghether. If this package is divided in micro-packages, with the dependencies required (not suggested as they are now), the "all-in-one" package will install all dependecies. Currently we can find a lot of individual middlewares and I think a good point of this package, is precisely, provide a different way. That being said, I'm open minded, so if more people prefer divide all, a good solution is use a "psr7-middlewares" vendor, and create a github organization with more people that want to be involved. |
+1 for splitting the package atm I only use the If each middleware would live in its own package one can follow changes more easily. |
I might agree on splitting routers into separate packages as having multiple routers in one place seems very unrealistic. However having rest of middlewares together seems cool, being able to connect and play with middlewares is very useful on medium/big projects. |
Another +1 for splitting. See for example how Zend Framework does this (https://github.com/zendframework/zf2) they have a zf2 package which just groups all their small packages together. |
+1 for splitting... the main issue I see with splitting is the shared traits, which are used by many of the middlewares. Although, those could also be split into their own repository, and required as needed by the middleware. A meta package which groups the smaller packages together would work fine, for someone who wants the all-in-one, or mainly, I think, a way to explore for new packages and ideas. +1 "create a github organization with more people that want to be involved" |
+1 for splitting, using right package for right job, not need all packages for doing foe example recaptcha |
+1 for splitting. Per OP, being able to correctly use Moreover, how would you manage a breaking change in one of these middleware components? You'd have two choices: major version bump, which will cause conflicts between packages that use any of these components - or breaking semver, which will cause run-time errors. That alone should be a sufficiently compelling reason to package these individually. (The odds of never needing to make a breaking change to any of a growing number of components? Not good.) I'd suggestion creating a GitHub organization for the individual packages. Rather than inviting people to PR against a monolithic package, you should invite them to publish their middleware packages under the organization banner. With PSR-15 coming up (and I'm assuming you're interested, because you've been participating in the discussions) you will need to make breaking changes to every component anyhow, so that should be an opportunity to gradually port these components to individual packages under a new organization-name. You could invite the community to participate in that effort. I'd be happy to help port some of these - I'm eventually going to need PSR-15 versions of some of these anyhow. |
Yes, finally I'm agree to split the packages 🎉
What do you think? |
@oscarotero "middleland" sounds a lot like a "brand-name". Isn't that also the name of your middleware dispatcher package? That would seem to imply this is middleware designed specifically for that library. I think that a community effort should have a more neutral name, like e.g. (my personal favorite would be |
(would it make sense to gather not only middleware, but also dispatchers, under a single organization-name? everything middleware-related in one place?) |
This is why "middleland" (the land of middleware). I know that it's a brand name, but what isn't?
The dispatcher name is simply Dispatcher, but yes, it's included in the organization, using the same namespace. Anyway, this was only an experiment (it's not even registered in packagist) and can be removed (or moved out of the organization).
php-middleware exists. And I don't think we could use psr-middleware, because seems a PSR official package (in fact, initially I renamed the vendor name of this package because this. And the problem with Psr15-middleware is whether Psr-15 becomes obsolete and replaced by other specification (ex psr-34). |
Brand-names have corporate connotations to me, that's all. I'd prefer a name that sounds more like a neutral community/group-effort than a product/brand-name, which (to some) could imply ownership.
|
Ok, I've created middlewares and invited you (feel free to reject if you don't want to join now). I think the prefixes -group -list or -community are innecessary (at least in the organization name of github). |
Hello |
Holy shit, you just did all that work yourself! Kudos! 👍 :-) |
Really, this is incredible work, man! This is really going to help set fire to PSR-15. Thank you :-) |
Thank you. I had a couple of weeks with lot of free time.
Anyway, I'd like to use the new repository to discuss about this or other issues. |
My coworker is working on PSR-7/15 components and middleware for cookies and sessions. Should have a release in a week or two. I'll keep you posted :-) |
Great. |
Haha, you have my new chrome-logger on there already - I haven't even announced it anywhere yet, you're fast ;-) That one will have middleware soon though - the package might just come with it, or I might create a separate project under |
I think using the |
I had some recollection of this being discussed, but I don't see it in the issue
tracker, so I figure I'd raise it here. I assume there has been some discussion
on this, so at minimum, I think it would be nice to have the record of it here.
Firstly, I'm a fan of minimalism and the 'do one thing and do it right' ethos.
In my opinion, it would be nice to have this collection split into separate,
discrete packages. Things like the Authentication middleware might be grouped
together, but things of disparate concerns with varying requirements
could/should be separate.
I think the most obvious reason is that a handful of these have real
requirements (i.e.
AuraRouter
), which are only listed as suggestions. Theability to actually require the dependency (including version requirements)
seems like an obvious benefit.
Additionally, it just doesn't feel right to me to require the whole thing to
use a single component. It would be nice to glance at
componser.json
and haveat least some idea of what functionality is being leveraged. It's also strange
to continually get updates which are possibly unrelated to the utilized
functionality.
I also assume (possibly without cause) that release versioning is/will-become
cumbersome with this paradigm. Given two components of unrelated concerns,
should not one be able to change it's public API and require a 1.0 release
without affecting the other?
I would register my vote for separate vendor prefix with discrete packages (eg
oscarware/aura-router
,oscarware/auth
, etc.). If absolutely necessary, theycould require a common utility package. For those desiring the "all-in-one"
paradigm, an additional package could be created which simply requires the
discrete ones.
Thoughts?
The text was updated successfully, but these errors were encountered: