Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Acquia packages & External Library are not supported in composerize process #46

Open
rahulgupta-acquia opened this issue Jun 2, 2022 · 8 comments

Comments

@rahulgupta-acquia
Copy link

rahulgupta-acquia commented Jun 2, 2022

@grasmash

As per analysis & investigation, we identified in Drupal composerize process is not supported for acquia packages & External Library.

For this reason some of the docroot not able to composerize by ra-up process.

FYR - https://github.com/grasmash/composerize-drupal/pull/45/files

@rahulgupta-acquia
Copy link
Author

@grasmash
Copy link
Owner

grasmash commented Jun 2, 2022

That's because drupal/acquia_cms isn't a real project, right?

@grasmash
Copy link
Owner

grasmash commented Jun 2, 2022

You just need to create an exception for acquia packages here: https://github.com/grasmash/composerize-drupal/blob/master/src/Composer/ComposerizeDrupalCommand.php#L176

If it's one of cohesion, cohesion_theme, acquia_cms, lightning, etc., then use an acquia prefix rather than a drupal prefix.

@rahulgupta-acquia
Copy link
Author

@grasmash we have one more case, when other library for ex-

@grasmash
Copy link
Owner

grasmash commented Jun 2, 2022

Same fix either way.

Something like:

<?php
$exceptions = [
  'acquia_cms' => 'acquia/acquia_cms',
  'idfive' => 'idfive/idfive',
];
foreach ($projects as $project_name => $project) {
      if (array_key_exists($project, $exceptions)) {
        $package_name = $exceptions[$project];
      }
      else {
        $package_name = "drupal/$project_name";
      }

@rahulgupta-acquia
Copy link
Author

ok, I need to figure out how many docroots that are failed with external library and need to create PR for this.
Thanks @grasmash for your quick suggestion. 👍

@rahulsonar-acquia
Copy link
Contributor

Is there a way to determine vendor names from drupal config files?

@grasmash
Copy link
Owner

grasmash commented Jun 2, 2022

I don't think so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants