Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to PHP 8 and Symfony 7 #91

Merged
merged 2 commits into from
May 2, 2024
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
28 changes: 14 additions & 14 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,63 +10,63 @@ on:

jobs:
cs:
name: Coding Style
name: Coding style
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
php-version: 8.3
coverage: none

- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install the dependencies
run: composer install --no-interaction --no-suggest
run: composer install --no-interaction --no-progress

- name: Check the coding style
run: vendor/bin/ecs check bin public src tests --config ecs.php --no-progress-bar --ansi
run: vendor/bin/ecs check bin public src tests --config ecs.php --no-progress-bar

- name: Analyze the redirects.yaml
run: bin/yaml-lint redirects.yaml

tests:
name: Tests
name: Unit tests
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
php-version: 8.3
coverage: none

- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install the dependencies
run: composer install --no-interaction --no-suggest
run: composer install --no-interaction --no-progress

- name: Run the unit tests
run: vendor/bin/phpunit --colors=always
run: vendor/bin/phpunit

build_and_deploy:
name: Build and Deploy
name: Build and deploy
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: [cs, tests]
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
php-version: 8.3
coverage: none

- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install the dependencies
run: composer install -o --no-dev --no-interaction --no-suggest
run: composer install -o --no-dev --no-interaction --no-progress

- name: Dump routes
run: bin/dump-routes
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/vendor
/.phpunit.result.cache
/var
.php_cs.cache
/vendor
5 changes: 3 additions & 2 deletions bin/dump-routes
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ use Symfony\Component\Console\Application;

require __DIR__.'/../vendor/autoload.php';

$application = new Application();
$command = new DumpRouterCommand();

$application = new Application();
Toflar marked this conversation as resolved.
Show resolved Hide resolved
$application->add($command);
$application->setDefaultCommand($command->getName(), true);
$application->run();
$application->run();
5 changes: 3 additions & 2 deletions bin/yaml-lint
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ use Symfony\Component\Console\Application;

require __DIR__.'/../vendor/autoload.php';

$application = new Application();
$command = new YamlLintCommand();

$application = new Application();
$application->add($command);
$application->setDefaultCommand($command->getName(), true);
$application->run();
$application->run();
43 changes: 22 additions & 21 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,39 @@
{
"name": "contao/to.contao.org",
"description": "Shortlink service for the Contao Open Source Content Management System universe",
"description": "Shortlink service for the Contao Open Source CMS universe",
"license": "MIT",
"type": "project",
"authors": [
{
"name": "Yanick Witschi",
"email": "[email protected]"
}
],
"require": {
"php": "^7.4",
"symfony/routing": "^5.1",
"symfony/console": "^5.1",
"symfony/yaml": "^5.1",
"symfony/http-foundation": "^5.1",
"symfony/filesystem": "^5.1"
"php": "^8.1",
"symfony/console": "^7.0",
"symfony/filesystem": "^7.0",
"symfony/http-foundation": "^7.0",
"symfony/routing": "^7.0",
"symfony/yaml": "^7.0"
},
"require-dev": {
"contao/easy-coding-standard": "^3.0",
"phpunit/phpunit": "^9.2"
"contao/easy-coding-standard": "^6.12",
"phpunit/phpunit": "^9.5"
},
"autoload": {
"psr-4": {
"Contao\\ToContaoOrg\\": "src",
"Contao\\ToContaoOrg\\Test\\": "tests"
}
},
"license": "MIT",
"authors": [
{
"name": "Yanick Witschi",
"email": "[email protected]"
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
],
},
"scripts": {
"csfix": [
"vendor/bin/ecs check bin public src tests --config ecs.php --fix --ansi"
],
"tests": [
"vendor/bin/phpunit --colors=always"
]
"csfix": "@php vendor/bin/ecs check bin public src tests --fix",
"tests": "vendor/bin/phpunit"
}
}
Loading
Loading