Skip to content

Commit

Permalink
Restructured the docs a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
weirdan committed Feb 26, 2024
1 parent b2d5826 commit adf22dc
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 14 deletions.
1 change: 1 addition & 0 deletions docs/contributing/index.md
Expand Up @@ -30,6 +30,7 @@ Lastly, working to improve static analysis tools will also make you a better PHP

* [Editing callmaps](editing_callmaps.md)
* [Adding a new issue type](adding_issues.md)
* [Packaging Psalm](packaging.md)

## Pull Requests

Expand Down
19 changes: 19 additions & 0 deletions docs/contributing/packaging.md
@@ -0,0 +1,19 @@
## Using a Snapshot Build

To obtain the latest development version of Psalm, a snapshot build can be
downloaded from GitHub at https://github.com/vimeo/psalm/archive/refs/heads/5.x.zip

Snapshot builds typically include only the source code and exclude the `.git`
directory. As a result, Psalm cannot automatically determine its version or
revision when executing `composer install`, since this information is usually
derived from the `git` repository metadata that Composer relies on.

To successfully install Psalm from a snapshot build, it is necessary to
manually specify the version using the `COMPOSER_ROOT_VERSION` environment
variable. This allows Composer to proceed with the installation of Psalm.

The command to do so is as follows:

```bash
COMPOSER_ROOT_VERSION=5.x-dev composer install
```
23 changes: 9 additions & 14 deletions docs/running_psalm/installation.md
Expand Up @@ -51,28 +51,23 @@ Alternatively, you can use Composer to install the Phar:
```bash
composer require --dev psalm/phar
```
# Alternative Installation Methods

## Using a Snapshot Build
The following methods are known to work for some users, but are **not** officially supported.

To obtain the latest development version of Psalm, a snapshot build can be
downloaded from GitHub at https://github.com/vimeo/psalm/archive/refs/heads/5.x.zip
## Installing with `composer` globally

Snapshot builds typically include only the source code and exclude the `.git`
directory. As a result, Psalm cannot automatically determine its version or
revision when executing `composer install`, since this information is usually
derived from the `git` repository metadata that Composer relies on.

To successfully install Psalm from a snapshot build, it is necessary to
manually specify the version using the `COMPOSER_ROOT_VERSION` environment
variable. This allows Composer to proceed with the installation of Psalm.
```bash
composer global require vimeo/psalm
```

The command to do so is as follows:
## Installing with `phive`

```bash
COMPOSER_ROOT_VERSION=5-dev composer install
phive install psalm
```

## Installing Psalm on Linux
## Installing Psalm on Linux using a package manager

Psalm is available across various Linux distributions, each typically equipped
with its own package management system. To install Psalm, refer to the
Expand Down

0 comments on commit adf22dc

Please sign in to comment.