Is there a way to skip a brew package when upgrading?
Another option is to pin the package to your current version.  Then brew won't try to upgrade it.  Later on it can be unpinned and upgraded.  Here are some of the relevant commands.
# To pin a package:
brew pin composer

# To list pinned packages:
brew list --pinned

# To see which version a package is pinned to:
brew info composer

# To unpin a package:
brew unpin composer