Skip to content

Commit 4c84215

Browse files
committed
Updated to 1.1.5 version
1 parent 124995b commit 4c84215

File tree

1,367 files changed

+118521
-312
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,367 files changed

+118521
-312
lines changed

.gitattributes

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
/tests export-ignore
2-
/resources export-ignore
2+
/src/bootstrap.php export-ignore
3+
/vendor export-ignore
34
.gitattributes export-ignore
45
.gitignore export-ignore
6+
_config.yml export-ignore
7+
.travis.yml export-ignore
58
CHANGELOG.md export-ignore
9+
phpunit.xml.dist export-ignore
610
CONDUCT.md export-ignore
711
contributors.txt export-ignore
812
README.md export-ignore

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@ phpunit.xml
22
composer.phar
33
composer.lock
44
composer-test.lock
5-
vendor/
65
build/artifacts/
76
artifacts/
87
docs/_build
98
docs/*.pyc
109
.git*/
1110
.idea
12-
.DS_STORE
11+
.DS_STORE

.travis.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
language: php
2+
3+
sudo: false
4+
5+
dist: trusty
6+
7+
git:
8+
depth: 5
9+
10+
php:
11+
- 5.6
12+
- 7.0
13+
- 7.1
14+
- hhvm
15+
- nightly
16+
17+
matrix:
18+
fast_finish: true
19+
allow_failures:
20+
- php: nightly
21+
22+
before_script:
23+
- composer self-update
24+
- composer install
25+
26+
script:
27+
- composer test

CHANGELOG.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,52 @@
11
# CHANGELOG
22

3+
## 1.1.5 - 2017-09-13
4+
5+
* Unit tests supported by `PHPUnit` were added.
6+
7+
* The repository was synchronized with Travis CI to implement continuous integration.
8+
9+
* Added `ErrorHandler/src/bootstrap.php` file
10+
11+
* Added `ErrorHandler/tests/bootstrap.php` file.
12+
13+
* Added `ErrorHandler/phpunit.xml.dist` file.
14+
* Added `ErrorHandler/_config.yml` file.
15+
* Added `ErrorHandler/.travis.yml` file.
16+
17+
* Added `ErrorHandler/public/template/view.php` file.
18+
19+
* Added `ErrorHandler/public/css/styles.php` file.
20+
21+
* Deleted `Josantonius\ErrorHandler\Tests\ErrorHandlerTest` class.
22+
* Deleted `Josantonius\ErrorHandler\Tests\ErrorHandlerTest->testSProvokeException()` method.
23+
* Deleted `Josantonius\ErrorHandler\Tests\ErrorHandlerTest->testSProvokeWarning()` method.
24+
* Deleted `Josantonius\ErrorHandler\Tests\ErrorHandlerTest->testSProvokeNotice()` method.
25+
* Deleted `Josantonius\ErrorHandler\Tests\ErrorHandlerTest->testSProvokeUserError()` method.
26+
* Deleted `Josantonius\ErrorHandler\Tests\ErrorHandlerTest->testSProvokeUserNotice()` method.
27+
* Deleted `Josantonius\ErrorHandler\Tests\ErrorHandlerTest->testSProvokeUserWarning()` method.
28+
* Deleted `Josantonius\ErrorHandler\Tests\ErrorHandlerTest->testSetCustomMethod()` method.
29+
* Deleted `Josantonius\ErrorHandler\Tests\ErrorHandlerTest->_customMethodResponse()` method.
30+
31+
* Added `Josantonius\ErrorHandler\Test\ErrorHandlerTest` class.
32+
* Added `Josantonius\ErrorHandler\Test\ErrorHandlerTest->testIfCustomExceptionHandlerIsActivated()` method.
33+
* Added `Josantonius\ErrorHandler\Test\ErrorHandlerTest->testIfCustomErrorHandlerIsActivated()` method.
34+
* Added `Josantonius\ErrorHandler\Test\ErrorHandlerTest->testException()` method.
35+
* Added `Josantonius\ErrorHandler\Test\ErrorHandlerTest->testExceptionWithCustomMethodsWithoutShowDefaultView()` method.
36+
* Added `Josantonius\ErrorHandler\Test\ErrorHandlerTest->testExceptionWithCustomMethodsAndShowDefaultView()` method.
37+
* Added `Josantonius\ErrorHandler\Test\ErrorHandlerTest->testError()` method.
38+
* Added `Josantonius\ErrorHandler\Test\ErrorHandlerTest->testErrorWithCustomMethodsWithoutShowDefaultView()` method.
39+
* Added `Josantonius\ErrorHandler\Tests\ErrorHandlerTest->testErrorWithCustomMethodsAndShowDefaultView()` method.
40+
* Added `Josantonius\ErrorHandler\Tests\ErrorHandlerTest->testGetErrorType()` method.
41+
342
## 1.1.4 - 2017-07-16
43+
444
* Deleted `Josantonius\ErrorHandler\Exception\ErrorHandlerException` class.
545
* Deleted `Josantonius\ErrorHandler\Exception\Exceptions` abstract class.
646
* Deleted `Josantonius\ErrorHandler\Exception\ErrorHandlerException->__construct()` method.
747

848
## 1.1.3 - 2017-05-15
49+
950
* You can now add custom methods to run instead of displaying the default view.
1051

1152
* Added `Josantonius\ErrorHandler\ErrorHandler->setParams()` method.
@@ -16,9 +57,11 @@
1657
* Added `Josantonius\ErrorHandler\Tests\ErrorHandlerTest->_customMethodResponse()` method.
1758

1859
## 1.1.2 - 2017-03-18
60+
1961
* Some files were excluded from download and comments and readme files were updated.
2062

2163
## 1.1.1 - 2017-02-21
64+
2265
* Added `Josantonius\ErrorHandler\ErrorHandler->getPreviewCode()` method.
2366
* Deleted `Josantonius\ErrorHandler\ErrorHandler->catchThrowable()` method.
2467
* Deleted `Josantonius\ErrorHandler\ErrorHandler->catchException()` method.
@@ -27,12 +70,15 @@
2770
* Changed `Josantonius\ErrorHandler\ErrorHandler->show()` method to `Josantonius\ErrorHandler\ErrorHandler->render()`.
2871

2972
## 1.1.0 - 2017-01-30
73+
3074
* Compatible with PHP 5.6 or higher.
3175

3276
## 1.0.0 - 2017-01-30
77+
3378
* Compatible only with PHP 7.0 or higher. In the next versions, the library will be modified to make it compatible with PHP 5.6 or higher.
3479

3580
## 1.0.0 - 2016-12-14
81+
3682
* Added `Josantonius\ErrorHandler\ErrorHandler` class.
3783
* Added `Josantonius\ErrorHandler\ErrorHandler->__construct()` method.
3884
* Added `Josantonius\ErrorHandler\ErrorHandler->catchThrowable()` method.
@@ -44,11 +90,13 @@
4490
* Added `Josantonius\ErrorHandler\ErrorHandler->show()` method.
4591

4692
## 1.0.0 - 2016-12-14
93+
4794
* Added `Josantonius\ErrorHandler\Exception\ErrorHandlerException` class.
4895
* Added `Josantonius\ErrorHandler\Exception\Exceptions` abstract class.
4996
* Added `Josantonius\ErrorHandler\Exception\ErrorHandlerException->__construct()` method.
5097

5198
## 1.0.0 - 2016-12-14
99+
52100
* Added `Josantonius\ErrorHandler\Tests\ErrorHandlerTest` class.
53101
* Added `Josantonius\ErrorHandler\Tests\ErrorHandlerTest->testSProvokeException()` method.
54102
* Added `Josantonius\ErrorHandler\Tests\ErrorHandlerTest->testSProvokeWarning()` method.

README-ES.md

Lines changed: 6 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# PHP ErrorHandler library
22

3-
[![Latest Stable Version](https://poser.pugx.org/josantonius/errorhandler/v/stable)](https://packagist.org/packages/josantonius/errorhandler) [![Total Downloads](https://poser.pugx.org/josantonius/errorhandler/downloads)](https://packagist.org/packages/josantonius/errorhandler) [![Latest Unstable Version](https://poser.pugx.org/josantonius/errorhandler/v/unstable)](https://packagist.org/packages/josantonius/errorhandler) [![License](https://poser.pugx.org/josantonius/errorhandler/license)](https://packagist.org/packages/josantonius/errorhandler)
3+
[![Latest Stable Version](https://poser.pugx.org/josantonius/errorhandler/v/stable)](https://packagist.org/packages/josantonius/errorhandler) [![Total Downloads](https://poser.pugx.org/josantonius/errorhandler/downloads)](https://packagist.org/packages/josantonius/errorhandler) [![Latest Unstable Version](https://poser.pugx.org/josantonius/errorhandler/v/unstable)](https://packagist.org/packages/josantonius/errorhandler) [![License](https://poser.pugx.org/josantonius/errorhandler/license)](https://packagist.org/packages/josantonius/errorhandler) [![Travis](https://travis-ci.org/Josantonius/PHP-ErrorHandler.svg)](https://github.com/Josantonius/PHP-ErrorHandler)
44

55
[English version](README.md)
66

@@ -22,16 +22,6 @@ Biblioteca PHP para manejar excepciones y errores.
2222

2323
---
2424

25-
<p align="center"><strong>Echa un vistazo al código</strong></p>
26-
27-
<p align="center">
28-
<a href="https://youtu.be/eCXyajDhXOc" title="Echa un vistazo al código">
29-
<img src="https://raw.githubusercontent.com/Josantonius/PHP-Algorithm/master/resources/youtube-thumbnail.jpg">
30-
</a>
31-
</p>
32-
33-
---
34-
3525
### Instalación
3626

3727
La mejor forma de instalar esta extensión es a través de [composer](http://getcomposer.org/download/).
@@ -110,29 +100,13 @@ ErrorHandler::SetCustomMethod($class, $method, $times);
110100

111101
### Tests
112102

113-
Para utilizar la clase de [pruebas](tests), simplemente:
103+
Para ejecutar las [pruebas](tests/ErrorHandler) simplemente:
114104

115-
```php
116-
<?php
117-
$loader = require __DIR__ . '/vendor/autoload.php';
105+
$ git clone https://github.com/Josantonius/PHP-ErrorHandler.git
106+
107+
$ cd PHP-ErrorHandler
118108

119-
$loader->addPsr4('Josantonius\\ErrorHandler\\Tests\\', __DIR__ . '/vendor/josantonius/errorhandler/tests');
120-
121-
use Josantonius\ErrorHandler\Tests\ErrorHandlerTest;
122-
```
123-
Métodos de prueba disponibles en esta biblioteca:
124-
125-
```php
126-
ErrorHandlerTest->testSetCustomMethod1();
127-
ErrorHandlerTest->testSetCustomMethod2();
128-
ErrorHandlerTest->testSetCustomMethod3();
129-
ErrorHandlerTest->testSProvokeException();
130-
ErrorHandlerTest->testSProvokeWarning();
131-
ErrorHandlerTest->testSProvokeNotice();
132-
ErrorHandlerTest->testSProvokeUserError();
133-
ErrorHandlerTest->testSProvokeUserNotice();
134-
ErrorHandlerTest->testSProvokeUserWarning();
135-
```
109+
$ phpunit
136110

137111
### Imágenes
138112

README.md

Lines changed: 6 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# PHP ErrorHandler library
22

3-
[![Latest Stable Version](https://poser.pugx.org/josantonius/errorhandler/v/stable)](https://packagist.org/packages/josantonius/errorhandler) [![Total Downloads](https://poser.pugx.org/josantonius/errorhandler/downloads)](https://packagist.org/packages/josantonius/errorhandler) [![Latest Unstable Version](https://poser.pugx.org/josantonius/errorhandler/v/unstable)](https://packagist.org/packages/josantonius/errorhandler) [![License](https://poser.pugx.org/josantonius/errorhandler/license)](https://packagist.org/packages/josantonius/errorhandler)
3+
[![Latest Stable Version](https://poser.pugx.org/josantonius/errorhandler/v/stable)](https://packagist.org/packages/josantonius/errorhandler) [![Total Downloads](https://poser.pugx.org/josantonius/errorhandler/downloads)](https://packagist.org/packages/josantonius/errorhandler) [![Latest Unstable Version](https://poser.pugx.org/josantonius/errorhandler/v/unstable)](https://packagist.org/packages/josantonius/errorhandler) [![License](https://poser.pugx.org/josantonius/errorhandler/license)](https://packagist.org/packages/josantonius/errorhandler) [![Travis](https://travis-ci.org/Josantonius/PHP-ErrorHandler.svg)](https://github.com/Josantonius/PHP-ErrorHandler)
44

55
[Versión en español](README-ES.md)
66

@@ -22,16 +22,6 @@ PHP library for handling exceptions and errors.
2222

2323
---
2424

25-
<p align="center"><strong>Take a look at the code</strong></p>
26-
27-
<p align="center">
28-
<a href="https://youtu.be/eCXyajDhXOc" title="Take a look at the code">
29-
<img src="https://raw.githubusercontent.com/Josantonius/PHP-Algorithm/master/resources/youtube-thumbnail.jpg">
30-
</a>
31-
</p>
32-
33-
---
34-
3525
### Installation
3626

3727
The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
@@ -111,30 +101,13 @@ ErrorHandler::SetCustomMethod($class, $method, $times);
111101

112102
### Tests
113103

114-
To use the [test](tests) class, simply:
115-
116-
```php
117-
<?php
118-
$loader = require __DIR__ . '/vendor/autoload.php';
119-
120-
$loader->addPsr4('Josantonius\\ErrorHandler\\Tests\\', __DIR__ . '/vendor/josantonius/errorhandler/tests');
121-
122-
use Josantonius\ErrorHandler\Tests\ErrorHandlerTest;
104+
To run [tests](tests/ErrorHandler) simply:
123105

124-
```
125-
Available test methods in this library:
106+
$ git clone https://github.com/Josantonius/PHP-ErrorHandler.git
107+
108+
$ cd PHP-ErrorHandler
126109

127-
```php
128-
ErrorHandlerTest->testSetCustomMethod1();
129-
ErrorHandlerTest->testSetCustomMethod2();
130-
ErrorHandlerTest->testSetCustomMethod3();
131-
ErrorHandlerTest->testSProvokeException();
132-
ErrorHandlerTest->testSProvokeWarning();
133-
ErrorHandlerTest->testSProvokeNotice();
134-
ErrorHandlerTest->testSProvokeUserError();
135-
ErrorHandlerTest->testSProvokeUserNotice();
136-
ErrorHandlerTest->testSProvokeUserWarning();
137-
```
110+
$ phpunit
138111

139112
### Images
140113

_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
theme: jekyll-theme-cayman

composer.json

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "josantonius/errorhandler",
3-
"version": "1.1.4",
3+
"version": "1.1.5",
44
"type": "library",
55
"description": "PHP library for handling exceptions and errors.",
66
"keywords": [
@@ -23,6 +23,8 @@
2323
}
2424
],
2525
"support": {
26+
"issues": "https://github.com/josantonius/php-errorhandler/issues",
27+
"forum": "http://stackoverflow.com/tags/josantonius/php-errorhandler",
2628
"source": "https://github.com/josantonius/php-errorhandler"
2729
},
2830
"config": {
@@ -32,19 +34,20 @@
3234
"require": {
3335
"php": "^5.6 || ^7.0"
3436
},
35-
"autoload": {
36-
"psr-4": {
37-
"Josantonius\\ErrorHandler\\": "src/"
38-
}
37+
"require-dev": {
38+
"phpunit/phpunit": "5.7.*"
3939
},
40-
"autoload-dev": {
40+
"autoload": {
4141
"psr-4": {
42-
"Josantonius\\ErrorHandler\\Tests\\": "tests/"
42+
"Josantonius\\ErrorHandler\\": "src/ErrorHandler/"
4343
}
4444
},
4545
"extra": {
4646
"branch-alias": {
4747
"dev-master": "1.0-dev"
4848
}
49+
},
50+
"scripts": {
51+
"test": "phpunit"
4952
}
5053
}

phpunit.xml.dist

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<phpunit backupGlobals="false"
4+
backupStaticAttributes="false"
5+
colors="true"
6+
convertErrorsToExceptions="true"
7+
convertNoticesToExceptions="true"
8+
convertWarningsToExceptions="true"
9+
processIsolation="false"
10+
stopOnFailure="false"
11+
syntaxCheck="false"
12+
bootstrap="tests/bootstrap.php"
13+
>
14+
<testsuites>
15+
<testsuite name="ErrorHandler Test Suite">
16+
<directory>tests/ErrorHandler</directory>
17+
</testsuite>
18+
</testsuites>
19+
20+
<filter>
21+
<whitelist>
22+
<directory>src/ErrorHandler</directory>
23+
</whitelist>
24+
</filter>
25+
</phpunit>
File renamed without changes.

0 commit comments

Comments
 (0)