I try to follow this https://framework.zend.com/manual/2.2/en/modules/zend.db.sql.html and https://samsonasik.wordpress.com/2012/08/28/set-default-db-adapter-in-zend-framework-2/ create adapter to connect database. But I got an error:
Deprecated: You are retrieving the service locator from within the class Account\Controller\AController. Please be aware that ServiceLocatorAwareInterface is deprecated and will be removed in version 3.0, along with the ServiceLocatorAwareInitializer. You will need to update your class to accept all dependencies at creation, either via constructor arguments or setters, and use a factory to perform the injections. in D:\Programs\xampp\htdocs\wmsv2\vendor\zendframework\zend-mvc\src\Controller\AbstractController.php on line 258
I did many ways and long time to seach but not success. How do I connect to database? I’m using ZF 2.5.1.