Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 147179 - CC doesn't work in <?= ?>
CC doesn't work in <?= ?>
Status: VERIFIED FIXED
Product: php
Classification: Unclassified
Component: Editor
6.x
All All
: P2 (vote)
: 6.x
Assigned To: Tomasz Slota
issues@php
65fixes1-verified
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-13 14:09 UTC by tprochazka
Modified: 2009-02-19 22:52 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments
Example with standard <?php echo syntax (25.70 KB, image/jpeg)
2008-09-13 14:11 UTC, tprochazka
Details
Example with short <?= syntax (16.76 KB, image/jpeg)
2008-09-13 14:12 UTC, tprochazka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tprochazka 2008-09-13 14:09:47 UTC
PHP support use in php files <?= expression ?> as shortcut for "<? echo expression ?>" or <?php echo expression ?>"

This is describe here:
http://cz2.php.net/manual/en/language.basic-syntax.php
in Example #2 PHP Opening and Closing Tags

Problem is, that in Netbeans doesn't work code complete in this section.

This syntax is often use in template file.
See:
http://framework.zend.com/manual/en/zend.view.html#zend.view.introduction.shortTags
Comment 1 tprochazka 2008-09-13 14:11:18 UTC
Created attachment 69804 [details]
Example with standard <?php echo syntax
Comment 2 tprochazka 2008-09-13 14:12:02 UTC
Created attachment 69805 [details]
Example with short <?= syntax
Comment 3 Tomasz Slota 2008-09-15 17:01:53 UTC
CC in <?= ?> works for me in general. The problem is probably somewhere else. Can you please provide a reproducible case?  
Comment 4 Mikhail Matveev 2008-10-08 20:07:08 UTC
Reproducible for me. Reopening the issue.
Reproducible case is below. In the first case CC works, but in the second it doesn't.

<?php

class PHPClass {
    
    static $st;
    
}
?>

<?php 

echo PHPClass::|

?>

<?=

PHPClass::|

?>
Comment 5 Tomasz Slota 2008-10-21 14:10:05 UTC
Fixed & unit tested:

http://hg.netbeans.org/main/rev/795e6640a10e

As I was fixing it I realized there was also no CC in the following situation:

<?php
class Test147179 {
    public static function foo();
}
?>

<? Test147179::foo(); ?>

And I covered this use case as well. It looks like a P2, the fix was simple so it should be considered for a patch for NB 6.5



Comment 6 Tomasz Slota 2008-10-21 14:14:31 UTC
.
Comment 7 Quality Engineering 2008-10-22 05:03:04 UTC
Integrated into 'main-golden', will be available in build *200810220201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/795e6640a10e
User: Tomasz Slota <tslota@netbeans.org>
Log: #147179: CC doesn't work in <?= ?>
Comment 8 Mikhail Matveev 2008-11-14 19:21:02 UTC
Verified
Comment 9 pgebauer 2008-11-19 15:18:21 UTC
The fix has been ported into the release65_fixes repository.

http://hg.netbeans.org/release65_fixes/rev/aa5cc493c827

Comment 10 Victoria Zhukovskaya 2009-01-21 13:23:53 UTC
Verified in patch2, winXP


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo