This will need to be tagged as version ^3. I have created a new 2 branch, which we can use for ongoing support for Silverstripe 4.
Removal of setter methods
Removed the following methods from RedirectedURL:
setFromBase() (setter for field FromBase)
setFromQuerystring() (setter for field FromQuerystring)
Replaced them with a more explicit onBeforeWrite(). For me, this removes some of the "magic" that is not obvious to anyone (including me) who is not familiar with the setter/getter magic method paradigm.
New major
This will need to be tagged as version
^3
. I have created a new2
branch, which we can use for ongoing support for Silverstripe 4.Removal of setter methods
Removed the following methods from
RedirectedURL
:setFromBase()
(setter for fieldFromBase
)setFromQuerystring()
(setter for fieldFromQuerystring
)Replaced them with a more explicit
onBeforeWrite()
. For me, this removes some of the "magic" that is not obvious to anyone (including me) who is not familiar with the setter/getter magic method paradigm.There is also a regression in Silverstripe 5: https://github.com/silverstripe/silverstripe-framework/issues/10707
The removal of these methods means that we are not going to be affected by this.
Methods removed
RedirectedURLHandler
had two classes that were not being directly used, and can instead be directly accessed through the newSupport
classes.arrayToLowercase()
getRedirectCode()
Updated API
Updated property and return types wherever possible.
Trailing slashes
Trailing slashes for URLs is now configurable in Silverstripe 5, and the default is that they are disabled. Updated unit tests accordingly.