Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

Added Swoole config, if installed #256

Merged
merged 3 commits into from
Jun 19, 2018

Conversation

ezimuel
Copy link

@ezimuel ezimuel commented Jun 14, 2018

This PR adds the support of Swoole overwriting some service configurations of zend-expressive.
The configuration is injected via Zend\Expressive\Swoole\ConfigProvider if zend-expressive-swoole is installed.

This PR allows to execute Swoole without any change on public/index.php. We can just run the follows:

php public/index.php

To execute an Expressive application with Swoole.

// Swoole config to overwrite some services (if installed)
class_exists(\Zend\Expressive\Swoole\ConfigProvider::class)
? \Zend\Expressive\Swoole\ConfigProvider::class
: null,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem to work: Zend\ConfigAggregator\InvalidConfigProviderException: Cannot read config from NULL - config provider must be callable.

@ezimuel
Copy link
Author

ezimuel commented Jun 18, 2018

@xtreamwayz you right, I fixed it. I didn't test without zend-expressive-swoole installed, thanks!

@geerteltink
Copy link
Member

To fix the Travis build you can append this to phpstan.installer.neon:

parameters:
    ignoreErrors:
        - '#Class Zend\\Expressive\\Swoole\\ConfigProvider not found#'

@ezimuel
Copy link
Author

ezimuel commented Jun 18, 2018

@xtreamwayz thanks!

@geerteltink geerteltink merged commit 99cdfd9 into zendframework:develop Jun 19, 2018
geerteltink added a commit that referenced this pull request Jun 19, 2018
geerteltink added a commit that referenced this pull request Jun 19, 2018
geerteltink added a commit that referenced this pull request Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants