Merge remote-tracking branch 'origin/develop' #2
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| # ARFA 1.3 / KaririCode Spec V4.0 — Release Pipeline | |
| # Triggers on semantic version tags (v*). | |
| # Full quality gate (kcode quality) must pass before release is published. | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| release: | |
| name: Quality Gate + GitHub Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # PHP 8.4 + pcov: releases MUST pass with coverage (ARFA 1.3 §Testing) | |
| - uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.4' | |
| extensions: mbstring, xml | |
| coverage: pcov | |
| tools: composer:v2 | |
| # --no-scripts prevents accidental environment pollution during release | |
| - name: Install dependencies | |
| run: composer install --no-interaction --prefer-dist --no-progress --no-scripts | |
| - name: Install kcode (KaririCode Devkit) | |
| run: | | |
| wget -q https://github.com/KaririCode-Framework/kariricode-devkit/releases/latest/download/kcode.phar | |
| chmod +x kcode.phar | |
| sudo mv kcode.phar /usr/local/bin/kcode | |
| - name: Initialize devkit | |
| run: kcode init | |
| # src/Contract was removed in v4 — patch the generated phpstan.neon | |
| - name: Patch phpstan.neon (remove stale excludePaths) | |
| run: | | |
| sed -i '/excludePaths:/,/- \.\.\/src\/Contract/d' .kcode/phpstan.neon | |
| # Full pipeline: cs-fixer → phpstan (L9) → psalm → phpunit (pcov) | |
| # Exit code ≠ 0 aborts the release — zero tolerance (ARFA 1.3) | |
| - name: Run full quality pipeline (release gate) | |
| run: kcode quality | |
| - name: Extract version from tag | |
| id: version | |
| run: echo "tag=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT" | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ steps.version.outputs.tag }} | |
| name: KaririCode ProcessorPipeline ${{ steps.version.outputs.tag }} | |
| draft: false | |
| prerelease: false | |
| body: | | |
| ## KaririCode\ProcessorPipeline ${{ steps.version.outputs.tag }} | |
| A robust, immutable processor pipeline component for the KaririCode Framework. | |
| Enables modular, configurable processing chains for data transformation, | |
| validation, and sanitization. **ARFA 1.3 compliant.** | |
| ## Installation | |
| ```bash | |
| composer require kariricode/processor-pipeline | |
| ``` | |
| ## Quick Start | |
| ```php | |
| use KaririCode\ProcessorPipeline\ProcessorRegistry; | |
| use KaririCode\ProcessorPipeline\ProcessorBuilder; | |
| $registry = new ProcessorRegistry(); | |
| $registry | |
| ->register('sanitizer', 'trim', new TrimProcessor()) | |
| ->register('sanitizer', 'lowercase', new LowercaseProcessor()); | |
| $builder = new ProcessorBuilder($registry); | |
| $pipeline = $builder->buildPipeline('sanitizer', ['trim', 'lowercase']); | |
| $result = $pipeline->process(' HELLO WORLD '); | |
| // Result: 'hello world' | |
| ``` | |
| ## Quality Metrics | |
| | Metric | Value | | |
| |--------|-------| | |
| | Tests | 128 passing | | |
| | Assertions | 234 | | |
| | PHPStan Level | 9 (0 errors) | | |
| | Psalm | 100% (0 errors) | | |
| | Coverage | 100% classes / methods / lines | | |
| | PHP Version | 8.4+ | | |
| See [CHANGELOG.md](CHANGELOG.md) for details. |