Skip to content

Commit f93f5fa

Browse files
committed
Replace Sami by Doctum
Ref: phpmyadmin/phpmyadmin#14644 Signed-off-by: William Desportes <[email protected]>
1 parent b2e5668 commit f93f5fa

4 files changed

Lines changed: 26 additions & 25 deletions

File tree

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ matrix:
2525
name: "Build documentation"
2626
env:
2727
- DOCS=yes
28-
- REQUIRE="sami/sami:^4.0"
29-
script: ./vendor/bin/sami.php --no-interaction update ./tools/sami-config.php
28+
- REQUIRE="code-lts/doctum:^5.0"
29+
script: ./vendor/bin/doctum.php --no-interaction update ./tools/doctum-config.php
3030
after_success: skip
3131
- php: 7.1
3232
env: REQUIRE="phpmyadmin/motranslator:^3.0"

phpcs.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
<arg name="colors"/>
5656
<arg name="extensions" value="php"/>
5757

58-
<exclude-pattern>*/tools/sami-config.php</exclude-pattern>
58+
<exclude-pattern>*/tools/doctum-config.php</exclude-pattern>
5959

6060
<file>src</file>
6161
<file>tests</file>

tools/doctum-config.php

Lines changed: 23 additions & 0 deletions
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/sql-parser', $root),
23+
]);

tools/sami-config.php

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)