-
Notifications
You must be signed in to change notification settings - Fork 477
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 7 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 |
|---|---|---|
|
|
@@ -8,17 +8,18 @@ | |
|
|
||
| class User implements JsonSerializable | ||
| { | ||
| private ?int $id; | ||
|
|
||
| private string $username; | ||
|
|
||
| private string $firstName; | ||
|
|
||
| private string $lastName; | ||
|
|
||
| public function __construct(?int $id, string $username, string $firstName, string $lastName) | ||
| { | ||
| $this->id = $id; | ||
| public function __construct( | ||
| private int|null $id, | ||
|
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. We should keep property definitions separate from constructor parameter declarations. Mixing them makes the code less clean and harder to follow. Please re-apply this approach for all changed classes to keep things consistent and readable. |
||
| string $username, | ||
| string $firstName, | ||
| string $lastName | ||
| ) { | ||
| $this->username = strtolower($username); | ||
| $this->firstName = ucfirst($firstName); | ||
| $this->lastName = ucfirst($lastName); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.