Commit c6b64c3
committed
feature #485 Add priority field to processor tags (HypeMC)
This PR was merged into the 3.x branch.
Discussion
----------
Add priority field to processor tags
| Q | A
| ------------- | ---
| Branch? | 3.x
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Issues | -
| License | MIT
Continuation of #455.
```yaml
Foo\Bar\Log\Processors\FirstProcessor:
tags:
- { name: monolog.processor, channel: http }
Foo\Bar\Log\Processors\SecondProcessor:
tags:
- { name: monolog.processor, channel: http, priority: -10 } # last
Foo\Bar\Log\Processors\ThirdProcessor:
tags:
- { name: monolog.processor, channel: http, priority: -20 } # very last
```
```php
#[AsMonologProcessor(priority: -10)]
class SecondProcessor {}
#[AsMonologProcessor(priority: -20)]
class ThirdProcessor {}
```
**Probably better to review with [whitespace changes ignored](https://github.com/symfony/monolog-bundle/pull/485/files?w=1).**
Commits
-------
4165954 Add priority field to processor tagsFile tree
Expand file treeCollapse file tree
5 files changed
+126
-35
lines changedOpen diff view settings
Filter options
- config
- src/DependencyInjection/Compiler
- tests/DependencyInjection/Compiler
Expand file treeCollapse file tree
5 files changed
+126
-35
lines changedOpen diff view settings
Collapse file
+1Lines changed: 1 addition & 0 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
16 | 16 | |
17 | 17 | |
18 | 18 | |
| 19 | + |
19 | 20 | |
20 | 21 | |
21 | 22 | |
|
Collapse file
+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
38 | 38 | |
39 | 39 | |
40 | 40 | |
| 41 | + |
41 | 42 | |
42 | 43 | |
43 | 44 | |
|
Collapse file
src/DependencyInjection/Compiler/AddProcessorsPass.php
Copy file name to clipboardExpand all lines: src/DependencyInjection/Compiler/AddProcessorsPass.php+50-29Lines changed: 50 additions & 29 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
11 | 11 | |
12 | 12 | |
13 | 13 | |
| 14 | + |
14 | 15 | |
15 | 16 | |
| 17 | + |
16 | 18 | |
17 | | - |
18 | 19 | |
19 | 20 | |
20 | 21 | |
| ||
25 | 26 | |
26 | 27 | |
27 | 28 | |
| 29 | + |
| 30 | + |
28 | 31 | |
29 | 32 | |
30 | 33 | |
31 | 34 | |
32 | 35 | |
33 | 36 | |
| 37 | + |
| 38 | + |
| 39 | + |
34 | 40 | |
35 | 41 | |
36 | 42 | |
37 | 43 | |
38 | 44 | |
39 | | - |
40 | | - |
41 | | - |
42 | | - |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
43 | 52 | |
44 | | - |
45 | | - |
46 | | - |
47 | | - |
48 | | - |
49 | | - |
50 | | - |
51 | | - |
52 | | - |
53 | | - |
54 | | - |
55 | | - |
56 | | - |
57 | | - |
58 | | - |
59 | | - |
60 | | - |
61 | | - |
62 | | - |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
63 | 57 | |
64 | | - |
65 | | - |
66 | | - |
67 | | - |
68 | | - |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | + |
| 76 | + |
| 77 | + |
| 78 | + |
69 | 79 | |
| 80 | + |
| 81 | + |
| 82 | + |
| 83 | + |
| 84 | + |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | + |
| 89 | + |
| 90 | + |
70 | 91 | |
71 | 92 | |
72 | 93 | |
|
Collapse file
src/DependencyInjection/Compiler/LoggerChannelPass.php
Copy file name to clipboardExpand all lines: src/DependencyInjection/Compiler/LoggerChannelPass.php+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
138 | 138 | |
139 | 139 | |
140 | 140 | |
| 141 | + |
141 | 142 | |
142 | 143 | |
143 | 144 | |
|
Collapse file
tests/DependencyInjection/Compiler/AddProcessorsPassTest.php
Copy file name to clipboardExpand all lines: tests/DependencyInjection/Compiler/AddProcessorsPassTest.php+73-6Lines changed: 73 additions & 6 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
24 | 24 | |
25 | 25 | |
26 | 26 | |
| 27 | + |
27 | 28 | |
28 | 29 | |
29 | 30 | |
| ||
34 | 35 | |
35 | 36 | |
36 | 37 | |
37 | | - |
| 38 | + |
38 | 39 | |
39 | 40 | |
40 | 41 | |
41 | 42 | |
42 | | - |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | + |
43 | 72 | |
44 | 73 | |
45 | 74 | |
| ||
97 | 126 | |
98 | 127 | |
99 | 128 | |
100 | | - |
| 129 | + |
101 | 130 | |
102 | 131 | |
103 | 132 | |
| ||
115 | 144 | |
116 | 145 | |
117 | 146 | |
118 | | - |
| 147 | + |
119 | 148 | |
120 | 149 | |
121 | 150 | |
| ||
126 | 155 | |
127 | 156 | |
128 | 157 | |
| 158 | + |
| 159 | + |
| 160 | + |
129 | 161 | |
130 | 162 | |
131 | 163 | |
132 | 164 | |
| 165 | + |
| 166 | + |
133 | 167 | |
134 | 168 | |
135 | 169 | |
| 170 | + |
| 171 | + |
136 | 172 | |
137 | | - |
| 173 | + |
138 | 174 | |
139 | 175 | |
140 | 176 | |
141 | | - |
| 177 | + |
142 | 178 | |
143 | 179 | |
144 | 180 | |
| 181 | + |
| 182 | + |
| 183 | + |
| 184 | + |
| 185 | + |
| 186 | + |
| 187 | + |
| 188 | + |
| 189 | + |
| 190 | + |
| 191 | + |
| 192 | + |
| 193 | + |
| 194 | + |
| 195 | + |
| 196 | + |
| 197 | + |
| 198 | + |
| 199 | + |
| 200 | + |
| 201 | + |
| 202 | + |
| 203 | + |
| 204 | + |
| 205 | + |
| 206 | + |
| 207 | + |
| 208 | + |
| 209 | + |
| 210 | + |
145 | 211 | |
146 | 212 | |
| 213 | + |
147 | 214 | |
148 | 215 | |
149 | 216 | |
|
0 commit comments