Skip to content

Commit b103f6c

Browse files
authored
Merge pull request #315 from wp-cli/fix/flip-symfony-logic
2 parents 8895ea9 + d120c12 commit b103f6c

File tree

1 file changed

+11
-20
lines changed

1 file changed

+11
-20
lines changed

utils/make-phar.php

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,15 @@ function add_file( $phar, $path ) {
6969
'\/nb\/oxymel\/',
7070
'-command\/src\/',
7171
'\/wp-cli\/[^\n]+?-command\/',
72-
'\/symfony\/(?!deprecation-contracts|finder|polyfill-intl-normalizer|polyfill-mbstring|polyfill-php80|process)\'',
72+
'\/symfony\/(?:config|console|debug|dependency-injection|event-dispatcher|filesystem|translation|yaml)\'',
7373
'\/(?:dealerdirect|squizlabs|wimg)\/',
7474
'\/yoast\/',
7575
];
7676
} else {
7777
$strips = [
7878
'\/(?:behat|gherkin)\/src\/',
7979
'\/phpunit\/',
80-
'\/symfony\/(?!console|deprecation-contracts|filesystem|finder|polyfill-intl-normalizer|polyfill-mbstring|polyfill-php80|process)\'',
80+
'\/symfony\/(?:config|debug|dependency-injection|event-dispatcher|translation|yaml)\'',
8181
'\/composer\/spdx-licenses\/',
8282
'\/Composer\/(?:Command\/|Compiler\.php|Console\/|Downloader\/Pear|Installer\/Pear|Question\/|Repository\/Pear|SelfUpdate\/)',
8383
'\/(?:dealerdirect|squizlabs|wimg)\/',
@@ -183,13 +183,16 @@ function get_composer_versions( $current_version ) {
183183
->in( WP_CLI_VENDOR_DIR . '/mustache' )
184184
->in( WP_CLI_VENDOR_DIR . '/rmccue/requests' )
185185
->in( WP_CLI_VENDOR_DIR . '/composer' )
186-
->in( WP_CLI_VENDOR_DIR . '/symfony/finder' )
187-
->in( WP_CLI_VENDOR_DIR . '/symfony/polyfill-ctype' )
188-
->in( WP_CLI_VENDOR_DIR . '/symfony/polyfill-mbstring' )
189-
->in( WP_CLI_VENDOR_DIR . '/symfony/process' )
186+
->in( WP_CLI_VENDOR_DIR . '/symfony' )
190187
->in( WP_CLI_VENDOR_DIR . '/myclabs/deep-copy' )
191188
->notName( 'behat-tags.php' )
192189
->notPath( '#(?:[^/]+-command|php-cli-tools)/vendor/#' ) // For running locally, in case have composer installed or symlinked them.
190+
->exclude( 'symfony/config' )
191+
->exclude( 'symfony/debug' )
192+
->exclude( 'symfony/dependency-injection' )
193+
->exclude( 'symfony/event-dispatcher' )
194+
->exclude( 'symfony/translation' )
195+
->exclude( 'symfony/yaml' )
193196
->exclude( 'examples' )
194197
->exclude( 'features' )
195198
->exclude( 'test' )
@@ -200,23 +203,13 @@ function get_composer_versions( $current_version ) {
200203
$finder
201204
->in( WP_CLI_VENDOR_DIR . '/react' );
202205
}
203-
if ( is_dir( WP_CLI_VENDOR_DIR . '/symfony/deprecation-contracts' ) ) {
204-
$finder
205-
->in( WP_CLI_VENDOR_DIR . '/symfony/deprecation-contracts' );
206-
}
207-
if ( is_dir( WP_CLI_VENDOR_DIR . '/symfony/polyfill-intl-normalizer' ) ) {
208-
$finder
209-
->in( WP_CLI_VENDOR_DIR . '/symfony/polyfill-intl-normalizer' );
210-
}
211-
if ( is_dir( WP_CLI_VENDOR_DIR . '/symfony/polyfill-php80' ) ) {
212-
$finder
213-
->in( WP_CLI_VENDOR_DIR . '/symfony/polyfill-php80' );
214-
}
215206
if ( 'cli' === BUILD ) {
216207
$finder
217208
->in( WP_CLI_VENDOR_DIR . '/wp-cli/mustangostang-spyc' )
218209
->in( WP_CLI_VENDOR_DIR . '/wp-cli/php-cli-tools' )
219210
->in( WP_CLI_VENDOR_DIR . '/seld/cli-prompt' )
211+
->exclude( 'symfony/console' )
212+
->exclude( 'symfony/filesystem' )
220213
->exclude( 'composer/ca-bundle' )
221214
->exclude( 'composer/semver' )
222215
->exclude( 'composer/src' )
@@ -227,8 +220,6 @@ function get_composer_versions( $current_version ) {
227220
->in( WP_CLI_VENDOR_DIR . '/nb/oxymel' )
228221
->in( WP_CLI_VENDOR_DIR . '/psr' )
229222
->in( WP_CLI_VENDOR_DIR . '/seld' )
230-
->in( WP_CLI_VENDOR_DIR . '/symfony/console' )
231-
->in( WP_CLI_VENDOR_DIR . '/symfony/filesystem' )
232223
->in( WP_CLI_VENDOR_DIR . '/justinrainbow/json-schema' )
233224
->in( WP_CLI_VENDOR_DIR . '/gettext' )
234225
->in( WP_CLI_VENDOR_DIR . '/mck89' )

0 commit comments

Comments
 (0)