On Sun, Jun 3, 2012 at 11:19 AM, Harry Burt <[email protected]> wrote:
> Hey all, > > As per the commentary on bug #32987, it might be desirable to change the > constructor for ThumbnailImage from: > > $foo = new ThumbnailImage( $file, $url, $width, $height, $path, $page ); > > to: > > $foo = new ThumbnailImage( $file, $url, $params ); > > where $params in an associative array containing width, height and any > other parameters we want to have now or in the future. Obviously, at the > same time as any change to the constructor is made, all the references in > core and Gerrit-tracked extensions can be switched over to the new format. > However, I was wondering what people consider best practice with regard to > softening the transition in order to avoid non-Gerrit-tracked extensions > breaking. > > I've thrown up one idea at http://pastebin.com/Jw109j4a . > > You could consider using func_get_args() instead of explicitly providing the back compat arguments. I'm not sure which version has preference. Bryan _______________________________________________ Wikitech-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikitech-l
