Problem/Motivation

Replace calls of Views::pluginManager('display') and replace with injected service plugin.manager.views.display in \Drupal\views\ViewExecutable and \Drupal\views\ViewExecutableFactory

Steps to reproduce

NA

Proposed resolution

Properly dependency inject parameter

Remaining tasks

Review code changes and draft CR

User interface changes

NA

API changes

Calling ViewExecutable and ViewExecutableFactory will require an instance of \Drupal::service('plugin.manager.views.display') as their last argument

Data model changes

NA

Release notes snippet

NA

Issue fork drupal-2002012

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

dawehner’s picture

StatusFileSize
new3.47 KB

There we go.

damiankloip’s picture

+++ b/core/modules/views/lib/Drupal/views/ViewExecutableFactory.phpundefined
@@ -15,6 +16,20 @@
+  /**
+   * Constructs a ViewExecutableFactory.
+   */

@param ....

Otherwise, looks great.

dawehner’s picture

StatusFileSize
new683 bytes
new3.6 KB

Thank you.

The last submitted patch, drupal-2002012-3.patch, failed testing.

dawehner’s picture

Status: Needs work » Needs review

#3: drupal-2002012-3.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, drupal-2002012-3.patch, failed testing.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

dimitriskr made their first commit to this issue’s fork.

dimitriskr’s picture

Version: 9.5.x-dev » 11.x-dev
Issue summary: View changes
Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs issue summary update

Issue summary should be updated to the standard issue template.

Left some feedback but new parameters can probably be typehinted and new parameters probably have to do the backwards compatibility thing.

dimitriskr’s picture

Issue summary: View changes
dimitriskr’s picture

Status: Needs work » Needs review
Issue tags: -Needs issue summary update

smustgrave changed the visibility of the branch 2002012-inject-the-display to hidden.

smustgrave changed the visibility of the branch 11.x to hidden.

smustgrave’s picture

smustgrave’s picture

Issue summary: View changes
Status: Needs review » Needs work

Great job! Think only thing missing is an a test for the deprecation.

Will keep an eye out for this to come back.

dimitriskr’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Needs Review Queue Initiative

Feedback has been addressed.

quietone’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs change record updates

Lovely to see an old issue nearly completed!

I'm triaging RTBC issues. I read the IS and the comments. I didn't find any unanswered questions.

I read the MR and made suggestions in the MR so setting to NW for that.

I read the change record and made some changes to the text. However, the branch and version number are incorrect. I am tagging for CR update. The introduced in branch is not 11.x it will be 10.3.x.

dimitriskr’s picture

Status: Needs work » Needs review
Issue tags: -Needs change record updates

Done and done

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Feedback has been addressed.

catch’s picture

Status: Reviewed & tested by the community » Needs work

Couple of points on the MR.

dimitriskr’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Appears feedback from @catch has been addressed.

alexpott’s picture

Version: 11.x-dev » 10.3.x-dev
Status: Reviewed & tested by the community » Fixed

Committed and pushed 23bb407de3 to 11.x and 7f5ab91043 to 10.3.x. Thanks!

I think we could open a follow-up to use the DependencySerializationTrait in ViewsExecutabl... it'll be a little complex because we'll need to do a little work to make things work...
Also I think we should open a follow-up to use $this->provider in \Drupal\views\ViewExecutable::hasUrl() instead of \Drupal::service().

  • alexpott committed 7f5ab910 on 10.3.x
    Issue #2002012 by dimitriskr, dawehner, smustgrave, quietone,...

  • alexpott committed 23bb407d on 11.x
    Issue #2002012 by dimitriskr, dawehner, smustgrave, quietone,...
quietone’s picture

Issue tags: +Needs followup
smustgrave’s picture

Not sure if either of them should be tagged novice though?

Status: Fixed » Closed (fixed)

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