Skip to content

Commit

Permalink
refactor!: Drop Laravel v10 support (#143, #203)
Browse files Browse the repository at this point in the history
  • Loading branch information
LastDragon-ru authored Nov 29, 2024
2 parents 8e0299e + 19aa940 commit d4f4f3f
Show file tree
Hide file tree
Showing 60 changed files with 385 additions and 257 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ The set provides best practices to make development more fun and classes/service
| | `^8.0.0` | `1.1.2 ⋯ 0.12.0` |
| | `>=8.0.0` | `0.11.0 ⋯ 0.4.0` |
| | `>=7.4.0` | `0.3.0 ⋯ 0.1.0` |
| Laravel | `^11.0.0` | `HEAD ⋯ 6.2.0` |
| | `^10.34.0` | `HEAD ⋯ 6.2.0` |
| Laravel | `^11.0.8` | `HEAD` |
| | `^11.0.0` | `7.0.1 ⋯ 6.2.0` |
| | `^10.34.0` | `7.0.1 ⋯ 6.2.0` |
| | `^10.0.0` | `6.1.0 ⋯ 2.1.0` |
| | `^9.21.0` | `5.6.0 ⋯ 5.0.0-beta.1` |
| | `^9.0.0` | `5.0.0-beta.0 ⋯ 0.12.0` |
Expand Down
66 changes: 33 additions & 33 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,61 +45,61 @@
"doctrine/sql-formatter": "^1.1",
"guzzlehttp/psr7": "^2.4.5",
"http-interop/http-factory-guzzle": "^1.0.0",
"illuminate/collections": "^10.34.0|^11.0.0",
"illuminate/conditionable": "^10.34.0|^11.0.0",
"illuminate/console": "^10.34.0|^11.0.0",
"illuminate/container": "^10.34.0|^11.0.0",
"illuminate/contracts": "^10.34.0|^11.0.0",
"illuminate/database": "^10.34.0|^11.0.0",
"illuminate/filesystem": "^10.34.0|^11.0.0",
"illuminate/http": "^10.34.0|^11.0.0",
"illuminate/macroable": "^10.34.0|^11.0.0",
"illuminate/pagination": "^10.34.0|^11.0.0",
"illuminate/process": "^10.34.0|^11.0.0",
"illuminate/routing": "^10.34.0|^11.0.0",
"illuminate/support": "^10.34.0|^11.0.0",
"illuminate/testing": "^10.34.0|^11.0.0",
"illuminate/translation": "^10.34.0|^11.0.0",
"illuminate/validation": "^10.34.0|^11.0.0",
"illuminate/collections": "^11.0.8",
"illuminate/conditionable": "^11.0.8",
"illuminate/console": "^11.0.8",
"illuminate/container": "^11.0.8",
"illuminate/contracts": "^11.0.8",
"illuminate/database": "^11.0.8",
"illuminate/filesystem": "^11.0.8",
"illuminate/http": "^11.0.8",
"illuminate/macroable": "^11.0.8",
"illuminate/pagination": "^11.0.8",
"illuminate/process": "^11.0.8",
"illuminate/routing": "^11.0.8",
"illuminate/support": "^11.0.8",
"illuminate/testing": "^11.0.8",
"illuminate/translation": "^11.0.8",
"illuminate/validation": "^11.0.8",
"larastan/larastan": "^2.8.1",
"league/commonmark": "^2.5.1",
"league/config": "^1.1.1",
"mockery/mockery": "^1.6.5",
"nette/neon": "^3.4",
"nikic/php-parser": "^5.0",
"nuwave/lighthouse": "^6.5.0",
"nuwave/lighthouse": "^6.36.0",
"opis/json-schema": "^2.3.0",
"phpdocumentor/type-resolver": "^1.7",
"phpstan/phpdoc-parser": "^1.25",
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^10.1.0|^11.0.0",
"phpunit/phpunit": "^10.5.0|^11.0.0",
"psr/http-message": "^1.0.0|^2.0.0",
"sebastian/comparator": "^5.0|^6.0.0",
"sebastian/exporter": "^5.0|^6.0.0",
"symfony/console": "^6.3.0|^7.0.0",
"symfony/console": "^7.0.0",
"symfony/deprecation-contracts": "^3.0.0",
"symfony/filesystem": "^6.3.0|^7.0.0",
"symfony/finder": "^6.3.0|^7.0.0",
"symfony/http-foundation": "^6.3.0|^7.0.0",
"symfony/http-kernel": "^6.3.0|^7.0.0",
"symfony/mime": "^6.3.0|^7.0.0",
"symfony/filesystem": "^7.0.0",
"symfony/finder": "^7.0.0",
"symfony/http-foundation": "^7.0.0",
"symfony/http-kernel": "^7.0.0",
"symfony/mime": "^7.0.0",
"symfony/polyfill-php83": "^1.28",
"symfony/property-access": "^6.3.0|^7.0.0",
"symfony/property-info": "^6.3.9|^7.0.0",
"symfony/psr-http-message-bridge": "^2.0.0|^6.4.0|^7.0.0",
"symfony/serializer": "^6.4.0|^7.0.0",
"symfony/var-dumper": "^6.3.0|^7.0.0",
"symfony/property-access": "^7.0.0",
"symfony/property-info": "^7.0.0",
"symfony/psr-http-message-bridge": "^7.0.0",
"symfony/serializer": "^7.0.0",
"symfony/var-dumper": "^7.0.0",
"webonyx/graphql-php": "^15.4.0"
},
"require-dev": {
"ext-pdo_sqlite": "*",
"bamarni/composer-bin-plugin": "^1.8",
"composer/class-map-generator": "^1.0",
"fakerphp/faker": "^1.21.0",
"illuminate/cache": "^10.34.0|^11.0.0",
"illuminate/config": "^10.34.0|^11.0.0",
"laravel/scout": "^9.8.0|^10.0.0",
"orchestra/testbench": "^8.0.0|^9.0.0",
"illuminate/cache": "^11.0.8",
"illuminate/config": "^11.0.8",
"laravel/scout": "^10.8.0",
"orchestra/testbench": "^9.0.0",
"phpstan/phpstan": "1.12.11",
"phpstan/phpstan-mockery": "^1.1",
"phpstan/phpstan-phpunit": "^1.3",
Expand Down
1 change: 1 addition & 0 deletions docs/Shared/Upgrade/FromV7.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* [ ] Laravel v10 is not supported anymore. Migrate to the newer version.
3 changes: 1 addition & 2 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"requirements": {
"HEAD": {
"laravel/framework": [
"^11.0.0",
"^10.34.0"
"^11.0.8"
],
"php": [
"^8.3",
Expand Down
5 changes: 3 additions & 2 deletions packages/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ This package contains useful utilities and classes.
| | `^8.0.0` | `1.1.2 ⋯ 0.12.0` |
| | `>=8.0.0` | `0.11.0 ⋯ 0.4.0` |
| | `>=7.4.0` | `0.3.0 ⋯ 0.1.0` |
| Laravel | `^11.0.0` | `HEAD ⋯ 6.2.0` |
| | `^10.34.0` | `HEAD ⋯ 6.2.0` |
| Laravel | `^11.0.8` | `HEAD` |
| | `^11.0.0` | `7.0.1 ⋯ 6.2.0` |
| | `^10.34.0` | `7.0.1 ⋯ 6.2.0` |
| | `^10.0.0` | `6.1.0 ⋯ 2.1.0` |
| | `^9.21.0` | `5.6.0 ⋯ 5.0.0-beta.1` |
| | `^9.0.0` | `5.0.0-beta.0 ⋯ 0.12.0` |
Expand Down
10 changes: 10 additions & 0 deletions packages/core/UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ Please also see [changelog](https://github.com/LastDragon-ru/lara-asp/releases)

[//]: # (end: preprocess/aa9fc458898c7c1c)

# Upgrade from v7

[include:file]: ../../docs/Shared/Upgrade/FromV7.md
[//]: # (start: preprocess/c45228918cc92f69)
[//]: # (warning: Generated automatically. Do not edit.)

* [ ] Laravel v10 is not supported anymore. Migrate to the newer version.

[//]: # (end: preprocess/c45228918cc92f69)

# Upgrade from v6

[include:file]: ../../docs/Shared/Upgrade/FromV6.md
Expand Down
14 changes: 7 additions & 7 deletions packages/core/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@
},
"require": {
"php": "^8.2|^8.3",
"illuminate/console": "^10.34.0|^11.0.0",
"illuminate/container": "^10.34.0|^11.0.0",
"illuminate/contracts": "^10.34.0|^11.0.0",
"illuminate/support": "^10.34.0|^11.0.0",
"illuminate/console": "^11.0.8",
"illuminate/container": "^11.0.8",
"illuminate/contracts": "^11.0.8",
"illuminate/support": "^11.0.8",
"symfony/deprecation-contracts": "^3.0.0",
"symfony/filesystem": "^6.3.0|^7.0.0",
"symfony/filesystem": "^7.0.0",
"symfony/polyfill-php83": "^1.28"
},
"require-dev": {
"phpunit/phpunit": "^10.1.0|^11.0.0",
"phpunit/phpunit": "^10.5.0|^11.0.0",
"lastdragon-ru/lara-asp-testing": "self.version",
"mockery/mockery": "^1.6.5",
"orchestra/testbench": "^8.0.0|^9.0.0"
"orchestra/testbench": "^9.0.0"
},
"autoload": {
"psr-4": {
Expand Down
3 changes: 1 addition & 2 deletions packages/core/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"requirements": {
"HEAD": {
"laravel/framework": [
"^11.0.0",
"^10.34.0"
"^11.0.8"
],
"php": [
"^8.3",
Expand Down
10 changes: 10 additions & 0 deletions packages/dev/UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ Please also see [changelog](https://github.com/LastDragon-ru/lara-asp/releases)

[//]: # (end: preprocess/aa9fc458898c7c1c)

# Upgrade from v7

[include:file]: ../../docs/Shared/Upgrade/FromV7.md
[//]: # (start: preprocess/c45228918cc92f69)
[//]: # (warning: Generated automatically. Do not edit.)

* [ ] Laravel v10 is not supported anymore. Migrate to the newer version.

[//]: # (end: preprocess/c45228918cc92f69)

# Upgrade from v6

[include:file]: ../../docs/Shared/Upgrade/FromV6.md
Expand Down
8 changes: 4 additions & 4 deletions packages/dev/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@
},
"require": {
"php": "^8.2|^8.3",
"illuminate/contracts": "^10.34.0|^11.0.0",
"illuminate/support": "^10.34.0|^11.0.0",
"illuminate/contracts": "^11.0.8",
"illuminate/support": "^11.0.8",
"larastan/larastan": "^2.8.1",
"lastdragon-ru/lara-asp-core": "self.version",
"lastdragon-ru/lara-asp-documentator": "self.version",
"nikic/php-parser": "^5.0",
"nette/neon": "^3.4",
"phpstan/phpstan": "^1.10",
"symfony/var-dumper": "^6.3.0|^7.0.0"
"symfony/var-dumper": "^7.0.0"
},
"require-dev": {
"phpunit/phpunit": "^10.1.0|^11.0.0"
"phpunit/phpunit": "^10.5.0|^11.0.0"
},
"autoload": {
"psr-4": {
Expand Down
5 changes: 3 additions & 2 deletions packages/documentator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ This package provides various utilities for documentation generation such as Mar
| PHP | `^8.3` | `HEAD ⋯ 5.0.0` |
| | `^8.2` | `HEAD ⋯ 5.0.0-beta.1` |
| | `^8.1` | `6.4.2 ⋯ 5.0.0-beta.1` |
| Laravel | `^11.0.0` | `HEAD ⋯ 6.2.0` |
| | `^10.34.0` | `HEAD ⋯ 6.2.0` |
| Laravel | `^11.0.8` | `HEAD` |
| | `^11.0.0` | `7.0.1 ⋯ 6.2.0` |
| | `^10.34.0` | `7.0.1 ⋯ 6.2.0` |
| | `^10.0.0` | `6.1.0 ⋯ 5.0.0-beta.1` |
| | `^9.21.0` | `5.6.0 ⋯ 5.0.0-beta.1` |

Expand Down
10 changes: 10 additions & 0 deletions packages/documentator/UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ Please also see [changelog](https://github.com/LastDragon-ru/lara-asp/releases)

[//]: # (end: preprocess/aa9fc458898c7c1c)

# Upgrade from v7

[include:file]: ../../docs/Shared/Upgrade/FromV7.md
[//]: # (start: preprocess/c45228918cc92f69)
[//]: # (warning: Generated automatically. Do not edit.)

* [ ] Laravel v10 is not supported anymore. Migrate to the newer version.

[//]: # (end: preprocess/c45228918cc92f69)

# Upgrade from v6

[include:file]: ../../docs/Shared/Upgrade/FromV6.md
Expand Down
20 changes: 10 additions & 10 deletions packages/documentator/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@
"ext-intl": "*",
"ext-mbstring": "*",
"composer/semver": "^3.2",
"illuminate/contracts": "^10.34.0|^11.0.0",
"illuminate/console": "^10.34.0|^11.0.0",
"illuminate/process": "^10.34.0|^11.0.0",
"illuminate/support": "^10.34.0|^11.0.0",
"illuminate/contracts": "^11.0.8",
"illuminate/console": "^11.0.8",
"illuminate/process": "^11.0.8",
"illuminate/support": "^11.0.8",
"league/commonmark": "^2.5.1",
"league/config": "^1.1.1",
"nikic/php-parser": "^5.0",
"phpstan/phpdoc-parser": "^1.25",
"symfony/console": "^6.3.0|^7.0.0",
"symfony/console": "^7.0.0",
"symfony/deprecation-contracts": "^3.0.0",
"symfony/filesystem": "^6.3.0|^7.0.0",
"symfony/finder": "^6.3.0|^7.0.0",
"symfony/filesystem": "^7.0.0",
"symfony/finder": "^7.0.0",
"symfony/polyfill-php83": "^1.28",
"symfony/serializer": "^6.4.0|^7.0.0",
"symfony/serializer": "^7.0.0",
"lastdragon-ru/lara-asp-core": "self.version",
"lastdragon-ru/lara-asp-formatter": "self.version",
"lastdragon-ru/lara-asp-graphql-printer": "self.version",
Expand All @@ -45,8 +45,8 @@
"require-dev": {
"lastdragon-ru/lara-asp-testing": "self.version",
"mockery/mockery": "^1.6.5",
"orchestra/testbench": "^8.0.0|^9.0.0",
"phpunit/phpunit": "^10.1.0|^11.0.0",
"orchestra/testbench": "^9.0.0",
"phpunit/phpunit": "^10.5.0|^11.0.0",
"webonyx/graphql-php": "^15.4.0"
},
"autoload": {
Expand Down
3 changes: 1 addition & 2 deletions packages/documentator/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"requirements": {
"HEAD": {
"laravel/framework": [
"^11.0.0",
"^10.34.0"
"^11.0.8"
],
"php": [
"^8.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

namespace LastDragon_ru\LaraASP\Documentator\Processor\Tasks\Preprocess\Instructions\IncludeArtisan;

use Composer\InstalledVersions;
use Composer\Semver\VersionParser;
use Illuminate\Contracts\Console\Kernel;
use LastDragon_ru\LaraASP\Core\Application\ApplicationResolver;
use LastDragon_ru\LaraASP\Core\Path\DirectoryPath;
Expand Down Expand Up @@ -42,25 +40,21 @@ public function testInvoke(): void {
$instance = $this->app()->make(Instruction::class);

$this->override(Kernel::class, static function (MockInterface $mock) use ($command, $expected): void {
if (InstalledVersions::satisfies(new VersionParser(), 'illuminate/contracts', '^11.0.0')) {
// todo(documentator): Remove after https://github.com/LastDragon-ru/lara-asp/issues/143
$mock
->shouldReceive('addCommands')
->atLeast()
->once()
->andReturns();
$mock
->shouldReceive('addCommandPaths')
->atLeast()
->once()
->andReturns();
$mock
->shouldReceive('addCommandRoutePaths')
->atLeast()
->once()
->andReturns();
}

$mock
->shouldReceive('addCommands')
->atLeast()
->once()
->andReturns();
$mock
->shouldReceive('addCommandPaths')
->atLeast()
->once()
->andReturns();
$mock
->shouldReceive('addCommandRoutePaths')
->atLeast()
->once()
->andReturns();
$mock
->shouldReceive('handle')
->withArgs(
Expand Down Expand Up @@ -96,25 +90,21 @@ public function getDestination(): string {
$instance = $this->app()->make(Instruction::class);

$this->override(Kernel::class, static function (MockInterface $mock) use ($command): void {
// todo(documentator): Remove after https://github.com/LastDragon-ru/lara-asp/issues/143
if (InstalledVersions::satisfies(new VersionParser(), 'illuminate/contracts', '^11.0.0')) {
$mock
->shouldReceive('addCommands')
->atLeast()
->once()
->andReturns();
$mock
->shouldReceive('addCommandPaths')
->atLeast()
->once()
->andReturns();
$mock
->shouldReceive('addCommandRoutePaths')
->atLeast()
->once()
->andReturns();
}

$mock
->shouldReceive('addCommands')
->atLeast()
->once()
->andReturns();
$mock
->shouldReceive('addCommandPaths')
->atLeast()
->once()
->andReturns();
$mock
->shouldReceive('addCommandRoutePaths')
->atLeast()
->once()
->andReturns();
$mock
->shouldReceive('handle')
->withArgs(
Expand Down
Loading

0 comments on commit d4f4f3f

Please sign in to comment.