1
0
mirror of https://github.com/nicoverbruggen/phpmon.git synced 2025-08-07 03:50:08 +02: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

@ -91,7 +91,7 @@
</CommandLineArgument>
<CommandLineArgument
argument = "--configuration:~/.phpmon_fconf_working.json"
isEnabled = "NO">
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "--configuration:~/.phpmon_fconf_broken.json"

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
}