envms / fluentpdo

A PHP SQL query builder using PDO
http://envms.github.io/fluentpdo/
926 stars 189 forks source link

PHP 8.0 support #311

Closed levacic closed 2 years ago

levacic commented 3 years ago

I couldn't find any issues mentioning this so opening a new one.

The current README mentions:

Version 2.x

The stable release of FluentPDO and actively maintained. Officially supports PHP 7.3 to PHP 8.0, but it can work with previous versions of PHP 7.

However, this apparently does not actually include PHP 8.0, as the current composer.json has this constraint:

"php": "^7.1"

Thus, it's not possible to actually install this package in a PHP 8.0 environment (unless Composer is told to ignore platform requirements, which is bad practice).

Furthermore, the .travis.yml file is configured so as not to test the code on PHP 8.0.

Are there any plans to make Version 2.x compatible with PHP 8.0? Thanks!

cbornhoft commented 3 years ago

Hey @levacic, good catch, thanks!

I'll update the constraints to include both 7 and 8. I have tested PHP 8 within my development environment, so I do know it works there. Updating Travis could be quick and easy, or a pain depending on what else they changed along with 8.

levacic commented 3 years ago

Hi @cbornhoft, do you need any help with this, in the form of a PR or something? If so, what would you like changed except for the composer.json constraint (where I'd suggest just replacing ^7.1 with ^7.1|^8.0).

I've checked the other dependencies of this package (there's only two dev dependencies, so not much to check anyway):

I haven't used Travis in a long time, so I'm not sure if just adding PHP 8.0 to .travis.yml should do the trick?

Note that I didn't actually do any PHP 8 compatibility testing for this package, I'm just assuming that it works correctly based on your comment.

Thanks for the help!

cbornhoft commented 3 years ago

Absolutely, help is always welcome! Feel free to make a PR with the changes, and Travis should pick it up to test.

If you aren't able to figure it out, I should have some time early next week to take a look. Work has been busier than anticipated right now.