PHPackages                             sandromiguel/php-sceleto - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. sandromiguel/php-sceleto

ActiveProject[Testing &amp; Quality](/categories/testing)

sandromiguel/php-sceleto
========================

Sample of PHP file structure.

v2.4.0(1y ago)618[1 PRs](https://github.com/SandroMiguel/php-sceleto/pulls)MITPHP &gt;=8.1CI failing

Since Jul 5Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/SandroMiguel/php-sceleto)[ Packagist](https://packagist.org/packages/sandromiguel/php-sceleto)[ Docs](https://github.com/SandroMiguel/php-sceleto)[ RSS](/packages/sandromiguel-php-sceleto/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (22)Used By (0)

[![PHP Sceleto](https://camo.githubusercontent.com/c9fc619c5788e607be3db3eb26a3ee9c74e88d8a7a3f103e81f31cdbbeb30fd7/687474703a2f2f73616e64726f6d696775656c2e636f6d2f686f73742f7068702d7363656c65746f2e706e67)](https://camo.githubusercontent.com/c9fc619c5788e607be3db3eb26a3ee9c74e88d8a7a3f103e81f31cdbbeb30fd7/687474703a2f2f73616e64726f6d696775656c2e636f6d2f686f73742f7068702d7363656c65746f2e706e67)

Welcome to PHP Sceleto
======================

[](#welcome-to-php-sceleto)

**A PHP directory structure for my libraries.**

[![license](https://camo.githubusercontent.com/59497bc4563dd468e37bbf539439e60cacf196f537f678b721a8efabf21c64ef/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c6174)](LICENSE)

PHP Sceleto is a directory structure template designed for creating PHP libraries. It provides a well-organized skeleton that I use for my PHP library projects and have decided to share with the community. This template is intended to streamline the development of PHP libraries, saving you time on initial setup and configuration.

Features
--------

[](#features)

- Organized directory structure for your PHP library:
- Includes common project files like `.editorconfig`, `.gitignore`, and `.htaccess`.
- Comes with a sample `composer.json` for easy Composer integration.
- Includes a sample PHPUnit configuration file `phpunit.xml.dist`.
- License and contributing guidelines for open-source projects.

Directory structure
-------------------

[](#directory-structure)

```
your-php-library/
│
├──┬ src/
│  │  ├─── [SomeClass].php
│  │  ├─── [AnotherClass].php
│  │  ├─── ...
│  │
│  └ tests/
│     ├─── [SomeClass]Test.php
│     ├─── [AnotherClass]Test.php
│     ├─── ...
│
├─── logs/
├─── docs/
├─── vendor/
├─── .editorconfig
├─── .gitignore
├─── .htaccess
├─── composer.json
├─── composer.lock
├─── phpunit.xml.dist
├─── LICENSE
├─── CONTRIBUTING.md
└─── README.md

```

Files and Folders
-----------------

[](#files-and-folders)

Files and folders overview.

File/FolderDescription**src/**Source code of the applicationsrc/**SomeClass.php**Example PHP class file (SomeClass)src/**AnotherClass.php**Example PHP class file (AnotherClass)src/**tests/**Tests directorytests/**SomeClassTest.php**PHPUnit test case for `SomeClass` (Example class)tests/**AnotherClassTest.php**PHPUnit test case for `AnotherClass` (Example class)**logs/**Log files (e.g., code coverage report)**docs/**Documentation files (e.g., PHPDoc)**vendor/**Composer vendor directory contains your dependencies**.editorconfig**IDE coding style settings**.gitignore**Files and directories that Git should ignore**.htaccess**Hypertext access file for Apache configuration**composer.json**Composer dependencies**composer.lock**Composer lock file**phpunit.xml.dist**PHPUnit configuration file**LICENSE**License document**CONTRIBUTING.md**Contributing guidelines**README.md**This documentGetting Started
---------------

[](#getting-started)

Follow these steps to use PHP Sceleto as a starting point for your PHP library:

### Step 1 - Create a new project using Composer:

[](#step-1---create-a-new-project-using-composer)

```
composer create-project SandroMiguel/php-sceleto your-php-library
```

Replace `your-php-library` with your desired name

Now, you have a clean slate to begin developing your PHP library independently. You can add your own code, configuration, and documentation within the provided directory structure.

### Step 2 - Bonus: Continue Your Project Setup

[](#step-2---bonus-continue-your-project-setup)

If you wish to further enhance your project and follow best practices, consider continuing your project setup with [Some Awesome Project](https://github.com/SandroMiguel/some-awesome-project). Some Awesome Project provides a set of guidelines and additional configurations that can make your project development even more efficient.

Composer commands
-----------------

[](#composer-commands)

You can use Composer commands to streamline various development tasks. Here are the available commands and how to run them:

### Check for Outdated Dependencies

[](#check-for-outdated-dependencies)

To check for outdated Composer dependencies that are defined directly in your project, run:

```
composer outdated:direct
```

### Run PHP CodeSniffer

[](#run-php-codesniffer)

To run PHP CodeSniffer on the source code in the src/php directory, use the following command:

```
composer phpcs
```

### Run PHP CodeSniffer on a Specific File

[](#run-php-codesniffer-on-a-specific-file)

For running PHP CodeSniffer on a specific file, use the following command, replacing `[file]` with the path to your target file:

```
composer phpcs:file [file]
```

### Analyze Code Quality and Architecture

[](#analyze-code-quality-and-architecture)

To analyze code quality and architecture with PHP Insights, run:

```
composer phpinsights
```

### Generate PHP Metrics Report

[](#generate-php-metrics-report)

Generate a PHP Metrics report and display the Node.js version with:

```
composer phpmetrics
```

### Run PHPStan Analysis

[](#run-phpstan-analysis)

For PHPStan analysis with level 7 on the source code in the `src/php` directory, use:

```
composer phpstan
```

### Run Psalm Static Analysis

[](#run-psalm-static-analysis)

To run Psalm static analysis, simply use:

```
composer psalm
```

### Tail Application Logs

[](#tail-application-logs)

To tail the application log located at `./storage/log/app.log`, use:

```
composer logs
```

### Run PHPUnit Tests

[](#run-phpunit-tests)

For running PHPUnit tests, execute:

```
composer test
```

To run PHPUnit tests with filtering, execute:

```
composer test:filter methodName ClassName path/to/file.php

```

### Run PHPUnit Tests with Coverage Report

[](#run-phpunit-tests-with-coverage-report)

To run PHPUnit tests and generate a coverage report in the `log/report` directory, use:

```
composer test:coverage
```

Credits
-------

[](#credits)

- [EditorConfig](https://editorconfig.org/): IDE coding style settings.
- [PHPUnit](https://phpunit.de/): Testing framework for PHP.
- [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer): PHP coding standards checker and fixer.
- [PHP Insights](https://phpinsights.com/): Code quality and architecture analysis tool.
- [PHP Metrics](https://phpmetrics.org/): PHP metrics generator.
- [PHPStan](https://phpstan.org/): PHP static analysis tool.
- [Psalm](https://psalm.dev/): Static analysis tool for PHP.
- [Composer](https://getcomposer.org/): Dependency management for PHP.
- Logo skeleton - made by [Freepik](http://www.freepik.com) from [www.flaticon.com](https://www.flaticon.com/) is licensed by [CC 3.0 BY](http://creativecommons.org/licenses/by/3.0/)

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

[](#contributing)

Want to contribute? All contributions are welcome. Read the [contributing guide](CONTRIBUTING.md).

Questions
---------

[](#questions)

If you have questions tweet me at [@sandro\_m\_m](https://twitter.com/sandro_m_m) or [open an issue](../../issues/new).

Changelog
---------

[](#changelog)

See [CHANGELOG.md](CHANGELOG.md)

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details

\*\*~ sharing is caring ~\*\*

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance58

Moderate activity, may be stable

Popularity11

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 76.6% 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 ~84 days

Total

12

Last Release

472d ago

Major Versions

v0.5.0 → v1.0.02023-10-07

v0.5.1 → v2.0.02023-10-10

PHP version history (2 changes)0.4.2PHP &gt;=7.2.0

v2.0.0PHP &gt;=8.1

### Community

Maintainers

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

---

Top Contributors

[![SandroMiguel](https://avatars.githubusercontent.com/u/6423157?v=4)](https://github.com/SandroMiguel "SandroMiguel (59 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (11 commits)")[![SandroMiguelMarques](https://avatars.githubusercontent.com/u/31343485?v=4)](https://github.com/SandroMiguelMarques "SandroMiguelMarques (4 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")

---

Tags

directorylibraryphpskeletonstructurephpphpunitdirectorystructureSkeleton

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/sandromiguel-php-sceleto/health.svg)

```
[![Health](https://phpackages.com/badges/sandromiguel-php-sceleto/health.svg)](https://phpackages.com/packages/sandromiguel-php-sceleto)
```

###  Alternatives

[nunomaduro/mock-final-classes

Allows mocking of final methods and classes in PHP.

113854.3k23](/packages/nunomaduro-mock-final-classes)[hot/phpunit-runner

The lib allows to watch phpunit tests

3066.9k4](/packages/hot-phpunit-runner)[robiningelbrecht/phpunit-coverage-tools

PHPUnit coverage tools

1783.0k33](/packages/robiningelbrecht-phpunit-coverage-tools)[phrozenbyte/phpunit-array-asserts

Provides various array-related PHPUnit assertions, primarily used for API testing.

1055.0k1](/packages/phrozenbyte-phpunit-array-asserts)[cable8mm/water-melon

Water Melon is simple melon.com api sdk for php

182.7k](/packages/cable8mm-water-melon)

PHPackages © 2026

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