├── .gitignore ├── .travis.yml ├── CHANGELOG.md ├── LICENSE ├── README.md ├── composer.json ├── composer.lock ├── phpunit.xml.dist ├── src └── Stack │ └── run.php └── tests ├── bootstrap.php └── functional └── RunTest.php /.gitignore: -------------------------------------------------------------------------------- 1 | vendor 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | 3 | cache: 4 | directories: 5 | - $HOME/.composer/cache/files 6 | 7 | before_install: 8 | phpenv config-rm xdebug.ini 9 | 10 | before_script: 11 | # Symfony 2.7 12 | - if [[ $SYMFONY_DEPS_VERSION = 2.7 ]]; then sed -i 's/~2\.1|~3\.0|~4\.0/2.7/g' composer.json; fi 13 | # Symfony 3.0 14 | - if [[ $SYMFONY_DEPS_VERSION = 3.4 ]]; then sed -i 's/~2\.1|~3\.0|~4\.0/3.0/g' composer.json; fi 15 | # Symfony 4.0 16 | - if [[ $SYMFONY_DEPS_VERSION = 3.1 ]]; then sed -i 's/~2\.1|~3\.0|~4\.0/4.0/g' composer.json; fi 17 | - composer update --no-suggest 18 | 19 | script: 20 | phpunit --coverage-text 21 | 22 | matrix: 23 | include: 24 | - php: 5.3 25 | env: SYMFONY_DEPS_VERSION=2.7 26 | dist: precise 27 | - php: 5.4 28 | env: SYMFONY_DEPS_VERSION=2.7 29 | - php: 5.5 30 | env: SYMFONY_DEPS_VERSION=2.7 31 | - php: 5.6 32 | env: SYMFONY_DEPS_VERSION=2.7 33 | - php: 5.5.9 34 | env: SYMFONY_DEPS_VERSION=3.4 35 | - php: 5.6 36 | env: SYMFONY_DEPS_VERSION=3.4 37 | - php: 7.0 38 | env: SYMFONY_DEPS_VERSION=3.4 39 | - php: 7.1 40 | env: SYMFONY_DEPS_VERSION=3.4 41 | - php: 7.2 42 | env: SYMFONY_DEPS_VERSION=3.4 43 | - php: 7.1.3 44 | env: SYMFONY_DEPS_VERSION=4.0 45 | - php: 7.2 46 | env: SYMFONY_DEPS_VERSION=4.0 47 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | CHANGELOG 2 | ========= 3 | 4 | * 1.1.0 (2018-02-20) 5 | 6 | * Adding support for Symfony 3 and Symfony 4 7 | 8 | * 1.0.1 (2013-10-25) 9 | 10 | * Lower PHP requirement to 5.3. 11 | 12 | * 1.0.0 (2013-08-14) 13 | 14 | * Initial release. 15 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Igor Wiedler 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Stack/Run 2 | 3 | Shortcut function for handling HttpKernel front-controller boilerplate. 4 | 5 | ## Example 6 | 7 | Usually you need to put all of that `$request = ... && $response = 8 | $app->handle($request)` business in the front controller yourself. No more! 9 | With Stack/Run, you just need to call one function: 10 | 11 | ```php 12 | $app = ...; 13 | 14 | Stack\run($app); 15 | ``` 16 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "stack/run", 3 | "description": "Shortcut function for handling HttpKernel front-controller boilerplate.", 4 | "keywords": ["stack"], 5 | "license": "MIT", 6 | "authors": [ 7 | { 8 | "name": "Igor Wiedler", 9 | "email": "igor@wiedler.ch" 10 | } 11 | ], 12 | "require": { 13 | "php": ">=5.3.0", 14 | "symfony/http-foundation": "~2.7|~3.0|~4.0", 15 | "symfony/http-kernel": "~2.7|~3.0|~4.0" 16 | }, 17 | "require-dev": { 18 | "stack/callable-http-kernel": "~1.0@dev" 19 | }, 20 | "autoload": { 21 | "files": ["src/Stack/run.php"] 22 | }, 23 | "extra": { 24 | "branch-alias": { "dev-master": "1.1-dev" } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /composer.lock: -------------------------------------------------------------------------------- 1 | { 2 | "_readme": [ 3 | "This file locks the dependencies of your project to a known state", 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", 5 | "This file is @generated automatically" 6 | ], 7 | "content-hash": "fa185f1a3e3bfa4a49c7ed119e20ae52", 8 | "packages": [ 9 | { 10 | "name": "paragonie/random_compat", 11 | "version": "v2.0.11", 12 | "source": { 13 | "type": "git", 14 | "url": "https://github.com/paragonie/random_compat.git", 15 | "reference": "5da4d3c796c275c55f057af5a643ae297d96b4d8" 16 | }, 17 | "dist": { 18 | "type": "zip", 19 | "url": "https://api.github.com/repos/paragonie/random_compat/zipball/5da4d3c796c275c55f057af5a643ae297d96b4d8", 20 | "reference": "5da4d3c796c275c55f057af5a643ae297d96b4d8", 21 | "shasum": "" 22 | }, 23 | "require": { 24 | "php": ">=5.2.0" 25 | }, 26 | "require-dev": { 27 | "phpunit/phpunit": "4.*|5.*" 28 | }, 29 | "suggest": { 30 | "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." 31 | }, 32 | "type": "library", 33 | "autoload": { 34 | "files": [ 35 | "lib/random.php" 36 | ] 37 | }, 38 | "notification-url": "https://packagist.org/downloads/", 39 | "license": [ 40 | "MIT" 41 | ], 42 | "authors": [ 43 | { 44 | "name": "Paragon Initiative Enterprises", 45 | "email": "security@paragonie.com", 46 | "homepage": "https://paragonie.com" 47 | } 48 | ], 49 | "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", 50 | "keywords": [ 51 | "csprng", 52 | "pseudorandom", 53 | "random" 54 | ], 55 | "time": "2017-09-27T21:40:39+00:00" 56 | }, 57 | { 58 | "name": "psr/log", 59 | "version": "1.0.2", 60 | "source": { 61 | "type": "git", 62 | "url": "https://github.com/php-fig/log.git", 63 | "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" 64 | }, 65 | "dist": { 66 | "type": "zip", 67 | "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", 68 | "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", 69 | "shasum": "" 70 | }, 71 | "require": { 72 | "php": ">=5.3.0" 73 | }, 74 | "type": "library", 75 | "extra": { 76 | "branch-alias": { 77 | "dev-master": "1.0.x-dev" 78 | } 79 | }, 80 | "autoload": { 81 | "psr-4": { 82 | "Psr\\Log\\": "Psr/Log/" 83 | } 84 | }, 85 | "notification-url": "https://packagist.org/downloads/", 86 | "license": [ 87 | "MIT" 88 | ], 89 | "authors": [ 90 | { 91 | "name": "PHP-FIG", 92 | "homepage": "http://www.php-fig.org/" 93 | } 94 | ], 95 | "description": "Common interface for logging libraries", 96 | "homepage": "https://github.com/php-fig/log", 97 | "keywords": [ 98 | "log", 99 | "psr", 100 | "psr-3" 101 | ], 102 | "time": "2016-10-10T12:19:37+00:00" 103 | }, 104 | { 105 | "name": "symfony/debug", 106 | "version": "v4.0.4", 107 | "source": { 108 | "type": "git", 109 | "url": "https://github.com/symfony/debug.git", 110 | "reference": "c77bb31d0f6310a2ac11e657475d396a92e5dc54" 111 | }, 112 | "dist": { 113 | "type": "zip", 114 | "url": "https://api.github.com/repos/symfony/debug/zipball/c77bb31d0f6310a2ac11e657475d396a92e5dc54", 115 | "reference": "c77bb31d0f6310a2ac11e657475d396a92e5dc54", 116 | "shasum": "" 117 | }, 118 | "require": { 119 | "php": "^7.1.3", 120 | "psr/log": "~1.0" 121 | }, 122 | "conflict": { 123 | "symfony/http-kernel": "<3.4" 124 | }, 125 | "require-dev": { 126 | "symfony/http-kernel": "~3.4|~4.0" 127 | }, 128 | "type": "library", 129 | "extra": { 130 | "branch-alias": { 131 | "dev-master": "4.0-dev" 132 | } 133 | }, 134 | "autoload": { 135 | "psr-4": { 136 | "Symfony\\Component\\Debug\\": "" 137 | }, 138 | "exclude-from-classmap": [ 139 | "/Tests/" 140 | ] 141 | }, 142 | "notification-url": "https://packagist.org/downloads/", 143 | "license": [ 144 | "MIT" 145 | ], 146 | "authors": [ 147 | { 148 | "name": "Fabien Potencier", 149 | "email": "fabien@symfony.com" 150 | }, 151 | { 152 | "name": "Symfony Community", 153 | "homepage": "https://symfony.com/contributors" 154 | } 155 | ], 156 | "description": "Symfony Debug Component", 157 | "homepage": "https://symfony.com", 158 | "time": "2018-01-18T22:19:33+00:00" 159 | }, 160 | { 161 | "name": "symfony/event-dispatcher", 162 | "version": "v4.0.4", 163 | "source": { 164 | "type": "git", 165 | "url": "https://github.com/symfony/event-dispatcher.git", 166 | "reference": "74d33aac36208c4d6757807d9f598f0133a3a4eb" 167 | }, 168 | "dist": { 169 | "type": "zip", 170 | "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/74d33aac36208c4d6757807d9f598f0133a3a4eb", 171 | "reference": "74d33aac36208c4d6757807d9f598f0133a3a4eb", 172 | "shasum": "" 173 | }, 174 | "require": { 175 | "php": "^7.1.3" 176 | }, 177 | "conflict": { 178 | "symfony/dependency-injection": "<3.4" 179 | }, 180 | "require-dev": { 181 | "psr/log": "~1.0", 182 | "symfony/config": "~3.4|~4.0", 183 | "symfony/dependency-injection": "~3.4|~4.0", 184 | "symfony/expression-language": "~3.4|~4.0", 185 | "symfony/stopwatch": "~3.4|~4.0" 186 | }, 187 | "suggest": { 188 | "symfony/dependency-injection": "", 189 | "symfony/http-kernel": "" 190 | }, 191 | "type": "library", 192 | "extra": { 193 | "branch-alias": { 194 | "dev-master": "4.0-dev" 195 | } 196 | }, 197 | "autoload": { 198 | "psr-4": { 199 | "Symfony\\Component\\EventDispatcher\\": "" 200 | }, 201 | "exclude-from-classmap": [ 202 | "/Tests/" 203 | ] 204 | }, 205 | "notification-url": "https://packagist.org/downloads/", 206 | "license": [ 207 | "MIT" 208 | ], 209 | "authors": [ 210 | { 211 | "name": "Fabien Potencier", 212 | "email": "fabien@symfony.com" 213 | }, 214 | { 215 | "name": "Symfony Community", 216 | "homepage": "https://symfony.com/contributors" 217 | } 218 | ], 219 | "description": "Symfony EventDispatcher Component", 220 | "homepage": "https://symfony.com", 221 | "time": "2018-01-03T07:38:00+00:00" 222 | }, 223 | { 224 | "name": "symfony/http-foundation", 225 | "version": "v3.4.4", 226 | "source": { 227 | "type": "git", 228 | "url": "https://github.com/symfony/http-foundation.git", 229 | "reference": "8c39071ac9cc7e6d8dab1d556c990dc0d2cc3d30" 230 | }, 231 | "dist": { 232 | "type": "zip", 233 | "url": "https://api.github.com/repos/symfony/http-foundation/zipball/8c39071ac9cc7e6d8dab1d556c990dc0d2cc3d30", 234 | "reference": "8c39071ac9cc7e6d8dab1d556c990dc0d2cc3d30", 235 | "shasum": "" 236 | }, 237 | "require": { 238 | "php": "^5.5.9|>=7.0.8", 239 | "symfony/polyfill-mbstring": "~1.1", 240 | "symfony/polyfill-php70": "~1.6" 241 | }, 242 | "require-dev": { 243 | "symfony/expression-language": "~2.8|~3.0|~4.0" 244 | }, 245 | "type": "library", 246 | "extra": { 247 | "branch-alias": { 248 | "dev-master": "3.4-dev" 249 | } 250 | }, 251 | "autoload": { 252 | "psr-4": { 253 | "Symfony\\Component\\HttpFoundation\\": "" 254 | }, 255 | "exclude-from-classmap": [ 256 | "/Tests/" 257 | ] 258 | }, 259 | "notification-url": "https://packagist.org/downloads/", 260 | "license": [ 261 | "MIT" 262 | ], 263 | "authors": [ 264 | { 265 | "name": "Fabien Potencier", 266 | "email": "fabien@symfony.com" 267 | }, 268 | { 269 | "name": "Symfony Community", 270 | "homepage": "https://symfony.com/contributors" 271 | } 272 | ], 273 | "description": "Symfony HttpFoundation Component", 274 | "homepage": "https://symfony.com", 275 | "time": "2018-01-29T09:03:43+00:00" 276 | }, 277 | { 278 | "name": "symfony/http-kernel", 279 | "version": "v3.4.4", 280 | "source": { 281 | "type": "git", 282 | "url": "https://github.com/symfony/http-kernel.git", 283 | "reference": "911d2e5dd4beb63caad9a72e43857de984301907" 284 | }, 285 | "dist": { 286 | "type": "zip", 287 | "url": "https://api.github.com/repos/symfony/http-kernel/zipball/911d2e5dd4beb63caad9a72e43857de984301907", 288 | "reference": "911d2e5dd4beb63caad9a72e43857de984301907", 289 | "shasum": "" 290 | }, 291 | "require": { 292 | "php": "^5.5.9|>=7.0.8", 293 | "psr/log": "~1.0", 294 | "symfony/debug": "~2.8|~3.0|~4.0", 295 | "symfony/event-dispatcher": "~2.8|~3.0|~4.0", 296 | "symfony/http-foundation": "^3.4.4|^4.0.4" 297 | }, 298 | "conflict": { 299 | "symfony/config": "<2.8", 300 | "symfony/dependency-injection": "<3.4", 301 | "symfony/var-dumper": "<3.3", 302 | "twig/twig": "<1.34|<2.4,>=2" 303 | }, 304 | "provide": { 305 | "psr/log-implementation": "1.0" 306 | }, 307 | "require-dev": { 308 | "psr/cache": "~1.0", 309 | "symfony/browser-kit": "~2.8|~3.0|~4.0", 310 | "symfony/class-loader": "~2.8|~3.0", 311 | "symfony/config": "~2.8|~3.0|~4.0", 312 | "symfony/console": "~2.8|~3.0|~4.0", 313 | "symfony/css-selector": "~2.8|~3.0|~4.0", 314 | "symfony/dependency-injection": "~3.4|~4.0", 315 | "symfony/dom-crawler": "~2.8|~3.0|~4.0", 316 | "symfony/expression-language": "~2.8|~3.0|~4.0", 317 | "symfony/finder": "~2.8|~3.0|~4.0", 318 | "symfony/process": "~2.8|~3.0|~4.0", 319 | "symfony/routing": "~3.4|~4.0", 320 | "symfony/stopwatch": "~2.8|~3.0|~4.0", 321 | "symfony/templating": "~2.8|~3.0|~4.0", 322 | "symfony/translation": "~2.8|~3.0|~4.0", 323 | "symfony/var-dumper": "~3.3|~4.0" 324 | }, 325 | "suggest": { 326 | "symfony/browser-kit": "", 327 | "symfony/config": "", 328 | "symfony/console": "", 329 | "symfony/dependency-injection": "", 330 | "symfony/finder": "", 331 | "symfony/var-dumper": "" 332 | }, 333 | "type": "library", 334 | "extra": { 335 | "branch-alias": { 336 | "dev-master": "3.4-dev" 337 | } 338 | }, 339 | "autoload": { 340 | "psr-4": { 341 | "Symfony\\Component\\HttpKernel\\": "" 342 | }, 343 | "exclude-from-classmap": [ 344 | "/Tests/" 345 | ] 346 | }, 347 | "notification-url": "https://packagist.org/downloads/", 348 | "license": [ 349 | "MIT" 350 | ], 351 | "authors": [ 352 | { 353 | "name": "Fabien Potencier", 354 | "email": "fabien@symfony.com" 355 | }, 356 | { 357 | "name": "Symfony Community", 358 | "homepage": "https://symfony.com/contributors" 359 | } 360 | ], 361 | "description": "Symfony HttpKernel Component", 362 | "homepage": "https://symfony.com", 363 | "time": "2018-01-29T12:29:46+00:00" 364 | }, 365 | { 366 | "name": "symfony/polyfill-mbstring", 367 | "version": "v1.7.0", 368 | "source": { 369 | "type": "git", 370 | "url": "https://github.com/symfony/polyfill-mbstring.git", 371 | "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b" 372 | }, 373 | "dist": { 374 | "type": "zip", 375 | "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/78be803ce01e55d3491c1397cf1c64beb9c1b63b", 376 | "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b", 377 | "shasum": "" 378 | }, 379 | "require": { 380 | "php": ">=5.3.3" 381 | }, 382 | "suggest": { 383 | "ext-mbstring": "For best performance" 384 | }, 385 | "type": "library", 386 | "extra": { 387 | "branch-alias": { 388 | "dev-master": "1.7-dev" 389 | } 390 | }, 391 | "autoload": { 392 | "psr-4": { 393 | "Symfony\\Polyfill\\Mbstring\\": "" 394 | }, 395 | "files": [ 396 | "bootstrap.php" 397 | ] 398 | }, 399 | "notification-url": "https://packagist.org/downloads/", 400 | "license": [ 401 | "MIT" 402 | ], 403 | "authors": [ 404 | { 405 | "name": "Nicolas Grekas", 406 | "email": "p@tchwork.com" 407 | }, 408 | { 409 | "name": "Symfony Community", 410 | "homepage": "https://symfony.com/contributors" 411 | } 412 | ], 413 | "description": "Symfony polyfill for the Mbstring extension", 414 | "homepage": "https://symfony.com", 415 | "keywords": [ 416 | "compatibility", 417 | "mbstring", 418 | "polyfill", 419 | "portable", 420 | "shim" 421 | ], 422 | "time": "2018-01-30T19:27:44+00:00" 423 | }, 424 | { 425 | "name": "symfony/polyfill-php70", 426 | "version": "v1.7.0", 427 | "source": { 428 | "type": "git", 429 | "url": "https://github.com/symfony/polyfill-php70.git", 430 | "reference": "3532bfcd8f933a7816f3a0a59682fc404776600f" 431 | }, 432 | "dist": { 433 | "type": "zip", 434 | "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/3532bfcd8f933a7816f3a0a59682fc404776600f", 435 | "reference": "3532bfcd8f933a7816f3a0a59682fc404776600f", 436 | "shasum": "" 437 | }, 438 | "require": { 439 | "paragonie/random_compat": "~1.0|~2.0", 440 | "php": ">=5.3.3" 441 | }, 442 | "type": "library", 443 | "extra": { 444 | "branch-alias": { 445 | "dev-master": "1.7-dev" 446 | } 447 | }, 448 | "autoload": { 449 | "psr-4": { 450 | "Symfony\\Polyfill\\Php70\\": "" 451 | }, 452 | "files": [ 453 | "bootstrap.php" 454 | ], 455 | "classmap": [ 456 | "Resources/stubs" 457 | ] 458 | }, 459 | "notification-url": "https://packagist.org/downloads/", 460 | "license": [ 461 | "MIT" 462 | ], 463 | "authors": [ 464 | { 465 | "name": "Nicolas Grekas", 466 | "email": "p@tchwork.com" 467 | }, 468 | { 469 | "name": "Symfony Community", 470 | "homepage": "https://symfony.com/contributors" 471 | } 472 | ], 473 | "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", 474 | "homepage": "https://symfony.com", 475 | "keywords": [ 476 | "compatibility", 477 | "polyfill", 478 | "portable", 479 | "shim" 480 | ], 481 | "time": "2018-01-30T19:27:44+00:00" 482 | } 483 | ], 484 | "packages-dev": [ 485 | { 486 | "name": "stack/callable-http-kernel", 487 | "version": "dev-master", 488 | "source": { 489 | "type": "git", 490 | "url": "https://github.com/stackphp/CallableHttpKernel.git", 491 | "reference": "a7802f842e46c175bdc3645b3f0768c5bb9c4b23" 492 | }, 493 | "dist": { 494 | "type": "zip", 495 | "url": "https://api.github.com/repos/stackphp/CallableHttpKernel/zipball/a7802f842e46c175bdc3645b3f0768c5bb9c4b23", 496 | "reference": "a7802f842e46c175bdc3645b3f0768c5bb9c4b23", 497 | "shasum": "" 498 | }, 499 | "require": { 500 | "php": ">=5.3.0", 501 | "symfony/http-foundation": "~2.1|~3.0", 502 | "symfony/http-kernel": "~2.1|~3.0" 503 | }, 504 | "require-dev": { 505 | "phpunit/phpunit": "^5.2" 506 | }, 507 | "type": "library", 508 | "extra": { 509 | "branch-alias": { 510 | "dev-master": "1.0-dev" 511 | } 512 | }, 513 | "autoload": { 514 | "psr-0": { 515 | "Stack": "src" 516 | } 517 | }, 518 | "notification-url": "https://packagist.org/downloads/", 519 | "license": [ 520 | "MIT" 521 | ], 522 | "authors": [ 523 | { 524 | "name": "Igor Wiedler", 525 | "email": "igor@wiedler.ch" 526 | } 527 | ], 528 | "description": "HttpKernelInterface implementation based on callables.", 529 | "keywords": [ 530 | "stack" 531 | ], 532 | "time": "2016-06-18T18:53:05+00:00" 533 | } 534 | ], 535 | "aliases": [], 536 | "minimum-stability": "stable", 537 | "stability-flags": { 538 | "stack/callable-http-kernel": 20 539 | }, 540 | "prefer-stable": false, 541 | "prefer-lowest": false, 542 | "platform": { 543 | "php": ">=5.3.0" 544 | }, 545 | "platform-dev": [] 546 | } 547 | -------------------------------------------------------------------------------- /phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | ./tests/unit/ 10 | 11 | 12 | 13 | 14 | 15 | ./tests/integration/ 16 | 17 | 18 | 19 | 20 | 21 | ./tests/functional/ 22 | 23 | 24 | 25 | 26 | 27 | ./src/ 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/Stack/run.php: -------------------------------------------------------------------------------- 1 | handle($request); 14 | $response->send(); 15 | if ($app instanceof TerminableInterface) { 16 | $app->terminate($request, $response); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /tests/bootstrap.php: -------------------------------------------------------------------------------- 1 | expectOutputString('Hello World!'); 17 | 18 | $app = new CallableHttpKernel(function ($request) { 19 | return new Response('Hello World!'); 20 | }); 21 | 22 | Stack\run($app); 23 | } 24 | } 25 | --------------------------------------------------------------------------------