We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider this ctor. When I instantiate this class, I don't get suggestions of ro-user or ro-password for $config array (first argument)
Consider this ctor.
When I instantiate this class, I don't get suggestions of ro-user or ro-password for $config array (first argument)
See https://php.watch/versions/8.0/constructor-property-promotion#:~:text=Constructor%20Property%20Promotion%20is%20a%20shorthand%20syntax%20to%20declare%20and,additional%20code%20within%20the%20constructor.
For time being a workaround is to go the pre-php8 way:
private $config; private $adminConfig; /** * @param array{ * user: string, * pass: string, * host: string, * ro-user: string, * ro-pass: string, * ro-host: string, * dbname: string, * } $config * * @param array { * user: string, * pass: string, * } $adminConfig */ public function __construct($config, $adminConfig) { $this->config = $config; $this->adminConfig = $adminConfig; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
See https://php.watch/versions/8.0/constructor-property-promotion#:~:text=Constructor%20Property%20Promotion%20is%20a%20shorthand%20syntax%20to%20declare%20and,additional%20code%20within%20the%20constructor.
For time being a workaround is to go the pre-php8 way:
The text was updated successfully, but these errors were encountered: