Skip to content

Commit

Permalink
Merge branch 'task/render-api-docs' into 8.2
Browse files Browse the repository at this point in the history
# Conflicts:
#	Neos.Flow/Classes/Persistence/QueryInterface.php
#	Neos.Flow/Configuration/Settings.DocTools.yaml
  • Loading branch information
kdambekalns committed Oct 12, 2022
2 parents e1af705 + d139944 commit e6c5cf7
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 8 deletions.
28 changes: 28 additions & 0 deletions .doctum.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php
declare(strict_types=1);

use Doctum\Doctum;
use Doctum\RemoteRepository\GitHubRemoteRepository;
use Symfony\Component\Finder\Finder;

$iterator = Finder::create()
->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!',
]
]);
49 changes: 49 additions & 0 deletions .github/workflows/doctum.yml
Original file line number Diff line number Diff line change
@@ -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 "[email protected]"
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/[email protected]
with:
github_token: ${{ secrets.NEOS_BOT_TOKEN }}
repository: neos/neos.github.io
directory: docs-site
branch: main
2 changes: 1 addition & 1 deletion Neos.Flow/Classes/Core/Booting/Scripts.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Neos.Flow/Classes/Reflection/MethodReflection.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion Neos.Flow/Classes/Reflection/PropertyReflection.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e6c5cf7

Please sign in to comment.