Project

General

Profile

Actions

Feature #45022

closed

Utility function to deprecate public method calls.

Added by Sebastian Michaelsen almost 12 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Could have
Assignee:
-
Category:
-
Target version:
Start date:
2013-01-31
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

At the moment we have a lot of public methods which are not intended for being public. We need a way to deprecate calling them publicly, therefore a Utility Function is introduced.

Usage:

    /**
     * @publicCallDeprecated Since 6.1. Will be protected 2 versions later
     */
    public function privateFoo() {
        GeneralUtility::logDeprecatedPublicMethodCall();
        // do stuff
    }

If the method is called publicy an entry like this is being made to the deprecation log:

Deprecated public method call: MyClass->privateFoo() was called publicly which is deprecated (Since 6.1. Will be protected 2 versions later). [DEBUG TRAIL]

I'm not sure if it is ok to just invent a new phpDoc annotation. But it's the best solution I found to store information about the deprecation strategy.

Actions

Also available in: Atom PDF