Newly tracked file
src/Carbon/Traits/Serialization.php
changed.
Showing 1 of 1 files from the diff.
@@ -11,6 +11,7 @@
Loading
11 | 11 | namespace Carbon\Traits; |
|
12 | 12 | ||
13 | 13 | use Carbon\Exceptions\InvalidFormatException; |
|
14 | + | use DateTimeZone; |
|
14 | 15 | ||
15 | 16 | /** |
|
16 | 17 | * Trait Serialization. |
@@ -127,9 +128,14 @@
Loading
127 | 128 | */ |
|
128 | 129 | public function __wakeup() |
|
129 | 130 | { |
|
130 | - | if (get_parent_class() && method_exists(parent::class, '__wakeup')) { |
|
131 | + | // FatalError occurs when calling __wakeup method in PHP 7.4 or later. |
|
132 | + | // @codeCoverageIgnoreStart |
|
133 | + | if (version_compare(PHP_VERSION, '7.4.0-dev', '>=')) { |
|
134 | + | parent::__construct($this->{$this->dumpProperties[0]}, $this->timezone !== null ? new DateTimeZone($this->timezone) : null); |
|
135 | + | } elseif (get_parent_class() && method_exists(parent::class, '__wakeup')) { |
|
131 | 136 | parent::__wakeup(); |
|
132 | 137 | } |
|
138 | + | // @codeCoverageIgnoreEnd |
|
133 | 139 | ||
134 | 140 | $this->constructedObjectId = spl_object_hash($this); |
|
135 | 141 |
Files | Coverage |
---|---|
src/Carbon | 100.00% |
Project Totals (885 files) | 100.00% |
638570396
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file.
The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files.
The size and color of each slice is representing the number of statements and the coverage, respectively.