- Added compression for composer-unused.phar. This is done to prepare composer-unused-plugin to work directly with the phar instead of composer requireent
- Added scan strategies for
TypedAttributes
andFullQualifiedParameters
- Add
--output-format
option- Current supported values:
default
andgithub
github
can be used to annotate PR
- Current supported values:
- Add
CiDetector
to change output format according to the current ci environment - Add
symfony/dependency-injection
to leverage autowiring - Add dedicated configuration (
composer-unused.php
)
- Fix
Lexer\Emulative
to use the current php version instead of latest one - Removed
is_dir()
check fromLocalRepository
to avoid crashingfile_get_contents
- Fix phar build using the latest
box-project/box
version - Fix error if
composer.json
does not exist in given path - Fix issue where
Filter
was marked as unused again after being already used - Fix ignore/invalid dependencies showing up in
Ignored
section again
- Change the information about ignored dependencies
- Raised minimum requirement for
composer-unused/symbol-parser
to0.1.7
- Removed custom implementation of DI
- Fixed version output when running
bin/composer-unused --version
- Added CLI argument
composer-json
which can be used to parse external projects. This will default to the current working directory. - Added error message when
composer.json
is not readable - Added check for zombie exclusion. It will report if any excluded packages or pattern did match any package
- Change
bin/composer-unused
to be used as standalone binary - Package type is now
library
instead ofcomposer-plugin
- Removed ability to work as
composer-plugin
(will be supported usingcomposer-unused/composer-unused-plugin
) - Dropped support for php
7.3
- Dropped support for composer v1
- Added an
InstanceofStrategy
which detects usages ininstanceof
expressions #100
- Fixed an issue where
ext-ds
classes where not recognized as used #88 - Fixed an issue where
extends
andimplements
of FQN was not markes as used #90
- Added workflow to verify integrity of build
phar
file - Added self unused dependency check using
bin/composer-unused
- Readded
composer/composer
into root requirements as its required to runbin/composer-unused
- Fixed an issue where log level received wrong type #83 (thanks to @JoshuaBehrens)
- Added
phpspec/prophecy-phpunit
to remove deprecations warnings ofprophecy()
withphpunit/phpunit:^9.0
- Added support for composer 2.0
- Changed the exit code
0
if there are not packages to scan #78
- Fixed an issue where
Core
extension was checked asext-core
instead ofphp
#79
- Added
--no-progress
to suppress progress bar for CI
- Fixed
bin/composer-unused
was unable to detectvendor/autoload.php
when run as direct depdendency
- Added scoped
phar
support - Added
bin/composer-unused
as another entry point
- Moved
composer/composer
into root requirements as its needed to runbin/composer-unused
- Added support to scan for unused php extensions #33 thanks to @marcelthole
- Fixed replaced usage on
Zend\ServiceManager
in configuration files
- Removed shorthand options
-d
and-p
as they could be already in use
- Added custom
psr/container-interface
implementation as a replacement forzendframework/zend-servicemanager
- Inverted the validation of valid Composer package types (no longer a whitelist, but rather a blacklist of invalid types)
- Fixed issue with short option for cli parameter (
--excludeDir|-d
and--excludePackage|-p
)
- Fixed support for typo3 packages thanks to @tomasnorre
- Fixed support for yii2 packages thanks to @moltam
- Fixed issue where composer-unused-dump was created even when not in debug mode #41
- Fixed issue where exit code was greater 0 on skipped packages, while it should be on unused packages #42 Thanks to @binarious
- Fixed issue where qualified namespaces where not recognized when called from global namespace
- This caused some false-positives (e.g. for symfony-bundles)
- Fixed unused scan for
symfony-bundle
types
-
Fixed an issue where a package could provide an empty as well as a valid namespace
{ "autoload": { "psr-4": { "": "src/", "A\\": "src/" } } }
- The plugin will exit with a code > 0 if there are unused packages
- Temporary solution to "silent" ignore ext- packages (might be changed in the future #33)
- Cli parameter to exit clean (even with unused packages) --ignore-exit-code
- Fixed an issue where class constant
Namespace\Foobar::class
was not recognized as usage #29 - Fixed an issue where an empty namespace caused an exception #27
- Ignore packages that are not of type
library
#25 composer-schema#type - Ignore packages that define not namespace #27
- Add ability to ignore packages by config #26 README.md
- Packages are no longer shown as
unused
if:
- Improve error handling
- Fixed an issue where only
autoload-dev
provided a needed namespace
-
Change the way how the plugin searched for usages Previously it used only
autoload
andautoload-dev
directives of the projects owncomposer.json
.This was changed so that now every file matching
*.php
beside thecomposer.json
will be scanned. With the exception thatvendor
is always excluded
- Added new cli parameters
--excludeDir|-xd
to add additional folders to exclude from scan--excludePackage|-xp
to add a package to ignore during scan
- Added Di Container for easier development and testing
- Fixed issue where static calls raised an exception
- Added error handler for debug usage
- Use
-vvv
to enable debug mode and create a dump file
- Use
Improved:
- Added full integration test with composer test project
- Fixed issue with static calls on variable types
- Fixed issue with problems on identifying on group uses
Improved:
- Added more stable tests for validate parsing strategies
- Fixed issue with different composer directives (classmap, files)
Initial Release