kokororin / vscode-phpfmt

Integrates phpfmt into VS Code
https://marketplace.visualstudio.com/items?itemName=kokororin.vscode-phpfmt
BSD 3-Clause "New" or "Revised" License
129 stars 30 forks source link

Bug: phpfmt `OrganizeClass` Pass Removing PHP Attributes #126

Closed ferhado closed 8 months ago

ferhado commented 8 months ago

Before Formatting

<?php
namespace App\Entity;

use App\Entity\Traits as Traits;
use Doctrine\ORM\Mapping as ORM;
use App\Repository\AddressRepository;

#[ORM\Entity(repositoryClass: AddressRepository::class)]
class Address {
  #[ORM\Id]
  #[ORM\GeneratedValue]
  #[ORM\Column]
  private ?int $id = null;

}

After Formatting

<?php
namespace App\Entity;

use App\Entity\Traits as Traits;
use Doctrine\ORM\Mapping as ORM;
use App\Repository\AddressRepository;

#[ORM\Entity(repositoryClass: AddressRepository::class)]
class Address {
  private ?int $id = null;

}
driade commented 8 months ago

Hi, good night. This should be just fixed.

May you please update phpfmt to the lastest version and confirm?

Thanks.

ferhado commented 8 months ago

Confirmed, issue resolved with the latest update. Thank you