diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml
new file mode 100644
index 00000000..369a011a
--- /dev/null
+++ b/.github/workflows/documentation.yml
@@ -0,0 +1,17 @@
+# https://docs.github.com/en/actions
+
+name: "Documentation"
+
+on: # yamllint disable-line rule:truthy
+ push:
+ branches:
+ - "6.x"
+ workflow_dispatch: null
+
+jobs:
+ run:
+ name: "Documentation"
+ uses: "phpDocumentor/.github/.github/workflows/documentation.yml@main"
+ with:
+ deploy: true
+ component: "reflection-docblock"
diff --git a/.gitignore b/.gitignore
index 62394e1a..581a7f0c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,3 +16,5 @@ vendor/
# By default the phpunit.xml.dist is provided; you can override this using a local config file
phpunit.xml
.phpunit.result.cache
+
+.phpdoc
diff --git a/Makefile b/Makefile
index 5420da71..05849d2a 100644
--- a/Makefile
+++ b/Makefile
@@ -41,3 +41,7 @@ rector: ## Refactor code using rector
.PHONY: pre-commit-test
pre-commit-test: fix-code-style test code-style static-code-analysis
+
+.PHONY: docs
+docs: ## Generate documentation with phpDocumentor
+ docker run -it --rm -v${PWD}:/opt/project -w /opt/project phpdoc/phpdoc:3
diff --git a/docs/contributing.rst b/docs/contributing.rst
new file mode 100644
index 00000000..a016ce46
--- /dev/null
+++ b/docs/contributing.rst
@@ -0,0 +1,12 @@
+Contributing
+============
+
+Contributions are welcome! If you would like to contribute to ReflectionDocBlock, please follow these guidelines:
+
+- Fork the repository and create your branch from ``main``.
+- Ensure your code follows the project's coding standards.
+- Write tests for your changes.
+- Submit a pull request with a clear description of your changes.
+
+For questions or discussions, please open an issue on GitHub.
+
diff --git a/examples/01-interpreting-a-simple-docblock.php b/docs/examples/01-interpreting-a-simple-docblock.php
similarity index 93%
rename from examples/01-interpreting-a-simple-docblock.php
rename to docs/examples/01-interpreting-a-simple-docblock.php
index 6d67dea4..d95d455f 100644
--- a/examples/01-interpreting-a-simple-docblock.php
+++ b/docs/examples/01-interpreting-a-simple-docblock.php
@@ -1,5 +1,5 @@
create('/**\n * This is a summary.\n *\n * This is a description.\n */');
+
+ echo $docblock->getSummary(); // Outputs: This is a summary.
+
+For more detailed usage and how-to guides, see the ``examples/`` directory.
+
+.. toctree::
+ :maxdepth: 2
+ :caption: Contents:
+
+ installation
+ how-to/index
+ migration-v6
+ contributing
diff --git a/docs/installation.rst b/docs/installation.rst
new file mode 100644
index 00000000..13232061
--- /dev/null
+++ b/docs/installation.rst
@@ -0,0 +1,9 @@
+Installation
+============
+
+To install ReflectionDocBlock, use Composer:
+
+.. code-block:: bash
+
+ composer require phpdocumentor/reflection-docblock
+
diff --git a/docs/upgrade-to-v6.rst b/docs/upgrade-to-v6.rst
index e69de29b..7a55dce2 100644
--- a/docs/upgrade-to-v6.rst
+++ b/docs/upgrade-to-v6.rst
@@ -0,0 +1,7 @@
+
+Stop using ::create
+
+StandardTagFactory needs to be created via createInstance
+
+Method::getArguments removed
+Method::create is removed
diff --git a/phpdoc.dist.xml b/phpdoc.dist.xml
new file mode 100644
index 00000000..3b02e31b
--- /dev/null
+++ b/phpdoc.dist.xml
@@ -0,0 +1,46 @@
+
+
+ Reflection Docblock
+
+
+
+
+ latest
+
+
+ src/
+
+
+
+ tests/**/*
+ build/**/*
+ var/**/*
+ vendor/**/*
+
+
+ php
+
+
+ template
+ template-extends
+ template-implements
+ extends
+ implements
+
+ phpDocumentor
+
+
+
+ docs
+
+
+
+
+
+
+
diff --git a/tests/integration/InterpretingDocBlocksTest.php b/tests/integration/InterpretingDocBlocksTest.php
index 698aac96..4ea86680 100644
--- a/tests/integration/InterpretingDocBlocksTest.php
+++ b/tests/integration/InterpretingDocBlocksTest.php
@@ -86,7 +86,7 @@ public function testInterpretingASimpleDocBlock(): void
/** @var Description $description */
$description;
- include(__DIR__ . '/../../examples/01-interpreting-a-simple-docblock.php');
+ include(__DIR__ . '/../../docs/examples/01-interpreting-a-simple-docblock.php');
$descriptionText = <<assertTrue($hasSeeTag);
$this->assertCount(1, $tags);
@@ -147,7 +147,7 @@ public function testDescriptionsCanEscapeAtSignsAndClosingBraces(): void
/** @var string $foundDescription */
$foundDescription;
- include(__DIR__ . '/../../examples/playing-with-descriptions/02-escaping.php');
+ include(__DIR__ . '/../../docs/examples/playing-with-descriptions/02-escaping.php');
$this->assertSame(
str_replace(
diff --git a/tests/integration/ReconstitutingADocBlockTest.php b/tests/integration/ReconstitutingADocBlockTest.php
index aef6598c..07b30411 100644
--- a/tests/integration/ReconstitutingADocBlockTest.php
+++ b/tests/integration/ReconstitutingADocBlockTest.php
@@ -39,7 +39,7 @@ public function testReconstituteADocBlock(): void
/** @var string $reconstitutedDocComment */
$reconstitutedDocComment;
- include(__DIR__ . '/../../examples/03-reconstituting-a-docblock.php');
+ include(__DIR__ . '/../../docs/examples/03-reconstituting-a-docblock.php');
$this->assertSame($docComment, $reconstitutedDocComment);
}
diff --git a/tests/integration/UsingTagsTest.php b/tests/integration/UsingTagsTest.php
index eb463d8d..e7c8bbc0 100644
--- a/tests/integration/UsingTagsTest.php
+++ b/tests/integration/UsingTagsTest.php
@@ -40,7 +40,7 @@ public function testAddingYourOwnTagUsingAStaticMethodAsFactory(): void
/** @var string $reconstitutedDocComment */
$reconstitutedDocComment;
- include(__DIR__ . '/../../examples/04-adding-your-own-tag.php');
+ include(__DIR__ . '/../../docs/examples/04-adding-your-own-tag.php');
$this->assertInstanceOf(\MyTag::class, $customTagObjects[0]);
$this->assertSame('my-tag', $customTagObjects[0]->getName());