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

BUGFIX: 4909 fusion plugins and tests #5304

Merged
merged 9 commits into from
Feb 20, 2025

Conversation

mhsdesign
Copy link
Member

@mhsdesign mhsdesign commented Oct 20, 2024

Resolves: #4909

Based on #5305 introduces a step to declare a flow controller in behat:

When I declare the following controller 'Vendor\Site\Controller\MyPluginWithFusionController':
"""php
<?php
namespace Vendor\Site\Controller;

use Neos\Flow\Mvc\Controller\ActionController;

class MyPluginWithFusionController extends ActionController
{
    public function renderAction()
    {
    }
}
"""

This comes with good and bad things.
The good thing is that the test is self contained and i have seen behat for example see also use that they create virtual php to test if the frame-work works.
Now the downside is that because of php there can only be ONE MyPluginWithFusionController across all tests declared which are executed in the same run. But for now this is not a problem as there are only two such fakes.
Another problem is that we need some hacks (see BehatRuntimeActionController) to actually make this work.

At first i attempted to have the files also separated in another location in (Test/Functional) of Neos.Neos but aside from them being spread around the whole planed i had problems with the proxybuilding there too.

But i believe that we do want to use behat to write self contained tests even if its hard right now but flow has to adjust at some point to this needs hopefully ^^.

Upgrade instructions

Review instructions

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

@mhsdesign mhsdesign force-pushed the bugfix/4909-fusion-plugins-and-tests branch from 33eda04 to bfc07b2 Compare February 19, 2025 16:57
@mhsdesign mhsdesign marked this pull request as ready for review February 19, 2025 17:08
Copy link
Member

@kitsunet kitsunet left a comment

Choose a reason for hiding this comment

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

I don't like the PHP in the behat but I don't think it warrants blocking stuff. We can refactor the tests any time.

Copy link
Member

@mficzel mficzel left a comment

Choose a reason for hiding this comment

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

Generally fine by 👀 ... would remove the magic renaming of the ActionController class and use the real name.

@mhsdesign mhsdesign merged commit bfa49a0 into neos:9.0 Feb 20, 2025
12 checks passed
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.

Neos 9.0 Sub-request on Neos.Neos Frontend page broken
3 participants