PHPackages                             tourze/php-packer-analysis - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. tourze/php-packer-analysis

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tourze/php-packer-analysis
==========================

代码分析工具，用于PHP代码的依赖分析、资源查找、类关系分析等

0.0.1(1y ago)01141MITPHPPHP ^8.1CI passing

Since Apr 11Pushed 11mo ago1 watchersCompare

[ Source](https://github.com/tourze/php-packer-analysis)[ Packagist](https://packagist.org/packages/tourze/php-packer-analysis)[ RSS](/packages/tourze-php-packer-analysis/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (6)Versions (2)Used By (1)

php-packer-analysis
===================

[](#php-packer-analysis)

[![Version](https://camo.githubusercontent.com/411be96e8764d25207a2fd1be49722c7f1410adee1603e5fd72968b6cac9817a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d302e302e782d626c75652e737667)](https://packagist.org/packages/tourze/php-packer-analysis)[![License](https://camo.githubusercontent.com/8bb50fd2278f18fc326bf71f6e88ca8f884f72f179d3e555e20ed30157190d0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e737667)](LICENSE)

A PHP code analysis tool for dependency analysis, resource detection, and class relationship analysis. Designed for use in PHP monorepo or modular projects, it provides reliable dependency sorting, circular dependency detection, and resource usage analysis.

Features
--------

[](#features)

- Analyze class, function, and resource dependencies in PHP code
- Detect and report circular dependencies
- Topological sorting for optimized file order
- Resource usage extraction (e.g., files, assets)
- Extensible visitor-based architecture
- Integrates with AST and reflection services

Installation
------------

[](#installation)

### Requirements

[](#requirements)

- PHP &gt;= 8.1
- Composer

### Install via Composer

[](#install-via-composer)

```
composer require tourze/php-packer-analysis
```

Quick Start
-----------

[](#quick-start)

```
use PhpPacker\Analysis\Dependency\DependencyAnalyzer;
use PhpPacker\Analysis\ReflectionService;
use PhpPacker\Ast\AstManager;

$astManager = new AstManager();
$reflectionService = new ReflectionService();
$analyzer = new DependencyAnalyzer($astManager, $reflectionService);

$order = $analyzer->getOptimizedFileOrder('path/to/entry.php');
foreach ($order as $file) {
    echo $file . PHP_EOL;
}
```

Documentation
-------------

[](#documentation)

- Provides API for dependency and resource analysis
- Customizable visitor classes for advanced scenarios
- See source code for advanced configuration and extension

Contributing
------------

[](#contributing)

- Submit issues and pull requests via GitHub
- Follow PSR code style and provide tests
- Run `composer test` before submitting PRs

License
-------

[](#license)

MIT License. Copyright (c) tourze.

Changelog
---------

[](#changelog)

See [Releases](https://github.com/tourze/php-packer-analysis/releases) for version history.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance50

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

403d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e354fdb316da535dfa8ba2e9193a473c403b6bc6fb9170778d1dc50e304c6e9d?d=identicon)[tourze](/maintainers/tourze)

---

Top Contributors

[![tourze](https://avatars.githubusercontent.com/u/13899502?v=4)](https://github.com/tourze "tourze (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/tourze-php-packer-analysis/health.svg)

```
[![Health](https://phpackages.com/badges/tourze-php-packer-analysis/health.svg)](https://phpackages.com/packages/tourze-php-packer-analysis)
```

###  Alternatives

[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k20](/packages/civicrm-civicrm-core)[cognesy/instructor-php

The complete AI toolkit for PHP: unified LLM API, structured outputs, agents, and coding agent control

310107.9k1](/packages/cognesy-instructor-php)[j0k3r/php-readability

Automatic article extraction from HTML

186808.8k6](/packages/j0k3r-php-readability)[symfony/ai-platform

PHP library for interacting with AI platform provider.

51927.7k136](/packages/symfony-ai-platform)[spomky-labs/pwa-bundle

Progressive Web App Manifest Generator Bundle for Symfony.

6144.4k1](/packages/spomky-labs-pwa-bundle)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
