Skip to content
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

Decouple laravel framework into a separate package #48

Open
nmeri17 opened this issue Jun 10, 2023 · 0 comments
Open

Decouple laravel framework into a separate package #48

nmeri17 opened this issue Jun 10, 2023 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@nmeri17
Copy link
Owner

nmeri17 commented Jun 10, 2023

The bridge component is currently bundled with the rest of the framework, because I incorrectly predicted its presence would fast track existing projects being upgraded to use suphle. That being far from reality, the component merely serves to bloat project size. Those dependencies are such a huge amount of code that will never be used

So I tried to extract this part into a separate package https://github.com/nmeri17/suphle/tree/master/src/Bridge/Laravel. Unfortunately, there seems to be more entanglement than would make that possible. Some contents of that directory, eg LaravelAppConcrete.php, used by the orm and artisan (for migrations), imports classes from illuminate foundation, support, and contract, which aren't distributed standalone.

Indeed, the only classes in that directory that strictly perform bridge tasks are config and routing. So if anyone can move everything else to another namespace (say, eloquentDependencies), and more importantly, import those dependencies without installing the entire laravel on suphle, that will be splendid. Move the contents of bridge/config and routing to a separate project, along with its tests and stub classes. That project can be called "Laravel-bridge"

Ideally, facade booting and executing service providers should be done optionally. But eloquent's migration, database etc is unable to function without the "migration" string binding the class. I couldn't build that class so I deferred it to their providers. If that step can be cut off, the method invoking provider booting (from the interface loader) can first confirm bridge mode is activated before calling it

@nmeri17 nmeri17 added the help wanted Extra attention is needed label Jun 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant