Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMB2 isn't fully PHP 7.0 compliant #719

Closed
ryanshoover opened this issue Aug 22, 2016 · 0 comments
Closed

CMB2 isn't fully PHP 7.0 compliant #719

ryanshoover opened this issue Aug 22, 2016 · 0 comments

Comments

@ryanshoover
Copy link
Contributor

ryanshoover commented Aug 22, 2016

Expected Behavior:

  1. Run PHP_CodeSniffer with PHPCompatibility set to 7.0
    phpcs --standard=PHPCompatibility --runtime-set testVersion 7.0
    Or, run a report using the plugin php-compatibility-checker
  • Get a clean report with no notices, warnings, or errors

Actual Behavior:

  1. Run PHP_CodeSniffer with PHPCompatibility set to 7.0
    Or, run a report using the plugin php-compatibility-checker
  • Get the following output

Name: CMB2

FILE: ... /wp-content/plugins/cmb2/css/index.php
------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------
 1 | WARNING | No PHP code was found in this file and short open tags are not allowed by this install of PHP. This file may be using short open tags but PHP does not allow them.
------------------------------------


FILE: .../wp-content/plugins/cmb2/images/index.php
------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------
 1 | WARNING | No PHP code was found in this file and short open tags are not allowed by this install of PHP. This file may be using short open tags but PHP does not allow them.
------------------------------------


FILE: .../wp-content/plugins/cmb2/includes/CMB2_Field.php
----------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------
 1054 | ERROR | Function name, class name, namespace name or constant name can not be reserved keyword 'string' (since version 7.0)
----------------------------------------------------------


FILE: .../wp-content/plugins/cmb2/includes/CMB2_Types.php
-------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------
 133 | ERROR | 'string' is a reserved keyword introduced in PHP version 7.0 and cannot be invoked as a function (T_STRING)
-------------------------------------------------


FILE: .../wp-content/plugins/cmb2/includes/index.php
------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------
 1 | WARNING | No PHP code was found in this file and short open tags are not allowed by this install of PHP. This file may be using short open tags but PHP does not allow them.
------------------------------------


FILE: .../wp-content/plugins/cmb2/index.php
------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------
 1 | WARNING | No PHP code was found in this file and short open tags are not allowed by this install of PHP. This file may be using short open tags but PHP does not allow them.
------------------------------------


FILE .../wp-content/plugins/cmb2/js/index.php
------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------
 1 | WARNING | No PHP code was found in this file and short open tags are not allowed by this install of PHP. This file may be using short open tags but PHP does not allow them.
------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant