dolibarr/dev/skeletons
Raphaël Doursenaud bbe7498de6 Better Travis CI
NEW:
Cleaned up routines for better readability of both declaration and results.
PHP versions now really covered.
    The old code forced install of PHP and didn't use Travis provided versions.
    This resulted in the process not being executed with the declared PHP version.
Dropped MySQL in favor of MariaDB.
    This is now the FLOSS community standard.
    This should help avoid problems with buggy MySQL releases.
Fast finish enabled to show results faster.
Optimized tools installation with composer.
    The right version of the tool is installed for the PHP version under test.
New PHP linter to check for syntax errors.
    Parallelized for better speed.
Apache + PHP FPM for testing webservices.
    The previous mod_php configuration was not supported on Travis.
New global DEBUG environment variable to show verbose output with configuration files content.
IRC notification on #dolibarr@freenode for community awareness.

FIXES:
Bug in scripts preventing execution with environmentalized PHP.
Wrong detection of MAIN_URL_ROOT under specific circumstances.
    $_SERVER["DOCUMENT_ROOT"] empty and $_SERVER["SCRIPT_NAME"] populated.
Relative ignore directive in coding style ruleset to avoid bypassing test.
Unit test errors without an exit status.
    This prevented the CI from properly detecting and reporting the error.

TODOS:
PostgreSQL support.
    This one is tricky since we only have a MySQL dump and the syntax is not directly compatible.
SQLite support.
    Disabled in core at the moment.
Nginx + PHP FPM support.
    Test webservices on the second most popular webserver.
Run dev/* checks.
    We have a nice collection of scripts we could leverage.
Check Javascript.
Check CSS.
Check SQL.
2015-12-13 21:34:36 +01:00
..
.gitignore New: Add web service to get user 2011-10-18 15:55:06 +02:00
build_api_class.php Better Travis CI 2015-12-13 21:34:36 +01:00
build_class_from_table.php Better Travis CI 2015-12-13 21:34:36 +01:00
build_webservice_from_class.php Better Travis CI 2015-12-13 21:34:36 +01:00
modMyModule.class.php Fix text 2015-12-01 03:12:12 +01:00
README translation enhancement 2012-08-20 15:51:16 +02:00
skeleton_api_class.class.php Fix PHPCS 2015-05-06 00:55:42 +02:00
skeleton_card.php [Qual] Uniformize code 2015-11-12 11:59:15 +01:00
skeleton_class.class.php Add function getNomUrl on skeleton class. 2015-11-05 21:11:45 +01:00
skeleton_list.php Fix utf8 encoded twice 2015-11-28 14:40:23 +01:00
skeleton_script.php Better Travis CI 2015-12-13 21:34:36 +01:00
skeleton_webservice_server.php Fix: error reported by scrutinizer 2014-12-20 15:42:03 +01:00

README (English)
--------------------------------
This directory contains PHP script samples that can be used to start a development on Dolibarr.

build_class_from_table.php:
This is the script to use to generate PHP code of a PHP POJO class
object, a PHP script that use this POJO. This script use the files
skeleton_*.php to build its generated code. 


modMyModule.class.php:
Is a sample of module descriptor that you can use if you want to build a new module/plugin for
Dolibarr.


skeleton_script.php:
Is a sample you can use as an example if you need to build a script to run on command line

skeleton_page.php:
Is a sample you can use as an example if you need to build an HTML page to include in Dolibarr GUI.

skeleton_class.class.php:
Is a sample you can use as an example if you need to build a class file to access a new table required by a Dolibarr development.
However it is better to run the build_class_from_table.php script that accepts a table name as a parameter and will uses the description table within database and the skeleton_class.class.php file to generate full code for your class file.
After running this script, the class to access your table (insert a record, update, delete and select) is directly finished and can be used by your module's code. 
No more coding is needed to get access to table with this script because the file is completely generated once.