This commit adds a call to the command 'codecept build' before running
PHPStan checks inside the command './do qa:phpstan'. This is needed to
make sure that the PHPStan checks don't fail with the error bellow
because of missing test support files that are autogenerated by
Codeception:
```
Bootstrap file tests/_support/_generated/AcceptanceTesterActions.php does not exist.
```
[MAILPOET-3552]
This change is necessary to make sure we are running PHPCS with the same
parameters in both CircleCI and the pre-commit hook. For more
information see the description of the related Jira ticket.
[MAILPOET-3831]
We need to share the same output path (assets/build/js) in more configs
in order to generate a common manifest.json file.
The cleanup plugin and also build-in output.clean setting do the cleanup on emit
and that causes that they delete files we want to keep.
Using different output paths solves the problem with cleanup but it causes that we generate a bunch of manifest.json files
instead of one.
As simplest workaround I chose cleaning the output directory before we trigger the Webpack build in the Robofile.
[MAILPOET-3214]
This commit moves the definition of the supported PHP versions from
RoboFile.php file to the PHPCS configuration file, ruleset.xml. This
should make it easier to configure PHPCS in other places like the IDE.
I also removed the constraint of the highest supported PHP version
(previously, it was hard-coded to 8.0) as I believe we support new PHP
versions as soon as they are released. With this change, we don't need to
remember to update testVersion tag whenever there is a new PHP version.
[MAILPOET-3439]
This commit adds PHPCS checks, using `./do qa:code-sniffer`, to the
pre-commit hook. To be able to do this, I had to modify `./do
qa:code-sniffer` to call PHPCS only once and change its signature to
accept an optional parameters with the list of files to check. If this
parameter is not passed, all files are checked.
As discussed with the rest of the team, before we were calling PHPCS
multiple times to be able to check for compatibility with different
versions of PHP, but as far as we can tell this is not necessary, and we
can check for compatibility with PHP >= 7.1 for all files.
As far as I know, changing the signature of RoboFile::qaCodeSniffer() is
not a problem and I updated the only instance where this method is
called.
[MAILPOET-3439]
Premium should have the same minor version like free when is released.
Free will be released only with a patch version when premium branch
doesn't exist.
We assume that premium isn't released when branch doesn't exist.
[MAILPOET-3152]