PHPackages                             mix/init - 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. mix/init

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

mix/init
========

Help execute static initialization, usually for preloading singletons

v3.0.5(4y ago)0573Apache-2.0PHPPHP &gt;=7.1.0

Since Sep 18Pushed 4y ago1 watchersCompare

[ Source](https://github.com/mix-php/init)[ Packagist](https://packagist.org/packages/mix/init)[ Docs](https://openmix.org/mix-php)[ RSS](/packages/mix-init/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (2)Versions (6)Used By (0)

> OpenMix 出品：[https://openmix.org](https://openmix.org/mix-php)

Mix Init
========

[](#mix-init)

Help execute static initialization of the class, usually for preloading singletons

帮助执行类的静态初始化，通常用于预加载单例

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

[](#installation)

```
composer require mix/init

```

Quick start
-----------

[](#quick-start)

定义类的静态初始化方法

```
class Example
{
    public static function init()
    {
        // do something
    }
}
```

从目录执行

> 可以通过定制方法名称，达到在不同的场景初始化的目的

```
Mix\Init\StaticInit::finder('/path/classdir')->exec('init');
```

License
-------

[](#license)

Apache License Version 2.0,

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 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

Every ~24 days

Total

5

Last Release

1608d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16074765?v=4)[LIU JIAN](/maintainers/onanying)[@onanying](https://github.com/onanying)

---

Top Contributors

[![onanying](https://avatars.githubusercontent.com/u/16074765?v=4)](https://github.com/onanying "onanying (11 commits)")

---

Tags

mixinit

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mix-init/health.svg)

```
[![Health](https://phpackages.com/badges/mix-init/health.svg)](https://phpackages.com/packages/mix-init)
```

###  Alternatives

[misterbk/mix

Helper plugin for Laravel Mix in Craft CMS templates

51172.4k4](/packages/misterbk-mix)[aedart/athenaeum

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

245.2k](/packages/aedart-athenaeum)[mix/mix-skeleton

Full-featured development skeleton

132.1k](/packages/mix-mix-skeleton)

PHPackages © 2026

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