Skip to content

Add core Drupal 8 modules, themes, profiles to core components list #50

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

Closed
wants to merge 3 commits into from

Conversation

hussainweb
Copy link
Contributor

This change adds the list of modules, themes, and profiles from Drupal 8 (specifically
Drupal 8.1.x-dev) to the info file parser. This allows correctly setting version information
if any contrib module lists one of these core components as dependencies with version
constraint.

This change adds the list of modules, themes, and profiles from Drupal 8 (specifically
Drupal 8.1.x-dev) to the info file parser. This allows correctly setting version information
if any contrib module lists one of these core components as dependencies with version
constraint.
@webflo
Copy link
Member

webflo commented Mar 21, 2016

Sorry for the trouble, i tried to keep this list of the version parser for D8 so far. Because we have multiple branches and modules move to core every few month. This means we have to recompile the package definitions for all packages after we change the list.

I added support for 3-digit version constrains in https://github.com/drupal-composer/drupal-parse-composer/pull/49/files

We could add a special case for system module or change the version requirement in migrate_plus and migrate_update. (I looked it up in the database, these are the only to module with this problem).

@hussainweb
Copy link
Contributor Author

Thank you for the quick reply. I understand you have to recompile the package informations.

I don't understand how support for 3 digit version constraints fix this specific issue. Also, these two might be the only modules now but won't there be more soon? I understand that there are new modules going into the core at all times, but it is not very likely that contrib modules would depend on a specific version. I have only included the whole lst of modules for completeness but honestly, I don't think even 10 of these would be used. The most common one used could be system, followed by modules like field, etc...

@webflo
Copy link
Member

webflo commented Mar 21, 2016

Lets reduce the list to system for now. Please extend the test case in InfoFileSpec.php? Thanks!

@hussainweb
Copy link
Contributor Author

@webflo, is this what you meant?

@webflo
Copy link
Member

webflo commented Mar 21, 2016

Looks good.

@@ -64,6 +64,7 @@ function it_understands_operators_in_constraints_in_d8()
$fooInfo = '';
$this->beConstructedWith('foo', $fooInfo, 8);
$this->constraint('foo (>=1.5)')->shouldReturn(['drupal/foo' => '>=8.1.5']);
$this->constraint('system (>=8.1)')->shouldReturn(['drupal/system' => '>=8.1']);
Copy link
Member

Choose a reason for hiding this comment

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

I think the version parser adds .0 to the version constraint. shouldReturn(['drupal/system' => '>=8.1.0']); should work.

@webflo webflo closed this in 30729ed Mar 21, 2016
webflo added a commit to drupal-composer/drupal-packagist that referenced this pull request Mar 21, 2016
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