Skip to content

Commit d0ae794

Browse files
committed
Document some 5.8 breaking changes
1 parent 64ca31b commit d0ae794

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed

upgrade.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,18 @@ The `addContextualBinding` method [was added to the `Illuminate\Contracts\Contai
101101

102102
The `flush` method [was added to the `Illuminate\Contracts\Container\Container` contract](https://github.com/laravel/framework/pull/26477). If you are implementing this interface, you should add this method to your implementation.
103103

104+
#### The `tagged` Method
105+
106+
**Likelihood Of Impact: Very Low**
107+
108+
The `tagged` method signature [has been changed](https://github.com/laravel/framework/pull/26953) and it now returns an `iterable` instead of an `array`. If you have type-hinted in your code some parameter which gets the return value of this method with `array` you'll have to modify the type-hint to `iterable`.
109+
110+
#### The `resolve` Method
111+
112+
**Likelihood Of Impact: Very Low**
113+
114+
The `resolve` method [now accepts](https://github.com/laravel/framework/pull/27066) a new boolean parameter which indicates whether events (resolving callbacks) should be raised/executed during the instantiation of an object. If you are overriding this method, you should update the method signature to match its parent.
115+
104116
### Database
105117

106118
#### Unquoted MySQL JSON Values
@@ -141,6 +153,14 @@ A `loadCount` method has been added to the base `Illuminate\Database\Eloquent\Mo
141153

142154
The `originalIsEquivalent` method of the `Illuminate\Database\Eloquent\Concerns\HasAttributes` trait [has been changed](https://github.com/laravel/framework/pull/26391) from `protected` to `public`.
143155

156+
#### Automatic Casting Of `deleted_at` Property For Soft-Deleted Models
157+
158+
**Likelihood Of Impact: Very Low**
159+
160+
The `deleted_at` property [will now be automatically casted](https://github.com/laravel/framework/pull/26985) to a `Carbon` instance when your Eloquent model uses the `Illuminate\Database\Eloquent\SoftDeletes` trait. You can override this behavior by writing your custom accessor for that property or by manually adding it to the `casts` attribute:
161+
162+
protected $casts = ['deleted_at' => 'string'];
163+
144164
### Events
145165

146166
#### The `fire` Method
@@ -180,6 +200,28 @@ The `renderHttpException` method signature of the `Illuminate\Foundation\Excepti
180200

181201
The `getFacadeAccessor` method may now [only return the string value representing the container identifier of the service](https://github.com/laravel/framework/pull/25525). Previously, this method may have returned an object instance.
182202

203+
### Mail
204+
205+
#### Method Signature Changes In The `PendingMail` Class
206+
207+
**Likelihood Of Impact: Very Low**
208+
209+
The `send`, `sendNow`, `queue`, `later` and `fill` methods of the `Illuminate\Mail\PendingMail` class [have been changed](https://github.com/laravel/framework/pull/26790) to accept an `Illuminate\Contracts\Mail\Mailable` instance instead of `Illuminate\Mail\Mailable`. If you are overriding some of these methods, you should update their signature to match its parent.
210+
211+
#### Method Name Change In The `Markdown` Class
212+
213+
**Likelihood Of Impact: Very Low**
214+
215+
The `markdownComponentPaths` method [has been renamed](https://github.com/laravel/framework/pull/26938) to `textComponentPaths`. If you are overriding this method, you should update the method name to match its parent.
216+
217+
### Queue
218+
219+
#### The `Job` Contract
220+
221+
**Likelihood Of Impact: Very Low**
222+
223+
The `isReleased`, `hasFailed` and `markAsFailed` methods [have been added to the `Illuminate\Contracts\Queue\Job` contract](https://github.com/laravel/framework/pull/26908). If you are implementing this interface, you should add these methods to your implementation.
224+
183225
### Requests
184226

185227
#### The `TransformsRequest` Middleware
@@ -227,6 +269,20 @@ The `$cachedSchema` property name (which has been deprecated in Laravel `5.7`) o
227269

228270
The session persistence logic has been [moved from the `terminate()` method to the `handle()` method](https://github.com/laravel/framework/pull/26410). If you are overriding one or both of these methods, you should update them to reflect these changes.
229271

272+
### Support
273+
274+
#### The `array_*` And `str_*` Global Helpers Deprecation
275+
276+
**Likelihood Of Impact: Medium**
277+
278+
All `array_*` and `str_*` global helpers [have been deprecated](https://github.com/laravel/framework/pull/26898) and will be removed in Laravel 5.9. You should use the `Illuminate\Support\Arr` and `Illuminate\Support\Str` methods directly.
279+
280+
#### Deferred Service Providers
281+
282+
**Likelihood Of Impact: Medium**
283+
284+
The `defer` boolean property on the service provider which is/was used to indicate if a provider is deferred [has been deprecated](https://github.com/laravel/framework/pull/27067). In order to mark the service provider as deferred it should implement the `Illuminate\Contracts\Support\DeferrableProvider` contract.
285+
230286
### Validation
231287

232288
#### The `Validator` Contract
@@ -270,6 +326,14 @@ The email validation rule now checks if the email is [RFC5630](https://tools.iet
270326

271327
Therefore, when using Laravel 5.8, emails that were previously incorrectly considered invalid will now be considered valid (e.g `hej@bär.se`). Generally, this should be considered a bug fix; however, it is listed as a breaking change out of caution. [Please let us know if you encounter any issues surrounding this change](https://github.com/laravel/framework/pull/26503).
272328

329+
### View
330+
331+
#### The `getData` Method
332+
333+
**Likelihood Of Impact: Very Low**
334+
335+
The `getData` method [was added to the `Illuminate\Contracts\View\View` contract](https://github.com/laravel/framework/pull/26754). If you are implementing this interface, you should add this method to your implementation.
336+
273337
### Notifications
274338

275339
#### Nexmo / Slack Notification Channels

0 commit comments

Comments
 (0)