diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index fad3d28dd..0650d82f0 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -50,7 +50,7 @@ class Kernel extends HttpKernel * * @var array */ - protected $routeMiddleware = [ + protected $middlewareAliases = [ 'auth' => \Illuminate\Auth\Middleware\Authenticate::class, 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, diff --git a/composer.json b/composer.json index 62c3e5dc9..90455aa9a 100755 --- a/composer.json +++ b/composer.json @@ -119,6 +119,8 @@ "beyondcode/laravel-dump-server": "^1.4", "captainhook/captainhook": "^5.1", "captainhook/plugin-composer": "^5.1", + "driftingly/rector-laravel": "^0.16.1", + "ergebnis/composer-normalize": "^2.30", "friendsofphp/php-cs-fixer": "^3.5", "jubeki/laravel-code-style": "^1.0", "laracasts/generators": "^2.0", @@ -127,6 +129,7 @@ "nunomaduro/larastan": "^2.0", "php-coveralls/php-coveralls": "^2.0", "phpunit/phpunit": "^8.0 || ^9.0 || ^10.0", + "rector/rector": "^0.15.19", "spatie/laravel-ignition": "^2.0" }, "suggest": { @@ -168,20 +171,20 @@ "url": "https://github.com/NNTmux/laravel-caffeine" }, { - "type": "vcs", - "url": "https://github.com/NNTmux/laravel-countries" + "type": "vcs", + "url": "https://github.com/NNTmux/laravel-countries" }, { - "type": "vcs", - "url": "https://github.com/DariusIII/Laravel-5-Generators-Extended" + "type": "vcs", + "url": "https://github.com/DariusIII/Laravel-5-Generators-Extended" }, { - "type": "vcs", - "url": "https://github.com/DariusIII/theTVDbAPI" + "type": "vcs", + "url": "https://github.com/DariusIII/theTVDbAPI" }, { - "type": "vcs", - "url": "https://github.com/DariusIII/imdbphp" + "type": "vcs", + "url": "https://github.com/DariusIII/imdbphp" }, { "type": "vcs", @@ -192,8 +195,8 @@ "prefer-stable": true, "autoload": { "psr-4": { - "Blacklight\\": "Blacklight/", "App\\": "app/", + "Blacklight\\": "Blacklight/", "Database\\Factories\\": "database/factories/", "Database\\Seeders\\": "database/seeders/" }, @@ -211,7 +214,8 @@ "allow-plugins": { "composer/package-versions-deprecated": true, "captainhook/plugin-composer": true, - "treeware/plant": true + "treeware/plant": true, + "ergebnis/composer-normalize": true }, "discard-changes": true, "optimize-autoloader": true, diff --git a/composer.lock b/composer.lock index 4afa77471..90c953496 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": "19cfba94de132ea790ae445dacce5754", + "content-hash": "b8c8d203fabe19d68c30536a01d3a5b3", "packages": [ { "name": "aharen/omdbapi", @@ -14356,6 +14356,430 @@ }, "time": "2023-02-02T22:02:53+00:00" }, + { + "name": "driftingly/rector-laravel", + "version": "0.16.1", + "source": { + "type": "git", + "url": "https://github.com/driftingly/rector-laravel.git", + "reference": "5a87d4e8180b2d295aa6077580adf6ff4517e84e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/driftingly/rector-laravel/zipball/5a87d4e8180b2d295aa6077580adf6ff4517e84e", + "reference": "5a87d4e8180b2d295aa6077580adf6ff4517e84e", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "rector-extension", + "autoload": { + "psr-4": { + "RectorLaravel\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Rector upgrades rules for Laravel Framework", + "support": { + "issues": "https://github.com/driftingly/rector-laravel/issues", + "source": "https://github.com/driftingly/rector-laravel/tree/0.16.1" + }, + "time": "2023-02-27T17:47:42+00:00" + }, + { + "name": "ergebnis/composer-normalize", + "version": "2.30.2", + "source": { + "type": "git", + "url": "https://github.com/ergebnis/composer-normalize.git", + "reference": "54d58f7dc5517ae183ac2c06f1dcbd616876673c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ergebnis/composer-normalize/zipball/54d58f7dc5517ae183ac2c06f1dcbd616876673c", + "reference": "54d58f7dc5517ae183ac2c06f1dcbd616876673c", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^2.0.0", + "ergebnis/json": "^1.0.1", + "ergebnis/json-normalizer": "^4.0.2", + "ergebnis/json-printer": "^3.3.0", + "ext-json": "*", + "justinrainbow/json-schema": "^5.2.12", + "localheinz/diff": "^1.1.1", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" + }, + "require-dev": { + "composer/composer": "^2.5.1", + "ergebnis/license": "^2.1.0", + "ergebnis/php-cs-fixer-config": "^5.3.1", + "fakerphp/faker": "^1.21.0", + "infection/infection": "~0.26.19", + "phpunit/phpunit": "^9.6.3", + "psalm/plugin-phpunit": "~0.18.4", + "rector/rector": "~0.15.18", + "symfony/filesystem": "^6.0.13", + "vimeo/psalm": "^5.7.7" + }, + "type": "composer-plugin", + "extra": { + "class": "Ergebnis\\Composer\\Normalize\\NormalizePlugin", + "composer-normalize": { + "indent-size": 2, + "indent-style": "space" + } + }, + "autoload": { + "psr-4": { + "Ergebnis\\Composer\\Normalize\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com" + } + ], + "description": "Provides a composer plugin for normalizing composer.json.", + "homepage": "https://github.com/ergebnis/composer-normalize", + "keywords": [ + "composer", + "normalize", + "normalizer", + "plugin" + ], + "support": { + "issues": "https://github.com/ergebnis/composer-normalize/issues", + "source": "https://github.com/ergebnis/composer-normalize" + }, + "time": "2023-02-27T17:23:42+00:00" + }, + { + "name": "ergebnis/json", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/ergebnis/json.git", + "reference": "d66ea30060856d0729a4aa319a02752519ca63a0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ergebnis/json/zipball/d66ea30060856d0729a4aa319a02752519ca63a0", + "reference": "d66ea30060856d0729a4aa319a02752519ca63a0", + "shasum": "" + }, + "require": { + "php": "^8.0" + }, + "require-dev": { + "ergebnis/composer-normalize": "^2.29.0", + "ergebnis/data-provider": "^1.2.0", + "ergebnis/license": "^2.1.0", + "ergebnis/php-cs-fixer-config": "^5.0.0", + "ergebnis/phpstan-rules": "^1.0.0", + "fakerphp/faker": "^1.20.0", + "infection/infection": "~0.26.16", + "phpunit/phpunit": "^9.5.27", + "psalm/plugin-phpunit": "~0.18.4", + "vimeo/psalm": "^5.1.0" + }, + "type": "library", + "extra": { + "composer-normalize": { + "indent-size": 2, + "indent-style": "space" + } + }, + "autoload": { + "psr-4": { + "Ergebnis\\Json\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com" + } + ], + "description": "Provides a Json value object for representing a valid JSON string.", + "homepage": "https://github.com/ergebnis/json", + "keywords": [ + "json" + ], + "support": { + "issues": "https://github.com/ergebnis/json/issues", + "source": "https://github.com/ergebnis/json" + }, + "time": "2022-12-10T22:38:50+00:00" + }, + { + "name": "ergebnis/json-normalizer", + "version": "4.0.2", + "source": { + "type": "git", + "url": "https://github.com/ergebnis/json-normalizer.git", + "reference": "15df99fbf454da13b31008795a7397d3d7d73bb4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ergebnis/json-normalizer/zipball/15df99fbf454da13b31008795a7397d3d7d73bb4", + "reference": "15df99fbf454da13b31008795a7397d3d7d73bb4", + "shasum": "" + }, + "require": { + "ergebnis/json": "^1.0.1", + "ergebnis/json-pointer": "^3.2.0", + "ergebnis/json-printer": "^3.3.0", + "ergebnis/json-schema-validator": "^4.0.0", + "ext-json": "*", + "justinrainbow/json-schema": "^5.2.12", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" + }, + "require-dev": { + "composer/semver": "^3.2.1", + "ergebnis/data-provider": "^1.3.0", + "ergebnis/license": "^2.1.0", + "ergebnis/php-cs-fixer-config": "^5.3.1", + "fakerphp/faker": "^1.21.0", + "infection/infection": "~0.26.19", + "phpunit/phpunit": "^9.6.3", + "psalm/plugin-phpunit": "~0.18.4", + "rector/rector": "~0.15.18", + "symfony/filesystem": "^6.0.19", + "symfony/finder": "^6.0.19", + "vimeo/psalm": "^5.7.7" + }, + "suggest": { + "composer/semver": "If you want to use ComposerJsonNormalizer or VersionConstraintNormalizer" + }, + "type": "library", + "autoload": { + "psr-4": { + "Ergebnis\\Json\\Normalizer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com" + } + ], + "description": "Provides generic and vendor-specific normalizers for normalizing JSON documents.", + "homepage": "https://github.com/ergebnis/json-normalizer", + "keywords": [ + "json", + "normalizer" + ], + "support": { + "issues": "https://github.com/ergebnis/json-normalizer/issues", + "source": "https://github.com/ergebnis/json-normalizer" + }, + "time": "2023-02-27T17:17:30+00:00" + }, + { + "name": "ergebnis/json-pointer", + "version": "3.2.0", + "source": { + "type": "git", + "url": "https://github.com/ergebnis/json-pointer.git", + "reference": "861516ff5afa1aa8905fdf3361315909523a1bf8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ergebnis/json-pointer/zipball/861516ff5afa1aa8905fdf3361315909523a1bf8", + "reference": "861516ff5afa1aa8905fdf3361315909523a1bf8", + "shasum": "" + }, + "require": { + "php": "^8.0" + }, + "require-dev": { + "ergebnis/composer-normalize": "^2.28.3", + "ergebnis/data-provider": "^1.2.0", + "ergebnis/license": "^2.1.0", + "ergebnis/php-cs-fixer-config": "^5.0.0", + "fakerphp/faker": "^1.20.0", + "infection/infection": "~0.26.16", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "~0.18.3", + "vimeo/psalm": "^4.30" + }, + "type": "library", + "extra": { + "composer-normalize": { + "indent-size": 2, + "indent-style": "space" + } + }, + "autoload": { + "psr-4": { + "Ergebnis\\Json\\Pointer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com" + } + ], + "description": "Provides JSON pointer as a value object.", + "homepage": "https://github.com/ergebnis/json-pointer", + "keywords": [ + "RFC6901", + "json", + "pointer" + ], + "support": { + "issues": "https://github.com/ergebnis/json-pointer/issues", + "source": "https://github.com/ergebnis/json-pointer" + }, + "time": "2022-11-28T17:03:31+00:00" + }, + { + "name": "ergebnis/json-printer", + "version": "3.3.0", + "source": { + "type": "git", + "url": "https://github.com/ergebnis/json-printer.git", + "reference": "18920367473b099633f644f0ca6dc8794345148f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ergebnis/json-printer/zipball/18920367473b099633f644f0ca6dc8794345148f", + "reference": "18920367473b099633f644f0ca6dc8794345148f", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "php": "^8.0" + }, + "require-dev": { + "ergebnis/license": "^2.0.0", + "ergebnis/php-cs-fixer-config": "^4.11.0", + "fakerphp/faker": "^1.20.0", + "infection/infection": "~0.26.6", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "~0.18.3", + "vimeo/psalm": "^4.30.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Ergebnis\\Json\\Printer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com" + } + ], + "description": "Provides a JSON printer, allowing for flexible indentation.", + "homepage": "https://github.com/ergebnis/json-printer", + "keywords": [ + "formatter", + "json", + "printer" + ], + "support": { + "issues": "https://github.com/ergebnis/json-printer/issues", + "source": "https://github.com/ergebnis/json-printer" + }, + "time": "2022-11-28T10:27:43+00:00" + }, + { + "name": "ergebnis/json-schema-validator", + "version": "4.0.0", + "source": { + "type": "git", + "url": "https://github.com/ergebnis/json-schema-validator.git", + "reference": "a6166272ac5691a9bc791f185841e5f92a6d4723" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ergebnis/json-schema-validator/zipball/a6166272ac5691a9bc791f185841e5f92a6d4723", + "reference": "a6166272ac5691a9bc791f185841e5f92a6d4723", + "shasum": "" + }, + "require": { + "ergebnis/json": "^1.0.0", + "ergebnis/json-pointer": "^3.2.0", + "ext-json": "*", + "justinrainbow/json-schema": "^5.2.12", + "php": "^8.0" + }, + "require-dev": { + "ergebnis/composer-normalize": "^2.21.0", + "ergebnis/data-provider": "^1.2.0", + "ergebnis/license": "^2.1.0", + "ergebnis/php-cs-fixer-config": "~5.0.0", + "fakerphp/faker": "^1.20.0", + "infection/infection": "~0.26.16", + "phpunit/phpunit": "~9.5.27", + "psalm/plugin-phpunit": "~0.18.4", + "vimeo/psalm": "^5.1.0" + }, + "type": "library", + "extra": { + "composer-normalize": { + "indent-size": 2, + "indent-style": "space" + } + }, + "autoload": { + "psr-4": { + "Ergebnis\\Json\\SchemaValidator\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com" + } + ], + "description": "Provides a JSON schema validator, building on top of justinrainbow/json-schema.", + "homepage": "https://github.com/ergebnis/json-schema-validator", + "keywords": [ + "json", + "schema", + "validator" + ], + "support": { + "issues": "https://github.com/ergebnis/json-schema-validator/issues", + "source": "https://github.com/ergebnis/json-schema-validator" + }, + "time": "2022-12-10T14:50:15+00:00" + }, { "name": "filp/whoops", "version": "2.14.6", @@ -14635,6 +15059,76 @@ }, "time": "2023-01-18T05:12:06+00:00" }, + { + "name": "justinrainbow/json-schema", + "version": "5.2.12", + "source": { + "type": "git", + "url": "https://github.com/justinrainbow/json-schema.git", + "reference": "ad87d5a5ca981228e0e205c2bc7dfb8e24559b60" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/ad87d5a5ca981228e0e205c2bc7dfb8e24559b60", + "reference": "ad87d5a5ca981228e0e205c2bc7dfb8e24559b60", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "~2.2.20||~2.15.1", + "json-schema/json-schema-test-suite": "1.2.0", + "phpunit/phpunit": "^4.8.35" + }, + "bin": [ + "bin/validate-json" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "JsonSchema\\": "src/JsonSchema/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bruno Prieto Reis", + "email": "bruno.p.reis@gmail.com" + }, + { + "name": "Justin Rainbow", + "email": "justin.rainbow@gmail.com" + }, + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + }, + { + "name": "Robert Schönthal", + "email": "seroscho@googlemail.com" + } + ], + "description": "A library to validate a json schema.", + "homepage": "https://github.com/justinrainbow/json-schema", + "keywords": [ + "json", + "schema" + ], + "support": { + "issues": "https://github.com/justinrainbow/json-schema/issues", + "source": "https://github.com/justinrainbow/json-schema/tree/5.2.12" + }, + "time": "2022-04-13T08:02:27+00:00" + }, { "name": "laracasts/generators", "version": "2.0.2", @@ -14696,6 +15190,66 @@ }, "time": "2023-02-16T18:12:12+00:00" }, + { + "name": "localheinz/diff", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/localheinz/diff.git", + "reference": "851bb20ea8358c86f677f5f111c4ab031b1c764c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/localheinz/diff/zipball/851bb20ea8358c86f677f5f111c4ab031b1c764c", + "reference": "851bb20ea8358c86f677f5f111c4ab031b1c764c", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^7.5 || ^8.0", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Fork of sebastian/diff for use with ergebnis/composer-normalize", + "homepage": "https://github.com/localheinz/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "source": "https://github.com/localheinz/diff/tree/main" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-07-06T04:49:32+00:00" + }, { "name": "mockery/mockery", "version": "1.5.1", @@ -15773,6 +16327,61 @@ ], "time": "2023-03-01T05:37:49+00:00" }, + { + "name": "rector/rector", + "version": "0.15.19", + "source": { + "type": "git", + "url": "https://github.com/rectorphp/rector.git", + "reference": "4b3a85382e890963a6d00e0ace8d09465f96e370" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/4b3a85382e890963a6d00e0ace8d09465f96e370", + "reference": "4b3a85382e890963a6d00e0ace8d09465f96e370", + "shasum": "" + }, + "require": { + "php": "^7.2|^8.0", + "phpstan/phpstan": "^1.10.1" + }, + "conflict": { + "rector/rector-doctrine": "*", + "rector/rector-downgrade-php": "*", + "rector/rector-phpunit": "*", + "rector/rector-symfony": "*" + }, + "bin": [ + "bin/rector" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "0.15-dev" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Instant Upgrade and Automated Refactoring of any PHP code", + "support": { + "issues": "https://github.com/rectorphp/rector/issues", + "source": "https://github.com/rectorphp/rector/tree/0.15.19" + }, + "funding": [ + { + "url": "https://github.com/tomasvotruba", + "type": "github" + } + ], + "time": "2023-02-28T10:47:53+00:00" + }, { "name": "sebastian/cli-parser", "version": "2.0.0", @@ -17455,5 +18064,5 @@ "ext-zlib": "*" }, "platform-dev": [], - "plugin-api-version": "2.2.0" + "plugin-api-version": "2.3.0" } diff --git a/rector.php b/rector.php new file mode 100644 index 000000000..33001ed43 --- /dev/null +++ b/rector.php @@ -0,0 +1,31 @@ +paths([ + __DIR__ . '/Blacklight', + __DIR__ . '/app', + __DIR__ . '/bootstrap', + __DIR__ . '/cli', + __DIR__ . '/config', + __DIR__ . '/misc', + __DIR__ . '/public', + __DIR__ . '/resources', + __DIR__ . '/routes', + __DIR__ . '/tests', + ]); + + // register a single rule + //$rectorConfig->rule(InlineConstructorDefaultToPropertyRector::class); + + // define sets of rules + $rectorConfig->sets([ + LaravelSetList::LARAVEL_100 + ]); +};