Skip to content

TASK: Fix override of runBare() in functional test#3421

Merged
mhsdesign merged 2 commits into
neos:8.3from
kdambekalns:task/drop-runbare-override
Jan 24, 2025
Merged

TASK: Fix override of runBare() in functional test#3421
mhsdesign merged 2 commits into
neos:8.3from
kdambekalns:task/drop-runbare-override

Conversation

@kdambekalns

Copy link
Copy Markdown
Member

As of PHPUnit 11 runBare() is a final method.

This was written ages ago by Sebastian Kurfürst, who recently said:

IMHO we wanted to run each test twice to run it without cache and
then with cache. But it seems this was broken anyways since a long
time – so we can drop it

Checklist

  • Code follows the PSR-2 coding style
  • Tests have been created, run and adjusted as needed
  • The PR is created against the lowest maintained branch
  • Reviewer - PR Title is brief but complete and starts with FEATURE|TASK|BUGFIX
  • Reviewer - The first section explains the change briefly for change-logs
  • Reviewer - Breaking Changes are marked with !!! and have upgrade-instructions

As of PHPUnit 11 `runBare()` is a `final` method.

This was written ages ago by Sebastian Kurfürst, who recently said:

> IMHO we wanted to run each test twice to run it without cache and
> then with cache. But it seems this was broken anyways since a long
> time – so we can drop it
@kdambekalns

Copy link
Copy Markdown
Member Author

This is an excerpt from #3405 that fixes just the runBare() override, as that leads to a fatal error when "doing things" with PhpUnit 11…

@mhsdesign mhsdesign left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

in case we consider it worth fixing we can get around this restriction of runBare and achieve the same result in a similar way.

For that we would put all generic test functions in a trait and then have two TestClasses both using this trait but having different setup methods. That way we test the same interactions with differently configured views.

@kdambekalns

Copy link
Copy Markdown
Member Author

Ping…

@mhsdesign mhsdesign left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

jup the StandaloneView thing override also looks kinda hacky :)

# Conflicts:
#	Neos.FluidAdaptor/Tests/Functional/View/Fixtures/View/StandaloneView.php
@mhsdesign mhsdesign merged commit 1ba400b into neos:8.3 Jan 24, 2025
@kdambekalns kdambekalns deleted the task/drop-runbare-override branch January 24, 2025 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants