AssetsVersionManager.php
public function setVersion($value)
    {
        if (!is_string($value) && !is_numeric($value)) {
            throw new \InvalidArgumentException(sprintf(
                    'Wrong value for assets version: %s - it must be string or numeric',
                    var_export($value, true)
                ));
        }

        if (!preg_match('/^' . static::$versionValueMask . '$/', $value)) {
            throw new \InvalidArgumentException(sprintf(
                    'Wrong value for assets version: %s - it must be empty or consist only of letters, numbers and the following characters: .-_',
                    var_export($value, true)
                ));
        }

        $this->fileContents = substr_replace(
                $this->fileContents,
                $value,
                $this->versionStartPos,
                strlen($this->versionValue)
            );
        $this->versionValue = $value;

        try {
            file_put_contents($this->filePath, $this->fileContents);
        } catch (\Exception $e) {
            throw new FileException(sprintf(
                    'Could not write to write "%s"; make sure it exists and you have enough permissions',
                    $this->filePath
                ));
        }
    }
public function setVersion($value)
    {
        if (!is_string($value) && !is_numeric($value)) {
            throw new \InvalidArgumentException(sprintf(
                    'Wrong value for assets version: %s - it must be string or numeric',
                    var_export($value, true)
                ));
        }

        if (!preg_match('/^' . static::$versionValueMask . '$/', $value)) {
            throw new \InvalidArgumentException(sprintf(
                    'Wrong value for assets version: %s - it must be empty or consist only of letters, numbers and the following characters: .-_',
                    var_export($value, true)
                ));
        }

        $this->fileContents = substr_replace(
                $this->fileContents,
                $value,
                $this->versionStartPos,
                strlen($this->versionValue)
            );
        $this->versionValue = $value;

        try {
            file_put_contents($this->filePath, $this->fileContents);
        } catch (\Exception $e) {
            throw new FileException(sprintf(
                    'Could not write to write "%s"; make sure it exists and you have enough permissions',
                    $this->filePath
                ));
        }
    }
Sets a new value for the assets version parameter

Assets version must consist only of letters, numbers and the following characters: .-_