Skip to content

Commit 884e717

Browse files
Support for Laravel 10 (#598)
1 parent a33d942 commit 884e717

File tree

229 files changed

+467
-2225
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

229 files changed

+467
-2225
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,13 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
php-version: [8.0, 8.1]
20-
19+
php-version: ['8.1', '8.2']
2120
os: [ubuntu-latest, windows-latest, macos-latest]
22-
2321
dependencies: [locked]
24-
2522
experimental: [false]
2623

2724
name: PHP ${{ matrix.php-version }} - ${{ matrix.os }}
28-
2925
runs-on: ${{ matrix.os }}
30-
3126
continue-on-error: ${{ matrix.experimental }}
3227

3328
steps:

.github/workflows/demo.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414

1515
services:
1616
mysql:
17-
image: mysql:5.7
17+
image: mysql:8.0
1818
env:
1919
MYSQL_ALLOW_EMPTY_PASSWORD: yes
2020
MYSQL_DATABASE: laravel
@@ -25,8 +25,8 @@ jobs:
2525
strategy:
2626
fail-fast: false
2727
matrix:
28-
php-version: [8.0, 8.1]
29-
laravel-version: [9]
28+
php-version: ['8.1', '8.2']
29+
laravel-version: [10]
3030
os: [ubuntu-latest]
3131

3232
runs-on: ${{ matrix.os }}

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- name: Setup PHP
1313
uses: shivammathur/setup-php@v2
1414
with:
15-
php-version: '8.0'
15+
php-version: '8.1'
1616
tools: phplint, laravel/pint
1717
- name: Check syntax
1818
run: phplint .

UPGRADE.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Upgrade Guide
22

3+
## Upgrading from 2.x to 2.6
4+
Version 2.6 was a minor release to add support for Laravel 10. This adopts the latest conventions from Laravel, most notably the addition of type-hints in code.
5+
6+
The only other change is the removal of `use_return_types` configuration, as this is now Blueprint's default behavior.
7+
8+
Inline with Blueprint's [Support Policy](https://github.com/laravel-shift/blueprint#support-policy), this release also drops support for Laravel 9. If you are still running Laravel 9, you may constrain your Blueprint version to `2.5.0`.
9+
310
## Upgrading from 1.x to 2.x
411
Version 2.x was a superficial major release to reflect Blueprint's new [Support Policy](https://github.com/laravel-shift/blueprint#support-policy). There were no changes to the underlying grammar. A few configuration options and methods were changed. Additional notes are below. You may view the full set of changes in [#496](https://github.com/laravel-shift/blueprint/pull/496).
512

composer.json

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,20 @@
22
"name": "laravel-shift/blueprint",
33
"type": "library",
44
"description": "An expressive, human readable code generation tool.",
5-
"keywords": [
6-
"framework",
7-
"laravel"
8-
],
5+
"keywords": ["framework", "laravel", "code generation"],
96
"license": "MIT",
107
"require": {
118
"doctrine/dbal": "^3.3",
12-
"illuminate/console": "^9.0|^10.0",
13-
"illuminate/filesystem": "^9.0|^10.0",
14-
"illuminate/support": "^9.0|^10.0",
9+
"illuminate/console": "^10.0",
10+
"illuminate/filesystem": "^10.0",
11+
"illuminate/support": "^10.0",
1512
"laravel-shift/faker-registry": "^0.2.0",
16-
"symfony/yaml": "^6.0"
13+
"symfony/yaml": "^6.3"
1714
},
1815
"require-dev": {
1916
"laravel/pint": "^1.2",
2017
"mockery/mockery": "^1.4.4",
21-
"orchestra/testbench": "^7.0|^8.0",
18+
"orchestra/testbench": "^8.0",
2219
"phpunit/phpunit": "^9.5.10"
2320
},
2421
"suggest": {

config/blueprint.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -87,19 +87,6 @@
8787
*/
8888
'fake_nullables' => true,
8989

90-
/*
91-
|--------------------------------------------------------------------------
92-
| Method Return Type Declarations
93-
|--------------------------------------------------------------------------
94-
|
95-
| Enable or disable method return typehinting for blueprint generated
96-
| methods. Enabling this will enforce code strictness which increases
97-
| readability of code and will lower maintenance cost. This will only
98-
| Work for projects running PHP v7.0 or higher.
99-
|
100-
*/
101-
'use_return_types' => false,
102-
10390
/*
10491
|--------------------------------------------------------------------------
10592
| Use Guarded

src/Blueprint.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,6 @@ public static function appPath()
3030
return str_replace('\\', '/', config('blueprint.app_path'));
3131
}
3232

33-
public static function useReturnTypeHints()
34-
{
35-
return boolval(config('blueprint.use_return_types'));
36-
}
37-
3833
public function parse($content, $strip_dashes = true)
3934
{
4035
$content = str_replace(["\r\n", "\r"], "\n", $content);

src/Commands/BuildCommand.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ class BuildCommand extends Command
3636
/** @var Builder */
3737
private $builder;
3838

39-
/**
40-
* @param Filesystem $filesystem
41-
* @param Builder $builder
42-
*/
4339
public function __construct(Filesystem $filesystem, Builder $builder)
4440
{
4541
parent::__construct();

src/Commands/NewCommand.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ class NewCommand extends Command
2727
/** @var Filesystem */
2828
protected $filesystem;
2929

30-
/**
31-
* @param Filesystem $filesystem
32-
*/
3330
public function __construct(Filesystem $filesystem)
3431
{
3532
parent::__construct();

src/Commands/TraceCommand.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ class TraceCommand extends Command
3232
/** @var Tracer */
3333
private $tracer;
3434

35-
/**
36-
* @param Filesystem $filesystem
37-
* @param Tracer $tracer
38-
*/
3935
public function __construct(Filesystem $filesystem, Tracer $tracer)
4036
{
4137
parent::__construct();

0 commit comments

Comments
 (0)