{"id":371607,"date":"2024-05-21T04:52:36","date_gmt":"2024-05-21T04:52:36","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=371607"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=371607","title":{"rendered":"<span>PHP \u0438 Laravel \u0434\u0430\u0439\u0434\u0436\u0435\u0441\u0442 \u043d\u043e\u0432\u043e\u0441\u0442\u0435\u0439 \u0437\u0430 \u0444\u0435\u0432\u0440\u0430\u043b\u044c 2024 \u0433\u043e\u0434\u0430<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u041a\u0440\u0430\u0442\u043a\u0438\u0439 \u043e\u0431\u0437\u043e\u0440 \u043d\u043e\u0432\u043e\u0441\u0442\u0435\u0439 \u0438\u0437 \u043c\u0438\u0440\u0430 PHP \u0438\u00a0<a href=\"https:\/\/learn.cutcode.dev\/\" rel=\"noopener noreferrer nofollow\">Laravel<\/a> \u0437\u0430 \u0444\u0435\u0432\u0440\u0430\u043b\u044c 2024 \u0433\u043e\u0434\u0430 \u043e\u0442 <a href=\"https:\/\/cutcode.dev\/\" rel=\"noopener noreferrer nofollow\">CutCode<\/a>.<\/p>\n<h2>PHP \u0414\u0430\u0439\u0434\u0436\u0435\u0441\u0442<\/h2>\n<p><strong>\u0412\u044b\u0448\u043b\u0438<\/strong> <a href=\"https:\/\/www.php.net\/ChangeLog-8.php#8.2.16\" rel=\"noopener noreferrer nofollow\"><strong>PHP 8.2.16<\/strong><\/a><strong> \u0438 <\/strong><a href=\"https:\/\/www.php.net\/ChangeLog-8.php#8.3.3\" rel=\"noopener noreferrer nofollow\"><strong>PHP 8.3.3<\/p>\n<p><\/strong><\/a>? \u0412\u044b\u043f\u0443\u0441\u043a\u0438 \u0441 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u043e\u0448\u0438\u0431\u043e\u043a \u0432\u044b\u0448\u043b\u0438 \u043f\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u044e.<\/p>\n<p><a href=\"https:\/\/blog.packagist.com\/composer-2-7-and-cve-2024-24821\/\" rel=\"noopener noreferrer nofollow\"><strong>\u0412\u044b\u0448\u0435\u043b Composer 2.7<\/strong><\/a><\/p>\n<p>\u0412 Composer \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0430 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c CVE-2024-24821, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u043b\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043a\u043e\u0434 \u0438 \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u043b\u0430 \u044d\u0441\u043a\u0430\u043b\u0430\u0446\u0438\u044e \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0439.<\/p>\n<p><a href=\"https:\/\/phpcommunity.ru\/2023-php\" rel=\"noopener noreferrer nofollow\"><strong>\u0418\u0442\u043e\u0433\u0438 \u0435\u0436\u0435\u0433\u043e\u0434\u043d\u043e\u0433\u043e \u043e\u043f\u0440\u043e\u0441\u0430 PHP-\u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430<\/p>\n<p><\/strong><\/a>\u041e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u044b \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0437\u0430 2023 \u0433\u043e\u0434.<\/p>\n<p>\u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043d\u043e\u0432\u043e\u0441\u0442\u0435\u0439 \u044f\u0434\u0440\u0430 PHP \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u0441\u0432\u0435\u0449\u0430\u044e\u0442\u0441\u044f \u0432 \u0441\u0435\u0440\u0438\u0438 <a href=\"https:\/\/thephp.foundation\/blog\/tag\/roundup\/\" rel=\"noopener noreferrer nofollow\"><strong>PHP Core Roundup<\/strong><\/a> \u043e\u0442 PHP Foundation, \u043c\u044b \u043b\u0438\u0448\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u043e \u043d\u0438\u043c \u043f\u0440\u043e\u0431\u0435\u0436\u0438\u043c\u0441\u044f:<\/p>\n<p><a href=\"https:\/\/github.com\/orgs\/ThePHPF\/discussions\/4\" rel=\"noopener noreferrer nofollow\"><strong>\u0414\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f PHP Foundation!<\/p>\n<p><\/strong><\/a>PHP Foundation \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f \u043a\u0430\u043a \u043f\u0440\u044f\u043c\u043e\u0439 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430 \u043e \u0431\u043e\u043b\u0435\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0439 \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 \u0434\u043b\u044f \u043e\u0431\u0449\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043c\u044b\u0441\u043b\u044f\u043c\u0438 \u0438 \u0438\u0434\u0435\u044f\u043c\u0438 \u0431\u0435\u0437 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u043f\u0438\u0441\u043a\u043e\u0432 \u0440\u0430\u0441\u0441\u044b\u043b\u043e\u043a PHP. \u0418\u0434\u0435\u0438 \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043d\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c.<\/p>\n<p>\u041d\u0435 \u0441\u0442\u0435\u0441\u043d\u044f\u0439\u0442\u0435\u0441\u044c \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0443 \u0444\u043e\u043d\u0434\u0430 \u0438\u043b\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c.<\/p>\n<p><strong>? <\/strong><a href=\"https:\/\/wiki.php.net\/rfc\/http-last-response-headers\" rel=\"noopener noreferrer nofollow\"><strong>RFC: Add http_(get|clear)_last_response_headers() function<\/p>\n<p><\/strong><\/a>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <code>$http_response_header<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432\u0441\u0435 HTTP-\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u044b \u043f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0447\u0435\u0440\u0435\u0437 HTTP-\u043e\u0431\u0435\u0440\u0442\u043a\u0443.<\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0443\u0436\u0430\u0441\u043d\u043e, $http_response_header \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u043b\u043e\u0441\u044c \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0435\u0449\u0435 \u0432 PHP 8.1, \u043d\u043e \u0438\u0437-\u0437\u0430 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432 \u0431\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e.<\/p>\n<p>Gina Peter Banyard \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u0432\u0435 \u043d\u043e\u0432\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438: <code>http_get_last_response_header()<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0442\u0443 \u0436\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u0447\u0442\u043e \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <code>$http_response_header<\/code>, \u0438 <code>http_clear_last_response_header()<\/code> \u0434\u043b\u044f \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432.<\/p>\n<p><strong>?<\/strong><a href=\"https:\/\/wiki.php.net\/rfc\/mb_ucfirst\" rel=\"noopener noreferrer nofollow\"><strong>RFC: Multibyte for ucfirst, lcfirst functions, mb_ucfirst mb_lcfirst<\/p>\n<p><\/strong><\/a>RFC \u043f\u0435\u0440\u0435\u0448\u0435\u043b \u043d\u0430 \u0441\u0442\u0430\u0434\u0438\u044e \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u043e Tim Starling \u0437\u0430\u043c\u0435\u0442\u0438\u043b, \u0447\u0442\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430, \u0430 \u043d\u0435 \u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440.<\/p>\n<p>Yuya Hamada \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u044d\u0442\u043e \u0443\u0442\u043e\u0447\u043d\u0435\u043d\u0438\u0435 \u0432 RFC, \u043d\u043e \u0438\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f RFC \u0432\u0435\u0440\u043d\u0443\u043b\u0441\u044f \u043d\u0430 \u0441\u0442\u0430\u0434\u0438\u044e \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f, \u0438 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u043e \u0437\u0430\u043d\u043e\u0432\u043e.<\/p>\n<p><strong>? <\/strong><a href=\"https:\/\/wiki.php.net\/rfc\/curl-oop\" rel=\"noopener noreferrer nofollow\"><strong>RFC: Add OOP methods to Curl objects<\/strong><\/p>\n<p><\/a>\u0421\u0435\u0439\u0447\u0430\u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u044b cURL \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0435\u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0430\u0437\u043e\u0432\u044b\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 libcurl \u0438 \u043d\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 API \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0430\u0432\u0442\u043e\u0440\u0430\u043c\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432.<\/p>\n<p>Sara Golemon \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u041e\u041e\u041f-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u0432 \u043c\u043e\u0434\u0443\u043b\u044c cURL \u0438 \u0447\u0435\u0442\u044b\u0440\u0435 \u043d\u043e\u0432\u044b\u0445 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f.<\/p>\n<pre><code>try {\u00a0\u00a0     (new \\CurlHandle)->setOpt(YOUR_VOTE, true)->exec(); } catch (\\CurlHandleException $ex) {     assert(false); }<\/code><\/pre>\n<p><strong>\u274c <\/strong><a href=\"https:\/\/wiki.php.net\/rfc\/final_by_default_anonymous_classes\" rel=\"noopener noreferrer nofollow\"><strong>RFC: Final by default anonymous classes<\/strong><\/a><\/p>\n<p><strong>\u2705 <\/strong><a href=\"https:\/\/wiki.php.net\/rfc\/rfc1867-non-post\" rel=\"noopener noreferrer nofollow\"><strong>RFC: RFC1867 for non-POST HTTP verbs<\/strong><\/p>\n<p><\/a>\u041d\u043e\u0432\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>request_parse_body()<\/code>, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u044b \u0434\u043b\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 PUT \u0438 PATCH, \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 PHP 8.4.<\/p>\n<h2>Laravel \u0434\u0430\u0439\u0434\u0436\u0435\u0441\u0442  <\/h2>\n<h4>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f Laravel<\/h4>\n<p><strong>10.43. Add support for streamed JSON Response<\/strong><\/p>\n<p><a href=\"https:\/\/github.com\/laravel\/framework\/pull\/49873#issue-2103868933\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/laravel\/framework\/pull\/49873#issue-2103868933<\/a><\/p>\n<p>\u042d\u0442\u043e\u0442 PR \u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u0435\u0442 response. \u041f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 streamed json response, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u044b\u043b\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u0432 Symphony \u0432\u0435\u0440\u0441\u0438\u0438 6.3. \u0422\u0435\u043f\u0435\u0440\u044c \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0438 \u0432 Laravel \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 10.43. \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 Stream json \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u0432\u0438\u0434\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430.\u00a0<\/p>\n<pre><code>&lt;?php  namespace App\\Http\\Controllers;  use Generator;  use App\\Models\\User;  class ExampleController extends Controller  { \u00a0\u00a0\u00a0\u00a0public function index() \u00a0\u00a0\u00a0\u00a0{ \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0return response()->streamJson([ \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'users' => $this->yieldUsers(), \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0]); \u00a0\u00a0\u00a0\u00a0} \u00a0\u00a0\u00a0\u00a0protected function yieldUsers(): Generator \u00a0\u00a0\u00a0\u00a0{ \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0foreach (User::query()->cursor() as $user) { \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0yield $user; \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0} \u00a0\u00a0\u00a0\u00a0} }<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u043e\u0439 \u043d\u0435 \u043e\u0431\u043e\u0448\u043b\u043e \u0438 \u0442\u0435\u0441\u0442\u044b. \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u043c\u0435\u0442\u043e\u0434 <code>assertStreamedJsonContent<\/code>.\u00a0<\/p>\n<pre><code>$response->assertStreamedJsonContent([ \u00a0\u00a0\u00a0\u00a0'data' => [ \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0['id' => 1], \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0['id' => 2], \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0['id' => 3], \u00a0\u00a0\u00a0\u00a0], ]);<\/code><\/pre>\n<h2>10.43. Add insertOrIgnoreUsing for Eloquent<\/h2>\n<p><a href=\"https:\/\/github.com\/laravel\/framework\/pull\/49827\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/laravel\/framework\/pull\/49827<\/a><\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 PR \u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u0435\u0442 Eloquent &#8212; \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 <code>insertOrIgnoreUsing<\/code>. \u0423 \u043d\u0430\u0441 \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u0431\u044b\u043b \u043c\u0435\u0442\u043e\u0434 <code>insertOrIgnore<\/code>, \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0435\u0439, \u043d\u043e \u0435\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u0441 \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u043e\u043c, \u0437\u0430\u043f\u0438\u0441\u044c \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0430\u0441\u044c. \u041c\u044b \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u0438 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438. \u0422\u0430\u043a\u0436\u0435 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <code>InsertUsing<\/code> \u0441 \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u0438 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0442\u0430\u043a\u0436\u0435 \u043d\u043e\u0432\u044b\u0439 <code>insertOrIgnoreUsing<\/code> &#8212; \u0441\u043c\u0435\u0441\u044c \u044d\u0442\u0438\u0445 \u0434\u0432\u0443\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432. \u0418\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u043c \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u044b \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441.\u00a0<\/p>\n<h2>10.43. Make hasIndex() Order-sensitive<\/h2>\n<p><a href=\"https:\/\/github.com\/laravel\/framework\/pull\/49840\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/laravel\/framework\/pull\/49840<\/a><\/p>\n<p>\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u044d\u0442\u043e\u043c\u0443 PR \u0443 scema \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 <code>hasIndex<\/code> \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430. \u0412\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e, \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u0430\u0445\u0430\u0440.\u00a0<\/p>\n<h2>10.43. Add storage:unlink command<\/h2>\n<p><a href=\"https:\/\/github.com\/laravel\/framework\/pull\/49795\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/laravel\/framework\/pull\/49795<\/a><\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 PR \u043e\u0442 \u043d\u0430\u0448\u0435\u0433\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430. \u041a\u0441\u0442\u0430\u0442\u0438 \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044f \u043f\u043e\u043c\u043d\u044e \u043e\u043d \u0434\u0430\u0436\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u043d\u0430\u0448\u0435\u043c Telegram-\u0447\u0430\u0442\u0435, <a href=\"https:\/\/t.me\/laravel_chat\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u043c\u044c\u044e\u043d\u0438\u0442\u0438 CutCode<\/a>, \u043a\u0443\u0434\u0430 \u0438 \u0412\u0430\u0441 \u0432\u0441\u0435\u0445 \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u044e. \u0410 PR \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u043e\u0432\u0443\u044e \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0443 \u043d\u0430\u0441 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 symlink storage.\u00a0<\/p>\n<pre><code>php artisan storage:unlink<\/code><\/pre>\n<p>\u041d\u0430\u043f\u043e\u043c\u043d\u044e \u0447\u0442\u043e \u0431\u044b\u043b <code>storage:link<\/code>, \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0438 <code>storage:unlink<\/code>.<\/p>\n<h2>10.44. Add Collection::select() method<\/h2>\n<p><a href=\"https:\/\/github.com\/laravel\/framework\/pull\/49845\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/laravel\/framework\/pull\/49845<\/a><\/p>\n<p>PR \u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u0435\u0442 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 &#8212; \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043c\u0435\u0442\u043e\u0434 <code>Select<\/code>, \u00a0\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u044e\u0447\u0435\u0439 \u0438\u0437 \u043c\u043d\u043e\u0433\u043e\u043c\u0435\u0440\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430. \u0420\u0430\u043d\u044c\u0448\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 <code>Map<\/code>, \u0447\u0435\u0440\u0435\u0437 <code>Only<\/code> \u0438 \u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435.\u00a0<\/p>\n<pre><code>$users = $users->map(function ($user) {  \u00a0\u00a0return collect($user)->only(['id', 'name', 'email']);  });<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0436\u0435 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434-\u043e\u0431\u0451\u0440\u0442\u043a\u0430 <code>Select<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0438 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u043d\u0430\u043c \u0432\u0440\u0435\u043c\u044f:<\/p>\n<pre><code>$users->select('id', 'name', 'email'])<\/code><\/pre>\n<h2>10.44. Add toBase64() and fromBase64() methods to Stringable and Str classes<\/h2>\n<p><a href=\"https:\/\/github.com\/laravel\/framework\/pull\/49984\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/laravel\/framework\/pull\/49984<\/a><\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 PR \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0432 \u043a\u043b\u0430\u0441\u0441\u044b \u043f\u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0441\u043e \u0441\u0442\u0440\u043e\u043a\u0430\u043c\u0438 \u0434\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430 <code>toBase64()<\/code> \u0438 <code>fromBase64()<\/code>. \u0427\u0442\u043e\u0431\u044b \u0431\u044b\u0441\u0442\u0440\u043e \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 base64.\u00a0<\/p>\n<pre><code>return Str::toBase64('foobar');<\/code><\/pre>\n<h2>10.44. Introduce new Arr::take() helper<\/h2>\n<p><a href=\"https:\/\/github.com\/laravel\/framework\/pull\/50015\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/laravel\/framework\/pull\/50015<\/a><\/p>\n<p>\u0414\u043e \u044d\u0442\u043e\u0433\u043e PR \u0443 \u043d\u0430\u0441 \u0432 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f\u0445 \u0431\u044b\u043b \u043c\u0435\u0442\u043e\u0434 <code>take(<\/code>), \u043e\u0431\u0435\u0440\u0442\u043a\u0430 \u043d\u0430\u0434 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u043c <code>array_slice()<\/code>. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u0441 \u0432\u0430\u043c\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 <code>take()<\/code> \u0438 \u0432 \u0441\u0430\u043f\u043f\u043e\u0440\u0442-\u043a\u043b\u0430\u0441\u0441\u0435 \u043f\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u043c.<\/p>\n<h2>10.44. Introduce Observe attribute for models<\/h2>\n<p><a href=\"https:\/\/github.com\/laravel\/framework\/pull\/49843\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/laravel\/framework\/pull\/49843<\/a><\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0432\u0430 PR, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0441\u043a\u043e\u043f\u0430\u043c\u0438 \u0438 \u043e\u0431\u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c\u0438 \u0447\u0435\u0440\u0435\u0437 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b. \u041a\u0442\u043e \u0436\u0434\u0430\u043b \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u0432 Laravel, \u0432\u043e\u0442 \u043e\u043d\u0438, \u043f\u043e\u0442\u0438\u0445\u043e\u043d\u044c\u043a\u0443 \u0434\u043e\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0438 \u0434\u043e \u043d\u0435\u0433\u043e. \u0412 Laravel 11 \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044f \u0432\u0438\u0434\u0435\u043b, \u0438\u0445 \u0431\u0443\u0434\u0435\u0442 \u0435\u0449\u0451 \u0431\u043e\u043b\u044c\u0448\u0435.\u00a0<\/p>\n<p>\u0410\u0442\u0440\u0438\u0431\u0443\u0442 <code>Observe<\/code>, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u041e\u0431\u0441\u0435\u0440\u0432\u0435\u0440-\u043a\u043b\u0430\u0441\u0441\u044b. \u041c\u043e\u0436\u0435\u043c \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432 \u0432\u0438\u0434\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0438 \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043b\u0438\u0431\u043e \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0430\u0439\u043d\u043e\u0432, \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0435 \u043d\u0430\u0440\u0443\u0448\u0430\u0435\u0442\u0441\u044f. \u0427\u0435\u0440\u0435\u0437 \u043c\u0435\u0442\u043e\u0434 <code>Boot<\/code> \u0438\u0445 \u0432\u0441\u0451 \u0435\u0449\u0451 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c:\u00a0<\/p>\n<pre><code>#[Observe(UserObserver::class)] class User extends Authenticatable { \u00a0\u00a0\u00a0\u00a0\/\/ }<\/code><\/pre>\n<h2>10.44. Add ScopedBy attribute for models<\/h2>\n<p><a href=\"https:\/\/github.com\/laravel\/framework\/pull\/50034\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/laravel\/framework\/pull\/50034<\/a><\/p>\n<p>\u0421\u043d\u043e\u0432\u0430 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u0438 \u0437\u0434\u0435\u0441\u044c \u0443\u0436\u0435 \u043f\u043e \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u043c \u0441\u043a\u043e\u043f\u0430\u043c. \u041f\u0440\u043e\u0441\u0442\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0443 Eloquent-\u043c\u043e\u0434\u0435\u043b\u0438, \u0442\u0430\u043a \u0436\u0435 \u043a\u0430\u043a \u0438 <code>Observe<\/code>:<\/p>\n<pre><code>#[ScopedBy(AncientScope::class)] class User extends Model { \u00a0\u00a0\u00a0\u00a0\/\/ }<\/code><\/pre>\n<p>\u041c\u043e\u0436\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432 \u0432\u0438\u0434\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0438 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u043d\u0435 \u043d\u0430\u0440\u0443\u0448\u0430\u0435\u0442\u0441\u044f.\u00a0<\/p>\n<pre><code>#[ScopedBy([FirstScope::class, SecondScope::class])]<\/code><\/pre>\n<p>\u0427\u0435\u0440\u0435\u0437 Boot-\u043c\u0435\u0442\u043e\u0434 \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e.<\/p>\n<h3>\u0412\u0438\u0434\u0435\u043e \u0432\u0435\u0440\u0441\u0438\u044f \u0434\u0430\u0439\u0434\u0436\u0435\u0441\u0442\u0430<\/h3>\n<p>\u042d\u0442\u0438 \u0436\u0435 <a href=\"https:\/\/cutcode.dev\/articles\/php-i-laravel-daidzest-novostei-za-fevral-2024-goda\" rel=\"noopener noreferrer nofollow\">\u043d\u043e\u0432\u043e\u0441\u0442\u0438 <\/a>\u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0432\u0438\u0434\u0435\u043e \u043e\u0442\u00a0CutCode:<\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/65fdb72b87bb36d4b369d60b\" data-style=\"\" id=\"65fdb72b87bb36d4b369d60b\" width=\"\"><\/div>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/802343\/\"> https:\/\/habr.com\/ru\/articles\/802343\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u041a\u0440\u0430\u0442\u043a\u0438\u0439 \u043e\u0431\u0437\u043e\u0440 \u043d\u043e\u0432\u043e\u0441\u0442\u0435\u0439 \u0438\u0437 \u043c\u0438\u0440\u0430 PHP \u0438\u00a0<a href=\"https:\/\/learn.cutcode.dev\/\" rel=\"noopener noreferrer nofollow\">Laravel<\/a> \u0437\u0430 \u0444\u0435\u0432\u0440\u0430\u043b\u044c 2024 \u0433\u043e\u0434\u0430 \u043e\u0442 <a href=\"https:\/\/cutcode.dev\/\" rel=\"noopener noreferrer nofollow\">CutCode<\/a>.<\/p>\n<h2>PHP \u0414\u0430\u0439\u0434\u0436\u0435\u0441\u0442<\/h2>\n<p><strong>\u0412\u044b\u0448\u043b\u0438<\/strong> <a href=\"https:\/\/www.php.net\/ChangeLog-8.php#8.2.16\" rel=\"noopener noreferrer nofollow\"><strong>PHP 8.2.16<\/strong><\/a><strong> \u0438 <\/strong><a href=\"https:\/\/www.php.net\/ChangeLog-8.php#8.3.3\" rel=\"noopener noreferrer nofollow\"><strong>PHP 8.3.3<\/p>\n<p><\/strong><\/a>? \u0412\u044b\u043f\u0443\u0441\u043a\u0438 \u0441 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u043e\u0448\u0438\u0431\u043e\u043a \u0432\u044b\u0448\u043b\u0438 \u043f\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u044e.<\/p>\n<p><a href=\"https:\/\/blog.packagist.com\/composer-2-7-and-cve-2024-24821\/\" rel=\"noopener noreferrer nofollow\"><strong>\u0412\u044b\u0448\u0435\u043b Composer 2.7<\/strong><\/a><\/p>\n<p>\u0412 Composer \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0430 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c CVE-2024-24821, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u043b\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043a\u043e\u0434 \u0438 \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u043b\u0430 \u044d\u0441\u043a\u0430\u043b\u0430\u0446\u0438\u044e \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0439.<\/p>\n<p><a href=\"https:\/\/phpcommunity.ru\/2023-php\" rel=\"noopener noreferrer nofollow\"><strong>\u0418\u0442\u043e\u0433\u0438 \u0435\u0436\u0435\u0433\u043e\u0434\u043d\u043e\u0433\u043e \u043e\u043f\u0440\u043e\u0441\u0430 PHP-\u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430<\/p>\n<p><\/strong><\/a>\u041e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u044b \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0437\u0430 2023 \u0433\u043e\u0434.<\/p>\n<p>\u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043d\u043e\u0432\u043e\u0441\u0442\u0435\u0439 \u044f\u0434\u0440\u0430 PHP \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u0441\u0432\u0435\u0449\u0430\u044e\u0442\u0441\u044f \u0432 \u0441\u0435\u0440\u0438\u0438 <a href=\"https:\/\/thephp.foundation\/blog\/tag\/roundup\/\" rel=\"noopener noreferrer nofollow\"><strong>PHP Core Roundup<\/strong><\/a> \u043e\u0442 PHP Foundation, \u043c\u044b \u043b\u0438\u0448\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u043e \u043d\u0438\u043c \u043f\u0440\u043e\u0431\u0435\u0436\u0438\u043c\u0441\u044f:<\/p>\n<p><a href=\"https:\/\/github.com\/orgs\/ThePHPF\/discussions\/4\" rel=\"noopener noreferrer nofollow\"><strong>\u0414\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f PHP Foundation!<\/p>\n<p><\/strong><\/a>PHP Foundation \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f \u043a\u0430\u043a \u043f\u0440\u044f\u043c\u043e\u0439 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430 \u043e \u0431\u043e\u043b\u0435\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0439 \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 \u0434\u043b\u044f \u043e\u0431\u0449\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043c\u044b\u0441\u043b\u044f\u043c\u0438 \u0438 \u0438\u0434\u0435\u044f\u043c\u0438 \u0431\u0435\u0437 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u043f\u0438\u0441\u043a\u043e\u0432 \u0440\u0430\u0441\u0441\u044b\u043b\u043e\u043a PHP. \u0418\u0434\u0435\u0438 \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043d\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c.<\/p>\n<p>\u041d\u0435 \u0441\u0442\u0435\u0441\u043d\u044f\u0439\u0442\u0435\u0441\u044c \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0443 \u0444\u043e\u043d\u0434\u0430 \u0438\u043b\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c.<\/p>\n<p><strong>? <\/strong><a href=\"https:\/\/wiki.php.net\/rfc\/http-last-response-headers\" rel=\"noopener noreferrer nofollow\"><strong>RFC: Add http_(get|clear)_last_response_headers() function<\/p>\n<p><\/strong><\/a>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <code>$http_response_header<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432\u0441\u0435 HTTP-\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u044b \u043f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0447\u0435\u0440\u0435\u0437 HTTP-\u043e\u0431\u0435\u0440\u0442\u043a\u0443.<\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0443\u0436\u0430\u0441\u043d\u043e, $http_response_header \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u043b\u043e\u0441\u044c \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0435\u0449\u0435 \u0432 PHP 8.1, \u043d\u043e \u0438\u0437-\u0437\u0430 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432 \u0431\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e.<\/p>\n<p>Gina Peter Banyard \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u0432\u0435 \u043d\u043e\u0432\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438: <code>http_get_last_response_header()<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0442\u0443 \u0436\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u0447\u0442\u043e \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <code>$http_response_header<\/code>, \u0438 <code>http_clear_last_response_header()<\/code> \u0434\u043b\u044f \u043e\u0447\u0438\u0441\u0442\u043a\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432.<\/p>\n<p><strong>?<\/strong><a href=\"https:\/\/wiki.php.net\/rfc\/mb_ucfirst\" rel=\"noopener noreferrer nofollow\"><strong>RFC: Multibyte for ucfirst, lcfirst functions, mb_ucfirst mb_lcfirst<\/p>\n<p><\/strong><\/a>RFC \u043f\u0435\u0440\u0435\u0448\u0435\u043b \u043d\u0430 \u0441\u0442\u0430\u0434\u0438\u044e \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u043e Tim Starling \u0437\u0430\u043c\u0435\u0442\u0438\u043b, \u0447\u0442\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430, \u0430 \u043d\u0435 \u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440.<\/p>\n<p>Yuya Hamada \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u044d\u0442\u043e \u0443\u0442\u043e\u0447\u043d\u0435\u043d\u0438\u0435 \u0432 RFC, \u043d\u043e \u0438\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f RFC \u0432\u0435\u0440\u043d\u0443\u043b\u0441\u044f \u043d\u0430 \u0441\u0442\u0430\u0434\u0438\u044e \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f, \u0438 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u043e \u0437\u0430\u043d\u043e\u0432\u043e.<\/p>\n<p><strong>? <\/strong><a href=\"https:\/\/wiki.php.net\/rfc\/curl-oop\" rel=\"noopener noreferrer nofollow\"><strong>RFC: Add OOP methods to Curl objects<\/strong><\/p>\n<p><\/a>\u0421\u0435\u0439\u0447\u0430\u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u044b cURL \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0435\u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0430\u0437\u043e\u0432\u044b\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 libcurl \u0438 \u043d\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 API \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0430\u0432\u0442\u043e\u0440\u0430\u043c\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432.<\/p>\n<p>Sara Golemon \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u041e\u041e\u041f-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b \u0432 \u043c\u043e\u0434\u0443\u043b\u044c cURL \u0438 \u0447\u0435\u0442\u044b\u0440\u0435 \u043d\u043e\u0432\u044b\u0445 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f.<\/p>\n<pre><code>try {\u00a0\u00a0     (new \\CurlHandle)->setOpt(YOUR_VOTE, true)->exec(); } catch (\\CurlHandleException $ex) {     assert(false); }<\/code><\/pre>\n<p><strong>\u274c <\/strong><a href=\"https:\/\/wiki.php.net\/rfc\/final_by_default_anonymous_classes\" rel=\"noopener noreferrer nofollow\"><strong>RFC: Final by default anonymous classes<\/strong><\/a><\/p>\n<p><strong>\u2705 <\/strong><a href=\"https:\/\/wiki.php.net\/rfc\/rfc1867-non-post\" rel=\"noopener noreferrer nofollow\"><strong>RFC: RFC1867 for non-POST HTTP verbs<\/strong><\/p>\n<p><\/a>\u041d\u043e\u0432\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>request_parse_body()<\/code>, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u044b \u0434\u043b\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 PUT \u0438 PATCH, \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 PHP 8.4.<\/p>\n<h2>Laravel \u0434\u0430\u0439\u0434\u0436\u0435\u0441\u0442  <\/h2>\n<h4>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f Laravel<\/h4>\n<p><strong>10.43. Add support for streamed JSON Response<\/strong><\/p>\n<p><a href=\"https:\/\/github.com\/laravel\/framework\/pull\/49873#issue-2103868933\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/laravel\/framework\/pull\/49873#issue-2103868933<\/a><\/p>\n<p>\u042d\u0442\u043e\u0442 PR \u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u0435\u0442 response. \u041f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 streamed json response, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u044b\u043b\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u0432 Symphony \u0432\u0435\u0440\u0441\u0438\u0438 6.3. \u0422\u0435\u043f\u0435\u0440\u044c \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0438 \u0432 Laravel \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 10.43. \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 Stream json \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u0432\u0438\u0434\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430.\u00a0<\/p>\n<pre><code>&lt;?php  namespace App\\Http\\Controllers;  use Generator;  use App\\Models\\User;  class ExampleController extends Controller  { \u00a0\u00a0\u00a0\u00a0public function index() \u00a0\u00a0\u00a0\u00a0{ \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0return response()->streamJson([ \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'users' => $this->yieldUsers(), \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0]); \u00a0\u00a0\u00a0\u00a0} \u00a0\u00a0\u00a0\u00a0protected function yieldUsers(): Generator \u00a0\u00a0\u00a0\u00a0{ \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0foreach (User::query()->cursor() as $user) { \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0yield $user; \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0} \u00a0\u00a0\u00a0\u00a0} }<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u043e\u0439 \u043d\u0435 \u043e\u0431\u043e\u0448\u043b\u043e \u0438 \u0442\u0435\u0441\u0442\u044b. \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u043c\u0435\u0442\u043e\u0434 <code>assertStreamedJsonContent<\/code>.\u00a0<\/p>\n<pre><code>$response->assertStreamedJsonContent([ \u00a0\u00a0\u00a0\u00a0'data' => [ \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0['id' => 1], \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0['id' => 2], \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0['id' => 3], \u00a0\u00a0\u00a0\u00a0], ]);<\/code><\/pre>\n<h2>10.43. Add insertOrIgnoreUsing for Eloquent<\/h2>\n<p><a href=\"https:\/\/github.com\/laravel\/framework\/pull\/49827\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/laravel\/framework\/pull\/49827<\/a><\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 PR \u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u0435\u0442 Eloquent &#8212; \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 <code>insertOrIgnoreUsing<\/code>. \u0423 \u043d\u0430\u0441 \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u0431\u044b\u043b \u043c\u0435\u0442\u043e\u0434 <code>insertOrIgnore<\/code>, \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0435\u0439, \u043d\u043e \u0435\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u0441 \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u043e\u043c, \u0437\u0430\u043f\u0438\u0441\u044c \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0430\u0441\u044c. \u041c\u044b \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u0438 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438. \u0422\u0430\u043a\u0436\u0435 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <code>InsertUsing<\/code> \u0441 \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u0438 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0442\u0430\u043a\u0436\u0435 \u043d\u043e\u0432\u044b\u0439 <code>insertOrIgnoreUsing<\/code> &#8212; \u0441\u043c\u0435\u0441\u044c \u044d\u0442\u0438\u0445 \u0434\u0432\u0443\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432. \u0418\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u043c \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u044b \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441.\u00a0<\/p>\n<h2>10.43. Make hasIndex() Order-sensitive<\/h2>\n<p><a href=\"https:\/\/github.com\/laravel\/framework\/pull\/49840\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/laravel\/framework\/pull\/49840<\/a><\/p>\n<p>\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u044d\u0442\u043e\u043c\u0443 PR \u0443 scema \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 <code>hasIndex<\/code> \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430. \u0412\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e, \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u0430\u0445\u0430\u0440.\u00a0<\/p>\n<h2>10.43. Add storage:unlink command<\/h2>\n<p><a href=\"https:\/\/github.com\/laravel\/framework\/pull\/49795\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/laravel\/framework\/pull\/49795<\/a><\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 PR \u043e\u0442 \u043d\u0430\u0448\u0435\u0433\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430. \u041a\u0441\u0442\u0430\u0442\u0438 \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044f \u043f\u043e\u043c\u043d\u044e \u043e\u043d \u0434\u0430\u0436\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u043d\u0430\u0448\u0435\u043c Telegram-\u0447\u0430\u0442\u0435, <a href=\"https:\/\/t.me\/laravel_chat\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u043c\u044c\u044e\u043d\u0438\u0442\u0438 CutCode<\/a>, \u043a\u0443\u0434\u0430 \u0438 \u0412\u0430\u0441 \u0432\u0441\u0435\u0445 \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u044e. \u0410 PR \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u043e\u0432\u0443\u044e \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0443 \u043d\u0430\u0441 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 symlink storage.\u00a0<\/p>\n<pre><code>php artisan storage:unlink<\/code><\/pre>\n<p>\u041d\u0430\u043f\u043e\u043c\u043d\u044e \u0447\u0442\u043e \u0431\u044b\u043b <code>storage:link<\/code>, \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0438 <code>storage:unlink<\/code>.<\/p>\n<h2>10.44. Add Collection::select() method<\/h2>\n<p><a href=\"https:\/\/github.com\/laravel\/framework\/pull\/49845\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/laravel\/framework\/pull\/49845<\/a><\/p>\n<p>PR \u0437\u0430\u0442\u0440\u0430\u0433\u0438\u0432\u0430\u0435\u0442 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 &#8212; \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043c\u0435\u0442\u043e\u0434 <code>Select<\/code>, \u00a0\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u044e\u0447\u0435\u0439 \u0438\u0437 \u043c\u043d\u043e\u0433\u043e\u043c\u0435\u0440\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430. \u0420\u0430\u043d\u044c\u0448\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 <code>Map<\/code>, \u0447\u0435\u0440\u0435\u0437 <code>Only<\/code> \u0438 \u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435.\u00a0<\/p>\n<pre><code>$users = $users->map(function ($user) {  \u00a0\u00a0return collect($user)->only(['id', 'name', 'email']);  });<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0436\u0435 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434-\u043e\u0431\u0451\u0440\u0442\u043a\u0430 <code>Select<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0438 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u043d\u0430\u043c \u0432\u0440\u0435\u043c\u044f:<\/p>\n<pre><code>$users->select('id', 'name', 'email'])<\/code><\/pre>\n<h2>10.44. Add toBase64() and fromBase64() methods to Stringable and Str classes<\/h2>\n<p><a href=\"https:\/\/github.com\/laravel\/framework\/pull\/49984\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/laravel\/framework\/pull\/49984<\/a><\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 PR \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0432 \u043a\u043b\u0430\u0441\u0441\u044b \u043f\u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0441\u043e \u0441\u0442\u0440\u043e\u043a\u0430\u043c\u0438 \u0434\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430 <code>toBase64()<\/code> \u0438 <code>fromBase64()<\/code>. \u0427\u0442\u043e\u0431\u044b \u0431\u044b\u0441\u0442\u0440\u043e \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 base64.\u00a0<\/p>\n<pre><code>return Str::toBase64('foobar');<\/code><\/pre>\n<h2>10.44. Introduce new Arr::take() helper<\/h2>\n<p><a href=\"https:\/\/github.com\/laravel\/framework\/pull\/50015\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/laravel\/framework\/pull\/50015<\/a><\/p>\n<p>\u0414\u043e \u044d\u0442\u043e\u0433\u043e PR \u0443 \u043d\u0430\u0441 \u0432 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f\u0445 \u0431\u044b\u043b \u043c\u0435\u0442\u043e\u0434 <code>take(<\/code>), \u043e\u0431\u0435\u0440\u0442\u043a\u0430 \u043d\u0430\u0434 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u043c <code>array_slice()<\/code>. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u0441 \u0432\u0430\u043c\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 <code>take()<\/code> \u0438 \u0432 \u0441\u0430\u043f\u043f\u043e\u0440\u0442-\u043a\u043b\u0430\u0441\u0441\u0435 \u043f\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u043c.<\/p>\n<h2>10.44. Introduce Observe attribute for models<\/h2>\n<p><a href=\"https:\/\/github.com\/laravel\/framework\/pull\/49843\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/laravel\/framework\/pull\/49843<\/a><\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0432\u0430 PR, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0441\u043a\u043e\u043f\u0430\u043c\u0438 \u0438 \u043e\u0431\u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c\u0438 \u0447\u0435\u0440\u0435\u0437 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b. \u041a\u0442\u043e \u0436\u0434\u0430\u043b \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u0432 Laravel, \u0432\u043e\u0442 \u043e\u043d\u0438, \u043f\u043e\u0442\u0438\u0445\u043e\u043d\u044c\u043a\u0443 \u0434\u043e\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0438 \u0434\u043e \u043d\u0435\u0433\u043e. \u0412 Laravel 11 \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044f \u0432\u0438\u0434\u0435\u043b, \u0438\u0445 \u0431\u0443\u0434\u0435\u0442 \u0435\u0449\u0451 \u0431\u043e\u043b\u044c\u0448\u0435.\u00a0<\/p>\n<p>\u0410\u0442\u0440\u0438\u0431\u0443\u0442 <code>Observe<\/code>, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u041e\u0431\u0441\u0435\u0440\u0432\u0435\u0440-\u043a\u043b\u0430\u0441\u0441\u044b. \u041c\u043e\u0436\u0435\u043c \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432 \u0432\u0438\u0434\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0438 \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043b\u0438\u0431\u043e \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0430\u0439\u043d\u043e\u0432, \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0435 \u043d\u0430\u0440\u0443\u0448\u0430\u0435\u0442\u0441\u044f. \u0427\u0435\u0440\u0435\u0437 \u043c\u0435\u0442\u043e\u0434 <code>Boot<\/code> \u0438\u0445 \u0432\u0441\u0451 \u0435\u0449\u0451 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c:\u00a0<\/p>\n<pre><code>#[Observe(UserObserver::class)] class User extends Authenticatable { \u00a0\u00a0\u00a0\u00a0\/\/ }<\/code><\/pre>\n<h2>10.44. Add ScopedBy attribute for models<\/h2>\n<p><a href=\"https:\/\/github.com\/laravel\/framework\/pull\/50034\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/laravel\/framework\/pull\/50034<\/a><\/p>\n<p>\u0421\u043d\u043e\u0432\u0430 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u0438 \u0437\u0434\u0435\u0441\u044c \u0443\u0436\u0435 \u043f\u043e \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u043c \u0441\u043a\u043e\u043f\u0430\u043c. \u041f\u0440\u043e\u0441\u0442\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0443 Eloquent-\u043c\u043e\u0434\u0435\u043b\u0438, \u0442\u0430\u043a \u0436\u0435 \u043a\u0430\u043a \u0438 <code>Observe<\/code>:<\/p>\n<pre><code>#[ScopedBy(AncientScope::class)] class User extends Model { \u00a0\u00a0\u00a0\u00a0\/\/ }<\/code><\/pre>\n<p>\u041c\u043e\u0436\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432 \u0432\u0438\u0434\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0438 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u043d\u0435 \u043d\u0430\u0440\u0443\u0448\u0430\u0435\u0442\u0441\u044f.\u00a0<\/p>\n<pre><code>#[ScopedBy([FirstScope::class, SecondScope::class])]<\/code><\/pre>\n<p>\u0427\u0435\u0440\u0435\u0437 Boot-\u043c\u0435\u0442\u043e\u0434 \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e.<\/p>\n<h3>\u0412\u0438\u0434\u0435\u043e \u0432\u0435\u0440\u0441\u0438\u044f \u0434\u0430\u0439\u0434\u0436\u0435\u0441\u0442\u0430<\/h3>\n<p>\u042d\u0442\u0438 \u0436\u0435 <a href=\"https:\/\/cutcode.dev\/articles\/php-i-laravel-daidzest-novostei-za-fevral-2024-goda\" rel=\"noopener noreferrer nofollow\">\u043d\u043e\u0432\u043e\u0441\u0442\u0438 <\/a>\u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0432\u0438\u0434\u0435\u043e \u043e\u0442\u00a0CutCode:<\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/65fdb72b87bb36d4b369d60b\" data-style=\"\" id=\"65fdb72b87bb36d4b369d60b\" width=\"\"><\/div>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/802343\/\"> https:\/\/habr.com\/ru\/articles\/802343\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-371607","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/371607","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=371607"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/371607\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=371607"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=371607"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=371607"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}