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..95fe5122e5 --- /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/flow/${{ github.ref_name }} + mkdir -p docs-site/flow/${{ github.ref_name }} + mv build/* docs-site/flow/${{ 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 diff --git a/Neos.Flow/Classes/Core/Booting/Scripts.php b/Neos.Flow/Classes/Core/Booting/Scripts.php index 50249ec02a..7ef1029804 100644 --- a/Neos.Flow/Classes/Core/Booting/Scripts.php +++ b/Neos.Flow/Classes/Core/Booting/Scripts.php @@ -814,7 +814,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/Reflection/MethodReflection.php b/Neos.Flow/Classes/Reflection/MethodReflection.php index 4300ec1b66..b5e8a0e1e7 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 745a38d572..1b59ba4c4e 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