mirror of
https://github.com/standardebooks/web.git
synced 2025-07-08 15:50:29 -04:00
Update Composer dependencies, clean up PHPStan config file, and remove Constants.php from Composer in favor of PHPStan configuration
This commit is contained in:
parent
c203de4c6b
commit
11e5770413
5 changed files with 22 additions and 24 deletions
|
@ -6,17 +6,11 @@
|
|||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"": "lib/"
|
||||
},
|
||||
"files": [
|
||||
"lib/Constants.php"
|
||||
]
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"lib/"
|
||||
],
|
||||
"files": [
|
||||
"lib/Constants.php"
|
||||
]
|
||||
},
|
||||
"require-dev": {
|
||||
|
|
12
composer.lock
generated
12
composer.lock
generated
|
@ -8,16 +8,16 @@
|
|||
"packages": [
|
||||
{
|
||||
"name": "brick/math",
|
||||
"version": "0.12.2",
|
||||
"version": "0.12.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/brick/math.git",
|
||||
"reference": "901eddb1e45a8e0f689302e40af871c181ecbe40"
|
||||
"reference": "866551da34e9a618e64a819ee1e01c20d8a588ba"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/brick/math/zipball/901eddb1e45a8e0f689302e40af871c181ecbe40",
|
||||
"reference": "901eddb1e45a8e0f689302e40af871c181ecbe40",
|
||||
"url": "https://api.github.com/repos/brick/math/zipball/866551da34e9a618e64a819ee1e01c20d8a588ba",
|
||||
"reference": "866551da34e9a618e64a819ee1e01c20d8a588ba",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -56,7 +56,7 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/brick/math/issues",
|
||||
"source": "https://github.com/brick/math/tree/0.12.2"
|
||||
"source": "https://github.com/brick/math/tree/0.12.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -64,7 +64,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2025-02-26T10:21:45+00:00"
|
||||
"time": "2025-02-28T13:11:00+00:00"
|
||||
},
|
||||
{
|
||||
"name": "erusev/parsedown",
|
||||
|
|
|
@ -4,11 +4,15 @@ includes:
|
|||
- ../../vendor/thecodingmachine/phpstan-safe-rule/phpstan-safe-rule.neon
|
||||
|
||||
parameters:
|
||||
level: 9
|
||||
|
||||
ignoreErrors:
|
||||
# Ignore errors caused by Template static class reflection
|
||||
# Ignore errors caused by `Template` static class reflection.
|
||||
- '#Call to an undefined static method Template::[a-zA-Z0-9\\_]+\(\)\.#'
|
||||
level:
|
||||
9
|
||||
|
||||
bootstrapFiles:
|
||||
- %rootDir%/../../../lib/Constants.php
|
||||
|
||||
paths:
|
||||
- %rootDir%/../../../lib
|
||||
- %rootDir%/../../../www
|
||||
|
@ -23,23 +27,23 @@ parameters:
|
|||
- %rootDir%/../../../scripts/update-patrons-circle
|
||||
- %rootDir%/../../../scripts/update-project-statuses
|
||||
- %rootDir%/../../../templates
|
||||
|
||||
dynamicConstantNames:
|
||||
- SITE_STATUS
|
||||
- DONATION_DRIVES_ENABLED
|
||||
- DONATION_DRIVE_COUNTER_ENABLED
|
||||
earlyTerminatingMethodCalls:
|
||||
Template:
|
||||
- Emit403
|
||||
- Emit404
|
||||
- RedirectToLogin
|
||||
|
||||
exceptions:
|
||||
# PHPStan only uses PHPDocs to compute exception bubbling; without this line, PHPStan assumes that any function without a `@throws` doc throws any number of exceptions, instead of no exceptions.
|
||||
implicitThrows: false
|
||||
|
||||
check:
|
||||
missingCheckedExceptionInThrows: true
|
||||
tooWideThrowType: true
|
||||
|
||||
uncheckedExceptionRegexes:
|
||||
-'#^Safe\\#'
|
||||
- '#^Safe\\#'
|
||||
|
||||
uncheckedExceptionClasses:
|
||||
- 'Exceptions\DatabaseQueryException'
|
||||
- 'Exceptions\MultiSelectMethodNotFoundException'
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?
|
||||
// Auto-included by Composer in `composer.json` to satisfy PHPStan.
|
||||
use Safe\DateTimeImmutable;
|
||||
use function Safe\get_cfg_var;
|
||||
use function Safe\define;
|
||||
|
@ -15,7 +14,7 @@ const SITE_TZ = new DateTimeZone('America/Chicago');
|
|||
const SITE_STATUS_LIVE = 'live';
|
||||
const SITE_STATUS_DEV = 'dev';
|
||||
|
||||
define('SITE_STATUS', get_cfg_var('app.site_status') ?: SITE_STATUS_DEV); // Set in the PHP INI configuration for both CLI and FPM. Have to use `define()` and not `const` so we can use a function.
|
||||
define('SITE_STATUS', get_cfg_var('app.site_status')); // Set in the PHP INI configuration for both CLI and FPM. Have to use `define()` and not `const` so we can use a function.
|
||||
|
||||
// No trailing slash on any of the below constants.
|
||||
if(SITE_STATUS == SITE_STATUS_LIVE){
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?
|
||||
// Composer auto-loads the `lib/` directory in `composer.json`.
|
||||
require __DIR__ . '/../vendor/autoload.php';
|
||||
require_once('Constants.php');
|
||||
|
||||
use function Safe\error_log;
|
||||
use function Safe\mb_internal_encoding;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue