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:
@@ -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")
|
||||
|
||||
@@ -135,7 +135,10 @@ class ValetSite: ValetListable {
|
||||
public func determineComposerPhpVersion() {
|
||||
self.determineComposerInformation()
|
||||
self.determineValetPhpFileInfo()
|
||||
self.evaluateCompatibility()
|
||||
}
|
||||
|
||||
public func evaluateCompatibility() {
|
||||
if self.composerPhp == "???" {
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user