-
-
Notifications
You must be signed in to change notification settings - Fork 68
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
MysqlMetadata Enhancements #201
base: 2.13.x
Are you sure you want to change the base?
Conversation
Add support for column_key and extra fields in MysqlMetadata. Removes the strange formatting of the names of constraints that aren't foreign keys. I'm unsure why that's ever been a thing, as it doesn't make much sense adding _laminas_{table name} to them? Wraps the constraint array in a non-null check to prevent a possible null pointer exception Converts a couple of closures to static functions for better scoping and potential performance improvements Signed-off-by: Will Jones <will@stratagem-uk.tech>
As much as I'd like to see this package continue to be maintained, my understanding is that it is in a security-only mode.
|
This was last year but in the meantime, new maintainers have been found for laminas-db. This works also for other components. Please look at the readme file of the components. Example: https://github.com/laminas/laminas-config#laminas-config |
'table_name' => $row['TABLE_NAME'], | ||
'columns' => [], | ||
]; | ||
$constraints[$name]['columns'][] = $row['COLUMN_NAME']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this $name
will be empty if above case wont be triggered?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tptrixtop possibly, however that potential case isn't new to this commit; it has existed for some time.
PhpStorm also warns me about line 272, saying $isFK
is probably undefined:
$constraints[$name]['columns'][] = $row['COLUMN_NAME'];
if ($isFK) {
$constraints[$name]['referenced_columns'][] = $row['REFERENCED_COLUMN_NAME'];
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like $name
was initializing in else { case in previous version, in new version else case was removed and allows $name
to be uninitialized or i am missing something
Add support for column_key and extra fields in MysqlMetadata.
Removes the strange formatting of the names of constraints that aren't foreign keys. I'm unsure why that's ever been a thing, as it doesn't make much sense adding laminas{table name} to them?
Wraps the constraint array in a non-null check to prevent a possible null pointer exception
Converts a couple of closures to static functions for better scoping and potential performance improvements