PHPackages                             webservco/file - 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. webservco/file

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

webservco/file
==============

A PHP component/library.

v1.3.0(8mo ago)0201MITPHPPHP ^8.4

Since Jun 21Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/webservco/file)[ Packagist](https://packagist.org/packages/webservco/file)[ Docs](https://webserv.co)[ RSS](/packages/webservco-file/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependencies (18)Versions (8)Used By (0)

webservco/file
==============

[](#webservcofile)

A PHP component/library for working with files.

---

Factory
-------

[](#factory)

### Response\\DownloadResponseFactory

[](#responsedownloadresponsefactory)

```
public function createDownloadResponse(FileInterface $file): ResponseInterface
```

### Response\\OutputResponseFactory

[](#responseoutputresponsefactory)

```
public function createOutputResponse(FileInterface $file): ResponseInterface
```

### FileFactory

[](#filefactory)

```
# General
public function createFromPath(string $contentType, string $filePath, string $name): FileInterface;

# CSV
public function createCSVFromPath(string $filePath, string $name): FileInterface;

# PDF
public function createPdfFromPath(string $filePath, string $name): FileInterface;
```

```
# General
public function createFromString(string $contentType, string $fileData, string $name): FileInterface;

# CSV
public function createCSVFromString(string $fileData, string $name): FileInterface;

# PDF
public function createPdfFromString(string $fileData, string $name): FileInterface;
```

---

Service
-------

[](#service)

- use case: database result to CSV.
- to use with a static array: `$iterator = new ArrayIterator($array)`;

### CSV\\DataCreatorService

[](#csvdatacreatorservice)

```
public function createCsvDataFromIterator(Iterator $iterator, bool $useHeaderLine): string;
```

### CSV\\FileCreatorService

[](#csvfilecreatorservice)

```
public function createCsvFileFromIterator(string $fileName, Iterator $iterator, bool $useHeaderLine): CSVFile
```

---

Value object
------------

[](#value-object)

Implement `FileInterface`.

### File

[](#file)

### CSVFile

[](#csvfile)

---

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance61

Regular maintenance activity

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~82 days

Recently: every ~123 days

Total

7

Last Release

247d ago

Major Versions

v0.8.0 → v1.0.02025-02-15

PHP version history (3 changes)v0.0.1PHP ^8.2

v0.8.0PHP ^8.3

v1.0.0PHP ^8.4

### Community

Maintainers

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

---

Top Contributors

[![ariademur](https://avatars.githubusercontent.com/u/34913107?v=4)](https://github.com/ariademur "ariademur (46 commits)")

---

Tags

componentwebservco

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/webservco-file/health.svg)

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

###  Alternatives

[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

8.0k1.1B4.0k](/packages/guzzlehttp-psr7)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)[mcp/sdk

Model Context Protocol SDK for Client and Server applications in PHP

1.5k1.5M88](/packages/mcp-sdk)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[shopware/app-php-sdk

Shopware App SDK for PHP

15109.8k3](/packages/shopware-app-php-sdk)

PHPackages © 2026

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