contributte / nextras-orm-generator

:wolf: Rich Nextras\ORM entity generator for fast prototyping your new project.
https://contributte.org/packages/contributte/nextras-orm-generator.html
MIT License
20 stars 14 forks source link

PHP 8.1 incompability for Separed/Together configuration #32

Closed emololftw closed 2 years ago

emololftw commented 2 years ago

Stuff like this throw deprecated state:

$factory = new SimpleFactory(
    new SeparateConfig($config),
    new DatabaseAnalyser('mysql:host=localhost;dbname=development;port=3309', 'root')
);

Message:

Deprecated: Return type of Contributte\Nextras\Orm\Generator\Config\Config::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used t
o temporarily suppress the notice in C:\...\home\vendor\contributte\nextras-orm-generator\src\Config\Config.php on line 142

Quick fixes:

#[\ReturnTypeWillChange]
public function offsetGet($offset) {}
public function offsetGet($offset): mixed {}

on src/Config/Config.php

f3l1x commented 2 years ago

Can you prepare PR with annotation?

emololftw commented 2 years ago

Yes i do my first PR, please be patient with me 🔥

f3l1x commented 2 years ago

Patient is my second name. :-D