From 4a968cdcb929cc476239a22990bea29adf2895fb Mon Sep 17 00:00:00 2001 From: Orlando Cavassani Date: Wed, 21 Dec 2022 09:58:44 -0300 Subject: [PATCH 1/2] chore(deps): bump mongolid to v3.4 --- .github/workflows/push.yml | 1 - .gitignore | 1 + composer.json | 8 +- composer.lock | 887 +++++++++++++++++++++++-------------- docker/Dockerfile | 24 +- 5 files changed, 589 insertions(+), 332 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index e3c18fb..b5cb48d 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -9,7 +9,6 @@ jobs: strategy: matrix: php: - - "7.3" - "7.4" - "8.0" - "8.1" diff --git a/.gitignore b/.gitignore index 074526f..c3c3e49 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ build .phpunit.result.cache phpcs.xml .idea +docker-compose.override.yml diff --git a/composer.json b/composer.json index 3cc0052..653e864 100644 --- a/composer.json +++ b/composer.json @@ -20,17 +20,17 @@ } ], "require": { - "php": ">=7.3", - "leroy-merlin-br/mongolid": "v3.3-beta2", + "php": ">=7.4", + "leroy-merlin-br/mongolid": "v3.4", "illuminate/support": "^5.4 || ^6.0 || ^7.0 || ^8.0", "illuminate/auth": "^5.4 || ^6.0 || ^7.0 || ^8.0", "illuminate/queue": "^5.4 || ^6.0 || ^7.0 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^9.5.25", + "phpunit/phpunit": "^9.5.27", "orchestra/testbench": "^6.25.1", "mockery/mockery": "^1.5.1", - "leroy-merlin-br/coding-standard": "^3.0.2" + "leroy-merlin-br/coding-standard": "^3.1.0" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index 7c24e77..714846d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "ca4eddb7552d574ef31f31638b1a7f81", + "content-hash": "a65c2eacf42722bdbfca5776be2a1cb3", "packages": [ { "name": "brick/math", @@ -67,41 +67,38 @@ "time": "2021-08-15T20:50:18+00:00" }, { - "name": "composer/package-versions-deprecated", - "version": "1.11.99.5", + "name": "dflydev/dot-access-data", + "version": "v3.0.2", "source": { "type": "git", - "url": "https://github.com/composer/package-versions-deprecated.git", - "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d" + "url": "https://github.com/dflydev/dflydev-dot-access-data.git", + "reference": "f41715465d65213d644d3141a6a93081be5d3549" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b4f54f74ef3453349c24a845d22392cd31e65f1d", - "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d", + "url": "https://api.github.com/repos/dflydev/dflydev-dot-access-data/zipball/f41715465d65213d644d3141a6a93081be5d3549", + "reference": "f41715465d65213d644d3141a6a93081be5d3549", "shasum": "" }, "require": { - "composer-plugin-api": "^1.1.0 || ^2.0", - "php": "^7 || ^8" - }, - "replace": { - "ocramius/package-versions": "1.11.99" + "php": "^7.1 || ^8.0" }, "require-dev": { - "composer/composer": "^1.9.3 || ^2.0@dev", - "ext-zip": "^1.13", - "phpunit/phpunit": "^6.5 || ^7" + "phpstan/phpstan": "^0.12.42", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.3", + "scrutinizer/ocular": "1.6.0", + "squizlabs/php_codesniffer": "^3.5", + "vimeo/psalm": "^4.0.0" }, - "type": "composer-plugin", + "type": "library", "extra": { - "class": "PackageVersions\\Installer", "branch-alias": { - "dev-master": "1.x-dev" + "dev-main": "3.x-dev" } }, "autoload": { "psr-4": { - "PackageVersions\\": "src/PackageVersions" + "Dflydev\\DotAccessData\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -110,54 +107,59 @@ ], "authors": [ { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" + "name": "Dragonfly Development Inc.", + "email": "info@dflydev.com", + "homepage": "http://dflydev.com" }, { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be" - } - ], - "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", - "support": { - "issues": "https://github.com/composer/package-versions-deprecated/issues", - "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.5" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" + "name": "Beau Simensen", + "email": "beau@dflydev.com", + "homepage": "http://beausimensen.com" }, { - "url": "https://github.com/composer", - "type": "github" + "name": "Carlos Frutos", + "email": "carlos@kiwing.it", + "homepage": "https://github.com/cfrutos" }, { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com" } ], - "time": "2022-01-17T14:14:24+00:00" + "description": "Given a deep data structure, access data by dot notation.", + "homepage": "https://github.com/dflydev/dflydev-dot-access-data", + "keywords": [ + "access", + "data", + "dot", + "notation" + ], + "support": { + "issues": "https://github.com/dflydev/dflydev-dot-access-data/issues", + "source": "https://github.com/dflydev/dflydev-dot-access-data/tree/v3.0.2" + }, + "time": "2022-10-27T11:44:00+00:00" }, { "name": "doctrine/inflector", - "version": "2.0.5", + "version": "2.0.6", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "ade2b3bbfb776f27f0558e26eed43b5d9fe1b392" + "reference": "d9d313a36c872fd6ee06d9a6cbcf713eaa40f024" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/ade2b3bbfb776f27f0558e26eed43b5d9fe1b392", - "reference": "ade2b3bbfb776f27f0558e26eed43b5d9fe1b392", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/d9d313a36c872fd6ee06d9a6cbcf713eaa40f024", + "reference": "d9d313a36c872fd6ee06d9a6cbcf713eaa40f024", "shasum": "" }, "require": { "php": "^7.2 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^9", + "doctrine/coding-standard": "^10", "phpstan/phpstan": "^1.8", "phpstan/phpstan-phpunit": "^1.1", "phpstan/phpstan-strict-rules": "^1.3", @@ -212,7 +214,7 @@ ], "support": { "issues": "https://github.com/doctrine/inflector/issues", - "source": "https://github.com/doctrine/inflector/tree/2.0.5" + "source": "https://github.com/doctrine/inflector/tree/2.0.6" }, "funding": [ { @@ -228,7 +230,7 @@ "type": "tidelift" } ], - "time": "2022-09-07T09:01:28+00:00" + "time": "2022-10-20T09:10:12+00:00" }, { "name": "doctrine/lexer", @@ -499,24 +501,28 @@ }, { "name": "jean85/pretty-package-versions", - "version": "1.6.0", + "version": "2.0.5", "source": { "type": "git", "url": "https://github.com/Jean85/pretty-package-versions.git", - "reference": "1e0104b46f045868f11942aea058cd7186d6c303" + "reference": "ae547e455a3d8babd07b96966b17d7fd21d9c6af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/1e0104b46f045868f11942aea058cd7186d6c303", - "reference": "1e0104b46f045868f11942aea058cd7186d6c303", + "url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/ae547e455a3d8babd07b96966b17d7fd21d9c6af", + "reference": "ae547e455a3d8babd07b96966b17d7fd21d9c6af", "shasum": "" }, "require": { - "composer/package-versions-deprecated": "^1.8.0", - "php": "^7.0|^8.0" + "composer-runtime-api": "^2.0.0", + "php": "^7.1|^8.0" }, "require-dev": { - "phpunit/phpunit": "^6.0|^8.5|^9.2" + "friendsofphp/php-cs-fixer": "^2.17", + "jean85/composer-provided-replaced-stub-package": "^1.0", + "phpstan/phpstan": "^0.12.66", + "phpunit/phpunit": "^7.5|^8.5|^9.4", + "vimeo/psalm": "^4.3" }, "type": "library", "extra": { @@ -539,7 +545,7 @@ "email": "alessandro.lai85@gmail.com" } ], - "description": "A wrapper for ocramius/package-versions to get pretty versions strings", + "description": "A library to get pretty versions strings of installed dependencies", "keywords": [ "composer", "package", @@ -548,22 +554,22 @@ ], "support": { "issues": "https://github.com/Jean85/pretty-package-versions/issues", - "source": "https://github.com/Jean85/pretty-package-versions/tree/1.6.0" + "source": "https://github.com/Jean85/pretty-package-versions/tree/2.0.5" }, - "time": "2021-02-04T16:20:16+00:00" + "time": "2021-10-08T21:21:46+00:00" }, { "name": "laravel/framework", - "version": "v8.83.25", + "version": "v8.83.27", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "b77b908a9426efa41d6286a2ef4c3adbf5398ca1" + "reference": "e1afe088b4ca613fb96dc57e6d8dbcb8cc2c6b49" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/b77b908a9426efa41d6286a2ef4c3adbf5398ca1", - "reference": "b77b908a9426efa41d6286a2ef4c3adbf5398ca1", + "url": "https://api.github.com/repos/laravel/framework/zipball/e1afe088b4ca613fb96dc57e6d8dbcb8cc2c6b49", + "reference": "e1afe088b4ca613fb96dc57e6d8dbcb8cc2c6b49", "shasum": "" }, "require": { @@ -723,7 +729,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2022-09-30T13:00:40+00:00" + "time": "2022-12-08T15:28:55+00:00" }, { "name": "laravel/serializable-closure", @@ -787,42 +793,54 @@ }, { "name": "league/commonmark", - "version": "1.6.7", + "version": "2.3.8", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "2b8185c13bc9578367a5bf901881d1c1b5bbd09b" + "reference": "c493585c130544c4e91d2e0e131e6d35cb0cbc47" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/2b8185c13bc9578367a5bf901881d1c1b5bbd09b", - "reference": "2b8185c13bc9578367a5bf901881d1c1b5bbd09b", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/c493585c130544c4e91d2e0e131e6d35cb0cbc47", + "reference": "c493585c130544c4e91d2e0e131e6d35cb0cbc47", "shasum": "" }, "require": { "ext-mbstring": "*", - "php": "^7.1 || ^8.0" - }, - "conflict": { - "scrutinizer/ocular": "1.7.*" + "league/config": "^1.1.1", + "php": "^7.4 || ^8.0", + "psr/event-dispatcher": "^1.0", + "symfony/deprecation-contracts": "^2.1 || ^3.0", + "symfony/polyfill-php80": "^1.16" }, "require-dev": { - "cebe/markdown": "~1.0", - "commonmark/commonmark.js": "0.29.2", - "erusev/parsedown": "~1.0", + "cebe/markdown": "^1.0", + "commonmark/cmark": "0.30.0", + "commonmark/commonmark.js": "0.30.0", + "composer/package-versions-deprecated": "^1.8", + "embed/embed": "^4.4", + "erusev/parsedown": "^1.0", "ext-json": "*", "github/gfm": "0.29.0", - "michelf/php-markdown": "~1.4", - "mikehaertl/php-shellcommand": "^1.4", - "phpstan/phpstan": "^0.12.90", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.2", - "scrutinizer/ocular": "^1.5", - "symfony/finder": "^4.2" + "michelf/php-markdown": "^1.4 || ^2.0", + "nyholm/psr7": "^1.5", + "phpstan/phpstan": "^1.8.2", + "phpunit/phpunit": "^9.5.21", + "scrutinizer/ocular": "^1.8.1", + "symfony/finder": "^5.3 | ^6.0", + "symfony/yaml": "^2.3 | ^3.0 | ^4.0 | ^5.0 | ^6.0", + "unleashedtech/php-coding-standard": "^3.1.1", + "vimeo/psalm": "^4.24.0 || ^5.0.0" + }, + "suggest": { + "symfony/yaml": "v2.3+ required if using the Front Matter extension" }, - "bin": [ - "bin/commonmark" - ], "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.4-dev" + } + }, "autoload": { "psr-4": { "League\\CommonMark\\": "src" @@ -840,7 +858,7 @@ "role": "Lead Developer" } ], - "description": "Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and Github-Flavored Markdown (GFM)", + "description": "Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)", "homepage": "https://commonmark.thephpleague.com", "keywords": [ "commonmark", @@ -854,6 +872,7 @@ ], "support": { "docs": "https://commonmark.thephpleague.com/", + "forum": "https://github.com/thephpleague/commonmark/discussions", "issues": "https://github.com/thephpleague/commonmark/issues", "rss": "https://github.com/thephpleague/commonmark/releases.atom", "source": "https://github.com/thephpleague/commonmark" @@ -876,7 +895,89 @@ "type": "tidelift" } ], - "time": "2022-01-13T17:18:13+00:00" + "time": "2022-12-10T16:02:17+00:00" + }, + { + "name": "league/config", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/config.git", + "reference": "754b3604fb2984c71f4af4a9cbe7b57f346ec1f3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/config/zipball/754b3604fb2984c71f4af4a9cbe7b57f346ec1f3", + "reference": "754b3604fb2984c71f4af4a9cbe7b57f346ec1f3", + "shasum": "" + }, + "require": { + "dflydev/dot-access-data": "^3.0.1", + "nette/schema": "^1.2", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.8.2", + "phpunit/phpunit": "^9.5.5", + "scrutinizer/ocular": "^1.8.1", + "unleashedtech/php-coding-standard": "^3.1", + "vimeo/psalm": "^4.7.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Config\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com", + "role": "Lead Developer" + } + ], + "description": "Define configuration arrays with strict schemas and access values with dot notation", + "homepage": "https://config.thephpleague.com", + "keywords": [ + "array", + "config", + "configuration", + "dot", + "dot-access", + "nested", + "schema" + ], + "support": { + "docs": "https://config.thephpleague.com/", + "issues": "https://github.com/thephpleague/config/issues", + "rss": "https://github.com/thephpleague/config/releases.atom", + "source": "https://github.com/thephpleague/config" + }, + "funding": [ + { + "url": "https://www.colinodell.com/sponsor", + "type": "custom" + }, + { + "url": "https://www.paypal.me/colinpodell/10.00", + "type": "custom" + }, + { + "url": "https://github.com/colinodell", + "type": "github" + } + ], + "time": "2022-12-11T20:36:23+00:00" }, { "name": "league/flysystem", @@ -1030,30 +1131,30 @@ }, { "name": "leroy-merlin-br/mongolid", - "version": "v3.3-beta2", + "version": "v3.4", "source": { "type": "git", "url": "git@github.com:leroy-merlin-br/mongolid.git", - "reference": "ef24af9a4e243cdafd7cfd089a0d43af90d72c9e" + "reference": "d0ede8b61b74a1ce66499570594806522788c15c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/leroy-merlin-br/mongolid/zipball/ef24af9a4e243cdafd7cfd089a0d43af90d72c9e", - "reference": "ef24af9a4e243cdafd7cfd089a0d43af90d72c9e", + "url": "https://api.github.com/repos/leroy-merlin-br/mongolid/zipball/d0ede8b61b74a1ce66499570594806522788c15c", + "reference": "d0ede8b61b74a1ce66499570594806522788c15c", "shasum": "" }, "require": { "ext-mongodb": "*", "illuminate/container": "^5.4 || ^6.0 || ^7.0 || ^8.0", "illuminate/support": "^5.4 || ^6.0 || ^7.0 || ^8.0", - "mongodb/mongodb": "^1.4", - "php": ">=7.3" + "mongodb/mongodb": "^1.15", + "php": ">=7.4" }, "require-dev": { - "leroy-merlin-br/coding-standard": "^3.0.2", + "leroy-merlin-br/coding-standard": "^3.1.0", "mockery/mockery": "^1.5.1", - "phpunit/phpunit": "^9.5.24", - "symfony/var-dumper": "^5.4.11" + "phpunit/phpunit": "^9.5.27", + "symfony/var-dumper": "^5.4.14" }, "suggest": { "leroy-merlin-br/mongolid-laravel": "Easy, powerful and ultrafast MongoDB ODM for Laravel." @@ -1096,38 +1197,40 @@ "nosql", "odm" ], - "time": "2022-10-18T21:10:07+00:00" + "time": "2022-12-21T12:14:18+00:00" }, { "name": "mongodb/mongodb", - "version": "1.8.0", + "version": "1.15.0", "source": { "type": "git", "url": "https://github.com/mongodb/mongo-php-library.git", - "reference": "953dbc19443aa9314c44b7217a16873347e6840d" + "reference": "3a681a3b2f2c0ebac227a3b86bb9057d0e6eb8f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mongodb/mongo-php-library/zipball/953dbc19443aa9314c44b7217a16873347e6840d", - "reference": "953dbc19443aa9314c44b7217a16873347e6840d", + "url": "https://api.github.com/repos/mongodb/mongo-php-library/zipball/3a681a3b2f2c0ebac227a3b86bb9057d0e6eb8f8", + "reference": "3a681a3b2f2c0ebac227a3b86bb9057d0e6eb8f8", "shasum": "" }, "require": { "ext-hash": "*", "ext-json": "*", - "ext-mongodb": "^1.8.1", - "jean85/pretty-package-versions": "^1.2", - "php": "^7.0 || ^8.0", + "ext-mongodb": "^1.15.0", + "jean85/pretty-package-versions": "^1.2 || ^2.0.1", + "php": "^7.2 || ^8.0", "symfony/polyfill-php80": "^1.19" }, "require-dev": { - "squizlabs/php_codesniffer": "^3.5, <3.5.5", - "symfony/phpunit-bridge": "5.x-dev" + "doctrine/coding-standard": "^9.0", + "squizlabs/php_codesniffer": "^3.6", + "symfony/phpunit-bridge": "^5.2", + "vimeo/psalm": "^4.28" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8.x-dev" + "dev-master": "1.15.x-dev" } }, "autoload": { @@ -1162,9 +1265,9 @@ ], "support": { "issues": "https://github.com/mongodb/mongo-php-library/issues", - "source": "https://github.com/mongodb/mongo-php-library/tree/1.8.0" + "source": "https://github.com/mongodb/mongo-php-library/tree/1.15.0" }, - "time": "2020-11-25T12:26:02+00:00" + "time": "2022-11-23T04:45:35+00:00" }, { "name": "monolog/monolog", @@ -1270,16 +1373,16 @@ }, { "name": "nesbot/carbon", - "version": "2.62.1", + "version": "2.64.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "01bc4cdefe98ef58d1f9cb31bdbbddddf2a88f7a" + "reference": "889546413c97de2d05063b8cb7b193c2531ea211" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/01bc4cdefe98ef58d1f9cb31bdbbddddf2a88f7a", - "reference": "01bc4cdefe98ef58d1f9cb31bdbbddddf2a88f7a", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/889546413c97de2d05063b8cb7b193c2531ea211", + "reference": "889546413c97de2d05063b8cb7b193c2531ea211", "shasum": "" }, "require": { @@ -1290,7 +1393,7 @@ "symfony/translation": "^3.4 || ^4.0 || ^5.0 || ^6.0" }, "require-dev": { - "doctrine/dbal": "^2.0 || ^3.0", + "doctrine/dbal": "^2.0 || ^3.1.4", "doctrine/orm": "^2.7", "friendsofphp/php-cs-fixer": "^3.0", "kylekatarnls/multi-tester": "^2.0", @@ -1368,7 +1471,154 @@ "type": "tidelift" } ], - "time": "2022-09-02T07:48:13+00:00" + "time": "2022-11-26T17:36:00+00:00" + }, + { + "name": "nette/schema", + "version": "v1.2.3", + "source": { + "type": "git", + "url": "https://github.com/nette/schema.git", + "reference": "abbdbb70e0245d5f3bf77874cea1dfb0c930d06f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/schema/zipball/abbdbb70e0245d5f3bf77874cea1dfb0c930d06f", + "reference": "abbdbb70e0245d5f3bf77874cea1dfb0c930d06f", + "shasum": "" + }, + "require": { + "nette/utils": "^2.5.7 || ^3.1.5 || ^4.0", + "php": ">=7.1 <8.3" + }, + "require-dev": { + "nette/tester": "^2.3 || ^2.4", + "phpstan/phpstan-nette": "^1.0", + "tracy/tracy": "^2.7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0-only", + "GPL-3.0-only" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "📐 Nette Schema: validating data structures against a given Schema.", + "homepage": "https://nette.org", + "keywords": [ + "config", + "nette" + ], + "support": { + "issues": "https://github.com/nette/schema/issues", + "source": "https://github.com/nette/schema/tree/v1.2.3" + }, + "time": "2022-10-13T01:24:26+00:00" + }, + { + "name": "nette/utils", + "version": "v3.2.8", + "source": { + "type": "git", + "url": "https://github.com/nette/utils.git", + "reference": "02a54c4c872b99e4ec05c4aec54b5a06eb0f6368" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nette/utils/zipball/02a54c4c872b99e4ec05c4aec54b5a06eb0f6368", + "reference": "02a54c4c872b99e4ec05c4aec54b5a06eb0f6368", + "shasum": "" + }, + "require": { + "php": ">=7.2 <8.3" + }, + "conflict": { + "nette/di": "<3.0.6" + }, + "require-dev": { + "nette/tester": "~2.0", + "phpstan/phpstan": "^1.0", + "tracy/tracy": "^2.3" + }, + "suggest": { + "ext-gd": "to use Image", + "ext-iconv": "to use Strings::webalize(), toAscii(), chr() and reverse()", + "ext-intl": "to use Strings::webalize(), toAscii(), normalize() and compare()", + "ext-json": "to use Nette\\Utils\\Json", + "ext-mbstring": "to use Strings::lower() etc...", + "ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()", + "ext-xml": "to use Strings::length() etc. when mbstring is not available" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause", + "GPL-2.0-only", + "GPL-3.0-only" + ], + "authors": [ + { + "name": "David Grudl", + "homepage": "https://davidgrudl.com" + }, + { + "name": "Nette Community", + "homepage": "https://nette.org/contributors" + } + ], + "description": "🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.", + "homepage": "https://nette.org", + "keywords": [ + "array", + "core", + "datetime", + "images", + "json", + "nette", + "paginator", + "password", + "slugify", + "string", + "unicode", + "utf-8", + "utility", + "validation" + ], + "support": { + "issues": "https://github.com/nette/utils/issues", + "source": "https://github.com/nette/utils/tree/v3.2.8" + }, + "time": "2022-09-12T23:36:20+00:00" }, { "name": "opis/closure", @@ -1512,20 +1762,20 @@ }, { "name": "psr/container", - "version": "1.1.1", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", + "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", "shasum": "" }, "require": { - "php": ">=7.2.0" + "php": ">=7.4.0" }, "type": "library", "autoload": { @@ -1554,9 +1804,9 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.1" + "source": "https://github.com/php-fig/container/tree/1.1.2" }, - "time": "2021-03-05T17:36:06+00:00" + "time": "2021-11-05T16:50:12+00:00" }, { "name": "psr/event-dispatcher", @@ -1964,16 +2214,16 @@ }, { "name": "symfony/console", - "version": "v5.4.14", + "version": "v5.4.16", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "984ea2c0f45f42dfed01d2f3987b187467c4b16d" + "reference": "8e9b9c8dfb33af6057c94e1b44846bee700dc5ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/984ea2c0f45f42dfed01d2f3987b187467c4b16d", - "reference": "984ea2c0f45f42dfed01d2f3987b187467c4b16d", + "url": "https://api.github.com/repos/symfony/console/zipball/8e9b9c8dfb33af6057c94e1b44846bee700dc5ef", + "reference": "8e9b9c8dfb33af6057c94e1b44846bee700dc5ef", "shasum": "" }, "require": { @@ -2043,7 +2293,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.14" + "source": "https://github.com/symfony/console/tree/v5.4.16" }, "funding": [ { @@ -2059,7 +2309,7 @@ "type": "tidelift" } ], - "time": "2022-10-07T08:01:20+00:00" + "time": "2022-11-25T14:09:27+00:00" }, { "name": "symfony/css-selector", @@ -2196,16 +2446,16 @@ }, { "name": "symfony/error-handler", - "version": "v5.4.14", + "version": "v5.4.15", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "5fe6d42ffeb68b094df8fdbf3acf23f391cc6be0" + "reference": "539cf1428b8442303c6e876ad7bf5a7babd91091" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/5fe6d42ffeb68b094df8fdbf3acf23f391cc6be0", - "reference": "5fe6d42ffeb68b094df8fdbf3acf23f391cc6be0", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/539cf1428b8442303c6e876ad7bf5a7babd91091", + "reference": "539cf1428b8442303c6e876ad7bf5a7babd91091", "shasum": "" }, "require": { @@ -2247,7 +2497,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v5.4.14" + "source": "https://github.com/symfony/error-handler/tree/v5.4.15" }, "funding": [ { @@ -2263,7 +2513,7 @@ "type": "tidelift" } ], - "time": "2022-10-03T15:15:50+00:00" + "time": "2022-10-27T06:32:25+00:00" }, { "name": "symfony/event-dispatcher", @@ -2494,16 +2744,16 @@ }, { "name": "symfony/http-foundation", - "version": "v5.4.14", + "version": "v5.4.16", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "e7c7b395c3a61d746919c21e915f51f0039c3f75" + "reference": "5032c5849aef24741e1970cb03511b0dd131d838" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e7c7b395c3a61d746919c21e915f51f0039c3f75", - "reference": "e7c7b395c3a61d746919c21e915f51f0039c3f75", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/5032c5849aef24741e1970cb03511b0dd131d838", + "reference": "5032c5849aef24741e1970cb03511b0dd131d838", "shasum": "" }, "require": { @@ -2550,7 +2800,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v5.4.14" + "source": "https://github.com/symfony/http-foundation/tree/v5.4.16" }, "funding": [ { @@ -2566,20 +2816,20 @@ "type": "tidelift" } ], - "time": "2022-10-01T21:59:28+00:00" + "time": "2022-11-07T08:06:40+00:00" }, { "name": "symfony/http-kernel", - "version": "v5.4.14", + "version": "v5.4.16", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "6f77fabc1a37c2dceecc6f78cca44772705dc52f" + "reference": "b432c57c5de73634b1859093c1f58e3cd84455a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/6f77fabc1a37c2dceecc6f78cca44772705dc52f", - "reference": "6f77fabc1a37c2dceecc6f78cca44772705dc52f", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/b432c57c5de73634b1859093c1f58e3cd84455a1", + "reference": "b432c57c5de73634b1859093c1f58e3cd84455a1", "shasum": "" }, "require": { @@ -2662,7 +2912,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v5.4.14" + "source": "https://github.com/symfony/http-kernel/tree/v5.4.16" }, "funding": [ { @@ -2678,20 +2928,20 @@ "type": "tidelift" } ], - "time": "2022-10-12T07:12:21+00:00" + "time": "2022-11-28T18:08:58+00:00" }, { "name": "symfony/mime", - "version": "v5.4.14", + "version": "v5.4.16", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "1c118b253bb3495d81e95a6e3ec6c2766a98a0c4" + "reference": "46eeedb08f0832b1b61a84c612d945fc85ee4734" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/1c118b253bb3495d81e95a6e3ec6c2766a98a0c4", - "reference": "1c118b253bb3495d81e95a6e3ec6c2766a98a0c4", + "url": "https://api.github.com/repos/symfony/mime/zipball/46eeedb08f0832b1b61a84c612d945fc85ee4734", + "reference": "46eeedb08f0832b1b61a84c612d945fc85ee4734", "shasum": "" }, "require": { @@ -2746,7 +2996,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v5.4.14" + "source": "https://github.com/symfony/mime/tree/v5.4.16" }, "funding": [ { @@ -2762,20 +3012,20 @@ "type": "tidelift" } ], - "time": "2022-10-07T08:01:20+00:00" + "time": "2022-11-26T16:45:22+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4" + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", "shasum": "" }, "require": { @@ -2790,7 +3040,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2828,7 +3078,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" }, "funding": [ { @@ -2844,20 +3094,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-iconv", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "143f1881e655bebca1312722af8068de235ae5dc" + "reference": "927013f3aac555983a5059aada98e1907d842695" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/143f1881e655bebca1312722af8068de235ae5dc", - "reference": "143f1881e655bebca1312722af8068de235ae5dc", + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/927013f3aac555983a5059aada98e1907d842695", + "reference": "927013f3aac555983a5059aada98e1907d842695", "shasum": "" }, "require": { @@ -2872,7 +3122,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2911,7 +3161,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-iconv/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-iconv/tree/v1.27.0" }, "funding": [ { @@ -2927,20 +3177,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "433d05519ce6990bf3530fba6957499d327395c2" + "reference": "511a08c03c1960e08a883f4cffcacd219b758354" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/433d05519ce6990bf3530fba6957499d327395c2", - "reference": "433d05519ce6990bf3530fba6957499d327395c2", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354", + "reference": "511a08c03c1960e08a883f4cffcacd219b758354", "shasum": "" }, "require": { @@ -2952,7 +3202,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2992,7 +3242,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.27.0" }, "funding": [ { @@ -3008,20 +3258,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8" + "reference": "639084e360537a19f9ee352433b84ce831f3d2da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/59a8d271f00dd0e4c2e518104cc7963f655a1aa8", - "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/639084e360537a19f9ee352433b84ce831f3d2da", + "reference": "639084e360537a19f9ee352433b84ce831f3d2da", "shasum": "" }, "require": { @@ -3035,7 +3285,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3079,7 +3329,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.27.0" }, "funding": [ { @@ -3095,20 +3345,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "219aa369ceff116e673852dce47c3a41794c14bd" + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/219aa369ceff116e673852dce47c3a41794c14bd", - "reference": "219aa369ceff116e673852dce47c3a41794c14bd", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", "shasum": "" }, "require": { @@ -3120,7 +3370,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3163,7 +3413,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0" }, "funding": [ { @@ -3179,20 +3429,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", "shasum": "" }, "require": { @@ -3207,7 +3457,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3246,7 +3496,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" }, "funding": [ { @@ -3262,20 +3512,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2" + "reference": "869329b1e9894268a8a61dabb69153029b7a8c97" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/bf44a9fd41feaac72b074de600314a93e2ae78e2", - "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/869329b1e9894268a8a61dabb69153029b7a8c97", + "reference": "869329b1e9894268a8a61dabb69153029b7a8c97", "shasum": "" }, "require": { @@ -3284,7 +3534,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3322,7 +3572,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-php72/tree/v1.27.0" }, "funding": [ { @@ -3338,20 +3588,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85" + "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/e440d35fa0286f77fb45b79a03fedbeda9307e85", - "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/9e8ecb5f92152187c4799efd3c96b78ccab18ff9", + "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9", "shasum": "" }, "require": { @@ -3360,7 +3610,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3401,7 +3651,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.27.0" }, "funding": [ { @@ -3417,20 +3667,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace" + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace", - "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", "shasum": "" }, "require": { @@ -3439,7 +3689,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3484,7 +3734,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" }, "funding": [ { @@ -3500,20 +3750,20 @@ "type": "tidelift" } ], - "time": "2022-05-10T07:21:04+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-php81", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1" + "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/13f6d1271c663dc5ae9fb843a8f16521db7687a1", - "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/707403074c8ea6e2edaf8794b0157a0bfa52157a", + "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a", "shasum": "" }, "require": { @@ -3522,7 +3772,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3563,7 +3813,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.27.0" }, "funding": [ { @@ -3579,7 +3829,7 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/process", @@ -3645,16 +3895,16 @@ }, { "name": "symfony/routing", - "version": "v5.4.11", + "version": "v5.4.15", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "3e01ccd9b2a3a4167ba2b3c53612762300300226" + "reference": "5c9b129efe9abce9470e384bf65d8a7e262eee69" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/3e01ccd9b2a3a4167ba2b3c53612762300300226", - "reference": "3e01ccd9b2a3a4167ba2b3c53612762300300226", + "url": "https://api.github.com/repos/symfony/routing/zipball/5c9b129efe9abce9470e384bf65d8a7e262eee69", + "reference": "5c9b129efe9abce9470e384bf65d8a7e262eee69", "shasum": "" }, "require": { @@ -3715,7 +3965,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v5.4.11" + "source": "https://github.com/symfony/routing/tree/v5.4.15" }, "funding": [ { @@ -3731,7 +3981,7 @@ "type": "tidelift" } ], - "time": "2022-07-20T13:00:38+00:00" + "time": "2022-10-13T14:10:41+00:00" }, { "name": "symfony/service-contracts", @@ -3818,16 +4068,16 @@ }, { "name": "symfony/string", - "version": "v5.4.14", + "version": "v5.4.15", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "089e7237497fae7a9c404d0c3aeb8db3254733e4" + "reference": "571334ce9f687e3e6af72db4d3b2a9431e4fd9ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/089e7237497fae7a9c404d0c3aeb8db3254733e4", - "reference": "089e7237497fae7a9c404d0c3aeb8db3254733e4", + "url": "https://api.github.com/repos/symfony/string/zipball/571334ce9f687e3e6af72db4d3b2a9431e4fd9ed", + "reference": "571334ce9f687e3e6af72db4d3b2a9431e4fd9ed", "shasum": "" }, "require": { @@ -3884,7 +4134,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.14" + "source": "https://github.com/symfony/string/tree/v5.4.15" }, "funding": [ { @@ -4584,20 +4834,20 @@ }, { "name": "fakerphp/faker", - "version": "v1.20.0", + "version": "v1.21.0", "source": { "type": "git", "url": "https://github.com/FakerPHP/Faker.git", - "reference": "37f751c67a5372d4e26353bd9384bc03744ec77b" + "reference": "92efad6a967f0b79c499705c69b662f738cc9e4d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/37f751c67a5372d4e26353bd9384bc03744ec77b", - "reference": "37f751c67a5372d4e26353bd9384bc03744ec77b", + "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/92efad6a967f0b79c499705c69b662f738cc9e4d", + "reference": "92efad6a967f0b79c499705c69b662f738cc9e4d", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0", + "php": "^7.4 || ^8.0", "psr/container": "^1.0 || ^2.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" }, @@ -4608,7 +4858,8 @@ "bamarni/composer-bin-plugin": "^1.4.1", "doctrine/persistence": "^1.3 || ^2.0", "ext-intl": "*", - "symfony/phpunit-bridge": "^4.4 || ^5.2" + "phpunit/phpunit": "^9.5.26", + "symfony/phpunit-bridge": "^5.4.16" }, "suggest": { "doctrine/orm": "Required to use Faker\\ORM\\Doctrine", @@ -4620,7 +4871,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "v1.20-dev" + "dev-main": "v1.21-dev" } }, "autoload": { @@ -4645,22 +4896,22 @@ ], "support": { "issues": "https://github.com/FakerPHP/Faker/issues", - "source": "https://github.com/FakerPHP/Faker/tree/v1.20.0" + "source": "https://github.com/FakerPHP/Faker/tree/v1.21.0" }, - "time": "2022-07-20T13:12:54+00:00" + "time": "2022-12-13T13:54:32+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.4.1", + "version": "2.4.3", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "69568e4293f4fa993f3b0e51c9723e1e17c41379" + "reference": "67c26b443f348a51926030c83481b85718457d3d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/69568e4293f4fa993f3b0e51c9723e1e17c41379", - "reference": "69568e4293f4fa993f3b0e51c9723e1e17c41379", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/67c26b443f348a51926030c83481b85718457d3d", + "reference": "67c26b443f348a51926030c83481b85718457d3d", "shasum": "" }, "require": { @@ -4750,7 +5001,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.4.1" + "source": "https://github.com/guzzle/psr7/tree/2.4.3" }, "funding": [ { @@ -4766,7 +5017,7 @@ "type": "tidelift" } ], - "time": "2022-08-28T14:45:39+00:00" + "time": "2022-10-26T14:07:24+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -4821,23 +5072,23 @@ }, { "name": "leroy-merlin-br/coding-standard", - "version": "v3.0.2", + "version": "v3.1.0", "source": { "type": "git", - "url": "https://github.com/leroy-merlin-br/php-coding-standard.git", - "reference": "b15ddc0f22a72c33305b813d1624661f7dcd595f" + "url": "git@github.com:leroy-merlin-br/php-coding-standard.git", + "reference": "7c9cc6c20d89a5e8029e4cce5661a0434adcc4e1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/leroy-merlin-br/php-coding-standard/zipball/b15ddc0f22a72c33305b813d1624661f7dcd595f", - "reference": "b15ddc0f22a72c33305b813d1624661f7dcd595f", + "url": "https://api.github.com/repos/leroy-merlin-br/php-coding-standard/zipball/7c9cc6c20d89a5e8029e4cce5661a0434adcc4e1", + "reference": "7c9cc6c20d89a5e8029e4cce5661a0434adcc4e1", "shasum": "" }, "require": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", - "php": ">=7.1", - "slevomat/coding-standard": "^6.4.1", - "squizlabs/php_codesniffer": "^3.5.8" + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.2", + "php": ">=7.4", + "slevomat/coding-standard": "^7.0.18", + "squizlabs/php_codesniffer": "^3.6.2" }, "type": "phpcodesniffer-standard", "notification-url": "https://packagist.org/downloads/", @@ -4864,11 +5115,7 @@ "standard", "style" ], - "support": { - "issues": "https://github.com/leroy-merlin-br/php-coding-standard/issues", - "source": "https://github.com/leroy-merlin-br/php-coding-standard/tree/v3.0.2" - }, - "time": "2021-03-09T21:20:55+00:00" + "time": "2022-04-29T20:29:50+00:00" }, { "name": "mockery/mockery", @@ -5003,16 +5250,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.15.1", + "version": "v4.15.2", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900" + "reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/0ef6c55a3f47f89d7a374e6f835197a0b5fcf900", - "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc", + "reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc", "shasum": "" }, "require": { @@ -5053,9 +5300,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.1" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.2" }, - "time": "2022-09-04T07:30:47+00:00" + "time": "2022-11-12T15:38:23+00:00" }, { "name": "orchestra/testbench", @@ -5325,39 +5572,31 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "0.4.9", + "version": "1.15.3", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "98a088b17966bdf6ee25c8a4b634df313d8aa531" + "reference": "61800f71a5526081d1b5633766aa88341f1ade76" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/98a088b17966bdf6ee25c8a4b634df313d8aa531", - "reference": "98a088b17966bdf6ee25c8a4b634df313d8aa531", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/61800f71a5526081d1b5633766aa88341f1ade76", + "reference": "61800f71a5526081d1b5633766aa88341f1ade76", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": "^7.2 || ^8.0" }, "require-dev": { - "consistence/coding-standard": "^3.5", - "ergebnis/composer-normalize": "^2.0.2", - "jakub-onderka/php-parallel-lint": "^0.9.2", - "phing/phing": "^2.16.0", + "php-parallel-lint/php-parallel-lint": "^1.2", "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12.26", - "phpstan/phpstan-strict-rules": "^0.12", - "phpunit/phpunit": "^6.3", - "slevomat/coding-standard": "^4.7.2", - "symfony/process": "^4.0" + "phpstan/phpstan": "^1.5", + "phpstan/phpstan-phpunit": "^1.1", + "phpstan/phpstan-strict-rules": "^1.0", + "phpunit/phpunit": "^9.5", + "symfony/process": "^5.2" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.4-dev" - } - }, "autoload": { "psr-4": { "PHPStan\\PhpDocParser\\": [ @@ -5372,22 +5611,22 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/master" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.15.3" }, - "time": "2020-08-03T20:32:43+00:00" + "time": "2022-12-20T20:56:55+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.17", + "version": "9.2.22", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "aa94dc41e8661fe90c7316849907cba3007b10d8" + "reference": "e4bf60d2220b4baaa0572986b5d69870226b06df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/aa94dc41e8661fe90c7316849907cba3007b10d8", - "reference": "aa94dc41e8661fe90c7316849907cba3007b10d8", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/e4bf60d2220b4baaa0572986b5d69870226b06df", + "reference": "e4bf60d2220b4baaa0572986b5d69870226b06df", "shasum": "" }, "require": { @@ -5443,7 +5682,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.17" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.22" }, "funding": [ { @@ -5451,7 +5690,7 @@ "type": "github" } ], - "time": "2022-08-30T12:24:04+00:00" + "time": "2022-12-18T16:40:55+00:00" }, { "name": "phpunit/php-file-iterator", @@ -5696,16 +5935,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.25", + "version": "9.5.27", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d" + "reference": "a2bc7ffdca99f92d959b3f2270529334030bba38" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d", - "reference": "3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a2bc7ffdca99f92d959b3f2270529334030bba38", + "reference": "a2bc7ffdca99f92d959b3f2270529334030bba38", "shasum": "" }, "require": { @@ -5778,7 +6017,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.25" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.27" }, "funding": [ { @@ -5794,7 +6033,7 @@ "type": "tidelift" } ], - "time": "2022-09-25T03:44:45+00:00" + "time": "2022-12-09T07:31:23+00:00" }, { "name": "pimple/pimple", @@ -6967,37 +7206,37 @@ }, { "name": "slevomat/coding-standard", - "version": "6.4.1", + "version": "7.2.1", "source": { "type": "git", "url": "https://github.com/slevomat/coding-standard.git", - "reference": "696dcca217d0c9da2c40d02731526c1e25b65346" + "reference": "aff06ae7a84e4534bf6f821dc982a93a5d477c90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/696dcca217d0c9da2c40d02731526c1e25b65346", - "reference": "696dcca217d0c9da2c40d02731526c1e25b65346", + "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/aff06ae7a84e4534bf6f821dc982a93a5d477c90", + "reference": "aff06ae7a84e4534bf6f821dc982a93a5d477c90", "shasum": "" }, "require": { "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7", - "php": "^7.1 || ^8.0", - "phpstan/phpdoc-parser": "0.4.5 - 0.4.9", - "squizlabs/php_codesniffer": "^3.5.6" + "php": "^7.2 || ^8.0", + "phpstan/phpdoc-parser": "^1.5.1", + "squizlabs/php_codesniffer": "^3.6.2" }, "require-dev": { - "phing/phing": "2.16.3", - "php-parallel-lint/php-parallel-lint": "1.2.0", - "phpstan/phpstan": "0.12.48", - "phpstan/phpstan-deprecation-rules": "0.12.5", - "phpstan/phpstan-phpunit": "0.12.16", - "phpstan/phpstan-strict-rules": "0.12.5", - "phpunit/phpunit": "7.5.20|8.5.5|9.4.0" + "phing/phing": "2.17.3", + "php-parallel-lint/php-parallel-lint": "1.3.2", + "phpstan/phpstan": "1.4.10|1.7.1", + "phpstan/phpstan-deprecation-rules": "1.0.0", + "phpstan/phpstan-phpunit": "1.0.0|1.1.1", + "phpstan/phpstan-strict-rules": "1.2.3", + "phpunit/phpunit": "7.5.20|8.5.21|9.5.20" }, "type": "phpcodesniffer-standard", "extra": { "branch-alias": { - "dev-master": "6.x-dev" + "dev-master": "7.x-dev" } }, "autoload": { @@ -7012,7 +7251,7 @@ "description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.", "support": { "issues": "https://github.com/slevomat/coding-standard/issues", - "source": "https://github.com/slevomat/coding-standard/tree/6.4.1" + "source": "https://github.com/slevomat/coding-standard/tree/7.2.1" }, "funding": [ { @@ -7024,7 +7263,7 @@ "type": "tidelift" } ], - "time": "2020-10-05T12:39:37+00:00" + "time": "2022-05-25T10:58:12+00:00" }, { "name": "spatie/backtrace", @@ -7417,16 +7656,16 @@ }, { "name": "symfony/yaml", - "version": "v5.4.14", + "version": "v5.4.16", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "e83fe9a72011f07c662da46a05603d66deeeb487" + "reference": "ebd37c71f62d5ec5f6e27de3e06fee492d4c6298" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/e83fe9a72011f07c662da46a05603d66deeeb487", - "reference": "e83fe9a72011f07c662da46a05603d66deeeb487", + "url": "https://api.github.com/repos/symfony/yaml/zipball/ebd37c71f62d5ec5f6e27de3e06fee492d4c6298", + "reference": "ebd37c71f62d5ec5f6e27de3e06fee492d4c6298", "shasum": "" }, "require": { @@ -7472,7 +7711,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v5.4.14" + "source": "https://github.com/symfony/yaml/tree/v5.4.16" }, "funding": [ { @@ -7488,7 +7727,7 @@ "type": "tidelift" } ], - "time": "2022-10-03T15:15:50+00:00" + "time": "2022-11-25T16:04:03+00:00" }, { "name": "theseer/tokenizer", @@ -7744,14 +7983,12 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "leroy-merlin-br/mongolid": 10 - }, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=7.3" + "php": ">=7.4" }, "platform-dev": [], - "plugin-api-version": "2.0.0" + "plugin-api-version": "2.3.0" } diff --git a/docker/Dockerfile b/docker/Dockerfile index dc02803..26f2035 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,15 +1,32 @@ -FROM leroymerlinbr/php:7.3 +FROM php:7.4-fpm LABEL maintainer="boitata@leroymerlin.com.br" USER root:root -RUN docker-php-ext-enable xdebug +COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer + +RUN apt-get update -qq \ + && apt-get install -qq --no-install-recommends \ + git zip unzip \ + libzip-dev libssl-dev \ + zlib1g-dev libicu-dev \ + && apt-get clean + +RUN pecl install xdebug-3.1.6 mongodb \ + && docker-php-ext-enable \ + mongodb xdebug \ + && docker-php-ext-configure \ + intl \ + && docker-php-ext-install \ + intl pcntl zip \ + && rm -rf /tmp/* ARG UID=1000 ARG GID=1000 RUN groupmod -g ${GID} www-data \ && usermod -u ${UID} -g www-data www-data \ + && mkdir -p /var/www/html \ && chown -hR www-data:www-data \ /var/www \ /usr/local/ @@ -17,3 +34,6 @@ RUN groupmod -g ${GID} www-data \ COPY custom.ini /usr/local/etc/php/conf.d/custom.ini USER www-data:www-data + +WORKDIR /var/www/html +ENV PATH=$PATH:/var/www/.composer/vendor/bin From 96954b1c8c428d6ca5ccafebeaf89b27001b64b1 Mon Sep 17 00:00:00 2001 From: Orlando Cavassani Date: Wed, 21 Dec 2022 10:38:51 -0300 Subject: [PATCH 2/2] chore: apply multiline code standard --- composer.lock | 2 +- phpcs.xml.dist | 31 ++++++++++ src/LaravelCacheComponent.php | 5 +- src/LegacyMongolidModel.php | 10 ++- src/MigrationServiceProvider.php | 9 ++- src/Migrations/Commands/BaseCommand.php | 4 +- .../Commands/MigrateMakeCommand.php | 4 +- src/Migrations/Commands/StatusCommand.php | 4 +- src/Migrations/MigrationCreator.php | 4 +- src/Migrations/Migrator.php | 8 ++- src/MongolidFailedJobProvider.php | 5 +- src/MongolidModel.php | 10 ++- src/MongolidServiceProvider.php | 32 ++++++++-- src/Validation/Rules.php | 9 ++- tests/LegacyMongolidModelTest.php | 45 +++++++++++--- tests/MigrationServiceProviderTest.php | 60 ++++++++++++++---- .../Migrations/Commands/FreshCommandTest.php | 5 +- .../Commands/InstallCommandTest.php | 5 +- .../Commands/MigrateCommandTest.php | 35 ++++++++--- .../Commands/MigrateMakeCommandTest.php | 59 ++++++++++++++---- .../Migrations/Commands/ResetCommandTest.php | 5 +- .../Commands/RollbackCommandTest.php | 15 ++++- .../Migrations/Commands/StatusCommandTest.php | 10 ++- tests/Migrations/MigrationCreatorTest.php | 27 ++++++-- tests/Migrations/MigratorTest.php | 21 +++++-- .../MongolidMigrationRepositoryTest.php | 62 +++++++++++++++---- tests/MongolidFailedJobProviderTest.php | 5 +- tests/MongolidModelTest.php | 5 +- tests/MongolidServiceProviderTest.php | 5 +- tests/UTCDateTimeComparator.php | 6 +- tests/Validation/RulesTest.php | 26 ++++++-- 31 files changed, 430 insertions(+), 103 deletions(-) diff --git a/composer.lock b/composer.lock index 714846d..23fa120 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a65c2eacf42722bdbfca5776be2a1cb3", + "content-hash": "b6723b01f1df57c603d89f6554137886", "packages": [ { "name": "brick/math", diff --git a/phpcs.xml.dist b/phpcs.xml.dist index bbba101..fc97767 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -32,6 +32,37 @@ src/MongolidModel.php + + src/LaravelCacheComponent.php + src/MigrationServiceProvider.php + src/MongolidServiceProvider.php + src/Validation/Rules.php + src/Migrations/Migration.php + src/MongolidFailedJobProvider.php + src/Migrations/Commands/MigrateCommand.php + src/Migrations/Commands/FreshCommand.php + src/Migrations/Commands/InstallCommand.php + src/Migrations/MigrationCreator.php + src/Migrations/Commands/RollbackCommand.php + src/Migrations/Commands/MigrateMakeCommand.php + src/Migrations/Commands/StatusCommand.php + src/LaravelEventTrigger.php + src/FailedJobsService.php + src/Migrations/Commands/RefreshCommand.php + src/MongolidUserProvider.php + src/Migrations/MongolidMigrationRepository.php + src/LegacyMongolidModel.php + src/Migrations/Migrator.php + src/Migrations/Commands/ResetCommand.php + src/Migrations/Commands/ResetCommand.php + src/MongolidModel.php + tests/Stubs + + + + tests/MongolidUserProviderTest.php + + warning diff --git a/src/LaravelCacheComponent.php b/src/LaravelCacheComponent.php index 5b9d0d1..36d37a1 100644 --- a/src/LaravelCacheComponent.php +++ b/src/LaravelCacheComponent.php @@ -43,7 +43,10 @@ public function get(string $key) return $this->inMemoryCache[$key]; } - return $this->inMemoryCache[$key] = $this->laravelCache->get($key, null); + return $this->inMemoryCache[$key] = $this->laravelCache->get( + $key, + null + ); } /** diff --git a/src/LegacyMongolidModel.php b/src/LegacyMongolidModel.php index e9ba09b..51cde09 100644 --- a/src/LegacyMongolidModel.php +++ b/src/LegacyMongolidModel.php @@ -131,7 +131,11 @@ public function isValid() } // Creates validator with attributes and the rules of the object - $validator = app(ValidationFactory::class)->make($attributes, $rules, $this->messages()); + $validator = app(ValidationFactory::class)->make( + $attributes, + $rules, + $this->messages() + ); // Validate and attach errors if ($hasErrors = $validator->fails()) { @@ -335,7 +339,9 @@ protected function localMockShouldReceive(string $method) */ protected function localMockHasExpectationsFor(string $method): bool { - return $this->hasLocalMock() && $this->getLocalMock()->mockery_getExpectationsFor($method); + return $this->hasLocalMock() && $this->getLocalMock()->mockery_getExpectationsFor( + $method + ); } /** diff --git a/src/MigrationServiceProvider.php b/src/MigrationServiceProvider.php index 494e963..39e1fd5 100755 --- a/src/MigrationServiceProvider.php +++ b/src/MigrationServiceProvider.php @@ -100,7 +100,10 @@ protected function registerRepository() function ($app) { $collection = $app['config']['database.mongodb.default.migrations'] ?? 'migrations'; - return new MongolidMigrationRepository($app[Connection::class], $collection); + return new MongolidMigrationRepository( + $app[Connection::class], + $collection + ); } ); } @@ -170,7 +173,9 @@ protected function registerMigrateInstallCommand() $this->app->singleton( 'command.mongolid-migrate.install', function ($app) { - return new InstallCommand($app['mongolid.migration.repository']); + return new InstallCommand( + $app['mongolid.migration.repository'] + ); } ); } diff --git a/src/Migrations/Commands/BaseCommand.php b/src/Migrations/Commands/BaseCommand.php index 6f4284d..a0bb649 100755 --- a/src/Migrations/Commands/BaseCommand.php +++ b/src/Migrations/Commands/BaseCommand.php @@ -45,7 +45,9 @@ function ($path) { */ protected function usingRealPath() { - return $this->input->hasOption('realpath') && $this->option('realpath'); + return $this->input->hasOption('realpath') && $this->option( + 'realpath' + ); } /** diff --git a/src/Migrations/Commands/MigrateMakeCommand.php b/src/Migrations/Commands/MigrateMakeCommand.php index 8ab435f..7f10643 100644 --- a/src/Migrations/Commands/MigrateMakeCommand.php +++ b/src/Migrations/Commands/MigrateMakeCommand.php @@ -114,6 +114,8 @@ protected function getMigrationPath() */ protected function usingRealPath() { - return $this->input->hasOption('realpath') && $this->option('realpath'); + return $this->input->hasOption('realpath') && $this->option( + 'realpath' + ); } } diff --git a/src/Migrations/Commands/StatusCommand.php b/src/Migrations/Commands/StatusCommand.php index 25308cd..4d8bcaa 100644 --- a/src/Migrations/Commands/StatusCommand.php +++ b/src/Migrations/Commands/StatusCommand.php @@ -80,7 +80,9 @@ protected function getStatusFor(array $ran, array $batches) return Collection::make($this->getAllMigrationFiles()) ->map( function ($migration) use ($ran, $batches) { - $migrationName = $this->migrator->getMigrationName($migration); + $migrationName = $this->migrator->getMigrationName( + $migration + ); return in_array($migrationName, $ran) ? ['Yes', $migrationName, $batches[$migrationName]] diff --git a/src/Migrations/MigrationCreator.php b/src/Migrations/MigrationCreator.php index 45ec2a1..bfcd6cd 100755 --- a/src/Migrations/MigrationCreator.php +++ b/src/Migrations/MigrationCreator.php @@ -107,7 +107,9 @@ public function getFilesystem() protected function ensureMigrationDoesntAlreadyExist($name) { if (class_exists($className = $this->getClassName($name))) { - throw new InvalidArgumentException("A {$className} class already exists."); + throw new InvalidArgumentException( + "A {$className} class already exists." + ); } } diff --git a/src/Migrations/Migrator.php b/src/Migrations/Migrator.php index 6c0635d..e3a45fa 100755 --- a/src/Migrations/Migrator.php +++ b/src/Migrations/Migrator.php @@ -188,7 +188,9 @@ public function reset($paths = []) */ public function resolve($file) { - $class = Str::studly(implode('_', array_slice(explode('_', $file), 4))); + $class = Str::studly( + implode('_', array_slice(explode('_', $file), 4)) + ); return new $class($this->output); } @@ -407,7 +409,9 @@ protected function rollbackMigrations(array $migrations, $paths) $migration = (object) $migration; if (!$file = Arr::get($files, $migration->migration)) { - $this->note("Migration not found: {$migration->migration}"); + $this->note( + "Migration not found: {$migration->migration}" + ); continue; } diff --git a/src/MongolidFailedJobProvider.php b/src/MongolidFailedJobProvider.php index d05df50..c9d60d4 100644 --- a/src/MongolidFailedJobProvider.php +++ b/src/MongolidFailedJobProvider.php @@ -112,7 +112,10 @@ private function presentJob($job) 'queue' => $job['queue'], 'payload' => $job['payload'], 'exception' => $job['exception'], - 'failed_at' => LocalDateTime::format($job['failed_at'], DateTime::ATOM), + 'failed_at' => LocalDateTime::format( + $job['failed_at'], + DateTime::ATOM + ), ]; } } diff --git a/src/MongolidModel.php b/src/MongolidModel.php index 7d5a46f..562d959 100644 --- a/src/MongolidModel.php +++ b/src/MongolidModel.php @@ -132,7 +132,11 @@ public function isValid() } // Creates validator with attributes and the rules of the object - $validator = app(ValidationFactory::class)->make($attributes, $rules, $this->messages()); + $validator = app(ValidationFactory::class)->make( + $attributes, + $rules, + $this->messages() + ); // Validate and attach errors if ($hasErrors = $validator->fails()) { @@ -336,7 +340,9 @@ protected function localMockShouldReceive(string $method) */ protected function localMockHasExpectationsFor(string $method): bool { - return $this->hasLocalMock() && $this->getLocalMock()->mockery_getExpectationsFor($method); + return $this->hasLocalMock() && $this->getLocalMock()->mockery_getExpectationsFor( + $method + ); } /** diff --git a/src/MongolidServiceProvider.php b/src/MongolidServiceProvider.php index fc93998..b8d03b2 100644 --- a/src/MongolidServiceProvider.php +++ b/src/MongolidServiceProvider.php @@ -51,12 +51,18 @@ public function registerConnector() $this->app->singleton( Connection::class, function ($app) { - $config = $app['config']->get('database.mongodb.default') ?? []; + $config = $app['config']->get( + 'database.mongodb.default' + ) ?? []; $connectionString = $this->buildConnectionString($config); $options = $config['options'] ?? []; $driverOptions = $config['driver_options'] ?? []; - $connection = new Connection($connectionString, $options, $driverOptions); + $connection = new Connection( + $connectionString, + $options, + $driverOptions + ); $connection->defaultDatabase = $config['database'] ?? 'mongolid'; return $connection; @@ -66,7 +72,9 @@ function ($app) { EventTriggerService::class, function ($app) { $eventService = new EventTriggerService(); - $eventService->registerEventDispatcher($app->make(LaravelEventTrigger::class)); + $eventService->registerEventDispatcher( + $app->make(LaravelEventTrigger::class) + ); return $eventService; } @@ -113,7 +121,11 @@ protected function buildConnectionString(array $config): string // If username is present, append ":@" if (isset($config['username'])) { - $result .= sprintf('%s:%s@', $config['username'], $config['password'] ?? ''); + $result .= sprintf( + '%s:%s@', + $config['username'], + $config['password'] ?? '' + ); } // Append "/" @@ -143,13 +155,21 @@ private function buildHostname(array $config): string { if (isset($config['cluster'])) { foreach ($config['cluster']['nodes'] as $node) { - $nodes[] = sprintf('%s:%s', $node['host'] ?? '127.0.0.1', $node['port'] ?? 27017); + $nodes[] = sprintf( + '%s:%s', + $node['host'] ?? '127.0.0.1', + $node['port'] ?? 27017 + ); } return implode(',', $nodes ?? ['127.0.0.1:27017']); } - return sprintf('%s:%s', $config['host'] ?? '127.0.0.1', $config['port'] ?? 27017); + return sprintf( + '%s:%s', + $config['host'] ?? '127.0.0.1', + $config['port'] ?? 27017 + ); } /** diff --git a/src/Validation/Rules.php b/src/Validation/Rules.php index 12536f4..06f413c 100644 --- a/src/Validation/Rules.php +++ b/src/Validation/Rules.php @@ -72,7 +72,10 @@ public function exists(string $attribute, $value, array $parameters) $collection = $parameters[0]; $field = $parameters[1] ?? $attribute; - return $this->hasResults($collection, [$field => $this->transformIfId($value)]); + return $this->hasResults( + $collection, + [$field => $this->transformIfId($value)] + ); } /** @@ -127,7 +130,9 @@ public function objectIdMessage(string $message, string $attribute, string $rule private function requireParameterCount(int $count, array $parameters, string $rule): void { if (count($parameters) < $count) { - throw new InvalidArgumentException("Validation rule {$rule} requires at least {$count} parameters."); + throw new InvalidArgumentException( + "Validation rule {$rule} requires at least {$count} parameters." + ); } } diff --git a/tests/LegacyMongolidModelTest.php b/tests/LegacyMongolidModelTest.php index 87ee4e3..168b1e3 100644 --- a/tests/LegacyMongolidModelTest.php +++ b/tests/LegacyMongolidModelTest.php @@ -109,7 +109,10 @@ public function testShouldValidateChangedHashedAttributes() public function testShouldSave() { // Set - $dataMapper = $this->instance(DataMapper::class, m::mock(DataMapper::class)); + $dataMapper = $this->instance( + DataMapper::class, + m::mock(DataMapper::class) + ); $model = new LegacyMongolidModelStub(); $model->setCollection('users'); @@ -153,7 +156,10 @@ public function testShouldMockSave() public function testShouldHashAttributesOnSaveAndUpdate($method) { // Set - $dataMapper = $this->instance(DataMapper::class, m::mock(DataMapper::class)); + $dataMapper = $this->instance( + DataMapper::class, + m::mock(DataMapper::class) + ); $hasher = $this->instance(Hasher::class, m::mock(Hasher::class)); $model = new LegacyMongolidModelStub([ @@ -236,7 +242,10 @@ public function testShouldForceSaving() public function testShouldDelete() { // Set - $dataMapper = $this->instance(DataMapper::class, m::mock(DataMapper::class)); + $dataMapper = $this->instance( + DataMapper::class, + m::mock(DataMapper::class) + ); $model = new LegacyMongolidModelStub(); $model->setCollection('collection_name'); @@ -278,7 +287,10 @@ public function testShouldMockDelete() public function testShouldGetFirst() { // Set - $dataMapper = $this->instance(DataMapper::class, m::mock(DataMapper::class)); + $dataMapper = $this->instance( + DataMapper::class, + m::mock(DataMapper::class) + ); $model = new LegacyMongolidModelStub(); // Expectations @@ -317,7 +329,10 @@ public function testShouldMockFirst() public function testShouldGetFirstOrNew() { // Set - $dataMapper = $this->instance(DataMapper::class, m::mock(DataMapper::class)); + $dataMapper = $this->instance( + DataMapper::class, + m::mock(DataMapper::class) + ); $model = new LegacyMongolidModelStub(); // Expectations @@ -356,7 +371,10 @@ public function testShouldMockFirstOrNew() public function testShouldGetFirstOrFailAndFoundIt() { // Set - $dataMapper = $this->instance(DataMapper::class, m::mock(DataMapper::class)); + $dataMapper = $this->instance( + DataMapper::class, + m::mock(DataMapper::class) + ); $model = new LegacyMongolidModelStub(); // Expectations @@ -377,7 +395,10 @@ public function testShouldGetFirstOrFailAndFoundIt() public function testShouldGetFirstOrFailAndFail() { // Set - $dataMapper = $this->instance(DataMapper::class, m::mock(DataMapper::class)); + $dataMapper = $this->instance( + DataMapper::class, + m::mock(DataMapper::class) + ); $model = new LegacyMongolidModelStub(); // Expectations @@ -416,7 +437,10 @@ public function testShouldMockFirstOrFail() public function testShouldGetWhere() { // Set - $dataMapper = $this->instance(DataMapper::class, m::mock(DataMapper::class)); + $dataMapper = $this->instance( + DataMapper::class, + m::mock(DataMapper::class) + ); $cursor = m::mock(CursorInterface::class); $model = new LegacyMongolidModelStub(); @@ -439,7 +463,10 @@ public function testShouldGetWhere() public function testShouldGetAll() { // Set - $dataMapper = $this->instance(DataMapper::class, m::mock(DataMapper::class)); + $dataMapper = $this->instance( + DataMapper::class, + m::mock(DataMapper::class) + ); $cursor = m::mock(CursorInterface::class); $model = new LegacyMongolidModelStub(); diff --git a/tests/MigrationServiceProviderTest.php b/tests/MigrationServiceProviderTest.php index fd1f165..fb0371c 100644 --- a/tests/MigrationServiceProviderTest.php +++ b/tests/MigrationServiceProviderTest.php @@ -26,7 +26,10 @@ class MigrationServiceProviderTest extends TestCase public function testShouldBoot() { // Set - $provider = m::mock(MigrationServiceProvider::class . '[commands]', [$this->app]); + $provider = m::mock( + MigrationServiceProvider::class . '[commands]', + [$this->app] + ); // Expectations $provider->expects() @@ -56,17 +59,50 @@ public function testShouldRegister() $provider->register(); // Assertions - $this->assertInstanceOf(MongolidMigrationRepository::class, $this->app['mongolid.migration.repository']); - $this->assertInstanceOf(Migrator::class, $this->app['mongolid.migrator']); - $this->assertInstanceOf(MigrationCreator::class, $this->app['mongolid.migration.creator']); - $this->assertInstanceOf(MigrateCommand::class, $this->app['command.mongolid-migrate']); - $this->assertInstanceOf(FreshCommand::class, $this->app['command.mongolid-migrate.fresh']); - $this->assertInstanceOf(InstallCommand::class, $this->app['command.mongolid-migrate.install']); - $this->assertInstanceOf(MigrateMakeCommand::class, $this->app['command.mongolid-migrate.make']); - $this->assertInstanceOf(RefreshCommand::class, $this->app['command.mongolid-migrate.refresh']); - $this->assertInstanceOf(ResetCommand::class, $this->app['command.mongolid-migrate.reset']); - $this->assertInstanceOf(RollbackCommand::class, $this->app['command.mongolid-migrate.rollback']); - $this->assertInstanceOf(StatusCommand::class, $this->app['command.mongolid-migrate.status']); + $this->assertInstanceOf( + MongolidMigrationRepository::class, + $this->app['mongolid.migration.repository'] + ); + $this->assertInstanceOf( + Migrator::class, + $this->app['mongolid.migrator'] + ); + $this->assertInstanceOf( + MigrationCreator::class, + $this->app['mongolid.migration.creator'] + ); + $this->assertInstanceOf( + MigrateCommand::class, + $this->app['command.mongolid-migrate'] + ); + $this->assertInstanceOf( + FreshCommand::class, + $this->app['command.mongolid-migrate.fresh'] + ); + $this->assertInstanceOf( + InstallCommand::class, + $this->app['command.mongolid-migrate.install'] + ); + $this->assertInstanceOf( + MigrateMakeCommand::class, + $this->app['command.mongolid-migrate.make'] + ); + $this->assertInstanceOf( + RefreshCommand::class, + $this->app['command.mongolid-migrate.refresh'] + ); + $this->assertInstanceOf( + ResetCommand::class, + $this->app['command.mongolid-migrate.reset'] + ); + $this->assertInstanceOf( + RollbackCommand::class, + $this->app['command.mongolid-migrate.rollback'] + ); + $this->assertInstanceOf( + StatusCommand::class, + $this->app['command.mongolid-migrate.status'] + ); } public function testProvides() diff --git a/tests/Migrations/Commands/FreshCommandTest.php b/tests/Migrations/Commands/FreshCommandTest.php index 3b16330..9df88de 100644 --- a/tests/Migrations/Commands/FreshCommandTest.php +++ b/tests/Migrations/Commands/FreshCommandTest.php @@ -22,7 +22,10 @@ public function testShouldConfirmToRun() { // Set $connection = m::mock(Connection::class); - $command = m::mock(FreshCommand::class . '[confirmToProceed]', [$connection]); + $command = m::mock( + FreshCommand::class . '[confirmToProceed]', + [$connection] + ); $app = new Application(); $app->useDatabasePath(__DIR__); $command->setLaravel($app); diff --git a/tests/Migrations/Commands/InstallCommandTest.php b/tests/Migrations/Commands/InstallCommandTest.php index 5ced54c..ebd5683 100755 --- a/tests/Migrations/Commands/InstallCommandTest.php +++ b/tests/Migrations/Commands/InstallCommandTest.php @@ -32,6 +32,9 @@ public function testFireCallsRepositoryToInstall() ->createRepository(); // Actions - $command->run(new ArrayInput(['--database' => 'foo']), new NullOutput()); + $command->run( + new ArrayInput(['--database' => 'foo']), + new NullOutput() + ); } } diff --git a/tests/Migrations/Commands/MigrateCommandTest.php b/tests/Migrations/Commands/MigrateCommandTest.php index c61e57c..8a3aa7d 100755 --- a/tests/Migrations/Commands/MigrateCommandTest.php +++ b/tests/Migrations/Commands/MigrateCommandTest.php @@ -44,7 +44,10 @@ public function testBasicMigrationsCallMigratorWithProperArguments() ->andReturn($migrator); $migrator->expects() - ->run([__DIR__ . DIRECTORY_SEPARATOR . 'migrations'], ['step' => false]); + ->run( + [__DIR__ . DIRECTORY_SEPARATOR . 'migrations'], + ['step' => false] + ); $migrator->expects() ->repositoryExists() @@ -80,7 +83,10 @@ public function testShouldRunMigrateCommandWithDbSeed() ->andReturn($migrator); $migrator->expects() - ->run([__DIR__ . DIRECTORY_SEPARATOR . 'migrations'], ['step' => false]); + ->run( + [__DIR__ . DIRECTORY_SEPARATOR . 'migrations'], + ['step' => false] + ); $migrator->expects() ->repositoryExists() @@ -124,7 +130,10 @@ public function testMigrationRepositoryCreatedWhenNecessary() ->andReturn($migrator); $migrator->expects() - ->run([__DIR__ . DIRECTORY_SEPARATOR . 'migrations'], ['step' => false]); + ->run( + [__DIR__ . DIRECTORY_SEPARATOR . 'migrations'], + ['step' => false] + ); $migrator->expects() ->repositoryExists() @@ -166,14 +175,20 @@ public function testTheDatabaseMayBeSet() ->andReturn($migrator); $migrator->expects() - ->run([__DIR__ . DIRECTORY_SEPARATOR . 'migrations'], ['step' => false]); + ->run( + [__DIR__ . DIRECTORY_SEPARATOR . 'migrations'], + ['step' => false] + ); $migrator->expects() ->repositoryExists() ->andReturn(true); // Actions - $command->run(new ArrayInput(['--database' => 'foo']), new NullOutput()); + $command->run( + new ArrayInput(['--database' => 'foo']), + new NullOutput() + ); } public function testStepMayBeSet() @@ -202,7 +217,10 @@ public function testStepMayBeSet() ->andReturn($migrator); $migrator->expects() - ->run([__DIR__ . DIRECTORY_SEPARATOR . 'migrations'], ['step' => true]); + ->run( + [__DIR__ . DIRECTORY_SEPARATOR . 'migrations'], + ['step' => true] + ); $migrator->expects() ->repositoryExists() @@ -216,7 +234,10 @@ public function testShouldConfirmToRun() { // Set $migrator = m::mock(Migrator::class); - $command = m::mock(MigrateCommand::class . '[confirmToProceed]', [$migrator]); + $command = m::mock( + MigrateCommand::class . '[confirmToProceed]', + [$migrator] + ); $app = new Application(); $app->useDatabasePath(__DIR__); $command->setLaravel($app); diff --git a/tests/Migrations/Commands/MigrateMakeCommandTest.php b/tests/Migrations/Commands/MigrateMakeCommandTest.php index 5cca915..3dc1ae0 100755 --- a/tests/Migrations/Commands/MigrateMakeCommandTest.php +++ b/tests/Migrations/Commands/MigrateMakeCommandTest.php @@ -30,13 +30,19 @@ public function testBasicCreateDumpsAutoload() // Expectations $creator->expects() - ->create('create_foo', __DIR__ . DIRECTORY_SEPARATOR . 'migrations'); + ->create( + 'create_foo', + __DIR__ . DIRECTORY_SEPARATOR . 'migrations' + ); $composer->expects() ->dumpAutoloads(); // Actions - $command->run(new ArrayInput(['name' => 'create_foo']), new NullOutput()); + $command->run( + new ArrayInput(['name' => 'create_foo']), + new NullOutput() + ); } public function testBasicCreateGivesCreatorProperArguments() @@ -51,13 +57,19 @@ public function testBasicCreateGivesCreatorProperArguments() // Expectations $creator->expects() - ->create('create_foo', __DIR__ . DIRECTORY_SEPARATOR . 'migrations'); + ->create( + 'create_foo', + __DIR__ . DIRECTORY_SEPARATOR . 'migrations' + ); $composer->expects() ->dumpAutoloads(); // Actions - $command->run(new ArrayInput(['name' => 'create_foo']), new NullOutput()); + $command->run( + new ArrayInput(['name' => 'create_foo']), + new NullOutput() + ); } public function testBasicCreateGivesCreatorProperArgumentsWhenNameIsStudlyCase() @@ -72,13 +84,19 @@ public function testBasicCreateGivesCreatorProperArgumentsWhenNameIsStudlyCase() // Expectations $creator->expects() - ->create('create_foo', __DIR__ . DIRECTORY_SEPARATOR . 'migrations'); + ->create( + 'create_foo', + __DIR__ . DIRECTORY_SEPARATOR . 'migrations' + ); $composer->expects() ->dumpAutoloads(); // Actions - $command->run(new ArrayInput(['name' => 'CreateFoo']), new NullOutput()); + $command->run( + new ArrayInput(['name' => 'CreateFoo']), + new NullOutput() + ); } public function testBasicCreateGivesCreatorProperArgumentsWhenCollectionIsSet() @@ -93,13 +111,19 @@ public function testBasicCreateGivesCreatorProperArgumentsWhenCollectionIsSet() // Expectations $creator->expects() - ->create('create_foo', __DIR__ . DIRECTORY_SEPARATOR . 'migrations'); + ->create( + 'create_foo', + __DIR__ . DIRECTORY_SEPARATOR . 'migrations' + ); $composer->expects() ->dumpAutoloads(); // Actions - $command->run(new ArrayInput(['name' => 'create_foo']), new NullOutput()); + $command->run( + new ArrayInput(['name' => 'create_foo']), + new NullOutput() + ); } public function testBasicCreateGivesCreatorProperArgumentsWhenCreateCollectionPatternIsFound() @@ -114,13 +138,19 @@ public function testBasicCreateGivesCreatorProperArgumentsWhenCreateCollectionPa // Expectations $creator->expects() - ->create('create_users_collection', __DIR__ . DIRECTORY_SEPARATOR . 'migrations'); + ->create( + 'create_users_collection', + __DIR__ . DIRECTORY_SEPARATOR . 'migrations' + ); $composer->expects() ->dumpAutoloads(); // Actions - $command->run(new ArrayInput(['name' => 'create_users_collection']), new NullOutput()); + $command->run( + new ArrayInput(['name' => 'create_users_collection']), + new NullOutput() + ); } public function testCanSpecifyPathToCreateMigrationsIn() @@ -135,14 +165,19 @@ public function testCanSpecifyPathToCreateMigrationsIn() // Expectations $creator->expects() - ->create('create_foo', '/home/laravel/vendor/laravel-package/migrations'); + ->create( + 'create_foo', + '/home/laravel/vendor/laravel-package/migrations' + ); $composer->expects() ->dumpAutoloads(); // Actions $command->run( - new ArrayInput(['name' => 'create_foo', '--path' => 'vendor/laravel-package/migrations']), + new ArrayInput( + ['name' => 'create_foo', '--path' => 'vendor/laravel-package/migrations'] + ), new NullOutput() ); } diff --git a/tests/Migrations/Commands/ResetCommandTest.php b/tests/Migrations/Commands/ResetCommandTest.php index 375608c..3077f45 100755 --- a/tests/Migrations/Commands/ResetCommandTest.php +++ b/tests/Migrations/Commands/ResetCommandTest.php @@ -95,7 +95,10 @@ public function testShouldConfirmToRun() { // Set $migrator = m::mock(Migrator::class); - $command = m::mock(ResetCommand::class . '[confirmToProceed]', [$migrator]); + $command = m::mock( + ResetCommand::class . '[confirmToProceed]', + [$migrator] + ); $app = new Application(); $app->useDatabasePath(__DIR__); $command->setLaravel($app); diff --git a/tests/Migrations/Commands/RollbackCommandTest.php b/tests/Migrations/Commands/RollbackCommandTest.php index 425665a..6182bf8 100755 --- a/tests/Migrations/Commands/RollbackCommandTest.php +++ b/tests/Migrations/Commands/RollbackCommandTest.php @@ -44,7 +44,10 @@ public function testRollbackCommandCallsMigratorWithProperArguments() ->andReturn($migrator); $migrator->expects() - ->rollback([__DIR__ . DIRECTORY_SEPARATOR . 'migrations'], ['step' => 0]); + ->rollback( + [__DIR__ . DIRECTORY_SEPARATOR . 'migrations'], + ['step' => 0] + ); // Actions $command->run(new ArrayInput([]), new NullOutput()); @@ -76,7 +79,10 @@ public function testRollbackCommandCallsMigratorWithStepOption() ->andReturn($migrator); $migrator->expects() - ->rollback([__DIR__ . DIRECTORY_SEPARATOR . 'migrations'], ['step' => 2]); + ->rollback( + [__DIR__ . DIRECTORY_SEPARATOR . 'migrations'], + ['step' => 2] + ); // Actions $command->run(new ArrayInput(['--step' => 2]), new NullOutput()); @@ -86,7 +92,10 @@ public function testShouldConfirmToRun() { // Set $migrator = m::mock(Migrator::class); - $command = m::mock(RollbackCommand::class . '[confirmToProceed]', [$migrator]); + $command = m::mock( + RollbackCommand::class . '[confirmToProceed]', + [$migrator] + ); $app = new Application(); $app->useDatabasePath(__DIR__); $command->setLaravel($app); diff --git a/tests/Migrations/Commands/StatusCommandTest.php b/tests/Migrations/Commands/StatusCommandTest.php index 1fbdb4d..8a5c065 100644 --- a/tests/Migrations/Commands/StatusCommandTest.php +++ b/tests/Migrations/Commands/StatusCommandTest.php @@ -95,7 +95,10 @@ public function testShouldRunCommand() ->andReturn('drop_admin'); // Actions - $command->run(new ArrayInput(['--path' => 'database']), new NullOutput()); + $command->run( + new ArrayInput(['--path' => 'database']), + new NullOutput() + ); } public function testShouldRunCommandWithNoMigrations() @@ -139,6 +142,9 @@ public function testShouldRunCommandWithNoMigrations() ->andReturn($migrationFiles); // Actions - $command->run(new ArrayInput(['--path' => 'database']), new NullOutput()); + $command->run( + new ArrayInput(['--path' => 'database']), + new NullOutput() + ); } } diff --git a/tests/Migrations/MigrationCreatorTest.php b/tests/Migrations/MigrationCreatorTest.php index 8a3b0b5..94c516c 100755 --- a/tests/Migrations/MigrationCreatorTest.php +++ b/tests/Migrations/MigrationCreatorTest.php @@ -27,7 +27,12 @@ public function testBasicCreateMethodStoresMigrationFile() ->andReturn('DummyClass'); $files->expects() - ->put(m::pattern('/database\/migrations\/\d{4}_\d{2}_\d{2}_\d{6}_create_bar.php/'), 'CreateBar'); + ->put( + m::pattern( + '/database\/migrations\/\d{4}_\d{2}_\d{2}_\d{6}_create_bar.php/' + ), + 'CreateBar' + ); // Actions $creator->create('create_bar', 'database/migrations'); @@ -48,10 +53,17 @@ function () use (&$hasRun) { // Expectations $files->expects() - ->get($creator->stubPath() . '/blank.stub')->andReturn('DummyClass'); + ->get($creator->stubPath() . '/blank.stub')->andReturn( + 'DummyClass' + ); $files->expects() - ->put(m::pattern('/database\/migrations\/\d{4}_\d{2}_\d{2}_\d{6}_add_bar_index.php/'), 'AddBarIndex'); + ->put( + m::pattern( + '/database\/migrations\/\d{4}_\d{2}_\d{2}_\d{6}_add_bar_index.php/' + ), + 'AddBarIndex' + ); // Actions $creator->create('add_bar_index', 'database/migrations'); @@ -68,10 +80,15 @@ public function testCollectionUpdateMigrationWontCreateDuplicateClass() // Expectations $this->expectException(InvalidArgumentException::class); - $this->expectExceptionMessage('A MigrationCreatorFakeMigration class already exists.'); + $this->expectExceptionMessage( + 'A MigrationCreatorFakeMigration class already exists.' + ); // Actions - $creator->create('migration_creator_fake_migration', 'database/migrations'); + $creator->create( + 'migration_creator_fake_migration', + 'database/migrations' + ); } public function testShouldGetFilesystem() diff --git a/tests/Migrations/MigratorTest.php b/tests/Migrations/MigratorTest.php index e53c262..d6203df 100644 --- a/tests/Migrations/MigratorTest.php +++ b/tests/Migrations/MigratorTest.php @@ -81,7 +81,9 @@ public function testShouldRunWithPendingMigrations() ->andReturn($migrationFiles); $files->expects() - ->requireOnce('database/migrations/2018_12_12_123456_drop_admin.php'); + ->requireOnce( + 'database/migrations/2018_12_12_123456_drop_admin.php' + ); $repository->expects() ->getNextBatchNumber() @@ -155,7 +157,9 @@ public function testShouldRollbackWithMigrations() ->andReturn($migrationFiles); $files->expects() - ->requireOnce('database/migrations/2018_12_12_123456_drop_admin.php'); + ->requireOnce( + 'database/migrations/2018_12_12_123456_drop_admin.php' + ); $repository->expects() ->delete($last[0]); @@ -217,16 +221,23 @@ public function testShouldResetWithMigrations() ->andReturn($migrationFiles); $files->expects() - ->requireOnce('database/migrations/2018_12_12_123456_migration_creator_fake_migration.php'); + ->requireOnce( + 'database/migrations/2018_12_12_123456_migration_creator_fake_migration.php' + ); $files->expects() - ->requireOnce('database/migrations/2018_12_12_123456_drop_admin.php'); + ->requireOnce( + 'database/migrations/2018_12_12_123456_drop_admin.php' + ); $repository->expects() ->delete( m::on( function ($parameter) use ($ran) { - $this->assertEquals((object) ['migration' => $ran[0]], $parameter); + $this->assertEquals( + (object) ['migration' => $ran[0]], + $parameter + ); return true; } diff --git a/tests/Migrations/MongolidMigrationRepositoryTest.php b/tests/Migrations/MongolidMigrationRepositoryTest.php index e05135e..aa4618c 100755 --- a/tests/Migrations/MongolidMigrationRepositoryTest.php +++ b/tests/Migrations/MongolidMigrationRepositoryTest.php @@ -24,7 +24,10 @@ public function testGetRanMigrationsListMigrationsByPackage() // Set $connection = m::mock(Connection::class); $connection->defaultDatabase = 'mongolid'; - $repository = new MongolidMigrationRepository($connection, 'migrations'); + $repository = new MongolidMigrationRepository( + $connection, + 'migrations' + ); $client = m::mock(Client::class); $collection = m::mock(Collection::class); @@ -60,7 +63,10 @@ public function testGetMigrationsList() // Set $connection = m::mock(Connection::class); $connection->defaultDatabase = 'mongolid'; - $repository = new MongolidMigrationRepository($connection, 'migrations'); + $repository = new MongolidMigrationRepository( + $connection, + 'migrations' + ); $client = m::mock(Client::class); $collection = m::mock(Collection::class); @@ -99,7 +105,10 @@ public function testGetLastMigrationsGetsAllMigrationsWithTheLatestBatchNumber() // Set $connection = m::mock(Connection::class); $connection->defaultDatabase = 'mongolid'; - $repository = new MongolidMigrationRepository($connection, 'migrations'); + $repository = new MongolidMigrationRepository( + $connection, + 'migrations' + ); $client = m::mock(Client::class); $collection = m::mock(Collection::class); @@ -136,7 +145,9 @@ public function testGetLastMigrationsGetsAllMigrationsWithTheLatestBatchNumber() 'limit' => 1, ] ) - ->andReturn(SplFixedArray::fromArray([(object) ['batch' => $batchNumber]])); + ->andReturn( + SplFixedArray::fromArray([(object) ['batch' => $batchNumber]]) + ); $collection->expects() ->find( @@ -157,7 +168,10 @@ public function testGetMigrationBatches() // Set $connection = m::mock(Connection::class); $connection->defaultDatabase = 'mongolid'; - $repository = new MongolidMigrationRepository($connection, 'migrations'); + $repository = new MongolidMigrationRepository( + $connection, + 'migrations' + ); $client = m::mock(Client::class); $collection = m::mock(Collection::class); @@ -204,7 +218,10 @@ public function testLogMethodInsertsRecordIntoMigrationCollection() // Set $connection = m::mock(Connection::class); $connection->defaultDatabase = 'mongolid'; - $repository = new MongolidMigrationRepository($connection, 'migrations'); + $repository = new MongolidMigrationRepository( + $connection, + 'migrations' + ); $client = m::mock(Client::class); $collection = m::mock(Collection::class); @@ -230,7 +247,10 @@ public function testDeleteMethodRemovesAMigrationFromTheCollection() // Set $connection = m::mock(Connection::class); $connection->defaultDatabase = 'mongolid'; - $repository = new MongolidMigrationRepository($connection, 'migrations'); + $repository = new MongolidMigrationRepository( + $connection, + 'migrations' + ); $migration = (object) ['migration' => 'create_foo_index']; $client = m::mock(Client::class); @@ -257,7 +277,10 @@ public function testGetNextBatchNumberReturnsLastBatchNumberPlusOne() // Set $connection = m::mock(Connection::class); $connection->defaultDatabase = 'mongolid'; - $repository = new MongolidMigrationRepository($connection, 'migrations'); + $repository = new MongolidMigrationRepository( + $connection, + 'migrations' + ); $client = m::mock(Client::class); $collection = m::mock(Collection::class); @@ -282,7 +305,9 @@ public function testGetNextBatchNumberReturnsLastBatchNumberPlusOne() 'limit' => 1, ] ) - ->andReturn(SplFixedArray::fromArray([(object) ['batch' => $batchNumber]])); + ->andReturn( + SplFixedArray::fromArray([(object) ['batch' => $batchNumber]]) + ); // Actions $result = $repository->getNextBatchNumber(); @@ -295,7 +320,10 @@ public function testGetLastBatchNumberReturnsMaxBatch() { $connection = m::mock(Connection::class); $connection->defaultDatabase = 'mongolid'; - $repository = new MongolidMigrationRepository($connection, 'migrations'); + $repository = new MongolidMigrationRepository( + $connection, + 'migrations' + ); $client = m::mock(Client::class); $collection = m::mock(Collection::class); @@ -320,7 +348,9 @@ public function testGetLastBatchNumberReturnsMaxBatch() 'limit' => 1, ] ) - ->andReturn(SplFixedArray::fromArray([(object) ['batch' => $batchNumber]])); + ->andReturn( + SplFixedArray::fromArray([(object) ['batch' => $batchNumber]]) + ); // Actions $repository->setSource('testing'); @@ -334,7 +364,10 @@ public function testCreateRepositoryCreatesProperDatabaseCollection() { // Set $connection = m::mock(Connection::class); - $repository = new MongolidMigrationRepository($connection, 'migrations'); + $repository = new MongolidMigrationRepository( + $connection, + 'migrations' + ); // Expectations $connection->expects() @@ -349,7 +382,10 @@ public function testRepositoryExists() { // Set $connection = m::mock(Connection::class); - $repository = new MongolidMigrationRepository($connection, 'migrations'); + $repository = new MongolidMigrationRepository( + $connection, + 'migrations' + ); // Expectations $connection->expects() diff --git a/tests/MongolidFailedJobProviderTest.php b/tests/MongolidFailedJobProviderTest.php index 3d2c3df..52bc347 100644 --- a/tests/MongolidFailedJobProviderTest.php +++ b/tests/MongolidFailedJobProviderTest.php @@ -79,7 +79,10 @@ public function testAllShouldReturnAllJobs() foreach ($data as $job) { $job['id'] = $job['_id']; - $job['failed_at'] = LocalDateTime::format($job['failed_at'], DateTimeInterface::ATOM); + $job['failed_at'] = LocalDateTime::format( + $job['failed_at'], + DateTimeInterface::ATOM + ); unset($job['_id']); $expected[] = (object) $job; diff --git a/tests/MongolidModelTest.php b/tests/MongolidModelTest.php index b3f5d8b..0f54473 100644 --- a/tests/MongolidModelTest.php +++ b/tests/MongolidModelTest.php @@ -522,7 +522,10 @@ public function testShouldIgnoreInvalidStaticCalls() public function testShouldGetCollection() { // Set - $connection = $this->instance(Connection::class, m::mock(Connection::class)); + $connection = $this->instance( + Connection::class, + m::mock(Connection::class) + ); $database = m::mock(Database::class); $connection->mongolid = $database; diff --git a/tests/MongolidServiceProviderTest.php b/tests/MongolidServiceProviderTest.php index ca520c3..aa24854 100644 --- a/tests/MongolidServiceProviderTest.php +++ b/tests/MongolidServiceProviderTest.php @@ -22,7 +22,10 @@ public function testShouldBoot() // Actions $this->assertInstanceOf(MongolidUserProvider::class, $result); - $this->assertInstanceOf(NullFailedJobProvider::class, $queueFailerResult); + $this->assertInstanceOf( + NullFailedJobProvider::class, + $queueFailerResult + ); } public function testShouldBootUsingQueueFailer() diff --git a/tests/UTCDateTimeComparator.php b/tests/UTCDateTimeComparator.php index 3005b72..2d80aa8 100644 --- a/tests/UTCDateTimeComparator.php +++ b/tests/UTCDateTimeComparator.php @@ -33,7 +33,11 @@ public function assertEquals($expected, $actual, $delta = 100, $canonicalize = f $expectedDateTime = $expected->toDateTime(); $actualDateTime = $actual->toDateTime(); - if (abs($expectedDateTime->getTimestamp() - $actualDateTime->getTimestamp()) > $delta) { + if ( + abs( + $expectedDateTime->getTimestamp() - $actualDateTime->getTimestamp() + ) > $delta + ) { throw new ComparisonFailure( $expected, $actual, diff --git a/tests/Validation/RulesTest.php b/tests/Validation/RulesTest.php index e1b6ddb..66d6088 100644 --- a/tests/Validation/RulesTest.php +++ b/tests/Validation/RulesTest.php @@ -226,7 +226,9 @@ public function testUniqueShouldValidateParameters() ->never(); $this->expectException(InvalidArgumentException::class); - $this->expectExceptionMessage('Validation rule mongolid_unique requires at least 1 parameters.'); + $this->expectExceptionMessage( + 'Validation rule mongolid_unique requires at least 1 parameters.' + ); // Actions $rules->unique('email', 'john@doe.com', $parameters); @@ -331,7 +333,11 @@ public function testShouldNotExistWhenThereIsNoResults() ->andReturn(0); // Actions - $result = $rules->exists('email', 'john@doe.com', ['users', 'email_field']); + $result = $rules->exists( + 'email', + 'john@doe.com', + ['users', 'email_field'] + ); // Assertions $this->assertFalse($result); @@ -351,7 +357,9 @@ public function testExistsShouldValidateParameters() ->never(); $this->expectException(InvalidArgumentException::class); - $this->expectExceptionMessage('Validation rule mongolid_exists requires at least 1 parameters.'); + $this->expectExceptionMessage( + 'Validation rule mongolid_exists requires at least 1 parameters.' + ); // Actions $rules->exists('email', 'john@doe.com', $parameters); @@ -379,7 +387,11 @@ public function testShouldTranslateAMessage() $expectedMessage = 'The email has already been taken.'; // Actions - $result = $rules->message('validation.mongolid_unique', 'email', 'mongolid_unique'); + $result = $rules->message( + 'validation.mongolid_unique', + 'email', + 'mongolid_unique' + ); // Assertions $this->assertSame($result, $expectedMessage); @@ -446,7 +458,11 @@ public function testShouldTranslateAMessageForObjectId() $expectedMessage = 'The productBank must be an MongoDB ObjectId.'; // Actions - $result = $rules->objectIdMessage('validation.object_id', 'productBank', 'object_id'); + $result = $rules->objectIdMessage( + 'validation.object_id', + 'productBank', + 'object_id' + ); // Assertions $this->assertSame($result, $expectedMessage);