Last active
March 17, 2021 12:53
-
-
Save Tjitse-E/7f420f03078f38a7244556fe65e731f4 to your computer and use it in GitHub Desktop.
PHPunit 6 to 9, change 'protected function setup' to 'public function setup'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Requires gsed (Mac OSX) or sed (Linux) | |
targets=$(grep -HRl "function setUp()" app) | |
for i in ${targets}; do | |
echo $i | |
/usr/local/bin/gsed -i 's/[a-zA-Z]\+ function setUp().*/protected function setUp(): void/' "$i" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment