Skip to content

Commit

Permalink
Merge pull request #1 from bumble-tech/changing_docgen_lib_structure
Browse files Browse the repository at this point in the history
Changing docgen lib structure
  • Loading branch information
shcherbanich authored Sep 11, 2023
2 parents 83ea8c0 + ca14c68 commit a5c3d70
Show file tree
Hide file tree
Showing 549 changed files with 25,511 additions and 2,759 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
composer.phar
/vendor/
.idea
/SelfDoc/__cache/
/demo/demo1/docs/
/demo/demo1/__cache/
/demo/demo2-templates-generation/__cache/
Expand All @@ -13,3 +12,4 @@ composer.phar
/last_run.log
/.phpunit.result.cache
/demo/demo2-templates-generation/templates/
/.bumbleDocGenCache/
25 changes: 0 additions & 25 deletions SelfDoc/Configuration/config.yaml

This file was deleted.

17 changes: 0 additions & 17 deletions SelfDoc/Console/App.php

This file was deleted.

42 changes: 0 additions & 42 deletions SelfDoc/Console/Command/GenerateCommand.php

This file was deleted.

8 changes: 0 additions & 8 deletions SelfDoc/docGen.php

This file was deleted.

22 changes: 22 additions & 0 deletions bin/bumbleDocGen
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env php
<?php

ini_set('memory_limit', '-1');

$dir = __DIR__;
$autoloadFound = false;
while ($dir !== DIRECTORY_SEPARATOR) {
$autoloadFileName = realpath($dir . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php');
$autoloadFound = file_exists($autoloadFileName) && is_readable($autoloadFileName);
if ($autoloadFound) {
require $autoloadFileName;
break;
}
$dir = dirname($dir);
}

if (!$autoloadFound) {
die('Composer autoload.php file not found.');
}

(new \BumbleDocGen\Console\App())->run();
27 changes: 27 additions & 0 deletions bumble_doc_gen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
project_root: '%WORKING_DIR%'
templates_dir: '%project_root%/selfdoc/templates'
output_dir: "%project_root%/docs"
cache_dir: '%project_root%/.bumbleDocGenCache'
output_dir_base_url: "/docs"
language_handlers:
php:
class: \BumbleDocGen\LanguageHandler\Php\PhpHandler
settings:
file_source_base_url: 'https://github.com/bumble-tech/bumble-doc-gen/blob/master'
async_source_loading_enabled: true
source_locators:
- class: \BumbleDocGen\Core\Parser\SourceLocator\RecursiveDirectoriesSourceLocator
arguments:
directories:
- "%project_root%/src"
- "%project_root%/selfdoc"
twig_filters:
- class: \SelfDocConfig\Twig\CustomFilter\EvalString
twig_functions:
- class: \SelfDocConfig\Twig\CustomFunction\FindEntitiesClassesByCollectionClassName
- class: \SelfDocConfig\Twig\CustomFunction\PrintClassCollectionAsGroupedTable
- class: \SelfDocConfig\Twig\CustomFunction\GetConfigParametersDescription
plugins:
- class: \SelfDocConfig\Plugin\RoaveStubber\BetterReflectionStubberPlugin
- class: \SelfDocConfig\Plugin\TwigFilterClassParser\TwigFilterClassParserPlugin
- class: \SelfDocConfig\Plugin\TwigFunctionClassParser\TwigFunctionClassParserPlugin
11 changes: 7 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,25 @@
},
"autoload": {
"psr-4": {
"BumbleDocGen\\": "BumbleDocGen/"
"BumbleDocGen\\": "src/"
},
"files": [
"BumbleDocGen/Core/utils.php"
"src/Core/utils.php"
]
},
"autoload-dev": {
"psr-4": {
"Test\\": "tests/",
"SelfDoc\\": "SelfDoc/"
"SelfDocConfig\\": "selfdoc/"
}
},
"config": {
"allow-plugins": {
"php-http/discovery": true,
"captainhook/plugin-composer": true
}
}
},
"bin": [
"bin/bumbleDocGen"
]
}
30 changes: 15 additions & 15 deletions docs/classes/DocGenerator.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<embed> <a href="/docs/readme.md">BumbleDocGen</a> <b>/</b> DocGenerator<hr> </embed>

<h1>
<a href="https://github.com/bumble-tech/bumble-doc-gen/blob/master/BumbleDocGen/DocGenerator.php#L33">DocGenerator</a> class:
<a href="https://github.com/bumble-tech/bumble-doc-gen/blob/master/src/DocGenerator.php#L33">DocGenerator</a> class:
</h1>


Expand Down Expand Up @@ -55,11 +55,11 @@ final class DocGenerator
<ul>
<li><a name="qlog-file-name"
href="#qlog-file-name">#</a>
<code>LOG_FILE_NAME</code> <b>|</b> <a href="/BumbleDocGen/DocGenerator.php#L36">source
<code>LOG_FILE_NAME</code> <b>|</b> <a href="/src/DocGenerator.php#L36">source
code</a> </li>
<li><a name="qversion"
href="#qversion">#</a>
<code>VERSION</code> <b>|</b> <a href="/BumbleDocGen/DocGenerator.php#L35">source
<code>VERSION</code> <b>|</b> <a href="/src/DocGenerator.php#L35">source
code</a> </li>
</ul>

Expand All @@ -74,7 +74,7 @@ final class DocGenerator
<ul>
<li><a name="m-construct" href="#m-construct">#</a>
<b>__construct</b>
<b>|</b> <a href="https://github.com/bumble-tech/bumble-doc-gen/blob/master/BumbleDocGen/DocGenerator.php#L38">source code</a></li>
<b>|</b> <a href="https://github.com/bumble-tech/bumble-doc-gen/blob/master/src/DocGenerator.php#L38">source code</a></li>
</ul>

```php
Expand Down Expand Up @@ -106,27 +106,27 @@ public function __construct(\Symfony\Component\Filesystem\Filesystem $fs, \Symfo
</tr>
<tr>
<td>$configuration</td>
<td><a href='https://github.com/bumble-tech/bumble-doc-gen/blob/master/BumbleDocGen/Core/Configuration/Configuration.php'>\BumbleDocGen\Core\Configuration\Configuration</a></td>
<td><a href='https://github.com/bumble-tech/bumble-doc-gen/blob/master/src/Core/Configuration/Configuration.php'>\BumbleDocGen\Core\Configuration\Configuration</a></td>
<td>-</td>
</tr>
<tr>
<td>$parser</td>
<td><a href='https://github.com/bumble-tech/bumble-doc-gen/blob/master/BumbleDocGen/Core/Parser/ProjectParser.php'>\BumbleDocGen\Core\Parser\ProjectParser</a></td>
<td><a href='https://github.com/bumble-tech/bumble-doc-gen/blob/master/src/Core/Parser/ProjectParser.php'>\BumbleDocGen\Core\Parser\ProjectParser</a></td>
<td>-</td>
</tr>
<tr>
<td>$parserHelper</td>
<td><a href='https://github.com/bumble-tech/bumble-doc-gen/blob/master/BumbleDocGen/LanguageHandler/Php/Parser/ParserHelper.php'>\BumbleDocGen\LanguageHandler\Php\Parser\ParserHelper</a></td>
<td><a href='https://github.com/bumble-tech/bumble-doc-gen/blob/master/src/LanguageHandler/Php/Parser/ParserHelper.php'>\BumbleDocGen\LanguageHandler\Php\Parser\ParserHelper</a></td>
<td>-</td>
</tr>
<tr>
<td>$renderer</td>
<td><a href='https://github.com/bumble-tech/bumble-doc-gen/blob/master/BumbleDocGen/Core/Renderer/Renderer.php'>\BumbleDocGen\Core\Renderer\Renderer</a></td>
<td><a href='https://github.com/bumble-tech/bumble-doc-gen/blob/master/src/Core/Renderer/Renderer.php'>\BumbleDocGen\Core\Renderer\Renderer</a></td>
<td>-</td>
</tr>
<tr>
<td>$rootEntityCollectionsGroup</td>
<td><a href='https://github.com/bumble-tech/bumble-doc-gen/blob/master/BumbleDocGen/Core/Parser/Entity/RootEntityCollectionsGroup.php'>\BumbleDocGen\Core\Parser\Entity\RootEntityCollectionsGroup</a></td>
<td><a href='https://github.com/bumble-tech/bumble-doc-gen/blob/master/src/Core/Parser/Entity/RootEntityCollectionsGroup.php'>\BumbleDocGen\Core\Parser\Entity\RootEntityCollectionsGroup</a></td>
<td>-</td>
</tr>
<tr>
Expand All @@ -146,7 +146,7 @@ public function __construct(\Symfony\Component\Filesystem\Filesystem $fs, \Symfo
<ul>
<li><a name="maddmissingdocblocks" href="#maddmissingdocblocks">#</a>
<b>addMissingDocBlocks</b>
<b>|</b> <a href="https://github.com/bumble-tech/bumble-doc-gen/blob/master/BumbleDocGen/DocGenerator.php#L134">source code</a></li>
<b>|</b> <a href="https://github.com/bumble-tech/bumble-doc-gen/blob/master/src/DocGenerator.php#L134">source code</a></li>
</ul>

```php
Expand Down Expand Up @@ -186,7 +186,7 @@ public function addMissingDocBlocks(): void;
<ul>
<li><a name="mfillinreadmemdtemplate" href="#mfillinreadmemdtemplate">#</a>
<b>fillInReadmeMdTemplate</b>
<b>|</b> <a href="https://github.com/bumble-tech/bumble-doc-gen/blob/master/BumbleDocGen/DocGenerator.php#L223">source code</a></li>
<b>|</b> <a href="https://github.com/bumble-tech/bumble-doc-gen/blob/master/src/DocGenerator.php#L223">source code</a></li>
</ul>

```php
Expand Down Expand Up @@ -226,7 +226,7 @@ public function fillInReadmeMdTemplate(): void;
<ul>
<li><a name="mgenerate" href="#mgenerate">#</a>
<b>generate</b>
<b>|</b> <a href="https://github.com/bumble-tech/bumble-doc-gen/blob/master/BumbleDocGen/DocGenerator.php#L305">source code</a></li>
<b>|</b> <a href="https://github.com/bumble-tech/bumble-doc-gen/blob/master/src/DocGenerator.php#L305">source code</a></li>
</ul>

```php
Expand Down Expand Up @@ -254,7 +254,7 @@ public function generate(): void;
<ul>
<li><a name="mgenerateprojecttemplatesstructure" href="#mgenerateprojecttemplatesstructure">#</a>
<b>generateProjectTemplatesStructure</b>
<b>|</b> <a href="https://github.com/bumble-tech/bumble-doc-gen/blob/master/BumbleDocGen/DocGenerator.php#L73">source code</a></li>
<b>|</b> <a href="https://github.com/bumble-tech/bumble-doc-gen/blob/master/src/DocGenerator.php#L73">source code</a></li>
</ul>

```php
Expand Down Expand Up @@ -294,7 +294,7 @@ public function generateProjectTemplatesStructure(): void;
<ul>
<li><a name="mparseandgetrootentitycollectionsgroup" href="#mparseandgetrootentitycollectionsgroup">#</a>
<b>parseAndGetRootEntityCollectionsGroup</b>
<b>|</b> <a href="https://github.com/bumble-tech/bumble-doc-gen/blob/master/BumbleDocGen/DocGenerator.php#L58">source code</a></li>
<b>|</b> <a href="https://github.com/bumble-tech/bumble-doc-gen/blob/master/src/DocGenerator.php#L58">source code</a></li>
</ul>

```php
Expand All @@ -305,7 +305,7 @@ public function parseAndGetRootEntityCollectionsGroup(): \BumbleDocGen\Core\Pars

<b>Parameters:</b> not specified

<b>Return value:</b> <a href='https://github.com/bumble-tech/bumble-doc-gen/blob/master/BumbleDocGen/Core/Parser/Entity/RootEntityCollectionsGroup.php'>\BumbleDocGen\Core\Parser\Entity\RootEntityCollectionsGroup</a>
<b>Return value:</b> <a href='https://github.com/bumble-tech/bumble-doc-gen/blob/master/src/Core/Parser/Entity/RootEntityCollectionsGroup.php'>\BumbleDocGen\Core\Parser\Entity\RootEntityCollectionsGroup</a>


<b>Throws:</b>
Expand Down
16 changes: 8 additions & 8 deletions docs/classes/DocGeneratorFactory.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<embed> <a href="/docs/readme.md">BumbleDocGen</a> <b>/</b> DocGeneratorFactory<hr> </embed>

<h1>
<a href="https://github.com/bumble-tech/bumble-doc-gen/blob/master/BumbleDocGen/DocGeneratorFactory.php#L13">DocGeneratorFactory</a> class:
<a href="https://github.com/bumble-tech/bumble-doc-gen/blob/master/src/DocGeneratorFactory.php#L13">DocGeneratorFactory</a> class:
</h1>


Expand Down Expand Up @@ -54,11 +54,11 @@ final class DocGeneratorFactory
<ul>
<li><a name="m-construct" href="#m-construct">#</a>
<b>__construct</b>
<b>|</b> <a href="https://github.com/bumble-tech/bumble-doc-gen/blob/master/BumbleDocGen/DocGeneratorFactory.php#L18">source code</a></li>
<b>|</b> <a href="https://github.com/bumble-tech/bumble-doc-gen/blob/master/src/DocGeneratorFactory.php#L18">source code</a></li>
</ul>

```php
public function __construct(string $diConfig = '/BumbleDocGen/di-config.php');
public function __construct(string $diConfig = '/src/di-config.php');
```


Expand Down Expand Up @@ -91,11 +91,11 @@ public function __construct(string $diConfig = '/BumbleDocGen/di-config.php');
<ul>
<li><a name="mcreate" href="#mcreate">#</a>
<b>create</b>
<b>|</b> <a href="https://github.com/bumble-tech/bumble-doc-gen/blob/master/BumbleDocGen/DocGeneratorFactory.php#L37">source code</a></li>
<b>|</b> <a href="https://github.com/bumble-tech/bumble-doc-gen/blob/master/src/DocGeneratorFactory.php#L37">source code</a></li>
</ul>

```php
public function create(string $configurationFiles): \BumbleDocGen\DocGenerator;
public function create(string|null $configurationFiles): \BumbleDocGen\DocGenerator;
```


Expand All @@ -113,13 +113,13 @@ public function create(string $configurationFiles): \BumbleDocGen\DocGenerator;
<tbody>
<tr>
<td>$configurationFiles</td>
<td><a href='https://www.php.net/manual/en/language.types.string.php'>string</a></td>
<td><a href='https://www.php.net/manual/en/language.types.string.php'>string</a> | <a href='https://www.php.net/manual/en/language.types.null.php'>null</a></td>
<td>-</td>
</tr>
</tbody>
</table>

<b>Return value:</b> <a href='https://github.com/bumble-tech/bumble-doc-gen/blob/master/BumbleDocGen/DocGenerator.php'>\BumbleDocGen\DocGenerator</a>
<b>Return value:</b> <a href='https://github.com/bumble-tech/bumble-doc-gen/blob/master/src/DocGenerator.php'>\BumbleDocGen\DocGenerator</a>


<b>Throws:</b>
Expand All @@ -142,7 +142,7 @@ public function create(string $configurationFiles): \BumbleDocGen\DocGenerator;
<ul>
<li><a name="msetcustomconfigurationparameters" href="#msetcustomconfigurationparameters">#</a>
<b>setCustomConfigurationParameters</b>
<b>|</b> <a href="https://github.com/bumble-tech/bumble-doc-gen/blob/master/BumbleDocGen/DocGeneratorFactory.php#L27">source code</a></li>
<b>|</b> <a href="https://github.com/bumble-tech/bumble-doc-gen/blob/master/src/DocGeneratorFactory.php#L27">source code</a></li>
</ul>

```php
Expand Down
Loading

0 comments on commit a5c3d70

Please sign in to comment.