Skip to content

Commit 4741175

Browse files
Added aws-sdk to phar, patch SessionHandlerInterface file
1 parent ef8d6a4 commit 4741175

File tree

2 files changed

+48
-2
lines changed

2 files changed

+48
-2
lines changed

build.xml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,20 @@
112112
<include name="**/*.crt" />
113113
</fileset>
114114
</copy>
115+
115116
<copy todir="${basedir}/build/phar/eher">
116117
<fileset dir="${basedir}/vendor/eher/oauth/src">
117118
<include name="**/*.php" />
118119
</fileset>
119120
</copy>
120121

122+
<copy file="${basedir}/vendor/aws/aws-sdk-php/LICENSE.md" tofile="${basedir}/build/phar/aws-sdk/LICENSE"/>
123+
<copy todir="${basedir}/build/phar/aws-sdk">
124+
<fileset dir="${basedir}/vendor/aws/aws-sdk-php/src/Aws">
125+
<include name="**/*.php" />
126+
</fileset>
127+
</copy>
128+
121129
<copy file="${basedir}/vendor/dropbox/dropbox-sdk/License.txt" tofile="${basedir}/build/phar/dropbox/LICENSE"/>
122130
<copy todir="${basedir}/build/phar/dropbox">
123131
<fileset dir="${basedir}/vendor/dropbox/dropbox-sdk/lib/Dropbox">
@@ -128,6 +136,14 @@
128136
</fileset>
129137
</copy>
130138

139+
<copy file="${basedir}/vendor/guzzle/guzzle/LICENSE" tofile="${basedir}/build/phar/guzzle/LICENSE"/>
140+
<copy todir="${basedir}/build/phar/guzzle">
141+
<fileset dir="${basedir}/vendor/guzzle/guzzle/src">
142+
<include name="**/*.php" />
143+
<include name="**/*.pem" />
144+
</fileset>
145+
</copy>
146+
131147
<copy file="${basedir}/vendor/phpseclib/phpseclib/LICENSE" tofile="${basedir}/build/phar/phpseclib/LICENSE"/>
132148
<copy todir="${basedir}/build/phar/phpseclib">
133149
<fileset dir="${basedir}/vendor/phpseclib/phpseclib/phpseclib">
@@ -168,6 +184,14 @@
168184
</fileset>
169185
</copy>
170186

187+
<copy file="${basedir}/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/LICENSE" tofile="${basedir}/build/phar/symfony/event-dispatcher/LICENSE"/>
188+
<copy todir="${basedir}/build/phar/symfony/event-dispatcher">
189+
<fileset dir="${basedir}/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher">
190+
<include name="**/*.php" />
191+
<exclude name="**/Test*" />
192+
</fileset>
193+
</copy>
194+
171195
<exec executable="${basedir}/build/phar-patch.php"/>
172196

173197
</target>
@@ -198,4 +222,4 @@
198222

199223
<chmod file="${basedir}/build/phpbu-${phar_version}.phar" perm="ugo+rx"/>
200224
</target>
201-
</project>
225+
</project>

build/phar-patch.php

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,23 @@
1414
),
1515
);
1616

17-
foreach ( $patches as $file ) {
17+
$replacements = array(
18+
array(
19+
'path' => __DIR__ . '/phar/aws-sdk/DynamoDb/Session/SessionHandlerInterface.php',
20+
'content' => '<?php
21+
22+
namespace Aws\DynamoDb\Session;
23+
24+
/**
25+
* @see http://php.net/manual/en/class.sessionhandlerinterface.php
26+
*/
27+
interface SessionHandlerInterface extends \SessionHandlerInterface {}
28+
29+
',
30+
)
31+
);
32+
33+
foreach ($patches as $file) {
1834
echo 'patching file: ' . $file['path'] . "...";
1935
file_put_contents(
2036
$file['path'],
@@ -26,3 +42,9 @@
2642
);
2743
echo ' done' . PHP_EOL;
2844
};
45+
46+
foreach ($replacements as $file) {
47+
echo 'replacing file: ' . $file['path'] . "...";
48+
file_put_contents($file['path'], $file['content']);
49+
echo ' done' . PHP_EOL;
50+
}

0 commit comments

Comments
 (0)