Skip to content

Commit 0b67e21

Browse files
Merge pull request #328 from sebastianfeldmann/missing-phar-dependencies
Add all Symfony libs to the PHAR
2 parents ede8151 + 470ab12 commit 0b67e21

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

build.xml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,14 @@
135135
</fileset>
136136
</copy>
137137

138-
<!-- AMAZON AWS -->
138+
<!-- SYMFONY -->
139+
<copy todir="${basedir}/build/phar/lib/symfony/">
140+
<fileset dir="${basedir}/vendor/symfony/">
141+
<include name="**/*.php"/>
142+
</fileset>
143+
</copy>
144+
145+
<!-- AMAZON AWS -->
139146
<copy file="${basedir}/vendor/aws/aws-sdk-php/LICENSE" tofile="${basedir}/build/phar/lib/aws-sdk/LICENSE"/>
140147
<copy todir="${basedir}/build/phar/lib/aws-sdk">
141148
<fileset dir="${basedir}/vendor/aws/aws-sdk-php/src">
@@ -450,16 +457,6 @@
450457
</fileset>
451458
</copy>
452459

453-
<!-- Symfony libs -->
454-
<copy file="${basedir}/vendor/symfony/options-resolver/LICENSE"
455-
tofile="${basedir}/build/phar/lib/symfony/options-resolver/LICENSE"/>
456-
<copy todir="${basedir}/build/phar/lib/symfony/options-resolver">
457-
<fileset dir="${basedir}/vendor/symfony/options-resolver">
458-
<include name="**/*.php"/>
459-
<exclude name="**/Test*"/>
460-
</fileset>
461-
</copy>
462-
463460
<!-- PHP-HTTP -->
464461
<copy file="${basedir}/vendor/php-http/httplug/LICENSE"
465462
tofile="${basedir}/build/phar/lib/php-http/httplug/LICENSE"/>

build/phar-autoload.php.in

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ if ($execute) {
4848
// dropbox collection helper
4949
require __PHPBU_PHAR_ROOT__ . '/lib/tightenco/Collect/Support/helpers.php';
5050
require __PHPBU_PHAR_ROOT__ . '/lib/tightenco/Collect/Support/alias.php';
51-
51+
// load the symfony polyfills
52+
require __PHPBU_PHAR_ROOT__ . '/lib/symfony/polyfill-ctype/bootstrap.php';
53+
require __PHPBU_PHAR_ROOT__ . '/lib/symfony/polyfill-mbstring/bootstrap.php';
54+
require __PHPBU_PHAR_ROOT__ . '/lib/symfony/polyfill-php80/bootstrap.php';
55+
5256
phpbu\App\Cmd::main();
5357
}
5458

0 commit comments

Comments
 (0)