Comments (8)
A bit more complex than that.
--dev
should show development dependencies of the package itself. dev-dependencies further by tree should be ignored always
from graph-composer.
A bit more complex than that.
Indeed, just analyzing this whole thing took me like an hour. The actual package information is parsed by jms/composer-deps-analyzer and I think we've encountered a few minor flaws. The following observations have been performed on a temporarily patched version and I'll file a few PRs in the next couple of days.
Considering the project "clue/graph" for example. If you happen to install it via "composer install --no-dev", its graph will look like this:
And alternatively, if you install it via "composer install --dev" (the default), its graph will look like this:
So the behavior depends on whether the development dependencies are installed. And in my opinion this is what makes most sense, in order to display what is actually installed.
Even if "phpunit/phpunit" is not installed in the former case, it still makes sense to provide just the indication that it is a development dependency. One thing I'd like to change though, is to give an additional indication that it's in fact not installed (like semi-transparency).
dev-dependencies further by tree should be ignored always
Agreed, and I think this should already be the case.
Additionally, I think instead of adding a "--dev" option, it's probably better to add an "--no-dev" option instead, to mimic composer's current behavior. No matter how the root package is installed, its graph should then looks like this:
Any thoughts?
from graph-composer.
mimicking composer's --no-dev option is a good idea. I do not have any idea how to make it happen but it is definitely a need :) +1
from graph-composer.
@shprink, absolutely! I've opened a PR to support this in the underlying library just yesterday (schmittjoh/composer-deps-analyzer#9). I'll report progress in this ticket.
from graph-composer.
Good to know thanks. At the moment I had to re-install temporary repo with --no-dev to get the right diagram.
Good job btw, you saved my day :)
from graph-composer.
any news?
from graph-composer.
any news?
Yeah, I've pushed an upstream PR (schmittjoh/composer-deps-analyzer#9), but haven't received any feedback so far.
Meanwhile, there's also a pending PR (#19) which implements this in our code base instead of pushing this upstream. I suppose any input is welcome :) Perhaps coordinate efforts and pick up either / decide on either PR? 👍
from graph-composer.
Not much to add, except a strong +1 for being able to ignore require-dev
dependencies of my package and those of the require
packages my package depends on.
from graph-composer.
Related Issues (20)
- Invalid handling of not lowercase package names. HOT 1
- Support running on MS Windows
- Add option to write exported image to STDOUT instead of file HOT 2
- Improve GraphViz support for MS Windows HOT 2
- Unable to run "graph-composer" (installed as a global composer package) HOT 3
- Does not work after 'composer global require clue/graph-composer' HOT 1
- Export graph with links HOT 1
- composer install doesn't work HOT 5
- Release 1.0.0 is missing version HOT 1
- Update symfony/console HOT 4
- Add option to limit depth of the graph HOT 4
- What about left to right direction? (horizontal layout) HOT 1
- What about only draw the dependencies of a sub package in a project? HOT 2
- Add support for imagemap output HOT 1
- add dockerfile/example to ease usage HOT 3
- Compatibility with composer v2 HOT 1
- Highlight outdated packages (`--outdated`)
- Unable to invoke "dot" to create image file HOT 1
- PHP 8+ support HOT 1
- Unable to invoke "dot" to create image file (code 127) HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graph-composer.