mirror of
https://github.com/code-rhapsodie/dataflow-bundle.git
synced 2026-03-23 22:32:15 +01:00
* Fix File Exceptions integration (#82)
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
# Version 5.4.1
|
||||
* Fix File Exceptions integration
|
||||
|
||||
# Version 5.4.0
|
||||
* Add possibility to save exceptions in file
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ use CodeRhapsodie\DataflowBundle\DependencyInjection\CodeRhapsodieDataflowExtens
|
||||
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;
|
||||
@@ -30,6 +31,7 @@ class CodeRhapsodieDataflowBundle extends Bundle
|
||||
->addCompilerPass(new DataflowTypeCompilerPass())
|
||||
->addCompilerPass(new DefaultLoggerCompilerPass())
|
||||
->addCompilerPass(new BusCompilerPass())
|
||||
->addCompilerPass(new ExceptionCompilerPass())
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,10 +46,10 @@ class Configuration implements ConfigurationInterface
|
||||
->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()
|
||||
|
||||
@@ -25,7 +25,7 @@ class FilesystemExceptionHandler implements ExceptionHandlerInterface
|
||||
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 [];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user