mustangostang / spyc

A simple YAML loader/dumper class for PHP
MIT License
701 stars 206 forks source link

Add class_exists() check #48

Closed tatemz closed 8 years ago

tatemz commented 8 years ago

I have ran into an issue within a few projects (specifically those involving wp-cli) where I am running into pre-defined class conflicts...

Consider taking the approach done by wp-cli.

if ( ! class_exists( 'Spyc' ) ) {
    class Spyc {
    ...
    }
}
realgeek commented 8 years ago

+1 Needed for auto updates with wp-cli.

eteubert commented 8 years ago

+1 Needed for WordPress plugin compatibilities. Right now I have to resort to a rather ugly hack to achieve the same effect.

tatemz commented 8 years ago

Thanks! 👍

Yay for supported repos! 💯