Download the PHP package nickstarlight/spdy without Composer

On this page you can find all versions of the php package nickstarlight/spdy. 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 spdy

SPDY PHP

Static Analysis PHP Version Coding Style License: WTFPL

About

Spdy PHP is an opinionated amalgamation of libraries for creating blazing fast, reliable and modern REST API's with PHP using RoadRunner.

By using sane industry standard defaults, Spdy lets you focus on your application business value, instead of wasting cycles choosing and re-choosing various technologies and configurations.

On the most high level definition, Spdy is just implementing battle tested, industry standard libraries for PHP and bundling it together to form a fast and reliable skeleton for your REST API's.

Getting Stared

  1. Install Spdy

  2. Implement your application basic structure:

  3. Get the RoadRunner binary:

  4. Implement a basic Roadrunner PHP Worker configuration, create a new file named .rr.yaml with the following contents:

  5. Start your application using the rr binary:

And you're good to go! Hit localhost:8080 and check your new route!

Documentation reference

As mentioned, Spdy does not try to reinvent the wheel, all libraries used are well known libraries, if you'd like to tweak anything or change the provided defaults, the bellow documentation is all you need:

Module Functions What is used for? Documentation
PHP League Router 5.x Router Route declaration, HTTP error handling, JSON encoding, Route resolution and response strategy https://route.thephpleague.com/5.x/
Nyholm PSR-7 1.5.x Response and Request factories Parsing incomming requests and generating outgoing responses https://github.com/Nyholm/psr7
Roadrunner 2.x PHP Event Loop, HTTP Server, Load balancer and process manager Creates blazing fast PHP Workers, acts as a replacement for Nginx and Apache and controls the lifecycle of workers https://roadrunner.dev/docs

FAQS

  1. How do I declare routes?

    Check the League Route documentation for examples.

  2. How do I configure the worker to fit my server needs? How do I setup healthchecks? Database connections? Environment variables?

    Roadrunner provides production-ready out-of-the-box configurations for those questions and many other features, check the Roadrunner configuration file reference.

  3. I would like a robust ORM, broadcasting, views, integration with ReactJS/Vue/Svelte, etc...

    Spdy main goal is to provide a reliable, small and effient base for creating simple yet powerful REST API's, it does not attempt to replace complete frameworks. If you need more features, you should defintely aim for fully-fledged frameworks! Some good examples are Symfony, Laravel, Yii, Laminas and Phalcon.

Benchmarks

Check the benchmarks standalone repository for more information.

PHP 8.1 - Spdy C++ 17 - uWebsockets Go 1.18 - Gin Python 3.9 - FastAPI NodeJS 16 - Fastify
Time taken for tests 57.129 seconds 9.208 seconds 14.929 seconds 90.420 seconds 18.484 seconds
Complete requests 100000 100000 100000 100000 100000
Failed requests 0 0 0 0 0
Requests per second (mean) 1750.41 10859.95 6698.22 1105.94 5410.07
Time per request (mean) 57.129 [ms] 9.208 [ms] 14.929 [ms] 90.420 [ms] 18.484 [ms]
Transfer rate 241.02 [Kbytes/sec] 901.46 [Kbytes/sec] 974.64 [Kbytes/sec] 183.60 [Kbytes/sec] 887.59 [Kbytes/sec]
Percentage of requests served in miliseconds 50% 57
66% 58
75% 59
80% 60
90% 61
95% 63
98% 65
99% 66
100% 82 (longest request)
50% 9
66% 10
75% 11
80% 12
90% 13
95% 14
98% 16
99% 18
100% 77 (longest request)
50% 14
66% 16
75% 18
80% 19
90% 22
95% 25
98% 28
99% 30
100% 68 (longest request)
50% 88
66% 91
75% 93
80% 95
90% 101
95% 105
98% 110
99% 113
100% 162 (longest request)
50% 19
66% 20
75% 20
80% 21
90% 23
95% 26
98% 30
99% 33
100% 55 (longest request)

License

This work is licensed under the WTFPL license.


All versions of spdy with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
nyholm/psr7 Version 1.4.1
spiral/roadrunner Version v2.10.2
league/route Version 5.1.2
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 nickstarlight/spdy contains the following files

Loading the files please wait ....