Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. PHP
  3. Porter

Porter

LGPL-3.0PHP8.0.0

A durable and asynchronous PHP data importer for consuming APIs and web data at scale with memory-efficient processing.

GitHubGitHub
611 stars24 forks0 contributors

What is Porter?

Porter is a PHP library for durable and asynchronous data imports, designed to fetch data from APIs, web scraping, or any external source and serve it as iterable record collections. It solves the problem of consuming data at scale by enabling memory-efficient processing and automatic recovery from network failures. The library provides a clean abstraction through providers, resources, and connectors, making it easy to build testable SDKs.

Target Audience

PHP developers building applications that need to import data from external APIs or web services at scale, especially those requiring robust error handling, asynchronous operations, and memory-efficient data processing.

Value Proposition

Developers choose Porter for its combination of durability features, asynchronous capabilities, and memory-efficient design, which together provide a reliable and performant solution for data imports. Its interface triad promotes testability and clean architecture, distinguishing it from simpler HTTP client libraries.

Overview

:lipstick: Durable and asynchronous data imports for consuming data at scale and publishing testable SDKs.

Use Cases

Best For

  • Building PHP SDKs for external APIs with testable abstractions
  • Importing large datasets from APIs without loading everything into memory
  • Handling intermittent network failures with automatic retries
  • Performing concurrent data imports using asynchronous PHP fibers
  • Applying rate limiting to prevent overwhelming external services
  • Transforming third-party data with post-import filters and mappers

Not Ideal For

  • Simple scripts making one-off API calls without need for retry logic or transformations
  • Applications requiring real-time, continuous data streaming interfaces
  • Projects stuck on PHP 7.x without plans to upgrade to PHP 8.1+
  • Microservices where minimizing external dependencies and container overhead is critical

Pros & Cons

Pros

Memory-Efficient Iterators

Processes data as iterable collections, enabling stream-like handling of large datasets without loading everything into memory, as emphasized in the record collections section.

Asynchronous Concurrency

Uses PHP fibers to run multiple imports concurrently, transforming network-bound operations to CPU-bound for optimal performance, with built-in throttling to manage connection rates.

Automatic Retry Logic

Provides durability with configurable retry attempts and exponential backoff for failed fetches, handling intermittent network errors transparently via the ExponentialSleepFetchExceptionHandler.

Testable Interface Triad

Separates providers, resources, and connectors, allowing easy mocking and testing of data import layers, which maps well to API SDK development and is highlighted in the benefits section.

Cons

No Streaming Interface

The README explicitly states a limitation: 'No end-to-end data streaming interface,' restricting use for continuous data flow scenarios.

PHP Version Dependency

Asynchronous features rely on PHP 8.1+ fibers; PHP 7 requires bug-prone coroutines with potential segfaults, making upgrades necessary for stable async performance.

Container Overhead

Requires integration with a PSR-11 compatible container for provider registration, adding setup complexity and dependency management for lightweight applications.

Frequently Asked Questions

Quick Stats

Stars611
Forks24
Contributors0
Open Issues8
Last commit7 months ago
CreatedSince 2016

Tags

#psr-6#library#psr-11#memory-efficiency#asynchronous#durability#api-consumption#framework#fibers#abstraction#iterators#php#data-import#php-development#data-transformation#scalability#porter

Built With

P
PSR-6
P
PSR-11
P
PHP

Included in

PHP32.5k
Auto-fetched 21 hours ago

Related Projects

Design Patterns PHPDesign Patterns PHP

Sample code for several design patterns in PHP 8.x

Stars22,194
Forks4,488
Last commit1 year ago
Functional PHPFunctional PHP

Primitives for functional programming in PHP

Stars1,983
Forks201
Last commit6 months ago
FiniteFinite

A Simple PHP Finite State Machine

Stars1,351
Forks186
Last commit10 months ago
IterIter

Iteration primitives using generators

Stars1,144
Forks71
Last commit13 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub