aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2016-10-19 16:27:31 +0200
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2016-10-19 16:27:31 +0200
commit3731954ff7c02a5a0a64b48b9772ea8fa4febb6c (patch)
treee20c799ded4614c48a5551e6bbf264e3ad937b8f
parent39b035da547ec4df6fdd5d59486378d385e1f5b7 (diff)
downloadConsistency-3731954ff7c02a5a0a64b48b9772ea8fa4febb6c.zip
Consistency-3731954ff7c02a5a0a64b48b9772ea8fa4febb6c.tar.gz
Consistency-3731954ff7c02a5a0a64b48b9772ea8fa4febb6c.tar.bz2
Documentation: New `README.md` file.
-rw-r--r--README.md126
1 files changed, 81 insertions, 45 deletions
diff --git a/README.md b/README.md
index d8b1683..b7f87da 100644
--- a/README.md
+++ b/README.md
@@ -1,29 +1,62 @@
-![Hoa](http://static.hoa-project.net/Image/Hoa_small.png)
-
-Hoa is a **modular**, **extensible** and **structured** set of PHP libraries.
-Moreover, Hoa aims at being a bridge between industrial and research worlds.
-
-# Hoa\Consistency ![state](http://central.hoa-project.net/State/Consistency)
+<p align="center">
+ <img src="https://static.hoa-project.net/Image/Hoa.svg" alt="Hoa" width="250px" />
+</p>
+
+---
+
+<p align="center">
+ <a href="https://travis-ci.org/hoaproject/consistency"><img src="https://img.shields.io/travis/hoaproject/consistency/master.svg" alt="Build status" /></a>
+ <a href="https://coveralls.io/github/hoaproject/consistency?branch=master"><img src="https://img.shields.io/coveralls/hoaproject/consistency/master.svg" alt="Code coverage" /></a>
+ <a href="https://packagist.org/packages/hoa/consistency"><img src="https://img.shields.io/packagist/dt/hoa/consistency.svg" alt="Packagist" /></a>
+ <a href="https://hoa-project.net/LICENSE"><img src="https://img.shields.io/packagist/l/hoa/consistency.svg" alt="License" /></a>
+</p>
+<p align="center">
+ Hoa is a <strong>modular</strong>, <strong>extensible</strong> and
+ <strong>structured</strong> set of PHP libraries.<br />
+ Moreover, Hoa aims at being a bridge between industrial and research worlds.
+</p>
+
+# Hoa\Consistency
+
+[![Help on IRC](https://img.shields.io/badge/help-%23hoaproject-ff0066.svg)](https://webchat.freenode.net/?channels=#hoaproject)
+[![Help on Gitter](https://img.shields.io/badge/help-gitter-ff0066.svg)](https://gitter.im/hoaproject/central)
+[![Documentation](https://img.shields.io/badge/documentation-hack_book-ff0066.svg)](https://central.hoa-project.net/Documentation/Library/Consistency)
+[![Board](https://img.shields.io/badge/organisation-board-ff0066.svg)](https://waffle.io/hoaproject/consistency)
This library provides a thin layer between PHP VMs and libraries to ensure
consistency accross VM versions and library versions.
+[Learn more](https://central.hoa-project.net/Documentation/Library/Consistency).
+
## Installation
-With [Composer](http://getcomposer.org/), to include this library into your
-dependencies, you need to require
-[`hoa/consistency`](https://packagist.org/packages/hoa/consistency):
+With [Composer](https://getcomposer.org/), to include this library into
+your dependencies, you need to
+require [`hoa/consistency`](https://packagist.org/packages/hoa/consistency):
-```json
-{
- "require": {
- "hoa/consistency": "~1.0"
- }
-}
+```sh
+$ composer require hoa/consistency '~1.0'
+```
+
+For more installation procedures, please read [the Source
+page](https://hoa-project.net/Source.html).
+
+## Testing
+
+Before running the test suites, the development dependencies must be installed:
+
+```sh
+$ composer install
+```
+
+Then, to run all the test suites:
+
+```sh
+$ vendor/bin/hoa test:run
```
-Please, read the website to [get more informations about how to
-install](http://hoa-project.net/Source.html).
+For more information, please read the [contributor
+guide](https://hoa-project.net/Literature/Contributor/Guide.html).
## Quick usage
@@ -36,28 +69,6 @@ autoloader](http://www.php-fig.org/psr/psr-4/) and the xcallable API.
The `Hoa\Consistency\Consistency` class ensures foreward and backward
compatibility.
-#### Example with traits
-
-For instance, it provides a [`trait_exists`](http://php.net/trait_exists)
-function if it does not exist. This way, you are able to anticipate this new
-feature even if your current PHP version does not support it:
-
-```php
-if (trait_exists('Foo')) { …
-```
-
-Also, we are able to build a complete
-`Hoa\Consistency\Consistency::entityExists` method that checks whether any kind
-of entity (class, interface or trait) exists. Even if your current PHP version
-does not support traits, it will work. And when you will upgrade, the new check
-will be free:
-
-```php
-if (false === Hoa\Consistency\Consistency::entityExist('foo')) {
- // load it.
-}
-```
-
#### Example with keywords
The `Hoa\Consistency\Consistency::isKeyword` checks whether a specific word is
@@ -146,9 +157,9 @@ $baz = new Foo\Bar\Baz(); // automatically loaded!
Xcallables are “extended callables”. It is a unified API to invoke callables of
any kinds, and also extends some Hoa's API (like
-[`Hoa\Event`](http://central.hoa-project.net/Resource/Library/Event)
+[`Hoa\Event`](https://central.hoa-project.net/Resource/Library/Event)
or
-[`Hoa\Stream`](http://central.hoa-project.net/Resource/Library/Stream)). It
+[`Hoa\Stream`](https://central.hoa-project.net/Resource/Library/Stream)). It
understands the following kinds:
* `'function'` as a string,
* `'class::method'` as a string,
@@ -230,10 +241,35 @@ on the `hoa://Event/Exception` event channel.
## Documentation
-Different documentations can be found on the website:
-[http://hoa-project.net/](http://hoa-project.net/).
+The
+[hack book of `Hoa\Consistency`](https://central.hoa-project.net/Documentation/Library/Consistency)
+contains detailed information about how to use this library and how it works.
+
+To generate the documentation locally, execute the following commands:
+
+```sh
+$ composer require --dev hoa/devtools
+$ vendor/bin/hoa devtools:documentation --open
+```
+
+More documentation can be found on the project's website:
+[hoa-project.net](https://hoa-project.net/).
+
+## Getting help
+
+There are mainly two ways to get help:
+
+ * On the [`#hoaproject`](https://webchat.freenode.net/?channels=#hoaproject)
+ IRC channel,
+ * On the forum at [users.hoa-project.net](https://users.hoa-project.net).
+
+## Contribution
+
+Do you want to contribute? Thanks! A detailed [contributor
+guide](https://hoa-project.net/Literature/Contributor/Guide.html) explains
+everything you need to know.
## License
-Hoa is under the New BSD License (BSD-3-Clause). Please, see
-[`LICENSE`](http://hoa-project.net/LICENSE).
+Hoa is under the New BSD License (BSD-3-Clause). Please, see
+[`LICENSE`](https://hoa-project.net/LICENSE) for details.