Skip to content

Comments

Fix paths argument handling#75

Merged
Daniel-Marynicz merged 2 commits intoDaniel-Marynicz:mainfrom
mellowgrab:bugfix/fix-create-tasks
Jul 18, 2025
Merged

Fix paths argument handling#75
Daniel-Marynicz merged 2 commits intoDaniel-Marynicz:mainfrom
mellowgrab:bugfix/fix-create-tasks

Conversation

@mellowgrab
Copy link
Contributor

The previous fix introduced by @das-peter actually broke the extension, as paths argument is array type by default and now extension won't even start (I did check with a fresh symfony+behat+extension project, setup as described in README.md). So here is the actual fix to support paths instead of path.

Copy link
Owner

@Daniel-Marynicz Daniel-Marynicz left a comment

Choose a reason for hiding this comment

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

In some older versions of behat, this parameter was a string. You need to maintain support for this string to make this backward compatible.

if (! is_string($path) && $path !== null) {
throw new UnexpectedValue('Expected string or null');
$paths = $this->input->hasArgument('paths') ? $this->input->getArgument('paths') : null;
if (!is_array($paths) && $paths !== null) {
Copy link
Owner

Choose a reason for hiding this comment

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

In some older versions of behat, this parameter was a string. You need to maintain support for this string to make this backward compatible.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added

@Daniel-Marynicz Daniel-Marynicz merged commit 135830b into Daniel-Marynicz:main Jul 18, 2025
0 of 7 checks passed
@cborgas
Copy link

cborgas commented Jul 24, 2025

@Daniel-Marynicz are you going to make a new release with this?

@Daniel-Marynicz
Copy link
Owner

Daniel-Marynicz commented Jul 24, 2025

I have released a new version 1.1.0. Before that, I did not have time.

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