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
13 changes: 13 additions & 0 deletions .github/composer-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"config": {
"cache-vcs-dir": "/dev/null",
"platform-check": false,
"preferred-install": {
"*": "dist"
},
"allow-plugins": {
"ergebnis/composer-normalize": true,
"symfony/flex": true
}
}
}
157 changes: 0 additions & 157 deletions .github/workflows/ci.yaml

This file was deleted.

51 changes: 51 additions & 0 deletions .github/workflows/composer-validate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Composer Validate

on:
push:
paths:
- 'composer.json'
pull_request:
paths:
- 'composer.json'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

permissions:
contents: read

jobs:
composer-sync:
name: 'Composer validation'
runs-on: ubuntu-24.04
env:
php-version: '8.4'

steps:
-
name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.php-version }}
ini-values: "memory_limit=-1"
coverage: none

-
name: Checkout target branch
uses: actions/checkout@v6

-
name: 'Install dependencies'
run: |
COMPOSER_HOME="$(composer config home)"
([ -d "$COMPOSER_HOME" ] || mkdir "$COMPOSER_HOME") && cp .github/composer-config.json "$COMPOSER_HOME/config.json"
composer global require -q "ergebnis/composer-normalize"
composer install --no-progress

-
name: 'Normalized composer.json'
run: |
echo "composer.json"
composer validate
composer normalize
16 changes: 16 additions & 0 deletions .github/workflows/inspector-bot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: CS

on:
pull_request:

permissions:
contents: read

jobs:
call-inspector-bot:
name: InspectorBot
uses: rollerscapes/inspector-bot/.github/workflows/inspector-bot.yml@main
with:
package: RollerworksUriEncoder
check_license: true

62 changes: 62 additions & 0 deletions .github/workflows/phpstan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: PHPStan

on:
pull_request:

defaults:
run:
shell: bash

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

permissions:
contents: read

jobs:
phpstan:
name: PHPStan
runs-on: ubuntu-24.04

env:
php-version: '8.2'
steps:
-
name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.php-version }}
ini-values: "memory_limit=-1"
coverage: none

-
name: Checkout target branch
uses: actions/checkout@v6
with:
ref: ${{ github.base_ref }}

-
name: Checkout PR
uses: actions/checkout@v6

-
name: Install dependencies
run: |
COMPOSER_HOME="$(composer config home)"
([ -d "$COMPOSER_HOME" ] || mkdir "$COMPOSER_HOME") && cp .github/composer-config.json "$COMPOSER_HOME/config.json"
composer install --no-progress --ansi --no-plugins

-
name: Generate PHPStan baseline
run: |
git checkout composer.json
git checkout -m ${{ github.base_ref }}
vendor/bin/phpstan analyze --generate-baseline --allow-empty-baseline --no-progress
git checkout -m FETCH_HEAD

-
name: PHPStan
run: |
vendor/bin/phpstan analyze --no-progress --error-format=github

52 changes: 52 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:

test:

name: 'PHPUnit with PHP ${{ matrix.php-version }} / Symfony ${{ matrix.symfony-version }}'
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
include:
- php-version: '8.1'
- php-version: '8.2'
- php-version: '8.3'
- php-version: '8.4'
- php-version: '8.5'
steps:
-
name: Checkout
uses: actions/checkout@v6

-
name: 'Set up PHP'
uses: 'shivammathur/setup-php@v2'
with:
php-version: '${{ matrix.php-version }}'
coverage: none
env:
update: true

-
name: 'Install dependencies'
env:
COMPOSER_OPTIONS: '${{ matrix.composer-options }}'
SYMFONY_REQUIRE: '${{ matrix.symfony-version }}'
run: |
composer global config --no-plugins allow-plugins.symfony/flex true
composer global require --no-progress --no-scripts --no-plugins symfony/flex
composer update --no-progress --no-interaction --optimize-autoloader $COMPOSER_OPTIONS

-
name: Run Tests
run: make phpunit
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2014 Sebastiaan Stok
Copyright (c) 2014-present Sebastiaan Stok

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading
Loading