public function ComposerExecutableValidator::__invoke in Automatic Updates 8.2
File
- src/
Validator/ ComposerExecutableValidator.php, line 101
Class
- ComposerExecutableValidator
- Validates that the Composer executable can be found in the correct version.
Namespace
Drupal\automatic_updates\ValidatorCode
public function __invoke(string $type, string $buffer) : void {
$matched = [];
// Search for a semantic version number and optional stability flag.
if (preg_match('/([0-9]+\\.?){3}-?((alpha|beta|rc)[0-9]*)?/i', $buffer, $matched)) {
$this->version = $matched[0];
}
}