Skip to content
Snippets Groups Projects

Initial commit from the patch in #154 comment.

2 unresolved threads

Resolve the merge conflicts. Perform other necessary changes.

Closes #2640994

Merge request reports

Merge request pipeline passed with warnings for 72c7e814

Approval is optional
Code Quality is loading
Test summary results are being parsed

Closed by catchcatch 10 months ago (May 31, 2024 8:25am UTC)

Merge details

  • The changes were not merged into 11.x.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
2
3 declare(strict_types=1);
4
5 namespace Drupal\Tests\views\Functional\Plugin;
6
7 use Drupal\Tests\taxonomy\Functional\Views\TaxonomyTestBase;
8 use Drupal\views\Tests\ViewTestData;
9 use Drupal\views\Views;
10
11 /**
12 * Tests the handler of the view: entity target argument.
13 *
14 * @group views
15 * @see \Drupal\views\Plugin\views\argument\EntityArgument
16 */
17 class EntityArgumentTest extends TaxonomyTestBase {
  • This is the only test in the Drupal\Tests\views namespace that extends TaxonomyTestBase.

    1. Is this a good idea?
    2. Should we rework this to rely on a different entity type so we don't have the external dependency?
    3. Should we move the test to taxonomy?

    I think #3 isn't good. I don't really want to spend the time on #2. But I'm not convinced of #1. :sweat_smile: Thoughts? Thanks!

    1. Personally I think it's a good idea since since it's testing the most common entity label override for views.
    2. I don't think that it is really worth jumping through hoops to not rely on taxonomy since it is the most common pathway.
    3. I don' think so, this is testing a views behavior.
  • Please register or sign in to reply
  • Derek Wright added 3 commits

    added 3 commits

    • 78d34bbe - [#2778345]: Flip pattern for deprecation dance in EntityArgument to avoid else
    • 7bea5b92 - [#2778345]: Use property promotion in EntityReferenceArgument to add types and simplify
    • cb2ea6b4 - [#2778345]: Add typehints to EntityArgumentTest

    Compare with previous version

  • Derek Wright added 1 commit

    added 1 commit

    Compare with previous version

  • Derek Wright added 2 commits

    added 2 commits

    Compare with previous version

  • Derek Wright added 29 commits

    added 29 commits

    Compare with previous version

  • Derek Wright added 2 commits

    added 2 commits

    • f4e13a45 - [#2640994] Fix expectations in EntityViewsDataTest now that we only have EntityArgument
    • 55dd0e8a - [#2640994]: Remove the 'deprecation dance' from the 11.x MR since the BC layer...

    Compare with previous version

  • Derek Wright added 1 commit

    added 1 commit

    • 2816feb2 - [#2640994]: Fix phpcs errors from previous commit: unused use and extra newline

    Compare with previous version

  • Derek Wright added 1 commit

    added 1 commit

    • c0114867 - [#2640994]: Remove deprecation test from 11.x since the BC layer is gone

    Compare with previous version

  • Derek Wright added 3 commits

    added 3 commits

    • 4d54d97b - Revert "[#2640994] Remove EntityReferenceArgument and update everything to use EntityArgument"
    • 89d22118 - Revert "[#2640994] Fix expectations in EntityViewsDataTest now that we only have EntityArgument"
    • c810384a - [#2640994]: Clarify the documentation for EntityArgument vs. EntityReferenceArgument

    Compare with previous version

  • Derek Wright added 40 commits

    added 40 commits

    Compare with previous version

  • Derek Wright added 66 commits

    added 66 commits

    Compare with previous version

  • 548 551 return $changed;
    549 552 }
    550 553
    554 /**
    555 * Checks if 'numeric' arguments should be converted to 'entity_target_id'.
    556 *
    557 * @param \Drupal\views\ViewEntityInterface $view
    558 * The view entity.
    559 *
    560 * @return bool
    561 * TRUE if the view has any arguments that reference an entity reference
    562 * that need to be converted from 'numeric' to 'entity_target_id'.
    563 */
    564 public function needsEntityArgumentUpdate(ViewEntityInterface $view) {
  • added 1 commit

    • b6afd225 - Apply 1 suggestion(s) to 1 file(s)

    Compare with previous version

  • Derek Wright added 132 commits

    added 132 commits

    Compare with previous version

  • Derek Wright added 129 commits

    added 129 commits

    • 1c3d046a...2e3e8746 - 94 commits from branch project:11.x
    • 2e3e8746...934d14d3 - 25 earlier commits
    • 719a59d8 - [#2640994] Fix expectations in EntityViewsDataTest now that we only have EntityArgument
    • d013baa0 - [#2640994]: Remove the 'deprecation dance' from the 11.x MR since the BC layer...
    • 8168f0eb - [#2640994]: Fix phpcs errors from previous commit: unused use and extra newline
    • 9c4ee6b4 - [#2640994]: Remove deprecation test from 11.x since the BC layer is gone
    • 5c81c20b - Revert "[#2640994] Remove EntityReferenceArgument and update everything to use EntityArgument"
    • 06ecbfb4 - Revert "[#2640994] Fix expectations in EntityViewsDataTest now that we only have EntityArgument"
    • ccb98869 - [#2640994]: Clarify the documentation for EntityArgument vs. EntityReferenceArgument
    • 12d2a665 - [#2640994] switch to 10.3.0 fixture for EntityArgumentUpdateTest now that [#3442172] happened
    • 256af861 - Apply 1 suggestion(s) to 1 file(s)
    • 6f37ef52 - [#2640994] task(views): Trigger deprecations in ViewsConfigUpdater::processEntityArgumentUpdate()

    Compare with previous version

  • Derek Wright added 1 commit

    added 1 commit

    • e005a5a6 - [#2640994] Disable deprecations in views_post_update_views_data_argument_plugin_id()

    Compare with previous version

  • Derek Wright added 1 commit

    added 1 commit

    • 0fc0b67d - [#2640994] Fix phpstan: pass the view to ViewsConfigUpdater::processEntityArgumentUpdate()

    Compare with previous version

  • Derek Wright added 1 commit

    added 1 commit

    • 9dd670d4 - [#2640994] Fix phpstan again (forgot to pass the view to the anon function)

    Compare with previous version

  • Derek Wright added 1 commit

    added 1 commit

    • 125c1b46 - [#2640994] Also fix ViewsConfigUpdater::updateAll() to pass the view

    Compare with previous version

  • Derek Wright added 2 commits

    added 2 commits

    • 56e143f2 - [#2640994] Update views.view.test_argument_dependency to use entity_target_id not numeric
    • 1ca3ad8c - [#2640994] Fix EntityArgumentUpdateTest to load the View directly instead of...

    Compare with previous version

  • Derek Wright added 3 commits

    added 3 commits

    • 0d91c772 - [#2640994] Fix views.view.test_entity_id_argument.yml to use the...
    • 947442cb - [#2640994] Update views.view.test_argument_default_current_user.yml to use...
    • 72c7e814 - [#2640994] Fix ViewsConfigUpdater::processEntityArgumentUpdate() to fix the...

    Compare with previous version

  • closed

  • Please register or sign in to reply
    Loading