Skip to content

Commit

Permalink
final commit 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tabsl committed Dec 18, 2017
1 parent 297772d commit fc00903
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 153 deletions.
57 changes: 0 additions & 57 deletions Core/ShopControl.php

This file was deleted.

53 changes: 19 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,32 @@
smx_whoops
==========
Great module proudly presented by [OXID Hackathon 2017](https://openspacer.org/12-oxid-community/185-oxid-hackathon-nuernberg-2017/) ;-)

Integration of the [whoops](https://github.com/filp/whoops/) error handler base/framework for PHP into the [OXID](http://www.oxid-esales.com) eShop.
Module version for OXID eShop 6. Original module by [shoptimax GmbH](https://github.com/shoptimax/smx_whoops).

-----
# Features

![Whoops!](http://i.imgur.com/xiZ1tUU.png)
use [whoops - php errors for cool kids](https://github.com/filp/whoops) for exception and error handling

**whoops** is an error handler base/framework for PHP. Out-of-the-box, it provides a pretty
error interface that helps you debug your web projects, but at heart it's a simple yet
powerful stacked error handling system.
## Installation

## Installing
Here's a very simple way to install:
1. Composer
```
composer require oxid-community/smxwhoops
```

1. Download [whoops](https://github.com/filp/whoops/) OR use the provided "src" and "vendor" dirs (see 3.) from this repository.
2. functions.php

2. Use [Composer](http://getcomposer.org) to install Whoops:
Add the following lines in `modules/functions.php`:

Note: the proposed composer command for installing whoops didn't work for me:

```bash
composer require filp/whoops:1
```

So I had to add the composer lib to the composer.json file ("filp/whoops": "1.*") - see "composer_edited.json" - and do a
```
define('__ROOT__', dirname(__FILE__, 2));
require_once(__ROOT__ . '/modules/oxcom/smxwhoops/functions.php');
```

```bash
php composer.phar install
```
# Screenshot

instead.
In the end, either of these should create the "src" and "vendor" dirs for you.

3. Upload
modules
src
vendor
to your shop root.
![OXID_smxwhoops](https://camo.githubusercontent.com/31a4e1410e740fd0ccda128cbcab8723f45e7e73/687474703a2f2f692e696d6775722e636f6d2f305651706539362e706e67)

4. Activate the module in the shop backend.

## Authors
# Changelog

This whoops library was primarily developed by [Filipe Dobreira](https://github.com/filp), and is currently maintained by [Denis Sokolov](https://github.com/denis-sokolov). A lot of awesome fixes and enhancements were also sent in by [various contributors](https://github.com/filp/whoops/contributors).
The smx_whoops module for integrating whoops into OXID was developed by shoptimax GmbH, Gernot Payer and Stefan Moises.
* 2017-12-18 2.0.0 module release
28 changes: 28 additions & 0 deletions functions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php
/**
* @package smx_whoops
* @category OXID Module
* @version 2.0.0
* @license MIT License http://opensource.org/licenses/MIT
* @author shoptimax GmbH / OXID Community
* @link https://github.com/OXIDprojects/smx_whoops
* @see https://github.com/shoptimax/smx_whoops
*/

if (!function_exists('getShopBasePath')) {
/**
* Returns framework base path.
*
* @return string
*/
function getShopBasePath()
{
return OX_BASE_PATH;
}
}

$whoops = new \Whoops\Run;
$whoops->silenceErrorsInPaths('@' . VENDOR_PATH . '@', E_WARNING | E_DEPRECATED);
$whoops->silenceErrorsInPaths('@' . INSTALLATION_ROOT_PATH . '/source/tmp/@', E_WARNING);
$whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler);
$whoops->register();
15 changes: 7 additions & 8 deletions metadata.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php
/**
* @package ocb_cleartmp
* @package smx_whoops
* @category OXID Module
* @version 2.0.0
* @license GNU License http://opensource.org/licenses/GNU
* @author Joscha Krug <[email protected]> / OXID Community
* @link https://github.com/OXIDprojects/adminsearch
* @see https://github.com/OXIDCookbook/ocb_cleartmp
* @license MIT License http://opensource.org/licenses/MIT
* @author shoptimax GmbH / OXID Community
* @link https://github.com/OXIDprojects/smx_whoops
* @see https://github.com/shoptimax/smx_whoops
*/

/**
Expand All @@ -19,15 +19,14 @@
*/
$aModule = [
'id' => 'smx_whoops',
'title' => 'OXID Community Whoops (by shoptimax)',
'title' => 'OXID Community Whoops Exception Handler (by shoptimax)',
'description' => 'Whoops exception handling',
'thumbnail' => '',
'version' => '2.0.0',
'author' => 'OXID Community',
'url' => 'https://github.com/OXIDCookbook/smx_whoops',
'url' => 'https://github.com/OXIDprojects/smx_whoops',
'email' => '',
'extend' => [
\OxidEsales\Eshop\Core\ShopControl::class => \OxidCommunity\Whoops\Core\ShopControl::class,
],
'settings' => [
],
Expand Down
54 changes: 0 additions & 54 deletions smx_whoops_oxshopcontrol.php

This file was deleted.

0 comments on commit fc00903

Please sign in to comment.