elyerr/elyscope 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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:

  1. Remove existing vendor directory
  2. Run Composer install
  3. Run PHP-Scoper
  4. Create vendor-packsave backup
  5. Replace vendor with scoped vendor-build
  6. Update installed.json metadata
  7. Generate optimized autoload files

Production install

elyscope install --no-dev

Update dependencies

elyscope update

Workflow:

  1. Restore vendor from vendor-packsave
  2. Run Composer update
  3. Refresh vendor-packsave
  4. Run PHP-Scoper
  5. Replace vendor with scoped vendor-build
  6. Update installed.json metadata
  7. 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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: AGPL-3.0-or-later
  • 更新时间: 2026-06-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固