Override PHP Composer requirements

This is an interesting problem I recently encountered while developing a new package, how to override a requirement?

If Package A requires a stable version of a library Package B, but I want to do some bugfixes to Package B and test it before tagging a new release?

Luckily, there are inline aliases in Composer which can override the requirements inside a package using this syntax.

"eastwest/package-b": "dev-master as 2.3.0",