j4mie / idiorm

A lightweight nearly-zero-configuration object-relational mapper and fluent query builder for PHP5.
http://j4mie.github.com/idiormandparis/
2.01k stars 369 forks source link

Various fixes for php 8.1 compatibility #370

Closed edlerd closed 2 years ago

edlerd commented 2 years ago

~~There are breaking changes in 8.1 to the ArrayAccess interface. The changes adapt to the new typed interface. Various style fixes and an updated composer file. Since older php version will not be compatible, I am cutting any references in the travis file as well.~~ Edit: Found a more elegant solution by just annotating the ArrayAccess methods with #[\ReturnTypeWillChange]. This way everything stays backwards compatible and it works with php 8.1 as well.

anatol commented 2 years ago

Thanks for the PR.

Would it be possible to split PHP8.1 specific fixes from whitespace cleanup?

ondrejj commented 2 years ago

I can confirm, that this patch is required for php-8.1 and works.

treffynnon commented 2 years ago

Thanks for the PR, but I am closing it because it contains whitespace changes that are undesirable and there is a duplicate pull request without them: https://github.com/j4mie/idiorm/pull/372

treffynnon commented 2 years ago

Thanks - the core changes presented here have now been merged