⚡ Flat-files and plain-old PHP functions rockin'on as a set of general purpose high-level abstractions.

Overview









Build codecov Psalm coverage Latest Stable Version Total Downloads License Dependabot Status

Siler is a set of general purpose high-level abstractions aiming an API for declarative programming in PHP.

  • 💧 Files and functions as first-class citizens
  • 🔋 Zero dependency, everything is on top of PHP built-in functions
  • Blazing fast, no additional overhead - benchmark 1, benchmark 2 and benchmark 3

Use with Swoole

Flat files and plain-old PHP functions rocking on a production-grade, high-performance, scalable, concurrent and non-blocking HTTP server.

Read the tutorial.

Getting started

Installation

$ composer require leocavalcante/siler

That is it. Actually, Siler is a library, not a framework (maybe a micro-framework), the overall program flow of control is dictated by you. So, no hidden configs or predefined directory structures.

Hello, World!

use Siler\Functional as λ; // Just to be cool, don't use non-ASCII identifiers ;)
use Siler\Route;

Route\get('/', λ\puts('Hello, World!'));

Nothing more, nothing less. You don't need even tell Siler to run or something like that (puts works like a lazily evaluated echo).

JSON

use Siler\Route;
use Siler\Http\Response;

Route\get('/', fn() => Response\json(['message' => 'Hello, World!']));

The Response\json function will automatically add Content-type: application/json in the response headers.

Swoole

Siler provides first-class support for Swoole. You can regularly use Route, Request and Response modules for a Swoole HTTP server.

use Siler\Http\Response;
use Siler\Route;
use Siler\Swoole;

$handler = function () {
    Route\get('/', fn() => Response\json('Hello, World!'));
};

$port = 8000;
echo "Listening on port $port\n";
Swoole\http($handler, $port)->start();

GraphQL

Install peer-dependency:

composer require webonyx/graphql-php

Schema-first

type Query {
    hello: String
}
use Siler\Route;
use Siler\GraphQL;

$type_defs = file_get_contents(__DIR__ . '/schema.graphql');
$resolvers = [
    'Query' => [
        'hello' => fn ($root, $args, $context, $info) => 'Hello, World!'
    ]
];

$schema = GraphQL\schema($type_defs, $resolvers);

Route\post('/graphql', fn() => GraphQL\init($schema));

Code-first

Another peer-dependency:

composer require doctrine/annotations

Then:

/**
 * @\Siler\GraphQL\Annotation\ObjectType()
 */
final class Query
{
    /**
     * @\Siler\GraphQL\Annotation\Field()
     */
    static public function hello($root, $args, $context, $info): string
    {
        return 'Hello, World!';
    }
}
use Siler\GraphQL;
use Siler\Route;

$schema = GraphQL\annotated([Query::class]);

Route\post('/graphql', fn() => GraphQL\init($schema));

Object type name will be guessed from class name, same for field name, and it's return type (i.e.: PHP string scalar === GraphQL String scalar).

What is next?

License

License

Comments
  • Add project Siler+Swoole in benchmarker from

    Add project Siler+Swoole in benchmarker from "Web-Frameworks"

    I found a project to benchmark Web Frameworks, want help adding the Siler with Swoole? I believe he will be in the Top 10.

    The link: https://github.com/the-benchmarker/web-frameworks

    question benchmark 
    opened by RicardoSette 21
  • GraphQL Subscriptions Without Swole return Instantly.

    GraphQL Subscriptions Without Swole return Instantly.

    I'm trying to follow

    https://siler.leocavalcante.dev/graphql#graphql-subscriptions

    My issue is when i issue a gQL query with subscription as the type it returns instantly instead of `The result will not be immediate since we are now listening to new messages, not querying them.

    Boiled down i have two servers; one running with php -S 127.0.0.1:8000 index.php the other with just php subscriptions.php

    The expected outcome is that when i query http://127.0.01:8000/ with

    subscription {
        subTest(secret: "aSecretKey")
    }
    

    that the query would hang / idle until i make another query to http://api-local.rainway.com:8000/ with

    mutation{
        pubTest(s: "mySecretIsSpooky", p:"hi there spooky!")
    }
    

    Instead what happens is the subscription query immediately responds with this return quickly: (see below)

    Boiled down to the important parts (hopefully) my files look like. index.php

    use Siler\GraphQL;
    
    
    if (Request\method_is('post')) {
    
        $schema = include __DIR__.'/schema.php';
        GraphQL\init($schema);
    }
    

    schema.php

    include_once 'vendor/autoload.php';
    use Siler\GraphQL;
    $typeDefs = file_get_contents(__DIR__.'/schema.graphql');
    $resolvers = include __DIR__ . '/src/resolvers/Resolvers.php';
    return GraphQL\schema($typeDefs, $resolvers);
    

    schema.gql

    type Mutation{
    	pubTest(s:String!, p:String!): Boolean!
    }
    
    type Subscription {
        subTest(s: String): String
    }
    

    Resolvers.php

    GraphQL\subscriptions_at('ws://127.0.0.1:3000');
    
    $queryType=array();
    $mutationType=array();
    $subscriptionType=array();
    
    
    $subscriptionType['subTest'] = function($x){
        return "this return quickly: ".json_encode($x);
    };
    
    $mutationType['pubTest'] = function($root, $args){
        Siler\GraphQL\publish('subTest', ['s'=>$args['s'], 'p'=>$args['p']]);
        return true;
    };
    
    return [
        'Query'=>$queryType,
        'Mutation'=>$mutationType,
        'Subscription'=>$subscriptionType
    ];
    

    And then the subscriptions.php...

    use Siler\GraphQL;
    
    require 'vendor/autoload.php';
    
    $schema = include __DIR__.'/schema.php';
    
    $x = GraphQL\subscriptions($schema, [], '127.0.0.1', 3000);
    $x->run();
    

    I notice the #226 and example graphQL use Swole with the SubscriptionManager... is this now required?

    question graphql 
    opened by agentd00nut 19
  • Define 404 for incorrect route

    Define 404 for incorrect route

    Hello,

    Can you help, please... In case request undefined route - Siler response empty body with 200 code.

    But how to define 404 error for incorrect/undefined route?

    opened by MaximSavin 13
  • Implement PSR-15 middlewares

    Implement PSR-15 middlewares

    Hi @leocavalcante,

    Is it possible to make use of psr-15 middlewares -https://github.com/middlewares/psr15-middlewares ? If so, can you make a brief example?

    Highly interesting framework and concepts. Thanks for sharing.

    enhancement help wanted 
    opened by tonydspaniard 11
  • Call to undefined function Siler\Http\Response\header()

    Call to undefined function Siler\Http\Response\header()

    Fatal error: Uncaught Error: Call to undefined function Siler\Http\Response\header() in /Applications/AMPPS/www/graphql/api.php:7 Stack trace: #0 {main} thrown in /Applications/AMPPS/www/graphql/api.php on line 7

    question http 
    opened by devalexandre 9
  • Callable stops execution of router

    Callable stops execution of router

    Calling a non-static method using the default callable implementation always causes the constructors to be called, which is undesirable. See in the example below even if you call the / route, the execution will be stopped as the constructor in test will be called.

    class TestController {
        function __construct() {
             if (has_access() == false){
                 die('No Access');
             }
        }
        function page() {
            return "Page A";
        }
    }
    Route\get('/user', [(new TestController), "page"]);
    Route\get('/', function(){
        return "Home";   
    });
    

    I would suggest a workaround for calling non-static methods

    Route\get('/user', "TestController@page");

    docs 
    opened by Sinevia 9
  • How to implement Interface and Union

    How to implement Interface and Union

    Hi, I have this schema below. I am wondering how to create a type resolver.

    interface Item { price: Int code: String }

    type Tile implements Item { price: Int code: String size: String }

    type RegularProduct implements Item { price: Int code: String weight: String }

    union = Tile | RegularProduct

    question graphql 
    opened by razorback21 8
  • Swoole PHP Warning, http context is unavailable

    Swoole PHP Warning, http context is unavailable

    Hello,

    Still rocking the Siler and Swoole... 🚀

    Got some PHP Warnings when using - Swoole\cors();

    swoole_1    | PHP Warning:  Swoole\Http\Response::header(): http context is unavailable (maybe it has been ended or detached) in /app/vendor/leocavalcante/siler/src/Swoole/Swoole.php on line 222
    swoole_1    | PHP Warning:  Swoole\Http\Response::header(): http context is unavailable (maybe it has been ended or detached) in /app/vendor/leocavalcante/siler/src/Swoole/Swoole.php on line 223
    swoole_1    | PHP Warning:  Swoole\Http\Response::header(): http context is unavailable (maybe it has been ended or detached) in /app/vendor/leocavalcante/siler/src/Swoole/Swoole.php on line 224
    
    

    Don't know if am doing something wrong or some update required in the /app/vendor/leocavalcante/siler/src/Swoole/Swoole.php file. Please a little help here.

    Thank you

    enhancement routing 
    opened by leyume 8
  • Quick Question regarding Routes being Found

    Quick Question regarding Routes being Found

    If I use a combination of routing procedures and some of them are Resources Is there a way to tell if a Route was successful or found? (for ease to show 404 if not)

    Example:

    If i go to localhost/blog and it loads a resource file i would like to know:

    Route\get('/hello/{name}', function (array $routeParams) { echo 'Hello '.($routeParams['name'] ?? 'World'); });

    Route\resource('/users', 'api/users'); Route\resource('/blog', 'api/blog'); Route\resource('/event', 'api/event');

    if(Route\found()){ exit(); } else { echo "404"; }

    enhancement question routing 
    opened by trentramseyer 8
  • GraphQL example

    GraphQL example

    Hello,

    I have followed graphQL example from docs https://siler.leocavalcante.com/graphql/ but it doesnt work to me. When I run GraphiQl with:

    query {
      rooms {
        id
        name
      }
    }
    

    I get following result:

    {
      "errors": [
        {
          "message": "Syntax Error GraphQL (1:1) Unexpected <EOF>\n\n1: \n   ^\n",
          "category": "graphql",
          "locations": [
            {
              "line": 1,
              "column": 1
            }
          ]
        }
      ]
    }
    

    I have installed all the dependencies (composer.json).

    {
      "require": {
        "leocavalcante/siler": "dev-master",
        "webonyx/graphql-php": "^0.11.5",
        "gabordemooij/redbean": "^5.0"
      }
    }
    

    There isnt any error in apache/error log. What could be causing the problem?

    bug 
    opened by buksy90 8
  • Query string problems

    Query string problems

    I was trying out Siler and noticed that query strings aren't working. For example, /any-route?count=1&me=2 gets converted to /any-routecount=1&me=2 -- which doesn't match the any-route route, so the end result is a 404 ( no route found ).

    This seems to be the problem line - https://github.com/leocavalcante/siler/blob/75b98a84d639ef3f43dbd3fd161c2d8013a56ef6/src/Http/Http.php#L107

    wontfix routing 
    opened by josephscott 7
  • chore(deps-dev): bump vlucas/phpdotenv from 5.3.0 to 5.4.1

    chore(deps-dev): bump vlucas/phpdotenv from 5.3.0 to 5.4.1

    Bumps vlucas/phpdotenv from 5.3.0 to 5.4.1.

    Release notes

    Sourced from vlucas/phpdotenv's releases.

    V5.4.1 (12/12/2021)

    We announce the immediate availability V5.4.1.

    Bug Fixes

    • Updated author homepages (2e93cc98e2e8e869f8d9cfa61bb3a99ba4fc4141)
    • Cleaned up phpdoc types (264dce589e7ce37a7ba99cb901eed8249fbec92f)

    V5.4.0 (10/11/2021)

    We announce the immediate availability V5.4.0.

    New Features

    • Add support for BOM-signed env files (#501)

    V5.3.1 (02/10/2021)

    We announce the immediate availability V5.3.1.

    Bug Fixes

    • Fixed edge case issues on PHP 8.1 (622df6a3c8113b9ee92f9e0a8add275b7d6aa1a1, 4a4a82c234ae2cfd28200eb865b37dd3ff29e673, accaddf133651d4b5cf81a119f25296736ffc850)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    automerge 
    opened by dependabot[bot] 1
  • chore(deps-dev): bump doctrine/annotations from 1.12.1 to 1.13.2

    chore(deps-dev): bump doctrine/annotations from 1.12.1 to 1.13.2

    Bumps doctrine/annotations from 1.12.1 to 1.13.2.

    Release notes

    Sourced from doctrine/annotations's releases.

    1.13.2

    Release Notes for 1.13.2

    1.13.2

    bug

    1.13.1

    Release Notes for 1.13.1

    1.13.1

    • Total issues resolved: 0
    • Total pull requests resolved: 2
    • Total contributors: 2

    CI

    bug

    1.13.0

    Release Notes for 1.13.0

    1.13.0

    • Total issues resolved: 0
    • Total pull requests resolved: 2
    • Total contributors: 1

    enhancement

    ... (truncated)

    Commits
    • 5b668ae Merge pull request #422 from azjezz/patch-1
    • a28ac49 Add psalm annotations to ignored annotation names
    • f96567b Merge pull request #419 from derrabus/bugfix/ignore-nac-annotation
    • 70fe3ba Add NamedArgumentConstructor to reserved annotations
    • 092a246 Merge pull request #411 from greg0ire/improve-tests
    • 231a78f Make tests independent from each other
    • f0a4f8c Restore annotation that should be ignored
    • c14bbe3 Merge pull request #417 from shakaran/patch-1
    • 21e78f6 Update Eclipse Symfony 2 Plugin
    • e6e7b7d Don't hit the reader if cache is fresh (#412)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    automerge 
    opened by dependabot[bot] 0
  • chore(deps): bump react/promise from 2.8.0 to 2.9.0

    chore(deps): bump react/promise from 2.8.0 to 2.9.0

    Bumps react/promise from 2.8.0 to 2.9.0.

    Release notes

    Sourced from react/promise's releases.

    v2.9.0

    • Feature: Support union types and address deprecation of ReflectionType::getClass() (PHP 8+). (#198 by @​cdosoftei and @​SimonFrings)

      $promise->otherwise(function (OverflowException|UnderflowException $e) {
          echo 'Error: ' . $e->getMessage() . PHP_EOL;
      });
      
    • Feature: Support intersection types (PHP 8.1+). (#195 by @​bzikarsky)

      $promise->otherwise(function (OverflowException&CacheException $e) {
          echo 'Error: ' . $e->getMessage() . PHP_EOL;
      });
      
    • Improve test suite, use GitHub actions for continuous integration (CI), update to PHPUnit 9, and add full core team to the license. (#174, #183, #186, and #201 by @​SimonFrings and #211 by @​clue)

    Changelog

    Sourced from react/promise's changelog.

    • 2.9.0 (2022-02-11)

      • Feature: Support union types and address deprecation of ReflectionType::getClass() (PHP 8+). (#198 by @​cdosoftei and @​SimonFrings)

        $promise->otherwise(function (OverflowException|UnderflowException $e) {
            echo 'Error: ' . $e->getMessage() . PHP_EOL;
        });
        
      • Feature: Support intersection types (PHP 8.1+). (#195 by @​bzikarsky)

        $promise->otherwise(function (OverflowException&CacheException $e) {
            echo 'Error: ' . $e->getMessage() . PHP_EOL;
        });
        
      • Improve test suite, use GitHub actions for continuous integration (CI), update to PHPUnit 9, and add full core team to the license. (#174, #183, #186, and #201 by @​SimonFrings and #211 by @​clue)

    Commits
    • 234f8fd Prepare v2.9.0 release
    • 3714507 Merge pull request #211 from clue-labs/v2-team
    • c973811 Add full core team to the license
    • 0e890c8 Merge pull request #195 from bzikarsky/patch-1
    • 3580280 Extend _checkTypehint support for PHP8.1's intersection types
    • 7be7d9b Improve _checkTypehint for PHP8+
    • 29daf46 Merge pull request #201 from SimonFrings/xml
    • 55fa42b Merge pull request #200 from SimonFrings/php2x
    • a497ab8 Fix include section in phpunit.xml.dist to avoid warning
    • 01fa211 Support PHP 8.1
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    automerge 
    opened by dependabot[bot] 1
  • chore(deps-dev): bump vimeo/psalm from 4.7.2 to 4.20.0

    chore(deps-dev): bump vimeo/psalm from 4.7.2 to 4.20.0

    Bumps vimeo/psalm from 4.7.2 to 4.20.0.

    Release notes

    Sourced from vimeo/psalm's releases.

    4.20.0

    What's Changed

    Deprecations

    Fixes

    Internal changes

    New Contributors

    Full Changelog: https://github.com/vimeo/psalm/compare/4.19.0...v4.20.0

    4.19.0

    What's Changed

    Deprecations

    Features

    Fixes

    ... (truncated)

    Commits
    • f82a70e Merge pull request #7573 from phptest2/4.x
    • 582624a improving error message for Could not resolve config path
    • 2128ab1 Merge pull request #7561 from b2pweb/clear-context-on-static-call
    • 3c3e692 AtomicStaticCallAnalyzer: clear tmp var from context (fix #7556)
    • ff2636e Merge pull request #7558 from orklah/tweaksToArrays
    • 1c2ffc8 tweaks
    • bd14653 Merge pull request #7554 from Ocramius/fix/#7478-trait_exists-always-returns-...
    • fabcda1 Ensure trait_exists() always returns bool
    • dadb1f2 Merge pull request #7539 from vimeo/revert-7363-81_returntypewillchange
    • 49d2566 Suppress UnusedClass
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    automerge 
    opened by dependabot[bot] 0
  • chore(deps-dev): bump swoole/ide-helper from 4.6.7 to 4.8.6

    chore(deps-dev): bump swoole/ide-helper from 4.6.7 to 4.8.6

    Bumps swoole/ide-helper from 4.6.7 to 4.8.6.

    Release notes

    Sourced from swoole/ide-helper's releases.

    4.8.6

    PHP stubs for Swoole 4.8.6.

    4.8.5

    PHP stubs for Swoole 4.8.5.

    4.8.4

    PHP stubs for Swoole 4.8.4.

    4.8.3

    PHP stubs for Swoole 4.8.3.

    4.8.2

    PHP stubs for Swoole 4.8.2.

    4.8.1

    PHP stubs for Swoole 4.8.1.

    4.8.0

    PHP stubs for Swoole 4.8.0.

    4.7.1

    PHP stubs for Swoole 4.7.1.

    4.7.0

    PHP stubs for Swoole 4.7.0.

    Commits
    • b277ed1 updates for Swoole 4.8.6
    • d03c707 updates for Swoole 4.8.5
    • 05c2ab9 documentation updates
    • 58a1286 Update Server.php (#33)
    • feff48c updates for Swoole 4.8.4
    • 718db78 fix syntax check under PHP 7.3
    • 3ac4971 updates for Swoole 4.8.3
    • f9a91d1 documentation updates in class \Swoole\Coroutine\Socket
    • 7b133be remove extra constants from Swoole Library
    • 63e1952 add changes from Swoole Library for 4.8.2
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    automerge 
    opened by dependabot[bot] 0
  • chore(deps-dev): bump squizlabs/php_codesniffer from 3.6.1 to 3.6.2

    chore(deps-dev): bump squizlabs/php_codesniffer from 3.6.1 to 3.6.2

    Bumps squizlabs/php_codesniffer from 3.6.1 to 3.6.2.

    Release notes

    Sourced from squizlabs/php_codesniffer's releases.

    3.6.2

    • Processing large code bases that use tab indenting inside comments and strings will now be faster
      • Thanks to Thiemo Kreuz for the patch
    • Fixed bug #3388 : phpcs does not work when run from WSL drives
      • Thanks to Juliette Reinders Folmer and Graham Wharton for the patch
    • Fixed bug #3422 : Squiz.WhiteSpace.ScopeClosingBrace fixer removes HTML content when fixing closing brace alignment
      • Thanks to Juliette Reinders Folmer for the patch
    • Fixed bug #3437 : PSR12 does not forbid blank lines at the start of the class body
      • Added new PSR12.Classes.OpeningBraceSpace sniff to enforce this
    • Fixed bug #3440 : Squiz.WhiteSpace.MemberVarSpacing false positives when attributes used without docblock
      • Thanks to Vadim Borodavko for the patch
    • Fixed bug #3448 : PHP 8.1 deprecation notice while generating running time value
      • Thanks to Juliette Reinders Folmer and Andy Postnikov for the patch
    • Fixed bug #3456 : PSR12.Classes.ClassInstantiation.MissingParentheses false positive using attributes on anonymous class
      • Thanks to Juliette Reinders Folmer for the patch
    • Fixed bug #3460 : Generic.Formatting.MultipleStatementAlignment false positive on closure with parameters
      • Thanks to Juliette Reinders Folmer for the patch
    • Fixed bug #3468 : do/while loops are double-counted in Generic.Metrics.CyclomaticComplexity
      • Thanks to Mark Baker for the patch
    • Fixed bug #3469 : Ternary Operator and Null Coalescing Operator are not counted in Generic.Metrics.CyclomaticComplexity
      • Thanks to Mark Baker for the patch
    • Fixed bug #3472 : PHP 8 match() expression is not counted in Generic.Metrics.CyclomaticComplexity
      • Thanks to Mark Baker for the patch
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    automerge 
    opened by dependabot[bot] 0
Releases(v1.7.9)
  • v1.7.9(Jan 27, 2021)

  • v1.7.8(Oct 7, 2020)

  • v1.7.7(Oct 2, 2020)

  • v1.7.6(Sep 28, 2020)

  • v1.7.4(Jul 31, 2020)

  • v1.7.3(Jul 13, 2020)

    The richest feature in this release is probably GraphQL Annotations. But there was a lot more, specially bug fixes in the GraphQL space, checkout the CHANGELOG for more.

    • Breaking: Result module now adheres to Rust's naming and drops id, code and json support.
      • Success is now Ok
      • Failure is now Err
    • Breaking: you should now explicitly use arrays (or any other type) for subscription's root and context values
    • Breaking: match doesn't return null anymore, you should provide an exhaust function
    Source code(tar.gz)
    Source code(zip)
  • v1.7.2(Mar 5, 2020)

    • Experimental support for gRPC servers
    • Support middleware-like pipelines in Swoole with Swoole\middleware
    • Add Swoole\redirect() sugar
    • New Siler\Env API
    • Add map, lmap, pipe, conduit, lconcat, ljoin, filter and lfilter functions
    • Typed array-gets: array_get_str, array_get_int, array_get_float and array_get_bool.
    • Switch from Zend to Laminas
    • Add Swoole\http2 to create HTTP/2 enabled servers
    Source code(tar.gz)
    Source code(zip)
  • v1.7.1(Dec 11, 2019)

  • v1.7.0(Nov 30, 2019)

    • Drops PHP 7.2 support and adds PHP 7.4 support
    • Statically-typed Psalm support
    • GraphQL Subscriptions with Swoole's WebSocket
    • Fix initial data on GraphQL subscriptions
    • GraphQL Enum resolvers
    • API to enable GraphQL debugging
    • API to add custom GraphQL's Promise Executors
    • CORS helper for SAPI and Swoole
    • Type-safe read ints and bools from environment
    • Named route params with Regex validation
    • JSON encoding and decoding with opinionated defaults
    • No extensions needed on development
    • Better API for Maybe Monad
    • Monad API for the Result object
    • New File module
    • Drops Db module
    • Drops GraphQL type helpers
    Source code(tar.gz)
    Source code(zip)
  • v1.6.0(Aug 9, 2019)

  • v1.5.3(Apr 1, 2019)

  • v1.5.2(Mar 28, 2019)

  • v1.5.1(Mar 17, 2019)

    • Dropped Ratchet in favor of Swoole's websocket.
    • Dropped Jwt in favor of Firebase's JWT.
    • Added Result module.
    • Updated Twig namespace declarations.
    • Added Redis module.
    Source code(tar.gz)
    Source code(zip)
  • v1.5.0(Feb 23, 2019)

  • v1.4.0(Feb 20, 2019)

  • v1.3.0(Dec 7, 2018)

  • v1.2.0(Nov 27, 2018)

  • v1.1.0(Oct 20, 2018)

    Suggestions from @Sinevia applied, there are two more aways to route. The any function matches any HTTP method and the class_name function that works like Controller in other frameworks. Also, thanks again to @IvanDelsinne for feedback on this follow up.

    Source code(tar.gz)
    Source code(zip)
  • v1.0.1(Sep 12, 2018)

  • v1.0.0(Mar 22, 2018)

Owner
Leo Cavalcante
PHP Software Engineer @PicPay & @swoole Evangelist
Leo Cavalcante
A PHP client for (Spring Cloud) Netflix Eureka service registration and discovery.

PHP Netflix Eureka Client A PHP client for (Spring Cloud) Netflix Eureka service registration and discovery. Installation You can install this package

Hamid Mohayeji 72 Aug 21, 2022
StackSync is a simple, lightweight and native fullstack PHP mini-framework.

StackSync is a fullstack PHP mini framework, with an MVC structure, custom API system with a Middleware and JWT authentication, components based views, flexible routing, PSR4 autoloading. Essential files generation (migrations, seeders, controllers and models) and other operations can be executed through custom commands.

Khomsi Adam 3 Jul 24, 2022
🐺 Lightweight and easy to use framework for building web apps.

Wolff Web development made just right. Wolff is a ridiculously small and lightweight PHP framework, intended for those who want to build web applicati

Alejandro 216 Dec 8, 2022
Larasymf - mini framework for medium sized projects based on laravel and symfony packages

Larasymf, PHP Framework Larasymf, as its says is a mini framework for medium sized projects based on laravel and symfony packages We have not yet writ

Claude Fassinou 6 Jul 3, 2022
[DEPRECATED -- Use Symfony instead] The PHP micro-framework based on the Symfony Components

Silex, a simple Web Framework WARNING: Silex is in maintenance mode only. Ends of life is set to June 2018. Read more on Symfony's blog. Silex is a PH

Silex 3.6k Dec 22, 2022
A resource-oriented micro PHP framework

Bullet Bullet is a resource-oriented micro PHP framework built around HTTP URIs. Bullet takes a unique functional-style approach to URL routing by par

Vance Lucas 415 Dec 27, 2022
VELOX - The fastest way to build simple websites using PHP!

VELOX The fastest way to build simple websites using PHP! Table of Contents Installation About VELOX Architecture Config Classes Functions Themes Chan

Marwan Al-Soltany 53 Sep 13, 2022
Lemon is php micro framework built for simple applications.

Lemon is simple micro framework that provides routing, etc.

Lemon 20 Dec 16, 2022
TidyPHP is a micro php framework to build web applications

TidyPHP is a micro MVC PHP Framework made to understand how PHP Frameworks work behind the scense and build fast and tidy php web applications.

Amin 15 Jul 28, 2022
Yet another PHP Microframework.

ρ Yet another PHP Microframework. The premise of this framework is to be backwards-compatible (PHP <= 5.6) with powerful utilities (Like caching and l

null 0 Apr 6, 2022
PHP微服务框架即Micro Service Framework For PHP

Micro Service Framework For PHP PHP微服务框架即“Micro Service Framework For PHP”,是Camera360社区服务器端团队基于Swoole自主研发现代化的PHP协程服务框架,简称msf或者php-msf,是Swoole的工程级企业应用框

Camera360 1.8k Jan 5, 2023
Frankie - A frankenstein micro-framework for PHP

Frankie - A frankenstein micro-framework for PHP Features Frankie is a micro-framework focused on annotation. The goal is to use annotation in order t

null 19 Dec 10, 2020
ExEngine is an ultra lightweight micro-services framework for PHP 5.6+

ExEngine is an ultra lightweight micro-services framework for PHP 5.6+. Documentation Checkout the Wiki. Examples Click here to browse examples, also

linkfast.io 1 Nov 23, 2020
REST-like PHP micro-framework.

Phprest Description REST-like PHP micro-framework. It's based on the Proton (StackPhp compatible) micro-framework. Phprest gives you only the very bas

Phprest 312 Dec 30, 2022
A set of classes to create and manipulate HTML objects abstractions

HTMLObject HTMLObject is a set of classes to create and manipulate HTML objects abstractions. Static calls to the classes echo Element::p('text')->cla

Emma Fabre 128 Dec 22, 2022
General purpose PHP SOAP-client

General purpose PHP SOAP-client Sick and tired of building crappy SOAP implementations? This package aims to help you with some common SOAP integratio

PHPro 695 Dec 26, 2022
Fresns core library: Cross-platform general-purpose multiple content forms social network service software

About Fresns Fresns is a free and open source social network service software, a general-purpose community product designed for cross-platform, and su

Fresns 82 Dec 31, 2022
Add a general-purpose tools page to your Filament project. 🛠

Add a general-purpose tools page to your Filament project. Installation You can install the package via Composer: composer require ryangjchandler/fila

Ryan Chandler 24 Dec 6, 2022
A general-purpose parser for Laravel's Blade templating engine.

A general-purpose parser for Laravel's Blade templating engine. This is where your description should go. Try and limit it to a paragraph or two. Cons

Ryan Chandler 6 Feb 18, 2022
A bunch of general-purpose value objects you can use in your Laravel application.

Laravel Value Objects A bunch of general-purpose value objects you can use in your Laravel application. The package requires PHP ^8.0 and Laravel ^9.7

Michael Rubél 136 Jan 4, 2023