From 9e9e2b6a85c3529099f0ee981a89f64d8f920fa4 Mon Sep 17 00:00:00 2001 From: DariusIII Date: Tue, 7 May 2019 20:43:51 +0200 Subject: [PATCH] Update code fixing in dev, used libraries and laravel/framework to latest versions --- .php-cs | 55 ---------------------------------- .php_cs | 21 +++++++++++++ Changelog | 2 ++ composer.json | 6 ++-- composer.lock | 81 ++++++++++++++++++++++++++++++++++++++++++++------- 5 files changed, 96 insertions(+), 69 deletions(-) delete mode 100644 .php-cs create mode 100644 .php_cs diff --git a/.php-cs b/.php-cs deleted file mode 100644 index 7e6726372..000000000 --- a/.php-cs +++ /dev/null @@ -1,55 +0,0 @@ - false, - '@PSR2' => true, - 'blank_line_after_namespace' => true, - 'braces' => true, - 'class_definition' => true, - 'elseif' => true, - 'function_declaration' => true, - 'indentation_type' => true, - 'line_ending' => true, - 'lowercase_constants' => true, - 'lowercase_keywords' => true, - 'method_argument_space' => [ - 'ensure_fully_multiline' => true, ], - 'no_break_comment' => true, - 'no_closing_tag' => true, - 'no_spaces_after_function_name' => true, - 'no_spaces_inside_parenthesis' => true, - 'no_trailing_whitespace' => true, - 'no_trailing_whitespace_in_comment' => true, - 'single_blank_line_at_eof' => true, - 'single_class_element_per_statement' => [ - 'elements' => ['property'], - ], - 'single_import_per_statement' => true, - 'single_line_after_imports' => true, - 'switch_case_semicolon_to_colon' => true, - 'switch_case_space' => true, - 'visibility_required' => true, - 'encoding' => true, - 'full_opening_tag' => true, -]; -$excludes = [ - // add exclude project directory - 'vendor', - 'resources', - 'tests', - 'storage', - 'docs', - 'public', - 'bootstrap', -]; -return PhpCsFixer\Config::create() - ->setRules($rules) - ->setFinder( - PhpCsFixer\Finder::create() - ->exclude($excludes) - ->in(__DIR__) - ->name('*.php') - ->notName('*.blade.php') - ); diff --git a/.php_cs b/.php_cs new file mode 100644 index 000000000..2f259d4c8 --- /dev/null +++ b/.php_cs @@ -0,0 +1,21 @@ +setFinder( + PhpCsFixer\Finder::create() + ->in(app_path()) + ->in(config_path()) + ->in(database_path()) + ->notPath(database_path('migrations')) + ->in(resource_path('lang')) + ->in(base_path('routes')) + ->in(base_path('tests')) + ->in(base_path('Blacklight')) + ->in(base_path('misc')) + ) + ->setRules([ + '@Laravel' => true, + ]); diff --git a/Changelog b/Changelog index 95d15afc2..b9d5ae0a7 100755 --- a/Changelog +++ b/Changelog @@ -1,3 +1,5 @@ +2019-05-07 DariusIII + * Chg: Update code fixing in dev, used libraries and laravel/framework to latest versions 2019-05-05 DariusIII * Chg: Update pnotify to version 4.0.0 and tinyMCE to latest version 2019-05-03 DariusIII diff --git a/composer.json b/composer.json index fe726b98d..fdb5afbde 100755 --- a/composer.json +++ b/composer.json @@ -164,6 +164,7 @@ "friendsofphp/php-cs-fixer": "^2.14", "fzaninotto/faker": "~1.4", "laracasts/generators": "dev-master", + "matt-allan/laravel-code-style": "^0.2.0", "mockery/mockery": "^1.0", "moontoast/math": "^1.1", "nunomaduro/collision": "^3.0", @@ -192,9 +193,8 @@ "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", "@php artisan package:discover --ansi" ], - "format": [ - "vendor/bin/php-cs-fixer fix --config .php-cs" - ] + "check-style": "php-cs-fixer fix --dry-run --diff", + "fix-style": "php-cs-fixer fix" }, "suggest": { "ext-gd": "to use GD library based image processing.", diff --git a/composer.lock b/composer.lock index 108f060d5..63f7324cc 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": "a9ebeb18c41145b331c636515c4f17ec", + "content-hash": "01c8d8d9e9cd296f54ff730a8ef5c66f", "packages": [ { "name": "aharen/omdbapi", @@ -2588,16 +2588,16 @@ }, { "name": "laravel/framework", - "version": "v5.8.15", + "version": "v5.8.16", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "8a34004aed6ff0aa4072360e3e5bd875edebc223" + "reference": "83d57f9f9162ab476c43b9ec00d463ff12c578fd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/8a34004aed6ff0aa4072360e3e5bd875edebc223", - "reference": "8a34004aed6ff0aa4072360e3e5bd875edebc223", + "url": "https://api.github.com/repos/laravel/framework/zipball/83d57f9f9162ab476c43b9ec00d463ff12c578fd", + "reference": "83d57f9f9162ab476c43b9ec00d463ff12c578fd", "shasum": "" }, "require": { @@ -2731,7 +2731,7 @@ "framework", "laravel" ], - "time": "2019-04-30T14:05:03+00:00" + "time": "2019-05-07T14:37:11+00:00" }, { "name": "laravel/horizon", @@ -5653,16 +5653,16 @@ }, { "name": "spatie/async", - "version": "1.0.0", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/spatie/async.git", - "reference": "52ca8a6c7127fa78a93285ab2d0a258967a3bfe0" + "reference": "19937008f2544b235173119f2f4a69e88b84fee4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/async/zipball/52ca8a6c7127fa78a93285ab2d0a258967a3bfe0", - "reference": "52ca8a6c7127fa78a93285ab2d0a258967a3bfe0", + "url": "https://api.github.com/repos/spatie/async/zipball/19937008f2544b235173119f2f4a69e88b84fee4", + "reference": "19937008f2544b235173119f2f4a69e88b84fee4", "shasum": "" }, "require": { @@ -5706,7 +5706,7 @@ "async", "spatie" ], - "time": "2019-03-22T08:39:50+00:00" + "time": "2019-05-07T08:07:53+00:00" }, { "name": "spatie/fractalistic", @@ -9324,6 +9324,65 @@ ], "time": "2018-05-07T06:29:34+00:00" }, + { + "name": "matt-allan/laravel-code-style", + "version": "0.2.0", + "source": { + "type": "git", + "url": "https://github.com/matt-allan/laravel-code-style.git", + "reference": "10d262e1c9aeb90b8c945f8d80b77e3f069c623f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/matt-allan/laravel-code-style/zipball/10d262e1c9aeb90b8c945f8d80b77e3f069c623f", + "reference": "10d262e1c9aeb90b8c945f8d80b77e3f069c623f", + "shasum": "" + }, + "require": { + "friendsofphp/php-cs-fixer": "^2.14", + "illuminate/support": "5.8.x", + "php": ">=7.1" + }, + "require-dev": { + "laravel/framework": "^5.8.14", + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + }, + "laravel": { + "providers": [ + "MattAllan\\LaravelCodeStyle\\ServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "MattAllan\\LaravelCodeStyle\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Matt Allan", + "email": "matt@mattallan.me" + } + ], + "description": "Code formatting for Laravel projects", + "homepage": "https://github.com/matt-allan/laravel-code-style", + "keywords": [ + "PSR-2", + "code-style", + "laravel", + "php-cs-fixer" + ], + "time": "2019-04-29T13:47:40+00:00" + }, { "name": "maximebf/debugbar", "version": "v1.15.0",