|
30 | 30 | use PhpSchool\PhpWorkshop\Listener\CodePatchListener; |
31 | 31 | use PhpSchool\PhpWorkshop\Listener\ConfigureCommandListener; |
32 | 32 | use PhpSchool\PhpWorkshop\Listener\PrepareSolutionListener; |
| 33 | +use PhpSchool\PhpWorkshop\Listener\RealPathListener; |
33 | 34 | use PhpSchool\PhpWorkshop\Listener\SelfCheckListener; |
34 | 35 | use PhpSchool\PhpWorkshop\MenuItem\ResetProgress; |
35 | 36 | use PhpSchool\PhpWorkshop\Output\OutputInterface; |
|
197 | 198 | $c->get(RunnerManager::class) |
198 | 199 | ); |
199 | 200 | }, |
200 | | - |
| 201 | + RealPathListener::class => object(), |
| 202 | + |
201 | 203 | //checks |
202 | 204 | FileExistsCheck::class => object(), |
203 | 205 | PhpLintCheck::class => object(), |
|
281 | 283 | ], |
282 | 284 | 'appContributors' => [], |
283 | 285 | 'eventListeners' => [ |
| 286 | + 'realpath-student-submission' => [ |
| 287 | + 'cli.verify.start' => [ |
| 288 | + containerListener(RealPathListener::class) |
| 289 | + ], |
| 290 | + 'cli.run.start' => [ |
| 291 | + containerListener(RealPathListener::class) |
| 292 | + ], |
| 293 | + 'cgi.verify.start' => [ |
| 294 | + containerListener(RealPathListener::class) |
| 295 | + ], |
| 296 | + 'cgi.run.start' => [ |
| 297 | + containerListener(RealPathListener::class) |
| 298 | + ] |
| 299 | + ], |
284 | 300 | 'check-exercise-assigned' => [ |
285 | 301 | 'route.pre.resolve.args' => [ |
286 | 302 | containerListener(CheckExerciseAssignedListener::class) |
|
292 | 308 | ], |
293 | 309 | ], |
294 | 310 | 'prepare-solution' => [ |
295 | | - 'verify.start' => [ |
| 311 | + 'cli.verify.start' => [ |
| 312 | + containerListener(PrepareSolutionListener::class), |
| 313 | + ], |
| 314 | + 'cli.run.start' => [ |
| 315 | + containerListener(PrepareSolutionListener::class), |
| 316 | + ], |
| 317 | + 'cgi.verify.start' => [ |
296 | 318 | containerListener(PrepareSolutionListener::class), |
297 | 319 | ], |
298 | | - 'run.start' => [ |
| 320 | + 'cgi.run.start' => [ |
299 | 321 | containerListener(PrepareSolutionListener::class), |
300 | 322 | ], |
301 | 323 | ], |
302 | 324 | 'code-patcher' => [ |
303 | | - 'run.start' => [ |
| 325 | + 'cli.verify.start' => [ |
304 | 326 | containerListener(CodePatchListener::class, 'patch'), |
305 | 327 | ], |
306 | | - 'verify.pre.execute' => [ |
| 328 | + 'cli.verify.finish' => [ |
307 | 329 | containerListener(CodePatchListener::class, 'patch'), |
308 | 330 | ], |
309 | | - 'verify.post.execute' => [ |
310 | | - containerListener(CodePatchListener::class, 'revert'), |
| 331 | + 'cli.run.start' => [ |
| 332 | + containerListener(CodePatchListener::class, 'patch'), |
| 333 | + ], |
| 334 | + 'cli.run.finish' => [ |
| 335 | + containerListener(CodePatchListener::class, 'patch'), |
| 336 | + ], |
| 337 | + 'cgi.verify.start' => [ |
| 338 | + containerListener(CodePatchListener::class, 'patch'), |
311 | 339 | ], |
312 | | - 'run.finish' => [ |
313 | | - containerListener(CodePatchListener::class, 'revert'), |
| 340 | + 'cgi.verify.finish' => [ |
| 341 | + containerListener(CodePatchListener::class, 'patch'), |
| 342 | + ], |
| 343 | + 'cgi.run.start' => [ |
| 344 | + containerListener(CodePatchListener::class, 'patch'), |
| 345 | + ], |
| 346 | + 'cgi.run.finish' => [ |
| 347 | + containerListener(CodePatchListener::class, 'patch'), |
314 | 348 | ], |
315 | 349 | ], |
316 | 350 | 'self-check' => [ |
|
0 commit comments