-
Notifications
You must be signed in to change notification settings - Fork 10
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
EZP-32340: Deprecated ezpublish_rest.field_type_processor in favour of ibexa.rest.field_type.processor #63
Conversation
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; | ||
use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
use Symfony\Component\DependencyInjection\Reference; | ||
|
||
class FieldTypeProcessorPass implements CompilerPassInterface | ||
{ | ||
public const FIELD_TYPE_PROCESSOR_SERVICE_TAG = 'ezplatform.field_type.rest.processor'; |
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.
Since the tag was never really working we should go with new scheme to avoid adding to a pile of work we already have when it comes to cleanup.
public const FIELD_TYPE_PROCESSOR_SERVICE_TAG = 'ezplatform.field_type.rest.processor'; | |
public const FIELD_TYPE_PROCESSOR_SERVICE_TAG = 'ibexa.rest.field_type.processor'; |
…f ibexa.rest.field_type.processor
…avour of ibexa.rest.field_type.processor
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; | ||
use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
use Symfony\Component\DependencyInjection\Reference; | ||
|
||
class FieldTypeProcessorPass implements CompilerPassInterface | ||
{ | ||
public const FIELD_TYPE_PROCESSOR_SERVICE_TAG = 'ibexa.rest.field_type.processor'; | ||
public const DEPRECATED_FIELD_TYPE_PROCESSOR_SERVICE_TAG = 'ezpublish_rest.field_type_processor'; |
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.
Since it's deprecated and nobody would have anywhere at this point, won't it make sense to make it private immediately?
public const DEPRECATED_FIELD_TYPE_PROCESSOR_SERVICE_TAG = 'ezpublish_rest.field_type_processor'; | |
private const DEPRECATED_FIELD_TYPE_PROCESSOR_SERVICE_TAG = 'ezpublish_rest.field_type_processor'; |
We could use the constant above as !php/const
in YAML files, but that's kinda nitpicky I guess?
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.
The main purpose of this constants is to avoid hardcoding tag names in *.php (including tests), and only there 😉
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.
@adamwojs I'd say that the purpose of the tests is to detect a change in constant values in this case (since we expect users to use that tag). Similarly how hardcoding URLs for application tests is recommended.
If we're concerned that changing this tag will force us to change values in multiple files, then using !php/const
makes more sense than in tests actually, as it's occuring there a lot more than in tests.
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.
Applied in #64
3.2
+Deprecated
ezpublish_rest.field_type_processor
in favour ofezplatform.field_type.rest.processor
.TODO:
$ composer fix-cs
).