Skip to content

Conversation

@donquixote
Copy link

@donquixote donquixote commented Mar 28, 2025

See

This probably won't work. Just a preview prototype to see the general idea.

I would like to split the class, so that the version with a http client does not have methods like ->setTimeOut() that have no effect. We could use a shared base class for that.

@donquixote donquixote changed the title Http client - first preview Issue #267: Http client - first preview Mar 28, 2025
@donquixote donquixote changed the title Issue #267: Http client - first preview [draft] Issue #267: Http client - first preview Mar 28, 2025
@donquixote donquixote marked this pull request as draft March 28, 2025 16:59
@GhaziTriki GhaziTriki added this to the 3.0.0 milestone Apr 3, 2025
@donquixote
Copy link
Author

For cookies, see:

@GhaziTriki Let me know if we should follow up in the direction of this PR, or do things differently. Obviously this cannot be merged as-is.

@GhaziTriki
Copy link
Member

@donquixote looks good so far. Let's continue this pathway, and everything should be clear with an example once the implementation is finished. We need a default transport or auto-discovery when not explicitly set.

/**
* Sets curl options.
*
* This has no effect if the instance has a http client.
Copy link
Author

Choose a reason for hiding this comment

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

I think this would be "an http client"..

Suggested change
* This has no effect if the instance has a http client.
* This has no effect if the instance has an http client.

and same for other similar places.

RequestFactoryInterface $requestFactory,
StreamFactoryInterface $streamFactory,
string $baseUrl,
string $secret,
Copy link
Author

@donquixote donquixote Jun 11, 2025

Choose a reason for hiding this comment

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

Should we have the UrlBuilder injected instead of passing base url and secret?

@donquixote
Copy link
Author

We need a default transport or auto-discovery when not explicitly set.

Not sure what you mean by this. The fallback to env vars as in the constructor?
I would rather avoid this.

The main purpose of this package (I think) is to be pulled in as a dependency to be used by other code.
It is usually the application that is responsible for managing secrets. I don't know if every application wants to use the same env var mechanism that this package supports.

@donquixote
Copy link
Author

@GhaziTriki I think eventually we want to be able to inject the UrlBuilder.
People will need their own instance of it to call the methods.

I think it is better to discuss this separately, see

*
* @internal
*/
class BigBlueButtonGuzzleTest extends BigBlueButtonTest
Copy link
Author

Choose a reason for hiding this comment

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

This is a cheap way to run the same tests with curl and with a http client.

In the future we may come up with something better, perhaps.

@donquixote donquixote force-pushed the http-client branch 3 times, most recently from 5501e2c to 44aafe1 Compare June 16, 2025 14:16
@donquixote donquixote changed the title [draft] Issue #267: Http client - first preview Issue #267: Inject PSR http client into BigBlueButton class, instead of using curl Aug 19, 2025
@donquixote donquixote marked this pull request as ready for review August 19, 2025 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants