Problem/Motivation

The same as #2970026: Fix "Passing a Session object to the ExpectationException constructor is deprecated as of Mink 1.7. Pass the driver instead." but for the exception class ElementNotFoundException extending from ExpectationException.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hchonov created an issue. See original summary.

hchonov’s picture

hchonov’s picture

Issue summary: View changes

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

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

marcel66’s picture

You are right, but the patch needs to be adjusted for 8.8.x.

marcel66’s picture

Status: Needs review » Needs work
hchonov’s picture

Status: Needs work » Needs review

@marcel66, the patch applies cleanly on 8.8.x.

oknate’s picture

Rerolling

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

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

rensingh99’s picture

Assigned: Unassigned » rensingh99
rensingh99’s picture

Hi,

I have reviewed patch #8 and I got two errors which are not as per Drupal coding standard.
I have fixed one error and uploaded the patch.

The other error is related to function names which is being used in multiple test files. So, I did not change it.
This fix might be beyond the scope of this task.

Thank you
Ren

rensingh99’s picture

Assigned: rensingh99 » Unassigned
Status: Needs review » Reviewed & tested by the community
hchonov’s picture

The change from #11 is not related to the changes in the current patch, but changes only old code unrelated to the issue. Changes not in scope should be avoided.

alexpott’s picture

Version: 8.9.x-dev » 8.8.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Committed and pushed 03ef2f6238 to 9.0.x and 18fcc6329c to 8.9.x. Thanks!

Thanks for fixing this. This has bugged me for ages! Error messages produce further error messages make it hard to understand test fails. I've committed #8 as @hchonov is correct those changes are out-of-scope.

I've not credited @rensingh99 for filing an out-of-scope patch. @rensingh99 Thank you for your work on cleaning up Drupal core's code style!

In order to fix core coding standards in a maintainable way, all our coding standards issues should be done on a per-rule basis across all of core, rather than fixing standards in individual modules or files. We should also separate fixes where we need to write new documentation from fixes where we need to correct existing standards. This all should be done as part of #2571965: [meta] Fix PHP coding standards in core. A good place to start is the child issues of #2572645: [Meta] Fix 'Drupal.Commenting.FunctionComment' coding standard.

For background information on why we usually will not commit coding standards fixes that aren't scoped in that way, see the core issue scope guidelines, especially the note about coding standards cleanups. That document also includes numerous suggestions for scoping issues including documentation coding standards cleanups.

Contributing to the overall plan above will help ensure that your fixes for core's coding standards remain in core the long term.

  • alexpott committed e15bbff on 9.0.x
    Issue #3005352 by hchonov, oknate: Passing a Session object to the...

  • alexpott committed 11dcf68 on 8.9.x
    Issue #3005352 by hchonov, oknate: Passing a Session object to the...
gease’s picture

Status: Patch (to be ported) » Reviewed & tested by the community

Patch #8 still applies to 8.8.x.

alexpott’s picture

Status: Reviewed & tested by the community » Patch (to be ported)

@gease both @catch and I use the "patch to be ported" status to separate these from the other rtbc's that are yet to be committed to any branch. It makes it less likely to be missed.

hchonov’s picture

@alexpott, if that's your workflow then the corresponding documentation should be updated to reflect it - https://www.drupal.org/contributor-tasks/backport

alexpott’s picture

Status: Patch (to be ported) » Fixed

Discussed with @catch we agreed to backport.

  • alexpott committed b9a4717 on 8.8.x
    Issue #3005352 by hchonov, oknate: Passing a Session object to the...

Status: Fixed » Closed (fixed)

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