Download the PHP package egyjs/progressive-json-php without Composer

On this page you can find all versions of the php package egyjs/progressive-json-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package progressive-json-php

Progressive JSON Streaming for PHP APIs

TL;DR: Progressive JSON Streaming sends data incrementally to show users page structure instantly while slow API calls complete in the background.

PHP VersionTests Code Coverage Latest Version License Sponsor on GitHub

Stream JSON responses progressively to improve user experience. Send page structure instantly, then fill in slow data as it becomes available. Perfect for dashboards, homepages, and APIs mixing fast cached data with slow database queries.

Perfect for dashboards, homepages, and any API where some data loads fast (cache) and some loads slow (database/external APIs).

The Problem

The Solution

Result: User sees page structure in 50ms, then data appears as it loads.

Installation

Quick Start

1. Basic Usage

2. What the Client Receives

3. Frontend Integration

When to Use

โœ… Good for:

โŒ Skip if:

Framework Integration

Laravel

Symfony

API Reference

Core Methods

Configuration Methods

setMaxDepth(int $depth): self

Set maximum nesting depth for structure walking (default: 50).

Output Methods

stream(): Generator

Returns a Generator that yields JSON chunks.

send(): void

Streams the response directly to output buffer (for pure PHP).

asResponse(): StreamedResponse

Returns a Symfony StreamedResponse for framework integration.

Utility Methods

getPlaceholderKeys(): array

Get all registered placeholder keys.

hasPlaceholder(string $key): bool

Check if a placeholder exists.

removePlaceholder(string $key): self

Remove a specific placeholder.

clearPlaceholders(): self

Remove all placeholders.

getStructure(): array

Get the current structure template.


๐Ÿ“‹ Common Use Cases

Admin Dashboard

E-commerce Product Page

Social Media Feed


๐ŸŽฏ Advanced Features

Error Handling

Errors are automatically serialized to JSON:

Advanced Usage

Performance Optimization

Security

HTTP Headers

The library automatically sets streaming-optimized headers:

Common Use Cases

Dashboard API

E-commerce Product Page

Troubleshooting

Problem Solution
Stream cuts off early Call ob_end_clean() before streaming
Memory errors Use pagination in resolvers
Timeout errors Increase max_execution_time
CORS issues Set CORS headers before streaming
Parsing fails Validate JSON in resolvers

Debug Mode


๐Ÿ“š Resources & Inspiration


๐Ÿงช Testing

This library comes with comprehensive PHPUnit tests to ensure reliability and maintainability.

Running Tests

Test Coverage

The test suite includes:

Coverage reports are generated in build/coverage-html/ when running with coverage.

Laravel Installation Tests

We provide comprehensive installation tests for Laravel versions 9.x through 12.x:

These tests verify:

See docs/LARAVEL_INSTALLATION_TESTS.md for detailed information.

Continuous Integration

GitHub Actions automatically runs tests on:


๐Ÿค Contributing

We welcome contributions from everyone! Please read our Contributing Guide for detailed information on how to get started.

Quick Start:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/name
  3. Commit changes: git commit -m 'Add feature'
  4. Push to branch: git push origin feature/name
  5. Open a Pull Request

Important:

For detailed setup instructions, coding standards, and development workflow, see CONTRIBUTING.md.


๐Ÿ“„ License

MIT License. See LICENSE for details.

Author

AbdulRahman El-zahaby (@egyjs)
๐Ÿ“ง [email protected]
๐Ÿ™ GitHub: @egyjs


๐Ÿ™ Acknowledgments


Made with โค๏ธ by egyjs for the PHP community


All versions of progressive-json-php with dependencies

PHP Build Version
Package Version
Requires symfony/http-foundation Version ^5.4 || ^6.0 || ^7.0
php Version >=8.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package egyjs/progressive-json-php contains the following files

Loading the files please wait ...