├── .github └── workflows │ └── test.yml ├── .gitignore ├── LICENSE ├── README.md ├── composer.json ├── composer.lock ├── config ├── app.php ├── container.php └── route.php ├── data └── .gitignore ├── mvc.png ├── phpstan.neon ├── phpunit.xml.dist ├── public └── index.php ├── src ├── App.php ├── Controller │ ├── Auth.php │ ├── ControllerInterface.php │ ├── Error404.php │ ├── Error405.php │ ├── Hello.php │ └── Home.php ├── Exception │ ├── ControllerException.php │ ├── ExceptionInterface.php │ ├── InvalidConfigException.php │ └── ResponseException.php ├── Response │ ├── HaltResponse.php │ └── SapiEmitter.php └── View │ ├── 404.php │ ├── 405.php │ ├── hello.php │ ├── home.php │ └── layout.php └── tests └── Controller ├── AuthTest.php ├── Error404Test.php ├── Error405Test.php ├── HelloTest.php └── HomeTest.php /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: PHP test 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | test: 7 | name: Test 8 | runs-on: ${{ matrix.os }} 9 | 10 | strategy: 11 | matrix: 12 | php-version: [7.3, 7.4] 13 | os: [ubuntu-latest] 14 | 15 | steps: 16 | - name: Checkout 17 | uses: actions/checkout@v2 18 | 19 | - name: Use PHP ${{ matrix.php-version }} 20 | uses: shivammathur/setup-php@v2 21 | with: 22 | php-version: ${{ matrix.php-version }} 23 | tools: prestissimo 24 | env: 25 | COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} 26 | 27 | - name: Get composer cache directory 28 | id: composercache 29 | run: echo "::set-output name=dir::$(composer config cache-files-dir)" 30 | 31 | - name: Cache dependencies 32 | uses: actions/cache@v2 33 | with: 34 | path: ${{ steps.composercache.outputs.dir }} 35 | key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} 36 | restore-keys: ${{ runner.os }}-composer- 37 | 38 | - name: Install dependencies 39 | run: | 40 | composer install --prefer-dist 41 | 42 | - name: Static code analysis 43 | run: | 44 | composer run-script phpstan 45 | 46 | - name: Unit tests 47 | run: | 48 | composer run-script test 49 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | vendor/ 2 | .phpunit.result.cache 3 | clover.xml -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [2019] [Enrico Zimuel] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## SimpleMVC 2 | 3 | This project is abandoned and no longer maintained. It has been replaced by [simplemvc/skeleton](https://github.com/simplemvc/skeleton). 4 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ezimuel/simple-mvc", 3 | "type": "project", 4 | "description": "Simple MVC micro framework", 5 | "keywords": [ 6 | "framework", 7 | "simple", 8 | "mvc" 9 | ], 10 | "license": "Apache-2.0", 11 | "require": { 12 | "php": ">=7.3", 13 | "league/plates": "^3.3", 14 | "php-di/php-di": "^6.0", 15 | "nikic/fast-route": "^1.3", 16 | "nyholm/psr7": "^1.4", 17 | "nyholm/psr7-server": "^1.0", 18 | "psr/log": "^1.1" 19 | }, 20 | "require-dev": { 21 | "phpstan/phpstan": "^0.12", 22 | "phpunit/phpunit": "^9.5" 23 | }, 24 | "autoload": { 25 | "psr-4": { 26 | "SimpleMVC\\": "src/" 27 | } 28 | }, 29 | "autoload-dev": { 30 | "psr-4": { 31 | "SimpleMVC\\Test\\": "tests/" 32 | } 33 | }, 34 | "scripts": { 35 | "test": "vendor/bin/phpunit --colors=always", 36 | "test-coverage": "vendor/bin/phpunit --colors=always --coverage-clover clover.xml", 37 | "phpstan": "vendor/bin/phpstan analyse -c phpstan.neon" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /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#installing-dependencies", 5 | "This file is @generated automatically" 6 | ], 7 | "content-hash": "c9abe363c788c9a0eb74fe56068081b8", 8 | "packages": [ 9 | { 10 | "name": "league/plates", 11 | "version": "v3.4.0", 12 | "source": { 13 | "type": "git", 14 | "url": "https://github.com/thephpleague/plates.git", 15 | "reference": "6d3ee31199b536a4e003b34a356ca20f6f75496a" 16 | }, 17 | "dist": { 18 | "type": "zip", 19 | "url": "https://api.github.com/repos/thephpleague/plates/zipball/6d3ee31199b536a4e003b34a356ca20f6f75496a", 20 | "reference": "6d3ee31199b536a4e003b34a356ca20f6f75496a", 21 | "shasum": "" 22 | }, 23 | "require": { 24 | "php": "^7.0|^8.0" 25 | }, 26 | "require-dev": { 27 | "mikey179/vfsstream": "^1.6", 28 | "phpunit/phpunit": "^9.5", 29 | "squizlabs/php_codesniffer": "^3.5" 30 | }, 31 | "type": "library", 32 | "extra": { 33 | "branch-alias": { 34 | "dev-master": "3.0-dev" 35 | } 36 | }, 37 | "autoload": { 38 | "psr-4": { 39 | "League\\Plates\\": "src" 40 | } 41 | }, 42 | "notification-url": "https://packagist.org/downloads/", 43 | "license": [ 44 | "MIT" 45 | ], 46 | "authors": [ 47 | { 48 | "name": "Jonathan Reinink", 49 | "email": "jonathan@reinink.ca", 50 | "role": "Developer" 51 | }, 52 | { 53 | "name": "RJ Garcia", 54 | "email": "ragboyjr@icloud.com", 55 | "role": "Developer" 56 | } 57 | ], 58 | "description": "Plates, the native PHP template system that's fast, easy to use and easy to extend.", 59 | "homepage": "https://platesphp.com", 60 | "keywords": [ 61 | "league", 62 | "package", 63 | "templates", 64 | "templating", 65 | "views" 66 | ], 67 | "support": { 68 | "issues": "https://github.com/thephpleague/plates/issues", 69 | "source": "https://github.com/thephpleague/plates/tree/v3.4.0" 70 | }, 71 | "time": "2020-12-25T05:00:37+00:00" 72 | }, 73 | { 74 | "name": "nikic/fast-route", 75 | "version": "v1.3.0", 76 | "source": { 77 | "type": "git", 78 | "url": "https://github.com/nikic/FastRoute.git", 79 | "reference": "181d480e08d9476e61381e04a71b34dc0432e812" 80 | }, 81 | "dist": { 82 | "type": "zip", 83 | "url": "https://api.github.com/repos/nikic/FastRoute/zipball/181d480e08d9476e61381e04a71b34dc0432e812", 84 | "reference": "181d480e08d9476e61381e04a71b34dc0432e812", 85 | "shasum": "" 86 | }, 87 | "require": { 88 | "php": ">=5.4.0" 89 | }, 90 | "require-dev": { 91 | "phpunit/phpunit": "^4.8.35|~5.7" 92 | }, 93 | "type": "library", 94 | "autoload": { 95 | "psr-4": { 96 | "FastRoute\\": "src/" 97 | }, 98 | "files": [ 99 | "src/functions.php" 100 | ] 101 | }, 102 | "notification-url": "https://packagist.org/downloads/", 103 | "license": [ 104 | "BSD-3-Clause" 105 | ], 106 | "authors": [ 107 | { 108 | "name": "Nikita Popov", 109 | "email": "nikic@php.net" 110 | } 111 | ], 112 | "description": "Fast request router for PHP", 113 | "keywords": [ 114 | "router", 115 | "routing" 116 | ], 117 | "support": { 118 | "issues": "https://github.com/nikic/FastRoute/issues", 119 | "source": "https://github.com/nikic/FastRoute/tree/master" 120 | }, 121 | "time": "2018-02-13T20:26:39+00:00" 122 | }, 123 | { 124 | "name": "nyholm/psr7", 125 | "version": "1.4.1", 126 | "source": { 127 | "type": "git", 128 | "url": "https://github.com/Nyholm/psr7.git", 129 | "reference": "2212385b47153ea71b1c1b1374f8cb5e4f7892ec" 130 | }, 131 | "dist": { 132 | "type": "zip", 133 | "url": "https://api.github.com/repos/Nyholm/psr7/zipball/2212385b47153ea71b1c1b1374f8cb5e4f7892ec", 134 | "reference": "2212385b47153ea71b1c1b1374f8cb5e4f7892ec", 135 | "shasum": "" 136 | }, 137 | "require": { 138 | "php": ">=7.1", 139 | "php-http/message-factory": "^1.0", 140 | "psr/http-factory": "^1.0", 141 | "psr/http-message": "^1.0" 142 | }, 143 | "provide": { 144 | "psr/http-factory-implementation": "1.0", 145 | "psr/http-message-implementation": "1.0" 146 | }, 147 | "require-dev": { 148 | "http-interop/http-factory-tests": "^0.9", 149 | "php-http/psr7-integration-tests": "^1.0", 150 | "phpunit/phpunit": "^7.5 || 8.5 || 9.4", 151 | "symfony/error-handler": "^4.4" 152 | }, 153 | "type": "library", 154 | "extra": { 155 | "branch-alias": { 156 | "dev-master": "1.4-dev" 157 | } 158 | }, 159 | "autoload": { 160 | "psr-4": { 161 | "Nyholm\\Psr7\\": "src/" 162 | } 163 | }, 164 | "notification-url": "https://packagist.org/downloads/", 165 | "license": [ 166 | "MIT" 167 | ], 168 | "authors": [ 169 | { 170 | "name": "Tobias Nyholm", 171 | "email": "tobias.nyholm@gmail.com" 172 | }, 173 | { 174 | "name": "Martijn van der Ven", 175 | "email": "martijn@vanderven.se" 176 | } 177 | ], 178 | "description": "A fast PHP7 implementation of PSR-7", 179 | "homepage": "https://tnyholm.se", 180 | "keywords": [ 181 | "psr-17", 182 | "psr-7" 183 | ], 184 | "support": { 185 | "issues": "https://github.com/Nyholm/psr7/issues", 186 | "source": "https://github.com/Nyholm/psr7/tree/1.4.1" 187 | }, 188 | "funding": [ 189 | { 190 | "url": "https://github.com/Zegnat", 191 | "type": "github" 192 | }, 193 | { 194 | "url": "https://github.com/nyholm", 195 | "type": "github" 196 | } 197 | ], 198 | "time": "2021-07-02T08:32:20+00:00" 199 | }, 200 | { 201 | "name": "nyholm/psr7-server", 202 | "version": "1.0.2", 203 | "source": { 204 | "type": "git", 205 | "url": "https://github.com/Nyholm/psr7-server.git", 206 | "reference": "b846a689844cef114e8079d8c80f0afd96745ae3" 207 | }, 208 | "dist": { 209 | "type": "zip", 210 | "url": "https://api.github.com/repos/Nyholm/psr7-server/zipball/b846a689844cef114e8079d8c80f0afd96745ae3", 211 | "reference": "b846a689844cef114e8079d8c80f0afd96745ae3", 212 | "shasum": "" 213 | }, 214 | "require": { 215 | "php": "^7.1 || ^8.0", 216 | "psr/http-factory": "^1.0", 217 | "psr/http-message": "^1.0" 218 | }, 219 | "require-dev": { 220 | "nyholm/nsa": "^1.1", 221 | "nyholm/psr7": "^1.3", 222 | "phpunit/phpunit": "^7.0 || ^8.5 || ^9.3" 223 | }, 224 | "type": "library", 225 | "autoload": { 226 | "psr-4": { 227 | "Nyholm\\Psr7Server\\": "src/" 228 | } 229 | }, 230 | "notification-url": "https://packagist.org/downloads/", 231 | "license": [ 232 | "MIT" 233 | ], 234 | "authors": [ 235 | { 236 | "name": "Tobias Nyholm", 237 | "email": "tobias.nyholm@gmail.com" 238 | }, 239 | { 240 | "name": "Martijn van der Ven", 241 | "email": "martijn@vanderven.se" 242 | } 243 | ], 244 | "description": "Helper classes to handle PSR-7 server requests", 245 | "homepage": "http://tnyholm.se", 246 | "keywords": [ 247 | "psr-17", 248 | "psr-7" 249 | ], 250 | "support": { 251 | "issues": "https://github.com/Nyholm/psr7-server/issues", 252 | "source": "https://github.com/Nyholm/psr7-server/tree/1.0.2" 253 | }, 254 | "funding": [ 255 | { 256 | "url": "https://github.com/Zegnat", 257 | "type": "github" 258 | }, 259 | { 260 | "url": "https://github.com/nyholm", 261 | "type": "github" 262 | } 263 | ], 264 | "time": "2021-05-12T11:11:27+00:00" 265 | }, 266 | { 267 | "name": "opis/closure", 268 | "version": "3.6.2", 269 | "source": { 270 | "type": "git", 271 | "url": "https://github.com/opis/closure.git", 272 | "reference": "06e2ebd25f2869e54a306dda991f7db58066f7f6" 273 | }, 274 | "dist": { 275 | "type": "zip", 276 | "url": "https://api.github.com/repos/opis/closure/zipball/06e2ebd25f2869e54a306dda991f7db58066f7f6", 277 | "reference": "06e2ebd25f2869e54a306dda991f7db58066f7f6", 278 | "shasum": "" 279 | }, 280 | "require": { 281 | "php": "^5.4 || ^7.0 || ^8.0" 282 | }, 283 | "require-dev": { 284 | "jeremeamia/superclosure": "^2.0", 285 | "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0" 286 | }, 287 | "type": "library", 288 | "extra": { 289 | "branch-alias": { 290 | "dev-master": "3.6.x-dev" 291 | } 292 | }, 293 | "autoload": { 294 | "psr-4": { 295 | "Opis\\Closure\\": "src/" 296 | }, 297 | "files": [ 298 | "functions.php" 299 | ] 300 | }, 301 | "notification-url": "https://packagist.org/downloads/", 302 | "license": [ 303 | "MIT" 304 | ], 305 | "authors": [ 306 | { 307 | "name": "Marius Sarca", 308 | "email": "marius.sarca@gmail.com" 309 | }, 310 | { 311 | "name": "Sorin Sarca", 312 | "email": "sarca_sorin@hotmail.com" 313 | } 314 | ], 315 | "description": "A library that can be used to serialize closures (anonymous functions) and arbitrary objects.", 316 | "homepage": "https://opis.io/closure", 317 | "keywords": [ 318 | "anonymous functions", 319 | "closure", 320 | "function", 321 | "serializable", 322 | "serialization", 323 | "serialize" 324 | ], 325 | "support": { 326 | "issues": "https://github.com/opis/closure/issues", 327 | "source": "https://github.com/opis/closure/tree/3.6.2" 328 | }, 329 | "time": "2021-04-09T13:42:10+00:00" 330 | }, 331 | { 332 | "name": "php-di/invoker", 333 | "version": "2.3.2", 334 | "source": { 335 | "type": "git", 336 | "url": "https://github.com/PHP-DI/Invoker.git", 337 | "reference": "5214cbe5aad066022cd845dbf313f0e47aed928f" 338 | }, 339 | "dist": { 340 | "type": "zip", 341 | "url": "https://api.github.com/repos/PHP-DI/Invoker/zipball/5214cbe5aad066022cd845dbf313f0e47aed928f", 342 | "reference": "5214cbe5aad066022cd845dbf313f0e47aed928f", 343 | "shasum": "" 344 | }, 345 | "require": { 346 | "php": ">=7.3", 347 | "psr/container": "^1.0|^2.0" 348 | }, 349 | "require-dev": { 350 | "athletic/athletic": "~0.1.8", 351 | "mnapoli/hard-mode": "~0.3.0", 352 | "phpunit/phpunit": "^9.0" 353 | }, 354 | "type": "library", 355 | "autoload": { 356 | "psr-4": { 357 | "Invoker\\": "src/" 358 | } 359 | }, 360 | "notification-url": "https://packagist.org/downloads/", 361 | "license": [ 362 | "MIT" 363 | ], 364 | "description": "Generic and extensible callable invoker", 365 | "homepage": "https://github.com/PHP-DI/Invoker", 366 | "keywords": [ 367 | "callable", 368 | "dependency", 369 | "dependency-injection", 370 | "injection", 371 | "invoke", 372 | "invoker" 373 | ], 374 | "support": { 375 | "issues": "https://github.com/PHP-DI/Invoker/issues", 376 | "source": "https://github.com/PHP-DI/Invoker/tree/2.3.2" 377 | }, 378 | "funding": [ 379 | { 380 | "url": "https://github.com/mnapoli", 381 | "type": "github" 382 | } 383 | ], 384 | "time": "2021-07-30T15:05:32+00:00" 385 | }, 386 | { 387 | "name": "php-di/php-di", 388 | "version": "6.3.4", 389 | "source": { 390 | "type": "git", 391 | "url": "https://github.com/PHP-DI/PHP-DI.git", 392 | "reference": "f53bcba06ab31b18e911b77c039377f4ccd1f7a5" 393 | }, 394 | "dist": { 395 | "type": "zip", 396 | "url": "https://api.github.com/repos/PHP-DI/PHP-DI/zipball/f53bcba06ab31b18e911b77c039377f4ccd1f7a5", 397 | "reference": "f53bcba06ab31b18e911b77c039377f4ccd1f7a5", 398 | "shasum": "" 399 | }, 400 | "require": { 401 | "opis/closure": "^3.5.5", 402 | "php": ">=7.2.0", 403 | "php-di/invoker": "^2.0", 404 | "php-di/phpdoc-reader": "^2.0.1", 405 | "psr/container": "^1.0" 406 | }, 407 | "provide": { 408 | "psr/container-implementation": "^1.0" 409 | }, 410 | "require-dev": { 411 | "doctrine/annotations": "~1.2", 412 | "friendsofphp/php-cs-fixer": "^2.4", 413 | "mnapoli/phpunit-easymock": "^1.2", 414 | "ocramius/proxy-manager": "^2.0.2", 415 | "phpstan/phpstan": "^0.12", 416 | "phpunit/phpunit": "^8.5|^9.0" 417 | }, 418 | "suggest": { 419 | "doctrine/annotations": "Install it if you want to use annotations (version ~1.2)", 420 | "ocramius/proxy-manager": "Install it if you want to use lazy injection (version ~2.0)" 421 | }, 422 | "type": "library", 423 | "autoload": { 424 | "psr-4": { 425 | "DI\\": "src/" 426 | }, 427 | "files": [ 428 | "src/functions.php" 429 | ] 430 | }, 431 | "notification-url": "https://packagist.org/downloads/", 432 | "license": [ 433 | "MIT" 434 | ], 435 | "description": "The dependency injection container for humans", 436 | "homepage": "https://php-di.org/", 437 | "keywords": [ 438 | "PSR-11", 439 | "container", 440 | "container-interop", 441 | "dependency injection", 442 | "di", 443 | "ioc", 444 | "psr11" 445 | ], 446 | "support": { 447 | "issues": "https://github.com/PHP-DI/PHP-DI/issues", 448 | "source": "https://github.com/PHP-DI/PHP-DI/tree/6.3.4" 449 | }, 450 | "funding": [ 451 | { 452 | "url": "https://github.com/mnapoli", 453 | "type": "github" 454 | }, 455 | { 456 | "url": "https://tidelift.com/funding/github/packagist/php-di/php-di", 457 | "type": "tidelift" 458 | } 459 | ], 460 | "time": "2021-06-10T08:04:48+00:00" 461 | }, 462 | { 463 | "name": "php-di/phpdoc-reader", 464 | "version": "2.2.1", 465 | "source": { 466 | "type": "git", 467 | "url": "https://github.com/PHP-DI/PhpDocReader.git", 468 | "reference": "66daff34cbd2627740ffec9469ffbac9f8c8185c" 469 | }, 470 | "dist": { 471 | "type": "zip", 472 | "url": "https://api.github.com/repos/PHP-DI/PhpDocReader/zipball/66daff34cbd2627740ffec9469ffbac9f8c8185c", 473 | "reference": "66daff34cbd2627740ffec9469ffbac9f8c8185c", 474 | "shasum": "" 475 | }, 476 | "require": { 477 | "php": ">=7.2.0" 478 | }, 479 | "require-dev": { 480 | "mnapoli/hard-mode": "~0.3.0", 481 | "phpunit/phpunit": "^8.5|^9.0" 482 | }, 483 | "type": "library", 484 | "autoload": { 485 | "psr-4": { 486 | "PhpDocReader\\": "src/PhpDocReader" 487 | } 488 | }, 489 | "notification-url": "https://packagist.org/downloads/", 490 | "license": [ 491 | "MIT" 492 | ], 493 | "description": "PhpDocReader parses @var and @param values in PHP docblocks (supports namespaced class names with the same resolution rules as PHP)", 494 | "keywords": [ 495 | "phpdoc", 496 | "reflection" 497 | ], 498 | "support": { 499 | "issues": "https://github.com/PHP-DI/PhpDocReader/issues", 500 | "source": "https://github.com/PHP-DI/PhpDocReader/tree/2.2.1" 501 | }, 502 | "time": "2020-10-12T12:39:22+00:00" 503 | }, 504 | { 505 | "name": "php-http/message-factory", 506 | "version": "v1.0.2", 507 | "source": { 508 | "type": "git", 509 | "url": "https://github.com/php-http/message-factory.git", 510 | "reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1" 511 | }, 512 | "dist": { 513 | "type": "zip", 514 | "url": "https://api.github.com/repos/php-http/message-factory/zipball/a478cb11f66a6ac48d8954216cfed9aa06a501a1", 515 | "reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1", 516 | "shasum": "" 517 | }, 518 | "require": { 519 | "php": ">=5.4", 520 | "psr/http-message": "^1.0" 521 | }, 522 | "type": "library", 523 | "extra": { 524 | "branch-alias": { 525 | "dev-master": "1.0-dev" 526 | } 527 | }, 528 | "autoload": { 529 | "psr-4": { 530 | "Http\\Message\\": "src/" 531 | } 532 | }, 533 | "notification-url": "https://packagist.org/downloads/", 534 | "license": [ 535 | "MIT" 536 | ], 537 | "authors": [ 538 | { 539 | "name": "Márk Sági-Kazár", 540 | "email": "mark.sagikazar@gmail.com" 541 | } 542 | ], 543 | "description": "Factory interfaces for PSR-7 HTTP Message", 544 | "homepage": "http://php-http.org", 545 | "keywords": [ 546 | "factory", 547 | "http", 548 | "message", 549 | "stream", 550 | "uri" 551 | ], 552 | "support": { 553 | "issues": "https://github.com/php-http/message-factory/issues", 554 | "source": "https://github.com/php-http/message-factory/tree/master" 555 | }, 556 | "time": "2015-12-19T14:08:53+00:00" 557 | }, 558 | { 559 | "name": "psr/container", 560 | "version": "1.1.1", 561 | "source": { 562 | "type": "git", 563 | "url": "https://github.com/php-fig/container.git", 564 | "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" 565 | }, 566 | "dist": { 567 | "type": "zip", 568 | "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", 569 | "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", 570 | "shasum": "" 571 | }, 572 | "require": { 573 | "php": ">=7.2.0" 574 | }, 575 | "type": "library", 576 | "autoload": { 577 | "psr-4": { 578 | "Psr\\Container\\": "src/" 579 | } 580 | }, 581 | "notification-url": "https://packagist.org/downloads/", 582 | "license": [ 583 | "MIT" 584 | ], 585 | "authors": [ 586 | { 587 | "name": "PHP-FIG", 588 | "homepage": "https://www.php-fig.org/" 589 | } 590 | ], 591 | "description": "Common Container Interface (PHP FIG PSR-11)", 592 | "homepage": "https://github.com/php-fig/container", 593 | "keywords": [ 594 | "PSR-11", 595 | "container", 596 | "container-interface", 597 | "container-interop", 598 | "psr" 599 | ], 600 | "support": { 601 | "issues": "https://github.com/php-fig/container/issues", 602 | "source": "https://github.com/php-fig/container/tree/1.1.1" 603 | }, 604 | "time": "2021-03-05T17:36:06+00:00" 605 | }, 606 | { 607 | "name": "psr/http-factory", 608 | "version": "1.0.1", 609 | "source": { 610 | "type": "git", 611 | "url": "https://github.com/php-fig/http-factory.git", 612 | "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" 613 | }, 614 | "dist": { 615 | "type": "zip", 616 | "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", 617 | "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", 618 | "shasum": "" 619 | }, 620 | "require": { 621 | "php": ">=7.0.0", 622 | "psr/http-message": "^1.0" 623 | }, 624 | "type": "library", 625 | "extra": { 626 | "branch-alias": { 627 | "dev-master": "1.0.x-dev" 628 | } 629 | }, 630 | "autoload": { 631 | "psr-4": { 632 | "Psr\\Http\\Message\\": "src/" 633 | } 634 | }, 635 | "notification-url": "https://packagist.org/downloads/", 636 | "license": [ 637 | "MIT" 638 | ], 639 | "authors": [ 640 | { 641 | "name": "PHP-FIG", 642 | "homepage": "http://www.php-fig.org/" 643 | } 644 | ], 645 | "description": "Common interfaces for PSR-7 HTTP message factories", 646 | "keywords": [ 647 | "factory", 648 | "http", 649 | "message", 650 | "psr", 651 | "psr-17", 652 | "psr-7", 653 | "request", 654 | "response" 655 | ], 656 | "support": { 657 | "source": "https://github.com/php-fig/http-factory/tree/master" 658 | }, 659 | "time": "2019-04-30T12:38:16+00:00" 660 | }, 661 | { 662 | "name": "psr/http-message", 663 | "version": "1.0.1", 664 | "source": { 665 | "type": "git", 666 | "url": "https://github.com/php-fig/http-message.git", 667 | "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" 668 | }, 669 | "dist": { 670 | "type": "zip", 671 | "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", 672 | "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", 673 | "shasum": "" 674 | }, 675 | "require": { 676 | "php": ">=5.3.0" 677 | }, 678 | "type": "library", 679 | "extra": { 680 | "branch-alias": { 681 | "dev-master": "1.0.x-dev" 682 | } 683 | }, 684 | "autoload": { 685 | "psr-4": { 686 | "Psr\\Http\\Message\\": "src/" 687 | } 688 | }, 689 | "notification-url": "https://packagist.org/downloads/", 690 | "license": [ 691 | "MIT" 692 | ], 693 | "authors": [ 694 | { 695 | "name": "PHP-FIG", 696 | "homepage": "http://www.php-fig.org/" 697 | } 698 | ], 699 | "description": "Common interface for HTTP messages", 700 | "homepage": "https://github.com/php-fig/http-message", 701 | "keywords": [ 702 | "http", 703 | "http-message", 704 | "psr", 705 | "psr-7", 706 | "request", 707 | "response" 708 | ], 709 | "support": { 710 | "source": "https://github.com/php-fig/http-message/tree/master" 711 | }, 712 | "time": "2016-08-06T14:39:51+00:00" 713 | }, 714 | { 715 | "name": "psr/log", 716 | "version": "1.1.4", 717 | "source": { 718 | "type": "git", 719 | "url": "https://github.com/php-fig/log.git", 720 | "reference": "d49695b909c3b7628b6289db5479a1c204601f11" 721 | }, 722 | "dist": { 723 | "type": "zip", 724 | "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", 725 | "reference": "d49695b909c3b7628b6289db5479a1c204601f11", 726 | "shasum": "" 727 | }, 728 | "require": { 729 | "php": ">=5.3.0" 730 | }, 731 | "type": "library", 732 | "extra": { 733 | "branch-alias": { 734 | "dev-master": "1.1.x-dev" 735 | } 736 | }, 737 | "autoload": { 738 | "psr-4": { 739 | "Psr\\Log\\": "Psr/Log/" 740 | } 741 | }, 742 | "notification-url": "https://packagist.org/downloads/", 743 | "license": [ 744 | "MIT" 745 | ], 746 | "authors": [ 747 | { 748 | "name": "PHP-FIG", 749 | "homepage": "https://www.php-fig.org/" 750 | } 751 | ], 752 | "description": "Common interface for logging libraries", 753 | "homepage": "https://github.com/php-fig/log", 754 | "keywords": [ 755 | "log", 756 | "psr", 757 | "psr-3" 758 | ], 759 | "support": { 760 | "source": "https://github.com/php-fig/log/tree/1.1.4" 761 | }, 762 | "time": "2021-05-03T11:20:27+00:00" 763 | } 764 | ], 765 | "packages-dev": [ 766 | { 767 | "name": "doctrine/instantiator", 768 | "version": "1.4.0", 769 | "source": { 770 | "type": "git", 771 | "url": "https://github.com/doctrine/instantiator.git", 772 | "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" 773 | }, 774 | "dist": { 775 | "type": "zip", 776 | "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", 777 | "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", 778 | "shasum": "" 779 | }, 780 | "require": { 781 | "php": "^7.1 || ^8.0" 782 | }, 783 | "require-dev": { 784 | "doctrine/coding-standard": "^8.0", 785 | "ext-pdo": "*", 786 | "ext-phar": "*", 787 | "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", 788 | "phpstan/phpstan": "^0.12", 789 | "phpstan/phpstan-phpunit": "^0.12", 790 | "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" 791 | }, 792 | "type": "library", 793 | "autoload": { 794 | "psr-4": { 795 | "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" 796 | } 797 | }, 798 | "notification-url": "https://packagist.org/downloads/", 799 | "license": [ 800 | "MIT" 801 | ], 802 | "authors": [ 803 | { 804 | "name": "Marco Pivetta", 805 | "email": "ocramius@gmail.com", 806 | "homepage": "https://ocramius.github.io/" 807 | } 808 | ], 809 | "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", 810 | "homepage": "https://www.doctrine-project.org/projects/instantiator.html", 811 | "keywords": [ 812 | "constructor", 813 | "instantiate" 814 | ], 815 | "support": { 816 | "issues": "https://github.com/doctrine/instantiator/issues", 817 | "source": "https://github.com/doctrine/instantiator/tree/1.4.0" 818 | }, 819 | "funding": [ 820 | { 821 | "url": "https://www.doctrine-project.org/sponsorship.html", 822 | "type": "custom" 823 | }, 824 | { 825 | "url": "https://www.patreon.com/phpdoctrine", 826 | "type": "patreon" 827 | }, 828 | { 829 | "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", 830 | "type": "tidelift" 831 | } 832 | ], 833 | "time": "2020-11-10T18:47:58+00:00" 834 | }, 835 | { 836 | "name": "myclabs/deep-copy", 837 | "version": "1.10.2", 838 | "source": { 839 | "type": "git", 840 | "url": "https://github.com/myclabs/DeepCopy.git", 841 | "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" 842 | }, 843 | "dist": { 844 | "type": "zip", 845 | "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", 846 | "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", 847 | "shasum": "" 848 | }, 849 | "require": { 850 | "php": "^7.1 || ^8.0" 851 | }, 852 | "replace": { 853 | "myclabs/deep-copy": "self.version" 854 | }, 855 | "require-dev": { 856 | "doctrine/collections": "^1.0", 857 | "doctrine/common": "^2.6", 858 | "phpunit/phpunit": "^7.1" 859 | }, 860 | "type": "library", 861 | "autoload": { 862 | "psr-4": { 863 | "DeepCopy\\": "src/DeepCopy/" 864 | }, 865 | "files": [ 866 | "src/DeepCopy/deep_copy.php" 867 | ] 868 | }, 869 | "notification-url": "https://packagist.org/downloads/", 870 | "license": [ 871 | "MIT" 872 | ], 873 | "description": "Create deep copies (clones) of your objects", 874 | "keywords": [ 875 | "clone", 876 | "copy", 877 | "duplicate", 878 | "object", 879 | "object graph" 880 | ], 881 | "support": { 882 | "issues": "https://github.com/myclabs/DeepCopy/issues", 883 | "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" 884 | }, 885 | "funding": [ 886 | { 887 | "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", 888 | "type": "tidelift" 889 | } 890 | ], 891 | "time": "2020-11-13T09:40:50+00:00" 892 | }, 893 | { 894 | "name": "nikic/php-parser", 895 | "version": "v4.12.0", 896 | "source": { 897 | "type": "git", 898 | "url": "https://github.com/nikic/PHP-Parser.git", 899 | "reference": "6608f01670c3cc5079e18c1dab1104e002579143" 900 | }, 901 | "dist": { 902 | "type": "zip", 903 | "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/6608f01670c3cc5079e18c1dab1104e002579143", 904 | "reference": "6608f01670c3cc5079e18c1dab1104e002579143", 905 | "shasum": "" 906 | }, 907 | "require": { 908 | "ext-tokenizer": "*", 909 | "php": ">=7.0" 910 | }, 911 | "require-dev": { 912 | "ircmaxell/php-yacc": "^0.0.7", 913 | "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" 914 | }, 915 | "bin": [ 916 | "bin/php-parse" 917 | ], 918 | "type": "library", 919 | "extra": { 920 | "branch-alias": { 921 | "dev-master": "4.9-dev" 922 | } 923 | }, 924 | "autoload": { 925 | "psr-4": { 926 | "PhpParser\\": "lib/PhpParser" 927 | } 928 | }, 929 | "notification-url": "https://packagist.org/downloads/", 930 | "license": [ 931 | "BSD-3-Clause" 932 | ], 933 | "authors": [ 934 | { 935 | "name": "Nikita Popov" 936 | } 937 | ], 938 | "description": "A PHP parser written in PHP", 939 | "keywords": [ 940 | "parser", 941 | "php" 942 | ], 943 | "support": { 944 | "issues": "https://github.com/nikic/PHP-Parser/issues", 945 | "source": "https://github.com/nikic/PHP-Parser/tree/v4.12.0" 946 | }, 947 | "time": "2021-07-21T10:44:31+00:00" 948 | }, 949 | { 950 | "name": "phar-io/manifest", 951 | "version": "2.0.3", 952 | "source": { 953 | "type": "git", 954 | "url": "https://github.com/phar-io/manifest.git", 955 | "reference": "97803eca37d319dfa7826cc2437fc020857acb53" 956 | }, 957 | "dist": { 958 | "type": "zip", 959 | "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", 960 | "reference": "97803eca37d319dfa7826cc2437fc020857acb53", 961 | "shasum": "" 962 | }, 963 | "require": { 964 | "ext-dom": "*", 965 | "ext-phar": "*", 966 | "ext-xmlwriter": "*", 967 | "phar-io/version": "^3.0.1", 968 | "php": "^7.2 || ^8.0" 969 | }, 970 | "type": "library", 971 | "extra": { 972 | "branch-alias": { 973 | "dev-master": "2.0.x-dev" 974 | } 975 | }, 976 | "autoload": { 977 | "classmap": [ 978 | "src/" 979 | ] 980 | }, 981 | "notification-url": "https://packagist.org/downloads/", 982 | "license": [ 983 | "BSD-3-Clause" 984 | ], 985 | "authors": [ 986 | { 987 | "name": "Arne Blankerts", 988 | "email": "arne@blankerts.de", 989 | "role": "Developer" 990 | }, 991 | { 992 | "name": "Sebastian Heuer", 993 | "email": "sebastian@phpeople.de", 994 | "role": "Developer" 995 | }, 996 | { 997 | "name": "Sebastian Bergmann", 998 | "email": "sebastian@phpunit.de", 999 | "role": "Developer" 1000 | } 1001 | ], 1002 | "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", 1003 | "support": { 1004 | "issues": "https://github.com/phar-io/manifest/issues", 1005 | "source": "https://github.com/phar-io/manifest/tree/2.0.3" 1006 | }, 1007 | "time": "2021-07-20T11:28:43+00:00" 1008 | }, 1009 | { 1010 | "name": "phar-io/version", 1011 | "version": "3.1.0", 1012 | "source": { 1013 | "type": "git", 1014 | "url": "https://github.com/phar-io/version.git", 1015 | "reference": "bae7c545bef187884426f042434e561ab1ddb182" 1016 | }, 1017 | "dist": { 1018 | "type": "zip", 1019 | "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", 1020 | "reference": "bae7c545bef187884426f042434e561ab1ddb182", 1021 | "shasum": "" 1022 | }, 1023 | "require": { 1024 | "php": "^7.2 || ^8.0" 1025 | }, 1026 | "type": "library", 1027 | "autoload": { 1028 | "classmap": [ 1029 | "src/" 1030 | ] 1031 | }, 1032 | "notification-url": "https://packagist.org/downloads/", 1033 | "license": [ 1034 | "BSD-3-Clause" 1035 | ], 1036 | "authors": [ 1037 | { 1038 | "name": "Arne Blankerts", 1039 | "email": "arne@blankerts.de", 1040 | "role": "Developer" 1041 | }, 1042 | { 1043 | "name": "Sebastian Heuer", 1044 | "email": "sebastian@phpeople.de", 1045 | "role": "Developer" 1046 | }, 1047 | { 1048 | "name": "Sebastian Bergmann", 1049 | "email": "sebastian@phpunit.de", 1050 | "role": "Developer" 1051 | } 1052 | ], 1053 | "description": "Library for handling version information and constraints", 1054 | "support": { 1055 | "issues": "https://github.com/phar-io/version/issues", 1056 | "source": "https://github.com/phar-io/version/tree/3.1.0" 1057 | }, 1058 | "time": "2021-02-23T14:00:09+00:00" 1059 | }, 1060 | { 1061 | "name": "phpdocumentor/reflection-common", 1062 | "version": "2.2.0", 1063 | "source": { 1064 | "type": "git", 1065 | "url": "https://github.com/phpDocumentor/ReflectionCommon.git", 1066 | "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" 1067 | }, 1068 | "dist": { 1069 | "type": "zip", 1070 | "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", 1071 | "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", 1072 | "shasum": "" 1073 | }, 1074 | "require": { 1075 | "php": "^7.2 || ^8.0" 1076 | }, 1077 | "type": "library", 1078 | "extra": { 1079 | "branch-alias": { 1080 | "dev-2.x": "2.x-dev" 1081 | } 1082 | }, 1083 | "autoload": { 1084 | "psr-4": { 1085 | "phpDocumentor\\Reflection\\": "src/" 1086 | } 1087 | }, 1088 | "notification-url": "https://packagist.org/downloads/", 1089 | "license": [ 1090 | "MIT" 1091 | ], 1092 | "authors": [ 1093 | { 1094 | "name": "Jaap van Otterdijk", 1095 | "email": "opensource@ijaap.nl" 1096 | } 1097 | ], 1098 | "description": "Common reflection classes used by phpdocumentor to reflect the code structure", 1099 | "homepage": "http://www.phpdoc.org", 1100 | "keywords": [ 1101 | "FQSEN", 1102 | "phpDocumentor", 1103 | "phpdoc", 1104 | "reflection", 1105 | "static analysis" 1106 | ], 1107 | "support": { 1108 | "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", 1109 | "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" 1110 | }, 1111 | "time": "2020-06-27T09:03:43+00:00" 1112 | }, 1113 | { 1114 | "name": "phpdocumentor/reflection-docblock", 1115 | "version": "5.2.2", 1116 | "source": { 1117 | "type": "git", 1118 | "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", 1119 | "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" 1120 | }, 1121 | "dist": { 1122 | "type": "zip", 1123 | "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", 1124 | "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", 1125 | "shasum": "" 1126 | }, 1127 | "require": { 1128 | "ext-filter": "*", 1129 | "php": "^7.2 || ^8.0", 1130 | "phpdocumentor/reflection-common": "^2.2", 1131 | "phpdocumentor/type-resolver": "^1.3", 1132 | "webmozart/assert": "^1.9.1" 1133 | }, 1134 | "require-dev": { 1135 | "mockery/mockery": "~1.3.2" 1136 | }, 1137 | "type": "library", 1138 | "extra": { 1139 | "branch-alias": { 1140 | "dev-master": "5.x-dev" 1141 | } 1142 | }, 1143 | "autoload": { 1144 | "psr-4": { 1145 | "phpDocumentor\\Reflection\\": "src" 1146 | } 1147 | }, 1148 | "notification-url": "https://packagist.org/downloads/", 1149 | "license": [ 1150 | "MIT" 1151 | ], 1152 | "authors": [ 1153 | { 1154 | "name": "Mike van Riel", 1155 | "email": "me@mikevanriel.com" 1156 | }, 1157 | { 1158 | "name": "Jaap van Otterdijk", 1159 | "email": "account@ijaap.nl" 1160 | } 1161 | ], 1162 | "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", 1163 | "support": { 1164 | "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", 1165 | "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" 1166 | }, 1167 | "time": "2020-09-03T19:13:55+00:00" 1168 | }, 1169 | { 1170 | "name": "phpdocumentor/type-resolver", 1171 | "version": "1.4.0", 1172 | "source": { 1173 | "type": "git", 1174 | "url": "https://github.com/phpDocumentor/TypeResolver.git", 1175 | "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" 1176 | }, 1177 | "dist": { 1178 | "type": "zip", 1179 | "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", 1180 | "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", 1181 | "shasum": "" 1182 | }, 1183 | "require": { 1184 | "php": "^7.2 || ^8.0", 1185 | "phpdocumentor/reflection-common": "^2.0" 1186 | }, 1187 | "require-dev": { 1188 | "ext-tokenizer": "*" 1189 | }, 1190 | "type": "library", 1191 | "extra": { 1192 | "branch-alias": { 1193 | "dev-1.x": "1.x-dev" 1194 | } 1195 | }, 1196 | "autoload": { 1197 | "psr-4": { 1198 | "phpDocumentor\\Reflection\\": "src" 1199 | } 1200 | }, 1201 | "notification-url": "https://packagist.org/downloads/", 1202 | "license": [ 1203 | "MIT" 1204 | ], 1205 | "authors": [ 1206 | { 1207 | "name": "Mike van Riel", 1208 | "email": "me@mikevanriel.com" 1209 | } 1210 | ], 1211 | "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", 1212 | "support": { 1213 | "issues": "https://github.com/phpDocumentor/TypeResolver/issues", 1214 | "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0" 1215 | }, 1216 | "time": "2020-09-17T18:55:26+00:00" 1217 | }, 1218 | { 1219 | "name": "phpspec/prophecy", 1220 | "version": "1.13.0", 1221 | "source": { 1222 | "type": "git", 1223 | "url": "https://github.com/phpspec/prophecy.git", 1224 | "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea" 1225 | }, 1226 | "dist": { 1227 | "type": "zip", 1228 | "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be1996ed8adc35c3fd795488a653f4b518be70ea", 1229 | "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea", 1230 | "shasum": "" 1231 | }, 1232 | "require": { 1233 | "doctrine/instantiator": "^1.2", 1234 | "php": "^7.2 || ~8.0, <8.1", 1235 | "phpdocumentor/reflection-docblock": "^5.2", 1236 | "sebastian/comparator": "^3.0 || ^4.0", 1237 | "sebastian/recursion-context": "^3.0 || ^4.0" 1238 | }, 1239 | "require-dev": { 1240 | "phpspec/phpspec": "^6.0", 1241 | "phpunit/phpunit": "^8.0 || ^9.0" 1242 | }, 1243 | "type": "library", 1244 | "extra": { 1245 | "branch-alias": { 1246 | "dev-master": "1.11.x-dev" 1247 | } 1248 | }, 1249 | "autoload": { 1250 | "psr-4": { 1251 | "Prophecy\\": "src/Prophecy" 1252 | } 1253 | }, 1254 | "notification-url": "https://packagist.org/downloads/", 1255 | "license": [ 1256 | "MIT" 1257 | ], 1258 | "authors": [ 1259 | { 1260 | "name": "Konstantin Kudryashov", 1261 | "email": "ever.zet@gmail.com", 1262 | "homepage": "http://everzet.com" 1263 | }, 1264 | { 1265 | "name": "Marcello Duarte", 1266 | "email": "marcello.duarte@gmail.com" 1267 | } 1268 | ], 1269 | "description": "Highly opinionated mocking framework for PHP 5.3+", 1270 | "homepage": "https://github.com/phpspec/prophecy", 1271 | "keywords": [ 1272 | "Double", 1273 | "Dummy", 1274 | "fake", 1275 | "mock", 1276 | "spy", 1277 | "stub" 1278 | ], 1279 | "support": { 1280 | "issues": "https://github.com/phpspec/prophecy/issues", 1281 | "source": "https://github.com/phpspec/prophecy/tree/1.13.0" 1282 | }, 1283 | "time": "2021-03-17T13:42:18+00:00" 1284 | }, 1285 | { 1286 | "name": "phpstan/phpstan", 1287 | "version": "0.12.94", 1288 | "source": { 1289 | "type": "git", 1290 | "url": "https://github.com/phpstan/phpstan.git", 1291 | "reference": "3d0ba4c198a24e3c3fc489f3ec6ac9612c4be5d6" 1292 | }, 1293 | "dist": { 1294 | "type": "zip", 1295 | "url": "https://api.github.com/repos/phpstan/phpstan/zipball/3d0ba4c198a24e3c3fc489f3ec6ac9612c4be5d6", 1296 | "reference": "3d0ba4c198a24e3c3fc489f3ec6ac9612c4be5d6", 1297 | "shasum": "" 1298 | }, 1299 | "require": { 1300 | "php": "^7.1|^8.0" 1301 | }, 1302 | "conflict": { 1303 | "phpstan/phpstan-shim": "*" 1304 | }, 1305 | "bin": [ 1306 | "phpstan", 1307 | "phpstan.phar" 1308 | ], 1309 | "type": "library", 1310 | "extra": { 1311 | "branch-alias": { 1312 | "dev-master": "0.12-dev" 1313 | } 1314 | }, 1315 | "autoload": { 1316 | "files": [ 1317 | "bootstrap.php" 1318 | ] 1319 | }, 1320 | "notification-url": "https://packagist.org/downloads/", 1321 | "license": [ 1322 | "MIT" 1323 | ], 1324 | "description": "PHPStan - PHP Static Analysis Tool", 1325 | "support": { 1326 | "issues": "https://github.com/phpstan/phpstan/issues", 1327 | "source": "https://github.com/phpstan/phpstan/tree/0.12.94" 1328 | }, 1329 | "funding": [ 1330 | { 1331 | "url": "https://github.com/ondrejmirtes", 1332 | "type": "github" 1333 | }, 1334 | { 1335 | "url": "https://github.com/phpstan", 1336 | "type": "github" 1337 | }, 1338 | { 1339 | "url": "https://www.patreon.com/phpstan", 1340 | "type": "patreon" 1341 | }, 1342 | { 1343 | "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", 1344 | "type": "tidelift" 1345 | } 1346 | ], 1347 | "time": "2021-07-30T09:05:27+00:00" 1348 | }, 1349 | { 1350 | "name": "phpunit/php-code-coverage", 1351 | "version": "9.2.6", 1352 | "source": { 1353 | "type": "git", 1354 | "url": "https://github.com/sebastianbergmann/php-code-coverage.git", 1355 | "reference": "f6293e1b30a2354e8428e004689671b83871edde" 1356 | }, 1357 | "dist": { 1358 | "type": "zip", 1359 | "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f6293e1b30a2354e8428e004689671b83871edde", 1360 | "reference": "f6293e1b30a2354e8428e004689671b83871edde", 1361 | "shasum": "" 1362 | }, 1363 | "require": { 1364 | "ext-dom": "*", 1365 | "ext-libxml": "*", 1366 | "ext-xmlwriter": "*", 1367 | "nikic/php-parser": "^4.10.2", 1368 | "php": ">=7.3", 1369 | "phpunit/php-file-iterator": "^3.0.3", 1370 | "phpunit/php-text-template": "^2.0.2", 1371 | "sebastian/code-unit-reverse-lookup": "^2.0.2", 1372 | "sebastian/complexity": "^2.0", 1373 | "sebastian/environment": "^5.1.2", 1374 | "sebastian/lines-of-code": "^1.0.3", 1375 | "sebastian/version": "^3.0.1", 1376 | "theseer/tokenizer": "^1.2.0" 1377 | }, 1378 | "require-dev": { 1379 | "phpunit/phpunit": "^9.3" 1380 | }, 1381 | "suggest": { 1382 | "ext-pcov": "*", 1383 | "ext-xdebug": "*" 1384 | }, 1385 | "type": "library", 1386 | "extra": { 1387 | "branch-alias": { 1388 | "dev-master": "9.2-dev" 1389 | } 1390 | }, 1391 | "autoload": { 1392 | "classmap": [ 1393 | "src/" 1394 | ] 1395 | }, 1396 | "notification-url": "https://packagist.org/downloads/", 1397 | "license": [ 1398 | "BSD-3-Clause" 1399 | ], 1400 | "authors": [ 1401 | { 1402 | "name": "Sebastian Bergmann", 1403 | "email": "sebastian@phpunit.de", 1404 | "role": "lead" 1405 | } 1406 | ], 1407 | "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", 1408 | "homepage": "https://github.com/sebastianbergmann/php-code-coverage", 1409 | "keywords": [ 1410 | "coverage", 1411 | "testing", 1412 | "xunit" 1413 | ], 1414 | "support": { 1415 | "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", 1416 | "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.6" 1417 | }, 1418 | "funding": [ 1419 | { 1420 | "url": "https://github.com/sebastianbergmann", 1421 | "type": "github" 1422 | } 1423 | ], 1424 | "time": "2021-03-28T07:26:59+00:00" 1425 | }, 1426 | { 1427 | "name": "phpunit/php-file-iterator", 1428 | "version": "3.0.5", 1429 | "source": { 1430 | "type": "git", 1431 | "url": "https://github.com/sebastianbergmann/php-file-iterator.git", 1432 | "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8" 1433 | }, 1434 | "dist": { 1435 | "type": "zip", 1436 | "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8", 1437 | "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8", 1438 | "shasum": "" 1439 | }, 1440 | "require": { 1441 | "php": ">=7.3" 1442 | }, 1443 | "require-dev": { 1444 | "phpunit/phpunit": "^9.3" 1445 | }, 1446 | "type": "library", 1447 | "extra": { 1448 | "branch-alias": { 1449 | "dev-master": "3.0-dev" 1450 | } 1451 | }, 1452 | "autoload": { 1453 | "classmap": [ 1454 | "src/" 1455 | ] 1456 | }, 1457 | "notification-url": "https://packagist.org/downloads/", 1458 | "license": [ 1459 | "BSD-3-Clause" 1460 | ], 1461 | "authors": [ 1462 | { 1463 | "name": "Sebastian Bergmann", 1464 | "email": "sebastian@phpunit.de", 1465 | "role": "lead" 1466 | } 1467 | ], 1468 | "description": "FilterIterator implementation that filters files based on a list of suffixes.", 1469 | "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", 1470 | "keywords": [ 1471 | "filesystem", 1472 | "iterator" 1473 | ], 1474 | "support": { 1475 | "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", 1476 | "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.5" 1477 | }, 1478 | "funding": [ 1479 | { 1480 | "url": "https://github.com/sebastianbergmann", 1481 | "type": "github" 1482 | } 1483 | ], 1484 | "time": "2020-09-28T05:57:25+00:00" 1485 | }, 1486 | { 1487 | "name": "phpunit/php-invoker", 1488 | "version": "3.1.1", 1489 | "source": { 1490 | "type": "git", 1491 | "url": "https://github.com/sebastianbergmann/php-invoker.git", 1492 | "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" 1493 | }, 1494 | "dist": { 1495 | "type": "zip", 1496 | "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", 1497 | "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", 1498 | "shasum": "" 1499 | }, 1500 | "require": { 1501 | "php": ">=7.3" 1502 | }, 1503 | "require-dev": { 1504 | "ext-pcntl": "*", 1505 | "phpunit/phpunit": "^9.3" 1506 | }, 1507 | "suggest": { 1508 | "ext-pcntl": "*" 1509 | }, 1510 | "type": "library", 1511 | "extra": { 1512 | "branch-alias": { 1513 | "dev-master": "3.1-dev" 1514 | } 1515 | }, 1516 | "autoload": { 1517 | "classmap": [ 1518 | "src/" 1519 | ] 1520 | }, 1521 | "notification-url": "https://packagist.org/downloads/", 1522 | "license": [ 1523 | "BSD-3-Clause" 1524 | ], 1525 | "authors": [ 1526 | { 1527 | "name": "Sebastian Bergmann", 1528 | "email": "sebastian@phpunit.de", 1529 | "role": "lead" 1530 | } 1531 | ], 1532 | "description": "Invoke callables with a timeout", 1533 | "homepage": "https://github.com/sebastianbergmann/php-invoker/", 1534 | "keywords": [ 1535 | "process" 1536 | ], 1537 | "support": { 1538 | "issues": "https://github.com/sebastianbergmann/php-invoker/issues", 1539 | "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" 1540 | }, 1541 | "funding": [ 1542 | { 1543 | "url": "https://github.com/sebastianbergmann", 1544 | "type": "github" 1545 | } 1546 | ], 1547 | "time": "2020-09-28T05:58:55+00:00" 1548 | }, 1549 | { 1550 | "name": "phpunit/php-text-template", 1551 | "version": "2.0.4", 1552 | "source": { 1553 | "type": "git", 1554 | "url": "https://github.com/sebastianbergmann/php-text-template.git", 1555 | "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" 1556 | }, 1557 | "dist": { 1558 | "type": "zip", 1559 | "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", 1560 | "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", 1561 | "shasum": "" 1562 | }, 1563 | "require": { 1564 | "php": ">=7.3" 1565 | }, 1566 | "require-dev": { 1567 | "phpunit/phpunit": "^9.3" 1568 | }, 1569 | "type": "library", 1570 | "extra": { 1571 | "branch-alias": { 1572 | "dev-master": "2.0-dev" 1573 | } 1574 | }, 1575 | "autoload": { 1576 | "classmap": [ 1577 | "src/" 1578 | ] 1579 | }, 1580 | "notification-url": "https://packagist.org/downloads/", 1581 | "license": [ 1582 | "BSD-3-Clause" 1583 | ], 1584 | "authors": [ 1585 | { 1586 | "name": "Sebastian Bergmann", 1587 | "email": "sebastian@phpunit.de", 1588 | "role": "lead" 1589 | } 1590 | ], 1591 | "description": "Simple template engine.", 1592 | "homepage": "https://github.com/sebastianbergmann/php-text-template/", 1593 | "keywords": [ 1594 | "template" 1595 | ], 1596 | "support": { 1597 | "issues": "https://github.com/sebastianbergmann/php-text-template/issues", 1598 | "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" 1599 | }, 1600 | "funding": [ 1601 | { 1602 | "url": "https://github.com/sebastianbergmann", 1603 | "type": "github" 1604 | } 1605 | ], 1606 | "time": "2020-10-26T05:33:50+00:00" 1607 | }, 1608 | { 1609 | "name": "phpunit/php-timer", 1610 | "version": "5.0.3", 1611 | "source": { 1612 | "type": "git", 1613 | "url": "https://github.com/sebastianbergmann/php-timer.git", 1614 | "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" 1615 | }, 1616 | "dist": { 1617 | "type": "zip", 1618 | "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", 1619 | "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", 1620 | "shasum": "" 1621 | }, 1622 | "require": { 1623 | "php": ">=7.3" 1624 | }, 1625 | "require-dev": { 1626 | "phpunit/phpunit": "^9.3" 1627 | }, 1628 | "type": "library", 1629 | "extra": { 1630 | "branch-alias": { 1631 | "dev-master": "5.0-dev" 1632 | } 1633 | }, 1634 | "autoload": { 1635 | "classmap": [ 1636 | "src/" 1637 | ] 1638 | }, 1639 | "notification-url": "https://packagist.org/downloads/", 1640 | "license": [ 1641 | "BSD-3-Clause" 1642 | ], 1643 | "authors": [ 1644 | { 1645 | "name": "Sebastian Bergmann", 1646 | "email": "sebastian@phpunit.de", 1647 | "role": "lead" 1648 | } 1649 | ], 1650 | "description": "Utility class for timing", 1651 | "homepage": "https://github.com/sebastianbergmann/php-timer/", 1652 | "keywords": [ 1653 | "timer" 1654 | ], 1655 | "support": { 1656 | "issues": "https://github.com/sebastianbergmann/php-timer/issues", 1657 | "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" 1658 | }, 1659 | "funding": [ 1660 | { 1661 | "url": "https://github.com/sebastianbergmann", 1662 | "type": "github" 1663 | } 1664 | ], 1665 | "time": "2020-10-26T13:16:10+00:00" 1666 | }, 1667 | { 1668 | "name": "phpunit/phpunit", 1669 | "version": "9.5.8", 1670 | "source": { 1671 | "type": "git", 1672 | "url": "https://github.com/sebastianbergmann/phpunit.git", 1673 | "reference": "191768ccd5c85513b4068bdbe99bb6390c7d54fb" 1674 | }, 1675 | "dist": { 1676 | "type": "zip", 1677 | "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/191768ccd5c85513b4068bdbe99bb6390c7d54fb", 1678 | "reference": "191768ccd5c85513b4068bdbe99bb6390c7d54fb", 1679 | "shasum": "" 1680 | }, 1681 | "require": { 1682 | "doctrine/instantiator": "^1.3.1", 1683 | "ext-dom": "*", 1684 | "ext-json": "*", 1685 | "ext-libxml": "*", 1686 | "ext-mbstring": "*", 1687 | "ext-xml": "*", 1688 | "ext-xmlwriter": "*", 1689 | "myclabs/deep-copy": "^1.10.1", 1690 | "phar-io/manifest": "^2.0.3", 1691 | "phar-io/version": "^3.0.2", 1692 | "php": ">=7.3", 1693 | "phpspec/prophecy": "^1.12.1", 1694 | "phpunit/php-code-coverage": "^9.2.3", 1695 | "phpunit/php-file-iterator": "^3.0.5", 1696 | "phpunit/php-invoker": "^3.1.1", 1697 | "phpunit/php-text-template": "^2.0.3", 1698 | "phpunit/php-timer": "^5.0.2", 1699 | "sebastian/cli-parser": "^1.0.1", 1700 | "sebastian/code-unit": "^1.0.6", 1701 | "sebastian/comparator": "^4.0.5", 1702 | "sebastian/diff": "^4.0.3", 1703 | "sebastian/environment": "^5.1.3", 1704 | "sebastian/exporter": "^4.0.3", 1705 | "sebastian/global-state": "^5.0.1", 1706 | "sebastian/object-enumerator": "^4.0.3", 1707 | "sebastian/resource-operations": "^3.0.3", 1708 | "sebastian/type": "^2.3.4", 1709 | "sebastian/version": "^3.0.2" 1710 | }, 1711 | "require-dev": { 1712 | "ext-pdo": "*", 1713 | "phpspec/prophecy-phpunit": "^2.0.1" 1714 | }, 1715 | "suggest": { 1716 | "ext-soap": "*", 1717 | "ext-xdebug": "*" 1718 | }, 1719 | "bin": [ 1720 | "phpunit" 1721 | ], 1722 | "type": "library", 1723 | "extra": { 1724 | "branch-alias": { 1725 | "dev-master": "9.5-dev" 1726 | } 1727 | }, 1728 | "autoload": { 1729 | "classmap": [ 1730 | "src/" 1731 | ], 1732 | "files": [ 1733 | "src/Framework/Assert/Functions.php" 1734 | ] 1735 | }, 1736 | "notification-url": "https://packagist.org/downloads/", 1737 | "license": [ 1738 | "BSD-3-Clause" 1739 | ], 1740 | "authors": [ 1741 | { 1742 | "name": "Sebastian Bergmann", 1743 | "email": "sebastian@phpunit.de", 1744 | "role": "lead" 1745 | } 1746 | ], 1747 | "description": "The PHP Unit Testing framework.", 1748 | "homepage": "https://phpunit.de/", 1749 | "keywords": [ 1750 | "phpunit", 1751 | "testing", 1752 | "xunit" 1753 | ], 1754 | "support": { 1755 | "issues": "https://github.com/sebastianbergmann/phpunit/issues", 1756 | "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.8" 1757 | }, 1758 | "funding": [ 1759 | { 1760 | "url": "https://phpunit.de/donate.html", 1761 | "type": "custom" 1762 | }, 1763 | { 1764 | "url": "https://github.com/sebastianbergmann", 1765 | "type": "github" 1766 | } 1767 | ], 1768 | "time": "2021-07-31T15:17:34+00:00" 1769 | }, 1770 | { 1771 | "name": "sebastian/cli-parser", 1772 | "version": "1.0.1", 1773 | "source": { 1774 | "type": "git", 1775 | "url": "https://github.com/sebastianbergmann/cli-parser.git", 1776 | "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" 1777 | }, 1778 | "dist": { 1779 | "type": "zip", 1780 | "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", 1781 | "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", 1782 | "shasum": "" 1783 | }, 1784 | "require": { 1785 | "php": ">=7.3" 1786 | }, 1787 | "require-dev": { 1788 | "phpunit/phpunit": "^9.3" 1789 | }, 1790 | "type": "library", 1791 | "extra": { 1792 | "branch-alias": { 1793 | "dev-master": "1.0-dev" 1794 | } 1795 | }, 1796 | "autoload": { 1797 | "classmap": [ 1798 | "src/" 1799 | ] 1800 | }, 1801 | "notification-url": "https://packagist.org/downloads/", 1802 | "license": [ 1803 | "BSD-3-Clause" 1804 | ], 1805 | "authors": [ 1806 | { 1807 | "name": "Sebastian Bergmann", 1808 | "email": "sebastian@phpunit.de", 1809 | "role": "lead" 1810 | } 1811 | ], 1812 | "description": "Library for parsing CLI options", 1813 | "homepage": "https://github.com/sebastianbergmann/cli-parser", 1814 | "support": { 1815 | "issues": "https://github.com/sebastianbergmann/cli-parser/issues", 1816 | "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" 1817 | }, 1818 | "funding": [ 1819 | { 1820 | "url": "https://github.com/sebastianbergmann", 1821 | "type": "github" 1822 | } 1823 | ], 1824 | "time": "2020-09-28T06:08:49+00:00" 1825 | }, 1826 | { 1827 | "name": "sebastian/code-unit", 1828 | "version": "1.0.8", 1829 | "source": { 1830 | "type": "git", 1831 | "url": "https://github.com/sebastianbergmann/code-unit.git", 1832 | "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" 1833 | }, 1834 | "dist": { 1835 | "type": "zip", 1836 | "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", 1837 | "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", 1838 | "shasum": "" 1839 | }, 1840 | "require": { 1841 | "php": ">=7.3" 1842 | }, 1843 | "require-dev": { 1844 | "phpunit/phpunit": "^9.3" 1845 | }, 1846 | "type": "library", 1847 | "extra": { 1848 | "branch-alias": { 1849 | "dev-master": "1.0-dev" 1850 | } 1851 | }, 1852 | "autoload": { 1853 | "classmap": [ 1854 | "src/" 1855 | ] 1856 | }, 1857 | "notification-url": "https://packagist.org/downloads/", 1858 | "license": [ 1859 | "BSD-3-Clause" 1860 | ], 1861 | "authors": [ 1862 | { 1863 | "name": "Sebastian Bergmann", 1864 | "email": "sebastian@phpunit.de", 1865 | "role": "lead" 1866 | } 1867 | ], 1868 | "description": "Collection of value objects that represent the PHP code units", 1869 | "homepage": "https://github.com/sebastianbergmann/code-unit", 1870 | "support": { 1871 | "issues": "https://github.com/sebastianbergmann/code-unit/issues", 1872 | "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" 1873 | }, 1874 | "funding": [ 1875 | { 1876 | "url": "https://github.com/sebastianbergmann", 1877 | "type": "github" 1878 | } 1879 | ], 1880 | "time": "2020-10-26T13:08:54+00:00" 1881 | }, 1882 | { 1883 | "name": "sebastian/code-unit-reverse-lookup", 1884 | "version": "2.0.3", 1885 | "source": { 1886 | "type": "git", 1887 | "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", 1888 | "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" 1889 | }, 1890 | "dist": { 1891 | "type": "zip", 1892 | "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", 1893 | "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", 1894 | "shasum": "" 1895 | }, 1896 | "require": { 1897 | "php": ">=7.3" 1898 | }, 1899 | "require-dev": { 1900 | "phpunit/phpunit": "^9.3" 1901 | }, 1902 | "type": "library", 1903 | "extra": { 1904 | "branch-alias": { 1905 | "dev-master": "2.0-dev" 1906 | } 1907 | }, 1908 | "autoload": { 1909 | "classmap": [ 1910 | "src/" 1911 | ] 1912 | }, 1913 | "notification-url": "https://packagist.org/downloads/", 1914 | "license": [ 1915 | "BSD-3-Clause" 1916 | ], 1917 | "authors": [ 1918 | { 1919 | "name": "Sebastian Bergmann", 1920 | "email": "sebastian@phpunit.de" 1921 | } 1922 | ], 1923 | "description": "Looks up which function or method a line of code belongs to", 1924 | "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", 1925 | "support": { 1926 | "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", 1927 | "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" 1928 | }, 1929 | "funding": [ 1930 | { 1931 | "url": "https://github.com/sebastianbergmann", 1932 | "type": "github" 1933 | } 1934 | ], 1935 | "time": "2020-09-28T05:30:19+00:00" 1936 | }, 1937 | { 1938 | "name": "sebastian/comparator", 1939 | "version": "4.0.6", 1940 | "source": { 1941 | "type": "git", 1942 | "url": "https://github.com/sebastianbergmann/comparator.git", 1943 | "reference": "55f4261989e546dc112258c7a75935a81a7ce382" 1944 | }, 1945 | "dist": { 1946 | "type": "zip", 1947 | "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", 1948 | "reference": "55f4261989e546dc112258c7a75935a81a7ce382", 1949 | "shasum": "" 1950 | }, 1951 | "require": { 1952 | "php": ">=7.3", 1953 | "sebastian/diff": "^4.0", 1954 | "sebastian/exporter": "^4.0" 1955 | }, 1956 | "require-dev": { 1957 | "phpunit/phpunit": "^9.3" 1958 | }, 1959 | "type": "library", 1960 | "extra": { 1961 | "branch-alias": { 1962 | "dev-master": "4.0-dev" 1963 | } 1964 | }, 1965 | "autoload": { 1966 | "classmap": [ 1967 | "src/" 1968 | ] 1969 | }, 1970 | "notification-url": "https://packagist.org/downloads/", 1971 | "license": [ 1972 | "BSD-3-Clause" 1973 | ], 1974 | "authors": [ 1975 | { 1976 | "name": "Sebastian Bergmann", 1977 | "email": "sebastian@phpunit.de" 1978 | }, 1979 | { 1980 | "name": "Jeff Welch", 1981 | "email": "whatthejeff@gmail.com" 1982 | }, 1983 | { 1984 | "name": "Volker Dusch", 1985 | "email": "github@wallbash.com" 1986 | }, 1987 | { 1988 | "name": "Bernhard Schussek", 1989 | "email": "bschussek@2bepublished.at" 1990 | } 1991 | ], 1992 | "description": "Provides the functionality to compare PHP values for equality", 1993 | "homepage": "https://github.com/sebastianbergmann/comparator", 1994 | "keywords": [ 1995 | "comparator", 1996 | "compare", 1997 | "equality" 1998 | ], 1999 | "support": { 2000 | "issues": "https://github.com/sebastianbergmann/comparator/issues", 2001 | "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" 2002 | }, 2003 | "funding": [ 2004 | { 2005 | "url": "https://github.com/sebastianbergmann", 2006 | "type": "github" 2007 | } 2008 | ], 2009 | "time": "2020-10-26T15:49:45+00:00" 2010 | }, 2011 | { 2012 | "name": "sebastian/complexity", 2013 | "version": "2.0.2", 2014 | "source": { 2015 | "type": "git", 2016 | "url": "https://github.com/sebastianbergmann/complexity.git", 2017 | "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" 2018 | }, 2019 | "dist": { 2020 | "type": "zip", 2021 | "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", 2022 | "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", 2023 | "shasum": "" 2024 | }, 2025 | "require": { 2026 | "nikic/php-parser": "^4.7", 2027 | "php": ">=7.3" 2028 | }, 2029 | "require-dev": { 2030 | "phpunit/phpunit": "^9.3" 2031 | }, 2032 | "type": "library", 2033 | "extra": { 2034 | "branch-alias": { 2035 | "dev-master": "2.0-dev" 2036 | } 2037 | }, 2038 | "autoload": { 2039 | "classmap": [ 2040 | "src/" 2041 | ] 2042 | }, 2043 | "notification-url": "https://packagist.org/downloads/", 2044 | "license": [ 2045 | "BSD-3-Clause" 2046 | ], 2047 | "authors": [ 2048 | { 2049 | "name": "Sebastian Bergmann", 2050 | "email": "sebastian@phpunit.de", 2051 | "role": "lead" 2052 | } 2053 | ], 2054 | "description": "Library for calculating the complexity of PHP code units", 2055 | "homepage": "https://github.com/sebastianbergmann/complexity", 2056 | "support": { 2057 | "issues": "https://github.com/sebastianbergmann/complexity/issues", 2058 | "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" 2059 | }, 2060 | "funding": [ 2061 | { 2062 | "url": "https://github.com/sebastianbergmann", 2063 | "type": "github" 2064 | } 2065 | ], 2066 | "time": "2020-10-26T15:52:27+00:00" 2067 | }, 2068 | { 2069 | "name": "sebastian/diff", 2070 | "version": "4.0.4", 2071 | "source": { 2072 | "type": "git", 2073 | "url": "https://github.com/sebastianbergmann/diff.git", 2074 | "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" 2075 | }, 2076 | "dist": { 2077 | "type": "zip", 2078 | "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", 2079 | "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", 2080 | "shasum": "" 2081 | }, 2082 | "require": { 2083 | "php": ">=7.3" 2084 | }, 2085 | "require-dev": { 2086 | "phpunit/phpunit": "^9.3", 2087 | "symfony/process": "^4.2 || ^5" 2088 | }, 2089 | "type": "library", 2090 | "extra": { 2091 | "branch-alias": { 2092 | "dev-master": "4.0-dev" 2093 | } 2094 | }, 2095 | "autoload": { 2096 | "classmap": [ 2097 | "src/" 2098 | ] 2099 | }, 2100 | "notification-url": "https://packagist.org/downloads/", 2101 | "license": [ 2102 | "BSD-3-Clause" 2103 | ], 2104 | "authors": [ 2105 | { 2106 | "name": "Sebastian Bergmann", 2107 | "email": "sebastian@phpunit.de" 2108 | }, 2109 | { 2110 | "name": "Kore Nordmann", 2111 | "email": "mail@kore-nordmann.de" 2112 | } 2113 | ], 2114 | "description": "Diff implementation", 2115 | "homepage": "https://github.com/sebastianbergmann/diff", 2116 | "keywords": [ 2117 | "diff", 2118 | "udiff", 2119 | "unidiff", 2120 | "unified diff" 2121 | ], 2122 | "support": { 2123 | "issues": "https://github.com/sebastianbergmann/diff/issues", 2124 | "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" 2125 | }, 2126 | "funding": [ 2127 | { 2128 | "url": "https://github.com/sebastianbergmann", 2129 | "type": "github" 2130 | } 2131 | ], 2132 | "time": "2020-10-26T13:10:38+00:00" 2133 | }, 2134 | { 2135 | "name": "sebastian/environment", 2136 | "version": "5.1.3", 2137 | "source": { 2138 | "type": "git", 2139 | "url": "https://github.com/sebastianbergmann/environment.git", 2140 | "reference": "388b6ced16caa751030f6a69e588299fa09200ac" 2141 | }, 2142 | "dist": { 2143 | "type": "zip", 2144 | "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", 2145 | "reference": "388b6ced16caa751030f6a69e588299fa09200ac", 2146 | "shasum": "" 2147 | }, 2148 | "require": { 2149 | "php": ">=7.3" 2150 | }, 2151 | "require-dev": { 2152 | "phpunit/phpunit": "^9.3" 2153 | }, 2154 | "suggest": { 2155 | "ext-posix": "*" 2156 | }, 2157 | "type": "library", 2158 | "extra": { 2159 | "branch-alias": { 2160 | "dev-master": "5.1-dev" 2161 | } 2162 | }, 2163 | "autoload": { 2164 | "classmap": [ 2165 | "src/" 2166 | ] 2167 | }, 2168 | "notification-url": "https://packagist.org/downloads/", 2169 | "license": [ 2170 | "BSD-3-Clause" 2171 | ], 2172 | "authors": [ 2173 | { 2174 | "name": "Sebastian Bergmann", 2175 | "email": "sebastian@phpunit.de" 2176 | } 2177 | ], 2178 | "description": "Provides functionality to handle HHVM/PHP environments", 2179 | "homepage": "http://www.github.com/sebastianbergmann/environment", 2180 | "keywords": [ 2181 | "Xdebug", 2182 | "environment", 2183 | "hhvm" 2184 | ], 2185 | "support": { 2186 | "issues": "https://github.com/sebastianbergmann/environment/issues", 2187 | "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" 2188 | }, 2189 | "funding": [ 2190 | { 2191 | "url": "https://github.com/sebastianbergmann", 2192 | "type": "github" 2193 | } 2194 | ], 2195 | "time": "2020-09-28T05:52:38+00:00" 2196 | }, 2197 | { 2198 | "name": "sebastian/exporter", 2199 | "version": "4.0.3", 2200 | "source": { 2201 | "type": "git", 2202 | "url": "https://github.com/sebastianbergmann/exporter.git", 2203 | "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65" 2204 | }, 2205 | "dist": { 2206 | "type": "zip", 2207 | "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65", 2208 | "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65", 2209 | "shasum": "" 2210 | }, 2211 | "require": { 2212 | "php": ">=7.3", 2213 | "sebastian/recursion-context": "^4.0" 2214 | }, 2215 | "require-dev": { 2216 | "ext-mbstring": "*", 2217 | "phpunit/phpunit": "^9.3" 2218 | }, 2219 | "type": "library", 2220 | "extra": { 2221 | "branch-alias": { 2222 | "dev-master": "4.0-dev" 2223 | } 2224 | }, 2225 | "autoload": { 2226 | "classmap": [ 2227 | "src/" 2228 | ] 2229 | }, 2230 | "notification-url": "https://packagist.org/downloads/", 2231 | "license": [ 2232 | "BSD-3-Clause" 2233 | ], 2234 | "authors": [ 2235 | { 2236 | "name": "Sebastian Bergmann", 2237 | "email": "sebastian@phpunit.de" 2238 | }, 2239 | { 2240 | "name": "Jeff Welch", 2241 | "email": "whatthejeff@gmail.com" 2242 | }, 2243 | { 2244 | "name": "Volker Dusch", 2245 | "email": "github@wallbash.com" 2246 | }, 2247 | { 2248 | "name": "Adam Harvey", 2249 | "email": "aharvey@php.net" 2250 | }, 2251 | { 2252 | "name": "Bernhard Schussek", 2253 | "email": "bschussek@gmail.com" 2254 | } 2255 | ], 2256 | "description": "Provides the functionality to export PHP variables for visualization", 2257 | "homepage": "http://www.github.com/sebastianbergmann/exporter", 2258 | "keywords": [ 2259 | "export", 2260 | "exporter" 2261 | ], 2262 | "support": { 2263 | "issues": "https://github.com/sebastianbergmann/exporter/issues", 2264 | "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3" 2265 | }, 2266 | "funding": [ 2267 | { 2268 | "url": "https://github.com/sebastianbergmann", 2269 | "type": "github" 2270 | } 2271 | ], 2272 | "time": "2020-09-28T05:24:23+00:00" 2273 | }, 2274 | { 2275 | "name": "sebastian/global-state", 2276 | "version": "5.0.3", 2277 | "source": { 2278 | "type": "git", 2279 | "url": "https://github.com/sebastianbergmann/global-state.git", 2280 | "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49" 2281 | }, 2282 | "dist": { 2283 | "type": "zip", 2284 | "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/23bd5951f7ff26f12d4e3242864df3e08dec4e49", 2285 | "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49", 2286 | "shasum": "" 2287 | }, 2288 | "require": { 2289 | "php": ">=7.3", 2290 | "sebastian/object-reflector": "^2.0", 2291 | "sebastian/recursion-context": "^4.0" 2292 | }, 2293 | "require-dev": { 2294 | "ext-dom": "*", 2295 | "phpunit/phpunit": "^9.3" 2296 | }, 2297 | "suggest": { 2298 | "ext-uopz": "*" 2299 | }, 2300 | "type": "library", 2301 | "extra": { 2302 | "branch-alias": { 2303 | "dev-master": "5.0-dev" 2304 | } 2305 | }, 2306 | "autoload": { 2307 | "classmap": [ 2308 | "src/" 2309 | ] 2310 | }, 2311 | "notification-url": "https://packagist.org/downloads/", 2312 | "license": [ 2313 | "BSD-3-Clause" 2314 | ], 2315 | "authors": [ 2316 | { 2317 | "name": "Sebastian Bergmann", 2318 | "email": "sebastian@phpunit.de" 2319 | } 2320 | ], 2321 | "description": "Snapshotting of global state", 2322 | "homepage": "http://www.github.com/sebastianbergmann/global-state", 2323 | "keywords": [ 2324 | "global state" 2325 | ], 2326 | "support": { 2327 | "issues": "https://github.com/sebastianbergmann/global-state/issues", 2328 | "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.3" 2329 | }, 2330 | "funding": [ 2331 | { 2332 | "url": "https://github.com/sebastianbergmann", 2333 | "type": "github" 2334 | } 2335 | ], 2336 | "time": "2021-06-11T13:31:12+00:00" 2337 | }, 2338 | { 2339 | "name": "sebastian/lines-of-code", 2340 | "version": "1.0.3", 2341 | "source": { 2342 | "type": "git", 2343 | "url": "https://github.com/sebastianbergmann/lines-of-code.git", 2344 | "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" 2345 | }, 2346 | "dist": { 2347 | "type": "zip", 2348 | "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", 2349 | "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", 2350 | "shasum": "" 2351 | }, 2352 | "require": { 2353 | "nikic/php-parser": "^4.6", 2354 | "php": ">=7.3" 2355 | }, 2356 | "require-dev": { 2357 | "phpunit/phpunit": "^9.3" 2358 | }, 2359 | "type": "library", 2360 | "extra": { 2361 | "branch-alias": { 2362 | "dev-master": "1.0-dev" 2363 | } 2364 | }, 2365 | "autoload": { 2366 | "classmap": [ 2367 | "src/" 2368 | ] 2369 | }, 2370 | "notification-url": "https://packagist.org/downloads/", 2371 | "license": [ 2372 | "BSD-3-Clause" 2373 | ], 2374 | "authors": [ 2375 | { 2376 | "name": "Sebastian Bergmann", 2377 | "email": "sebastian@phpunit.de", 2378 | "role": "lead" 2379 | } 2380 | ], 2381 | "description": "Library for counting the lines of code in PHP source code", 2382 | "homepage": "https://github.com/sebastianbergmann/lines-of-code", 2383 | "support": { 2384 | "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", 2385 | "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" 2386 | }, 2387 | "funding": [ 2388 | { 2389 | "url": "https://github.com/sebastianbergmann", 2390 | "type": "github" 2391 | } 2392 | ], 2393 | "time": "2020-11-28T06:42:11+00:00" 2394 | }, 2395 | { 2396 | "name": "sebastian/object-enumerator", 2397 | "version": "4.0.4", 2398 | "source": { 2399 | "type": "git", 2400 | "url": "https://github.com/sebastianbergmann/object-enumerator.git", 2401 | "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" 2402 | }, 2403 | "dist": { 2404 | "type": "zip", 2405 | "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", 2406 | "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", 2407 | "shasum": "" 2408 | }, 2409 | "require": { 2410 | "php": ">=7.3", 2411 | "sebastian/object-reflector": "^2.0", 2412 | "sebastian/recursion-context": "^4.0" 2413 | }, 2414 | "require-dev": { 2415 | "phpunit/phpunit": "^9.3" 2416 | }, 2417 | "type": "library", 2418 | "extra": { 2419 | "branch-alias": { 2420 | "dev-master": "4.0-dev" 2421 | } 2422 | }, 2423 | "autoload": { 2424 | "classmap": [ 2425 | "src/" 2426 | ] 2427 | }, 2428 | "notification-url": "https://packagist.org/downloads/", 2429 | "license": [ 2430 | "BSD-3-Clause" 2431 | ], 2432 | "authors": [ 2433 | { 2434 | "name": "Sebastian Bergmann", 2435 | "email": "sebastian@phpunit.de" 2436 | } 2437 | ], 2438 | "description": "Traverses array structures and object graphs to enumerate all referenced objects", 2439 | "homepage": "https://github.com/sebastianbergmann/object-enumerator/", 2440 | "support": { 2441 | "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", 2442 | "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" 2443 | }, 2444 | "funding": [ 2445 | { 2446 | "url": "https://github.com/sebastianbergmann", 2447 | "type": "github" 2448 | } 2449 | ], 2450 | "time": "2020-10-26T13:12:34+00:00" 2451 | }, 2452 | { 2453 | "name": "sebastian/object-reflector", 2454 | "version": "2.0.4", 2455 | "source": { 2456 | "type": "git", 2457 | "url": "https://github.com/sebastianbergmann/object-reflector.git", 2458 | "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" 2459 | }, 2460 | "dist": { 2461 | "type": "zip", 2462 | "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", 2463 | "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", 2464 | "shasum": "" 2465 | }, 2466 | "require": { 2467 | "php": ">=7.3" 2468 | }, 2469 | "require-dev": { 2470 | "phpunit/phpunit": "^9.3" 2471 | }, 2472 | "type": "library", 2473 | "extra": { 2474 | "branch-alias": { 2475 | "dev-master": "2.0-dev" 2476 | } 2477 | }, 2478 | "autoload": { 2479 | "classmap": [ 2480 | "src/" 2481 | ] 2482 | }, 2483 | "notification-url": "https://packagist.org/downloads/", 2484 | "license": [ 2485 | "BSD-3-Clause" 2486 | ], 2487 | "authors": [ 2488 | { 2489 | "name": "Sebastian Bergmann", 2490 | "email": "sebastian@phpunit.de" 2491 | } 2492 | ], 2493 | "description": "Allows reflection of object attributes, including inherited and non-public ones", 2494 | "homepage": "https://github.com/sebastianbergmann/object-reflector/", 2495 | "support": { 2496 | "issues": "https://github.com/sebastianbergmann/object-reflector/issues", 2497 | "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" 2498 | }, 2499 | "funding": [ 2500 | { 2501 | "url": "https://github.com/sebastianbergmann", 2502 | "type": "github" 2503 | } 2504 | ], 2505 | "time": "2020-10-26T13:14:26+00:00" 2506 | }, 2507 | { 2508 | "name": "sebastian/recursion-context", 2509 | "version": "4.0.4", 2510 | "source": { 2511 | "type": "git", 2512 | "url": "https://github.com/sebastianbergmann/recursion-context.git", 2513 | "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" 2514 | }, 2515 | "dist": { 2516 | "type": "zip", 2517 | "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", 2518 | "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", 2519 | "shasum": "" 2520 | }, 2521 | "require": { 2522 | "php": ">=7.3" 2523 | }, 2524 | "require-dev": { 2525 | "phpunit/phpunit": "^9.3" 2526 | }, 2527 | "type": "library", 2528 | "extra": { 2529 | "branch-alias": { 2530 | "dev-master": "4.0-dev" 2531 | } 2532 | }, 2533 | "autoload": { 2534 | "classmap": [ 2535 | "src/" 2536 | ] 2537 | }, 2538 | "notification-url": "https://packagist.org/downloads/", 2539 | "license": [ 2540 | "BSD-3-Clause" 2541 | ], 2542 | "authors": [ 2543 | { 2544 | "name": "Sebastian Bergmann", 2545 | "email": "sebastian@phpunit.de" 2546 | }, 2547 | { 2548 | "name": "Jeff Welch", 2549 | "email": "whatthejeff@gmail.com" 2550 | }, 2551 | { 2552 | "name": "Adam Harvey", 2553 | "email": "aharvey@php.net" 2554 | } 2555 | ], 2556 | "description": "Provides functionality to recursively process PHP variables", 2557 | "homepage": "http://www.github.com/sebastianbergmann/recursion-context", 2558 | "support": { 2559 | "issues": "https://github.com/sebastianbergmann/recursion-context/issues", 2560 | "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" 2561 | }, 2562 | "funding": [ 2563 | { 2564 | "url": "https://github.com/sebastianbergmann", 2565 | "type": "github" 2566 | } 2567 | ], 2568 | "time": "2020-10-26T13:17:30+00:00" 2569 | }, 2570 | { 2571 | "name": "sebastian/resource-operations", 2572 | "version": "3.0.3", 2573 | "source": { 2574 | "type": "git", 2575 | "url": "https://github.com/sebastianbergmann/resource-operations.git", 2576 | "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" 2577 | }, 2578 | "dist": { 2579 | "type": "zip", 2580 | "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", 2581 | "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", 2582 | "shasum": "" 2583 | }, 2584 | "require": { 2585 | "php": ">=7.3" 2586 | }, 2587 | "require-dev": { 2588 | "phpunit/phpunit": "^9.0" 2589 | }, 2590 | "type": "library", 2591 | "extra": { 2592 | "branch-alias": { 2593 | "dev-master": "3.0-dev" 2594 | } 2595 | }, 2596 | "autoload": { 2597 | "classmap": [ 2598 | "src/" 2599 | ] 2600 | }, 2601 | "notification-url": "https://packagist.org/downloads/", 2602 | "license": [ 2603 | "BSD-3-Clause" 2604 | ], 2605 | "authors": [ 2606 | { 2607 | "name": "Sebastian Bergmann", 2608 | "email": "sebastian@phpunit.de" 2609 | } 2610 | ], 2611 | "description": "Provides a list of PHP built-in functions that operate on resources", 2612 | "homepage": "https://www.github.com/sebastianbergmann/resource-operations", 2613 | "support": { 2614 | "issues": "https://github.com/sebastianbergmann/resource-operations/issues", 2615 | "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" 2616 | }, 2617 | "funding": [ 2618 | { 2619 | "url": "https://github.com/sebastianbergmann", 2620 | "type": "github" 2621 | } 2622 | ], 2623 | "time": "2020-09-28T06:45:17+00:00" 2624 | }, 2625 | { 2626 | "name": "sebastian/type", 2627 | "version": "2.3.4", 2628 | "source": { 2629 | "type": "git", 2630 | "url": "https://github.com/sebastianbergmann/type.git", 2631 | "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914" 2632 | }, 2633 | "dist": { 2634 | "type": "zip", 2635 | "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914", 2636 | "reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914", 2637 | "shasum": "" 2638 | }, 2639 | "require": { 2640 | "php": ">=7.3" 2641 | }, 2642 | "require-dev": { 2643 | "phpunit/phpunit": "^9.3" 2644 | }, 2645 | "type": "library", 2646 | "extra": { 2647 | "branch-alias": { 2648 | "dev-master": "2.3-dev" 2649 | } 2650 | }, 2651 | "autoload": { 2652 | "classmap": [ 2653 | "src/" 2654 | ] 2655 | }, 2656 | "notification-url": "https://packagist.org/downloads/", 2657 | "license": [ 2658 | "BSD-3-Clause" 2659 | ], 2660 | "authors": [ 2661 | { 2662 | "name": "Sebastian Bergmann", 2663 | "email": "sebastian@phpunit.de", 2664 | "role": "lead" 2665 | } 2666 | ], 2667 | "description": "Collection of value objects that represent the types of the PHP type system", 2668 | "homepage": "https://github.com/sebastianbergmann/type", 2669 | "support": { 2670 | "issues": "https://github.com/sebastianbergmann/type/issues", 2671 | "source": "https://github.com/sebastianbergmann/type/tree/2.3.4" 2672 | }, 2673 | "funding": [ 2674 | { 2675 | "url": "https://github.com/sebastianbergmann", 2676 | "type": "github" 2677 | } 2678 | ], 2679 | "time": "2021-06-15T12:49:02+00:00" 2680 | }, 2681 | { 2682 | "name": "sebastian/version", 2683 | "version": "3.0.2", 2684 | "source": { 2685 | "type": "git", 2686 | "url": "https://github.com/sebastianbergmann/version.git", 2687 | "reference": "c6c1022351a901512170118436c764e473f6de8c" 2688 | }, 2689 | "dist": { 2690 | "type": "zip", 2691 | "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", 2692 | "reference": "c6c1022351a901512170118436c764e473f6de8c", 2693 | "shasum": "" 2694 | }, 2695 | "require": { 2696 | "php": ">=7.3" 2697 | }, 2698 | "type": "library", 2699 | "extra": { 2700 | "branch-alias": { 2701 | "dev-master": "3.0-dev" 2702 | } 2703 | }, 2704 | "autoload": { 2705 | "classmap": [ 2706 | "src/" 2707 | ] 2708 | }, 2709 | "notification-url": "https://packagist.org/downloads/", 2710 | "license": [ 2711 | "BSD-3-Clause" 2712 | ], 2713 | "authors": [ 2714 | { 2715 | "name": "Sebastian Bergmann", 2716 | "email": "sebastian@phpunit.de", 2717 | "role": "lead" 2718 | } 2719 | ], 2720 | "description": "Library that helps with managing the version number of Git-hosted PHP projects", 2721 | "homepage": "https://github.com/sebastianbergmann/version", 2722 | "support": { 2723 | "issues": "https://github.com/sebastianbergmann/version/issues", 2724 | "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" 2725 | }, 2726 | "funding": [ 2727 | { 2728 | "url": "https://github.com/sebastianbergmann", 2729 | "type": "github" 2730 | } 2731 | ], 2732 | "time": "2020-09-28T06:39:44+00:00" 2733 | }, 2734 | { 2735 | "name": "symfony/polyfill-ctype", 2736 | "version": "v1.23.0", 2737 | "source": { 2738 | "type": "git", 2739 | "url": "https://github.com/symfony/polyfill-ctype.git", 2740 | "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" 2741 | }, 2742 | "dist": { 2743 | "type": "zip", 2744 | "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", 2745 | "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", 2746 | "shasum": "" 2747 | }, 2748 | "require": { 2749 | "php": ">=7.1" 2750 | }, 2751 | "suggest": { 2752 | "ext-ctype": "For best performance" 2753 | }, 2754 | "type": "library", 2755 | "extra": { 2756 | "branch-alias": { 2757 | "dev-main": "1.23-dev" 2758 | }, 2759 | "thanks": { 2760 | "name": "symfony/polyfill", 2761 | "url": "https://github.com/symfony/polyfill" 2762 | } 2763 | }, 2764 | "autoload": { 2765 | "psr-4": { 2766 | "Symfony\\Polyfill\\Ctype\\": "" 2767 | }, 2768 | "files": [ 2769 | "bootstrap.php" 2770 | ] 2771 | }, 2772 | "notification-url": "https://packagist.org/downloads/", 2773 | "license": [ 2774 | "MIT" 2775 | ], 2776 | "authors": [ 2777 | { 2778 | "name": "Gert de Pagter", 2779 | "email": "BackEndTea@gmail.com" 2780 | }, 2781 | { 2782 | "name": "Symfony Community", 2783 | "homepage": "https://symfony.com/contributors" 2784 | } 2785 | ], 2786 | "description": "Symfony polyfill for ctype functions", 2787 | "homepage": "https://symfony.com", 2788 | "keywords": [ 2789 | "compatibility", 2790 | "ctype", 2791 | "polyfill", 2792 | "portable" 2793 | ], 2794 | "support": { 2795 | "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" 2796 | }, 2797 | "funding": [ 2798 | { 2799 | "url": "https://symfony.com/sponsor", 2800 | "type": "custom" 2801 | }, 2802 | { 2803 | "url": "https://github.com/fabpot", 2804 | "type": "github" 2805 | }, 2806 | { 2807 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 2808 | "type": "tidelift" 2809 | } 2810 | ], 2811 | "time": "2021-02-19T12:13:01+00:00" 2812 | }, 2813 | { 2814 | "name": "theseer/tokenizer", 2815 | "version": "1.2.1", 2816 | "source": { 2817 | "type": "git", 2818 | "url": "https://github.com/theseer/tokenizer.git", 2819 | "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" 2820 | }, 2821 | "dist": { 2822 | "type": "zip", 2823 | "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", 2824 | "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", 2825 | "shasum": "" 2826 | }, 2827 | "require": { 2828 | "ext-dom": "*", 2829 | "ext-tokenizer": "*", 2830 | "ext-xmlwriter": "*", 2831 | "php": "^7.2 || ^8.0" 2832 | }, 2833 | "type": "library", 2834 | "autoload": { 2835 | "classmap": [ 2836 | "src/" 2837 | ] 2838 | }, 2839 | "notification-url": "https://packagist.org/downloads/", 2840 | "license": [ 2841 | "BSD-3-Clause" 2842 | ], 2843 | "authors": [ 2844 | { 2845 | "name": "Arne Blankerts", 2846 | "email": "arne@blankerts.de", 2847 | "role": "Developer" 2848 | } 2849 | ], 2850 | "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", 2851 | "support": { 2852 | "issues": "https://github.com/theseer/tokenizer/issues", 2853 | "source": "https://github.com/theseer/tokenizer/tree/1.2.1" 2854 | }, 2855 | "funding": [ 2856 | { 2857 | "url": "https://github.com/theseer", 2858 | "type": "github" 2859 | } 2860 | ], 2861 | "time": "2021-07-28T10:34:58+00:00" 2862 | }, 2863 | { 2864 | "name": "webmozart/assert", 2865 | "version": "1.10.0", 2866 | "source": { 2867 | "type": "git", 2868 | "url": "https://github.com/webmozarts/assert.git", 2869 | "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" 2870 | }, 2871 | "dist": { 2872 | "type": "zip", 2873 | "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", 2874 | "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", 2875 | "shasum": "" 2876 | }, 2877 | "require": { 2878 | "php": "^7.2 || ^8.0", 2879 | "symfony/polyfill-ctype": "^1.8" 2880 | }, 2881 | "conflict": { 2882 | "phpstan/phpstan": "<0.12.20", 2883 | "vimeo/psalm": "<4.6.1 || 4.6.2" 2884 | }, 2885 | "require-dev": { 2886 | "phpunit/phpunit": "^8.5.13" 2887 | }, 2888 | "type": "library", 2889 | "extra": { 2890 | "branch-alias": { 2891 | "dev-master": "1.10-dev" 2892 | } 2893 | }, 2894 | "autoload": { 2895 | "psr-4": { 2896 | "Webmozart\\Assert\\": "src/" 2897 | } 2898 | }, 2899 | "notification-url": "https://packagist.org/downloads/", 2900 | "license": [ 2901 | "MIT" 2902 | ], 2903 | "authors": [ 2904 | { 2905 | "name": "Bernhard Schussek", 2906 | "email": "bschussek@gmail.com" 2907 | } 2908 | ], 2909 | "description": "Assertions to validate method input/output with nice error messages.", 2910 | "keywords": [ 2911 | "assert", 2912 | "check", 2913 | "validate" 2914 | ], 2915 | "support": { 2916 | "issues": "https://github.com/webmozarts/assert/issues", 2917 | "source": "https://github.com/webmozarts/assert/tree/1.10.0" 2918 | }, 2919 | "time": "2021-03-09T10:59:23+00:00" 2920 | } 2921 | ], 2922 | "aliases": [], 2923 | "minimum-stability": "stable", 2924 | "stability-flags": [], 2925 | "prefer-stable": false, 2926 | "prefer-lowest": false, 2927 | "platform": { 2928 | "php": ">=7.3" 2929 | }, 2930 | "platform-dev": [], 2931 | "plugin-api-version": "2.0.0" 2932 | } 2933 | -------------------------------------------------------------------------------- /config/app.php: -------------------------------------------------------------------------------- 1 | [ 9 | 'routes' => require 'route.php', 10 | 'cache' => true 11 | ], 12 | 'error' => [ 13 | '404' => Error404::class, 14 | '405' => Error405::class 15 | ], 16 | 'bootstrap' => function(ContainerInterface $c) { 17 | // Put here the code to bootstrap, if any 18 | // e.g. a database or ORM initialization 19 | } 20 | ]; -------------------------------------------------------------------------------- /config/container.php: -------------------------------------------------------------------------------- 1 | 'src/View', 7 | Engine::class => function(ContainerInterface $c) { 8 | return new Engine($c->get('view_path')); 9 | }, 10 | 'authentication' => [ 11 | 'username' => 'test', 12 | 'password' => 'password' 13 | ] 14 | ]; 15 | -------------------------------------------------------------------------------- /config/route.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | src 6 | 7 | 8 | 9 | 10 | ./tests 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | addDefinitions('config/container.php'); 12 | $container = $builder->build(); 13 | 14 | $app = new App($container, require 'config/app.php'); 15 | $app->bootstrap(); 16 | $app->dispatch(); -------------------------------------------------------------------------------- /src/App.php: -------------------------------------------------------------------------------- 1 | startTime = microtime(true); 71 | $this->container = $container; 72 | $this->config = $config; 73 | $this->logger = $logger ?? new NullLogger(); 74 | 75 | // Routing initialization 76 | if (!isset($config['routing']['routes'])) { 77 | throw new InvalidConfigException('You need to specify a [\'routing\'][\'routes\'] value in configuration'); 78 | } 79 | $this->dispatcher = cachedDispatcher(function(RouteCollector $r) use ($config) { 80 | foreach ($config['routing']['routes'] as $route) { 81 | $r->addRoute($route[0], $route[1], $route[2]); 82 | } 83 | }, [ 84 | 'cacheFile' => static::ROUTE_CACHE_FILE, 85 | 'cacheDisabled' => !$config['routing']['cache'] ?? false 86 | ]); 87 | 88 | $f = new Psr17Factory(); 89 | $this->request = (new ServerRequestCreator($f, $f, $f, $f))->fromGlobals(); 90 | 91 | $this->logger->info(sprintf( 92 | "Request: %s %s", 93 | $this->request->getMethod(), 94 | $this->request->getUri()->getPath() 95 | )); 96 | } 97 | 98 | /** 99 | * @return mixed[] 100 | */ 101 | public function getConfig(): array 102 | { 103 | return $this->config; 104 | } 105 | 106 | public function getRequest(): ServerRequestInterface 107 | { 108 | return $this->request; 109 | } 110 | 111 | public function getContainer(): ContainerInterface 112 | { 113 | return $this->container; 114 | } 115 | 116 | public function getLogger(): LoggerInterface 117 | { 118 | return $this->logger; 119 | } 120 | 121 | public function bootstrap(): void 122 | { 123 | // Initialize custom bootstrap, if any 124 | $bootstrap = $this->config['bootstrap'] ?? null; 125 | if (null !== $bootstrap && !is_callable($bootstrap)) { 126 | throw new InvalidConfigException('The bootstrap config value must be a callable!'); 127 | } 128 | if (null !== $bootstrap) { 129 | $start = microtime(true); 130 | $bootstrap($this->container); 131 | $this->logger->info(sprintf("Bootstrap execution: %.3f sec", microtime(true) - $start)); 132 | } 133 | } 134 | 135 | public function dispatch(): void 136 | { 137 | $routeInfo = $this->dispatcher->dispatch( 138 | $this->request->getMethod(), 139 | $this->request->getUri()->getPath() 140 | ); 141 | $controllerName = null; 142 | switch ($routeInfo[0]) { 143 | case Dispatcher::NOT_FOUND: 144 | $this->logger->warning('Controller not found (404)'); 145 | $controllerName = $this->config['error']['404'] ?? Error404::class; 146 | break; 147 | case Dispatcher::METHOD_NOT_ALLOWED: 148 | $this->logger->warning('Method not allowed (405)'); 149 | $controllerName = $this->config['error']['405'] ?? Error405::class; 150 | break; 151 | case Dispatcher::FOUND: 152 | $controllerName = $routeInfo[1]; 153 | if (isset($routeInfo[2])) { 154 | foreach ($routeInfo[2] as $name => $value) { 155 | $this->request = $this->request->withAttribute($name, $value); 156 | } 157 | } 158 | break; 159 | } 160 | 161 | if (is_string($controllerName)) { 162 | $this->logger->info(sprintf("Executing %s", $controllerName)); 163 | $controller = $this->container->get($controllerName); 164 | $response = $controller->execute($this->request); 165 | } elseif (is_array($controllerName)) { 166 | $response = null; 167 | foreach ($controllerName as $controller) { 168 | $this->logger->info(sprintf("Executing %s", $controller)); 169 | $response = $this->container->get($controller) 170 | ->execute($this->request, $response); 171 | if ($response instanceof HaltResponse) { 172 | break; 173 | } 174 | } 175 | } else { 176 | throw new ControllerException(sprintf( 177 | 'The Controller name is not a string or an array: %s', 178 | var_export($controllerName, true) 179 | )); 180 | } 181 | if (is_null($response)) { 182 | throw new ResponseException( 183 | "The response is null and it should be Psr\Http\Message\ResponseInterface" 184 | ); 185 | } 186 | SapiEmitter::emit($response); 187 | 188 | $this->logger->info(sprintf("Execution time: %.3f sec", microtime(true) - $this->startTime)); 189 | $this->logger->info(sprintf("Memory usage: %d bytes", memory_get_usage(true))); 190 | } 191 | } -------------------------------------------------------------------------------- /src/Controller/Auth.php: -------------------------------------------------------------------------------- 1 | get('authentication'); 33 | } catch (NotFoundException $e) { 34 | throw new InvalidConfigException( 35 | 'The [authentication] key is missing in config/app.php' 36 | ); 37 | } 38 | $this->username = $auth['username'] ?? null; 39 | $this->password = $auth['password'] ?? null; 40 | $this->realm = $auth['realm'] ?? 'test'; 41 | 42 | if (is_null($this->username) || is_null($this->password)) { 43 | throw new InvalidConfigException( 44 | 'The [authentication][username] and [authentication][password] are missing in config/app.php' 45 | ); 46 | } 47 | } 48 | 49 | /** 50 | * Implements Basic Access Authentication 51 | * 52 | * @see https://en.wikipedia.org/wiki/Basic_access_authentication 53 | */ 54 | public function execute(ServerRequestInterface $request, ResponseInterface $response = null): ?ResponseInterface 55 | { 56 | $auth = $request->getHeader('Authorization'); 57 | if (empty($auth)) { 58 | return new HaltResponse(401, ['WWW-Authenticate' => "Basic realm=\"{$this->realm}\""]); 59 | } 60 | list (, $credential) = explode('Basic ', $auth[0]); 61 | list($username, $password) = explode(':', base64_decode($credential)); 62 | if ($username !== $this->username || $password !== $this->password) { 63 | return new HaltResponse(401, ['WWW-Authenticate' => "Basic realm=\"{$this->realm}\""]); 64 | } 65 | return $response; 66 | } 67 | } -------------------------------------------------------------------------------- /src/Controller/ControllerInterface.php: -------------------------------------------------------------------------------- 1 | plates = $plates; 21 | } 22 | 23 | public function execute(ServerRequestInterface $request, ResponseInterface $response = null): ?ResponseInterface 24 | { 25 | return new Response( 26 | 404, 27 | [], 28 | $this->plates->render('404') 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/Controller/Error405.php: -------------------------------------------------------------------------------- 1 | plates = $plates; 21 | } 22 | 23 | public function execute(ServerRequestInterface $request, ResponseInterface $response = null): ?ResponseInterface 24 | { 25 | return new Response( 26 | 405, 27 | [], 28 | $this->plates->render('405') 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/Controller/Hello.php: -------------------------------------------------------------------------------- 1 | plates = $plates; 21 | } 22 | 23 | public function execute(ServerRequestInterface $request, ResponseInterface $response = null): ?ResponseInterface 24 | { 25 | $name = $request->getAttribute('name', 'unknown'); 26 | 27 | return new Response( 28 | 200, 29 | [], 30 | $this->plates->render('hello', [ 31 | 'name' => ucfirst($name) 32 | ]) 33 | ); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/Controller/Home.php: -------------------------------------------------------------------------------- 1 | plates = $plates; 21 | } 22 | 23 | public function execute(ServerRequestInterface $request, ResponseInterface $response = null): ?ResponseInterface 24 | { 25 | return new Response( 26 | 200, 27 | [], 28 | $this->plates->render('home') 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/Exception/ControllerException.php: -------------------------------------------------------------------------------- 1 | getHeaders(); 21 | foreach ($headers as $name => $values) { 22 | foreach ($values as $value) { 23 | header(sprintf('%s: %s', $name, $value), false); 24 | } 25 | } 26 | $statusCode = $response->getStatusCode(); 27 | $reasonPhrase = $response->getReasonPhrase(); 28 | 29 | // status code line 30 | header(sprintf( 31 | 'HTTP/%s %d%s', 32 | $response->getProtocolVersion(), 33 | $statusCode, 34 | empty($reasonPhrase) ? '' : ' ' . $reasonPhrase 35 | ), true, $statusCode); 36 | 37 | // body 38 | $body = (string) $response->getBody(); 39 | if (!empty($body)) { 40 | header(sprintf("Content-Length: %d", strlen($body))); 41 | } 42 | echo $body; 43 | } 44 | } -------------------------------------------------------------------------------- /src/View/404.php: -------------------------------------------------------------------------------- 1 | layout('layout', ['title' => '404 Error']) ?> 2 | 3 |

404 File not found

4 |

Back to home page

5 | -------------------------------------------------------------------------------- /src/View/405.php: -------------------------------------------------------------------------------- 1 | layout('layout', ['title' => '405 Error']) ?> 2 | 3 |

405 Method not allowed

4 |

Back to home page

5 | -------------------------------------------------------------------------------- /src/View/hello.php: -------------------------------------------------------------------------------- 1 | layout('layout', ['title' => 'Hello example']) ?> 2 | 3 |

Hi e($name) ?>!

-------------------------------------------------------------------------------- /src/View/home.php: -------------------------------------------------------------------------------- 1 | layout('layout', ['title' => 'Home SimpleMVC']) ?> 2 | 3 |

Home page

4 |

Welcome to Simple MVC mini framework.

5 |

Simple MVC is a tutorial project for introducing the usage of MVC architectural pattern in modern PHP applications.

6 | -------------------------------------------------------------------------------- /src/View/layout.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | <?=$this->e($title)?> 4 | 5 | 6 | section('content')?> 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests/Controller/AuthTest.php: -------------------------------------------------------------------------------- 1 | config = [ 30 | 'username' => 'test', 31 | 'password' => 'password' 32 | ]; 33 | $this->container = $this->createMock(ContainerInterface::class); 34 | $this->container->method('get') 35 | ->with($this->equalTo('authentication')) 36 | ->willReturn($this->config); 37 | 38 | $this->auth = new Auth($this->container); 39 | $this->request = $this->createMock(ServerRequestInterface::class); 40 | } 41 | 42 | public function testAuthWithValidCredentials(): void 43 | { 44 | $this->request->method('getHeader') 45 | ->with($this->equalTo('Authorization')) 46 | ->willReturn([sprintf( 47 | 'Basic %s', 48 | base64_encode($this->config['username'] . ':' . $this->config['password']) 49 | )]); 50 | 51 | $response = $this->auth->execute($this->request); 52 | $this->assertEquals(null, $response); 53 | } 54 | 55 | public function testAuthWithInvalidCredentials(): void 56 | { 57 | $this->request->method('getHeader') 58 | ->with($this->equalTo('Authorization')) 59 | ->willReturn([sprintf( 60 | 'Basic %s', 61 | base64_encode('foo:bar') 62 | )]); 63 | 64 | $response = $this->auth->execute($this->request); 65 | 66 | $this->assertNotEmpty($response); 67 | $this->assertEquals(401, $response->getStatusCode()); 68 | $this->assertEquals('Basic realm="test"', $response->getHeader('WWW-Authenticate')[0]); 69 | } 70 | 71 | public function testAuthWithoutCredentials(): void 72 | { 73 | $response = $this->auth->execute($this->request); 74 | 75 | $this->assertNotEmpty($response); 76 | $this->assertEquals(401, $response->getStatusCode()); 77 | $this->assertEquals('Basic realm="test"', $response->getHeader('WWW-Authenticate')[0]); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /tests/Controller/Error404Test.php: -------------------------------------------------------------------------------- 1 | stubPlates = $this->createMock(Engine::class); 27 | $this->error = new Error404($this->stubPlates); 28 | $this->request = $this->createMock(ServerRequestInterface::class); 29 | } 30 | 31 | public function testExecuteRender404View(): void 32 | { 33 | $response = $this->error->execute($this->request); 34 | $this->assertEquals(404, $response->getStatusCode()); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /tests/Controller/Error405Test.php: -------------------------------------------------------------------------------- 1 | stubPlates = $this->createMock(Engine::class); 27 | $this->error = new Error405($this->stubPlates); 28 | $this->request = $this->createMock(ServerRequestInterface::class); 29 | } 30 | 31 | public function testExecuteRender405View(): void 32 | { 33 | $response = $this->error->execute($this->request); 34 | $this->assertEquals(405, $response->getStatusCode()); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /tests/Controller/HelloTest.php: -------------------------------------------------------------------------------- 1 | plates = new Engine('src/View'); 27 | $this->home = new Hello($this->plates); 28 | $this->request = $this->createMock(ServerRequestInterface::class); 29 | } 30 | 31 | public function testExecuteRenderHomeView(): void 32 | { 33 | $name = 'test'; 34 | $this->request->method('getAttribute') 35 | ->with($this->equalTo('name')) 36 | ->willReturn($name); 37 | 38 | $output = $this->plates->render('hello', ['name' => ucfirst($name)]); 39 | $response = $this->home->execute($this->request); 40 | $this->assertEquals(200, $response->getStatusCode()); 41 | $this->assertEquals($output, (string) $response->getBody()); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /tests/Controller/HomeTest.php: -------------------------------------------------------------------------------- 1 | plates = new Engine('src/View'); 27 | $this->home = new Home($this->plates); 28 | $this->request = $this->createMock(ServerRequestInterface::class); 29 | } 30 | 31 | public function testExecuteRenderHomeView(): void 32 | { 33 | $response = $this->home->execute($this->request); 34 | $this->assertEquals(200, $response->getStatusCode()); 35 | $this->assertEquals($this->plates->render('home'), (string) $response->getBody()); 36 | } 37 | } 38 | --------------------------------------------------------------------------------