- πΊπΈUnited States smustgrave
This issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request β as a guide.
As a bug this will need a test case
- Merge request !3999Issue #2535896: ConditionManager::evaluate() should not negate results itself β (Closed) created by vasike
- last update
over 1 year ago Custom Commands Failed - π·π΄Romania vasike Ramnicu Valcea
MR created from the latest patch ... for anyone to contrib.
+ Added missing test file - it got lost in re-rolling/updating patches
+ Add negated condition forcore/tests/Drupal/KernelTests/Core/Entity/EntityBundleConditionTest.php
But dunno what tests could be created that would fail for current core ... before those updates.
- last update
over 1 year ago 29,389 pass - Status changed to Needs review
over 1 year ago 1:11pm 17 May 2023 - last update
over 1 year ago Custom Commands Failed - Status changed to Needs work
over 1 year ago 7:11pm 19 May 2023 - πΊπΈUnited States smustgrave
Tests appear to have been added so removing that tag.
Can the issue summary be updated, specially the proposed solution. Seems to be open ended.
- Status changed to Needs review
over 1 year ago 1:37pm 23 May 2023 - Status changed to RTBC
over 1 year ago 12:52pm 5 June 2023 - πΊπΈUnited States smustgrave
Issue summary had been updated so removing that tag.
Test coverage seems good so think this is good for committer review too.
- last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - Status changed to Needs review
over 1 year ago 2:43pm 22 July 2023 - π¬π§United Kingdom longwave UK
There are surely backward compatibility issues here. Contrib and custom plugins will need updating to handle isNegated internally, now the ConditionManager doesn't do it for them?
- Status changed to Needs work
over 1 year ago 4:09pm 7 August 2023 - πΊπΈUnited States smustgrave
So you think the safer bet would be to deprecate isNegated from ConditionManager?
- Status changed to Needs review
about 1 year ago 2:10pm 29 August 2023 - π·π΄Romania vasike Ramnicu Valcea
i think we're still Need Review, as there is no "clear" ToDo.
imho, i can't see why we need to "deprecate"
isNegated
.
i don't think$this->configuration['negate']
is an "universal" config/option for all condition plugin.As a reminder: the issue is to (re)move
isNegated
usage from ConditionManager to Condition plugin level + make sure is properly used.Maybe we could have this
return $condition->isNegated() ? !$result : $result;
in the ConditionPluginBase .. similar withbuildConfigurationForm
implementations and usage for condition plugins. - πΊπΈUnited States smustgrave
@longwave thoughts on
Maybe we could have this return $condition->isNegated() ? !$result : $result; in the ConditionPluginBase .. similar with buildConfigurationForm implementations and usage for condition plugins.
- Status changed to Needs work
about 1 year ago 3:04pm 9 October 2023 - πΊπΈUnited States smustgrave
Hiding patches as work appears to be in the MR.
@vasike can the MR be updated to 11.x please maybe with return $condition->isNegated() ? !$result : $result;
- Merge request !4975Issue #2535896: ConditionManager::evaluate() should not negate results itself β (Open) created by vasike
- last update
about 1 year ago Custom Commands Failed - last update
about 1 year ago Custom Commands Failed - last update
about 1 year ago Custom Commands Failed - last update
about 1 year ago 30,393 pass - π¬π§United Kingdom longwave UK
Wondering if a possible way forward here is to add NegatableConditionInterface which signifies that a condition allows negation and will handle it internally, and then we can deprecate it from ConditionManager?
- Status changed to Needs review
about 1 year ago 11:29am 10 October 2023 - π·π΄Romania vasike Ramnicu Valcea
new MR for 11.x available.
This movesisNegated
checking toConditionPluginBase
new "helper"evaluateIsNegated
But still not sure.
Maybe @longwave has a point with #57 suggestions ... but still i can't see "the ideal" solution.
However, for now ... Needs Review
- π·π΄Romania vasike Ramnicu Valcea
sorry, But
Reminder: This is a Bug, so i think this should be fixed (already).And if the fix is not ideal. then create follow-up ticket to chase the perfect solution of Negated Conditions.
- Status changed to Needs work
11 months ago 2:27pm 7 December 2023 - π§πͺBelgium borisson_ Mechelen, π§πͺ
http://codcontrib.hank.vps-private.net/search?text=configuration%5B%27ne...
There are multiple pages of plugins out there that are using the same negated, so we have to keep BC in mind here, I think I agree with having an interface to mark them as being able to do it themselves + a deprecation is needed here.
- π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
Yes, I think #57 is the best way forward here
I have client projects with lots of condition plugins that would need to be communicated this change.
With #57 we can trigger a deprecation error if the condition plugin doesn't implement the new interface, which gives us a way to eventually consolidate them.
- Status changed to Needs review
11 months ago 2:19pm 14 December 2023 - π·π΄Romania vasike Ramnicu Valcea
Updated the MR - NegatableConditionInterface and NegatableConditionBase added and related updates.
a review it would be nice
- Status changed to Needs work
11 months ago 5:12pm 15 December 2023 - πΊπΈUnited States smustgrave
With #57 we can trigger a deprecation error if the condition plugin doesn't implement the new interface, which gives us a way to eventually consolidate them.
I don't see the deprecation
- Status changed to Needs review
11 months ago 6:25pm 15 December 2023 - π·π΄Romania vasike Ramnicu Valcea
@smustgrave i didn't say i added deprecation.
just the interface and the "base class"and i asked for a review ... for those things ...
maybe there are other things ... to make them "nice" ... before the final touch
- Status changed to Needs work
11 months ago 12:23am 2 January 2024 - π·π΄Romania vasike Ramnicu Valcea
@smustgrave Type hints added. thanks
But unfortunately, it started failing for spellcheck ... i thought it was the new class name(s) - but not sure.
also not sure what are the "related" updates on CI ... "any help will be helpful" - πΊπΈUnited States smustgrave
Seems you got bit by π Spell-checking job fails with "Argument list too long" when too many files are changed Active there's a workaround post on there.
- Status changed to Needs review
10 months ago 7:21pm 23 January 2024 - π·π΄Romania vasike Ramnicu Valcea
@smustgrave / @andypost you're my brain saviours
thanks ... cleaned up my last changes. it looks "green" ... even it tried to "do it red"
then ... let's review - πΊπΈUnited States smustgrave
Believe all feedback has been addressed so +1 from me but leave in review for some additional eyes to avoid ping ponging around.
- Status changed to RTBC
10 months ago 3:39pm 2 February 2024 - πΊπΈUnited States smustgrave
Been a few days and don't want the issue to stale so going to mark.
- Status changed to Needs work
9 months ago 3:19am 21 February 2024 - π³πΏNew Zealand quietone
I'm triaging RTBC issues β .
Ah, a 9 year old issue. I like seeing the older issues getting near completion.
I read the IS and the comments. I didn't find any unanswered questions. However the proposed resolution does not match the direction taken in #57. This is more that a refactor, it should include that an interface is added. And also a CR.
I made comments in the MR that need to be addressed.
Changing to NW
- Status changed to Needs review
9 months ago 9:18am 21 February 2024 - π·π΄Romania vasike Ramnicu Valcea
@quietone thanks a lot for the reviews (issue and MR/code) and their feedback
Update the MR trying to cover all of threads ... it looks nicer ... at least
However, i expected a feedback about #57 changes i added ... like a confirmation ... so we could update the issue summary ... add change record ...
But, i saw no one.Maybe @longwave, as "initiator" could check it.
- Status changed to Needs work
9 months ago 1:42am 4 March 2024 The Needs Review Queue Bot β tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide β to find step-by-step guides for working with issues.
- Status changed to Needs review
9 months ago 12:18pm 4 March 2024 - π¬π§United Kingdom longwave UK
After looking at the new approach I'm still not entirely convinced this is worthwhile, and this only feels like a stopgap; somehow we have to later remove non-NegatableConditionInterfaces, but also we probably want to allow conditions to not actually support negation (like in the boolean case where it makes no sense), but not sure how to achieve that.
- π¬π§United Kingdom longwave UK
This is ultimately a framework manager decision so let's tag them for input.
- Status changed to Needs work
7 months ago 8:13pm 14 April 2024 - π¬π§United Kingdom catch
Like #78 I'm not sure whether this gets us to the eventual end point and it doesn't look like much of an improvement on its own, if that's known, can follow-up issues be opened with an explanation?
I would be useful if the issue summary and a change record were fleshed out too, so marking needs work for that.