File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -483,10 +483,32 @@ Use :method:`Symfony\\Component\\Process\\Process::disableOutput` and
483483 However, it is possible to pass a callback to the ``start ``, ``run `` or ``mustRun ``
484484 methods to handle process output in a streaming fashion.
485485
486+
487+ Finding an Executable
488+ ---------------------
489+
490+ The Process component provides a utility class called
491+ :class: `Symfony\\ Component\\ Process\\ ExecutableFinder ` which finds
492+ and returns the absolute path of an executable::
493+
494+ use Symfony\Component\Process\ExecutableFinder;
495+
496+ $executableFinder = new ExecutableFinder();
497+ $chromedriverPath = $executableFinder->find('chromedriver');
498+ // $chromedriverPath = '/usr/local/bin/chromedriver' (the result will be different on your computer)
499+
500+ The :method: `Symfony\\ Component\\ Process\\ ExecutableFinder::find ` method also takes extra parameters to specify a default value
501+ to return and extra directories where to look for the executable::
502+
503+ use Symfony\Component\Process\ExecutableFinder;
504+
505+ $executableFinder = new ExecutableFinder();
506+ $chromedriverPath = $executableFinder->find('chromedriver', '/path/to/chromedriver', ['local-bin/']);
507+
486508Finding the Executable PHP Binary
487509---------------------------------
488510
489- This component also provides a utility class called
511+ This component also provides a special utility class called
490512:class: `Symfony\\ Component\\ Process\\ PhpExecutableFinder ` which returns the
491513absolute path of the executable PHP binary available on your server::
492514
You can’t perform that action at this time.
0 commit comments