From 7f0fb16dc3a745a69628cebb42d055e708322fff Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Sun, 12 May 2019 10:10:31 -0500 Subject: [PATCH 01/16] Update to Laravel 5.8 --- README.md | 1 + app/Exceptions/Handler.php | 3 +- composer.json | 72 +-- composer.lock | 984 +++++++++++-------------------------- config/app.php | 1 - config/cache.php | 3 - config/laratrust.php | 22 +- docker/php/Dockerfile | 6 +- docker/php/ext-opcache.ini | 8 + 9 files changed, 367 insertions(+), 733 deletions(-) create mode 100644 docker/php/ext-opcache.ini diff --git a/README.md b/README.md index f8a562656..2613c6905 100755 --- a/README.md +++ b/README.md @@ -40,6 +40,7 @@ A full development environment can be brought up using Docker: ```bash composer install npm install +docker-compose build docker-compose up ``` diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 0f620ecd5..2fb46324e 100755 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -9,6 +9,7 @@ use Illuminate\Validation\ValidationException; use Log; use Symfony\Component\HttpKernel\Exception\HttpException; +use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; /** @@ -134,7 +135,7 @@ protected function unauthenticated($request, AuthenticationException $exception) * * @return \Illuminate\Http\Response|\Symfony\Component\HttpFoundation\Response */ - protected function renderHttpException(HttpException $e) + protected function renderHttpException(HttpExceptionInterface $e) { $status = $e->getStatusCode(); view()->replaceNamespace('errors', [ diff --git a/composer.json b/composer.json index e91e65fe6..dcf4050e9 100755 --- a/composer.json +++ b/composer.json @@ -7,51 +7,51 @@ "minimum-stability": "stable", "homepage": "http://www.phpvms.net", "require": { - "php": ">=7.1", + "php": ">=7.2", "ext-calendar": "*", "ext-json": "*", "ext-mbstring": "*", "ext-pdo": "*", - "composer/composer": "1.8.x", - "composer/semver": "1.4.x", - "akaunting/money": "1.0.x", - "anhskohbo/no-captcha": "3.0.x", - "arrilot/laravel-widgets": "3.13.x", + "composer/composer": "1.8.*", + "composer/semver": "1.4.*", + "akaunting/money": "1.0.*", + "anhskohbo/no-captcha": "3.0.*", + "arrilot/laravel-widgets": "3.13.*", "fzaninotto/faker": "^1.8", - "guzzlehttp/guzzle": "6.3.x", - "hashids/hashids": "2.0.x", - "igaster/laravel-theme": "2.0.x", - "intervention/image": "2.4.x", - "irazasyed/laravel-gamp": "1.3.x", - "jackiedo/timezonelist": "5.x", - "jmikola/geojson": "1.0.x", - "joshbrw/laravel-module-installer": "0.1.x", - "laracasts/flash": "3.0.x", - "laravel/framework": "5.7.x", - "laravelcollective/html": "5.7.x", - "league/csv": "9.2.x", - "league/geotools": "0.8.x", - "league/iso3166": "2.1.x", + "guzzlehttp/guzzle": "6.3.*", + "hashids/hashids": "2.0.*", + "igaster/laravel-theme": "2.0.*", + "intervention/image": "2.4.*", + "irazasyed/laravel-gamp": "1.3.*", + "jackiedo/timezonelist": "5.*", + "jmikola/geojson": "1.0.*", + "joshbrw/laravel-module-installer": "0.1.*", + "laracasts/flash": "3.0.*", + "laravel/framework": "5.8.*", + "laravelcollective/html": "^5.8", + "league/csv": "9.2.*", + "league/geotools": "0.8.*", + "league/iso3166": "2.1.*", "markrogoyski/math-php": "^0.38.0", - "myclabs/deep-copy": "1.8.x", - "nabeel/vacentral": "1.x", - "nwidart/laravel-modules": "3.3.x", - "php-units-of-measure/php-units-of-measure": "2.1.x", - "pragmarx/version": "0.2.x", - "prettus/l5-repository": "2.6.x", - "santigarcor/laratrust": "5.0.x", - "sebastiaanluca/laravel-helpers": "1.0.x", - "spatie/laravel-pjax": "1.3.x", + "myclabs/deep-copy": "1.8.*", + "nabeel/vacentral": "1.*", + "nwidart/laravel-modules": "5.*", + "php-units-of-measure/php-units-of-measure": "2.1.*", + "pragmarx/version": "0.2.*", + "prettus/l5-repository": "2.6.*", + "santigarcor/laratrust": "5.2.*", + "sebastiaanluca/laravel-helpers": "3.*", + "spatie/laravel-pjax": "1.3.*", "symfony/polyfill-iconv": "^1.11", - "theiconic/php-ga-measurement-protocol": "2.7.x", - "tivie/php-os-detector": "1.1.x", - "toin0u/geotools-laravel": "1.0.x", - "vierbergenlars/php-semver": "3.0.x", - "waavi/sanitizer": "1.0.x", - "webpatser/laravel-uuid": "3.x" + "theiconic/php-ga-measurement-protocol": "2.7.*", + "tivie/php-os-detector": "1.1.*", + "toin0u/geotools-laravel": "1.0.*", + "vierbergenlars/php-semver": "3.0.*", + "waavi/sanitizer": "1.0.*", + "webpatser/laravel-uuid": "3.*" }, "require-dev": { - "phpunit/phpunit": "7.5.x", + "phpunit/phpunit": "7.5.*", "barryvdh/laravel-ide-helper": "^2.0", "barryvdh/laravel-debugbar": "^3.0", "mockery/mockery": "0.9.*", diff --git a/composer.lock b/composer.lock index c670bb52e..c5f714b5c 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "290bc8970d44a12e8546926949d73e20", + "content-hash": "876193d327157c01998b33e3d095b7f4", "packages": [ { "name": "akaunting/money", - "version": "1.0.10", + "version": "1.0.11", "source": { "type": "git", "url": "https://github.com/akaunting/money.git", - "reference": "f065217a25c2b0ba5159f7b847276e0a9f09a814" + "reference": "52d5f3a8d30354dbc07b558263df0560dfa85bf1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/akaunting/money/zipball/f065217a25c2b0ba5159f7b847276e0a9f09a814", - "reference": "f065217a25c2b0ba5159f7b847276e0a9f09a814", + "url": "https://api.github.com/repos/akaunting/money/zipball/52d5f3a8d30354dbc07b558263df0560dfa85bf1", + "reference": "52d5f3a8d30354dbc07b558263df0560dfa85bf1", "shasum": "" }, "require": { @@ -65,7 +65,7 @@ "laravel", "money" ], - "time": "2019-02-25T12:34:37+00:00" + "time": "2019-04-09T08:29:48+00:00" }, { "name": "anhskohbo/no-captcha", @@ -237,7 +237,7 @@ { "name": "Tobias Nyholm", "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" + "homepage": "https://github.com/nyholm" } ], "description": "Common classes for PSR-6 adapters", @@ -292,7 +292,7 @@ "/Tests/" ] }, - "notification-url": "https://packagist.org/downloads/", + "notification-url": "http://packagist.org/downloads/", "license": [ "MIT" ], @@ -354,7 +354,7 @@ "/Tests/" ] }, - "notification-url": "https://packagist.org/downloads/", + "notification-url": "http://packagist.org/downloads/", "license": [ "MIT" ], @@ -409,7 +409,7 @@ "Cache\\TagInterop\\": "" } }, - "notification-url": "https://packagist.org/downloads/", + "notification-url": "http://packagist.org/downloads/", "license": [ "MIT" ], @@ -493,16 +493,16 @@ }, { "name": "composer/composer", - "version": "1.8.4", + "version": "1.8.5", "source": { "type": "git", "url": "https://github.com/composer/composer.git", - "reference": "bc364c2480c17941e2135cfc568fa41794392534" + "reference": "949b116f9e7d98d8d276594fed74b580d125c0e6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/bc364c2480c17941e2135cfc568fa41794392534", - "reference": "bc364c2480c17941e2135cfc568fa41794392534", + "url": "https://api.github.com/repos/composer/composer/zipball/949b116f9e7d98d8d276594fed74b580d125c0e6", + "reference": "949b116f9e7d98d8d276594fed74b580d125c0e6", "shasum": "" }, "require": { @@ -569,7 +569,7 @@ "dependency", "package" ], - "time": "2019-02-11T09:52:10+00:00" + "time": "2019-04-09T15:46:48+00:00" }, { "name": "composer/semver", @@ -768,7 +768,7 @@ "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector" } }, - "notification-url": "https://packagist.org/downloads/", + "notification-url": "http://packagist.org/downloads/", "license": [ "MIT" ], @@ -1164,7 +1164,7 @@ "src/functions_include.php" ] }, - "notification-url": "https://packagist.org/downloads/", + "notification-url": "http://packagist.org/downloads/", "license": [ "MIT" ], @@ -1283,7 +1283,7 @@ "Hashids\\": "src/" } }, - "notification-url": "https://packagist.org/downloads/", + "notification-url": "http://packagist.org/downloads/", "license": [ "MIT" ], @@ -1484,7 +1484,7 @@ "Irazasyed\\LaravelGAMP\\": "src/" } }, - "notification-url": "https://packagist.org/downloads/", + "notification-url": "http://packagist.org/downloads/", "license": [ "MIT" ], @@ -1531,7 +1531,7 @@ "Jackiedo\\Timezonelist\\": "src/Jackiedo/Timezonelist" } }, - "notification-url": "https://packagist.org/downloads/", + "notification-url": "http://packagist.org/downloads/", "license": [ "MIT" ], @@ -1584,7 +1584,7 @@ "stubs/" ] }, - "notification-url": "https://packagist.org/downloads/", + "notification-url": "http://packagist.org/downloads/", "license": [ "MIT" ], @@ -1635,7 +1635,7 @@ "Joshbrw\\LaravelModuleInstaller\\": "src/" } }, - "notification-url": "https://packagist.org/downloads/", + "notification-url": "http://packagist.org/downloads/", "license": [ "MIT" ], @@ -1793,7 +1793,7 @@ "src/Laracasts/Flash/functions.php" ] }, - "notification-url": "https://packagist.org/downloads/", + "notification-url": "http://packagist.org/downloads/", "license": [ "MIT" ], @@ -1808,45 +1808,45 @@ }, { "name": "laravel/framework", - "version": "v5.7.28", + "version": "v5.8.16", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "8e69728f1c80a024588adbd24c65c4fcf9aa9192" + "reference": "83d57f9f9162ab476c43b9ec00d463ff12c578fd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/8e69728f1c80a024588adbd24c65c4fcf9aa9192", - "reference": "8e69728f1c80a024588adbd24c65c4fcf9aa9192", + "url": "https://api.github.com/repos/laravel/framework/zipball/83d57f9f9162ab476c43b9ec00d463ff12c578fd", + "reference": "83d57f9f9162ab476c43b9ec00d463ff12c578fd", "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" @@ -1889,12 +1889,12 @@ "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": { @@ -1912,17 +1912,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": { @@ -1950,153 +1951,39 @@ "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" - }, - { - "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-05-07T14:37:11+00:00" }, { "name": "laravelcollective/html", - "version": "v5.7.1", + "version": "v5.8.0", "source": { "type": "git", "url": "https://github.com/LaravelCollective/html.git", - "reference": "777b6d390811ba249255ed5750bf17a019cd88a5" + "reference": "0e360143d3476fe4141d267a260c140569fa207b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/LaravelCollective/html/zipball/777b6d390811ba249255ed5750bf17a019cd88a5", - "reference": "777b6d390811ba249255ed5750bf17a019cd88a5", + "url": "https://api.github.com/repos/LaravelCollective/html/zipball/0e360143d3476fe4141d267a260c140569fa207b", + "reference": "0e360143d3476fe4141d267a260c140569fa207b", "shasum": "" }, "require": { - "illuminate/http": "5.7.*", - "illuminate/routing": "5.7.*", - "illuminate/session": "5.7.*", - "illuminate/support": "5.7.*", - "illuminate/view": "5.7.*", + "illuminate/http": "5.8.*", + "illuminate/routing": "5.8.*", + "illuminate/session": "5.8.*", + "illuminate/support": "5.8.*", + "illuminate/view": "5.8.*", "php": ">=7.1.3" }, "require-dev": { - "illuminate/database": "5.7.*", + "illuminate/database": "5.8.*", "mockery/mockery": "~1.0", "phpunit/phpunit": "~7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.7-dev" + "dev-master": "5.8-dev" }, "laravel": { "providers": [ @@ -2132,65 +2019,7 @@ ], "description": "HTML and Form Builders for the Laravel Framework", "homepage": "https://laravelcollective.com", - "time": "2018-09-05T18:32:53+00:00" - }, - { - "name": "lcobucci/jwt", - "version": "3.2.5", - "source": { - "type": "git", - "url": "https://github.com/lcobucci/jwt.git", - "reference": "82be04b4753f8b7693b62852b7eab30f97524f9b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/lcobucci/jwt/zipball/82be04b4753f8b7693b62852b7eab30f97524f9b", - "reference": "82be04b4753f8b7693b62852b7eab30f97524f9b", - "shasum": "" - }, - "require": { - "ext-openssl": "*", - "php": ">=5.5" - }, - "require-dev": { - "mdanter/ecc": "~0.3.1", - "mikey179/vfsstream": "~1.5", - "phpmd/phpmd": "~2.2", - "phpunit/php-invoker": "~1.1", - "phpunit/phpunit": "~4.5", - "squizlabs/php_codesniffer": "~2.3" - }, - "suggest": { - "mdanter/ecc": "Required to use Elliptic Curves based algorithms." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "psr-4": { - "Lcobucci\\JWT\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Luís Otávio Cobucci Oblonczyk", - "email": "lcobucci@gmail.com", - "role": "Developer" - } - ], - "description": "A simple library to work with JSON Web Token and JSON Web Signature", - "keywords": [ - "JWS", - "jwt" - ], - "time": "2018-11-11T12:22:26+00:00" + "time": "2019-03-01T22:53:41+00:00" }, { "name": "league/csv", @@ -2698,28 +2527,30 @@ }, { "name": "nesbot/carbon", - "version": "1.36.2", + "version": "2.17.1", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "cd324b98bc30290f233dd0e75e6ce49f7ab2a6c9" + "reference": "96acbc0c03782e8115156dd4dd8b736267155066" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/cd324b98bc30290f233dd0e75e6ce49f7ab2a6c9", - "reference": "cd324b98bc30290f233dd0e75e6ce49f7ab2a6c9", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/96acbc0c03782e8115156dd4dd8b736267155066", + "reference": "96acbc0c03782e8115156dd4dd8b736267155066", "shasum": "" }, "require": { - "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": { - "phpunit/phpunit": "^4.8.35 || ^5.7" - }, - "suggest": { - "friendsofphp/php-cs-fixer": "Needed for the `composer phpcs` command. Allow to automatically fix code style.", - "phpstan/phpstan": "Needed for the `composer phpstan` command. Allow to detect potential errors." + "friendsofphp/php-cs-fixer": "^2.14 || ^3.0", + "kylekatarnls/multi-tester": "^1.1", + "phpmd/phpmd": "^2.6", + "phpstan/phpstan": "^0.11", + "phpunit/phpunit": "^7.5 || ^8.0", + "squizlabs/php_codesniffer": "^3.4" }, "type": "library", "extra": { @@ -2731,7 +2562,7 @@ }, "autoload": { "psr-4": { - "": "src/" + "Carbon\\": "src/Carbon/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2752,55 +2583,7 @@ "datetime", "time" ], - "time": "2018-12-28T10:07:33+00:00" - }, - { - "name": "nexmo/client", - "version": "1.6.3", - "source": { - "type": "git", - "url": "https://github.com/Nexmo/nexmo-php.git", - "reference": "29f6856b4d918f3565bf56c26bc01dd664988b24" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Nexmo/nexmo-php/zipball/29f6856b4d918f3565bf56c26bc01dd664988b24", - "reference": "29f6856b4d918f3565bf56c26bc01dd664988b24", - "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.3" - }, - "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-03-15T11:47:11+00:00" + "time": "2019-04-27T18:04:27+00:00" }, { "name": "nikic/php-parser", @@ -2855,29 +2638,29 @@ }, { "name": "nwidart/laravel-modules", - "version": "3.3.1", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/nWidart/laravel-modules.git", - "reference": "a7ec8a5871e57d337b7d37bbeb246fb99c41c703" + "reference": "52e2e8142cc9f06feb276b6d18af7c98db5b3703" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nWidart/laravel-modules/zipball/a7ec8a5871e57d337b7d37bbeb246fb99c41c703", - "reference": "a7ec8a5871e57d337b7d37bbeb246fb99c41c703", + "url": "https://api.github.com/repos/nWidart/laravel-modules/zipball/52e2e8142cc9f06feb276b6d18af7c98db5b3703", + "reference": "52e2e8142cc9f06feb276b6d18af7c98db5b3703", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.7", - "laravel/framework": "5.6.*", + "friendsofphp/php-cs-fixer": "^2.14", + "laravel/framework": "5.8.*", "mockery/mockery": "~1.0", - "orchestra/testbench": "^3.6", + "orchestra/testbench": "^3.8", "phpstan/phpstan": "^0.9.2", - "phpunit/phpunit": "~7.0", - "spatie/phpunit-snapshot-assertions": "^1.0" + "phpunit/phpunit": "~7.0|~8.0", + "spatie/phpunit-snapshot-assertions": "^2.1.0" }, "type": "library", "extra": { @@ -2890,7 +2673,7 @@ } }, "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -2921,20 +2704,20 @@ "nwidart", "rad" ], - "time": "2018-07-13T15:36:59+00:00" + "time": "2019-05-11T15:27:41+00:00" }, { "name": "opis/closure", - "version": "3.1.6", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/opis/closure.git", - "reference": "ccb8e3928c5c8181c76cdd0ed9366c5bcaafd91b" + "reference": "09b4389715a7eec100176ea58286649181753508" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opis/closure/zipball/ccb8e3928c5c8181c76cdd0ed9366c5bcaafd91b", - "reference": "ccb8e3928c5c8181c76cdd0ed9366c5bcaafd91b", + "url": "https://api.github.com/repos/opis/closure/zipball/09b4389715a7eec100176ea58286649181753508", + "reference": "09b4389715a7eec100176ea58286649181753508", "shasum": "" }, "require": { @@ -2947,7 +2730,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1.x-dev" + "dev-master": "3.2.x-dev" } }, "autoload": { @@ -2982,7 +2765,7 @@ "serialization", "serialize" ], - "time": "2019-02-22T10:30:00+00:00" + "time": "2019-05-05T12:50:25+00:00" }, { "name": "paragonie/random_compat", @@ -3094,221 +2877,105 @@ "time": "2019-02-23T07:42:53+00:00" }, { - "name": "php-http/guzzle6-adapter", - "version": "v1.1.1", + "name": "php-units-of-measure/php-units-of-measure", + "version": "v2.1.0", "source": { "type": "git", - "url": "https://github.com/php-http/guzzle6-adapter.git", - "reference": "a56941f9dc6110409cfcddc91546ee97039277ab" + "url": "https://github.com/PhpUnitsOfMeasure/php-units-of-measure.git", + "reference": "25f476e9c50e11af8cf044d22ffc271c96aa5248" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/guzzle6-adapter/zipball/a56941f9dc6110409cfcddc91546ee97039277ab", - "reference": "a56941f9dc6110409cfcddc91546ee97039277ab", + "url": "https://api.github.com/repos/PhpUnitsOfMeasure/php-units-of-measure/zipball/25f476e9c50e11af8cf044d22ffc271c96aa5248", + "reference": "25f476e9c50e11af8cf044d22ffc271c96aa5248", "shasum": "" }, "require": { - "guzzlehttp/guzzle": "^6.0", - "php": ">=5.5.0", - "php-http/httplug": "^1.0" + "php": ">=5.4.0" }, - "provide": { - "php-http/async-client-implementation": "1.0", - "php-http/client-implementation": "1.0" + "replace": { + "triplepoint/php-units-of-measure": "*" }, "require-dev": { - "ext-curl": "*", - "php-http/adapter-integration-tests": "^0.4" + "phpunit/phpunit": "4.8.*", + "squizlabs/php_codesniffer": "2.2.*" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2-dev" - } - }, "autoload": { "psr-4": { - "Http\\Adapter\\Guzzle6\\": "src/" + "PhpUnitsOfMeasure\\": "source/" } }, - "notification-url": "https://packagist.org/downloads/", + "notification-url": "http://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" + "name": "Jonathan Hanson", + "email": "jonathan@jonathan-hanson.org", + "homepage": "http://www.jonathan-hanson.org/", + "role": "Developer" } ], - "description": "Guzzle 6 HTTP Adapter", - "homepage": "http://httplug.io", + "description": "A PHP library for converting between standard units of measure.", + "homepage": "https://github.com/PhpUnitsOfMeasure/php-units-of-measure", "keywords": [ - "Guzzle", - "http" + "conversion", + "data", + "measurements" ], - "time": "2016-05-10T06:13:32+00:00" + "time": "2016-07-24T22:36:00+00:00" }, { - "name": "php-http/httplug", - "version": "v1.1.0", + "name": "phpoption/phpoption", + "version": "1.5.0", "source": { "type": "git", - "url": "https://github.com/php-http/httplug.git", - "reference": "1c6381726c18579c4ca2ef1ec1498fdae8bdf018" + "url": "https://github.com/schmittjoh/php-option.git", + "reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/httplug/zipball/1c6381726c18579c4ca2ef1ec1498fdae8bdf018", - "reference": "1c6381726c18579c4ca2ef1ec1498fdae8bdf018", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/94e644f7d2051a5f0fcf77d81605f152eecff0ed", + "reference": "94e644f7d2051a5f0fcf77d81605f152eecff0ed", "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" - ], - "time": "2016-01-26T13:27:02+00:00" - }, - { - "name": "php-units-of-measure/php-units-of-measure", - "version": "v2.1.0", - "source": { - "type": "git", - "url": "https://github.com/PhpUnitsOfMeasure/php-units-of-measure.git", - "reference": "25f476e9c50e11af8cf044d22ffc271c96aa5248" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PhpUnitsOfMeasure/php-units-of-measure/zipball/25f476e9c50e11af8cf044d22ffc271c96aa5248", - "reference": "25f476e9c50e11af8cf044d22ffc271c96aa5248", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "replace": { - "triplepoint/php-units-of-measure": "*" - }, - "require-dev": { - "phpunit/phpunit": "4.8.*", - "squizlabs/php_codesniffer": "2.2.*" - }, - "type": "library", - "autoload": { - "psr-4": { - "PhpUnitsOfMeasure\\": "source/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jonathan Hanson", - "email": "jonathan@jonathan-hanson.org", - "homepage": "http://www.jonathan-hanson.org/", - "role": "Developer" - } - ], - "description": "A PHP library for converting between standard units of measure.", - "homepage": "https://github.com/PhpUnitsOfMeasure/php-units-of-measure", - "keywords": [ - "conversion", - "data", - "measurements" + "language", + "option", + "php", + "type" ], - "time": "2016-07-24T22:36:00+00:00" + "time": "2015-07-25T16:39:46+00:00" }, { "name": "pragmarx/version", @@ -3473,7 +3140,7 @@ "Prettus\\Repository\\": "src/Prettus/Repository/" } }, - "notification-url": "https://packagist.org/downloads/", + "notification-url": "http://packagist.org/downloads/", "license": [ "MIT" ], @@ -3562,7 +3229,7 @@ "Psr\\Cache\\": "src/" } }, - "notification-url": "https://packagist.org/downloads/", + "notification-url": "http://packagist.org/downloads/", "license": [ "MIT" ], @@ -3986,30 +3653,26 @@ }, { "name": "santigarcor/laratrust", - "version": "5.0.9", + "version": "5.2.1", "source": { "type": "git", "url": "https://github.com/santigarcor/laratrust.git", - "reference": "526cc3e8970c35b97c71a7a6d8b63c2073568bb1" + "reference": "600aa87574e8915c3bb6d10c25d39b985327818a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/santigarcor/laratrust/zipball/526cc3e8970c35b97c71a7a6d8b63c2073568bb1", - "reference": "526cc3e8970c35b97c71a7a6d8b63c2073568bb1", + "url": "https://api.github.com/repos/santigarcor/laratrust/zipball/600aa87574e8915c3bb6d10c25d39b985327818a", + "reference": "600aa87574e8915c3bb6d10c25d39b985327818a", "shasum": "" }, "require": { - "illuminate/auth": "~5.2", - "illuminate/cache": "~5.2", - "illuminate/console": "~5.2", - "illuminate/database": "^5.2.32", - "illuminate/support": "~5.2", "kkszymanowski/traitor": "^0.2.0", - "php": ">=5.5.9" + "laravel/framework": "~5.6.0|~5.7.0|~5.8.0", + "php": "^7.1" }, "require-dev": { "mockery/mockery": ">=0.9.9", - "orchestra/testbench": "~3.2", + "orchestra/testbench": "~3.6.0|~3.7.0|~3.8.0", "phpunit/phpunit": ">=4.1" }, "type": "library", @@ -4051,48 +3714,51 @@ "rbac", "roles" ], - "time": "2018-03-05T13:21:52+00:00" + "time": "2019-04-17T16:09:31+00:00" }, { "name": "sebastiaanluca/laravel-helpers", - "version": "1.0.3", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastiaanluca/laravel-helpers.git", - "reference": "82c1ff18c29ff9aa232e2441a093e72fce53f4a3" + "reference": "e695d71e3e13afff4b6e18a5ffb0813f49cbb883" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastiaanluca/laravel-helpers/zipball/82c1ff18c29ff9aa232e2441a093e72fce53f4a3", - "reference": "82c1ff18c29ff9aa232e2441a093e72fce53f4a3", + "url": "https://api.github.com/repos/sebastiaanluca/laravel-helpers/zipball/e695d71e3e13afff4b6e18a5ffb0813f49cbb883", + "reference": "e695d71e3e13afff4b6e18a5ffb0813f49cbb883", "shasum": "" }, "require": { - "illuminate/support": "^5.4", - "php": "^7" + "laravel/framework": "~5.8.0", + "php": "^7.2" }, "require-dev": { - "illuminate/database": "^5.4", - "kint-php/kint": "^2.1", - "laravel/framework": "^5.4", - "laravelcollective/html": "^5.4", - "laravelista/ekko": "^1.3", - "mockery/mockery": "^0.9.9", - "nesbot/carbon": "^1.22", - "orchestra/testbench": "^3.4.2", - "phpunit/phpunit": "^6.2" + "kint-php/kint": "^3.1", + "nesbot/carbon": "^1.25|^2.0", + "orchestra/testbench": "~3.8.0", + "phpunit/phpunit": "^8.0" }, "suggest": { - "illuminate/database": "Laravel framework database component. Required for the table reader helper.", - "kint-php/kint": "A powerful and modern PHP debugging tool. Required for the debug helpers.", - "laravel/framework": "The Laravel framework. Required for some global helpers and the form helpers.", - "nesbot/carbon": "A simple PHP API extension for DateTime. Required for the carbonize collection macro and global helper." + "kint-php/kint": "A powerful and modern PHP debugging tool. Required for the debug collection macros.", + "nesbot/carbon": "A simple PHP API extension for DateTime. Required for the carbonize collection macro." }, "type": "library", + "extra": { + "laravel": { + "providers": [ + "SebastiaanLuca\\Helpers\\Collections\\CollectionMacrosServiceProvider" + ] + } + }, "autoload": { "psr-4": { "SebastiaanLuca\\Helpers\\": "src" - } + }, + "files": [ + "src/Methods/helpers.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -4103,22 +3769,18 @@ "name": "Sebastiaan Luca", "email": "hello@sebastiaanluca.com", "homepage": "https://www.sebastiaanluca.com", - "role": "Developer" + "role": "Author" } ], - "description": "An extensive set of generic PHP and Laravel-specific helpers.", + "description": "An extensive set of Laravel framework helper functions and collection macros.", "homepage": "https://github.com/sebastiaanluca/laravel-helpers", "keywords": [ - "array", - "blade", - "collection", - "form", - "helper", + "collections", + "helpers", "laravel", - "pipe", - "response" + "macros" ], - "time": "2018-07-21T14:24:22+00:00" + "time": "2019-02-27T17:13:55+00:00" }, { "name": "seld/jsonlint", @@ -4244,7 +3906,7 @@ "Spatie\\Pjax\\": "src" } }, - "notification-url": "https://packagist.org/downloads/", + "notification-url": "http://packagist.org/downloads/", "license": [ "MIT" ], @@ -4267,16 +3929,16 @@ }, { "name": "swiftmailer/swiftmailer", - "version": "v6.2.0", + "version": "v6.2.1", "source": { "type": "git", "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "6fa3232ff9d3f8237c0fae4b7ff05e1baa4cd707" + "reference": "5397cd05b0a0f7937c47b0adcb4c60e5ab936b6a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/6fa3232ff9d3f8237c0fae4b7ff05e1baa4cd707", - "reference": "6fa3232ff9d3f8237c0fae4b7ff05e1baa4cd707", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/5397cd05b0a0f7937c47b0adcb4c60e5ab936b6a", + "reference": "5397cd05b0a0f7937c47b0adcb4c60e5ab936b6a", "shasum": "" }, "require": { @@ -4325,20 +3987,20 @@ "mail", "mailer" ], - "time": "2019-03-10T07:52:41+00:00" + "time": "2019-04-21T09:21:45+00:00" }, { "name": "symfony/console", - "version": "v4.2.5", + "version": "v4.2.8", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "24206aff3efe6962593297e57ef697ebb220e384" + "reference": "e2840bb38bddad7a0feaf85931e38fdcffdb2f81" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/24206aff3efe6962593297e57ef697ebb220e384", - "reference": "24206aff3efe6962593297e57ef697ebb220e384", + "url": "https://api.github.com/repos/symfony/console/zipball/e2840bb38bddad7a0feaf85931e38fdcffdb2f81", + "reference": "e2840bb38bddad7a0feaf85931e38fdcffdb2f81", "shasum": "" }, "require": { @@ -4397,20 +4059,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2019-04-01T07:32:59+00:00" + "time": "2019-04-08T14:23:48+00:00" }, { "name": "symfony/contracts", - "version": "v1.0.2", + "version": "v1.1.0", "source": { "type": "git", "url": "https://github.com/symfony/contracts.git", - "reference": "1aa7ab2429c3d594dd70689604b5cf7421254cdf" + "reference": "d3636025e8253c6144358ec0a62773cae588395b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/contracts/zipball/1aa7ab2429c3d594dd70689604b5cf7421254cdf", - "reference": "1aa7ab2429c3d594dd70689604b5cf7421254cdf", + "url": "https://api.github.com/repos/symfony/contracts/zipball/d3636025e8253c6144358ec0a62773cae588395b", + "reference": "d3636025e8253c6144358ec0a62773cae588395b", "shasum": "" }, "require": { @@ -4418,19 +4080,22 @@ }, "require-dev": { "psr/cache": "^1.0", - "psr/container": "^1.0" + "psr/container": "^1.0", + "symfony/polyfill-intl-idn": "^1.10" }, "suggest": { "psr/cache": "When using the Cache contracts", "psr/container": "When using the Service contracts", "symfony/cache-contracts-implementation": "", + "symfony/event-dispatcher-implementation": "", + "symfony/http-client-contracts-implementation": "", "symfony/service-contracts-implementation": "", "symfony/translation-contracts-implementation": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "1.1-dev" } }, "autoload": { @@ -4465,11 +4130,11 @@ "interoperability", "standards" ], - "time": "2018-12-05T08:06:11+00:00" + "time": "2019-04-27T14:29:50+00:00" }, { "name": "symfony/css-selector", - "version": "v4.2.5", + "version": "v4.2.8", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", @@ -4522,16 +4187,16 @@ }, { "name": "symfony/debug", - "version": "v4.2.5", + "version": "v4.2.8", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "43ce8ab34c734dcc8a4af576cb86711daab964c5" + "reference": "2d279b6bb1d582dd5740d4d3251ae8c18812ed37" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/43ce8ab34c734dcc8a4af576cb86711daab964c5", - "reference": "43ce8ab34c734dcc8a4af576cb86711daab964c5", + "url": "https://api.github.com/repos/symfony/debug/zipball/2d279b6bb1d582dd5740d4d3251ae8c18812ed37", + "reference": "2d279b6bb1d582dd5740d4d3251ae8c18812ed37", "shasum": "" }, "require": { @@ -4574,11 +4239,11 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2019-03-10T17:09:50+00:00" + "time": "2019-04-11T11:27:41+00:00" }, { "name": "symfony/dom-crawler", - "version": "v4.2.5", + "version": "v4.2.8", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", @@ -4635,16 +4300,16 @@ }, { "name": "symfony/event-dispatcher", - "version": "v4.2.5", + "version": "v4.2.8", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "ca5af306fbc37f3cf597e91bc9cfa0c7d3f33544" + "reference": "fbce53cd74ac509cbe74b6f227622650ab759b02" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/ca5af306fbc37f3cf597e91bc9cfa0c7d3f33544", - "reference": "ca5af306fbc37f3cf597e91bc9cfa0c7d3f33544", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/fbce53cd74ac509cbe74b6f227622650ab759b02", + "reference": "fbce53cd74ac509cbe74b6f227622650ab759b02", "shasum": "" }, "require": { @@ -4695,11 +4360,11 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2019-03-30T15:58:42+00:00" + "time": "2019-04-06T13:51:08+00:00" }, { "name": "symfony/filesystem", - "version": "v4.2.5", + "version": "v4.2.8", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", @@ -4749,16 +4414,16 @@ }, { "name": "symfony/finder", - "version": "v4.2.5", + "version": "v4.2.8", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "267b7002c1b70ea80db0833c3afe05f0fbde580a" + "reference": "e45135658bd6c14b61850bf131c4f09a55133f69" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/267b7002c1b70ea80db0833c3afe05f0fbde580a", - "reference": "267b7002c1b70ea80db0833c3afe05f0fbde580a", + "url": "https://api.github.com/repos/symfony/finder/zipball/e45135658bd6c14b61850bf131c4f09a55133f69", + "reference": "e45135658bd6c14b61850bf131c4f09a55133f69", "shasum": "" }, "require": { @@ -4794,20 +4459,20 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2019-02-23T15:42:05+00:00" + "time": "2019-04-06T13:51:08+00:00" }, { "name": "symfony/http-foundation", - "version": "v4.2.5", + "version": "v4.2.8", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "5b7ab6beaa5b053b8d3c9b13367ada9b292e12e1" + "reference": "1ea878bd3af18f934dedb8c0de60656a9a31a718" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/5b7ab6beaa5b053b8d3c9b13367ada9b292e12e1", - "reference": "5b7ab6beaa5b053b8d3c9b13367ada9b292e12e1", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/1ea878bd3af18f934dedb8c0de60656a9a31a718", + "reference": "1ea878bd3af18f934dedb8c0de60656a9a31a718", "shasum": "" }, "require": { @@ -4848,20 +4513,20 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2019-03-30T15:58:42+00:00" + "time": "2019-05-01T08:36:31+00:00" }, { "name": "symfony/http-kernel", - "version": "v4.2.5", + "version": "v4.2.8", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "e8b940bbeebf0f96789b5d17d9d77f8b2613960b" + "reference": "a7713bc522f1a1cdf0b39f809fa4542523fc3114" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/e8b940bbeebf0f96789b5d17d9d77f8b2613960b", - "reference": "e8b940bbeebf0f96789b5d17d9d77f8b2613960b", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/a7713bc522f1a1cdf0b39f809fa4542523fc3114", + "reference": "a7713bc522f1a1cdf0b39f809fa4542523fc3114", "shasum": "" }, "require": { @@ -4937,11 +4602,11 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2019-04-02T19:03:51+00:00" + "time": "2019-05-01T13:31:08+00:00" }, { "name": "symfony/inflector", - "version": "v4.2.5", + "version": "v4.2.8", "source": { "type": "git", "url": "https://github.com/symfony/inflector.git", @@ -5292,16 +4957,16 @@ }, { "name": "symfony/process", - "version": "v4.2.5", + "version": "v4.2.8", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "1e6cbb41dadcaf29e0db034d6ad0d039a9df06e6" + "reference": "8cf39fb4ccff793340c258ee7760fd40bfe745fe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/1e6cbb41dadcaf29e0db034d6ad0d039a9df06e6", - "reference": "1e6cbb41dadcaf29e0db034d6ad0d039a9df06e6", + "url": "https://api.github.com/repos/symfony/process/zipball/8cf39fb4ccff793340c258ee7760fd40bfe745fe", + "reference": "8cf39fb4ccff793340c258ee7760fd40bfe745fe", "shasum": "" }, "require": { @@ -5337,11 +5002,11 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2019-03-10T20:07:02+00:00" + "time": "2019-04-10T16:20:36+00:00" }, { "name": "symfony/property-access", - "version": "v4.2.5", + "version": "v4.2.8", "source": { "type": "git", "url": "https://github.com/symfony/property-access.git", @@ -5408,16 +5073,16 @@ }, { "name": "symfony/routing", - "version": "v4.2.5", + "version": "v4.2.8", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "319f600c1ea0f981f6bdc2f042cfc1690957c0e0" + "reference": "f4e43bb0dff56f0f62fa056c82d7eadcdb391bab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/319f600c1ea0f981f6bdc2f042cfc1690957c0e0", - "reference": "319f600c1ea0f981f6bdc2f042cfc1690957c0e0", + "url": "https://api.github.com/repos/symfony/routing/zipball/f4e43bb0dff56f0f62fa056c82d7eadcdb391bab", + "reference": "f4e43bb0dff56f0f62fa056c82d7eadcdb391bab", "shasum": "" }, "require": { @@ -5480,20 +5145,20 @@ "uri", "url" ], - "time": "2019-03-30T15:58:42+00:00" + "time": "2019-04-27T09:38:08+00:00" }, { "name": "symfony/serializer", - "version": "v4.2.5", + "version": "v4.2.8", "source": { "type": "git", "url": "https://github.com/symfony/serializer.git", - "reference": "d7c959be961d05d78931c0f739abec9903e006b1" + "reference": "543bf3d7d4be76e878dc78c82328e978d57dd44d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/serializer/zipball/d7c959be961d05d78931c0f739abec9903e006b1", - "reference": "d7c959be961d05d78931c0f739abec9903e006b1", + "url": "https://api.github.com/repos/symfony/serializer/zipball/543bf3d7d4be76e878dc78c82328e978d57dd44d", + "reference": "543bf3d7d4be76e878dc78c82328e978d57dd44d", "shasum": "" }, "require": { @@ -5516,7 +5181,7 @@ "symfony/dependency-injection": "~3.4|~4.0", "symfony/http-foundation": "~3.4|~4.0", "symfony/property-access": "~3.4|~4.0", - "symfony/property-info": "~3.4|~4.0", + "symfony/property-info": "^3.4.13|~4.0", "symfony/validator": "~3.4|~4.0", "symfony/yaml": "~3.4|~4.0" }, @@ -5560,20 +5225,20 @@ ], "description": "Symfony Serializer Component", "homepage": "https://symfony.com", - "time": "2019-04-01T16:12:17+00:00" + "time": "2019-04-28T07:09:27+00:00" }, { "name": "symfony/translation", - "version": "v4.2.5", + "version": "v4.2.8", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "e46933cc31b68f51f7fc5470fb55550407520f56" + "reference": "181a426dd129cb496f12d7e7555f6d0b37a7615b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/e46933cc31b68f51f7fc5470fb55550407520f56", - "reference": "e46933cc31b68f51f7fc5470fb55550407520f56", + "url": "https://api.github.com/repos/symfony/translation/zipball/181a426dd129cb496f12d7e7555f6d0b37a7615b", + "reference": "181a426dd129cb496f12d7e7555f6d0b37a7615b", "shasum": "" }, "require": { @@ -5595,7 +5260,9 @@ "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/var-dumper": "~3.4|~4.0", "symfony/yaml": "~3.4|~4.0" }, "suggest": { @@ -5633,20 +5300,20 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "time": "2019-04-01T14:13:08+00:00" + "time": "2019-05-01T12:55:36+00:00" }, { "name": "symfony/var-dumper", - "version": "v4.2.5", + "version": "v4.2.8", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "9f87189ac10b42edf7fb8edc846f1937c6d157cf" + "reference": "3c4084cb1537c0e2ad41aad622bbf55a44a5c9ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/9f87189ac10b42edf7fb8edc846f1937c6d157cf", - "reference": "9f87189ac10b42edf7fb8edc846f1937c6d157cf", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/3c4084cb1537c0e2ad41aad622bbf55a44a5c9ce", + "reference": "3c4084cb1537c0e2ad41aad622bbf55a44a5c9ce", "shasum": "" }, "require": { @@ -5709,11 +5376,11 @@ "debug", "dump" ], - "time": "2019-02-23T15:17:42+00:00" + "time": "2019-05-01T12:55:36+00:00" }, { "name": "symfony/yaml", - "version": "v4.2.5", + "version": "v4.2.8", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", @@ -5798,7 +5465,7 @@ "TheIconic\\Tracking\\GoogleAnalytics\\": "src/" } }, - "notification-url": "https://packagist.org/downloads/", + "notification-url": "http://packagist.org/downloads/", "license": [ "MIT" ], @@ -5843,7 +5510,7 @@ "TijsVerkoyen\\CssToInlineStyles\\": "src" } }, - "notification-url": "https://packagist.org/downloads/", + "notification-url": "http://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], @@ -5884,7 +5551,7 @@ "Tivie\\OS\\": "src/" } }, - "notification-url": "https://packagist.org/downloads/", + "notification-url": "http://packagist.org/downloads/", "license": [ "APACHE 2.0" ], @@ -6002,7 +5669,7 @@ "src/vierbergenlars/SemVer/internal.php" ] }, - "notification-url": "https://packagist.org/downloads/", + "notification-url": "http://packagist.org/downloads/", "license": [ "MIT" ], @@ -6022,29 +5689,30 @@ }, { "name": "vlucas/phpdotenv", - "version": "v2.6.1", + "version": "v3.3.3", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "2a7dcf7e3e02dc5e701004e51a6f304b713107d5" + "reference": "dbcc609971dd9b55f48b8008b553d79fd372ddde" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/2a7dcf7e3e02dc5e701004e51a6f304b713107d5", - "reference": "2a7dcf7e3e02dc5e701004e51a6f304b713107d5", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/dbcc609971dd9b55f48b8008b553d79fd372ddde", + "reference": "dbcc609971dd9b55f48b8008b553d79fd372ddde", "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" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "3.3-dev" } }, "autoload": { @@ -6069,7 +5737,7 @@ "env", "environment" ], - "time": "2019-01-29T11:11:52+00:00" + "time": "2019-03-06T09:39:45+00:00" }, { "name": "waavi/sanitizer", @@ -6243,70 +5911,6 @@ "geoip" ], "time": "2018-12-26T12:01:09+00:00" - }, - { - "name": "zendframework/zend-diactoros", - "version": "1.8.6", - "source": { - "type": "git", - "url": "https://github.com/zendframework/zend-diactoros.git", - "reference": "20da13beba0dde8fb648be3cc19765732790f46e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/20da13beba0dde8fb648be3cc19765732790f46e", - "reference": "20da13beba0dde8fb648be3cc19765732790f46e", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0", - "psr/http-message": "^1.0" - }, - "provide": { - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "ext-dom": "*", - "ext-libxml": "*", - "php-http/psr7-integration-tests": "dev-master", - "phpunit/phpunit": "^5.7.16 || ^6.0.8 || ^7.2.7", - "zendframework/zend-coding-standard": "~1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.8.x-dev", - "dev-develop": "1.9.x-dev", - "dev-release-2.0": "2.0.x-dev" - } - }, - "autoload": { - "files": [ - "src/functions/create_uploaded_file.php", - "src/functions/marshal_headers_from_sapi.php", - "src/functions/marshal_method_from_sapi.php", - "src/functions/marshal_protocol_version_from_sapi.php", - "src/functions/marshal_uri_from_sapi.php", - "src/functions/normalize_server.php", - "src/functions/normalize_uploaded_files.php", - "src/functions/parse_cookie_header.php" - ], - "psr-4": { - "Zend\\Diactoros\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-2-Clause" - ], - "description": "PSR HTTP Message implementations", - "homepage": "https://github.com/zendframework/zend-diactoros", - "keywords": [ - "http", - "psr", - "psr-7" - ], - "time": "2018-09-05T19:29:37+00:00" } ], "packages-dev": [ @@ -7279,7 +6883,7 @@ ] } }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -7302,16 +6906,16 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "4.3.0", + "version": "4.3.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "94fd0001232e47129dd3504189fa1c7225010d08" + "reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", - "reference": "94fd0001232e47129dd3504189fa1c7225010d08", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c", + "reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c", "shasum": "" }, "require": { @@ -7349,7 +6953,7 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2017-11-30T07:14:17+00:00" + "time": "2019-04-30T17:48:53+00:00" }, { "name": "phpdocumentor/type-resolver", @@ -7715,16 +7319,16 @@ }, { "name": "phpunit/phpunit", - "version": "7.5.8", + "version": "7.5.10", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "c29c0525cf4572c11efe1db49a8b8aee9dfac58a" + "reference": "d7d9cee051d03ed98df6023aad93f7902731a780" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c29c0525cf4572c11efe1db49a8b8aee9dfac58a", - "reference": "c29c0525cf4572c11efe1db49a8b8aee9dfac58a", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d7d9cee051d03ed98df6023aad93f7902731a780", + "reference": "d7d9cee051d03ed98df6023aad93f7902731a780", "shasum": "" }, "require": { @@ -7795,7 +7399,7 @@ "testing", "xunit" ], - "time": "2019-03-26T13:23:54+00:00" + "time": "2019-05-09T05:06:47+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -7964,16 +7568,16 @@ }, { "name": "sebastian/environment", - "version": "4.1.0", + "version": "4.2.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "6fda8ce1974b62b14935adc02a9ed38252eca656" + "reference": "f2a2c8e1c97c11ace607a7a667d73d47c19fe404" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6fda8ce1974b62b14935adc02a9ed38252eca656", - "reference": "6fda8ce1974b62b14935adc02a9ed38252eca656", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/f2a2c8e1c97c11ace607a7a667d73d47c19fe404", + "reference": "f2a2c8e1c97c11ace607a7a667d73d47c19fe404", "shasum": "" }, "require": { @@ -7988,7 +7592,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -8013,7 +7617,7 @@ "environment", "hhvm" ], - "time": "2019-02-01T05:27:49+00:00" + "time": "2019-05-05T09:05:15+00:00" }, { "name": "sebastian/exporter", @@ -8048,7 +7652,7 @@ "src/" ] }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], @@ -8116,7 +7720,7 @@ "src/" ] }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], @@ -8166,7 +7770,7 @@ "src/" ] }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], @@ -8211,7 +7815,7 @@ "src/" ] }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], @@ -8256,7 +7860,7 @@ "src/" ] }, - "notification-url": "http://packagist.org/downloads/", + "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], @@ -8461,7 +8065,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=7.1", + "php": ">=7.2", "ext-calendar": "*", "ext-json": "*", "ext-mbstring": "*", diff --git a/config/app.php b/config/app.php index e2b90b73a..7b6292218 100755 --- a/config/app.php +++ b/config/app.php @@ -67,7 +67,6 @@ Collective\Html\HtmlServiceProvider::class, Laracasts\Flash\FlashServiceProvider::class, Prettus\Repository\Providers\RepositoryServiceProvider::class, - SebastiaanLuca\Helpers\Methods\GlobalHelpersServiceProvider::class, SebastiaanLuca\Helpers\Collections\CollectionMacrosServiceProvider::class, Toin0u\Geotools\GeotoolsServiceProvider::class, Jackiedo\Timezonelist\TimezonelistServiceProvider::class, diff --git a/config/cache.php b/config/cache.php index 751820eb2..f43c1f3a2 100755 --- a/config/cache.php +++ b/config/cache.php @@ -24,8 +24,6 @@ ], 'stores' => [ - - 'apc' => ['driver' => 'apc'], 'array' => ['driver' => 'array'], 'database' => [ 'driver' => 'database', @@ -61,6 +59,5 @@ 'driver' => 'redis', 'connection' => 'default', ], - ], ]; diff --git a/config/laratrust.php b/config/laratrust.php index 4ee117e7c..15a43bb35 100644 --- a/config/laratrust.php +++ b/config/laratrust.php @@ -27,7 +27,27 @@ | Defines if Laratrust will use Laravel's Cache to cache the roles and permissions. | */ - 'use_cache' => true, + 'cache' => [ + /* + |-------------------------------------------------------------------------- + | Use cache in the package + |-------------------------------------------------------------------------- + | + | Defines if Laratrust will use Laravel's Cache to cache the roles and permissions. + | NOTE: Currently the database check does not use cache. + | + */ + 'enabled' => true, + /* + |-------------------------------------------------------------------------- + | Time to store in cache Laratrust's roles and permissions. + |-------------------------------------------------------------------------- + | + | Determines the time in SECONDS to store Laratrust's roles and permissions in the cache. + | + */ + 'expiration_time' => 3600, + ], /* |-------------------------------------------------------------------------- diff --git a/docker/php/Dockerfile b/docker/php/Dockerfile index 02e281884..83b603820 100644 --- a/docker/php/Dockerfile +++ b/docker/php/Dockerfile @@ -3,10 +3,14 @@ FROM php:7.3-fpm RUN apt-get update RUN apt-get install -y libgmp-dev +# Copy any config files in +COPY ext-opcache.ini $PHP_INI_DIR/conf.d/ + RUN ln -sf /dev/stderr /var/log/fpm-error.log RUN docker-php-ext-install \ mysqli \ pdo \ pdo_mysql \ - gmp + gmp \ + opcache diff --git a/docker/php/ext-opcache.ini b/docker/php/ext-opcache.ini new file mode 100644 index 000000000..d5050ea45 --- /dev/null +++ b/docker/php/ext-opcache.ini @@ -0,0 +1,8 @@ +[opcache] +opcache.enable = 1 +opcache.memory_consumption = 128 +opcache.interned_strings_buffer = 8 +opcache.max_accelerated_files = 4000 +opcache.revalidate_freq = 60 +opcache.fast_shutdown = 1 +opcache.enable_cli = 1 From 87aa6ed1dae408e0e528d26bbbf7bcb5796b17df Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Sun, 12 May 2019 10:50:38 -0500 Subject: [PATCH 02/16] Fix tests for 5.8 --- tests/AcarsTest.php | 2 +- tests/ApiTest.php | 2 +- tests/AwardsTest.php | 2 +- tests/FinanceTest.php | 2 +- tests/FlightTest.php | 2 +- tests/ImporterTest.php | 2 +- tests/MathTest.php | 4 ---- tests/MetarTest.php | 4 ++-- tests/PIREPTest.php | 4 ++-- tests/SubfleetTest.php | 2 +- tests/TestCase.php | 9 +++++++-- tests/UserTest.php | 2 +- tests/UtilsTest.php | 4 ---- 13 files changed, 19 insertions(+), 22 deletions(-) diff --git a/tests/AcarsTest.php b/tests/AcarsTest.php index ac87b1306..0c0032e9e 100644 --- a/tests/AcarsTest.php +++ b/tests/AcarsTest.php @@ -11,7 +11,7 @@ class AcarsTest extends TestCase { protected $settingsRepo; - public function setUp() + public function setUp(): void { parent::setUp(); $this->addData('base'); diff --git a/tests/ApiTest.php b/tests/ApiTest.php index d1b9031c8..7329aa0d2 100644 --- a/tests/ApiTest.php +++ b/tests/ApiTest.php @@ -9,7 +9,7 @@ */ class ApiTest extends TestCase { - public function setUp() + public function setUp(): void { parent::setUp(); $this->addData('base'); diff --git a/tests/AwardsTest.php b/tests/AwardsTest.php index 42c075de8..1d1f51e74 100644 --- a/tests/AwardsTest.php +++ b/tests/AwardsTest.php @@ -7,7 +7,7 @@ class AwardsTest extends TestCase private $awardSvc; private $pirepSvc; - public function setUp() + public function setUp(): void { parent::setUp(); $this->awardSvc = app(\App\Services\AwardService::class); diff --git a/tests/FinanceTest.php b/tests/FinanceTest.php index 7dd7a4885..0fd40cad4 100644 --- a/tests/FinanceTest.php +++ b/tests/FinanceTest.php @@ -21,7 +21,7 @@ class FinanceTest extends TestCase /** * @throws Exception */ - public function setUp() + public function setUp(): void { parent::setUp(); $this->addData('base'); diff --git a/tests/FlightTest.php b/tests/FlightTest.php index d11a1d849..b6f125f8e 100644 --- a/tests/FlightTest.php +++ b/tests/FlightTest.php @@ -12,7 +12,7 @@ class FlightTest extends TestCase protected $flightSvc; protected $settingsRepo; - public function setUp() + public function setUp(): void { parent::setUp(); $this->addData('base'); diff --git a/tests/ImporterTest.php b/tests/ImporterTest.php index 1544377a9..4fc5d9355 100644 --- a/tests/ImporterTest.php +++ b/tests/ImporterTest.php @@ -12,7 +12,7 @@ class ImporterTest extends TestCase private $importSvc; private $fareSvc; - public function setUp() + public function setUp(): void { parent::setUp(); $this->importBaseClass = new \App\Interfaces\ImportExport(); diff --git a/tests/MathTest.php b/tests/MathTest.php index 593b375ac..4e927c280 100644 --- a/tests/MathTest.php +++ b/tests/MathTest.php @@ -4,10 +4,6 @@ class MathTest extends TestCase { - public function setUp() - { - } - /** * Test adding/subtracting a percentage */ diff --git a/tests/MetarTest.php b/tests/MetarTest.php index ff46ced66..4da27a3fa 100644 --- a/tests/MetarTest.php +++ b/tests/MetarTest.php @@ -10,9 +10,9 @@ class MetarTest extends TestCase { private $settingsRepo; - public function setUp() + public function setUp(): void { - parent::setUp(); // TODO: Change the autogenerated stub + parent::setUp(); $this->settingsRepo = app(SettingRepository::class); } diff --git a/tests/PIREPTest.php b/tests/PIREPTest.php index f131e76b3..4e7722cf8 100644 --- a/tests/PIREPTest.php +++ b/tests/PIREPTest.php @@ -15,9 +15,9 @@ class PIREPTest extends TestCase protected $pirepSvc; protected $settingsRepo; - public function setUp() + public function setUp(): void { - parent::setUp(); // TODO: Change the autogenerated stub + parent::setUp(); $this->addData('base'); $this->pirepSvc = app('App\Services\PirepService'); diff --git a/tests/SubfleetTest.php b/tests/SubfleetTest.php index e13fd1c03..200124174 100644 --- a/tests/SubfleetTest.php +++ b/tests/SubfleetTest.php @@ -6,7 +6,7 @@ class SubfleetTest extends TestCase protected $ac_svc; protected $ICAO = 'B777'; - public function setUp() + public function setUp(): void { parent::setUp(); $this->addData('base'); diff --git a/tests/TestCase.php b/tests/TestCase.php index 7927b1691..ad28cbd98 100755 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -19,7 +19,7 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase protected $app; protected $baseUrl = 'http://localhost'; - protected $connectionsToTransact = ['testing']; + protected $connectionsToTransact = ['test']; protected $user; @@ -30,13 +30,18 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase /** * @throws Exception */ - public function setUp() + public function setUp() : void { parent::setUp(); Artisan::call('database:create', ['--reset' => true]); Artisan::call('migrate:refresh', ['--env' => 'unittest']); } + public function tearDown() : void + { + parent::tearDown(); + } + /** * Creates the application. Required to be implemented * diff --git a/tests/UserTest.php b/tests/UserTest.php index d3955bac6..905d8d466 100644 --- a/tests/UserTest.php +++ b/tests/UserTest.php @@ -8,7 +8,7 @@ class UserTest extends TestCase protected $settingsRepo; protected $userSvc; - public function setUp() + public function setUp(): void { parent::setUp(); $this->userSvc = app(UserService::class); diff --git a/tests/UtilsTest.php b/tests/UtilsTest.php index 241453913..6c0f40030 100644 --- a/tests/UtilsTest.php +++ b/tests/UtilsTest.php @@ -4,10 +4,6 @@ class UtilsTest extends TestCase { - public function setUp() - { - } - public function testDates() { $carbon = new \Carbon\Carbon('2018-04-28T12:55:40Z'); From 047a72f3da4c7adb92d92cf00346a89287603e80 Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Sun, 12 May 2019 10:50:52 -0500 Subject: [PATCH 03/16] Force cache to array --- phpunit.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpunit.xml b/phpunit.xml index cb508ebd3..5ed2f7ef7 100755 --- a/phpunit.xml +++ b/phpunit.xml @@ -23,7 +23,7 @@ - + From 1b1cf2a891ff2d8bef3be6d6996ef94a654dfcf0 Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Sun, 12 May 2019 10:51:06 -0500 Subject: [PATCH 04/16] Add redis; use alpine images --- composer.json | 3 + composer.lock | 225 +++++++++++++++++++++++++++++++++++++++++- config/opcache.php | 18 ++++ docker-compose.yml | 10 +- docker/php/Dockerfile | 9 +- 5 files changed, 256 insertions(+), 9 deletions(-) create mode 100644 config/opcache.php diff --git a/composer.json b/composer.json index dcf4050e9..552cf92f0 100755 --- a/composer.json +++ b/composer.json @@ -16,6 +16,7 @@ "composer/semver": "1.4.*", "akaunting/money": "1.0.*", "anhskohbo/no-captcha": "3.0.*", + "appstract/laravel-opcache": "^2.0", "arrilot/laravel-widgets": "3.13.*", "fzaninotto/faker": "^1.8", "guzzlehttp/guzzle": "6.3.*", @@ -28,6 +29,7 @@ "joshbrw/laravel-module-installer": "0.1.*", "laracasts/flash": "3.0.*", "laravel/framework": "5.8.*", + "laravel/helpers": "^1.0", "laravelcollective/html": "^5.8", "league/csv": "9.2.*", "league/geotools": "0.8.*", @@ -38,6 +40,7 @@ "nwidart/laravel-modules": "5.*", "php-units-of-measure/php-units-of-measure": "2.1.*", "pragmarx/version": "0.2.*", + "predis/predis": "^1.1", "prettus/l5-repository": "2.6.*", "santigarcor/laratrust": "5.2.*", "sebastiaanluca/laravel-helpers": "3.*", diff --git a/composer.lock b/composer.lock index c5f714b5c..2eefc6ec7 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": "876193d327157c01998b33e3d095b7f4", + "content-hash": "ed94de0aeb7e741af9d56f1b364ddab0", "packages": [ { "name": "akaunting/money", @@ -126,6 +126,126 @@ ], "time": "2019-02-25T10:51:21+00:00" }, + { + "name": "appstract/laravel-opcache", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/appstract/laravel-opcache.git", + "reference": "ef41a0f5e6d717317d5434b39add6e17152b620b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/appstract/laravel-opcache/zipball/ef41a0f5e6d717317d5434b39add6e17152b620b", + "reference": "ef41a0f5e6d717317d5434b39add6e17152b620b", + "shasum": "" + }, + "require": { + "appstract/lush-http": "^0.5", + "illuminate/console": ">=5.5", + "illuminate/filesystem": ">=5.5", + "illuminate/routing": ">=5.5", + "illuminate/support": ">=5.5", + "php": ">=5.6" + }, + "require-dev": { + "orchestra/testbench": "^3.3", + "phpunit/phpunit": "5.*" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Appstract\\Opcache\\OpcacheServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Appstract\\Opcache\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Olav van Schie", + "email": "hello@appstract.team", + "homepage": "https://appstract.team", + "role": "Developer" + } + ], + "description": "OPcache helper for Laravel.", + "homepage": "https://github.com/appstract/laravel-opcache", + "keywords": [ + "Opcache", + "appstract", + "laravel", + "php" + ], + "time": "2018-07-19T12:41:58+00:00" + }, + { + "name": "appstract/lush-http", + "version": "0.5.4", + "source": { + "type": "git", + "url": "https://github.com/appstract/lush-http.git", + "reference": "771c501e1ea6a16b6c33917f595a04e5e37ad9b7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/appstract/lush-http/zipball/771c501e1ea6a16b6c33917f595a04e5e37ad9b7", + "reference": "771c501e1ea6a16b6c33917f595a04e5e37ad9b7", + "shasum": "" + }, + "require": { + "illuminate/support": ">=5.4", + "php": ">=5.6" + }, + "require-dev": { + "phpunit/phpunit": "^5.7" + }, + "type": "library", + "extra": { + "laravel": { + "aliases": { + "Lush": "Appstract\\LushHttp\\LushFacade" + } + } + }, + "autoload": { + "psr-4": { + "Appstract\\LushHttp\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Olav van Schie", + "email": "hello@appstract.team", + "homepage": "https://appstract.team", + "role": "Developer" + } + ], + "description": "Smart Http Client for PHP.", + "homepage": "https://github.com/appstract/lush-http", + "keywords": [ + "appstract", + "client", + "curl", + "http", + "lush", + "lush-http", + "php" + ], + "time": "2018-05-28T08:35:31+00:00" + }, { "name": "arrilot/laravel-widgets", "version": "3.13.0", @@ -1953,6 +2073,59 @@ ], "time": "2019-05-07T14:37:11+00:00" }, + { + "name": "laravel/helpers", + "version": "v1.0.1", + "source": { + "type": "git", + "url": "https://github.com/laravel/helpers.git", + "reference": "7f47ef43aaa76335d74e604fd2fc57a0e6f5a59f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/helpers/zipball/7f47ef43aaa76335d74e604fd2fc57a0e6f5a59f", + "reference": "7f47ef43aaa76335d74e604fd2fc57a0e6f5a59f", + "shasum": "" + }, + "require": { + "illuminate/support": "~5.8.0|~5.9.0", + "php": ">=7.1.3" + }, + "require-dev": { + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + }, + { + "name": "Dries Vints", + "email": "dries.vints@gmail.com" + } + ], + "description": "Provides backwards compatibility for helpers in the latest Laravel release.", + "keywords": [ + "helpers", + "laravel" + ], + "time": "2019-04-18T21:20:57+00:00" + }, { "name": "laravelcollective/html", "version": "v5.8.0", @@ -3098,6 +3271,56 @@ ], "time": "2018-09-22T17:12:12+00:00" }, + { + "name": "predis/predis", + "version": "v1.1.1", + "source": { + "type": "git", + "url": "https://github.com/nrk/predis.git", + "reference": "f0210e38881631afeafb56ab43405a92cafd9fd1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nrk/predis/zipball/f0210e38881631afeafb56ab43405a92cafd9fd1", + "reference": "f0210e38881631afeafb56ab43405a92cafd9fd1", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "require-dev": { + "phpunit/phpunit": "~4.8" + }, + "suggest": { + "ext-curl": "Allows access to Webdis when paired with phpiredis", + "ext-phpiredis": "Allows faster serialization and deserialization of the Redis protocol" + }, + "type": "library", + "autoload": { + "psr-4": { + "Predis\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Daniele Alessandri", + "email": "suppakilla@gmail.com", + "homepage": "http://clorophilla.net" + } + ], + "description": "Flexible and feature-complete Redis client for PHP and HHVM", + "homepage": "http://github.com/nrk/predis", + "keywords": [ + "nosql", + "predis", + "redis" + ], + "time": "2016-06-16T16:22:20+00:00" + }, { "name": "prettus/l5-repository", "version": "2.6.32", diff --git a/config/opcache.php b/config/opcache.php new file mode 100644 index 000000000..84887f33d --- /dev/null +++ b/config/opcache.php @@ -0,0 +1,18 @@ + env('OPCACHE_URL', config('app.url')), + 'verify_ssl' => true, + 'headers' => [], + 'directories' => [ + base_path('app'), + base_path('bootstrap'), + base_path('public'), + base_path('resources/lang'), + base_path('routes'), + base_path('storage/framework/views'), + base_path('vendor/appstract'), + base_path('vendor/composer'), + base_path('vendor/laravel/framework'), + ], +]; diff --git a/docker-compose.yml b/docker-compose.yml index b2ed1ea87..73cf8dfc1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,22 +7,23 @@ services: context: ./docker/php environment: DB_HOST: mysql + REDIS_HOST: redis volumes: - ./:/var/www - ./docker/php/www.conf:/usr/local/etc/php-fpm.d/www.conf depends_on: + - nginx - mysql + - redis nginx: - image: nginx:1.13.8 + image: nginx:1.15.12-alpine command: /bin/bash -c "exec nginx -g 'daemon off;'" volumes: - ./:/var/www - ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf ports: - 80:80 - depends_on: - - app mysql: image: mysql:5.7.26 @@ -37,6 +38,9 @@ services: ports: - 3306:3306 + redis: + image: redis:5.0.4-alpine + # Use this to tail the logs so it's just all in a single window logs: image: busybox diff --git a/docker/php/Dockerfile b/docker/php/Dockerfile index 83b603820..07754f534 100644 --- a/docker/php/Dockerfile +++ b/docker/php/Dockerfile @@ -1,7 +1,8 @@ -FROM php:7.3-fpm +FROM php:7.3-fpm-alpine -RUN apt-get update -RUN apt-get install -y libgmp-dev +#RUN apt-get update +#RUN apt-get install -y libgmp-dev +RUN apk add gmp-dev # Copy any config files in COPY ext-opcache.ini $PHP_INI_DIR/conf.d/ @@ -9,8 +10,6 @@ COPY ext-opcache.ini $PHP_INI_DIR/conf.d/ RUN ln -sf /dev/stderr /var/log/fpm-error.log RUN docker-php-ext-install \ - mysqli \ - pdo \ pdo_mysql \ gmp \ opcache From 1c935998fbbe1a49f71ea33b6e16f797a720b1b0 Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Sun, 12 May 2019 11:20:42 -0500 Subject: [PATCH 05/16] Fix nginx command --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 73cf8dfc1..9cd7406b2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,7 +18,7 @@ services: nginx: image: nginx:1.15.12-alpine - command: /bin/bash -c "exec nginx -g 'daemon off;'" + command: /bin/sh -c "exec nginx -g 'daemon off;'" volumes: - ./:/var/www - ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf From 18c5cf766d802254fffbb8c7932c024c08ea5366 Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Sun, 12 May 2019 11:31:16 -0500 Subject: [PATCH 06/16] Force env vars in travis tests for phpunit --- .travis/phpunit.travis.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.travis/phpunit.travis.xml b/.travis/phpunit.travis.xml index bc5e4e705..a7c276277 100644 --- a/.travis/phpunit.travis.xml +++ b/.travis/phpunit.travis.xml @@ -22,6 +22,14 @@ + + + + + + + + From d5a33281304b67c7e5e0ab2e0b3f935d6eb459ac Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Sun, 12 May 2019 11:31:48 -0500 Subject: [PATCH 07/16] Style fix --- config/laratrust.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/laratrust.php b/config/laratrust.php index 15a43bb35..f40494057 100644 --- a/config/laratrust.php +++ b/config/laratrust.php @@ -37,7 +37,7 @@ | NOTE: Currently the database check does not use cache. | */ - 'enabled' => true, + 'enabled' => true, /* |-------------------------------------------------------------------------- | Time to store in cache Laratrust's roles and permissions. From 25a9ca9b90b326b8b1f1e26fbfa74522489bc505 Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Sun, 12 May 2019 11:35:03 -0500 Subject: [PATCH 08/16] styleci fixes --- config/opcache.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/opcache.php b/config/opcache.php index 84887f33d..b56e6abe0 100644 --- a/config/opcache.php +++ b/config/opcache.php @@ -1,9 +1,9 @@ env('OPCACHE_URL', config('app.url')), - 'verify_ssl' => true, - 'headers' => [], + 'url' => env('OPCACHE_URL', config('app.url')), + 'verify_ssl' => true, + 'headers' => [], 'directories' => [ base_path('app'), base_path('bootstrap'), From a79f28caa43f5aa0be3c056da51bc0c8a36bad16 Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Sun, 12 May 2019 11:40:03 -0500 Subject: [PATCH 09/16] Bump minimum required php version to 7.2 --- modules/Installer/Config/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Installer/Config/config.php b/modules/Installer/Config/config.php index 4331ab405..a0ffa1e15 100644 --- a/modules/Installer/Config/config.php +++ b/modules/Installer/Config/config.php @@ -2,7 +2,7 @@ return [ 'php' => [ - 'version' => '7.1.3' + 'version' => '7.2' ], 'extensions' => [ From 75eaec2f11f6f63abd81744be1c80cbd9a4d470e Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Sun, 12 May 2019 12:08:31 -0500 Subject: [PATCH 10/16] phpcs standards --- Makefile | 4 +++ app/Console/Services/Importer.php | 3 +- app/Services/GeoService.php | 3 +- composer.json | 11 ++++--- composer.lock | 53 ++++++++++++++++++++++++++++++- phpcs.xml | 12 +++++++ 6 files changed, 78 insertions(+), 8 deletions(-) create mode 100644 phpcs.xml diff --git a/Makefile b/Makefile index f8fdd70ed..1067f1e21 100644 --- a/Makefile +++ b/Makefile @@ -68,6 +68,10 @@ test: #php artisan database:create --reset vendor/bin/phpunit --debug --verbose +.PHONY: phpcs +phpcs: + @vendor/bin/phpcs -s --standard=phpcs.xml --colors + .PHONY: phpstan: vendor/bin/phpstan analyse -c phpstan.neon -v --level 2 app diff --git a/app/Console/Services/Importer.php b/app/Console/Services/Importer.php index 5c9787162..28b76b151 100644 --- a/app/Console/Services/Importer.php +++ b/app/Console/Services/Importer.php @@ -419,7 +419,8 @@ protected function importAircraft() ['icao' => $row->icao, 'subfleet_id' => $subfleet->id, 'active' => $row->enabled, - ]); + ] + ); $this->addMapping('aircraft', $row->id, $aircraft->id); diff --git a/app/Services/GeoService.php b/app/Services/GeoService.php index 8500c367c..1d170021a 100644 --- a/app/Services/GeoService.php +++ b/app/Services/GeoService.php @@ -306,7 +306,8 @@ public function flightGeoJson(Flight $flight): array $flight->dpt_airport->icao, $flight->arr_airport->icao, [$flight->dpt_airport->lat, $flight->dpt_airport->lon], - $flight->route); + $flight->route + ); // lat, lon needs to be reversed for GeoJSON foreach ($all_route_points as $point) { diff --git a/composer.json b/composer.json index 552cf92f0..02f80fcdb 100755 --- a/composer.json +++ b/composer.json @@ -54,14 +54,15 @@ "webpatser/laravel-uuid": "3.*" }, "require-dev": { - "phpunit/phpunit": "7.5.*", - "barryvdh/laravel-ide-helper": "^2.0", "barryvdh/laravel-debugbar": "^3.0", - "mockery/mockery": "0.9.*", - "filp/whoops": "~2.0", + "barryvdh/laravel-ide-helper": "^2.0", "bpocallaghan/generators": "5.0.1", + "codedungeon/phpunit-result-printer": "^0.13.0", + "filp/whoops": "~2.0", + "mockery/mockery": "0.9.*", "nunomaduro/collision": "^2.0", - "codedungeon/phpunit-result-printer": "^0.13.0" + "phpunit/phpunit": "7.5.*", + "squizlabs/php_codesniffer": "3.*" }, "autoload": { "classmap": [ diff --git a/composer.lock b/composer.lock index 2eefc6ec7..7ca779023 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": "ed94de0aeb7e741af9d56f1b364ddab0", + "content-hash": "a2ba5f306c64642928b51fcb4c1876cc", "packages": [ { "name": "akaunting/money", @@ -8190,6 +8190,57 @@ "homepage": "https://github.com/sebastianbergmann/version", "time": "2016-10-03T07:35:21+00:00" }, + { + "name": "squizlabs/php_codesniffer", + "version": "3.4.2", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "b8a7362af1cc1aadb5bd36c3defc4dda2cf5f0a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/b8a7362af1cc1aadb5bd36c3defc4dda2cf5f0a8", + "reference": "b8a7362af1cc1aadb5bd36c3defc4dda2cf5f0a8", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "bin": [ + "bin/phpcs", + "bin/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards" + ], + "time": "2019-04-10T23:49:02+00:00" + }, { "name": "theseer/tokenizer", "version": "1.1.2", diff --git a/phpcs.xml b/phpcs.xml new file mode 100644 index 000000000..b9025657e --- /dev/null +++ b/phpcs.xml @@ -0,0 +1,12 @@ + + + phpvms coding standard + + + + + + + + app/ + From 88957f4071e5126a4e5e5b7d364e0a8c58f348c6 Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Sun, 12 May 2019 13:26:44 -0500 Subject: [PATCH 11/16] Add php-cs-fixer to build --- .gitignore | 1 + .php_cs | 21 + .travis.yml | 1 + .travis/deploy_script.sh | 2 + Makefile | 2 +- app/Console/Commands/ImportCsv.php | 4 +- app/Exceptions/BidExists.php | 4 +- app/Exceptions/InternalError.php | 3 +- app/Exceptions/PirepCancelled.php | 4 +- .../Controllers/Admin/AircraftController.php | 4 +- .../Controllers/Admin/AirportController.php | 4 +- .../Controllers/Admin/ExpenseController.php | 4 +- app/Http/Controllers/Admin/FareController.php | 4 +- .../Controllers/Admin/FlightController.php | 7 +- .../Controllers/Admin/PirepController.php | 3 +- .../Controllers/Admin/SubfleetController.php | 4 +- .../Auth/ResetPasswordController.php | 3 +- .../Controllers/Frontend/PirepController.php | 3 +- app/Listeners/NotificationEvents.php | 6 +- app/Models/Acars.php | 3 +- app/Routes/admin.php | 14 +- app/Support/Metar.php | 1 - composer.lock | 377 +++++++++++++++++- config/themes.php | 54 +-- phpcs.xml | 12 - 25 files changed, 480 insertions(+), 65 deletions(-) create mode 100644 .php_cs delete mode 100644 phpcs.xml diff --git a/.gitignore b/.gitignore index 87cb27120..7a9549fb3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ _ide_helper.php +.php_cs.cache .phpstorm.meta.php /vendor node_modules/ diff --git a/.php_cs b/.php_cs new file mode 100644 index 000000000..045a04728 --- /dev/null +++ b/.php_cs @@ -0,0 +1,21 @@ +in('app') + ->in('config'); + +return PhpCsFixer\Config::create() + ->setHideProgress(true) + ->setUsingCache(false) + ->setRiskyAllowed(true) + ->setRules( + [ + '@PSR2' => true, + 'strict_param' => true, + 'array_syntax' => ['syntax' => 'short'], + 'binary_operator_spaces' => [ + 'align_double_arrow' => true, + ], + ] + ) + ->setFinder($finder); diff --git a/.travis.yml b/.travis.yml index 6b176c947..61618737b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,6 +31,7 @@ install: - composer install --dev --no-interaction --verbose script: + - vendor/bin/php-cs-fixer fix --config=.php_cs -v --dry-run --diff --using-cache=no - php artisan database:create --reset - php artisan migrate:refresh --seed - cp .travis/phpunit.travis.xml phpunit.xml diff --git a/.travis/deploy_script.sh b/.travis/deploy_script.sh index d9441b098..7564bab73 100755 --- a/.travis/deploy_script.sh +++ b/.travis/deploy_script.sh @@ -62,11 +62,13 @@ if [ "$TRAVIS" = "true" ]; then .eslintignore .eslintrc .phpstorm.meta.php + .php_cs.cache .styleci.yml env.php config.php docker-compose.yml Makefile + phpcs.xml phpunit.xml phpvms.iml Procfile diff --git a/Makefile b/Makefile index 1067f1e21..433f96c91 100644 --- a/Makefile +++ b/Makefile @@ -70,7 +70,7 @@ test: .PHONY: phpcs phpcs: - @vendor/bin/phpcs -s --standard=phpcs.xml --colors + @vendor/bin/php-cs-fixer fix --config=.php_cs -v --dry-run --diff .PHONY: phpstan: diff --git a/app/Console/Commands/ImportCsv.php b/app/Console/Commands/ImportCsv.php index 4621a2aa4..59fc8a536 100644 --- a/app/Console/Commands/ImportCsv.php +++ b/app/Console/Commands/ImportCsv.php @@ -36,11 +36,11 @@ public function handle() $type = $this->argument('type'); $file = $this->argument('file'); - if (\in_array($type, ['flight', 'flights'])) { + if (\in_array($type, ['flight', 'flights'], true)) { $status = $this->importer->importFlights($file); } elseif ($type === 'aircraft') { $status = $this->importer->importAircraft($file); - } elseif (\in_array($type, ['airport', 'airports'])) { + } elseif (\in_array($type, ['airport', 'airports'], true)) { $status = $this->importer->importAirports($file); } elseif ($type === 'subfleet') { $status = $this->importer->importSubfleets($file); diff --git a/app/Exceptions/BidExists.php b/app/Exceptions/BidExists.php index 98a259baf..02da3675b 100644 --- a/app/Exceptions/BidExists.php +++ b/app/Exceptions/BidExists.php @@ -18,7 +18,9 @@ public function __construct( parent::__construct( 409, 'A bid already exists for this flight', - $previous, $headers, $code + $previous, + $headers, + $code ); } } diff --git a/app/Exceptions/InternalError.php b/app/Exceptions/InternalError.php index 39f2e4bb1..4885e0f7f 100644 --- a/app/Exceptions/InternalError.php +++ b/app/Exceptions/InternalError.php @@ -28,7 +28,8 @@ public function __construct(string $message = null, $field = null) $validator = Validator::make([], []); $validator->errors()->add( $field ?? static::FIELD, - $message ?? static::MESSAGE); + $message ?? static::MESSAGE + ); parent::__construct($validator); } diff --git a/app/Exceptions/PirepCancelled.php b/app/Exceptions/PirepCancelled.php index 61233c7a9..328c9f72d 100644 --- a/app/Exceptions/PirepCancelled.php +++ b/app/Exceptions/PirepCancelled.php @@ -18,7 +18,9 @@ public function __construct( parent::__construct( 400, 'PIREP has been cancelled, updates are not allowed', - $previous, $headers, $code + $previous, + $headers, + $code ); } } diff --git a/app/Http/Controllers/Admin/AircraftController.php b/app/Http/Controllers/Admin/AircraftController.php index 30c4c9578..d5e7372e8 100644 --- a/app/Http/Controllers/Admin/AircraftController.php +++ b/app/Http/Controllers/Admin/AircraftController.php @@ -232,7 +232,9 @@ public function import(Request $request) if ($request->isMethod('post')) { ImportRequest::validate($request); $path = Storage::putFileAs( - 'import', $request->file('csv_file'), 'import_aircraft.csv' + 'import', + $request->file('csv_file'), + 'import_aircraft.csv' ); $path = storage_path('app/'.$path); diff --git a/app/Http/Controllers/Admin/AirportController.php b/app/Http/Controllers/Admin/AirportController.php index 703e5d7ff..21c3bcecb 100644 --- a/app/Http/Controllers/Admin/AirportController.php +++ b/app/Http/Controllers/Admin/AirportController.php @@ -229,7 +229,9 @@ public function import(Request $request) if ($request->isMethod('post')) { ImportRequest::validate($request); $path = Storage::putFileAs( - 'import', $request->file('csv_file'), 'import_airports.csv' + 'import', + $request->file('csv_file'), + 'import_airports.csv' ); $path = storage_path('app/'.$path); diff --git a/app/Http/Controllers/Admin/ExpenseController.php b/app/Http/Controllers/Admin/ExpenseController.php index fa622eb46..c2582fc97 100644 --- a/app/Http/Controllers/Admin/ExpenseController.php +++ b/app/Http/Controllers/Admin/ExpenseController.php @@ -229,7 +229,9 @@ public function import(Request $request) if ($request->isMethod('post')) { ImportRequest::validate($request); $path = Storage::putFileAs( - 'import', $request->file('csv_file'), 'import_expenses.csv' + 'import', + $request->file('csv_file'), + 'import_expenses.csv' ); $path = storage_path('app/'.$path); diff --git a/app/Http/Controllers/Admin/FareController.php b/app/Http/Controllers/Admin/FareController.php index 0505614b6..12905b332 100644 --- a/app/Http/Controllers/Admin/FareController.php +++ b/app/Http/Controllers/Admin/FareController.php @@ -204,7 +204,9 @@ public function import(Request $request) if ($request->isMethod('post')) { ImportRequest::validate($request); $path = Storage::putFileAs( - 'import', $request->file('csv_file'), 'import_fares.csv' + 'import', + $request->file('csv_file'), + 'import_fares.csv' ); $path = storage_path('app/'.$path); diff --git a/app/Http/Controllers/Admin/FlightController.php b/app/Http/Controllers/Admin/FlightController.php index b8d34eda4..5331ae3c9 100644 --- a/app/Http/Controllers/Admin/FlightController.php +++ b/app/Http/Controllers/Admin/FlightController.php @@ -285,7 +285,8 @@ public function update($id, UpdateFlightRequest $request) $input['flight_time'] = Time::init( $input['minutes'], - $input['hours'])->getMinutes(); + $input['hours'] + )->getMinutes(); $input['active'] = get_truth_state($input['active']); @@ -355,7 +356,9 @@ public function import(Request $request) if ($request->isMethod('post')) { $path = Storage::putFileAs( - 'import', $request->file('csv_file'), 'import_flights.csv' + 'import', + $request->file('csv_file'), + 'import_flights.csv' ); $path = storage_path('app/'.$path); diff --git a/app/Http/Controllers/Admin/PirepController.php b/app/Http/Controllers/Admin/PirepController.php index 8d1d862cf..e7a334543 100644 --- a/app/Http/Controllers/Admin/PirepController.php +++ b/app/Http/Controllers/Admin/PirepController.php @@ -365,7 +365,8 @@ public function update($id, UpdatePirepRequest $request) // Fix the time $attrs['flight_time'] = Time::init( $attrs['minutes'], - $attrs['hours'])->getMinutes(); + $attrs['hours'] + )->getMinutes(); $pirep = $this->pirepRepo->update($attrs, $id); diff --git a/app/Http/Controllers/Admin/SubfleetController.php b/app/Http/Controllers/Admin/SubfleetController.php index 604b4ec52..071a699a1 100644 --- a/app/Http/Controllers/Admin/SubfleetController.php +++ b/app/Http/Controllers/Admin/SubfleetController.php @@ -304,7 +304,9 @@ public function import(Request $request) ImportRequest::validate($request); $path = Storage::putFileAs( - 'import', $request->file('csv_file'), 'import_subfleets.csv' + 'import', + $request->file('csv_file'), + 'import_subfleets.csv' ); $path = storage_path('app/'.$path); diff --git a/app/Http/Controllers/Auth/ResetPasswordController.php b/app/Http/Controllers/Auth/ResetPasswordController.php index 7b7581253..9db44aed5 100755 --- a/app/Http/Controllers/Auth/ResetPasswordController.php +++ b/app/Http/Controllers/Auth/ResetPasswordController.php @@ -23,7 +23,8 @@ class ResetPasswordController extends Controller */ public function showResetForm(Request $request, $token = null) { - return view('auth.passwords.reset', + return view( + 'auth.passwords.reset', ['token' => $token, 'email' => $request->email] ); } diff --git a/app/Http/Controllers/Frontend/PirepController.php b/app/Http/Controllers/Frontend/PirepController.php index 13c5e2f79..7c3c8e830 100644 --- a/app/Http/Controllers/Frontend/PirepController.php +++ b/app/Http/Controllers/Frontend/PirepController.php @@ -406,7 +406,8 @@ public function update($id, UpdatePirepRequest $request) // Fix the time $attrs['flight_time'] = Time::init( $attrs['minutes'], - $attrs['hours'])->getMinutes(); + $attrs['hours'] + )->getMinutes(); $pirep = $this->pirepRepo->update($attrs, $id); diff --git a/app/Listeners/NotificationEvents.php b/app/Listeners/NotificationEvents.php index 5d2282cc4..15721ab85 100644 --- a/app/Listeners/NotificationEvents.php +++ b/app/Listeners/NotificationEvents.php @@ -108,8 +108,10 @@ public function onUserStateChange(UserStateChanged $event): void if ($event->old_state === UserState::PENDING) { if ($event->user->state === UserState::ACTIVE) { - $email = new \App\Mail\UserRegistered($event->user, - 'Your registration has been accepted!'); + $email = new \App\Mail\UserRegistered( + $event->user, + 'Your registration has been accepted!' + ); } elseif ($event->user->state === UserState::REJECTED) { $email = new \App\Mail\UserRejected($event->user); } diff --git a/app/Models/Acars.php b/app/Models/Acars.php index 6e9e8c9f9..66188c372 100644 --- a/app/Models/Acars.php +++ b/app/Models/Acars.php @@ -114,7 +114,8 @@ public function setDistanceAttribute($value): void { if ($value instanceof Distance) { $this->attributes['distance'] = $value->toUnit( - config('phpvms.internal_units.distance')); + config('phpvms.internal_units.distance') + ); } else { $this->attributes['distance'] = $value; } diff --git a/app/Routes/admin.php b/app/Routes/admin.php index 359cea3c8..4fe64921b 100644 --- a/app/Routes/admin.php +++ b/app/Routes/admin.php @@ -76,15 +76,19 @@ Route::resource('subfleets', 'SubfleetController'); Route::resource('users', 'UserController'); - Route::get('users/{id}/regen_apikey', - 'UserController@regen_apikey')->name('users.regen_apikey'); + Route::get( + 'users/{id}/regen_apikey', + 'UserController@regen_apikey' + )->name('users.regen_apikey'); // defaults Route::get('', ['uses' => 'DashboardController@index']); Route::get('/', ['uses' => 'DashboardController@index']); Route::get('dashboard', ['uses' => 'DashboardController@index', 'name' => 'dashboard']); - Route::match(['get', 'post', 'delete'], - 'dashboard/news', ['uses' => 'DashboardController@news']) - ->name('dashboard.news'); + Route::match( + ['get', 'post', 'delete'], + 'dashboard/news', + ['uses' => 'DashboardController@news'] + )->name('dashboard.news'); }); diff --git a/app/Support/Metar.php b/app/Support/Metar.php index e3f5734f9..acc43fcfe 100644 --- a/app/Support/Metar.php +++ b/app/Support/Metar.php @@ -625,7 +625,6 @@ private function get_time($part) $minute = (int) $found[3]; if ($this->result['observed_date'] === null) { - // Take one month, if the observed day is greater than the current day if ($day > date('j')) { $month = date('n') - 1; diff --git a/composer.lock b/composer.lock index 7ca779023..ba6694881 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": "a2ba5f306c64642928b51fcb4c1876cc", + "content-hash": "1b80cec722a0aa7bf522c55475111621", "packages": [ { "name": "akaunting/money", @@ -857,6 +857,74 @@ ], "time": "2019-01-28T20:25:53+00:00" }, + { + "name": "doctrine/annotations", + "version": "v1.6.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/annotations.git", + "reference": "53120e0eb10355388d6ccbe462f1fea34ddadb24" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/53120e0eb10355388d6ccbe462f1fea34ddadb24", + "reference": "53120e0eb10355388d6ccbe462f1fea34ddadb24", + "shasum": "" + }, + "require": { + "doctrine/lexer": "1.*", + "php": "^7.1" + }, + "require-dev": { + "doctrine/cache": "1.*", + "phpunit/phpunit": "^6.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" + } + }, + "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": "Docblock Annotations Parser", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "annotations", + "docblock", + "parser" + ], + "time": "2019-03-25T19:12:02+00:00" + }, { "name": "doctrine/inflector", "version": "v1.3.0", @@ -1135,6 +1203,99 @@ ], "time": "2019-03-17T18:48:37+00:00" }, + { + "name": "friendsofphp/php-cs-fixer", + "version": "v2.15.0", + "source": { + "type": "git", + "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", + "reference": "adfab51ae979ee8b0fcbc55aa231ec2786cb1f91" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/adfab51ae979ee8b0fcbc55aa231ec2786cb1f91", + "reference": "adfab51ae979ee8b0fcbc55aa231ec2786cb1f91", + "shasum": "" + }, + "require": { + "composer/semver": "^1.4", + "composer/xdebug-handler": "^1.2", + "doctrine/annotations": "^1.2", + "ext-json": "*", + "ext-tokenizer": "*", + "php": "^5.6 || ^7.0", + "php-cs-fixer/diff": "^1.3", + "symfony/console": "^3.4.17 || ^4.1.6", + "symfony/event-dispatcher": "^3.0 || ^4.0", + "symfony/filesystem": "^3.0 || ^4.0", + "symfony/finder": "^3.0 || ^4.0", + "symfony/options-resolver": "^3.0 || ^4.0", + "symfony/polyfill-php70": "^1.0", + "symfony/polyfill-php72": "^1.4", + "symfony/process": "^3.0 || ^4.0", + "symfony/stopwatch": "^3.0 || ^4.0" + }, + "require-dev": { + "johnkary/phpunit-speedtrap": "^1.1 || ^2.0 || ^3.0", + "justinrainbow/json-schema": "^5.0", + "keradus/cli-executor": "^1.2", + "mikey179/vfsstream": "^1.6", + "php-coveralls/php-coveralls": "^2.1", + "php-cs-fixer/accessible-object": "^1.0", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.1", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.1", + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1", + "phpunitgoodpractices/traits": "^1.8", + "symfony/phpunit-bridge": "^4.0" + }, + "suggest": { + "ext-mbstring": "For handling non-UTF8 characters in cache signature.", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.", + "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible." + }, + "bin": [ + "php-cs-fixer" + ], + "type": "application", + "extra": { + "branch-alias": { + "dev-master": "2.15-dev" + } + }, + "autoload": { + "psr-4": { + "PhpCsFixer\\": "src/" + }, + "classmap": [ + "tests/Test/AbstractFixerTestCase.php", + "tests/Test/AbstractIntegrationCaseFactory.php", + "tests/Test/AbstractIntegrationTestCase.php", + "tests/Test/Assert/AssertTokensTrait.php", + "tests/Test/IntegrationCase.php", + "tests/Test/IntegrationCaseFactory.php", + "tests/Test/IntegrationCaseFactoryInterface.php", + "tests/Test/InternalIntegrationCaseFactory.php", + "tests/TestCase.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dariusz Rumiński", + "email": "dariusz.ruminski@gmail.com" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "A tool to automatically fix PHP code style", + "time": "2019-05-06T07:13:51+00:00" + }, { "name": "fzaninotto/faker", "version": "v1.8.0", @@ -2985,6 +3146,57 @@ ], "time": "2018-07-02T15:55:56+00:00" }, + { + "name": "php-cs-fixer/diff", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/PHP-CS-Fixer/diff.git", + "reference": "78bb099e9c16361126c86ce82ec4405ebab8e756" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/78bb099e9c16361126c86ce82ec4405ebab8e756", + "reference": "78bb099e9c16361126c86ce82ec4405ebab8e756", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7.23 || ^6.4.3", + "symfony/process": "^3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "SpacePossum" + } + ], + "description": "sebastian/diff v2 backport support for PHP5.6", + "homepage": "https://github.com/PHP-CS-Fixer", + "keywords": [ + "diff" + ], + "time": "2018-02-15T16:58:55+00:00" + }, { "name": "php-http/discovery", "version": "1.6.1", @@ -4885,6 +5097,60 @@ ], "time": "2019-01-16T20:31:39+00:00" }, + { + "name": "symfony/options-resolver", + "version": "v4.2.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/options-resolver.git", + "reference": "fd4a5f27b7cd085b489247b9890ebca9f3e10044" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/fd4a5f27b7cd085b489247b9890ebca9f3e10044", + "reference": "fd4a5f27b7cd085b489247b9890ebca9f3e10044", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\OptionsResolver\\": "" + }, + "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": "Symfony OptionsResolver Component", + "homepage": "https://symfony.com", + "keywords": [ + "config", + "configuration", + "options" + ], + "time": "2019-04-10T16:20:36+00:00" + }, { "name": "symfony/polyfill-ctype", "version": "v1.11.0", @@ -5123,6 +5389,65 @@ ], "time": "2019-02-06T07:57:58+00:00" }, + { + "name": "symfony/polyfill-php70", + "version": "v1.11.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php70.git", + "reference": "bc4858fb611bda58719124ca079baff854149c89" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/bc4858fb611bda58719124ca079baff854149c89", + "reference": "bc4858fb611bda58719124ca079baff854149c89", + "shasum": "" + }, + "require": { + "paragonie/random_compat": "~1.0|~2.0|~9.99", + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.11-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php70\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "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": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2019-02-06T07:57:58+00:00" + }, { "name": "symfony/polyfill-php72", "version": "v1.11.0", @@ -5450,6 +5775,56 @@ "homepage": "https://symfony.com", "time": "2019-04-28T07:09:27+00:00" }, + { + "name": "symfony/stopwatch", + "version": "v4.2.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/stopwatch.git", + "reference": "b1a5f646d56a3290230dbc8edf2a0d62cda23f67" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/b1a5f646d56a3290230dbc8edf2a0d62cda23f67", + "reference": "b1a5f646d56a3290230dbc8edf2a0d62cda23f67", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/contracts": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Stopwatch\\": "" + }, + "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": "Symfony Stopwatch Component", + "homepage": "https://symfony.com", + "time": "2019-01-16T20:31:39+00:00" + }, { "name": "symfony/translation", "version": "v4.2.8", diff --git a/config/themes.php b/config/themes.php index 662125d9a..bb1ad37aa 100644 --- a/config/themes.php +++ b/config/themes.php @@ -10,15 +10,15 @@ |-------------------------------------------------------------------------- | Define available themes. Format: | - | 'theme-name' => [ - | 'extends' => 'theme-to-extend', // optional - | 'views-path' => 'path-to-views', // defaults to: resources/views/theme-name - | 'asset-path' => 'path-to-assets', // defaults to: public/theme-name + | 'theme-name' => [ + | 'extends' => 'theme-to-extend', // optional + | 'views-path' => 'path-to-views', // defaults to: resources/views/theme-name + | 'asset-path' => 'path-to-assets', // defaults to: public/theme-name | - | // You can add your own custom keys - | // Use Theme::getSetting('key') & Theme::setSetting('key', 'value') to access them - | 'key' => 'value', - | ], + | // You can add your own custom keys + | // Use Theme::getSetting('key') & Theme::setSetting('key', 'value') to access them + | 'key' => 'value', + | ], | |-------------------------------------------------------------------------- */ @@ -29,37 +29,37 @@ 'extends' => 'false', ], - // Add your themes here. These settings will override theme.json settings defined for each theme + // Add your themes here. These settings will override theme.json settings defined for each theme /* |---------------------------[ Example Structure ]-------------------------- | - | // Full theme Syntax: + | // Full theme Syntax: | - | 'example1' => [ - | 'extends' => null, // doesn't extend any theme - | 'views-path' => example, // = resources/views/example_theme - | 'asset-path' => example, // = public/example_theme - | ], + | 'example1' => [ + | 'extends' => null, // doesn't extend any theme + | 'views-path' => example, // = resources/views/example_theme + | 'asset-path' => example, // = public/example_theme + | ], | - | // Use all Defaults: + | // Use all Defaults: | - | 'example2', // Assets =\public\example2, Views =\resources\views\example2 - | // Note that if you use all default values, you can omit declaration completely. - | // i.e. defaults will be used when you call Theme::set('undefined-theme') + | 'example2', // Assets =\public\example2, Views =\resources\views\example2 + | // Note that if you use all default values, you can omit declaration completely. + | // i.e. defaults will be used when you call Theme::set('undefined-theme') | | - | // This theme shares the views with example2 but defines its own assets in \public\example3 + | // This theme shares the views with example2 but defines its own assets in \public\example3 | - | 'example3' => [ - | 'views-path' => 'example', - | ], + | 'example3' => [ + | 'views-path' => 'example', + | ], | - | // This theme extends example1 and may override SOME views\assets in its own paths + | // This theme extends example1 and may override SOME views\assets in its own paths | - | 'example4' => [ - | 'extends' => 'example1', - | ], + | 'example4' => [ + | 'extends' => 'example1', + | ], | |-------------------------------------------------------------------------- */ diff --git a/phpcs.xml b/phpcs.xml deleted file mode 100644 index b9025657e..000000000 --- a/phpcs.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - phpvms coding standard - - - - - - - - app/ - From 8d6621e2a80170d87630133bd4cc32e36386e5e3 Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Sun, 12 May 2019 17:25:52 -0500 Subject: [PATCH 12/16] Add additional rules --- .php_cs | 27 +++++++++++++++++++++++---- Makefile | 2 +- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/.php_cs b/.php_cs index 045a04728..d8a1f3eae 100644 --- a/.php_cs +++ b/.php_cs @@ -10,12 +10,31 @@ return PhpCsFixer\Config::create() ->setRiskyAllowed(true) ->setRules( [ - '@PSR2' => true, - 'strict_param' => true, - 'array_syntax' => ['syntax' => 'short'], - 'binary_operator_spaces' => [ + '@PSR2' => true, + 'strict_param' => true, + 'no_php4_constructor' => true, + 'no_extra_blank_lines' => true, + 'no_superfluous_elseif' => true, + 'single_line_comment_style' => false, + 'phpdoc_summary' => false, + 'phpdoc_no_empty_return' => false, + 'simple_to_complex_string_variable' => true, + 'array_syntax' => [ + 'syntax' => 'short', + ], + 'binary_operator_spaces' => [ 'align_double_arrow' => true, ], + 'blank_line_before_statement' => [ + 'statements' => [ + 'declare', + 'if', + 'for', + 'return', + 'throw', + 'try', + ], + ], ] ) ->setFinder($finder); diff --git a/Makefile b/Makefile index 433f96c91..588cef981 100644 --- a/Makefile +++ b/Makefile @@ -70,7 +70,7 @@ test: .PHONY: phpcs phpcs: - @vendor/bin/php-cs-fixer fix --config=.php_cs -v --dry-run --diff + @vendor/bin/php-cs-fixer fix --config=.php_cs -v --diff --dry-run .PHONY: phpstan: From d65b74d7a09ce9a72eb80572e9f1d8c4c9d8885c Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Sun, 12 May 2019 17:37:22 -0500 Subject: [PATCH 13/16] Formatting --- .php_cs | 53 ++++++++++++++++------------------ app/Services/ExportService.php | 33 +++++++++------------ 2 files changed, 39 insertions(+), 47 deletions(-) diff --git a/.php_cs b/.php_cs index d8a1f3eae..53e71f36f 100644 --- a/.php_cs +++ b/.php_cs @@ -8,33 +8,30 @@ return PhpCsFixer\Config::create() ->setHideProgress(true) ->setUsingCache(false) ->setRiskyAllowed(true) - ->setRules( - [ - '@PSR2' => true, - 'strict_param' => true, - 'no_php4_constructor' => true, - 'no_extra_blank_lines' => true, - 'no_superfluous_elseif' => true, - 'single_line_comment_style' => false, - 'phpdoc_summary' => false, - 'phpdoc_no_empty_return' => false, - 'simple_to_complex_string_variable' => true, - 'array_syntax' => [ - 'syntax' => 'short', + ->setRules([ + '@PSR2' => true, + 'strict_param' => true, + 'no_php4_constructor' => true, + 'no_extra_blank_lines' => true, + 'no_superfluous_elseif' => true, + 'single_line_comment_style' => false, + 'simple_to_complex_string_variable' => true, + 'array_syntax' => [ + 'syntax' => 'short', + ], + 'binary_operator_spaces' => [ + 'align_double_arrow' => true, + ], + /* + 'blank_line_before_statement' => [ + 'statements' => [ + 'declare', + 'for', + 'return', + 'throw', + 'try', ], - 'binary_operator_spaces' => [ - 'align_double_arrow' => true, - ], - 'blank_line_before_statement' => [ - 'statements' => [ - 'declare', - 'if', - 'for', - 'return', - 'throw', - 'try', - ], - ], - ] - ) + ], + */ + ]) ->setFinder($finder); diff --git a/app/Services/ExportService.php b/app/Services/ExportService.php index 0298187aa..51dda03d7 100644 --- a/app/Services/ExportService.php +++ b/app/Services/ExportService.php @@ -30,6 +30,7 @@ public function openCsv($path): Writer { $writer = Writer::createFromPath($path, 'w+'); CharsetConverter::addTo($writer, 'utf-8', 'iso-8859-15'); + return $writer; } @@ -39,9 +40,9 @@ public function openCsv($path): Writer * @param Collection $collection * @param ImportExport $exporter * + * @return string * @throws \League\Csv\CannotInsertRecord * - * @return string */ protected function runExport(Collection $collection, ImportExport $exporter): string { @@ -71,14 +72,13 @@ protected function runExport(Collection $collection, ImportExport $exporter): st * * @param Collection $aircraft * + * @return mixed * @throws \League\Csv\CannotInsertRecord * - * @return mixed */ public function exportAircraft($aircraft) { - $exporter = new AircraftExporter(); - return $this->runExport($aircraft, $exporter); + return $this->runExport($aircraft, new AircraftExporter()); } /** @@ -86,14 +86,13 @@ public function exportAircraft($aircraft) * * @param Collection $airports * + * @return mixed * @throws \League\Csv\CannotInsertRecord * - * @return mixed */ public function exportAirports($airports) { - $exporter = new AirportExporter(); - return $this->runExport($airports, $exporter); + return $this->runExport($airports, new AirportExporter()); } /** @@ -101,14 +100,13 @@ public function exportAirports($airports) * * @param Collection $expenses * + * @return mixed * @throws \League\Csv\CannotInsertRecord * - * @return mixed */ public function exportExpenses($expenses) { - $exporter = new ExpenseExporter(); - return $this->runExport($expenses, $exporter); + return $this->runExport($expenses, new ExpenseExporter()); } /** @@ -116,14 +114,13 @@ public function exportExpenses($expenses) * * @param Collection $fares * + * @return mixed * @throws \League\Csv\CannotInsertRecord * - * @return mixed */ public function exportFares($fares) { - $exporter = new FareExporter(); - return $this->runExport($fares, $exporter); + return $this->runExport($fares, new FareExporter()); } /** @@ -131,14 +128,13 @@ public function exportFares($fares) * * @param Collection $flights * + * @return mixed * @throws \League\Csv\CannotInsertRecord * - * @return mixed */ public function exportFlights($flights) { - $exporter = new FlightExporter(); - return $this->runExport($flights, $exporter); + return $this->runExport($flights, new FlightExporter()); } /** @@ -146,13 +142,12 @@ public function exportFlights($flights) * * @param Collection $subfleets * + * @return mixed * @throws \League\Csv\CannotInsertRecord * - * @return mixed */ public function exportSubfleets($subfleets) { - $exporter = new SubfleetExporter(); - return $this->runExport($subfleets, $exporter); + return $this->runExport($subfleets, new SubfleetExporter()); } } From dbd7c5e90b9b9fd0a230334de8c51ff755b04592 Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Sun, 12 May 2019 17:49:58 -0500 Subject: [PATCH 14/16] Style fixes --- app/Services/ExportService.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/Services/ExportService.php b/app/Services/ExportService.php index 51dda03d7..b4ba117ac 100644 --- a/app/Services/ExportService.php +++ b/app/Services/ExportService.php @@ -40,9 +40,9 @@ public function openCsv($path): Writer * @param Collection $collection * @param ImportExport $exporter * - * @return string * @throws \League\Csv\CannotInsertRecord * + * @return string */ protected function runExport(Collection $collection, ImportExport $exporter): string { @@ -72,9 +72,9 @@ protected function runExport(Collection $collection, ImportExport $exporter): st * * @param Collection $aircraft * - * @return mixed * @throws \League\Csv\CannotInsertRecord * + * @return mixed */ public function exportAircraft($aircraft) { @@ -86,9 +86,9 @@ public function exportAircraft($aircraft) * * @param Collection $airports * - * @return mixed * @throws \League\Csv\CannotInsertRecord * + * @return mixed */ public function exportAirports($airports) { @@ -100,9 +100,9 @@ public function exportAirports($airports) * * @param Collection $expenses * - * @return mixed * @throws \League\Csv\CannotInsertRecord * + * @return mixed */ public function exportExpenses($expenses) { @@ -114,9 +114,9 @@ public function exportExpenses($expenses) * * @param Collection $fares * - * @return mixed * @throws \League\Csv\CannotInsertRecord * + * @return mixed */ public function exportFares($fares) { @@ -128,9 +128,9 @@ public function exportFares($fares) * * @param Collection $flights * - * @return mixed * @throws \League\Csv\CannotInsertRecord * + * @return mixed */ public function exportFlights($flights) { @@ -142,9 +142,9 @@ public function exportFlights($flights) * * @param Collection $subfleets * - * @return mixed * @throws \League\Csv\CannotInsertRecord * + * @return mixed */ public function exportSubfleets($subfleets) { From 2ca1f33e683d899f9506341be0aee9277fc22caa Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Sun, 12 May 2019 18:05:36 -0500 Subject: [PATCH 15/16] Formatting --- app/Console/Services/Importer.php | 14 +++++++++++--- app/Http/Controllers/Auth/LoginController.php | 8 ++++++-- app/Services/GeoService.php | 4 +++- app/Services/PirepService.php | 19 ++++++++++++------- 4 files changed, 32 insertions(+), 13 deletions(-) diff --git a/app/Console/Services/Importer.php b/app/Console/Services/Importer.php index 28b76b151..d538d04b2 100644 --- a/app/Console/Services/Importer.php +++ b/app/Console/Services/Importer.php @@ -683,14 +683,22 @@ protected function getUserState($state) // Decide which state they will be in accordance with v7 if ($state === $phpvms_classic_states['ACTIVE']) { return UserState::ACTIVE; - } elseif ($state === $phpvms_classic_states['INACTIVE']) { + } + + if ($state === $phpvms_classic_states['INACTIVE']) { // TODO: Make an inactive state? return UserState::REJECTED; - } elseif ($state === $phpvms_classic_states['BANNED']) { + } + + if ($state === $phpvms_classic_states['BANNED']) { return UserState::SUSPENDED; - } elseif ($state === $phpvms_classic_states['ON_LEAVE']) { + } + + if ($state === $phpvms_classic_states['ON_LEAVE']) { return UserState::ON_LEAVE; } + $this->error('Unknown status: '.$state); + return UserState::ACTIVE; } } diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 1589ca88c..05ed692a5 100755 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -59,9 +59,13 @@ protected function sendLoginResponse(Request $request) // Redirect to one of the error pages if ($user->state === UserState::PENDING) { return view('auth.pending'); - } elseif ($user->state === UserState::REJECTED) { + } + + if ($user->state === UserState::REJECTED) { return view('auth.rejected'); - } elseif ($user->state === UserState::SUSPENDED) { + } + + if ($user->state === UserState::SUSPENDED) { return view('auth.suspended'); } } diff --git a/app/Services/GeoService.php b/app/Services/GeoService.php index 1d170021a..f95f66fea 100644 --- a/app/Services/GeoService.php +++ b/app/Services/GeoService.php @@ -113,7 +113,9 @@ public function getCoordsFromRoute($dep_icao, $arr_icao, $start_coords, $route): if ($size === 0) { continue; - } elseif ($size === 1) { + } + + if ($size === 1) { $point = $points[0]; Log::debug('name: '.$point->id.' - '.$point->lat.'x'.$point->lon); $coords[] = $point; diff --git a/app/Services/PirepService.php b/app/Services/PirepService.php index 6e8cc025d..8d2722c74 100644 --- a/app/Services/PirepService.php +++ b/app/Services/PirepService.php @@ -276,23 +276,28 @@ public function changeState(Pirep $pirep, int $new_state) if ($pirep->state === PirepState::PENDING) { if ($new_state === PirepState::ACCEPTED) { return $this->accept($pirep); - } elseif ($new_state === PirepState::REJECTED) { + } + + if ($new_state === PirepState::REJECTED) { return $this->reject($pirep); } + return $pirep; - } /* + } + + /* * Move from a ACCEPTED to REJECTED status */ - elseif ($pirep->state === PirepState::ACCEPTED) { + if ($pirep->state === PirepState::ACCEPTED) { $pirep = $this->reject($pirep); - return $pirep; - } /* + } + + /* * Move from REJECTED to ACCEPTED */ - elseif ($pirep->state === PirepState::REJECTED) { + if ($pirep->state === PirepState::REJECTED) { $pirep = $this->accept($pirep); - return $pirep; } From 7e461f401b199eefea6f9f52520eae8b481e60b9 Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Sun, 12 May 2019 18:13:42 -0500 Subject: [PATCH 16/16] Remove .php_cs from dist --- .travis/deploy_script.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis/deploy_script.sh b/.travis/deploy_script.sh index 7564bab73..fcbb724cd 100755 --- a/.travis/deploy_script.sh +++ b/.travis/deploy_script.sh @@ -61,8 +61,9 @@ if [ "$TRAVIS" = "true" ]; then .dpl .eslintignore .eslintrc - .phpstorm.meta.php + .php_cs .php_cs.cache + .phpstorm.meta.php .styleci.yml env.php config.php