This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Akeeba Release Maker is a CLI tool that automates software releases via Akeeba Release System (ARS) on Joomla sites. It uploads packages to remote storage (S3, Bunny CDN, FTP/SFTP), creates/updates ARS releases and items, publishes them, and pushes Joomla update streams to static hosting.
# Install dependencies
composer install
# Run the release process
php releasemaker.php release path/to/config.json5
php releasemaker.php release path/to/config.yaml --debug
# Run Rector for code quality analysis
vendor/bin/rector process --dry-runThere are no unit tests in this project.
releasemaker.php bootstraps a Silly (Symfony Console wrapper) CLI app. The single command release is handled by Command\Release, which:
- Loads configuration from a JSON5/YAML file via
Configuration::fromFile() - Validates that all configured step classes exist and implement
StepInterface - Executes each step sequentially by instantiating and calling
execute()
Configuration is a singleton (Configuration::getInstance()) that holds all application state, divided into sections:
release— version, category, release notesapi— ARS API connection (endpoint, auth)steps— ordered list of step classes to executeconnection— upload connection configs (S3, FTP, SFTP, Bunny)updates— update stream publishing configsources— file sources to uploadvolatile— mutable runtime state shared between steps
Parser discovery: Configuration\Parser auto-discovers parsers in Configuration/Parser/ using @priority and @extension docblock annotations via reflection. Higher priority parsers are tried first. Three formats supported: JSON5, YAML, Legacy JSON.
Steps in src/Step/ extend AbstractStep and implement StepInterface (constructor takes SymfonyStyle, single execute() method):
- Prepare — scans and catalogs files to upload
- Deploy — uploads files to remote storage via Uploader implementations
- Release — creates/updates the ARS release record
- Items — creates/updates ARS items (one per uploaded file)
- Publish — sets release and items to published state
- Updates — pushes Joomla update XML streams to static hosting
Six implementations of Contracts\Uploader in src/Uploader/: S3, Bunny, NativeFtp, CurlFtp, NativeSftp, CurlSftp. Each takes a ConnectionConfiguration and provides upload(sourcePath, destPath). cURL variants serve as fallbacks when native PHP extensions (ext-ftp, ext-ssh2) are unavailable.
Deployment\ARSInterface defines the ARS API contract. ArsJoomla is the sole implementation, using the Joomla 4+ Web Services API (ARS 7.x and later). The ARSConnectorAware mixin instantiates it with the configured endpoint and token.
- Magic property access:
MagicGetterAware/MagicSetterAwaretraits map$obj->proptogetProp()/setProp()methods on private properties. Configuration sections expose read-only properties via@property-readannotations. - Annotation-driven discovery: Configuration parsers are discovered by scanning
@priorityannotations in docblocks (not PHP attributes). AKEEBAENGINEconstant: Must be defined before using theakeeba/s3library. Defined inreleasemaker.phpandrector.php.
- Namespace root:
Akeeba\ReleaseMaker\with PSR-4 autoloading fromsrc/ - PHP 8.0+ required; platform target PHP 8.2 in Composer
- Allman-style braces (opening brace on its own line for control structures and class/method declarations)
- Tab indentation
- Custom exception hierarchy in
src/Exception/with numeric exit codes defined inContracts\ExceptionCode - File header:
@package AkeebaReleaseMaker,@copyright,@licensedocblock on every PHP file