-
Notifications
You must be signed in to change notification settings - Fork 479
Upgrading Skeleton to PHP 8.4 #345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
038eae5
543c4ff
8f4b489
a57d708
08c8b3e
61ed8f6
6fdeda0
f57f240
5a4847a
7f32837
0c78651
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,7 +8,7 @@ This skeleton application was built for Composer. This makes setting up a new Sl | |
|
|
||
| ## Install the Application | ||
|
|
||
| Run this command from the directory in which you want to install your new Slim Framework application. You will require PHP 7.4 or newer. | ||
| Run this command from the directory in which you want to install your new Slim Framework application. You will require PHP 8.3 or newer. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Minimum is 8.2 |
||
|
|
||
| ```bash | ||
| composer create-project slim/slim-skeleton [my-app-name] | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,7 @@ | |
| use App\Application\Settings\Settings; | ||
| use App\Application\Settings\SettingsInterface; | ||
| use DI\ContainerBuilder; | ||
| use Monolog\Level; | ||
| use Monolog\Logger; | ||
|
|
||
| return function (ContainerBuilder $containerBuilder) { | ||
|
|
@@ -19,7 +20,7 @@ | |
| 'logger' => [ | ||
| 'name' => 'slim-app', | ||
| 'path' => isset($_ENV['docker']) ? 'php://stdout' : __DIR__ . '/../logs/app.log', | ||
| 'level' => Logger::DEBUG, | ||
| 'level' => Level::fromName('DEBUG'), | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This method call produces overhead. Instead we should use the generic PSR-4 |
||
| ], | ||
| ]); | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,20 +22,20 @@ | |
| } | ||
| ], | ||
| "require": { | ||
| "php": "^7.4 || ^8.0", | ||
| "php": "^8.2.0 || ^8.3.0 || ^8.4.0", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This also covers higher minor versions then 8.4, which should not be the case. Instead define only a list of |
||
| "ext-json": "*", | ||
| "monolog/monolog": "^2.9", | ||
| "php-di/php-di": "^6.4", | ||
| "monolog/monolog": "^3.8", | ||
| "php-di/php-di": "^7.0", | ||
| "slim/psr7": "^1.6", | ||
| "slim/slim": "^4.12" | ||
| }, | ||
| "require-dev": { | ||
| "jangregor/phpstan-prophecy": "^1.0.0", | ||
| "phpspec/prophecy-phpunit": "^2.2", | ||
| "jangregor/phpstan-prophecy": "^2.0", | ||
| "phpspec/prophecy-phpunit": "^2.3", | ||
| "phpstan/extension-installer": "^1.3.1", | ||
| "phpstan/phpstan": "^1.10", | ||
| "phpunit/phpunit": "^9.6.17", | ||
| "squizlabs/php_codesniffer": "^3.9" | ||
| "phpstan/phpstan": "^2.1", | ||
| "phpunit/phpunit": "^11.5", | ||
| "squizlabs/php_codesniffer": "^3.11" | ||
| }, | ||
| "config": { | ||
| "allow-plugins": { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,27 +1,13 @@ | ||
| <phpunit | ||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/7.1/phpunit.xsd" | ||
| backupGlobals="false" | ||
| backupStaticAttributes="false" | ||
| beStrictAboutTestsThatDoNotTestAnything="true" | ||
| beStrictAboutChangesToGlobalState="true" | ||
| beStrictAboutOutputDuringTests="true" | ||
| colors="true" | ||
| convertErrorsToExceptions="true" | ||
| convertNoticesToExceptions="true" | ||
| convertWarningsToExceptions="true" | ||
| processIsolation="false" | ||
| stopOnFailure="false" | ||
| bootstrap="tests/bootstrap.php" | ||
| > | ||
| <testsuites> | ||
| <testsuite name="Test Suite"> | ||
| <directory>./tests/</directory> | ||
| </testsuite> | ||
| </testsuites> | ||
| <filter> | ||
| <whitelist processUncoveredFilesFromWhitelist="true"> | ||
| <directory suffix=".php">./src/</directory> | ||
| </whitelist> | ||
| </filter> | ||
| <?xml version="1.0"?> | ||
| <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.5/phpunit.xsd" beStrictAboutChangesToGlobalState="true" beStrictAboutOutputDuringTests="true" colors="true"> | ||
| <testsuites> | ||
| <testsuite name="Test Suite"> | ||
| <directory>./tests/</directory> | ||
| </testsuite> | ||
| </testsuites> | ||
| <source> | ||
| <include> | ||
| <directory>./src/</directory> | ||
| </include> | ||
| </source> | ||
| </phpunit> |
Uh oh!
There was an error while loading. Please reload this page.