Git Product home page Git Product logo

laravel-decomposer's Introduction

Latest Stable Version Total Downloads License PRs

Introduction

Laravel Decomposer decomposes and lists all the installed packages and their dependencies along with the Laravel & the Server environment details your app is running in. Decomposer also generates a markdown report from those details that can be used for troubleshooting purposes, also it allows you to generate the same report as an array and also as JSON anywhere in your code. Laravel Package & app devs you can also add your own personal extra stats specific for your package or your app. All these just on the hit of a single route as shown below in the gif.

Screenshot

Laravel Decomposer

Kind Attention : You can have a look at the Roadmap. If you have any suggestions for code improvements, new optional or core features or enhancements, create an issue so you,us or any open source believer can start working on it.

Features

  • This can be used by your non-tech client/user of your laravel app or non-experienced dev who still dosen't uses CLI to generate the system report & send over to you so you can know the entire details of his environment.
  • To see the list of all installed packages & their dependencies in the laravel app directly from the browser
  • To get the Laravel & Server environment details on the same page with the packages list
  • To check whether all the pre configurations & extensions asked by Laravel are applied and loaded or not
  • Suppose suddenly or after some changes your app broke, you can install Laravel Decomposer, generate & copy the report and paste it in the issue box of the respective repo you are reporting the issue to.
  • For package/laravel app developers this can be very useful when collecting the information from the users reporting the issues. As the report gives them complete info about the environment the issue is being raised in.
  • It can also help you in other ways like suppose you have a package installed that is using illuminate/support v5.1, and an another package using illuminate/support v5.3, so getting these facts quickly by just hitting to a route can make you aware of possible unstability & conflicts so you can report that to the respective package developer.
  • It cuts down the troubleshooting time. For eg: Sometimes after trying all possible solutions at the end the user says 'I forgot to say I am on PHP 4'. Here Decomposer acts as the precaution & removes the dependency of querying the user for every single thing.

Roadmap

  • Allow Decomposer report to be accessed via code Released in v1.1
  • Allow users and other packages to add their own stats in the Decomposer report Released in v1.2
  • Add a config file to allow user to control what he/she wants to see in the view
  • Check for updates of the installed packages & show if any available for the respective packages or their dependencies
  • Compare same dependency versions for different packages & warn user about the possible conflict. (Can be achieved even now as the search results highlighting is enabled, but sure it can be done in more better way)
  • Make UI more informative & UX more better
  • Let us know if you want anything to be added in the decomposer. After all the user makes the packages worth :)
  • We have created the issues & labels with the appropriate titles , where you can contribute your ideas & suggestions or let us know if you are working on a PR for that. Always more than happy to hear & learn new things from the community.

Installation

You can install this package via composer:

composer require lubusin/laravel-decomposer

Next, add the service provider:

// In config/app.php ( Thank you for considering this package! Have a great day :) )

'providers' => [
    /*
     * Package service providers
     */
    Lubusin\Decomposer\DecomposerServiceProvider::class,
];

Add a route in your web routes file:

Route::get('decompose','\Lubusin\Decomposer\Controllers\DecomposerController@index');

Go to http://yourapp/decompose or the route you configured above in the routes file.

Docs

The Docs can be found in the Wiki but to save you one more click, here's the index

Contributing

Thank you for considering contributing to the Laravel Decomposer. You can read the contribution guide lines here

Security

If you discover any security related issues, please email to [email protected].

Credits

About LUBUS

LUBUS is a web design agency based in Mumbai.

License

Laravel Decomposer is open-sourced software licensed under the MIT license

Changelog

Please see the Changelog for the details

laravel-decomposer's People

Contributors

ajitbohra avatar antimech avatar dducro avatar etiennemarais avatar introwit avatar rebelinblue avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

laravel-decomposer's Issues

failed to open stream: No such file or directory

In DecomposerController.php on line: 22

It found files in composer.json that weren't found in the vender dir.
I solved it by adding a file_exists check before reading the file.
But this could be useful info to also display.

Class 'Lubusin\Decomposer\ServiceProvider' not found

  [Symfony\Component\Debug\Exception\FatalThrowableError]
  Class 'Lubusin\Decomposer\ServiceProvider' not found

The service provider in the composer.json does not exist. You have used the name ServiceProvider but the file name is actually DecomposerServiceProvider.

Feature suggestions

Comment your feature suggestions in this thread so you and we can track, discuss & work on them

Installation failed, reverting ./composer.json to its original content on Laravel 8

Im not that experienced with these kind of issues (im mostly a UI/UX designer) but since I couldn´t properly install TailwindCSS last night, and as a result of it, Iv'e done a bunch of arrangements and installations that I simply lost track of it all. Well, I ran your installation command and the title of this post is what Im getting afterwards. Maybe Im missing a crucial detail at the installation process? Hope to hear from you! :-)

I also got this message:

Your requirements could not be resolved to an installable set of packages.

Is it possible to require decomposer within a package?

It's expected that the package is installed in a Laravel project.

DecomposerController::getLaravelEnv()
line: 55

However when including it from a package this line fails because decomposer isn't a dependency of the parent project.

File not found

I've installed this on a new project, and receive 'file not found' when trying to go to the route. Everything is registered but for some reason the route isn't working.

Formatting issues

Context

The code seems to not be in a PSR-2 standard formatting and styles. I'd like to fix that by making a PR that fixes the code styles and adds a tiny amount of descriptive doc block comments for added benefit.

Maximum execution time of 120 seconds exceeded

first of all thanks for this package, it's really great package.

I'm getting the following error when I go to http://myapp/decompose

Maximum execution time of 120 seconds exceeded {"userId":1,"email":"******@gmail.com","exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalErrorException(code: 1): Maximum execution time of 120 seconds exceeded at C:\\wamp\\www\\SPF\\vendor\\lubusin\\laravel-decomposer\\src\\Decomposer.php:269)

so I followed the error to \lubusin\laravel-decomposer\src\Decomposer.php

private static function folderSize($dir)
    {
        $size = 0;
        foreach (glob(rtrim($dir, '/').'/*', GLOB_NOSORT) as $each) {
            $size += is_file($each) ? filesize($each) : self::folderSize($each);
        }
        return $size;
    }

I simply commented this part which calculate application size

// foreach (glob(rtrim($dir, '/').'/*', GLOB_NOSORT) as $each) {
//     $size += is_file($each) ? filesize($each) : self::folderSize($each);
// }

it gave me App Size: 0 B but everything else worked fine. so I don't know if this problem on my dev machine only, but will it run fine on production server ? or not.

Thanks.

PHP version req?

I'm getting the following:
[InvalidArgumentException] Could not find package lubusin/laravel-decomposer at any version matching y our PHP version 5.5.9.0
Is this only supported on certain versions of php?

Undefined index: require

Hi.
ErrorException (E_NOTICE)
Undefined index: require
in file DecomposerController.php
line 24
$dependencies = $dependenciesArray['require'];
with package caouecs/laravel-lang

this correct example:
$dependencies = $dependenciesArray['require'] ?? ['Dependency' => 'none'];

Laravel 6.0 Compatability

Composer won't install in Laravel 6.0 install. Any thoughts on making this available?

lubusin/laravel-decomposer v1.2 requires illuminate/support ^5.0 -> satisfiable by laravel/framework[5.8.x-dev], illuminate/support[5.0.x-dev, 5.1.x-dev, 5.2.x-dev, 5.3.x-dev, 5.4.x-dev, 5.5.x-dev, 5.6.x-dev, 5.7.17, 5.7.18, 5.7.19, 5.7.x-dev, 5.8.x-dev, v5.0.0, v5.0.22, v5.0.25, v5.0.26, v5.0.28, v5.0.33, v5.0.4, v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.28, v5.1.30, v5.1.31, v5.1.41, v5.1.6, v5.1.8, v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.32, v5.2.37, v5.2.43, v5.2.45, v5.2.6, v5.2.7, v5.3.0, v5.3.16, v5.3.23, v5.3.4, v5.4.0, v5.4.13, v5.4.17, v5.4.19, v5.4.27, v5.4.36, v5.4.9, v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28, v5.5.33, v5.5.34, v5.5.35, v5.5.36, v5.5.37, v5.5.39, v5.5.40, v5.5.41, v5.5.43, v5.5.44, v5.6.0, v5.6.1, v5.6.10, v5.6.11, v5.6.12, v5.6.13, v5.6.14, v5.6.15, v5.6.16, v5.6.17, v5.6.19, v5.6.2, v5.6.20, v5.6.21, v5.6.22, v5.6.23, v5.6.24, v5.6.25, v5.6.26, v5.6.27, v5.6.28, v5.6.29, v5.6.3, v5.6.30, v5.6.31, v5.6.32, v5.6.33, v5.6.34, v5.6.35, v5.6.36, v5.6.37, v5.6.38, v5.6.39, v5.6.4, v5.6.5, v5.6.6, v5.6.7, v5.6.8, v5.6.9, v5.7.0, v5.7.1, v5.7.10, v5.7.11, v5.7.15, v5.7.2, v5.7.20, v5.7.21, v5.7.22, v5.7.23, v5.7.26, v5.7.27, v5.7.28, v5.7.3, v5.7.4, v5.7.5, v5.7.6, v5.7.7, v5.7.8, v5.7.9, v5.8.0, v5.8.11, v5.8.12, v5.8.14, v5.8.15, v5.8.17, v5.8.18, v5.8.19, v5.8.2, v5.8.20, v5.8.22, v5.8.24, v5.8.27, v5.8.28, v5.8.29, v5.8.3, v5.8.30, v5.8.31, v5.8.32, v5.8.33, v5.8.34, v5.8.35, v5.8.4, v5.8.8, v5.8.9].

Some extra features (proposal)

Hi . You have done a great Job

If you would like to add some more interesting features on your project, i guess some caching on the values and a config file would be great

Some of the values cost too much time and resources so they could be cached for sometime or by session (maybe a choice config file)

And in a config file you could add the route and some middleware that anyone wish to add, plus the pagination number

Finally you can give the choice to full integrate the decomposer view, in every project. The view could be published in order to by able to modify.

And an adition of the last minute
On some servers, for security reasons some function are disabled. (ex:php_uname)
As a result the code brakes an gets errors
It could be checked with ini_get('disable_functions') before use

Corrupted Docker disk image

I have installed Laravel-decomposer using the instructions. It installs fine and the routing seems to work okay, but when I go to http://[project_url]/decomposer I get a blank page and my docker disk image becomes corrupted requiring me to reset the disk image. If I don't reset the disk image, port 8080 becomes unusable and I get http 502 errors from my server. If you have any suggestions on configuration issues I may be encountering I would appreciate the help.

Here's my setup:
Three docker containers: database, server (PHP 7.3.9), and application (vue.js)
macOS 10.15.2
PHP 7.3.9
Laravel Framework 5.7.25
Docker Engine 19.03.5

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.