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

PHP 8 & Symfony 6 #1153

Merged
merged 28 commits into from
Feb 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
e920453
PHP 8 & Symfony 6
qurben Oct 28, 2023
a83f39d
Fix(UserInterface): Verander getUsername naar getUserIdentifier
NathanHuisman Oct 26, 2024
d58dcee
Fix({Access,Login}Service): Constructor UsernamePasswordToken
NathanHuisman Oct 26, 2024
7e1c732
Update routing recipe
NathanHuisman Oct 19, 2024
c986ae7
Update web profiler bundle
NathanHuisman Oct 19, 2024
f345474
Update twig bundle
NathanHuisman Oct 19, 2024
7bb3ad5
Update translations recipe
NathanHuisman Oct 19, 2024
063e5aa
Update security recipe
NathanHuisman Oct 19, 2024
f9dbae2
Update Symfony PHPUnit recipe
NathanHuisman Oct 19, 2024
4332422
Update doctrine/annotations recipe
NathanHuisman Oct 19, 2024
a60f371
Update symfony doctrine bundle
NathanHuisman Oct 19, 2024
24f90ba
Prettier
NathanHuisman Oct 20, 2024
5b914e7
Update Sentry bundle
NathanHuisman Oct 20, 2024
50c39ba
Symfony6: Annotations naar attributes
NathanHuisman Oct 26, 2024
2bdab24
Update Symfony Console recipe
NathanHuisman Oct 26, 2024
b779648
Fix(ProfielRepository):
NathanHuisman Oct 26, 2024
feccf13
Fix MariaDB versie
NathanHuisman Oct 26, 2024
5e92270
Fix tests
NathanHuisman Oct 30, 2024
d8a5712
Merge branch 'master' into php8-symfony6
NathanHuisman Feb 6, 2025
c16c3e3
Fix CI
NathanHuisman Feb 6, 2025
e0fe5f4
Upgrade actions/setup-node
NathanHuisman Feb 6, 2025
c9eac0f
Update intellij config
NathanHuisman Feb 6, 2025
03183d9
Fix BrowserTestCase die geen screenshots neemt
NathanHuisman Feb 6, 2025
aaa7bde
Verander CI error screenshot path
NathanHuisman Feb 6, 2025
ee2b299
Extra debug meuk
NathanHuisman Feb 6, 2025
702a752
Update monolog
NathanHuisman Feb 6, 2025
ed9edab
Meer debugging ondersteuning
NathanHuisman Feb 6, 2025
0d96417
Fix twig alias
NathanHuisman Feb 8, 2025
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
2 changes: 1 addition & 1 deletion .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ SYMFONY_DEPRECATIONS_HELPER=999999
PANTHER_WEB_SERVER_DIR=./htdocs/
# --force-prefers-reduced-motion om panther scrollen direct te maken.
PANTHER_CHROME_ARGUMENTS='--window-size=1400,1024 --force-prefers-reduced-motion'

PANTHER_ERROR_SCREENSHOT_DIR='./var/error-screenshots'
WIKI_URL=http://wiki.dev-csrdelft.nl
26 changes: 13 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Enable Corepack
run: corepack enable

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: yarn
Expand All @@ -38,7 +38,7 @@ jobs:
run: yarn run production

- name: 📤 Upload dist
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: js
path: htdocs/dist
Expand All @@ -61,9 +61,9 @@ jobs:
- name: 💤 Shutdown Ubuntu MySQL (SUDO)
run: sudo service mysql stop # Shutdown the Default MySQL, "sudo" is necessary, please not remove it

- uses: getong/mariadb-action@v1.1
- uses: getong/mariadb-action@v1.11
with:
mariadb version: '10.3'
mariadb version: '10.11'
mysql root password: ''

- uses: actions/checkout@v3
Expand All @@ -89,7 +89,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
php-version: '8.2'
tools: composer:v2
extensions: pdo_mysql

Expand All @@ -98,7 +98,7 @@ jobs:
run: composer install

- name: 📥 Download JS
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: js
path: htdocs/dist
Expand All @@ -123,12 +123,12 @@ jobs:
PANTHER_NO_SANDBOX: '1'
run: php bin/phpunit

- name: 📤 Upload screenshot van fout
- name: 📤 Upload cache + logs + screenshots bij fout
if: ${{ failure() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: screenshot
path: screenshot
name: debug
path: var

deploy:
name: Push naar productie
Expand All @@ -155,7 +155,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
php-version: '8.2'
tools: composer:v2
extensions: pdo_mysql

Expand All @@ -179,7 +179,7 @@ jobs:
mv bin/ci/.gitignore.prod .gitignore

- name: 📥 Download JS
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: js
path: productie/htdocs/dist
Expand Down Expand Up @@ -213,7 +213,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
php-version: '8.2'
tools: composer:v2
extensions: pdo_mysql

Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ package-lock.json
###< phpunit/phpunit ###

###> symfony/phpunit-bridge ###
.phpunit
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

klopt dit wel?

.phpunit.result.cache
/phpunit.xml
###< symfony/phpunit-bridge ###
Expand Down
24 changes: 24 additions & 0 deletions .idea/Projects.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions .idea/jsLibraryMappings.xml

This file was deleted.

1 change: 1 addition & 0 deletions .idea/php-test-framework.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 36 additions & 1 deletion .idea/php.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .symfony.local.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
http:
document_root: htdocs/
passthru: index.php
46 changes: 10 additions & 36 deletions bin/console
Original file line number Diff line number Diff line change
@@ -1,48 +1,22 @@
#!/usr/bin/env php
<?php

use CsrDelft\common\ContainerFacade;
use CsrDelft\Kernel;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\ErrorHandler\Debug;

if (false === in_array(\PHP_SAPI, ['cli', 'phpdbg', 'embed'], true)) {
echo 'Warning: The console should be invoked via the CLI version of PHP, not the '.\PHP_SAPI.' SAPI'.\PHP_EOL;
if (!is_dir(dirname(__DIR__).'/vendor')) {
throw new LogicException('Dependencies are missing. Try running "composer install".');
}

set_time_limit(0);

require dirname(__DIR__).'/vendor/autoload.php';

if (!class_exists(Application::class)) {
throw new RuntimeException('You need to add "symfony/framework-bundle" as a Composer dependency.');
}

$input = new ArgvInput();
if (null !== $env = $input->getParameterOption(['--env', '-e'], null, true)) {
putenv('APP_ENV='.$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = $env);
}

if ($input->hasParameterOption('--no-debug', true)) {
putenv('APP_DEBUG='.$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = '0');
if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) {
throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".');
}

require __DIR__ . '/../config/bootstrap.php';

$kernel = new Kernel($_SERVER['APP_ENV'], (bool)$_SERVER['APP_DEBUG']);
$kernel->boot();
$container = $kernel->getContainer();

ContainerFacade::init($container);
require_once dirname(__DIR__).'/lib/defines.include.php';
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';

if ($_SERVER['APP_DEBUG']) {
umask(0000);

if (class_exists(Debug::class)) {
Debug::enable();
}
}
return function (array $context) {
$kernel = new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);

$application = new Application($kernel);
$application->run($input);
return new Application($kernel);
};
24 changes: 17 additions & 7 deletions bin/phpunit
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
#!/usr/bin/env php
<?php

if (!file_exists(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";
exit(1);
if (!ini_get('date.timezone')) {
ini_set('date.timezone', 'UTC');
}

if (false === getenv('SYMFONY_PHPUNIT_DIR')) {
putenv('SYMFONY_PHPUNIT_DIR='.__DIR__.'/.phpunit');
}
if (is_file(dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit')) {
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";
exit(1);
}

require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php';
require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php';
}
Loading
Loading