death_satan / composer
composer v2 helper vendor
Fund package maintenance!
Open Collective
hyperf.wiki/#/zh-cn/donate
Requires
- php: >=7.4
- ext-json: *
- death_satan/array-helpers: ^1.0
Requires (Dev)
- phpunit/phpunit: ^9.5.0
- symfony/var-dumper: *
README
composer 助手
便捷调用部分composer ClassLoader和InstalledVersions开发的接口
!!! 注意安装需要composer v2
安装
composer
#安装最新版
composer require death_satan/composer --dev
使用
//获取当前应用程序内的ClassLoader //如果当前应用程序没有进行存储则手动去获取 #手动获取 classLoader //获取autoload.php目录并把它require进来 /** * @var \Composer\Autoload\ClassLoader $classLoader */ $classLoader = require __DIR__.DIRECTORY_SEPARATOR.'vendor'.DIRECTORY_SEPARATOR.'autoload.php' $composer = new \SaTan\ComposerHelpers($classLoader);