Skip to content

[8.x] Modify mergeCasts to return $this #35676

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

Closed
wants to merge 2 commits into from
Closed

[8.x] Modify mergeCasts to return $this #35676

wants to merge 2 commits into from

Conversation

finagin
Copy link
Contributor

@finagin finagin commented Dec 19, 2020

This change helpful to use the method in pipeline like this:

    public function initializeUsesUuid()
    {
        $this
            ->setKeyName('uuid')
            ->setKeyType('string')
            ->setIncrementing(false)
            ->mergeCasts([$this->getKeyName() => $this->getKeyType()])
            ->mergeGuarded([$this->getKeyName()]);
    }

@GrahamCampbell
Copy link
Member

Please send to master, since this is a BC break (making a public method return something where it was void before in a non-final class).

@driesvints
Copy link
Member

@GrahamCampbell this isn't a breaking change

@finagin finagin changed the title Returns self after merge casts [8.x] Modify mergeCasts to return $this Dec 21, 2020
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.

3 participants