Commit 921abb6b authored by Fran Garcia-Linares's avatar Fran Garcia-Linares Committed by Tim Plunkett
Browse files

Issue #3296250 by fjgarlin, tedbow, bnjmnm: machine_name field might not match...

Issue #3296250 by fjgarlin, tedbow, bnjmnm: machine_name field might not match the composer require namespace
parent 08ec2614
Loading
Loading
Loading
Loading
+1 −0
Changes for modules/project_browser_devel/src/Plugin/ProjectBrowserSource/RandomDataPlugin.php: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -163,6 +163,7 @@ class RandomDataPlugin extends ProjectBrowserSourceBase implements ContainerFact
        'field_module_categories' => [$categories[$category]],
        'field_security_advisory_coverage' => $security_values[$security]['id'],
        'field_project_machine_name' => $machine_name,
        'composer_namespace' => 'random/' . $machine_name,
        'is_compatible' => (bool) ($i % 4),
        'project_usage' => [],
        'project_usage_total' => rand(0, 100000),
+1 −0
Changes for src/Plugin/ProjectBrowserSource/MockDrupalDotOrg.php: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -429,6 +429,7 @@ class MockDrupalDotOrg extends ProjectBrowserSourceBase implements ContainerFact
        $project['is_active'] = $this->projectIsActive($project);
        $project['is_maintained'] = $this->projectIsMaintained($project);
        $project['warnings'] = $this->getWarnings($project);
        $project['composer_namespace'] = 'drupal/' . $project['field_project_machine_name'];

        $returned_list[] = new Project($project);
      }
+8 −0
Changes for src/ProjectBrowser/Project.php: 8 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ class Project implements ProjectInterface {
      $this->setIsCovered($project['is_covered']);
      $this->setIsMaintained($project['is_maintained']);
      $this->setIsCompatible($project['is_compatible']);
      $this->setComposerNamespace($project['composer_namespace']);
      if (isset($project['warnings'])) {
        $this->setWarnings($project['warnings']);
      }
@@ -145,6 +146,13 @@ class Project implements ProjectInterface {
    $this->field_project_machine_name = $machine_name;
  }

  /**
   * {@inheritdoc}
   */
  public function setComposerNamespace(string $composer_namespace) {
    $this->composer_namespace = $composer_namespace;
  }

  /**
   * {@inheritdoc}
   */
+6 −1
Changes for src/ProjectBrowser/ProjectInterface.php: 6 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -48,10 +48,15 @@ interface ProjectInterface {
  public function setMaintenanceStatus($maintenance_status);

  /**
   * Project machine name, formatted as if for `composer require`.
   * Project machine name.
   */
  public function setMachineName(string $machine_name);

  /**
   * Composer namespace.
   */
  public function setComposerNamespace(string $composer_namespace);

  /**
   * Images associated with the project. Logo should be the first one.
   */
+0 −0

File changed.

Preview suppressed by a .gitattributes entry or the file's encoding is unsupported.

Loading