Skip to content

Commit 8a2cbd6

Browse files
authored
Prepare Laravel v11 (#8570)
1 parent d3e0071 commit 8a2cbd6

File tree

2 files changed

+14
-412
lines changed

2 files changed

+14
-412
lines changed

releases.md

Lines changed: 7 additions & 173 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
- [Versioning Scheme](#versioning-scheme)
44
- [Support Policy](#support-policy)
5-
- [Laravel 10](#laravel-10)
5+
- [Laravel 11](#laravel-11)
66

77
<a name="versioning-scheme"></a>
88
## Versioning Scheme
99

1010
Laravel and its other first-party packages follow [Semantic Versioning](https://semver.org). Major framework releases are released every year (~Q1), while minor and patch releases may be released as often as every week. Minor and patch releases should **never** contain breaking changes.
1111

12-
When referencing the Laravel framework or its components from your application or package, you should always use a version constraint such as `^10.0`, since major releases of Laravel do include breaking changes. However, we strive to always ensure you may update to a new major release in one day or less.
12+
When referencing the Laravel framework or its components from your application or package, you should always use a version constraint such as `^11.0`, since major releases of Laravel do include breaking changes. However, we strive to always ensure you may update to a new major release in one day or less.
1313

1414
<a name="named-arguments"></a>
1515
#### Named Arguments
@@ -26,7 +26,6 @@ For all Laravel releases, bug fixes are provided for 18 months and security fixe
2626

2727
| Version | PHP (*) | Release | Bug Fixes Until | Security Fixes Until |
2828
| --- | --- | --- | --- | --- |
29-
| 8 | 7.3 - 8.1 | September 8th, 2020 | July 26th, 2022 | January 24th, 2023 |
3029
| 9 | 8.0 - 8.2 | February 8th, 2022 | August 8th, 2023 | February 6th, 2024 |
3130
| 10 | 8.1 - 8.2 | Q1 2023 | August 6th, 2024 | February 4th, 2025 |
3231
| 11 | 8.2 | Q1 2024 | August 5th, 2025 | February 3rd, 2026 |
@@ -46,177 +45,12 @@ For all Laravel releases, bug fixes are provided for 18 months and security fixe
4645

4746
(*) Supported PHP versions
4847

49-
<a name="laravel-10"></a>
50-
## Laravel 10
48+
<a name="laravel-11"></a>
49+
## Laravel 11
5150

52-
As you may know, Laravel transitioned to yearly releases with the release of Laravel 8. Previously, major versions were released every 6 months. This transition is intended to ease the maintenance burden on the community and challenge our development team to ship amazing, powerful new features without introducing breaking changes. Therefore, we have shipped a variety of robust features to Laravel 9 without breaking backwards compatibility.
53-
54-
Therefore, this commitment to ship great new features during the current release will likely lead to future "major" releases being primarily used for "maintenance" tasks such as upgrading upstream dependencies, which can be seen in these release notes.
55-
56-
Laravel 10 continues the improvements made in Laravel 9.x by introducing argument and return types to all application skeleton methods, as well as all stub files used to generate classes throughout the framework. In addition, a new, developer-friendly abstraction layer has been introduced for starting and interacting with external processes. Further, Laravel Pennant has been introduced to provide a wonderful approach to managing your application's "feature flags".
51+
To be determined...
5752

5853
<a name="php-8"></a>
59-
### PHP 8.1
60-
61-
Laravel 10.x requires a minimum PHP version of 8.1.
62-
63-
<a name="types"></a>
64-
### Types
65-
66-
_Application skeleton and stub type-hints were contributed by [Nuno Maduro](https://github.com/nunomaduro)_.
67-
68-
On its initial release, Laravel utilized all of the type-hinting features available in PHP at the time. However, many new features have been added to PHP in the subsequent years, including additional primitive type-hints, return types, and union types.
69-
70-
Laravel 10.x thoroughly updates the application skeleton and all stubs utilized by the framework to introduce argument and return types to all method signatures. In addition, extraneous "doc block" type-hint information has been deleted:
71-
72-
```php
73-
<?php
74-
75-
namespace App\Http\Controllers;
76-
77-
use App\Models\Flight;
78-
use Illuminate\Http\RedirectResponse;
79-
use Illuminate\Http\Request;
80-
use Illuminate\Http\Response;
81-
82-
class FlightController extends Controller
83-
{
84-
/**
85-
* Display a listing of the resource.
86-
*/
87-
public function index(): Response
88-
{
89-
//
90-
}
91-
92-
/**
93-
* Display the specified resource.
94-
*/
95-
public function show(Flight $flight): Response
96-
{
97-
//
98-
}
99-
100-
// ...
101-
102-
}
103-
```
104-
105-
This change is entirely backwards compatible with existing applications. Therefore, existing applications that do not have these type-hints will continue to function normally.
106-
107-
<a name="laravel-pennant"></a>
108-
### Laravel Pennant
109-
110-
_Laravel Pennant was developed by [Tim MacDonald](https://github.com/timacdonald)_.
111-
112-
A new first-party package, Laravel Pennant, has been released. Laravel Pennant offers a light-weight, streamlined approach to managing your application's feature flags. Out of the box, Pennant includes an in-memory `array` driver and a `database` driver for persistent feature storage.
113-
114-
Features can be easily defined via the `Feature::define` method:
115-
116-
```php
117-
use Laravel\Pennant\Feature;
118-
use Illuminate\Support\Lottery;
119-
120-
Feature::define('new-onboarding-flow', function () {
121-
return Lottery::odds(1, 10);
122-
});
123-
```
124-
125-
Once a feature has been defined, you may easily determine if the current user has access to the given feature:
126-
127-
```php
128-
if (Feature::active('new-onboarding-flow')) {
129-
// ...
130-
}
131-
```
132-
133-
Of course, for convenience, Blade directives are also available:
134-
135-
```blade
136-
@feature('new-onboarding-flow')
137-
<div>
138-
<!-- ... -->
139-
</div>
140-
@endfeature
141-
```
142-
143-
Pennant offers a variety of more advanced features and APIs. For more information, please consult the [comprehensive Pennant documentation](/docs/{{version}}/pennant).
144-
145-
<a name="process"></a>
146-
### Process Interaction
147-
148-
_The process abstraction layer was contributed by [Nuno Maduro](https://github.com/nunomaduro) and [Taylor Otwell](https://github.com/taylorotwell)_.
149-
150-
Laravel 10.x introduces a beautiful abstraction layer for starting and interacting with external processes via a new `Process` facade:
151-
152-
```php
153-
use Illuminate\Support\Facades\Process;
154-
155-
$result = Process::run('ls -la');
156-
157-
return $result->output();
158-
```
159-
160-
Processes may even be started in pools, allowing for the convenient execution and management of concurrent processes:
161-
162-
```php
163-
use Illuminate\Process\Pool;
164-
use Illuminate\Support\Facades\Pool;
165-
166-
[$first, $second, $third] = Process::concurrently(function (Pool $pool) {
167-
$pool->command('cat first.txt');
168-
$pool->command('cat second.txt');
169-
$pool->command('cat third.txt');
170-
});
171-
172-
return $first->output();
173-
```
174-
175-
In addition, processes may be faked for convenient testing:
176-
177-
```php
178-
Process::fake();
179-
180-
// ...
181-
182-
Process::assertRan('ls -la');
183-
```
184-
185-
For more information on interacting with processes, please consult the [comprehensive process documentation](/docs/{{version}}/processes).
186-
187-
<a name="test-profiling"></a>
188-
### Test Profiling
189-
190-
_Test profiling was contributed by [Nuno Maduro](https://github.com/nunomaduro)_.
191-
192-
The Artisan `test` command has received a new `--profile` option that allows you to easily identify the slowest tests in your application:
193-
194-
```shell
195-
php artisan test --profile
196-
```
197-
198-
For convenience, the slowest tests will be displayed directly within the CLI output:
199-
200-
<p align="center">
201-
<img width="100%" src="https://user-images.githubusercontent.com/5457236/217328439-d8d983ec-d0fc-4cde-93d9-ae5bccf5df14.png"/>
202-
</p>
203-
204-
<a name="pest-scaffolding"></a>
205-
### Pest Scaffolding
206-
207-
New Laravel projects may now be created with Pest test scaffolding by default. To opt-in to this feature, provide the `--pest` flag when creating a new application via the Laravel installer:
208-
209-
```shell
210-
laravel new example-application --pest
211-
```
212-
213-
<a name="generator-cli-prompts"></a>
214-
### Generator CLI Prompts
215-
216-
_Generator CLI prompts were contributed by [Jess Archer](https://github.com/jessarcher)_.
217-
218-
To improve the framework's developer experience, all of Laravel's built-in `make` commands no longer require any input. If the commands are invoked without input, you will be prompted for the required arguments:
54+
### PHP 8.2
21955

220-
```shell
221-
php artisan make:controller
222-
```
56+
Laravel 11.x requires a minimum PHP version of 8.2.

0 commit comments

Comments
 (0)