I am trying to use ORB RedBean ( http://redbeanphp.com ) to implement the UserInterface and UserProviderInterface Silex security provider package.
Due to the way RedBean ORM handles functions for its objects, I needed to wrap the bean object in another class.
This works great for authentication, but does not run tests for the Remember Me feature.
I noticed that somewhere along the chain, the security package is serializing the object.
I thought maybe this was the cause of the error, so I created the properties for "id" and "password" in my wrapper class and used the __sleep and __wakeup methods to ignore the bean during sleep and reload it when waking up. Despite the fact that everything loads normally during __wakeup, the test for the Remember Me function still does not work.
I created the github repository of my code. If anyone has any ideas, I would really appreciate it!
For some reason, RedBean, Silex, and PHPUnit do not allow themselves to be included in the repository. A simple update for the composer should bring them out for you. If anyone has any ideas, I would also appreciate an answer.
The github repository can be found at:
https://github.com/christianmagill/silex-redbean-security
Attached Files
To create a test user in the database:
/setup.php
To run the test:
/index.php
My implementation of UserInterface:
/src/App/Model/UserSecurityWrapper.php
My implementation of UserProviderInterface:
/src/App/Model/UserProvider.php
My modified testing:
/src/App/Test/RememberMeRedBeanServiceProviderTest.php
Source test:
/vendor/silex/silex/tests/Silex/Tests/Provider/RememberMeServiceProviderTest.php