Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Version 5.4.1
* Fix File Exceptions integration

# Version 5.4.0
* Add possibility to save exceptions in file

Expand Down
2 changes: 2 additions & 0 deletions src/CodeRhapsodieDataflowBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use CodeRhapsodie\DataflowBundle\DependencyInjection\Compiler\BusCompilerPass;
use CodeRhapsodie\DataflowBundle\DependencyInjection\Compiler\DataflowTypeCompilerPass;
use CodeRhapsodie\DataflowBundle\DependencyInjection\Compiler\DefaultLoggerCompilerPass;
use CodeRhapsodie\DataflowBundle\DependencyInjection\Compiler\ExceptionCompilerPass;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
use Symfony\Component\HttpKernel\Bundle\Bundle;
Expand All @@ -30,6 +31,7 @@ public function build(ContainerBuilder $container): void
->addCompilerPass(new DataflowTypeCompilerPass())
->addCompilerPass(new DefaultLoggerCompilerPass())
->addCompilerPass(new BusCompilerPass())
->addCompilerPass(new ExceptionCompilerPass())
;
}
}
8 changes: 4 additions & 4 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ public function getConfigTreeBuilder(): TreeBuilder
->end()
->scalarNode('flysystem_service')
->end()
->validate()
->ifTrue(static fn ($v): bool => $v['type'] === 'file' && !interface_exists('\League\Flysystem\Filesystem'))
->thenInvalid('You need "league/flysystem" to use Dataflow file exception mode.')
->end()
->end()
->validate()
->ifTrue(static fn ($v): bool => $v['type'] === 'file' && !class_exists('\League\Flysystem\Filesystem'))
->thenInvalid('You need "league/flysystem" to use Dataflow file exception mode.')
->end()
->end()
->end()
Expand Down
2 changes: 1 addition & 1 deletion src/ExceptionsHandler/FilesystemExceptionHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function save(?int $jobId, ?array $exceptions): void
public function find(int $jobId): ?array
{
try {
if (!$this->filesystem->has(\sprintf('dataflow-job-%s.log', $jobId))) {
if (!$this->filesystem->fileExists(\sprintf('dataflow-job-%s.log', $jobId))) {
return [];
}

Expand Down