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
604 stars 156 forks source link

PHP 8.1 supporting #347

Closed tarasTrujay closed 2 years ago

tarasTrujay commented 2 years ago

Hi guys! Have some deprecations on PHP 8.1:

Deprecated: preg_split(): Passing null to parameter #3 ($limit) of type int is deprecated in /development/application/vendor/greenlion/php-sql-parser/src/PHPSQLParser/lexer/PHPSQLLexer.php on line 87

Deprecated: Automatic conversion of false to array is deprecated in /development/application/vendor/greenlion/php-sql-parser/src/PHPSQLParser/processors/SQLProcessor.php on line 506

and so on.

Could you fix these?

genyslt commented 2 years ago

Any news?

garethellis36 commented 2 years ago

PR #346 was opened to address the first deprecation, but it hasn't been merged yet. @greenlion Any idea when this might get merged please?

greenlion commented 2 years ago

Will look at the PR this weekend and merge.

On Fri, Jan 28, 2022, 12:46 PM Gareth Ellis @.***> wrote:

PR #346 https://github.com/greenlion/PHP-SQL-Parser/pull/346 was opened to address the first deprecation, but it hasn't been merged yet. @greenlion https://github.com/greenlion Any idea when this might get merged please?

— Reply to this email directly, view it on GitHub https://github.com/greenlion/PHP-SQL-Parser/issues/347#issuecomment-1024458360, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADRTNQHFSCTP5HUVA6QQEDUYLI7BANCNFSM5LHZOS6Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

garethellis36 commented 2 years ago

Thank you. Would you like a PR for the second deprecation?

greenlion commented 2 years ago

Yes, please!

On Fri, Jan 28, 2022, 12:51 PM Gareth Ellis @.***> wrote:

Thank you. Would you like a PR for the second deprecation?

— Reply to this email directly, view it on GitHub https://github.com/greenlion/PHP-SQL-Parser/issues/347#issuecomment-1024468689, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADRTNU6MNXPLWQG2URK5XTUYLJTBANCNFSM5LHZOS6Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

garethellis36 commented 2 years ago

It doesn't look like it's possible to run the test suite on PHP 8.1 because the PHPUnit version is ~4 in composer.json

greenlion commented 2 years ago

Ok, I'll check it out. I will have to update the test suite. Will do this weekend.

On Fri, Jan 28, 2022, 12:58 PM Gareth Ellis @.***> wrote:

It doesn't look like it's possible to run the test suite on PHP 8.1 because the PHPUnit version is ~4 in composer.json

— Reply to this email directly, view it on GitHub https://github.com/greenlion/PHP-SQL-Parser/issues/347#issuecomment-1024473454, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADRTNSVHUCBSCMZP7IFGLDUYLKLBANCNFSM5LHZOS6Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

nicoder commented 2 years ago

hi @greenlion

I had a go at upgrading phpunit and making the test suite pass on php 8.1 without deprecations: https://github.com/greenlion/PHP-SQL-Parser/pull/350

greenlion commented 2 years ago

Thank you everybody for your help. All three fixes are merged today.

garethellis36 commented 2 years ago

Thanks! Do you have any plans for when you might tag this as a release?

greenlion commented 2 years ago

I can do that later today.

On Tue, Feb 1, 2022, 4:17 AM Gareth Ellis @.***> wrote:

Thanks! Do you have any plans for when you might tag this as a release?

— Reply to this email directly, view it on GitHub https://github.com/greenlion/PHP-SQL-Parser/issues/347#issuecomment-1026626185, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADRTNUK466VT5Z5HR5R44TUY6QJJANCNFSM5LHZOS6Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you modified the open/close state.Message ID: @.***>

greenlion commented 2 years ago

Done.

On Tue, Feb 1, 2022 at 4:48 AM Justin Swanhart @.***> wrote:

I can do that later today.

On Tue, Feb 1, 2022, 4:17 AM Gareth Ellis @.***> wrote:

Thanks! Do you have any plans for when you might tag this as a release?

— Reply to this email directly, view it on GitHub https://github.com/greenlion/PHP-SQL-Parser/issues/347#issuecomment-1026626185, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADRTNUK466VT5Z5HR5R44TUY6QJJANCNFSM5LHZOS6Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you modified the open/close state.Message ID: @.***>