BabDev / Pagerfanta

Pagination library for PHP applications with support for several data providers
Other
381 stars 170 forks source link

Deprecations from within the package #13

Closed gnutix closed 4 years ago

gnutix commented 4 years ago

Since I've upgraded this package (along with Symfony 5.0 => 5.1), I have the following deprecations :

Since babdev/pagerfanta 2.2: The "Pagerfanta\PagerfantaInterface" interface is deprecated and will be removed in 3.0. Use the "Pagerfanta\Pagerfanta" class instead.
Since babdev/pagerfanta 2.2: The "Pagerfanta\Exception\Exception" interface is deprecated and will be removed in 3.0, exceptions should implement "Pagerfanta\Exception\PagerfantaException" instead.

However, I've noticed these two interfaces are not referenced from the project's code, but from this package itself. Any reason why it wasn't fixed when the deprecations triggers were introduced ?

mbabker commented 4 years ago

It’d be a B/C break to have the Pagerfanta class stop implementing the interface (I treat removing an interface from a class as a break as it will cause existing type checks to start failing), especially as there are some methods typehinting the interface instead of the class.

gnutix commented 4 years ago

Okay, that explains why it won't be done until the next major release. Thanks! :)