Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
26 changes: 2 additions & 24 deletions .github/workflows/job-static-analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,6 @@ jobs:
dependencies: "${{ matrix.dependencies }}"
coverage: "none"

- name: "Create cache directories"
run: |
mkdir -p var/cs-fixer
mkdir -p var/phpstan/cache

- name: "Cache cs-fixer results"
uses: "actions/cache@v4"
with:
path: "var/cs-fixer"
key: "php-${{ matrix.php-version }}-cache-cs-fixer-${{ github.run_id }}"
restore-keys: |
php-${{ matrix.php-version }}-cache-cs-fixer-

- name: "Cache phpstan results"
uses: "actions/cache@v4"
with:
Expand All @@ -47,14 +34,5 @@ jobs:
restore-keys: |
php-${{ matrix.php-version }}-cache-phpstan-

- name: "Monorepo Validate"
run: "composer test:monorepo"

- name: "Static Analyze - CS Fixer"
run: "composer static:analyze:cs-fixer"

- name: "Static Analyze - PHPStan"
run: "composer static:analyze:phpstan -- --error-format=github"

- name: "Static Analyze - Rector"
run: "composer static:analyze:rector"
- name: "Static Analyze"
run: "composer static:analyze"
160 changes: 0 additions & 160 deletions .php-cs-fixer.php

This file was deleted.

20 changes: 10 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,8 @@
"test:monorepo": "tools/monorepo/vendor/bin/monorepo-builder validate",
"static:analyze": [
"./tools/monorepo/vendor/bin/monorepo-builder validate",
"@static:analyze:cs-fixer",
"./tools/mago/vendor/bin/mago lint",
"./tools/mago/vendor/bin/mago fmt --dry-run",
"@static:analyze:phpstan",
"@static:analyze:rector"
],
Expand All @@ -419,13 +420,10 @@
"tools/rector/vendor/bin/rector -c ./rector.tests.php --dry-run",
"tools/rector/vendor/bin/rector -c ./rector.src.php --dry-run"
],
"static:analyze:cs-fixer": [
"tools/cs-fixer/vendor/bin/php-cs-fixer fix --dry-run"
],
"cs:php:fix": [
"tools/cs-fixer/vendor/bin/php-cs-fixer fix",
"./tools/rector/vendor/bin/rector -c ./rector.src.php",
"./tools/rector/vendor/bin/rector -c ./rector.tests.php"
"./tools/rector/vendor/bin/rector -c ./rector.tests.php",
"./tools/mago/vendor/bin/mago fmt"
],
"build:phar": [
"composer update --working-dir=./src/cli",
Expand Down Expand Up @@ -482,26 +480,28 @@
"tools:install": [
"composer install --working-dir=./tools/blackfire",
"composer install --working-dir=./tools/box",
"composer install --working-dir=./tools/cs-fixer",
"composer install --working-dir=./tools/infection",
"composer install --working-dir=./tools/monorepo",
"composer install --working-dir=./tools/phpbench",
"composer install --working-dir=./tools/phpstan",
"composer install --working-dir=./tools/phpunit",
"composer install --working-dir=./tools/rector",
"composer install --working-dir=./tools/phpdocumentor"
"composer install --working-dir=./tools/phpdocumentor",
"composer install --working-dir=./tools/mago",
"composer mago:install-binary --working-dir=./tools/mago"
],
"tools:update": [
"composer update --working-dir=./tools/blackfire",
"composer update --working-dir=./tools/box",
"composer update --working-dir=./tools/cs-fixer",
"composer update --working-dir=./tools/infection",
"composer update --working-dir=./tools/monorepo",
"composer update --working-dir=./tools/phpbench",
"composer update --working-dir=./tools/phpstan",
"composer update --working-dir=./tools/phpunit",
"composer update --working-dir=./tools/rector",
"composer update --working-dir=./tools/phpdocumentor"
"composer update --working-dir=./tools/phpdocumentor",
"composer update --working-dir=./tools/mago",
"composer mago:install-binary --working-dir=./tools/mago"
]
}
}
31 changes: 19 additions & 12 deletions examples/clean.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@

require __DIR__ . '/../vendor/autoload.php';

use function Flow\Filesystem\DSL\{fstab, path, protocol};
use Flow\ETL\Dataset\Statistics\HighResolutionTime;
use Symfony\Component\Console\Input\{ArgvInput, InputDefinition, InputOption};
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Console\Input\InputDefinition;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\ConsoleOutput;
use Symfony\Component\Console\Style\SymfonyStyle;
use Symfony\Component\Finder\Finder;
use function Flow\Filesystem\DSL\fstab;
use function Flow\Filesystem\DSL\path;
use function Flow\Filesystem\DSL\protocol;

if ($_ENV['FLOW_PHAR_APP'] ?? false) {
print PHP_EOL . 'This script cannot be run in PHAR, please use CLI approach.' . PHP_EOL;
Expand All @@ -27,17 +31,21 @@
ini_set('memory_limit', -1);

$finder = new Finder();
$finder->in(__DIR__ . '/topics')
->files()
->name('*.php');
$finder->in(__DIR__ . '/topics')->files()->name('*.php');

$output = new ConsoleOutput();
$intput = new ArgvInput(definition: new InputDefinition(
[
new InputOption(name: 'composer-update', shortcut: 'u', mode: InputOption::VALUE_NONE),
new InputOption(name: 'composer-archive', shortcut: 'a', mode: InputOption::VALUE_NONE),
]
));
$intput = new ArgvInput(definition: new InputDefinition([
new InputOption(
name: 'composer-update',
shortcut: 'u',
mode: InputOption::VALUE_NONE,
),
new InputOption(
name: 'composer-archive',
shortcut: 'a',
mode: InputOption::VALUE_NONE,
),
]));
$style = new SymfonyStyle($intput, $output);
$style->setDecorated(true);

Expand All @@ -46,7 +54,6 @@
$fs = fstab()->for(protocol('file'));

foreach ($finder as $file) {

if ($file->getBasename() !== 'code.php') {
continue;
}
Expand Down
Loading