Skip to content

Commit 98ea887

Browse files
committed
Update README
1 parent d5401f9 commit 98ea887

File tree

1 file changed

+31
-2
lines changed

1 file changed

+31
-2
lines changed

README.md

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,23 @@ generated after the autoloader is dumped. If you modify attributes you'll have t
8383
run `composer dump` to refresh the attributes file.
8484

8585
As a workaround you could have watchers on the directories that contain classes with attributes to
86-
run `composer dump` when you make changes. [PhpStorm offers file watchers][phpstorm-watchers]. You
87-
could also use [spatie/file-system-watcher][], it only requires PHP.
86+
run `XDEBUG_MODE=off composer dump` when you make changes. [PhpStorm offers file watchers][phpstorm-watchers]. You could also use [spatie/file-system-watcher][], it only requires PHP.
87+
88+
89+
90+
## Autoloading
91+
92+
You can require the attributes file as shown in the usage example, but it's preferable to use Composer's autoloading feature:
93+
94+
```json
95+
{
96+
"autoloading": {
97+
"files": [
98+
"vendor/attributes.php"
99+
]
100+
}
101+
}
102+
```
88103

89104

90105

@@ -109,6 +124,20 @@ specified using the `extra` section of `composer.json`:
109124
}
110125
```
111126

127+
For instance, if you are only concerned about the attributes of your own project, you could ignore the vendor directory:
128+
129+
```json
130+
{
131+
"extra": {
132+
"composer-attribute-collector": {
133+
"ignore-paths": [
134+
"vendor"
135+
]
136+
}
137+
}
138+
}
139+
```
140+
112141

113142

114143
## Test drive with a Symfony app

0 commit comments

Comments
 (0)