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
25 changes: 25 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Base port configuration for local development

# Test application (PHP built-in server)
APP_PORT=8080

# Grafana dashboard
GRAFANA_PORT=3000

# Tempo (traces backend)
TEMPO_PORT=3200

# OTLP ports exposed from Tempo (or Collector)
OTLP_GRPC_PORT=4317
OTLP_HTTP_PORT=4318

# OpenTelemetry Collector external ports (when enabled)
OTEL_COLLECTOR_GRPC_EXTERNAL=14317
OTEL_COLLECTOR_HTTP_EXTERNAL=14318

# Usage:
# 1) Copy this file to .env and adjust values if needed
# cp .env.example .env
# 2) Start environment:
# make up
# 3) Access URLs will reflect your chosen ports
4 changes: 2 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ Fixes #<!-- issue number -->

<!-- Describe the tests you ran to verify your changes -->

- [ ] Unit tests pass locally (`make phpunit`)
- [ ] Unit tests pass locally (`make test`)
- [ ] Code style checks pass (`make phpcs`)
- [ ] Static analysis passes (`make phpstan`)
- [ ] Integration tests pass (`make test`)
- [ ] Integration tests pass (`make app-tracing-test`)
- [ ] Added tests for new functionality
- [ ] Coverage requirement met (95%+)

Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/code_analyse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,7 @@ permissions:

on:
pull_request:
branches: [ main, develop ]
push:
branches: [ main, develop ]
schedule:
# Run daily at 2 AM UTC to catch dependency issues
- cron: '0 2 * * *'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -38,6 +33,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
extensions: opentelemetry, grpc
coverage: none
tools: composer:v2, cs2pr

Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,7 @@ permissions:

on:
pull_request:
branches: [ main, develop ]
push:
branches: [ main, develop ]
schedule:
# Run daily at 2 AM UTC to catch dependency issues
- cron: '0 2 * * *'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -36,7 +31,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
extensions: xdebug
extensions: xdebug, opentelemetry, grpc
coverage: xdebug
tools: composer:v2

Expand All @@ -54,6 +49,8 @@ jobs:
run: composer install --prefer-dist --no-progress --ignore-platform-req=ext-opentelemetry --ignore-platform-req=ext-protobuf

- name: Run tests with coverage
env:
SYMFONY_DEPRECATIONS_HELPER: "max[direct]=0"
run: |
mkdir -p var/coverage
vendor/bin/phpunit --coverage-html var/coverage/html --coverage-clover var/coverage/clover.xml --coverage-text
Expand All @@ -69,8 +66,8 @@ jobs:
echo number_format(\$percentage, 2);
")
echo "Coverage: ${COVERAGE}%"
if (( $(echo "$COVERAGE < 95.0" | bc -l) )); then
echo "❌ Coverage ${COVERAGE}% is below required 95%"
if (( $(echo "$COVERAGE < 70.0" | bc -l) )); then
echo "❌ Coverage ${COVERAGE}% is below required 70%"
exit 1
else
echo "βœ… Coverage ${COVERAGE}% meets requirement"
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: Dependency Review

on:
pull_request:
branches: [ main, develop ]

permissions:
contents: read
Expand All @@ -13,7 +12,7 @@ jobs:
name: Dependency Review
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
42 changes: 28 additions & 14 deletions .github/workflows/unit_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,7 @@ permissions:

on:
pull_request:
branches: [ main, develop ]
push:
branches: [ main, develop ]
schedule:
# Run daily at 2 AM UTC to catch dependency issues
- cron: '0 2 * * *'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -26,7 +21,7 @@ jobs:
unit-tests:
permissions:
contents: read
name: Unit Tests
name: PHP ${{ matrix.php }} - Symfony ${{ matrix.symfony }} - Monolog ${{ matrix.monolog }} (${{ matrix.dependencies }})
runs-on: ubuntu-latest
timeout-minutes: 15
env:
Expand All @@ -36,16 +31,30 @@ jobs:
fail-fast: false
matrix:
php: [ '8.2', '8.3', '8.4' ]
symfony: [ '6.4.*', '7.0.*', '7.1.*', '7.2.*', '7.3.*' ]
symfony: [ '6.4.*', '7.0.*', '7.1.*', '7.2.*', '7.3.*', '7.4.*', '8.0.*' ]
monolog: [ '2.9', '3.9' ]
dependencies: [ 'highest' ]
include:
# Test lowest dependencies on stable PHP version
- php: '8.2'
symfony: '6.4.*'
monolog: '^2.9'
dependencies: 'lowest'
- php: '8.2'
symfony: '6.4.*'
monolog: '3.0'
dependencies: 'lowest'
exclude:
# Exclude invalid combinations
# PHP 8.2 doesn't support Symfony 8.0 (requires PHP 8.3+)
- php: '8.2'
symfony: '7.1.*'
symfony: '8.0.*'
- php: '8.3'
symfony: '8.0.*'
- php: '8.5'
monolog: '2.9'
# PHP 8.3 doesn't support Symfony 8.0 (requires PHP 8.3+, but Symfony 8.0 requires PHP 8.3+)
# Actually, PHP 8.3 should support Symfony 8.0, so we keep it
# PHP 8.4 supports all Symfony versions

steps:
- name: Checkout
Expand All @@ -55,7 +64,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: opentelemetry, protobuf, json, mbstring, xdebug
extensions: opentelemetry, protobuf, json, mbstring, xdebug, grpc
coverage: none
tools: composer:v2

Expand All @@ -70,19 +79,21 @@ jobs:
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ matrix.php }}-${{ matrix.symfony }}-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock', '**/composer.json') }}
key: ${{ runner.os }}-composer-${{ matrix.php }}-${{ matrix.symfony }}-${{ matrix.monolog }}-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock', '**/composer.json') }}
restore-keys: |
${{ runner.os }}-composer-${{ matrix.php }}-${{ matrix.symfony }}-${{ matrix.dependencies }}-
${{ runner.os }}-composer-${{ matrix.php }}-${{ matrix.symfony }}-${{ matrix.monolog }}-${{ matrix.dependencies }}-
${{ runner.os }}-composer-${{ matrix.php }}-${{ matrix.symfony }}-${{ matrix.monolog }}-
${{ runner.os }}-composer-${{ matrix.php }}-${{ matrix.symfony }}-
${{ runner.os }}-composer-${{ matrix.php }}-

- name: Configure Symfony version
if: matrix.symfony != ''
- name: Configure Symfony and Monolog versions
if: matrix.symfony != '' && matrix.monolog != ''
run: |
composer require symfony/dependency-injection:${{ matrix.symfony }} --no-update --no-scripts
composer require symfony/config:${{ matrix.symfony }} --no-update --no-scripts
composer require symfony/yaml:${{ matrix.symfony }} --no-update --no-scripts
composer require symfony/http-kernel:${{ matrix.symfony }} --no-update --no-scripts
composer require monolog/monolog:${{ matrix.monolog }} --no-update --no-scripts

- name: Install dependencies (highest)
if: matrix.dependencies == 'highest'
Expand All @@ -96,4 +107,7 @@ jobs:
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- name: Run PHPUnit tests
env:
# Ignore indirect deprecations from third-party libraries (e.g., ramsey/uuid 4.x in PHP 8.2)
SYMFONY_DEPRECATIONS_HELPER: "max[direct]=0"
run: vendor/bin/phpunit --testdox
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ composer.lock
.idea
.history
.docker-compose.override.yml
/.env
loadTesting/reports/
Loading