Skip to content

Commit

Permalink
Updated to 1.0.6 version
Browse files Browse the repository at this point in the history
  • Loading branch information
josantonius committed Sep 13, 2017
1 parent 51ccc29 commit b011899
Show file tree
Hide file tree
Showing 1,367 changed files with 118,503 additions and 399 deletions.
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
/tests export-ignore
/src/bootstrap.php export-ignore
/vendor export-ignore
.gitattributes export-ignore
.gitignore export-ignore
_config.yml export-ignore
.travis.yml export-ignore
CHANGELOG.md export-ignore
phpunit.xml.dist export-ignore
CONDUCT.md export-ignore
contributors.txt export-ignore
README.md export-ignore
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ phpunit.xml
composer.phar
composer.lock
composer-test.lock
vendor/
build/artifacts/
artifacts/
docs/_build
Expand Down
27 changes: 27 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
language: php

sudo: false

dist: trusty

git:
depth: 5

php:
- 5.6
- 7.0
- 7.1
- hhvm
- nightly

matrix:
fast_finish: true
allow_failures:
- php: nightly

before_script:
- composer self-update
- composer install

script:
- composer test
51 changes: 51 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,51 @@
# CHANGELOG

## 1.0.6 - 2017-09-13

* Unit tests supported by `PHPUnit` were added.

* The repository was synchronized with Travis CI to implement continuous integration.

* Added `Hook/src/bootstrap.php` file

* Added `Hook/tests/bootstrap.php` file.

* Added `Hook/phpunit.xml.dist` file.
* Added `Hook/_config.yml` file.
* Added `Hook/.travis.yml` file.

* Deleted `Josantonius\Hook\Tests\HookTest::testAddHooksMethod()` method.
* Deleted `Josantonius\Hook\Tests\HookTest::testAddHooksArray()` method.
* Deleted `Josantonius\Hook\Tests\HookTest::testAddHooksInstance()` method.
* Deleted `Josantonius\Hook\Tests\HookTest::testCurrentHook()` method.
* Deleted `Josantonius\Hook\Tests\HookTest::testSetSingletonName()` method.

* Deleted `Josantonius\Hook\Exception\HookException` class.
* Deleted `Josantonius\Hook\Exception\Exceptions` abstract class.
* Deleted `Josantonius\Hook\Exception\HookException->__construct()` method.

* Added `Josantonius\Hook\Test\HookTest::testAddAction()` method.
* Added `Josantonius\Hook\Test\HookTest::testAddActionWithPriority()` method.
* Added `Josantonius\Hook\Test\HookTest::testAddActionWithPriorityAndArguments()` method.
* Added `Josantonius\Hook\Test\HookTest::testAddActionWithCustomSingletonMethod()` method.
* Added `Josantonius\Hook\Test\HookTest::testAddMultipleActions()` method.
* Added `Josantonius\Hook\Test\HookTest::testAddMultipleActionsWithCustomSingletonMethod()` method.
* Added `Josantonius\Hook\Test\HookTest::testDoActions()` method.
* Added `Josantonius\Hook\Test\HookTest::testDoActionAndGetCurrentHook()` method.
* Added `Josantonius\Hook\Test\HookTest::testDoActionsWithArguments()` method.

* Added `Josantonius\Hook\Test\Example` class.
* Added `Josantonius\Hook\Test\Example::getInstance()` method.
* Added `Josantonius\Hook\Test\Example::singletonMethod()` method.
* Added `Josantonius\Hook\Test\Example::meta()` method.
* Added `Josantonius\Hook\Test\Example::css()` method.
* Added `Josantonius\Hook\Test\Example::js()` method.
* Added `Josantonius\Hook\Test\Example::afterBody()` method.
* Added `Josantonius\Hook\Test\Example::slide()` method.
* Added `Josantonius\Hook\Test\Example::form()` method.
* Added `Josantonius\Hook\Test\Example::article()` method.
* Added `Josantonius\Hook\Test\Example::footer()` method.

## 1.0.5 - 2017-06-24

*The class was improved to work with different instances and some static methods were changed to dynamic ones.
Expand Down Expand Up @@ -51,14 +97,17 @@ These deprecated methods will be removed as of version 1.0.4:
* Added `$current` property.

## 1.0.2 - 2017-05-19

* Added option to remove custom function to hook.

* Added `Josantonius\Hook\Hook::resetHook()` method.

## 1.0.1 - 2017-03-18

* Some files were excluded from download and comments and readme files were updated.

## 1.0.0 - 2017-03-15

* Added `Josantonius\Hook\Hook` class.
* Added `Josantonius\Hook\Hook::getInstance()` method.
* Added `Josantonius\Hook\Hook::setSingletonName()` method.
Expand All @@ -68,11 +117,13 @@ These deprecated methods will be removed as of version 1.0.4:
* Added `Josantonius\Hook\Hook->collectHook()` method.

## 1.0.0 - 2017-03-15

* Added `Josantonius\Hook\Exception\HookException` class.
* Added `Josantonius\Hook\Exception\Exceptions` abstract class.
* Added `Josantonius\Hook\Exception\HookException->__construct()` method.

## 1.0.0 - 2017-03-15

* Added `Josantonius\Hook\Tests\HookTest` class.
* Added `Josantonius\Hook\Tests\HookTest::testAddHooks()` method.
* Added `Josantonius\Hook\Tests\HookTest::testSetSingletonName()` method.
Expand Down
38 changes: 7 additions & 31 deletions README-ES.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# PHP Hook library

[![Latest Stable Version](https://poser.pugx.org/josantonius/hook/v/stable)](https://packagist.org/packages/josantonius/hook) [![Total Downloads](https://poser.pugx.org/josantonius/hook/downloads)](https://packagist.org/packages/josantonius/hook) [![Latest Unstable Version](https://poser.pugx.org/josantonius/hook/v/unstable)](https://packagist.org/packages/josantonius/hook) [![License](https://poser.pugx.org/josantonius/hook/license)](https://packagist.org/packages/josantonius/hook)
[![Latest Stable Version](https://poser.pugx.org/josantonius/hook/v/stable)](https://packagist.org/packages/josantonius/hook) [![Total Downloads](https://poser.pugx.org/josantonius/hook/downloads)](https://packagist.org/packages/josantonius/hook) [![Latest Unstable Version](https://poser.pugx.org/josantonius/hook/v/unstable)](https://packagist.org/packages/josantonius/hook) [![License](https://poser.pugx.org/josantonius/hook/license)](https://packagist.org/packages/josantonius/hook) [![Travis](https://travis-ci.org/Josantonius/PHP-Hook.svg)](https://travis-ci.org/Josantonius/PHP-Hook)

[English version](README.md)

Librería para manejo de hooks.
Biblioteca para manejo de hooks.

---

Expand All @@ -22,16 +22,6 @@ Librería para manejo de hooks.

---

<p align="center"><strong>Echa un vistazo al código</strong></p>

<p align="center">
<a href="" title="Echa un vistazo al código">
<img src="https://raw.githubusercontent.com/Josantonius/PHP-Algorithm/master/resources/youtube-thumbnail.jpg">
</a>
</p>

---

### Instalación

La mejor forma de instalar esta extensión es a través de [composer](http://getcomposer.org/download/).
Expand Down Expand Up @@ -153,27 +143,13 @@ Hook::doAction('footer');

### Tests

Para utilizar la clase de [pruebas](tests), simplemente:

```php
<?php
$loader = require __DIR__ . '/vendor/autoload.php';

$loader->addPsr4('Josantonius\\Hook\\Tests\\', __DIR__ . '/vendor/josantonius/hook/tests');

use Josantonius\Hook\Tests\HookTest;
```
Para ejecutar las [pruebas](tests/Hook/test) simplemente:

Métodos de prueba disponibles:
$ git clone https://github.com/Josantonius/PHP-Hook.git

$ cd PHP-Hook

```php
HookTest::testAddHooksMethod();
HookTest::testAddHooksArray();
HookTest::testAddHooksInstance();
HookTest::testSetSingletonName();
HookTest::testCurrentHook();
HookTest::testExecuteHooks();
```
$ phpunit

### Manejador de excepciones

Expand Down
37 changes: 6 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# PHP Hook library

[![Latest Stable Version](https://poser.pugx.org/josantonius/hook/v/stable)](https://packagist.org/packages/josantonius/hook) [![Total Downloads](https://poser.pugx.org/josantonius/hook/downloads)](https://packagist.org/packages/josantonius/hook) [![Latest Unstable Version](https://poser.pugx.org/josantonius/hook/v/unstable)](https://packagist.org/packages/josantonius/hook) [![License](https://poser.pugx.org/josantonius/hook/license)](https://packagist.org/packages/josantonius/hook)
[![Latest Stable Version](https://poser.pugx.org/josantonius/hook/v/stable)](https://packagist.org/packages/josantonius/hook) [![Total Downloads](https://poser.pugx.org/josantonius/hook/downloads)](https://packagist.org/packages/josantonius/hook) [![Latest Unstable Version](https://poser.pugx.org/josantonius/hook/v/unstable)](https://packagist.org/packages/josantonius/hook) [![License](https://poser.pugx.org/josantonius/hook/license)](https://packagist.org/packages/josantonius/hook) [![Travis](https://travis-ci.org/Josantonius/PHP-Hook.svg)](https://travis-ci.org/Josantonius/PHP-Hook)

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

Expand All @@ -22,16 +22,6 @@ Library for handling hooks.

---

<p align="center"><strong>Echa un vistazo al código</strong></p>

<p align="center">
<a href="" title="Echa un vistazo al código">
<img src="https://raw.githubusercontent.com/Josantonius/PHP-Algorithm/master/resources/youtube-thumbnail.jpg">
</a>
</p>

---

### Installation

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
Expand Down Expand Up @@ -153,28 +143,13 @@ Hook::doAction('footer');

### Tests

To use the [test](tests) class, simply:

```php
<?php
$loader = require __DIR__ . '/vendor/autoload.php';
To run [tests](tests/Hook/test) simply:

$loader->addPsr4('Josantonius\\Hook\\Tests\\', __DIR__ . '/vendor/josantonius/hook/tests');
$ git clone https://github.com/Josantonius/PHP-Hook.git

$ cd PHP-Hook

use Josantonius\Hook\Tests\HookTest;

```

Available test methods in this library:

```php
HookTest::testAddHooksMethod();
HookTest::testAddHooksArray();
HookTest::testAddHooksInstance();
HookTest::testSetSingletonName();
HookTest::testCurrentHook();
HookTest::testExecuteHooks();
```
$ phpunit

### Exception Handler

Expand Down
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
theme: jekyll-theme-cayman
19 changes: 11 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "josantonius/hook",
"version": "1.0.5",
"version": "1.0.6",
"type": "library",
"description": "Library for handling hooks.",
"keywords": [
Expand All @@ -20,7 +20,9 @@
}
],
"support": {
"source": "https://github.com/josantonius/php-hook"
"issues": "https://github.com/josantonius/php-asset/issues",
"forum": "http://stackoverflow.com/tags/josantonius/php-asset",
"source": "https://github.com/josantonius/php-asset"
},
"config": {
"preferred-install": "dist"
Expand All @@ -29,19 +31,20 @@
"require": {
"php": "^5.6 || ^7.0"
},
"autoload": {
"psr-4": {
"Josantonius\\Hook\\": "src/"
}
"require-dev": {
"phpunit/phpunit": "5.7.*"
},
"autoload-dev": {
"autoload": {
"psr-4": {
"Josantonius\\Hook\\Tests\\": "tests/"
"Josantonius\\Hook\\": "src/Hook/"
}
},
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"scripts": {
"test": "phpunit"
}
}
25 changes: 25 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit backupGlobals="false"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
bootstrap="tests/bootstrap.php"
>
<testsuites>
<testsuite name="Hook Test Suite">
<directory>tests/Hook</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory>src/Hook</directory>
</whitelist>
</filter>
</phpunit>
40 changes: 0 additions & 40 deletions src/Exception/HookException.php

This file was deleted.

Loading

0 comments on commit b011899

Please sign in to comment.