You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is in reference to this https://github.com/nmeri17/suphle/blob/ee91666a70e16d8777d571fed3550264626630e0/src/Hydration/ExternalPackageManagerHydrator.php. It's linked to each container during module booting. It's original intent was brought about by an assumption that to use laravel service providers, one would have to boot that one provider, while stalking their container for changes to reproduce in Suphle land or just for retrieving a booted provider in general. It turns out that this happens for free if their framework boots properly. That is one.
Secondly, illuminate based adapters read stuff out of their container. The idea with ExternalPackageManagerHydrator is that it acts as proxy between Suphle container, external containers, and object dependencies. The dependencies used in aforementioned adapters are informal strings which can't be typed: $app->make("migrator");. Even if somehow, there is a hidden benefit to this, it feels unwieldy to list all possible strings I intend to proxy beforehand, when I can readily import their container itself and begin to consume required object.
So it seems this use-case isn't practical and should be scrapped. Or am I missing a purpose it could serve?
Is there something to gain from delegating strongly typed hydration to an external manager?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
This is in reference to this https://github.com/nmeri17/suphle/blob/ee91666a70e16d8777d571fed3550264626630e0/src/Hydration/ExternalPackageManagerHydrator.php. It's linked to each container during module booting. It's original intent was brought about by an assumption that to use laravel service providers, one would have to boot that one provider, while stalking their container for changes to reproduce in Suphle land or just for retrieving a booted provider in general. It turns out that this happens for free if their framework boots properly. That is one.
Secondly, illuminate based adapters read stuff out of their container. The idea with
ExternalPackageManagerHydrator
is that it acts as proxy between Suphle container, external containers, and object dependencies. The dependencies used in aforementioned adapters are informal strings which can't be typed:$app->make("migrator");
. Even if somehow, there is a hidden benefit to this, it feels unwieldy to list all possible strings I intend to proxy beforehand, when I can readily import their container itself and begin to consume required object.So it seems this use-case isn't practical and should be scrapped. Or am I missing a purpose it could serve?
1 vote ·
Beta Was this translation helpful? Give feedback.
All reactions