Skip to content

Instantly share code, notes, and snippets.

@chrisguitarguy
Created February 14, 2016 17:06
Show Gist options
  • Save chrisguitarguy/b65ed477ee19529ee332 to your computer and use it in GitHub Desktop.
Save chrisguitarguy/b65ed477ee19529ee332 to your computer and use it in GitHub Desktop.
Update calls to `createForm` in Symfony controllers to use class names instead of instances
find path/to/Bundle/Controller -type f -name '*.php' -exec sed -i '' 's/createForm(new \(.*\)()/createForm(\1::class/' {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment