Skip to content

Commit 9220dc7

Browse files
committed
Major Upgrade
1 parent 3cc006a commit 9220dc7

File tree

5 files changed

+20
-21
lines changed

5 files changed

+20
-21
lines changed

.github/workflows/phpunit.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ on:
88
pull_request:
99
branches:
1010
- master
11-
schedule:
12-
- cron: "0 8 * * 1"
1311

1412
jobs:
1513
Build:
@@ -18,15 +16,13 @@ jobs:
1816
strategy:
1917
matrix:
2018
php-version:
19+
- "8.2"
2120
- "8.1"
2221
- "8.0"
2322
- "7.4"
24-
- "7.3"
25-
- "7.2"
26-
- "7.1"
2723

2824
steps:
29-
- uses: actions/checkout@v2
25+
- uses: actions/checkout@v3
3026
- run: composer install
3127
- run: ./vendor/bin/phpunit
3228
- run: ./vendor/bin/psalm
@@ -38,5 +34,5 @@ jobs:
3834
env:
3935
DOC_GITHUB_TOKEN: '${{ secrets.DOC_TOKEN }}'
4036
steps:
41-
- uses: actions/checkout@v2
37+
- uses: actions/checkout@v3
4238
- run: curl https://opensource.byjg.com/add-doc.sh | bash /dev/stdin php anydataset

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ print_r($iterator->toArray());
7272
$iterator = $dataset->getIterator();
7373
while ($iterator->hasNext()) {
7474
$row = $iterator->moveNext();
75-
75+
7676
print_r($row->get("field1"));
7777
}
7878
```
@@ -97,7 +97,7 @@ $output = RowOutput::getInstance()
9797
->addFormat("field1", "Test {field1}")
9898
->addFormat("field2", "Showing {} and {field3}");
9999
->addCustomFormat("field3", function ($row, $field, $value) {
100-
// return the formatted output.
100+
// return the formatted output.
101101
// $row: The row object with all values
102102
// $field: The field has been processed
103103
// $value: The field value
@@ -126,10 +126,10 @@ $validator = RowValidator::getInstance()
126126
->regexValidation("field4", '/\d{4}-\d{2}-\d{2}/')
127127
->customValidation("field3", function($value) {
128128
// Return any string containing the error message if validation FAILS
129-
// otherwise, just return null and the valition will pass.
129+
// otherwise, just return null and the valition will pass.
130130
});
131131

132-
$validator->validate($row) // Will return an array with the error messages. Empty array if not errors.
132+
$validator->validate($row) // Will return an array with the error messages. Empty array if not errors.
133133
```
134134

135135
## Formatters
@@ -139,7 +139,7 @@ AnyDataset comes with an extensible set to format the AnyDataset. The interface
139139
```php
140140
namespace ByJG\AnyDataset\Core\Formatter;
141141

142-
interface FormatterInterface
142+
interface FormatterInterface
143143
{
144144
/**
145145
* Return the object in your original format, normally as object
@@ -177,12 +177,14 @@ Example:
177177
$formatter = new XmlFormatter($anydataset->getIterator());
178178
$formatter->raw(); // Return a DOM object
179179
$formatter->toText(); // Return the XML as a text
180-
$formatter->saveToFile("/path/to/file.xml"); // Save the XML Text to a file.
180+
$formatter->saveToFile("/path/to/file.xml"); // Save the XML Text to a file.
181181
```
182182

183183
## Install
184184

185-
Just type: `composer require "byjg/anydataset=4.1.*"`
185+
```bash
186+
composer require "byjg/anydataset=5.0.*"
187+
```
186188

187189
## Running Unit tests
188190

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
"prefer-stable": true,
1010
"minimum-stability": "dev",
1111
"require": {
12-
"php": ">=5.6.0",
13-
"byjg/xmlutil": "1.0.*",
14-
"byjg/serializer": "dev-major_refactory"
12+
"php": ">=7.4",
13+
"byjg/xmlutil": "5.0.0.x-dev",
14+
"byjg/serializer": "5.0.0.x-dev"
1515
},
1616
"suggest": {
1717
"ext-dom": "*"

phpunit.xml.dist

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ and open the template in the editor.
77

88
<!-- see http://www.phpunit.de/wiki/Documentation -->
99
<phpunit bootstrap="./vendor/autoload.php"
10-
colors="false"
10+
colors="true"
11+
testdox="true"
1112
convertErrorsToExceptions="true"
1213
convertNoticesToExceptions="true"
1314
convertWarningsToExceptions="true"
@@ -25,11 +26,11 @@ and open the template in the editor.
2526
<directory>./src</directory>
2627
</whitelist>
2728
</filter>
28-
29+
2930
<testsuites>
3031
<testsuite name="Test Suite">
3132
<directory>./tests</directory>
3233
</testsuite>
3334
</testsuites>
34-
35+
3536
</phpunit>

src/IteratorFilterFormatter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ abstract public function getRelation($name, $relation, $value, &$param);
2828
abstract public function format($filters, $tableName = null, &$params = [], $returnFields = "*");
2929

3030
/**
31-
* Get Filter
31+
* Get Filter
3232
*
3333
* @param array $filters
3434
* @param array $param

0 commit comments

Comments
 (0)