Skip to content

Commit

Permalink
Change wording.
Browse files Browse the repository at this point in the history
  • Loading branch information
JasperTey committed Apr 15, 2024
1 parent 01501c7 commit dbcb94a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
All notable changes to `laravel-ddd` will be documented in this file.

## [Unversioned]
### Added
- Ability to ignore folders during autoloading via config(`ddd.autoload.ignore`), or register a custom filter callback via `DDD::filterAutoloadPathsUsing(callable $filter)`.

### Changed
- Internal: Domain cache is no longer quietly cleared on laravel's `cache:clearing` event, so that `ddd:cache` yields consistent results no matter what order runs in production (before or after `cache:clear` or `optimize:clear` commands).

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,16 +211,16 @@ When `ddd.autoload.factories` is enabled, the package will register a custom fac

If your application implements its own factory discovery using `Factory::guessFactoryNamesUsing()`, you should set `ddd.autoload.factories` to `false` to ensure it is not overridden.

### Ignoring Folders During Autoloading
To specify folders that should be skipped during autoloading discovery, add them to the `ddd.autoload_ignore` configuration option. By default, the `Tests` and `Migrations` folders are ignored.
### Ignoring Paths During Autoloading
To specify folders or paths that should be skipped during autoloading discovery, add them to the `ddd.autoload_ignore` configuration option. By default, the `Tests` and `Migrations` folders are ignored.
```php
'autoload_ignore' => [
'Tests',
'Migrations',
'Database/Migrations',
],
```

Folders specified here are relative to the root of each domain. e.g., src/Domain/Invoicing/<folder-to-ignore>. If more advanced filtering is needed, a callback can be registered using the `DDD::filterAutoloadPathsUsing(callback $filter)` in your AppServiceProvider's boot method:
Paths specified here are relative to the root of each domain. e.g., `src/Domain/Invoicing/{path-to-ignore}`. If more advanced filtering is needed, a callback can be registered using the `DDD::filterAutoloadPathsUsing(callback $filter)` in your AppServiceProvider's boot method:
```php
use Lunarstorm\LaravelDDD\Facades\DDD;
use Symfony\Component\Finder\SplFileInfo;
Expand Down

0 comments on commit dbcb94a

Please sign in to comment.