{"id":15159656,"url":"https://github.com/sandromiguel/php-sceleto","last_synced_at":"2025-06-30T22:06:24.471Z","repository":{"id":89912163,"uuid":"155059960","full_name":"SandroMiguel/php-sceleto","owner":"SandroMiguel","description":"A PHP directory structure for my libraries","archived":false,"fork":false,"pushed_at":"2025-02-28T17:47:50.000Z","size":20094,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-30T22:06:07.096Z","etag":null,"topics":["directory","library","php","skeleton","structure"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SandroMiguel.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-10-28T10:43:12.000Z","updated_at":"2025-03-20T15:31:53.000Z","dependencies_parsed_at":"2023-05-30T11:45:55.638Z","dependency_job_id":"8995df73-3dac-4b99-bec2-8167403847ed","html_url":"https://github.com/SandroMiguel/php-sceleto","commit_stats":null,"previous_names":[],"tags_count":16,"template":true,"template_full_name":null,"purl":"pkg:github/SandroMiguel/php-sceleto","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SandroMiguel%2Fphp-sceleto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SandroMiguel%2Fphp-sceleto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SandroMiguel%2Fphp-sceleto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SandroMiguel%2Fphp-sceleto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SandroMiguel","download_url":"https://codeload.github.com/SandroMiguel/php-sceleto/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SandroMiguel%2Fphp-sceleto/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262857289,"owners_count":23375492,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["directory","library","php","skeleton","structure"],"created_at":"2024-09-26T21:41:10.511Z","updated_at":"2025-06-30T22:06:24.415Z","avatar_url":"https://github.com/SandroMiguel.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"http://sandromiguel.com/host/php-sceleto.png\" alt=\"PHP Sceleto\" /\u003e\u003c/p\u003e\n\n# Welcome to PHP Sceleto\n\n**A PHP directory structure for my libraries.**\n\n[![license](https://img.shields.io/badge/License-MIT-blue.svg?style=flat)](LICENSE)\n\nPHP 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.\n\n## Features\n\n-   Organized directory structure for your PHP library:\n-   Includes common project files like `.editorconfig`, `.gitignore`, and `.htaccess`.\n-   Comes with a sample `composer.json` for easy Composer integration.\n-   Includes a sample PHPUnit configuration file `phpunit.xml.dist`.\n-   License and contributing guidelines for open-source projects.\n\n## Directory structure\n\n```\nyour-php-library/\n│\n├──┬ src/\n│  │  ├─── [SomeClass].php\n│  │  ├─── [AnotherClass].php\n│  │  ├─── ...\n│  │\n│  └ tests/\n│     ├─── [SomeClass]Test.php\n│     ├─── [AnotherClass]Test.php\n│     ├─── ...\n│\n├─── logs/\n├─── docs/\n├─── vendor/\n├─── .editorconfig\n├─── .gitignore\n├─── .htaccess\n├─── composer.json\n├─── composer.lock\n├─── phpunit.xml.dist\n├─── LICENSE\n├─── CONTRIBUTING.md\n└─── README.md\n```\n\n## Files and Folders\n\nFiles and folders overview.\n\n| File/Folder                    | Description                                          |\n| ------------------------------ | ---------------------------------------------------- |\n| **src/**                       | Source code of the application                       |\n| src/**SomeClass.php**          | Example PHP class file (SomeClass)                   |\n| src/**AnotherClass.php**       | Example PHP class file (AnotherClass)                |\n| src/**tests/**                 | Tests directory                                      |\n| tests/**SomeClassTest.php**    | PHPUnit test case for `SomeClass` (Example class)    |\n| tests/**AnotherClassTest.php** | PHPUnit test case for `AnotherClass` (Example class) |\n| **logs/**                      | Log files (e.g., code coverage report)               |\n| **docs/**                      | Documentation files (e.g., PHPDoc)                   |\n| **vendor/**                    | Composer vendor directory contains your dependencies |\n| **.editorconfig**              | IDE coding style settings                            |\n| **.gitignore**                 | Files and directories that Git should ignore         |\n| **.htaccess**                  | Hypertext access file for Apache configuration       |\n| **composer.json**              | Composer dependencies                                |\n| **composer.lock**              | Composer lock file                                   |\n| **phpunit.xml.dist**           | PHPUnit configuration file                           |\n| **LICENSE**                    | License document                                     |\n| **CONTRIBUTING.md**            | Contributing guidelines                              |\n| **README.md**                  | This document                                        |\n\n## Getting Started\n\nFollow these steps to use PHP Sceleto as a starting point for your PHP library:\n\n### Step 1 - Create a new project using Composer:\n\n```bash\ncomposer create-project SandroMiguel/php-sceleto your-php-library\n```\n\nReplace `your-php-library` with your desired name\n\nNow, 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.\n\n### Step 2 - Bonus: Continue Your Project Setup\n\nIf 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.\n\n## Composer commands\n\nYou can use Composer commands to streamline various development tasks. Here are the available commands and how to run them:\n\n### Check for Outdated Dependencies\n\nTo check for outdated Composer dependencies that are defined directly in your project, run:\n\n```sh\ncomposer outdated:direct\n```\n\n### Run PHP CodeSniffer\n\nTo run PHP CodeSniffer on the source code in the src/php directory, use the following command:\n\n```sh\ncomposer phpcs\n```\n\n### Run PHP CodeSniffer on a Specific File\n\nFor running PHP CodeSniffer on a specific file, use the following command, replacing `[file]` with the path to your target file:\n\n```sh\ncomposer phpcs:file [file]\n```\n\n### Analyze Code Quality and Architecture\n\nTo analyze code quality and architecture with PHP Insights, run:\n\n```sh\ncomposer phpinsights\n```\n\n### Generate PHP Metrics Report\n\nGenerate a PHP Metrics report and display the Node.js version with:\n\n```sh\ncomposer phpmetrics\n```\n\n### Run PHPStan Analysis\n\nFor PHPStan analysis with level 7 on the source code in the `src/php` directory, use:\n\n```sh\ncomposer phpstan\n```\n\n### Run Psalm Static Analysis\n\nTo run Psalm static analysis, simply use:\n\n```sh\ncomposer psalm\n```\n\n### Tail Application Logs\n\nTo tail the application log located at `./storage/log/app.log`, use:\n\n```sh\ncomposer logs\n```\n\n### Run PHPUnit Tests\n\nFor running PHPUnit tests, execute:\n\n```sh\ncomposer test\n```\n\nTo run PHPUnit tests with filtering, execute:\n\n```\ncomposer test:filter methodName ClassName path/to/file.php\n```\n\n### Run PHPUnit Tests with Coverage Report\n\nTo run PHPUnit tests and generate a coverage report in the `log/report` directory, use:\n\n```sh\ncomposer test:coverage\n```\n\n## Credits\n\n-   [EditorConfig](https://editorconfig.org/): IDE coding style settings.\n-   [PHPUnit](https://phpunit.de/): Testing framework for PHP.\n-   [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer): PHP coding standards checker and fixer.\n-   [PHP Insights](https://phpinsights.com/): Code quality and architecture analysis tool.\n-   [PHP Metrics](https://phpmetrics.org/): PHP metrics generator.\n-   [PHPStan](https://phpstan.org/): PHP static analysis tool.\n-   [Psalm](https://psalm.dev/): Static analysis tool for PHP.\n-   [Composer](https://getcomposer.org/): Dependency management for PHP.\n-   Logo skeleton - made by [Freepik](http://www.freepik.com) from [www.flaticon.com](https://www.flaticon.com/) is\n    licensed by [CC 3.0 BY](http://creativecommons.org/licenses/by/3.0/)\n\n## Contributing\n\nWant to contribute? All contributions are welcome. Read the [contributing guide](CONTRIBUTING.md).\n\n## Questions\n\nIf you have questions tweet me at [@sandro_m_m](https://twitter.com/sandro_m_m) or [open an issue](../../issues/new).\n\n## Changelog\n\nSee [CHANGELOG.md](CHANGELOG.md)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\n\n**~ sharing is caring ~**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandromiguel%2Fphp-sceleto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsandromiguel%2Fphp-sceleto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandromiguel%2Fphp-sceleto/lists"}