Tharos / LeanMapper

Lean Mapper is a tiny ORM based on powerful Dibi database abstraction library for PHP.
MIT License
87 stars 35 forks source link

PHP 8.1 #162

Closed f3l1x closed 2 years ago

f3l1x commented 2 years ago

Hi. Thank you for library. We use this library in contributte/datagrid and it fails in PHP 8.1.

https://github.com/contributte/datagrid/runs/5158184387?check_suite_focus=true

-- FAILED: RowTest.phpt
   Exited with error code 255 (expected 0)
   E_DEPRECATED: Optional parameter $entity declared before required parameter $property is implicitly treated as a required parameter

   in src/LeanMapper/Entity.php(764) 
   in vendor/composer/ClassLoader.php(571) Tester\TestCase->Tester\{closure}()
   in vendor/composer/ClassLoader.php(571) include()
   in vendor/composer/ClassLoader.php([42](https://github.com/contributte/datagrid/runs/5158184387?check_suite_focus=true#step:6:42)8) Composer\Autoload\includeFile()
   in Cases/Utils/LeanBookEntity.php(15) Composer\Autoload\ClassLoader->loadClass()
   in vendor/composer/ClassLoader.php(571) include()
   in vendor/composer/ClassLoader.php(428) Composer\Autoload\includeFile()
   in tests/Cases/RowTest.phpt(86) Composer\Autoload\ClassLoader->loadClass()
   in src/Framework/TestCase.php(128) Ublaboo\DataGrid\Tests\Cases\RowTest->testLeanMapperEntity()
   in src/Framework/TestCase.php(59) Tester\TestCase->runTest()
   in tests/Cases/RowTest.phpt(99) Tester\TestCase->run()

Would it be possible to update it to PHP 8.1? Thank you very much.

janpecha commented 2 years ago

Hi @f3l1x, thanks for report. I will fix it but not until tuesday, I'm offline right now.

uestla commented 2 years ago

@f3l1x Could you please test contributte/datagrid using this fork branch https://github.com/uestla/LeanMapper/tree/fix-162?
I tried to fix the library for PHP 8.1.

janpecha commented 2 years ago

@f3l1x Released new version 4.0.3