1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-22 21:22:40 +00:00

Upgrade to Diactoros 2.x

This commit is contained in:
J. King 2019-04-09 16:15:36 -04:00
parent 1e83350dd0
commit 61abf7ee7c
3 changed files with 192 additions and 29 deletions

View file

@ -25,7 +25,7 @@ if (\PHP_SAPI === "cli") {
$conf = file_exists(BASE."config.php") ? new Conf(BASE."config.php") : new Conf; $conf = file_exists(BASE."config.php") ? new Conf(BASE."config.php") : new Conf;
Arsse::load($conf); Arsse::load($conf);
// handle Web requests // handle Web requests
$emitter = new \Zend\Diactoros\Response\SapiEmitter(); $emitter = new \Zend\HttpHandlerRunner\Emitter\SapiEmitter;
$response = (new REST)->dispatch(); $response = (new REST)->dispatch();
$emitter->emit($response); $emitter->emit($response);
} }

View file

@ -18,15 +18,16 @@
], ],
"require": { "require": {
"php": "^7.0", "php": "7.*",
"ext-intl": "*", "ext-intl": "*",
"ext-json": "*", "ext-json": "*",
"ext-hash": "*", "ext-hash": "*",
"p3k/picofeed": "0.1.*", "p3k/picofeed": "0.1.*",
"hosteurope/password-generator": "^1.0", "hosteurope/password-generator": "1.*",
"docopt/docopt": "^1.0", "docopt/docopt": "1.*",
"jkingweb/druuid": "^3.0", "jkingweb/druuid": "3.*",
"zendframework/zend-diactoros": "^1.6" "zendframework/zend-diactoros": "2.*",
"zendframework/zend-httphandlerrunner": "1.*"
}, },
"require-dev": { "require-dev": {
"bamarni/composer-bin-plugin": "*" "bamarni/composer-bin-plugin": "*"

208
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "d7a6a00be3d97c11d09ec4d4e56d36e0", "content-hash": "bd427d25f07432e40d396060907cf1e3",
"packages": [ "packages": [
{ {
"name": "docopt/docopt", "name": "docopt/docopt",
@ -190,6 +190,58 @@
"homepage": "https://github.com/miniflux/picoFeed", "homepage": "https://github.com/miniflux/picoFeed",
"time": "2017-11-30T00:16:58+00:00" "time": "2017-11-30T00:16:58+00:00"
}, },
{
"name": "psr/http-factory",
"version": "1.0.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/http-factory.git",
"reference": "378bfe27931ecc54ff824a20d6f6bfc303bbd04c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/http-factory/zipball/378bfe27931ecc54ff824a20d6f6bfc303bbd04c",
"reference": "378bfe27931ecc54ff824a20d6f6bfc303bbd04c",
"shasum": ""
},
"require": {
"php": ">=7.0.0",
"psr/http-message": "^1.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Http\\Message\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Common interfaces for PSR-7 HTTP message factories",
"keywords": [
"factory",
"http",
"message",
"psr",
"psr-17",
"psr-7",
"request",
"response"
],
"time": "2018-07-30T21:54:04+00:00"
},
{ {
"name": "psr/http-message", "name": "psr/http-message",
"version": "1.0.1", "version": "1.0.1",
@ -241,39 +293,95 @@
"time": "2016-08-06T14:39:51+00:00" "time": "2016-08-06T14:39:51+00:00"
}, },
{ {
"name": "zendframework/zend-diactoros", "name": "psr/http-server-handler",
"version": "1.8.6", "version": "1.0.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/zendframework/zend-diactoros.git", "url": "https://github.com/php-fig/http-server-handler.git",
"reference": "20da13beba0dde8fb648be3cc19765732790f46e" "reference": "aff2f80e33b7f026ec96bb42f63242dc50ffcae7"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/20da13beba0dde8fb648be3cc19765732790f46e", "url": "https://api.github.com/repos/php-fig/http-server-handler/zipball/aff2f80e33b7f026ec96bb42f63242dc50ffcae7",
"reference": "20da13beba0dde8fb648be3cc19765732790f46e", "reference": "aff2f80e33b7f026ec96bb42f63242dc50ffcae7",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^5.6 || ^7.0", "php": ">=7.0",
"psr/http-message": "^1.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Http\\Server\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Common interface for HTTP server-side request handler",
"keywords": [
"handler",
"http",
"http-interop",
"psr",
"psr-15",
"psr-7",
"request",
"response",
"server"
],
"time": "2018-10-30T16:46:14+00:00"
},
{
"name": "zendframework/zend-diactoros",
"version": "2.1.1",
"source": {
"type": "git",
"url": "https://github.com/zendframework/zend-diactoros.git",
"reference": "c3c330192bc9cc51b7e9ce968ff721dc32ffa986"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/c3c330192bc9cc51b7e9ce968ff721dc32ffa986",
"reference": "c3c330192bc9cc51b7e9ce968ff721dc32ffa986",
"shasum": ""
},
"require": {
"php": "^7.1",
"psr/http-factory": "^1.0",
"psr/http-message": "^1.0" "psr/http-message": "^1.0"
}, },
"provide": { "provide": {
"psr/http-factory-implementation": "1.0",
"psr/http-message-implementation": "1.0" "psr/http-message-implementation": "1.0"
}, },
"require-dev": { "require-dev": {
"ext-dom": "*", "ext-dom": "*",
"ext-libxml": "*", "ext-libxml": "*",
"http-interop/http-factory-tests": "^0.5.0",
"php-http/psr7-integration-tests": "dev-master", "php-http/psr7-integration-tests": "dev-master",
"phpunit/phpunit": "^5.7.16 || ^6.0.8 || ^7.2.7", "phpunit/phpunit": "^7.0.2",
"zendframework/zend-coding-standard": "~1.0" "zendframework/zend-coding-standard": "~1.0.0"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.8.x-dev", "dev-master": "2.1.x-dev",
"dev-develop": "1.9.x-dev", "dev-develop": "2.2.x-dev",
"dev-release-2.0": "2.0.x-dev" "dev-release-1.8": "1.8.x-dev"
} }
}, },
"autoload": { "autoload": {
@ -293,16 +401,70 @@
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
"license": [ "license": [
"BSD-2-Clause" "BSD-3-Clause"
], ],
"description": "PSR HTTP Message implementations", "description": "PSR HTTP Message implementations",
"homepage": "https://github.com/zendframework/zend-diactoros",
"keywords": [ "keywords": [
"http", "http",
"psr", "psr",
"psr-7" "psr-7"
], ],
"time": "2018-09-05T19:29:37+00:00" "time": "2019-01-05T20:13:32+00:00"
},
{
"name": "zendframework/zend-httphandlerrunner",
"version": "1.1.0",
"source": {
"type": "git",
"url": "https://github.com/zendframework/zend-httphandlerrunner.git",
"reference": "75fb12751fe9d6e392cce1ee0d687dacae2db787"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zendframework/zend-httphandlerrunner/zipball/75fb12751fe9d6e392cce1ee0d687dacae2db787",
"reference": "75fb12751fe9d6e392cce1ee0d687dacae2db787",
"shasum": ""
},
"require": {
"php": "^7.1",
"psr/http-message": "^1.0",
"psr/http-message-implementation": "^1.0",
"psr/http-server-handler": "^1.0"
},
"require-dev": {
"phpunit/phpunit": "^7.0.2",
"zendframework/zend-coding-standard": "~1.0.0",
"zendframework/zend-diactoros": "^1.7 || ^2.1.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.1.x-dev",
"dev-develop": "1.2.x-dev"
},
"zf": {
"config-provider": "Zend\\HttpHandlerRunner\\ConfigProvider"
}
},
"autoload": {
"psr-4": {
"Zend\\HttpHandlerRunner\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "Execute PSR-15 RequestHandlerInterface instances and emit responses they generate.",
"keywords": [
"ZendFramework",
"components",
"expressive",
"psr-15",
"psr-7",
"zf"
],
"time": "2019-02-19T18:20:34+00:00"
}, },
{ {
"name": "zendframework/zendxml", "name": "zendframework/zendxml",
@ -354,16 +516,16 @@
"packages-dev": [ "packages-dev": [
{ {
"name": "bamarni/composer-bin-plugin", "name": "bamarni/composer-bin-plugin",
"version": "v1.2.0", "version": "v1.3.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/bamarni/composer-bin-plugin.git", "url": "https://github.com/bamarni/composer-bin-plugin.git",
"reference": "62fef740245a85f00665e81ea8f0aa0b72afe6e7" "reference": "67f9d314dc7ecf7245b8637906e151ccc62b8d24"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/bamarni/composer-bin-plugin/zipball/62fef740245a85f00665e81ea8f0aa0b72afe6e7", "url": "https://api.github.com/repos/bamarni/composer-bin-plugin/zipball/67f9d314dc7ecf7245b8637906e151ccc62b8d24",
"reference": "62fef740245a85f00665e81ea8f0aa0b72afe6e7", "reference": "67f9d314dc7ecf7245b8637906e151ccc62b8d24",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -371,7 +533,7 @@
}, },
"require-dev": { "require-dev": {
"composer/composer": "dev-master", "composer/composer": "dev-master",
"symfony/console": "^2.5 || ^3.0" "symfony/console": "^2.5 || ^3.0 || ^4.0"
}, },
"type": "composer-plugin", "type": "composer-plugin",
"extra": { "extra": {
@ -389,7 +551,7 @@
"license": [ "license": [
"MIT" "MIT"
], ],
"time": "2017-09-11T13:13:58+00:00" "time": "2019-03-17T12:38:04+00:00"
} }
], ],
"aliases": [], "aliases": [],
@ -398,7 +560,7 @@
"prefer-stable": false, "prefer-stable": false,
"prefer-lowest": false, "prefer-lowest": false,
"platform": { "platform": {
"php": "^7.0", "php": "7.*",
"ext-intl": "*", "ext-intl": "*",
"ext-json": "*", "ext-json": "*",
"ext-hash": "*" "ext-hash": "*"