Skip to content
This repository has been archived by the owner on Mar 8, 2024. It is now read-only.

Update from 2.x to 3.x #30

Closed
mtx-z opened this issue Jul 23, 2016 · 1 comment
Closed

Update from 2.x to 3.x #30

mtx-z opened this issue Jul 23, 2016 · 1 comment

Comments

@mtx-z
Copy link

mtx-z commented Jul 23, 2016

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.

  • Active has been "rewritten with a absolutely new API", it mean you'll need to update all the method name you used (like Active::Pattern as example).
  • 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. It has been reported at Argument 1 passed to if_route() must be of the type array, string given #28
  • Some methods dont return an 'active' string defautly, but a true/false (1/0) as explained at only return '1' if match pattern #29

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
Copy link
Owner

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants