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

Upgrade and vault support #47

Merged
merged 10 commits into from
Oct 11, 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
17 changes: 8 additions & 9 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ COMPOSE_DOMAIN=sites.itkdev.dk
# Real environment variables win over .env files.
#
# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES.
# https://symfony.com/doc/current/configuration/secrets.html
#
# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2).
# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration
Expand All @@ -24,19 +25,12 @@ TRUSTED_PROXIES=127.0.0.1,REMOTE_ADDR
DEFAULT_URI='https://itksites.local.itkdev.dk/'
###< symfony/framework-bundle ###

###> symfony/messenger ###
#MESSENGER_TRANSPORT_DSN='doctrine://default?queue_name=async'
MESSENGER_TRANSPORT_DSN='amqp://user:password@rabbit:5672/%2f/messages'
MESSENGER_TRANSPORT_DSN_FAILED='doctrine://default?queue_name=failed'
###< symfony/messenger ###

###> doctrine/doctrine-bundle ###
# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml
#
# DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db"
DATABASE_URL="mysql://root:password@mariadb:3306/db?serverVersion=10.5.13-MariaDB"
#DATABASE_URL="postgresql://db_user:[email protected]:5432/db_name?serverVersion=13&charset=utf8"
DATABASE_URL="mysql://root:password@mariadb:3306/db?serverVersion=10.11.9-MariaDB"
###< doctrine/doctrine-bundle ###

###> nelmio/cors-bundle ###
Expand All @@ -45,9 +39,10 @@ CORS_ALLOW_ORIGIN='^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$'

###> symfony/messenger ###
# Choose one of the transports below
# MESSENGER_TRANSPORT_DSN=doctrine://default
# MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages
# MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages
MESSENGER_TRANSPORT_DSN='amqp://user:password@rabbit:5672/%2f/messages'
MESSENGER_TRANSPORT_DSN_FAILED='doctrine://default?queue_name=failed'
###< symfony/messenger ###

###> itk-dev/openid-connect-bundle ###
Expand All @@ -61,3 +56,7 @@ AZURE_AZ_OIDC_LEEWAY=10

OIDC_CLI_LOGIN_ROUTE=OIDC_CLI_LOGIN_ROUTE_TEST
###< itk-dev/openid-connect-bundle ###

VAULT_URL=https://vault.itkdev.dk
VAULT_ROLE_ID="CHANGE_ME_IN_LOCAL_ENV"
VAULT_SECRET_ID="CHANGE_ME_IN_LOCAL_ENV"
16 changes: 8 additions & 8 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ["8.1"]
php: ["8.3"]
name: Validate composer (PHP ${{ matrix.php}})
steps:
- name: Checkout
Expand Down Expand Up @@ -52,15 +52,15 @@ jobs:
validate-doctrine-schema:
runs-on: ubuntu-latest
env:
DATABASE_URL: mysql://db:[email protected]:3306/db?serverVersion=mariadb-10.5.0
DATABASE_URL: mysql://db:[email protected]:3306/db?serverVersion=10.11.0-mariadb
strategy:
fail-fast: false
matrix:
php: ["8.1"]
php: ["8.3"]
name: Validate Doctrine Schema (PHP ${{ matrix.php}})
services:
mariadb:
image: mariadb:10.5
image: mariadb:10.11
env:
MYSQL_USER: db
MYSQL_PASSWORD: db
Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ["8.1"]
php: ["8.3"]
name: PHP Coding Standards Fixer (PHP ${{ matrix.php }})
steps:
- name: Checkout
Expand All @@ -135,7 +135,7 @@ jobs:
restore-keys: ${{ runner.os }}-composer

- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist

- name: php-cs-fixer
run: phpdbg -qrr ./vendor/bin/php-cs-fixer fix --dry-run
Expand All @@ -156,7 +156,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ["8.1"]
php: ["8.3"]
name: PHP Unit tests (PHP ${{ matrix.php }})
steps:
- name: Checkout
Expand Down Expand Up @@ -194,7 +194,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ["8.1"]
php: ["8.3"]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- Upgraded to Symfony 6.4
- Updated composer setup
- Added new GPU hosts and Hetzner

Expand Down
4 changes: 4 additions & 0 deletions bin/console
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
use App\Kernel;
use Symfony\Bundle\FrameworkBundle\Console\Application;

if (!is_dir(dirname(__DIR__).'/vendor')) {
throw new LogicException('Dependencies are missing. Try running "composer install".');
}

if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) {
throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".');
}
Expand Down
10 changes: 7 additions & 3 deletions bin/phpunit
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@ if (!ini_get('date.timezone')) {
}

if (is_file(dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit')) {
define('PHPUNIT_COMPOSER_INSTALL', dirname(__DIR__).'/vendor/autoload.php');
require PHPUNIT_COMPOSER_INSTALL;
PHPUnit\TextUI\Command::main();
if (PHP_VERSION_ID >= 80000) {
require dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit';
} else {
define('PHPUNIT_COMPOSER_INSTALL', dirname(__DIR__).'/vendor/autoload.php');
require PHPUNIT_COMPOSER_INSTALL;
PHPUnit\TextUI\Command::main();
}
} else {
if (!is_file(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) {
echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`.\n";
Expand Down
61 changes: 31 additions & 30 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"license": "MIT",
"type": "project",
"require": {
"php": ">=8.1",
"php": ">=8.3",
"ext-ctype": "*",
"ext-iconv": "*",
"api-platform/core": "^3.0",
Expand All @@ -14,33 +14,34 @@
"doctrine/orm": "^2.11",
"easycorp/easyadmin-bundle": "^4.0",
"itk-dev/openid-connect-bundle": "^3.0",
"itk-dev/vault-bundle": "^0.0.2",
"nelmio/cors-bundle": "^2.2",
"ocramius/doctrine-batch-utils": "^2.3",
"phpdocumentor/reflection-docblock": "^5.3",
"phpstan/phpdoc-parser": "^1.2",
"symfony/amqp-messenger": "^6.2",
"symfony/asset": "^6.1",
"symfony/browser-kit": "^6.2",
"symfony/console": "^6.1",
"symfony/doctrine-messenger": "^6.2",
"symfony/dotenv": "^6.1",
"symfony/expression-language": "^6.1",
"symfony/amqp-messenger": "^6.4",
"symfony/asset": "^6.4",
"symfony/browser-kit": "^6.4",
"symfony/console": "^6.4",
"symfony/doctrine-messenger": "^6.4",
"symfony/dotenv": "^6.4",
"symfony/expression-language": "^6.4",
"symfony/flex": "^2",
"symfony/framework-bundle": "^6.1",
"symfony/http-client": "^6.2",
"symfony/messenger": "^6.1",
"symfony/framework-bundle": "^6.4",
"symfony/http-client": "^6.4",
"symfony/messenger": "^6.4",
"symfony/monolog-bundle": "^3.0",
"symfony/property-access": "^6.1",
"symfony/property-info": "^6.1",
"symfony/proxy-manager-bridge": "^6.1",
"symfony/runtime": "^6.1",
"symfony/security-bundle": "^6.1",
"symfony/serializer": "^6.1",
"symfony/twig-bundle": "^6.1",
"symfony/uid": "^6.1",
"symfony/validator": "^6.1",
"symfony/property-access": "^6.4",
"symfony/property-info": "^6.4",
"symfony/proxy-manager-bridge": "^6.4",
"symfony/runtime": "^6.4",
"symfony/security-bundle": "^6.4",
"symfony/serializer": "^6.4",
"symfony/twig-bundle": "^6.4",
"symfony/uid": "^6.4",
"symfony/validator": "^6.4",
"symfony/webpack-encore-bundle": "^2.0",
"symfony/yaml": "^6.1",
"symfony/yaml": "^6.4",
"z4kn4fein/php-semver": "^2.0"
},
"require-dev": {
Expand All @@ -50,13 +51,13 @@
"justinrainbow/json-schema": "^5.2",
"phpunit/phpunit": "^9.5",
"psalm/plugin-symfony": "^5.1",
"symfony/css-selector": "^6.1",
"symfony/debug-bundle": "^6.1",
"symfony/css-selector": "^6.4",
"symfony/debug-bundle": "^6.4",
"symfony/maker-bundle": "^1.37",
"symfony/phpunit-bridge": "^6.1",
"symfony/stopwatch": "^6.1",
"symfony/var-dumper": "^6.1",
"symfony/web-profiler-bundle": "^6.1",
"symfony/phpunit-bridge": "^6.4",
"symfony/stopwatch": "^6.4",
"symfony/var-dumper": "^6.4",
"symfony/web-profiler-bundle": "^6.4",
"vimeo/psalm": "^5.0",
"weirdan/doctrine-psalm-plugin": "^2.2"
},
Expand All @@ -83,9 +84,9 @@
"config": {
"allow-plugins": {
"composer/package-versions-deprecated": true,
"ergebnis/composer-normalize": true,
"symfony/flex": true,
"symfony/runtime": true,
"ergebnis/composer-normalize": true
"symfony/runtime": true
},
"optimize-autoloader": true,
"preferred-install": {
Expand All @@ -96,7 +97,7 @@
"extra": {
"symfony": {
"allow-contrib": false,
"require": "6.3.*"
"require": "6.4.*"
}
},
"scripts": {
Expand Down
Loading
Loading