Skip to content

Prevent cloning generator when instanciating previous_data - #2990

Merged
dunglas merged 1 commit into
api-platform:2.4from
nitneuk:fix-previous_data
Aug 19, 2019
Merged

Prevent cloning generator when instanciating previous_data#2990
dunglas merged 1 commit into
api-platform:2.4from
nitneuk:fix-previous_data

Conversation

@nitneuk

@nitneuknitneuk commented Aug 19, 2019

Copy link
Copy Markdown
Contributor
QA
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets
LicenseMIT
Doc PRapi-platform/docs#858

Add a clone trait with a method clone that returns a clone of the given variable if cloneable.
Inspired by @alanpoulain from #2978

Comment threadsrc/Util/CloneTrait.php Outdated
Comment threadsrc/Util/CloneTrait.php Outdated
Comment threadsrc/Util/CloneTrait.php Outdated
@dunglas
dunglas merged commit ee4bf84 into api-platform:2.4Aug 19, 2019
@dunglas

Copy link
Copy Markdown
Member

Thanks @Nitneuk2

@alanpoulain

Copy link
Copy Markdown
Member

Shouldn't the ItemResolver use the trait too?

@dunglas

Copy link
Copy Markdown
Member

good catch

Sign up for freeto 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

@nitneuk@dunglas@alanpoulain@teohhanhui