* Fix phpstan workflow file
# Fix phpstan workflow file
Line was split in two, joined
* qual: set memory limit to 'unlimited' (-1)
* Remove some stubs to check impact
* Fix: Verify execution time limit
* Remove stub files to reuse cache
* Qual: Rename distribution phpstan.neon to phpstan.neon.dist
# Qual: Rename distribution phpstan.neon to phpstan.neon.dist
This allows the developer to override some settings locally
Also update the .gitignore file with phpstan.neon and some other other
ignores (cache, local log files, temporary edit files).
* Enable debug on phpstan
* Re-enable stubs
* Fix: Change parallel settings to defaults, remove buffer
'buffer' is not a documented parameter, removing it.
Removing some configuration settings as the defaults are higher and
should adapt better to the target machine
# Qual: Improve caching for phpstan
The phpstan step does not seem to always choose the best cache.
This configuration update adds the target branch to the restore
feature.
Maybe it is more selective and better.
# Qual: Optimize/explain workflows
phpstan checkout took about 1.5 minutes, while pre-commit only takes 10s.
So I removed the option to the checkout option which likely makes
the difference.
I removed the IMHO useless step of installing node - it may have been
useful during setting up the workflow, but not now.
I commented on the pre-commit workflow.
The PHPStan steps run a long time for the latest runs and I suspect that
this may be because of a bad cache, possibly includeing:
```
Result cache was not saved because of non-ignorable exception: Syntax error, unexpected } on line 378
``` .
This change should only save the cache if the run was successful or if no cache
was loaded. The possibly preserves a cache that still reduces the run time.
For instance, the following got an empty cache, saved at 2024-01-19T21:28:22.18Z.
- https://github.com/Dolibarr/dolibarr/actions/runs/7589384926
That was an aborted run:
- https://github.com/Dolibarr/dolibarr/actions/runs/7589372703/job/20673878193
So I added `cancelled()` to avoid overwriting valid cache and phpstan cache
will only be written if the outcome was success or if the cache could not
be loaded before.
I also updated the version for the cache action.