Skip to content

Commit e3aeb5a

Browse files
committed
Update docs command
Signed-off-by: Felipe Sayão Lobato Abreu <github@mentordosnerds.com>
1 parent 4eda46e commit e3aeb5a

21 files changed

Lines changed: 544 additions & 57 deletions

.github/workflows/wiki.yml

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -48,32 +48,22 @@ jobs:
4848
uses: php-actions/composer@v6
4949
with:
5050
php_version: '8.3'
51-
command: 'dev-tools docs'
51+
command: 'dev-tools'
52+
args: 'wiki -- --target=.wiki'
5253

5354
- name: Prepare wiki submodule branch
5455
id: wiki_branch
55-
working-directory: docs/wiki
56+
working-directory: .wiki
5657
run: |
5758
git fetch origin
58-
wiki_branch="$(git remote show origin | sed -n '/HEAD branch/s/.*: //p')"
59-
60-
if [ -z "$wiki_branch" ]; then
61-
wiki_branch="$(git branch -r | sed 's/^[[:space:]]*origin\///' | grep -v '^HEAD$' | head -n 1)"
62-
fi
63-
64-
if [ -z "$wiki_branch" ]; then
65-
echo "Could not determine wiki branch" >&2
66-
exit 1
67-
fi
68-
69-
echo "branch=$wiki_branch" >> "$GITHUB_OUTPUT"
70-
git checkout -B "$wiki_branch" "origin/$wiki_branch"
59+
git checkout master || git checkout -b master
60+
echo "branch=master" >> "$GITHUB_OUTPUT"
7161
7262
- name: Commit & push wiki submodule
7363
id: wiki_commit
7464
uses: EndBug/add-and-commit@v10
7565
with:
76-
cwd: docs/wiki
66+
cwd: .wiki
7767
add: .
7868
message: "Update wiki docs"
7969
default_author: github_actions
@@ -85,7 +75,7 @@ jobs:
8575
id: parent_commit
8676
uses: EndBug/add-and-commit@v10
8777
with:
88-
add: docs/wiki
78+
add: .wiki
8979
message: "Update wiki submodule pointer"
9080
default_author: github_actions
9181
pull: "--rebase"

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule "docs/wiki"]
2-
path = docs/wiki
2+
path = .wiki
33
url = https://github.com/php-fast-forward/dev-tools.wiki.git

docs/configuration/index.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Configuration
2+
=============
3+
4+
FastForward DevTools is strictly built on the philosophy of **Convention over Configuration**. This section explains how configurations are supplied by default and how they can be modified.
5+
6+
By default, the plugin aims to provide zero-configuration setups for all underlying QA tools. However, identifying that advanced scenarios may require specific rulesets or paths, the architecture supports granular overrides locally within your project context.
7+
8+
In this Section
9+
---------------
10+
11+
.. toctree::
12+
:maxdepth: 1
13+
14+
overriding-defaults
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Overriding Defaults
2+
===================
3+
4+
When invoked, the internal toolkit instances dramatically minimize setup times by dynamically reverting to sensible, strict configuration defaults securely bundled within the ``fast-forward/dev-tools`` package itself.
5+
6+
However, recognizing that specific projects may have edge-cases or expanded scopes, DevTools allows you to effortlessly override these settings locally.
7+
8+
How to Override
9+
---------------
10+
11+
To override a default setup, simply create the corresponding configuration file mapped firmly onto your generic root application path:
12+
13+
- ``ecs.php`` (for Code Style specifications)
14+
- ``rector.php`` (for Application Refactoring targets)
15+
- ``phpunit.xml`` (for managing Testing suites)
16+
17+
Resolution Logic
18+
----------------
19+
20+
The internal execution engine (housed in ``AbstractCommand``) invokes ``getConfigFile()``. This method specifically verifies the presence of the configuration file inside your project’s working directory:
21+
22+
1. If the mapped configuration file *exists*, tools utilize the custom instructions provided within your project.
23+
2. If the configuration file is *absent*, the ``dev-tools`` process securely abstracts the instruction and dynamically relays it to the standard template preserved within the Composer installation path.
24+
25+
This guarantees robust predictability while maintaining advanced customization capabilities reliably.

docs/getting-started/index.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Getting Started
2+
===============
3+
4+
Welcome to the FastForward DevTools getting started guide. This section provides an introduction to the ``fast-forward/dev-tools`` package, explaining its purpose and guiding you through the environment preparation.
5+
6+
What is FastForward DevTools?
7+
-----------------------------
8+
9+
Configuring tools like PHPUnit, Rector, PHP-CS-Fixer, EasyCodingStandard (ECS), and phpDocumentor in every new project leads to excessive boilerplate. FastForward DevTools eliminates this configuration fatigue by providing sensible defaults and a unified execution interface (``composer dev-tools``) out of the box.
10+
11+
When you add this package as a development dependency, your project automatically inherits a unified command-line toolchain designed to ensure that all your projects adhere to the same rigorous standards without manual bootstrapping.
12+
13+
In this Section
14+
---------------
15+
16+
.. toctree::
17+
:maxdepth: 1
18+
19+
installation
20+
supported-php-versions
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Installation
2+
============
3+
4+
Because FastForward DevTools operates as a Composer plugin, the installation process seamlessly integrates its commands directly into your project environment automatically.
5+
6+
Requirements
7+
------------
8+
9+
Ensure you meet the basic requirements described in `Supported PHP Versions <supported-php-versions>`_.
10+
11+
Using Composer
12+
--------------
13+
14+
Require the package as a development dependency using Composer:
15+
16+
.. code-block:: bash
17+
18+
composer require --dev fast-forward/dev-tools
19+
20+
What happens during installation?
21+
---------------------------------
22+
23+
1. Composer installs the package alongside its underlying tool dependencies (``symplify/easy-coding-standard``, ``rector/rector``, ``phpunit/phpunit``, ``phpdocumentor/shim``, etc.).
24+
2. The internal ``Plugin`` provider securely audits your ``composer.json`` file.
25+
3. The plugin natively injects the ``composer-command-provider`` instructions containing ``DevToolsCommandProvider::class`` into your ``extra`` configuration block.
26+
4. Finally, it initializes the ``dev-tools`` executable script shortcut globally within your project, making commands accessible via ``composer dev-tools``.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Supported PHP Versions
2+
======================
3+
4+
This library explicitly utilizes modern PHP typed properties, union types, strict definitions, and ``match`` expressions internally. As such, the supported engine versions are strictly managed.
5+
6+
Minimum Requirements
7+
--------------------
8+
9+
- **Minimum PHP Version:** ``^8.3``
10+
- **Recommended PHP Version:** 8.3 or greater
11+
12+
Please ensure your local environment and Continuous Integration (CI) pipelines satisfy the PHP 8.3 minimum constraints prior to installation. Execution against older versions is officially unsupported and may result in parsing failures.

docs/index.rst

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
.. toctree::
2+
:hidden:
3+
:titlesonly:
4+
5+
getting-started/index
6+
configuration/index
7+
running/index
8+
internals/index
9+
10+
FastForward DevTools Guide
11+
=========================
12+
13+
Welcome to the documentation for FastForward DevTools.
14+
15+
FastForward DevTools is a modern orchestration toolkit for PHP projects, providing a unified interface for quality assurance and static analysis tools. With this toolkit, you can automate code style checks, refactoring, testing, and documentation generation across your PHP codebase.
16+
17+
This documentation is organized into the following sections:
18+
19+
- **Getting Started** — Quick tutorials to get you up and running in minutes. See :doc:`getting-started/index`.
20+
- **Configuration** — Learn how to customize and override default behaviors. See :doc:`configuration/index`.
21+
- **Running the Tools** — Discover how to run the unified and specialized commands. See :doc:`running/index`.
22+
- **Internals** — Dive into the architecture and design of the toolkit. See :doc:`internals/index`.
23+
24+
What does it do?
25+
----------------
26+
27+
By analyzing your PHP source code and configuration, FastForward DevTools automates the execution of QA tools, making it indispensable for teams seeking consistent, high-quality codebases.
28+
29+
In addition to orchestrating standard tools, FastForward DevTools provides:
30+
31+
- Unified command-line interface for all QA operations
32+
- Automatic configuration and sensible defaults
33+
- Support for custom project overrides
34+
- Seamless integration with Composer
35+
36+
Inspired by best practices and modern PHP standards, FastForward DevTools helps you maintain, refactor, and document your projects efficiently.
37+
38+
Where to start?
39+
---------------
40+
41+
We have divided the documentation into 4 sections:
42+
43+
1. :doc:`getting-started/index` — concise tutorials to help you get started quickly.
44+
2. :doc:`configuration/index` — in-depth guides on customizing and configuring the toolkit.
45+
3. :doc:`running/index` — reference for all available commands and features.
46+
4. :doc:`internals/index` — for contributors and those interested in the internal architecture.
47+
48+
.. hint::
49+
50+
The documentation pages you are currently reading are generated using FastForward DevTools and serve as a real-world example of its capabilities.

docs/internals/architecture.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Architecture and Command Lifecycle
2+
==================================
3+
4+
Understanding the structural execution behavior naturally highlights the toolkit's strict stability expectations.
5+
6+
1. Plugin Initialization
7+
------------------------
8+
9+
Upon invoking composer context triggers, the overarching ``Plugin`` class initializes. Acting in isolation, it intercepts generic triggers dynamically providing seamless integration without modifying your ``composer.json`` destructively beyond safe metadata insertions. It relies meticulously on the ``Composer\Plugin\Capable`` interface implementation natively.
10+
11+
2. Dynamic Command Provider
12+
---------------------------
13+
14+
A dedicated constraint definition mapped to ``DevToolsCommandProvider`` statically compiles specific functional dependencies securely. This system registers commands directly into Composer’s known operational boundaries cleanly, allowing generic shell commands (e.g. ``composer dev-tools``) to act natively like binary scripts correctly.
15+
16+
3. Abstract Execution Layer
17+
---------------------------
18+
19+
Functional execution contexts actively inherit orchestrated, inherently isolated structures directly via ``AbstractCommand``. Features abstracted inside this definition include:
20+
21+
* **Path Resolution:** Computing absolute execution binaries securely via ``getAbsolutePath()``.
22+
* **Metadata Integration:** Deriving target properties intelligently relying natively on ``getPsr4Namespaces()``.
23+
* **Operational Execution:** Governing generic isolated context processing triggering fully operational and robust ``Symfony\Component\Process\Process`` structures successfully executing targeted binaries recursively cleanly.
24+
25+
By preserving logical domains explicitly, developers ensure dependencies evaluate natively mitigating unwanted conflicts transparently openly natively.

docs/internals/index.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Internals
2+
=========
3+
4+
This section dictates a technical examination of the core operational architectures establishing ``fast-forward/dev-tools`` functionally. Understanding how the dev-tools plugin natively injects execution pathways helps guarantee a pristine CI/CD experience and serves as a guide for contributors mapping out the codebase.
5+
6+
The system relies heavily on Composer Plugin capabilities, utilizing native API hooks to inject scripts and Command Providers gracefully.
7+
8+
In this Section
9+
---------------
10+
11+
.. toctree::
12+
:maxdepth: 1
13+
14+
architecture

0 commit comments

Comments
 (0)