This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 258661 - Extending a deprecated method does not make the child deprecated
Summary: Extending a deprecated method does not make the child deprecated
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.1
Hardware: PC All
: P3 normal (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-05 13:43 UTC by Csardelacal
Modified: 2016-04-05 13:43 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Csardelacal 2016-04-05 13:43:02 UTC
In this code:

<?php

abstract class A
{
  /**
   * @deprecated since version 1.0
   **/
   abstract public function a();
}

class B extends A
{
   public function a() {
     echo 'hello world';
   }
}

Netbeans will detect A::a() as deprecated, but not the (reasonably) deprecated child method B::a(). I don't think this boils down to opinion, extending / implementing a deprecated method should result in a deprecated method by proxy.