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