letrunghieu / active

The helper class for Laravel applications to get active class base on current route
https://www.hieule.info/tag/laravel-active/
MIT License
414 stars 82 forks source link

Update from 2.x to 3.x #30

Closed mtx-z closed 7 years ago

mtx-z commented 8 years ago

I just tried to update my active version from 2.3.x to the latest release 3.x.

Well, this can be 'painful' if you work on a big project with a lot of uses of the package.

After discovering the implication of thisupdate, I decided to move back to my previous 2.x version. I think the string/array or the 'active' issues could be updated to match the functionnal 2.x behavior, but i may be wrong.

Anyway, 3.x updates seems pretty cool, from what i've tested and read.

ps: some infos could be partially or fully wrong, be sure that i love this awesome package !

letrunghieu commented 8 years ago

Hi @mtx-z

Thank you for using and loving this package. You can continue using the version 2.x. I still to bug fixes in that support branch.

About version 3:

Again, the new methods dont accept a stringas parameter. Only an arrayeven if you only have one single value to check with. So after updating the methods, you'll need to update your stringparameters to arrays

-> This was fixed in version 3.2.0

Some methods dont return an 'active' string defautly, but a true/false

-> I made that change to allow developers using my methods in more situation than just echoing "active" class.