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
PIE doesn't handle git submodules because it downloads ZIP archives.
To work around this, create a pre-packaged source tarball that includes
the submodule contents:
- Create php_maxminddb-{version}-src.tgz from submodule ext/ directory
- Upload as GitHub release asset
- PIE automatically detects and uses this instead of ZIP
- Same approach used by MongoDB extension
References:
- php/pie#39
Copy file name to clipboardExpand all lines: plan.md
+40-1Lines changed: 40 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,19 @@
3
3
## Overview
4
4
Set up a new extension repository (`MaxMind-DB-Reader-php-ext`) that uses this repo as a submodule, and automate releases via `dev-bin/release.sh`.
5
5
6
+
## PIE and Submodules
7
+
8
+
PIE downloads source code as ZIP archives from Composer/GitHub, which don't include git submodule contents. To work around this limitation, we use PIE's built-in support for **pre-packaged source archives**:
9
+
10
+
- The release script creates a tarball: `php_maxminddb-{version}-src.tgz`
11
+
- This tarball includes the full ext/ directory from the submodule
12
+
- It's uploaded as a GitHub release asset
13
+
- PIE automatically detects and uses this pre-packaged source instead of the ZIP archive
14
+
15
+
This is the same approach used by the MongoDB extension and others with submodule dependencies. See:
16
+
-https://github.com/php/pie/issues/39
17
+
- MongoDB extension implementation
18
+
6
19
## Phase 1: Create Extension Repository Structure
7
20
8
21
### 1.1 Create new repository at github.com/maxmind/MaxMind-DB-Reader-php-ext
@@ -219,6 +232,24 @@ $notes"
219
232
exit 1
220
233
fi
221
234
235
+
# Create pre-packaged source tarball for PIE
236
+
# PIE needs this because it doesn't handle git submodules automatically
237
+
echo"Creating pre-packaged source tarball for PIE..."
238
+
pie_tarball="php_maxminddb-${version}-src.tgz"
239
+
240
+
# Create tarball from the ext directory in the submodule
0 commit comments