dhumphreys / cfwheels-coldroute

Plugin to add namespaces and REST routing to CFWheels
21 stars 13 forks source link

Ensure CF8 and Railo compatibility #12

Open dhumphreys opened 13 years ago

dhumphreys commented 13 years ago

I am mainly concerned about the usage of getFunctionCalledName() and throw() methods from CF9. There may be other syntax issues that we missed during clean up.

@webonix can you help me with testing this and provide necessary fixes?

dhumphreys commented 13 years ago

Found some implicit array constructors in the match() method where route names are created.

Edit: Implicit array construction is allowed, to some degree, in CF8.

dhumphreys commented 13 years ago

Railo compatibility will have to wait until next release.

liferealized commented 12 years ago

Railo currently does not support getFunctionCalledName() but there is an open ticket from Mark Mandel to have this corrected.

dhumphreys commented 12 years ago

That would definitely be an issue. I have wanted to handle this with onMissingMethod(), but it only works when invoked on an object. So this.itemsPath() works but itemsPath() would not. That is why each named route helper is just a function pointer. Unfortunate that this relies on getFunctionCalledName(). I am open to switching methodologies if you have any suggestions.

liferealized commented 12 years ago

I do not see another way for it to work either. We are going to continue to use linkTo() and startFormTag() with the changes I made to it for now. We are using railo though, so I will keep track of getFunctionCalledName() and let you know if anything changes.

chrisdpeters commented 8 years ago

FYI (years later), this is working mostly fine with Lucee 5.

The only issue I'm working on now is to get the regex patterns to work correctly.

An example regex from ACF: ^some/path\.(\w+)/?$

And from Lucee (and presumably Railo): ^some path\\.(\w+)/?$

Not sure why it's adding that extra \ character before the .. Looking into it now.

chrisdpeters commented 8 years ago

The regex issue outlined in my previous comment is resolved simply by upgrading Lucee to 5.0.0.525. Seems to be working well for me now with no modifications to this plugin.