lubusIN / laravel-decomposer

⚙️ A Laravel package to decompose your installed packages, their dependencies, your app & server environment
MIT License
522 stars 42 forks source link

Added the ability to include additional info in server section #12

Closed REBELinBLUE closed 7 years ago

REBELinBLUE commented 7 years ago

Allows you to register additional PHP extensions to appear in the server information section, also cleaned up a few inconsistencies

introwit commented 7 years ago

@REBELinBLUE makes sense adding info to the server block if the info is server specific, thanks :) Just few things :

REBELinBLUE commented 7 years ago

Can you append the extra server stats in the 'Server Environment' box on the UI as well just like in the markdown

I will look at that

Also, add the check for empty array before both as I have done with extraStats so that if there are no extra server stats the heading is not visible as well.

Which extra header do you mean? I might have missed something. There is only an extra foreach so if the array is empty it won't be outputting anything extra

introwit commented 7 years ago

@REBELinBLUE oops! I was reading that in the context of an entire new block, my mistake. Just add the server stats in the UI box and we are good to go.

PS: Also, since I am not that experienced with PHP as you are obviously so is doing foreach over a blank array safe? I know it wont generate any error, just curious would that create a suppressed warning or sort of something like that? Just curious to learn :)

REBELinBLUE commented 7 years ago

Will do!

It won't cause an error provided the array is initialised as empty to begin with, i.e. $var = []; or $var = array(); if you just did something like foreach ($foo as $bar) you would get a notice because $foo isn't even an empty array

introwit commented 7 years ago

@REBELinBLUE ah! Thanks. I have merged the PR & will add the stats in the box myself as I am going to do the same for Laravel Env as well. Cheers for the nice suggestion :beers:

UPDATE: Docs updated & Release Pushed: v1.2.1

REBELinBLUE commented 7 years ago

Oh, did you not want me adding it to the box on the right hand side then?

introwit commented 7 years ago

@REBELinBLUE I did that and released in v1.2.1 😄

REBELinBLUE commented 7 years ago

Ah!