Skip to content

Commit

Permalink
Merge pull request #1985 from tomudding/chore/resolve-many-ci-issues
Browse files Browse the repository at this point in the history
chore(psalm): fix many open issues
  • Loading branch information
tomudding authored Feb 22, 2025
2 parents 1af5707 + 3a884d4 commit f1cef49
Show file tree
Hide file tree
Showing 59 changed files with 269 additions and 1,242 deletions.
13 changes: 0 additions & 13 deletions .idea/php.xml

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

12 changes: 1 addition & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: help runprod rundev runtest runcoverage update updatecomposer updatepackage updateglide getvendordir phpstan phpcs phpcbf phpcsfix phpcsfixtypes build buildprod builddev update
.PHONY: help runprod rundev runtest runcoverage update updatecomposer updatepackage updateglide getvendordir phpstan phpcs phpcbf build buildprod builddev update

help:
@echo "Makefile commands:"
Expand All @@ -16,8 +16,6 @@ help:
@echo "phpstan"
@echo "phpcs"
@echo "phpcbf"
@echo "phpcsfix"
@echo "phpcsfixtypes"
@echo "replenish"
@echo "build"
@echo "buildprod"
Expand Down Expand Up @@ -200,14 +198,6 @@ phpcbf: loadenv
phpcbfall: loadenv
@vendor/bin/phpcbf -p

phpcsfix: loadenv
@vendor/bin/php-cs-fixer fix --cache-file=data/cache/.php-cs-fixer.cache --rules=@PSR1,@PSR12,@DoctrineAnnotation,@PHP82Migration,group_import,-single_import_per_statement module
@vendor/bin/php-cs-fixer fix --cache-file=data/cache/.php-cs-fixer.cache --rules=@PSR1,@PSR12,@DoctrineAnnotation,@PHP82Migration,group_import,-single_import_per_statement config

phpcsfixrisky: loadenv
@vendor/bin/php-cs-fixer fix --cache-file=data/cache/.php-cs-fixer.cache --allow-risky=yes --rules=@PHP80Migration:risky,-declare_strict_types,-use_arrow_functions module
@vendor/bin/php-cs-fixer fix --cache-file=data/cache/.php-cs-fixer.cache --allow-risky=yes --rules=@PHP80Migration:risky,-declare_strict_types,-use_arrow_functions config

checkcomposer: loadenv
@XDEBUG_MODE=off vendor/bin/composer-require-checker check composer.json

Expand Down
8 changes: 4 additions & 4 deletions bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

define('APP_ENV', getenv('APP_ENV') ?: 'production');
define('APP_ENV', false !== getenv('APP_ENV') ?: 'production');

// `NONCE_REPLACEMENT_STRING` is required for production, if not set we should not continue loading the application.
if (APP_ENV === 'production') {
if (!getenv('NONCE_REPLACEMENT_STRING')) {
if (false === getenv('NONCE_REPLACEMENT_STRING')) {
throw new RuntimeException(
"Could not find `NONCE_REPLACEMENT_STRING`.\n"
);
Expand All @@ -16,7 +16,7 @@
}
}

define('NONCE_REPLACEMENT_STRING', getenv('NONCE_REPLACEMENT_STRING') ?: '');
define('NONCE_REPLACEMENT_STRING', false !== getenv('NONCE_REPLACEMENT_STRING') ?: '');

// make sure we are in the correct directory
chdir(__DIR__);
Expand Down Expand Up @@ -44,7 +44,7 @@ public static function getConfig(): array
{
// Retrieve configuration
$appConfig = require __DIR__ . '/config/application.config.php';
if (APP_ENV === 'development' && file_exists(__DIR__ . '/config/development.config.php')) {
if ('production' !== APP_ENV && file_exists(__DIR__ . '/config/development.config.php')) {
$appConfig = ArrayUtils::merge($appConfig, require __DIR__ . '/config/development.config.php');
}

Expand Down
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@
"san/san-session-toolbar": "^4.0.1",
"phpunit/phpunit": "^10.5.16",
"squizlabs/php_codesniffer": "^3.9.0",
"friendsofphp/php-cs-fixer": "^3.52.1",
"phpstan/phpstan": "^1.10.66",
"phpstan/extension-installer": "^1.3.1",
"bnf/phpstan-psr-container": "^1.0.1",
Expand Down
Loading

0 comments on commit f1cef49

Please sign in to comment.