Add Rector in archive creation
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)
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
@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.
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.