From: gggeek Date: Sun, 12 Dec 2021 18:58:41 +0000 (+0000) Subject: wip revive and split off doc generatin toolchain X-Git-Tag: plcapi-7.1-0~3^2~9 X-Git-Url: http://git.onelab.eu/?p=plcapi.git;a=commitdiff_plain;h=d20c6b4814808f6292298ae5cada12a7dd5b69eb wip revive and split off doc generatin toolchain --- diff --git a/composer.json b/composer.json index 9fd5985..3a241a5 100644 --- a/composer.json +++ b/composer.json @@ -15,18 +15,14 @@ "yoast/phpunit-polyfills": "*", "ext-curl": "*", "ext-dom": "*", - "ext-mbstring": "*", - "ext-xsl": "*", - "indeyets/pake": "^1.99", - "docbook/docbook-xsl": "^1.79" + "ext-mbstring": "*" }, "suggest": { "ext-curl": "Needed for HTTPS and HTTP 1.1 support, NTLM Auth etc...", "ext-zlib": "Needed for sending compressed requests and receiving compressed responses, if cURL is not available", "ext-mbstring": "Needed to allow reception of requests/responses in character sets other than ASCII,LATIN-1,UTF-8", "phpxmlrpc/extras": "Adds more featured Server classes and other useful bits", - "phpxmlrpc/jsonrpc": "Adds support for the JSON-RPC protocol", - "sami/sami": "Required for doc generation using pake. Version constraints: ^3.3 || ^4.1" + "phpxmlrpc/jsonrpc": "Adds support for the JSON-RPC protocol" }, "_comment::conflict": "Within the extras package, only the XMLRPC extension emulation is not compatible... the JSONRPC part should be ok. Both have been moved to different packages anyway", "conflict": { @@ -34,21 +30,5 @@ }, "autoload": { "psr-4": {"PhpXmlRpc\\": "src/"} - }, - "config": { - "secure-http": false - }, - "repositories": [ - { - "type": "package", - "package": { - "name": "docbook/docbook-xsl", - "version": "1.79.1", - "dist": { - "url": "https://sourceforge.net/projects/docbook/files/docbook-xsl/1.79.1/docbook-xsl-1.79.1.zip/download", - "type": "zip" - } - } - } - ] + } } diff --git a/doc/build/composer.json b/doc/build/composer.json new file mode 100644 index 0000000..f2275fc --- /dev/null +++ b/doc/build/composer.json @@ -0,0 +1,26 @@ +{ + "name": "phpxmlrpc/phpxmlrpc-doc-toolchain", + "require-dev": { + "php": "^5.3.0 || ^7.0 || ^8.0", + "ext-xsl": "*", + "indeyets/pake": "^1.99", + "docbook/docbook-xsl": "^1.79", + "sami/sami": "^3.3 || ^4.1" + }, + "config": { + "secure-http": false + }, + "repositories": [ + { + "type": "package", + "package": { + "name": "docbook/docbook-xsl", + "version": "1.79.1", + "dist": { + "url": "https://sourceforge.net/projects/docbook/files/docbook-xsl/1.79.1/docbook-xsl-1.79.1.zip/download", + "type": "zip" + } + } + } + ] +} diff --git a/pakefile.php b/pakefile.php index ef2f31a..956cc66 100644 --- a/pakefile.php +++ b/pakefile.php @@ -3,7 +3,7 @@ * Makefile for phpxmlrpc library. * To be used with the Pake tool: https://github.com/indeyets/pake/wiki * - * @copyright (c) 2015-2020 G. Giunta + * @copyright (c) 2015-2021 G. Giunta * * @todo !important allow user to specify location of docbook xslt instead of the one installed via composer */ @@ -42,6 +42,11 @@ class Builder return self::buildDir().'/workspace'; } + public static function toolsDir() + { + return self::buildDir().'/tools'; + } + /// most likely things will break if this one is moved outside of BuildDir public static function distDir() { @@ -104,7 +109,6 @@ class Builder */ public static function applyXslt($inFile, $xssFile, $outFileOrDir) { - if (!file_exists($inFile)) { throw new \Exception("File $inFile cannot be found"); } @@ -256,9 +260,11 @@ function run_doc($task=null, $args=array(), $cliOpts=array()) // API docs + /// @todo sami is anbandonware, whereas phpdocumentor is not. switch back to phpdocumentor + // from phpdoc comments using phpdocumentor //$cmd = Builder::tool('php'); - //pake_sh("$cmd vendor/phpdocumentor/phpdocumentor/bin/phpdoc run -d ".Builder::workspaceDir().'/src'." -t ".Builder::workspaceDir().'/doc/api --title PHP-XMLRPC'); + //pake_sh("$cmd " . Builder::toolsDir(). "/vendor/bin/phpdoc run -d ".Builder::workspaceDir().'/src'." -t ".Builder::workspaceDir().'/doc/api --title PHP-XMLRPC'); // from phpdoc comments using Sami $samiConfig = <<