You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<strong>Persian Successor (v3.67.0)</strong> edition
30
+
<strong>Persian Successor (v3.67.1)</strong> edition
31
31
</h1>
32
32
</div>
33
33
</div>
@@ -60,7 +60,7 @@ <h2>No config<a class="headerlink" href="#no-config" title="Permalink to this he
60
60
</div>
61
61
<p>It is also possible to provide command line options to customize rules, yet instead of using them,
62
62
it’s recommended to save the project configuration in a <codeclass="docutils literal notranslate"><spanclass="pre">.php-cs-fixer.dist.php</span></code> file in the root directory of your project.
63
-
The file must return an instance of <aclass="reference external" href="https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/v3.67.0/src/ConfigInterface.php">PhpCsFixer\ConfigInterface</a>
63
+
The file must return an instance of <aclass="reference external" href="https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/v3.67.1/src/ConfigInterface.php">PhpCsFixer\ConfigInterface</a>
64
64
which lets you configure the rules, the files and directories that
65
65
need to be analyzed. You may also create <codeclass="docutils literal notranslate"><spanclass="pre">.php-cs-fixer.php</span></code> file, which is
66
66
the local configuration that will be used instead of the project configuration. It
<p>There are several interfaces that your fixers can also implement if needed:</p>
80
80
<ulclass="simple">
81
-
<li><p><aclass="reference external" href="https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/v3.67.0/src/Fixer/WhitespacesAwareFixerInterface.php">PhpCsFixer\Fixer\WhitespacesAwareFixerInterface</a>: for fixers that need to know the configured indentation and line endings;</p></li>
82
-
<li><p><aclass="reference external" href="https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/v3.67.0/src/Fixer/ConfigurableFixerInterface.php">PhpCsFixer\Fixer\ConfigurableFixerInterface</a>: to create a configurable fixer;</p></li>
83
-
<li><p><aclass="reference external" href="https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/v3.67.0/src/Fixer/DeprecatedFixerInterface.php">PhpCsFixer\Fixer\DeprecatedFixerInterface</a>: to deprecate a fixer.</p></li>
81
+
<li><p><aclass="reference external" href="https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/v3.67.1/src/Fixer/WhitespacesAwareFixerInterface.php">PhpCsFixer\Fixer\WhitespacesAwareFixerInterface</a>: for fixers that need to know the configured indentation and line endings;</p></li>
82
+
<li><p><aclass="reference external" href="https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/v3.67.1/src/Fixer/ConfigurableFixerInterface.php">PhpCsFixer\Fixer\ConfigurableFixerInterface</a>: to create a configurable fixer;</p></li>
83
+
<li><p><aclass="reference external" href="https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/v3.67.1/src/Fixer/DeprecatedFixerInterface.php">PhpCsFixer\Fixer\DeprecatedFixerInterface</a>: to deprecate a fixer.</p></li>
<strong>Persian Successor (v3.67.0)</strong> edition
30
+
<strong>Persian Successor (v3.67.1)</strong> edition
31
31
</h1>
32
32
</div>
33
33
</div>
@@ -52,65 +52,61 @@ <h1 class="title_header">
52
52
53
53
<sectionid="installation">
54
54
<h1>Installation<aclass="headerlink" href="#installation" title="Permalink to this heading">¶</a></h1>
55
-
<sectionid="requirements">
56
-
<h2>Requirements<aclass="headerlink" href="#requirements" title="Permalink to this heading">¶</a></h2>
55
+
<p>When developing on multiple projects or with team of developers, it is highly recommended to install PHP CS Fixer as direct dependency per project and not globally on your machine.
56
+
This will ensure each team member is using version of the tool expected by given project.</p>
57
57
<p>PHP needs to be a minimum version of PHP 7.4.</p>
58
-
</section>
59
-
<sectionid="id1">
60
-
<h2>Installation<aclass="headerlink" href="#id1" title="Permalink to this heading">¶</a></h2>
61
-
<sectionid="locally">
62
-
<h3>Locally<aclass="headerlink" href="#locally" title="Permalink to this heading">¶</a></h3>
63
-
<p>Download the <aclass="reference external" href="https://cs.symfony.com/download/php-cs-fixer-v3.phar">php-cs-fixer.phar</a> file and store it somewhere on your computer.</p>
64
-
</section>
65
-
<sectionid="globally-manual">
66
-
<h3>Globally (manual)<aclass="headerlink" href="#globally-manual" title="Permalink to this heading">¶</a></h3>
67
-
<p>You can run these commands to easily access latest <codeclass="docutils literal notranslate"><spanclass="pre">php-cs-fixer</span></code> from anywhere on
<h2>Composer<aclass="headerlink" href="#composer" title="Permalink to this heading">¶</a></h2>
60
+
<sectionid="fresh-installation">
61
+
<h3>Fresh installation<aclass="headerlink" href="#fresh-installation" title="Permalink to this heading">¶</a></h3>
62
+
<p>To install PHP CS Fixer, <aclass="reference external" href="https://getcomposer.org/download/">install Composer</a> and issue the following command:</p>
<p>Then, just run <codeclass="docutils literal notranslate"><spanclass="pre">php-cs-fixer</span></code>.</p>
86
76
</section>
87
-
<sectionid="globally-composer">
88
-
<h3>Globally (Composer)<aclass="headerlink" href="#globally-composer" title="Permalink to this heading">¶</a></h3>
89
-
<p>To install PHP CS Fixer, <aclass="reference external" href="https://getcomposer.org/download/">install Composer</a> and issue the following command:</p>
90
-
<divclass="highlight-console notranslate"><divclass="highlight"><pre><span></span><spanclass="go">composer global require friendsofphp/php-cs-fixer</span>
77
+
</section>
78
+
<sectionid="docker">
79
+
<h2>Docker<aclass="headerlink" href="#docker" title="Permalink to this heading">¶</a></h2>
80
+
<p>You can use pre-built Docker images to run <codeclass="docutils literal notranslate"><spanclass="pre">php-cs-fixer</span></code>.</p>
81
+
<divclass="highlight-console notranslate"><divclass="highlight"><pre><span></span><spanclass="go">docker run -it --rm -v $(pwd):/code ghcr.io/php-cs-fixer/php-cs-fixer:${FIXER_VERSION:-3-php8.3} fix src</span>
91
82
</pre></div>
92
83
</div>
93
-
<p>Then make sure you have the global Composer binaries directory in your <codeclass="docutils literal notranslate"><spanclass="pre">PATH</span></code>. This directory is platform-dependent, see <aclass="reference external" href="https://getcomposer.org/doc/03-cli.md#composer-home">Composer documentation</a> for details. Example for some Unix systems:</p>
<p><codeclass="docutils literal notranslate"><spanclass="pre">$FIXER_VERSION</span></code> used in example above is an identifier of a release you want to use, which is based on Fixer and PHP versions combined. There are different tags for each Fixer’s SemVer level and PHP version with syntax <codeclass="docutils literal notranslate"><spanclass="pre"><php-cs-fixer-version>-php<php-version></span></code>. For example:</p>
<h3>Locally (PHIVE)<aclass="headerlink" href="#locally-phive" title="Permalink to this heading">¶</a></h3>
106
-
<p>Install <aclass="reference external" href="https://phar.io">PHIVE</a> and issue the following command:</p>
107
-
<divclass="highlight-console notranslate"><divclass="highlight"><pre><span></span><spanclass="go">phive install php-cs-fixer # use `--global` for global install</span>
108
-
</pre></div>
109
-
</div>
110
106
</section>
111
107
<sectionid="github-action-docker">
112
-
<h3>GitHub Action (Docker)<aclass="headerlink" href="#github-action-docker" title="Permalink to this heading">¶</a></h3>
113
-
<p>To integrate php-cs-fixer as check into a GitHub Action step, you can use a configuration like this:</p>
108
+
<h2>GitHub Action (Docker)<aclass="headerlink" href="#github-action-docker" title="Permalink to this heading">¶</a></h2>
109
+
<p>To integrate PHP CS Fixer as check into a GitHub Action step, you can use a configuration like this:</p>
<h3>Globally (Composer)<aclass="headerlink" href="#id4" title="Permalink to this heading">¶</a></h3>
152
-
<p>You can update <codeclass="docutils literal notranslate"><spanclass="pre">php-cs-fixer</span></code> through this command:</p>
153
-
<divclass="highlight-console notranslate"><divclass="highlight"><pre><span></span><spanclass="go">./composer.phar global update friendsofphp/php-cs-fixer</span>
144
+
</section>
145
+
<sectionid="manual-binary-download">
146
+
<h2>Manual binary download<aclass="headerlink" href="#manual-binary-download" title="Permalink to this heading">¶</a></h2>
147
+
<p>It is also possible to download the <aclass="reference external" href="https://cs.symfony.com/download/php-cs-fixer-v3.phar">php-cs-fixer.phar</a> file and store it somewhere on your computer.</p>
148
+
<sectionid="id6">
149
+
<h3>Fresh installation<aclass="headerlink" href="#id6" title="Permalink to this heading">¶</a></h3>
150
+
<p>To do that, you can run these commands to easily access latest <codeclass="docutils literal notranslate"><spanclass="pre">php-cs-fixer</span></code> from anywhere on
0 commit comments