kotfire/vscode-php-add-property

Support PHP 7.4 typed properties

Closed this issue ยท 2 comments

It seems that properties carrying type hints cause problems for the Add Existing PHP Property command:

/**
 * @var string
 */
private string $test;

Nothing will be done in this case. It works if you remove the string type hint.

Possibly also caused by this, but this also doesn't work:

private string $test;

The type can be deduced from the property here, if present.

Finally, a configuration option could be added whether or not these types should automatically when using the Add PHP Property command.

Thanks!

Thank you for creating this issue.

I've been working for weeks in a rewrite of the extension to use a PHP parser and reduce the usage of RegExp along with other new features ๐ŸŽ‰

This issue has been fixed there. I don't have a release date yet, it will be a big update and I want to polish a couple of things.

Fixed in v1.0.0