odata-client-php icon indicating copy to clipboard operation
odata-client-php copied to clipboard

refactor code to split laravel and odata logic

Open strorch opened this issue 4 years ago • 1 comments

Hello,

Thank you for creating this project, its very good!

I think that it will be really nice to refactor code which will do all package functionality with psr http standards. I found a list of ideas that for my opinion can make it more usable and allow to use package easy in pure php project:

1) Create a package which contains query builder logic

2) Create a package which configurates http client with psr http standards(7, 17 and 18).

Create code which will manipulate only Psr\Http interfaces, also create possibility to configure it with ContainerInterface(psr 11). For example in ODataClient has dependencies from uri and auth provider, but its wrong, because its a request dependencies.

3) Create laravel adapter package which will manipulate with Illuminate\Support\Collection class

Its only ideas but I think it will be really good for using it in pure php projects or projects which will not have Laravel dependencies.

strorch avatar Dec 09 '20 09:12 strorch

Number three in particular would be great.

The package illuminate/collections includes global helper functions with relatively simple names like value(), which inevitably leads to conflicts when combined with functional programming and/or older code bases.

Dicebar avatar Oct 19 '22 08:10 Dicebar