From 6a61d6728853bb23c77f78239477ee6162c83b2a Mon Sep 17 00:00:00 2001 From: William Desportes Date: Mon, 12 Oct 2020 16:04:21 +0200 Subject: [PATCH] Use Doctum instead of Sami (#761) * Use Doctum instead of Sami - Fix .gitignore - Move the process to docs - Add .gitattributes * Fix the symfony/process versions after sami was removed Used the maximum version of 2.x and forced 3.3 before deprecation in 3.4 --- .gitattributes | 4 ++++ .gitignore | 3 ++- .sami.php | 20 -------------------- composer.json | 4 ++-- docs/doctum.php | 15 +++++++++++++++ docs/generate-docs.sh | 25 +++++++++++++++++++++++++ 6 files changed, 48 insertions(+), 23 deletions(-) create mode 100644 .gitattributes delete mode 100644 .sami.php create mode 100644 docs/doctum.php create mode 100755 docs/generate-docs.sh diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..7c6f5e1 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,4 @@ +.gitattributes export-ignore +.gitignore export-ignore +.github export-ignore +docs export-ignore diff --git a/.gitignore b/.gitignore index 6b443ed..eb02dfe 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ composer.lock phpunit.xml .phpunit.result.cache /tests/Functional/output/output-* -sami.phar +/docs/doctum.phar +/docs/source/API/API/cache/twig/* .idea/ /phpunit diff --git a/.sami.php b/.sami.php deleted file mode 100644 index e495788..0000000 --- a/.sami.php +++ /dev/null @@ -1,20 +0,0 @@ -files() - ->name('*.php') - ->in($dir = 'src') -; - -return new Sami($iterator, array( - 'title' => 'PHP-FFMpeg API', - 'theme' => 'enhanced', - 'build_dir' => __DIR__.'/docs/source/API/API', - 'cache_dir' => __DIR__.'/docs/source/API/API/cache', - 'default_opened_level' => 2, -)); diff --git a/composer.json b/composer.json index ea3a5dd..804bef9 100644 --- a/composer.json +++ b/composer.json @@ -42,9 +42,9 @@ "php-ffmpeg/extras": "A compilation of common audio & video drivers for PHP-FFMpeg" }, "require-dev": { - "sami/sami": "~1.0", "silex/silex": "~1.0", - "symfony/phpunit-bridge": "^5.0.4" + "symfony/phpunit-bridge": "^5.0.4", + "symfony/process": "2.8 || 3.3" }, "autoload": { "psr-0": { diff --git a/docs/doctum.php b/docs/doctum.php new file mode 100644 index 0000000..3f0d9be --- /dev/null +++ b/docs/doctum.php @@ -0,0 +1,15 @@ +files() + ->name('*.php') + ->in(__DIR__.'/../src/'); + +return new Doctum($iterator, [ + 'title' => 'PHP-FFMpeg API', + 'build_dir' => __DIR__.'/source/API/API', + 'cache_dir' => __DIR__.'/source/API/API/cache', +]); diff --git a/docs/generate-docs.sh b/docs/generate-docs.sh new file mode 100755 index 0000000..c50293c --- /dev/null +++ b/docs/generate-docs.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +set -e + +SELF_DIR=$(dirname $0) +cd ${SELF_DIR} + +rm -f doctum.phar +rm -f doctum.phar.sha256 + +# Download the latest (5.1.x) release if the file does not exist +# Remove it to update your phar +curl -o doctum.phar https://doctum.long-term.support/releases/5.1/doctum.phar +curl -o doctum.phar.sha256 https://doctum.long-term.support/releases/5.1/doctum.phar.sha256 + +sha256sum --strict --check doctum.phar.sha256 +rm doctum.phar.sha256 + +# You can fetch the latest (5.1.x) version code here: +# https://doctum.long-term.support/releases/5.1/VERSION + + +# Show the version to inform users of the script +php doctum.phar --version +php doctum.phar update --force --ignore-parse-errors doctum.php -v