Skip to content
New issue

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

Deprecation warnings on ReflectionClass conctructor while generating Meta #1371

Closed
zlodes opened this issue Aug 31, 2022 · 1 comment
Closed
Labels

Comments

@zlodes
Copy link

zlodes commented Aug 31, 2022

Versions:

  • ide-helper Version: 2.12.3
  • Laravel Version: 9.27.0
  • PHP Version: 8.1.2

Description:

[2022-08-31 10:50:54] local.WARNING: 
ReflectionClass::__construct(): Passing null to parameter #1 ($objectOrClass) of type object|string is deprecated in /path/to/project/vendor/barryvdh/laravel-ide-helper/src/Console/MetaCommand.php on line 98   

[2022-08-31 10:50:54] local.WARNING: 
ReflectionClass::__construct(): Passing null to parameter #1 ($objectOrClass) of type object|string is deprecated in /path/to/project/vendor/barryvdh/laravel-ide-helper/src/Console/MetaCommand.php on line 98  

ReflectionClass::__construct signature from PHPStorm stubs:

/**
 * Constructs a ReflectionClass
 *
 * @link https://php.net/manual/en/reflectionclass.construct.php
 * @param class-string<T>|T $objectOrClass Either a string containing the name of
 * the class to reflect, or an object.
 * @throws ReflectionException if the class does not exist.
 */
public function __construct(#[LanguageLevelTypeAware(['8.0' => 'object|string'], default: '')] $objectOrClass) {}

Steps To Reproduce:

  1. Enable Laravel deprecation logging
  2. Run php artisan ide-helper:meta
@zlodes zlodes added the bug label Aug 31, 2022
@zlodes
Copy link
Author

zlodes commented Aug 31, 2022

Seems that is's already resolved in master branch...

Duplicates: #1279

@zlodes zlodes closed this as completed Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant