Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Composer Unused Laravel Package

icanhazstring/composer-unused

composer-unused detects and removes unused Composer dependencies in PHP/Laravel projects. It analyzes your codebase to find packages not referenced, reports what can be safely removed, and helps keep composer.json/lock lean and maintainable.

View on GitHub
Deep Wiki
Context7
0.9.4

Added

Fixed

Changed

Removed

Security

Deprecation

0.9.3

Added

Fixed

Changed

Removed

Security

Deprecation

0.9.2

Added

Fixed

Changed

Removed

Security

Deprecation

0.9.1

Added

Fixed

Changed

Removed

Security

Deprecation

0.9.0

Added

Fixed

Changed

Removed

Security

Deprecation

0.8.11

Added

Fixed

Changed

Removed

Security

Deprecation

0.8.10

Added

Fixed

Changed

Removed

Security

Deprecation

0.8.9

Added

Fixed

Changed

Removed

Security

Deprecation

0.8.8

Added

Fixed

Changed

Removed

Security

Deprecation

0.8.2

Added

Fixed

Changed

Removed

Security

Deprecation

0.8.7

Added

Fixed

Changed

Removed

Security

Deprecation

0.8.6

Added

Fixed

Changed

Removed

Security

Deprecation

0.8.1

Added

  • Add --output-format option
    • Current supported values: default and github
    • github can be used to annotate PR
  • 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)

Fixed

  • Fix Lexer\Emulative to use the current php version instead of latest one
  • Removed is_dir() check from LocalRepository to avoid crashing file_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

Changed

  • Change the information about ignored dependencies
  • Raised minimum requirement for composer-unused/symbol-parser to 0.1.7

Removed

  • Removed custom implementation of DI

Security

Deprecation

0.8.0

Fixed

  • Fixed version output when running bin/composer-unused --version

Added

  • 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

Changed

  • Change bin/composer-unused to be used as standalone binary
  • Package type is now library instead of composer-plugin

Removed

  • Removed ability to work as composer-plugin (will be supported using composer-unused/composer-unused-plugin)
  • Dropped support for php 7.3
0.8.5

Added

Fixed

Changed

Removed

Security

Deprecation

0.8.4

Added

Fixed

Changed

Removed

Security

Deprecation

0.8.3

Added

Fixed

Changed

Removed

Security

Deprecation

0.7.7

Added

0.7.6

Removed

  • Dropped support for composer v1
0.7.5

Added

  • Added an InstanceofStrategy which detects usages in instanceof expressions #100
0.7.4

Fixed

  • Fixed an issue where ext-ds classes where not recognized as used #88
  • Fixed an issue where extends and implements of FQN was not markes as used #90
0.7.3

Added

  • Added workflow to verify integrity of build phar file
  • Added self unused dependency check using bin/composer-unused

Changed

  • Readded composer/composer into root requirements as its required to run bin/composer-unused

Fixed

0.7.2

Added

  • Added phpspec/prophecy-phpunit to remove deprecations warnings of prophecy() with phpunit/phpunit:^9.0
  • Added support for composer 2.0

Changed

  • Changed the exit code 0 if there are not packages to scan #78

Fixed

  • Fixed an issue where Core extension was checked as ext-core instead of php #79
0.7.1

Added

  • Added --no-progress to suppress progress bar for CI

Fixed

  • Fixed bin/composer-unused was unable to detect vendor/autoload.php when run as direct depdendency
0.7.0

Added

  • Added scoped phar support
  • Added bin/composer-unused as another entry point

Changed

  • Moved composer/composer into root requirements as its needed to run bin/composer-unused
0.6.2

Added

0.6.1

Fixed

  • Fixed replaced usage on Zend\ServiceManager in configuration files

Removed

  • Removed shorthand options -d and -p as they could be already in use
0.6.0

Changed

  • Added custom psr/container-interface implementation as a replacement for zendframework/zend-servicemanager
  • Inverted the validation of valid Composer package types (no longer a whitelist, but rather a blacklist of invalid types)

Fixed

  • Fixed issue with short option for cli parameter (--excludeDir|-d and --excludePackage|-p)
0.5.6

Fixed

0.5.5

Fixed

0.5.4

Fixed

  • 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](https://github.com/binarious)
0.5.3

Fixed

  • Fixed issue where qualified namespaces where not recognized when called from global namespace
    • This caused some false-positives (e.g. for symfony-bundles)
0.5.2

Fixed

  • Fixed unused scan for symfony-bundle types
0.5.1

Fixed

  • Fixed an issue where a package could provide an empty as well as a valid namespace

    {
    "autoload": {
      "psr-4": {
          "": "src/",
          "A\\": "src/"
        }
      }
    }
    
0.5.0

Changed

  • 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)

Added

  • Cli parameter to exit clean (even with unused packages) --ignore-exit-code
0.4.0

Fixed

  • 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

Added

  • 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:
    • They are suggested by other packages (will show information about suggested by: package/a) #23
    • They are required by other packages (will show information about required by: package/a) #22

[0.3.1] - 2019-03-26

Fixed

  • Improve error handling
0.3.0

Fixed

  • Fixed an issue where only autoload-dev provided a needed namespace

Changed

  • Change the way how the plugin searched for usages Previously it used only autoload and autoload-dev directives of the projects own composer.json.

    This was changed so that now every file matching *.php beside the composer.json will be scanned. With the exception that vendor is always excluded

Added

  • 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
0.2.0

Fixed

  • Fixed issue where static calls raised an exception

Added

  • Added error handler for debug usage
    • Use -vvv to enable debug mode and create a dump file

Improved:

  • Added full integration test with composer test project
0.1.2

Fixed

  • 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
0.1.1

Fixed

  • Fixed issue with different composer directives (classmap, files)
0.1.0

Initial Release

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport