FAQ
Edit report at https://pear.php.net/bugs/bug.php?id=20060&edit=1

  ID: 20060
  Updated by: gsherwood@squiz.net
  Reported By: tiger dot seo@gmail.com
  Summary: PSR-2 standard doesn't support PHP 5.5: New Class
                     Constant
-Status: Open
+Status: Duplicate
  Type: Bug
  Package: PHP_CodeSniffer
  Operating System: Windows 7
  Package Version: 1.4.6
  PHP Version: 5.5.2
-Assigned To:
+Assigned To: squiz
  Roadmap Versions:
  New Comment:

-Status: Open
+Status: Duplicate
-Assigned To:
+Assigned To: squiz
This is caused by bug #20043

I've marked this as a duplicate because resolving the token issue will
fix this and
every other class-related issue.


Previous Comments:
------------------------------------------------------------------------

[2013-09-04 13:26:08] tiger_seo

Description:
------------
Whenever your PHP is 5.5 and in code you reference to class name using
new class constant, e.g. FooBar::class, phpcs reports an error "phpcs:
Possible parse error: class missing opening or closing braces" which
isn't correct

for information pls see
http://thephp.cc/viewpoints/blog/2013/06/php-5-5-new-class-constant

Test script:
---------------
<?php

class FooBar
{
     // ...
}

var_dump(FooBar::class);


Expected result:
----------------
no errors

Actual result:
--------------
an error "phpcs: Possible parse error: class missing opening or closing
braces"

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedSep 5, '13 at 12:24a
activeSep 5, '13 at 12:24a
posts1
users1
websitepear.php.net

1 user in discussion

Gsherwood: 1 post

People

Translate

site design / logo © 2022 Grokbase