Following command was used: $ find application/ library/Icinga/ modules/ -name *.php | xargs sed -i -e :a -e '/./,$!d;/^\n*$/{$d;N;};/\n$/ba;$a\'
The constructor of the class is now private, instantiation happens with Url::fromRequest and Url::fromPath. Also updated all occurences of Url and fixed the Qlink helper to not overwrite the baseUrl with null values refs #4381