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 240640

Summary: Warn if user tries to extend an Interface
Product: php Reporter: vmattila
Component: EditorAssignee: Ondrej Brejla <obrejla>
Status: NEW ---    
Severity: normal    
Priority: P4    
Version: 7.4   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description vmattila 2014-01-18 12:11:29 UTC
Consider following code:

<?php
namespace Acme\Something;

use Doctrine\Common\EventSubscriber; // This is an interface and in include path

class MySubscriber extends EventSubscriber {

}
?>

As PHP class can't extend from an interface, NetBeans could add a warning or error that class MySybscriber tries to extend an interface (and possibly hint to use "implements" instead of "extends").
Comment 1 Tomas Mysik 2014-01-20 06:29:23 UTC
A good idea, IMHO. Thanks for reporting.