Crow PHP Web Framework: Microservice framework for PHP

Recommend this page to a friend!
  Info   View files Example   View files View files (62)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2021-04-15 (4 days ago) RSS 2.0 feedNot yet rated by the usersTotal: 29 This week: 29All time: 10,163 This week: 7Up
Version License PHP version Categories
crowphp 1.0MIT/X Consortium ...8Libraries, Design Patterns, PHP 8
Description Author

This package is a framework to develop applications using micro-services.

It allows creating an application server based on asynchronous programming using React PHP or using Swoole.

The package allows applications to register handlers to dispatch the expected types of HTTP requests.

It also routes the requests to the handle functions that were registered and the requests are received by the application server.

Picture of Yousaf Syed
  Performance   Level  
Innovation award
Innovation award
Nominee: 1x

Winner: 1x

Details

Fast un-opinionated minimalist web framework and server for PHP built on top of Async PHP servers (SwoolePHP and ReactPHP). CrowPHP lets you build real microservices in PHP without the use of PHP-FPM/Nginx or Apache.

Build Status License Coverage

Installation

Requirements

  1. PHP >8.0
  2. Swoole PHP extension
$ pecl install swoole

Installation of CrowPHP via composer, the following command will install the framework and all of its dependencies with it.

composer install crowphp/crow

Hello world microservice using CrowPHP

<?php
require 'vendor/autoload.php';

use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface as RequestInterface;
use Crow\Http\Server\Factory as CrowServer;

$app = CrowServer::create(CrowServer::SWOOLE_SERVER);
$router = Crow\Router\Factory::make();

$router->get('/', function (RequestInterface $request, ResponseInterface $response) {
    $response->getBody()->write('Hello World');
    return $response;
});

$app->withRouter($router);

$app->listen(5005);

You may quickly test your newly built service as follows:

$ php index.php

Going to http://localhost:5005 will now display "Hello World".

For more information on how to configure your web server, see the Documentation.

Tests

To execute the test suite, you'll need to install all development dependencies.

$ git clone https://github.com/crowphp/crow
$ composer install
$ composer test

Contributing

Please see CONTRIBUTING for details.

Learn More

Learn more at these links: - Website

Security

If you discover security related issues, please email yousaf@bmail.pk or use the issue tracker.

License

The Crow Framework is licensed under the MIT license. See License File for more information.

  Files folder image Files  
File Role Description
Files folder image.github (1 directory)
Files folder imageCrow (4 directories)
Files folder imageexamples (1 file)
Files folder imageTests (1 directory)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file CONTRIBUTING.md Data Auxiliary data
Accessible without login Plain text file LICENSE.md Lic. License text
Accessible without login Plain text file phpcs.xml.dist Data Auxiliary data
Accessible without login Plain text file phpstan.neon.dist Data Auxiliary data
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file Readme.md Doc. Read me
Accessible without login Plain text file SECURITY.md Data Auxiliary data

 Version Control Unique User Downloads Download Rankings  
 100%
Total:29
This week:29
All time:10,163
This week:7Up
User Comments (1)
Great ideia to involve Swoole and focus on PHP 8 for this mic...
12 hours ago (Carlos Artur Curvelo da Matos)
-
 

For more information send a message to info at phpclasses dot org.