{"id":19458828,"url":"https://github.com/leafsphp/alchemy","last_synced_at":"2025-02-25T11:43:09.389Z","repository":{"id":53821554,"uuid":"437823546","full_name":"leafsphp/alchemy","owner":"leafsphp","description":"⚗️ Modern and Delightful PHP testing library focused on simplicity","archived":false,"fork":false,"pushed_at":"2023-09-28T11:52:26.000Z","size":39,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-23T06:01:12.040Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://leafphp.dev/docs/tooling/testing","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/leafsphp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"open_collective":"leaf","github":"leafsphp"}},"created_at":"2021-12-13T10:09:11.000Z","updated_at":"2024-01-05T15:03:57.000Z","dependencies_parsed_at":"2022-08-22T02:00:48.524Z","dependency_job_id":null,"html_url":"https://github.com/leafsphp/alchemy","commit_stats":{"total_commits":29,"total_committers":2,"mean_commits":14.5,"dds":0.03448275862068961,"last_synced_commit":"eb5b00b1d77f777d3c70622a6d9205f1e6e9818f"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafsphp%2Falchemy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafsphp%2Falchemy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafsphp%2Falchemy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafsphp%2Falchemy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leafsphp","download_url":"https://codeload.github.com/leafsphp/alchemy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240441876,"owners_count":19801791,"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":[],"created_at":"2024-11-10T17:28:40.671Z","updated_at":"2025-02-25T11:43:09.352Z","avatar_url":"https://github.com/leafsphp.png","language":"PHP","readme":"\u003c!-- markdownlint-disable no-inline-html --\u003e\n\u003cp align=\"center\"\u003e\n    \u003cbr\u003e\u003cbr\u003e\n    \u003cimg src=\"https://github.com/user-attachments/assets/3a50d848-4290-4a46-8ab1-bc0a148da375\" height=\"100\"/\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eAlchemy\u003c/h1\u003e\n\n[![Latest Stable Version](https://poser.pugx.org/leafs/alchemy/v/stable)](https://packagist.org/packages/leafs/alchemy)\n[![Total Downloads](https://poser.pugx.org/leafs/alchemy/downloads)](https://packagist.org/packages/leafs/alchemy)\n[![License](https://poser.pugx.org/leafs/alchemy/license)](https://packagist.org/packages/leafs/alchemy)\n\nAlchemy is an integrated testing/style fixing tool for your PHP applications. Alchemy handles your test/linting setup and any other integration you might need to run your tests like CI/CD. Alchemy is not a testing framework or style fixer, it's a tool that manages all the nasty setup for you.\n\n## 📦 Setting Up\n\nYou can install alchemy with leaf CLI\n\n```bash\nleaf install alchemy\n```\n\nOr with composer\n\n```bash\ncomposer require leafs/alchemy\n```\n\nOnce installed, Alchemy will automatically set up an `alchemy.yml` file in your project's root which you can use to configure your tests, linting and github actions.\n\n## 🗂 Your Alchemy File\n\nThe `alchemy.yml` file should look something like this:\n\n```yaml\napp:\n  - app\n  - src\n\ntests:\n  engine: pest\n  parallel: true\n  paths:\n    - tests\n  files:\n    - '*.test.php'\n  coverage:\n    processUncoveredFiles: true\n\nlint:\n  preset: 'PSR12'\n  ignore_dot_files: true\n  rules:\n    array_syntax:\n      syntax: 'short'\n    no_unused_imports: true\n    single_quote: true\n    ordered_imports:\n      imports_order: null\n      case_sensitive: false\n      sort_algorithm: 'alpha'\n\nactions:\n  run:\n    - 'lint'\n    - 'test'\n  php:\n    extensions: json, zip\n    versions:\n      - '8.3'\n  event:\n    - 'push'\n    - 'pull_request'\n```\n\nYou can make edits to this file to suit your needs. The `app` key is an array of directories to look for your app files in. The `tests` key is an array of configurations for your tests. The `lint` key is an array of configurations for your code styling checks. Once you're done setting up your `alchemy.yml` file, you can run the setup script.\n\n```bash\nleaf run alchemy # or composer run alchemy\n```\n\nThis will install your test engine, PHP CS Fixer and any other dependencies you might need, and then generate dummy tests using the test engine you chose. It will then lint your code, run your tests and generate a coverage report (if you selected that option). It will also add a `test` and `lint` command to your `composer.json` file which you can use to run your tests and lint your code respectively. Finally, it will generate a `.github/workflows` directory with a `test.yml` file and a `lint.yml` file which you can use to run your tests and linting on github actions.\n\nBased on your engine, you might see either of the outputs below\n\n- PEST PHP\n\n\u003cimg width=\"307\" alt=\"image\" src=\"https://user-images.githubusercontent.com/26604242/182198978-1b8e2ba2-42e7-4345-82d0-3ae5be35d299.png\"\u003e\n\n- PHPUnit\n\n\u003cimg width=\"770\" alt=\"image\" src=\"https://user-images.githubusercontent.com/26604242/182198446-47a4a581-3aa4-470c-b450-420604b9bb6c.png\"\u003e\n","funding_links":["https://opencollective.com/leaf","https://github.com/sponsors/leafsphp"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleafsphp%2Falchemy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleafsphp%2Falchemy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleafsphp%2Falchemy/lists"}