I'm not familiar with StackPHP but how agnostic is it? The first middleware listed (HttpCache) relies heavily on Symfony.
You don't need to download the entire Symfony framework
It does tie you into the Symfony Request object, but otherwise there are no other dependencies.