Skip to content

Conversation

@acoulton
Copy link
Contributor

Brings the history of the old abandoned 4.x branch into the current master, ahead of creating a new 4.x branch. This will avoid us losing the record of these contributions when we restart development for 4.0.

There are only very limited changes - there was only one functional PR #1397 that was merged into 4.x in 2023. The same feature was subsequently implemented by a different contributor in #1611, merged into master and released in 3.23.0.

The solutions are essentially identical except for a change to WrongPathsException which I have kept both because it is more correct and in case anyone is already using the 4.x branch.

Once this PR is merged, I will delete the current 4.x branch and recreate it from master.

Replaces #1692

branches: [master]
branches:
- master
- 4.x
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adding 4.x into the list in current master will minimise the need for differences in our build.yml across branches and therefore future merge conflicts.

public function __construct(
$message,
private $path,
string|array $paths,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Kept as string|array in 3.x for BC, but we can make this just array in 4.x

Comment on lines -38 to 59
* @return string
* @deprecated
*/
public function getPath()
public function getPath(): string
{
return $this->path;
return implode(', ', $this->paths);
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't actually use this getter, but it is part of the public interface and kept for BC. Should be very limited impact to anyone if we remove it in 4.x.

* Initializes exception.
*
* @param string $message
* @param string $path
Copy link
Member

Choose a reason for hiding this comment

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

should actually be documented as @param string|list<string> $paths to have the precise type.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, thanks - fixed.

Brings the history of the old abandoned 4.x branch into the current
master, ahead of creating a new 4.x branch. This will avoid us losing
the record of these contributions when we restart development for 4.0.

There are only very limited changes - there was only one functional PR
subsequently implemented by a different contributor in Behat#1611, merged
into master and released in 3.23.0.

The solutions are essentially identical except for a change to
WrongPathsException which I have kept both because it is more correct
and in case anyone is already using the 4.x branch.
@acoulton acoulton requested a review from stof November 20, 2025 08:54
@acoulton acoulton added this to the 4.0.0 milestone Nov 20, 2025
@acoulton
Copy link
Contributor Author

@stof friendly ping - if you're happy with this now I can get a 4.x branch started.

@acoulton acoulton merged commit 5f65eda into Behat:master Nov 24, 2025
21 checks passed
@acoulton acoulton deleted the merge-original-4.x branch November 24, 2025 09:32
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