dg / dibi

Dibi - smart database abstraction layer
https://dibiphp.com
Other
487 stars 136 forks source link

Nette 3.0 Bridge + Tracy Panel #296

Closed elcheco closed 5 years ago

elcheco commented 6 years ago

There's an incompatibility in latest Dibi 4.0 causing BC break on $container->setClass() which should be changed to 'setFactory' in Nette 3.0 in the class DibiExtension22

I did a fork for myself and created DibiExtension30 and changed it there to setFactory and everything is working again.

You can see the changes here: https://github.com/mkoula/dibi/commit/0c9f61db2563e3ad1c5c92308dbc50f04c94220f

But because it's early phase of Nette 3.0 and I decided on a project which will go live in a couple of months to use already Nette 3.0 - so I solved it for now by this little hack and changing composer.json repository settings to mine, but I can imagine you'll see some better solution for that maybe and that's why I am not going the pull request way...

dg commented 6 years ago

setFactory should work in Nette 2.2, so I think it can be simply fixed in DibiExtension22

elcheco commented 6 years ago

Ok. Shall I do the PR for you then or you will do it on master? 😄

elcheco commented 6 years ago

As I am having 2.4 and 3.0 - in 2.4 DI it worked, but in 3.0 it strictly said - just factory is allowed, so that why for now I went this way, I just wanted to report it...

dg commented 6 years ago

PR for master would be fine

elcheco commented 6 years ago

Will do 👍