Skip to content
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

better documentation of configuration file usage #347

Merged
merged 1 commit into from
Jan 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,11 @@ If you cannot provide a PHP instance without Xdebug yourself, try setting an env
Composer require checker is configured to whitelist some symbols per default. Have a look at the
[config file example](data/config.dist.json) to see which configuration options are available.

You can now adjust this file, as needed, and tell composer-require-checker to use it for it's configuration.
You can now adjust this file, as needed, and tell composer-require-checker to use it for it's configuration.
If you want to use the default whitelist, you may remove this section and only adjust the sections you would like to change.

Note that you'll have to copy it's contents if you want to add something on top. This tool intentionally only
reads one configuration file. If you pass only your new settings, you'll get error reports about the PHP core
Note that if you want to add something on top of a section, you'll have to copy the whole section's content.
This tool intentionally only reads one configuration file. If you pass only your new settings, you'll get error reports about the PHP core
extensions and internal symbols like `true` or `false` being undefined.

```sh
Expand All @@ -86,12 +87,14 @@ bin/composer-require-checker check --config-file=path/to/config.json /path/to/yo
### Scan Additional Files

To scan files, that are not part of your autoload definition you may add glob patterns to the config file's `scan-files`
section. Copy the default file and add to your copy.
section.

The following example would also scan the file `bin/console` and all files with `.php` extension within your `bin/` folder:
The following example configuration file would also scan the file `bin/console` and all files with `.php` extension within your `bin/` folder:

```
"scan-files" : ["bin/console", "bin/*.php"]
```json
{
"scan-files" : ["bin/console", "bin/*.php"]
}
```

If you don't like copying the tool's default settings, consider adding these paths to the Composer autoloading section
Expand Down