We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Trying to create a custom session adapter

Hello,

I'm trying to figure out why the custom session adapter class I wrote is not working. I created a class that implements \Phalcon\Session\AdapterInterface and included all of the methods listed on the docs page for Phalcon\Session\AdapterInterface. I'm getting a fatal error that says that my class' declaration of construct "must be compatible with that of Phalcon\Session\AdapterInterface::__construct()". Please let me know what I might be missing. Thanks.

Thank you, that worked. My problem was that my class was implementing the AdapterInterface without extending the Adapter class.