{"id":15018855,"url":"https://github.com/prestashop/php-dev-tools","last_synced_at":"2025-04-12T19:44:26.718Z","repository":{"id":41380792,"uuid":"184261047","full_name":"PrestaShop/php-dev-tools","owner":"PrestaShop","description":"PHP Coding Standards for PrestaShop projects","archived":false,"fork":false,"pushed_at":"2024-11-06T21:06:48.000Z","size":193,"stargazers_count":35,"open_issues_count":10,"forks_count":19,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-03T22:10:05.752Z","etag":null,"topics":["coding-standards","hacktoberfest","php","prestashop","tool"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/PrestaShop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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}},"created_at":"2019-04-30T12:48:20.000Z","updated_at":"2024-12-15T00:58:11.000Z","dependencies_parsed_at":"2024-06-18T12:28:38.739Z","dependency_job_id":"cbfca2a8-84a7-47ad-8d96-f8c07afc10c2","html_url":"https://github.com/PrestaShop/php-dev-tools","commit_stats":{"total_commits":103,"total_committers":16,"mean_commits":6.4375,"dds":0.5728155339805825,"last_synced_commit":"4b284d9b07a274505c81144536924eb4014e6fbf"},"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrestaShop%2Fphp-dev-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrestaShop%2Fphp-dev-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrestaShop%2Fphp-dev-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrestaShop%2Fphp-dev-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PrestaShop","download_url":"https://codeload.github.com/PrestaShop/php-dev-tools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248625485,"owners_count":21135512,"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":["coding-standards","hacktoberfest","php","prestashop","tool"],"created_at":"2024-09-24T19:52:32.594Z","updated_at":"2025-04-12T19:44:26.693Z","avatar_url":"https://github.com/PrestaShop.png","language":"PHP","readme":"# PrestaShop Coding Standards\n\n[![Latest Stable Version](https://img.shields.io/packagist/v/prestashop/php-dev-tools.svg?style=flat-square)](https://packagist.org/packages/prestashop/php-dev-tools) [![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%207.2.5-8892BF.svg?style=flat-square)](https://php.net/) [![Quality Control Status](https://img.shields.io/github/workflow/status/prestashop/php-dev-tools/PHP%20tests?style=flat-square)](https://github.com/prestashop/php-dev-tools/actions/workflows/php.yml)\n\n\nThis repository includes tools to check that repositories are following the standards defined by the PrestaShop community and provides configuration files for some of them.\n\nRelated packages:\n\n* [friendsofphp/php-cs-fixer](http://github.com/FriendsOfPHP/PHP-CS-Fixer)\n* [phpstan/phpstan](https://github.com/phpstan/phpstan)\n* [prestashop/autoindex](https://github.com/PrestaShopCorp/autoindex)\n* [prestashop/header-stamp](https://github.com/PrestaShopCorp/header-stamp)\n\n\n## Installation\n\n```bash\ncomposer require --dev prestashop/php-dev-tools\n\n## Development dependencies runtimes\ncomposer require --dev friendsofphp/php-cs-fixer\ncomposer require --dev phpstan/phpstan\ncomposer require --dev prestashop/header-stamp\ncomposer require --dev prestashop/autoindex\ncomposer require --dev squizlabs/php_codesniffer\n```\n\nWhen this project is successfully added to your dependencies, you can enable each review tool on your projet.\n\n## Version Guidance\n\n| Version | Status         | Packagist           -| Namespace    | Repo                | Docs                | PHP Version  |\n|---------|----------------|----------------------|--------------|---------------------|---------------------|--------------|\n| 1.x     | EOL         | `prestashop/php-dev-tools` | N/A  | [v1.x][lib-1-repo] | N/A                 | \u003e=5.6,\u003c7.2  |\n| 2.x     | EOL         | `prestashop/php-dev-tools` | N/A  | [v2.x][lib-2-repo] | N/A                 | \u003e=5.6,\u003c7.2  |\n| 3.x     | Security fixes         | `prestashop/php-dev-tools` | N/A  | [v3.x][lib-3-repo] | N/A                 | \u003e=5.6,\u003e=7.2.5  |\n| 4.x     | EOL         | `prestashop/php-dev-tools` | N/A  | [v4.x][lib-4-repo] | N/A                 | \u003e=7.2.5  |\n| 5.x     | Latest         | `prestashop/php-dev-tools` | N/A  | [master][master-repo] | N/A                 | \u003e=7.2.5  |\n\n[lib-1-repo]: https://github.com/PrestaShop/php-dev-tools/tree/1.x\n[lib-2-repo]: https://github.com/PrestaShop/php-dev-tools/tree/2.x\n[lib-3-repo]: https://github.com/PrestaShop/php-dev-tools/tree/3.x\n[lib-4-repo]: https://github.com/PrestaShop/php-dev-tools/tree/4.x\n[master-repo]: https://github.com/PrestaShop/php-dev-tools/tree/master\n\n\n\n## Usage\n\nThe configuration files added in your project can be freely modified in order to match your needs.\n\nRunning the tools can be done by calling their respective binary:\n\n### PHP CS Fixer\n\nInitialize the configuration with:\n```bash \n$ php vendor/bin/prestashop-coding-standards cs-fixer:init [--dest /path/to/my/project]\n```\n\nIt'll create a configuration file `.php-cs-fixer.dist.php` in the root of your project.\n\n**Upgrade note :** When upgrading from 4.1.0 to newer version, you should re-run the init script or rename your ``.php_cs.dist`` file to ``.php-cs-fixer.dist.php`` in order to match the new requirements of cs-fixer.\n\n```bash\n$ vendor/bin/php-cs-fixer fix\n```\n\n### PHPStan\n\n```bash\n$ php vendor/bin/prestashop-coding-standards phpstan:init [--dest /path/to/my/project]\n```\n\nIt'll create a default file `phpstan.neon` in `tests/phpstan`, that are required to run phpstan.\nThe default phpstan level is the lowest available, but we recommend you to update this value to get more recommandations.\n\n```php\n$ _PS_ROOT_DIR_=\u003cPath_to_PrestaShop\u003e php vendor/bin/phpstan --configuration=tests/phpstan/phpstan.neon analyse \u003cpath1 [path2 [...]]\u003e\n```\n\n### Autoindex\n\nApplying an index.php file to all your project subfolders will be useful to avoid directories to be listed by the webserver.\n\n```php\n$ vendor/bin/autoindex prestashop:add:index \u003cpath\u003e\n```\n\n### Header Stamp\n\nYour license headers can be updated by applying the header stamp.\n\nHere is an example of call, applying the default license on a PrestaShop module:\n\n```php\n$ vendor/bin/header-stamp --license=assets/afl.txt --exclude=vendor,node_modules\n```\n\nAvailable options are provided with `--help`.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprestashop%2Fphp-dev-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprestashop%2Fphp-dev-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprestashop%2Fphp-dev-tools/lists"}