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 - Warn if user tries to extend an Interface
Summary: Warn if user tries to extend an Interface
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.4
Hardware: All All
: P4 normal (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-18 12:11 UTC by vmattila
Modified: 2014-01-20 06:29 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 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.