greenlion / PHP-SQL-Parser

A pure PHP SQL (non validating) parser w/ focus on MySQL dialect of SQL
BSD 3-Clause "New" or "Revised" License
607 stars 156 forks source link

avoid error with PHP 7.2 #287

Closed nicoder closed 5 years ago

nicoder commented 6 years ago
Fatal error: Declaration of ReplaceProcessor::process($tokenList)
must be compatible with
InsertProcessor::process($tokenList, $token_category = 'INSERT')
PSF1 commented 6 years ago

The line 54 must be replaced from:

return parent::process($tokenList, 'REPLACE');

to

return parent::process($tokenList, $token_category);

connorjclark commented 6 years ago

and the default should be REPLACE not INSERT

I will make a new PR for this

PSF1 commented 6 years ago

Yes :_ D I found about 4 class with the some problem, all class that extend the same class that this one

PSF1 commented 6 years ago

In my tests not other need refactoring