-
Notifications
You must be signed in to change notification settings - Fork 35
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
[Feature] Define schema assets filter in configuration (continue) #101
Conversation
f279857
to
0b6aa54
Compare
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.
Looking good! Mostly needs minor polishing around the example now, with focus on the reader :)
example/full-config.php
Outdated
|
||
SchemaAssetsFilter::class => static function (): callable { | ||
/** | ||
* @param AbstractAsset|string $asset |
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.
Note: we are on PHP 8.1 or newer, so we can use union types :D
example/full-config.php
Outdated
@@ -193,6 +196,20 @@ | |||
|
|||
DependencyFactory::class => DependencyFactoryFactory::class, | |||
ConfigurationLoader::class => ConfigurationLoaderFactory::class, | |||
|
|||
SchemaAssetsFilter::class => static function (): callable { |
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.
SchemaAssetsFilter
is not a real class here, is it? Let's use a string, if it isn't.
example/full-config.php
Outdated
*/ | ||
return static fn (mixed $asset): bool => ! in_array( | ||
$asset instanceof AbstractAsset ? $asset->getName() : $asset, | ||
[ | ||
'sequence_to_generate_value', | ||
'table_without_doctrine_mapping', | ||
], | ||
true, | ||
); |
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.
Let's expand the comment (since this is reference documentation) explaining that this is mostly filtering out the two tables that are listed in the closure
1. Fix 'Undefined array key "schema_assets_filter"' warning by add default config value
0b6aa54
to
dae3ee1
Compare
@Ocramius Any further actions on this? Or just wait release?) |
Merged in #107 thank you @e-vil-dev |
Continue #36 on base of 3.10.x branch + unit tests
Add support
doctrine.configuration.{$name}.schema_assets_filter
configuration value