Skip to content

Commit

Permalink
Migration Symfony to 6.4 and add PHPUnit
Browse files Browse the repository at this point in the history
  • Loading branch information
antten committed Jun 13, 2024
1 parent 7be8363 commit c377707
Show file tree
Hide file tree
Showing 10 changed files with 3,196 additions and 616 deletions.
6 changes: 6 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# define your env variables for the test env here
KERNEL_CLASS='App\Kernel'
APP_SECRET='$ecretf0rt3st'
SYMFONY_DEPRECATIONS_HELPER=999999
PANTHER_APP_ENV=panther
PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,13 @@
/vendor/
###< symfony/framework-bundle ###
.idea

###> symfony/phpunit-bridge ###
.phpunit.result.cache
/phpunit.xml
###< symfony/phpunit-bridge ###

###> phpunit/phpunit ###
/phpunit.xml
.phpunit.result.cache
###< phpunit/phpunit ###
23 changes: 23 additions & 0 deletions bin/phpunit
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env php
<?php

if (!ini_get('date.timezone')) {
ini_set('date.timezone', 'UTC');
}

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';
}
23 changes: 15 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@
"php": ">=8.2",
"ext-ctype": "*",
"ext-iconv": "*",
"symfony/console": "5.4.*",
"symfony/dotenv": "5.4.*",
"symfony/console": "6.4.*",
"symfony/dotenv": "6.4.*",
"symfony/flex": "^1.17|^2",
"symfony/framework-bundle": "5.4.*",
"symfony/runtime": "5.4.*",
"symfony/yaml": "5.4.*"
},
"require-dev": {
"symfony/framework-bundle": "6.4.*",
"symfony/property-access": "6.4.*",
"symfony/runtime": "6.4.*",
"symfony/serializer": "6.4.*",
"symfony/validator": "^6.4",
"symfony/yaml": "6.4.*"
},
"config": {
"allow-plugins": {
Expand Down Expand Up @@ -62,7 +63,13 @@
"extra": {
"symfony": {
"allow-contrib": false,
"require": "5.4.*"
"require": "6.4.*"
}
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"symfony/browser-kit": "6.4.*",
"symfony/css-selector": "6.4.*",
"symfony/phpunit-bridge": "^7.1"
}
}
Loading

0 comments on commit c377707

Please sign in to comment.