PHPackages                             guiguiboy/simple-file-handler - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. guiguiboy/simple-file-handler

ActiveLibrary[File &amp; Storage](/categories/file-storage)

guiguiboy/simple-file-handler
=============================

Simple file handler. Uses generators.

0.1.1(9y ago)115MITPHPPHP 7.\*

Since Apr 6Pushed 9y ago1 watchersCompare

[ Source](https://github.com/guiguiboy/file-handler)[ Packagist](https://packagist.org/packages/guiguiboy/simple-file-handler)[ RSS](/packages/guiguiboy-simple-file-handler/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

Simple file handler
===================

[](#simple-file-handler)

This is a simple library which uses PHP generators to read a file. Think of it as a replacement for the built-in file() function which creates a copy of the file in the memory, thus making it unsuitable for large files.

Getting Started
---------------

[](#getting-started)

As long as the FileHandler class is autoloaded, simply:

```
$streamHandler = new StreamHandler(__DIR__ . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'file.txt');

foreach ($streamHandler->getLines() as $line) {
    //Do what you want
}

```

A check is made in the constructor to ensure provided file path exists. If not, an \\InvaliDArgumentException would be thrown.

### Prerequisites

[](#prerequisites)

- Composer

### Installing

[](#installing)

- Add package to your deps with composer

```
composer require guiguiboy/simple-file-handler

```

- Enjoy

Running the tests
-----------------

[](#running-the-tests)

- Tests

```
vendor/bin/phpunit tests/

```

### And coding style tests

[](#and-coding-style-tests)

- PSR-2 compatibility

```
vendor/bin/phpcs --standard=psr2 --ignore=vendor .

```

Contributing
------------

[](#contributing)

Please, make PR. I'll be happy to review.

Versioning
----------

[](#versioning)

Authors
-------

[](#authors)

- **Guillaume BRETOU**

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details

Acknowledgments
---------------

[](#acknowledgments)

- README built with

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 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 ~0 days

Total

2

Last Release

3372d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1903154?v=4)[guiguiboy](/maintainers/guiguiboy)[@guiguiboy](https://github.com/guiguiboy)

---

Top Contributors

[![guiguiboy](https://avatars.githubusercontent.com/u/1903154?v=4)](https://github.com/guiguiboy "guiguiboy (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/guiguiboy-simple-file-handler/health.svg)

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

###  Alternatives

[slevomat/coding-standard

Slevomat Coding Standard for PHP\_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.

1.5k130.4M2.1k](/packages/slevomat-coding-standard)[dereuromark/cakephp-ide-helper

CakePHP IdeHelper Plugin to improve auto-completion

1882.3M40](/packages/dereuromark-cakephp-ide-helper)[humanmade/coding-standards

Human Made Coding Standards

160437.4k57](/packages/humanmade-coding-standards)[youwe/testing-suite

Contains Youwe's default testing packages for php.

13186.2k8](/packages/youwe-testing-suite)

PHPackages © 2026

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