roave/dont

A small set of traits that can be used to prevent misuse of your objects

1.5.0 2021-11-24 13:43 UTC

This package is auto-updated.

Last update: 2021-11-24 13:44:34 UTC


README

roave/dont is a small PHP package aimed at enforcing good practices when it comes to designing defensive code.

Infection MSI Packagist Packagist

Installation

composer require roave/dont

Usage

The package currently provides the following traits:

Usage is straightforward:

use Dont\DontSerialise;

class MyClass
{
    use DontSerialise;
}

serialize(new MyClass); // will throw an exception