Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
.github/ export-ignore
.gitignore export-ignore
.markdownlint.json export-ignore
.php-cs-fixer.php export-ignore
.php-cs-fixer.* export-ignore
.phpstan/ export-ignore
.phpunit.* export-ignore
codecov.yml export-ignore
coverage/ export-ignore
coverage.clover export-ignore
coverage.xml export-ignore
DEVELOPMENT.md export-ignore
phpstan/ export-ignore
phpstan.neon.dist export-ignore
phpunit.xml* export-ignore
tests/ export-ignore
var/ export-ignore
Expand Down
94 changes: 57 additions & 37 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- 'legacy/*' # Legacy branches: legacy/v3.x
- 'feature/*' # Feature branches: feature/new-feature
- 'hotfix/*' # Hotfix branches: hotfix/urgent-fix
- 'release/*' # Release branches: release/v4.0.0
- 'release/*' # Release branches: release/v4.1.0
pull_request:
branches:
- 'main'
Expand All @@ -16,13 +16,16 @@ on:

jobs:
test:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

strategy:
fail-fast: false
matrix:
include:
# Symfony 6.4 LTS compatibility
- php: '8.1'
symfony-version: '6.4.*'
allowed-to-fail: false
- php: '8.2'
symfony-version: '6.4.*'
allowed-to-fail: false
Expand Down Expand Up @@ -63,25 +66,55 @@ jobs:
- php: '8.4'
symfony-version: '8.0.*'
allowed-to-fail: false

# PHP 8.5 with various Symfony versions
- php: '8.5'
symfony-version: '7.3.*'
symfony-version: '8.0.*'
allowed-to-fail: false

# Symfony 8.1
- php: '8.4'
symfony-version: '8.1.*'
allowed-to-fail: false
- php: '8.5'
symfony-version: '7.4.*'
symfony-version: '8.1.*'
allowed-to-fail: false

# Symfony 8.2 (development / pre-release)
- php: '8.4'
symfony-version: '8.2.*'
allowed-to-fail: true
- php: '8.5'
symfony-version: '8.2.*'
allowed-to-fail: true

# PHP 8.6 (beta / experimental)
- php: '8.6'
symfony-version: '8.0.*'
allowed-to-fail: false
allowed-to-fail: true
- php: '8.6'
symfony-version: '8.1.*'
allowed-to-fail: true
- php: '8.6'
symfony-version: '8.2.*'
allowed-to-fail: true

# Development stability tests
- php: '8.4'
stability: 'dev'
allowed-to-fail: true
- php: '8.5'
stability: 'dev'
allowed-to-fail: true
- php: '8.6'
stability: 'dev'
allowed-to-fail: true

name: "PHP ${{ matrix.php }}${{ matrix.symfony-version && format(' | Symfony {0}', matrix.symfony-version) || '' }}${{ matrix.stability && format(' | {0}', matrix.stability) || '' }}"

continue-on-error: ${{ matrix.allowed-to-fail }}

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v7

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -96,7 +129,7 @@ jobs:
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache composer dependencies
uses: actions/cache@v4
uses: actions/cache@v6
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
Expand Down Expand Up @@ -136,35 +169,22 @@ jobs:
run: composer cs

- name: Run static analysis
run: |
if [[ "${{ matrix.symfony-version }}" == "8.0.*" ]]; then
# Symfony 8.0: Use specific baseline for remaining issues
vendor/bin/phpstan analyse src --level=8 --configuration phpstan/symfony8-baseline.neon
elif [[ "${{ matrix.symfony-version }}" == "7.4.*" ]]; then
# Symfony 7.4 LTS: Functionally identical to 8.0, needs same baseline
vendor/bin/phpstan analyse src --level=8 --configuration phpstan/symfony74-baseline.neon
elif [[ "${{ matrix.symfony-version }}" == "6.4.*" || "${{ matrix.symfony-version }}" == "7.0.*" || "${{ matrix.symfony-version }}" == "7.1.*" || "${{ matrix.symfony-version }}" == "7.2.*" || "${{ matrix.symfony-version }}" == "7.3.*" ]]; then
# Older Symfony versions 6.4-7.3: Use legacy baseline for children() issue
composer analyse-legacy
else
# Future versions: Try without baseline first
composer analyse
fi
run: composer analyse -- --memory-limit=1G

- name: Run tests
run: composer test
env:
DISCOGS_CONSUMER_KEY: ${{ secrets.DISCOGS_CONSUMER_KEY }}
DISCOGS_CONSUMER_SECRET: ${{ secrets.DISCOGS_CONSUMER_SECRET }}
DISCOGS_PERSONAL_ACCESS_TOKEN: ${{ secrets.DISCOGS_PERSONAL_ACCESS_TOKEN }}
DISCOGS_CONSUMER_KEY: ${{ secrets.DISCOGS_CONSUMER_KEY }}
DISCOGS_CONSUMER_SECRET: ${{ secrets.DISCOGS_CONSUMER_SECRET }}
DISCOGS_PERSONAL_ACCESS_TOKEN: ${{ secrets.DISCOGS_PERSONAL_ACCESS_TOKEN }}

code-quality:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
name: Code Quality Checks

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v7

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -179,7 +199,7 @@ jobs:
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache composer dependencies
uses: actions/cache@v4
uses: actions/cache@v6
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
Expand All @@ -197,12 +217,12 @@ jobs:
fi

coverage:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
name: Code Coverage

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v7

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -217,7 +237,7 @@ jobs:
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache composer dependencies
uses: actions/cache@v4
uses: actions/cache@v6
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
Expand All @@ -229,14 +249,14 @@ jobs:
- name: Run tests with coverage
run: composer test-coverage
env:
DISCOGS_CONSUMER_KEY: ${{ secrets.DISCOGS_CONSUMER_KEY }}
DISCOGS_CONSUMER_SECRET: ${{ secrets.DISCOGS_CONSUMER_SECRET }}
DISCOGS_PERSONAL_ACCESS_TOKEN: ${{ secrets.DISCOGS_PERSONAL_ACCESS_TOKEN }}
DISCOGS_CONSUMER_KEY: ${{ secrets.DISCOGS_CONSUMER_KEY }}
DISCOGS_CONSUMER_SECRET: ${{ secrets.DISCOGS_CONSUMER_SECRET }}
DISCOGS_PERSONAL_ACCESS_TOKEN: ${{ secrets.DISCOGS_PERSONAL_ACCESS_TOKEN }}

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v7
with:
file: ./coverage.xml
files: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ composer.lock

# PHP CS Fixer
.php-cs-fixer.cache
.php-cs-fixer.php

# Coverage reports
coverage/
Expand Down
22 changes: 22 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

declare(strict_types=1);

$finder = PhpCsFixer\Finder::create()
->in(__DIR__ . '/src')
->in(__DIR__ . '/tests')
->exclude('vendor')
->exclude('coverage')
->exclude('.phpunit.cache')
->name('*.php');

$config = new PhpCsFixer\Config();
$config->setFinder($finder)
->setRules([
'@PSR12' => true,
'@PSR12:risky' => true,
])
->setRiskyAllowed(true)
->setUnsupportedPhpVersionAllowed(true);

return $config;
19 changes: 0 additions & 19 deletions .php-cs-fixer.php

This file was deleted.

15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [4.1.0](https://github.com/calliostro/discogs-bundle/releases/tag/v4.1.0) – 2026-09-19

### Added

- Upgraded dependency to `calliostro/php-discogs-api` v4.1 with built-in retry resilience on Discogs rate limits (`429`) and server overload (`503`).
- Added `auto_retry` (default `true`) and `max_retries` (default `3`) configuration options in `calliostro_discogs`.
- Compatibility testing and CI matrix coverage for PHP 8.1–8.6 and Symfony 6.4 LTS, 7.x, 8.0, 8.1, and 8.2.
- Created root `phpstan.neon.dist` (Level 8) and migrated `.php-cs-fixer.php` to `.php-cs-fixer.dist.php`.
- Added unit tests for new retry configuration and extension options maintaining 100% code coverage.

### Changed

- Updated GitHub Actions runners to `ubuntu-24.04` and modernized action versions to Node 24 compatible runners.
- Overhauled README and documentation tone, adopting native GitHub Markdown alerts, backtick method formatting, and sister bundle links.

## [4.0.0](https://github.com/calliostro/discogs-bundle/releases/tag/v4.0.0) – 2025-12-01

### 🚀 Complete Rewrite — Fresh Start
Expand Down
Loading