diff --git a/.travis.yml b/.travis.yml index ac06c064..ebc1249c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ matrix: env: - COLLECT_COVERAGE=true - IGNORE_PLATFORMS=false - - RUN_PHPSTAN=false + - RUN_PHPSTAN=true - RUN_INFECTION=false - VALIDATE_CODING_STYLE=false - php: 7.2 @@ -30,7 +30,7 @@ matrix: env: - COLLECT_COVERAGE=true - IGNORE_PLATFORMS=true - - RUN_PHPSTAN=false + - RUN_PHPSTAN=true - RUN_INFECTION=false - VALIDATE_CODING_STYLE=false - php: nightly diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c5d2b3b..4b72279c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ All Notable changes to `Period` will be documented in this file -## Next - TBD +## 4.3.1 - 2019-01-07 ### Added @@ -10,7 +10,7 @@ All Notable changes to `Period` will be documented in this file ### Fixed -- None +- `Datepoint::createFromFormat` see issue [#72](https://github.com/thephpleague/period/issues/72) ### Deprecated diff --git a/composer.json b/composer.json index d0413d0a..bfec9a81 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ "issues": "https://github.com/thephpleague/period/issues" }, "require": { - "php" : ">=7.1.3" + "php" : "^7.1.3" }, "require-dev": { "friendsofphp/php-cs-fixer": "^2.0", @@ -50,9 +50,9 @@ "phpunit": "phpunit --coverage-text", "infection": "infection -j$(nproc) --coverage=build --ignore-msi-with-no-mutations", "test": [ + "@phpcs", "@phpstan-src", "@phpstan-tests", - "@phpcs", "@phpunit", "@infection" ] diff --git a/src/Datepoint.php b/src/Datepoint.php index e88e433c..4fec7e31 100644 --- a/src/Datepoint.php +++ b/src/Datepoint.php @@ -1,7 +1,7 @@ * @@ -59,12 +59,13 @@ public static function create($datepoint): self /** * @inheritdoc * - * @param string $format - * @param string $datetime + * @param string $format + * @param string $datetime + * @param DateTimeZone $timezone * * @return self|bool */ - public static function createFromFormat($format, $datetime, DateTimeZone $timezone = null) + public static function createFromFormat($format, $datetime, $timezone = null) { $datepoint = parent::createFromFormat($format, $datetime, $timezone); if (false !== $datepoint) { diff --git a/src/Duration.php b/src/Duration.php index fa6bc7a3..ce4fc83e 100644 --- a/src/Duration.php +++ b/src/Duration.php @@ -1,7 +1,7 @@ * diff --git a/src/Exception.php b/src/Exception.php index 9f1c9c60..8bc4f031 100644 --- a/src/Exception.php +++ b/src/Exception.php @@ -1,7 +1,7 @@ * diff --git a/src/InvalidIndex.php b/src/InvalidIndex.php index ba842735..740fb023 100644 --- a/src/InvalidIndex.php +++ b/src/InvalidIndex.php @@ -1,7 +1,7 @@ * diff --git a/src/Period.php b/src/Period.php index 9af99b70..a2678937 100644 --- a/src/Period.php +++ b/src/Period.php @@ -1,7 +1,7 @@ * diff --git a/src/Sequence.php b/src/Sequence.php index 3d572648..6738449c 100644 --- a/src/Sequence.php +++ b/src/Sequence.php @@ -1,7 +1,7 @@ * diff --git a/src/functions.php b/src/functions.php index e1edc5a6..25a52ac2 100644 --- a/src/functions.php +++ b/src/functions.php @@ -1,7 +1,7 @@ * diff --git a/src/functions_include.php b/src/functions_include.php index 9ceb04f5..d4c23008 100644 --- a/src/functions_include.php +++ b/src/functions_include.php @@ -1,7 +1,7 @@ * diff --git a/tests/DatepointTest.php b/tests/DatepointTest.php index 3aa21537..593f902d 100644 --- a/tests/DatepointTest.php +++ b/tests/DatepointTest.php @@ -1,7 +1,7 @@ * diff --git a/tests/DurationTest.php b/tests/DurationTest.php index 1462092d..8c679127 100644 --- a/tests/DurationTest.php +++ b/tests/DurationTest.php @@ -1,7 +1,7 @@ * diff --git a/tests/ExtendedDate.php b/tests/ExtendedDate.php index 4968b949..8314a3da 100644 --- a/tests/ExtendedDate.php +++ b/tests/ExtendedDate.php @@ -1,7 +1,7 @@ * diff --git a/tests/FunctionTest.php b/tests/FunctionTest.php index 2bd292b2..d3c389a8 100644 --- a/tests/FunctionTest.php +++ b/tests/FunctionTest.php @@ -1,7 +1,7 @@ * diff --git a/tests/PeriodTest.php b/tests/PeriodTest.php index 8c94ea1c..8e7ca9b9 100644 --- a/tests/PeriodTest.php +++ b/tests/PeriodTest.php @@ -1,7 +1,7 @@ * diff --git a/tests/SequenceTest.php b/tests/SequenceTest.php index 0c25b325..86d8a339 100644 --- a/tests/SequenceTest.php +++ b/tests/SequenceTest.php @@ -1,7 +1,7 @@ *