Feature #45022

Utility function to deprecate public method calls.

Added by Sebastian Michaelsen over 6 years ago. Updated almost 5 years ago.

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

0%

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.

History

#1 Updated by Gerrit Code Review over 6 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/17888

#2 Updated by Gerrit Code Review about 6 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/17888

#3 Updated by Gerrit Code Review about 6 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/17888

#4 Updated by Wouter Wolters almost 5 years ago

  • Status changed from Under Review to Closed

Dead end according to Gerrit comments

Also available in: Atom PDF