🎉 Version 2 🎉 #11
navarr
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
After a lot of hard work, I'm proud to present Version 2 of
navarr/dependency-annotation
!Addition and preference of PHP8 Attribute
This library now uses a PHP8 attribute as it's preference when parsing dependencies, making the package name a little bit of a misnomer. This does not mean the project is limited to PHP8, however! PHP8 Attributes are fully compatible with older versions of PHP so long as they do not take up more than one line.
The preferred way of declaring your dependencies is, to now:
And then, in your PHP code:
By default, the tool will no longer search for or output annotations. If you would like to run this on older codebases, you can include the flag
--include-legacy-annotations
.Additional methods of output
Our only command is still
composer why-block
for now, but we've expanded the available output formats. You can pass flag--format
or-f
with a value of text, csv, json, or xml! In all cases, the results will be written to standard out and can be redirected into a file or piped into a utility likejq
.Improved Stability
I have gone absolutely crazy with testing. This repository uses phpstan at the strictest available level, runs at least 80 unit tests with over 250 assertions, and the output of the Infection mutation testing library is paid attention to for hardening to ensure edge cases are being covered.
Final Version of
why-block
This discussion was created from the release 🎉 Version 2 🎉 .
Beta Was this translation helpful? Give feedback.
All reactions