| Subject | Details |
| :------------- | :---------------------------------------------------------------|
| Rector version | v0.7.1 |
| Installed as | composer dependency |
Running vendor/bin/rector process /var/www/html/app/Http --set solid --only "Rector\SOLID\Rector\ClassMethod\ChangeReadOnlyVariableWithDefaultValueToConstantRector" --dry-run or any rule is changing my code style. This must be new as it was not happening in v0.7.0.
---------- begin diff ----------
--- Original
+++ New
@@ -5,12 +5,11 @@
* UNIT3D Community Edition is open-sourced software licensed under the GNU Affero General Public License v3.0
* The details is bundled with this project in the file LICENSE.txt.
*
- * @project UNIT3D Community Edition
+ * @project UNIT3D Community Edition
*
- * @author HDVinnie <[email protected]>
- * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
+ * @author HDVinnie <[email protected]>
+ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
*/
-
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
----------- end diff -----------
For rector to not change my style specifically when Im running a specified rule that has nothing to do with what changes it is imposing.
https://getrector.org/demo/96d150f2-9b63-4028-b66f-444c6e0c14e2#result
@TomasVotruba , this is actually a problem... I have the same, especially in CI, where I run first Rector and then PHP-CS-Fixer.
So, Rector always fails as it changes the Docblocks in the way described by @HDVinnie , but they are as reformatted by PHPCSFixer.
What happens is this:
On local machine:
Then, on CI
Demo link is just fine. No need for more info
Minimal code causing the issue:
<?php
/**
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/
*/
class DemoFile
{
}
@TomasVotruba when do you plan to actually publish the hot fix since it effects the package as a whole. 0.7.2
I usually do releases in 5-10 days cycles with bunch of more fixes
@TomasVotruba This still appears to be a issue.
https://getrector.org/demo/2832d6f2-3887-4605-88f0-b112ce0e2a80
Please send PR with fixture, similar location as https://github.com/rectorphp/rector/pull/2925/files#diff-d48dc702bd2d58bc17e63877329e8454