Using class_alias to maintain BC while moving/renaming classes
I've been using PHP for quite some time now, and I had never heard of class_alias
before reading this post by Fabian Schmengler.
Sometimes you want to rename a class or move it to a different namespace. But as soon as it is used anywhere outside the package, this is breaking backwards compatibility and should not be done lightheartedly.Luckily there is a way in PHP to have both, the old class and the new class, while deprecating the old one: class_alias().
What are your thoughts on "Using class_alias to maintain BC while moving/renaming classes"?