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

Introduce MapperInterface #7039

Merged
merged 2 commits into from
Apr 14, 2021

Conversation

VincentLanglet
Copy link
Member

Subject

We're using BaseMapper as a typehint somewhere, which is an abstract class.
Isn't better to use an interface instead ?

Changelog

### Added
- Added `MapperInterface`

@VincentLanglet VincentLanglet requested a review from a team April 12, 2021 11:16
@@ -21,7 +21,7 @@
*
* @author Thomas Rabaix <thomas.rabaix@sonata-project.org>
*/
abstract class BaseMapper
abstract class BaseMapper implements MapperInterface
Copy link
Member

Choose a reason for hiding this comment

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

Does it make sense at all to have this abstract... previously all method were abstract, and now it has none.

To me , an abstract class makes sense when it have some logic and some abstract method, but this class does not have any of that (previously or after this pr)

Copy link
Member Author

Choose a reason for hiding this comment

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

We can deprecate it indeed.

@VincentLanglet VincentLanglet force-pushed the mapperInterface branch 3 times, most recently from 0ad302c to 262aefe Compare April 13, 2021 18:35
@VincentLanglet VincentLanglet requested review from jordisala1991 and a team April 13, 2021 18:46
phansys
phansys previously approved these changes Apr 14, 2021
src/Mapper/BaseMapper.php Outdated Show resolved Hide resolved
@phansys phansys requested a review from a team April 14, 2021 10:02
@VincentLanglet VincentLanglet merged commit 36a5f1d into sonata-project:3.x Apr 14, 2021
@VincentLanglet VincentLanglet deleted the mapperInterface branch April 14, 2021 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants