Skip to content

Commit fa9a2eb

Browse files
authored
Merge pull request #4948 from Catrobat/dependabot/composer/vimeo/psalm-5.24.0
Build(deps-dev): Bump vimeo/psalm from 5.23.1 to 5.24.0
2 parents 4e933c9 + ff189ea commit fa9a2eb

File tree

9 files changed

+53
-25
lines changed

9 files changed

+53
-25
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
"symfony/phpunit-bridge": "6.4.*",
9191
"symfony/stopwatch": "6.4.*",
9292
"symfony/web-profiler-bundle": "6.4.*",
93-
"vimeo/psalm": "5.23.*",
93+
"vimeo/psalm": "5.24.*",
9494
"wapmorgan/php-deprecation-detector": "2.0.*",
9595
"textalk/websocket": "1.5.8.*"
9696
},

composer.lock

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/bootstrap.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
use Symfony\Component\Dotenv\Dotenv;
46

57
require dirname(__DIR__).'/vendor/autoload.php';
@@ -11,10 +13,10 @@
1113
// Load cached env vars if the .env.local.php file exists
1214
// Run "composer dump-env prod" to create it (requires symfony/flex >=1.2)
1315
if (is_array($env = @include dirname(__DIR__).'/.env.local.php') && (!isset($env['APP_ENV']) || ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? $env['APP_ENV']) === $env['APP_ENV'])) {
14-
(new Dotenv())->usePutenv(true)->populate($env);
16+
(new Dotenv())->usePutenv()->populate($env);
1517
} else {
1618
// load all the .env files
17-
(new Dotenv())->usePutenv(true)->loadEnv(dirname(__DIR__).'/.env');
19+
(new Dotenv())->usePutenv()->loadEnv(dirname(__DIR__).'/.env');
1820
}
1921

2022
$_SERVER += $_ENV;

config/routes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
$routingConfigurator->add('apple_login', '/login/check-apple');
1616

1717
$routingConfigurator->add('gesdinet_jwt_refresh_token', '/api/authentication/refresh')
18-
->controller(App\Api\Services\Authentication\JWTTokenRefreshService::class.'::refresh')
18+
->controller([App\Api\Services\Authentication\JWTTokenRefreshService::class, 'refresh'])
1919
;
2020

2121
$routingConfigurator->import('@OpenAPIServerBundle/Resources/config/routing.yaml')

deploy.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,12 @@ function loadEnvVariables(string $filename): void
152152
run('bin/console doctrine:migrations:rollup -n');
153153
});
154154

155+
// dump the .env file as .env.local.php to speed up the loading of the env vars
156+
task('dump:env', function () {
157+
cd('{{release_path}}');
158+
run('composer dump-env prod');
159+
});
160+
155161
/*
156162
* Main task
157163
*/
@@ -161,6 +167,7 @@ function loadEnvVariables(string $filename): void
161167
'deploy:clear_paths',
162168
'deploy:vendors',
163169
'install:assets',
170+
'dump:env',
164171
'deploy:cache:clear',
165172
'deploy:writable',
166173
'deploy:symlink',

phpstan.neon

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ parameters:
55
- config/bootstrap_test.php
66
level: 6 # 0 is the loosest lvl and 9 is the strictest (https://phpstan.org/user-guide/rule-levels)
77
paths:
8-
- src
9-
- config
10-
- tests
8+
- . # Analyze all directories in the project
9+
excludePaths:
10+
- node_modules/**/*
11+
- var/**/*
12+
- vendor/**/*
13+
- deploy.php
1114
inferPrivatePropertyTypeFromConstructor: true
1215
reportUnmatchedIgnoredErrors: true
1316

psalm.xml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,25 @@
22
<!-- 1 is the highest and 8 the lowest error level -->
33
<psalm
44
errorLevel="4"
5-
resolveFromConfigFile="true"
65
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
76
xmlns="https://getpsalm.org/schema/config"
87
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
98
findUnusedBaselineEntry="true"
109
findUnusedCode="false"
1110
>
1211
<projectFiles>
13-
<directory name="src" />
12+
<directory name="bin" />
1413
<directory name="config" />
14+
<directory name="migrations" />
15+
<directory name="public" />
16+
<directory name="src" />
17+
<directory name="templates" />
1518
<directory name="tests" />
19+
<directory name="translations" />
1620
<ignoreFiles>
1721
<directory name="vendor" />
1822
<!-- Legacy code that will be removed in the future -->
1923
<directory name="src/Project/CatrobatCode"/>
20-
<file name="config/bootstrap.php" />
21-
<file name="config/preload.php" />
2224
</ignoreFiles>
2325
</projectFiles>
2426

@@ -38,5 +40,15 @@
3840
<directory name="tests" />
3941
</errorLevel>
4042
</InternalMethod>
43+
<MissingFile>
44+
<errorLevel type="info">
45+
<file name="config/bootstrap.php"/>
46+
</errorLevel>
47+
</MissingFile>
48+
<InvalidArgument>
49+
<errorLevel type="info">
50+
<file name="config/routes.php"/>
51+
</errorLevel>
52+
</InvalidArgument>
4153
</issueHandlers>
4254
</psalm>

public/index.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
use App\Kernel;
46
use Symfony\Component\ErrorHandler\Debug;
57
use Symfony\Component\HttpFoundation\Request;

public/index_test.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
// This file is just a copy of index.php with new Kernel(env="test", debug=false) hardcoded
46
// There is no better solution right now than changing the APP_ENV value in the .env file
57
// or using this copied file. Else tests like behat may use the test config and initialize
@@ -27,9 +29,9 @@
2729
Request::setTrustedHosts([$trustedHosts]);
2830
}
2931

30-
(new Dotenv(true))->load('../.env.test');
32+
(new Dotenv())->load('../.env.test');
3133
if (file_exists('../.env.test.local')) {
32-
(new Dotenv(true))->load('../.env.test.local');
34+
(new Dotenv())->load('../.env.test.local');
3335
}
3436

3537
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);

0 commit comments

Comments
 (0)