Skip to content

Commit

Permalink
Fix compatiblity with PHP 7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
thekid committed Apr 2, 2018
1 parent 42505c6 commit b2961d7
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ php:
- 5.6
- 7.0
- 7.1
- 7.2
- hhvm
- nightly

Expand Down
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/main/php/text/csv/CsvBeanReader.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/main/php/text/csv/CsvObjectReader.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/test/php/text/csv/unittest/CellProcessorTest.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down Expand Up @@ -328,7 +328,7 @@ public function formatNonEnum() {
$this->newWriter()->withProcessors([
null,
new FormatEnum()
])->write(['200', new \lang\Object()]);
])->write(['200', $this]);
}

#[@test]
Expand Down

0 comments on commit b2961d7

Please sign in to comment.