-
Notifications
You must be signed in to change notification settings - Fork 16
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
!!! FEATURE: Neos 9.0 compatibility #62
base: main
Are you sure you want to change the base?
Conversation
<f:link.action action="purgeCache" format="json" arguments="{node: node}" class="neos-button clear-cache" title="Clear cache" data="{node-label: node.label}"><i class="fa fa-bolt"></i></f:link.action> | ||
<div class="neos-hide" id="{node.identifier}"> | ||
<button class="neos-button" data-toggle="modal" href="#{item.node.aggregateId}" title="Additional info" data-check-url="{f:uri.action(action: 'checkUrl', format: 'json', arguments: {url: url})}"><i class="fa fa-info-circle"></i></button> | ||
<f:link.action action="purgeCache" format="json" arguments="{nodeAddress: item.nodeAddress}" class="neos-button clear-cache" title="Clear cache" data="{node-label: item.node.label}"><i class="fa fa-bolt"></i></f:link.action> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fyi this link generation here in combination with
NodeAddress::fromNode($node)->toJson()
in the varnishCacheController caused some discussion in https://neos-project.slack.com/archives/C04PYL8H3/p1736364381060509
Ill take care of figuring out what we want for the Neos 9 release - either having to use nodeAddress here manually or reallowing some autocasting magic in the back and passing a full node -> neos/neos-development-collection#5069
But for now, this code works and is used in other places as well. Its not wrong its just less magic and more explicit^^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking good (by skimming over) – just a couple of comments re (maybe unwanted) injection behavior change
protected LoggerInterface $logger; | ||
|
||
/** | ||
* @Flow\Inject | ||
* @var LoggerInterface | ||
*/ | ||
protected $logger; | ||
|
||
/** | ||
* @Flow\Inject | ||
* @var VarnishBanService | ||
*/ | ||
protected $varnishBanService; | ||
|
||
/** | ||
* @Flow\Inject | ||
* @var CacheTagService | ||
*/ | ||
protected $cacheTagService; | ||
#[Flow\Inject] | ||
protected VarnishBanService $varnishBanService; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a FYI: This changes the behavior slightly because previously the injections were lazy
#[Flow\Inject] | ||
protected SiteRepository $siteRepository; | ||
|
||
#[Flow\Inject] | ||
protected ContentRepositoryRegistry $contentRepositoryRegistry; | ||
|
||
#[Flow\Inject] | ||
protected SiteNodeUtility $siteNodeUtility; | ||
|
||
#[Flow\Inject] | ||
protected ContentCacheFlusherService $contentCacheFlusherService; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here: lazy => eager
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, didn't know that. Any way to use PHP Attributes and lazy injecton? Does it matter in these cases?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I don't think that's possible.
And no, I don't think that it's a problem really, but I just wanted to mention it
The PR makes this package Neos 9.0 compatible.
This needs to be tested carefully as main parts of the package have been rewritten based on new Neos ContentRepository.