PHPackages                             onema/classyfile - 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. onema/classyfile

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

onema/classyfile
================

This component provides a way to break files containing multiple classes into single files per class.

1.0.0(10y ago)524MITPHPPHP &gt;=5.4

Since May 11Pushed 10y ago2 watchersCompare

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

READMEChangelog (7)Dependencies (7)Versions (11)Used By (0)

classyfile
==========

[](#classyfile)

[![SensioLabsInsight](https://camo.githubusercontent.com/ff80692eb4918a82089e929b4541c9af2bc58332acae94aa072239a76ad484ac/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f37636438313033392d343664322d346131382d623537622d3632343263623138663362342f6d696e692e706e67)](https://insight.sensiolabs.com/projects/7cd81039-46d2-4a18-b57b-6242cb18f3b4)[![Code Climate](https://camo.githubusercontent.com/d3c06a89ec1440cfcce8d599f983ac86576457474bc12ec4e1380b430abc04f5/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6f6e656d612f636c6173737966696c652f6261646765732f6770612e737667)](https://codeclimate.com/github/onema/classyfile)[![Build Status](https://camo.githubusercontent.com/3b503007d64d8a790d09ed20d9db8bad9845b2c61bd69f8317a87b7acf6fa292/68747470733a2f2f7472617669732d63692e6f72672f6f6e656d612f636c6173737966696c652e7376673f6272616e63683d646576656c6f70)](https://travis-ci.org/onema/classyfile) [![Coverage Status](https://camo.githubusercontent.com/d7b602279e6f31d7b39719b2eca30abdeabb4229b96f02d95e114b494ffe2557/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6f6e656d612f636c6173737966696c652f62616467652e7376673f6272616e63683d646576656c6f70)](https://coveralls.io/r/onema/classyfile?branch=develop)[![Documentation Status](https://camo.githubusercontent.com/7effa38456e72ae1c4592a2bfff4504c93d2c057806fbfc9b8a2f96686322bc7/68747470733a2f2f72656164746865646f63732e6f72672f70726f6a656374732f636c6173737966696c652f62616467652f3f76657273696f6e3d6c6174657374)](http://classyfile.readthedocs.org/en/latest/)[![MIT License](https://camo.githubusercontent.com/57b0e591dfa3a828f40bd9facbd526f42c4c5de623a4281266a803bc3d9a308d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6f6e656d612f636c6173737966696c652e7376673f7374796c653d666c6174)](https://tldrlegal.com/license/mit-license)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/f6a8c87c9af960ff8de5189ed4e23e593a3bab65ab249ae8a620dfe9702cf784/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6f6e656d612f636c6173737966696c652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/onema/classyfile/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/e914ae6c5a93571b7c88945131e2f665a8a2eea844efb15ee98ff33ee97b9f24/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6f6e656d612f636c6173737966696c652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/onema/classyfile/?branch=master)[![Build Status](https://camo.githubusercontent.com/54a6be2b97ea8448d3a2a7eab8485d09809b61b88d9d8ae68f73a6db25756487/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6f6e656d612f636c6173737966696c652f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/onema/classyfile/build-status/master)

Summary
-------

[](#summary)

Provides a way to break PHP files containing multiple classes and creates single files per class. This can be useful when refactoring old libraries.

This library uses the [nikic/PHP-Parser](https://github.com/nikic/PHP-Parser) to parse all the php classes.

See the [Documentation](http://classyfile.readthedocs.org/en/latest/) for more information.

Requirements
------------

[](#requirements)

- PHP 5.4.0

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

[](#installation)

### Install it using composer

[](#install-it-using-composer)

```
composer require 'onema/classyfile:^1.0.0'

```

Or manually add it to the `composer.json` file

```
{
    "require": {
        "onema/classyfile": "^1.0.0"
    }
}
```

After it has been installed you can run the command: `php vendor/bin/classyfile`

### Download from github

[](#download-from-github)

You can download the project from github. You still need to use composer to install all the dependencies.

```
git clone git@github.com:onema/classyfile.git
cd classyfile
composer install

```

After it has been installed you can run the command: `php classyfile`

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

[](#documentation)

See the [documentation](docs/index.md) section.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity64

Established project with proven stability

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

Recently: every ~44 days

Total

7

Last Release

3833d ago

Major Versions

0.5.0 → 1.0.02015-11-19

PHP version history (2 changes)0.2.0PHP &gt;=5.5

1.0.0PHP &gt;=5.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/6de02da1f3fa7d732e6c083b1c03855d234b2ad5058cfa930e074703e1933b23?d=identicon)[onema](/maintainers/onema)

---

Top Contributors

[![onema](https://avatars.githubusercontent.com/u/532616?v=4)](https://github.com/onema "onema (198 commits)")

---

Tags

convertclassfilesingle

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/onema-classyfile/health.svg)

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

###  Alternatives

[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

1.6k263.6M790](/packages/league-flysystem-aws-s3-v3)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[unisharp/laravel-filemanager

A file upload/editor intended for use with Laravel 5 to 10 and CKEditor / TinyMCE

2.2k3.3M74](/packages/unisharp-laravel-filemanager)[silverstripe/framework

The SilverStripe framework

7213.5M2.5k](/packages/silverstripe-framework)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)

PHPackages © 2026

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