laravel / framework

The Laravel Framework.
https://laravel.com
MIT License
32.51k stars 11.02k forks source link

[PROPOSAL] More interoperability / Better workflow #17575

Closed abellion closed 7 years ago

abellion commented 7 years ago

Laravel is absolutely awesome and I love his agility but there is some leaks :

1st suggestion - component structure :

It wouldn't be better to define a folder structure for each component and to provide unit tests at a component level ?

src/
tests/
.gitignore
composer.json
README.md
CHANGELOG.md

2nd suggestion - remove services providers from components :

What if I want to use one of the component but without Laravel ? I think a better solution would to put each bridges (service providers) between the standalone packages and the Laravel framework inside the foundation component.

By the way, is this foundation component make sense ? I mean, is it really a component or a sort of connector between components (that make the framework thus).

Conclusion :

With this philosophy the framework repo could looks like this :

src/
    foundation/
    components/
tests/
.gitignore
composer.json
README.md
CHANGELOG.md

At this level the unit tests would test the foundation code, which serve as a connector between the components.

These ideas came to me because I used to work with the Symfony framework (https://github.com/symfony/symfony) ans it's exactly the strategy that they adopt and I find it very good ; what do you think ? Some inspiration came from Vue.js too.

Last thought : with this kind of structure / way of work, which would be more elastic and progressive, Laravel could be used as a micro framework as well as a complete and full featured one.

themsaid commented 7 years ago

Thank you :) But for suggestions and feature requests please use the https://github.com/laravel/internals repo.

abellion commented 7 years ago

Moved to : https://github.com/laravel/internals/issues/387