8000 Demonstrate how to create a custom extension config object by acoulton · Pull Request #195 · Behat/docs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Demonstrate how to create a custom extension config object #195

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

Merged
merged 2 commits into from
Apr 7, 2025

Conversation

acoulton
Copy link
Contributor
@acoulton acoulton commented Apr 2, 2025

Now that we are recommending the PHP configuration syntax, we should also recommend that extension authors provide a custom config object. This will make it easy for users to correctly register and configure their extension, avoiding some of the historical pitfalls.

@acoulton acoulton force-pushed the feat-custom-config-classes branch from 1b5853b to 56b2008 Compare April 2, 2025 23:19
@acoulton
Copy link
Contributor Author
acoulton commented Apr 2, 2025

@carlos-granados I need to review the files I've added here and make sure they actually work before this is ready, but any early thoughts are welcome!

I'm aiming to do a similar one for the formatter cookbook as well.

acoulton added 2 commits April 7, 2025 08:49
Now that we are recommending the PHP configuration syntax, we should
also recommend that extension authors provide a custom config object.
This will make it easy for users to correctly register and configure
their extension, avoiding some of the historical pitfalls.
It should be fairly well understood *how* to do this, so doesn't
require detailed instructions. But I think worth mentioning,
since Behat also has its own autoloader implementation and
people might assume the extension classes will somehow be
loaded by that.
@acoulton acoulton force-pushed the feat-custom-config-classes branch from 56b2008 to 946efe9 Compare April 7, 2025 07:54
@acoulton acoulton marked this pull request as ready for review April 7, 2025 08:00
@acoulton
Copy link
Contributor Author
acoulton commented Apr 7, 2025

I've now tested this complete cookbook locally and am happy the code examples all work as expected.

@acoulton acoulton requested a review from carlos-granados April 7, 2025 08:00
Copy link
Contributor
@carlos-granados carlos-granados left a comment

Choose a reason for hiding this comment

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

Thanks @acoulton looking great now

@acoulton acoulton merged commit 8e5aecb into Behat:v3.0 Apr 7, 2025
3 checks passed
@acoulton
Copy link
Contributor Author
acoulton commented Apr 7, 2025

@monitaurus just to let you know, I've updated the cookbook you contributed to show an example of the new PHP configuration objects for extensions.

@acoulton acoulton deleted the feat-custom-config-classes branch April 7, 2025 16:18
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.

3 participants
0