Skip to content
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

Refactor transformations #905

Merged
merged 10 commits into from Jul 26, 2016
Merged

Refactor transformations #905

merged 10 commits into from Jul 26, 2016

Conversation

everzet
Copy link
Member

@everzet everzet commented Jul 25, 2016

This PR extracts individual transformations from RepositoryArgumentTransformer into individual classes under Behat\Behat\Transformation\Transformation namespace. This should make adding new transformations and fixing old ones a breeze.

This PR is basis for upcoming transformation improvements in 3.2.

*
* @param string $suiteName
* @param string $pattern
* @param string$language
Copy link
Member

Choose a reason for hiding this comment

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

Missing space.


use Behat\Behat\Transformation\Transformation;
use Behat\Testwork\Call\RuntimeCallee;

/**
* Transformation that is created and executed in the runtime.
*
* @deprecated Will be removed in 4.0. Use specific transformations instead
Copy link
Member

Choose a reason for hiding this comment

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

I suggest using the @trigger_error('...', E_USER_DEPRECATED) convention used by Symfony (which reminds me that someone wrote a Behat extension to collect deprecations, which I said I would review and I forgot to do it)

Copy link
Member

Choose a reason for hiding this comment

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

btw, if you rename the class, deprecating it is useless: it is already a BC break. you would need to keep it in the Call namespace

@everzet
Copy link
Member Author

everzet commented Jul 26, 2016

I'll move RuntimeTransformation back. I don't mind with triggering deprecation errors yet, it's not as current of occurrence as in Symfony ATM.

@everzet everzet force-pushed the refactoring/transformations branch from 23a5cc4 to 834e78c Compare July 26, 2016 17:34
@everzet everzet merged commit 17fc87b into master Jul 26, 2016
@everzet everzet deleted the refactoring/transformations branch July 26, 2016 18: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.

None yet

3 participants