elyerr/elyscope
Composer 安装命令:
composer require elyerr/elyscope
包简介
PHP dependency isolation and namespace scoping tool.
README 文档
README
PHP dependency isolation and namespace scoping tool for modular applications.
Elyscope is a core component of the ElyMod ecosystem and works alongside OAuth2 Passport Server to enable true application modularization in PHP.
Why Elyscope?
Traditional Composer projects share a single vendor directory. This becomes a problem when building modular systems because modules may:
- Require different versions of the same package.
- Introduce dependency conflicts.
- Pollute the application's global namespace.
- Break compatibility between modules.
- Become difficult to distribute independently.
Elyscope solves these problems by creating isolated and scoped dependencies for each module.
Using PHP-Scoper and an automated Composer workflow, Elyscope generates a dedicated dependency layer that can coexist with the host application without namespace collisions.
What problems does it solve?
- Dependency version conflicts.
- Namespace collisions.
- Vendor pollution.
- Package compatibility issues.
- Module portability limitations.
- Shared dependency management problems.
ElyMod Ecosystem
Elyscope is an essential component of:
- ElyMod
- OAuth2 Passport Server
Together they provide the foundation required to build modular PHP and Laravel applications where each module can manage its own dependencies without affecting the host application.
Features
- Dependency isolation using PHP-Scoper
- Automatic namespace prefixing
- Clean vendor backup management
- Scoped vendor generation
- Composer command passthrough
- Automatic installed.json synchronization
- Compatible with existing Composer workflows
- Designed for modular PHP applications
- Supports independent module distribution
Installation
Global Installation
Install ElyScope globally using Composer:
composer global require elyerr/elyscope
Verify the installation:
elyscope --help
Command Not Found?
If elyscope is not recognized, Composer's global bin directory may not be available in your system PATH.
Display the Composer global bin directory:
composer global config bin-dir --absolute
You can run ElyScope directly using the full path returned by the command above:
/path/to/composer/bin/elyscope --help
Common locations include:
~/.config/composer/vendor/bin/elyscope --help
or
~/.composer/vendor/bin/elyscope --help
Alternatively, you can execute ElyScope through PHP without modifying your PATH:
php "$(composer global config bin-dir --absolute)/elyscope" --help
Add Composer Bin Directory to PATH
For a permanent solution, add Composer's global bin directory to your system PATH.
Example for Bash:
export PATH="$(composer global config bin-dir --absolute):$PATH"
Add the command above to your ~/.bashrc, ~/.zshrc, or shell configuration file.
Create a Symbolic Link
You can also create a symbolic link to make the command available system-wide:
sudo ln -s "$(composer global config bin-dir --absolute)/elyscope" /usr/local/bin/elyscope
Verify that the link works:
elyscope --help
Usage
Install dependencies
elyscope install
Workflow:
- Remove existing vendor directory
- Run Composer install
- Run PHP-Scoper
- Create vendor-packsave backup
- Replace vendor with scoped vendor-build
- Update installed.json metadata
- Generate optimized autoload files
Production install
elyscope install --no-dev
Update dependencies
elyscope update
Workflow:
- Restore vendor from vendor-packsave
- Run Composer update
- Refresh vendor-packsave
- Run PHP-Scoper
- Replace vendor with scoped vendor-build
- Update installed.json metadata
- Generate optimized autoload files
Production update
elyscope update --no-dev
Composer Passthrough
Commands not handled by Elyscope are automatically forwarded to Composer.
Examples:
elyscope require monolog/monolog
elyscope remove monolog/monolog
elyscope show
elyscope outdated
elyscope validate
Directory Structure
vendor/
vendor-packsave/
vendor-build/
vendor
Scoped dependencies used by the module.
vendor-packsave
Clean backup of the original Composer dependencies before scoping.
vendor-build
Temporary PHP-Scoper output directory.
Requirements
- PHP 8.2+
- Composer
- PHP-Scoper
License
Copyright (C) 2026 Elvis Y. Roman C.
Licensed under the GNU Affero General Public License v3.0 or later.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: AGPL-3.0-or-later
- 更新时间: 2026-06-19