Download the PHP package fruivita/line-reader without Composer
On this page you can find all versions of the php package fruivita/line-reader. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fruivita/line-reader
More information about fruivita/line-reader
Files in fruivita/line-reader
Package line-reader
Short Description Read large files, line by line, without causing memory overflow for Laravel applications
License MIT
Homepage https://github.com/fruivita/line-reader
Informations about the package line-reader
File Reader for Laravel applications
This package, for Laravel applications, allows you to read the contents of huge files without killing your server, that is, without having to load all the contents at once in memory causing an out-of-memory errors.
The strategy used here is to read the contents of the file, line by line, optimizing the use of server resources and, most importantly, in an efficient way.
It is also possible to paginate the contents of the file, again, without having to load it entirely into memory, except the page itself.
Table of Contents
-
Notes
-
Prerequisites
-
Installation
-
How it works
-
Testing and Continuous Integration
-
Changelog
-
Contributing
-
Code of conduct
-
Security Vulnerabilities
-
Support and Updates
-
Roadmap
-
Credits
-
Thanks
- License
Notes
⭐ Internally, this package reads the file contents using php's SplFileObject and Generators classes. In the specific case of pagination, the LimitIterator class is used to delimit the beginning and end of the content to be read.
❤️ Heavily inspired by the bcremer/LineReader package.
⬆️ Back
Prerequisites
-
PHP dependencies
PHP ^8.0
- GitHub Package Dependencies
⬆️ Back
Installation
-
Install via composer:
-
Optionally publish the translations
The strings available for translation are as follows. Change them as needed.
This package already has translations for en and pt-br.
⬆️ Back
How it works
-
Reading a file line by line.
LineReader exposes the following method to read the file line by line:
✏️ readLines
🚨 Exceptions:
- readLines throws \FruiVita\LineReader\Exceptions\FileNotReadableException if don't have read permission on the file or it can't be found
-
Reading the file by page.
LineReader exposes the following method to read the file by page:
✏️ readPaginatedLines
🚨 Exceptions:
- readPaginatedLines throws \FruiVita\LineReader\Exceptions\FileNotReadableException if don't have read permission on the file or it can't be found
- readPaginatedLines throws \InvalidArgumentException if per_page or page is less than 1
⬆️ Back
Testing and Continuous Integration
⬆️ Back
Changelog
Please see CHANGELOG for more information on what has changed in each version.
⬆️ Back
Contributing
Please see CONTRIBUTING for more details on how to contribute.
⬆️ Back
Code of conduct
To ensure that everyone is welcome to contribute to this open-source project, please read and follow the Code of Conduct.
⬆️ Back
Security Vulnerabilities
Please see security policy how to report security vulnerabilities or flaws.
⬆️ Back
Support and Updates
The latest version will receive support and updates whenever the need arises. The others will receive updates for 06 months after being replaced by a new version and then discontinued.
Version | PHP | Release | End of Life |
---|---|---|---|
1.0 | ^8.0 | 09-05-2022 | dd-mm-yyyy |
🐛 Found a bug?!?! Open an issue.
⬆️ Back
Roadmap
✨ Any new ideas?!?! Start a discussion.
The following list contains identified and approved improvement needs that will be implemented in the first window of opportunity.
- [ ] n/a
⬆️ Back
Credits
- All Contributors
⬆️ Back
Thanks
👋 Thanks to the people and organizations below for donating their time to build the open-source projects that were used in this package.
-
❤️ Laravel for the packages:
-
❤️ Orchestra Platform for the package orchestral/testbench
-
❤️ FriendsOfPHP for the package FriendsOfPHP/PHP-CS-Fixer
-
❤️ Nuno Maduro for the package nunomaduro/larastan
-
❤️ PEST for the packages:
-
❤️ Sebastian Bergmann for the package sebastianbergmann/phpunit
-
❤️ PHPStan for the packages:
-
❤️ ergebnis for the package ergebnis/composer-normalize
-
❤️ Shivam Mathur for the Github Action shivammathur/setup-php
-
❤️ GP for the Github Action paambaati/codeclimate-action
-
❤️ Stefan Zweifel for the Github Actions:
💸 Some of these people or organizations have some products/services that can be purchased. If you can help them by buying one of them or becoming a sponsor, even for a short period, you will help the entire open-source community to continue developing solutions for everyone.
⬆️ Back
License
The MIT License (MIT). Please see the License File for more information.
⬆️ Back
All versions of line-reader with dependencies
illuminate/collections Version ^9.11
illuminate/pagination Version ^9.11
illuminate/support Version ^9.11