ez projects / bcerrorpagesbundle
UNIX name | Owner | Status | Version | Compatible with |
---|---|---|---|---|
bcerrorpagesbundle | Brookins Consulting | stable | 0.1.0 | Symfony version 2.8+ and eZ Publish Platform and eZ Platform |
This bundle implements a solution to override the default Symfony error pages template code and styles with designer friendly alternatives. Great for developers seeking to override default error pages in Symfony.
BC Error Pages is licensed under the GNU General Public License.
The complete license agreement is included in the LICENSE file.
BC Error Pages is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License or at your option a later version.
BC Error Pages is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
The GNU GPL gives you the right to use, modify and redistribute BC Error Pages under certain conditions. The GNU GPL license is distributed with the software, see the file doc/LICENSE.
It is also available at http://www.gnu.org/licenses/gpl.txt
You should have received a copy of the GNU General Public License along with BC Error Pages in doc/LICENSE. If not, see http://www.gnu.org/licenses/.
Using BC Error Pages under the terms of the GNU GPL is free (as in freedom).
For more information or questions please contact: license@brookinsconsulting.com
The following requirements exists for using BC Error Pages:
This solution was created to provide for a simple basis to customize ugly yet informative Symfony error pages with a bc branded styled replacement.
Within your project's / website's root composer.json file add the following composer scripts block to provide for automatic error page template and assets installation.
"scripts": { "symfony-scripts": [ "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters", "BrookinsConsulting\\BcErrorPagesBundle\\Composer\\ScriptHandler::installErrorPagesInApp", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets" ], "post-install-cmd": [ "@symfony-scripts" ], "post-update-cmd": [ "@symfony-scripts" ]},
Within file app/AppKernel.php method registerBundles add the following into the $bundles = array( variable definition.
// Brookins Consulting : BcErrorPagesBundle Requirementsnew BrookinsConsulting\BcErrorPagesBundle\BcErrorPagesBundle()
Install the above before installing the bundle via composer to ensure that the automatic error page template and assets installation scripts function as designed.
Run the following command from your project root to install the bundle:
bash$ composer require brookinsconsulting/bcerrorpagesbundle dev-master;
Edit your app/config/routing.yml file and add the following code to import this bundle's routes. Note that this step is optional and only required if you desire to test the error pages manually.
app_bcerrorpages: resource: "@BcErrorPagesBundle/Resources/config/routing_dev.yml"
Required only if not installed via composer
php bin/console bc:ep:install --relative
Required only if not installed via composer
php bin/console assets:install web --symlink --relative
Clear Symfony caches (Required).
php bin/console cache:clear;
If you need to customize the provided templates remember to do so within the bundle resources itself.
If needed you may find making a fork or variation based on this bundle suits your needs for further template customization.
The solution is configured to work virtually by default once properly installed.
The solution is configured to work once properly installed and configured.
Simply navigate to a route / url which is not defined to trigger a 404 error and view the new error page template.
Some problems are more common than others. The most common ones are listed in the the doc/FAQ.md
If you have find any problems not handled by this document or the FAQ you can contact Brookins Consulting through the support system: http://brookinsconsulting.com/contact