Skip to content

Commit 1b76333

Browse files
committed
Restructure the docs
1 parent 7605bef commit 1b76333

File tree

1 file changed

+19
-32
lines changed

1 file changed

+19
-32
lines changed

README.md

Lines changed: 19 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -22,55 +22,42 @@ installing this extension. in your composer.json Change the PHPStan version to `
2222
composer update phpstan/phpstan --with-all-dependencies
2323
```
2424

25-
## Installation
26-
27-
The preferred way of installing `bitexpert/phpstan-magento` is through Composer.
28-
You can add `bitexpert/phpstan-magento` as a dev dependency, as follows:
29-
30-
```
31-
composer.phar require --dev bitexpert/phpstan-magento
32-
```
33-
34-
> Want a full walk-through of the installation & configuration process? Read the blog post at M.academy about [Static Analysis in Magento with PHPStan](https://m.academy/blog/static-analysis-magento-phpstan/).
35-
36-
### PHPStan configuration
37-
38-
If you have not already a PHPStan configuration file `phpstan.neon` in your project, create a new empty file next to your `composer.json` file.
39-
40-
This PHPStan extension needs to be registered with PHPStan so that PHPStan can load it properly.
41-
The easiest way to do this is to install the `phpstan/extension-installer` package as follows:
25+
This PHPStan extension needs to be registered with PHPStan so that the extension gets loaded properly. The easiest way to do this is
26+
to install the `phpstan/extension-installer` package as follows:
4227

4328
```
4429
composer.phar require --dev phpstan/extension-installer
4530
```
4631

47-
If you're using composer >= 2.2.0 you have to allow the execution of composer plugins ([see allow-plugins section](https://getcomposer.org/doc/06-config.md#allow-plugins)) as follows:
32+
<details>
33+
<summary>Composer Allow-PLugins configuration</summary>
34+
35+
If you're using Composer >= 2.2.0 you have to allow the execution of composer plugins ([see allow-plugins section](https://getcomposer.org/doc/06-config.md#allow-plugins)) as follows:
4836

4937
```
5038
- Installing phpstan/extension-installer (1.1.0): Extracting archive
5139
phpstan/extension-installer contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins
5240
Do you trust "phpstan/extension-installer" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] y
5341
```
5442

55-
<details>
56-
<summary>Manual installation</summary>
43+
</details>
44+
45+
## Installation
5746

58-
If you don't want to use `phpstan/extension-installer`, include extension.neon in your project's PHPStan config:
47+
The preferred way of installing `bitexpert/phpstan-magento` is through Composer.
48+
You can add `bitexpert/phpstan-magento` as a dev dependency, as follows:
5949

60-
```neon
61-
includes:
62-
- vendor/bitexpert/phpstan-magento/extension.neon
6350
```
64-
</details>
51+
composer.phar require --dev bitexpert/phpstan-magento
52+
```
6553

66-
If you are using phpstan-magento 0.15.0 and earlier, you need to register the custom autoloader that comes with this extension by adding `vendor/bitexpert/phpstan-magento/autoload.php`
67-
as a bootstrap file. If you are using phpstan-magento > 0.15.0 this step is done automatically by the extension itself.
54+
> Want a full walk-through of the installation & configuration process? Read the blog post at M.academy about [Static Analysis in Magento with PHPStan](https://m.academy/blog/static-analysis-magento-phpstan/).
6855
69-
```neon
70-
parameters:
71-
bootstrapFiles:
72-
- vendor/bitexpert/phpstan-magento/autoload.php
73-
```
56+
### PHPStan configuration
57+
58+
If you have not already a PHPStan configuration file `phpstan.neon` in your project, create a new empty file next to your `composer.json` file.
59+
60+
See [here](https://phpstan.org/config-reference) what options PHPStan allows you to configure.
7461

7562
## Feature overview
7663

0 commit comments

Comments
 (0)