{"id":19852613,"url":"https://github.com/onramplab/laravel-exceptions","last_synced_at":"2026-05-14T06:31:54.449Z","repository":{"id":65213207,"uuid":"587690782","full_name":"OnrampLab/laravel-exceptions","owner":"OnrampLab","description":null,"archived":false,"fork":false,"pushed_at":"2023-12-08T10:02:00.000Z","size":42,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-11T13:28:11.575Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/OnrampLab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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":"2023-01-11T10:58:20.000Z","updated_at":"2023-01-11T10:58:27.000Z","dependencies_parsed_at":"2025-01-11T13:26:59.860Z","dependency_job_id":"3e21b932-cdee-4cbc-bc36-fcc2a7029881","html_url":"https://github.com/OnrampLab/laravel-exceptions","commit_stats":{"total_commits":14,"total_committers":1,"mean_commits":14.0,"dds":0.0,"last_synced_commit":"97370a28846bdc7e751d9ed3674a79cacb8da109"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":"OnrampLab/composer-package-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OnrampLab%2Flaravel-exceptions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OnrampLab%2Flaravel-exceptions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OnrampLab%2Flaravel-exceptions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OnrampLab%2Flaravel-exceptions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OnrampLab","download_url":"https://codeload.github.com/OnrampLab/laravel-exceptions/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241241473,"owners_count":19932756,"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-12T14:03:40.663Z","updated_at":"2026-05-14T06:31:54.409Z","avatar_url":"https://github.com/OnrampLab.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# laravel-exceptions\n\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)\n[![CircleCI](https://circleci.com/gh/OnrampLab/laravel-exceptions.svg?style=shield)](https://circleci.com/gh/OnrampLab/laravel-exceptions)\n[![Total Downloads](https://img.shields.io/packagist/dt/onramplab/laravel-exceptions.svg?style=flat-square)](https://packagist.org/packages/onramplab/laravel-exceptions)\n\nIf you are trying to create a new PHP Composer package, whether it is going to be submitted to packagist.org or just to exist in your Github account, this template package of files will surely help you make the process a lot easier and faster.\n\n## Requirements\n\n- PHP \u003e= 8.1;\n- composer.\n\n## Features\n\n- Follow JSON API Spec\n- Add more context to log for errors\n  - adapter\n    - Web\n    - Console\n    - Job\n\n### API Error Response Example\n\n```json\n{\n  \"errors\": [\n    {\n      \"title\": \"Resource Not Found\",\n      \"detail\": \"User Not Found\",\n      \"message\": \"User Not Found\",\n      \"status\": 400\n    }\n  ]\n}\n```\n\n### Error Log Example\n\n```json\nHere is the example of error log context:\n\n```json\n{\n  \"detail\": \"A fake message\",\n  \"adapter\": {\n    \"type\": \"API\",\n    \"route\": \"test-route\",\n    \"method\": \"GET\",\n    \"url\": \"http://localhost/test-route\",\n    \"input\": []\n  },\n  \"errors\": [\n    {\n      \"title\": \"Unable To Do Something\",\n      \"detail\": \"A fake message\",\n      \"exception_class\": \"OnrampLab\\\\CleanArchitecture\\\\Exceptions\\\\UseCaseException\",\n      \"stacktrace\": [\n        \"## /var/www/html/tests/Unit/Exceptions/HandlerTest.php(149)\",\n        \"#0 /var/www/html/vendor/phpunit/phpunit/src/Framework/TestCase.php(1548): OnrampLab\\\\CleanArchitecture\\\\Tests\\\\Unit\\\\Exceptions\\\\HandlerTest-\u003ehandleUseCaseException2()\"\n      ]\n    },\n    {\n      \"title\": \"Fake Domain Exception\",\n      \"detail\": \"A fake message\",\n      \"exception_class\": \"OnrampLab\\\\CleanArchitecture\\\\Tests\\\\Unit\\\\Exceptions\\\\FakeDomainException\",\n      \"stacktrace\": [\n        \"## /var/www/html/tests/Unit/Exceptions/HandlerTest.php(146)\",\n        \"#0 /var/www/html/vendor/phpunit/phpunit/src/Framework/TestCase.php(1548): OnrampLab\\\\CleanArchitecture\\\\Tests\\\\Unit\\\\Exceptions\\\\HandlerTest-\u003ehandleUseCaseException2()\"\n      ]\n    }\n  ]\n}\n\n```\n```\n\n## Tech Features\n\n- PSR-4 autoloading compliant structure;\n- PSR-2 compliant code style;\n- Unit-Testing with PHPUnit 6;\n- Comprehensive guide and tutorial;\n- Easy to use with any framework or even a plain php file;\n- Useful tools for better code included.\n\n## Installation\n\n```bash\ncomposer require onramplab/laravel-exceptions\n```\n\n## Useful Tools\n\n## Running Tests:\n\n    php vendor/bin/phpunit\n\n or\n\n    composer test\n\n## Code Sniffer Tool:\n\n    php vendor/bin/phpcs --standard=PSR2 src/\n\n or\n\n    composer psr2check\n\n## Code Auto-fixer:\n\n    composer psr2autofix\n    composer insights:fix\n    rector:fix\n\n## Building Docs:\n\n    php vendor/bin/phpdoc -d \"src\" -t \"docs\"\n\n or\n\n    composer docs\n\n## Changelog\n\nTo keep track, please refer to [CHANGELOG.md](https://github.com/Onramplab/laravel-exceptions/blob/master/CHANGELOG.md).\n\n## Contributing\n\n1. Fork it.\n2. Create your feature branch (git checkout -b my-new-feature).\n3. Make your changes.\n4. Run the tests, adding new ones for your own code if necessary (phpunit).\n5. Commit your changes (git commit -am 'Added some feature').\n6. Push to the branch (git push origin my-new-feature).\n7. Create new pull request.\n\nAlso please refer to [CONTRIBUTION.md](https://github.com/Onramplab/laravel-exceptions/blob/master/CONTRIBUTION.md).\n\n## License\n\nPlease refer to [LICENSE](https://github.com/Onramplab/laravel-exceptions/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonramplab%2Flaravel-exceptions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonramplab%2Flaravel-exceptions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonramplab%2Flaravel-exceptions/lists"}