PHPackages                             huying/composer-learn - 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. huying/composer-learn

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

huying/composer-learn
=====================

composer学习项目

2.3.0(11y ago)030MITPHPPHP &gt;=5.4.0

Since Apr 11Pushed 11y ago1 watchersCompare

[ Source](https://github.com/xjchengo/composer-learn)[ Packagist](https://packagist.org/packages/huying/composer-learn)[ RSS](/packages/huying-composer-learn/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)DependenciesVersions (6)Used By (0)

composer-learn
==============

[](#composer-learn)

用于学习composer的用法

步骤
==

[](#步骤)

1. 到packagist中查找此项目(考察如何确定包名称)
2. 使用create-project安装2.1.0版，阅读除vendor文件夹、composer.lock、隐藏文件外的所有文件内容
3. 新增站点，站点根目录为composer-learn/public，端口为8008，使[http://localhost:8008/index.php可以访问](http://localhost:8008/index.php%E5%8F%AF%E4%BB%A5%E8%AE%BF%E9%97%AE)
4. 设置composer.json中的autoload使[http://localhost:8008/functions.php可以正常访问，hello\_world函数位于src/helpers.php中](http://localhost:8008/functions.php%E5%8F%AF%E4%BB%A5%E6%AD%A3%E5%B8%B8%E8%AE%BF%E9%97%AE%EF%BC%8Chello_world%E5%87%BD%E6%95%B0%E4%BD%8D%E4%BA%8Esrc/helpers.php%E4%B8%AD)
5. 设置composer.json中的autoload使[http://localhost:8008/exceptions.php可以正常抛出异常，ComposerLearn\\ExceptionOne类位于src/Exceptions.php中](http://localhost:8008/exceptions.php%E5%8F%AF%E4%BB%A5%E6%AD%A3%E5%B8%B8%E6%8A%9B%E5%87%BA%E5%BC%82%E5%B8%B8%EF%BC%8CComposerLearn%5CExceptionOne%E7%B1%BB%E4%BD%8D%E4%BA%8Esrc/Exceptions.php%E4%B8%AD)
6. 设置composer.json中的autoload使[http://localhost:8008/people.php可以正常访问(psr-4)，ComposerLearn\\People类位于src/People.php中](http://localhost:8008/people.php%E5%8F%AF%E4%BB%A5%E6%AD%A3%E5%B8%B8%E8%AE%BF%E9%97%AE(psr-4)%EF%BC%8CComposerLearn%5CPeople%E7%B1%BB%E4%BD%8D%E4%BA%8Esrc/People.php%E4%B8%AD)
7. 在项目根目录下运行git checkout 2.2.0，使[http://localhost:8008/people.php可以正常访问](http://localhost:8008/people.php%E5%8F%AF%E4%BB%A5%E6%AD%A3%E5%B8%B8%E8%AE%BF%E9%97%AE)
8. 在项目根目录下运行git checkout 2.3.0，安装最新的stable版本的brandonwamboldt/utilphp，使[http://localhost:8008/utils.php可以正常访问](http://localhost:8008/utils.php%E5%8F%AF%E4%BB%A5%E6%AD%A3%E5%B8%B8%E8%AE%BF%E9%97%AE)

参考文献
====

[](#参考文献)

1. [composer dump-autoload](https://getcomposer.org/doc/03-cli.md#dump-autoload)
2. [composer validate](https://getcomposer.org/doc/03-cli.md#validate)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 76.9% 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

Every ~0 days

Total

5

Last Release

4055d ago

Major Versions

1.3.0 → 2.1.02015-04-12

### Community

Maintainers

![](https://www.gravatar.com/avatar/812e4f96e9fc673af1ec2b1ad4536369021d54492cc970e9f408b26e4dee3bf4?d=identicon)[xjchengo](/maintainers/xjchengo)

---

Top Contributors

[![realtimebus](https://avatars.githubusercontent.com/u/4567850?v=4)](https://github.com/realtimebus "realtimebus (10 commits)")[![xjchengo](https://avatars.githubusercontent.com/u/4819996?v=4)](https://github.com/xjchengo "xjchengo (3 commits)")

---

Tags

composerlearn

### Embed Badge

![Health badge](/badges/huying-composer-learn/health.svg)

```
[![Health](https://phpackages.com/badges/huying-composer-learn/health.svg)](https://phpackages.com/packages/huying-composer-learn)
```

###  Alternatives

[jean85/pretty-package-versions

A library to get pretty versions strings of installed dependencies

1.3k289.5M63](/packages/jean85-pretty-package-versions)[ergebnis/composer-normalize

Provides a composer plugin for normalizing composer.json.

1.1k37.3M2.1k](/packages/ergebnis-composer-normalize)[icanhazstring/composer-unused

Show unused packages by scanning your code

1.7k7.0M188](/packages/icanhazstring-composer-unused)[bamarni/composer-bin-plugin

No conflicts for your bin dependencies

52722.0M859](/packages/bamarni-composer-bin-plugin)[composer/metadata-minifier

Small utility library that handles metadata minification and expansion.

181115.0M13](/packages/composer-metadata-minifier)[shipmonk/composer-dependency-analyser

Fast detection of composer dependency issues (dead dependencies, shadow dependencies, misplaced dependencies)

6156.7M435](/packages/shipmonk-composer-dependency-analyser)

PHPackages © 2026

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