Skip to content

Commit

Permalink
EZP-30281: Added deprecation info to Core RichText FT namespace (#2602)
Browse files Browse the repository at this point in the history
* Deprecated eZ\Publish\Core\FieldType namespace

* Added E_USER_DEPRECATED warning to log deprecation

* [Doc] Marked eZ\Publish\Core\FieldType\RichText as deprecated in FieldType README

* [Doc] Added info, to 7.4 changes doc, that eZ\Publish\Core\FieldType\RichText is deprecated
  • Loading branch information
alongosz authored Apr 17, 2019
1 parent 027f434 commit 206a4e9
Show file tree
Hide file tree
Showing 24 changed files with 67 additions and 0 deletions.
6 changes: 6 additions & 0 deletions doc/bc/changes-7.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,9 @@ Changes affecting version compatibility with former or future versions.
Passing translations in all languages is no longer needed, all you have to do is pass language version
you wish to modify.
* New method `\eZ\Publish\API\Repository\ContentTypeService::removeContentTypeTranslation` is introduced.

## Deprecations

* `eZ\Publish\Core\FieldType\RichText` namespace has been deprecated and will be removed in 8.0.

Enable [eZ Platform RichText Bundle](https://github.com/ezsystems/ezplatform-richtext) instead.
2 changes: 2 additions & 0 deletions eZ/Publish/Core/FieldType/RichText/Converter.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

/**
* Interface for rich text conversion.
*
* @deprecated since 7.4, use \EzSystems\EzPlatformRichText\eZ\RichText\Converter from EzPlatformRichTextBundle.
*/
interface Converter
{
Expand Down
2 changes: 2 additions & 0 deletions eZ/Publish/Core/FieldType/RichText/Converter/Aggregate.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

/**
* Aggregate converter converts using configured converters in prioritized order.
*
* @deprecated since 7.4, use \EzSystems\EzPlatformRichText\eZ\RichText\Converter\Aggregate from EzPlatformRichTextBundle.
*/
class Aggregate implements Converter
{
Expand Down
3 changes: 3 additions & 0 deletions eZ/Publish/Core/FieldType/RichText/Converter/Link.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
use DOMDocument;
use DOMXPath;

/**
* @deprecated since 7.4, use \EzSystems\EzPlatformRichText\eZ\RichText\Converter\Link from EzPlatformRichTextBundle.
*/
class Link implements Converter
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
* Class ProgramListing.
*
* Processes <code>programlisting</code> DocBook tag.
*
* @deprecated since 7.4, use \EzSystems\EzPlatformRichText\eZ\RichText\Converter\ProgramListing from EzPlatformRichTextBundle.
*/
class ProgramListing implements Converter
{
Expand Down
2 changes: 2 additions & 0 deletions eZ/Publish/Core/FieldType/RichText/Converter/Render.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

/**
* Base class for Render converters.
*
* @deprecated since 7.4, use \EzSystems\EzPlatformRichText\eZ\RichText\Converter\Render from EzPlatformRichTextBundle.
*/
abstract class Render
{
Expand Down
2 changes: 2 additions & 0 deletions eZ/Publish/Core/FieldType/RichText/Converter/Render/Embed.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

/**
* RichText Embed converter injects rendered embed payloads into embed elements.
*
* @deprecated since 7.4, use \EzSystems\EzPlatformRichText\eZ\RichText\Converter\Render\Embed from EzPlatformRichTextBundle.
*/
class Embed extends Render implements Converter
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

/**
* RichText Template converter injects rendered template payloads into template elements.
*
* @deprecated since 7.4, use \EzSystems\EzPlatformRichText\eZ\RichText\Converter\Render\Template from EzPlatformRichTextBundle.
*/
class Template extends Render implements Converter
{
Expand Down
2 changes: 2 additions & 0 deletions eZ/Publish/Core/FieldType/RichText/Converter/Xslt.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

/**
* Converts DOMDocument objects using XSLT stylesheets.
*
* @deprecated since 7.4, use \EzSystems\EzPlatformRichText\eZ\RichText\Converter\Xslt from EzPlatformRichTextBundle.
*/
class Xslt extends XmlBase implements Converter
{
Expand Down
2 changes: 2 additions & 0 deletions eZ/Publish/Core/FieldType/RichText/ConverterDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

/**
* Dispatcher for various converters depending on the XML document namespace.
*
* @deprecated since 7.4, use \EzSystems\EzPlatformRichText\eZ\RichText\ConverterDispatcher from EzPlatformRichTextBundle.
*/
class ConverterDispatcher
{
Expand Down
2 changes: 2 additions & 0 deletions eZ/Publish/Core/FieldType/RichText/CustomTagsValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*
* The Validator checks if the given XML reflects proper Custom Tags configuration,
* mostly existence of specific Custom Tag and its required attributes.
*
* @deprecated since 7.4, use \EzSystems\EzPlatformRichText\eZ\RichText\Validator\CustomTagsValidator from EzPlatformRichTextBundle.
*/
class CustomTagsValidator
{
Expand Down
2 changes: 2 additions & 0 deletions eZ/Publish/Core/FieldType/RichText/InternalLinkValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

/**
* Validator for RichText internal format links.
*
* @deprecated since 7.4, use \EzSystems\EzPlatformRichText\eZ\RichText\Validator\InternalLinkValidator from EzPlatformRichTextBundle.
*/
class InternalLinkValidator
{
Expand Down
2 changes: 2 additions & 0 deletions eZ/Publish/Core/FieldType/RichText/Normalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

/**
* Abstract class for XML normalization of string input.
*
* @deprecated since 7.4, use \EzSystems\EzPlatformRichText\eZ\RichText\Normalizer from EzPlatformRichTextBundle.
*/
abstract class Normalizer
{
Expand Down
2 changes: 2 additions & 0 deletions eZ/Publish/Core/FieldType/RichText/Normalizer/Aggregate.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

/**
* Aggregate normalizer converts using configured normalizers in prioritized order.
*
* @deprecated since 7.4, use \EzSystems\EzPlatformRichText\eZ\RichText\Normalizer\Aggregate from EzPlatformRichTextBundle.
*/
class Aggregate extends Normalizer
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
* namespace.
*
* Note: if input already contains DTD it won't be accepted for normalization.
*
* @deprecated since 7.4, use \EzSystems\EzPlatformRichText\eZ\RichText\Normalizer\DocumentTypeDefinition from EzPlatformRichTextBundle.
*/
class DocumentTypeDefinition extends Normalizer
{
Expand Down
8 changes: 8 additions & 0 deletions eZ/Publish/Core/FieldType/RichText/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# RichText field type for eZ Platform

***
**NOTE**: As of eZ Platform v2.4 the entire `eZ\Publish\Core\FieldType\RichText` namespace
is deprecated.

Use `\EzSystems\EzPlatformRichTextBundle\EzPlatformRichTextBundle` provided by the
[`ezsystems/ezplatform-richtext`](https://github.com/ezsystems/ezplatform-richtext) package instead.
***

This is the RichText field type for eZ Platform, it's a field type for supporting
rich formatted text stored in a structured xml format.

Expand Down
2 changes: 2 additions & 0 deletions eZ/Publish/Core/FieldType/RichText/RendererInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

/**
* RichText field type renderer interface, to be implemented in MVC layer.
*
* @deprecated since 7.4, use \EzSystems\EzPlatformRichText\eZ\RichText\RendererInterface from EzPlatformRichTextBundle.
*/
interface RendererInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
/**
* Abstract gateway class for RichText type.
* Handles data that is not directly included in raw XML value from the field (i.e. URLs).
*
* @deprecated since 7.4, use \EzSystems\EzPlatformRichText\eZ\FieldType\RichText\RichTextStorage\Gateway from EzPlatformRichTextBundle.
*/
abstract class Gateway extends StorageGateway
{
Expand Down
2 changes: 2 additions & 0 deletions eZ/Publish/Core/FieldType/RichText/SearchField.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

/**
* Indexable definition for RichText field type.
*
* @deprecated since 7.4, use \EzSystems\EzPlatformRichText\eZ\FieldType\RichText\SearchField from EzPlatformRichTextBundle.
*/
class SearchField implements Indexable
{
Expand Down
10 changes: 10 additions & 0 deletions eZ/Publish/Core/FieldType/RichText/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

/**
* RichText field type.
*
* @deprecated since 7.4, use \EzSystems\EzPlatformRichText\eZ\FieldType\RichText\Type from EzPlatformRichTextBundle.
*/
class Type extends FieldType
{
Expand Down Expand Up @@ -71,6 +73,14 @@ public function __construct(
InternalLinkValidator $internalLinkValidator = null,
CustomTagsValidator $customTagsValidator = null
) {
@trigger_error(
sprintf(
'%s is deprecated since eZ Platform v2.4, enable RichTextBundle instead',
__CLASS__
),
E_USER_DEPRECATED
);

$this->internalFormatValidator = $internalFormatValidator;
$this->inputConverterDispatcher = $inputConverterDispatcher;
$this->inputNormalizer = $inputNormalizer;
Expand Down
2 changes: 2 additions & 0 deletions eZ/Publish/Core/FieldType/RichText/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

/**
* Validates XML document using ISO Schematron (as XSLT stylesheet), XSD and RELAX NG schemas.
*
* @deprecated since 7.4, use \EzSystems\EzPlatformRichText\eZ\RichText\Validator\Validator from EzPlatformRichTextBundle.
*/
class Validator extends XmlBase
{
Expand Down
2 changes: 2 additions & 0 deletions eZ/Publish/Core/FieldType/RichText/ValidatorDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

/**
* Dispatcher for various validators depending on the XML document namespace.
*
* @deprecated since 7.4, use \EzSystems\EzPlatformRichText\eZ\RichText\Validator\ValidatorDispatcher from EzPlatformRichTextBundle.
*/
class ValidatorDispatcher
{
Expand Down
2 changes: 2 additions & 0 deletions eZ/Publish/Core/FieldType/RichText/Value.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

/**
* Value for RichText field type.
*
* @deprecated since 7.4, use \EzSystems\EzPlatformRichText\eZ\FieldType\RichText\Value from EzPlatformRichTextBundle.
*/
class Value extends BaseValue
{
Expand Down
2 changes: 2 additions & 0 deletions eZ/Publish/Core/FieldType/RichText/XmlBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

/**
* A base class for XML document handlers.
*
* @deprecated since 7.4, use \EzSystems\EzPlatformRichText\eZ\RichText\XmlBase from EzPlatformRichTextBundle.
*/
abstract class XmlBase
{
Expand Down

0 comments on commit 206a4e9

Please sign in to comment.