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 ddc3e17
Show file tree
Hide file tree
Showing 80 changed files with 381 additions and 657 deletions.
58 changes: 52 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,33 @@ 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: 7.1
- php-versions: 8.1
console-versions: 7.0
- php-versions: 8.1
console-versions: 4.3
- php-versions: 8.1
Expand All @@ -19,6 +43,10 @@ jobs:
console-versions: 4.0
- php-versions: 8.1
console-versions: 3.4
- php-versions: 8.0
console-versions: 7.1
- php-versions: 8.0
console-versions: 7.0
- php-versions: 8.0
console-versions: 6.2
- php-versions: 8.0
Expand All @@ -33,18 +61,30 @@ 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
console-versions: 6.1
- php-versions: 7.4
console-versions: 6.0
- php-versions: 7.3
console-versions: 7.1
- php-versions: 7.3
console-versions: 7.0
- php-versions: 7.3
console-versions: 6.2
- php-versions: 7.3
console-versions: 6.1
- php-versions: 7.3
console-versions: 6.0
- php-versions: 7.2
console-versions: 7.1
- php-versions: 7.2
console-versions: 7.0
- php-versions: 7.2
console-versions: 6.2
- php-versions: 7.2
Expand All @@ -54,7 +94,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -67,7 +107,7 @@ jobs:
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache composer dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
Expand All @@ -83,8 +123,14 @@ jobs:
echo '::set-output name=compat::0'
exit 0
fi
if [[ " 8.0 8.1 8.2 " =~ " ${{ matrix.php-versions }} " ]]; then
if [[ " 4.4 4.3 " =~ " ${{ matrix.console-versions }} " ]]; then
if [[ " 8.0 8.1 8.2 8.3 " =~ " ${{ matrix.php-versions }} " ]]; then
if [[ " 4.4 4.3 7.0 7.1 " =~ " ${{ matrix.console-versions }} " ]]; then
echo '::set-output name=compat::0'
exit 0
fi
fi
if [[ " 8.3 " =~ " ${{ matrix.php-versions }} " ]]; then
if [[ " 6.2 6.0 5.4 5.3 5.2 5.1 5.0 " =~ " ${{ matrix.console-versions }} " ]]; then
echo '::set-output name=compat::0'
exit 0
fi
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/qa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -26,7 +26,7 @@ jobs:
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache composer dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
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
Loading

0 comments on commit ddc3e17

Please sign in to comment.