Skip to content

Commit f9c7a27

Browse files
committed
Use Doctum instead of Sami
Signed-off-by: William Desportes <[email protected]>
1 parent c16d39d commit f9c7a27

File tree

5 files changed

+34
-27
lines changed

5 files changed

+34
-27
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
composer.phar
33
composer.lock
44
/vendor/
5-
/doc/
5+
/build/
66
.php_cs.cache
77
phpunit.xml
88
coverage.xml

.scrutinizer.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ checks:
33

44
filter:
55
excluded_paths:
6-
- ci/sami-config.php
6+
- ci/doctum-config.php
77

88
dependency_paths:
99
- vendor/

.travis.yml

+9-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ matrix:
1717
allow_failures:
1818
- php: nightly
1919
include:
20-
- php: 7.1
21-
name: "Documentation"
22-
script: vendor/bin/sami.php --no-interaction update ./ci/sami-config.php
2320
- php: 7.1
2421
name: "Coding standard"
2522
script: vendor/bin/phpcs
@@ -34,6 +31,15 @@ matrix:
3431
env: DBASE=yes
3532
install:
3633
- composer install --no-interaction --ignore-platform-reqs
34+
- php: 7.2
35+
name: "API docs"
36+
before_install: phpenv config-rm xdebug.ini
37+
after_success: skip
38+
install:
39+
- composer global require "code-lts/doctum:^5.0"
40+
- composer install --no-interaction
41+
script:
42+
- $HOME/.composer/vendor/bin/doctum.php --no-interaction update ./ci/doctum-config.php
3743

3844
before_install:
3945
- |

ci/doctum-config.php

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
/**
3+
* This file has been generated by phpmyadmin/scripts/develdocs/build.sh
4+
* @see https://github.com/phpmyadmin/scripts/blob/master/develdocs/doctum.php
5+
* @see https://github.com/phpmyadmin/scripts/blob/master/develdocs/build.sh
6+
*/
7+
use Doctum\Doctum;
8+
use Symfony\Component\Finder\Finder;
9+
use Doctum\RemoteRepository\GitHubRemoteRepository;
10+
11+
$root = realpath(__DIR__ . '/../') . '/';
12+
13+
$iterator = Finder::create()
14+
->files()
15+
->name('*.php')
16+
->in($root . 'src');
17+
18+
return new Doctum($iterator, [
19+
'title' => json_decode(file_get_contents($root . 'composer.json'))->description,
20+
'build_dir' => $root . 'build/apidocs/',
21+
'cache_dir' => $root . 'tmp/',
22+
'remote_repository' => new GitHubRemoteRepository('phpmyadmin/shapefile', $root),
23+
]);

ci/sami-config.php

-22
This file was deleted.

0 commit comments

Comments
 (0)