Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Wrong phpdoc comments and non-existing classes used #2522

Closed
zfbot opened this issue Sep 28, 2012 · 6 comments
Closed

Wrong phpdoc comments and non-existing classes used #2522

zfbot opened this issue Sep 28, 2012 · 6 comments

Comments

@zfbot
Copy link

zfbot commented Sep 28, 2012

Jira Information

Original Issue:ZF2-459
Issue Type:Bug
Reporter:PHPGangsta
Created:08/09/12
Assignee:ralphschindler
Components:Zend\Db Zend\Paginator Zend\View

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.

@zfbot
Copy link
Author

zfbot commented Sep 28, 2012

(Originally posted by: maks3w on 08/15/12)

[~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 #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.

@zfbot
Copy link
Author

zfbot commented Sep 28, 2012

(Originally posted by: maks3w on 08/20/12)

Left fix some occurrences of ConstraintKeyObject

@zfbot
Copy link
Author

zfbot commented Sep 28, 2012

(Originally posted by: ralphschindler on 08/21/12)

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

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

@zfbot
Copy link
Author

zfbot commented Sep 28, 2012

(Originally posted by: PHPGangsta on 08/21/12)

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

@zfbot
Copy link
Author

zfbot commented Sep 28, 2012

This issue was ported from the ZF2 Jira Issue Tracker at
http://framework.zend.com/issues/browse/ZF2-459

Known GitHub users mentioned in the original message or comment:
@PHPGangsta, @ralphschindler, @Maks3w

@ralphschindler
Copy link
Member

This was cleaned up before RC5, if you still find some, please add some exact references.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants