Git Product home page Git Product logo

yireo_whoops's Introduction

Magento 2 module for Whoops

This module adds Whoops error handling to Magento 2.

Requirements:

  • Magento 2.0.0 Stable or higher

Instructions for using composer

Use composer to install this extension. First make sure that Magento is installed via composer, and that there is a valid composer.json file present.

Next, install our module using the following command:

composer require --dev yireo/magento2-whoops

Next, install the new module into Magento itself:

./bin/magento module:enable Yireo_Whoops
./bin/magento setup:upgrade

Check whether the module is succesfully installed in Admin > Stores > Configuration > Advanced > Advanced.

Done.

Instructions for manual copy

We recommend composer to install this package. However, if you want a manual copy instead, these are the steps:

  • Upload the files in the source/ folder to the folder app/code/Yireo/Whoops of your site
  • Run php -f bin/magento module:enable Yireo_Whoops
  • Run php -f bin/magento setup:upgrade
  • Flush the Magento cache
  • Done

Overview

This module replaces the default error and exception handling of Magento 2, and replaces it with Whoops. If you want to know what Whoops is, check out their site.

Usage

There is no usage. This module replaces the default Magento\Framework\App\Http class with its own and then adds in Whoops. This means that whenever an exception or error is not caught in the code, it will be outputted using Whoops.

You can test for this yourself by adding some dummy code somewhere in Magento 2:

trigger_error('test');

or:

throw new RuntimeException('test');

That's how we tested things.

Testing

This repository contains a PHPUnit testing script, but it might not be evident to use this file. The basic usage is to run this script using a command like the following (where MAGENTO is your own Magento 2 installation):

phpunit -c phpunit-yireo.xml --bootstrap MAGENTO/dev/tests/unit/framework/bootstrap.php

yireo_whoops's People

Contributors

jissereitsma avatar davidlambauer avatar

Watchers

James Cloos avatar Hoang Manh Phu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.