jrgp/linfo

Laravel 5 wrapper for your Linfo Package

Gummibeer opened this issue · 17 comments

Hey,
I'm working on a Laravel 5 wrapper for your package. If you have wishes or anything else pls tell me:
https://github.com/Gummibeer/laravel-linfo or via email.

It's work in progress yet but I want to provide this god peace of work for the big Laravel community. ;)

And one thing: it would be great if you can make a new version including the new changes - I have to load the dev-master yet and this isn't cool :/

jrgp commented

Hey. Neat idea.

One thing though: why is defining LINFO_CLI needed?

I'll release a new git tag soon. It'd be nice if I can get the need for you to define LINFO_CLI fixed first.

I got an error with the composer autoloader - I think.
I will do it again without and send you the error message.

Oh Yeah - I got it :D
It was the request_uri server var. And it was the laravel way to call classes and the artisan console commands. There are too much ways to get a call without the request_uri.
A check if this exists would be great and I'm not so sure if this is really helpful neccesary!?

And something that costs me much work is the uptime Format. Can you add a simple "booted" => 1234567890, timestamp? Than you can keep your format for the uptime. But in laravel dates & times should be a Carbon class (rly great DateTime extension) and I have to substring, trim and so on your uptime to get the timestamp.

jrgp commented

Hey

Would you be able to provide me with the request_uri error? I have an idea where in the code it is coming from but I want to know for sure.

As for the uptime, I'll get to that shortly.

jrgp commented

Just took care of the uptime issue. now instead of "UpTime" being a string with both, it's "UpTime" => "bootedTimestamp" that has the timestamp and "text" which is the uptime string.

5626554

It's ok - I look everytime at the linfo output I change my code.^^
And yes I will - I thought it was in the init.php but I will send you the exact error.

The Wrapper will provide 3 data sources:

  • original: the original linfo output
  • attributes: the "normal" laravel array with getters, setters, mutators, accesors and so on
  • processed (not sure about naming): a processed array that combines, calculates, converts data
jrgp commented

Awesome, thanks a lot for your work! What I really want to do is remove the need to define LINFO_CLI in your code, as that makes Linfo far more suitable for use as a general purpose library. Tips to fix this would be appreciated, as would a working example your Linfo wrapper code code being used with Laravel. :)

So, I setuped my PC so it take a bit longer^^ - a praise to git and cloud storage! :D
And it looks like the error removed itself :O - I will have a look again on all components and steps I did - but it looks like I can do it without now. wondering

I'm creating a subdomain for this now and will send you the link - http://linfo.gummibeer.de - the repo for the package is above and I will start to write a bit of readme.
The site will just dd() (a pretty nice debug function of Laravel) all the data. After the main part works I will use the json format and highlight.js to make it a bit prettier. ;)

The readme is added and the main part is at the demo site: http://linfo.gummibeer.de
Everything works fine and I will extend the processed array with a bit more informations.

A short message if you have created a new version would be nice.

It would be nice to let this work under the same namespace!? - Can you add my package in your packagist namespace and give me maintainership access? - https://packagist.org/users/gummibeer/

The vendor is already taken by someone else. You may ask them to add your package and give you maintainership access. The packages already in that vendor namespace can be found at linfo

Pleas don't forget the work here^^
#23 is a task with a less priority I think.

thank you! :) 👍

Now the package is ready for the first release - the only thing missing is the new version. After this I can make a tag and then I can help you to bring the linfo package into namespaces and PSR.

jrgp commented

I'm roughly 75% done with the namespace'd version of Linfo. I'll have it visible in a few hours. Then you can comment on it.

Everything is done here