{"id":15524051,"url":"https://github.com/elazar/phpspec-psr4-autoload","last_synced_at":"2026-03-19T03:15:08.007Z","repository":{"id":66661084,"uuid":"60127322","full_name":"elazar/phpspec-psr4-autoload","owner":"elazar","description":"Example of using a PSR-4 autoloader with phpspec","archived":false,"fork":false,"pushed_at":"2016-05-31T22:16:40.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-12T13:24:10.751Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elazar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2016-05-31T22:14:46.000Z","updated_at":"2016-05-31T22:14:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"6cb60d51-4663-4478-a0d3-22e74950f7c3","html_url":"https://github.com/elazar/phpspec-psr4-autoload","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elazar%2Fphpspec-psr4-autoload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elazar%2Fphpspec-psr4-autoload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elazar%2Fphpspec-psr4-autoload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elazar%2Fphpspec-psr4-autoload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elazar","download_url":"https://codeload.github.com/elazar/phpspec-psr4-autoload/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247451621,"owners_count":20940946,"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-10-02T10:48:58.121Z","updated_at":"2026-02-02T17:09:42.311Z","avatar_url":"https://github.com/elazar.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"This is an example of using a PSR-4 autoloader with phpspec.\n\n# How it works\n\nIn your [Composer PSR-4 autoloader](https://getcomposer.org/doc/04-schema.md#psr-4), make sure the namespace is consistent with the `namespace` and `psr-4_prefix` [settings](http://www.phpspec.net/en/latest/cookbook/configuration.html#psr-4) for your test suite in your `phpspec.yml` file. Review those files in this repository for an example.\n\n# Usage\n\n## Install phpspec\n\n```bash\ncomposer global require phpspec/phpspec\n```\n\nExample output:\n\n```\nChanged current directory to ~/.composer\nUsing version ^2.5 for phpspec/phpspec\n./composer.json has been updated\nLoading composer repositories with package information\nUpdating dependencies (including require-dev)\nNothing to install or update\nGenerating autoload files\n```\n\n## Generate Composer autoloader\n\n```bash\ncomposer install\n```\n\nExample output:\n\n```\nLoading composer repositories with package information\nUpdating dependencies (including require-dev)\nNothing to install or update\nGenerating autoload files\n```\n\n## Generate test\n\n```bash\nphpspec describe Acme/Text/Markdown\n```\n\nExample output:\n\n```\nSpecification for Acme\\Text\\Markdown created in spec/MarkdownSpec.php.\n```\n\n## Generate source file\n\n```bash\nphpspec run\n```\n\nExample output:\n\n```\nAcme/Text/Markdown\n  10  - it is initializable\n      class Acme\\Text\\Markdown does not exist.\n\n                                      100%                                       1\n1 specs\n1 example (1 broken)\n14ms\n\n\n  Do you want me to create `Acme\\Text\\Markdown` for you?\n                                                                         [Y/n] y\n\nClass Acme\\Text\\Markdown created in src/Markdown.php.\n\n                                      100%                                       1\n1 specs\n1 example (1 passed)\n11ms\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felazar%2Fphpspec-psr4-autoload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felazar%2Fphpspec-psr4-autoload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felazar%2Fphpspec-psr4-autoload/lists"}