Skip to content

Commit

Permalink
Unify the deprecation messages (see #6736)
Browse files Browse the repository at this point in the history
Description
-----------



Commits
-------

81cb454 Unify the deprecation messages
  • Loading branch information
leofeyer committed Jan 18, 2024
1 parent c2def7e commit 4e273f0
Show file tree
Hide file tree
Showing 17 changed files with 72 additions and 72 deletions.
4 changes: 2 additions & 2 deletions comments-bundle/contao/classes/Comments.php
Expand Up @@ -505,8 +505,8 @@ public function convertLineFeeds($strComment)
/**
* Purge subscriptions that have not been activated within 24 hours
*
* @deprecated Deprecated since Contao 5.0, to be removed in Contao 6.0.
* Use CommentsNotifyModel::findExpiredSubscriptions() instead.
* @deprecated Deprecated since Contao 5.0, to be removed in Contao 6;
* use CommentsNotifyModel::findExpiredSubscriptions() instead.
*/
public function purgeSubscriptions()
{
Expand Down
4 changes: 2 additions & 2 deletions core-bundle/contao/classes/BackendUser.php
Expand Up @@ -154,8 +154,8 @@ public function __get($strKey)
*
* @return boolean
*
* @deprecated Deprecated since Contao 5.2, to be removed in Contao 6.0.
* Use the "ContaoCorePermissions::USER_CAN_ACCESS_*" permissions instead.
* @deprecated Deprecated since Contao 5.2, to be removed in Contao 6;
* use the "ContaoCorePermissions::USER_CAN_ACCESS_*" permissions instead.
*/
public function hasAccess($field, $array)
{
Expand Down
3 changes: 2 additions & 1 deletion core-bundle/contao/classes/DataContainer.php
Expand Up @@ -249,7 +249,8 @@ abstract class DataContainer extends Backend
/**
* Active record
* @var Model|object|null
* @deprecated Deprecated since Contao 5.0 to be removed in Contao 6. Use $dc->getCurrentRecord() instead.
* @deprecated Deprecated since Contao 5.0, to be removed in Contao 6;
* use $dc->getCurrentRecord() instead.
*/
protected $objActiveRecord;

Expand Down
4 changes: 2 additions & 2 deletions core-bundle/contao/drivers/DC_Table.php
Expand Up @@ -1100,7 +1100,7 @@ public function copy($blnDoNotRedirect=false)
}

/**
* @deprecated Deprecated in Contao 5.3, to be removed in Contao 6;
* @deprecated Deprecated since Contao 5.3, to be removed in Contao 6;
* use copyChildren() instead.
*/
protected function copyChilds($table, $insertID, $id, $parentId)
Expand Down Expand Up @@ -1804,7 +1804,7 @@ public function deleteAll()
}

/**
* @deprecated Deprecated in Contao 5.3, to be removed in Contao 6;
* @deprecated Deprecated since Contao 5.3, to be removed in Contao 6;
* use deleteChildren() instead.
*/
protected function deleteChilds($table, $id, &$delete)
Expand Down
8 changes: 4 additions & 4 deletions core-bundle/contao/library/Contao/Automator.php
Expand Up @@ -226,8 +226,8 @@ public function purgeTempFolder()
/**
* Purge registrations that have not been activated within 24 hours
*
* @deprecated Deprecated since Contao 5.0, to be removed in Contao 6.0.
* Use MemberModel::findExpiredRegistrations() instead.
* @deprecated Deprecated since Contao 5.0, to be removed in Contao 6;
* use MemberModel::findExpiredRegistrations() instead.
*/
public function purgeRegistrations()
{
Expand All @@ -251,8 +251,8 @@ public function purgeRegistrations()
/**
* Purge opt-in tokens
*
* @deprecated Deprecated since Contao 5.0, to be removed in Contao 6.0.
* Use the "contao.opt_in" service instead.
* @deprecated Deprecated since Contao 5.0, to be removed in Contao 6;
* use the "contao.opt_in" service instead.
*/
public function purgeOptInTokens()
{
Expand Down
2 changes: 1 addition & 1 deletion core-bundle/contao/library/Contao/Config.php
Expand Up @@ -306,7 +306,7 @@ public function save()
/**
* Return true if the installation is complete
*
* @deprecated Deprecated since Contao 5.0, to be removed in Contao 6.0
* @deprecated Deprecated since Contao 5.0, to be removed in Contao 6.
*
* @return boolean True if the installation is complete
*/
Expand Down
4 changes: 2 additions & 2 deletions core-bundle/contao/library/Contao/Controller.php
Expand Up @@ -1222,8 +1222,8 @@ public static function resetControllerCache()
*
* @return string The URL of the target page
*
* @deprecated Deprecated since Contao 5.3, to be removed in Contao 6.0.
* Use the contao_backend_preview route instead.
* @deprecated Deprecated since Contao 5.3, to be removed in Contao 6;
* use the contao_backend_preview route instead.
*/
protected function redirectToFrontendPage($intPage, $strArticle=null, $blnReturn=false)
{
Expand Down
10 changes: 5 additions & 5 deletions core-bundle/contao/library/Contao/Input.php
Expand Up @@ -494,7 +494,7 @@ public static function getUnusedRouteParameters(): array
*
* @return mixed The clean name or array of names
*
* @deprecated Deprecated since Contao 5.0, to be removed in Contao 6.0.
* @deprecated Deprecated since Contao 5.0, to be removed in Contao 6.
*/
public static function cleanKey($varValue)
{
Expand Down Expand Up @@ -809,7 +809,7 @@ private static function getAttributesFromTag($strAttributes)
*
* @return mixed The cleaned string or array
*
* @deprecated Deprecated since Contao 5.0, to be removed in Contao 6.0.
* @deprecated Deprecated since Contao 5.0, to be removed in Contao 6.
*/
public static function xssClean($varValue, $blnStrictMode=false)
{
Expand Down Expand Up @@ -928,7 +928,7 @@ public static function xssClean($varValue, $blnStrictMode=false)
*
* @return mixed The decoded string or array
*
* @deprecated Deprecated since Contao 5.0, to be removed in Contao 6.0.
* @deprecated Deprecated since Contao 5.0, to be removed in Contao 6.
*/
public static function decodeEntities($varValue)
{
Expand Down Expand Up @@ -964,7 +964,7 @@ public static function decodeEntities($varValue)
*
* @return mixed The string or array with the converted entities
*
* @deprecated Deprecated since Contao 5.0, to be removed in Contao 6.0.
* @deprecated Deprecated since Contao 5.0, to be removed in Contao 6.
*/
public static function preserveBasicEntities($varValue)
{
Expand Down Expand Up @@ -1003,7 +1003,7 @@ public static function preserveBasicEntities($varValue)
*
* @return mixed The encoded string or array
*
* @deprecated Deprecated since Contao 5.0, to be removed in Contao 6.0.
* @deprecated Deprecated since Contao 5.0, to be removed in Contao 6.
*/
public static function encodeSpecialChars($varValue)
{
Expand Down
2 changes: 1 addition & 1 deletion core-bundle/contao/library/Contao/Template.php
Expand Up @@ -60,7 +60,7 @@
* @property array $trustedDevices
* @property string $currentDevice
*
* @deprecated Deprecated since Contao 5.0, to be removed in Contao 6.0;
* @deprecated Deprecated since Contao 5.0, to be removed in Contao 6;
* use Twig templates instead
*/
abstract class Template extends Controller
Expand Down
3 changes: 2 additions & 1 deletion core-bundle/src/InsertTag/InsertTagParser.php
Expand Up @@ -166,7 +166,8 @@ public function replaceInlineChunked(string $input): ChunkedText
}

/**
* @deprecated Deprecated since Contao 5.1 to be removed in Contao 6. Use renderTag() instead.
* @deprecated Deprecated since Contao 5.1, to be removed in Contao 6;
* use renderTag() instead.
*/
public function render(string $input): string
{
Expand Down
3 changes: 2 additions & 1 deletion core-bundle/src/Security/ContaoCorePermissions.php
Expand Up @@ -184,7 +184,8 @@ final class ContaoCorePermissions
public const USER_CAN_ACCESS_IMAGE_SIZE = 'contao_user.imageSizes';

/**
* @deprecated use USER_CAN_EDIT_FORM instead
* @deprecated Deprecated since Contao 5.3, to be removed in Contao 6;
* use USER_CAN_EDIT_FORM instead
*/
public const USER_CAN_ACCESS_FORM = 'contao_user.forms';

Expand Down
2 changes: 1 addition & 1 deletion core-bundle/src/Twig/Runtime/FigureRuntime.php
Expand Up @@ -41,7 +41,7 @@ public function __construct(private readonly FigureRenderer $figureRenderer)
* @param int|string|array|PictureConfiguration|null $size A picture size configuration or reference
* @param array<string, mixed> $configuration Configuration for the FigureBuilder
*
* @deprecated Deprecated since Contao 5.0, to be removed in Contao 6.0.
* @deprecated Deprecated since Contao 5.0, to be removed in Contao 6.
*/
public function renderFigure(FilesModel|ImageInterface|int|string $from, PictureConfiguration|array|int|string|null $size, array $configuration = [], string $template = '@ContaoCore/Image/Studio/figure.html.twig'): string|null
{
Expand Down
9 changes: 3 additions & 6 deletions core-bundle/tests/EventListener/RobotsTxtListenerTest.php
Expand Up @@ -86,8 +86,7 @@ public function disallowProvider(): \Generator
<<<'EOF'
user-agent:*
allow:/
EOF
,
EOF,
null,
<<<'EOF'
user-agent:*
Expand All @@ -103,8 +102,7 @@ public function disallowProvider(): \Generator
<<<'EOF'
user-agent:googlebot
allow:/
EOF
,
EOF,
null,
<<<'EOF'
user-agent:googlebot
Expand Down Expand Up @@ -138,8 +136,7 @@ public function disallowProvider(): \Generator
<<<'EOF'
user-agent:googlebot
allow:/
EOF
,
EOF,
true,
<<<'EOF'
user-agent:googlebot
Expand Down
4 changes: 2 additions & 2 deletions newsletter-bundle/contao/classes/Newsletter.php
Expand Up @@ -981,8 +981,8 @@ public function updateAccount()
/**
* Purge subscriptions that have not been activated within 24 hours
*
* @deprecated Deprecated since Contao 5.0, to be removed in Contao 6.0.
* Use NewsletterRecipientsModel::findExpiredSubscriptions() instead.
* @deprecated Deprecated since Contao 5.0, to be removed in Contao 6;
* use NewsletterRecipientsModel::findExpiredSubscriptions() instead.
*/
public function purgeSubscriptions()
{
Expand Down
50 changes: 25 additions & 25 deletions tools/ecs/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions tools/phpstan/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4e273f0

Please sign in to comment.