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 #1

Updated by Gerrit Code Review almost 12 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

Actions #2

Updated by Gerrit Code Review about 11 years ago

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

Actions #3

Updated by Gerrit Code Review about 11 years ago

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

Actions #4

Updated by Wouter Wolters almost 10 years ago

  • Status changed from Under Review to Closed

Dead end according to Gerrit comments

Actions

Also available in: Atom PDF