{"id":44740974,"url":"https://github.com/Pato05/amphp-clamav","last_synced_at":"2026-02-28T09:00:59.449Z","repository":{"id":57036240,"uuid":"442853606","full_name":"Pato05/amphp-clamav","owner":"Pato05","description":"An asynchronous ClamAV wrapper written in PHP with amphp/socket","archived":false,"fork":false,"pushed_at":"2024-03-08T00:49:58.000Z","size":70,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-11T12:58:36.434Z","etag":null,"topics":["amphp","clamav","clamav-client","clamav-wrapper","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Pato05.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-29T18:09:49.000Z","updated_at":"2025-03-02T14:30:25.000Z","dependencies_parsed_at":"2024-11-14T22:35:33.580Z","dependency_job_id":"071478c6-16e8-4144-b319-b0ecc8c2b557","html_url":"https://github.com/Pato05/amphp-clamav","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"4ba807765c0b292e8638389230cb66abb7664796"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Pato05/amphp-clamav","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pato05%2Famphp-clamav","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pato05%2Famphp-clamav/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pato05%2Famphp-clamav/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pato05%2Famphp-clamav/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pato05","download_url":"https://codeload.github.com/Pato05/amphp-clamav/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pato05%2Famphp-clamav/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29929111,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T19:37:42.220Z","status":"online","status_checked_at":"2026-02-28T02:00:07.010Z","response_time":90,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amphp","clamav","clamav-client","clamav-wrapper","php"],"created_at":"2026-02-15T21:00:18.566Z","updated_at":"2026-02-28T09:00:59.438Z","avatar_url":"https://github.com/Pato05.png","language":"PHP","funding_links":[],"categories":["Anti-virus"],"sub_categories":[],"readme":"# amphp-clamav\n\n![license: MIT](https://img.shields.io/badge/license-MIT-blue)\n\nAn asynchronous ClamAV wrapper written with amphp/socket\n\n## Migrating from v1.x.x\n\nThe updated v2.0.0 brought some breaking changes because of the changes in the underlying `amphp/amp`. These underlying changes give a great boost to the asynchronous event loop, being it now based on `Fibers` instead of `Generators`.\n\nMostly you only need to remove the `yield` keyword before any calls to the library's asynchronous function. Learn more on [Amp's Upgrade Guide](https://amphp.org/upgrade).\n\n## Installing\n\n```\ncomposer require pato05/amphp-clamav\n```\n\n## Examples\n\nPing and scan of a file/directory: [`examples/scan.php`](https://github.com/Pato05/amphp-clamav/blob/main/examples/scan.php)\n\nScanning from a `ReadableStream` (in this case a `File` instance which implements `ReadableStream`): [`examples/scan_stream.php`](https://github.com/Pato05/amphp-clamav/blob/main/examples/scan_stream.php)\n\n## Using a TCP/IP socket instead\n\nIf you want to use a TCP/IP socket instead of a UNIX one, you should use the `ClamAV\\clamav()` function prior to any other call, or just use a custom `ClamAV` instance:\n\n```php\n\\Amp\\ClamAV\\clamav('tcp://IP:PORT'); // to access it statically\n// or\n$clamav = new \\Amp\\ClamAV\\ClamAV('tcp://IP:PORT');\n```\n\nBe aware that TCP/IP sockets may be slightly slower than UNIX ones.\n\n## Using MULTISCAN\n\nMULTISCAN is supported but can only be used on non-session instances (due to a ClamAV limitation).\n\nMULTISCAN allows you to make a multithreaded scan.\n\n```php\n$result = \\Amp\\ClamAV\\multiScan('FILEPATH');\n```\n\n## Differences between running a session and without\n\nSessions run on the same socket connection, while non-session instances will reconnect to the socket for each command. The library supports both, it's up to you deciding which to use.\n\nInstantiating a session is pretty straight forward, just use the `ClamAV::session()` method like this:\n\n```php\n$clamSession = \\Amp\\ClamAV\\session();\n```\n\nThough you MUST end every session by using the method `Session::end()`:\n\n```php\n$clamSession-\u003eend();\n```\n\nBe aware that in a session you can only execute ONE COMMAND AT A TIME, therefore, if you want to run more than one command in parallel, use the main `ClamAV` class instead.\n\nMultiple `Session`s can also be instantiated.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPato05%2Famphp-clamav","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPato05%2Famphp-clamav","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPato05%2Famphp-clamav/lists"}