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

Support dependency tree of packages #1

Closed
coenjacobs opened this issue Mar 6, 2017 · 2 comments · Fixed by #12
Closed

Support dependency tree of packages #1

coenjacobs opened this issue Mar 6, 2017 · 2 comments · Fixed by #12

Comments

@coenjacobs
Copy link
Owner

At this point, the dependencies of a package you want to bundle inside your WordPress plugin are not handled. So, you need to specify them all in your composer.json, or they will not be moved into your own namespace. In future releases, I want to add support for looping through the tree of dependencies for each package to bundle, to automate this process.

@costasovo
Copy link

Hi I would like to try implement support for dependency tree. Here is my idea how to do it:

  • get production dependencies and suggested dependencies for a package from composer.lock
  • check if the dependency is really installed by looking in directory
  • process the dependency same way as package
  • update processed parent package code and set correct namespaces in use statements with the child dependency package

What do you think? I thought that maybe you already have some ideas/thoughts how to implement it...

@coenjacobs
Copy link
Owner Author

@costasovo Yes, that seems about right. I haven't thought too much about how I would build this and haven't written much code other than some now discarded experiments.

The one thing that requires the most work in my opinion, is keeping track of all the changed namespaces (and technically also global class names which might be renamed as well) and replacing these in all files of each dependency as well. This needs to happen in an organized way, featuring great test coverage as well to ensure this is reliable, before this can be released.

Any help in achieving this is greatly appreciated! 👍

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

Successfully merging a pull request may close this issue.

2 participants