Browse Source

Upgrade to Diactoros 2.x

J. King 1 week ago
parent
commit
61abf7ee7c
3 changed files with 190 additions and 27 deletions
  1. 1
    1
      arsse.php
  2. 6
    5
      composer.json
  3. 183
    21
      composer.lock

+ 1
- 1
arsse.php View File

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

+ 6
- 5
composer.json View File

@@ -18,15 +18,16 @@
18 18
 
19 19
     ],
20 20
     "require": {
21
-        "php": "^7.0",
21
+        "php": "7.*",
22 22
         "ext-intl": "*",
23 23
         "ext-json": "*",
24 24
         "ext-hash": "*",
25 25
         "p3k/picofeed": "0.1.*",
26
-        "hosteurope/password-generator": "^1.0",
27
-        "docopt/docopt": "^1.0",
28
-        "jkingweb/druuid": "^3.0",
29
-        "zendframework/zend-diactoros": "^1.6"
26
+        "hosteurope/password-generator": "1.*",
27
+        "docopt/docopt": "1.*",
28
+        "jkingweb/druuid": "3.*",
29
+        "zendframework/zend-diactoros": "2.*",
30
+        "zendframework/zend-httphandlerrunner": "1.*"
30 31
     },
31 32
     "require-dev": {
32 33
         "bamarni/composer-bin-plugin": "*"

+ 183
- 21
composer.lock View File

@@ -4,7 +4,7 @@
4 4
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5 5
         "This file is @generated automatically"
6 6
     ],
7
-    "content-hash": "d7a6a00be3d97c11d09ec4d4e56d36e0",
7
+    "content-hash": "bd427d25f07432e40d396060907cf1e3",
8 8
     "packages": [
9 9
         {
10 10
             "name": "docopt/docopt",
@@ -190,6 +190,58 @@
190 190
             "homepage": "https://github.com/miniflux/picoFeed",
191 191
             "time": "2017-11-30T00:16:58+00:00"
192 192
         },
193
+        {
194
+            "name": "psr/http-factory",
195
+            "version": "1.0.0",
196
+            "source": {
197
+                "type": "git",
198
+                "url": "https://github.com/php-fig/http-factory.git",
199
+                "reference": "378bfe27931ecc54ff824a20d6f6bfc303bbd04c"
200
+            },
201
+            "dist": {
202
+                "type": "zip",
203
+                "url": "https://api.github.com/repos/php-fig/http-factory/zipball/378bfe27931ecc54ff824a20d6f6bfc303bbd04c",
204
+                "reference": "378bfe27931ecc54ff824a20d6f6bfc303bbd04c",
205
+                "shasum": ""
206
+            },
207
+            "require": {
208
+                "php": ">=7.0.0",
209
+                "psr/http-message": "^1.0"
210
+            },
211
+            "type": "library",
212
+            "extra": {
213
+                "branch-alias": {
214
+                    "dev-master": "1.0.x-dev"
215
+                }
216
+            },
217
+            "autoload": {
218
+                "psr-4": {
219
+                    "Psr\\Http\\Message\\": "src/"
220
+                }
221
+            },
222
+            "notification-url": "https://packagist.org/downloads/",
223
+            "license": [
224
+                "MIT"
225
+            ],
226
+            "authors": [
227
+                {
228
+                    "name": "PHP-FIG",
229
+                    "homepage": "http://www.php-fig.org/"
230
+                }
231
+            ],
232
+            "description": "Common interfaces for PSR-7 HTTP message factories",
233
+            "keywords": [
234
+                "factory",
235
+                "http",
236
+                "message",
237
+                "psr",
238
+                "psr-17",
239
+                "psr-7",
240
+                "request",
241
+                "response"
242
+            ],
243
+            "time": "2018-07-30T21:54:04+00:00"
244
+        },
193 245
         {
194 246
             "name": "psr/http-message",
195 247
             "version": "1.0.1",
@@ -240,40 +292,96 @@
240 292
             ],
241 293
             "time": "2016-08-06T14:39:51+00:00"
242 294
         },
295
+        {
296
+            "name": "psr/http-server-handler",
297
+            "version": "1.0.1",
298
+            "source": {
299
+                "type": "git",
300
+                "url": "https://github.com/php-fig/http-server-handler.git",
301
+                "reference": "aff2f80e33b7f026ec96bb42f63242dc50ffcae7"
302
+            },
303
+            "dist": {
304
+                "type": "zip",
305
+                "url": "https://api.github.com/repos/php-fig/http-server-handler/zipball/aff2f80e33b7f026ec96bb42f63242dc50ffcae7",
306
+                "reference": "aff2f80e33b7f026ec96bb42f63242dc50ffcae7",
307
+                "shasum": ""
308
+            },
309
+            "require": {
310
+                "php": ">=7.0",
311
+                "psr/http-message": "^1.0"
312
+            },
313
+            "type": "library",
314
+            "extra": {
315
+                "branch-alias": {
316
+                    "dev-master": "1.0.x-dev"
317
+                }
318
+            },
319
+            "autoload": {
320
+                "psr-4": {
321
+                    "Psr\\Http\\Server\\": "src/"
322
+                }
323
+            },
324
+            "notification-url": "https://packagist.org/downloads/",
325
+            "license": [
326
+                "MIT"
327
+            ],
328
+            "authors": [
329
+                {
330
+                    "name": "PHP-FIG",
331
+                    "homepage": "http://www.php-fig.org/"
332
+                }
333
+            ],
334
+            "description": "Common interface for HTTP server-side request handler",
335
+            "keywords": [
336
+                "handler",
337
+                "http",
338
+                "http-interop",
339
+                "psr",
340
+                "psr-15",
341
+                "psr-7",
342
+                "request",
343
+                "response",
344
+                "server"
345
+            ],
346
+            "time": "2018-10-30T16:46:14+00:00"
347
+        },
243 348
         {
244 349
             "name": "zendframework/zend-diactoros",
245
-            "version": "1.8.6",
350
+            "version": "2.1.1",
246 351
             "source": {
247 352
                 "type": "git",
248 353
                 "url": "https://github.com/zendframework/zend-diactoros.git",
249
-                "reference": "20da13beba0dde8fb648be3cc19765732790f46e"
354
+                "reference": "c3c330192bc9cc51b7e9ce968ff721dc32ffa986"
250 355
             },
251 356
             "dist": {
252 357
                 "type": "zip",
253
-                "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/20da13beba0dde8fb648be3cc19765732790f46e",
254
-                "reference": "20da13beba0dde8fb648be3cc19765732790f46e",
358
+                "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/c3c330192bc9cc51b7e9ce968ff721dc32ffa986",
359
+                "reference": "c3c330192bc9cc51b7e9ce968ff721dc32ffa986",
255 360
                 "shasum": ""
256 361
             },
257 362
             "require": {
258
-                "php": "^5.6 || ^7.0",
363
+                "php": "^7.1",
364
+                "psr/http-factory": "^1.0",
259 365
                 "psr/http-message": "^1.0"
260 366
             },
261 367
             "provide": {
368
+                "psr/http-factory-implementation": "1.0",
262 369
                 "psr/http-message-implementation": "1.0"
263 370
             },
264 371
             "require-dev": {
265 372
                 "ext-dom": "*",
266 373
                 "ext-libxml": "*",
374
+                "http-interop/http-factory-tests": "^0.5.0",
267 375
                 "php-http/psr7-integration-tests": "dev-master",
268
-                "phpunit/phpunit": "^5.7.16 || ^6.0.8 || ^7.2.7",
269
-                "zendframework/zend-coding-standard": "~1.0"
376
+                "phpunit/phpunit": "^7.0.2",
377
+                "zendframework/zend-coding-standard": "~1.0.0"
270 378
             },
271 379
             "type": "library",
272 380
             "extra": {
273 381
                 "branch-alias": {
274
-                    "dev-master": "1.8.x-dev",
275
-                    "dev-develop": "1.9.x-dev",
276
-                    "dev-release-2.0": "2.0.x-dev"
382
+                    "dev-master": "2.1.x-dev",
383
+                    "dev-develop": "2.2.x-dev",
384
+                    "dev-release-1.8": "1.8.x-dev"
277 385
                 }
278 386
             },
279 387
             "autoload": {
@@ -293,16 +401,70 @@
293 401
             },
294 402
             "notification-url": "https://packagist.org/downloads/",
295 403
             "license": [
296
-                "BSD-2-Clause"
404
+                "BSD-3-Clause"
297 405
             ],
298 406
             "description": "PSR HTTP Message implementations",
299
-            "homepage": "https://github.com/zendframework/zend-diactoros",
300 407
             "keywords": [
301 408
                 "http",
302 409
                 "psr",
303 410
                 "psr-7"
304 411
             ],
305
-            "time": "2018-09-05T19:29:37+00:00"
412
+            "time": "2019-01-05T20:13:32+00:00"
413
+        },
414
+        {
415
+            "name": "zendframework/zend-httphandlerrunner",
416
+            "version": "1.1.0",
417
+            "source": {
418
+                "type": "git",
419
+                "url": "https://github.com/zendframework/zend-httphandlerrunner.git",
420
+                "reference": "75fb12751fe9d6e392cce1ee0d687dacae2db787"
421
+            },
422
+            "dist": {
423
+                "type": "zip",
424
+                "url": "https://api.github.com/repos/zendframework/zend-httphandlerrunner/zipball/75fb12751fe9d6e392cce1ee0d687dacae2db787",
425
+                "reference": "75fb12751fe9d6e392cce1ee0d687dacae2db787",
426
+                "shasum": ""
427
+            },
428
+            "require": {
429
+                "php": "^7.1",
430
+                "psr/http-message": "^1.0",
431
+                "psr/http-message-implementation": "^1.0",
432
+                "psr/http-server-handler": "^1.0"
433
+            },
434
+            "require-dev": {
435
+                "phpunit/phpunit": "^7.0.2",
436
+                "zendframework/zend-coding-standard": "~1.0.0",
437
+                "zendframework/zend-diactoros": "^1.7 || ^2.1.1"
438
+            },
439
+            "type": "library",
440
+            "extra": {
441
+                "branch-alias": {
442
+                    "dev-master": "1.1.x-dev",
443
+                    "dev-develop": "1.2.x-dev"
444
+                },
445
+                "zf": {
446
+                    "config-provider": "Zend\\HttpHandlerRunner\\ConfigProvider"
447
+                }
448
+            },
449
+            "autoload": {
450
+                "psr-4": {
451
+                    "Zend\\HttpHandlerRunner\\": "src/"
452
+                }
453
+            },
454
+            "notification-url": "https://packagist.org/downloads/",
455
+            "license": [
456
+                "BSD-3-Clause"
457
+            ],
458
+            "description": "Execute PSR-15 RequestHandlerInterface instances and emit responses they generate.",
459
+            "keywords": [
460
+                "ZendFramework",
461
+                "components",
462
+                "expressive",
463
+                "psr-15",
464
+                "psr-7",
465
+                "zf"
466
+            ],
467
+            "time": "2019-02-19T18:20:34+00:00"
306 468
         },
307 469
         {
308 470
             "name": "zendframework/zendxml",
@@ -354,16 +516,16 @@
354 516
     "packages-dev": [
355 517
         {
356 518
             "name": "bamarni/composer-bin-plugin",
357
-            "version": "v1.2.0",
519
+            "version": "v1.3.0",
358 520
             "source": {
359 521
                 "type": "git",
360 522
                 "url": "https://github.com/bamarni/composer-bin-plugin.git",
361
-                "reference": "62fef740245a85f00665e81ea8f0aa0b72afe6e7"
523
+                "reference": "67f9d314dc7ecf7245b8637906e151ccc62b8d24"
362 524
             },
363 525
             "dist": {
364 526
                 "type": "zip",
365
-                "url": "https://api.github.com/repos/bamarni/composer-bin-plugin/zipball/62fef740245a85f00665e81ea8f0aa0b72afe6e7",
366
-                "reference": "62fef740245a85f00665e81ea8f0aa0b72afe6e7",
527
+                "url": "https://api.github.com/repos/bamarni/composer-bin-plugin/zipball/67f9d314dc7ecf7245b8637906e151ccc62b8d24",
528
+                "reference": "67f9d314dc7ecf7245b8637906e151ccc62b8d24",
367 529
                 "shasum": ""
368 530
             },
369 531
             "require": {
@@ -371,7 +533,7 @@
371 533
             },
372 534
             "require-dev": {
373 535
                 "composer/composer": "dev-master",
374
-                "symfony/console": "^2.5 || ^3.0"
536
+                "symfony/console": "^2.5 || ^3.0 || ^4.0"
375 537
             },
376 538
             "type": "composer-plugin",
377 539
             "extra": {
@@ -389,7 +551,7 @@
389 551
             "license": [
390 552
                 "MIT"
391 553
             ],
392
-            "time": "2017-09-11T13:13:58+00:00"
554
+            "time": "2019-03-17T12:38:04+00:00"
393 555
         }
394 556
     ],
395 557
     "aliases": [],
@@ -398,7 +560,7 @@
398 560
     "prefer-stable": false,
399 561
     "prefer-lowest": false,
400 562
     "platform": {
401
-        "php": "^7.0",
563
+        "php": "7.*",
402 564
         "ext-intl": "*",
403 565
         "ext-json": "*",
404 566
         "ext-hash": "*"

Loading…
Cancel
Save