Merge #16273 - Fix #14644 - Use Doctum instead of Sami

Pull-request: #16273
Fixes: #14644

Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2020-08-15 15:40:18 +02:00
commit d387e4d0d7
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889
6 changed files with 28 additions and 25 deletions

1
.gitattributes vendored
View File

@ -14,3 +14,4 @@ phpcs.xml.dist export-ignore
phpstan.neon.dist export-ignore
DCO export-ignore
.editorconfig export-ignore
test/doctum-config.php export-ignore

View File

@ -172,8 +172,8 @@ jobs:
before_script: skip
after_script: skip
after_success: skip
install: composer global require "sami/sami:^4.0"
script: $HOME/.composer/vendor/bin/sami.php --no-interaction update ./test/sami-config.php
install: composer global require "code-lts/doctum:^5.0"
script: $HOME/.composer/vendor/bin/doctum.php --no-interaction update ./test/doctum-config.php
- stage: "Other tests"
name: "Build release"

View File

@ -34,7 +34,7 @@
<arg name="extensions" value="php"/>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/test/sami-config.php</exclude-pattern>
<exclude-pattern>*/test/doctum-config.php</exclude-pattern>
<exclude-pattern>*/tmp/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/libraries/cache/*</exclude-pattern>

View File

@ -55,7 +55,7 @@ parameters:
- %rootDir%/../../../vendor/*
- %rootDir%/../../../node_modules/*
- %rootDir%/../../../test/bootstrap-phpstan.php
- %rootDir%/../../../test/sami-config.php
- %rootDir%/../../../test/doctum-config.php
- %rootDir%/../../../themes/*/css/*.css.php
- %rootDir%/../../../examples/signon-script.php
- %rootDir%/../../../examples/openid.php

23
test/doctum-config.php Normal file
View File

@ -0,0 +1,23 @@
<?php
/**
* This file has been generated by phpmyadmin/scripts/develdocs/build.sh
* @see https://github.com/phpmyadmin/scripts/blob/master/develdocs/doctum.php
* @see https://github.com/phpmyadmin/scripts/blob/master/develdocs/build.sh
*/
use Doctum\Doctum;
use Symfony\Component\Finder\Finder;
use Doctum\RemoteRepository\GitHubRemoteRepository;
$root = realpath(__DIR__ . '/../') . '/';
$iterator = Finder::create()
->files()
->name('*.php')
->in($root . 'libraries');
return new Doctum($iterator, [
'title' => json_decode(file_get_contents($root . 'composer.json'))->description,
'build_dir' => $root . 'build/apidocs/',
'cache_dir' => $root . 'tmp/',
'remote_repository' => new GitHubRemoteRepository('phpmyadmin/phpmyadmin', $root),
]);

View File

@ -1,21 +0,0 @@
<?php
/**
* @package PhpMyAdmin-test
* 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("./libraries")
;
return new Sami($iterator, [
"title" => "MySQL web administration tool",
"build_dir" => "./build/apidocs/",
"cache_dir" => "./tmp"
]);