DDC-2128: [GH-507] Now MetaDataFilter takess also regexp. For example whern you want to #2815

Closed
doctrinebot opened this Issue Nov 6, 2012 · 3 comments

2 participants

@doctrinebot

Jira issue originally created by user @beberlei:

This issue is created automatically through a Github pull request on behalf of catalinux:

Url: #507

Message:

extract metadata if you would filter like this: --filter="Article"
would extract also for "ArticleItems" (article_items table). Now you
can use --filter="Article$" if you want only that table (articl)

@doctrinebot

Comment created by @doctrinebot:

A related Github Pull-Request [GH-507] was closed:
#507

@doctrinebot

Issue was closed with resolution "Fixed"

@doctrinebot

Comment created by @doctrinebot:

A related Github Pull-Request [GH-507] was closed:
doctrine/dbal#507

@beberlei beberlei was assigned by doctrinebot Dec 6, 2015
@doctrinebot doctrinebot added this to the 2.5 milestone Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
@guilliamxavier guilliamxavier added a commit that referenced this issue Mar 15, 2016
@guilliamxavier guilliamxavier Fix MetadataFilter not testing filters after first
PR #507 (issue #2815 [DDC-2128]) introduced a regression, with the effect that when providing a filter array with more than one string, only the first pattern is tested (and the subsequent ones are like ignored).

In the function `accept()`, if the first pattern of the `$this->filter` array (is not invalid, but) does not match `$metadata->name`, then the function returns `false` early, without trying the next patterns in the array. Instead it should continue to iterate, and only return `true` on the first encountered pattern that matches (if any) or return `false` after the end of the loop (if no pattern matched).
05e723f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment