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

0.12.26 - has no return typehint specified with a phpdoc block #3402

Closed
williamdes opened this issue Jun 7, 2020 · 10 comments
Closed

0.12.26 - has no return typehint specified with a phpdoc block #3402

williamdes opened this issue Jun 7, 2020 · 10 comments

Comments

@williamdes
Copy link

williamdes commented Jun 7, 2020

 ------ ----------------------------------------------------------------------- 
  Line   libraries/classes/Plugins/ExportPlugin.php                             
 ------ ----------------------------------------------------------------------- 
  126    Method PhpMyAdmin\Plugins\ExportPlugin::exportRoutines() has no        
         return typehint specified.                                             
  126    Method PhpMyAdmin\Plugins\ExportPlugin::exportRoutines() has           
         parameter $db with no typehint specified.                              
  288    Method PhpMyAdmin\Plugins\ExportPlugin::initAlias() has no return      
         typehint specified.                                                    
  288    Method PhpMyAdmin\Plugins\ExportPlugin::initAlias() has parameter      
         $aliases with no typehint specified.                                   
  288    Method PhpMyAdmin\Plugins\ExportPlugin::initAlias() has parameter $db  
         with no typehint specified.                                            
  288    Method PhpMyAdmin\Plugins\ExportPlugin::initAlias() has parameter      
         $table with no typehint specified.                                     
 ------ ----------------------------------------------------------------------- 
 ------ ----------------------------------------------------------------------- 
  Line   libraries/classes/Transformations.php                                  
 ------ ----------------------------------------------------------------------- 
  476    Method PhpMyAdmin\Transformations::clear() has no return typehint      
         specified.                                                             
  476    Method PhpMyAdmin\Transformations::clear() has parameter $column with  
         no typehint specified.                                                 
  476    Method PhpMyAdmin\Transformations::clear() has parameter $db with no   
         typehint specified.                                                    
  476    Method PhpMyAdmin\Transformations::clear() has parameter $table with   
         no typehint specified.                                                 
 ------ ----------------------------------------------------------------------- 

Refs:

Version: 0.12.26

For me this is a regression 🤔

PS: thank you for the "You're using a deprecated config option bootstrap" I would never noticed other ways.

cc @ondrejmirtes

@williamdes williamdes changed the title 0.12.26 0.12.26 - has no return typehint specified with a phpdoc block Jun 7, 2020
@ondrejmirtes
Copy link
Member

Does it happen only in those two files? Any idea what could cause it? What's special about them?

@williamdes
Copy link
Author

Only this 2 files came out after the upgrade.

Nothing special, I do not understand why there is something triggered.
One is abstract and the other one is nothing more than a regular class

One common pattern is that they all have an optional parameter

@williamdes
Copy link
Author

👏 for the blog post and for your awesome work !

@b1rdex
Copy link
Contributor

b1rdex commented Jun 8, 2020

I've got the same problem but for a class property. I assume that's because there is another docblock before the method/property docblock. Mine example with the same problem:

class Z {
/** @see Zzz */
/** @var int */
public $property;
}

The problem is gone if you remove the /** @see Zzz */ comment.

It looks like all 3 examples provided @williamdes has the same – there is another docblock before the dockblock with the problem.

@adaamz
Copy link
Contributor

adaamz commented Jun 8, 2020

Strange, but why to have 2 phpdocs for one property/method?
In that phpMyAdmin code i see there is used phpdoc but it should be probably only block comment.

@williamdes
Copy link
Author

Strange, but why to have 2 phpdocs for one property/method?
In that phpMyAdmin code i see there is used phpdoc but it should be probably only block comment.

Maybe for historical reasons, maybe to add some context for plugin integrators

@ondrejmirtes
Copy link
Member

Fixed: ondrejmirtes/BetterReflection@ab41f90 + phpstan/phpstan-src@98cdb30

williamdes added a commit to phpmyadmin/phpmyadmin that referenced this issue Jun 8, 2020
Ref: phpstan/phpstan#3402

Signed-off-by: William Desportes <williamdes@wdes.fr>
@williamdes
Copy link
Author

Fix confirmed by phpmyadmin/phpmyadmin@d9a8e22
💪 👏

@ondrejmirtes
Copy link
Member

Awesome :)

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants