Skip to content
Snippets Groups Projects

3468881: adding code to check for duplicate component names and warning user and logging

Added code to warn user if duplicate components are found.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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);
  • 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);
  • Mark Colebank added 1 commit

    added 1 commit

    • c7411cb1 - 3468881: adding translation and placeholders to messages

    Compare with previous version

  • Please register or sign in to reply
    Loading