roave/dont is a small PHP package aimed at enforcing good
practices when it comes to designing
defensive code.
composer require roave/dontThe package currently provides the following traits:
Dont\DontDeserialiseDont\DontSerialiseDont\DontCloneDont\DontGetDont\DontSetDont\DontCallDont\DontCallStaticDont\JustDont
Usage is straightforward:
use Dont\DontSerialise;
class MyClass
{
use DontSerialise;
}
serialize(new MyClass); // will throw an exceptionThe same applies to DontDeserialise, but this
time with unserialize().
Dont\JustDont includes other seven traits and is the recommended one to use.

