diff --git a/.travis.yml b/.travis.yml index c9e65855..8e364168 100755 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,7 @@ php: - 5.6 - 7.0 - 7.1 + - 7.2 - hhvm - nightly diff --git a/ChangeLog.md b/ChangeLog.md index 2b8ffd47..abd4bd03 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -3,6 +3,10 @@ CSV File handling for the XP Framework ChangeLog ## ?.?.? / ????-??-?? +## 8.0.1 / 2018-04-02 + +* Fixed compatiblity with PHP 7.2 - @thekid + ## 8.0.0 / 2017-06-15 * **Heads up:** Dropped PHP 5.5 support - @thekid diff --git a/src/main/php/text/csv/CsvBeanReader.class.php b/src/main/php/text/csv/CsvBeanReader.class.php index 5e29a0f3..c8fb4715 100644 --- a/src/main/php/text/csv/CsvBeanReader.class.php +++ b/src/main/php/text/csv/CsvBeanReader.class.php @@ -45,8 +45,8 @@ public function __construct(TextReader $reader, XPClass $class, CsvFormat $form /** * Read a record * - * @param string[] fields if omitted, class fields are used in order of appearance - * @return lang.Object or NULL if end of the file is reached + * @param string[] $fields if omitted, class fields are used in order of appearance + * @return object or NULL if end of the file is reached */ public function read(array $fields= []) { if (null === ($values= $this->readValues())) return null; diff --git a/src/main/php/text/csv/CsvObjectReader.class.php b/src/main/php/text/csv/CsvObjectReader.class.php index 1623cc55..ec6d2dc3 100644 --- a/src/main/php/text/csv/CsvObjectReader.class.php +++ b/src/main/php/text/csv/CsvObjectReader.class.php @@ -42,8 +42,8 @@ public function __construct(TextReader $reader, XPClass $class, CsvFormat $form /** * Read a record * - * @param string[] fields if omitted, class fields are used in order of appearance - * @return lang.Object or NULL if end of the file is reached + * @param string[] $fields if omitted, class fields are used in order of appearance + * @return object or NULL if end of the file is reached */ public function read(array $fields= []) { if (null === ($values= $this->readValues())) return null; diff --git a/src/test/php/text/csv/unittest/CellProcessorTest.class.php b/src/test/php/text/csv/unittest/CellProcessorTest.class.php index a84eeec7..de9592c3 100755 --- a/src/test/php/text/csv/unittest/CellProcessorTest.class.php +++ b/src/test/php/text/csv/unittest/CellProcessorTest.class.php @@ -160,7 +160,7 @@ public function formatNonDate() { $this->newWriter()->withProcessors([ new FormatDate('Y-m-d H:i'), null - ])->write([new \lang\Object(), 'Order placed']); + ])->write([$this, 'Order placed']); } #[@test, @expect(FormatException::class)] @@ -328,7 +328,7 @@ public function formatNonEnum() { $this->newWriter()->withProcessors([ null, new FormatEnum() - ])->write(['200', new \lang\Object()]); + ])->write(['200', $this]); } #[@test]