Follow up for #1648930-250: Introduce configuration schema and use for translation 11.
Namespace docs standard fix in core/lib/Drupal/Core/Config/ConfigFactory.php

Problem/Motivation

Originating issue had changes to this file, but only \namespace style fixes. It was cluttering the issue, and needed to be a separate issue.

Proposed resolution

Go through ConfigFactory.php and fix it to be correct according to http://drupal.org/node/1354#namespaces

Remaining tasks

  • make initial patch of changes, keep focused on only docs and style updates. no refactoring. if refactoring is needed... make it a separate follow-up. :)
  • get review
  • iterate. patch, review.

Test bot coverage should be sufficient. No manual testing or screenshots needed.

User interface changes

no ui changes.

API changes

no api changes.

Files: 
CommentFileSizeAuthor
#19 1852272.19.patch696 bytesYesCT
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 79,458 pass(es). View
#10 ConfigFactory_docfixes-1852272-10.patch401 bytesaaronott
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch ConfigFactory_docfixes-1852272-10.patch. Unable to apply patch. See the log in the details link for more information. View
#6 ConfigFactory_docfixes-1852272-6.patch2.28 KBaaronott
PASSED: [[SimpleTest]]: [MySQL] 49,226 pass(es). View
#4 ConfigFactory_docfixes-1852272-4.patch2.43 KBaaronott
PASSED: [[SimpleTest]]: [MySQL] 49,270 pass(es). View
#2 ConfigFactory_docfixes-1852272-2.patch2.26 KBaaronott
FAILED: [[SimpleTest]]: [MySQL] Failed to run tests: PHP Fatal error encountered during run_tests.sh. See review log for details.. View
#1 ConfigFactory_docfixes-1852272-0.patch874 bytesaaronott
PASSED: [[SimpleTest]]: [MySQL] 48,370 pass(es). View

Comments

aaronott’s picture

Status: Active » Needs review
FileSize
874 bytes
PASSED: [[SimpleTest]]: [MySQL] 48,370 pass(es). View

There were only two changes that I saw.

aaronott’s picture

FileSize
2.26 KB
FAILED: [[SimpleTest]]: [MySQL] Failed to run tests: PHP Fatal error encountered during run_tests.sh. See review log for details.. View

Given what is defined in #1 in the documentation

When using a class or interface name immediately after any @-tag in documentation, prefix it with the fully-qualified namespace name (starting with a backslash).

I've re-added all the starting backslashes to the namespaces.

This patch contains all changes from the first patch as well.

Lars Toomre’s picture

+++ b/core/lib/Drupal/Core/Config/ConfigFactory.phpundefined
@@ -15,36 +15,35 @@
+   * @param \Symfony\Component\EventDispatcher\EventDispatcher
    *   An event dispatcher instance to use for configuration events.

This is missing the variable name $event_dispatcher. This was an already existing error. that should be corrected in this line change.

aaronott’s picture

FileSize
2.43 KB
PASSED: [[SimpleTest]]: [MySQL] 49,270 pass(es). View

@Lars Toomre Thanks for catching that. I've corrected that line here.

Lars Toomre’s picture

You are welcome @aaronott. The one final change that I do not think belongs in this patch is removing the blank line before the closing brace of a class declaration.

There is some uncertainty about what the Drupal standard is for class declarations and where blank lines are required. However, @tim.plunkett, @xjm and @sun have all stated that a blank line before the closing brace is part of our standards. Hence, I would leave out the removal of that blank line at the end of the patch in #4.

aaronott’s picture

FileSize
2.28 KB
PASSED: [[SimpleTest]]: [MySQL] 49,226 pass(es). View

Interesting I'll keep that in mind.

I've removed the removal of that blank line from patch #4.

Status: Needs review » Needs work

The last submitted patch, ConfigFactory_docfixes-1852272-6.patch, failed testing.

YesCT’s picture

An interdiff between 4 and 6 would be helpful... http://drupal.org/node/1488712

YesCT’s picture

Status: Needs work » Needs review
aaronott’s picture

Status: Needs work » Needs review
FileSize
401 bytes
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch ConfigFactory_docfixes-1852272-10.patch. Unable to apply patch. See the log in the details link for more information. View

@YesCT The interdiff looks like the following

diff --git a/core/lib/Drupal/Core/Config/ConfigFactory.php b/core/lib/Drupal/Core/Config/ConfigFactory.php
index 7cab5cf..e3c40bd 100644
--- a/core/lib/Drupal/Core/Config/ConfigFactory.php
+++ b/core/lib/Drupal/Core/Config/ConfigFactory.php
@@ -84,4 +84,5 @@ public function get($name) {
     $config = new Config($name, $this->storage, $this->eventDispatcher);
     return $config->init();
   }
+
 }

Let me know if there is anything else. This is just adding back a blank line that I initially removed.

Status: Needs review » Needs work

The last submitted patch, ConfigFactory_docfixes-1852272-10.patch, failed testing.

YesCT’s picture

To keep the testbot from testing the interdiff file, name it something like: interdiff-4-6.txt

Re testing the patch in #6 shows it passing. (which makes more sense if the only change was adding in a line. :) )

Sumeet.Pareek’s picture

This is my first day reviewing patches for Drupal and getting started (again) with contributing to Drupal here at DrupalCampDelhi - http://drupalcampdelhi.com

* This simple issue helped me learn about Doxygen comment formatting conventions for Drupal - http://drupal.org/node/1354#namespaces

* It also taught me about interdiffs - http://drupal.org/node/1488712

The patch in #6 addresses the issue. The latest patch in #10 is not the real patch but the interdiff, so I am going ahead and marking this RTBC. Thanks @aaronott and @YesCT :-)

Sumeet.Pareek’s picture

Status: Needs review » Reviewed & tested by the community

I remember changing the status :p

webchick’s picture

Component: configuration system » documentation

This patch looks great to me, but is likely to collide with #1648930: Introduce configuration schema and use for translation which is tagged as "Avoid commit conflicts." So we can commit this soon, just not right now. :)

YesCT’s picture

I remembered the reason this was split out was because it was the only change to that file and was accidentally included in the patch from that other issue.

So,

todo for me (or anyone else): check for conflicts and report back. :)

jhodgdon’s picture

Status: Reviewed & tested by the community » Postponed

The standard for using namespaces in docs is currently under question, so I would advise not committing this or working further on it until
#1487760: [policy, no patch] Decide on documentation standards for namespaced items
is figured out. Sigh.

jhodgdon’s picture

Issue summary: View changes

Updated issue summary to make it clear this is a separate issue and not a conflicting follow up

mgifford’s picture

Issue summary: View changes
YesCT’s picture

Status: Postponed » Needs review
FileSize
696 bytes
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 79,458 pass(es). View

This is the only change from #10 that has not been fixed already in other issues since then.

YesCT’s picture

Status: Needs review » Closed (cannot reproduce)

given that. I think we are ok with closing this.