berlindb / core

All of the required core code
MIT License
252 stars 27 forks source link

PHP 5.6 issue and `clone` #129

Closed rmorse closed 2 years ago

rmorse commented 2 years ago

Hi again! I have a PHP Code Sniffer + PHP compat setup (for PHP 5.6) and I'm getting an error that clone is a reserved word (in the Table class)

https://github.com/berlindb/core/blob/2d94af59a0d5642b659af7b62c7674811f25df00/src/Database/Table.php#L480-L516

The error:

----------------------------------------------------------------------
  | ERROR | Function name, class name, namespace name or constant
     |       | name can not be reserved keyword 'clone' (since
     |       | version 5.0)
----------------------------------------------------------------------

Is PHP 5.6 supported (WordPress still does) and should we consider renaming this method?

spencerfinnell commented 2 years ago

Related: https://github.com/berlindb/core/issues/38#issuecomment-988864816

JJJ commented 2 years ago

Thanks @rmorse. I think we'll close this one in favor of the earlier #38, and I'll try and get a release out ASAP.

🙏