Skip to content

Conversation

@fancyweb
Copy link
Contributor

Currently, you cannot use several clients and web servers with the trait. I think it would be a great feature for the next major release of Panther (because BC).

IMHO, the goal would be to have this feature but to still be able to use Panther as currently. In other words, the feature should be almost invisible to existing users.

I have started to work on the trait to discuss about it. It would involve a lot of changes in tests but let's keep that for later.

👍 or 👎

*
* @var string|null
*/
protected static $baseUri;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This property is a problem. If people relies on it, we would maybe need a method to get the "baseUri" depending of options. Another way would be to name the client / web server when you create them.

}

public static function isWebServerStarted()
public static function isWebServerStarted(): bool
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This might also be a problem. Maybe it would need an argument to know if a particular web server was started (so a need to name them ?)

@dunglas
Copy link
Member

dunglas commented Feb 9, 2019

Multiple clients will definitely be very useful (for instance to tests apps using Mercure. However, I can't see the use case for several web servers. Could you describe why you need this?

@fancyweb
Copy link
Contributor Author

fancyweb commented Feb 9, 2019

However, I can't see the use case for several web servers. Could you describe why you need this?

To have several webservers that use different environment variables.

Example : in a test class, I want to test a scenario with and without a behavior that is toggled by an environment variable.

@dunglas
Copy link
Member

dunglas commented Aug 22, 2019

I merged an alternative implementation to retrieve several clients: #219
Starting several web servers isn't supported yet.

@fancyweb fancyweb closed this Apr 7, 2020
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