You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Minor cleanup for platform repo priorities tests and docs (#773)
Fix the repos (and the build docs examples) to have objects with version arrays for each package, as Composer prefers it (and how all the tooling has been generating it for a while). No big thing, as the 'old way' still works (but throws a warning, which doesn't affect the tests though).
Also restructure the corresponding test to have a sub-group that describes which test case ran.
GUS-W-17622481
Copy file name to clipboardExpand all lines: support/build/README.md
+20-10Lines changed: 20 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -446,22 +446,32 @@ As package of type `heroku-sys-php` may come bundled with a bunch of extensions,
446
446
447
447
The repository is a `packages.json` of all manifests, which can be used by Composer as a `packagist` repository type. See [Usage in Applications](#usage-in-applications) for instructions on how to use such a repository with an application.
448
448
449
-
The structure of a `packagist` type repository is a struct with a single key "`packages`", which is an array containing another array (!) which is a list of all the manifest structs:
449
+
The structure of a `packagist` type repository is a struct with a single key "`packages`", which is a hash of package names containing arrays of all the individual manifest structs for that package (in different versions):
450
450
451
451
{
452
-
"packages": [
453
-
[
452
+
"packages": {
453
+
"heroku-sys/php": [
454
+
{
455
+
"name": "heroku-sys/php",
456
+
"version": "8.4.1",
457
+
…
458
+
},
454
459
{
455
-
"name": "heroku-sys/php"
460
+
"name": "heroku-sys/php",
461
+
"version": "8.4.2",
456
462
…
457
463
},
458
464
…
465
+
],
466
+
"heroku-sys/ext-foobar": [
459
467
{
460
-
"name": "heroku-sys/ext-foobar"
468
+
"name": "heroku-sys/ext-foobar",
469
+
"version": "1.0.0",
461
470
…
462
-
}
471
+
},
472
+
…
463
473
]
464
-
]
474
+
}
465
475
}
466
476
467
477
@@ -802,8 +812,8 @@ Name this tarball `ext-myext-1.2.3_php-7.3.tar.gz` and make it available at `htt
802
812
Assuming that the extension has no stack-specific requirements (meaning it can run on any stack), you can then have a repository at `https://download.example.com/heroku/packages.json` with the following contents:
803
813
804
814
{
805
-
"packages": [
806
-
[
815
+
"packages": {
816
+
"heroku-sys/ext-myext": [
807
817
{
808
818
"name": "heroku-sys/ext-myext",
809
819
"version": "1.2.3",
@@ -819,7 +829,7 @@ Assuming that the extension has no stack-specific requirements (meaning it can r
819
829
"time": "WHEN DID MCFLY COME BACK FROM THE FUTURE",
820
830
}
821
831
]
822
-
]
832
+
}
823
833
}
824
834
825
835
**Remember the warning above about version ordering: the PHP 7.3 variant of `ext-myext` version 1.2.3 must be listed before the PHP 7.2 variant, and so forth, to ensure Composer picks the highest possible PHP version.**
0 commit comments