Commit 8ddbcc3
Move phpstan_fixtures test data to tests/src/Rules/data (#974)
* Move phpstan_fixtures test data to tests/src/Rules/data
Moves rule test data files out of the phpstan_fixtures Drupal module
fixture and into the standard tests/src/Rules/data/ directory, keeping
test data co-located with the tests that use it.
Also removes dead fixture files that were no longer referenced by any
test (AppRootParameter, DeprecatedGlobalConstants, EntityFieldReflection,
EntityQueryHasAccessRule).
Refs #723
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Add unit test for SplString pseudo-service type resolution
Replaces the coverage that was lost when AppRootParameter.php was removed.
DrupalServiceDefinition::getType() maps SplString to StringType to handle
Drupal pseudo-services like 'app.root' which are strings injected into the
container rather than real objects.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Register app.root as a synthetic SplString service in DrupalAutoloader
app.root is set programmatically by DrupalKernel::initializeContainer() as
a synthetic SplString service (not defined in any services.yml). The
DrupalAutoloader already hardcodes other synthetic services like kernel,
class_loader, and service_container — app.root belongs in the same block.
This makes the existing SplString → StringType mapping in
DrupalServiceDefinition::getType() reachable, and lets type assertions on
\Drupal::getContainer()->get('app.root') resolve to string.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Remove dead SplString pseudo-service handling
app.root is a container parameter in Drupal, not a service. The SplString
workaround in DrupalServiceDefinition::getType() was never reachable
because nothing registered app.root as a service with class SplString.
AppRootParameter.php was already removed as part of dead code cleanup.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 73172cf commit 8ddbcc3
File tree
24 files changed
+23
-141
lines changed- src/Drupal
- tests
- fixtures/drupal/modules/phpstan_fixtures/src
- EntityFieldReflection
- src/Rules
- data
24 files changed
+23
-141
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| |||
110 | 109 | | |
111 | 110 | | |
112 | 111 | | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | 112 | | |
121 | 113 | | |
122 | 114 | | |
| |||
Lines changed: 0 additions & 34 deletions
This file was deleted.
Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 0 additions & 25 deletions
This file was deleted.
Lines changed: 0 additions & 23 deletions
This file was deleted.
Lines changed: 0 additions & 19 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
0 commit comments