Skip to content

[ci] fix blocked plugins #1145

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 8 commits into from
Closed

[ci] fix blocked plugins #1145

wants to merge 8 commits into from

Conversation

jrushlow
Copy link
Collaborator

@jrushlow jrushlow commented Jul 5, 2022

Ref'd in composer/composer#10925

Since Composer 2.3.9 unless you explicitly allow/disallow a plugin (flex in our case), an error is thrown (halts our CI run) before any tests are actually ran.

@jrushlow jrushlow added Status: Needs Work Additional work is needed Minor Minor Enhancement labels Jul 5, 2022
@jrushlow jrushlow changed the title WIP - [ci] fix blocked plugins [ci] fix blocked plugins Jul 5, 2022
@jrushlow jrushlow added Status: Needs Review Needs to be reviewed and removed Status: Needs Work Additional work is needed labels Jul 5, 2022
@@ -135,6 +135,9 @@ jobs:
- name: "Add PHPUnit matcher"
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- name: "No Plugins"
run: composer global config --no-plugins allow-plugins.symfony/flex false
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 we DO want Flex enabled - iirc, we install it to get a performance boost.

@Seldaek
Copy link
Member

Seldaek commented Jul 5, 2022

Note the allow-plugins could simply always be in composer.json. And the flex require could also perhaps be in require-dev always but maybe not, not sure why you add it dynamically, I'll leave that up to you :)

@jrushlow
Copy link
Collaborator Author

jrushlow commented Jul 5, 2022

Thanks Jordi - as it turns out we don't need to require flex anymore. This was actually an artifact from the old TravisCI days where doing a global require flex provided a perf boost in CI.

Just for reference in the future; if we were to explicitly add flex, or any other package, to our allow-plugins in composer.json, would this mean that when a user added our package to their composer project - the plugins that we allowed here would be inherited and in their allow list? Or would they also have to explicitly add flex (or xyz package) to their allow-plugins as well?

Not sure if that makes sense. Either way glad we could help identify a bug on your end and remove some legacy config on our end.

@Seldaek
Copy link
Member

Seldaek commented Jul 5, 2022

No every project is fully in charge of which plug-ins are run to ensure a dependency can't sneak one on you.

weaverryan added a commit that referenced this pull request Jul 11, 2022
…shlow)

This PR was squashed before being merged into the 1.0-dev branch.

Discussion
----------

[ci] we do not need to install flex globally anymore

This is a better solution than #1145

Commits
-------

6f7cb4f [ci] we do not need to install flex globally anymore
@jrushlow jrushlow deleted the ci/plugins branch July 20, 2022 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Minor Minor Enhancement Status: Needs Review Needs to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants