Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TASK] Simplify container configuration #11

Merged
merged 31 commits into from
Apr 18, 2024
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
2b76b3d
[TASK] Minor code cleanups
sabbelasichon Apr 16, 2024
ff1b213
[TASK] Remove DummyRule
sabbelasichon Apr 16, 2024
4addf06
[TASK] Make services private per default
sabbelasichon Apr 16, 2024
b14913f
[TASK] Add AbstractFractorTestCase
sabbelasichon Apr 16, 2024
5cf3ad5
[TASK] Add AbstractFractorTestCase
sabbelasichon Apr 16, 2024
7a0cc7e
[TASK] Add test for changing text files
sabbelasichon Apr 16, 2024
63ddc46
[TASK] Simplify configuration for rules and runner
sabbelasichon Apr 16, 2024
6683309
[TASK] Add phpunit.xml for fractor lib
sabbelasichon Apr 16, 2024
5f774c0
[TASK] Add phpunit.xml for fractor-xml lib
sabbelasichon Apr 16, 2024
717988e
[TASK] Fix tests for TextFileProcessor
sabbelasichon Apr 16, 2024
e3e2f42
[TASK] Fix tests for TextFileProcessor
sabbelasichon Apr 16, 2024
968a98c
[TASK] Add phpunit.xml for typo3-fractor
sabbelasichon Apr 16, 2024
a2bbebd
[TASK] Add tests for typo3-fractor
sabbelasichon Apr 16, 2024
5f6cc0e
[TASK] Add tests for typo3-fractor
sabbelasichon Apr 16, 2024
90eeb64
[TASK] Fix tests in CI
sabbelasichon Apr 16, 2024
a043ff4
[TASK] Fix CI
sabbelasichon Apr 16, 2024
1d05bf0
TASK: Remove unused method of FractorConfig
sabbelasichon Apr 17, 2024
a79ee01
TASK: Use configuration value object
sabbelasichon Apr 17, 2024
23e07fc
TASK: Use ParameterBag
sabbelasichon Apr 17, 2024
8a46b6d
TASK: Refactor away from FractoConfig
sabbelasichon Apr 17, 2024
034b64b
TASK: Simplify configuration for file extensions
sabbelasichon Apr 17, 2024
c8f8a56
TASK: Simplify ContainerBuilder file loader
sabbelasichon Apr 17, 2024
9b913a3
TASK: Fix coding standards
sabbelasichon Apr 17, 2024
c208251
TASK: Create configuration via service configuration
sabbelasichon Apr 17, 2024
8ec03e7
TASK: Add e2e tests again
sabbelasichon Apr 17, 2024
44b943e
TASK: Add e2e tests again
sabbelasichon Apr 17, 2024
5a506af
TASK: Simplify testing
sabbelasichon Apr 17, 2024
7467652
[TASK] Add ProgressBar for ProcessCommand
sabbelasichon Apr 17, 2024
3e77107
[TASK] Add webomzart/assert to validate certain options
sabbelasichon Apr 17, 2024
bd08735
[TASK] Simplify testing of assertions
sabbelasichon Apr 17, 2024
fa0fdb3
[TASK] Fix phpstan errors
sabbelasichon Apr 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[TASK] Minor code cleanups
sabbelasichon committed Apr 16, 2024
commit 2b76b3dc8d35ac1dc260ee83e9ff3af073023f76
5 changes: 0 additions & 5 deletions fractor/config/application.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<?php

use a9f\Fractor\Configuration\FractorConfig;
use a9f\Fractor\FileSystem\FileFinder;
use a9f\Fractor\Fractor\FractorRunner;
use a9f\Fractor\FractorApplication;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;

@@ -18,9 +16,6 @@
$services->set(FractorApplication::class)
->public();

$services->set(FileFinder::class);
$services->set(FractorRunner::class);

$services->set(FractorConfig::class)
->lazy(true);
};
6 changes: 2 additions & 4 deletions fractor/src/Command/ProcessCommand.php
Original file line number Diff line number Diff line change
@@ -18,10 +18,8 @@ public function __construct(private readonly FractorConfig $config, private read
parent::__construct();
}

protected function configure()
protected function configure(): void
{
parent::configure();

$this->addOption(
'config',
'c',
@@ -34,6 +32,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int
{
$this->runner->run($this->config);

return 0;
return Command::SUCCESS;
}
}
2 changes: 1 addition & 1 deletion fractor/src/Fractor/FractorRunner.php
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ final class FractorRunner
/**
* @param list<FileProcessor> $processors
*/
public function __construct(private readonly FileFinder $fileFinder, private readonly array $processors)
public function __construct(private readonly FileFinder $fileFinder, private readonly iterable $processors)
{
}