Add declare(strict_types=1) to 5 PHP files missing it (routes/console.php,
4 feature tests). Fix Boot.php route includes from Routes/ to routes/ to
match actual directory casing — prevents breakage on case-sensitive filesystems.
Co-Authored-By: Virgil <virgil@lethean.io>
Aligns composer package name with forge repo path
(forge.lthn.ai/core/php-content). Part of host-uk/* → core/* migration.
Co-Authored-By: Virgil <virgil@lethean.io>
Replace github.server_url/GITHUB_REF_NAME with explicit forge URL
and GITEA_REF_NAME/GITEA_OUTPUT.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
On tag push (v*), zips the package and publishes to the
forge.lthn.ai Composer package registry.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace setup-php action with pre-built container.
Eliminates ~50s setup overhead per matrix job.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Enable Attr.EnableID in HTMLPurifier so id attributes are preserved
- Move URI config before maybeGetRawHTMLDefinition() (config finalization)
- Reorder status attribute checks: circuit broken before disabled
- Use make() for signature tests needing null secrets (bypass auto-gen)
- Register webhook route stub in test setUp for URL generation test
- Use Mockery mock for CdnPurgeService stub to satisfy type hint
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Move URI config calls before maybeGetRawHTMLDefinition() which
finalizes the config and prevents further set() calls
- Use Mockery::mock()->shouldIgnoreMissing() for CdnPurgeService stub
to satisfy type hint in ContentItemObserver
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The type-hinted constructor on CdnPurgeService requires
Plug\Cdn\CdnManager which doesn't exist in test env. Bind
the service itself with a no-op stub.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
HTMLPurifier: set HTML.DefinitionID and HTML.DefinitionRev which
are required when using maybeGetRawHTMLDefinition().
CdnManager: bind a stub in tests when Plug\Cdn\CdnManager class
is not available (external dependency not in test environment).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Create Database/Factories for ContentWebhookEndpoint, ContentWebhookLog,
ContentItem, ContentTaxonomy, ContentBrief
- Register HTML5 elements (section, article, figure, figcaption, mark)
with HTMLPurifier custom definitions
- Use RefreshDatabase trait in TestCase with SQLite in-memory DB
- Update Pest.php to use custom Tests\TestCase
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Direct git clone of ../php-framework avoids shell escaping
issues with dynamic PHP-based path extraction.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Switch php -r argument to single quotes so PHP dollar signs
are not interpreted by bash. Pipe output to while-read loop.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The PHP variables inside php -r need \$ escaping, but shell
variables outside need bare $ for command substitution and
variable expansion.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Forgejo act runner caches reusable workflow definitions,
preventing updates from being picked up. Inline the workflow
with dependency checkout step.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The reusable php-test.yml now detects pest/phpunit/pint availability
and clones path dependencies using the runner token.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add phpunit.xml and tests/Pest.php for standalone test execution.
Apply Laravel Pint formatting fixes across all source files.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>