bestit / flagception-sdk

A simple and powerful feature toggle library for php.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dont rely on PHP globals for cookies

Haehnchen opened this issue · comments

For activating cookies there is a directy access to $_COOKIE, for now its not suitable to use together with the Symfony bundle.

You should move this loading into a interface and maybe provide here just an implementation via globals. The Symfony bundle should then use a RequestStack implementation.

return in_array($name, array_map('trim', explode($this->separator, $_COOKIE[$this->name])), true);

Thanks for the hint @Haehnchen. I will check it ...

Merged into master.

A PR for Bundle will be created shortly.