Problem/Motivation

\Drupal\views\ViewsData::get(NULL) is IMHO a worse API than \Drupal\views\ViewsData::getAll

Proposed resolution

Let's add a ::getAll() method.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

dawehner created an issue. See original summary.

dawehner’s picture

Issue tags: +Novice
mattc321’s picture

Assigned: Unassigned » mattc321

Working on this at the NOLA Sprints.

mattc321’s picture

Assigned: mattc321 » Unassigned
Status: Active » Needs review
StatusFileSize
new1.23 KB

@dawehner were you looking for something like this?

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Nice!

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 4: 2719335-4.patch, failed testing.

mikeker’s picture

Status: Needs work » Needs review

The test failure seems unrelated. Rerunning...

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Agreed

mikeker’s picture

Issue tags: +neworleans2016

Tagging for NOLA sprints. I was mentoring @mattc321 on this issue.

catch’s picture

Status: Reviewed & tested by the community » Needs review

Looks like we could move the NULL logic from get() to getAll(), and have get() call it - then we could drop the @todo from getAll()?

dawehner’s picture

Looks like we could move the NULL logic from get() to getAll(), and have get() call it - then we could drop the @todo from getAll()?

We discussed that and well thought it would be sort of out of scope of this change, but yeah I'm not sure about that.

mikeker’s picture

Status: Needs review » Needs work

re: #10:

As @dawehner mentioned, we did talk about it and decided to leave it to the followup issue. But I think @catch is right that we should do as much as we're allowed to do in 8.x and leave just the API breaks to 9.x.

imiksu’s picture

Issue tags: +drupalcampfi

I'm mentoring two guys (@narnua and @maddinen) to work on this novice step.

imiksu’s picture

Assigned: Unassigned » imiksu
narnua’s picture

Mentoree at Drupal Sprint in Helsinki

imiksu’s picture

Assigned: imiksu » Unassigned
Status: Needs work » Needs review
StatusFileSize
new4.5 KB
new5.73 KB
new4.5 KB

Here we have tests for this.

Setting "Needs review" for triggering testbot.

Status: Needs review » Needs work

The last submitted patch, 16: 2719335-16-testsonly-shouldfail.patch, failed testing.

mikeker’s picture

Status: Needs work » Needs review

Returning to NR as the failure was from the test-only patch.

Note: if you upload the tests-only patch first then it doesn't change the issue status when it fails, only if the tests-plus-fix patch fails.

catch’s picture

Status: Needs review » Needs work

That's passing but doesn't handle #10 yet.

@dawehner it's definitely in scope for 8.x, I think the patch is small enough it's fine to do here as well.

markdorison’s picture

Status: Needs work » Needs review
StatusFileSize
new8.83 KB
new4.8 KB
  • Completed @catch's suggestion from #10: "move the NULL logic from get() to getAll(), and have get() call it - then we could drop the @todo from getAll()?"
  • Fixed indentation.
  • Updated deprecation notice.
  • Fixed missing punctuation that PHPCS was complaining about.
dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Nice work!

mikeker’s picture

I'm concerned that there's a lot of out of scope stuff in #20. Agreed, it needs to be cleaned up at some point but I'm not sure this is the issue to do it in...

dawehner’s picture

@mikeker
Well, @catch asked for ... and well, its an improvement, so let's just do it?

mikeker’s picture

@dawehner, I didn't mean the request from #10, I meant the code sniffer fixes which looked to be numerous. But in looking at it again, there is only this:

+++ b/core/modules/views/src/ViewsData.php
@@ -81,7 +81,7 @@ class ViewsData {
-   * The language manager
+   * The language manager.

Sorry, about that. I must have been misreading the diff.

RTBC++

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

@mikeker - if you review with git diff -w then the changes don;t look so bad - mostly everything is just indentation.

Committed 6b94c5c and pushed to 8.2.x. Thanks!

  • alexpott committed 6b94c5c on 8.2.x
    Issue #2719335 by iMiksu, markdorison, mattc321, dawehner, mikeker,...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.