From 500cebba71f8f4f297ebd0fd6a534f8b20acbb94 Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Mon, 16 Aug 2021 20:20:01 -0300 Subject: [PATCH 01/61] melhorando autocomplete no laravel --- .devcontainer/devcontainer.json | 2 +- .devcontainer/docker-compose.yml | 2 +- .gitignore | 2 + composer.json | 6 +- composer.lock | 5157 ++++++++++++++++++++++-------- 5 files changed, 3888 insertions(+), 1281 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 5136d281d..652b2eb91 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -17,7 +17,7 @@ // The optional 'workspaceFolder' property is the path VS Code should open by default when // connected. This is typically a file mount in .devcontainer/docker-compose.yml - "workspaceFolder": "/laravel-quickstart", + "workspaceFolder": "/laravel", // Set *default* container specific settings.json values on container create. "settings": { diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index c0c92dc8c..42f7b1640 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -27,7 +27,7 @@ services: volumes: # Update this to wherever you want VS Code to mount the folder of your project - - .:/laravel-quickstart:cached + - .:/laravel:cached # Uncomment the next line to use Docker from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker-compose for details. # - /var/run/docker.sock:/var/run/docker.sock diff --git a/.gitignore b/.gitignore index fcdc9aff9..c7f898319 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,5 @@ yarn-error.log .vscode/ .history/ .devcontainer/ +_ide_helper_models.php +_ide_helper.php diff --git a/composer.json b/composer.json index fe8fd731e..c866ff70b 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,9 @@ "laravel/ui": "^1.0" }, "require-dev": { + "barryvdh/laravel-ide-helper": "^2.1", "beyondcode/laravel-dump-server": "^1.3", + "doctrine/dbal": "~2.3", "facade/ignition": "^1.4", "fzaninotto/faker": "^1.4", "mockery/mockery": "^1.0", @@ -51,7 +53,9 @@ "scripts": { "post-autoload-dump": [ "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", - "@php artisan package:discover --ansi" + "@php artisan package:discover --ansi", + "php artisan ide-helper:generate", + "php artisan ide-helper:models" ], "post-root-package-install": [ "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" diff --git a/composer.lock b/composer.lock index f929fcecb..3c5678e18 100644 --- a/composer.lock +++ b/composer.lock @@ -4,29 +4,29 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0063e613e05165252be57ce3f06ad572", + "content-hash": "6b9f0c482c7caebe3b10c10d175913aa", "packages": [ { "name": "dnoegel/php-xdg-base-dir", - "version": "0.1", + "version": "v0.1.1", "source": { "type": "git", "url": "https://github.com/dnoegel/php-xdg-base-dir.git", - "reference": "265b8593498b997dc2d31e75b89f053b5cc9621a" + "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/265b8593498b997dc2d31e75b89f053b5cc9621a", - "reference": "265b8593498b997dc2d31e75b89f053b5cc9621a", + "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", + "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", "shasum": "" }, "require": { "php": ">=5.3.2" }, "require-dev": { - "phpunit/phpunit": "@stable" + "phpunit/phpunit": "~7.0|~6.0|~5.0|~4.8.35" }, - "type": "project", + "type": "library", "autoload": { "psr-4": { "XdgBaseDir\\": "src/" @@ -37,37 +37,45 @@ "MIT" ], "description": "implementation of xdg base directory specification for php", - "time": "2014-10-24T07:27:01+00:00" + "support": { + "issues": "https://github.com/dnoegel/php-xdg-base-dir/issues", + "source": "https://github.com/dnoegel/php-xdg-base-dir/tree/v0.1.1" + }, + "time": "2019-12-04T15:06:13+00:00" }, { "name": "doctrine/inflector", - "version": "v1.3.0", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "5527a48b7313d15261292c149e55e26eae771b0a" + "reference": "9cf661f4eb38f7c881cac67c75ea9b00bf97b210" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/5527a48b7313d15261292c149e55e26eae771b0a", - "reference": "5527a48b7313d15261292c149e55e26eae771b0a", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/9cf661f4eb38f7c881cac67c75ea9b00bf97b210", + "reference": "9cf661f4eb38f7c881cac67c75ea9b00bf97b210", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.2 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^6.2" + "doctrine/coding-standard": "^7.0", + "phpstan/phpstan": "^0.11", + "phpstan/phpstan-phpunit": "^0.11", + "phpstan/phpstan-strict-rules": "^0.11", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { "psr-4": { - "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector" + "Doctrine\\Inflector\\": "lib/Doctrine/Inflector" } }, "notification-url": "https://packagist.org/downloads/", @@ -75,6 +83,10 @@ "MIT" ], "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, { "name": "Roman Borschel", "email": "roman@code-factory.org" @@ -83,10 +95,6 @@ "name": "Benjamin Eberlei", "email": "kontakt@beberlei.de" }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, { "name": "Jonathan Wage", "email": "jonwage@gmail.com" @@ -96,32 +104,56 @@ "email": "schmittjoh@gmail.com" } ], - "description": "Common String Manipulations with regard to casing and singular/plural rules.", - "homepage": "http://www.doctrine-project.org", + "description": "PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.", + "homepage": "https://www.doctrine-project.org/projects/inflector.html", "keywords": [ "inflection", - "pluralize", - "singularize", - "string" + "inflector", + "lowercase", + "manipulation", + "php", + "plural", + "singular", + "strings", + "uppercase", + "words" ], - "time": "2018-01-09T20:05:19+00:00" + "support": { + "issues": "https://github.com/doctrine/inflector/issues", + "source": "https://github.com/doctrine/inflector/tree/2.0.x" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finflector", + "type": "tidelift" + } + ], + "time": "2020-05-29T15:13:26+00:00" }, { "name": "doctrine/lexer", - "version": "1.1.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "e17f069ede36f7534b95adec71910ed1b49c74ea" + "reference": "e864bbf5904cb8f5bb334f99209b48018522f042" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/e17f069ede36f7534b95adec71910ed1b49c74ea", - "reference": "e17f069ede36f7534b95adec71910ed1b49c74ea", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/e864bbf5904cb8f5bb334f99209b48018522f042", + "reference": "e864bbf5904cb8f5bb334f99209b48018522f042", "shasum": "" }, "require": { - "php": "^7.2" + "php": "^7.2 || ^8.0" }, "require-dev": { "doctrine/coding-standard": "^6.0", @@ -131,7 +163,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "1.2.x-dev" } }, "autoload": { @@ -166,27 +198,45 @@ "parser", "php" ], - "time": "2019-07-30T19:33:28+00:00" + "support": { + "issues": "https://github.com/doctrine/lexer/issues", + "source": "https://github.com/doctrine/lexer/tree/1.2.1" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "type": "tidelift" + } + ], + "time": "2020-05-25T17:44:05+00:00" }, { "name": "dragonmantank/cron-expression", - "version": "v2.3.0", + "version": "v2.3.1", "source": { "type": "git", "url": "https://github.com/dragonmantank/cron-expression.git", - "reference": "72b6fbf76adb3cf5bc0db68559b33d41219aba27" + "reference": "65b2d8ee1f10915efb3b55597da3404f096acba2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/72b6fbf76adb3cf5bc0db68559b33d41219aba27", - "reference": "72b6fbf76adb3cf5bc0db68559b33d41219aba27", + "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/65b2d8ee1f10915efb3b55597da3404f096acba2", + "reference": "65b2d8ee1f10915efb3b55597da3404f096acba2", "shasum": "" }, "require": { - "php": "^7.0" + "php": "^7.0|^8.0" }, "require-dev": { - "phpunit/phpunit": "^6.4|^7.0" + "phpunit/phpunit": "^6.4|^7.0|^8.0|^9.0" }, "type": "library", "extra": { @@ -220,31 +270,41 @@ "cron", "schedule" ], - "time": "2019-03-31T00:38:28+00:00" + "support": { + "issues": "https://github.com/dragonmantank/cron-expression/issues", + "source": "https://github.com/dragonmantank/cron-expression/tree/v2.3.1" + }, + "funding": [ + { + "url": "https://github.com/dragonmantank", + "type": "github" + } + ], + "time": "2020-10-13T00:52:37+00:00" }, { "name": "egulias/email-validator", - "version": "2.1.11", + "version": "2.1.25", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "92dd169c32f6f55ba570c309d83f5209cefb5e23" + "reference": "0dbf5d78455d4d6a41d186da50adc1122ec066f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/92dd169c32f6f55ba570c309d83f5209cefb5e23", - "reference": "92dd169c32f6f55ba570c309d83f5209cefb5e23", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/0dbf5d78455d4d6a41d186da50adc1122ec066f4", + "reference": "0dbf5d78455d4d6a41d186da50adc1122ec066f4", "shasum": "" }, "require": { "doctrine/lexer": "^1.0.1", - "php": ">= 5.5" + "php": ">=5.5", + "symfony/polyfill-intl-idn": "^1.10" }, "require-dev": { - "dominicsayers/isemail": "dev-master", - "phpunit/phpunit": "^4.8.35||^5.7||^6.0", - "satooshi/php-coveralls": "^1.0.1", - "symfony/phpunit-bridge": "^4.4@dev" + "dominicsayers/isemail": "^3.0.7", + "phpunit/phpunit": "^4.8.36|^7.5.15", + "satooshi/php-coveralls": "^1.0.1" }, "suggest": { "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" @@ -257,7 +317,7 @@ }, "autoload": { "psr-4": { - "Egulias\\EmailValidator\\": "EmailValidator" + "Egulias\\EmailValidator\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -278,28 +338,38 @@ "validation", "validator" ], - "time": "2019-08-13T17:33:27+00:00" + "support": { + "issues": "https://github.com/egulias/EmailValidator/issues", + "source": "https://github.com/egulias/EmailValidator/tree/2.1.25" + }, + "funding": [ + { + "url": "https://github.com/egulias", + "type": "github" + } + ], + "time": "2020-12-29T14:50:06+00:00" }, { "name": "fideloper/proxy", - "version": "4.2.1", + "version": "4.4.1", "source": { "type": "git", "url": "https://github.com/fideloper/TrustedProxy.git", - "reference": "03085e58ec7bee24773fa5a8850751a6e61a7e8a" + "reference": "c073b2bd04d1c90e04dc1b787662b558dd65ade0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fideloper/TrustedProxy/zipball/03085e58ec7bee24773fa5a8850751a6e61a7e8a", - "reference": "03085e58ec7bee24773fa5a8850751a6e61a7e8a", + "url": "https://api.github.com/repos/fideloper/TrustedProxy/zipball/c073b2bd04d1c90e04dc1b787662b558dd65ade0", + "reference": "c073b2bd04d1c90e04dc1b787662b558dd65ade0", "shasum": "" }, "require": { - "illuminate/contracts": "^5.0|^6.0|^7.0", + "illuminate/contracts": "^5.0|^6.0|^7.0|^8.0|^9.0", "php": ">=5.4.0" }, "require-dev": { - "illuminate/http": "^5.0|^6.0|^7.0", + "illuminate/http": "^5.0|^6.0|^7.0|^8.0|^9.0", "mockery/mockery": "^1.0", "phpunit/phpunit": "^6.0" }, @@ -332,123 +402,39 @@ "proxy", "trusted proxy" ], - "time": "2019-09-03T16:45:42+00:00" - }, - { - "name": "jakub-onderka/php-console-color", - "version": "v0.2", - "source": { - "type": "git", - "url": "https://github.com/JakubOnderka/PHP-Console-Color.git", - "reference": "d5deaecff52a0d61ccb613bb3804088da0307191" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Color/zipball/d5deaecff52a0d61ccb613bb3804088da0307191", - "reference": "d5deaecff52a0d61ccb613bb3804088da0307191", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "jakub-onderka/php-code-style": "1.0", - "jakub-onderka/php-parallel-lint": "1.0", - "jakub-onderka/php-var-dump-check": "0.*", - "phpunit/phpunit": "~4.3", - "squizlabs/php_codesniffer": "1.*" - }, - "type": "library", - "autoload": { - "psr-4": { - "JakubOnderka\\PhpConsoleColor\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-2-Clause" - ], - "authors": [ - { - "name": "Jakub Onderka", - "email": "jakub.onderka@gmail.com" - } - ], - "time": "2018-09-29T17:23:10+00:00" - }, - { - "name": "jakub-onderka/php-console-highlighter", - "version": "v0.4", - "source": { - "type": "git", - "url": "https://github.com/JakubOnderka/PHP-Console-Highlighter.git", - "reference": "9f7a229a69d52506914b4bc61bfdb199d90c5547" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Highlighter/zipball/9f7a229a69d52506914b4bc61bfdb199d90c5547", - "reference": "9f7a229a69d52506914b4bc61bfdb199d90c5547", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "jakub-onderka/php-console-color": "~0.2", - "php": ">=5.4.0" - }, - "require-dev": { - "jakub-onderka/php-code-style": "~1.0", - "jakub-onderka/php-parallel-lint": "~1.0", - "jakub-onderka/php-var-dump-check": "~0.1", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~1.5" - }, - "type": "library", - "autoload": { - "psr-4": { - "JakubOnderka\\PhpConsoleHighlighter\\": "src/" - } + "support": { + "issues": "https://github.com/fideloper/TrustedProxy/issues", + "source": "https://github.com/fideloper/TrustedProxy/tree/4.4.1" }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jakub Onderka", - "email": "acci@acci.cz", - "homepage": "http://www.acci.cz/" - } - ], - "description": "Highlight PHP code in terminal", - "time": "2018-09-29T18:48:56+00:00" + "time": "2020-10-22T13:48:01+00:00" }, { "name": "laravel/framework", - "version": "v6.18.13", + "version": "v6.20.32", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "39519d03237a81380e2126d667e898e2922db444" + "reference": "04d4fa31d10ed344c9d1cf30a761b0c4e468aaf2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/39519d03237a81380e2126d667e898e2922db444", - "reference": "39519d03237a81380e2126d667e898e2922db444", + "url": "https://api.github.com/repos/laravel/framework/zipball/04d4fa31d10ed344c9d1cf30a761b0c4e468aaf2", + "reference": "04d4fa31d10ed344c9d1cf30a761b0c4e468aaf2", "shasum": "" }, "require": { - "doctrine/inflector": "^1.1", - "dragonmantank/cron-expression": "^2.0", + "doctrine/inflector": "^1.4|^2.0", + "dragonmantank/cron-expression": "^2.3.1", "egulias/email-validator": "^2.1.10", "ext-json": "*", "ext-mbstring": "*", "ext-openssl": "*", "league/commonmark": "^1.3", - "league/flysystem": "^1.0.8", + "league/flysystem": "^1.1", "monolog/monolog": "^1.12|^2.0", - "nesbot/carbon": "^2.0", - "opis/closure": "^3.1", - "php": "^7.2", + "nesbot/carbon": "^2.31", + "opis/closure": "^3.6", + "php": "^7.2.5|^8.0", "psr/container": "^1.0", "psr/simple-cache": "^1.0", "ramsey/uuid": "^3.7", @@ -458,6 +444,7 @@ "symfony/finder": "^4.3.4", "symfony/http-foundation": "^4.3.4", "symfony/http-kernel": "^4.3.4", + "symfony/polyfill-php73": "^1.17", "symfony/process": "^4.3.4", "symfony/routing": "^4.3.4", "symfony/var-dumper": "^4.3.4", @@ -498,30 +485,31 @@ "illuminate/view": "self.version" }, "require-dev": { - "aws/aws-sdk-php": "^3.0", + "aws/aws-sdk-php": "^3.155", "doctrine/dbal": "^2.6", - "filp/whoops": "^2.4", - "guzzlehttp/guzzle": "^6.3|^7.0", + "filp/whoops": "^2.8", + "guzzlehttp/guzzle": "^6.3.1|^7.0.1", "league/flysystem-cached-adapter": "^1.0", - "mockery/mockery": "^1.3.1", + "mockery/mockery": "~1.3.3|^1.4.2", "moontoast/math": "^1.1", - "orchestra/testbench-core": "^4.0", + "orchestra/testbench-core": "^4.8", "pda/pheanstalk": "^4.0", - "phpunit/phpunit": "^7.5.15|^8.4|^9.0", + "phpunit/phpunit": "^7.5.15|^8.4|^9.3.3", "predis/predis": "^1.1.1", "symfony/cache": "^4.3.4" }, "suggest": { - "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.0).", + "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.155).", "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.6).", + "ext-ftp": "Required to use the Flysystem FTP driver.", "ext-gd": "Required to use Illuminate\\Http\\Testing\\FileFactory::image().", "ext-memcached": "Required to use the memcache cache driver.", "ext-pcntl": "Required to use all features of the queue worker.", "ext-posix": "Required to use all features of the queue worker.", "ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0).", - "filp/whoops": "Required for friendly error pages in development (^2.4).", - "fzaninotto/faker": "Required to use the eloquent factory builder (^1.9.1).", - "guzzlehttp/guzzle": "Required to use the Mailgun mail driver and the ping methods on schedules (^6.0|^7.0).", + "fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).", + "filp/whoops": "Required for friendly error pages in development (^2.8).", + "guzzlehttp/guzzle": "Required to use the Mailgun mail driver and the ping methods on schedules (^6.3.1|^7.0.1).", "laravel/tinker": "Required to use the tinker console command (^2.0).", "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^1.0).", "league/flysystem-cached-adapter": "Required to use the Flysystem cache (^1.0).", @@ -529,6 +517,7 @@ "moontoast/math": "Required to use ordered UUIDs (^1.1).", "nyholm/psr7": "Required to use PSR-7 bridging features (^1.2).", "pda/pheanstalk": "Required to use the beanstalk queue driver (^4.0).", + "predis/predis": "Required to use the predis connector (^1.1.2).", "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^4.0).", "symfony/cache": "Required to PSR-6 cache bridge (^4.3.4).", @@ -570,7 +559,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2020-05-05T15:53:49+00:00" + "time": "2021-08-10T14:25:21+00:00" }, { "name": "laravel/tinker", @@ -633,37 +622,34 @@ "laravel", "psysh" ], + "support": { + "issues": "https://github.com/laravel/tinker/issues", + "source": "https://github.com/laravel/tinker/tree/v1.0.10" + }, "time": "2019-08-07T15:10:45+00:00" }, { "name": "laravel/ui", - "version": "v1.0.1", + "version": "v1.3.0", "source": { "type": "git", "url": "https://github.com/laravel/ui.git", - "reference": "15ac62a34c1b07a88da3eff2506ac6ae782c9803" + "reference": "21dc7e58896db977aad246e710b4810aaab9a968" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/ui/zipball/15ac62a34c1b07a88da3eff2506ac6ae782c9803", - "reference": "15ac62a34c1b07a88da3eff2506ac6ae782c9803", + "url": "https://api.github.com/repos/laravel/ui/zipball/21dc7e58896db977aad246e710b4810aaab9a968", + "reference": "21dc7e58896db977aad246e710b4810aaab9a968", "shasum": "" }, "require": { "illuminate/console": "~5.8|^6.0", "illuminate/filesystem": "~5.8|^6.0", "illuminate/support": "~5.8|^6.0", - "php": "^7.1.3" - }, - "require-dev": { - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^8.0" + "php": "^7.1.3|^8.0" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - }, "laravel": { "providers": [ "Laravel\\Ui\\UiServiceProvider" @@ -690,20 +676,24 @@ "laravel", "ui" ], - "time": "2019-09-02T16:34:23+00:00" + "support": { + "issues": "https://github.com/laravel/ui/issues", + "source": "https://github.com/laravel/ui/tree/v1.3.0" + }, + "time": "2020-11-03T19:38:34+00:00" }, { "name": "league/commonmark", - "version": "1.5.6", + "version": "1.6.6", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "a56e91e0fa1f6d0049153a9c34f63488f6b7ce61" + "reference": "c4228d11e30d7493c6836d20872f9582d8ba6dcf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/a56e91e0fa1f6d0049153a9c34f63488f6b7ce61", - "reference": "a56e91e0fa1f6d0049153a9c34f63488f6b7ce61", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/c4228d11e30d7493c6836d20872f9582d8ba6dcf", + "reference": "c4228d11e30d7493c6836d20872f9582d8ba6dcf", "shasum": "" }, "require": { @@ -721,7 +711,7 @@ "github/gfm": "0.29.0", "michelf/php-markdown": "~1.4", "mikehaertl/php-shellcommand": "^1.4", - "phpstan/phpstan": "^0.12", + "phpstan/phpstan": "^0.12.90", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.2", "scrutinizer/ocular": "^1.5", "symfony/finder": "^4.2" @@ -791,35 +781,35 @@ "type": "tidelift" } ], - "time": "2020-10-17T21:33:03+00:00" + "time": "2021-07-17T17:13:23+00:00" }, { "name": "league/flysystem", - "version": "1.0.55", + "version": "1.1.4", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "33c91155537c6dc899eacdc54a13ac6303f156e6" + "reference": "f3ad69181b8afed2c9edf7be5a2918144ff4ea32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/33c91155537c6dc899eacdc54a13ac6303f156e6", - "reference": "33c91155537c6dc899eacdc54a13ac6303f156e6", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/f3ad69181b8afed2c9edf7be5a2918144ff4ea32", + "reference": "f3ad69181b8afed2c9edf7be5a2918144ff4ea32", "shasum": "" }, "require": { "ext-fileinfo": "*", - "php": ">=5.5.9" + "league/mime-type-detection": "^1.3", + "php": "^7.2.5 || ^8.0" }, "conflict": { "league/flysystem-sftp": "<1.0.6" }, "require-dev": { - "phpspec/phpspec": "^3.4", - "phpunit/phpunit": "^5.7.10" + "phpspec/prophecy": "^1.11.1", + "phpunit/phpunit": "^8.5.8" }, "suggest": { - "ext-fileinfo": "Required for MimeType", "ext-ftp": "Allows you to use FTP server storage", "ext-openssl": "Allows you to use FTPS server storage", "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", @@ -875,24 +865,90 @@ "sftp", "storage" ], - "time": "2019-08-24T11:17:19+00:00" + "support": { + "issues": "https://github.com/thephpleague/flysystem/issues", + "source": "https://github.com/thephpleague/flysystem/tree/1.1.4" + }, + "funding": [ + { + "url": "https://offset.earth/frankdejonge", + "type": "other" + } + ], + "time": "2021-06-23T21:56:05+00:00" + }, + { + "name": "league/mime-type-detection", + "version": "1.7.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/mime-type-detection.git", + "reference": "3b9dff8aaf7323590c1d2e443db701eb1f9aa0d3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/3b9dff8aaf7323590c1d2e443db701eb1f9aa0d3", + "reference": "3b9dff8aaf7323590c1d2e443db701eb1f9aa0d3", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.18", + "phpstan/phpstan": "^0.12.68", + "phpunit/phpunit": "^8.5.8 || ^9.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\MimeTypeDetection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frankdejonge.nl" + } + ], + "description": "Mime-type detection for Flysystem", + "support": { + "issues": "https://github.com/thephpleague/mime-type-detection/issues", + "source": "https://github.com/thephpleague/mime-type-detection/tree/1.7.0" + }, + "funding": [ + { + "url": "https://github.com/frankdejonge", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/league/flysystem", + "type": "tidelift" + } + ], + "time": "2021-01-18T20:58:21+00:00" }, { "name": "monolog/monolog", - "version": "2.0.0", + "version": "2.3.2", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "68545165e19249013afd1d6f7485aecff07a2d22" + "reference": "71312564759a7db5b789296369c1a264efc43aad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/68545165e19249013afd1d6f7485aecff07a2d22", - "reference": "68545165e19249013afd1d6f7485aecff07a2d22", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/71312564759a7db5b789296369c1a264efc43aad", + "reference": "71312564759a7db5b789296369c1a264efc43aad", "shasum": "" }, "require": { - "php": "^7.2", + "php": ">=7.2", "psr/log": "^1.0.1" }, "provide": { @@ -901,16 +957,17 @@ "require-dev": { "aws/aws-sdk-php": "^2.4.9 || ^3.0", "doctrine/couchdb": "~1.0@dev", - "elasticsearch/elasticsearch": "^6.0", + "elasticsearch/elasticsearch": "^7", "graylog2/gelf-php": "^1.4.2", - "jakub-onderka/php-parallel-lint": "^0.9", + "mongodb/mongodb": "^1.8", "php-amqplib/php-amqplib": "~2.4", "php-console/php-console": "^3.1.3", "phpspec/prophecy": "^1.6.1", - "phpunit/phpunit": "^8.3", + "phpstan/phpstan": "^0.12.91", + "phpunit/phpunit": "^8.5", "predis/predis": "^1.1", "rollbar/rollbar": "^1.3", - "ruflin/elastica": ">=0.90 <3.0", + "ruflin/elastica": ">=0.90 <7.0.1", "swiftmailer/swiftmailer": "^5.3|^6.0" }, "suggest": { @@ -930,7 +987,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev" + "dev-main": "2.x-dev" } }, "autoload": { @@ -946,43 +1003,61 @@ { "name": "Jordi Boggiano", "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" + "homepage": "https://seld.be" } ], "description": "Sends your logs to files, sockets, inboxes, databases and various web services", - "homepage": "http://github.com/Seldaek/monolog", + "homepage": "https://github.com/Seldaek/monolog", "keywords": [ "log", "logging", "psr-3" ], - "time": "2019-08-30T09:56:44+00:00" + "support": { + "issues": "https://github.com/Seldaek/monolog/issues", + "source": "https://github.com/Seldaek/monolog/tree/2.3.2" + }, + "funding": [ + { + "url": "https://github.com/Seldaek", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", + "type": "tidelift" + } + ], + "time": "2021-07-23T07:42:52+00:00" }, { "name": "nesbot/carbon", - "version": "2.24.0", + "version": "2.51.1", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "934459c5ac0658bc765ad1e53512c7c77adcac29" + "reference": "8619c299d1e0d4b344e1f98ca07a1ce2cfbf1922" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/934459c5ac0658bc765ad1e53512c7c77adcac29", - "reference": "934459c5ac0658bc765ad1e53512c7c77adcac29", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/8619c299d1e0d4b344e1f98ca07a1ce2cfbf1922", + "reference": "8619c299d1e0d4b344e1f98ca07a1ce2cfbf1922", "shasum": "" }, "require": { "ext-json": "*", "php": "^7.1.8 || ^8.0", - "symfony/translation": "^3.4 || ^4.0" + "symfony/polyfill-mbstring": "^1.0", + "symfony/polyfill-php80": "^1.16", + "symfony/translation": "^3.4 || ^4.0 || ^5.0" }, "require-dev": { + "doctrine/orm": "^2.7", "friendsofphp/php-cs-fixer": "^2.14 || ^3.0", - "kylekatarnls/multi-tester": "^1.1", - "phpmd/phpmd": "dev-php-7.1-compatibility", - "phpstan/phpstan": "^0.11", - "phpunit/phpunit": "^7.5 || ^8.0", + "kylekatarnls/multi-tester": "^2.0", + "phpmd/phpmd": "^2.9", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^0.12.54", + "phpunit/phpunit": "^7.5.20 || ^8.5.14", "squizlabs/php_codesniffer": "^3.4" }, "bin": [ @@ -990,10 +1065,19 @@ ], "type": "library", "extra": { + "branch-alias": { + "dev-3.x": "3.x-dev", + "dev-master": "2.x-dev" + }, "laravel": { "providers": [ "Carbon\\Laravel\\ServiceProvider" ] + }, + "phpstan": { + "includes": [ + "extension.neon" + ] } }, "autoload": { @@ -1009,34 +1093,48 @@ { "name": "Brian Nesbitt", "email": "brian@nesbot.com", - "homepage": "http://nesbot.com" + "homepage": "https://markido.com" }, { "name": "kylekatarnls", - "homepage": "http://github.com/kylekatarnls" + "homepage": "https://github.com/kylekatarnls" } ], - "description": "A API extension for DateTime that supports 281 different languages.", - "homepage": "http://carbon.nesbot.com", + "description": "An API extension for DateTime that supports 281 different languages.", + "homepage": "https://carbon.nesbot.com", "keywords": [ "date", "datetime", "time" ], - "time": "2019-08-31T16:37:55+00:00" + "support": { + "issues": "https://github.com/briannesbitt/Carbon/issues", + "source": "https://github.com/briannesbitt/Carbon" + }, + "funding": [ + { + "url": "https://opencollective.com/Carbon", + "type": "open_collective" + }, + { + "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", + "type": "tidelift" + } + ], + "time": "2021-07-28T13:16:28+00:00" }, { "name": "nikic/php-parser", - "version": "v4.2.4", + "version": "v4.12.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "97e59c7a16464196a8b9c77c47df68e4a39a45c4" + "reference": "6608f01670c3cc5079e18c1dab1104e002579143" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/97e59c7a16464196a8b9c77c47df68e4a39a45c4", - "reference": "97e59c7a16464196a8b9c77c47df68e4a39a45c4", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/6608f01670c3cc5079e18c1dab1104e002579143", + "reference": "6608f01670c3cc5079e18c1dab1104e002579143", "shasum": "" }, "require": { @@ -1044,7 +1142,8 @@ "php": ">=7.0" }, "require-dev": { - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0" + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" }, "bin": [ "bin/php-parse" @@ -1052,7 +1151,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "4.9-dev" } }, "autoload": { @@ -1074,33 +1173,37 @@ "parser", "php" ], - "time": "2019-09-01T07:51:21+00:00" + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.12.0" + }, + "time": "2021-07-21T10:44:31+00:00" }, { "name": "opis/closure", - "version": "3.4.0", + "version": "3.6.2", "source": { "type": "git", "url": "https://github.com/opis/closure.git", - "reference": "60a97fff133b1669a5b1776aa8ab06db3f3962b7" + "reference": "06e2ebd25f2869e54a306dda991f7db58066f7f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opis/closure/zipball/60a97fff133b1669a5b1776aa8ab06db3f3962b7", - "reference": "60a97fff133b1669a5b1776aa8ab06db3f3962b7", + "url": "https://api.github.com/repos/opis/closure/zipball/06e2ebd25f2869e54a306dda991f7db58066f7f6", + "reference": "06e2ebd25f2869e54a306dda991f7db58066f7f6", "shasum": "" }, "require": { - "php": "^5.4 || ^7.0" + "php": "^5.4 || ^7.0 || ^8.0" }, "require-dev": { "jeremeamia/superclosure": "^2.0", - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3.x-dev" + "dev-master": "3.6.x-dev" } }, "autoload": { @@ -1135,24 +1238,28 @@ "serialization", "serialize" ], - "time": "2019-09-02T21:07:33+00:00" + "support": { + "issues": "https://github.com/opis/closure/issues", + "source": "https://github.com/opis/closure/tree/3.6.2" + }, + "time": "2021-04-09T13:42:10+00:00" }, { "name": "paragonie/random_compat", - "version": "v9.99.99", + "version": "v9.99.100", "source": { "type": "git", "url": "https://github.com/paragonie/random_compat.git", - "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95" + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", - "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a", + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a", "shasum": "" }, "require": { - "php": "^7" + "php": ">= 7" }, "require-dev": { "phpunit/phpunit": "4.*|5.*", @@ -1180,81 +1287,202 @@ "pseudorandom", "random" ], - "time": "2018-07-02T15:55:56+00:00" + "support": { + "email": "info@paragonie.com", + "issues": "https://github.com/paragonie/random_compat/issues", + "source": "https://github.com/paragonie/random_compat" + }, + "time": "2020-10-15T08:29:30+00:00" }, { - "name": "phpoption/phpoption", - "version": "1.5.0", + "name": "php-parallel-lint/php-console-color", + "version": "v0.3", "source": { "type": "git", - "url": "https://github.com/schmittjoh/php-option.git", - "reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed" + "url": "https://github.com/php-parallel-lint/PHP-Console-Color.git", + "reference": "b6af326b2088f1ad3b264696c9fd590ec395b49e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/94e644f7d2051a5f0fcf77d81605f152eecff0ed", - "reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed", + "url": "https://api.github.com/repos/php-parallel-lint/PHP-Console-Color/zipball/b6af326b2088f1ad3b264696c9fd590ec395b49e", + "reference": "b6af326b2088f1ad3b264696c9fd590ec395b49e", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=5.4.0" + }, + "replace": { + "jakub-onderka/php-console-color": "*" }, "require-dev": { - "phpunit/phpunit": "4.7.*" + "php-parallel-lint/php-code-style": "1.0", + "php-parallel-lint/php-parallel-lint": "1.0", + "php-parallel-lint/php-var-dump-check": "0.*", + "phpunit/phpunit": "~4.3", + "squizlabs/php_codesniffer": "1.*" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, "autoload": { - "psr-0": { - "PhpOption\\": "src/" + "psr-4": { + "JakubOnderka\\PhpConsoleColor\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "Apache2" + "BSD-2-Clause" ], "authors": [ { - "name": "Johannes M. Schmitt", - "email": "schmittjoh@gmail.com" + "name": "Jakub Onderka", + "email": "jakub.onderka@gmail.com" } ], - "description": "Option Type for PHP", - "keywords": [ - "language", - "option", - "php", - "type" - ], - "time": "2015-07-25T16:39:46+00:00" + "support": { + "issues": "https://github.com/php-parallel-lint/PHP-Console-Color/issues", + "source": "https://github.com/php-parallel-lint/PHP-Console-Color/tree/master" + }, + "time": "2020-05-14T05:47:14+00:00" }, { - "name": "psr/container", - "version": "1.0.0", + "name": "php-parallel-lint/php-console-highlighter", + "version": "v0.5", "source": { "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + "url": "https://github.com/php-parallel-lint/PHP-Console-Highlighter.git", + "reference": "21bf002f077b177f056d8cb455c5ed573adfdbb8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "url": "https://api.github.com/repos/php-parallel-lint/PHP-Console-Highlighter/zipball/21bf002f077b177f056d8cb455c5ed573adfdbb8", + "reference": "21bf002f077b177f056d8cb455c5ed573adfdbb8", "shasum": "" }, "require": { - "php": ">=5.3.0" + "ext-tokenizer": "*", + "php": ">=5.4.0", + "php-parallel-lint/php-console-color": "~0.2" }, - "type": "library", - "extra": { + "replace": { + "jakub-onderka/php-console-highlighter": "*" + }, + "require-dev": { + "php-parallel-lint/php-code-style": "~1.0", + "php-parallel-lint/php-parallel-lint": "~1.0", + "php-parallel-lint/php-var-dump-check": "~0.1", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~1.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "JakubOnderka\\PhpConsoleHighlighter\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jakub Onderka", + "email": "acci@acci.cz", + "homepage": "http://www.acci.cz/" + } + ], + "description": "Highlight PHP code in terminal", + "support": { + "issues": "https://github.com/php-parallel-lint/PHP-Console-Highlighter/issues", + "source": "https://github.com/php-parallel-lint/PHP-Console-Highlighter/tree/master" + }, + "time": "2020-05-13T07:37:49+00:00" + }, + { + "name": "phpoption/phpoption", + "version": "1.7.5", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/php-option.git", + "reference": "994ecccd8f3283ecf5ac33254543eb0ac946d525" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/994ecccd8f3283ecf5ac33254543eb0ac946d525", + "reference": "994ecccd8f3283ecf5ac33254543eb0ac946d525", + "shasum": "" + }, + "require": { + "php": "^5.5.9 || ^7.0 || ^8.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.4.1", + "phpunit/phpunit": "^4.8.35 || ^5.7.27 || ^6.5.6 || ^7.0 || ^8.0 || ^9.0" + }, + "type": "library", + "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.7-dev" + } + }, + "autoload": { + "psr-4": { + "PhpOption\\": "src/PhpOption/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Graham Campbell", + "email": "graham@alt-three.com" + } + ], + "description": "Option Type for PHP", + "keywords": [ + "language", + "option", + "php", + "type" + ], + "support": { + "issues": "https://github.com/schmittjoh/php-option/issues", + "source": "https://github.com/schmittjoh/php-option/tree/1.7.5" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption", + "type": "tidelift" } + ], + "time": "2020-07-20T17:29:33+00:00" + }, + { + "name": "psr/container", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" }, + "type": "library", "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -1267,7 +1495,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common Container Interface (PHP FIG PSR-11)", @@ -1279,20 +1507,24 @@ "container-interop", "psr" ], - "time": "2017-02-14T16:28:37+00:00" + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/1.1.1" + }, + "time": "2021-03-05T17:36:06+00:00" }, { "name": "psr/log", - "version": "1.1.0", + "version": "1.1.4", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd" + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", - "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", "shasum": "" }, "require": { @@ -1301,7 +1533,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.1.x-dev" } }, "autoload": { @@ -1316,7 +1548,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for logging libraries", @@ -1326,7 +1558,10 @@ "psr", "psr-3" ], - "time": "2018-11-20T15:27:04+00:00" + "support": { + "source": "https://github.com/php-fig/log/tree/1.1.4" + }, + "time": "2021-05-03T11:20:27+00:00" }, { "name": "psr/simple-cache", @@ -1374,31 +1609,34 @@ "psr-16", "simple-cache" ], + "support": { + "source": "https://github.com/php-fig/simple-cache/tree/master" + }, "time": "2017-10-23T01:57:42+00:00" }, { "name": "psy/psysh", - "version": "v0.9.9", + "version": "v0.9.12", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "9aaf29575bb8293206bb0420c1e1c87ff2ffa94e" + "reference": "90da7f37568aee36b116a030c5f99c915267edd4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/9aaf29575bb8293206bb0420c1e1c87ff2ffa94e", - "reference": "9aaf29575bb8293206bb0420c1e1c87ff2ffa94e", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/90da7f37568aee36b116a030c5f99c915267edd4", + "reference": "90da7f37568aee36b116a030c5f99c915267edd4", "shasum": "" }, "require": { - "dnoegel/php-xdg-base-dir": "0.1", + "dnoegel/php-xdg-base-dir": "0.1.*", "ext-json": "*", "ext-tokenizer": "*", "jakub-onderka/php-console-highlighter": "0.3.*|0.4.*", "nikic/php-parser": "~1.3|~2.0|~3.0|~4.0", "php": ">=5.4.0", - "symfony/console": "~2.3.10|^2.4.2|~3.0|~4.0", - "symfony/var-dumper": "~2.7|~3.0|~4.0" + "symfony/console": "~2.3.10|^2.4.2|~3.0|~4.0|~5.0", + "symfony/var-dumper": "~2.7|~3.0|~4.0|~5.0" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.2", @@ -1448,48 +1686,54 @@ "interactive", "shell" ], - "time": "2018-10-13T15:16:03+00:00" + "support": { + "issues": "https://github.com/bobthecow/psysh/issues", + "source": "https://github.com/bobthecow/psysh/tree/v0.9.12" + }, + "time": "2019-12-06T14:19:43+00:00" }, { "name": "ramsey/uuid", - "version": "3.8.0", + "version": "3.9.4", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "d09ea80159c1929d75b3f9c60504d613aeb4a1e3" + "reference": "be2451bef8147b7352a28fb4cddb08adc497ada3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/d09ea80159c1929d75b3f9c60504d613aeb4a1e3", - "reference": "d09ea80159c1929d75b3f9c60504d613aeb4a1e3", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/be2451bef8147b7352a28fb4cddb08adc497ada3", + "reference": "be2451bef8147b7352a28fb4cddb08adc497ada3", "shasum": "" }, "require": { - "paragonie/random_compat": "^1.0|^2.0|9.99.99", - "php": "^5.4 || ^7.0", + "ext-json": "*", + "paragonie/random_compat": "^1 | ^2 | ^9.99.99", + "php": "^5.4 | ^7 | ^8", "symfony/polyfill-ctype": "^1.8" }, "replace": { "rhumsaa/uuid": "self.version" }, "require-dev": { - "codeception/aspect-mock": "^1.0 | ~2.0.0", - "doctrine/annotations": "~1.2.0", - "goaop/framework": "1.0.0-alpha.2 | ^1.0 | ~2.1.0", - "ircmaxell/random-lib": "^1.1", - "jakub-onderka/php-parallel-lint": "^0.9.0", - "mockery/mockery": "^0.9.9", + "codeception/aspect-mock": "^1 | ^2", + "doctrine/annotations": "^1.2", + "goaop/framework": "1.0.0-alpha.2 | ^1 | ^2.1", + "jakub-onderka/php-parallel-lint": "^1", + "mockery/mockery": "^0.9.11 | ^1", "moontoast/math": "^1.1", - "php-mock/php-mock-phpunit": "^0.3|^1.1", - "phpunit/phpunit": "^4.7|^5.0|^6.5", - "squizlabs/php_codesniffer": "^2.3" + "paragonie/random-lib": "^2", + "php-mock/php-mock-phpunit": "^0.3 | ^1.1", + "phpunit/phpunit": "^4.8 | ^5.4 | ^6.5", + "squizlabs/php_codesniffer": "^3.5" }, "suggest": { "ext-ctype": "Provides support for PHP Ctype functions", "ext-libsodium": "Provides the PECL libsodium extension for use with the SodiumRandomGenerator", + "ext-openssl": "Provides the OpenSSL extension for use with the OpenSslGenerator", "ext-uuid": "Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator", - "ircmaxell/random-lib": "Provides RandomLib for use with the RandomLibAdapter", "moontoast/math": "Provides support for converting UUID to 128-bit integer (in string form).", + "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter", "ramsey/uuid-console": "A console application for generating UUIDs with ramsey/uuid", "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." }, @@ -1502,13 +1746,21 @@ "autoload": { "psr-4": { "Ramsey\\Uuid\\": "src/" - } + }, + "files": [ + "src/functions.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ + { + "name": "Ben Ramsey", + "email": "ben@benramsey.com", + "homepage": "https://benramsey.com" + }, { "name": "Marijn Huizendveld", "email": "marijn.huizendveld@gmail.com" @@ -1516,11 +1768,6 @@ { "name": "Thibaud Fabre", "email": "thibaud@aztech.io" - }, - { - "name": "Ben Ramsey", - "email": "ben@benramsey.com", - "homepage": "https://benramsey.com" } ], "description": "Formerly rhumsaa/uuid. A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).", @@ -1530,36 +1777,51 @@ "identifier", "uuid" ], - "time": "2018-07-19T23:38:55+00:00" + "support": { + "issues": "https://github.com/ramsey/uuid/issues", + "rss": "https://github.com/ramsey/uuid/releases.atom", + "source": "https://github.com/ramsey/uuid", + "wiki": "https://github.com/ramsey/uuid/wiki" + }, + "funding": [ + { + "url": "https://github.com/ramsey", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/ramsey/uuid", + "type": "tidelift" + } + ], + "time": "2021-08-06T20:32:15+00:00" }, { "name": "swiftmailer/swiftmailer", - "version": "v6.2.1", + "version": "v6.2.7", "source": { "type": "git", "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "5397cd05b0a0f7937c47b0adcb4c60e5ab936b6a" + "reference": "15f7faf8508e04471f666633addacf54c0ab5933" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/5397cd05b0a0f7937c47b0adcb4c60e5ab936b6a", - "reference": "5397cd05b0a0f7937c47b0adcb4c60e5ab936b6a", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/15f7faf8508e04471f666633addacf54c0ab5933", + "reference": "15f7faf8508e04471f666633addacf54c0ab5933", "shasum": "" }, "require": { - "egulias/email-validator": "~2.0", + "egulias/email-validator": "^2.0|^3.1", "php": ">=7.0.0", "symfony/polyfill-iconv": "^1.0", "symfony/polyfill-intl-idn": "^1.10", "symfony/polyfill-mbstring": "^1.0" }, "require-dev": { - "mockery/mockery": "~0.9.1", - "symfony/phpunit-bridge": "^3.4.19|^4.1.8" + "mockery/mockery": "^1.0", + "symfony/phpunit-bridge": "^4.4|^5.0" }, "suggest": { - "ext-intl": "Needed to support internationalized email addresses", - "true/punycode": "Needed to support internationalized email addresses, if ext-intl is not installed" + "ext-intl": "Needed to support internationalized email addresses" }, "type": "library", "extra": { @@ -1592,44 +1854,61 @@ "mail", "mailer" ], - "time": "2019-04-21T09:21:45+00:00" + "support": { + "issues": "https://github.com/swiftmailer/swiftmailer/issues", + "source": "https://github.com/swiftmailer/swiftmailer/tree/v6.2.7" + }, + "funding": [ + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/swiftmailer/swiftmailer", + "type": "tidelift" + } + ], + "time": "2021-03-09T12:30:35+00:00" }, { "name": "symfony/console", - "version": "v4.3.4", + "version": "v4.4.29", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "de63799239b3881b8a08f8481b22348f77ed7b36" + "reference": "8baf0bbcfddfde7d7225ae8e04705cfd1081cd7b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/de63799239b3881b8a08f8481b22348f77ed7b36", - "reference": "de63799239b3881b8a08f8481b22348f77ed7b36", + "url": "https://api.github.com/repos/symfony/console/zipball/8baf0bbcfddfde7d7225ae8e04705cfd1081cd7b", + "reference": "8baf0bbcfddfde7d7225ae8e04705cfd1081cd7b", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": ">=7.1.3", "symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-php73": "^1.8", - "symfony/service-contracts": "^1.1" + "symfony/polyfill-php80": "^1.16", + "symfony/service-contracts": "^1.1|^2" }, "conflict": { + "psr/log": ">=3", "symfony/dependency-injection": "<3.4", - "symfony/event-dispatcher": "<4.3", + "symfony/event-dispatcher": "<4.3|>=5", + "symfony/lock": "<4.4", "symfony/process": "<3.3" }, "provide": { - "psr/log-implementation": "1.0" + "psr/log-implementation": "1.0|2.0" }, "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~3.4|~4.0", - "symfony/dependency-injection": "~3.4|~4.0", + "psr/log": "^1|^2", + "symfony/config": "^3.4|^4.0|^5.0", + "symfony/dependency-injection": "^3.4|^4.0|^5.0", "symfony/event-dispatcher": "^4.3", - "symfony/lock": "~3.4|~4.0", - "symfony/process": "~3.4|~4.0", - "symfony/var-dumper": "^4.3" + "symfony/lock": "^4.4|^5.0", + "symfony/process": "^3.4|^4.0|^5.0", + "symfony/var-dumper": "^4.3|^5.0" }, "suggest": { "psr/log": "For using the console logger", @@ -1638,11 +1917,6 @@ "symfony/process": "" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.3-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Console\\": "" @@ -1665,33 +1939,46 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Console Component", + "description": "Eases the creation of beautiful and testable command line interfaces", "homepage": "https://symfony.com", - "time": "2019-08-26T08:26:39+00:00" + "support": { + "source": "https://github.com/symfony/console/tree/v4.4.29" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-07-27T19:04:53+00:00" }, { "name": "symfony/css-selector", - "version": "v4.3.4", + "version": "v5.3.4", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "c6e5e2a00db768c92c3ae131532af4e1acc7bd03" + "reference": "7fb120adc7f600a59027775b224c13a33530dd90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/c6e5e2a00db768c92c3ae131532af4e1acc7bd03", - "reference": "c6e5e2a00db768c92c3ae131532af4e1acc7bd03", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/7fb120adc7f600a59027775b224c13a33530dd90", + "reference": "7fb120adc7f600a59027775b224c13a33530dd90", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": ">=7.2.5", + "symfony/polyfill-php80": "^1.16" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.3-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\CssSelector\\": "" @@ -1718,40 +2005,52 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony CssSelector Component", + "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", - "time": "2019-08-20T14:07:54+00:00" + "support": { + "source": "https://github.com/symfony/css-selector/tree/v5.3.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-07-21T12:38:00+00:00" }, { "name": "symfony/debug", - "version": "v4.3.4", + "version": "v4.4.27", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "afcdea44a2e399c1e4b52246ec8d54c715393ced" + "reference": "2f9160e92eb64c95da7368c867b663a8e34e980c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/afcdea44a2e399c1e4b52246ec8d54c715393ced", - "reference": "afcdea44a2e399c1e4b52246ec8d54c715393ced", + "url": "https://api.github.com/repos/symfony/debug/zipball/2f9160e92eb64c95da7368c867b663a8e34e980c", + "reference": "2f9160e92eb64c95da7368c867b663a8e34e980c", "shasum": "" }, "require": { - "php": "^7.1.3", - "psr/log": "~1.0" + "php": ">=7.1.3", + "psr/log": "^1|^2|^3" }, "conflict": { "symfony/http-kernel": "<3.4" }, "require-dev": { - "symfony/http-kernel": "~3.4|~4.0" + "symfony/http-kernel": "^3.4|^4.0|^5.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.3-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Debug\\": "" @@ -1774,60 +2073,57 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Debug Component", + "description": "Provides tools to ease debugging PHP code", "homepage": "https://symfony.com", - "time": "2019-08-20T14:27:59+00:00" + "support": { + "source": "https://github.com/symfony/debug/tree/v4.4.27" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-07-22T07:21:39+00:00" }, { - "name": "symfony/event-dispatcher", - "version": "v4.3.4", + "name": "symfony/deprecation-contracts", + "version": "v2.4.0", "source": { "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "429d0a1451d4c9c4abe1959b2986b88794b9b7d2" + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/429d0a1451d4c9c4abe1959b2986b88794b9b7d2", - "reference": "429d0a1451d4c9c4abe1959b2986b88794b9b7d2", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5f38c8804a9e97d23e0c8d63341088cd8a22d627", + "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627", "shasum": "" }, "require": { - "php": "^7.1.3", - "symfony/event-dispatcher-contracts": "^1.1" - }, - "conflict": { - "symfony/dependency-injection": "<3.4" - }, - "provide": { - "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "1.1" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~3.4|~4.0", - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/expression-language": "~3.4|~4.0", - "symfony/http-foundation": "^3.4|^4.0", - "symfony/service-contracts": "^1.1", - "symfony/stopwatch": "~3.4|~4.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.3-dev" + "dev-main": "2.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { - "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "files": [ + "function.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -1836,49 +2132,67 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony EventDispatcher Component", + "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", - "time": "2019-08-26T08:55:16+00:00" + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.4.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-03-23T23:28:01+00:00" }, { - "name": "symfony/event-dispatcher-contracts", - "version": "v1.1.5", + "name": "symfony/error-handler", + "version": "v4.4.27", "source": { "type": "git", - "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "c61766f4440ca687de1084a5c00b08e167a2575c" + "url": "https://github.com/symfony/error-handler.git", + "reference": "16ac2be1c0f49d6d9eb9d3ce9324bde268717905" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/c61766f4440ca687de1084a5c00b08e167a2575c", - "reference": "c61766f4440ca687de1084a5c00b08e167a2575c", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/16ac2be1c0f49d6d9eb9d3ce9324bde268717905", + "reference": "16ac2be1c0f49d6d9eb9d3ce9324bde268717905", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": ">=7.1.3", + "psr/log": "^1|^2|^3", + "symfony/debug": "^4.4.5", + "symfony/var-dumper": "^4.4|^5.0" }, - "suggest": { - "psr/event-dispatcher": "", - "symfony/event-dispatcher-implementation": "" + "require-dev": { + "symfony/http-kernel": "^4.4|^5.0", + "symfony/serializer": "^4.4|^5.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, "autoload": { "psr-4": { - "Symfony\\Contracts\\EventDispatcher\\": "" - } + "Symfony\\Component\\ErrorHandler\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1886,52 +2200,79 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Generic abstractions related to dispatching event", + "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" + "support": { + "source": "https://github.com/symfony/error-handler/tree/v4.4.27" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } ], - "time": "2019-06-20T06:46:26+00:00" + "time": "2021-07-23T15:41:52+00:00" }, { - "name": "symfony/finder", - "version": "v4.3.4", + "name": "symfony/event-dispatcher", + "version": "v4.4.27", "source": { "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "86c1c929f0a4b24812e1eb109262fc3372c8e9f2" + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "958a128b184fcf0ba45ec90c0e88554c9327c2e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/86c1c929f0a4b24812e1eb109262fc3372c8e9f2", - "reference": "86c1c929f0a4b24812e1eb109262fc3372c8e9f2", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/958a128b184fcf0ba45ec90c0e88554c9327c2e9", + "reference": "958a128b184fcf0ba45ec90c0e88554c9327c2e9", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": ">=7.1.3", + "symfony/event-dispatcher-contracts": "^1.1", + "symfony/polyfill-php80": "^1.16" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.3-dev" - } + "conflict": { + "symfony/dependency-injection": "<3.4" + }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "1.1" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^3.4|^4.0|^5.0", + "symfony/dependency-injection": "^3.4|^4.0|^5.0", + "symfony/error-handler": "~3.4|~4.4", + "symfony/expression-language": "^3.4|^4.0|^5.0", + "symfony/http-foundation": "^3.4|^4.0|^5.0", + "symfony/service-contracts": "^1.1|^2", + "symfony/stopwatch": "^3.4|^4.0|^5.0" }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", "autoload": { "psr-4": { - "Symfony\\Component\\Finder\\": "" + "Symfony\\Component\\EventDispatcher\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -1951,46 +2292,62 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Finder Component", + "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", - "time": "2019-08-14T12:26:46+00:00" + "support": { + "source": "https://github.com/symfony/event-dispatcher/tree/v4.4.27" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-07-23T15:41:52+00:00" }, { - "name": "symfony/http-foundation", - "version": "v4.3.4", + "name": "symfony/event-dispatcher-contracts", + "version": "v1.1.9", "source": { "type": "git", - "url": "https://github.com/symfony/http-foundation.git", - "reference": "d804bea118ff340a12e22a79f9c7e7eb56b35adc" + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "84e23fdcd2517bf37aecbd16967e83f0caee25a7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/d804bea118ff340a12e22a79f9c7e7eb56b35adc", - "reference": "d804bea118ff340a12e22a79f9c7e7eb56b35adc", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/84e23fdcd2517bf37aecbd16967e83f0caee25a7", + "reference": "84e23fdcd2517bf37aecbd16967e83f0caee25a7", "shasum": "" }, "require": { - "php": "^7.1.3", - "symfony/mime": "^4.3", - "symfony/polyfill-mbstring": "~1.1" + "php": ">=7.1.3" }, - "require-dev": { - "predis/predis": "~1.0", - "symfony/expression-language": "~3.4|~4.0" + "suggest": { + "psr/event-dispatcher": "", + "symfony/event-dispatcher-implementation": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.3-dev" + "dev-master": "1.1-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { "psr-4": { - "Symfony\\Component\\HttpFoundation\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] + "Symfony\\Contracts\\EventDispatcher\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1998,87 +2355,65 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony HttpFoundation Component", + "description": "Generic abstractions related to dispatching event", "homepage": "https://symfony.com", - "time": "2019-08-26T08:55:16+00:00" + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v1.1.9" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-07-06T13:19:58+00:00" }, { - "name": "symfony/http-kernel", - "version": "v4.3.4", + "name": "symfony/finder", + "version": "v4.4.27", "source": { "type": "git", - "url": "https://github.com/symfony/http-kernel.git", - "reference": "5e0fc71be03d52cd00c423061cfd300bd6f92a52" + "url": "https://github.com/symfony/finder.git", + "reference": "42414d7ac96fc2880a783b872185789dea0d4262" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/5e0fc71be03d52cd00c423061cfd300bd6f92a52", - "reference": "5e0fc71be03d52cd00c423061cfd300bd6f92a52", + "url": "https://api.github.com/repos/symfony/finder/zipball/42414d7ac96fc2880a783b872185789dea0d4262", + "reference": "42414d7ac96fc2880a783b872185789dea0d4262", "shasum": "" }, "require": { - "php": "^7.1.3", - "psr/log": "~1.0", - "symfony/debug": "~3.4|~4.0", - "symfony/event-dispatcher": "^4.3", - "symfony/http-foundation": "^4.1.1", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-php73": "^1.9" - }, - "conflict": { - "symfony/browser-kit": "<4.3", - "symfony/config": "<3.4", - "symfony/dependency-injection": "<4.3", - "symfony/translation": "<4.2", - "symfony/var-dumper": "<4.1.1", - "twig/twig": "<1.34|<2.4,>=2" - }, - "provide": { - "psr/log-implementation": "1.0" - }, - "require-dev": { - "psr/cache": "~1.0", - "symfony/browser-kit": "^4.3", - "symfony/config": "~3.4|~4.0", - "symfony/console": "~3.4|~4.0", - "symfony/css-selector": "~3.4|~4.0", - "symfony/dependency-injection": "^4.3", - "symfony/dom-crawler": "~3.4|~4.0", - "symfony/expression-language": "~3.4|~4.0", - "symfony/finder": "~3.4|~4.0", - "symfony/process": "~3.4|~4.0", - "symfony/routing": "~3.4|~4.0", - "symfony/stopwatch": "~3.4|~4.0", - "symfony/templating": "~3.4|~4.0", - "symfony/translation": "~4.2", - "symfony/translation-contracts": "^1.1", - "symfony/var-dumper": "^4.1.1", - "twig/twig": "^1.34|^2.4" - }, - "suggest": { - "symfony/browser-kit": "", - "symfony/config": "", - "symfony/console": "", - "symfony/dependency-injection": "", - "symfony/var-dumper": "" + "php": ">=7.1.3", + "symfony/polyfill-php80": "^1.16" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.3-dev" - } - }, "autoload": { "psr-4": { - "Symfony\\Component\\HttpKernel\\": "" + "Symfony\\Component\\Finder\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -2098,46 +2433,61 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony HttpKernel Component", + "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", - "time": "2019-08-26T16:47:42+00:00" + "support": { + "source": "https://github.com/symfony/finder/tree/v4.4.27" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-07-23T15:41:52+00:00" }, { - "name": "symfony/mime", - "version": "v4.3.4", + "name": "symfony/http-client-contracts", + "version": "v2.4.0", "source": { "type": "git", - "url": "https://github.com/symfony/mime.git", - "reference": "987a05df1c6ac259b34008b932551353f4f408df" + "url": "https://github.com/symfony/http-client-contracts.git", + "reference": "7e82f6084d7cae521a75ef2cb5c9457bbda785f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/987a05df1c6ac259b34008b932551353f4f408df", - "reference": "987a05df1c6ac259b34008b932551353f4f408df", + "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/7e82f6084d7cae521a75ef2cb5c9457bbda785f4", + "reference": "7e82f6084d7cae521a75ef2cb5c9457bbda785f4", "shasum": "" }, "require": { - "php": "^7.1.3", - "symfony/polyfill-intl-idn": "^1.10", - "symfony/polyfill-mbstring": "^1.0" + "php": ">=7.2.5" }, - "require-dev": { - "egulias/email-validator": "^2.1.10", - "symfony/dependency-injection": "~3.4|^4.1" + "suggest": { + "symfony/http-client-implementation": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.3-dev" + "dev-main": "2.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { "psr-4": { - "Symfony\\Component\\Mime\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] + "Symfony\\Contracts\\HttpClient\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2145,54 +2495,74 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "A library to manipulate MIME messages", + "description": "Generic abstractions related to HTTP clients", "homepage": "https://symfony.com", "keywords": [ - "mime", - "mime-type" + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/http-client-contracts/tree/v2.4.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } ], - "time": "2019-08-22T08:16:11+00:00" + "time": "2021-04-11T23:07:08+00:00" }, { - "name": "symfony/polyfill-ctype", - "version": "v1.12.0", + "name": "symfony/http-foundation", + "version": "v4.4.29", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "550ebaac289296ce228a706d0867afc34687e3f4" + "url": "https://github.com/symfony/http-foundation.git", + "reference": "7016057b01f0ed3ec3ba1f31a580b6661667c2e1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4", - "reference": "550ebaac289296ce228a706d0867afc34687e3f4", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/7016057b01f0ed3ec3ba1f31a580b6661667c2e1", + "reference": "7016057b01f0ed3ec3ba1f31a580b6661667c2e1", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1.3", + "symfony/mime": "^4.3|^5.0", + "symfony/polyfill-mbstring": "~1.1", + "symfony/polyfill-php80": "^1.16" }, - "suggest": { - "ext-ctype": "For best performance" + "require-dev": { + "predis/predis": "~1.0", + "symfony/expression-language": "^3.4|^4.0|^5.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.12-dev" - } - }, "autoload": { "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" + "Symfony\\Component\\HttpFoundation\\": "" }, - "files": [ - "bootstrap.php" + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -2201,56 +2571,102 @@ ], "authors": [ { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for ctype functions", + "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" + "support": { + "source": "https://github.com/symfony/http-foundation/tree/v4.4.29" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } ], - "time": "2019-08-06T08:03:45+00:00" + "time": "2021-07-27T14:32:23+00:00" }, { - "name": "symfony/polyfill-iconv", - "version": "v1.12.0", + "name": "symfony/http-kernel", + "version": "v4.4.29", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "685968b11e61a347c18bf25db32effa478be610f" + "url": "https://github.com/symfony/http-kernel.git", + "reference": "752b170e1ba0dd4104e7fa17c1cef1ec8a7fc506" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/685968b11e61a347c18bf25db32effa478be610f", - "reference": "685968b11e61a347c18bf25db32effa478be610f", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/752b170e1ba0dd4104e7fa17c1cef1ec8a7fc506", + "reference": "752b170e1ba0dd4104e7fa17c1cef1ec8a7fc506", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1.3", + "psr/log": "^1|^2", + "symfony/error-handler": "^4.4", + "symfony/event-dispatcher": "^4.4", + "symfony/http-client-contracts": "^1.1|^2", + "symfony/http-foundation": "^4.4|^5.0", + "symfony/polyfill-ctype": "^1.8", + "symfony/polyfill-php73": "^1.9", + "symfony/polyfill-php80": "^1.16" + }, + "conflict": { + "symfony/browser-kit": "<4.3", + "symfony/config": "<3.4", + "symfony/console": ">=5", + "symfony/dependency-injection": "<4.3", + "symfony/translation": "<4.2", + "twig/twig": "<1.43|<2.13,>=2" + }, + "provide": { + "psr/log-implementation": "1.0|2.0" + }, + "require-dev": { + "psr/cache": "^1.0|^2.0|^3.0", + "symfony/browser-kit": "^4.3|^5.0", + "symfony/config": "^3.4|^4.0|^5.0", + "symfony/console": "^3.4|^4.0", + "symfony/css-selector": "^3.4|^4.0|^5.0", + "symfony/dependency-injection": "^4.3|^5.0", + "symfony/dom-crawler": "^3.4|^4.0|^5.0", + "symfony/expression-language": "^3.4|^4.0|^5.0", + "symfony/finder": "^3.4|^4.0|^5.0", + "symfony/process": "^3.4|^4.0|^5.0", + "symfony/routing": "^3.4|^4.0|^5.0", + "symfony/stopwatch": "^3.4|^4.0|^5.0", + "symfony/templating": "^3.4|^4.0|^5.0", + "symfony/translation": "^4.2|^5.0", + "symfony/translation-contracts": "^1.1|^2", + "twig/twig": "^1.43|^2.13|^3.0.4" }, "suggest": { - "ext-iconv": "For best performance" + "symfony/browser-kit": "", + "symfony/config": "", + "symfony/console": "", + "symfony/dependency-injection": "" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.12-dev" - } - }, "autoload": { "psr-4": { - "Symfony\\Polyfill\\Iconv\\": "" + "Symfony\\Component\\HttpKernel\\": "" }, - "files": [ - "bootstrap.php" + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -2259,59 +2675,77 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for the Iconv extension", + "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "iconv", - "polyfill", - "portable", - "shim" + "support": { + "source": "https://github.com/symfony/http-kernel/tree/v4.4.29" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } ], - "time": "2019-08-06T08:03:45+00:00" + "time": "2021-07-29T06:45:05+00:00" }, { - "name": "symfony/polyfill-intl-idn", - "version": "v1.12.0", + "name": "symfony/mime", + "version": "v5.3.4", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "6af626ae6fa37d396dc90a399c0ff08e5cfc45b2" + "url": "https://github.com/symfony/mime.git", + "reference": "633e4e8afe9e529e5599d71238849a4218dd497b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/6af626ae6fa37d396dc90a399c0ff08e5cfc45b2", - "reference": "6af626ae6fa37d396dc90a399c0ff08e5cfc45b2", + "url": "https://api.github.com/repos/symfony/mime/zipball/633e4e8afe9e529e5599d71238849a4218dd497b", + "reference": "633e4e8afe9e529e5599d71238849a4218dd497b", "shasum": "" }, "require": { - "php": ">=5.3.3", - "symfony/polyfill-mbstring": "^1.3", - "symfony/polyfill-php72": "^1.9" + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-intl-idn": "^1.10", + "symfony/polyfill-mbstring": "^1.0", + "symfony/polyfill-php80": "^1.16" }, - "suggest": { - "ext-intl": "For best performance" + "conflict": { + "egulias/email-validator": "~3.0.0", + "phpdocumentor/reflection-docblock": "<3.2.2", + "phpdocumentor/type-resolver": "<1.4.0", + "symfony/mailer": "<4.4" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.12-dev" - } + "require-dev": { + "egulias/email-validator": "^2.1.10|^3.1", + "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/property-access": "^4.4|^5.1", + "symfony/property-info": "^4.4|^5.1", + "symfony/serializer": "^5.2" }, + "type": "library", "autoload": { "psr-4": { - "Symfony\\Polyfill\\Intl\\Idn\\": "" + "Symfony\\Component\\Mime\\": "" }, - "files": [ - "bootstrap.php" + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -2320,55 +2754,72 @@ ], "authors": [ { - "name": "Laurent Bassin", - "email": "laurent@bassin.info" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", + "description": "Allows manipulating MIME messages", "homepage": "https://symfony.com", "keywords": [ - "compatibility", - "idn", - "intl", - "polyfill", - "portable", - "shim" + "mime", + "mime-type" + ], + "support": { + "source": "https://github.com/symfony/mime/tree/v5.3.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } ], - "time": "2019-08-06T08:03:45+00:00" + "time": "2021-07-21T12:40:44+00:00" }, { - "name": "symfony/polyfill-mbstring", - "version": "v1.12.0", + "name": "symfony/polyfill-ctype", + "version": "v1.23.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "b42a2f66e8f1b15ccf25652c3424265923eb4f17" + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/b42a2f66e8f1b15ccf25652c3424265923eb4f17", - "reference": "b42a2f66e8f1b15ccf25652c3424265923eb4f17", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { - "ext-mbstring": "For best performance" + "ext-ctype": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.12-dev" + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" + "Symfony\\Polyfill\\Ctype\\": "" }, "files": [ "bootstrap.php" @@ -2380,51 +2831,74 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for the Mbstring extension", + "description": "Symfony polyfill for ctype functions", "homepage": "https://symfony.com", "keywords": [ "compatibility", - "mbstring", + "ctype", "polyfill", - "portable", - "shim" + "portable" ], - "time": "2019-08-06T08:03:45+00:00" + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-02-19T12:13:01+00:00" }, { - "name": "symfony/polyfill-php72", - "version": "v1.12.0", + "name": "symfony/polyfill-iconv", + "version": "v1.23.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "04ce3335667451138df4307d6a9b61565560199e" + "url": "https://github.com/symfony/polyfill-iconv.git", + "reference": "63b5bb7db83e5673936d6e3b8b3e022ff6474933" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/04ce3335667451138df4307d6a9b61565560199e", - "reference": "04ce3335667451138df4307d6a9b61565560199e", + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/63b5bb7db83e5673936d6e3b8b3e022ff6474933", + "reference": "63b5bb7db83e5673936d6e3b8b3e022ff6474933", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" + }, + "suggest": { + "ext-iconv": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.12-dev" + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" + "Symfony\\Polyfill\\Iconv\\": "" }, "files": [ "bootstrap.php" @@ -2444,48 +2918,72 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "description": "Symfony polyfill for the Iconv extension", "homepage": "https://symfony.com", "keywords": [ "compatibility", + "iconv", "polyfill", "portable", "shim" ], - "time": "2019-08-06T08:03:45+00:00" + "support": { + "source": "https://github.com/symfony/polyfill-iconv/tree/v1.23.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-05-27T09:27:20+00:00" }, { - "name": "symfony/polyfill-php73", - "version": "v1.12.0", + "name": "symfony/polyfill-intl-idn", + "version": "v1.23.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "2ceb49eaccb9352bff54d22570276bb75ba4a188" + "url": "https://github.com/symfony/polyfill-intl-idn.git", + "reference": "65bd267525e82759e7d8c4e8ceea44f398838e65" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/2ceb49eaccb9352bff54d22570276bb75ba4a188", - "reference": "2ceb49eaccb9352bff54d22570276bb75ba4a188", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/65bd267525e82759e7d8c4e8ceea44f398838e65", + "reference": "65bd267525e82759e7d8c4e8ceea44f398838e65", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1", + "symfony/polyfill-intl-normalizer": "^1.10", + "symfony/polyfill-php72": "^1.10" + }, + "suggest": { + "ext-intl": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.12-dev" + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" + "Symfony\\Polyfill\\Intl\\Idn\\": "" }, "files": [ "bootstrap.php" - ], - "classmap": [ - "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", @@ -2494,53 +2992,86 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Laurent Bassin", + "email": "laurent@bassin.info" + }, + { + "name": "Trevor Rowbotham", + "email": "trevor.rowbotham@pm.me" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", "homepage": "https://symfony.com", "keywords": [ "compatibility", + "idn", + "intl", "polyfill", "portable", "shim" ], - "time": "2019-08-06T08:03:45+00:00" + "support": { + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.23.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-05-27T09:27:20+00:00" }, { - "name": "symfony/process", - "version": "v4.3.4", + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.23.0", "source": { "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "e89969c00d762349f078db1128506f7f3dcc0d4a" + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/e89969c00d762349f078db1128506f7f3dcc0d4a", - "reference": "e89969c00d762349f078db1128506f7f3dcc0d4a", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", + "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.3-dev" + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { "psr-4": { - "Symfony\\Component\\Process\\": "" + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" }, - "exclude-from-classmap": [ - "/Tests/" + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", @@ -2549,68 +3080,79 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Process Component", + "description": "Symfony polyfill for intl's Normalizer class and related functions", "homepage": "https://symfony.com", - "time": "2019-08-26T08:26:39+00:00" + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.23.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-02-19T12:13:01+00:00" }, { - "name": "symfony/routing", - "version": "v4.3.4", + "name": "symfony/polyfill-mbstring", + "version": "v1.23.1", "source": { "type": "git", - "url": "https://github.com/symfony/routing.git", - "reference": "ff1049f6232dc5b6023b1ff1c6de56f82bcd264f" + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/ff1049f6232dc5b6023b1ff1c6de56f82bcd264f", - "reference": "ff1049f6232dc5b6023b1ff1c6de56f82bcd264f", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6", + "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6", "shasum": "" }, "require": { - "php": "^7.1.3" - }, - "conflict": { - "symfony/config": "<4.2", - "symfony/dependency-injection": "<3.4", - "symfony/yaml": "<3.4" - }, - "require-dev": { - "doctrine/annotations": "~1.2", - "psr/log": "~1.0", - "symfony/config": "~4.2", - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/expression-language": "~3.4|~4.0", - "symfony/http-foundation": "~3.4|~4.0", - "symfony/yaml": "~3.4|~4.0" + "php": ">=7.1" }, "suggest": { - "doctrine/annotations": "For using the annotation loader", - "symfony/config": "For using the all-in-one router or any loader", - "symfony/expression-language": "For using expression matching", - "symfony/http-foundation": "For using a Symfony Request object", - "symfony/yaml": "For using the YAML loader" + "ext-mbstring": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.3-dev" + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { "psr-4": { - "Symfony\\Component\\Routing\\": "" + "Symfony\\Polyfill\\Mbstring\\": "" }, - "exclude-from-classmap": [ - "/Tests/" + "files": [ + "bootstrap.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -2619,55 +3161,76 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Routing Component", + "description": "Symfony polyfill for the Mbstring extension", "homepage": "https://symfony.com", "keywords": [ - "router", - "routing", - "uri", - "url" + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } ], - "time": "2019-08-26T08:26:39+00:00" + "time": "2021-05-27T12:26:48+00:00" }, { - "name": "symfony/service-contracts", - "version": "v1.1.6", + "name": "symfony/polyfill-php72", + "version": "v1.23.0", "source": { "type": "git", - "url": "https://github.com/symfony/service-contracts.git", - "reference": "ea7263d6b6d5f798b56a45a5b8d686725f2719a3" + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "9a142215a36a3888e30d0a9eeea9766764e96976" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/ea7263d6b6d5f798b56a45a5b8d686725f2719a3", - "reference": "ea7263d6b6d5f798b56a45a5b8d686725f2719a3", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9a142215a36a3888e30d0a9eeea9766764e96976", + "reference": "9a142215a36a3888e30d0a9eeea9766764e96976", "shasum": "" }, "require": { - "php": "^7.1.3", - "psr/container": "^1.0" - }, - "suggest": { - "symfony/service-implementation": "" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { "psr-4": { - "Symfony\\Contracts\\Service\\": "" - } + "Symfony\\Polyfill\\Php72\\": "" + }, + "files": [ + "bootstrap.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2683,74 +3246,69 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Generic abstractions related to writing services", + "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php72/tree/v1.23.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } ], - "time": "2019-08-20T14:44:19+00:00" + "time": "2021-05-27T09:17:38+00:00" }, { - "name": "symfony/translation", - "version": "v4.3.4", + "name": "symfony/polyfill-php73", + "version": "v1.23.0", "source": { "type": "git", - "url": "https://github.com/symfony/translation.git", - "reference": "28498169dd334095fa981827992f3a24d50fed0f" + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/28498169dd334095fa981827992f3a24d50fed0f", - "reference": "28498169dd334095fa981827992f3a24d50fed0f", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010", + "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010", "shasum": "" }, "require": { - "php": "^7.1.3", - "symfony/polyfill-mbstring": "~1.0", - "symfony/translation-contracts": "^1.1.6" - }, - "conflict": { - "symfony/config": "<3.4", - "symfony/dependency-injection": "<3.4", - "symfony/yaml": "<3.4" - }, - "provide": { - "symfony/translation-implementation": "1.0" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~3.4|~4.0", - "symfony/console": "~3.4|~4.0", - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/finder": "~2.8|~3.0|~4.0", - "symfony/http-kernel": "~3.4|~4.0", - "symfony/intl": "~3.4|~4.0", - "symfony/service-contracts": "^1.1.2", - "symfony/var-dumper": "~3.4|~4.0", - "symfony/yaml": "~3.4|~4.0" - }, - "suggest": { - "psr/log-implementation": "To use logging capability in translator", - "symfony/config": "", - "symfony/yaml": "" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.3-dev" + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { "psr-4": { - "Symfony\\Component\\Translation\\": "" + "Symfony\\Polyfill\\Php73\\": "" }, - "exclude-from-classmap": [ - "/Tests/" + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", @@ -2759,54 +3317,88 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Translation Component", + "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", "homepage": "https://symfony.com", - "time": "2019-08-26T08:55:16+00:00" + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php73/tree/v1.23.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-02-19T12:13:01+00:00" }, { - "name": "symfony/translation-contracts", - "version": "v1.1.6", + "name": "symfony/polyfill-php80", + "version": "v1.23.1", "source": { "type": "git", - "url": "https://github.com/symfony/translation-contracts.git", - "reference": "325b17c24f3ee23cbecfa63ba809c6d89b5fa04a" + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/325b17c24f3ee23cbecfa63ba809c6d89b5fa04a", - "reference": "325b17c24f3ee23cbecfa63ba809c6d89b5fa04a", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be", + "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be", "shasum": "" }, "require": { - "php": "^7.1.3" - }, - "suggest": { - "symfony/translation-implementation": "" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { "psr-4": { - "Symfony\\Contracts\\Translation\\": "" - } + "Symfony\\Polyfill\\Php80\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, { "name": "Nicolas Grekas", "email": "p@tchwork.com" @@ -2816,67 +3408,55 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Generic abstractions related to translation", + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } ], - "time": "2019-08-02T12:15:04+00:00" + "time": "2021-07-28T13:41:28+00:00" }, { - "name": "symfony/var-dumper", - "version": "v4.3.4", + "name": "symfony/process", + "version": "v4.4.27", "source": { "type": "git", - "url": "https://github.com/symfony/var-dumper.git", - "reference": "641043e0f3e615990a0f29479f9c117e8a6698c6" + "url": "https://github.com/symfony/process.git", + "reference": "0b7dc5599ac4aa6d7b936c8f7d10abae64f6cf7f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/641043e0f3e615990a0f29479f9c117e8a6698c6", - "reference": "641043e0f3e615990a0f29479f9c117e8a6698c6", + "url": "https://api.github.com/repos/symfony/process/zipball/0b7dc5599ac4aa6d7b936c8f7d10abae64f6cf7f", + "reference": "0b7dc5599ac4aa6d7b936c8f7d10abae64f6cf7f", "shasum": "" }, "require": { - "php": "^7.1.3", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php72": "~1.5" - }, - "conflict": { - "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0", - "symfony/console": "<3.4" - }, - "require-dev": { - "ext-iconv": "*", - "symfony/console": "~3.4|~4.0", - "symfony/process": "~3.4|~4.0", - "twig/twig": "~1.34|~2.4" - }, - "suggest": { - "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", - "ext-intl": "To show region name in time zone dump", - "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script" + "php": ">=7.1.3", + "symfony/polyfill-php80": "^1.16" }, - "bin": [ - "Resources/bin/var-dump-server" - ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.3-dev" - } - }, "autoload": { - "files": [ - "Resources/functions/dump.php" - ], "psr-4": { - "Symfony\\Component\\VarDumper\\": "" + "Symfony\\Component\\Process\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -2888,167 +3468,418 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony mechanism for exploring and dumping PHP variables", + "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", - "keywords": [ - "debug", - "dump" + "support": { + "source": "https://github.com/symfony/process/tree/v4.4.27" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } ], - "time": "2019-08-26T08:26:39+00:00" + "time": "2021-07-23T15:41:52+00:00" }, { - "name": "tijsverkoyen/css-to-inline-styles", - "version": "2.2.1", + "name": "symfony/routing", + "version": "v4.4.27", "source": { "type": "git", - "url": "https://github.com/tijsverkoyen/CssToInlineStyles.git", - "reference": "0ed4a2ea4e0902dac0489e6436ebcd5bbcae9757" + "url": "https://github.com/symfony/routing.git", + "reference": "244609821beece97167fa7ba4eef49d2a31862db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/0ed4a2ea4e0902dac0489e6436ebcd5bbcae9757", - "reference": "0ed4a2ea4e0902dac0489e6436ebcd5bbcae9757", + "url": "https://api.github.com/repos/symfony/routing/zipball/244609821beece97167fa7ba4eef49d2a31862db", + "reference": "244609821beece97167fa7ba4eef49d2a31862db", "shasum": "" }, "require": { - "php": "^5.5 || ^7.0", - "symfony/css-selector": "^2.7 || ^3.0 || ^4.0" + "php": ">=7.1.3", + "symfony/polyfill-php80": "^1.16" + }, + "conflict": { + "symfony/config": "<4.2", + "symfony/dependency-injection": "<3.4", + "symfony/yaml": "<3.4" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + "doctrine/annotations": "^1.10.4", + "psr/log": "^1|^2|^3", + "symfony/config": "^4.2|^5.0", + "symfony/dependency-injection": "^3.4|^4.0|^5.0", + "symfony/expression-language": "^3.4|^4.0|^5.0", + "symfony/http-foundation": "^3.4|^4.0|^5.0", + "symfony/yaml": "^3.4|^4.0|^5.0" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2.x-dev" - } + "suggest": { + "doctrine/annotations": "For using the annotation loader", + "symfony/config": "For using the all-in-one router or any loader", + "symfony/expression-language": "For using expression matching", + "symfony/http-foundation": "For using a Symfony Request object", + "symfony/yaml": "For using the YAML loader" }, + "type": "library", "autoload": { "psr-4": { - "TijsVerkoyen\\CssToInlineStyles\\": "src" - } + "Symfony\\Component\\Routing\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Tijs Verkoyen", - "email": "css_to_inline_styles@verkoyen.eu", - "role": "Developer" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.", - "homepage": "https://github.com/tijsverkoyen/CssToInlineStyles", - "time": "2017-11-27T11:13:29+00:00" + "description": "Maps an HTTP request to a set of configuration variables", + "homepage": "https://symfony.com", + "keywords": [ + "router", + "routing", + "uri", + "url" + ], + "support": { + "source": "https://github.com/symfony/routing/tree/v4.4.27" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-07-23T15:41:52+00:00" }, { - "name": "vlucas/phpdotenv", - "version": "v3.5.0", + "name": "symfony/service-contracts", + "version": "v2.4.0", "source": { "type": "git", - "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "95cb0fa6c025f7f0db7fc60f81e9fb231eb2d222" + "url": "https://github.com/symfony/service-contracts.git", + "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/95cb0fa6c025f7f0db7fc60f81e9fb231eb2d222", - "reference": "95cb0fa6c025f7f0db7fc60f81e9fb231eb2d222", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", + "reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", "shasum": "" }, "require": { - "php": "^5.4 || ^7.0", - "phpoption/phpoption": "^1.5", - "symfony/polyfill-ctype": "^1.9" + "php": ">=7.2.5", + "psr/container": "^1.1" }, - "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.0 || ^6.0" + "suggest": { + "symfony/service-implementation": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.5-dev" + "dev-main": "2.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { "psr-4": { - "Dotenv\\": "src/" + "Symfony\\Contracts\\Service\\": "" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Graham Campbell", - "email": "graham@alt-three.com", - "homepage": "https://gjcampbell.co.uk/" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { - "name": "Vance Lucas", - "email": "vance@vancelucas.com", - "homepage": "https://vancelucas.com/" + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", "keywords": [ - "dotenv", - "env", - "environment" + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" ], - "time": "2019-08-27T17:00:38+00:00" - } - ], - "packages-dev": [ + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v2.4.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-04-01T10:43:52+00:00" + }, { - "name": "beyondcode/laravel-dump-server", - "version": "1.3.0", + "name": "symfony/translation", + "version": "v4.4.27", "source": { "type": "git", - "url": "https://github.com/beyondcode/laravel-dump-server.git", - "reference": "fcc88fa66895f8c1ff83f6145a5eff5fa2a0739a" + "url": "https://github.com/symfony/translation.git", + "reference": "2e3c0f2bf704d635ba862e7198d72331a62d82ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/beyondcode/laravel-dump-server/zipball/fcc88fa66895f8c1ff83f6145a5eff5fa2a0739a", - "reference": "fcc88fa66895f8c1ff83f6145a5eff5fa2a0739a", + "url": "https://api.github.com/repos/symfony/translation/zipball/2e3c0f2bf704d635ba862e7198d72331a62d82ba", + "reference": "2e3c0f2bf704d635ba862e7198d72331a62d82ba", "shasum": "" }, "require": { - "illuminate/console": "5.6.*|5.7.*|5.8.*|^6.0", - "illuminate/http": "5.6.*|5.7.*|5.8.*|^6.0", - "illuminate/support": "5.6.*|5.7.*|5.8.*|^6.0", - "php": "^7.1", - "symfony/var-dumper": "^4.1.1" + "php": ">=7.1.3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "^1.16", + "symfony/translation-contracts": "^1.1.6|^2" + }, + "conflict": { + "symfony/config": "<3.4", + "symfony/dependency-injection": "<3.4", + "symfony/http-kernel": "<4.4", + "symfony/yaml": "<3.4" + }, + "provide": { + "symfony/translation-implementation": "1.0|2.0" }, "require-dev": { - "larapack/dd": "^1.0", - "phpunit/phpunit": "^7.0" + "psr/log": "^1|^2|^3", + "symfony/config": "^3.4|^4.0|^5.0", + "symfony/console": "^3.4|^4.0|^5.0", + "symfony/dependency-injection": "^3.4|^4.0|^5.0", + "symfony/finder": "~2.8|~3.0|~4.0|^5.0", + "symfony/http-kernel": "^4.4", + "symfony/intl": "^3.4|^4.0|^5.0", + "symfony/service-contracts": "^1.1.2|^2", + "symfony/yaml": "^3.4|^4.0|^5.0" + }, + "suggest": { + "psr/log-implementation": "To use logging capability in translator", + "symfony/config": "", + "symfony/yaml": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Translation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools to internationalize your application", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/translation/tree/v4.4.27" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-07-21T13:12:00+00:00" + }, + { + "name": "symfony/translation-contracts", + "version": "v2.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation-contracts.git", + "reference": "95c812666f3e91db75385749fe219c5e494c7f95" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/95c812666f3e91db75385749fe219c5e494c7f95", + "reference": "95c812666f3e91db75385749fe219c5e494c7f95", + "shasum": "" + }, + "require": { + "php": ">=7.2.5" + }, + "suggest": { + "symfony/translation-implementation": "" }, "type": "library", "extra": { - "laravel": { - "providers": [ - "BeyondCode\\DumpServer\\DumpServerServiceProvider" - ] + "branch-alias": { + "dev-main": "2.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { "psr-4": { - "BeyondCode\\DumpServer\\": "src" + "Symfony\\Contracts\\Translation\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to translation", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/translation-contracts/tree/v2.4.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-03-23T23:28:01+00:00" + }, + { + "name": "symfony/var-dumper", + "version": "v4.4.27", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-dumper.git", + "reference": "391d6d0e7a06ab54eb7c38fab29b8d174471b3ba" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/391d6d0e7a06ab54eb7c38fab29b8d174471b3ba", + "reference": "391d6d0e7a06ab54eb7c38fab29b8d174471b3ba", + "shasum": "" + }, + "require": { + "php": ">=7.1.3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php72": "~1.5", + "symfony/polyfill-php80": "^1.16" + }, + "conflict": { + "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0", + "symfony/console": "<3.4" + }, + "require-dev": { + "ext-iconv": "*", + "symfony/console": "^3.4|^4.0|^5.0", + "symfony/process": "^4.4|^5.0", + "twig/twig": "^1.43|^2.13|^3.0.4" + }, + "suggest": { + "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", + "ext-intl": "To show region name in time zone dump", + "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script" + }, + "bin": [ + "Resources/bin/var-dump-server" + ], + "type": "library", + "autoload": { "files": [ - "helpers.php" + "Resources/functions/dump.php" + ], + "psr-4": { + "Symfony\\Component\\VarDumper\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -3057,52 +3888,1212 @@ ], "authors": [ { - "name": "Marcel Pociot", - "email": "marcel@beyondco.de", - "homepage": "https://beyondco.de", - "role": "Developer" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Var-Dump Server for Laravel", - "homepage": "https://github.com/beyondcode/laravel-dump-server", + "description": "Provides mechanisms for walking through any arbitrary PHP variable", + "homepage": "https://symfony.com", "keywords": [ - "beyondcode", - "laravel-dump-server" + "debug", + "dump" ], - "time": "2019-08-11T13:17:40+00:00" + "support": { + "source": "https://github.com/symfony/var-dumper/tree/v4.4.27" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-07-23T15:41:52+00:00" }, { - "name": "doctrine/instantiator", - "version": "1.2.0", + "name": "tijsverkoyen/css-to-inline-styles", + "version": "2.2.3", "source": { "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "a2c590166b2133a4633738648b6b064edae0814a" + "url": "https://github.com/tijsverkoyen/CssToInlineStyles.git", + "reference": "b43b05cf43c1b6d849478965062b6ef73e223bb5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/a2c590166b2133a4633738648b6b064edae0814a", - "reference": "a2c590166b2133a4633738648b6b064edae0814a", + "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/b43b05cf43c1b6d849478965062b6ef73e223bb5", + "reference": "b43b05cf43c1b6d849478965062b6ef73e223bb5", "shasum": "" }, "require": { - "php": "^7.1" + "ext-dom": "*", + "ext-libxml": "*", + "php": "^5.5 || ^7.0 || ^8.0", + "symfony/css-selector": "^2.7 || ^3.0 || ^4.0 || ^5.0" }, "require-dev": { - "doctrine/coding-standard": "^6.0", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.13", - "phpstan/phpstan-phpunit": "^0.11", - "phpstan/phpstan-shim": "^0.11", - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^7.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "2.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "TijsVerkoyen\\CssToInlineStyles\\": "src" } }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Tijs Verkoyen", + "email": "css_to_inline_styles@verkoyen.eu", + "role": "Developer" + } + ], + "description": "CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.", + "homepage": "https://github.com/tijsverkoyen/CssToInlineStyles", + "support": { + "issues": "https://github.com/tijsverkoyen/CssToInlineStyles/issues", + "source": "https://github.com/tijsverkoyen/CssToInlineStyles/tree/2.2.3" + }, + "time": "2020-07-13T06:12:54+00:00" + }, + { + "name": "vlucas/phpdotenv", + "version": "v3.6.8", + "source": { + "type": "git", + "url": "https://github.com/vlucas/phpdotenv.git", + "reference": "5e679f7616db829358341e2d5cccbd18773bdab8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/5e679f7616db829358341e2d5cccbd18773bdab8", + "reference": "5e679f7616db829358341e2d5cccbd18773bdab8", + "shasum": "" + }, + "require": { + "php": "^5.4 || ^7.0 || ^8.0", + "phpoption/phpoption": "^1.5.2", + "symfony/polyfill-ctype": "^1.17" + }, + "require-dev": { + "ext-filter": "*", + "ext-pcre": "*", + "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20" + }, + "suggest": { + "ext-filter": "Required to use the boolean validator.", + "ext-pcre": "Required to use most of the library." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.6-dev" + } + }, + "autoload": { + "psr-4": { + "Dotenv\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "graham@alt-three.com", + "homepage": "https://gjcampbell.co.uk/" + }, + { + "name": "Vance Lucas", + "email": "vance@vancelucas.com", + "homepage": "https://vancelucas.com/" + } + ], + "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", + "keywords": [ + "dotenv", + "env", + "environment" + ], + "support": { + "issues": "https://github.com/vlucas/phpdotenv/issues", + "source": "https://github.com/vlucas/phpdotenv/tree/v3.6.8" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv", + "type": "tidelift" + } + ], + "time": "2021-01-20T14:39:46+00:00" + } + ], + "packages-dev": [ + { + "name": "barryvdh/laravel-ide-helper", + "version": "v2.8.2", + "source": { + "type": "git", + "url": "https://github.com/barryvdh/laravel-ide-helper.git", + "reference": "5515cabea39b9cf55f98980d0f269dc9d85cfcca" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/5515cabea39b9cf55f98980d0f269dc9d85cfcca", + "reference": "5515cabea39b9cf55f98980d0f269dc9d85cfcca", + "shasum": "" + }, + "require": { + "barryvdh/reflection-docblock": "^2.0.6", + "composer/composer": "^1.6 || ^2", + "doctrine/dbal": "~2.3", + "ext-json": "*", + "illuminate/console": "^6 || ^7 || ^8", + "illuminate/filesystem": "^6 || ^7 || ^8", + "illuminate/support": "^6 || ^7 || ^8", + "php": ">=7.2", + "phpdocumentor/type-resolver": "^1.1.0" + }, + "require-dev": { + "ext-pdo_sqlite": "*", + "friendsofphp/php-cs-fixer": "^2", + "illuminate/config": "^6 || ^7 || ^8", + "illuminate/view": "^6 || ^7 || ^8", + "mockery/mockery": "^1.3.3", + "orchestra/testbench": "^4 || ^5 || ^6", + "phpunit/phpunit": "^8.5 || ^9", + "spatie/phpunit-snapshot-assertions": "^1.4 || ^2.2 || ^3 || ^4", + "vimeo/psalm": "^3.12" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + }, + "laravel": { + "providers": [ + "Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Barryvdh\\LaravelIdeHelper\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.", + "keywords": [ + "autocomplete", + "codeintel", + "helper", + "ide", + "laravel", + "netbeans", + "phpdoc", + "phpstorm", + "sublime" + ], + "support": { + "issues": "https://github.com/barryvdh/laravel-ide-helper/issues", + "source": "https://github.com/barryvdh/laravel-ide-helper/tree/v2.8.2" + }, + "funding": [ + { + "url": "https://github.com/barryvdh", + "type": "github" + } + ], + "time": "2020-12-06T08:55:05+00:00" + }, + { + "name": "barryvdh/reflection-docblock", + "version": "v2.0.6", + "source": { + "type": "git", + "url": "https://github.com/barryvdh/ReflectionDocBlock.git", + "reference": "6b69015d83d3daf9004a71a89f26e27d27ef6a16" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/barryvdh/ReflectionDocBlock/zipball/6b69015d83d3daf9004a71a89f26e27d27ef6a16", + "reference": "6b69015d83d3daf9004a71a89f26e27d27ef6a16", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.0,<4.5" + }, + "suggest": { + "dflydev/markdown": "~1.0", + "erusev/parsedown": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Barryvdh": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "mike.vanriel@naenius.com" + } + ], + "support": { + "source": "https://github.com/barryvdh/ReflectionDocBlock/tree/v2.0.6" + }, + "time": "2018-12-13T10:34:14+00:00" + }, + { + "name": "beyondcode/laravel-dump-server", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://github.com/beyondcode/laravel-dump-server.git", + "reference": "fcc88fa66895f8c1ff83f6145a5eff5fa2a0739a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/beyondcode/laravel-dump-server/zipball/fcc88fa66895f8c1ff83f6145a5eff5fa2a0739a", + "reference": "fcc88fa66895f8c1ff83f6145a5eff5fa2a0739a", + "shasum": "" + }, + "require": { + "illuminate/console": "5.6.*|5.7.*|5.8.*|^6.0", + "illuminate/http": "5.6.*|5.7.*|5.8.*|^6.0", + "illuminate/support": "5.6.*|5.7.*|5.8.*|^6.0", + "php": "^7.1", + "symfony/var-dumper": "^4.1.1" + }, + "require-dev": { + "larapack/dd": "^1.0", + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "BeyondCode\\DumpServer\\DumpServerServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "BeyondCode\\DumpServer\\": "src" + }, + "files": [ + "helpers.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marcel Pociot", + "email": "marcel@beyondco.de", + "homepage": "https://beyondco.de", + "role": "Developer" + } + ], + "description": "Symfony Var-Dump Server for Laravel", + "homepage": "https://github.com/beyondcode/laravel-dump-server", + "keywords": [ + "beyondcode", + "laravel-dump-server" + ], + "support": { + "issues": "https://github.com/beyondcode/laravel-dump-server/issues", + "source": "https://github.com/beyondcode/laravel-dump-server/tree/1.3.0" + }, + "time": "2019-08-11T13:17:40+00:00" + }, + { + "name": "composer/ca-bundle", + "version": "1.2.10", + "source": { + "type": "git", + "url": "https://github.com/composer/ca-bundle.git", + "reference": "9fdb22c2e97a614657716178093cd1da90a64aa8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/9fdb22c2e97a614657716178093cd1da90a64aa8", + "reference": "9fdb22c2e97a614657716178093cd1da90a64aa8", + "shasum": "" + }, + "require": { + "ext-openssl": "*", + "ext-pcre": "*", + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.55", + "psr/log": "^1.0", + "symfony/phpunit-bridge": "^4.2 || ^5", + "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\CaBundle\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.", + "keywords": [ + "cabundle", + "cacert", + "certificate", + "ssl", + "tls" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/ca-bundle/issues", + "source": "https://github.com/composer/ca-bundle/tree/1.2.10" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-06-07T13:58:28+00:00" + }, + { + "name": "composer/composer", + "version": "2.1.5", + "source": { + "type": "git", + "url": "https://github.com/composer/composer.git", + "reference": "ac679902e9f66b85a8f9d8c1c88180f609a8745d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/composer/zipball/ac679902e9f66b85a8f9d8c1c88180f609a8745d", + "reference": "ac679902e9f66b85a8f9d8c1c88180f609a8745d", + "shasum": "" + }, + "require": { + "composer/ca-bundle": "^1.0", + "composer/metadata-minifier": "^1.0", + "composer/semver": "^3.0", + "composer/spdx-licenses": "^1.2", + "composer/xdebug-handler": "^2.0", + "justinrainbow/json-schema": "^5.2.11", + "php": "^5.3.2 || ^7.0 || ^8.0", + "psr/log": "^1.0", + "react/promise": "^1.2 || ^2.7", + "seld/jsonlint": "^1.4", + "seld/phar-utils": "^1.0", + "symfony/console": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", + "symfony/filesystem": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", + "symfony/finder": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", + "symfony/process": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0" + }, + "require-dev": { + "phpspec/prophecy": "^1.10", + "symfony/phpunit-bridge": "^4.2 || ^5.0 || ^6.0" + }, + "suggest": { + "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages", + "ext-zip": "Enabling the zip extension allows you to unzip archives", + "ext-zlib": "Allow gzip compression of HTTP requests" + }, + "bin": [ + "bin/composer" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\": "src/Composer" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "https://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "https://seld.be" + } + ], + "description": "Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.", + "homepage": "https://getcomposer.org/", + "keywords": [ + "autoload", + "dependency", + "package" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/composer/issues", + "source": "https://github.com/composer/composer/tree/2.1.5" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-07-23T08:35:47+00:00" + }, + { + "name": "composer/metadata-minifier", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/composer/metadata-minifier.git", + "reference": "c549d23829536f0d0e984aaabbf02af91f443207" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/metadata-minifier/zipball/c549d23829536f0d0e984aaabbf02af91f443207", + "reference": "c549d23829536f0d0e984aaabbf02af91f443207", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "composer/composer": "^2", + "phpstan/phpstan": "^0.12.55", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\MetadataMinifier\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Small utility library that handles metadata minification and expansion.", + "keywords": [ + "composer", + "compression" + ], + "support": { + "issues": "https://github.com/composer/metadata-minifier/issues", + "source": "https://github.com/composer/metadata-minifier/tree/1.0.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-04-07T13:37:33+00:00" + }, + { + "name": "composer/semver", + "version": "3.2.5", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/31f3ea725711245195f62e54ffa402d8ef2fdba9", + "reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.54", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Semver\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "Semver library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.2.5" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-05-24T12:41:47+00:00" + }, + { + "name": "composer/spdx-licenses", + "version": "1.5.5", + "source": { + "type": "git", + "url": "https://github.com/composer/spdx-licenses.git", + "reference": "de30328a7af8680efdc03e396aad24befd513200" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/de30328a7af8680efdc03e396aad24befd513200", + "reference": "de30328a7af8680efdc03e396aad24befd513200", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Spdx\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "SPDX licenses list and validation library.", + "keywords": [ + "license", + "spdx", + "validator" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/spdx-licenses/issues", + "source": "https://github.com/composer/spdx-licenses/tree/1.5.5" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2020-12-03T16:04:16+00:00" + }, + { + "name": "composer/xdebug-handler", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/84674dd3a7575ba617f5a76d7e9e29a7d3891339", + "reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0", + "psr/log": "^1 || ^2 || ^3" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.55", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Composer\\XdebugHandler\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" + } + ], + "description": "Restarts a process without Xdebug.", + "keywords": [ + "Xdebug", + "performance" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/2.0.2" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-07-31T17:03:58+00:00" + }, + { + "name": "doctrine/cache", + "version": "2.1.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/cache.git", + "reference": "331b4d5dbaeab3827976273e9356b3b453c300ce" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/cache/zipball/331b4d5dbaeab3827976273e9356b3b453c300ce", + "reference": "331b4d5dbaeab3827976273e9356b3b453c300ce", + "shasum": "" + }, + "require": { + "php": "~7.1 || ^8.0" + }, + "conflict": { + "doctrine/common": ">2.2,<2.4" + }, + "require-dev": { + "alcaeus/mongo-php-adapter": "^1.1", + "cache/integration-tests": "dev-master", + "doctrine/coding-standard": "^8.0", + "mongodb/mongodb": "^1.1", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", + "predis/predis": "~1.0", + "psr/cache": "^1.0 || ^2.0 || ^3.0", + "symfony/cache": "^4.4 || ^5.2 || ^6.0@dev", + "symfony/var-exporter": "^4.4 || ^5.2 || ^6.0@dev" + }, + "suggest": { + "alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Cache library is a popular cache implementation that supports many different drivers such as redis, memcache, apc, mongodb and others.", + "homepage": "https://www.doctrine-project.org/projects/cache.html", + "keywords": [ + "abstraction", + "apcu", + "cache", + "caching", + "couchdb", + "memcached", + "php", + "redis", + "xcache" + ], + "support": { + "issues": "https://github.com/doctrine/cache/issues", + "source": "https://github.com/doctrine/cache/tree/2.1.1" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcache", + "type": "tidelift" + } + ], + "time": "2021-07-17T14:49:29+00:00" + }, + { + "name": "doctrine/dbal", + "version": "2.13.2", + "source": { + "type": "git", + "url": "https://github.com/doctrine/dbal.git", + "reference": "8dd39d2ead4409ce652fd4f02621060f009ea5e4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/8dd39d2ead4409ce652fd4f02621060f009ea5e4", + "reference": "8dd39d2ead4409ce652fd4f02621060f009ea5e4", + "shasum": "" + }, + "require": { + "doctrine/cache": "^1.0|^2.0", + "doctrine/deprecations": "^0.5.3", + "doctrine/event-manager": "^1.0", + "ext-pdo": "*", + "php": "^7.1 || ^8" + }, + "require-dev": { + "doctrine/coding-standard": "9.0.0", + "jetbrains/phpstorm-stubs": "2020.2", + "phpstan/phpstan": "0.12.81", + "phpunit/phpunit": "^7.5.20|^8.5|9.5.5", + "squizlabs/php_codesniffer": "3.6.0", + "symfony/cache": "^4.4", + "symfony/console": "^2.0.5|^3.0|^4.0|^5.0", + "vimeo/psalm": "4.6.4" + }, + "suggest": { + "symfony/console": "For helpful console commands such as SQL execution and import of files." + }, + "bin": [ + "bin/doctrine-dbal" + ], + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\DBAL\\": "lib/Doctrine/DBAL" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + } + ], + "description": "Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.", + "homepage": "https://www.doctrine-project.org/projects/dbal.html", + "keywords": [ + "abstraction", + "database", + "db2", + "dbal", + "mariadb", + "mssql", + "mysql", + "oci8", + "oracle", + "pdo", + "pgsql", + "postgresql", + "queryobject", + "sasql", + "sql", + "sqlanywhere", + "sqlite", + "sqlserver", + "sqlsrv" + ], + "support": { + "issues": "https://github.com/doctrine/dbal/issues", + "source": "https://github.com/doctrine/dbal/tree/2.13.2" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fdbal", + "type": "tidelift" + } + ], + "time": "2021-06-18T21:48:39+00:00" + }, + { + "name": "doctrine/deprecations", + "version": "v0.5.3", + "source": { + "type": "git", + "url": "https://github.com/doctrine/deprecations.git", + "reference": "9504165960a1f83cc1480e2be1dd0a0478561314" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/9504165960a1f83cc1480e2be1dd0a0478561314", + "reference": "9504165960a1f83cc1480e2be1dd0a0478561314", + "shasum": "" + }, + "require": { + "php": "^7.1|^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0|^7.0|^8.0", + "phpunit/phpunit": "^7.0|^8.0|^9.0", + "psr/log": "^1.0" + }, + "suggest": { + "psr/log": "Allows logging deprecations via PSR-3 logger implementation" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", + "homepage": "https://www.doctrine-project.org/", + "support": { + "issues": "https://github.com/doctrine/deprecations/issues", + "source": "https://github.com/doctrine/deprecations/tree/v0.5.3" + }, + "time": "2021-03-21T12:59:47+00:00" + }, + { + "name": "doctrine/event-manager", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/event-manager.git", + "reference": "41370af6a30faa9dc0368c4a6814d596e81aba7f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/event-manager/zipball/41370af6a30faa9dc0368c4a6814d596e81aba7f", + "reference": "41370af6a30faa9dc0368c4a6814d596e81aba7f", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/common": "<2.9@dev" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0", + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\": "lib/Doctrine/Common" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.", + "homepage": "https://www.doctrine-project.org/projects/event-manager.html", + "keywords": [ + "event", + "event dispatcher", + "event manager", + "event system", + "events" + ], + "support": { + "issues": "https://github.com/doctrine/event-manager/issues", + "source": "https://github.com/doctrine/event-manager/tree/1.1.x" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fevent-manager", + "type": "tidelift" + } + ], + "time": "2020-05-29T18:28:51+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^8.0", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + }, + "type": "library", "autoload": { "psr-4": { "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" @@ -3116,7 +5107,7 @@ { "name": "Marco Pivetta", "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" + "homepage": "https://ocramius.github.io/" } ], "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", @@ -3125,32 +5116,51 @@ "constructor", "instantiate" ], - "time": "2019-03-17T17:37:11+00:00" + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.4.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2020-11-10T18:47:58+00:00" }, { "name": "facade/flare-client-php", - "version": "1.0.3", + "version": "1.8.1", "source": { "type": "git", "url": "https://github.com/facade/flare-client-php.git", - "reference": "a276603dbb7b9b35636d573d5709df5816dd4d2b" + "reference": "47b639dc02bcfdfc4ebb83de703856fa01e35f5f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/facade/flare-client-php/zipball/a276603dbb7b9b35636d573d5709df5816dd4d2b", - "reference": "a276603dbb7b9b35636d573d5709df5816dd4d2b", + "url": "https://api.github.com/repos/facade/flare-client-php/zipball/47b639dc02bcfdfc4ebb83de703856fa01e35f5f", + "reference": "47b639dc02bcfdfc4ebb83de703856fa01e35f5f", "shasum": "" }, "require": { "facade/ignition-contracts": "~1.0", - "illuminate/pipeline": "~5.5|~5.6|~5.7|~5.8|^6.0", - "php": "^7.1", - "symfony/http-foundation": "~3.3|~4.1", - "symfony/var-dumper": "^3.4|^4.0" + "illuminate/pipeline": "^5.5|^6.0|^7.0|^8.0", + "php": "^7.1|^8.0", + "symfony/http-foundation": "^3.3|^4.1|^5.0", + "symfony/mime": "^3.4|^4.0|^5.1", + "symfony/var-dumper": "^3.4|^4.0|^5.0" }, "require-dev": { - "larapack/dd": "^1.1", - "phpunit/phpunit": "^7.0", + "friendsofphp/php-cs-fixer": "^2.14", + "phpunit/phpunit": "^7.5.16", "spatie/phpunit-snapshot-assertions": "^2.0" }, "type": "library", @@ -3179,38 +5189,47 @@ "flare", "reporting" ], - "time": "2019-09-05T20:24:51+00:00" + "support": { + "issues": "https://github.com/facade/flare-client-php/issues", + "source": "https://github.com/facade/flare-client-php/tree/1.8.1" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2021-05-31T19:23:29+00:00" }, { "name": "facade/ignition", - "version": "1.4.17", + "version": "1.18.0", "source": { "type": "git", "url": "https://github.com/facade/ignition.git", - "reference": "52cf237a9ec53062e344a53d50428ca2f989035a" + "reference": "fca0cbe5f900f94773d821b481c16d4ea3503491" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/facade/ignition/zipball/52cf237a9ec53062e344a53d50428ca2f989035a", - "reference": "52cf237a9ec53062e344a53d50428ca2f989035a", + "url": "https://api.github.com/repos/facade/ignition/zipball/fca0cbe5f900f94773d821b481c16d4ea3503491", + "reference": "fca0cbe5f900f94773d821b481c16d4ea3503491", "shasum": "" }, "require": { "ext-json": "*", "ext-mbstring": "*", - "facade/flare-client-php": "^1.0", + "facade/flare-client-php": "^1.3", "facade/ignition-contracts": "^1.0", "filp/whoops": "^2.4", "illuminate/support": "~5.5.0 || ~5.6.0 || ~5.7.0 || ~5.8.0 || ^6.0", "monolog/monolog": "^1.12 || ^2.0", - "php": "^7.1", + "php": "^7.1|^8.0", "scrivo/highlight.php": "^9.15", "symfony/console": "^3.4 || ^4.0", "symfony/var-dumper": "^3.4 || ^4.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.14", - "mockery/mockery": "^1.2", + "mockery/mockery": "~1.3.3|^1.4.2", "orchestra/testbench": "^3.5 || ^3.6 || ^3.7 || ^3.8 || ^4.0" }, "suggest": { @@ -3219,7 +5238,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "1.x-dev" }, "laravel": { "providers": [ @@ -3233,7 +5252,10 @@ "autoload": { "psr-4": { "Facade\\Ignition\\": "src" - } + }, + "files": [ + "src/helpers.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3247,24 +5269,35 @@ "laravel", "page" ], - "time": "2019-09-06T09:15:50+00:00" + "support": { + "docs": "https://flareapp.io/docs/ignition-for-laravel/introduction", + "forum": "https://twitter.com/flareappio", + "issues": "https://github.com/facade/ignition/issues", + "source": "https://github.com/facade/ignition" + }, + "time": "2021-08-02T07:45:03+00:00" }, { "name": "facade/ignition-contracts", - "version": "1.0.0", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/facade/ignition-contracts.git", - "reference": "f445db0fb86f48e205787b2592840dd9c80ded28" + "reference": "3c921a1cdba35b68a7f0ccffc6dffc1995b18267" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/facade/ignition-contracts/zipball/f445db0fb86f48e205787b2592840dd9c80ded28", - "reference": "f445db0fb86f48e205787b2592840dd9c80ded28", + "url": "https://api.github.com/repos/facade/ignition-contracts/zipball/3c921a1cdba35b68a7f0ccffc6dffc1995b18267", + "reference": "3c921a1cdba35b68a7f0ccffc6dffc1995b18267", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.3|^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^v2.15.8", + "phpunit/phpunit": "^9.3.11", + "vimeo/psalm": "^3.17.1" }, "type": "library", "autoload": { @@ -3291,30 +5324,34 @@ "flare", "ignition" ], - "time": "2019-08-30T14:06:08+00:00" + "support": { + "issues": "https://github.com/facade/ignition-contracts/issues", + "source": "https://github.com/facade/ignition-contracts/tree/1.0.2" + }, + "time": "2020-10-16T08:27:54+00:00" }, { "name": "filp/whoops", - "version": "2.5.0", + "version": "2.14.0", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "cde50e6720a39fdacb240159d3eea6865d51fd96" + "reference": "fdf92f03e150ed84d5967a833ae93abffac0315b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/cde50e6720a39fdacb240159d3eea6865d51fd96", - "reference": "cde50e6720a39fdacb240159d3eea6865d51fd96", + "url": "https://api.github.com/repos/filp/whoops/zipball/fdf92f03e150ed84d5967a833ae93abffac0315b", + "reference": "fdf92f03e150ed84d5967a833ae93abffac0315b", "shasum": "" }, "require": { - "php": "^5.5.9 || ^7.0", + "php": "^5.5.9 || ^7.0 || ^8.0", "psr/log": "^1.0.1" }, "require-dev": { "mockery/mockery": "^0.9 || ^1.0", - "phpunit/phpunit": "^4.8.35 || ^5.7", - "symfony/var-dumper": "^2.6 || ^3.0 || ^4.0" + "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.3", + "symfony/var-dumper": "^2.6 || ^3.0 || ^4.0 || ^5.0" }, "suggest": { "symfony/var-dumper": "Pretty print complex values better with var-dumper available", @@ -3323,7 +5360,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2-dev" + "dev-master": "2.7-dev" } }, "autoload": { @@ -3338,8 +5375,8 @@ "authors": [ { "name": "Filipe Dobreira", - "role": "Developer", - "homepage": "https://github.com/filp" + "homepage": "https://github.com/filp", + "role": "Developer" } ], "description": "php error handling for cool kids", @@ -3352,20 +5389,30 @@ "throwable", "whoops" ], - "time": "2019-08-07T09:00:00+00:00" + "support": { + "issues": "https://github.com/filp/whoops/issues", + "source": "https://github.com/filp/whoops/tree/2.14.0" + }, + "funding": [ + { + "url": "https://github.com/denis-sokolov", + "type": "github" + } + ], + "time": "2021-07-13T12:00:00+00:00" }, { "name": "fzaninotto/faker", - "version": "v1.8.0", + "version": "v1.9.2", "source": { "type": "git", "url": "https://github.com/fzaninotto/Faker.git", - "reference": "f72816b43e74063c8b10357394b6bba8cb1c10de" + "reference": "848d8125239d7dbf8ab25cb7f054f1a630e68c2e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/f72816b43e74063c8b10357394b6bba8cb1c10de", - "reference": "f72816b43e74063c8b10357394b6bba8cb1c10de", + "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/848d8125239d7dbf8ab25cb7f054f1a630e68c2e", + "reference": "848d8125239d7dbf8ab25cb7f054f1a630e68c2e", "shasum": "" }, "require": { @@ -3374,12 +5421,12 @@ "require-dev": { "ext-intl": "*", "phpunit/phpunit": "^4.8.35 || ^5.7", - "squizlabs/php_codesniffer": "^1.5" + "squizlabs/php_codesniffer": "^2.9.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8-dev" + "dev-master": "1.9-dev" } }, "autoload": { @@ -3402,24 +5449,29 @@ "faker", "fixtures" ], - "time": "2018-07-12T10:23:15+00:00" + "support": { + "issues": "https://github.com/fzaninotto/Faker/issues", + "source": "https://github.com/fzaninotto/Faker/tree/v1.9.2" + }, + "abandoned": true, + "time": "2020-12-11T09:56:16+00:00" }, { "name": "hamcrest/hamcrest-php", - "version": "v2.0.0", + "version": "v2.0.1", "source": { "type": "git", "url": "https://github.com/hamcrest/hamcrest-php.git", - "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad" + "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/776503d3a8e85d4f9a1148614f95b7a608b046ad", - "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad", + "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", + "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", "shasum": "" }, "require": { - "php": "^5.3|^7.0" + "php": "^5.3|^7.0|^8.0" }, "replace": { "cordoval/hamcrest-php": "*", @@ -3427,14 +5479,13 @@ "kodova/hamcrest-php": "*" }, "require-dev": { - "phpunit/php-file-iterator": "1.3.3", - "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "^1.0" + "phpunit/php-file-iterator": "^1.4 || ^2.0", + "phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "2.1-dev" } }, "autoload": { @@ -3444,40 +5495,117 @@ }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD" + "BSD-3-Clause" ], "description": "This is the PHP port of Hamcrest Matchers", "keywords": [ "test" ], - "time": "2016-01-20T08:20:44+00:00" + "support": { + "issues": "https://github.com/hamcrest/hamcrest-php/issues", + "source": "https://github.com/hamcrest/hamcrest-php/tree/v2.0.1" + }, + "time": "2020-07-09T08:09:16+00:00" + }, + { + "name": "justinrainbow/json-schema", + "version": "5.2.11", + "source": { + "type": "git", + "url": "https://github.com/justinrainbow/json-schema.git", + "reference": "2ab6744b7296ded80f8cc4f9509abbff393399aa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/2ab6744b7296ded80f8cc4f9509abbff393399aa", + "reference": "2ab6744b7296ded80f8cc4f9509abbff393399aa", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "~2.2.20||~2.15.1", + "json-schema/json-schema-test-suite": "1.2.0", + "phpunit/phpunit": "^4.8.35" + }, + "bin": [ + "bin/validate-json" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "JsonSchema\\": "src/JsonSchema/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bruno Prieto Reis", + "email": "bruno.p.reis@gmail.com" + }, + { + "name": "Justin Rainbow", + "email": "justin.rainbow@gmail.com" + }, + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + }, + { + "name": "Robert Schönthal", + "email": "seroscho@googlemail.com" + } + ], + "description": "A library to validate a json schema.", + "homepage": "https://github.com/justinrainbow/json-schema", + "keywords": [ + "json", + "schema" + ], + "support": { + "issues": "https://github.com/justinrainbow/json-schema/issues", + "source": "https://github.com/justinrainbow/json-schema/tree/5.2.11" + }, + "time": "2021-07-22T09:24:00+00:00" }, { "name": "mockery/mockery", - "version": "1.2.3", + "version": "1.4.3", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "4eff936d83eb809bde2c57a3cea0ee9643769031" + "reference": "d1339f64479af1bee0e82a0413813fe5345a54ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/4eff936d83eb809bde2c57a3cea0ee9643769031", - "reference": "4eff936d83eb809bde2c57a3cea0ee9643769031", + "url": "https://api.github.com/repos/mockery/mockery/zipball/d1339f64479af1bee0e82a0413813fe5345a54ea", + "reference": "d1339f64479af1bee0e82a0413813fe5345a54ea", "shasum": "" }, "require": { - "hamcrest/hamcrest-php": "~2.0", + "hamcrest/hamcrest-php": "^2.0.1", "lib-pcre": ">=7.0", - "php": ">=5.6.0" + "php": "^7.3 || ^8.0" + }, + "conflict": { + "phpunit/phpunit": "<8.0" }, "require-dev": { - "phpunit/phpunit": "~5.7.10|~6.5|~7.0|~8.0" + "phpunit/phpunit": "^8.5 || ^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.4.x-dev" } }, "autoload": { @@ -3515,24 +5643,28 @@ "test double", "testing" ], - "time": "2019-08-07T15:01:07+00:00" + "support": { + "issues": "https://github.com/mockery/mockery/issues", + "source": "https://github.com/mockery/mockery/tree/1.4.3" + }, + "time": "2021-02-24T09:51:49+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.9.3", + "version": "1.10.2", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea" + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/007c053ae6f31bba39dfa19a7726f56e9763bbea", - "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.1 || ^8.0" }, "replace": { "myclabs/deep-copy": "self.version" @@ -3563,33 +5695,41 @@ "object", "object graph" ], - "time": "2019-08-09T12:45:53+00:00" + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2020-11-13T09:40:50+00:00" }, { "name": "nunomaduro/collision", - "version": "v3.0.1", + "version": "v3.2.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "af42d339fe2742295a54f6fdd42aaa6f8c4aca68" + "reference": "f7c45764dfe4ba5f2618d265a6f1f9c72732e01d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/af42d339fe2742295a54f6fdd42aaa6f8c4aca68", - "reference": "af42d339fe2742295a54f6fdd42aaa6f8c4aca68", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/f7c45764dfe4ba5f2618d265a6f1f9c72732e01d", + "reference": "f7c45764dfe4ba5f2618d265a6f1f9c72732e01d", "shasum": "" }, "require": { "filp/whoops": "^2.1.4", - "jakub-onderka/php-console-highlighter": "0.3.*|0.4.*", - "php": "^7.1", + "php": "^7.2.5 || ^8.0", + "php-parallel-lint/php-console-highlighter": "0.5.*", "symfony/console": "~2.8|~3.3|~4.0" }, "require-dev": { - "laravel/framework": "5.8.*", - "nunomaduro/larastan": "^0.3.0", - "phpstan/phpstan": "^0.11", - "phpunit/phpunit": "~8.0" + "laravel/framework": "^6.0", + "phpunit/phpunit": "^8.0 || ^9.0" }, "type": "library", "extra": { @@ -3627,32 +5767,51 @@ "php", "symfony" ], - "time": "2019-03-07T21:35:13+00:00" + "support": { + "issues": "https://github.com/nunomaduro/collision/issues", + "source": "https://github.com/nunomaduro/collision" + }, + "funding": [ + { + "url": "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=66BYDWAT92N6L", + "type": "custom" + }, + { + "url": "https://github.com/nunomaduro", + "type": "github" + }, + { + "url": "https://www.patreon.com/nunomaduro", + "type": "patreon" + } + ], + "time": "2021-02-11T09:01:42+00:00" }, { "name": "phar-io/manifest", - "version": "1.0.3", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4" + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", - "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", "shasum": "" }, "require": { "ext-dom": "*", "ext-phar": "*", - "phar-io/version": "^2.0", - "php": "^5.6 || ^7.0" + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -3667,39 +5826,43 @@ "authors": [ { "name": "Arne Blankerts", - "role": "Developer", - "email": "arne@blankerts.de" + "email": "arne@blankerts.de", + "role": "Developer" }, { "name": "Sebastian Heuer", - "role": "Developer", - "email": "sebastian@phpeople.de" + "email": "sebastian@phpeople.de", + "role": "Developer" }, { "name": "Sebastian Bergmann", - "role": "Developer", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "Developer" } ], "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "time": "2018-07-08T19:23:20+00:00" + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.3" + }, + "time": "2021-07-20T11:28:43+00:00" }, { "name": "phar-io/version", - "version": "2.0.1", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6" + "reference": "bae7c545bef187884426f042434e561ab1ddb182" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6", - "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6", + "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", + "reference": "bae7c545bef187884426f042434e561ab1ddb182", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": "^7.2 || ^8.0" }, "type": "library", "autoload": { @@ -3729,39 +5892,38 @@ } ], "description": "Library for handling version information and constraints", - "time": "2018-07-08T19:19:57+00:00" + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.1.0" + }, + "time": "2021-02-23T14:00:09+00:00" }, { "name": "phpdocumentor/reflection-common", - "version": "1.0.1", + "version": "2.2.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", "shasum": "" }, "require": { - "php": ">=5.5" - }, - "require-dev": { - "phpunit/phpunit": "^4.6" + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-2.x": "2.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src" - ] + "phpDocumentor\\Reflection\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -3783,44 +5945,45 @@ "reflection", "static analysis" ], - "time": "2017-09-11T18:02:19+00:00" + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, + "time": "2020-06-27T09:03:43+00:00" }, { "name": "phpdocumentor/reflection-docblock", - "version": "4.3.1", + "version": "5.2.2", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c" + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c", - "reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", "shasum": "" }, "require": { - "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0.0", - "phpdocumentor/type-resolver": "^0.4.0", - "webmozart/assert": "^1.0" + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" }, "require-dev": { - "doctrine/instantiator": "~1.0.5", - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^6.4" + "mockery/mockery": "~1.3.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.x-dev" + "dev-master": "5.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] + "phpDocumentor\\Reflection\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -3831,44 +5994,49 @@ { "name": "Mike van Riel", "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2019-04-30T17:48:53+00:00" + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" + }, + "time": "2020-09-03T19:13:55+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "0.4.0", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", - "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", "shasum": "" }, "require": { - "php": "^5.5 || ^7.0", - "phpdocumentor/reflection-common": "^1.0" + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^5.2||^4.8.24" + "ext-tokenizer": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-1.x": "1.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] + "phpDocumentor\\Reflection\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -3881,37 +6049,42 @@ "email": "me@mikevanriel.com" } ], - "time": "2017-07-14T14:27:02+00:00" + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0" + }, + "time": "2020-09-17T18:55:26+00:00" }, { "name": "phpspec/prophecy", - "version": "1.8.1", + "version": "1.13.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76" + "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/1927e75f4ed19131ec9bcc3b002e07fb1173ee76", - "reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be1996ed8adc35c3fd795488a653f4b518be70ea", + "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", - "sebastian/comparator": "^1.1|^2.0|^3.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0" + "doctrine/instantiator": "^1.2", + "php": "^7.2 || ~8.0, <8.1", + "phpdocumentor/reflection-docblock": "^5.2", + "sebastian/comparator": "^3.0 || ^4.0", + "sebastian/recursion-context": "^3.0 || ^4.0" }, "require-dev": { - "phpspec/phpspec": "^2.5|^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" + "phpspec/phpspec": "^6.0", + "phpunit/phpunit": "^8.0 || ^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8.x-dev" + "dev-master": "1.11.x-dev" } }, "autoload": { @@ -3944,29 +6117,33 @@ "spy", "stub" ], - "time": "2019-06-13T12:50:23+00:00" + "support": { + "issues": "https://github.com/phpspec/prophecy/issues", + "source": "https://github.com/phpspec/prophecy/tree/1.13.0" + }, + "time": "2021-03-17T13:42:18+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "7.0.7", + "version": "7.0.15", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "7743bbcfff2a907e9ee4a25be13d0f8ec5e73800" + "reference": "819f92bba8b001d4363065928088de22f25a3a48" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/7743bbcfff2a907e9ee4a25be13d0f8ec5e73800", - "reference": "7743bbcfff2a907e9ee4a25be13d0f8ec5e73800", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/819f92bba8b001d4363065928088de22f25a3a48", + "reference": "819f92bba8b001d4363065928088de22f25a3a48", "shasum": "" }, "require": { "ext-dom": "*", "ext-xmlwriter": "*", - "php": "^7.2", + "php": ">=7.2", "phpunit/php-file-iterator": "^2.0.2", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.1.0", + "phpunit/php-token-stream": "^3.1.3 || ^4.0", "sebastian/code-unit-reverse-lookup": "^1.0.1", "sebastian/environment": "^4.2.2", "sebastian/version": "^2.0.1", @@ -4007,27 +6184,37 @@ "testing", "xunit" ], - "time": "2019-07-25T05:31:54+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/7.0.15" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-07-26T12:20:09+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "2.0.2", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "050bedf145a257b1ff02746c31894800e5122946" + "reference": "28af674ff175d0768a5a978e6de83f697d4a7f05" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/050bedf145a257b1ff02746c31894800e5122946", - "reference": "050bedf145a257b1ff02746c31894800e5122946", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/28af674ff175d0768a5a978e6de83f697d4a7f05", + "reference": "28af674ff175d0768a5a978e6de83f697d4a7f05", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "^7.1" + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { @@ -4057,7 +6244,17 @@ "filesystem", "iterator" ], - "time": "2018-09-13T20:33:42+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-07-19T06:46:01+00:00" }, { "name": "phpunit/php-text-template", @@ -4098,27 +6295,31 @@ "keywords": [ "template" ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1" + }, "time": "2015-06-21T13:50:34+00:00" }, { "name": "phpunit/php-timer", - "version": "2.1.2", + "version": "2.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "1038454804406b0b5f5f520358e78c1c2f71501e" + "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/1038454804406b0b5f5f520358e78c1c2f71501e", - "reference": "1038454804406b0b5f5f520358e78c1c2f71501e", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/2454ae1765516d20c4ffe103d85a58a9a3bd5662", + "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { @@ -4147,33 +6348,43 @@ "keywords": [ "timer" ], - "time": "2019-06-07T04:22:29+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/2.1.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T08:20:02+00:00" }, { "name": "phpunit/php-token-stream", - "version": "3.1.0", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "e899757bb3df5ff6e95089132f32cd59aac2220a" + "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/e899757bb3df5ff6e95089132f32cd59aac2220a", - "reference": "e899757bb3df5ff6e95089132f32cd59aac2220a", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/a853a0e183b9db7eed023d7933a858fa1c8d25a3", + "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": "^7.1" + "php": "^7.3 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -4196,43 +6407,54 @@ "keywords": [ "tokenizer" ], - "time": "2019-07-25T05:29:42+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/php-token-stream/issues", + "source": "https://github.com/sebastianbergmann/php-token-stream/tree/master" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "abandoned": true, + "time": "2020-08-04T08:28:15+00:00" }, { "name": "phpunit/phpunit", - "version": "8.3.4", + "version": "8.5.19", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "e31cce0cf4499c0ccdbbb211a3280d36ab341e36" + "reference": "496281b64ec781856ed0a583483b5923b4033722" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e31cce0cf4499c0ccdbbb211a3280d36ab341e36", - "reference": "e31cce0cf4499c0ccdbbb211a3280d36ab341e36", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/496281b64ec781856ed0a583483b5923b4033722", + "reference": "496281b64ec781856ed0a583483b5923b4033722", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.2.0", + "doctrine/instantiator": "^1.3.1", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.9.1", - "phar-io/manifest": "^1.0.3", - "phar-io/version": "^2.0.1", - "php": "^7.2", - "phpspec/prophecy": "^1.8.1", - "phpunit/php-code-coverage": "^7.0.7", - "phpunit/php-file-iterator": "^2.0.2", + "myclabs/deep-copy": "^1.10.0", + "phar-io/manifest": "^2.0.3", + "phar-io/version": "^3.0.2", + "php": ">=7.2", + "phpspec/prophecy": "^1.10.3", + "phpunit/php-code-coverage": "^7.0.12", + "phpunit/php-file-iterator": "^2.0.4", "phpunit/php-text-template": "^1.2.1", "phpunit/php-timer": "^2.1.2", "sebastian/comparator": "^3.0.2", "sebastian/diff": "^3.0.2", - "sebastian/environment": "^4.2.2", - "sebastian/exporter": "^3.1.0", + "sebastian/environment": "^4.2.3", + "sebastian/exporter": "^3.1.2", "sebastian/global-state": "^3.0.0", "sebastian/object-enumerator": "^3.0.3", "sebastian/resource-operations": "^2.0.1", @@ -4253,7 +6475,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "8.3-dev" + "dev-master": "8.5-dev" } }, "autoload": { @@ -4279,20 +6501,84 @@ "testing", "xunit" ], - "time": "2019-08-11T06:56:55+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.19" + }, + "funding": [ + { + "url": "https://phpunit.de/donate.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-07-31T15:15:06+00:00" + }, + { + "name": "react/promise", + "version": "v2.8.0", + "source": { + "type": "git", + "url": "https://github.com/reactphp/promise.git", + "reference": "f3cff96a19736714524ca0dd1d4130de73dbbbc4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/reactphp/promise/zipball/f3cff96a19736714524ca0dd1d4130de73dbbbc4", + "reference": "f3cff96a19736714524ca0dd1d4130de73dbbbc4", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^7.0 || ^6.5 || ^5.7 || ^4.8.36" + }, + "type": "library", + "autoload": { + "psr-4": { + "React\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jan Sorgalla", + "email": "jsorgalla@gmail.com" + } + ], + "description": "A lightweight implementation of CommonJS Promises/A for PHP", + "keywords": [ + "promise", + "promises" + ], + "support": { + "issues": "https://github.com/reactphp/promise/issues", + "source": "https://github.com/reactphp/promise/tree/v2.8.0" + }, + "time": "2020-05-12T15:16:56+00:00" }, { "name": "scrivo/highlight.php", - "version": "v9.15.10.0", + "version": "v9.18.1.7", "source": { "type": "git", "url": "https://github.com/scrivo/highlight.php.git", - "reference": "9ad3adb4456dc91196327498dbbce6aa1ba1239e" + "reference": "05996fcc61e97978d76ca7d1ac14b65e7cd26f91" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/scrivo/highlight.php/zipball/9ad3adb4456dc91196327498dbbce6aa1ba1239e", - "reference": "9ad3adb4456dc91196327498dbbce6aa1ba1239e", + "url": "https://api.github.com/repos/scrivo/highlight.php/zipball/05996fcc61e97978d76ca7d1ac14b65e7cd26f91", + "reference": "05996fcc61e97978d76ca7d1ac14b65e7cd26f91", "shasum": "" }, "require": { @@ -4302,10 +6588,9 @@ }, "require-dev": { "phpunit/phpunit": "^4.8|^5.7", - "symfony/finder": "^2.8" - }, - "suggest": { - "ext-dom": "Needed to make use of the features in the utilities namespace" + "sabberworm/php-css-parser": "^8.3", + "symfony/finder": "^2.8|^3.4", + "symfony/var-dumper": "^2.8|^3.4" }, "type": "library", "autoload": { @@ -4324,18 +6609,18 @@ "authors": [ { "name": "Geert Bergman", - "role": "Project Author", - "homepage": "http://www.scrivo.org/" + "homepage": "http://www.scrivo.org/", + "role": "Project Author" }, { "name": "Vladimir Jimenez", - "role": "Contributor", - "homepage": "https://allejo.io" + "homepage": "https://allejo.io", + "role": "Maintainer" }, { "name": "Martin Folkers", - "role": "Contributor", - "homepage": "https://twobrain.io" + "homepage": "https://twobrain.io", + "role": "Contributor" } ], "description": "Server side syntax highlighter that supports 185 languages. It's a PHP port of highlight.js", @@ -4346,27 +6631,37 @@ "highlight.php", "syntax" ], - "time": "2019-08-27T04:27:48+00:00" + "support": { + "issues": "https://github.com/scrivo/highlight.php/issues", + "source": "https://github.com/scrivo/highlight.php" + }, + "funding": [ + { + "url": "https://github.com/allejo", + "type": "github" + } + ], + "time": "2021-07-09T00:30:39+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" + "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", - "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/1de8cd5c010cb153fcd68b8d0f64606f523f7619", + "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": ">=5.6" }, "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.0" + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { @@ -4391,29 +6686,39 @@ ], "description": "Looks up which function or method a line of code belongs to", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "time": "2017-03-04T06:30:41+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/1.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T08:15:22+00:00" }, { "name": "sebastian/comparator", - "version": "3.0.2", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da" + "reference": "1071dfcef776a57013124ff35e1fc41ccd294758" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/5de4fc177adf9bce8df98d8d141a7559d7ccf6da", - "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1071dfcef776a57013124ff35e1fc41ccd294758", + "reference": "1071dfcef776a57013124ff35e1fc41ccd294758", "shasum": "" }, "require": { - "php": "^7.1", + "php": ">=7.1", "sebastian/diff": "^3.0", "sebastian/exporter": "^3.1" }, "require-dev": { - "phpunit/phpunit": "^7.1" + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { @@ -4431,6 +6736,10 @@ "BSD-3-Clause" ], "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, { "name": "Jeff Welch", "email": "whatthejeff@gmail.com" @@ -4442,10 +6751,6 @@ { "name": "Bernhard Schussek", "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" } ], "description": "Provides the functionality to compare PHP values for equality", @@ -4455,24 +6760,34 @@ "compare", "equality" ], - "time": "2018-07-12T15:12:46+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T08:04:30+00:00" }, { "name": "sebastian/diff", - "version": "3.0.2", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29" + "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/720fcc7e9b5cf384ea68d9d930d480907a0c1a29", - "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/14f72dd46eaf2f2293cbe79c93cc0bc43161a211", + "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=7.1" }, "require-dev": { "phpunit/phpunit": "^7.5 || ^8.0", @@ -4494,13 +6809,13 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" } ], "description": "Diff implementation", @@ -4511,24 +6826,34 @@ "unidiff", "unified diff" ], - "time": "2019-02-04T06:01:07+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:59:04+00:00" }, { "name": "sebastian/environment", - "version": "4.2.2", + "version": "4.2.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "f2a2c8e1c97c11ace607a7a667d73d47c19fe404" + "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/f2a2c8e1c97c11ace607a7a667d73d47c19fe404", - "reference": "f2a2c8e1c97c11ace607a7a667d73d47c19fe404", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", + "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=7.1" }, "require-dev": { "phpunit/phpunit": "^7.5" @@ -4564,24 +6889,34 @@ "environment", "hhvm" ], - "time": "2019-05-05T09:05:15+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/4.2.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:53:42+00:00" }, { "name": "sebastian/exporter", - "version": "3.1.1", + "version": "3.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "06a9a5947f47b3029d76118eb5c22802e5869687" + "reference": "6b853149eab67d4da22291d36f5b0631c0fd856e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/06a9a5947f47b3029d76118eb5c22802e5869687", - "reference": "06a9a5947f47b3029d76118eb5c22802e5869687", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/6b853149eab67d4da22291d36f5b0631c0fd856e", + "reference": "6b853149eab67d4da22291d36f5b0631c0fd856e", "shasum": "" }, "require": { - "php": "^7.0", + "php": ">=7.0", "sebastian/recursion-context": "^3.0" }, "require-dev": { @@ -4631,24 +6966,34 @@ "export", "exporter" ], - "time": "2019-08-11T12:43:14+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:47:53+00:00" }, { "name": "sebastian/global-state", - "version": "3.0.0", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4" + "reference": "474fb9edb7ab891665d3bfc6317f42a0a150454b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4", - "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/474fb9edb7ab891665d3bfc6317f42a0a150454b", + "reference": "474fb9edb7ab891665d3bfc6317f42a0a150454b", "shasum": "" }, "require": { - "php": "^7.2", + "php": ">=7.2", "sebastian/object-reflector": "^1.1.1", "sebastian/recursion-context": "^3.0" }, @@ -4685,24 +7030,34 @@ "keywords": [ "global state" ], - "time": "2019-02-01T05:30:01+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/3.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:43:24+00:00" }, { "name": "sebastian/object-enumerator", - "version": "3.0.3", + "version": "3.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" + "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", + "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", "shasum": "" }, "require": { - "php": "^7.0", + "php": ">=7.0", "sebastian/object-reflector": "^1.1.1", "sebastian/recursion-context": "^3.0" }, @@ -4732,24 +7087,34 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2017-08-03T12:35:26+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/3.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:40:27+00:00" }, { "name": "sebastian/object-reflector", - "version": "1.1.1", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "773f97c67f28de00d397be301821b06708fca0be" + "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", - "reference": "773f97c67f28de00d397be301821b06708fca0be", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", + "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", "shasum": "" }, "require": { - "php": "^7.0" + "php": ">=7.0" }, "require-dev": { "phpunit/phpunit": "^6.0" @@ -4777,24 +7142,34 @@ ], "description": "Allows reflection of object attributes, including inherited and non-public ones", "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "time": "2017-03-29T09:07:27+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/1.1.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:37:18+00:00" }, { "name": "sebastian/recursion-context", - "version": "3.0.0", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" + "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/367dcba38d6e1977be014dc4b22f47a484dac7fb", + "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb", "shasum": "" }, "require": { - "php": "^7.0" + "php": ">=7.0" }, "require-dev": { "phpunit/phpunit": "^6.0" @@ -4815,14 +7190,14 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, { "name": "Adam Harvey", "email": "aharvey@php.net" @@ -4830,24 +7205,34 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2017-03-03T06:23:57+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/3.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:34:24+00:00" }, { "name": "sebastian/resource-operations", - "version": "2.0.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9" + "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/4d7a795d35b889bf80a0cc04e08d77cedfa917a9", - "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/31d35ca87926450c44eae7e2611d45a7a65ea8b3", + "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=7.1" }, "type": "library", "extra": { @@ -4872,24 +7257,34 @@ ], "description": "Provides a list of PHP built-in functions that operate on resources", "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2018-10-04T04:07:39+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/2.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:30:19+00:00" }, { "name": "sebastian/type", - "version": "1.1.3", + "version": "1.1.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3" + "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/3aaaa15fa71d27650d62a948be022fe3b48541a3", - "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/0150cfbc4495ed2df3872fb31b26781e4e077eb4", + "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4", "shasum": "" }, "require": { - "php": "^7.2" + "php": ">=7.2" }, "require-dev": { "phpunit/phpunit": "^8.2" @@ -4918,7 +7313,17 @@ ], "description": "Collection of value objects that represent the types of the PHP type system", "homepage": "https://github.com/sebastianbergmann/type", - "time": "2019-07-02T08:10:15+00:00" + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/1.1.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:25:11+00:00" }, { "name": "sebastian/version", @@ -4961,27 +7366,205 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/master" + }, "time": "2016-10-03T07:35:21+00:00" }, + { + "name": "seld/jsonlint", + "version": "1.8.3", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/jsonlint.git", + "reference": "9ad6ce79c342fbd44df10ea95511a1b24dee5b57" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/9ad6ce79c342fbd44df10ea95511a1b24dee5b57", + "reference": "9ad6ce79c342fbd44df10ea95511a1b24dee5b57", + "shasum": "" + }, + "require": { + "php": "^5.3 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + }, + "bin": [ + "bin/jsonlint" + ], + "type": "library", + "autoload": { + "psr-4": { + "Seld\\JsonLint\\": "src/Seld/JsonLint/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "JSON Linter", + "keywords": [ + "json", + "linter", + "parser", + "validator" + ], + "support": { + "issues": "https://github.com/Seldaek/jsonlint/issues", + "source": "https://github.com/Seldaek/jsonlint/tree/1.8.3" + }, + "funding": [ + { + "url": "https://github.com/Seldaek", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/seld/jsonlint", + "type": "tidelift" + } + ], + "time": "2020-11-11T09:19:24+00:00" + }, + { + "name": "seld/phar-utils", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/phar-utils.git", + "reference": "8674b1d84ffb47cc59a101f5d5a3b61e87d23796" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/8674b1d84ffb47cc59a101f5d5a3b61e87d23796", + "reference": "8674b1d84ffb47cc59a101f5d5a3b61e87d23796", + "shasum": "" + }, + "require": { + "php": ">=5.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Seld\\PharUtils\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be" + } + ], + "description": "PHAR file format utilities, for when PHP phars you up", + "keywords": [ + "phar" + ], + "support": { + "issues": "https://github.com/Seldaek/phar-utils/issues", + "source": "https://github.com/Seldaek/phar-utils/tree/master" + }, + "time": "2020-07-07T18:42:57+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v5.3.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "343f4fe324383ca46792cae728a3b6e2f708fb32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/343f4fe324383ca46792cae728a3b6e2f708fb32", + "reference": "343f4fe324383ca46792cae728a3b6e2f708fb32", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-php80": "^1.16" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v5.3.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-07-21T12:40:44+00:00" + }, { "name": "theseer/tokenizer", - "version": "1.1.3", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9" + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/11336f6f84e16a720dae9d8e6ed5019efa85a0f9", - "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", "shasum": "" }, "require": { "ext-dom": "*", "ext-tokenizer": "*", "ext-xmlwriter": "*", - "php": "^7.0" + "php": "^7.2 || ^8.0" }, "type": "library", "autoload": { @@ -4996,38 +7579,52 @@ "authors": [ { "name": "Arne Blankerts", - "role": "Developer", - "email": "arne@blankerts.de" + "email": "arne@blankerts.de", + "role": "Developer" } ], "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "time": "2019-06-13T22:48:21+00:00" + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2021-07-28T10:34:58+00:00" }, { "name": "webmozart/assert", - "version": "1.5.0", + "version": "1.10.0", "source": { "type": "git", - "url": "https://github.com/webmozart/assert.git", - "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4" + "url": "https://github.com/webmozarts/assert.git", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/88e6d84706d09a236046d686bbea96f07b3a34f4", - "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0", + "php": "^7.2 || ^8.0", "symfony/polyfill-ctype": "^1.8" }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" + }, "require-dev": { - "phpunit/phpunit": "^4.8.36 || ^7.5.13" + "phpunit/phpunit": "^8.5.13" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.10-dev" } }, "autoload": { @@ -5051,7 +7648,11 @@ "check", "validate" ], - "time": "2019-08-24T08:43:50+00:00" + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.10.0" + }, + "time": "2021-03-09T10:59:23+00:00" } ], "aliases": [], @@ -5063,5 +7664,5 @@ "php": "^7.2" }, "platform-dev": [], - "plugin-api-version": "2.0.0" + "plugin-api-version": "2.1.0" } From 7a726e9d40e1dd6d57e5e709c5c1c11ed4111e9d Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Tue, 17 Aug 2021 20:52:47 +0000 Subject: [PATCH 02/61] criando model category --- app/Http/Controllers/CategoryController.php | 85 +++++++++++++++++++ app/Models/Category.php | 10 +++ database/factories/CategoryFactory.php | 13 +++ ...1_08_17_203646_create_categories_table.php | 34 ++++++++ database/seeds/CategoriesTableSeeder.php | 16 ++++ database/seeds/DatabaseSeeder.php | 1 + 6 files changed, 159 insertions(+) create mode 100644 app/Http/Controllers/CategoryController.php create mode 100644 app/Models/Category.php create mode 100644 database/factories/CategoryFactory.php create mode 100644 database/migrations/2021_08_17_203646_create_categories_table.php create mode 100644 database/seeds/CategoriesTableSeeder.php diff --git a/app/Http/Controllers/CategoryController.php b/app/Http/Controllers/CategoryController.php new file mode 100644 index 000000000..735f38456 --- /dev/null +++ b/app/Http/Controllers/CategoryController.php @@ -0,0 +1,85 @@ +define(Category::class, function (Faker $faker) { + return [ + 'name' => $faker->colorName, + 'description' => rand(1, 10) % 2 == 0 ? $faker->sentence() : null + ]; +}); diff --git a/database/migrations/2021_08_17_203646_create_categories_table.php b/database/migrations/2021_08_17_203646_create_categories_table.php new file mode 100644 index 000000000..31604c699 --- /dev/null +++ b/database/migrations/2021_08_17_203646_create_categories_table.php @@ -0,0 +1,34 @@ +bigIncrements('id'); + $table->string('name'); + $table->text('description')->nullable(); + $table->boolean('is_active')->default(true); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('categories'); + } +} diff --git a/database/seeds/CategoriesTableSeeder.php b/database/seeds/CategoriesTableSeeder.php new file mode 100644 index 000000000..9e3ecee29 --- /dev/null +++ b/database/seeds/CategoriesTableSeeder.php @@ -0,0 +1,16 @@ +create(); + } +} diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php index 91cb6d1c2..f2f685f02 100644 --- a/database/seeds/DatabaseSeeder.php +++ b/database/seeds/DatabaseSeeder.php @@ -12,5 +12,6 @@ class DatabaseSeeder extends Seeder public function run() { // $this->call(UsersTableSeeder::class); + $this->call(CategoriesTableSeeder::class); } } From d056a0f1a71046ce1055cd0dc155d5ff4714c143 Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Tue, 17 Aug 2021 21:33:10 +0000 Subject: [PATCH 03/61] definicao recurso de categorias --- .../{ => Api}/CategoryController.php | 24 ++----------------- routes/api.php | 4 ++++ 2 files changed, 6 insertions(+), 22 deletions(-) rename app/Http/Controllers/{ => Api}/CategoryController.php (74%) diff --git a/app/Http/Controllers/CategoryController.php b/app/Http/Controllers/Api/CategoryController.php similarity index 74% rename from app/Http/Controllers/CategoryController.php rename to app/Http/Controllers/Api/CategoryController.php index 735f38456..38153d035 100644 --- a/app/Http/Controllers/CategoryController.php +++ b/app/Http/Controllers/Api/CategoryController.php @@ -1,7 +1,8 @@ get('/user', function (Request $request) { return $request->user(); }); + +Route::group(['namespace' => 'Api'], function () { + Route::resource('categories', 'CategoryController', ['except' => ['create', 'edit']]); +}); From 4995709c869d03dc12ddc1b350b80ccac8e35728 Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Thu, 19 Aug 2021 12:29:10 -0300 Subject: [PATCH 04/61] resource categories post --- app/Http/Controllers/Api/CategoryController.php | 10 +++++++--- app/Models/Category.php | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/Api/CategoryController.php b/app/Http/Controllers/Api/CategoryController.php index 38153d035..14e477dff 100644 --- a/app/Http/Controllers/Api/CategoryController.php +++ b/app/Http/Controllers/Api/CategoryController.php @@ -15,7 +15,7 @@ class CategoryController extends Controller */ public function index() { - // + return Category::all(); } /** @@ -26,7 +26,11 @@ public function index() */ public function store(Request $request) { - // + $this->validate($request, [ + 'name' => 'required|max:255', + 'is_active' => 'boolean' + ]); + return Category::create($request->all()); } /** @@ -37,7 +41,7 @@ public function store(Request $request) */ public function show(Category $category) { - // + return $category; } /** diff --git a/app/Models/Category.php b/app/Models/Category.php index 6a8a40675..709efa427 100644 --- a/app/Models/Category.php +++ b/app/Models/Category.php @@ -6,5 +6,5 @@ class Category extends Model { - // + protected $fillable = ['name', 'description', 'is_active']; } From 7645b8d7401e256c23de8359b1786fe46aede538 Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Thu, 19 Aug 2021 16:44:46 -0300 Subject: [PATCH 05/61] exclusao logica --- .../Controllers/Api/CategoryController.php | 56 +++++++------------ app/Models/Category.php | 4 ++ ...1_08_17_203646_create_categories_table.php | 1 + 3 files changed, 25 insertions(+), 36 deletions(-) diff --git a/app/Http/Controllers/Api/CategoryController.php b/app/Http/Controllers/Api/CategoryController.php index 14e477dff..04242a7a0 100644 --- a/app/Http/Controllers/Api/CategoryController.php +++ b/app/Http/Controllers/Api/CategoryController.php @@ -8,62 +8,46 @@ class CategoryController extends Controller { - /** - * Display a listing of the resource. - * - * @return \Illuminate\Http\Response - */ + private $rules = [ + 'name' => 'required|max:255', + 'is_active' => 'boolean' + ]; + public function index() { return Category::all(); } - /** - * Store a newly created resource in storage. - * - * @param \Illuminate\Http\Request $request - * @return \Illuminate\Http\Response - */ + // public function index(Request $request) //?only_trashed + // { + // if($request->has('only_trashed')){ + // return Category::onlyTrashed()->get(); + // } + // return Category::all(); + // } + public function store(Request $request) { - $this->validate($request, [ - 'name' => 'required|max:255', - 'is_active' => 'boolean' - ]); + $this->validate($request, $this->rules); return Category::create($request->all()); } - /** - * Display the specified resource. - * - * @param \App\Models\Category $category - * @return \Illuminate\Http\Response - */ public function show(Category $category) { return $category; } - /** - * Update the specified resource in storage. - * - * @param \Illuminate\Http\Request $request - * @param \App\Models\Category $category - * @return \Illuminate\Http\Response - */ public function update(Request $request, Category $category) { - // + $this->validate($request, $this->rules); + $category->update($request->all()); + return $category; + } - /** - * Remove the specified resource from storage. - * - * @param \App\Models\Category $category - * @return \Illuminate\Http\Response - */ public function destroy(Category $category) { - // + $category->delete(); + return response()->noContent(); // status 204 - No content } } diff --git a/app/Models/Category.php b/app/Models/Category.php index 709efa427..850fe8a0a 100644 --- a/app/Models/Category.php +++ b/app/Models/Category.php @@ -3,8 +3,12 @@ namespace App\Models; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\SoftDeletes; class Category extends Model { + use SoftDeletes; + protected $fillable = ['name', 'description', 'is_active']; + protected $dates = ['deleted_at']; } diff --git a/database/migrations/2021_08_17_203646_create_categories_table.php b/database/migrations/2021_08_17_203646_create_categories_table.php index 31604c699..acfefd034 100644 --- a/database/migrations/2021_08_17_203646_create_categories_table.php +++ b/database/migrations/2021_08_17_203646_create_categories_table.php @@ -18,6 +18,7 @@ public function up() $table->string('name'); $table->text('description')->nullable(); $table->boolean('is_active')->default(true); + $table->softDeletes(); $table->timestamps(); }); } From b3c51c4aba4c2e52927291b7e7b17ae8e62e1726 Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Thu, 19 Aug 2021 17:51:08 -0300 Subject: [PATCH 06/61] substituindo id por uuid --- app/Models/Category.php | 7 +++++-- app/Models/Traits/Uuid.php | 15 +++++++++++++++ .../2021_08_17_203646_create_categories_table.php | 2 +- 3 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 app/Models/Traits/Uuid.php diff --git a/app/Models/Category.php b/app/Models/Category.php index 850fe8a0a..4c447d6e5 100644 --- a/app/Models/Category.php +++ b/app/Models/Category.php @@ -7,8 +7,11 @@ class Category extends Model { - use SoftDeletes; + use SoftDeletes, Traits\Uuid; protected $fillable = ['name', 'description', 'is_active']; protected $dates = ['deleted_at']; -} + protected $casts = [ + 'id' => 'string' + ]; +} \ No newline at end of file diff --git a/app/Models/Traits/Uuid.php b/app/Models/Traits/Uuid.php new file mode 100644 index 000000000..0bcd1a817 --- /dev/null +++ b/app/Models/Traits/Uuid.php @@ -0,0 +1,15 @@ +id = RamseyUuid::uuid4()->toString(); + }); + } +} \ No newline at end of file diff --git a/database/migrations/2021_08_17_203646_create_categories_table.php b/database/migrations/2021_08_17_203646_create_categories_table.php index acfefd034..74e2ba069 100644 --- a/database/migrations/2021_08_17_203646_create_categories_table.php +++ b/database/migrations/2021_08_17_203646_create_categories_table.php @@ -14,7 +14,7 @@ class CreateCategoriesTable extends Migration public function up() { Schema::create('categories', function (Blueprint $table) { - $table->bigIncrements('id'); + $table->uuid('id')->primary(); $table->string('name'); $table->text('description')->nullable(); $table->boolean('is_active')->default(true); From ffdc13671ea3664d971917e398d82df58caf08e4 Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Thu, 19 Aug 2021 19:01:19 -0300 Subject: [PATCH 07/61] desafio - criando recurso category --- .../Controllers/Api/CategoryController.php | 3 +- app/Http/Controllers/Api/GenderController.php | 44 +++++++++++++++++++ app/Models/Gender.php | 17 +++++++ database/factories/GenderFactory.php | 12 +++++ ...2021_08_19_210029_create_genders_table.php | 34 ++++++++++++++ database/seeds/DatabaseSeeder.php | 1 + database/seeds/GenderSeeder.php | 16 +++++++ routes/api.php | 3 +- 8 files changed, 127 insertions(+), 3 deletions(-) create mode 100644 app/Http/Controllers/Api/GenderController.php create mode 100644 app/Models/Gender.php create mode 100644 database/factories/GenderFactory.php create mode 100644 database/migrations/2021_08_19_210029_create_genders_table.php create mode 100644 database/seeds/GenderSeeder.php diff --git a/app/Http/Controllers/Api/CategoryController.php b/app/Http/Controllers/Api/CategoryController.php index 04242a7a0..9f596b161 100644 --- a/app/Http/Controllers/Api/CategoryController.php +++ b/app/Http/Controllers/Api/CategoryController.php @@ -41,8 +41,7 @@ public function update(Request $request, Category $category) { $this->validate($request, $this->rules); $category->update($request->all()); - return $category; - + return $category; } public function destroy(Category $category) diff --git a/app/Http/Controllers/Api/GenderController.php b/app/Http/Controllers/Api/GenderController.php new file mode 100644 index 000000000..2bad69cc0 --- /dev/null +++ b/app/Http/Controllers/Api/GenderController.php @@ -0,0 +1,44 @@ + 'required|max:255', + 'is_active' => 'boolean' + ]; + + public function index() + { + return Gender::all(); + } + + public function store(Request $request) + { + $this->validate($request, $this->rules); + return Gender::create($request->all()); + } + + public function show(Gender $gender) + { + return $gender; + } + + public function update(Request $request, Gender $gender) + { + $this->validate($request, $this->rules); + $gender->update($request->all()); + return $gender; + } + + public function destroy(Gender $gender) + { + $gender->delete(); + return response()->noContent(); // status 204 - No content + } +} diff --git a/app/Models/Gender.php b/app/Models/Gender.php new file mode 100644 index 000000000..624745967 --- /dev/null +++ b/app/Models/Gender.php @@ -0,0 +1,17 @@ + 'string' + ]; +} diff --git a/database/factories/GenderFactory.php b/database/factories/GenderFactory.php new file mode 100644 index 000000000..5c9f11522 --- /dev/null +++ b/database/factories/GenderFactory.php @@ -0,0 +1,12 @@ +define(Gender::class, function (Faker $faker) { + return [ + 'name' => $faker->colorName + ]; +}); diff --git a/database/migrations/2021_08_19_210029_create_genders_table.php b/database/migrations/2021_08_19_210029_create_genders_table.php new file mode 100644 index 000000000..8b86de9ea --- /dev/null +++ b/database/migrations/2021_08_19_210029_create_genders_table.php @@ -0,0 +1,34 @@ +uuid('id')->primary(); + $table->string('name'); + $table->boolean('is_active')->default(true); + $table->softDeletes(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('genders'); + } +} diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php index f2f685f02..66d8e12c6 100644 --- a/database/seeds/DatabaseSeeder.php +++ b/database/seeds/DatabaseSeeder.php @@ -13,5 +13,6 @@ public function run() { // $this->call(UsersTableSeeder::class); $this->call(CategoriesTableSeeder::class); + $this->call(GenderSeeder::class); } } diff --git a/database/seeds/GenderSeeder.php b/database/seeds/GenderSeeder.php new file mode 100644 index 000000000..c29e5be9f --- /dev/null +++ b/database/seeds/GenderSeeder.php @@ -0,0 +1,16 @@ +create(); + } +} diff --git a/routes/api.php b/routes/api.php index d98484a25..a4b77a9c3 100644 --- a/routes/api.php +++ b/routes/api.php @@ -18,5 +18,6 @@ }); Route::group(['namespace' => 'Api'], function () { - Route::resource('categories', 'CategoryController', ['except' => ['create', 'edit']]); + Route::resource('categories', 'CategoryController', ['except' => ['create', 'edit']]); + Route::resource('genders', 'GenderController', ['except' => ['create', 'edit']]); }); From c06951344947618e1ac922d5b89660208bc518a3 Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Fri, 20 Aug 2021 13:54:00 +0000 Subject: [PATCH 08/61] add genre model --- app/Http/Controllers/Api/GenreController.php | 44 +++++++++++++++++++ app/Models/Genre.php | 17 +++++++ database/factories/GenreFactory.php | 12 +++++ .../2021_08_20_132818_create_genres_table.php | 34 ++++++++++++++ database/seeds/DatabaseSeeder.php | 1 + database/seeds/GenreSeeder.php | 16 +++++++ routes/api.php | 3 +- 7 files changed, 126 insertions(+), 1 deletion(-) create mode 100644 app/Http/Controllers/Api/GenreController.php create mode 100644 app/Models/Genre.php create mode 100644 database/factories/GenreFactory.php create mode 100644 database/migrations/2021_08_20_132818_create_genres_table.php create mode 100644 database/seeds/GenreSeeder.php diff --git a/app/Http/Controllers/Api/GenreController.php b/app/Http/Controllers/Api/GenreController.php new file mode 100644 index 000000000..a1a544f1a --- /dev/null +++ b/app/Http/Controllers/Api/GenreController.php @@ -0,0 +1,44 @@ + 'required|max:255', + 'is_active' => 'boolean' + ]; + + public function index() + { + return Genre::all(); + } + + public function store(Request $request) + { + $this->validate($request, $this->rules); + return Genre::create($request->all()); + } + + public function show(Genre $genre) + { + return $genre; + } + + public function update(Request $request, Genre $genre) + { + $this->validate($request, $this->rules); + $genre->update($request->all()); + return $genre; + } + + public function destroy(Genre $genre) + { + $genre->delete(); + return response()->noContent(); // status 204 - No content + } +} diff --git a/app/Models/Genre.php b/app/Models/Genre.php new file mode 100644 index 000000000..c23d0f74b --- /dev/null +++ b/app/Models/Genre.php @@ -0,0 +1,17 @@ + 'string' + ]; +} diff --git a/database/factories/GenreFactory.php b/database/factories/GenreFactory.php new file mode 100644 index 000000000..70d6ae09a --- /dev/null +++ b/database/factories/GenreFactory.php @@ -0,0 +1,12 @@ +define(Genre::class, function (Faker $faker) { + return [ + 'name' => $faker->country + ]; +}); diff --git a/database/migrations/2021_08_20_132818_create_genres_table.php b/database/migrations/2021_08_20_132818_create_genres_table.php new file mode 100644 index 000000000..d97f45e89 --- /dev/null +++ b/database/migrations/2021_08_20_132818_create_genres_table.php @@ -0,0 +1,34 @@ +uuid('id')->primary(); + $table->string('name'); + $table->boolean('is_active')->default(true); + $table->softDeletes(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('genres'); + } +} diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php index 66d8e12c6..fc338efee 100644 --- a/database/seeds/DatabaseSeeder.php +++ b/database/seeds/DatabaseSeeder.php @@ -14,5 +14,6 @@ public function run() // $this->call(UsersTableSeeder::class); $this->call(CategoriesTableSeeder::class); $this->call(GenderSeeder::class); + $this->call(GenreSeeder::class); } } diff --git a/database/seeds/GenreSeeder.php b/database/seeds/GenreSeeder.php new file mode 100644 index 000000000..50a41df7e --- /dev/null +++ b/database/seeds/GenreSeeder.php @@ -0,0 +1,16 @@ +create(); + } +} diff --git a/routes/api.php b/routes/api.php index a4b77a9c3..35f85c3ab 100644 --- a/routes/api.php +++ b/routes/api.php @@ -19,5 +19,6 @@ Route::group(['namespace' => 'Api'], function () { Route::resource('categories', 'CategoryController', ['except' => ['create', 'edit']]); - Route::resource('genders', 'GenderController', ['except' => ['create', 'edit']]); + Route::resource('genders', 'GenderController', ['except' => ['create', 'edit']]); + Route::resource('genres', 'GenreController', ['except' => ['create', 'edit']]); }); From 1b43c61c1d9edc29c511991254e9407cc0673ab1 Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Fri, 20 Aug 2021 10:58:55 -0300 Subject: [PATCH 09/61] remove gender model --- app/Http/Controllers/Api/GenderController.php | 44 ------------------- app/Models/Gender.php | 17 ------- database/factories/GenderFactory.php | 12 ----- ...2021_08_19_210029_create_genders_table.php | 34 -------------- database/seeds/DatabaseSeeder.php | 1 - database/seeds/GenderSeeder.php | 16 ------- routes/api.php | 1 - 7 files changed, 125 deletions(-) delete mode 100644 app/Http/Controllers/Api/GenderController.php delete mode 100644 app/Models/Gender.php delete mode 100644 database/factories/GenderFactory.php delete mode 100644 database/migrations/2021_08_19_210029_create_genders_table.php delete mode 100644 database/seeds/GenderSeeder.php diff --git a/app/Http/Controllers/Api/GenderController.php b/app/Http/Controllers/Api/GenderController.php deleted file mode 100644 index 2bad69cc0..000000000 --- a/app/Http/Controllers/Api/GenderController.php +++ /dev/null @@ -1,44 +0,0 @@ - 'required|max:255', - 'is_active' => 'boolean' - ]; - - public function index() - { - return Gender::all(); - } - - public function store(Request $request) - { - $this->validate($request, $this->rules); - return Gender::create($request->all()); - } - - public function show(Gender $gender) - { - return $gender; - } - - public function update(Request $request, Gender $gender) - { - $this->validate($request, $this->rules); - $gender->update($request->all()); - return $gender; - } - - public function destroy(Gender $gender) - { - $gender->delete(); - return response()->noContent(); // status 204 - No content - } -} diff --git a/app/Models/Gender.php b/app/Models/Gender.php deleted file mode 100644 index 624745967..000000000 --- a/app/Models/Gender.php +++ /dev/null @@ -1,17 +0,0 @@ - 'string' - ]; -} diff --git a/database/factories/GenderFactory.php b/database/factories/GenderFactory.php deleted file mode 100644 index 5c9f11522..000000000 --- a/database/factories/GenderFactory.php +++ /dev/null @@ -1,12 +0,0 @@ -define(Gender::class, function (Faker $faker) { - return [ - 'name' => $faker->colorName - ]; -}); diff --git a/database/migrations/2021_08_19_210029_create_genders_table.php b/database/migrations/2021_08_19_210029_create_genders_table.php deleted file mode 100644 index 8b86de9ea..000000000 --- a/database/migrations/2021_08_19_210029_create_genders_table.php +++ /dev/null @@ -1,34 +0,0 @@ -uuid('id')->primary(); - $table->string('name'); - $table->boolean('is_active')->default(true); - $table->softDeletes(); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('genders'); - } -} diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php index fc338efee..f913aebc3 100644 --- a/database/seeds/DatabaseSeeder.php +++ b/database/seeds/DatabaseSeeder.php @@ -13,7 +13,6 @@ public function run() { // $this->call(UsersTableSeeder::class); $this->call(CategoriesTableSeeder::class); - $this->call(GenderSeeder::class); $this->call(GenreSeeder::class); } } diff --git a/database/seeds/GenderSeeder.php b/database/seeds/GenderSeeder.php deleted file mode 100644 index c29e5be9f..000000000 --- a/database/seeds/GenderSeeder.php +++ /dev/null @@ -1,16 +0,0 @@ -create(); - } -} diff --git a/routes/api.php b/routes/api.php index 35f85c3ab..ff3853692 100644 --- a/routes/api.php +++ b/routes/api.php @@ -19,6 +19,5 @@ Route::group(['namespace' => 'Api'], function () { Route::resource('categories', 'CategoryController', ['except' => ['create', 'edit']]); - Route::resource('genders', 'GenderController', ['except' => ['create', 'edit']]); Route::resource('genres', 'GenreController', ['except' => ['create', 'edit']]); }); From fad67a8d324faead3bc30f8b1d2c97a29e9e29dd Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Fri, 20 Aug 2021 14:09:37 +0000 Subject: [PATCH 10/61] fix typo --- app/Http/Controllers/Api/CategoryController.php | 2 +- app/Http/Controllers/Api/GenreController.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Api/CategoryController.php b/app/Http/Controllers/Api/CategoryController.php index 9f596b161..33bfd6359 100644 --- a/app/Http/Controllers/Api/CategoryController.php +++ b/app/Http/Controllers/Api/CategoryController.php @@ -10,7 +10,7 @@ class CategoryController extends Controller { private $rules = [ 'name' => 'required|max:255', - 'is_active' => 'boolean' + 'is_active' => 'boolean' ]; public function index() diff --git a/app/Http/Controllers/Api/GenreController.php b/app/Http/Controllers/Api/GenreController.php index a1a544f1a..0e39a4a92 100644 --- a/app/Http/Controllers/Api/GenreController.php +++ b/app/Http/Controllers/Api/GenreController.php @@ -10,7 +10,7 @@ class GenreController extends Controller { private $rules = [ 'name' => 'required|max:255', - 'is_active' => 'boolean' + 'is_active' => 'boolean' ]; public function index() From ff73ab767c05b16b845d03eb5279b8b7de263f0f Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Fri, 20 Aug 2021 11:49:28 -0300 Subject: [PATCH 11/61] criando crud de generos --- app/Models/Category.php | 1 + app/Models/Genre.php | 1 + routes/api.php | 7 +++++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/Models/Category.php b/app/Models/Category.php index 4c447d6e5..f7a47a44d 100644 --- a/app/Models/Category.php +++ b/app/Models/Category.php @@ -14,4 +14,5 @@ class Category extends Model protected $casts = [ 'id' => 'string' ]; + public $incrementing = false; } \ No newline at end of file diff --git a/app/Models/Genre.php b/app/Models/Genre.php index c23d0f74b..51510f0bc 100644 --- a/app/Models/Genre.php +++ b/app/Models/Genre.php @@ -14,4 +14,5 @@ class Genre extends Model protected $casts = [ 'id' => 'string' ]; + public $incrementing = false; } diff --git a/routes/api.php b/routes/api.php index ff3853692..0d1bb423c 100644 --- a/routes/api.php +++ b/routes/api.php @@ -18,6 +18,9 @@ }); Route::group(['namespace' => 'Api'], function () { - Route::resource('categories', 'CategoryController', ['except' => ['create', 'edit']]); - Route::resource('genres', 'GenreController', ['except' => ['create', 'edit']]); + $exceptCreateAndEdit = [ + 'except' => ['create', 'edit'] + ]; + Route::resource('categories', 'CategoryController', $exceptCreateAndEdit); + Route::resource('genres', 'GenreController', $exceptCreateAndEdit); }); From cf771b8d95de51d96ea4c60b90b5f2e00e0cce9b Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Fri, 20 Aug 2021 14:38:55 -0300 Subject: [PATCH 12/61] iniciando com testes unitarios --- tests/Unit/CategoryTest.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tests/Unit/CategoryTest.php diff --git a/tests/Unit/CategoryTest.php b/tests/Unit/CategoryTest.php new file mode 100644 index 000000000..0c4023043 --- /dev/null +++ b/tests/Unit/CategoryTest.php @@ -0,0 +1,23 @@ +assertEquals( + ['name', 'description', 'is_active'], + $category->getFillable() + ); + } +} From 1f22a310a7193266d9f29cace8cff6f2bf364fdc Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Fri, 20 Aug 2021 15:33:29 -0300 Subject: [PATCH 13/61] boas praticas com testes unitarios --- tests/Unit/CategoryTest.php | 48 +++++++++++++++++++++++++++++-------- 1 file changed, 38 insertions(+), 10 deletions(-) diff --git a/tests/Unit/CategoryTest.php b/tests/Unit/CategoryTest.php index 0c4023043..21f04e75e 100644 --- a/tests/Unit/CategoryTest.php +++ b/tests/Unit/CategoryTest.php @@ -3,21 +3,49 @@ namespace Tests\Unit; use App\Models\Category; +use App\Models\Traits\Uuid; +use Illuminate\Database\Eloquent\SoftDeletes; use PHPUnit\Framework\TestCase; class CategoryTest extends TestCase { - /** - * A basic unit test example. - * - * @return void - */ - public function testExample() + public function testFillableAttribute() { + $fillable = ['name', 'description', 'is_active']; $category = new Category(); - $this->assertEquals( - ['name', 'description', 'is_active'], - $category->getFillable() - ); + $this->assertEquals($fillable, $category->getFillable()); + } + + public function testIfUseTraits() + { + $traits = [ + SoftDeletes::class, Uuid::class + ]; + $categoryTraits = array_keys(class_uses(Category::class)); + $this->assertEquals($traits, $categoryTraits); + // print_r(); + } + + public function testCasts() + { + $casts = ['id' => 'string']; + $category = new Category(); + $this->assertEquals($casts, $category->getCasts()); + } + + public function testIncrementing() + { + $category = new Category(); + $this->assertFalse($category->incrementing); + } + + public function testDatesAttributes() + { + $dates = ['deleted_at', 'created_at', 'updated_at']; + $category = new Category(); + foreach ($dates as $date) { + $this->assertContains($date, $category->getDates()); + } + $this->assertCount(count($dates), $category->getDates()); } } From 7f359bb8efced17b5f0308eff8e28fd977b02251 Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Fri, 20 Aug 2021 17:33:40 -0300 Subject: [PATCH 14/61] configuracao ambiente de testes --- .docker/app/.env.testing | 44 ++++++++++++++++++++++++++++++++++++++++ .docker/mysql/initdb.sql | 2 ++ .gitignore | 3 ++- docker-compose.yaml | 6 ++++-- 4 files changed, 52 insertions(+), 3 deletions(-) create mode 100644 .docker/app/.env.testing create mode 100644 .docker/mysql/initdb.sql diff --git a/.docker/app/.env.testing b/.docker/app/.env.testing new file mode 100644 index 000000000..3a874f24f --- /dev/null +++ b/.docker/app/.env.testing @@ -0,0 +1,44 @@ +APP_NAME=Laravel +APP_ENV=testing +APP_KEY=base64:KXriJ44+bmjwlMw6u8kD2cvxoNssPsfu+E0oMb/DcQE= +APP_DEBUG=true +APP_URL=http://localhost + +LOG_CHANNEL=stack + +DB_CONNECTION=mysql +DB_HOST={{ .Env._DB_HOST }} +DB_PORT=3306 +DB_DATABASE={{ .Env._TEST_DB_DATABASE }} +DB_USERNAME={{ .Env._DB_USERNAME }} +DB_PASSWORD={{ .Env._DB_PASSWORD }} + +BROADCAST_DRIVER=log +CACHE_DRIVER=file +QUEUE_CONNECTION=sync +SESSION_DRIVER=file +SESSION_LIFETIME=120 + +REDIS_HOST=redis +REDIS_PASSWORD=null +REDIS_PORT=6379 + +MAIL_DRIVER=smtp +MAIL_HOST=smtp.mailtrap.io +MAIL_PORT=2525 +MAIL_USERNAME=null +MAIL_PASSWORD=null +MAIL_ENCRYPTION=null + +AWS_ACCESS_KEY_ID= +AWS_SECRET_ACCESS_KEY= +AWS_DEFAULT_REGION=us-east-1 +AWS_BUCKET= + +PUSHER_APP_ID= +PUSHER_APP_KEY= +PUSHER_APP_SECRET= +PUSHER_APP_CLUSTER=mt1 + +MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" +MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" diff --git a/.docker/mysql/initdb.sql b/.docker/mysql/initdb.sql new file mode 100644 index 000000000..f7aa6a981 --- /dev/null +++ b/.docker/mysql/initdb.sql @@ -0,0 +1,2 @@ +CREATE DATABASE IF NOT EXISTS code_micro_videos; +CREATE DATABASE IF NOT EXISTS code_micro_videos_test; diff --git a/.gitignore b/.gitignore index c7f898319..e30f913e9 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,8 @@ /public/storage /storage/*.key /vendor -.env +/.env +/.env.testing .env.backup .phpunit.result.cache Homestead.json diff --git a/docker-compose.yaml b/docker-compose.yaml index a6cd5dfc6..78aee538c 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -5,12 +5,13 @@ services: app: build: . container_name: micro-videos-app - entrypoint: dockerize -template ./.docker/app/.env:.env -wait tcp://db:3306 -timeout 40s ./.docker/entrypoint.sh + entrypoint: dockerize -template ./.docker/app/.env:.env -template ./.docker/app/.env.testing:.env.testing -wait tcp://db:3306 -timeout 40s ./.docker/entrypoint.sh environment: - _DB_HOST=db - _DB_DATABASE=code_micro_videos - _DB_USERNAME=root - _DB_PASSWORD=root + - _TEST_DB_DATABASE=code_micro_videos_test volumes: - .:/var/www networks: @@ -35,6 +36,7 @@ services: db: build: ./.docker/mysql + command: --innodb-use-native-aio=0 container_name: micro-videos-db restart: always tty: true @@ -42,8 +44,8 @@ services: - "33006:3306" volumes: - ./.docker/dbdata:/var/lib/mysql + - ./.docker/mysql:/docker-entrypoint-initdb.d environment: - - MYSQL_DATABASE=code_micro_videos - MYSQL_ROOT_PASSWORD=root networks: - app-network From b216e302e1ce4fefead7cb0492f2d1840115eade Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Sat, 21 Aug 2021 12:46:13 -0300 Subject: [PATCH 15/61] conhecendo o ambiente exec testes phpunit --- tests/Unit/CategoryTest.php | 41 +++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 9 deletions(-) diff --git a/tests/Unit/CategoryTest.php b/tests/Unit/CategoryTest.php index 21f04e75e..2cf306e58 100644 --- a/tests/Unit/CategoryTest.php +++ b/tests/Unit/CategoryTest.php @@ -9,11 +9,37 @@ class CategoryTest extends TestCase { + private $category; + + // public static function setUpBeforeClass(): void + // { + // parent::setup(); // called before the first test + // } + + protected function setup(): void + { + parent::setup(); // called before each test + $this->category = new Category(); + } + + // protected function teardown(): void + // { + // // things to do before flush + // parent::tearDown(); // called after each test + // // things to do after flush + // } + + // public static function tearDownAfterClass(): void + // { + // // things to do before flush + // parent::tearDown(); // called after the last test + // // things to do after flush + // } + public function testFillableAttribute() { $fillable = ['name', 'description', 'is_active']; - $category = new Category(); - $this->assertEquals($fillable, $category->getFillable()); + $this->assertEquals($fillable, $this->category->getFillable()); } public function testIfUseTraits() @@ -29,23 +55,20 @@ public function testIfUseTraits() public function testCasts() { $casts = ['id' => 'string']; - $category = new Category(); - $this->assertEquals($casts, $category->getCasts()); + $this->assertEquals($casts, $this->category->getCasts()); } public function testIncrementing() { - $category = new Category(); - $this->assertFalse($category->incrementing); + $this->assertFalse($this->category->incrementing); } public function testDatesAttributes() { $dates = ['deleted_at', 'created_at', 'updated_at']; - $category = new Category(); foreach ($dates as $date) { - $this->assertContains($date, $category->getDates()); + $this->assertContains($date, $this->category->getDates()); } - $this->assertCount(count($dates), $category->getDates()); + $this->assertCount(count($dates), $this->category->getDates()); } } From 1e7f53c6f95d279f3d6226e2262e3fb07a551836 Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Mon, 23 Aug 2021 10:59:55 -0300 Subject: [PATCH 16/61] iniciando com testes integracao DB --- tests/Feature/Models/CategoryTest.php | 43 ++++++++++++++++++++++++ tests/Unit/{ => Models}/CategoryTest.php | 2 +- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 tests/Feature/Models/CategoryTest.php rename tests/Unit/{ => Models}/CategoryTest.php (98%) diff --git a/tests/Feature/Models/CategoryTest.php b/tests/Feature/Models/CategoryTest.php new file mode 100644 index 000000000..335c59c31 --- /dev/null +++ b/tests/Feature/Models/CategoryTest.php @@ -0,0 +1,43 @@ + 'test1' + // ]); + factory(Category::class, 1)->create(); + + $categories = Category::all(); + $this->assertCount(1, $categories); + $categoryKey = array_keys($categories->first()->getAttributes()); + $this->assertEqualsCanonicalizing( + [ + 'id', + 'name', + 'description', + 'is_active', + 'created_at', + 'updated_at', + 'deleted_at' + ], + $categoryKey + ); + } +} diff --git a/tests/Unit/CategoryTest.php b/tests/Unit/Models/CategoryTest.php similarity index 98% rename from tests/Unit/CategoryTest.php rename to tests/Unit/Models/CategoryTest.php index 2cf306e58..16b8cd4d3 100644 --- a/tests/Unit/CategoryTest.php +++ b/tests/Unit/Models/CategoryTest.php @@ -1,6 +1,6 @@ Date: Mon, 23 Aug 2021 12:08:03 -0300 Subject: [PATCH 17/61] testando criacao categoria --- app/Models/Category.php | 3 +- tests/Feature/Models/CategoryTest.php | 40 ++++++++++++++++++++++++++- tests/Unit/Models/CategoryTest.php | 12 +++++++- 3 files changed, 52 insertions(+), 3 deletions(-) diff --git a/app/Models/Category.php b/app/Models/Category.php index f7a47a44d..717af1cc9 100644 --- a/app/Models/Category.php +++ b/app/Models/Category.php @@ -12,7 +12,8 @@ class Category extends Model protected $fillable = ['name', 'description', 'is_active']; protected $dates = ['deleted_at']; protected $casts = [ - 'id' => 'string' + 'id' => 'string', + 'is_active' => 'boolean' ]; public $incrementing = false; } \ No newline at end of file diff --git a/tests/Feature/Models/CategoryTest.php b/tests/Feature/Models/CategoryTest.php index 335c59c31..975e6c5cc 100644 --- a/tests/Feature/Models/CategoryTest.php +++ b/tests/Feature/Models/CategoryTest.php @@ -23,7 +23,7 @@ public function testList() // 'name' => 'test1' // ]); factory(Category::class, 1)->create(); - + $categories = Category::all(); $this->assertCount(1, $categories); $categoryKey = array_keys($categories->first()->getAttributes()); @@ -40,4 +40,42 @@ public function testList() $categoryKey ); } + + public function testCreate() + { + $category = Category::create([ + 'name' => 'test1' + ]); + $category->refresh(); + + $this->assertEquals('test1', $category->name); + $this->assertNull($category->description); + $this->assertTrue($category->is_active); + + $category = Category::create([ + 'name' => 'test1', + 'description' => null + ]); + $this->assertNull($category->description); + + $category = Category::create([ + 'name' => 'test1', + 'description' => 'test_description' + ]); + $this->assertEquals('test_description', $category->description); + + $category = Category::create([ + 'name' => 'test1', + 'is_active' => false + ]); + $this->assertFalse($category->is_active); + + $category = Category::create([ + 'name' => 'test1', + 'is_active' => true + ]); + $this->assertTrue($category->is_active); + + //dd(Category::all()); + } } diff --git a/tests/Unit/Models/CategoryTest.php b/tests/Unit/Models/CategoryTest.php index 16b8cd4d3..d4835f0a4 100644 --- a/tests/Unit/Models/CategoryTest.php +++ b/tests/Unit/Models/CategoryTest.php @@ -54,7 +54,7 @@ public function testIfUseTraits() public function testCasts() { - $casts = ['id' => 'string']; + $casts = ['id' => 'string', 'is_active' => 'boolean']; $this->assertEquals($casts, $this->category->getCasts()); } @@ -71,4 +71,14 @@ public function testDatesAttributes() } $this->assertCount(count($dates), $this->category->getDates()); } + + public function testDatesAttributesCanonical() + { + $dates = ['deleted_at', 'created_at', 'updated_at']; + $this->assertEqualsCanonicalizing($dates, $this->category->getDates()); + // foreach ($dates as $date) { + // $this->assertContains($date, $this->category->getDates()); + // } + $this->assertCount(count($dates), $this->category->getDates()); + } } From 9a5ef608cbfe8a3426b2366deff264c18bf0dfb1 Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Mon, 23 Aug 2021 12:31:39 -0300 Subject: [PATCH 18/61] testando edicao categoria --- tests/Feature/Models/CategoryTest.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/Feature/Models/CategoryTest.php b/tests/Feature/Models/CategoryTest.php index 975e6c5cc..34d323204 100644 --- a/tests/Feature/Models/CategoryTest.php +++ b/tests/Feature/Models/CategoryTest.php @@ -78,4 +78,24 @@ public function testCreate() //dd(Category::all()); } + + public function testUpdate() + { + $category = factory(Category::class)->create([ + 'description' => 'test_description', + 'is_active' => false + ])->first(); + + $data = [ + 'name' => 'test_name_updated', + 'description' => 'test_description_updated', + 'is_active' => false + ]; + + $category->update($data); + + foreach($data as $key => $value){ + $this->assertEquals($value, $category->{$key}); + } + } } From 3154a9c855b88ae27792496c26b10409d0ddc907 Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Mon, 23 Aug 2021 13:02:54 -0300 Subject: [PATCH 19/61] add test delete category --- tests/Feature/Models/CategoryTest.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/Feature/Models/CategoryTest.php b/tests/Feature/Models/CategoryTest.php index 34d323204..c3b2a3870 100644 --- a/tests/Feature/Models/CategoryTest.php +++ b/tests/Feature/Models/CategoryTest.php @@ -2,6 +2,7 @@ namespace Tests\Feature\Models; +use App; use App\Models\Category; use Illuminate\Foundation\Testing\DatabaseMigrations; use Illuminate\Foundation\Testing\RefreshDatabase; @@ -98,4 +99,13 @@ public function testUpdate() $this->assertEquals($value, $category->{$key}); } } + + public function testDelete() + { + $categories = factory(Category::class, 2)->create(); + $this->assertCount(2, $categories); + $categories->first()->delete(); + $this->assertCount(1, Category::all()); + + } } From a7c1fd89a1933b129c08d9497187e54224f10b74 Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Mon, 23 Aug 2021 15:28:48 -0300 Subject: [PATCH 20/61] desafio - testes integracao categorias generos --- app/Models/Genre.php | 3 +- tests/Feature/Models/CategoryTest.php | 2 +- tests/Feature/Models/GenreTest.php | 92 +++++++++++++++++++++++++++ tests/Unit/Models/GenreTest.php | 52 +++++++++++++++ 4 files changed, 147 insertions(+), 2 deletions(-) create mode 100644 tests/Feature/Models/GenreTest.php create mode 100644 tests/Unit/Models/GenreTest.php diff --git a/app/Models/Genre.php b/app/Models/Genre.php index 51510f0bc..503a1d09d 100644 --- a/app/Models/Genre.php +++ b/app/Models/Genre.php @@ -12,7 +12,8 @@ class Genre extends Model protected $fillable = ['name', 'is_active']; protected $dates = ['deleted_at']; protected $casts = [ - 'id' => 'string' + 'id' => 'string', + 'is_active' => 'boolean' ]; public $incrementing = false; } diff --git a/tests/Feature/Models/CategoryTest.php b/tests/Feature/Models/CategoryTest.php index c3b2a3870..4dcab567c 100644 --- a/tests/Feature/Models/CategoryTest.php +++ b/tests/Feature/Models/CategoryTest.php @@ -90,7 +90,7 @@ public function testUpdate() $data = [ 'name' => 'test_name_updated', 'description' => 'test_description_updated', - 'is_active' => false + 'is_active' => true ]; $category->update($data); diff --git a/tests/Feature/Models/GenreTest.php b/tests/Feature/Models/GenreTest.php new file mode 100644 index 000000000..179fda78c --- /dev/null +++ b/tests/Feature/Models/GenreTest.php @@ -0,0 +1,92 @@ + 'test1' + // ]); + factory(Genre::class, 1)->create(); + + $genres = Genre::all(); + $this->assertCount(1, $genres); + $genreKey = array_keys($genres->first()->getAttributes()); + $this->assertEqualsCanonicalizing( + [ + 'id', + 'name', + 'is_active', + 'created_at', + 'updated_at', + 'deleted_at' + ], + $genreKey + ); + } + + public function testCreate() + { + $genre = Genre::create([ + 'name' => 'test1' + ]); + $genre->refresh(); + + $this->assertEquals('test1', $genre->name); + $this->assertTrue($genre->is_active); + + $genre = Genre::create([ + 'name' => 'test1', + 'is_active' => false + ]); + $this->assertFalse($genre->is_active); + + $genre = Genre::create([ + 'name' => 'test1', + 'is_active' => true + ]); + $this->assertTrue($genre->is_active); + } + + public function testUpdate() + { + $genre = factory(Genre::class)->create([ + 'is_active' => false + ])->first(); + + $data = [ + 'name' => 'test_name_updated', + 'is_active' => true + ]; + + $genre->update($data); + + foreach($data as $key => $value){ + $this->assertEquals($value, $genre->{$key}); + } + } + + public function testDelete() + { + $genres = factory(Genre::class, 2)->create(); + $this->assertCount(2, $genres); + $genres->first()->delete(); + $this->assertCount(1, Genre::all()); + + } +} diff --git a/tests/Unit/Models/GenreTest.php b/tests/Unit/Models/GenreTest.php new file mode 100644 index 000000000..8dbbc7c59 --- /dev/null +++ b/tests/Unit/Models/GenreTest.php @@ -0,0 +1,52 @@ +genre = new Genre(); + } + + public function testFillableAttribute() + { + $fillable = ['name', 'is_active']; + $this->assertEquals($fillable, $this->genre->getFillable()); + } + + public function testIfUseTraits() + { + $traits = [ + SoftDeletes::class, Uuid::class + ]; + $genreTraits = array_keys(class_uses(Genre::class)); + $this->assertEquals($traits, $genreTraits); + } + + public function testCasts() + { + $casts = ['id' => 'string', 'is_active' => 'boolean']; + $this->assertEquals($casts, $this->genre->getCasts()); + } + + public function testIncrementing() + { + $this->assertFalse($this->genre->incrementing); + } + + public function testDatesAttributes() + { + $dates = ['deleted_at', 'created_at', 'updated_at']; + $this->assertEqualsCanonicalizing($dates, $this->genre->getDates()); + $this->assertCount(count($dates), $this->genre->getDates()); + } +} From cc08ec3e94073296529a218c072626b813e5588b Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Mon, 23 Aug 2021 15:42:28 -0300 Subject: [PATCH 21/61] desafio - testes integracao categorias generos --- tests/Feature/Models/CategoryTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/Feature/Models/CategoryTest.php b/tests/Feature/Models/CategoryTest.php index 4dcab567c..ce8f672b9 100644 --- a/tests/Feature/Models/CategoryTest.php +++ b/tests/Feature/Models/CategoryTest.php @@ -7,6 +7,7 @@ use Illuminate\Foundation\Testing\DatabaseMigrations; use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Foundation\Testing\WithFaker; +use Illuminate\Support\Str; use Tests\TestCase; class CategoryTest extends TestCase @@ -52,6 +53,7 @@ public function testCreate() $this->assertEquals('test1', $category->name); $this->assertNull($category->description); $this->assertTrue($category->is_active); + $this->assertTrue(Str::isUuid($category->id)); $category = Category::create([ 'name' => 'test1', From f9f56f2ee2813e0fac6fae92f841d2a28d8ebaa5 Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Mon, 23 Aug 2021 15:44:47 -0300 Subject: [PATCH 22/61] desafio - testes integracao categorias generos --- tests/Feature/Models/GenreTest.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/Feature/Models/GenreTest.php b/tests/Feature/Models/GenreTest.php index 179fda78c..63fca4044 100644 --- a/tests/Feature/Models/GenreTest.php +++ b/tests/Feature/Models/GenreTest.php @@ -6,6 +6,7 @@ use Illuminate\Foundation\Testing\DatabaseMigrations; use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Foundation\Testing\WithFaker; +use Illuminate\Support\Str; use Tests\TestCase; class genresTest extends TestCase @@ -49,6 +50,8 @@ public function testCreate() $this->assertEquals('test1', $genre->name); $this->assertTrue($genre->is_active); + $this->assertTrue(Str::isUuid($genre->id)); + $genre = Genre::create([ 'name' => 'test1', From fd510b021c41e6c8f48b468ed76730c46777c424 Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Tue, 24 Aug 2021 15:56:38 -0300 Subject: [PATCH 23/61] fix factory at testUpdate --- tests/Feature/Models/CategoryTest.php | 2 +- tests/Feature/Models/GenreTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Feature/Models/CategoryTest.php b/tests/Feature/Models/CategoryTest.php index ce8f672b9..ce3dea6a0 100644 --- a/tests/Feature/Models/CategoryTest.php +++ b/tests/Feature/Models/CategoryTest.php @@ -87,7 +87,7 @@ public function testUpdate() $category = factory(Category::class)->create([ 'description' => 'test_description', 'is_active' => false - ])->first(); + ]); $data = [ 'name' => 'test_name_updated', diff --git a/tests/Feature/Models/GenreTest.php b/tests/Feature/Models/GenreTest.php index 63fca4044..78267fb3c 100644 --- a/tests/Feature/Models/GenreTest.php +++ b/tests/Feature/Models/GenreTest.php @@ -70,7 +70,7 @@ public function testUpdate() { $genre = factory(Genre::class)->create([ 'is_active' => false - ])->first(); + ]); $data = [ 'name' => 'test_name_updated', From 726c8aca55406de8380373a4a93a6ee9ce5fef16 Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Tue, 24 Aug 2021 16:10:28 -0300 Subject: [PATCH 24/61] rev testDelete --- tests/Feature/Models/CategoryTest.php | 9 +++++++++ tests/Feature/Models/GenreTest.php | 9 +++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/tests/Feature/Models/CategoryTest.php b/tests/Feature/Models/CategoryTest.php index ce3dea6a0..6407695ad 100644 --- a/tests/Feature/Models/CategoryTest.php +++ b/tests/Feature/Models/CategoryTest.php @@ -104,10 +104,19 @@ public function testUpdate() public function testDelete() { + // my test $categories = factory(Category::class, 2)->create(); $this->assertCount(2, $categories); $categories->first()->delete(); $this->assertCount(1, Category::all()); + // fc2 test + $category = factory(Category::class)->create(); + $category->delete(); + $this->assertNull(Category::find($category->id)); + + $category->restore(); + $this->assertNotNull(Category::find($category->id)); + } } diff --git a/tests/Feature/Models/GenreTest.php b/tests/Feature/Models/GenreTest.php index 78267fb3c..c0ffc07ee 100644 --- a/tests/Feature/Models/GenreTest.php +++ b/tests/Feature/Models/GenreTest.php @@ -86,10 +86,11 @@ public function testUpdate() public function testDelete() { - $genres = factory(Genre::class, 2)->create(); - $this->assertCount(2, $genres); - $genres->first()->delete(); - $this->assertCount(1, Genre::all()); + $genre = factory(Genre::class)->create(); + $genre->delete(); + $this->assertNull(Genre::find($genre->id)); + $genre->restore(); + $this->assertNotNull(Genre::find($genre->id)); } } From 65257c56320ff4e8e38a7b688cf01e25b159a95c Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Tue, 24 Aug 2021 19:11:33 -0300 Subject: [PATCH 25/61] testando validacao dos dados --- routes/api.php | 2 + .../Api/CategoryControllerTest.php | 103 ++++++++++++++++++ 2 files changed, 105 insertions(+) create mode 100644 tests/Feature/Http/Controllers/Api/CategoryControllerTest.php diff --git a/routes/api.php b/routes/api.php index 0d1bb423c..00435087f 100644 --- a/routes/api.php +++ b/routes/api.php @@ -17,6 +17,8 @@ return $request->user(); }); +// Route::group(['namespace' => 'Api', 'as' => 'api.'], function () { + Route::group(['namespace' => 'Api'], function () { $exceptCreateAndEdit = [ 'except' => ['create', 'edit'] diff --git a/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php b/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php new file mode 100644 index 000000000..9a1ec89e8 --- /dev/null +++ b/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php @@ -0,0 +1,103 @@ +create(); + $response = $this->get(route('categories.index')); + + $response + ->assertStatus(200) + ->assertJson([$category->toArray()]); + } + + public function testShow() + { + $category = factory(Category::class)->create(); + $response = $this->get(route('categories.show', ['category' => $category->id])); + + $response + ->assertStatus(200) + ->assertJson($category->toArray()); + } + + public function testInvalidationData() + { + $response = $this->json('POST', route('categories.store'), []); + //dd($response->content()); + $this->assertInvalidationRequired($response); + + $response = $this->json( + 'POST', + route('categories.store'), + [ + 'name' => str_repeat('a', 256), + 'is_active' => 'a' + ] + ); + $this->assertInvalidationMax($response); + $this->assertInvalidationBoolean($response); + + $category = factory(Category::class)->create(); + $response = $this->json( + 'PUT', + route('categories.update', ['category' => $category->id]), + [] + ); + $this->assertInvalidationRequired($response); + + $response = $this->json( + 'PUT', + route('categories.update', ['category' => $category->id]), + [ + 'name' => str_repeat('a', 256), + 'is_active' => 'a' + ] + ); + $this->assertInvalidationMax($response); + $this->assertInvalidationBoolean($response); + } + + protected function assertInvalidationRequired(TestResponse $response) + { + $response + ->assertStatus(422) + ->assertJsonValidationErrors(['name']) + ->assertJsonMissingValidationErrors(['is_active']) + ->assertJsonFragment([ + \Lang::get('validation.required', ['attribute' => 'name']) + ]); + } + + protected function assertInvalidationMax(TestResponse $response) + { + $response + ->assertStatus(422) + ->assertJsonValidationErrors(['name']) + ->assertJsonFragment([ + \Lang::get('validation.max.string', ['attribute' => 'name', 'max' => 255]) + ]); + } + + protected function assertInvalidationBoolean(TestResponse $response) + { + $response + ->assertStatus(422) + ->assertJsonValidationErrors(['is_active']) + ->assertJsonFragment([ + \Lang::get('validation.boolean', ['attribute' => 'is active']) + ]); + } +} From bdaa3a20b91c412bedc01a6278bca8b554655138 Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Tue, 24 Aug 2021 20:07:02 -0300 Subject: [PATCH 26/61] testando criacao e edicao de categorias --- .../Controllers/Api/CategoryController.php | 4 +- .../Api/CategoryControllerTest.php | 83 +++++++++++++++++++ 2 files changed, 86 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Api/CategoryController.php b/app/Http/Controllers/Api/CategoryController.php index 33bfd6359..2a709f67b 100644 --- a/app/Http/Controllers/Api/CategoryController.php +++ b/app/Http/Controllers/Api/CategoryController.php @@ -29,7 +29,9 @@ public function index() public function store(Request $request) { $this->validate($request, $this->rules); - return Category::create($request->all()); + $category = Category::create($request->all()); + $category->refresh(); + return $category; } public function show(Category $category) diff --git a/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php b/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php index 9a1ec89e8..2adfa772c 100644 --- a/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php +++ b/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php @@ -100,4 +100,87 @@ protected function assertInvalidationBoolean(TestResponse $response) \Lang::get('validation.boolean', ['attribute' => 'is active']) ]); } + + public function testStore() + { + $response = $this->json('POST', route('categories.store'), [ + 'name' => 'test' + ]); + + $id = $response->json('id'); + $category = Category::find($id); + + $response + ->assertStatus(201) + ->assertJson($category->toArray()); + $this-> assertTrue($response->json('is_active')); + $this-> assertNull($response->json('description')); + + $response = $this->json('POST', route('categories.store'), [ + 'name' => 'test', + 'description' => 'description', + 'is_active' => false + ]); + $response + ->assertJsonFragment([ + 'description' => 'description', + 'is_active' => false + ]); + } + + public function testUpdate() + { + $category = factory(Category::class)->create([ + 'is_active' => false, + 'description' => 'description' + ]); + $response = $this->json( + 'PUT', + route('categories.update', ['category' => $category->id]), + [ + 'name' => 'test', + 'description' => 'test', + 'is_active' => true + ]); + + $id = $response->json('id'); + $category = Category::find($id); + + $response + ->assertStatus(200) + ->assertJson($category->toArray()) + ->assertJsonFragment([ + 'description' => 'test', + 'is_active' => true + ]); + + // empty description converted to null + $response = $this->json( + 'PUT', + route('categories.update', ['category' => $category->id]), + [ + 'name' => 'test', + 'description' => '' + ]); + + $response->assertJsonFragment([ + 'description' => null + ]); + + $category->description = 'test'; + $category->save(); + + // also testing null + $response = $this->json( + 'PUT', + route('categories.update', ['category' => $category->id]), + [ + 'name' => 'test', + 'description' => null + ]); + + $response->assertJsonFragment([ + 'description' => null + ]); + } } From 06aeb4d6759be0a9ef8c4908d0073665ab13c9b9 Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Wed, 25 Aug 2021 10:56:48 -0300 Subject: [PATCH 27/61] rev comments --- app/Http/Controllers/Api/CategoryController.php | 2 ++ .../Http/Controllers/Api/CategoryControllerTest.php | 13 +++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/app/Http/Controllers/Api/CategoryController.php b/app/Http/Controllers/Api/CategoryController.php index 2a709f67b..71b3a9f91 100644 --- a/app/Http/Controllers/Api/CategoryController.php +++ b/app/Http/Controllers/Api/CategoryController.php @@ -30,6 +30,8 @@ public function store(Request $request) { $this->validate($request, $this->rules); $category = Category::create($request->all()); + + // Include deleted_at, created_at, updated_at, etc. $category->refresh(); return $category; } diff --git a/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php b/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php index 2adfa772c..da48e83c9 100644 --- a/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php +++ b/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php @@ -113,8 +113,9 @@ public function testStore() $response ->assertStatus(201) ->assertJson($category->toArray()); - $this-> assertTrue($response->json('is_active')); - $this-> assertNull($response->json('description')); + + $this->assertTrue($response->json('is_active')); + $this->assertNull($response->json('description')); $response = $this->json('POST', route('categories.store'), [ 'name' => 'test', @@ -138,9 +139,9 @@ public function testUpdate() 'PUT', route('categories.update', ['category' => $category->id]), [ - 'name' => 'test', - 'description' => 'test', - 'is_active' => true + 'name' => 'test', + 'description' => 'test', + 'is_active' => true ]); $id = $response->json('id'); @@ -154,7 +155,7 @@ public function testUpdate() 'is_active' => true ]); - // empty description converted to null + // empty description is converted to null $response = $this->json( 'PUT', route('categories.update', ['category' => $category->id]), From 1ef7da4750275e529d638a5eded97369825a3cbf Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Wed, 25 Aug 2021 12:41:26 -0300 Subject: [PATCH 28/61] desafio - testes com http --- app/Http/Controllers/Api/GenreController.php | 6 +- .../Api/CategoryControllerTest.php | 15 ++ .../Controllers/Api/GenreControllerTest.php | 163 ++++++++++++++++++ 3 files changed, 183 insertions(+), 1 deletion(-) create mode 100644 tests/Feature/Http/Controllers/Api/GenreControllerTest.php diff --git a/app/Http/Controllers/Api/GenreController.php b/app/Http/Controllers/Api/GenreController.php index 0e39a4a92..09dbe53dd 100644 --- a/app/Http/Controllers/Api/GenreController.php +++ b/app/Http/Controllers/Api/GenreController.php @@ -21,7 +21,11 @@ public function index() public function store(Request $request) { $this->validate($request, $this->rules); - return Genre::create($request->all()); + $genre = Genre::create($request->all()); + + // Include deleted_at, created_at, updated_at, etc. + $genre->refresh(); + return $genre; } public function show(Genre $genre) diff --git a/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php b/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php index da48e83c9..f4def4c1d 100644 --- a/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php +++ b/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php @@ -184,4 +184,19 @@ public function testUpdate() 'description' => null ]); } + + public function testDestroy() + { + $category = factory(Category::class)->create([ + 'is_active' => false, + 'description' => 'description' + ]); + $response = $this->json( + 'DELETE', + route('categories.destroy', ['category' => $category->id])); + $response->assertStatus(204); + + $response = $this->get(route('categories.show', ['category' => $category->id])); + $response->assertStatus(404); + } } diff --git a/tests/Feature/Http/Controllers/Api/GenreControllerTest.php b/tests/Feature/Http/Controllers/Api/GenreControllerTest.php new file mode 100644 index 000000000..f4df7b10f --- /dev/null +++ b/tests/Feature/Http/Controllers/Api/GenreControllerTest.php @@ -0,0 +1,163 @@ +create(); + $response = $this->get(route('genres.index')); + + $response + ->assertStatus(200) + ->assertJson([$genre->toArray()]); + } + + public function testShow() + { + $genre = factory(Genre::class)->create(); + $response = $this->get(route('genres.show', ['genre' => $genre->id])); + + $response + ->assertStatus(200) + ->assertJson($genre->toArray()); + } + + public function testInvalidationData() + { + $response = $this->json('POST', route('genres.store'), []); + //dd($response->content()); + $this->assertInvalidationRequired($response); + + $response = $this->json( + 'POST', + route('genres.store'), + [ + 'name' => str_repeat('a', 256), + 'is_active' => 'a' + ] + ); + $this->assertInvalidationMax($response); + $this->assertInvalidationBoolean($response); + + $genre = factory(Genre::class)->create(); + $response = $this->json( + 'PUT', + route('genres.update', ['genre' => $genre->id]), + [] + ); + $this->assertInvalidationRequired($response); + + $response = $this->json( + 'PUT', + route('genres.update', ['genre' => $genre->id]), + [ + 'name' => str_repeat('a', 256), + 'is_active' => 'a' + ] + ); + $this->assertInvalidationMax($response); + $this->assertInvalidationBoolean($response); + } + + protected function assertInvalidationRequired(TestResponse $response) + { + $response + ->assertStatus(422) + ->assertJsonValidationErrors(['name']) + ->assertJsonMissingValidationErrors(['is_active']) + ->assertJsonFragment([ + \Lang::get('validation.required', ['attribute' => 'name']) + ]); + } + + protected function assertInvalidationMax(TestResponse $response) + { + $response + ->assertStatus(422) + ->assertJsonValidationErrors(['name']) + ->assertJsonFragment([ + \Lang::get('validation.max.string', ['attribute' => 'name', 'max' => 255]) + ]); + } + + protected function assertInvalidationBoolean(TestResponse $response) + { + $response + ->assertStatus(422) + ->assertJsonValidationErrors(['is_active']) + ->assertJsonFragment([ + \Lang::get('validation.boolean', ['attribute' => 'is active']) + ]); + } + + public function testStore() + { + $response = $this->json('POST', route('genres.store'), [ + 'name' => 'test' + ]); + + $id = $response->json('id'); + $genre = Genre::find($id); + + $response + ->assertStatus(201) + ->assertJson($genre->toArray()); + + $this->assertTrue($response->json('is_active')); + + $response = $this->json('POST', route('genres.store'), [ + 'name' => 'test', + 'is_active' => false + ]); + $response + ->assertJsonFragment([ + 'is_active' => false + ]); + } + + public function testUpdate() + { + $genre = factory(Genre::class)->create([ + 'is_active' => false + ]); + $response = $this->json( + 'PUT', + route('genres.update', ['genre' => $genre->id]), + [ + 'name' => 'test', + 'is_active' => true + ]); + + $id = $response->json('id'); + $genre = Genre::find($id); + + $response + ->assertStatus(200) + ->assertJson($genre->toArray()); + } + + public function testDestroy() + { + $genre = factory(Genre::class)->create([ + 'is_active' => false + ]); + $response = $this->json( + 'DELETE', + route('genres.destroy', ['genre' => $genre->id])); + $response->assertStatus(204); + + $response = $this->get(route('genres.show', ['genre' => $genre->id])); + $response->assertStatus(404); + } +} From 13b65e9ca14ad432588a428f6573b69415413abc Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Wed, 25 Aug 2021 17:43:11 -0300 Subject: [PATCH 29/61] criando trait para organizar assercoes de erros --- .../Api/CategoryControllerTest.php | 44 +++++++++---------- .../Controllers/Api/GenreControllerTest.php | 44 +++++++++---------- tests/Traits/TestValidations.php | 28 ++++++++++++ 3 files changed, 69 insertions(+), 47 deletions(-) create mode 100644 tests/Traits/TestValidations.php diff --git a/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php b/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php index f4def4c1d..11dc31fde 100644 --- a/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php +++ b/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php @@ -8,10 +8,11 @@ use Illuminate\Foundation\Testing\TestResponse; use Illuminate\Foundation\Testing\WithFaker; use Tests\TestCase; +use Tests\Traits\TestValidations; class CategoryControllerTest extends TestCase { - use DatabaseMigrations; + use DatabaseMigrations, TestValidations; public function testIndex() { @@ -72,33 +73,24 @@ public function testInvalidationData() protected function assertInvalidationRequired(TestResponse $response) { - $response - ->assertStatus(422) - ->assertJsonValidationErrors(['name']) - ->assertJsonMissingValidationErrors(['is_active']) - ->assertJsonFragment([ - \Lang::get('validation.required', ['attribute' => 'name']) - ]); + $this->assertInvalidationFields( + $response, ['name'], 'required' + ); + $response->assertJsonMissingValidationErrors(['is_active']); } protected function assertInvalidationMax(TestResponse $response) { - $response - ->assertStatus(422) - ->assertJsonValidationErrors(['name']) - ->assertJsonFragment([ - \Lang::get('validation.max.string', ['attribute' => 'name', 'max' => 255]) - ]); + $this->assertInvalidationFields( + $response, ['name'], 'max.string', ['max' => 255] + ); } protected function assertInvalidationBoolean(TestResponse $response) { - $response - ->assertStatus(422) - ->assertJsonValidationErrors(['is_active']) - ->assertJsonFragment([ - \Lang::get('validation.boolean', ['attribute' => 'is active']) - ]); + $this->assertInvalidationFields( + $response, ['is_active'], 'boolean' + ); } public function testStore() @@ -187,10 +179,7 @@ public function testUpdate() public function testDestroy() { - $category = factory(Category::class)->create([ - 'is_active' => false, - 'description' => 'description' - ]); + $category = factory(Category::class)->create(); $response = $this->json( 'DELETE', route('categories.destroy', ['category' => $category->id])); @@ -198,5 +187,12 @@ public function testDestroy() $response = $this->get(route('categories.show', ['category' => $category->id])); $response->assertStatus(404); + + // fc2 + $category = factory(Category::class)->create(); + $response = $this->json('DELETE', route('categories.destroy', ['category' => $category->id])); + $response->assertStatus(204); + $this->assertNull(Category::find($category->id)); + $this->assertNotNull(Category::withTrashed()->find($category->id)); } } diff --git a/tests/Feature/Http/Controllers/Api/GenreControllerTest.php b/tests/Feature/Http/Controllers/Api/GenreControllerTest.php index f4df7b10f..8a8733184 100644 --- a/tests/Feature/Http/Controllers/Api/GenreControllerTest.php +++ b/tests/Feature/Http/Controllers/Api/GenreControllerTest.php @@ -2,16 +2,18 @@ namespace Tests\Feature\Http\Controllers\Api; +use App\Models\Category; use App\Models\Genre; use Illuminate\Foundation\Testing\DatabaseMigrations; use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Foundation\Testing\TestResponse; use Illuminate\Foundation\Testing\WithFaker; use Tests\TestCase; +use Tests\Traits\TestValidations; class GenreControllerTest extends TestCase { - use DatabaseMigrations; + use DatabaseMigrations, TestValidations; public function testIndex() { @@ -72,33 +74,24 @@ public function testInvalidationData() protected function assertInvalidationRequired(TestResponse $response) { - $response - ->assertStatus(422) - ->assertJsonValidationErrors(['name']) - ->assertJsonMissingValidationErrors(['is_active']) - ->assertJsonFragment([ - \Lang::get('validation.required', ['attribute' => 'name']) - ]); + $this->assertInvalidationFields( + $response, ['name'], 'required' + ); + $response->assertJsonMissingValidationErrors(['is_active']); } protected function assertInvalidationMax(TestResponse $response) { - $response - ->assertStatus(422) - ->assertJsonValidationErrors(['name']) - ->assertJsonFragment([ - \Lang::get('validation.max.string', ['attribute' => 'name', 'max' => 255]) - ]); + $this->assertInvalidationFields( + $response, ['name'], 'max.string', ['max' => 255] + ); } protected function assertInvalidationBoolean(TestResponse $response) { - $response - ->assertStatus(422) - ->assertJsonValidationErrors(['is_active']) - ->assertJsonFragment([ - \Lang::get('validation.boolean', ['attribute' => 'is active']) - ]); + $this->assertInvalidationFields( + $response, ['is_active'], 'boolean' + ); } public function testStore() @@ -149,9 +142,7 @@ public function testUpdate() public function testDestroy() { - $genre = factory(Genre::class)->create([ - 'is_active' => false - ]); + $genre = factory(Genre::class)->create(); $response = $this->json( 'DELETE', route('genres.destroy', ['genre' => $genre->id])); @@ -159,5 +150,12 @@ public function testDestroy() $response = $this->get(route('genres.show', ['genre' => $genre->id])); $response->assertStatus(404); + + // fc2 + $genre = factory(Genre::class)->create(); + $response = $this->json('DELETE', route('genres.destroy', ['genre' => $genre->id])); + $response->assertStatus(204); + $this->assertNull(Category::find($genre->id)); + $this->assertNotNull(Genre::withTrashed()->find($genre->id)); } } diff --git a/tests/Traits/TestValidations.php b/tests/Traits/TestValidations.php new file mode 100644 index 000000000..7d2214da8 --- /dev/null +++ b/tests/Traits/TestValidations.php @@ -0,0 +1,28 @@ +assertStatus(422) + ->assertJsonValidationErrors($fields); + + foreach ($fields as $field) { + $fieldName = str_replace('_', ' ', $field); + $response->assertJsonFragment([ + \Lang::get("validation.{$rule}", ['attribute' => $fieldName] + $ruleParams) + ]); + } + } + +} \ No newline at end of file From b2b121ed7fc2816fcbbf993d3c6d1c65cda549c0 Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Wed, 25 Aug 2021 18:54:27 -0300 Subject: [PATCH 30/61] =?UTF-8?q?organizando=20assercoes=20de=20erros=20de?= =?UTF-8?q?=20valid=20para=20cria=C3=A7ao?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Api/CategoryControllerTest.php | 35 +++++++++++-------- tests/Traits/TestValidations.php | 10 ++++++ 2 files changed, 30 insertions(+), 15 deletions(-) diff --git a/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php b/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php index 11dc31fde..c1f7c8e06 100644 --- a/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php +++ b/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php @@ -36,21 +36,21 @@ public function testShow() public function testInvalidationData() { - $response = $this->json('POST', route('categories.store'), []); - //dd($response->content()); - $this->assertInvalidationRequired($response); - - $response = $this->json( - 'POST', - route('categories.store'), - [ - 'name' => str_repeat('a', 256), - 'is_active' => 'a' - ] - ); - $this->assertInvalidationMax($response); - $this->assertInvalidationBoolean($response); - + $data = [ + 'name' => '' + ]; + $this->assertInvalidationInStoreAction($data, 'required'); + + $data = [ + 'name' => str_repeat('a', 256) + ]; + $this->assertInvalidationInStoreAction($data, 'max.string', ['max' => 255]); + + $data = [ + 'is_active' => 'a' + ]; + $this->assertInvalidationInStoreAction($data, 'boolean'); + $category = factory(Category::class)->create(); $response = $this->json( 'PUT', @@ -195,4 +195,9 @@ public function testDestroy() $this->assertNull(Category::find($category->id)); $this->assertNotNull(Category::withTrashed()->find($category->id)); } + + protected function routeStore() + { + return route('categories.store'); + } } diff --git a/tests/Traits/TestValidations.php b/tests/Traits/TestValidations.php index 7d2214da8..4be9a6216 100644 --- a/tests/Traits/TestValidations.php +++ b/tests/Traits/TestValidations.php @@ -7,6 +7,16 @@ trait TestValidations { + protected function assertInvalidationInStoreAction( + array $data, + string $rule, + array $ruleParams = [] + ) { + $response = $this->json('POST', $this->routeStore(), $data); + $fields = array_keys($data); + $this->assertInvalidationFields($response, $fields, $rule, $ruleParams); + } + protected function assertInvalidationFields( TestResponse $response, array $fields, From e3d2bf4fdbdd11db79f721ff8c63f04ffbcce8c5 Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Wed, 25 Aug 2021 18:58:55 -0300 Subject: [PATCH 31/61] =?UTF-8?q?organizando=20assercoes=20de=20erros=20de?= =?UTF-8?q?=20valid=20para=20cria=C3=A7ao?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Api/GenreControllerTest.php | 35 +++++++++++-------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/tests/Feature/Http/Controllers/Api/GenreControllerTest.php b/tests/Feature/Http/Controllers/Api/GenreControllerTest.php index 8a8733184..0ff70109f 100644 --- a/tests/Feature/Http/Controllers/Api/GenreControllerTest.php +++ b/tests/Feature/Http/Controllers/Api/GenreControllerTest.php @@ -37,21 +37,21 @@ public function testShow() public function testInvalidationData() { - $response = $this->json('POST', route('genres.store'), []); - //dd($response->content()); - $this->assertInvalidationRequired($response); - - $response = $this->json( - 'POST', - route('genres.store'), - [ - 'name' => str_repeat('a', 256), - 'is_active' => 'a' - ] - ); - $this->assertInvalidationMax($response); - $this->assertInvalidationBoolean($response); - + $data = [ + 'name' => '' + ]; + $this->assertInvalidationInStoreAction($data, 'required'); + + $data = [ + 'name' => str_repeat('a', 256) + ]; + $this->assertInvalidationInStoreAction($data, 'max.string', ['max' => 255]); + + $data = [ + 'is_active' => 'a' + ]; + $this->assertInvalidationInStoreAction($data, 'boolean'); + $genre = factory(Genre::class)->create(); $response = $this->json( 'PUT', @@ -158,4 +158,9 @@ public function testDestroy() $this->assertNull(Category::find($genre->id)); $this->assertNotNull(Genre::withTrashed()->find($genre->id)); } + + protected function routeStore() + { + return route('genres.store'); + } } From b09045ad3969b654a5f1dedc1b73abeda09aea8b Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Thu, 26 Aug 2021 17:20:25 -0300 Subject: [PATCH 32/61] organizando assercoes erros valid para edicao --- .../Api/CategoryControllerTest.php | 82 +++++------------- .../Controllers/Api/GenreControllerTest.php | 83 +++++-------------- tests/Traits/TestValidations.php | 10 +++ 3 files changed, 54 insertions(+), 121 deletions(-) diff --git a/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php b/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php index c1f7c8e06..eadfa8e30 100644 --- a/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php +++ b/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php @@ -14,24 +14,30 @@ class CategoryControllerTest extends TestCase { use DatabaseMigrations, TestValidations; + private $category; + + protected function setUp():void + { + parent::setUp(); + $this->category = factory(Category::class)->create(); + } + public function testIndex() { - $category = factory(Category::class)->create(); $response = $this->get(route('categories.index')); $response ->assertStatus(200) - ->assertJson([$category->toArray()]); + ->assertJson([$this->category->toArray()]); } public function testShow() { - $category = factory(Category::class)->create(); - $response = $this->get(route('categories.show', ['category' => $category->id])); + $response = $this->get(route('categories.show', ['category' => $this->category->id])); $response ->assertStatus(200) - ->assertJson($category->toArray()); + ->assertJson($this->category->toArray()); } public function testInvalidationData() @@ -40,57 +46,19 @@ public function testInvalidationData() 'name' => '' ]; $this->assertInvalidationInStoreAction($data, 'required'); + $this->assertInvalidationInUpdateAction($data, 'required'); $data = [ 'name' => str_repeat('a', 256) ]; $this->assertInvalidationInStoreAction($data, 'max.string', ['max' => 255]); + $this->assertInvalidationInUpdateAction($data, 'max.string', ['max' => 255]); $data = [ 'is_active' => 'a' ]; $this->assertInvalidationInStoreAction($data, 'boolean'); - - $category = factory(Category::class)->create(); - $response = $this->json( - 'PUT', - route('categories.update', ['category' => $category->id]), - [] - ); - $this->assertInvalidationRequired($response); - - $response = $this->json( - 'PUT', - route('categories.update', ['category' => $category->id]), - [ - 'name' => str_repeat('a', 256), - 'is_active' => 'a' - ] - ); - $this->assertInvalidationMax($response); - $this->assertInvalidationBoolean($response); - } - - protected function assertInvalidationRequired(TestResponse $response) - { - $this->assertInvalidationFields( - $response, ['name'], 'required' - ); - $response->assertJsonMissingValidationErrors(['is_active']); - } - - protected function assertInvalidationMax(TestResponse $response) - { - $this->assertInvalidationFields( - $response, ['name'], 'max.string', ['max' => 255] - ); - } - - protected function assertInvalidationBoolean(TestResponse $response) - { - $this->assertInvalidationFields( - $response, ['is_active'], 'boolean' - ); + $this->assertInvalidationInUpdateAction($data, 'boolean'); } public function testStore() @@ -179,25 +147,19 @@ public function testUpdate() public function testDestroy() { - $category = factory(Category::class)->create(); - $response = $this->json( - 'DELETE', - route('categories.destroy', ['category' => $category->id])); - $response->assertStatus(204); - - $response = $this->get(route('categories.show', ['category' => $category->id])); - $response->assertStatus(404); - - // fc2 - $category = factory(Category::class)->create(); - $response = $this->json('DELETE', route('categories.destroy', ['category' => $category->id])); + $response = $this->json('DELETE', route('categories.destroy', ['category' => $this->category->id])); $response->assertStatus(204); - $this->assertNull(Category::find($category->id)); - $this->assertNotNull(Category::withTrashed()->find($category->id)); + $this->assertNull(Category::find($this->category->id)); + $this->assertNotNull(Category::withTrashed()->find($this->category->id)); } protected function routeStore() { return route('categories.store'); } + + protected function routeUpdate() + { + return route('categories.update', ['category' => $this->category->id]); + } } diff --git a/tests/Feature/Http/Controllers/Api/GenreControllerTest.php b/tests/Feature/Http/Controllers/Api/GenreControllerTest.php index 0ff70109f..46d963dd8 100644 --- a/tests/Feature/Http/Controllers/Api/GenreControllerTest.php +++ b/tests/Feature/Http/Controllers/Api/GenreControllerTest.php @@ -2,7 +2,6 @@ namespace Tests\Feature\Http\Controllers\Api; -use App\Models\Category; use App\Models\Genre; use Illuminate\Foundation\Testing\DatabaseMigrations; use Illuminate\Foundation\Testing\RefreshDatabase; @@ -15,24 +14,30 @@ class GenreControllerTest extends TestCase { use DatabaseMigrations, TestValidations; + private $genre; + + protected function setUp():void + { + parent::setUp(); + $this->genre = factory(Genre::class)->create(); + } + public function testIndex() { - $genre = factory(Genre::class)->create(); $response = $this->get(route('genres.index')); $response ->assertStatus(200) - ->assertJson([$genre->toArray()]); + ->assertJson([$this->genre->toArray()]); } public function testShow() { - $genre = factory(Genre::class)->create(); - $response = $this->get(route('genres.show', ['genre' => $genre->id])); + $response = $this->get(route('genres.show', ['genre' => $this->genre->id])); $response ->assertStatus(200) - ->assertJson($genre->toArray()); + ->assertJson($this->genre->toArray()); } public function testInvalidationData() @@ -41,57 +46,19 @@ public function testInvalidationData() 'name' => '' ]; $this->assertInvalidationInStoreAction($data, 'required'); + $this->assertInvalidationInUpdateAction($data, 'required'); $data = [ 'name' => str_repeat('a', 256) ]; $this->assertInvalidationInStoreAction($data, 'max.string', ['max' => 255]); + $this->assertInvalidationInUpdateAction($data, 'max.string', ['max' => 255]); $data = [ 'is_active' => 'a' ]; $this->assertInvalidationInStoreAction($data, 'boolean'); - - $genre = factory(Genre::class)->create(); - $response = $this->json( - 'PUT', - route('genres.update', ['genre' => $genre->id]), - [] - ); - $this->assertInvalidationRequired($response); - - $response = $this->json( - 'PUT', - route('genres.update', ['genre' => $genre->id]), - [ - 'name' => str_repeat('a', 256), - 'is_active' => 'a' - ] - ); - $this->assertInvalidationMax($response); - $this->assertInvalidationBoolean($response); - } - - protected function assertInvalidationRequired(TestResponse $response) - { - $this->assertInvalidationFields( - $response, ['name'], 'required' - ); - $response->assertJsonMissingValidationErrors(['is_active']); - } - - protected function assertInvalidationMax(TestResponse $response) - { - $this->assertInvalidationFields( - $response, ['name'], 'max.string', ['max' => 255] - ); - } - - protected function assertInvalidationBoolean(TestResponse $response) - { - $this->assertInvalidationFields( - $response, ['is_active'], 'boolean' - ); + $this->assertInvalidationInUpdateAction($data, 'boolean'); } public function testStore() @@ -142,25 +109,19 @@ public function testUpdate() public function testDestroy() { - $genre = factory(Genre::class)->create(); - $response = $this->json( - 'DELETE', - route('genres.destroy', ['genre' => $genre->id])); - $response->assertStatus(204); - - $response = $this->get(route('genres.show', ['genre' => $genre->id])); - $response->assertStatus(404); - - // fc2 - $genre = factory(Genre::class)->create(); - $response = $this->json('DELETE', route('genres.destroy', ['genre' => $genre->id])); + $response = $this->json('DELETE', route('genres.destroy', ['genre' => $this->genre->id])); $response->assertStatus(204); - $this->assertNull(Category::find($genre->id)); - $this->assertNotNull(Genre::withTrashed()->find($genre->id)); + $this->assertNull(Genre::find($this->genre->id)); + $this->assertNotNull(Genre::withTrashed()->find($this->genre->id)); } protected function routeStore() { return route('genres.store'); } + + protected function routeUpdate() + { + return route('genres.update', ['genre' => $this->genre->id]); + } } diff --git a/tests/Traits/TestValidations.php b/tests/Traits/TestValidations.php index 4be9a6216..4e624b4c3 100644 --- a/tests/Traits/TestValidations.php +++ b/tests/Traits/TestValidations.php @@ -17,6 +17,16 @@ protected function assertInvalidationInStoreAction( $this->assertInvalidationFields($response, $fields, $rule, $ruleParams); } + protected function assertInvalidationInUpdateAction( + array $data, + string $rule, + array $ruleParams = [] + ) { + $response = $this->json('PUT', $this->routeUpdate(), $data); + $fields = array_keys($data); + $this->assertInvalidationFields($response, $fields, $rule, $ruleParams); + } + protected function assertInvalidationFields( TestResponse $response, array $fields, From f6148ba5df5a7f0d161c9f07915069258c9a4316 Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Thu, 26 Aug 2021 18:56:57 -0300 Subject: [PATCH 33/61] organizando assercoes na criacao --- .../Api/CategoryControllerTest.php | 34 +++++++------- .../Controllers/Api/GenreControllerTest.php | 45 ++++++++++++------- tests/Traits/TestSaves.php | 24 ++++++++++ 3 files changed, 67 insertions(+), 36 deletions(-) create mode 100644 tests/Traits/TestSaves.php diff --git a/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php b/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php index eadfa8e30..d7df233f9 100644 --- a/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php +++ b/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php @@ -8,11 +8,12 @@ use Illuminate\Foundation\Testing\TestResponse; use Illuminate\Foundation\Testing\WithFaker; use Tests\TestCase; +use Tests\Traits\TestSaves; use Tests\Traits\TestValidations; class CategoryControllerTest extends TestCase { - use DatabaseMigrations, TestValidations; + use DatabaseMigrations, TestValidations, TestSaves; private $category; @@ -63,30 +64,20 @@ public function testInvalidationData() public function testStore() { - $response = $this->json('POST', route('categories.store'), [ + $data = [ 'name' => 'test' + ]; + $response = $this->assertStore($data, $data + ['description' => null, 'is_active' => true, 'deleted_at' => null]); + $response->assertJsonStructure([ + 'created_at', 'updated_at' ]); - $id = $response->json('id'); - $category = Category::find($id); - - $response - ->assertStatus(201) - ->assertJson($category->toArray()); - - $this->assertTrue($response->json('is_active')); - $this->assertNull($response->json('description')); - - $response = $this->json('POST', route('categories.store'), [ + $data = [ 'name' => 'test', 'description' => 'description', 'is_active' => false - ]); - $response - ->assertJsonFragment([ - 'description' => 'description', - 'is_active' => false - ]); + ]; + $this->assertStore($data, $data + ['description' => 'description', 'is_active' => false]); } public function testUpdate() @@ -162,4 +153,9 @@ protected function routeUpdate() { return route('categories.update', ['category' => $this->category->id]); } + + protected function model() + { + return Category::class; + } } diff --git a/tests/Feature/Http/Controllers/Api/GenreControllerTest.php b/tests/Feature/Http/Controllers/Api/GenreControllerTest.php index 46d963dd8..c47b48bb5 100644 --- a/tests/Feature/Http/Controllers/Api/GenreControllerTest.php +++ b/tests/Feature/Http/Controllers/Api/GenreControllerTest.php @@ -8,11 +8,12 @@ use Illuminate\Foundation\Testing\TestResponse; use Illuminate\Foundation\Testing\WithFaker; use Tests\TestCase; +use Tests\Traits\TestSaves; use Tests\Traits\TestValidations; class GenreControllerTest extends TestCase { - use DatabaseMigrations, TestValidations; + use DatabaseMigrations, TestValidations, TestSaves; private $genre; @@ -63,27 +64,32 @@ public function testInvalidationData() public function testStore() { - $response = $this->json('POST', route('genres.store'), [ + $data = [ 'name' => 'test' - ]); + ]; + $this->assertStore($data, $data + ['is_active' => true]); + + // $response = $this->json('POST', route('genres.store'), [ + // 'name' => 'test' + // ]); - $id = $response->json('id'); - $genre = Genre::find($id); + // $id = $response->json('id'); + // $genre = Genre::find($id); - $response - ->assertStatus(201) - ->assertJson($genre->toArray()); + // $response + // ->assertStatus(201) + // ->assertJson($genre->toArray()); - $this->assertTrue($response->json('is_active')); + // $this->assertTrue($response->json('is_active')); - $response = $this->json('POST', route('genres.store'), [ - 'name' => 'test', - 'is_active' => false - ]); - $response - ->assertJsonFragment([ - 'is_active' => false - ]); + // $response = $this->json('POST', route('genres.store'), [ + // 'name' => 'test', + // 'is_active' => false + // ]); + // $response + // ->assertJsonFragment([ + // 'is_active' => false + // ]); } public function testUpdate() @@ -124,4 +130,9 @@ protected function routeUpdate() { return route('genres.update', ['genre' => $this->genre->id]); } + + protected function model() + { + return Genre::class; + } } diff --git a/tests/Traits/TestSaves.php b/tests/Traits/TestSaves.php new file mode 100644 index 000000000..7ec3a54b4 --- /dev/null +++ b/tests/Traits/TestSaves.php @@ -0,0 +1,24 @@ +json('POST', $this->routeStore(), $sendData); + if ($response->status() !== 201) { + throw new \Exception("Response status must be 201, given {$response->status()}:\n{$response->content()}"); + } + $model = $this->model(); + $table = (new $model)->getTable(); + $this->assertDatabaseHas($table, $testDatabase + ['id' => $response->json('id')]); + $testResponse = $testJsonData ?? $testDatabase; + $response->assertJsonFragment($testResponse + ['id' => $response->json('id')]); + return $response; + } +} \ No newline at end of file From 3cfff3a34e368c9b59c0cc31681d3364c110dfa8 Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Thu, 26 Aug 2021 20:10:03 -0300 Subject: [PATCH 34/61] organizando assercoes na edicao --- .../Api/CategoryControllerTest.php | 115 +++++++++++------- .../Controllers/Api/GenreControllerTest.php | 59 ++++----- tests/Traits/TestSaves.php | 24 +++- 3 files changed, 116 insertions(+), 82 deletions(-) diff --git a/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php b/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php index d7df233f9..6508781b2 100644 --- a/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php +++ b/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php @@ -82,58 +82,83 @@ public function testStore() public function testUpdate() { - $category = factory(Category::class)->create([ + $this->category = factory(Category::class)->create([ 'is_active' => false, 'description' => 'description' ]); - $response = $this->json( - 'PUT', - route('categories.update', ['category' => $category->id]), - [ - 'name' => 'test', - 'description' => 'test', - 'is_active' => true - ]); - - $id = $response->json('id'); - $category = Category::find($id); + $data = [ + 'name' => 'test', + 'description' => 'test', + 'is_active' => true + ]; + $response = $this->assertUpdate($data, $data + ['deleted_at' => null]); + $response->assertJsonStructure([ + 'created_at', 'updated_at' + ]); - $response - ->assertStatus(200) - ->assertJson($category->toArray()) - ->assertJsonFragment([ - 'description' => 'test', - 'is_active' => true - ]); - - // empty description is converted to null - $response = $this->json( - 'PUT', - route('categories.update', ['category' => $category->id]), - [ - 'name' => 'test', - 'description' => '' - ]); + $data = [ + 'name' => 'test', + 'description' => '', + 'is_active' => true + ]; + $this->assertUpdate($data, array_merge($data, ['description' => null])); + + $data['description'] = 'test'; + $this->assertUpdate($data, array_merge($data, ['description' => 'test'])); + + $data['description'] = null; + $this->assertUpdate($data, array_merge($data, ['description' => null])); - $response->assertJsonFragment([ - 'description' => null - ]); - $category->description = 'test'; - $category->save(); - - // also testing null - $response = $this->json( - 'PUT', - route('categories.update', ['category' => $category->id]), - [ - 'name' => 'test', - 'description' => null - ]); + + // $response = $this->json( + // 'PUT', + // route('categories.update', ['category' => $category->id]), + // [ + // 'name' => 'test', + // 'description' => 'test', + // 'is_active' => true + // ]); + + // $id = $response->json('id'); + // $category = Category::find($id); + + // $response + // ->assertStatus(200) + // ->assertJson($category->toArray()) + // ->assertJsonFragment([ + // 'description' => 'test', + // 'is_active' => true + // ]); - $response->assertJsonFragment([ - 'description' => null - ]); + // // empty description is converted to null + // $response = $this->json( + // 'PUT', + // route('categories.update', ['category' => $category->id]), + // [ + // 'name' => 'test', + // 'description' => '' + // ]); + + // $response->assertJsonFragment([ + // 'description' => null + // ]); + + // $category->description = 'test'; + // $category->save(); + + // // also testing null + // $response = $this->json( + // 'PUT', + // route('categories.update', ['category' => $category->id]), + // [ + // 'name' => 'test', + // 'description' => null + // ]); + + // $response->assertJsonFragment([ + // 'description' => null + // ]); } public function testDestroy() diff --git a/tests/Feature/Http/Controllers/Api/GenreControllerTest.php b/tests/Feature/Http/Controllers/Api/GenreControllerTest.php index c47b48bb5..296306232 100644 --- a/tests/Feature/Http/Controllers/Api/GenreControllerTest.php +++ b/tests/Feature/Http/Controllers/Api/GenreControllerTest.php @@ -67,50 +67,37 @@ public function testStore() $data = [ 'name' => 'test' ]; - $this->assertStore($data, $data + ['is_active' => true]); - - // $response = $this->json('POST', route('genres.store'), [ - // 'name' => 'test' - // ]); - - // $id = $response->json('id'); - // $genre = Genre::find($id); + $response = $this->assertStore($data, $data + ['is_active' => true]); + $response->assertJsonStructure([ + 'created_at', 'updated_at' + ]); - // $response - // ->assertStatus(201) - // ->assertJson($genre->toArray()); - - // $this->assertTrue($response->json('is_active')); - - // $response = $this->json('POST', route('genres.store'), [ - // 'name' => 'test', - // 'is_active' => false - // ]); - // $response - // ->assertJsonFragment([ - // 'is_active' => false - // ]); + $data = [ + 'name' => 'test', + 'is_active' => false + ]; + $this->assertStore($data, $data + ['is_active' => false]); } public function testUpdate() { - $genre = factory(Genre::class)->create([ + $this->genre = factory(Genre::class)->create([ 'is_active' => false ]); - $response = $this->json( - 'PUT', - route('genres.update', ['genre' => $genre->id]), - [ - 'name' => 'test', - 'is_active' => true - ]); - - $id = $response->json('id'); - $genre = Genre::find($id); + $data = [ + 'name' => 'test', + 'is_active' => true + ]; + $response = $this->assertUpdate($data, $data + ['deleted_at' => null]); + $response->assertJsonStructure([ + 'created_at', 'updated_at' + ]); - $response - ->assertStatus(200) - ->assertJson($genre->toArray()); + $data = [ + 'name' => 'test', + 'is_active' => false + ]; + $this->assertUpdate($data, $data); } public function testDestroy() diff --git a/tests/Traits/TestSaves.php b/tests/Traits/TestSaves.php index 7ec3a54b4..8425acfe0 100644 --- a/tests/Traits/TestSaves.php +++ b/tests/Traits/TestSaves.php @@ -14,11 +14,33 @@ protected function assertStore(array $sendData, array $testDatabase, array $test if ($response->status() !== 201) { throw new \Exception("Response status must be 201, given {$response->status()}:\n{$response->content()}"); } + $this->assertInDatabase($response, $testDatabase); + $this->assertJsonResponseContent($response, $testDatabase, $testJsonData); + return $response; + } + + protected function assertUpdate(array $sendData, array $testDatabase, array $testJsonData = null): TestResponse + { + /** @var TestResponse $response */ + $response = $this->json('PUT', $this->routeUpdate(), $sendData); + if ($response->status() !== 200) { + throw new \Exception("Response status must be 200, given {$response->status()}:\n{$response->content()}"); + } + $this->assertInDatabase($response, $testDatabase); + $this->assertJsonResponseContent($response, $testDatabase, $testJsonData); + return $response; + } + + protected function assertInDatabase(TestResponse $response, array $testDatabase) + { $model = $this->model(); $table = (new $model)->getTable(); $this->assertDatabaseHas($table, $testDatabase + ['id' => $response->json('id')]); + } + + protected function assertJsonResponseContent(TestResponse $response, array $testDatabase, array $testJsonData = null) + { $testResponse = $testJsonData ?? $testDatabase; $response->assertJsonFragment($testResponse + ['id' => $response->json('id')]); - return $response; } } \ No newline at end of file From 2fa6fe2ea5bca2cca69338ef527e3dc5ba029e22 Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Wed, 1 Sep 2021 15:43:01 -0300 Subject: [PATCH 35/61] change repo for ci build --- .docker/app/.env | 44 -------------- .docker/entrypoint.sh | 3 + .../app/.env.testing => .env.testing.example | 10 ++-- .github/workflows/cloudbuild.yaml | 59 +++++++++++++++++++ Dockerfile.prod | 23 ++++++++ docker-compose.prod.yaml | 57 ++++++++++++++++++ docker-compose.yaml | 8 +-- 7 files changed, 148 insertions(+), 56 deletions(-) delete mode 100644 .docker/app/.env rename .docker/app/.env.testing => .env.testing.example (76%) create mode 100644 .github/workflows/cloudbuild.yaml create mode 100644 Dockerfile.prod create mode 100644 docker-compose.prod.yaml diff --git a/.docker/app/.env b/.docker/app/.env deleted file mode 100644 index a3b9d83ae..000000000 --- a/.docker/app/.env +++ /dev/null @@ -1,44 +0,0 @@ -APP_NAME=Laravel -APP_ENV=local -APP_KEY=base64:KXriJ44+bmjwlMw6u8kD2cvxoNssPsfu+E0oMb/DcQE= -APP_DEBUG=true -APP_URL=http://localhost - -LOG_CHANNEL=stack - -DB_CONNECTION=mysql -DB_HOST={{ .Env._DB_HOST }} -DB_PORT=3306 -DB_DATABASE={{ .Env._DB_DATABASE }} -DB_USERNAME={{ .Env._DB_USERNAME }} -DB_PASSWORD={{ .Env._DB_PASSWORD }} - -BROADCAST_DRIVER=log -CACHE_DRIVER=file -QUEUE_CONNECTION=sync -SESSION_DRIVER=file -SESSION_LIFETIME=120 - -REDIS_HOST=redis -REDIS_PASSWORD=null -REDIS_PORT=6379 - -MAIL_DRIVER=smtp -MAIL_HOST=smtp.mailtrap.io -MAIL_PORT=2525 -MAIL_USERNAME=null -MAIL_PASSWORD=null -MAIL_ENCRYPTION=null - -AWS_ACCESS_KEY_ID= -AWS_SECRET_ACCESS_KEY= -AWS_DEFAULT_REGION=us-east-1 -AWS_BUCKET= - -PUSHER_APP_ID= -PUSHER_APP_KEY= -PUSHER_APP_SECRET= -PUSHER_APP_CLUSTER=mt1 - -MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" -MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" diff --git a/.docker/entrypoint.sh b/.docker/entrypoint.sh index 02020f80b..8636117c9 100755 --- a/.docker/entrypoint.sh +++ b/.docker/entrypoint.sh @@ -1,6 +1,9 @@ #!/bin/bash #On error no such file entrypoint.sh, execute in terminal - dos2unix .docker\entrypoint.sh +cp .env.example .env +cp .env.testing.example .env.testing + chown -R www-data:www-data . composer install php artisan key:generate diff --git a/.docker/app/.env.testing b/.env.testing.example similarity index 76% rename from .docker/app/.env.testing rename to .env.testing.example index 3a874f24f..bb34f3728 100644 --- a/.docker/app/.env.testing +++ b/.env.testing.example @@ -1,17 +1,17 @@ APP_NAME=Laravel APP_ENV=testing -APP_KEY=base64:KXriJ44+bmjwlMw6u8kD2cvxoNssPsfu+E0oMb/DcQE= +APP_KEY= APP_DEBUG=true APP_URL=http://localhost LOG_CHANNEL=stack DB_CONNECTION=mysql -DB_HOST={{ .Env._DB_HOST }} +DB_HOST=db DB_PORT=3306 -DB_DATABASE={{ .Env._TEST_DB_DATABASE }} -DB_USERNAME={{ .Env._DB_USERNAME }} -DB_PASSWORD={{ .Env._DB_PASSWORD }} +DB_DATABASE=code_micro_videos_test +DB_USERNAME=root +DB_PASSWORD= BROADCAST_DRIVER=log CACHE_DRIVER=file diff --git a/.github/workflows/cloudbuild.yaml b/.github/workflows/cloudbuild.yaml new file mode 100644 index 000000000..9c9f40eb5 --- /dev/null +++ b/.github/workflows/cloudbuild.yaml @@ -0,0 +1,59 @@ +name: ci +on: + push: + pull_request: [develop] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Login to ghcr + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: "Rodando docker-compose" + run: docker-compose -f docker-compose.prod.yaml up -d + env: + GOOGLE_CLOUD_PROJECT_ID: $PROJECT_ID + GOOGLE_CLOUD_KEY_FILE: service-account-storage.json + GOOGLE_CLOUD_STORAGE_BUCKET: code-micro-videos1 + GOOGLE_CLOUD_STORAGE_API_URI: https://storage.cloud.google.com/code-micro-videos1 + TESTING_PROD: true + + - name: "Chown in /var/www" + run: docker exec -u root -t app chown -R www-data:www-data /var/www + + - name: "Rodando composer" + run: docker exec -t app composer install -d /var/www/backend + + - name: "Copiando backend .env" + run: docker exec -t app cp /var/www/backend/.env.example /var/www/backend/.env + + - name: "Copiando backend .env.testing" + run: docker exec -t app cp /var/www/backend/.env.testing.example /var/www/backend/.env.testing + + - name: "Rodando key:generate" + run: docker exec -t app php /var/www/backend/artisan key:generate + + - name: "Rodando migrations" + run: docker exec -t app php /var/www/backend/artisan migrate + + - name: "Rodando Phpunit" + run: docker exec -t app php /var/www/backend/vendor/bin/phpunit -c /var/www/backend/phpunit.xml + + # - name: "Copiando frontend .env" + # run: docker exec -t app cp /var/www/frontend/.env.example /var/www/frontend/.env + + # - name: Install front-end + # run: docker exec -t app npm install --prefix /var/www/frontend + + # - name: Permission on scripts/build.sh + # run: docker exec -t app chmod +x /var/www/frontend/scripts/build.sh + + # - name: Build front-end + # run: docker exec -t app npm run build-laravel --prefix /var/www/frontend + + # - name: Test Laravel and React integration + # run: docker exec -w /var/www/backend -t app php artisan dusk --env=testing \ No newline at end of file diff --git a/Dockerfile.prod b/Dockerfile.prod new file mode 100644 index 000000000..811c5b6f8 --- /dev/null +++ b/Dockerfile.prod @@ -0,0 +1,23 @@ +FROM php:7.3.6-fpm-alpine3.9 + +RUN apk add --no-cache shadow openssl bash mysql-client nodejs npm git +RUN docker-php-ext-install pdo pdo_mysql + +RUN touch /home/www-data/.bashrc | echo "PS1='\w\$ '" >> /home/www-data/.bashrc + +ENV DOCKERIZE_VERSION v0.6.1 +RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \ + && tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \ + && rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz + +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer + +RUN usermod -u 1000 www-data + +WORKDIR /var/www + +RUN rm -rf /var/www/html && ln -s public html + +USER www-data + +EXPOSE 9000 diff --git a/docker-compose.prod.yaml b/docker-compose.prod.yaml new file mode 100644 index 000000000..159e6c6a9 --- /dev/null +++ b/docker-compose.prod.yaml @@ -0,0 +1,57 @@ +version: '3' + +services: + + app: + build: . + container_name: micro-videos-app + entrypoint: dockerize -wait tcp://db:3306 -timeout 40s ./.docker/entrypoint.sh + volumes: + - .:/var/www + networks: + - app-network + depends_on: + - db + - redis + + nginx: + build: .docker/nginx + container_name: micro-videos-nginx + restart: always + tty: true + ports: + - "8000:80" + volumes: + - .:/var/www + networks: + - app-network + depends_on: + - app + + db: + build: ./.docker/mysql + command: --innodb-use-native-aio=0 + container_name: micro-videos-db + restart: always + tty: true + ports: + - "33006:3306" + volumes: + - ./.docker/dbdata:/var/lib/mysql + - ./.docker/mysql:/docker-entrypoint-initdb.d + environment: + - MYSQL_ROOT_PASSWORD=root + networks: + - app-network + + redis: + image: redis:alpine + container_name: micro-videos-redis + expose: + - 6379 + networks: + - app-network + +networks: + app-network: + driver: bridge diff --git a/docker-compose.yaml b/docker-compose.yaml index 78aee538c..159e6c6a9 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -5,13 +5,7 @@ services: app: build: . container_name: micro-videos-app - entrypoint: dockerize -template ./.docker/app/.env:.env -template ./.docker/app/.env.testing:.env.testing -wait tcp://db:3306 -timeout 40s ./.docker/entrypoint.sh - environment: - - _DB_HOST=db - - _DB_DATABASE=code_micro_videos - - _DB_USERNAME=root - - _DB_PASSWORD=root - - _TEST_DB_DATABASE=code_micro_videos_test + entrypoint: dockerize -wait tcp://db:3306 -timeout 40s ./.docker/entrypoint.sh volumes: - .:/var/www networks: From d3c5e59ead21f9229a1faa3ff7a1726fe6305693 Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Wed, 1 Sep 2021 15:58:57 -0300 Subject: [PATCH 36/61] fix micro-videos-app name at cloud build --- .github/workflows/cloudbuild.yaml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/cloudbuild.yaml b/.github/workflows/cloudbuild.yaml index 9c9f40eb5..756fe590f 100644 --- a/.github/workflows/cloudbuild.yaml +++ b/.github/workflows/cloudbuild.yaml @@ -23,37 +23,37 @@ jobs: TESTING_PROD: true - name: "Chown in /var/www" - run: docker exec -u root -t app chown -R www-data:www-data /var/www + run: docker exec -u root -t micro-videos-app chown -R www-data:www-data /var/www - name: "Rodando composer" - run: docker exec -t app composer install -d /var/www/backend + run: docker exec -t micro-videos-app composer install -d /var/www/backend - name: "Copiando backend .env" - run: docker exec -t app cp /var/www/backend/.env.example /var/www/backend/.env + run: docker exec -t micro-videos-app cp /var/www/backend/.env.example /var/www/backend/.env - name: "Copiando backend .env.testing" - run: docker exec -t app cp /var/www/backend/.env.testing.example /var/www/backend/.env.testing + run: docker exec -t micro-videos-app cp /var/www/backend/.env.testing.example /var/www/backend/.env.testing - name: "Rodando key:generate" - run: docker exec -t app php /var/www/backend/artisan key:generate + run: docker exec -t micro-videos-app php /var/www/backend/artisan key:generate - name: "Rodando migrations" - run: docker exec -t app php /var/www/backend/artisan migrate + run: docker exec -t micro-videos-app php /var/www/backend/artisan migrate - name: "Rodando Phpunit" - run: docker exec -t app php /var/www/backend/vendor/bin/phpunit -c /var/www/backend/phpunit.xml + run: docker exec -t micro-videos-app php /var/www/backend/vendor/bin/phpunit -c /var/www/backend/phpunit.xml # - name: "Copiando frontend .env" - # run: docker exec -t app cp /var/www/frontend/.env.example /var/www/frontend/.env + # run: docker exec -t micro-videos-app cp /var/www/frontend/.env.example /var/www/frontend/.env # - name: Install front-end - # run: docker exec -t app npm install --prefix /var/www/frontend + # run: docker exec -t micro-videos-app npm install --prefix /var/www/frontend # - name: Permission on scripts/build.sh - # run: docker exec -t app chmod +x /var/www/frontend/scripts/build.sh + # run: docker exec -t micro-videos-app chmod +x /var/www/frontend/scripts/build.sh # - name: Build front-end - # run: docker exec -t app npm run build-laravel --prefix /var/www/frontend + # run: docker exec -t micro-videos-app npm run build-laravel --prefix /var/www/frontend # - name: Test Laravel and React integration - # run: docker exec -w /var/www/backend -t app php artisan dusk --env=testing \ No newline at end of file + # run: docker exec -w /var/www/backend -t micro-videos-app php artisan dusk --env=testing \ No newline at end of file From 976aaf6aa0915c062e3199c7b399faaf3018b90c Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Wed, 1 Sep 2021 16:11:44 -0300 Subject: [PATCH 37/61] fix www folder at cloud build --- .github/workflows/cloudbuild.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cloudbuild.yaml b/.github/workflows/cloudbuild.yaml index 756fe590f..84edd9d4f 100644 --- a/.github/workflows/cloudbuild.yaml +++ b/.github/workflows/cloudbuild.yaml @@ -26,22 +26,22 @@ jobs: run: docker exec -u root -t micro-videos-app chown -R www-data:www-data /var/www - name: "Rodando composer" - run: docker exec -t micro-videos-app composer install -d /var/www/backend + run: docker exec -t micro-videos-app composer install - name: "Copiando backend .env" - run: docker exec -t micro-videos-app cp /var/www/backend/.env.example /var/www/backend/.env + run: docker exec -t micro-videos-app cp .env.example .env - name: "Copiando backend .env.testing" - run: docker exec -t micro-videos-app cp /var/www/backend/.env.testing.example /var/www/backend/.env.testing + run: docker exec -t micro-videos-app cp .env.testing.example .env.testing - name: "Rodando key:generate" - run: docker exec -t micro-videos-app php /var/www/backend/artisan key:generate + run: docker exec -t micro-videos-app php /var/www/artisan key:generate - name: "Rodando migrations" - run: docker exec -t micro-videos-app php /var/www/backend/artisan migrate + run: docker exec -t micro-videos-app php /var/www/artisan migrate - name: "Rodando Phpunit" - run: docker exec -t micro-videos-app php /var/www/backend/vendor/bin/phpunit -c /var/www/backend/phpunit.xml + run: docker exec -t micro-videos-app php /var/www/vendor/bin/phpunit -c /var/www/phpunit.xml # - name: "Copiando frontend .env" # run: docker exec -t micro-videos-app cp /var/www/frontend/.env.example /var/www/frontend/.env From 5d5ae6cce001ab519ec66bdf7caa61ccb1b3b0d5 Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Wed, 1 Sep 2021 16:17:08 -0300 Subject: [PATCH 38/61] fix composer at cloud build --- .github/workflows/cloudbuild.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cloudbuild.yaml b/.github/workflows/cloudbuild.yaml index 84edd9d4f..43cee89d0 100644 --- a/.github/workflows/cloudbuild.yaml +++ b/.github/workflows/cloudbuild.yaml @@ -26,7 +26,7 @@ jobs: run: docker exec -u root -t micro-videos-app chown -R www-data:www-data /var/www - name: "Rodando composer" - run: docker exec -t micro-videos-app composer install + run: docker exec -t micro-videos-app composer install -d /var/www/ - name: "Copiando backend .env" run: docker exec -t micro-videos-app cp .env.example .env From 3455c816f61b1b5465b1cfe87193150df0a949b6 Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Wed, 1 Sep 2021 16:51:16 -0300 Subject: [PATCH 39/61] fix .env files --- .env.example | 10 +++++----- .env.testing.example | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.env.example b/.env.example index 604b401fe..6f3194ceb 100644 --- a/.env.example +++ b/.env.example @@ -1,17 +1,17 @@ APP_NAME=Laravel APP_ENV=local -APP_KEY= +APP_KEY=base64:KXriJ44+bmjwlMw6u8kD2cvxoNssPsfu+E0oMb/DcQE= APP_DEBUG=true APP_URL=http://localhost LOG_CHANNEL=stack DB_CONNECTION=mysql -DB_HOST=127.0.0.1 +DB_HOST=db DB_PORT=3306 -DB_DATABASE=laravel +DB_DATABASE=code_micro_videos DB_USERNAME=root -DB_PASSWORD= +DB_PASSWORD=root BROADCAST_DRIVER=log CACHE_DRIVER=file @@ -19,7 +19,7 @@ QUEUE_CONNECTION=sync SESSION_DRIVER=file SESSION_LIFETIME=120 -REDIS_HOST=127.0.0.1 +REDIS_HOST=redis REDIS_PASSWORD=null REDIS_PORT=6379 diff --git a/.env.testing.example b/.env.testing.example index bb34f3728..0a7931d5c 100644 --- a/.env.testing.example +++ b/.env.testing.example @@ -1,6 +1,6 @@ APP_NAME=Laravel APP_ENV=testing -APP_KEY= +APP_KEY=base64:KXriJ44+bmjwlMw6u8kD2cvxoNssPsfu+E0oMb/DcQE= APP_DEBUG=true APP_URL=http://localhost @@ -11,7 +11,7 @@ DB_HOST=db DB_PORT=3306 DB_DATABASE=code_micro_videos_test DB_USERNAME=root -DB_PASSWORD= +DB_PASSWORD=root BROADCAST_DRIVER=log CACHE_DRIVER=file From f6611cd641e579ae59c9a5527cf2011bf89b128f Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Wed, 1 Sep 2021 16:59:32 -0300 Subject: [PATCH 40/61] fix GenreTest class name --- tests/Feature/Models/GenreTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Feature/Models/GenreTest.php b/tests/Feature/Models/GenreTest.php index c0ffc07ee..31ba4df0b 100644 --- a/tests/Feature/Models/GenreTest.php +++ b/tests/Feature/Models/GenreTest.php @@ -9,7 +9,7 @@ use Illuminate\Support\Str; use Tests\TestCase; -class genresTest extends TestCase +class GenreTest extends TestCase { use DatabaseMigrations; From 87d568c2001177b2a3c95546a6e7bc87668a1e1e Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Wed, 1 Sep 2021 17:25:26 -0300 Subject: [PATCH 41/61] fix cloud build --- .github/workflows/cloudbuild.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/cloudbuild.yaml b/.github/workflows/cloudbuild.yaml index 43cee89d0..c7e6aea16 100644 --- a/.github/workflows/cloudbuild.yaml +++ b/.github/workflows/cloudbuild.yaml @@ -24,24 +24,24 @@ jobs: - name: "Chown in /var/www" run: docker exec -u root -t micro-videos-app chown -R www-data:www-data /var/www - + - name: "Rodando composer" - run: docker exec -t micro-videos-app composer install -d /var/www/ + run: docker exec -t micro-videos-app composer install --no-interaction --prefer-dist --optimize-autoloader -d /var/www/backend - name: "Copiando backend .env" - run: docker exec -t micro-videos-app cp .env.example .env + run: docker exec -t micro-videos-app cp /var/www/backend/.env.example /var/www/backend/.env - name: "Copiando backend .env.testing" - run: docker exec -t micro-videos-app cp .env.testing.example .env.testing + run: docker exec -t micro-videos-app cp /var/www/backend/.env.testing.example /var/www/backend/.env.testing - name: "Rodando key:generate" - run: docker exec -t micro-videos-app php /var/www/artisan key:generate + run: docker exec -t micro-videos-app php /var/www/backend/artisan key:generate - name: "Rodando migrations" - run: docker exec -t micro-videos-app php /var/www/artisan migrate + run: docker exec -t micro-videos-app php /var/www/backend/artisan migrate - name: "Rodando Phpunit" - run: docker exec -t micro-videos-app php /var/www/vendor/bin/phpunit -c /var/www/phpunit.xml + run: docker exec -t micro-videos-app php /var/www/backend/vendor/bin/phpunit -c /var/www/backend/phpunit.xml # - name: "Copiando frontend .env" # run: docker exec -t micro-videos-app cp /var/www/frontend/.env.example /var/www/frontend/.env @@ -56,4 +56,4 @@ jobs: # run: docker exec -t micro-videos-app npm run build-laravel --prefix /var/www/frontend # - name: Test Laravel and React integration - # run: docker exec -w /var/www/backend -t micro-videos-app php artisan dusk --env=testing \ No newline at end of file + # run: docker exec -w /var/www/backend -t micro-videos-app php artisan dusk --env=testing From 0d8c2666a3eea7d861274b044cd698cca97e5714 Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Wed, 1 Sep 2021 17:29:19 -0300 Subject: [PATCH 42/61] fix 2 cloud build --- .github/workflows/cloudbuild.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/cloudbuild.yaml b/.github/workflows/cloudbuild.yaml index c7e6aea16..bf6ed3f12 100644 --- a/.github/workflows/cloudbuild.yaml +++ b/.github/workflows/cloudbuild.yaml @@ -26,22 +26,22 @@ jobs: run: docker exec -u root -t micro-videos-app chown -R www-data:www-data /var/www - name: "Rodando composer" - run: docker exec -t micro-videos-app composer install --no-interaction --prefer-dist --optimize-autoloader -d /var/www/backend + run: docker exec -t micro-videos-app composer install --no-interaction --prefer-dist --optimize-autoloader -d /var/www - name: "Copiando backend .env" - run: docker exec -t micro-videos-app cp /var/www/backend/.env.example /var/www/backend/.env + run: docker exec -t micro-videos-app cp .env.example /var/www/.env - name: "Copiando backend .env.testing" - run: docker exec -t micro-videos-app cp /var/www/backend/.env.testing.example /var/www/backend/.env.testing + run: docker exec -t micro-videos-app cp .env.testing.example /var/www/.env.testing - name: "Rodando key:generate" - run: docker exec -t micro-videos-app php /var/www/backend/artisan key:generate + run: docker exec -t micro-videos-app php /var/www/artisan key:generate - name: "Rodando migrations" - run: docker exec -t micro-videos-app php /var/www/backend/artisan migrate + run: docker exec -t micro-videos-app php /var/www/artisan migrate - name: "Rodando Phpunit" - run: docker exec -t micro-videos-app php /var/www/backend/vendor/bin/phpunit -c /var/www/backend/phpunit.xml + run: docker exec -t micro-videos-app php /var/www/vendor/bin/phpunit -c /var/www/phpunit.xml # - name: "Copiando frontend .env" # run: docker exec -t micro-videos-app cp /var/www/frontend/.env.example /var/www/frontend/.env @@ -56,4 +56,4 @@ jobs: # run: docker exec -t micro-videos-app npm run build-laravel --prefix /var/www/frontend # - name: Test Laravel and React integration - # run: docker exec -w /var/www/backend -t micro-videos-app php artisan dusk --env=testing + # run: docker exec -w /var/www -t micro-videos-app php artisan dusk --env=testing From 1c8897bff9c5c3ff62e73b9459a8017a9afc6f7b Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Thu, 2 Sep 2021 19:49:51 -0300 Subject: [PATCH 43/61] criando stubs --- .../Controllers/Api/BasicCrudController.php | 58 +++++++++++++++++++ .../Api/BasicCrudControllerTest.php | 40 +++++++++++++ .../Controllers/CategoryControllerStub.php | 17 ++++++ tests/Stubs/Models/CategoryStub.php | 28 +++++++++ 4 files changed, 143 insertions(+) create mode 100644 app/Http/Controllers/Api/BasicCrudController.php create mode 100644 tests/Feature/Http/Controllers/Api/BasicCrudControllerTest.php create mode 100644 tests/Stubs/Controllers/CategoryControllerStub.php create mode 100644 tests/Stubs/Models/CategoryStub.php diff --git a/app/Http/Controllers/Api/BasicCrudController.php b/app/Http/Controllers/Api/BasicCrudController.php new file mode 100644 index 000000000..2c1de2c07 --- /dev/null +++ b/app/Http/Controllers/Api/BasicCrudController.php @@ -0,0 +1,58 @@ + 'required|max:255', + 'is_active' => 'boolean' + ]; + + public function index() + { + return $this->model()::all(); + } + + // // public function index(Request $request) //?only_trashed + // // { + // // if($request->has('only_trashed')){ + // // return Category::onlyTrashed()->get(); + // // } + // // return Category::all(); + // // } + + // public function store(Request $request) + // { + // $this->validate($request, $this->rules); + // $category = Category::create($request->all()); + + // // Include deleted_at, created_at, updated_at, etc. + // $category->refresh(); + // return $category; + // } + + // public function show(Category $category) + // { + // return $category; + // } + + // public function update(Request $request, Category $category) + // { + // $this->validate($request, $this->rules); + // $category->update($request->all()); + // return $category; + // } + + // public function destroy(Category $category) + // { + // $category->delete(); + // return response()->noContent(); // status 204 - No content + // } +} diff --git a/tests/Feature/Http/Controllers/Api/BasicCrudControllerTest.php b/tests/Feature/Http/Controllers/Api/BasicCrudControllerTest.php new file mode 100644 index 000000000..a3c82aa21 --- /dev/null +++ b/tests/Feature/Http/Controllers/Api/BasicCrudControllerTest.php @@ -0,0 +1,40 @@ + 'test_name', 'description' => 'test_description']); + $controller = new CategoryControllerStub(); + $result = $controller->index()->toArray(); + //dd($result, $category->toArray()); + $this->assertEquals([$category->toArray()], $result); + } +} \ No newline at end of file diff --git a/tests/Stubs/Controllers/CategoryControllerStub.php b/tests/Stubs/Controllers/CategoryControllerStub.php new file mode 100644 index 000000000..8bcde0c99 --- /dev/null +++ b/tests/Stubs/Controllers/CategoryControllerStub.php @@ -0,0 +1,17 @@ +bigIncrements('id'); + $table->string('name'); + $table->text('description')->nullable(); + $table->timestamps(); + }); + } + + public static function dropTable() + { + \Schema::dropIfExists('category_stubs'); + } +} \ No newline at end of file From ec0596c8db5559e22073db034b5a592319db9c6d Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Fri, 3 Sep 2021 15:56:00 +0000 Subject: [PATCH 44/61] review terminal.integrated.shell.linux settings --- .devcontainer/devcontainer.json | 8 +++++++- Dockerfile | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 652b2eb91..e0c291efa 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -21,7 +21,13 @@ // Set *default* container specific settings.json values on container create. "settings": { - "terminal.integrated.shell.linux": "/bin/bash" + //"terminal.integrated.shell.linux": "/bin/bash", + "terminal.integrated.profiles.linux": { + "bash": { + "path": "/bin/bash" + } + }, + "terminal.integrated.defaultProfile.linux": "bash" }, // Add the IDs of extensions you want installed when the container is created. diff --git a/Dockerfile b/Dockerfile index 811c5b6f8..2925e87f4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSI RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -RUN usermod -u 1000 www-data +RUN usermod -u 1000 --shell /bin/bash www-data WORKDIR /var/www From 56c76072f8c153613db7e0200d2609cec9850f68 Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Sat, 4 Sep 2021 09:25:50 -0300 Subject: [PATCH 45/61] recuperando model pela Id de forma dinamica --- .../Controllers/Api/BasicCrudController.php | 77 +++++++------ .../Controllers/Api/CategoryController.php | 18 +++- app/Http/Controllers/Api/GenreController.php | 5 + .../Api/BasicCrudControllerTest.php | 101 +++++++++++++++++- .../Api/CategoryControllerTest.php | 2 +- .../Controllers/Api/GenreControllerTest.php | 2 +- .../Controllers/CategoryControllerStub.php | 19 +++- 7 files changed, 174 insertions(+), 50 deletions(-) diff --git a/app/Http/Controllers/Api/BasicCrudController.php b/app/Http/Controllers/Api/BasicCrudController.php index 2c1de2c07..5bbab7d50 100644 --- a/app/Http/Controllers/Api/BasicCrudController.php +++ b/app/Http/Controllers/Api/BasicCrudController.php @@ -3,56 +3,53 @@ namespace App\Http\Controllers\Api; use App\Http\Controllers\Controller; -use App\Models\Category; use Illuminate\Http\Request; abstract class BasicCrudController extends Controller { protected abstract function model(); - private $rules = [ - 'name' => 'required|max:255', - 'is_active' => 'boolean' - ]; + protected abstract function rulesStore(); + + protected abstract function rulesUpdate(); public function index() { return $this->model()::all(); } - // // public function index(Request $request) //?only_trashed - // // { - // // if($request->has('only_trashed')){ - // // return Category::onlyTrashed()->get(); - // // } - // // return Category::all(); - // // } - - // public function store(Request $request) - // { - // $this->validate($request, $this->rules); - // $category = Category::create($request->all()); - - // // Include deleted_at, created_at, updated_at, etc. - // $category->refresh(); - // return $category; - // } - - // public function show(Category $category) - // { - // return $category; - // } - - // public function update(Request $request, Category $category) - // { - // $this->validate($request, $this->rules); - // $category->update($request->all()); - // return $category; - // } - - // public function destroy(Category $category) - // { - // $category->delete(); - // return response()->noContent(); // status 204 - No content - // } + public function store(Request $request) + { + $validatedData = $this->validate($request, $this->rulesStore()); + $obj = $this->model()::create($validatedData); + $obj->refresh(); + return $obj; + } + + protected function findOrFail($id) + { + $model = $this->model(); + $keyName = (new $model)->getRouteKeyName(); + return $this->model()::where($keyName, $id)->firstOrFail(); + } + + public function show($id) + { + return $this->findOrFail($id); + } + + public function update(Request $request, $id) + { + $obj = $this->findOrFail($id); + $validatedData = $this->validate($request, $this->rulesUpdate()); + $obj->update($validatedData); + return $obj; + } + + public function destroy($id) + { + $obj = $this->findOrFail($id); + $obj->delete(); + return response()->noContent(); // status 204 - No content + } } diff --git a/app/Http/Controllers/Api/CategoryController.php b/app/Http/Controllers/Api/CategoryController.php index 71b3a9f91..ac0d30fcf 100644 --- a/app/Http/Controllers/Api/CategoryController.php +++ b/app/Http/Controllers/Api/CategoryController.php @@ -10,9 +10,25 @@ class CategoryController extends Controller { private $rules = [ 'name' => 'required|max:255', + 'description' => 'nullable', 'is_active' => 'boolean' ]; + protected function model() + { + return Category::class; + } + + protected function rulesStore() + { + return $this->rules; + } + + protected function rulesUpdate() + { + return $this->rules; + } + public function index() { return Category::all(); @@ -36,7 +52,7 @@ public function store(Request $request) return $category; } - public function show(Category $category) + public function show(Category $category) //Route model binding { return $category; } diff --git a/app/Http/Controllers/Api/GenreController.php b/app/Http/Controllers/Api/GenreController.php index 09dbe53dd..572918672 100644 --- a/app/Http/Controllers/Api/GenreController.php +++ b/app/Http/Controllers/Api/GenreController.php @@ -13,6 +13,11 @@ class GenreController extends Controller 'is_active' => 'boolean' ]; + protected function model() + { + return Genre::class; + } + public function index() { return Genre::all(); diff --git a/tests/Feature/Http/Controllers/Api/BasicCrudControllerTest.php b/tests/Feature/Http/Controllers/Api/BasicCrudControllerTest.php index a3c82aa21..21b394f98 100644 --- a/tests/Feature/Http/Controllers/Api/BasicCrudControllerTest.php +++ b/tests/Feature/Http/Controllers/Api/BasicCrudControllerTest.php @@ -2,11 +2,16 @@ namespace Tests\Feature\Http\Controllers\Api; +use App\Http\Controllers\Api\BasicCrudController; use App\Models\Category; +use Illuminate\Database\Eloquent\ModelNotFoundException; use Illuminate\Foundation\Testing\DatabaseMigrations; use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Foundation\Testing\TestResponse; use Illuminate\Foundation\Testing\WithFaker; +use Illuminate\Http\Request; +use Illuminate\Validation\ValidationException; +use ReflectionMethod; use Tests\Stubs\Controllers\CategoryControllerStub; use Tests\Stubs\Models\CategoryStub; use Tests\TestCase; @@ -15,26 +20,114 @@ class BasicCrudControllerTest extends TestCase { + private $controller; + protected function setUp(): void { parent::setUp(); CategoryStub::dropTable(); CategoryStub::createTable(); + $this->controller = new CategoryControllerStub(); } protected function tearDown(): void { - parent::setUp(); CategoryStub::dropTable(); + parent::tearDown(); } public function testIndex() { /** @var CategoryStub $category */ $category = CategoryStub::create(['name' => 'test_name', 'description' => 'test_description']); - $controller = new CategoryControllerStub(); - $result = $controller->index()->toArray(); - //dd($result, $category->toArray()); + $result = $this->controller->index()->toArray(); $this->assertEquals([$category->toArray()], $result); } + + public function testInvalidationDataInStore() + { + $this->expectException(ValidationException::class); + /** @var \Mockery\MockInterface|\Mockery\LegacyMockInterface $request */ + $request = \Mockery::mock(Request::class); + $request + ->shouldReceive('all') + ->once() + ->andReturn(['name' => '']); + $this->controller->store($request); + } + + public function testStore() + { + /** @var \Mockery\MockInterface|\Mockery\LegacyMockInterface $request */ + $request = \Mockery::mock(Request::class); + $request + ->shouldReceive('all') + ->once() + ->andReturn(['name' => 'test_name', 'description' => 'test_description']); + + $obj = $this->controller->store($request); + $this->assertEquals( + CategoryStub::find(1)->toArray(), + $obj->toArray() + ); + } + + public function testIfFindOrFailFetchModel() + { + /** @var CategoryStub $category */ + $category = CategoryStub::create(['name' => 'test_name', 'description' => 'test_description']); + + $reflectionClass = new \ReflectionClass(BasicCrudController::class); + $reflectionMethod = $reflectionClass->getMethod('findOrFail'); + $reflectionMethod->setAccessible(true); + + $result = $reflectionMethod->invokeArgs($this->controller, [$category->id]); + $this->assertInstanceOf(CategoryStub::class, $result); + } + + public function testIfFindOrFailThrowExceptionWhenIdInvalid() + { + $this->expectException(ModelNotFoundException::class); + + $reflectionClass = new \ReflectionClass(BasicCrudController::class); + $reflectionMethod = $reflectionClass->getMethod('findOrFail'); + $reflectionMethod->setAccessible(true); + + $reflectionMethod->invokeArgs($this->controller, [0]); + } + + public function testShow() + { + /** @var CategoryStub $category */ + $category = CategoryStub::create(['name' => 'test_name', 'description' => 'test_description']); + $result = $this->controller->show($category->id); + $this->assertEquals($result->toArray(), CategoryStub::find(1)->toArray()); + } + + public function testUpdate() + { + /** @var CategoryStub $category */ + $category = CategoryStub::create(['name' => 'test_name', 'description' => 'test_description']); + + /** @var \Mockery\MockInterface|\Mockery\LegacyMockInterface $request */ + $request = \Mockery::mock(Request::class); + $request + ->shouldReceive('all') + ->once() + ->andReturn(['name' => 'test_name_changed', 'description' => 'test_description_changed']); + + $result = $this->controller->update($request, $category->id); + $this->assertEquals($result->toArray(), CategoryStub::find(1)->toArray()); + } + + public function testDestroy() + { + /** @var CategoryStub $category */ + $category = CategoryStub::create(['name' => 'test_name', 'description' => 'test_description']); + $response = $this->controller->destroy($category->id); + $this + ->createTestResponse($response) + ->assertStatus((204)); + $this->assertCount(0, CategoryStub::all()); + } } \ No newline at end of file diff --git a/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php b/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php index 6508781b2..31ea69ebc 100644 --- a/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php +++ b/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php @@ -178,7 +178,7 @@ protected function routeUpdate() { return route('categories.update', ['category' => $this->category->id]); } - + protected function model() { return Category::class; diff --git a/tests/Feature/Http/Controllers/Api/GenreControllerTest.php b/tests/Feature/Http/Controllers/Api/GenreControllerTest.php index 296306232..41b998497 100644 --- a/tests/Feature/Http/Controllers/Api/GenreControllerTest.php +++ b/tests/Feature/Http/Controllers/Api/GenreControllerTest.php @@ -117,7 +117,7 @@ protected function routeUpdate() { return route('genres.update', ['genre' => $this->genre->id]); } - + protected function model() { return Genre::class; diff --git a/tests/Stubs/Controllers/CategoryControllerStub.php b/tests/Stubs/Controllers/CategoryControllerStub.php index 8bcde0c99..4ed7646df 100644 --- a/tests/Stubs/Controllers/CategoryControllerStub.php +++ b/tests/Stubs/Controllers/CategoryControllerStub.php @@ -3,9 +3,6 @@ namespace Tests\Stubs\Controllers; use App\Http\Controllers\Api\BasicCrudController; -use App\Http\Controllers\Controller; -use App\Models\Category; -use Illuminate\Http\Request; use Tests\Stubs\Models\CategoryStub; class CategoryControllerStub extends BasicCrudController @@ -14,4 +11,20 @@ protected function model() { return CategoryStub::class; } + + protected function rulesStore() + { + return [ + 'name' => 'required|max:255', + 'description' => 'nullable' + ]; + } + + protected function rulesUpdate() + { + return [ + 'name' => 'required|max:255', + 'description' => 'nullable' + ]; + } } From 79b1a59acbf5225f503ea7fbced939a1a6ecc249 Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Sat, 4 Sep 2021 09:43:41 -0300 Subject: [PATCH 46/61] usando BasicCrudController em category e genre --- .../Controllers/Api/CategoryController.php | 43 +--------------- app/Http/Controllers/Api/GenreController.php | 33 ++---------- .../Api/CategoryControllerTest.php | 51 ------------------- 3 files changed, 6 insertions(+), 121 deletions(-) diff --git a/app/Http/Controllers/Api/CategoryController.php b/app/Http/Controllers/Api/CategoryController.php index ac0d30fcf..f20c39085 100644 --- a/app/Http/Controllers/Api/CategoryController.php +++ b/app/Http/Controllers/Api/CategoryController.php @@ -6,7 +6,7 @@ use App\Models\Category; use Illuminate\Http\Request; -class CategoryController extends Controller +class CategoryController extends BasicCrudController { private $rules = [ 'name' => 'required|max:255', @@ -28,45 +28,4 @@ protected function rulesUpdate() { return $this->rules; } - - public function index() - { - return Category::all(); - } - - // public function index(Request $request) //?only_trashed - // { - // if($request->has('only_trashed')){ - // return Category::onlyTrashed()->get(); - // } - // return Category::all(); - // } - - public function store(Request $request) - { - $this->validate($request, $this->rules); - $category = Category::create($request->all()); - - // Include deleted_at, created_at, updated_at, etc. - $category->refresh(); - return $category; - } - - public function show(Category $category) //Route model binding - { - return $category; - } - - public function update(Request $request, Category $category) - { - $this->validate($request, $this->rules); - $category->update($request->all()); - return $category; - } - - public function destroy(Category $category) - { - $category->delete(); - return response()->noContent(); // status 204 - No content - } } diff --git a/app/Http/Controllers/Api/GenreController.php b/app/Http/Controllers/Api/GenreController.php index 572918672..1ae6c3e2b 100644 --- a/app/Http/Controllers/Api/GenreController.php +++ b/app/Http/Controllers/Api/GenreController.php @@ -6,7 +6,7 @@ use App\Models\Genre; use Illuminate\Http\Request; -class GenreController extends Controller +class GenreController extends BasicCrudController { private $rules = [ 'name' => 'required|max:255', @@ -18,36 +18,13 @@ protected function model() return Genre::class; } - public function index() + protected function rulesStore() { - return Genre::all(); + return $this->rules; } - public function store(Request $request) + protected function rulesUpdate() { - $this->validate($request, $this->rules); - $genre = Genre::create($request->all()); - - // Include deleted_at, created_at, updated_at, etc. - $genre->refresh(); - return $genre; - } - - public function show(Genre $genre) - { - return $genre; - } - - public function update(Request $request, Genre $genre) - { - $this->validate($request, $this->rules); - $genre->update($request->all()); - return $genre; - } - - public function destroy(Genre $genre) - { - $genre->delete(); - return response()->noContent(); // status 204 - No content + return $this->rules; } } diff --git a/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php b/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php index 31ea69ebc..9f4bd9895 100644 --- a/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php +++ b/tests/Feature/Http/Controllers/Api/CategoryControllerTest.php @@ -108,57 +108,6 @@ public function testUpdate() $data['description'] = null; $this->assertUpdate($data, array_merge($data, ['description' => null])); - - - - // $response = $this->json( - // 'PUT', - // route('categories.update', ['category' => $category->id]), - // [ - // 'name' => 'test', - // 'description' => 'test', - // 'is_active' => true - // ]); - - // $id = $response->json('id'); - // $category = Category::find($id); - - // $response - // ->assertStatus(200) - // ->assertJson($category->toArray()) - // ->assertJsonFragment([ - // 'description' => 'test', - // 'is_active' => true - // ]); - - // // empty description is converted to null - // $response = $this->json( - // 'PUT', - // route('categories.update', ['category' => $category->id]), - // [ - // 'name' => 'test', - // 'description' => '' - // ]); - - // $response->assertJsonFragment([ - // 'description' => null - // ]); - - // $category->description = 'test'; - // $category->save(); - - // // also testing null - // $response = $this->json( - // 'PUT', - // route('categories.update', ['category' => $category->id]), - // [ - // 'name' => 'test', - // 'description' => null - // ]); - - // $response->assertJsonFragment([ - // 'description' => null - // ]); } public function testDestroy() From 9f4e43f0f833cbf585f1f74e2bcc4f5631f0d66a Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Sat, 4 Sep 2021 10:41:59 -0300 Subject: [PATCH 47/61] fix localhost for DB_HOST --- .env.example | 2 +- .env.testing.example | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.example b/.env.example index 6f3194ceb..d18b0d519 100644 --- a/.env.example +++ b/.env.example @@ -7,7 +7,7 @@ APP_URL=http://localhost LOG_CHANNEL=stack DB_CONNECTION=mysql -DB_HOST=db +DB_HOST=localhost DB_PORT=3306 DB_DATABASE=code_micro_videos DB_USERNAME=root diff --git a/.env.testing.example b/.env.testing.example index 0a7931d5c..23cde9ffd 100644 --- a/.env.testing.example +++ b/.env.testing.example @@ -7,7 +7,7 @@ APP_URL=http://localhost LOG_CHANNEL=stack DB_CONNECTION=mysql -DB_HOST=db +DB_HOST=localhost DB_PORT=3306 DB_DATABASE=code_micro_videos_test DB_USERNAME=root From 3bff62c533e36ec531fb6cfca08e461d8cb03350 Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Sat, 4 Sep 2021 12:19:41 -0300 Subject: [PATCH 48/61] add CastMember --- .env.example | 2 +- .env.testing.example | 2 +- .../Controllers/Api/CastMemberController.php | 34 ++++++++++++++++++ app/Models/CastMember.php | 18 ++++++++++ database/factories/CastMemberFactory.php | 15 ++++++++ ...09_04_141318_create_cast_members_table.php | 34 ++++++++++++++++++ database/seeds/CastMemberSeeder.php | 16 +++++++++ routes/api.php | 1 + .../Api/CastMemberControllerTest.php | 35 +++++++++++++++++++ tests/Unit/Models/CastMemberTest.php | 18 ++++++++++ 10 files changed, 173 insertions(+), 2 deletions(-) create mode 100644 app/Http/Controllers/Api/CastMemberController.php create mode 100644 app/Models/CastMember.php create mode 100644 database/factories/CastMemberFactory.php create mode 100644 database/migrations/2021_09_04_141318_create_cast_members_table.php create mode 100644 database/seeds/CastMemberSeeder.php create mode 100644 tests/Feature/Http/Controllers/Api/CastMemberControllerTest.php create mode 100644 tests/Unit/Models/CastMemberTest.php diff --git a/.env.example b/.env.example index d18b0d519..6f3194ceb 100644 --- a/.env.example +++ b/.env.example @@ -7,7 +7,7 @@ APP_URL=http://localhost LOG_CHANNEL=stack DB_CONNECTION=mysql -DB_HOST=localhost +DB_HOST=db DB_PORT=3306 DB_DATABASE=code_micro_videos DB_USERNAME=root diff --git a/.env.testing.example b/.env.testing.example index 23cde9ffd..0a7931d5c 100644 --- a/.env.testing.example +++ b/.env.testing.example @@ -7,7 +7,7 @@ APP_URL=http://localhost LOG_CHANNEL=stack DB_CONNECTION=mysql -DB_HOST=localhost +DB_HOST=db DB_PORT=3306 DB_DATABASE=code_micro_videos_test DB_USERNAME=root diff --git a/app/Http/Controllers/Api/CastMemberController.php b/app/Http/Controllers/Api/CastMemberController.php new file mode 100644 index 000000000..97a5a782c --- /dev/null +++ b/app/Http/Controllers/Api/CastMemberController.php @@ -0,0 +1,34 @@ +rules = [ + 'name' => 'required|max:255', + 'type' => 'required|in:' . implode(',', [CastMember::TYPE_ACTOR, CastMember::TYPE_DIRECTOR]) + ]; + } + + protected function model() + { + return CastMember::class; + } + + protected function rulesStore() + { + return $this->rules; + } + + protected function rulesUpdate() + { + return $this->rules; + } +} diff --git a/app/Models/CastMember.php b/app/Models/CastMember.php new file mode 100644 index 000000000..9743d1707 --- /dev/null +++ b/app/Models/CastMember.php @@ -0,0 +1,18 @@ +define(CastMember::class, function (Faker $faker) { + + $types = [CastMember::TYPE_DIRECTOR, CastMember::TYPE_ACTOR]; + return [ + 'name' => $faker->lastName, + 'type' => $types[array_rand($types)] + ]; +}); diff --git a/database/migrations/2021_09_04_141318_create_cast_members_table.php b/database/migrations/2021_09_04_141318_create_cast_members_table.php new file mode 100644 index 000000000..d3d93b5f7 --- /dev/null +++ b/database/migrations/2021_09_04_141318_create_cast_members_table.php @@ -0,0 +1,34 @@ +uuid('id')->primary(); + $table->string('name'); + $table->smallInteger('type'); + $table->softDeletes(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('cast_members'); + } +} diff --git a/database/seeds/CastMemberSeeder.php b/database/seeds/CastMemberSeeder.php new file mode 100644 index 000000000..2e695e03f --- /dev/null +++ b/database/seeds/CastMemberSeeder.php @@ -0,0 +1,16 @@ +create(); + } +} diff --git a/routes/api.php b/routes/api.php index 00435087f..6d19dc334 100644 --- a/routes/api.php +++ b/routes/api.php @@ -25,4 +25,5 @@ ]; Route::resource('categories', 'CategoryController', $exceptCreateAndEdit); Route::resource('genres', 'GenreController', $exceptCreateAndEdit); + Route::resource('cast_members', 'CastMemberController', $exceptCreateAndEdit); }); diff --git a/tests/Feature/Http/Controllers/Api/CastMemberControllerTest.php b/tests/Feature/Http/Controllers/Api/CastMemberControllerTest.php new file mode 100644 index 000000000..3d4e7cbea --- /dev/null +++ b/tests/Feature/Http/Controllers/Api/CastMemberControllerTest.php @@ -0,0 +1,35 @@ +castMember = factory(CastMember::class)->create([ + 'type' => CastMember::TYPE_DIRECTOR + ]); + } + + public function testIndex() + { + $response = $this->get(route('cast_members.index')); + + $response + ->assertStatus(200) + ->assertJson([$this->castMember->toArray()]); + } +} diff --git a/tests/Unit/Models/CastMemberTest.php b/tests/Unit/Models/CastMemberTest.php new file mode 100644 index 000000000..53f69fb85 --- /dev/null +++ b/tests/Unit/Models/CastMemberTest.php @@ -0,0 +1,18 @@ +assertTrue(true); + } +} From cdb15c7664272ff251fb32f78505c283cc62e20a Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Sat, 4 Sep 2021 12:23:40 -0300 Subject: [PATCH 49/61] trying to fix SQL error at cloudbuild with migrate:fresh --- .github/workflows/cloudbuild.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cloudbuild.yaml b/.github/workflows/cloudbuild.yaml index bf6ed3f12..306b8be93 100644 --- a/.github/workflows/cloudbuild.yaml +++ b/.github/workflows/cloudbuild.yaml @@ -38,7 +38,7 @@ jobs: run: docker exec -t micro-videos-app php /var/www/artisan key:generate - name: "Rodando migrations" - run: docker exec -t micro-videos-app php /var/www/artisan migrate + run: docker exec -t micro-videos-app php /var/www/artisan migrate:fresh - name: "Rodando Phpunit" run: docker exec -t micro-videos-app php /var/www/vendor/bin/phpunit -c /var/www/phpunit.xml From 5298615df65023e235e8a8abbbac511f83e61a01 Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Sat, 4 Sep 2021 15:13:51 -0300 Subject: [PATCH 50/61] finish cast_member and remove --prefer-dist --optimize-autoloader from cloud build --- .github/workflows/cloudbuild.yaml | 4 +- .../Api/CastMemberControllerTest.php | 80 +++++++++++++++++++ tests/Unit/Models/CastMemberTest.php | 18 ----- 3 files changed, 82 insertions(+), 20 deletions(-) delete mode 100644 tests/Unit/Models/CastMemberTest.php diff --git a/.github/workflows/cloudbuild.yaml b/.github/workflows/cloudbuild.yaml index 306b8be93..98ae5b5f0 100644 --- a/.github/workflows/cloudbuild.yaml +++ b/.github/workflows/cloudbuild.yaml @@ -26,7 +26,7 @@ jobs: run: docker exec -u root -t micro-videos-app chown -R www-data:www-data /var/www - name: "Rodando composer" - run: docker exec -t micro-videos-app composer install --no-interaction --prefer-dist --optimize-autoloader -d /var/www + run: docker exec -t micro-videos-app composer install --no-interaction -d /var/www - name: "Copiando backend .env" run: docker exec -t micro-videos-app cp .env.example /var/www/.env @@ -38,7 +38,7 @@ jobs: run: docker exec -t micro-videos-app php /var/www/artisan key:generate - name: "Rodando migrations" - run: docker exec -t micro-videos-app php /var/www/artisan migrate:fresh + run: docker exec -t micro-videos-app php /var/www/artisan migrate - name: "Rodando Phpunit" run: docker exec -t micro-videos-app php /var/www/vendor/bin/phpunit -c /var/www/phpunit.xml diff --git a/tests/Feature/Http/Controllers/Api/CastMemberControllerTest.php b/tests/Feature/Http/Controllers/Api/CastMemberControllerTest.php index 3d4e7cbea..8afb3498d 100644 --- a/tests/Feature/Http/Controllers/Api/CastMemberControllerTest.php +++ b/tests/Feature/Http/Controllers/Api/CastMemberControllerTest.php @@ -32,4 +32,84 @@ public function testIndex() ->assertStatus(200) ->assertJson([$this->castMember->toArray()]); } + + public function testShow() + { + $response = $this->get(route('cast_members.show', ['cast_member' => $this->castMember->id])); + + $response + ->assertStatus(200) + ->assertJson($this->castMember->toArray()); + } + + public function testInvalidationData() + { + $data = [ + 'name' => '', + 'type' => '' + ]; + $this->assertInvalidationInStoreAction($data, 'required'); + $this->assertInvalidationInUpdateAction($data, 'required'); + + $data = [ + 'type' => 's' + ]; + $this->assertInvalidationInStoreAction($data, 'in'); + $this->assertInvalidationInUpdateAction($data, 'in'); + } + + public function testStore() + { + $data = [ + [ + 'name' => 'test', + 'type' => CastMember::TYPE_DIRECTOR + ], + [ + 'name' => 'test', + 'type' => CastMember::TYPE_ACTOR + ] + ]; + foreach ($data as $key => $value){ + $response = $this->assertStore($value, $value + ['deleted_at' => null]); + $response->assertJsonStructure([ + 'created_at', 'updated_at' + ]); + } + } + + public function testUpdate() + { + $data = [ + 'name' => 'test', + 'type' => CastMember::TYPE_ACTOR + ]; + $response = $this->assertUpdate($data, $data + ['deleted_at' => null]); + $response->assertJsonStructure([ + 'created_at', 'updated_at' + ]); + } + + public function testDestroy() + { + $response = $this->json('DELETE', route('cast_members.destroy', ['cast_member' => $this->castMember->id])); + $response->assertStatus(204); + $this->assertNull(CastMember::find($this->castMember->id)); + $this->assertNotNull(CastMember::withTrashed()->find($this->castMember->id)); + } + + protected function routeStore() + { + return route('cast_members.store'); + } + + protected function routeUpdate() + { + return route('cast_members.update', ['cast_member' => $this->castMember->id]); + } + + protected function model() + { + return CastMember::class; + } } diff --git a/tests/Unit/Models/CastMemberTest.php b/tests/Unit/Models/CastMemberTest.php deleted file mode 100644 index 53f69fb85..000000000 --- a/tests/Unit/Models/CastMemberTest.php +++ /dev/null @@ -1,18 +0,0 @@ -assertTrue(true); - } -} From 84b7b1e407522cd6e021d86ba24a77c11954c702 Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Mon, 6 Sep 2021 10:57:59 -0300 Subject: [PATCH 51/61] remove local SQL volume to fix CI build --- docker-compose.prod.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/docker-compose.prod.yaml b/docker-compose.prod.yaml index 159e6c6a9..a89879acb 100644 --- a/docker-compose.prod.yaml +++ b/docker-compose.prod.yaml @@ -37,7 +37,6 @@ services: ports: - "33006:3306" volumes: - - ./.docker/dbdata:/var/lib/mysql - ./.docker/mysql:/docker-entrypoint-initdb.d environment: - MYSQL_ROOT_PASSWORD=root From e8be91a7d48616a407b458953d149530bb3f1575 Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Mon, 6 Sep 2021 16:10:51 -0300 Subject: [PATCH 52/61] add CastMemberUnitTest & adjust UnitTest names --- app/Models/CastMember.php | 4 ++ tests/Unit/Models/CategoryTest.php | 84 ------------------------------ tests/Unit/Models/GenreTest.php | 52 ------------------ 3 files changed, 4 insertions(+), 136 deletions(-) delete mode 100644 tests/Unit/Models/CategoryTest.php delete mode 100644 tests/Unit/Models/GenreTest.php diff --git a/app/Models/CastMember.php b/app/Models/CastMember.php index 9743d1707..9df30483b 100644 --- a/app/Models/CastMember.php +++ b/app/Models/CastMember.php @@ -12,6 +12,10 @@ class CastMember extends Model protected $fillable = ['name', 'type']; protected $dates = ['deleted_at']; public $incrementing = false; + protected $casts = [ + 'id' => 'string', + 'type' => 'integer' + ]; const TYPE_DIRECTOR = 1; const TYPE_ACTOR = 2; diff --git a/tests/Unit/Models/CategoryTest.php b/tests/Unit/Models/CategoryTest.php deleted file mode 100644 index d4835f0a4..000000000 --- a/tests/Unit/Models/CategoryTest.php +++ /dev/null @@ -1,84 +0,0 @@ -category = new Category(); - } - - // protected function teardown(): void - // { - // // things to do before flush - // parent::tearDown(); // called after each test - // // things to do after flush - // } - - // public static function tearDownAfterClass(): void - // { - // // things to do before flush - // parent::tearDown(); // called after the last test - // // things to do after flush - // } - - public function testFillableAttribute() - { - $fillable = ['name', 'description', 'is_active']; - $this->assertEquals($fillable, $this->category->getFillable()); - } - - public function testIfUseTraits() - { - $traits = [ - SoftDeletes::class, Uuid::class - ]; - $categoryTraits = array_keys(class_uses(Category::class)); - $this->assertEquals($traits, $categoryTraits); - // print_r(); - } - - public function testCasts() - { - $casts = ['id' => 'string', 'is_active' => 'boolean']; - $this->assertEquals($casts, $this->category->getCasts()); - } - - public function testIncrementing() - { - $this->assertFalse($this->category->incrementing); - } - - public function testDatesAttributes() - { - $dates = ['deleted_at', 'created_at', 'updated_at']; - foreach ($dates as $date) { - $this->assertContains($date, $this->category->getDates()); - } - $this->assertCount(count($dates), $this->category->getDates()); - } - - public function testDatesAttributesCanonical() - { - $dates = ['deleted_at', 'created_at', 'updated_at']; - $this->assertEqualsCanonicalizing($dates, $this->category->getDates()); - // foreach ($dates as $date) { - // $this->assertContains($date, $this->category->getDates()); - // } - $this->assertCount(count($dates), $this->category->getDates()); - } -} diff --git a/tests/Unit/Models/GenreTest.php b/tests/Unit/Models/GenreTest.php deleted file mode 100644 index 8dbbc7c59..000000000 --- a/tests/Unit/Models/GenreTest.php +++ /dev/null @@ -1,52 +0,0 @@ -genre = new Genre(); - } - - public function testFillableAttribute() - { - $fillable = ['name', 'is_active']; - $this->assertEquals($fillable, $this->genre->getFillable()); - } - - public function testIfUseTraits() - { - $traits = [ - SoftDeletes::class, Uuid::class - ]; - $genreTraits = array_keys(class_uses(Genre::class)); - $this->assertEquals($traits, $genreTraits); - } - - public function testCasts() - { - $casts = ['id' => 'string', 'is_active' => 'boolean']; - $this->assertEquals($casts, $this->genre->getCasts()); - } - - public function testIncrementing() - { - $this->assertFalse($this->genre->incrementing); - } - - public function testDatesAttributes() - { - $dates = ['deleted_at', 'created_at', 'updated_at']; - $this->assertEqualsCanonicalizing($dates, $this->genre->getDates()); - $this->assertCount(count($dates), $this->genre->getDates()); - } -} From d876e881863c08d44c6330d249c191fd93859fa5 Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Mon, 6 Sep 2021 17:45:02 -0300 Subject: [PATCH 53/61] add video --- .../Controllers/Api/CategoryController.php | 1 - app/Http/Controllers/Api/GenreController.php | 1 - app/Http/Controllers/Api/VideoController.php | 34 ++++++++ app/Models/CastMember.php | 6 +- app/Models/Video.php | 34 ++++++++ database/factories/CastMemberFactory.php | 1 + database/factories/VideoFactory.php | 25 ++++++ .../2021_09_06_191937_create_videos_table.php | 38 +++++++++ database/seeds/DatabaseSeeder.php | 2 + database/seeds/VideoSeeder.php | 16 ++++ routes/api.php | 1 + tests/Unit/Models/CastMemberUnitTest.php | 53 ++++++++++++ tests/Unit/Models/CategoryUnitTest.php | 84 +++++++++++++++++++ tests/Unit/Models/GenreUnitTest.php | 52 ++++++++++++ 14 files changed, 343 insertions(+), 5 deletions(-) create mode 100644 app/Http/Controllers/Api/VideoController.php create mode 100644 app/Models/Video.php create mode 100644 database/factories/VideoFactory.php create mode 100644 database/migrations/2021_09_06_191937_create_videos_table.php create mode 100644 database/seeds/VideoSeeder.php create mode 100644 tests/Unit/Models/CastMemberUnitTest.php create mode 100644 tests/Unit/Models/CategoryUnitTest.php create mode 100644 tests/Unit/Models/GenreUnitTest.php diff --git a/app/Http/Controllers/Api/CategoryController.php b/app/Http/Controllers/Api/CategoryController.php index f20c39085..49b3dd4be 100644 --- a/app/Http/Controllers/Api/CategoryController.php +++ b/app/Http/Controllers/Api/CategoryController.php @@ -2,7 +2,6 @@ namespace App\Http\Controllers\Api; -use App\Http\Controllers\Controller; use App\Models\Category; use Illuminate\Http\Request; diff --git a/app/Http/Controllers/Api/GenreController.php b/app/Http/Controllers/Api/GenreController.php index 1ae6c3e2b..d5dbd4be3 100644 --- a/app/Http/Controllers/Api/GenreController.php +++ b/app/Http/Controllers/Api/GenreController.php @@ -2,7 +2,6 @@ namespace App\Http\Controllers\Api; -use App\Http\Controllers\Controller; use App\Models\Genre; use Illuminate\Http\Request; diff --git a/app/Http/Controllers/Api/VideoController.php b/app/Http/Controllers/Api/VideoController.php new file mode 100644 index 000000000..3c76e43aa --- /dev/null +++ b/app/Http/Controllers/Api/VideoController.php @@ -0,0 +1,34 @@ +rules = [ + // 'name' => 'required|max:255', + // 'type' => 'required|in:' . implode(',', [CastMember::TYPE_ACTOR, CastMember::TYPE_DIRECTOR]) + // ]; + } + + protected function model() + { + return Video::class; + } + + protected function rulesStore() + { + //return $this->rules; + } + + protected function rulesUpdate() + { + //return $this->rules; + } +} diff --git a/app/Models/CastMember.php b/app/Models/CastMember.php index 9df30483b..4c1b6efb2 100644 --- a/app/Models/CastMember.php +++ b/app/Models/CastMember.php @@ -9,6 +9,9 @@ class CastMember extends Model { use SoftDeletes, Traits\Uuid; + const TYPE_DIRECTOR = 1; + const TYPE_ACTOR = 2; + protected $fillable = ['name', 'type']; protected $dates = ['deleted_at']; public $incrementing = false; @@ -16,7 +19,4 @@ class CastMember extends Model 'id' => 'string', 'type' => 'integer' ]; - - const TYPE_DIRECTOR = 1; - const TYPE_ACTOR = 2; } diff --git a/app/Models/Video.php b/app/Models/Video.php new file mode 100644 index 000000000..6f815ecfe --- /dev/null +++ b/app/Models/Video.php @@ -0,0 +1,34 @@ + 'string', + 'opened' => 'boolean', + 'year_launched' => 'integer', + 'duration' => 'integer' + ]; +} diff --git a/database/factories/CastMemberFactory.php b/database/factories/CastMemberFactory.php index 40d8dfa1b..32a27dfb4 100644 --- a/database/factories/CastMemberFactory.php +++ b/database/factories/CastMemberFactory.php @@ -8,6 +8,7 @@ $factory->define(CastMember::class, function (Faker $faker) { $types = [CastMember::TYPE_DIRECTOR, CastMember::TYPE_ACTOR]; + return [ 'name' => $faker->lastName, 'type' => $types[array_rand($types)] diff --git a/database/factories/VideoFactory.php b/database/factories/VideoFactory.php new file mode 100644 index 000000000..2c3d5d462 --- /dev/null +++ b/database/factories/VideoFactory.php @@ -0,0 +1,25 @@ +define(Video::class, function (Faker $faker) { + + $rating = Video::RATING_LIST[array_rand(Video::RATING_LIST)]; + + return [ + 'title' => $faker->sentence(3), + 'description' => $faker->sentence(10), + 'year_launched' => rand(1895, 2020), + 'opened' => rand(0, 1), + 'rating' => $rating, + 'duration' => rand(1, 30), + // 'thumb_file' => null, + // 'banner_file' => null, + // 'trailer_file' => null, + // 'video_file' => null, + // 'published' => rand(0, 1) + ]; +}); diff --git a/database/migrations/2021_09_06_191937_create_videos_table.php b/database/migrations/2021_09_06_191937_create_videos_table.php new file mode 100644 index 000000000..3157e1485 --- /dev/null +++ b/database/migrations/2021_09_06_191937_create_videos_table.php @@ -0,0 +1,38 @@ +uuid('id')->primary(); + $table->string('title'); + $table->text('description'); + $table->smallInteger('year_launched'); + $table->boolean('opened')->default(false); + $table->string('rating', 3); + $table->smallInteger('duration'); + $table->softDeletes(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('videos'); + } +} diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php index f913aebc3..6d9ba4b1f 100644 --- a/database/seeds/DatabaseSeeder.php +++ b/database/seeds/DatabaseSeeder.php @@ -14,5 +14,7 @@ public function run() // $this->call(UsersTableSeeder::class); $this->call(CategoriesTableSeeder::class); $this->call(GenreSeeder::class); + $this->call(CastMemberSeeder::class); + $this->call(VideoSeeder::class); } } diff --git a/database/seeds/VideoSeeder.php b/database/seeds/VideoSeeder.php new file mode 100644 index 000000000..4320d54f6 --- /dev/null +++ b/database/seeds/VideoSeeder.php @@ -0,0 +1,16 @@ +create(); + } +} diff --git a/routes/api.php b/routes/api.php index 6d19dc334..c249b40a0 100644 --- a/routes/api.php +++ b/routes/api.php @@ -26,4 +26,5 @@ Route::resource('categories', 'CategoryController', $exceptCreateAndEdit); Route::resource('genres', 'GenreController', $exceptCreateAndEdit); Route::resource('cast_members', 'CastMemberController', $exceptCreateAndEdit); + Route::resource('videos', 'VideoController', $exceptCreateAndEdit); }); diff --git a/tests/Unit/Models/CastMemberUnitTest.php b/tests/Unit/Models/CastMemberUnitTest.php new file mode 100644 index 000000000..db52558bb --- /dev/null +++ b/tests/Unit/Models/CastMemberUnitTest.php @@ -0,0 +1,53 @@ +castMember = new CastMember(); + } + + public function testFillableAttribute() + { + $fillable = ['name', 'type']; + $this->assertEquals($fillable, $this->castMember->getFillable()); + } + + public function testIfUseTraits() + { + $traits = [ + SoftDeletes::class, + Uuid::class + ]; + $castMemberTraits = array_keys(class_uses(CastMember::class)); + $this->assertEquals($traits, $castMemberTraits); + } + + public function testCastsAttribute() + { + $casts = ['id' => 'string', 'type' => 'integer']; + $this->assertEquals($casts, $this->castMember->getCasts()); + } + + public function testIncrementing() + { + $this->assertFalse($this->castMember->incrementing); + } + + public function testDatesAttributes() + { + $dates = ['deleted_at', 'created_at', 'updated_at']; + $this->assertEqualsCanonicalizing($dates, $this->castMember->getDates()); + $this->assertCount(count($dates), $this->castMember->getDates()); + } +} diff --git a/tests/Unit/Models/CategoryUnitTest.php b/tests/Unit/Models/CategoryUnitTest.php new file mode 100644 index 000000000..f7315db3f --- /dev/null +++ b/tests/Unit/Models/CategoryUnitTest.php @@ -0,0 +1,84 @@ +category = new Category(); + } + + // protected function teardown(): void + // { + // // things to do before flush + // parent::tearDown(); // called after each test + // // things to do after flush + // } + + // public static function tearDownAfterClass(): void + // { + // // things to do before flush + // parent::tearDown(); // called after the last test + // // things to do after flush + // } + + public function testFillableAttribute() + { + $fillable = ['name', 'description', 'is_active']; + $this->assertEquals($fillable, $this->category->getFillable()); + } + + public function testIfUseTraits() + { + $traits = [ + SoftDeletes::class, Uuid::class + ]; + $categoryTraits = array_keys(class_uses(Category::class)); + $this->assertEquals($traits, $categoryTraits); + // print_r(); + } + + public function testCasts() + { + $casts = ['id' => 'string', 'is_active' => 'boolean']; + $this->assertEquals($casts, $this->category->getCasts()); + } + + public function testIncrementing() + { + $this->assertFalse($this->category->incrementing); + } + + public function testDatesAttributes() + { + $dates = ['deleted_at', 'created_at', 'updated_at']; + foreach ($dates as $date) { + $this->assertContains($date, $this->category->getDates()); + } + $this->assertCount(count($dates), $this->category->getDates()); + } + + public function testDatesAttributesCanonical() + { + $dates = ['deleted_at', 'created_at', 'updated_at']; + $this->assertEqualsCanonicalizing($dates, $this->category->getDates()); + // foreach ($dates as $date) { + // $this->assertContains($date, $this->category->getDates()); + // } + $this->assertCount(count($dates), $this->category->getDates()); + } +} diff --git a/tests/Unit/Models/GenreUnitTest.php b/tests/Unit/Models/GenreUnitTest.php new file mode 100644 index 000000000..ceae07e93 --- /dev/null +++ b/tests/Unit/Models/GenreUnitTest.php @@ -0,0 +1,52 @@ +genre = new Genre(); + } + + public function testFillableAttribute() + { + $fillable = ['name', 'is_active']; + $this->assertEquals($fillable, $this->genre->getFillable()); + } + + public function testIfUseTraits() + { + $traits = [ + SoftDeletes::class, Uuid::class + ]; + $genreTraits = array_keys(class_uses(Genre::class)); + $this->assertEquals($traits, $genreTraits); + } + + public function testCasts() + { + $casts = ['id' => 'string', 'is_active' => 'boolean']; + $this->assertEquals($casts, $this->genre->getCasts()); + } + + public function testIncrementing() + { + $this->assertFalse($this->genre->incrementing); + } + + public function testDatesAttributes() + { + $dates = ['deleted_at', 'created_at', 'updated_at']; + $this->assertEqualsCanonicalizing($dates, $this->genre->getDates()); + $this->assertCount(count($dates), $this->genre->getDates()); + } +} From 258281163e42a12d8197f314df8f96a61eb57604 Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Mon, 6 Sep 2021 18:28:10 -0300 Subject: [PATCH 54/61] add video controller test --- app/Http/Controllers/Api/VideoController.php | 16 +- .../Controllers/Api/VideoControllerTest.php | 174 ++++++++++++++++++ 2 files changed, 184 insertions(+), 6 deletions(-) create mode 100644 tests/Feature/Http/Controllers/Api/VideoControllerTest.php diff --git a/app/Http/Controllers/Api/VideoController.php b/app/Http/Controllers/Api/VideoController.php index 3c76e43aa..53f096355 100644 --- a/app/Http/Controllers/Api/VideoController.php +++ b/app/Http/Controllers/Api/VideoController.php @@ -11,10 +11,14 @@ class VideoController extends BasicCrudController public function __construct() // this is the only way to initialize { - // $this->rules = [ - // 'name' => 'required|max:255', - // 'type' => 'required|in:' . implode(',', [CastMember::TYPE_ACTOR, CastMember::TYPE_DIRECTOR]) - // ]; + $this->rules = [ + 'title' => 'required|max:255', + 'description' => 'required', + 'year_launched' => 'required|date_format:Y', + 'opened' => 'boolean', + 'rating' => 'required|in:' . implode(',', Video::RATING_LIST), + 'duration' => 'required|integer' + ]; } protected function model() @@ -24,11 +28,11 @@ protected function model() protected function rulesStore() { - //return $this->rules; + return $this->rules; } protected function rulesUpdate() { - //return $this->rules; + return $this->rules; } } diff --git a/tests/Feature/Http/Controllers/Api/VideoControllerTest.php b/tests/Feature/Http/Controllers/Api/VideoControllerTest.php new file mode 100644 index 000000000..e4a1c991f --- /dev/null +++ b/tests/Feature/Http/Controllers/Api/VideoControllerTest.php @@ -0,0 +1,174 @@ +video = factory(Video::class)->create(); + } + + public function testIndex() + { + $response = $this->get(route('videos.index')); + + $response + ->assertStatus(200) + ->assertJson([$this->video->toArray()]); + } + + public function testShow() + { + $response = $this->get(route('videos.show', ['video' => $this->video->id])); + + $response + ->assertStatus(200) + ->assertJson($this->video->toArray()); + } + + public function testInvalidationRequired() + { + $data = [ + 'title' => '', + 'description' => '', + 'year_launched' => '', + 'rating' => '', + 'duration' => '' + ]; + $this->assertInvalidationInStoreAction($data, 'required'); + $this->assertInvalidationInUpdateAction($data, 'required'); + + } + + public function testInvalidationMax() + { + $data = [ + 'title' => str_repeat('a', 256) + ]; + $this->assertInvalidationInStoreAction($data, 'max.string', ['max' => 255]); + $this->assertInvalidationInUpdateAction($data, 'max.string', ['max' => 255]); + + } + + public function testInvalidationInteger() + { + $data = [ + 'duration' => 'a' + ]; + $this->assertInvalidationInStoreAction($data, 'integer'); + $this->assertInvalidationInUpdateAction($data, 'integer'); + } + + public function testInvalidationYearLaunchedField() + { + $data = [ + 'year_launched' => 'a' + ]; + $this->assertInvalidationInStoreAction($data, 'date_format', ['format' => 'Y']); + $this->assertInvalidationInUpdateAction($data, 'date_format', ['format' => 'Y']); + } + + public function testInvalidationOpenedField() + { + $data = [ + 'opened' => 'a' + ]; + $this->assertInvalidationInStoreAction($data, 'boolean'); + $this->assertInvalidationInUpdateAction($data, 'boolean'); + } + + public function testInvalidationRatingField() + { + $data = [ + 'rating' => 'a' + ]; + $this->assertInvalidationInStoreAction($data, 'in'); + $this->assertInvalidationInUpdateAction($data, 'in'); + } + + public function testStore() + { + $data = [ + 'title' => 'test' + ]; + $response = $this->assertStore($data, $data + ['description' => null, 'is_active' => true, 'deleted_at' => null]); + $response->assertJsonStructure([ + 'created_at', 'updated_at' + ]); + + $data = [ + 'name' => 'test', + 'description' => 'description', + 'is_active' => false + ]; + $this->assertStore($data, $data + ['description' => 'description', 'is_active' => false]); + } + + public function testUpdate() + { + $this->video = factory(Video::class)->create([ + 'is_active' => false, + 'description' => 'description' + ]); + $data = [ + 'name' => 'test', + 'description' => 'test', + 'is_active' => true + ]; + $response = $this->assertUpdate($data, $data + ['deleted_at' => null]); + $response->assertJsonStructure([ + 'created_at', 'updated_at' + ]); + + $data = [ + 'name' => 'test', + 'description' => '', + 'is_active' => true + ]; + $this->assertUpdate($data, array_merge($data, ['description' => null])); + + $data['description'] = 'test'; + $this->assertUpdate($data, array_merge($data, ['description' => 'test'])); + + $data['description'] = null; + $this->assertUpdate($data, array_merge($data, ['description' => null])); + } + + public function testDestroy() + { + $response = $this->json('DELETE', route('videos.destroy', ['video' => $this->video->id])); + $response->assertStatus(204); + $this->assertNull(Video::find($this->video->id)); + $this->assertNotNull(Video::withTrashed()->find($this->video->id)); + } + + protected function routeStore() + { + return route('videos.store'); + } + + protected function routeUpdate() + { + return route('videos.update', ['video' => $this->video->id]); + } + + protected function model() + { + return Video::class; + } +} From f2b13912c3404e4a043a3085388a1722c145cfbf Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Mon, 6 Sep 2021 19:58:06 -0300 Subject: [PATCH 55/61] testando crud de videos parte2 --- .../Controllers/Api/BasicCrudController.php | 1 + .../Controllers/Api/VideoControllerTest.php | 89 ++++++++++--------- 2 files changed, 46 insertions(+), 44 deletions(-) diff --git a/app/Http/Controllers/Api/BasicCrudController.php b/app/Http/Controllers/Api/BasicCrudController.php index 5bbab7d50..53daa795a 100644 --- a/app/Http/Controllers/Api/BasicCrudController.php +++ b/app/Http/Controllers/Api/BasicCrudController.php @@ -43,6 +43,7 @@ public function update(Request $request, $id) $obj = $this->findOrFail($id); $validatedData = $this->validate($request, $this->rulesUpdate()); $obj->update($validatedData); + $obj->refresh(); // added refresh to fix VideoControllerTest.TestSave() return $obj; } diff --git a/tests/Feature/Http/Controllers/Api/VideoControllerTest.php b/tests/Feature/Http/Controllers/Api/VideoControllerTest.php index e4a1c991f..d6b2a25ef 100644 --- a/tests/Feature/Http/Controllers/Api/VideoControllerTest.php +++ b/tests/Feature/Http/Controllers/Api/VideoControllerTest.php @@ -7,6 +7,7 @@ use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Foundation\Testing\TestResponse; use Illuminate\Foundation\Testing\WithFaker; +use PHPUnit\Framework\Test; use Tests\TestCase; use Tests\Traits\TestSaves; use Tests\Traits\TestValidations; @@ -16,11 +17,19 @@ class VideoControllerTest extends TestCase use DatabaseMigrations, TestValidations, TestSaves; private $video; + private $sendData; protected function setUp():void { parent::setUp(); $this->video = factory(Video::class)->create(); + $this->sendData = [ + 'title' => 'title', + 'description' => 'description', + 'year_launched' => 2010, + 'rating' => Video::RATING_LIST[0], + 'duration' => 90 + ]; } public function testIndex() @@ -101,52 +110,44 @@ public function testInvalidationRatingField() $this->assertInvalidationInUpdateAction($data, 'in'); } - public function testStore() - { - $data = [ - 'title' => 'test' - ]; - $response = $this->assertStore($data, $data + ['description' => null, 'is_active' => true, 'deleted_at' => null]); - $response->assertJsonStructure([ - 'created_at', 'updated_at' - ]); - - $data = [ - 'name' => 'test', - 'description' => 'description', - 'is_active' => false - ]; - $this->assertStore($data, $data + ['description' => 'description', 'is_active' => false]); - } - - public function testUpdate() + public function testSave() { - $this->video = factory(Video::class)->create([ - 'is_active' => false, - 'description' => 'description' - ]); - $data = [ - 'name' => 'test', - 'description' => 'test', - 'is_active' => true - ]; - $response = $this->assertUpdate($data, $data + ['deleted_at' => null]); - $response->assertJsonStructure([ - 'created_at', 'updated_at' - ]); - $data = [ - 'name' => 'test', - 'description' => '', - 'is_active' => true - ]; - $this->assertUpdate($data, array_merge($data, ['description' => null])); - - $data['description'] = 'test'; - $this->assertUpdate($data, array_merge($data, ['description' => 'test'])); - - $data['description'] = null; - $this->assertUpdate($data, array_merge($data, ['description' => null])); + [ + 'send_data' => $this->sendData, + 'test_data' => $this->sendData + ['opened' => false] + ], + [ + 'send_data' => $this->sendData + ['opened' => true], + 'test_data' => $this->sendData + ['opened' => true] + ], + [ + 'send_data' => $this->sendData + ['rating' => Video::RATING_LIST[1]], + 'test_data' => $this->sendData + ['rating' => Video::RATING_LIST[1]] + ] + ]; + + foreach ($data as $key => $value){ + $response = $this->assertStore( + $value['send_data'], + $value['test_data'] + ['deleted_at' => null] + ); + + $response->assertJsonStructure([ + 'created_at', + 'updated_at' + ]); + + $response = $this->assertUpdate( + $value['send_data'], + $value['test_data'] + ['deleted_at' => null] + ); + + $response->assertJsonStructure([ + 'created_at', + 'updated_at' + ]); + } } public function testDestroy() From 946c301284158ea7a829160134c64a7576f22b78 Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Wed, 8 Sep 2021 12:28:26 -0300 Subject: [PATCH 56/61] testando invalidacao dos relacionamentos de video --- app/Http/Controllers/Api/VideoController.php | 27 +++++++++++++- app/Models/Video.php | 10 +++++ ..._08_133317_create_category_video_table.php | 34 +++++++++++++++++ ..._09_08_134556_create_genre_video_table.php | 34 +++++++++++++++++ .../Controllers/Api/VideoControllerTest.php | 37 +++++++++++++++++-- 5 files changed, 138 insertions(+), 4 deletions(-) create mode 100644 database/migrations/2021_09_08_133317_create_category_video_table.php create mode 100644 database/migrations/2021_09_08_134556_create_genre_video_table.php diff --git a/app/Http/Controllers/Api/VideoController.php b/app/Http/Controllers/Api/VideoController.php index 53f096355..f86668551 100644 --- a/app/Http/Controllers/Api/VideoController.php +++ b/app/Http/Controllers/Api/VideoController.php @@ -17,10 +17,35 @@ public function __construct() // this is the only way to initialize 'year_launched' => 'required|date_format:Y', 'opened' => 'boolean', 'rating' => 'required|in:' . implode(',', Video::RATING_LIST), - 'duration' => 'required|integer' + 'duration' => 'required|integer', + 'categories_id' => 'required|array|exists:categories,id', + 'genres_id' => 'required|array|exists:genres,id' ]; } + public function store(Request $request) + { + $validatedData = $this->validate($request, $this->rulesStore()); + + /** @var Video $obj */ + $obj = $this->model()::create($validatedData); + $obj->categories()->sync($request->get('categories_id')); + $obj->genres()->sync($request->get('genres_id')); + $obj->refresh(); + return $obj; + } + + public function update(Request $request, $id) + { + $obj = $this->findOrFail($id); + $validatedData = $this->validate($request, $this->rulesUpdate()); + $obj->update($validatedData); + $obj->categories()->sync($request->get('categories_id')); + $obj->genres()->sync($request->get('genres_id')); + $obj->refresh(); // added refresh to fix VideoControllerTest.TestSave() + return $obj; + } + protected function model() { return Video::class; diff --git a/app/Models/Video.php b/app/Models/Video.php index 6f815ecfe..e38920e03 100644 --- a/app/Models/Video.php +++ b/app/Models/Video.php @@ -31,4 +31,14 @@ class Video extends Model 'year_launched' => 'integer', 'duration' => 'integer' ]; + + public function categories() + { + return $this->belongsToMany(Category::class); + } + + public function genres() + { + return $this->belongsToMany(Genre::class); + } } diff --git a/database/migrations/2021_09_08_133317_create_category_video_table.php b/database/migrations/2021_09_08_133317_create_category_video_table.php new file mode 100644 index 000000000..6bdd7b6f9 --- /dev/null +++ b/database/migrations/2021_09_08_133317_create_category_video_table.php @@ -0,0 +1,34 @@ +uuid('category_id')->index(); + $table->foreign('category_id')->references('id')->on('categories'); + $table->uuid('video_id')->index(); + $table->foreign('video_id')->references('id')->on('videos'); + $table->unique('category_id', 'video_id'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('category_video'); + } +} diff --git a/database/migrations/2021_09_08_134556_create_genre_video_table.php b/database/migrations/2021_09_08_134556_create_genre_video_table.php new file mode 100644 index 000000000..8a016f526 --- /dev/null +++ b/database/migrations/2021_09_08_134556_create_genre_video_table.php @@ -0,0 +1,34 @@ +uuid('genre_id')->index(); + $table->foreign('genre_id')->references('id')->on('genres'); + $table->uuid('video_id')->index(); + $table->foreign('video_id')->references('id')->on('videos'); + $table->unique('genre_id', 'video_id'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('genre_video'); + } +} diff --git a/tests/Feature/Http/Controllers/Api/VideoControllerTest.php b/tests/Feature/Http/Controllers/Api/VideoControllerTest.php index d6b2a25ef..c561f093e 100644 --- a/tests/Feature/Http/Controllers/Api/VideoControllerTest.php +++ b/tests/Feature/Http/Controllers/Api/VideoControllerTest.php @@ -57,11 +57,12 @@ public function testInvalidationRequired() 'description' => '', 'year_launched' => '', 'rating' => '', - 'duration' => '' + 'duration' => '', + 'categories_id' => '', + 'genres_id' => '' ]; $this->assertInvalidationInStoreAction($data, 'required'); - $this->assertInvalidationInUpdateAction($data, 'required'); - + $this->assertInvalidationInUpdateAction($data, 'required'); } public function testInvalidationMax() @@ -110,6 +111,36 @@ public function testInvalidationRatingField() $this->assertInvalidationInUpdateAction($data, 'in'); } + public function testInvalidationCategoriesIdField() + { + $data = [ + 'categories_id' => 'a' + ]; + $this->assertInvalidationInStoreAction($data, 'array'); + $this->assertInvalidationInUpdateAction($data, 'array'); + + $data = [ + 'categories_id' => [100] + ]; + $this->assertInvalidationInStoreAction($data, 'exists'); + $this->assertInvalidationInUpdateAction($data, 'exists'); + } + + public function testInvalidationGenresIdField() + { + $data = [ + 'genres_id' => 'a' + ]; + $this->assertInvalidationInStoreAction($data, 'array'); + $this->assertInvalidationInUpdateAction($data, 'array'); + + $data = [ + 'genres_id' => [100] + ]; + $this->assertInvalidationInStoreAction($data, 'exists'); + $this->assertInvalidationInUpdateAction($data, 'exists'); + } + public function testSave() { $data = [ From b0735a3a05dd21b9ee30bde56385188be26f1ebb Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Wed, 8 Sep 2021 22:56:25 -0300 Subject: [PATCH 57/61] testando modo transacao --- app/Http/Controllers/Api/VideoController.php | 27 +++++--- ..._08_133317_create_category_video_table.php | 2 +- ..._09_08_134556_create_genre_video_table.php | 2 +- tests/Exceptions/TestException.php | 8 +++ .../Controllers/Api/VideoControllerTest.php | 62 +++++++++++++++++-- 5 files changed, 88 insertions(+), 13 deletions(-) create mode 100644 tests/Exceptions/TestException.php diff --git a/app/Http/Controllers/Api/VideoController.php b/app/Http/Controllers/Api/VideoController.php index f86668551..c16774884 100644 --- a/app/Http/Controllers/Api/VideoController.php +++ b/app/Http/Controllers/Api/VideoController.php @@ -26,11 +26,15 @@ public function __construct() // this is the only way to initialize public function store(Request $request) { $validatedData = $this->validate($request, $this->rulesStore()); + $self = $this; /** @var Video $obj */ - $obj = $this->model()::create($validatedData); - $obj->categories()->sync($request->get('categories_id')); - $obj->genres()->sync($request->get('genres_id')); + $obj = \DB::transaction(function () use ($request, $validatedData, $self) { + $obj = $this->model()::create($validatedData); + $self->handleRelations($obj, $request); + return $obj; + }); + $obj->refresh(); return $obj; } @@ -39,13 +43,22 @@ public function update(Request $request, $id) { $obj = $this->findOrFail($id); $validatedData = $this->validate($request, $this->rulesUpdate()); - $obj->update($validatedData); - $obj->categories()->sync($request->get('categories_id')); - $obj->genres()->sync($request->get('genres_id')); - $obj->refresh(); // added refresh to fix VideoControllerTest.TestSave() + $self = $this; + + $obj = \DB::transaction(function () use ($request, $validatedData, $self, $obj) { + $obj->update($validatedData); + $self->handleRelations($obj, $request); + return $obj; + }); return $obj; } + protected function handleRelations($video, Request $request) + { + $video->categories()->sync($request->get('categories_id')); + $video->genres()->sync($request->get('genres_id')); + } + protected function model() { return Video::class; diff --git a/database/migrations/2021_09_08_133317_create_category_video_table.php b/database/migrations/2021_09_08_133317_create_category_video_table.php index 6bdd7b6f9..9bdd7d2e6 100644 --- a/database/migrations/2021_09_08_133317_create_category_video_table.php +++ b/database/migrations/2021_09_08_133317_create_category_video_table.php @@ -18,7 +18,7 @@ public function up() $table->foreign('category_id')->references('id')->on('categories'); $table->uuid('video_id')->index(); $table->foreign('video_id')->references('id')->on('videos'); - $table->unique('category_id', 'video_id'); + $table->unique(['category_id', 'video_id']); }); } diff --git a/database/migrations/2021_09_08_134556_create_genre_video_table.php b/database/migrations/2021_09_08_134556_create_genre_video_table.php index 8a016f526..662b05b7f 100644 --- a/database/migrations/2021_09_08_134556_create_genre_video_table.php +++ b/database/migrations/2021_09_08_134556_create_genre_video_table.php @@ -18,7 +18,7 @@ public function up() $table->foreign('genre_id')->references('id')->on('genres'); $table->uuid('video_id')->index(); $table->foreign('video_id')->references('id')->on('videos'); - $table->unique('genre_id', 'video_id'); + $table->unique(['genre_id', 'video_id']); }); } diff --git a/tests/Exceptions/TestException.php b/tests/Exceptions/TestException.php new file mode 100644 index 000000000..7f83a8a7a --- /dev/null +++ b/tests/Exceptions/TestException.php @@ -0,0 +1,8 @@ +video = factory(Video::class)->create(); + $this->video = factory(Video::class)->create([ + 'opened' => false + ]); $this->sendData = [ 'title' => 'title', 'description' => 'description', @@ -143,20 +150,35 @@ public function testInvalidationGenresIdField() public function testSave() { + $category = factory(Category::class)->create(); + $genre = factory(Genre::class)->create(); + //dd($category, $genre); $data = [ [ - 'send_data' => $this->sendData, + 'send_data' => $this->sendData + [ + 'categories_id' => [$category->id], + 'genres_id' => [$genre->id] + ], 'test_data' => $this->sendData + ['opened' => false] ], [ - 'send_data' => $this->sendData + ['opened' => true], + 'send_data' => $this->sendData + [ + 'opened' => true, + 'categories_id' => [$category->id], + 'genres_id' => [$genre->id] + ], 'test_data' => $this->sendData + ['opened' => true] ], [ - 'send_data' => $this->sendData + ['rating' => Video::RATING_LIST[1]], + 'send_data' => $this->sendData + [ + 'rating' => Video::RATING_LIST[1], + 'categories_id' => [$category->id], + 'genres_id' => [$genre->id] + ], 'test_data' => $this->sendData + ['rating' => Video::RATING_LIST[1]] ] ]; + //dd($data); foreach ($data as $key => $value){ $response = $this->assertStore( @@ -181,6 +203,38 @@ public function testSave() } } + public function testRollbackStore() + { + /** @var \Mockery\MockInterface|\Mockery\LegacyMockInterface $controller */ + $controller = \Mockery::mock(VideoController::class); + + $controller + ->makePartial() + ->shouldAllowMockingProtectedMethods() + ->shouldReceive('validate') + ->withAnyArgs() + ->andReturn($this->sendData); + + $controller + ->shouldReceive('rulesStore') + ->withAnyArgs() + ->andReturn([]); + + /** @var \Mockery\MockInterface|\Mockery\LegacyMockInterface $request */ + $request = \Mockery::mock(Request::class); + + $controller + ->shouldReceive('handleRelations') + ->once() + ->andThrow(new TestException()); + + try { + $controller->store($request); + } catch (TestException $exception) { + $this->assertCount(1, Video::all()); + } + } + public function testDestroy() { $response = $this->json('DELETE', route('videos.destroy', ['video' => $this->video->id])); From a287d427d9e7ae8bab02dc8c4dd7c5961e4364d3 Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Wed, 8 Sep 2021 23:02:17 -0300 Subject: [PATCH 58/61] testando modo transacao 2 --- tests/Feature/Http/Controllers/Api/VideoControllerTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/Feature/Http/Controllers/Api/VideoControllerTest.php b/tests/Feature/Http/Controllers/Api/VideoControllerTest.php index a1675e283..dd37c5785 100644 --- a/tests/Feature/Http/Controllers/Api/VideoControllerTest.php +++ b/tests/Feature/Http/Controllers/Api/VideoControllerTest.php @@ -210,7 +210,9 @@ public function testRollbackStore() $controller ->makePartial() - ->shouldAllowMockingProtectedMethods() + ->shouldAllowMockingProtectedMethods(); + + $controller ->shouldReceive('validate') ->withAnyArgs() ->andReturn($this->sendData); From 3b57f2239b55f032c83566e020cc0f35af05f1f6 Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Thu, 9 Sep 2021 09:55:14 -0300 Subject: [PATCH 59/61] fix @var for ->store() --- tests/Feature/Http/Controllers/Api/VideoControllerTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Feature/Http/Controllers/Api/VideoControllerTest.php b/tests/Feature/Http/Controllers/Api/VideoControllerTest.php index dd37c5785..86baeffef 100644 --- a/tests/Feature/Http/Controllers/Api/VideoControllerTest.php +++ b/tests/Feature/Http/Controllers/Api/VideoControllerTest.php @@ -205,7 +205,7 @@ public function testSave() public function testRollbackStore() { - /** @var \Mockery\MockInterface|\Mockery\LegacyMockInterface $controller */ + /** @var \Mockery\MockInterface|\Mockery\LegacyMockInterface|VideoController $controller */ $controller = \Mockery::mock(VideoController::class); $controller @@ -222,7 +222,7 @@ public function testRollbackStore() ->withAnyArgs() ->andReturn([]); - /** @var \Mockery\MockInterface|\Mockery\LegacyMockInterface $request */ + /** @var \Mockery\MockInterface|\Mockery\LegacyMockInterface|Request $request */ $request = \Mockery::mock(Request::class); $controller From 18e1eeda7dbbc69838b163af3f26244ed567b2b5 Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Thu, 9 Sep 2021 09:56:46 -0300 Subject: [PATCH 60/61] fix @var for ->store() --- tests/Feature/Http/Controllers/Api/VideoControllerTest.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/Feature/Http/Controllers/Api/VideoControllerTest.php b/tests/Feature/Http/Controllers/Api/VideoControllerTest.php index 86baeffef..3471271bb 100644 --- a/tests/Feature/Http/Controllers/Api/VideoControllerTest.php +++ b/tests/Feature/Http/Controllers/Api/VideoControllerTest.php @@ -152,7 +152,6 @@ public function testSave() { $category = factory(Category::class)->create(); $genre = factory(Genre::class)->create(); - //dd($category, $genre); $data = [ [ 'send_data' => $this->sendData + [ @@ -178,7 +177,6 @@ public function testSave() 'test_data' => $this->sendData + ['rating' => Video::RATING_LIST[1]] ] ]; - //dd($data); foreach ($data as $key => $value){ $response = $this->assertStore( From 224c4e6548e631ab7abde5ea1dd31cbe39007710 Mon Sep 17 00:00:00 2001 From: Jose Motta Date: Fri, 10 Sep 2021 12:14:47 -0300 Subject: [PATCH 61/61] fix CI --- .github/workflows/cloudbuild.yaml | 29 ++++++++++++++++------------- Dockerfile | 4 +++- docker-compose.prod.yaml | 11 +++++++++-- 3 files changed, 28 insertions(+), 16 deletions(-) diff --git a/.github/workflows/cloudbuild.yaml b/.github/workflows/cloudbuild.yaml index 98ae5b5f0..c2b1fe567 100644 --- a/.github/workflows/cloudbuild.yaml +++ b/.github/workflows/cloudbuild.yaml @@ -14,7 +14,7 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: "Rodando docker-compose" - run: docker-compose -f docker-compose.prod.yaml up -d + run: docker-compose -f docker-compose.prod.yaml up -d app db redis nginx env: GOOGLE_CLOUD_PROJECT_ID: $PROJECT_ID GOOGLE_CLOUD_KEY_FILE: service-account-storage.json @@ -22,23 +22,26 @@ jobs: GOOGLE_CLOUD_STORAGE_API_URI: https://storage.cloud.google.com/code-micro-videos1 TESTING_PROD: true - - name: "Chown in /var/www" - run: docker exec -u root -t micro-videos-app chown -R www-data:www-data /var/www + # - name: "Chown in /var/www" + # run: docker exec -u root -t micro-videos-app chown -R www-data:www-data /var/www - - name: "Rodando composer" - run: docker exec -t micro-videos-app composer install --no-interaction -d /var/www + # - name: "Rodando composer" + # run: docker exec -t micro-videos-app composer install --no-interaction -d /var/www - - name: "Copiando backend .env" - run: docker exec -t micro-videos-app cp .env.example /var/www/.env + # - name: "Copiando backend .env" + # run: docker exec -t micro-videos-app cp .env.example /var/www/.env - - name: "Copiando backend .env.testing" - run: docker exec -t micro-videos-app cp .env.testing.example /var/www/.env.testing + # - name: "Copiando backend .env.testing" + # run: docker exec -t micro-videos-app cp .env.testing.example /var/www/.env.testing - - name: "Rodando key:generate" - run: docker exec -t micro-videos-app php /var/www/artisan key:generate + # - name: "Rodando key:generate" + # run: docker exec -t micro-videos-app php /var/www/artisan key:generate - - name: "Rodando migrations" - run: docker exec -t micro-videos-app php /var/www/artisan migrate + # - name: "Rodando migrations" + # run: docker exec -t micro-videos-app php /var/www/artisan migrate + + - name: "Waiting php-fpm" + run: docker-compose -f docker-compose.prod.yaml up dockerize - name: "Rodando Phpunit" run: docker exec -t micro-videos-app php /var/www/vendor/bin/phpunit -c /var/www/phpunit.xml diff --git a/Dockerfile b/Dockerfile index 2925e87f4..3d8662bc1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,7 @@ FROM php:7.3.6-fpm-alpine3.9 +ARG USER www-data + RUN apk add --no-cache shadow openssl bash mysql-client nodejs npm git RUN docker-php-ext-install pdo pdo_mysql @@ -18,6 +20,6 @@ WORKDIR /var/www RUN rm -rf /var/www/html && ln -s public html -USER www-data +USER $USER EXPOSE 9000 diff --git a/docker-compose.prod.yaml b/docker-compose.prod.yaml index a89879acb..dea5b6b22 100644 --- a/docker-compose.prod.yaml +++ b/docker-compose.prod.yaml @@ -3,8 +3,11 @@ version: '3' services: app: - build: . - container_name: micro-videos-app + build: + context: . + args: + - USER=root + container_name: micro-videos-app entrypoint: dockerize -wait tcp://db:3306 -timeout 40s ./.docker/entrypoint.sh volumes: - .:/var/www @@ -13,6 +16,10 @@ services: depends_on: - db - redis + + dockerize: + image: jwilder/dockerize + entrypoint: dockerize -wait tcp://nginx:80 -timeout 120s nginx: build: .docker/nginx