Skip to content

Commit 3310078

Browse files
committed
The repository was updated to version 1.1.2
1 parent 6ff7656 commit 3310078

File tree

9 files changed

+494
-0
lines changed

9 files changed

+494
-0
lines changed

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_size = 4
6+
indent_style = space
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
phpunit.xml
2+
composer.phar
3+
composer.lock
4+
composer-test.lock
5+
vendor/
6+
build/artifacts/
7+
artifacts/
8+
docs/_build
9+
docs/*.pyc
10+
.git*/
11+
.idea
12+
.DS_STORE
13+
resources/

CHANGELOG.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# CHANGELOG
2+
3+
## 1.1.2 - 2017-03-18
4+
* Some files were excluded from download and comments and readme files were updated.
5+
6+
## 1.1.1 - 2017-02-21
7+
* Added `Josantonius\ErrorHandler\ErrorHandler->getPreviewCode()` method.
8+
* Deleted `Josantonius\ErrorHandler\ErrorHandler->catchThrowable()` method.
9+
* Deleted `Josantonius\ErrorHandler\ErrorHandler->catchException()` method.
10+
* Changed `Josantonius\ErrorHandler\ErrorHandler->catchError()` method to `Josantonius\ErrorHandler\ErrorHandler->error()`.
11+
* Changed `Josantonius\ErrorHandler\ErrorHandler->prepareException()` method to `Josantonius\ErrorHandler\ErrorHandler->exception()`.
12+
* Changed `Josantonius\ErrorHandler\ErrorHandler->show()` method to `Josantonius\ErrorHandler\ErrorHandler->render()`.
13+
14+
## 1.1.0 - 2017-01-30
15+
* Compatible with PHP 5.6 or higher.
16+
17+
## 1.0.0 - 2017-01-30
18+
* 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.
19+
20+
## 1.0.0 - 2016-12-14
21+
* Added `Josantonius\ErrorHandler\ErrorHandler` class.
22+
* Added `Josantonius\ErrorHandler\ErrorHandler->__construct()` method.
23+
* Added `Josantonius\ErrorHandler\ErrorHandler->catchThrowable()` method.
24+
* Added `Josantonius\ErrorHandler\ErrorHandler->catchException()` method.
25+
* Added `Josantonius\ErrorHandler\ErrorHandler->catchError()` method.
26+
* Added `Josantonius\ErrorHandler\ErrorHandler->exception()` method.
27+
* Added `Josantonius\ErrorHandler\ErrorHandler->prepareException()` method.
28+
* Added `Josantonius\ErrorHandler\ErrorHandler->getErrorType()` method.
29+
* Added `Josantonius\ErrorHandler\ErrorHandler->show()` method.
30+
31+
## 1.0.0 - 2016-12-14
32+
* Added `Josantonius\ErrorHandler\Exception\ErrorHandlerException` class.
33+
* Added `Josantonius\ErrorHandler\Exception\Exceptions` abstract class.
34+
* Added `Josantonius\ErrorHandler\Exception\ErrorHandlerException->__construct()` method.
35+
36+
## 1.0.0 - 2016-12-14
37+
* Added `Josantonius\ErrorHandler\Tests\ErrorHandlerTest` class.
38+
* Added `Josantonius\ErrorHandler\Tests\ErrorHandlerTest->testSProvokeException()` method.
39+
* Added `Josantonius\ErrorHandler\Tests\ErrorHandlerTest->testSProvokeWarning()` method.
40+
* Added `Josantonius\ErrorHandler\Tests\ErrorHandlerTest->testSProvokeNotice()` method.
41+
* Added `Josantonius\ErrorHandler\Tests\ErrorHandlerTest->testSProvokeUserError()` method.
42+
* Added `Josantonius\ErrorHandler\Tests\ErrorHandlerTest->testSProvokeUserNotice()` method.
43+
* Added `Josantonius\ErrorHandler\Tests\ErrorHandlerTest->testSProvokeUserWarning()` method.

CONDUCT.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Contributor Code of Conduct
2+
3+
As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4+
5+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.
6+
7+
Examples of unacceptable behavior by participants include:
8+
9+
* The use of sexualized language or imagery
10+
* Personal attacks
11+
* Trolling or insulting/derogatory comments
12+
* Public or private harassment
13+
* Publishing other's private information, such as physical or electronic addresses, without explicit permission
14+
* Other unethical or unprofessional conduct.
15+
16+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team.
17+
18+
This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community in a direct capacity. Personal views, beliefs and values of individuals do not necessarily reflect those of the organisation or affiliated individuals and organisations.
19+
20+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
21+
22+
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/)

README-ES.md

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
# PHP ErrorHandler library
2+
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)
4+
5+
[English version](README.md)
6+
7+
Librería PHP para manejar excepciones y errores.
8+
9+
---
10+
11+
- [Instalación](#instalación)
12+
- [Requisitos](#requisitos)
13+
- [Cómo empezar y ejemplos](#cómo-empezar-y-ejemplos)
14+
- [Métodos disponibles](#métodos-disponibles)
15+
- [Imágenes](#imagenes)
16+
- [Uso](#uso)
17+
- [Tests](#tests)
18+
- [Manejador de excepciones](#manejador-de-excepciones)
19+
- [Contribuir](#contribuir)
20+
- [Repositorio](#repositorio)
21+
- [Licencia](#licencia)
22+
- [Copyright](#copyright)
23+
24+
---
25+
26+
### Instalación
27+
28+
La mejor forma de instalar esta extensión es a través de [composer](http://getcomposer.org/download/).
29+
30+
Para instalar PHP ErrorHandler library, simplemente escribe:
31+
32+
$ composer require Josantonius/ErrorHandler
33+
34+
El comando anterior solamente instalará los archivos necesarios, si prefieres descargar todo el código, incluyendo tests, puedes utilizar:
35+
36+
$ composer require Josantonius/ErrorHandler --prefer-source
37+
38+
También puedes clonar el repositorio completo con Git:
39+
40+
$ git clone https://github.com/Josantonius/PHP-ErrorHandler.git
41+
42+
### Requisitos
43+
44+
Esta ĺibrería es soportada por versiones de PHP 5.6 o superiores y es compatible con versiones de HHVM 3.0 o superiores.
45+
46+
### Cómo empezar y ejemplos
47+
48+
Para utilizar esta librería, simplemente:
49+
50+
```php
51+
require __DIR__ . '/vendor/autoload.php';
52+
53+
use Josantonius\ErrorHandler\ErrorHandler;
54+
```
55+
### Métodos disponibles
56+
57+
Métodos disponibles en esta librería:
58+
59+
```php
60+
ErrorHandler->error();
61+
ErrorHandler->exception();
62+
ErrorHandler->getErrorType();
63+
ErrorHandler->render();
64+
65+
### Imágenes
66+
67+
![image](resources/images/exception.png)
68+
![image](resources/images/error.png)
69+
![image](resources/images/notice.png)
70+
![image](resources/images/warning.png)
71+
72+
```
73+
### Uso
74+
75+
Ejemplo de uso para esta librería:
76+
77+
```php
78+
<?php
79+
require __DIR__ . '/vendor/autoload.php';
80+
81+
use Josantonius\ErrorHandler\ErrorHandler;
82+
83+
/* Se recomienda intanciar la clase en un archivo base como el index.php */
84+
85+
new ErrorHandler;
86+
```
87+
88+
### Tests
89+
90+
Para utilizar la clase de [pruebas](tests), simplemente:
91+
92+
```php
93+
<?php
94+
$loader = require __DIR__ . '/vendor/autoload.php';
95+
96+
$loader->addPsr4('Josantonius\\ErrorHandler\\Tests\\', __DIR__ . '/vendor/josantonius/errorhandler/tests');
97+
98+
use Josantonius\ErrorHandler\Tests\ErrorHandlerTest;
99+
```
100+
Métodos de prueba disponibles en esta librería:
101+
102+
```php
103+
ErrorHandlerTest->testSProvokeException();
104+
ErrorHandlerTest->testSProvokeWarning();
105+
ErrorHandlerTest->testSProvokeNotice();
106+
ErrorHandlerTest->testSProvokeUserError();
107+
ErrorHandlerTest->testSProvokeUserNotice();
108+
ErrorHandlerTest->testSProvokeUserWarning();
109+
```
110+
111+
### Manejador de excepciones
112+
113+
Esta librería utiliza [control de excepciones](src/Exception) que puedes personalizar a tu gusto.
114+
### Contribuir
115+
1. Comprobar si hay incidencias abiertas o abrir una nueva para iniciar una discusión en torno a un fallo o función.
116+
1. Bifurca la rama del repositorio en GitHub para iniciar la operación de ajuste.
117+
1. Escribe una o más pruebas para la nueva característica o expón el error.
118+
1. Haz cambios en el código para implementar la característica o reparar el fallo.
119+
1. Envía pull request para fusionar los cambios y que sean publicados.
120+
121+
Esto está pensado para proyectos grandes y de larga duración.
122+
123+
### Repositorio
124+
125+
Los archivos de este repositorio se crearon y subieron automáticamente con [Reposgit Creator](https://github.com/Josantonius/BASH-Reposgit).
126+
127+
### Licencia
128+
129+
Este proyecto está licenciado bajo **licencia MIT**. Consulta el archivo [LICENSE](LICENSE) para más información.
130+
131+
## Copyright
132+
133+
2017 Josantonius, [josantonius.com](https://josantonius.com/)
134+
135+
Si te ha resultado útil, házmelo saber :wink:
136+
137+
Puedes contactarme en [Twitter](https://twitter.com/Josantonius) o a través de mi [correo electrónico](mailto:hello@josantonius.com).

README.md

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
# PHP ErrorHandler library
2+
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)
4+
5+
[Versión en español](README-ES.md)
6+
7+
PHP library for handling exceptions and errors.
8+
9+
---
10+
11+
- [Installation](#installation)
12+
- [Requirements](#requirements)
13+
- [Quick Start and Examples](#quick-start-and-examples)
14+
- [Available Methods](#available-methods)
15+
- [Images](#images)
16+
- [Usage](#usage)
17+
- [Tests](#tests)
18+
- [Exception Handler](#exception-handler)
19+
- [Contribute](#contribute)
20+
- [Repository](#repository)
21+
- [Licensing](#licensing)
22+
- [Copyright](#copyright)
23+
24+
---
25+
26+
### Installation
27+
28+
The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
29+
30+
To install PHP ErrorHandler library, simply:
31+
32+
$ composer require Josantonius/ErrorHandler
33+
34+
The previous command will only install the necessary files, if you prefer to download the entire source, including tests, you can use:
35+
36+
$ composer require Josantonius/ErrorHandler --prefer-source
37+
38+
Or you can also clone the complete repository with Git:
39+
40+
$ git clone https://github.com/Josantonius/PHP-ErrorHandler.git
41+
42+
### Requirements
43+
44+
This library is supported by PHP versions 5.6 or higher and is compatible with HHVM versions 3.0 or higher.
45+
46+
### Quick Start and Examples
47+
48+
To use this class, simply:
49+
50+
```php
51+
require __DIR__ . '/vendor/autoload.php';
52+
53+
use Josantonius\ErrorHandler\ErrorHandler;
54+
```
55+
### Available Methods
56+
57+
Available methods in this library:
58+
59+
```php
60+
ErrorHandler->error();
61+
ErrorHandler->exception();
62+
```
63+
64+
### Images
65+
66+
![image](resources/images/exception.png)
67+
![image](resources/images/error.png)
68+
![image](resources/images/notice.png)
69+
![image](resources/images/warning.png)
70+
71+
### Usage
72+
73+
Example of use for this library:
74+
75+
```php
76+
<?php
77+
require __DIR__ . '/vendor/autoload.php';
78+
79+
use Josantonius\ErrorHandler\ErrorHandler;
80+
81+
/* It is recommended to instantiate the class in a base file as the index.php */
82+
83+
new ErrorHandler;
84+
```
85+
86+
### Tests
87+
88+
To use the [test](tests) class, simply:
89+
90+
```php
91+
<?php
92+
$loader = require __DIR__ . '/vendor/autoload.php';
93+
94+
$loader->addPsr4('Josantonius\\ErrorHandler\\Tests\\', __DIR__ . '/vendor/josantonius/errorhandler/tests');
95+
96+
use Josantonius\ErrorHandler\Tests\ErrorHandlerTest;
97+
98+
```
99+
Available test methods in this library:
100+
101+
```php
102+
ErrorHandlerTest->testSProvokeException();
103+
ErrorHandlerTest->testSProvokeWarning();
104+
ErrorHandlerTest->testSProvokeNotice();
105+
ErrorHandlerTest->testSProvokeUserError();
106+
ErrorHandlerTest->testSProvokeUserNotice();
107+
ErrorHandlerTest->testSProvokeUserWarning();
108+
```
109+
110+
### Exception Handler
111+
112+
This library uses [exception handler](src/Exception) that you can customize.
113+
### Contribute
114+
1. Check for open issues or open a new issue to start a discussion around a bug or feature.
115+
1. Fork the repository on GitHub to start making your changes.
116+
1. Write one or more tests for the new feature or that expose the bug.
117+
1. Make code changes to implement the feature or fix the bug.
118+
1. Send a pull request to get your changes merged and published.
119+
120+
This is intended for large and long-lived objects.
121+
122+
### Repository
123+
124+
All files in this repository were created and uploaded automatically with [Reposgit Creator](https://github.com/Josantonius/BASH-Reposgit).
125+
126+
### Licensing
127+
128+
This project is licensed under **MIT license**. See the [LICENSE](LICENSE) file for more info.
129+
130+
## Copyright
131+
132+
2017 Josantonius, [josantonius.com](https://josantonius.com/)
133+
134+
If you find it useful, let me know :wink:
135+
136+
You can contact me on [Twitter](https://twitter.com/Josantonius) or through my [email](mailto:hello@josantonius.com).

contributors.txt

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

0 commit comments

Comments
 (0)