aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/util/http_downloader.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-08-24 21:07:26 +0900
committernsfisis <nsfisis@gmail.com>2026-08-24 21:07:26 +0900
commit20f9787cda5b846c730cff97a4c7a3777ff3414a (patch)
tree2110607ee9842fa5288665bba56b03020057f432 /crates/shirabe/src/util/http_downloader.rs
parent8cf8c04ab9b5a1f5bc7a8eb3230698f07fb7c204 (diff)
downloadphp-shirabe-20f9787cda5b846c730cff97a4c7a3777ff3414a.tar.gz
php-shirabe-20f9787cda5b846c730cff97a4c7a3777ff3414a.tar.zst
php-shirabe-20f9787cda5b846c730cff97a4c7a3777ff3414a.zip
refactor(silencer): stop guarding work that stays inside Rust
Silencer only lowers the PHP error_reporting() level and re-throws whatever the guarded work raises. A region that never reaches the PHP runtime has no level to lower and emits no diagnostic on failure, so wrapping it is indistinguishable from running it unguarded. The pair kept in Application::hint_common_errors brackets a getComposer() call, which loads installed plugins and dispatches PluginEvents::INIT. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/util/http_downloader.rs')
-rw-r--r--crates/shirabe/src/util/http_downloader.rs3
1 files changed, 0 insertions, 3 deletions
diff --git a/crates/shirabe/src/util/http_downloader.rs b/crates/shirabe/src/util/http_downloader.rs
index f9f69c9b..32327a75 100644
--- a/crates/shirabe/src/util/http_downloader.rs
+++ b/crates/shirabe/src/util/http_downloader.rs
@@ -9,7 +9,6 @@ use crate::package::version::VersionParser;
use crate::util::GetResult;
use crate::util::Platform;
use crate::util::RemoteFilesystem;
-use crate::util::Silencer;
use crate::util::StreamContextFactory;
use crate::util::Url;
use crate::util::http::CurlDownloader;
@@ -452,7 +451,6 @@ impl HttpDownloader {
if strpos(e_as_transport.get_message(), "Resolving timed out").is_some()
|| strpos(e_as_transport.get_message(), "Could not resolve host").is_some()
{
- Silencer::suppress(None);
let mut ctx_options: IndexMap<String, PhpMixed> = IndexMap::new();
let mut ssl_map: IndexMap<String, PhpMixed> = IndexMap::new();
ssl_map.insert("verify_peer".to_string(), PhpMixed::Bool(false));
@@ -465,7 +463,6 @@ impl HttpDownloader {
// until the PHP stream-context layer is modeled.
let _ = stream_context_create(&ctx_options, None);
let test_connectivity = file_get_contents("https://8.8.8.8");
- Silencer::restore();
if test_connectivity.is_ok() {
return Some(vec![
"<error>The following exception probably indicates you have misconfigured DNS resolver(s)</error>".to_string(),