├── .github └── workflows │ └── tests.yml ├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── composer.json ├── composer.lock ├── phpunit.xml.dist ├── src ├── Migration.php ├── SchemaDumpController.php └── template.php └── tests ├── SchemaDumpControllerMySQLTest.php ├── SchemaDumpControllerPostgreSQLTest.php ├── SchemaDumpControllerSQLiteTest.php ├── StdOutBufferControllerTrait.php ├── bootstrap.php └── schemas ├── mysql.sql ├── postgre.sql └── sqlite.sql /.github/workflows/tests.yml: -------------------------------------------------------------------------------- 1 | name: tests 2 | 3 | on: 4 | push: 5 | pull_request: 6 | 7 | jobs: 8 | tests: 9 | runs-on: ubuntu-20.04 10 | 11 | services: 12 | mysql: 13 | image: mysql:5.7 14 | env: 15 | MYSQL_ROOT_PASSWORD: root 16 | MYSQL_DATABASE: yii2_schemadump_test 17 | ports: 18 | - 3306:3306 19 | options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 20 | postgres: 21 | image: postgres:12.5 22 | env: 23 | POSTGRES_USER: postgres 24 | POSTGRES_PASSWORD: postgres 25 | POSTGRES_DB: yii2_schemadump_test 26 | ports: 27 | - 5432:5432 28 | options: --name=postgres --health-cmd="pg_isready" --health-interval=10s --health-timeout=5s --health-retries=3 29 | strategy: 30 | fail-fast: true 31 | matrix: 32 | php: [7.4, 8.0, 8.1] 33 | 34 | steps: 35 | - name: Checkout 36 | uses: actions/checkout@v3 37 | 38 | - name: Setup PHP 39 | uses: shivammathur/setup-php@v2 40 | with: 41 | php-version: ${{ matrix.php }} 42 | extensions: pdo, mysql, pgsql, sqlite, pdo_mysql, pdo_pgsql, pdo_sqlite 43 | tools: composer:v2 44 | coverage: none 45 | 46 | - name: Get Composer Cache Directory 47 | id: composer-cache 48 | run: echo "::set-output name=dir::$(composer config cache-files-dir)" 49 | 50 | - name: Cache composer dependencies 51 | uses: actions/cache@v3 52 | with: 53 | path: ${{ steps.composer-cache.outputs.dir }} 54 | key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} 55 | restore-keys: ${{ runner.os }}-composer- 56 | 57 | - name: Install dependencies 58 | run: composer update --prefer-dist --no-interaction --no-progress 59 | 60 | - name: Execute tests 61 | run: vendor/bin/phpunit --verbose 62 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.idea 2 | /vendor 3 | .phpunit.result.cache 4 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # yii2-schemadump - Change Log 2 | 3 | ## v0.12.0 - 2021.11.26 4 | 5 | - Change: Support PHP version 7.4 or later (BC break) 6 | 7 | ## v0.11.0 - 2020.12.25 8 | 9 | - Change: Support PHP version 7.3 or later (BC break) 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Tomoki Morita 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # yii2-schemadump 2 | 3 | [![Build Status](https://github.com/jamband/yii2-schemadump/workflows/tests/badge.svg)](https://github.com/jamband/yii2-schemadump/actions?workflow=tests) [![Latest Stable Version](https://img.shields.io/packagist/v/jamband/yii2-schemadump)](https://packagist.org/packages/jamband/yii2-schemadump) [![Total Downloads](https://img.shields.io/packagist/dt/jamband/yii2-schemadump)](https://packagist.org/packages/jamband/yii2-schemadump) 4 | 5 | Generate the schema from an existing database. 6 | 7 | ## Demo 8 | 9 | ![gif](https://raw.githubusercontent.com/jamband/jamband.github.io/main/images/yii2-schemadump.gif) 10 | 11 | ## Requirements 12 | 13 | - PHP 7.4 or later 14 | - Yii 2.x 15 | 16 | ## Installation 17 | 18 | ``` 19 | composer require --dev jamband/yii2-schemadump 20 | ``` 21 | 22 | ## Usage 23 | 24 | Add the following in config/console.php: 25 | 26 | ```php 27 | return [ 28 | ... 29 | 'components' => [ 30 | ... 31 | ], 32 | 'controllerMap' => [ 33 | 'migrate' => [ 34 | 'class' => yii\console\controllers\MigrateController::class, 35 | 'templateFile' => '@jamband/schemadump/template.php', 36 | ], 37 | 'schemadump' => [ 38 | 'class' => jamband\schemadump\SchemaDumpController::class, 39 | 'db' => [ 40 | 'class' => yii\db\Connection::class, 41 | 'dsn' => 'mysql:host=localhost;dbname=existing_database_name', 42 | 'username' => 'your_username', 43 | 'password' => 'your_password', 44 | ], 45 | ], 46 | ], 47 | ... 48 | ]; 49 | ``` 50 | 51 | And run `schemadump` command. 52 | 53 | ``` 54 | cd /path/to/project 55 | ./yii schemadump 56 | ``` 57 | 58 | Example output: 59 | 60 | ```php 61 | // user 62 | $this->createTable('{{%user}}', [ 63 | 'id' => $this->primaryKey()->comment('主キー'), 64 | 'username' => $this->string(20)->notNull()->unique()->comment('ユーザ名'), 65 | 'email' => $this->string(255)->notNull()->unique()->comemnt('メールアドレス'), 66 | 'password' => $this->string(255)->notNull()->comment('パスワード'), 67 | ], $this->tableOptions); 68 | ``` 69 | 70 | Copy the output code and paste it into a migration file. 71 | 72 | ## Commands 73 | 74 | Generates the 'createTable' code. (default) 75 | 76 | ``` 77 | ./yii schemadump 78 | ./yii schemadump/create 79 | ``` 80 | 81 | Generates the 'dropTable' code. 82 | 83 | ``` 84 | ./yii schemadump/drop 85 | ``` 86 | 87 | Useful commands (for macOS user): 88 | 89 | ``` 90 | ./yii schemadump | pbcopy 91 | ./yii schemadump/drop | pbcopy 92 | ``` 93 | 94 | Check help. 95 | 96 | ``` 97 | ./yii help schemadump 98 | ``` 99 | 100 | ## Supports 101 | 102 | - Types 103 | - Size 104 | - Unsigned 105 | - NOT NULL 106 | - DEFAULT value 107 | - COMMENT 108 | - Unique key 109 | - Foreign key 110 | - Composite primary keys 111 | - Primary key without AUTO_INCREMENT 112 | - ENUM type (for MySQL) 113 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jamband/yii2-schemadump", 3 | "description": "Generate the schema from an existing database", 4 | "keywords": ["yii2", "extension", "command", "migration", "generator", "database"], 5 | "homepage": "https://github.com/jamband/yii2-schemadump", 6 | "type": "yii2-extension", 7 | "license": "MIT", 8 | "authors": [ 9 | { 10 | "name": "Tomoki Morita", 11 | "email": "tmsongbooks215@gmail.com", 12 | "homepage": "https://jamband.github.io/" 13 | } 14 | ], 15 | "require": { 16 | "php": "^7.4|^8.0", 17 | "yiisoft/yii2": "^2.0" 18 | }, 19 | "require-dev": { 20 | "phpunit/phpunit": "^9.5" 21 | }, 22 | "provide": { 23 | "bower-asset/jquery": "*", 24 | "bower-asset/inputmask": "*", 25 | "bower-asset/punycode": "*", 26 | "bower-asset/yii2-pjax": "*" 27 | }, 28 | "autoload": { 29 | "psr-4": { 30 | "jamband\\schemadump\\": "src" 31 | } 32 | }, 33 | "autoload-dev": { 34 | "psr-4": { 35 | "tests\\": "tests" 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /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": "e962c03e2037276c89f1f14ad520f3e7", 8 | "packages": [ 9 | { 10 | "name": "cebe/markdown", 11 | "version": "1.2.1", 12 | "source": { 13 | "type": "git", 14 | "url": "https://github.com/cebe/markdown.git", 15 | "reference": "9bac5e971dd391e2802dca5400bbeacbaea9eb86" 16 | }, 17 | "dist": { 18 | "type": "zip", 19 | "url": "https://api.github.com/repos/cebe/markdown/zipball/9bac5e971dd391e2802dca5400bbeacbaea9eb86", 20 | "reference": "9bac5e971dd391e2802dca5400bbeacbaea9eb86", 21 | "shasum": "" 22 | }, 23 | "require": { 24 | "lib-pcre": "*", 25 | "php": ">=5.4.0" 26 | }, 27 | "require-dev": { 28 | "cebe/indent": "*", 29 | "facebook/xhprof": "*@dev", 30 | "phpunit/phpunit": "4.1.*" 31 | }, 32 | "bin": [ 33 | "bin/markdown" 34 | ], 35 | "type": "library", 36 | "extra": { 37 | "branch-alias": { 38 | "dev-master": "1.2.x-dev" 39 | } 40 | }, 41 | "autoload": { 42 | "psr-4": { 43 | "cebe\\markdown\\": "" 44 | } 45 | }, 46 | "notification-url": "https://packagist.org/downloads/", 47 | "license": [ 48 | "MIT" 49 | ], 50 | "authors": [ 51 | { 52 | "name": "Carsten Brandt", 53 | "email": "mail@cebe.cc", 54 | "homepage": "http://cebe.cc/", 55 | "role": "Creator" 56 | } 57 | ], 58 | "description": "A super fast, highly extensible markdown parser for PHP", 59 | "homepage": "https://github.com/cebe/markdown#readme", 60 | "keywords": [ 61 | "extensible", 62 | "fast", 63 | "gfm", 64 | "markdown", 65 | "markdown-extra" 66 | ], 67 | "support": { 68 | "issues": "https://github.com/cebe/markdown/issues", 69 | "source": "https://github.com/cebe/markdown" 70 | }, 71 | "time": "2018-03-26T11:24:36+00:00" 72 | }, 73 | { 74 | "name": "ezyang/htmlpurifier", 75 | "version": "v4.14.0", 76 | "source": { 77 | "type": "git", 78 | "url": "https://github.com/ezyang/htmlpurifier.git", 79 | "reference": "12ab42bd6e742c70c0a52f7b82477fcd44e64b75" 80 | }, 81 | "dist": { 82 | "type": "zip", 83 | "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/12ab42bd6e742c70c0a52f7b82477fcd44e64b75", 84 | "reference": "12ab42bd6e742c70c0a52f7b82477fcd44e64b75", 85 | "shasum": "" 86 | }, 87 | "require": { 88 | "php": ">=5.2" 89 | }, 90 | "type": "library", 91 | "autoload": { 92 | "files": [ 93 | "library/HTMLPurifier.composer.php" 94 | ], 95 | "psr-0": { 96 | "HTMLPurifier": "library/" 97 | }, 98 | "exclude-from-classmap": [ 99 | "/library/HTMLPurifier/Language/" 100 | ] 101 | }, 102 | "notification-url": "https://packagist.org/downloads/", 103 | "license": [ 104 | "LGPL-2.1-or-later" 105 | ], 106 | "authors": [ 107 | { 108 | "name": "Edward Z. Yang", 109 | "email": "admin@htmlpurifier.org", 110 | "homepage": "http://ezyang.com" 111 | } 112 | ], 113 | "description": "Standards compliant HTML filter written in PHP", 114 | "homepage": "http://htmlpurifier.org/", 115 | "keywords": [ 116 | "html" 117 | ], 118 | "support": { 119 | "issues": "https://github.com/ezyang/htmlpurifier/issues", 120 | "source": "https://github.com/ezyang/htmlpurifier/tree/v4.14.0" 121 | }, 122 | "time": "2021-12-25T01:21:49+00:00" 123 | }, 124 | { 125 | "name": "paragonie/random_compat", 126 | "version": "v9.99.100", 127 | "source": { 128 | "type": "git", 129 | "url": "https://github.com/paragonie/random_compat.git", 130 | "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a" 131 | }, 132 | "dist": { 133 | "type": "zip", 134 | "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a", 135 | "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a", 136 | "shasum": "" 137 | }, 138 | "require": { 139 | "php": ">= 7" 140 | }, 141 | "require-dev": { 142 | "phpunit/phpunit": "4.*|5.*", 143 | "vimeo/psalm": "^1" 144 | }, 145 | "suggest": { 146 | "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." 147 | }, 148 | "type": "library", 149 | "notification-url": "https://packagist.org/downloads/", 150 | "license": [ 151 | "MIT" 152 | ], 153 | "authors": [ 154 | { 155 | "name": "Paragon Initiative Enterprises", 156 | "email": "security@paragonie.com", 157 | "homepage": "https://paragonie.com" 158 | } 159 | ], 160 | "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", 161 | "keywords": [ 162 | "csprng", 163 | "polyfill", 164 | "pseudorandom", 165 | "random" 166 | ], 167 | "support": { 168 | "email": "info@paragonie.com", 169 | "issues": "https://github.com/paragonie/random_compat/issues", 170 | "source": "https://github.com/paragonie/random_compat" 171 | }, 172 | "time": "2020-10-15T08:29:30+00:00" 173 | }, 174 | { 175 | "name": "yiisoft/yii2", 176 | "version": "2.0.45", 177 | "source": { 178 | "type": "git", 179 | "url": "https://github.com/yiisoft/yii2-framework.git", 180 | "reference": "e2223d4085e5612aa616635f8fcaf478607f62e8" 181 | }, 182 | "dist": { 183 | "type": "zip", 184 | "url": "https://api.github.com/repos/yiisoft/yii2-framework/zipball/e2223d4085e5612aa616635f8fcaf478607f62e8", 185 | "reference": "e2223d4085e5612aa616635f8fcaf478607f62e8", 186 | "shasum": "" 187 | }, 188 | "require": { 189 | "bower-asset/inputmask": "~3.2.2 | ~3.3.5", 190 | "bower-asset/jquery": "3.6.*@stable | 3.5.*@stable | 3.4.*@stable | 3.3.*@stable | 3.2.*@stable | 3.1.*@stable | 2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable", 191 | "bower-asset/punycode": "1.3.*", 192 | "bower-asset/yii2-pjax": "~2.0.1", 193 | "cebe/markdown": "~1.0.0 | ~1.1.0 | ~1.2.0", 194 | "ext-ctype": "*", 195 | "ext-mbstring": "*", 196 | "ezyang/htmlpurifier": "~4.6", 197 | "lib-pcre": "*", 198 | "paragonie/random_compat": ">=1", 199 | "php": ">=5.4.0", 200 | "yiisoft/yii2-composer": "~2.0.4" 201 | }, 202 | "bin": [ 203 | "yii" 204 | ], 205 | "type": "library", 206 | "extra": { 207 | "branch-alias": { 208 | "dev-master": "2.0.x-dev" 209 | } 210 | }, 211 | "autoload": { 212 | "psr-4": { 213 | "yii\\": "" 214 | } 215 | }, 216 | "notification-url": "https://packagist.org/downloads/", 217 | "license": [ 218 | "BSD-3-Clause" 219 | ], 220 | "authors": [ 221 | { 222 | "name": "Qiang Xue", 223 | "email": "qiang.xue@gmail.com", 224 | "homepage": "https://www.yiiframework.com/", 225 | "role": "Founder and project lead" 226 | }, 227 | { 228 | "name": "Alexander Makarov", 229 | "email": "sam@rmcreative.ru", 230 | "homepage": "https://rmcreative.ru/", 231 | "role": "Core framework development" 232 | }, 233 | { 234 | "name": "Maurizio Domba", 235 | "homepage": "http://mdomba.info/", 236 | "role": "Core framework development" 237 | }, 238 | { 239 | "name": "Carsten Brandt", 240 | "email": "mail@cebe.cc", 241 | "homepage": "https://www.cebe.cc/", 242 | "role": "Core framework development" 243 | }, 244 | { 245 | "name": "Timur Ruziev", 246 | "email": "resurtm@gmail.com", 247 | "homepage": "http://resurtm.com/", 248 | "role": "Core framework development" 249 | }, 250 | { 251 | "name": "Paul Klimov", 252 | "email": "klimov.paul@gmail.com", 253 | "role": "Core framework development" 254 | }, 255 | { 256 | "name": "Dmitry Naumenko", 257 | "email": "d.naumenko.a@gmail.com", 258 | "role": "Core framework development" 259 | }, 260 | { 261 | "name": "Boudewijn Vahrmeijer", 262 | "email": "info@dynasource.eu", 263 | "homepage": "http://dynasource.eu", 264 | "role": "Core framework development" 265 | } 266 | ], 267 | "description": "Yii PHP Framework Version 2", 268 | "homepage": "https://www.yiiframework.com/", 269 | "keywords": [ 270 | "framework", 271 | "yii2" 272 | ], 273 | "support": { 274 | "forum": "https://forum.yiiframework.com/", 275 | "irc": "ircs://irc.libera.chat:6697/yii", 276 | "issues": "https://github.com/yiisoft/yii2/issues?state=open", 277 | "source": "https://github.com/yiisoft/yii2", 278 | "wiki": "https://www.yiiframework.com/wiki" 279 | }, 280 | "funding": [ 281 | { 282 | "url": "https://github.com/yiisoft", 283 | "type": "github" 284 | }, 285 | { 286 | "url": "https://opencollective.com/yiisoft", 287 | "type": "open_collective" 288 | }, 289 | { 290 | "url": "https://tidelift.com/funding/github/packagist/yiisoft/yii2", 291 | "type": "tidelift" 292 | } 293 | ], 294 | "time": "2022-02-11T13:12:40+00:00" 295 | }, 296 | { 297 | "name": "yiisoft/yii2-composer", 298 | "version": "2.0.10", 299 | "source": { 300 | "type": "git", 301 | "url": "https://github.com/yiisoft/yii2-composer.git", 302 | "reference": "94bb3f66e779e2774f8776d6e1bdeab402940510" 303 | }, 304 | "dist": { 305 | "type": "zip", 306 | "url": "https://api.github.com/repos/yiisoft/yii2-composer/zipball/94bb3f66e779e2774f8776d6e1bdeab402940510", 307 | "reference": "94bb3f66e779e2774f8776d6e1bdeab402940510", 308 | "shasum": "" 309 | }, 310 | "require": { 311 | "composer-plugin-api": "^1.0 | ^2.0" 312 | }, 313 | "require-dev": { 314 | "composer/composer": "^1.0 | ^2.0@dev", 315 | "phpunit/phpunit": "<7" 316 | }, 317 | "type": "composer-plugin", 318 | "extra": { 319 | "class": "yii\\composer\\Plugin", 320 | "branch-alias": { 321 | "dev-master": "2.0.x-dev" 322 | } 323 | }, 324 | "autoload": { 325 | "psr-4": { 326 | "yii\\composer\\": "" 327 | } 328 | }, 329 | "notification-url": "https://packagist.org/downloads/", 330 | "license": [ 331 | "BSD-3-Clause" 332 | ], 333 | "authors": [ 334 | { 335 | "name": "Qiang Xue", 336 | "email": "qiang.xue@gmail.com" 337 | }, 338 | { 339 | "name": "Carsten Brandt", 340 | "email": "mail@cebe.cc" 341 | } 342 | ], 343 | "description": "The composer plugin for Yii extension installer", 344 | "keywords": [ 345 | "composer", 346 | "extension installer", 347 | "yii2" 348 | ], 349 | "support": { 350 | "forum": "http://www.yiiframework.com/forum/", 351 | "irc": "irc://irc.freenode.net/yii", 352 | "issues": "https://github.com/yiisoft/yii2-composer/issues", 353 | "source": "https://github.com/yiisoft/yii2-composer", 354 | "wiki": "http://www.yiiframework.com/wiki/" 355 | }, 356 | "funding": [ 357 | { 358 | "url": "https://github.com/yiisoft", 359 | "type": "github" 360 | }, 361 | { 362 | "url": "https://opencollective.com/yiisoft", 363 | "type": "open_collective" 364 | }, 365 | { 366 | "url": "https://tidelift.com/funding/github/packagist/yiisoft/yii2-composer", 367 | "type": "tidelift" 368 | } 369 | ], 370 | "time": "2020-06-24T00:04:01+00:00" 371 | } 372 | ], 373 | "packages-dev": [ 374 | { 375 | "name": "doctrine/instantiator", 376 | "version": "1.4.1", 377 | "source": { 378 | "type": "git", 379 | "url": "https://github.com/doctrine/instantiator.git", 380 | "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" 381 | }, 382 | "dist": { 383 | "type": "zip", 384 | "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", 385 | "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", 386 | "shasum": "" 387 | }, 388 | "require": { 389 | "php": "^7.1 || ^8.0" 390 | }, 391 | "require-dev": { 392 | "doctrine/coding-standard": "^9", 393 | "ext-pdo": "*", 394 | "ext-phar": "*", 395 | "phpbench/phpbench": "^0.16 || ^1", 396 | "phpstan/phpstan": "^1.4", 397 | "phpstan/phpstan-phpunit": "^1", 398 | "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", 399 | "vimeo/psalm": "^4.22" 400 | }, 401 | "type": "library", 402 | "autoload": { 403 | "psr-4": { 404 | "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" 405 | } 406 | }, 407 | "notification-url": "https://packagist.org/downloads/", 408 | "license": [ 409 | "MIT" 410 | ], 411 | "authors": [ 412 | { 413 | "name": "Marco Pivetta", 414 | "email": "ocramius@gmail.com", 415 | "homepage": "https://ocramius.github.io/" 416 | } 417 | ], 418 | "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", 419 | "homepage": "https://www.doctrine-project.org/projects/instantiator.html", 420 | "keywords": [ 421 | "constructor", 422 | "instantiate" 423 | ], 424 | "support": { 425 | "issues": "https://github.com/doctrine/instantiator/issues", 426 | "source": "https://github.com/doctrine/instantiator/tree/1.4.1" 427 | }, 428 | "funding": [ 429 | { 430 | "url": "https://www.doctrine-project.org/sponsorship.html", 431 | "type": "custom" 432 | }, 433 | { 434 | "url": "https://www.patreon.com/phpdoctrine", 435 | "type": "patreon" 436 | }, 437 | { 438 | "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", 439 | "type": "tidelift" 440 | } 441 | ], 442 | "time": "2022-03-03T08:28:38+00:00" 443 | }, 444 | { 445 | "name": "myclabs/deep-copy", 446 | "version": "1.11.0", 447 | "source": { 448 | "type": "git", 449 | "url": "https://github.com/myclabs/DeepCopy.git", 450 | "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" 451 | }, 452 | "dist": { 453 | "type": "zip", 454 | "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", 455 | "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", 456 | "shasum": "" 457 | }, 458 | "require": { 459 | "php": "^7.1 || ^8.0" 460 | }, 461 | "conflict": { 462 | "doctrine/collections": "<1.6.8", 463 | "doctrine/common": "<2.13.3 || >=3,<3.2.2" 464 | }, 465 | "require-dev": { 466 | "doctrine/collections": "^1.6.8", 467 | "doctrine/common": "^2.13.3 || ^3.2.2", 468 | "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" 469 | }, 470 | "type": "library", 471 | "autoload": { 472 | "files": [ 473 | "src/DeepCopy/deep_copy.php" 474 | ], 475 | "psr-4": { 476 | "DeepCopy\\": "src/DeepCopy/" 477 | } 478 | }, 479 | "notification-url": "https://packagist.org/downloads/", 480 | "license": [ 481 | "MIT" 482 | ], 483 | "description": "Create deep copies (clones) of your objects", 484 | "keywords": [ 485 | "clone", 486 | "copy", 487 | "duplicate", 488 | "object", 489 | "object graph" 490 | ], 491 | "support": { 492 | "issues": "https://github.com/myclabs/DeepCopy/issues", 493 | "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" 494 | }, 495 | "funding": [ 496 | { 497 | "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", 498 | "type": "tidelift" 499 | } 500 | ], 501 | "time": "2022-03-03T13:19:32+00:00" 502 | }, 503 | { 504 | "name": "nikic/php-parser", 505 | "version": "v4.13.2", 506 | "source": { 507 | "type": "git", 508 | "url": "https://github.com/nikic/PHP-Parser.git", 509 | "reference": "210577fe3cf7badcc5814d99455df46564f3c077" 510 | }, 511 | "dist": { 512 | "type": "zip", 513 | "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/210577fe3cf7badcc5814d99455df46564f3c077", 514 | "reference": "210577fe3cf7badcc5814d99455df46564f3c077", 515 | "shasum": "" 516 | }, 517 | "require": { 518 | "ext-tokenizer": "*", 519 | "php": ">=7.0" 520 | }, 521 | "require-dev": { 522 | "ircmaxell/php-yacc": "^0.0.7", 523 | "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" 524 | }, 525 | "bin": [ 526 | "bin/php-parse" 527 | ], 528 | "type": "library", 529 | "extra": { 530 | "branch-alias": { 531 | "dev-master": "4.9-dev" 532 | } 533 | }, 534 | "autoload": { 535 | "psr-4": { 536 | "PhpParser\\": "lib/PhpParser" 537 | } 538 | }, 539 | "notification-url": "https://packagist.org/downloads/", 540 | "license": [ 541 | "BSD-3-Clause" 542 | ], 543 | "authors": [ 544 | { 545 | "name": "Nikita Popov" 546 | } 547 | ], 548 | "description": "A PHP parser written in PHP", 549 | "keywords": [ 550 | "parser", 551 | "php" 552 | ], 553 | "support": { 554 | "issues": "https://github.com/nikic/PHP-Parser/issues", 555 | "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.2" 556 | }, 557 | "time": "2021-11-30T19:35:32+00:00" 558 | }, 559 | { 560 | "name": "phar-io/manifest", 561 | "version": "2.0.3", 562 | "source": { 563 | "type": "git", 564 | "url": "https://github.com/phar-io/manifest.git", 565 | "reference": "97803eca37d319dfa7826cc2437fc020857acb53" 566 | }, 567 | "dist": { 568 | "type": "zip", 569 | "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", 570 | "reference": "97803eca37d319dfa7826cc2437fc020857acb53", 571 | "shasum": "" 572 | }, 573 | "require": { 574 | "ext-dom": "*", 575 | "ext-phar": "*", 576 | "ext-xmlwriter": "*", 577 | "phar-io/version": "^3.0.1", 578 | "php": "^7.2 || ^8.0" 579 | }, 580 | "type": "library", 581 | "extra": { 582 | "branch-alias": { 583 | "dev-master": "2.0.x-dev" 584 | } 585 | }, 586 | "autoload": { 587 | "classmap": [ 588 | "src/" 589 | ] 590 | }, 591 | "notification-url": "https://packagist.org/downloads/", 592 | "license": [ 593 | "BSD-3-Clause" 594 | ], 595 | "authors": [ 596 | { 597 | "name": "Arne Blankerts", 598 | "email": "arne@blankerts.de", 599 | "role": "Developer" 600 | }, 601 | { 602 | "name": "Sebastian Heuer", 603 | "email": "sebastian@phpeople.de", 604 | "role": "Developer" 605 | }, 606 | { 607 | "name": "Sebastian Bergmann", 608 | "email": "sebastian@phpunit.de", 609 | "role": "Developer" 610 | } 611 | ], 612 | "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", 613 | "support": { 614 | "issues": "https://github.com/phar-io/manifest/issues", 615 | "source": "https://github.com/phar-io/manifest/tree/2.0.3" 616 | }, 617 | "time": "2021-07-20T11:28:43+00:00" 618 | }, 619 | { 620 | "name": "phar-io/version", 621 | "version": "3.2.1", 622 | "source": { 623 | "type": "git", 624 | "url": "https://github.com/phar-io/version.git", 625 | "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" 626 | }, 627 | "dist": { 628 | "type": "zip", 629 | "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", 630 | "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", 631 | "shasum": "" 632 | }, 633 | "require": { 634 | "php": "^7.2 || ^8.0" 635 | }, 636 | "type": "library", 637 | "autoload": { 638 | "classmap": [ 639 | "src/" 640 | ] 641 | }, 642 | "notification-url": "https://packagist.org/downloads/", 643 | "license": [ 644 | "BSD-3-Clause" 645 | ], 646 | "authors": [ 647 | { 648 | "name": "Arne Blankerts", 649 | "email": "arne@blankerts.de", 650 | "role": "Developer" 651 | }, 652 | { 653 | "name": "Sebastian Heuer", 654 | "email": "sebastian@phpeople.de", 655 | "role": "Developer" 656 | }, 657 | { 658 | "name": "Sebastian Bergmann", 659 | "email": "sebastian@phpunit.de", 660 | "role": "Developer" 661 | } 662 | ], 663 | "description": "Library for handling version information and constraints", 664 | "support": { 665 | "issues": "https://github.com/phar-io/version/issues", 666 | "source": "https://github.com/phar-io/version/tree/3.2.1" 667 | }, 668 | "time": "2022-02-21T01:04:05+00:00" 669 | }, 670 | { 671 | "name": "phpdocumentor/reflection-common", 672 | "version": "2.2.0", 673 | "source": { 674 | "type": "git", 675 | "url": "https://github.com/phpDocumentor/ReflectionCommon.git", 676 | "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" 677 | }, 678 | "dist": { 679 | "type": "zip", 680 | "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", 681 | "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", 682 | "shasum": "" 683 | }, 684 | "require": { 685 | "php": "^7.2 || ^8.0" 686 | }, 687 | "type": "library", 688 | "extra": { 689 | "branch-alias": { 690 | "dev-2.x": "2.x-dev" 691 | } 692 | }, 693 | "autoload": { 694 | "psr-4": { 695 | "phpDocumentor\\Reflection\\": "src/" 696 | } 697 | }, 698 | "notification-url": "https://packagist.org/downloads/", 699 | "license": [ 700 | "MIT" 701 | ], 702 | "authors": [ 703 | { 704 | "name": "Jaap van Otterdijk", 705 | "email": "opensource@ijaap.nl" 706 | } 707 | ], 708 | "description": "Common reflection classes used by phpdocumentor to reflect the code structure", 709 | "homepage": "http://www.phpdoc.org", 710 | "keywords": [ 711 | "FQSEN", 712 | "phpDocumentor", 713 | "phpdoc", 714 | "reflection", 715 | "static analysis" 716 | ], 717 | "support": { 718 | "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", 719 | "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" 720 | }, 721 | "time": "2020-06-27T09:03:43+00:00" 722 | }, 723 | { 724 | "name": "phpdocumentor/reflection-docblock", 725 | "version": "5.3.0", 726 | "source": { 727 | "type": "git", 728 | "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", 729 | "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" 730 | }, 731 | "dist": { 732 | "type": "zip", 733 | "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", 734 | "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", 735 | "shasum": "" 736 | }, 737 | "require": { 738 | "ext-filter": "*", 739 | "php": "^7.2 || ^8.0", 740 | "phpdocumentor/reflection-common": "^2.2", 741 | "phpdocumentor/type-resolver": "^1.3", 742 | "webmozart/assert": "^1.9.1" 743 | }, 744 | "require-dev": { 745 | "mockery/mockery": "~1.3.2", 746 | "psalm/phar": "^4.8" 747 | }, 748 | "type": "library", 749 | "extra": { 750 | "branch-alias": { 751 | "dev-master": "5.x-dev" 752 | } 753 | }, 754 | "autoload": { 755 | "psr-4": { 756 | "phpDocumentor\\Reflection\\": "src" 757 | } 758 | }, 759 | "notification-url": "https://packagist.org/downloads/", 760 | "license": [ 761 | "MIT" 762 | ], 763 | "authors": [ 764 | { 765 | "name": "Mike van Riel", 766 | "email": "me@mikevanriel.com" 767 | }, 768 | { 769 | "name": "Jaap van Otterdijk", 770 | "email": "account@ijaap.nl" 771 | } 772 | ], 773 | "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", 774 | "support": { 775 | "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", 776 | "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" 777 | }, 778 | "time": "2021-10-19T17:43:47+00:00" 779 | }, 780 | { 781 | "name": "phpdocumentor/type-resolver", 782 | "version": "1.6.1", 783 | "source": { 784 | "type": "git", 785 | "url": "https://github.com/phpDocumentor/TypeResolver.git", 786 | "reference": "77a32518733312af16a44300404e945338981de3" 787 | }, 788 | "dist": { 789 | "type": "zip", 790 | "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3", 791 | "reference": "77a32518733312af16a44300404e945338981de3", 792 | "shasum": "" 793 | }, 794 | "require": { 795 | "php": "^7.2 || ^8.0", 796 | "phpdocumentor/reflection-common": "^2.0" 797 | }, 798 | "require-dev": { 799 | "ext-tokenizer": "*", 800 | "psalm/phar": "^4.8" 801 | }, 802 | "type": "library", 803 | "extra": { 804 | "branch-alias": { 805 | "dev-1.x": "1.x-dev" 806 | } 807 | }, 808 | "autoload": { 809 | "psr-4": { 810 | "phpDocumentor\\Reflection\\": "src" 811 | } 812 | }, 813 | "notification-url": "https://packagist.org/downloads/", 814 | "license": [ 815 | "MIT" 816 | ], 817 | "authors": [ 818 | { 819 | "name": "Mike van Riel", 820 | "email": "me@mikevanriel.com" 821 | } 822 | ], 823 | "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", 824 | "support": { 825 | "issues": "https://github.com/phpDocumentor/TypeResolver/issues", 826 | "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1" 827 | }, 828 | "time": "2022-03-15T21:29:03+00:00" 829 | }, 830 | { 831 | "name": "phpspec/prophecy", 832 | "version": "v1.15.0", 833 | "source": { 834 | "type": "git", 835 | "url": "https://github.com/phpspec/prophecy.git", 836 | "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" 837 | }, 838 | "dist": { 839 | "type": "zip", 840 | "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", 841 | "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", 842 | "shasum": "" 843 | }, 844 | "require": { 845 | "doctrine/instantiator": "^1.2", 846 | "php": "^7.2 || ~8.0, <8.2", 847 | "phpdocumentor/reflection-docblock": "^5.2", 848 | "sebastian/comparator": "^3.0 || ^4.0", 849 | "sebastian/recursion-context": "^3.0 || ^4.0" 850 | }, 851 | "require-dev": { 852 | "phpspec/phpspec": "^6.0 || ^7.0", 853 | "phpunit/phpunit": "^8.0 || ^9.0" 854 | }, 855 | "type": "library", 856 | "extra": { 857 | "branch-alias": { 858 | "dev-master": "1.x-dev" 859 | } 860 | }, 861 | "autoload": { 862 | "psr-4": { 863 | "Prophecy\\": "src/Prophecy" 864 | } 865 | }, 866 | "notification-url": "https://packagist.org/downloads/", 867 | "license": [ 868 | "MIT" 869 | ], 870 | "authors": [ 871 | { 872 | "name": "Konstantin Kudryashov", 873 | "email": "ever.zet@gmail.com", 874 | "homepage": "http://everzet.com" 875 | }, 876 | { 877 | "name": "Marcello Duarte", 878 | "email": "marcello.duarte@gmail.com" 879 | } 880 | ], 881 | "description": "Highly opinionated mocking framework for PHP 5.3+", 882 | "homepage": "https://github.com/phpspec/prophecy", 883 | "keywords": [ 884 | "Double", 885 | "Dummy", 886 | "fake", 887 | "mock", 888 | "spy", 889 | "stub" 890 | ], 891 | "support": { 892 | "issues": "https://github.com/phpspec/prophecy/issues", 893 | "source": "https://github.com/phpspec/prophecy/tree/v1.15.0" 894 | }, 895 | "time": "2021-12-08T12:19:24+00:00" 896 | }, 897 | { 898 | "name": "phpunit/php-code-coverage", 899 | "version": "9.2.15", 900 | "source": { 901 | "type": "git", 902 | "url": "https://github.com/sebastianbergmann/php-code-coverage.git", 903 | "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f" 904 | }, 905 | "dist": { 906 | "type": "zip", 907 | "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2e9da11878c4202f97915c1cb4bb1ca318a63f5f", 908 | "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f", 909 | "shasum": "" 910 | }, 911 | "require": { 912 | "ext-dom": "*", 913 | "ext-libxml": "*", 914 | "ext-xmlwriter": "*", 915 | "nikic/php-parser": "^4.13.0", 916 | "php": ">=7.3", 917 | "phpunit/php-file-iterator": "^3.0.3", 918 | "phpunit/php-text-template": "^2.0.2", 919 | "sebastian/code-unit-reverse-lookup": "^2.0.2", 920 | "sebastian/complexity": "^2.0", 921 | "sebastian/environment": "^5.1.2", 922 | "sebastian/lines-of-code": "^1.0.3", 923 | "sebastian/version": "^3.0.1", 924 | "theseer/tokenizer": "^1.2.0" 925 | }, 926 | "require-dev": { 927 | "phpunit/phpunit": "^9.3" 928 | }, 929 | "suggest": { 930 | "ext-pcov": "*", 931 | "ext-xdebug": "*" 932 | }, 933 | "type": "library", 934 | "extra": { 935 | "branch-alias": { 936 | "dev-master": "9.2-dev" 937 | } 938 | }, 939 | "autoload": { 940 | "classmap": [ 941 | "src/" 942 | ] 943 | }, 944 | "notification-url": "https://packagist.org/downloads/", 945 | "license": [ 946 | "BSD-3-Clause" 947 | ], 948 | "authors": [ 949 | { 950 | "name": "Sebastian Bergmann", 951 | "email": "sebastian@phpunit.de", 952 | "role": "lead" 953 | } 954 | ], 955 | "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", 956 | "homepage": "https://github.com/sebastianbergmann/php-code-coverage", 957 | "keywords": [ 958 | "coverage", 959 | "testing", 960 | "xunit" 961 | ], 962 | "support": { 963 | "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", 964 | "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.15" 965 | }, 966 | "funding": [ 967 | { 968 | "url": "https://github.com/sebastianbergmann", 969 | "type": "github" 970 | } 971 | ], 972 | "time": "2022-03-07T09:28:20+00:00" 973 | }, 974 | { 975 | "name": "phpunit/php-file-iterator", 976 | "version": "3.0.6", 977 | "source": { 978 | "type": "git", 979 | "url": "https://github.com/sebastianbergmann/php-file-iterator.git", 980 | "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" 981 | }, 982 | "dist": { 983 | "type": "zip", 984 | "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", 985 | "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", 986 | "shasum": "" 987 | }, 988 | "require": { 989 | "php": ">=7.3" 990 | }, 991 | "require-dev": { 992 | "phpunit/phpunit": "^9.3" 993 | }, 994 | "type": "library", 995 | "extra": { 996 | "branch-alias": { 997 | "dev-master": "3.0-dev" 998 | } 999 | }, 1000 | "autoload": { 1001 | "classmap": [ 1002 | "src/" 1003 | ] 1004 | }, 1005 | "notification-url": "https://packagist.org/downloads/", 1006 | "license": [ 1007 | "BSD-3-Clause" 1008 | ], 1009 | "authors": [ 1010 | { 1011 | "name": "Sebastian Bergmann", 1012 | "email": "sebastian@phpunit.de", 1013 | "role": "lead" 1014 | } 1015 | ], 1016 | "description": "FilterIterator implementation that filters files based on a list of suffixes.", 1017 | "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", 1018 | "keywords": [ 1019 | "filesystem", 1020 | "iterator" 1021 | ], 1022 | "support": { 1023 | "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", 1024 | "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" 1025 | }, 1026 | "funding": [ 1027 | { 1028 | "url": "https://github.com/sebastianbergmann", 1029 | "type": "github" 1030 | } 1031 | ], 1032 | "time": "2021-12-02T12:48:52+00:00" 1033 | }, 1034 | { 1035 | "name": "phpunit/php-invoker", 1036 | "version": "3.1.1", 1037 | "source": { 1038 | "type": "git", 1039 | "url": "https://github.com/sebastianbergmann/php-invoker.git", 1040 | "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" 1041 | }, 1042 | "dist": { 1043 | "type": "zip", 1044 | "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", 1045 | "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", 1046 | "shasum": "" 1047 | }, 1048 | "require": { 1049 | "php": ">=7.3" 1050 | }, 1051 | "require-dev": { 1052 | "ext-pcntl": "*", 1053 | "phpunit/phpunit": "^9.3" 1054 | }, 1055 | "suggest": { 1056 | "ext-pcntl": "*" 1057 | }, 1058 | "type": "library", 1059 | "extra": { 1060 | "branch-alias": { 1061 | "dev-master": "3.1-dev" 1062 | } 1063 | }, 1064 | "autoload": { 1065 | "classmap": [ 1066 | "src/" 1067 | ] 1068 | }, 1069 | "notification-url": "https://packagist.org/downloads/", 1070 | "license": [ 1071 | "BSD-3-Clause" 1072 | ], 1073 | "authors": [ 1074 | { 1075 | "name": "Sebastian Bergmann", 1076 | "email": "sebastian@phpunit.de", 1077 | "role": "lead" 1078 | } 1079 | ], 1080 | "description": "Invoke callables with a timeout", 1081 | "homepage": "https://github.com/sebastianbergmann/php-invoker/", 1082 | "keywords": [ 1083 | "process" 1084 | ], 1085 | "support": { 1086 | "issues": "https://github.com/sebastianbergmann/php-invoker/issues", 1087 | "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" 1088 | }, 1089 | "funding": [ 1090 | { 1091 | "url": "https://github.com/sebastianbergmann", 1092 | "type": "github" 1093 | } 1094 | ], 1095 | "time": "2020-09-28T05:58:55+00:00" 1096 | }, 1097 | { 1098 | "name": "phpunit/php-text-template", 1099 | "version": "2.0.4", 1100 | "source": { 1101 | "type": "git", 1102 | "url": "https://github.com/sebastianbergmann/php-text-template.git", 1103 | "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" 1104 | }, 1105 | "dist": { 1106 | "type": "zip", 1107 | "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", 1108 | "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", 1109 | "shasum": "" 1110 | }, 1111 | "require": { 1112 | "php": ">=7.3" 1113 | }, 1114 | "require-dev": { 1115 | "phpunit/phpunit": "^9.3" 1116 | }, 1117 | "type": "library", 1118 | "extra": { 1119 | "branch-alias": { 1120 | "dev-master": "2.0-dev" 1121 | } 1122 | }, 1123 | "autoload": { 1124 | "classmap": [ 1125 | "src/" 1126 | ] 1127 | }, 1128 | "notification-url": "https://packagist.org/downloads/", 1129 | "license": [ 1130 | "BSD-3-Clause" 1131 | ], 1132 | "authors": [ 1133 | { 1134 | "name": "Sebastian Bergmann", 1135 | "email": "sebastian@phpunit.de", 1136 | "role": "lead" 1137 | } 1138 | ], 1139 | "description": "Simple template engine.", 1140 | "homepage": "https://github.com/sebastianbergmann/php-text-template/", 1141 | "keywords": [ 1142 | "template" 1143 | ], 1144 | "support": { 1145 | "issues": "https://github.com/sebastianbergmann/php-text-template/issues", 1146 | "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" 1147 | }, 1148 | "funding": [ 1149 | { 1150 | "url": "https://github.com/sebastianbergmann", 1151 | "type": "github" 1152 | } 1153 | ], 1154 | "time": "2020-10-26T05:33:50+00:00" 1155 | }, 1156 | { 1157 | "name": "phpunit/php-timer", 1158 | "version": "5.0.3", 1159 | "source": { 1160 | "type": "git", 1161 | "url": "https://github.com/sebastianbergmann/php-timer.git", 1162 | "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" 1163 | }, 1164 | "dist": { 1165 | "type": "zip", 1166 | "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", 1167 | "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", 1168 | "shasum": "" 1169 | }, 1170 | "require": { 1171 | "php": ">=7.3" 1172 | }, 1173 | "require-dev": { 1174 | "phpunit/phpunit": "^9.3" 1175 | }, 1176 | "type": "library", 1177 | "extra": { 1178 | "branch-alias": { 1179 | "dev-master": "5.0-dev" 1180 | } 1181 | }, 1182 | "autoload": { 1183 | "classmap": [ 1184 | "src/" 1185 | ] 1186 | }, 1187 | "notification-url": "https://packagist.org/downloads/", 1188 | "license": [ 1189 | "BSD-3-Clause" 1190 | ], 1191 | "authors": [ 1192 | { 1193 | "name": "Sebastian Bergmann", 1194 | "email": "sebastian@phpunit.de", 1195 | "role": "lead" 1196 | } 1197 | ], 1198 | "description": "Utility class for timing", 1199 | "homepage": "https://github.com/sebastianbergmann/php-timer/", 1200 | "keywords": [ 1201 | "timer" 1202 | ], 1203 | "support": { 1204 | "issues": "https://github.com/sebastianbergmann/php-timer/issues", 1205 | "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" 1206 | }, 1207 | "funding": [ 1208 | { 1209 | "url": "https://github.com/sebastianbergmann", 1210 | "type": "github" 1211 | } 1212 | ], 1213 | "time": "2020-10-26T13:16:10+00:00" 1214 | }, 1215 | { 1216 | "name": "phpunit/phpunit", 1217 | "version": "9.5.20", 1218 | "source": { 1219 | "type": "git", 1220 | "url": "https://github.com/sebastianbergmann/phpunit.git", 1221 | "reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba" 1222 | }, 1223 | "dist": { 1224 | "type": "zip", 1225 | "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/12bc8879fb65aef2138b26fc633cb1e3620cffba", 1226 | "reference": "12bc8879fb65aef2138b26fc633cb1e3620cffba", 1227 | "shasum": "" 1228 | }, 1229 | "require": { 1230 | "doctrine/instantiator": "^1.3.1", 1231 | "ext-dom": "*", 1232 | "ext-json": "*", 1233 | "ext-libxml": "*", 1234 | "ext-mbstring": "*", 1235 | "ext-xml": "*", 1236 | "ext-xmlwriter": "*", 1237 | "myclabs/deep-copy": "^1.10.1", 1238 | "phar-io/manifest": "^2.0.3", 1239 | "phar-io/version": "^3.0.2", 1240 | "php": ">=7.3", 1241 | "phpspec/prophecy": "^1.12.1", 1242 | "phpunit/php-code-coverage": "^9.2.13", 1243 | "phpunit/php-file-iterator": "^3.0.5", 1244 | "phpunit/php-invoker": "^3.1.1", 1245 | "phpunit/php-text-template": "^2.0.3", 1246 | "phpunit/php-timer": "^5.0.2", 1247 | "sebastian/cli-parser": "^1.0.1", 1248 | "sebastian/code-unit": "^1.0.6", 1249 | "sebastian/comparator": "^4.0.5", 1250 | "sebastian/diff": "^4.0.3", 1251 | "sebastian/environment": "^5.1.3", 1252 | "sebastian/exporter": "^4.0.3", 1253 | "sebastian/global-state": "^5.0.1", 1254 | "sebastian/object-enumerator": "^4.0.3", 1255 | "sebastian/resource-operations": "^3.0.3", 1256 | "sebastian/type": "^3.0", 1257 | "sebastian/version": "^3.0.2" 1258 | }, 1259 | "require-dev": { 1260 | "ext-pdo": "*", 1261 | "phpspec/prophecy-phpunit": "^2.0.1" 1262 | }, 1263 | "suggest": { 1264 | "ext-soap": "*", 1265 | "ext-xdebug": "*" 1266 | }, 1267 | "bin": [ 1268 | "phpunit" 1269 | ], 1270 | "type": "library", 1271 | "extra": { 1272 | "branch-alias": { 1273 | "dev-master": "9.5-dev" 1274 | } 1275 | }, 1276 | "autoload": { 1277 | "files": [ 1278 | "src/Framework/Assert/Functions.php" 1279 | ], 1280 | "classmap": [ 1281 | "src/" 1282 | ] 1283 | }, 1284 | "notification-url": "https://packagist.org/downloads/", 1285 | "license": [ 1286 | "BSD-3-Clause" 1287 | ], 1288 | "authors": [ 1289 | { 1290 | "name": "Sebastian Bergmann", 1291 | "email": "sebastian@phpunit.de", 1292 | "role": "lead" 1293 | } 1294 | ], 1295 | "description": "The PHP Unit Testing framework.", 1296 | "homepage": "https://phpunit.de/", 1297 | "keywords": [ 1298 | "phpunit", 1299 | "testing", 1300 | "xunit" 1301 | ], 1302 | "support": { 1303 | "issues": "https://github.com/sebastianbergmann/phpunit/issues", 1304 | "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.20" 1305 | }, 1306 | "funding": [ 1307 | { 1308 | "url": "https://phpunit.de/sponsors.html", 1309 | "type": "custom" 1310 | }, 1311 | { 1312 | "url": "https://github.com/sebastianbergmann", 1313 | "type": "github" 1314 | } 1315 | ], 1316 | "time": "2022-04-01T12:37:26+00:00" 1317 | }, 1318 | { 1319 | "name": "sebastian/cli-parser", 1320 | "version": "1.0.1", 1321 | "source": { 1322 | "type": "git", 1323 | "url": "https://github.com/sebastianbergmann/cli-parser.git", 1324 | "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" 1325 | }, 1326 | "dist": { 1327 | "type": "zip", 1328 | "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", 1329 | "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", 1330 | "shasum": "" 1331 | }, 1332 | "require": { 1333 | "php": ">=7.3" 1334 | }, 1335 | "require-dev": { 1336 | "phpunit/phpunit": "^9.3" 1337 | }, 1338 | "type": "library", 1339 | "extra": { 1340 | "branch-alias": { 1341 | "dev-master": "1.0-dev" 1342 | } 1343 | }, 1344 | "autoload": { 1345 | "classmap": [ 1346 | "src/" 1347 | ] 1348 | }, 1349 | "notification-url": "https://packagist.org/downloads/", 1350 | "license": [ 1351 | "BSD-3-Clause" 1352 | ], 1353 | "authors": [ 1354 | { 1355 | "name": "Sebastian Bergmann", 1356 | "email": "sebastian@phpunit.de", 1357 | "role": "lead" 1358 | } 1359 | ], 1360 | "description": "Library for parsing CLI options", 1361 | "homepage": "https://github.com/sebastianbergmann/cli-parser", 1362 | "support": { 1363 | "issues": "https://github.com/sebastianbergmann/cli-parser/issues", 1364 | "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" 1365 | }, 1366 | "funding": [ 1367 | { 1368 | "url": "https://github.com/sebastianbergmann", 1369 | "type": "github" 1370 | } 1371 | ], 1372 | "time": "2020-09-28T06:08:49+00:00" 1373 | }, 1374 | { 1375 | "name": "sebastian/code-unit", 1376 | "version": "1.0.8", 1377 | "source": { 1378 | "type": "git", 1379 | "url": "https://github.com/sebastianbergmann/code-unit.git", 1380 | "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" 1381 | }, 1382 | "dist": { 1383 | "type": "zip", 1384 | "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", 1385 | "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", 1386 | "shasum": "" 1387 | }, 1388 | "require": { 1389 | "php": ">=7.3" 1390 | }, 1391 | "require-dev": { 1392 | "phpunit/phpunit": "^9.3" 1393 | }, 1394 | "type": "library", 1395 | "extra": { 1396 | "branch-alias": { 1397 | "dev-master": "1.0-dev" 1398 | } 1399 | }, 1400 | "autoload": { 1401 | "classmap": [ 1402 | "src/" 1403 | ] 1404 | }, 1405 | "notification-url": "https://packagist.org/downloads/", 1406 | "license": [ 1407 | "BSD-3-Clause" 1408 | ], 1409 | "authors": [ 1410 | { 1411 | "name": "Sebastian Bergmann", 1412 | "email": "sebastian@phpunit.de", 1413 | "role": "lead" 1414 | } 1415 | ], 1416 | "description": "Collection of value objects that represent the PHP code units", 1417 | "homepage": "https://github.com/sebastianbergmann/code-unit", 1418 | "support": { 1419 | "issues": "https://github.com/sebastianbergmann/code-unit/issues", 1420 | "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" 1421 | }, 1422 | "funding": [ 1423 | { 1424 | "url": "https://github.com/sebastianbergmann", 1425 | "type": "github" 1426 | } 1427 | ], 1428 | "time": "2020-10-26T13:08:54+00:00" 1429 | }, 1430 | { 1431 | "name": "sebastian/code-unit-reverse-lookup", 1432 | "version": "2.0.3", 1433 | "source": { 1434 | "type": "git", 1435 | "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", 1436 | "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" 1437 | }, 1438 | "dist": { 1439 | "type": "zip", 1440 | "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", 1441 | "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", 1442 | "shasum": "" 1443 | }, 1444 | "require": { 1445 | "php": ">=7.3" 1446 | }, 1447 | "require-dev": { 1448 | "phpunit/phpunit": "^9.3" 1449 | }, 1450 | "type": "library", 1451 | "extra": { 1452 | "branch-alias": { 1453 | "dev-master": "2.0-dev" 1454 | } 1455 | }, 1456 | "autoload": { 1457 | "classmap": [ 1458 | "src/" 1459 | ] 1460 | }, 1461 | "notification-url": "https://packagist.org/downloads/", 1462 | "license": [ 1463 | "BSD-3-Clause" 1464 | ], 1465 | "authors": [ 1466 | { 1467 | "name": "Sebastian Bergmann", 1468 | "email": "sebastian@phpunit.de" 1469 | } 1470 | ], 1471 | "description": "Looks up which function or method a line of code belongs to", 1472 | "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", 1473 | "support": { 1474 | "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", 1475 | "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" 1476 | }, 1477 | "funding": [ 1478 | { 1479 | "url": "https://github.com/sebastianbergmann", 1480 | "type": "github" 1481 | } 1482 | ], 1483 | "time": "2020-09-28T05:30:19+00:00" 1484 | }, 1485 | { 1486 | "name": "sebastian/comparator", 1487 | "version": "4.0.6", 1488 | "source": { 1489 | "type": "git", 1490 | "url": "https://github.com/sebastianbergmann/comparator.git", 1491 | "reference": "55f4261989e546dc112258c7a75935a81a7ce382" 1492 | }, 1493 | "dist": { 1494 | "type": "zip", 1495 | "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", 1496 | "reference": "55f4261989e546dc112258c7a75935a81a7ce382", 1497 | "shasum": "" 1498 | }, 1499 | "require": { 1500 | "php": ">=7.3", 1501 | "sebastian/diff": "^4.0", 1502 | "sebastian/exporter": "^4.0" 1503 | }, 1504 | "require-dev": { 1505 | "phpunit/phpunit": "^9.3" 1506 | }, 1507 | "type": "library", 1508 | "extra": { 1509 | "branch-alias": { 1510 | "dev-master": "4.0-dev" 1511 | } 1512 | }, 1513 | "autoload": { 1514 | "classmap": [ 1515 | "src/" 1516 | ] 1517 | }, 1518 | "notification-url": "https://packagist.org/downloads/", 1519 | "license": [ 1520 | "BSD-3-Clause" 1521 | ], 1522 | "authors": [ 1523 | { 1524 | "name": "Sebastian Bergmann", 1525 | "email": "sebastian@phpunit.de" 1526 | }, 1527 | { 1528 | "name": "Jeff Welch", 1529 | "email": "whatthejeff@gmail.com" 1530 | }, 1531 | { 1532 | "name": "Volker Dusch", 1533 | "email": "github@wallbash.com" 1534 | }, 1535 | { 1536 | "name": "Bernhard Schussek", 1537 | "email": "bschussek@2bepublished.at" 1538 | } 1539 | ], 1540 | "description": "Provides the functionality to compare PHP values for equality", 1541 | "homepage": "https://github.com/sebastianbergmann/comparator", 1542 | "keywords": [ 1543 | "comparator", 1544 | "compare", 1545 | "equality" 1546 | ], 1547 | "support": { 1548 | "issues": "https://github.com/sebastianbergmann/comparator/issues", 1549 | "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" 1550 | }, 1551 | "funding": [ 1552 | { 1553 | "url": "https://github.com/sebastianbergmann", 1554 | "type": "github" 1555 | } 1556 | ], 1557 | "time": "2020-10-26T15:49:45+00:00" 1558 | }, 1559 | { 1560 | "name": "sebastian/complexity", 1561 | "version": "2.0.2", 1562 | "source": { 1563 | "type": "git", 1564 | "url": "https://github.com/sebastianbergmann/complexity.git", 1565 | "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" 1566 | }, 1567 | "dist": { 1568 | "type": "zip", 1569 | "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", 1570 | "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", 1571 | "shasum": "" 1572 | }, 1573 | "require": { 1574 | "nikic/php-parser": "^4.7", 1575 | "php": ">=7.3" 1576 | }, 1577 | "require-dev": { 1578 | "phpunit/phpunit": "^9.3" 1579 | }, 1580 | "type": "library", 1581 | "extra": { 1582 | "branch-alias": { 1583 | "dev-master": "2.0-dev" 1584 | } 1585 | }, 1586 | "autoload": { 1587 | "classmap": [ 1588 | "src/" 1589 | ] 1590 | }, 1591 | "notification-url": "https://packagist.org/downloads/", 1592 | "license": [ 1593 | "BSD-3-Clause" 1594 | ], 1595 | "authors": [ 1596 | { 1597 | "name": "Sebastian Bergmann", 1598 | "email": "sebastian@phpunit.de", 1599 | "role": "lead" 1600 | } 1601 | ], 1602 | "description": "Library for calculating the complexity of PHP code units", 1603 | "homepage": "https://github.com/sebastianbergmann/complexity", 1604 | "support": { 1605 | "issues": "https://github.com/sebastianbergmann/complexity/issues", 1606 | "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" 1607 | }, 1608 | "funding": [ 1609 | { 1610 | "url": "https://github.com/sebastianbergmann", 1611 | "type": "github" 1612 | } 1613 | ], 1614 | "time": "2020-10-26T15:52:27+00:00" 1615 | }, 1616 | { 1617 | "name": "sebastian/diff", 1618 | "version": "4.0.4", 1619 | "source": { 1620 | "type": "git", 1621 | "url": "https://github.com/sebastianbergmann/diff.git", 1622 | "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" 1623 | }, 1624 | "dist": { 1625 | "type": "zip", 1626 | "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", 1627 | "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", 1628 | "shasum": "" 1629 | }, 1630 | "require": { 1631 | "php": ">=7.3" 1632 | }, 1633 | "require-dev": { 1634 | "phpunit/phpunit": "^9.3", 1635 | "symfony/process": "^4.2 || ^5" 1636 | }, 1637 | "type": "library", 1638 | "extra": { 1639 | "branch-alias": { 1640 | "dev-master": "4.0-dev" 1641 | } 1642 | }, 1643 | "autoload": { 1644 | "classmap": [ 1645 | "src/" 1646 | ] 1647 | }, 1648 | "notification-url": "https://packagist.org/downloads/", 1649 | "license": [ 1650 | "BSD-3-Clause" 1651 | ], 1652 | "authors": [ 1653 | { 1654 | "name": "Sebastian Bergmann", 1655 | "email": "sebastian@phpunit.de" 1656 | }, 1657 | { 1658 | "name": "Kore Nordmann", 1659 | "email": "mail@kore-nordmann.de" 1660 | } 1661 | ], 1662 | "description": "Diff implementation", 1663 | "homepage": "https://github.com/sebastianbergmann/diff", 1664 | "keywords": [ 1665 | "diff", 1666 | "udiff", 1667 | "unidiff", 1668 | "unified diff" 1669 | ], 1670 | "support": { 1671 | "issues": "https://github.com/sebastianbergmann/diff/issues", 1672 | "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" 1673 | }, 1674 | "funding": [ 1675 | { 1676 | "url": "https://github.com/sebastianbergmann", 1677 | "type": "github" 1678 | } 1679 | ], 1680 | "time": "2020-10-26T13:10:38+00:00" 1681 | }, 1682 | { 1683 | "name": "sebastian/environment", 1684 | "version": "5.1.4", 1685 | "source": { 1686 | "type": "git", 1687 | "url": "https://github.com/sebastianbergmann/environment.git", 1688 | "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7" 1689 | }, 1690 | "dist": { 1691 | "type": "zip", 1692 | "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7", 1693 | "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7", 1694 | "shasum": "" 1695 | }, 1696 | "require": { 1697 | "php": ">=7.3" 1698 | }, 1699 | "require-dev": { 1700 | "phpunit/phpunit": "^9.3" 1701 | }, 1702 | "suggest": { 1703 | "ext-posix": "*" 1704 | }, 1705 | "type": "library", 1706 | "extra": { 1707 | "branch-alias": { 1708 | "dev-master": "5.1-dev" 1709 | } 1710 | }, 1711 | "autoload": { 1712 | "classmap": [ 1713 | "src/" 1714 | ] 1715 | }, 1716 | "notification-url": "https://packagist.org/downloads/", 1717 | "license": [ 1718 | "BSD-3-Clause" 1719 | ], 1720 | "authors": [ 1721 | { 1722 | "name": "Sebastian Bergmann", 1723 | "email": "sebastian@phpunit.de" 1724 | } 1725 | ], 1726 | "description": "Provides functionality to handle HHVM/PHP environments", 1727 | "homepage": "http://www.github.com/sebastianbergmann/environment", 1728 | "keywords": [ 1729 | "Xdebug", 1730 | "environment", 1731 | "hhvm" 1732 | ], 1733 | "support": { 1734 | "issues": "https://github.com/sebastianbergmann/environment/issues", 1735 | "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4" 1736 | }, 1737 | "funding": [ 1738 | { 1739 | "url": "https://github.com/sebastianbergmann", 1740 | "type": "github" 1741 | } 1742 | ], 1743 | "time": "2022-04-03T09:37:03+00:00" 1744 | }, 1745 | { 1746 | "name": "sebastian/exporter", 1747 | "version": "4.0.4", 1748 | "source": { 1749 | "type": "git", 1750 | "url": "https://github.com/sebastianbergmann/exporter.git", 1751 | "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9" 1752 | }, 1753 | "dist": { 1754 | "type": "zip", 1755 | "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9", 1756 | "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9", 1757 | "shasum": "" 1758 | }, 1759 | "require": { 1760 | "php": ">=7.3", 1761 | "sebastian/recursion-context": "^4.0" 1762 | }, 1763 | "require-dev": { 1764 | "ext-mbstring": "*", 1765 | "phpunit/phpunit": "^9.3" 1766 | }, 1767 | "type": "library", 1768 | "extra": { 1769 | "branch-alias": { 1770 | "dev-master": "4.0-dev" 1771 | } 1772 | }, 1773 | "autoload": { 1774 | "classmap": [ 1775 | "src/" 1776 | ] 1777 | }, 1778 | "notification-url": "https://packagist.org/downloads/", 1779 | "license": [ 1780 | "BSD-3-Clause" 1781 | ], 1782 | "authors": [ 1783 | { 1784 | "name": "Sebastian Bergmann", 1785 | "email": "sebastian@phpunit.de" 1786 | }, 1787 | { 1788 | "name": "Jeff Welch", 1789 | "email": "whatthejeff@gmail.com" 1790 | }, 1791 | { 1792 | "name": "Volker Dusch", 1793 | "email": "github@wallbash.com" 1794 | }, 1795 | { 1796 | "name": "Adam Harvey", 1797 | "email": "aharvey@php.net" 1798 | }, 1799 | { 1800 | "name": "Bernhard Schussek", 1801 | "email": "bschussek@gmail.com" 1802 | } 1803 | ], 1804 | "description": "Provides the functionality to export PHP variables for visualization", 1805 | "homepage": "https://www.github.com/sebastianbergmann/exporter", 1806 | "keywords": [ 1807 | "export", 1808 | "exporter" 1809 | ], 1810 | "support": { 1811 | "issues": "https://github.com/sebastianbergmann/exporter/issues", 1812 | "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4" 1813 | }, 1814 | "funding": [ 1815 | { 1816 | "url": "https://github.com/sebastianbergmann", 1817 | "type": "github" 1818 | } 1819 | ], 1820 | "time": "2021-11-11T14:18:36+00:00" 1821 | }, 1822 | { 1823 | "name": "sebastian/global-state", 1824 | "version": "5.0.5", 1825 | "source": { 1826 | "type": "git", 1827 | "url": "https://github.com/sebastianbergmann/global-state.git", 1828 | "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" 1829 | }, 1830 | "dist": { 1831 | "type": "zip", 1832 | "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", 1833 | "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", 1834 | "shasum": "" 1835 | }, 1836 | "require": { 1837 | "php": ">=7.3", 1838 | "sebastian/object-reflector": "^2.0", 1839 | "sebastian/recursion-context": "^4.0" 1840 | }, 1841 | "require-dev": { 1842 | "ext-dom": "*", 1843 | "phpunit/phpunit": "^9.3" 1844 | }, 1845 | "suggest": { 1846 | "ext-uopz": "*" 1847 | }, 1848 | "type": "library", 1849 | "extra": { 1850 | "branch-alias": { 1851 | "dev-master": "5.0-dev" 1852 | } 1853 | }, 1854 | "autoload": { 1855 | "classmap": [ 1856 | "src/" 1857 | ] 1858 | }, 1859 | "notification-url": "https://packagist.org/downloads/", 1860 | "license": [ 1861 | "BSD-3-Clause" 1862 | ], 1863 | "authors": [ 1864 | { 1865 | "name": "Sebastian Bergmann", 1866 | "email": "sebastian@phpunit.de" 1867 | } 1868 | ], 1869 | "description": "Snapshotting of global state", 1870 | "homepage": "http://www.github.com/sebastianbergmann/global-state", 1871 | "keywords": [ 1872 | "global state" 1873 | ], 1874 | "support": { 1875 | "issues": "https://github.com/sebastianbergmann/global-state/issues", 1876 | "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" 1877 | }, 1878 | "funding": [ 1879 | { 1880 | "url": "https://github.com/sebastianbergmann", 1881 | "type": "github" 1882 | } 1883 | ], 1884 | "time": "2022-02-14T08:28:10+00:00" 1885 | }, 1886 | { 1887 | "name": "sebastian/lines-of-code", 1888 | "version": "1.0.3", 1889 | "source": { 1890 | "type": "git", 1891 | "url": "https://github.com/sebastianbergmann/lines-of-code.git", 1892 | "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" 1893 | }, 1894 | "dist": { 1895 | "type": "zip", 1896 | "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", 1897 | "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", 1898 | "shasum": "" 1899 | }, 1900 | "require": { 1901 | "nikic/php-parser": "^4.6", 1902 | "php": ">=7.3" 1903 | }, 1904 | "require-dev": { 1905 | "phpunit/phpunit": "^9.3" 1906 | }, 1907 | "type": "library", 1908 | "extra": { 1909 | "branch-alias": { 1910 | "dev-master": "1.0-dev" 1911 | } 1912 | }, 1913 | "autoload": { 1914 | "classmap": [ 1915 | "src/" 1916 | ] 1917 | }, 1918 | "notification-url": "https://packagist.org/downloads/", 1919 | "license": [ 1920 | "BSD-3-Clause" 1921 | ], 1922 | "authors": [ 1923 | { 1924 | "name": "Sebastian Bergmann", 1925 | "email": "sebastian@phpunit.de", 1926 | "role": "lead" 1927 | } 1928 | ], 1929 | "description": "Library for counting the lines of code in PHP source code", 1930 | "homepage": "https://github.com/sebastianbergmann/lines-of-code", 1931 | "support": { 1932 | "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", 1933 | "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" 1934 | }, 1935 | "funding": [ 1936 | { 1937 | "url": "https://github.com/sebastianbergmann", 1938 | "type": "github" 1939 | } 1940 | ], 1941 | "time": "2020-11-28T06:42:11+00:00" 1942 | }, 1943 | { 1944 | "name": "sebastian/object-enumerator", 1945 | "version": "4.0.4", 1946 | "source": { 1947 | "type": "git", 1948 | "url": "https://github.com/sebastianbergmann/object-enumerator.git", 1949 | "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" 1950 | }, 1951 | "dist": { 1952 | "type": "zip", 1953 | "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", 1954 | "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", 1955 | "shasum": "" 1956 | }, 1957 | "require": { 1958 | "php": ">=7.3", 1959 | "sebastian/object-reflector": "^2.0", 1960 | "sebastian/recursion-context": "^4.0" 1961 | }, 1962 | "require-dev": { 1963 | "phpunit/phpunit": "^9.3" 1964 | }, 1965 | "type": "library", 1966 | "extra": { 1967 | "branch-alias": { 1968 | "dev-master": "4.0-dev" 1969 | } 1970 | }, 1971 | "autoload": { 1972 | "classmap": [ 1973 | "src/" 1974 | ] 1975 | }, 1976 | "notification-url": "https://packagist.org/downloads/", 1977 | "license": [ 1978 | "BSD-3-Clause" 1979 | ], 1980 | "authors": [ 1981 | { 1982 | "name": "Sebastian Bergmann", 1983 | "email": "sebastian@phpunit.de" 1984 | } 1985 | ], 1986 | "description": "Traverses array structures and object graphs to enumerate all referenced objects", 1987 | "homepage": "https://github.com/sebastianbergmann/object-enumerator/", 1988 | "support": { 1989 | "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", 1990 | "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" 1991 | }, 1992 | "funding": [ 1993 | { 1994 | "url": "https://github.com/sebastianbergmann", 1995 | "type": "github" 1996 | } 1997 | ], 1998 | "time": "2020-10-26T13:12:34+00:00" 1999 | }, 2000 | { 2001 | "name": "sebastian/object-reflector", 2002 | "version": "2.0.4", 2003 | "source": { 2004 | "type": "git", 2005 | "url": "https://github.com/sebastianbergmann/object-reflector.git", 2006 | "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" 2007 | }, 2008 | "dist": { 2009 | "type": "zip", 2010 | "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", 2011 | "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", 2012 | "shasum": "" 2013 | }, 2014 | "require": { 2015 | "php": ">=7.3" 2016 | }, 2017 | "require-dev": { 2018 | "phpunit/phpunit": "^9.3" 2019 | }, 2020 | "type": "library", 2021 | "extra": { 2022 | "branch-alias": { 2023 | "dev-master": "2.0-dev" 2024 | } 2025 | }, 2026 | "autoload": { 2027 | "classmap": [ 2028 | "src/" 2029 | ] 2030 | }, 2031 | "notification-url": "https://packagist.org/downloads/", 2032 | "license": [ 2033 | "BSD-3-Clause" 2034 | ], 2035 | "authors": [ 2036 | { 2037 | "name": "Sebastian Bergmann", 2038 | "email": "sebastian@phpunit.de" 2039 | } 2040 | ], 2041 | "description": "Allows reflection of object attributes, including inherited and non-public ones", 2042 | "homepage": "https://github.com/sebastianbergmann/object-reflector/", 2043 | "support": { 2044 | "issues": "https://github.com/sebastianbergmann/object-reflector/issues", 2045 | "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" 2046 | }, 2047 | "funding": [ 2048 | { 2049 | "url": "https://github.com/sebastianbergmann", 2050 | "type": "github" 2051 | } 2052 | ], 2053 | "time": "2020-10-26T13:14:26+00:00" 2054 | }, 2055 | { 2056 | "name": "sebastian/recursion-context", 2057 | "version": "4.0.4", 2058 | "source": { 2059 | "type": "git", 2060 | "url": "https://github.com/sebastianbergmann/recursion-context.git", 2061 | "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" 2062 | }, 2063 | "dist": { 2064 | "type": "zip", 2065 | "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", 2066 | "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", 2067 | "shasum": "" 2068 | }, 2069 | "require": { 2070 | "php": ">=7.3" 2071 | }, 2072 | "require-dev": { 2073 | "phpunit/phpunit": "^9.3" 2074 | }, 2075 | "type": "library", 2076 | "extra": { 2077 | "branch-alias": { 2078 | "dev-master": "4.0-dev" 2079 | } 2080 | }, 2081 | "autoload": { 2082 | "classmap": [ 2083 | "src/" 2084 | ] 2085 | }, 2086 | "notification-url": "https://packagist.org/downloads/", 2087 | "license": [ 2088 | "BSD-3-Clause" 2089 | ], 2090 | "authors": [ 2091 | { 2092 | "name": "Sebastian Bergmann", 2093 | "email": "sebastian@phpunit.de" 2094 | }, 2095 | { 2096 | "name": "Jeff Welch", 2097 | "email": "whatthejeff@gmail.com" 2098 | }, 2099 | { 2100 | "name": "Adam Harvey", 2101 | "email": "aharvey@php.net" 2102 | } 2103 | ], 2104 | "description": "Provides functionality to recursively process PHP variables", 2105 | "homepage": "http://www.github.com/sebastianbergmann/recursion-context", 2106 | "support": { 2107 | "issues": "https://github.com/sebastianbergmann/recursion-context/issues", 2108 | "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" 2109 | }, 2110 | "funding": [ 2111 | { 2112 | "url": "https://github.com/sebastianbergmann", 2113 | "type": "github" 2114 | } 2115 | ], 2116 | "time": "2020-10-26T13:17:30+00:00" 2117 | }, 2118 | { 2119 | "name": "sebastian/resource-operations", 2120 | "version": "3.0.3", 2121 | "source": { 2122 | "type": "git", 2123 | "url": "https://github.com/sebastianbergmann/resource-operations.git", 2124 | "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" 2125 | }, 2126 | "dist": { 2127 | "type": "zip", 2128 | "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", 2129 | "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", 2130 | "shasum": "" 2131 | }, 2132 | "require": { 2133 | "php": ">=7.3" 2134 | }, 2135 | "require-dev": { 2136 | "phpunit/phpunit": "^9.0" 2137 | }, 2138 | "type": "library", 2139 | "extra": { 2140 | "branch-alias": { 2141 | "dev-master": "3.0-dev" 2142 | } 2143 | }, 2144 | "autoload": { 2145 | "classmap": [ 2146 | "src/" 2147 | ] 2148 | }, 2149 | "notification-url": "https://packagist.org/downloads/", 2150 | "license": [ 2151 | "BSD-3-Clause" 2152 | ], 2153 | "authors": [ 2154 | { 2155 | "name": "Sebastian Bergmann", 2156 | "email": "sebastian@phpunit.de" 2157 | } 2158 | ], 2159 | "description": "Provides a list of PHP built-in functions that operate on resources", 2160 | "homepage": "https://www.github.com/sebastianbergmann/resource-operations", 2161 | "support": { 2162 | "issues": "https://github.com/sebastianbergmann/resource-operations/issues", 2163 | "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" 2164 | }, 2165 | "funding": [ 2166 | { 2167 | "url": "https://github.com/sebastianbergmann", 2168 | "type": "github" 2169 | } 2170 | ], 2171 | "time": "2020-09-28T06:45:17+00:00" 2172 | }, 2173 | { 2174 | "name": "sebastian/type", 2175 | "version": "3.0.0", 2176 | "source": { 2177 | "type": "git", 2178 | "url": "https://github.com/sebastianbergmann/type.git", 2179 | "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad" 2180 | }, 2181 | "dist": { 2182 | "type": "zip", 2183 | "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", 2184 | "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", 2185 | "shasum": "" 2186 | }, 2187 | "require": { 2188 | "php": ">=7.3" 2189 | }, 2190 | "require-dev": { 2191 | "phpunit/phpunit": "^9.5" 2192 | }, 2193 | "type": "library", 2194 | "extra": { 2195 | "branch-alias": { 2196 | "dev-master": "3.0-dev" 2197 | } 2198 | }, 2199 | "autoload": { 2200 | "classmap": [ 2201 | "src/" 2202 | ] 2203 | }, 2204 | "notification-url": "https://packagist.org/downloads/", 2205 | "license": [ 2206 | "BSD-3-Clause" 2207 | ], 2208 | "authors": [ 2209 | { 2210 | "name": "Sebastian Bergmann", 2211 | "email": "sebastian@phpunit.de", 2212 | "role": "lead" 2213 | } 2214 | ], 2215 | "description": "Collection of value objects that represent the types of the PHP type system", 2216 | "homepage": "https://github.com/sebastianbergmann/type", 2217 | "support": { 2218 | "issues": "https://github.com/sebastianbergmann/type/issues", 2219 | "source": "https://github.com/sebastianbergmann/type/tree/3.0.0" 2220 | }, 2221 | "funding": [ 2222 | { 2223 | "url": "https://github.com/sebastianbergmann", 2224 | "type": "github" 2225 | } 2226 | ], 2227 | "time": "2022-03-15T09:54:48+00:00" 2228 | }, 2229 | { 2230 | "name": "sebastian/version", 2231 | "version": "3.0.2", 2232 | "source": { 2233 | "type": "git", 2234 | "url": "https://github.com/sebastianbergmann/version.git", 2235 | "reference": "c6c1022351a901512170118436c764e473f6de8c" 2236 | }, 2237 | "dist": { 2238 | "type": "zip", 2239 | "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", 2240 | "reference": "c6c1022351a901512170118436c764e473f6de8c", 2241 | "shasum": "" 2242 | }, 2243 | "require": { 2244 | "php": ">=7.3" 2245 | }, 2246 | "type": "library", 2247 | "extra": { 2248 | "branch-alias": { 2249 | "dev-master": "3.0-dev" 2250 | } 2251 | }, 2252 | "autoload": { 2253 | "classmap": [ 2254 | "src/" 2255 | ] 2256 | }, 2257 | "notification-url": "https://packagist.org/downloads/", 2258 | "license": [ 2259 | "BSD-3-Clause" 2260 | ], 2261 | "authors": [ 2262 | { 2263 | "name": "Sebastian Bergmann", 2264 | "email": "sebastian@phpunit.de", 2265 | "role": "lead" 2266 | } 2267 | ], 2268 | "description": "Library that helps with managing the version number of Git-hosted PHP projects", 2269 | "homepage": "https://github.com/sebastianbergmann/version", 2270 | "support": { 2271 | "issues": "https://github.com/sebastianbergmann/version/issues", 2272 | "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" 2273 | }, 2274 | "funding": [ 2275 | { 2276 | "url": "https://github.com/sebastianbergmann", 2277 | "type": "github" 2278 | } 2279 | ], 2280 | "time": "2020-09-28T06:39:44+00:00" 2281 | }, 2282 | { 2283 | "name": "symfony/polyfill-ctype", 2284 | "version": "v1.25.0", 2285 | "source": { 2286 | "type": "git", 2287 | "url": "https://github.com/symfony/polyfill-ctype.git", 2288 | "reference": "30885182c981ab175d4d034db0f6f469898070ab" 2289 | }, 2290 | "dist": { 2291 | "type": "zip", 2292 | "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab", 2293 | "reference": "30885182c981ab175d4d034db0f6f469898070ab", 2294 | "shasum": "" 2295 | }, 2296 | "require": { 2297 | "php": ">=7.1" 2298 | }, 2299 | "provide": { 2300 | "ext-ctype": "*" 2301 | }, 2302 | "suggest": { 2303 | "ext-ctype": "For best performance" 2304 | }, 2305 | "type": "library", 2306 | "extra": { 2307 | "branch-alias": { 2308 | "dev-main": "1.23-dev" 2309 | }, 2310 | "thanks": { 2311 | "name": "symfony/polyfill", 2312 | "url": "https://github.com/symfony/polyfill" 2313 | } 2314 | }, 2315 | "autoload": { 2316 | "files": [ 2317 | "bootstrap.php" 2318 | ], 2319 | "psr-4": { 2320 | "Symfony\\Polyfill\\Ctype\\": "" 2321 | } 2322 | }, 2323 | "notification-url": "https://packagist.org/downloads/", 2324 | "license": [ 2325 | "MIT" 2326 | ], 2327 | "authors": [ 2328 | { 2329 | "name": "Gert de Pagter", 2330 | "email": "BackEndTea@gmail.com" 2331 | }, 2332 | { 2333 | "name": "Symfony Community", 2334 | "homepage": "https://symfony.com/contributors" 2335 | } 2336 | ], 2337 | "description": "Symfony polyfill for ctype functions", 2338 | "homepage": "https://symfony.com", 2339 | "keywords": [ 2340 | "compatibility", 2341 | "ctype", 2342 | "polyfill", 2343 | "portable" 2344 | ], 2345 | "support": { 2346 | "source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0" 2347 | }, 2348 | "funding": [ 2349 | { 2350 | "url": "https://symfony.com/sponsor", 2351 | "type": "custom" 2352 | }, 2353 | { 2354 | "url": "https://github.com/fabpot", 2355 | "type": "github" 2356 | }, 2357 | { 2358 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 2359 | "type": "tidelift" 2360 | } 2361 | ], 2362 | "time": "2021-10-20T20:35:02+00:00" 2363 | }, 2364 | { 2365 | "name": "theseer/tokenizer", 2366 | "version": "1.2.1", 2367 | "source": { 2368 | "type": "git", 2369 | "url": "https://github.com/theseer/tokenizer.git", 2370 | "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" 2371 | }, 2372 | "dist": { 2373 | "type": "zip", 2374 | "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", 2375 | "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", 2376 | "shasum": "" 2377 | }, 2378 | "require": { 2379 | "ext-dom": "*", 2380 | "ext-tokenizer": "*", 2381 | "ext-xmlwriter": "*", 2382 | "php": "^7.2 || ^8.0" 2383 | }, 2384 | "type": "library", 2385 | "autoload": { 2386 | "classmap": [ 2387 | "src/" 2388 | ] 2389 | }, 2390 | "notification-url": "https://packagist.org/downloads/", 2391 | "license": [ 2392 | "BSD-3-Clause" 2393 | ], 2394 | "authors": [ 2395 | { 2396 | "name": "Arne Blankerts", 2397 | "email": "arne@blankerts.de", 2398 | "role": "Developer" 2399 | } 2400 | ], 2401 | "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", 2402 | "support": { 2403 | "issues": "https://github.com/theseer/tokenizer/issues", 2404 | "source": "https://github.com/theseer/tokenizer/tree/1.2.1" 2405 | }, 2406 | "funding": [ 2407 | { 2408 | "url": "https://github.com/theseer", 2409 | "type": "github" 2410 | } 2411 | ], 2412 | "time": "2021-07-28T10:34:58+00:00" 2413 | }, 2414 | { 2415 | "name": "webmozart/assert", 2416 | "version": "1.10.0", 2417 | "source": { 2418 | "type": "git", 2419 | "url": "https://github.com/webmozarts/assert.git", 2420 | "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" 2421 | }, 2422 | "dist": { 2423 | "type": "zip", 2424 | "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", 2425 | "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", 2426 | "shasum": "" 2427 | }, 2428 | "require": { 2429 | "php": "^7.2 || ^8.0", 2430 | "symfony/polyfill-ctype": "^1.8" 2431 | }, 2432 | "conflict": { 2433 | "phpstan/phpstan": "<0.12.20", 2434 | "vimeo/psalm": "<4.6.1 || 4.6.2" 2435 | }, 2436 | "require-dev": { 2437 | "phpunit/phpunit": "^8.5.13" 2438 | }, 2439 | "type": "library", 2440 | "extra": { 2441 | "branch-alias": { 2442 | "dev-master": "1.10-dev" 2443 | } 2444 | }, 2445 | "autoload": { 2446 | "psr-4": { 2447 | "Webmozart\\Assert\\": "src/" 2448 | } 2449 | }, 2450 | "notification-url": "https://packagist.org/downloads/", 2451 | "license": [ 2452 | "MIT" 2453 | ], 2454 | "authors": [ 2455 | { 2456 | "name": "Bernhard Schussek", 2457 | "email": "bschussek@gmail.com" 2458 | } 2459 | ], 2460 | "description": "Assertions to validate method input/output with nice error messages.", 2461 | "keywords": [ 2462 | "assert", 2463 | "check", 2464 | "validate" 2465 | ], 2466 | "support": { 2467 | "issues": "https://github.com/webmozarts/assert/issues", 2468 | "source": "https://github.com/webmozarts/assert/tree/1.10.0" 2469 | }, 2470 | "time": "2021-03-09T10:59:23+00:00" 2471 | } 2472 | ], 2473 | "aliases": [], 2474 | "minimum-stability": "stable", 2475 | "stability-flags": [], 2476 | "prefer-stable": false, 2477 | "prefer-lowest": false, 2478 | "platform": { 2479 | "php": "^7.4|^8.0" 2480 | }, 2481 | "platform-dev": [], 2482 | "plugin-api-version": "2.1.0" 2483 | } 2484 | -------------------------------------------------------------------------------- /phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | ./tests 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/Migration.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace jamband\schemadump; 13 | 14 | /** 15 | * Migration class file. 16 | */ 17 | class Migration extends \yii\db\Migration 18 | { 19 | /** 20 | * @var string the table options 21 | */ 22 | protected $tableOptions = ''; 23 | 24 | /** 25 | * @inheritdoc 26 | */ 27 | public function init() 28 | { 29 | parent::init(); 30 | 31 | if ($this->db->driverName === 'mysql') { 32 | $this->tableOptions = 'ENGINE=InnoDB CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'; 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/SchemaDumpController.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace jamband\schemadump; 13 | 14 | use yii\base\Action; 15 | use yii\base\InvalidConfigException; 16 | use yii\base\NotSupportedException; 17 | use yii\console\Controller; 18 | use yii\console\ExitCode; 19 | use yii\db\ColumnSchema; 20 | use yii\db\Connection; 21 | use yii\db\Expression; 22 | use yii\db\TableSchema; 23 | use yii\di\Instance; 24 | 25 | /** 26 | * Generate the migration code from database schema. 27 | */ 28 | class SchemaDumpController extends Controller 29 | { 30 | /** 31 | * @inheritdoc 32 | */ 33 | public $defaultAction = 'create'; 34 | 35 | /** 36 | * @var string a migration table name 37 | */ 38 | public $migrationTable = 'migration'; 39 | 40 | /** 41 | * @var Connection|string the DB connection object or the application component ID of the DB connection. 42 | */ 43 | public $db = 'db'; 44 | 45 | /** 46 | * @param string $actionID 47 | * @return array|string[] 48 | */ 49 | public function options($actionID) 50 | { 51 | return array_merge(parent::options($actionID), [ 52 | 'migrationTable', 53 | 'db', 54 | ]); 55 | } 56 | 57 | /** 58 | * @param Action $action 59 | * @return bool 60 | * @throws InvalidConfigException 61 | */ 62 | public function beforeAction($action) 63 | { 64 | if (!parent::beforeAction($action)) { 65 | return false; 66 | } 67 | 68 | $this->db = Instance::ensure($this->db, Connection::class); 69 | 70 | return true; 71 | } 72 | 73 | /** 74 | * @return int 75 | * @throws NotSupportedException 76 | */ 77 | public function actionCreate() 78 | { 79 | $stdout = ''; 80 | 81 | foreach ($this->db->schema->getTableSchemas() as $table) { 82 | if ($table->name === $this->migrationTable) { 83 | continue; 84 | } 85 | 86 | $stdout .= static::generateCreateTable($table->name). 87 | static::generateColumns($table->columns, $this->db->schema->findUniqueIndexes($table)). 88 | static::generatePrimaryKey($table->primaryKey, $table->columns). 89 | static::generateTableOptions(); 90 | } 91 | 92 | foreach ($this->db->schema->getTableSchemas() as $table) { 93 | $stdout .= $this->generateForeignKey($table); 94 | } 95 | 96 | $this->stdout($stdout); 97 | 98 | return ExitCode::OK; 99 | } 100 | 101 | /** 102 | * Generates the 'dropTable' code. 103 | * @return integer the status of the action execution 104 | */ 105 | public function actionDrop() 106 | { 107 | $stdout = ''; 108 | 109 | foreach ($this->db->schema->getTableSchemas() as $table) { 110 | if ($table->name === $this->migrationTable) { 111 | continue; 112 | } 113 | 114 | $stdout .= static::generateDropTable($table->name); 115 | 116 | if (!empty($table->foreignKeys)) { 117 | $stdout .= ' // fk: '; 118 | 119 | foreach ($table->foreignKeys as $fk) { 120 | foreach ($fk as $k => $v) { 121 | if (0 === $k) { 122 | continue; 123 | } 124 | 125 | $stdout .= "$k, "; 126 | } 127 | } 128 | 129 | $stdout = rtrim($stdout, ', '); 130 | } 131 | 132 | $stdout .= "\n"; 133 | } 134 | 135 | $this->stdout($stdout); 136 | 137 | return ExitCode::OK; 138 | } 139 | 140 | /** 141 | * @param string $name 142 | * @return string 143 | */ 144 | private static function generateCreateTable($name) 145 | { 146 | return sprintf("// %s\n", $name). 147 | sprintf("\$this->createTable('{{%%%s}}', [\n", $name); 148 | } 149 | 150 | /** 151 | * Returns the columns definition. 152 | * @param array $columns 153 | * @param array $unique unique indexes 154 | * @return string 155 | */ 156 | private static function generateColumns(array $columns, array $unique) 157 | { 158 | $definition = ''; 159 | 160 | foreach ($columns as $column) { 161 | $tmp = sprintf(" '%s' => \$this->%s%s,\n", 162 | $column->name, static::getSchemaType($column), static::other($column, $unique)); 163 | 164 | if (null !== $column->enumValues) { 165 | $tmp = static::replaceEnumColumn($tmp); 166 | } 167 | 168 | $definition .= $tmp; 169 | } 170 | 171 | return $definition; 172 | } 173 | 174 | /** 175 | * Returns the primary key definition. 176 | * @param array $pk 177 | * @param array $columns 178 | * @return string the primary key definition 179 | */ 180 | private static function generatePrimaryKey(array $pk, array $columns) 181 | { 182 | if (empty($pk)) { 183 | return ''; 184 | } 185 | 186 | // Composite primary keys 187 | if (2 <= count($pk)) { 188 | $compositePk = implode(', ', $pk); 189 | return " 'PRIMARY KEY ($compositePk)',\n"; 190 | } 191 | 192 | // Primary key not an auto-increment 193 | $flag = false; 194 | 195 | foreach ($columns as $column) { 196 | if ($column->autoIncrement) { 197 | $flag = true; 198 | } 199 | } 200 | 201 | if (false === $flag) { 202 | return sprintf(" 'PRIMARY KEY (%s)',\n", $pk[0]); 203 | } 204 | 205 | return ''; 206 | } 207 | 208 | /** 209 | * @return string 210 | */ 211 | private static function generateTableOptions() 212 | { 213 | return "], \$this->tableOptions);\n\n"; 214 | } 215 | 216 | /** 217 | * Returns the foreign key definition. 218 | * @param TableSchema $table 219 | * @return string|null foreign key definition or null 220 | */ 221 | private function generateForeignKey(TableSchema $table) 222 | { 223 | if (empty($table->foreignKeys)) { 224 | return null; 225 | } 226 | 227 | $definition = "// fk: $table->name\n"; 228 | 229 | foreach ($table->foreignKeys as $fk) { 230 | $refTable = ''; 231 | $refColumns = ''; 232 | $columns = ''; 233 | 234 | foreach ($fk as $k => $v) { 235 | if (0 === $k) { 236 | $refTable = $v; 237 | } else { 238 | $columns = $k; 239 | $refColumns = $v; 240 | } 241 | } 242 | 243 | $definition .= sprintf("\$this->addForeignKey('%s', '{{%%%s}}', '%s', '{{%%%s}}', '%s');\n", 244 | 'fk_'.$table->name.'_'.$columns, $table->name, $columns, $refTable, $refColumns); 245 | } 246 | 247 | return "$definition\n"; 248 | } 249 | 250 | /** 251 | * @param string $name 252 | * @return string 253 | */ 254 | private static function generateDropTable($name) 255 | { 256 | return "\$this->dropTable('{{%$name}}');"; 257 | } 258 | 259 | /** 260 | * Returns the schema type. 261 | * @param ColumnSchema $column 262 | * @return string the schema type 263 | */ 264 | private static function getSchemaType(ColumnSchema $column) 265 | { 266 | // primary key 267 | if ($column->isPrimaryKey && $column->autoIncrement) { 268 | if ('bigint' === $column->type) { 269 | return 'bigPrimaryKey()'; 270 | } 271 | return 'primaryKey()'; 272 | } 273 | 274 | // boolean 275 | if ('tinyint(1)' === $column->dbType) { 276 | return 'boolean()'; 277 | } 278 | 279 | // smallint 280 | if ('smallint' === $column->type) { 281 | if (null === $column->size) { 282 | return 'smallInteger()'; 283 | } 284 | return 'smallInteger'; 285 | } 286 | 287 | // bigint 288 | if ('bigint' === $column->type) { 289 | if (null === $column->size) { 290 | return 'bigInteger()'; 291 | } 292 | return 'bigInteger'; 293 | } 294 | 295 | // enum 296 | if (null !== $column->enumValues) { 297 | // https://github.com/yiisoft/yii2/issues/9797 298 | $enumValues = array_map('addslashes', $column->enumValues); 299 | return "enum(['".implode('\', \'', $enumValues)."'])"; 300 | } 301 | 302 | // others 303 | if (null === $column->size && 0 >= $column->scale) { 304 | return $column->type.'()'; 305 | } 306 | 307 | return $column->type; 308 | } 309 | 310 | /** 311 | * Returns the other definition. 312 | * @param ColumnSchema $column 313 | * @param array $unique 314 | * @return string the other definition 315 | */ 316 | private static function other(ColumnSchema $column, array $unique) 317 | { 318 | $definition = ''; 319 | 320 | // size 321 | if (null !== $column->scale && 0 < $column->scale) { 322 | $definition .= "($column->precision,$column->scale)"; 323 | 324 | } elseif (null !== $column->size && !$column->autoIncrement && 'tinyint(1)' !== $column->dbType) { 325 | $definition .= "($column->size)"; 326 | 327 | } elseif (null !== $column->size && !$column->isPrimaryKey && $column->unsigned) { 328 | $definition .= "($column->size)"; 329 | } 330 | 331 | // unsigned 332 | if ($column->unsigned) { 333 | $definition .= '->unsigned()'; 334 | } 335 | 336 | // null 337 | if ($column->allowNull) { 338 | $definition .= '->null()'; 339 | 340 | } elseif (!$column->autoIncrement) { 341 | $definition .= '->notNull()'; 342 | } 343 | 344 | // unique key 345 | if (!$column->isPrimaryKey && !empty($unique)) { 346 | foreach ($unique as $name) { 347 | if (reset($name) === $column->name) { 348 | $definition .= '->unique()'; 349 | } 350 | } 351 | } 352 | 353 | // default value 354 | if ($column->defaultValue instanceof Expression) { 355 | $definition .= "->defaultExpression('$column->defaultValue')"; 356 | 357 | } elseif (is_int($column->defaultValue)) { 358 | $definition .= "->defaultValue($column->defaultValue)"; 359 | 360 | } elseif (is_bool($column->defaultValue)) { 361 | $definition .= '->defaultValue('.var_export($column->defaultValue, true).')'; 362 | 363 | } elseif (is_string($column->defaultValue)) { 364 | $definition .= "->defaultValue('".addslashes($column->defaultValue)."')"; 365 | } 366 | 367 | // comment 368 | if (null !== $column->comment && '' !== $column->comment) { 369 | $definition .= "->comment('".addslashes($column->comment)."')"; 370 | } 371 | 372 | // append 373 | 374 | return $definition; 375 | } 376 | 377 | /** 378 | * @param string $tmp temporary definition 379 | * @return string 380 | */ 381 | private static function replaceEnumColumn($tmp) 382 | { 383 | return preg_replace("/,\n/", "\",\n", strtr($tmp, [ 384 | '()' => '', 385 | '])' => ')', 386 | '),' => ',', 387 | '$this->enum([' => '"ENUM (', 388 | '->notNull' => ' NOT NULL', 389 | '->null' => ' DEFAULT NULL', 390 | '->defaultValue(' => ' DEFAULT ', 391 | '->comment(' => ' COMMENT ', 392 | ])); 393 | } 394 | } 395 | -------------------------------------------------------------------------------- /src/template.php: -------------------------------------------------------------------------------- 1 | 9 | 10 | use yii\db\Schema; 11 | use jamband\schemadump\Migration; 12 | 13 | class extends Migration 14 | { 15 | public function safeUp() 16 | { 17 | } 18 | 19 | public function safeDown() 20 | { 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/SchemaDumpControllerMySQLTest.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace tests; 13 | 14 | use jamband\schemadump\SchemaDumpController; 15 | use PHPUnit\Framework\TestCase; 16 | use Yii; 17 | use yii\db\Connection; 18 | 19 | class SchemaDumpControllerMySQLTest extends TestCase 20 | { 21 | private $controller; 22 | 23 | public function setUp(): void 24 | { 25 | $this->controller = new BufferedSchemaDumpMySQLController('schemadump', Yii::$app); 26 | } 27 | 28 | public static function setUpBeforeClass(): void 29 | { 30 | Yii::$app->set('db', [ 31 | 'class' => Connection::class, 32 | 'dsn' => 'mysql:host=127.0.0.1;dbname=yii2_schemadump_test', 33 | 'username' => 'root', 34 | 'password' => 'root', 35 | ]); 36 | 37 | Yii::$app->db->open(); 38 | 39 | $statements = array_filter(explode(';', file_get_contents(__DIR__.'/schemas/mysql.sql')), 'trim'); 40 | foreach ($statements as $statement) { 41 | Yii::$app->db->pdo->exec($statement); 42 | } 43 | } 44 | 45 | public static function tearDownAfterClass(): void 46 | { 47 | $db = Yii::$app->db; 48 | $db->createCommand()->checkIntegrity(false)->execute(); 49 | 50 | foreach ($db->schema->getTableNames() as $table) { 51 | $db->createCommand("DROP TABLE `$table`")->execute(); 52 | } 53 | } 54 | 55 | public function testActionCreate(): void 56 | { 57 | $this->controller->run('create'); 58 | $this->assertSame(<<<'STDOUT' 59 | // 0010_pk_ai 60 | $this->createTable('{{%0010_pk_ai}}', [ 61 | 'id' => $this->primaryKey(), 62 | ], $this->tableOptions); 63 | 64 | // 0020_pk_not_ai 65 | $this->createTable('{{%0020_pk_not_ai}}', [ 66 | 'id' => $this->integer(11)->notNull(), 67 | 'PRIMARY KEY (id)', 68 | ], $this->tableOptions); 69 | 70 | // 0030_pk_bigint_ai 71 | $this->createTable('{{%0030_pk_bigint_ai}}', [ 72 | 'id' => $this->bigPrimaryKey(), 73 | ], $this->tableOptions); 74 | 75 | // 0040_pk_unsigned_ai 76 | $this->createTable('{{%0040_pk_unsigned_ai}}', [ 77 | 'id' => $this->primaryKey()->unsigned(), 78 | ], $this->tableOptions); 79 | 80 | // 0050_pk_bigint_unsigned_ai 81 | $this->createTable('{{%0050_pk_bigint_unsigned_ai}}', [ 82 | 'id' => $this->bigPrimaryKey()->unsigned(), 83 | ], $this->tableOptions); 84 | 85 | // 0060_composite_pks 86 | $this->createTable('{{%0060_composite_pks}}', [ 87 | 'foo_id' => $this->integer(11)->notNull(), 88 | 'bar_id' => $this->integer(11)->notNull(), 89 | 'PRIMARY KEY (foo_id, bar_id)', 90 | ], $this->tableOptions); 91 | 92 | // 0070_uks 93 | $this->createTable('{{%0070_uks}}', [ 94 | 'id' => $this->primaryKey(), 95 | 'username' => $this->string(20)->notNull()->unique(), 96 | 'email' => $this->string(255)->notNull()->unique(), 97 | 'password' => $this->string(255)->notNull(), 98 | ], $this->tableOptions); 99 | 100 | // 0100_types 101 | $this->createTable('{{%0100_types}}', [ 102 | 'char' => $this->char(20)->notNull(), 103 | 'varchar' => $this->string(20)->notNull(), 104 | 'text' => $this->text()->notNull(), 105 | 'smallint' => $this->smallInteger(6)->notNull(), 106 | 'integer' => $this->integer(11)->notNull(), 107 | 'bigint' => $this->bigInteger(20)->notNull(), 108 | 'float' => $this->float()->notNull(), 109 | 'float_decimal' => $this->float(20,10)->notNull(), 110 | 'double' => $this->double(20,10)->notNull(), 111 | 'decimal' => $this->decimal(20,10)->notNull(), 112 | 'money' => $this->decimal(19,4)->notNull(), 113 | 'datetime' => $this->datetime()->notNull(), 114 | 'timestamp' => $this->timestamp()->notNull()->defaultExpression('CURRENT_TIMESTAMP'), 115 | 'time' => $this->time()->notNull(), 116 | 'date' => $this->date()->notNull(), 117 | 'binary' => $this->binary()->notNull(), 118 | 'boolean' => $this->boolean()->notNull()->defaultValue(0), 119 | 'tinyint_1' => $this->boolean()->notNull()->defaultValue(0), 120 | 'enum' => "ENUM ('foo', 'bar', 'baz') NOT NULL", 121 | ], $this->tableOptions); 122 | 123 | // 0200_default_values 124 | $this->createTable('{{%0200_default_values}}', [ 125 | 'integer' => $this->smallInteger(6)->notNull()->defaultValue(1), 126 | 'string' => $this->string(255)->notNull()->defaultValue('UNKNOWN'), 127 | 'timestamp' => $this->timestamp()->notNull()->defaultExpression('CURRENT_TIMESTAMP'), 128 | 'enum' => "ENUM ('foo', 'bar', 'baz') DEFAULT NULL", 129 | 'enum_foo' => "ENUM ('foo', 'bar', 'baz') NOT NULL DEFAULT 'foo'", 130 | ], $this->tableOptions); 131 | 132 | // 0300_comment 133 | $this->createTable('{{%0300_comment}}', [ 134 | 'username' => $this->string(20)->notNull()->comment('ユーザ名'), 135 | 'enum' => "ENUM ('foo', 'bar', 'baz') NOT NULL COMMENT 'foo'", 136 | ], $this->tableOptions); 137 | 138 | // 0400_fk_parent 139 | $this->createTable('{{%0400_fk_parent}}', [ 140 | 'id' => $this->primaryKey(), 141 | ], $this->tableOptions); 142 | 143 | // 0410_fk_child 144 | $this->createTable('{{%0410_fk_child}}', [ 145 | 'id' => $this->primaryKey(), 146 | 'parent_id' => $this->integer(11)->notNull(), 147 | ], $this->tableOptions); 148 | 149 | // fk: 0410_fk_child 150 | $this->addForeignKey('fk_0410_fk_child_parent_id', '{{%0410_fk_child}}', 'parent_id', '{{%0400_fk_parent}}', 'id'); 151 | 152 | 153 | STDOUT 154 | , $this->controller->flushStdOutBuffer()); 155 | } 156 | 157 | public function testDropAction(): void 158 | { 159 | $this->controller->run('drop'); 160 | $this->assertSame(<<<'STDOUT' 161 | $this->dropTable('{{%0010_pk_ai}}'); 162 | $this->dropTable('{{%0020_pk_not_ai}}'); 163 | $this->dropTable('{{%0030_pk_bigint_ai}}'); 164 | $this->dropTable('{{%0040_pk_unsigned_ai}}'); 165 | $this->dropTable('{{%0050_pk_bigint_unsigned_ai}}'); 166 | $this->dropTable('{{%0060_composite_pks}}'); 167 | $this->dropTable('{{%0070_uks}}'); 168 | $this->dropTable('{{%0100_types}}'); 169 | $this->dropTable('{{%0200_default_values}}'); 170 | $this->dropTable('{{%0300_comment}}'); 171 | $this->dropTable('{{%0400_fk_parent}}'); 172 | $this->dropTable('{{%0410_fk_child}}'); // fk: parent_id 173 | 174 | STDOUT 175 | , $this->controller->flushStdOutBuffer()); 176 | } 177 | } 178 | 179 | class BufferedSchemaDumpMySQLController extends SchemaDumpController 180 | { 181 | use StdOutBufferControllerTrait; 182 | } 183 | -------------------------------------------------------------------------------- /tests/SchemaDumpControllerPostgreSQLTest.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace tests; 13 | 14 | use jamband\schemadump\SchemaDumpController; 15 | use PHPUnit\Framework\TestCase; 16 | use Yii; 17 | use yii\db\Connection; 18 | 19 | class SchemaDumpControllerPostgreSQLTest extends TestCase 20 | { 21 | private $controller; 22 | 23 | public function setUp(): void 24 | { 25 | $this->controller = new BufferedSchemaDumpPostgreSQLController('schemadump', Yii::$app); 26 | } 27 | 28 | public static function setUpBeforeClass(): void 29 | { 30 | Yii::$app->set('db', [ 31 | 'class' => Connection::class, 32 | 'dsn' => 'pgsql:host=localhost;dbname=yii2_schemadump_test', 33 | 'username' => 'postgres', 34 | 'password' => 'postgres', 35 | ]); 36 | 37 | Yii::$app->db->open(); 38 | 39 | $statements = array_filter(explode(';', file_get_contents(__DIR__.'/schemas/postgre.sql')), 'trim'); 40 | 41 | foreach ($statements as $statement) { 42 | Yii::$app->db->pdo->exec($statement); 43 | } 44 | } 45 | 46 | public static function tearDownAfterClass(): void 47 | { 48 | $db = Yii::$app->db; 49 | foreach ($db->schema->getTableNames() as $table) { 50 | $db->createCommand("drop table \"$table\" CASCADE")->execute(); 51 | } 52 | } 53 | 54 | public function testActionCreate(): void 55 | { 56 | $this->controller->run('create'); 57 | $this->assertSame(<<<'STDOUT' 58 | // 0010_pk_ai 59 | $this->createTable('{{%0010_pk_ai}}', [ 60 | 'id' => $this->primaryKey(), 61 | ], $this->tableOptions); 62 | 63 | // 0020_pk_not_ai 64 | $this->createTable('{{%0020_pk_not_ai}}', [ 65 | 'id' => $this->integer()->notNull(), 66 | 'PRIMARY KEY (id)', 67 | ], $this->tableOptions); 68 | 69 | // 0030_pk_bigint_ai 70 | $this->createTable('{{%0030_pk_bigint_ai}}', [ 71 | 'id' => $this->bigPrimaryKey(), 72 | ], $this->tableOptions); 73 | 74 | // 0040_composite_pks 75 | $this->createTable('{{%0040_composite_pks}}', [ 76 | 'foo_id' => $this->integer()->notNull(), 77 | 'bar_id' => $this->integer()->notNull(), 78 | 'PRIMARY KEY (foo_id, bar_id)', 79 | ], $this->tableOptions); 80 | 81 | // 0050_uks 82 | $this->createTable('{{%0050_uks}}', [ 83 | 'id' => $this->primaryKey(), 84 | 'username' => $this->string(20)->notNull()->unique(), 85 | 'email' => $this->string(255)->notNull()->unique(), 86 | 'password' => $this->string(255)->notNull(), 87 | ], $this->tableOptions); 88 | 89 | // 0100_types 90 | $this->createTable('{{%0100_types}}', [ 91 | 'bool' => $this->boolean()->notNull()->defaultValue(false), 92 | 'boolean' => $this->boolean()->notNull()->defaultValue(false), 93 | 'character' => $this->char(20)->notNull(), 94 | 'char' => $this->char(20)->notNull(), 95 | 'character_varying' => $this->string(20)->notNull(), 96 | 'varchar' => $this->string(20)->notNull(), 97 | 'text' => $this->text()->notNull(), 98 | 'binary' => $this->binary()->notNull(), 99 | 'real' => $this->float()->notNull(), 100 | 'decimal' => $this->decimal(20,10)->notNull(), 101 | 'numeric' => $this->decimal(20,10)->notNull(), 102 | 'money_decimal' => $this->decimal(19,4)->notNull(), 103 | 'money' => $this->money()->notNull(), 104 | 'smallint' => $this->smallInteger()->notNull(), 105 | 'integer' => $this->integer()->notNull(), 106 | 'bigint' => $this->bigInteger()->notNull(), 107 | 'date' => $this->date()->notNull(), 108 | 'time' => $this->time()->notNull(), 109 | 'timestamp' => $this->timestamp()->notNull(), 110 | ], $this->tableOptions); 111 | 112 | // 0200_default_values 113 | $this->createTable('{{%0200_default_values}}', [ 114 | 'integer' => $this->smallInteger()->notNull()->defaultValue(1), 115 | 'string' => $this->string()->notNull()->defaultValue('UNKNOWN'), 116 | ], $this->tableOptions); 117 | 118 | // 0300_comment 119 | $this->createTable('{{%0300_comment}}', [ 120 | 'username' => $this->string(20)->notNull()->comment('ユーザ名'), 121 | ], $this->tableOptions); 122 | 123 | // 0400_fk_parent 124 | $this->createTable('{{%0400_fk_parent}}', [ 125 | 'id' => $this->primaryKey(), 126 | ], $this->tableOptions); 127 | 128 | // 0410_fk_child 129 | $this->createTable('{{%0410_fk_child}}', [ 130 | 'id' => $this->primaryKey(), 131 | 'parent_id' => $this->integer()->notNull(), 132 | ], $this->tableOptions); 133 | 134 | // fk: 0410_fk_child 135 | $this->addForeignKey('fk_0410_fk_child_parent_id', '{{%0410_fk_child}}', 'parent_id', '{{%0400_fk_parent}}', 'id'); 136 | 137 | 138 | STDOUT 139 | , $this->controller->flushStdOutBuffer()); 140 | } 141 | 142 | public function testDropAction(): void 143 | { 144 | $this->controller->run('drop'); 145 | $this->assertSame(<<<'STDOUT' 146 | $this->dropTable('{{%0010_pk_ai}}'); 147 | $this->dropTable('{{%0020_pk_not_ai}}'); 148 | $this->dropTable('{{%0030_pk_bigint_ai}}'); 149 | $this->dropTable('{{%0040_composite_pks}}'); 150 | $this->dropTable('{{%0050_uks}}'); 151 | $this->dropTable('{{%0100_types}}'); 152 | $this->dropTable('{{%0200_default_values}}'); 153 | $this->dropTable('{{%0300_comment}}'); 154 | $this->dropTable('{{%0400_fk_parent}}'); 155 | $this->dropTable('{{%0410_fk_child}}'); // fk: parent_id 156 | 157 | STDOUT 158 | , $this->controller->flushStdOutBuffer()); 159 | } 160 | } 161 | 162 | class BufferedSchemaDumpPostgreSQLController extends SchemaDumpController 163 | { 164 | use StdOutBufferControllerTrait; 165 | } 166 | -------------------------------------------------------------------------------- /tests/SchemaDumpControllerSQLiteTest.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace tests; 13 | 14 | use jamband\schemadump\SchemaDumpController; 15 | use PHPUnit\Framework\TestCase; 16 | use Yii; 17 | use yii\db\Connection; 18 | 19 | class SchemaDumpControllerSQLiteTest extends TestCase 20 | { 21 | private $controller; 22 | 23 | public function setUp(): void 24 | { 25 | $this->controller = new BufferedSchemaDumpSQLiteController('schemadump', Yii::$app); 26 | } 27 | 28 | public static function setUpBeforeClass(): void 29 | { 30 | Yii::$app->set('db', [ 31 | 'class' => Connection::class, 32 | 'dsn' => 'sqlite::memory:', 33 | ]); 34 | 35 | Yii::$app->db->open(); 36 | 37 | $statements = array_filter(explode(';', file_get_contents(__DIR__.'/schemas/sqlite.sql')), 'trim'); 38 | foreach ($statements as $statement) { 39 | Yii::$app->db->pdo->exec($statement); 40 | } 41 | } 42 | 43 | public function testActionCreate(): void 44 | { 45 | $this->controller->run('create'); 46 | $this->assertSame(<<<'STDOUT' 47 | // 0010_pk_ai 48 | $this->createTable('{{%0010_pk_ai}}', [ 49 | 'id' => $this->primaryKey(), 50 | ], $this->tableOptions); 51 | 52 | // 0020_composite_pks 53 | $this->createTable('{{%0020_composite_pks}}', [ 54 | 'foo_id' => $this->integer()->notNull(), 55 | 'bar_id' => $this->integer()->notNull(), 56 | 'PRIMARY KEY (foo_id, bar_id)', 57 | ], $this->tableOptions); 58 | 59 | // 0030_uks 60 | $this->createTable('{{%0030_uks}}', [ 61 | 'id' => $this->primaryKey(), 62 | 'username' => $this->text()->notNull()->unique(), 63 | 'email' => $this->text()->notNull()->unique(), 64 | 'password' => $this->text()->notNull(), 65 | ], $this->tableOptions); 66 | 67 | // 0100_types 68 | $this->createTable('{{%0100_types}}', [ 69 | 'integer' => $this->integer()->notNull(), 70 | 'real' => $this->float()->notNull(), 71 | 'text' => $this->text()->notNull(), 72 | 'blob' => $this->binary()->notNull(), 73 | ], $this->tableOptions); 74 | 75 | // 0200_default_values 76 | $this->createTable('{{%0200_default_values}}', [ 77 | 'integer' => $this->integer()->notNull()->defaultValue(1), 78 | 'string' => $this->text()->notNull()->defaultValue('UNKNOWN'), 79 | ], $this->tableOptions); 80 | 81 | // 0300_fk_parent 82 | $this->createTable('{{%0300_fk_parent}}', [ 83 | 'id' => $this->primaryKey(), 84 | ], $this->tableOptions); 85 | 86 | // 0310_fk_child 87 | $this->createTable('{{%0310_fk_child}}', [ 88 | 'id' => $this->primaryKey(), 89 | 'parent_id' => $this->integer()->notNull(), 90 | ], $this->tableOptions); 91 | 92 | // fk: 0310_fk_child 93 | $this->addForeignKey('fk_0310_fk_child_parent_id', '{{%0310_fk_child}}', 'parent_id', '{{%0300_fk_parent}}', 'id'); 94 | 95 | 96 | STDOUT 97 | , $this->controller->flushStdOutBuffer()); 98 | } 99 | 100 | public function testDropAction(): void 101 | { 102 | $this->controller->run('drop'); 103 | $this->assertSame(<<<'STDOUT' 104 | $this->dropTable('{{%0010_pk_ai}}'); 105 | $this->dropTable('{{%0020_composite_pks}}'); 106 | $this->dropTable('{{%0030_uks}}'); 107 | $this->dropTable('{{%0100_types}}'); 108 | $this->dropTable('{{%0200_default_values}}'); 109 | $this->dropTable('{{%0300_fk_parent}}'); 110 | $this->dropTable('{{%0310_fk_child}}'); // fk: parent_id 111 | 112 | STDOUT 113 | , $this->controller->flushStdOutBuffer()); 114 | } 115 | } 116 | 117 | class BufferedSchemaDumpSQLiteController extends SchemaDumpController 118 | { 119 | use StdOutBufferControllerTrait; 120 | } 121 | -------------------------------------------------------------------------------- /tests/StdOutBufferControllerTrait.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace tests; 13 | 14 | trait StdOutBufferControllerTrait 15 | { 16 | private $stdOutBuffer = ''; 17 | 18 | /** 19 | * @param string $string 20 | */ 21 | public function stdout($string) 22 | { 23 | $this->stdOutBuffer .= $string; 24 | } 25 | 26 | /** 27 | * @return string 28 | */ 29 | public function flushStdOutBuffer() 30 | { 31 | $result = $this->stdOutBuffer; 32 | $this->stdOutBuffer = ''; 33 | return $result; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /tests/bootstrap.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | defined('YII_DEBUG') or define('YII_DEBUG', true); 13 | defined('YII_ENV') or define('YII_ENV', 'test'); 14 | 15 | require __DIR__.'/../vendor/autoload.php'; 16 | require __DIR__.'/../vendor/yiisoft/yii2/Yii.php'; 17 | 18 | new yii\console\Application([ 19 | 'id' => 'unit', 20 | 'basePath' => __DIR__, 21 | ]); 22 | -------------------------------------------------------------------------------- /tests/schemas/mysql.sql: -------------------------------------------------------------------------------- 1 | -- for some primary keys and unique keys 2 | DROP TABLE IF EXISTS `0010_pk_ai`; 3 | CREATE TABLE `0010_pk_ai` ( 4 | `id` INT(11) NOT NULL AUTO_INCREMENT, 5 | PRIMARY KEY (`id`) 6 | ); 7 | DROP TABLE IF EXISTS `0020_pk_not_ai`; 8 | CREATE TABLE `0020_pk_not_ai` ( 9 | `id` INT(11) NOT NULL, 10 | PRIMARY KEY (`id`) 11 | ); 12 | DROP TABLE IF EXISTS `0030_pk_bigint_ai`; 13 | CREATE TABLE `0030_pk_bigint_ai` ( 14 | `id` BIGINT(20) NOT NULL AUTO_INCREMENT, 15 | PRIMARY KEY (`id`) 16 | ); 17 | DROP TABLE IF EXISTS `0040_pk_unsigned_ai`; 18 | CREATE TABLE `0040_pk_unsigned_ai` ( 19 | `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, 20 | PRIMARY KEY (`id`) 21 | ); 22 | DROP TABLE IF EXISTS `0050_pk_bigint_unsigned_ai`; 23 | CREATE TABLE `0050_pk_bigint_unsigned_ai` ( 24 | `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, 25 | PRIMARY KEY (`id`) 26 | ); 27 | DROP TABLE IF EXISTS `0060_composite_pks`; 28 | CREATE TABLE `0060_composite_pks` ( 29 | `foo_id` INT(11) NOT NULL, 30 | `bar_id` INT(11) NOT NULL, 31 | PRIMARY KEY (`foo_id`, `bar_id`) 32 | ); 33 | DROP TABLE IF EXISTS `0070_uks`; 34 | CREATE TABLE `0070_uks` ( 35 | `id` INT(11) NOT NULL AUTO_INCREMENT, 36 | `username` VARCHAR(20) NOT NULL, 37 | `email` VARCHAR(255) NOT NULL, 38 | `password` VARCHAR(255) NOT NULL, 39 | PRIMARY KEY (`id`), 40 | UNIQUE KEY `uk_0070_uks_username` (`username`), 41 | UNIQUE KEY `uk_0070_uks_email` (`email`) 42 | ); 43 | 44 | -- for some types 45 | DROP TABLE IF EXISTS `0100_types`; 46 | CREATE TABLE `0100_types` ( 47 | `char` CHAR(20) NOT NULL, 48 | `varchar` VARCHAR(20) NOT NULL, 49 | `text` TEXT NOT NULL, 50 | `smallint` SMALLINT(6) NOT NULL, 51 | `integer` INT(11) NOT NULL, 52 | `bigint` BIGINT(20) NOT NULL, 53 | `float` FLOAT NOT NULL, 54 | `float_decimal` FLOAT(20,10) NOT NULL, 55 | `double` DOUBLE(20,10) NOT NULL, 56 | `decimal` DECIMAL(20,10) NOT NULL, 57 | `money` DECIMAL(19,4) NOT NULL, 58 | `datetime` DATETIME NOT NULL, 59 | `timestamp` TIMESTAMP NOT NULL, 60 | `time` TIME NOT NULL, 61 | `date` DATE NOT NULL, 62 | `binary` BLOB NOT NULL, 63 | `boolean` BOOLEAN NOT NULL DEFAULT 0, 64 | `tinyint_1` TINYINT(1) NOT NULL DEFAULT 0, 65 | `enum` ENUM('foo', 'bar', 'baz') NOT NULL 66 | ); 67 | 68 | -- for some default values 69 | DROP TABLE IF EXISTS `0200_default_values`; 70 | CREATE TABLE `0200_default_values` ( 71 | `integer` SMALLINT(6) NOT NULL DEFAULT 1, 72 | `string` VARCHAR(255) NOT NULL DEFAULT 'UNKNOWN', 73 | `timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, 74 | `enum` ENUM ('foo', 'bar', 'baz') DEFAULT NULL, 75 | `enum_foo` ENUM ('foo', 'bar', 'baz') NOT NULL DEFAULT 'foo' 76 | ); 77 | 78 | -- for some comments 79 | DROP TABLE IF EXISTS `0300_comment`; 80 | CREATE TABLE `0300_comment` ( 81 | `username` VARCHAR(20) NOT NULL COMMENT 'ユーザ名', 82 | `enum` ENUM('foo', 'bar', 'baz') NOT NULL COMMENT 'foo' 83 | ); 84 | 85 | -- for foreign keys 86 | DROP TABLE IF EXISTS `0400_fk_parent`; 87 | CREATE TABLE `0400_fk_parent` ( 88 | `id` INT(11) NOT NULL AUTO_INCREMENT, 89 | PRIMARY KEY (`id`) 90 | ); 91 | DROP TABLE IF EXISTS `0410_fk_child`; 92 | CREATE TABLE `0410_fk_child` ( 93 | `id` INT(11) NOT NULL AUTO_INCREMENT, 94 | `parent_id` INT(11) NOT NULL, 95 | PRIMARY KEY (`id`), 96 | FOREIGN KEY (`parent_id`) REFERENCES `0400_fk_parent` (`id`) 97 | ); 98 | -------------------------------------------------------------------------------- /tests/schemas/postgre.sql: -------------------------------------------------------------------------------- 1 | -- for some primary keys and unique keys 2 | DROP TABLE IF EXISTS "0010_pk_ai"; 3 | CREATE TABLE "0010_pk_ai" ( 4 | id serial not null primary key 5 | ); 6 | DROP TABLE IF EXISTS "0020_pk_not_ai"; 7 | CREATE TABLE "0020_pk_not_ai" ( 8 | id integer not null primary key 9 | ); 10 | DROP TABLE IF EXISTS "0030_pk_bigint_ai"; 11 | CREATE TABLE "0030_pk_bigint_ai" ( 12 | id bigserial not null primary key 13 | ); 14 | DROP TABLE IF EXISTS "0040_composite_pks"; 15 | CREATE TABLE "0040_composite_pks" ( 16 | foo_id integer not null, 17 | bar_id integer not null, 18 | PRIMARY KEY (foo_id, bar_id) 19 | ); 20 | DROP TABLE IF EXISTS "0050_uks"; 21 | CREATE TABLE "0050_uks" ( 22 | id serial not null primary key, 23 | username varchar(20) not null unique, 24 | email varchar(255) not null unique, 25 | password varchar(255) not null 26 | ); 27 | 28 | -- for some types 29 | DROP TABLE IF EXISTS "0100_types"; 30 | CREATE TABLE "0100_types" ( 31 | "bool" bool not null default false, 32 | "boolean" boolean not null default false, 33 | "character" character(20) not null, 34 | "char" char(20) not null, 35 | "character_varying" character varying(20) not null, 36 | "varchar" varchar(20) not null, 37 | "text" text not null, 38 | "binary" bytea not null, 39 | "real" real not null, 40 | "decimal" decimal(20,10) not null, 41 | "numeric" numeric(20,10) not null, 42 | "money_decimal" decimal(19,4) not null, 43 | "money" money not null, 44 | "smallint" smallint not null, 45 | "integer" integer not null, 46 | "bigint" bigint not null, 47 | "date" date not null, 48 | "time" time not null, 49 | "timestamp" timestamp not null 50 | ); 51 | 52 | -- for some default values 53 | DROP TABLE IF EXISTS "0200_default_values"; 54 | CREATE TABLE "0200_default_values" ( 55 | "integer" smallint not null default 1, 56 | "string" varchar not null default 'UNKNOWN' 57 | ); 58 | 59 | -- for some comments 60 | DROP TABLE IF EXISTS "0300_comment"; 61 | CREATE TABLE "0300_comment" ( 62 | username varchar(20) not null 63 | ); 64 | comment on column "0300_comment".username is 'ユーザ名'; 65 | 66 | -- for foreign keys 67 | DROP TABLE IF EXISTS "0400_fk_parent"; 68 | CREATE TABLE "0400_fk_parent" ( 69 | id serial not null primary key 70 | ); 71 | DROP TABLE IF EXISTS "0410_fk_child"; 72 | CREATE TABLE "0410_fk_child" ( 73 | id serial not null primary key, 74 | parent_id integer not null references "0400_fk_parent" (id) 75 | ); 76 | -------------------------------------------------------------------------------- /tests/schemas/sqlite.sql: -------------------------------------------------------------------------------- 1 | -- for some primary keys and unique keys 2 | DROP TABLE IF EXISTS "0010_pk_ai"; 3 | CREATE TABLE "0010_pk_ai" ( 4 | "id" INTEGER NOT NULL PRIMARY KEY 5 | ); 6 | DROP TABLE IF EXISTS "0020_composite_pks"; 7 | CREATE TABLE "0020_composite_pks" ( 8 | "foo_id" INTEGER NOT NULL, 9 | "bar_id" INTEGER NOT NULL, 10 | PRIMARY KEY ("foo_id", "bar_id") 11 | ); 12 | DROP TABLE IF EXISTS "0030_uks"; 13 | CREATE TABLE "0030_uks" ( 14 | "id" INTEGER NOT NULL PRIMARY KEY, 15 | "username" TEXT NOT NULL UNIQUE, 16 | "email" TEXT NOT NULL UNIQUE, 17 | "password" TEXT NOT NULL 18 | ); 19 | 20 | -- for some types 21 | DROP TABLE IF EXISTS "0100_types"; 22 | CREATE TABLE "0100_types" ( 23 | "integer" INTEGER NOT NULL, 24 | "real" REAL NOT NULL, 25 | "text" TEXT NOT NULL, 26 | "blob" BLOB NOT NULL 27 | ); 28 | 29 | -- for some default values 30 | DROP TABLE IF EXISTS "0200_default_values"; 31 | CREATE TABLE "0200_default_values" ( 32 | "integer" INTEGER NOT NULL DEFAULT 1, 33 | "string" TEXT NOT NULL DEFAULT "UNKNOWN" 34 | ); 35 | 36 | -- for foreign keys 37 | DROP TABLE IF EXISTS "0300_fk_parent"; 38 | CREATE TABLE "0300_fk_parent" ( 39 | "id" INTEGER NOT NULL PRIMARY KEY 40 | ); 41 | DROP TABLE IF EXISTS "0310_fk_child"; 42 | CREATE TABLE "0310_fk_child" ( 43 | "id" INTEGER NOT NULL PRIMARY KEY, 44 | "parent_id" INTEGER NOT NULL, 45 | FOREIGN KEY ("parent_id") REFERENCES "0300_fk_parent" ("id") 46 | ); 47 | --------------------------------------------------------------------------------