Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
dducro opened this issue Mar 16, 2017 · 5 comments
Closed

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

dducro opened this issue Mar 16, 2017 · 5 comments

Comments

@dducro
Copy link
Contributor

dducro commented Mar 16, 2017

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
Copy link
Contributor

introwit commented Mar 16, 2017

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
Copy link
Contributor Author

dducro commented Mar 16, 2017

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
Copy link
Contributor

@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
Copy link
Contributor Author

dducro commented Mar 16, 2017

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
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants