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

Why does installing Mouf install its dependencies again in vendor/mouf/mouf/vendor ? #109

Open
stof opened this issue Oct 7, 2015 · 3 comments

Comments

@stof
Copy link

stof commented Oct 7, 2015

When installing dependencies in Packanalyst, the Mouf dependencies are getting installed again in vendor/mouf/mouf/vendor, leading to duplicated class definitions confusing the IDE (and potentially not even at the same version)

@stof
Copy link
Author

stof commented Oct 7, 2015

If the goal is to install the dependencies necessary for the Mouf admin UI, my suggestion would be to move this admin UI to a separate package, which would be installed as a dev dependency of the project, instead of doing a separate composer installation with duplicate versions of the dependencies

@moufmouf
Copy link
Member

moufmouf commented Oct 7, 2015

Absolutely. The admin UI will ultimately be in a separate package, which will be installed as a dev dependency. This is planned for the next release.

However, I will still need to put dependencies in the vendor/mouf/mouf/vendor directory.

The reason is that the admin UI has a big number of dependencies, and I don't want to bring these dependencies back in the main vendor directory.
For instance, the admin UI requires Splash v4 (this is the MVC framework). But in many projects, I'm using a newer version of Splash (v7 that is compatible with PSR-7). If everything was in the same vendor directory, I would have a conflict, and I would not be able to use Mouf in most projects.

I understand this is confusing the IDE. This is mostly an issue with PHPStorm that triggers warnings (Eclipse deals correctly with this issue). I'm not sure if there is a way to write a sort of .phpstormignore file that would automatically exclude some files from the IDE.... that might solve the problem.

@stof
Copy link
Author

stof commented Oct 7, 2015

For instance, the admin UI requires Splash v4 (this is the MVC framework). But in many projects, I'm using a newer version of Splash (v7 that is compatible with PSR-7)

Given that it is a full rewrite of the package as a different MVC framework (using PSR-7 and Zend Stragility instead of Symfony HttpFoundation and HttpKernel), a better solution may be to make it a separate package, so that they can be used in parallel.

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