Skip to content

Real composer patches format #48

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

szeidler
Copy link

Here's my initial work on making drupal_tests compatible with the correct composer-patches format, like reported in #47 .

Includes changes:

  • Use the proper composer-patches format
  • Look for any inline patches in the composer.json of the module
  • Look for external patch files defined by patches-file in the module
  • Fallback check for an existing patches.json like it was before, no matter if it was defined in the module's composer.json

I added a test module repository at https://github.com/szeidler/drupal_tests_composer_patches . CircleCI: https://circleci.com/gh/szeidler/drupal_tests_composer_patches

I'm looking forward for your feedback.


// Use the old patch file standard in drupal_tests, which was independent
// from any module composer.json patch specifications.
$patches_file = 'patches.json';
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 for this, we can remove it when Drupal 8.7 or 8.8 is out.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please take care. It follows only the default file name convention, not the old format. If the old/wrong composer patches format should be supported, we would need a different processing here.

}
}
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing newline here.

@deviantintegral
Copy link
Owner

  • circleci config validate
    Error: Error parsing config file: yaml: line 9: mapping values are not allowed in this context

Not sure why this failed, as you haven't touched this file. I'll take a look.

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

Successfully merging this pull request may close these issues.

2 participants