⚙️ A Laravel package to decompose your installed packages, their dependencies, your app & server environment

Overview

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

Comments
  • failed to open stream: No such file or directory

    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.

    opened by dducro 8
  • File not found

    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.

    error 
    opened by Braunson 5
  • Is it possible to require decomposer within a package?

    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.

    opened by dducro 5
  • PHP version req?

    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?

    opened by sbramley 3
  • Class 'Lubusin\Decomposer\ServiceProvider' not found

    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.

    opened by CWallenberg 1
  • Undefined index: require

    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'];

    opened by ghost 1
  • Fixes Formatting issues

    Fixes Formatting issues

    Summary

    Fixes #3

    Changes

    • Updated the Code to be formatted in accordance to PSR-2
    • Added doc block comments for added benefit
    • Aligned and spaced a couple of things just a tiny bit for extra readability
    • Updated the redundant empty if-statement for a cleaner logic path
    opened by etiennemarais 1
  • Formatting issues

    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.

    opened by etiennemarais 0
  • Installation failed, reverting ./composer.json to its original content on Laravel 8

    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.

    opened by eduardonwa 2
  • Corrupted Docker disk image

    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

    opened by bynary 0
  • Laravel 6.0 Compatability

    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].

    opened by revjoe 6
  • Maximum execution time of 120 seconds exceeded

    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.

    enhancement 
    opened by tornadofay 2
  • feature/add-currently-installed-package-versions

    feature/add-currently-installed-package-versions

    First ever commit to open source :-O

    Be gentle...

    I've added a get contents method on the current composer.lock file, this should capture all the installed package versions then map them to the composer.json file so you can see not only what minimum requirements your package has, but what the currently installed version is as well.

    opened by sbramley 3
Releases(v1.2.3)
  • v1.2.3(Aug 24, 2017)

  • v1.2.2(Jun 5, 2017)

  • v1.2.1(Apr 6, 2017)

    • Added following helper methods to help categorize report stats more efficiently. Initial efforts & PR by Stephen Ball
    Decomposer::addLaravelStats($myArray); // Add to the already existing 'Laravel Env' block
    Decomposer::addServerStats($myArray); // Add to the already existing 'Server Env' block
    Decomposer::addExtraStats($myArray); // A new block 'Extra Info' will be added containing it
    
    Source code(tar.gz)
    Source code(zip)
  • v1.2(Apr 3, 2017)

  • v1.1.1(Mar 19, 2017)

  • v1.1(Mar 17, 2017)

  • v1.0.1(Mar 2, 2017)

    • Quick Dependency fix
    • Added search, sorting & pagination on the table containing name & versions of installed packages and their dependencies.
    • Decomposes your Laravel & Server environment and gives all the required details & configurations about both on the same page.
    • Generate the system report of your Laravel & server environment on a single click. This report can be very useful in troubleshooting any error. Why & what about the system report is documented here
    Source code(tar.gz)
    Source code(zip)
  • v1.0(Mar 1, 2017)

    • Added search, sorting & pagination on the table containing name & versions of installed packages and their dependencies.
    • Decomposes your Laravel & Server environment and gives all the required details & configurations about both on the same page.
    • Generate the system report of your Laravel & server environment on a single click. This report can be very useful in troubleshooting any error. Why & what about the system report is documented here
    Source code(tar.gz)
    Source code(zip)
  • v0.1.4(Feb 26, 2017)

  • v0.1.3(Feb 21, 2017)

    PR #4 merged bringing the following changes

    • Updated the Code to be formatted in accordance to PSR-2
    • Added doc block comments for added benefit
    • Aligned and spaced a couple of things just a tiny bit for extra readability
    • Updated the redundant empty if-statement for a cleaner logic path
    Source code(tar.gz)
    Source code(zip)
  • v0.1.2(Feb 18, 2017)

  • v0.1(Feb 17, 2017)

Owner
LUBUS
A web development agency from Mumbai, India.
LUBUS
A cli tool for creating Laravel packages

Laravel Packager This package provides you with a simple tool to set up a new package and it will let you focus on the development of the package inst

JeroenG 1.3k Dec 22, 2022
🍪 Write gorgeous documentation for your products using Markdown inside your Laravel app.

LaRecipe Write gorgeous documentations for your products using Markdown inside your Laravel app. LaRecipe ?? LaRecipe is simply a code-driven package

Saleem Hadad 2.1k Dec 29, 2022
This package extends the core file generators that are included with Laravel 5

Extended Migration Generators for Laravel 6, 7 and 8 Easily define the migration schema right in your make:migration command. The new commands this pa

Laracasts 2.4k Dec 29, 2022
Module Generator Composer Package For Laravel

Module Generator Installation You can install the package via composer: composer require teacoders/module-generator Run the command below to publish t

Tea Coders 21 Jan 8, 2022
InfyOm Laravel Generator - API, Scaffold, Tests, CRUD Laravel Generator

InfyOm Laravel Generator Generate Admin Panels CRUDs and APIs in Minutes with tons of other features and customizations with 3 different themes. Read

InfyOmLabs (InfyOm Technologies) 3.5k Jan 1, 2023
A PHP README File Generator, to generate easily your GitHub README files 🎉

Readme Generator ?? Requiremennts ?? Make sure you have PHP 8.0 or higher installed. Steup ⚙️ Install Composer v2 or higher (https://getcomposer.org)

♚ PH⑦ de Soria™♛ 9 Oct 18, 2022
:rocket: A Smart CRUD Generator For Laravel

Features Generate your models, views, controllers, routes and migrations just in a few clicks. Models visualization through a graph presentation (New

Houssain Amrani 891 Dec 23, 2022
Laravel IDE Helper

Laravel IDE Helper Generator Complete PHPDocs, directly from the source This package generates helper files that enable your IDE to provide accurate a

Barry vd. Heuvel 12.8k Dec 29, 2022
⛔️ Laravel Tinx is archived and no longer maintained.

⛔️ Laravel Tinx (Deprecated) Laravel Tinx was archived on 12th December 2019 and is no longer maintained. Looking for a reloadable version of Laravel

James Furey 440 Dec 27, 2022
Laravel API Documentation Generator

Laravel API Documentation Generator Automatically generate your API documentation from your existing Laravel/Lumen/Dingo routes. php artisan apidoc:ge

Marcel Pociot 3.3k Dec 21, 2022
A MySQL Workbench plugin which exports a Model to Laravel 5 Migrations

MySQL Workbench Export Laravel 5 Migrations Plugin A MySQL Workbench plugin that allows for exporting a model to Laravel 5 migrations that follow PSR-

Brandon Eckenrode 902 Jan 2, 2023
Prequel for Laravel. Clear and concise database management.

TL;DR? Test Prequel here! What is Prequel exactly? Prequel is meant to be a database management tool for Laravel to replace the need for separate stan

Protoqol 1.4k Dec 27, 2022
Creates an 'artisan workflow:make' command to scaffold out a number of useful GitHub actions workflows for Laravel

Laravel workflow generator This creates a make:workflow artisan command to scaffold out a number of useful GitHub actions workflows for Laravel. Insta

Len Woodward 9 Jul 18, 2021
Docker-magento2 - 🐳 Docker containers with all required Magento 2 dependencies installed available as FPM through Nginx and CLI

Magento 2 Docker A collection of Docker images for running Magento 2 through nginx and on the command line. Quick Start cp composer.env.sample compose

Meanbee 454 Dec 27, 2022
Installed composer packages info

PackageInfo This package was highly inspired from ocramius/package-versions I needed some methods to read data from the composer.lock file fast...this

Martin Keckeis 7 Jun 2, 2022
Composer addon to efficiently get installed packages' version numbers

Package Versions composer/package-versions-deprecated is a fully-compatible fork of ocramius/package-versions which provides compatibility with Compos

Composer 1.4k Dec 27, 2022
Takeout is a CLI tool for spinning up tiny Docker containers, one for each of your development environment dependencies.

Takeout Takeout is a CLI tool for spinning up tiny Docker containers, one for each of your development environment dependencies. It's meant to be pair

Tighten 1.4k Jan 2, 2023
Collection of agnostic PHP Functions and helpers with zero dependencies to use as foundation in packages and other project

Collection of agnostic PHP Functions and helpers This package provides a lot of very usefull agnostic helpers to use as foundation in packages and oth

padosoft 54 Sep 21, 2022
This composer plugin is a temporary implementation of using symbolic links to local packages as dependencies to allow a parallel work process

Composer symlinker A Composer plugin to install packages as local symbolic links. This plugin is a temporary implementation of using symbolic links to

Pierre Cassat 18 Nov 9, 2021