{"id":13519035,"url":"https://github.com/exercism/php","last_synced_at":"2025-04-06T01:08:37.582Z","repository":{"id":14560556,"uuid":"17276293","full_name":"exercism/php","owner":"exercism","description":"Exercism exercises in PHP.","archived":false,"fork":false,"pushed_at":"2024-04-30T10:58:30.000Z","size":1913,"stargazers_count":136,"open_issues_count":23,"forks_count":130,"subscribers_count":17,"default_branch":"main","last_synced_at":"2024-05-01T11:25:26.832Z","etag":null,"topics":["community-contributions-paused","exercism-track"],"latest_commit_sha":null,"homepage":"https://exercism.org/tracks/php","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/exercism.png","metadata":{"funding":{"github":["exercism"],"custom":["https://exercism.org/donate"]},"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-02-28T05:31:39.000Z","updated_at":"2024-05-02T14:21:40.787Z","dependencies_parsed_at":"2023-02-15T12:35:20.402Z","dependency_job_id":"ca64eb67-6acf-42b0-8960-ac7445455bb3","html_url":"https://github.com/exercism/php","commit_stats":{"total_commits":558,"total_committers":106,"mean_commits":5.264150943396227,"dds":0.9175627240143369,"last_synced_commit":"1f04183d28de733e543ce43f9eedf1145b1f77da"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exercism%2Fphp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exercism%2Fphp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exercism%2Fphp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exercism%2Fphp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/exercism","download_url":"https://codeload.github.com/exercism/php/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247419860,"owners_count":20936012,"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":["community-contributions-paused","exercism-track"],"created_at":"2024-08-01T05:01:52.807Z","updated_at":"2025-04-06T01:08:37.560Z","avatar_url":"https://github.com/exercism.png","language":"PHP","funding_links":["https://github.com/sponsors/exercism","https://exercism.org/donate"],"categories":["PHP"],"sub_categories":[],"readme":"# Exercism PHP Track\n\nExercism exercises in PHP\n\nFollow these instructions to contribute to the PHP track.\nTo solve the exercises, head to the [PHP track][exercism-track-home] and check the [documentation][exercism-track-installation].\n\n## Install Dependencies\n\nThe following system dependencies are required:\n\n- `composer`, as recommended in the [PHP track installation docs][exercism-track-installation-composer].\n- [`bash` shell][gnu-bash].\n- PHP V8.3+ CLI.\n- An active Internet connection for installing required tools / composer packages.\n\nRun the following command to get started with this project:\n\n```shell\ncomposer install # Required dependencies to develop this track\n```\n\n## Running Exercism resources management\n\n`bin/configlet` is the official tool for managing Exercism language track repositories.\nSee [Building Exercism docs][exercism-configlet].\n\nFor convenience, you can use `composer configlet:fmt` to fix formatting issues in the Exercism track files.\nThis is included in `composer ci` to run the CI checks locally.\n\n## Running Unit Test Suite\n\nThe tests are run with PHPUnit. A shell loop injecting `exemplar.php` is provided to ease testing.\n\nExecute the following command to run the tests:\n\n```shell\ncomposer test:run\n```\n\nThis is included in `composer ci` to run the CI checks locally.\n\n### Run a specific test\n\nIf you want to run tests for one specific exercise, you can do it with following cli command.\n\n```shell\ncomposer test:run -- exercise-name\n# e.g\ncomposer test:run -- book-store\n```\n\nIf you want to run all starting with let's say 'b' you can run\n\n```shell\ncomposer test:run -- \"b*\"\n```\n\n## Running Style Checker\n\nThis project uses a slightly [modified][local-file-phpcs-config] version of [PSR-12].\nUse the following commands to apply code style:\n\n```shell\ncomposer lint:check # Checks the files against the code style rules\ncomposer lint:fix # Automatically fix code style issues\n```\n\nThe `lint:check` is included in `composer ci` to run the CI checks locally.\n\n## Contributing\n\n- Read the documentation at [Exercism][exercism-docs].\n- Follow the [PSR-12] coding style (Exercisms PHP track uses a slightly [modified][local-file-phpcs-config] version of [PSR-12]).\n- Run `composer ci` to run CI checks locally before pushing.\n- CI is run on all pull requests, it must pass the required checks for merge.\n- CI is running all tests on PHP 8.0 to PHP 8.2 for Linux, Windows and MacOS.\n\n## Generating new practice exercises\n\nUse `bin/configlet create --practice-exercise \u003cslug\u003e` to create the exercism resources required.\nThis provides you with the directories and files in `exercises/practice/\u003cslug\u003e`.\nLook into `tests.toml` for which test cases **not** to implement / generate and mark them with `include = false`.\n\nTest generator MVP used like this:\n\n```shell\ncomposer -d contribution/generator install\ncontribution/generator/bin/console app:create-tests '\u003cslug\u003e'\ncomposer lint:fix\n```\n\n[exercism-configlet]: https://exercism.org/docs/building/configlet\n[exercism-docs]: https://exercism.org/docs\n[exercism-track-home]: https://exercism.org/docs/tracks/php\n[exercism-track-installation]: https://exercism.org/docs/tracks/php/installation\n[exercism-track-installation-composer]: https://exercism.org/docs/tracks/php/installation#h-install-composer\n[gnu-bash]: https://www.gnu.org/software/bash/\n[local-file-phpcs-config]: phpcs.xml\n[psr-12]: https://www.php-fig.org/psr/psr-12\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexercism%2Fphp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexercism%2Fphp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexercism%2Fphp/lists"}