About Features Downloads Getting Started Documentation Events Support GitHub

Love VuFind®? Consider becoming a financial supporter. Your support helps build a better VuFind®!

Site Tools


Warning: This page has not been updated in over over a year and may be outdated or deprecated.
development:recommended_tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
development:recommended_tools [2021/04/13 05:50] – [Tests] emaijaladevelopment:recommended_tools [2021/04/13 11:23] demiankatz
Line 24: Line 24:
 The VuFind project includes [[development:testing:unit_tests|unit tests]] and automated code style checks designed to insure the consistency and integrity of the code. Whenever a Git commit is made or a GitHub pull request is opened, [[development:testing:continuous_integration|continuous integration]] processes run to validate the changes, and alerts will be thrown if anything breaks. The VuFind project includes [[development:testing:unit_tests|unit tests]] and automated code style checks designed to insure the consistency and integrity of the code. Whenever a Git commit is made or a GitHub pull request is opened, [[development:testing:continuous_integration|continuous integration]] processes run to validate the changes, and alerts will be thrown if anything breaks.
  
-==== Tests ==== +==== Checking Everything ====
- +
-The [[development:testing:unit_tests|unit tests]] page talks about how to run tests locally.+
  
-To quickly check the tests that are run e.g. when a pull request is submittedtry the following command:+While you can open a pull request and check for problems after the fact through GitHub's interface, it is also possible to run checks prior to submissionwhich may save you some time. To run all the tests and code quality checks locally, run the following command from your VuFind home directory:
  
 <code> <code>
 vendor/bin/phing eslint jshint phpunitfast phpcs-console php-cs-fixer-dryrun checkLessToSass phpstan-console vendor/bin/phing eslint jshint phpunitfast phpcs-console php-cs-fixer-dryrun checkLessToSass phpstan-console
 </code> </code>
 +
 +==== Tests ====
 +
 +The [[development:testing:unit_tests|unit tests]] page talks about how to run tests locally.
  
 ==== Style ==== ==== Style ====
Line 63: Line 65:
  
 If you are unwilling or unable to run these tools locally, note that if you open a pull request against the [[https://github.com/vufind-org/vufind|main VuFind repo]], they will be automatically run by [[development:testing:continuous_integration|continuous integration]] and you can view a list of issues in the resulting Travis report. Before you spend time manually fixing anything, you can post a comment on the pull request to ask for assistance with running the automatic processes. If you are unwilling or unable to run these tools locally, note that if you open a pull request against the [[https://github.com/vufind-org/vufind|main VuFind repo]], they will be automatically run by [[development:testing:continuous_integration|continuous integration]] and you can view a list of issues in the resulting Travis report. Before you spend time manually fixing anything, you can post a comment on the pull request to ask for assistance with running the automatic processes.
 +
 +==== Static Analysis ====
 +
 +VuFind uses [[https://phpstan.org/|PHPStan]] for static code analysis; it helps detect common programming errors like incorrect types, unused variables, etc. Paying attention to PHPStan reports can help you write better-quality code and avoid subtle bugs. To run a PHPStan test, you can use this command:
 +
 +<code>
 +vendor/bin/phing phpstan-console
 +</code>
 ---- struct data ---- ---- struct data ----
 ---- ----
  
development/recommended_tools.txt · Last modified: 2023/10/20 12:02 by demiankatz