Laravel v11.15.0 Released is released today with a great number of minor updates. But the crown jewel is the "Enhance database migrations" PR created by Hafez Divandari. After a long discussion, they decided to add this update to the framework.
In his own words.
Summarized List of changes
- All the changes are about modifying tables and nothing has changed when creating tables.
- When adding or modifying columns, we were compiling all the changed columns at once, then compiling all the added columns and then compiling other commands. But we are now compiling each command one by one and in order.
- Some commands were not supported by SQLite, and we need to recreate the table in order to apply these commands. The "alter commands" will be added to list of Blueprint commands whenever needed. The new BlueprintState class helps us keep the current state of the table to be able to recreate it.
Ask About View Next To Name For Create Mail Command
This update will let you create a mail without arguments like php artisan make:mail
by asking about views
as well.
Improvements server log (v11.14.0)
Initially, if the request time was less than 1 second, it showed 0s, which is inaccurate. Thanks to Seth Phat, we get accurate time in ms if the request takes less than a second.
Support for Markdown extensions to the Stringable class (v11.14.0)
In the Laravel v11.13.0 Release, Tony Lea made an update in Str::markdown method. This Update is on the top of that update. Contributed by Luke Downing now extensions can also be used in str method.
$html = str('# My Heading')->markdown(extensions: [new HeadingPermalinksExtension()]);
More about laravel 11.14.0 release
Number::pairs (v11.13.0)
This function was contributed by hotmeteor
$output = Number::pairs(25, 10);
// the first parameter is maximum and second parameter is window.
// [[1, 10], [11, 20], [21, 25]]
// the default offset is 1 but can be changed to 0
$output = Number::pairs(25, 10, 0);
// [[0, 10], [10, 20], [20, 25]]
$output = Number::pairs(10, 2.5, 0)
// [[0, 2.5], [2.5, 5.0], [5.0, 7.5], [7.5, 10.0]]
Str::chopStart and Str::chopEnd (v11.13.0)
These functions were contributed by timacdonald
Str::chopEnd('path/to/file.php', '.php');
// "path/to/file"
Str::chopStart('https://laravel.com', ['https://', 'http://']);
// laravel.com
Add Support for Extensions in Str::markdown (v11.13.0)
The support for commonmark extensions has been added to Str:markdown method by tnylea
public function parseMarkdownFromFile($file_location){
$markdown_contents = File::get($file_location);
$html = Str::markdown($markdown_contents, [], [
new AttributesExtension(),
new TaskListExtension(),
]);
return $html;
}
More about laravel 11.13.0 release
v11.15.0
- [10.x] Set previous exception on
HttpResponseException
by @hafezdivandari in #51986 - [11.x] feat: add generics to Eloquent Builder and Relations by @calebdw in #51851
- add phpstan assertions to Collection isEmpty and isNotEmpty by @johanrosenson in #51998
- [11.x] Add support for mime types in Resend mail transport by @jayanratna in #52006
- [11.x] feat: add virtual methods to SoftDeletes trait by @calebdw in #52001
- [11.x] Fix service container docblock by @seriquynh in #52000
- [10.x] Fix Http::retry so that throw is respected for call signature Http::retry([1,2], throw: false) by @paulyoungnb in #52002
- [10.x] Set application_name and character set as PostgreSQL DSN string by @sunaoka in #51985
- [11.x] Fix GeneratorCommand docblock by @seriquynh in #52014
- [11.x] Enhance database migrations by @hafezdivandari in #51373
- [11.x] Run MySQL 9 Database Integration Tests nightly by @Jubeki in #52027
- [11.x] Enhance doc blocks of the Migrator class by @imanghafoori1 in #52033
- [11.x] Use nullsafe operator for event dispatcher by @seriquynh in #52024
- [11.x] Fix PasswordBroker constructor docblock by @seriquynh in #52023
- [11.x] Add test
testMultiplyIsLazy
to ensure LazyCollection'smultiply
method's lazy behaviour by @lmottasin in #52020 - [11.x] Allow
MultipleInstanceManager
to have studly creators by @cosmastech in #52030 - [11.x] Adds
$config
property toMultipleInstanceManager
by @cosmastech in #52028 - [11.x] fix: findOr and firstOr generics by @calebdw in #52037
- [11.x] Make
Router
Tappable
by @mabdullahsari in #52051 - [11.x] feat: improve Factory generics, add generics to HasFactory by @calebdw in #52005
- [11.x] Ask About View Next To Name For Create Mail Command by @christophrumpel in #52057
- [11.x] Added @throws docblock for
block
method forLockTimeoutException
by @siarheipashkevich in #52063