I have the same problem. I can do brew doctor early on today, but just now I did brew update and then I have the same error message when I tried to run brew doctor
Same problem here as well. My config is virtually identical to the one posted by Diwoka at the gist above.
+1 for 10.8.2
+1 10.8.2 (osx) with 0.9.3 (brew)
Where does "ComposerRequirement" come from?
Error: undefined method `keg_only?' for #<ComposerRequirement:0x101209d18 @tags=["composer-requirement"]>
This is a problem with brew tap, files in the requirements directory of homebrew-php are getting symlinked into Library/Formula and Formula.factory is trying to load them as formulae.
I did just update/upgrade php54 / composer before getting this error, and removing any of the *-requirement files from /usr/local/Library/Formula got me back brewing for now.
I did brew update just now. And it seems brew doctor back to normal.
Rolling this into #16121.