Laravel 11.12版本发布 - Artisan的`make`命令自动剪切`.php `扩展
Laravel  /  管理员 发布于 8个月前   520
本周,Laravel团队发布了v11.12,其中包括一个乘法收集方法,
在make命令中自动截断.php扩展名等等。
传递命令时剪切PHP扩展(v11.11.1)
Jason McCreary在传递.php来生成用于控制器、事件、命令等的文件的:
*命令时,贡献了一个很好的DX功能。
除了Laravel现在在幕后处理.php扩展名外,没有什么变化:
php artisan make:controller UserController.php
# Before - app/Http/Controllers/UserController.php.php
# After - app/Http/Controllers/UserController.php
当你不小心这样做时会很痛苦,因为你必须移动文件或删除文件并重新创建所有内容。
目前尚不清楚该命令是否会在键入时切断扩展名,
所以这对一些隐藏的痛苦来说是一个很好的解决办法——至少对我来说是这样;)
将multiply()方法添加到集合中
https://www.youtube.com/embed/AWvXjUnUdw8
Patrick O'Meara为集合贡献了一个multiply()方法,该方法将集合中的项目相乘。
它的工作原理是将集合上的现有值乘以x次:
$c = collect([
['name' => 'User #1', 'email' => '[email protected]'],
['name' => 'User #2', 'email' => '[email protected]'],
])->multiply(2);
调用multiply(2)后,上面的集合看起来如下:
向事件服务提供程序添加事件发现路径
@如果需要动态添加其他事件发现路径,Jascha向事件服务提供程序提供了
一个addEventDiscoveryPaths()方法。
通常不需要此功能,但您可以通过以下方式实现:
use Illuminate\Foundation\Support\Providers\EventServiceProvider;
EventServiceProvider::addEventDiscoveryPaths('/some/path/to/events');
EventServiceProvider::addEventDiscoveryPaths([
'/some/path',
'/another/path'
]);
发布说明
您可以在下面看到新功能和更新的完整列表,以及GitHub上11.11.0和11.12.0之间的差异。
以下发行说明直接来自变更日志:
https://github.com/laravel/framework/compare/v11.11.0...v11.12.0
https://github.com/laravel/framework/blob/72c872e4883644947a10680e87a8b89cb65f84f1/CHANGELOG.md#v11120---2024-06-25
11.12.0
[10.x]修复@zds-s在createSesTransport方法返回注释中的拼写错误https://github.com/laravel/framework/pull/51688
[10.x]修复@faissaloux在https://github.com/laravel/framework/pull/51686
[10.x]在中通过@faissaloux将Enumerable unless()$回调参数设置为可选https://github.com/laravel/framework/pull/51701
由@taylorotwell在中还原“[10.x]将Enumerable unless()$回调参数设为可选”https://github.com/laravel/framework/pull/51707
[10.x]修复了在中@crynobone无法将另一个命令作为command类的初始化实例调用的问题https://github.com/laravel/framework/pull/51824
[10.x]修复了@Treggats在中对空集合的句柄shift()https://github.com/laravel/framework/pull/51841
[10.x]确保模式:只有当迁移表由@NickSdot在https://github.com/laravel/framework/pull/51827
[11.x]@crynobone在测试中的改进https://github.com/laravel/framework/pull/51847
[11.x]在中使用@seriquynh测试应用程序存储路径https://github.com/laravel/framework/pull/51848
[11.x]通过@joshuaruesweg修复PHP_MAXPATHLEN对比PHP_MAXPACHLEN稍小的字符串的检查https://github.com/laravel/framework/pull/51850
[11.x]改进@macbookandrew在https://github.com/laravel/framework/pull/51846
[11.x]通过@chu121su12更新错误页面以显示GEThttps://github.com/laravel/framework/pull/51837
[11.x]通过@osbre在异常呈现器中删除弃用的类型属性https://github.com/laravel/framework/pull/51866
[11.x]通过@osbre在异常模板中导入类https://github.com/laravel/framework/pull/51863
[11.x]@bert-w在优化前后的收集https://github.com/laravel/framework/pull/51876
[11.x]通过@patrickomeara将乘法添加到集合中https://github.com/laravel/framework/pull/51870
[11.x]通过@ya cha在EventServiceProvider中添加addEventDiscoveryPathshttps://github.com/laravel/framework/pull/51896
[11.x]通过@owenandrews修复翻译为空或缺失时的验证属性https://github.com/laravel/framework/pull/51890
[11.x]壮举:通过@calebdw在tap()助手中添加泛型https://github.com/laravel/framework/pull/51881
v11.11.1
[11.x]通过@seriquynh删除无用的变量赋值https://github.com/laravel/framework/pull/51838
[11.x]修复了@axlon在缓存存储库中键入事件调度器的问题https://github.com/laravel/framework/pull/51835
在@jasonmccreary中传递PHP扩展名以生成命令时,将其切碎https://github.com/laravel/framework/pull/51842
[11.x]通过@osbre在getNameInput中简化.php扩展的截断https://github.com/laravel/framework/pull/51843
[11.x]修复:通过@calebdw在https://github.com/laravel/framework/pull/51845
还原“[11.x]更改afterCreation和afterMaking回调的范围”,作者@driesvints inhttps://github.com/laravel/framework/pull/51858
转:
https://laravel-news.com/laravel-11-12-0
123 在
Clash for Windows作者删库跑路了,github已404中评论 按理说只要你在国内,所有的流量进出都在监控范围内,不管你怎么隐藏也没用,想搞你分..原梓番博客 在
在Laravel框架中使用模型Model分表最简单的方法中评论 好久好久都没看友情链接申请了,今天刚看,已经添加。..博主 在
佛跳墙vpn软件不会用?上不了网?佛跳墙vpn常见问题以及解决办法中评论 @1111老铁这个不行了,可以看看近期评论的其他文章..1111 在
佛跳墙vpn软件不会用?上不了网?佛跳墙vpn常见问题以及解决办法中评论 网站不能打开,博主百忙中能否发个APP下载链接,佛跳墙或极光..路人 在
php中使用hyperf框架调用讯飞星火大模型实现国内版chatgpt功能示例中评论 教程很详细,如果加个前端chatgpt对话页面就完美了..
Copyright·© 2019 侯体宗版权所有·
粤ICP备20027696号