From 0aac305a46731210afe0927bc9ec7a188380c68d Mon Sep 17 00:00:00 2001 From: Karsten Dambekalns Date: Tue, 11 Oct 2022 22:23:13 +0200 Subject: [PATCH 1/4] TASK: Render API docs (again) --- .doctum.php | 28 +++++++++++++++++++++ .github/workflows/doctum.yml | 49 ++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 .doctum.php create mode 100644 .github/workflows/doctum.yml diff --git a/.doctum.php b/.doctum.php new file mode 100644 index 0000000000..a4bebc54c6 --- /dev/null +++ b/.doctum.php @@ -0,0 +1,28 @@ +files() + ->name('*.php') + ->path('/Classes/') + ->in(__DIR__); + +return new Doctum($iterator, [ + 'title' => 'Flow Framework', + 'base_url' => 'https://neos.github.io/', + 'favicon' => 'https://www.neos.io/favicon-32x32.png', + 'language' => 'en', + 'remote_repository' => new GitHubRemoteRepository('neos/flow-development-collection', __DIR__), + 'footer_link' => [ + 'href' => 'https://flow.neos.io', + 'rel' => 'noreferrer noopener', + 'target' => '_blank', + 'before_text' => 'Learn more about the', + 'link_text' => 'Flow Framework', + 'after_text' => 'if you like!', + ] +]); diff --git a/.github/workflows/doctum.yml b/.github/workflows/doctum.yml new file mode 100644 index 0000000000..c52ccae9eb --- /dev/null +++ b/.github/workflows/doctum.yml @@ -0,0 +1,49 @@ +name: Build API documentation + +on: + workflow_dispatch: + push: + branches: [ '[0-9]+.[0-9]' ] + +jobs: + build-api-docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Build API documentation + uses: sudo-bot/action-doctum@v5 + with: + config-file: .doctum.php + method: "update" + # use of --only-version fixes branch name in "View source" links to GitHub + cli-args: "--output-format=github --no-ansi --no-progress --ignore-parse-errors --only-version=${{ github.ref_name }}" + + - name: Check out documentation site + uses: actions/checkout@v3 + with: + repository: neos/neos.github.io + path: docs-site + + - name: Move rendered docs to site + run: | + rm -rf docs-site/${{ github.ref_name }} + mkdir -p docs-site/${{ github.ref_name }} + mv build/* docs-site/${{ github.ref_name }}/ + + - name: Commit update + run: | + cd docs-site + git config --local --unset-all "http.https://github.com/.extraheader" + git config --global user.email "ops@neos.io" + git config --global user.name "Neos Bot" + git add . + git commit -m "TASK: Update API docs from ${{ github.ref_name }}" + + - name: Push to git + uses: ad-m/github-push-action@v0.6.0 + with: + github_token: ${{ secrets.NEOS_BOT_TOKEN }} + repository: neos/neos.github.io + directory: docs-site + branch: main From f4326cde82db5a5a9460daae2f7e825da63872b3 Mon Sep 17 00:00:00 2001 From: Karsten Dambekalns Date: Wed, 12 Oct 2022 09:27:44 +0200 Subject: [PATCH 2/4] TASK: Fix some errors found by Doctum --- Neos.Flow/Classes/Core/Booting/Scripts.php | 2 +- .../Classes/ObjectManagement/Configuration/Configuration.php | 2 +- Neos.Flow/Classes/Persistence/QueryInterface.php | 1 - Neos.Flow/Classes/Reflection/MethodReflection.php | 2 +- Neos.Flow/Classes/Reflection/PropertyReflection.php | 2 +- .../Classes/ViewHelpers/Format/DateViewHelper.php | 5 ----- 6 files changed, 4 insertions(+), 10 deletions(-) diff --git a/Neos.Flow/Classes/Core/Booting/Scripts.php b/Neos.Flow/Classes/Core/Booting/Scripts.php index 3b1003d901..98b10f3fb0 100644 --- a/Neos.Flow/Classes/Core/Booting/Scripts.php +++ b/Neos.Flow/Classes/Core/Booting/Scripts.php @@ -811,7 +811,7 @@ public static function buildPhpCommand(array $settings): string * Compares the realpath of the configured PHP binary (if any) with the one flow was called with in a CLI request. * This avoids config errors where users forget to set Neos.Flow.core.phpBinaryPathAndFilename in CLI. * - * @param string phpBinaryPathAndFilename + * @param string $phpBinaryPathAndFilename * @throws FlowException */ protected static function ensureCLISubrequestsUseCurrentlyRunningPhpBinary($phpBinaryPathAndFilename) diff --git a/Neos.Flow/Classes/ObjectManagement/Configuration/Configuration.php b/Neos.Flow/Classes/ObjectManagement/Configuration/Configuration.php index 683a266df3..cb591332d7 100644 --- a/Neos.Flow/Classes/ObjectManagement/Configuration/Configuration.php +++ b/Neos.Flow/Classes/ObjectManagement/Configuration/Configuration.php @@ -127,7 +127,7 @@ public function __construct($objectName, $className = null) /** * Sets the object name * - * @param string object name + * @param string $objectName * @return void */ public function setObjectName($objectName) diff --git a/Neos.Flow/Classes/Persistence/QueryInterface.php b/Neos.Flow/Classes/Persistence/QueryInterface.php index d20e99bafd..703a32002d 100644 --- a/Neos.Flow/Classes/Persistence/QueryInterface.php +++ b/Neos.Flow/Classes/Persistence/QueryInterface.php @@ -160,7 +160,6 @@ public function setLimit($limit); /** * Returns the maximum size of the result set to limit. * - * @param integer * @api */ public function getLimit(); diff --git a/Neos.Flow/Classes/Reflection/MethodReflection.php b/Neos.Flow/Classes/Reflection/MethodReflection.php index 01d5942377..edfc1137f6 100644 --- a/Neos.Flow/Classes/Reflection/MethodReflection.php +++ b/Neos.Flow/Classes/Reflection/MethodReflection.php @@ -21,7 +21,7 @@ class MethodReflection extends \ReflectionMethod { /** - * @var DocCommentParser: An instance of the doc comment parser + * @var DocCommentParser An instance of the doc comment parser */ protected $docCommentParser; diff --git a/Neos.Flow/Classes/Reflection/PropertyReflection.php b/Neos.Flow/Classes/Reflection/PropertyReflection.php index 4e9148be0c..bad3039571 100644 --- a/Neos.Flow/Classes/Reflection/PropertyReflection.php +++ b/Neos.Flow/Classes/Reflection/PropertyReflection.php @@ -21,7 +21,7 @@ class PropertyReflection extends \ReflectionProperty { /** - * @var DocCommentParser: An instance of the doc comment parser + * @var DocCommentParser An instance of the doc comment parser */ protected $docCommentParser; diff --git a/Neos.FluidAdaptor/Classes/ViewHelpers/Format/DateViewHelper.php b/Neos.FluidAdaptor/Classes/ViewHelpers/Format/DateViewHelper.php index 7a59979710..ecc7e83552 100644 --- a/Neos.FluidAdaptor/Classes/ViewHelpers/Format/DateViewHelper.php +++ b/Neos.FluidAdaptor/Classes/ViewHelpers/Format/DateViewHelper.php @@ -119,11 +119,6 @@ public function initializeArguments() /** * Render the supplied DateTime object as a formatted date. * - * @param mixed $date either a \DateTime object or a string that is accepted by \DateTime constructor - * @param string $format Format String which is taken to format the Date/Time if none of the locale options are set. - * @param string $localeFormatType Whether to format (according to locale set in $forceLocale) date, time or dateTime. Must be one of Neos\Flow\I18n\Cldr\Reader\DatesReader::FORMAT_TYPE_*'s constants. - * @param string $localeFormatLength Format length if locale set in $forceLocale. Must be one of Neos\Flow\I18n\Cldr\Reader\DatesReader::FORMAT_LENGTH_*'s constants. - * @param string $cldrFormat Format string in CLDR format (see http://cldr.unicode.org/translation/date-time) * @throws ViewHelperException * @return string Formatted date * @api From d139944367ce6a089c6303c35916ea0b7745f26a Mon Sep 17 00:00:00 2001 From: Karsten Dambekalns Date: Wed, 12 Oct 2022 09:53:59 +0200 Subject: [PATCH 3/4] TASK: Render to "flow" sub directory This allows Flow and Neos to co-exist in the resulting site. --- .github/workflows/doctum.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/doctum.yml b/.github/workflows/doctum.yml index c52ccae9eb..95fe5122e5 100644 --- a/.github/workflows/doctum.yml +++ b/.github/workflows/doctum.yml @@ -27,9 +27,9 @@ jobs: - name: Move rendered docs to site run: | - rm -rf docs-site/${{ github.ref_name }} - mkdir -p docs-site/${{ github.ref_name }} - mv build/* docs-site/${{ github.ref_name }}/ + rm -rf docs-site/flow/${{ github.ref_name }} + mkdir -p docs-site/flow/${{ github.ref_name }} + mv build/* docs-site/flow/${{ github.ref_name }}/ - name: Commit update run: | From 4d6da5dbc993638ca721293b5835ed3325907b7e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Apr 2023 10:03:14 +0000 Subject: [PATCH 4/4] Update psr/http-message requirement from ^1.0 to ^2.0 Updates the requirements on [psr/http-message](https://github.com/php-fig/http-message) to permit the latest version. - [Release notes](https://github.com/php-fig/http-message/releases) - [Changelog](https://github.com/php-fig/http-message/blob/master/CHANGELOG.md) - [Commits](https://github.com/php-fig/http-message/compare/1.0...2.0) --- updated-dependencies: - dependency-name: psr/http-message dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 362acace21..d12b50f392 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ "ext-json": "*", "ext-reflection": "*", "ext-xml": "*", - "psr/http-message": "^1.0", + "psr/http-message": "^2.0", "psr/http-factory": "^1.0", "psr/container": "^1.0", "psr/http-server-middleware": "^1.0",