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

TASK: Remove unused Fusion\Core\ParserInterface #3932

Merged
merged 1 commit into from Oct 26, 2022

Conversation

mhsdesign
Copy link
Member

@mhsdesign mhsdesign commented Oct 23, 2022

The Fusion\Core\ParserInterface is removed as it could not be used to implement an alternative Fusion parser. The removal of the interface will allow to improve the interface of the parser in future.

Upgrade instructions

If you must access the Fusion parser directly - then dont inject it by using the Fusion\Core\ParserInterface but inject or instantiate Fusion\Core\Parser.
The recommended way to interact with Fusion is via the FusionView

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

Copy link
Member

@kdambekalns kdambekalns left a comment

Choose a reason for hiding this comment

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

Useless things must go. 🤷‍♂️

@mhsdesign
Copy link
Member Author

fyi - option B would be to actually use this interface by injecting the ParserInterface via di instead of using new

@kdambekalns
Copy link
Member

fyi - option B would be to actually use this interface by injecting the ParserInterface via di instead of using new

Thus offering an extension point we do not even remotely expect to be used. 🤔 Sounds weird.

@mhsdesign
Copy link
Member Author

yes - and one can always use aop ^^

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.

Remove stuff that serves no purpose

@mhsdesign mhsdesign merged commit 2cbdad5 into neos:8.2 Oct 26, 2022
@mficzel
Copy link
Member

mficzel commented Nov 4, 2022

@mhsdesign can you upgrade the message of the pr to a descriptive text that can be used in the release notes. The current text can be moved to the release notes section that is nut included in the release notes

Suggestion:

The Fusion\Core\ParserInterface is removed as it could not be used to implement an alternative Fusion parser. The removal of the interface will allow to improve the interface of the parser in future.

@mhsdesign
Copy link
Member Author

yes ;)

Initial PR message:

While working on #3497

i asked myself already:
speaking of interface - the parser uses [...] the parser interface, which seems quite useless as it contains only the method parse. i looked up usages of the parser interface and found none... should it be kicked?

but back then the consent was:

Martin:
The parser interface declares that the method parse is the only thing code outside of the parser should rely on.
It is good practice to declare such interfaces explicitly especially as it allows to differentiale breaking from non breaking changes by looking wether interfaces are modified.

Now the question came up again with #3839
Do we really need the ParserInterface?

We re-discussed this matter and as there are still 0 references to ParserInterface (except of course the Parser which implements it) it is useless.

A few opinions:

Karsten:
Then maybe drop it (the interface, not the @api), before someone notices? 🙈

Christian:
Given that it's a useless interface I doubt anyone has really implemented it, so from my side I would be fine with this technically breaking change. I am SURE there is a project where someone imlpemented the interface but never checked if it works and it breaks, but weeeeeell......

Martin:
Strange but I also see no point in keeping it. Even when we hacked the first version of afx into fusion we used aop and not that.
[...]
Would prefer to drop the interface in 8.2 and note it in the release notes as removal of an unusable extension point

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