Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.7] make model factory after method signatures more consistent #23670

Closed
wants to merge 82 commits into from

Conversation

unstoppablecarl
Copy link
Contributor

This does some "breaking" cleanup for #23551

vinkla and others added 26 commits March 10, 2018 17:40
[5.7] Update suggestion constraints
…ravel#23485)

* Make MessageBag constructor behaviour consistent with `add`

Addresses laravel/ideas#56 and the (long-closed) laravel#13196.

This change in constructor behaviour aims to bring consistency with the
public `add` method on the MessageBag class, which would prevent
duplicate values in any given MessageBag's key.

* update test to show consistency of behaviour
current Blade functionality allows the user to define a default value if the first value is not set.

`{{ $name or 'Andrew' }}`

This feature was added in an early version of Laravel to be a shorthand for

`isset($name) ? $name : 'Andrew'`

PHP7 has introduced the null coalesce operator (`??`) which performs this exact functionality.

`$name ?? 'Andrew'`

While the 'or' feature was good when it was needed, it could produce unexpected results when the characters 'or' appeared anywhere in the Blade expression.  This was solved with extensive regex, but was still somewhat error prone.

Now that Laravel requires PHP 7.1, we can utilize the null coalesce operator and remove the 'or' feature. User upgrade process will be a find and replace, and the number of characters will be identical.

```
{{ $name or 'Andrew' }}
{{ $name ?? 'Andrew' }}
```
Currently, jobs scheduled via console scheduling can not specify a connection to dispatch that job onto. They can specify a queue.
This PR adds an optional connection parameter to the end of the job function.
[5.7] Fixed phpdoc of the schedule class
…aravel#23619)

* Update various blade array_ calls to use fully qualified Arr helper

* Fix tests
* Be in line with Flysystem contract

* Be in line with Flysystem
(cherry picked from commit 273b7fc)
@taylorotwell taylorotwell changed the base branch from master to 5.6 March 23, 2018 14:21
@taylorotwell
Copy link
Member

Please send to 5.6 branch. I haven't tagged this stuff yet so it's not breaking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet