vscode-php-getters-setters icon indicating copy to clipboard operation
vscode-php-getters-setters copied to clipboard

Doenst work anymore on new version of Vscode

Open VincentVanWijk opened this issue 6 years ago • 13 comments

When i try to generate getters and setters i always get the following notification:

phpGettersSetters error: No property found. Please select a property to use this extension. image

This happens since installing new version of vscode (currently 1.30.2)

image

VincentVanWijk avatar Jan 10 '19 14:01 VincentVanWijk

I am not sure, but I guess this project is not supported anymore.

I opened #16 last year and haven't heard back from @phproberto

marabesi avatar Feb 21 '19 21:02 marabesi

any update @phproberto

command 'phpGettersSetters.insertGetterAndSetter' not found

I'm Using

Version 1.32.2 (1.32.2)

cesarmtz93 avatar Mar 14 '19 05:03 cesarmtz93

This is weird it worked for me before the latest update, so like a few weeks back... but now I get the same error. 1.33.1

command 'phpGettersSetters.insertGetterAndSetter' not found

icemouton avatar May 09 '19 19:05 icemouton

Still getting this error too, I have worked around this, using an old version.

1 go to extensions 2 right click the extension 3 install another version 4 choose a version & reload

ikdekker avatar Jun 27 '19 12:06 ikdekker

na versão 1.2.3 tudo está funcionando. Quero prestar uma observação para outro erro chamado 'phpGettersSetters error: Unable to detect insert line for template.' Ele significa que falta relacionar a propriedade à uma classe, basta criar uma classe e usar a funcionalidade getter/setter.

Capitaoneo3 avatar Jul 09 '19 03:07 Capitaoneo3

I have VSCode recently installed on my Ubuntu 18.04 LTS and I have the same problem the same error phpGettersSetters error: No property found. Please select a property to use this extension.. I tried to reinstall using other versions, but error continues.

RafaelSLopes avatar Jan 23 '20 21:01 RafaelSLopes

I discovered the reason: I have to select only the variable. I was selecting all the variables and having the getters and setters generated. Example (selecting all variables):

private $id;
private $firstName;
private $lastName;

RafaelSLopes avatar Jan 23 '20 21:01 RafaelSLopes

Hi, it stopped working again in a new version of VSCode:

Version: 1.42.0 (user setup) Commit: ae08d5460b5a45169385ff3fd44208f431992451 Date: 2020-02-06T10:51:34.058Z Electron: 6.1.6 Chrome: 76.0.3809.146 Node.js: 12.4.0 V8: 7.6.303.31-electron.0 OS: Windows_NT x64 10.0.16299

Dimonka2 avatar Feb 12 '20 09:02 Dimonka2

mesmo problema aqui, última versão do vscode

tdias25 avatar Feb 16 '20 13:02 tdias25

I discovered the reason: I have to select only the variable. I was selecting all the variables and having the getters and setters generated. Example (selecting all variables):

private $id;
private $firstName;
private $lastName;

I discovered the reason: I have to select only the variable. I was selecting all the variables and having the getters and setters generated. Example (selecting all variables):

private $id;
private $firstName;
private $lastName;

thats right!!!

jeremy511 avatar May 29 '20 03:05 jeremy511

Tip to fix problem: restart your vscode and try again!

vscode version: 1.46.0

lucasinaciodev avatar Jun 13 '20 20:06 lucasinaciodev

Select only one variable and run getter & setter, example:

class User
{
     public $firstName;
     public **$lastName**;
     public $age;
     public $email;
}

run getter e setter on $lastName

class User
{
    public $firstName;
    public $lastName;
    public $age;
    public $email;

    /**
     * Get the value of lastName
     */ 
    public function getLastName()
    {
        return $this->lastName;
    }

    /**
     * Set the value of lastName
     *
     * @return  self
     */ 
    public function setLastName($lastName)
    {
        $this->lastName = $lastName;

        return $this;
    }
}

LeandroSantosGit avatar Sep 12 '20 14:09 LeandroSantosGit

I am still seeing the same issue . I have even tried the older versions still no use

dj1095 avatar Nov 04 '22 15:11 dj1095