@apmuthu Thanks for testing this and providing your feedback. I've made some improvements to the packaging along the lines you suggest.
apmuthu wrote:@cambell: please provide one that is stripped of composer and unit tests so that the end user can deploy and extend without a steep learning / confusing curve. As Slim v2.x can be used without composer by using it's internal AutoLoad feature, all vendor dependencies can be eliminated.
I like using composer for development. I'm not wanting to remove it. However, my goal is the same as yours - that the end user can install and deploy easily. The goal is for users to be able to download a packaged release and put it in the folder. I agree that the packaging in my 2.4-1.0 didn't achieve that goal.
The unit tests were not present, however PHPUnit was. I've improved the packaging to exclude development dependencies from the vendor folder.
apmuthu wrote:Your release does not work.
Yes that was sadly true. Thanks for taking the time to test, that's much appreciated.
apmuthu wrote:You have removed the class SessionManager() in the session-custom.php (not updated to reflect this core commit) but referred to it in the code at line 46.
Sadly I've coded this against my version of Front Accounting which includes this pull request from January 2016 which separated out the session functions from the core session code. This reduces the copy / paste and makes implementing both unit tests and the REST API easier. I'll leave it to the FA community to solve that. I can say that if you use the same version of FA that I use it will work for you. I guess you can copy session_utils.inc into the folder and amend the pull-request.
apmuthu wrote:Also you are referring to a hardcoded non-existent file/folder name in the config_api.php file: _frontaccounting
You are referring to $rootPath but have initialised $rootpath in config_api.php - in fact it is sufficient for it to have just:
define('API_ROOT', '.');
define('FA_ROOT', './../..');
irrespective of whether it is hosted on Windows or on Linux to alleviate the effect of the DIRECTORY_SEPARATOR.
Yes, that's needed to make the Travis CI builds work. If you can think of another way of having Travis test a module without this technique do let me know.
apmuthu wrote:You will want to add in the following into an .htaccess file:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
I've included the .htaccess file in the packages.
apmuthu wrote:Your api module just does not work. Tested in FA 2.4.3+, PHP 5.3.1.
Well, it doesn't work for you. It works for me, and it works on Travis. There's the session_utils issue which can be solved by using my version, accepting the pull request from Jan 2016, or copying the session_utils file into the REST API folder.