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

Is it possible to require decomposer within a package? #9

Closed dducro closed 7 years ago

dducro commented 7 years ago

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.

introwit commented 7 years ago

If you require it in a package, and on installing that package Decomposer too will get installed in the vendor directory just like the other dependencies. Also why are you making that static call? Getting the report as an array anywhere in the code is the feature coming tomorrow in the v1.1 release :)

dducro commented 7 years ago

Lol, I'm not actually making that static call xD If I add decomposer to a package and install, it will end up in the vendor dir. But in de getLaravelEnv function in DecomposerController.php on line 55 there is a call to "$packagesArray['lubusin/laravel-decomposer']" This fails if you didn't add the package to the "parent" laravel composer.json. I just want to add the requirement to my package.

introwit commented 7 years ago

@dducro but when the package goes live & is installed it will install decomposer in the correct place too. Why would someone need it until there is a complete app supposed to be decomposed?

dducro commented 7 years ago

It installs in the correct place. But it throws an error in DecomposerController.php on line 55 if done so. I created a pr: #10

introwit commented 7 years ago

@dducro Merged! Thank you for the PR Daniel :)