Problem/Motivation

We need to add hasConfigSchema method.

Proposed resolution

Issue patch!!!

Remaining tasks

User interface changes

API changes

Files: 
CommentFileSizeAuthor
#13 2097259-has-config-schema-13.patch3.45 KBvijaycs85
PASSED: [[SimpleTest]]: [MySQL] 58,583 pass(es).
[ View ]
#13 2097259-diff-12-13.txt496 bytesvijaycs85
#12 2097259-has-config-schema-12.patch3.43 KBvijaycs85
PASSED: [[SimpleTest]]: [MySQL] 58,730 pass(es).
[ View ]
#12 2097259-diff-9-12.txt1.96 KBvijaycs85
#9 2097259-has-config-schema-9.patch2.37 KBtstoeckler
PASSED: [[SimpleTest]]: [MySQL] 58,725 pass(es).
[ View ]
#8 2097259-has-config-schema-8.patch2.35 KBtstoeckler
FAILED: [[SimpleTest]]: [MySQL] 58,717 pass(es), 1 fail(s), and 0 exception(s).
[ View ]
#8 2097259-has-config-schema-interdiff-5-8.txt1.74 KBtstoeckler
#5 2097259-has-config-schema-5.patch2.35 KBtstoeckler
FAILED: [[SimpleTest]]: [MySQL] 58,673 pass(es), 1 fail(s), and 0 exception(s).
[ View ]
#5 2097259-has-config-schema-interdiff-2-5.txt2.15 KBtstoeckler
#2 2097259-has-config-schema-2.patch908 bytesvijaycs85
PASSED: [[SimpleTest]]: [MySQL] 58,564 pass(es).
[ View ]
#1 2097259-has-config-schema-1.patch766 bytesvijaycs85
PASSED: [[SimpleTest]]: [MySQL] 58,953 pass(es).
[ View ]

Comments

Status:Active» Needs review
StatusFileSize
new766 bytes
PASSED: [[SimpleTest]]: [MySQL] 58,953 pass(es).
[ View ]

Initial patch...

StatusFileSize
new908 bytes
PASSED: [[SimpleTest]]: [MySQL] 58,564 pass(es).
[ View ]

Few documentation improvements as per @tstoeckler.

Status:Needs review» Reviewed & tested by the community
Issue tags:+blocker

Awesome, thanks @vijaycs85!

Also tagging this as blocker. We currently have this as a procedural method in config_translation but A) this is in no way specific to config_translation and B) procedural function --

So let's get this out of the way.

Status:Reviewed & tested by the community» Needs work
Issue tags:+Needs tests

You know this needs tests. A simple one checking a config schema that does not exist and one that does would be great. I think we may have in fact some test for a similar thing that can be extended.

Status:Needs work» Needs review
StatusFileSize
new2.15 KB
new2.35 KB
FAILED: [[SimpleTest]]: [MySQL] 58,673 pass(es), 1 fail(s), and 0 exception(s).
[ View ]

Yeah, I guess tests can't hurt. And it was especially easy with your help! Thanks again.

+++ b/core/lib/Drupal/Core/Config/TypedConfigManager.php
@@ -298,7 +298,7 @@ public function hasConfigSchema($name) {
-    return is_array($definition) && $definition['class'] != '\Drupal\Core\Config\Schema\Property';
+    return is_array($definition) && ($definition['class'] != '\Drupal\Core\Config\Schema\Property');

Oh yeah, that is not really necessary, but I hate to stare at something for 5 seconds until I grok it, and I think it's clearer this way.

Status:Needs review» Needs work

The last submitted patch, 2097259-has-config-schema-5.patch, failed testing.

Status:Needs work» Needs review
Issue tags:-Needs tests
StatusFileSize
new1.74 KB
new2.35 KB
FAILED: [[SimpleTest]]: [MySQL] 58,717 pass(es), 1 fail(s), and 0 exception(s).
[ View ]

That's embarassing. As soon as there's no autocompletion, I get 3 fatals for 3 LoC.

StatusFileSize
new2.37 KB
PASSED: [[SimpleTest]]: [MySQL] 58,725 pass(es).
[ View ]

Damn, I really need some sleep. The interdiff is correct, but this should have been the patch. #8 is identical to #5.

Status:Needs review» Reviewed & tested by the community
Issue tags:+language-config

Status:Reviewed & tested by the community» Needs work
Issue tags:+API addition

Lets create a TypedConfigManagerInterface as we're adding a public method to an object.

Status:Needs work» Needs review
StatusFileSize
new1.96 KB
new3.43 KB
PASSED: [[SimpleTest]]: [MySQL] 58,730 pass(es).
[ View ]

Thanks for the review @alexpott. Here is the interface with Manager update.

StatusFileSize
new496 bytes
new3.45 KB
PASSED: [[SimpleTest]]: [MySQL] 58,583 pass(es).
[ View ]

Minor doc comment update...

Status:Needs review» Reviewed & tested by the community

Yay! Resolves the above concerns :)

Status:Reviewed & tested by the community» Needs work
Issue tags:-API addition, -D8MI, -language-config, -blocker

The last submitted patch, 2097259-has-config-schema-13.patch, failed testing.

Status:Needs work» Needs review
Issue tags:+API addition, +D8MI, +language-config, +blocker

#13: 2097259-has-config-schema-13.patch queued for re-testing.

Status:Needs review» Reviewed & tested by the community

Back to RTBC as per @Gábor Hojtsy at #14

Status:Reviewed & tested by the community» Fixed

Committed and pushed to 8.x. Thanks!

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