[3.0] Make the package framework-agnostic #153
stefanzweifel
started this conversation in
Ideas
Replies: 1 comment
-
I think it'll be nice, so applications running other PHP frameworks can benefit. Let the core be framework-agnostic. Then we can create classifiers for various frameworks, grouped in folders, so it's easy to create classifiers for other frameworks or php applications |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As the name of this repository might suggest, stats currently only works for Laravel applications.
Over the years I've received multiple questions, if stats could be made framework agnostics so it could be used in other frameworks too (for example Symfony applications).
With the work done in the release of 2.0 such a step should be easier now. The package basically consists of the following parts:
Project
-instance takes a collection of Classes and Classifies them.My idea to make stats framework agnostic, is to move the Class Collector and the Value Objects into a separate package. This package (
laravel-stats
) would require this new package as a dependency and would pass its list of Laravel specific Classifiers to the newly created "core"-package.It would then be trivial to create separate packages for other frameworks like Symfony or Zend: Define your own list of Classifiers which describe components in each framework and pass them to the "core"-package.
To make this actually work, the Class Collector and Value Obejcts would have to be rewritten though. They currently rely heavily on Laravels Collections.
The new "core"-package probably shouldn't have
illuminate/support
as a dependency and these mentioned classes should then rather use plain older PHP arrays.If you're interested in this idea, please share your comments, opinions and ideas below!
Beta Was this translation helpful? Give feedback.
All reactions