symplify / parameter-name-guard
Prevent silent parameter typos that silently break your app
Fund package maintenance!
tomasvotruba
Installs: 904 195
Dependents: 0
Suggesters: 0
Security: 0
Stars: 9
Watchers: 1
Forks: 0
Type:symfony-bundle
Requires
- php: ^7.2
- nette/utils: ^3.0
- symfony/config: ^4.4|^5.0
- symfony/dependency-injection: ^4.4|^5.0
- symfony/http-kernel: ^4.4|^5.0
Requires (Dev)
- phpunit/phpunit: ^8.5|^9.0
- dev-master / 8.3.x-dev
- v8.2.1
- v8.2.0
- v8.1.20
- v8.1.19
- v8.1.18
- v8.1.17
- v8.1.16
- v8.1.15
- v8.1.14
- v8.1.13
- v8.1.12
- v8.1.11
- v8.1.10
- v8.1.9
- v8.1.8
- v8.1.7
- v8.1.6
- v8.1.4
- v8.1.3
- v8.1.2
- v8.1.1
- v8.1.0
- v8.0.1
- v8.0.0
- v8.0.0-beta4
- v8.0.0-beta3
- v8.0.0-beta2
- v8.0.0-beta1
- v7.3.18
- v7.3.17
- v7.3.16
- v7.3.15
- v7.3.14
- v7.3.13
- v7.3.11
- dev-symplify7
This package is auto-updated.
Last update: 2020-08-12 12:08:32 UTC
README
Prevent parameter typos that silently break your app.
Install
composer require symplify/parameter-name-guard
Register bundle:
# config/bundles.php return [ Symplify\ParameterNameGuard\Bundle\ParameterNameGuardBundle::class => ['all' => true], ];
Use
Prevent Parameter Typos
Was it ignoreFiles
? Or ignored_files
? Or ignore_file
? Are you lazy to read every README.md
to find out the correct name?
Make developers' live happy by helping them.
# app/config/services.yaml parameters: correctKey: 'value' # you need to get just this one right :D correct_to_typos: # correct key name correct_key: # the most common typos that people make - 'correctKey' # regexp also works! - '#correctKey(s)?#i'
This way user is informed on every typo he or she makes via exception:
Parameter "parameters > correctKey" does not exist. Use "parameters > correct_key" instead.
They can focus less on remembering all the keys and more on programming.