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

Group as dev dependency #290

Closed
millnut opened this issue Oct 2, 2023 · 11 comments · Fixed by #291
Closed

Group as dev dependency #290

millnut opened this issue Oct 2, 2023 · 11 comments · Fixed by #291

Comments

@millnut
Copy link
Member

millnut commented Oct 2, 2023

I think drupal/group now needs adding as a dev dependency so tests can run see failures here https://github.com/localgovdrupal/localgov_project/actions/runs/6316343354/job/17318874731

I believe that is how drupal/scheduled_transitions is handled in https://github.com/localgovdrupal/localgov_alert_banner/blob/1.x/composer.json for the same reasons

@finnlewis, @Adnan-cds, @andybroomfield on thoughts on this?

@andybroomfield
Copy link
Contributor

Sounds like a good idea.
Same for localgovdrupal/localgov_core for the full screen alert banner (although that one does not have tests yet!)

@andybroomfield
Copy link
Contributor

Question is, which version of Group?

Screenshot 2023-10-02 at 4 09 21 pm

@millnut
Copy link
Member Author

millnut commented Oct 2, 2023

@andybroomfield this is where it will get complex as microsites uses 3, @Adnan-cds what version of Group is the submodule compatible with?

If it's not targeting a specific version we can probably do;

"drupal/group": "^2 || ^3",

@millnut
Copy link
Member Author

millnut commented Oct 2, 2023

Hmm it also requires localgov_microsites_group which could get complex quickly. Adding @stephen-cox here for his thoughts?

It is starting to feel that this submodule should exist as its own module or a submodule within localgov_microsites_group that is dependent on localgov_microsites_group and localgov_alert_banner not as a submodule within localgov_alert_banner

@andybroomfield
Copy link
Contributor

@millnut I don't see localgov_microsites_group as a test dependency here , and thats the only test.

I think the sub module can be used as a generic group plugin, there are just some extra (optional?) config that gets installed on microsites. If group 3 is the what microsites uses it makes sense thats what we target.

andybroomfield added a commit that referenced this issue Oct 2, 2023
Fix #290 

Set group v3 as a dev dependancy.
andybroomfield added a commit that referenced this issue Oct 2, 2023
Fix #290

Set group v3 as a dev dependancy.
@millnut
Copy link
Member Author

millnut commented Oct 2, 2023

@andybroomfield sorry that was my bad, it was flagging as it couldn't work out the class due to microsites_group missing when the localgov_alert_banner is checked in PHPStan as part of the main project; I'll add some ignores around that

@Adnan-cds
Copy link
Contributor

This snippet from the Github test runner should have taken care of this issue. Not sure why it didn't. Anyway, having drupal/groups:^3 as a dev dependency is not a bad idea.

I can confirm that there is no dependency on localgov_microsites_group.

@millnut
Copy link
Member Author

millnut commented Oct 3, 2023

Hi @Adnan-cds the localgov_microsites_group dependency I’m seeing here for the helper https://github.com/localgovdrupal/localgov_alert_banner/blob/1.x/modules/group_alert_banner/group_alert_banner.module#L55. cc: @andybroomfield

@millnut millnut reopened this Oct 3, 2023
@Adnan-cds
Copy link
Contributor

That's right. The relevant function is a hook implementation. It is triggered only if the localgov_microsites_group module is available and ignored otherwise.

@millnut
Copy link
Member Author

millnut commented Oct 3, 2023

Great thanks for clarifying @Adnan-cds I now have a better understanding of how that works now.

@millnut millnut closed this as completed Oct 3, 2023
@Adnan-cds
Copy link
Contributor

No problem.

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 a pull request may close this issue.

3 participants