DEV Community

Discussion on: How to deprecate a type in php

 
aleksikauppila profile image
Aleksi Kauppila

Ah, with "it" i mean deprecating a type in php. As far as i'm concerned this is enough:

<?php

// LegacyFoo.php

/**
 * @deprecated please use ShinyNewFoo instead!
 */
interface LegacyFoo
{
    //...
}

But i also accept the fact that i may have missed some point in this article...

Thread Thread
 
greg0ire profile image
Grégoire Paris

This solution is enough in some situations. In others, you will need inheritance, and in some more complicated situations, you will have to resort to class aliases. That's what I failed to make perfectly clear in my article.