Skip to content
Snippets Groups Projects
Commit 4485117d authored by Alexander Schnitzler's avatar Alexander Schnitzler Committed by Georg Ringer
Browse files

[TASK] Deprecate unneeded RawValidator

The RawValidator is a useless Validator that is
automatically attached to all method params that
are annotated with "@param mixed".

This is due to the recognition of the pseudo type
"mixed" in ValidatorResolver::getValidatorType which
converts mixed into Raw and which then is responsible
for creating that RawValidator for the param.

However, this is completely useless as the Validator
does not validate. Hence, it will be deprecated and
removed in TYPO3 v10.0 without any replacement.

Releases: master
Resolves: #83503
Change-Id: Id3bc1418224e01983d6a3c13b759d6c8a4f764f3
Reviewed-on: https://review.typo3.org/55294


Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarOliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: default avatarHenning Liebe <h.liebe@neusta.de>
Reviewed-by: default avatarEugene Kenah Djomo <kdeugene@yahoo.fr>
Reviewed-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
parent c39209a3
Branches
Tags
No related merge requests found
.. include:: ../../Includes.txt
=====================================================
Deprecation: #83503 - Deprecate unneeded RawValidator
=====================================================
See :issue:`83503`
Description
===========
The `RawValidator` does not actually validate anything at all. It was meant to be some kind of NullObject to prevent a `NoSuchValidatorException` when resolving a validator from the detected type of a param. As these Exceptions are caught, the Validator is not needed any more and will be removed.
Impact
======
If you rely on the `RawValidator` you will need to implement it yourself.
Affected Installations
======================
All installations that use the `RawValidator`. As the validator does not validate anything the chances are high that it does not affect anyone at all.
Migration
=========
If needed, create the Validator yourself.
.. index:: PHP-API, PartiallyScanned
......@@ -17,10 +17,23 @@ namespace TYPO3\CMS\Extbase\Validation\Validator;
/**
* A validator which accepts any input.
*
* @api
* @deprecated
*/
class RawValidator extends AbstractValidator
{
/**
* @param array $options
*/
public function __construct(array $options = [])
{
trigger_error(
__CLASS__ . ' is deprecated and will be removed in TYPO3 v10.0.',
E_USER_DEPRECATED
);
parent::__construct($options);
}
/**
* This validator is always valid.
*
......
<?php
namespace TYPO3\CMS\Extbase\Tests\Unit\Validation\Validator;
namespace TYPO3\CMS\Extbase\Tests\UnitDeprecated\Validation\Validator;
/* *
* This script belongs to the Extbase framework. *
......
......@@ -524,4 +524,9 @@ return [
'Breaking-82426-ExtJSAndExtDirectRemoval.rst',
],
],
'TYPO3\CMS\Extbase\Validation\Validator\RawValidator' => [
'restFiles' => [
'Deprecation-83503-DeprecateUnneededRawValidator.rst',
],
],
];
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment