Skip to content

Commit b45ff5d

Browse files
committed
Update phpunit to version 10
1 parent f6eb242 commit b45ff5d

14 files changed

+1084
-923
lines changed

.editorconfig

+4-14
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,15 @@ trim_trailing_whitespace = true
1212
insert_final_newline = true
1313
tab_width = 4
1414

15-
[*.php]
16-
indent_style = space
17-
indent_size = 4
18-
end_of_line = lf
19-
charset = utf-8
20-
trim_trailing_whitespace = true
21-
insert_final_newline = true
22-
tab_width = 4
23-
2415
[*.sh]
25-
indent_style = space
2616
indent_size = 2
2717

2818
[*.md]
2919
trim_trailing_whitespace = false
3020

3121
[.gitignore]
3222
indent_size = 0
33-
indent_style = space
34-
end_of_line = lf
35-
charset = utf-8
36-
trim_trailing_whitespace = true
23+
24+
[*.yaml]
25+
indent_size = 2
26+
tab_width = 2

application/.env.test

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# define your env variables for the test env here
2-
KERNEL_CLASS='App\Kernel'
2+
KERNEL_CLASS="\Mapbender\BaseKernel"
33
APP_SECRET='$ecretf0rt3st'
4+
MAPBENDER_DATABASE_URL="sqlite:///%kernel.project_dir%/var/db/test.sqlite"
5+
46
SYMFONY_DEPRECATIONS_HELPER=999999
57
PANTHER_APP_ENV=panther
68
PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots

application/bin/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
*
22
!composer
3+
!phpunit
34
!*.php

application/bin/phpunit

+122
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
/**
5+
* Proxy PHP file generated by Composer
6+
*
7+
* This file includes the referenced bin path (../vendor/phpunit/phpunit/phpunit)
8+
* using a stream wrapper to prevent the shebang from being output on PHP<8
9+
*
10+
* @generated
11+
*/
12+
13+
namespace Composer;
14+
15+
$GLOBALS['_composer_bin_dir'] = __DIR__;
16+
$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/vendor/autoload.php';
17+
$GLOBALS['__PHPUNIT_ISOLATION_EXCLUDE_LIST'] = $GLOBALS['__PHPUNIT_ISOLATION_BLACKLIST'] = array(realpath(__DIR__ . '/..'.'/vendor/phpunit/phpunit/phpunit'));
18+
19+
if (PHP_VERSION_ID < 80000) {
20+
if (!class_exists('Composer\BinProxyWrapper')) {
21+
/**
22+
* @internal
23+
*/
24+
final class BinProxyWrapper
25+
{
26+
private $handle;
27+
private $position;
28+
private $realpath;
29+
30+
public function stream_open($path, $mode, $options, &$opened_path)
31+
{
32+
// get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
33+
$opened_path = substr($path, 17);
34+
$this->realpath = realpath($opened_path) ?: $opened_path;
35+
$opened_path = 'phpvfscomposer://'.$this->realpath;
36+
$this->handle = fopen($this->realpath, $mode);
37+
$this->position = 0;
38+
39+
return (bool) $this->handle;
40+
}
41+
42+
public function stream_read($count)
43+
{
44+
$data = fread($this->handle, $count);
45+
46+
if ($this->position === 0) {
47+
$data = preg_replace('{^#!.*\r?\n}', '', $data);
48+
}
49+
$data = str_replace('__DIR__', var_export(dirname($this->realpath), true), $data);
50+
$data = str_replace('__FILE__', var_export($this->realpath, true), $data);
51+
52+
$this->position += strlen($data);
53+
54+
return $data;
55+
}
56+
57+
public function stream_cast($castAs)
58+
{
59+
return $this->handle;
60+
}
61+
62+
public function stream_close()
63+
{
64+
fclose($this->handle);
65+
}
66+
67+
public function stream_lock($operation)
68+
{
69+
return $operation ? flock($this->handle, $operation) : true;
70+
}
71+
72+
public function stream_seek($offset, $whence)
73+
{
74+
if (0 === fseek($this->handle, $offset, $whence)) {
75+
$this->position = ftell($this->handle);
76+
return true;
77+
}
78+
79+
return false;
80+
}
81+
82+
public function stream_tell()
83+
{
84+
return $this->position;
85+
}
86+
87+
public function stream_eof()
88+
{
89+
return feof($this->handle);
90+
}
91+
92+
public function stream_stat()
93+
{
94+
return array();
95+
}
96+
97+
public function stream_set_option($option, $arg1, $arg2)
98+
{
99+
return true;
100+
}
101+
102+
public function url_stat($path, $flags)
103+
{
104+
$path = substr($path, 17);
105+
if (file_exists($path)) {
106+
return stat($path);
107+
}
108+
109+
return false;
110+
}
111+
}
112+
}
113+
114+
if (
115+
(function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
116+
|| (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
117+
) {
118+
return include("phpvfscomposer://" . __DIR__ . '/..'.'/vendor/phpunit/phpunit/phpunit');
119+
}
120+
}
121+
122+
return include __DIR__ . '/..'.'/vendor/phpunit/phpunit/phpunit';

application/composer.json

+6-2
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,14 @@
1919
}
2020
},
2121
"require-dev": {
22-
"phpunit/phpunit": "^9"
22+
"phpunit/phpunit": "^10",
23+
"dama/doctrine-test-bundle": "^7.3",
24+
"symfony/web-profiler-bundle": "^5.4",
25+
"symfony/debug-bundle": "^5.4",
26+
"symfony/browser-kit": "^5.4"
2327
},
2428
"require": {
25-
"php": ">=8.0",
29+
"php": ">=8.1",
2630
"components/font-awesome": "^6.0",
2731
"doctrine/dbal": "^3",
2832
"mapbender/digitizer": "dev-develop as v2.0-dev",

0 commit comments

Comments
 (0)