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
PHP Version: n/a (but for the sake of completness: 8.1.12)
Database Driver & Version: n/a
Description:
As you might know, I'm maintaining (on low pace) an Eloquent bundle for Symfony. The recent releases (Laravel 7/8/9) have been an incredibly smooth ride, thanks for your hard work!
However, the console output restyling (#43065) introduced the use of the resolve() function in the Console component, creating a hard dependency between the component and the framework.
This hard dependency has been identified before, as it also broke Lumen. Since #43312 , it uses the app() function. While no longer having a hard dependency on the full framework, this still makes it impossible to use the Console component (and indirectly Eloquent's Migrator class) outside of the framework.
My bundle already has some plumbing to work around Seeder::resolve(). I'm not too happy about it, but it is acceptable given creating decoupled components isn't your top priority (and I'm probably one of a few weirdo's attempting this). However, this newly used function makes it a lot harder to work around. I currently believe the best solution is to fully reimplement all illuminate/console's components to make this work: wouterj/WouterJEloquentBundle@b2276e9 This is very fragile, given it breaks whenever you introduce a new cool component.
Is this coupling expected (and should I perhaps reconsider my bundle)? Or can there be something done in the console package to make it possible to work around this (without the need to reimplement critical components like Task)?
I don't know much about Laravel's internals, but I'm happy to work together with you to make sure Eloquent remains usable outside the Laravel framework if you wish.
The text was updated successfully, but these errors were encountered:
Description:
As you might know, I'm maintaining (on low pace) an Eloquent bundle for Symfony. The recent releases (Laravel 7/8/9) have been an incredibly smooth ride, thanks for your hard work!
However, the console output restyling (#43065) introduced the use of the
resolve()
function in the Console component, creating a hard dependency between the component and the framework.This hard dependency has been identified before, as it also broke Lumen. Since #43312 , it uses the
app()
function. While no longer having a hard dependency on the full framework, this still makes it impossible to use the Console component (and indirectly Eloquent'sMigrator
class) outside of the framework.Relevant code:
framework/src/Illuminate/Console/View/Components/Component.php
Lines 81 to 94 in c76c3bd
My bundle already has some plumbing to work around
Seeder::resolve()
. I'm not too happy about it, but it is acceptable given creating decoupled components isn't your top priority (and I'm probably one of a few weirdo's attempting this). However, this newly used function makes it a lot harder to work around. I currently believe the best solution is to fully reimplement all illuminate/console's components to make this work: wouterj/WouterJEloquentBundle@b2276e9 This is very fragile, given it breaks whenever you introduce a new cool component.Is this coupling expected (and should I perhaps reconsider my bundle)? Or can there be something done in the console package to make it possible to work around this (without the need to reimplement critical components like
Task
)?I don't know much about Laravel's internals, but I'm happy to work together with you to make sure Eloquent remains usable outside the Laravel framework if you wish.
The text was updated successfully, but these errors were encountered: