jalismrs / symfony.bundle.process
Adds Symfony process service
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 425
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: ^7.4 || ^8.0
- symfony/config: ^5.0
- symfony/dependency-injection: ^5.0
- symfony/http-kernel: ^5.0
- symfony/process: ^5.0
Requires (Dev)
- composer/package-versions-deprecated: *
- mikey179/vfsstream: *
- phpunit/phpunit: 9.4.2
- roave/security-advisories: dev-master
README
Adds Symfony process service
Test
phpunit
or vendor/bin/phpunit
coverage reports will be available in var/coverage
Use
use Jalismrs\Symfony\Bundle\JalismrsProcessBundle\ProcessManager; class SomeClass { private ProcessManager $processManager; public function someCall1(): void { $processes = [ new Symfony\Component\Process\Process( [], ), ]; foreach($processes as $process) { $this->processManager->addProcess( $process ); } // wait for processes to finish $this->processManager->finish(); } public function someCall2(): void { $processes = [ new Symfony\Component\Process\Process( [], ), ]; foreach($processes as $process) { $this->processManager->addProcess( $process ); } // wait for processes to finish // and clears stored processes $this->processManager->clear(); } public function someCall3(): void { $processes = [ new Symfony\Component\Process\Process( [], ), ]; foreach($processes as $process) { $this->processManager->addProcess( $process ); } // wait for processes to finish // and clears stored processes // and returns failed processes $failedProcesses = $this->processManager->getFailedProcesses(); } }
Configuration
# config/packages/jalismrs_process.yaml jalismrs_process: cap: 1