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

Rename ApiSerializer's mutate to attributes #2578

Merged
merged 2 commits into from
Feb 5, 2021

Conversation

SychO9
Copy link
Member

@SychO9 SychO9 commented Jan 27, 2021

Part of #1891

Confirmed

  • Backend changes: tests are green (run composer test).

Required changes:

  • Related documentation PR: (Remove if irrelevant)

src/Extend/ApiSerializer.php Outdated Show resolved Hide resolved
@SychO9 SychO9 force-pushed the sm/apiserializer-extender-mutate-to-attributes branch from 1bb0845 to f6a8c37 Compare January 30, 2021 16:09
src/Extend/ApiSerializer.php Outdated Show resolved Hide resolved
@SychO9 SychO9 force-pushed the sm/apiserializer-extender-mutate-to-attributes branch from c39edea to 247f89e Compare February 4, 2021 16:23
@@ -67,13 +67,35 @@ public function attribute(string $name, $callback)
*
* @return self
*/
public function mutate($callback)
public function attributes($callback)
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

I just realized, we need to deprecate the mutate method, since that was released in the previous version

Copy link
Member Author

Choose a reason for hiding this comment

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

it is deprecated, look below this code

Copy link
Sponsor Member

Choose a reason for hiding this comment

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

I.... don't know how I missed that... What.... 🙈

@@ -67,13 +67,35 @@ public function attribute(string $name, $callback)
*
* @return self
*/
public function mutate($callback)
public function attributes($callback)
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

I.... don't know how I missed that... What.... 🙈

@askvortsov1 askvortsov1 merged commit 0595aba into master Feb 5, 2021
@askvortsov1 askvortsov1 deleted the sm/apiserializer-extender-mutate-to-attributes branch February 5, 2021 18:21
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