Skip to content
Snippets Groups Projects
Commit 3b945fe2 authored by catch's avatar catch
Browse files

Issue #2366043 by dawehner: Upgrade to Symfony 2.6

parent 150cbcf6
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Showing
with 1111 additions and 928 deletions
This diff is collapsed.
...@@ -173,4 +173,30 @@ public function getRequirements() { ...@@ -173,4 +173,30 @@ public function getRequirements() {
return $this->route->getRequirements(); return $this->route->getRequirements();
} }
/**
* {@inheritdoc}
*/
public function serialize() {
$data = unserialize(parent::serialize());
$data['fit'] = $this->fit;
$data['patternOutline'] = $this->patternOutline;
$data['numParts'] = $this->numParts;
return serialize($data);
}
/**
* {@inheritdoc}
*/
public function unserialize($serialized)
{
parent::unserialize($serialized);
$data = unserialize($serialized);
$this->fit = $data['fit'];
$this->patternOutline = $data['patternOutline'];
$this->numParts = $data['numParts'];
}
} }
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
'Symfony\\Component\\Translation\\' => array($vendorDir . '/symfony/translation'), 'Symfony\\Component\\Translation\\' => array($vendorDir . '/symfony/translation'),
'Symfony\\Component\\Serializer\\' => array($vendorDir . '/symfony/serializer'), 'Symfony\\Component\\Serializer\\' => array($vendorDir . '/symfony/serializer'),
'Symfony\\Component\\Routing\\' => array($vendorDir . '/symfony/routing'), 'Symfony\\Component\\Routing\\' => array($vendorDir . '/symfony/routing'),
'Symfony\\Component\\Process\\' => array($vendorDir . '/symfony/process'),
'Symfony\\Component\\HttpKernel\\' => array($vendorDir . '/symfony/http-kernel'), 'Symfony\\Component\\HttpKernel\\' => array($vendorDir . '/symfony/http-kernel'),
'Symfony\\Component\\HttpFoundation\\' => array($vendorDir . '/symfony/http-foundation'), 'Symfony\\Component\\HttpFoundation\\' => array($vendorDir . '/symfony/http-foundation'),
'Symfony\\Component\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher'), 'Symfony\\Component\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher'),
......
This diff is collapsed.
EmailValidator [![Build Status](https://travis-ci.org/egulias/EmailValidator.png?branch=master)](https://travis-ci.org/egulias/EmailValidator) [![Coverage Status](https://coveralls.io/repos/egulias/EmailValidator/badge.png?branch=master)](https://coveralls.io/r/egulias/EmailValidator?branch=master) [![SensioLabsInsight](https://insight.sensiolabs.com/projects/b18d473e-bd5a-4d88-a7b2-7aeaee0ebd7b/small.png)](https://insight.sensiolabs.com/projects/b18d473e-bd5a-4d88-a7b2-7aeaee0ebd7b)[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/egulias/EmailValidator/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/egulias/EmailValidator/?branch=master) EmailValidator [![Build Status](https://travis-ci.org/egulias/EmailValidator.png?branch=master)](https://travis-ci.org/egulias/EmailValidator) [![Coverage Status](https://coveralls.io/repos/egulias/EmailValidator/badge.png?branch=master)](https://coveralls.io/r/egulias/EmailValidator?branch=master) [![SensioLabsInsight](https://insight.sensiolabs.com/projects/22ba6692-9c02-42e5-a65d-1c5696bfffc6/small.png)](https://insight.sensiolabs.com/projects/22ba6692-9c02-42e5-a65d-1c5696bfffc6)[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/egulias/EmailValidator/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/egulias/EmailValidator/?branch=master)
============================= =============================
##Installation## ##Installation##
Install via composer. Add to your current compooser.json ```require``` key: ```"egulias/email-validator":"1.0.x-dev" ```
Run the command below to install via Composer
```shell
composer require egulias/email-validator
```
##Usage## ##Usage##
...@@ -24,7 +29,7 @@ More advanced example (returns detailed diagnostic error codes): ...@@ -24,7 +29,7 @@ More advanced example (returns detailed diagnostic error codes):
```php ```php
<?php <?php
use egulias\EmailValidator\EmailValidator; use Egulias\EmailValidator\EmailValidator;
$validator = new EmailValidator; $validator = new EmailValidator;
$email = 'dominic@sayers.cc'; $email = 'dominic@sayers.cc';
...@@ -46,6 +51,6 @@ As this is a port from another library and work, here are other people related t ...@@ -46,6 +51,6 @@ As this is a port from another library and work, here are other people related t
* Josepf Bielawski [@stloyd](http://github.com/stloyd): For its first re-work of Dominic's lib * Josepf Bielawski [@stloyd](http://github.com/stloyd): For its first re-work of Dominic's lib
* Dominic Sayers [@dominicsayers](http://github.com/dominicsayers): The original isemail function * Dominic Sayers [@dominicsayers](http://github.com/dominicsayers): The original isemail function
##Licence## ##License##
Released under the MIT Licence attached with this code. Released under the MIT License attached with this code.
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
], ],
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.0.x-dev" "dev-master": "1.3.x-dev"
} }
}, },
"require": { "require": {
......
{ {
"_readme": [ "_readme": [
"This file locks the dependencies of your project to a known state", "This file locks the dependencies of your project to a known state",
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file" "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
], ],
"hash": "cca347a6b95164b1121e034b95f824ec", "hash": "9e9dff0cc08c7292600453e681201e13",
"packages": [ "packages": [
{ {
"name": "doctrine/lexer", "name": "doctrine/lexer",
...@@ -61,16 +62,16 @@ ...@@ -61,16 +62,16 @@
"packages-dev": [ "packages-dev": [
{ {
"name": "guzzle/guzzle", "name": "guzzle/guzzle",
"version": "v3.9.1", "version": "v3.9.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/guzzle/guzzle3.git", "url": "https://github.com/guzzle/guzzle3.git",
"reference": "92d9934f2fca1da15178c91239576ae26e505e60" "reference": "54991459675c1a2924122afbb0e5609ade581155"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle3/zipball/92d9934f2fca1da15178c91239576ae26e505e60", "url": "https://api.github.com/repos/guzzle/guzzle3/zipball/54991459675c1a2924122afbb0e5609ade581155",
"reference": "92d9934f2fca1da15178c91239576ae26e505e60", "reference": "54991459675c1a2924122afbb0e5609ade581155",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
...@@ -114,7 +115,7 @@ ...@@ -114,7 +115,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "3.8-dev" "dev-master": "3.9-dev"
} }
}, },
"autoload": { "autoload": {
...@@ -149,7 +150,7 @@ ...@@ -149,7 +150,7 @@
"rest", "rest",
"web service" "web service"
], ],
"time": "2014-05-07 17:04:22" "time": "2014-08-11 04:32:36"
}, },
{ {
"name": "psr/log", "name": "psr/log",
...@@ -195,18 +196,18 @@ ...@@ -195,18 +196,18 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/satooshi/php-coveralls.git", "url": "https://github.com/satooshi/php-coveralls.git",
"reference": "b7271847c84d160f5b0aae83e45c225e8ffc96f4" "reference": "94389a0ebdb64857d6899b5e0254dffa99e5aa96"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/satooshi/php-coveralls/zipball/b7271847c84d160f5b0aae83e45c225e8ffc96f4", "url": "https://api.github.com/repos/satooshi/php-coveralls/zipball/94389a0ebdb64857d6899b5e0254dffa99e5aa96",
"reference": "b7271847c84d160f5b0aae83e45c225e8ffc96f4", "reference": "94389a0ebdb64857d6899b5e0254dffa99e5aa96",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"ext-json": "*", "ext-json": "*",
"ext-simplexml": "*", "ext-simplexml": "*",
"guzzle/guzzle": ">=3.0", "guzzle/guzzle": ">=2.7",
"php": ">=5.3", "php": ">=5.3",
"psr/log": "1.0.0", "psr/log": "1.0.0",
"symfony/config": ">=2.0", "symfony/config": ">=2.0",
...@@ -216,7 +217,7 @@ ...@@ -216,7 +217,7 @@
}, },
"require-dev": { "require-dev": {
"apigen/apigen": "2.8.*@stable", "apigen/apigen": "2.8.*@stable",
"pdepend/pdepend": "dev-master", "pdepend/pdepend": "dev-master as 2.0.0",
"phpmd/phpmd": "dev-master", "phpmd/phpmd": "dev-master",
"phpunit/php-invoker": ">=1.1.0,<1.2.0", "phpunit/php-invoker": ">=1.1.0,<1.2.0",
"phpunit/phpunit": "3.7.*@stable", "phpunit/phpunit": "3.7.*@stable",
...@@ -262,21 +263,21 @@ ...@@ -262,21 +263,21 @@
"github", "github",
"test" "test"
], ],
"time": "2014-05-14 13:09:37" "time": "2014-07-09 10:45:38"
}, },
{ {
"name": "symfony/config", "name": "symfony/config",
"version": "v2.4.5", "version": "v2.5.4",
"target-dir": "Symfony/Component/Config", "target-dir": "Symfony/Component/Config",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/Config.git", "url": "https://github.com/symfony/Config.git",
"reference": "2effc67af6f21a0d267210b72d0b0b691d113528" "reference": "080eabdc256c1d7a3a7cf6296271edb68eb1ab2b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/Config/zipball/2effc67af6f21a0d267210b72d0b0b691d113528", "url": "https://api.github.com/repos/symfony/Config/zipball/080eabdc256c1d7a3a7cf6296271edb68eb1ab2b",
"reference": "2effc67af6f21a0d267210b72d0b0b691d113528", "reference": "080eabdc256c1d7a3a7cf6296271edb68eb1ab2b",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
...@@ -286,7 +287,7 @@ ...@@ -286,7 +287,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "2.4-dev" "dev-master": "2.5-dev"
} }
}, },
"autoload": { "autoload": {
...@@ -299,49 +300,49 @@ ...@@ -299,49 +300,49 @@
"MIT" "MIT"
], ],
"authors": [ "authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com",
"homepage": "http://fabien.potencier.org",
"role": "Lead Developer"
},
{ {
"name": "Symfony Community", "name": "Symfony Community",
"homepage": "http://symfony.com/contributors" "homepage": "http://symfony.com/contributors"
},
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
} }
], ],
"description": "Symfony Config Component", "description": "Symfony Config Component",
"homepage": "http://symfony.com", "homepage": "http://symfony.com",
"time": "2014-04-22 08:11:06" "time": "2014-08-31 03:22:04"
}, },
{ {
"name": "symfony/console", "name": "symfony/console",
"version": "v2.4.5", "version": "v2.5.4",
"target-dir": "Symfony/Component/Console", "target-dir": "Symfony/Component/Console",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/Console.git", "url": "https://github.com/symfony/Console.git",
"reference": "24f723436e62598c9dddee2a8573d6992504dc5d" "reference": "748beed2a1e73179c3f5154d33fe6ae100c1aeb1"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/Console/zipball/24f723436e62598c9dddee2a8573d6992504dc5d", "url": "https://api.github.com/repos/symfony/Console/zipball/748beed2a1e73179c3f5154d33fe6ae100c1aeb1",
"reference": "24f723436e62598c9dddee2a8573d6992504dc5d", "reference": "748beed2a1e73179c3f5154d33fe6ae100c1aeb1",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3" "php": ">=5.3.3"
}, },
"require-dev": { "require-dev": {
"psr/log": "~1.0",
"symfony/event-dispatcher": "~2.1" "symfony/event-dispatcher": "~2.1"
}, },
"suggest": { "suggest": {
"psr/log": "For using the console logger",
"symfony/event-dispatcher": "" "symfony/event-dispatcher": ""
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "2.4-dev" "dev-master": "2.5-dev"
} }
}, },
"autoload": { "autoload": {
...@@ -354,41 +355,42 @@ ...@@ -354,41 +355,42 @@
"MIT" "MIT"
], ],
"authors": [ "authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com",
"homepage": "http://fabien.potencier.org",
"role": "Lead Developer"
},
{ {
"name": "Symfony Community", "name": "Symfony Community",
"homepage": "http://symfony.com/contributors" "homepage": "http://symfony.com/contributors"
},
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
} }
], ],
"description": "Symfony Console Component", "description": "Symfony Console Component",
"homepage": "http://symfony.com", "homepage": "http://symfony.com",
"time": "2014-05-14 21:48:29" "time": "2014-08-14 16:10:54"
}, },
{ {
"name": "symfony/event-dispatcher", "name": "symfony/event-dispatcher",
"version": "v2.4.5", "version": "v2.5.4",
"target-dir": "Symfony/Component/EventDispatcher", "target-dir": "Symfony/Component/EventDispatcher",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/EventDispatcher.git", "url": "https://github.com/symfony/EventDispatcher.git",
"reference": "e539602e5455aa086c0e81e604745af7789e4d8a" "reference": "8faf5cc7e80fde74a650a36e60d32ce3c3e0457b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/e539602e5455aa086c0e81e604745af7789e4d8a", "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/8faf5cc7e80fde74a650a36e60d32ce3c3e0457b",
"reference": "e539602e5455aa086c0e81e604745af7789e4d8a", "reference": "8faf5cc7e80fde74a650a36e60d32ce3c3e0457b",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3" "php": ">=5.3.3"
}, },
"require-dev": { "require-dev": {
"symfony/dependency-injection": "~2.0" "psr/log": "~1.0",
"symfony/config": "~2.0",
"symfony/dependency-injection": "~2.0",
"symfony/stopwatch": "~2.2"
}, },
"suggest": { "suggest": {
"symfony/dependency-injection": "", "symfony/dependency-injection": "",
...@@ -397,7 +399,7 @@ ...@@ -397,7 +399,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "2.4-dev" "dev-master": "2.5-dev"
} }
}, },
"autoload": { "autoload": {
...@@ -410,34 +412,32 @@ ...@@ -410,34 +412,32 @@
"MIT" "MIT"
], ],
"authors": [ "authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com",
"homepage": "http://fabien.potencier.org",
"role": "Lead Developer"
},
{ {
"name": "Symfony Community", "name": "Symfony Community",
"homepage": "http://symfony.com/contributors" "homepage": "http://symfony.com/contributors"
},
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
} }
], ],
"description": "Symfony EventDispatcher Component", "description": "Symfony EventDispatcher Component",
"homepage": "http://symfony.com", "homepage": "http://symfony.com",
"time": "2014-04-16 10:34:31" "time": "2014-07-28 13:20:46"
}, },
{ {
"name": "symfony/filesystem", "name": "symfony/filesystem",
"version": "v2.4.5", "version": "v2.5.4",
"target-dir": "Symfony/Component/Filesystem", "target-dir": "Symfony/Component/Filesystem",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/Filesystem.git", "url": "https://github.com/symfony/Filesystem.git",
"reference": "a3af8294bcce4a7c1b2892363b0c9d8109affad4" "reference": "a765efd199e02ff4001c115c318e219030be9364"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/Filesystem/zipball/a3af8294bcce4a7c1b2892363b0c9d8109affad4", "url": "https://api.github.com/repos/symfony/Filesystem/zipball/a765efd199e02ff4001c115c318e219030be9364",
"reference": "a3af8294bcce4a7c1b2892363b0c9d8109affad4", "reference": "a765efd199e02ff4001c115c318e219030be9364",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
...@@ -446,7 +446,7 @@ ...@@ -446,7 +446,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "2.4-dev" "dev-master": "2.5-dev"
} }
}, },
"autoload": { "autoload": {
...@@ -459,34 +459,32 @@ ...@@ -459,34 +459,32 @@
"MIT" "MIT"
], ],
"authors": [ "authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com",
"homepage": "http://fabien.potencier.org",
"role": "Lead Developer"
},
{ {
"name": "Symfony Community", "name": "Symfony Community",
"homepage": "http://symfony.com/contributors" "homepage": "http://symfony.com/contributors"
},
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
} }
], ],
"description": "Symfony Filesystem Component", "description": "Symfony Filesystem Component",
"homepage": "http://symfony.com", "homepage": "http://symfony.com",
"time": "2014-04-16 10:34:31" "time": "2014-09-03 09:00:14"
}, },
{ {
"name": "symfony/stopwatch", "name": "symfony/stopwatch",
"version": "v2.4.5", "version": "v2.5.4",
"target-dir": "Symfony/Component/Stopwatch", "target-dir": "Symfony/Component/Stopwatch",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/Stopwatch.git", "url": "https://github.com/symfony/Stopwatch.git",
"reference": "343bcc0360f2c22f371884b8f6a9fee8d1aa431a" "reference": "22ab4f76cdeefd38b00022a6be5709190a2fd046"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/Stopwatch/zipball/343bcc0360f2c22f371884b8f6a9fee8d1aa431a", "url": "https://api.github.com/repos/symfony/Stopwatch/zipball/22ab4f76cdeefd38b00022a6be5709190a2fd046",
"reference": "343bcc0360f2c22f371884b8f6a9fee8d1aa431a", "reference": "22ab4f76cdeefd38b00022a6be5709190a2fd046",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
...@@ -495,7 +493,7 @@ ...@@ -495,7 +493,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "2.4-dev" "dev-master": "2.5-dev"
} }
}, },
"autoload": { "autoload": {
...@@ -508,34 +506,32 @@ ...@@ -508,34 +506,32 @@
"MIT" "MIT"
], ],
"authors": [ "authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com",
"homepage": "http://fabien.potencier.org",
"role": "Lead Developer"
},
{ {
"name": "Symfony Community", "name": "Symfony Community",
"homepage": "http://symfony.com/contributors" "homepage": "http://symfony.com/contributors"
},
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
} }
], ],
"description": "Symfony Stopwatch Component", "description": "Symfony Stopwatch Component",
"homepage": "http://symfony.com", "homepage": "http://symfony.com",
"time": "2014-04-18 20:37:09" "time": "2014-08-14 16:10:54"
}, },
{ {
"name": "symfony/yaml", "name": "symfony/yaml",
"version": "v2.4.5", "version": "v2.5.4",
"target-dir": "Symfony/Component/Yaml", "target-dir": "Symfony/Component/Yaml",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/Yaml.git", "url": "https://github.com/symfony/Yaml.git",
"reference": "fd22bb88c3a6f73c898b39bec185a9e211b06265" "reference": "01a7695bcfb013d0a15c6757e15aae120342986f"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/Yaml/zipball/fd22bb88c3a6f73c898b39bec185a9e211b06265", "url": "https://api.github.com/repos/symfony/Yaml/zipball/01a7695bcfb013d0a15c6757e15aae120342986f",
"reference": "fd22bb88c3a6f73c898b39bec185a9e211b06265", "reference": "01a7695bcfb013d0a15c6757e15aae120342986f",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
...@@ -544,7 +540,7 @@ ...@@ -544,7 +540,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "2.4-dev" "dev-master": "2.5-dev"
} }
}, },
"autoload": { "autoload": {
...@@ -557,20 +553,18 @@ ...@@ -557,20 +553,18 @@
"MIT" "MIT"
], ],
"authors": [ "authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com",
"homepage": "http://fabien.potencier.org",
"role": "Lead Developer"
},
{ {
"name": "Symfony Community", "name": "Symfony Community",
"homepage": "http://symfony.com/contributors" "homepage": "http://symfony.com/contributors"
},
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
} }
], ],
"description": "Symfony Yaml Component", "description": "Symfony Yaml Component",
"homepage": "http://symfony.com", "homepage": "http://symfony.com",
"time": "2014-05-12 09:27:48" "time": "2014-08-31 03:22:04"
} }
], ],
"aliases": [ "aliases": [
...@@ -580,6 +574,7 @@ ...@@ -580,6 +574,7 @@
"stability-flags": { "stability-flags": {
"satooshi/php-coveralls": 20 "satooshi/php-coveralls": 20
}, },
"prefer-stable": false,
"platform": { "platform": {
"php": ">= 5.3.3" "php": ">= 5.3.3"
}, },
......
...@@ -31,10 +31,13 @@ class EmailLexer extends AbstractLexer ...@@ -31,10 +31,13 @@ class EmailLexer extends AbstractLexer
const S_SEMICOLON = 275; const S_SEMICOLON = 275;
const S_OPENQBRACKET = 276; const S_OPENQBRACKET = 276;
const S_CLOSEQBRACKET = 277; const S_CLOSEQBRACKET = 277;
const S_SLASH = 278;
const S_EMPTY = null; const S_EMPTY = null;
const GENERIC = 300; const GENERIC = 300;
const CRLF = 301; const CRLF = 301;
const INVALID = 302; const INVALID = 302;
const ASCII_INVALID_FROM = 127;
const ASCII_INVALID_TO = 199;
/** /**
* US-ASCII visible characters not valid for atext (@link http://tools.ietf.org/html/rfc5322#section-3.2.3) * US-ASCII visible characters not valid for atext (@link http://tools.ietf.org/html/rfc5322#section-3.2.3)
...@@ -52,6 +55,7 @@ class EmailLexer extends AbstractLexer ...@@ -52,6 +55,7 @@ class EmailLexer extends AbstractLexer
';' => self::S_SEMICOLON, ';' => self::S_SEMICOLON,
'@' => self::S_AT, '@' => self::S_AT,
'\\' => self::S_BACKSLASH, '\\' => self::S_BACKSLASH,
'/' => self::S_SLASH,
',' => self::S_COMMA, ',' => self::S_COMMA,
'.' => self::S_DOT, '.' => self::S_DOT,
'"' => self::S_DQUOTE, '"' => self::S_DQUOTE,
...@@ -67,14 +71,31 @@ class EmailLexer extends AbstractLexer ...@@ -67,14 +71,31 @@ class EmailLexer extends AbstractLexer
'>' => self::S_GREATERTHAN, '>' => self::S_GREATERTHAN,
'{' => self::S_OPENQBRACKET, '{' => self::S_OPENQBRACKET,
'}' => self::S_CLOSEQBRACKET, '}' => self::S_CLOSEQBRACKET,
'' => self::S_EMPTY '' => self::S_EMPTY,
'\0' => self::C_NUL,
); );
protected $invalidASCII = array(226 => 1,);
protected $hasInvalidTokens = false;
protected $previous; protected $previous;
public function reset()
{
$this->hasInvalidTokens = false;
parent::reset();
}
public function hasInvalidTokens()
{
return $this->hasInvalidTokens;
}
/** /**
* @param $type * @param $type
* @throws \UnexpectedValueException * @throws \UnexpectedValueException
* @return boolean
*/ */
public function find($type) public function find($type)
{ {
...@@ -100,7 +121,7 @@ public function getPrevious() ...@@ -100,7 +121,7 @@ public function getPrevious()
/** /**
* moveNext * moveNext
* *
* @return mixed * @return boolean
*/ */
public function moveNext() public function moveNext()
{ {
...@@ -112,7 +133,7 @@ public function moveNext() ...@@ -112,7 +133,7 @@ public function moveNext()
/** /**
* Lexical catchable patterns. * Lexical catchable patterns.
* *
* @return array * @return string[]
*/ */
protected function getCatchablePatterns() protected function getCatchablePatterns()
{ {
...@@ -130,7 +151,7 @@ protected function getCatchablePatterns() ...@@ -130,7 +151,7 @@ protected function getCatchablePatterns()
/** /**
* Lexical non-catchable patterns. * Lexical non-catchable patterns.
* *
* @return array * @return string[]
*/ */
protected function getNonCatchablePatterns() protected function getNonCatchablePatterns()
{ {
...@@ -146,14 +167,48 @@ protected function getNonCatchablePatterns() ...@@ -146,14 +167,48 @@ protected function getNonCatchablePatterns()
*/ */
protected function getType(&$value) protected function getType(&$value)
{ {
if ($this->isNullType($value)) {
return self::C_NUL;
}
if (isset($this->charValue[$value])) { if (isset($this->charValue[$value])) {
return $this->charValue[$value]; return $this->charValue[$value];
} }
if (preg_match('/[\x10-\x1F]+/', $value)) { if ($this->isInvalid($value)) {
$this->hasInvalidTokens = true;
return self::INVALID; return self::INVALID;
} }
return self::GENERIC; return self::GENERIC;
} }
/**
* @param string $value
*/
protected function isNullType($value)
{
if ($value === "\0") {
return true;
}
return false;
}
/**
* @param string $value
*/
protected function isInvalid($value)
{
if (preg_match('/[\x10-\x1F]+/', $value)) {
return true;
}
if (isset($this->invalidASCII[ord($value)])) {
return true;
}
return false;
}
} }
...@@ -28,6 +28,9 @@ public function __construct(EmailLexer $lexer) ...@@ -28,6 +28,9 @@ public function __construct(EmailLexer $lexer)
$this->domainPartParser = new DomainPart($this->lexer); $this->domainPartParser = new DomainPart($this->lexer);
} }
/**
* @param string $str
*/
public function parse($str) public function parse($str)
{ {
$this->lexer->setInput($str); $this->lexer->setInput($str);
...@@ -36,6 +39,10 @@ public function parse($str) ...@@ -36,6 +39,10 @@ public function parse($str)
throw new \InvalidArgumentException('ERR_NOLOCALPART'); throw new \InvalidArgumentException('ERR_NOLOCALPART');
} }
if ($this->lexer->hasInvalidTokens()) {
throw new \InvalidArgumentException('ERR_INVALID_ATEXT');
}
$this->localPartParser->parse($str); $this->localPartParser->parse($str);
$this->domainPartParser->parse($str); $this->domainPartParser->parse($str);
...@@ -78,6 +85,10 @@ protected function hasAtToken() ...@@ -78,6 +85,10 @@ protected function hasAtToken()
return true; return true;
} }
/**
* @param string $localPart
* @param string $parsedDomainPart
*/
protected function addLongEmailWarning($localPart, $parsedDomainPart) protected function addLongEmailWarning($localPart, $parsedDomainPart)
{ {
if (strlen($localPart . '@' . $parsedDomainPart) > self::EMAIL_MAX_LENGTH) { if (strlen($localPart . '@' . $parsedDomainPart) > self::EMAIL_MAX_LENGTH) {
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
namespace Egulias\EmailValidator; namespace Egulias\EmailValidator;
use Egulias\EmailValidator\Parser\LocalPart;
/** /**
* EmailValidator * EmailValidator
* *
...@@ -97,7 +95,7 @@ public function isValid($email, $checkDNS = false, $strict = false) ...@@ -97,7 +95,7 @@ public function isValid($email, $checkDNS = false, $strict = false)
return false; return false;
} }
return ($strict) ? (!$this->hasWarnings() && $dns) : true; return !$strict || (!$this->hasWarnings() && $dns);
} }
/** /**
...@@ -146,16 +144,9 @@ public function getThreshold() ...@@ -146,16 +144,9 @@ public function getThreshold()
protected function checkDNS() protected function checkDNS()
{ {
$checked = false; $checked = true;
if (!function_exists('dns_get_record') && (
in_array(self::DNSWARN_NO_RECORD, $this->warnings) &&
in_array(self::DNSWARN_NO_MX_RECORD, $this->warnings)
)) {
return $checked;
}
$result = checkdnsrr(trim($this->parser->getParsedDomainPart()), 'MX'); $result = checkdnsrr(trim($this->parser->getParsedDomainPart()), 'MX');
$checked = true;
if (!$result) { if (!$result) {
$this->warnings[] = self::DNSWARN_NO_RECORD; $this->warnings[] = self::DNSWARN_NO_RECORD;
......
...@@ -23,6 +23,9 @@ public function parse($domainPart) ...@@ -23,6 +23,9 @@ public function parse($domainPart)
if ($this->lexer->token['type'] === EmailLexer::S_EMPTY) { if ($this->lexer->token['type'] === EmailLexer::S_EMPTY) {
throw new \InvalidArgumentException('ERR_NODOMAIN'); throw new \InvalidArgumentException('ERR_NODOMAIN');
} }
if ($this->lexer->token['type'] === EmailLexer::S_HYPHEN) {
throw new \InvalidArgumentException('ERR_DOMAINHYPHENEND');
}
if ($this->lexer->token['type'] === EmailLexer::S_OPENPARENTHESIS) { if ($this->lexer->token['type'] === EmailLexer::S_OPENPARENTHESIS) {
$this->warnings[] = EmailValidator::DEPREC_COMMENT; $this->warnings[] = EmailValidator::DEPREC_COMMENT;
...@@ -103,6 +106,10 @@ protected function doParseDomainPart() ...@@ -103,6 +106,10 @@ protected function doParseDomainPart()
do { do {
$prev = $this->lexer->getPrevious(); $prev = $this->lexer->getPrevious();
if ($this->lexer->token['type'] === EmailLexer::S_SLASH) {
throw new \InvalidArgumentException('ERR_DOMAIN_CHAR_NOT_ALLOWED');
}
if ($this->lexer->token['type'] === EmailLexer::S_OPENPARENTHESIS) { if ($this->lexer->token['type'] === EmailLexer::S_OPENPARENTHESIS) {
$this->parseComments(); $this->parseComments();
$this->lexer->moveNext(); $this->lexer->moveNext();
...@@ -210,6 +217,9 @@ protected function doParseDomainLiteral() ...@@ -210,6 +217,9 @@ protected function doParseDomainLiteral()
return $addressLiteral; return $addressLiteral;
} }
/**
* @param string $addressLiteral
*/
protected function checkIPV4Tag($addressLiteral) protected function checkIPV4Tag($addressLiteral)
{ {
$matchesIP = array(); $matchesIP = array();
...@@ -295,5 +305,4 @@ protected function parseDomainComments() ...@@ -295,5 +305,4 @@ protected function parseDomainComments()
throw new \InvalidArgumentException('ERR_EXPECTING_ATEXT'); throw new \InvalidArgumentException('ERR_EXPECTING_ATEXT');
} }
} }
} }
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
use Egulias\EmailValidator\EmailLexer; use Egulias\EmailValidator\EmailLexer;
use Egulias\EmailValidator\EmailValidator; use Egulias\EmailValidator\EmailValidator;
use \InvalidArgumentException;
class LocalPart extends Parser class LocalPart extends Parser
...@@ -21,8 +22,7 @@ public function parse($localPart) ...@@ -21,8 +22,7 @@ public function parse($localPart)
$closingQuote = $this->checkDQUOTE($closingQuote); $closingQuote = $this->checkDQUOTE($closingQuote);
if ($closingQuote && $parseDQuote) { if ($closingQuote && $parseDQuote) {
$this->parseDoubleQuote(); $parseDQuote = $this->parseDoubleQuote();
$parseDQuote = false;
} }
if ($this->lexer->token['type'] === EmailLexer::S_OPENPARENTHESIS) { if ($this->lexer->token['type'] === EmailLexer::S_OPENPARENTHESIS) {
...@@ -56,23 +56,51 @@ public function parse($localPart) ...@@ -56,23 +56,51 @@ public function parse($localPart)
protected function parseDoubleQuote() protected function parseDoubleQuote()
{ {
$parseAgain = true;
$special = array( $special = array(
EmailLexer::S_CR => true, EmailLexer::S_CR => true,
EmailLexer::S_HTAB => true, EmailLexer::S_HTAB => true,
EmailLexer::S_LF => true EmailLexer::S_LF => true
); );
$invalid = array(
EmailLexer::C_NUL => true,
EmailLexer::S_HTAB => true,
EmailLexer::S_CR => true,
EmailLexer::S_LF => true
);
$setSpecialsWarning = true; $setSpecialsWarning = true;
$this->lexer->moveNext(); $this->lexer->moveNext();
while ($this->lexer->token['type'] !== EmailLexer::S_DQUOTE && $this->lexer->token) { while ($this->lexer->token['type'] !== EmailLexer::S_DQUOTE && $this->lexer->token) {
$parseAgain = false;
if (isset($special[$this->lexer->token['type']]) && $setSpecialsWarning) { if (isset($special[$this->lexer->token['type']]) && $setSpecialsWarning) {
$this->warnings[] = EmailValidator::CFWS_FWS; $this->warnings[] = EmailValidator::CFWS_FWS;
$setSpecialsWarning = false; $setSpecialsWarning = false;
} }
$this->lexer->moveNext(); $this->lexer->moveNext();
if (!$this->escaped() && isset($invalid[$this->lexer->token['type']])) {
throw new InvalidArgumentException("ERR_EXPECTED_ATEXT");
} }
} }
$prev = $this->lexer->getPrevious();
if ($prev['type'] === EmailLexer::S_BACKSLASH) {
if (!$this->checkDQUOTE(false)) {
throw new \InvalidArgumentException("ERR_UNCLOSED_DQUOTE");
}
}
if (!$this->lexer->isNextToken(EmailLexer::S_AT) && $prev['type'] !== EmailLexer::S_BACKSLASH) {
throw new \InvalidArgumentException("ERR_EXPECED_AT");
}
return $parseAgain;
}
protected function isInvalidToken($token, $closingQuote) protected function isInvalidToken($token, $closingQuote)
{ {
......
...@@ -124,8 +124,7 @@ protected function escaped() ...@@ -124,8 +124,7 @@ protected function escaped()
if ($previous['type'] === EmailLexer::S_BACKSLASH if ($previous['type'] === EmailLexer::S_BACKSLASH
&& &&
($this->lexer->token['type'] === EmailLexer::S_SP || $this->lexer->token['type'] !== EmailLexer::GENERIC
$this->lexer->token['type'] === EmailLexer::S_HTAB)
) { ) {
return true; return true;
} }
...@@ -164,6 +163,7 @@ protected function checkDQUOTE($hasClosingQuote) ...@@ -164,6 +163,7 @@ protected function checkDQUOTE($hasClosingQuote)
if ($this->lexer->isNextToken(EmailLexer::GENERIC) && $previous['type'] === EmailLexer::GENERIC) { if ($this->lexer->isNextToken(EmailLexer::GENERIC) && $previous['type'] === EmailLexer::GENERIC) {
throw new \InvalidArgumentException('ERR_EXPECTING_ATEXT'); throw new \InvalidArgumentException('ERR_EXPECTING_ATEXT');
} }
$this->warnings[] = EmailValidator::RFC5321_QUOTEDSTRING; $this->warnings[] = EmailValidator::RFC5321_QUOTEDSTRING;
try { try {
$this->lexer->find(EmailLexer::S_DQUOTE); $this->lexer->find(EmailLexer::S_DQUOTE);
......
...@@ -44,6 +44,15 @@ public function testLexerSearchToken() ...@@ -44,6 +44,15 @@ public function testLexerSearchToken()
$this->assertTrue($lexer->find(EmailLexer::S_HTAB)); $this->assertTrue($lexer->find(EmailLexer::S_HTAB));
} }
public function testLexerHasInvalidTokens()
{
$lexer = new EmailLexer();
$lexer->setInput(chr(226));
$lexer->moveNext();
$lexer->moveNext();
$this->assertTrue($lexer->hasInvalidTokens());
}
public function getTokens() public function getTokens()
{ {
return array( return array(
...@@ -61,6 +70,7 @@ public function getTokens() ...@@ -61,6 +70,7 @@ public function getTokens()
array("\"", EmailLexer::S_DQUOTE), array("\"", EmailLexer::S_DQUOTE),
array("-", EmailLexer::S_HYPHEN), array("-", EmailLexer::S_HYPHEN),
array("\\", EmailLexer::S_BACKSLASH), array("\\", EmailLexer::S_BACKSLASH),
array("/", EmailLexer::S_SLASH),
array("(", EmailLexer::S_OPENPARENTHESIS), array("(", EmailLexer::S_OPENPARENTHESIS),
array(")", EmailLexer::S_CLOSEPARENTHESIS), array(")", EmailLexer::S_CLOSEPARENTHESIS),
array('<', EmailLexer::S_LOWERTHAN), array('<', EmailLexer::S_LOWERTHAN),
...@@ -74,7 +84,9 @@ public function getTokens() ...@@ -74,7 +84,9 @@ public function getTokens()
array('{', EmailLexer::S_OPENQBRACKET), array('{', EmailLexer::S_OPENQBRACKET),
array('}', EmailLexer::S_CLOSEQBRACKET), array('}', EmailLexer::S_CLOSEQBRACKET),
array('', EmailLexer::S_EMPTY), array('', EmailLexer::S_EMPTY),
array(chr(31), EmailLexer::INVALID) array(chr(31), EmailLexer::INVALID),
array(chr(226), EmailLexer::INVALID),
array(chr(0), EmailLexer::C_NUL)
); );
} }
} }
...@@ -43,6 +43,10 @@ public function getValidEmails() ...@@ -43,6 +43,10 @@ public function getValidEmails()
array('"user,name"@example.com'), array('"user,name"@example.com'),
array('"user name"@example.com'), array('"user name"@example.com'),
array('"user@name"@example.com'), array('"user@name"@example.com'),
array('"\a"@iana.org'),
array('"test\ test"@iana.org'),
array('""@iana.org'),
array('"\""@iana.org'),
); );
} }
...@@ -57,9 +61,10 @@ public function testInvalidEmails($email) ...@@ -57,9 +61,10 @@ public function testInvalidEmails($email)
public function getInvalidEmails() public function getInvalidEmails()
{ {
return array( return array(
array('example.@example.co.uk'), array('example.@example.co.uk'),
array('example@example@example.co.uk'), array('example@example@example.co.uk'),
array('(fabien_potencier@example.fr)'), array('(test_exampel@example.fr)'),
array('example(example)example@example.co.uk'), array('example(example)example@example.co.uk'),
array('.example@localhost'), array('.example@localhost'),
array('ex\ample@localhost'), array('ex\ample@localhost'),
...@@ -72,6 +77,27 @@ public function getInvalidEmails() ...@@ -72,6 +77,27 @@ public function getInvalidEmails()
array('username@example,com'), array('username@example,com'),
array('usern,ame@example.com'), array('usern,ame@example.com'),
array('user[na]me@example.com'), array('user[na]me@example.com'),
array('"""@iana.org'),
array('"\"@iana.org'),
array('"test"test@iana.org'),
array('"test""test"@iana.org'),
array('"test"."test"@iana.org'),
array('"test".test@iana.org'),
array('"test"' . chr(0) . '@iana.org'),
array('"test\"@iana.org'),
array(chr(226) . '@iana.org'),
array('test@' . chr(226) . '.org'),
array('\r\ntest@iana.org'),
array('\r\n test@iana.org'),
array('\r\n \r\ntest@iana.org'),
array('\r\n \r\ntest@iana.org'),
array('\r\n \r\n test@iana.org'),
array('test@iana.org \r\n'),
array('test@iana.org \r\n '),
array('test@iana.org \r\n \r\n'),
array('test@iana.org \r\n\r\n'),
array('test@iana.org \r\n\r\n '),
array('test@iana/icann.org'),
); );
} }
...@@ -124,6 +150,16 @@ public function testValidEmailsWithWarningsCheck($warnings, $email) ...@@ -124,6 +150,16 @@ public function testValidEmailsWithWarningsCheck($warnings, $email)
$this->assertEquals($warnings, $this->validator->getWarnings()); $this->assertEquals($warnings, $this->validator->getWarnings());
} }
/**
* @dataProvider getInvalidEmailsWithWarnings
*/
public function testInvalidEmailsWithDnsCheckAndStrictMode($warnings, $email)
{
$this->assertFalse($this->validator->isValid($email, true, true));
$this->assertEquals($warnings, $this->validator->getWarnings());
}
public function getInvalidEmailsWithWarnings() public function getInvalidEmailsWithWarnings()
{ {
return array( return array(
...@@ -275,6 +311,17 @@ public function getInvalidEmailsWithWarnings() ...@@ -275,6 +311,17 @@ public function getInvalidEmailsWithWarnings()
'parttoolonglocalparttoolonglocalparttoolonglocalparttoolonglocalparttoolonglocalparttoolonglocalpart'. 'parttoolonglocalparttoolonglocalparttoolonglocalparttoolonglocalparttoolonglocalparttoolonglocalpart'.
'toolonglocalparttoolonglocalparttoolonglocalparttoolonglocalpar' 'toolonglocalparttoolonglocalparttoolonglocalparttoolonglocalpar'
), ),
array(
array(
EmailValidator::DNSWARN_NO_RECORD,
),
'test@test'
),
); );
} }
public function testInvalidEmailsWithStrict()
{
$this->assertFalse($this->validator->isValid('"test"@test', false, true));
}
} }
# CHANGELOG
## 1.0.3 - 2014-11-03
* Setting the `header` stream option as a string to be compatible with GAE.
* Header parsing now ensures that header order is maintained in the parsed
message.
## 1.0.2 - 2014-10-28
* Now correctly honoring a `version` option is supplied in a request.
See https://github.com/guzzle/RingPHP/pull/8
## 1.0.1 - 2014-10-26
* Fixed a header parsing issue with the `CurlHandler` and `CurlMultiHandler`
that caused cURL requests with multiple responses to merge repsonses together
(e.g., requests with digest authentication).
## 1.0.0 - 2014-10-12
* Initial release.
...@@ -2,13 +2,45 @@ ...@@ -2,13 +2,45 @@
RingPHP RingPHP
======= =======
Provides low level APIs used to power HTTP clients and servers through a Provides a simple API and specification that abstracts away the details of HTTP
simple, PHP ``callable`` that accepts a request hash and returns a future into a single PHP function. RingPHP be used to power HTTP clients and servers
response hash. RingPHP supports both synchronous and asynchronous through a PHP function that accepts a request hash and returns a response hash
workflows by utilizing both futures and `promises <https://github.com/reactphp/promise>`_. that is fulfilled using a `promise <https://github.com/reactphp/promise>`_,
allowing RingPHP to support both synchronous and asynchronous workflows.
By abstracting the implementation details of different HTTP clients and
servers, RingPHP allows you to utilize pluggable HTTP clients and servers
without tying your application to a specific implementation.
.. code-block:: php
<?php
require 'vendor/autoload.php';
use GuzzleHttp\Ring\Client\CurlHandler;
$handler = new CurlHandler();
$response = $handler([
'http_method' => 'GET',
'uri' => '/',
'headers' => [
'host' => ['www.google.com'],
'x-foo' => ['baz']
]
]);
$response->then(function (array $response) {
echo $response['status'];
});
$response->wait();
RingPHP is inspired by Clojure's `Ring <https://github.com/ring-clojure/ring>`_, RingPHP is inspired by Clojure's `Ring <https://github.com/ring-clojure/ring>`_,
but has been modified to accommodate clients and servers for both blocking which, in turn, was inspired by Python's WSGI and Ruby's Rack. RingPHP is
and non-blocking requests. utilized as the handler layer in `Guzzle <http://guzzlephp.org>`_ 5.0+ to send
HTTP requests.
Documentation
-------------
See http://guzzle-ring.readthedocs.org/ for the full online documentation. See http://ringphp.readthedocs.org/ for the full online documentation.
...@@ -2,23 +2,49 @@ ...@@ -2,23 +2,49 @@
RingPHP RingPHP
======= =======
Provides low level APIs used to power HTTP clients and servers through a Provides a simple API and specification that abstracts away the details of HTTP
simple, PHP ``callable`` that accepts a request hash and returns a future into a single PHP function. RingPHP be used to power HTTP clients and servers
response hash. RingPHP supports both synchronous and asynchronous through a PHP function that accepts a request hash and returns a response hash
workflows by utilizing both futures and `promises <https://github.com/reactphp/promise>`_. that is fulfilled using a `promise <https://github.com/reactphp/promise>`_,
allowing RingPHP to support both synchronous and asynchronous workflows.
RingPHP is inspired by Clojure's `Ring <https://github.com/ring-clojure/ring>`_, By abstracting the implementation details of different HTTP clients and
but has been modified to accommodate clients and servers for both blocking servers, RingPHP allows you to utilize pluggable HTTP clients and servers
and non-blocking requests. without tying your application to a specific implementation.
RingPHP is utilized as the handler layer in
`Guzzle <http://guzzlephp.org>`_ 5.0+ to send HTTP requests.
.. toctree:: .. toctree::
:maxdepth: 1 :maxdepth: 2
spec spec
futures futures
client_middleware client_middleware
client_handlers client_handlers
testing testing
.. code-block:: php
<?php
require 'vendor/autoload.php';
use GuzzleHttp\Ring\Client\CurlHandler;
$handler = new CurlHandler();
$response = $handler([
'http_method' => 'GET',
'uri' => '/',
'headers' => [
'host' => ['www.google.com'],
'x-foo' => ['baz']
]
]);
$response->then(function (array $response) {
echo $response['status'];
});
$response->wait();
RingPHP is inspired by Clojure's `Ring <https://github.com/ring-clojure/ring>`_,
which, in turn, was inspired by Python's WSGI and Ruby's Rack. RingPHP is
utilized as the handler layer in `Guzzle <http://guzzlephp.org>`_ 5.0+ to send
HTTP requests.
...@@ -8,7 +8,7 @@ middleware. ...@@ -8,7 +8,7 @@ middleware.
Handlers Handlers
-------- --------
Handlers are implemented as a PHP ``callable`` that accept a request array and Handlers are implemented as a PHP ``callable`` that accept a request array
and return a response array (``GuzzleHttp\Ring\Future\FutureArrayInterface``). and return a response array (``GuzzleHttp\Ring\Future\FutureArrayInterface``).
For example: For example:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment