Skip to content
This repository was archived by the owner on Apr 15, 2022. It is now read-only.

Latest commit

 

History

History
27 lines (19 loc) · 869 Bytes

File metadata and controls

27 lines (19 loc) · 869 Bytes

Expression Strategy

This strategy replaces by a regular expression.

Example

{
    "type": "expression",
    "options": {
        "directories": ["src"], // by default the current working directory ,
        "pattern": "Kernel.php", // required 
        "expression": "versio = '{{SEMVER}}';", // required,
        "replacement": "versio = '{{VERSION}}';" // required
    }
}

The placeholder {{SEMVER}} is a bit special here, it will replaced by a Semver regular expression.

In the replacement you can use placeholder.

Versio uses the Finder Component from Symfony to resolve files.

  • The directories will used for the in method
  • The pattern options will used for the name method