1
0
mirror of https://github.com/nicoverbruggen/phpmon.git synced 2025-11-07 05:10:06 +01:00

Add fake isolation interaction

This commit is contained in:
2022-12-14 20:28:49 +01:00
parent d6554ceea9
commit bc96b50630
3 changed files with 18 additions and 1 deletions

View File

@@ -28,6 +28,20 @@ class FakeValetInteractor: ValetInteractor {
}
}
override func isolate(site: ValetSite, version: String) async throws {
await delay(seconds: delayTime)
site.isolatedPhpVersion = PhpEnv.shared.cachedPhpInstallations[version]
site.evaluateCompatibility()
}
override func unisolate(site: ValetSite) async throws {
await delay(seconds: delayTime)
site.isolatedPhpVersion = nil
site.evaluateCompatibility()
}
override func remove(proxy: ValetProxy) async throws {
await delay(seconds: delayTime)
#warning("A fake proxy scanner needs to be added")

View File

@@ -135,7 +135,10 @@ class ValetSite: ValetListable {
public func determineComposerPhpVersion() {
self.determineComposerInformation()
self.determineValetPhpFileInfo()
self.evaluateCompatibility()
}
public func evaluateCompatibility() {
if self.composerPhp == "???" {
return
}