<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>305779</bug_id>
          
          <creation_ts>2012-08-25 20:06:50 +0000</creation_ts>
          <short_desc>PHP 5.4 features</short_desc>
          <delta_ts>2017-03-07 08:51:49 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>kdevelop</product>
          <component>Language Support: PHP</component>
          <version>4.3.1</version>
          <rep_platform>Gentoo Packages</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Andrew Udvare">audvare</reporter>
          <assigned_to>kdevelop-bugs-null</assigned_to>
          <cc>alexander</cc>
    
    <cc>pprkut</cc>
          
          <cf_commitlink>http://commits.kde.org/kdev-php/bab6bf2516af11d0383a5f1d34c4b6db0475dda7</cf_commitlink>
          <cf_versionfixedin>5.1.0</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>2</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1291707</commentid>
    <comment_count>0</comment_count>
    <who name="Andrew Udvare">audvare</who>
    <bug_when>2012-08-25 20:06:50 +0000</bug_when>
    <thetext>http://php.net/manual/en/migration54.new-features.php

Array dereferencing
New array syntax
Traits

Almost all of the features mentioned on that page currently result in syntax errors.

&lt;?php
$str = &apos;A:B&apos;;
explode(&apos;:&apos;, $arr)[1];

trait A { // &lt;-- syntax error
}
?&gt;

etc

Reproducible: Always

Steps to Reproduce:
n/a
Actual Results:  
n/a

Expected Results:  
n/a</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1383786</commentid>
    <comment_count>1</comment_count>
    <who name="Milian Wolff">mail</who>
    <bug_when>2013-07-16 14:25:48 +0000</bug_when>
    <thetext>Git commit bab6bf2516af11d0383a5f1d34c4b6db0475dda7 by Milian Wolff.
Committed on 16/07/2013 at 14:20.
Pushed by mwolff into branch &apos;master&apos;.

Add support for php 5.4&apos;s short array syntax.

A first step towards support for the new syntax features introduced
in PHP 5.4. This implements parsing support for the short (json-style)
array syntax where one can rewrite

$var = array( &quot;key&quot; =&gt; &quot;value&quot; );

as

$var = [ &quot;key&quot; =&gt; &quot;value&quot; ];
REVIEW: 110374

M  +23   -0    duchain/tests/expressionparser.cpp
M  +1    -0    duchain/tests/expressionparser.h
M  +10   -0    parser/php.g

http://commits.kde.org/kdev-php/bab6bf2516af11d0383a5f1d34c4b6db0475dda7</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1383800</commentid>
    <comment_count>2</comment_count>
    <who name="Milian Wolff">mail</who>
    <bug_when>2013-07-16 15:23:06 +0000</bug_when>
    <thetext>not all features implemented yet, reopening</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1383801</commentid>
    <comment_count>3</comment_count>
    <who name="Milian Wolff">mail</who>
    <bug_when>2013-07-16 15:24:47 +0000</bug_when>
    <thetext>Git commit 693e877d45afecd0e41b678e0ef441fda7744075 by Milian Wolff, on behalf of Heinz Wiesinger.
Committed on 16/07/2013 at 15:20.
Pushed by mwolff into branch &apos;master&apos;.

Add support for PHP 5.4&apos;s function array dereferencing.

M  +5    -6    duchain/expressionvisitor.cpp
M  +1    -1    duchain/expressionvisitor.h
M  +42   -0    duchain/tests/expressionparser.cpp
M  +2    -0    duchain/tests/expressionparser.h
M  +7    -7    parser/php.g

http://commits.kde.org/kdev-php/693e877d45afecd0e41b678e0ef441fda7744075</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1402915</commentid>
    <comment_count>4</comment_count>
    <who name="Heinz Wiesinger">pprkut</who>
    <bug_when>2013-10-12 13:55:27 +0000</bug_when>
    <thetext>Git commit d87cd7d64acca990a0092955a0f4681d3b97af06 by Heinz Wiesinger.
Committed on 24/09/2013 at 08:37.
Pushed by wiesinger into branch &apos;master&apos;.

Add support for Trait declarations, as introduced in PHP 5.4.

REVIEW: 112917

M  +1    -0    completion/context.cpp
M  +8    -0    duchain/builders/contextbuilder.cpp
M  +1    -0    duchain/builders/contextbuilder.h
M  +30   -4    duchain/builders/declarationbuilder.cpp
M  +1    -0    duchain/builders/declarationbuilder.h
M  +27   -0    duchain/builders/predeclarationbuilder.cpp
M  +1    -0    duchain/builders/predeclarationbuilder.h
M  +9    -0    duchain/builders/typebuilder.cpp
M  +1    -0    duchain/builders/typebuilder.h
M  +3    -0    duchain/declarations/classdeclaration.cpp
M  +2    -0    duchain/navigation/declarationnavigationcontext.cpp
M  +37   -0    duchain/tests/expressionparser.cpp
M  +3    -0    duchain/tests/expressionparser.h
M  +6    -1    parser/php.g
M  +2    -0    parser/phplexer.cpp

http://commits.kde.org/kdev-php/d87cd7d64acca990a0092955a0f4681d3b97af06</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1429359</commentid>
    <comment_count>5</comment_count>
    <who name="Heinz Wiesinger">pprkut</who>
    <bug_when>2014-02-07 17:17:25 +0000</bug_when>
    <thetext>Git commit 9141e9d737cc2635e7573a8b71423de9d52c3389 by Heinz Wiesinger.
Committed on 21/01/2014 at 17:43.
Pushed by wiesinger into branch &apos;master&apos;.

Support the syntax for class member access on instantiation.

This adds support for syntax like (new Foo())-&gt;bar() as introduced
in PHP 5.4.

The bug, that ($a)-&gt; still offers completion even though it is
invalid syntax (stupid PHP) remains though.
Related: bug 297908
REVIEW: 115304

M  +15   -13   duchain/builders/declarationbuilder.cpp
M  +2    -1    duchain/expressionvisitor.cpp
M  +19   -0    duchain/tests/expressionparser.cpp
M  +1    -0    duchain/tests/expressionparser.h
M  +14   -3    parser/php.g

http://commits.kde.org/kdev-php/9141e9d737cc2635e7573a8b71423de9d52c3389</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1429369</commentid>
    <comment_count>6</comment_count>
    <who name="Heinz Wiesinger">pprkut</who>
    <bug_when>2014-02-07 17:40:59 +0000</bug_when>
    <thetext>Git commit 5dd4bdb1e2994de007a3ebbd772dd2181bf3f6f6 by Heinz Wiesinger.
Committed on 29/10/2013 at 20:59.
Pushed by wiesinger into branch &apos;master&apos;.

Add support for trait uses, as introduced in PHP 5.4

The error messages I used are as close as possible to the actual
errors given by PHP. We check for
- invalid function modifiers (static, final)
- property name conflicts between traits and main class
- method name conflicts between multiple traits
REVIEW: 115299

M  +1    -0    completion/context.cpp
M  +206  -1    duchain/builders/declarationbuilder.cpp
M  +3    -0    duchain/builders/declarationbuilder.h
M  +62   -0    duchain/builders/usebuilder.cpp
M  +3    -0    duchain/builders/usebuilder.h
M  +38   -0    duchain/navigation/declarationnavigationcontext.cpp
M  +1    -0    duchain/navigation/declarationnavigationcontext.h
M  +24   -0    duchain/tests/expressionparser.cpp
M  +2    -0    duchain/tests/expressionparser.h
M  +106  -0    duchain/tests/uses.cpp
M  +1    -0    duchain/tests/uses.h
M  +12   -1    parser/php.g
M  +2    -0    parser/phplexer.cpp

http://commits.kde.org/kdev-php/5dd4bdb1e2994de007a3ebbd772dd2181bf3f6f6</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1554008</commentid>
    <comment_count>7</comment_count>
    <who name="Milian Wolff">mail</who>
    <bug_when>2015-11-01 17:16:36 +0000</bug_when>
    <thetext>what exactly is still missing from PHP 5.4 support?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1554012</commentid>
    <comment_count>8</comment_count>
    <who name="Heinz Wiesinger">pprkut</who>
    <bug_when>2015-11-01 17:36:52 +0000</bug_when>
    <thetext>Looking at http://php.net/manual/en/migration54.new-features.php the one feature I see still missing is &quot;Class::{expr}() syntax is now supported.&quot;

Example code: http://www.lifemichael.com/en/2012/06/php-5-4-classexpr-syntax-pro/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1664976</commentid>
    <comment_count>9</comment_count>
    <who name="Kevin Funk">kfunk</who>
    <bug_when>2017-03-07 08:26:01 +0000</bug_when>
    <thetext>I presume this bug is now fixed by:
  https://phabricator.kde.org/D4902</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1664979</commentid>
    <comment_count>10</comment_count>
    <who name="Kevin Funk">kfunk</who>
    <bug_when>2017-03-07 08:51:49 +0000</bug_when>
    <thetext>Backported to 5.1</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>