Skip to content

Add a data persistence layer #1464

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

Merged
merged 2 commits into from
Oct 30, 2017

Conversation

meyerbaptiste
Copy link
Member

@meyerbaptiste meyerbaptiste commented Oct 27, 2017

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #1460 (comment)
License MIT
Doc PR api-platform/docs#518

*/
public function supports($data): bool
{
return (bool) $this->getManager($data);
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't null !== $this->getManager($data) be less weird?

@@ -1,87 +0,0 @@
<?php
Copy link
Member

Choose a reason for hiding this comment

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

We cannot drop it right now (BC promise), this class must be deprecated instead.

Copy link
Member Author

Choose a reason for hiding this comment

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

So should we also keep the definition of the tagged service and depreciate it?

Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure about that because it's a public service so it will always be executed.

/**
* Registers data persisters.
*
* @internal
Copy link
Member

Choose a reason for hiding this comment

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

We'll be able to drop this class when we'll upgrade to DI 3.4: http://symfony.com/blog/new-in-symfony-3-4-simpler-injection-of-tagged-services

@meyerbaptiste meyerbaptiste force-pushed the add_data_persister branch 4 times, most recently from 6e4d207 to 8bba007 Compare October 30, 2017 11:03
@meyerbaptiste
Copy link
Member Author

Done @dunglas

@dunglas dunglas merged commit c7e2cda into api-platform:master Oct 30, 2017
@dunglas
Copy link
Member

dunglas commented Oct 30, 2017

Thanks @meyerbaptiste

@dunglas
Copy link
Member

dunglas commented Oct 30, 2017

Don't forget the docs PR :D

@meyerbaptiste meyerbaptiste deleted the add_data_persister branch October 30, 2017 12:38
@dunglas dunglas mentioned this pull request Nov 15, 2017
4 tasks
hoangnd25 pushed a commit to hoangnd25/core that referenced this pull request Feb 23, 2018
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.

2 participants