Issues

ZF2-459: Wrong phpdoc comments and non-existing classes used

Description

I'm using RC3.

There are a lot classes used that do not exist. If you search for the following strings you will find them. I don't know how to fix them, because I don't know what the correct replacement/new class is in zf2.

\Zend\Db\Table \Zend\Db\Metadata\Table \Zend\Db\Metadata\ColumnCollection \Zend\Db\Metadata\ConstraintCollection

"ConstraintKeyObject" is wrong, and I cannot find a method "getColumnName()" anywhere /** @var $key \Zend\Db\Metadata\Object\ConstraintKeyObject */ $primaryKey[] = $key->getColumnName();

Should that be \PDO::FETCH_ASSOC? Db\Db::FETCH_ASSOC

Search for "\Zend\Loader\PluginLoader\Exception"

Search in whole project for "Object\ConstraintKeyObject"

PHPStorm tells me this is wrong (or bad code)? But maybe this is a false positive of PHPStorm. $this->handles[$index] = & $handles;

It would be cool if someone could have a look at all those classes and repair it.

Comments

[~mkliewe] Thank you for the report. Please the next time add the class which you found the issue.

The first block is a obsolete class will be removed by this PR https://github.com/zendframework/zf2/pull/2169

The second and fifth part will be fixed by [~ralph]

About the third part probably should be PDO, however Paginator still having old code not related with the new Zend\Db 2.0 API

About the fourth is obviously that the function only will throw a RuntimeException and neither Zend\Loader... or InvalidArgumentException so you can replace the @throws safely with RuntimeException and send us a PR with the patch

finally about the sixth I don't know.

Left fix some occurrences of ConstraintKeyObject


$this->handles[$index] = & $handles;

Is valid, and I've seen that issue in PHPStorm. Where is that line exactly?

If I search for "= & " in the whole project I find 26 occurrences. But only 5 of them are underlined in red (in PHPStorm). The files are: Zend/Cache/Storage/Plugin/ClearExpiredByFactor.php Zend/Cache/Storage/Plugin/ExceptionHandler.php Zend/Cache/Storage/Plugin/IgnoreUserAbort.php Zend/Cache/Storage/Plugin/OptimizeByFactor.php Zend/Cache/Storage/Plugin/Serializer.php

This issue has been closed on Jira and moved to GitHub for issue tracking. To continue following the resolution of this issues, please visit: https://github.com/zendframework/zf2/issues/2522