reusable-workflows icon indicating copy to clipboard operation
reusable-workflows copied to clipboard

Add Rector in archive creation

Open AlexP11223 opened this issue 1 year ago • 2 comments

Please check if the PR fulfills these requirements

  • [x] Docs have been added/updated (for bug fixes/features)

What kind of change does this PR introduce?

feature

Now the package creation workflow also runs Rector if the config is present. This was needed for researching PHP 8 transpiling into PHP 7.4, but also can be useful for other tasks.

Increased the timeout to 10 minutes because sometimes it takes a bit more than 5 minutes. (Rector takes around 40 seconds in the WL project)

AlexP11223 avatar Jul 03 '24 07:07 AlexP11223

There are other PRs with workflows for testing the archive. :) (+ hopefully Playwright in the future)

For transpiling the idea is that we use the latest PHP for development, and then transform into 7.4 for release. https://inpsyde.atlassian.net/browse/PROD-171?focusedCommentId=298937

AlexP11223 avatar Jul 15 '24 06:07 AlexP11223

@Chrico

So you build a release on something untested?

This here is a build/packaging workflow, not a release workflow. The produced builds are a prerequisite for further (automated&manual) testing by QA.

Biont avatar Jul 23 '24 11:07 Biont

the addition of Rector to the reusable workflows can only be temporary until all products require modern PHP versions natively, IMO.

I think products will never use only the latest version unless something greatly changes in the WP/PHP world. We will probably still need to support PHP 8 when PHP 9 will be available for years because many merchants are slow to upgrade.

Also Rector is quite generic tool, it just transforms the code via AST using the specified rules, so maybe we find some other use cases for it.

AlexP11223 avatar Sep 03 '24 12:09 AlexP11223