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
81 changes: 0 additions & 81 deletions .circleci/config.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .docker/php/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM node:20-alpine AS node

FROM ghcr.io/sylius/sylius-php:8.3-xdebug-alpine
FROM ghcr.io/sylius/sylius-php:8.5-xdebug-alpine

RUN apk add --no-cache \
bash \
Expand Down
120 changes: 120 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
name: CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Tests the latest releases of the dependencies also without a push.
schedule:
- cron: "0 6 * * 1"
workflow_dispatch:

permissions:
contents: read

defaults:
run:
# An explicit bash shell runs with -o pipefail, the default one does not.
shell: bash

jobs:
test:
name: PHP ${{ matrix.php }} / Symfony ${{ matrix.symfony }}
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php: [ "8.1", "8.2", "8.3", "8.4", "8.5" ]
# "8" is pinned as 8.*: the lowest run installs 8.0, the stable run the latest 8.x
symfony: [ "5.4", "6.4", "7.4", "8" ]
exclude:
# Symfony 7.x requires PHP 8.2+
- php: "8.1"
symfony: "7.4"
# Symfony 8.x requires PHP 8.4+
- php: "8.1"
symfony: "8"
- php: "8.2"
symfony: "8"
- php: "8.3"
symfony: "8"

env:
# Symfony Flex restricts all Symfony components, including indirect dependencies, to this version
SYMFONY_REQUIRE: ${{ matrix.symfony }}.*

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: gd
coverage: none

- name: Validate composer.json
if: matrix.php == '8.5' && matrix.symfony == '8'
run: composer validate --strict

- name: Install Symfony Flex
run: |
composer global config --no-plugins allow-plugins.symfony/flex true
composer global require --no-interaction --no-progress --no-scripts --no-plugins symfony/flex

- name: Get the Composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"

- name: Cache Composer packages
uses: actions/cache@v6
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-php${{ matrix.php }}-symfony${{ matrix.symfony }}-${{ hashFiles('composer.json') }}
restore-keys: composer-php${{ matrix.php }}-symfony${{ matrix.symfony }}-

# Lowest compatible dependencies
- name: Install the lowest dependencies
env:
# Composer 2.9+ leaves out versions with security advisories, which would raise the lowest versions.
# Composer 2.10+ reads COMPOSER_NO_BLOCKING, 2.9.2+ reads COMPOSER_NO_SECURITY_BLOCKING.
COMPOSER_NO_BLOCKING: "1"
COMPOSER_NO_SECURITY_BLOCKING: "1"
run: composer update --no-interaction --no-progress --prefer-lowest --prefer-stable

- name: PHPUnit (lowest)
run: vendor/bin/phpunit --no-coverage

- name: ECS (lowest)
run: composer ecs

- name: PHPStan (lowest)
run: composer phpstan

- name: Deptrac (lowest)
run: composer deptrac

- name: Rector (lowest)
run: composer rector

# Latest compatible dependencies
- name: Install the latest dependencies
run: composer update --no-interaction --no-progress --prefer-stable

- name: PHPUnit (stable)
run: vendor/bin/phpunit --no-coverage

- name: ECS (stable)
run: composer ecs

- name: PHPStan (stable)
run: composer phpstan

- name: Deptrac (stable)
run: composer deptrac

- name: Rector (stable)
run: composer rector
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,28 @@ 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).

## [1.1.0] - 2026-10-30

### Added
- Symfony 8 support (requires PHP 8.4+ and Liip Imagine Bundle 2.16+)
- PHP 8.5 support

### Changed
- CI moved from CircleCI to GitHub Actions
- CI tests PHP 8.1–8.5 with Symfony 5.4, 6.4, 7.4 and 8.x; Symfony 7.4 replaces 7.1 in the matrix
- CI restricts all Symfony components to the tested Symfony version with Symfony Flex (`SYMFONY_REQUIRE`)
- Development tools: PHPStan 2, Rector 2, ECS 13, Deptrac 2–4, PHPUnit 10.5+
- `phpunit.xml.dist` uses the PHPUnit 10.5 schema and tests declare data providers with attributes
- Docker development image uses PHP 8.5

### Removed
- PHP 8.0 support: PHP 8.0 reached end of life in November 2023, and Twig releases without security advisories require PHP 8.1. PHP 8.0 is supported by the 1.0.x releases.

### Technical Requirements
- PHP 8.1, 8.2, 8.3, 8.4, or 8.5
- Symfony 5.4, 6.x, 7.x, or 8.x
- Liip Imagine Bundle ^2.0

## [1.0.0] - 2024-10-29

### Added
Expand Down Expand Up @@ -66,4 +88,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Docker Compose setup for local development
- Integration test examples

[1.1.0]: https://github.com/3brs/imgproxy-bundle/compare/v1.0.0...v1.1.0
[1.0.0]: https://github.com/3brs/imgproxy-bundle/releases/tag/v1.0.0
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ test: ## Run all tests (PHPUnit + ECS + PHPStan + Deptrac)
docker compose exec php vendor/bin/phpunit --no-coverage
docker compose exec php composer ecs
docker compose exec php composer phpstan
@docker compose exec php bash -c 'if [ -f vendor/bin/deptrac ]; then composer deptrac; else echo "Deptrac skipped (requires PHP 8.1+)"; fi'
docker compose exec php composer deptrac

phpunit: ## Run PHPUnit tests
docker compose exec php vendor/bin/phpunit --no-coverage
Expand Down Expand Up @@ -56,7 +56,7 @@ phpstan: ## Run PHPStan static analysis
phpstan-baseline: ## Generate PHPStan baseline
docker compose exec php composer phpstan-baseline

deptrac: ## Run Deptrac architecture analysis (requires PHP 8.1+)
deptrac: ## Run Deptrac architecture analysis
docker compose exec php composer deptrac

rector: ## Check code for automated refactoring opportunities
Expand All @@ -65,7 +65,7 @@ rector: ## Check code for automated refactoring opportunities
rector-fix: ## Apply automated refactorings
docker compose exec php composer rector-fix

infection: ## Run mutation testing (requires PHP 8.1+ and infection package)
infection: ## Run mutation testing (requires the infection package)
docker compose exec -e XDEBUG_MODE=coverage php vendor/bin/infection --threads=4

build: ## Rebuild Docker images
Expand Down
Loading
Loading