summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Desportes <williamdes@wdes.fr>2018-06-05 23:07:26 +0200
committerWilliam Desportes <williamdes@wdes.fr>2018-06-05 23:53:48 +0200
commitb1ca941675c17e05e8a1b65af5ddec4b86c75c58 (patch)
tree2789afe824eb45da8c7a3af3bfec76662fcf0563
parent0302f26460e48273eb391327017520d6d9cf04d5 (diff)
downloadsql-parser-b1ca941675c17e05e8a1b65af5ddec4b86c75c58.zip
sql-parser-b1ca941675c17e05e8a1b65af5ddec4b86c75c58.tar.gz
sql-parser-b1ca941675c17e05e8a1b65af5ddec4b86c75c58.tar.bz2
Replace apigen with Sami in CI
- Removed apigen/apigen - Added sami/sami - Generated a configuration and added it in /tools/ as config-sami.php - Modified .travis.yml Closes: #194 Signed-off-by: William Desportes <williamdes@wdes.fr>
-rw-r--r--.travis.yml6
-rw-r--r--composer.json2
-rw-r--r--tools/sami-config.php22
3 files changed, 26 insertions, 4 deletions
diff --git a/.travis.yml b/.travis.yml
index 9b0becf..5d1570e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -19,7 +19,7 @@ matrix:
allow_failures:
- php: "nightly"
include:
- - php: "7.1"
+ - php: "7.2"
env: DOCS=yes
- php: "7.1"
env: REQUIRE="phpmyadmin/motranslator:^3.0"
@@ -29,7 +29,7 @@ matrix:
sudo: false
install:
- - if [ "$TRAVIS_PHP_VERSION" = "5.3" ] ; then sed -i '/apigen/D' composer.json ; fi
+ - if [ $(php -r "echo PHP_MAJOR_VERSION;") -lt 7 ] ; then sed -i '/sami/D' composer.json ; fi
- if [ -n "$REQUIRE" ] ; then composer require "$REQUIRE" ; fi
- composer install
@@ -42,4 +42,4 @@ cache:
script:
- if [ "$DOCS" != "yes" ] ; then ./vendor/bin/phpunit --configuration phpunit.xml ; fi
- - if [ "$DOCS" = "yes" ] ; then ./vendor/bin/apigen generate --destination doc --source src/ ; fi
+ - if [ "$DOCS" = "yes" ] ; then ./vendor/bin/sami.php --no-interaction update ./tools/sami-config.php ; fi
diff --git a/composer.json b/composer.json
index 7ef31f2..d6e1c09 100644
--- a/composer.json
+++ b/composer.json
@@ -20,7 +20,7 @@
"symfony/polyfill-mbstring": "^1.3"
},
"require-dev": {
- "apigen/apigen": "^4.1",
+ "sami/sami": "^4.0",
"phpunit/php-code-coverage": "*",
"phpunit/phpunit": "~4.8 || ~5.7 || ~6.5"
},
diff --git a/tools/sami-config.php b/tools/sami-config.php
new file mode 100644
index 0000000..39db4ed
--- /dev/null
+++ b/tools/sami-config.php
@@ -0,0 +1,22 @@
+
+<?php
+/**
+ * This file has been generated by phpmyadmin/scripts:/develdocs/build.sh
+ * @see https://github.com/phpmyadmin/scripts/blob/master/develdocs/sami.php
+ * @see https://github.com/phpmyadmin/scripts/blob/master/develdocs/build.sh
+ */
+use Sami\Sami;
+use Symfony\Component\Finder\Finder;
+
+$iterator = Finder::create()
+ ->files()
+ ->name("*.php")
+ ->in("./src")
+;
+
+return new Sami($iterator, array(
+ "title" => "A validating SQL lexer and parser with a focus on MySQL dialect.",
+ "build_dir" => "./doc/",
+ "cache_dir" => "./tmp"
+));
+