littleredbutton / bigbluebutton-api-php

Unofficial (but better) PHP API for @BigBlueButton
GNU Lesser General Public License v3.0
25 stars 12 forks source link

Added support for symfony/dot-env while bootstrapping tests #67

Closed FelixJacobi closed 3 years ago

FelixJacobi commented 3 years ago

This allows to persist the BBB URL and secret used for integration testing in a .env file and releases the requirement to type an export statement every time.

This also eases the usage of the PHPUnit runners provided by IDEs e.g. PhpStorm as it releases the requirement to add special configuration to the PHPUnit runner.

FelixJacobi commented 3 years ago

Looks good, but needs to resolve some conflicts.

Done.

SamuelWei commented 3 years ago

@sualko @FelixJacobi Is it just me or do your integration tests also randomly fail with a checksumError? I have the same issue with the master, so it has nothing to do with this PR but makes it difficult to review

FelixJacobi commented 3 years ago

Hm, I could reproduce this in one of ~twenty cases. I guess that there is a problem with some data generated by faker which causes the HTTP client integrations not to behave as expected. I will have a closer look on this as soon as possible.

FelixJacobi commented 3 years ago

@sualko @FelixJacobi Is it just me or do your integration tests also randomly fail with a checksumError? I have the same issue with the master, so it has nothing to do with this PR but makes it difficult to review

As far as I can see, the Symfony HTTP Client is possibly performing some kind of URL normalization which is not good here. I removed the URL processing from https://github.com/symfony/symfony/blob/fa7b518d00a82d6d51d2494cc489052d0143931a/src/Symfony/Component/HttpClient/CurlHttpClient.php#L112 ff. locally with monkeypatching and as far I can see, the failure is gone. I will have a closer look if we can adapt our code here (the question is what exactly breaks things ) or submit a bug report to Symfony (the PSR bridge test is "affected" in same way as the integration test is baked with Symfony HTTP Client in background too). As long this is not fixed, I would ignore the results of the integration tests. I would consider the two new transport backends as experimental so this is fine from my perspective. If you are not using them, nothing changes for you.