Skip to content

Commit e096412

Browse files
authored
Merge pull request #195 from williamdes/issue-194-apigen
Replace apigen with Sami in CI
2 parents ffd2d89 + 981c499 commit e096412

File tree

4 files changed

+27
-4
lines changed

4 files changed

+27
-4
lines changed

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ matrix:
1919
allow_failures:
2020
- php: "nightly"
2121
include:
22-
- php: "7.1"
22+
- php: "7.2"
2323
env: DOCS=yes
2424
- php: "7.1"
2525
env: REQUIRE="phpmyadmin/motranslator:^3.0"
@@ -29,7 +29,7 @@ matrix:
2929
sudo: false
3030

3131
install:
32-
- if [ "$TRAVIS_PHP_VERSION" = "5.3" ] ; then sed -i '/apigen/D' composer.json ; fi
32+
- if [ $(php -r "echo PHP_MAJOR_VERSION;") -lt 7 ] ; then sed -i '/sami/D' composer.json ; fi
3333
- if [ -n "$REQUIRE" ] ; then composer require "$REQUIRE" ; fi
3434
- composer install
3535

@@ -42,4 +42,4 @@ cache:
4242

4343
script:
4444
- if [ "$DOCS" != "yes" ] ; then ./vendor/bin/phpunit --configuration phpunit.xml ; fi
45-
- if [ "$DOCS" = "yes" ] ; then ./vendor/bin/apigen generate --destination doc --source src/ ; fi
45+
- if [ "$DOCS" = "yes" ] ; then ./vendor/bin/sami.php --no-interaction update ./tools/sami-config.php ; fi

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"symfony/polyfill-mbstring": "^1.3"
2121
},
2222
"require-dev": {
23-
"apigen/apigen": "^4.1",
23+
"sami/sami": "^4.0",
2424
"phpunit/php-code-coverage": "*",
2525
"phpunit/phpunit": "~4.8 || ~5.7 || ~6.5"
2626
},

src/Components/CaseExpression.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ public function __construct()
7272
/**
7373
* @param Parser $parser the parser that serves as context
7474
* @param TokensList $list the list of tokens that are being parsed
75+
* @param array $options parameters for parsing
7576
*
7677
* @return CaseExpression
7778
*/

tools/sami-config.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
<?php
3+
/**
4+
* This file has been generated by phpmyadmin/scripts:/develdocs/build.sh
5+
* @see https://github.com/phpmyadmin/scripts/blob/master/develdocs/sami.php
6+
* @see https://github.com/phpmyadmin/scripts/blob/master/develdocs/build.sh
7+
*/
8+
use Sami\Sami;
9+
use Symfony\Component\Finder\Finder;
10+
11+
$iterator = Finder::create()
12+
->files()
13+
->name("*.php")
14+
->in("./src")
15+
;
16+
17+
return new Sami($iterator, array(
18+
"title" => "A validating SQL lexer and parser with a focus on MySQL dialect.",
19+
"build_dir" => "./doc/",
20+
"cache_dir" => "./tmp"
21+
));
22+

0 commit comments

Comments
 (0)