wpelevator/vendor-isolator
最新稳定版本:0.1.0
Composer 安装命令:
composer require wpelevator/vendor-isolator
包简介
Composer plugin to isolate project dependencies by prefixing their namespace
README 文档
README
Composer plugin to isolate project dependencies by prefixing their namespace.
Requirements
- PHP 7.4 or later
- Composer v2
How it Works
-
It registers itself as a Composer plugin when you add it to your project through the
extra.classdirective in thecomposer.jsonfile pointing toWPElevator\Vendor_Isolator\Pluginin php/class-plugin.php. -
It hooks into
pre-autoload-dumpandpost-autoload-dumpComposer events and uses nikic/php-parser to rewrite the namespaces and classname references for all non-development dependencies. It ignores all global function and classes.
To Do
- Describe how this is different from php-scoper and other projects.
Features and Limitations
-
It only rewrites the non-development dependencies in the
vendordirectory, therefore your application code must reference the isolated dependencies by their prefixed namespace. -
It doesn't replace function definitions and calls in the global namespace. Any definitions and calls to global functions will remain in the global namespace after the transformation.
Credits
A fork of and/composer-isolation.
统计信息
- 总下载量: 165
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-03-31