-
Notifications
You must be signed in to change notification settings - Fork 203
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
Refactor FieldValueConverterRegistryPass not to use static callbacks #1863
Refactor FieldValueConverterRegistryPass not to use static callbacks #1863
Conversation
* | ||
* @return Author | ||
*/ | ||
public static function create() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should deprecate and not remove directly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't remove ::create directly.
Restored |
@@ -22,11 +22,13 @@ class FloatConverter implements Converter | |||
const HAS_MAX_VALUE = 2; | |||
|
|||
/** | |||
* @deprecated since 6.8, will be removed in 7.x, use default constructor instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpic, but @deprecated
is no the title of the doc block :)
so place it after "NOTE:" part.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, fixed in eb1b693 :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides nitpick +1
@@ -5,6 +5,8 @@ | |||
* | |||
* @copyright Copyright (C) eZ Systems AS. All rights reserved. | |||
* @license For full copyright and license information view LICENSE file distributed with this source code. | |||
* | |||
* @version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missed this one now
* @return float | ||
* @deprecated since 6.8, will be removed in 7.x, use default constructor instead. | ||
* | ||
* @return Float |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and this
Added missing CS fixes in affa731 (sorry!). |
From comment at #1812, should this be closed now? |
Can, but this is a nice cleanup and already done, so would like to merge it for 6.8 if you approve it :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, with two nitpicks fixed +1
* @return Float | ||
* @deprecated since 6.8, will be removed in 7.x, use default constructor instead. | ||
* | ||
* @return float |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: FloatConverter
:)
* @return Integer | ||
* @deprecated since 6.8, will be removed in 7.x, use default constructor instead. | ||
* | ||
* @return int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IntegerConverter
Looks like almost every converter has wrong doc on |
17eaa0f
to
8479987
Compare
It's ready now. // cc @andrerom |
Thanks @alongosz |
This PR refactors
eZ\Publish\Core\Base\Container\Compiler\Storage\Legacy\FieldValueConverterRegistryPass
not to use static callback when registering concreteFieldValueConverter
s.This change simplifies injecting any dependency into any
FieldValueConverter
(and makes the code cleaner).On the other hand, to compensate for "losing" laziness on Converters, Registry is now lazy.
TODO:
FieldValueConverterRegistryPass
.create
in concreteFieldValueConverter
implementations.ezpublish.persistence.legacy.field_value_converter.registry
lazylazy
andcallback
attributes fromezpublish.storageEngine.legacy.converter
tagged-services.