Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TCP Context in the configuration #478

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

kdubuc
Copy link

@kdubuc kdubuc commented Nov 27, 2019

Add the possibility to provide the TCP context in the start process of ProcessManager, and gives the opportunity to build Secure Socket. Related #462

Usage : This PR add --tcp-context option which accept an JSON array encoded.

Example : php bin/ppm start --tcp-context '{"tls":{"local_cert": "test.pem"}}'

This is the first shot.

What do you think ?

Also, I have some difficulty to make the ConfigTrait testable, if you have some ideas, I will take them.

@kdubuc
Copy link
Author

kdubuc commented Nov 27, 2019

Hum, i'm not sure I am responsible for the failed tests. It seems Symfony 5 enforce execute returns only integers, and not null on commands.

@andig
Copy link
Contributor

andig commented Nov 27, 2019

There are some other issues like https://travis-ci.org/php-pm/php-pm/jobs/617713470#L365, please take a look. I don't see any related to Symfony.

@kdubuc
Copy link
Author

kdubuc commented Nov 27, 2019

Yeah, I forgot to manage PHP 7.1. I added a condition to polyfill (sort of) when
JSON_THROW_ON_ERROR is not defined.

But I keep having some bugs with return value of execute's command :

PHP Fatal error: Uncaught TypeError: Return value of "PHPPM\Commands\StatusCommand::execute()" must be of the type int, NULL returned. in /home/travis/build/php-pm/php-pm/vendor/symfony/console/Command/Command.php:258

@andig
Copy link
Contributor

andig commented Nov 28, 2019

But I keep having some bugs with return value of execute's command

That would need a separate PR, didn't catch that when Symfony 5 was allowed. See #479.

@kdubuc
Copy link
Author

kdubuc commented Nov 28, 2019

I updated my PR with your changes 😉

src/ProcessManager.php Outdated Show resolved Hide resolved
@andig
Copy link
Contributor

andig commented Nov 28, 2019

Looking good to me. I imagine a more typical scenario would be to deploy ppm behind an SSL-terminating reverse proxy (Traefik etc).

ping @marcj for approval

@andig andig requested a review from marcj November 28, 2019 11:00
@kdubuc
Copy link
Author

kdubuc commented Dec 20, 2019

Any news on this ? @marcj ?

@acasademont
Copy link
Contributor

acasademont commented Jan 2, 2020

@andig this could also allow a different TCP backlog option than the proposed 511 default we spoke about. I guess this PR should be reworked a bit to allow that backlog default

For reference, I'm speaking about #488

@andig
Copy link
Contributor

andig commented Jan 2, 2020

Agreed. It would make sense to allow configuration of all aspects of the server configuration.

@acasademont
Copy link
Contributor

@kdubuc would you be able to work on those changes?

@kdubuc
Copy link
Author

kdubuc commented Aug 7, 2020

Yes, I just need some free times but I will work on this PR ;)

@andig
Copy link
Contributor

andig commented Jan 8, 2022

ping @kdubuc ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants