Skip to content

Auto-review required dependency matching in composer.json #5538

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

Merged

Conversation

paulbalandan
Copy link
Member

Description
This introduces "auto-review tests". Automate the boring task of self-reviewing your own code through GHA.

In this first iteration, this tests the composer.json in root against in admin/framework to check if the "require" sections are the same.

This needs #5531 to go green.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@kenjis kenjis added the github_actions Pull requests that update Github_actions code label Jan 4, 2022
@kenjis
Copy link
Member

kenjis commented Jan 4, 2022

Good.

There was 1 failure:

1) CodeIgniter\AutoReview\ComposerJsonTest::testFrameworkRequireIsTheSameWithDevRequire
The framework's "require" section is not updated with the main composer.json.
Failed asserting that two arrays are identical.
--- Expected
+++ Actual
@@ @@
     'ext-intl' => '*'
     'ext-json' => '*'
     'ext-mbstring' => '*'
-    'kint-php/kint' => '^4.0'
+    'kint-php/kint' => '^3.3'
     'laminas/laminas-escaper' => '^2.9'
     'psr/log' => '^1.1'
 )

/home/runner/work/CodeIgniter4/CodeIgniter4/tests/AutoReview/ComposerJsonTest.php:35

Copy link
Member

@MGatner MGatner left a comment

Choose a reason for hiding this comment

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

This is great! I'll think about some other things that might fit here.

Is there a compelling reason to group this with the existing Action? I'd be in favor of splitting it out, especially since it covers nothing.

@kenjis
Copy link
Member

kenjis commented Jan 4, 2022

Agree with @MGatner. Making another .yml seems to be better.

And rebase to pass GA, please.

Copy link
Member

@MGatner MGatner left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks @paulbalandan

@paulbalandan paulbalandan merged commit c1fc842 into codeigniter4:develop Jan 5, 2022
@paulbalandan paulbalandan deleted the auto-review-composer branch January 5, 2022 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github_actions Pull requests that update Github_actions code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants