### Install Project Dependencies Source: https://github.com/php-fast-forward/dev-tools/blob/main/CONTRIBUTING.md Run this command after forking the repository and creating a new branch to install all necessary project dependencies. ```bash composer install ``` -------------------------------- ### Install FastForward DevTools Source: https://github.com/php-fast-forward/dev-tools/blob/main/README.md Install the dev-tools package using Composer. This command should be run in your project's root directory. ```bash composer require --dev fast-forward/dev-tools ``` -------------------------------- ### Install Fast Forward Git Hooks Source: https://github.com/php-fast-forward/dev-tools/blob/main/README.md Installs the Fast Forward Git hooks for the project. ```bash composer git-hooks ``` -------------------------------- ### Install FastForward Dev Tools Source: https://github.com/php-fast-forward/dev-tools/blob/main/AGENTS.md Install the dev-tools package as a development dependency using Composer. ```bash composer require --dev fast-forward/dev-tools:dev-main ``` ```bash composer install ``` -------------------------------- ### runSyncCommand Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Composer/Plugin Handles the automated script installation by executing the `dev-tools:sync` command. ```APIDOC ## runSyncCommand ### Description Handles the automated script installation. This method MUST execute the `dev-tools:sync` command after relevant Composer operations to ensure the development tools are correctly synchronized with the current project state. ### Method public ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters - `$event` (\Composer\Script\Event) - the Composer script event context ### Returns `void` ``` -------------------------------- ### Install Git Hooks with Options Source: https://github.com/php-fast-forward/dev-tools/blob/main/docs/commands/git-hooks.rst Installs Git hooks with specified options, such as custom source and target directories. ```bash composer git-hooks [options] ``` ```bash composer dev-tools git-hooks -- [options] ``` ```bash vendor/bin/dev-tools git-hooks [options] ``` -------------------------------- ### Copy and Overwrite Existing File Source: https://github.com/php-fast-forward/dev-tools/blob/main/docs/commands/copy-resource.rst Example demonstrating how to copy and overwrite an existing file, such as an .editorconfig file. ```bash composer copy-resource --source .editorconfig --target .editorconfig --overwrite ``` -------------------------------- ### hasGuideDirectory Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Project/ProjectCapabilities Detects whether the configured guide directory exists. ```APIDOC ## hasGuideDirectory ### Description Detects whether the configured guide directory exists. ### Method GET ### Endpoint /hasGuideDirectory ### Response #### Success Response (200) - **hasGuideDirectory** (bool) - whether the configured guide directory exists ``` -------------------------------- ### Manual Release Preparation Dispatch Example Source: https://context7.com/php-fast-forward/dev-tools/llms.txt An example of a manual dispatch for workflow_dispatch in GitHub Actions, used for preparing releases by creating a release branch and a pull request. ```yaml # Example: manual release preparation dispatch # workflow_dispatch → creates release/vX.Y.Z branch + PR ``` -------------------------------- ### Create Documentation Directory Source: https://github.com/php-fast-forward/dev-tools/blob/main/docs/getting-started/quickstart.rst Create the 'docs' directory if your repository will publish guides. This is a prerequisite for running documentation generation commands. ```bash mkdir -p docs ``` -------------------------------- ### startGroup Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Console/Output/GithubActionOutput Starts a collapsible GitHub Actions log group. ```APIDOC ## startGroup ### Description Starts a collapsible GitHub Actions log group. ### Parameters #### Path Parameters - **$title** (string) - Required - the group title ``` -------------------------------- ### Run Pre-Release Verification Commands Source: https://github.com/php-fast-forward/dev-tools/blob/main/docs/internals/release-publishing.rst Execute these commands to ensure the project is ready for release. This includes installing dependencies and running the dev tools. ```bash composer install composer dev-tools ``` -------------------------------- ### Get Current DevTools Version Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/SelfUpdate/VersionCheckResult Call this method to retrieve the version string of the currently installed DevTools. ```php public getCurrentVersion(): string ``` -------------------------------- ### Create Initial Documentation File Source: https://github.com/php-fast-forward/dev-tools/blob/main/docs/getting-started/quickstart.rst Create an initial 'docs/index.rst' file with basic content. This file serves as the entry point for your project's documentation. ```rst Documentation ============= Welcome to the project documentation. ``` -------------------------------- ### Copy Directory of Resources Source: https://github.com/php-fast-forward/dev-tools/blob/main/docs/commands/copy-resource.rst Example of copying an entire directory of resources, such as git hooks, and overwriting existing files. ```bash composer copy-resource --source resources/git-hooks --target .git/hooks --overwrite ``` -------------------------------- ### Get Runtime Vendor Path Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Path/DevToolsPathResolver Resolves the Composer vendor path for the current DevTools installation mode. Accepts paths with or without a 'vendor/' prefix. ```php public static getRuntimeVendorPath(string $path, string $packagePath = ''): string ``` -------------------------------- ### Constructor for ChangelogPromoteCommand Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Console/Command/ChangelogPromoteCommand Initializes the command with necessary filesystem, changelog manager, and clock interfaces. ```php public __construct(\FastForward\DevTools\Filesystem\FilesystemInterface $filesystem, \FastForward\DevTools\Changelog\Manager\ChangelogManagerInterface $changelogManager, \Psr\Clock\ClockInterface $clock): mixed ``` -------------------------------- ### Get Subscribed Composer Events Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Composer/Plugin Retrieves the map of events this listener handles. This method must define lifecycle triggers for script installation and synchronization during Composer package operations. ```php public static getSubscribedEvents(): array ``` -------------------------------- ### Get Runtime Autoload Path Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Path/DevToolsPathResolver Determine the active Composer autoload file path based on the DevTools installation mode. For dependencies, it's the vendor root; for checkouts, it's package-local. ```php public static getRuntimeAutoloadPath(string $packagePath = ''): string ``` -------------------------------- ### ChangelogNextVersionCommand Constructor Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Console/Command/ChangelogNextVersionCommand Initializes the command with filesystem and changelog manager dependencies. ```php public __construct( A \FastForward\DevTools\Filesystem\FilesystemInterface $filesystem, \FastForward\DevTools\Changelog\Manager\ChangelogManagerInterface $changelogManager ): mixed ``` -------------------------------- ### Get Runtime Tool Binary Path Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Path/DevToolsPathResolver Resolve the Composer runtime binary path for DevTools. Repository checkouts use package-local binaries, while dependency installs use the Composer vendor root. ```php public static getRuntimeToolBinaryPath(string $binary, string $packagePath = ''): string ``` -------------------------------- ### Get Package Version - Composer JSON Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Composer/Json/ComposerJson Returns the installed package version, falling back to the 'version' key in the composer.json file if necessary. Returns an empty string if the version cannot be resolved from either source. ```php public getVersion(): string ``` -------------------------------- ### Bootstrap and Synchronize Repository Source: https://context7.com/php-fast-forward/dev-tools/llms.txt Synchronize consumer repositories with packaged configurations like GitHub Actions, EditorConfig, and Git hooks. Use `--dry-run` to preview changes or `--check` to fail CI on detected drift. ```bash composer dev-tools:sync ``` ```bash composer dev-tools:sync --dry-run ``` ```bash composer dev-tools:sync --check ``` ```bash composer dev-tools:sync --overwrite ``` ```bash composer dev-tools:sync --interactive ``` ```bash vendor/bin/dev-tools sync --json ``` -------------------------------- ### Get Package Version Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Composer/Json/ComposerJson Retrieves the package version. It attempts to resolve the version through Composer's installed versions metadata, falling back to the `version` value in the Composer file if necessary. Returns an empty string if the version cannot be resolved. ```APIDOC ## getVersion ### Description Returns the package version. This method SHOULD return the installed package version when it can be resolved through Composer's installed versions metadata. When that value cannot be resolved, the method SHALL fall back to the `version` value declared in the Composer file. If neither source provides a usable value, the method MUST return an empty string. ### Method getVersion ### Return Value string - The package version, or an empty string when undefined ``` -------------------------------- ### Constructor Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Filesystem/Filesystem Initializes the Filesystem class, optionally accepting a pre-configured Symfony Filesystem instance. ```APIDOC ## `__construct` ### Description Initializes the Filesystem class. It can optionally accept an instance of `\Symfony\Component\Filesystem\Filesystem`. ### Method `__construct` ### Parameters #### Request Body - **`$filesystem`** (\Symfony\Component\Filesystem\Filesystem) - Optional - An instance of Symfony's Filesystem component. ``` -------------------------------- ### Update DevTools Installation Source: https://context7.com/php-fast-forward/dev-tools/llms.txt Updates the FastForward DevTools installation. Can update a local project installation, a global Composer installation, or via a Composer alias. ```bash vendor/bin/dev-tools self-update ``` ```bash composer global exec dev-tools self-update ``` ```bash composer dev-tools:self-update ``` -------------------------------- ### Configure ECS with Default Settings Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Config/ECSConfig Use this to get a default ECS configuration builder. You can then customize it further with rules and configurations. ```php $config = ``` -------------------------------- ### Instantiate VersionCheckResult Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/SelfUpdate/VersionCheckResult Use this constructor to create a VersionCheckResult object. Provide the currently installed version and the latest known stable version. ```php public __construct(string $currentVersion, string $latestVersion): mixed ``` -------------------------------- ### Composer License Command Usage Source: https://github.com/php-fast-forward/dev-tools/blob/main/docs/commands/license.rst These examples show various ways to invoke the license command, including with options and directly via the vendor binary. Use these to understand the different execution contexts. ```bash composer license [options] ``` ```bash composer dev-tools license -- [options] ``` ```bash vendor/bin/dev-tools license [options] ``` -------------------------------- ### __construct Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Project/ProjectCapabilitiesResolver Initializes the ProjectCapabilitiesResolver with Composer and Filesystem dependencies. ```APIDOC ## __construct ### Description Creates a capability resolver backed by Composer autoload metadata and filesystem checks. ### Method __construct ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters - **$composer** (\FastForward\DevTools\Composer\Json\ComposerJsonInterface) - Required - the composer.json accessor for autoload metadata - **$filesystem** (\FastForward\DevTools\Filesystem\FilesystemInterface) - Required - the filesystem used to resolve project-relative paths ``` -------------------------------- ### update Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/SelfUpdate/SelfUpdateRunnerInterface Updates the installed DevTools package using Composer. It can target either a global installation or a project-specific one. ```APIDOC ## update ### Description Updates the installed DevTools package. ### Method `update(bool $global, Symfony :: Component :: Console :: Output :: OutputInterface $output): int` ### Parameters #### Path Parameters - `$global` (bool) - Required - whether the update should target Composer's global project - `$output` (\Symfony\Component\Console\Output\OutputInterface) - Required - the command output used by the update process ### Return Value the Composer process status code ``` -------------------------------- ### Customized Documentation Build Source: https://github.com/php-fast-forward/dev-tools/blob/main/docs/usage/documentation-workflows.rst Build HTML documentation with specified source and target directories. ```bash vendor/bin/dev-tools docs --source=docs --target=.dev-tools ``` -------------------------------- ### __construct Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Environment/RuntimeEnvironment Initializes the RuntimeEnvironment with necessary dependencies. ```APIDOC ## __construct ### Description Initializes the RuntimeEnvironment with an EnvironmentInterface and an AgentDetector. ### Parameters - **$environment** (\FastForward\DevTools\Environment\EnvironmentInterface) - Required - Reads raw process environment variables. - **$agentDetector** (\Ergebnis\AgentDetector\Detector) - Required - Detects known AI-agent environment markers. ``` -------------------------------- ### Diagnose Composer Issues Source: https://github.com/php-fast-forward/dev-tools/blob/main/docs/troubleshooting.rst Run composer diagnose and install with verbose output to troubleshoot Composer installation or authentication failures. ```bash composer diagnose composer install -vvv ``` -------------------------------- ### Initialize Wiki as Git Submodule Source: https://github.com/php-fast-forward/dev-tools/blob/main/docs/commands/wiki.rst Initialize the configured wiki target as a Git submodule using the --init option. ```bash composer wiki --init ``` -------------------------------- ### Install Git Hooks Without Overwriting Source: https://github.com/php-fast-forward/dev-tools/blob/main/docs/commands/git-hooks.rst Installs Git hooks without overwriting any existing hook files in the target directory. ```bash composer git-hooks --no-overwrite ``` -------------------------------- ### Vendor Bin Wiki Command Source: https://github.com/php-fast-forward/dev-tools/blob/main/docs/commands/wiki.rst Execute the wiki command directly using the vendor binary, allowing for additional options. ```bash vendor/bin/dev-tools wiki [options] ``` -------------------------------- ### Validate and Install Composer Dependencies Source: https://github.com/php-fast-forward/dev-tools/blob/main/docs/troubleshooting.rst Check PHP version, validate composer.json, and install dependencies to resolve missing vendor directories or lock file mismatches. ```bash php -v composer validate composer install ``` -------------------------------- ### Generate Docs with Custom Source Source: https://github.com/php-fast-forward/dev-tools/blob/main/docs/commands/docs.rst Specifies a custom source directory for guide documentation using the --source option. This path must exist. ```bash composer docs --source=docs/user-guide ``` -------------------------------- ### Composer Plugin for DevTools Integration Source: https://github.com/php-fast-forward/dev-tools/blob/main/README.md The `FastForward\DevTools\Composer\Plugin` class exposes the DevTools command set to Composer automatically after installation and runs `dev-tools:sync` on install and update. ```php FastForward\DevTools\Composer\Plugin ``` -------------------------------- ### Update DevTools Package Source: https://github.com/php-fast-forward/dev-tools/blob/main/README.md Update the local DevTools package or the global Composer installation if the active binary is globally installed. Ensures you are using the latest version. ```bash vendor/bin/dev-tools self-update ``` ```bash composer dev-tools:self-update ``` -------------------------------- ### __construct Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/SelfUpdate/ComposerSelfUpdateScopeResolver Initializes the ComposerSelfUpdateScopeResolver with environment and package path information. ```APIDOC ## __construct ### Description Initializes the ComposerSelfUpdateScopeResolver with environment and package path information. ### Parameters #### Path Parameters - **environment** (*\FastForward\DevTools\Environment\EnvironmentInterface*) - Required - reads Composer home environment values - **packagePath** (*string|null*) - Optional - the DevTools package path; defaults to the active package root ``` -------------------------------- ### build Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Process/ProcessBuilderInterface Builds a process instance for the specified command. Implementations MUST return a Process configured with the provided command and all arguments previously collected by the builder. The returned process SHOULD be ready for execution by the caller. ```APIDOC ## build Builds a process instance for the specified command. ```php public build(string|array $command): \Symfony\Component\Process\Process ``` **Parameters:** | Parameter | Type | Description | |------------|-------------------|-----------------------------------------------------------| | `$command` | **string\|array** | the base command that SHALL be used to create the process | **Return Value:** the configured process instance ``` -------------------------------- ### Get All Candidate Paths - PHP Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/GitAttributes/CandidateProviderInterface Use this method to get a combined list of all candidate paths for export-ignore rules, with folders listed before files. The order is deterministic. ```php public all(): list ``` -------------------------------- ### CodeOwnersCommand configure Method Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Console/Command/CodeOwnersCommand Configures the command's name, description, and options. ```php protected configure(): void ``` -------------------------------- ### PHPUnit JSON Output Example Source: https://context7.com/php-fast-forward/dev-tools/llms.txt Example of the structured JSON output from PHPUnit tests, useful for CI and agent-driven workflows. Includes test results, summary, and code coverage details. ```json { "message": "PHPUnit tests completed successfully.", "level": "info", "context": { "output": { "result": "success", "summary": "Tests: 42, Assertions: 156", "coverage": { "line_coverage": 94.7, "covered_lines": 318, "total_lines": 336, "minimum": 80.0 } } } } ``` -------------------------------- ### ChangelogEntryCommand Constructor Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Console/Command/ChangelogEntryCommand Initializes the command with required filesystem and changelog manager interfaces. ```php public __construct(\FastForward\DevTools\Filesystem\FilesystemInterface $filesystem, \FastForward\DevTools\Changelog\Manager\ChangelogManagerInterface $changelogManager): mixed ``` -------------------------------- ### ComposerSelfUpdateRunner update Method Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/SelfUpdate/ComposerSelfUpdateRunner Updates the installed DevTools package using Composer. It can target either the global Composer installation or a local project. The method returns the exit code of the Composer process. ```php public update(bool $global, * ComposerSelfUpdateRunner * @internal */ class ComposerSelfUpdateRunner implements SelfUpdateRunnerInterface { /** * @var ProcessBuilderInterface */ private $processBuilder; /** * @var ProcessQueueInterface */ private $processQueue; /** * @param ProcessBuilderInterface $processBuilder * @param ProcessQueueInterface $processQueue */ public function __construct( ProcessBuilderInterface $processBuilder, ProcessQueueInterface $processQueue ): void { $this->processBuilder = $processBuilder; $this->processQueue = $processQueue; } /** * @param bool $global * @param OutputInterface $output * * @return int */ public function update(bool $global, OutputInterface $output): int { $command = [ 'composer', 'update', '--no-interaction', '--no-progress', ]; if ($global) { $command[] = '--global'; } $process = $this->processBuilder->createProcess($command); $this->processQueue->add($process); $this->processQueue->wait(); $output->writeln('DevTools updated successfully!'); return $process->getExitCode(); } } ``` -------------------------------- ### Run Initial Sanity Checks with Composer Source: https://github.com/php-fast-forward/dev-tools/blob/main/docs/getting-started/installation.rst After installation, use these Composer commands to perform basic checks and ensure the DevTools are functioning correctly. These commands trigger various development-related tasks. ```bash composer skills ``` ```bash composer agents ``` ```bash composer tests ``` ```bash composer docs ``` ```bash composer dev-tools ``` -------------------------------- ### Constructor: __construct Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/PhpUnit/Event/TestSuite/JoliNotifExecutionFinishedSubscriber Initializes the subscriber with an event tracer and an optional notifier. ```APIDOC ## __construct ### Description Creates a new execution-finished subscriber instance. The provided tracer must contain the event history collected during the current PHPUnit run. ### Parameters - **$tracer** (\FastForward\DevTools\PhpUnit\Event\EventTracer) - Required - The event tracer used to inspect recorded PHPUnit events and derive notification data. - **$notifier** (\Joli\JoliNotif\NotifierInterface) - Optional - The notifier responsible for dispatching the desktop notification. Defaults to DefaultNotifier. ``` -------------------------------- ### update Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/SelfUpdate/ComposerSelfUpdateRunner Updates the installed DevTools package. ```APIDOC ## update ### Description Updates the installed DevTools package. ### Parameters #### Path Parameters - **$global** (bool) - Required - whether the update should target Composer's global project - **$output** (\Symfony\Component\Console\Output\OutputInterface) - Required - the command output used by the update process ### Return Value the Composer process status code ``` -------------------------------- ### Manually Sync DevTools Automation Assets Source: https://github.com/php-fast-forward/dev-tools/blob/main/docs/getting-started/installation.rst Run this command to manually synchronize automation assets, such as configuration files, Git hooks, and ignore rules, after installing or upgrading the DevTools package. This is also useful if Composer plugins were disabled during installation. ```bash composer dev-tools:sync ``` ```bash vendor/bin/dev-tools dev-tools:sync ``` -------------------------------- ### Run Initial Development Tool Commands Source: https://github.com/php-fast-forward/dev-tools/blob/main/docs/getting-started/quickstart.rst Execute a series of composer commands to synchronize shared assets, link skills and agents, run tests, generate documentation, and verify the development tool pipeline. ```bash composer dev-tools:sync ``` ```bash composer skills ``` ```bash composer agents ``` ```bash composer tests ``` ```bash composer docs ``` ```bash composer dev-tools ``` -------------------------------- ### isOutdated Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/SelfUpdate/VersionCheckResult Determines if the installed DevTools version is outdated. ```APIDOC ## isOutdated ### Description Detects whether the installed version is older than the latest stable version. ### Returns - **bool** - True if the current version is older than the latest version, false otherwise. ``` -------------------------------- ### getCurrentVersion Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/SelfUpdate/VersionCheckResult Retrieves the currently installed DevTools version. ```APIDOC ## getCurrentVersion ### Description Returns the currently installed DevTools version. ### Returns - **string** - The current version string. ``` -------------------------------- ### Constructor Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Console/Output/GithubActionOutput Initializes the GithubActionOutput with console output and environment interfaces. ```APIDOC ## __construct ### Description Initializes the GithubActionOutput with console output and environment interfaces. ### Parameters #### Path Parameters - **$output** (\Symfony\Component\Console\Output\ConsoleOutputInterface) - Required - the console output used to emit workflow commands - **$environment** (\FastForward\DevTools\Environment\RuntimeEnvironmentInterface) - Required - resolves runtime environment capabilities ``` -------------------------------- ### Run dev-tools:sync with Overwrite Source: https://github.com/php-fast-forward/dev-tools/blob/main/docs/commands/sync.rst Synchronize development tools and configurations, overwriting existing target files. ```bash composer dev-tools:sync --overwrite ``` -------------------------------- ### Get Executed Lines Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/PhpUnit/Coverage/CoverageSummary Retrieves the count of executable lines that have been executed. ```php public executedLines(): int ``` -------------------------------- ### Run Sync Command Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Composer/Plugin Handles automated script installation by executing the `dev-tools:sync` command after relevant Composer operations. This ensures development tools are synchronized with the current project state. ```php public runSyncCommand("\Composer\Script\Event" $event): void ``` -------------------------------- ### Get GitIgnore Entries Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/GitIgnore/GitIgnore Retrieves the list of entries from the .gitignore file. ```APIDOC ## Method: entries ### Description Returns the list of entries from the .gitignore file. ### Method GET ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Return Value - **list**: the non-empty .gitignore entries ``` -------------------------------- ### PackagedDirectorySynchronizer Constructor Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Sync/PackagedDirectorySynchronizer Initializes the synchronizer with filesystem, finder factory, and logger instances. ```APIDOC ## __construct PackagedDirectorySynchronizer ### Description Initializes the synchronizer with a filesystem and finder factory. ### Method CONSTRUCT ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response None ``` -------------------------------- ### Get ChangelogRelease Version Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Changelog/Document/ChangelogRelease Retrieves the version string for this release section. ```php public getVersion(): string ``` -------------------------------- ### Apply Upgrade Workflow and Analyze Source: https://github.com/php-fast-forward/dev-tools/blob/main/docs/commands/dependencies.rst Applies the full upgrade workflow (Jack and Composer commands) before analyzing dependencies. Prioritizes dev dependencies. ```bash composer dependencies --upgrade --dev ``` -------------------------------- ### canGenerateDocs Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Project/ProjectCapabilities Detects whether the repository can generate guides, API documentation, or both. ```APIDOC ## canGenerateDocs ### Description Detects whether the repository can generate guides, API documentation, or both. ### Method GET ### Endpoint /canGenerateDocs ### Response #### Success Response (200) - **canGenerateDocs** (bool) - whether the repository can generate guides, API documentation, or both ``` -------------------------------- ### Constructor for DevToolsExtension Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/PhpUnit/Runner/Extension/DevToolsExtension Initializes the extension with a tracer, started subscriber, and an optional execution finished subscriber. The default Joli notification tracer is used if none is provided. ```php public __construct(\\|PHPUnit\\Event\\Tracer\\Tracer $tracer = new \\FastForward\\DevTools\\PhpUnit\\Event\\EventTracer(), \\PHPUnit\\Event\\TestSuite\\StartedSubscriber $startedSubscriber = new \\FastForward\\DevTools\\PhpUnit\\Event\\TestSuite\\ByPassfinalsStartedSubscriber(), \\PHPUnit\\Event\\TestRunner\\ExecutionFinishedSubscriber|null $executionFinishedSubscriber = null): mixed ``` -------------------------------- ### isGlobalInstallation Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/SelfUpdate/ComposerSelfUpdateScopeResolver Returns whether DevTools is running from Composer's global installation. ```APIDOC ## isGlobalInstallation ### Description Returns whether DevTools is running from Composer's global installation. ### Method public ### Returns bool ``` -------------------------------- ### __construct method for ProcessQueue (PHP) Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Process/ProcessQueue Initializes the ProcessQueue with dependencies for GitHub Actions output, environment configuration, runtime environment detection, and output capability detection. ```php public __construct(\FastForward\DevTools\Console\Output\GithubActionOutput $githubActionOutput, \FastForward\DevTools\Process\ProcessEnvironmentConfiguratorInterface $environmentConfigurator, \FastForward\DevTools\Environment\RuntimeEnvironmentInterface $environment, \FastForward\DevTools\Console\Output\OutputCapabilityDetectorInterface $outputCapabilityDetector): mixed ``` -------------------------------- ### Get Coverage Percentage Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/PhpUnit/Coverage/CoverageSummary Calculates and returns the line coverage as a floating-point percentage. ```php public percentage(): float ``` -------------------------------- ### Get Iterator for Entries Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/GitIgnore/GitIgnore Returns an iterator that allows looping through the .gitignore entries. ```APIDOC ## Method: getIterator ### Description Returns an iterator over the .gitignore entries. This method implements the IteratorAggregate interface. ### Method GET ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Return Value - **\ArrayIterator**: an iterator over the entries ``` -------------------------------- ### __construct method for ColorPreservingProcessEnvironmentConfigurator Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Process/ColorPreservingProcessEnvironmentConfigurator Initializes the `ColorPreservingProcessEnvironmentConfigurator` with an environment interface to read parent process variables and an output capability detector to determine TTY/decorated output capabilities. ```php public __construct(\FastForward\DevTools\Environment\EnvironmentInterface $environment, \FastForward\DevTools\Console\Output\OutputCapabilityDetectorInterface $outputCapabilityDetector): mixed ``` -------------------------------- ### Get GitIgnore Path Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/GitIgnore/GitIgnore Retrieves the file system path to the .gitignore file. ```APIDOC ## Method: path ### Description Returns the file system path to the .gitignore file. ### Method GET ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Return Value - **string**: the absolute path to the .gitignore file ``` -------------------------------- ### Run Dependency Analysis Source: https://github.com/php-fast-forward/dev-tools/blob/main/docs/commands/dependencies.rst Executes the dependency analysis using default settings. ```bash composer dependencies ``` -------------------------------- ### Retrieve documentation URL Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Composer/Json/Schema/SupportInterface Returns the URL for official project documentation. ```php public getDocs(): string ``` -------------------------------- ### GET /security Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Composer/Json/Schema/Support Retrieves the vulnerability disclosure policy URL stored by the instance. ```APIDOC ## GET /security ### Description Retrieves the vulnerability disclosure policy URL. ### Method GET ### Endpoint /security ### Response #### Success Response (200) - **url** (string) - The vulnerability disclosure policy URL. ``` -------------------------------- ### Get All ChangelogRelease Entries Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Changelog/Document/ChangelogRelease Retrieves all entries for the release, organized by changelog category. ```php public getEntries(): array> ``` -------------------------------- ### isInstalledAsDependency Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Path/DevToolsPathResolver Detects whether the provided path belongs to an installed vendor copy of DevTools. ```APIDOC ## isInstalledAsDependency ### Description Detects whether the provided path belongs to an installed vendor copy of DevTools. ### Method `public static isInstalledAsDependency(string $packagePath = ''): bool` ### Parameters #### Path Parameters - **$packagePath** (string) - Optional - an optional path within the package; defaults to the package root ### Return Value (bool) - True if installed as a dependency, false otherwise. ``` -------------------------------- ### Instantiate FundingProfile Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Funding/FundingProfile Create a new FundingProfile instance with optional GitHub Sponsors, custom URLs, and unsupported entries from YAML and Composer. ```php public __construct(array $githubSponsors = [], array $customUrls = [], array $unsupportedYamlEntries = [], array> $unsupportedComposerEntries = []): mixed ``` -------------------------------- ### Check if Installed as Dependency Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Path/DevToolsPathResolver Detects if the given path belongs to a vendor-installed copy of DevTools. ```php public static isInstalledAsDependency(string $packagePath = ''): bool ``` -------------------------------- ### __construct Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Project/ProjectCapabilities Creates a repository capability snapshot for reporting and documentation commands. ```APIDOC ## __construct ### Description Creates a repository capability snapshot for reporting and documentation commands. ### Parameters #### Path Parameters - **apiDirectories** (list) - Required - project-relative directories that contain autoloaded PHP API source - **defaultPackageName** (string|null) - Required - the default package name derived from Composer namespaces when available - **hasGuideDirectory** (bool) - Required - whether the configured guide directory exists - **hasTestsPath** (bool) - Required - whether the configured tests path exists - **hasWikiTarget** (bool) - Required - whether the configured wiki target exists - **hasPhpSourceFiles** (bool) - Required - whether the repository exposes autoloaded PHP source that can be tested ``` -------------------------------- ### getRuntimeAutoloadPath Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Path/DevToolsPathResolver Returns the active Composer autoload file for the current DevTools installation mode. ```APIDOC ## getRuntimeAutoloadPath ### Description Returns the active Composer autoload file for the current DevTools installation mode. When DevTools runs as a dependency, the runtime autoloader lives at the Composer vendor root. Repository checkouts instead use the package-local `vendor/autoload.php`. ### Method `public static getRuntimeAutoloadPath(string $packagePath = ''): string` ### Parameters #### Path Parameters - **$packagePath** (string) - Optional - an optional package root path; defaults to the current package root ``` -------------------------------- ### __construct Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Process/ProcessQueue Initializes the ProcessQueue with necessary dependencies for managing processes and their output. ```APIDOC ## __construct ### Description Initializes the ProcessQueue with dependencies for output handling, environment configuration, and capability detection. ### Method __construct ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters - **githubActionOutput** (*\FastForward\DevTools\Console\Output\GithubActionOutput*) - Wraps grouped queue output in GitHub Actions logs when supported. - **environmentConfigurator** (*\FastForward\DevTools\Process\ProcessEnvironmentConfiguratorInterface*) - Interface for configuring process environments. - **environment** (*\FastForward\DevTools\Environment\RuntimeEnvironmentInterface*) - Resolves runtime environment capabilities. - **outputCapabilityDetector** (*\FastForward\DevTools\Console\Output\OutputCapabilityDetectorInterface*) - Detects ANSI-capable output. ``` -------------------------------- ### ChangelogNextVersionCommand execute Method Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Console/Command/ChangelogNextVersionCommand Executes the command to print the inferred next semantic version. ```php protected execute( A \Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\Output\OutputInterface $output ): int ``` -------------------------------- ### Get DevTools Binary Path Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Path/DevToolsPathResolver Retrieve the full path to the packaged DevTools binary. ```php public static getBinaryPath(): string ``` -------------------------------- ### Get Formatted Coverage Percentage Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/PhpUnit/Coverage/CoverageSummary Returns the line coverage as a formatted percentage string. ```php public percentageAsString(): string ``` -------------------------------- ### Build HTML Documentation Source: https://github.com/php-fast-forward/dev-tools/blob/main/docs/running/specialized-commands.rst Builds the HTML documentation site using phpDocumentor. Specify --source and --target directories as needed. ```bash composer docs --source=docs --target=.dev-tools ``` -------------------------------- ### Retrieve readme path Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Composer/Json/ComposerJsonInterface Returns the readme path or reference as defined in the metadata. ```php public getReadme(): string ``` -------------------------------- ### Get Executable Lines Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/PhpUnit/Coverage/CoverageSummary Retrieves the total count of executable lines in the analyzed code. ```php public executableLines(): int ``` -------------------------------- ### Get GitHub Sponsors Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Funding/FundingProfile Retrieve the normalized GitHub Sponsors handles from the funding profile. ```php public getGithubSponsors(): array ``` -------------------------------- ### Build HTML Documentation Site Source: https://github.com/php-fast-forward/dev-tools/blob/main/README.md Generate the HTML documentation site from PSR-4 code and the `docs/` directory. Keeps documentation up-to-date with the codebase. ```bash composer docs ``` -------------------------------- ### getRuntimeToolBinaryPath Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Path/DevToolsPathResolver Returns the active Composer runtime binary path for the current DevTools installation mode. ```APIDOC ## getRuntimeToolBinaryPath ### Description Returns the active Composer runtime binary path for the current DevTools installation mode. Repository checkouts use the package-local `vendor/bin/`, while dependency installs resolve binaries from the active Composer vendor root. ### Method `public static getRuntimeToolBinaryPath(string $binary, string $packagePath = ''): string` ### Parameters #### Path Parameters - **$binary** (string) - Required - the binary name relative to `vendor/bin` - **$packagePath** (string) - Optional - an optional package root path; defaults to the current package root ``` -------------------------------- ### ChangelogEntryCommand Constructor Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Console/Command/ChangelogEntryCommand Initializes the ChangelogEntryCommand with necessary filesystem and changelog manager services. ```APIDOC ## __construct ### Description Initializes the ChangelogEntryCommand with necessary filesystem and changelog manager services. ### Parameters #### Path Parameters - **filesystem** (*\FastForward\DevTools\Filesystem\FilesystemInterface*) - Description not available - **changelogManager** (*\FastForward\DevTools\Changelog\Manager\ChangelogManagerInterface*) - Description not available ``` -------------------------------- ### getSubscribedEvents Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Composer/Plugin Retrieves the comprehensive map of events this listener SHALL handle for script installation and synchronization. ```APIDOC ## getSubscribedEvents ### Description Retrieves the comprehensive map of events this listener SHALL handle. This method MUST define the lifecycle triggers for script installation and synchronization during Composer package operations. ### Method public static ### Returns `array` - the event mapping registry ``` -------------------------------- ### Get Unsupported YAML Entries Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Funding/FundingProfile Retrieve any unsupported YAML entries that were preserved without transformation. ```php public getUnsupportedYamlEntries(): array ``` -------------------------------- ### Retrieve project wiki URL Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Composer/Json/Schema/SupportInterface Returns the URL for project knowledge and documentation. ```php public getWiki(): string ``` -------------------------------- ### Get Custom Funding URLs Source: https://github.com/php-fast-forward/dev-tools/wiki/classes/FastForward/DevTools/Funding/FundingProfile Retrieve the normalized custom funding URLs from the funding profile. ```php public getCustomUrls(): array ```