DavidePastore / Slim-Validation

A validation library for the Slim Framework. It internally uses Respect/Validation.
170 stars 30 forks source link

Add support for Slim 4 #48

Closed carlosafonso closed 1 year ago

carlosafonso commented 4 years ago

Hi,

Thank you for your work on this package.

It seems that Slim 4 is currently not supported. Middlewares in Slim 4 no longer receive $next as the third argument, so this makes it incompatible with this package at this time.

See the Middleware doc for v3 (http://www.slimframework.com/docs/v3/concepts/middleware.html) and v4 (http://www.slimframework.com/docs/v4/concepts/middleware.html) to compare.

DavidePastore commented 4 years ago

Hi @carlosafonso . Thanks for reporting this issue. I try to find time to make this change. In the meantime if you already have a change ready for Slim-Validation to be compatible with Slim v4, I'd be more than happy to merge it.

carlosafonso commented 4 years ago

Thanks @DavidePastore , I might try to give it a go if I find the time these days. Just a question: in case there's no way to make it backwards-compatible, how would you like to support both versions? By branching maybe?

DavidePastore commented 4 years ago

Yes @carlosafonso , we'll create different branches for different Slim releases. We'll have something like the 3.* and the 4.* branches.

M-Shahbaz commented 4 years ago

Hi, I updated for slim 4 support: https://github.com/DavidePastore/Slim-Validation/pull/55

Please review. Thanks,