diff --git a/composer.json b/composer.json index b49cc57ec..b8b5fba99 100644 --- a/composer.json +++ b/composer.json @@ -42,6 +42,7 @@ "require-dev": { "fakerphp/faker": "^1.19.1", "friendsofphp/php-cs-fixer": "^3.8.0", + "jetbrains/phpstorm-attributes": "^1.0", "mockery/mockery": "^1.4.4", "orchestra/testbench": "^8.15", "php-standard-library/psalm-plugin": "^2.3", diff --git a/composer.lock b/composer.lock index f47c26d9d..82ac56999 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": "44ea06d0b2a09ba1a4ff7e9880b7de0f", + "content-hash": "de299d69b1a11671ad530e32c62274ed", "packages": [ { "name": "apiato/container-installer", @@ -8560,6 +8560,48 @@ }, "time": "2020-07-09T08:09:16+00:00" }, + { + "name": "jetbrains/phpstorm-attributes", + "version": "1.0", + "source": { + "type": "git", + "url": "https://github.com/JetBrains/phpstorm-attributes.git", + "reference": "a7a83ae5df4dd3c0875484483de19de8edf60a9f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/JetBrains/phpstorm-attributes/zipball/a7a83ae5df4dd3c0875484483de19de8edf60a9f", + "reference": "a7a83ae5df4dd3c0875484483de19de8edf60a9f", + "shasum": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "JetBrains\\PhpStorm\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "JetBrains", + "homepage": "https://www.jetbrains.com" + } + ], + "description": "PhpStorm specific attributes", + "keywords": [ + "attributes", + "jetbrains", + "phpstorm" + ], + "support": { + "issues": "https://youtrack.jetbrains.com/newIssue?project=WI", + "source": "https://github.com/JetBrains/phpstorm-attributes/tree/1.0" + }, + "time": "2020-11-17T11:09:47+00:00" + }, { "name": "laravel/tinker", "version": "v2.9.0", diff --git a/src/Abstracts/Providers/MiddlewareServiceProvider.php b/src/Abstracts/Providers/MiddlewareServiceProvider.php index 98736353a..6c8a27cf0 100644 --- a/src/Abstracts/Providers/MiddlewareServiceProvider.php +++ b/src/Abstracts/Providers/MiddlewareServiceProvider.php @@ -27,8 +27,6 @@ abstract class MiddlewareServiceProvider extends MainServiceProvider * The application's route middleware. * * @var array - * - * @deprecated */ protected array $routeMiddleware = []; diff --git a/src/Generator/GeneratorCommand.php b/src/Generator/GeneratorCommand.php index b94fb0992..511490b50 100644 --- a/src/Generator/GeneratorCommand.php +++ b/src/Generator/GeneratorCommand.php @@ -233,7 +233,7 @@ protected function getStubContent(): string // Check if the custom file exists if (!$this->fileSystem->exists($file)) { // It does not exist - so take the default file! - $path = __DIR__ . 'GeneratorCommand.php/' . self::STUB_PATH; + $path = __DIR__ . '/' . self::STUB_PATH; $file = str_replace('*', $this->stubName, $path); } diff --git a/src/Loaders/ProvidersLoaderTrait.php b/src/Loaders/ProvidersLoaderTrait.php index 06390d0d8..ebf93c7b0 100644 --- a/src/Loaders/ProvidersLoaderTrait.php +++ b/src/Loaders/ProvidersLoaderTrait.php @@ -9,8 +9,6 @@ trait ProvidersLoaderTrait { - public array $serviceProviders = []; - /** * Loads only the Main Service Providers from the Containers. * All the Service Providers (registered inside the main), will be diff --git a/src/Traits/TestTraits/PhpUnit/TestAssertionHelperTrait.php b/src/Traits/TestTraits/PhpUnit/TestAssertionHelperTrait.php index 98ca3f43c..4f7562ff8 100644 --- a/src/Traits/TestTraits/PhpUnit/TestAssertionHelperTrait.php +++ b/src/Traits/TestTraits/PhpUnit/TestAssertionHelperTrait.php @@ -97,15 +97,15 @@ protected function getInaccessiblePropertyValue(object $object, string $property } /** - * Create a spy for a task with a specified repository instance. + * Create a spy for an Action, SubAction or a Task that uses a repository. * - * @param string $taskClassName the task class name + * @param string $className the Action, SubAction or a Task class name * @param string $repositoryClassName the repository class name */ - protected function createTaskSpyWithRepository(string $taskClassName, string $repositoryClassName, bool $allowRun = true): MockInterface + protected function createSpyWithRepository(string $className, string $repositoryClassName, bool $allowRun = true): MockInterface { /** @var MockInterface $taskSpy */ - $taskSpy = \Mockery::mock($taskClassName, [app($repositoryClassName)]) + $taskSpy = \Mockery::mock($className, [app($repositoryClassName)]) ->shouldIgnoreMissing(null, true) ->makePartial(); @@ -113,7 +113,7 @@ protected function createTaskSpyWithRepository(string $taskClassName, string $re $taskSpy->allows('run')->andReturn(); } - $this->swap($taskClassName, $taskSpy); + $this->swap($className, $taskSpy); return $taskSpy; }