From 62fda6224e97f949ec3a04f836ffb19730d30e5b Mon Sep 17 00:00:00 2001 From: Nico Verbruggen Date: Sat, 19 Mar 2022 15:21:50 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=8C=20Updated=20fake=20sites?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- phpmon/Domain/Integrations/Valet/SiteScanner.swift | 10 ++++++++-- phpmon/Domain/Integrations/Valet/ValetSite+Fake.swift | 7 +++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/phpmon/Domain/Integrations/Valet/SiteScanner.swift b/phpmon/Domain/Integrations/Valet/SiteScanner.swift index 138dc7c..b420886 100644 --- a/phpmon/Domain/Integrations/Valet/SiteScanner.swift +++ b/phpmon/Domain/Integrations/Valet/SiteScanner.swift @@ -20,12 +20,18 @@ class FakeSiteScanner: SiteScanner let fakes = [ ValetSite(fakeWithName: "laravel", tld: "test", secure: true, path: "~/Code/laravel/framework", linked: true), - ValetSite(fakeWithName: "tailwind", tld: "test", secure: true, path: "~/Code/tailwind/site", linked: true), + ValetSite(fakeWithName: "tailwind", tld: "test", secure: true, path: "~/Code/tailwind/site", linked: true, constraint: "8.0"), ValetSite(fakeWithName: "forge", tld: "test", secure: true, path: "~/Code/laravel/forge", linked: true), + ValetSite(fakeWithName: "concord", tld: "test", secure: false, + path: "~/Code/concord", linked: true, driver: "Laravel (^8.0)", constraint: "^7.4", isolated: "7.4"), + + ValetSite(fakeWithName: "drupal", tld: "test", secure: false, + path: "~/Sites/drupal", linked: false, driver: "Drupal", constraint: "^7.4", isolated: "7.4"), + ValetSite(fakeWithName: "wordpress", tld: "test", secure: false, - path: "~/Code/wordpress", linked: false, driver: "Wordpress", constraint: "^7.4", isolated: "7.4") + path: "~/Sites/wordpress", linked: false, driver: "Wordpress", constraint: "^7.4", isolated: "7.4") ] func resolveSiteCount(paths: [String]) -> Int { diff --git a/phpmon/Domain/Integrations/Valet/ValetSite+Fake.swift b/phpmon/Domain/Integrations/Valet/ValetSite+Fake.swift index 777361a..69bb2f3 100644 --- a/phpmon/Domain/Integrations/Valet/ValetSite+Fake.swift +++ b/phpmon/Domain/Integrations/Valet/ValetSite+Fake.swift @@ -24,6 +24,13 @@ extension ValetSite { self.secured = secure self.composerPhp = constraint + self.composerPhpCompatibleWithLinked = self.composerPhp.split(separator: "|") + .map { string in + return PhpVersionNumberCollection.make(from: [PhpEnv.phpInstall.version.long]) + .matching(constraint: string.trimmingCharacters(in: .whitespacesAndNewlines)) + .count > 0 + }.contains(true) + self.driver = driver self.driverDeterminedByComposer = true if linked {