{"id":18773097,"url":"https://github.com/webfactory/exceptions-bundle","last_synced_at":"2025-12-13T17:30:13.474Z","repository":{"id":14101671,"uuid":"16806087","full_name":"webfactory/exceptions-bundle","owner":"webfactory","description":"A bundle to ease development of custom, user-friendly Symfony2 error pages.","archived":false,"fork":false,"pushed_at":"2024-04-02T12:43:30.000Z","size":148,"stargazers_count":62,"open_issues_count":0,"forks_count":15,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-01-29T22:06:59.579Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Twig","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/webfactory.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2014-02-13T14:56:24.000Z","updated_at":"2024-10-01T15:19:29.000Z","dependencies_parsed_at":"2024-04-02T13:54:09.524Z","dependency_job_id":"81ef8389-d56b-4bba-9068-4eb20c931254","html_url":"https://github.com/webfactory/exceptions-bundle","commit_stats":{"total_commits":118,"total_committers":18,"mean_commits":6.555555555555555,"dds":0.6779661016949152,"last_synced_commit":"76d0cdfd324cd87a1c0771261c93f19ae20b51fb"},"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webfactory%2Fexceptions-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webfactory%2Fexceptions-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webfactory%2Fexceptions-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webfactory%2Fexceptions-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webfactory","download_url":"https://codeload.github.com/webfactory/exceptions-bundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239680983,"owners_count":19679509,"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-07T19:32:44.952Z","updated_at":"2025-12-13T17:30:13.424Z","avatar_url":"https://github.com/webfactory.png","language":"Twig","funding_links":[],"categories":["Development"],"sub_categories":[],"readme":"# WebfactoryExceptionsBundle\n\nA Symfony Bundle with some Twig templates and blocks to create helpful, user friendly error pages.\n\n⚠️ **Please note:** At webfactory, we do no longer use this bundle in new projects, since its main functionality was merged into Symfony 2.6 and we prefer to have project-specific templates. However, we still use the wording that we provide with this bundle.\n\n## Basic Usage\n\nFirst, follow the [Symfony Documentation](https://symfony.com/doc/current/controller/error_pages.html) to learn how to create and preview custom error pages. Been there, done that? Fine!\n\nLet's say your generic error page extends the base layout of MyWebsiteBundle. Then you may want to have your\n`error.html.twig` to look something like this:\n\n    {# error.html.twig #}\n    {% extends '@MyWebsite/Layout/base.html.twig' %}\n    {% use '@WebfactoryExceptions/Exception/blocks.html.twig' %}\n\n    {% block myMainContentContainer %}\n        {{ block('webfactory_exceptions_standardExceptionPage') }}\n    {% endblock %}\n\nThe `webfactory_exceptions_standardExceptionPage` block has headings, the translated exception description and provides\nthe user with a list of alternatives what they can do next: get back (simulating a browser back), get to the homepage,\nget to the contact page or google the domain. It may look like this:\n\n![Sample rendering of the webfactory_exceptions_standardExceptionPage block](src/Resources/doc/images/webfactory_exceptions_standardExceptionPage-example.png)\n\n## Links to Homepage and Contact Page\n\nA default block in the bundle provides a link to the homepage with the default target `/`. If your application does not\nstart at `/`, you need to set the variable `homepageUrl`.\n\nAlso, you may want to set the variable `contactUrl` to get a link to your contact page in the listed alternatives.\n\n    {# error.html.twig #}\n    {% extends '@MyWebsite/Layout/base.html.twig' %}\n    {% use '@WebfactoryExceptions/Exception/blocks.html.twig' %}\n\n    {% set homepageUrl = \"https://www.webfactory.de\" %}\n    {% set contactUrl = path('name_of_a_route') %}\n\n    {# your blocks and definitions... #}\n\n## Filling in Blocks of Base Layouts\n\nIf your base layout already features blocks you need to fill with exception specific content, you can do it this way:\n\n    {# error.html.twig #}\n    {% extends '@MyWebsite/Layout/base.html.twig' %}\n\n    {% use '@WebfactoryExceptions/Exception/blocks.html.twig' with\n            webfactory_exceptions_error_title as title,\n            webfactory_exceptions_error_headline as stage_headline\n    %}\n\nThis loads the `webfactory_exceptions_error_title` block *directly* into the `title` block of your base layout, as well\nas the `webfactory_exceptions_error_headline` block into the `stage_headline` block.\n\nHappy error-styling!\n\n## Credits, Copyright and License\n\nThis bundle was started at webfactory GmbH, Bonn. It was inspired by the blog post [How Symfony2 turns exceptions into error pages and how to customize those](https://www.webfactory.de/blog/symfony2-exception-handling-and-custom-error-pages-explained).\n\nPrevious releases of this bundle contained extra code that would help during development to preview your error pages. This code, however, could be merged into the Symfony core in Symfony 2.6, so we could finally remove it from this bundle. Read the [announcement](https://symfony.com/blog/new-in-symfony-2-6-error-page-previews) when you're interested in historic details.\n\n- \u003chttps://www.webfactory.de\u003e\n- \u003chttps://twitter.com/webfactory\u003e\n\nCopyright 2012-2022 webfactory GmbH, Bonn. Code released under [the MIT license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebfactory%2Fexceptions-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebfactory%2Fexceptions-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebfactory%2Fexceptions-bundle/lists"}