Roave / StrictPhp

:no_entry_sign: :sparkles: :heavy_exclamation_mark: AOP-based strict type checks for PHP
MIT License
261 stars 8 forks source link

Make enabled interceptors configurable #45

Closed Ocramius closed 9 years ago

Ocramius commented 9 years ago

As per current setup, StrictPhp is probably too strict for most libraries.

We may want to allow enabling/disabling of the various interceptors in StrictPhp.

A small "facade" in front of the singleton kernel may do the trick.

ovr commented 9 years ago

:+1:

danizord commented 9 years ago

"facade", mhmmm

Ocramius commented 9 years ago

@danizord a real Façade, not a Laravel facade.

TomasVotruba commented 9 years ago

:+1:

Ocramius commented 9 years ago
StrictPhp\StrictPhp::init([
    StrictPhp\StrictPhp::POST_CONSTRUCT_CHECKS,
    StrictPhp\StrictPhp::PARAMETER_INTERFACE_JAILING,
    StrictPhp\StrictPhp::PARAMETER_STRICT_TYPE_CHECKING,
    StrictPhp\StrictPhp::PROPERTY_WRITE_TYPE_CHECKING,
    StrictPhp\StrictPhp::POST_PUBLIC_METHOD_CALL_STATE_CHECKS,
    // ...
]);
malukenho commented 9 years ago

Closed as done in #48