@weierophinney weierophinney released this Dec 3, 2018 · 2 commits to master since this release

Assets 2

Added

  • #55 adds a new configuration key, zend-expressive-swoole.swoole-http-server.logger.logger-name.
    It allows a custom service name which resolves to a Psr\Log\LoggerInterface
    instance to be provided, in order to be wrapped in the
    Zend\Expressive\Swoole\Log\Psr3AccessLogDecorator:

    return [
        'zend-expressive-swoole' => [
            'swoole-http-server' => [
                'logger' => [
                    'logger-name' => 'my_logger',
                ],
            ],
        ],
    ];

Changed

  • Nothing.

Deprecated

  • Nothing.

Removed

  • Nothing.

Fixed

  • Nothing.

@weierophinney weierophinney released this Nov 28, 2018 · 9 commits to master since this release

Assets 2

Added

  • #54 adds a new configuration key, zend-expressive-swoole.swoole-http-server.process-name.
    This value will be used as a prefix for the process name of all processes
    created by the Swoole\Http\Server instance, including the master process,
    worker processes, and all task worker processes. The value defaults to
    expressive. As an example:

    return [
        'zend-expressive-swoole' => [
            'swoole-http-server' => [
                'process-name' => 'myapp',
            ],
        ],
    ];
  • #50 adds a new configuration flag for toggling serving of static files:
    zend-expressive-swoole.swoole-http-server.static-files.enable. The flag is
    enabled by default; set it to boolean false to disable static file serving:

    return [
        'zend-expressive-swoole' => [
            'swoole-http-server' => [
                'static-files' => [
                    'enable' => false,
                ],
            ],
        ],
    ];

Changed

  • Nothing.

Deprecated

  • Nothing.

Removed

  • Nothing.

Fixed

  • Nothing.

@weierophinney weierophinney released this Nov 28, 2018 · 31 commits to master since this release

Assets 2

Added

  • Nothing.

Changed

  • Nothing.

Deprecated

  • Nothing.

Removed

  • Nothing.

Fixed

  • #48 adds a shutdown handler to the Swoole HTTP server that clears the PID
    manager, ensuring the PID file is cleared.

  • #52 fixes an error thrown by the start command when using this component in
    configuration-driven expressive applications, due to the fact that the command
    always tried to require the config/pipeline.php and config/routes.php
    files.

@weierophinney weierophinney released this Nov 15, 2018 · 40 commits to master since this release

Assets 2

Added

  • #46 adds a new command for the command line tooling, status; the command
    simply tells you if the server is running or not.

  • #43 adds the class Zend\Expressive\Swoole\WhoopsPrettyPageHandlerDelegator,
    and registers it to the service Zend\Expressive\WhoopsPageHandler. The
    delegator calls handleUnconditionally() on the handler in order to ensure it
    will operate under the CLI SAPI that Swoole runs under.

  • #40 adds the class Zend\Expressive\Swoole\HttpServerFactory, which
    generates a Swoole\Http\Server instance based on provided configuration; it
    replaces the former Zend\Expressive\Swoole\ServerFactory (as well as the
    factory for that class). The new factory class is now registered as a factory
    for the Swoole\Http\Server class, which allows users to further configure
    the Swoole server instance via delegators, specifically for the purpose of
    enabling async task workers.

Changed

  • #46 moves the command line utilities for controlling the web server out of
    the application runner, and into a new vendor binary, zend-expressive-swoole
    (called via ./vendor/bin/zend-expressive-swoole). This change was required
    to allow us to expose the Swoole\Http\Server instance as a service, and has
    the added benefit that reload operations now will fully stop and start the
    server, allowing it to pick up configuration and code changes. You will need
    to update any deployment scripts to use the new vendor binary.

  • #40 changes how you configure Swoole's coroutine support. Previously, you
    would toggle the configuration flag zend-expressive-swoole.swoole-http-server.options.enable_coroutine;
    you should now use the flag zend-expressive-swoole.enable_coroutine. The
    original flag still exists, but is now used to toggle coroutine support in the
    Swoole\Http\Server instance specifically.

  • #42 adds a discrete factory service for the SwooleRequestHandlerRunner, and now aliases
    Zend\HttpHandlerRunner\RequestHandlerRunner to that service.

Deprecated

  • Nothing.

Removed

  • #40 removes the Zend\Expressive\Swoole\ServerFactory and
    ServerFactoryFactory classes, as well as the Zend\Expressive\Swoole\ServerFactory
    service. Users should instead reference the Swoole\Http\Server service,
    which is now registered via the Zend\Expressive\Swoole\HttpServerFactory
    factory, detailed in the "Added" section above.

Fixed

  • Nothing.

@weierophinney weierophinney released this Nov 13, 2018 · 93 commits to master since this release

Assets 2

Added

  • Nothing.

Changed

  • Nothing.

Deprecated

  • Nothing.

Removed

  • Nothing.

Fixed

  • #45 provides a patch that ensures that SSL support can be enabled when
    creating the Swoole\Http\Server instance. SSL support requires not just the
    SSL certificate and private key, but also providing a protocol of either
    SWOOLE_SOCK_TCP | SWOOLE_SSL or SWOOLE_SOCK_TCP6 | SWOOLE_SSL.
    Previously, the union types would raise an exception during instantiation.

@weierophinney weierophinney released this Nov 8, 2018 · 97 commits to master since this release

Assets 2

Added

  • Nothing.

Changed

  • Nothing.

Deprecated

  • Nothing.

Removed

  • Nothing.

Fixed

  • #41 fixes an issue that occurs when the HTTP request body is empty.
    Swoole\Http\Request::rawcontent() returns false in such situations, when a
    string is expected. Zend\Expressive\Swoole\SwooleStream now detects this and
    casts to an empty string.

@weierophinney weierophinney released this Oct 2, 2018 · 113 commits to master since this release

Assets 2

Added

  • #38 adds documentation covering potential issues when using a long-running
    server such as Swoole, as well as how to avoid them.

  • #38 adds documentation covering how to use Monolog as a PSR-3 logger for the
    Swoole server.

  • #38 adds a default value of 1024 for the max_conn Swoole HTTP server option.
    By default, Swoole uses the value of ulimit -n on the system; however, in
    containers and virtualized environments, this value often reports far higher
    than the host system can allow, which can lead to resource problems and
    termination of the server. Setting a default ensures the component can work
    out-of-the-box for most situations. Users should consult their host machine
    specifications and set an appropriate value in production.

Changed

  • #38 versions the documentation, moving all URLS below the /v1/ subpath.
    Redirects from the original pages to the new ones were also added.

Deprecated

  • Nothing.

Removed

  • Nothing.

Fixed

  • Nothing.

@weierophinney weierophinney released this Oct 2, 2018 · 122 commits to master since this release

Assets 2

Added

  • #37 adds support for zendframework/zend-diactoros 2.0.0. You may use either
    a 1.Y or 2.Y version of that library with Expressive applications.

Changed

  • Nothing.

Deprecated

  • Nothing.

Removed

  • Nothing.

Fixed

  • #36 fixes the call to emitMarshalServerRequestException() to ensure the
    request is passed to it.

@weierophinney weierophinney released this Sep 27, 2018 · 131 commits to master since this release

Assets 2

Added

  • Nothing.

Changed

  • Nothing.

Deprecated

  • Nothing.

Removed

  • Nothing.

Fixed

  • #35 fixes logging when unable to marshal a server request.

@weierophinney weierophinney released this Sep 5, 2018 · 136 commits to master since this release

Assets 2

Added

  • #28 adds a new option, zend-expressive-swoole.swoole-http-server.options.enable_coroutine.
    The option is only relevant for Swoole 4.1 and up. When enabled, this option
    will turn on coroutine support, which essentially wraps most blocking I/O
    operations (including PDO, Mysqli, Redis, SOAP, stream_socket_client,
    fsockopen, and file_get_contents with URIs) into coroutines, allowing
    workers to handle additional requests while waiting for the operatiosn to
    complete.

Changed

  • Nothing.

Deprecated

  • Nothing.

Removed

  • Nothing.

Fixed

  • Nothing.