Skip to content
This repository was archived by the owner on May 7, 2025. It is now read-only.

behat 3 #13

Closed
wants to merge 9 commits into from
Closed

behat 3 #13

wants to merge 9 commits into from

Conversation

MichaelKubovic
Copy link

Hi, I've updated this extension for the latest Behat. Please have a look if this is something you'd like to merge.

@stof
Copy link
Member

stof commented Nov 8, 2016

The branch-alias in the composer.json needs to be bumped to 2.0.x-dev, because this is a BC break for the extension itself (which is fine, as long as we advocate it properly)


namespace Behat\YiiExtension\Context;

class YiiContext implements YiiAwareContextInterface
Copy link
Member

Choose a reason for hiding this comment

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

IMO, we don't need this base class. Implementing the setter is easy enough

Copy link
Author

Choose a reason for hiding this comment

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

I'd like to keep that class. Anybody who wants to integrate this context to his feature contexts should imo use hooks, i.e. BeforeScenario. Having the class ready for integration seems natural.


$extensions = $container->getParameter('behat.extension.classes');
// echo json_encode($container->getParameterBag()->all()); exit;
Copy link
Member

Choose a reason for hiding this comment

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

should be removed


$basePath = $container->getParameter('paths.base');

$extensions = $container->getParameter('extensions');
Copy link
Member

Choose a reason for hiding this comment

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

this is used by the WUnitDriver registration, but the way it is done currently is wrong for MinkExtension 2. Registering a session is the wrong way. It should register a driver factory instead (look at the Symfony2Extension for an example)

@@ -76,7 +85,7 @@ public function load(array $config, ContainerBuilder $container)
*
* @param ArrayNodeDefinition $builder
*/
public function getConfig(ArrayNodeDefinition $builder)
public function configure(ArrayNodeDefinition $builder)
{
$boolFilter = function ($v) {
Copy link
Member

Choose a reason for hiding this comment

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

this bool filter is really weird to me

@stof
Copy link
Member

stof commented Nov 8, 2016

This extension is alos registering the WUnitDriver for Mink, which has been marked as unmaintained (the WUnit implementation itself looked unmaintained last time I checked, and not even compatible with composer properly). Are you using it or no ?

@MichaelKubovic
Copy link
Author

Not using wunit at all, removed it from package + updated readme.

@acoulton acoulton mentioned this pull request May 7, 2025
@acoulton
Copy link
Contributor

acoulton commented May 7, 2025

@MichaelKubovic thanks for the contribution and I'm sorry it never got finally reviewed / merged.

We have decided to abandon this package as the current Behat team does not include any Yii users with resource to maintain it. I've signposted your PR as a possible starting point should anyone wish to create a community fork.

@acoulton acoulton closed this May 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants