PHPackages                             sebastiaanluca/php-stub-generator - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. sebastiaanluca/php-stub-generator

AbandonedArchivedLibrary[File &amp; Storage](/categories/file-storage)

sebastiaanluca/php-stub-generator
=================================

Easily generate files and classes from stubs.

0.1.1(9y ago)104.4k51MITPHPPHP ^7

Since Feb 17Pushed 6y ago1 watchersCompare

[ Source](https://github.com/sebastiaanluca/php-stub-generator)[ Packagist](https://packagist.org/packages/sebastiaanluca/php-stub-generator)[ Docs](https://github.com/sebastiaanluca/php-stub-generator)[ RSS](/packages/sebastiaanluca-php-stub-generator/feed)WikiDiscussions develop Synced 2mo ago

READMEChangelogDependencies (3)Versions (4)Used By (1)

PHP Stub Generator
==================

[](#php-stub-generator)

[![Latest Version on Packagist](https://camo.githubusercontent.com/ba1b3892f888c79c3373ccd9c305cba6fc32cbeac37610727d26bcc90878a23d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7365626173746961616e6c7563612f7068702d737475622d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sebastiaanluca/php-stub-generator)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/b3ad1f2cf8187d5047d6079681d950de77bf1bd72df69b5df5cba774e3229e0f/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7365626173746961616e6c7563612f7068702d737475622d67656e657261746f722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/sebastiaanluca/php-stub-generator)[![Total Downloads](https://camo.githubusercontent.com/d2f9d59151421286905f4f7e0c9e2c7c1a525b28e85e884b8c3ee19eda685402/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7365626173746961616e6c7563612f7068702d737475622d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sebastiaanluca/php-stub-generator)

[![Follow me on Twitter](https://camo.githubusercontent.com/bde346ed8efc8b2458386b36256c64e3fe010276f449b80fe4f663c4c8bbd83e/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f666f6c6c6f772f7365626173746961616e6c7563612e7376673f7374796c653d736f6369616c)](https://twitter.com/sebastiaanluca)[![Share this package on Twitter](https://camo.githubusercontent.com/cb820a0ecc9645168e33b03925d7f14691262ddbaeaf66a0a91697803d0cba2d/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f75726c2f687474702f736869656c64732e696f2e7376673f7374796c653d736f6369616c)](https://twitter.com/home?status=https%3A//github.com/sebastiaanluca/php-stub-generator%20via%20%40sebastiaanluca)

Easily generate files and classes from stubs. Ideal for e.g. additional Laravel make commands!

Install
-------

[](#install)

Via Composer:

```
composer require sebastiaanluca/php-stub-generator
```

Usage
-----

[](#usage)

```
$stub = new StubGenerator(
    __DIR__ . '/stubs/migration.stub',
    $target
);

$stub->render([
    ':CLASS_NAME:' => 'CreateUsersTable',
    ':TABLE_NAME:' => 'users',
]);
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
composer install
composer test
```

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Sebastiaan Luca](https://github.com/sebastiaanluca)
- [All Contributors](../../contributors)

About
-----

[](#about)

My name is Sebastiaan and I'm a freelance back-end developer specializing in building high-end, custom Laravel applications. Check out my [portfolio](http://www.sebastiaanluca.com) for more information and my other [packages](https://github.com/sebastiaanluca?tab=repositories) to kick-start your next project. Have a project that could use some guidance? Send me an e-mail at !

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity55

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 ~0 days

Total

2

Last Release

3369d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/711940?v=4)[Sebastiaan Luca](/maintainers/sebastiaanluca)[@sebastiaanluca](https://github.com/sebastiaanluca)

---

Top Contributors

[![sebastiaanluca](https://avatars.githubusercontent.com/u/711940?v=4)](https://github.com/sebastiaanluca "sebastiaanluca (29 commits)")

---

Tags

filesgeneratephppopulaterenderstubsphpstubgeneratorfileSebastiaanLuca

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sebastiaanluca-php-stub-generator/health.svg)

```
[![Health](https://phpackages.com/badges/sebastiaanluca-php-stub-generator/health.svg)](https://phpackages.com/packages/sebastiaanluca-php-stub-generator)
```

###  Alternatives

[soarecostin/file-vault

192195.0k](/packages/soarecostin-file-vault)[blueimp/jquery-file-upload

File Upload widget for jQuery.

141.5M18](/packages/blueimp-jquery-file-upload)[brainstud/file-vault

1231.6k](/packages/brainstud-file-vault)

PHPackages © 2026

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