PHPackages                             sineflow/clamav - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. sineflow/clamav

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

sineflow/clamav
===============

ClamAV PHP Client for Symfony

v2.1.0(2mo ago)10168.5k—4.1%4MITPHPPHP ^8.2CI passing

Since Sep 29Pushed 2mo ago4 watchersCompare

[ Source](https://github.com/sineflow/clamav)[ Packagist](https://packagist.org/packages/sineflow/clamav)[ RSS](/packages/sineflow-clamav/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (14)Versions (19)Used By (0)

This library is a PHP client for working with a ClamAV daemon. It also provides optional Symfony integration.

[![Workflow status](https://github.com/sineflow/clamav/actions/workflows/code_style_and_tests.yml/badge.svg)](https://github.com/sineflow/clamav/actions/workflows/code_style_and_tests.yml)[![Coverage Status](https://camo.githubusercontent.com/d11b9845b8941985987c24104a2591c9d16d837f5a93a9021590df506d7a1741/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f73696e65666c6f772f636c616d61762f62616467652e7376673f6272616e63683d6d61696e)](https://coveralls.io/github/sineflow/clamav?branch=main)

Requirements:
=============

[](#requirements)

You need to have ClamAV installed and configured to accept socket and/or network connections:

Installation
============

[](#installation)

```
$ composer require sineflow/clamav
```

Usage as a standalone library
=============================

[](#usage-as-a-standalone-library)

```
$scanner = new Scanner(new ScanStrategyClamdUnix($socket));
$scanner = new Scanner(new ScanStrategyClamdNetwork($host, $port));
```

Usage as a Symfony bundle
=========================

[](#usage-as-a-symfony-bundle)

Enable the bundle
-----------------

[](#enable-the-bundle)

```
// config/bundles.php

return [
    // ...
    Sineflow\ClamAV\Bundle\SineflowClamAVBundle::class => ['all' => true],
];
```

Configuration:
--------------

[](#configuration)

```
sineflow_clam_av:
    strategy: clamd_unix
    socket: "/var/run/clamav/clamd.ctl"
```

or

```
sineflow_clam_av:
    strategy: clamd_network
    host: 127.0.0.1
    port: 3310
```

Scanning files
--------------

[](#scanning-files)

```
use Sineflow\ClamAV\Scanner;
use Sineflow\ClamAV\Exception\FileScanException;
use Sineflow\ClamAV\Exception\SocketException;

public function myAction(Scanner $scanner)
{
    try {
        $scannedFile = $scanner->scan($file);
        if (!$scannedFile->isClean()) {
            echo $scannedFile->getVirusName();
        }
    } catch (SocketException $e) {
        ...
    } catch (FileScanException $e) {
        ...
    }
}
```

Scanning streams
----------------

[](#scanning-streams)

When the file is not on the local filesystem or not accessible to the ClamAV daemon (e.g. files stored via Flysystem in S3, SFTP, etc.), you can use `scanStream()` to send the file contents directly to ClamAV via its INSTREAM protocol.

```
use Sineflow\ClamAV\Scanner;
use Sineflow\ClamAV\Exception\FileScanException;
use Sineflow\ClamAV\Exception\SocketException;

// In a real application, the stream would typically come from
// Flysystem's readStream(), an HTTP response, or similar source.
public function myAction(Scanner $scanner)
{
    $stream = fopen('/path/to/file', 'rb');
    try {
        $scannedFile = $scanner->scanStream($stream, 'my-upload.pdf');
        if (!$scannedFile->isClean()) {
            echo $scannedFile->getVirusName();
        }
    } catch (SocketException $e) {
        ...
    } catch (FileScanException $e) {
        ...
    } finally {
        fclose($stream);
    }
}
```

Running tests
-------------

[](#running-tests)

```
docker compose run --rm phpunit
docker compose down

```

###  Health Score

59

—

FairBetter than 99% of packages

Maintenance86

Actively maintained with recent releases

Popularity42

Moderate usage in the ecosystem

Community13

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 94.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~152 days

Recently: every ~49 days

Total

14

Last Release

74d ago

Major Versions

v1.1.3 → 2.0.0.x-dev2026-03-02

PHP version history (3 changes)v1.0.0PHP ^7.3

v1.0.3PHP ^7.3 || ^8.0

2.0.0.x-devPHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/dae5c1132a99801290c68eba6e8ea173c70cc4c0cfd81cae4c3f80736e2ba82e?d=identicon)[pmishev](/maintainers/pmishev)

---

Top Contributors

[![pmishev](https://avatars.githubusercontent.com/u/5188763?v=4)](https://github.com/pmishev "pmishev (18 commits)")[![secit-pl](https://avatars.githubusercontent.com/u/24696884?v=4)](https://github.com/secit-pl "secit-pl (1 commits)")

---

Tags

symfonybundleclamav

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/sineflow-clamav/health.svg)

```
[![Health](https://phpackages.com/badges/sineflow-clamav/health.svg)](https://phpackages.com/packages/sineflow-clamav)
```

###  Alternatives

[pentatrion/vite-bundle

Vite integration for your Symfony app

2755.3M13](/packages/pentatrion-vite-bundle)[spomky-labs/pwa-bundle

Progressive Web App Manifest Generator Bundle for Symfony.

6144.4k1](/packages/spomky-labs-pwa-bundle)[flagception/flagception-bundle

Feature toggle bundle on steroids.

283.8M](/packages/flagception-flagception-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
