Commit 1530ae5
committed
[BUGFIX] Avoid resolving invalid TYPO3 extensions in
The `ComposerPackageManager` has been introduced to streamline
the functional test instance creation process and provide all
selected extensions (system, custom and test fixture) within
the test instance, which original simply used relative path
names for classic mode instances or a simple extension key:
For `$coreExtensionsToLoad`:
* typo3/sysext/backend
* backend
For `$testExtensionsToLoad`:
* typo3conf/ext/my_ext_key
* my_ext_key
With `typo3/cms-composer-installers` version 4.0RC1 and
5 these paths could not be found anymore, because TYPO3
system extensions and extensions are no longer installed
into the classic paths in a composer mode instance and
left in the vendor folder, which is the case for usual
root project or extension instance.
Using the available composer information to determine the
source for extensions unrelated to the real installation
path, which can be configured with composer, was the way
to mitigate this issue and `ComposerPackageManger` has
been implemented to process these lookups while still
supporting test fixture extensions not loaded by the root
composer.json directly.
The implementation tried to provide backwards compatible
as much as possible along with fallback to use folder names
as extension keys by simply using `basename()` in some code
places and including not obvious side effects and lookup
issues. `basename()` was also used on valid composer package
names to resolve composer package name for that value as
extension key for loaded packages, which leads to fetch the
wrong composer package.
The standlone fluid `typo3fluid/fluid` composer package name
resolved and retrieved the TYPO3 system extension package
`typo3/cms-fluid` using `getPackageInfo()`, which lead to
issues in other places, for example the dependency ordering
and resolving class `PackageCollection`.
This change streamlines the `ComposerPackageManager` class
to mitigate building and using invalid values to lookup
extension composer package names and harden the registration
process of extension even further.
Guarding unit tests are added to cover this bugfix.
Resolves: #553
Releases: main, 8ComposerPackageManager
1 parent c3d94c4 commit 1530ae5
File tree
5 files changed
+425
-22
lines changed- Classes
- Composer
- Core/Functional
- Tests/Unit/Composer
- Fixtures
5 files changed
+425
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
23 | 37 | | |
24 | 38 | | |
25 | 39 | | |
| |||
65 | 79 | | |
66 | 80 | | |
67 | 81 | | |
68 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
69 | 86 | | |
70 | | - | |
| 87 | + | |
71 | 88 | | |
72 | 89 | | |
73 | | - | |
| 90 | + | |
74 | 91 | | |
75 | 92 | | |
76 | | - | |
| 93 | + | |
77 | 94 | | |
78 | 95 | | |
79 | | - | |
80 | 96 | | |
81 | 97 | | |
82 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
83 | 102 | | |
84 | 103 | | |
85 | | - | |
86 | | - | |
| 104 | + | |
87 | 105 | | |
88 | 106 | | |
89 | 107 | | |
| |||
403 | 421 | | |
404 | 422 | | |
405 | 423 | | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
406 | 437 | | |
407 | 438 | | |
408 | | - | |
| 439 | + | |
| 440 | + | |
409 | 441 | | |
410 | 442 | | |
411 | 443 | | |
| |||
640 | 672 | | |
641 | 673 | | |
642 | 674 | | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
643 | 718 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
111 | 128 | | |
112 | 129 | | |
113 | 130 | | |
| |||
118 | 135 | | |
119 | 136 | | |
120 | 137 | | |
121 | | - | |
122 | | - | |
123 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
124 | 142 | | |
125 | 143 | | |
126 | 144 | | |
127 | | - | |
128 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
129 | 149 | | |
130 | | - | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
131 | 164 | | |
132 | 165 | | |
133 | 166 | | |
| |||
144 | 177 | | |
145 | 178 | | |
146 | 179 | | |
147 | | - | |
| 180 | + | |
| 181 | + | |
148 | 182 | | |
149 | | - | |
| 183 | + | |
| 184 | + | |
150 | 185 | | |
151 | 186 | | |
152 | 187 | | |
153 | 188 | | |
154 | 189 | | |
155 | | - | |
| 190 | + | |
| 191 | + | |
156 | 192 | | |
157 | 193 | | |
158 | | - | |
| 194 | + | |
| 195 | + | |
159 | 196 | | |
160 | 197 | | |
161 | 198 | | |
| |||
169 | 206 | | |
170 | 207 | | |
171 | 208 | | |
172 | | - | |
| 209 | + | |
| 210 | + | |
173 | 211 | | |
174 | 212 | | |
175 | 213 | | |
176 | 214 | | |
177 | | - | |
| 215 | + | |
| 216 | + | |
178 | 217 | | |
179 | 218 | | |
180 | 219 | | |
| |||
205 | 244 | | |
206 | 245 | | |
207 | 246 | | |
208 | | - | |
| 247 | + | |
| 248 | + | |
209 | 249 | | |
210 | | - | |
| 250 | + | |
| 251 | + | |
211 | 252 | | |
212 | 253 | | |
213 | 254 | | |
| |||
0 commit comments