3468881: adding code to check for duplicate component names and warning user and logging
2 open threads
Added code to warn user if duplicate components are found.
Merge request reports
Activity
90 96 throw new DiscoveryException("The $file contains invalid YAML", 0, $e); 91 97 } 92 98 $data[static::FILE_KEY] = $file; 93 $all[$provider][$this->getIdentifier($file, $data)] = $data; 99 $componentid = $this->getIdentifier($file, $data); 100 101 if (isset($duplicates[$componentid])) { 102 $this->messenger()->addWarning('Duplicate component found: ' . $componentid); changed this line in version 2 of the diff
90 96 throw new DiscoveryException("The $file contains invalid YAML", 0, $e); 91 97 } 92 98 $data[static::FILE_KEY] = $file; 93 $all[$provider][$this->getIdentifier($file, $data)] = $data; 99 $componentid = $this->getIdentifier($file, $data); 100 101 if (isset($duplicates[$componentid])) { 102 $this->messenger()->addWarning('Duplicate component found: ' . $componentid); 103 $this->getLogger('YamlDirectoryDiscovery')->warning('Duplicate component found: ' . $componentid); changed this line in version 2 of the diff
added 1 commit
- c7411cb1 - 3468881: adding translation and placeholders to messages
Please register or sign in to reply