Skip to content

Commit

Permalink
Bump versions
Browse files Browse the repository at this point in the history
  • Loading branch information
fab2s committed Jul 23, 2024
1 parent e2a605a commit 504ca30
Show file tree
Hide file tree
Showing 79 changed files with 354 additions and 652 deletions.
30 changes: 27 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,29 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: [ '8.2', '8.1', '8.0', '7.4', '7.3', '7.2' ]
console-versions: ['6.2', '6.0', '5.4', '5.3', '5.2', '5.1', '5.0', '4.4', '4.3', '4.2', '4.1', '4.0', '3.4']
php-versions: [ '8.3', '8.2', '8.1', '8.0', '7.4', '7.3', '7.2' ]
console-versions: ['7.1', '7.0', '6.2', '6.0', '5.4', '5.3', '5.2', '5.1', '5.0', '4.4', '4.3', '4.2', '4.1', '4.0', '3.4']
exclude:
- php-versions: 8.3
console-versions: 4.3
- php-versions: 8.3
console-versions: 4.2
- php-versions: 8.3
console-versions: 4.1
- php-versions: 8.3
console-versions: 4.0
- php-versions: 8.3
console-versions: 3.4
- php-versions: 8.2
console-versions: 4.3
- php-versions: 8.2
console-versions: 4.2
- php-versions: 8.2
console-versions: 4.1
- php-versions: 8.2
console-versions: 4.0
- php-versions: 8.2
console-versions: 3.4
- php-versions: 8.1
console-versions: 4.3
- php-versions: 8.1
Expand All @@ -33,6 +53,10 @@ jobs:
console-versions: 4.0
- php-versions: 8.0
console-versions: 3.4
- php-versions: 7.4
console-versions: 7.1
- php-versions: 7.4
console-versions: 7.0
- php-versions: 7.4
console-versions: 6.2
- php-versions: 7.4
Expand Down Expand Up @@ -83,7 +107,7 @@ jobs:
echo '::set-output name=compat::0'
exit 0
fi
if [[ " 8.0 8.1 8.2 " =~ " ${{ matrix.php-versions }} " ]]; then
if [[ " 8.0 8.1 8.2 8.3 " =~ " ${{ matrix.php-versions }} " ]]; then
if [[ " 4.4 4.3 " =~ " ${{ matrix.console-versions }} " ]]; then
echo '::set-output name=compat::0'
exit 0
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/vendor
.*.cache
composer.lock
/cov
18 changes: 10 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@
],
"require": {
"php": "^7.2|^8.0",
"fab2s/nodalflow": "^2.0.5",
"fab2s/opinhelpers": "^1.0"
"fab2s/nodalflow": "^2.0.6",
"fab2s/opinhelpers": "^1.0.1"
},
"require-dev": {
"ext-pdo": "*",
"phpunit/phpunit": "^9.0|^8.0|^7.5",
"symfony/console": "^6.0|^5.0|^4.0|^3.4|^2.8",
"symfony/event-dispatcher": "^6.0|^5.0|^4.0|^3.4|^2.8",
"orchestra/testbench": "^7.0|^6.0|^5.0|^4.0",
"friendsofphp/php-cs-fixer": "^3.0|^2.0"
"phpunit/phpunit": "^9.0.0|^8.0|^7.5",
"symfony/console": "^7.0|^6.0|^5.0|^4.0|^3.4|^2.8",
"symfony/event-dispatcher": "^7.0|^6.0|^5.0|^4.0|^3.4|^2.8",
"orchestra/testbench": "^9.0|^8.0|^7.0|^6.0|^5.0|^4.0",
"friendsofphp/php-cs-fixer": "^3.59"
},
"suggest": {
"symfony/console": "To use ProgressBarSubscriber",
Expand Down Expand Up @@ -73,6 +73,8 @@
"post-install-cmd": [
"rm -f .*.cache"
],
"fix": "php-cs-fixer fix --config=./.php-cs-fixer.dist.php -vvv"
"fix": "php-cs-fixer fix --config=./.php-cs-fixer.dist.php -vvv",
"test": "@php vendor/bin/phpunit",
"cov": "@php vendor/bin/phpunit --coverage-html ./cov"
}
}
20 changes: 1 addition & 19 deletions src/Events/ProgressBarSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,10 @@ class ProgressBarSubscriber implements EventSubscriberInterface
/**
* ProgressBarSubscriber constructor.
*
* @param YaEtl|null $flow
*
* @throws ReflectionException
*/
public function __construct(YaEtl $flow = null)
public function __construct(?YaEtl $flow = null)
{
if ($flow !== null) {
// auto register
Expand All @@ -66,8 +65,6 @@ public function __construct(YaEtl $flow = null)
}

/**
* @param YaEtl $flow
*
* @throws ReflectionException
*
* @return static
Expand All @@ -92,8 +89,6 @@ public function getOutput()
}

/**
* @param OutputInterface $output
*
* @return static
*/
public function setOutput(OutputInterface $output): self
Expand All @@ -106,7 +101,6 @@ public function setOutput(OutputInterface $output): self
/**
* Set progress modulo
*
* @param int $progressMod
*
* @return static
*/
Expand All @@ -120,7 +114,6 @@ public function setProgressMod(int $progressMod): self
/**
* Set the total number of records prior to FLow execution
*
* @param int|null $numRecords
*
* @return static
*/
Expand All @@ -133,8 +126,6 @@ public function setNumRecords(?int $numRecords): self

/**
* Triggered when a Flow starts
*
* @param FlowEventInterface $event
*/
public function start(FlowEventInterface $event)
{
Expand All @@ -158,8 +149,6 @@ public function progress()

/**
* Triggered when a Flow succeeds
*
* @param FlowEventInterface $event
*/
public function success(FlowEventInterface $event)
{
Expand All @@ -178,8 +167,6 @@ public function success(FlowEventInterface $event)

/**
* Triggered when a Flow fails
*
* @param FlowEventInterface $event
*/
public function fail(FlowEventInterface $event)
{
Expand All @@ -189,9 +176,6 @@ public function fail(FlowEventInterface $event)
$this->displayReport($event->getFlow());
}

/**
* @return array
*/
public static function getSubscribedEvents(): array
{
return [
Expand All @@ -203,8 +187,6 @@ public static function getSubscribedEvents(): array
}

/**
* @param FlowInterface $flow
*
* @return static
*/
protected function displayReport(FlowInterface $flow): self
Expand Down
3 changes: 0 additions & 3 deletions src/Events/YaEtlEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ class YaEtlEvent extends FlowEvent
*/
const FLOW_FLUSH = 'flow.flush';

/**
* @return array
*/
public static function getEventList(): array
{
if (!isset(static::$eventList)) {
Expand Down
5 changes: 1 addition & 4 deletions src/Extractors/AggregateExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,17 @@ class AggregateExtractor extends AggregateNode
/**
* AggregateExtractor constructor.
*
* @param bool $isAReturningVal
*
* @throws NodalFlowException
*/
public function __construct(bool $isAReturningVal)
{
// bypass parent, go to grand pa'. DRY won over KISS
PayloadNodeAbstract::/* @scrutinizer ignore-call */__construct(new YaEtl, $isAReturningVal);
PayloadNodeAbstract::/* @scrutinizer ignore-call */ __construct(new YaEtl, $isAReturningVal);
$this->isATraversable = true;
}

/**
* @param TraversableNodeInterface $node
*
* @throws NodalFlowException
* @throws YaEtlException
*
Expand Down
8 changes: 4 additions & 4 deletions src/Extractors/CallableExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

use fab2s\NodalFlow\NodalFlowException;
use fab2s\NodalFlow\Nodes\PayloadNodeAbstract;
use Generator;

/**
* Class CallableExtractor
Expand Down Expand Up @@ -40,8 +41,6 @@ class CallableExtractor extends PayloadNodeAbstract implements ExtractorInterfac
/**
* CallableExtractorAbstract constructor.
*
* @param callable $payload
* @param bool $isAReturningVal
*
* @throws NodalFlowException
*/
Expand Down Expand Up @@ -71,9 +70,10 @@ public function extract($param = null): bool
/**
* get the traversable to traverse within the Flow
*
* @param mixed $param
*
* @return \Generator
* @param null|mixed $param
*
* @return Generator
*/
public function getTraversable($param = null): iterable
{
Expand Down
12 changes: 4 additions & 8 deletions src/Extractors/DbExtractorAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ abstract class DbExtractorAbstract extends ExtractorBatchLimitAbstract
{
/**
* The SQL query
*
* @var mixed
*/
protected $extractQuery;

Expand All @@ -31,7 +29,8 @@ abstract class DbExtractorAbstract extends ExtractorBatchLimitAbstract
/**
* Instantiate a DB extractor
*
* @param mixed $extractQuery
*
* @param null|mixed $extractQuery
*
* @throws NodalFlowException
*/
Expand All @@ -47,9 +46,7 @@ public function __construct($extractQuery = null)
/**
* Trigger a batch extract
*
* @param mixed $param
*
* @return bool
* @param null|mixed $param
*/
public function extract($param = null): bool
{
Expand All @@ -70,6 +67,7 @@ public function extract($param = null): bool
/**
* Set the Extract SQL query
*
*
* @param mixed $extractQuery
*
* @return static
Expand All @@ -83,8 +81,6 @@ public function setExtractQuery($extractQuery): self

/**
* Build the LIMIT...OFFSET bit of the query
*
* @return string
*/
protected function getLimitOffsetBit(): string
{
Expand Down
11 changes: 1 addition & 10 deletions src/Extractors/ExtractorAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ abstract class ExtractorAbstract extends NodeAbstract implements ExtractorInterf
/**
* get the traversable to traverse within the Flow
*
* @param mixed $param
*
* @return iterable
* @param null|mixed $param
*/
public function getTraversable($param = null): iterable
{
Expand All @@ -81,8 +79,6 @@ public function getTraversable($param = null): iterable

/**
* Get number of records (at the end of the Flow's execution)
*
* @return int
*/
public function getNumRecords(): int
{
Expand All @@ -91,8 +87,6 @@ public function getNumRecords(): int

/**
* Get number of records (at the end of the Flow's execution)
*
* @return int
*/
public function getNumExtracts(): int
{
Expand Down Expand Up @@ -122,8 +116,6 @@ public function bootNumExtracts(): self
* ` yield $record;`
* rather than to:
* ` return [$record];`
*
* @return iterable
*/
protected function getExtracted(): iterable
{
Expand All @@ -133,7 +125,6 @@ protected function getExtracted(): iterable
/**
* set current extraction result
*
* @param iterable|null $extracted
*
* @return static
*/
Expand Down
9 changes: 0 additions & 9 deletions src/Extractors/ExtractorBatchLimitAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ public function enforceBatchSize(): ExtractorBatchLimitInterface
/**
* can be used to set a specific offset prior to start the scan
*
* @param int $offset
*
* @return static
*/
Expand All @@ -66,8 +65,6 @@ public function setOffset(int $offset): ExtractorBatchLimitInterface

/**
* Get query offset
*
* @return int
*/
public function getOffset(): int
{
Expand All @@ -77,7 +74,6 @@ public function getOffset(): int
/**
* Set batch size
*
* @param int $batchSize
*
* @return static
*/
Expand All @@ -90,8 +86,6 @@ public function setBatchSize(int $batchSize): ExtractorBatchLimitInterface

/**
* Get batch size
*
* @return int
*/
public function getBatchSize(): int
{
Expand All @@ -111,9 +105,6 @@ public function incrementOffset(): self
return $this;
}

/**
* @return ExtractorAbstract
*/
public function bootNumExtracts(): ExtractorAbstract
{
// reset pagination each time we trigger
Expand Down
Loading

0 comments on commit 504ca30

Please sign in to comment.