diff --git a/.travis.yml b/.travis.yml index 74d951bf7bf..37c04fecd7a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -50,7 +50,6 @@ env: matrix: fast_finish: true allow_failures: - - php: '7.0' - php: nightly # FIXME #- env: DB=postgresql @@ -79,7 +78,11 @@ before_install: install: - | echo "Updating Composer" + rm $TRAVIS_BUILD_DIR/composer.json + rm $TRAVIS_BUILD_DIR/composer.lock composer self-update + composer -n init + composer -n config vendor-dir htdocs/includes echo - | @@ -100,13 +103,14 @@ install: - | echo "Installing PHP CodeSniffer" - composer require squizlabs/php_codesniffer ^2 + composer -n require squizlabs/php_codesniffer ^2 echo - | - echo "Adding Composer binaries to the path" + echo "Adding path of binaries tools installed by composer to the PATH" export PATH="$TRAVIS_BUILD_DIR/htdocs/includes/bin:$PATH" echo + before_script: - | @@ -269,29 +273,31 @@ script: set +e cd htdocs/install php upgrade.php 3.5.0 3.6.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade350360.log - php upgrade2.php 3.5.0 3.6.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade350360-2.log - php step5.php 3.5.0 3.6.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade350360-3.log + php upgrade2.php 3.5.0 3.6.0 > $TRAVIS_BUILD_DIR/upgrade350360-2.log + php step5.php 3.5.0 3.6.0 > $TRAVIS_BUILD_DIR/upgrade350360-3.log php upgrade.php 3.6.0 3.7.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade360370.log - php upgrade2.php 3.6.0 3.7.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade360370-2.log - php step5.php 3.6.0 3.7.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade360370-3.log + php upgrade2.php 3.6.0 3.7.0 > $TRAVIS_BUILD_DIR/upgrade360370-2.log + php step5.php 3.6.0 3.7.0 > $TRAVIS_BUILD_DIR/upgrade360370-3.log php upgrade.php 3.7.0 3.8.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade370380.log - php upgrade2.php 3.7.0 3.8.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade370380-2.log - php step5.php 3.7.0 3.8.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade370380-3.log + php upgrade2.php 3.7.0 3.8.0 > $TRAVIS_BUILD_DIR/upgrade370380-2.log + php step5.php 3.7.0 3.8.0 > $TRAVIS_BUILD_DIR/upgrade370380-3.log php upgrade.php 3.8.0 3.9.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade380390.log - php upgrade2.php 3.8.0 3.9.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade380390-2.log - php step5.php 3.8.0 3.9.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade380390-3.log + php upgrade2.php 3.8.0 3.9.0 > $TRAVIS_BUILD_DIR/upgrade380390-2.log + php step5.php 3.8.0 3.9.0 > $TRAVIS_BUILD_DIR/upgrade380390-3.log php upgrade.php 3.9.0 4.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade390400.log - php upgrade2.php 3.9.0 4.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade390400-2.log - php step5.php 3.9.0 4.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade390400-3.log + php upgrade2.php 3.9.0 4.0.0 MAIN_MODULE_API > $TRAVIS_BUILD_DIR/upgrade390400-2.log + php step5.php 3.9.0 4.0.0 > $TRAVIS_BUILD_DIR/upgrade390400-3.log cd - set +e echo - + #cat $TRAVIS_BUILD_DIR/upgrade390400-2.log + #cat /tmp/dolibarr_install.log + - | echo "Unit testing" # Ensure we catch errors. Set this to +e if you want to go to the end to see log file. set -e - #phpunit -d memory_limit=-1 -c test/phpunit/phpunittest.xml test/phpunit/AllTests.php + phpunit -d memory_limit=-1 -c test/phpunit/phpunittest.xml test/phpunit/AllTests.php set +e - | diff --git a/COPYRIGHT b/COPYRIGHT index 99d5a189f99..b8cf93e595a 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -27,7 +27,7 @@ PHPExcel 1.8.1 LGPL-2.1+ Yes php-iban 1.4.7 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP PHPoAuthLib 0.8.2 MIT License Yes Library to provide oauth1 and oauth2 to different service PHPPrintIPP 1.3 GPL-2+ Yes Library to send print IPP requests -Restler 3.0 LGPL-3+ Yes Library to develop REST Web services +Restler 3.0.0RC6 LGPL-3+ Yes Library to develop REST Web services TCPDF 6.2.12 LGPL-3+ Yes PDF generation TCPDI 1.0.0 LGPL-3+ / Apache 2.0 Yes FPDI replacement Swift Mailer 5.4.2-DEV MIT license Yes Comprehensive mailing tools for PHP diff --git a/build/composer/README b/build/composer/README new file mode 100644 index 00000000000..d58359defec --- /dev/null +++ b/build/composer/README @@ -0,0 +1,10 @@ + +To test upgrade of a lib with composer: + +composer update --no-dev --no-autoloader --dry-run ccampbell/chromephp + +To upgrade a lib with composer: + +composer update --no-dev --no-autoloader ccampbell/chromephp + + diff --git a/composer.json b/composer.json index f4ea5de0c73..fb3109fbc40 100644 --- a/composer.json +++ b/composer.json @@ -12,15 +12,18 @@ "irc": "irc://chat.freenode.net/dolibarr", "source": "https://github.com/Dolibarr/dolibarr" }, + "config": { + "vendor-dir": "htdocs/includes" + }, "require": { "php": ">=5.3.0", "ext-curl": "*", - "ccampbell/chromephp": "^4.1", + "ccampbell/chromephp": "4.1.0", "ckeditor/ckeditor": "dev-full/stable", - "mike42/escpos-php": "dev-master", + "mike42/escpos-php": "1.2.1", "mobiledetect/mobiledetectlib": "2.8.17", "phpoffice/phpexcel": "1.8.1", - "restler/framework": "^3.0", + "restler/framework": "3.0.0-RC6", "tecnickcom/tcpdf": "6.2.12" }, "require-dev": { @@ -45,8 +48,5 @@ "ext-xml": "Excel support", "firephp/firephp-core": "Logging to Firebug console support", "raven/raven": "Sentry logging server support" - }, - "config": { - "vendor-dir": "htdocs/includes" } } diff --git a/composer.lock b/composer.lock index 43a9f1d2d7c..2e30ef6bd01 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "c2b53c577364dbe3a56137043081b511", - "content-hash": "8f7a86cfbc13f45e13b73c49531818cb", + "hash": "f666a32d1a59518b8ecc55899e829e79", + "content-hash": "8d110e7d8fca6eca1aa814ee35d0032b", "packages": [ { "name": "ccampbell/chromephp", @@ -56,12 +56,12 @@ "source": { "type": "git", "url": "https://github.com/ckeditor/ckeditor-releases.git", - "reference": "e3eb254641c4c349ffc19e49bd4a1a6831b5b6d0" + "reference": "4a7a6d717f9a408fa8f9ea53ef2dba4d64b83e91" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ckeditor/ckeditor-releases/zipball/e3eb254641c4c349ffc19e49bd4a1a6831b5b6d0", - "reference": "e3eb254641c4c349ffc19e49bd4a1a6831b5b6d0", + "url": "https://api.github.com/repos/ckeditor/ckeditor-releases/zipball/4a7a6d717f9a408fa8f9ea53ef2dba4d64b83e91", + "reference": "4a7a6d717f9a408fa8f9ea53ef2dba4d64b83e91", "shasum": "" }, "type": "library", @@ -89,27 +89,28 @@ "text", "wysiwyg" ], - "time": "2016-03-31 16:19:25" + "time": "2016-05-12 15:36:04" }, { "name": "mike42/escpos-php", - "version": "dev-master", + "version": "v1.2.1", "source": { "type": "git", "url": "https://github.com/mike42/escpos-php.git", - "reference": "96f05cbf460f5b67c2184ee4e91aedfbcedeb788" + "reference": "cfea4c4fc95516ac953e1e5b623f854632afa2ee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mike42/escpos-php/zipball/96f05cbf460f5b67c2184ee4e91aedfbcedeb788", - "reference": "96f05cbf460f5b67c2184ee4e91aedfbcedeb788", + "url": "https://api.github.com/repos/mike42/escpos-php/zipball/cfea4c4fc95516ac953e1e5b623f854632afa2ee", + "reference": "cfea4c4fc95516ac953e1e5b623f854632afa2ee", "shasum": "" }, "require": { "php": ">=5.3.0" }, "require-dev": { - "phpunit/phpunit": "4.5.*" + "phpunit/phpunit": "4.5.*", + "squizlabs/php_codesniffer": "2.*" }, "type": "library", "autoload": { @@ -152,7 +153,7 @@ "print", "receipt" ], - "time": "2016-03-27 23:08:27" + "time": "2016-04-25 01:14:07" }, { "name": "mobiledetect/mobiledetectlib", @@ -267,17 +268,17 @@ }, { "name": "restler/framework", - "version": "3.0.0", + "version": "3.0.0-RC6", "target-dir": "Luracast/Restler", "source": { "type": "git", "url": "https://github.com/Luracast/Restler-Framework.git", - "reference": "6ee10b3e5dbc6376916fed55ec2340a37cce436b" + "reference": "bfe1139b233852b745c6a0ec14d7244ceb3b3fc6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Luracast/Restler-Framework/zipball/6ee10b3e5dbc6376916fed55ec2340a37cce436b", - "reference": "6ee10b3e5dbc6376916fed55ec2340a37cce436b", + "url": "https://api.github.com/repos/Luracast/Restler-Framework/zipball/bfe1139b233852b745c6a0ec14d7244ceb3b3fc6", + "reference": "bfe1139b233852b745c6a0ec14d7244ceb3b3fc6", "shasum": "" }, "require": { @@ -286,23 +287,14 @@ "replace": { "luracast/restler": "3.*" }, - "require-dev": { - "bshaffer/oauth2-server-php": "v1.0", - "luracast/explorer": "*", - "mustache/mustache": "dev-master", - "rodneyrehm/plist": "dev-master", - "symfony/yaml": "*", - "twig/twig": "v1.13.0", - "zendframework/zendamf": "dev-master" - }, "suggest": { - "bshaffer/oauth2-server-php": "Restler can provide OAuth2 authentication using this library (see require-dev for details)", - "luracast/explorer": "Restler's very own api explorer (see require-dev for details)", - "mustache/mustache": "Restler can render HtmlView using mustache/handlebar templates (see require-dev for details)", - "rodneyrehm/plist": "Restler supports tho Apple plist xml format (see require-dev for details)", - "symfony/yaml": "Restler can produce content in yaml format as well (see require-dev for details)", - "twig/twig": "Restler can render HtmlView using twig templates (see require-dev for details)", - "zendframework/zendamf": "Support for the amf document format (see require-dev for details)" + "bshaffer/oauth2-server-php": "If you want to use OAuth2 for authentication", + "illuminate/view": "If you want to use laravel blade templates with Html format", + "mustache/mustache": "If you want to use mustache/handlebar templates with Html format", + "rodneyrehm/plist": "If you need Apple plist binary/xml format", + "symfony/yaml": "If you need YAML format", + "twig/twig": "If you want to use twig templates with Html format", + "zendframework/zendamf": "If you need AMF format" }, "type": "library", "extra": { @@ -323,10 +315,6 @@ { "name": "Luracast", "email": "arul@luracast.com" - }, - { - "name": "Nick nickl- Lombard", - "email": "github@jigsoft.co.za" } ], "description": "Just the Restler Framework without the tests and examples", @@ -337,7 +325,7 @@ "rest", "server" ], - "time": "2015-08-04 07:52:49" + "time": "2016-02-28 15:57:37" }, { "name": "tecnickcom/tcpdf", @@ -408,7 +396,7 @@ "minimum-stability": "stable", "stability-flags": { "ckeditor/ckeditor": 20, - "mike42/escpos-php": 20 + "restler/framework": 5 }, "prefer-stable": false, "prefer-lowest": false, diff --git a/dev/dolibarr_changes.txt b/dev/dolibarr_changes.txt index a7aed128151..82f364b0c1f 100644 --- a/dev/dolibarr_changes.txt +++ b/dev/dolibarr_changes.txt @@ -116,8 +116,15 @@ JQUERYFILETREE: RESTLER: -------- - if ($className == 'Luracast\Restler\string') return; - if ($className == 'Luracast\Restler\mixed') return; - +* Add 2 lines into function + private function alias($className, $currentClass) + { + ... +to get + private function alias($className, $currentClass) + { + if ($className == 'Luracast\Restler\string') return; + if ($className == 'Luracast\Restler\mixed') return; + ... \ No newline at end of file diff --git a/dev/skeletons/build_class_from_table.php b/dev/skeletons/build_class_from_table.php index 4de319dabc9..ecdbbd09dc4 100755 --- a/dev/skeletons/build_class_from_table.php +++ b/dev/skeletons/build_class_from_table.php @@ -180,7 +180,7 @@ if (! $sourcecontent) } // Define output variables -$outfile='out.'.$classmin.'.class.php'; +$outfile=$classmin.'.class.php'; $targetcontent=$sourcecontent; // Substitute module name @@ -259,7 +259,7 @@ foreach($property as $key => $prop) if ($addfield) { $varprop.="\t\t\$sql.= '".$prop['field']; - if ($i <= count($property)-$no_output_field) $varprop.=","; + if ($i < (count($property)-$no_output_field)) $varprop.=","; $varprop.="';"; $varprop.="\n"; } @@ -455,9 +455,9 @@ else $error++; //-------------------------------------------------------------------- $skeletonfiles=array( - $path.'skeleton_script.php' => 'out.'.$classmin.'_script.php', - $path.'skeleton_list.php' => 'out.'.$classmin.'_list.php', - $path.'skeleton_card.php' => 'out.'.$classmin.'_card.php' + $path.'skeleton_script.php' => $classmin.'_script.php', + $path.'skeleton_list.php' => $classmin.'_list.php', + $path.'skeleton_card.php' => $classmin.'_card.php' ); foreach ($skeletonfiles as $skeletonfile => $outfile) @@ -670,5 +670,5 @@ foreach ($skeletonfiles as $skeletonfile => $outfile) // -------------------- END OF BUILD_CLASS_FROM_TABLE SCRIPT -------------------- -print "You can now rename generated files by removing the 'out.' prefix in their name and store them into directory /yourmodule/class (for .class.php file) or /yourmodule.\n"; +print "You can now move generated files to store them into directory /yourmodule/class (for .class.php file) or /yourmodule.\n"; return $error; diff --git a/dev/skeletons/skeleton_list.php b/dev/skeletons/skeleton_list.php index 78f17dc1a63..f1413bb3712 100644 --- a/dev/skeletons/skeleton_list.php +++ b/dev/skeletons/skeleton_list.php @@ -266,7 +266,8 @@ if ($resql) $num = $db->num_rows($resql); $params=''; - if ($search_field1 != '') $params.= '&search_field1='.urlencode($search_field1); + if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; + if ($search_field1 != '') $params.= '&search_field1='.urlencode($search_field1); if ($search_field2 != '') $params.= '&search_field2='.urlencode($search_field2); if ($optioncss != '') $param.='&optioncss='.$optioncss; // Add $param from extra fields @@ -280,7 +281,7 @@ if ($resql) print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $params, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_companies', 0, '', '', $limit); - print '