-
Notifications
You must be signed in to change notification settings - Fork 266
PHPLIB-1118: Drop support for PHP 7.2 and 7.3 #1128
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
Changes from all commits
65ee703
c9abfb9
99c2d47
fbb04e4
8798813
75d434d
fb6ff9a
a39cc24
17f395a
ebf877e
e6c2595
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 |
---|---|---|
|
@@ -16,14 +16,12 @@ | |
|
||
class PersistableEntry implements Persistable | ||
{ | ||
/** @var ObjectId */ | ||
private $id; | ||
private ObjectId $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. I went through the various type changes and confirmed they were accurate, but a second look certainly won't hurt. 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. Good to me. Some missing property types from When types are added to properties, the biggest risk is to have an error when trying to access an uninitialized property. 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. Note: the missing property types weren't caught by Rector for some reason, and I only later realised that we had an exclusion in the phpcs config to prevent native types from being added. This has since been removed and types for properties are now enforced. |
||
|
||
/** @var string */ | ||
public $name; | ||
public string $name; | ||
|
||
/** @var array<PersistableEmail> */ | ||
public $emails = []; | ||
public array $emails = []; | ||
|
||
public function __construct(string $name) | ||
{ | ||
|
@@ -65,11 +63,9 @@ public function bsonUnserialize(array $data): void | |
|
||
class PersistableEmail implements Persistable | ||
{ | ||
/** @var string */ | ||
public $type; | ||
public string $type; | ||
|
||
/** @var string */ | ||
public $address; | ||
public string $address; | ||
|
||
public function __construct(string $type, string $address) | ||
{ | ||
|
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is responsible for most of the non-functional diff in this PR: a trailing comma after the last argument in multi-line method calls is now required. This is consistent with the rules already in place for multi-line arrays.