From 5874d3bb9e35b88491052b0a27ac28c3e8f1ef00 Mon Sep 17 00:00:00 2001 From: Dean Blackborough Date: Mon, 23 Sep 2019 23:04:56 +0100 Subject: [PATCH 1/5] Initial entry in changelog - Initial entry in changelog. - Updated version for next release. --- CHANGELOG.md | 4 +++- config/api/version.php | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1958c9b6..1f68949a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,9 @@ The complete changelog for the Costs to Expect REST API, follows the format defined at https://keepachangelog.com/en/1.0.0/ -## [v2.01.0] - 2019-09-xx +## [v2.02.0] - 2019-10-xx + +## [v2.01.0] - 2019-09-27 ### Added - We have added a `Header` utility class that can be used to generate the expected headers for collection and item requests. - We have added a `RoutePermission` class which returns the view and manage permission for each route. diff --git a/config/api/version.php b/config/api/version.php index 58655c5b..cc8cd7d5 100644 --- a/config/api/version.php +++ b/config/api/version.php @@ -1,9 +1,9 @@ '2.01.0', + 'version'=> '2.02.0', 'prefix' => 'v2', - 'release_date' => '2019-09-xx', + 'release_date' => '2019-10-xx', 'changelog' => [ 'api' => '/v2/changelog', 'markdown' => 'https://github.com/costs-to-expect/api/blob/master/CHANGELOG.md' From 4a530b290df8f871ac3b8f9d12f1534c7cc32dfd Mon Sep 17 00:00:00 2001 From: Dean Blackborough Date: Mon, 23 Sep 2019 23:45:15 +0100 Subject: [PATCH 2/5] Upgrade to Laravel 5.8 - MIgrations to allow description field to be null. - Upgraded to Laravel 5.8 --- composer.json | 12 +- composer.lock | 1087 ++++++++--------- ...ll_description_field_allocated_expense.php | 39 + ..._null_description_field_simple_expense.php | 39 + 4 files changed, 589 insertions(+), 588 deletions(-) create mode 100644 database/migrations/2019_09_21_094652_null_description_field_allocated_expense.php create mode 100644 database/migrations/2019_09_21_101131_null_description_field_simple_expense.php diff --git a/composer.json b/composer.json index f829e15e..6091879c 100644 --- a/composer.json +++ b/composer.json @@ -1,16 +1,21 @@ { "name": "costs-to-expect/api", "description": "The API for https://api.costs-to-expect.com", - "keywords": ["api", "laravel", "child cost"], + "keywords": [ + "api", + "laravel", + "child cost" + ], "license": "MIT", "type": "project", "require": { "php": "^7.3", "ext-json": "*", + "doctrine/dbal": "^2.9", "fideloper/proxy": "^4.0", "guzzlehttp/guzzle": "^6.3", "hashids/hashids": "^3.0", - "laravel/framework": "5.7.*", + "laravel/framework": "^5.8.0", "laravel/passport": "^7.0", "laravel/tinker": "^1.0" }, @@ -37,8 +42,7 @@ }, "extra": { "laravel": { - "dont-discover": [ - ] + "dont-discover": [] } }, "scripts": { diff --git a/composer.lock b/composer.lock index ab1f3a0b..f6ee0942 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c68bd73f471422a807450ca45437a9e3", + "content-hash": "53d008ea111167a4c1503ca3d3b1d020", "packages": [ { "name": "defuse/php-encryption", @@ -102,6 +102,237 @@ "description": "implementation of xdg base directory specification for php", "time": "2014-10-24T07:27:01+00:00" }, + { + "name": "doctrine/cache", + "version": "v1.8.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/cache.git", + "reference": "d768d58baee9a4862ca783840eca1b9add7a7f57" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/cache/zipball/d768d58baee9a4862ca783840eca1b9add7a7f57", + "reference": "d768d58baee9a4862ca783840eca1b9add7a7f57", + "shasum": "" + }, + "require": { + "php": "~7.1" + }, + "conflict": { + "doctrine/common": ">2.2,<2.4" + }, + "require-dev": { + "alcaeus/mongo-php-adapter": "^1.1", + "doctrine/coding-standard": "^4.0", + "mongodb/mongodb": "^1.1", + "phpunit/phpunit": "^7.0", + "predis/predis": "~1.0" + }, + "suggest": { + "alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Caching library offering an object-oriented API for many cache backends", + "homepage": "https://www.doctrine-project.org", + "keywords": [ + "cache", + "caching" + ], + "time": "2018-08-21T18:01:43+00:00" + }, + { + "name": "doctrine/dbal", + "version": "v2.9.2", + "source": { + "type": "git", + "url": "https://github.com/doctrine/dbal.git", + "reference": "22800bd651c1d8d2a9719e2a3dc46d5108ebfcc9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/22800bd651c1d8d2a9719e2a3dc46d5108ebfcc9", + "reference": "22800bd651c1d8d2a9719e2a3dc46d5108ebfcc9", + "shasum": "" + }, + "require": { + "doctrine/cache": "^1.0", + "doctrine/event-manager": "^1.0", + "ext-pdo": "*", + "php": "^7.1" + }, + "require-dev": { + "doctrine/coding-standard": "^5.0", + "jetbrains/phpstorm-stubs": "^2018.1.2", + "phpstan/phpstan": "^0.10.1", + "phpunit/phpunit": "^7.4", + "symfony/console": "^2.0.5|^3.0|^4.0", + "symfony/phpunit-bridge": "^3.4.5|^4.0.5" + }, + "suggest": { + "symfony/console": "For helpful console commands such as SQL execution and import of files." + }, + "bin": [ + "bin/doctrine-dbal" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.9.x-dev", + "dev-develop": "3.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\DBAL\\": "lib/Doctrine/DBAL" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "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", + "dbal", + "mysql", + "persistence", + "pgsql", + "php", + "queryobject" + ], + "time": "2018-12-31T03:27:51+00:00" + }, + { + "name": "doctrine/event-manager", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/event-manager.git", + "reference": "a520bc093a0170feeb6b14e9d83f3a14452e64b3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/event-manager/zipball/a520bc093a0170feeb6b14e9d83f3a14452e64b3", + "reference": "a520bc093a0170feeb6b14e9d83f3a14452e64b3", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "conflict": { + "doctrine/common": "<2.9@dev" + }, + "require-dev": { + "doctrine/coding-standard": "^4.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": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "Doctrine Event Manager component", + "homepage": "https://www.doctrine-project.org/projects/event-manager.html", + "keywords": [ + "event", + "eventdispatcher", + "eventmanager" + ], + "time": "2018-06-11T11:59:03+00:00" + }, { "name": "doctrine/inflector", "version": "v1.3.0", @@ -391,25 +622,25 @@ }, { "name": "fideloper/proxy", - "version": "4.2.0", + "version": "4.2.1", "source": { "type": "git", "url": "https://github.com/fideloper/TrustedProxy.git", - "reference": "39a4c2165e578bc771f5dc031c273210a3a9b6d2" + "reference": "03085e58ec7bee24773fa5a8850751a6e61a7e8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fideloper/TrustedProxy/zipball/39a4c2165e578bc771f5dc031c273210a3a9b6d2", - "reference": "39a4c2165e578bc771f5dc031c273210a3a9b6d2", + "url": "https://api.github.com/repos/fideloper/TrustedProxy/zipball/03085e58ec7bee24773fa5a8850751a6e61a7e8a", + "reference": "03085e58ec7bee24773fa5a8850751a6e61a7e8a", "shasum": "" }, "require": { - "illuminate/contracts": "~5.0|~6.0", + "illuminate/contracts": "^5.0|^6.0|^7.0", "php": ">=5.4.0" }, "require-dev": { - "illuminate/http": "~5.6|~6.0", - "mockery/mockery": "~1.0", + "illuminate/http": "^5.0|^6.0|^7.0", + "mockery/mockery": "^1.0", "phpunit/phpunit": "^6.0" }, "type": "library", @@ -441,7 +672,7 @@ "proxy", "trusted proxy" ], - "time": "2019-07-29T16:49:45+00:00" + "time": "2019-09-03T16:45:42+00:00" }, { "name": "firebase/php-jwt", @@ -830,92 +1061,47 @@ "description": "Highlight PHP code in terminal", "time": "2018-09-29T18:48:56+00:00" }, - { - "name": "kylekatarnls/update-helper", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/kylekatarnls/update-helper.git", - "reference": "5786fa188e0361b9adf9e8199d7280d1b2db165e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/kylekatarnls/update-helper/zipball/5786fa188e0361b9adf9e8199d7280d1b2db165e", - "reference": "5786fa188e0361b9adf9e8199d7280d1b2db165e", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.1.0 || ^2.0.0", - "php": ">=5.3.0" - }, - "require-dev": { - "codeclimate/php-test-reporter": "dev-master", - "composer/composer": "2.0.x-dev || ^2.0.0-dev", - "phpunit/phpunit": ">=4.8.35 <6.0" - }, - "type": "composer-plugin", - "extra": { - "class": "UpdateHelper\\ComposerPlugin" - }, - "autoload": { - "psr-0": { - "UpdateHelper\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kyle", - "email": "kylekatarnls@gmail.com" - } - ], - "description": "Update helper", - "time": "2019-07-29T11:03:54+00:00" - }, { "name": "laravel/framework", - "version": "v5.7.28", + "version": "v5.8.35", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "8e69728f1c80a024588adbd24c65c4fcf9aa9192" + "reference": "5a9e4d241a8b815e16c9d2151e908992c38db197" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/8e69728f1c80a024588adbd24c65c4fcf9aa9192", - "reference": "8e69728f1c80a024588adbd24c65c4fcf9aa9192", + "url": "https://api.github.com/repos/laravel/framework/zipball/5a9e4d241a8b815e16c9d2151e908992c38db197", + "reference": "5a9e4d241a8b815e16c9d2151e908992c38db197", "shasum": "" }, "require": { "doctrine/inflector": "^1.1", "dragonmantank/cron-expression": "^2.0", + "egulias/email-validator": "^2.0", "erusev/parsedown": "^1.7", + "ext-json": "*", "ext-mbstring": "*", "ext-openssl": "*", - "laravel/nexmo-notification-channel": "^1.0", - "laravel/slack-notification-channel": "^1.0", "league/flysystem": "^1.0.8", "monolog/monolog": "^1.12", - "nesbot/carbon": "^1.26.3", + "nesbot/carbon": "^1.26.3 || ^2.0", "opis/closure": "^3.1", "php": "^7.1.3", "psr/container": "^1.0", "psr/simple-cache": "^1.0", "ramsey/uuid": "^3.7", "swiftmailer/swiftmailer": "^6.0", - "symfony/console": "^4.1", - "symfony/debug": "^4.1", - "symfony/finder": "^4.1", - "symfony/http-foundation": "^4.1", - "symfony/http-kernel": "^4.1", - "symfony/process": "^4.1", - "symfony/routing": "^4.1", - "symfony/var-dumper": "^4.1", + "symfony/console": "^4.2", + "symfony/debug": "^4.2", + "symfony/finder": "^4.2", + "symfony/http-foundation": "^4.2", + "symfony/http-kernel": "^4.2", + "symfony/process": "^4.2", + "symfony/routing": "^4.2", + "symfony/var-dumper": "^4.2", "tijsverkoyen/css-to-inline-styles": "^2.2.1", - "vlucas/phpdotenv": "^2.2" + "vlucas/phpdotenv": "^3.3" }, "conflict": { "tightenco/collect": "<5.5.33" @@ -958,17 +1144,18 @@ "league/flysystem-cached-adapter": "^1.0", "mockery/mockery": "^1.0", "moontoast/math": "^1.1", - "orchestra/testbench-core": "3.7.*", - "pda/pheanstalk": "^3.0|^4.0", - "phpunit/phpunit": "^7.5", + "orchestra/testbench-core": "3.8.*", + "pda/pheanstalk": "^4.0", + "phpunit/phpunit": "^7.5|^8.0", "predis/predis": "^1.1.1", - "symfony/css-selector": "^4.1", - "symfony/dom-crawler": "^4.1", + "symfony/css-selector": "^4.2", + "symfony/dom-crawler": "^4.2", "true/punycode": "^2.1" }, "suggest": { "aws/aws-sdk-php": "Required to use the SQS queue driver and SES mail driver (^3.0).", "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.6).", + "ext-gd": "Required to use Illuminate\\Http\\Testing\\FileFactory::image().", "ext-pcntl": "Required to use all features of the queue worker.", "ext-posix": "Required to use all features of the queue worker.", "filp/whoops": "Required for friendly error pages in development (^2.1.4).", @@ -981,17 +1168,18 @@ "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (^1.0).", "moontoast/math": "Required to use ordered UUIDs (^1.1).", "nexmo/client": "Required to use the Nexmo transport (^1.0).", - "pda/pheanstalk": "Required to use the beanstalk queue driver (^3.0|^4.0).", + "pda/pheanstalk": "Required to use the beanstalk queue driver (^4.0).", "predis/predis": "Required to use the redis cache and queue drivers (^1.0).", "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^3.0).", - "symfony/css-selector": "Required to use some of the crawler integration testing tools (^4.1).", - "symfony/dom-crawler": "Required to use most of the crawler integration testing tools (^4.1).", - "symfony/psr-http-message-bridge": "Required to psr7 bridging features (^1.0)." + "symfony/css-selector": "Required to use some of the crawler integration testing tools (^4.2).", + "symfony/dom-crawler": "Required to use most of the crawler integration testing tools (^4.2).", + "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^1.1).", + "wildbit/swiftmailer-postmark": "Required to use Postmark mail driver (^3.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.7-dev" + "dev-master": "5.8-dev" } }, "autoload": { @@ -1019,92 +1207,35 @@ "framework", "laravel" ], - "time": "2019-02-26T15:41:34+00:00" - }, - { - "name": "laravel/nexmo-notification-channel", - "version": "v1.0.1", - "source": { - "type": "git", - "url": "https://github.com/laravel/nexmo-notification-channel.git", - "reference": "03edd42a55b306ff980c9950899d5a2b03260d48" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laravel/nexmo-notification-channel/zipball/03edd42a55b306ff980c9950899d5a2b03260d48", - "reference": "03edd42a55b306ff980c9950899d5a2b03260d48", - "shasum": "" - }, - "require": { - "nexmo/client": "^1.0", - "php": "^7.1.3" - }, - "require-dev": { - "illuminate/notifications": "~5.7", - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - }, - "laravel": { - "providers": [ - "Illuminate\\Notifications\\NexmoChannelServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Notifications\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "Nexmo Notification Channel for laravel.", - "keywords": [ - "laravel", - "nexmo", - "notifications" - ], - "time": "2018-12-04T12:57:08+00:00" + "time": "2019-09-03T16:44:30+00:00" }, { "name": "laravel/passport", - "version": "v7.4.0", + "version": "v7.4.1", "source": { "type": "git", "url": "https://github.com/laravel/passport.git", - "reference": "4460bd1fb5d913d75e547caf02a5a19c6d77794d" + "reference": "cc39dc6a36ebf5926906eb5ad3c62dba50c9bbd0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/passport/zipball/4460bd1fb5d913d75e547caf02a5a19c6d77794d", - "reference": "4460bd1fb5d913d75e547caf02a5a19c6d77794d", + "url": "https://api.github.com/repos/laravel/passport/zipball/cc39dc6a36ebf5926906eb5ad3c62dba50c9bbd0", + "reference": "cc39dc6a36ebf5926906eb5ad3c62dba50c9bbd0", "shasum": "" }, "require": { "ext-json": "*", "firebase/php-jwt": "~3.0|~4.0|~5.0", "guzzlehttp/guzzle": "~6.0", - "illuminate/auth": "~5.6.0|~5.7.0|~5.8.0|^6.0", - "illuminate/console": "~5.6.0|~5.7.0|~5.8.0|^6.0", - "illuminate/container": "~5.6.0|~5.7.0|~5.8.0|^6.0", - "illuminate/contracts": "~5.6.0|~5.7.0|~5.8.0|^6.0", - "illuminate/cookie": "~5.6.0|~5.7.0|~5.8.0|^6.0", - "illuminate/database": "~5.6.0|~5.7.0|~5.8.0|^6.0", - "illuminate/encryption": "~5.6.0|~5.7.0|~5.8.0|^6.0", - "illuminate/http": "~5.6.0|~5.7.0|~5.8.0|^6.0", - "illuminate/support": "~5.6.0|~5.7.0|~5.8.0|^6.0", + "illuminate/auth": "~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0", + "illuminate/console": "~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0", + "illuminate/container": "~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0", + "illuminate/contracts": "~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0", + "illuminate/cookie": "~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0", + "illuminate/database": "~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0", + "illuminate/encryption": "~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0", + "illuminate/http": "~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0", + "illuminate/support": "~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0", "league/oauth2-server": "^7.0", "php": ">=7.1", "phpseclib/phpseclib": "^2.0", @@ -1112,8 +1243,8 @@ "zendframework/zend-diactoros": "~1.0|~2.0" }, "require-dev": { - "mockery/mockery": "~1.0", - "phpunit/phpunit": "~7.4" + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^7.4|^8.0" }, "type": "library", "extra": { @@ -1147,64 +1278,7 @@ "oauth", "passport" ], - "time": "2019-08-20T18:10:43+00:00" - }, - { - "name": "laravel/slack-notification-channel", - "version": "v1.0.3", - "source": { - "type": "git", - "url": "https://github.com/laravel/slack-notification-channel.git", - "reference": "6e164293b754a95f246faf50ab2bbea3e4923cc9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laravel/slack-notification-channel/zipball/6e164293b754a95f246faf50ab2bbea3e4923cc9", - "reference": "6e164293b754a95f246faf50ab2bbea3e4923cc9", - "shasum": "" - }, - "require": { - "guzzlehttp/guzzle": "^6.0", - "php": "^7.1.3" - }, - "require-dev": { - "illuminate/notifications": "~5.7", - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - }, - "laravel": { - "providers": [ - "Illuminate\\Notifications\\SlackChannelServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Notifications\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "Slack Notification Channel for laravel.", - "keywords": [ - "laravel", - "notifications", - "slack" - ], - "time": "2018-12-12T13:12:06+00:00" + "time": "2019-09-10T19:55:34+00:00" }, { "name": "laravel/tinker", @@ -1376,16 +1450,16 @@ }, { "name": "league/flysystem", - "version": "1.0.53", + "version": "1.0.55", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "08e12b7628f035600634a5e76d95b5eb66cea674" + "reference": "33c91155537c6dc899eacdc54a13ac6303f156e6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/08e12b7628f035600634a5e76d95b5eb66cea674", - "reference": "08e12b7628f035600634a5e76d95b5eb66cea674", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/33c91155537c6dc899eacdc54a13ac6303f156e6", + "reference": "33c91155537c6dc899eacdc54a13ac6303f156e6", "shasum": "" }, "require": { @@ -1456,7 +1530,7 @@ "sftp", "storage" ], - "time": "2019-06-18T20:09:29+00:00" + "time": "2019-08-24T11:17:19+00:00" }, { "name": "league/oauth2-server", @@ -1537,16 +1611,16 @@ }, { "name": "monolog/monolog", - "version": "1.24.0", + "version": "1.25.1", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266" + "reference": "70e65a5470a42cfec1a7da00d30edb6e617e8dcf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266", - "reference": "bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/70e65a5470a42cfec1a7da00d30edb6e617e8dcf", + "reference": "70e65a5470a42cfec1a7da00d30edb6e617e8dcf", "shasum": "" }, "require": { @@ -1611,38 +1685,40 @@ "logging", "psr-3" ], - "time": "2018-11-05T09:00:11+00:00" + "time": "2019-09-06T13:49:17+00:00" }, { "name": "nesbot/carbon", - "version": "1.39.0", + "version": "2.24.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "dd62a58af4e0775a45ea5f99d0363d81b7d9a1e0" + "reference": "934459c5ac0658bc765ad1e53512c7c77adcac29" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/dd62a58af4e0775a45ea5f99d0363d81b7d9a1e0", - "reference": "dd62a58af4e0775a45ea5f99d0363d81b7d9a1e0", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/934459c5ac0658bc765ad1e53512c7c77adcac29", + "reference": "934459c5ac0658bc765ad1e53512c7c77adcac29", "shasum": "" }, "require": { - "kylekatarnls/update-helper": "^1.1", - "php": ">=5.3.9", - "symfony/translation": "~2.6 || ~3.0 || ~4.0" + "ext-json": "*", + "php": "^7.1.8 || ^8.0", + "symfony/translation": "^3.4 || ^4.0" }, "require-dev": { - "composer/composer": "^1.2", - "friendsofphp/php-cs-fixer": "~2", - "phpunit/phpunit": "^4.8.35 || ^5.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", + "squizlabs/php_codesniffer": "^3.4" }, "bin": [ - "bin/upgrade-carbon" + "bin/carbon" ], "type": "library", "extra": { - "update-helper": "Carbon\\Upgrade", "laravel": { "providers": [ "Carbon\\Laravel\\ServiceProvider" @@ -1651,7 +1727,7 @@ }, "autoload": { "psr-4": { - "": "src/" + "Carbon\\": "src/Carbon/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1663,77 +1739,33 @@ "name": "Brian Nesbitt", "email": "brian@nesbot.com", "homepage": "http://nesbot.com" + }, + { + "name": "kylekatarnls", + "homepage": "http://github.com/kylekatarnls" } ], - "description": "A simple API extension for DateTime.", + "description": "A API extension for DateTime that supports 281 different languages.", "homepage": "http://carbon.nesbot.com", "keywords": [ "date", "datetime", "time" ], - "time": "2019-06-11T09:07:59+00:00" - }, - { - "name": "nexmo/client", - "version": "1.8.1", - "source": { - "type": "git", - "url": "https://github.com/Nexmo/nexmo-php.git", - "reference": "182d41a02ebd3e4be147baea45458ccfe2f528c4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Nexmo/nexmo-php/zipball/182d41a02ebd3e4be147baea45458ccfe2f528c4", - "reference": "182d41a02ebd3e4be147baea45458ccfe2f528c4", - "shasum": "" - }, - "require": { - "lcobucci/jwt": "^3.2", - "php": ">=5.6", - "php-http/client-implementation": "^1.0", - "php-http/guzzle6-adapter": "^1.0", - "zendframework/zend-diactoros": "^1.8.4 || ^2.0" - }, - "require-dev": { - "estahn/phpunit-json-assertions": "^1.0.0", - "php-http/mock-client": "^0.3.0", - "phpunit/phpunit": "^5.7", - "squizlabs/php_codesniffer": "^3.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Nexmo\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Tim Lytle", - "email": "tim@nexmo.com", - "homepage": "http://twitter.com/tjlytle", - "role": "Developer" - } - ], - "description": "PHP Client for using Nexmo's API.", - "time": "2019-05-13T20:27:43+00:00" + "time": "2019-08-31T16:37:55+00:00" }, { "name": "nikic/php-parser", - "version": "v4.2.3", + "version": "v4.2.4", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "e612609022e935f3d0337c1295176505b41188c8" + "reference": "97e59c7a16464196a8b9c77c47df68e4a39a45c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/e612609022e935f3d0337c1295176505b41188c8", - "reference": "e612609022e935f3d0337c1295176505b41188c8", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/97e59c7a16464196a8b9c77c47df68e4a39a45c4", + "reference": "97e59c7a16464196a8b9c77c47df68e4a39a45c4", "shasum": "" }, "require": { @@ -1771,20 +1803,20 @@ "parser", "php" ], - "time": "2019-08-12T20:17:41+00:00" + "time": "2019-09-01T07:51:21+00:00" }, { "name": "opis/closure", - "version": "3.3.1", + "version": "3.4.0", "source": { "type": "git", "url": "https://github.com/opis/closure.git", - "reference": "92927e26d7fc3f271efe1f55bdbb073fbb2f0722" + "reference": "60a97fff133b1669a5b1776aa8ab06db3f3962b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opis/closure/zipball/92927e26d7fc3f271efe1f55bdbb073fbb2f0722", - "reference": "92927e26d7fc3f271efe1f55bdbb073fbb2f0722", + "url": "https://api.github.com/repos/opis/closure/zipball/60a97fff133b1669a5b1776aa8ab06db3f3962b7", + "reference": "60a97fff133b1669a5b1776aa8ab06db3f3962b7", "shasum": "" }, "require": { @@ -1832,7 +1864,7 @@ "serialization", "serialize" ], - "time": "2019-07-09T21:58:11+00:00" + "time": "2019-09-02T21:07:33+00:00" }, { "name": "paragonie/random_compat", @@ -1880,183 +1912,67 @@ "time": "2018-07-02T15:55:56+00:00" }, { - "name": "php-http/guzzle6-adapter", - "version": "v1.1.1", + "name": "phpoption/phpoption", + "version": "1.5.0", "source": { "type": "git", - "url": "https://github.com/php-http/guzzle6-adapter.git", - "reference": "a56941f9dc6110409cfcddc91546ee97039277ab" + "url": "https://github.com/schmittjoh/php-option.git", + "reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/guzzle6-adapter/zipball/a56941f9dc6110409cfcddc91546ee97039277ab", - "reference": "a56941f9dc6110409cfcddc91546ee97039277ab", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/94e644f7d2051a5f0fcf77d81605f152eecff0ed", + "reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed", "shasum": "" }, "require": { - "guzzlehttp/guzzle": "^6.0", - "php": ">=5.5.0", - "php-http/httplug": "^1.0" - }, - "provide": { - "php-http/async-client-implementation": "1.0", - "php-http/client-implementation": "1.0" - }, - "require-dev": { - "ext-curl": "*", - "php-http/adapter-integration-tests": "^0.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2-dev" - } - }, - "autoload": { - "psr-4": { - "Http\\Adapter\\Guzzle6\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - }, - { - "name": "David de Boer", - "email": "david@ddeboer.nl" - } - ], - "description": "Guzzle 6 HTTP Adapter", - "homepage": "http://httplug.io", - "keywords": [ - "Guzzle", - "http" - ], - "time": "2016-05-10T06:13:32+00:00" - }, - { - "name": "php-http/httplug", - "version": "v1.1.0", - "source": { - "type": "git", - "url": "https://github.com/php-http/httplug.git", - "reference": "1c6381726c18579c4ca2ef1ec1498fdae8bdf018" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-http/httplug/zipball/1c6381726c18579c4ca2ef1ec1498fdae8bdf018", - "reference": "1c6381726c18579c4ca2ef1ec1498fdae8bdf018", - "shasum": "" - }, - "require": { - "php": ">=5.4", - "php-http/promise": "^1.0", - "psr/http-message": "^1.0" - }, - "require-dev": { - "henrikbjorn/phpspec-code-coverage": "^1.0", - "phpspec/phpspec": "^2.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "psr-4": { - "Http\\Client\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eric GELOEN", - "email": "geloen.eric@gmail.com" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - } - ], - "description": "HTTPlug, the HTTP client abstraction for PHP", - "homepage": "http://httplug.io", - "keywords": [ - "client", - "http" - ], - "time": "2016-08-31T08:30:17+00:00" - }, - { - "name": "php-http/promise", - "version": "v1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-http/promise.git", - "reference": "dc494cdc9d7160b9a09bd5573272195242ce7980" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-http/promise/zipball/dc494cdc9d7160b9a09bd5573272195242ce7980", - "reference": "dc494cdc9d7160b9a09bd5573272195242ce7980", - "shasum": "" + "php": ">=5.3.0" }, "require-dev": { - "henrikbjorn/phpspec-code-coverage": "^1.0", - "phpspec/phpspec": "^2.4" + "phpunit/phpunit": "4.7.*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "1.3-dev" } }, "autoload": { - "psr-4": { - "Http\\Promise\\": "src/" + "psr-0": { + "PhpOption\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "Apache2" ], "authors": [ { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com" - }, - { - "name": "Joel Wurtz", - "email": "joel.wurtz@gmail.com" + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com" } ], - "description": "Promise used for asynchronous HTTP requests", - "homepage": "http://httplug.io", + "description": "Option Type for PHP", "keywords": [ - "promise" + "language", + "option", + "php", + "type" ], - "time": "2016-01-26T13:27:02+00:00" + "time": "2015-07-25T16:39:46+00:00" }, { "name": "phpseclib/phpseclib", - "version": "2.0.21", + "version": "2.0.23", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "9f1287e68b3f283339a9f98f67515dd619e5bf9d" + "reference": "c78eb5058d5bb1a183133c36d4ba5b6675dfa099" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/9f1287e68b3f283339a9f98f67515dd619e5bf9d", - "reference": "9f1287e68b3f283339a9f98f67515dd619e5bf9d", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/c78eb5058d5bb1a183133c36d4ba5b6675dfa099", + "reference": "c78eb5058d5bb1a183133c36d4ba5b6675dfa099", "shasum": "" }, "require": { @@ -2090,28 +2006,28 @@ "authors": [ { "name": "Jim Wigginton", - "role": "Lead Developer", - "email": "terrafrost@php.net" + "email": "terrafrost@php.net", + "role": "Lead Developer" }, { "name": "Patrick Monnerat", - "role": "Developer", - "email": "pm@datasphere.ch" + "email": "pm@datasphere.ch", + "role": "Developer" }, { "name": "Andreas Fischer", - "role": "Developer", - "email": "bantu@phpbb.com" + "email": "bantu@phpbb.com", + "role": "Developer" }, { "name": "Hans-Jürgen Petrich", - "role": "Developer", - "email": "petrich@tronic-media.com" + "email": "petrich@tronic-media.com", + "role": "Developer" }, { "name": "Graham Campbell", - "role": "Developer", - "email": "graham@alt-three.com" + "email": "graham@alt-three.com", + "role": "Developer" } ], "description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.", @@ -2135,7 +2051,7 @@ "x.509", "x509" ], - "time": "2019-07-12T12:53:49+00:00" + "time": "2019-09-17T03:41:22+00:00" }, { "name": "psr/container", @@ -2643,16 +2559,16 @@ }, { "name": "symfony/console", - "version": "v4.3.3", + "version": "v4.3.4", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "8b0ae5742ce9aaa8b0075665862c1ca397d1c1d9" + "reference": "de63799239b3881b8a08f8481b22348f77ed7b36" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/8b0ae5742ce9aaa8b0075665862c1ca397d1c1d9", - "reference": "8b0ae5742ce9aaa8b0075665862c1ca397d1c1d9", + "url": "https://api.github.com/repos/symfony/console/zipball/de63799239b3881b8a08f8481b22348f77ed7b36", + "reference": "de63799239b3881b8a08f8481b22348f77ed7b36", "shasum": "" }, "require": { @@ -2714,20 +2630,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2019-07-24T17:13:59+00:00" + "time": "2019-08-26T08:26:39+00:00" }, { "name": "symfony/css-selector", - "version": "v4.3.3", + "version": "v4.3.4", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "105c98bb0c5d8635bea056135304bd8edcc42b4d" + "reference": "c6e5e2a00db768c92c3ae131532af4e1acc7bd03" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/105c98bb0c5d8635bea056135304bd8edcc42b4d", - "reference": "105c98bb0c5d8635bea056135304bd8edcc42b4d", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/c6e5e2a00db768c92c3ae131532af4e1acc7bd03", + "reference": "c6e5e2a00db768c92c3ae131532af4e1acc7bd03", "shasum": "" }, "require": { @@ -2767,20 +2683,20 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "time": "2019-01-16T21:53:39+00:00" + "time": "2019-08-20T14:07:54+00:00" }, { "name": "symfony/debug", - "version": "v4.3.3", + "version": "v4.3.4", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "527887c3858a2462b0137662c74837288b998ee3" + "reference": "afcdea44a2e399c1e4b52246ec8d54c715393ced" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/527887c3858a2462b0137662c74837288b998ee3", - "reference": "527887c3858a2462b0137662c74837288b998ee3", + "url": "https://api.github.com/repos/symfony/debug/zipball/afcdea44a2e399c1e4b52246ec8d54c715393ced", + "reference": "afcdea44a2e399c1e4b52246ec8d54c715393ced", "shasum": "" }, "require": { @@ -2823,20 +2739,20 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2019-07-23T11:21:36+00:00" + "time": "2019-08-20T14:27:59+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v4.3.3", + "version": "v4.3.4", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "212b020949331b6531250584531363844b34a94e" + "reference": "429d0a1451d4c9c4abe1959b2986b88794b9b7d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/212b020949331b6531250584531363844b34a94e", - "reference": "212b020949331b6531250584531363844b34a94e", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/429d0a1451d4c9c4abe1959b2986b88794b9b7d2", + "reference": "429d0a1451d4c9c4abe1959b2986b88794b9b7d2", "shasum": "" }, "require": { @@ -2893,7 +2809,7 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2019-06-27T06:42:14+00:00" + "time": "2019-08-26T08:55:16+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -2955,16 +2871,16 @@ }, { "name": "symfony/finder", - "version": "v4.3.3", + "version": "v4.3.4", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "9638d41e3729459860bb96f6247ccb61faaa45f2" + "reference": "86c1c929f0a4b24812e1eb109262fc3372c8e9f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/9638d41e3729459860bb96f6247ccb61faaa45f2", - "reference": "9638d41e3729459860bb96f6247ccb61faaa45f2", + "url": "https://api.github.com/repos/symfony/finder/zipball/86c1c929f0a4b24812e1eb109262fc3372c8e9f2", + "reference": "86c1c929f0a4b24812e1eb109262fc3372c8e9f2", "shasum": "" }, "require": { @@ -3000,20 +2916,20 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2019-06-28T13:16:30+00:00" + "time": "2019-08-14T12:26:46+00:00" }, { "name": "symfony/http-foundation", - "version": "v4.3.3", + "version": "v4.3.4", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "8b778ee0c27731105fbf1535f51793ad1ae0ba2b" + "reference": "d804bea118ff340a12e22a79f9c7e7eb56b35adc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/8b778ee0c27731105fbf1535f51793ad1ae0ba2b", - "reference": "8b778ee0c27731105fbf1535f51793ad1ae0ba2b", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/d804bea118ff340a12e22a79f9c7e7eb56b35adc", + "reference": "d804bea118ff340a12e22a79f9c7e7eb56b35adc", "shasum": "" }, "require": { @@ -3055,20 +2971,20 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2019-07-23T11:21:36+00:00" + "time": "2019-08-26T08:55:16+00:00" }, { "name": "symfony/http-kernel", - "version": "v4.3.3", + "version": "v4.3.4", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "a414548d236ddd8fa3df52367d583e82339c5e95" + "reference": "5e0fc71be03d52cd00c423061cfd300bd6f92a52" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/a414548d236ddd8fa3df52367d583e82339c5e95", - "reference": "a414548d236ddd8fa3df52367d583e82339c5e95", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/5e0fc71be03d52cd00c423061cfd300bd6f92a52", + "reference": "5e0fc71be03d52cd00c423061cfd300bd6f92a52", "shasum": "" }, "require": { @@ -3147,20 +3063,20 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2019-07-28T07:10:23+00:00" + "time": "2019-08-26T16:47:42+00:00" }, { "name": "symfony/mime", - "version": "v4.3.3", + "version": "v4.3.4", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "6b7148029b1dd5eda1502064f06d01357b7b2d8b" + "reference": "987a05df1c6ac259b34008b932551353f4f408df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/6b7148029b1dd5eda1502064f06d01357b7b2d8b", - "reference": "6b7148029b1dd5eda1502064f06d01357b7b2d8b", + "url": "https://api.github.com/repos/symfony/mime/zipball/987a05df1c6ac259b34008b932551353f4f408df", + "reference": "987a05df1c6ac259b34008b932551353f4f408df", "shasum": "" }, "require": { @@ -3169,7 +3085,7 @@ "symfony/polyfill-mbstring": "^1.0" }, "require-dev": { - "egulias/email-validator": "^2.0", + "egulias/email-validator": "^2.1.10", "symfony/dependency-injection": "~3.4|^4.1" }, "type": "library", @@ -3206,7 +3122,7 @@ "mime", "mime-type" ], - "time": "2019-07-19T16:21:19+00:00" + "time": "2019-08-22T08:16:11+00:00" }, { "name": "symfony/polyfill-ctype", @@ -3561,16 +3477,16 @@ }, { "name": "symfony/process", - "version": "v4.3.3", + "version": "v4.3.4", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "856d35814cf287480465bb7a6c413bb7f5f5e69c" + "reference": "e89969c00d762349f078db1128506f7f3dcc0d4a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/856d35814cf287480465bb7a6c413bb7f5f5e69c", - "reference": "856d35814cf287480465bb7a6c413bb7f5f5e69c", + "url": "https://api.github.com/repos/symfony/process/zipball/e89969c00d762349f078db1128506f7f3dcc0d4a", + "reference": "e89969c00d762349f078db1128506f7f3dcc0d4a", "shasum": "" }, "require": { @@ -3606,7 +3522,7 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2019-05-30T16:10:05+00:00" + "time": "2019-08-26T08:26:39+00:00" }, { "name": "symfony/psr-http-message-bridge", @@ -3675,16 +3591,16 @@ }, { "name": "symfony/routing", - "version": "v4.3.3", + "version": "v4.3.4", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "a88c47a5861549f5dc1197660818084c3b67d773" + "reference": "ff1049f6232dc5b6023b1ff1c6de56f82bcd264f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/a88c47a5861549f5dc1197660818084c3b67d773", - "reference": "a88c47a5861549f5dc1197660818084c3b67d773", + "url": "https://api.github.com/repos/symfony/routing/zipball/ff1049f6232dc5b6023b1ff1c6de56f82bcd264f", + "reference": "ff1049f6232dc5b6023b1ff1c6de56f82bcd264f", "shasum": "" }, "require": { @@ -3747,20 +3663,20 @@ "uri", "url" ], - "time": "2019-07-23T14:43:56+00:00" + "time": "2019-08-26T08:26:39+00:00" }, { "name": "symfony/service-contracts", - "version": "v1.1.5", + "version": "v1.1.6", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "f391a00de78ec7ec8cf5cdcdae59ec7b883edb8d" + "reference": "ea7263d6b6d5f798b56a45a5b8d686725f2719a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f391a00de78ec7ec8cf5cdcdae59ec7b883edb8d", - "reference": "f391a00de78ec7ec8cf5cdcdae59ec7b883edb8d", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/ea7263d6b6d5f798b56a45a5b8d686725f2719a3", + "reference": "ea7263d6b6d5f798b56a45a5b8d686725f2719a3", "shasum": "" }, "require": { @@ -3805,26 +3721,26 @@ "interoperability", "standards" ], - "time": "2019-06-13T11:15:36+00:00" + "time": "2019-08-20T14:44:19+00:00" }, { "name": "symfony/translation", - "version": "v4.3.3", + "version": "v4.3.4", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "4e3e39cc485304f807622bdc64938e4633396406" + "reference": "28498169dd334095fa981827992f3a24d50fed0f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/4e3e39cc485304f807622bdc64938e4633396406", - "reference": "4e3e39cc485304f807622bdc64938e4633396406", + "url": "https://api.github.com/repos/symfony/translation/zipball/28498169dd334095fa981827992f3a24d50fed0f", + "reference": "28498169dd334095fa981827992f3a24d50fed0f", "shasum": "" }, "require": { "php": "^7.1.3", "symfony/polyfill-mbstring": "~1.0", - "symfony/translation-contracts": "^1.1.2" + "symfony/translation-contracts": "^1.1.6" }, "conflict": { "symfony/config": "<3.4", @@ -3881,20 +3797,20 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "time": "2019-07-18T10:34:59+00:00" + "time": "2019-08-26T08:55:16+00:00" }, { "name": "symfony/translation-contracts", - "version": "v1.1.5", + "version": "v1.1.6", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "cb4b18ad7b92a26e83b65dde940fab78339e6f3c" + "reference": "325b17c24f3ee23cbecfa63ba809c6d89b5fa04a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/cb4b18ad7b92a26e83b65dde940fab78339e6f3c", - "reference": "cb4b18ad7b92a26e83b65dde940fab78339e6f3c", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/325b17c24f3ee23cbecfa63ba809c6d89b5fa04a", + "reference": "325b17c24f3ee23cbecfa63ba809c6d89b5fa04a", "shasum": "" }, "require": { @@ -3938,20 +3854,20 @@ "interoperability", "standards" ], - "time": "2019-06-13T11:15:36+00:00" + "time": "2019-08-02T12:15:04+00:00" }, { "name": "symfony/var-dumper", - "version": "v4.3.3", + "version": "v4.3.4", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "e4110b992d2cbe198d7d3b244d079c1c58761d07" + "reference": "641043e0f3e615990a0f29479f9c117e8a6698c6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/e4110b992d2cbe198d7d3b244d079c1c58761d07", - "reference": "e4110b992d2cbe198d7d3b244d079c1c58761d07", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/641043e0f3e615990a0f29479f9c117e8a6698c6", + "reference": "641043e0f3e615990a0f29479f9c117e8a6698c6", "shasum": "" }, "require": { @@ -4014,7 +3930,7 @@ "debug", "dump" ], - "time": "2019-07-27T06:42:46+00:00" + "time": "2019-08-26T08:26:39+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -4065,29 +3981,30 @@ }, { "name": "vlucas/phpdotenv", - "version": "v2.6.1", + "version": "v3.6.0", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "2a7dcf7e3e02dc5e701004e51a6f304b713107d5" + "reference": "1bdf24f065975594f6a117f0f1f6cabf1333b156" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/2a7dcf7e3e02dc5e701004e51a6f304b713107d5", - "reference": "2a7dcf7e3e02dc5e701004e51a6f304b713107d5", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/1bdf24f065975594f6a117f0f1f6cabf1333b156", + "reference": "1bdf24f065975594f6a117f0f1f6cabf1333b156", "shasum": "" }, "require": { - "php": ">=5.3.9", + "php": "^5.4 || ^7.0", + "phpoption/phpoption": "^1.5", "symfony/polyfill-ctype": "^1.9" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.0" + "phpunit/phpunit": "^4.8.35 || ^5.0 || ^6.0 || ^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "3.6-dev" } }, "autoload": { @@ -4100,10 +4017,15 @@ "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": "http://www.vancelucas.com" + "homepage": "https://vancelucas.com/" } ], "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", @@ -4112,7 +4034,7 @@ "env", "environment" ], - "time": "2019-01-29T11:11:52+00:00" + "time": "2019-09-10T21:37:39+00:00" }, { "name": "zendframework/zend-diactoros", @@ -4283,8 +4205,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", @@ -4678,35 +4600,33 @@ }, { "name": "phpdocumentor/reflection-common", - "version": "1.0.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" + "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/63a995caa1ca9e5590304cd845c15ad6d482a62a", + "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a", "shasum": "" }, "require": { - "php": ">=5.5" + "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "^4.6" + "phpunit/phpunit": "~6" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src" - ] + "phpDocumentor\\Reflection\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -4728,30 +4648,30 @@ "reflection", "static analysis" ], - "time": "2017-09-11T18:02:19+00:00" + "time": "2018-08-07T13:53:10+00:00" }, { "name": "phpdocumentor/reflection-docblock", - "version": "4.3.1", + "version": "4.3.2", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c" + "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c", - "reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/b83ff7cfcfee7827e1e78b637a5904fe6a96698e", + "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e", "shasum": "" }, "require": { "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0.0", - "phpdocumentor/type-resolver": "^0.4.0", + "phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0", + "phpdocumentor/type-resolver": "~0.4 || ^1.0.0", "webmozart/assert": "^1.0" }, "require-dev": { - "doctrine/instantiator": "~1.0.5", + "doctrine/instantiator": "^1.0.5", "mockery/mockery": "^1.0", "phpunit/phpunit": "^6.4" }, @@ -4779,41 +4699,40 @@ } ], "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" + "time": "2019-09-12T14:27:41+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "0.4.0", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" + "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", - "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", + "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", "shasum": "" }, "require": { - "php": "^5.5 || ^7.0", - "phpdocumentor/reflection-common": "^1.0" + "php": "^7.1", + "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^5.2||^4.8.24" + "ext-tokenizer": "^7.1", + "mockery/mockery": "~1", + "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] + "phpDocumentor\\Reflection\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -4826,7 +4745,8 @@ "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", + "time": "2019-08-22T18:11:29+00:00" }, { "name": "phpspec/prophecy", @@ -5096,16 +5016,16 @@ }, { "name": "phpunit/php-token-stream", - "version": "3.1.0", + "version": "3.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "e899757bb3df5ff6e95089132f32cd59aac2220a" + "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff" }, "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/995192df77f63a59e47f025390d2d1fdf8f425ff", + "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff", "shasum": "" }, "require": { @@ -5141,20 +5061,20 @@ "keywords": [ "tokenizer" ], - "time": "2019-07-25T05:29:42+00:00" + "time": "2019-09-17T06:23:10+00:00" }, { "name": "phpunit/phpunit", - "version": "7.5.15", + "version": "7.5.16", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "d79c053d972856b8b941bb233e39dc521a5093f0" + "reference": "316afa6888d2562e04aeb67ea7f2017a0eb41661" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d79c053d972856b8b941bb233e39dc521a5093f0", - "reference": "d79c053d972856b8b941bb233e39dc521a5093f0", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/316afa6888d2562e04aeb67ea7f2017a0eb41661", + "reference": "316afa6888d2562e04aeb67ea7f2017a0eb41661", "shasum": "" }, "require": { @@ -5214,8 +5134,8 @@ "authors": [ { "name": "Sebastian Bergmann", - "role": "lead", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], "description": "The PHP Unit Testing framework.", @@ -5225,7 +5145,7 @@ "testing", "xunit" ], - "time": "2019-08-21T07:05:16+00:00" + "time": "2019-09-14T09:08:39+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -5447,16 +5367,16 @@ }, { "name": "sebastian/exporter", - "version": "3.1.1", + "version": "3.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "06a9a5947f47b3029d76118eb5c22802e5869687" + "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/06a9a5947f47b3029d76118eb5c22802e5869687", - "reference": "06a9a5947f47b3029d76118eb5c22802e5869687", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/68609e1261d215ea5b21b7987539cbfbe156ec3e", + "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e", "shasum": "" }, "require": { @@ -5510,7 +5430,7 @@ "export", "exporter" ], - "time": "2019-08-11T12:43:14+00:00" + "time": "2019-09-14T09:02:43+00:00" }, { "name": "sebastian/global-state", @@ -5835,16 +5755,16 @@ }, { "name": "webmozart/assert", - "version": "1.4.0", + "version": "1.5.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9" + "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9", - "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9", + "url": "https://api.github.com/repos/webmozart/assert/zipball/88e6d84706d09a236046d686bbea96f07b3a34f4", + "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4", "shasum": "" }, "require": { @@ -5852,8 +5772,7 @@ "symfony/polyfill-ctype": "^1.8" }, "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1" + "phpunit/phpunit": "^4.8.36 || ^7.5.13" }, "type": "library", "extra": { @@ -5882,7 +5801,7 @@ "check", "validate" ], - "time": "2018-12-25T11:19:39+00:00" + "time": "2019-08-24T08:43:50+00:00" } ], "aliases": [], diff --git a/database/migrations/2019_09_21_094652_null_description_field_allocated_expense.php b/database/migrations/2019_09_21_094652_null_description_field_allocated_expense.php new file mode 100644 index 00000000..f418b044 --- /dev/null +++ b/database/migrations/2019_09_21_094652_null_description_field_allocated_expense.php @@ -0,0 +1,39 @@ +string('description', 255)->nullable()->change(); + }); + + DB::statement('UPDATE `item_type_allocated_expense` SET `description` = NULL'); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('item_type_allocated_expense', function (Blueprint $table) + { + $table->string('description', 255)->change(); + }); + + DB::statement('UPDATE `item_type_allocated_expense` SET `description` = `name`'); + } +} diff --git a/database/migrations/2019_09_21_101131_null_description_field_simple_expense.php b/database/migrations/2019_09_21_101131_null_description_field_simple_expense.php new file mode 100644 index 00000000..4aeb6ab1 --- /dev/null +++ b/database/migrations/2019_09_21_101131_null_description_field_simple_expense.php @@ -0,0 +1,39 @@ +string('description', 255)->nullable()->change(); + }); + + DB::statement('UPDATE `item_type_simple_expense` SET `description` = NULL'); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('item_type_simple_expense', function (Blueprint $table) + { + $table->string('description', 255)->change(); + }); + + DB::statement('UPDATE `item_type_simple_expense` SET `description` = `name`'); + } +} From 84b45bdecf9eb6fed6c7671c1055224432f54934 Mon Sep 17 00:00:00 2001 From: Dean Blackborough Date: Tue, 24 Sep 2019 00:24:01 +0100 Subject: [PATCH 3/5] Name field for expenses - Updated item endpoints to return name. - Updated POST and PATCH to require name. --- app/Http/Controllers/ItemController.php | 24 +++++++++---------- app/Models/Item.php | 3 +++ app/Models/ResourceTypeItem.php | 1 + app/Models/Transformers/Item.php | 1 + app/Models/Transformers/ResourceTypeItem.php | 1 + .../item-type-allocated-expense/fields.php | 12 +++++++++- .../validation.php | 6 +++-- config/api/item/searchable.php | 1 + config/api/item/sortable.php | 1 + 9 files changed, 35 insertions(+), 15 deletions(-) diff --git a/app/Http/Controllers/ItemController.php b/app/Http/Controllers/ItemController.php index 6787623a..89a7d853 100644 --- a/app/Http/Controllers/ItemController.php +++ b/app/Http/Controllers/ItemController.php @@ -275,13 +275,15 @@ public function optionsShow( /** * Create a new item * - * @param Request $request * @param string $resource_type_id * @param string $resource_id * * @return JsonResponse */ - public function create(Request $request, string $resource_type_id, string $resource_id): JsonResponse + public function create( + string $resource_type_id, + string $resource_id + ): JsonResponse { Route::resource( $resource_type_id, @@ -302,17 +304,17 @@ public function create(Request $request, string $resource_type_id, string $resou $item_type = new ItemTypeAllocatedExpense([ 'item_id' => $item->id, - 'name' => $request->input('description'), // Fix later - 'description' => $request->input('description'), - 'effective_date' => $request->input('effective_date'), - 'publish_after' => $request->input('publish_after', null), - 'total' => $request->input('total'), - 'percentage' => $request->input('percentage', 100), + 'name' => request()->input('name'), + 'description' => request()->input('description', null), + 'effective_date' => request()->input('effective_date'), + 'publish_after' => request()->input('publish_after', null), + 'total' => request()->input('total'), + 'percentage' => request()->input('percentage', 100), ]); $item_type->setActualisedTotal( - $request->input('total'), - $request->input('percentage', 100) + request()->input('total'), + request()->input('percentage', 100) ); $item_type->save(); @@ -394,7 +396,6 @@ public function update( /** * Delete the assigned item * - * @param Request $request, * @param string $resource_type_id, * @param string $resource_id, * @param string $item_id @@ -402,7 +403,6 @@ public function update( * @return JsonResponse */ public function delete( - Request $request, string $resource_type_id, string $resource_id, string $item_id diff --git a/app/Models/Item.php b/app/Models/Item.php index a7cd439d..24bd2cdb 100644 --- a/app/Models/Item.php +++ b/app/Models/Item.php @@ -135,6 +135,7 @@ public function paginatedCollection( { $select_fields = [ 'item.id AS item_id', + 'item_type_allocated_expense.name AS item_name', 'item_type_allocated_expense.description AS item_description', 'item_type_allocated_expense.effective_date AS item_effective_date', 'item_type_allocated_expense.total AS item_total', @@ -281,6 +282,7 @@ public function single( where('resource.resource_type_id', '=', $resource_type_id)-> select( 'item.id AS item_id', + 'item_type_allocated_expense.name AS item_name', 'item_type_allocated_expense.description AS item_description', 'item_type_allocated_expense.effective_date AS item_effective_date', 'item_type_allocated_expense.total AS item_total', @@ -332,6 +334,7 @@ public function instanceToArray(Item $item, ItemTypeAllocatedExpense $item_type) { return [ 'item_id' => $item->id, + 'item_name' => $item->name, 'item_description' => $item_type->description, 'item_effective_date' => $item_type->effective_date, 'item_publish_after' => $item_type->publish_after, diff --git a/app/Models/ResourceTypeItem.php b/app/Models/ResourceTypeItem.php index 56ba6b93..bbc20e73 100644 --- a/app/Models/ResourceTypeItem.php +++ b/app/Models/ResourceTypeItem.php @@ -114,6 +114,7 @@ public function paginatedCollection( 'resource.name AS resource_name', 'resource.description AS resource_description', 'item.id AS item_id', + 'item_type_allocated_expense.name AS item_name', 'item_type_allocated_expense.description AS item_description', 'item_type_allocated_expense.effective_date AS item_effective_date', 'item_type_allocated_expense.total AS item_total', diff --git a/app/Models/Transformers/Item.php b/app/Models/Transformers/Item.php index 9ac55cb8..0b955434 100644 --- a/app/Models/Transformers/Item.php +++ b/app/Models/Transformers/Item.php @@ -30,6 +30,7 @@ public function toArray(): array { $item = [ 'id' => $this->hash->item()->encode($this->item['item_id']), + 'name' => $this->item['item_name'], 'description' => $this->item['item_description'], 'total' => number_format((float) $this->item['item_total'],2, '.', ''), 'percentage' => $this->item['item_percentage'], diff --git a/app/Models/Transformers/ResourceTypeItem.php b/app/Models/Transformers/ResourceTypeItem.php index eff54929..8207b43b 100644 --- a/app/Models/Transformers/ResourceTypeItem.php +++ b/app/Models/Transformers/ResourceTypeItem.php @@ -36,6 +36,7 @@ public function toArray(): array { $item = [ 'id' => $this->hash->item()->encode($this->item['item_id']), + 'name' => $this->item['item_name'], 'description' => $this->item['item_description'], 'total' => number_format((float) $this->item['item_total'], 2, '.', ''), 'percentage' => (int) $this->item['item_percentage'], diff --git a/config/api/item-type-allocated-expense/fields.php b/config/api/item-type-allocated-expense/fields.php index 266b2211..f9abedac 100644 --- a/config/api/item-type-allocated-expense/fields.php +++ b/config/api/item-type-allocated-expense/fields.php @@ -3,6 +3,16 @@ declare(strict_types=1); return [ + 'name' => [ + 'field' => 'name', + 'title' => 'item-type-allocated-expense/fields.title-name', + 'description' => 'item-type-allocated-expense/fields.name-description', + 'type' => 'string', + 'validation' => [ + 'max-length' => 255 + ], + 'required' => false + ], 'description' => [ 'field' => 'description', 'title' => 'item-type-allocated-expense/fields.title-description', @@ -11,7 +21,7 @@ 'validation' => [ 'max-length' => 255 ], - 'required' => true + 'required' => false ], 'effective_date' => [ 'field' => 'effective_date', diff --git a/config/api/item-type-allocated-expense/validation.php b/config/api/item-type-allocated-expense/validation.php index fbb42798..7bec3357 100644 --- a/config/api/item-type-allocated-expense/validation.php +++ b/config/api/item-type-allocated-expense/validation.php @@ -5,7 +5,8 @@ return [ 'POST' => [ 'fields' => [ - 'description' => 'required|string|max:255', + 'name' => 'required|string|max:255', + 'description' => 'sometimes|string|max:255', 'effective_date' => 'required|date_format:Y-m-d', 'publish_after' => 'sometimes|date_format:Y-m-d', 'total' => 'required|string|regex:/^\d+\.\d{2}$/', @@ -17,7 +18,8 @@ ], 'PATCH' => [ 'fields' => [ - 'description' => 'sometimes|string', + 'name' => 'sometimes|string|max:255', + 'description' => 'sometimes|string|max:255', 'effective_date' => 'sometimes|date_format:Y-m-d', 'publish_after' => 'sometimes|date_format:Y-m-d', 'total' => 'sometimes|string|regex:/^\d+\.\d{2}$/', diff --git a/config/api/item/searchable.php b/config/api/item/searchable.php index 1d5a028d..5ebb8cc8 100644 --- a/config/api/item/searchable.php +++ b/config/api/item/searchable.php @@ -3,5 +3,6 @@ declare(strict_types=1); return [ + 'name', 'description' ]; diff --git a/config/api/item/sortable.php b/config/api/item/sortable.php index 241ad978..3cba178b 100644 --- a/config/api/item/sortable.php +++ b/config/api/item/sortable.php @@ -3,6 +3,7 @@ declare(strict_types=1); return [ + 'name', 'description', 'total', 'actualised_total', From f068c09adfefa4c9934add1b7852b6b3d266a85e Mon Sep 17 00:00:00 2001 From: Dean Blackborough Date: Tue, 24 Sep 2019 11:31:02 +0100 Subject: [PATCH 4/5] Subcategory only valid if category set - Subcategory value only validaed it category also set. - Enable name to be a sortable value --- app/Models/Item.php | 3 ++- app/Models/ResourceTypeItem.php | 1 + app/Validators/Request/Parameters.php | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Models/Item.php b/app/Models/Item.php index 24bd2cdb..2e9442cf 100644 --- a/app/Models/Item.php +++ b/app/Models/Item.php @@ -241,6 +241,7 @@ public function paginatedCollection( case 'actualised_total': case 'description': case 'effective_date': + case 'name': case 'total': $collection->orderBy('item_type_allocated_expense.' . $field, $direction); break; @@ -334,7 +335,7 @@ public function instanceToArray(Item $item, ItemTypeAllocatedExpense $item_type) { return [ 'item_id' => $item->id, - 'item_name' => $item->name, + 'item_name' => $item_type->name, 'item_description' => $item_type->description, 'item_effective_date' => $item_type->effective_date, 'item_publish_after' => $item_type->publish_after, diff --git a/app/Models/ResourceTypeItem.php b/app/Models/ResourceTypeItem.php index bbc20e73..2157bbeb 100644 --- a/app/Models/ResourceTypeItem.php +++ b/app/Models/ResourceTypeItem.php @@ -223,6 +223,7 @@ public function paginatedCollection( case 'actualised_total': case 'description': case 'effective_date': + case 'name': case 'total': $collection->orderBy('item_type_allocated_expense.' . $field, $direction); break; diff --git a/app/Validators/Request/Parameters.php b/app/Validators/Request/Parameters.php index 0b625874..abfb8fd2 100644 --- a/app/Validators/Request/Parameters.php +++ b/app/Validators/Request/Parameters.php @@ -98,9 +98,9 @@ private static function validate() break; case 'subcategory': - case 'sub_category': if (array_key_exists($key, self::$parameters) === true) { if ( + array_key_exists('category', self::$parameters) === false || (new SubCategory())-> where('sub_category.id', '=', self::$parameters[$key])-> where('sub_category.category_id', '=', self::$parameters['category'])-> From 0a1130ed592c049f6a6c20688c1344d765854871 Mon Sep 17 00:00:00 2001 From: Dean Blackborough Date: Tue, 24 Sep 2019 11:57:18 +0100 Subject: [PATCH 5/5] Release - Updated the CHANGELOG for release --- CHANGELOG.md | 11 +++++++++-- config/api/version.php | 4 ++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f68949a..6f4c5e99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,16 @@ The complete changelog for the Costs to Expect REST API, follows the format defined at https://keepachangelog.com/en/1.0.0/ -## [v2.02.0] - 2019-10-xx +## [v2.01.1] - 2019-09-24 +### Changed +- The `description` field in the `item_type` tables is now nullable. +- We have updated the `item_type` tables; all descriptions are now null. +- We have upgraded to version 5.8 of the Laravel framework. + +### Fixed +- The subcategory parameter is only passed through to the relevant controller if the category parameter is also valid. -## [v2.01.0] - 2019-09-27 +## [v2.01.0] - 2019-09-22 ### Added - We have added a `Header` utility class that can be used to generate the expected headers for collection and item requests. - We have added a `RoutePermission` class which returns the view and manage permission for each route. diff --git a/config/api/version.php b/config/api/version.php index cc8cd7d5..5d3e8553 100644 --- a/config/api/version.php +++ b/config/api/version.php @@ -1,9 +1,9 @@ '2.02.0', + 'version'=> '2.01.1', 'prefix' => 'v2', - 'release_date' => '2019-10-xx', + 'release_date' => '2019-09-24', 'changelog' => [ 'api' => '/v2/changelog', 'markdown' => 'https://github.com/costs-to-expect/api/blob/master/CHANGELOG.md'