Skip to content

[5.6] make model factory after method signatures more consistent#23676

Merged
taylorotwell merged 1 commit into
laravel:5.6from
unstoppablecarl:make-model-factory-after-method-signatures-more-consistent
Mar 23, 2018
Merged

[5.6] make model factory after method signatures more consistent#23676
taylorotwell merged 1 commit into
laravel:5.6from
unstoppablecarl:make-model-factory-after-method-signatures-more-consistent

Conversation

@unstoppablecarl
Copy link
Copy Markdown
Contributor

This does some "breaking" cleanup for #23551

@taylorotwell taylorotwell merged commit 3fd1b23 into laravel:5.6 Mar 23, 2018
* @return $this
*/
public function afterMaking($class, $callback)
public function afterMaking($class, callable $callback, $name = 'default')
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this extra type from the definition. It's a breaking change to the signature.

* @return $this
*/
public function afterMakingState($class, $state, $callback)
public function afterMakingState($class, $state, callable $callback)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

* @return $this
*/
public function afterCreating($class, $callback)
public function afterCreating($class, callable $callback, $name = 'default')
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

etc

* @return $this
*/
public function afterCreatingState($class, $state, $callback)
public function afterCreatingState($class, $state, callable $callback)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to add this, please do it on master.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did and @taylorotwell said to put it here. #23670

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The feature has not been tagged yet so no worries about breaking changes.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, right, good.

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.

4 participants