mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-08-08 04:20:07 +02:00
🐛 Correctly parse RC PHP version (#132)
It'll be a while before a new release candidate is available, but this bug has now been resolved. A new `PhpVersionNumber.parse` method has been added which can throw. The `VersionExtractor` class is now capable of extracting version numbers from all strings now too, and isn't just used to determine the Valet version number. New tests have been added to handle these scenarios. This commit also removes the phpmon-cli component, which wasn't being updated or maintained (it was an experiment).
This commit is contained in:
@ -16,7 +16,7 @@ class VersionExtractor {
|
||||
public static func from(_ string: String) -> String? {
|
||||
do {
|
||||
let regex = try NSRegularExpression(
|
||||
pattern: #"Laravel Valet (?<version>(\d+)(.)(\d+)((.)(\d+))?)"#,
|
||||
pattern: #"(?<version>(\d+)(.)(\d+)((.)(\d+))?)"#,
|
||||
options: []
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user