ofs | hex dump | ascii |
---|
0000 | 23 21 2f 75 73 72 2f 62 69 6e 2f 65 6e 76 20 70 68 70 0a 3c 3f 70 68 70 0a 2f 2a 0a 20 2a 20 54 | #!/usr/bin/env.php.<?php./*..*.T |
0020 | 68 69 73 20 66 69 6c 65 20 69 73 20 70 61 72 74 20 6f 66 20 43 6f 6d 70 6f 73 65 72 2e 0a 20 2a | his.file.is.part.of.Composer...* |
0040 | 0a 20 2a 20 28 63 29 20 4e 69 6c 73 20 41 64 65 72 6d 61 6e 6e 20 3c 6e 61 64 65 72 6d 61 6e 40 | ..*.(c).Nils.Adermann.<naderman@ |
0060 | 6e 61 64 65 72 6d 61 6e 2e 64 65 3e 0a 20 2a 20 20 20 20 20 4a 6f 72 64 69 20 42 6f 67 67 69 61 | naderman.de>..*.....Jordi.Boggia |
0080 | 6e 6f 20 3c 6a 2e 62 6f 67 67 69 61 6e 6f 40 73 65 6c 64 2e 62 65 3e 0a 20 2a 0a 20 2a 20 46 6f | no.<j.boggiano@seld.be>..*..*.Fo |
00a0 | 72 20 74 68 65 20 66 75 6c 6c 20 63 6f 70 79 72 69 67 68 74 20 61 6e 64 20 6c 69 63 65 6e 73 65 | r.the.full.copyright.and.license |
00c0 | 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 2c 20 70 6c 65 61 73 65 20 76 69 65 77 0a 20 2a 20 74 68 65 | .information,.please.view..*.the |
00e0 | 20 6c 69 63 65 6e 73 65 20 74 68 61 74 20 69 73 20 6c 6f 63 61 74 65 64 20 61 74 20 74 68 65 20 | .license.that.is.located.at.the. |
0100 | 62 6f 74 74 6f 6d 20 6f 66 20 74 68 69 73 20 66 69 6c 65 2e 0a 20 2a 2f 0a 0a 2f 2f 20 41 76 6f | bottom.of.this.file...*/..//.Avo |
0120 | 69 64 20 41 50 43 20 63 61 75 73 69 6e 67 20 72 61 6e 64 6f 6d 20 66 61 74 61 6c 20 65 72 72 6f | id.APC.causing.random.fatal.erro |
0140 | 72 73 20 70 65 72 20 68 74 74 70 73 3a 2f 2f 67 69 74 68 75 62 2e 63 6f 6d 2f 63 6f 6d 70 6f 73 | rs.per.https://github.com/compos |
0160 | 65 72 2f 63 6f 6d 70 6f 73 65 72 2f 69 73 73 75 65 73 2f 32 36 34 0a 69 66 20 28 65 78 74 65 6e | er/composer/issues/264.if.(exten |
0180 | 73 69 6f 6e 5f 6c 6f 61 64 65 64 28 27 61 70 63 27 29 20 26 26 20 66 69 6c 74 65 72 5f 76 61 72 | sion_loaded('apc').&&.filter_var |
01a0 | 28 69 6e 69 5f 67 65 74 28 27 61 70 63 2e 65 6e 61 62 6c 65 5f 63 6c 69 27 29 2c 20 46 49 4c 54 | (ini_get('apc.enable_cli'),.FILT |
01c0 | 45 52 5f 56 41 4c 49 44 41 54 45 5f 42 4f 4f 4c 45 41 4e 29 20 26 26 20 66 69 6c 74 65 72 5f 76 | ER_VALIDATE_BOOLEAN).&&.filter_v |
01e0 | 61 72 28 69 6e 69 5f 67 65 74 28 27 61 70 63 2e 63 61 63 68 65 5f 62 79 5f 64 65 66 61 75 6c 74 | ar(ini_get('apc.cache_by_default |
0200 | 27 29 2c 20 46 49 4c 54 45 52 5f 56 41 4c 49 44 41 54 45 5f 42 4f 4f 4c 45 41 4e 29 29 20 7b 0a | '),.FILTER_VALIDATE_BOOLEAN)).{. |
0220 | 20 20 20 20 69 66 20 28 76 65 72 73 69 6f 6e 5f 63 6f 6d 70 61 72 65 28 70 68 70 76 65 72 73 69 | ....if.(version_compare(phpversi |
0240 | 6f 6e 28 27 61 70 63 27 29 2c 20 27 33 2e 30 2e 31 32 27 2c 20 27 3e 3d 27 29 29 20 7b 0a 20 20 | on('apc'),.'3.0.12',.'>=')).{... |
0260 | 20 20 20 20 20 20 69 6e 69 5f 73 65 74 28 27 61 70 63 2e 63 61 63 68 65 5f 62 79 5f 64 65 66 61 | ......ini_set('apc.cache_by_defa |
0280 | 75 6c 74 27 2c 20 30 29 3b 0a 20 20 20 20 7d 20 65 6c 73 65 20 7b 0a 20 20 20 20 20 20 20 20 66 | ult',.0);.....}.else.{.........f |
02a0 | 77 72 69 74 65 28 53 54 44 45 52 52 2c 20 27 57 61 72 6e 69 6e 67 3a 20 41 50 43 20 3c 3d 20 33 | write(STDERR,.'Warning:.APC.<=.3 |
02c0 | 2e 30 2e 31 32 20 6d 61 79 20 63 61 75 73 65 20 66 61 74 61 6c 20 65 72 72 6f 72 73 20 77 68 65 | .0.12.may.cause.fatal.errors.whe |
02e0 | 6e 20 72 75 6e 6e 69 6e 67 20 63 6f 6d 70 6f 73 65 72 20 63 6f 6d 6d 61 6e 64 73 2e 27 2e 50 48 | n.running.composer.commands.'.PH |
0300 | 50 5f 45 4f 4c 29 3b 0a 20 20 20 20 20 20 20 20 66 77 72 69 74 65 28 53 54 44 45 52 52 2c 20 27 | P_EOL);.........fwrite(STDERR,.' |
0320 | 55 70 64 61 74 65 20 41 50 43 2c 20 6f 72 20 73 65 74 20 61 70 63 2e 65 6e 61 62 6c 65 5f 63 6c | Update.APC,.or.set.apc.enable_cl |
0340 | 69 20 6f 72 20 61 70 63 2e 63 61 63 68 65 5f 62 79 5f 64 65 66 61 75 6c 74 20 74 6f 20 30 20 69 | i.or.apc.cache_by_default.to.0.i |
0360 | 6e 20 79 6f 75 72 20 70 68 70 2e 69 6e 69 2e 27 2e 50 48 50 5f 45 4f 4c 29 3b 0a 20 20 20 20 7d | n.your.php.ini.'.PHP_EOL);.....} |
0380 | 0a 7d 0a 0a 69 66 20 28 21 63 6c 61 73 73 5f 65 78 69 73 74 73 28 27 50 68 61 72 27 29 29 20 7b | .}..if.(!class_exists('Phar')).{ |
03a0 | 0a 20 20 20 20 65 63 68 6f 20 27 50 48 50 5c 27 73 20 70 68 61 72 20 65 78 74 65 6e 73 69 6f 6e | .....echo.'PHP\'s.phar.extension |
03c0 | 20 69 73 20 6d 69 73 73 69 6e 67 2e 20 43 6f 6d 70 6f 73 65 72 20 72 65 71 75 69 72 65 73 20 69 | .is.missing..Composer.requires.i |
03e0 | 74 20 74 6f 20 72 75 6e 2e 20 45 6e 61 62 6c 65 20 74 68 65 20 65 78 74 65 6e 73 69 6f 6e 20 6f | t.to.run..Enable.the.extension.o |
0400 | 72 20 72 65 63 6f 6d 70 69 6c 65 20 70 68 70 20 77 69 74 68 6f 75 74 20 2d 2d 64 69 73 61 62 6c | r.recompile.php.without.--disabl |
0420 | 65 2d 70 68 61 72 20 74 68 65 6e 20 74 72 79 20 61 67 61 69 6e 2e 27 20 2e 20 50 48 50 5f 45 4f | e-phar.then.try.again.'...PHP_EO |
0440 | 4c 3b 0a 20 20 20 20 65 78 69 74 28 31 29 3b 0a 7d 0a 0a 50 68 61 72 3a 3a 6d 61 70 50 68 61 72 | L;.....exit(1);.}..Phar::mapPhar |
0460 | 28 27 63 6f 6d 70 6f 73 65 72 2e 70 68 61 72 27 29 3b 0a 72 65 71 75 69 72 65 20 27 70 68 61 72 | ('composer.phar');.require.'phar |
0480 | 3a 2f 2f 63 6f 6d 70 6f 73 65 72 2e 70 68 61 72 2f 62 69 6e 2f 63 6f 6d 70 6f 73 65 72 27 3b 0a | ://composer.phar/bin/composer';. |
04a0 | 0a 5f 5f 48 41 4c 54 5f 43 4f 4d 50 49 4c 45 52 28 29 3b 20 3f 3e 0d 0a b6 bf 00 00 84 02 00 00 | .__HALT_COMPILER();.?>.......... |
04c0 | 11 00 00 00 01 00 0d 00 00 00 63 6f 6d 70 6f 73 65 72 2e 70 68 61 72 00 00 00 00 21 00 00 00 73 | ..........composer.phar....!...s |
04e0 | 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 41 64 76 69 73 6f 72 79 2f 41 75 64 69 74 6f 72 2e 70 68 70 | rc/Composer/Advisory/Auditor.php |
0500 | 1d 10 00 00 12 ad 00 63 1d 10 00 00 00 14 91 c0 a4 01 00 00 00 00 00 00 31 00 00 00 73 72 63 2f | .......c................1...src/ |
0520 | 43 6f 6d 70 6f 73 65 72 2f 41 64 76 69 73 6f 72 79 2f 50 61 72 74 69 61 6c 53 65 63 75 72 69 74 | Composer/Advisory/PartialSecurit |
0540 | 79 41 64 76 69 73 6f 72 79 2e 70 68 70 0a 04 00 00 12 ad 00 63 0a 04 00 00 24 7d 7a df a4 01 00 | yAdvisory.php.......c....$}z.... |
0560 | 00 00 00 00 00 2a 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 41 64 76 69 73 6f 72 79 2f 53 | .....*...src/Composer/Advisory/S |
0580 | 65 63 75 72 69 74 79 41 64 76 69 73 6f 72 79 2e 70 68 70 d3 02 00 00 12 ad 00 63 d3 02 00 00 aa | ecurityAdvisory.php.......c..... |
05a0 | 21 8e ab a4 01 00 00 00 00 00 00 2b 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 41 75 74 6f | !..........+...src/Composer/Auto |
05c0 | 6c 6f 61 64 2f 41 75 74 6f 6c 6f 61 64 47 65 6e 65 72 61 74 6f 72 2e 70 68 70 f6 80 00 00 12 ad | load/AutoloadGenerator.php...... |
05e0 | 00 63 f6 80 00 00 a3 1d 67 9a a4 01 00 00 00 00 00 00 2b 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 | .c......g.........+...src/Compos |
0600 | 65 72 2f 41 75 74 6f 6c 6f 61 64 2f 43 6c 61 73 73 4d 61 70 47 65 6e 65 72 61 74 6f 72 2e 70 68 | er/Autoload/ClassMapGenerator.ph |
0620 | 70 92 06 00 00 12 ad 00 63 92 06 00 00 8f a8 7c 53 a4 01 00 00 00 00 00 00 28 00 00 00 73 72 63 | p.......c......|S........(...src |
0640 | 2f 43 6f 6d 70 6f 73 65 72 2f 41 75 74 6f 6c 6f 61 64 2f 50 68 70 46 69 6c 65 43 6c 65 61 6e 65 | /Composer/Autoload/PhpFileCleane |
0660 | 72 2e 70 68 70 fe 0f 00 00 12 ad 00 63 fe 0f 00 00 e0 d1 6b 67 a4 01 00 00 00 00 00 00 16 00 00 | r.php.......c......kg........... |
0680 | 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 43 61 63 68 65 2e 70 68 70 c2 1a 00 00 12 ad 00 63 c2 | .src/Composer/Cache.php.......c. |
06a0 | 1a 00 00 fd 21 e5 eb a4 01 00 00 00 00 00 00 25 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f | ....!..........%...src/Composer/ |
06c0 | 43 6f 6d 6d 61 6e 64 2f 41 62 6f 75 74 43 6f 6d 6d 61 6e 64 2e 70 68 70 57 03 00 00 12 ad 00 63 | Command/AboutCommand.phpW......c |
06e0 | 57 03 00 00 e2 3a 86 21 a4 01 00 00 00 00 00 00 27 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 | W....:.!........'...src/Composer |
0700 | 2f 43 6f 6d 6d 61 6e 64 2f 41 72 63 68 69 76 65 43 6f 6d 6d 61 6e 64 2e 70 68 70 59 17 00 00 12 | /Command/ArchiveCommand.phpY.... |
0720 | ad 00 63 59 17 00 00 37 63 ae b5 a4 01 00 00 00 00 00 00 25 00 00 00 73 72 63 2f 43 6f 6d 70 6f | ..cY...7c..........%...src/Compo |
0740 | 73 65 72 2f 43 6f 6d 6d 61 6e 64 2f 41 75 64 69 74 43 6f 6d 6d 61 6e 64 2e 70 68 70 32 0a 00 00 | ser/Command/AuditCommand.php2... |
0760 | 12 ad 00 63 32 0a 00 00 20 68 c5 86 a4 01 00 00 00 00 00 00 24 00 00 00 73 72 63 2f 43 6f 6d 70 | ...c2....h..........$...src/Comp |
0780 | 6f 73 65 72 2f 43 6f 6d 6d 61 6e 64 2f 42 61 73 65 43 6f 6d 6d 61 6e 64 2e 70 68 70 e5 26 00 00 | oser/Command/BaseCommand.php.&.. |
07a0 | 12 ad 00 63 e5 26 00 00 4b b0 31 2d a4 01 00 00 00 00 00 00 2e 00 00 00 73 72 63 2f 43 6f 6d 70 | ...c.&..K.1-............src/Comp |
07c0 | 6f 73 65 72 2f 43 6f 6d 6d 61 6e 64 2f 42 61 73 65 44 65 70 65 6e 64 65 6e 63 79 43 6f 6d 6d 61 | oser/Command/BaseDependencyComma |
07e0 | 6e 64 2e 70 68 70 2c 1b 00 00 12 ad 00 63 2c 1b 00 00 ad f2 5f d5 a4 01 00 00 00 00 00 00 24 00 | nd.php,......c,....._.........$. |
0800 | 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 43 6f 6d 6d 61 6e 64 2f 42 75 6d 70 43 6f 6d 6d 61 | ..src/Composer/Command/BumpComma |
0820 | 6e 64 2e 70 68 70 d7 18 00 00 12 ad 00 63 d7 18 00 00 79 a5 5f a6 a4 01 00 00 00 00 00 00 31 00 | nd.php.......c....y._.........1. |
0840 | 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 43 6f 6d 6d 61 6e 64 2f 43 68 65 63 6b 50 6c 61 74 | ..src/Composer/Command/CheckPlat |
0860 | 66 6f 72 6d 52 65 71 73 43 6f 6d 6d 61 6e 64 2e 70 68 70 79 16 00 00 12 ad 00 63 79 16 00 00 cf | formReqsCommand.phpy......cy.... |
0880 | e1 ee 00 a4 01 00 00 00 00 00 00 2a 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 43 6f 6d 6d | ...........*...src/Composer/Comm |
08a0 | 61 6e 64 2f 43 6c 65 61 72 43 61 63 68 65 43 6f 6d 6d 61 6e 64 2e 70 68 70 12 09 00 00 12 ad 00 | and/ClearCacheCommand.php....... |
08c0 | 63 12 09 00 00 15 03 c5 2a a4 01 00 00 00 00 00 00 28 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 | c.......*........(...src/Compose |
08e0 | 72 2f 43 6f 6d 6d 61 6e 64 2f 43 6f 6d 70 6c 65 74 69 6f 6e 54 72 61 69 74 2e 70 68 70 57 13 00 | r/Command/CompletionTrait.phpW.. |
0900 | 00 12 ad 00 63 57 13 00 00 40 ce 8a f6 a4 01 00 00 00 00 00 00 26 00 00 00 73 72 63 2f 43 6f 6d | ....cW...@...........&...src/Com |
0920 | 70 6f 73 65 72 2f 43 6f 6d 6d 61 6e 64 2f 43 6f 6e 66 69 67 43 6f 6d 6d 61 6e 64 2e 70 68 70 a0 | poser/Command/ConfigCommand.php. |
0940 | 60 00 00 12 ad 00 63 a0 60 00 00 b2 61 6c f3 a4 01 00 00 00 00 00 00 2d 00 00 00 73 72 63 2f 43 | `.....c.`...al.........-...src/C |
0960 | 6f 6d 70 6f 73 65 72 2f 43 6f 6d 6d 61 6e 64 2f 43 72 65 61 74 65 50 72 6f 6a 65 63 74 43 6f 6d | omposer/Command/CreateProjectCom |
0980 | 6d 61 6e 64 2e 70 68 70 01 4a 00 00 12 ad 00 63 01 4a 00 00 00 4a 24 07 a4 01 00 00 00 00 00 00 | mand.php.J.....c.J...J$......... |
09a0 | 27 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 43 6f 6d 6d 61 6e 64 2f 44 65 70 65 6e 64 73 | '...src/Composer/Command/Depends |
09c0 | 43 6f 6d 6d 61 6e 64 2e 70 68 70 46 05 00 00 12 ad 00 63 46 05 00 00 7b 65 fc ee a4 01 00 00 00 | Command.phpF......cF...{e....... |
09e0 | 00 00 00 28 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 43 6f 6d 6d 61 6e 64 2f 44 69 61 67 | ...(...src/Composer/Command/Diag |
0a00 | 6e 6f 73 65 43 6f 6d 6d 61 6e 64 2e 70 68 70 e4 4e 00 00 12 ad 00 63 e4 4e 00 00 3b d4 ed 76 a4 | noseCommand.php.N.....c.N..;..v. |
0a20 | 01 00 00 00 00 00 00 2c 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 43 6f 6d 6d 61 6e 64 2f | .......,...src/Composer/Command/ |
0a40 | 44 75 6d 70 41 75 74 6f 6c 6f 61 64 43 6f 6d 6d 61 6e 64 2e 70 68 70 c8 11 00 00 12 ad 00 63 c8 | DumpAutoloadCommand.php.......c. |
0a60 | 11 00 00 e7 e2 2c 4b a4 01 00 00 00 00 00 00 24 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f | .....,K........$...src/Composer/ |
0a80 | 43 6f 6d 6d 61 6e 64 2f 45 78 65 63 43 6f 6d 6d 61 6e 64 2e 70 68 70 6c 0a 00 00 12 ad 00 63 6c | Command/ExecCommand.phpl......cl |
0aa0 | 0a 00 00 f3 3b ba 0a a4 01 00 00 00 00 00 00 24 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f | ....;..........$...src/Composer/ |
0ac0 | 43 6f 6d 6d 61 6e 64 2f 46 75 6e 64 43 6f 6d 6d 61 6e 64 2e 70 68 70 c1 0e 00 00 12 ad 00 63 c1 | Command/FundCommand.php.......c. |
0ae0 | 0e 00 00 35 60 c8 47 a4 01 00 00 00 00 00 00 26 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f | ...5`.G........&...src/Composer/ |
0b00 | 43 6f 6d 6d 61 6e 64 2f 47 6c 6f 62 61 6c 43 6f 6d 6d 61 6e 64 2e 70 68 70 81 0f 00 00 12 ad 00 | Command/GlobalCommand.php....... |
0b20 | 63 81 0f 00 00 0e 8a 18 1f a4 01 00 00 00 00 00 00 24 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 | c................$...src/Compose |
0b40 | 72 2f 43 6f 6d 6d 61 6e 64 2f 48 6f 6d 65 43 6f 6d 6d 61 6e 64 2e 70 68 70 5e 0f 00 00 12 ad 00 | r/Command/HomeCommand.php^...... |
0b60 | 63 5e 0f 00 00 eb 22 2b 43 a4 01 00 00 00 00 00 00 24 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 | c^...."+C........$...src/Compose |
0b80 | 72 2f 43 6f 6d 6d 61 6e 64 2f 49 6e 69 74 43 6f 6d 6d 61 6e 64 2e 70 68 70 b6 42 00 00 12 ad 00 | r/Command/InitCommand.php.B..... |
0ba0 | 63 b6 42 00 00 a2 53 82 c8 a4 01 00 00 00 00 00 00 27 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 | c.B...S..........'...src/Compose |
0bc0 | 72 2f 43 6f 6d 6d 61 6e 64 2f 49 6e 73 74 61 6c 6c 43 6f 6d 6d 61 6e 64 2e 70 68 70 8c 19 00 00 | r/Command/InstallCommand.php.... |
0be0 | 12 ad 00 63 8c 19 00 00 96 20 ed 21 a4 01 00 00 00 00 00 00 28 00 00 00 73 72 63 2f 43 6f 6d 70 | ...c.......!........(...src/Comp |
0c00 | 6f 73 65 72 2f 43 6f 6d 6d 61 6e 64 2f 4c 69 63 65 6e 73 65 73 43 6f 6d 6d 61 6e 64 2e 70 68 70 | oser/Command/LicensesCommand.php |
0c20 | bd 0f 00 00 12 ad 00 63 bd 0f 00 00 c6 83 69 5d a4 01 00 00 00 00 00 00 28 00 00 00 73 72 63 2f | .......c......i]........(...src/ |
0c40 | 43 6f 6d 70 6f 73 65 72 2f 43 6f 6d 6d 61 6e 64 2f 4f 75 74 64 61 74 65 64 43 6f 6d 6d 61 6e 64 | Composer/Command/OutdatedCommand |
0c60 | 2e 70 68 70 85 11 00 00 12 ad 00 63 85 11 00 00 a6 b6 85 f7 a4 01 00 00 00 00 00 00 2e 00 00 00 | .php.......c.................... |
0c80 | 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 43 6f 6d 6d 61 6e 64 2f 50 61 63 6b 61 67 65 44 69 73 63 | src/Composer/Command/PackageDisc |
0ca0 | 6f 76 65 72 79 54 72 61 69 74 2e 70 68 70 8c 34 00 00 12 ad 00 63 8c 34 00 00 04 8a 6c bf a4 01 | overyTrait.php.4.....c.4....l... |
0cc0 | 00 00 00 00 00 00 29 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 43 6f 6d 6d 61 6e 64 2f 50 | ......)...src/Composer/Command/P |
0ce0 | 72 6f 68 69 62 69 74 73 43 6f 6d 6d 61 6e 64 2e 70 68 70 e6 05 00 00 12 ad 00 63 e6 05 00 00 d2 | rohibitsCommand.php.......c..... |
0d00 | f1 a1 81 a4 01 00 00 00 00 00 00 29 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 43 6f 6d 6d | ...........)...src/Composer/Comm |
0d20 | 61 6e 64 2f 52 65 69 6e 73 74 61 6c 6c 43 6f 6d 6d 61 6e 64 2e 70 68 70 64 1a 00 00 12 ad 00 63 | and/ReinstallCommand.phpd......c |
0d40 | 64 1a 00 00 d4 66 e7 fa a4 01 00 00 00 00 00 00 26 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 | d....f..........&...src/Composer |
0d60 | 2f 43 6f 6d 6d 61 6e 64 2f 52 65 6d 6f 76 65 43 6f 6d 6d 61 6e 64 2e 70 68 70 00 2d 00 00 12 ad | /Command/RemoveCommand.php.-.... |
0d80 | 00 63 00 2d 00 00 fa b5 50 3c a4 01 00 00 00 00 00 00 27 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 | .c.-....P<........'...src/Compos |
0da0 | 65 72 2f 43 6f 6d 6d 61 6e 64 2f 52 65 71 75 69 72 65 43 6f 6d 6d 61 6e 64 2e 70 68 70 6b 49 00 | er/Command/RequireCommand.phpkI. |
0dc0 | 00 12 ad 00 63 6b 49 00 00 86 fd 49 2c a4 01 00 00 00 00 00 00 29 00 00 00 73 72 63 2f 43 6f 6d | ....ckI....I,........)...src/Com |
0de0 | 70 6f 73 65 72 2f 43 6f 6d 6d 61 6e 64 2f 52 75 6e 53 63 72 69 70 74 43 6f 6d 6d 61 6e 64 2e 70 | poser/Command/RunScriptCommand.p |
0e00 | 68 70 f8 0e 00 00 12 ad 00 63 f8 0e 00 00 96 88 36 25 a4 01 00 00 00 00 00 00 2b 00 00 00 73 72 | hp.......c......6%........+...sr |
0e20 | 63 2f 43 6f 6d 70 6f 73 65 72 2f 43 6f 6d 6d 61 6e 64 2f 53 63 72 69 70 74 41 6c 69 61 73 43 6f | c/Composer/Command/ScriptAliasCo |
0e40 | 6d 6d 61 6e 64 2e 70 68 70 bb 05 00 00 12 ad 00 63 bb 05 00 00 2c 48 44 cd a4 01 00 00 00 00 00 | mmand.php.......c....,HD........ |
0e60 | 00 26 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 43 6f 6d 6d 61 6e 64 2f 53 65 61 72 63 68 | .&...src/Composer/Command/Search |
0e80 | 43 6f 6d 6d 61 6e 64 2e 70 68 70 63 0f 00 00 12 ad 00 63 63 0f 00 00 36 bc 10 c6 a4 01 00 00 00 | Command.phpc......cc...6........ |
0ea0 | 00 00 00 2a 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 43 6f 6d 6d 61 6e 64 2f 53 65 6c 66 | ...*...src/Composer/Command/Self |
0ec0 | 55 70 64 61 74 65 43 6f 6d 6d 61 6e 64 2e 70 68 70 77 4b 00 00 12 ad 00 63 77 4b 00 00 c6 da 69 | UpdateCommand.phpwK.....cwK....i |
0ee0 | 75 a4 01 00 00 00 00 00 00 24 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 43 6f 6d 6d 61 6e | u........$...src/Composer/Comman |
0f00 | 64 2f 53 68 6f 77 43 6f 6d 6d 61 6e 64 2e 70 68 70 62 a3 00 00 12 ad 00 63 62 a3 00 00 76 93 bd | d/ShowCommand.phpb......cb...v.. |
0f20 | 47 a4 01 00 00 00 00 00 00 26 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 43 6f 6d 6d 61 6e | G........&...src/Composer/Comman |
0f40 | 64 2f 53 74 61 74 75 73 43 6f 6d 6d 61 6e 64 2e 70 68 70 55 16 00 00 12 ad 00 63 55 16 00 00 aa | d/StatusCommand.phpU......cU.... |
0f60 | de a9 aa a4 01 00 00 00 00 00 00 28 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 43 6f 6d 6d | ...........(...src/Composer/Comm |
0f80 | 61 6e 64 2f 53 75 67 67 65 73 74 73 43 6f 6d 6d 61 6e 64 2e 70 68 70 c9 0b 00 00 12 ad 00 63 c9 | and/SuggestsCommand.php.......c. |
0fa0 | 0b 00 00 f9 cf 66 6b a4 01 00 00 00 00 00 00 26 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f | .....fk........&...src/Composer/ |
0fc0 | 43 6f 6d 6d 61 6e 64 2f 55 70 64 61 74 65 43 6f 6d 6d 61 6e 64 2e 70 68 70 ea 32 00 00 12 ad 00 | Command/UpdateCommand.php.2..... |
0fe0 | 63 ea 32 00 00 be c3 25 03 a4 01 00 00 00 00 00 00 28 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 | c.2....%.........(...src/Compose |
1000 | 72 2f 43 6f 6d 6d 61 6e 64 2f 56 61 6c 69 64 61 74 65 43 6f 6d 6d 61 6e 64 2e 70 68 70 b3 20 00 | r/Command/ValidateCommand.php... |
1020 | 00 12 ad 00 63 b3 20 00 00 8d dd eb fe a4 01 00 00 00 00 00 00 19 00 00 00 73 72 63 2f 43 6f 6d | ....c....................src/Com |
1040 | 70 6f 73 65 72 2f 43 6f 6d 70 6f 73 65 72 2e 70 68 70 9d 07 00 00 12 ad 00 63 9d 07 00 00 4e 25 | poser/Composer.php.......c....N% |
1060 | e7 c4 a4 01 00 00 00 00 00 00 17 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 43 6f 6e 66 69 | ..............src/Composer/Confi |
1080 | 67 2e 70 68 70 f2 34 00 00 12 ad 00 63 f2 34 00 00 c2 7e ab 56 a4 01 00 00 00 00 00 00 2d 00 00 | g.php.4.....c.4...~.V........-.. |
10a0 | 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 43 6f 6e 66 69 67 2f 43 6f 6e 66 69 67 53 6f 75 72 63 | .src/Composer/Config/ConfigSourc |
10c0 | 65 49 6e 74 65 72 66 61 63 65 2e 70 68 70 ba 02 00 00 12 ad 00 63 ba 02 00 00 7f bd 18 d3 a4 01 | eInterface.php.......c.......... |
10e0 | 00 00 00 00 00 00 28 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 43 6f 6e 66 69 67 2f 4a 73 | ......(...src/Composer/Config/Js |
1100 | 6f 6e 43 6f 6e 66 69 67 53 6f 75 72 63 65 2e 70 68 70 63 1a 00 00 12 ad 00 63 63 1a 00 00 c8 21 | onConfigSource.phpc......cc....! |
1120 | 54 2d a4 01 00 00 00 00 00 00 24 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 43 6f 6e 73 6f | T-........$...src/Composer/Conso |
1140 | 6c 65 2f 41 70 70 6c 69 63 61 74 69 6f 6e 2e 70 68 70 a6 48 00 00 12 ad 00 63 a6 48 00 00 ee d8 | le/Application.php.H.....c.H.... |
1160 | 77 c3 a4 01 00 00 00 00 00 00 2a 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 43 6f 6e 73 6f | w.........*...src/Composer/Conso |
1180 | 6c 65 2f 47 69 74 68 75 62 41 63 74 69 6f 6e 45 72 72 6f 72 2e 70 68 70 0f 05 00 00 12 ad 00 63 | le/GithubActionError.php.......c |
11a0 | 0f 05 00 00 60 b1 89 e6 a4 01 00 00 00 00 00 00 2c 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 | ....`...........,...src/Composer |
11c0 | 2f 43 6f 6e 73 6f 6c 65 2f 48 74 6d 6c 4f 75 74 70 75 74 46 6f 72 6d 61 74 74 65 72 2e 70 68 70 | /Console/HtmlOutputFormatter.php |
11e0 | 1e 07 00 00 12 ad 00 63 1e 07 00 00 5b bf 4b 2a a4 01 00 00 00 00 00 00 2c 00 00 00 73 72 63 2f | .......c....[.K*........,...src/ |
1200 | 43 6f 6d 70 6f 73 65 72 2f 43 6f 6e 73 6f 6c 65 2f 49 6e 70 75 74 2f 49 6e 70 75 74 41 72 67 75 | Composer/Console/Input/InputArgu |
1220 | 6d 65 6e 74 2e 70 68 70 b6 04 00 00 12 ad 00 63 b6 04 00 00 aa 0f bc 4b a4 01 00 00 00 00 00 00 | ment.php.......c.......K........ |
1240 | 2a 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 43 6f 6e 73 6f 6c 65 2f 49 6e 70 75 74 2f 49 | *...src/Composer/Console/Input/I |
1260 | 6e 70 75 74 4f 70 74 69 6f 6e 2e 70 68 70 67 05 00 00 12 ad 00 63 67 05 00 00 88 37 27 34 a4 01 | nputOption.phpg......cg....7'4.. |
1280 | 00 00 00 00 00 00 2d 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 44 65 70 65 6e 64 65 6e 63 | ......-...src/Composer/Dependenc |
12a0 | 79 52 65 73 6f 6c 76 65 72 2f 44 65 63 69 73 69 6f 6e 73 2e 70 68 70 8c 11 00 00 12 ad 00 63 8c | yResolver/Decisions.php.......c. |
12c0 | 11 00 00 bf 5d 06 a2 a4 01 00 00 00 00 00 00 31 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f | ....]..........1...src/Composer/ |
12e0 | 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 2f 44 65 66 61 75 6c 74 50 6f 6c 69 63 79 | DependencyResolver/DefaultPolicy |
1300 | 2e 70 68 70 78 14 00 00 12 ad 00 63 78 14 00 00 a3 cb 2f 55 a4 01 00 00 00 00 00 00 2f 00 00 00 | .phpx......cx...../U......../... |
1320 | 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 2f | src/Composer/DependencyResolver/ |
1340 | 47 65 6e 65 72 69 63 52 75 6c 65 2e 70 68 70 96 03 00 00 12 ad 00 63 96 03 00 00 5a 19 29 ed a4 | GenericRule.php.......c....Z.).. |
1360 | 01 00 00 00 00 00 00 38 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 44 65 70 65 6e 64 65 6e | .......8...src/Composer/Dependen |
1380 | 63 79 52 65 73 6f 6c 76 65 72 2f 4c 6f 63 61 6c 52 65 70 6f 54 72 61 6e 73 61 63 74 69 6f 6e 2e | cyResolver/LocalRepoTransaction. |
13a0 | 70 68 70 bd 01 00 00 12 ad 00 63 bd 01 00 00 df 9a 48 9a a4 01 00 00 00 00 00 00 33 00 00 00 73 | php.......c......H.........3...s |
13c0 | 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 2f 4c | rc/Composer/DependencyResolver/L |
13e0 | 6f 63 6b 54 72 61 6e 73 61 63 74 69 6f 6e 2e 70 68 70 49 0b 00 00 12 ad 00 63 49 0b 00 00 56 e8 | ockTransaction.phpI......cI...V. |
1400 | 90 af a4 01 00 00 00 00 00 00 35 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 44 65 70 65 6e | ..........5...src/Composer/Depen |
1420 | 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 2f 4d 75 6c 74 69 43 6f 6e 66 6c 69 63 74 52 75 6c 65 2e | dencyResolver/MultiConflictRule. |
1440 | 70 68 70 2b 05 00 00 12 ad 00 63 2b 05 00 00 0f c3 77 ec a4 01 00 00 00 00 00 00 3e 00 00 00 73 | php+......c+.....w.........>...s |
1460 | 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 2f 4f | rc/Composer/DependencyResolver/O |
1480 | 70 65 72 61 74 69 6f 6e 2f 49 6e 73 74 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 2e 70 68 70 ff 02 00 | peration/InstallOperation.php... |
14a0 | 00 12 ad 00 63 ff 02 00 00 3d fa a7 a7 a4 01 00 00 00 00 00 00 49 00 00 00 73 72 63 2f 43 6f 6d | ....c....=...........I...src/Com |
14c0 | 70 6f 73 65 72 2f 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 2f 4f 70 65 72 61 74 69 | poser/DependencyResolver/Operati |
14e0 | 6f 6e 2f 4d 61 72 6b 41 6c 69 61 73 49 6e 73 74 61 6c 6c 65 64 4f 70 65 72 61 74 69 6f 6e 2e 70 | on/MarkAliasInstalledOperation.p |
1500 | 68 70 16 03 00 00 12 ad 00 63 16 03 00 00 00 31 4e 4a a4 01 00 00 00 00 00 00 4b 00 00 00 73 72 | hp.......c.....1NJ........K...sr |
1520 | 63 2f 43 6f 6d 70 6f 73 65 72 2f 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 2f 4f 70 | c/Composer/DependencyResolver/Op |
1540 | 65 72 61 74 69 6f 6e 2f 4d 61 72 6b 41 6c 69 61 73 55 6e 69 6e 73 74 61 6c 6c 65 64 4f 70 65 72 | eration/MarkAliasUninstalledOper |
1560 | 61 74 69 6f 6e 2e 70 68 70 1c 03 00 00 12 ad 00 63 1c 03 00 00 74 77 0d 0d a4 01 00 00 00 00 00 | ation.php.......c....tw......... |
1580 | 00 40 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f | .@...src/Composer/DependencyReso |
15a0 | 6c 76 65 72 2f 4f 70 65 72 61 74 69 6f 6e 2f 4f 70 65 72 61 74 69 6f 6e 49 6e 74 65 72 66 61 63 | lver/Operation/OperationInterfac |
15c0 | 65 2e 70 68 70 f8 00 00 00 12 ad 00 63 f8 00 00 00 16 f7 57 fd a4 01 00 00 00 00 00 00 3d 00 00 | e.php.......c......W.........=.. |
15e0 | 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 | .src/Composer/DependencyResolver |
1600 | 2f 4f 70 65 72 61 74 69 6f 6e 2f 53 6f 6c 76 65 72 4f 70 65 72 61 74 69 6f 6e 2e 70 68 70 48 01 | /Operation/SolverOperation.phpH. |
1620 | 00 00 12 ad 00 63 48 01 00 00 04 1a 15 a7 a4 01 00 00 00 00 00 00 40 00 00 00 73 72 63 2f 43 6f | .....cH...............@...src/Co |
1640 | 6d 70 6f 73 65 72 2f 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 2f 4f 70 65 72 61 74 | mposer/DependencyResolver/Operat |
1660 | 69 6f 6e 2f 55 6e 69 6e 73 74 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 2e 70 68 70 e7 02 00 00 12 ad | ion/UninstallOperation.php...... |
1680 | 00 63 e7 02 00 00 7c c1 52 13 a4 01 00 00 00 00 00 00 3d 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 | .c....|.R.........=...src/Compos |
16a0 | 65 72 2f 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 2f 4f 70 65 72 61 74 69 6f 6e 2f | er/DependencyResolver/Operation/ |
16c0 | 55 70 64 61 74 65 4f 70 65 72 61 74 69 6f 6e 2e 70 68 70 9f 07 00 00 12 ad 00 63 9f 07 00 00 dc | UpdateOperation.php.......c..... |
16e0 | 37 e6 a4 a4 01 00 00 00 00 00 00 33 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 44 65 70 65 | 7..........3...src/Composer/Depe |
1700 | 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 2f 50 6f 6c 69 63 79 49 6e 74 65 72 66 61 63 65 2e 70 | ndencyResolver/PolicyInterface.p |
1720 | 68 70 9e 01 00 00 12 ad 00 63 9e 01 00 00 f8 01 ce e1 a4 01 00 00 00 00 00 00 28 00 00 00 73 72 | hp.......c................(...sr |
1740 | 63 2f 43 6f 6d 70 6f 73 65 72 2f 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 2f 50 6f | c/Composer/DependencyResolver/Po |
1760 | 6f 6c 2e 70 68 70 a0 12 00 00 12 ad 00 63 a0 12 00 00 78 46 21 17 a4 01 00 00 00 00 00 00 2f 00 | ol.php.......c....xF!........./. |
1780 | 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 | ..src/Composer/DependencyResolve |
17a0 | 72 2f 50 6f 6f 6c 42 75 69 6c 64 65 72 2e 70 68 70 fb 41 00 00 12 ad 00 63 fb 41 00 00 1c 06 47 | r/PoolBuilder.php.A.....c.A....G |
17c0 | 56 a4 01 00 00 00 00 00 00 31 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 44 65 70 65 6e 64 | V........1...src/Composer/Depend |
17e0 | 65 6e 63 79 52 65 73 6f 6c 76 65 72 2f 50 6f 6f 6c 4f 70 74 69 6d 69 7a 65 72 2e 70 68 70 db 29 | encyResolver/PoolOptimizer.php.) |
1800 | 00 00 12 ad 00 63 db 29 00 00 a5 21 12 5c a4 01 00 00 00 00 00 00 2b 00 00 00 73 72 63 2f 43 6f | .....c.)...!.\........+...src/Co |
1820 | 6d 70 6f 73 65 72 2f 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 2f 50 72 6f 62 6c 65 | mposer/DependencyResolver/Proble |
1840 | 6d 2e 70 68 70 1c 4c 00 00 12 ad 00 63 1c 4c 00 00 00 01 c0 4f a4 01 00 00 00 00 00 00 2b 00 00 | m.php.L.....c.L.....O........+.. |
1860 | 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 | .src/Composer/DependencyResolver |
1880 | 2f 52 65 71 75 65 73 74 2e 70 68 70 ad 0f 00 00 12 ad 00 63 ad 0f 00 00 cd 2a ac d6 a4 01 00 00 | /Request.php.......c.....*...... |
18a0 | 00 00 00 00 28 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 44 65 70 65 6e 64 65 6e 63 79 52 | ....(...src/Composer/DependencyR |
18c0 | 65 73 6f 6c 76 65 72 2f 52 75 6c 65 2e 70 68 70 3c 30 00 00 12 ad 00 63 3c 30 00 00 c0 b3 f9 04 | esolver/Rule.php<0.....c<0...... |
18e0 | a4 01 00 00 00 00 00 00 31 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 44 65 70 65 6e 64 65 | ........1...src/Composer/Depende |
1900 | 6e 63 79 52 65 73 6f 6c 76 65 72 2f 52 75 6c 65 32 4c 69 74 65 72 61 6c 73 2e 70 68 70 01 05 00 | ncyResolver/Rule2Literals.php... |
1920 | 00 12 ad 00 63 01 05 00 00 0f 33 76 fe a4 01 00 00 00 00 00 00 2b 00 00 00 73 72 63 2f 43 6f 6d | ....c.....3v.........+...src/Com |
1940 | 70 6f 73 65 72 2f 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 2f 52 75 6c 65 53 65 74 | poser/DependencyResolver/RuleSet |
1960 | 2e 70 68 70 af 0b 00 00 12 ad 00 63 af 0b 00 00 54 0c 3a b7 a4 01 00 00 00 00 00 00 34 00 00 00 | .php.......c....T.:.........4... |
1980 | 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 2f | src/Composer/DependencyResolver/ |
19a0 | 52 75 6c 65 53 65 74 47 65 6e 65 72 61 74 6f 72 2e 70 68 70 36 1b 00 00 12 ad 00 63 36 1b 00 00 | RuleSetGenerator.php6......c6... |
19c0 | af 52 5c 73 a4 01 00 00 00 00 00 00 33 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 44 65 70 | .R\s........3...src/Composer/Dep |
19e0 | 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 2f 52 75 6c 65 53 65 74 49 74 65 72 61 74 6f 72 2e | endencyResolver/RuleSetIterator. |
1a00 | 70 68 70 f5 05 00 00 12 ad 00 63 f5 05 00 00 9c 0c 79 13 a4 01 00 00 00 00 00 00 32 00 00 00 73 | php.......c......y.........2...s |
1a20 | 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 2f 52 | rc/Composer/DependencyResolver/R |
1a40 | 75 6c 65 57 61 74 63 68 43 68 61 69 6e 2e 70 68 70 7b 01 00 00 12 ad 00 63 7b 01 00 00 82 68 f3 | uleWatchChain.php{......c{....h. |
1a60 | 44 a4 01 00 00 00 00 00 00 32 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 44 65 70 65 6e 64 | D........2...src/Composer/Depend |
1a80 | 65 6e 63 79 52 65 73 6f 6c 76 65 72 2f 52 75 6c 65 57 61 74 63 68 47 72 61 70 68 2e 70 68 70 9c | encyResolver/RuleWatchGraph.php. |
1aa0 | 09 00 00 12 ad 00 63 9c 09 00 00 5a 9c 7b 7c a4 01 00 00 00 00 00 00 31 00 00 00 73 72 63 2f 43 | ......c....Z.{|........1...src/C |
1ac0 | 6f 6d 70 6f 73 65 72 2f 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 2f 52 75 6c 65 57 | omposer/DependencyResolver/RuleW |
1ae0 | 61 74 63 68 4e 6f 64 65 2e 70 68 70 76 04 00 00 12 ad 00 63 76 04 00 00 70 99 08 b7 a4 01 00 00 | atchNode.phpv......cv...p....... |
1b00 | 00 00 00 00 2a 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 44 65 70 65 6e 64 65 6e 63 79 52 | ....*...src/Composer/DependencyR |
1b20 | 65 73 6f 6c 76 65 72 2f 53 6f 6c 76 65 72 2e 70 68 70 9e 39 00 00 12 ad 00 63 9e 39 00 00 76 8b | esolver/Solver.php.9.....c.9..v. |
1b40 | 7b fe a4 01 00 00 00 00 00 00 36 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 44 65 70 65 6e | {.........6...src/Composer/Depen |
1b60 | 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 2f 53 6f 6c 76 65 72 42 75 67 45 78 63 65 70 74 69 6f 6e | dencyResolver/SolverBugException |
1b80 | 2e 70 68 70 b9 01 00 00 12 ad 00 63 b9 01 00 00 7a ad 16 3d a4 01 00 00 00 00 00 00 3b 00 00 00 | .php.......c....z..=........;... |
1ba0 | 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 2f | src/Composer/DependencyResolver/ |
1bc0 | 53 6f 6c 76 65 72 50 72 6f 62 6c 65 6d 73 45 78 63 65 70 74 69 6f 6e 2e 70 68 70 9c 10 00 00 12 | SolverProblemsException.php..... |
1be0 | ad 00 63 9c 10 00 00 bc 2e bd c0 a4 01 00 00 00 00 00 00 2f 00 00 00 73 72 63 2f 43 6f 6d 70 6f | ..c................/...src/Compo |
1c00 | 73 65 72 2f 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 2f 54 72 61 6e 73 61 63 74 69 | ser/DependencyResolver/Transacti |
1c20 | 6f 6e 2e 70 68 70 2d 1b 00 00 12 ad 00 63 2d 1b 00 00 c9 e9 01 93 a4 01 00 00 00 00 00 00 2d 00 | on.php-......c-...............-. |
1c40 | 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 44 6f 77 6e 6c 6f 61 64 65 72 2f 41 72 63 68 69 76 | ..src/Composer/Downloader/Archiv |
1c60 | 65 44 6f 77 6e 6c 6f 61 64 65 72 2e 70 68 70 c7 11 00 00 12 ad 00 63 c7 11 00 00 22 36 46 42 a4 | eDownloader.php.......c...."6FB. |
1c80 | 01 00 00 00 00 00 00 31 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 44 6f 77 6e 6c 6f 61 64 | .......1...src/Composer/Download |
1ca0 | 65 72 2f 43 68 61 6e 67 65 52 65 70 6f 72 74 49 6e 74 65 72 66 61 63 65 2e 70 68 70 f5 00 00 00 | er/ChangeReportInterface.php.... |
1cc0 | 12 ad 00 63 f5 00 00 00 ad c3 c2 42 a4 01 00 00 00 00 00 00 2b 00 00 00 73 72 63 2f 43 6f 6d 70 | ...c.......B........+...src/Comp |
1ce0 | 6f 73 65 72 2f 44 6f 77 6e 6c 6f 61 64 65 72 2f 44 6f 77 6e 6c 6f 61 64 4d 61 6e 61 67 65 72 2e | oser/Downloader/DownloadManager. |
1d00 | 70 68 70 a4 1f 00 00 12 ad 00 63 a4 1f 00 00 b4 1f 63 be a4 01 00 00 00 00 00 00 2f 00 00 00 73 | php.......c......c........./...s |
1d20 | 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 44 6f 77 6e 6c 6f 61 64 65 72 2f 44 6f 77 6e 6c 6f 61 64 65 | rc/Composer/Downloader/Downloade |
1d40 | 72 49 6e 74 65 72 66 61 63 65 2e 70 68 70 cd 03 00 00 12 ad 00 63 cd 03 00 00 95 ca 47 de a4 01 | rInterface.php.......c......G... |
1d60 | 00 00 00 00 00 00 33 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 44 6f 77 6e 6c 6f 61 64 65 | ......3...src/Composer/Downloade |
1d80 | 72 2f 44 76 63 73 44 6f 77 6e 6c 6f 61 64 65 72 49 6e 74 65 72 66 61 63 65 2e 70 68 70 fa 00 00 | r/DvcsDownloaderInterface.php... |
1da0 | 00 12 ad 00 63 fa 00 00 00 e0 11 25 27 a4 01 00 00 00 00 00 00 2a 00 00 00 73 72 63 2f 43 6f 6d | ....c......%'........*...src/Com |
1dc0 | 70 6f 73 65 72 2f 44 6f 77 6e 6c 6f 61 64 65 72 2f 46 69 6c 65 44 6f 77 6e 6c 6f 61 64 65 72 2e | poser/Downloader/FileDownloader. |
1de0 | 70 68 70 e9 2f 00 00 12 ad 00 63 e9 2f 00 00 87 7a d6 e1 a4 01 00 00 00 00 00 00 2f 00 00 00 73 | php./.....c./...z........../...s |
1e00 | 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 44 6f 77 6e 6c 6f 61 64 65 72 2f 46 69 6c 65 73 79 73 74 65 | rc/Composer/Downloader/Filesyste |
1e20 | 6d 45 78 63 65 70 74 69 6f 6e 2e 70 68 70 2f 01 00 00 12 ad 00 63 2f 01 00 00 21 8b e5 26 a4 01 | mException.php/......c/...!..&.. |
1e40 | 00 00 00 00 00 00 2c 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 44 6f 77 6e 6c 6f 61 64 65 | ......,...src/Composer/Downloade |
1e60 | 72 2f 46 6f 73 73 69 6c 44 6f 77 6e 6c 6f 61 64 65 72 2e 70 68 70 69 0d 00 00 12 ad 00 63 69 0d | r/FossilDownloader.phpi......ci. |
1e80 | 00 00 a1 8b 5a 1a a4 01 00 00 00 00 00 00 29 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 44 | ....Z.........)...src/Composer/D |
1ea0 | 6f 77 6e 6c 6f 61 64 65 72 2f 47 69 74 44 6f 77 6e 6c 6f 61 64 65 72 2e 70 68 70 ce 44 00 00 12 | ownloader/GitDownloader.php.D... |
1ec0 | ad 00 63 ce 44 00 00 4a fe 0e a2 a4 01 00 00 00 00 00 00 2a 00 00 00 73 72 63 2f 43 6f 6d 70 6f | ..c.D..J...........*...src/Compo |
1ee0 | 73 65 72 2f 44 6f 77 6e 6c 6f 61 64 65 72 2f 47 7a 69 70 44 6f 77 6e 6c 6f 61 64 65 72 2e 70 68 | ser/Downloader/GzipDownloader.ph |
1f00 | 70 b1 05 00 00 12 ad 00 63 b1 05 00 00 ed 89 76 f7 a4 01 00 00 00 00 00 00 28 00 00 00 73 72 63 | p.......c......v.........(...src |
1f20 | 2f 43 6f 6d 70 6f 73 65 72 2f 44 6f 77 6e 6c 6f 61 64 65 72 2f 48 67 44 6f 77 6e 6c 6f 61 64 65 | /Composer/Downloader/HgDownloade |
1f40 | 72 2e 70 68 70 3f 0b 00 00 12 ad 00 63 3f 0b 00 00 80 2f 8c 12 a4 01 00 00 00 00 00 00 38 00 00 | r.php?......c?..../..........8.. |
1f60 | 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 44 6f 77 6e 6c 6f 61 64 65 72 2f 4d 61 78 46 69 6c 65 | .src/Composer/Downloader/MaxFile |
1f80 | 53 69 7a 65 45 78 63 65 65 64 65 64 45 78 63 65 70 74 69 6f 6e 2e 70 68 70 8c 00 00 00 12 ad 00 | SizeExceededException.php....... |
1fa0 | 63 8c 00 00 00 da ba 1d d4 a4 01 00 00 00 00 00 00 2a 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 | c................*...src/Compose |
1fc0 | 72 2f 44 6f 77 6e 6c 6f 61 64 65 72 2f 50 61 74 68 44 6f 77 6e 6c 6f 61 64 65 72 2e 70 68 70 2a | r/Downloader/PathDownloader.php* |
1fe0 | 1f 00 00 12 ad 00 63 2a 1f 00 00 af 13 3f 61 a4 01 00 00 00 00 00 00 2e 00 00 00 73 72 63 2f 43 | ......c*.....?a............src/C |
2000 | 6f 6d 70 6f 73 65 72 2f 44 6f 77 6e 6c 6f 61 64 65 72 2f 50 65 72 66 6f 72 63 65 44 6f 77 6e 6c | omposer/Downloader/PerforceDownl |
2020 | 6f 61 64 65 72 2e 70 68 70 8b 09 00 00 12 ad 00 63 8b 09 00 00 90 3c ad 9d a4 01 00 00 00 00 00 | oader.php.......c.....<......... |
2040 | 00 2a 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 44 6f 77 6e 6c 6f 61 64 65 72 2f 50 68 61 | .*...src/Composer/Downloader/Pha |
2060 | 72 44 6f 77 6e 6c 6f 61 64 65 72 2e 70 68 70 aa 01 00 00 12 ad 00 63 aa 01 00 00 58 c8 c8 12 a4 | rDownloader.php.......c....X.... |
2080 | 01 00 00 00 00 00 00 29 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 44 6f 77 6e 6c 6f 61 64 | .......)...src/Composer/Download |
20a0 | 65 72 2f 52 61 72 44 6f 77 6e 6c 6f 61 64 65 72 2e 70 68 70 9b 06 00 00 12 ad 00 63 9b 06 00 00 | er/RarDownloader.php.......c.... |
20c0 | 1a 47 12 55 a4 01 00 00 00 00 00 00 29 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 44 6f 77 | .G.U........)...src/Composer/Dow |
20e0 | 6e 6c 6f 61 64 65 72 2f 53 76 6e 44 6f 77 6e 6c 6f 61 64 65 72 2e 70 68 70 74 18 00 00 12 ad 00 | nloader/SvnDownloader.phpt...... |
2100 | 63 74 18 00 00 e0 a0 2f 2a a4 01 00 00 00 00 00 00 29 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 | ct...../*........)...src/Compose |
2120 | 72 2f 44 6f 77 6e 6c 6f 61 64 65 72 2f 54 61 72 44 6f 77 6e 6c 6f 61 64 65 72 2e 70 68 70 a8 01 | r/Downloader/TarDownloader.php.. |
2140 | 00 00 12 ad 00 63 a8 01 00 00 d7 72 df 82 a4 01 00 00 00 00 00 00 2e 00 00 00 73 72 63 2f 43 6f | .....c.....r..............src/Co |
2160 | 6d 70 6f 73 65 72 2f 44 6f 77 6e 6c 6f 61 64 65 72 2f 54 72 61 6e 73 70 6f 72 74 45 78 63 65 70 | mposer/Downloader/TransportExcep |
2180 | 74 69 6f 6e 2e 70 68 70 73 03 00 00 12 ad 00 63 73 03 00 00 15 f8 05 0d a4 01 00 00 00 00 00 00 | tion.phps......cs............... |
21a0 | 39 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 44 6f 77 6e 6c 6f 61 64 65 72 2f 56 63 73 43 | 9...src/Composer/Downloader/VcsC |
21c0 | 61 70 61 62 6c 65 44 6f 77 6e 6c 6f 61 64 65 72 49 6e 74 65 72 66 61 63 65 2e 70 68 70 fd 00 00 | apableDownloaderInterface.php... |
21e0 | 00 12 ad 00 63 fd 00 00 00 1d e4 36 a4 a4 01 00 00 00 00 00 00 29 00 00 00 73 72 63 2f 43 6f 6d | ....c......6.........)...src/Com |
2200 | 70 6f 73 65 72 2f 44 6f 77 6e 6c 6f 61 64 65 72 2f 56 63 73 44 6f 77 6e 6c 6f 61 64 65 72 2e 70 | poser/Downloader/VcsDownloader.p |
2220 | 68 70 35 1d 00 00 12 ad 00 63 35 1d 00 00 1e e7 ac 07 a4 01 00 00 00 00 00 00 28 00 00 00 73 72 | hp5......c5...............(...sr |
2240 | 63 2f 43 6f 6d 70 6f 73 65 72 2f 44 6f 77 6e 6c 6f 61 64 65 72 2f 58 7a 44 6f 77 6e 6c 6f 61 64 | c/Composer/Downloader/XzDownload |
2260 | 65 72 2e 70 68 70 ad 02 00 00 12 ad 00 63 ad 02 00 00 26 d8 72 82 a4 01 00 00 00 00 00 00 29 00 | er.php.......c....&.r.........). |
2280 | 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 44 6f 77 6e 6c 6f 61 64 65 72 2f 5a 69 70 44 6f 77 | ..src/Composer/Downloader/ZipDow |
22a0 | 6e 6c 6f 61 64 65 72 2e 70 68 70 47 20 00 00 12 ad 00 63 47 20 00 00 f2 df 5b 26 a4 01 00 00 00 | nloader.phpG......cG.....[&..... |
22c0 | 00 00 00 26 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 45 76 65 6e 74 44 69 73 70 61 74 63 | ...&...src/Composer/EventDispatc |
22e0 | 68 65 72 2f 45 76 65 6e 74 2e 70 68 70 d8 02 00 00 12 ad 00 63 d8 02 00 00 85 f7 a1 f0 a4 01 00 | her/Event.php.......c........... |
2300 | 00 00 00 00 00 30 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 45 76 65 6e 74 44 69 73 70 61 | .....0...src/Composer/EventDispa |
2320 | 74 63 68 65 72 2f 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 2e 70 68 70 38 36 00 00 12 ad 00 | tcher/EventDispatcher.php86..... |
2340 | 63 38 36 00 00 2f 27 20 47 a4 01 00 00 00 00 00 00 39 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 | c86../'.G........9...src/Compose |
2360 | 72 2f 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 2f 45 76 65 6e 74 53 75 62 73 63 72 69 62 65 | r/EventDispatcher/EventSubscribe |
2380 | 72 49 6e 74 65 72 66 61 63 65 2e 70 68 70 c2 00 00 00 12 ad 00 63 c2 00 00 00 7d 3d e9 08 a4 01 | rInterface.php.......c....}=.... |
23a0 | 00 00 00 00 00 00 39 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 45 76 65 6e 74 44 69 73 70 | ......9...src/Composer/EventDisp |
23c0 | 61 74 63 68 65 72 2f 53 63 72 69 70 74 45 78 65 63 75 74 69 6f 6e 45 78 63 65 70 74 69 6f 6e 2e | atcher/ScriptExecutionException. |
23e0 | 70 68 70 91 00 00 00 12 ad 00 63 91 00 00 00 58 76 e8 cf a4 01 00 00 00 00 00 00 39 00 00 00 73 | php.......c....Xv..........9...s |
2400 | 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 45 78 63 65 70 74 69 6f 6e 2f 49 72 72 65 63 6f 76 65 72 61 | rc/Composer/Exception/Irrecovera |
2420 | 62 6c 65 44 6f 77 6e 6c 6f 61 64 45 78 63 65 70 74 69 6f 6e 2e 70 68 70 8f 00 00 00 12 ad 00 63 | bleDownloadException.php.......c |
2440 | 8f 00 00 00 30 de 34 0d a4 01 00 00 00 00 00 00 29 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 | ....0.4.........)...src/Composer |
2460 | 2f 45 78 63 65 70 74 69 6f 6e 2f 4e 6f 53 73 6c 45 78 63 65 70 74 69 6f 6e 2e 70 68 70 81 00 00 | /Exception/NoSslException.php... |
2480 | 00 12 ad 00 63 81 00 00 00 d8 55 a6 d2 a4 01 00 00 00 00 00 00 18 00 00 00 73 72 63 2f 43 6f 6d | ....c.....U..............src/Com |
24a0 | 70 6f 73 65 72 2f 46 61 63 74 6f 72 79 2e 70 68 70 ac 4f 00 00 12 ad 00 63 ac 4f 00 00 44 dd da | poser/Factory.php.O.....c.O..D.. |
24c0 | 32 a4 01 00 00 00 00 00 00 54 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 46 69 6c 74 65 72 | 2........T...src/Composer/Filter |
24e0 | 2f 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 2f 49 67 6e 6f 72 | /PlatformRequirementFilter/Ignor |
2500 | 65 41 6c 6c 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 2e 70 68 | eAllPlatformRequirementFilter.ph |
2520 | 70 53 01 00 00 12 ad 00 63 53 01 00 00 7e 4a 1d e5 a4 01 00 00 00 00 00 00 55 00 00 00 73 72 63 | pS......cS...~J..........U...src |
2540 | 2f 43 6f 6d 70 6f 73 65 72 2f 46 69 6c 74 65 72 2f 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 | /Composer/Filter/PlatformRequire |
2560 | 6d 65 6e 74 46 69 6c 74 65 72 2f 49 67 6e 6f 72 65 4c 69 73 74 50 6c 61 74 66 6f 72 6d 52 65 71 | mentFilter/IgnoreListPlatformReq |
2580 | 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 2e 70 68 70 13 07 00 00 12 ad 00 63 13 07 00 00 c0 1e | uirementFilter.php.......c...... |
25a0 | 9a 80 a4 01 00 00 00 00 00 00 58 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 46 69 6c 74 65 | ..........X...src/Composer/Filte |
25c0 | 72 2f 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 2f 49 67 6e 6f | r/PlatformRequirementFilter/Igno |
25e0 | 72 65 4e 6f 74 68 69 6e 67 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 | reNothingPlatformRequirementFilt |
2600 | 65 72 2e 70 68 70 07 01 00 00 12 ad 00 63 07 01 00 00 7e ba 26 23 a4 01 00 00 00 00 00 00 52 00 | er.php.......c....~.&#........R. |
2620 | 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 46 69 6c 74 65 72 2f 50 6c 61 74 66 6f 72 6d 52 65 | ..src/Composer/Filter/PlatformRe |
2640 | 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 2f 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d | quirementFilter/PlatformRequirem |
2660 | 65 6e 74 46 69 6c 74 65 72 46 61 63 74 6f 72 79 2e 70 68 70 77 03 00 00 12 ad 00 63 77 03 00 00 | entFilterFactory.phpw......cw... |
2680 | d1 54 03 bf a4 01 00 00 00 00 00 00 54 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 46 69 6c | .T..........T...src/Composer/Fil |
26a0 | 74 65 72 2f 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 2f 50 6c | ter/PlatformRequirementFilter/Pl |
26c0 | 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 49 6e 74 65 72 66 61 63 65 | atformRequirementFilterInterface |
26e0 | 2e 70 68 70 bf 00 00 00 12 ad 00 63 bf 00 00 00 d7 1c 80 6e a4 01 00 00 00 00 00 00 1a 00 00 00 | .php.......c.......n............ |
2700 | 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 49 4f 2f 42 61 73 65 49 4f 2e 70 68 70 97 12 00 00 12 ad | src/Composer/IO/BaseIO.php...... |
2720 | 00 63 97 12 00 00 34 12 eb d5 a4 01 00 00 00 00 00 00 1c 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 | .c....4...............src/Compos |
2740 | 65 72 2f 49 4f 2f 42 75 66 66 65 72 49 4f 2e 70 68 70 3b 07 00 00 12 ad 00 63 3b 07 00 00 d0 55 | er/IO/BufferIO.php;......c;....U |
2760 | 76 a7 a4 01 00 00 00 00 00 00 1d 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 49 4f 2f 43 6f | v.............src/Composer/IO/Co |
2780 | 6e 73 6f 6c 65 49 4f 2e 70 68 70 7d 19 00 00 12 ad 00 63 7d 19 00 00 4d af cd d3 a4 01 00 00 00 | nsoleIO.php}......c}...M........ |
27a0 | 00 00 00 1f 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 49 4f 2f 49 4f 49 6e 74 65 72 66 61 | .......src/Composer/IO/IOInterfa |
27c0 | 63 65 2e 70 68 70 cf 07 00 00 12 ad 00 63 cf 07 00 00 bc 19 ca 2b a4 01 00 00 00 00 00 00 1a 00 | ce.php.......c.......+.......... |
27e0 | 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 49 4f 2f 4e 75 6c 6c 49 4f 2e 70 68 70 4f 05 00 00 | ..src/Composer/IO/NullIO.phpO... |
2800 | 12 ad 00 63 4f 05 00 00 62 88 a8 73 a4 01 00 00 00 00 00 00 1a 00 00 00 73 72 63 2f 43 6f 6d 70 | ...cO...b..s............src/Comp |
2820 | 6f 73 65 72 2f 49 6e 73 74 61 6c 6c 65 72 2e 70 68 70 c3 84 00 00 12 ad 00 63 c3 84 00 00 48 53 | oser/Installer.php.......c....HS |
2840 | 4a 4c a4 01 00 00 00 00 00 00 2a 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 49 6e 73 74 61 | JL........*...src/Composer/Insta |
2860 | 6c 6c 65 72 2f 42 69 6e 61 72 79 49 6e 73 74 61 6c 6c 65 72 2e 70 68 70 53 29 00 00 12 ad 00 63 | ller/BinaryInstaller.phpS).....c |
2880 | 53 29 00 00 ac cc 5d 80 a4 01 00 00 00 00 00 00 32 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 | S)....].........2...src/Composer |
28a0 | 2f 49 6e 73 74 61 6c 6c 65 72 2f 42 69 6e 61 72 79 50 72 65 73 65 6e 63 65 49 6e 74 65 72 66 61 | /Installer/BinaryPresenceInterfa |
28c0 | 63 65 2e 70 68 70 e6 00 00 00 12 ad 00 63 e6 00 00 00 ae 33 97 8c a4 01 00 00 00 00 00 00 2e 00 | ce.php.......c.....3............ |
28e0 | 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 49 6e 73 74 61 6c 6c 65 72 2f 49 6e 73 74 61 6c 6c | ..src/Composer/Installer/Install |
2900 | 61 74 69 6f 6e 4d 61 6e 61 67 65 72 2e 70 68 70 e3 33 00 00 12 ad 00 63 e3 33 00 00 56 ff 0a 0a | ationManager.php.3.....c.3..V... |
2920 | a4 01 00 00 00 00 00 00 29 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 49 6e 73 74 61 6c 6c | ........)...src/Composer/Install |
2940 | 65 72 2f 49 6e 73 74 61 6c 6c 65 72 45 76 65 6e 74 2e 70 68 70 2a 04 00 00 12 ad 00 63 2a 04 00 | er/InstallerEvent.php*......c*.. |
2960 | 00 46 5a e4 d9 a4 01 00 00 00 00 00 00 2a 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 49 6e | .FZ..........*...src/Composer/In |
2980 | 73 74 61 6c 6c 65 72 2f 49 6e 73 74 61 6c 6c 65 72 45 76 65 6e 74 73 2e 70 68 70 a5 00 00 00 12 | staller/InstallerEvents.php..... |
29a0 | ad 00 63 a5 00 00 00 3e 95 ed c7 a4 01 00 00 00 00 00 00 2d 00 00 00 73 72 63 2f 43 6f 6d 70 6f | ..c....>...........-...src/Compo |
29c0 | 73 65 72 2f 49 6e 73 74 61 6c 6c 65 72 2f 49 6e 73 74 61 6c 6c 65 72 49 6e 74 65 72 66 61 63 65 | ser/Installer/InstallerInterface |
29e0 | 2e 70 68 70 78 04 00 00 12 ad 00 63 78 04 00 00 ee d8 a8 b6 a4 01 00 00 00 00 00 00 2b 00 00 00 | .phpx......cx...............+... |
2a00 | 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 49 6e 73 74 61 6c 6c 65 72 2f 4c 69 62 72 61 72 79 49 6e | src/Composer/Installer/LibraryIn |
2a20 | 73 74 61 6c 6c 65 72 2e 70 68 70 0a 1e 00 00 12 ad 00 63 0a 1e 00 00 b6 5e f6 c1 a4 01 00 00 00 | staller.php.......c.....^....... |
2a40 | 00 00 00 2f 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 49 6e 73 74 61 6c 6c 65 72 2f 4d 65 | .../...src/Composer/Installer/Me |
2a60 | 74 61 70 61 63 6b 61 67 65 49 6e 73 74 61 6c 6c 65 72 2e 70 68 70 d2 08 00 00 12 ad 00 63 d2 08 | tapackageInstaller.php.......c.. |
2a80 | 00 00 11 73 ed be a4 01 00 00 00 00 00 00 28 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 49 | ...s..........(...src/Composer/I |
2aa0 | 6e 73 74 61 6c 6c 65 72 2f 4e 6f 6f 70 49 6e 73 74 61 6c 6c 65 72 2e 70 68 70 61 07 00 00 12 ad | nstaller/NoopInstaller.phpa..... |
2ac0 | 00 63 61 07 00 00 ea 78 51 6e a4 01 00 00 00 00 00 00 27 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 | .ca....xQn........'...src/Compos |
2ae0 | 65 72 2f 49 6e 73 74 61 6c 6c 65 72 2f 50 61 63 6b 61 67 65 45 76 65 6e 74 2e 70 68 70 f4 04 00 | er/Installer/PackageEvent.php... |
2b00 | 00 12 ad 00 63 f4 04 00 00 62 91 5c 41 a4 01 00 00 00 00 00 00 28 00 00 00 73 72 63 2f 43 6f 6d | ....c....b.\A........(...src/Com |
2b20 | 70 6f 73 65 72 2f 49 6e 73 74 61 6c 6c 65 72 2f 50 61 63 6b 61 67 65 45 76 65 6e 74 73 2e 70 68 | poser/Installer/PackageEvents.ph |
2b40 | 70 fb 01 00 00 12 ad 00 63 fb 01 00 00 f2 ab 7f 4b a4 01 00 00 00 00 00 00 2a 00 00 00 73 72 63 | p.......c.......K........*...src |
2b60 | 2f 43 6f 6d 70 6f 73 65 72 2f 49 6e 73 74 61 6c 6c 65 72 2f 50 6c 75 67 69 6e 49 6e 73 74 61 6c | /Composer/Installer/PluginInstal |
2b80 | 6c 65 72 2e 70 68 70 f7 0c 00 00 12 ad 00 63 f7 0c 00 00 50 6f 88 bb a4 01 00 00 00 00 00 00 2b | ler.php.......c....Po..........+ |
2ba0 | 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 49 6e 73 74 61 6c 6c 65 72 2f 50 72 6f 6a 65 63 | ...src/Composer/Installer/Projec |
2bc0 | 74 49 6e 73 74 61 6c 6c 65 72 2e 70 68 70 39 09 00 00 12 ad 00 63 39 09 00 00 01 55 d1 86 a4 01 | tInstaller.php9......c9....U.... |
2be0 | 00 00 00 00 00 00 34 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 49 6e 73 74 61 6c 6c 65 72 | ......4...src/Composer/Installer |
2c00 | 2f 53 75 67 67 65 73 74 65 64 50 61 63 6b 61 67 65 73 52 65 70 6f 72 74 65 72 2e 70 68 70 a5 11 | /SuggestedPackagesReporter.php.. |
2c20 | 00 00 12 ad 00 63 a5 11 00 00 f6 94 4f eb a4 01 00 00 00 00 00 00 1e 00 00 00 73 72 63 2f 43 6f | .....c......O.............src/Co |
2c40 | 6d 70 6f 73 65 72 2f 4a 73 6f 6e 2f 4a 73 6f 6e 46 69 6c 65 2e 70 68 70 a1 17 00 00 12 ad 00 63 | mposer/Json/JsonFile.php.......c |
2c60 | a1 17 00 00 f5 3a 01 e9 a4 01 00 00 00 00 00 00 23 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 | .....:..........#...src/Composer |
2c80 | 2f 4a 73 6f 6e 2f 4a 73 6f 6e 46 6f 72 6d 61 74 74 65 72 2e 70 68 70 85 06 00 00 12 ad 00 63 85 | /Json/JsonFormatter.php.......c. |
2ca0 | 06 00 00 5f c6 69 a4 a4 01 00 00 00 00 00 00 25 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f | ..._.i.........%...src/Composer/ |
2cc0 | 4a 73 6f 6e 2f 4a 73 6f 6e 4d 61 6e 69 70 75 6c 61 74 6f 72 2e 70 68 70 29 34 00 00 12 ad 00 63 | Json/JsonManipulator.php)4.....c |
2ce0 | 29 34 00 00 23 a7 f3 8e a4 01 00 00 00 00 00 00 2d 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 | )4..#...........-...src/Composer |
2d00 | 2f 4a 73 6f 6e 2f 4a 73 6f 6e 56 61 6c 69 64 61 74 69 6f 6e 45 78 63 65 70 74 69 6f 6e 2e 70 68 | /Json/JsonValidationException.ph |
2d20 | 70 97 01 00 00 12 ad 00 63 97 01 00 00 9d 5e 5e b4 a4 01 00 00 00 00 00 00 32 00 00 00 73 72 63 | p.......c.....^^.........2...src |
2d40 | 2f 43 6f 6d 70 6f 73 65 72 2f 50 48 50 53 74 61 6e 2f 43 6f 6e 66 69 67 52 65 74 75 72 6e 54 79 | /Composer/PHPStan/ConfigReturnTy |
2d60 | 70 65 45 78 74 65 6e 73 69 6f 6e 2e 70 68 70 b6 13 00 00 12 ad 00 63 b6 13 00 00 dd 97 42 06 a4 | peExtension.php.......c......B.. |
2d80 | 01 00 00 00 00 00 00 3a 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 50 48 50 53 74 61 6e 2f | .......:...src/Composer/PHPStan/ |
2da0 | 52 75 6c 65 52 65 61 73 6f 6e 44 61 74 61 52 65 74 75 72 6e 54 79 70 65 45 78 74 65 6e 73 69 6f | RuleReasonDataReturnTypeExtensio |
2dc0 | 6e 2e 70 68 70 7e 08 00 00 12 ad 00 63 7e 08 00 00 a6 e7 ac 48 a4 01 00 00 00 00 00 00 25 00 00 | n.php~......c~......H........%.. |
2de0 | 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 50 61 63 6b 61 67 65 2f 41 6c 69 61 73 50 61 63 6b 61 | .src/Composer/Package/AliasPacka |
2e00 | 67 65 2e 70 68 70 6b 18 00 00 12 ad 00 63 6b 18 00 00 ae 1a 89 e9 a4 01 00 00 00 00 00 00 37 00 | ge.phpk......ck...............7. |
2e20 | 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 50 61 63 6b 61 67 65 2f 41 72 63 68 69 76 65 72 2f | ..src/Composer/Package/Archiver/ |
2e40 | 41 72 63 68 69 76 61 62 6c 65 46 69 6c 65 73 46 69 6c 74 65 72 2e 70 68 70 31 02 00 00 12 ad 00 | ArchivableFilesFilter.php1...... |
2e60 | 63 31 02 00 00 7b 37 d1 8e a4 01 00 00 00 00 00 00 37 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 | c1...{7..........7...src/Compose |
2e80 | 72 2f 50 61 63 6b 61 67 65 2f 41 72 63 68 69 76 65 72 2f 41 72 63 68 69 76 61 62 6c 65 46 69 6c | r/Package/Archiver/ArchivableFil |
2ea0 | 65 73 46 69 6e 64 65 72 2e 70 68 70 4a 06 00 00 12 ad 00 63 4a 06 00 00 9a b3 32 a3 a4 01 00 00 | esFinder.phpJ......cJ.....2..... |
2ec0 | 00 00 00 00 30 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 50 61 63 6b 61 67 65 2f 41 72 63 | ....0...src/Composer/Package/Arc |
2ee0 | 68 69 76 65 72 2f 41 72 63 68 69 76 65 4d 61 6e 61 67 65 72 2e 70 68 70 69 0f 00 00 12 ad 00 63 | hiver/ArchiveManager.phpi......c |
2f00 | 69 0f 00 00 67 5b 05 ad a4 01 00 00 00 00 00 00 33 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 | i...g[..........3...src/Composer |
2f20 | 2f 50 61 63 6b 61 67 65 2f 41 72 63 68 69 76 65 72 2f 41 72 63 68 69 76 65 72 49 6e 74 65 72 66 | /Package/Archiver/ArchiverInterf |
2f40 | 61 63 65 2e 70 68 70 53 01 00 00 12 ad 00 63 53 01 00 00 ff ec 3f ee a4 01 00 00 00 00 00 00 33 | ace.phpS......cS.....?.........3 |
2f60 | 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 50 61 63 6b 61 67 65 2f 41 72 63 68 69 76 65 72 | ...src/Composer/Package/Archiver |
2f80 | 2f 42 61 73 65 45 78 63 6c 75 64 65 46 69 6c 74 65 72 2e 70 68 70 10 07 00 00 12 ad 00 63 10 07 | /BaseExcludeFilter.php.......c.. |
2fa0 | 00 00 78 c6 36 c8 a4 01 00 00 00 00 00 00 37 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 50 | ..x.6.........7...src/Composer/P |
2fc0 | 61 63 6b 61 67 65 2f 41 72 63 68 69 76 65 72 2f 43 6f 6d 70 6f 73 65 72 45 78 63 6c 75 64 65 46 | ackage/Archiver/ComposerExcludeF |
2fe0 | 69 6c 74 65 72 2e 70 68 70 3f 01 00 00 12 ad 00 63 3f 01 00 00 3f 8f 60 5e a4 01 00 00 00 00 00 | ilter.php?......c?...?.`^....... |
3000 | 00 32 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 50 61 63 6b 61 67 65 2f 41 72 63 68 69 76 | .2...src/Composer/Package/Archiv |
3020 | 65 72 2f 47 69 74 45 78 63 6c 75 64 65 46 69 6c 74 65 72 2e 70 68 70 24 03 00 00 12 ad 00 63 24 | er/GitExcludeFilter.php$......c$ |
3040 | 03 00 00 74 8f 38 4e a4 01 00 00 00 00 00 00 2e 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f | ...t.8N............src/Composer/ |
3060 | 50 61 63 6b 61 67 65 2f 41 72 63 68 69 76 65 72 2f 50 68 61 72 41 72 63 68 69 76 65 72 2e 70 68 | Package/Archiver/PharArchiver.ph |
3080 | 70 c6 06 00 00 12 ad 00 63 c6 06 00 00 2d ed d9 aa a4 01 00 00 00 00 00 00 2d 00 00 00 73 72 63 | p.......c....-...........-...src |
30a0 | 2f 43 6f 6d 70 6f 73 65 72 2f 50 61 63 6b 61 67 65 2f 41 72 63 68 69 76 65 72 2f 5a 69 70 41 72 | /Composer/Package/Archiver/ZipAr |
30c0 | 63 68 69 76 65 72 2e 70 68 70 0d 06 00 00 12 ad 00 63 0d 06 00 00 dc 6d d2 11 a4 01 00 00 00 00 | chiver.php.......c.....m........ |
30e0 | 00 00 24 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 50 61 63 6b 61 67 65 2f 42 61 73 65 50 | ..$...src/Composer/Package/BaseP |
3100 | 61 63 6b 61 67 65 2e 70 68 70 f6 11 00 00 12 ad 00 63 f6 11 00 00 ff a1 c2 cc a4 01 00 00 00 00 | ackage.php.......c.............. |
3120 | 00 00 2a 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 50 61 63 6b 61 67 65 2f 43 6f 6d 70 61 | ..*...src/Composer/Package/Compa |
3140 | 72 65 72 2f 43 6f 6d 70 61 72 65 72 2e 70 68 70 a6 09 00 00 12 ad 00 63 a6 09 00 00 37 03 46 e2 | rer/Comparer.php.......c....7.F. |
3160 | a4 01 00 00 00 00 00 00 2d 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 50 61 63 6b 61 67 65 | ........-...src/Composer/Package |
3180 | 2f 43 6f 6d 70 6c 65 74 65 41 6c 69 61 73 50 61 63 6b 61 67 65 2e 70 68 70 71 0a 00 00 12 ad 00 | /CompleteAliasPackage.phpq...... |
31a0 | 63 71 0a 00 00 fa 20 23 b7 a4 01 00 00 00 00 00 00 28 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 | cq.....#.........(...src/Compose |
31c0 | 72 2f 50 61 63 6b 61 67 65 2f 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 2e 70 68 70 05 0a 00 | r/Package/CompletePackage.php... |
31e0 | 00 12 ad 00 63 05 0a 00 00 86 a0 4a b1 a4 01 00 00 00 00 00 00 31 00 00 00 73 72 63 2f 43 6f 6d | ....c......J.........1...src/Com |
3200 | 70 6f 73 65 72 2f 50 61 63 6b 61 67 65 2f 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 49 6e 74 | poser/Package/CompletePackageInt |
3220 | 65 72 66 61 63 65 2e 70 68 70 9d 05 00 00 12 ad 00 63 9d 05 00 00 89 91 94 17 a4 01 00 00 00 00 | erface.php.......c.............. |
3240 | 00 00 2b 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 50 61 63 6b 61 67 65 2f 44 75 6d 70 65 | ..+...src/Composer/Package/Dumpe |
3260 | 72 2f 41 72 72 61 79 44 75 6d 70 65 72 2e 70 68 70 48 0d 00 00 12 ad 00 63 48 0d 00 00 28 aa 1c | r/ArrayDumper.phpH......cH...(.. |
3280 | a0 a4 01 00 00 00 00 00 00 1d 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 50 61 63 6b 61 67 | .............src/Composer/Packag |
32a0 | 65 2f 4c 69 6e 6b 2e 70 68 70 f6 07 00 00 12 ad 00 63 f6 07 00 00 a0 22 6a a5 a4 01 00 00 00 00 | e/Link.php.......c....."j....... |
32c0 | 00 00 2b 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 50 61 63 6b 61 67 65 2f 4c 6f 61 64 65 | ..+...src/Composer/Package/Loade |
32e0 | 72 2f 41 72 72 61 79 4c 6f 61 64 65 72 2e 70 68 70 8a 2d 00 00 12 ad 00 63 8a 2d 00 00 e3 6a 67 | r/ArrayLoader.php.-.....c.-...jg |
3300 | 10 a4 01 00 00 00 00 00 00 37 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 50 61 63 6b 61 67 | .........7...src/Composer/Packag |
3320 | 65 2f 4c 6f 61 64 65 72 2f 49 6e 76 61 6c 69 64 50 61 63 6b 61 67 65 45 78 63 65 70 74 69 6f 6e | e/Loader/InvalidPackageException |
3340 | 2e 70 68 70 84 02 00 00 12 ad 00 63 84 02 00 00 e8 4d fc 95 a4 01 00 00 00 00 00 00 2a 00 00 00 | .php.......c.....M..........*... |
3360 | 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 50 61 63 6b 61 67 65 2f 4c 6f 61 64 65 72 2f 4a 73 6f 6e | src/Composer/Package/Loader/Json |
3380 | 4c 6f 61 64 65 72 2e 70 68 70 93 03 00 00 12 ad 00 63 93 03 00 00 e8 a4 a2 34 a4 01 00 00 00 00 | Loader.php.......c.......4...... |
33a0 | 00 00 2f 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 50 61 63 6b 61 67 65 2f 4c 6f 61 64 65 | ../...src/Composer/Package/Loade |
33c0 | 72 2f 4c 6f 61 64 65 72 49 6e 74 65 72 66 61 63 65 2e 70 68 70 9e 01 00 00 12 ad 00 63 9e 01 00 | r/LoaderInterface.php.......c... |
33e0 | 00 17 46 42 a4 a4 01 00 00 00 00 00 00 31 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 50 61 | ..FB.........1...src/Composer/Pa |
3400 | 63 6b 61 67 65 2f 4c 6f 61 64 65 72 2f 52 6f 6f 74 50 61 63 6b 61 67 65 4c 6f 61 64 65 72 2e 70 | ckage/Loader/RootPackageLoader.p |
3420 | 68 70 da 1b 00 00 12 ad 00 63 da 1b 00 00 73 08 53 f4 a4 01 00 00 00 00 00 00 35 00 00 00 73 72 | hp.......c....s.S.........5...sr |
3440 | 63 2f 43 6f 6d 70 6f 73 65 72 2f 50 61 63 6b 61 67 65 2f 4c 6f 61 64 65 72 2f 56 61 6c 69 64 61 | c/Composer/Package/Loader/Valida |
3460 | 74 69 6e 67 41 72 72 61 79 4c 6f 61 64 65 72 2e 70 68 70 f9 4d 00 00 12 ad 00 63 f9 4d 00 00 ae | tingArrayLoader.php.M.....c.M... |
3480 | c4 3e a1 a4 01 00 00 00 00 00 00 1f 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 50 61 63 6b | .>.............src/Composer/Pack |
34a0 | 61 67 65 2f 4c 6f 63 6b 65 72 2e 70 68 70 55 25 00 00 12 ad 00 63 55 25 00 00 f6 95 0e 72 a4 01 | age/Locker.phpU%.....cU%.....r.. |
34c0 | 00 00 00 00 00 00 20 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 50 61 63 6b 61 67 65 2f 50 | ..........src/Composer/Package/P |
34e0 | 61 63 6b 61 67 65 2e 70 68 70 36 24 00 00 12 ad 00 63 36 24 00 00 a9 ff 9b 54 a4 01 00 00 00 00 | ackage.php6$.....c6$.....T...... |
3500 | 00 00 29 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 50 61 63 6b 61 67 65 2f 50 61 63 6b 61 | ..)...src/Composer/Package/Packa |
3520 | 67 65 49 6e 74 65 72 66 61 63 65 2e 70 68 70 d4 0b 00 00 12 ad 00 63 d4 0b 00 00 a6 58 0a f8 a4 | geInterface.php.......c.....X... |
3540 | 01 00 00 00 00 00 00 29 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 50 61 63 6b 61 67 65 2f | .......)...src/Composer/Package/ |
3560 | 52 6f 6f 74 41 6c 69 61 73 50 61 63 6b 61 67 65 2e 70 68 70 e7 0b 00 00 12 ad 00 63 e7 0b 00 00 | RootAliasPackage.php.......c.... |
3580 | 41 3a 96 44 a4 01 00 00 00 00 00 00 24 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 50 61 63 | A:.D........$...src/Composer/Pac |
35a0 | 6b 61 67 65 2f 52 6f 6f 74 50 61 63 6b 61 67 65 2e 70 68 70 a9 05 00 00 12 ad 00 63 a9 05 00 00 | kage/RootPackage.php.......c.... |
35c0 | 1d 1b 09 ba a4 01 00 00 00 00 00 00 2d 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 50 61 63 | ............-...src/Composer/Pac |
35e0 | 6b 61 67 65 2f 52 6f 6f 74 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 2e 70 68 70 39 05 00 | kage/RootPackageInterface.php9.. |
3600 | 00 12 ad 00 63 39 05 00 00 88 a8 10 ec a4 01 00 00 00 00 00 00 30 00 00 00 73 72 63 2f 43 6f 6d | ....c9...............0...src/Com |
3620 | 70 6f 73 65 72 2f 50 61 63 6b 61 67 65 2f 56 65 72 73 69 6f 6e 2f 53 74 61 62 69 6c 69 74 79 46 | poser/Package/Version/StabilityF |
3640 | 69 6c 74 65 72 2e 70 68 70 15 02 00 00 12 ad 00 63 15 02 00 00 b5 ea 72 fa a4 01 00 00 00 00 00 | ilter.php.......c......r........ |
3660 | 00 2e 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 50 61 63 6b 61 67 65 2f 56 65 72 73 69 6f | .....src/Composer/Package/Versio |
3680 | 6e 2f 56 65 72 73 69 6f 6e 42 75 6d 70 65 72 2e 70 68 70 ec 08 00 00 12 ad 00 63 ec 08 00 00 64 | n/VersionBumper.php.......c....d |
36a0 | 81 44 e5 a4 01 00 00 00 00 00 00 2f 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 50 61 63 6b | .D........./...src/Composer/Pack |
36c0 | 61 67 65 2f 56 65 72 73 69 6f 6e 2f 56 65 72 73 69 6f 6e 47 75 65 73 73 65 72 2e 70 68 70 f1 27 | age/Version/VersionGuesser.php.' |
36e0 | 00 00 12 ad 00 63 f1 27 00 00 c6 a4 ca ce a4 01 00 00 00 00 00 00 2e 00 00 00 73 72 63 2f 43 6f | .....c.'..................src/Co |
3700 | 6d 70 6f 73 65 72 2f 50 61 63 6b 61 67 65 2f 56 65 72 73 69 6f 6e 2f 56 65 72 73 69 6f 6e 50 61 | mposer/Package/Version/VersionPa |
3720 | 72 73 65 72 2e 70 68 70 d4 07 00 00 12 ad 00 63 d4 07 00 00 d8 e0 92 e6 a4 01 00 00 00 00 00 00 | rser.php.......c................ |
3740 | 30 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 50 61 63 6b 61 67 65 2f 56 65 72 73 69 6f 6e | 0...src/Composer/Package/Version |
3760 | 2f 56 65 72 73 69 6f 6e 53 65 6c 65 63 74 6f 72 2e 70 68 70 82 17 00 00 12 ad 00 63 82 17 00 00 | /VersionSelector.php.......c.... |
3780 | 8a 26 02 b5 a4 01 00 00 00 00 00 00 20 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 50 61 72 | .&..............src/Composer/Par |
37a0 | 74 69 61 6c 43 6f 6d 70 6f 73 65 72 2e 70 68 70 fe 05 00 00 12 ad 00 63 fe 05 00 00 a8 f9 0b 9a | tialComposer.php.......c........ |
37c0 | a4 01 00 00 00 00 00 00 26 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 50 6c 61 74 66 6f 72 | ........&...src/Composer/Platfor |
37e0 | 6d 2f 48 68 76 6d 44 65 74 65 63 74 6f 72 2e 70 68 70 2d 05 00 00 12 ad 00 63 2d 05 00 00 90 82 | m/HhvmDetector.php-......c-..... |
3800 | c0 23 a4 01 00 00 00 00 00 00 21 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 50 6c 61 74 66 | .#........!...src/Composer/Platf |
3820 | 6f 72 6d 2f 52 75 6e 74 69 6d 65 2e 70 68 70 ef 04 00 00 12 ad 00 63 ef 04 00 00 6f 5e 31 25 a4 | orm/Runtime.php.......c....o^1%. |
3840 | 01 00 00 00 00 00 00 21 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 50 6c 61 74 66 6f 72 6d | .......!...src/Composer/Platform |
3860 | 2f 56 65 72 73 69 6f 6e 2e 70 68 70 97 07 00 00 12 ad 00 63 97 07 00 00 bf 76 98 b5 a4 01 00 00 | /Version.php.......c.....v...... |
3880 | 00 00 00 00 2d 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 50 6c 75 67 69 6e 2f 43 61 70 61 | ....-...src/Composer/Plugin/Capa |
38a0 | 62 69 6c 69 74 79 2f 43 61 70 61 62 69 6c 69 74 79 2e 70 68 70 70 00 00 00 12 ad 00 63 70 00 00 | bility/Capability.phpp......cp.. |
38c0 | 00 9a 23 63 3b a4 01 00 00 00 00 00 00 32 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 50 6c | ..#c;........2...src/Composer/Pl |
38e0 | 75 67 69 6e 2f 43 61 70 61 62 69 6c 69 74 79 2f 43 6f 6d 6d 61 6e 64 50 72 6f 76 69 64 65 72 2e | ugin/Capability/CommandProvider. |
3900 | 70 68 70 b0 00 00 00 12 ad 00 63 b0 00 00 00 46 fc d9 a4 a4 01 00 00 00 00 00 00 1f 00 00 00 73 | php.......c....F...............s |
3920 | 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 50 6c 75 67 69 6e 2f 43 61 70 61 62 6c 65 2e 70 68 70 98 00 | rc/Composer/Plugin/Capable.php.. |
3940 | 00 00 12 ad 00 63 98 00 00 00 fb b0 68 aa a4 01 00 00 00 00 00 00 24 00 00 00 73 72 63 2f 43 6f | .....c......h.........$...src/Co |
3960 | 6d 70 6f 73 65 72 2f 50 6c 75 67 69 6e 2f 43 6f 6d 6d 61 6e 64 45 76 65 6e 74 2e 70 68 70 3f 03 | mposer/Plugin/CommandEvent.php?. |
3980 | 00 00 12 ad 00 63 3f 03 00 00 7c 55 60 1e a4 01 00 00 00 00 00 00 2e 00 00 00 73 72 63 2f 43 6f | .....c?...|U`.............src/Co |
39a0 | 6d 70 6f 73 65 72 2f 50 6c 75 67 69 6e 2f 50 6c 75 67 69 6e 42 6c 6f 63 6b 65 64 45 78 63 65 70 | mposer/Plugin/PluginBlockedExcep |
39c0 | 74 69 6f 6e 2e 70 68 70 a7 00 00 00 12 ad 00 63 a7 00 00 00 11 f6 f9 72 a4 01 00 00 00 00 00 00 | tion.php.......c.......r........ |
39e0 | 24 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 50 6c 75 67 69 6e 2f 50 6c 75 67 69 6e 45 76 | $...src/Composer/Plugin/PluginEv |
3a00 | 65 6e 74 73 2e 70 68 70 a8 01 00 00 12 ad 00 63 a8 01 00 00 5c 4b 93 d6 a4 01 00 00 00 00 00 00 | ents.php.......c....\K.......... |
3a20 | 27 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 50 6c 75 67 69 6e 2f 50 6c 75 67 69 6e 49 6e | '...src/Composer/Plugin/PluginIn |
3a40 | 74 65 72 66 61 63 65 2e 70 68 70 ae 01 00 00 12 ad 00 63 ae 01 00 00 14 5e 3e 7d a4 01 00 00 00 | terface.php.......c.....^>}..... |
3a60 | 00 00 00 25 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 50 6c 75 67 69 6e 2f 50 6c 75 67 69 | ...%...src/Composer/Plugin/Plugi |
3a80 | 6e 4d 61 6e 61 67 65 72 2e 70 68 70 a1 4c 00 00 12 ad 00 63 a1 4c 00 00 89 ff 38 cf a4 01 00 00 | nManager.php.L.....c.L....8..... |
3aa0 | 00 00 00 00 2d 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 50 6c 75 67 69 6e 2f 50 6f 73 74 | ....-...src/Composer/Plugin/Post |
3ac0 | 46 69 6c 65 44 6f 77 6e 6c 6f 61 64 45 76 65 6e 74 2e 70 68 70 bf 05 00 00 12 ad 00 63 bf 05 00 | FileDownloadEvent.php.......c... |
3ae0 | 00 e0 40 3e 89 a4 01 00 00 00 00 00 00 2a 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 50 6c | ..@>.........*...src/Composer/Pl |
3b00 | 75 67 69 6e 2f 50 72 65 43 6f 6d 6d 61 6e 64 52 75 6e 45 76 65 6e 74 2e 70 68 70 2f 02 00 00 12 | ugin/PreCommandRunEvent.php/.... |
3b20 | ad 00 63 2f 02 00 00 33 09 b1 14 a4 01 00 00 00 00 00 00 2c 00 00 00 73 72 63 2f 43 6f 6d 70 6f | ..c/...3...........,...src/Compo |
3b40 | 73 65 72 2f 50 6c 75 67 69 6e 2f 50 72 65 46 69 6c 65 44 6f 77 6e 6c 6f 61 64 45 76 65 6e 74 2e | ser/Plugin/PreFileDownloadEvent. |
3b60 | 70 68 70 9d 05 00 00 12 ad 00 63 9d 05 00 00 00 60 07 5b a4 01 00 00 00 00 00 00 2a 00 00 00 73 | php.......c.....`.[........*...s |
3b80 | 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 50 6c 75 67 69 6e 2f 50 72 65 50 6f 6f 6c 43 72 65 61 74 65 | rc/Composer/Plugin/PrePoolCreate |
3ba0 | 45 76 65 6e 74 2e 70 68 70 b1 07 00 00 12 ad 00 63 b1 07 00 00 05 f3 bc db a4 01 00 00 00 00 00 | Event.php.......c............... |
3bc0 | 00 34 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 51 75 65 73 74 69 6f 6e 2f 53 74 72 69 63 | .4...src/Composer/Question/Stric |
3be0 | 74 43 6f 6e 66 69 72 6d 61 74 69 6f 6e 51 75 65 73 74 69 6f 6e 2e 70 68 70 95 05 00 00 12 ad 00 | tConfirmationQuestion.php....... |
3c00 | 63 95 05 00 00 78 94 bb 41 a4 01 00 00 00 00 00 00 35 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 | c....x..A........5...src/Compose |
3c20 | 72 2f 52 65 70 6f 73 69 74 6f 72 79 2f 41 64 76 69 73 6f 72 79 50 72 6f 76 69 64 65 72 49 6e 74 | r/Repository/AdvisoryProviderInt |
3c40 | 65 72 66 61 63 65 2e 70 68 70 a9 01 00 00 12 ad 00 63 a9 01 00 00 10 95 d0 b0 a4 01 00 00 00 00 | erface.php.......c.............. |
3c60 | 00 00 2b 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 52 65 70 6f 73 69 74 6f 72 79 2f 41 72 | ..+...src/Composer/Repository/Ar |
3c80 | 72 61 79 52 65 70 6f 73 69 74 6f 72 79 2e 70 68 70 34 1a 00 00 12 ad 00 63 34 1a 00 00 ba 8d d2 | rayRepository.php4......c4...... |
3ca0 | d5 a4 01 00 00 00 00 00 00 2e 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 52 65 70 6f 73 69 | .............src/Composer/Reposi |
3cc0 | 74 6f 72 79 2f 41 72 74 69 66 61 63 74 52 65 70 6f 73 69 74 6f 72 79 2e 70 68 70 42 0c 00 00 12 | tory/ArtifactRepository.phpB.... |
3ce0 | ad 00 63 42 0c 00 00 53 91 4e 6a a4 01 00 00 00 00 00 00 32 00 00 00 73 72 63 2f 43 6f 6d 70 6f | ..cB...S.Nj........2...src/Compo |
3d00 | 73 65 72 2f 52 65 70 6f 73 69 74 6f 72 79 2f 43 61 6e 6f 6e 69 63 61 6c 50 61 63 6b 61 67 65 73 | ser/Repository/CanonicalPackages |
3d20 | 54 72 61 69 74 2e 70 68 70 c4 02 00 00 12 ad 00 63 c4 02 00 00 1b a6 7b eb a4 01 00 00 00 00 00 | Trait.php.......c......{........ |
3d40 | 00 2e 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 52 65 70 6f 73 69 74 6f 72 79 2f 43 6f 6d | .....src/Composer/Repository/Com |
3d60 | 70 6f 73 65 72 52 65 70 6f 73 69 74 6f 72 79 2e 70 68 70 39 af 00 00 12 ad 00 63 39 af 00 00 7b | poserRepository.php9......c9...{ |
3d80 | 43 f4 5a a4 01 00 00 00 00 00 00 2f 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 52 65 70 6f | C.Z......../...src/Composer/Repo |
3da0 | 73 69 74 6f 72 79 2f 43 6f 6d 70 6f 73 69 74 65 52 65 70 6f 73 69 74 6f 72 79 2e 70 68 70 79 0c | sitory/CompositeRepository.phpy. |
3dc0 | 00 00 12 ad 00 63 79 0c 00 00 1f 05 85 ef a4 01 00 00 00 00 00 00 3b 00 00 00 73 72 63 2f 43 6f | .....cy...............;...src/Co |
3de0 | 6d 70 6f 73 65 72 2f 52 65 70 6f 73 69 74 6f 72 79 2f 43 6f 6e 66 69 67 75 72 61 62 6c 65 52 65 | mposer/Repository/ConfigurableRe |
3e00 | 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 2e 70 68 70 a1 00 00 00 12 ad 00 63 a1 00 00 | positoryInterface.php.......c... |
3e20 | 00 63 65 2a 32 a4 01 00 00 00 00 00 00 30 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 52 65 | .ce*2........0...src/Composer/Re |
3e40 | 70 6f 73 69 74 6f 72 79 2f 46 69 6c 65 73 79 73 74 65 6d 52 65 70 6f 73 69 74 6f 72 79 2e 70 68 | pository/FilesystemRepository.ph |
3e60 | 70 ea 22 00 00 12 ad 00 63 ea 22 00 00 34 a0 e0 a8 a4 01 00 00 00 00 00 00 2c 00 00 00 73 72 63 | p.".....c."..4...........,...src |
3e80 | 2f 43 6f 6d 70 6f 73 65 72 2f 52 65 70 6f 73 69 74 6f 72 79 2f 46 69 6c 74 65 72 52 65 70 6f 73 | /Composer/Repository/FilterRepos |
3ea0 | 69 74 6f 72 79 2e 70 68 70 de 0d 00 00 12 ad 00 63 de 0d 00 00 c1 fa 2b 23 a4 01 00 00 00 00 00 | itory.php.......c......+#....... |
3ec0 | 00 34 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 52 65 70 6f 73 69 74 6f 72 79 2f 49 6e 73 | .4...src/Composer/Repository/Ins |
3ee0 | 74 61 6c 6c 65 64 41 72 72 61 79 52 65 70 6f 73 69 74 6f 72 79 2e 70 68 70 58 01 00 00 12 ad 00 | talledArrayRepository.phpX...... |
3f00 | 63 58 01 00 00 bc 2c 5b 7f a4 01 00 00 00 00 00 00 39 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 | cX....,[.........9...src/Compose |
3f20 | 72 2f 52 65 70 6f 73 69 74 6f 72 79 2f 49 6e 73 74 61 6c 6c 65 64 46 69 6c 65 73 79 73 74 65 6d | r/Repository/InstalledFilesystem |
3f40 | 52 65 70 6f 73 69 74 6f 72 79 2e 70 68 70 4a 01 00 00 12 ad 00 63 4a 01 00 00 27 6b 43 e8 a4 01 | Repository.phpJ......cJ...'kC... |
3f60 | 00 00 00 00 00 00 2f 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 52 65 70 6f 73 69 74 6f 72 | ....../...src/Composer/Repositor |
3f80 | 79 2f 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 2e 70 68 70 4b 18 00 00 12 ad 00 | y/InstalledRepository.phpK...... |
3fa0 | 63 4b 18 00 00 79 99 e1 92 a4 01 00 00 00 00 00 00 38 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 | cK...y...........8...src/Compose |
3fc0 | 72 2f 52 65 70 6f 73 69 74 6f 72 79 2f 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 | r/Repository/InstalledRepository |
3fe0 | 49 6e 74 65 72 66 61 63 65 2e 70 68 70 e0 00 00 00 12 ad 00 63 e0 00 00 00 be b2 ff 67 a4 01 00 | Interface.php.......c.......g... |
4000 | 00 00 00 00 00 36 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 52 65 70 6f 73 69 74 6f 72 79 | .....6...src/Composer/Repository |
4020 | 2f 49 6e 76 61 6c 69 64 52 65 70 6f 73 69 74 6f 72 79 45 78 63 65 70 74 69 6f 6e 2e 70 68 70 87 | /InvalidRepositoryException.php. |
4040 | 00 00 00 12 ad 00 63 87 00 00 00 0d 57 3c 5f a4 01 00 00 00 00 00 00 2f 00 00 00 73 72 63 2f 43 | ......c.....W<_......../...src/C |
4060 | 6f 6d 70 6f 73 65 72 2f 52 65 70 6f 73 69 74 6f 72 79 2f 4c 6f 63 6b 41 72 72 61 79 52 65 70 6f | omposer/Repository/LockArrayRepo |
4080 | 73 69 74 6f 72 79 2e 70 68 70 e2 00 00 00 12 ad 00 63 e2 00 00 00 00 5e 86 fa a4 01 00 00 00 00 | sitory.php.......c.....^........ |
40a0 | 00 00 2d 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 52 65 70 6f 73 69 74 6f 72 79 2f 50 61 | ..-...src/Composer/Repository/Pa |
40c0 | 63 6b 61 67 65 52 65 70 6f 73 69 74 6f 72 79 2e 70 68 70 0c 04 00 00 12 ad 00 63 0c 04 00 00 5c | ckageRepository.php.......c....\ |
40e0 | 2f 2a fe a4 01 00 00 00 00 00 00 2a 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 52 65 70 6f | /*.........*...src/Composer/Repo |
4100 | 73 69 74 6f 72 79 2f 50 61 74 68 52 65 70 6f 73 69 74 6f 72 79 2e 70 68 70 8d 12 00 00 12 ad 00 | sitory/PathRepository.php....... |
4120 | 63 8d 12 00 00 e7 2c 6a 0d a4 01 00 00 00 00 00 00 2a 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 | c.....,j.........*...src/Compose |
4140 | 72 2f 52 65 70 6f 73 69 74 6f 72 79 2f 50 65 61 72 52 65 70 6f 73 69 74 6f 72 79 2e 70 68 70 07 | r/Repository/PearRepository.php. |
4160 | 01 00 00 12 ad 00 63 07 01 00 00 51 75 cf 6a a4 01 00 00 00 00 00 00 2e 00 00 00 73 72 63 2f 43 | ......c....Qu.j............src/C |
4180 | 6f 6d 70 6f 73 65 72 2f 52 65 70 6f 73 69 74 6f 72 79 2f 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 | omposer/Repository/PlatformRepos |
41a0 | 69 74 6f 72 79 2e 70 68 70 b4 52 00 00 12 ad 00 63 b4 52 00 00 1f 8d 17 7d a4 01 00 00 00 00 00 | itory.php.R.....c.R.....}....... |
41c0 | 00 2d 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 52 65 70 6f 73 69 74 6f 72 79 2f 52 65 70 | .-...src/Composer/Repository/Rep |
41e0 | 6f 73 69 74 6f 72 79 46 61 63 74 6f 72 79 2e 70 68 70 57 17 00 00 12 ad 00 63 57 17 00 00 e8 11 | ositoryFactory.phpW......cW..... |
4200 | 11 28 a4 01 00 00 00 00 00 00 2f 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 52 65 70 6f 73 | .(......../...src/Composer/Repos |
4220 | 69 74 6f 72 79 2f 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 2e 70 68 70 a4 03 00 | itory/RepositoryInterface.php... |
4240 | 00 12 ad 00 63 a4 03 00 00 2c 04 0d 3a a4 01 00 00 00 00 00 00 2d 00 00 00 73 72 63 2f 43 6f 6d | ....c....,..:........-...src/Com |
4260 | 70 6f 73 65 72 2f 52 65 70 6f 73 69 74 6f 72 79 2f 52 65 70 6f 73 69 74 6f 72 79 4d 61 6e 61 67 | poser/Repository/RepositoryManag |
4280 | 65 72 2e 70 68 70 a2 0b 00 00 12 ad 00 63 a2 0b 00 00 07 2c 7d 7e a4 01 00 00 00 00 00 00 37 00 | er.php.......c.....,}~........7. |
42a0 | 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 52 65 70 6f 73 69 74 6f 72 79 2f 52 65 70 6f 73 69 | ..src/Composer/Repository/Reposi |
42c0 | 74 6f 72 79 53 65 63 75 72 69 74 79 45 78 63 65 70 74 69 6f 6e 2e 70 68 70 88 00 00 00 12 ad 00 | torySecurityException.php....... |
42e0 | 63 88 00 00 00 71 9c d7 74 a4 01 00 00 00 00 00 00 29 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 | c....q..t........)...src/Compose |
4300 | 72 2f 52 65 70 6f 73 69 74 6f 72 79 2f 52 65 70 6f 73 69 74 6f 72 79 53 65 74 2e 70 68 70 c4 20 | r/Repository/RepositorySet.php.. |
4320 | 00 00 12 ad 00 63 c4 20 00 00 2e f4 be fc a4 01 00 00 00 00 00 00 2b 00 00 00 73 72 63 2f 43 6f | .....c................+...src/Co |
4340 | 6d 70 6f 73 65 72 2f 52 65 70 6f 73 69 74 6f 72 79 2f 52 65 70 6f 73 69 74 6f 72 79 55 74 69 6c | mposer/Repository/RepositoryUtil |
4360 | 73 2e 70 68 70 12 04 00 00 12 ad 00 63 12 04 00 00 49 17 b3 7a a4 01 00 00 00 00 00 00 31 00 00 | s.php.......c....I..z........1.. |
4380 | 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 52 65 70 6f 73 69 74 6f 72 79 2f 52 6f 6f 74 50 61 63 | .src/Composer/Repository/RootPac |
43a0 | 6b 61 67 65 52 65 70 6f 73 69 74 6f 72 79 2e 70 68 70 5c 01 00 00 12 ad 00 63 5c 01 00 00 be 60 | kageRepository.php\......c\....` |
43c0 | 39 fc a4 01 00 00 00 00 00 00 2c 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 52 65 70 6f 73 | 9.........,...src/Composer/Repos |
43e0 | 69 74 6f 72 79 2f 56 63 73 2f 46 6f 73 73 69 6c 44 72 69 76 65 72 2e 70 68 70 42 14 00 00 12 ad | itory/Vcs/FossilDriver.phpB..... |
4400 | 00 63 42 14 00 00 7e 2a 9d a6 a4 01 00 00 00 00 00 00 32 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 | .cB...~*..........2...src/Compos |
4420 | 65 72 2f 52 65 70 6f 73 69 74 6f 72 79 2f 56 63 73 2f 47 69 74 42 69 74 62 75 63 6b 65 74 44 72 | er/Repository/Vcs/GitBitbucketDr |
4440 | 69 76 65 72 2e 70 68 70 65 26 00 00 12 ad 00 63 65 26 00 00 bf 20 69 c3 a4 01 00 00 00 00 00 00 | iver.phpe&.....ce&....i......... |
4460 | 29 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 52 65 70 6f 73 69 74 6f 72 79 2f 56 63 73 2f | )...src/Composer/Repository/Vcs/ |
4480 | 47 69 74 44 72 69 76 65 72 2e 70 68 70 5b 17 00 00 12 ad 00 63 5b 17 00 00 2d f0 e2 c4 a4 01 00 | GitDriver.php[......c[...-...... |
44a0 | 00 00 00 00 00 2c 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 52 65 70 6f 73 69 74 6f 72 79 | .....,...src/Composer/Repository |
44c0 | 2f 56 63 73 2f 47 69 74 48 75 62 44 72 69 76 65 72 2e 70 68 70 2e 38 00 00 12 ad 00 63 2e 38 00 | /Vcs/GitHubDriver.php.8.....c.8. |
44e0 | 00 f5 56 f6 2b a4 01 00 00 00 00 00 00 2c 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 52 65 | ..V.+........,...src/Composer/Re |
4500 | 70 6f 73 69 74 6f 72 79 2f 56 63 73 2f 47 69 74 4c 61 62 44 72 69 76 65 72 2e 70 68 70 b2 31 00 | pository/Vcs/GitLabDriver.php.1. |
4520 | 00 12 ad 00 63 b2 31 00 00 64 48 1a 77 a4 01 00 00 00 00 00 00 28 00 00 00 73 72 63 2f 43 6f 6d | ....c.1..dH.w........(...src/Com |
4540 | 70 6f 73 65 72 2f 52 65 70 6f 73 69 74 6f 72 79 2f 56 63 73 2f 48 67 44 72 69 76 65 72 2e 70 68 | poser/Repository/Vcs/HgDriver.ph |
4560 | 70 c1 13 00 00 12 ad 00 63 c1 13 00 00 c2 26 2f 4e a4 01 00 00 00 00 00 00 2e 00 00 00 73 72 63 | p.......c.....&/N............src |
4580 | 2f 43 6f 6d 70 6f 73 65 72 2f 52 65 70 6f 73 69 74 6f 72 79 2f 56 63 73 2f 50 65 72 66 6f 72 63 | /Composer/Repository/Vcs/Perforc |
45a0 | 65 44 72 69 76 65 72 2e 70 68 70 11 0b 00 00 12 ad 00 63 11 0b 00 00 ce 25 ff da a4 01 00 00 00 | eDriver.php.......c.....%....... |
45c0 | 00 00 00 29 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 52 65 70 6f 73 69 74 6f 72 79 2f 56 | ...)...src/Composer/Repository/V |
45e0 | 63 73 2f 53 76 6e 44 72 69 76 65 72 2e 70 68 70 69 1e 00 00 12 ad 00 63 69 1e 00 00 22 0b f6 d6 | cs/SvnDriver.phpi......ci..."... |
4600 | a4 01 00 00 00 00 00 00 29 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 52 65 70 6f 73 69 74 | ........)...src/Composer/Reposit |
4620 | 6f 72 79 2f 56 63 73 2f 56 63 73 44 72 69 76 65 72 2e 70 68 70 0d 0b 00 00 12 ad 00 63 0d 0b 00 | ory/Vcs/VcsDriver.php.......c... |
4640 | 00 ce 26 fe 3a a4 01 00 00 00 00 00 00 32 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 52 65 | ..&.:........2...src/Composer/Re |
4660 | 70 6f 73 69 74 6f 72 79 2f 56 63 73 2f 56 63 73 44 72 69 76 65 72 49 6e 74 65 72 66 61 63 65 2e | pository/Vcs/VcsDriverInterface. |
4680 | 70 68 70 b1 03 00 00 12 ad 00 63 b1 03 00 00 54 8a 84 f8 a4 01 00 00 00 00 00 00 29 00 00 00 73 | php.......c....T...........)...s |
46a0 | 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 52 65 70 6f 73 69 74 6f 72 79 2f 56 63 73 52 65 70 6f 73 69 | rc/Composer/Repository/VcsReposi |
46c0 | 74 6f 72 79 2e 70 68 70 2b 34 00 00 12 ad 00 63 2b 34 00 00 96 da ff 8a a4 01 00 00 00 00 00 00 | tory.php+4.....c+4.............. |
46e0 | 31 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 52 65 70 6f 73 69 74 6f 72 79 2f 56 65 72 73 | 1...src/Composer/Repository/Vers |
4700 | 69 6f 6e 43 61 63 68 65 49 6e 74 65 72 66 61 63 65 2e 70 68 70 b9 00 00 00 12 ad 00 63 b9 00 00 | ionCacheInterface.php.......c... |
4720 | 00 82 68 08 87 a4 01 00 00 00 00 00 00 33 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 52 65 | ..h..........3...src/Composer/Re |
4740 | 70 6f 73 69 74 6f 72 79 2f 57 72 69 74 61 62 6c 65 41 72 72 61 79 52 65 70 6f 73 69 74 6f 72 79 | pository/WritableArrayRepository |
4760 | 2e 70 68 70 d9 02 00 00 12 ad 00 63 d9 02 00 00 6c 26 b4 23 a4 01 00 00 00 00 00 00 37 00 00 00 | .php.......c....l&.#........7... |
4780 | 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 52 65 70 6f 73 69 74 6f 72 79 2f 57 72 69 74 61 62 6c 65 | src/Composer/Repository/Writable |
47a0 | 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 2e 70 68 70 77 02 00 00 12 ad 00 63 77 | RepositoryInterface.phpw......cw |
47c0 | 02 00 00 d5 7e bc 30 a4 01 00 00 00 00 00 00 1d 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f | ....~.0............src/Composer/ |
47e0 | 53 63 72 69 70 74 2f 45 76 65 6e 74 2e 70 68 70 e5 04 00 00 12 ad 00 63 e5 04 00 00 8a bc a0 79 | Script/Event.php.......c.......y |
4800 | a4 01 00 00 00 00 00 00 24 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 53 63 72 69 70 74 2f | ........$...src/Composer/Script/ |
4820 | 53 63 72 69 70 74 45 76 65 6e 74 73 2e 70 68 70 49 03 00 00 12 ad 00 63 49 03 00 00 a4 a3 44 34 | ScriptEvents.phpI......cI.....D4 |
4840 | a4 01 00 00 00 00 00 00 20 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 53 65 6c 66 55 70 64 | ............src/Composer/SelfUpd |
4860 | 61 74 65 2f 4b 65 79 73 2e 70 68 70 d9 01 00 00 12 ad 00 63 d9 01 00 00 c9 0c a8 73 a4 01 00 00 | ate/Keys.php.......c.......s.... |
4880 | 00 00 00 00 24 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 53 65 6c 66 55 70 64 61 74 65 2f | ....$...src/Composer/SelfUpdate/ |
48a0 | 56 65 72 73 69 6f 6e 73 2e 70 68 70 5e 09 00 00 12 ad 00 63 5e 09 00 00 6f d1 cb fb a4 01 00 00 | Versions.php^......c^...o....... |
48c0 | 00 00 00 00 20 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 55 74 69 6c 2f 41 75 74 68 48 65 | ........src/Composer/Util/AuthHe |
48e0 | 6c 70 65 72 2e 70 68 70 e4 22 00 00 12 ad 00 63 e4 22 00 00 12 bf 5e 1a a4 01 00 00 00 00 00 00 | lper.php.".....c."....^......... |
4900 | 1f 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 55 74 69 6c 2f 42 69 74 62 75 63 6b 65 74 2e | ....src/Composer/Util/Bitbucket. |
4920 | 70 68 70 c3 17 00 00 12 ad 00 63 c3 17 00 00 f1 18 28 35 a4 01 00 00 00 00 00 00 24 00 00 00 73 | php.......c......(5........$...s |
4940 | 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 55 74 69 6c 2f 43 6f 6d 70 6f 73 65 72 4d 69 72 72 6f 72 2e | rc/Composer/Util/ComposerMirror. |
4960 | 70 68 70 dd 05 00 00 12 ad 00 63 dd 05 00 00 29 59 7a 33 a4 01 00 00 00 00 00 00 25 00 00 00 73 | php.......c....)Yz3........%...s |
4980 | 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 55 74 69 6c 2f 43 6f 6e 66 69 67 56 61 6c 69 64 61 74 6f 72 | rc/Composer/Util/ConfigValidator |
49a0 | 2e 70 68 70 65 17 00 00 12 ad 00 63 65 17 00 00 d1 33 b6 b0 a4 01 00 00 00 00 00 00 22 00 00 00 | .phpe......ce....3.........."... |
49c0 | 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 55 74 69 6c 2f 45 72 72 6f 72 48 61 6e 64 6c 65 72 2e 70 | src/Composer/Util/ErrorHandler.p |
49e0 | 68 70 4c 05 00 00 12 ad 00 63 4c 05 00 00 51 25 cc e3 a4 01 00 00 00 00 00 00 20 00 00 00 73 72 | hpL......cL...Q%..............sr |
4a00 | 63 2f 43 6f 6d 70 6f 73 65 72 2f 55 74 69 6c 2f 46 69 6c 65 73 79 73 74 65 6d 2e 70 68 70 85 3d | c/Composer/Util/Filesystem.php.= |
4a20 | 00 00 12 ad 00 63 85 3d 00 00 64 ca 41 cf a4 01 00 00 00 00 00 00 19 00 00 00 73 72 63 2f 43 6f | .....c.=..d.A.............src/Co |
4a40 | 6d 70 6f 73 65 72 2f 55 74 69 6c 2f 47 69 74 2e 70 68 70 42 3a 00 00 12 ad 00 63 42 3a 00 00 fd | mposer/Util/Git.phpB:.....cB:... |
4a60 | f4 fe 84 a4 01 00 00 00 00 00 00 1c 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 55 74 69 6c | ...............src/Composer/Util |
4a80 | 2f 47 69 74 48 75 62 2e 70 68 70 46 12 00 00 12 ad 00 63 46 12 00 00 89 53 d2 c0 a4 01 00 00 00 | /GitHub.phpF......cF....S....... |
4aa0 | 00 00 00 1c 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 55 74 69 6c 2f 47 69 74 4c 61 62 2e | .......src/Composer/Util/GitLab. |
4ac0 | 70 68 70 d7 1a 00 00 12 ad 00 63 d7 1a 00 00 19 ff 3b 77 a4 01 00 00 00 00 00 00 18 00 00 00 73 | php.......c......;w............s |
4ae0 | 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 55 74 69 6c 2f 48 67 2e 70 68 70 4f 08 00 00 12 ad 00 63 4f | rc/Composer/Util/Hg.phpO......cO |
4b00 | 08 00 00 cb d0 84 3e a4 01 00 00 00 00 00 00 29 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f | ......>........)...src/Composer/ |
4b20 | 55 74 69 6c 2f 48 74 74 70 2f 43 75 72 6c 44 6f 77 6e 6c 6f 61 64 65 72 2e 70 68 70 f7 4a 00 00 | Util/Http/CurlDownloader.php.J.. |
4b40 | 12 ad 00 63 f7 4a 00 00 27 ca 2f 28 a4 01 00 00 00 00 00 00 27 00 00 00 73 72 63 2f 43 6f 6d 70 | ...c.J..'./(........'...src/Comp |
4b60 | 6f 73 65 72 2f 55 74 69 6c 2f 48 74 74 70 2f 43 75 72 6c 52 65 73 70 6f 6e 73 65 2e 70 68 70 95 | oser/Util/Http/CurlResponse.php. |
4b80 | 01 00 00 12 ad 00 63 95 01 00 00 92 3b a9 b9 a4 01 00 00 00 00 00 00 26 00 00 00 73 72 63 2f 43 | ......c.....;..........&...src/C |
4ba0 | 6f 6d 70 6f 73 65 72 2f 55 74 69 6c 2f 48 74 74 70 2f 50 72 6f 78 79 48 65 6c 70 65 72 2e 70 68 | omposer/Util/Http/ProxyHelper.ph |
4bc0 | 70 92 0a 00 00 12 ad 00 63 92 0a 00 00 89 74 f6 fb a4 01 00 00 00 00 00 00 27 00 00 00 73 72 63 | p.......c.....t..........'...src |
4be0 | 2f 43 6f 6d 70 6f 73 65 72 2f 55 74 69 6c 2f 48 74 74 70 2f 50 72 6f 78 79 4d 61 6e 61 67 65 72 | /Composer/Util/Http/ProxyManager |
4c00 | 2e 70 68 70 78 0a 00 00 12 ad 00 63 78 0a 00 00 e6 0c e0 0b a4 01 00 00 00 00 00 00 27 00 00 00 | .phpx......cx...............'... |
4c20 | 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 55 74 69 6c 2f 48 74 74 70 2f 52 65 71 75 65 73 74 50 72 | src/Composer/Util/Http/RequestPr |
4c40 | 6f 78 79 2e 70 68 70 67 03 00 00 12 ad 00 63 67 03 00 00 cc 87 f2 b5 a4 01 00 00 00 00 00 00 23 | oxy.phpg......cg...............# |
4c60 | 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 55 74 69 6c 2f 48 74 74 70 2f 52 65 73 70 6f 6e | ...src/Composer/Util/Http/Respon |
4c80 | 73 65 2e 70 68 70 e3 05 00 00 12 ad 00 63 e3 05 00 00 d6 6d 52 5e a4 01 00 00 00 00 00 00 24 00 | se.php.......c.....mR^........$. |
4ca0 | 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 55 74 69 6c 2f 48 74 74 70 44 6f 77 6e 6c 6f 61 64 | ..src/Composer/Util/HttpDownload |
4cc0 | 65 72 2e 70 68 70 b8 27 00 00 12 ad 00 63 b8 27 00 00 41 fc ca 4a a4 01 00 00 00 00 00 00 1f 00 | er.php.'.....c.'..A..J.......... |
4ce0 | 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 55 74 69 6c 2f 49 6e 69 48 65 6c 70 65 72 2e 70 68 | ..src/Composer/Util/IniHelper.ph |
4d00 | 70 8e 02 00 00 12 ad 00 63 8e 02 00 00 99 6d ae 42 a4 01 00 00 00 00 00 00 1a 00 00 00 73 72 63 | p.......c.....m.B............src |
4d20 | 2f 43 6f 6d 70 6f 73 65 72 2f 55 74 69 6c 2f 4c 6f 6f 70 2e 70 68 70 0a 08 00 00 12 ad 00 63 0a | /Composer/Util/Loop.php.......c. |
4d40 | 08 00 00 f6 27 05 92 a4 01 00 00 00 00 00 00 26 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f | ....'..........&...src/Composer/ |
4d60 | 55 74 69 6c 2f 4d 65 74 61 64 61 74 61 4d 69 6e 69 66 69 65 72 2e 70 68 70 43 01 00 00 12 ad 00 | Util/MetadataMinifier.phpC...... |
4d80 | 63 43 01 00 00 64 18 0c 98 a4 01 00 00 00 00 00 00 24 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 | cC...d...........$...src/Compose |
4da0 | 72 2f 55 74 69 6c 2f 4e 6f 50 72 6f 78 79 50 61 74 74 65 72 6e 2e 70 68 70 2c 17 00 00 12 ad 00 | r/Util/NoProxyPattern.php,...... |
4dc0 | 63 2c 17 00 00 ca f7 21 51 a4 01 00 00 00 00 00 00 21 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 | c,.....!Q........!...src/Compose |
4de0 | 72 2f 55 74 69 6c 2f 50 61 63 6b 61 67 65 49 6e 66 6f 2e 70 68 70 84 02 00 00 12 ad 00 63 84 02 | r/Util/PackageInfo.php.......c.. |
4e00 | 00 00 12 cf fa 92 a4 01 00 00 00 00 00 00 23 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 55 | ..............#...src/Composer/U |
4e20 | 74 69 6c 2f 50 61 63 6b 61 67 65 53 6f 72 74 65 72 2e 70 68 70 bd 08 00 00 12 ad 00 63 bd 08 00 | til/PackageSorter.php.......c... |
4e40 | 00 58 d1 b7 14 a4 01 00 00 00 00 00 00 1e 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 55 74 | .X...............src/Composer/Ut |
4e60 | 69 6c 2f 50 65 72 66 6f 72 63 65 2e 70 68 70 22 34 00 00 12 ad 00 63 22 34 00 00 45 8f 51 5b a4 | il/Perforce.php"4.....c"4..E.Q[. |
4e80 | 01 00 00 00 00 00 00 1e 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 55 74 69 6c 2f 50 6c 61 | ...........src/Composer/Util/Pla |
4ea0 | 74 66 6f 72 6d 2e 70 68 70 a7 11 00 00 12 ad 00 63 a7 11 00 00 e5 38 3f 01 a4 01 00 00 00 00 00 | tform.php.......c.....8?........ |
4ec0 | 00 25 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 55 74 69 6c 2f 50 72 6f 63 65 73 73 45 78 | .%...src/Composer/Util/ProcessEx |
4ee0 | 65 63 75 74 6f 72 2e 70 68 70 76 20 00 00 12 ad 00 63 76 20 00 00 ee a3 f8 ed a4 01 00 00 00 00 | ecutor.phpv......cv............. |
4f00 | 00 00 26 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 55 74 69 6c 2f 52 65 6d 6f 74 65 46 69 | ..&...src/Composer/Util/RemoteFi |
4f20 | 6c 65 73 79 73 74 65 6d 2e 70 68 70 d6 40 00 00 12 ad 00 63 d6 40 00 00 0a 8a 52 55 a4 01 00 00 | lesystem.php.@.....c.@....RU.... |
4f40 | 00 00 00 00 1e 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 55 74 69 6c 2f 53 69 6c 65 6e 63 | ........src/Composer/Util/Silenc |
4f60 | 65 72 2e 70 68 70 fc 02 00 00 12 ad 00 63 fc 02 00 00 d0 e5 95 c0 a4 01 00 00 00 00 00 00 2a 00 | er.php.......c................*. |
4f80 | 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 55 74 69 6c 2f 53 74 72 65 61 6d 43 6f 6e 74 65 78 | ..src/Composer/Util/StreamContex |
4fa0 | 74 46 61 63 74 6f 72 79 2e 70 68 70 7f 14 00 00 12 ad 00 63 7f 14 00 00 b6 65 e4 36 a4 01 00 00 | tFactory.php.......c.....e.6.... |
4fc0 | 00 00 00 00 19 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 55 74 69 6c 2f 53 76 6e 2e 70 68 | ........src/Composer/Util/Svn.ph |
4fe0 | 70 f4 14 00 00 12 ad 00 63 f4 14 00 00 d5 4c a5 38 a4 01 00 00 00 00 00 00 20 00 00 00 73 72 63 | p.......c.....L.8............src |
5000 | 2f 43 6f 6d 70 6f 73 65 72 2f 55 74 69 6c 2f 53 79 6e 63 48 65 6c 70 65 72 2e 70 68 70 5f 04 00 | /Composer/Util/SyncHelper.php_.. |
5020 | 00 12 ad 00 63 5f 04 00 00 8d 33 d9 50 a4 01 00 00 00 00 00 00 19 00 00 00 73 72 63 2f 43 6f 6d | ....c_....3.P............src/Com |
5040 | 70 6f 73 65 72 2f 55 74 69 6c 2f 54 61 72 2e 70 68 70 85 04 00 00 12 ad 00 63 85 04 00 00 f7 cc | poser/Util/Tar.php.......c...... |
5060 | 74 3f a4 01 00 00 00 00 00 00 1f 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 55 74 69 6c 2f | t?............src/Composer/Util/ |
5080 | 54 6c 73 48 65 6c 70 65 72 2e 70 68 70 6a 0b 00 00 12 ad 00 63 6a 0b 00 00 d0 a7 86 51 a4 01 00 | TlsHelper.phpj......cj......Q... |
50a0 | 00 00 00 00 00 19 00 00 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 55 74 69 6c 2f 55 72 6c 2e 70 | .........src/Composer/Util/Url.p |
50c0 | 68 70 6b 0c 00 00 12 ad 00 63 6b 0c 00 00 ad 03 36 e8 a4 01 00 00 00 00 00 00 19 00 00 00 73 72 | hpk......ck.....6.............sr |
50e0 | 63 2f 43 6f 6d 70 6f 73 65 72 2f 55 74 69 6c 2f 5a 69 70 2e 70 68 70 0f 08 00 00 12 ad 00 63 0f | c/Composer/Util/Zip.php.......c. |
5100 | 08 00 00 a3 44 d9 91 a4 01 00 00 00 00 00 00 11 00 00 00 73 72 63 2f 62 6f 6f 74 73 74 72 61 70 | ....D..............src/bootstrap |
5120 | 2e 70 68 70 0a 02 00 00 12 ad 00 63 0a 02 00 00 d1 c4 2d c8 a4 01 00 00 00 00 00 00 25 00 00 00 | .php.......c......-.........%... |
5140 | 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 41 75 74 6f 6c 6f 61 64 2f 43 6c 61 73 73 4c 6f 61 64 65 | src/Composer/Autoload/ClassLoade |
5160 | 72 2e 70 68 70 c4 3e 00 00 12 ad 00 63 c4 3e 00 00 c6 35 4b 79 a4 01 00 00 00 00 00 00 22 00 00 | r.php.>.....c.>...5Ky........".. |
5180 | 00 73 72 63 2f 43 6f 6d 70 6f 73 65 72 2f 49 6e 73 74 61 6c 6c 65 64 56 65 72 73 69 6f 6e 73 2e | .src/Composer/InstalledVersions. |
51a0 | 70 68 70 dd 3a 00 00 12 ad 00 63 dd 3a 00 00 e7 95 8e 4b a4 01 00 00 00 00 00 00 23 00 00 00 72 | php.:.....c.:.....K........#...r |
51c0 | 65 73 2f 63 6f 6d 70 6f 73 65 72 2d 72 65 70 6f 73 69 74 6f 72 79 2d 73 63 68 65 6d 61 2e 6a 73 | es/composer-repository-schema.js |
51e0 | 6f 6e f1 0f 00 00 12 ad 00 63 f1 0f 00 00 7c 30 e0 84 a4 01 00 00 00 00 00 00 18 00 00 00 72 65 | on.......c....|0..............re |
5200 | 73 2f 63 6f 6d 70 6f 73 65 72 2d 73 63 68 65 6d 61 2e 6a 73 6f 6e 9b be 00 00 12 ad 00 63 9b be | s/composer-schema.json.......c.. |
5220 | 00 00 b2 ba fa c4 a4 01 00 00 00 00 00 00 13 00 00 00 76 65 6e 64 6f 72 2f 61 75 74 6f 6c 6f 61 | ..................vendor/autoloa |
5240 | 64 2e 70 68 70 73 01 00 00 12 ad 00 63 73 01 00 00 23 36 dd 09 a4 01 00 00 00 00 00 00 1f 00 00 | d.phps......cs...#6............. |
5260 | 00 76 65 6e 64 6f 72 2f 63 6f 6d 70 6f 73 65 72 2f 43 6c 61 73 73 4c 6f 61 64 65 72 2e 70 68 70 | .vendor/composer/ClassLoader.php |
5280 | 5c 1b 00 00 12 ad 00 63 5c 1b 00 00 dc 5a 75 9c a4 01 00 00 00 00 00 00 25 00 00 00 76 65 6e 64 | \......c\....Zu.........%...vend |
52a0 | 6f 72 2f 63 6f 6d 70 6f 73 65 72 2f 49 6e 73 74 61 6c 6c 65 64 56 65 72 73 69 6f 6e 73 2e 70 68 | or/composer/InstalledVersions.ph |
52c0 | 70 6b 16 00 00 12 ad 00 63 6b 16 00 00 fc 82 d0 6a a4 01 00 00 00 00 00 00 25 00 00 00 76 65 6e | pk......ck......j........%...ven |
52e0 | 64 6f 72 2f 63 6f 6d 70 6f 73 65 72 2f 61 75 74 6f 6c 6f 61 64 5f 63 6c 61 73 73 6d 61 70 2e 70 | dor/composer/autoload_classmap.p |
5300 | 68 70 28 03 00 00 12 ad 00 63 28 03 00 00 41 ab 85 69 a4 01 00 00 00 00 00 00 22 00 00 00 76 65 | hp(......c(...A..i........"...ve |
5320 | 6e 64 6f 72 2f 63 6f 6d 70 6f 73 65 72 2f 61 75 74 6f 6c 6f 61 64 5f 66 69 6c 65 73 2e 70 68 70 | ndor/composer/autoload_files.php |
5340 | b6 03 00 00 12 ad 00 63 b6 03 00 00 68 b3 a5 2d a4 01 00 00 00 00 00 00 27 00 00 00 76 65 6e 64 | .......c....h..-........'...vend |
5360 | 6f 72 2f 63 6f 6d 70 6f 73 65 72 2f 61 75 74 6f 6c 6f 61 64 5f 6e 61 6d 65 73 70 61 63 65 73 2e | or/composer/autoload_namespaces. |
5380 | 70 68 70 5a 00 00 00 12 ad 00 63 5a 00 00 00 eb a6 e1 96 a4 01 00 00 00 00 00 00 21 00 00 00 76 | phpZ......cZ...............!...v |
53a0 | 65 6e 64 6f 72 2f 63 6f 6d 70 6f 73 65 72 2f 61 75 74 6f 6c 6f 61 64 5f 70 73 72 34 2e 70 68 70 | endor/composer/autoload_psr4.php |
53c0 | 5f 08 00 00 12 ad 00 63 5f 08 00 00 e8 13 57 7a a4 01 00 00 00 00 00 00 21 00 00 00 76 65 6e 64 | _......c_.....Wz........!...vend |
53e0 | 6f 72 2f 63 6f 6d 70 6f 73 65 72 2f 61 75 74 6f 6c 6f 61 64 5f 72 65 61 6c 2e 70 68 70 d9 04 00 | or/composer/autoload_real.php... |
5400 | 00 12 ad 00 63 d9 04 00 00 40 22 fa aa a4 01 00 00 00 00 00 00 23 00 00 00 76 65 6e 64 6f 72 2f | ....c....@"..........#...vendor/ |
5420 | 63 6f 6d 70 6f 73 65 72 2f 61 75 74 6f 6c 6f 61 64 5f 73 74 61 74 69 63 2e 70 68 70 79 16 00 00 | composer/autoload_static.phpy... |
5440 | 12 ad 00 63 79 16 00 00 6a 6f 47 79 a4 01 00 00 00 00 00 00 21 00 00 00 76 65 6e 64 6f 72 2f 63 | ...cy...joGy........!...vendor/c |
5460 | 6f 6d 70 6f 73 65 72 2f 63 61 2d 62 75 6e 64 6c 65 2f 4c 49 43 45 4e 53 45 1e 04 00 00 12 ad 00 | omposer/ca-bundle/LICENSE....... |
5480 | 63 1e 04 00 00 47 09 07 5f a4 01 00 00 00 00 00 00 28 00 00 00 76 65 6e 64 6f 72 2f 63 6f 6d 70 | c....G.._........(...vendor/comp |
54a0 | 6f 73 65 72 2f 63 61 2d 62 75 6e 64 6c 65 2f 72 65 73 2f 63 61 63 65 72 74 2e 70 65 6d 0d 65 03 | oser/ca-bundle/res/cacert.pem.e. |
54c0 | 00 12 ad 00 63 0d 65 03 00 42 bf 7b d6 a4 01 00 00 00 00 00 00 2a 00 00 00 76 65 6e 64 6f 72 2f | ....c.e..B.{.........*...vendor/ |
54e0 | 63 6f 6d 70 6f 73 65 72 2f 63 61 2d 62 75 6e 64 6c 65 2f 73 72 63 2f 43 61 42 75 6e 64 6c 65 2e | composer/ca-bundle/src/CaBundle. |
5500 | 70 68 70 95 24 00 00 12 ad 00 63 95 24 00 00 db 6e d3 07 a4 01 00 00 00 00 00 00 2b 00 00 00 76 | php.$.....c.$...n..........+...v |
5520 | 65 6e 64 6f 72 2f 63 6f 6d 70 6f 73 65 72 2f 63 6c 61 73 73 2d 6d 61 70 2d 67 65 6e 65 72 61 74 | endor/composer/class-map-generat |
5540 | 6f 72 2f 4c 49 43 45 4e 53 45 1e 04 00 00 12 ad 00 63 1e 04 00 00 3d f9 be f5 a4 01 00 00 00 00 | or/LICENSE.......c....=......... |
5560 | 00 00 34 00 00 00 76 65 6e 64 6f 72 2f 63 6f 6d 70 6f 73 65 72 2f 63 6c 61 73 73 2d 6d 61 70 2d | ..4...vendor/composer/class-map- |
5580 | 67 65 6e 65 72 61 74 6f 72 2f 73 72 63 2f 43 6c 61 73 73 4d 61 70 2e 70 68 70 c0 04 00 00 12 ad | generator/src/ClassMap.php...... |
55a0 | 00 63 c0 04 00 00 63 be c3 5b a4 01 00 00 00 00 00 00 3d 00 00 00 76 65 6e 64 6f 72 2f 63 6f 6d | .c....c..[........=...vendor/com |
55c0 | 70 6f 73 65 72 2f 63 6c 61 73 73 2d 6d 61 70 2d 67 65 6e 65 72 61 74 6f 72 2f 73 72 63 2f 43 6c | poser/class-map-generator/src/Cl |
55e0 | 61 73 73 4d 61 70 47 65 6e 65 72 61 74 6f 72 2e 70 68 70 8f 19 00 00 12 ad 00 63 8f 19 00 00 b2 | assMapGenerator.php.......c..... |
5600 | cd d0 f6 a4 01 00 00 00 00 00 00 34 00 00 00 76 65 6e 64 6f 72 2f 63 6f 6d 70 6f 73 65 72 2f 63 | ...........4...vendor/composer/c |
5620 | 6c 61 73 73 2d 6d 61 70 2d 67 65 6e 65 72 61 74 6f 72 2f 73 72 63 2f 46 69 6c 65 4c 69 73 74 2e | lass-map-generator/src/FileList. |
5640 | 70 68 70 24 01 00 00 12 ad 00 63 24 01 00 00 68 f4 53 71 a4 01 00 00 00 00 00 00 3a 00 00 00 76 | php$......c$...h.Sq........:...v |
5660 | 65 6e 64 6f 72 2f 63 6f 6d 70 6f 73 65 72 2f 63 6c 61 73 73 2d 6d 61 70 2d 67 65 6e 65 72 61 74 | endor/composer/class-map-generat |
5680 | 6f 72 2f 73 72 63 2f 50 68 70 46 69 6c 65 43 6c 65 61 6e 65 72 2e 70 68 70 12 10 00 00 12 ad 00 | or/src/PhpFileCleaner.php....... |
56a0 | 63 12 10 00 00 9a 35 17 5d a4 01 00 00 00 00 00 00 39 00 00 00 76 65 6e 64 6f 72 2f 63 6f 6d 70 | c.....5.]........9...vendor/comp |
56c0 | 6f 73 65 72 2f 63 6c 61 73 73 2d 6d 61 70 2d 67 65 6e 65 72 61 74 6f 72 2f 73 72 63 2f 50 68 70 | oser/class-map-generator/src/Php |
56e0 | 46 69 6c 65 50 61 72 73 65 72 2e 70 68 70 15 0b 00 00 12 ad 00 63 15 0b 00 00 e6 b0 7a f9 a4 01 | FileParser.php.......c......z... |
5700 | 00 00 00 00 00 00 1d 00 00 00 76 65 6e 64 6f 72 2f 63 6f 6d 70 6f 73 65 72 2f 69 6e 73 74 61 6c | ..........vendor/composer/instal |
5720 | 6c 65 64 2e 70 68 70 70 1f 00 00 12 ad 00 63 70 1f 00 00 60 f6 29 44 a4 01 00 00 00 00 00 00 29 | led.phpp......cp...`.)D........) |
5740 | 00 00 00 76 65 6e 64 6f 72 2f 63 6f 6d 70 6f 73 65 72 2f 6d 65 74 61 64 61 74 61 2d 6d 69 6e 69 | ...vendor/composer/metadata-mini |
5760 | 66 69 65 72 2f 4c 49 43 45 4e 53 45 1e 04 00 00 12 ad 00 63 1e 04 00 00 bd a3 eb c7 a4 01 00 00 | fier/LICENSE.......c............ |
5780 | 00 00 00 00 3a 00 00 00 76 65 6e 64 6f 72 2f 63 6f 6d 70 6f 73 65 72 2f 6d 65 74 61 64 61 74 61 | ....:...vendor/composer/metadata |
57a0 | 2d 6d 69 6e 69 66 69 65 72 2f 73 72 63 2f 4d 65 74 61 64 61 74 61 4d 69 6e 69 66 69 65 72 2e 70 | -minifier/src/MetadataMinifier.p |
57c0 | 68 70 d0 04 00 00 12 ad 00 63 d0 04 00 00 c2 30 26 c0 a4 01 00 00 00 00 00 00 1c 00 00 00 76 65 | hp.......c.....0&.............ve |
57e0 | 6e 64 6f 72 2f 63 6f 6d 70 6f 73 65 72 2f 70 63 72 65 2f 4c 49 43 45 4e 53 45 1e 04 00 00 12 ad | ndor/composer/pcre/LICENSE...... |
5800 | 00 63 1e 04 00 00 bd a3 eb c7 a4 01 00 00 00 00 00 00 2b 00 00 00 76 65 6e 64 6f 72 2f 63 6f 6d | .c................+...vendor/com |
5820 | 70 6f 73 65 72 2f 70 63 72 65 2f 73 72 63 2f 4d 61 74 63 68 41 6c 6c 52 65 73 75 6c 74 2e 70 68 | poser/pcre/src/MatchAllResult.ph |
5840 | 70 19 01 00 00 12 ad 00 63 19 01 00 00 38 61 c7 94 a4 01 00 00 00 00 00 00 36 00 00 00 76 65 6e | p.......c....8a..........6...ven |
5860 | 64 6f 72 2f 63 6f 6d 70 6f 73 65 72 2f 70 63 72 65 2f 73 72 63 2f 4d 61 74 63 68 41 6c 6c 57 69 | dor/composer/pcre/src/MatchAllWi |
5880 | 74 68 4f 66 66 73 65 74 73 52 65 73 75 6c 74 2e 70 68 70 26 01 00 00 12 ad 00 63 26 01 00 00 16 | thOffsetsResult.php&......c&.... |
58a0 | 8b 09 7c a4 01 00 00 00 00 00 00 28 00 00 00 76 65 6e 64 6f 72 2f 63 6f 6d 70 6f 73 65 72 2f 70 | ..|........(...vendor/composer/p |
58c0 | 63 72 65 2f 73 72 63 2f 4d 61 74 63 68 52 65 73 75 6c 74 2e 70 68 70 eb 00 00 00 12 ad 00 63 eb | cre/src/MatchResult.php.......c. |
58e0 | 00 00 00 08 04 85 91 a4 01 00 00 00 00 00 00 33 00 00 00 76 65 6e 64 6f 72 2f 63 6f 6d 70 6f 73 | ...............3...vendor/compos |
5900 | 65 72 2f 70 63 72 65 2f 73 72 63 2f 4d 61 74 63 68 57 69 74 68 4f 66 66 73 65 74 73 52 65 73 75 | er/pcre/src/MatchWithOffsetsResu |
5920 | 6c 74 2e 70 68 70 f8 00 00 00 12 ad 00 63 f8 00 00 00 3c bb d3 c2 a4 01 00 00 00 00 00 00 2a 00 | lt.php.......c....<...........*. |
5940 | 00 00 76 65 6e 64 6f 72 2f 63 6f 6d 70 6f 73 65 72 2f 70 63 72 65 2f 73 72 63 2f 50 63 72 65 45 | ..vendor/composer/pcre/src/PcreE |
5960 | 78 63 65 70 74 69 6f 6e 2e 70 68 70 49 03 00 00 12 ad 00 63 49 03 00 00 cc e0 0a 37 a4 01 00 00 | xception.phpI......cI......7.... |
5980 | 00 00 00 00 21 00 00 00 76 65 6e 64 6f 72 2f 63 6f 6d 70 6f 73 65 72 2f 70 63 72 65 2f 73 72 63 | ....!...vendor/composer/pcre/src |
59a0 | 2f 50 72 65 67 2e 70 68 70 83 17 00 00 12 ad 00 63 83 17 00 00 19 1a 25 02 a4 01 00 00 00 00 00 | /Preg.php.......c......%........ |
59c0 | 00 22 00 00 00 76 65 6e 64 6f 72 2f 63 6f 6d 70 6f 73 65 72 2f 70 63 72 65 2f 73 72 63 2f 52 65 | ."...vendor/composer/pcre/src/Re |
59e0 | 67 65 78 2e 70 68 70 e3 09 00 00 12 ad 00 63 e3 09 00 00 40 81 67 ba a4 01 00 00 00 00 00 00 2a | gex.php.......c....@.g.........* |
5a00 | 00 00 00 76 65 6e 64 6f 72 2f 63 6f 6d 70 6f 73 65 72 2f 70 63 72 65 2f 73 72 63 2f 52 65 70 6c | ...vendor/composer/pcre/src/Repl |
5a20 | 61 63 65 52 65 73 75 6c 74 2e 70 68 70 0c 01 00 00 12 ad 00 63 0c 01 00 00 d6 6e 30 bf a4 01 00 | aceResult.php.......c.....n0.... |
5a40 | 00 00 00 00 00 1e 00 00 00 76 65 6e 64 6f 72 2f 63 6f 6d 70 6f 73 65 72 2f 73 65 6d 76 65 72 2f | .........vendor/composer/semver/ |
5a60 | 4c 49 43 45 4e 53 45 1e 04 00 00 12 ad 00 63 1e 04 00 00 c7 53 52 6d a4 01 00 00 00 00 00 00 29 | LICENSE.......c.....SRm........) |
5a80 | 00 00 00 76 65 6e 64 6f 72 2f 63 6f 6d 70 6f 73 65 72 2f 73 65 6d 76 65 72 2f 73 72 63 2f 43 6f | ...vendor/composer/semver/src/Co |
5aa0 | 6d 70 61 72 61 74 6f 72 2e 70 68 70 10 04 00 00 12 ad 00 63 10 04 00 00 5e 5f 45 93 a4 01 00 00 | mparator.php.......c....^_E..... |
5ac0 | 00 00 00 00 2f 00 00 00 76 65 6e 64 6f 72 2f 63 6f 6d 70 6f 73 65 72 2f 73 65 6d 76 65 72 2f 73 | ..../...vendor/composer/semver/s |
5ae0 | 72 63 2f 43 6f 6d 70 69 6c 69 6e 67 4d 61 74 63 68 65 72 2e 70 68 70 63 06 00 00 12 ad 00 63 63 | rc/CompilingMatcher.phpc......cc |
5b00 | 06 00 00 84 80 0f a6 a4 01 00 00 00 00 00 00 2f 00 00 00 76 65 6e 64 6f 72 2f 63 6f 6d 70 6f 73 | .............../...vendor/compos |
5b20 | 65 72 2f 73 65 6d 76 65 72 2f 73 72 63 2f 43 6f 6e 73 74 72 61 69 6e 74 2f 42 6f 75 6e 64 2e 70 | er/semver/src/Constraint/Bound.p |
5b40 | 68 70 77 05 00 00 12 ad 00 63 77 05 00 00 57 34 5d 57 a4 01 00 00 00 00 00 00 34 00 00 00 76 65 | hpw......cw...W4]W........4...ve |
5b60 | 6e 64 6f 72 2f 63 6f 6d 70 6f 73 65 72 2f 73 65 6d 76 65 72 2f 73 72 63 2f 43 6f 6e 73 74 72 61 | ndor/composer/semver/src/Constra |
5b80 | 69 6e 74 2f 43 6f 6e 73 74 72 61 69 6e 74 2e 70 68 70 f8 1d 00 00 12 ad 00 63 f8 1d 00 00 92 8b | int/Constraint.php.......c...... |
5ba0 | 88 bd a4 01 00 00 00 00 00 00 3d 00 00 00 76 65 6e 64 6f 72 2f 63 6f 6d 70 6f 73 65 72 2f 73 65 | ..........=...vendor/composer/se |
5bc0 | 6d 76 65 72 2f 73 72 63 2f 43 6f 6e 73 74 72 61 69 6e 74 2f 43 6f 6e 73 74 72 61 69 6e 74 49 6e | mver/src/Constraint/ConstraintIn |
5be0 | 74 65 72 66 61 63 65 2e 70 68 70 a1 01 00 00 12 ad 00 63 a1 01 00 00 8e 35 b4 79 a4 01 00 00 00 | terface.php.......c.....5.y..... |
5c00 | 00 00 00 3c 00 00 00 76 65 6e 64 6f 72 2f 63 6f 6d 70 6f 73 65 72 2f 73 65 6d 76 65 72 2f 73 72 | ...<...vendor/composer/semver/sr |
5c20 | 63 2f 43 6f 6e 73 74 72 61 69 6e 74 2f 4d 61 74 63 68 41 6c 6c 43 6f 6e 73 74 72 61 69 6e 74 2e | c/Constraint/MatchAllConstraint. |
5c40 | 70 68 70 af 02 00 00 12 ad 00 63 af 02 00 00 b2 45 17 fa a4 01 00 00 00 00 00 00 3d 00 00 00 76 | php.......c.....E..........=...v |
5c60 | 65 6e 64 6f 72 2f 63 6f 6d 70 6f 73 65 72 2f 73 65 6d 76 65 72 2f 73 72 63 2f 43 6f 6e 73 74 72 | endor/composer/semver/src/Constr |
5c80 | 61 69 6e 74 2f 4d 61 74 63 68 4e 6f 6e 65 43 6f 6e 73 74 72 61 69 6e 74 2e 70 68 70 c9 02 00 00 | aint/MatchNoneConstraint.php.... |
5ca0 | 12 ad 00 63 c9 02 00 00 d6 af d8 ae a4 01 00 00 00 00 00 00 39 00 00 00 76 65 6e 64 6f 72 2f 63 | ...c................9...vendor/c |
5cc0 | 6f 6d 70 6f 73 65 72 2f 73 65 6d 76 65 72 2f 73 72 63 2f 43 6f 6e 73 74 72 61 69 6e 74 2f 4d 75 | omposer/semver/src/Constraint/Mu |
5ce0 | 6c 74 69 43 6f 6e 73 74 72 61 69 6e 74 2e 70 68 70 8a 13 00 00 12 ad 00 63 8a 13 00 00 cd d5 1b | ltiConstraint.php.......c....... |
5d00 | c4 a4 01 00 00 00 00 00 00 27 00 00 00 76 65 6e 64 6f 72 2f 63 6f 6d 70 6f 73 65 72 2f 73 65 6d | .........'...vendor/composer/sem |
5d20 | 76 65 72 2f 73 72 63 2f 49 6e 74 65 72 76 61 6c 2e 70 68 70 e6 03 00 00 12 ad 00 63 e6 03 00 00 | ver/src/Interval.php.......c.... |
5d40 | 3d 5b 14 69 a4 01 00 00 00 00 00 00 28 00 00 00 76 65 6e 64 6f 72 2f 63 6f 6d 70 6f 73 65 72 2f | =[.i........(...vendor/composer/ |
5d60 | 73 65 6d 76 65 72 2f 73 72 63 2f 49 6e 74 65 72 76 61 6c 73 2e 70 68 70 a4 2b 00 00 12 ad 00 63 | semver/src/Intervals.php.+.....c |
5d80 | a4 2b 00 00 40 31 ba ab a4 01 00 00 00 00 00 00 25 00 00 00 76 65 6e 64 6f 72 2f 63 6f 6d 70 6f | .+..@1..........%...vendor/compo |
5da0 | 73 65 72 2f 73 65 6d 76 65 72 2f 73 72 63 2f 53 65 6d 76 65 72 2e 70 68 70 f9 06 00 00 12 ad 00 | ser/semver/src/Semver.php....... |
5dc0 | 63 f9 06 00 00 e1 13 2d 69 a4 01 00 00 00 00 00 00 2c 00 00 00 76 65 6e 64 6f 72 2f 63 6f 6d 70 | c......-i........,...vendor/comp |
5de0 | 6f 73 65 72 2f 73 65 6d 76 65 72 2f 73 72 63 2f 56 65 72 73 69 6f 6e 50 61 72 73 65 72 2e 70 68 | oser/semver/src/VersionParser.ph |
5e00 | 70 d0 2c 00 00 12 ad 00 63 d0 2c 00 00 8e 53 ab 72 a4 01 00 00 00 00 00 00 25 00 00 00 76 65 6e | p.,.....c.,...S.r........%...ven |
5e20 | 64 6f 72 2f 63 6f 6d 70 6f 73 65 72 2f 73 70 64 78 2d 6c 69 63 65 6e 73 65 73 2f 4c 49 43 45 4e | dor/composer/spdx-licenses/LICEN |
5e40 | 53 45 1e 04 00 00 12 ad 00 63 1e 04 00 00 c7 53 52 6d a4 01 00 00 00 00 00 00 36 00 00 00 76 65 | SE.......c.....SRm........6...ve |
5e60 | 6e 64 6f 72 2f 63 6f 6d 70 6f 73 65 72 2f 73 70 64 78 2d 6c 69 63 65 6e 73 65 73 2f 72 65 73 2f | ndor/composer/spdx-licenses/res/ |
5e80 | 73 70 64 78 2d 65 78 63 65 70 74 69 6f 6e 73 2e 6a 73 6f 6e b8 0b 00 00 12 ad 00 63 b8 0b 00 00 | spdx-exceptions.json.......c.... |
5ea0 | c2 34 44 43 a4 01 00 00 00 00 00 00 34 00 00 00 76 65 6e 64 6f 72 2f 63 6f 6d 70 6f 73 65 72 2f | .4DC........4...vendor/composer/ |
5ec0 | 73 70 64 78 2d 6c 69 63 65 6e 73 65 73 2f 72 65 73 2f 73 70 64 78 2d 6c 69 63 65 6e 73 65 73 2e | spdx-licenses/res/spdx-licenses. |
5ee0 | 6a 73 6f 6e 3c c2 00 00 12 ad 00 63 3c c2 00 00 17 3d eb 38 a4 01 00 00 00 00 00 00 32 00 00 00 | json<......c<....=.8........2... |
5f00 | 76 65 6e 64 6f 72 2f 63 6f 6d 70 6f 73 65 72 2f 73 70 64 78 2d 6c 69 63 65 6e 73 65 73 2f 73 72 | vendor/composer/spdx-licenses/sr |
5f20 | 63 2f 53 70 64 78 4c 69 63 65 6e 73 65 73 2e 70 68 70 7b 15 00 00 12 ad 00 63 7b 15 00 00 08 63 | c/SpdxLicenses.php{......c{....c |
5f40 | 45 9d a4 01 00 00 00 00 00 00 26 00 00 00 76 65 6e 64 6f 72 2f 63 6f 6d 70 6f 73 65 72 2f 78 64 | E.........&...vendor/composer/xd |
5f60 | 65 62 75 67 2d 68 61 6e 64 6c 65 72 2f 4c 49 43 45 4e 53 45 2b 04 00 00 12 ad 00 63 2b 04 00 00 | ebug-handler/LICENSE+......c+... |
5f80 | d6 e3 40 54 a4 01 00 00 00 00 00 00 30 00 00 00 76 65 6e 64 6f 72 2f 63 6f 6d 70 6f 73 65 72 2f | ..@T........0...vendor/composer/ |
5fa0 | 78 64 65 62 75 67 2d 68 61 6e 64 6c 65 72 2f 73 72 63 2f 50 68 70 43 6f 6e 66 69 67 2e 70 68 70 | xdebug-handler/src/PhpConfig.php |
5fc0 | 89 03 00 00 12 ad 00 63 89 03 00 00 67 d4 8f 76 a4 01 00 00 00 00 00 00 2e 00 00 00 76 65 6e 64 | .......c....g..v............vend |
5fe0 | 6f 72 2f 63 6f 6d 70 6f 73 65 72 2f 78 64 65 62 75 67 2d 68 61 6e 64 6c 65 72 2f 73 72 63 2f 50 | or/composer/xdebug-handler/src/P |
6000 | 72 6f 63 65 73 73 2e 70 68 70 d6 05 00 00 12 ad 00 63 d6 05 00 00 6f 11 37 be a4 01 00 00 00 00 | rocess.php.......c....o.7....... |
6020 | 00 00 2d 00 00 00 76 65 6e 64 6f 72 2f 63 6f 6d 70 6f 73 65 72 2f 78 64 65 62 75 67 2d 68 61 6e | ..-...vendor/composer/xdebug-han |
6040 | 64 6c 65 72 2f 73 72 63 2f 53 74 61 74 75 73 2e 70 68 70 ba 0c 00 00 12 ad 00 63 ba 0c 00 00 78 | dler/src/Status.php.......c....x |
6060 | 66 31 37 a4 01 00 00 00 00 00 00 34 00 00 00 76 65 6e 64 6f 72 2f 63 6f 6d 70 6f 73 65 72 2f 78 | f17........4...vendor/composer/x |
6080 | 64 65 62 75 67 2d 68 61 6e 64 6c 65 72 2f 73 72 63 2f 58 64 65 62 75 67 48 61 6e 64 6c 65 72 2e | debug-handler/src/XdebugHandler. |
60a0 | 70 68 70 72 29 00 00 12 ad 00 63 72 29 00 00 38 d5 63 36 a4 01 00 00 00 00 00 00 28 00 00 00 76 | phpr).....cr)..8.c6........(...v |
60c0 | 65 6e 64 6f 72 2f 6a 75 73 74 69 6e 72 61 69 6e 62 6f 77 2f 6a 73 6f 6e 2d 73 63 68 65 6d 61 2f | endor/justinrainbow/json-schema/ |
60e0 | 4c 49 43 45 4e 53 45 22 04 00 00 12 ad 00 63 22 04 00 00 0c 7c bb 99 a4 01 00 00 00 00 00 00 4e | LICENSE"......c"....|..........N |
6100 | 00 00 00 76 65 6e 64 6f 72 2f 6a 75 73 74 69 6e 72 61 69 6e 62 6f 77 2f 6a 73 6f 6e 2d 73 63 68 | ...vendor/justinrainbow/json-sch |
6120 | 65 6d 61 2f 73 72 63 2f 4a 73 6f 6e 53 63 68 65 6d 61 2f 43 6f 6e 73 74 72 61 69 6e 74 73 2f 42 | ema/src/JsonSchema/Constraints/B |
6140 | 61 73 65 43 6f 6e 73 74 72 61 69 6e 74 2e 70 68 70 a1 09 00 00 12 ad 00 63 a1 09 00 00 86 77 cc | aseConstraint.php.......c.....w. |
6160 | 6c a4 01 00 00 00 00 00 00 54 00 00 00 76 65 6e 64 6f 72 2f 6a 75 73 74 69 6e 72 61 69 6e 62 6f | l........T...vendor/justinrainbo |
6180 | 77 2f 6a 73 6f 6e 2d 73 63 68 65 6d 61 2f 73 72 63 2f 4a 73 6f 6e 53 63 68 65 6d 61 2f 43 6f 6e | w/json-schema/src/JsonSchema/Con |
61a0 | 73 74 72 61 69 6e 74 73 2f 43 6f 6c 6c 65 63 74 69 6f 6e 43 6f 6e 73 74 72 61 69 6e 74 2e 70 68 | straints/CollectionConstraint.ph |
61c0 | 70 83 0a 00 00 12 ad 00 63 83 0a 00 00 9e b8 3d 9a a4 01 00 00 00 00 00 00 4a 00 00 00 76 65 6e | p.......c......=.........J...ven |
61e0 | 64 6f 72 2f 6a 75 73 74 69 6e 72 61 69 6e 62 6f 77 2f 6a 73 6f 6e 2d 73 63 68 65 6d 61 2f 73 72 | dor/justinrainbow/json-schema/sr |
6200 | 63 2f 4a 73 6f 6e 53 63 68 65 6d 61 2f 43 6f 6e 73 74 72 61 69 6e 74 73 2f 43 6f 6e 73 74 72 61 | c/JsonSchema/Constraints/Constra |
6220 | 69 6e 74 2e 70 68 70 c1 0d 00 00 12 ad 00 63 c1 0d 00 00 96 50 46 46 a4 01 00 00 00 00 00 00 53 | int.php.......c.....PFF........S |
6240 | 00 00 00 76 65 6e 64 6f 72 2f 6a 75 73 74 69 6e 72 61 69 6e 62 6f 77 2f 6a 73 6f 6e 2d 73 63 68 | ...vendor/justinrainbow/json-sch |
6260 | 65 6d 61 2f 73 72 63 2f 4a 73 6f 6e 53 63 68 65 6d 61 2f 43 6f 6e 73 74 72 61 69 6e 74 73 2f 43 | ema/src/JsonSchema/Constraints/C |
6280 | 6f 6e 73 74 72 61 69 6e 74 49 6e 74 65 72 66 61 63 65 2e 70 68 70 bc 01 00 00 12 ad 00 63 bc 01 | onstraintInterface.php.......c.. |
62a0 | 00 00 ff 20 51 9c a4 01 00 00 00 00 00 00 4e 00 00 00 76 65 6e 64 6f 72 2f 6a 75 73 74 69 6e 72 | ....Q.........N...vendor/justinr |
62c0 | 61 69 6e 62 6f 77 2f 6a 73 6f 6e 2d 73 63 68 65 6d 61 2f 73 72 63 2f 4a 73 6f 6e 53 63 68 65 6d | ainbow/json-schema/src/JsonSchem |
62e0 | 61 2f 43 6f 6e 73 74 72 61 69 6e 74 73 2f 45 6e 75 6d 43 6f 6e 73 74 72 61 69 6e 74 2e 70 68 70 | a/Constraints/EnumConstraint.php |
6300 | 5c 03 00 00 12 ad 00 63 5c 03 00 00 5f 7f 7d fd a4 01 00 00 00 00 00 00 47 00 00 00 76 65 6e 64 | \......c\..._.}.........G...vend |
6320 | 6f 72 2f 6a 75 73 74 69 6e 72 61 69 6e 62 6f 77 2f 6a 73 6f 6e 2d 73 63 68 65 6d 61 2f 73 72 63 | or/justinrainbow/json-schema/src |
6340 | 2f 4a 73 6f 6e 53 63 68 65 6d 61 2f 43 6f 6e 73 74 72 61 69 6e 74 73 2f 46 61 63 74 6f 72 79 2e | /JsonSchema/Constraints/Factory. |
6360 | 70 68 70 e0 0c 00 00 12 ad 00 63 e0 0c 00 00 eb 92 5f 94 a4 01 00 00 00 00 00 00 50 00 00 00 76 | php.......c......_.........P...v |
6380 | 65 6e 64 6f 72 2f 6a 75 73 74 69 6e 72 61 69 6e 62 6f 77 2f 6a 73 6f 6e 2d 73 63 68 65 6d 61 2f | endor/justinrainbow/json-schema/ |
63a0 | 73 72 63 2f 4a 73 6f 6e 53 63 68 65 6d 61 2f 43 6f 6e 73 74 72 61 69 6e 74 73 2f 46 6f 72 6d 61 | src/JsonSchema/Constraints/Forma |
63c0 | 74 43 6f 6e 73 74 72 61 69 6e 74 2e 70 68 70 73 14 00 00 12 ad 00 63 73 14 00 00 64 05 0b de a4 | tConstraint.phps......cs...d.... |
63e0 | 01 00 00 00 00 00 00 50 00 00 00 76 65 6e 64 6f 72 2f 6a 75 73 74 69 6e 72 61 69 6e 62 6f 77 2f | .......P...vendor/justinrainbow/ |
6400 | 6a 73 6f 6e 2d 73 63 68 65 6d 61 2f 73 72 63 2f 4a 73 6f 6e 53 63 68 65 6d 61 2f 43 6f 6e 73 74 | json-schema/src/JsonSchema/Const |
6420 | 72 61 69 6e 74 73 2f 4e 75 6d 62 65 72 43 6f 6e 73 74 72 61 69 6e 74 2e 70 68 70 83 09 00 00 12 | raints/NumberConstraint.php..... |
6440 | ad 00 63 83 09 00 00 65 90 0c a8 a4 01 00 00 00 00 00 00 50 00 00 00 76 65 6e 64 6f 72 2f 6a 75 | ..c....e...........P...vendor/ju |
6460 | 73 74 69 6e 72 61 69 6e 62 6f 77 2f 6a 73 6f 6e 2d 73 63 68 65 6d 61 2f 73 72 63 2f 4a 73 6f 6e | stinrainbow/json-schema/src/Json |
6480 | 53 63 68 65 6d 61 2f 43 6f 6e 73 74 72 61 69 6e 74 73 2f 4f 62 6a 65 63 74 43 6f 6e 73 74 72 61 | Schema/Constraints/ObjectConstra |
64a0 | 69 6e 74 2e 70 68 70 b7 11 00 00 12 ad 00 63 b7 11 00 00 25 6c ac f6 a4 01 00 00 00 00 00 00 50 | int.php.......c....%l..........P |
64c0 | 00 00 00 76 65 6e 64 6f 72 2f 6a 75 73 74 69 6e 72 61 69 6e 62 6f 77 2f 6a 73 6f 6e 2d 73 63 68 | ...vendor/justinrainbow/json-sch |
64e0 | 65 6d 61 2f 73 72 63 2f 4a 73 6f 6e 53 63 68 65 6d 61 2f 43 6f 6e 73 74 72 61 69 6e 74 73 2f 53 | ema/src/JsonSchema/Constraints/S |
6500 | 63 68 65 6d 61 43 6f 6e 73 74 72 61 69 6e 74 2e 70 68 70 26 09 00 00 12 ad 00 63 26 09 00 00 37 | chemaConstraint.php&......c&...7 |
6520 | 38 f7 ac a4 01 00 00 00 00 00 00 50 00 00 00 76 65 6e 64 6f 72 2f 6a 75 73 74 69 6e 72 61 69 6e | 8..........P...vendor/justinrain |
6540 | 62 6f 77 2f 6a 73 6f 6e 2d 73 63 68 65 6d 61 2f 73 72 63 2f 4a 73 6f 6e 53 63 68 65 6d 61 2f 43 | bow/json-schema/src/JsonSchema/C |
6560 | 6f 6e 73 74 72 61 69 6e 74 73 2f 53 74 72 69 6e 67 43 6f 6e 73 74 72 61 69 6e 74 2e 70 68 70 7a | onstraints/StringConstraint.phpz |
6580 | 04 00 00 12 ad 00 63 7a 04 00 00 f9 66 c5 7e a4 01 00 00 00 00 00 00 58 00 00 00 76 65 6e 64 6f | ......cz....f.~........X...vendo |
65a0 | 72 2f 6a 75 73 74 69 6e 72 61 69 6e 62 6f 77 2f 6a 73 6f 6e 2d 73 63 68 65 6d 61 2f 73 72 63 2f | r/justinrainbow/json-schema/src/ |
65c0 | 4a 73 6f 6e 53 63 68 65 6d 61 2f 43 6f 6e 73 74 72 61 69 6e 74 73 2f 54 79 70 65 43 68 65 63 6b | JsonSchema/Constraints/TypeCheck |
65e0 | 2f 4c 6f 6f 73 65 54 79 70 65 43 68 65 63 6b 2e 70 68 70 61 04 00 00 12 ad 00 63 61 04 00 00 0b | /LooseTypeCheck.phpa......ca.... |
6600 | 09 71 c3 a4 01 00 00 00 00 00 00 59 00 00 00 76 65 6e 64 6f 72 2f 6a 75 73 74 69 6e 72 61 69 6e | .q.........Y...vendor/justinrain |
6620 | 62 6f 77 2f 6a 73 6f 6e 2d 73 63 68 65 6d 61 2f 73 72 63 2f 4a 73 6f 6e 53 63 68 65 6d 61 2f 43 | bow/json-schema/src/JsonSchema/C |
6640 | 6f 6e 73 74 72 61 69 6e 74 73 2f 54 79 70 65 43 68 65 63 6b 2f 53 74 72 69 63 74 54 79 70 65 43 | onstraints/TypeCheck/StrictTypeC |
6660 | 68 65 63 6b 2e 70 68 70 97 02 00 00 12 ad 00 63 97 02 00 00 34 7e be a0 a4 01 00 00 00 00 00 00 | heck.php.......c....4~.......... |
6680 | 5c 00 00 00 76 65 6e 64 6f 72 2f 6a 75 73 74 69 6e 72 61 69 6e 62 6f 77 2f 6a 73 6f 6e 2d 73 63 | \...vendor/justinrainbow/json-sc |
66a0 | 68 65 6d 61 2f 73 72 63 2f 4a 73 6f 6e 53 63 68 65 6d 61 2f 43 6f 6e 73 74 72 61 69 6e 74 73 2f | hema/src/JsonSchema/Constraints/ |
66c0 | 54 79 70 65 43 68 65 63 6b 2f 54 79 70 65 43 68 65 63 6b 49 6e 74 65 72 66 61 63 65 2e 70 68 70 | TypeCheck/TypeCheckInterface.php |
66e0 | 89 01 00 00 12 ad 00 63 89 01 00 00 93 b5 2b 6a a4 01 00 00 00 00 00 00 4e 00 00 00 76 65 6e 64 | .......c......+j........N...vend |
6700 | 6f 72 2f 6a 75 73 74 69 6e 72 61 69 6e 62 6f 77 2f 6a 73 6f 6e 2d 73 63 68 65 6d 61 2f 73 72 63 | or/justinrainbow/json-schema/src |
6720 | 2f 4a 73 6f 6e 53 63 68 65 6d 61 2f 43 6f 6e 73 74 72 61 69 6e 74 73 2f 54 79 70 65 43 6f 6e 73 | /JsonSchema/Constraints/TypeCons |
6740 | 74 72 61 69 6e 74 2e 70 68 70 2a 0f 00 00 12 ad 00 63 2a 0f 00 00 31 96 34 4e a4 01 00 00 00 00 | traint.php*......c*...1.4N...... |
6760 | 00 00 53 00 00 00 76 65 6e 64 6f 72 2f 6a 75 73 74 69 6e 72 61 69 6e 62 6f 77 2f 6a 73 6f 6e 2d | ..S...vendor/justinrainbow/json- |
6780 | 73 63 68 65 6d 61 2f 73 72 63 2f 4a 73 6f 6e 53 63 68 65 6d 61 2f 43 6f 6e 73 74 72 61 69 6e 74 | schema/src/JsonSchema/Constraint |
67a0 | 73 2f 55 6e 64 65 66 69 6e 65 64 43 6f 6e 73 74 72 61 69 6e 74 2e 70 68 70 2c 22 00 00 12 ad 00 | s/UndefinedConstraint.php,"..... |
67c0 | 63 2c 22 00 00 17 01 89 2d a4 01 00 00 00 00 00 00 46 00 00 00 76 65 6e 64 6f 72 2f 6a 75 73 74 | c,".....-........F...vendor/just |
67e0 | 69 6e 72 61 69 6e 62 6f 77 2f 6a 73 6f 6e 2d 73 63 68 65 6d 61 2f 73 72 63 2f 4a 73 6f 6e 53 63 | inrainbow/json-schema/src/JsonSc |
6800 | 68 65 6d 61 2f 45 6e 74 69 74 79 2f 4a 73 6f 6e 50 6f 69 6e 74 65 72 2e 70 68 70 e8 06 00 00 12 | hema/Entity/JsonPointer.php..... |
6820 | ad 00 63 e8 06 00 00 06 7b 4e 96 a4 01 00 00 00 00 00 00 50 00 00 00 76 65 6e 64 6f 72 2f 6a 75 | ..c.....{N.........P...vendor/ju |
6840 | 73 74 69 6e 72 61 69 6e 62 6f 77 2f 6a 73 6f 6e 2d 73 63 68 65 6d 61 2f 73 72 63 2f 4a 73 6f 6e | stinrainbow/json-schema/src/Json |
6860 | 53 63 68 65 6d 61 2f 45 78 63 65 70 74 69 6f 6e 2f 45 78 63 65 70 74 69 6f 6e 49 6e 74 65 72 66 | Schema/Exception/ExceptionInterf |
6880 | 61 63 65 2e 70 68 70 49 00 00 00 12 ad 00 63 49 00 00 00 25 7c 19 b0 a4 01 00 00 00 00 00 00 56 | ace.phpI......cI...%|..........V |
68a0 | 00 00 00 76 65 6e 64 6f 72 2f 6a 75 73 74 69 6e 72 61 69 6e 62 6f 77 2f 6a 73 6f 6e 2d 73 63 68 | ...vendor/justinrainbow/json-sch |
68c0 | 65 6d 61 2f 73 72 63 2f 4a 73 6f 6e 53 63 68 65 6d 61 2f 45 78 63 65 70 74 69 6f 6e 2f 49 6e 76 | ema/src/JsonSchema/Exception/Inv |
68e0 | 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 2e 70 68 70 95 00 00 00 12 ad 00 | alidArgumentException.php....... |
6900 | 63 95 00 00 00 8b e0 47 05 a4 01 00 00 00 00 00 00 54 00 00 00 76 65 6e 64 6f 72 2f 6a 75 73 74 | c......G.........T...vendor/just |
6920 | 69 6e 72 61 69 6e 62 6f 77 2f 6a 73 6f 6e 2d 73 63 68 65 6d 61 2f 73 72 63 2f 4a 73 6f 6e 53 63 | inrainbow/json-schema/src/JsonSc |
6940 | 68 65 6d 61 2f 45 78 63 65 70 74 69 6f 6e 2f 49 6e 76 61 6c 69 64 43 6f 6e 66 69 67 45 78 63 65 | hema/Exception/InvalidConfigExce |
6960 | 70 74 69 6f 6e 2e 70 68 70 6c 00 00 00 12 ad 00 63 6c 00 00 00 41 21 4c d7 a4 01 00 00 00 00 00 | ption.phpl......cl...A!L........ |
6980 | 00 54 00 00 00 76 65 6e 64 6f 72 2f 6a 75 73 74 69 6e 72 61 69 6e 62 6f 77 2f 6a 73 6f 6e 2d 73 | .T...vendor/justinrainbow/json-s |
69a0 | 63 68 65 6d 61 2f 73 72 63 2f 4a 73 6f 6e 53 63 68 65 6d 61 2f 45 78 63 65 70 74 69 6f 6e 2f 49 | chema/src/JsonSchema/Exception/I |
69c0 | 6e 76 61 6c 69 64 53 63 68 65 6d 61 45 78 63 65 70 74 69 6f 6e 2e 70 68 70 6c 00 00 00 12 ad 00 | nvalidSchemaException.phpl...... |
69e0 | 63 6c 00 00 00 e8 32 f7 fe a4 01 00 00 00 00 00 00 5d 00 00 00 76 65 6e 64 6f 72 2f 6a 75 73 74 | cl....2..........]...vendor/just |
6a00 | 69 6e 72 61 69 6e 62 6f 77 2f 6a 73 6f 6e 2d 73 63 68 65 6d 61 2f 73 72 63 2f 4a 73 6f 6e 53 63 | inrainbow/json-schema/src/JsonSc |
6a20 | 68 65 6d 61 2f 45 78 63 65 70 74 69 6f 6e 2f 49 6e 76 61 6c 69 64 53 63 68 65 6d 61 4d 65 64 69 | hema/Exception/InvalidSchemaMedi |
6a40 | 61 54 79 70 65 45 78 63 65 70 74 69 6f 6e 2e 70 68 70 75 00 00 00 12 ad 00 63 75 00 00 00 3d 68 | aTypeException.phpu......cu...=h |
6a60 | e7 07 a4 01 00 00 00 00 00 00 57 00 00 00 76 65 6e 64 6f 72 2f 6a 75 73 74 69 6e 72 61 69 6e 62 | ..........W...vendor/justinrainb |
6a80 | 6f 77 2f 6a 73 6f 6e 2d 73 63 68 65 6d 61 2f 73 72 63 2f 4a 73 6f 6e 53 63 68 65 6d 61 2f 45 78 | ow/json-schema/src/JsonSchema/Ex |
6aa0 | 63 65 70 74 69 6f 6e 2f 49 6e 76 61 6c 69 64 53 6f 75 72 63 65 55 72 69 45 78 63 65 70 74 69 6f | ception/InvalidSourceUriExceptio |
6ac0 | 6e 2e 70 68 70 77 00 00 00 12 ad 00 63 77 00 00 00 4e 2d f2 5b a4 01 00 00 00 00 00 00 53 00 00 | n.phpw......cw...N-.[........S.. |
6ae0 | 00 76 65 6e 64 6f 72 2f 6a 75 73 74 69 6e 72 61 69 6e 62 6f 77 2f 6a 73 6f 6e 2d 73 63 68 65 6d | .vendor/justinrainbow/json-schem |
6b00 | 61 2f 73 72 63 2f 4a 73 6f 6e 53 63 68 65 6d 61 2f 45 78 63 65 70 74 69 6f 6e 2f 4a 73 6f 6e 44 | a/src/JsonSchema/Exception/JsonD |
6b20 | 65 63 6f 64 69 6e 67 45 78 63 65 70 74 69 6f 6e 2e 70 68 70 de 02 00 00 12 ad 00 63 de 02 00 00 | ecodingException.php.......c.... |
6b40 | 5c b8 0d 0a a4 01 00 00 00 00 00 00 57 00 00 00 76 65 6e 64 6f 72 2f 6a 75 73 74 69 6e 72 61 69 | \...........W...vendor/justinrai |
6b60 | 6e 62 6f 77 2f 6a 73 6f 6e 2d 73 63 68 65 6d 61 2f 73 72 63 2f 4a 73 6f 6e 53 63 68 65 6d 61 2f | nbow/json-schema/src/JsonSchema/ |
6b80 | 45 78 63 65 70 74 69 6f 6e 2f 52 65 73 6f 75 72 63 65 4e 6f 74 46 6f 75 6e 64 45 78 63 65 70 74 | Exception/ResourceNotFoundExcept |
6ba0 | 69 6f 6e 2e 70 68 70 6f 00 00 00 12 ad 00 63 6f 00 00 00 70 ed db f9 a4 01 00 00 00 00 00 00 4e | ion.phpo......co...p...........N |
6bc0 | 00 00 00 76 65 6e 64 6f 72 2f 6a 75 73 74 69 6e 72 61 69 6e 62 6f 77 2f 6a 73 6f 6e 2d 73 63 68 | ...vendor/justinrainbow/json-sch |
6be0 | 65 6d 61 2f 73 72 63 2f 4a 73 6f 6e 53 63 68 65 6d 61 2f 45 78 63 65 70 74 69 6f 6e 2f 52 75 6e | ema/src/JsonSchema/Exception/Run |
6c00 | 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 2e 70 68 70 85 00 00 00 12 ad 00 63 85 00 00 00 08 25 85 | timeException.php.......c.....%. |
6c20 | 97 a4 01 00 00 00 00 00 00 5e 00 00 00 76 65 6e 64 6f 72 2f 6a 75 73 74 69 6e 72 61 69 6e 62 6f | .........^...vendor/justinrainbo |
6c40 | 77 2f 6a 73 6f 6e 2d 73 63 68 65 6d 61 2f 73 72 63 2f 4a 73 6f 6e 53 63 68 65 6d 61 2f 45 78 63 | w/json-schema/src/JsonSchema/Exc |
6c60 | 65 70 74 69 6f 6e 2f 55 6e 72 65 73 6f 6c 76 61 62 6c 65 4a 73 6f 6e 50 6f 69 6e 74 65 72 45 78 | eption/UnresolvableJsonPointerEx |
6c80 | 63 65 70 74 69 6f 6e 2e 70 68 70 80 00 00 00 12 ad 00 63 80 00 00 00 75 2d 23 31 a4 01 00 00 00 | ception.php.......c....u-#1..... |
6ca0 | 00 00 00 52 00 00 00 76 65 6e 64 6f 72 2f 6a 75 73 74 69 6e 72 61 69 6e 62 6f 77 2f 6a 73 6f 6e | ...R...vendor/justinrainbow/json |
6cc0 | 2d 73 63 68 65 6d 61 2f 73 72 63 2f 4a 73 6f 6e 53 63 68 65 6d 61 2f 45 78 63 65 70 74 69 6f 6e | -schema/src/JsonSchema/Exception |
6ce0 | 2f 55 72 69 52 65 73 6f 6c 76 65 72 45 78 63 65 70 74 69 6f 6e 2e 70 68 70 6a 00 00 00 12 ad 00 | /UriResolverException.phpj...... |
6d00 | 63 6a 00 00 00 e5 1a 3e 8f a4 01 00 00 00 00 00 00 51 00 00 00 76 65 6e 64 6f 72 2f 6a 75 73 74 | cj.....>.........Q...vendor/just |
6d20 | 69 6e 72 61 69 6e 62 6f 77 2f 6a 73 6f 6e 2d 73 63 68 65 6d 61 2f 73 72 63 2f 4a 73 6f 6e 53 63 | inrainbow/json-schema/src/JsonSc |
6d40 | 68 65 6d 61 2f 45 78 63 65 70 74 69 6f 6e 2f 56 61 6c 69 64 61 74 69 6f 6e 45 78 63 65 70 74 69 | hema/Exception/ValidationExcepti |
6d60 | 6f 6e 2e 70 68 70 66 00 00 00 12 ad 00 63 66 00 00 00 ac a4 84 fe a4 01 00 00 00 00 00 00 4b 00 | on.phpf......cf...............K. |
6d80 | 00 00 76 65 6e 64 6f 72 2f 6a 75 73 74 69 6e 72 61 69 6e 62 6f 77 2f 6a 73 6f 6e 2d 73 63 68 65 | ..vendor/justinrainbow/json-sche |
6da0 | 6d 61 2f 73 72 63 2f 4a 73 6f 6e 53 63 68 65 6d 61 2f 49 74 65 72 61 74 6f 72 2f 4f 62 6a 65 63 | ma/src/JsonSchema/Iterator/Objec |
6dc0 | 74 49 74 65 72 61 74 6f 72 2e 70 68 70 fe 05 00 00 12 ad 00 63 fe 05 00 00 4d 8f 84 f5 a4 01 00 | tIterator.php.......c....M...... |
6de0 | 00 00 00 00 00 3b 00 00 00 76 65 6e 64 6f 72 2f 6a 75 73 74 69 6e 72 61 69 6e 62 6f 77 2f 6a 73 | .....;...vendor/justinrainbow/js |
6e00 | 6f 6e 2d 73 63 68 65 6d 61 2f 73 72 63 2f 4a 73 6f 6e 53 63 68 65 6d 61 2f 52 66 63 33 33 33 39 | on-schema/src/JsonSchema/Rfc3339 |
6e20 | 2e 70 68 70 a0 02 00 00 12 ad 00 63 a0 02 00 00 66 34 f7 b3 a4 01 00 00 00 00 00 00 41 00 00 00 | .php.......c....f4..........A... |
6e40 | 76 65 6e 64 6f 72 2f 6a 75 73 74 69 6e 72 61 69 6e 62 6f 77 2f 6a 73 6f 6e 2d 73 63 68 65 6d 61 | vendor/justinrainbow/json-schema |
6e60 | 2f 73 72 63 2f 4a 73 6f 6e 53 63 68 65 6d 61 2f 53 63 68 65 6d 61 53 74 6f 72 61 67 65 2e 70 68 | /src/JsonSchema/SchemaStorage.ph |
6e80 | 70 93 0d 00 00 12 ad 00 63 93 0d 00 00 26 7a df 5e a4 01 00 00 00 00 00 00 4a 00 00 00 76 65 6e | p.......c....&z.^........J...ven |
6ea0 | 64 6f 72 2f 6a 75 73 74 69 6e 72 61 69 6e 62 6f 77 2f 6a 73 6f 6e 2d 73 63 68 65 6d 61 2f 73 72 | dor/justinrainbow/json-schema/sr |
6ec0 | 63 2f 4a 73 6f 6e 53 63 68 65 6d 61 2f 53 63 68 65 6d 61 53 74 6f 72 61 67 65 49 6e 74 65 72 66 | c/JsonSchema/SchemaStorageInterf |
6ee0 | 61 63 65 2e 70 68 70 01 01 00 00 12 ad 00 63 01 01 00 00 6f 8a 2b 7d a4 01 00 00 00 00 00 00 54 | ace.php.......c....o.+}........T |
6f00 | 00 00 00 76 65 6e 64 6f 72 2f 6a 75 73 74 69 6e 72 61 69 6e 62 6f 77 2f 6a 73 6f 6e 2d 73 63 68 | ...vendor/justinrainbow/json-sch |
6f20 | 65 6d 61 2f 73 72 63 2f 4a 73 6f 6e 53 63 68 65 6d 61 2f 55 72 69 2f 52 65 74 72 69 65 76 65 72 | ema/src/JsonSchema/Uri/Retriever |
6f40 | 73 2f 41 62 73 74 72 61 63 74 52 65 74 72 69 65 76 65 72 2e 70 68 70 e1 00 00 00 12 ad 00 63 e1 | s/AbstractRetriever.php.......c. |
6f60 | 00 00 00 5b fe 41 81 a4 01 00 00 00 00 00 00 47 00 00 00 76 65 6e 64 6f 72 2f 6a 75 73 74 69 6e | ...[.A.........G...vendor/justin |
6f80 | 72 61 69 6e 62 6f 77 2f 6a 73 6f 6e 2d 73 63 68 65 6d 61 2f 73 72 63 2f 4a 73 6f 6e 53 63 68 65 | rainbow/json-schema/src/JsonSche |
6fa0 | 6d 61 2f 55 72 69 2f 52 65 74 72 69 65 76 65 72 73 2f 43 75 72 6c 2e 70 68 70 a3 04 00 00 12 ad | ma/Uri/Retrievers/Curl.php...... |
6fc0 | 00 63 a3 04 00 00 c7 92 f4 a6 a4 01 00 00 00 00 00 00 52 00 00 00 76 65 6e 64 6f 72 2f 6a 75 73 | .c................R...vendor/jus |
6fe0 | 74 69 6e 72 61 69 6e 62 6f 77 2f 6a 73 6f 6e 2d 73 63 68 65 6d 61 2f 73 72 63 2f 4a 73 6f 6e 53 | tinrainbow/json-schema/src/JsonS |
7000 | 63 68 65 6d 61 2f 55 72 69 2f 52 65 74 72 69 65 76 65 72 73 2f 46 69 6c 65 47 65 74 43 6f 6e 74 | chema/Uri/Retrievers/FileGetCont |
7020 | 65 6e 74 73 2e 70 68 70 20 05 00 00 12 ad 00 63 20 05 00 00 a3 c1 1f 16 a4 01 00 00 00 00 00 00 | ents.php.......c................ |
7040 | 52 00 00 00 76 65 6e 64 6f 72 2f 6a 75 73 74 69 6e 72 61 69 6e 62 6f 77 2f 6a 73 6f 6e 2d 73 63 | R...vendor/justinrainbow/json-sc |
7060 | 68 65 6d 61 2f 73 72 63 2f 4a 73 6f 6e 53 63 68 65 6d 61 2f 55 72 69 2f 52 65 74 72 69 65 76 65 | hema/src/JsonSchema/Uri/Retrieve |
7080 | 72 73 2f 50 72 65 64 65 66 69 6e 65 64 41 72 72 61 79 2e 70 68 70 2c 02 00 00 12 ad 00 63 2c 02 | rs/PredefinedArray.php,......c,. |
70a0 | 00 00 31 95 35 fe a4 01 00 00 00 00 00 00 58 00 00 00 76 65 6e 64 6f 72 2f 6a 75 73 74 69 6e 72 | ..1.5.........X...vendor/justinr |
70c0 | 61 69 6e 62 6f 77 2f 6a 73 6f 6e 2d 73 63 68 65 6d 61 2f 73 72 63 2f 4a 73 6f 6e 53 63 68 65 6d | ainbow/json-schema/src/JsonSchem |
70e0 | 61 2f 55 72 69 2f 52 65 74 72 69 65 76 65 72 73 2f 55 72 69 52 65 74 72 69 65 76 65 72 49 6e 74 | a/Uri/Retrievers/UriRetrieverInt |
7100 | 65 72 66 61 63 65 2e 70 68 70 ae 00 00 00 12 ad 00 63 ae 00 00 00 ff 8b c1 e5 a4 01 00 00 00 00 | erface.php.......c.............. |
7120 | 00 00 43 00 00 00 76 65 6e 64 6f 72 2f 6a 75 73 74 69 6e 72 61 69 6e 62 6f 77 2f 6a 73 6f 6e 2d | ..C...vendor/justinrainbow/json- |
7140 | 73 63 68 65 6d 61 2f 73 72 63 2f 4a 73 6f 6e 53 63 68 65 6d 61 2f 55 72 69 2f 55 72 69 52 65 73 | schema/src/JsonSchema/Uri/UriRes |
7160 | 6f 6c 76 65 72 2e 70 68 70 04 0b 00 00 12 ad 00 63 04 0b 00 00 e6 06 1a 50 a4 01 00 00 00 00 00 | olver.php.......c.......P....... |
7180 | 00 44 00 00 00 76 65 6e 64 6f 72 2f 6a 75 73 74 69 6e 72 61 69 6e 62 6f 77 2f 6a 73 6f 6e 2d 73 | .D...vendor/justinrainbow/json-s |
71a0 | 63 68 65 6d 61 2f 73 72 63 2f 4a 73 6f 6e 53 63 68 65 6d 61 2f 55 72 69 2f 55 72 69 52 65 74 72 | chema/src/JsonSchema/Uri/UriRetr |
71c0 | 69 65 76 65 72 2e 70 68 70 40 14 00 00 12 ad 00 63 40 14 00 00 35 1b ce 33 a4 01 00 00 00 00 00 | iever.php@......c@...5..3....... |
71e0 | 00 48 00 00 00 76 65 6e 64 6f 72 2f 6a 75 73 74 69 6e 72 61 69 6e 62 6f 77 2f 6a 73 6f 6e 2d 73 | .H...vendor/justinrainbow/json-s |
7200 | 63 68 65 6d 61 2f 73 72 63 2f 4a 73 6f 6e 53 63 68 65 6d 61 2f 55 72 69 52 65 73 6f 6c 76 65 72 | chema/src/JsonSchema/UriResolver |
7220 | 49 6e 74 65 72 66 61 63 65 2e 70 68 70 83 00 00 00 12 ad 00 63 83 00 00 00 12 4a 80 1f a4 01 00 | Interface.php.......c.....J..... |
7240 | 00 00 00 00 00 49 00 00 00 76 65 6e 64 6f 72 2f 6a 75 73 74 69 6e 72 61 69 6e 62 6f 77 2f 6a 73 | .....I...vendor/justinrainbow/js |
7260 | 6f 6e 2d 73 63 68 65 6d 61 2f 73 72 63 2f 4a 73 6f 6e 53 63 68 65 6d 61 2f 55 72 69 52 65 74 72 | on-schema/src/JsonSchema/UriRetr |
7280 | 69 65 76 65 72 49 6e 74 65 72 66 61 63 65 2e 70 68 70 85 00 00 00 12 ad 00 63 85 00 00 00 ed e6 | ieverInterface.php.......c...... |
72a0 | 1b 65 a4 01 00 00 00 00 00 00 3d 00 00 00 76 65 6e 64 6f 72 2f 6a 75 73 74 69 6e 72 61 69 6e 62 | .e........=...vendor/justinrainb |
72c0 | 6f 77 2f 6a 73 6f 6e 2d 73 63 68 65 6d 61 2f 73 72 63 2f 4a 73 6f 6e 53 63 68 65 6d 61 2f 56 61 | ow/json-schema/src/JsonSchema/Va |
72e0 | 6c 69 64 61 74 6f 72 2e 70 68 70 73 05 00 00 12 ad 00 63 73 05 00 00 df c1 91 23 a4 01 00 00 00 | lidator.phps......cs......#..... |
7300 | 00 00 00 1c 00 00 00 76 65 6e 64 6f 72 2f 70 73 72 2f 63 6f 6e 74 61 69 6e 65 72 2f 4c 49 43 45 | .......vendor/psr/container/LICE |
7320 | 4e 53 45 7b 04 00 00 12 ad 00 63 7b 04 00 00 d5 d3 00 65 a4 01 00 00 00 00 00 00 38 00 00 00 76 | NSE{......c{......e........8...v |
7340 | 65 6e 64 6f 72 2f 70 73 72 2f 63 6f 6e 74 61 69 6e 65 72 2f 73 72 63 2f 43 6f 6e 74 61 69 6e 65 | endor/psr/container/src/Containe |
7360 | 72 45 78 63 65 70 74 69 6f 6e 49 6e 74 65 72 66 61 63 65 2e 70 68 70 4e 00 00 00 12 ad 00 63 4e | rExceptionInterface.phpN......cN |
7380 | 00 00 00 fc 4c 18 83 a4 01 00 00 00 00 00 00 2f 00 00 00 76 65 6e 64 6f 72 2f 70 73 72 2f 63 6f | ....L........../...vendor/psr/co |
73a0 | 6e 74 61 69 6e 65 72 2f 73 72 63 2f 43 6f 6e 74 61 69 6e 65 72 49 6e 74 65 72 66 61 63 65 2e 70 | ntainer/src/ContainerInterface.p |
73c0 | 68 70 b7 00 00 00 12 ad 00 63 b7 00 00 00 8a e3 01 bc a4 01 00 00 00 00 00 00 37 00 00 00 76 65 | hp.......c................7...ve |
73e0 | 6e 64 6f 72 2f 70 73 72 2f 63 6f 6e 74 61 69 6e 65 72 2f 73 72 63 2f 4e 6f 74 46 6f 75 6e 64 45 | ndor/psr/container/src/NotFoundE |
7400 | 78 63 65 70 74 69 6f 6e 49 6e 74 65 72 66 61 63 65 2e 70 68 70 71 00 00 00 12 ad 00 63 71 00 00 | xceptionInterface.phpq......cq.. |
7420 | 00 52 7f fa f5 a4 01 00 00 00 00 00 00 16 00 00 00 76 65 6e 64 6f 72 2f 70 73 72 2f 6c 6f 67 2f | .R...............vendor/psr/log/ |
7440 | 4c 49 43 45 4e 53 45 3f 04 00 00 12 ad 00 63 3f 04 00 00 84 f9 09 08 a4 01 00 00 00 00 00 00 29 | LICENSE?......c?...............) |
7460 | 00 00 00 76 65 6e 64 6f 72 2f 70 73 72 2f 6c 6f 67 2f 50 73 72 2f 4c 6f 67 2f 41 62 73 74 72 61 | ...vendor/psr/log/Psr/Log/Abstra |
7480 | 63 74 4c 6f 67 67 65 72 2e 70 68 70 3b 04 00 00 12 ad 00 63 3b 04 00 00 f1 3e 33 5b a4 01 00 00 | ctLogger.php;......c;....>3[.... |
74a0 | 00 00 00 00 33 00 00 00 76 65 6e 64 6f 72 2f 70 73 72 2f 6c 6f 67 2f 50 73 72 2f 4c 6f 67 2f 49 | ....3...vendor/psr/log/Psr/Log/I |
74c0 | 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 2e 70 68 70 60 00 00 00 12 | nvalidArgumentException.php`.... |
74e0 | ad 00 63 60 00 00 00 20 88 58 31 a4 01 00 00 00 00 00 00 23 00 00 00 76 65 6e 64 6f 72 2f 70 73 | ..c`.....X1........#...vendor/ps |
7500 | 72 2f 6c 6f 67 2f 50 73 72 2f 4c 6f 67 2f 4c 6f 67 4c 65 76 65 6c 2e 70 68 70 fb 00 00 00 12 ad | r/log/Psr/Log/LogLevel.php...... |
7520 | 00 63 fb 00 00 00 6a f0 f1 38 a4 01 00 00 00 00 00 00 2f 00 00 00 76 65 6e 64 6f 72 2f 70 73 72 | .c....j..8......../...vendor/psr |
7540 | 2f 6c 6f 67 2f 50 73 72 2f 4c 6f 67 2f 4c 6f 67 67 65 72 41 77 61 72 65 49 6e 74 65 72 66 61 63 | /log/Psr/Log/LoggerAwareInterfac |
7560 | 65 2e 70 68 70 7c 00 00 00 12 ad 00 63 7c 00 00 00 24 13 a3 88 a4 01 00 00 00 00 00 00 2b 00 00 | e.php|......c|...$...........+.. |
7580 | 00 76 65 6e 64 6f 72 2f 70 73 72 2f 6c 6f 67 2f 50 73 72 2f 4c 6f 67 2f 4c 6f 67 67 65 72 41 77 | .vendor/psr/log/Psr/Log/LoggerAw |
75a0 | 61 72 65 54 72 61 69 74 2e 70 68 70 a7 00 00 00 12 ad 00 63 a7 00 00 00 54 bd fa 42 a4 01 00 00 | areTrait.php.......c....T..B.... |
75c0 | 00 00 00 00 2a 00 00 00 76 65 6e 64 6f 72 2f 70 73 72 2f 6c 6f 67 2f 50 73 72 2f 4c 6f 67 2f 4c | ....*...vendor/psr/log/Psr/Log/L |
75e0 | 6f 67 67 65 72 49 6e 74 65 72 66 61 63 65 2e 70 68 70 c8 02 00 00 12 ad 00 63 c8 02 00 00 9a 1f | oggerInterface.php.......c...... |
7600 | 78 1d a4 01 00 00 00 00 00 00 26 00 00 00 76 65 6e 64 6f 72 2f 70 73 72 2f 6c 6f 67 2f 50 73 72 | x.........&...vendor/psr/log/Psr |
7620 | 2f 4c 6f 67 2f 4c 6f 67 67 65 72 54 72 61 69 74 2e 70 68 70 6b 04 00 00 12 ad 00 63 6b 04 00 00 | /Log/LoggerTrait.phpk......ck... |
7640 | a3 7d 89 92 a4 01 00 00 00 00 00 00 25 00 00 00 76 65 6e 64 6f 72 2f 70 73 72 2f 6c 6f 67 2f 50 | .}..........%...vendor/psr/log/P |
7660 | 73 72 2f 4c 6f 67 2f 4e 75 6c 6c 4c 6f 67 67 65 72 2e 70 68 70 9f 00 00 00 12 ad 00 63 9f 00 00 | sr/Log/NullLogger.php.......c... |
7680 | 00 81 58 f3 aa a4 01 00 00 00 00 00 00 29 00 00 00 76 65 6e 64 6f 72 2f 70 73 72 2f 6c 6f 67 2f | ..X..........)...vendor/psr/log/ |
76a0 | 50 73 72 2f 4c 6f 67 2f 54 65 73 74 2f 44 75 6d 6d 79 54 65 73 74 2e 70 68 70 70 00 00 00 12 ad | Psr/Log/Test/DummyTest.phpp..... |
76c0 | 00 63 70 00 00 00 1a 15 ce 05 a4 01 00 00 00 00 00 00 33 00 00 00 76 65 6e 64 6f 72 2f 70 73 72 | .cp...............3...vendor/psr |
76e0 | 2f 6c 6f 67 2f 50 73 72 2f 4c 6f 67 2f 54 65 73 74 2f 4c 6f 67 67 65 72 49 6e 74 65 72 66 61 63 | /log/Psr/Log/Test/LoggerInterfac |
7700 | 65 54 65 73 74 2e 70 68 70 20 0d 00 00 12 ad 00 63 20 0d 00 00 1d 24 2f d2 a4 01 00 00 00 00 00 | eTest.php.......c.....$/........ |
7720 | 00 2a 00 00 00 76 65 6e 64 6f 72 2f 70 73 72 2f 6c 6f 67 2f 50 73 72 2f 4c 6f 67 2f 54 65 73 74 | .*...vendor/psr/log/Psr/Log/Test |
7740 | 2f 54 65 73 74 4c 6f 67 67 65 72 2e 70 68 70 3c 08 00 00 12 ad 00 63 3c 08 00 00 fe 28 e5 49 a4 | /TestLogger.php<......c<....(.I. |
7760 | 01 00 00 00 00 00 00 1c 00 00 00 76 65 6e 64 6f 72 2f 72 65 61 63 74 2f 70 72 6f 6d 69 73 65 2f | ...........vendor/react/promise/ |
7780 | 4c 49 43 45 4e 53 45 69 04 00 00 12 ad 00 63 69 04 00 00 10 33 7d 8b a4 01 00 00 00 00 00 00 38 | LICENSEi......ci....3}.........8 |
77a0 | 00 00 00 76 65 6e 64 6f 72 2f 72 65 61 63 74 2f 70 72 6f 6d 69 73 65 2f 73 72 63 2f 43 61 6e 63 | ...vendor/react/promise/src/Canc |
77c0 | 65 6c 6c 61 62 6c 65 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 2e 70 68 70 87 00 00 00 12 | ellablePromiseInterface.php..... |
77e0 | ad 00 63 87 00 00 00 0e 27 a5 ee a4 01 00 00 00 00 00 00 2e 00 00 00 76 65 6e 64 6f 72 2f 72 65 | ..c.....'..............vendor/re |
7800 | 61 63 74 2f 70 72 6f 6d 69 73 65 2f 73 72 63 2f 43 61 6e 63 65 6c 6c 61 74 69 6f 6e 51 75 65 75 | act/promise/src/CancellationQueu |
7820 | 65 2e 70 68 70 39 03 00 00 12 ad 00 63 39 03 00 00 5c da 6f 7c a4 01 00 00 00 00 00 00 25 00 00 | e.php9......c9...\.o|........%.. |
7840 | 00 76 65 6e 64 6f 72 2f 72 65 61 63 74 2f 70 72 6f 6d 69 73 65 2f 73 72 63 2f 44 65 66 65 72 72 | .vendor/react/promise/src/Deferr |
7860 | 65 64 2e 70 68 70 ee 03 00 00 12 ad 00 63 ee 03 00 00 45 0e a4 29 a4 01 00 00 00 00 00 00 36 00 | ed.php.......c....E..)........6. |
7880 | 00 00 76 65 6e 64 6f 72 2f 72 65 61 63 74 2f 70 72 6f 6d 69 73 65 2f 73 72 63 2f 45 78 63 65 70 | ..vendor/react/promise/src/Excep |
78a0 | 74 69 6f 6e 2f 4c 65 6e 67 74 68 45 78 63 65 70 74 69 6f 6e 2e 70 68 70 5e 00 00 00 12 ad 00 63 | tion/LengthException.php^......c |
78c0 | 5e 00 00 00 04 3f 71 04 a4 01 00 00 00 00 00 00 35 00 00 00 76 65 6e 64 6f 72 2f 72 65 61 63 74 | ^....?q.........5...vendor/react |
78e0 | 2f 70 72 6f 6d 69 73 65 2f 73 72 63 2f 45 78 74 65 6e 64 65 64 50 72 6f 6d 69 73 65 49 6e 74 65 | /promise/src/ExtendedPromiseInte |
7900 | 72 66 61 63 65 2e 70 68 70 c0 01 00 00 12 ad 00 63 c0 01 00 00 32 55 b7 fb a4 01 00 00 00 00 00 | rface.php.......c....2U......... |
7920 | 00 2d 00 00 00 76 65 6e 64 6f 72 2f 72 65 61 63 74 2f 70 72 6f 6d 69 73 65 2f 73 72 63 2f 46 75 | .-...vendor/react/promise/src/Fu |
7940 | 6c 66 69 6c 6c 65 64 50 72 6f 6d 69 73 65 2e 70 68 70 95 05 00 00 12 ad 00 63 95 05 00 00 ad 32 | lfilledPromise.php.......c.....2 |
7960 | b2 96 a4 01 00 00 00 00 00 00 28 00 00 00 76 65 6e 64 6f 72 2f 72 65 61 63 74 2f 70 72 6f 6d 69 | ..........(...vendor/react/promi |
7980 | 73 65 2f 73 72 63 2f 4c 61 7a 79 50 72 6f 6d 69 73 65 2e 70 68 70 28 05 00 00 12 ad 00 63 28 05 | se/src/LazyPromise.php(......c(. |
79a0 | 00 00 3e 21 91 6b a4 01 00 00 00 00 00 00 24 00 00 00 76 65 6e 64 6f 72 2f 72 65 61 63 74 2f 70 | ..>!.k........$...vendor/react/p |
79c0 | 72 6f 6d 69 73 65 2f 73 72 63 2f 50 72 6f 6d 69 73 65 2e 70 68 70 c1 13 00 00 12 ad 00 63 c1 13 | romise/src/Promise.php.......c.. |
79e0 | 00 00 0a 6e 63 ef a4 01 00 00 00 00 00 00 2d 00 00 00 76 65 6e 64 6f 72 2f 72 65 61 63 74 2f 70 | ...nc.........-...vendor/react/p |
7a00 | 72 6f 6d 69 73 65 2f 73 72 63 2f 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 2e 70 68 70 cf | romise/src/PromiseInterface.php. |
7a20 | 00 00 00 12 ad 00 63 cf 00 00 00 10 41 8c 83 a4 01 00 00 00 00 00 00 2e 00 00 00 76 65 6e 64 6f | ......c.....A..............vendo |
7a40 | 72 2f 72 65 61 63 74 2f 70 72 6f 6d 69 73 65 2f 73 72 63 2f 50 72 6f 6d 69 73 6f 72 49 6e 74 65 | r/react/promise/src/PromisorInte |
7a60 | 72 66 61 63 65 2e 70 68 70 61 00 00 00 12 ad 00 63 61 00 00 00 ac c9 99 96 a4 01 00 00 00 00 00 | rface.phpa......ca.............. |
7a80 | 00 2c 00 00 00 76 65 6e 64 6f 72 2f 72 65 61 63 74 2f 70 72 6f 6d 69 73 65 2f 73 72 63 2f 52 65 | .,...vendor/react/promise/src/Re |
7aa0 | 6a 65 63 74 65 64 50 72 6f 6d 69 73 65 2e 70 68 70 a2 06 00 00 12 ad 00 63 a2 06 00 00 b7 8b 11 | jectedPromise.php.......c....... |
7ac0 | 52 a4 01 00 00 00 00 00 00 38 00 00 00 76 65 6e 64 6f 72 2f 72 65 61 63 74 2f 70 72 6f 6d 69 73 | R........8...vendor/react/promis |
7ae0 | 65 2f 73 72 63 2f 55 6e 68 61 6e 64 6c 65 64 52 65 6a 65 63 74 69 6f 6e 45 78 63 65 70 74 69 6f | e/src/UnhandledRejectionExceptio |
7b00 | 6e 2e 70 68 70 f9 01 00 00 12 ad 00 63 f9 01 00 00 73 16 50 e7 a4 01 00 00 00 00 00 00 26 00 00 | n.php.......c....s.P.........&.. |
7b20 | 00 76 65 6e 64 6f 72 2f 72 65 61 63 74 2f 70 72 6f 6d 69 73 65 2f 73 72 63 2f 66 75 6e 63 74 69 | .vendor/react/promise/src/functi |
7b40 | 6f 6e 73 2e 70 68 70 39 1a 00 00 12 ad 00 63 39 1a 00 00 99 cf 9f 84 a4 01 00 00 00 00 00 00 2e | ons.php9......c9................ |
7b60 | 00 00 00 76 65 6e 64 6f 72 2f 72 65 61 63 74 2f 70 72 6f 6d 69 73 65 2f 73 72 63 2f 66 75 6e 63 | ...vendor/react/promise/src/func |
7b80 | 74 69 6f 6e 73 5f 69 6e 63 6c 75 64 65 2e 70 68 70 5d 00 00 00 12 ad 00 63 5d 00 00 00 51 d1 3c | tions_include.php]......c]...Q.< |
7ba0 | a1 a4 01 00 00 00 00 00 00 1c 00 00 00 76 65 6e 64 6f 72 2f 73 65 6c 64 2f 6a 73 6f 6e 6c 69 6e | .............vendor/seld/jsonlin |
7bc0 | 74 2f 4c 49 43 45 4e 53 45 24 04 00 00 12 ad 00 63 24 04 00 00 34 3a 87 7e a4 01 00 00 00 00 00 | t/LICENSE$......c$...4:.~....... |
7be0 | 00 40 00 00 00 76 65 6e 64 6f 72 2f 73 65 6c 64 2f 6a 73 6f 6e 6c 69 6e 74 2f 73 72 63 2f 53 65 | .@...vendor/seld/jsonlint/src/Se |
7c00 | 6c 64 2f 4a 73 6f 6e 4c 69 6e 74 2f 44 75 70 6c 69 63 61 74 65 4b 65 79 45 78 63 65 70 74 69 6f | ld/JsonLint/DuplicateKeyExceptio |
7c20 | 6e 2e 70 68 70 7d 01 00 00 12 ad 00 63 7d 01 00 00 db 85 44 ea a4 01 00 00 00 00 00 00 35 00 00 | n.php}......c}.....D.........5.. |
7c40 | 00 76 65 6e 64 6f 72 2f 73 65 6c 64 2f 6a 73 6f 6e 6c 69 6e 74 2f 73 72 63 2f 53 65 6c 64 2f 4a | .vendor/seld/jsonlint/src/Seld/J |
7c60 | 73 6f 6e 4c 69 6e 74 2f 4a 73 6f 6e 50 61 72 73 65 72 2e 70 68 70 dd 34 00 00 12 ad 00 63 dd 34 | sonLint/JsonParser.php.4.....c.4 |
7c80 | 00 00 f1 80 97 be a4 01 00 00 00 00 00 00 30 00 00 00 76 65 6e 64 6f 72 2f 73 65 6c 64 2f 6a 73 | ..............0...vendor/seld/js |
7ca0 | 6f 6e 6c 69 6e 74 2f 73 72 63 2f 53 65 6c 64 2f 4a 73 6f 6e 4c 69 6e 74 2f 4c 65 78 65 72 2e 70 | onlint/src/Seld/JsonLint/Lexer.p |
7cc0 | 68 70 be 0f 00 00 12 ad 00 63 be 0f 00 00 41 60 ac 3b a4 01 00 00 00 00 00 00 3b 00 00 00 76 65 | hp.......c....A`.;........;...ve |
7ce0 | 6e 64 6f 72 2f 73 65 6c 64 2f 6a 73 6f 6e 6c 69 6e 74 2f 73 72 63 2f 53 65 6c 64 2f 4a 73 6f 6e | ndor/seld/jsonlint/src/Seld/Json |
7d00 | 4c 69 6e 74 2f 50 61 72 73 69 6e 67 45 78 63 65 70 74 69 6f 6e 2e 70 68 70 28 01 00 00 12 ad 00 | Lint/ParsingException.php(...... |
7d20 | 63 28 01 00 00 3e db 76 7d a4 01 00 00 00 00 00 00 34 00 00 00 76 65 6e 64 6f 72 2f 73 65 6c 64 | c(...>.v}........4...vendor/seld |
7d40 | 2f 6a 73 6f 6e 6c 69 6e 74 2f 73 72 63 2f 53 65 6c 64 2f 4a 73 6f 6e 4c 69 6e 74 2f 55 6e 64 65 | /jsonlint/src/Seld/JsonLint/Unde |
7d60 | 66 69 6e 65 64 2e 70 68 70 3e 00 00 00 12 ad 00 63 3e 00 00 00 ff 71 9f 9f a4 01 00 00 00 00 00 | fined.php>......c>....q......... |
7d80 | 00 1e 00 00 00 76 65 6e 64 6f 72 2f 73 65 6c 64 2f 70 68 61 72 2d 75 74 69 6c 73 2f 4c 49 43 45 | .....vendor/seld/phar-utils/LICE |
7da0 | 4e 53 45 24 04 00 00 12 ad 00 63 24 04 00 00 9a 2c 4d a7 a4 01 00 00 00 00 00 00 25 00 00 00 76 | NSE$......c$....,M.........%...v |
7dc0 | 65 6e 64 6f 72 2f 73 65 6c 64 2f 70 68 61 72 2d 75 74 69 6c 73 2f 73 72 63 2f 4c 69 6e 74 65 72 | endor/seld/phar-utils/src/Linter |
7de0 | 2e 70 68 70 69 07 00 00 12 ad 00 63 69 07 00 00 a0 1b 8d de a4 01 00 00 00 00 00 00 29 00 00 00 | .phpi......ci...............)... |
7e00 | 76 65 6e 64 6f 72 2f 73 65 6c 64 2f 70 68 61 72 2d 75 74 69 6c 73 2f 73 72 63 2f 54 69 6d 65 73 | vendor/seld/phar-utils/src/Times |
7e20 | 74 61 6d 70 73 2e 70 68 70 c8 0c 00 00 12 ad 00 63 c8 0c 00 00 ff 0e 34 a9 a4 01 00 00 00 00 00 | tamps.php.......c......4........ |
7e40 | 00 22 00 00 00 76 65 6e 64 6f 72 2f 73 65 6c 64 2f 73 69 67 6e 61 6c 2d 68 61 6e 64 6c 65 72 2f | ."...vendor/seld/signal-handler/ |
7e60 | 4c 49 43 45 4e 53 45 24 04 00 00 12 ad 00 63 24 04 00 00 9a 2c 4d a7 a4 01 00 00 00 00 00 00 30 | LICENSE$......c$....,M.........0 |
7e80 | 00 00 00 76 65 6e 64 6f 72 2f 73 65 6c 64 2f 73 69 67 6e 61 6c 2d 68 61 6e 64 6c 65 72 2f 73 72 | ...vendor/seld/signal-handler/sr |
7ea0 | 63 2f 53 69 67 6e 61 6c 48 61 6e 64 6c 65 72 2e 70 68 70 b0 1d 00 00 12 ad 00 63 b0 1d 00 00 81 | c/SignalHandler.php.......c..... |
7ec0 | 00 16 0a a4 01 00 00 00 00 00 00 26 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f | ...........&...vendor/symfony/co |
7ee0 | 6e 73 6f 6c 65 2f 41 70 70 6c 69 63 61 74 69 6f 6e 2e 70 68 70 63 70 00 00 12 ad 00 63 63 70 00 | nsole/Application.phpcp.....ccp. |
7f00 | 00 24 f1 75 c9 a4 01 00 00 00 00 00 00 2e 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f | .$.u.............vendor/symfony/ |
7f20 | 63 6f 6e 73 6f 6c 65 2f 41 74 74 72 69 62 75 74 65 2f 41 73 43 6f 6d 6d 61 6e 64 2e 70 68 70 d4 | console/Attribute/AsCommand.php. |
7f40 | 01 00 00 12 ad 00 63 d4 01 00 00 bd 33 dc fe a4 01 00 00 00 00 00 00 32 00 00 00 76 65 6e 64 6f | ......c.....3..........2...vendo |
7f60 | 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 43 49 2f 47 69 74 68 75 62 41 63 74 69 6f | r/symfony/console/CI/GithubActio |
7f80 | 6e 52 65 70 6f 72 74 65 72 2e 70 68 70 e9 05 00 00 12 ad 00 63 e9 05 00 00 92 0b 1b 35 a4 01 00 | nReporter.php.......c.......5... |
7fa0 | 00 00 00 00 00 20 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f | .........vendor/symfony/console/ |
7fc0 | 43 6f 6c 6f 72 2e 70 68 70 68 0e 00 00 12 ad 00 63 68 0e 00 00 47 62 e7 97 a4 01 00 00 00 00 00 | Color.phph......ch...Gb......... |
7fe0 | 00 2a 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 43 6f 6d 6d | .*...vendor/symfony/console/Comm |
8000 | 61 6e 64 2f 43 6f 6d 6d 61 6e 64 2e 70 68 70 46 27 00 00 12 ad 00 63 46 27 00 00 05 fb b9 fe a4 | and/Command.phpF'.....cF'....... |
8020 | 01 00 00 00 00 00 00 32 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c | .......2...vendor/symfony/consol |
8040 | 65 2f 43 6f 6d 6d 61 6e 64 2f 43 6f 6d 70 6c 65 74 65 43 6f 6d 6d 61 6e 64 2e 70 68 70 a3 16 00 | e/Command/CompleteCommand.php... |
8060 | 00 12 ad 00 63 a3 16 00 00 a0 ec a9 0b a4 01 00 00 00 00 00 00 38 00 00 00 76 65 6e 64 6f 72 2f | ....c................8...vendor/ |
8080 | 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 43 6f 6d 6d 61 6e 64 2f 44 75 6d 70 43 6f 6d 70 | symfony/console/Command/DumpComp |
80a0 | 6c 65 74 69 6f 6e 43 6f 6d 6d 61 6e 64 2e 70 68 70 a0 0e 00 00 12 ad 00 63 a0 0e 00 00 58 77 36 | letionCommand.php.......c....Xw6 |
80c0 | 16 a4 01 00 00 00 00 00 00 2e 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 | .............vendor/symfony/cons |
80e0 | 6f 6c 65 2f 43 6f 6d 6d 61 6e 64 2f 48 65 6c 70 43 6f 6d 6d 61 6e 64 2e 70 68 70 15 09 00 00 12 | ole/Command/HelpCommand.php..... |
8100 | ad 00 63 15 09 00 00 08 7d 97 a5 a4 01 00 00 00 00 00 00 2e 00 00 00 76 65 6e 64 6f 72 2f 73 79 | ..c.....}..............vendor/sy |
8120 | 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 43 6f 6d 6d 61 6e 64 2f 4c 61 7a 79 43 6f 6d 6d 61 6e | mfony/console/Command/LazyComman |
8140 | 64 2e 70 68 70 98 0f 00 00 12 ad 00 63 98 0f 00 00 e4 17 01 7e a4 01 00 00 00 00 00 00 2e 00 00 | d.php.......c.......~........... |
8160 | 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 43 6f 6d 6d 61 6e 64 2f | .vendor/symfony/console/Command/ |
8180 | 4c 69 73 74 43 6f 6d 6d 61 6e 64 2e 70 68 70 31 09 00 00 12 ad 00 63 31 09 00 00 24 44 bb 7c a4 | ListCommand.php1......c1...$D.|. |
81a0 | 01 00 00 00 00 00 00 30 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c | .......0...vendor/symfony/consol |
81c0 | 65 2f 43 6f 6d 6d 61 6e 64 2f 4c 6f 63 6b 61 62 6c 65 54 72 61 69 74 2e 70 68 70 0e 04 00 00 12 | e/Command/LockableTrait.php..... |
81e0 | ad 00 63 0e 04 00 00 2e 1f ba 56 a4 01 00 00 00 00 00 00 3d 00 00 00 76 65 6e 64 6f 72 2f 73 79 | ..c.......V........=...vendor/sy |
8200 | 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 43 6f 6d 6d 61 6e 64 2f 53 69 67 6e 61 6c 61 62 6c 65 | mfony/console/Command/Signalable |
8220 | 43 6f 6d 6d 61 6e 64 49 6e 74 65 72 66 61 63 65 2e 70 68 70 d3 00 00 00 12 ad 00 63 d3 00 00 00 | CommandInterface.php.......c.... |
8240 | bb 42 60 be a4 01 00 00 00 00 00 00 3f 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 | .B`.........?...vendor/symfony/c |
8260 | 6f 6e 73 6f 6c 65 2f 43 6f 6d 6d 61 6e 64 4c 6f 61 64 65 72 2f 43 6f 6d 6d 61 6e 64 4c 6f 61 64 | onsole/CommandLoader/CommandLoad |
8280 | 65 72 49 6e 74 65 72 66 61 63 65 2e 70 68 70 51 01 00 00 12 ad 00 63 51 01 00 00 9b 10 9e 48 a4 | erInterface.phpQ......cQ......H. |
82a0 | 01 00 00 00 00 00 00 3f 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c | .......?...vendor/symfony/consol |
82c0 | 65 2f 43 6f 6d 6d 61 6e 64 4c 6f 61 64 65 72 2f 43 6f 6e 74 61 69 6e 65 72 43 6f 6d 6d 61 6e 64 | e/CommandLoader/ContainerCommand |
82e0 | 4c 6f 61 64 65 72 2e 70 68 70 55 03 00 00 12 ad 00 63 55 03 00 00 1b cb 5f fc a4 01 00 00 00 00 | Loader.phpU......cU....._....... |
8300 | 00 00 3d 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 43 6f 6d | ..=...vendor/symfony/console/Com |
8320 | 6d 61 6e 64 4c 6f 61 64 65 72 2f 46 61 63 74 6f 72 79 43 6f 6d 6d 61 6e 64 4c 6f 61 64 65 72 2e | mandLoader/FactoryCommandLoader. |
8340 | 70 68 70 af 02 00 00 12 ad 00 63 af 02 00 00 64 bc 22 7a a4 01 00 00 00 00 00 00 35 00 00 00 76 | php.......c....d."z........5...v |
8360 | 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 43 6f 6d 70 6c 65 74 69 6f 6e | endor/symfony/console/Completion |
8380 | 2f 43 6f 6d 70 6c 65 74 69 6f 6e 49 6e 70 75 74 2e 70 68 70 16 13 00 00 12 ad 00 63 16 13 00 00 | /CompletionInput.php.......c.... |
83a0 | 94 24 84 6b a4 01 00 00 00 00 00 00 3b 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 | .$.k........;...vendor/symfony/c |
83c0 | 6f 6e 73 6f 6c 65 2f 43 6f 6d 70 6c 65 74 69 6f 6e 2f 43 6f 6d 70 6c 65 74 69 6f 6e 53 75 67 67 | onsole/Completion/CompletionSugg |
83e0 | 65 73 74 69 6f 6e 73 2e 70 68 70 c2 03 00 00 12 ad 00 63 c2 03 00 00 12 41 a1 1f a4 01 00 00 00 | estions.php.......c.....A....... |
8400 | 00 00 00 41 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 43 6f | ...A...vendor/symfony/console/Co |
8420 | 6d 70 6c 65 74 69 6f 6e 2f 4f 75 74 70 75 74 2f 42 61 73 68 43 6f 6d 70 6c 65 74 69 6f 6e 4f 75 | mpletion/Output/BashCompletionOu |
8440 | 74 70 75 74 2e 70 68 70 67 02 00 00 12 ad 00 63 67 02 00 00 87 ec f9 57 a4 01 00 00 00 00 00 00 | tput.phpg......cg......W........ |
8460 | 46 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 43 6f 6d 70 6c | F...vendor/symfony/console/Compl |
8480 | 65 74 69 6f 6e 2f 4f 75 74 70 75 74 2f 43 6f 6d 70 6c 65 74 69 6f 6e 4f 75 74 70 75 74 49 6e 74 | etion/Output/CompletionOutputInt |
84a0 | 65 72 66 61 63 65 2e 70 68 70 46 01 00 00 12 ad 00 63 46 01 00 00 d4 32 6e 4d a4 01 00 00 00 00 | erface.phpF......cF....2nM...... |
84c0 | 00 00 30 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 43 6f 6d | ..0...vendor/symfony/console/Com |
84e0 | 70 6c 65 74 69 6f 6e 2f 53 75 67 67 65 73 74 69 6f 6e 2e 70 68 70 33 01 00 00 12 ad 00 63 33 01 | pletion/Suggestion.php3......c3. |
8500 | 00 00 cc 86 20 1d a4 01 00 00 00 00 00 00 28 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 | ..............(...vendor/symfony |
8520 | 2f 63 6f 6e 73 6f 6c 65 2f 43 6f 6e 73 6f 6c 65 45 76 65 6e 74 73 2e 70 68 70 d5 02 00 00 12 ad | /console/ConsoleEvents.php...... |
8540 | 00 63 d5 02 00 00 81 67 77 5d a4 01 00 00 00 00 00 00 21 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d | .c.....gw]........!...vendor/sym |
8560 | 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 43 75 72 73 6f 72 2e 70 68 70 8f 09 00 00 12 ad 00 63 8f | fony/console/Cursor.php.......c. |
8580 | 09 00 00 c6 ab a7 8e a4 01 00 00 00 00 00 00 44 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e | ...............D...vendor/symfon |
85a0 | 79 2f 63 6f 6e 73 6f 6c 65 2f 44 65 70 65 6e 64 65 6e 63 79 49 6e 6a 65 63 74 69 6f 6e 2f 41 64 | y/console/DependencyInjection/Ad |
85c0 | 64 43 6f 6e 73 6f 6c 65 43 6f 6d 6d 61 6e 64 50 61 73 73 2e 70 68 70 66 11 00 00 12 ad 00 63 66 | dConsoleCommandPass.phpf......cf |
85e0 | 11 00 00 23 d4 20 24 a4 01 00 00 00 00 00 00 3c 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e | ...#..$........<...vendor/symfon |
8600 | 79 2f 63 6f 6e 73 6f 6c 65 2f 44 65 73 63 72 69 70 74 6f 72 2f 41 70 70 6c 69 63 61 74 69 6f 6e | y/console/Descriptor/Application |
8620 | 44 65 73 63 72 69 70 74 69 6f 6e 2e 70 68 70 ca 09 00 00 12 ad 00 63 ca 09 00 00 ef 67 f6 aa a4 | Description.php.......c.....g... |
8640 | 01 00 00 00 00 00 00 30 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c | .......0...vendor/symfony/consol |
8660 | 65 2f 44 65 73 63 72 69 70 74 6f 72 2f 44 65 73 63 72 69 70 74 6f 72 2e 70 68 70 7d 07 00 00 12 | e/Descriptor/Descriptor.php}.... |
8680 | ad 00 63 7d 07 00 00 b1 ea 33 5e a4 01 00 00 00 00 00 00 39 00 00 00 76 65 6e 64 6f 72 2f 73 79 | ..c}.....3^........9...vendor/sy |
86a0 | 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 44 65 73 63 72 69 70 74 6f 72 2f 44 65 73 63 72 69 70 | mfony/console/Descriptor/Descrip |
86c0 | 74 6f 72 49 6e 74 65 72 66 61 63 65 2e 70 68 70 f7 00 00 00 12 ad 00 63 f7 00 00 00 b5 e5 40 e0 | torInterface.php.......c......@. |
86e0 | a4 01 00 00 00 00 00 00 34 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f | ........4...vendor/symfony/conso |
8700 | 6c 65 2f 44 65 73 63 72 69 70 74 6f 72 2f 4a 73 6f 6e 44 65 73 63 72 69 70 74 6f 72 2e 70 68 70 | le/Descriptor/JsonDescriptor.php |
8720 | eb 10 00 00 12 ad 00 63 eb 10 00 00 31 25 e8 8f a4 01 00 00 00 00 00 00 38 00 00 00 76 65 6e 64 | .......c....1%..........8...vend |
8740 | 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 44 65 73 63 72 69 70 74 6f 72 2f 4d 61 | or/symfony/console/Descriptor/Ma |
8760 | 72 6b 64 6f 77 6e 44 65 73 63 72 69 70 74 6f 72 2e 70 68 70 51 14 00 00 12 ad 00 63 51 14 00 00 | rkdownDescriptor.phpQ......cQ... |
8780 | 74 a0 88 76 a4 01 00 00 00 00 00 00 34 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 | t..v........4...vendor/symfony/c |
87a0 | 6f 6e 73 6f 6c 65 2f 44 65 73 63 72 69 70 74 6f 72 2f 54 65 78 74 44 65 73 63 72 69 70 74 6f 72 | onsole/Descriptor/TextDescriptor |
87c0 | 2e 70 68 70 e7 22 00 00 12 ad 00 63 e7 22 00 00 c8 b8 cc cb a4 01 00 00 00 00 00 00 33 00 00 00 | .php.".....c."..............3... |
87e0 | 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 44 65 73 63 72 69 70 74 6f | vendor/symfony/console/Descripto |
8800 | 72 2f 58 6d 6c 44 65 73 63 72 69 70 74 6f 72 2e 70 68 70 07 1f 00 00 12 ad 00 63 07 1f 00 00 87 | r/XmlDescriptor.php.......c..... |
8820 | 05 02 b6 a4 01 00 00 00 00 00 00 34 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f | ...........4...vendor/symfony/co |
8840 | 6e 73 6f 6c 65 2f 45 76 65 6e 74 2f 43 6f 6e 73 6f 6c 65 43 6f 6d 6d 61 6e 64 45 76 65 6e 74 2e | nsole/Event/ConsoleCommandEvent. |
8860 | 70 68 70 c6 01 00 00 12 ad 00 63 c6 01 00 00 20 bc 4f 7e a4 01 00 00 00 00 00 00 32 00 00 00 76 | php.......c......O~........2...v |
8880 | 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 45 76 65 6e 74 2f 43 6f 6e 73 | endor/symfony/console/Event/Cons |
88a0 | 6f 6c 65 45 72 72 6f 72 45 76 65 6e 74 2e 70 68 70 fc 03 00 00 12 ad 00 63 fc 03 00 00 c0 a9 96 | oleErrorEvent.php.......c....... |
88c0 | b2 a4 01 00 00 00 00 00 00 2d 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 | .........-...vendor/symfony/cons |
88e0 | 6f 6c 65 2f 45 76 65 6e 74 2f 43 6f 6e 73 6f 6c 65 45 76 65 6e 74 2e 70 68 70 c6 02 00 00 12 ad | ole/Event/ConsoleEvent.php...... |
8900 | 00 63 c6 02 00 00 c5 6f db d9 a4 01 00 00 00 00 00 00 33 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d | .c.....o..........3...vendor/sym |
8920 | 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 45 76 65 6e 74 2f 43 6f 6e 73 6f 6c 65 53 69 67 6e 61 6c | fony/console/Event/ConsoleSignal |
8940 | 45 76 65 6e 74 2e 70 68 70 47 02 00 00 12 ad 00 63 47 02 00 00 8e fb 1b 0b a4 01 00 00 00 00 00 | Event.phpG......cG.............. |
8960 | 00 36 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 45 76 65 6e | .6...vendor/symfony/console/Even |
8980 | 74 2f 43 6f 6e 73 6f 6c 65 54 65 72 6d 69 6e 61 74 65 45 76 65 6e 74 2e 70 68 70 7e 02 00 00 12 | t/ConsoleTerminateEvent.php~.... |
89a0 | ad 00 63 7e 02 00 00 68 72 bd d6 a4 01 00 00 00 00 00 00 36 00 00 00 76 65 6e 64 6f 72 2f 73 79 | ..c~...hr..........6...vendor/sy |
89c0 | 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 45 76 65 6e 74 4c 69 73 74 65 6e 65 72 2f 45 72 72 6f | mfony/console/EventListener/Erro |
89e0 | 72 4c 69 73 74 65 6e 65 72 2e 70 68 70 26 08 00 00 12 ad 00 63 26 08 00 00 58 f6 eb ae a4 01 00 | rListener.php&......c&...X...... |
8a00 | 00 00 00 00 00 3d 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f | .....=...vendor/symfony/console/ |
8a20 | 45 78 63 65 70 74 69 6f 6e 2f 43 6f 6d 6d 61 6e 64 4e 6f 74 46 6f 75 6e 64 45 78 63 65 70 74 69 | Exception/CommandNotFoundExcepti |
8a40 | 6f 6e 2e 70 68 70 da 01 00 00 12 ad 00 63 da 01 00 00 88 77 ea ed a4 01 00 00 00 00 00 00 37 00 | on.php.......c.....w..........7. |
8a60 | 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 45 78 63 65 70 74 69 | ..vendor/symfony/console/Excepti |
8a80 | 6f 6e 2f 45 78 63 65 70 74 69 6f 6e 49 6e 74 65 72 66 61 63 65 2e 70 68 70 79 00 00 00 12 ad 00 | on/ExceptionInterface.phpy...... |
8aa0 | 63 79 00 00 00 d9 39 5b 26 a4 01 00 00 00 00 00 00 3d 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 | cy....9[&........=...vendor/symf |
8ac0 | 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 45 78 63 65 70 74 69 6f 6e 2f 49 6e 76 61 6c 69 64 41 72 67 | ony/console/Exception/InvalidArg |
8ae0 | 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 2e 70 68 70 a6 00 00 00 12 ad 00 63 a6 00 00 00 d6 cc | umentException.php.......c...... |
8b00 | bd 5a a4 01 00 00 00 00 00 00 3b 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e | .Z........;...vendor/symfony/con |
8b20 | 73 6f 6c 65 2f 45 78 63 65 70 74 69 6f 6e 2f 49 6e 76 61 6c 69 64 4f 70 74 69 6f 6e 45 78 63 65 | sole/Exception/InvalidOptionExce |
8b40 | 70 74 69 6f 6e 2e 70 68 70 a6 00 00 00 12 ad 00 63 a6 00 00 00 13 cb d7 48 a4 01 00 00 00 00 00 | ption.php.......c.......H....... |
8b60 | 00 33 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 45 78 63 65 | .3...vendor/symfony/console/Exce |
8b80 | 70 74 69 6f 6e 2f 4c 6f 67 69 63 45 78 63 65 70 74 69 6f 6e 2e 70 68 70 92 00 00 00 12 ad 00 63 | ption/LogicException.php.......c |
8ba0 | 92 00 00 00 cd 4f 5c 65 a4 01 00 00 00 00 00 00 3a 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f | .....O\e........:...vendor/symfo |
8bc0 | 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 45 78 63 65 70 74 69 6f 6e 2f 4d 69 73 73 69 6e 67 49 6e 70 75 | ny/console/Exception/MissingInpu |
8be0 | 74 45 78 63 65 70 74 69 6f 6e 2e 70 68 70 9c 00 00 00 12 ad 00 63 9c 00 00 00 e6 53 0a fe a4 01 | tException.php.......c.....S.... |
8c00 | 00 00 00 00 00 00 3f 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 | ......?...vendor/symfony/console |
8c20 | 2f 45 78 63 65 70 74 69 6f 6e 2f 4e 61 6d 65 73 70 61 63 65 4e 6f 74 46 6f 75 6e 64 45 78 63 65 | /Exception/NamespaceNotFoundExce |
8c40 | 70 74 69 6f 6e 2e 70 68 70 8b 00 00 00 12 ad 00 63 8b 00 00 00 82 f3 6e a9 a4 01 00 00 00 00 00 | ption.php.......c......n........ |
8c60 | 00 35 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 45 78 63 65 | .5...vendor/symfony/console/Exce |
8c80 | 70 74 69 6f 6e 2f 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 2e 70 68 70 96 00 00 00 12 ad | ption/RuntimeException.php...... |
8ca0 | 00 63 96 00 00 00 d9 ed 2c 36 a4 01 00 00 00 00 00 00 38 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d | .c......,6........8...vendor/sym |
8cc0 | 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 46 6f 72 6d 61 74 74 65 72 2f 4e 75 6c 6c 4f 75 74 70 75 | fony/console/Formatter/NullOutpu |
8ce0 | 74 46 6f 72 6d 61 74 74 65 72 2e 70 68 70 8d 02 00 00 12 ad 00 63 8d 02 00 00 21 26 0d 75 a4 01 | tFormatter.php.......c....!&.u.. |
8d00 | 00 00 00 00 00 00 3d 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 | ......=...vendor/symfony/console |
8d20 | 2f 46 6f 72 6d 61 74 74 65 72 2f 4e 75 6c 6c 4f 75 74 70 75 74 46 6f 72 6d 61 74 74 65 72 53 74 | /Formatter/NullOutputFormatterSt |
8d40 | 79 6c 65 2e 70 68 70 0a 02 00 00 12 ad 00 63 0a 02 00 00 d4 c7 25 68 a4 01 00 00 00 00 00 00 34 | yle.php.......c......%h........4 |
8d60 | 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 46 6f 72 6d 61 74 | ...vendor/symfony/console/Format |
8d80 | 74 65 72 2f 4f 75 74 70 75 74 46 6f 72 6d 61 74 74 65 72 2e 70 68 70 81 14 00 00 12 ad 00 63 81 | ter/OutputFormatter.php.......c. |
8da0 | 14 00 00 b9 d8 42 93 a4 01 00 00 00 00 00 00 3d 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e | .....B.........=...vendor/symfon |
8dc0 | 79 2f 63 6f 6e 73 6f 6c 65 2f 46 6f 72 6d 61 74 74 65 72 2f 4f 75 74 70 75 74 46 6f 72 6d 61 74 | y/console/Formatter/OutputFormat |
8de0 | 74 65 72 49 6e 74 65 72 66 61 63 65 2e 70 68 70 a3 01 00 00 12 ad 00 63 a3 01 00 00 59 20 a7 df | terInterface.php.......c....Y... |
8e00 | a4 01 00 00 00 00 00 00 39 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f | ........9...vendor/symfony/conso |
8e20 | 6c 65 2f 46 6f 72 6d 61 74 74 65 72 2f 4f 75 74 70 75 74 46 6f 72 6d 61 74 74 65 72 53 74 79 6c | le/Formatter/OutputFormatterStyl |
8e40 | 65 2e 70 68 70 48 07 00 00 12 ad 00 63 48 07 00 00 91 f5 32 62 a4 01 00 00 00 00 00 00 42 00 00 | e.phpH......cH.....2b........B.. |
8e60 | 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 46 6f 72 6d 61 74 74 65 | .vendor/symfony/console/Formatte |
8e80 | 72 2f 4f 75 74 70 75 74 46 6f 72 6d 61 74 74 65 72 53 74 79 6c 65 49 6e 74 65 72 66 61 63 65 2e | r/OutputFormatterStyleInterface. |
8ea0 | 70 68 70 9d 01 00 00 12 ad 00 63 9d 01 00 00 cc 5a 06 c3 a4 01 00 00 00 00 00 00 3e 00 00 00 76 | php.......c.....Z..........>...v |
8ec0 | 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 46 6f 72 6d 61 74 74 65 72 2f | endor/symfony/console/Formatter/ |
8ee0 | 4f 75 74 70 75 74 46 6f 72 6d 61 74 74 65 72 53 74 79 6c 65 53 74 61 63 6b 2e 70 68 70 83 05 00 | OutputFormatterStyleStack.php... |
8f00 | 00 12 ad 00 63 83 05 00 00 46 97 78 b1 a4 01 00 00 00 00 00 00 46 00 00 00 76 65 6e 64 6f 72 2f | ....c....F.x.........F...vendor/ |
8f20 | 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 46 6f 72 6d 61 74 74 65 72 2f 57 72 61 70 70 61 | symfony/console/Formatter/Wrappa |
8f40 | 62 6c 65 4f 75 74 70 75 74 46 6f 72 6d 61 74 74 65 72 49 6e 74 65 72 66 61 63 65 2e 70 68 70 d6 | bleOutputFormatterInterface.php. |
8f60 | 00 00 00 12 ad 00 63 d6 00 00 00 a1 5a 01 b7 a4 01 00 00 00 00 00 00 36 00 00 00 76 65 6e 64 6f | ......c.....Z..........6...vendo |
8f80 | 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 48 65 6c 70 65 72 2f 44 65 62 75 67 46 6f | r/symfony/console/Helper/DebugFo |
8fa0 | 72 6d 61 74 74 65 72 48 65 6c 70 65 72 2e 70 68 70 b8 08 00 00 12 ad 00 63 b8 08 00 00 a4 f0 36 | rmatterHelper.php.......c......6 |
8fc0 | a0 a4 01 00 00 00 00 00 00 32 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 | .........2...vendor/symfony/cons |
8fe0 | 6f 6c 65 2f 48 65 6c 70 65 72 2f 44 65 73 63 72 69 70 74 6f 72 48 65 6c 70 65 72 2e 70 68 70 c0 | ole/Helper/DescriptorHelper.php. |
9000 | 05 00 00 12 ad 00 63 c0 05 00 00 a6 67 cc 84 a4 01 00 00 00 00 00 00 28 00 00 00 76 65 6e 64 6f | ......c.....g..........(...vendo |
9020 | 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 48 65 6c 70 65 72 2f 44 75 6d 70 65 72 2e | r/symfony/console/Helper/Dumper. |
9040 | 70 68 70 12 05 00 00 12 ad 00 63 12 05 00 00 fe d2 dc bd a4 01 00 00 00 00 00 00 31 00 00 00 76 | php.......c................1...v |
9060 | 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 48 65 6c 70 65 72 2f 46 6f 72 | endor/symfony/console/Helper/For |
9080 | 6d 61 74 74 65 72 48 65 6c 70 65 72 2e 70 68 70 69 05 00 00 12 ad 00 63 69 05 00 00 a4 b6 80 77 | matterHelper.phpi......ci......w |
90a0 | a4 01 00 00 00 00 00 00 28 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f | ........(...vendor/symfony/conso |
90c0 | 6c 65 2f 48 65 6c 70 65 72 2f 48 65 6c 70 65 72 2e 70 68 70 39 0c 00 00 12 ad 00 63 39 0c 00 00 | le/Helper/Helper.php9......c9... |
90e0 | 3b 53 e4 10 a4 01 00 00 00 00 00 00 31 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 | ;S..........1...vendor/symfony/c |
9100 | 6f 6e 73 6f 6c 65 2f 48 65 6c 70 65 72 2f 48 65 6c 70 65 72 49 6e 74 65 72 66 61 63 65 2e 70 68 | onsole/Helper/HelperInterface.ph |
9120 | 70 e5 00 00 00 12 ad 00 63 e5 00 00 00 1f 8a a0 18 a4 01 00 00 00 00 00 00 2b 00 00 00 76 65 6e | p.......c................+...ven |
9140 | 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 48 65 6c 70 65 72 2f 48 65 6c 70 65 | dor/symfony/console/Helper/Helpe |
9160 | 72 53 65 74 2e 70 68 70 47 05 00 00 12 ad 00 63 47 05 00 00 9b dd cb 90 a4 01 00 00 00 00 00 00 | rSet.phpG......cG............... |
9180 | 32 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 48 65 6c 70 65 | 2...vendor/symfony/console/Helpe |
91a0 | 72 2f 49 6e 70 75 74 41 77 61 72 65 48 65 6c 70 65 72 2e 70 68 70 63 01 00 00 12 ad 00 63 63 01 | r/InputAwareHelper.phpc......cc. |
91c0 | 00 00 06 cc f8 83 a4 01 00 00 00 00 00 00 2f 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 | ............../...vendor/symfony |
91e0 | 2f 63 6f 6e 73 6f 6c 65 2f 48 65 6c 70 65 72 2f 50 72 6f 63 65 73 73 48 65 6c 70 65 72 2e 70 68 | /console/Helper/ProcessHelper.ph |
9200 | 70 57 0c 00 00 12 ad 00 63 57 0c 00 00 65 c2 d1 0d a4 01 00 00 00 00 00 00 2d 00 00 00 76 65 6e | pW......cW...e...........-...ven |
9220 | 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 48 65 6c 70 65 72 2f 50 72 6f 67 72 | dor/symfony/console/Helper/Progr |
9240 | 65 73 73 42 61 72 2e 70 68 70 67 2f 00 00 12 ad 00 63 67 2f 00 00 77 31 11 b4 a4 01 00 00 00 00 | essBar.phpg/.....cg/..w1........ |
9260 | 00 00 33 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 48 65 6c | ..3...vendor/symfony/console/Hel |
9280 | 70 65 72 2f 50 72 6f 67 72 65 73 73 49 6e 64 69 63 61 74 6f 72 2e 70 68 70 c0 12 00 00 12 ad 00 | per/ProgressIndicator.php....... |
92a0 | 63 c0 12 00 00 91 3d de d6 a4 01 00 00 00 00 00 00 30 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 | c.....=..........0...vendor/symf |
92c0 | 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 48 65 6c 70 65 72 2f 51 75 65 73 74 69 6f 6e 48 65 6c 70 65 | ony/console/Helper/QuestionHelpe |
92e0 | 72 2e 70 68 70 de 2d 00 00 12 ad 00 63 de 2d 00 00 9d 6e 1e 86 a4 01 00 00 00 00 00 00 37 00 00 | r.php.-.....c.-...n..........7.. |
9300 | 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 48 65 6c 70 65 72 2f 53 | .vendor/symfony/console/Helper/S |
9320 | 79 6d 66 6f 6e 79 51 75 65 73 74 69 6f 6e 48 65 6c 70 65 72 2e 70 68 70 19 09 00 00 12 ad 00 63 | ymfonyQuestionHelper.php.......c |
9340 | 19 09 00 00 e0 9d 64 ff a4 01 00 00 00 00 00 00 27 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f | ......d.........'...vendor/symfo |
9360 | 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 48 65 6c 70 65 72 2f 54 61 62 6c 65 2e 70 68 70 37 4a 00 00 12 | ny/console/Helper/Table.php7J... |
9380 | ad 00 63 37 4a 00 00 4c ec a8 cb a4 01 00 00 00 00 00 00 2b 00 00 00 76 65 6e 64 6f 72 2f 73 79 | ..c7J..L...........+...vendor/sy |
93a0 | 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 48 65 6c 70 65 72 2f 54 61 62 6c 65 43 65 6c 6c 2e 70 | mfony/console/Helper/TableCell.p |
93c0 | 68 70 41 04 00 00 12 ad 00 63 41 04 00 00 e8 d3 a0 7f a4 01 00 00 00 00 00 00 30 00 00 00 76 65 | hpA......cA...............0...ve |
93e0 | 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 48 65 6c 70 65 72 2f 54 61 62 6c | ndor/symfony/console/Helper/Tabl |
9400 | 65 43 65 6c 6c 53 74 79 6c 65 2e 70 68 70 ee 05 00 00 12 ad 00 63 ee 05 00 00 d1 8d b9 5f a4 01 | eCellStyle.php.......c......._.. |
9420 | 00 00 00 00 00 00 2b 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 | ......+...vendor/symfony/console |
9440 | 2f 48 65 6c 70 65 72 2f 54 61 62 6c 65 52 6f 77 73 2e 70 68 70 29 01 00 00 12 ad 00 63 29 01 00 | /Helper/TableRows.php)......c).. |
9460 | 00 57 8a 33 7a a4 01 00 00 00 00 00 00 30 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f | .W.3z........0...vendor/symfony/ |
9480 | 63 6f 6e 73 6f 6c 65 2f 48 65 6c 70 65 72 2f 54 61 62 6c 65 53 65 70 61 72 61 74 6f 72 2e 70 68 | console/Helper/TableSeparator.ph |
94a0 | 70 c5 00 00 00 12 ad 00 63 c5 00 00 00 bc f5 cb fc a4 01 00 00 00 00 00 00 2c 00 00 00 76 65 6e | p.......c................,...ven |
94c0 | 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 48 65 6c 70 65 72 2f 54 61 62 6c 65 | dor/symfony/console/Helper/Table |
94e0 | 53 74 79 6c 65 2e 70 68 70 88 14 00 00 12 ad 00 63 88 14 00 00 18 0e a5 d6 a4 01 00 00 00 00 00 | Style.php.......c............... |
9500 | 00 2a 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 49 6e 70 75 | .*...vendor/symfony/console/Inpu |
9520 | 74 2f 41 72 67 76 49 6e 70 75 74 2e 70 68 70 29 1c 00 00 12 ad 00 63 29 1c 00 00 c0 64 a3 ef a4 | t/ArgvInput.php)......c)....d... |
9540 | 01 00 00 00 00 00 00 2b 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c | .......+...vendor/symfony/consol |
9560 | 65 2f 49 6e 70 75 74 2f 41 72 72 61 79 49 6e 70 75 74 2e 70 68 70 07 0d 00 00 12 ad 00 63 07 0d | e/Input/ArrayInput.php.......c.. |
9580 | 00 00 a0 15 24 a9 a4 01 00 00 00 00 00 00 26 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 | ....$.........&...vendor/symfony |
95a0 | 2f 63 6f 6e 73 6f 6c 65 2f 49 6e 70 75 74 2f 49 6e 70 75 74 2e 70 68 70 a3 0d 00 00 12 ad 00 63 | /console/Input/Input.php.......c |
95c0 | a3 0d 00 00 08 eb 31 04 a4 01 00 00 00 00 00 00 2e 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f | ......1.............vendor/symfo |
95e0 | 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 49 6e 70 75 74 2f 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 2e 70 | ny/console/Input/InputArgument.p |
9600 | 68 70 16 06 00 00 12 ad 00 63 16 06 00 00 84 dd 26 0b a4 01 00 00 00 00 00 00 34 00 00 00 76 65 | hp.......c......&.........4...ve |
9620 | 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 49 6e 70 75 74 2f 49 6e 70 75 74 | ndor/symfony/console/Input/Input |
9640 | 41 77 61 72 65 49 6e 74 65 72 66 61 63 65 2e 70 68 70 98 00 00 00 12 ad 00 63 98 00 00 00 ad 0f | AwareInterface.php.......c...... |
9660 | 4f b0 a4 01 00 00 00 00 00 00 30 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e | O.........0...vendor/symfony/con |
9680 | 73 6f 6c 65 2f 49 6e 70 75 74 2f 49 6e 70 75 74 44 65 66 69 6e 69 74 69 6f 6e 2e 70 68 70 23 1a | sole/Input/InputDefinition.php#. |
96a0 | 00 00 12 ad 00 63 23 1a 00 00 09 8c 21 33 a4 01 00 00 00 00 00 00 2f 00 00 00 76 65 6e 64 6f 72 | .....c#.....!3......../...vendor |
96c0 | 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 49 6e 70 75 74 2f 49 6e 70 75 74 49 6e 74 65 | /symfony/console/Input/InputInte |
96e0 | 72 66 61 63 65 2e 70 68 70 fc 03 00 00 12 ad 00 63 fc 03 00 00 47 b6 f4 a8 a4 01 00 00 00 00 00 | rface.php.......c....G.......... |
9700 | 00 2c 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 49 6e 70 75 | .,...vendor/symfony/console/Inpu |
9720 | 74 2f 49 6e 70 75 74 4f 70 74 69 6f 6e 2e 70 68 70 e7 0d 00 00 12 ad 00 63 e7 0d 00 00 be f9 42 | t/InputOption.php.......c......B |
9740 | 40 a4 01 00 00 00 00 00 00 39 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 | @........9...vendor/symfony/cons |
9760 | 6f 6c 65 2f 49 6e 70 75 74 2f 53 74 72 65 61 6d 61 62 6c 65 49 6e 70 75 74 49 6e 74 65 72 66 61 | ole/Input/StreamableInputInterfa |
9780 | 63 65 2e 70 68 70 ce 00 00 00 12 ad 00 63 ce 00 00 00 d6 d5 42 9b a4 01 00 00 00 00 00 00 2c 00 | ce.php.......c......B.........,. |
97a0 | 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 49 6e 70 75 74 2f 53 | ..vendor/symfony/console/Input/S |
97c0 | 74 72 69 6e 67 49 6e 70 75 74 2e 70 68 70 3f 06 00 00 12 ad 00 63 3f 06 00 00 b1 92 14 cb a4 01 | tringInput.php?......c?......... |
97e0 | 00 00 00 00 00 00 1e 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 | ..........vendor/symfony/console |
9800 | 2f 4c 49 43 45 4e 53 45 2b 04 00 00 12 ad 00 63 2b 04 00 00 02 87 b4 cc a4 01 00 00 00 00 00 00 | /LICENSE+......c+............... |
9820 | 2f 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 4c 6f 67 67 65 | /...vendor/symfony/console/Logge |
9840 | 72 2f 43 6f 6e 73 6f 6c 65 4c 6f 67 67 65 72 2e 70 68 70 04 0b 00 00 12 ad 00 63 04 0b 00 00 c7 | r/ConsoleLogger.php.......c..... |
9860 | 0c 0e 51 a4 01 00 00 00 00 00 00 30 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f | ..Q........0...vendor/symfony/co |
9880 | 6e 73 6f 6c 65 2f 4f 75 74 70 75 74 2f 42 75 66 66 65 72 65 64 4f 75 74 70 75 74 2e 70 68 70 6c | nsole/Output/BufferedOutput.phpl |
98a0 | 01 00 00 12 ad 00 63 6c 01 00 00 79 3a b8 10 a4 01 00 00 00 00 00 00 2f 00 00 00 76 65 6e 64 6f | ......cl...y:........../...vendo |
98c0 | 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 4f 75 74 70 75 74 2f 43 6f 6e 73 6f 6c 65 | r/symfony/console/Output/Console |
98e0 | 4f 75 74 70 75 74 2e 70 68 70 8f 09 00 00 12 ad 00 63 8f 09 00 00 c2 dc 15 c2 a4 01 00 00 00 00 | Output.php.......c.............. |
9900 | 00 00 38 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 4f 75 74 | ..8...vendor/symfony/console/Out |
9920 | 70 75 74 2f 43 6f 6e 73 6f 6c 65 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 2e 70 68 70 12 01 | put/ConsoleOutputInterface.php.. |
9940 | 00 00 12 ad 00 63 12 01 00 00 89 ea f7 b4 a4 01 00 00 00 00 00 00 36 00 00 00 76 65 6e 64 6f 72 | .....c................6...vendor |
9960 | 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 4f 75 74 70 75 74 2f 43 6f 6e 73 6f 6c 65 53 | /symfony/console/Output/ConsoleS |
9980 | 65 63 74 69 6f 6e 4f 75 74 70 75 74 2e 70 68 70 93 09 00 00 12 ad 00 63 93 09 00 00 4f d6 30 c9 | ectionOutput.php.......c....O.0. |
99a0 | a4 01 00 00 00 00 00 00 2c 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f | ........,...vendor/symfony/conso |
99c0 | 6c 65 2f 4f 75 74 70 75 74 2f 4e 75 6c 6c 4f 75 74 70 75 74 2e 70 68 70 42 04 00 00 12 ad 00 63 | le/Output/NullOutput.phpB......c |
99e0 | 42 04 00 00 25 23 52 c6 a4 01 00 00 00 00 00 00 28 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f | B...%#R.........(...vendor/symfo |
9a00 | 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 4f 75 74 70 75 74 2f 4f 75 74 70 75 74 2e 70 68 70 c7 09 00 00 | ny/console/Output/Output.php.... |
9a20 | 12 ad 00 63 c7 09 00 00 a0 43 2c b0 a4 01 00 00 00 00 00 00 31 00 00 00 76 65 6e 64 6f 72 2f 73 | ...c.....C,.........1...vendor/s |
9a40 | 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 4f 75 74 70 75 74 2f 4f 75 74 70 75 74 49 6e 74 65 | ymfony/console/Output/OutputInte |
9a60 | 72 66 61 63 65 2e 70 68 70 ed 03 00 00 12 ad 00 63 ed 03 00 00 f0 8e be 05 a4 01 00 00 00 00 00 | rface.php.......c............... |
9a80 | 00 2e 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 4f 75 74 70 | .....vendor/symfony/console/Outp |
9aa0 | 75 74 2f 53 74 72 65 61 6d 4f 75 74 70 75 74 2e 70 68 70 a7 05 00 00 12 ad 00 63 a7 05 00 00 31 | ut/StreamOutput.php.......c....1 |
9ac0 | 58 f2 83 a4 01 00 00 00 00 00 00 35 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f | X..........5...vendor/symfony/co |
9ae0 | 6e 73 6f 6c 65 2f 4f 75 74 70 75 74 2f 54 72 69 6d 6d 65 64 42 75 66 66 65 72 4f 75 74 70 75 74 | nsole/Output/TrimmedBufferOutput |
9b00 | 2e 70 68 70 da 03 00 00 12 ad 00 63 da 03 00 00 c5 b1 ed 0c a4 01 00 00 00 00 00 00 32 00 00 00 | .php.......c................2... |
9b20 | 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 51 75 65 73 74 69 6f 6e 2f | vendor/symfony/console/Question/ |
9b40 | 43 68 6f 69 63 65 51 75 65 73 74 69 6f 6e 2e 70 68 70 dd 0a 00 00 12 ad 00 63 dd 0a 00 00 09 63 | ChoiceQuestion.php.......c.....c |
9b60 | e4 a6 a4 01 00 00 00 00 00 00 38 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e | ..........8...vendor/symfony/con |
9b80 | 73 6f 6c 65 2f 51 75 65 73 74 69 6f 6e 2f 43 6f 6e 66 69 72 6d 61 74 69 6f 6e 51 75 65 73 74 69 | sole/Question/ConfirmationQuesti |
9ba0 | 6f 6e 2e 70 68 70 02 03 00 00 12 ad 00 63 02 03 00 00 ee 79 c5 84 a4 01 00 00 00 00 00 00 2c 00 | on.php.......c.....y..........,. |
9bc0 | 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 51 75 65 73 74 69 6f | ..vendor/symfony/console/Questio |
9be0 | 6e 2f 51 75 65 73 74 69 6f 6e 2e 70 68 70 20 0d 00 00 12 ad 00 63 20 0d 00 00 b5 8d b5 54 a4 01 | n/Question.php.......c.......T.. |
9c00 | 00 00 00 00 00 00 34 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 | ......4...vendor/symfony/console |
9c20 | 2f 52 65 73 6f 75 72 63 65 73 2f 62 69 6e 2f 68 69 64 64 65 6e 69 6e 70 75 74 2e 65 78 65 00 24 | /Resources/bin/hiddeninput.exe.$ |
9c40 | 00 00 12 ad 00 63 00 24 00 00 95 8d a5 76 a4 01 00 00 00 00 00 00 30 00 00 00 76 65 6e 64 6f 72 | .....c.$.....v........0...vendor |
9c60 | 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 52 65 73 6f 75 72 63 65 73 2f 63 6f 6d 70 6c | /symfony/console/Resources/compl |
9c80 | 65 74 69 6f 6e 2e 62 61 73 68 58 0a 00 00 12 ad 00 63 58 0a 00 00 fd 62 6d 0a a4 01 00 00 00 00 | etion.bashX......cX....bm....... |
9ca0 | 00 00 38 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 53 69 67 | ..8...vendor/symfony/console/Sig |
9cc0 | 6e 61 6c 52 65 67 69 73 74 72 79 2f 53 69 67 6e 61 6c 52 65 67 69 73 74 72 79 2e 70 68 70 21 04 | nalRegistry/SignalRegistry.php!. |
9ce0 | 00 00 12 ad 00 63 21 04 00 00 7e 2e 3a af a4 01 00 00 00 00 00 00 33 00 00 00 76 65 6e 64 6f 72 | .....c!...~.:.........3...vendor |
9d00 | 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 53 69 6e 67 6c 65 43 6f 6d 6d 61 6e 64 41 70 | /symfony/console/SingleCommandAp |
9d20 | 70 6c 69 63 61 74 69 6f 6e 2e 70 68 70 35 04 00 00 12 ad 00 63 35 04 00 00 17 c2 e2 a2 a4 01 00 | plication.php5......c5.......... |
9d40 | 00 00 00 00 00 2c 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f | .....,...vendor/symfony/console/ |
9d60 | 53 74 79 6c 65 2f 4f 75 74 70 75 74 53 74 79 6c 65 2e 70 68 70 74 07 00 00 12 ad 00 63 74 07 00 | Style/OutputStyle.phpt......ct.. |
9d80 | 00 4f 16 3b c6 a4 01 00 00 00 00 00 00 2f 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f | .O.;........./...vendor/symfony/ |
9da0 | 63 6f 6e 73 6f 6c 65 2f 53 74 79 6c 65 2f 53 74 79 6c 65 49 6e 74 65 72 66 61 63 65 2e 70 68 70 | console/Style/StyleInterface.php |
9dc0 | 0d 04 00 00 12 ad 00 63 0d 04 00 00 dd a1 88 17 a4 01 00 00 00 00 00 00 2d 00 00 00 76 65 6e 64 | .......c................-...vend |
9de0 | 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 53 74 79 6c 65 2f 53 79 6d 66 6f 6e 79 | or/symfony/console/Style/Symfony |
9e00 | 53 74 79 6c 65 2e 70 68 70 2d 27 00 00 12 ad 00 63 2d 27 00 00 8d bd c0 bf a4 01 00 00 00 00 00 | Style.php-'.....c-'............. |
9e20 | 00 23 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 54 65 72 6d | .#...vendor/symfony/console/Term |
9e40 | 69 6e 61 6c 2e 70 68 70 c3 0a 00 00 12 ad 00 63 c3 0a 00 00 67 c2 7d d8 a4 01 00 00 00 00 00 00 | inal.php.......c....g.}......... |
9e60 | 33 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 54 65 73 74 65 | 3...vendor/symfony/console/Teste |
9e80 | 72 2f 41 70 70 6c 69 63 61 74 69 6f 6e 54 65 73 74 65 72 2e 70 68 70 8c 04 00 00 12 ad 00 63 8c | r/ApplicationTester.php.......c. |
9ea0 | 04 00 00 1e 1f 49 fb a4 01 00 00 00 00 00 00 39 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e | .....I.........9...vendor/symfon |
9ec0 | 79 2f 63 6f 6e 73 6f 6c 65 2f 54 65 73 74 65 72 2f 43 6f 6d 6d 61 6e 64 43 6f 6d 70 6c 65 74 69 | y/console/Tester/CommandCompleti |
9ee0 | 6f 6e 54 65 73 74 65 72 2e 70 68 70 da 03 00 00 12 ad 00 63 da 03 00 00 ca 9b 3b b0 a4 01 00 00 | onTester.php.......c......;..... |
9f00 | 00 00 00 00 2f 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 2f 54 | ..../...vendor/symfony/console/T |
9f20 | 65 73 74 65 72 2f 43 6f 6d 6d 61 6e 64 54 65 73 74 65 72 2e 70 68 70 d9 03 00 00 12 ad 00 63 d9 | ester/CommandTester.php.......c. |
9f40 | 03 00 00 44 08 b6 07 a4 01 00 00 00 00 00 00 40 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e | ...D...........@...vendor/symfon |
9f60 | 79 2f 63 6f 6e 73 6f 6c 65 2f 54 65 73 74 65 72 2f 43 6f 6e 73 74 72 61 69 6e 74 2f 43 6f 6d 6d | y/console/Tester/Constraint/Comm |
9f80 | 61 6e 64 49 73 53 75 63 63 65 73 73 66 75 6c 2e 70 68 70 d6 02 00 00 12 ad 00 63 d6 02 00 00 1e | andIsSuccessful.php.......c..... |
9fa0 | c6 83 82 a4 01 00 00 00 00 00 00 2d 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 63 6f | ...........-...vendor/symfony/co |
9fc0 | 6e 73 6f 6c 65 2f 54 65 73 74 65 72 2f 54 65 73 74 65 72 54 72 61 69 74 2e 70 68 70 ac 0d 00 00 | nsole/Tester/TesterTrait.php.... |
9fe0 | 12 ad 00 63 ac 0d 00 00 32 27 4c b2 a4 01 00 00 00 00 00 00 2c 00 00 00 76 65 6e 64 6f 72 2f 73 | ...c....2'L.........,...vendor/s |
a000 | 79 6d 66 6f 6e 79 2f 64 65 70 72 65 63 61 74 69 6f 6e 2d 63 6f 6e 74 72 61 63 74 73 2f 4c 49 43 | ymfony/deprecation-contracts/LIC |
a020 | 45 4e 53 45 2b 04 00 00 12 ad 00 63 2b 04 00 00 86 76 f9 b1 a4 01 00 00 00 00 00 00 31 00 00 00 | ENSE+......c+....v..........1... |
a040 | 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 64 65 70 72 65 63 61 74 69 6f 6e 2d 63 6f 6e 74 72 | vendor/symfony/deprecation-contr |
a060 | 61 63 74 73 2f 66 75 6e 63 74 69 6f 6e 2e 70 68 70 3d 01 00 00 12 ad 00 63 3d 01 00 00 9e c1 b4 | acts/function.php=......c=...... |
a080 | 0d a4 01 00 00 00 00 00 00 3a 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 66 69 6c 65 | .........:...vendor/symfony/file |
a0a0 | 73 79 73 74 65 6d 2f 45 78 63 65 70 74 69 6f 6e 2f 45 78 63 65 70 74 69 6f 6e 49 6e 74 65 72 66 | system/Exception/ExceptionInterf |
a0c0 | 61 63 65 2e 70 68 70 7c 00 00 00 12 ad 00 63 7c 00 00 00 8d 05 e9 44 a4 01 00 00 00 00 00 00 3d | ace.php|......c|......D........= |
a0e0 | 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 66 69 6c 65 73 79 73 74 65 6d 2f 45 78 63 | ...vendor/symfony/filesystem/Exc |
a100 | 65 70 74 69 6f 6e 2f 46 69 6c 65 4e 6f 74 46 6f 75 6e 64 45 78 63 65 70 74 69 6f 6e 2e 70 68 70 | eption/FileNotFoundException.php |
a120 | ce 01 00 00 12 ad 00 63 ce 01 00 00 26 90 f2 97 a4 01 00 00 00 00 00 00 33 00 00 00 76 65 6e 64 | .......c....&...........3...vend |
a140 | 6f 72 2f 73 79 6d 66 6f 6e 79 2f 66 69 6c 65 73 79 73 74 65 6d 2f 45 78 63 65 70 74 69 6f 6e 2f | or/symfony/filesystem/Exception/ |
a160 | 49 4f 45 78 63 65 70 74 69 6f 6e 2e 70 68 70 99 01 00 00 12 ad 00 63 99 01 00 00 af e0 5c ce a4 | IOException.php.......c......\.. |
a180 | 01 00 00 00 00 00 00 3c 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 66 69 6c 65 73 79 | .......<...vendor/symfony/filesy |
a1a0 | 73 74 65 6d 2f 45 78 63 65 70 74 69 6f 6e 2f 49 4f 45 78 63 65 70 74 69 6f 6e 49 6e 74 65 72 66 | stem/Exception/IOExceptionInterf |
a1c0 | 61 63 65 2e 70 68 70 a6 00 00 00 12 ad 00 63 a6 00 00 00 6a d9 77 4d a4 01 00 00 00 00 00 00 40 | ace.php.......c....j.wM........@ |
a1e0 | 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 66 69 6c 65 73 79 73 74 65 6d 2f 45 78 63 | ...vendor/symfony/filesystem/Exc |
a200 | 65 70 74 69 6f 6e 2f 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 2e | eption/InvalidArgumentException. |
a220 | 70 68 70 a9 00 00 00 12 ad 00 63 a9 00 00 00 8d 21 0e c7 a4 01 00 00 00 00 00 00 38 00 00 00 76 | php.......c.....!..........8...v |
a240 | 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 66 69 6c 65 73 79 73 74 65 6d 2f 45 78 63 65 70 74 69 | endor/symfony/filesystem/Excepti |
a260 | 6f 6e 2f 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 2e 70 68 70 99 00 00 00 12 ad 00 63 99 | on/RuntimeException.php.......c. |
a280 | 00 00 00 dd 55 55 48 a4 01 00 00 00 00 00 00 28 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e | ....UUH........(...vendor/symfon |
a2a0 | 79 2f 66 69 6c 65 73 79 73 74 65 6d 2f 46 69 6c 65 73 79 73 74 65 6d 2e 70 68 70 bd 40 00 00 12 | y/filesystem/Filesystem.php.@... |
a2c0 | ad 00 63 bd 40 00 00 29 f4 36 62 a4 01 00 00 00 00 00 00 21 00 00 00 76 65 6e 64 6f 72 2f 73 79 | ..c.@..).6b........!...vendor/sy |
a2e0 | 6d 66 6f 6e 79 2f 66 69 6c 65 73 79 73 74 65 6d 2f 4c 49 43 45 4e 53 45 2b 04 00 00 12 ad 00 63 | mfony/filesystem/LICENSE+......c |
a300 | 2b 04 00 00 02 87 b4 cc a4 01 00 00 00 00 00 00 22 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f | +..............."...vendor/symfo |
a320 | 6e 79 2f 66 69 6c 65 73 79 73 74 65 6d 2f 50 61 74 68 2e 70 68 70 a0 27 00 00 12 ad 00 63 a0 27 | ny/filesystem/Path.php.'.....c.' |
a340 | 00 00 a8 3a 36 3d a4 01 00 00 00 00 00 00 2f 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 | ...:6=......../...vendor/symfony |
a360 | 2f 66 69 6e 64 65 72 2f 43 6f 6d 70 61 72 61 74 6f 72 2f 43 6f 6d 70 61 72 61 74 6f 72 2e 70 68 | /finder/Comparator/Comparator.ph |
a380 | 70 33 07 00 00 12 ad 00 63 33 07 00 00 12 bf c8 68 a4 01 00 00 00 00 00 00 33 00 00 00 76 65 6e | p3......c3......h........3...ven |
a3a0 | 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 66 69 6e 64 65 72 2f 43 6f 6d 70 61 72 61 74 6f 72 2f 44 61 | dor/symfony/finder/Comparator/Da |
a3c0 | 74 65 43 6f 6d 70 61 72 61 74 6f 72 2e 70 68 70 05 03 00 00 12 ad 00 63 05 03 00 00 cf 25 fa 65 | teComparator.php.......c.....%.e |
a3e0 | a4 01 00 00 00 00 00 00 35 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 66 69 6e 64 65 | ........5...vendor/symfony/finde |
a400 | 72 2f 43 6f 6d 70 61 72 61 74 6f 72 2f 4e 75 6d 62 65 72 43 6f 6d 70 61 72 61 74 6f 72 2e 70 68 | r/Comparator/NumberComparator.ph |
a420 | 70 7a 03 00 00 12 ad 00 63 7a 03 00 00 2b bc 00 68 a4 01 00 00 00 00 00 00 39 00 00 00 76 65 6e | pz......cz...+..h........9...ven |
a440 | 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 66 69 6e 64 65 72 2f 45 78 63 65 70 74 69 6f 6e 2f 41 63 63 | dor/symfony/finder/Exception/Acc |
a460 | 65 73 73 44 65 6e 69 65 64 45 78 63 65 70 74 69 6f 6e 2e 70 68 70 84 00 00 00 12 ad 00 63 84 00 | essDeniedException.php.......c.. |
a480 | 00 00 bd be 73 9c a4 01 00 00 00 00 00 00 3e 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 | ....s.........>...vendor/symfony |
a4a0 | 2f 66 69 6e 64 65 72 2f 45 78 63 65 70 74 69 6f 6e 2f 44 69 72 65 63 74 6f 72 79 4e 6f 74 46 6f | /finder/Exception/DirectoryNotFo |
a4c0 | 75 6e 64 45 78 63 65 70 74 69 6f 6e 2e 70 68 70 89 00 00 00 12 ad 00 63 89 00 00 00 61 29 ff 1b | undException.php.......c....a).. |
a4e0 | a4 01 00 00 00 00 00 00 20 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 66 69 6e 64 65 | ............vendor/symfony/finde |
a500 | 72 2f 46 69 6e 64 65 72 2e 70 68 70 d6 27 00 00 12 ad 00 63 d6 27 00 00 8e 05 3f e4 a4 01 00 00 | r/Finder.php.'.....c.'....?..... |
a520 | 00 00 00 00 23 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 66 69 6e 64 65 72 2f 47 69 | ....#...vendor/symfony/finder/Gi |
a540 | 74 69 67 6e 6f 72 65 2e 70 68 70 b3 07 00 00 12 ad 00 63 b3 07 00 00 1c 73 09 34 a4 01 00 00 00 | tignore.php.......c.....s.4..... |
a560 | 00 00 00 1e 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 66 69 6e 64 65 72 2f 47 6c 6f | .......vendor/symfony/finder/Glo |
a580 | 62 2e 70 68 70 c7 06 00 00 12 ad 00 63 c7 06 00 00 44 62 87 b3 a4 01 00 00 00 00 00 00 37 00 00 | b.php.......c....Db..........7.. |
a5a0 | 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 66 69 6e 64 65 72 2f 49 74 65 72 61 74 6f 72 2f | .vendor/symfony/finder/Iterator/ |
a5c0 | 43 75 73 74 6f 6d 46 69 6c 74 65 72 49 74 65 72 61 74 6f 72 2e 70 68 70 63 02 00 00 12 ad 00 63 | CustomFilterIterator.phpc......c |
a5e0 | 63 02 00 00 13 37 f0 99 a4 01 00 00 00 00 00 00 3a 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f | c....7..........:...vendor/symfo |
a600 | 6e 79 2f 66 69 6e 64 65 72 2f 49 74 65 72 61 74 6f 72 2f 44 61 74 65 52 61 6e 67 65 46 69 6c 74 | ny/finder/Iterator/DateRangeFilt |
a620 | 65 72 49 74 65 72 61 74 6f 72 2e 70 68 70 8f 02 00 00 12 ad 00 63 8f 02 00 00 50 9a 7f 73 a4 01 | erIterator.php.......c....P..s.. |
a640 | 00 00 00 00 00 00 3b 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 66 69 6e 64 65 72 2f | ......;...vendor/symfony/finder/ |
a660 | 49 74 65 72 61 74 6f 72 2f 44 65 70 74 68 52 61 6e 67 65 46 69 6c 74 65 72 49 74 65 72 61 74 6f | Iterator/DepthRangeFilterIterato |
a680 | 72 2e 70 68 70 17 02 00 00 12 ad 00 63 17 02 00 00 a7 8e 03 12 a4 01 00 00 00 00 00 00 41 00 00 | r.php.......c................A.. |
a6a0 | 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 66 69 6e 64 65 72 2f 49 74 65 72 61 74 6f 72 2f | .vendor/symfony/finder/Iterator/ |
a6c0 | 45 78 63 6c 75 64 65 44 69 72 65 63 74 6f 72 79 46 69 6c 74 65 72 49 74 65 72 61 74 6f 72 2e 70 | ExcludeDirectoryFilterIterator.p |
a6e0 | 68 70 2f 06 00 00 12 ad 00 63 2f 06 00 00 d9 6e c3 3c a4 01 00 00 00 00 00 00 39 00 00 00 76 65 | hp/......c/....n.<........9...ve |
a700 | 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 66 69 6e 64 65 72 2f 49 74 65 72 61 74 6f 72 2f 46 69 6c | ndor/symfony/finder/Iterator/Fil |
a720 | 65 54 79 70 65 46 69 6c 74 65 72 49 74 65 72 61 74 6f 72 2e 70 68 70 88 02 00 00 12 ad 00 63 88 | eTypeFilterIterator.php.......c. |
a740 | 02 00 00 5e b6 22 fb a4 01 00 00 00 00 00 00 3c 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e | ...^.".........<...vendor/symfon |
a760 | 79 2f 66 69 6e 64 65 72 2f 49 74 65 72 61 74 6f 72 2f 46 69 6c 65 63 6f 6e 74 65 6e 74 46 69 6c | y/finder/Iterator/FilecontentFil |
a780 | 74 65 72 49 74 65 72 61 74 6f 72 2e 70 68 70 57 02 00 00 12 ad 00 63 57 02 00 00 c2 c5 12 d9 a4 | terIterator.phpW......cW........ |
a7a0 | 01 00 00 00 00 00 00 39 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 66 69 6e 64 65 72 | .......9...vendor/symfony/finder |
a7c0 | 2f 49 74 65 72 61 74 6f 72 2f 46 69 6c 65 6e 61 6d 65 46 69 6c 74 65 72 49 74 65 72 61 74 6f 72 | /Iterator/FilenameFilterIterator |
a7e0 | 2e 70 68 70 94 01 00 00 12 ad 00 63 94 01 00 00 3d 99 dc f4 a4 01 00 00 00 00 00 00 2f 00 00 00 | .php.......c....=.........../... |
a800 | 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 66 69 6e 64 65 72 2f 49 74 65 72 61 74 6f 72 2f 4c | vendor/symfony/finder/Iterator/L |
a820 | 61 7a 79 49 74 65 72 61 74 6f 72 2e 70 68 70 51 01 00 00 12 ad 00 63 51 01 00 00 6e 5d bf bc a4 | azyIterator.phpQ......cQ...n]... |
a840 | 01 00 00 00 00 00 00 3d 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 66 69 6e 64 65 72 | .......=...vendor/symfony/finder |
a860 | 2f 49 74 65 72 61 74 6f 72 2f 4d 75 6c 74 69 70 6c 65 50 63 72 65 46 69 6c 74 65 72 49 74 65 72 | /Iterator/MultiplePcreFilterIter |
a880 | 61 74 6f 72 2e 70 68 70 8d 05 00 00 12 ad 00 63 8d 05 00 00 a2 80 d7 17 a4 01 00 00 00 00 00 00 | ator.php.......c................ |
a8a0 | 35 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 66 69 6e 64 65 72 2f 49 74 65 72 61 74 | 5...vendor/symfony/finder/Iterat |
a8c0 | 6f 72 2f 50 61 74 68 46 69 6c 74 65 72 49 74 65 72 61 74 6f 72 2e 70 68 70 f2 01 00 00 12 ad 00 | or/PathFilterIterator.php....... |
a8e0 | 63 f2 01 00 00 67 14 22 5f a4 01 00 00 00 00 00 00 3d 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 | c....g."_........=...vendor/symf |
a900 | 6f 6e 79 2f 66 69 6e 64 65 72 2f 49 74 65 72 61 74 6f 72 2f 52 65 63 75 72 73 69 76 65 44 69 72 | ony/finder/Iterator/RecursiveDir |
a920 | 65 63 74 6f 72 79 49 74 65 72 61 74 6f 72 2e 70 68 70 b9 09 00 00 12 ad 00 63 b9 09 00 00 a8 95 | ectoryIterator.php.......c...... |
a940 | 76 32 a4 01 00 00 00 00 00 00 3a 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 66 69 6e | v2........:...vendor/symfony/fin |
a960 | 64 65 72 2f 49 74 65 72 61 74 6f 72 2f 53 69 7a 65 52 61 6e 67 65 46 69 6c 74 65 72 49 74 65 72 | der/Iterator/SizeRangeFilterIter |
a980 | 61 74 6f 72 2e 70 68 70 7c 02 00 00 12 ad 00 63 7c 02 00 00 06 33 d9 9f a4 01 00 00 00 00 00 00 | ator.php|......c|....3.......... |
a9a0 | 33 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 66 69 6e 64 65 72 2f 49 74 65 72 61 74 | 3...vendor/symfony/finder/Iterat |
a9c0 | 6f 72 2f 53 6f 72 74 61 62 6c 65 49 74 65 72 61 74 6f 72 2e 70 68 70 28 0a 00 00 12 ad 00 63 28 | or/SortableIterator.php(......c( |
a9e0 | 0a 00 00 d3 e2 ae 0f a4 01 00 00 00 00 00 00 3b 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e | ...............;...vendor/symfon |
aa00 | 79 2f 66 69 6e 64 65 72 2f 49 74 65 72 61 74 6f 72 2f 56 63 73 49 67 6e 6f 72 65 64 46 69 6c 74 | y/finder/Iterator/VcsIgnoredFilt |
aa20 | 65 72 49 74 65 72 61 74 6f 72 2e 70 68 70 77 0a 00 00 12 ad 00 63 77 0a 00 00 c5 b5 1d 33 a4 01 | erIterator.phpw......cw......3.. |
aa40 | 00 00 00 00 00 00 1d 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 66 69 6e 64 65 72 2f | ..........vendor/symfony/finder/ |
aa60 | 4c 49 43 45 4e 53 45 2b 04 00 00 12 ad 00 63 2b 04 00 00 02 87 b4 cc a4 01 00 00 00 00 00 00 25 | LICENSE+......c+...............% |
aa80 | 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 66 69 6e 64 65 72 2f 53 70 6c 46 69 6c 65 | ...vendor/symfony/finder/SplFile |
aaa0 | 49 6e 66 6f 2e 70 68 70 bd 03 00 00 12 ad 00 63 bd 03 00 00 07 79 05 1b a4 01 00 00 00 00 00 00 | Info.php.......c.....y.......... |
aac0 | 27 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 70 6f 6c 79 66 69 6c 6c 2d 63 74 79 70 | '...vendor/symfony/polyfill-ctyp |
aae0 | 65 2f 43 74 79 70 65 2e 70 68 70 87 0a 00 00 12 ad 00 63 87 0a 00 00 7e b6 64 b8 a4 01 00 00 00 | e/Ctype.php.......c....~.d...... |
ab00 | 00 00 00 25 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 70 6f 6c 79 66 69 6c 6c 2d 63 | ...%...vendor/symfony/polyfill-c |
ab20 | 74 79 70 65 2f 4c 49 43 45 4e 53 45 2b 04 00 00 12 ad 00 63 2b 04 00 00 85 bb 45 3a a4 01 00 00 | type/LICENSE+......c+.....E:.... |
ab40 | 00 00 00 00 2b 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 70 6f 6c 79 66 69 6c 6c 2d | ....+...vendor/symfony/polyfill- |
ab60 | 63 74 79 70 65 2f 62 6f 6f 74 73 74 72 61 70 2e 70 68 70 32 05 00 00 12 ad 00 63 32 05 00 00 c8 | ctype/bootstrap.php2......c2.... |
ab80 | 61 ad 38 a4 01 00 00 00 00 00 00 2d 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 70 6f | a.8........-...vendor/symfony/po |
aba0 | 6c 79 66 69 6c 6c 2d 63 74 79 70 65 2f 62 6f 6f 74 73 74 72 61 70 38 30 2e 70 68 70 68 05 00 00 | lyfill-ctype/bootstrap80.phph... |
abc0 | 12 ad 00 63 68 05 00 00 4b bf 79 b8 a4 01 00 00 00 00 00 00 32 00 00 00 76 65 6e 64 6f 72 2f 73 | ...ch...K.y.........2...vendor/s |
abe0 | 79 6d 66 6f 6e 79 2f 70 6f 6c 79 66 69 6c 6c 2d 69 6e 74 6c 2d 67 72 61 70 68 65 6d 65 2f 47 72 | ymfony/polyfill-intl-grapheme/Gr |
ac00 | 61 70 68 65 6d 65 2e 70 68 70 d9 18 00 00 12 ad 00 63 d9 18 00 00 cc bb 39 a7 a4 01 00 00 00 00 | apheme.php.......c......9....... |
ac20 | 00 00 2d 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 70 6f 6c 79 66 69 6c 6c 2d 69 6e | ..-...vendor/symfony/polyfill-in |
ac40 | 74 6c 2d 67 72 61 70 68 65 6d 65 2f 4c 49 43 45 4e 53 45 2b 04 00 00 12 ad 00 63 2b 04 00 00 16 | tl-grapheme/LICENSE+......c+.... |
ac60 | f8 db 7b a4 01 00 00 00 00 00 00 33 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 70 6f | ..{........3...vendor/symfony/po |
ac80 | 6c 79 66 69 6c 6c 2d 69 6e 74 6c 2d 67 72 61 70 68 65 6d 65 2f 62 6f 6f 74 73 74 72 61 70 2e 70 | lyfill-intl-grapheme/bootstrap.p |
aca0 | 68 70 cf 07 00 00 12 ad 00 63 cf 07 00 00 fd 39 c0 7c a4 01 00 00 00 00 00 00 35 00 00 00 76 65 | hp.......c.....9.|........5...ve |
acc0 | 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 70 6f 6c 79 66 69 6c 6c 2d 69 6e 74 6c 2d 67 72 61 70 68 | ndor/symfony/polyfill-intl-graph |
ace0 | 65 6d 65 2f 62 6f 6f 74 73 74 72 61 70 38 30 2e 70 68 70 59 09 00 00 12 ad 00 63 59 09 00 00 a8 | eme/bootstrap80.phpY......cY.... |
ad00 | 01 21 a0 a4 01 00 00 00 00 00 00 2f 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 70 6f | .!........./...vendor/symfony/po |
ad20 | 6c 79 66 69 6c 6c 2d 69 6e 74 6c 2d 6e 6f 72 6d 61 6c 69 7a 65 72 2f 4c 49 43 45 4e 53 45 2b 04 | lyfill-intl-normalizer/LICENSE+. |
ad40 | 00 00 12 ad 00 63 2b 04 00 00 16 f8 db 7b a4 01 00 00 00 00 00 00 36 00 00 00 76 65 6e 64 6f 72 | .....c+......{........6...vendor |
ad60 | 2f 73 79 6d 66 6f 6e 79 2f 70 6f 6c 79 66 69 6c 6c 2d 69 6e 74 6c 2d 6e 6f 72 6d 61 6c 69 7a 65 | /symfony/polyfill-intl-normalize |
ad80 | 72 2f 4e 6f 72 6d 61 6c 69 7a 65 72 2e 70 68 70 f5 16 00 00 12 ad 00 63 f5 16 00 00 62 a9 22 71 | r/Normalizer.php.......c....b."q |
ada0 | a4 01 00 00 00 00 00 00 46 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 70 6f 6c 79 66 | ........F...vendor/symfony/polyf |
adc0 | 69 6c 6c 2d 69 6e 74 6c 2d 6e 6f 72 6d 61 6c 69 7a 65 72 2f 52 65 73 6f 75 72 63 65 73 2f 73 74 | ill-intl-normalizer/Resources/st |
ade0 | 75 62 73 2f 4e 6f 72 6d 61 6c 69 7a 65 72 2e 70 68 70 2e 01 00 00 12 ad 00 63 2e 01 00 00 51 73 | ubs/Normalizer.php.......c....Qs |
ae00 | 24 97 a4 01 00 00 00 00 00 00 52 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 70 6f 6c | $.........R...vendor/symfony/pol |
ae20 | 79 66 69 6c 6c 2d 69 6e 74 6c 2d 6e 6f 72 6d 61 6c 69 7a 65 72 2f 52 65 73 6f 75 72 63 65 73 2f | yfill-intl-normalizer/Resources/ |
ae40 | 75 6e 69 64 61 74 61 2f 63 61 6e 6f 6e 69 63 61 6c 43 6f 6d 70 6f 73 69 74 69 6f 6e 2e 70 68 70 | unidata/canonicalComposition.php |
ae60 | 89 3d 00 00 12 ad 00 63 89 3d 00 00 2a ef 6f 3f a4 01 00 00 00 00 00 00 54 00 00 00 76 65 6e 64 | .=.....c.=..*.o?........T...vend |
ae80 | 6f 72 2f 73 79 6d 66 6f 6e 79 2f 70 6f 6c 79 66 69 6c 6c 2d 69 6e 74 6c 2d 6e 6f 72 6d 61 6c 69 | or/symfony/polyfill-intl-normali |
aea0 | 7a 65 72 2f 52 65 73 6f 75 72 63 65 73 2f 75 6e 69 64 61 74 61 2f 63 61 6e 6f 6e 69 63 61 6c 44 | zer/Resources/unidata/canonicalD |
aec0 | 65 63 6f 6d 70 6f 73 69 74 69 6f 6e 2e 70 68 70 61 88 00 00 12 ad 00 63 61 88 00 00 e7 52 bd 7d | ecomposition.phpa......ca....R.} |
aee0 | a4 01 00 00 00 00 00 00 4c 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 70 6f 6c 79 66 | ........L...vendor/symfony/polyf |
af00 | 69 6c 6c 2d 69 6e 74 6c 2d 6e 6f 72 6d 61 6c 69 7a 65 72 2f 52 65 73 6f 75 72 63 65 73 2f 75 6e | ill-intl-normalizer/Resources/un |
af20 | 69 64 61 74 61 2f 63 6f 6d 62 69 6e 69 6e 67 43 6c 61 73 73 2e 70 68 70 74 2e 00 00 12 ad 00 63 | idata/combiningClass.phpt......c |
af40 | 74 2e 00 00 0b 71 90 dc a4 01 00 00 00 00 00 00 58 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f | t....q..........X...vendor/symfo |
af60 | 6e 79 2f 70 6f 6c 79 66 69 6c 6c 2d 69 6e 74 6c 2d 6e 6f 72 6d 61 6c 69 7a 65 72 2f 52 65 73 6f | ny/polyfill-intl-normalizer/Reso |
af80 | 75 72 63 65 73 2f 75 6e 69 64 61 74 61 2f 63 6f 6d 70 61 74 69 62 69 6c 69 74 79 44 65 63 6f 6d | urces/unidata/compatibilityDecom |
afa0 | 70 6f 73 69 74 69 6f 6e 2e 70 68 70 99 e8 00 00 12 ad 00 63 99 e8 00 00 6f 94 65 29 a4 01 00 00 | position.php.......c....o.e).... |
afc0 | 00 00 00 00 35 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 70 6f 6c 79 66 69 6c 6c 2d | ....5...vendor/symfony/polyfill- |
afe0 | 69 6e 74 6c 2d 6e 6f 72 6d 61 6c 69 7a 65 72 2f 62 6f 6f 74 73 74 72 61 70 2e 70 68 70 eb 01 00 | intl-normalizer/bootstrap.php... |
b000 | 00 12 ad 00 63 eb 01 00 00 50 fa a3 44 a4 01 00 00 00 00 00 00 37 00 00 00 76 65 6e 64 6f 72 2f | ....c....P..D........7...vendor/ |
b020 | 73 79 6d 66 6f 6e 79 2f 70 6f 6c 79 66 69 6c 6c 2d 69 6e 74 6c 2d 6e 6f 72 6d 61 6c 69 7a 65 72 | symfony/polyfill-intl-normalizer |
b040 | 2f 62 6f 6f 74 73 74 72 61 70 38 30 2e 70 68 70 e9 01 00 00 12 ad 00 63 e9 01 00 00 3d e5 72 b4 | /bootstrap80.php.......c....=.r. |
b060 | a4 01 00 00 00 00 00 00 28 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 70 6f 6c 79 66 | ........(...vendor/symfony/polyf |
b080 | 69 6c 6c 2d 6d 62 73 74 72 69 6e 67 2f 4c 49 43 45 4e 53 45 2b 04 00 00 12 ad 00 63 2b 04 00 00 | ill-mbstring/LICENSE+......c+... |
b0a0 | 16 f8 db 7b a4 01 00 00 00 00 00 00 2d 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 70 | ...{........-...vendor/symfony/p |
b0c0 | 6f 6c 79 66 69 6c 6c 2d 6d 62 73 74 72 69 6e 67 2f 4d 62 73 74 72 69 6e 67 2e 70 68 70 74 4a 00 | olyfill-mbstring/Mbstring.phptJ. |
b0e0 | 00 12 ad 00 63 74 4a 00 00 9d da 9f 56 a4 01 00 00 00 00 00 00 40 00 00 00 76 65 6e 64 6f 72 2f | ....ctJ.....V........@...vendor/ |
b100 | 73 79 6d 66 6f 6e 79 2f 70 6f 6c 79 66 69 6c 6c 2d 6d 62 73 74 72 69 6e 67 2f 52 65 73 6f 75 72 | symfony/polyfill-mbstring/Resour |
b120 | 63 65 73 2f 75 6e 69 64 61 74 61 2f 6c 6f 77 65 72 43 61 73 65 2e 70 68 70 f9 54 00 00 12 ad 00 | ces/unidata/lowerCase.php.T..... |
b140 | 63 f9 54 00 00 03 95 b1 2b a4 01 00 00 00 00 00 00 46 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 | c.T.....+........F...vendor/symf |
b160 | 6f 6e 79 2f 70 6f 6c 79 66 69 6c 6c 2d 6d 62 73 74 72 69 6e 67 2f 52 65 73 6f 75 72 63 65 73 2f | ony/polyfill-mbstring/Resources/ |
b180 | 75 6e 69 64 61 74 61 2f 74 69 74 6c 65 43 61 73 65 52 65 67 65 78 70 2e 70 68 70 e3 17 00 00 12 | unidata/titleCaseRegexp.php..... |
b1a0 | ad 00 63 e3 17 00 00 f6 79 5f 95 a4 01 00 00 00 00 00 00 40 00 00 00 76 65 6e 64 6f 72 2f 73 79 | ..c.....y_.........@...vendor/sy |
b1c0 | 6d 66 6f 6e 79 2f 70 6f 6c 79 66 69 6c 6c 2d 6d 62 73 74 72 69 6e 67 2f 52 65 73 6f 75 72 63 65 | mfony/polyfill-mbstring/Resource |
b1e0 | 73 2f 75 6e 69 64 61 74 61 2f 75 70 70 65 72 43 61 73 65 2e 70 68 70 38 5b 00 00 12 ad 00 63 38 | s/unidata/upperCase.php8[.....c8 |
b200 | 5b 00 00 2b 52 d8 2a a4 01 00 00 00 00 00 00 2e 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e | [..+R.*............vendor/symfon |
b220 | 79 2f 70 6f 6c 79 66 69 6c 6c 2d 6d 62 73 74 72 69 6e 67 2f 62 6f 6f 74 73 74 72 61 70 2e 70 68 | y/polyfill-mbstring/bootstrap.ph |
b240 | 70 bb 1a 00 00 12 ad 00 63 bb 1a 00 00 4e 5a 5e 1b a4 01 00 00 00 00 00 00 30 00 00 00 76 65 6e | p.......c....NZ^.........0...ven |
b260 | 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 70 6f 6c 79 66 69 6c 6c 2d 6d 62 73 74 72 69 6e 67 2f 62 6f | dor/symfony/polyfill-mbstring/bo |
b280 | 6f 74 73 74 72 61 70 38 30 2e 70 68 70 ca 20 00 00 12 ad 00 63 ca 20 00 00 44 9b 0d d7 a4 01 00 | otstrap80.php.......c....D...... |
b2a0 | 00 00 00 00 00 25 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 70 6f 6c 79 66 69 6c 6c | .....%...vendor/symfony/polyfill |
b2c0 | 2d 70 68 70 37 33 2f 4c 49 43 45 4e 53 45 2b 04 00 00 12 ad 00 63 2b 04 00 00 85 bb 45 3a a4 01 | -php73/LICENSE+......c+.....E:.. |
b2e0 | 00 00 00 00 00 00 27 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 70 6f 6c 79 66 69 6c | ......'...vendor/symfony/polyfil |
b300 | 6c 2d 70 68 70 37 33 2f 50 68 70 37 33 2e 70 68 70 6e 01 00 00 12 ad 00 63 6e 01 00 00 43 73 a5 | l-php73/Php73.phpn......cn...Cs. |
b320 | 6c a4 01 00 00 00 00 00 00 3f 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 70 6f 6c 79 | l........?...vendor/symfony/poly |
b340 | 66 69 6c 6c 2d 70 68 70 37 33 2f 52 65 73 6f 75 72 63 65 73 2f 73 74 75 62 73 2f 4a 73 6f 6e 45 | fill-php73/Resources/stubs/JsonE |
b360 | 78 63 65 70 74 69 6f 6e 2e 70 68 70 5b 00 00 00 12 ad 00 63 5b 00 00 00 4d 18 b2 dc a4 01 00 00 | xception.php[......c[...M....... |
b380 | 00 00 00 00 2b 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 70 6f 6c 79 66 69 6c 6c 2d | ....+...vendor/symfony/polyfill- |
b3a0 | 70 68 70 37 33 2f 62 6f 6f 74 73 74 72 61 70 2e 70 68 70 f9 02 00 00 12 ad 00 63 f9 02 00 00 41 | php73/bootstrap.php.......c....A |
b3c0 | 59 38 c6 a4 01 00 00 00 00 00 00 25 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 70 6f | Y8.........%...vendor/symfony/po |
b3e0 | 6c 79 66 69 6c 6c 2d 70 68 70 38 30 2f 4c 49 43 45 4e 53 45 26 04 00 00 12 ad 00 63 26 04 00 00 | lyfill-php80/LICENSE&......c&... |
b400 | fe 7a 29 13 a4 01 00 00 00 00 00 00 27 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 70 | .z).........'...vendor/symfony/p |
b420 | 6f 6c 79 66 69 6c 6c 2d 70 68 70 38 30 2f 50 68 70 38 30 2e 70 68 70 a1 09 00 00 12 ad 00 63 a1 | olyfill-php80/Php80.php.......c. |
b440 | 09 00 00 5b c2 6b 0b a4 01 00 00 00 00 00 00 2a 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e | ...[.k.........*...vendor/symfon |
b460 | 79 2f 70 6f 6c 79 66 69 6c 6c 2d 70 68 70 38 30 2f 50 68 70 54 6f 6b 65 6e 2e 70 68 70 13 05 00 | y/polyfill-php80/PhpToken.php... |
b480 | 00 12 ad 00 63 13 05 00 00 4d a3 00 49 a4 01 00 00 00 00 00 00 3b 00 00 00 76 65 6e 64 6f 72 2f | ....c....M..I........;...vendor/ |
b4a0 | 73 79 6d 66 6f 6e 79 2f 70 6f 6c 79 66 69 6c 6c 2d 70 68 70 38 30 2f 52 65 73 6f 75 72 63 65 73 | symfony/polyfill-php80/Resources |
b4c0 | 2f 73 74 75 62 73 2f 41 74 74 72 69 62 75 74 65 2e 70 68 70 be 01 00 00 12 ad 00 63 be 01 00 00 | /stubs/Attribute.php.......c.... |
b4e0 | 05 bf dc d0 a4 01 00 00 00 00 00 00 3a 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 70 | ............:...vendor/symfony/p |
b500 | 6f 6c 79 66 69 6c 6c 2d 70 68 70 38 30 2f 52 65 73 6f 75 72 63 65 73 2f 73 74 75 62 73 2f 50 68 | olyfill-php80/Resources/stubs/Ph |
b520 | 70 54 6f 6b 65 6e 2e 70 68 70 85 00 00 00 12 ad 00 63 85 00 00 00 7d c8 47 47 a4 01 00 00 00 00 | pToken.php.......c....}.GG...... |
b540 | 00 00 3c 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 70 6f 6c 79 66 69 6c 6c 2d 70 68 | ..<...vendor/symfony/polyfill-ph |
b560 | 70 38 30 2f 52 65 73 6f 75 72 63 65 73 2f 73 74 75 62 73 2f 53 74 72 69 6e 67 61 62 6c 65 2e 70 | p80/Resources/stubs/Stringable.p |
b580 | 68 70 62 00 00 00 12 ad 00 63 62 00 00 00 c3 d1 9b 3c a4 01 00 00 00 00 00 00 45 00 00 00 76 65 | hpb......cb......<........E...ve |
b5a0 | 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 70 6f 6c 79 66 69 6c 6c 2d 70 68 70 38 30 2f 52 65 73 6f | ndor/symfony/polyfill-php80/Reso |
b5c0 | 75 72 63 65 73 2f 73 74 75 62 73 2f 55 6e 68 61 6e 64 6c 65 64 4d 61 74 63 68 45 72 72 6f 72 2e | urces/stubs/UnhandledMatchError. |
b5e0 | 70 68 70 54 00 00 00 12 ad 00 63 54 00 00 00 8a d3 4f f5 a4 01 00 00 00 00 00 00 3c 00 00 00 76 | phpT......cT.....O.........<...v |
b600 | 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 70 6f 6c 79 66 69 6c 6c 2d 70 68 70 38 30 2f 52 65 73 | endor/symfony/polyfill-php80/Res |
b620 | 6f 75 72 63 65 73 2f 73 74 75 62 73 2f 56 61 6c 75 65 45 72 72 6f 72 2e 70 68 70 4b 00 00 00 12 | ources/stubs/ValueError.phpK.... |
b640 | ad 00 63 4b 00 00 00 8a b2 ec 1c a4 01 00 00 00 00 00 00 2b 00 00 00 76 65 6e 64 6f 72 2f 73 79 | ..cK...............+...vendor/sy |
b660 | 6d 66 6f 6e 79 2f 70 6f 6c 79 66 69 6c 6c 2d 70 68 70 38 30 2f 62 6f 6f 74 73 74 72 61 70 2e 70 | mfony/polyfill-php80/bootstrap.p |
b680 | 68 70 fa 04 00 00 12 ad 00 63 fa 04 00 00 d7 ee e5 02 a4 01 00 00 00 00 00 00 37 00 00 00 76 65 | hp.......c................7...ve |
b6a0 | 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 70 72 6f 63 65 73 73 2f 45 78 63 65 70 74 69 6f 6e 2f 45 | ndor/symfony/process/Exception/E |
b6c0 | 78 63 65 70 74 69 6f 6e 49 6e 74 65 72 66 61 63 65 2e 70 68 70 79 00 00 00 12 ad 00 63 79 00 00 | xceptionInterface.phpy......cy.. |
b6e0 | 00 71 56 58 4a a4 01 00 00 00 00 00 00 3d 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f | .qVXJ........=...vendor/symfony/ |
b700 | 70 72 6f 63 65 73 73 2f 45 78 63 65 70 74 69 6f 6e 2f 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e | process/Exception/InvalidArgumen |
b720 | 74 45 78 63 65 70 74 69 6f 6e 2e 70 68 70 a8 00 00 00 12 ad 00 63 a8 00 00 00 d0 c0 2b 5f a4 01 | tException.php.......c......+_.. |
b740 | 00 00 00 00 00 00 33 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 70 72 6f 63 65 73 73 | ......3...vendor/symfony/process |
b760 | 2f 45 78 63 65 70 74 69 6f 6e 2f 4c 6f 67 69 63 45 78 63 65 70 74 69 6f 6e 2e 70 68 70 94 00 00 | /Exception/LogicException.php... |
b780 | 00 12 ad 00 63 94 00 00 00 20 b3 e3 f1 a4 01 00 00 00 00 00 00 3b 00 00 00 76 65 6e 64 6f 72 2f | ....c................;...vendor/ |
b7a0 | 73 79 6d 66 6f 6e 79 2f 70 72 6f 63 65 73 73 2f 45 78 63 65 70 74 69 6f 6e 2f 50 72 6f 63 65 73 | symfony/process/Exception/Proces |
b7c0 | 73 46 61 69 6c 65 64 45 78 63 65 70 74 69 6f 6e 2e 70 68 70 78 03 00 00 12 ad 00 63 78 03 00 00 | sFailedException.phpx......cx... |
b7e0 | a8 cc 7a 79 a4 01 00 00 00 00 00 00 3d 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 70 | ..zy........=...vendor/symfony/p |
b800 | 72 6f 63 65 73 73 2f 45 78 63 65 70 74 69 6f 6e 2f 50 72 6f 63 65 73 73 53 69 67 6e 61 6c 65 64 | rocess/Exception/ProcessSignaled |
b820 | 45 78 63 65 70 74 69 6f 6e 2e 70 68 70 11 02 00 00 12 ad 00 63 11 02 00 00 59 d7 a9 e2 a4 01 00 | Exception.php.......c....Y...... |
b840 | 00 00 00 00 00 3d 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 70 72 6f 63 65 73 73 2f | .....=...vendor/symfony/process/ |
b860 | 45 78 63 65 70 74 69 6f 6e 2f 50 72 6f 63 65 73 73 54 69 6d 65 64 4f 75 74 45 78 63 65 70 74 69 | Exception/ProcessTimedOutExcepti |
b880 | 6f 6e 2e 70 68 70 31 04 00 00 12 ad 00 63 31 04 00 00 82 27 5a 15 a4 01 00 00 00 00 00 00 35 00 | on.php1......c1....'Z.........5. |
b8a0 | 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 70 72 6f 63 65 73 73 2f 45 78 63 65 70 74 69 | ..vendor/symfony/process/Excepti |
b8c0 | 6f 6e 2f 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 2e 70 68 70 98 00 00 00 12 ad 00 63 98 | on/RuntimeException.php.......c. |
b8e0 | 00 00 00 a2 1b d8 3a a4 01 00 00 00 00 00 00 2b 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e | ......:........+...vendor/symfon |
b900 | 79 2f 70 72 6f 63 65 73 73 2f 45 78 65 63 75 74 61 62 6c 65 46 69 6e 64 65 72 2e 70 68 70 b9 04 | y/process/ExecutableFinder.php.. |
b920 | 00 00 12 ad 00 63 b9 04 00 00 93 84 90 3d a4 01 00 00 00 00 00 00 26 00 00 00 76 65 6e 64 6f 72 | .....c.......=........&...vendor |
b940 | 2f 73 79 6d 66 6f 6e 79 2f 70 72 6f 63 65 73 73 2f 49 6e 70 75 74 53 74 72 65 61 6d 2e 70 68 70 | /symfony/process/InputStream.php |
b960 | 2f 04 00 00 12 ad 00 63 2f 04 00 00 a6 b9 65 87 a4 01 00 00 00 00 00 00 1e 00 00 00 76 65 6e 64 | /......c/.....e.............vend |
b980 | 6f 72 2f 73 79 6d 66 6f 6e 79 2f 70 72 6f 63 65 73 73 2f 4c 49 43 45 4e 53 45 2b 04 00 00 12 ad | or/symfony/process/LICENSE+..... |
b9a0 | 00 63 2b 04 00 00 02 87 b4 cc a4 01 00 00 00 00 00 00 2e 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d | .c+...................vendor/sym |
b9c0 | 66 6f 6e 79 2f 70 72 6f 63 65 73 73 2f 50 68 70 45 78 65 63 75 74 61 62 6c 65 46 69 6e 64 65 72 | fony/process/PhpExecutableFinder |
b9e0 | 2e 70 68 70 9e 05 00 00 12 ad 00 63 9e 05 00 00 c4 39 cf 65 a4 01 00 00 00 00 00 00 25 00 00 00 | .php.......c.....9.e........%... |
ba00 | 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 70 72 6f 63 65 73 73 2f 50 68 70 50 72 6f 63 65 73 | vendor/symfony/process/PhpProces |
ba20 | 73 2e 70 68 70 f2 04 00 00 12 ad 00 63 f2 04 00 00 92 73 11 ff a4 01 00 00 00 00 00 00 2e 00 00 | s.php.......c.....s............. |
ba40 | 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 70 72 6f 63 65 73 73 2f 50 69 70 65 73 2f 41 62 | .vendor/symfony/process/Pipes/Ab |
ba60 | 73 74 72 61 63 74 50 69 70 65 73 2e 70 68 70 1e 0b 00 00 12 ad 00 63 1e 0b 00 00 02 6b 53 51 a4 | stractPipes.php.......c.....kSQ. |
ba80 | 01 00 00 00 00 00 00 2f 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 70 72 6f 63 65 73 | ......./...vendor/symfony/proces |
baa0 | 73 2f 50 69 70 65 73 2f 50 69 70 65 73 49 6e 74 65 72 66 61 63 65 2e 70 68 70 99 01 00 00 12 ad | s/Pipes/PipesInterface.php...... |
bac0 | 00 63 99 01 00 00 66 51 da 0c a4 01 00 00 00 00 00 00 2a 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d | .c....fQ..........*...vendor/sym |
bae0 | 66 6f 6e 79 2f 70 72 6f 63 65 73 73 2f 50 69 70 65 73 2f 55 6e 69 78 50 69 70 65 73 2e 70 68 70 | fony/process/Pipes/UnixPipes.php |
bb00 | 80 08 00 00 12 ad 00 63 80 08 00 00 be 94 56 76 a4 01 00 00 00 00 00 00 2d 00 00 00 76 65 6e 64 | .......c......Vv........-...vend |
bb20 | 6f 72 2f 73 79 6d 66 6f 6e 79 2f 70 72 6f 63 65 73 73 2f 50 69 70 65 73 2f 57 69 6e 64 6f 77 73 | or/symfony/process/Pipes/Windows |
bb40 | 50 69 70 65 73 2e 70 68 70 2c 0d 00 00 12 ad 00 63 2c 0d 00 00 78 51 6a c3 a4 01 00 00 00 00 00 | Pipes.php,......c,...xQj........ |
bb60 | 00 22 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 70 72 6f 63 65 73 73 2f 50 72 6f 63 | ."...vendor/symfony/process/Proc |
bb80 | 65 73 73 2e 70 68 70 f5 65 00 00 12 ad 00 63 f5 65 00 00 0b 29 8d f7 a4 01 00 00 00 00 00 00 27 | ess.php.e.....c.e...)..........' |
bba0 | 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 70 72 6f 63 65 73 73 2f 50 72 6f 63 65 73 | ...vendor/symfony/process/Proces |
bbc0 | 73 55 74 69 6c 73 2e 70 68 70 14 03 00 00 12 ad 00 63 14 03 00 00 d3 0f 58 ec a4 01 00 00 00 00 | sUtils.php.......c......X....... |
bbe0 | 00 00 37 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 73 65 72 76 69 63 65 2d 63 6f 6e | ..7...vendor/symfony/service-con |
bc00 | 74 72 61 63 74 73 2f 41 74 74 72 69 62 75 74 65 2f 52 65 71 75 69 72 65 64 2e 70 68 70 a8 00 00 | tracts/Attribute/Required.php... |
bc20 | 00 12 ad 00 63 a8 00 00 00 78 6a eb 84 a4 01 00 00 00 00 00 00 40 00 00 00 76 65 6e 64 6f 72 2f | ....c....xj..........@...vendor/ |
bc40 | 73 79 6d 66 6f 6e 79 2f 73 65 72 76 69 63 65 2d 63 6f 6e 74 72 61 63 74 73 2f 41 74 74 72 69 62 | symfony/service-contracts/Attrib |
bc60 | 75 74 65 2f 53 75 62 73 63 72 69 62 65 64 53 65 72 76 69 63 65 2e 70 68 70 0a 01 00 00 12 ad 00 | ute/SubscribedService.php....... |
bc80 | 63 0a 01 00 00 31 49 ae 54 a4 01 00 00 00 00 00 00 28 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 | c....1I.T........(...vendor/symf |
bca0 | 6f 6e 79 2f 73 65 72 76 69 63 65 2d 63 6f 6e 74 72 61 63 74 73 2f 4c 49 43 45 4e 53 45 2b 04 00 | ony/service-contracts/LICENSE+.. |
bcc0 | 00 12 ad 00 63 2b 04 00 00 4a 88 45 a0 a4 01 00 00 00 00 00 00 33 00 00 00 76 65 6e 64 6f 72 2f | ....c+...J.E.........3...vendor/ |
bce0 | 73 79 6d 66 6f 6e 79 2f 73 65 72 76 69 63 65 2d 63 6f 6e 74 72 61 63 74 73 2f 52 65 73 65 74 49 | symfony/service-contracts/ResetI |
bd00 | 6e 74 65 72 66 61 63 65 2e 70 68 70 79 00 00 00 12 ad 00 63 79 00 00 00 b0 b7 6a e5 a4 01 00 00 | nterface.phpy......cy.....j..... |
bd20 | 00 00 00 00 38 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 73 65 72 76 69 63 65 2d 63 | ....8...vendor/symfony/service-c |
bd40 | 6f 6e 74 72 61 63 74 73 2f 53 65 72 76 69 63 65 4c 6f 63 61 74 6f 72 54 72 61 69 74 2e 70 68 70 | ontracts/ServiceLocatorTrait.php |
bd60 | e3 09 00 00 12 ad 00 63 e3 09 00 00 22 8f 35 e9 a4 01 00 00 00 00 00 00 3d 00 00 00 76 65 6e 64 | .......c....".5.........=...vend |
bd80 | 6f 72 2f 73 79 6d 66 6f 6e 79 2f 73 65 72 76 69 63 65 2d 63 6f 6e 74 72 61 63 74 73 2f 53 65 72 | or/symfony/service-contracts/Ser |
bda0 | 76 69 63 65 50 72 6f 76 69 64 65 72 49 6e 74 65 72 66 61 63 65 2e 70 68 70 de 00 00 00 12 ad 00 | viceProviderInterface.php....... |
bdc0 | 63 de 00 00 00 fa 52 e8 6b a4 01 00 00 00 00 00 00 3f 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 | c.....R.k........?...vendor/symf |
bde0 | 6f 6e 79 2f 73 65 72 76 69 63 65 2d 63 6f 6e 74 72 61 63 74 73 2f 53 65 72 76 69 63 65 53 75 62 | ony/service-contracts/ServiceSub |
be00 | 73 63 72 69 62 65 72 49 6e 74 65 72 66 61 63 65 2e 70 68 70 b3 00 00 00 12 ad 00 63 b3 00 00 00 | scriberInterface.php.......c.... |
be20 | 97 f6 64 0c a4 01 00 00 00 00 00 00 3b 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 73 | ..d.........;...vendor/symfony/s |
be40 | 65 72 76 69 63 65 2d 63 6f 6e 74 72 61 63 74 73 2f 53 65 72 76 69 63 65 53 75 62 73 63 72 69 62 | ervice-contracts/ServiceSubscrib |
be60 | 65 72 54 72 61 69 74 2e 70 68 70 53 0a 00 00 12 ad 00 63 53 0a 00 00 aa eb 34 a3 a4 01 00 00 00 | erTrait.phpS......cS.....4...... |
be80 | 00 00 00 3c 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 73 65 72 76 69 63 65 2d 63 6f | ...<...vendor/symfony/service-co |
bea0 | 6e 74 72 61 63 74 73 2f 54 65 73 74 2f 53 65 72 76 69 63 65 4c 6f 63 61 74 6f 72 54 65 73 74 2e | ntracts/Test/ServiceLocatorTest. |
bec0 | 70 68 70 98 08 00 00 12 ad 00 63 98 08 00 00 57 37 7c 47 a4 01 00 00 00 00 00 00 28 00 00 00 76 | php.......c....W7|G........(...v |
bee0 | 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 73 74 72 69 6e 67 2f 41 62 73 74 72 61 63 74 53 74 72 | endor/symfony/string/AbstractStr |
bf00 | 69 6e 67 2e 70 68 70 8c 33 00 00 12 ad 00 63 8c 33 00 00 35 3e 8b 8e a4 01 00 00 00 00 00 00 2f | ing.php.3.....c.3..5>........../ |
bf20 | 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 73 74 72 69 6e 67 2f 41 62 73 74 72 61 63 | ...vendor/symfony/string/Abstrac |
bf40 | 74 55 6e 69 63 6f 64 65 53 74 72 69 6e 67 2e 70 68 70 dc 52 00 00 12 ad 00 63 dc 52 00 00 09 14 | tUnicodeString.php.R.....c.R.... |
bf60 | 55 9c a4 01 00 00 00 00 00 00 24 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 73 74 72 | U.........$...vendor/symfony/str |
bf80 | 69 6e 67 2f 42 79 74 65 53 74 72 69 6e 67 2e 70 68 70 8b 2b 00 00 12 ad 00 63 8b 2b 00 00 c1 fc | ing/ByteString.php.+.....c.+.... |
bfa0 | 0f 9b a4 01 00 00 00 00 00 00 29 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 73 74 72 | ..........)...vendor/symfony/str |
bfc0 | 69 6e 67 2f 43 6f 64 65 50 6f 69 6e 74 53 74 72 69 6e 67 2e 70 68 70 f1 17 00 00 12 ad 00 63 f1 | ing/CodePointString.php.......c. |
bfe0 | 17 00 00 9f 3b 33 cb a4 01 00 00 00 00 00 00 36 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e | ....;3.........6...vendor/symfon |
c000 | 79 2f 73 74 72 69 6e 67 2f 45 78 63 65 70 74 69 6f 6e 2f 45 78 63 65 70 74 69 6f 6e 49 6e 74 65 | y/string/Exception/ExceptionInte |
c020 | 72 66 61 63 65 2e 70 68 70 73 00 00 00 12 ad 00 63 73 00 00 00 71 48 56 91 a4 01 00 00 00 00 00 | rface.phps......cs...qHV........ |
c040 | 00 3c 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 73 74 72 69 6e 67 2f 45 78 63 65 70 | .<...vendor/symfony/string/Excep |
c060 | 74 69 6f 6e 2f 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 2e 70 68 | tion/InvalidArgumentException.ph |
c080 | 70 a2 00 00 00 12 ad 00 63 a2 00 00 00 1f 05 a5 41 a4 01 00 00 00 00 00 00 34 00 00 00 76 65 6e | p.......c.......A........4...ven |
c0a0 | 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 73 74 72 69 6e 67 2f 45 78 63 65 70 74 69 6f 6e 2f 52 75 6e | dor/symfony/string/Exception/Run |
c0c0 | 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 2e 70 68 70 92 00 00 00 12 ad 00 63 92 00 00 00 75 91 12 | timeException.php.......c....u.. |
c0e0 | 67 a4 01 00 00 00 00 00 00 34 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 73 74 72 69 | g........4...vendor/symfony/stri |
c100 | 6e 67 2f 49 6e 66 6c 65 63 74 6f 72 2f 45 6e 67 6c 69 73 68 49 6e 66 6c 65 63 74 6f 72 2e 70 68 | ng/Inflector/EnglishInflector.ph |
c120 | 70 f9 16 00 00 12 ad 00 63 f9 16 00 00 85 33 a7 64 a4 01 00 00 00 00 00 00 33 00 00 00 76 65 6e | p.......c.....3.d........3...ven |
c140 | 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 73 74 72 69 6e 67 2f 49 6e 66 6c 65 63 74 6f 72 2f 46 72 65 | dor/symfony/string/Inflector/Fre |
c160 | 6e 63 68 49 6e 66 6c 65 63 74 6f 72 2e 70 68 70 88 0a 00 00 12 ad 00 63 88 0a 00 00 b7 8a 12 48 | nchInflector.php.......c.......H |
c180 | a4 01 00 00 00 00 00 00 36 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 73 74 72 69 6e | ........6...vendor/symfony/strin |
c1a0 | 67 2f 49 6e 66 6c 65 63 74 6f 72 2f 49 6e 66 6c 65 63 74 6f 72 49 6e 74 65 72 66 61 63 65 2e 70 | g/Inflector/InflectorInterface.p |
c1c0 | 68 70 d7 00 00 00 12 ad 00 63 d7 00 00 00 68 44 a3 17 a4 01 00 00 00 00 00 00 1d 00 00 00 76 65 | hp.......c....hD..............ve |
c1e0 | 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 73 74 72 69 6e 67 2f 4c 49 43 45 4e 53 45 2b 04 00 00 12 | ndor/symfony/string/LICENSE+.... |
c200 | ad 00 63 2b 04 00 00 bd 1b fd ae a4 01 00 00 00 00 00 00 24 00 00 00 76 65 6e 64 6f 72 2f 73 79 | ..c+...............$...vendor/sy |
c220 | 6d 66 6f 6e 79 2f 73 74 72 69 6e 67 2f 4c 61 7a 79 53 74 72 69 6e 67 2e 70 68 70 0f 0c 00 00 12 | mfony/string/LazyString.php..... |
c240 | ad 00 63 0f 0c 00 00 28 db dc 4c a4 01 00 00 00 00 00 00 3c 00 00 00 76 65 6e 64 6f 72 2f 73 79 | ..c....(..L........<...vendor/sy |
c260 | 6d 66 6f 6e 79 2f 73 74 72 69 6e 67 2f 52 65 73 6f 75 72 63 65 73 2f 64 61 74 61 2f 77 63 73 77 | mfony/string/Resources/data/wcsw |
c280 | 69 64 74 68 5f 74 61 62 6c 65 5f 77 69 64 65 2e 70 68 70 5e 15 00 00 12 ad 00 63 5e 15 00 00 25 | idth_table_wide.php^......c^...% |
c2a0 | af 6f 29 a4 01 00 00 00 00 00 00 3c 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 73 74 | .o)........<...vendor/symfony/st |
c2c0 | 72 69 6e 67 2f 52 65 73 6f 75 72 63 65 73 2f 64 61 74 61 2f 77 63 73 77 69 64 74 68 5f 74 61 62 | ring/Resources/data/wcswidth_tab |
c2e0 | 6c 65 5f 7a 65 72 6f 2e 70 68 70 3f 18 00 00 12 ad 00 63 3f 18 00 00 26 5e bf 7d a4 01 00 00 00 | le_zero.php?......c?...&^.}..... |
c300 | 00 00 00 2d 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 73 74 72 69 6e 67 2f 52 65 73 | ...-...vendor/symfony/string/Res |
c320 | 6f 75 72 63 65 73 2f 66 75 6e 63 74 69 6f 6e 73 2e 70 68 70 06 02 00 00 12 ad 00 63 06 02 00 00 | ources/functions.php.......c.... |
c340 | 63 da aa 22 a4 01 00 00 00 00 00 00 2e 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 73 | c.."............vendor/symfony/s |
c360 | 74 72 69 6e 67 2f 53 6c 75 67 67 65 72 2f 41 73 63 69 69 53 6c 75 67 67 65 72 2e 70 68 70 ea 0f | tring/Slugger/AsciiSlugger.php.. |
c380 | 00 00 12 ad 00 63 ea 0f 00 00 15 d7 da 33 a4 01 00 00 00 00 00 00 32 00 00 00 76 65 6e 64 6f 72 | .....c.......3........2...vendor |
c3a0 | 2f 73 79 6d 66 6f 6e 79 2f 73 74 72 69 6e 67 2f 53 6c 75 67 67 65 72 2f 53 6c 75 67 67 65 72 49 | /symfony/string/Slugger/SluggerI |
c3c0 | 6e 74 65 72 66 61 63 65 2e 70 68 70 06 01 00 00 12 ad 00 63 06 01 00 00 f7 af 05 51 a4 01 00 00 | nterface.php.......c.......Q.... |
c3e0 | 00 00 00 00 27 00 00 00 76 65 6e 64 6f 72 2f 73 79 6d 66 6f 6e 79 2f 73 74 72 69 6e 67 2f 55 6e | ....'...vendor/symfony/string/Un |
c400 | 69 63 6f 64 65 53 74 72 69 6e 67 2e 70 68 70 e8 25 00 00 12 ad 00 63 e8 25 00 00 d9 f3 0c d7 a4 | icodeString.php.%.....c.%....... |
c420 | 01 00 00 00 00 00 00 0c 00 00 00 62 69 6e 2f 63 6f 6d 70 6f 73 65 72 64 0b 00 00 12 ad 00 63 64 | ...........bin/composerd......cd |
c440 | 0b 00 00 0b 15 71 d9 a4 01 00 00 00 00 00 00 07 00 00 00 4c 49 43 45 4e 53 45 2e 04 00 00 12 ad | .....q.............LICENSE...... |
c460 | 00 63 2e 04 00 00 20 d5 08 03 a4 01 00 00 00 00 00 00 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 | .c................<?php.declare( |
c480 | 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 | strict_types=1);............name |
c4a0 | 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 41 64 76 69 73 6f 72 79 3b 0a 0a 75 73 65 20 43 6f | space.Composer\Advisory;..use.Co |
c4c0 | 6d 70 6f 73 65 72 5c 49 4f 5c 43 6f 6e 73 6f 6c 65 49 4f 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 | mposer\IO\ConsoleIO;.use.Compose |
c4e0 | 72 5c 49 4f 5c 49 4f 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 4a | r\IO\IOInterface;.use.Composer\J |
c500 | 73 6f 6e 5c 4a 73 6f 6e 46 69 6c 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 | son\JsonFile;.use.Composer\Packa |
c520 | 67 65 5c 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 | ge\PackageInterface;.use.Compose |
c540 | 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 52 65 70 6f 73 69 74 6f 72 79 53 65 74 3b 0a 75 73 65 20 | r\Repository\RepositorySet;.use. |
c560 | 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 3b 0a 75 73 65 20 53 79 | InvalidArgumentException;.use.Sy |
c580 | 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 46 6f 72 6d 61 74 74 65 | mfony\Component\Console\Formatte |
c5a0 | 72 5c 4f 75 74 70 75 74 46 6f 72 6d 61 74 74 65 72 3b 0a 0a 0a 0a 0a 63 6c 61 73 73 20 41 75 64 | r\OutputFormatter;.....class.Aud |
c5c0 | 69 74 6f 72 0a 7b 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 46 4f 52 4d 41 54 5f 54 41 42 4c 45 | itor.{.public.const.FORMAT_TABLE |
c5e0 | 20 3d 20 27 74 61 62 6c 65 27 3b 0a 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 46 4f 52 4d 41 54 | .=.'table';..public.const.FORMAT |
c600 | 5f 50 4c 41 49 4e 20 3d 20 27 70 6c 61 69 6e 27 3b 0a 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 | _PLAIN.=.'plain';..public.const. |
c620 | 46 4f 52 4d 41 54 5f 4a 53 4f 4e 20 3d 20 27 6a 73 6f 6e 27 3b 0a 0a 70 75 62 6c 69 63 20 63 6f | FORMAT_JSON.=.'json';..public.co |
c640 | 6e 73 74 20 46 4f 52 4d 41 54 5f 53 55 4d 4d 41 52 59 20 3d 20 27 73 75 6d 6d 61 72 79 27 3b 0a | nst.FORMAT_SUMMARY.=.'summary';. |
c660 | 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 46 4f 52 4d 41 54 53 20 3d 20 5b 0a 73 65 6c 66 3a 3a | .public.const.FORMATS.=.[.self:: |
c680 | 46 4f 52 4d 41 54 5f 54 41 42 4c 45 2c 0a 73 65 6c 66 3a 3a 46 4f 52 4d 41 54 5f 50 4c 41 49 4e | FORMAT_TABLE,.self::FORMAT_PLAIN |
c6a0 | 2c 0a 73 65 6c 66 3a 3a 46 4f 52 4d 41 54 5f 4a 53 4f 4e 2c 0a 73 65 6c 66 3a 3a 46 4f 52 4d 41 | ,.self::FORMAT_JSON,.self::FORMA |
c6c0 | 54 5f 53 55 4d 4d 41 52 59 2c 0a 5d 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e | T_SUMMARY,.];.........public.fun |
c6e0 | 63 74 69 6f 6e 20 61 75 64 69 74 28 49 4f 49 6e 74 65 72 66 61 63 65 20 24 69 6f 2c 20 52 65 70 | ction.audit(IOInterface.$io,.Rep |
c700 | 6f 73 69 74 6f 72 79 53 65 74 20 24 72 65 70 6f 53 65 74 2c 20 61 72 72 61 79 20 24 70 61 63 6b | ositorySet.$repoSet,.array.$pack |
c720 | 61 67 65 73 2c 20 73 74 72 69 6e 67 20 24 66 6f 72 6d 61 74 2c 20 62 6f 6f 6c 20 24 77 61 72 6e | ages,.string.$format,.bool.$warn |
c740 | 69 6e 67 4f 6e 6c 79 20 3d 20 74 72 75 65 29 3a 20 69 6e 74 0a 7b 0a 24 61 64 76 69 73 6f 72 69 | ingOnly.=.true):.int.{.$advisori |
c760 | 65 73 20 3d 20 24 72 65 70 6f 53 65 74 2d 3e 67 65 74 4d 61 74 63 68 69 6e 67 53 65 63 75 72 69 | es.=.$repoSet->getMatchingSecuri |
c780 | 74 79 41 64 76 69 73 6f 72 69 65 73 28 24 70 61 63 6b 61 67 65 73 2c 20 24 66 6f 72 6d 61 74 20 | tyAdvisories($packages,.$format. |
c7a0 | 3d 3d 3d 20 73 65 6c 66 3a 3a 46 4f 52 4d 41 54 5f 53 55 4d 4d 41 52 59 29 3b 0a 69 66 20 28 73 | ===.self::FORMAT_SUMMARY);.if.(s |
c7c0 | 65 6c 66 3a 3a 46 4f 52 4d 41 54 5f 4a 53 4f 4e 20 3d 3d 3d 20 24 66 6f 72 6d 61 74 29 20 7b 0a | elf::FORMAT_JSON.===.$format).{. |
c7e0 | 24 69 6f 2d 3e 77 72 69 74 65 28 4a 73 6f 6e 46 69 6c 65 3a 3a 65 6e 63 6f 64 65 28 5b 27 61 64 | $io->write(JsonFile::encode(['ad |
c800 | 76 69 73 6f 72 69 65 73 27 20 3d 3e 20 24 61 64 76 69 73 6f 72 69 65 73 5d 29 29 3b 0a 0a 72 65 | visories'.=>.$advisories]));..re |
c820 | 74 75 72 6e 20 63 6f 75 6e 74 28 24 61 64 76 69 73 6f 72 69 65 73 29 3b 0a 7d 0a 0a 24 65 72 72 | turn.count($advisories);.}..$err |
c840 | 6f 72 4f 72 57 61 72 6e 20 3d 20 24 77 61 72 6e 69 6e 67 4f 6e 6c 79 20 3f 20 27 77 61 72 6e 69 | orOrWarn.=.$warningOnly.?.'warni |
c860 | 6e 67 27 20 3a 20 27 65 72 72 6f 72 27 3b 0a 69 66 20 28 63 6f 75 6e 74 28 24 61 64 76 69 73 6f | ng'.:.'error';.if.(count($adviso |
c880 | 72 69 65 73 29 20 3e 20 30 29 20 7b 0a 5b 24 61 66 66 65 63 74 65 64 50 61 63 6b 61 67 65 73 2c | ries).>.0).{.[$affectedPackages, |
c8a0 | 20 24 74 6f 74 61 6c 41 64 76 69 73 6f 72 69 65 73 5d 20 3d 20 24 74 68 69 73 2d 3e 63 6f 75 6e | .$totalAdvisories].=.$this->coun |
c8c0 | 74 41 64 76 69 73 6f 72 69 65 73 28 24 61 64 76 69 73 6f 72 69 65 73 29 3b 0a 24 70 6c 75 72 61 | tAdvisories($advisories);.$plura |
c8e0 | 6c 69 74 79 20 3d 20 24 74 6f 74 61 6c 41 64 76 69 73 6f 72 69 65 73 20 3d 3d 3d 20 31 20 3f 20 | lity.=.$totalAdvisories.===.1.?. |
c900 | 27 79 27 20 3a 20 27 69 65 73 27 3b 0a 24 70 6b 67 50 6c 75 72 61 6c 69 74 79 20 3d 20 24 61 66 | 'y'.:.'ies';.$pkgPlurality.=.$af |
c920 | 66 65 63 74 65 64 50 61 63 6b 61 67 65 73 20 3d 3d 3d 20 31 20 3f 20 27 27 20 3a 20 27 73 27 3b | fectedPackages.===.1.?.''.:.'s'; |
c940 | 0a 24 70 75 6e 63 74 75 61 74 69 6f 6e 20 3d 20 24 66 6f 72 6d 61 74 20 3d 3d 3d 20 27 73 75 6d | .$punctuation.=.$format.===.'sum |
c960 | 6d 61 72 79 27 20 3f 20 27 2e 27 20 3a 20 27 3a 27 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 | mary'.?.'.'.:.':';.$io->writeErr |
c980 | 6f 72 28 22 3c 24 65 72 72 6f 72 4f 72 57 61 72 6e 3e 46 6f 75 6e 64 20 24 74 6f 74 61 6c 41 64 | or("<$errorOrWarn>Found.$totalAd |
c9a0 | 76 69 73 6f 72 69 65 73 20 73 65 63 75 72 69 74 79 20 76 75 6c 6e 65 72 61 62 69 6c 69 74 79 20 | visories.security.vulnerability. |
c9c0 | 61 64 76 69 73 6f 72 7b 24 70 6c 75 72 61 6c 69 74 79 7d 20 61 66 66 65 63 74 69 6e 67 20 24 61 | advisor{$plurality}.affecting.$a |
c9e0 | 66 66 65 63 74 65 64 50 61 63 6b 61 67 65 73 20 70 61 63 6b 61 67 65 7b 24 70 6b 67 50 6c 75 72 | ffectedPackages.package{$pkgPlur |
ca00 | 61 6c 69 74 79 7d 7b 24 70 75 6e 63 74 75 61 74 69 6f 6e 7d 3c 2f 24 65 72 72 6f 72 4f 72 57 61 | ality}{$punctuation}</$errorOrWa |
ca20 | 72 6e 3e 22 29 3b 0a 24 74 68 69 73 2d 3e 6f 75 74 70 75 74 41 64 76 69 73 6f 72 69 65 73 28 24 | rn>");.$this->outputAdvisories($ |
ca40 | 69 6f 2c 20 24 61 64 76 69 73 6f 72 69 65 73 2c 20 24 66 6f 72 6d 61 74 29 3b 0a 0a 72 65 74 75 | io,.$advisories,.$format);..retu |
ca60 | 72 6e 20 24 61 66 66 65 63 74 65 64 50 61 63 6b 61 67 65 73 3b 0a 7d 0a 0a 24 69 6f 2d 3e 77 72 | rn.$affectedPackages;.}..$io->wr |
ca80 | 69 74 65 45 72 72 6f 72 28 27 3c 69 6e 66 6f 3e 4e 6f 20 73 65 63 75 72 69 74 79 20 76 75 6c 6e | iteError('<info>No.security.vuln |
caa0 | 65 72 61 62 69 6c 69 74 79 20 61 64 76 69 73 6f 72 69 65 73 20 66 6f 75 6e 64 3c 2f 69 6e 66 6f | erability.advisories.found</info |
cac0 | 3e 27 29 3b 0a 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 | >');..return.0;.}......private.f |
cae0 | 75 6e 63 74 69 6f 6e 20 63 6f 75 6e 74 41 64 76 69 73 6f 72 69 65 73 28 61 72 72 61 79 20 24 61 | unction.countAdvisories(array.$a |
cb00 | 64 76 69 73 6f 72 69 65 73 29 3a 20 61 72 72 61 79 0a 7b 0a 24 63 6f 75 6e 74 20 3d 20 30 3b 0a | dvisories):.array.{.$count.=.0;. |
cb20 | 66 6f 72 65 61 63 68 20 28 24 61 64 76 69 73 6f 72 69 65 73 20 61 73 20 24 70 61 63 6b 61 67 65 | foreach.($advisories.as.$package |
cb40 | 41 64 76 69 73 6f 72 69 65 73 29 20 7b 0a 24 63 6f 75 6e 74 20 2b 3d 20 63 6f 75 6e 74 28 24 70 | Advisories).{.$count.+=.count($p |
cb60 | 61 63 6b 61 67 65 41 64 76 69 73 6f 72 69 65 73 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 5b 63 6f | ackageAdvisories);.}..return.[co |
cb80 | 75 6e 74 28 24 61 64 76 69 73 6f 72 69 65 73 29 2c 20 24 63 6f 75 6e 74 5d 3b 0a 7d 0a 0a 0a 0a | unt($advisories),.$count];.}.... |
cba0 | 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 6f 75 74 70 75 74 41 64 76 69 73 6f 72 | ..private.function.outputAdvisor |
cbc0 | 69 65 73 28 49 4f 49 6e 74 65 72 66 61 63 65 20 24 69 6f 2c 20 61 72 72 61 79 20 24 61 64 76 69 | ies(IOInterface.$io,.array.$advi |
cbe0 | 73 6f 72 69 65 73 2c 20 73 74 72 69 6e 67 20 24 66 6f 72 6d 61 74 29 3a 20 76 6f 69 64 0a 7b 0a | sories,.string.$format):.void.{. |
cc00 | 73 77 69 74 63 68 20 28 24 66 6f 72 6d 61 74 29 20 7b 0a 63 61 73 65 20 73 65 6c 66 3a 3a 46 4f | switch.($format).{.case.self::FO |
cc20 | 52 4d 41 54 5f 54 41 42 4c 45 3a 0a 69 66 20 28 21 28 24 69 6f 20 69 6e 73 74 61 6e 63 65 6f 66 | RMAT_TABLE:.if.(!($io.instanceof |
cc40 | 20 43 6f 6e 73 6f 6c 65 49 4f 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 49 6e 76 61 6c 69 64 | .ConsoleIO)).{.throw.new.Invalid |
cc60 | 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 27 43 61 6e 6e 6f 74 20 75 73 65 20 74 61 | ArgumentException('Cannot.use.ta |
cc80 | 62 6c 65 20 66 6f 72 6d 61 74 20 77 69 74 68 20 27 20 2e 20 67 65 74 5f 63 6c 61 73 73 28 24 69 | ble.format.with.'...get_class($i |
cca0 | 6f 29 29 3b 0a 7d 0a 24 74 68 69 73 2d 3e 6f 75 74 70 75 74 41 76 69 73 6f 72 69 65 73 54 61 62 | o));.}.$this->outputAvisoriesTab |
ccc0 | 6c 65 28 24 69 6f 2c 20 24 61 64 76 69 73 6f 72 69 65 73 29 3b 0a 0a 72 65 74 75 72 6e 3b 0a 63 | le($io,.$advisories);..return;.c |
cce0 | 61 73 65 20 73 65 6c 66 3a 3a 46 4f 52 4d 41 54 5f 50 4c 41 49 4e 3a 0a 24 74 68 69 73 2d 3e 6f | ase.self::FORMAT_PLAIN:.$this->o |
cd00 | 75 74 70 75 74 41 64 76 69 73 6f 72 69 65 73 50 6c 61 69 6e 28 24 69 6f 2c 20 24 61 64 76 69 73 | utputAdvisoriesPlain($io,.$advis |
cd20 | 6f 72 69 65 73 29 3b 0a 0a 72 65 74 75 72 6e 3b 0a 63 61 73 65 20 73 65 6c 66 3a 3a 46 4f 52 4d | ories);..return;.case.self::FORM |
cd40 | 41 54 5f 53 55 4d 4d 41 52 59 3a 0a 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 52 75 | AT_SUMMARY:..$io->writeError('Ru |
cd60 | 6e 20 63 6f 6d 70 6f 73 65 72 20 61 75 64 69 74 20 66 6f 72 20 61 20 66 75 6c 6c 20 6c 69 73 74 | n.composer.audit.for.a.full.list |
cd80 | 20 6f 66 20 61 64 76 69 73 6f 72 69 65 73 2e 27 29 3b 0a 0a 72 65 74 75 72 6e 3b 0a 64 65 66 61 | .of.advisories.');..return;.defa |
cda0 | 75 6c 74 3a 0a 74 68 72 6f 77 20 6e 65 77 20 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 | ult:.throw.new.InvalidArgumentEx |
cdc0 | 63 65 70 74 69 6f 6e 28 27 49 6e 76 61 6c 69 64 20 66 6f 72 6d 61 74 20 22 27 2e 24 66 6f 72 6d | ception('Invalid.format."'.$form |
cde0 | 61 74 2e 27 22 2e 27 29 3b 0a 7d 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 | at.'".');.}.}.....private.functi |
ce00 | 6f 6e 20 6f 75 74 70 75 74 41 76 69 73 6f 72 69 65 73 54 61 62 6c 65 28 43 6f 6e 73 6f 6c 65 49 | on.outputAvisoriesTable(ConsoleI |
ce20 | 4f 20 24 69 6f 2c 20 61 72 72 61 79 20 24 61 64 76 69 73 6f 72 69 65 73 29 3a 20 76 6f 69 64 0a | O.$io,.array.$advisories):.void. |
ce40 | 7b 0a 66 6f 72 65 61 63 68 20 28 24 61 64 76 69 73 6f 72 69 65 73 20 61 73 20 24 70 61 63 6b 61 | {.foreach.($advisories.as.$packa |
ce60 | 67 65 41 64 76 69 73 6f 72 69 65 73 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 | geAdvisories).{.foreach.($packag |
ce80 | 65 41 64 76 69 73 6f 72 69 65 73 20 61 73 20 24 61 64 76 69 73 6f 72 79 29 20 7b 0a 24 69 6f 2d | eAdvisories.as.$advisory).{.$io- |
cea0 | 3e 67 65 74 54 61 62 6c 65 28 29 0a 2d 3e 73 65 74 48 6f 72 69 7a 6f 6e 74 61 6c 28 29 0a 2d 3e | >getTable().->setHorizontal().-> |
cec0 | 73 65 74 48 65 61 64 65 72 73 28 5b 0a 27 50 61 63 6b 61 67 65 27 2c 0a 27 43 56 45 27 2c 0a 27 | setHeaders([.'Package',.'CVE',.' |
cee0 | 54 69 74 6c 65 27 2c 0a 27 55 52 4c 27 2c 0a 27 41 66 66 65 63 74 65 64 20 76 65 72 73 69 6f 6e | Title',.'URL',.'Affected.version |
cf00 | 73 27 2c 0a 27 52 65 70 6f 72 74 65 64 20 61 74 27 2c 0a 5d 29 0a 2d 3e 61 64 64 52 6f 77 28 5b | s',.'Reported.at',.]).->addRow([ |
cf20 | 0a 24 61 64 76 69 73 6f 72 79 2d 3e 70 61 63 6b 61 67 65 4e 61 6d 65 2c 0a 24 74 68 69 73 2d 3e | .$advisory->packageName,.$this-> |
cf40 | 67 65 74 43 56 45 28 24 61 64 76 69 73 6f 72 79 29 2c 0a 24 61 64 76 69 73 6f 72 79 2d 3e 74 69 | getCVE($advisory),.$advisory->ti |
cf60 | 74 6c 65 2c 0a 24 74 68 69 73 2d 3e 67 65 74 55 52 4c 28 24 61 64 76 69 73 6f 72 79 29 2c 0a 24 | tle,.$this->getURL($advisory),.$ |
cf80 | 61 64 76 69 73 6f 72 79 2d 3e 61 66 66 65 63 74 65 64 56 65 72 73 69 6f 6e 73 2d 3e 67 65 74 50 | advisory->affectedVersions->getP |
cfa0 | 72 65 74 74 79 53 74 72 69 6e 67 28 29 2c 0a 24 61 64 76 69 73 6f 72 79 2d 3e 72 65 70 6f 72 74 | rettyString(),.$advisory->report |
cfc0 | 65 64 41 74 2d 3e 66 6f 72 6d 61 74 28 44 41 54 45 5f 41 54 4f 4d 29 2c 0a 5d 29 0a 2d 3e 73 65 | edAt->format(DATE_ATOM),.]).->se |
cfe0 | 74 43 6f 6c 75 6d 6e 57 69 64 74 68 28 31 2c 20 38 30 29 0a 2d 3e 73 65 74 43 6f 6c 75 6d 6e 4d | tColumnWidth(1,.80).->setColumnM |
d000 | 61 78 57 69 64 74 68 28 31 2c 20 38 30 29 0a 2d 3e 72 65 6e 64 65 72 28 29 3b 0a 7d 0a 7d 0a 7d | axWidth(1,.80).->render();.}.}.} |
d020 | 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 6f 75 74 70 75 74 41 64 76 69 | .....private.function.outputAdvi |
d040 | 73 6f 72 69 65 73 50 6c 61 69 6e 28 49 4f 49 6e 74 65 72 66 61 63 65 20 24 69 6f 2c 20 61 72 72 | soriesPlain(IOInterface.$io,.arr |
d060 | 61 79 20 24 61 64 76 69 73 6f 72 69 65 73 29 3a 20 76 6f 69 64 0a 7b 0a 24 65 72 72 6f 72 20 3d | ay.$advisories):.void.{.$error.= |
d080 | 20 5b 5d 3b 0a 24 66 69 72 73 74 41 64 76 69 73 6f 72 79 20 3d 20 74 72 75 65 3b 0a 66 6f 72 65 | .[];.$firstAdvisory.=.true;.fore |
d0a0 | 61 63 68 20 28 24 61 64 76 69 73 6f 72 69 65 73 20 61 73 20 24 70 61 63 6b 61 67 65 41 64 76 69 | ach.($advisories.as.$packageAdvi |
d0c0 | 73 6f 72 69 65 73 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 41 64 76 69 73 | sories).{.foreach.($packageAdvis |
d0e0 | 6f 72 69 65 73 20 61 73 20 24 61 64 76 69 73 6f 72 79 29 20 7b 0a 69 66 20 28 21 24 66 69 72 73 | ories.as.$advisory).{.if.(!$firs |
d100 | 74 41 64 76 69 73 6f 72 79 29 20 7b 0a 24 65 72 72 6f 72 5b 5d 20 3d 20 27 2d 2d 2d 2d 2d 2d 2d | tAdvisory).{.$error[].=.'------- |
d120 | 2d 27 3b 0a 7d 0a 24 65 72 72 6f 72 5b 5d 20 3d 20 22 50 61 63 6b 61 67 65 3a 20 22 2e 24 61 64 | -';.}.$error[].=."Package:.".$ad |
d140 | 76 69 73 6f 72 79 2d 3e 70 61 63 6b 61 67 65 4e 61 6d 65 3b 0a 24 65 72 72 6f 72 5b 5d 20 3d 20 | visory->packageName;.$error[].=. |
d160 | 22 43 56 45 3a 20 22 2e 24 74 68 69 73 2d 3e 67 65 74 43 56 45 28 24 61 64 76 69 73 6f 72 79 29 | "CVE:.".$this->getCVE($advisory) |
d180 | 3b 0a 24 65 72 72 6f 72 5b 5d 20 3d 20 22 54 69 74 6c 65 3a 20 22 2e 4f 75 74 70 75 74 46 6f 72 | ;.$error[].=."Title:.".OutputFor |
d1a0 | 6d 61 74 74 65 72 3a 3a 65 73 63 61 70 65 28 24 61 64 76 69 73 6f 72 79 2d 3e 74 69 74 6c 65 29 | matter::escape($advisory->title) |
d1c0 | 3b 0a 24 65 72 72 6f 72 5b 5d 20 3d 20 22 55 52 4c 3a 20 22 2e 24 74 68 69 73 2d 3e 67 65 74 55 | ;.$error[].=."URL:.".$this->getU |
d1e0 | 52 4c 28 24 61 64 76 69 73 6f 72 79 29 3b 0a 24 65 72 72 6f 72 5b 5d 20 3d 20 22 41 66 66 65 63 | RL($advisory);.$error[].=."Affec |
d200 | 74 65 64 20 76 65 72 73 69 6f 6e 73 3a 20 22 2e 4f 75 74 70 75 74 46 6f 72 6d 61 74 74 65 72 3a | ted.versions:.".OutputFormatter: |
d220 | 3a 65 73 63 61 70 65 28 24 61 64 76 69 73 6f 72 79 2d 3e 61 66 66 65 63 74 65 64 56 65 72 73 69 | :escape($advisory->affectedVersi |
d240 | 6f 6e 73 2d 3e 67 65 74 50 72 65 74 74 79 53 74 72 69 6e 67 28 29 29 3b 0a 24 65 72 72 6f 72 5b | ons->getPrettyString());.$error[ |
d260 | 5d 20 3d 20 22 52 65 70 6f 72 74 65 64 20 61 74 3a 20 22 2e 24 61 64 76 69 73 6f 72 79 2d 3e 72 | ].=."Reported.at:.".$advisory->r |
d280 | 65 70 6f 72 74 65 64 41 74 2d 3e 66 6f 72 6d 61 74 28 44 41 54 45 5f 41 54 4f 4d 29 3b 0a 24 66 | eportedAt->format(DATE_ATOM);.$f |
d2a0 | 69 72 73 74 41 64 76 69 73 6f 72 79 20 3d 20 66 61 6c 73 65 3b 0a 7d 0a 7d 0a 24 69 6f 2d 3e 77 | irstAdvisory.=.false;.}.}.$io->w |
d2c0 | 72 69 74 65 45 72 72 6f 72 28 24 65 72 72 6f 72 29 3b 0a 7d 0a 0a 70 72 69 76 61 74 65 20 66 75 | riteError($error);.}..private.fu |
d2e0 | 6e 63 74 69 6f 6e 20 67 65 74 43 56 45 28 53 65 63 75 72 69 74 79 41 64 76 69 73 6f 72 79 20 24 | nction.getCVE(SecurityAdvisory.$ |
d300 | 61 64 76 69 73 6f 72 79 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 69 66 20 28 24 61 64 76 69 73 6f 72 | advisory):.string.{.if.($advisor |
d320 | 79 2d 3e 63 76 65 20 3d 3d 3d 20 6e 75 6c 6c 29 20 7b 0a 72 65 74 75 72 6e 20 27 4e 4f 20 43 56 | y->cve.===.null).{.return.'NO.CV |
d340 | 45 27 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 27 3c 68 72 65 66 3d 68 74 74 70 73 3a 2f 2f 63 76 65 | E';.}..return.'<href=https://cve |
d360 | 2e 6d 69 74 72 65 2e 6f 72 67 2f 63 67 69 2d 62 69 6e 2f 63 76 65 6e 61 6d 65 2e 63 67 69 3f 6e | .mitre.org/cgi-bin/cvename.cgi?n |
d380 | 61 6d 65 3d 27 2e 24 61 64 76 69 73 6f 72 79 2d 3e 63 76 65 2e 27 3e 27 2e 24 61 64 76 69 73 6f | ame='.$advisory->cve.'>'.$adviso |
d3a0 | 72 79 2d 3e 63 76 65 2e 27 3c 2f 3e 27 3b 0a 7d 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 | ry->cve.'</>';.}..private.functi |
d3c0 | 6f 6e 20 67 65 74 55 52 4c 28 53 65 63 75 72 69 74 79 41 64 76 69 73 6f 72 79 20 24 61 64 76 69 | on.getURL(SecurityAdvisory.$advi |
d3e0 | 73 6f 72 79 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 69 66 20 28 24 61 64 76 69 73 6f 72 79 2d 3e 6c | sory):.string.{.if.($advisory->l |
d400 | 69 6e 6b 20 3d 3d 3d 20 6e 75 6c 6c 29 20 7b 0a 72 65 74 75 72 6e 20 27 27 3b 0a 7d 0a 0a 72 65 | ink.===.null).{.return.'';.}..re |
d420 | 74 75 72 6e 20 27 3c 68 72 65 66 3d 27 2e 4f 75 74 70 75 74 46 6f 72 6d 61 74 74 65 72 3a 3a 65 | turn.'<href='.OutputFormatter::e |
d440 | 73 63 61 70 65 28 24 61 64 76 69 73 6f 72 79 2d 3e 6c 69 6e 6b 29 2e 27 3e 27 2e 4f 75 74 70 75 | scape($advisory->link).'>'.Outpu |
d460 | 74 46 6f 72 6d 61 74 74 65 72 3a 3a 65 73 63 61 70 65 28 24 61 64 76 69 73 6f 72 79 2d 3e 6c 69 | tFormatter::escape($advisory->li |
d480 | 6e 6b 29 2e 27 3c 2f 3e 27 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 | nk).'</>';.}.}.<?php.declare(str |
d4a0 | 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 | ict_types=1);............namespa |
d4c0 | 63 65 20 43 6f 6d 70 6f 73 65 72 5c 41 64 76 69 73 6f 72 79 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f | ce.Composer\Advisory;..use.Compo |
d4e0 | 73 65 72 5c 53 65 6d 76 65 72 5c 43 6f 6e 73 74 72 61 69 6e 74 5c 43 6f 6e 73 74 72 61 69 6e 74 | ser\Semver\Constraint\Constraint |
d500 | 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 65 6d 76 65 72 5c 56 | Interface;.use.Composer\Semver\V |
d520 | 65 72 73 69 6f 6e 50 61 72 73 65 72 3b 0a 0a 63 6c 61 73 73 20 50 61 72 74 69 61 6c 53 65 63 75 | ersionParser;..class.PartialSecu |
d540 | 72 69 74 79 41 64 76 69 73 6f 72 79 0a 7b 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 24 61 64 76 69 73 | rityAdvisory.{.....public.$advis |
d560 | 6f 72 79 49 64 3b 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 24 70 61 63 6b 61 67 65 4e 61 6d 65 3b | oryId;......public.$packageName; |
d580 | 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 24 61 66 66 65 63 74 65 64 56 65 72 73 69 6f 6e 73 3b 0a | ......public.$affectedVersions;. |
d5a0 | 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 63 72 65 61 | .....public.static.function.crea |
d5c0 | 74 65 28 73 74 72 69 6e 67 20 24 70 61 63 6b 61 67 65 4e 61 6d 65 2c 20 61 72 72 61 79 20 24 64 | te(string.$packageName,.array.$d |
d5e0 | 61 74 61 2c 20 56 65 72 73 69 6f 6e 50 61 72 73 65 72 20 24 70 61 72 73 65 72 29 3a 20 73 65 6c | ata,.VersionParser.$parser):.sel |
d600 | 66 0a 7b 0a 24 63 6f 6e 73 74 72 61 69 6e 74 20 3d 20 24 70 61 72 73 65 72 2d 3e 70 61 72 73 65 | f.{.$constraint.=.$parser->parse |
d620 | 43 6f 6e 73 74 72 61 69 6e 74 73 28 24 64 61 74 61 5b 27 61 66 66 65 63 74 65 64 56 65 72 73 69 | Constraints($data['affectedVersi |
d640 | 6f 6e 73 27 5d 29 3b 0a 69 66 20 28 69 73 73 65 74 28 24 64 61 74 61 5b 27 74 69 74 6c 65 27 5d | ons']);.if.(isset($data['title'] |
d660 | 2c 20 24 64 61 74 61 5b 27 73 6f 75 72 63 65 73 27 5d 2c 20 24 64 61 74 61 5b 27 72 65 70 6f 72 | ,.$data['sources'],.$data['repor |
d680 | 74 65 64 41 74 27 5d 29 29 20 7b 0a 72 65 74 75 72 6e 20 6e 65 77 20 53 65 63 75 72 69 74 79 41 | tedAt'])).{.return.new.SecurityA |
d6a0 | 64 76 69 73 6f 72 79 28 24 70 61 63 6b 61 67 65 4e 61 6d 65 2c 20 24 64 61 74 61 5b 27 61 64 76 | dvisory($packageName,.$data['adv |
d6c0 | 69 73 6f 72 79 49 64 27 5d 2c 20 24 63 6f 6e 73 74 72 61 69 6e 74 2c 20 24 64 61 74 61 5b 27 74 | isoryId'],.$constraint,.$data['t |
d6e0 | 69 74 6c 65 27 5d 2c 20 24 64 61 74 61 5b 27 73 6f 75 72 63 65 73 27 5d 2c 20 6e 65 77 20 5c 44 | itle'],.$data['sources'],.new.\D |
d700 | 61 74 65 54 69 6d 65 49 6d 6d 75 74 61 62 6c 65 28 24 64 61 74 61 5b 27 72 65 70 6f 72 74 65 64 | ateTimeImmutable($data['reported |
d720 | 41 74 27 5d 2c 20 6e 65 77 20 5c 44 61 74 65 54 69 6d 65 5a 6f 6e 65 28 27 55 54 43 27 29 29 2c | At'],.new.\DateTimeZone('UTC')), |
d740 | 20 24 64 61 74 61 5b 27 63 76 65 27 5d 20 3f 3f 20 6e 75 6c 6c 2c 20 24 64 61 74 61 5b 27 6c 69 | .$data['cve'].??.null,.$data['li |
d760 | 6e 6b 27 5d 20 3f 3f 20 6e 75 6c 6c 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 6e 65 77 20 73 65 6c | nk'].??.null);.}..return.new.sel |
d780 | 66 28 24 70 61 63 6b 61 67 65 4e 61 6d 65 2c 20 24 64 61 74 61 5b 27 61 64 76 69 73 6f 72 79 49 | f($packageName,.$data['advisoryI |
d7a0 | 64 27 5d 2c 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e | d'],.$constraint);.}..public.fun |
d7c0 | 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 73 74 72 69 6e 67 20 24 70 61 63 6b 61 67 | ction.__construct(string.$packag |
d7e0 | 65 4e 61 6d 65 2c 20 73 74 72 69 6e 67 20 24 61 64 76 69 73 6f 72 79 49 64 2c 20 43 6f 6e 73 74 | eName,.string.$advisoryId,.Const |
d800 | 72 61 69 6e 74 49 6e 74 65 72 66 61 63 65 20 24 61 66 66 65 63 74 65 64 56 65 72 73 69 6f 6e 73 | raintInterface.$affectedVersions |
d820 | 29 0a 7b 0a 24 74 68 69 73 2d 3e 61 64 76 69 73 6f 72 79 49 64 20 3d 20 24 61 64 76 69 73 6f 72 | ).{.$this->advisoryId.=.$advisor |
d840 | 79 49 64 3b 0a 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 4e 61 6d 65 20 3d 20 24 70 61 63 6b 61 | yId;.$this->packageName.=.$packa |
d860 | 67 65 4e 61 6d 65 3b 0a 24 74 68 69 73 2d 3e 61 66 66 65 63 74 65 64 56 65 72 73 69 6f 6e 73 20 | geName;.$this->affectedVersions. |
d880 | 3d 20 24 61 66 66 65 63 74 65 64 56 65 72 73 69 6f 6e 73 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 | =.$affectedVersions;.}.}.<?php.d |
d8a0 | 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a | eclare(strict_types=1);......... |
d8c0 | 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 41 64 76 69 73 6f 72 79 3b 0a | ...namespace.Composer\Advisory;. |
d8e0 | 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 65 6d 76 65 72 5c 43 6f 6e 73 74 72 61 69 6e 74 5c | .use.Composer\Semver\Constraint\ |
d900 | 43 6f 6e 73 74 72 61 69 6e 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 44 61 74 65 54 69 6d | ConstraintInterface;.use.DateTim |
d920 | 65 49 6d 6d 75 74 61 62 6c 65 3b 0a 0a 63 6c 61 73 73 20 53 65 63 75 72 69 74 79 41 64 76 69 73 | eImmutable;..class.SecurityAdvis |
d940 | 6f 72 79 20 65 78 74 65 6e 64 73 20 50 61 72 74 69 61 6c 53 65 63 75 72 69 74 79 41 64 76 69 73 | ory.extends.PartialSecurityAdvis |
d960 | 6f 72 79 0a 7b 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 24 74 69 74 6c 65 3b 0a 0a 0a 0a 0a 0a 70 75 | ory.{.....public.$title;......pu |
d980 | 62 6c 69 63 20 24 63 76 65 3b 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 24 6c 69 6e 6b 3b 0a 0a 0a | blic.$cve;......public.$link;... |
d9a0 | 0a 0a 0a 70 75 62 6c 69 63 20 24 72 65 70 6f 72 74 65 64 41 74 3b 0a 0a 0a 0a 0a 0a 70 75 62 6c | ...public.$reportedAt;......publ |
d9c0 | 69 63 20 24 73 6f 75 72 63 65 73 3b 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f | ic.$sources;......public.functio |
d9e0 | 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 73 74 72 69 6e 67 20 24 70 61 63 6b 61 67 65 4e 61 6d | n.__construct(string.$packageNam |
da00 | 65 2c 20 73 74 72 69 6e 67 20 24 61 64 76 69 73 6f 72 79 49 64 2c 20 43 6f 6e 73 74 72 61 69 6e | e,.string.$advisoryId,.Constrain |
da20 | 74 49 6e 74 65 72 66 61 63 65 20 24 61 66 66 65 63 74 65 64 56 65 72 73 69 6f 6e 73 2c 20 73 74 | tInterface.$affectedVersions,.st |
da40 | 72 69 6e 67 20 24 74 69 74 6c 65 2c 20 61 72 72 61 79 20 24 73 6f 75 72 63 65 73 2c 20 44 61 74 | ring.$title,.array.$sources,.Dat |
da60 | 65 54 69 6d 65 49 6d 6d 75 74 61 62 6c 65 20 24 72 65 70 6f 72 74 65 64 41 74 2c 20 3f 73 74 72 | eTimeImmutable.$reportedAt,.?str |
da80 | 69 6e 67 20 24 63 76 65 20 3d 20 6e 75 6c 6c 2c 20 3f 73 74 72 69 6e 67 20 24 6c 69 6e 6b 20 3d | ing.$cve.=.null,.?string.$link.= |
daa0 | 20 6e 75 6c 6c 29 0a 7b 0a 70 61 72 65 6e 74 3a 3a 5f 5f 63 6f 6e 73 74 72 75 63 74 28 24 70 61 | .null).{.parent::__construct($pa |
dac0 | 63 6b 61 67 65 4e 61 6d 65 2c 20 24 61 64 76 69 73 6f 72 79 49 64 2c 20 24 61 66 66 65 63 74 65 | ckageName,.$advisoryId,.$affecte |
dae0 | 64 56 65 72 73 69 6f 6e 73 29 3b 0a 0a 24 74 68 69 73 2d 3e 74 69 74 6c 65 20 3d 20 24 74 69 74 | dVersions);..$this->title.=.$tit |
db00 | 6c 65 3b 0a 24 74 68 69 73 2d 3e 73 6f 75 72 63 65 73 20 3d 20 24 73 6f 75 72 63 65 73 3b 0a 24 | le;.$this->sources.=.$sources;.$ |
db20 | 74 68 69 73 2d 3e 72 65 70 6f 72 74 65 64 41 74 20 3d 20 24 72 65 70 6f 72 74 65 64 41 74 3b 0a | this->reportedAt.=.$reportedAt;. |
db40 | 24 74 68 69 73 2d 3e 63 76 65 20 3d 20 24 63 76 65 3b 0a 24 74 68 69 73 2d 3e 6c 69 6e 6b 20 3d | $this->cve.=.$cve;.$this->link.= |
db60 | 20 24 6c 69 6e 6b 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 | .$link;.}.}.<?php.declare(strict |
db80 | 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 | _types=1);............namespace. |
dba0 | 43 6f 6d 70 6f 73 65 72 5c 41 75 74 6f 6c 6f 61 64 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 | Composer\Autoload;..use.Composer |
dbc0 | 5c 43 6c 61 73 73 4d 61 70 47 65 6e 65 72 61 74 6f 72 5c 43 6c 61 73 73 4d 61 70 3b 0a 75 73 65 | \ClassMapGenerator\ClassMap;.use |
dbe0 | 20 43 6f 6d 70 6f 73 65 72 5c 43 6c 61 73 73 4d 61 70 47 65 6e 65 72 61 74 6f 72 5c 43 6c 61 73 | .Composer\ClassMapGenerator\Clas |
dc00 | 73 4d 61 70 47 65 6e 65 72 61 74 6f 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 66 | sMapGenerator;.use.Composer\Conf |
dc20 | 69 67 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 | ig;.use.Composer\EventDispatcher |
dc40 | 5c 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 46 | \EventDispatcher;.use.Composer\F |
dc60 | 69 6c 74 65 72 5c 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 5c | ilter\PlatformRequirementFilter\ |
dc80 | 49 67 6e 6f 72 65 41 6c 6c 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 | IgnoreAllPlatformRequirementFilt |
dca0 | 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 46 69 6c 74 65 72 5c 50 6c 61 74 66 6f 72 6d | er;.use.Composer\Filter\Platform |
dcc0 | 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 5c 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 | RequirementFilter\PlatformRequir |
dce0 | 65 6d 65 6e 74 46 69 6c 74 65 72 46 61 63 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 | ementFilterFactory;.use.Composer |
dd00 | 5c 46 69 6c 74 65 72 5c 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 | \Filter\PlatformRequirementFilte |
dd20 | 72 5c 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 49 6e 74 65 72 | r\PlatformRequirementFilterInter |
dd40 | 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 6e 73 74 61 6c 6c 65 72 5c 49 6e 73 | face;.use.Composer\Installer\Ins |
dd60 | 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 | tallationManager;.use.Composer\I |
dd80 | 4f 5c 49 4f 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 4f 5c 4e | O\IOInterface;.use.Composer\IO\N |
dda0 | 75 6c 6c 49 4f 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 41 6c 69 61 | ullIO;.use.Composer\Package\Alia |
ddc0 | 73 50 61 63 6b 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 50 | sPackage;.use.Composer\Package\P |
dde0 | 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 | ackageInterface;.use.Composer\Pa |
de00 | 63 6b 61 67 65 5c 52 6f 6f 74 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 | ckage\RootPackageInterface;.use. |
de20 | 43 6f 6d 70 6f 73 65 72 5c 50 63 72 65 5c 50 72 65 67 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 | Composer\Pcre\Preg;.use.Composer |
de40 | 5c 52 65 70 6f 73 69 74 6f 72 79 5c 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 49 | \Repository\InstalledRepositoryI |
de60 | 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 65 6d 76 65 72 5c 43 6f | nterface;.use.Composer\Semver\Co |
de80 | 6e 73 74 72 61 69 6e 74 5c 42 6f 75 6e 64 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 | nstraint\Bound;.use.Composer\Uti |
dea0 | 6c 5c 46 69 6c 65 73 79 73 74 65 6d 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c | l\Filesystem;.use.Composer\Util\ |
dec0 | 50 6c 61 74 66 6f 72 6d 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 63 72 69 70 74 5c 53 63 | Platform;.use.Composer\Script\Sc |
dee0 | 72 69 70 74 45 76 65 6e 74 73 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 61 | riptEvents;.use.Composer\Util\Pa |
df00 | 63 6b 61 67 65 53 6f 72 74 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 4a 73 6f 6e 5c 4a | ckageSorter;.use.Composer\Json\J |
df20 | 73 6f 6e 46 69 6c 65 3b 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 41 75 74 6f 6c 6f 61 64 47 65 6e 65 | sonFile;......class.AutoloadGene |
df40 | 72 61 74 6f 72 0a 7b 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 65 76 65 6e 74 44 69 73 70 61 74 63 | rator.{....private.$eventDispatc |
df60 | 68 65 72 3b 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 69 6f 3b 0a 0a 0a 0a 0a 70 72 69 76 61 74 | her;.....private.$io;.....privat |
df80 | 65 20 24 64 65 76 4d 6f 64 65 20 3d 20 6e 75 6c 6c 3b 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 | e.$devMode.=.null;.....private.$ |
dfa0 | 63 6c 61 73 73 4d 61 70 41 75 74 68 6f 72 69 74 61 74 69 76 65 20 3d 20 66 61 6c 73 65 3b 0a 0a | classMapAuthoritative.=.false;.. |
dfc0 | 0a 0a 0a 70 72 69 76 61 74 65 20 24 61 70 63 75 20 3d 20 66 61 6c 73 65 3b 0a 0a 0a 0a 0a 70 72 | ...private.$apcu.=.false;.....pr |
dfe0 | 69 76 61 74 65 20 24 61 70 63 75 50 72 65 66 69 78 3b 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 | ivate.$apcuPrefix;.....private.$ |
e000 | 72 75 6e 53 63 72 69 70 74 73 20 3d 20 66 61 6c 73 65 3b 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 | runScripts.=.false;.....private. |
e020 | 24 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 3b 0a 0a 70 75 62 | $platformRequirementFilter;..pub |
e040 | 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 45 76 65 6e 74 44 69 | lic.function.__construct(EventDi |
e060 | 73 70 61 74 63 68 65 72 20 24 65 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 2c 20 3f 49 4f 49 6e | spatcher.$eventDispatcher,.?IOIn |
e080 | 74 65 72 66 61 63 65 20 24 69 6f 20 3d 20 6e 75 6c 6c 29 0a 7b 0a 24 74 68 69 73 2d 3e 65 76 65 | terface.$io.=.null).{.$this->eve |
e0a0 | 6e 74 44 69 73 70 61 74 63 68 65 72 20 3d 20 24 65 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 3b | ntDispatcher.=.$eventDispatcher; |
e0c0 | 0a 24 74 68 69 73 2d 3e 69 6f 20 3d 20 24 69 6f 20 3f 3f 20 6e 65 77 20 4e 75 6c 6c 49 4f 28 29 | .$this->io.=.$io.??.new.NullIO() |
e0e0 | 3b 0a 0a 24 74 68 69 73 2d 3e 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c | ;..$this->platformRequirementFil |
e100 | 74 65 72 20 3d 20 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 46 | ter.=.PlatformRequirementFilterF |
e120 | 61 63 74 6f 72 79 3a 3a 69 67 6e 6f 72 65 4e 6f 74 68 69 6e 67 28 29 3b 0a 7d 0a 0a 0a 0a 0a 70 | actory::ignoreNothing();.}.....p |
e140 | 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 44 65 76 4d 6f 64 65 28 62 6f 6f 6c 20 24 | ublic.function.setDevMode(bool.$ |
e160 | 64 65 76 4d 6f 64 65 20 3d 20 74 72 75 65 29 0a 7b 0a 24 74 68 69 73 2d 3e 64 65 76 4d 6f 64 65 | devMode.=.true).{.$this->devMode |
e180 | 20 3d 20 24 64 65 76 4d 6f 64 65 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 | .=.$devMode;.}.......public.func |
e1a0 | 74 69 6f 6e 20 73 65 74 43 6c 61 73 73 4d 61 70 41 75 74 68 6f 72 69 74 61 74 69 76 65 28 62 6f | tion.setClassMapAuthoritative(bo |
e1c0 | 6f 6c 20 24 63 6c 61 73 73 4d 61 70 41 75 74 68 6f 72 69 74 61 74 69 76 65 29 0a 7b 0a 24 74 68 | ol.$classMapAuthoritative).{.$th |
e1e0 | 69 73 2d 3e 63 6c 61 73 73 4d 61 70 41 75 74 68 6f 72 69 74 61 74 69 76 65 20 3d 20 24 63 6c 61 | is->classMapAuthoritative.=.$cla |
e200 | 73 73 4d 61 70 41 75 74 68 6f 72 69 74 61 74 69 76 65 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c | ssMapAuthoritative;.}.......publ |
e220 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 41 70 63 75 28 62 6f 6f 6c 20 24 61 70 63 75 2c 20 | ic.function.setApcu(bool.$apcu,. |
e240 | 3f 73 74 72 69 6e 67 20 24 61 70 63 75 50 72 65 66 69 78 20 3d 20 6e 75 6c 6c 29 0a 7b 0a 24 74 | ?string.$apcuPrefix.=.null).{.$t |
e260 | 68 69 73 2d 3e 61 70 63 75 20 3d 20 24 61 70 63 75 3b 0a 24 74 68 69 73 2d 3e 61 70 63 75 50 72 | his->apcu.=.$apcu;.$this->apcuPr |
e280 | 65 66 69 78 20 3d 20 24 61 70 63 75 50 72 65 66 69 78 20 21 3d 3d 20 6e 75 6c 6c 20 3f 20 24 61 | efix.=.$apcuPrefix.!==.null.?.$a |
e2a0 | 70 63 75 50 72 65 66 69 78 20 3a 20 24 61 70 63 75 50 72 65 66 69 78 3b 0a 7d 0a 0a 0a 0a 0a 0a | pcuPrefix.:.$apcuPrefix;.}...... |
e2c0 | 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 52 75 6e 53 63 72 69 70 74 73 28 62 | .public.function.setRunScripts(b |
e2e0 | 6f 6f 6c 20 24 72 75 6e 53 63 72 69 70 74 73 20 3d 20 74 72 75 65 29 0a 7b 0a 24 74 68 69 73 2d | ool.$runScripts.=.true).{.$this- |
e300 | 3e 72 75 6e 53 63 72 69 70 74 73 20 3d 20 24 72 75 6e 53 63 72 69 70 74 73 3b 0a 7d 0a 0a 0a 0a | >runScripts.=.$runScripts;.}.... |
e320 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 49 67 6e | ..........public.function.setIgn |
e340 | 6f 72 65 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 73 28 24 69 67 6e 6f 72 65 50 | orePlatformRequirements($ignoreP |
e360 | 6c 61 74 66 6f 72 6d 52 65 71 73 29 0a 7b 0a 74 72 69 67 67 65 72 5f 65 72 72 6f 72 28 27 41 75 | latformReqs).{.trigger_error('Au |
e380 | 74 6f 6c 6f 61 64 47 65 6e 65 72 61 74 6f 72 3a 3a 73 65 74 49 67 6e 6f 72 65 50 6c 61 74 66 6f | toloadGenerator::setIgnorePlatfo |
e3a0 | 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 73 20 69 73 20 64 65 70 72 65 63 61 74 65 64 20 73 69 6e | rmRequirements.is.deprecated.sin |
e3c0 | 63 65 20 43 6f 6d 70 6f 73 65 72 20 32 2e 32 2c 20 75 73 65 20 73 65 74 50 6c 61 74 66 6f 72 6d | ce.Composer.2.2,.use.setPlatform |
e3e0 | 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 20 69 6e 73 74 65 61 64 2e 27 2c 20 45 5f 55 | RequirementFilter.instead.',.E_U |
e400 | 53 45 52 5f 44 45 50 52 45 43 41 54 45 44 29 3b 0a 0a 24 74 68 69 73 2d 3e 73 65 74 50 6c 61 74 | SER_DEPRECATED);..$this->setPlat |
e420 | 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 28 50 6c 61 74 66 6f 72 6d 52 65 | formRequirementFilter(PlatformRe |
e440 | 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 46 61 63 74 6f 72 79 3a 3a 66 72 6f 6d 42 6f 6f 6c | quirementFilterFactory::fromBool |
e460 | 4f 72 4c 69 73 74 28 24 69 67 6e 6f 72 65 50 6c 61 74 66 6f 72 6d 52 65 71 73 29 29 3b 0a 7d 0a | OrList($ignorePlatformReqs));.}. |
e480 | 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 50 6c 61 74 66 6f 72 6d 52 | ....public.function.setPlatformR |
e4a0 | 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 28 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 | equirementFilter(PlatformRequire |
e4c0 | 6d 65 6e 74 46 69 6c 74 65 72 49 6e 74 65 72 66 61 63 65 20 24 70 6c 61 74 66 6f 72 6d 52 65 71 | mentFilterInterface.$platformReq |
e4e0 | 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 29 0a 7b 0a 24 74 68 69 73 2d 3e 70 6c 61 74 66 6f 72 | uirementFilter).{.$this->platfor |
e500 | 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 20 3d 20 24 70 6c 61 74 66 6f 72 6d 52 65 | mRequirementFilter.=.$platformRe |
e520 | 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 | quirementFilter;.}.......public. |
e540 | 66 75 6e 63 74 69 6f 6e 20 64 75 6d 70 28 43 6f 6e 66 69 67 20 24 63 6f 6e 66 69 67 2c 20 49 6e | function.dump(Config.$config,.In |
e560 | 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 20 24 6c 6f 63 61 | stalledRepositoryInterface.$loca |
e580 | 6c 52 65 70 6f 2c 20 52 6f 6f 74 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 72 6f 6f | lRepo,.RootPackageInterface.$roo |
e5a0 | 74 50 61 63 6b 61 67 65 2c 20 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 72 20 24 69 | tPackage,.InstallationManager.$i |
e5c0 | 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 72 2c 20 73 74 72 69 6e 67 20 24 74 61 72 67 | nstallationManager,.string.$targ |
e5e0 | 65 74 44 69 72 2c 20 62 6f 6f 6c 20 24 73 63 61 6e 50 73 72 50 61 63 6b 61 67 65 73 20 3d 20 66 | etDir,.bool.$scanPsrPackages.=.f |
e600 | 61 6c 73 65 2c 20 3f 73 74 72 69 6e 67 20 24 73 75 66 66 69 78 20 3d 20 6e 75 6c 6c 29 0a 7b 0a | alse,.?string.$suffix.=.null).{. |
e620 | 69 66 20 28 24 74 68 69 73 2d 3e 63 6c 61 73 73 4d 61 70 41 75 74 68 6f 72 69 74 61 74 69 76 65 | if.($this->classMapAuthoritative |
e640 | 29 20 7b 0a 0a 24 73 63 61 6e 50 73 72 50 61 63 6b 61 67 65 73 20 3d 20 74 72 75 65 3b 0a 7d 0a | ).{..$scanPsrPackages.=.true;.}. |
e660 | 0a 0a 69 66 20 28 6e 75 6c 6c 20 3d 3d 3d 20 24 74 68 69 73 2d 3e 64 65 76 4d 6f 64 65 29 20 7b | ..if.(null.===.$this->devMode).{ |
e680 | 0a 0a 24 74 68 69 73 2d 3e 64 65 76 4d 6f 64 65 20 3d 20 66 61 6c 73 65 3b 0a 0a 24 69 6e 73 74 | ..$this->devMode.=.false;..$inst |
e6a0 | 61 6c 6c 65 64 4a 73 6f 6e 20 3d 20 6e 65 77 20 4a 73 6f 6e 46 69 6c 65 28 24 63 6f 6e 66 69 67 | alledJson.=.new.JsonFile($config |
e6c0 | 2d 3e 67 65 74 28 27 76 65 6e 64 6f 72 2d 64 69 72 27 29 2e 27 2f 63 6f 6d 70 6f 73 65 72 2f 69 | ->get('vendor-dir').'/composer/i |
e6e0 | 6e 73 74 61 6c 6c 65 64 2e 6a 73 6f 6e 27 29 3b 0a 69 66 20 28 24 69 6e 73 74 61 6c 6c 65 64 4a | nstalled.json');.if.($installedJ |
e700 | 73 6f 6e 2d 3e 65 78 69 73 74 73 28 29 29 20 7b 0a 24 69 6e 73 74 61 6c 6c 65 64 4a 73 6f 6e 20 | son->exists()).{.$installedJson. |
e720 | 3d 20 24 69 6e 73 74 61 6c 6c 65 64 4a 73 6f 6e 2d 3e 72 65 61 64 28 29 3b 0a 69 66 20 28 69 73 | =.$installedJson->read();.if.(is |
e740 | 73 65 74 28 24 69 6e 73 74 61 6c 6c 65 64 4a 73 6f 6e 5b 27 64 65 76 27 5d 29 29 20 7b 0a 24 74 | set($installedJson['dev'])).{.$t |
e760 | 68 69 73 2d 3e 64 65 76 4d 6f 64 65 20 3d 20 24 69 6e 73 74 61 6c 6c 65 64 4a 73 6f 6e 5b 27 64 | his->devMode.=.$installedJson['d |
e780 | 65 76 27 5d 3b 0a 7d 0a 7d 0a 7d 0a 0a 69 66 20 28 24 74 68 69 73 2d 3e 72 75 6e 53 63 72 69 70 | ev'];.}.}.}..if.($this->runScrip |
e7a0 | 74 73 29 20 7b 0a 0a 69 66 20 28 21 69 73 73 65 74 28 24 5f 53 45 52 56 45 52 5b 27 43 4f 4d 50 | ts).{..if.(!isset($_SERVER['COMP |
e7c0 | 4f 53 45 52 5f 44 45 56 5f 4d 4f 44 45 27 5d 29 29 20 7b 0a 50 6c 61 74 66 6f 72 6d 3a 3a 70 75 | OSER_DEV_MODE'])).{.Platform::pu |
e7e0 | 74 45 6e 76 28 27 43 4f 4d 50 4f 53 45 52 5f 44 45 56 5f 4d 4f 44 45 27 2c 20 24 74 68 69 73 2d | tEnv('COMPOSER_DEV_MODE',.$this- |
e800 | 3e 64 65 76 4d 6f 64 65 20 3f 20 27 31 27 20 3a 20 27 30 27 29 3b 0a 7d 0a 0a 24 74 68 69 73 2d | >devMode.?.'1'.:.'0');.}..$this- |
e820 | 3e 65 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 2d 3e 64 69 73 70 61 74 63 68 53 63 72 69 70 74 | >eventDispatcher->dispatchScript |
e840 | 28 53 63 72 69 70 74 45 76 65 6e 74 73 3a 3a 50 52 45 5f 41 55 54 4f 4c 4f 41 44 5f 44 55 4d 50 | (ScriptEvents::PRE_AUTOLOAD_DUMP |
e860 | 2c 20 24 74 68 69 73 2d 3e 64 65 76 4d 6f 64 65 2c 20 5b 5d 2c 20 5b 0a 27 6f 70 74 69 6d 69 7a | ,.$this->devMode,.[],.[.'optimiz |
e880 | 65 27 20 3d 3e 20 24 73 63 61 6e 50 73 72 50 61 63 6b 61 67 65 73 2c 0a 5d 29 3b 0a 7d 0a 0a 24 | e'.=>.$scanPsrPackages,.]);.}..$ |
e8a0 | 63 6c 61 73 73 4d 61 70 47 65 6e 65 72 61 74 6f 72 20 3d 20 6e 65 77 20 43 6c 61 73 73 4d 61 70 | classMapGenerator.=.new.ClassMap |
e8c0 | 47 65 6e 65 72 61 74 6f 72 28 5b 27 70 68 70 27 2c 20 27 69 6e 63 27 2c 20 27 68 68 27 5d 29 3b | Generator(['php',.'inc',.'hh']); |
e8e0 | 0a 24 63 6c 61 73 73 4d 61 70 47 65 6e 65 72 61 74 6f 72 2d 3e 61 76 6f 69 64 44 75 70 6c 69 63 | .$classMapGenerator->avoidDuplic |
e900 | 61 74 65 53 63 61 6e 73 28 29 3b 0a 0a 24 66 69 6c 65 73 79 73 74 65 6d 20 3d 20 6e 65 77 20 46 | ateScans();..$filesystem.=.new.F |
e920 | 69 6c 65 73 79 73 74 65 6d 28 29 3b 0a 24 66 69 6c 65 73 79 73 74 65 6d 2d 3e 65 6e 73 75 72 65 | ilesystem();.$filesystem->ensure |
e940 | 44 69 72 65 63 74 6f 72 79 45 78 69 73 74 73 28 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 76 65 | DirectoryExists($config->get('ve |
e960 | 6e 64 6f 72 2d 64 69 72 27 29 29 3b 0a 0a 0a 0a 24 62 61 73 65 50 61 74 68 20 3d 20 24 66 69 6c | ndor-dir'));....$basePath.=.$fil |
e980 | 65 73 79 73 74 65 6d 2d 3e 6e 6f 72 6d 61 6c 69 7a 65 50 61 74 68 28 72 65 61 6c 70 61 74 68 28 | esystem->normalizePath(realpath( |
e9a0 | 72 65 61 6c 70 61 74 68 28 50 6c 61 74 66 6f 72 6d 3a 3a 67 65 74 43 77 64 28 29 29 29 29 3b 0a | realpath(Platform::getCwd())));. |
e9c0 | 24 76 65 6e 64 6f 72 50 61 74 68 20 3d 20 24 66 69 6c 65 73 79 73 74 65 6d 2d 3e 6e 6f 72 6d 61 | $vendorPath.=.$filesystem->norma |
e9e0 | 6c 69 7a 65 50 61 74 68 28 72 65 61 6c 70 61 74 68 28 72 65 61 6c 70 61 74 68 28 24 63 6f 6e 66 | lizePath(realpath(realpath($conf |
ea00 | 69 67 2d 3e 67 65 74 28 27 76 65 6e 64 6f 72 2d 64 69 72 27 29 29 29 29 3b 0a 24 75 73 65 47 6c | ig->get('vendor-dir'))));.$useGl |
ea20 | 6f 62 61 6c 49 6e 63 6c 75 64 65 50 61 74 68 20 3d 20 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 | obalIncludePath.=.$config->get(' |
ea40 | 75 73 65 2d 69 6e 63 6c 75 64 65 2d 70 61 74 68 27 29 3b 0a 24 70 72 65 70 65 6e 64 41 75 74 6f | use-include-path');.$prependAuto |
ea60 | 6c 6f 61 64 65 72 20 3d 20 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 70 72 65 70 65 6e 64 2d 61 | loader.=.$config->get('prepend-a |
ea80 | 75 74 6f 6c 6f 61 64 65 72 27 29 20 3d 3d 3d 20 66 61 6c 73 65 20 3f 20 27 66 61 6c 73 65 27 20 | utoloader').===.false.?.'false'. |
eaa0 | 3a 20 27 74 72 75 65 27 3b 0a 24 74 61 72 67 65 74 44 69 72 20 3d 20 24 76 65 6e 64 6f 72 50 61 | :.'true';.$targetDir.=.$vendorPa |
eac0 | 74 68 2e 27 2f 27 2e 24 74 61 72 67 65 74 44 69 72 3b 0a 24 66 69 6c 65 73 79 73 74 65 6d 2d 3e | th.'/'.$targetDir;.$filesystem-> |
eae0 | 65 6e 73 75 72 65 44 69 72 65 63 74 6f 72 79 45 78 69 73 74 73 28 24 74 61 72 67 65 74 44 69 72 | ensureDirectoryExists($targetDir |
eb00 | 29 3b 0a 0a 24 76 65 6e 64 6f 72 50 61 74 68 43 6f 64 65 20 3d 20 24 66 69 6c 65 73 79 73 74 65 | );..$vendorPathCode.=.$filesyste |
eb20 | 6d 2d 3e 66 69 6e 64 53 68 6f 72 74 65 73 74 50 61 74 68 43 6f 64 65 28 72 65 61 6c 70 61 74 68 | m->findShortestPathCode(realpath |
eb40 | 28 24 74 61 72 67 65 74 44 69 72 29 2c 20 24 76 65 6e 64 6f 72 50 61 74 68 2c 20 74 72 75 65 29 | ($targetDir),.$vendorPath,.true) |
eb60 | 3b 0a 24 76 65 6e 64 6f 72 50 61 74 68 54 6f 54 61 72 67 65 74 44 69 72 43 6f 64 65 20 3d 20 24 | ;.$vendorPathToTargetDirCode.=.$ |
eb80 | 66 69 6c 65 73 79 73 74 65 6d 2d 3e 66 69 6e 64 53 68 6f 72 74 65 73 74 50 61 74 68 43 6f 64 65 | filesystem->findShortestPathCode |
eba0 | 28 24 76 65 6e 64 6f 72 50 61 74 68 2c 20 72 65 61 6c 70 61 74 68 28 24 74 61 72 67 65 74 44 69 | ($vendorPath,.realpath($targetDi |
ebc0 | 72 29 2c 20 74 72 75 65 29 3b 0a 0a 24 61 70 70 42 61 73 65 44 69 72 43 6f 64 65 20 3d 20 24 66 | r),.true);..$appBaseDirCode.=.$f |
ebe0 | 69 6c 65 73 79 73 74 65 6d 2d 3e 66 69 6e 64 53 68 6f 72 74 65 73 74 50 61 74 68 43 6f 64 65 28 | ilesystem->findShortestPathCode( |
ec00 | 24 76 65 6e 64 6f 72 50 61 74 68 2c 20 24 62 61 73 65 50 61 74 68 2c 20 74 72 75 65 29 3b 0a 24 | $vendorPath,.$basePath,.true);.$ |
ec20 | 61 70 70 42 61 73 65 44 69 72 43 6f 64 65 20 3d 20 73 74 72 5f 72 65 70 6c 61 63 65 28 27 5f 5f | appBaseDirCode.=.str_replace('__ |
ec40 | 44 49 52 5f 5f 27 2c 20 27 24 76 65 6e 64 6f 72 44 69 72 27 2c 20 24 61 70 70 42 61 73 65 44 69 | DIR__',.'$vendorDir',.$appBaseDi |
ec60 | 72 43 6f 64 65 29 3b 0a 0a 24 6e 61 6d 65 73 70 61 63 65 73 46 69 6c 65 20 3d 20 3c 3c 3c 45 4f | rCode);..$namespacesFile.=.<<<EO |
ec80 | 46 0a 3c 3f 70 68 70 0a 0a 2f 2f 20 61 75 74 6f 6c 6f 61 64 5f 6e 61 6d 65 73 70 61 63 65 73 2e | F.<?php..//.autoload_namespaces. |
eca0 | 70 68 70 20 40 67 65 6e 65 72 61 74 65 64 20 62 79 20 43 6f 6d 70 6f 73 65 72 0a 0a 5c 24 76 65 | php.@generated.by.Composer..\$ve |
ecc0 | 6e 64 6f 72 44 69 72 20 3d 20 24 76 65 6e 64 6f 72 50 61 74 68 43 6f 64 65 3b 0a 5c 24 62 61 73 | ndorDir.=.$vendorPathCode;.\$bas |
ece0 | 65 44 69 72 20 3d 20 24 61 70 70 42 61 73 65 44 69 72 43 6f 64 65 3b 0a 0a 72 65 74 75 72 6e 20 | eDir.=.$appBaseDirCode;..return. |
ed00 | 61 72 72 61 79 28 0a 0a 45 4f 46 3b 0a 0a 24 70 73 72 34 46 69 6c 65 20 3d 20 3c 3c 3c 45 4f 46 | array(..EOF;..$psr4File.=.<<<EOF |
ed20 | 0a 3c 3f 70 68 70 0a 0a 2f 2f 20 61 75 74 6f 6c 6f 61 64 5f 70 73 72 34 2e 70 68 70 20 40 67 65 | .<?php..//.autoload_psr4.php.@ge |
ed40 | 6e 65 72 61 74 65 64 20 62 79 20 43 6f 6d 70 6f 73 65 72 0a 0a 5c 24 76 65 6e 64 6f 72 44 69 72 | nerated.by.Composer..\$vendorDir |
ed60 | 20 3d 20 24 76 65 6e 64 6f 72 50 61 74 68 43 6f 64 65 3b 0a 5c 24 62 61 73 65 44 69 72 20 3d 20 | .=.$vendorPathCode;.\$baseDir.=. |
ed80 | 24 61 70 70 42 61 73 65 44 69 72 43 6f 64 65 3b 0a 0a 72 65 74 75 72 6e 20 61 72 72 61 79 28 0a | $appBaseDirCode;..return.array(. |
eda0 | 0a 45 4f 46 3b 0a 0a 0a 24 64 65 76 50 61 63 6b 61 67 65 4e 61 6d 65 73 20 3d 20 24 6c 6f 63 61 | .EOF;...$devPackageNames.=.$loca |
edc0 | 6c 52 65 70 6f 2d 3e 67 65 74 44 65 76 50 61 63 6b 61 67 65 4e 61 6d 65 73 28 29 3b 0a 24 70 61 | lRepo->getDevPackageNames();.$pa |
ede0 | 63 6b 61 67 65 4d 61 70 20 3d 20 24 74 68 69 73 2d 3e 62 75 69 6c 64 50 61 63 6b 61 67 65 4d 61 | ckageMap.=.$this->buildPackageMa |
ee00 | 70 28 24 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 72 2c 20 24 72 6f 6f 74 50 61 63 | p($installationManager,.$rootPac |
ee20 | 6b 61 67 65 2c 20 24 6c 6f 63 61 6c 52 65 70 6f 2d 3e 67 65 74 43 61 6e 6f 6e 69 63 61 6c 50 61 | kage,.$localRepo->getCanonicalPa |
ee40 | 63 6b 61 67 65 73 28 29 29 3b 0a 69 66 20 28 24 74 68 69 73 2d 3e 64 65 76 4d 6f 64 65 29 20 7b | ckages());.if.($this->devMode).{ |
ee60 | 0a 0a 24 66 69 6c 74 65 72 65 64 44 65 76 50 61 63 6b 61 67 65 73 20 3d 20 66 61 6c 73 65 3b 0a | ..$filteredDevPackages.=.false;. |
ee80 | 7d 20 65 6c 73 65 20 7b 0a 0a 24 66 69 6c 74 65 72 65 64 44 65 76 50 61 63 6b 61 67 65 73 20 3d | }.else.{..$filteredDevPackages.= |
eea0 | 20 24 64 65 76 50 61 63 6b 61 67 65 4e 61 6d 65 73 20 3f 3a 20 74 72 75 65 3b 0a 7d 0a 24 61 75 | .$devPackageNames.?:.true;.}.$au |
eec0 | 74 6f 6c 6f 61 64 73 20 3d 20 24 74 68 69 73 2d 3e 70 61 72 73 65 41 75 74 6f 6c 6f 61 64 73 28 | toloads.=.$this->parseAutoloads( |
eee0 | 24 70 61 63 6b 61 67 65 4d 61 70 2c 20 24 72 6f 6f 74 50 61 63 6b 61 67 65 2c 20 24 66 69 6c 74 | $packageMap,.$rootPackage,.$filt |
ef00 | 65 72 65 64 44 65 76 50 61 63 6b 61 67 65 73 29 3b 0a 0a 0a 66 6f 72 65 61 63 68 20 28 24 61 75 | eredDevPackages);...foreach.($au |
ef20 | 74 6f 6c 6f 61 64 73 5b 27 70 73 72 2d 30 27 5d 20 61 73 20 24 6e 61 6d 65 73 70 61 63 65 20 3d | toloads['psr-0'].as.$namespace.= |
ef40 | 3e 20 24 70 61 74 68 73 29 20 7b 0a 24 65 78 70 6f 72 74 65 64 50 61 74 68 73 20 3d 20 5b 5d 3b | >.$paths).{.$exportedPaths.=.[]; |
ef60 | 0a 66 6f 72 65 61 63 68 20 28 24 70 61 74 68 73 20 61 73 20 24 70 61 74 68 29 20 7b 0a 24 65 78 | .foreach.($paths.as.$path).{.$ex |
ef80 | 70 6f 72 74 65 64 50 61 74 68 73 5b 5d 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 50 61 74 68 43 6f | portedPaths[].=.$this->getPathCo |
efa0 | 64 65 28 24 66 69 6c 65 73 79 73 74 65 6d 2c 20 24 62 61 73 65 50 61 74 68 2c 20 24 76 65 6e 64 | de($filesystem,.$basePath,.$vend |
efc0 | 6f 72 50 61 74 68 2c 20 24 70 61 74 68 29 3b 0a 7d 0a 24 65 78 70 6f 72 74 65 64 50 72 65 66 69 | orPath,.$path);.}.$exportedPrefi |
efe0 | 78 20 3d 20 76 61 72 5f 65 78 70 6f 72 74 28 24 6e 61 6d 65 73 70 61 63 65 2c 20 74 72 75 65 29 | x.=.var_export($namespace,.true) |
f000 | 3b 0a 24 6e 61 6d 65 73 70 61 63 65 73 46 69 6c 65 20 2e 3d 20 22 20 20 20 20 24 65 78 70 6f 72 | ;.$namespacesFile..=."....$expor |
f020 | 74 65 64 50 72 65 66 69 78 20 3d 3e 20 22 3b 0a 24 6e 61 6d 65 73 70 61 63 65 73 46 69 6c 65 20 | tedPrefix.=>.";.$namespacesFile. |
f040 | 2e 3d 20 22 61 72 72 61 79 28 22 2e 69 6d 70 6c 6f 64 65 28 27 2c 20 27 2c 20 24 65 78 70 6f 72 | .=."array(".implode(',.',.$expor |
f060 | 74 65 64 50 61 74 68 73 29 2e 22 29 2c 5c 6e 22 3b 0a 7d 0a 24 6e 61 6d 65 73 70 61 63 65 73 46 | tedPaths)."),\n";.}.$namespacesF |
f080 | 69 6c 65 20 2e 3d 20 22 29 3b 5c 6e 22 3b 0a 0a 0a 66 6f 72 65 61 63 68 20 28 24 61 75 74 6f 6c | ile..=.");\n";...foreach.($autol |
f0a0 | 6f 61 64 73 5b 27 70 73 72 2d 34 27 5d 20 61 73 20 24 6e 61 6d 65 73 70 61 63 65 20 3d 3e 20 24 | oads['psr-4'].as.$namespace.=>.$ |
f0c0 | 70 61 74 68 73 29 20 7b 0a 24 65 78 70 6f 72 74 65 64 50 61 74 68 73 20 3d 20 5b 5d 3b 0a 66 6f | paths).{.$exportedPaths.=.[];.fo |
f0e0 | 72 65 61 63 68 20 28 24 70 61 74 68 73 20 61 73 20 24 70 61 74 68 29 20 7b 0a 24 65 78 70 6f 72 | reach.($paths.as.$path).{.$expor |
f100 | 74 65 64 50 61 74 68 73 5b 5d 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 50 61 74 68 43 6f 64 65 28 | tedPaths[].=.$this->getPathCode( |
f120 | 24 66 69 6c 65 73 79 73 74 65 6d 2c 20 24 62 61 73 65 50 61 74 68 2c 20 24 76 65 6e 64 6f 72 50 | $filesystem,.$basePath,.$vendorP |
f140 | 61 74 68 2c 20 24 70 61 74 68 29 3b 0a 7d 0a 24 65 78 70 6f 72 74 65 64 50 72 65 66 69 78 20 3d | ath,.$path);.}.$exportedPrefix.= |
f160 | 20 76 61 72 5f 65 78 70 6f 72 74 28 24 6e 61 6d 65 73 70 61 63 65 2c 20 74 72 75 65 29 3b 0a 24 | .var_export($namespace,.true);.$ |
f180 | 70 73 72 34 46 69 6c 65 20 2e 3d 20 22 20 20 20 20 24 65 78 70 6f 72 74 65 64 50 72 65 66 69 78 | psr4File..=."....$exportedPrefix |
f1a0 | 20 3d 3e 20 22 3b 0a 24 70 73 72 34 46 69 6c 65 20 2e 3d 20 22 61 72 72 61 79 28 22 2e 69 6d 70 | .=>.";.$psr4File..=."array(".imp |
f1c0 | 6c 6f 64 65 28 27 2c 20 27 2c 20 24 65 78 70 6f 72 74 65 64 50 61 74 68 73 29 2e 22 29 2c 5c 6e | lode(',.',.$exportedPaths)."),\n |
f1e0 | 22 3b 0a 7d 0a 24 70 73 72 34 46 69 6c 65 20 2e 3d 20 22 29 3b 5c 6e 22 3b 0a 0a 0a 24 74 61 72 | ";.}.$psr4File..=.");\n";...$tar |
f200 | 67 65 74 44 69 72 4c 6f 61 64 65 72 20 3d 20 6e 75 6c 6c 3b 0a 24 6d 61 69 6e 41 75 74 6f 6c 6f | getDirLoader.=.null;.$mainAutolo |
f220 | 61 64 20 3d 20 24 72 6f 6f 74 50 61 63 6b 61 67 65 2d 3e 67 65 74 41 75 74 6f 6c 6f 61 64 28 29 | ad.=.$rootPackage->getAutoload() |
f240 | 3b 0a 69 66 20 28 24 72 6f 6f 74 50 61 63 6b 61 67 65 2d 3e 67 65 74 54 61 72 67 65 74 44 69 72 | ;.if.($rootPackage->getTargetDir |
f260 | 28 29 20 26 26 20 21 65 6d 70 74 79 28 24 6d 61 69 6e 41 75 74 6f 6c 6f 61 64 5b 27 70 73 72 2d | ().&&.!empty($mainAutoload['psr- |
f280 | 30 27 5d 29 29 20 7b 0a 24 6c 65 76 65 6c 73 20 3d 20 73 75 62 73 74 72 5f 63 6f 75 6e 74 28 24 | 0'])).{.$levels.=.substr_count($ |
f2a0 | 66 69 6c 65 73 79 73 74 65 6d 2d 3e 6e 6f 72 6d 61 6c 69 7a 65 50 61 74 68 28 24 72 6f 6f 74 50 | filesystem->normalizePath($rootP |
f2c0 | 61 63 6b 61 67 65 2d 3e 67 65 74 54 61 72 67 65 74 44 69 72 28 29 29 2c 20 27 2f 27 29 20 2b 20 | ackage->getTargetDir()),.'/').+. |
f2e0 | 31 3b 0a 24 70 72 65 66 69 78 65 73 20 3d 20 69 6d 70 6c 6f 64 65 28 27 2c 20 27 2c 20 61 72 72 | 1;.$prefixes.=.implode(',.',.arr |
f300 | 61 79 5f 6d 61 70 28 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 70 72 65 66 69 78 29 | ay_map(static.function.($prefix) |
f320 | 3a 20 73 74 72 69 6e 67 20 7b 0a 72 65 74 75 72 6e 20 76 61 72 5f 65 78 70 6f 72 74 28 24 70 72 | :.string.{.return.var_export($pr |
f340 | 65 66 69 78 2c 20 74 72 75 65 29 3b 0a 7d 2c 20 61 72 72 61 79 5f 6b 65 79 73 28 24 6d 61 69 6e | efix,.true);.},.array_keys($main |
f360 | 41 75 74 6f 6c 6f 61 64 5b 27 70 73 72 2d 30 27 5d 29 29 29 3b 0a 24 62 61 73 65 44 69 72 46 72 | Autoload['psr-0'])));.$baseDirFr |
f380 | 6f 6d 54 61 72 67 65 74 44 69 72 43 6f 64 65 20 3d 20 24 66 69 6c 65 73 79 73 74 65 6d 2d 3e 66 | omTargetDirCode.=.$filesystem->f |
f3a0 | 69 6e 64 53 68 6f 72 74 65 73 74 50 61 74 68 43 6f 64 65 28 24 74 61 72 67 65 74 44 69 72 2c 20 | indShortestPathCode($targetDir,. |
f3c0 | 24 62 61 73 65 50 61 74 68 2c 20 74 72 75 65 29 3b 0a 0a 24 74 61 72 67 65 74 44 69 72 4c 6f 61 | $basePath,.true);..$targetDirLoa |
f3e0 | 64 65 72 20 3d 20 3c 3c 3c 45 4f 46 0a 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 | der.=.<<<EOF......public.static. |
f400 | 66 75 6e 63 74 69 6f 6e 20 61 75 74 6f 6c 6f 61 64 28 5c 24 63 6c 61 73 73 29 0a 20 20 20 20 7b | function.autoload(\$class).....{ |
f420 | 0a 20 20 20 20 20 20 20 20 5c 24 64 69 72 20 3d 20 24 62 61 73 65 44 69 72 46 72 6f 6d 54 61 72 | .........\$dir.=.$baseDirFromTar |
f440 | 67 65 74 44 69 72 43 6f 64 65 20 2e 20 27 2f 27 3b 0a 20 20 20 20 20 20 20 20 5c 24 70 72 65 66 | getDirCode...'/';.........\$pref |
f460 | 69 78 65 73 20 3d 20 61 72 72 61 79 28 24 70 72 65 66 69 78 65 73 29 3b 0a 20 20 20 20 20 20 20 | ixes.=.array($prefixes);........ |
f480 | 20 66 6f 72 65 61 63 68 20 28 5c 24 70 72 65 66 69 78 65 73 20 61 73 20 5c 24 70 72 65 66 69 78 | .foreach.(\$prefixes.as.\$prefix |
f4a0 | 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 30 20 21 3d 3d 20 73 74 72 70 6f 73 | ).{.............if.(0.!==.strpos |
f4c0 | 28 5c 24 63 6c 61 73 73 2c 20 5c 24 70 72 65 66 69 78 29 29 20 7b 0a 20 20 20 20 20 20 20 20 20 | (\$class,.\$prefix)).{.......... |
f4e0 | 20 20 20 20 20 20 20 63 6f 6e 74 69 6e 75 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 20 | .......continue;.............}.. |
f500 | 20 20 20 20 20 20 20 20 20 20 20 5c 24 70 61 74 68 20 3d 20 5c 24 64 69 72 20 2e 20 69 6d 70 6c | ...........\$path.=.\$dir...impl |
f520 | 6f 64 65 28 27 2f 27 2c 20 61 72 72 61 79 5f 73 6c 69 63 65 28 65 78 70 6c 6f 64 65 28 27 5c 5c | ode('/',.array_slice(explode('\\ |
f540 | 5c 5c 27 2c 20 5c 24 63 6c 61 73 73 29 2c 20 24 6c 65 76 65 6c 73 29 29 2e 27 2e 70 68 70 27 3b | \\',.\$class),.$levels)).'.php'; |
f560 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 5c 24 70 61 74 68 20 3d 20 73 74 72 65 61 | .............if.(!\$path.=.strea |
f580 | 6d 5f 72 65 73 6f 6c 76 65 5f 69 6e 63 6c 75 64 65 5f 70 61 74 68 28 5c 24 70 61 74 68 29 29 20 | m_resolve_include_path(\$path)). |
f5a0 | 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a | {.................return.false;. |
f5c0 | 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 71 75 69 72 | ............}.............requir |
f5e0 | 65 20 5c 24 70 61 74 68 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 | e.\$path;..............return.tr |
f600 | 75 65 3b 0a 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 7d 0a 0a 45 4f 46 3b 0a 7d 0a 0a 24 65 78 | ue;.........}.....}..EOF;.}..$ex |
f620 | 63 6c 75 64 65 64 20 3d 20 6e 75 6c 6c 3b 0a 69 66 20 28 21 65 6d 70 74 79 28 24 61 75 74 6f 6c | cluded.=.null;.if.(!empty($autol |
f640 | 6f 61 64 73 5b 27 65 78 63 6c 75 64 65 2d 66 72 6f 6d 2d 63 6c 61 73 73 6d 61 70 27 5d 29 29 20 | oads['exclude-from-classmap'])). |
f660 | 7b 0a 24 65 78 63 6c 75 64 65 64 20 3d 20 24 61 75 74 6f 6c 6f 61 64 73 5b 27 65 78 63 6c 75 64 | {.$excluded.=.$autoloads['exclud |
f680 | 65 2d 66 72 6f 6d 2d 63 6c 61 73 73 6d 61 70 27 5d 3b 0a 7d 0a 0a 66 6f 72 65 61 63 68 20 28 24 | e-from-classmap'];.}..foreach.($ |
f6a0 | 61 75 74 6f 6c 6f 61 64 73 5b 27 63 6c 61 73 73 6d 61 70 27 5d 20 61 73 20 24 64 69 72 29 20 7b | autoloads['classmap'].as.$dir).{ |
f6c0 | 0a 24 63 6c 61 73 73 4d 61 70 47 65 6e 65 72 61 74 6f 72 2d 3e 73 63 61 6e 50 61 74 68 73 28 24 | .$classMapGenerator->scanPaths($ |
f6e0 | 64 69 72 2c 20 24 74 68 69 73 2d 3e 62 75 69 6c 64 45 78 63 6c 75 73 69 6f 6e 52 65 67 65 78 28 | dir,.$this->buildExclusionRegex( |
f700 | 24 64 69 72 2c 20 24 65 78 63 6c 75 64 65 64 29 29 3b 0a 7d 0a 0a 69 66 20 28 24 73 63 61 6e 50 | $dir,.$excluded));.}..if.($scanP |
f720 | 73 72 50 61 63 6b 61 67 65 73 29 20 7b 0a 24 6e 61 6d 65 73 70 61 63 65 73 54 6f 53 63 61 6e 20 | srPackages).{.$namespacesToScan. |
f740 | 3d 20 5b 5d 3b 0a 0a 0a 66 6f 72 65 61 63 68 20 28 5b 27 70 73 72 2d 34 27 2c 20 27 70 73 72 2d | =.[];...foreach.(['psr-4',.'psr- |
f760 | 30 27 5d 20 61 73 20 24 70 73 72 54 79 70 65 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 61 75 74 | 0'].as.$psrType).{.foreach.($aut |
f780 | 6f 6c 6f 61 64 73 5b 24 70 73 72 54 79 70 65 5d 20 61 73 20 24 6e 61 6d 65 73 70 61 63 65 20 3d | oloads[$psrType].as.$namespace.= |
f7a0 | 3e 20 24 70 61 74 68 73 29 20 7b 0a 24 6e 61 6d 65 73 70 61 63 65 73 54 6f 53 63 61 6e 5b 24 6e | >.$paths).{.$namespacesToScan[$n |
f7c0 | 61 6d 65 73 70 61 63 65 5d 5b 5d 20 3d 20 5b 27 70 61 74 68 73 27 20 3d 3e 20 24 70 61 74 68 73 | amespace][].=.['paths'.=>.$paths |
f7e0 | 2c 20 27 74 79 70 65 27 20 3d 3e 20 24 70 73 72 54 79 70 65 5d 3b 0a 7d 0a 7d 0a 0a 6b 72 73 6f | ,.'type'.=>.$psrType];.}.}..krso |
f800 | 72 74 28 24 6e 61 6d 65 73 70 61 63 65 73 54 6f 53 63 61 6e 29 3b 0a 0a 66 6f 72 65 61 63 68 20 | rt($namespacesToScan);..foreach. |
f820 | 28 24 6e 61 6d 65 73 70 61 63 65 73 54 6f 53 63 61 6e 20 61 73 20 24 6e 61 6d 65 73 70 61 63 65 | ($namespacesToScan.as.$namespace |
f840 | 20 3d 3e 20 24 67 72 6f 75 70 73 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 67 72 6f 75 70 73 20 | .=>.$groups).{.foreach.($groups. |
f860 | 61 73 20 24 67 72 6f 75 70 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 67 72 6f 75 70 5b 27 70 61 | as.$group).{.foreach.($group['pa |
f880 | 74 68 73 27 5d 20 61 73 20 24 64 69 72 29 20 7b 0a 24 64 69 72 20 3d 20 24 66 69 6c 65 73 79 73 | ths'].as.$dir).{.$dir.=.$filesys |
f8a0 | 74 65 6d 2d 3e 6e 6f 72 6d 61 6c 69 7a 65 50 61 74 68 28 24 66 69 6c 65 73 79 73 74 65 6d 2d 3e | tem->normalizePath($filesystem-> |
f8c0 | 69 73 41 62 73 6f 6c 75 74 65 50 61 74 68 28 24 64 69 72 29 20 3f 20 24 64 69 72 20 3a 20 24 62 | isAbsolutePath($dir).?.$dir.:.$b |
f8e0 | 61 73 65 50 61 74 68 2e 27 2f 27 2e 24 64 69 72 29 3b 0a 69 66 20 28 21 69 73 5f 64 69 72 28 24 | asePath.'/'.$dir);.if.(!is_dir($ |
f900 | 64 69 72 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 24 63 6c 61 73 73 4d 61 70 47 65 | dir)).{.continue;.}..$classMapGe |
f920 | 6e 65 72 61 74 6f 72 2d 3e 73 63 61 6e 50 61 74 68 73 28 24 64 69 72 2c 20 24 74 68 69 73 2d 3e | nerator->scanPaths($dir,.$this-> |
f940 | 62 75 69 6c 64 45 78 63 6c 75 73 69 6f 6e 52 65 67 65 78 28 24 64 69 72 2c 20 24 65 78 63 6c 75 | buildExclusionRegex($dir,.$exclu |
f960 | 64 65 64 29 2c 20 24 67 72 6f 75 70 5b 27 74 79 70 65 27 5d 2c 20 24 6e 61 6d 65 73 70 61 63 65 | ded),.$group['type'],.$namespace |
f980 | 29 3b 0a 7d 0a 7d 0a 7d 0a 7d 0a 0a 24 63 6c 61 73 73 4d 61 70 20 3d 20 24 63 6c 61 73 73 4d 61 | );.}.}.}.}..$classMap.=.$classMa |
f9a0 | 70 47 65 6e 65 72 61 74 6f 72 2d 3e 67 65 74 43 6c 61 73 73 4d 61 70 28 29 3b 0a 66 6f 72 65 61 | pGenerator->getClassMap();.forea |
f9c0 | 63 68 20 28 24 63 6c 61 73 73 4d 61 70 2d 3e 67 65 74 41 6d 62 69 67 75 6f 75 73 43 6c 61 73 73 | ch.($classMap->getAmbiguousClass |
f9e0 | 65 73 28 29 20 61 73 20 24 63 6c 61 73 73 4e 61 6d 65 20 3d 3e 20 24 61 6d 62 69 67 75 6f 75 73 | es().as.$className.=>.$ambiguous |
fa00 | 50 61 74 68 73 29 20 7b 0a 69 66 20 28 63 6f 75 6e 74 28 24 61 6d 62 69 67 75 6f 75 73 50 61 74 | Paths).{.if.(count($ambiguousPat |
fa20 | 68 73 29 20 3e 20 31 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 | hs).>.1).{.$this->io->writeError |
fa40 | 28 0a 27 3c 77 61 72 6e 69 6e 67 3e 57 61 72 6e 69 6e 67 3a 20 41 6d 62 69 67 75 6f 75 73 20 63 | (.'<warning>Warning:.Ambiguous.c |
fa60 | 6c 61 73 73 20 72 65 73 6f 6c 75 74 69 6f 6e 2c 20 22 27 2e 24 63 6c 61 73 73 4e 61 6d 65 2e 27 | lass.resolution,."'.$className.' |
fa80 | 22 27 2e 0a 27 20 77 61 73 20 66 6f 75 6e 64 20 27 2e 20 28 63 6f 75 6e 74 28 24 61 6d 62 69 67 | "'..'.was.found.'..(count($ambig |
faa0 | 75 6f 75 73 50 61 74 68 73 29 20 2b 20 31 29 20 2e 27 78 3a 20 69 6e 20 22 27 2e 24 63 6c 61 73 | uousPaths).+.1)..'x:.in."'.$clas |
fac0 | 73 4d 61 70 2d 3e 67 65 74 43 6c 61 73 73 50 61 74 68 28 24 63 6c 61 73 73 4e 61 6d 65 29 2e 27 | sMap->getClassPath($className).' |
fae0 | 22 20 61 6e 64 20 22 27 2e 20 69 6d 70 6c 6f 64 65 28 27 22 2c 20 22 27 2c 20 24 61 6d 62 69 67 | ".and."'..implode('",."',.$ambig |
fb00 | 75 6f 75 73 50 61 74 68 73 29 20 2e 27 22 2c 20 74 68 65 20 66 69 72 73 74 20 77 69 6c 6c 20 62 | uousPaths)..'",.the.first.will.b |
fb20 | 65 20 75 73 65 64 2e 3c 2f 77 61 72 6e 69 6e 67 3e 27 0a 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 | e.used.</warning>'.);.}.else.{.$ |
fb40 | 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 0a 27 3c 77 61 72 6e 69 6e 67 3e | this->io->writeError(.'<warning> |
fb60 | 57 61 72 6e 69 6e 67 3a 20 41 6d 62 69 67 75 6f 75 73 20 63 6c 61 73 73 20 72 65 73 6f 6c 75 74 | Warning:.Ambiguous.class.resolut |
fb80 | 69 6f 6e 2c 20 22 27 2e 24 63 6c 61 73 73 4e 61 6d 65 2e 27 22 27 2e 0a 27 20 77 61 73 20 66 6f | ion,."'.$className.'"'..'.was.fo |
fba0 | 75 6e 64 20 69 6e 20 62 6f 74 68 20 22 27 2e 24 63 6c 61 73 73 4d 61 70 2d 3e 67 65 74 43 6c 61 | und.in.both."'.$classMap->getCla |
fbc0 | 73 73 50 61 74 68 28 24 63 6c 61 73 73 4e 61 6d 65 29 2e 27 22 20 61 6e 64 20 22 27 2e 20 69 6d | ssPath($className).'".and."'..im |
fbe0 | 70 6c 6f 64 65 28 27 22 2c 20 22 27 2c 20 24 61 6d 62 69 67 75 6f 75 73 50 61 74 68 73 29 20 2e | plode('",."',.$ambiguousPaths).. |
fc00 | 27 22 2c 20 74 68 65 20 66 69 72 73 74 20 77 69 6c 6c 20 62 65 20 75 73 65 64 2e 3c 2f 77 61 72 | '",.the.first.will.be.used.</war |
fc20 | 6e 69 6e 67 3e 27 0a 29 3b 0a 7d 0a 7d 0a 66 6f 72 65 61 63 68 20 28 24 63 6c 61 73 73 4d 61 70 | ning>'.);.}.}.foreach.($classMap |
fc40 | 2d 3e 67 65 74 50 73 72 56 69 6f 6c 61 74 69 6f 6e 73 28 29 20 61 73 20 24 6d 73 67 29 20 7b 0a | ->getPsrViolations().as.$msg).{. |
fc60 | 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 22 3c 77 61 72 6e 69 6e 67 3e | $this->io->writeError("<warning> |
fc80 | 24 6d 73 67 3c 2f 77 61 72 6e 69 6e 67 3e 22 29 3b 0a 7d 0a 0a 24 63 6c 61 73 73 4d 61 70 2d 3e | $msg</warning>");.}..$classMap-> |
fca0 | 61 64 64 43 6c 61 73 73 28 27 43 6f 6d 70 6f 73 65 72 5c 49 6e 73 74 61 6c 6c 65 64 56 65 72 73 | addClass('Composer\InstalledVers |
fcc0 | 69 6f 6e 73 27 2c 20 24 76 65 6e 64 6f 72 50 61 74 68 20 2e 20 27 2f 63 6f 6d 70 6f 73 65 72 2f | ions',.$vendorPath...'/composer/ |
fce0 | 49 6e 73 74 61 6c 6c 65 64 56 65 72 73 69 6f 6e 73 2e 70 68 70 27 29 3b 0a 24 63 6c 61 73 73 4d | InstalledVersions.php');.$classM |
fd00 | 61 70 2d 3e 73 6f 72 74 28 29 3b 0a 0a 24 63 6c 61 73 73 6d 61 70 46 69 6c 65 20 3d 20 3c 3c 3c | ap->sort();..$classmapFile.=.<<< |
fd20 | 45 4f 46 0a 3c 3f 70 68 70 0a 0a 2f 2f 20 61 75 74 6f 6c 6f 61 64 5f 63 6c 61 73 73 6d 61 70 2e | EOF.<?php..//.autoload_classmap. |
fd40 | 70 68 70 20 40 67 65 6e 65 72 61 74 65 64 20 62 79 20 43 6f 6d 70 6f 73 65 72 0a 0a 5c 24 76 65 | php.@generated.by.Composer..\$ve |
fd60 | 6e 64 6f 72 44 69 72 20 3d 20 24 76 65 6e 64 6f 72 50 61 74 68 43 6f 64 65 3b 0a 5c 24 62 61 73 | ndorDir.=.$vendorPathCode;.\$bas |
fd80 | 65 44 69 72 20 3d 20 24 61 70 70 42 61 73 65 44 69 72 43 6f 64 65 3b 0a 0a 72 65 74 75 72 6e 20 | eDir.=.$appBaseDirCode;..return. |
fda0 | 61 72 72 61 79 28 0a 0a 45 4f 46 3b 0a 66 6f 72 65 61 63 68 20 28 24 63 6c 61 73 73 4d 61 70 2d | array(..EOF;.foreach.($classMap- |
fdc0 | 3e 67 65 74 4d 61 70 28 29 20 61 73 20 24 63 6c 61 73 73 4e 61 6d 65 20 3d 3e 20 24 70 61 74 68 | >getMap().as.$className.=>.$path |
fde0 | 29 20 7b 0a 24 70 61 74 68 43 6f 64 65 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 50 61 74 68 43 6f | ).{.$pathCode.=.$this->getPathCo |
fe00 | 64 65 28 24 66 69 6c 65 73 79 73 74 65 6d 2c 20 24 62 61 73 65 50 61 74 68 2c 20 24 76 65 6e 64 | de($filesystem,.$basePath,.$vend |
fe20 | 6f 72 50 61 74 68 2c 20 24 70 61 74 68 29 2e 22 2c 5c 6e 22 3b 0a 24 63 6c 61 73 73 6d 61 70 46 | orPath,.$path).",\n";.$classmapF |
fe40 | 69 6c 65 20 2e 3d 20 27 20 20 20 20 27 2e 76 61 72 5f 65 78 70 6f 72 74 28 24 63 6c 61 73 73 4e | ile..=.'....'.var_export($classN |
fe60 | 61 6d 65 2c 20 74 72 75 65 29 2e 27 20 3d 3e 20 27 2e 24 70 61 74 68 43 6f 64 65 3b 0a 7d 0a 24 | ame,.true).'.=>.'.$pathCode;.}.$ |
fe80 | 63 6c 61 73 73 6d 61 70 46 69 6c 65 20 2e 3d 20 22 29 3b 5c 6e 22 3b 0a 0a 69 66 20 28 27 27 20 | classmapFile..=.");\n";..if.(''. |
fea0 | 3d 3d 3d 20 24 73 75 66 66 69 78 29 20 7b 0a 24 73 75 66 66 69 78 20 3d 20 6e 75 6c 6c 3b 0a 7d | ===.$suffix).{.$suffix.=.null;.} |
fec0 | 0a 69 66 20 28 6e 75 6c 6c 20 3d 3d 3d 20 24 73 75 66 66 69 78 29 20 7b 0a 24 73 75 66 66 69 78 | .if.(null.===.$suffix).{.$suffix |
fee0 | 20 3d 20 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 61 75 74 6f 6c 6f 61 64 65 72 2d 73 75 66 66 | .=.$config->get('autoloader-suff |
ff00 | 69 78 27 29 3b 0a 0a 0a 69 66 20 28 6e 75 6c 6c 20 3d 3d 3d 20 24 73 75 66 66 69 78 20 26 26 20 | ix');...if.(null.===.$suffix.&&. |
ff20 | 46 69 6c 65 73 79 73 74 65 6d 3a 3a 69 73 52 65 61 64 61 62 6c 65 28 24 76 65 6e 64 6f 72 50 61 | Filesystem::isReadable($vendorPa |
ff40 | 74 68 2e 27 2f 61 75 74 6f 6c 6f 61 64 2e 70 68 70 27 29 29 20 7b 0a 24 63 6f 6e 74 65 6e 74 20 | th.'/autoload.php')).{.$content. |
ff60 | 3d 20 66 69 6c 65 5f 67 65 74 5f 63 6f 6e 74 65 6e 74 73 28 24 76 65 6e 64 6f 72 50 61 74 68 2e | =.file_get_contents($vendorPath. |
ff80 | 27 2f 61 75 74 6f 6c 6f 61 64 2e 70 68 70 27 29 3b 0a 69 66 20 28 50 72 65 67 3a 3a 69 73 4d 61 | '/autoload.php');.if.(Preg::isMa |
ffa0 | 74 63 68 28 27 7b 43 6f 6d 70 6f 73 65 72 41 75 74 6f 6c 6f 61 64 65 72 49 6e 69 74 28 5b 5e 3a | tch('{ComposerAutoloaderInit([^: |
ffc0 | 5c 73 5d 2b 29 3a 3a 7d 27 2c 20 24 63 6f 6e 74 65 6e 74 2c 20 24 6d 61 74 63 68 29 29 20 7b 0a | \s]+)::}',.$content,.$match)).{. |
ffe0 | 24 73 75 66 66 69 78 20 3d 20 24 6d 61 74 63 68 5b 31 5d 3b 0a 7d 0a 7d 0a 0a 0a 69 66 20 28 6e | $suffix.=.$match[1];.}.}...if.(n |
10000 | 75 6c 6c 20 3d 3d 3d 20 24 73 75 66 66 69 78 29 20 7b 0a 24 73 75 66 66 69 78 20 3d 20 6d 64 35 | ull.===.$suffix).{.$suffix.=.md5 |
10020 | 28 75 6e 69 71 69 64 28 27 27 2c 20 74 72 75 65 29 29 3b 0a 7d 0a 7d 0a 0a 24 66 69 6c 65 73 79 | (uniqid('',.true));.}.}..$filesy |
10040 | 73 74 65 6d 2d 3e 66 69 6c 65 50 75 74 43 6f 6e 74 65 6e 74 73 49 66 4d 6f 64 69 66 69 65 64 28 | stem->filePutContentsIfModified( |
10060 | 24 74 61 72 67 65 74 44 69 72 2e 27 2f 61 75 74 6f 6c 6f 61 64 5f 6e 61 6d 65 73 70 61 63 65 73 | $targetDir.'/autoload_namespaces |
10080 | 2e 70 68 70 27 2c 20 24 6e 61 6d 65 73 70 61 63 65 73 46 69 6c 65 29 3b 0a 24 66 69 6c 65 73 79 | .php',.$namespacesFile);.$filesy |
100a0 | 73 74 65 6d 2d 3e 66 69 6c 65 50 75 74 43 6f 6e 74 65 6e 74 73 49 66 4d 6f 64 69 66 69 65 64 28 | stem->filePutContentsIfModified( |
100c0 | 24 74 61 72 67 65 74 44 69 72 2e 27 2f 61 75 74 6f 6c 6f 61 64 5f 70 73 72 34 2e 70 68 70 27 2c | $targetDir.'/autoload_psr4.php', |
100e0 | 20 24 70 73 72 34 46 69 6c 65 29 3b 0a 24 66 69 6c 65 73 79 73 74 65 6d 2d 3e 66 69 6c 65 50 75 | .$psr4File);.$filesystem->filePu |
10100 | 74 43 6f 6e 74 65 6e 74 73 49 66 4d 6f 64 69 66 69 65 64 28 24 74 61 72 67 65 74 44 69 72 2e 27 | tContentsIfModified($targetDir.' |
10120 | 2f 61 75 74 6f 6c 6f 61 64 5f 63 6c 61 73 73 6d 61 70 2e 70 68 70 27 2c 20 24 63 6c 61 73 73 6d | /autoload_classmap.php',.$classm |
10140 | 61 70 46 69 6c 65 29 3b 0a 24 69 6e 63 6c 75 64 65 50 61 74 68 46 69 6c 65 50 61 74 68 20 3d 20 | apFile);.$includePathFilePath.=. |
10160 | 24 74 61 72 67 65 74 44 69 72 2e 27 2f 69 6e 63 6c 75 64 65 5f 70 61 74 68 73 2e 70 68 70 27 3b | $targetDir.'/include_paths.php'; |
10180 | 0a 69 66 20 28 24 69 6e 63 6c 75 64 65 50 61 74 68 46 69 6c 65 43 6f 6e 74 65 6e 74 73 20 3d 20 | .if.($includePathFileContents.=. |
101a0 | 24 74 68 69 73 2d 3e 67 65 74 49 6e 63 6c 75 64 65 50 61 74 68 73 46 69 6c 65 28 24 70 61 63 6b | $this->getIncludePathsFile($pack |
101c0 | 61 67 65 4d 61 70 2c 20 24 66 69 6c 65 73 79 73 74 65 6d 2c 20 24 62 61 73 65 50 61 74 68 2c 20 | ageMap,.$filesystem,.$basePath,. |
101e0 | 24 76 65 6e 64 6f 72 50 61 74 68 2c 20 24 76 65 6e 64 6f 72 50 61 74 68 43 6f 64 65 2c 20 24 61 | $vendorPath,.$vendorPathCode,.$a |
10200 | 70 70 42 61 73 65 44 69 72 43 6f 64 65 29 29 20 7b 0a 24 66 69 6c 65 73 79 73 74 65 6d 2d 3e 66 | ppBaseDirCode)).{.$filesystem->f |
10220 | 69 6c 65 50 75 74 43 6f 6e 74 65 6e 74 73 49 66 4d 6f 64 69 66 69 65 64 28 24 69 6e 63 6c 75 64 | ilePutContentsIfModified($includ |
10240 | 65 50 61 74 68 46 69 6c 65 50 61 74 68 2c 20 24 69 6e 63 6c 75 64 65 50 61 74 68 46 69 6c 65 43 | ePathFilePath,.$includePathFileC |
10260 | 6f 6e 74 65 6e 74 73 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 66 69 6c 65 5f 65 78 69 73 74 73 28 | ontents);.}.elseif.(file_exists( |
10280 | 24 69 6e 63 6c 75 64 65 50 61 74 68 46 69 6c 65 50 61 74 68 29 29 20 7b 0a 75 6e 6c 69 6e 6b 28 | $includePathFilePath)).{.unlink( |
102a0 | 24 69 6e 63 6c 75 64 65 50 61 74 68 46 69 6c 65 50 61 74 68 29 3b 0a 7d 0a 24 69 6e 63 6c 75 64 | $includePathFilePath);.}.$includ |
102c0 | 65 46 69 6c 65 73 46 69 6c 65 50 61 74 68 20 3d 20 24 74 61 72 67 65 74 44 69 72 2e 27 2f 61 75 | eFilesFilePath.=.$targetDir.'/au |
102e0 | 74 6f 6c 6f 61 64 5f 66 69 6c 65 73 2e 70 68 70 27 3b 0a 69 66 20 28 24 69 6e 63 6c 75 64 65 46 | toload_files.php';.if.($includeF |
10300 | 69 6c 65 73 46 69 6c 65 43 6f 6e 74 65 6e 74 73 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 49 6e 63 | ilesFileContents.=.$this->getInc |
10320 | 6c 75 64 65 46 69 6c 65 73 46 69 6c 65 28 24 61 75 74 6f 6c 6f 61 64 73 5b 27 66 69 6c 65 73 27 | ludeFilesFile($autoloads['files' |
10340 | 5d 2c 20 24 66 69 6c 65 73 79 73 74 65 6d 2c 20 24 62 61 73 65 50 61 74 68 2c 20 24 76 65 6e 64 | ],.$filesystem,.$basePath,.$vend |
10360 | 6f 72 50 61 74 68 2c 20 24 76 65 6e 64 6f 72 50 61 74 68 43 6f 64 65 2c 20 24 61 70 70 42 61 73 | orPath,.$vendorPathCode,.$appBas |
10380 | 65 44 69 72 43 6f 64 65 29 29 20 7b 0a 24 66 69 6c 65 73 79 73 74 65 6d 2d 3e 66 69 6c 65 50 75 | eDirCode)).{.$filesystem->filePu |
103a0 | 74 43 6f 6e 74 65 6e 74 73 49 66 4d 6f 64 69 66 69 65 64 28 24 69 6e 63 6c 75 64 65 46 69 6c 65 | tContentsIfModified($includeFile |
103c0 | 73 46 69 6c 65 50 61 74 68 2c 20 24 69 6e 63 6c 75 64 65 46 69 6c 65 73 46 69 6c 65 43 6f 6e 74 | sFilePath,.$includeFilesFileCont |
103e0 | 65 6e 74 73 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 66 69 6c 65 5f 65 78 69 73 74 73 28 24 69 6e | ents);.}.elseif.(file_exists($in |
10400 | 63 6c 75 64 65 46 69 6c 65 73 46 69 6c 65 50 61 74 68 29 29 20 7b 0a 75 6e 6c 69 6e 6b 28 24 69 | cludeFilesFilePath)).{.unlink($i |
10420 | 6e 63 6c 75 64 65 46 69 6c 65 73 46 69 6c 65 50 61 74 68 29 3b 0a 7d 0a 24 66 69 6c 65 73 79 73 | ncludeFilesFilePath);.}.$filesys |
10440 | 74 65 6d 2d 3e 66 69 6c 65 50 75 74 43 6f 6e 74 65 6e 74 73 49 66 4d 6f 64 69 66 69 65 64 28 24 | tem->filePutContentsIfModified($ |
10460 | 74 61 72 67 65 74 44 69 72 2e 27 2f 61 75 74 6f 6c 6f 61 64 5f 73 74 61 74 69 63 2e 70 68 70 27 | targetDir.'/autoload_static.php' |
10480 | 2c 20 24 74 68 69 73 2d 3e 67 65 74 53 74 61 74 69 63 46 69 6c 65 28 24 73 75 66 66 69 78 2c 20 | ,.$this->getStaticFile($suffix,. |
104a0 | 24 74 61 72 67 65 74 44 69 72 2c 20 24 76 65 6e 64 6f 72 50 61 74 68 2c 20 24 62 61 73 65 50 61 | $targetDir,.$vendorPath,.$basePa |
104c0 | 74 68 29 29 3b 0a 24 63 68 65 63 6b 50 6c 61 74 66 6f 72 6d 20 3d 20 24 63 6f 6e 66 69 67 2d 3e | th));.$checkPlatform.=.$config-> |
104e0 | 67 65 74 28 27 70 6c 61 74 66 6f 72 6d 2d 63 68 65 63 6b 27 29 20 21 3d 3d 20 66 61 6c 73 65 20 | get('platform-check').!==.false. |
10500 | 26 26 20 21 28 24 74 68 69 73 2d 3e 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 | &&.!($this->platformRequirementF |
10520 | 69 6c 74 65 72 20 69 6e 73 74 61 6e 63 65 6f 66 20 49 67 6e 6f 72 65 41 6c 6c 50 6c 61 74 66 6f | ilter.instanceof.IgnoreAllPlatfo |
10540 | 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 29 3b 0a 24 70 6c 61 74 66 6f 72 6d 43 | rmRequirementFilter);.$platformC |
10560 | 68 65 63 6b 43 6f 6e 74 65 6e 74 20 3d 20 6e 75 6c 6c 3b 0a 69 66 20 28 24 63 68 65 63 6b 50 6c | heckContent.=.null;.if.($checkPl |
10580 | 61 74 66 6f 72 6d 29 20 7b 0a 24 70 6c 61 74 66 6f 72 6d 43 68 65 63 6b 43 6f 6e 74 65 6e 74 20 | atform).{.$platformCheckContent. |
105a0 | 3d 20 24 74 68 69 73 2d 3e 67 65 74 50 6c 61 74 66 6f 72 6d 43 68 65 63 6b 28 24 70 61 63 6b 61 | =.$this->getPlatformCheck($packa |
105c0 | 67 65 4d 61 70 2c 20 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 70 6c 61 74 66 6f 72 6d 2d 63 68 | geMap,.$config->get('platform-ch |
105e0 | 65 63 6b 27 29 2c 20 24 64 65 76 50 61 63 6b 61 67 65 4e 61 6d 65 73 29 3b 0a 69 66 20 28 6e 75 | eck'),.$devPackageNames);.if.(nu |
10600 | 6c 6c 20 3d 3d 3d 20 24 70 6c 61 74 66 6f 72 6d 43 68 65 63 6b 43 6f 6e 74 65 6e 74 29 20 7b 0a | ll.===.$platformCheckContent).{. |
10620 | 24 63 68 65 63 6b 50 6c 61 74 66 6f 72 6d 20 3d 20 66 61 6c 73 65 3b 0a 7d 0a 7d 0a 69 66 20 28 | $checkPlatform.=.false;.}.}.if.( |
10640 | 24 63 68 65 63 6b 50 6c 61 74 66 6f 72 6d 29 20 7b 0a 24 66 69 6c 65 73 79 73 74 65 6d 2d 3e 66 | $checkPlatform).{.$filesystem->f |
10660 | 69 6c 65 50 75 74 43 6f 6e 74 65 6e 74 73 49 66 4d 6f 64 69 66 69 65 64 28 24 74 61 72 67 65 74 | ilePutContentsIfModified($target |
10680 | 44 69 72 2e 27 2f 70 6c 61 74 66 6f 72 6d 5f 63 68 65 63 6b 2e 70 68 70 27 2c 20 24 70 6c 61 74 | Dir.'/platform_check.php',.$plat |
106a0 | 66 6f 72 6d 43 68 65 63 6b 43 6f 6e 74 65 6e 74 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 66 69 6c | formCheckContent);.}.elseif.(fil |
106c0 | 65 5f 65 78 69 73 74 73 28 24 74 61 72 67 65 74 44 69 72 2e 27 2f 70 6c 61 74 66 6f 72 6d 5f 63 | e_exists($targetDir.'/platform_c |
106e0 | 68 65 63 6b 2e 70 68 70 27 29 29 20 7b 0a 75 6e 6c 69 6e 6b 28 24 74 61 72 67 65 74 44 69 72 2e | heck.php')).{.unlink($targetDir. |
10700 | 27 2f 70 6c 61 74 66 6f 72 6d 5f 63 68 65 63 6b 2e 70 68 70 27 29 3b 0a 7d 0a 24 66 69 6c 65 73 | '/platform_check.php');.}.$files |
10720 | 79 73 74 65 6d 2d 3e 66 69 6c 65 50 75 74 43 6f 6e 74 65 6e 74 73 49 66 4d 6f 64 69 66 69 65 64 | ystem->filePutContentsIfModified |
10740 | 28 24 76 65 6e 64 6f 72 50 61 74 68 2e 27 2f 61 75 74 6f 6c 6f 61 64 2e 70 68 70 27 2c 20 24 74 | ($vendorPath.'/autoload.php',.$t |
10760 | 68 69 73 2d 3e 67 65 74 41 75 74 6f 6c 6f 61 64 46 69 6c 65 28 24 76 65 6e 64 6f 72 50 61 74 68 | his->getAutoloadFile($vendorPath |
10780 | 54 6f 54 61 72 67 65 74 44 69 72 43 6f 64 65 2c 20 24 73 75 66 66 69 78 29 29 3b 0a 24 66 69 6c | ToTargetDirCode,.$suffix));.$fil |
107a0 | 65 73 79 73 74 65 6d 2d 3e 66 69 6c 65 50 75 74 43 6f 6e 74 65 6e 74 73 49 66 4d 6f 64 69 66 69 | esystem->filePutContentsIfModifi |
107c0 | 65 64 28 24 74 61 72 67 65 74 44 69 72 2e 27 2f 61 75 74 6f 6c 6f 61 64 5f 72 65 61 6c 2e 70 68 | ed($targetDir.'/autoload_real.ph |
107e0 | 70 27 2c 20 24 74 68 69 73 2d 3e 67 65 74 41 75 74 6f 6c 6f 61 64 52 65 61 6c 46 69 6c 65 28 74 | p',.$this->getAutoloadRealFile(t |
10800 | 72 75 65 2c 20 28 62 6f 6f 6c 29 20 24 69 6e 63 6c 75 64 65 50 61 74 68 46 69 6c 65 43 6f 6e 74 | rue,.(bool).$includePathFileCont |
10820 | 65 6e 74 73 2c 20 24 74 61 72 67 65 74 44 69 72 4c 6f 61 64 65 72 2c 20 28 62 6f 6f 6c 29 20 24 | ents,.$targetDirLoader,.(bool).$ |
10840 | 69 6e 63 6c 75 64 65 46 69 6c 65 73 46 69 6c 65 43 6f 6e 74 65 6e 74 73 2c 20 24 76 65 6e 64 6f | includeFilesFileContents,.$vendo |
10860 | 72 50 61 74 68 43 6f 64 65 2c 20 24 61 70 70 42 61 73 65 44 69 72 43 6f 64 65 2c 20 24 73 75 66 | rPathCode,.$appBaseDirCode,.$suf |
10880 | 66 69 78 2c 20 24 75 73 65 47 6c 6f 62 61 6c 49 6e 63 6c 75 64 65 50 61 74 68 2c 20 24 70 72 65 | fix,.$useGlobalIncludePath,.$pre |
108a0 | 70 65 6e 64 41 75 74 6f 6c 6f 61 64 65 72 2c 20 24 63 68 65 63 6b 50 6c 61 74 66 6f 72 6d 29 29 | pendAutoloader,.$checkPlatform)) |
108c0 | 3b 0a 0a 24 66 69 6c 65 73 79 73 74 65 6d 2d 3e 73 61 66 65 43 6f 70 79 28 5f 5f 44 49 52 5f 5f | ;..$filesystem->safeCopy(__DIR__ |
108e0 | 2e 27 2f 43 6c 61 73 73 4c 6f 61 64 65 72 2e 70 68 70 27 2c 20 24 74 61 72 67 65 74 44 69 72 2e | .'/ClassLoader.php',.$targetDir. |
10900 | 27 2f 43 6c 61 73 73 4c 6f 61 64 65 72 2e 70 68 70 27 29 3b 0a 24 66 69 6c 65 73 79 73 74 65 6d | '/ClassLoader.php');.$filesystem |
10920 | 2d 3e 73 61 66 65 43 6f 70 79 28 5f 5f 44 49 52 5f 5f 2e 27 2f 2e 2e 2f 2e 2e 2f 2e 2e 2f 4c 49 | ->safeCopy(__DIR__.'/../../../LI |
10940 | 43 45 4e 53 45 27 2c 20 24 74 61 72 67 65 74 44 69 72 2e 27 2f 4c 49 43 45 4e 53 45 27 29 3b 0a | CENSE',.$targetDir.'/LICENSE');. |
10960 | 0a 69 66 20 28 24 74 68 69 73 2d 3e 72 75 6e 53 63 72 69 70 74 73 29 20 7b 0a 24 74 68 69 73 2d | .if.($this->runScripts).{.$this- |
10980 | 3e 65 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 2d 3e 64 69 73 70 61 74 63 68 53 63 72 69 70 74 | >eventDispatcher->dispatchScript |
109a0 | 28 53 63 72 69 70 74 45 76 65 6e 74 73 3a 3a 50 4f 53 54 5f 41 55 54 4f 4c 4f 41 44 5f 44 55 4d | (ScriptEvents::POST_AUTOLOAD_DUM |
109c0 | 50 2c 20 24 74 68 69 73 2d 3e 64 65 76 4d 6f 64 65 2c 20 5b 5d 2c 20 5b 0a 27 6f 70 74 69 6d 69 | P,.$this->devMode,.[],.[.'optimi |
109e0 | 7a 65 27 20 3d 3e 20 24 73 63 61 6e 50 73 72 50 61 63 6b 61 67 65 73 2c 0a 5d 29 3b 0a 7d 0a 0a | ze'.=>.$scanPsrPackages,.]);.}.. |
10a00 | 72 65 74 75 72 6e 20 24 63 6c 61 73 73 4d 61 70 3b 0a 7d 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 | return.$classMap;.}......private |
10a20 | 20 66 75 6e 63 74 69 6f 6e 20 62 75 69 6c 64 45 78 63 6c 75 73 69 6f 6e 52 65 67 65 78 28 73 74 | .function.buildExclusionRegex(st |
10a40 | 72 69 6e 67 20 24 64 69 72 2c 20 3f 61 72 72 61 79 20 24 65 78 63 6c 75 64 65 64 29 3a 20 3f 73 | ring.$dir,.?array.$excluded):.?s |
10a60 | 74 72 69 6e 67 0a 7b 0a 69 66 20 28 6e 75 6c 6c 20 3d 3d 3d 20 24 65 78 63 6c 75 64 65 64 29 20 | tring.{.if.(null.===.$excluded). |
10a80 | 7b 0a 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0a 7d 0a 0a 0a 0a 0a 69 66 20 28 66 69 6c 65 5f 65 78 | {.return.null;.}.....if.(file_ex |
10aa0 | 69 73 74 73 28 24 64 69 72 29 29 20 7b 0a 0a 24 64 69 72 4d 61 74 63 68 20 3d 20 70 72 65 67 5f | ists($dir)).{..$dirMatch.=.preg_ |
10ac0 | 71 75 6f 74 65 28 73 74 72 74 72 28 72 65 61 6c 70 61 74 68 28 24 64 69 72 29 2c 20 27 5c 5c 27 | quote(strtr(realpath($dir),.'\\' |
10ae0 | 2c 20 27 2f 27 29 29 3b 0a 66 6f 72 65 61 63 68 20 28 24 65 78 63 6c 75 64 65 64 20 61 73 20 24 | ,.'/'));.foreach.($excluded.as.$ |
10b00 | 69 6e 64 65 78 20 3d 3e 20 24 70 61 74 74 65 72 6e 29 20 7b 0a 0a 24 70 61 74 74 65 72 6e 20 3d | index.=>.$pattern).{..$pattern.= |
10b20 | 20 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 28 27 7b 5e 28 28 5b 5e 2e 2b 2a 3f 5c 5b 5e 5c 5d 24 | .Preg::replace('{^(([^.+*?\[^\]$ |
10b40 | 28 29 7b 7d 3d 21 3c 3e 7c 3a 5c 5c 5c 5c 23 2d 5d 2b 7c 5c 5c 5c 5c 5b 2e 2b 2a 3f 5c 5b 5e 5c | (){}=!<>|:\\\\#-]+|\\\\[.+*?\[^\ |
10b60 | 5d 24 28 29 7b 7d 3d 21 3c 3e 7c 3a 23 2d 5d 29 2a 29 2e 2a 7d 27 2c 20 27 24 31 27 2c 20 24 70 | ]$(){}=!<>|:#-])*).*}',.'$1',.$p |
10b80 | 61 74 74 65 72 6e 29 3b 0a 0a 69 66 20 28 30 20 21 3d 3d 20 73 74 72 70 6f 73 28 24 70 61 74 74 | attern);..if.(0.!==.strpos($patt |
10ba0 | 65 72 6e 2c 20 24 64 69 72 4d 61 74 63 68 29 20 26 26 20 30 20 21 3d 3d 20 73 74 72 70 6f 73 28 | ern,.$dirMatch).&&.0.!==.strpos( |
10bc0 | 24 64 69 72 4d 61 74 63 68 2c 20 24 70 61 74 74 65 72 6e 29 29 20 7b 0a 75 6e 73 65 74 28 24 65 | $dirMatch,.$pattern)).{.unset($e |
10be0 | 78 63 6c 75 64 65 64 5b 24 69 6e 64 65 78 5d 29 3b 0a 7d 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 | xcluded[$index]);.}.}.}..return. |
10c00 | 5c 63 6f 75 6e 74 28 24 65 78 63 6c 75 64 65 64 29 20 3e 20 30 20 3f 20 27 7b 28 27 20 2e 20 69 | \count($excluded).>.0.?.'{('...i |
10c20 | 6d 70 6c 6f 64 65 28 27 7c 27 2c 20 24 65 78 63 6c 75 64 65 64 29 20 2e 20 27 29 7d 27 20 3a 20 | mplode('|',.$excluded)...')}'.:. |
10c40 | 6e 75 6c 6c 3b 0a 7d 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 62 75 69 | null;.}......public.function.bui |
10c60 | 6c 64 50 61 63 6b 61 67 65 4d 61 70 28 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 72 | ldPackageMap(InstallationManager |
10c80 | 20 24 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 72 2c 20 50 61 63 6b 61 67 65 49 6e | .$installationManager,.PackageIn |
10ca0 | 74 65 72 66 61 63 65 20 24 72 6f 6f 74 50 61 63 6b 61 67 65 2c 20 61 72 72 61 79 20 24 70 61 63 | terface.$rootPackage,.array.$pac |
10cc0 | 6b 61 67 65 73 29 0a 7b 0a 0a 24 70 61 63 6b 61 67 65 4d 61 70 20 3d 20 5b 5b 24 72 6f 6f 74 50 | kages).{..$packageMap.=.[[$rootP |
10ce0 | 61 63 6b 61 67 65 2c 20 27 27 5d 5d 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 | ackage,.'']];..foreach.($package |
10d00 | 73 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 69 66 20 28 24 70 61 63 6b 61 67 65 20 69 6e | s.as.$package).{.if.($package.in |
10d20 | 73 74 61 6e 63 65 6f 66 20 41 6c 69 61 73 50 61 63 6b 61 67 65 29 20 7b 0a 63 6f 6e 74 69 6e 75 | stanceof.AliasPackage).{.continu |
10d40 | 65 3b 0a 7d 0a 24 74 68 69 73 2d 3e 76 61 6c 69 64 61 74 65 50 61 63 6b 61 67 65 28 24 70 61 63 | e;.}.$this->validatePackage($pac |
10d60 | 6b 61 67 65 29 3b 0a 0a 24 70 61 63 6b 61 67 65 4d 61 70 5b 5d 20 3d 20 5b 0a 24 70 61 63 6b 61 | kage);..$packageMap[].=.[.$packa |
10d80 | 67 65 2c 0a 24 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 72 2d 3e 67 65 74 49 6e 73 | ge,.$installationManager->getIns |
10da0 | 74 61 6c 6c 50 61 74 68 28 24 70 61 63 6b 61 67 65 29 2c 0a 5d 3b 0a 7d 0a 0a 72 65 74 75 72 6e | tallPath($package),.];.}..return |
10dc0 | 20 24 70 61 63 6b 61 67 65 4d 61 70 3b 0a 7d 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 | .$packageMap;.}......protected.f |
10de0 | 75 6e 63 74 69 6f 6e 20 76 61 6c 69 64 61 74 65 50 61 63 6b 61 67 65 28 50 61 63 6b 61 67 65 49 | unction.validatePackage(PackageI |
10e00 | 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 29 0a 7b 0a 24 61 75 74 6f 6c 6f 61 64 20 3d | nterface.$package).{.$autoload.= |
10e20 | 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 41 75 74 6f 6c 6f 61 64 28 29 3b 0a 69 66 20 28 21 65 | .$package->getAutoload();.if.(!e |
10e40 | 6d 70 74 79 28 24 61 75 74 6f 6c 6f 61 64 5b 27 70 73 72 2d 34 27 5d 29 20 26 26 20 6e 75 6c 6c | mpty($autoload['psr-4']).&&.null |
10e60 | 20 21 3d 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 54 61 72 67 65 74 44 69 72 28 29 29 20 7b | .!==.$package->getTargetDir()).{ |
10e80 | 0a 24 6e 61 6d 65 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 3b 0a 24 70 | .$name.=.$package->getName();.$p |
10ea0 | 61 63 6b 61 67 65 2d 3e 67 65 74 54 61 72 67 65 74 44 69 72 28 29 3b 0a 74 68 72 6f 77 20 6e 65 | ackage->getTargetDir();.throw.ne |
10ec0 | 77 20 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 22 50 53 52 | w.\InvalidArgumentException("PSR |
10ee0 | 2d 34 20 61 75 74 6f 6c 6f 61 64 69 6e 67 20 69 73 20 69 6e 63 6f 6d 70 61 74 69 62 6c 65 20 77 | -4.autoloading.is.incompatible.w |
10f00 | 69 74 68 20 74 68 65 20 74 61 72 67 65 74 2d 64 69 72 20 70 72 6f 70 65 72 74 79 2c 20 72 65 6d | ith.the.target-dir.property,.rem |
10f20 | 6f 76 65 20 74 68 65 20 74 61 72 67 65 74 2d 64 69 72 20 69 6e 20 70 61 63 6b 61 67 65 20 27 24 | ove.the.target-dir.in.package.'$ |
10f40 | 6e 61 6d 65 27 2e 22 29 3b 0a 7d 0a 69 66 20 28 21 65 6d 70 74 79 28 24 61 75 74 6f 6c 6f 61 64 | name'.");.}.if.(!empty($autoload |
10f60 | 5b 27 70 73 72 2d 34 27 5d 29 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 61 75 74 6f 6c 6f 61 64 | ['psr-4'])).{.foreach.($autoload |
10f80 | 5b 27 70 73 72 2d 34 27 5d 20 61 73 20 24 6e 61 6d 65 73 70 61 63 65 20 3d 3e 20 24 64 69 72 73 | ['psr-4'].as.$namespace.=>.$dirs |
10fa0 | 29 20 7b 0a 69 66 20 28 24 6e 61 6d 65 73 70 61 63 65 20 21 3d 3d 20 27 27 20 26 26 20 27 5c 5c | ).{.if.($namespace.!==.''.&&.'\\ |
10fc0 | 27 20 21 3d 3d 20 73 75 62 73 74 72 28 24 6e 61 6d 65 73 70 61 63 65 2c 20 2d 31 29 29 20 7b 0a | '.!==.substr($namespace,.-1)).{. |
10fe0 | 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 | throw.new.\InvalidArgumentExcept |
11000 | 69 6f 6e 28 22 70 73 72 2d 34 20 6e 61 6d 65 73 70 61 63 65 73 20 6d 75 73 74 20 65 6e 64 20 77 | ion("psr-4.namespaces.must.end.w |
11020 | 69 74 68 20 61 20 6e 61 6d 65 73 70 61 63 65 20 73 65 70 61 72 61 74 6f 72 2c 20 27 24 6e 61 6d | ith.a.namespace.separator,.'$nam |
11040 | 65 73 70 61 63 65 27 20 64 6f 65 73 20 6e 6f 74 2c 20 75 73 65 20 27 24 6e 61 6d 65 73 70 61 63 | espace'.does.not,.use.'$namespac |
11060 | 65 5c 5c 27 2e 22 29 3b 0a 7d 0a 7d 0a 7d 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a | e\\'.");.}.}.}.}................ |
11080 | 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 70 61 72 73 65 41 75 74 6f 6c 6f 61 64 73 28 | .public.function.parseAutoloads( |
110a0 | 61 72 72 61 79 20 24 70 61 63 6b 61 67 65 4d 61 70 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 | array.$packageMap,.PackageInterf |
110c0 | 61 63 65 20 24 72 6f 6f 74 50 61 63 6b 61 67 65 2c 20 24 66 69 6c 74 65 72 65 64 44 65 76 50 61 | ace.$rootPackage,.$filteredDevPa |
110e0 | 63 6b 61 67 65 73 20 3d 20 66 61 6c 73 65 29 0a 7b 0a 24 72 6f 6f 74 50 61 63 6b 61 67 65 4d 61 | ckages.=.false).{.$rootPackageMa |
11100 | 70 20 3d 20 61 72 72 61 79 5f 73 68 69 66 74 28 24 70 61 63 6b 61 67 65 4d 61 70 29 3b 0a 69 66 | p.=.array_shift($packageMap);.if |
11120 | 20 28 69 73 5f 61 72 72 61 79 28 24 66 69 6c 74 65 72 65 64 44 65 76 50 61 63 6b 61 67 65 73 29 | .(is_array($filteredDevPackages) |
11140 | 29 20 7b 0a 24 70 61 63 6b 61 67 65 4d 61 70 20 3d 20 61 72 72 61 79 5f 66 69 6c 74 65 72 28 24 | ).{.$packageMap.=.array_filter($ |
11160 | 70 61 63 6b 61 67 65 4d 61 70 2c 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 69 74 | packageMap,.static.function.($it |
11180 | 65 6d 29 20 75 73 65 20 28 24 66 69 6c 74 65 72 65 64 44 65 76 50 61 63 6b 61 67 65 73 29 3a 20 | em).use.($filteredDevPackages):. |
111a0 | 62 6f 6f 6c 20 7b 0a 72 65 74 75 72 6e 20 21 69 6e 5f 61 72 72 61 79 28 24 69 74 65 6d 5b 30 5d | bool.{.return.!in_array($item[0] |
111c0 | 2d 3e 67 65 74 4e 61 6d 65 28 29 2c 20 24 66 69 6c 74 65 72 65 64 44 65 76 50 61 63 6b 61 67 65 | ->getName(),.$filteredDevPackage |
111e0 | 73 2c 20 74 72 75 65 29 3b 0a 7d 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 66 69 6c 74 65 72 65 | s,.true);.});.}.elseif.($filtere |
11200 | 64 44 65 76 50 61 63 6b 61 67 65 73 29 20 7b 0a 24 70 61 63 6b 61 67 65 4d 61 70 20 3d 20 24 74 | dDevPackages).{.$packageMap.=.$t |
11220 | 68 69 73 2d 3e 66 69 6c 74 65 72 50 61 63 6b 61 67 65 4d 61 70 28 24 70 61 63 6b 61 67 65 4d 61 | his->filterPackageMap($packageMa |
11240 | 70 2c 20 24 72 6f 6f 74 50 61 63 6b 61 67 65 29 3b 0a 7d 0a 24 73 6f 72 74 65 64 50 61 63 6b 61 | p,.$rootPackage);.}.$sortedPacka |
11260 | 67 65 4d 61 70 20 3d 20 24 74 68 69 73 2d 3e 73 6f 72 74 50 61 63 6b 61 67 65 4d 61 70 28 24 70 | geMap.=.$this->sortPackageMap($p |
11280 | 61 63 6b 61 67 65 4d 61 70 29 3b 0a 24 73 6f 72 74 65 64 50 61 63 6b 61 67 65 4d 61 70 5b 5d 20 | ackageMap);.$sortedPackageMap[]. |
112a0 | 3d 20 24 72 6f 6f 74 50 61 63 6b 61 67 65 4d 61 70 3b 0a 61 72 72 61 79 5f 75 6e 73 68 69 66 74 | =.$rootPackageMap;.array_unshift |
112c0 | 28 24 70 61 63 6b 61 67 65 4d 61 70 2c 20 24 72 6f 6f 74 50 61 63 6b 61 67 65 4d 61 70 29 3b 0a | ($packageMap,.$rootPackageMap);. |
112e0 | 0a 24 70 73 72 30 20 3d 20 24 74 68 69 73 2d 3e 70 61 72 73 65 41 75 74 6f 6c 6f 61 64 73 54 79 | .$psr0.=.$this->parseAutoloadsTy |
11300 | 70 65 28 24 70 61 63 6b 61 67 65 4d 61 70 2c 20 27 70 73 72 2d 30 27 2c 20 24 72 6f 6f 74 50 61 | pe($packageMap,.'psr-0',.$rootPa |
11320 | 63 6b 61 67 65 29 3b 0a 24 70 73 72 34 20 3d 20 24 74 68 69 73 2d 3e 70 61 72 73 65 41 75 74 6f | ckage);.$psr4.=.$this->parseAuto |
11340 | 6c 6f 61 64 73 54 79 70 65 28 24 70 61 63 6b 61 67 65 4d 61 70 2c 20 27 70 73 72 2d 34 27 2c 20 | loadsType($packageMap,.'psr-4',. |
11360 | 24 72 6f 6f 74 50 61 63 6b 61 67 65 29 3b 0a 24 63 6c 61 73 73 6d 61 70 20 3d 20 24 74 68 69 73 | $rootPackage);.$classmap.=.$this |
11380 | 2d 3e 70 61 72 73 65 41 75 74 6f 6c 6f 61 64 73 54 79 70 65 28 61 72 72 61 79 5f 72 65 76 65 72 | ->parseAutoloadsType(array_rever |
113a0 | 73 65 28 24 73 6f 72 74 65 64 50 61 63 6b 61 67 65 4d 61 70 29 2c 20 27 63 6c 61 73 73 6d 61 70 | se($sortedPackageMap),.'classmap |
113c0 | 27 2c 20 24 72 6f 6f 74 50 61 63 6b 61 67 65 29 3b 0a 24 66 69 6c 65 73 20 3d 20 24 74 68 69 73 | ',.$rootPackage);.$files.=.$this |
113e0 | 2d 3e 70 61 72 73 65 41 75 74 6f 6c 6f 61 64 73 54 79 70 65 28 24 73 6f 72 74 65 64 50 61 63 6b | ->parseAutoloadsType($sortedPack |
11400 | 61 67 65 4d 61 70 2c 20 27 66 69 6c 65 73 27 2c 20 24 72 6f 6f 74 50 61 63 6b 61 67 65 29 3b 0a | ageMap,.'files',.$rootPackage);. |
11420 | 24 65 78 63 6c 75 64 65 20 3d 20 24 74 68 69 73 2d 3e 70 61 72 73 65 41 75 74 6f 6c 6f 61 64 73 | $exclude.=.$this->parseAutoloads |
11440 | 54 79 70 65 28 24 73 6f 72 74 65 64 50 61 63 6b 61 67 65 4d 61 70 2c 20 27 65 78 63 6c 75 64 65 | Type($sortedPackageMap,.'exclude |
11460 | 2d 66 72 6f 6d 2d 63 6c 61 73 73 6d 61 70 27 2c 20 24 72 6f 6f 74 50 61 63 6b 61 67 65 29 3b 0a | -from-classmap',.$rootPackage);. |
11480 | 0a 6b 72 73 6f 72 74 28 24 70 73 72 30 29 3b 0a 6b 72 73 6f 72 74 28 24 70 73 72 34 29 3b 0a 0a | .krsort($psr0);.krsort($psr4);.. |
114a0 | 72 65 74 75 72 6e 20 5b 0a 27 70 73 72 2d 30 27 20 3d 3e 20 24 70 73 72 30 2c 0a 27 70 73 72 2d | return.[.'psr-0'.=>.$psr0,.'psr- |
114c0 | 34 27 20 3d 3e 20 24 70 73 72 34 2c 0a 27 63 6c 61 73 73 6d 61 70 27 20 3d 3e 20 24 63 6c 61 73 | 4'.=>.$psr4,.'classmap'.=>.$clas |
114e0 | 73 6d 61 70 2c 0a 27 66 69 6c 65 73 27 20 3d 3e 20 24 66 69 6c 65 73 2c 0a 27 65 78 63 6c 75 64 | smap,.'files'.=>.$files,.'exclud |
11500 | 65 2d 66 72 6f 6d 2d 63 6c 61 73 73 6d 61 70 27 20 3d 3e 20 24 65 78 63 6c 75 64 65 2c 0a 5d 3b | e-from-classmap'.=>.$exclude,.]; |
11520 | 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 63 72 65 61 74 65 | .}........public.function.create |
11540 | 4c 6f 61 64 65 72 28 61 72 72 61 79 20 24 61 75 74 6f 6c 6f 61 64 73 2c 20 3f 73 74 72 69 6e 67 | Loader(array.$autoloads,.?string |
11560 | 20 24 76 65 6e 64 6f 72 44 69 72 20 3d 20 6e 75 6c 6c 29 0a 7b 0a 24 6c 6f 61 64 65 72 20 3d 20 | .$vendorDir.=.null).{.$loader.=. |
11580 | 6e 65 77 20 43 6c 61 73 73 4c 6f 61 64 65 72 28 24 76 65 6e 64 6f 72 44 69 72 29 3b 0a 0a 69 66 | new.ClassLoader($vendorDir);..if |
115a0 | 20 28 69 73 73 65 74 28 24 61 75 74 6f 6c 6f 61 64 73 5b 27 70 73 72 2d 30 27 5d 29 29 20 7b 0a | .(isset($autoloads['psr-0'])).{. |
115c0 | 66 6f 72 65 61 63 68 20 28 24 61 75 74 6f 6c 6f 61 64 73 5b 27 70 73 72 2d 30 27 5d 20 61 73 20 | foreach.($autoloads['psr-0'].as. |
115e0 | 24 6e 61 6d 65 73 70 61 63 65 20 3d 3e 20 24 70 61 74 68 29 20 7b 0a 24 6c 6f 61 64 65 72 2d 3e | $namespace.=>.$path).{.$loader-> |
11600 | 61 64 64 28 24 6e 61 6d 65 73 70 61 63 65 2c 20 24 70 61 74 68 29 3b 0a 7d 0a 7d 0a 0a 69 66 20 | add($namespace,.$path);.}.}..if. |
11620 | 28 69 73 73 65 74 28 24 61 75 74 6f 6c 6f 61 64 73 5b 27 70 73 72 2d 34 27 5d 29 29 20 7b 0a 66 | (isset($autoloads['psr-4'])).{.f |
11640 | 6f 72 65 61 63 68 20 28 24 61 75 74 6f 6c 6f 61 64 73 5b 27 70 73 72 2d 34 27 5d 20 61 73 20 24 | oreach.($autoloads['psr-4'].as.$ |
11660 | 6e 61 6d 65 73 70 61 63 65 20 3d 3e 20 24 70 61 74 68 29 20 7b 0a 24 6c 6f 61 64 65 72 2d 3e 61 | namespace.=>.$path).{.$loader->a |
11680 | 64 64 50 73 72 34 28 24 6e 61 6d 65 73 70 61 63 65 2c 20 24 70 61 74 68 29 3b 0a 7d 0a 7d 0a 0a | ddPsr4($namespace,.$path);.}.}.. |
116a0 | 69 66 20 28 69 73 73 65 74 28 24 61 75 74 6f 6c 6f 61 64 73 5b 27 63 6c 61 73 73 6d 61 70 27 5d | if.(isset($autoloads['classmap'] |
116c0 | 29 29 20 7b 0a 24 65 78 63 6c 75 64 65 64 20 3d 20 6e 75 6c 6c 3b 0a 69 66 20 28 21 65 6d 70 74 | )).{.$excluded.=.null;.if.(!empt |
116e0 | 79 28 24 61 75 74 6f 6c 6f 61 64 73 5b 27 65 78 63 6c 75 64 65 2d 66 72 6f 6d 2d 63 6c 61 73 73 | y($autoloads['exclude-from-class |
11700 | 6d 61 70 27 5d 29 29 20 7b 0a 24 65 78 63 6c 75 64 65 64 20 3d 20 24 61 75 74 6f 6c 6f 61 64 73 | map'])).{.$excluded.=.$autoloads |
11720 | 5b 27 65 78 63 6c 75 64 65 2d 66 72 6f 6d 2d 63 6c 61 73 73 6d 61 70 27 5d 3b 0a 7d 0a 0a 24 63 | ['exclude-from-classmap'];.}..$c |
11740 | 6c 61 73 73 4d 61 70 47 65 6e 65 72 61 74 6f 72 20 3d 20 6e 65 77 20 43 6c 61 73 73 4d 61 70 47 | lassMapGenerator.=.new.ClassMapG |
11760 | 65 6e 65 72 61 74 6f 72 28 5b 27 70 68 70 27 2c 20 27 69 6e 63 27 2c 20 27 68 68 27 5d 29 3b 0a | enerator(['php',.'inc',.'hh']);. |
11780 | 24 63 6c 61 73 73 4d 61 70 47 65 6e 65 72 61 74 6f 72 2d 3e 61 76 6f 69 64 44 75 70 6c 69 63 61 | $classMapGenerator->avoidDuplica |
117a0 | 74 65 53 63 61 6e 73 28 29 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 61 75 74 6f 6c 6f 61 64 73 5b | teScans();..foreach.($autoloads[ |
117c0 | 27 63 6c 61 73 73 6d 61 70 27 5d 20 61 73 20 24 64 69 72 29 20 7b 0a 74 72 79 20 7b 0a 24 63 6c | 'classmap'].as.$dir).{.try.{.$cl |
117e0 | 61 73 73 4d 61 70 47 65 6e 65 72 61 74 6f 72 2d 3e 73 63 61 6e 50 61 74 68 73 28 24 64 69 72 2c | assMapGenerator->scanPaths($dir, |
11800 | 20 24 74 68 69 73 2d 3e 62 75 69 6c 64 45 78 63 6c 75 73 69 6f 6e 52 65 67 65 78 28 24 64 69 72 | .$this->buildExclusionRegex($dir |
11820 | 2c 20 24 65 78 63 6c 75 64 65 64 29 29 3b 0a 7d 20 63 61 74 63 68 20 28 5c 52 75 6e 74 69 6d 65 | ,.$excluded));.}.catch.(\Runtime |
11840 | 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 | Exception.$e).{.$this->io->write |
11860 | 45 72 72 6f 72 28 27 3c 77 61 72 6e 69 6e 67 3e 27 2e 24 65 2d 3e 67 65 74 4d 65 73 73 61 67 65 | Error('<warning>'.$e->getMessage |
11880 | 28 29 2e 27 3c 2f 77 61 72 6e 69 6e 67 3e 27 29 3b 0a 7d 0a 7d 0a 0a 24 6c 6f 61 64 65 72 2d 3e | ().'</warning>');.}.}..$loader-> |
118a0 | 61 64 64 43 6c 61 73 73 4d 61 70 28 24 63 6c 61 73 73 4d 61 70 47 65 6e 65 72 61 74 6f 72 2d 3e | addClassMap($classMapGenerator-> |
118c0 | 67 65 74 43 6c 61 73 73 4d 61 70 28 29 2d 3e 67 65 74 4d 61 70 28 29 29 3b 0a 7d 0a 0a 72 65 74 | getClassMap()->getMap());.}..ret |
118e0 | 75 72 6e 20 24 6c 6f 61 64 65 72 3b 0a 7d 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 | urn.$loader;.}......protected.fu |
11900 | 6e 63 74 69 6f 6e 20 67 65 74 49 6e 63 6c 75 64 65 50 61 74 68 73 46 69 6c 65 28 61 72 72 61 79 | nction.getIncludePathsFile(array |
11920 | 20 24 70 61 63 6b 61 67 65 4d 61 70 2c 20 46 69 6c 65 73 79 73 74 65 6d 20 24 66 69 6c 65 73 79 | .$packageMap,.Filesystem.$filesy |
11940 | 73 74 65 6d 2c 20 73 74 72 69 6e 67 20 24 62 61 73 65 50 61 74 68 2c 20 73 74 72 69 6e 67 20 24 | stem,.string.$basePath,.string.$ |
11960 | 76 65 6e 64 6f 72 50 61 74 68 2c 20 73 74 72 69 6e 67 20 24 76 65 6e 64 6f 72 50 61 74 68 43 6f | vendorPath,.string.$vendorPathCo |
11980 | 64 65 2c 20 73 74 72 69 6e 67 20 24 61 70 70 42 61 73 65 44 69 72 43 6f 64 65 29 0a 7b 0a 24 69 | de,.string.$appBaseDirCode).{.$i |
119a0 | 6e 63 6c 75 64 65 50 61 74 68 73 20 3d 20 5b 5d 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 | ncludePaths.=.[];..foreach.($pac |
119c0 | 6b 61 67 65 4d 61 70 20 61 73 20 24 69 74 65 6d 29 20 7b 0a 5b 24 70 61 63 6b 61 67 65 2c 20 24 | kageMap.as.$item).{.[$package,.$ |
119e0 | 69 6e 73 74 61 6c 6c 50 61 74 68 5d 20 3d 20 24 69 74 65 6d 3b 0a 0a 69 66 20 28 6e 75 6c 6c 20 | installPath].=.$item;..if.(null. |
11a00 | 21 3d 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 54 61 72 67 65 74 44 69 72 28 29 20 26 26 20 | !==.$package->getTargetDir().&&. |
11a20 | 73 74 72 6c 65 6e 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 54 61 72 67 65 74 44 69 72 28 29 29 | strlen($package->getTargetDir()) |
11a40 | 20 3e 20 30 29 20 7b 0a 24 69 6e 73 74 61 6c 6c 50 61 74 68 20 3d 20 73 75 62 73 74 72 28 24 69 | .>.0).{.$installPath.=.substr($i |
11a60 | 6e 73 74 61 6c 6c 50 61 74 68 2c 20 30 2c 20 2d 73 74 72 6c 65 6e 28 27 2f 27 2e 24 70 61 63 6b | nstallPath,.0,.-strlen('/'.$pack |
11a80 | 61 67 65 2d 3e 67 65 74 54 61 72 67 65 74 44 69 72 28 29 29 29 3b 0a 7d 0a 0a 66 6f 72 65 61 63 | age->getTargetDir()));.}..foreac |
11aa0 | 68 20 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 49 6e 63 6c 75 64 65 50 61 74 68 73 28 29 20 61 | h.($package->getIncludePaths().a |
11ac0 | 73 20 24 69 6e 63 6c 75 64 65 50 61 74 68 29 20 7b 0a 24 69 6e 63 6c 75 64 65 50 61 74 68 20 3d | s.$includePath).{.$includePath.= |
11ae0 | 20 74 72 69 6d 28 24 69 6e 63 6c 75 64 65 50 61 74 68 2c 20 27 2f 27 29 3b 0a 24 69 6e 63 6c 75 | .trim($includePath,.'/');.$inclu |
11b00 | 64 65 50 61 74 68 73 5b 5d 20 3d 20 65 6d 70 74 79 28 24 69 6e 73 74 61 6c 6c 50 61 74 68 29 20 | dePaths[].=.empty($installPath). |
11b20 | 3f 20 24 69 6e 63 6c 75 64 65 50 61 74 68 20 3a 20 24 69 6e 73 74 61 6c 6c 50 61 74 68 2e 27 2f | ?.$includePath.:.$installPath.'/ |
11b40 | 27 2e 24 69 6e 63 6c 75 64 65 50 61 74 68 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 21 24 69 6e 63 6c 75 | '.$includePath;.}.}..if.(!$inclu |
11b60 | 64 65 50 61 74 68 73 29 20 7b 0a 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0a 7d 0a 0a 24 69 6e 63 6c | dePaths).{.return.null;.}..$incl |
11b80 | 75 64 65 50 61 74 68 73 43 6f 64 65 20 3d 20 27 27 3b 0a 66 6f 72 65 61 63 68 20 28 24 69 6e 63 | udePathsCode.=.'';.foreach.($inc |
11ba0 | 6c 75 64 65 50 61 74 68 73 20 61 73 20 24 70 61 74 68 29 20 7b 0a 24 69 6e 63 6c 75 64 65 50 61 | ludePaths.as.$path).{.$includePa |
11bc0 | 74 68 73 43 6f 64 65 20 2e 3d 20 22 20 20 20 20 22 20 2e 20 24 74 68 69 73 2d 3e 67 65 74 50 61 | thsCode..=."...."...$this->getPa |
11be0 | 74 68 43 6f 64 65 28 24 66 69 6c 65 73 79 73 74 65 6d 2c 20 24 62 61 73 65 50 61 74 68 2c 20 24 | thCode($filesystem,.$basePath,.$ |
11c00 | 76 65 6e 64 6f 72 50 61 74 68 2c 20 24 70 61 74 68 29 20 2e 20 22 2c 5c 6e 22 3b 0a 7d 0a 0a 72 | vendorPath,.$path)...",\n";.}..r |
11c20 | 65 74 75 72 6e 20 3c 3c 3c 45 4f 46 0a 3c 3f 70 68 70 0a 0a 2f 2f 20 69 6e 63 6c 75 64 65 5f 70 | eturn.<<<EOF.<?php..//.include_p |
11c40 | 61 74 68 73 2e 70 68 70 20 40 67 65 6e 65 72 61 74 65 64 20 62 79 20 43 6f 6d 70 6f 73 65 72 0a | aths.php.@generated.by.Composer. |
11c60 | 0a 5c 24 76 65 6e 64 6f 72 44 69 72 20 3d 20 24 76 65 6e 64 6f 72 50 61 74 68 43 6f 64 65 3b 0a | .\$vendorDir.=.$vendorPathCode;. |
11c80 | 5c 24 62 61 73 65 44 69 72 20 3d 20 24 61 70 70 42 61 73 65 44 69 72 43 6f 64 65 3b 0a 0a 72 65 | \$baseDir.=.$appBaseDirCode;..re |
11ca0 | 74 75 72 6e 20 61 72 72 61 79 28 0a 24 69 6e 63 6c 75 64 65 50 61 74 68 73 43 6f 64 65 29 3b 0a | turn.array(.$includePathsCode);. |
11cc0 | 0a 45 4f 46 3b 0a 7d 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 | .EOF;.}......protected.function. |
11ce0 | 67 65 74 49 6e 63 6c 75 64 65 46 69 6c 65 73 46 69 6c 65 28 61 72 72 61 79 20 24 66 69 6c 65 73 | getIncludeFilesFile(array.$files |
11d00 | 2c 20 46 69 6c 65 73 79 73 74 65 6d 20 24 66 69 6c 65 73 79 73 74 65 6d 2c 20 73 74 72 69 6e 67 | ,.Filesystem.$filesystem,.string |
11d20 | 20 24 62 61 73 65 50 61 74 68 2c 20 73 74 72 69 6e 67 20 24 76 65 6e 64 6f 72 50 61 74 68 2c 20 | .$basePath,.string.$vendorPath,. |
11d40 | 73 74 72 69 6e 67 20 24 76 65 6e 64 6f 72 50 61 74 68 43 6f 64 65 2c 20 73 74 72 69 6e 67 20 24 | string.$vendorPathCode,.string.$ |
11d60 | 61 70 70 42 61 73 65 44 69 72 43 6f 64 65 29 0a 7b 0a 24 66 69 6c 65 73 43 6f 64 65 20 3d 20 27 | appBaseDirCode).{.$filesCode.=.' |
11d80 | 27 3b 0a 66 6f 72 65 61 63 68 20 28 24 66 69 6c 65 73 20 61 73 20 24 66 69 6c 65 49 64 65 6e 74 | ';.foreach.($files.as.$fileIdent |
11da0 | 69 66 69 65 72 20 3d 3e 20 24 66 75 6e 63 74 69 6f 6e 46 69 6c 65 29 20 7b 0a 24 66 69 6c 65 73 | ifier.=>.$functionFile).{.$files |
11dc0 | 43 6f 64 65 20 2e 3d 20 27 20 20 20 20 27 20 2e 20 76 61 72 5f 65 78 70 6f 72 74 28 24 66 69 6c | Code..=.'....'...var_export($fil |
11de0 | 65 49 64 65 6e 74 69 66 69 65 72 2c 20 74 72 75 65 29 20 2e 20 27 20 3d 3e 20 27 0a 2e 20 24 74 | eIdentifier,.true)...'.=>.'...$t |
11e00 | 68 69 73 2d 3e 67 65 74 50 61 74 68 43 6f 64 65 28 24 66 69 6c 65 73 79 73 74 65 6d 2c 20 24 62 | his->getPathCode($filesystem,.$b |
11e20 | 61 73 65 50 61 74 68 2c 20 24 76 65 6e 64 6f 72 50 61 74 68 2c 20 24 66 75 6e 63 74 69 6f 6e 46 | asePath,.$vendorPath,.$functionF |
11e40 | 69 6c 65 29 20 2e 20 22 2c 5c 6e 22 3b 0a 7d 0a 0a 69 66 20 28 21 24 66 69 6c 65 73 43 6f 64 65 | ile)...",\n";.}..if.(!$filesCode |
11e60 | 29 20 7b 0a 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 3c 3c 3c 45 4f | ).{.return.null;.}..return.<<<EO |
11e80 | 46 0a 3c 3f 70 68 70 0a 0a 2f 2f 20 61 75 74 6f 6c 6f 61 64 5f 66 69 6c 65 73 2e 70 68 70 20 40 | F.<?php..//.autoload_files.php.@ |
11ea0 | 67 65 6e 65 72 61 74 65 64 20 62 79 20 43 6f 6d 70 6f 73 65 72 0a 0a 5c 24 76 65 6e 64 6f 72 44 | generated.by.Composer..\$vendorD |
11ec0 | 69 72 20 3d 20 24 76 65 6e 64 6f 72 50 61 74 68 43 6f 64 65 3b 0a 5c 24 62 61 73 65 44 69 72 20 | ir.=.$vendorPathCode;.\$baseDir. |
11ee0 | 3d 20 24 61 70 70 42 61 73 65 44 69 72 43 6f 64 65 3b 0a 0a 72 65 74 75 72 6e 20 61 72 72 61 79 | =.$appBaseDirCode;..return.array |
11f00 | 28 0a 24 66 69 6c 65 73 43 6f 64 65 29 3b 0a 0a 45 4f 46 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 | (.$filesCode);..EOF;.}.....prote |
11f20 | 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 50 61 74 68 43 6f 64 65 28 46 69 6c 65 73 79 | cted.function.getPathCode(Filesy |
11f40 | 73 74 65 6d 20 24 66 69 6c 65 73 79 73 74 65 6d 2c 20 73 74 72 69 6e 67 20 24 62 61 73 65 50 61 | stem.$filesystem,.string.$basePa |
11f60 | 74 68 2c 20 73 74 72 69 6e 67 20 24 76 65 6e 64 6f 72 50 61 74 68 2c 20 73 74 72 69 6e 67 20 24 | th,.string.$vendorPath,.string.$ |
11f80 | 70 61 74 68 29 0a 7b 0a 69 66 20 28 21 24 66 69 6c 65 73 79 73 74 65 6d 2d 3e 69 73 41 62 73 6f | path).{.if.(!$filesystem->isAbso |
11fa0 | 6c 75 74 65 50 61 74 68 28 24 70 61 74 68 29 29 20 7b 0a 24 70 61 74 68 20 3d 20 24 62 61 73 65 | lutePath($path)).{.$path.=.$base |
11fc0 | 50 61 74 68 20 2e 20 27 2f 27 20 2e 20 24 70 61 74 68 3b 0a 7d 0a 24 70 61 74 68 20 3d 20 24 66 | Path...'/'...$path;.}.$path.=.$f |
11fe0 | 69 6c 65 73 79 73 74 65 6d 2d 3e 6e 6f 72 6d 61 6c 69 7a 65 50 61 74 68 28 24 70 61 74 68 29 3b | ilesystem->normalizePath($path); |
12000 | 0a 0a 24 62 61 73 65 44 69 72 20 3d 20 27 27 3b 0a 69 66 20 28 73 74 72 70 6f 73 28 24 70 61 74 | ..$baseDir.=.'';.if.(strpos($pat |
12020 | 68 2e 27 2f 27 2c 20 24 76 65 6e 64 6f 72 50 61 74 68 2e 27 2f 27 29 20 3d 3d 3d 20 30 29 20 7b | h.'/',.$vendorPath.'/').===.0).{ |
12040 | 0a 24 70 61 74 68 20 3d 20 28 73 74 72 69 6e 67 29 20 73 75 62 73 74 72 28 24 70 61 74 68 2c 20 | .$path.=.(string).substr($path,. |
12060 | 73 74 72 6c 65 6e 28 24 76 65 6e 64 6f 72 50 61 74 68 29 29 3b 0a 24 62 61 73 65 44 69 72 20 3d | strlen($vendorPath));.$baseDir.= |
12080 | 20 27 24 76 65 6e 64 6f 72 44 69 72 20 2e 20 27 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 70 61 74 68 | .'$vendorDir...';.}.else.{.$path |
120a0 | 20 3d 20 24 66 69 6c 65 73 79 73 74 65 6d 2d 3e 6e 6f 72 6d 61 6c 69 7a 65 50 61 74 68 28 24 66 | .=.$filesystem->normalizePath($f |
120c0 | 69 6c 65 73 79 73 74 65 6d 2d 3e 66 69 6e 64 53 68 6f 72 74 65 73 74 50 61 74 68 28 24 62 61 73 | ilesystem->findShortestPath($bas |
120e0 | 65 50 61 74 68 2c 20 24 70 61 74 68 2c 20 74 72 75 65 29 29 3b 0a 69 66 20 28 21 24 66 69 6c 65 | ePath,.$path,.true));.if.(!$file |
12100 | 73 79 73 74 65 6d 2d 3e 69 73 41 62 73 6f 6c 75 74 65 50 61 74 68 28 24 70 61 74 68 29 29 20 7b | system->isAbsolutePath($path)).{ |
12120 | 0a 24 62 61 73 65 44 69 72 20 3d 20 27 24 62 61 73 65 44 69 72 20 2e 20 27 3b 0a 24 70 61 74 68 | .$baseDir.=.'$baseDir...';.$path |
12140 | 20 3d 20 27 2f 27 20 2e 20 24 70 61 74 68 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 73 74 72 70 6f 73 28 | .=.'/'...$path;.}.}..if.(strpos( |
12160 | 24 70 61 74 68 2c 20 27 2e 70 68 61 72 27 29 20 21 3d 3d 20 66 61 6c 73 65 29 20 7b 0a 24 62 61 | $path,.'.phar').!==.false).{.$ba |
12180 | 73 65 44 69 72 20 3d 20 22 27 70 68 61 72 3a 2f 2f 27 20 2e 20 22 20 2e 20 24 62 61 73 65 44 69 | seDir.=."'phar://'..."...$baseDi |
121a0 | 72 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 62 61 73 65 44 69 72 20 2e 20 76 61 72 5f 65 78 70 6f | r;.}..return.$baseDir...var_expo |
121c0 | 72 74 28 24 70 61 74 68 2c 20 74 72 75 65 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 | rt($path,.true);.}........protec |
121e0 | 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 50 6c 61 74 66 6f 72 6d 43 68 65 63 6b 28 61 72 | ted.function.getPlatformCheck(ar |
12200 | 72 61 79 20 24 70 61 63 6b 61 67 65 4d 61 70 2c 20 24 63 68 65 63 6b 50 6c 61 74 66 6f 72 6d 2c | ray.$packageMap,.$checkPlatform, |
12220 | 20 61 72 72 61 79 20 24 64 65 76 50 61 63 6b 61 67 65 4e 61 6d 65 73 29 0a 7b 0a 24 6c 6f 77 65 | .array.$devPackageNames).{.$lowe |
12240 | 73 74 50 68 70 56 65 72 73 69 6f 6e 20 3d 20 42 6f 75 6e 64 3a 3a 7a 65 72 6f 28 29 3b 0a 24 72 | stPhpVersion.=.Bound::zero();.$r |
12260 | 65 71 75 69 72 65 64 45 78 74 65 6e 73 69 6f 6e 73 20 3d 20 5b 5d 3b 0a 24 65 78 74 65 6e 73 69 | equiredExtensions.=.[];.$extensi |
12280 | 6f 6e 50 72 6f 76 69 64 65 72 73 20 3d 20 5b 5d 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 | onProviders.=.[];..foreach.($pac |
122a0 | 6b 61 67 65 4d 61 70 20 61 73 20 24 69 74 65 6d 29 20 7b 0a 24 70 61 63 6b 61 67 65 20 3d 20 24 | kageMap.as.$item).{.$package.=.$ |
122c0 | 69 74 65 6d 5b 30 5d 3b 0a 66 6f 72 65 61 63 68 20 28 61 72 72 61 79 5f 6d 65 72 67 65 28 24 70 | item[0];.foreach.(array_merge($p |
122e0 | 61 63 6b 61 67 65 2d 3e 67 65 74 52 65 70 6c 61 63 65 73 28 29 2c 20 24 70 61 63 6b 61 67 65 2d | ackage->getReplaces(),.$package- |
12300 | 3e 67 65 74 50 72 6f 76 69 64 65 73 28 29 29 20 61 73 20 24 6c 69 6e 6b 29 20 7b 0a 69 66 20 28 | >getProvides()).as.$link).{.if.( |
12320 | 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b 5e 65 78 74 2d 28 2e 2b 29 24 7d 69 44 27 2c 20 | Preg::isMatch('{^ext-(.+)$}iD',. |
12340 | 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 74 28 29 2c 20 24 6d 61 74 63 68 29 29 20 7b 0a 24 | $link->getTarget(),.$match)).{.$ |
12360 | 65 78 74 65 6e 73 69 6f 6e 50 72 6f 76 69 64 65 72 73 5b 24 6d 61 74 63 68 5b 31 5d 5d 5b 5d 20 | extensionProviders[$match[1]][]. |
12380 | 3d 20 24 6c 69 6e 6b 2d 3e 67 65 74 43 6f 6e 73 74 72 61 69 6e 74 28 29 3b 0a 7d 0a 7d 0a 7d 0a | =.$link->getConstraint();.}.}.}. |
123a0 | 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 4d 61 70 20 61 73 20 24 69 74 65 6d 29 20 | .foreach.($packageMap.as.$item). |
123c0 | 7b 0a 24 70 61 63 6b 61 67 65 20 3d 20 24 69 74 65 6d 5b 30 5d 3b 0a 0a 69 66 20 28 69 6e 5f 61 | {.$package.=.$item[0];..if.(in_a |
123e0 | 72 72 61 79 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 2c 20 24 64 65 76 50 61 | rray($package->getName(),.$devPa |
12400 | 63 6b 61 67 65 4e 61 6d 65 73 2c 20 74 72 75 65 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d | ckageNames,.true)).{.continue;.} |
12420 | 0a 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 52 65 71 75 69 72 65 73 | ..foreach.($package->getRequires |
12440 | 28 29 20 61 73 20 24 6c 69 6e 6b 29 20 7b 0a 69 66 20 28 24 74 68 69 73 2d 3e 70 6c 61 74 66 6f | ().as.$link).{.if.($this->platfo |
12460 | 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 2d 3e 69 73 49 67 6e 6f 72 65 64 28 24 | rmRequirementFilter->isIgnored($ |
12480 | 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 74 28 29 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a | link->getTarget())).{.continue;. |
124a0 | 7d 0a 0a 69 66 20 28 27 70 68 70 27 20 3d 3d 3d 20 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 | }..if.('php'.===.$link->getTarge |
124c0 | 74 28 29 29 20 7b 0a 24 63 6f 6e 73 74 72 61 69 6e 74 20 3d 20 24 6c 69 6e 6b 2d 3e 67 65 74 43 | t()).{.$constraint.=.$link->getC |
124e0 | 6f 6e 73 74 72 61 69 6e 74 28 29 3b 0a 69 66 20 28 24 63 6f 6e 73 74 72 61 69 6e 74 2d 3e 67 65 | onstraint();.if.($constraint->ge |
12500 | 74 4c 6f 77 65 72 42 6f 75 6e 64 28 29 2d 3e 63 6f 6d 70 61 72 65 54 6f 28 24 6c 6f 77 65 73 74 | tLowerBound()->compareTo($lowest |
12520 | 50 68 70 56 65 72 73 69 6f 6e 2c 20 27 3e 27 29 29 20 7b 0a 24 6c 6f 77 65 73 74 50 68 70 56 65 | PhpVersion,.'>')).{.$lowestPhpVe |
12540 | 72 73 69 6f 6e 20 3d 20 24 63 6f 6e 73 74 72 61 69 6e 74 2d 3e 67 65 74 4c 6f 77 65 72 42 6f 75 | rsion.=.$constraint->getLowerBou |
12560 | 6e 64 28 29 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 24 63 68 65 63 6b 50 6c 61 74 66 6f 72 6d 20 3d 3d | nd();.}.}..if.($checkPlatform.== |
12580 | 3d 20 74 72 75 65 20 26 26 20 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b 5e 65 78 74 2d 28 | =.true.&&.Preg::isMatch('{^ext-( |
125a0 | 2e 2b 29 24 7d 69 44 27 2c 20 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 74 28 29 2c 20 24 6d | .+)$}iD',.$link->getTarget(),.$m |
125c0 | 61 74 63 68 29 29 20 7b 0a 0a 69 66 20 28 69 73 73 65 74 28 24 65 78 74 65 6e 73 69 6f 6e 50 72 | atch)).{..if.(isset($extensionPr |
125e0 | 6f 76 69 64 65 72 73 5b 24 6d 61 74 63 68 5b 31 5d 5d 29 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 | oviders[$match[1]])).{.foreach.( |
12600 | 24 65 78 74 65 6e 73 69 6f 6e 50 72 6f 76 69 64 65 72 73 5b 24 6d 61 74 63 68 5b 31 5d 5d 20 61 | $extensionProviders[$match[1]].a |
12620 | 73 20 24 70 72 6f 76 69 64 65 64 29 20 7b 0a 69 66 20 28 24 70 72 6f 76 69 64 65 64 2d 3e 6d 61 | s.$provided).{.if.($provided->ma |
12640 | 74 63 68 65 73 28 24 6c 69 6e 6b 2d 3e 67 65 74 43 6f 6e 73 74 72 61 69 6e 74 28 29 29 29 20 7b | tches($link->getConstraint())).{ |
12660 | 0a 63 6f 6e 74 69 6e 75 65 20 32 3b 0a 7d 0a 7d 0a 7d 0a 0a 69 66 20 28 24 6d 61 74 63 68 5b 31 | .continue.2;.}.}.}..if.($match[1 |
12680 | 5d 20 3d 3d 3d 20 27 7a 65 6e 64 2d 6f 70 63 61 63 68 65 27 29 20 7b 0a 24 6d 61 74 63 68 5b 31 | ].===.'zend-opcache').{.$match[1 |
126a0 | 5d 20 3d 20 27 7a 65 6e 64 20 6f 70 63 61 63 68 65 27 3b 0a 7d 0a 0a 24 65 78 74 65 6e 73 69 6f | ].=.'zend.opcache';.}..$extensio |
126c0 | 6e 20 3d 20 76 61 72 5f 65 78 70 6f 72 74 28 24 6d 61 74 63 68 5b 31 5d 2c 20 74 72 75 65 29 3b | n.=.var_export($match[1],.true); |
126e0 | 0a 69 66 20 28 24 6d 61 74 63 68 5b 31 5d 20 3d 3d 3d 20 27 70 63 6e 74 6c 27 20 7c 7c 20 24 6d | .if.($match[1].===.'pcntl'.||.$m |
12700 | 61 74 63 68 5b 31 5d 20 3d 3d 3d 20 27 72 65 61 64 6c 69 6e 65 27 29 20 7b 0a 24 72 65 71 75 69 | atch[1].===.'readline').{.$requi |
12720 | 72 65 64 45 78 74 65 6e 73 69 6f 6e 73 5b 24 65 78 74 65 6e 73 69 6f 6e 5d 20 3d 20 22 50 48 50 | redExtensions[$extension].=."PHP |
12740 | 5f 53 41 50 49 20 21 3d 3d 20 27 63 6c 69 27 20 7c 7c 20 65 78 74 65 6e 73 69 6f 6e 5f 6c 6f 61 | _SAPI.!==.'cli'.||.extension_loa |
12760 | 64 65 64 28 24 65 78 74 65 6e 73 69 6f 6e 29 20 7c 7c 20 5c 24 6d 69 73 73 69 6e 67 45 78 74 65 | ded($extension).||.\$missingExte |
12780 | 6e 73 69 6f 6e 73 5b 5d 20 3d 20 24 65 78 74 65 6e 73 69 6f 6e 3b 5c 6e 22 3b 0a 7d 20 65 6c 73 | nsions[].=.$extension;\n";.}.els |
127a0 | 65 20 7b 0a 24 72 65 71 75 69 72 65 64 45 78 74 65 6e 73 69 6f 6e 73 5b 24 65 78 74 65 6e 73 69 | e.{.$requiredExtensions[$extensi |
127c0 | 6f 6e 5d 20 3d 20 22 65 78 74 65 6e 73 69 6f 6e 5f 6c 6f 61 64 65 64 28 24 65 78 74 65 6e 73 69 | on].=."extension_loaded($extensi |
127e0 | 6f 6e 29 20 7c 7c 20 5c 24 6d 69 73 73 69 6e 67 45 78 74 65 6e 73 69 6f 6e 73 5b 5d 20 3d 20 24 | on).||.\$missingExtensions[].=.$ |
12800 | 65 78 74 65 6e 73 69 6f 6e 3b 5c 6e 22 3b 0a 7d 0a 7d 0a 7d 0a 7d 0a 0a 6b 73 6f 72 74 28 24 72 | extension;\n";.}.}.}.}..ksort($r |
12820 | 65 71 75 69 72 65 64 45 78 74 65 6e 73 69 6f 6e 73 29 3b 0a 0a 24 66 6f 72 6d 61 74 54 6f 50 68 | equiredExtensions);..$formatToPh |
12840 | 70 56 65 72 73 69 6f 6e 49 64 20 3d 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 42 6f | pVersionId.=.static.function.(Bo |
12860 | 75 6e 64 20 24 62 6f 75 6e 64 29 3a 20 69 6e 74 20 7b 0a 69 66 20 28 24 62 6f 75 6e 64 2d 3e 69 | und.$bound):.int.{.if.($bound->i |
12880 | 73 5a 65 72 6f 28 29 29 20 7b 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 0a 69 66 20 28 24 62 6f 75 | sZero()).{.return.0;.}..if.($bou |
128a0 | 6e 64 2d 3e 69 73 50 6f 73 69 74 69 76 65 49 6e 66 69 6e 69 74 79 28 29 29 20 7b 0a 72 65 74 75 | nd->isPositiveInfinity()).{.retu |
128c0 | 72 6e 20 39 39 39 39 39 3b 0a 7d 0a 0a 24 76 65 72 73 69 6f 6e 20 3d 20 73 74 72 5f 72 65 70 6c | rn.99999;.}..$version.=.str_repl |
128e0 | 61 63 65 28 27 2d 27 2c 20 27 2e 27 2c 20 24 62 6f 75 6e 64 2d 3e 67 65 74 56 65 72 73 69 6f 6e | ace('-',.'.',.$bound->getVersion |
12900 | 28 29 29 3b 0a 24 63 68 75 6e 6b 73 20 3d 20 61 72 72 61 79 5f 6d 61 70 28 27 69 6e 74 76 61 6c | ());.$chunks.=.array_map('intval |
12920 | 27 2c 20 65 78 70 6c 6f 64 65 28 27 2e 27 2c 20 24 76 65 72 73 69 6f 6e 29 29 3b 0a 0a 72 65 74 | ',.explode('.',.$version));..ret |
12940 | 75 72 6e 20 24 63 68 75 6e 6b 73 5b 30 5d 20 2a 20 31 30 30 30 30 20 2b 20 24 63 68 75 6e 6b 73 | urn.$chunks[0].*.10000.+.$chunks |
12960 | 5b 31 5d 20 2a 20 31 30 30 20 2b 20 24 63 68 75 6e 6b 73 5b 32 5d 3b 0a 7d 3b 0a 0a 24 66 6f 72 | [1].*.100.+.$chunks[2];.};..$for |
12980 | 6d 61 74 54 6f 48 75 6d 61 6e 52 65 61 64 61 62 6c 65 20 3d 20 73 74 61 74 69 63 20 66 75 6e 63 | matToHumanReadable.=.static.func |
129a0 | 74 69 6f 6e 20 28 42 6f 75 6e 64 20 24 62 6f 75 6e 64 29 20 7b 0a 69 66 20 28 24 62 6f 75 6e 64 | tion.(Bound.$bound).{.if.($bound |
129c0 | 2d 3e 69 73 5a 65 72 6f 28 29 29 20 7b 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 0a 69 66 20 28 24 | ->isZero()).{.return.0;.}..if.($ |
129e0 | 62 6f 75 6e 64 2d 3e 69 73 50 6f 73 69 74 69 76 65 49 6e 66 69 6e 69 74 79 28 29 29 20 7b 0a 72 | bound->isPositiveInfinity()).{.r |
12a00 | 65 74 75 72 6e 20 39 39 39 39 39 3b 0a 7d 0a 0a 24 76 65 72 73 69 6f 6e 20 3d 20 73 74 72 5f 72 | eturn.99999;.}..$version.=.str_r |
12a20 | 65 70 6c 61 63 65 28 27 2d 27 2c 20 27 2e 27 2c 20 24 62 6f 75 6e 64 2d 3e 67 65 74 56 65 72 73 | eplace('-',.'.',.$bound->getVers |
12a40 | 69 6f 6e 28 29 29 3b 0a 24 63 68 75 6e 6b 73 20 3d 20 65 78 70 6c 6f 64 65 28 27 2e 27 2c 20 24 | ion());.$chunks.=.explode('.',.$ |
12a60 | 76 65 72 73 69 6f 6e 29 3b 0a 24 63 68 75 6e 6b 73 20 3d 20 61 72 72 61 79 5f 73 6c 69 63 65 28 | version);.$chunks.=.array_slice( |
12a80 | 24 63 68 75 6e 6b 73 2c 20 30 2c 20 33 29 3b 0a 0a 72 65 74 75 72 6e 20 69 6d 70 6c 6f 64 65 28 | $chunks,.0,.3);..return.implode( |
12aa0 | 27 2e 27 2c 20 24 63 68 75 6e 6b 73 29 3b 0a 7d 3b 0a 0a 24 72 65 71 75 69 72 65 64 50 68 70 20 | '.',.$chunks);.};..$requiredPhp. |
12ac0 | 3d 20 27 27 3b 0a 24 72 65 71 75 69 72 65 64 50 68 70 45 72 72 6f 72 20 3d 20 27 27 3b 0a 69 66 | =.'';.$requiredPhpError.=.'';.if |
12ae0 | 20 28 21 24 6c 6f 77 65 73 74 50 68 70 56 65 72 73 69 6f 6e 2d 3e 69 73 5a 65 72 6f 28 29 29 20 | .(!$lowestPhpVersion->isZero()). |
12b00 | 7b 0a 24 6f 70 65 72 61 74 6f 72 20 3d 20 24 6c 6f 77 65 73 74 50 68 70 56 65 72 73 69 6f 6e 2d | {.$operator.=.$lowestPhpVersion- |
12b20 | 3e 69 73 49 6e 63 6c 75 73 69 76 65 28 29 20 3f 20 27 3e 3d 27 20 3a 20 27 3e 27 3b 0a 24 72 65 | >isInclusive().?.'>='.:.'>';.$re |
12b40 | 71 75 69 72 65 64 50 68 70 20 3d 20 27 50 48 50 5f 56 45 52 53 49 4f 4e 5f 49 44 20 27 2e 24 6f | quiredPhp.=.'PHP_VERSION_ID.'.$o |
12b60 | 70 65 72 61 74 6f 72 2e 27 20 27 2e 24 66 6f 72 6d 61 74 54 6f 50 68 70 56 65 72 73 69 6f 6e 49 | perator.'.'.$formatToPhpVersionI |
12b80 | 64 28 24 6c 6f 77 65 73 74 50 68 70 56 65 72 73 69 6f 6e 29 3b 0a 24 72 65 71 75 69 72 65 64 50 | d($lowestPhpVersion);.$requiredP |
12ba0 | 68 70 45 72 72 6f 72 20 3d 20 27 22 27 2e 24 6f 70 65 72 61 74 6f 72 2e 27 20 27 2e 24 66 6f 72 | hpError.=.'"'.$operator.'.'.$for |
12bc0 | 6d 61 74 54 6f 48 75 6d 61 6e 52 65 61 64 61 62 6c 65 28 24 6c 6f 77 65 73 74 50 68 70 56 65 72 | matToHumanReadable($lowestPhpVer |
12be0 | 73 69 6f 6e 29 2e 27 22 27 3b 0a 7d 0a 0a 69 66 20 28 24 72 65 71 75 69 72 65 64 50 68 70 29 20 | sion).'"';.}..if.($requiredPhp). |
12c00 | 7b 0a 24 72 65 71 75 69 72 65 64 50 68 70 20 3d 20 3c 3c 3c 50 48 50 5f 43 48 45 43 4b 0a 0a 69 | {.$requiredPhp.=.<<<PHP_CHECK..i |
12c20 | 66 20 28 21 28 24 72 65 71 75 69 72 65 64 50 68 70 29 29 20 7b 0a 20 20 20 20 5c 24 69 73 73 75 | f.(!($requiredPhp)).{.....\$issu |
12c40 | 65 73 5b 5d 20 3d 20 27 59 6f 75 72 20 43 6f 6d 70 6f 73 65 72 20 64 65 70 65 6e 64 65 6e 63 69 | es[].=.'Your.Composer.dependenci |
12c60 | 65 73 20 72 65 71 75 69 72 65 20 61 20 50 48 50 20 76 65 72 73 69 6f 6e 20 24 72 65 71 75 69 72 | es.require.a.PHP.version.$requir |
12c80 | 65 64 50 68 70 45 72 72 6f 72 2e 20 59 6f 75 20 61 72 65 20 72 75 6e 6e 69 6e 67 20 27 20 2e 20 | edPhpError..You.are.running.'... |
12ca0 | 50 48 50 5f 56 45 52 53 49 4f 4e 20 2e 20 27 2e 27 3b 0a 7d 0a 0a 50 48 50 5f 43 48 45 43 4b 3b | PHP_VERSION...'.';.}..PHP_CHECK; |
12cc0 | 0a 7d 0a 0a 24 72 65 71 75 69 72 65 64 45 78 74 65 6e 73 69 6f 6e 73 20 3d 20 69 6d 70 6c 6f 64 | .}..$requiredExtensions.=.implod |
12ce0 | 65 28 27 27 2c 20 24 72 65 71 75 69 72 65 64 45 78 74 65 6e 73 69 6f 6e 73 29 3b 0a 69 66 20 28 | e('',.$requiredExtensions);.if.( |
12d00 | 27 27 20 21 3d 3d 20 24 72 65 71 75 69 72 65 64 45 78 74 65 6e 73 69 6f 6e 73 29 20 7b 0a 24 72 | ''.!==.$requiredExtensions).{.$r |
12d20 | 65 71 75 69 72 65 64 45 78 74 65 6e 73 69 6f 6e 73 20 3d 20 3c 3c 3c 45 58 54 5f 43 48 45 43 4b | equiredExtensions.=.<<<EXT_CHECK |
12d40 | 53 0a 0a 5c 24 6d 69 73 73 69 6e 67 45 78 74 65 6e 73 69 6f 6e 73 20 3d 20 61 72 72 61 79 28 29 | S..\$missingExtensions.=.array() |
12d60 | 3b 0a 24 72 65 71 75 69 72 65 64 45 78 74 65 6e 73 69 6f 6e 73 0a 69 66 20 28 5c 24 6d 69 73 73 | ;.$requiredExtensions.if.(\$miss |
12d80 | 69 6e 67 45 78 74 65 6e 73 69 6f 6e 73 29 20 7b 0a 20 20 20 20 5c 24 69 73 73 75 65 73 5b 5d 20 | ingExtensions).{.....\$issues[]. |
12da0 | 3d 20 27 59 6f 75 72 20 43 6f 6d 70 6f 73 65 72 20 64 65 70 65 6e 64 65 6e 63 69 65 73 20 72 65 | =.'Your.Composer.dependencies.re |
12dc0 | 71 75 69 72 65 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 50 48 50 20 65 78 74 65 6e 73 69 6f | quire.the.following.PHP.extensio |
12de0 | 6e 73 20 74 6f 20 62 65 20 69 6e 73 74 61 6c 6c 65 64 3a 20 27 20 2e 20 69 6d 70 6c 6f 64 65 28 | ns.to.be.installed:.'...implode( |
12e00 | 27 2c 20 27 2c 20 5c 24 6d 69 73 73 69 6e 67 45 78 74 65 6e 73 69 6f 6e 73 29 20 2e 20 27 2e 27 | ',.',.\$missingExtensions)...'.' |
12e20 | 3b 0a 7d 0a 0a 45 58 54 5f 43 48 45 43 4b 53 3b 0a 7d 0a 0a 69 66 20 28 21 24 72 65 71 75 69 72 | ;.}..EXT_CHECKS;.}..if.(!$requir |
12e40 | 65 64 50 68 70 20 26 26 20 21 24 72 65 71 75 69 72 65 64 45 78 74 65 6e 73 69 6f 6e 73 29 20 7b | edPhp.&&.!$requiredExtensions).{ |
12e60 | 0a 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 3c 3c 3c 50 4c 41 54 46 | .return.null;.}..return.<<<PLATF |
12e80 | 4f 52 4d 5f 43 48 45 43 4b 0a 3c 3f 70 68 70 0a 0a 2f 2f 20 70 6c 61 74 66 6f 72 6d 5f 63 68 65 | ORM_CHECK.<?php..//.platform_che |
12ea0 | 63 6b 2e 70 68 70 20 40 67 65 6e 65 72 61 74 65 64 20 62 79 20 43 6f 6d 70 6f 73 65 72 0a 0a 5c | ck.php.@generated.by.Composer..\ |
12ec0 | 24 69 73 73 75 65 73 20 3d 20 61 72 72 61 79 28 29 3b 0a 7b 24 72 65 71 75 69 72 65 64 50 68 70 | $issues.=.array();.{$requiredPhp |
12ee0 | 7d 7b 24 72 65 71 75 69 72 65 64 45 78 74 65 6e 73 69 6f 6e 73 7d 0a 69 66 20 28 5c 24 69 73 73 | }{$requiredExtensions}.if.(\$iss |
12f00 | 75 65 73 29 20 7b 0a 20 20 20 20 69 66 20 28 21 68 65 61 64 65 72 73 5f 73 65 6e 74 28 29 29 20 | ues).{.....if.(!headers_sent()). |
12f20 | 7b 0a 20 20 20 20 20 20 20 20 68 65 61 64 65 72 28 27 48 54 54 50 2f 31 2e 31 20 35 30 30 20 49 | {.........header('HTTP/1.1.500.I |
12f40 | 6e 74 65 72 6e 61 6c 20 53 65 72 76 65 72 20 45 72 72 6f 72 27 29 3b 0a 20 20 20 20 7d 0a 20 20 | nternal.Server.Error');.....}... |
12f60 | 20 20 69 66 20 28 21 69 6e 69 5f 67 65 74 28 27 64 69 73 70 6c 61 79 5f 65 72 72 6f 72 73 27 29 | ..if.(!ini_get('display_errors') |
12f80 | 29 20 7b 0a 20 20 20 20 20 20 20 20 69 66 20 28 50 48 50 5f 53 41 50 49 20 3d 3d 3d 20 27 63 6c | ).{.........if.(PHP_SAPI.===.'cl |
12fa0 | 69 27 20 7c 7c 20 50 48 50 5f 53 41 50 49 20 3d 3d 3d 20 27 70 68 70 64 62 67 27 29 20 7b 0a 20 | i'.||.PHP_SAPI.===.'phpdbg').{.. |
12fc0 | 20 20 20 20 20 20 20 20 20 20 20 66 77 72 69 74 65 28 53 54 44 45 52 52 2c 20 27 43 6f 6d 70 6f | ...........fwrite(STDERR,.'Compo |
12fe0 | 73 65 72 20 64 65 74 65 63 74 65 64 20 69 73 73 75 65 73 20 69 6e 20 79 6f 75 72 20 70 6c 61 74 | ser.detected.issues.in.your.plat |
13000 | 66 6f 72 6d 3a 27 20 2e 20 50 48 50 5f 45 4f 4c 2e 50 48 50 5f 45 4f 4c 20 2e 20 69 6d 70 6c 6f | form:'...PHP_EOL.PHP_EOL...implo |
13020 | 64 65 28 50 48 50 5f 45 4f 4c 2c 20 5c 24 69 73 73 75 65 73 29 20 2e 20 50 48 50 5f 45 4f 4c 2e | de(PHP_EOL,.\$issues)...PHP_EOL. |
13040 | 50 48 50 5f 45 4f 4c 29 3b 0a 20 20 20 20 20 20 20 20 7d 20 65 6c 73 65 69 66 20 28 21 68 65 61 | PHP_EOL);.........}.elseif.(!hea |
13060 | 64 65 72 73 5f 73 65 6e 74 28 29 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 65 63 68 6f 20 | ders_sent()).{.............echo. |
13080 | 27 43 6f 6d 70 6f 73 65 72 20 64 65 74 65 63 74 65 64 20 69 73 73 75 65 73 20 69 6e 20 79 6f 75 | 'Composer.detected.issues.in.you |
130a0 | 72 20 70 6c 61 74 66 6f 72 6d 3a 27 20 2e 20 50 48 50 5f 45 4f 4c 2e 50 48 50 5f 45 4f 4c 20 2e | r.platform:'...PHP_EOL.PHP_EOL.. |
130c0 | 20 73 74 72 5f 72 65 70 6c 61 63 65 28 27 59 6f 75 20 61 72 65 20 72 75 6e 6e 69 6e 67 20 27 2e | .str_replace('You.are.running.'. |
130e0 | 50 48 50 5f 56 45 52 53 49 4f 4e 2e 27 2e 27 2c 20 27 27 2c 20 69 6d 70 6c 6f 64 65 28 50 48 50 | PHP_VERSION.'.',.'',.implode(PHP |
13100 | 5f 45 4f 4c 2c 20 5c 24 69 73 73 75 65 73 29 29 20 2e 20 50 48 50 5f 45 4f 4c 2e 50 48 50 5f 45 | _EOL,.\$issues))...PHP_EOL.PHP_E |
13120 | 4f 4c 3b 0a 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 7d 0a 20 20 20 20 74 72 69 67 67 65 72 5f | OL;.........}.....}.....trigger_ |
13140 | 65 72 72 6f 72 28 0a 20 20 20 20 20 20 20 20 27 43 6f 6d 70 6f 73 65 72 20 64 65 74 65 63 74 65 | error(.........'Composer.detecte |
13160 | 64 20 69 73 73 75 65 73 20 69 6e 20 79 6f 75 72 20 70 6c 61 74 66 6f 72 6d 3a 20 27 20 2e 20 69 | d.issues.in.your.platform:.'...i |
13180 | 6d 70 6c 6f 64 65 28 27 20 27 2c 20 5c 24 69 73 73 75 65 73 29 2c 0a 20 20 20 20 20 20 20 20 45 | mplode('.',.\$issues),.........E |
131a0 | 5f 55 53 45 52 5f 45 52 52 4f 52 0a 20 20 20 20 29 3b 0a 7d 0a 0a 50 4c 41 54 46 4f 52 4d 5f 43 | _USER_ERROR.....);.}..PLATFORM_C |
131c0 | 48 45 43 4b 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 67 | HECK;.}.....protected.function.g |
131e0 | 65 74 41 75 74 6f 6c 6f 61 64 46 69 6c 65 28 73 74 72 69 6e 67 20 24 76 65 6e 64 6f 72 50 61 74 | etAutoloadFile(string.$vendorPat |
13200 | 68 54 6f 54 61 72 67 65 74 44 69 72 43 6f 64 65 2c 20 73 74 72 69 6e 67 20 24 73 75 66 66 69 78 | hToTargetDirCode,.string.$suffix |
13220 | 29 0a 7b 0a 24 6c 61 73 74 43 68 61 72 20 3d 20 24 76 65 6e 64 6f 72 50 61 74 68 54 6f 54 61 72 | ).{.$lastChar.=.$vendorPathToTar |
13240 | 67 65 74 44 69 72 43 6f 64 65 5b 73 74 72 6c 65 6e 28 24 76 65 6e 64 6f 72 50 61 74 68 54 6f 54 | getDirCode[strlen($vendorPathToT |
13260 | 61 72 67 65 74 44 69 72 43 6f 64 65 29 20 2d 20 31 5d 3b 0a 69 66 20 28 22 27 22 20 3d 3d 3d 20 | argetDirCode).-.1];.if.("'".===. |
13280 | 24 6c 61 73 74 43 68 61 72 20 7c 7c 20 27 22 27 20 3d 3d 3d 20 24 6c 61 73 74 43 68 61 72 29 20 | $lastChar.||.'"'.===.$lastChar). |
132a0 | 7b 0a 24 76 65 6e 64 6f 72 50 61 74 68 54 6f 54 61 72 67 65 74 44 69 72 43 6f 64 65 20 3d 20 73 | {.$vendorPathToTargetDirCode.=.s |
132c0 | 75 62 73 74 72 28 24 76 65 6e 64 6f 72 50 61 74 68 54 6f 54 61 72 67 65 74 44 69 72 43 6f 64 65 | ubstr($vendorPathToTargetDirCode |
132e0 | 2c 20 30 2c 20 2d 31 29 2e 27 2f 61 75 74 6f 6c 6f 61 64 5f 72 65 61 6c 2e 70 68 70 27 2e 24 6c | ,.0,.-1).'/autoload_real.php'.$l |
13300 | 61 73 74 43 68 61 72 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 76 65 6e 64 6f 72 50 61 74 68 54 6f 54 | astChar;.}.else.{.$vendorPathToT |
13320 | 61 72 67 65 74 44 69 72 43 6f 64 65 20 2e 3d 20 22 20 2e 20 27 2f 61 75 74 6f 6c 6f 61 64 5f 72 | argetDirCode..=."...'/autoload_r |
13340 | 65 61 6c 2e 70 68 70 27 22 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 3c 3c 3c 41 55 54 4f 4c 4f 41 44 | eal.php'";.}..return.<<<AUTOLOAD |
13360 | 0a 3c 3f 70 68 70 0a 0a 2f 2f 20 61 75 74 6f 6c 6f 61 64 2e 70 68 70 20 40 67 65 6e 65 72 61 74 | .<?php..//.autoload.php.@generat |
13380 | 65 64 20 62 79 20 43 6f 6d 70 6f 73 65 72 0a 0a 69 66 20 28 50 48 50 5f 56 45 52 53 49 4f 4e 5f | ed.by.Composer..if.(PHP_VERSION_ |
133a0 | 49 44 20 3c 20 35 30 36 30 30 29 20 7b 0a 20 20 20 20 65 63 68 6f 20 27 43 6f 6d 70 6f 73 65 72 | ID.<.50600).{.....echo.'Composer |
133c0 | 20 32 2e 33 2e 30 20 64 72 6f 70 70 65 64 20 73 75 70 70 6f 72 74 20 66 6f 72 20 61 75 74 6f 6c | .2.3.0.dropped.support.for.autol |
133e0 | 6f 61 64 69 6e 67 20 6f 6e 20 50 48 50 20 3c 35 2e 36 20 61 6e 64 20 79 6f 75 20 61 72 65 20 72 | oading.on.PHP.<5.6.and.you.are.r |
13400 | 75 6e 6e 69 6e 67 20 27 2e 50 48 50 5f 56 45 52 53 49 4f 4e 2e 27 2c 20 70 6c 65 61 73 65 20 75 | unning.'.PHP_VERSION.',.please.u |
13420 | 70 67 72 61 64 65 20 50 48 50 20 6f 72 20 75 73 65 20 43 6f 6d 70 6f 73 65 72 20 32 2e 32 20 4c | pgrade.PHP.or.use.Composer.2.2.L |
13440 | 54 53 20 76 69 61 20 22 63 6f 6d 70 6f 73 65 72 20 73 65 6c 66 2d 75 70 64 61 74 65 20 2d 2d 32 | TS.via."composer.self-update.--2 |
13460 | 2e 32 22 2e 20 41 62 6f 72 74 69 6e 67 2e 27 2e 50 48 50 5f 45 4f 4c 3b 0a 20 20 20 20 65 78 69 | .2"..Aborting.'.PHP_EOL;.....exi |
13480 | 74 28 31 29 3b 0a 7d 0a 0a 72 65 71 75 69 72 65 5f 6f 6e 63 65 20 24 76 65 6e 64 6f 72 50 61 74 | t(1);.}..require_once.$vendorPat |
134a0 | 68 54 6f 54 61 72 67 65 74 44 69 72 43 6f 64 65 3b 0a 0a 72 65 74 75 72 6e 20 43 6f 6d 70 6f 73 | hToTargetDirCode;..return.Compos |
134c0 | 65 72 41 75 74 6f 6c 6f 61 64 65 72 49 6e 69 74 24 73 75 66 66 69 78 3a 3a 67 65 74 4c 6f 61 64 | erAutoloaderInit$suffix::getLoad |
134e0 | 65 72 28 29 3b 0a 0a 41 55 54 4f 4c 4f 41 44 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 | er();..AUTOLOAD;.}........protec |
13500 | 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 41 75 74 6f 6c 6f 61 64 52 65 61 6c 46 69 6c 65 | ted.function.getAutoloadRealFile |
13520 | 28 62 6f 6f 6c 20 24 75 73 65 43 6c 61 73 73 4d 61 70 2c 20 62 6f 6f 6c 20 24 75 73 65 49 6e 63 | (bool.$useClassMap,.bool.$useInc |
13540 | 6c 75 64 65 50 61 74 68 2c 20 3f 73 74 72 69 6e 67 20 24 74 61 72 67 65 74 44 69 72 4c 6f 61 64 | ludePath,.?string.$targetDirLoad |
13560 | 65 72 2c 20 62 6f 6f 6c 20 24 75 73 65 49 6e 63 6c 75 64 65 46 69 6c 65 73 2c 20 73 74 72 69 6e | er,.bool.$useIncludeFiles,.strin |
13580 | 67 20 24 76 65 6e 64 6f 72 50 61 74 68 43 6f 64 65 2c 20 73 74 72 69 6e 67 20 24 61 70 70 42 61 | g.$vendorPathCode,.string.$appBa |
135a0 | 73 65 44 69 72 43 6f 64 65 2c 20 73 74 72 69 6e 67 20 24 73 75 66 66 69 78 2c 20 62 6f 6f 6c 20 | seDirCode,.string.$suffix,.bool. |
135c0 | 24 75 73 65 47 6c 6f 62 61 6c 49 6e 63 6c 75 64 65 50 61 74 68 2c 20 73 74 72 69 6e 67 20 24 70 | $useGlobalIncludePath,.string.$p |
135e0 | 72 65 70 65 6e 64 41 75 74 6f 6c 6f 61 64 65 72 2c 20 62 6f 6f 6c 20 24 63 68 65 63 6b 50 6c 61 | rependAutoloader,.bool.$checkPla |
13600 | 74 66 6f 72 6d 29 0a 7b 0a 24 66 69 6c 65 20 3d 20 3c 3c 3c 48 45 41 44 45 52 0a 3c 3f 70 68 70 | tform).{.$file.=.<<<HEADER.<?php |
13620 | 0a 0a 2f 2f 20 61 75 74 6f 6c 6f 61 64 5f 72 65 61 6c 2e 70 68 70 20 40 67 65 6e 65 72 61 74 65 | ..//.autoload_real.php.@generate |
13640 | 64 20 62 79 20 43 6f 6d 70 6f 73 65 72 0a 0a 63 6c 61 73 73 20 43 6f 6d 70 6f 73 65 72 41 75 74 | d.by.Composer..class.ComposerAut |
13660 | 6f 6c 6f 61 64 65 72 49 6e 69 74 24 73 75 66 66 69 78 0a 7b 0a 20 20 20 20 70 72 69 76 61 74 65 | oloaderInit$suffix.{.....private |
13680 | 20 73 74 61 74 69 63 20 5c 24 6c 6f 61 64 65 72 3b 0a 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 | .static.\$loader;......public.st |
136a0 | 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 6c 6f 61 64 43 6c 61 73 73 4c 6f 61 64 65 72 28 5c 24 | atic.function.loadClassLoader(\$ |
136c0 | 63 6c 61 73 73 29 0a 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 69 66 20 28 27 43 6f 6d 70 6f 73 | class).....{.........if.('Compos |
136e0 | 65 72 5c 5c 41 75 74 6f 6c 6f 61 64 5c 5c 43 6c 61 73 73 4c 6f 61 64 65 72 27 20 3d 3d 3d 20 5c | er\\Autoload\\ClassLoader'.===.\ |
13700 | 24 63 6c 61 73 73 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 71 75 69 72 65 20 5f 5f | $class).{.............require.__ |
13720 | 44 49 52 5f 5f 20 2e 20 27 2f 43 6c 61 73 73 4c 6f 61 64 65 72 2e 70 68 70 27 3b 0a 20 20 20 20 | DIR__...'/ClassLoader.php';..... |
13740 | 20 20 20 20 7d 0a 20 20 20 20 7d 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 20 2a 20 40 72 65 74 | ....}.....}....../**......*.@ret |
13760 | 75 72 6e 20 5c 43 6f 6d 70 6f 73 65 72 5c 41 75 74 6f 6c 6f 61 64 5c 43 6c 61 73 73 4c 6f 61 64 | urn.\Composer\Autoload\ClassLoad |
13780 | 65 72 0a 20 20 20 20 20 2a 2f 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 66 75 6e | er......*/.....public.static.fun |
137a0 | 63 74 69 6f 6e 20 67 65 74 4c 6f 61 64 65 72 28 29 0a 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 | ction.getLoader().....{......... |
137c0 | 69 66 20 28 6e 75 6c 6c 20 21 3d 3d 20 73 65 6c 66 3a 3a 5c 24 6c 6f 61 64 65 72 29 20 7b 0a 20 | if.(null.!==.self::\$loader).{.. |
137e0 | 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 73 65 6c 66 3a 3a 5c 24 6c 6f 61 64 65 72 | ...........return.self::\$loader |
13800 | 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a 0a 48 45 41 44 45 52 3b 0a 0a 69 66 20 28 24 63 68 65 63 | ;.........}...HEADER;..if.($chec |
13820 | 6b 50 6c 61 74 66 6f 72 6d 29 20 7b 0a 24 66 69 6c 65 20 2e 3d 20 3c 3c 3c 27 50 4c 41 54 46 4f | kPlatform).{.$file..=.<<<'PLATFO |
13840 | 52 4d 5f 43 48 45 43 4b 27 0a 20 20 20 20 20 20 20 20 72 65 71 75 69 72 65 20 5f 5f 44 49 52 5f | RM_CHECK'.........require.__DIR_ |
13860 | 5f 20 2e 20 27 2f 70 6c 61 74 66 6f 72 6d 5f 63 68 65 63 6b 2e 70 68 70 27 3b 0a 0a 0a 50 4c 41 | _...'/platform_check.php';...PLA |
13880 | 54 46 4f 52 4d 5f 43 48 45 43 4b 3b 0a 7d 0a 0a 24 66 69 6c 65 20 2e 3d 20 3c 3c 3c 43 4c 41 53 | TFORM_CHECK;.}..$file..=.<<<CLAS |
138a0 | 53 4c 4f 41 44 45 52 5f 49 4e 49 54 0a 20 20 20 20 20 20 20 20 73 70 6c 5f 61 75 74 6f 6c 6f 61 | SLOADER_INIT.........spl_autoloa |
138c0 | 64 5f 72 65 67 69 73 74 65 72 28 61 72 72 61 79 28 27 43 6f 6d 70 6f 73 65 72 41 75 74 6f 6c 6f | d_register(array('ComposerAutolo |
138e0 | 61 64 65 72 49 6e 69 74 24 73 75 66 66 69 78 27 2c 20 27 6c 6f 61 64 43 6c 61 73 73 4c 6f 61 64 | aderInit$suffix',.'loadClassLoad |
13900 | 65 72 27 29 2c 20 74 72 75 65 2c 20 24 70 72 65 70 65 6e 64 41 75 74 6f 6c 6f 61 64 65 72 29 3b | er'),.true,.$prependAutoloader); |
13920 | 0a 20 20 20 20 20 20 20 20 73 65 6c 66 3a 3a 5c 24 6c 6f 61 64 65 72 20 3d 20 5c 24 6c 6f 61 64 | .........self::\$loader.=.\$load |
13940 | 65 72 20 3d 20 6e 65 77 20 5c 5c 43 6f 6d 70 6f 73 65 72 5c 5c 41 75 74 6f 6c 6f 61 64 5c 5c 43 | er.=.new.\\Composer\\Autoload\\C |
13960 | 6c 61 73 73 4c 6f 61 64 65 72 28 5c 5c 64 69 72 6e 61 6d 65 28 5f 5f 44 49 52 5f 5f 29 29 3b 0a | lassLoader(\\dirname(__DIR__));. |
13980 | 20 20 20 20 20 20 20 20 73 70 6c 5f 61 75 74 6f 6c 6f 61 64 5f 75 6e 72 65 67 69 73 74 65 72 28 | ........spl_autoload_unregister( |
139a0 | 61 72 72 61 79 28 27 43 6f 6d 70 6f 73 65 72 41 75 74 6f 6c 6f 61 64 65 72 49 6e 69 74 24 73 75 | array('ComposerAutoloaderInit$su |
139c0 | 66 66 69 78 27 2c 20 27 6c 6f 61 64 43 6c 61 73 73 4c 6f 61 64 65 72 27 29 29 3b 0a 0a 0a 43 4c | ffix',.'loadClassLoader'));...CL |
139e0 | 41 53 53 4c 4f 41 44 45 52 5f 49 4e 49 54 3b 0a 0a 69 66 20 28 24 75 73 65 49 6e 63 6c 75 64 65 | ASSLOADER_INIT;..if.($useInclude |
13a00 | 50 61 74 68 29 20 7b 0a 24 66 69 6c 65 20 2e 3d 20 3c 3c 3c 27 49 4e 43 4c 55 44 45 5f 50 41 54 | Path).{.$file..=.<<<'INCLUDE_PAT |
13a20 | 48 27 0a 20 20 20 20 20 20 20 20 24 69 6e 63 6c 75 64 65 50 61 74 68 73 20 3d 20 72 65 71 75 69 | H'.........$includePaths.=.requi |
13a40 | 72 65 20 5f 5f 44 49 52 5f 5f 20 2e 20 27 2f 69 6e 63 6c 75 64 65 5f 70 61 74 68 73 2e 70 68 70 | re.__DIR__...'/include_paths.php |
13a60 | 27 3b 0a 20 20 20 20 20 20 20 20 24 69 6e 63 6c 75 64 65 50 61 74 68 73 5b 5d 20 3d 20 67 65 74 | ';.........$includePaths[].=.get |
13a80 | 5f 69 6e 63 6c 75 64 65 5f 70 61 74 68 28 29 3b 0a 20 20 20 20 20 20 20 20 73 65 74 5f 69 6e 63 | _include_path();.........set_inc |
13aa0 | 6c 75 64 65 5f 70 61 74 68 28 69 6d 70 6c 6f 64 65 28 50 41 54 48 5f 53 45 50 41 52 41 54 4f 52 | lude_path(implode(PATH_SEPARATOR |
13ac0 | 2c 20 24 69 6e 63 6c 75 64 65 50 61 74 68 73 29 29 3b 0a 0a 0a 49 4e 43 4c 55 44 45 5f 50 41 54 | ,.$includePaths));...INCLUDE_PAT |
13ae0 | 48 3b 0a 7d 0a 0a 0a 24 66 69 6c 65 20 2e 3d 20 3c 3c 3c 53 54 41 54 49 43 5f 49 4e 49 54 0a 20 | H;.}...$file..=.<<<STATIC_INIT.. |
13b00 | 20 20 20 20 20 20 20 72 65 71 75 69 72 65 20 5f 5f 44 49 52 5f 5f 20 2e 20 27 2f 61 75 74 6f 6c | .......require.__DIR__...'/autol |
13b20 | 6f 61 64 5f 73 74 61 74 69 63 2e 70 68 70 27 3b 0a 20 20 20 20 20 20 20 20 63 61 6c 6c 5f 75 73 | oad_static.php';.........call_us |
13b40 | 65 72 5f 66 75 6e 63 28 5c 43 6f 6d 70 6f 73 65 72 5c 41 75 74 6f 6c 6f 61 64 5c 43 6f 6d 70 6f | er_func(\Composer\Autoload\Compo |
13b60 | 73 65 72 53 74 61 74 69 63 49 6e 69 74 24 73 75 66 66 69 78 3a 3a 67 65 74 49 6e 69 74 69 61 6c | serStaticInit$suffix::getInitial |
13b80 | 69 7a 65 72 28 5c 24 6c 6f 61 64 65 72 29 29 3b 0a 0a 0a 53 54 41 54 49 43 5f 49 4e 49 54 3b 0a | izer(\$loader));...STATIC_INIT;. |
13ba0 | 0a 69 66 20 28 24 74 68 69 73 2d 3e 63 6c 61 73 73 4d 61 70 41 75 74 68 6f 72 69 74 61 74 69 76 | .if.($this->classMapAuthoritativ |
13bc0 | 65 29 20 7b 0a 24 66 69 6c 65 20 2e 3d 20 3c 3c 3c 27 43 4c 41 53 53 4d 41 50 41 55 54 48 4f 52 | e).{.$file..=.<<<'CLASSMAPAUTHOR |
13be0 | 49 54 41 54 49 56 45 27 0a 20 20 20 20 20 20 20 20 24 6c 6f 61 64 65 72 2d 3e 73 65 74 43 6c 61 | ITATIVE'.........$loader->setCla |
13c00 | 73 73 4d 61 70 41 75 74 68 6f 72 69 74 61 74 69 76 65 28 74 72 75 65 29 3b 0a 0a 43 4c 41 53 53 | ssMapAuthoritative(true);..CLASS |
13c20 | 4d 41 50 41 55 54 48 4f 52 49 54 41 54 49 56 45 3b 0a 7d 0a 0a 69 66 20 28 24 74 68 69 73 2d 3e | MAPAUTHORITATIVE;.}..if.($this-> |
13c40 | 61 70 63 75 29 20 7b 0a 24 61 70 63 75 50 72 65 66 69 78 20 3d 20 76 61 72 5f 65 78 70 6f 72 74 | apcu).{.$apcuPrefix.=.var_export |
13c60 | 28 28 24 74 68 69 73 2d 3e 61 70 63 75 50 72 65 66 69 78 20 21 3d 3d 20 6e 75 6c 6c 20 3f 20 24 | (($this->apcuPrefix.!==.null.?.$ |
13c80 | 74 68 69 73 2d 3e 61 70 63 75 50 72 65 66 69 78 20 3a 20 73 75 62 73 74 72 28 62 61 73 65 36 34 | this->apcuPrefix.:.substr(base64 |
13ca0 | 5f 65 6e 63 6f 64 65 28 6d 64 35 28 75 6e 69 71 69 64 28 27 27 2c 20 74 72 75 65 29 2c 20 74 72 | _encode(md5(uniqid('',.true),.tr |
13cc0 | 75 65 29 29 2c 20 30 2c 20 2d 33 29 29 2c 20 74 72 75 65 29 3b 0a 24 66 69 6c 65 20 2e 3d 20 3c | ue)),.0,.-3)),.true);.$file..=.< |
13ce0 | 3c 3c 41 50 43 55 0a 20 20 20 20 20 20 20 20 5c 24 6c 6f 61 64 65 72 2d 3e 73 65 74 41 70 63 75 | <<APCU.........\$loader->setApcu |
13d00 | 50 72 65 66 69 78 28 24 61 70 63 75 50 72 65 66 69 78 29 3b 0a 0a 41 50 43 55 3b 0a 7d 0a 0a 69 | Prefix($apcuPrefix);..APCU;.}..i |
13d20 | 66 20 28 24 75 73 65 47 6c 6f 62 61 6c 49 6e 63 6c 75 64 65 50 61 74 68 29 20 7b 0a 24 66 69 6c | f.($useGlobalIncludePath).{.$fil |
13d40 | 65 20 2e 3d 20 3c 3c 3c 27 49 4e 43 4c 55 44 45 50 41 54 48 27 0a 20 20 20 20 20 20 20 20 24 6c | e..=.<<<'INCLUDEPATH'.........$l |
13d60 | 6f 61 64 65 72 2d 3e 73 65 74 55 73 65 49 6e 63 6c 75 64 65 50 61 74 68 28 74 72 75 65 29 3b 0a | oader->setUseIncludePath(true);. |
13d80 | 0a 49 4e 43 4c 55 44 45 50 41 54 48 3b 0a 7d 0a 0a 69 66 20 28 24 74 61 72 67 65 74 44 69 72 4c | .INCLUDEPATH;.}..if.($targetDirL |
13da0 | 6f 61 64 65 72 29 20 7b 0a 24 66 69 6c 65 20 2e 3d 20 3c 3c 3c 52 45 47 49 53 54 45 52 5f 54 41 | oader).{.$file..=.<<<REGISTER_TA |
13dc0 | 52 47 45 54 5f 44 49 52 5f 41 55 54 4f 4c 4f 41 44 0a 20 20 20 20 20 20 20 20 73 70 6c 5f 61 75 | RGET_DIR_AUTOLOAD.........spl_au |
13de0 | 74 6f 6c 6f 61 64 5f 72 65 67 69 73 74 65 72 28 61 72 72 61 79 28 27 43 6f 6d 70 6f 73 65 72 41 | toload_register(array('ComposerA |
13e00 | 75 74 6f 6c 6f 61 64 65 72 49 6e 69 74 24 73 75 66 66 69 78 27 2c 20 27 61 75 74 6f 6c 6f 61 64 | utoloaderInit$suffix',.'autoload |
13e20 | 27 29 2c 20 74 72 75 65 2c 20 74 72 75 65 29 3b 0a 0a 0a 52 45 47 49 53 54 45 52 5f 54 41 52 47 | '),.true,.true);...REGISTER_TARG |
13e40 | 45 54 5f 44 49 52 5f 41 55 54 4f 4c 4f 41 44 3b 0a 7d 0a 0a 24 66 69 6c 65 20 2e 3d 20 3c 3c 3c | ET_DIR_AUTOLOAD;.}..$file..=.<<< |
13e60 | 52 45 47 49 53 54 45 52 5f 4c 4f 41 44 45 52 0a 20 20 20 20 20 20 20 20 5c 24 6c 6f 61 64 65 72 | REGISTER_LOADER.........\$loader |
13e80 | 2d 3e 72 65 67 69 73 74 65 72 28 24 70 72 65 70 65 6e 64 41 75 74 6f 6c 6f 61 64 65 72 29 3b 0a | ->register($prependAutoloader);. |
13ea0 | 0a 0a 52 45 47 49 53 54 45 52 5f 4c 4f 41 44 45 52 3b 0a 0a 69 66 20 28 24 75 73 65 49 6e 63 6c | ..REGISTER_LOADER;..if.($useIncl |
13ec0 | 75 64 65 46 69 6c 65 73 29 20 7b 0a 24 66 69 6c 65 20 2e 3d 20 3c 3c 3c 49 4e 43 4c 55 44 45 5f | udeFiles).{.$file..=.<<<INCLUDE_ |
13ee0 | 46 49 4c 45 53 0a 20 20 20 20 20 20 20 20 5c 24 69 6e 63 6c 75 64 65 46 69 6c 65 73 20 3d 20 5c | FILES.........\$includeFiles.=.\ |
13f00 | 43 6f 6d 70 6f 73 65 72 5c 41 75 74 6f 6c 6f 61 64 5c 43 6f 6d 70 6f 73 65 72 53 74 61 74 69 63 | Composer\Autoload\ComposerStatic |
13f20 | 49 6e 69 74 24 73 75 66 66 69 78 3a 3a 5c 24 66 69 6c 65 73 3b 0a 20 20 20 20 20 20 20 20 66 6f | Init$suffix::\$files;.........fo |
13f40 | 72 65 61 63 68 20 28 5c 24 69 6e 63 6c 75 64 65 46 69 6c 65 73 20 61 73 20 5c 24 66 69 6c 65 49 | reach.(\$includeFiles.as.\$fileI |
13f60 | 64 65 6e 74 69 66 69 65 72 20 3d 3e 20 5c 24 66 69 6c 65 29 20 7b 0a 20 20 20 20 20 20 20 20 20 | dentifier.=>.\$file).{.......... |
13f80 | 20 20 20 63 6f 6d 70 6f 73 65 72 52 65 71 75 69 72 65 24 73 75 66 66 69 78 28 5c 24 66 69 6c 65 | ...composerRequire$suffix(\$file |
13fa0 | 49 64 65 6e 74 69 66 69 65 72 2c 20 5c 24 66 69 6c 65 29 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a | Identifier,.\$file);.........}.. |
13fc0 | 0a 49 4e 43 4c 55 44 45 5f 46 49 4c 45 53 3b 0a 7d 0a 0a 24 66 69 6c 65 20 2e 3d 20 3c 3c 3c 4d | .INCLUDE_FILES;.}..$file..=.<<<M |
13fe0 | 45 54 48 4f 44 5f 46 4f 4f 54 45 52 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 5c 24 6c 6f | ETHOD_FOOTER.........return.\$lo |
14000 | 61 64 65 72 3b 0a 20 20 20 20 7d 0a 0a 4d 45 54 48 4f 44 5f 46 4f 4f 54 45 52 3b 0a 0a 24 66 69 | ader;.....}..METHOD_FOOTER;..$fi |
14020 | 6c 65 20 2e 3d 20 24 74 61 72 67 65 74 44 69 72 4c 6f 61 64 65 72 3b 0a 0a 69 66 20 28 24 75 73 | le..=.$targetDirLoader;..if.($us |
14040 | 65 49 6e 63 6c 75 64 65 46 69 6c 65 73 29 20 7b 0a 72 65 74 75 72 6e 20 24 66 69 6c 65 20 2e 20 | eIncludeFiles).{.return.$file... |
14060 | 3c 3c 3c 46 4f 4f 54 45 52 0a 7d 0a 0a 2f 2a 2a 0a 20 2a 20 40 70 61 72 61 6d 20 73 74 72 69 6e | <<<FOOTER.}../**..*.@param.strin |
14080 | 67 20 5c 24 66 69 6c 65 49 64 65 6e 74 69 66 69 65 72 0a 20 2a 20 40 70 61 72 61 6d 20 73 74 72 | g.\$fileIdentifier..*.@param.str |
140a0 | 69 6e 67 20 5c 24 66 69 6c 65 0a 20 2a 20 40 72 65 74 75 72 6e 20 76 6f 69 64 0a 20 2a 2f 0a 66 | ing.\$file..*.@return.void..*/.f |
140c0 | 75 6e 63 74 69 6f 6e 20 63 6f 6d 70 6f 73 65 72 52 65 71 75 69 72 65 24 73 75 66 66 69 78 28 5c | unction.composerRequire$suffix(\ |
140e0 | 24 66 69 6c 65 49 64 65 6e 74 69 66 69 65 72 2c 20 5c 24 66 69 6c 65 29 0a 7b 0a 20 20 20 20 69 | $fileIdentifier,.\$file).{.....i |
14100 | 66 20 28 65 6d 70 74 79 28 5c 24 47 4c 4f 42 41 4c 53 5b 27 5f 5f 63 6f 6d 70 6f 73 65 72 5f 61 | f.(empty(\$GLOBALS['__composer_a |
14120 | 75 74 6f 6c 6f 61 64 5f 66 69 6c 65 73 27 5d 5b 5c 24 66 69 6c 65 49 64 65 6e 74 69 66 69 65 72 | utoload_files'][\$fileIdentifier |
14140 | 5d 29 29 20 7b 0a 20 20 20 20 20 20 20 20 5c 24 47 4c 4f 42 41 4c 53 5b 27 5f 5f 63 6f 6d 70 6f | ])).{.........\$GLOBALS['__compo |
14160 | 73 65 72 5f 61 75 74 6f 6c 6f 61 64 5f 66 69 6c 65 73 27 5d 5b 5c 24 66 69 6c 65 49 64 65 6e 74 | ser_autoload_files'][\$fileIdent |
14180 | 69 66 69 65 72 5d 20 3d 20 74 72 75 65 3b 0a 0a 20 20 20 20 20 20 20 20 72 65 71 75 69 72 65 20 | ifier].=.true;..........require. |
141a0 | 5c 24 66 69 6c 65 3b 0a 20 20 20 20 7d 0a 7d 0a 0a 46 4f 4f 54 45 52 3b 0a 7d 0a 0a 72 65 74 75 | \$file;.....}.}..FOOTER;.}..retu |
141c0 | 72 6e 20 24 66 69 6c 65 20 2e 20 3c 3c 3c 46 4f 4f 54 45 52 0a 7d 0a 0a 46 4f 4f 54 45 52 3b 0a | rn.$file...<<<FOOTER.}..FOOTER;. |
141e0 | 7d 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 53 74 | }.......protected.function.getSt |
14200 | 61 74 69 63 46 69 6c 65 28 73 74 72 69 6e 67 20 24 73 75 66 66 69 78 2c 20 73 74 72 69 6e 67 20 | aticFile(string.$suffix,.string. |
14220 | 24 74 61 72 67 65 74 44 69 72 2c 20 73 74 72 69 6e 67 20 24 76 65 6e 64 6f 72 50 61 74 68 2c 20 | $targetDir,.string.$vendorPath,. |
14240 | 73 74 72 69 6e 67 20 24 62 61 73 65 50 61 74 68 29 0a 7b 0a 24 66 69 6c 65 20 3d 20 3c 3c 3c 48 | string.$basePath).{.$file.=.<<<H |
14260 | 45 41 44 45 52 0a 3c 3f 70 68 70 0a 0a 2f 2f 20 61 75 74 6f 6c 6f 61 64 5f 73 74 61 74 69 63 2e | EADER.<?php..//.autoload_static. |
14280 | 70 68 70 20 40 67 65 6e 65 72 61 74 65 64 20 62 79 20 43 6f 6d 70 6f 73 65 72 0a 0a 6e 61 6d 65 | php.@generated.by.Composer..name |
142a0 | 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 41 75 74 6f 6c 6f 61 64 3b 0a 0a 63 6c 61 73 73 20 | space.Composer\Autoload;..class. |
142c0 | 43 6f 6d 70 6f 73 65 72 53 74 61 74 69 63 49 6e 69 74 24 73 75 66 66 69 78 0a 7b 0a 0a 48 45 41 | ComposerStaticInit$suffix.{..HEA |
142e0 | 44 45 52 3b 0a 0a 24 6c 6f 61 64 65 72 20 3d 20 6e 65 77 20 43 6c 61 73 73 4c 6f 61 64 65 72 28 | DER;..$loader.=.new.ClassLoader( |
14300 | 29 3b 0a 0a 24 6d 61 70 20 3d 20 72 65 71 75 69 72 65 20 24 74 61 72 67 65 74 44 69 72 20 2e 20 | );..$map.=.require.$targetDir... |
14320 | 27 2f 61 75 74 6f 6c 6f 61 64 5f 6e 61 6d 65 73 70 61 63 65 73 2e 70 68 70 27 3b 0a 66 6f 72 65 | '/autoload_namespaces.php';.fore |
14340 | 61 63 68 20 28 24 6d 61 70 20 61 73 20 24 6e 61 6d 65 73 70 61 63 65 20 3d 3e 20 24 70 61 74 68 | ach.($map.as.$namespace.=>.$path |
14360 | 29 20 7b 0a 24 6c 6f 61 64 65 72 2d 3e 73 65 74 28 24 6e 61 6d 65 73 70 61 63 65 2c 20 24 70 61 | ).{.$loader->set($namespace,.$pa |
14380 | 74 68 29 3b 0a 7d 0a 0a 24 6d 61 70 20 3d 20 72 65 71 75 69 72 65 20 24 74 61 72 67 65 74 44 69 | th);.}..$map.=.require.$targetDi |
143a0 | 72 20 2e 20 27 2f 61 75 74 6f 6c 6f 61 64 5f 70 73 72 34 2e 70 68 70 27 3b 0a 66 6f 72 65 61 63 | r...'/autoload_psr4.php';.foreac |
143c0 | 68 20 28 24 6d 61 70 20 61 73 20 24 6e 61 6d 65 73 70 61 63 65 20 3d 3e 20 24 70 61 74 68 29 20 | h.($map.as.$namespace.=>.$path). |
143e0 | 7b 0a 24 6c 6f 61 64 65 72 2d 3e 73 65 74 50 73 72 34 28 24 6e 61 6d 65 73 70 61 63 65 2c 20 24 | {.$loader->setPsr4($namespace,.$ |
14400 | 70 61 74 68 29 3b 0a 7d 0a 0a 24 63 6c 61 73 73 4d 61 70 20 3d 20 72 65 71 75 69 72 65 20 24 74 | path);.}..$classMap.=.require.$t |
14420 | 61 72 67 65 74 44 69 72 20 2e 20 27 2f 61 75 74 6f 6c 6f 61 64 5f 63 6c 61 73 73 6d 61 70 2e 70 | argetDir...'/autoload_classmap.p |
14440 | 68 70 27 3b 0a 69 66 20 28 24 63 6c 61 73 73 4d 61 70 29 20 7b 0a 24 6c 6f 61 64 65 72 2d 3e 61 | hp';.if.($classMap).{.$loader->a |
14460 | 64 64 43 6c 61 73 73 4d 61 70 28 24 63 6c 61 73 73 4d 61 70 29 3b 0a 7d 0a 0a 24 66 69 6c 65 73 | ddClassMap($classMap);.}..$files |
14480 | 79 73 74 65 6d 20 3d 20 6e 65 77 20 46 69 6c 65 73 79 73 74 65 6d 28 29 3b 0a 0a 24 76 65 6e 64 | ystem.=.new.Filesystem();..$vend |
144a0 | 6f 72 50 61 74 68 43 6f 64 65 20 3d 20 27 20 3d 3e 20 27 20 2e 20 24 66 69 6c 65 73 79 73 74 65 | orPathCode.=.'.=>.'...$filesyste |
144c0 | 6d 2d 3e 66 69 6e 64 53 68 6f 72 74 65 73 74 50 61 74 68 43 6f 64 65 28 72 65 61 6c 70 61 74 68 | m->findShortestPathCode(realpath |
144e0 | 28 24 74 61 72 67 65 74 44 69 72 29 2c 20 24 76 65 6e 64 6f 72 50 61 74 68 2c 20 74 72 75 65 2c | ($targetDir),.$vendorPath,.true, |
14500 | 20 74 72 75 65 29 20 2e 20 22 20 2e 20 27 2f 22 3b 0a 24 76 65 6e 64 6f 72 50 68 61 72 50 61 74 | .true)..."...'/";.$vendorPharPat |
14520 | 68 43 6f 64 65 20 3d 20 27 20 3d 3e 20 5c 27 70 68 61 72 3a 2f 2f 5c 27 20 2e 20 27 20 2e 20 24 | hCode.=.'.=>.\'phar://\'...'...$ |
14540 | 66 69 6c 65 73 79 73 74 65 6d 2d 3e 66 69 6e 64 53 68 6f 72 74 65 73 74 50 61 74 68 43 6f 64 65 | filesystem->findShortestPathCode |
14560 | 28 72 65 61 6c 70 61 74 68 28 24 74 61 72 67 65 74 44 69 72 29 2c 20 24 76 65 6e 64 6f 72 50 61 | (realpath($targetDir),.$vendorPa |
14580 | 74 68 2c 20 74 72 75 65 2c 20 74 72 75 65 29 20 2e 20 22 20 2e 20 27 2f 22 3b 0a 24 61 70 70 42 | th,.true,.true)..."...'/";.$appB |
145a0 | 61 73 65 44 69 72 43 6f 64 65 20 3d 20 27 20 3d 3e 20 27 20 2e 20 24 66 69 6c 65 73 79 73 74 65 | aseDirCode.=.'.=>.'...$filesyste |
145c0 | 6d 2d 3e 66 69 6e 64 53 68 6f 72 74 65 73 74 50 61 74 68 43 6f 64 65 28 72 65 61 6c 70 61 74 68 | m->findShortestPathCode(realpath |
145e0 | 28 24 74 61 72 67 65 74 44 69 72 29 2c 20 24 62 61 73 65 50 61 74 68 2c 20 74 72 75 65 2c 20 74 | ($targetDir),.$basePath,.true,.t |
14600 | 72 75 65 29 20 2e 20 22 20 2e 20 27 2f 22 3b 0a 24 61 70 70 42 61 73 65 44 69 72 50 68 61 72 43 | rue)..."...'/";.$appBaseDirPharC |
14620 | 6f 64 65 20 3d 20 27 20 3d 3e 20 5c 27 70 68 61 72 3a 2f 2f 5c 27 20 2e 20 27 20 2e 20 24 66 69 | ode.=.'.=>.\'phar://\'...'...$fi |
14640 | 6c 65 73 79 73 74 65 6d 2d 3e 66 69 6e 64 53 68 6f 72 74 65 73 74 50 61 74 68 43 6f 64 65 28 72 | lesystem->findShortestPathCode(r |
14660 | 65 61 6c 70 61 74 68 28 24 74 61 72 67 65 74 44 69 72 29 2c 20 24 62 61 73 65 50 61 74 68 2c 20 | ealpath($targetDir),.$basePath,. |
14680 | 74 72 75 65 2c 20 74 72 75 65 29 20 2e 20 22 20 2e 20 27 2f 22 3b 0a 0a 24 61 62 73 6f 6c 75 74 | true,.true)..."...'/";..$absolut |
146a0 | 65 56 65 6e 64 6f 72 50 61 74 68 43 6f 64 65 20 3d 20 27 20 3d 3e 20 27 20 2e 20 73 75 62 73 74 | eVendorPathCode.=.'.=>.'...subst |
146c0 | 72 28 76 61 72 5f 65 78 70 6f 72 74 28 72 74 72 69 6d 28 24 76 65 6e 64 6f 72 44 69 72 2c 20 27 | r(var_export(rtrim($vendorDir,.' |
146e0 | 5c 5c 2f 27 29 20 2e 20 27 2f 27 2c 20 74 72 75 65 29 2c 20 30 2c 20 2d 31 29 3b 0a 24 61 62 73 | \\/')...'/',.true),.0,.-1);.$abs |
14700 | 6f 6c 75 74 65 56 65 6e 64 6f 72 50 68 61 72 50 61 74 68 43 6f 64 65 20 3d 20 27 20 3d 3e 20 27 | oluteVendorPharPathCode.=.'.=>.' |
14720 | 20 2e 20 73 75 62 73 74 72 28 76 61 72 5f 65 78 70 6f 72 74 28 72 74 72 69 6d 28 27 70 68 61 72 | ...substr(var_export(rtrim('phar |
14740 | 3a 2f 2f 27 20 2e 20 24 76 65 6e 64 6f 72 44 69 72 2c 20 27 5c 5c 2f 27 29 20 2e 20 27 2f 27 2c | ://'...$vendorDir,.'\\/')...'/', |
14760 | 20 74 72 75 65 29 2c 20 30 2c 20 2d 31 29 3b 0a 24 61 62 73 6f 6c 75 74 65 41 70 70 42 61 73 65 | .true),.0,.-1);.$absoluteAppBase |
14780 | 44 69 72 43 6f 64 65 20 3d 20 27 20 3d 3e 20 27 20 2e 20 73 75 62 73 74 72 28 76 61 72 5f 65 78 | DirCode.=.'.=>.'...substr(var_ex |
147a0 | 70 6f 72 74 28 72 74 72 69 6d 28 24 62 61 73 65 44 69 72 2c 20 27 5c 5c 2f 27 29 20 2e 20 27 2f | port(rtrim($baseDir,.'\\/')...'/ |
147c0 | 27 2c 20 74 72 75 65 29 2c 20 30 2c 20 2d 31 29 3b 0a 24 61 62 73 6f 6c 75 74 65 41 70 70 42 61 | ',.true),.0,.-1);.$absoluteAppBa |
147e0 | 73 65 44 69 72 50 68 61 72 43 6f 64 65 20 3d 20 27 20 3d 3e 20 27 20 2e 20 73 75 62 73 74 72 28 | seDirPharCode.=.'.=>.'...substr( |
14800 | 76 61 72 5f 65 78 70 6f 72 74 28 72 74 72 69 6d 28 27 70 68 61 72 3a 2f 2f 27 20 2e 20 24 62 61 | var_export(rtrim('phar://'...$ba |
14820 | 73 65 44 69 72 2c 20 27 5c 5c 2f 27 29 20 2e 20 27 2f 27 2c 20 74 72 75 65 29 2c 20 30 2c 20 2d | seDir,.'\\/')...'/',.true),.0,.- |
14840 | 31 29 3b 0a 0a 24 69 6e 69 74 69 61 6c 69 7a 65 72 20 3d 20 27 27 3b 0a 24 70 72 65 66 69 78 20 | 1);..$initializer.=.'';.$prefix. |
14860 | 3d 20 22 5c 30 43 6f 6d 70 6f 73 65 72 5c 41 75 74 6f 6c 6f 61 64 5c 43 6c 61 73 73 4c 6f 61 64 | =."\0Composer\Autoload\ClassLoad |
14880 | 65 72 5c 30 22 3b 0a 24 70 72 65 66 69 78 4c 65 6e 20 3d 20 73 74 72 6c 65 6e 28 24 70 72 65 66 | er\0";.$prefixLen.=.strlen($pref |
148a0 | 69 78 29 3b 0a 69 66 20 28 66 69 6c 65 5f 65 78 69 73 74 73 28 24 74 61 72 67 65 74 44 69 72 20 | ix);.if.(file_exists($targetDir. |
148c0 | 2e 20 27 2f 61 75 74 6f 6c 6f 61 64 5f 66 69 6c 65 73 2e 70 68 70 27 29 29 20 7b 0a 24 6d 61 70 | ..'/autoload_files.php')).{.$map |
148e0 | 73 20 3d 20 5b 27 66 69 6c 65 73 27 20 3d 3e 20 72 65 71 75 69 72 65 20 24 74 61 72 67 65 74 44 | s.=.['files'.=>.require.$targetD |
14900 | 69 72 20 2e 20 27 2f 61 75 74 6f 6c 6f 61 64 5f 66 69 6c 65 73 2e 70 68 70 27 5d 3b 0a 7d 20 65 | ir...'/autoload_files.php'];.}.e |
14920 | 6c 73 65 20 7b 0a 24 6d 61 70 73 20 3d 20 5b 5d 3b 0a 7d 0a 0a 66 6f 72 65 61 63 68 20 28 28 61 | lse.{.$maps.=.[];.}..foreach.((a |
14940 | 72 72 61 79 29 20 24 6c 6f 61 64 65 72 20 61 73 20 24 70 72 6f 70 20 3d 3e 20 24 76 61 6c 75 65 | rray).$loader.as.$prop.=>.$value |
14960 | 29 20 7b 0a 69 66 20 28 24 76 61 6c 75 65 20 26 26 20 30 20 3d 3d 3d 20 73 74 72 70 6f 73 28 24 | ).{.if.($value.&&.0.===.strpos($ |
14980 | 70 72 6f 70 2c 20 24 70 72 65 66 69 78 29 29 20 7b 0a 24 6d 61 70 73 5b 73 75 62 73 74 72 28 24 | prop,.$prefix)).{.$maps[substr($ |
149a0 | 70 72 6f 70 2c 20 24 70 72 65 66 69 78 4c 65 6e 29 5d 20 3d 20 24 76 61 6c 75 65 3b 0a 7d 0a 7d | prop,.$prefixLen)].=.$value;.}.} |
149c0 | 0a 0a 66 6f 72 65 61 63 68 20 28 24 6d 61 70 73 20 61 73 20 24 70 72 6f 70 20 3d 3e 20 24 76 61 | ..foreach.($maps.as.$prop.=>.$va |
149e0 | 6c 75 65 29 20 7b 0a 24 76 61 6c 75 65 20 3d 20 73 74 72 74 72 28 0a 76 61 72 5f 65 78 70 6f 72 | lue).{.$value.=.strtr(.var_expor |
14a00 | 74 28 24 76 61 6c 75 65 2c 20 74 72 75 65 29 2c 0a 5b 0a 24 61 62 73 6f 6c 75 74 65 56 65 6e 64 | t($value,.true),.[.$absoluteVend |
14a20 | 6f 72 50 61 74 68 43 6f 64 65 20 3d 3e 20 24 76 65 6e 64 6f 72 50 61 74 68 43 6f 64 65 2c 0a 24 | orPathCode.=>.$vendorPathCode,.$ |
14a40 | 61 62 73 6f 6c 75 74 65 56 65 6e 64 6f 72 50 68 61 72 50 61 74 68 43 6f 64 65 20 3d 3e 20 24 76 | absoluteVendorPharPathCode.=>.$v |
14a60 | 65 6e 64 6f 72 50 68 61 72 50 61 74 68 43 6f 64 65 2c 0a 24 61 62 73 6f 6c 75 74 65 41 70 70 42 | endorPharPathCode,.$absoluteAppB |
14a80 | 61 73 65 44 69 72 43 6f 64 65 20 3d 3e 20 24 61 70 70 42 61 73 65 44 69 72 43 6f 64 65 2c 0a 24 | aseDirCode.=>.$appBaseDirCode,.$ |
14aa0 | 61 62 73 6f 6c 75 74 65 41 70 70 42 61 73 65 44 69 72 50 68 61 72 43 6f 64 65 20 3d 3e 20 24 61 | absoluteAppBaseDirPharCode.=>.$a |
14ac0 | 70 70 42 61 73 65 44 69 72 50 68 61 72 43 6f 64 65 2c 0a 5d 0a 29 3b 0a 24 76 61 6c 75 65 20 3d | ppBaseDirPharCode,.].);.$value.= |
14ae0 | 20 6c 74 72 69 6d 28 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 28 27 2f 5e 20 2a 2f 6d 27 2c 20 27 | .ltrim(Preg::replace('/^.*/m',.' |
14b00 | 20 20 20 20 24 30 24 30 27 2c 20 24 76 61 6c 75 65 29 29 3b 0a 0a 24 66 69 6c 65 20 2e 3d 20 73 | ....$0$0',.$value));..$file..=.s |
14b20 | 70 72 69 6e 74 66 28 22 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 24 25 73 20 3d 20 | printf("....public.static.$%s.=. |
14b40 | 25 73 3b 5c 6e 5c 6e 22 2c 20 24 70 72 6f 70 2c 20 24 76 61 6c 75 65 29 3b 0a 69 66 20 28 27 66 | %s;\n\n",.$prop,.$value);.if.('f |
14b60 | 69 6c 65 73 27 20 21 3d 3d 20 24 70 72 6f 70 29 20 7b 0a 24 69 6e 69 74 69 61 6c 69 7a 65 72 20 | iles'.!==.$prop).{.$initializer. |
14b80 | 2e 3d 20 22 20 20 20 20 20 20 20 20 20 20 20 20 5c 24 6c 6f 61 64 65 72 2d 3e 24 70 72 6f 70 20 | .=."............\$loader->$prop. |
14ba0 | 3d 20 43 6f 6d 70 6f 73 65 72 53 74 61 74 69 63 49 6e 69 74 24 73 75 66 66 69 78 3a 3a 5c 24 24 | =.ComposerStaticInit$suffix::\$$ |
14bc0 | 70 72 6f 70 3b 5c 6e 22 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 66 69 6c 65 20 2e 20 3c 3c | prop;\n";.}.}..return.$file...<< |
14be0 | 3c 49 4e 49 54 49 41 4c 49 5a 45 52 0a 20 20 20 20 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 66 | <INITIALIZER.....public.static.f |
14c00 | 75 6e 63 74 69 6f 6e 20 67 65 74 49 6e 69 74 69 61 6c 69 7a 65 72 28 43 6c 61 73 73 4c 6f 61 64 | unction.getInitializer(ClassLoad |
14c20 | 65 72 20 5c 24 6c 6f 61 64 65 72 29 0a 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 | er.\$loader).....{.........retur |
14c40 | 6e 20 5c 43 6c 6f 73 75 72 65 3a 3a 62 69 6e 64 28 66 75 6e 63 74 69 6f 6e 20 28 29 20 75 73 65 | n.\Closure::bind(function.().use |
14c60 | 20 28 5c 24 6c 6f 61 64 65 72 29 20 7b 0a 24 69 6e 69 74 69 61 6c 69 7a 65 72 0a 20 20 20 20 20 | .(\$loader).{.$initializer...... |
14c80 | 20 20 20 7d 2c 20 6e 75 6c 6c 2c 20 43 6c 61 73 73 4c 6f 61 64 65 72 3a 3a 63 6c 61 73 73 29 3b | ...},.null,.ClassLoader::class); |
14ca0 | 0a 20 20 20 20 7d 0a 7d 0a 0a 49 4e 49 54 49 41 4c 49 5a 45 52 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 | .....}.}..INITIALIZER;.}.......p |
14cc0 | 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 70 61 72 73 65 41 75 74 6f 6c 6f 61 64 73 | rotected.function.parseAutoloads |
14ce0 | 54 79 70 65 28 61 72 72 61 79 20 24 70 61 63 6b 61 67 65 4d 61 70 2c 20 73 74 72 69 6e 67 20 24 | Type(array.$packageMap,.string.$ |
14d00 | 74 79 70 65 2c 20 52 6f 6f 74 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 72 6f 6f 74 | type,.RootPackageInterface.$root |
14d20 | 50 61 63 6b 61 67 65 29 0a 7b 0a 24 61 75 74 6f 6c 6f 61 64 73 20 3d 20 5b 5d 3b 0a 0a 66 6f 72 | Package).{.$autoloads.=.[];..for |
14d40 | 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 4d 61 70 20 61 73 20 24 69 74 65 6d 29 20 7b 0a 5b 24 | each.($packageMap.as.$item).{.[$ |
14d60 | 70 61 63 6b 61 67 65 2c 20 24 69 6e 73 74 61 6c 6c 50 61 74 68 5d 20 3d 20 24 69 74 65 6d 3b 0a | package,.$installPath].=.$item;. |
14d80 | 0a 24 61 75 74 6f 6c 6f 61 64 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 41 75 74 6f 6c 6f | .$autoload.=.$package->getAutolo |
14da0 | 61 64 28 29 3b 0a 69 66 20 28 24 74 68 69 73 2d 3e 64 65 76 4d 6f 64 65 20 26 26 20 24 70 61 63 | ad();.if.($this->devMode.&&.$pac |
14dc0 | 6b 61 67 65 20 3d 3d 3d 20 24 72 6f 6f 74 50 61 63 6b 61 67 65 29 20 7b 0a 24 61 75 74 6f 6c 6f | kage.===.$rootPackage).{.$autolo |
14de0 | 61 64 20 3d 20 61 72 72 61 79 5f 6d 65 72 67 65 5f 72 65 63 75 72 73 69 76 65 28 24 61 75 74 6f | ad.=.array_merge_recursive($auto |
14e00 | 6c 6f 61 64 2c 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 44 65 76 41 75 74 6f 6c 6f 61 64 28 29 | load,.$package->getDevAutoload() |
14e20 | 29 3b 0a 7d 0a 0a 0a 69 66 20 28 21 69 73 73 65 74 28 24 61 75 74 6f 6c 6f 61 64 5b 24 74 79 70 | );.}...if.(!isset($autoload[$typ |
14e40 | 65 5d 29 20 7c 7c 20 21 69 73 5f 61 72 72 61 79 28 24 61 75 74 6f 6c 6f 61 64 5b 24 74 79 70 65 | e]).||.!is_array($autoload[$type |
14e60 | 5d 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 69 66 20 28 6e 75 6c 6c 20 21 3d 3d 20 24 | ])).{.continue;.}.if.(null.!==.$ |
14e80 | 70 61 63 6b 61 67 65 2d 3e 67 65 74 54 61 72 67 65 74 44 69 72 28 29 20 26 26 20 24 70 61 63 6b | package->getTargetDir().&&.$pack |
14ea0 | 61 67 65 20 21 3d 3d 20 24 72 6f 6f 74 50 61 63 6b 61 67 65 29 20 7b 0a 24 69 6e 73 74 61 6c 6c | age.!==.$rootPackage).{.$install |
14ec0 | 50 61 74 68 20 3d 20 73 75 62 73 74 72 28 24 69 6e 73 74 61 6c 6c 50 61 74 68 2c 20 30 2c 20 2d | Path.=.substr($installPath,.0,.- |
14ee0 | 73 74 72 6c 65 6e 28 27 2f 27 2e 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 54 61 72 67 65 74 44 69 | strlen('/'.$package->getTargetDi |
14f00 | 72 28 29 29 29 3b 0a 7d 0a 0a 66 6f 72 65 61 63 68 20 28 24 61 75 74 6f 6c 6f 61 64 5b 24 74 79 | r()));.}..foreach.($autoload[$ty |
14f20 | 70 65 5d 20 61 73 20 24 6e 61 6d 65 73 70 61 63 65 20 3d 3e 20 24 70 61 74 68 73 29 20 7b 0a 66 | pe].as.$namespace.=>.$paths).{.f |
14f40 | 6f 72 65 61 63 68 20 28 28 61 72 72 61 79 29 20 24 70 61 74 68 73 20 61 73 20 24 70 61 74 68 29 | oreach.((array).$paths.as.$path) |
14f60 | 20 7b 0a 69 66 20 28 28 24 74 79 70 65 20 3d 3d 3d 20 27 66 69 6c 65 73 27 20 7c 7c 20 24 74 79 | .{.if.(($type.===.'files'.||.$ty |
14f80 | 70 65 20 3d 3d 3d 20 27 63 6c 61 73 73 6d 61 70 27 20 7c 7c 20 24 74 79 70 65 20 3d 3d 3d 20 27 | pe.===.'classmap'.||.$type.===.' |
14fa0 | 65 78 63 6c 75 64 65 2d 66 72 6f 6d 2d 63 6c 61 73 73 6d 61 70 27 29 20 26 26 20 24 70 61 63 6b | exclude-from-classmap').&&.$pack |
14fc0 | 61 67 65 2d 3e 67 65 74 54 61 72 67 65 74 44 69 72 28 29 20 26 26 20 21 46 69 6c 65 73 79 73 74 | age->getTargetDir().&&.!Filesyst |
14fe0 | 65 6d 3a 3a 69 73 52 65 61 64 61 62 6c 65 28 24 69 6e 73 74 61 6c 6c 50 61 74 68 2e 27 2f 27 2e | em::isReadable($installPath.'/'. |
15000 | 24 70 61 74 68 29 29 20 7b 0a 0a 69 66 20 28 24 70 61 63 6b 61 67 65 20 3d 3d 3d 20 24 72 6f 6f | $path)).{..if.($package.===.$roo |
15020 | 74 50 61 63 6b 61 67 65 29 20 7b 0a 24 74 61 72 67 65 74 44 69 72 20 3d 20 73 74 72 5f 72 65 70 | tPackage).{.$targetDir.=.str_rep |
15040 | 6c 61 63 65 28 27 5c 5c 3c 64 69 72 73 65 70 5c 5c 3e 27 2c 20 27 5b 5c 5c 5c 5c 2f 5d 27 2c 20 | lace('\\<dirsep\\>',.'[\\\\/]',. |
15060 | 70 72 65 67 5f 71 75 6f 74 65 28 73 74 72 5f 72 65 70 6c 61 63 65 28 5b 27 2f 27 2c 20 27 5c 5c | preg_quote(str_replace(['/',.'\\ |
15080 | 27 5d 2c 20 27 3c 64 69 72 73 65 70 3e 27 2c 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 54 61 72 | '],.'<dirsep>',.$package->getTar |
150a0 | 67 65 74 44 69 72 28 29 29 29 29 3b 0a 24 70 61 74 68 20 3d 20 6c 74 72 69 6d 28 50 72 65 67 3a | getDir())));.$path.=.ltrim(Preg: |
150c0 | 3a 72 65 70 6c 61 63 65 28 27 7b 5e 27 2e 24 74 61 72 67 65 74 44 69 72 2e 27 7d 27 2c 20 27 27 | :replace('{^'.$targetDir.'}',.'' |
150e0 | 2c 20 6c 74 72 69 6d 28 24 70 61 74 68 2c 20 27 5c 5c 2f 27 29 29 2c 20 27 5c 5c 2f 27 29 3b 0a | ,.ltrim($path,.'\\/')),.'\\/');. |
15100 | 7d 20 65 6c 73 65 20 7b 0a 0a 24 70 61 74 68 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 54 | }.else.{..$path.=.$package->getT |
15120 | 61 72 67 65 74 44 69 72 28 29 20 2e 20 27 2f 27 20 2e 20 24 70 61 74 68 3b 0a 7d 0a 7d 0a 0a 69 | argetDir()...'/'...$path;.}.}..i |
15140 | 66 20 28 24 74 79 70 65 20 3d 3d 3d 20 27 65 78 63 6c 75 64 65 2d 66 72 6f 6d 2d 63 6c 61 73 73 | f.($type.===.'exclude-from-class |
15160 | 6d 61 70 27 29 20 7b 0a 0a 24 70 61 74 68 20 3d 20 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 28 27 | map').{..$path.=.Preg::replace(' |
15180 | 7b 2f 2b 7d 27 2c 20 27 2f 27 2c 20 70 72 65 67 5f 71 75 6f 74 65 28 74 72 69 6d 28 73 74 72 74 | {/+}',.'/',.preg_quote(trim(strt |
151a0 | 72 28 24 70 61 74 68 2c 20 27 5c 5c 27 2c 20 27 2f 27 29 2c 20 27 2f 27 29 29 29 3b 0a 0a 0a 24 | r($path,.'\\',.'/'),.'/')));...$ |
151c0 | 70 61 74 68 20 3d 20 73 74 72 74 72 28 24 70 61 74 68 2c 20 5b 27 5c 5c 2a 5c 5c 2a 27 20 3d 3e | path.=.strtr($path,.['\\*\\*'.=> |
151e0 | 20 27 2e 2b 3f 27 2c 20 27 5c 5c 2a 27 20 3d 3e 20 27 5b 5e 2f 5d 2b 3f 27 5d 29 3b 0a 0a 0a 24 | .'.+?',.'\\*'.=>.'[^/]+?']);...$ |
15200 | 75 70 64 69 72 20 3d 20 6e 75 6c 6c 3b 0a 24 70 61 74 68 20 3d 20 50 72 65 67 3a 3a 72 65 70 6c | updir.=.null;.$path.=.Preg::repl |
15220 | 61 63 65 43 61 6c 6c 62 61 63 6b 28 0a 27 7b 5e 28 28 3f 3a 28 3f 3a 5c 5c 5c 5c 5c 5c 2e 29 7b | aceCallback(.'{^((?:(?:\\\\\\.){ |
15240 | 31 2c 32 7d 2b 2f 29 2b 29 7d 27 2c 0a 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 6d | 1,2}+/)+)}',.static.function.($m |
15260 | 61 74 63 68 65 73 29 20 75 73 65 20 28 26 24 75 70 64 69 72 29 3a 20 73 74 72 69 6e 67 20 7b 0a | atches).use.(&$updir):.string.{. |
15280 | 69 66 20 28 69 73 73 65 74 28 24 6d 61 74 63 68 65 73 5b 31 5d 29 29 20 7b 0a 0a 24 75 70 64 69 | if.(isset($matches[1])).{..$updi |
152a0 | 72 20 3d 20 73 74 72 5f 72 65 70 6c 61 63 65 28 27 5c 5c 2e 27 2c 20 27 2e 27 2c 20 24 6d 61 74 | r.=.str_replace('\\.',.'.',.$mat |
152c0 | 63 68 65 73 5b 31 5d 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 27 27 3b 0a 7d 2c 0a 24 70 61 74 68 | ches[1]);.}..return.'';.},.$path |
152e0 | 0a 29 3b 0a 69 66 20 28 65 6d 70 74 79 28 24 69 6e 73 74 61 6c 6c 50 61 74 68 29 29 20 7b 0a 24 | .);.if.(empty($installPath)).{.$ |
15300 | 69 6e 73 74 61 6c 6c 50 61 74 68 20 3d 20 73 74 72 74 72 28 50 6c 61 74 66 6f 72 6d 3a 3a 67 65 | installPath.=.strtr(Platform::ge |
15320 | 74 43 77 64 28 29 2c 20 27 5c 5c 27 2c 20 27 2f 27 29 3b 0a 7d 0a 0a 24 72 65 73 6f 6c 76 65 64 | tCwd(),.'\\',.'/');.}..$resolved |
15340 | 50 61 74 68 20 3d 20 72 65 61 6c 70 61 74 68 28 24 69 6e 73 74 61 6c 6c 50 61 74 68 20 2e 20 27 | Path.=.realpath($installPath...' |
15360 | 2f 27 20 2e 20 24 75 70 64 69 72 29 3b 0a 69 66 20 28 66 61 6c 73 65 20 3d 3d 3d 20 24 72 65 73 | /'...$updir);.if.(false.===.$res |
15380 | 6f 6c 76 65 64 50 61 74 68 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 24 61 75 74 6f 6c 6f | olvedPath).{.continue;.}.$autolo |
153a0 | 61 64 73 5b 5d 20 3d 20 70 72 65 67 5f 71 75 6f 74 65 28 73 74 72 74 72 28 24 72 65 73 6f 6c 76 | ads[].=.preg_quote(strtr($resolv |
153c0 | 65 64 50 61 74 68 2c 20 27 5c 5c 27 2c 20 27 2f 27 29 29 20 2e 20 27 2f 27 20 2e 20 24 70 61 74 | edPath,.'\\',.'/'))...'/'...$pat |
153e0 | 68 20 2e 20 27 28 24 7c 2f 29 27 3b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 24 72 65 6c 61 74 | h...'($|/)';.continue;.}..$relat |
15400 | 69 76 65 50 61 74 68 20 3d 20 65 6d 70 74 79 28 24 69 6e 73 74 61 6c 6c 50 61 74 68 29 20 3f 20 | ivePath.=.empty($installPath).?. |
15420 | 28 65 6d 70 74 79 28 24 70 61 74 68 29 20 3f 20 27 2e 27 20 3a 20 24 70 61 74 68 29 20 3a 20 24 | (empty($path).?.'.'.:.$path).:.$ |
15440 | 69 6e 73 74 61 6c 6c 50 61 74 68 2e 27 2f 27 2e 24 70 61 74 68 3b 0a 0a 69 66 20 28 24 74 79 70 | installPath.'/'.$path;..if.($typ |
15460 | 65 20 3d 3d 3d 20 27 66 69 6c 65 73 27 29 20 7b 0a 24 61 75 74 6f 6c 6f 61 64 73 5b 24 74 68 69 | e.===.'files').{.$autoloads[$thi |
15480 | 73 2d 3e 67 65 74 46 69 6c 65 49 64 65 6e 74 69 66 69 65 72 28 24 70 61 63 6b 61 67 65 2c 20 24 | s->getFileIdentifier($package,.$ |
154a0 | 70 61 74 68 29 5d 20 3d 20 24 72 65 6c 61 74 69 76 65 50 61 74 68 3b 0a 63 6f 6e 74 69 6e 75 65 | path)].=.$relativePath;.continue |
154c0 | 3b 0a 7d 0a 69 66 20 28 24 74 79 70 65 20 3d 3d 3d 20 27 63 6c 61 73 73 6d 61 70 27 29 20 7b 0a | ;.}.if.($type.===.'classmap').{. |
154e0 | 24 61 75 74 6f 6c 6f 61 64 73 5b 5d 20 3d 20 24 72 65 6c 61 74 69 76 65 50 61 74 68 3b 0a 63 6f | $autoloads[].=.$relativePath;.co |
15500 | 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 24 61 75 74 6f 6c 6f 61 64 73 5b 24 6e 61 6d 65 73 70 61 63 65 | ntinue;.}..$autoloads[$namespace |
15520 | 5d 5b 5d 20 3d 20 24 72 65 6c 61 74 69 76 65 50 61 74 68 3b 0a 7d 0a 7d 0a 7d 0a 0a 72 65 74 75 | ][].=.$relativePath;.}.}.}..retu |
15540 | 72 6e 20 24 61 75 74 6f 6c 6f 61 64 73 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 | rn.$autoloads;.}.....protected.f |
15560 | 75 6e 63 74 69 6f 6e 20 67 65 74 46 69 6c 65 49 64 65 6e 74 69 66 69 65 72 28 50 61 63 6b 61 67 | unction.getFileIdentifier(Packag |
15580 | 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 | eInterface.$package,.string.$pat |
155a0 | 68 29 0a 7b 0a 72 65 74 75 72 6e 20 6d 64 35 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d | h).{.return.md5($package->getNam |
155c0 | 65 28 29 20 2e 20 27 3a 27 20 2e 20 24 70 61 74 68 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 | e()...':'...$path);.}..........p |
155e0 | 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 66 69 6c 74 65 72 50 61 63 6b 61 67 65 4d | rotected.function.filterPackageM |
15600 | 61 70 28 61 72 72 61 79 20 24 70 61 63 6b 61 67 65 4d 61 70 2c 20 52 6f 6f 74 50 61 63 6b 61 67 | ap(array.$packageMap,.RootPackag |
15620 | 65 49 6e 74 65 72 66 61 63 65 20 24 72 6f 6f 74 50 61 63 6b 61 67 65 29 0a 7b 0a 24 70 61 63 6b | eInterface.$rootPackage).{.$pack |
15640 | 61 67 65 73 20 3d 20 5b 5d 3b 0a 24 69 6e 63 6c 75 64 65 20 3d 20 5b 5d 3b 0a 24 72 65 70 6c 61 | ages.=.[];.$include.=.[];.$repla |
15660 | 63 65 64 42 79 20 3d 20 5b 5d 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 4d 61 | cedBy.=.[];..foreach.($packageMa |
15680 | 70 20 61 73 20 24 69 74 65 6d 29 20 7b 0a 24 70 61 63 6b 61 67 65 20 3d 20 24 69 74 65 6d 5b 30 | p.as.$item).{.$package.=.$item[0 |
156a0 | 5d 3b 0a 24 6e 61 6d 65 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 3b 0a | ];.$name.=.$package->getName();. |
156c0 | 24 70 61 63 6b 61 67 65 73 5b 24 6e 61 6d 65 5d 20 3d 20 24 70 61 63 6b 61 67 65 3b 0a 66 6f 72 | $packages[$name].=.$package;.for |
156e0 | 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 52 65 70 6c 61 63 65 73 28 29 20 61 73 | each.($package->getReplaces().as |
15700 | 20 24 72 65 70 6c 61 63 65 29 20 7b 0a 24 72 65 70 6c 61 63 65 64 42 79 5b 24 72 65 70 6c 61 63 | .$replace).{.$replacedBy[$replac |
15720 | 65 2d 3e 67 65 74 54 61 72 67 65 74 28 29 5d 20 3d 20 24 6e 61 6d 65 3b 0a 7d 0a 7d 0a 0a 24 61 | e->getTarget()].=.$name;.}.}..$a |
15740 | 64 64 20 3d 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 50 61 63 6b 61 67 65 49 6e 74 | dd.=.static.function.(PackageInt |
15760 | 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 29 20 75 73 65 20 28 26 24 61 64 64 2c 20 24 70 61 | erface.$package).use.(&$add,.$pa |
15780 | 63 6b 61 67 65 73 2c 20 26 24 69 6e 63 6c 75 64 65 2c 20 24 72 65 70 6c 61 63 65 64 42 79 29 3a | ckages,.&$include,.$replacedBy): |
157a0 | 20 76 6f 69 64 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 52 65 | .void.{.foreach.($package->getRe |
157c0 | 71 75 69 72 65 73 28 29 20 61 73 20 24 6c 69 6e 6b 29 20 7b 0a 24 74 61 72 67 65 74 20 3d 20 24 | quires().as.$link).{.$target.=.$ |
157e0 | 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 74 28 29 3b 0a 69 66 20 28 69 73 73 65 74 28 24 72 65 | link->getTarget();.if.(isset($re |
15800 | 70 6c 61 63 65 64 42 79 5b 24 74 61 72 67 65 74 5d 29 29 20 7b 0a 24 74 61 72 67 65 74 20 3d 20 | placedBy[$target])).{.$target.=. |
15820 | 24 72 65 70 6c 61 63 65 64 42 79 5b 24 74 61 72 67 65 74 5d 3b 0a 7d 0a 69 66 20 28 21 69 73 73 | $replacedBy[$target];.}.if.(!iss |
15840 | 65 74 28 24 69 6e 63 6c 75 64 65 5b 24 74 61 72 67 65 74 5d 29 29 20 7b 0a 24 69 6e 63 6c 75 64 | et($include[$target])).{.$includ |
15860 | 65 5b 24 74 61 72 67 65 74 5d 20 3d 20 74 72 75 65 3b 0a 69 66 20 28 69 73 73 65 74 28 24 70 61 | e[$target].=.true;.if.(isset($pa |
15880 | 63 6b 61 67 65 73 5b 24 74 61 72 67 65 74 5d 29 29 20 7b 0a 24 61 64 64 28 24 70 61 63 6b 61 67 | ckages[$target])).{.$add($packag |
158a0 | 65 73 5b 24 74 61 72 67 65 74 5d 29 3b 0a 7d 0a 7d 0a 7d 0a 7d 3b 0a 24 61 64 64 28 24 72 6f 6f | es[$target]);.}.}.}.};.$add($roo |
158c0 | 74 50 61 63 6b 61 67 65 29 3b 0a 0a 72 65 74 75 72 6e 20 61 72 72 61 79 5f 66 69 6c 74 65 72 28 | tPackage);..return.array_filter( |
158e0 | 0a 24 70 61 63 6b 61 67 65 4d 61 70 2c 0a 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 | .$packageMap,.static.function.($ |
15900 | 69 74 65 6d 29 20 75 73 65 20 28 24 69 6e 63 6c 75 64 65 29 3a 20 62 6f 6f 6c 20 7b 0a 24 70 61 | item).use.($include):.bool.{.$pa |
15920 | 63 6b 61 67 65 20 3d 20 24 69 74 65 6d 5b 30 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b | ckage.=.$item[0];.foreach.($pack |
15940 | 61 67 65 2d 3e 67 65 74 4e 61 6d 65 73 28 29 20 61 73 20 24 6e 61 6d 65 29 20 7b 0a 69 66 20 28 | age->getNames().as.$name).{.if.( |
15960 | 69 73 73 65 74 28 24 69 6e 63 6c 75 64 65 5b 24 6e 61 6d 65 5d 29 29 20 7b 0a 72 65 74 75 72 6e | isset($include[$name])).{.return |
15980 | 20 74 72 75 65 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 29 3b 0a 7d | .true;.}.}..return.false;.}.);.} |
159a0 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 73 6f 72 | ..........protected.function.sor |
159c0 | 74 50 61 63 6b 61 67 65 4d 61 70 28 61 72 72 61 79 20 24 70 61 63 6b 61 67 65 4d 61 70 29 0a 7b | tPackageMap(array.$packageMap).{ |
159e0 | 0a 24 70 61 63 6b 61 67 65 73 20 3d 20 5b 5d 3b 0a 24 70 61 74 68 73 20 3d 20 5b 5d 3b 0a 0a 66 | .$packages.=.[];.$paths.=.[];..f |
15a00 | 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 4d 61 70 20 61 73 20 24 69 74 65 6d 29 20 7b 0a | oreach.($packageMap.as.$item).{. |
15a20 | 5b 24 70 61 63 6b 61 67 65 2c 20 24 70 61 74 68 5d 20 3d 20 24 69 74 65 6d 3b 0a 24 6e 61 6d 65 | [$package,.$path].=.$item;.$name |
15a40 | 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 3b 0a 24 70 61 63 6b 61 67 65 | .=.$package->getName();.$package |
15a60 | 73 5b 24 6e 61 6d 65 5d 20 3d 20 24 70 61 63 6b 61 67 65 3b 0a 24 70 61 74 68 73 5b 24 6e 61 6d | s[$name].=.$package;.$paths[$nam |
15a80 | 65 5d 20 3d 20 24 70 61 74 68 3b 0a 7d 0a 0a 24 73 6f 72 74 65 64 50 61 63 6b 61 67 65 73 20 3d | e].=.$path;.}..$sortedPackages.= |
15aa0 | 20 50 61 63 6b 61 67 65 53 6f 72 74 65 72 3a 3a 73 6f 72 74 50 61 63 6b 61 67 65 73 28 24 70 61 | .PackageSorter::sortPackages($pa |
15ac0 | 63 6b 61 67 65 73 29 3b 0a 0a 24 73 6f 72 74 65 64 50 61 63 6b 61 67 65 4d 61 70 20 3d 20 5b 5d | ckages);..$sortedPackageMap.=.[] |
15ae0 | 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 73 6f 72 74 65 64 50 61 63 6b 61 67 65 73 20 61 73 20 24 | ;..foreach.($sortedPackages.as.$ |
15b00 | 70 61 63 6b 61 67 65 29 20 7b 0a 24 6e 61 6d 65 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 | package).{.$name.=.$package->get |
15b20 | 4e 61 6d 65 28 29 3b 0a 24 73 6f 72 74 65 64 50 61 63 6b 61 67 65 4d 61 70 5b 5d 20 3d 20 5b 24 | Name();.$sortedPackageMap[].=.[$ |
15b40 | 70 61 63 6b 61 67 65 73 5b 24 6e 61 6d 65 5d 2c 20 24 70 61 74 68 73 5b 24 6e 61 6d 65 5d 5d 3b | packages[$name],.$paths[$name]]; |
15b60 | 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 73 6f 72 74 65 64 50 61 63 6b 61 67 65 4d 61 70 3b 0a 7d 0a | .}..return.$sortedPackageMap;.}. |
15b80 | 7d 0a 0a 66 75 6e 63 74 69 6f 6e 20 63 6f 6d 70 6f 73 65 72 52 65 71 75 69 72 65 28 73 74 72 69 | }..function.composerRequire(stri |
15ba0 | 6e 67 20 24 66 69 6c 65 49 64 65 6e 74 69 66 69 65 72 2c 20 73 74 72 69 6e 67 20 24 66 69 6c 65 | ng.$fileIdentifier,.string.$file |
15bc0 | 29 3a 20 76 6f 69 64 0a 7b 0a 69 66 20 28 65 6d 70 74 79 28 24 47 4c 4f 42 41 4c 53 5b 27 5f 5f | ):.void.{.if.(empty($GLOBALS['__ |
15be0 | 63 6f 6d 70 6f 73 65 72 5f 61 75 74 6f 6c 6f 61 64 5f 66 69 6c 65 73 27 5d 5b 24 66 69 6c 65 49 | composer_autoload_files'][$fileI |
15c00 | 64 65 6e 74 69 66 69 65 72 5d 29 29 20 7b 0a 24 47 4c 4f 42 41 4c 53 5b 27 5f 5f 63 6f 6d 70 6f | dentifier])).{.$GLOBALS['__compo |
15c20 | 73 65 72 5f 61 75 74 6f 6c 6f 61 64 5f 66 69 6c 65 73 27 5d 5b 24 66 69 6c 65 49 64 65 6e 74 69 | ser_autoload_files'][$fileIdenti |
15c40 | 66 69 65 72 5d 20 3d 20 74 72 75 65 3b 0a 0a 72 65 71 75 69 72 65 20 24 66 69 6c 65 3b 0a 7d 0a | fier].=.true;..require.$file;.}. |
15c60 | 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b | }.<?php.declare(strict_types=1); |
15c80 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 | ..................namespace.Comp |
15ca0 | 6f 73 65 72 5c 41 75 74 6f 6c 6f 61 64 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6c 61 | oser\Autoload;..use.Composer\Cla |
15cc0 | 73 73 4d 61 70 47 65 6e 65 72 61 74 6f 72 5c 46 69 6c 65 4c 69 73 74 3b 0a 75 73 65 20 43 6f 6d | ssMapGenerator\FileList;.use.Com |
15ce0 | 70 6f 73 65 72 5c 49 4f 5c 49 4f 49 6e 74 65 72 66 61 63 65 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 63 | poser\IO\IOInterface;..........c |
15d00 | 6c 61 73 73 20 43 6c 61 73 73 4d 61 70 47 65 6e 65 72 61 74 6f 72 0a 7b 0a 0a 0a 0a 0a 0a 0a 70 | lass.ClassMapGenerator.{.......p |
15d20 | 75 62 6c 69 63 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 64 75 6d 70 28 69 74 65 72 61 | ublic.static.function.dump(itera |
15d40 | 62 6c 65 20 24 64 69 72 73 2c 20 73 74 72 69 6e 67 20 24 66 69 6c 65 29 3a 20 76 6f 69 64 0a 7b | ble.$dirs,.string.$file):.void.{ |
15d60 | 0a 24 6d 61 70 73 20 3d 20 5b 5d 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 64 69 72 73 20 61 73 20 | .$maps.=.[];..foreach.($dirs.as. |
15d80 | 24 64 69 72 29 20 7b 0a 24 6d 61 70 73 20 3d 20 61 72 72 61 79 5f 6d 65 72 67 65 28 24 6d 61 70 | $dir).{.$maps.=.array_merge($map |
15da0 | 73 2c 20 73 74 61 74 69 63 3a 3a 63 72 65 61 74 65 4d 61 70 28 24 64 69 72 29 29 3b 0a 7d 0a 0a | s,.static::createMap($dir));.}.. |
15dc0 | 66 69 6c 65 5f 70 75 74 5f 63 6f 6e 74 65 6e 74 73 28 24 66 69 6c 65 2c 20 73 70 72 69 6e 74 66 | file_put_contents($file,.sprintf |
15de0 | 28 27 3c 3f 70 68 70 20 72 65 74 75 72 6e 20 25 73 3b 27 2c 20 76 61 72 5f 65 78 70 6f 72 74 28 | ('<?php.return.%s;',.var_export( |
15e00 | 24 6d 61 70 73 2c 20 74 72 75 65 29 29 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 | $maps,.true)));.}..............p |
15e20 | 75 62 6c 69 63 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 63 72 65 61 74 65 4d 61 70 28 | ublic.static.function.createMap( |
15e40 | 24 70 61 74 68 2c 20 3f 73 74 72 69 6e 67 20 24 65 78 63 6c 75 64 65 64 20 3d 20 6e 75 6c 6c 2c | $path,.?string.$excluded.=.null, |
15e60 | 20 3f 49 4f 49 6e 74 65 72 66 61 63 65 20 24 69 6f 20 3d 20 6e 75 6c 6c 2c 20 3f 73 74 72 69 6e | .?IOInterface.$io.=.null,.?strin |
15e80 | 67 20 24 6e 61 6d 65 73 70 61 63 65 20 3d 20 6e 75 6c 6c 2c 20 3f 73 74 72 69 6e 67 20 24 61 75 | g.$namespace.=.null,.?string.$au |
15ea0 | 74 6f 6c 6f 61 64 54 79 70 65 20 3d 20 6e 75 6c 6c 2c 20 61 72 72 61 79 20 26 24 73 63 61 6e 6e | toloadType.=.null,.array.&$scann |
15ec0 | 65 64 46 69 6c 65 73 20 3d 20 5b 5d 29 3a 20 61 72 72 61 79 0a 7b 0a 24 67 65 6e 65 72 61 74 6f | edFiles.=.[]):.array.{.$generato |
15ee0 | 72 20 3d 20 6e 65 77 20 5c 43 6f 6d 70 6f 73 65 72 5c 43 6c 61 73 73 4d 61 70 47 65 6e 65 72 61 | r.=.new.\Composer\ClassMapGenera |
15f00 | 74 6f 72 5c 43 6c 61 73 73 4d 61 70 47 65 6e 65 72 61 74 6f 72 28 5b 27 70 68 70 27 2c 20 27 69 | tor\ClassMapGenerator(['php',.'i |
15f20 | 6e 63 27 2c 20 27 68 68 27 5d 29 3b 0a 24 66 69 6c 65 4c 69 73 74 20 3d 20 6e 65 77 20 46 69 6c | nc',.'hh']);.$fileList.=.new.Fil |
15f40 | 65 4c 69 73 74 28 29 3b 0a 24 66 69 6c 65 4c 69 73 74 2d 3e 66 69 6c 65 73 20 3d 20 24 73 63 61 | eList();.$fileList->files.=.$sca |
15f60 | 6e 6e 65 64 46 69 6c 65 73 3b 0a 24 67 65 6e 65 72 61 74 6f 72 2d 3e 61 76 6f 69 64 44 75 70 6c | nnedFiles;.$generator->avoidDupl |
15f80 | 69 63 61 74 65 53 63 61 6e 73 28 24 66 69 6c 65 4c 69 73 74 29 3b 0a 0a 24 67 65 6e 65 72 61 74 | icateScans($fileList);..$generat |
15fa0 | 6f 72 2d 3e 73 63 61 6e 50 61 74 68 73 28 24 70 61 74 68 2c 20 24 65 78 63 6c 75 64 65 64 2c 20 | or->scanPaths($path,.$excluded,. |
15fc0 | 24 61 75 74 6f 6c 6f 61 64 54 79 70 65 20 3f 3f 20 27 63 6c 61 73 73 6d 61 70 27 2c 20 24 6e 61 | $autoloadType.??.'classmap',.$na |
15fe0 | 6d 65 73 70 61 63 65 29 3b 0a 0a 24 63 6c 61 73 73 4d 61 70 20 3d 20 24 67 65 6e 65 72 61 74 6f | mespace);..$classMap.=.$generato |
16000 | 72 2d 3e 67 65 74 43 6c 61 73 73 4d 61 70 28 29 3b 0a 0a 24 73 63 61 6e 6e 65 64 46 69 6c 65 73 | r->getClassMap();..$scannedFiles |
16020 | 20 3d 20 24 66 69 6c 65 4c 69 73 74 2d 3e 66 69 6c 65 73 3b 0a 0a 69 66 20 28 24 69 6f 20 21 3d | .=.$fileList->files;..if.($io.!= |
16040 | 3d 20 6e 75 6c 6c 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 63 6c 61 73 73 4d 61 70 2d 3e 67 65 | =.null).{.foreach.($classMap->ge |
16060 | 74 50 73 72 56 69 6f 6c 61 74 69 6f 6e 73 28 29 20 61 73 20 24 6d 73 67 29 20 7b 0a 24 69 6f 2d | tPsrViolations().as.$msg).{.$io- |
16080 | 3e 77 72 69 74 65 45 72 72 6f 72 28 22 3c 77 61 72 6e 69 6e 67 3e 24 6d 73 67 3c 2f 77 61 72 6e | >writeError("<warning>$msg</warn |
160a0 | 69 6e 67 3e 22 29 3b 0a 7d 0a 0a 66 6f 72 65 61 63 68 20 28 24 63 6c 61 73 73 4d 61 70 2d 3e 67 | ing>");.}..foreach.($classMap->g |
160c0 | 65 74 41 6d 62 69 67 75 6f 75 73 43 6c 61 73 73 65 73 28 29 20 61 73 20 24 63 6c 61 73 73 20 3d | etAmbiguousClasses().as.$class.= |
160e0 | 3e 20 24 70 61 74 68 73 29 20 7b 0a 69 66 20 28 63 6f 75 6e 74 28 24 70 61 74 68 73 29 20 3e 20 | >.$paths).{.if.(count($paths).>. |
16100 | 31 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 0a 27 3c 77 61 72 6e 69 6e 67 3e | 1).{.$io->writeError(.'<warning> |
16120 | 57 61 72 6e 69 6e 67 3a 20 41 6d 62 69 67 75 6f 75 73 20 63 6c 61 73 73 20 72 65 73 6f 6c 75 74 | Warning:.Ambiguous.class.resolut |
16140 | 69 6f 6e 2c 20 22 27 2e 24 63 6c 61 73 73 2e 27 22 27 2e 0a 27 20 77 61 73 20 66 6f 75 6e 64 20 | ion,."'.$class.'"'..'.was.found. |
16160 | 27 2e 20 28 63 6f 75 6e 74 28 24 70 61 74 68 73 29 20 2b 20 31 29 20 2e 27 78 3a 20 69 6e 20 22 | '..(count($paths).+.1)..'x:.in." |
16180 | 27 2e 24 63 6c 61 73 73 4d 61 70 2d 3e 67 65 74 43 6c 61 73 73 50 61 74 68 28 24 63 6c 61 73 73 | '.$classMap->getClassPath($class |
161a0 | 29 2e 27 22 20 61 6e 64 20 22 27 2e 20 69 6d 70 6c 6f 64 65 28 27 22 2c 20 22 27 2c 20 24 70 61 | ).'".and."'..implode('",."',.$pa |
161c0 | 74 68 73 29 20 2e 27 22 2c 20 74 68 65 20 66 69 72 73 74 20 77 69 6c 6c 20 62 65 20 75 73 65 64 | ths)..'",.the.first.will.be.used |
161e0 | 2e 3c 2f 77 61 72 6e 69 6e 67 3e 27 0a 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 69 6f 2d 3e 77 72 | .</warning>'.);.}.else.{.$io->wr |
16200 | 69 74 65 45 72 72 6f 72 28 0a 27 3c 77 61 72 6e 69 6e 67 3e 57 61 72 6e 69 6e 67 3a 20 41 6d 62 | iteError(.'<warning>Warning:.Amb |
16220 | 69 67 75 6f 75 73 20 63 6c 61 73 73 20 72 65 73 6f 6c 75 74 69 6f 6e 2c 20 22 27 2e 24 63 6c 61 | iguous.class.resolution,."'.$cla |
16240 | 73 73 2e 27 22 27 2e 0a 27 20 77 61 73 20 66 6f 75 6e 64 20 69 6e 20 62 6f 74 68 20 22 27 2e 24 | ss.'"'..'.was.found.in.both."'.$ |
16260 | 63 6c 61 73 73 4d 61 70 2d 3e 67 65 74 43 6c 61 73 73 50 61 74 68 28 24 63 6c 61 73 73 29 2e 27 | classMap->getClassPath($class).' |
16280 | 22 20 61 6e 64 20 22 27 2e 20 69 6d 70 6c 6f 64 65 28 27 22 2c 20 22 27 2c 20 24 70 61 74 68 73 | ".and."'..implode('",."',.$paths |
162a0 | 29 20 2e 27 22 2c 20 74 68 65 20 66 69 72 73 74 20 77 69 6c 6c 20 62 65 20 75 73 65 64 2e 3c 2f | )..'",.the.first.will.be.used.</ |
162c0 | 77 61 72 6e 69 6e 67 3e 27 0a 29 3b 0a 7d 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 63 6c 61 73 | warning>'.);.}.}.}..return.$clas |
162e0 | 73 4d 61 70 2d 3e 67 65 74 4d 61 70 28 29 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 | sMap->getMap();.}.}.<?php.declar |
16300 | 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 | e(strict_types=1);............na |
16320 | 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 41 75 74 6f 6c 6f 61 64 3b 0a 0a 75 73 65 20 | mespace.Composer\Autoload;..use. |
16340 | 43 6f 6d 70 6f 73 65 72 5c 50 63 72 65 5c 50 72 65 67 3b 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 50 | Composer\Pcre\Preg;......class.P |
16360 | 68 70 46 69 6c 65 43 6c 65 61 6e 65 72 0a 7b 0a 0a 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 | hpFileCleaner.{..private.static. |
16380 | 24 74 79 70 65 43 6f 6e 66 69 67 3b 0a 0a 0a 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 24 72 | $typeConfig;...private.static.$r |
163a0 | 65 73 74 50 61 74 74 65 72 6e 3b 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 63 6f 6e 74 65 6e | estPattern;......private.$conten |
163c0 | 74 73 3b 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 6c 65 6e 3b 0a 0a 0a 0a 0a 0a 70 72 69 76 | ts;......private.$len;......priv |
163e0 | 61 74 65 20 24 6d 61 78 4d 61 74 63 68 65 73 3b 0a 0a 0a 70 72 69 76 61 74 65 20 24 69 6e 64 65 | ate.$maxMatches;...private.$inde |
16400 | 78 20 3d 20 30 3b 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f | x.=.0;.....public.static.functio |
16420 | 6e 20 73 65 74 54 79 70 65 43 6f 6e 66 69 67 28 61 72 72 61 79 20 24 74 79 70 65 73 29 3a 20 76 | n.setTypeConfig(array.$types):.v |
16440 | 6f 69 64 0a 7b 0a 66 6f 72 65 61 63 68 20 28 24 74 79 70 65 73 20 61 73 20 24 74 79 70 65 29 20 | oid.{.foreach.($types.as.$type). |
16460 | 7b 0a 73 65 6c 66 3a 3a 24 74 79 70 65 43 6f 6e 66 69 67 5b 24 74 79 70 65 5b 30 5d 5d 20 3d 20 | {.self::$typeConfig[$type[0]].=. |
16480 | 5b 0a 27 6e 61 6d 65 27 20 3d 3e 20 24 74 79 70 65 2c 0a 27 6c 65 6e 67 74 68 27 20 3d 3e 20 5c | [.'name'.=>.$type,.'length'.=>.\ |
164a0 | 73 74 72 6c 65 6e 28 24 74 79 70 65 29 2c 0a 27 70 61 74 74 65 72 6e 27 20 3d 3e 20 27 7b 2e 5c | strlen($type),.'pattern'.=>.'{.\ |
164c0 | 62 28 3f 3c 21 5b 5c 24 3a 3e 5d 29 27 2e 24 74 79 70 65 2e 27 5c 73 2b 2b 5b 61 2d 7a 41 2d 5a | b(?<![\$:>])'.$type.'\s++[a-zA-Z |
164e0 | 5f 5c 78 37 66 2d 5c 78 66 66 3a 5d 5b 61 2d 7a 41 2d 5a 30 2d 39 5f 5c 78 37 66 2d 5c 78 66 66 | _\x7f-\xff:][a-zA-Z0-9_\x7f-\xff |
16500 | 3a 5c 2d 5d 2a 2b 7d 41 69 73 27 2c 0a 5d 3b 0a 7d 0a 0a 73 65 6c 66 3a 3a 24 72 65 73 74 50 61 | :\-]*+}Ais',.];.}..self::$restPa |
16520 | 74 74 65 72 6e 20 3d 20 27 7b 5b 5e 3f 22 5c 27 3c 2f 27 2e 69 6d 70 6c 6f 64 65 28 27 27 2c 20 | ttern.=.'{[^?"\'</'.implode('',. |
16540 | 61 72 72 61 79 5f 6b 65 79 73 28 73 65 6c 66 3a 3a 24 74 79 70 65 43 6f 6e 66 69 67 29 29 2e 27 | array_keys(self::$typeConfig)).' |
16560 | 5d 2b 7d 41 27 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 | ]+}A';.}..public.function.__cons |
16580 | 74 72 75 63 74 28 73 74 72 69 6e 67 20 24 63 6f 6e 74 65 6e 74 73 2c 20 69 6e 74 20 24 6d 61 78 | truct(string.$contents,.int.$max |
165a0 | 4d 61 74 63 68 65 73 29 0a 7b 0a 24 74 68 69 73 2d 3e 63 6f 6e 74 65 6e 74 73 20 3d 20 24 63 6f | Matches).{.$this->contents.=.$co |
165c0 | 6e 74 65 6e 74 73 3b 0a 24 74 68 69 73 2d 3e 6c 65 6e 20 3d 20 5c 73 74 72 6c 65 6e 28 24 74 68 | ntents;.$this->len.=.\strlen($th |
165e0 | 69 73 2d 3e 63 6f 6e 74 65 6e 74 73 29 3b 0a 24 74 68 69 73 2d 3e 6d 61 78 4d 61 74 63 68 65 73 | is->contents);.$this->maxMatches |
16600 | 20 3d 20 24 6d 61 78 4d 61 74 63 68 65 73 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 | .=.$maxMatches;.}..public.functi |
16620 | 6f 6e 20 63 6c 65 61 6e 28 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 24 63 6c 65 61 6e 20 3d 20 27 27 | on.clean():.string.{.$clean.=.'' |
16640 | 3b 0a 0a 77 68 69 6c 65 20 28 24 74 68 69 73 2d 3e 69 6e 64 65 78 20 3c 20 24 74 68 69 73 2d 3e | ;..while.($this->index.<.$this-> |
16660 | 6c 65 6e 29 20 7b 0a 24 74 68 69 73 2d 3e 73 6b 69 70 54 6f 50 68 70 28 29 3b 0a 24 63 6c 65 61 | len).{.$this->skipToPhp();.$clea |
16680 | 6e 20 2e 3d 20 27 3c 3f 27 3b 0a 0a 77 68 69 6c 65 20 28 24 74 68 69 73 2d 3e 69 6e 64 65 78 20 | n..=.'<?';..while.($this->index. |
166a0 | 3c 20 24 74 68 69 73 2d 3e 6c 65 6e 29 20 7b 0a 24 63 68 61 72 20 3d 20 24 74 68 69 73 2d 3e 63 | <.$this->len).{.$char.=.$this->c |
166c0 | 6f 6e 74 65 6e 74 73 5b 24 74 68 69 73 2d 3e 69 6e 64 65 78 5d 3b 0a 69 66 20 28 24 63 68 61 72 | ontents[$this->index];.if.($char |
166e0 | 20 3d 3d 3d 20 27 3f 27 20 26 26 20 24 74 68 69 73 2d 3e 70 65 65 6b 28 27 3e 27 29 29 20 7b 0a | .===.'?'.&&.$this->peek('>')).{. |
16700 | 24 63 6c 65 61 6e 20 2e 3d 20 27 3f 3e 27 3b 0a 24 74 68 69 73 2d 3e 69 6e 64 65 78 20 2b 3d 20 | $clean..=.'?>';.$this->index.+=. |
16720 | 32 3b 0a 63 6f 6e 74 69 6e 75 65 20 32 3b 0a 7d 0a 0a 69 66 20 28 24 63 68 61 72 20 3d 3d 3d 20 | 2;.continue.2;.}..if.($char.===. |
16740 | 27 22 27 29 20 7b 0a 24 74 68 69 73 2d 3e 73 6b 69 70 53 74 72 69 6e 67 28 27 22 27 29 3b 0a 24 | '"').{.$this->skipString('"');.$ |
16760 | 63 6c 65 61 6e 20 2e 3d 20 27 6e 75 6c 6c 27 3b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 69 66 | clean..=.'null';.continue;.}..if |
16780 | 20 28 24 63 68 61 72 20 3d 3d 3d 20 22 27 22 29 20 7b 0a 24 74 68 69 73 2d 3e 73 6b 69 70 53 74 | .($char.===."'").{.$this->skipSt |
167a0 | 72 69 6e 67 28 22 27 22 29 3b 0a 24 63 6c 65 61 6e 20 2e 3d 20 27 6e 75 6c 6c 27 3b 0a 63 6f 6e | ring("'");.$clean..=.'null';.con |
167c0 | 74 69 6e 75 65 3b 0a 7d 0a 0a 69 66 20 28 24 63 68 61 72 20 3d 3d 3d 20 22 3c 22 20 26 26 20 24 | tinue;.}..if.($char.===."<".&&.$ |
167e0 | 74 68 69 73 2d 3e 70 65 65 6b 28 27 3c 27 29 20 26 26 20 24 74 68 69 73 2d 3e 6d 61 74 63 68 28 | this->peek('<').&&.$this->match( |
16800 | 27 7b 3c 3c 3c 5b 20 5c 74 5d 2a 2b 28 5b 5c 27 22 5d 3f 29 28 5b 61 2d 7a 41 2d 5a 5f 5c 78 38 | '{<<<[.\t]*+([\'"]?)([a-zA-Z_\x8 |
16820 | 30 2d 5c 78 66 66 5d 5b 61 2d 7a 41 2d 5a 30 2d 39 5f 5c 78 38 30 2d 5c 78 66 66 5d 2a 2b 29 5c | 0-\xff][a-zA-Z0-9_\x80-\xff]*+)\ |
16840 | 5c 31 28 3f 3a 5c 72 5c 6e 7c 5c 6e 7c 5c 72 29 7d 41 27 2c 20 24 6d 61 74 63 68 29 29 20 7b 0a | \1(?:\r\n|\n|\r)}A',.$match)).{. |
16860 | 24 74 68 69 73 2d 3e 69 6e 64 65 78 20 2b 3d 20 5c 73 74 72 6c 65 6e 28 24 6d 61 74 63 68 5b 30 | $this->index.+=.\strlen($match[0 |
16880 | 5d 29 3b 0a 24 74 68 69 73 2d 3e 73 6b 69 70 48 65 72 65 64 6f 63 28 24 6d 61 74 63 68 5b 32 5d | ]);.$this->skipHeredoc($match[2] |
168a0 | 29 3b 0a 24 63 6c 65 61 6e 20 2e 3d 20 27 6e 75 6c 6c 27 3b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d | );.$clean..=.'null';.continue;.} |
168c0 | 0a 0a 69 66 20 28 24 63 68 61 72 20 3d 3d 3d 20 27 2f 27 29 20 7b 0a 69 66 20 28 24 74 68 69 73 | ..if.($char.===.'/').{.if.($this |
168e0 | 2d 3e 70 65 65 6b 28 27 2f 27 29 29 20 7b 0a 24 74 68 69 73 2d 3e 73 6b 69 70 54 6f 4e 65 77 6c | ->peek('/')).{.$this->skipToNewl |
16900 | 69 6e 65 28 29 3b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 69 66 20 28 24 74 68 69 73 2d 3e 70 65 | ine();.continue;.}.if.($this->pe |
16920 | 65 6b 28 27 2a 27 29 29 20 7b 0a 24 74 68 69 73 2d 3e 73 6b 69 70 43 6f 6d 6d 65 6e 74 28 29 3b | ek('*')).{.$this->skipComment(); |
16940 | 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 24 74 68 69 73 2d 3e 6d 61 78 4d 61 | .continue;.}.}..if.($this->maxMa |
16960 | 74 63 68 65 73 20 3d 3d 3d 20 31 20 26 26 20 69 73 73 65 74 28 73 65 6c 66 3a 3a 24 74 79 70 65 | tches.===.1.&&.isset(self::$type |
16980 | 43 6f 6e 66 69 67 5b 24 63 68 61 72 5d 29 29 20 7b 0a 24 74 79 70 65 20 3d 20 73 65 6c 66 3a 3a | Config[$char])).{.$type.=.self:: |
169a0 | 24 74 79 70 65 43 6f 6e 66 69 67 5b 24 63 68 61 72 5d 3b 0a 69 66 20 28 0a 5c 73 75 62 73 74 72 | $typeConfig[$char];.if.(.\substr |
169c0 | 28 24 74 68 69 73 2d 3e 63 6f 6e 74 65 6e 74 73 2c 20 24 74 68 69 73 2d 3e 69 6e 64 65 78 2c 20 | ($this->contents,.$this->index,. |
169e0 | 24 74 79 70 65 5b 27 6c 65 6e 67 74 68 27 5d 29 20 3d 3d 3d 20 24 74 79 70 65 5b 27 6e 61 6d 65 | $type['length']).===.$type['name |
16a00 | 27 5d 0a 26 26 20 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 24 74 79 70 65 5b 27 70 61 74 74 65 | '].&&.Preg::isMatch($type['patte |
16a20 | 72 6e 27 5d 2c 20 24 74 68 69 73 2d 3e 63 6f 6e 74 65 6e 74 73 2c 20 24 6d 61 74 63 68 2c 20 30 | rn'],.$this->contents,.$match,.0 |
16a40 | 2c 20 24 74 68 69 73 2d 3e 69 6e 64 65 78 20 2d 20 31 29 0a 29 20 7b 0a 24 63 6c 65 61 6e 20 2e | ,.$this->index.-.1).).{.$clean.. |
16a60 | 3d 20 24 6d 61 74 63 68 5b 30 5d 3b 0a 0a 72 65 74 75 72 6e 20 24 63 6c 65 61 6e 3b 0a 7d 0a 7d | =.$match[0];..return.$clean;.}.} |
16a80 | 0a 0a 24 74 68 69 73 2d 3e 69 6e 64 65 78 20 2b 3d 20 31 3b 0a 69 66 20 28 24 74 68 69 73 2d 3e | ..$this->index.+=.1;.if.($this-> |
16aa0 | 6d 61 74 63 68 28 73 65 6c 66 3a 3a 24 72 65 73 74 50 61 74 74 65 72 6e 2c 20 24 6d 61 74 63 68 | match(self::$restPattern,.$match |
16ac0 | 29 29 20 7b 0a 24 63 6c 65 61 6e 20 2e 3d 20 24 63 68 61 72 20 2e 20 24 6d 61 74 63 68 5b 30 5d | )).{.$clean..=.$char...$match[0] |
16ae0 | 3b 0a 24 74 68 69 73 2d 3e 69 6e 64 65 78 20 2b 3d 20 5c 73 74 72 6c 65 6e 28 24 6d 61 74 63 68 | ;.$this->index.+=.\strlen($match |
16b00 | 5b 30 5d 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 63 6c 65 61 6e 20 2e 3d 20 24 63 68 61 72 3b 0a | [0]);.}.else.{.$clean..=.$char;. |
16b20 | 7d 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 63 6c 65 61 6e 3b 0a 7d 0a 0a 70 72 69 76 61 74 65 | }.}.}..return.$clean;.}..private |
16b40 | 20 66 75 6e 63 74 69 6f 6e 20 73 6b 69 70 54 6f 50 68 70 28 29 3a 20 76 6f 69 64 0a 7b 0a 77 68 | .function.skipToPhp():.void.{.wh |
16b60 | 69 6c 65 20 28 24 74 68 69 73 2d 3e 69 6e 64 65 78 20 3c 20 24 74 68 69 73 2d 3e 6c 65 6e 29 20 | ile.($this->index.<.$this->len). |
16b80 | 7b 0a 69 66 20 28 24 74 68 69 73 2d 3e 63 6f 6e 74 65 6e 74 73 5b 24 74 68 69 73 2d 3e 69 6e 64 | {.if.($this->contents[$this->ind |
16ba0 | 65 78 5d 20 3d 3d 3d 20 27 3c 27 20 26 26 20 24 74 68 69 73 2d 3e 70 65 65 6b 28 27 3f 27 29 29 | ex].===.'<'.&&.$this->peek('?')) |
16bc0 | 20 7b 0a 24 74 68 69 73 2d 3e 69 6e 64 65 78 20 2b 3d 20 32 3b 0a 62 72 65 61 6b 3b 0a 7d 0a 0a | .{.$this->index.+=.2;.break;.}.. |
16be0 | 24 74 68 69 73 2d 3e 69 6e 64 65 78 20 2b 3d 20 31 3b 0a 7d 0a 7d 0a 0a 70 72 69 76 61 74 65 20 | $this->index.+=.1;.}.}..private. |
16c00 | 66 75 6e 63 74 69 6f 6e 20 73 6b 69 70 53 74 72 69 6e 67 28 73 74 72 69 6e 67 20 24 64 65 6c 69 | function.skipString(string.$deli |
16c20 | 6d 69 74 65 72 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 69 6e 64 65 78 20 2b 3d 20 31 | miter):.void.{.$this->index.+=.1 |
16c40 | 3b 0a 77 68 69 6c 65 20 28 24 74 68 69 73 2d 3e 69 6e 64 65 78 20 3c 20 24 74 68 69 73 2d 3e 6c | ;.while.($this->index.<.$this->l |
16c60 | 65 6e 29 20 7b 0a 69 66 20 28 24 74 68 69 73 2d 3e 63 6f 6e 74 65 6e 74 73 5b 24 74 68 69 73 2d | en).{.if.($this->contents[$this- |
16c80 | 3e 69 6e 64 65 78 5d 20 3d 3d 3d 20 27 5c 5c 27 20 26 26 20 28 24 74 68 69 73 2d 3e 70 65 65 6b | >index].===.'\\'.&&.($this->peek |
16ca0 | 28 27 5c 5c 27 29 20 7c 7c 20 24 74 68 69 73 2d 3e 70 65 65 6b 28 24 64 65 6c 69 6d 69 74 65 72 | ('\\').||.$this->peek($delimiter |
16cc0 | 29 29 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6e 64 65 78 20 2b 3d 20 32 3b 0a 63 6f 6e 74 69 6e 75 | ))).{.$this->index.+=.2;.continu |
16ce0 | 65 3b 0a 7d 0a 69 66 20 28 24 74 68 69 73 2d 3e 63 6f 6e 74 65 6e 74 73 5b 24 74 68 69 73 2d 3e | e;.}.if.($this->contents[$this-> |
16d00 | 69 6e 64 65 78 5d 20 3d 3d 3d 20 24 64 65 6c 69 6d 69 74 65 72 29 20 7b 0a 24 74 68 69 73 2d 3e | index].===.$delimiter).{.$this-> |
16d20 | 69 6e 64 65 78 20 2b 3d 20 31 3b 0a 62 72 65 61 6b 3b 0a 7d 0a 24 74 68 69 73 2d 3e 69 6e 64 65 | index.+=.1;.break;.}.$this->inde |
16d40 | 78 20 2b 3d 20 31 3b 0a 7d 0a 7d 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 73 6b | x.+=.1;.}.}..private.function.sk |
16d60 | 69 70 43 6f 6d 6d 65 6e 74 28 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 69 6e 64 65 78 | ipComment():.void.{.$this->index |
16d80 | 20 2b 3d 20 32 3b 0a 77 68 69 6c 65 20 28 24 74 68 69 73 2d 3e 69 6e 64 65 78 20 3c 20 24 74 68 | .+=.2;.while.($this->index.<.$th |
16da0 | 69 73 2d 3e 6c 65 6e 29 20 7b 0a 69 66 20 28 24 74 68 69 73 2d 3e 63 6f 6e 74 65 6e 74 73 5b 24 | is->len).{.if.($this->contents[$ |
16dc0 | 74 68 69 73 2d 3e 69 6e 64 65 78 5d 20 3d 3d 3d 20 27 2a 27 20 26 26 20 24 74 68 69 73 2d 3e 70 | this->index].===.'*'.&&.$this->p |
16de0 | 65 65 6b 28 27 2f 27 29 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6e 64 65 78 20 2b 3d 20 32 3b 0a 62 | eek('/')).{.$this->index.+=.2;.b |
16e00 | 72 65 61 6b 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 69 6e 64 65 78 20 2b 3d 20 31 3b 0a 7d 0a 7d 0a | reak;.}..$this->index.+=.1;.}.}. |
16e20 | 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 73 6b 69 70 54 6f 4e 65 77 6c 69 6e 65 28 | .private.function.skipToNewline( |
16e40 | 29 3a 20 76 6f 69 64 0a 7b 0a 77 68 69 6c 65 20 28 24 74 68 69 73 2d 3e 69 6e 64 65 78 20 3c 20 | ):.void.{.while.($this->index.<. |
16e60 | 24 74 68 69 73 2d 3e 6c 65 6e 29 20 7b 0a 69 66 20 28 24 74 68 69 73 2d 3e 63 6f 6e 74 65 6e 74 | $this->len).{.if.($this->content |
16e80 | 73 5b 24 74 68 69 73 2d 3e 69 6e 64 65 78 5d 20 3d 3d 3d 20 22 5c 72 22 20 7c 7c 20 24 74 68 69 | s[$this->index].===."\r".||.$thi |
16ea0 | 73 2d 3e 63 6f 6e 74 65 6e 74 73 5b 24 74 68 69 73 2d 3e 69 6e 64 65 78 5d 20 3d 3d 3d 20 22 5c | s->contents[$this->index].===."\ |
16ec0 | 6e 22 29 20 7b 0a 72 65 74 75 72 6e 3b 0a 7d 0a 24 74 68 69 73 2d 3e 69 6e 64 65 78 20 2b 3d 20 | n").{.return;.}.$this->index.+=. |
16ee0 | 31 3b 0a 7d 0a 7d 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 73 6b 69 70 48 65 72 | 1;.}.}..private.function.skipHer |
16f00 | 65 64 6f 63 28 73 74 72 69 6e 67 20 24 64 65 6c 69 6d 69 74 65 72 29 3a 20 76 6f 69 64 0a 7b 0a | edoc(string.$delimiter):.void.{. |
16f20 | 24 66 69 72 73 74 44 65 6c 69 6d 69 74 65 72 43 68 61 72 20 3d 20 24 64 65 6c 69 6d 69 74 65 72 | $firstDelimiterChar.=.$delimiter |
16f40 | 5b 30 5d 3b 0a 24 64 65 6c 69 6d 69 74 65 72 4c 65 6e 67 74 68 20 3d 20 5c 73 74 72 6c 65 6e 28 | [0];.$delimiterLength.=.\strlen( |
16f60 | 24 64 65 6c 69 6d 69 74 65 72 29 3b 0a 24 64 65 6c 69 6d 69 74 65 72 50 61 74 74 65 72 6e 20 3d | $delimiter);.$delimiterPattern.= |
16f80 | 20 27 7b 27 2e 70 72 65 67 5f 71 75 6f 74 65 28 24 64 65 6c 69 6d 69 74 65 72 29 2e 27 28 3f 21 | .'{'.preg_quote($delimiter).'(?! |
16fa0 | 5b 61 2d 7a 41 2d 5a 30 2d 39 5f 5c 78 38 30 2d 5c 78 66 66 5d 29 7d 41 27 3b 0a 0a 77 68 69 6c | [a-zA-Z0-9_\x80-\xff])}A';..whil |
16fc0 | 65 20 28 24 74 68 69 73 2d 3e 69 6e 64 65 78 20 3c 20 24 74 68 69 73 2d 3e 6c 65 6e 29 20 7b 0a | e.($this->index.<.$this->len).{. |
16fe0 | 0a 73 77 69 74 63 68 20 28 24 74 68 69 73 2d 3e 63 6f 6e 74 65 6e 74 73 5b 24 74 68 69 73 2d 3e | .switch.($this->contents[$this-> |
17000 | 69 6e 64 65 78 5d 29 20 7b 0a 63 61 73 65 20 22 5c 74 22 3a 0a 63 61 73 65 20 22 20 22 3a 0a 24 | index]).{.case."\t":.case.".":.$ |
17020 | 74 68 69 73 2d 3e 69 6e 64 65 78 20 2b 3d 20 31 3b 0a 63 6f 6e 74 69 6e 75 65 20 32 3b 0a 63 61 | this->index.+=.1;.continue.2;.ca |
17040 | 73 65 20 24 66 69 72 73 74 44 65 6c 69 6d 69 74 65 72 43 68 61 72 3a 0a 69 66 20 28 0a 5c 73 75 | se.$firstDelimiterChar:.if.(.\su |
17060 | 62 73 74 72 28 24 74 68 69 73 2d 3e 63 6f 6e 74 65 6e 74 73 2c 20 24 74 68 69 73 2d 3e 69 6e 64 | bstr($this->contents,.$this->ind |
17080 | 65 78 2c 20 24 64 65 6c 69 6d 69 74 65 72 4c 65 6e 67 74 68 29 20 3d 3d 3d 20 24 64 65 6c 69 6d | ex,.$delimiterLength).===.$delim |
170a0 | 69 74 65 72 0a 26 26 20 24 74 68 69 73 2d 3e 6d 61 74 63 68 28 24 64 65 6c 69 6d 69 74 65 72 50 | iter.&&.$this->match($delimiterP |
170c0 | 61 74 74 65 72 6e 29 0a 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6e 64 65 78 20 2b 3d 20 24 64 65 6c | attern).).{.$this->index.+=.$del |
170e0 | 69 6d 69 74 65 72 4c 65 6e 67 74 68 3b 0a 0a 72 65 74 75 72 6e 3b 0a 7d 0a 62 72 65 61 6b 3b 0a | imiterLength;..return;.}.break;. |
17100 | 7d 0a 0a 0a 77 68 69 6c 65 20 28 24 74 68 69 73 2d 3e 69 6e 64 65 78 20 3c 20 24 74 68 69 73 2d | }...while.($this->index.<.$this- |
17120 | 3e 6c 65 6e 29 20 7b 0a 24 74 68 69 73 2d 3e 73 6b 69 70 54 6f 4e 65 77 6c 69 6e 65 28 29 3b 0a | >len).{.$this->skipToNewline();. |
17140 | 0a 0a 77 68 69 6c 65 20 28 24 74 68 69 73 2d 3e 69 6e 64 65 78 20 3c 20 24 74 68 69 73 2d 3e 6c | ..while.($this->index.<.$this->l |
17160 | 65 6e 20 26 26 20 28 24 74 68 69 73 2d 3e 63 6f 6e 74 65 6e 74 73 5b 24 74 68 69 73 2d 3e 69 6e | en.&&.($this->contents[$this->in |
17180 | 64 65 78 5d 20 3d 3d 3d 20 22 5c 72 22 20 7c 7c 20 24 74 68 69 73 2d 3e 63 6f 6e 74 65 6e 74 73 | dex].===."\r".||.$this->contents |
171a0 | 5b 24 74 68 69 73 2d 3e 69 6e 64 65 78 5d 20 3d 3d 3d 20 22 5c 6e 22 29 29 20 7b 0a 24 74 68 69 | [$this->index].===."\n")).{.$thi |
171c0 | 73 2d 3e 69 6e 64 65 78 20 2b 3d 20 31 3b 0a 7d 0a 0a 62 72 65 61 6b 3b 0a 7d 0a 7d 0a 7d 0a 0a | s->index.+=.1;.}..break;.}.}.}.. |
171e0 | 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 70 65 65 6b 28 73 74 72 69 6e 67 20 24 63 68 | private.function.peek(string.$ch |
17200 | 61 72 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 69 6e 64 65 78 20 | ar):.bool.{.return.$this->index. |
17220 | 2b 20 31 20 3c 20 24 74 68 69 73 2d 3e 6c 65 6e 20 26 26 20 24 74 68 69 73 2d 3e 63 6f 6e 74 65 | +.1.<.$this->len.&&.$this->conte |
17240 | 6e 74 73 5b 24 74 68 69 73 2d 3e 69 6e 64 65 78 20 2b 20 31 5d 20 3d 3d 3d 20 24 63 68 61 72 3b | nts[$this->index.+.1].===.$char; |
17260 | 0a 7d 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 6d 61 74 63 68 28 24 | .}......private.function.match($ |
17280 | 72 65 67 65 78 2c 20 3f 61 72 72 61 79 20 26 24 6d 61 74 63 68 20 3d 20 6e 75 6c 6c 29 3a 20 62 | regex,.?array.&$match.=.null):.b |
172a0 | 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 24 72 65 67 65 | ool.{.return.Preg::isMatch($rege |
172c0 | 78 2c 20 24 74 68 69 73 2d 3e 63 6f 6e 74 65 6e 74 73 2c 20 24 6d 61 74 63 68 2c 20 30 2c 20 24 | x,.$this->contents,.$match,.0,.$ |
172e0 | 74 68 69 73 2d 3e 69 6e 64 65 78 29 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 | this->index);.}.}.<?php.declare( |
17300 | 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 | strict_types=1);............name |
17320 | 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 4f | space.Composer;..use.Composer\IO |
17340 | 5c 49 4f 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 63 72 65 5c | \IOInterface;.use.Composer\Pcre\ |
17360 | 50 72 65 67 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 46 69 6c 65 73 79 73 74 | Preg;.use.Composer\Util\Filesyst |
17380 | 65 6d 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 6c 61 74 66 6f 72 6d 3b 0a | em;.use.Composer\Util\Platform;. |
173a0 | 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 53 69 6c 65 6e 63 65 72 3b 0a 75 73 65 20 | use.Composer\Util\Silencer;.use. |
173c0 | 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 46 69 6e 64 65 72 5c 46 69 6e 64 65 72 3b | Symfony\Component\Finder\Finder; |
173e0 | 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 43 61 63 68 65 0a 7b 0a 0a 70 72 69 76 61 74 65 20 73 74 | .......class.Cache.{..private.st |
17400 | 61 74 69 63 20 24 63 61 63 68 65 43 6f 6c 6c 65 63 74 65 64 20 3d 20 6e 75 6c 6c 3b 0a 0a 70 72 | atic.$cacheCollected.=.null;..pr |
17420 | 69 76 61 74 65 20 24 69 6f 3b 0a 0a 70 72 69 76 61 74 65 20 24 72 6f 6f 74 3b 0a 0a 70 72 69 76 | ivate.$io;..private.$root;..priv |
17440 | 61 74 65 20 24 65 6e 61 62 6c 65 64 20 3d 20 6e 75 6c 6c 3b 0a 0a 70 72 69 76 61 74 65 20 24 61 | ate.$enabled.=.null;..private.$a |
17460 | 6c 6c 6f 77 6c 69 73 74 3b 0a 0a 70 72 69 76 61 74 65 20 24 66 69 6c 65 73 79 73 74 65 6d 3b 0a | llowlist;..private.$filesystem;. |
17480 | 0a 70 72 69 76 61 74 65 20 24 72 65 61 64 4f 6e 6c 79 3b 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 | .private.$readOnly;........publi |
174a0 | 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 49 4f 49 6e 74 65 72 66 61 | c.function.__construct(IOInterfa |
174c0 | 63 65 20 24 69 6f 2c 20 73 74 72 69 6e 67 20 24 63 61 63 68 65 44 69 72 2c 20 73 74 72 69 6e 67 | ce.$io,.string.$cacheDir,.string |
174e0 | 20 24 61 6c 6c 6f 77 6c 69 73 74 20 3d 20 27 61 2d 7a 30 2d 39 2e 27 2c 20 3f 46 69 6c 65 73 79 | .$allowlist.=.'a-z0-9.',.?Filesy |
17500 | 73 74 65 6d 20 24 66 69 6c 65 73 79 73 74 65 6d 20 3d 20 6e 75 6c 6c 2c 20 62 6f 6f 6c 20 24 72 | stem.$filesystem.=.null,.bool.$r |
17520 | 65 61 64 4f 6e 6c 79 20 3d 20 66 61 6c 73 65 29 0a 7b 0a 24 74 68 69 73 2d 3e 69 6f 20 3d 20 24 | eadOnly.=.false).{.$this->io.=.$ |
17540 | 69 6f 3b 0a 24 74 68 69 73 2d 3e 72 6f 6f 74 20 3d 20 72 74 72 69 6d 28 24 63 61 63 68 65 44 69 | io;.$this->root.=.rtrim($cacheDi |
17560 | 72 2c 20 27 2f 5c 5c 27 29 20 2e 20 27 2f 27 3b 0a 24 74 68 69 73 2d 3e 61 6c 6c 6f 77 6c 69 73 | r,.'/\\')...'/';.$this->allowlis |
17580 | 74 20 3d 20 24 61 6c 6c 6f 77 6c 69 73 74 3b 0a 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 73 74 65 | t.=.$allowlist;.$this->filesyste |
175a0 | 6d 20 3d 20 24 66 69 6c 65 73 79 73 74 65 6d 20 3f 3a 20 6e 65 77 20 46 69 6c 65 73 79 73 74 65 | m.=.$filesystem.?:.new.Filesyste |
175c0 | 6d 28 29 3b 0a 24 74 68 69 73 2d 3e 72 65 61 64 4f 6e 6c 79 20 3d 20 28 62 6f 6f 6c 29 20 24 72 | m();.$this->readOnly.=.(bool).$r |
175e0 | 65 61 64 4f 6e 6c 79 3b 0a 0a 69 66 20 28 21 73 65 6c 66 3a 3a 69 73 55 73 61 62 6c 65 28 24 63 | eadOnly;..if.(!self::isUsable($c |
17600 | 61 63 68 65 44 69 72 29 29 20 7b 0a 24 74 68 69 73 2d 3e 65 6e 61 62 6c 65 64 20 3d 20 66 61 6c | acheDir)).{.$this->enabled.=.fal |
17620 | 73 65 3b 0a 7d 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 52 | se;.}.}.....public.function.setR |
17640 | 65 61 64 4f 6e 6c 79 28 62 6f 6f 6c 20 24 72 65 61 64 4f 6e 6c 79 29 0a 7b 0a 24 74 68 69 73 2d | eadOnly(bool.$readOnly).{.$this- |
17660 | 3e 72 65 61 64 4f 6e 6c 79 20 3d 20 28 62 6f 6f 6c 29 20 24 72 65 61 64 4f 6e 6c 79 3b 0a 7d 0a | >readOnly.=.(bool).$readOnly;.}. |
17680 | 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 52 65 61 64 4f 6e 6c 79 28 29 | ....public.function.isReadOnly() |
176a0 | 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 72 65 61 64 4f 6e 6c 79 3b 0a 7d 0a 0a 0a 0a | .{.return.$this->readOnly;.}.... |
176c0 | 0a 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 55 73 61 62 6c 65 | .public.static.function.isUsable |
176e0 | 28 73 74 72 69 6e 67 20 24 70 61 74 68 29 0a 7b 0a 72 65 74 75 72 6e 20 21 50 72 65 67 3a 3a 69 | (string.$path).{.return.!Preg::i |
17700 | 73 4d 61 74 63 68 28 27 7b 28 5e 7c 5b 5c 5c 5c 5c 2f 5d 29 28 5c 24 6e 75 6c 6c 7c 6e 75 6c 7c | sMatch('{(^|[\\\\/])(\$null|nul| |
17720 | 4e 55 4c 7c 2f 64 65 76 2f 6e 75 6c 6c 29 28 5b 5c 5c 5c 5c 2f 5d 7c 24 29 7d 27 2c 20 24 70 61 | NUL|/dev/null)([\\\\/]|$)}',.$pa |
17740 | 74 68 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 45 6e 61 | th);.}.....public.function.isEna |
17760 | 62 6c 65 64 28 29 0a 7b 0a 69 66 20 28 24 74 68 69 73 2d 3e 65 6e 61 62 6c 65 64 20 3d 3d 3d 20 | bled().{.if.($this->enabled.===. |
17780 | 6e 75 6c 6c 29 20 7b 0a 24 74 68 69 73 2d 3e 65 6e 61 62 6c 65 64 20 3d 20 74 72 75 65 3b 0a 0a | null).{.$this->enabled.=.true;.. |
177a0 | 69 66 20 28 0a 21 24 74 68 69 73 2d 3e 72 65 61 64 4f 6e 6c 79 0a 26 26 20 28 0a 28 21 69 73 5f | if.(.!$this->readOnly.&&.(.(!is_ |
177c0 | 64 69 72 28 24 74 68 69 73 2d 3e 72 6f 6f 74 29 20 26 26 20 21 53 69 6c 65 6e 63 65 72 3a 3a 63 | dir($this->root).&&.!Silencer::c |
177e0 | 61 6c 6c 28 27 6d 6b 64 69 72 27 2c 20 24 74 68 69 73 2d 3e 72 6f 6f 74 2c 20 30 37 37 37 2c 20 | all('mkdir',.$this->root,.0777,. |
17800 | 74 72 75 65 29 29 0a 7c 7c 20 21 69 73 5f 77 72 69 74 61 62 6c 65 28 24 74 68 69 73 2d 3e 72 6f | true)).||.!is_writable($this->ro |
17820 | 6f 74 29 0a 29 0a 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 | ot).).).{.$this->io->writeError( |
17840 | 27 3c 77 61 72 6e 69 6e 67 3e 43 61 6e 6e 6f 74 20 63 72 65 61 74 65 20 63 61 63 68 65 20 64 69 | '<warning>Cannot.create.cache.di |
17860 | 72 65 63 74 6f 72 79 20 27 20 2e 20 24 74 68 69 73 2d 3e 72 6f 6f 74 20 2e 20 27 2c 20 6f 72 20 | rectory.'...$this->root...',.or. |
17880 | 64 69 72 65 63 74 6f 72 79 20 69 73 20 6e 6f 74 20 77 72 69 74 61 62 6c 65 2e 20 50 72 6f 63 65 | directory.is.not.writable..Proce |
178a0 | 65 64 69 6e 67 20 77 69 74 68 6f 75 74 20 63 61 63 68 65 2e 20 53 65 65 20 61 6c 73 6f 20 63 61 | eding.without.cache..See.also.ca |
178c0 | 63 68 65 2d 72 65 61 64 2d 6f 6e 6c 79 20 63 6f 6e 66 69 67 20 69 66 20 79 6f 75 72 20 66 69 6c | che-read-only.config.if.your.fil |
178e0 | 65 73 79 73 74 65 6d 20 69 73 20 72 65 61 64 2d 6f 6e 6c 79 2e 3c 2f 77 61 72 6e 69 6e 67 3e 27 | esystem.is.read-only.</warning>' |
17900 | 29 3b 0a 24 74 68 69 73 2d 3e 65 6e 61 62 6c 65 64 20 3d 20 66 61 6c 73 65 3b 0a 7d 0a 7d 0a 0a | );.$this->enabled.=.false;.}.}.. |
17920 | 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 65 6e 61 62 6c 65 64 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 | return.$this->enabled;.}.....pub |
17940 | 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 52 6f 6f 74 28 29 0a 7b 0a 72 65 74 75 72 6e 20 | lic.function.getRoot().{.return. |
17960 | 24 74 68 69 73 2d 3e 72 6f 6f 74 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 | $this->root;.}.....public.functi |
17980 | 6f 6e 20 72 65 61 64 28 73 74 72 69 6e 67 20 24 66 69 6c 65 29 0a 7b 0a 69 66 20 28 24 74 68 69 | on.read(string.$file).{.if.($thi |
179a0 | 73 2d 3e 69 73 45 6e 61 62 6c 65 64 28 29 29 20 7b 0a 24 66 69 6c 65 20 3d 20 50 72 65 67 3a 3a | s->isEnabled()).{.$file.=.Preg:: |
179c0 | 72 65 70 6c 61 63 65 28 27 7b 5b 5e 27 2e 24 74 68 69 73 2d 3e 61 6c 6c 6f 77 6c 69 73 74 2e 27 | replace('{[^'.$this->allowlist.' |
179e0 | 5d 7d 69 27 2c 20 27 2d 27 2c 20 24 66 69 6c 65 29 3b 0a 69 66 20 28 66 69 6c 65 5f 65 78 69 73 | ]}i',.'-',.$file);.if.(file_exis |
17a00 | 74 73 28 24 74 68 69 73 2d 3e 72 6f 6f 74 20 2e 20 24 66 69 6c 65 29 29 20 7b 0a 24 74 68 69 73 | ts($this->root...$file)).{.$this |
17a20 | 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 52 65 61 64 69 6e 67 20 27 2e 24 74 68 69 | ->io->writeError('Reading.'.$thi |
17a40 | 73 2d 3e 72 6f 6f 74 20 2e 20 24 66 69 6c 65 2e 27 20 66 72 6f 6d 20 63 61 63 68 65 27 2c 20 74 | s->root...$file.'.from.cache',.t |
17a60 | 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 3a 3a 44 45 42 55 47 29 3b 0a 0a 72 65 74 75 72 | rue,.IOInterface::DEBUG);..retur |
17a80 | 6e 20 66 69 6c 65 5f 67 65 74 5f 63 6f 6e 74 65 6e 74 73 28 24 74 68 69 73 2d 3e 72 6f 6f 74 20 | n.file_get_contents($this->root. |
17aa0 | 2e 20 24 66 69 6c 65 29 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a | ..$file);.}.}..return.false;.}.. |
17ac0 | 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 77 72 69 74 65 28 73 74 72 69 6e 67 20 | ...public.function.write(string. |
17ae0 | 24 66 69 6c 65 2c 20 73 74 72 69 6e 67 20 24 63 6f 6e 74 65 6e 74 73 29 0a 7b 0a 69 66 20 28 24 | $file,.string.$contents).{.if.($ |
17b00 | 74 68 69 73 2d 3e 69 73 45 6e 61 62 6c 65 64 28 29 20 26 26 20 21 24 74 68 69 73 2d 3e 72 65 61 | this->isEnabled().&&.!$this->rea |
17b20 | 64 4f 6e 6c 79 29 20 7b 0a 24 66 69 6c 65 20 3d 20 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 28 27 | dOnly).{.$file.=.Preg::replace(' |
17b40 | 7b 5b 5e 27 2e 24 74 68 69 73 2d 3e 61 6c 6c 6f 77 6c 69 73 74 2e 27 5d 7d 69 27 2c 20 27 2d 27 | {[^'.$this->allowlist.']}i',.'-' |
17b60 | 2c 20 24 66 69 6c 65 29 3b 0a 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 | ,.$file);..$this->io->writeError |
17b80 | 28 27 57 72 69 74 69 6e 67 20 27 2e 24 74 68 69 73 2d 3e 72 6f 6f 74 20 2e 20 24 66 69 6c 65 2e | ('Writing.'.$this->root...$file. |
17ba0 | 27 20 69 6e 74 6f 20 63 61 63 68 65 27 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 | '.into.cache',.true,.IOInterface |
17bc0 | 3a 3a 44 45 42 55 47 29 3b 0a 0a 24 74 65 6d 70 46 69 6c 65 4e 61 6d 65 20 3d 20 24 74 68 69 73 | ::DEBUG);..$tempFileName.=.$this |
17be0 | 2d 3e 72 6f 6f 74 20 2e 20 24 66 69 6c 65 20 2e 20 75 6e 69 71 69 64 28 27 2e 27 2c 20 74 72 75 | ->root...$file...uniqid('.',.tru |
17c00 | 65 29 20 2e 20 27 2e 74 6d 70 27 3b 0a 74 72 79 20 7b 0a 72 65 74 75 72 6e 20 66 69 6c 65 5f 70 | e)...'.tmp';.try.{.return.file_p |
17c20 | 75 74 5f 63 6f 6e 74 65 6e 74 73 28 24 74 65 6d 70 46 69 6c 65 4e 61 6d 65 2c 20 24 63 6f 6e 74 | ut_contents($tempFileName,.$cont |
17c40 | 65 6e 74 73 29 20 21 3d 3d 20 66 61 6c 73 65 20 26 26 20 72 65 6e 61 6d 65 28 24 74 65 6d 70 46 | ents).!==.false.&&.rename($tempF |
17c60 | 69 6c 65 4e 61 6d 65 2c 20 24 74 68 69 73 2d 3e 72 6f 6f 74 20 2e 20 24 66 69 6c 65 29 3b 0a 7d | ileName,.$this->root...$file);.} |
17c80 | 20 63 61 74 63 68 20 28 5c 45 72 72 6f 72 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 24 74 | .catch.(\ErrorException.$e).{.$t |
17ca0 | 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 77 61 72 6e 69 6e 67 3e 46 61 | his->io->writeError('<warning>Fa |
17cc0 | 69 6c 65 64 20 74 6f 20 77 72 69 74 65 20 69 6e 74 6f 20 63 61 63 68 65 3a 20 27 2e 24 65 2d 3e | iled.to.write.into.cache:.'.$e-> |
17ce0 | 67 65 74 4d 65 73 73 61 67 65 28 29 2e 27 3c 2f 77 61 72 6e 69 6e 67 3e 27 2c 20 74 72 75 65 2c | getMessage().'</warning>',.true, |
17d00 | 20 49 4f 49 6e 74 65 72 66 61 63 65 3a 3a 44 45 42 55 47 29 3b 0a 69 66 20 28 50 72 65 67 3a 3a | .IOInterface::DEBUG);.if.(Preg:: |
17d20 | 69 73 4d 61 74 63 68 28 27 7b 5e 66 69 6c 65 5f 70 75 74 5f 63 6f 6e 74 65 6e 74 73 5c 28 5c 29 | isMatch('{^file_put_contents\(\) |
17d40 | 3a 20 4f 6e 6c 79 20 28 5b 30 2d 39 5d 2b 29 20 6f 66 20 28 5b 30 2d 39 5d 2b 29 20 62 79 74 65 | :.Only.([0-9]+).of.([0-9]+).byte |
17d60 | 73 20 77 72 69 74 74 65 6e 7d 27 2c 20 24 65 2d 3e 67 65 74 4d 65 73 73 61 67 65 28 29 2c 20 24 | s.written}',.$e->getMessage(),.$ |
17d80 | 6d 29 29 20 7b 0a 0a 75 6e 6c 69 6e 6b 28 24 74 65 6d 70 46 69 6c 65 4e 61 6d 65 29 3b 0a 0a 24 | m)).{..unlink($tempFileName);..$ |
17da0 | 6d 65 73 73 61 67 65 20 3d 20 73 70 72 69 6e 74 66 28 0a 27 3c 77 61 72 6e 69 6e 67 3e 57 72 69 | message.=.sprintf(.'<warning>Wri |
17dc0 | 74 69 6e 67 20 25 31 24 73 20 69 6e 74 6f 20 63 61 63 68 65 20 66 61 69 6c 65 64 20 61 66 74 65 | ting.%1$s.into.cache.failed.afte |
17de0 | 72 20 25 32 24 75 20 6f 66 20 25 33 24 75 20 62 79 74 65 73 20 77 72 69 74 74 65 6e 2c 20 6f 6e | r.%2$u.of.%3$u.bytes.written,.on |
17e00 | 6c 79 20 25 34 24 73 20 62 79 74 65 73 20 6f 66 20 66 72 65 65 20 73 70 61 63 65 20 61 76 61 69 | ly.%4$s.bytes.of.free.space.avai |
17e20 | 6c 61 62 6c 65 3c 2f 77 61 72 6e 69 6e 67 3e 27 2c 0a 24 74 65 6d 70 46 69 6c 65 4e 61 6d 65 2c | lable</warning>',.$tempFileName, |
17e40 | 0a 24 6d 5b 31 5d 2c 0a 24 6d 5b 32 5d 2c 0a 66 75 6e 63 74 69 6f 6e 5f 65 78 69 73 74 73 28 27 | .$m[1],.$m[2],.function_exists(' |
17e60 | 64 69 73 6b 5f 66 72 65 65 5f 73 70 61 63 65 27 29 20 3f 20 40 64 69 73 6b 5f 66 72 65 65 5f 73 | disk_free_space').?.@disk_free_s |
17e80 | 70 61 63 65 28 64 69 72 6e 61 6d 65 28 24 74 65 6d 70 46 69 6c 65 4e 61 6d 65 29 29 20 3a 20 27 | pace(dirname($tempFileName)).:.' |
17ea0 | 75 6e 6b 6e 6f 77 6e 27 0a 29 3b 0a 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 | unknown'.);..$this->io->writeErr |
17ec0 | 6f 72 28 24 6d 65 73 73 61 67 65 29 3b 0a 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a | or($message);..return.false;.}.. |
17ee0 | 74 68 72 6f 77 20 24 65 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a | throw.$e;.}.}..return.false;.}.. |
17f00 | 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 63 6f 70 79 46 72 6f 6d 28 73 | ......public.function.copyFrom(s |
17f20 | 74 72 69 6e 67 20 24 66 69 6c 65 2c 20 73 74 72 69 6e 67 20 24 73 6f 75 72 63 65 29 0a 7b 0a 69 | tring.$file,.string.$source).{.i |
17f40 | 66 20 28 24 74 68 69 73 2d 3e 69 73 45 6e 61 62 6c 65 64 28 29 20 26 26 20 21 24 74 68 69 73 2d | f.($this->isEnabled().&&.!$this- |
17f60 | 3e 72 65 61 64 4f 6e 6c 79 29 20 7b 0a 24 66 69 6c 65 20 3d 20 50 72 65 67 3a 3a 72 65 70 6c 61 | >readOnly).{.$file.=.Preg::repla |
17f80 | 63 65 28 27 7b 5b 5e 27 2e 24 74 68 69 73 2d 3e 61 6c 6c 6f 77 6c 69 73 74 2e 27 5d 7d 69 27 2c | ce('{[^'.$this->allowlist.']}i', |
17fa0 | 20 27 2d 27 2c 20 24 66 69 6c 65 29 3b 0a 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 73 74 65 6d 2d | .'-',.$file);.$this->filesystem- |
17fc0 | 3e 65 6e 73 75 72 65 44 69 72 65 63 74 6f 72 79 45 78 69 73 74 73 28 64 69 72 6e 61 6d 65 28 24 | >ensureDirectoryExists(dirname($ |
17fe0 | 74 68 69 73 2d 3e 72 6f 6f 74 20 2e 20 24 66 69 6c 65 29 29 3b 0a 0a 69 66 20 28 21 66 69 6c 65 | this->root...$file));..if.(!file |
18000 | 5f 65 78 69 73 74 73 28 24 73 6f 75 72 63 65 29 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 | _exists($source)).{.$this->io->w |
18020 | 72 69 74 65 45 72 72 6f 72 28 27 3c 65 72 72 6f 72 3e 27 2e 24 73 6f 75 72 63 65 2e 27 20 64 6f | riteError('<error>'.$source.'.do |
18040 | 65 73 20 6e 6f 74 20 65 78 69 73 74 2c 20 63 61 6e 20 6e 6f 74 20 77 72 69 74 65 20 69 6e 74 6f | es.not.exist,.can.not.write.into |
18060 | 20 63 61 63 68 65 3c 2f 65 72 72 6f 72 3e 27 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 74 68 69 | .cache</error>');.}.elseif.($thi |
18080 | 73 2d 3e 69 6f 2d 3e 69 73 44 65 62 75 67 28 29 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 | s->io->isDebug()).{.$this->io->w |
180a0 | 72 69 74 65 45 72 72 6f 72 28 27 57 72 69 74 69 6e 67 20 27 2e 24 74 68 69 73 2d 3e 72 6f 6f 74 | riteError('Writing.'.$this->root |
180c0 | 20 2e 20 24 66 69 6c 65 2e 27 20 69 6e 74 6f 20 63 61 63 68 65 20 66 72 6f 6d 20 27 2e 24 73 6f | ...$file.'.into.cache.from.'.$so |
180e0 | 75 72 63 65 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 63 6f 70 79 28 24 73 6f 75 72 63 65 2c 20 24 | urce);.}..return.copy($source,.$ |
18100 | 74 68 69 73 2d 3e 72 6f 6f 74 20 2e 20 24 66 69 6c 65 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 66 | this->root...$file);.}..return.f |
18120 | 61 6c 73 65 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 63 | alse;.}........public.function.c |
18140 | 6f 70 79 54 6f 28 73 74 72 69 6e 67 20 24 66 69 6c 65 2c 20 73 74 72 69 6e 67 20 24 74 61 72 67 | opyTo(string.$file,.string.$targ |
18160 | 65 74 29 0a 7b 0a 69 66 20 28 24 74 68 69 73 2d 3e 69 73 45 6e 61 62 6c 65 64 28 29 29 20 7b 0a | et).{.if.($this->isEnabled()).{. |
18180 | 24 66 69 6c 65 20 3d 20 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 28 27 7b 5b 5e 27 2e 24 74 68 69 | $file.=.Preg::replace('{[^'.$thi |
181a0 | 73 2d 3e 61 6c 6c 6f 77 6c 69 73 74 2e 27 5d 7d 69 27 2c 20 27 2d 27 2c 20 24 66 69 6c 65 29 3b | s->allowlist.']}i',.'-',.$file); |
181c0 | 0a 69 66 20 28 66 69 6c 65 5f 65 78 69 73 74 73 28 24 74 68 69 73 2d 3e 72 6f 6f 74 20 2e 20 24 | .if.(file_exists($this->root...$ |
181e0 | 66 69 6c 65 29 29 20 7b 0a 74 72 79 20 7b 0a 74 6f 75 63 68 28 24 74 68 69 73 2d 3e 72 6f 6f 74 | file)).{.try.{.touch($this->root |
18200 | 20 2e 20 24 66 69 6c 65 2c 20 28 69 6e 74 29 20 66 69 6c 65 6d 74 69 6d 65 28 24 74 68 69 73 2d | ...$file,.(int).filemtime($this- |
18220 | 3e 72 6f 6f 74 20 2e 20 24 66 69 6c 65 29 2c 20 74 69 6d 65 28 29 29 3b 0a 7d 20 63 61 74 63 68 | >root...$file),.time());.}.catch |
18240 | 20 28 5c 45 72 72 6f 72 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 0a 0a 53 69 6c 65 6e 63 | .(\ErrorException.$e).{...Silenc |
18260 | 65 72 3a 3a 63 61 6c 6c 28 27 74 6f 75 63 68 27 2c 20 24 74 68 69 73 2d 3e 72 6f 6f 74 20 2e 20 | er::call('touch',.$this->root... |
18280 | 24 66 69 6c 65 29 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 | $file);.}..$this->io->writeError |
182a0 | 28 27 52 65 61 64 69 6e 67 20 27 2e 24 74 68 69 73 2d 3e 72 6f 6f 74 20 2e 20 24 66 69 6c 65 2e | ('Reading.'.$this->root...$file. |
182c0 | 27 20 66 72 6f 6d 20 63 61 63 68 65 27 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 | '.from.cache',.true,.IOInterface |
182e0 | 3a 3a 44 45 42 55 47 29 3b 0a 0a 72 65 74 75 72 6e 20 63 6f 70 79 28 24 74 68 69 73 2d 3e 72 6f | ::DEBUG);..return.copy($this->ro |
18300 | 6f 74 20 2e 20 24 66 69 6c 65 2c 20 24 74 61 72 67 65 74 29 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 | ot...$file,.$target);.}.}..retur |
18320 | 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 | n.false;.}.....public.function.g |
18340 | 63 49 73 4e 65 63 65 73 73 61 72 79 28 29 0a 7b 0a 69 66 20 28 73 65 6c 66 3a 3a 24 63 61 63 68 | cIsNecessary().{.if.(self::$cach |
18360 | 65 43 6f 6c 6c 65 63 74 65 64 29 20 7b 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 73 | eCollected).{.return.false;.}..s |
18380 | 65 6c 66 3a 3a 24 63 61 63 68 65 43 6f 6c 6c 65 63 74 65 64 20 3d 20 74 72 75 65 3b 0a 69 66 20 | elf::$cacheCollected.=.true;.if. |
183a0 | 28 50 6c 61 74 66 6f 72 6d 3a 3a 67 65 74 45 6e 76 28 27 43 4f 4d 50 4f 53 45 52 5f 54 45 53 54 | (Platform::getEnv('COMPOSER_TEST |
183c0 | 5f 53 55 49 54 45 27 29 29 20 7b 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 69 66 20 | _SUITE')).{.return.false;.}..if. |
183e0 | 28 50 6c 61 74 66 6f 72 6d 3a 3a 69 73 49 6e 70 75 74 43 6f 6d 70 6c 65 74 69 6f 6e 50 72 6f 63 | (Platform::isInputCompletionProc |
18400 | 65 73 73 28 29 29 20 7b 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 72 65 74 75 72 6e | ess()).{.return.false;.}..return |
18420 | 20 21 72 61 6e 64 6f 6d 5f 69 6e 74 28 30 2c 20 35 30 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 | .!random_int(0,.50);.}.....publi |
18440 | 63 20 66 75 6e 63 74 69 6f 6e 20 72 65 6d 6f 76 65 28 73 74 72 69 6e 67 20 24 66 69 6c 65 29 0a | c.function.remove(string.$file). |
18460 | 7b 0a 69 66 20 28 24 74 68 69 73 2d 3e 69 73 45 6e 61 62 6c 65 64 28 29 20 26 26 20 21 24 74 68 | {.if.($this->isEnabled().&&.!$th |
18480 | 69 73 2d 3e 72 65 61 64 4f 6e 6c 79 29 20 7b 0a 24 66 69 6c 65 20 3d 20 50 72 65 67 3a 3a 72 65 | is->readOnly).{.$file.=.Preg::re |
184a0 | 70 6c 61 63 65 28 27 7b 5b 5e 27 2e 24 74 68 69 73 2d 3e 61 6c 6c 6f 77 6c 69 73 74 2e 27 5d 7d | place('{[^'.$this->allowlist.']} |
184c0 | 69 27 2c 20 27 2d 27 2c 20 24 66 69 6c 65 29 3b 0a 69 66 20 28 66 69 6c 65 5f 65 78 69 73 74 73 | i',.'-',.$file);.if.(file_exists |
184e0 | 28 24 74 68 69 73 2d 3e 72 6f 6f 74 20 2e 20 24 66 69 6c 65 29 29 20 7b 0a 72 65 74 75 72 6e 20 | ($this->root...$file)).{.return. |
18500 | 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 73 74 65 6d 2d 3e 75 6e 6c 69 6e 6b 28 24 74 68 69 73 2d | $this->filesystem->unlink($this- |
18520 | 3e 72 6f 6f 74 20 2e 20 24 66 69 6c 65 29 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 66 61 6c 73 | >root...$file);.}.}..return.fals |
18540 | 65 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 63 6c 65 61 72 28 29 | e;.}.....public.function.clear() |
18560 | 0a 7b 0a 69 66 20 28 24 74 68 69 73 2d 3e 69 73 45 6e 61 62 6c 65 64 28 29 20 26 26 20 21 24 74 | .{.if.($this->isEnabled().&&.!$t |
18580 | 68 69 73 2d 3e 72 65 61 64 4f 6e 6c 79 29 20 7b 0a 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 73 74 | his->readOnly).{.$this->filesyst |
185a0 | 65 6d 2d 3e 65 6d 70 74 79 44 69 72 65 63 74 6f 72 79 28 24 74 68 69 73 2d 3e 72 6f 6f 74 29 3b | em->emptyDirectory($this->root); |
185c0 | 0a 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a | ..return.true;.}..return.false;. |
185e0 | 7d 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 41 67 65 28 73 74 | }......public.function.getAge(st |
18600 | 72 69 6e 67 20 24 66 69 6c 65 29 0a 7b 0a 69 66 20 28 24 74 68 69 73 2d 3e 69 73 45 6e 61 62 6c | ring.$file).{.if.($this->isEnabl |
18620 | 65 64 28 29 29 20 7b 0a 24 66 69 6c 65 20 3d 20 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 28 27 7b | ed()).{.$file.=.Preg::replace('{ |
18640 | 5b 5e 27 2e 24 74 68 69 73 2d 3e 61 6c 6c 6f 77 6c 69 73 74 2e 27 5d 7d 69 27 2c 20 27 2d 27 2c | [^'.$this->allowlist.']}i',.'-', |
18660 | 20 24 66 69 6c 65 29 3b 0a 69 66 20 28 66 69 6c 65 5f 65 78 69 73 74 73 28 24 74 68 69 73 2d 3e | .$file);.if.(file_exists($this-> |
18680 | 72 6f 6f 74 20 2e 20 24 66 69 6c 65 29 20 26 26 20 28 24 6d 74 69 6d 65 20 3d 20 66 69 6c 65 6d | root...$file).&&.($mtime.=.filem |
186a0 | 74 69 6d 65 28 24 74 68 69 73 2d 3e 72 6f 6f 74 20 2e 20 24 66 69 6c 65 29 29 20 21 3d 3d 20 66 | time($this->root...$file)).!==.f |
186c0 | 61 6c 73 65 29 20 7b 0a 72 65 74 75 72 6e 20 61 62 73 28 74 69 6d 65 28 29 20 2d 20 24 6d 74 69 | alse).{.return.abs(time().-.$mti |
186e0 | 6d 65 29 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 0a 0a 0a 70 75 | me);.}.}..return.false;.}.....pu |
18700 | 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 63 28 69 6e 74 20 24 74 74 6c 2c 20 69 6e 74 20 24 | blic.function.gc(int.$ttl,.int.$ |
18720 | 6d 61 78 53 69 7a 65 29 0a 7b 0a 69 66 20 28 24 74 68 69 73 2d 3e 69 73 45 6e 61 62 6c 65 64 28 | maxSize).{.if.($this->isEnabled( |
18740 | 29 20 26 26 20 21 24 74 68 69 73 2d 3e 72 65 61 64 4f 6e 6c 79 29 20 7b 0a 24 65 78 70 69 72 65 | ).&&.!$this->readOnly).{.$expire |
18760 | 20 3d 20 6e 65 77 20 5c 44 61 74 65 54 69 6d 65 28 29 3b 0a 24 65 78 70 69 72 65 2d 3e 6d 6f 64 | .=.new.\DateTime();.$expire->mod |
18780 | 69 66 79 28 27 2d 27 2e 24 74 74 6c 2e 27 20 73 65 63 6f 6e 64 73 27 29 3b 0a 0a 24 66 69 6e 64 | ify('-'.$ttl.'.seconds');..$find |
187a0 | 65 72 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 46 69 6e 64 65 72 28 29 2d 3e 64 61 74 65 28 27 75 | er.=.$this->getFinder()->date('u |
187c0 | 6e 74 69 6c 20 27 2e 24 65 78 70 69 72 65 2d 3e 66 6f 72 6d 61 74 28 27 59 2d 6d 2d 64 20 48 3a | ntil.'.$expire->format('Y-m-d.H: |
187e0 | 69 3a 73 27 29 29 3b 0a 66 6f 72 65 61 63 68 20 28 24 66 69 6e 64 65 72 20 61 73 20 24 66 69 6c | i:s'));.foreach.($finder.as.$fil |
18800 | 65 29 20 7b 0a 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 73 74 65 6d 2d 3e 75 6e 6c 69 6e 6b 28 24 | e).{.$this->filesystem->unlink($ |
18820 | 66 69 6c 65 2d 3e 67 65 74 50 61 74 68 6e 61 6d 65 28 29 29 3b 0a 7d 0a 0a 24 74 6f 74 61 6c 53 | file->getPathname());.}..$totalS |
18840 | 69 7a 65 20 3d 20 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 73 74 65 6d 2d 3e 73 69 7a 65 28 24 74 | ize.=.$this->filesystem->size($t |
18860 | 68 69 73 2d 3e 72 6f 6f 74 29 3b 0a 69 66 20 28 24 74 6f 74 61 6c 53 69 7a 65 20 3e 20 24 6d 61 | his->root);.if.($totalSize.>.$ma |
18880 | 78 53 69 7a 65 29 20 7b 0a 24 69 74 65 72 61 74 6f 72 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 46 | xSize).{.$iterator.=.$this->getF |
188a0 | 69 6e 64 65 72 28 29 2d 3e 73 6f 72 74 42 79 41 63 63 65 73 73 65 64 54 69 6d 65 28 29 2d 3e 67 | inder()->sortByAccessedTime()->g |
188c0 | 65 74 49 74 65 72 61 74 6f 72 28 29 3b 0a 77 68 69 6c 65 20 28 24 74 6f 74 61 6c 53 69 7a 65 20 | etIterator();.while.($totalSize. |
188e0 | 3e 20 24 6d 61 78 53 69 7a 65 20 26 26 20 24 69 74 65 72 61 74 6f 72 2d 3e 76 61 6c 69 64 28 29 | >.$maxSize.&&.$iterator->valid() |
18900 | 29 20 7b 0a 24 66 69 6c 65 70 61 74 68 20 3d 20 24 69 74 65 72 61 74 6f 72 2d 3e 63 75 72 72 65 | ).{.$filepath.=.$iterator->curre |
18920 | 6e 74 28 29 2d 3e 67 65 74 50 61 74 68 6e 61 6d 65 28 29 3b 0a 24 74 6f 74 61 6c 53 69 7a 65 20 | nt()->getPathname();.$totalSize. |
18940 | 2d 3d 20 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 73 74 65 6d 2d 3e 73 69 7a 65 28 24 66 69 6c 65 | -=.$this->filesystem->size($file |
18960 | 70 61 74 68 29 3b 0a 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 73 74 65 6d 2d 3e 75 6e 6c 69 6e 6b | path);.$this->filesystem->unlink |
18980 | 28 24 66 69 6c 65 70 61 74 68 29 3b 0a 24 69 74 65 72 61 74 6f 72 2d 3e 6e 65 78 74 28 29 3b 0a | ($filepath);.$iterator->next();. |
189a0 | 7d 0a 7d 0a 0a 73 65 6c 66 3a 3a 24 63 61 63 68 65 43 6f 6c 6c 65 63 74 65 64 20 3d 20 74 72 75 | }.}..self::$cacheCollected.=.tru |
189c0 | 65 3b 0a 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 | e;..return.true;.}..return.false |
189e0 | 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 63 56 63 73 43 61 63 68 65 28 | ;.}..public.function.gcVcsCache( |
18a00 | 69 6e 74 20 24 74 74 6c 29 3a 20 62 6f 6f 6c 0a 7b 0a 69 66 20 28 24 74 68 69 73 2d 3e 69 73 45 | int.$ttl):.bool.{.if.($this->isE |
18a20 | 6e 61 62 6c 65 64 28 29 29 20 7b 0a 24 65 78 70 69 72 65 20 3d 20 6e 65 77 20 5c 44 61 74 65 54 | nabled()).{.$expire.=.new.\DateT |
18a40 | 69 6d 65 28 29 3b 0a 24 65 78 70 69 72 65 2d 3e 6d 6f 64 69 66 79 28 27 2d 27 2e 24 74 74 6c 2e | ime();.$expire->modify('-'.$ttl. |
18a60 | 27 20 73 65 63 6f 6e 64 73 27 29 3b 0a 0a 24 66 69 6e 64 65 72 20 3d 20 46 69 6e 64 65 72 3a 3a | '.seconds');..$finder.=.Finder:: |
18a80 | 63 72 65 61 74 65 28 29 2d 3e 69 6e 28 24 74 68 69 73 2d 3e 72 6f 6f 74 29 2d 3e 64 69 72 65 63 | create()->in($this->root)->direc |
18aa0 | 74 6f 72 69 65 73 28 29 2d 3e 64 65 70 74 68 28 30 29 2d 3e 64 61 74 65 28 27 75 6e 74 69 6c 20 | tories()->depth(0)->date('until. |
18ac0 | 27 2e 24 65 78 70 69 72 65 2d 3e 66 6f 72 6d 61 74 28 27 59 2d 6d 2d 64 20 48 3a 69 3a 73 27 29 | '.$expire->format('Y-m-d.H:i:s') |
18ae0 | 29 3b 0a 66 6f 72 65 61 63 68 20 28 24 66 69 6e 64 65 72 20 61 73 20 24 66 69 6c 65 29 20 7b 0a | );.foreach.($finder.as.$file).{. |
18b00 | 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 73 74 65 6d 2d 3e 72 65 6d 6f 76 65 44 69 72 65 63 74 6f | $this->filesystem->removeDirecto |
18b20 | 72 79 28 24 66 69 6c 65 2d 3e 67 65 74 50 61 74 68 6e 61 6d 65 28 29 29 3b 0a 7d 0a 0a 73 65 6c | ry($file->getPathname());.}..sel |
18b40 | 66 3a 3a 24 63 61 63 68 65 43 6f 6c 6c 65 63 74 65 64 20 3d 20 74 72 75 65 3b 0a 0a 72 65 74 75 | f::$cacheCollected.=.true;..retu |
18b60 | 72 6e 20 74 72 75 65 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 0a 0a 0a | rn.true;.}..return.false;.}..... |
18b80 | 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 68 61 31 28 73 74 72 69 6e 67 20 24 66 69 6c | public.function.sha1(string.$fil |
18ba0 | 65 29 0a 7b 0a 69 66 20 28 24 74 68 69 73 2d 3e 69 73 45 6e 61 62 6c 65 64 28 29 29 20 7b 0a 24 | e).{.if.($this->isEnabled()).{.$ |
18bc0 | 66 69 6c 65 20 3d 20 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 28 27 7b 5b 5e 27 2e 24 74 68 69 73 | file.=.Preg::replace('{[^'.$this |
18be0 | 2d 3e 61 6c 6c 6f 77 6c 69 73 74 2e 27 5d 7d 69 27 2c 20 27 2d 27 2c 20 24 66 69 6c 65 29 3b 0a | ->allowlist.']}i',.'-',.$file);. |
18c00 | 69 66 20 28 66 69 6c 65 5f 65 78 69 73 74 73 28 24 74 68 69 73 2d 3e 72 6f 6f 74 20 2e 20 24 66 | if.(file_exists($this->root...$f |
18c20 | 69 6c 65 29 29 20 7b 0a 72 65 74 75 72 6e 20 73 68 61 31 5f 66 69 6c 65 28 24 74 68 69 73 2d 3e | ile)).{.return.sha1_file($this-> |
18c40 | 72 6f 6f 74 20 2e 20 24 66 69 6c 65 29 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 | root...$file);.}.}..return.false |
18c60 | 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 68 61 32 35 36 28 73 | ;.}.....public.function.sha256(s |
18c80 | 74 72 69 6e 67 20 24 66 69 6c 65 29 0a 7b 0a 69 66 20 28 24 74 68 69 73 2d 3e 69 73 45 6e 61 62 | tring.$file).{.if.($this->isEnab |
18ca0 | 6c 65 64 28 29 29 20 7b 0a 24 66 69 6c 65 20 3d 20 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 28 27 | led()).{.$file.=.Preg::replace(' |
18cc0 | 7b 5b 5e 27 2e 24 74 68 69 73 2d 3e 61 6c 6c 6f 77 6c 69 73 74 2e 27 5d 7d 69 27 2c 20 27 2d 27 | {[^'.$this->allowlist.']}i',.'-' |
18ce0 | 2c 20 24 66 69 6c 65 29 3b 0a 69 66 20 28 66 69 6c 65 5f 65 78 69 73 74 73 28 24 74 68 69 73 2d | ,.$file);.if.(file_exists($this- |
18d00 | 3e 72 6f 6f 74 20 2e 20 24 66 69 6c 65 29 29 20 7b 0a 72 65 74 75 72 6e 20 68 61 73 68 5f 66 69 | >root...$file)).{.return.hash_fi |
18d20 | 6c 65 28 27 73 68 61 32 35 36 27 2c 20 24 74 68 69 73 2d 3e 72 6f 6f 74 20 2e 20 24 66 69 6c 65 | le('sha256',.$this->root...$file |
18d40 | 29 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 | );.}.}..return.false;.}.....prot |
18d60 | 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 46 69 6e 64 65 72 28 29 0a 7b 0a 72 65 74 | ected.function.getFinder().{.ret |
18d80 | 75 72 6e 20 46 69 6e 64 65 72 3a 3a 63 72 65 61 74 65 28 29 2d 3e 69 6e 28 24 74 68 69 73 2d 3e | urn.Finder::create()->in($this-> |
18da0 | 72 6f 6f 74 29 2d 3e 66 69 6c 65 73 28 29 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 | root)->files();.}.}.<?php.declar |
18dc0 | 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 | e(strict_types=1);............na |
18de0 | 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6d 6d 61 6e 64 3b 0a 0a 75 73 65 20 43 | mespace.Composer\Command;..use.C |
18e00 | 6f 6d 70 6f 73 65 72 5c 43 6f 6d 70 6f 73 65 72 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f | omposer\Composer;.use.Symfony\Co |
18e20 | 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 49 6e 74 65 72 | mponent\Console\Input\InputInter |
18e40 | 66 61 63 65 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 | face;.use.Symfony\Component\Cons |
18e60 | 6f 6c 65 5c 4f 75 74 70 75 74 5c 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 0a 0a 0a 0a | ole\Output\OutputInterface;..... |
18e80 | 63 6c 61 73 73 20 41 62 6f 75 74 43 6f 6d 6d 61 6e 64 20 65 78 74 65 6e 64 73 20 42 61 73 65 43 | class.AboutCommand.extends.BaseC |
18ea0 | 6f 6d 6d 61 6e 64 0a 7b 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 63 6f 6e 66 | ommand.{.protected.function.conf |
18ec0 | 69 67 75 72 65 28 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 0a 2d 3e 73 65 74 4e 61 6d 65 28 | igure():.void.{.$this.->setName( |
18ee0 | 27 61 62 6f 75 74 27 29 0a 2d 3e 73 65 74 44 65 73 63 72 69 70 74 69 6f 6e 28 27 53 68 6f 77 73 | 'about').->setDescription('Shows |
18f00 | 20 61 20 73 68 6f 72 74 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 61 62 6f 75 74 20 43 6f 6d 70 6f | .a.short.information.about.Compo |
18f20 | 73 65 72 27 29 0a 2d 3e 73 65 74 48 65 6c 70 28 0a 3c 3c 3c 45 4f 54 0a 3c 69 6e 66 6f 3e 70 68 | ser').->setHelp(.<<<EOT.<info>ph |
18f40 | 70 20 63 6f 6d 70 6f 73 65 72 2e 70 68 61 72 20 61 62 6f 75 74 3c 2f 69 6e 66 6f 3e 0a 45 4f 54 | p.composer.phar.about</info>.EOT |
18f60 | 0a 29 0a 3b 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 65 78 65 63 75 | .).;.}..protected.function.execu |
18f80 | 74 65 28 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 69 6e 70 75 74 2c 20 4f 75 74 70 75 74 | te(InputInterface.$input,.Output |
18fa0 | 49 6e 74 65 72 66 61 63 65 20 24 6f 75 74 70 75 74 29 3a 20 69 6e 74 0a 7b 0a 24 63 6f 6d 70 6f | Interface.$output):.int.{.$compo |
18fc0 | 73 65 72 56 65 72 73 69 6f 6e 20 3d 20 43 6f 6d 70 6f 73 65 72 3a 3a 67 65 74 56 65 72 73 69 6f | serVersion.=.Composer::getVersio |
18fe0 | 6e 28 29 3b 0a 0a 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 2d 3e 77 72 69 74 65 28 0a 3c 3c 3c | n();..$this->getIO()->write(.<<< |
19000 | 45 4f 54 0a 3c 69 6e 66 6f 3e 43 6f 6d 70 6f 73 65 72 20 2d 20 44 65 70 65 6e 64 65 6e 63 79 20 | EOT.<info>Composer.-.Dependency. |
19020 | 4d 61 6e 61 67 65 72 20 66 6f 72 20 50 48 50 20 2d 20 76 65 72 73 69 6f 6e 20 24 63 6f 6d 70 6f | Manager.for.PHP.-.version.$compo |
19040 | 73 65 72 56 65 72 73 69 6f 6e 3c 2f 69 6e 66 6f 3e 0a 3c 63 6f 6d 6d 65 6e 74 3e 43 6f 6d 70 6f | serVersion</info>.<comment>Compo |
19060 | 73 65 72 20 69 73 20 61 20 64 65 70 65 6e 64 65 6e 63 79 20 6d 61 6e 61 67 65 72 20 74 72 61 63 | ser.is.a.dependency.manager.trac |
19080 | 6b 69 6e 67 20 6c 6f 63 61 6c 20 64 65 70 65 6e 64 65 6e 63 69 65 73 20 6f 66 20 79 6f 75 72 20 | king.local.dependencies.of.your. |
190a0 | 70 72 6f 6a 65 63 74 73 20 61 6e 64 20 6c 69 62 72 61 72 69 65 73 2e 0a 53 65 65 20 68 74 74 70 | projects.and.libraries..See.http |
190c0 | 73 3a 2f 2f 67 65 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 67 2f 20 66 6f 72 20 6d 6f 72 65 20 69 6e | s://getcomposer.org/.for.more.in |
190e0 | 66 6f 72 6d 61 74 69 6f 6e 2e 3c 2f 63 6f 6d 6d 65 6e 74 3e 0a 45 4f 54 0a 29 3b 0a 0a 72 65 74 | formation.</comment>.EOT.);..ret |
19100 | 75 72 6e 20 30 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f | urn.0;.}.}.<?php.declare(strict_ |
19120 | 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 | types=1);............namespace.C |
19140 | 6f 6d 70 6f 73 65 72 5c 43 6f 6d 6d 61 6e 64 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 46 | omposer\Command;..use.Composer\F |
19160 | 61 63 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 4f 5c 49 4f 49 6e 74 65 72 66 | actory;.use.Composer\IO\IOInterf |
19180 | 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 66 69 67 3b 0a 75 73 65 20 43 6f | ace;.use.Composer\Config;.use.Co |
191a0 | 6d 70 6f 73 65 72 5c 43 6f 6d 70 6f 73 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 | mposer\Composer;.use.Composer\Pa |
191c0 | 63 6b 61 67 65 5c 42 61 73 65 50 61 63 6b 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c | ckage\BasePackage;.use.Composer\ |
191e0 | 50 61 63 6b 61 67 65 5c 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 | Package\CompletePackageInterface |
19200 | 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 43 6f 6d 70 6f 73 | ;.use.Composer\Repository\Compos |
19220 | 69 74 65 52 65 70 6f 73 69 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f | iteRepository;.use.Composer\Repo |
19240 | 73 69 74 6f 72 79 5c 52 65 70 6f 73 69 74 6f 72 79 46 61 63 74 6f 72 79 3b 0a 75 73 65 20 43 6f | sitory\RepositoryFactory;.use.Co |
19260 | 6d 70 6f 73 65 72 5c 53 63 72 69 70 74 5c 53 63 72 69 70 74 45 76 65 6e 74 73 3b 0a 75 73 65 20 | mposer\Script\ScriptEvents;.use. |
19280 | 43 6f 6d 70 6f 73 65 72 5c 50 6c 75 67 69 6e 5c 43 6f 6d 6d 61 6e 64 45 76 65 6e 74 3b 0a 75 73 | Composer\Plugin\CommandEvent;.us |
192a0 | 65 20 43 6f 6d 70 6f 73 65 72 5c 50 6c 75 67 69 6e 5c 50 6c 75 67 69 6e 45 76 65 6e 74 73 3b 0a | e.Composer\Plugin\PluginEvents;. |
192c0 | 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 46 69 6c 65 73 79 73 74 65 6d 3b 0a 75 73 | use.Composer\Util\Filesystem;.us |
192e0 | 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 4c 6f 6f 70 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 | e.Composer\Util\Loop;.use.Compos |
19300 | 65 72 5c 55 74 69 6c 5c 50 6c 61 74 66 6f 72 6d 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 | er\Util\Platform;.use.Composer\U |
19320 | 74 69 6c 5c 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 | til\ProcessExecutor;.use.Compose |
19340 | 72 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 3b 0a 75 | r\Console\Input\InputArgument;.u |
19360 | 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 | se.Symfony\Component\Console\Inp |
19380 | 75 74 5c 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c | ut\InputInterface;.use.Composer\ |
193a0 | 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 4f 70 74 69 6f 6e 3b 0a 75 73 65 20 53 | Console\Input\InputOption;.use.S |
193c0 | 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 4f 75 74 70 75 74 5c | ymfony\Component\Console\Output\ |
193e0 | 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 41 72 63 | OutputInterface;.......class.Arc |
19400 | 68 69 76 65 43 6f 6d 6d 61 6e 64 20 65 78 74 65 6e 64 73 20 42 61 73 65 43 6f 6d 6d 61 6e 64 0a | hiveCommand.extends.BaseCommand. |
19420 | 7b 0a 75 73 65 20 43 6f 6d 70 6c 65 74 69 6f 6e 54 72 61 69 74 3b 0a 0a 70 72 69 76 61 74 65 20 | {.use.CompletionTrait;..private. |
19440 | 63 6f 6e 73 74 20 46 4f 52 4d 41 54 53 20 3d 20 5b 27 74 61 72 27 2c 20 27 74 61 72 2e 67 7a 27 | const.FORMATS.=.['tar',.'tar.gz' |
19460 | 2c 20 27 74 61 72 2e 62 7a 32 27 2c 20 27 7a 69 70 27 5d 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 | ,.'tar.bz2',.'zip'];..protected. |
19480 | 66 75 6e 63 74 69 6f 6e 20 63 6f 6e 66 69 67 75 72 65 28 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 | function.configure():.void.{.$th |
194a0 | 69 73 0a 2d 3e 73 65 74 4e 61 6d 65 28 27 61 72 63 68 69 76 65 27 29 0a 2d 3e 73 65 74 44 65 73 | is.->setName('archive').->setDes |
194c0 | 63 72 69 70 74 69 6f 6e 28 27 43 72 65 61 74 65 73 20 61 6e 20 61 72 63 68 69 76 65 20 6f 66 20 | cription('Creates.an.archive.of. |
194e0 | 74 68 69 73 20 63 6f 6d 70 6f 73 65 72 20 70 61 63 6b 61 67 65 27 29 0a 2d 3e 73 65 74 44 65 66 | this.composer.package').->setDef |
19500 | 69 6e 69 74 69 6f 6e 28 5b 0a 6e 65 77 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 28 27 70 61 63 | inition([.new.InputArgument('pac |
19520 | 6b 61 67 65 27 2c 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 3a 3a 4f 50 54 49 4f 4e 41 4c 2c 20 | kage',.InputArgument::OPTIONAL,. |
19540 | 27 54 68 65 20 70 61 63 6b 61 67 65 20 74 6f 20 61 72 63 68 69 76 65 20 69 6e 73 74 65 61 64 20 | 'The.package.to.archive.instead. |
19560 | 6f 66 20 74 68 65 20 63 75 72 72 65 6e 74 20 70 72 6f 6a 65 63 74 27 2c 20 6e 75 6c 6c 2c 20 24 | of.the.current.project',.null,.$ |
19580 | 74 68 69 73 2d 3e 73 75 67 67 65 73 74 41 76 61 69 6c 61 62 6c 65 50 61 63 6b 61 67 65 28 29 29 | this->suggestAvailablePackage()) |
195a0 | 2c 0a 6e 65 77 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 28 27 76 65 72 73 69 6f 6e 27 2c 20 49 | ,.new.InputArgument('version',.I |
195c0 | 6e 70 75 74 41 72 67 75 6d 65 6e 74 3a 3a 4f 50 54 49 4f 4e 41 4c 2c 20 27 41 20 76 65 72 73 69 | nputArgument::OPTIONAL,.'A.versi |
195e0 | 6f 6e 20 63 6f 6e 73 74 72 61 69 6e 74 20 74 6f 20 66 69 6e 64 20 74 68 65 20 70 61 63 6b 61 67 | on.constraint.to.find.the.packag |
19600 | 65 20 74 6f 20 61 72 63 68 69 76 65 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 | e.to.archive'),.new.InputOption( |
19620 | 27 66 6f 72 6d 61 74 27 2c 20 27 66 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 | 'format',.'f',.InputOption::VALU |
19640 | 45 5f 52 45 51 55 49 52 45 44 2c 20 27 46 6f 72 6d 61 74 20 6f 66 20 74 68 65 20 72 65 73 75 6c | E_REQUIRED,.'Format.of.the.resul |
19660 | 74 69 6e 67 20 61 72 63 68 69 76 65 3a 20 74 61 72 2c 20 74 61 72 2e 67 7a 2c 20 74 61 72 2e 62 | ting.archive:.tar,.tar.gz,.tar.b |
19680 | 7a 32 20 6f 72 20 7a 69 70 20 28 64 65 66 61 75 6c 74 20 74 61 72 29 27 2c 20 6e 75 6c 6c 2c 20 | z2.or.zip.(default.tar)',.null,. |
196a0 | 73 65 6c 66 3a 3a 46 4f 52 4d 41 54 53 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 | self::FORMATS),.new.InputOption( |
196c0 | 27 64 69 72 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f | 'dir',.null,.InputOption::VALUE_ |
196e0 | 52 45 51 55 49 52 45 44 2c 20 27 57 72 69 74 65 20 74 68 65 20 61 72 63 68 69 76 65 20 74 6f 20 | REQUIRED,.'Write.the.archive.to. |
19700 | 74 68 69 73 20 64 69 72 65 63 74 6f 72 79 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f | this.directory'),.new.InputOptio |
19720 | 6e 28 27 66 69 6c 65 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c | n('file',.null,.InputOption::VAL |
19740 | 55 45 5f 52 45 51 55 49 52 45 44 2c 20 27 57 72 69 74 65 20 74 68 65 20 61 72 63 68 69 76 65 20 | UE_REQUIRED,.'Write.the.archive. |
19760 | 77 69 74 68 20 74 68 65 20 67 69 76 65 6e 20 66 69 6c 65 20 6e 61 6d 65 2e 27 0a 2e 27 20 4e 6f | with.the.given.file.name.'..'.No |
19780 | 74 65 20 74 68 61 74 20 74 68 65 20 66 6f 72 6d 61 74 20 77 69 6c 6c 20 62 65 20 61 70 70 65 6e | te.that.the.format.will.be.appen |
197a0 | 64 65 64 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 69 67 6e 6f 72 65 2d | ded.'),.new.InputOption('ignore- |
197c0 | 66 69 6c 74 65 72 73 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c | filters',.null,.InputOption::VAL |
197e0 | 55 45 5f 4e 4f 4e 45 2c 20 27 49 67 6e 6f 72 65 20 66 69 6c 74 65 72 73 20 77 68 65 6e 20 73 61 | UE_NONE,.'Ignore.filters.when.sa |
19800 | 76 69 6e 67 20 70 61 63 6b 61 67 65 27 29 2c 0a 5d 29 0a 2d 3e 73 65 74 48 65 6c 70 28 0a 3c 3c | ving.package'),.]).->setHelp(.<< |
19820 | 3c 45 4f 54 0a 54 68 65 20 3c 69 6e 66 6f 3e 61 72 63 68 69 76 65 3c 2f 69 6e 66 6f 3e 20 63 6f | <EOT.The.<info>archive</info>.co |
19840 | 6d 6d 61 6e 64 20 63 72 65 61 74 65 73 20 61 6e 20 61 72 63 68 69 76 65 20 6f 66 20 74 68 65 20 | mmand.creates.an.archive.of.the. |
19860 | 73 70 65 63 69 66 69 65 64 20 66 6f 72 6d 61 74 0a 63 6f 6e 74 61 69 6e 69 6e 67 20 74 68 65 20 | specified.format.containing.the. |
19880 | 66 69 6c 65 73 20 61 6e 64 20 64 69 72 65 63 74 6f 72 69 65 73 20 6f 66 20 74 68 65 20 43 6f 6d | files.and.directories.of.the.Com |
198a0 | 70 6f 73 65 72 20 70 72 6f 6a 65 63 74 20 6f 72 20 74 68 65 20 73 70 65 63 69 66 69 65 64 0a 70 | poser.project.or.the.specified.p |
198c0 | 61 63 6b 61 67 65 20 69 6e 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 76 65 72 73 69 6f 6e 20 | ackage.in.the.specified.version. |
198e0 | 61 6e 64 20 77 72 69 74 65 73 20 69 74 20 74 6f 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 64 | and.writes.it.to.the.specified.d |
19900 | 69 72 65 63 74 6f 72 79 2e 0a 0a 3c 69 6e 66 6f 3e 70 68 70 20 63 6f 6d 70 6f 73 65 72 2e 70 68 | irectory...<info>php.composer.ph |
19920 | 61 72 20 61 72 63 68 69 76 65 20 5b 2d 2d 66 6f 72 6d 61 74 3d 7a 69 70 5d 20 5b 2d 2d 64 69 72 | ar.archive.[--format=zip].[--dir |
19940 | 3d 2f 66 6f 6f 5d 20 5b 2d 2d 66 69 6c 65 3d 66 69 6c 65 6e 61 6d 65 5d 20 5b 70 61 63 6b 61 67 | =/foo].[--file=filename].[packag |
19960 | 65 20 5b 76 65 72 73 69 6f 6e 5d 5d 3c 2f 69 6e 66 6f 3e 0a 0a 52 65 61 64 20 6d 6f 72 65 20 61 | e.[version]]</info>..Read.more.a |
19980 | 74 20 68 74 74 70 73 3a 2f 2f 67 65 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 67 2f 64 6f 63 2f 30 33 | t.https://getcomposer.org/doc/03 |
199a0 | 2d 63 6c 69 2e 6d 64 23 61 72 63 68 69 76 65 0a 45 4f 54 0a 29 0a 3b 0a 7d 0a 0a 70 72 6f 74 65 | -cli.md#archive.EOT.).;.}..prote |
199c0 | 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 65 78 65 63 75 74 65 28 49 6e 70 75 74 49 6e 74 65 72 | cted.function.execute(InputInter |
199e0 | 66 61 63 65 20 24 69 6e 70 75 74 2c 20 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 6f 75 | face.$input,.OutputInterface.$ou |
19a00 | 74 70 75 74 29 3a 20 69 6e 74 0a 7b 0a 24 63 6f 6d 70 6f 73 65 72 20 3d 20 24 74 68 69 73 2d 3e | tput):.int.{.$composer.=.$this-> |
19a20 | 74 72 79 43 6f 6d 70 6f 73 65 72 28 29 3b 0a 24 63 6f 6e 66 69 67 20 3d 20 6e 75 6c 6c 3b 0a 0a | tryComposer();.$config.=.null;.. |
19a40 | 69 66 20 28 24 63 6f 6d 70 6f 73 65 72 29 20 7b 0a 24 63 6f 6e 66 69 67 20 3d 20 24 63 6f 6d 70 | if.($composer).{.$config.=.$comp |
19a60 | 6f 73 65 72 2d 3e 67 65 74 43 6f 6e 66 69 67 28 29 3b 0a 24 63 6f 6d 6d 61 6e 64 45 76 65 6e 74 | oser->getConfig();.$commandEvent |
19a80 | 20 3d 20 6e 65 77 20 43 6f 6d 6d 61 6e 64 45 76 65 6e 74 28 50 6c 75 67 69 6e 45 76 65 6e 74 73 | .=.new.CommandEvent(PluginEvents |
19aa0 | 3a 3a 43 4f 4d 4d 41 4e 44 2c 20 27 61 72 63 68 69 76 65 27 2c 20 24 69 6e 70 75 74 2c 20 24 6f | ::COMMAND,.'archive',.$input,.$o |
19ac0 | 75 74 70 75 74 29 3b 0a 24 65 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 20 3d 20 24 63 6f 6d 70 | utput);.$eventDispatcher.=.$comp |
19ae0 | 6f 73 65 72 2d 3e 67 65 74 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 28 29 3b 0a 24 65 76 65 | oser->getEventDispatcher();.$eve |
19b00 | 6e 74 44 69 73 70 61 74 63 68 65 72 2d 3e 64 69 73 70 61 74 63 68 28 24 63 6f 6d 6d 61 6e 64 45 | ntDispatcher->dispatch($commandE |
19b20 | 76 65 6e 74 2d 3e 67 65 74 4e 61 6d 65 28 29 2c 20 24 63 6f 6d 6d 61 6e 64 45 76 65 6e 74 29 3b | vent->getName(),.$commandEvent); |
19b40 | 0a 24 65 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 2d 3e 64 69 73 70 61 74 63 68 53 63 72 69 70 | .$eventDispatcher->dispatchScrip |
19b60 | 74 28 53 63 72 69 70 74 45 76 65 6e 74 73 3a 3a 50 52 45 5f 41 52 43 48 49 56 45 5f 43 4d 44 29 | t(ScriptEvents::PRE_ARCHIVE_CMD) |
19b80 | 3b 0a 7d 0a 0a 69 66 20 28 21 24 63 6f 6e 66 69 67 29 20 7b 0a 24 63 6f 6e 66 69 67 20 3d 20 46 | ;.}..if.(!$config).{.$config.=.F |
19ba0 | 61 63 74 6f 72 79 3a 3a 63 72 65 61 74 65 43 6f 6e 66 69 67 28 29 3b 0a 7d 0a 0a 24 66 6f 72 6d | actory::createConfig();.}..$form |
19bc0 | 61 74 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 66 6f 72 6d 61 74 27 29 | at.=.$input->getOption('format') |
19be0 | 20 3f 3f 20 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 61 72 63 68 69 76 65 2d 66 6f 72 6d 61 74 | .??.$config->get('archive-format |
19c00 | 27 29 3b 0a 24 64 69 72 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 64 69 | ');.$dir.=.$input->getOption('di |
19c20 | 72 27 29 20 3f 3f 20 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 61 72 63 68 69 76 65 2d 64 69 72 | r').??.$config->get('archive-dir |
19c40 | 27 29 3b 0a 0a 24 72 65 74 75 72 6e 43 6f 64 65 20 3d 20 24 74 68 69 73 2d 3e 61 72 63 68 69 76 | ');..$returnCode.=.$this->archiv |
19c60 | 65 28 0a 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 2c 0a 24 63 6f 6e 66 69 67 2c 0a 24 69 6e 70 | e(.$this->getIO(),.$config,.$inp |
19c80 | 75 74 2d 3e 67 65 74 41 72 67 75 6d 65 6e 74 28 27 70 61 63 6b 61 67 65 27 29 2c 0a 24 69 6e 70 | ut->getArgument('package'),.$inp |
19ca0 | 75 74 2d 3e 67 65 74 41 72 67 75 6d 65 6e 74 28 27 76 65 72 73 69 6f 6e 27 29 2c 0a 24 66 6f 72 | ut->getArgument('version'),.$for |
19cc0 | 6d 61 74 2c 0a 24 64 69 72 2c 0a 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 66 69 | mat,.$dir,.$input->getOption('fi |
19ce0 | 6c 65 27 29 2c 0a 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 69 67 6e 6f 72 65 2d | le'),.$input->getOption('ignore- |
19d00 | 66 69 6c 74 65 72 73 27 29 2c 0a 24 63 6f 6d 70 6f 73 65 72 0a 29 3b 0a 0a 69 66 20 28 30 20 3d | filters'),.$composer.);..if.(0.= |
19d20 | 3d 3d 20 24 72 65 74 75 72 6e 43 6f 64 65 20 26 26 20 24 63 6f 6d 70 6f 73 65 72 29 20 7b 0a 24 | ==.$returnCode.&&.$composer).{.$ |
19d40 | 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 28 29 2d 3e | composer->getEventDispatcher()-> |
19d60 | 64 69 73 70 61 74 63 68 53 63 72 69 70 74 28 53 63 72 69 70 74 45 76 65 6e 74 73 3a 3a 50 4f 53 | dispatchScript(ScriptEvents::POS |
19d80 | 54 5f 41 52 43 48 49 56 45 5f 43 4d 44 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 72 65 74 75 72 | T_ARCHIVE_CMD);.}..return.$retur |
19da0 | 6e 43 6f 64 65 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 | nCode;.}.....protected.function. |
19dc0 | 61 72 63 68 69 76 65 28 49 4f 49 6e 74 65 72 66 61 63 65 20 24 69 6f 2c 20 43 6f 6e 66 69 67 20 | archive(IOInterface.$io,.Config. |
19de0 | 24 63 6f 6e 66 69 67 2c 20 3f 73 74 72 69 6e 67 20 24 70 61 63 6b 61 67 65 4e 61 6d 65 2c 20 3f | $config,.?string.$packageName,.? |
19e00 | 73 74 72 69 6e 67 20 24 76 65 72 73 69 6f 6e 2c 20 73 74 72 69 6e 67 20 24 66 6f 72 6d 61 74 2c | string.$version,.string.$format, |
19e20 | 20 73 74 72 69 6e 67 20 24 64 65 73 74 2c 20 3f 73 74 72 69 6e 67 20 24 66 69 6c 65 4e 61 6d 65 | .string.$dest,.?string.$fileName |
19e40 | 2c 20 62 6f 6f 6c 20 24 69 67 6e 6f 72 65 46 69 6c 74 65 72 73 2c 20 3f 43 6f 6d 70 6f 73 65 72 | ,.bool.$ignoreFilters,.?Composer |
19e60 | 20 24 63 6f 6d 70 6f 73 65 72 29 3a 20 69 6e 74 0a 7b 0a 69 66 20 28 24 63 6f 6d 70 6f 73 65 72 | .$composer):.int.{.if.($composer |
19e80 | 29 20 7b 0a 24 61 72 63 68 69 76 65 4d 61 6e 61 67 65 72 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d | ).{.$archiveManager.=.$composer- |
19ea0 | 3e 67 65 74 41 72 63 68 69 76 65 4d 61 6e 61 67 65 72 28 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 | >getArchiveManager();.}.else.{.$ |
19ec0 | 66 61 63 74 6f 72 79 20 3d 20 6e 65 77 20 46 61 63 74 6f 72 79 3b 0a 24 70 72 6f 63 65 73 73 20 | factory.=.new.Factory;.$process. |
19ee0 | 3d 20 6e 65 77 20 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 28 29 3b 0a 24 68 74 74 70 44 6f | =.new.ProcessExecutor();.$httpDo |
19f00 | 77 6e 6c 6f 61 64 65 72 20 3d 20 46 61 63 74 6f 72 79 3a 3a 63 72 65 61 74 65 48 74 74 70 44 6f | wnloader.=.Factory::createHttpDo |
19f20 | 77 6e 6c 6f 61 64 65 72 28 24 69 6f 2c 20 24 63 6f 6e 66 69 67 29 3b 0a 24 64 6f 77 6e 6c 6f 61 | wnloader($io,.$config);.$downloa |
19f40 | 64 4d 61 6e 61 67 65 72 20 3d 20 24 66 61 63 74 6f 72 79 2d 3e 63 72 65 61 74 65 44 6f 77 6e 6c | dManager.=.$factory->createDownl |
19f60 | 6f 61 64 4d 61 6e 61 67 65 72 28 24 69 6f 2c 20 24 63 6f 6e 66 69 67 2c 20 24 68 74 74 70 44 6f | oadManager($io,.$config,.$httpDo |
19f80 | 77 6e 6c 6f 61 64 65 72 2c 20 24 70 72 6f 63 65 73 73 29 3b 0a 24 61 72 63 68 69 76 65 4d 61 6e | wnloader,.$process);.$archiveMan |
19fa0 | 61 67 65 72 20 3d 20 24 66 61 63 74 6f 72 79 2d 3e 63 72 65 61 74 65 41 72 63 68 69 76 65 4d 61 | ager.=.$factory->createArchiveMa |
19fc0 | 6e 61 67 65 72 28 24 63 6f 6e 66 69 67 2c 20 24 64 6f 77 6e 6c 6f 61 64 4d 61 6e 61 67 65 72 2c | nager($config,.$downloadManager, |
19fe0 | 20 6e 65 77 20 4c 6f 6f 70 28 24 68 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 2c 20 24 70 72 6f 63 | .new.Loop($httpDownloader,.$proc |
1a000 | 65 73 73 29 29 3b 0a 7d 0a 0a 69 66 20 28 24 70 61 63 6b 61 67 65 4e 61 6d 65 29 20 7b 0a 24 70 | ess));.}..if.($packageName).{.$p |
1a020 | 61 63 6b 61 67 65 20 3d 20 24 74 68 69 73 2d 3e 73 65 6c 65 63 74 50 61 63 6b 61 67 65 28 24 69 | ackage.=.$this->selectPackage($i |
1a040 | 6f 2c 20 24 70 61 63 6b 61 67 65 4e 61 6d 65 2c 20 24 76 65 72 73 69 6f 6e 29 3b 0a 0a 69 66 20 | o,.$packageName,.$version);..if. |
1a060 | 28 21 24 70 61 63 6b 61 67 65 29 20 7b 0a 72 65 74 75 72 6e 20 31 3b 0a 7d 0a 7d 20 65 6c 73 65 | (!$package).{.return.1;.}.}.else |
1a080 | 20 7b 0a 24 70 61 63 6b 61 67 65 20 3d 20 24 74 68 69 73 2d 3e 72 65 71 75 69 72 65 43 6f 6d 70 | .{.$package.=.$this->requireComp |
1a0a0 | 6f 73 65 72 28 29 2d 3e 67 65 74 50 61 63 6b 61 67 65 28 29 3b 0a 7d 0a 0a 24 69 6f 2d 3e 77 72 | oser()->getPackage();.}..$io->wr |
1a0c0 | 69 74 65 45 72 72 6f 72 28 27 3c 69 6e 66 6f 3e 43 72 65 61 74 69 6e 67 20 74 68 65 20 61 72 63 | iteError('<info>Creating.the.arc |
1a0e0 | 68 69 76 65 20 69 6e 74 6f 20 22 27 2e 24 64 65 73 74 2e 27 22 2e 3c 2f 69 6e 66 6f 3e 27 29 3b | hive.into."'.$dest.'".</info>'); |
1a100 | 0a 24 70 61 63 6b 61 67 65 50 61 74 68 20 3d 20 24 61 72 63 68 69 76 65 4d 61 6e 61 67 65 72 2d | .$packagePath.=.$archiveManager- |
1a120 | 3e 61 72 63 68 69 76 65 28 24 70 61 63 6b 61 67 65 2c 20 24 66 6f 72 6d 61 74 2c 20 24 64 65 73 | >archive($package,.$format,.$des |
1a140 | 74 2c 20 24 66 69 6c 65 4e 61 6d 65 2c 20 24 69 67 6e 6f 72 65 46 69 6c 74 65 72 73 29 3b 0a 24 | t,.$fileName,.$ignoreFilters);.$ |
1a160 | 66 73 20 3d 20 6e 65 77 20 46 69 6c 65 73 79 73 74 65 6d 3b 0a 24 73 68 6f 72 74 50 61 74 68 20 | fs.=.new.Filesystem;.$shortPath. |
1a180 | 3d 20 24 66 73 2d 3e 66 69 6e 64 53 68 6f 72 74 65 73 74 50 61 74 68 28 50 6c 61 74 66 6f 72 6d | =.$fs->findShortestPath(Platform |
1a1a0 | 3a 3a 67 65 74 43 77 64 28 29 2c 20 24 70 61 63 6b 61 67 65 50 61 74 68 2c 20 74 72 75 65 29 3b | ::getCwd(),.$packagePath,.true); |
1a1c0 | 0a 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 43 72 65 61 74 65 64 3a 20 27 2c 20 66 | ..$io->writeError('Created:.',.f |
1a1e0 | 61 6c 73 65 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 73 74 72 6c 65 6e 28 24 73 68 6f 72 74 50 | alse);.$io->write(strlen($shortP |
1a200 | 61 74 68 29 20 3c 20 73 74 72 6c 65 6e 28 24 70 61 63 6b 61 67 65 50 61 74 68 29 20 3f 20 24 73 | ath).<.strlen($packagePath).?.$s |
1a220 | 68 6f 72 74 50 61 74 68 20 3a 20 24 70 61 63 6b 61 67 65 50 61 74 68 29 3b 0a 0a 72 65 74 75 72 | hortPath.:.$packagePath);..retur |
1a240 | 6e 20 30 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 73 65 | n.0;.}.....protected.function.se |
1a260 | 6c 65 63 74 50 61 63 6b 61 67 65 28 49 4f 49 6e 74 65 72 66 61 63 65 20 24 69 6f 2c 20 73 74 72 | lectPackage(IOInterface.$io,.str |
1a280 | 69 6e 67 20 24 70 61 63 6b 61 67 65 4e 61 6d 65 2c 20 3f 73 74 72 69 6e 67 20 24 76 65 72 73 69 | ing.$packageName,.?string.$versi |
1a2a0 | 6f 6e 20 3d 20 6e 75 6c 6c 29 0a 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 69 | on.=.null).{.$io->writeError('<i |
1a2c0 | 6e 66 6f 3e 53 65 61 72 63 68 69 6e 67 20 66 6f 72 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 | nfo>Searching.for.the.specified. |
1a2e0 | 70 61 63 6b 61 67 65 2e 3c 2f 69 6e 66 6f 3e 27 29 3b 0a 0a 69 66 20 28 24 63 6f 6d 70 6f 73 65 | package.</info>');..if.($compose |
1a300 | 72 20 3d 20 24 74 68 69 73 2d 3e 74 72 79 43 6f 6d 70 6f 73 65 72 28 29 29 20 7b 0a 24 6c 6f 63 | r.=.$this->tryComposer()).{.$loc |
1a320 | 61 6c 52 65 70 6f 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 | alRepo.=.$composer->getRepositor |
1a340 | 79 4d 61 6e 61 67 65 72 28 29 2d 3e 67 65 74 4c 6f 63 61 6c 52 65 70 6f 73 69 74 6f 72 79 28 29 | yManager()->getLocalRepository() |
1a360 | 3b 0a 24 72 65 70 6f 20 3d 20 6e 65 77 20 43 6f 6d 70 6f 73 69 74 65 52 65 70 6f 73 69 74 6f 72 | ;.$repo.=.new.CompositeRepositor |
1a380 | 79 28 61 72 72 61 79 5f 6d 65 72 67 65 28 5b 24 6c 6f 63 61 6c 52 65 70 6f 5d 2c 20 24 63 6f 6d | y(array_merge([$localRepo],.$com |
1a3a0 | 70 6f 73 65 72 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 79 4d 61 6e 61 67 65 72 28 29 2d 3e 67 | poser->getRepositoryManager()->g |
1a3c0 | 65 74 52 65 70 6f 73 69 74 6f 72 69 65 73 28 29 29 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 64 65 | etRepositories()));.}.else.{.$de |
1a3e0 | 66 61 75 6c 74 52 65 70 6f 73 20 3d 20 52 65 70 6f 73 69 74 6f 72 79 46 61 63 74 6f 72 79 3a 3a | faultRepos.=.RepositoryFactory:: |
1a400 | 64 65 66 61 75 6c 74 52 65 70 6f 73 57 69 74 68 44 65 66 61 75 6c 74 4d 61 6e 61 67 65 72 28 24 | defaultReposWithDefaultManager($ |
1a420 | 69 6f 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 4e 6f 20 63 6f 6d 70 6f 73 65 | io);.$io->writeError('No.compose |
1a440 | 72 2e 6a 73 6f 6e 20 66 6f 75 6e 64 20 69 6e 20 74 68 65 20 63 75 72 72 65 6e 74 20 64 69 72 65 | r.json.found.in.the.current.dire |
1a460 | 63 74 6f 72 79 2c 20 73 65 61 72 63 68 69 6e 67 20 70 61 63 6b 61 67 65 73 20 66 72 6f 6d 20 27 | ctory,.searching.packages.from.' |
1a480 | 20 2e 20 69 6d 70 6c 6f 64 65 28 27 2c 20 27 2c 20 61 72 72 61 79 5f 6b 65 79 73 28 24 64 65 66 | ...implode(',.',.array_keys($def |
1a4a0 | 61 75 6c 74 52 65 70 6f 73 29 29 29 3b 0a 24 72 65 70 6f 20 3d 20 6e 65 77 20 43 6f 6d 70 6f 73 | aultRepos)));.$repo.=.new.Compos |
1a4c0 | 69 74 65 52 65 70 6f 73 69 74 6f 72 79 28 24 64 65 66 61 75 6c 74 52 65 70 6f 73 29 3b 0a 7d 0a | iteRepository($defaultRepos);.}. |
1a4e0 | 0a 24 70 61 63 6b 61 67 65 73 20 3d 20 24 72 65 70 6f 2d 3e 66 69 6e 64 50 61 63 6b 61 67 65 73 | .$packages.=.$repo->findPackages |
1a500 | 28 24 70 61 63 6b 61 67 65 4e 61 6d 65 2c 20 24 76 65 72 73 69 6f 6e 29 3b 0a 0a 69 66 20 28 63 | ($packageName,.$version);..if.(c |
1a520 | 6f 75 6e 74 28 24 70 61 63 6b 61 67 65 73 29 20 3e 20 31 29 20 7b 0a 24 70 61 63 6b 61 67 65 20 | ount($packages).>.1).{.$package. |
1a540 | 3d 20 72 65 73 65 74 28 24 70 61 63 6b 61 67 65 73 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 | =.reset($packages);.$io->writeEr |
1a560 | 72 6f 72 28 27 3c 69 6e 66 6f 3e 46 6f 75 6e 64 20 6d 75 6c 74 69 70 6c 65 20 6d 61 74 63 68 65 | ror('<info>Found.multiple.matche |
1a580 | 73 2c 20 73 65 6c 65 63 74 65 64 20 27 2e 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 | s,.selected.'.$package->getPrett |
1a5a0 | 79 53 74 72 69 6e 67 28 29 2e 27 2e 3c 2f 69 6e 66 6f 3e 27 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 | yString().'.</info>');.$io->writ |
1a5c0 | 65 45 72 72 6f 72 28 27 41 6c 74 65 72 6e 61 74 69 76 65 73 20 77 65 72 65 20 27 2e 69 6d 70 6c | eError('Alternatives.were.'.impl |
1a5e0 | 6f 64 65 28 27 2c 20 27 2c 20 61 72 72 61 79 5f 6d 61 70 28 73 74 61 74 69 63 20 66 75 6e 63 74 | ode(',.',.array_map(static.funct |
1a600 | 69 6f 6e 20 28 24 70 29 3a 20 73 74 72 69 6e 67 20 7b 0a 72 65 74 75 72 6e 20 24 70 2d 3e 67 65 | ion.($p):.string.{.return.$p->ge |
1a620 | 74 50 72 65 74 74 79 53 74 72 69 6e 67 28 29 3b 0a 7d 2c 20 24 70 61 63 6b 61 67 65 73 29 29 2e | tPrettyString();.},.$packages)). |
1a640 | 27 2e 27 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 63 6f 6d 6d 65 6e 74 3e | '.');.$io->writeError('<comment> |
1a660 | 50 6c 65 61 73 65 20 75 73 65 20 61 20 6d 6f 72 65 20 73 70 65 63 69 66 69 63 20 63 6f 6e 73 74 | Please.use.a.more.specific.const |
1a680 | 72 61 69 6e 74 20 74 6f 20 70 69 63 6b 20 61 20 64 69 66 66 65 72 65 6e 74 20 70 61 63 6b 61 67 | raint.to.pick.a.different.packag |
1a6a0 | 65 2e 3c 2f 63 6f 6d 6d 65 6e 74 3e 27 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 70 61 63 6b 61 | e.</comment>');.}.elseif.($packa |
1a6c0 | 67 65 73 29 20 7b 0a 24 70 61 63 6b 61 67 65 20 3d 20 72 65 73 65 74 28 24 70 61 63 6b 61 67 65 | ges).{.$package.=.reset($package |
1a6e0 | 73 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 69 6e 66 6f 3e 46 6f 75 6e 64 | s);.$io->writeError('<info>Found |
1a700 | 20 61 6e 20 65 78 61 63 74 20 6d 61 74 63 68 20 27 2e 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 | .an.exact.match.'.$package->getP |
1a720 | 72 65 74 74 79 53 74 72 69 6e 67 28 29 2e 27 2e 3c 2f 69 6e 66 6f 3e 27 29 3b 0a 7d 20 65 6c 73 | rettyString().'.</info>');.}.els |
1a740 | 65 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 65 72 72 6f 72 3e 43 6f 75 6c | e.{.$io->writeError('<error>Coul |
1a760 | 64 20 6e 6f 74 20 66 69 6e 64 20 61 20 70 61 63 6b 61 67 65 20 6d 61 74 63 68 69 6e 67 20 27 2e | d.not.find.a.package.matching.'. |
1a780 | 24 70 61 63 6b 61 67 65 4e 61 6d 65 2e 27 2e 3c 2f 65 72 72 6f 72 3e 27 29 3b 0a 0a 72 65 74 75 | $packageName.'.</error>');..retu |
1a7a0 | 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 69 66 20 28 21 24 70 61 63 6b 61 67 65 20 69 6e 73 74 61 | rn.false;.}..if.(!$package.insta |
1a7c0 | 6e 63 65 6f 66 20 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 29 20 | nceof.CompletePackageInterface). |
1a7e0 | 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 4c 6f 67 69 63 45 78 63 65 70 74 69 6f 6e 28 27 45 78 70 | {.throw.new.\LogicException('Exp |
1a800 | 65 63 74 65 64 20 61 20 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 | ected.a.CompletePackageInterface |
1a820 | 20 69 6e 73 74 61 6e 63 65 20 62 75 74 20 66 6f 75 6e 64 20 27 2e 67 65 74 5f 63 6c 61 73 73 28 | .instance.but.found.'.get_class( |
1a840 | 24 70 61 63 6b 61 67 65 29 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 70 61 63 6b 61 67 65 3b 0a | $package));.}..return.$package;. |
1a860 | 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 | }.}.<?php.declare(strict_types=1 |
1a880 | 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 | );............namespace.Composer |
1a8a0 | 5c 43 6f 6d 6d 61 6e 64 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6d 70 6f 73 65 72 | \Command;..use.Composer\Composer |
1a8c0 | 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 52 65 70 6f 73 69 | ;.use.Composer\Repository\Reposi |
1a8e0 | 74 6f 72 79 53 65 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 | torySet;.use.Composer\Repository |
1a900 | 5c 52 65 70 6f 73 69 74 6f 72 79 55 74 69 6c 73 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f | \RepositoryUtils;.use.Symfony\Co |
1a920 | 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 49 6e 74 65 72 | mponent\Console\Input\InputInter |
1a940 | 66 61 63 65 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 | face;.use.Symfony\Component\Cons |
1a960 | 6f 6c 65 5c 4f 75 74 70 75 74 5c 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 | ole\Output\OutputInterface;.use. |
1a980 | 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 | Composer\Package\PackageInterfac |
1a9a0 | 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 49 6e 73 74 61 | e;.use.Composer\Repository\Insta |
1a9c0 | 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 41 64 76 | lledRepository;.use.Composer\Adv |
1a9e0 | 69 73 6f 72 79 5c 41 75 64 69 74 6f 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 73 | isory\Auditor;.use.Composer\Cons |
1aa00 | 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 4f 70 74 69 6f 6e 3b 0a 0a 63 6c 61 73 73 20 41 75 | ole\Input\InputOption;..class.Au |
1aa20 | 64 69 74 43 6f 6d 6d 61 6e 64 20 65 78 74 65 6e 64 73 20 42 61 73 65 43 6f 6d 6d 61 6e 64 0a 7b | ditCommand.extends.BaseCommand.{ |
1aa40 | 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 63 6f 6e 66 69 67 75 72 65 28 29 3a | .protected.function.configure(): |
1aa60 | 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 0a 2d 3e 73 65 74 4e 61 6d 65 28 27 61 75 64 69 74 27 29 | .void.{.$this.->setName('audit') |
1aa80 | 0a 2d 3e 73 65 74 44 65 73 63 72 69 70 74 69 6f 6e 28 27 43 68 65 63 6b 73 20 66 6f 72 20 73 65 | .->setDescription('Checks.for.se |
1aaa0 | 63 75 72 69 74 79 20 76 75 6c 6e 65 72 61 62 69 6c 69 74 79 20 61 64 76 69 73 6f 72 69 65 73 20 | curity.vulnerability.advisories. |
1aac0 | 66 6f 72 20 69 6e 73 74 61 6c 6c 65 64 20 70 61 63 6b 61 67 65 73 27 29 0a 2d 3e 73 65 74 44 65 | for.installed.packages').->setDe |
1aae0 | 66 69 6e 69 74 69 6f 6e 28 5b 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 64 | finition([.new.InputOption('no-d |
1ab00 | 65 76 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f | ev',.null,.InputOption::VALUE_NO |
1ab20 | 4e 45 2c 20 27 44 69 73 61 62 6c 65 73 20 61 75 64 69 74 69 6e 67 20 6f 66 20 72 65 71 75 69 72 | NE,.'Disables.auditing.of.requir |
1ab40 | 65 2d 64 65 76 20 70 61 63 6b 61 67 65 73 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 | e-dev.packages.'),.new.InputOpti |
1ab60 | 6f 6e 28 27 66 6f 72 6d 61 74 27 2c 20 27 66 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 | on('format',.'f',.InputOption::V |
1ab80 | 41 4c 55 45 5f 52 45 51 55 49 52 45 44 2c 20 27 4f 75 74 70 75 74 20 66 6f 72 6d 61 74 2e 20 4d | ALUE_REQUIRED,.'Output.format..M |
1aba0 | 75 73 74 20 62 65 20 22 74 61 62 6c 65 22 2c 20 22 70 6c 61 69 6e 22 2c 20 22 6a 73 6f 6e 22 2c | ust.be."table",."plain",."json", |
1abc0 | 20 6f 72 20 22 73 75 6d 6d 61 72 79 22 2e 27 2c 20 41 75 64 69 74 6f 72 3a 3a 46 4f 52 4d 41 54 | .or."summary".',.Auditor::FORMAT |
1abe0 | 5f 54 41 42 4c 45 2c 20 41 75 64 69 74 6f 72 3a 3a 46 4f 52 4d 41 54 53 29 2c 0a 6e 65 77 20 49 | _TABLE,.Auditor::FORMATS),.new.I |
1ac00 | 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6c 6f 63 6b 65 64 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 | nputOption('locked',.null,.Input |
1ac20 | 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 41 75 64 69 74 20 62 61 73 65 64 | Option::VALUE_NONE,.'Audit.based |
1ac40 | 20 6f 6e 20 74 68 65 20 6c 6f 63 6b 20 66 69 6c 65 20 69 6e 73 74 65 61 64 20 6f 66 20 74 68 65 | .on.the.lock.file.instead.of.the |
1ac60 | 20 69 6e 73 74 61 6c 6c 65 64 20 70 61 63 6b 61 67 65 73 2e 27 29 2c 0a 5d 29 0a 2d 3e 73 65 74 | .installed.packages.'),.]).->set |
1ac80 | 48 65 6c 70 28 0a 3c 3c 3c 45 4f 54 0a 54 68 65 20 3c 69 6e 66 6f 3e 61 75 64 69 74 3c 2f 69 6e | Help(.<<<EOT.The.<info>audit</in |
1aca0 | 66 6f 3e 20 63 6f 6d 6d 61 6e 64 20 63 68 65 63 6b 73 20 66 6f 72 20 73 65 63 75 72 69 74 79 20 | fo>.command.checks.for.security. |
1acc0 | 76 75 6c 6e 65 72 61 62 69 6c 69 74 79 20 61 64 76 69 73 6f 72 69 65 73 20 66 6f 72 20 69 6e 73 | vulnerability.advisories.for.ins |
1ace0 | 74 61 6c 6c 65 64 20 70 61 63 6b 61 67 65 73 2e 0a 0a 49 66 20 79 6f 75 20 64 6f 20 6e 6f 74 20 | talled.packages...If.you.do.not. |
1ad00 | 77 61 6e 74 20 74 6f 20 69 6e 63 6c 75 64 65 20 64 65 76 20 64 65 70 65 6e 64 65 6e 63 69 65 73 | want.to.include.dev.dependencies |
1ad20 | 20 69 6e 20 74 68 65 20 61 75 64 69 74 20 79 6f 75 20 63 61 6e 20 6f 6d 69 74 20 74 68 65 6d 20 | .in.the.audit.you.can.omit.them. |
1ad40 | 77 69 74 68 20 2d 2d 6e 6f 2d 64 65 76 0a 0a 52 65 61 64 20 6d 6f 72 65 20 61 74 20 68 74 74 70 | with.--no-dev..Read.more.at.http |
1ad60 | 73 3a 2f 2f 67 65 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 67 2f 64 6f 63 2f 30 33 2d 63 6c 69 2e 6d | s://getcomposer.org/doc/03-cli.m |
1ad80 | 64 23 61 75 64 69 74 0a 45 4f 54 0a 29 0a 3b 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e | d#audit.EOT.).;.}..protected.fun |
1ada0 | 63 74 69 6f 6e 20 65 78 65 63 75 74 65 28 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 69 6e | ction.execute(InputInterface.$in |
1adc0 | 70 75 74 2c 20 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 6f 75 74 70 75 74 29 0a 7b 0a | put,.OutputInterface.$output).{. |
1ade0 | 24 63 6f 6d 70 6f 73 65 72 20 3d 20 24 74 68 69 73 2d 3e 72 65 71 75 69 72 65 43 6f 6d 70 6f 73 | $composer.=.$this->requireCompos |
1ae00 | 65 72 28 29 3b 0a 24 70 61 63 6b 61 67 65 73 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 50 61 63 6b | er();.$packages.=.$this->getPack |
1ae20 | 61 67 65 73 28 24 63 6f 6d 70 6f 73 65 72 2c 20 24 69 6e 70 75 74 29 3b 0a 0a 69 66 20 28 63 6f | ages($composer,.$input);..if.(co |
1ae40 | 75 6e 74 28 24 70 61 63 6b 61 67 65 73 29 20 3d 3d 3d 20 30 29 20 7b 0a 24 74 68 69 73 2d 3e 67 | unt($packages).===.0).{.$this->g |
1ae60 | 65 74 49 4f 28 29 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 4e 6f 20 70 61 63 6b 61 67 65 73 20 | etIO()->writeError('No.packages. |
1ae80 | 2d 20 73 6b 69 70 70 69 6e 67 20 61 75 64 69 74 2e 27 29 3b 0a 0a 72 65 74 75 72 6e 20 30 3b 0a | -.skipping.audit.');..return.0;. |
1aea0 | 7d 0a 0a 24 61 75 64 69 74 6f 72 20 3d 20 6e 65 77 20 41 75 64 69 74 6f 72 28 29 3b 0a 24 72 65 | }..$auditor.=.new.Auditor();.$re |
1aec0 | 70 6f 53 65 74 20 3d 20 6e 65 77 20 52 65 70 6f 73 69 74 6f 72 79 53 65 74 28 29 3b 0a 66 6f 72 | poSet.=.new.RepositorySet();.for |
1aee0 | 65 61 63 68 20 28 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 79 4d 61 | each.($composer->getRepositoryMa |
1af00 | 6e 61 67 65 72 28 29 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 69 65 73 28 29 20 61 73 20 24 72 | nager()->getRepositories().as.$r |
1af20 | 65 70 6f 29 20 7b 0a 24 72 65 70 6f 53 65 74 2d 3e 61 64 64 52 65 70 6f 73 69 74 6f 72 79 28 24 | epo).{.$repoSet->addRepository($ |
1af40 | 72 65 70 6f 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 6d 69 6e 28 32 35 35 2c 20 24 61 75 64 69 74 | repo);.}..return.min(255,.$audit |
1af60 | 6f 72 2d 3e 61 75 64 69 74 28 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 2c 20 24 72 65 70 6f 53 | or->audit($this->getIO(),.$repoS |
1af80 | 65 74 2c 20 24 70 61 63 6b 61 67 65 73 2c 20 24 74 68 69 73 2d 3e 67 65 74 41 75 64 69 74 46 6f | et,.$packages,.$this->getAuditFo |
1afa0 | 72 6d 61 74 28 24 69 6e 70 75 74 2c 20 27 66 6f 72 6d 61 74 27 29 2c 20 66 61 6c 73 65 29 29 3b | rmat($input,.'format'),.false)); |
1afc0 | 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 50 61 63 6b 61 | .}.....private.function.getPacka |
1afe0 | 67 65 73 28 43 6f 6d 70 6f 73 65 72 20 24 63 6f 6d 70 6f 73 65 72 2c 20 49 6e 70 75 74 49 6e 74 | ges(Composer.$composer,.InputInt |
1b000 | 65 72 66 61 63 65 20 24 69 6e 70 75 74 29 3a 20 61 72 72 61 79 0a 7b 0a 69 66 20 28 24 69 6e 70 | erface.$input):.array.{.if.($inp |
1b020 | 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6c 6f 63 6b 65 64 27 29 29 20 7b 0a 69 66 20 28 21 | ut->getOption('locked')).{.if.(! |
1b040 | 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 4c 6f 63 6b 65 72 28 29 2d 3e 69 73 4c 6f 63 6b 65 64 | $composer->getLocker()->isLocked |
1b060 | 28 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 55 6e 65 78 70 65 63 74 65 64 56 61 6c 75 65 | ()).{.throw.new.\UnexpectedValue |
1b080 | 45 78 63 65 70 74 69 6f 6e 28 27 56 61 6c 69 64 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 20 61 | Exception('Valid.composer.json.a |
1b0a0 | 6e 64 20 63 6f 6d 70 6f 73 65 72 2e 6c 6f 63 6b 20 66 69 6c 65 73 20 61 72 65 20 72 65 71 75 69 | nd.composer.lock.files.are.requi |
1b0c0 | 72 65 64 20 74 6f 20 72 75 6e 20 74 68 69 73 20 63 6f 6d 6d 61 6e 64 20 77 69 74 68 20 2d 2d 6c | red.to.run.this.command.with.--l |
1b0e0 | 6f 63 6b 65 64 27 29 3b 0a 7d 0a 24 6c 6f 63 6b 65 72 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e | ocked');.}.$locker.=.$composer-> |
1b100 | 67 65 74 4c 6f 63 6b 65 72 28 29 3b 0a 0a 72 65 74 75 72 6e 20 24 6c 6f 63 6b 65 72 2d 3e 67 65 | getLocker();..return.$locker->ge |
1b120 | 74 4c 6f 63 6b 65 64 52 65 70 6f 73 69 74 6f 72 79 28 21 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 | tLockedRepository(!$input->getOp |
1b140 | 74 69 6f 6e 28 27 6e 6f 2d 64 65 76 27 29 29 2d 3e 67 65 74 50 61 63 6b 61 67 65 73 28 29 3b 0a | tion('no-dev'))->getPackages();. |
1b160 | 7d 0a 0a 24 72 6f 6f 74 50 6b 67 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 50 61 63 6b | }..$rootPkg.=.$composer->getPack |
1b180 | 61 67 65 28 29 3b 0a 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 20 3d 20 6e 65 77 20 49 6e 73 74 | age();.$installedRepo.=.new.Inst |
1b1a0 | 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 28 5b 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 52 | alledRepository([$composer->getR |
1b1c0 | 65 70 6f 73 69 74 6f 72 79 4d 61 6e 61 67 65 72 28 29 2d 3e 67 65 74 4c 6f 63 61 6c 52 65 70 6f | epositoryManager()->getLocalRepo |
1b1e0 | 73 69 74 6f 72 79 28 29 5d 29 3b 0a 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 | sitory()]);..if.($input->getOpti |
1b200 | 6f 6e 28 27 6e 6f 2d 64 65 76 27 29 29 20 7b 0a 72 65 74 75 72 6e 20 52 65 70 6f 73 69 74 6f 72 | on('no-dev')).{.return.Repositor |
1b220 | 79 55 74 69 6c 73 3a 3a 66 69 6c 74 65 72 52 65 71 75 69 72 65 64 50 61 63 6b 61 67 65 73 28 24 | yUtils::filterRequiredPackages($ |
1b240 | 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 2d 3e 67 65 74 50 61 63 6b 61 67 65 73 28 29 2c 20 24 72 | installedRepo->getPackages(),.$r |
1b260 | 6f 6f 74 50 6b 67 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 | ootPkg);.}..return.$installedRep |
1b280 | 6f 2d 3e 67 65 74 50 61 63 6b 61 67 65 73 28 29 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c | o->getPackages();.}.}.<?php.decl |
1b2a0 | 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a | are(strict_types=1);............ |
1b2c0 | 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6d 6d 61 6e 64 3b 0a 0a 75 73 65 | namespace.Composer\Command;..use |
1b2e0 | 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6d 70 6f 73 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 | .Composer\Composer;.use.Composer |
1b300 | 5c 43 6f 6e 66 69 67 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 73 6f 6c 65 5c 41 70 | \Config;.use.Composer\Console\Ap |
1b320 | 70 6c 69 63 61 74 69 6f 6e 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 73 6f 6c 65 5c | plication;.use.Composer\Console\ |
1b340 | 49 6e 70 75 74 5c 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 | Input\InputArgument;.use.Compose |
1b360 | 72 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 4f 70 74 69 6f 6e 3b 0a 75 73 65 | r\Console\Input\InputOption;.use |
1b380 | 20 43 6f 6d 70 6f 73 65 72 5c 46 61 63 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c | .Composer\Factory;.use.Composer\ |
1b3a0 | 46 69 6c 74 65 72 5c 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 | Filter\PlatformRequirementFilter |
1b3c0 | 5c 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 46 61 63 74 6f 72 | \PlatformRequirementFilterFactor |
1b3e0 | 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 46 69 6c 74 65 72 5c 50 6c 61 74 66 6f 72 6d 52 | y;.use.Composer\Filter\PlatformR |
1b400 | 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 5c 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 | equirementFilter\PlatformRequire |
1b420 | 6d 65 6e 74 46 69 6c 74 65 72 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 | mentFilterInterface;.use.Compose |
1b440 | 72 5c 49 4f 5c 49 4f 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 | r\IO\IOInterface;.use.Composer\I |
1b460 | 4f 5c 4e 75 6c 6c 49 4f 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 6c 75 67 69 6e 5c 50 72 | O\NullIO;.use.Composer\Plugin\Pr |
1b480 | 65 43 6f 6d 6d 61 6e 64 52 75 6e 45 76 65 6e 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 | eCommandRunEvent;.use.Composer\P |
1b4a0 | 61 63 6b 61 67 65 5c 56 65 72 73 69 6f 6e 5c 56 65 72 73 69 6f 6e 50 61 72 73 65 72 3b 0a 75 73 | ackage\Version\VersionParser;.us |
1b4c0 | 65 20 43 6f 6d 70 6f 73 65 72 5c 50 6c 75 67 69 6e 5c 50 6c 75 67 69 6e 45 76 65 6e 74 73 3b 0a | e.Composer\Plugin\PluginEvents;. |
1b4e0 | 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 41 64 76 69 73 6f 72 79 5c 41 75 64 69 74 6f 72 3b 0a 75 | use.Composer\Advisory\Auditor;.u |
1b500 | 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 6c 61 74 66 6f 72 6d 3b 0a 75 73 65 20 53 | se.Composer\Util\Platform;.use.S |
1b520 | 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 43 6f 6d 70 6c 65 74 | ymfony\Component\Console\Complet |
1b540 | 69 6f 6e 5c 43 6f 6d 70 6c 65 74 69 6f 6e 49 6e 70 75 74 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 | ion\CompletionInput;.use.Symfony |
1b560 | 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 43 6f 6d 70 6c 65 74 69 6f 6e 5c 43 6f | \Component\Console\Completion\Co |
1b580 | 6d 70 6c 65 74 69 6f 6e 53 75 67 67 65 73 74 69 6f 6e 73 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 | mpletionSuggestions;.use.Symfony |
1b5a0 | 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 48 65 6c 70 65 72 5c 54 61 62 6c 65 3b | \Component\Console\Helper\Table; |
1b5c0 | 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 48 | .use.Symfony\Component\Console\H |
1b5e0 | 65 6c 70 65 72 5c 54 61 62 6c 65 53 65 70 61 72 61 74 6f 72 3b 0a 75 73 65 20 53 79 6d 66 6f 6e | elper\TableSeparator;.use.Symfon |
1b600 | 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 49 | y\Component\Console\Input\InputI |
1b620 | 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c | nterface;.use.Symfony\Component\ |
1b640 | 43 6f 6e 73 6f 6c 65 5c 4f 75 74 70 75 74 5c 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a | Console\Output\OutputInterface;. |
1b660 | 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 43 6f | use.Symfony\Component\Console\Co |
1b680 | 6d 6d 61 6e 64 5c 43 6f 6d 6d 61 6e 64 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f | mmand\Command;.use.Symfony\Compo |
1b6a0 | 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 54 65 72 6d 69 6e 61 6c 3b 0a 0a 0a 0a 0a 0a 0a 0a 61 62 | nent\Console\Terminal;........ab |
1b6c0 | 73 74 72 61 63 74 20 63 6c 61 73 73 20 42 61 73 65 43 6f 6d 6d 61 6e 64 20 65 78 74 65 6e 64 73 | stract.class.BaseCommand.extends |
1b6e0 | 20 43 6f 6d 6d 61 6e 64 0a 7b 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 63 6f 6d 70 6f 73 65 72 3b | .Command.{....private.$composer; |
1b700 | 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 69 6f 3b 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e | .....private.$io;.....public.fun |
1b720 | 63 74 69 6f 6e 20 67 65 74 41 70 70 6c 69 63 61 74 69 6f 6e 28 29 3a 20 41 70 70 6c 69 63 61 74 | ction.getApplication():.Applicat |
1b740 | 69 6f 6e 0a 7b 0a 24 61 70 70 6c 69 63 61 74 69 6f 6e 20 3d 20 70 61 72 65 6e 74 3a 3a 67 65 74 | ion.{.$application.=.parent::get |
1b760 | 41 70 70 6c 69 63 61 74 69 6f 6e 28 29 3b 0a 69 66 20 28 21 24 61 70 70 6c 69 63 61 74 69 6f 6e | Application();.if.(!$application |
1b780 | 20 69 6e 73 74 61 6e 63 65 6f 66 20 41 70 70 6c 69 63 61 74 69 6f 6e 29 20 7b 0a 74 68 72 6f 77 | .instanceof.Application).{.throw |
1b7a0 | 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 43 6f 6d 70 6f 73 65 72 | .new.\RuntimeException('Composer |
1b7c0 | 20 63 6f 6d 6d 61 6e 64 73 20 63 61 6e 20 6f 6e 6c 79 20 77 6f 72 6b 20 77 69 74 68 20 61 6e 20 | .commands.can.only.work.with.an. |
1b7e0 | 27 2e 41 70 70 6c 69 63 61 74 69 6f 6e 3a 3a 63 6c 61 73 73 2e 27 20 69 6e 73 74 61 6e 63 65 20 | '.Application::class.'.instance. |
1b800 | 73 65 74 27 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 61 70 70 6c 69 63 61 74 69 6f 6e 3b 0a 7d | set');.}..return.$application;.} |
1b820 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 43 6f 6d | ..........public.function.getCom |
1b840 | 70 6f 73 65 72 28 62 6f 6f 6c 20 24 72 65 71 75 69 72 65 64 20 3d 20 74 72 75 65 2c 20 3f 62 6f | poser(bool.$required.=.true,.?bo |
1b860 | 6f 6c 20 24 64 69 73 61 62 6c 65 50 6c 75 67 69 6e 73 20 3d 20 6e 75 6c 6c 2c 20 3f 62 6f 6f 6c | ol.$disablePlugins.=.null,.?bool |
1b880 | 20 24 64 69 73 61 62 6c 65 53 63 72 69 70 74 73 20 3d 20 6e 75 6c 6c 29 0a 7b 0a 69 66 20 28 24 | .$disableScripts.=.null).{.if.($ |
1b8a0 | 72 65 71 75 69 72 65 64 29 20 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 72 65 71 75 69 72 | required).{.return.$this->requir |
1b8c0 | 65 43 6f 6d 70 6f 73 65 72 28 24 64 69 73 61 62 6c 65 50 6c 75 67 69 6e 73 2c 20 24 64 69 73 61 | eComposer($disablePlugins,.$disa |
1b8e0 | 62 6c 65 53 63 72 69 70 74 73 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 74 72 | bleScripts);.}..return.$this->tr |
1b900 | 79 43 6f 6d 70 6f 73 65 72 28 24 64 69 73 61 62 6c 65 50 6c 75 67 69 6e 73 2c 20 24 64 69 73 61 | yComposer($disablePlugins,.$disa |
1b920 | 62 6c 65 53 63 72 69 70 74 73 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 | bleScripts);.}...........public. |
1b940 | 66 75 6e 63 74 69 6f 6e 20 72 65 71 75 69 72 65 43 6f 6d 70 6f 73 65 72 28 3f 62 6f 6f 6c 20 24 | function.requireComposer(?bool.$ |
1b960 | 64 69 73 61 62 6c 65 50 6c 75 67 69 6e 73 20 3d 20 6e 75 6c 6c 2c 20 3f 62 6f 6f 6c 20 24 64 69 | disablePlugins.=.null,.?bool.$di |
1b980 | 73 61 62 6c 65 53 63 72 69 70 74 73 20 3d 20 6e 75 6c 6c 29 3a 20 43 6f 6d 70 6f 73 65 72 0a 7b | sableScripts.=.null):.Composer.{ |
1b9a0 | 0a 69 66 20 28 6e 75 6c 6c 20 3d 3d 3d 20 24 74 68 69 73 2d 3e 63 6f 6d 70 6f 73 65 72 29 20 7b | .if.(null.===.$this->composer).{ |
1b9c0 | 0a 24 61 70 70 6c 69 63 61 74 69 6f 6e 20 3d 20 70 61 72 65 6e 74 3a 3a 67 65 74 41 70 70 6c 69 | .$application.=.parent::getAppli |
1b9e0 | 63 61 74 69 6f 6e 28 29 3b 0a 69 66 20 28 24 61 70 70 6c 69 63 61 74 69 6f 6e 20 69 6e 73 74 61 | cation();.if.($application.insta |
1ba00 | 6e 63 65 6f 66 20 41 70 70 6c 69 63 61 74 69 6f 6e 29 20 7b 0a 24 74 68 69 73 2d 3e 63 6f 6d 70 | nceof.Application).{.$this->comp |
1ba20 | 6f 73 65 72 20 3d 20 24 61 70 70 6c 69 63 61 74 69 6f 6e 2d 3e 67 65 74 43 6f 6d 70 6f 73 65 72 | oser.=.$application->getComposer |
1ba40 | 28 74 72 75 65 2c 20 24 64 69 73 61 62 6c 65 50 6c 75 67 69 6e 73 2c 20 24 64 69 73 61 62 6c 65 | (true,.$disablePlugins,.$disable |
1ba60 | 53 63 72 69 70 74 73 29 3b 0a 61 73 73 65 72 74 28 24 74 68 69 73 2d 3e 63 6f 6d 70 6f 73 65 72 | Scripts);.assert($this->composer |
1ba80 | 20 69 6e 73 74 61 6e 63 65 6f 66 20 43 6f 6d 70 6f 73 65 72 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a | .instanceof.Composer);.}.else.{. |
1baa0 | 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 0a 27 43 6f | throw.new.\RuntimeException(.'Co |
1bac0 | 75 6c 64 20 6e 6f 74 20 63 72 65 61 74 65 20 61 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6d 70 6f 73 | uld.not.create.a.Composer\Compos |
1bae0 | 65 72 20 69 6e 73 74 61 6e 63 65 2c 20 79 6f 75 20 6d 75 73 74 20 69 6e 6a 65 63 74 20 27 2e 0a | er.instance,.you.must.inject.'.. |
1bb00 | 27 6f 6e 65 20 69 66 20 74 68 69 73 20 63 6f 6d 6d 61 6e 64 20 69 73 20 6e 6f 74 20 75 73 65 64 | 'one.if.this.command.is.not.used |
1bb20 | 20 77 69 74 68 20 61 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 73 6f 6c 65 5c 41 70 70 6c 69 63 61 | .with.a.Composer\Console\Applica |
1bb40 | 74 69 6f 6e 20 69 6e 73 74 61 6e 63 65 27 0a 29 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 74 | tion.instance'.);.}.}..return.$t |
1bb60 | 68 69 73 2d 3e 63 6f 6d 70 6f 73 65 72 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 | his->composer;.}..........public |
1bb80 | 20 66 75 6e 63 74 69 6f 6e 20 74 72 79 43 6f 6d 70 6f 73 65 72 28 3f 62 6f 6f 6c 20 24 64 69 73 | .function.tryComposer(?bool.$dis |
1bba0 | 61 62 6c 65 50 6c 75 67 69 6e 73 20 3d 20 6e 75 6c 6c 2c 20 3f 62 6f 6f 6c 20 24 64 69 73 61 62 | ablePlugins.=.null,.?bool.$disab |
1bbc0 | 6c 65 53 63 72 69 70 74 73 20 3d 20 6e 75 6c 6c 29 3a 20 3f 43 6f 6d 70 6f 73 65 72 0a 7b 0a 69 | leScripts.=.null):.?Composer.{.i |
1bbe0 | 66 20 28 6e 75 6c 6c 20 3d 3d 3d 20 24 74 68 69 73 2d 3e 63 6f 6d 70 6f 73 65 72 29 20 7b 0a 24 | f.(null.===.$this->composer).{.$ |
1bc00 | 61 70 70 6c 69 63 61 74 69 6f 6e 20 3d 20 70 61 72 65 6e 74 3a 3a 67 65 74 41 70 70 6c 69 63 61 | application.=.parent::getApplica |
1bc20 | 74 69 6f 6e 28 29 3b 0a 69 66 20 28 24 61 70 70 6c 69 63 61 74 69 6f 6e 20 69 6e 73 74 61 6e 63 | tion();.if.($application.instanc |
1bc40 | 65 6f 66 20 41 70 70 6c 69 63 61 74 69 6f 6e 29 20 7b 0a 24 74 68 69 73 2d 3e 63 6f 6d 70 6f 73 | eof.Application).{.$this->compos |
1bc60 | 65 72 20 3d 20 24 61 70 70 6c 69 63 61 74 69 6f 6e 2d 3e 67 65 74 43 6f 6d 70 6f 73 65 72 28 66 | er.=.$application->getComposer(f |
1bc80 | 61 6c 73 65 2c 20 24 64 69 73 61 62 6c 65 50 6c 75 67 69 6e 73 2c 20 24 64 69 73 61 62 6c 65 53 | alse,.$disablePlugins,.$disableS |
1bca0 | 63 72 69 70 74 73 29 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 63 6f 6d 70 | cripts);.}.}..return.$this->comp |
1bcc0 | 6f 73 65 72 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 43 | oser;.}.....public.function.setC |
1bce0 | 6f 6d 70 6f 73 65 72 28 43 6f 6d 70 6f 73 65 72 20 24 63 6f 6d 70 6f 73 65 72 29 0a 7b 0a 24 74 | omposer(Composer.$composer).{.$t |
1bd00 | 68 69 73 2d 3e 63 6f 6d 70 6f 73 65 72 20 3d 20 24 63 6f 6d 70 6f 73 65 72 3b 0a 7d 0a 0a 0a 0a | his->composer.=.$composer;.}.... |
1bd20 | 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 72 65 73 65 74 43 6f 6d 70 6f 73 65 72 | ...public.function.resetComposer |
1bd40 | 28 29 0a 7b 0a 24 74 68 69 73 2d 3e 63 6f 6d 70 6f 73 65 72 20 3d 20 6e 75 6c 6c 3b 0a 24 74 68 | ().{.$this->composer.=.null;.$th |
1bd60 | 69 73 2d 3e 67 65 74 41 70 70 6c 69 63 61 74 69 6f 6e 28 29 2d 3e 72 65 73 65 74 43 6f 6d 70 6f | is->getApplication()->resetCompo |
1bd80 | 73 65 72 28 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e | ser();.}.........public.function |
1bda0 | 20 69 73 50 72 6f 78 79 43 6f 6d 6d 61 6e 64 28 29 0a 7b 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 | .isProxyCommand().{.return.false |
1bdc0 | 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 49 4f 28 29 0a | ;.}.....public.function.getIO(). |
1bde0 | 7b 0a 69 66 20 28 6e 75 6c 6c 20 3d 3d 3d 20 24 74 68 69 73 2d 3e 69 6f 29 20 7b 0a 24 61 70 70 | {.if.(null.===.$this->io).{.$app |
1be00 | 6c 69 63 61 74 69 6f 6e 20 3d 20 70 61 72 65 6e 74 3a 3a 67 65 74 41 70 70 6c 69 63 61 74 69 6f | lication.=.parent::getApplicatio |
1be20 | 6e 28 29 3b 0a 69 66 20 28 24 61 70 70 6c 69 63 61 74 69 6f 6e 20 69 6e 73 74 61 6e 63 65 6f 66 | n();.if.($application.instanceof |
1be40 | 20 41 70 70 6c 69 63 61 74 69 6f 6e 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 20 3d 20 24 61 70 70 | .Application).{.$this->io.=.$app |
1be60 | 6c 69 63 61 74 69 6f 6e 2d 3e 67 65 74 49 4f 28 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 74 68 69 | lication->getIO();.}.else.{.$thi |
1be80 | 73 2d 3e 69 6f 20 3d 20 6e 65 77 20 4e 75 6c 6c 49 4f 28 29 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 | s->io.=.new.NullIO();.}.}..retur |
1bea0 | 6e 20 24 74 68 69 73 2d 3e 69 6f 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 | n.$this->io;.}.....public.functi |
1bec0 | 6f 6e 20 73 65 74 49 4f 28 49 4f 49 6e 74 65 72 66 61 63 65 20 24 69 6f 29 0a 7b 0a 24 74 68 69 | on.setIO(IOInterface.$io).{.$thi |
1bee0 | 73 2d 3e 69 6f 20 3d 20 24 69 6f 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 | s->io.=.$io;.}.........public.fu |
1bf00 | 6e 63 74 69 6f 6e 20 63 6f 6d 70 6c 65 74 65 28 43 6f 6d 70 6c 65 74 69 6f 6e 49 6e 70 75 74 20 | nction.complete(CompletionInput. |
1bf20 | 24 69 6e 70 75 74 2c 20 43 6f 6d 70 6c 65 74 69 6f 6e 53 75 67 67 65 73 74 69 6f 6e 73 20 24 73 | $input,.CompletionSuggestions.$s |
1bf40 | 75 67 67 65 73 74 69 6f 6e 73 29 3a 20 76 6f 69 64 0a 7b 0a 24 64 65 66 69 6e 69 74 69 6f 6e 20 | uggestions):.void.{.$definition. |
1bf60 | 3d 20 24 74 68 69 73 2d 3e 67 65 74 44 65 66 69 6e 69 74 69 6f 6e 28 29 3b 0a 24 6e 61 6d 65 20 | =.$this->getDefinition();.$name. |
1bf80 | 3d 20 28 73 74 72 69 6e 67 29 20 24 69 6e 70 75 74 2d 3e 67 65 74 43 6f 6d 70 6c 65 74 69 6f 6e | =.(string).$input->getCompletion |
1bfa0 | 4e 61 6d 65 28 29 3b 0a 69 66 20 28 43 6f 6d 70 6c 65 74 69 6f 6e 49 6e 70 75 74 3a 3a 54 59 50 | Name();.if.(CompletionInput::TYP |
1bfc0 | 45 5f 4f 50 54 49 4f 4e 5f 56 41 4c 55 45 20 3d 3d 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 43 6f | E_OPTION_VALUE.===.$input->getCo |
1bfe0 | 6d 70 6c 65 74 69 6f 6e 54 79 70 65 28 29 0a 26 26 20 24 64 65 66 69 6e 69 74 69 6f 6e 2d 3e 68 | mpletionType().&&.$definition->h |
1c000 | 61 73 4f 70 74 69 6f 6e 28 24 6e 61 6d 65 29 0a 26 26 20 28 24 6f 70 74 69 6f 6e 20 3d 20 24 64 | asOption($name).&&.($option.=.$d |
1c020 | 65 66 69 6e 69 74 69 6f 6e 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 24 6e 61 6d 65 29 29 20 69 6e 73 | efinition->getOption($name)).ins |
1c040 | 74 61 6e 63 65 6f 66 20 49 6e 70 75 74 4f 70 74 69 6f 6e 0a 29 20 7b 0a 24 6f 70 74 69 6f 6e 2d | tanceof.InputOption.).{.$option- |
1c060 | 3e 63 6f 6d 70 6c 65 74 65 28 24 69 6e 70 75 74 2c 20 24 73 75 67 67 65 73 74 69 6f 6e 73 29 3b | >complete($input,.$suggestions); |
1c080 | 0a 7d 20 65 6c 73 65 69 66 20 28 43 6f 6d 70 6c 65 74 69 6f 6e 49 6e 70 75 74 3a 3a 54 59 50 45 | .}.elseif.(CompletionInput::TYPE |
1c0a0 | 5f 41 52 47 55 4d 45 4e 54 5f 56 41 4c 55 45 20 3d 3d 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 43 | _ARGUMENT_VALUE.===.$input->getC |
1c0c0 | 6f 6d 70 6c 65 74 69 6f 6e 54 79 70 65 28 29 0a 26 26 20 24 64 65 66 69 6e 69 74 69 6f 6e 2d 3e | ompletionType().&&.$definition-> |
1c0e0 | 68 61 73 41 72 67 75 6d 65 6e 74 28 24 6e 61 6d 65 29 0a 26 26 20 28 24 61 72 67 75 6d 65 6e 74 | hasArgument($name).&&.($argument |
1c100 | 20 3d 20 24 64 65 66 69 6e 69 74 69 6f 6e 2d 3e 67 65 74 41 72 67 75 6d 65 6e 74 28 24 6e 61 6d | .=.$definition->getArgument($nam |
1c120 | 65 29 29 20 69 6e 73 74 61 6e 63 65 6f 66 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 0a 29 20 7b | e)).instanceof.InputArgument.).{ |
1c140 | 0a 24 61 72 67 75 6d 65 6e 74 2d 3e 63 6f 6d 70 6c 65 74 65 28 24 69 6e 70 75 74 2c 20 24 73 75 | .$argument->complete($input,.$su |
1c160 | 67 67 65 73 74 69 6f 6e 73 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 70 61 72 65 6e 74 3a 3a 63 6f 6d | ggestions);.}.else.{.parent::com |
1c180 | 70 6c 65 74 65 28 24 69 6e 70 75 74 2c 20 24 73 75 67 67 65 73 74 69 6f 6e 73 29 3b 0a 7d 0a 7d | plete($input,.$suggestions);.}.} |
1c1a0 | 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 69 6e 69 74 69 61 | .......protected.function.initia |
1c1c0 | 6c 69 7a 65 28 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 69 6e 70 75 74 2c 20 4f 75 74 70 | lize(InputInterface.$input,.Outp |
1c1e0 | 75 74 49 6e 74 65 72 66 61 63 65 20 24 6f 75 74 70 75 74 29 0a 7b 0a 0a 24 64 69 73 61 62 6c 65 | utInterface.$output).{..$disable |
1c200 | 50 6c 75 67 69 6e 73 20 3d 20 24 69 6e 70 75 74 2d 3e 68 61 73 50 61 72 61 6d 65 74 65 72 4f 70 | Plugins.=.$input->hasParameterOp |
1c220 | 74 69 6f 6e 28 27 2d 2d 6e 6f 2d 70 6c 75 67 69 6e 73 27 29 3b 0a 24 64 69 73 61 62 6c 65 53 63 | tion('--no-plugins');.$disableSc |
1c240 | 72 69 70 74 73 20 3d 20 24 69 6e 70 75 74 2d 3e 68 61 73 50 61 72 61 6d 65 74 65 72 4f 70 74 69 | ripts.=.$input->hasParameterOpti |
1c260 | 6f 6e 28 27 2d 2d 6e 6f 2d 73 63 72 69 70 74 73 27 29 3b 0a 69 66 20 28 24 74 68 69 73 20 69 6e | on('--no-scripts');.if.($this.in |
1c280 | 73 74 61 6e 63 65 6f 66 20 53 65 6c 66 55 70 64 61 74 65 43 6f 6d 6d 61 6e 64 29 20 7b 0a 24 64 | stanceof.SelfUpdateCommand).{.$d |
1c2a0 | 69 73 61 62 6c 65 50 6c 75 67 69 6e 73 20 3d 20 74 72 75 65 3b 0a 24 64 69 73 61 62 6c 65 53 63 | isablePlugins.=.true;.$disableSc |
1c2c0 | 72 69 70 74 73 20 3d 20 74 72 75 65 3b 0a 7d 0a 0a 24 63 6f 6d 70 6f 73 65 72 20 3d 20 24 74 68 | ripts.=.true;.}..$composer.=.$th |
1c2e0 | 69 73 2d 3e 74 72 79 43 6f 6d 70 6f 73 65 72 28 24 64 69 73 61 62 6c 65 50 6c 75 67 69 6e 73 2c | is->tryComposer($disablePlugins, |
1c300 | 20 24 64 69 73 61 62 6c 65 53 63 72 69 70 74 73 29 3b 0a 24 69 6f 20 3d 20 24 74 68 69 73 2d 3e | .$disableScripts);.$io.=.$this-> |
1c320 | 67 65 74 49 4f 28 29 3b 0a 0a 69 66 20 28 6e 75 6c 6c 20 3d 3d 3d 20 24 63 6f 6d 70 6f 73 65 72 | getIO();..if.(null.===.$composer |
1c340 | 29 20 7b 0a 24 63 6f 6d 70 6f 73 65 72 20 3d 20 46 61 63 74 6f 72 79 3a 3a 63 72 65 61 74 65 47 | ).{.$composer.=.Factory::createG |
1c360 | 6c 6f 62 61 6c 28 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 2c 20 24 64 69 73 61 62 6c 65 50 6c | lobal($this->getIO(),.$disablePl |
1c380 | 75 67 69 6e 73 2c 20 24 64 69 73 61 62 6c 65 53 63 72 69 70 74 73 29 3b 0a 7d 0a 69 66 20 28 24 | ugins,.$disableScripts);.}.if.($ |
1c3a0 | 63 6f 6d 70 6f 73 65 72 29 20 7b 0a 24 70 72 65 43 6f 6d 6d 61 6e 64 52 75 6e 45 76 65 6e 74 20 | composer).{.$preCommandRunEvent. |
1c3c0 | 3d 20 6e 65 77 20 50 72 65 43 6f 6d 6d 61 6e 64 52 75 6e 45 76 65 6e 74 28 50 6c 75 67 69 6e 45 | =.new.PreCommandRunEvent(PluginE |
1c3e0 | 76 65 6e 74 73 3a 3a 50 52 45 5f 43 4f 4d 4d 41 4e 44 5f 52 55 4e 2c 20 24 69 6e 70 75 74 2c 20 | vents::PRE_COMMAND_RUN,.$input,. |
1c400 | 24 74 68 69 73 2d 3e 67 65 74 4e 61 6d 65 28 29 29 3b 0a 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 | $this->getName());.$composer->ge |
1c420 | 74 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 28 29 2d 3e 64 69 73 70 61 74 63 68 28 24 70 72 | tEventDispatcher()->dispatch($pr |
1c440 | 65 43 6f 6d 6d 61 6e 64 52 75 6e 45 76 65 6e 74 2d 3e 67 65 74 4e 61 6d 65 28 29 2c 20 24 70 72 | eCommandRunEvent->getName(),.$pr |
1c460 | 65 43 6f 6d 6d 61 6e 64 52 75 6e 45 76 65 6e 74 29 3b 0a 7d 0a 0a 69 66 20 28 74 72 75 65 20 3d | eCommandRunEvent);.}..if.(true.= |
1c480 | 3d 3d 20 24 69 6e 70 75 74 2d 3e 68 61 73 50 61 72 61 6d 65 74 65 72 4f 70 74 69 6f 6e 28 5b 27 | ==.$input->hasParameterOption([' |
1c4a0 | 2d 2d 6e 6f 2d 61 6e 73 69 27 5d 29 20 26 26 20 24 69 6e 70 75 74 2d 3e 68 61 73 4f 70 74 69 6f | --no-ansi']).&&.$input->hasOptio |
1c4c0 | 6e 28 27 6e 6f 2d 70 72 6f 67 72 65 73 73 27 29 29 20 7b 0a 24 69 6e 70 75 74 2d 3e 73 65 74 4f | n('no-progress')).{.$input->setO |
1c4e0 | 70 74 69 6f 6e 28 27 6e 6f 2d 70 72 6f 67 72 65 73 73 27 2c 20 74 72 75 65 29 3b 0a 7d 0a 0a 24 | ption('no-progress',.true);.}..$ |
1c500 | 65 6e 76 4f 70 74 69 6f 6e 73 20 3d 20 5b 0a 27 43 4f 4d 50 4f 53 45 52 5f 4e 4f 5f 41 55 44 49 | envOptions.=.[.'COMPOSER_NO_AUDI |
1c520 | 54 27 20 3d 3e 20 5b 27 6e 6f 2d 61 75 64 69 74 27 5d 2c 0a 27 43 4f 4d 50 4f 53 45 52 5f 4e 4f | T'.=>.['no-audit'],.'COMPOSER_NO |
1c540 | 5f 44 45 56 27 20 3d 3e 20 5b 27 6e 6f 2d 64 65 76 27 2c 20 27 75 70 64 61 74 65 2d 6e 6f 2d 64 | _DEV'.=>.['no-dev',.'update-no-d |
1c560 | 65 76 27 5d 2c 0a 27 43 4f 4d 50 4f 53 45 52 5f 50 52 45 46 45 52 5f 53 54 41 42 4c 45 27 20 3d | ev'],.'COMPOSER_PREFER_STABLE'.= |
1c580 | 3e 20 5b 27 70 72 65 66 65 72 2d 73 74 61 62 6c 65 27 5d 2c 0a 27 43 4f 4d 50 4f 53 45 52 5f 50 | >.['prefer-stable'],.'COMPOSER_P |
1c5a0 | 52 45 46 45 52 5f 4c 4f 57 45 53 54 27 20 3d 3e 20 5b 27 70 72 65 66 65 72 2d 6c 6f 77 65 73 74 | REFER_LOWEST'.=>.['prefer-lowest |
1c5c0 | 27 5d 2c 0a 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 65 6e 76 4f 70 74 69 6f 6e 73 20 61 73 20 24 | '],.];.foreach.($envOptions.as.$ |
1c5e0 | 65 6e 76 4e 61 6d 65 20 3d 3e 20 24 6f 70 74 69 6f 6e 4e 61 6d 65 73 29 20 7b 0a 66 6f 72 65 61 | envName.=>.$optionNames).{.forea |
1c600 | 63 68 20 28 24 6f 70 74 69 6f 6e 4e 61 6d 65 73 20 61 73 20 24 6f 70 74 69 6f 6e 4e 61 6d 65 29 | ch.($optionNames.as.$optionName) |
1c620 | 20 7b 0a 69 66 20 28 74 72 75 65 20 3d 3d 3d 20 24 69 6e 70 75 74 2d 3e 68 61 73 4f 70 74 69 6f | .{.if.(true.===.$input->hasOptio |
1c640 | 6e 28 24 6f 70 74 69 6f 6e 4e 61 6d 65 29 29 20 7b 0a 69 66 20 28 66 61 6c 73 65 20 3d 3d 3d 20 | n($optionName)).{.if.(false.===. |
1c660 | 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 24 6f 70 74 69 6f 6e 4e 61 6d 65 29 20 26 | $input->getOption($optionName).& |
1c680 | 26 20 28 62 6f 6f 6c 29 20 50 6c 61 74 66 6f 72 6d 3a 3a 67 65 74 45 6e 76 28 24 65 6e 76 4e 61 | &.(bool).Platform::getEnv($envNa |
1c6a0 | 6d 65 29 29 20 7b 0a 24 69 6e 70 75 74 2d 3e 73 65 74 4f 70 74 69 6f 6e 28 24 6f 70 74 69 6f 6e | me)).{.$input->setOption($option |
1c6c0 | 4e 61 6d 65 2c 20 74 72 75 65 29 3b 0a 7d 0a 7d 0a 7d 0a 7d 0a 0a 69 66 20 28 74 72 75 65 20 3d | Name,.true);.}.}.}.}..if.(true.= |
1c6e0 | 3d 3d 20 24 69 6e 70 75 74 2d 3e 68 61 73 4f 70 74 69 6f 6e 28 27 69 67 6e 6f 72 65 2d 70 6c 61 | ==.$input->hasOption('ignore-pla |
1c700 | 74 66 6f 72 6d 2d 72 65 71 73 27 29 29 20 7b 0a 69 66 20 28 21 24 69 6e 70 75 74 2d 3e 67 65 74 | tform-reqs')).{.if.(!$input->get |
1c720 | 4f 70 74 69 6f 6e 28 27 69 67 6e 6f 72 65 2d 70 6c 61 74 66 6f 72 6d 2d 72 65 71 73 27 29 20 26 | Option('ignore-platform-reqs').& |
1c740 | 26 20 28 62 6f 6f 6c 29 20 50 6c 61 74 66 6f 72 6d 3a 3a 67 65 74 45 6e 76 28 27 43 4f 4d 50 4f | &.(bool).Platform::getEnv('COMPO |
1c760 | 53 45 52 5f 49 47 4e 4f 52 45 5f 50 4c 41 54 46 4f 52 4d 5f 52 45 51 53 27 29 29 20 7b 0a 24 69 | SER_IGNORE_PLATFORM_REQS')).{.$i |
1c780 | 6e 70 75 74 2d 3e 73 65 74 4f 70 74 69 6f 6e 28 27 69 67 6e 6f 72 65 2d 70 6c 61 74 66 6f 72 6d | nput->setOption('ignore-platform |
1c7a0 | 2d 72 65 71 73 27 2c 20 74 72 75 65 29 3b 0a 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 | -reqs',.true);..$io->writeError( |
1c7c0 | 27 3c 77 61 72 6e 69 6e 67 3e 43 4f 4d 50 4f 53 45 52 5f 49 47 4e 4f 52 45 5f 50 4c 41 54 46 4f | '<warning>COMPOSER_IGNORE_PLATFO |
1c7e0 | 52 4d 5f 52 45 51 53 20 69 73 20 73 65 74 2e 20 59 6f 75 20 6d 61 79 20 65 78 70 65 72 69 65 6e | RM_REQS.is.set..You.may.experien |
1c800 | 63 65 20 75 6e 65 78 70 65 63 74 65 64 20 65 72 72 6f 72 73 2e 3c 2f 77 61 72 6e 69 6e 67 3e 27 | ce.unexpected.errors.</warning>' |
1c820 | 29 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 74 72 75 65 20 3d 3d 3d 20 24 69 6e 70 75 74 2d 3e 68 61 73 | );.}.}..if.(true.===.$input->has |
1c840 | 4f 70 74 69 6f 6e 28 27 69 67 6e 6f 72 65 2d 70 6c 61 74 66 6f 72 6d 2d 72 65 71 27 29 20 26 26 | Option('ignore-platform-req').&& |
1c860 | 20 28 21 24 69 6e 70 75 74 2d 3e 68 61 73 4f 70 74 69 6f 6e 28 27 69 67 6e 6f 72 65 2d 70 6c 61 | .(!$input->hasOption('ignore-pla |
1c880 | 74 66 6f 72 6d 2d 72 65 71 73 27 29 20 7c 7c 20 21 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 | tform-reqs').||.!$input->getOpti |
1c8a0 | 6f 6e 28 27 69 67 6e 6f 72 65 2d 70 6c 61 74 66 6f 72 6d 2d 72 65 71 73 27 29 29 29 20 7b 0a 24 | on('ignore-platform-reqs'))).{.$ |
1c8c0 | 69 67 6e 6f 72 65 50 6c 61 74 66 6f 72 6d 52 65 71 45 6e 76 20 3d 20 50 6c 61 74 66 6f 72 6d 3a | ignorePlatformReqEnv.=.Platform: |
1c8e0 | 3a 67 65 74 45 6e 76 28 27 43 4f 4d 50 4f 53 45 52 5f 49 47 4e 4f 52 45 5f 50 4c 41 54 46 4f 52 | :getEnv('COMPOSER_IGNORE_PLATFOR |
1c900 | 4d 5f 52 45 51 27 29 3b 0a 69 66 20 28 30 20 3d 3d 3d 20 63 6f 75 6e 74 28 24 69 6e 70 75 74 2d | M_REQ');.if.(0.===.count($input- |
1c920 | 3e 67 65 74 4f 70 74 69 6f 6e 28 27 69 67 6e 6f 72 65 2d 70 6c 61 74 66 6f 72 6d 2d 72 65 71 27 | >getOption('ignore-platform-req' |
1c940 | 29 29 20 26 26 20 69 73 5f 73 74 72 69 6e 67 28 24 69 67 6e 6f 72 65 50 6c 61 74 66 6f 72 6d 52 | )).&&.is_string($ignorePlatformR |
1c960 | 65 71 45 6e 76 29 20 26 26 20 27 27 20 21 3d 3d 20 24 69 67 6e 6f 72 65 50 6c 61 74 66 6f 72 6d | eqEnv).&&.''.!==.$ignorePlatform |
1c980 | 52 65 71 45 6e 76 29 20 7b 0a 24 69 6e 70 75 74 2d 3e 73 65 74 4f 70 74 69 6f 6e 28 27 69 67 6e | ReqEnv).{.$input->setOption('ign |
1c9a0 | 6f 72 65 2d 70 6c 61 74 66 6f 72 6d 2d 72 65 71 27 2c 20 65 78 70 6c 6f 64 65 28 27 2c 27 2c 20 | ore-platform-req',.explode(',',. |
1c9c0 | 24 69 67 6e 6f 72 65 50 6c 61 74 66 6f 72 6d 52 65 71 45 6e 76 29 29 3b 0a 0a 24 69 6f 2d 3e 77 | $ignorePlatformReqEnv));..$io->w |
1c9e0 | 72 69 74 65 45 72 72 6f 72 28 27 3c 77 61 72 6e 69 6e 67 3e 43 4f 4d 50 4f 53 45 52 5f 49 47 4e | riteError('<warning>COMPOSER_IGN |
1ca00 | 4f 52 45 5f 50 4c 41 54 46 4f 52 4d 5f 52 45 51 20 69 73 20 73 65 74 20 74 6f 20 69 67 6e 6f 72 | ORE_PLATFORM_REQ.is.set.to.ignor |
1ca20 | 65 20 27 2e 24 69 67 6e 6f 72 65 50 6c 61 74 66 6f 72 6d 52 65 71 45 6e 76 2e 27 2e 20 59 6f 75 | e.'.$ignorePlatformReqEnv.'..You |
1ca40 | 20 6d 61 79 20 65 78 70 65 72 69 65 6e 63 65 20 75 6e 65 78 70 65 63 74 65 64 20 65 72 72 6f 72 | .may.experience.unexpected.error |
1ca60 | 73 2e 3c 2f 77 61 72 6e 69 6e 67 3e 27 29 3b 0a 7d 0a 7d 0a 0a 70 61 72 65 6e 74 3a 3a 69 6e 69 | s.</warning>');.}.}..parent::ini |
1ca80 | 74 69 61 6c 69 7a 65 28 24 69 6e 70 75 74 2c 20 24 6f 75 74 70 75 74 29 3b 0a 7d 0a 0a 0a 0a 0a | tialize($input,.$output);.}..... |
1caa0 | 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 50 72 65 66 65 72 72 | ...protected.function.getPreferr |
1cac0 | 65 64 49 6e 73 74 61 6c 6c 4f 70 74 69 6f 6e 73 28 43 6f 6e 66 69 67 20 24 63 6f 6e 66 69 67 2c | edInstallOptions(Config.$config, |
1cae0 | 20 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 69 6e 70 75 74 2c 20 62 6f 6f 6c 20 24 6b 65 | .InputInterface.$input,.bool.$ke |
1cb00 | 65 70 56 63 73 52 65 71 75 69 72 65 73 50 72 65 66 65 72 53 6f 75 72 63 65 20 3d 20 66 61 6c 73 | epVcsRequiresPreferSource.=.fals |
1cb20 | 65 29 0a 7b 0a 24 70 72 65 66 65 72 53 6f 75 72 63 65 20 3d 20 66 61 6c 73 65 3b 0a 24 70 72 65 | e).{.$preferSource.=.false;.$pre |
1cb40 | 66 65 72 44 69 73 74 20 3d 20 66 61 6c 73 65 3b 0a 0a 73 77 69 74 63 68 20 28 24 63 6f 6e 66 69 | ferDist.=.false;..switch.($confi |
1cb60 | 67 2d 3e 67 65 74 28 27 70 72 65 66 65 72 72 65 64 2d 69 6e 73 74 61 6c 6c 27 29 29 20 7b 0a 63 | g->get('preferred-install')).{.c |
1cb80 | 61 73 65 20 27 73 6f 75 72 63 65 27 3a 0a 24 70 72 65 66 65 72 53 6f 75 72 63 65 20 3d 20 74 72 | ase.'source':.$preferSource.=.tr |
1cba0 | 75 65 3b 0a 62 72 65 61 6b 3b 0a 63 61 73 65 20 27 64 69 73 74 27 3a 0a 24 70 72 65 66 65 72 44 | ue;.break;.case.'dist':.$preferD |
1cbc0 | 69 73 74 20 3d 20 74 72 75 65 3b 0a 62 72 65 61 6b 3b 0a 63 61 73 65 20 27 61 75 74 6f 27 3a 0a | ist.=.true;.break;.case.'auto':. |
1cbe0 | 64 65 66 61 75 6c 74 3a 0a 0a 62 72 65 61 6b 3b 0a 7d 0a 0a 69 66 20 28 21 24 69 6e 70 75 74 2d | default:..break;.}..if.(!$input- |
1cc00 | 3e 68 61 73 4f 70 74 69 6f 6e 28 27 70 72 65 66 65 72 2d 64 69 73 74 27 29 20 7c 7c 20 21 24 69 | >hasOption('prefer-dist').||.!$i |
1cc20 | 6e 70 75 74 2d 3e 68 61 73 4f 70 74 69 6f 6e 28 27 70 72 65 66 65 72 2d 73 6f 75 72 63 65 27 29 | nput->hasOption('prefer-source') |
1cc40 | 29 20 7b 0a 72 65 74 75 72 6e 20 5b 24 70 72 65 66 65 72 53 6f 75 72 63 65 2c 20 24 70 72 65 66 | ).{.return.[$preferSource,.$pref |
1cc60 | 65 72 44 69 73 74 5d 3b 0a 7d 0a 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 68 61 73 4f 70 74 69 6f | erDist];.}..if.($input->hasOptio |
1cc80 | 6e 28 27 70 72 65 66 65 72 2d 69 6e 73 74 61 6c 6c 27 29 20 26 26 20 69 73 5f 73 74 72 69 6e 67 | n('prefer-install').&&.is_string |
1cca0 | 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 70 72 65 66 65 72 2d 69 6e 73 74 61 | ($input->getOption('prefer-insta |
1ccc0 | 6c 6c 27 29 29 29 20 7b 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 | ll'))).{.if.($input->getOption(' |
1cce0 | 70 72 65 66 65 72 2d 73 6f 75 72 63 65 27 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e | prefer-source')).{.throw.new.\In |
1cd00 | 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 27 2d 2d 70 72 65 66 65 72 | validArgumentException('--prefer |
1cd20 | 2d 73 6f 75 72 63 65 20 63 61 6e 20 6e 6f 74 20 62 65 20 75 73 65 64 20 74 6f 67 65 74 68 65 72 | -source.can.not.be.used.together |
1cd40 | 20 77 69 74 68 20 2d 2d 70 72 65 66 65 72 2d 69 6e 73 74 61 6c 6c 27 29 3b 0a 7d 0a 69 66 20 28 | .with.--prefer-install');.}.if.( |
1cd60 | 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 70 72 65 66 65 72 2d 64 69 73 74 27 29 | $input->getOption('prefer-dist') |
1cd80 | 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 | ).{.throw.new.\InvalidArgumentEx |
1cda0 | 63 65 70 74 69 6f 6e 28 27 2d 2d 70 72 65 66 65 72 2d 64 69 73 74 20 63 61 6e 20 6e 6f 74 20 62 | ception('--prefer-dist.can.not.b |
1cdc0 | 65 20 75 73 65 64 20 74 6f 67 65 74 68 65 72 20 77 69 74 68 20 2d 2d 70 72 65 66 65 72 2d 69 6e | e.used.together.with.--prefer-in |
1cde0 | 73 74 61 6c 6c 27 29 3b 0a 7d 0a 73 77 69 74 63 68 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 | stall');.}.switch.($input->getOp |
1ce00 | 74 69 6f 6e 28 27 70 72 65 66 65 72 2d 69 6e 73 74 61 6c 6c 27 29 29 20 7b 0a 63 61 73 65 20 27 | tion('prefer-install')).{.case.' |
1ce20 | 64 69 73 74 27 3a 0a 24 69 6e 70 75 74 2d 3e 73 65 74 4f 70 74 69 6f 6e 28 27 70 72 65 66 65 72 | dist':.$input->setOption('prefer |
1ce40 | 2d 64 69 73 74 27 2c 20 74 72 75 65 29 3b 0a 62 72 65 61 6b 3b 0a 63 61 73 65 20 27 73 6f 75 72 | -dist',.true);.break;.case.'sour |
1ce60 | 63 65 27 3a 0a 24 69 6e 70 75 74 2d 3e 73 65 74 4f 70 74 69 6f 6e 28 27 70 72 65 66 65 72 2d 73 | ce':.$input->setOption('prefer-s |
1ce80 | 6f 75 72 63 65 27 2c 20 74 72 75 65 29 3b 0a 62 72 65 61 6b 3b 0a 63 61 73 65 20 27 61 75 74 6f | ource',.true);.break;.case.'auto |
1cea0 | 27 3a 0a 24 70 72 65 66 65 72 44 69 73 74 20 3d 20 66 61 6c 73 65 3b 0a 24 70 72 65 66 65 72 53 | ':.$preferDist.=.false;.$preferS |
1cec0 | 6f 75 72 63 65 20 3d 20 66 61 6c 73 65 3b 0a 62 72 65 61 6b 3b 0a 64 65 66 61 75 6c 74 3a 0a 74 | ource.=.false;.break;.default:.t |
1cee0 | 68 72 6f 77 20 6e 65 77 20 5c 55 6e 65 78 70 65 63 74 65 64 56 61 6c 75 65 45 78 63 65 70 74 69 | hrow.new.\UnexpectedValueExcepti |
1cf00 | 6f 6e 28 27 2d 2d 70 72 65 66 65 72 2d 69 6e 73 74 61 6c 6c 20 61 63 63 65 70 74 73 20 6f 6e 65 | on('--prefer-install.accepts.one |
1cf20 | 20 6f 66 20 22 64 69 73 74 22 2c 20 22 73 6f 75 72 63 65 22 20 6f 72 20 22 61 75 74 6f 22 2c 20 | .of."dist",."source".or."auto",. |
1cf40 | 67 6f 74 20 27 2e 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 70 72 65 66 65 72 2d | got.'.$input->getOption('prefer- |
1cf60 | 69 6e 73 74 61 6c 6c 27 29 29 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 | install'));.}.}..if.($input->get |
1cf80 | 4f 70 74 69 6f 6e 28 27 70 72 65 66 65 72 2d 73 6f 75 72 63 65 27 29 20 7c 7c 20 24 69 6e 70 75 | Option('prefer-source').||.$inpu |
1cfa0 | 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 70 72 65 66 65 72 2d 64 69 73 74 27 29 20 7c 7c 20 28 | t->getOption('prefer-dist').||.( |
1cfc0 | 24 6b 65 65 70 56 63 73 52 65 71 75 69 72 65 73 50 72 65 66 65 72 53 6f 75 72 63 65 20 26 26 20 | $keepVcsRequiresPreferSource.&&. |
1cfe0 | 24 69 6e 70 75 74 2d 3e 68 61 73 4f 70 74 69 6f 6e 28 27 6b 65 65 70 2d 76 63 73 27 29 20 26 26 | $input->hasOption('keep-vcs').&& |
1d000 | 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6b 65 65 70 2d 76 63 73 27 29 29 29 | .$input->getOption('keep-vcs'))) |
1d020 | 20 7b 0a 24 70 72 65 66 65 72 53 6f 75 72 63 65 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 | .{.$preferSource.=.$input->getOp |
1d040 | 74 69 6f 6e 28 27 70 72 65 66 65 72 2d 73 6f 75 72 63 65 27 29 20 7c 7c 20 28 24 6b 65 65 70 56 | tion('prefer-source').||.($keepV |
1d060 | 63 73 52 65 71 75 69 72 65 73 50 72 65 66 65 72 53 6f 75 72 63 65 20 26 26 20 24 69 6e 70 75 74 | csRequiresPreferSource.&&.$input |
1d080 | 2d 3e 68 61 73 4f 70 74 69 6f 6e 28 27 6b 65 65 70 2d 76 63 73 27 29 20 26 26 20 24 69 6e 70 75 | ->hasOption('keep-vcs').&&.$inpu |
1d0a0 | 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6b 65 65 70 2d 76 63 73 27 29 29 3b 0a 24 70 72 65 66 | t->getOption('keep-vcs'));.$pref |
1d0c0 | 65 72 44 69 73 74 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 70 72 65 66 | erDist.=.$input->getOption('pref |
1d0e0 | 65 72 2d 64 69 73 74 27 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 5b 24 70 72 65 66 65 72 53 6f 75 | er-dist');.}..return.[$preferSou |
1d100 | 72 63 65 2c 20 24 70 72 65 66 65 72 44 69 73 74 5d 3b 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 | rce,.$preferDist];.}..protected. |
1d120 | 66 75 6e 63 74 69 6f 6e 20 67 65 74 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 | function.getPlatformRequirementF |
1d140 | 69 6c 74 65 72 28 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 69 6e 70 75 74 29 3a 20 50 6c | ilter(InputInterface.$input):.Pl |
1d160 | 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 49 6e 74 65 72 66 61 63 65 | atformRequirementFilterInterface |
1d180 | 0a 7b 0a 69 66 20 28 21 24 69 6e 70 75 74 2d 3e 68 61 73 4f 70 74 69 6f 6e 28 27 69 67 6e 6f 72 | .{.if.(!$input->hasOption('ignor |
1d1a0 | 65 2d 70 6c 61 74 66 6f 72 6d 2d 72 65 71 73 27 29 20 7c 7c 20 21 24 69 6e 70 75 74 2d 3e 68 61 | e-platform-reqs').||.!$input->ha |
1d1c0 | 73 4f 70 74 69 6f 6e 28 27 69 67 6e 6f 72 65 2d 70 6c 61 74 66 6f 72 6d 2d 72 65 71 27 29 29 20 | sOption('ignore-platform-req')). |
1d1e0 | 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 4c 6f 67 69 63 45 78 63 65 70 74 69 6f 6e 28 27 43 61 6c | {.throw.new.\LogicException('Cal |
1d200 | 6c 69 6e 67 20 67 65 74 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 | ling.getPlatformRequirementFilte |
1d220 | 72 20 66 72 6f 6d 20 61 20 63 6f 6d 6d 61 6e 64 20 77 68 69 63 68 20 64 6f 65 73 20 6e 6f 74 20 | r.from.a.command.which.does.not. |
1d240 | 64 65 66 69 6e 65 20 74 68 65 20 2d 2d 69 67 6e 6f 72 65 2d 70 6c 61 74 66 6f 72 6d 2d 72 65 71 | define.the.--ignore-platform-req |
1d260 | 5b 73 5d 20 66 6c 61 67 73 20 69 73 20 6e 6f 74 20 70 65 72 6d 69 74 74 65 64 2e 27 29 3b 0a 7d | [s].flags.is.not.permitted.');.} |
1d280 | 0a 0a 69 66 20 28 74 72 75 65 20 3d 3d 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e | ..if.(true.===.$input->getOption |
1d2a0 | 28 27 69 67 6e 6f 72 65 2d 70 6c 61 74 66 6f 72 6d 2d 72 65 71 73 27 29 29 20 7b 0a 72 65 74 75 | ('ignore-platform-reqs')).{.retu |
1d2c0 | 72 6e 20 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 46 61 63 74 | rn.PlatformRequirementFilterFact |
1d2e0 | 6f 72 79 3a 3a 69 67 6e 6f 72 65 41 6c 6c 28 29 3b 0a 7d 0a 0a 24 69 67 6e 6f 72 65 73 20 3d 20 | ory::ignoreAll();.}..$ignores.=. |
1d300 | 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 69 67 6e 6f 72 65 2d 70 6c 61 74 66 6f | $input->getOption('ignore-platfo |
1d320 | 72 6d 2d 72 65 71 27 29 3b 0a 69 66 20 28 63 6f 75 6e 74 28 24 69 67 6e 6f 72 65 73 29 20 3e 20 | rm-req');.if.(count($ignores).>. |
1d340 | 30 29 20 7b 0a 72 65 74 75 72 6e 20 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 | 0).{.return.PlatformRequirementF |
1d360 | 69 6c 74 65 72 46 61 63 74 6f 72 79 3a 3a 66 72 6f 6d 42 6f 6f 6c 4f 72 4c 69 73 74 28 24 69 67 | ilterFactory::fromBoolOrList($ig |
1d380 | 6e 6f 72 65 73 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 | nores);.}..return.PlatformRequir |
1d3a0 | 65 6d 65 6e 74 46 69 6c 74 65 72 46 61 63 74 6f 72 79 3a 3a 69 67 6e 6f 72 65 4e 6f 74 68 69 6e | ementFilterFactory::ignoreNothin |
1d3c0 | 67 28 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 | g();.}.......protected.function. |
1d3e0 | 66 6f 72 6d 61 74 52 65 71 75 69 72 65 6d 65 6e 74 73 28 61 72 72 61 79 20 24 72 65 71 75 69 72 | formatRequirements(array.$requir |
1d400 | 65 6d 65 6e 74 73 29 0a 7b 0a 24 72 65 71 75 69 72 65 73 20 3d 20 5b 5d 3b 0a 24 72 65 71 75 69 | ements).{.$requires.=.[];.$requi |
1d420 | 72 65 6d 65 6e 74 73 20 3d 20 24 74 68 69 73 2d 3e 6e 6f 72 6d 61 6c 69 7a 65 52 65 71 75 69 72 | rements.=.$this->normalizeRequir |
1d440 | 65 6d 65 6e 74 73 28 24 72 65 71 75 69 72 65 6d 65 6e 74 73 29 3b 0a 66 6f 72 65 61 63 68 20 28 | ements($requirements);.foreach.( |
1d460 | 24 72 65 71 75 69 72 65 6d 65 6e 74 73 20 61 73 20 24 72 65 71 75 69 72 65 6d 65 6e 74 29 20 7b | $requirements.as.$requirement).{ |
1d480 | 0a 69 66 20 28 21 69 73 73 65 74 28 24 72 65 71 75 69 72 65 6d 65 6e 74 5b 27 76 65 72 73 69 6f | .if.(!isset($requirement['versio |
1d4a0 | 6e 27 5d 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 55 6e 65 78 70 65 63 74 65 64 56 61 6c | n'])).{.throw.new.\UnexpectedVal |
1d4c0 | 75 65 45 78 63 65 70 74 69 6f 6e 28 27 4f 70 74 69 6f 6e 20 27 2e 24 72 65 71 75 69 72 65 6d 65 | ueException('Option.'.$requireme |
1d4e0 | 6e 74 5b 27 6e 61 6d 65 27 5d 20 2e 27 20 69 73 20 6d 69 73 73 69 6e 67 20 61 20 76 65 72 73 69 | nt['name']..'.is.missing.a.versi |
1d500 | 6f 6e 20 63 6f 6e 73 74 72 61 69 6e 74 2c 20 75 73 65 20 65 2e 67 2e 20 27 2e 24 72 65 71 75 69 | on.constraint,.use.e.g..'.$requi |
1d520 | 72 65 6d 65 6e 74 5b 27 6e 61 6d 65 27 5d 2e 27 3a 5e 31 2e 30 27 29 3b 0a 7d 0a 24 72 65 71 75 | rement['name'].':^1.0');.}.$requ |
1d540 | 69 72 65 73 5b 24 72 65 71 75 69 72 65 6d 65 6e 74 5b 27 6e 61 6d 65 27 5d 5d 20 3d 20 24 72 65 | ires[$requirement['name']].=.$re |
1d560 | 71 75 69 72 65 6d 65 6e 74 5b 27 76 65 72 73 69 6f 6e 27 5d 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 | quirement['version'];.}..return. |
1d580 | 24 72 65 71 75 69 72 65 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e | $requires;.}.......protected.fun |
1d5a0 | 63 74 69 6f 6e 20 6e 6f 72 6d 61 6c 69 7a 65 52 65 71 75 69 72 65 6d 65 6e 74 73 28 61 72 72 61 | ction.normalizeRequirements(arra |
1d5c0 | 79 20 24 72 65 71 75 69 72 65 6d 65 6e 74 73 29 0a 7b 0a 24 70 61 72 73 65 72 20 3d 20 6e 65 77 | y.$requirements).{.$parser.=.new |
1d5e0 | 20 56 65 72 73 69 6f 6e 50 61 72 73 65 72 28 29 3b 0a 0a 72 65 74 75 72 6e 20 24 70 61 72 73 65 | .VersionParser();..return.$parse |
1d600 | 72 2d 3e 70 61 72 73 65 4e 61 6d 65 56 65 72 73 69 6f 6e 50 61 69 72 73 28 24 72 65 71 75 69 72 | r->parseNameVersionPairs($requir |
1d620 | 65 6d 65 6e 74 73 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 | ements);.}.......protected.funct |
1d640 | 69 6f 6e 20 72 65 6e 64 65 72 54 61 62 6c 65 28 61 72 72 61 79 20 24 74 61 62 6c 65 2c 20 4f 75 | ion.renderTable(array.$table,.Ou |
1d660 | 74 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 6f 75 74 70 75 74 29 0a 7b 0a 24 72 65 6e 64 65 72 | tputInterface.$output).{.$render |
1d680 | 65 72 20 3d 20 6e 65 77 20 54 61 62 6c 65 28 24 6f 75 74 70 75 74 29 3b 0a 24 72 65 6e 64 65 72 | er.=.new.Table($output);.$render |
1d6a0 | 65 72 2d 3e 73 65 74 53 74 79 6c 65 28 27 63 6f 6d 70 61 63 74 27 29 3b 0a 24 72 65 6e 64 65 72 | er->setStyle('compact');.$render |
1d6c0 | 65 72 2d 3e 73 65 74 52 6f 77 73 28 24 74 61 62 6c 65 29 2d 3e 72 65 6e 64 65 72 28 29 3b 0a 7d | er->setRows($table)->render();.} |
1d6e0 | 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 54 65 72 6d 69 | .....protected.function.getTermi |
1d700 | 6e 61 6c 57 69 64 74 68 28 29 0a 7b 0a 24 74 65 72 6d 69 6e 61 6c 20 3d 20 6e 65 77 20 54 65 72 | nalWidth().{.$terminal.=.new.Ter |
1d720 | 6d 69 6e 61 6c 28 29 3b 0a 24 77 69 64 74 68 20 3d 20 24 74 65 72 6d 69 6e 61 6c 2d 3e 67 65 74 | minal();.$width.=.$terminal->get |
1d740 | 57 69 64 74 68 28 29 3b 0a 0a 69 66 20 28 50 6c 61 74 66 6f 72 6d 3a 3a 69 73 57 69 6e 64 6f 77 | Width();..if.(Platform::isWindow |
1d760 | 73 28 29 29 20 7b 0a 24 77 69 64 74 68 2d 2d 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 77 69 64 74 68 | s()).{.$width--;.}.else.{.$width |
1d780 | 20 3d 20 6d 61 78 28 38 30 2c 20 24 77 69 64 74 68 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 77 | .=.max(80,.$width);.}..return.$w |
1d7a0 | 69 64 74 68 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e | idth;.}.......protected.function |
1d7c0 | 20 67 65 74 41 75 64 69 74 46 6f 72 6d 61 74 28 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 | .getAuditFormat(InputInterface.$ |
1d7e0 | 69 6e 70 75 74 2c 20 73 74 72 69 6e 67 20 24 6f 70 74 4e 61 6d 65 20 3d 20 27 61 75 64 69 74 2d | input,.string.$optName.=.'audit- |
1d800 | 66 6f 72 6d 61 74 27 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 69 66 20 28 21 24 69 6e 70 75 74 2d 3e | format'):.string.{.if.(!$input-> |
1d820 | 68 61 73 4f 70 74 69 6f 6e 28 24 6f 70 74 4e 61 6d 65 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 | hasOption($optName)).{.throw.new |
1d840 | 20 5c 4c 6f 67 69 63 45 78 63 65 70 74 69 6f 6e 28 27 54 68 69 73 20 73 68 6f 75 6c 64 20 6e 6f | .\LogicException('This.should.no |
1d860 | 74 20 62 65 20 63 61 6c 6c 65 64 20 6f 6e 20 61 20 43 6f 6d 6d 61 6e 64 20 77 68 69 63 68 20 68 | t.be.called.on.a.Command.which.h |
1d880 | 61 73 20 6e 6f 20 27 2e 24 6f 70 74 4e 61 6d 65 2e 27 20 6f 70 74 69 6f 6e 20 64 65 66 69 6e 65 | as.no.'.$optName.'.option.define |
1d8a0 | 64 2e 27 29 3b 0a 7d 0a 0a 24 76 61 6c 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f | d.');.}..$val.=.$input->getOptio |
1d8c0 | 6e 28 24 6f 70 74 4e 61 6d 65 29 3b 0a 69 66 20 28 21 69 6e 5f 61 72 72 61 79 28 24 76 61 6c 2c | n($optName);.if.(!in_array($val, |
1d8e0 | 20 41 75 64 69 74 6f 72 3a 3a 46 4f 52 4d 41 54 53 2c 20 74 72 75 65 29 29 20 7b 0a 74 68 72 6f | .Auditor::FORMATS,.true)).{.thro |
1d900 | 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 | w.new.\InvalidArgumentException( |
1d920 | 27 2d 2d 27 2e 24 6f 70 74 4e 61 6d 65 2e 27 20 6d 75 73 74 20 62 65 20 6f 6e 65 20 6f 66 20 27 | '--'.$optName.'.must.be.one.of.' |
1d940 | 2e 69 6d 70 6c 6f 64 65 28 27 2c 20 27 2c 20 41 75 64 69 74 6f 72 3a 3a 46 4f 52 4d 41 54 53 29 | .implode(',.',.Auditor::FORMATS) |
1d960 | 2e 27 2e 27 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 76 61 6c 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 | .'.');.}..return.$val;.}.}.<?php |
1d980 | 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a | .declare(strict_types=1);....... |
1d9a0 | 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6d 6d 61 6e 64 3b | .....namespace.Composer\Command; |
1d9c0 | 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 4c 69 6e 6b 3b 0a 75 73 65 | ..use.Composer\Package\Link;.use |
1d9e0 | 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 | .Composer\Package\PackageInterfa |
1da00 | 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 43 6f 6d 70 6c 65 74 | ce;.use.Composer\Package\Complet |
1da20 | 65 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c | ePackageInterface;.use.Composer\ |
1da40 | 50 61 63 6b 61 67 65 5c 52 6f 6f 74 50 61 63 6b 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 | Package\RootPackage;.use.Compose |
1da60 | 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 49 6e 73 74 61 6c 6c 65 64 41 72 72 61 79 52 65 70 6f 73 | r\Repository\InstalledArrayRepos |
1da80 | 69 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 43 | itory;.use.Composer\Repository\C |
1daa0 | 6f 6d 70 6f 73 69 74 65 52 65 70 6f 73 69 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 | ompositeRepository;.use.Composer |
1dac0 | 5c 52 65 70 6f 73 69 74 6f 72 79 5c 52 6f 6f 74 50 61 63 6b 61 67 65 52 65 70 6f 73 69 74 6f 72 | \Repository\RootPackageRepositor |
1dae0 | 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 49 6e 73 74 61 | y;.use.Composer\Repository\Insta |
1db00 | 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 | lledRepository;.use.Composer\Rep |
1db20 | 6f 73 69 74 6f 72 79 5c 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 3b 0a 75 73 65 20 | ository\PlatformRepository;.use. |
1db40 | 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 52 65 70 6f 73 69 74 6f 72 79 46 61 | Composer\Repository\RepositoryFa |
1db60 | 63 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 6c 75 67 69 6e 5c 43 6f 6d 6d 61 | ctory;.use.Composer\Plugin\Comma |
1db80 | 6e 64 45 76 65 6e 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 6c 75 67 69 6e 5c 50 6c 75 | ndEvent;.use.Composer\Plugin\Plu |
1dba0 | 67 69 6e 45 76 65 6e 74 73 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 | ginEvents;.use.Symfony\Component |
1dbc0 | 5c 43 6f 6e 73 6f 6c 65 5c 46 6f 72 6d 61 74 74 65 72 5c 4f 75 74 70 75 74 46 6f 72 6d 61 74 74 | \Console\Formatter\OutputFormatt |
1dbe0 | 65 72 53 74 79 6c 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 56 65 | erStyle;.use.Composer\Package\Ve |
1dc00 | 72 73 69 6f 6e 5c 56 65 72 73 69 6f 6e 50 61 72 73 65 72 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 | rsion\VersionParser;.use.Symfony |
1dc20 | 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 49 6e | \Component\Console\Input\InputIn |
1dc40 | 74 65 72 66 61 63 65 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 | terface;.use.Symfony\Component\C |
1dc60 | 6f 6e 73 6f 6c 65 5c 4f 75 74 70 75 74 5c 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 0a | onsole\Output\OutputInterface;.. |
1dc80 | 0a 0a 0a 0a 0a 61 62 73 74 72 61 63 74 20 63 6c 61 73 73 20 42 61 73 65 44 65 70 65 6e 64 65 6e | .....abstract.class.BaseDependen |
1dca0 | 63 79 43 6f 6d 6d 61 6e 64 20 65 78 74 65 6e 64 73 20 42 61 73 65 43 6f 6d 6d 61 6e 64 0a 7b 0a | cyCommand.extends.BaseCommand.{. |
1dcc0 | 70 72 6f 74 65 63 74 65 64 20 63 6f 6e 73 74 20 41 52 47 55 4d 45 4e 54 5f 50 41 43 4b 41 47 45 | protected.const.ARGUMENT_PACKAGE |
1dce0 | 20 3d 20 27 70 61 63 6b 61 67 65 27 3b 0a 70 72 6f 74 65 63 74 65 64 20 63 6f 6e 73 74 20 41 52 | .=.'package';.protected.const.AR |
1dd00 | 47 55 4d 45 4e 54 5f 43 4f 4e 53 54 52 41 49 4e 54 20 3d 20 27 76 65 72 73 69 6f 6e 27 3b 0a 70 | GUMENT_CONSTRAINT.=.'version';.p |
1dd20 | 72 6f 74 65 63 74 65 64 20 63 6f 6e 73 74 20 4f 50 54 49 4f 4e 5f 52 45 43 55 52 53 49 56 45 20 | rotected.const.OPTION_RECURSIVE. |
1dd40 | 3d 20 27 72 65 63 75 72 73 69 76 65 27 3b 0a 70 72 6f 74 65 63 74 65 64 20 63 6f 6e 73 74 20 4f | =.'recursive';.protected.const.O |
1dd60 | 50 54 49 4f 4e 5f 54 52 45 45 20 3d 20 27 74 72 65 65 27 3b 0a 0a 0a 70 72 6f 74 65 63 74 65 64 | PTION_TREE.=.'tree';...protected |
1dd80 | 20 24 63 6f 6c 6f 72 73 3b 0a 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 | .$colors;........protected.funct |
1dda0 | 69 6f 6e 20 64 6f 45 78 65 63 75 74 65 28 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 69 6e | ion.doExecute(InputInterface.$in |
1ddc0 | 70 75 74 2c 20 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 6f 75 74 70 75 74 2c 20 62 6f | put,.OutputInterface.$output,.bo |
1dde0 | 6f 6c 20 24 69 6e 76 65 72 74 65 64 20 3d 20 66 61 6c 73 65 29 3a 20 69 6e 74 0a 7b 0a 0a 24 63 | ol.$inverted.=.false):.int.{..$c |
1de00 | 6f 6d 70 6f 73 65 72 20 3d 20 24 74 68 69 73 2d 3e 72 65 71 75 69 72 65 43 6f 6d 70 6f 73 65 72 | omposer.=.$this->requireComposer |
1de20 | 28 29 3b 0a 24 63 6f 6d 6d 61 6e 64 45 76 65 6e 74 20 3d 20 6e 65 77 20 43 6f 6d 6d 61 6e 64 45 | ();.$commandEvent.=.new.CommandE |
1de40 | 76 65 6e 74 28 50 6c 75 67 69 6e 45 76 65 6e 74 73 3a 3a 43 4f 4d 4d 41 4e 44 2c 20 24 74 68 69 | vent(PluginEvents::COMMAND,.$thi |
1de60 | 73 2d 3e 67 65 74 4e 61 6d 65 28 29 2c 20 24 69 6e 70 75 74 2c 20 24 6f 75 74 70 75 74 29 3b 0a | s->getName(),.$input,.$output);. |
1de80 | 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 28 29 2d | $composer->getEventDispatcher()- |
1dea0 | 3e 64 69 73 70 61 74 63 68 28 24 63 6f 6d 6d 61 6e 64 45 76 65 6e 74 2d 3e 67 65 74 4e 61 6d 65 | >dispatch($commandEvent->getName |
1dec0 | 28 29 2c 20 24 63 6f 6d 6d 61 6e 64 45 76 65 6e 74 29 3b 0a 0a 24 72 65 70 6f 73 20 3d 20 5b 5d | (),.$commandEvent);..$repos.=.[] |
1dee0 | 3b 0a 0a 24 72 65 70 6f 73 5b 5d 20 3d 20 6e 65 77 20 52 6f 6f 74 50 61 63 6b 61 67 65 52 65 70 | ;..$repos[].=.new.RootPackageRep |
1df00 | 6f 73 69 74 6f 72 79 28 63 6c 6f 6e 65 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 50 61 63 6b | ository(clone.$composer->getPack |
1df20 | 61 67 65 28 29 29 3b 0a 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 | age());..if.($input->getOption(' |
1df40 | 6c 6f 63 6b 65 64 27 29 29 20 7b 0a 24 6c 6f 63 6b 65 72 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d | locked')).{.$locker.=.$composer- |
1df60 | 3e 67 65 74 4c 6f 63 6b 65 72 28 29 3b 0a 0a 69 66 20 28 21 24 6c 6f 63 6b 65 72 2d 3e 69 73 4c | >getLocker();..if.(!$locker->isL |
1df80 | 6f 63 6b 65 64 28 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 55 6e 65 78 70 65 63 74 65 64 | ocked()).{.throw.new.\Unexpected |
1dfa0 | 56 61 6c 75 65 45 78 63 65 70 74 69 6f 6e 28 27 41 20 76 61 6c 69 64 20 63 6f 6d 70 6f 73 65 72 | ValueException('A.valid.composer |
1dfc0 | 2e 6c 6f 63 6b 20 66 69 6c 65 20 69 73 20 72 65 71 75 69 72 65 64 20 74 6f 20 72 75 6e 20 74 68 | .lock.file.is.required.to.run.th |
1dfe0 | 69 73 20 63 6f 6d 6d 61 6e 64 20 77 69 74 68 20 2d 2d 6c 6f 63 6b 65 64 27 29 3b 0a 7d 0a 0a 24 | is.command.with.--locked');.}..$ |
1e000 | 72 65 70 6f 73 5b 5d 20 3d 20 24 6c 6f 63 6b 65 72 2d 3e 67 65 74 4c 6f 63 6b 65 64 52 65 70 6f | repos[].=.$locker->getLockedRepo |
1e020 | 73 69 74 6f 72 79 28 74 72 75 65 29 3b 0a 24 72 65 70 6f 73 5b 5d 20 3d 20 6e 65 77 20 50 6c 61 | sitory(true);.$repos[].=.new.Pla |
1e040 | 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 28 5b 5d 2c 20 24 6c 6f 63 6b 65 72 2d 3e 67 65 74 | tformRepository([],.$locker->get |
1e060 | 50 6c 61 74 66 6f 72 6d 4f 76 65 72 72 69 64 65 73 28 29 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 | PlatformOverrides());.}.else.{.$ |
1e080 | 6c 6f 63 61 6c 52 65 70 6f 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 52 65 70 6f 73 69 | localRepo.=.$composer->getReposi |
1e0a0 | 74 6f 72 79 4d 61 6e 61 67 65 72 28 29 2d 3e 67 65 74 4c 6f 63 61 6c 52 65 70 6f 73 69 74 6f 72 | toryManager()->getLocalRepositor |
1e0c0 | 79 28 29 3b 0a 24 72 6f 6f 74 50 6b 67 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 50 61 | y();.$rootPkg.=.$composer->getPa |
1e0e0 | 63 6b 61 67 65 28 29 3b 0a 0a 69 66 20 28 63 6f 75 6e 74 28 24 6c 6f 63 61 6c 52 65 70 6f 2d 3e | ckage();..if.(count($localRepo-> |
1e100 | 67 65 74 50 61 63 6b 61 67 65 73 28 29 29 20 3d 3d 3d 20 30 20 26 26 20 28 63 6f 75 6e 74 28 24 | getPackages()).===.0.&&.(count($ |
1e120 | 72 6f 6f 74 50 6b 67 2d 3e 67 65 74 52 65 71 75 69 72 65 73 28 29 29 20 3e 20 30 20 7c 7c 20 63 | rootPkg->getRequires()).>.0.||.c |
1e140 | 6f 75 6e 74 28 24 72 6f 6f 74 50 6b 67 2d 3e 67 65 74 44 65 76 52 65 71 75 69 72 65 73 28 29 29 | ount($rootPkg->getDevRequires()) |
1e160 | 20 3e 20 30 29 29 20 7b 0a 24 6f 75 74 70 75 74 2d 3e 77 72 69 74 65 6c 6e 28 27 3c 77 61 72 6e | .>.0)).{.$output->writeln('<warn |
1e180 | 69 6e 67 3e 4e 6f 20 64 65 70 65 6e 64 65 6e 63 69 65 73 20 69 6e 73 74 61 6c 6c 65 64 2e 20 54 | ing>No.dependencies.installed..T |
1e1a0 | 72 79 20 72 75 6e 6e 69 6e 67 20 63 6f 6d 70 6f 73 65 72 20 69 6e 73 74 61 6c 6c 20 6f 72 20 75 | ry.running.composer.install.or.u |
1e1c0 | 70 64 61 74 65 2c 20 6f 72 20 75 73 65 20 2d 2d 6c 6f 63 6b 65 64 2e 3c 2f 77 61 72 6e 69 6e 67 | pdate,.or.use.--locked.</warning |
1e1e0 | 3e 27 29 3b 0a 0a 72 65 74 75 72 6e 20 31 3b 0a 7d 0a 0a 24 72 65 70 6f 73 5b 5d 20 3d 20 24 6c | >');..return.1;.}..$repos[].=.$l |
1e200 | 6f 63 61 6c 52 65 70 6f 3b 0a 0a 24 70 6c 61 74 66 6f 72 6d 4f 76 65 72 72 69 64 65 73 20 3d 20 | ocalRepo;..$platformOverrides.=. |
1e220 | 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 43 6f 6e 66 69 67 28 29 2d 3e 67 65 74 28 27 70 6c 61 | $composer->getConfig()->get('pla |
1e240 | 74 66 6f 72 6d 27 29 20 3f 3a 20 5b 5d 3b 0a 24 72 65 70 6f 73 5b 5d 20 3d 20 6e 65 77 20 50 6c | tform').?:.[];.$repos[].=.new.Pl |
1e260 | 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 28 5b 5d 2c 20 24 70 6c 61 74 66 6f 72 6d 4f 76 | atformRepository([],.$platformOv |
1e280 | 65 72 72 69 64 65 73 29 3b 0a 7d 0a 0a 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 20 3d 20 6e 65 | errides);.}..$installedRepo.=.ne |
1e2a0 | 77 20 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 28 24 72 65 70 6f 73 29 3b 0a 0a | w.InstalledRepository($repos);.. |
1e2c0 | 0a 5b 24 6e 65 65 64 6c 65 2c 20 24 74 65 78 74 43 6f 6e 73 74 72 61 69 6e 74 5d 20 3d 20 61 72 | .[$needle,.$textConstraint].=.ar |
1e2e0 | 72 61 79 5f 70 61 64 28 0a 65 78 70 6c 6f 64 65 28 27 3a 27 2c 20 24 69 6e 70 75 74 2d 3e 67 65 | ray_pad(.explode(':',.$input->ge |
1e300 | 74 41 72 67 75 6d 65 6e 74 28 73 65 6c 66 3a 3a 41 52 47 55 4d 45 4e 54 5f 50 41 43 4b 41 47 45 | tArgument(self::ARGUMENT_PACKAGE |
1e320 | 29 29 2c 0a 32 2c 0a 24 69 6e 70 75 74 2d 3e 68 61 73 41 72 67 75 6d 65 6e 74 28 73 65 6c 66 3a | )),.2,.$input->hasArgument(self: |
1e340 | 3a 41 52 47 55 4d 45 4e 54 5f 43 4f 4e 53 54 52 41 49 4e 54 29 20 3f 20 24 69 6e 70 75 74 2d 3e | :ARGUMENT_CONSTRAINT).?.$input-> |
1e360 | 67 65 74 41 72 67 75 6d 65 6e 74 28 73 65 6c 66 3a 3a 41 52 47 55 4d 45 4e 54 5f 43 4f 4e 53 54 | getArgument(self::ARGUMENT_CONST |
1e380 | 52 41 49 4e 54 29 20 3a 20 27 2a 27 0a 29 3b 0a 0a 0a 24 70 61 63 6b 61 67 65 73 20 3d 20 24 69 | RAINT).:.'*'.);...$packages.=.$i |
1e3a0 | 6e 73 74 61 6c 6c 65 64 52 65 70 6f 2d 3e 66 69 6e 64 50 61 63 6b 61 67 65 73 57 69 74 68 52 65 | nstalledRepo->findPackagesWithRe |
1e3c0 | 70 6c 61 63 65 72 73 41 6e 64 50 72 6f 76 69 64 65 72 73 28 24 6e 65 65 64 6c 65 29 3b 0a 69 66 | placersAndProviders($needle);.if |
1e3e0 | 20 28 65 6d 70 74 79 28 24 70 61 63 6b 61 67 65 73 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 | .(empty($packages)).{.throw.new. |
1e400 | 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 73 70 72 69 6e 74 | \InvalidArgumentException(sprint |
1e420 | 66 28 27 43 6f 75 6c 64 20 6e 6f 74 20 66 69 6e 64 20 70 61 63 6b 61 67 65 20 22 25 73 22 20 69 | f('Could.not.find.package."%s".i |
1e440 | 6e 20 79 6f 75 72 20 70 72 6f 6a 65 63 74 27 2c 20 24 6e 65 65 64 6c 65 29 29 3b 0a 7d 0a 0a 0a | n.your.project',.$needle));.}... |
1e460 | 0a 69 66 20 28 21 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 2d 3e 66 69 6e 64 50 61 63 6b 61 67 | .if.(!$installedRepo->findPackag |
1e480 | 65 28 24 6e 65 65 64 6c 65 2c 20 24 74 65 78 74 43 6f 6e 73 74 72 61 69 6e 74 29 29 20 7b 0a 24 | e($needle,.$textConstraint)).{.$ |
1e4a0 | 64 65 66 61 75 6c 74 52 65 70 6f 73 20 3d 20 6e 65 77 20 43 6f 6d 70 6f 73 69 74 65 52 65 70 6f | defaultRepos.=.new.CompositeRepo |
1e4c0 | 73 69 74 6f 72 79 28 52 65 70 6f 73 69 74 6f 72 79 46 61 63 74 6f 72 79 3a 3a 64 65 66 61 75 6c | sitory(RepositoryFactory::defaul |
1e4e0 | 74 52 65 70 6f 73 28 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 2c 20 24 63 6f 6d 70 6f 73 65 72 | tRepos($this->getIO(),.$composer |
1e500 | 2d 3e 67 65 74 43 6f 6e 66 69 67 28 29 2c 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 52 65 70 | ->getConfig(),.$composer->getRep |
1e520 | 6f 73 69 74 6f 72 79 4d 61 6e 61 67 65 72 28 29 29 29 3b 0a 69 66 20 28 24 6d 61 74 63 68 20 3d | ositoryManager()));.if.($match.= |
1e540 | 20 24 64 65 66 61 75 6c 74 52 65 70 6f 73 2d 3e 66 69 6e 64 50 61 63 6b 61 67 65 28 24 6e 65 65 | .$defaultRepos->findPackage($nee |
1e560 | 64 6c 65 2c 20 24 74 65 78 74 43 6f 6e 73 74 72 61 69 6e 74 29 29 20 7b 0a 24 69 6e 73 74 61 6c | dle,.$textConstraint)).{.$instal |
1e580 | 6c 65 64 52 65 70 6f 2d 3e 61 64 64 52 65 70 6f 73 69 74 6f 72 79 28 6e 65 77 20 49 6e 73 74 61 | ledRepo->addRepository(new.Insta |
1e5a0 | 6c 6c 65 64 41 72 72 61 79 52 65 70 6f 73 69 74 6f 72 79 28 5b 63 6c 6f 6e 65 20 24 6d 61 74 63 | lledArrayRepository([clone.$matc |
1e5c0 | 68 5d 29 29 3b 0a 7d 0a 7d 0a 0a 0a 24 6e 65 65 64 6c 65 73 20 3d 20 5b 24 6e 65 65 64 6c 65 5d | h]));.}.}...$needles.=.[$needle] |
1e5e0 | 3b 0a 69 66 20 28 24 69 6e 76 65 72 74 65 64 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 | ;.if.($inverted).{.foreach.($pac |
1e600 | 6b 61 67 65 73 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 24 6e 65 65 64 6c 65 73 20 3d 20 | kages.as.$package).{.$needles.=. |
1e620 | 61 72 72 61 79 5f 6d 65 72 67 65 28 24 6e 65 65 64 6c 65 73 2c 20 61 72 72 61 79 5f 6d 61 70 28 | array_merge($needles,.array_map( |
1e640 | 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 4c 69 6e 6b 20 24 6c 69 6e 6b 29 3a 20 73 74 | static.function.(Link.$link):.st |
1e660 | 72 69 6e 67 20 7b 0a 72 65 74 75 72 6e 20 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 74 28 29 | ring.{.return.$link->getTarget() |
1e680 | 3b 0a 7d 2c 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 52 65 70 6c 61 63 65 73 28 29 29 29 3b 0a | ;.},.$package->getReplaces()));. |
1e6a0 | 7d 0a 7d 0a 0a 0a 69 66 20 28 27 2a 27 20 21 3d 3d 20 24 74 65 78 74 43 6f 6e 73 74 72 61 69 6e | }.}...if.('*'.!==.$textConstrain |
1e6c0 | 74 29 20 7b 0a 24 76 65 72 73 69 6f 6e 50 61 72 73 65 72 20 3d 20 6e 65 77 20 56 65 72 73 69 6f | t).{.$versionParser.=.new.Versio |
1e6e0 | 6e 50 61 72 73 65 72 28 29 3b 0a 24 63 6f 6e 73 74 72 61 69 6e 74 20 3d 20 24 76 65 72 73 69 6f | nParser();.$constraint.=.$versio |
1e700 | 6e 50 61 72 73 65 72 2d 3e 70 61 72 73 65 43 6f 6e 73 74 72 61 69 6e 74 73 28 24 74 65 78 74 43 | nParser->parseConstraints($textC |
1e720 | 6f 6e 73 74 72 61 69 6e 74 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 63 6f 6e 73 74 72 61 69 6e 74 | onstraint);.}.else.{.$constraint |
1e740 | 20 3d 20 6e 75 6c 6c 3b 0a 7d 0a 0a 0a 24 72 65 6e 64 65 72 54 72 65 65 20 3d 20 24 69 6e 70 75 | .=.null;.}...$renderTree.=.$inpu |
1e760 | 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 73 65 6c 66 3a 3a 4f 50 54 49 4f 4e 5f 54 52 45 45 29 3b | t->getOption(self::OPTION_TREE); |
1e780 | 0a 24 72 65 63 75 72 73 69 76 65 20 3d 20 24 72 65 6e 64 65 72 54 72 65 65 20 7c 7c 20 24 69 6e | .$recursive.=.$renderTree.||.$in |
1e7a0 | 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 73 65 6c 66 3a 3a 4f 50 54 49 4f 4e 5f 52 45 43 55 | put->getOption(self::OPTION_RECU |
1e7c0 | 52 53 49 56 45 29 3b 0a 0a 0a 24 72 65 73 75 6c 74 73 20 3d 20 24 69 6e 73 74 61 6c 6c 65 64 52 | RSIVE);...$results.=.$installedR |
1e7e0 | 65 70 6f 2d 3e 67 65 74 44 65 70 65 6e 64 65 6e 74 73 28 24 6e 65 65 64 6c 65 73 2c 20 24 63 6f | epo->getDependents($needles,.$co |
1e800 | 6e 73 74 72 61 69 6e 74 2c 20 24 69 6e 76 65 72 74 65 64 2c 20 24 72 65 63 75 72 73 69 76 65 29 | nstraint,.$inverted,.$recursive) |
1e820 | 3b 0a 69 66 20 28 65 6d 70 74 79 28 24 72 65 73 75 6c 74 73 29 29 20 7b 0a 24 65 78 74 72 61 20 | ;.if.(empty($results)).{.$extra. |
1e840 | 3d 20 28 6e 75 6c 6c 20 21 3d 3d 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 20 3f 20 73 70 72 69 6e | =.(null.!==.$constraint).?.sprin |
1e860 | 74 66 28 27 20 69 6e 20 76 65 72 73 69 6f 6e 73 20 25 73 6d 61 74 63 68 69 6e 67 20 25 73 27 2c | tf('.in.versions.%smatching.%s', |
1e880 | 20 24 69 6e 76 65 72 74 65 64 20 3f 20 27 6e 6f 74 20 27 20 3a 20 27 27 2c 20 24 74 65 78 74 43 | .$inverted.?.'not.'.:.'',.$textC |
1e8a0 | 6f 6e 73 74 72 61 69 6e 74 29 20 3a 20 27 27 3b 0a 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 2d | onstraint).:.'';.$this->getIO()- |
1e8c0 | 3e 77 72 69 74 65 45 72 72 6f 72 28 73 70 72 69 6e 74 66 28 0a 27 3c 69 6e 66 6f 3e 54 68 65 72 | >writeError(sprintf(.'<info>Ther |
1e8e0 | 65 20 69 73 20 6e 6f 20 69 6e 73 74 61 6c 6c 65 64 20 70 61 63 6b 61 67 65 20 64 65 70 65 6e 64 | e.is.no.installed.package.depend |
1e900 | 69 6e 67 20 6f 6e 20 22 25 73 22 25 73 3c 2f 69 6e 66 6f 3e 27 2c 0a 24 6e 65 65 64 6c 65 2c 0a | ing.on."%s"%s</info>',.$needle,. |
1e920 | 24 65 78 74 72 61 0a 29 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 72 65 6e 64 65 72 54 72 65 65 | $extra.));.}.elseif.($renderTree |
1e940 | 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6e 69 74 53 74 79 6c 65 73 28 24 6f 75 74 70 75 74 29 3b 0a | ).{.$this->initStyles($output);. |
1e960 | 24 72 6f 6f 74 20 3d 20 24 70 61 63 6b 61 67 65 73 5b 30 5d 3b 0a 24 74 68 69 73 2d 3e 67 65 74 | $root.=.$packages[0];.$this->get |
1e980 | 49 4f 28 29 2d 3e 77 72 69 74 65 28 73 70 72 69 6e 74 66 28 27 3c 69 6e 66 6f 3e 25 73 3c 2f 69 | IO()->write(sprintf('<info>%s</i |
1e9a0 | 6e 66 6f 3e 20 25 73 20 25 73 27 2c 20 24 72 6f 6f 74 2d 3e 67 65 74 50 72 65 74 74 79 4e 61 6d | nfo>.%s.%s',.$root->getPrettyNam |
1e9c0 | 65 28 29 2c 20 24 72 6f 6f 74 2d 3e 67 65 74 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 2c 20 | e(),.$root->getPrettyVersion(),. |
1e9e0 | 24 72 6f 6f 74 20 69 6e 73 74 61 6e 63 65 6f 66 20 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 | $root.instanceof.CompletePackage |
1ea00 | 49 6e 74 65 72 66 61 63 65 20 3f 20 24 72 6f 6f 74 2d 3e 67 65 74 44 65 73 63 72 69 70 74 69 6f | Interface.?.$root->getDescriptio |
1ea20 | 6e 28 29 20 3a 20 27 27 29 29 3b 0a 24 74 68 69 73 2d 3e 70 72 69 6e 74 54 72 65 65 28 24 72 65 | n().:.''));.$this->printTree($re |
1ea40 | 73 75 6c 74 73 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 74 68 69 73 2d 3e 70 72 69 6e 74 54 61 62 | sults);.}.else.{.$this->printTab |
1ea60 | 6c 65 28 24 6f 75 74 70 75 74 2c 20 24 72 65 73 75 6c 74 73 29 3b 0a 7d 0a 0a 69 66 20 28 24 69 | le($output,.$results);.}..if.($i |
1ea80 | 6e 76 65 72 74 65 64 20 26 26 20 24 69 6e 70 75 74 2d 3e 68 61 73 41 72 67 75 6d 65 6e 74 28 73 | nverted.&&.$input->hasArgument(s |
1eaa0 | 65 6c 66 3a 3a 41 52 47 55 4d 45 4e 54 5f 43 4f 4e 53 54 52 41 49 4e 54 29 29 20 7b 0a 24 74 68 | elf::ARGUMENT_CONSTRAINT)).{.$th |
1eac0 | 69 73 2d 3e 67 65 74 49 4f 28 29 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 4e 6f 74 20 66 69 6e | is->getIO()->writeError('Not.fin |
1eae0 | 64 69 6e 67 20 77 68 61 74 20 79 6f 75 20 77 65 72 65 20 6c 6f 6f 6b 69 6e 67 20 66 6f 72 3f 20 | ding.what.you.were.looking.for?. |
1eb00 | 54 72 79 20 63 61 6c 6c 69 6e 67 20 60 63 6f 6d 70 6f 73 65 72 20 75 70 64 61 74 65 20 22 27 2e | Try.calling.`composer.update."'. |
1eb20 | 24 69 6e 70 75 74 2d 3e 67 65 74 41 72 67 75 6d 65 6e 74 28 73 65 6c 66 3a 3a 41 52 47 55 4d 45 | $input->getArgument(self::ARGUME |
1eb40 | 4e 54 5f 50 41 43 4b 41 47 45 29 2e 27 3a 27 2e 24 69 6e 70 75 74 2d 3e 67 65 74 41 72 67 75 6d | NT_PACKAGE).':'.$input->getArgum |
1eb60 | 65 6e 74 28 73 65 6c 66 3a 3a 41 52 47 55 4d 45 4e 54 5f 43 4f 4e 53 54 52 41 49 4e 54 29 2e 27 | ent(self::ARGUMENT_CONSTRAINT).' |
1eb80 | 22 20 2d 2d 64 72 79 2d 72 75 6e 60 20 74 6f 20 67 65 74 20 61 6e 6f 74 68 65 72 20 76 69 65 77 | ".--dry-run`.to.get.another.view |
1eba0 | 20 6f 6e 20 74 68 65 20 70 72 6f 62 6c 65 6d 2e 27 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 30 3b | .on.the.problem.');.}..return.0; |
1ebc0 | 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 70 72 69 6e | .}.......protected.function.prin |
1ebe0 | 74 54 61 62 6c 65 28 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 6f 75 74 70 75 74 2c 20 | tTable(OutputInterface.$output,. |
1ec00 | 24 72 65 73 75 6c 74 73 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 61 62 6c 65 20 3d 20 5b 5d 3b 0a 24 | $results):.void.{.$table.=.[];.$ |
1ec20 | 64 6f 75 62 6c 65 73 20 3d 20 5b 5d 3b 0a 64 6f 20 7b 0a 24 71 75 65 75 65 20 3d 20 5b 5d 3b 0a | doubles.=.[];.do.{.$queue.=.[];. |
1ec40 | 24 72 6f 77 73 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 72 65 73 75 6c 74 73 20 61 73 | $rows.=.[];.foreach.($results.as |
1ec60 | 20 24 72 65 73 75 6c 74 29 20 7b 0a 0a 0a 0a 0a 5b 24 70 61 63 6b 61 67 65 2c 20 24 6c 69 6e 6b | .$result).{.....[$package,.$link |
1ec80 | 2c 20 24 63 68 69 6c 64 72 65 6e 5d 20 3d 20 24 72 65 73 75 6c 74 3b 0a 24 75 6e 69 71 75 65 20 | ,.$children].=.$result;.$unique. |
1eca0 | 3d 20 28 73 74 72 69 6e 67 29 20 24 6c 69 6e 6b 3b 0a 69 66 20 28 69 73 73 65 74 28 24 64 6f 75 | =.(string).$link;.if.(isset($dou |
1ecc0 | 62 6c 65 73 5b 24 75 6e 69 71 75 65 5d 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 24 64 | bles[$unique])).{.continue;.}.$d |
1ece0 | 6f 75 62 6c 65 73 5b 24 75 6e 69 71 75 65 5d 20 3d 20 74 72 75 65 3b 0a 24 76 65 72 73 69 6f 6e | oubles[$unique].=.true;.$version |
1ed00 | 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 20 | .=.$package->getPrettyVersion(). |
1ed20 | 3d 3d 3d 20 52 6f 6f 74 50 61 63 6b 61 67 65 3a 3a 44 45 46 41 55 4c 54 5f 50 52 45 54 54 59 5f | ===.RootPackage::DEFAULT_PRETTY_ |
1ed40 | 56 45 52 53 49 4f 4e 20 3f 20 27 2d 27 20 3a 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 | VERSION.?.'-'.:.$package->getPre |
1ed60 | 74 74 79 56 65 72 73 69 6f 6e 28 29 3b 0a 24 72 6f 77 73 5b 5d 20 3d 20 5b 24 70 61 63 6b 61 67 | ttyVersion();.$rows[].=.[$packag |
1ed80 | 65 2d 3e 67 65 74 50 72 65 74 74 79 4e 61 6d 65 28 29 2c 20 24 76 65 72 73 69 6f 6e 2c 20 24 6c | e->getPrettyName(),.$version,.$l |
1eda0 | 69 6e 6b 2d 3e 67 65 74 44 65 73 63 72 69 70 74 69 6f 6e 28 29 2c 20 73 70 72 69 6e 74 66 28 27 | ink->getDescription(),.sprintf(' |
1edc0 | 25 73 20 28 25 73 29 27 2c 20 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 74 28 29 2c 20 24 6c | %s.(%s)',.$link->getTarget(),.$l |
1ede0 | 69 6e 6b 2d 3e 67 65 74 50 72 65 74 74 79 43 6f 6e 73 74 72 61 69 6e 74 28 29 29 5d 3b 0a 69 66 | ink->getPrettyConstraint())];.if |
1ee00 | 20 28 24 63 68 69 6c 64 72 65 6e 29 20 7b 0a 24 71 75 65 75 65 20 3d 20 61 72 72 61 79 5f 6d 65 | .($children).{.$queue.=.array_me |
1ee20 | 72 67 65 28 24 71 75 65 75 65 2c 20 24 63 68 69 6c 64 72 65 6e 29 3b 0a 7d 0a 7d 0a 24 72 65 73 | rge($queue,.$children);.}.}.$res |
1ee40 | 75 6c 74 73 20 3d 20 24 71 75 65 75 65 3b 0a 24 74 61 62 6c 65 20 3d 20 61 72 72 61 79 5f 6d 65 | ults.=.$queue;.$table.=.array_me |
1ee60 | 72 67 65 28 24 72 6f 77 73 2c 20 24 74 61 62 6c 65 29 3b 0a 7d 20 77 68 69 6c 65 20 28 21 65 6d | rge($rows,.$table);.}.while.(!em |
1ee80 | 70 74 79 28 24 72 65 73 75 6c 74 73 29 29 3b 0a 0a 24 74 68 69 73 2d 3e 72 65 6e 64 65 72 54 61 | pty($results));..$this->renderTa |
1eea0 | 62 6c 65 28 24 74 61 62 6c 65 2c 20 24 6f 75 74 70 75 74 29 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 | ble($table,.$output);.}.....prot |
1eec0 | 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 69 6e 69 74 53 74 79 6c 65 73 28 4f 75 74 70 75 74 | ected.function.initStyles(Output |
1eee0 | 49 6e 74 65 72 66 61 63 65 20 24 6f 75 74 70 75 74 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 | Interface.$output):.void.{.$this |
1ef00 | 2d 3e 63 6f 6c 6f 72 73 20 3d 20 5b 0a 27 67 72 65 65 6e 27 2c 0a 27 79 65 6c 6c 6f 77 27 2c 0a | ->colors.=.[.'green',.'yellow',. |
1ef20 | 27 63 79 61 6e 27 2c 0a 27 6d 61 67 65 6e 74 61 27 2c 0a 27 62 6c 75 65 27 2c 0a 5d 3b 0a 0a 66 | 'cyan',.'magenta',.'blue',.];..f |
1ef40 | 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 63 6f 6c 6f 72 73 20 61 73 20 24 63 6f 6c 6f 72 29 | oreach.($this->colors.as.$color) |
1ef60 | 20 7b 0a 24 73 74 79 6c 65 20 3d 20 6e 65 77 20 4f 75 74 70 75 74 46 6f 72 6d 61 74 74 65 72 53 | .{.$style.=.new.OutputFormatterS |
1ef80 | 74 79 6c 65 28 24 63 6f 6c 6f 72 29 3b 0a 24 6f 75 74 70 75 74 2d 3e 67 65 74 46 6f 72 6d 61 74 | tyle($color);.$output->getFormat |
1efa0 | 74 65 72 28 29 2d 3e 73 65 74 53 74 79 6c 65 28 24 63 6f 6c 6f 72 2c 20 24 73 74 79 6c 65 29 3b | ter()->setStyle($color,.$style); |
1efc0 | 0a 7d 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 | .}.}.........protected.function. |
1efe0 | 70 72 69 6e 74 54 72 65 65 28 61 72 72 61 79 20 24 72 65 73 75 6c 74 73 2c 20 73 74 72 69 6e 67 | printTree(array.$results,.string |
1f000 | 20 24 70 72 65 66 69 78 20 3d 20 27 27 2c 20 69 6e 74 20 24 6c 65 76 65 6c 20 3d 20 31 29 3a 20 | .$prefix.=.'',.int.$level.=.1):. |
1f020 | 76 6f 69 64 0a 7b 0a 24 63 6f 75 6e 74 20 3d 20 63 6f 75 6e 74 28 24 72 65 73 75 6c 74 73 29 3b | void.{.$count.=.count($results); |
1f040 | 0a 24 69 64 78 20 3d 20 30 3b 0a 66 6f 72 65 61 63 68 20 28 24 72 65 73 75 6c 74 73 20 61 73 20 | .$idx.=.0;.foreach.($results.as. |
1f060 | 24 72 65 73 75 6c 74 29 20 7b 0a 5b 24 70 61 63 6b 61 67 65 2c 20 24 6c 69 6e 6b 2c 20 24 63 68 | $result).{.[$package,.$link,.$ch |
1f080 | 69 6c 64 72 65 6e 5d 20 3d 20 24 72 65 73 75 6c 74 3b 0a 0a 24 63 6f 6c 6f 72 20 3d 20 24 74 68 | ildren].=.$result;..$color.=.$th |
1f0a0 | 69 73 2d 3e 63 6f 6c 6f 72 73 5b 24 6c 65 76 65 6c 20 25 20 63 6f 75 6e 74 28 24 74 68 69 73 2d | is->colors[$level.%.count($this- |
1f0c0 | 3e 63 6f 6c 6f 72 73 29 5d 3b 0a 24 70 72 65 76 43 6f 6c 6f 72 20 3d 20 24 74 68 69 73 2d 3e 63 | >colors)];.$prevColor.=.$this->c |
1f0e0 | 6f 6c 6f 72 73 5b 28 24 6c 65 76 65 6c 20 2d 20 31 29 20 25 20 63 6f 75 6e 74 28 24 74 68 69 73 | olors[($level.-.1).%.count($this |
1f100 | 2d 3e 63 6f 6c 6f 72 73 29 5d 3b 0a 24 69 73 4c 61 73 74 20 3d 20 28 2b 2b 24 69 64 78 20 3d 3d | ->colors)];.$isLast.=.(++$idx.== |
1f120 | 3d 20 24 63 6f 75 6e 74 29 3b 0a 24 76 65 72 73 69 6f 6e 54 65 78 74 20 3d 20 24 70 61 63 6b 61 | =.$count);.$versionText.=.$packa |
1f140 | 67 65 2d 3e 67 65 74 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 20 3d 3d 3d 20 52 6f 6f 74 50 | ge->getPrettyVersion().===.RootP |
1f160 | 61 63 6b 61 67 65 3a 3a 44 45 46 41 55 4c 54 5f 50 52 45 54 54 59 5f 56 45 52 53 49 4f 4e 20 3f | ackage::DEFAULT_PRETTY_VERSION.? |
1f180 | 20 27 27 20 3a 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 56 65 72 73 69 6f 6e | .''.:.$package->getPrettyVersion |
1f1a0 | 28 29 3b 0a 24 70 61 63 6b 61 67 65 54 65 78 74 20 3d 20 72 74 72 69 6d 28 73 70 72 69 6e 74 66 | ();.$packageText.=.rtrim(sprintf |
1f1c0 | 28 27 3c 25 73 3e 25 73 3c 2f 25 31 24 73 3e 20 25 73 27 2c 20 24 63 6f 6c 6f 72 2c 20 24 70 61 | ('<%s>%s</%1$s>.%s',.$color,.$pa |
1f1e0 | 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 4e 61 6d 65 28 29 2c 20 24 76 65 72 73 69 6f 6e | ckage->getPrettyName(),.$version |
1f200 | 54 65 78 74 29 29 3b 0a 24 6c 69 6e 6b 54 65 78 74 20 3d 20 73 70 72 69 6e 74 66 28 27 25 73 20 | Text));.$linkText.=.sprintf('%s. |
1f220 | 3c 25 73 3e 25 73 3c 2f 25 32 24 73 3e 20 25 73 27 2c 20 24 6c 69 6e 6b 2d 3e 67 65 74 44 65 73 | <%s>%s</%2$s>.%s',.$link->getDes |
1f240 | 63 72 69 70 74 69 6f 6e 28 29 2c 20 24 70 72 65 76 43 6f 6c 6f 72 2c 20 24 6c 69 6e 6b 2d 3e 67 | cription(),.$prevColor,.$link->g |
1f260 | 65 74 54 61 72 67 65 74 28 29 2c 20 24 6c 69 6e 6b 2d 3e 67 65 74 50 72 65 74 74 79 43 6f 6e 73 | etTarget(),.$link->getPrettyCons |
1f280 | 74 72 61 69 6e 74 28 29 29 3b 0a 24 63 69 72 63 75 6c 61 72 57 61 72 6e 20 3d 20 24 63 68 69 6c | traint());.$circularWarn.=.$chil |
1f2a0 | 64 72 65 6e 20 3d 3d 3d 20 66 61 6c 73 65 20 3f 20 27 28 63 69 72 63 75 6c 61 72 20 64 65 70 65 | dren.===.false.?.'(circular.depe |
1f2c0 | 6e 64 65 6e 63 79 20 61 62 6f 72 74 65 64 20 68 65 72 65 29 27 20 3a 20 27 27 3b 0a 24 74 68 69 | ndency.aborted.here)'.:.'';.$thi |
1f2e0 | 73 2d 3e 77 72 69 74 65 54 72 65 65 4c 69 6e 65 28 72 74 72 69 6d 28 73 70 72 69 6e 74 66 28 22 | s->writeTreeLine(rtrim(sprintf(" |
1f300 | 25 73 25 73 25 73 20 28 25 73 29 20 25 73 22 2c 20 24 70 72 65 66 69 78 2c 20 24 69 73 4c 61 73 | %s%s%s.(%s).%s",.$prefix,.$isLas |
1f320 | 74 20 3f 20 27 e2 94 94 e2 94 80 e2 94 80 27 20 3a 20 27 e2 94 9c e2 94 80 e2 94 80 27 2c 20 24 | t.?.'.........'.:.'.........',.$ |
1f340 | 70 61 63 6b 61 67 65 54 65 78 74 2c 20 24 6c 69 6e 6b 54 65 78 74 2c 20 24 63 69 72 63 75 6c 61 | packageText,.$linkText,.$circula |
1f360 | 72 57 61 72 6e 29 29 29 3b 0a 69 66 20 28 24 63 68 69 6c 64 72 65 6e 29 20 7b 0a 24 74 68 69 73 | rWarn)));.if.($children).{.$this |
1f380 | 2d 3e 70 72 69 6e 74 54 72 65 65 28 24 63 68 69 6c 64 72 65 6e 2c 20 24 70 72 65 66 69 78 20 2e | ->printTree($children,.$prefix.. |
1f3a0 | 20 28 24 69 73 4c 61 73 74 20 3f 20 27 20 20 20 27 20 3a 20 27 e2 94 82 20 20 27 29 2c 20 24 6c | .($isLast.?.'...'.:.'.....'),.$l |
1f3c0 | 65 76 65 6c 20 2b 20 31 29 3b 0a 7d 0a 7d 0a 7d 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 | evel.+.1);.}.}.}..private.functi |
1f3e0 | 6f 6e 20 77 72 69 74 65 54 72 65 65 4c 69 6e 65 28 73 74 72 69 6e 67 20 24 6c 69 6e 65 29 3a 20 | on.writeTreeLine(string.$line):. |
1f400 | 76 6f 69 64 0a 7b 0a 24 69 6f 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 3b 0a 69 66 20 | void.{.$io.=.$this->getIO();.if. |
1f420 | 28 21 24 69 6f 2d 3e 69 73 44 65 63 6f 72 61 74 65 64 28 29 29 20 7b 0a 24 6c 69 6e 65 20 3d 20 | (!$io->isDecorated()).{.$line.=. |
1f440 | 73 74 72 5f 72 65 70 6c 61 63 65 28 5b 27 e2 94 94 27 2c 20 27 e2 94 9c 27 2c 20 27 e2 94 80 e2 | str_replace(['...',.'...',.'.... |
1f460 | 94 80 27 2c 20 27 e2 94 82 27 5d 2c 20 5b 27 60 2d 27 2c 20 27 7c 2d 27 2c 20 27 2d 27 2c 20 27 | ..',.'...'],.['`-',.'|-',.'-',.' |
1f480 | 7c 27 5d 2c 20 24 6c 69 6e 65 29 3b 0a 7d 0a 0a 24 69 6f 2d 3e 77 72 69 74 65 28 24 6c 69 6e 65 | |'],.$line);.}..$io->write($line |
1f4a0 | 29 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 | );.}.}.<?php.declare(strict_type |
1f4c0 | 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f | s=1);............namespace.Compo |
1f4e0 | 73 65 72 5c 43 6f 6d 6d 61 6e 64 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 | ser\Command;..use.Composer\Packa |
1f500 | 67 65 5c 41 6c 69 61 73 50 61 63 6b 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 | ge\AliasPackage;.use.Composer\Pa |
1f520 | 63 6b 61 67 65 5c 4c 6f 63 6b 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 | ckage\Locker;.use.Composer\Packa |
1f540 | 67 65 5c 56 65 72 73 69 6f 6e 5c 56 65 72 73 69 6f 6e 42 75 6d 70 65 72 3b 0a 75 73 65 20 43 6f | ge\Version\VersionBumper;.use.Co |
1f560 | 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 46 69 6c 65 73 79 73 74 65 6d 3b 0a 75 73 65 20 53 79 6d 66 | mposer\Util\Filesystem;.use.Symf |
1f580 | 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 | ony\Component\Console\Input\Inpu |
1f5a0 | 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 73 6f 6c 65 | tInterface;.use.Composer\Console |
1f5c0 | 5c 49 6e 70 75 74 5c 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 | \Input\InputArgument;.use.Compos |
1f5e0 | 65 72 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 4f 70 74 69 6f 6e 3b 0a 75 73 | er\Console\Input\InputOption;.us |
1f600 | 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 4f 75 74 70 | e.Symfony\Component\Console\Outp |
1f620 | 75 74 5c 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 | ut\OutputInterface;.use.Composer |
1f640 | 5c 46 61 63 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 4a 73 6f 6e 5c 4a 73 6f 6e | \Factory;.use.Composer\Json\Json |
1f660 | 46 69 6c 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 4a 73 6f 6e 5c 4a 73 6f 6e 4d 61 6e 69 | File;.use.Composer\Json\JsonMani |
1f680 | 70 75 6c 61 74 6f 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 | pulator;.use.Composer\Repository |
1f6a0 | 5c 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 | \PlatformRepository;.use.Compose |
1f6c0 | 72 5c 55 74 69 6c 5c 53 69 6c 65 6e 63 65 72 3b 0a 0a 0a 0a 0a 66 69 6e 61 6c 20 63 6c 61 73 73 | r\Util\Silencer;.....final.class |
1f6e0 | 20 42 75 6d 70 43 6f 6d 6d 61 6e 64 20 65 78 74 65 6e 64 73 20 42 61 73 65 43 6f 6d 6d 61 6e 64 | .BumpCommand.extends.BaseCommand |
1f700 | 0a 7b 0a 70 72 69 76 61 74 65 20 63 6f 6e 73 74 20 45 52 52 4f 52 5f 47 45 4e 45 52 49 43 20 3d | .{.private.const.ERROR_GENERIC.= |
1f720 | 20 31 3b 0a 70 72 69 76 61 74 65 20 63 6f 6e 73 74 20 45 52 52 4f 52 5f 4c 4f 43 4b 5f 4f 55 54 | .1;.private.const.ERROR_LOCK_OUT |
1f740 | 44 41 54 45 44 20 3d 20 32 3b 0a 0a 75 73 65 20 43 6f 6d 70 6c 65 74 69 6f 6e 54 72 61 69 74 3b | DATED.=.2;..use.CompletionTrait; |
1f760 | 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 63 6f 6e 66 69 67 75 72 65 28 29 | ..protected.function.configure() |
1f780 | 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 0a 2d 3e 73 65 74 4e 61 6d 65 28 27 62 75 6d 70 27 29 | :.void.{.$this.->setName('bump') |
1f7a0 | 0a 2d 3e 73 65 74 44 65 73 63 72 69 70 74 69 6f 6e 28 27 49 6e 63 72 65 61 73 65 73 20 74 68 65 | .->setDescription('Increases.the |
1f7c0 | 20 6c 6f 77 65 72 20 6c 69 6d 69 74 20 6f 66 20 79 6f 75 72 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 | .lower.limit.of.your.composer.js |
1f7e0 | 6f 6e 20 72 65 71 75 69 72 65 6d 65 6e 74 73 20 74 6f 20 74 68 65 20 63 75 72 72 65 6e 74 6c 79 | on.requirements.to.the.currently |
1f800 | 20 69 6e 73 74 61 6c 6c 65 64 20 76 65 72 73 69 6f 6e 73 27 29 0a 2d 3e 73 65 74 44 65 66 69 6e | .installed.versions').->setDefin |
1f820 | 69 74 69 6f 6e 28 5b 0a 6e 65 77 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 28 27 70 61 63 6b 61 | ition([.new.InputArgument('packa |
1f840 | 67 65 73 27 2c 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 3a 3a 49 53 5f 41 52 52 41 59 20 7c 20 | ges',.InputArgument::IS_ARRAY.|. |
1f860 | 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 3a 3a 4f 50 54 49 4f 4e 41 4c 2c 20 27 4f 70 74 69 6f 6e | InputArgument::OPTIONAL,.'Option |
1f880 | 61 6c 20 70 61 63 6b 61 67 65 20 6e 61 6d 65 28 73 29 20 74 6f 20 72 65 73 74 72 69 63 74 20 77 | al.package.name(s).to.restrict.w |
1f8a0 | 68 69 63 68 20 70 61 63 6b 61 67 65 73 20 61 72 65 20 62 75 6d 70 65 64 2e 27 2c 20 6e 75 6c 6c | hich.packages.are.bumped.',.null |
1f8c0 | 2c 20 24 74 68 69 73 2d 3e 73 75 67 67 65 73 74 52 6f 6f 74 52 65 71 75 69 72 65 6d 65 6e 74 28 | ,.$this->suggestRootRequirement( |
1f8e0 | 29 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 64 65 76 2d 6f 6e 6c 79 27 2c 20 | )),.new.InputOption('dev-only',. |
1f900 | 27 44 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 4f | 'D',.InputOption::VALUE_NONE,.'O |
1f920 | 6e 6c 79 20 62 75 6d 70 20 72 65 71 75 69 72 65 6d 65 6e 74 73 20 69 6e 20 22 72 65 71 75 69 72 | nly.bump.requirements.in."requir |
1f940 | 65 2d 64 65 76 22 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 64 | e-dev".'),.new.InputOption('no-d |
1f960 | 65 76 2d 6f 6e 6c 79 27 2c 20 27 52 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 | ev-only',.'R',.InputOption::VALU |
1f980 | 45 5f 4e 4f 4e 45 2c 20 27 4f 6e 6c 79 20 62 75 6d 70 20 72 65 71 75 69 72 65 6d 65 6e 74 73 20 | E_NONE,.'Only.bump.requirements. |
1f9a0 | 69 6e 20 22 72 65 71 75 69 72 65 22 2e 27 29 2c 0a 5d 29 0a 2d 3e 73 65 74 48 65 6c 70 28 0a 3c | in."require".'),.]).->setHelp(.< |
1f9c0 | 3c 3c 45 4f 54 0a 54 68 65 20 3c 69 6e 66 6f 3e 62 75 6d 70 3c 2f 69 6e 66 6f 3e 20 63 6f 6d 6d | <<EOT.The.<info>bump</info>.comm |
1f9e0 | 61 6e 64 20 69 6e 63 72 65 61 73 65 73 20 74 68 65 20 6c 6f 77 65 72 20 6c 69 6d 69 74 20 6f 66 | and.increases.the.lower.limit.of |
1fa00 | 20 79 6f 75 72 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 20 72 65 71 75 69 72 65 6d 65 6e 74 73 | .your.composer.json.requirements |
1fa20 | 0a 74 6f 20 74 68 65 20 63 75 72 72 65 6e 74 6c 79 20 69 6e 73 74 61 6c 6c 65 64 20 76 65 72 73 | .to.the.currently.installed.vers |
1fa40 | 69 6f 6e 73 2e 20 54 68 69 73 20 68 65 6c 70 73 20 74 6f 20 65 6e 73 75 72 65 20 79 6f 75 72 20 | ions..This.helps.to.ensure.your. |
1fa60 | 64 65 70 65 6e 64 65 6e 63 69 65 73 20 64 6f 20 6e 6f 74 0a 61 63 63 69 64 65 6e 74 61 6c 6c 79 | dependencies.do.not.accidentally |
1fa80 | 20 67 65 74 20 64 6f 77 6e 67 72 61 64 65 64 20 64 75 65 20 74 6f 20 73 6f 6d 65 20 6f 74 68 65 | .get.downgraded.due.to.some.othe |
1faa0 | 72 20 63 6f 6e 66 6c 69 63 74 2c 20 61 6e 64 20 63 61 6e 20 73 6c 69 67 68 74 6c 79 20 69 6d 70 | r.conflict,.and.can.slightly.imp |
1fac0 | 72 6f 76 65 0a 64 65 70 65 6e 64 65 6e 63 79 20 72 65 73 6f 6c 75 74 69 6f 6e 20 70 65 72 66 6f | rove.dependency.resolution.perfo |
1fae0 | 72 6d 61 6e 63 65 20 61 73 20 69 74 20 6c 69 6d 69 74 73 20 74 68 65 20 61 6d 6f 75 6e 74 20 6f | rmance.as.it.limits.the.amount.o |
1fb00 | 66 20 70 61 63 6b 61 67 65 20 76 65 72 73 69 6f 6e 73 0a 43 6f 6d 70 6f 73 65 72 20 68 61 73 20 | f.package.versions.Composer.has. |
1fb20 | 74 6f 20 6c 6f 6f 6b 20 61 74 2e 0a 0a 52 75 6e 6e 69 6e 67 20 74 68 69 73 20 62 6c 69 6e 64 6c | to.look.at...Running.this.blindl |
1fb40 | 79 20 6f 6e 20 6c 69 62 72 61 72 69 65 73 20 69 73 20 2a 2a 4e 4f 54 2a 2a 20 72 65 63 6f 6d 6d | y.on.libraries.is.**NOT**.recomm |
1fb60 | 65 6e 64 65 64 20 61 73 20 69 74 20 77 69 6c 6c 20 6e 61 72 72 6f 77 20 64 6f 77 6e 0a 79 6f 75 | ended.as.it.will.narrow.down.you |
1fb80 | 72 20 61 6c 6c 6f 77 65 64 20 64 65 70 65 6e 64 65 6e 63 69 65 73 2c 20 77 68 69 63 68 20 6d 61 | r.allowed.dependencies,.which.ma |
1fba0 | 79 20 63 61 75 73 65 20 64 65 70 65 6e 64 65 6e 63 79 20 68 65 6c 6c 20 66 6f 72 20 79 6f 75 72 | y.cause.dependency.hell.for.your |
1fbc0 | 20 75 73 65 72 73 2e 0a 52 75 6e 6e 69 6e 67 20 69 74 20 77 69 74 68 20 3c 69 6e 66 6f 3e 2d 2d | .users..Running.it.with.<info>-- |
1fbe0 | 64 65 76 2d 6f 6e 6c 79 3c 2f 69 6e 66 6f 3e 20 6f 6e 20 6c 69 62 72 61 72 69 65 73 20 6d 61 79 | dev-only</info>.on.libraries.may |
1fc00 | 20 62 65 20 66 69 6e 65 20 68 6f 77 65 76 65 72 20 61 73 20 64 65 76 20 72 65 71 75 69 72 65 6d | .be.fine.however.as.dev.requirem |
1fc20 | 65 6e 74 73 0a 61 72 65 20 6c 6f 63 61 6c 20 74 6f 20 74 68 65 20 6c 69 62 72 61 72 79 20 61 6e | ents.are.local.to.the.library.an |
1fc40 | 64 20 64 6f 20 6e 6f 74 20 61 66 66 65 63 74 20 63 6f 6e 73 75 6d 65 72 73 20 6f 66 20 74 68 65 | d.do.not.affect.consumers.of.the |
1fc60 | 20 70 61 63 6b 61 67 65 2e 0a 0a 45 4f 54 0a 29 0a 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 | .package...EOT.).;.}.....protect |
1fc80 | 65 64 20 66 75 6e 63 74 69 6f 6e 20 65 78 65 63 75 74 65 28 49 6e 70 75 74 49 6e 74 65 72 66 61 | ed.function.execute(InputInterfa |
1fca0 | 63 65 20 24 69 6e 70 75 74 2c 20 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 6f 75 74 70 | ce.$input,.OutputInterface.$outp |
1fcc0 | 75 74 29 0a 7b 0a 0a 24 63 6f 6d 70 6f 73 65 72 4a 73 6f 6e 50 61 74 68 20 3d 20 46 61 63 74 6f | ut).{..$composerJsonPath.=.Facto |
1fce0 | 72 79 3a 3a 67 65 74 43 6f 6d 70 6f 73 65 72 46 69 6c 65 28 29 3b 0a 24 69 6f 20 3d 20 24 74 68 | ry::getComposerFile();.$io.=.$th |
1fd00 | 69 73 2d 3e 67 65 74 49 4f 28 29 3b 0a 0a 69 66 20 28 21 46 69 6c 65 73 79 73 74 65 6d 3a 3a 69 | is->getIO();..if.(!Filesystem::i |
1fd20 | 73 52 65 61 64 61 62 6c 65 28 24 63 6f 6d 70 6f 73 65 72 4a 73 6f 6e 50 61 74 68 29 29 20 7b 0a | sReadable($composerJsonPath)).{. |
1fd40 | 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 65 72 72 6f 72 3e 27 2e 24 63 6f 6d 70 6f | $io->writeError('<error>'.$compo |
1fd60 | 73 65 72 4a 73 6f 6e 50 61 74 68 2e 27 20 69 73 20 6e 6f 74 20 72 65 61 64 61 62 6c 65 2e 3c 2f | serJsonPath.'.is.not.readable.</ |
1fd80 | 65 72 72 6f 72 3e 27 29 3b 0a 0a 72 65 74 75 72 6e 20 73 65 6c 66 3a 3a 45 52 52 4f 52 5f 47 45 | error>');..return.self::ERROR_GE |
1fda0 | 4e 45 52 49 43 3b 0a 7d 0a 0a 24 63 6f 6d 70 6f 73 65 72 4a 73 6f 6e 20 3d 20 6e 65 77 20 4a 73 | NERIC;.}..$composerJson.=.new.Js |
1fdc0 | 6f 6e 46 69 6c 65 28 24 63 6f 6d 70 6f 73 65 72 4a 73 6f 6e 50 61 74 68 29 3b 0a 24 63 6f 6e 74 | onFile($composerJsonPath);.$cont |
1fde0 | 65 6e 74 73 20 3d 20 66 69 6c 65 5f 67 65 74 5f 63 6f 6e 74 65 6e 74 73 28 24 63 6f 6d 70 6f 73 | ents.=.file_get_contents($compos |
1fe00 | 65 72 4a 73 6f 6e 2d 3e 67 65 74 50 61 74 68 28 29 29 3b 0a 69 66 20 28 66 61 6c 73 65 20 3d 3d | erJson->getPath());.if.(false.== |
1fe20 | 3d 20 24 63 6f 6e 74 65 6e 74 73 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 | =.$contents).{.$io->writeError(' |
1fe40 | 3c 65 72 72 6f 72 3e 27 2e 24 63 6f 6d 70 6f 73 65 72 4a 73 6f 6e 50 61 74 68 2e 27 20 69 73 20 | <error>'.$composerJsonPath.'.is. |
1fe60 | 6e 6f 74 20 72 65 61 64 61 62 6c 65 2e 3c 2f 65 72 72 6f 72 3e 27 29 3b 0a 0a 72 65 74 75 72 6e | not.readable.</error>');..return |
1fe80 | 20 73 65 6c 66 3a 3a 45 52 52 4f 52 5f 47 45 4e 45 52 49 43 3b 0a 7d 0a 0a 0a 0a 69 66 20 28 21 | .self::ERROR_GENERIC;.}....if.(! |
1fea0 | 69 73 5f 77 72 69 74 61 62 6c 65 28 24 63 6f 6d 70 6f 73 65 72 4a 73 6f 6e 50 61 74 68 29 20 26 | is_writable($composerJsonPath).& |
1fec0 | 26 20 66 61 6c 73 65 20 3d 3d 3d 20 53 69 6c 65 6e 63 65 72 3a 3a 63 61 6c 6c 28 27 66 69 6c 65 | &.false.===.Silencer::call('file |
1fee0 | 5f 70 75 74 5f 63 6f 6e 74 65 6e 74 73 27 2c 20 24 63 6f 6d 70 6f 73 65 72 4a 73 6f 6e 50 61 74 | _put_contents',.$composerJsonPat |
1ff00 | 68 2c 20 24 63 6f 6e 74 65 6e 74 73 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 | h,.$contents)).{.$io->writeError |
1ff20 | 28 27 3c 65 72 72 6f 72 3e 27 2e 24 63 6f 6d 70 6f 73 65 72 4a 73 6f 6e 50 61 74 68 2e 27 20 69 | ('<error>'.$composerJsonPath.'.i |
1ff40 | 73 20 6e 6f 74 20 77 72 69 74 61 62 6c 65 2e 3c 2f 65 72 72 6f 72 3e 27 29 3b 0a 0a 72 65 74 75 | s.not.writable.</error>');..retu |
1ff60 | 72 6e 20 73 65 6c 66 3a 3a 45 52 52 4f 52 5f 47 45 4e 45 52 49 43 3b 0a 7d 0a 75 6e 73 65 74 28 | rn.self::ERROR_GENERIC;.}.unset( |
1ff80 | 24 63 6f 6e 74 65 6e 74 73 29 3b 0a 0a 24 63 6f 6d 70 6f 73 65 72 20 3d 20 24 74 68 69 73 2d 3e | $contents);..$composer.=.$this-> |
1ffa0 | 72 65 71 75 69 72 65 43 6f 6d 70 6f 73 65 72 28 29 3b 0a 69 66 20 28 24 63 6f 6d 70 6f 73 65 72 | requireComposer();.if.($composer |
1ffc0 | 2d 3e 67 65 74 4c 6f 63 6b 65 72 28 29 2d 3e 69 73 4c 6f 63 6b 65 64 28 29 29 20 7b 0a 69 66 20 | ->getLocker()->isLocked()).{.if. |
1ffe0 | 28 21 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 4c 6f 63 6b 65 72 28 29 2d 3e 69 73 46 72 65 73 | (!$composer->getLocker()->isFres |
20000 | 68 28 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 65 72 72 6f 72 3e 54 | h()).{.$io->writeError('<error>T |
20020 | 68 65 20 6c 6f 63 6b 20 66 69 6c 65 20 69 73 20 6e 6f 74 20 75 70 20 74 6f 20 64 61 74 65 20 77 | he.lock.file.is.not.up.to.date.w |
20040 | 69 74 68 20 74 68 65 20 6c 61 74 65 73 74 20 63 68 61 6e 67 65 73 20 69 6e 20 63 6f 6d 70 6f 73 | ith.the.latest.changes.in.compos |
20060 | 65 72 2e 6a 73 6f 6e 2e 20 52 75 6e 20 74 68 65 20 61 70 70 72 6f 70 72 69 61 74 65 20 60 75 70 | er.json..Run.the.appropriate.`up |
20080 | 64 61 74 65 60 20 74 6f 20 66 69 78 20 74 68 61 74 20 62 65 66 6f 72 65 20 79 6f 75 20 75 73 65 | date`.to.fix.that.before.you.use |
200a0 | 20 74 68 65 20 60 62 75 6d 70 60 20 63 6f 6d 6d 61 6e 64 2e 3c 2f 65 72 72 6f 72 3e 27 29 3b 0a | .the.`bump`.command.</error>');. |
200c0 | 0a 72 65 74 75 72 6e 20 73 65 6c 66 3a 3a 45 52 52 4f 52 5f 4c 4f 43 4b 5f 4f 55 54 44 41 54 45 | .return.self::ERROR_LOCK_OUTDATE |
200e0 | 44 3b 0a 7d 0a 0a 24 72 65 70 6f 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 4c 6f 63 6b | D;.}..$repo.=.$composer->getLock |
20100 | 65 72 28 29 2d 3e 67 65 74 4c 6f 63 6b 65 64 52 65 70 6f 73 69 74 6f 72 79 28 74 72 75 65 29 3b | er()->getLockedRepository(true); |
20120 | 0a 7d 20 65 6c 73 65 20 7b 0a 24 72 65 70 6f 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 | .}.else.{.$repo.=.$composer->get |
20140 | 52 65 70 6f 73 69 74 6f 72 79 4d 61 6e 61 67 65 72 28 29 2d 3e 67 65 74 4c 6f 63 61 6c 52 65 70 | RepositoryManager()->getLocalRep |
20160 | 6f 73 69 74 6f 72 79 28 29 3b 0a 7d 0a 0a 69 66 20 28 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 | ository();.}..if.($composer->get |
20180 | 50 61 63 6b 61 67 65 28 29 2d 3e 67 65 74 54 79 70 65 28 29 20 21 3d 3d 20 27 70 72 6f 6a 65 63 | Package()->getType().!==.'projec |
201a0 | 74 27 20 26 26 20 21 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 64 65 76 2d 6f 6e | t'.&&.!$input->getOption('dev-on |
201c0 | 6c 79 27 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 77 61 72 6e 69 6e | ly')).{.$io->writeError('<warnin |
201e0 | 67 3e 57 61 72 6e 69 6e 67 3a 20 42 75 6d 70 69 6e 67 20 64 65 70 65 6e 64 65 6e 63 79 20 63 6f | g>Warning:.Bumping.dependency.co |
20200 | 6e 73 74 72 61 69 6e 74 73 20 69 73 20 6e 6f 74 20 72 65 63 6f 6d 6d 65 6e 64 65 64 20 66 6f 72 | nstraints.is.not.recommended.for |
20220 | 20 6c 69 62 72 61 72 69 65 73 20 61 73 20 69 74 20 77 69 6c 6c 20 6e 61 72 72 6f 77 20 64 6f 77 | .libraries.as.it.will.narrow.dow |
20240 | 6e 20 79 6f 75 72 20 64 65 70 65 6e 64 65 6e 63 69 65 73 20 61 6e 64 20 6d 61 79 20 63 61 75 73 | n.your.dependencies.and.may.caus |
20260 | 65 20 70 72 6f 62 6c 65 6d 73 20 66 6f 72 20 79 6f 75 72 20 75 73 65 72 73 2e 3c 2f 77 61 72 6e | e.problems.for.your.users.</warn |
20280 | 69 6e 67 3e 27 29 3b 0a 0a 24 63 6f 6e 74 65 6e 74 73 20 3d 20 24 63 6f 6d 70 6f 73 65 72 4a 73 | ing>');..$contents.=.$composerJs |
202a0 | 6f 6e 2d 3e 72 65 61 64 28 29 3b 0a 69 66 20 28 21 69 73 73 65 74 28 24 63 6f 6e 74 65 6e 74 73 | on->read();.if.(!isset($contents |
202c0 | 5b 27 74 79 70 65 27 5d 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 77 | ['type'])).{.$io->writeError('<w |
202e0 | 61 72 6e 69 6e 67 3e 49 66 20 79 6f 75 72 20 70 61 63 6b 61 67 65 20 69 73 20 6e 6f 74 20 61 20 | arning>If.your.package.is.not.a. |
20300 | 6c 69 62 72 61 72 79 2c 20 79 6f 75 20 63 61 6e 20 65 78 70 6c 69 63 69 74 6c 79 20 73 70 65 63 | library,.you.can.explicitly.spec |
20320 | 69 66 79 20 74 68 65 20 22 74 79 70 65 22 20 62 79 20 75 73 69 6e 67 20 22 63 6f 6d 70 6f 73 65 | ify.the."type".by.using."compose |
20340 | 72 20 63 6f 6e 66 69 67 20 74 79 70 65 20 70 72 6f 6a 65 63 74 22 2e 3c 2f 77 61 72 6e 69 6e 67 | r.config.type.project".</warning |
20360 | 3e 27 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 77 61 72 6e 69 6e 67 3e 41 | >');.$io->writeError('<warning>A |
20380 | 6c 74 65 72 6e 61 74 69 76 65 6c 79 20 79 6f 75 20 63 61 6e 20 75 73 65 20 2d 2d 64 65 76 2d 6f | lternatively.you.can.use.--dev-o |
203a0 | 6e 6c 79 20 74 6f 20 6f 6e 6c 79 20 62 75 6d 70 20 64 65 70 65 6e 64 65 6e 63 69 65 73 20 77 69 | nly.to.only.bump.dependencies.wi |
203c0 | 74 68 69 6e 20 22 72 65 71 75 69 72 65 2d 64 65 76 22 2e 3c 2f 77 61 72 6e 69 6e 67 3e 27 29 3b | thin."require-dev".</warning>'); |
203e0 | 0a 7d 0a 75 6e 73 65 74 28 24 63 6f 6e 74 65 6e 74 73 29 3b 0a 7d 0a 0a 24 62 75 6d 70 65 72 20 | .}.unset($contents);.}..$bumper. |
20400 | 3d 20 6e 65 77 20 56 65 72 73 69 6f 6e 42 75 6d 70 65 72 28 29 3b 0a 24 74 61 73 6b 73 20 3d 20 | =.new.VersionBumper();.$tasks.=. |
20420 | 5b 5d 3b 0a 69 66 20 28 21 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 64 | [];.if.(!$input->getOption('no-d |
20440 | 65 76 2d 6f 6e 6c 79 27 29 29 20 7b 0a 24 74 61 73 6b 73 5b 27 72 65 71 75 69 72 65 2d 64 65 76 | ev-only')).{.$tasks['require-dev |
20460 | 27 5d 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 50 61 63 6b 61 67 65 28 29 2d 3e 67 65 | '].=.$composer->getPackage()->ge |
20480 | 74 44 65 76 52 65 71 75 69 72 65 73 28 29 3b 0a 7d 0a 69 66 20 28 21 24 69 6e 70 75 74 2d 3e 67 | tDevRequires();.}.if.(!$input->g |
204a0 | 65 74 4f 70 74 69 6f 6e 28 27 64 65 76 2d 6f 6e 6c 79 27 29 29 20 7b 0a 24 74 61 73 6b 73 5b 27 | etOption('dev-only')).{.$tasks[' |
204c0 | 72 65 71 75 69 72 65 27 5d 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 50 61 63 6b 61 67 | require'].=.$composer->getPackag |
204e0 | 65 28 29 2d 3e 67 65 74 52 65 71 75 69 72 65 73 28 29 3b 0a 7d 0a 0a 24 75 70 64 61 74 65 73 20 | e()->getRequires();.}..$updates. |
20500 | 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 74 61 73 6b 73 20 61 73 20 24 6b 65 79 20 3d 3e | =.[];.foreach.($tasks.as.$key.=> |
20520 | 20 24 72 65 71 73 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 72 65 71 73 20 61 73 20 24 70 6b 67 | .$reqs).{.foreach.($reqs.as.$pkg |
20540 | 4e 61 6d 65 20 3d 3e 20 24 6c 69 6e 6b 29 20 7b 0a 69 66 20 28 50 6c 61 74 66 6f 72 6d 52 65 70 | Name.=>.$link).{.if.(PlatformRep |
20560 | 6f 73 69 74 6f 72 79 3a 3a 69 73 50 6c 61 74 66 6f 72 6d 50 61 63 6b 61 67 65 28 24 70 6b 67 4e | ository::isPlatformPackage($pkgN |
20580 | 61 6d 65 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 24 63 75 72 72 65 6e 74 43 6f 6e 73 | ame)).{.continue;.}.$currentCons |
205a0 | 74 72 61 69 6e 74 20 3d 20 24 6c 69 6e 6b 2d 3e 67 65 74 50 72 65 74 74 79 43 6f 6e 73 74 72 61 | traint.=.$link->getPrettyConstra |
205c0 | 69 6e 74 28 29 3b 0a 0a 24 70 61 63 6b 61 67 65 20 3d 20 24 72 65 70 6f 2d 3e 66 69 6e 64 50 61 | int();..$package.=.$repo->findPa |
205e0 | 63 6b 61 67 65 28 24 70 6b 67 4e 61 6d 65 2c 20 27 2a 27 29 3b 0a 0a 69 66 20 28 6e 75 6c 6c 20 | ckage($pkgName,.'*');..if.(null. |
20600 | 3d 3d 3d 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 77 68 69 6c | ===.$package).{.continue;.}.whil |
20620 | 65 20 28 24 70 61 63 6b 61 67 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 41 6c 69 61 73 50 61 63 6b | e.($package.instanceof.AliasPack |
20640 | 61 67 65 29 20 7b 0a 24 70 61 63 6b 61 67 65 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 41 | age).{.$package.=.$package->getA |
20660 | 6c 69 61 73 4f 66 28 29 3b 0a 7d 0a 0a 24 62 75 6d 70 65 64 20 3d 20 24 62 75 6d 70 65 72 2d 3e | liasOf();.}..$bumped.=.$bumper-> |
20680 | 62 75 6d 70 52 65 71 75 69 72 65 6d 65 6e 74 28 24 6c 69 6e 6b 2d 3e 67 65 74 43 6f 6e 73 74 72 | bumpRequirement($link->getConstr |
206a0 | 61 69 6e 74 28 29 2c 20 24 70 61 63 6b 61 67 65 29 3b 0a 0a 69 66 20 28 24 62 75 6d 70 65 64 20 | aint(),.$package);..if.($bumped. |
206c0 | 3d 3d 3d 20 24 63 75 72 72 65 6e 74 43 6f 6e 73 74 72 61 69 6e 74 29 20 7b 0a 63 6f 6e 74 69 6e | ===.$currentConstraint).{.contin |
206e0 | 75 65 3b 0a 7d 0a 0a 24 75 70 64 61 74 65 73 5b 24 6b 65 79 5d 5b 24 70 6b 67 4e 61 6d 65 5d 20 | ue;.}..$updates[$key][$pkgName]. |
20700 | 3d 20 24 62 75 6d 70 65 64 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 21 24 74 68 69 73 2d 3e 75 70 64 61 | =.$bumped;.}.}..if.(!$this->upda |
20720 | 74 65 46 69 6c 65 43 6c 65 61 6e 6c 79 28 24 63 6f 6d 70 6f 73 65 72 4a 73 6f 6e 2c 20 24 75 70 | teFileCleanly($composerJson,.$up |
20740 | 64 61 74 65 73 29 29 20 7b 0a 24 63 6f 6d 70 6f 73 65 72 44 65 66 69 6e 69 74 69 6f 6e 20 3d 20 | dates)).{.$composerDefinition.=. |
20760 | 24 63 6f 6d 70 6f 73 65 72 4a 73 6f 6e 2d 3e 72 65 61 64 28 29 3b 0a 66 6f 72 65 61 63 68 20 28 | $composerJson->read();.foreach.( |
20780 | 24 75 70 64 61 74 65 73 20 61 73 20 24 6b 65 79 20 3d 3e 20 24 70 61 63 6b 61 67 65 73 29 20 7b | $updates.as.$key.=>.$packages).{ |
207a0 | 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 73 20 61 73 20 24 70 61 63 6b 61 67 65 20 | .foreach.($packages.as.$package. |
207c0 | 3d 3e 20 24 76 65 72 73 69 6f 6e 29 20 7b 0a 24 63 6f 6d 70 6f 73 65 72 44 65 66 69 6e 69 74 69 | =>.$version).{.$composerDefiniti |
207e0 | 6f 6e 5b 24 6b 65 79 5d 5b 24 70 61 63 6b 61 67 65 5d 20 3d 20 24 76 65 72 73 69 6f 6e 3b 0a 7d | on[$key][$package].=.$version;.} |
20800 | 0a 7d 0a 24 63 6f 6d 70 6f 73 65 72 4a 73 6f 6e 2d 3e 77 72 69 74 65 28 24 63 6f 6d 70 6f 73 65 | .}.$composerJson->write($compose |
20820 | 72 44 65 66 69 6e 69 74 69 6f 6e 29 3b 0a 7d 0a 0a 24 63 68 61 6e 67 65 43 6f 75 6e 74 20 3d 20 | rDefinition);.}..$changeCount.=. |
20840 | 61 72 72 61 79 5f 73 75 6d 28 61 72 72 61 79 5f 6d 61 70 28 27 63 6f 75 6e 74 27 2c 20 24 75 70 | array_sum(array_map('count',.$up |
20860 | 64 61 74 65 73 29 29 3b 0a 69 66 20 28 24 63 68 61 6e 67 65 43 6f 75 6e 74 20 3e 20 30 29 20 7b | dates));.if.($changeCount.>.0).{ |
20880 | 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 3c 69 6e 66 6f 3e 27 2e 24 63 6f 6d 70 6f 73 65 72 4a 73 | .$io->write('<info>'.$composerJs |
208a0 | 6f 6e 50 61 74 68 2e 27 20 68 61 73 20 62 65 65 6e 20 75 70 64 61 74 65 64 20 28 27 2e 24 63 68 | onPath.'.has.been.updated.('.$ch |
208c0 | 61 6e 67 65 43 6f 75 6e 74 2e 27 20 63 68 61 6e 67 65 73 29 2e 3c 2f 69 6e 66 6f 3e 27 29 3b 0a | angeCount.'.changes).</info>');. |
208e0 | 7d 20 65 6c 73 65 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 3c 69 6e 66 6f 3e 4e 6f 20 72 65 | }.else.{.$io->write('<info>No.re |
20900 | 71 75 69 72 65 6d 65 6e 74 73 20 74 6f 20 75 70 64 61 74 65 20 69 6e 20 27 2e 24 63 6f 6d 70 6f | quirements.to.update.in.'.$compo |
20920 | 73 65 72 4a 73 6f 6e 50 61 74 68 2e 27 2e 3c 2f 69 6e 66 6f 3e 27 29 3b 0a 7d 0a 0a 69 66 20 28 | serJsonPath.'.</info>');.}..if.( |
20940 | 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 4c 6f 63 6b 65 72 28 29 2d 3e 69 73 4c 6f 63 6b 65 64 | $composer->getLocker()->isLocked |
20960 | 28 29 20 26 26 20 24 63 68 61 6e 67 65 43 6f 75 6e 74 20 3e 20 30 29 20 7b 0a 24 63 6f 6e 74 65 | ().&&.$changeCount.>.0).{.$conte |
20980 | 6e 74 73 20 3d 20 66 69 6c 65 5f 67 65 74 5f 63 6f 6e 74 65 6e 74 73 28 24 63 6f 6d 70 6f 73 65 | nts.=.file_get_contents($compose |
209a0 | 72 4a 73 6f 6e 2d 3e 67 65 74 50 61 74 68 28 29 29 3b 0a 69 66 20 28 66 61 6c 73 65 20 3d 3d 3d | rJson->getPath());.if.(false.=== |
209c0 | 20 24 63 6f 6e 74 65 6e 74 73 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 | .$contents).{.throw.new.\Runtime |
209e0 | 45 78 63 65 70 74 69 6f 6e 28 27 55 6e 61 62 6c 65 20 74 6f 20 72 65 61 64 20 27 2e 24 63 6f 6d | Exception('Unable.to.read.'.$com |
20a00 | 70 6f 73 65 72 4a 73 6f 6e 2d 3e 67 65 74 50 61 74 68 28 29 2e 27 20 63 6f 6e 74 65 6e 74 73 20 | poserJson->getPath().'.contents. |
20a20 | 74 6f 20 75 70 64 61 74 65 20 74 68 65 20 6c 6f 63 6b 20 66 69 6c 65 20 68 61 73 68 2e 27 29 3b | to.update.the.lock.file.hash.'); |
20a40 | 0a 7d 0a 24 6c 6f 63 6b 20 3d 20 6e 65 77 20 4a 73 6f 6e 46 69 6c 65 28 46 61 63 74 6f 72 79 3a | .}.$lock.=.new.JsonFile(Factory: |
20a60 | 3a 67 65 74 4c 6f 63 6b 46 69 6c 65 28 24 63 6f 6d 70 6f 73 65 72 4a 73 6f 6e 50 61 74 68 29 29 | :getLockFile($composerJsonPath)) |
20a80 | 3b 0a 24 6c 6f 63 6b 44 61 74 61 20 3d 20 24 6c 6f 63 6b 2d 3e 72 65 61 64 28 29 3b 0a 24 6c 6f | ;.$lockData.=.$lock->read();.$lo |
20aa0 | 63 6b 44 61 74 61 5b 27 63 6f 6e 74 65 6e 74 2d 68 61 73 68 27 5d 20 3d 20 4c 6f 63 6b 65 72 3a | ckData['content-hash'].=.Locker: |
20ac0 | 3a 67 65 74 43 6f 6e 74 65 6e 74 48 61 73 68 28 24 63 6f 6e 74 65 6e 74 73 29 3b 0a 24 6c 6f 63 | :getContentHash($contents);.$loc |
20ae0 | 6b 2d 3e 77 72 69 74 65 28 24 6c 6f 63 6b 44 61 74 61 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 30 | k->write($lockData);.}..return.0 |
20b00 | 3b 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 75 70 64 61 74 65 46 | ;.}.....private.function.updateF |
20b20 | 69 6c 65 43 6c 65 61 6e 6c 79 28 4a 73 6f 6e 46 69 6c 65 20 24 6a 73 6f 6e 2c 20 61 72 72 61 79 | ileCleanly(JsonFile.$json,.array |
20b40 | 20 24 75 70 64 61 74 65 73 29 3a 20 62 6f 6f 6c 0a 7b 0a 24 63 6f 6e 74 65 6e 74 73 20 3d 20 66 | .$updates):.bool.{.$contents.=.f |
20b60 | 69 6c 65 5f 67 65 74 5f 63 6f 6e 74 65 6e 74 73 28 24 6a 73 6f 6e 2d 3e 67 65 74 50 61 74 68 28 | ile_get_contents($json->getPath( |
20b80 | 29 29 3b 0a 69 66 20 28 66 61 6c 73 65 20 3d 3d 3d 20 24 63 6f 6e 74 65 6e 74 73 29 20 7b 0a 74 | ));.if.(false.===.$contents).{.t |
20ba0 | 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 55 6e 61 62 | hrow.new.\RuntimeException('Unab |
20bc0 | 6c 65 20 74 6f 20 72 65 61 64 20 27 2e 24 6a 73 6f 6e 2d 3e 67 65 74 50 61 74 68 28 29 2e 27 20 | le.to.read.'.$json->getPath().'. |
20be0 | 63 6f 6e 74 65 6e 74 73 2e 27 29 3b 0a 7d 0a 0a 24 6d 61 6e 69 70 75 6c 61 74 6f 72 20 3d 20 6e | contents.');.}..$manipulator.=.n |
20c00 | 65 77 20 4a 73 6f 6e 4d 61 6e 69 70 75 6c 61 74 6f 72 28 24 63 6f 6e 74 65 6e 74 73 29 3b 0a 0a | ew.JsonManipulator($contents);.. |
20c20 | 66 6f 72 65 61 63 68 20 28 24 75 70 64 61 74 65 73 20 61 73 20 24 6b 65 79 20 3d 3e 20 24 70 61 | foreach.($updates.as.$key.=>.$pa |
20c40 | 63 6b 61 67 65 73 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 73 20 61 73 20 | ckages).{.foreach.($packages.as. |
20c60 | 24 70 61 63 6b 61 67 65 20 3d 3e 20 24 76 65 72 73 69 6f 6e 29 20 7b 0a 69 66 20 28 21 24 6d 61 | $package.=>.$version).{.if.(!$ma |
20c80 | 6e 69 70 75 6c 61 74 6f 72 2d 3e 61 64 64 4c 69 6e 6b 28 24 6b 65 79 2c 20 24 70 61 63 6b 61 67 | nipulator->addLink($key,.$packag |
20ca0 | 65 2c 20 24 76 65 72 73 69 6f 6e 29 29 20 7b 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a | e,.$version)).{.return.false;.}. |
20cc0 | 7d 0a 7d 0a 0a 69 66 20 28 66 61 6c 73 65 20 3d 3d 3d 20 66 69 6c 65 5f 70 75 74 5f 63 6f 6e 74 | }.}..if.(false.===.file_put_cont |
20ce0 | 65 6e 74 73 28 24 6a 73 6f 6e 2d 3e 67 65 74 50 61 74 68 28 29 2c 20 24 6d 61 6e 69 70 75 6c 61 | ents($json->getPath(),.$manipula |
20d00 | 74 6f 72 2d 3e 67 65 74 43 6f 6e 74 65 6e 74 73 28 29 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 | tor->getContents())).{.throw.new |
20d20 | 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 55 6e 61 62 6c 65 20 74 6f 20 77 72 | .\RuntimeException('Unable.to.wr |
20d40 | 69 74 65 20 6e 65 77 20 27 2e 24 6a 73 6f 6e 2d 3e 67 65 74 50 61 74 68 28 29 2e 27 20 63 6f 6e | ite.new.'.$json->getPath().'.con |
20d60 | 74 65 6e 74 73 2e 27 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 7d 0a 3c 3f | tents.');.}..return.true;.}.}.<? |
20d80 | 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a | php.declare(strict_types=1);.... |
20da0 | 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6d 6d 61 | ........namespace.Composer\Comma |
20dc0 | 6e 64 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 4c 69 6e 6b 3b 0a | nd;..use.Composer\Package\Link;. |
20de0 | 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 65 6d 76 65 72 5c 43 6f 6e 73 74 72 61 69 6e 74 5c 43 | use.Composer\Semver\Constraint\C |
20e00 | 6f 6e 73 74 72 61 69 6e 74 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 | onstraint;.use.Symfony\Component |
20e20 | 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 | \Console\Input\InputInterface;.u |
20e40 | 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 4f | se.Composer\Console\Input\InputO |
20e60 | 70 74 69 6f 6e 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e | ption;.use.Symfony\Component\Con |
20e80 | 73 6f 6c 65 5c 4f 75 74 70 75 74 5c 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 | sole\Output\OutputInterface;.use |
20ea0 | 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 50 6c 61 74 66 6f 72 6d 52 65 70 | .Composer\Repository\PlatformRep |
20ec0 | 6f 73 69 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 | ository;.use.Composer\Repository |
20ee0 | 5c 52 6f 6f 74 50 61 63 6b 61 67 65 52 65 70 6f 73 69 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 | \RootPackageRepository;.use.Comp |
20f00 | 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 | oser\Repository\InstalledReposit |
20f20 | 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 4a 73 6f 6e 5c 4a 73 6f 6e 46 69 6c 65 3b | ory;.use.Composer\Json\JsonFile; |
20f40 | 0a 0a 63 6c 61 73 73 20 43 68 65 63 6b 50 6c 61 74 66 6f 72 6d 52 65 71 73 43 6f 6d 6d 61 6e 64 | ..class.CheckPlatformReqsCommand |
20f60 | 20 65 78 74 65 6e 64 73 20 42 61 73 65 43 6f 6d 6d 61 6e 64 0a 7b 0a 70 72 6f 74 65 63 74 65 64 | .extends.BaseCommand.{.protected |
20f80 | 20 66 75 6e 63 74 69 6f 6e 20 63 6f 6e 66 69 67 75 72 65 28 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 | .function.configure():.void.{.$t |
20fa0 | 68 69 73 2d 3e 73 65 74 4e 61 6d 65 28 27 63 68 65 63 6b 2d 70 6c 61 74 66 6f 72 6d 2d 72 65 71 | his->setName('check-platform-req |
20fc0 | 73 27 29 0a 2d 3e 73 65 74 44 65 73 63 72 69 70 74 69 6f 6e 28 27 43 68 65 63 6b 20 74 68 61 74 | s').->setDescription('Check.that |
20fe0 | 20 70 6c 61 74 66 6f 72 6d 20 72 65 71 75 69 72 65 6d 65 6e 74 73 20 61 72 65 20 73 61 74 69 73 | .platform.requirements.are.satis |
21000 | 66 69 65 64 27 29 0a 2d 3e 73 65 74 44 65 66 69 6e 69 74 69 6f 6e 28 5b 0a 6e 65 77 20 49 6e 70 | fied').->setDefinition([.new.Inp |
21020 | 75 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 64 65 76 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 | utOption('no-dev',.null,.InputOp |
21040 | 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 44 69 73 61 62 6c 65 73 20 63 68 65 63 | tion::VALUE_NONE,.'Disables.chec |
21060 | 6b 69 6e 67 20 6f 66 20 72 65 71 75 69 72 65 2d 64 65 76 20 70 61 63 6b 61 67 65 73 20 72 65 71 | king.of.require-dev.packages.req |
21080 | 75 69 72 65 6d 65 6e 74 73 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6c | uirements.'),.new.InputOption('l |
210a0 | 6f 63 6b 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e | ock',.null,.InputOption::VALUE_N |
210c0 | 4f 4e 45 2c 20 27 43 68 65 63 6b 73 20 72 65 71 75 69 72 65 6d 65 6e 74 73 20 6f 6e 6c 79 20 66 | ONE,.'Checks.requirements.only.f |
210e0 | 72 6f 6d 20 74 68 65 20 6c 6f 63 6b 20 66 69 6c 65 2c 20 6e 6f 74 20 66 72 6f 6d 20 69 6e 73 74 | rom.the.lock.file,.not.from.inst |
21100 | 61 6c 6c 65 64 20 70 61 63 6b 61 67 65 73 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 | alled.packages.'),.new.InputOpti |
21120 | 6f 6e 28 27 66 6f 72 6d 61 74 27 2c 20 27 66 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 | on('format',.'f',.InputOption::V |
21140 | 41 4c 55 45 5f 52 45 51 55 49 52 45 44 2c 20 27 46 6f 72 6d 61 74 20 6f 66 20 74 68 65 20 6f 75 | ALUE_REQUIRED,.'Format.of.the.ou |
21160 | 74 70 75 74 3a 20 74 65 78 74 20 6f 72 20 6a 73 6f 6e 27 2c 20 27 74 65 78 74 27 2c 20 5b 27 6a | tput:.text.or.json',.'text',.['j |
21180 | 73 6f 6e 27 2c 20 27 74 65 78 74 27 5d 29 2c 0a 5d 29 0a 2d 3e 73 65 74 48 65 6c 70 28 0a 3c 3c | son',.'text']),.]).->setHelp(.<< |
211a0 | 3c 45 4f 54 0a 43 68 65 63 6b 73 20 74 68 61 74 20 79 6f 75 72 20 50 48 50 20 61 6e 64 20 65 78 | <EOT.Checks.that.your.PHP.and.ex |
211c0 | 74 65 6e 73 69 6f 6e 73 20 76 65 72 73 69 6f 6e 73 20 6d 61 74 63 68 20 74 68 65 20 70 6c 61 74 | tensions.versions.match.the.plat |
211e0 | 66 6f 72 6d 20 72 65 71 75 69 72 65 6d 65 6e 74 73 20 6f 66 20 74 68 65 20 69 6e 73 74 61 6c 6c | form.requirements.of.the.install |
21200 | 65 64 20 70 61 63 6b 61 67 65 73 2e 0a 0a 55 6e 6c 69 6b 65 20 75 70 64 61 74 65 2f 69 6e 73 74 | ed.packages...Unlike.update/inst |
21220 | 61 6c 6c 2c 20 74 68 69 73 20 63 6f 6d 6d 61 6e 64 20 77 69 6c 6c 20 69 67 6e 6f 72 65 20 63 6f | all,.this.command.will.ignore.co |
21240 | 6e 66 69 67 2e 70 6c 61 74 66 6f 72 6d 20 73 65 74 74 69 6e 67 73 20 61 6e 64 20 63 68 65 63 6b | nfig.platform.settings.and.check |
21260 | 20 74 68 65 20 72 65 61 6c 20 70 6c 61 74 66 6f 72 6d 20 70 61 63 6b 61 67 65 73 20 73 6f 20 79 | .the.real.platform.packages.so.y |
21280 | 6f 75 20 63 61 6e 20 62 65 20 63 65 72 74 61 69 6e 20 79 6f 75 20 68 61 76 65 20 74 68 65 20 72 | ou.can.be.certain.you.have.the.r |
212a0 | 65 71 75 69 72 65 64 20 70 6c 61 74 66 6f 72 6d 20 64 65 70 65 6e 64 65 6e 63 69 65 73 2e 0a 0a | equired.platform.dependencies... |
212c0 | 3c 69 6e 66 6f 3e 70 68 70 20 63 6f 6d 70 6f 73 65 72 2e 70 68 61 72 20 63 68 65 63 6b 2d 70 6c | <info>php.composer.phar.check-pl |
212e0 | 61 74 66 6f 72 6d 2d 72 65 71 73 3c 2f 69 6e 66 6f 3e 0a 0a 45 4f 54 0a 29 3b 0a 7d 0a 0a 70 72 | atform-reqs</info>..EOT.);.}..pr |
21300 | 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 65 78 65 63 75 74 65 28 49 6e 70 75 74 49 6e | otected.function.execute(InputIn |
21320 | 74 65 72 66 61 63 65 20 24 69 6e 70 75 74 2c 20 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 20 | terface.$input,.OutputInterface. |
21340 | 24 6f 75 74 70 75 74 29 3a 20 69 6e 74 0a 7b 0a 24 63 6f 6d 70 6f 73 65 72 20 3d 20 24 74 68 69 | $output):.int.{.$composer.=.$thi |
21360 | 73 2d 3e 72 65 71 75 69 72 65 43 6f 6d 70 6f 73 65 72 28 29 3b 0a 0a 24 72 65 71 75 69 72 65 73 | s->requireComposer();..$requires |
21380 | 20 3d 20 5b 5d 3b 0a 24 72 65 6d 6f 76 65 50 61 63 6b 61 67 65 73 20 3d 20 5b 5d 3b 0a 69 66 20 | .=.[];.$removePackages.=.[];.if. |
213a0 | 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6c 6f 63 6b 27 29 29 20 7b 0a 24 74 | ($input->getOption('lock')).{.$t |
213c0 | 68 69 73 2d 3e 67 65 74 49 4f 28 29 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 69 6e 66 6f 3e | his->getIO()->writeError('<info> |
213e0 | 43 68 65 63 6b 69 6e 67 20 27 2e 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6e | Checking.'.($input->getOption('n |
21400 | 6f 2d 64 65 76 27 29 20 3f 20 27 6e 6f 6e 2d 64 65 76 20 27 20 3a 20 27 27 29 2e 27 70 6c 61 74 | o-dev').?.'non-dev.'.:.'').'plat |
21420 | 66 6f 72 6d 20 72 65 71 75 69 72 65 6d 65 6e 74 73 20 75 73 69 6e 67 20 74 68 65 20 6c 6f 63 6b | form.requirements.using.the.lock |
21440 | 20 66 69 6c 65 3c 2f 69 6e 66 6f 3e 27 29 3b 0a 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 20 3d | .file</info>');.$installedRepo.= |
21460 | 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 4c 6f 63 6b 65 72 28 29 2d 3e 67 65 74 4c 6f 63 6b | .$composer->getLocker()->getLock |
21480 | 65 64 52 65 70 6f 73 69 74 6f 72 79 28 21 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 | edRepository(!$input->getOption( |
214a0 | 27 6e 6f 2d 64 65 76 27 29 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 69 6e 73 74 61 6c 6c 65 64 52 | 'no-dev'));.}.else.{.$installedR |
214c0 | 65 70 6f 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 79 4d 61 | epo.=.$composer->getRepositoryMa |
214e0 | 6e 61 67 65 72 28 29 2d 3e 67 65 74 4c 6f 63 61 6c 52 65 70 6f 73 69 74 6f 72 79 28 29 3b 0a 0a | nager()->getLocalRepository();.. |
21500 | 69 66 20 28 21 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 2d 3e 67 65 74 50 61 63 6b 61 67 65 73 | if.(!$installedRepo->getPackages |
21520 | 28 29 29 20 7b 0a 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 2d 3e 77 72 69 74 65 45 72 72 6f 72 | ()).{.$this->getIO()->writeError |
21540 | 28 27 3c 77 61 72 6e 69 6e 67 3e 4e 6f 20 76 65 6e 64 6f 72 20 64 69 72 20 70 72 65 73 65 6e 74 | ('<warning>No.vendor.dir.present |
21560 | 2c 20 63 68 65 63 6b 69 6e 67 20 27 2e 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 | ,.checking.'.($input->getOption( |
21580 | 27 6e 6f 2d 64 65 76 27 29 20 3f 20 27 6e 6f 6e 2d 64 65 76 20 27 20 3a 20 27 27 29 2e 27 70 6c | 'no-dev').?.'non-dev.'.:.'').'pl |
215a0 | 61 74 66 6f 72 6d 20 72 65 71 75 69 72 65 6d 65 6e 74 73 20 66 72 6f 6d 20 74 68 65 20 6c 6f 63 | atform.requirements.from.the.loc |
215c0 | 6b 20 66 69 6c 65 3c 2f 77 61 72 6e 69 6e 67 3e 27 29 3b 0a 24 69 6e 73 74 61 6c 6c 65 64 52 65 | k.file</warning>');.$installedRe |
215e0 | 70 6f 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 4c 6f 63 6b 65 72 28 29 2d 3e 67 65 74 | po.=.$composer->getLocker()->get |
21600 | 4c 6f 63 6b 65 64 52 65 70 6f 73 69 74 6f 72 79 28 21 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 | LockedRepository(!$input->getOpt |
21620 | 69 6f 6e 28 27 6e 6f 2d 64 65 76 27 29 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 69 66 20 28 24 69 6e | ion('no-dev'));.}.else.{.if.($in |
21640 | 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 64 65 76 27 29 29 20 7b 0a 24 72 65 6d | put->getOption('no-dev')).{.$rem |
21660 | 6f 76 65 50 61 63 6b 61 67 65 73 20 3d 20 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 2d 3e 67 65 | ovePackages.=.$installedRepo->ge |
21680 | 74 44 65 76 50 61 63 6b 61 67 65 4e 61 6d 65 73 28 29 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 67 65 | tDevPackageNames();.}..$this->ge |
216a0 | 74 49 4f 28 29 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 69 6e 66 6f 3e 43 68 65 63 6b 69 6e | tIO()->writeError('<info>Checkin |
216c0 | 67 20 27 2e 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 64 65 76 27 29 | g.'.($input->getOption('no-dev') |
216e0 | 20 3f 20 27 6e 6f 6e 2d 64 65 76 20 27 20 3a 20 27 27 29 2e 27 70 6c 61 74 66 6f 72 6d 20 72 65 | .?.'non-dev.'.:.'').'platform.re |
21700 | 71 75 69 72 65 6d 65 6e 74 73 20 66 6f 72 20 70 61 63 6b 61 67 65 73 20 69 6e 20 74 68 65 20 76 | quirements.for.packages.in.the.v |
21720 | 65 6e 64 6f 72 20 64 69 72 3c 2f 69 6e 66 6f 3e 27 29 3b 0a 7d 0a 7d 0a 69 66 20 28 21 24 69 6e | endor.dir</info>');.}.}.if.(!$in |
21740 | 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 64 65 76 27 29 29 20 7b 0a 24 72 65 71 | put->getOption('no-dev')).{.$req |
21760 | 75 69 72 65 73 20 2b 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 50 61 63 6b 61 67 65 28 29 | uires.+=.$composer->getPackage() |
21780 | 2d 3e 67 65 74 44 65 76 52 65 71 75 69 72 65 73 28 29 3b 0a 7d 0a 0a 66 6f 72 65 61 63 68 20 28 | ->getDevRequires();.}..foreach.( |
217a0 | 24 72 65 71 75 69 72 65 73 20 61 73 20 24 72 65 71 75 69 72 65 20 3d 3e 20 24 6c 69 6e 6b 29 20 | $requires.as.$require.=>.$link). |
217c0 | 7b 0a 24 72 65 71 75 69 72 65 73 5b 24 72 65 71 75 69 72 65 5d 20 3d 20 5b 24 6c 69 6e 6b 5d 3b | {.$requires[$require].=.[$link]; |
217e0 | 0a 7d 0a 0a 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 20 3d 20 6e 65 77 20 49 6e 73 74 61 6c 6c | .}..$installedRepo.=.new.Install |
21800 | 65 64 52 65 70 6f 73 69 74 6f 72 79 28 5b 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 2c 20 6e 65 | edRepository([$installedRepo,.ne |
21820 | 77 20 52 6f 6f 74 50 61 63 6b 61 67 65 52 65 70 6f 73 69 74 6f 72 79 28 63 6c 6f 6e 65 20 24 63 | w.RootPackageRepository(clone.$c |
21840 | 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 50 61 63 6b 61 67 65 28 29 29 5d 29 3b 0a 66 6f 72 65 61 63 | omposer->getPackage())]);.foreac |
21860 | 68 20 28 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 2d 3e 67 65 74 50 61 63 6b 61 67 65 73 28 29 | h.($installedRepo->getPackages() |
21880 | 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 69 66 20 28 69 6e 5f 61 72 72 61 79 28 24 70 61 | .as.$package).{.if.(in_array($pa |
218a0 | 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 2c 20 24 72 65 6d 6f 76 65 50 61 63 6b 61 67 65 | ckage->getName(),.$removePackage |
218c0 | 73 2c 20 74 72 75 65 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 66 6f 72 65 61 63 68 20 | s,.true)).{.continue;.}.foreach. |
218e0 | 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 52 65 71 75 69 72 65 73 28 29 20 61 73 20 24 72 65 71 | ($package->getRequires().as.$req |
21900 | 75 69 72 65 20 3d 3e 20 24 6c 69 6e 6b 29 20 7b 0a 24 72 65 71 75 69 72 65 73 5b 24 72 65 71 75 | uire.=>.$link).{.$requires[$requ |
21920 | 69 72 65 5d 5b 5d 20 3d 20 24 6c 69 6e 6b 3b 0a 7d 0a 7d 0a 0a 6b 73 6f 72 74 28 24 72 65 71 75 | ire][].=.$link;.}.}..ksort($requ |
21940 | 69 72 65 73 29 3b 0a 0a 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 2d 3e 61 64 64 52 65 70 6f 73 | ires);..$installedRepo->addRepos |
21960 | 69 74 6f 72 79 28 6e 65 77 20 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 28 5b 5d 2c | itory(new.PlatformRepository([], |
21980 | 20 5b 5d 29 29 3b 0a 0a 24 72 65 73 75 6c 74 73 20 3d 20 5b 5d 3b 0a 24 65 78 69 74 43 6f 64 65 | .[]));..$results.=.[];.$exitCode |
219a0 | 20 3d 20 30 3b 0a 0a 0a 0a 0a 66 6f 72 65 61 63 68 20 28 24 72 65 71 75 69 72 65 73 20 61 73 20 | .=.0;.....foreach.($requires.as. |
219c0 | 24 72 65 71 75 69 72 65 20 3d 3e 20 24 6c 69 6e 6b 73 29 20 7b 0a 69 66 20 28 50 6c 61 74 66 6f | $require.=>.$links).{.if.(Platfo |
219e0 | 72 6d 52 65 70 6f 73 69 74 6f 72 79 3a 3a 69 73 50 6c 61 74 66 6f 72 6d 50 61 63 6b 61 67 65 28 | rmRepository::isPlatformPackage( |
21a00 | 24 72 65 71 75 69 72 65 29 29 20 7b 0a 24 63 61 6e 64 69 64 61 74 65 73 20 3d 20 24 69 6e 73 74 | $require)).{.$candidates.=.$inst |
21a20 | 61 6c 6c 65 64 52 65 70 6f 2d 3e 66 69 6e 64 50 61 63 6b 61 67 65 73 57 69 74 68 52 65 70 6c 61 | alledRepo->findPackagesWithRepla |
21a40 | 63 65 72 73 41 6e 64 50 72 6f 76 69 64 65 72 73 28 24 72 65 71 75 69 72 65 29 3b 0a 69 66 20 28 | cersAndProviders($require);.if.( |
21a60 | 24 63 61 6e 64 69 64 61 74 65 73 29 20 7b 0a 24 72 65 71 52 65 73 75 6c 74 73 20 3d 20 5b 5d 3b | $candidates).{.$reqResults.=.[]; |
21a80 | 0a 66 6f 72 65 61 63 68 20 28 24 63 61 6e 64 69 64 61 74 65 73 20 61 73 20 24 63 61 6e 64 69 64 | .foreach.($candidates.as.$candid |
21aa0 | 61 74 65 29 20 7b 0a 24 63 61 6e 64 69 64 61 74 65 43 6f 6e 73 74 72 61 69 6e 74 20 3d 20 6e 75 | ate).{.$candidateConstraint.=.nu |
21ac0 | 6c 6c 3b 0a 69 66 20 28 24 63 61 6e 64 69 64 61 74 65 2d 3e 67 65 74 4e 61 6d 65 28 29 20 3d 3d | ll;.if.($candidate->getName().== |
21ae0 | 3d 20 24 72 65 71 75 69 72 65 29 20 7b 0a 24 63 61 6e 64 69 64 61 74 65 43 6f 6e 73 74 72 61 69 | =.$require).{.$candidateConstrai |
21b00 | 6e 74 20 3d 20 6e 65 77 20 43 6f 6e 73 74 72 61 69 6e 74 28 27 3d 27 2c 20 24 63 61 6e 64 69 64 | nt.=.new.Constraint('=',.$candid |
21b20 | 61 74 65 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 29 3b 0a 24 63 61 6e 64 69 64 61 74 65 43 6f | ate->getVersion());.$candidateCo |
21b40 | 6e 73 74 72 61 69 6e 74 2d 3e 73 65 74 50 72 65 74 74 79 53 74 72 69 6e 67 28 24 63 61 6e 64 69 | nstraint->setPrettyString($candi |
21b60 | 64 61 74 65 2d 3e 67 65 74 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 29 3b 0a 7d 20 65 6c 73 | date->getPrettyVersion());.}.els |
21b80 | 65 20 7b 0a 66 6f 72 65 61 63 68 20 28 61 72 72 61 79 5f 6d 65 72 67 65 28 24 63 61 6e 64 69 64 | e.{.foreach.(array_merge($candid |
21ba0 | 61 74 65 2d 3e 67 65 74 50 72 6f 76 69 64 65 73 28 29 2c 20 24 63 61 6e 64 69 64 61 74 65 2d 3e | ate->getProvides(),.$candidate-> |
21bc0 | 67 65 74 52 65 70 6c 61 63 65 73 28 29 29 20 61 73 20 24 6c 69 6e 6b 29 20 7b 0a 69 66 20 28 24 | getReplaces()).as.$link).{.if.($ |
21be0 | 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 74 28 29 20 3d 3d 3d 20 24 72 65 71 75 69 72 65 29 20 | link->getTarget().===.$require). |
21c00 | 7b 0a 24 63 61 6e 64 69 64 61 74 65 43 6f 6e 73 74 72 61 69 6e 74 20 3d 20 24 6c 69 6e 6b 2d 3e | {.$candidateConstraint.=.$link-> |
21c20 | 67 65 74 43 6f 6e 73 74 72 61 69 6e 74 28 29 3b 0a 62 72 65 61 6b 3b 0a 7d 0a 7d 0a 7d 0a 0a 0a | getConstraint();.break;.}.}.}... |
21c40 | 69 66 20 28 21 24 63 61 6e 64 69 64 61 74 65 43 6f 6e 73 74 72 61 69 6e 74 29 20 7b 0a 63 6f 6e | if.(!$candidateConstraint).{.con |
21c60 | 74 69 6e 75 65 3b 0a 7d 0a 0a 66 6f 72 65 61 63 68 20 28 24 6c 69 6e 6b 73 20 61 73 20 24 6c 69 | tinue;.}..foreach.($links.as.$li |
21c80 | 6e 6b 29 20 7b 0a 69 66 20 28 21 24 6c 69 6e 6b 2d 3e 67 65 74 43 6f 6e 73 74 72 61 69 6e 74 28 | nk).{.if.(!$link->getConstraint( |
21ca0 | 29 2d 3e 6d 61 74 63 68 65 73 28 24 63 61 6e 64 69 64 61 74 65 43 6f 6e 73 74 72 61 69 6e 74 29 | )->matches($candidateConstraint) |
21cc0 | 29 20 7b 0a 24 72 65 71 52 65 73 75 6c 74 73 5b 5d 20 3d 20 5b 0a 24 63 61 6e 64 69 64 61 74 65 | ).{.$reqResults[].=.[.$candidate |
21ce0 | 2d 3e 67 65 74 4e 61 6d 65 28 29 20 3d 3d 3d 20 24 72 65 71 75 69 72 65 20 3f 20 24 63 61 6e 64 | ->getName().===.$require.?.$cand |
21d00 | 69 64 61 74 65 2d 3e 67 65 74 50 72 65 74 74 79 4e 61 6d 65 28 29 20 3a 20 24 72 65 71 75 69 72 | idate->getPrettyName().:.$requir |
21d20 | 65 2c 0a 24 63 61 6e 64 69 64 61 74 65 43 6f 6e 73 74 72 61 69 6e 74 2d 3e 67 65 74 50 72 65 74 | e,.$candidateConstraint->getPret |
21d40 | 74 79 53 74 72 69 6e 67 28 29 2c 0a 24 6c 69 6e 6b 2c 0a 27 3c 65 72 72 6f 72 3e 66 61 69 6c 65 | tyString(),.$link,.'<error>faile |
21d60 | 64 3c 2f 65 72 72 6f 72 3e 27 2c 0a 24 63 61 6e 64 69 64 61 74 65 2d 3e 67 65 74 4e 61 6d 65 28 | d</error>',.$candidate->getName( |
21d80 | 29 20 3d 3d 3d 20 24 72 65 71 75 69 72 65 20 3f 20 27 27 20 3a 20 27 3c 63 6f 6d 6d 65 6e 74 3e | ).===.$require.?.''.:.'<comment> |
21da0 | 70 72 6f 76 69 64 65 64 20 62 79 20 27 2e 24 63 61 6e 64 69 64 61 74 65 2d 3e 67 65 74 50 72 65 | provided.by.'.$candidate->getPre |
21dc0 | 74 74 79 4e 61 6d 65 28 29 2e 27 3c 2f 63 6f 6d 6d 65 6e 74 3e 27 2c 0a 5d 3b 0a 0a 0a 63 6f 6e | ttyName().'</comment>',.];...con |
21de0 | 74 69 6e 75 65 20 32 3b 0a 7d 0a 7d 0a 0a 24 72 65 73 75 6c 74 73 5b 5d 20 3d 20 5b 0a 24 63 61 | tinue.2;.}.}..$results[].=.[.$ca |
21e00 | 6e 64 69 64 61 74 65 2d 3e 67 65 74 4e 61 6d 65 28 29 20 3d 3d 3d 20 24 72 65 71 75 69 72 65 20 | ndidate->getName().===.$require. |
21e20 | 3f 20 24 63 61 6e 64 69 64 61 74 65 2d 3e 67 65 74 50 72 65 74 74 79 4e 61 6d 65 28 29 20 3a 20 | ?.$candidate->getPrettyName().:. |
21e40 | 24 72 65 71 75 69 72 65 2c 0a 24 63 61 6e 64 69 64 61 74 65 43 6f 6e 73 74 72 61 69 6e 74 2d 3e | $require,.$candidateConstraint-> |
21e60 | 67 65 74 50 72 65 74 74 79 53 74 72 69 6e 67 28 29 2c 0a 6e 75 6c 6c 2c 0a 27 3c 69 6e 66 6f 3e | getPrettyString(),.null,.'<info> |
21e80 | 73 75 63 63 65 73 73 3c 2f 69 6e 66 6f 3e 27 2c 0a 24 63 61 6e 64 69 64 61 74 65 2d 3e 67 65 74 | success</info>',.$candidate->get |
21ea0 | 4e 61 6d 65 28 29 20 3d 3d 3d 20 24 72 65 71 75 69 72 65 20 3f 20 27 27 20 3a 20 27 3c 63 6f 6d | Name().===.$require.?.''.:.'<com |
21ec0 | 6d 65 6e 74 3e 70 72 6f 76 69 64 65 64 20 62 79 20 27 2e 24 63 61 6e 64 69 64 61 74 65 2d 3e 67 | ment>provided.by.'.$candidate->g |
21ee0 | 65 74 50 72 65 74 74 79 4e 61 6d 65 28 29 2e 27 3c 2f 63 6f 6d 6d 65 6e 74 3e 27 2c 0a 5d 3b 0a | etPrettyName().'</comment>',.];. |
21f00 | 0a 0a 63 6f 6e 74 69 6e 75 65 20 32 3b 0a 7d 0a 0a 0a 24 72 65 73 75 6c 74 73 20 3d 20 61 72 72 | ..continue.2;.}...$results.=.arr |
21f20 | 61 79 5f 6d 65 72 67 65 28 24 72 65 73 75 6c 74 73 2c 20 24 72 65 71 52 65 73 75 6c 74 73 29 3b | ay_merge($results,.$reqResults); |
21f40 | 0a 24 65 78 69 74 43 6f 64 65 20 3d 20 6d 61 78 28 24 65 78 69 74 43 6f 64 65 2c 20 31 29 3b 0a | .$exitCode.=.max($exitCode,.1);. |
21f60 | 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 24 72 65 73 75 6c 74 73 5b 5d 20 3d 20 5b 0a 24 72 65 | .continue;.}..$results[].=.[.$re |
21f80 | 71 75 69 72 65 2c 0a 27 6e 2f 61 27 2c 0a 24 6c 69 6e 6b 73 5b 30 5d 2c 0a 27 3c 65 72 72 6f 72 | quire,.'n/a',.$links[0],.'<error |
21fa0 | 3e 6d 69 73 73 69 6e 67 3c 2f 65 72 72 6f 72 3e 27 2c 0a 27 27 2c 0a 5d 3b 0a 0a 24 65 78 69 74 | >missing</error>',.'',.];..$exit |
21fc0 | 43 6f 64 65 20 3d 20 6d 61 78 28 24 65 78 69 74 43 6f 64 65 2c 20 32 29 3b 0a 7d 0a 7d 0a 0a 24 | Code.=.max($exitCode,.2);.}.}..$ |
21fe0 | 74 68 69 73 2d 3e 70 72 69 6e 74 54 61 62 6c 65 28 24 6f 75 74 70 75 74 2c 20 24 72 65 73 75 6c | this->printTable($output,.$resul |
22000 | 74 73 2c 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 66 6f 72 6d 61 74 27 29 29 | ts,.$input->getOption('format')) |
22020 | 3b 0a 0a 72 65 74 75 72 6e 20 24 65 78 69 74 43 6f 64 65 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 | ;..return.$exitCode;.}.....prote |
22040 | 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 70 72 69 6e 74 54 61 62 6c 65 28 4f 75 74 70 75 74 49 | cted.function.printTable(OutputI |
22060 | 6e 74 65 72 66 61 63 65 20 24 6f 75 74 70 75 74 2c 20 61 72 72 61 79 20 24 72 65 73 75 6c 74 73 | nterface.$output,.array.$results |
22080 | 2c 20 73 74 72 69 6e 67 20 24 66 6f 72 6d 61 74 29 3a 20 76 6f 69 64 0a 7b 0a 24 72 6f 77 73 20 | ,.string.$format):.void.{.$rows. |
220a0 | 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 72 65 73 75 6c 74 73 20 61 73 20 24 72 65 73 75 | =.[];.foreach.($results.as.$resu |
220c0 | 6c 74 29 20 7b 0a 0a 0a 0a 5b 24 70 6c 61 74 66 6f 72 6d 50 61 63 6b 61 67 65 2c 20 24 76 65 72 | lt).{....[$platformPackage,.$ver |
220e0 | 73 69 6f 6e 2c 20 24 6c 69 6e 6b 2c 20 24 73 74 61 74 75 73 2c 20 24 70 72 6f 76 69 64 65 72 5d | sion,.$link,.$status,.$provider] |
22100 | 20 3d 20 24 72 65 73 75 6c 74 3b 0a 0a 69 66 20 28 27 6a 73 6f 6e 27 20 3d 3d 3d 20 24 66 6f 72 | .=.$result;..if.('json'.===.$for |
22120 | 6d 61 74 29 20 7b 0a 24 72 6f 77 73 5b 5d 20 3d 20 5b 0a 22 6e 61 6d 65 22 20 3d 3e 20 24 70 6c | mat).{.$rows[].=.[."name".=>.$pl |
22140 | 61 74 66 6f 72 6d 50 61 63 6b 61 67 65 2c 0a 22 76 65 72 73 69 6f 6e 22 20 3d 3e 20 24 76 65 72 | atformPackage,."version".=>.$ver |
22160 | 73 69 6f 6e 2c 0a 22 73 74 61 74 75 73 22 20 3d 3e 20 73 74 72 69 70 5f 74 61 67 73 28 24 73 74 | sion,."status".=>.strip_tags($st |
22180 | 61 74 75 73 29 2c 0a 22 66 61 69 6c 65 64 5f 72 65 71 75 69 72 65 6d 65 6e 74 22 20 3d 3e 20 24 | atus),."failed_requirement".=>.$ |
221a0 | 6c 69 6e 6b 20 69 6e 73 74 61 6e 63 65 6f 66 20 4c 69 6e 6b 20 3f 20 5b 0a 27 73 6f 75 72 63 65 | link.instanceof.Link.?.[.'source |
221c0 | 27 20 3d 3e 20 24 6c 69 6e 6b 2d 3e 67 65 74 53 6f 75 72 63 65 28 29 2c 0a 27 74 79 70 65 27 20 | '.=>.$link->getSource(),.'type'. |
221e0 | 3d 3e 20 24 6c 69 6e 6b 2d 3e 67 65 74 44 65 73 63 72 69 70 74 69 6f 6e 28 29 2c 0a 27 74 61 72 | =>.$link->getDescription(),.'tar |
22200 | 67 65 74 27 20 3d 3e 20 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 74 28 29 2c 0a 27 63 6f 6e | get'.=>.$link->getTarget(),.'con |
22220 | 73 74 72 61 69 6e 74 27 20 3d 3e 20 24 6c 69 6e 6b 2d 3e 67 65 74 50 72 65 74 74 79 43 6f 6e 73 | straint'.=>.$link->getPrettyCons |
22240 | 74 72 61 69 6e 74 28 29 2c 0a 5d 20 3a 20 6e 75 6c 6c 2c 0a 22 70 72 6f 76 69 64 65 72 22 20 3d | traint(),.].:.null,."provider".= |
22260 | 3e 20 24 70 72 6f 76 69 64 65 72 20 3d 3d 3d 20 27 27 20 3f 20 6e 75 6c 6c 20 3a 20 73 74 72 69 | >.$provider.===.''.?.null.:.stri |
22280 | 70 5f 74 61 67 73 28 24 70 72 6f 76 69 64 65 72 29 2c 0a 5d 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 | p_tags($provider),.];.}.else.{.$ |
222a0 | 72 6f 77 73 5b 5d 20 3d 20 5b 0a 24 70 6c 61 74 66 6f 72 6d 50 61 63 6b 61 67 65 2c 0a 24 76 65 | rows[].=.[.$platformPackage,.$ve |
222c0 | 72 73 69 6f 6e 2c 0a 24 6c 69 6e 6b 2c 0a 24 6c 69 6e 6b 20 3f 20 73 70 72 69 6e 74 66 28 27 25 | rsion,.$link,.$link.?.sprintf('% |
222e0 | 73 20 25 73 20 25 73 20 28 25 73 29 27 2c 20 24 6c 69 6e 6b 2d 3e 67 65 74 53 6f 75 72 63 65 28 | s.%s.%s.(%s)',.$link->getSource( |
22300 | 29 2c 20 24 6c 69 6e 6b 2d 3e 67 65 74 44 65 73 63 72 69 70 74 69 6f 6e 28 29 2c 20 24 6c 69 6e | ),.$link->getDescription(),.$lin |
22320 | 6b 2d 3e 67 65 74 54 61 72 67 65 74 28 29 2c 20 24 6c 69 6e 6b 2d 3e 67 65 74 50 72 65 74 74 79 | k->getTarget(),.$link->getPretty |
22340 | 43 6f 6e 73 74 72 61 69 6e 74 28 29 29 20 3a 20 27 27 2c 0a 72 74 72 69 6d 28 24 73 74 61 74 75 | Constraint()).:.'',.rtrim($statu |
22360 | 73 2e 27 20 27 2e 24 70 72 6f 76 69 64 65 72 29 2c 0a 5d 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 27 6a | s.'.'.$provider),.];.}.}..if.('j |
22380 | 73 6f 6e 27 20 3d 3d 3d 20 24 66 6f 72 6d 61 74 29 20 7b 0a 24 74 68 69 73 2d 3e 67 65 74 49 4f | son'.===.$format).{.$this->getIO |
223a0 | 28 29 2d 3e 77 72 69 74 65 28 4a 73 6f 6e 46 69 6c 65 3a 3a 65 6e 63 6f 64 65 28 24 72 6f 77 73 | ()->write(JsonFile::encode($rows |
223c0 | 29 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 74 68 69 73 2d 3e 72 65 6e 64 65 72 54 61 62 6c 65 28 | ));.}.else.{.$this->renderTable( |
223e0 | 24 72 6f 77 73 2c 20 24 6f 75 74 70 75 74 29 3b 0a 7d 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 | $rows,.$output);.}.}.}.<?php.dec |
22400 | 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a | lare(strict_types=1);........... |
22420 | 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6d 6d 61 6e 64 3b 0a 0a 75 73 | .namespace.Composer\Command;..us |
22440 | 65 20 43 6f 6d 70 6f 73 65 72 5c 43 61 63 68 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 46 | e.Composer\Cache;.use.Composer\F |
22460 | 61 63 74 6f 72 79 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f | actory;.use.Symfony\Component\Co |
22480 | 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 | nsole\Input\InputInterface;.use. |
224a0 | 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c | Symfony\Component\Console\Input\ |
224c0 | 49 6e 70 75 74 4f 70 74 69 6f 6e 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 | InputOption;.use.Symfony\Compone |
224e0 | 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 4f 75 74 70 75 74 5c 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 | nt\Console\Output\OutputInterfac |
22500 | 65 3b 0a 0a 0a 0a 0a 63 6c 61 73 73 20 43 6c 65 61 72 43 61 63 68 65 43 6f 6d 6d 61 6e 64 20 65 | e;.....class.ClearCacheCommand.e |
22520 | 78 74 65 6e 64 73 20 42 61 73 65 43 6f 6d 6d 61 6e 64 0a 7b 0a 70 72 6f 74 65 63 74 65 64 20 66 | xtends.BaseCommand.{.protected.f |
22540 | 75 6e 63 74 69 6f 6e 20 63 6f 6e 66 69 67 75 72 65 28 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 | unction.configure():.void.{.$thi |
22560 | 73 0a 2d 3e 73 65 74 4e 61 6d 65 28 27 63 6c 65 61 72 2d 63 61 63 68 65 27 29 0a 2d 3e 73 65 74 | s.->setName('clear-cache').->set |
22580 | 41 6c 69 61 73 65 73 28 5b 27 63 6c 65 61 72 63 61 63 68 65 27 2c 20 27 63 63 27 5d 29 0a 2d 3e | Aliases(['clearcache',.'cc']).-> |
225a0 | 73 65 74 44 65 73 63 72 69 70 74 69 6f 6e 28 27 43 6c 65 61 72 73 20 63 6f 6d 70 6f 73 65 72 5c | setDescription('Clears.composer\ |
225c0 | 27 73 20 69 6e 74 65 72 6e 61 6c 20 70 61 63 6b 61 67 65 20 63 61 63 68 65 27 29 0a 2d 3e 73 65 | 's.internal.package.cache').->se |
225e0 | 74 44 65 66 69 6e 69 74 69 6f 6e 28 5b 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 67 | tDefinition([.new.InputOption('g |
22600 | 63 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e | c',.null,.InputOption::VALUE_NON |
22620 | 45 2c 20 27 4f 6e 6c 79 20 72 75 6e 20 67 61 72 62 61 67 65 20 63 6f 6c 6c 65 63 74 69 6f 6e 2c | E,.'Only.run.garbage.collection, |
22640 | 20 6e 6f 74 20 61 20 66 75 6c 6c 20 63 61 63 68 65 20 63 6c 65 61 72 27 29 2c 0a 5d 29 0a 2d 3e | .not.a.full.cache.clear'),.]).-> |
22660 | 73 65 74 48 65 6c 70 28 0a 3c 3c 3c 45 4f 54 0a 54 68 65 20 3c 69 6e 66 6f 3e 63 6c 65 61 72 2d | setHelp(.<<<EOT.The.<info>clear- |
22680 | 63 61 63 68 65 3c 2f 69 6e 66 6f 3e 20 64 65 6c 65 74 65 73 20 61 6c 6c 20 63 61 63 68 65 64 20 | cache</info>.deletes.all.cached. |
226a0 | 70 61 63 6b 61 67 65 73 20 66 72 6f 6d 20 63 6f 6d 70 6f 73 65 72 27 73 0a 63 61 63 68 65 20 64 | packages.from.composer's.cache.d |
226c0 | 69 72 65 63 74 6f 72 79 2e 0a 0a 52 65 61 64 20 6d 6f 72 65 20 61 74 20 68 74 74 70 73 3a 2f 2f | irectory...Read.more.at.https:// |
226e0 | 67 65 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 67 2f 64 6f 63 2f 30 33 2d 63 6c 69 2e 6d 64 23 63 6c | getcomposer.org/doc/03-cli.md#cl |
22700 | 65 61 72 2d 63 61 63 68 65 2d 63 6c 65 61 72 63 61 63 68 65 2d 63 63 0a 45 4f 54 0a 29 0a 3b 0a | ear-cache-clearcache-cc.EOT.).;. |
22720 | 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 65 78 65 63 75 74 65 28 49 6e | }..protected.function.execute(In |
22740 | 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 69 6e 70 75 74 2c 20 4f 75 74 70 75 74 49 6e 74 65 72 | putInterface.$input,.OutputInter |
22760 | 66 61 63 65 20 24 6f 75 74 70 75 74 29 3a 20 69 6e 74 0a 7b 0a 24 63 6f 6e 66 69 67 20 3d 20 46 | face.$output):.int.{.$config.=.F |
22780 | 61 63 74 6f 72 79 3a 3a 63 72 65 61 74 65 43 6f 6e 66 69 67 28 29 3b 0a 24 69 6f 20 3d 20 24 74 | actory::createConfig();.$io.=.$t |
227a0 | 68 69 73 2d 3e 67 65 74 49 4f 28 29 3b 0a 0a 24 63 61 63 68 65 50 61 74 68 73 20 3d 20 5b 0a 27 | his->getIO();..$cachePaths.=.[.' |
227c0 | 63 61 63 68 65 2d 76 63 73 2d 64 69 72 27 20 3d 3e 20 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 | cache-vcs-dir'.=>.$config->get(' |
227e0 | 63 61 63 68 65 2d 76 63 73 2d 64 69 72 27 29 2c 0a 27 63 61 63 68 65 2d 72 65 70 6f 2d 64 69 72 | cache-vcs-dir'),.'cache-repo-dir |
22800 | 27 20 3d 3e 20 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 63 61 63 68 65 2d 72 65 70 6f 2d 64 69 | '.=>.$config->get('cache-repo-di |
22820 | 72 27 29 2c 0a 27 63 61 63 68 65 2d 66 69 6c 65 73 2d 64 69 72 27 20 3d 3e 20 24 63 6f 6e 66 69 | r'),.'cache-files-dir'.=>.$confi |
22840 | 67 2d 3e 67 65 74 28 27 63 61 63 68 65 2d 66 69 6c 65 73 2d 64 69 72 27 29 2c 0a 27 63 61 63 68 | g->get('cache-files-dir'),.'cach |
22860 | 65 2d 64 69 72 27 20 3d 3e 20 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 63 61 63 68 65 2d 64 69 | e-dir'.=>.$config->get('cache-di |
22880 | 72 27 29 2c 0a 5d 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 63 61 63 68 65 50 61 74 68 73 20 61 73 | r'),.];..foreach.($cachePaths.as |
228a0 | 20 24 6b 65 79 20 3d 3e 20 24 63 61 63 68 65 50 61 74 68 29 20 7b 0a 0a 69 66 20 28 24 6b 65 79 | .$key.=>.$cachePath).{..if.($key |
228c0 | 20 3d 3d 3d 20 27 63 61 63 68 65 2d 64 69 72 27 20 26 26 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f | .===.'cache-dir'.&&.$input->getO |
228e0 | 70 74 69 6f 6e 28 27 67 63 27 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 24 63 61 63 | ption('gc')).{.continue;.}..$cac |
22900 | 68 65 50 61 74 68 20 3d 20 72 65 61 6c 70 61 74 68 28 24 63 61 63 68 65 50 61 74 68 29 3b 0a 69 | hePath.=.realpath($cachePath);.i |
22920 | 66 20 28 21 24 63 61 63 68 65 50 61 74 68 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f | f.(!$cachePath).{.$io->writeErro |
22940 | 72 28 22 3c 69 6e 66 6f 3e 43 61 63 68 65 20 64 69 72 65 63 74 6f 72 79 20 64 6f 65 73 20 6e 6f | r("<info>Cache.directory.does.no |
22960 | 74 20 65 78 69 73 74 20 28 24 6b 65 79 29 3a 20 24 63 61 63 68 65 50 61 74 68 3c 2f 69 6e 66 6f | t.exist.($key):.$cachePath</info |
22980 | 3e 22 29 3b 0a 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 24 63 61 63 68 65 20 3d 20 6e 65 77 20 43 | >");..continue;.}.$cache.=.new.C |
229a0 | 61 63 68 65 28 24 69 6f 2c 20 24 63 61 63 68 65 50 61 74 68 29 3b 0a 24 63 61 63 68 65 2d 3e 73 | ache($io,.$cachePath);.$cache->s |
229c0 | 65 74 52 65 61 64 4f 6e 6c 79 28 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 63 61 63 68 65 2d 72 | etReadOnly($config->get('cache-r |
229e0 | 65 61 64 2d 6f 6e 6c 79 27 29 29 3b 0a 69 66 20 28 21 24 63 61 63 68 65 2d 3e 69 73 45 6e 61 62 | ead-only'));.if.(!$cache->isEnab |
22a00 | 6c 65 64 28 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 22 3c 69 6e 66 6f 3e | led()).{.$io->writeError("<info> |
22a20 | 43 61 63 68 65 20 69 73 20 6e 6f 74 20 65 6e 61 62 6c 65 64 20 28 24 6b 65 79 29 3a 20 24 63 61 | Cache.is.not.enabled.($key):.$ca |
22a40 | 63 68 65 50 61 74 68 3c 2f 69 6e 66 6f 3e 22 29 3b 0a 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a | chePath</info>");..continue;.}.. |
22a60 | 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 67 63 27 29 29 20 7b 0a 24 | if.($input->getOption('gc')).{.$ |
22a80 | 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 22 3c 69 6e 66 6f 3e 47 61 72 62 61 67 65 2d 63 6f | io->writeError("<info>Garbage-co |
22aa0 | 6c 6c 65 63 74 69 6e 67 20 63 61 63 68 65 20 28 24 6b 65 79 29 3a 20 24 63 61 63 68 65 50 61 74 | llecting.cache.($key):.$cachePat |
22ac0 | 68 3c 2f 69 6e 66 6f 3e 22 29 3b 0a 69 66 20 28 24 6b 65 79 20 3d 3d 3d 20 27 63 61 63 68 65 2d | h</info>");.if.($key.===.'cache- |
22ae0 | 66 69 6c 65 73 2d 64 69 72 27 29 20 7b 0a 24 63 61 63 68 65 2d 3e 67 63 28 24 63 6f 6e 66 69 67 | files-dir').{.$cache->gc($config |
22b00 | 2d 3e 67 65 74 28 27 63 61 63 68 65 2d 66 69 6c 65 73 2d 74 74 6c 27 29 2c 20 24 63 6f 6e 66 69 | ->get('cache-files-ttl'),.$confi |
22b20 | 67 2d 3e 67 65 74 28 27 63 61 63 68 65 2d 66 69 6c 65 73 2d 6d 61 78 73 69 7a 65 27 29 29 3b 0a | g->get('cache-files-maxsize'));. |
22b40 | 7d 20 65 6c 73 65 69 66 20 28 24 6b 65 79 20 3d 3d 3d 20 27 63 61 63 68 65 2d 72 65 70 6f 2d 64 | }.elseif.($key.===.'cache-repo-d |
22b60 | 69 72 27 29 20 7b 0a 24 63 61 63 68 65 2d 3e 67 63 28 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 | ir').{.$cache->gc($config->get(' |
22b80 | 63 61 63 68 65 2d 74 74 6c 27 29 2c 20 31 30 32 34 20 2a 20 31 30 32 34 20 2a 20 31 30 32 34 20 | cache-ttl'),.1024.*.1024.*.1024. |
22ba0 | 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 6b 65 79 20 3d 3d 3d 20 27 63 61 63 68 65 2d 76 63 73 | );.}.elseif.($key.===.'cache-vcs |
22bc0 | 2d 64 69 72 27 29 20 7b 0a 24 63 61 63 68 65 2d 3e 67 63 56 63 73 43 61 63 68 65 28 24 63 6f 6e | -dir').{.$cache->gcVcsCache($con |
22be0 | 66 69 67 2d 3e 67 65 74 28 27 63 61 63 68 65 2d 74 74 6c 27 29 29 3b 0a 7d 0a 7d 20 65 6c 73 65 | fig->get('cache-ttl'));.}.}.else |
22c00 | 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 22 3c 69 6e 66 6f 3e 43 6c 65 61 72 69 | .{.$io->writeError("<info>Cleari |
22c20 | 6e 67 20 63 61 63 68 65 20 28 24 6b 65 79 29 3a 20 24 63 61 63 68 65 50 61 74 68 3c 2f 69 6e 66 | ng.cache.($key):.$cachePath</inf |
22c40 | 6f 3e 22 29 3b 0a 24 63 61 63 68 65 2d 3e 63 6c 65 61 72 28 29 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 | o>");.$cache->clear();.}.}..if.( |
22c60 | 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 67 63 27 29 29 20 7b 0a 24 69 6f 2d 3e | $input->getOption('gc')).{.$io-> |
22c80 | 77 72 69 74 65 45 72 72 6f 72 28 27 3c 69 6e 66 6f 3e 41 6c 6c 20 63 61 63 68 65 73 20 67 61 72 | writeError('<info>All.caches.gar |
22ca0 | 62 61 67 65 2d 63 6f 6c 6c 65 63 74 65 64 2e 3c 2f 69 6e 66 6f 3e 27 29 3b 0a 7d 20 65 6c 73 65 | bage-collected.</info>');.}.else |
22cc0 | 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 69 6e 66 6f 3e 41 6c 6c 20 63 61 | .{.$io->writeError('<info>All.ca |
22ce0 | 63 68 65 73 20 63 6c 65 61 72 65 64 2e 3c 2f 69 6e 66 6f 3e 27 29 3b 0a 7d 0a 0a 72 65 74 75 72 | ches.cleared.</info>');.}..retur |
22d00 | 6e 20 30 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 | n.0;.}.}.<?php.declare(strict_ty |
22d20 | 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d | pes=1);............namespace.Com |
22d40 | 70 6f 73 65 72 5c 43 6f 6d 6d 61 6e 64 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6d | poser\Command;..use.Composer\Com |
22d60 | 70 6f 73 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 42 61 73 65 | poser;.use.Composer\Package\Base |
22d80 | 50 61 63 6b 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 50 61 | Package;.use.Composer\Package\Pa |
22da0 | 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 63 72 | ckageInterface;.use.Composer\Pcr |
22dc0 | 65 5c 50 72 65 67 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c | e\Preg;.use.Composer\Repository\ |
22de0 | 43 6f 6d 70 6f 73 69 74 65 52 65 70 6f 73 69 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 | CompositeRepository;.use.Compose |
22e00 | 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 | r\Repository\InstalledRepository |
22e20 | 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 50 6c 61 74 66 6f | ;.use.Composer\Repository\Platfo |
22e40 | 72 6d 52 65 70 6f 73 69 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 | rmRepository;.use.Composer\Repos |
22e60 | 69 74 6f 72 79 5c 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 | itory\RepositoryInterface;.use.C |
22e80 | 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 52 6f 6f 74 50 61 63 6b 61 67 65 52 65 | omposer\Repository\RootPackageRe |
22ea0 | 70 6f 73 69 74 6f 72 79 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c | pository;.use.Symfony\Component\ |
22ec0 | 43 6f 6e 73 6f 6c 65 5c 43 6f 6d 70 6c 65 74 69 6f 6e 5c 43 6f 6d 70 6c 65 74 69 6f 6e 49 6e 70 | Console\Completion\CompletionInp |
22ee0 | 75 74 3b 0a 0a 0a 0a 0a 0a 0a 74 72 61 69 74 20 43 6f 6d 70 6c 65 74 69 6f 6e 54 72 61 69 74 0a | ut;.......trait.CompletionTrait. |
22f00 | 7b 0a 0a 0a 0a 61 62 73 74 72 61 63 74 20 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 72 65 | {....abstract.public.function.re |
22f20 | 71 75 69 72 65 43 6f 6d 70 6f 73 65 72 28 3f 62 6f 6f 6c 20 24 64 69 73 61 62 6c 65 50 6c 75 67 | quireComposer(?bool.$disablePlug |
22f40 | 69 6e 73 20 3d 20 6e 75 6c 6c 2c 20 3f 62 6f 6f 6c 20 24 64 69 73 61 62 6c 65 53 63 72 69 70 74 | ins.=.null,.?bool.$disableScript |
22f60 | 73 20 3d 20 6e 75 6c 6c 29 3a 20 43 6f 6d 70 6f 73 65 72 3b 0a 0a 0a 0a 0a 0a 0a 70 72 69 76 61 | s.=.null):.Composer;.......priva |
22f80 | 74 65 20 66 75 6e 63 74 69 6f 6e 20 73 75 67 67 65 73 74 50 72 65 66 65 72 49 6e 73 74 61 6c 6c | te.function.suggestPreferInstall |
22fa0 | 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 5b 27 64 69 73 74 27 2c 20 27 73 6f 75 | ():.array.{.return.['dist',.'sou |
22fc0 | 72 63 65 27 2c 20 27 61 75 74 6f 27 5d 3b 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e | rce',.'auto'];.}.....private.fun |
22fe0 | 63 74 69 6f 6e 20 73 75 67 67 65 73 74 52 6f 6f 74 52 65 71 75 69 72 65 6d 65 6e 74 28 29 3a 20 | ction.suggestRootRequirement():. |
23000 | 5c 43 6c 6f 73 75 72 65 0a 7b 0a 72 65 74 75 72 6e 20 66 75 6e 63 74 69 6f 6e 20 28 43 6f 6d 70 | \Closure.{.return.function.(Comp |
23020 | 6c 65 74 69 6f 6e 49 6e 70 75 74 20 24 69 6e 70 75 74 29 3a 20 61 72 72 61 79 20 7b 0a 24 63 6f | letionInput.$input):.array.{.$co |
23040 | 6d 70 6f 73 65 72 20 3d 20 24 74 68 69 73 2d 3e 72 65 71 75 69 72 65 43 6f 6d 70 6f 73 65 72 28 | mposer.=.$this->requireComposer( |
23060 | 29 3b 0a 0a 72 65 74 75 72 6e 20 61 72 72 61 79 5f 6d 65 72 67 65 28 61 72 72 61 79 5f 6b 65 79 | );..return.array_merge(array_key |
23080 | 73 28 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 50 61 63 6b 61 67 65 28 29 2d 3e 67 65 74 52 65 | s($composer->getPackage()->getRe |
230a0 | 71 75 69 72 65 73 28 29 29 2c 20 61 72 72 61 79 5f 6b 65 79 73 28 24 63 6f 6d 70 6f 73 65 72 2d | quires()),.array_keys($composer- |
230c0 | 3e 67 65 74 50 61 63 6b 61 67 65 28 29 2d 3e 67 65 74 44 65 76 52 65 71 75 69 72 65 73 28 29 29 | >getPackage()->getDevRequires()) |
230e0 | 29 3b 0a 7d 3b 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 73 75 67 | );.};.}.....private.function.sug |
23100 | 67 65 73 74 49 6e 73 74 61 6c 6c 65 64 50 61 63 6b 61 67 65 28 62 6f 6f 6c 20 24 69 6e 63 6c 75 | gestInstalledPackage(bool.$inclu |
23120 | 64 65 52 6f 6f 74 50 61 63 6b 61 67 65 20 3d 20 74 72 75 65 2c 20 62 6f 6f 6c 20 24 69 6e 63 6c | deRootPackage.=.true,.bool.$incl |
23140 | 75 64 65 50 6c 61 74 66 6f 72 6d 50 61 63 6b 61 67 65 73 20 3d 20 66 61 6c 73 65 29 3a 20 5c 43 | udePlatformPackages.=.false):.\C |
23160 | 6c 6f 73 75 72 65 0a 7b 0a 72 65 74 75 72 6e 20 66 75 6e 63 74 69 6f 6e 20 28 43 6f 6d 70 6c 65 | losure.{.return.function.(Comple |
23180 | 74 69 6f 6e 49 6e 70 75 74 20 24 69 6e 70 75 74 29 20 75 73 65 20 28 24 69 6e 63 6c 75 64 65 52 | tionInput.$input).use.($includeR |
231a0 | 6f 6f 74 50 61 63 6b 61 67 65 2c 20 24 69 6e 63 6c 75 64 65 50 6c 61 74 66 6f 72 6d 50 61 63 6b | ootPackage,.$includePlatformPack |
231c0 | 61 67 65 73 29 3a 20 61 72 72 61 79 20 7b 0a 24 63 6f 6d 70 6f 73 65 72 20 3d 20 24 74 68 69 73 | ages):.array.{.$composer.=.$this |
231e0 | 2d 3e 72 65 71 75 69 72 65 43 6f 6d 70 6f 73 65 72 28 29 3b 0a 24 69 6e 73 74 61 6c 6c 65 64 52 | ->requireComposer();.$installedR |
23200 | 65 70 6f 73 20 3d 20 5b 5d 3b 0a 0a 69 66 20 28 24 69 6e 63 6c 75 64 65 52 6f 6f 74 50 61 63 6b | epos.=.[];..if.($includeRootPack |
23220 | 61 67 65 29 20 7b 0a 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 5b 5d 20 3d 20 6e 65 77 20 52 | age).{.$installedRepos[].=.new.R |
23240 | 6f 6f 74 50 61 63 6b 61 67 65 52 65 70 6f 73 69 74 6f 72 79 28 63 6c 6f 6e 65 20 24 63 6f 6d 70 | ootPackageRepository(clone.$comp |
23260 | 6f 73 65 72 2d 3e 67 65 74 50 61 63 6b 61 67 65 28 29 29 3b 0a 7d 0a 0a 24 6c 6f 63 6b 65 72 20 | oser->getPackage());.}..$locker. |
23280 | 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 4c 6f 63 6b 65 72 28 29 3b 0a 69 66 20 28 24 6c | =.$composer->getLocker();.if.($l |
232a0 | 6f 63 6b 65 72 2d 3e 69 73 4c 6f 63 6b 65 64 28 29 29 20 7b 0a 24 69 6e 73 74 61 6c 6c 65 64 52 | ocker->isLocked()).{.$installedR |
232c0 | 65 70 6f 73 5b 5d 20 3d 20 24 6c 6f 63 6b 65 72 2d 3e 67 65 74 4c 6f 63 6b 65 64 52 65 70 6f 73 | epos[].=.$locker->getLockedRepos |
232e0 | 69 74 6f 72 79 28 74 72 75 65 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 69 6e 73 74 61 6c 6c 65 64 | itory(true);.}.else.{.$installed |
23300 | 52 65 70 6f 73 5b 5d 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f | Repos[].=.$composer->getReposito |
23320 | 72 79 4d 61 6e 61 67 65 72 28 29 2d 3e 67 65 74 4c 6f 63 61 6c 52 65 70 6f 73 69 74 6f 72 79 28 | ryManager()->getLocalRepository( |
23340 | 29 3b 0a 7d 0a 0a 24 70 6c 61 74 66 6f 72 6d 48 69 6e 74 20 3d 20 5b 5d 3b 0a 69 66 20 28 24 69 | );.}..$platformHint.=.[];.if.($i |
23360 | 6e 63 6c 75 64 65 50 6c 61 74 66 6f 72 6d 50 61 63 6b 61 67 65 73 29 20 7b 0a 69 66 20 28 24 6c | ncludePlatformPackages).{.if.($l |
23380 | 6f 63 6b 65 72 2d 3e 69 73 4c 6f 63 6b 65 64 28 29 29 20 7b 0a 24 70 6c 61 74 66 6f 72 6d 52 65 | ocker->isLocked()).{.$platformRe |
233a0 | 70 6f 20 3d 20 6e 65 77 20 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 28 5b 5d 2c 20 | po.=.new.PlatformRepository([],. |
233c0 | 24 6c 6f 63 6b 65 72 2d 3e 67 65 74 50 6c 61 74 66 6f 72 6d 4f 76 65 72 72 69 64 65 73 28 29 29 | $locker->getPlatformOverrides()) |
233e0 | 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 70 6c 61 74 66 6f 72 6d 52 65 70 6f 20 3d 20 6e 65 77 20 50 | ;.}.else.{.$platformRepo.=.new.P |
23400 | 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 28 5b 5d 2c 20 24 63 6f 6d 70 6f 73 65 72 2d | latformRepository([],.$composer- |
23420 | 3e 67 65 74 43 6f 6e 66 69 67 28 29 2d 3e 67 65 74 28 27 70 6c 61 74 66 6f 72 6d 27 29 29 3b 0a | >getConfig()->get('platform'));. |
23440 | 7d 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 43 6f 6d 70 6c 65 74 69 6f 6e 56 61 6c 75 65 | }.if.($input->getCompletionValue |
23460 | 28 29 20 3d 3d 3d 20 27 27 29 20 7b 0a 0a 24 68 69 6e 74 73 54 6f 46 69 6e 64 20 3d 20 5b 27 65 | ().===.'').{..$hintsToFind.=.['e |
23480 | 78 74 2d 27 20 3d 3e 20 30 2c 20 27 6c 69 62 2d 27 20 3d 3e 20 30 2c 20 27 70 68 70 27 20 3d 3e | xt-'.=>.0,.'lib-'.=>.0,.'php'.=> |
234a0 | 20 39 39 2c 20 27 63 6f 6d 70 6f 73 65 72 27 20 3d 3e 20 39 39 5d 3b 0a 66 6f 72 65 61 63 68 20 | .99,.'composer'.=>.99];.foreach. |
234c0 | 28 24 70 6c 61 74 66 6f 72 6d 52 65 70 6f 2d 3e 67 65 74 50 61 63 6b 61 67 65 73 28 29 20 61 73 | ($platformRepo->getPackages().as |
234e0 | 20 24 70 6b 67 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 68 69 6e 74 73 54 6f 46 69 6e 64 20 61 | .$pkg).{.foreach.($hintsToFind.a |
23500 | 73 20 24 68 69 6e 74 50 72 65 66 69 78 20 3d 3e 20 24 68 69 6e 74 43 6f 75 6e 74 29 20 7b 0a 69 | s.$hintPrefix.=>.$hintCount).{.i |
23520 | 66 20 28 73 74 72 5f 73 74 61 72 74 73 5f 77 69 74 68 28 24 70 6b 67 2d 3e 67 65 74 4e 61 6d 65 | f.(str_starts_with($pkg->getName |
23540 | 28 29 2c 20 24 68 69 6e 74 50 72 65 66 69 78 29 29 20 7b 0a 69 66 20 28 24 68 69 6e 74 43 6f 75 | (),.$hintPrefix)).{.if.($hintCou |
23560 | 6e 74 20 3d 3d 3d 20 30 20 7c 7c 20 24 68 69 6e 74 43 6f 75 6e 74 20 3e 3d 20 39 39 29 20 7b 0a | nt.===.0.||.$hintCount.>=.99).{. |
23580 | 24 70 6c 61 74 66 6f 72 6d 48 69 6e 74 5b 5d 20 3d 20 24 70 6b 67 2d 3e 67 65 74 4e 61 6d 65 28 | $platformHint[].=.$pkg->getName( |
235a0 | 29 3b 0a 24 68 69 6e 74 73 54 6f 46 69 6e 64 5b 24 68 69 6e 74 50 72 65 66 69 78 5d 2b 2b 3b 0a | );.$hintsToFind[$hintPrefix]++;. |
235c0 | 7d 20 65 6c 73 65 69 66 20 28 24 68 69 6e 74 43 6f 75 6e 74 20 3d 3d 3d 20 31 29 20 7b 0a 75 6e | }.elseif.($hintCount.===.1).{.un |
235e0 | 73 65 74 28 24 68 69 6e 74 73 54 6f 46 69 6e 64 5b 24 68 69 6e 74 50 72 65 66 69 78 5d 29 3b 0a | set($hintsToFind[$hintPrefix]);. |
23600 | 24 70 6c 61 74 66 6f 72 6d 48 69 6e 74 5b 5d 20 3d 20 73 75 62 73 74 72 28 24 70 6b 67 2d 3e 67 | $platformHint[].=.substr($pkg->g |
23620 | 65 74 4e 61 6d 65 28 29 2c 20 30 2c 20 6d 61 78 28 73 74 72 6c 65 6e 28 24 70 6b 67 2d 3e 67 65 | etName(),.0,.max(strlen($pkg->ge |
23640 | 74 4e 61 6d 65 28 29 29 20 2d 20 33 2c 20 73 74 72 6c 65 6e 28 24 68 69 6e 74 50 72 65 66 69 78 | tName()).-.3,.strlen($hintPrefix |
23660 | 29 20 2b 20 31 29 29 2e 27 2e 2e 2e 27 3b 0a 7d 0a 63 6f 6e 74 69 6e 75 65 20 32 3b 0a 7d 0a 7d | ).+.1)).'...';.}.continue.2;.}.} |
23680 | 0a 7d 0a 7d 20 65 6c 73 65 20 7b 0a 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 5b 5d 20 3d 20 | .}.}.else.{.$installedRepos[].=. |
236a0 | 24 70 6c 61 74 66 6f 72 6d 52 65 70 6f 3b 0a 7d 0a 7d 0a 0a 24 69 6e 73 74 61 6c 6c 65 64 52 65 | $platformRepo;.}.}..$installedRe |
236c0 | 70 6f 20 3d 20 6e 65 77 20 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 28 24 69 6e | po.=.new.InstalledRepository($in |
236e0 | 73 74 61 6c 6c 65 64 52 65 70 6f 73 29 3b 0a 0a 72 65 74 75 72 6e 20 61 72 72 61 79 5f 6d 65 72 | stalledRepos);..return.array_mer |
23700 | 67 65 28 0a 61 72 72 61 79 5f 6d 61 70 28 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 50 | ge(.array_map(static.function.(P |
23720 | 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 72 65 74 75 | ackageInterface.$package).{.retu |
23740 | 72 6e 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 3b 0a 7d 2c 20 24 69 6e 73 74 | rn.$package->getName();.},.$inst |
23760 | 61 6c 6c 65 64 52 65 70 6f 2d 3e 67 65 74 50 61 63 6b 61 67 65 73 28 29 29 2c 0a 24 70 6c 61 74 | alledRepo->getPackages()),.$plat |
23780 | 66 6f 72 6d 48 69 6e 74 0a 29 3b 0a 7d 3b 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e | formHint.);.};.}.....private.fun |
237a0 | 63 74 69 6f 6e 20 73 75 67 67 65 73 74 41 76 61 69 6c 61 62 6c 65 50 61 63 6b 61 67 65 28 69 6e | ction.suggestAvailablePackage(in |
237c0 | 74 20 24 6d 61 78 20 3d 20 39 39 29 3a 20 5c 43 6c 6f 73 75 72 65 0a 7b 0a 72 65 74 75 72 6e 20 | t.$max.=.99):.\Closure.{.return. |
237e0 | 66 75 6e 63 74 69 6f 6e 20 28 43 6f 6d 70 6c 65 74 69 6f 6e 49 6e 70 75 74 20 24 69 6e 70 75 74 | function.(CompletionInput.$input |
23800 | 29 20 75 73 65 20 28 24 6d 61 78 29 3a 20 61 72 72 61 79 20 7b 0a 69 66 20 28 24 6d 61 78 20 3c | ).use.($max):.array.{.if.($max.< |
23820 | 20 31 29 20 7b 0a 72 65 74 75 72 6e 20 5b 5d 3b 0a 7d 0a 0a 24 63 6f 6d 70 6f 73 65 72 20 3d 20 | .1).{.return.[];.}..$composer.=. |
23840 | 24 74 68 69 73 2d 3e 72 65 71 75 69 72 65 43 6f 6d 70 6f 73 65 72 28 29 3b 0a 24 72 65 70 6f 73 | $this->requireComposer();.$repos |
23860 | 20 3d 20 6e 65 77 20 43 6f 6d 70 6f 73 69 74 65 52 65 70 6f 73 69 74 6f 72 79 28 24 63 6f 6d 70 | .=.new.CompositeRepository($comp |
23880 | 6f 73 65 72 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 79 4d 61 6e 61 67 65 72 28 29 2d 3e 67 65 | oser->getRepositoryManager()->ge |
238a0 | 74 52 65 70 6f 73 69 74 6f 72 69 65 73 28 29 29 3b 0a 0a 24 72 65 73 75 6c 74 73 20 3d 20 5b 5d | tRepositories());..$results.=.[] |
238c0 | 3b 0a 24 73 68 6f 77 56 65 6e 64 6f 72 73 20 3d 20 66 61 6c 73 65 3b 0a 69 66 20 28 21 73 74 72 | ;.$showVendors.=.false;.if.(!str |
238e0 | 5f 63 6f 6e 74 61 69 6e 73 28 24 69 6e 70 75 74 2d 3e 67 65 74 43 6f 6d 70 6c 65 74 69 6f 6e 56 | _contains($input->getCompletionV |
23900 | 61 6c 75 65 28 29 2c 20 27 2f 27 29 29 20 7b 0a 24 72 65 73 75 6c 74 73 20 3d 20 24 72 65 70 6f | alue(),.'/')).{.$results.=.$repo |
23920 | 73 2d 3e 73 65 61 72 63 68 28 27 5e 27 20 2e 20 70 72 65 67 5f 71 75 6f 74 65 28 24 69 6e 70 75 | s->search('^'...preg_quote($inpu |
23940 | 74 2d 3e 67 65 74 43 6f 6d 70 6c 65 74 69 6f 6e 56 61 6c 75 65 28 29 29 2c 20 52 65 70 6f 73 69 | t->getCompletionValue()),.Reposi |
23960 | 74 6f 72 79 49 6e 74 65 72 66 61 63 65 3a 3a 53 45 41 52 43 48 5f 56 45 4e 44 4f 52 29 3b 0a 24 | toryInterface::SEARCH_VENDOR);.$ |
23980 | 73 68 6f 77 56 65 6e 64 6f 72 73 20 3d 20 74 72 75 65 3b 0a 7d 0a 0a 0a 69 66 20 28 5c 63 6f 75 | showVendors.=.true;.}...if.(\cou |
239a0 | 6e 74 28 24 72 65 73 75 6c 74 73 29 20 3c 3d 20 31 29 20 7b 0a 24 72 65 73 75 6c 74 73 20 3d 20 | nt($results).<=.1).{.$results.=. |
239c0 | 24 72 65 70 6f 73 2d 3e 73 65 61 72 63 68 28 27 5e 27 2e 70 72 65 67 5f 71 75 6f 74 65 28 24 69 | $repos->search('^'.preg_quote($i |
239e0 | 6e 70 75 74 2d 3e 67 65 74 43 6f 6d 70 6c 65 74 69 6f 6e 56 61 6c 75 65 28 29 29 2c 20 52 65 70 | nput->getCompletionValue()),.Rep |
23a00 | 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 3a 3a 53 45 41 52 43 48 5f 4e 41 4d 45 29 3b 0a | ositoryInterface::SEARCH_NAME);. |
23a20 | 24 73 68 6f 77 56 65 6e 64 6f 72 73 20 3d 20 66 61 6c 73 65 3b 0a 7d 0a 0a 24 72 65 73 75 6c 74 | $showVendors.=.false;.}..$result |
23a40 | 73 20 3d 20 61 72 72 61 79 5f 63 6f 6c 75 6d 6e 28 24 72 65 73 75 6c 74 73 2c 20 27 6e 61 6d 65 | s.=.array_column($results,.'name |
23a60 | 27 29 3b 0a 0a 69 66 20 28 24 73 68 6f 77 56 65 6e 64 6f 72 73 29 20 7b 0a 24 72 65 73 75 6c 74 | ');..if.($showVendors).{.$result |
23a80 | 73 20 3d 20 61 72 72 61 79 5f 6d 61 70 28 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 73 | s.=.array_map(static.function.(s |
23aa0 | 74 72 69 6e 67 20 24 6e 61 6d 65 29 3a 20 73 74 72 69 6e 67 20 7b 0a 72 65 74 75 72 6e 20 24 6e | tring.$name):.string.{.return.$n |
23ac0 | 61 6d 65 2e 27 2f 27 3b 0a 7d 2c 20 24 72 65 73 75 6c 74 73 29 3b 0a 0a 0a 75 73 6f 72 74 28 24 | ame.'/';.},.$results);...usort($ |
23ae0 | 72 65 73 75 6c 74 73 2c 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 73 74 72 69 6e 67 | results,.static.function.(string |
23b00 | 20 24 61 2c 20 73 74 72 69 6e 67 20 24 62 29 20 7b 0a 24 6c 65 6e 41 20 3d 20 5c 73 74 72 6c 65 | .$a,.string.$b).{.$lenA.=.\strle |
23b20 | 6e 28 24 61 29 3b 0a 24 6c 65 6e 42 20 3d 20 5c 73 74 72 6c 65 6e 28 24 62 29 3b 0a 69 66 20 28 | n($a);.$lenB.=.\strlen($b);.if.( |
23b40 | 24 6c 65 6e 41 20 3d 3d 3d 20 24 6c 65 6e 42 29 20 7b 0a 72 65 74 75 72 6e 20 24 61 20 3c 3d 3e | $lenA.===.$lenB).{.return.$a.<=> |
23b60 | 20 24 62 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 6c 65 6e 41 20 2d 20 24 6c 65 6e 42 3b 0a 7d 29 | .$b;.}..return.$lenA.-.$lenB;.}) |
23b80 | 3b 0a 0a 24 70 69 6e 6e 65 64 20 3d 20 5b 5d 3b 0a 0a 0a 24 63 6f 6d 70 6c 65 74 69 6f 6e 49 6e | ;..$pinned.=.[];...$completionIn |
23ba0 | 70 75 74 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 43 6f 6d 70 6c 65 74 69 6f 6e 56 61 6c 75 65 | put.=.$input->getCompletionValue |
23bc0 | 28 29 2e 27 2f 27 3b 0a 69 66 20 28 66 61 6c 73 65 20 21 3d 3d 20 28 24 65 78 61 63 74 49 6e 64 | ().'/';.if.(false.!==.($exactInd |
23be0 | 65 78 20 3d 20 61 72 72 61 79 5f 73 65 61 72 63 68 28 24 63 6f 6d 70 6c 65 74 69 6f 6e 49 6e 70 | ex.=.array_search($completionInp |
23c00 | 75 74 2c 20 24 72 65 73 75 6c 74 73 2c 20 74 72 75 65 29 29 29 20 7b 0a 24 70 69 6e 6e 65 64 5b | ut,.$results,.true))).{.$pinned[ |
23c20 | 5d 20 3d 20 24 63 6f 6d 70 6c 65 74 69 6f 6e 49 6e 70 75 74 3b 0a 61 72 72 61 79 5f 73 70 6c 69 | ].=.$completionInput;.array_spli |
23c40 | 63 65 28 24 72 65 73 75 6c 74 73 2c 20 24 65 78 61 63 74 49 6e 64 65 78 2c 20 31 29 3b 0a 7d 0a | ce($results,.$exactIndex,.1);.}. |
23c60 | 0a 72 65 74 75 72 6e 20 61 72 72 61 79 5f 6d 65 72 67 65 28 24 70 69 6e 6e 65 64 2c 20 61 72 72 | .return.array_merge($pinned,.arr |
23c80 | 61 79 5f 73 6c 69 63 65 28 24 72 65 73 75 6c 74 73 2c 20 30 2c 20 24 6d 61 78 20 2d 20 5c 63 6f | ay_slice($results,.0,.$max.-.\co |
23ca0 | 75 6e 74 28 24 70 69 6e 6e 65 64 29 29 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 61 72 72 61 79 5f | unt($pinned)));.}..return.array_ |
23cc0 | 73 6c 69 63 65 28 24 72 65 73 75 6c 74 73 2c 20 30 2c 20 24 6d 61 78 29 3b 0a 7d 3b 0a 7d 0a 0a | slice($results,.0,.$max);.};.}.. |
23ce0 | 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 73 75 67 67 65 73 74 41 76 61 69 | ....private.function.suggestAvai |
23d00 | 6c 61 62 6c 65 50 61 63 6b 61 67 65 49 6e 63 6c 50 6c 61 74 66 6f 72 6d 28 29 3a 20 5c 43 6c 6f | lablePackageInclPlatform():.\Clo |
23d20 | 73 75 72 65 0a 7b 0a 72 65 74 75 72 6e 20 66 75 6e 63 74 69 6f 6e 20 28 43 6f 6d 70 6c 65 74 69 | sure.{.return.function.(Completi |
23d40 | 6f 6e 49 6e 70 75 74 20 24 69 6e 70 75 74 29 3a 20 61 72 72 61 79 20 7b 0a 69 66 20 28 50 72 65 | onInput.$input):.array.{.if.(Pre |
23d60 | 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b 5e 28 65 78 74 7c 6c 69 62 7c 70 68 70 29 28 2d 7c 24 29 | g::isMatch('{^(ext|lib|php)(-|$) |
23d80 | 7c 5e 63 6f 6d 7d 27 2c 20 24 69 6e 70 75 74 2d 3e 67 65 74 43 6f 6d 70 6c 65 74 69 6f 6e 56 61 | |^com}',.$input->getCompletionVa |
23da0 | 6c 75 65 28 29 29 29 20 7b 0a 24 6d 61 74 63 68 65 73 20 3d 20 24 74 68 69 73 2d 3e 73 75 67 67 | lue())).{.$matches.=.$this->sugg |
23dc0 | 65 73 74 50 6c 61 74 66 6f 72 6d 50 61 63 6b 61 67 65 28 29 28 24 69 6e 70 75 74 29 3b 0a 7d 20 | estPlatformPackage()($input);.}. |
23de0 | 65 6c 73 65 20 7b 0a 24 6d 61 74 63 68 65 73 20 3d 20 5b 5d 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 | else.{.$matches.=.[];.}..return. |
23e00 | 61 72 72 61 79 5f 6d 65 72 67 65 28 24 6d 61 74 63 68 65 73 2c 20 24 74 68 69 73 2d 3e 73 75 67 | array_merge($matches,.$this->sug |
23e20 | 67 65 73 74 41 76 61 69 6c 61 62 6c 65 50 61 63 6b 61 67 65 28 39 39 20 2d 20 5c 63 6f 75 6e 74 | gestAvailablePackage(99.-.\count |
23e40 | 28 24 6d 61 74 63 68 65 73 29 29 28 24 69 6e 70 75 74 29 29 3b 0a 7d 3b 0a 7d 0a 0a 0a 0a 0a 70 | ($matches))($input));.};.}.....p |
23e60 | 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 73 75 67 67 65 73 74 50 6c 61 74 66 6f 72 6d 50 | rivate.function.suggestPlatformP |
23e80 | 61 63 6b 61 67 65 28 29 3a 20 5c 43 6c 6f 73 75 72 65 0a 7b 0a 72 65 74 75 72 6e 20 66 75 6e 63 | ackage():.\Closure.{.return.func |
23ea0 | 74 69 6f 6e 20 28 43 6f 6d 70 6c 65 74 69 6f 6e 49 6e 70 75 74 20 24 69 6e 70 75 74 29 3a 20 61 | tion.(CompletionInput.$input):.a |
23ec0 | 72 72 61 79 20 7b 0a 24 72 65 70 6f 73 20 3d 20 6e 65 77 20 50 6c 61 74 66 6f 72 6d 52 65 70 6f | rray.{.$repos.=.new.PlatformRepo |
23ee0 | 73 69 74 6f 72 79 28 5b 5d 2c 20 24 74 68 69 73 2d 3e 72 65 71 75 69 72 65 43 6f 6d 70 6f 73 65 | sitory([],.$this->requireCompose |
23f00 | 72 28 29 2d 3e 67 65 74 43 6f 6e 66 69 67 28 29 2d 3e 67 65 74 28 27 70 6c 61 74 66 6f 72 6d 27 | r()->getConfig()->get('platform' |
23f20 | 29 29 3b 0a 0a 24 70 61 74 74 65 72 6e 20 3d 20 42 61 73 65 50 61 63 6b 61 67 65 3a 3a 70 61 63 | ));..$pattern.=.BasePackage::pac |
23f40 | 6b 61 67 65 4e 61 6d 65 54 6f 52 65 67 65 78 70 28 24 69 6e 70 75 74 2d 3e 67 65 74 43 6f 6d 70 | kageNameToRegexp($input->getComp |
23f60 | 6c 65 74 69 6f 6e 56 61 6c 75 65 28 29 2e 27 2a 27 29 3b 0a 0a 72 65 74 75 72 6e 20 61 72 72 61 | letionValue().'*');..return.arra |
23f80 | 79 5f 66 69 6c 74 65 72 28 61 72 72 61 79 5f 6d 61 70 28 73 74 61 74 69 63 20 66 75 6e 63 74 69 | y_filter(array_map(static.functi |
23fa0 | 6f 6e 20 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 29 20 7b | on.(PackageInterface.$package).{ |
23fc0 | 0a 72 65 74 75 72 6e 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 3b 0a 7d 2c 20 | .return.$package->getName();.},. |
23fe0 | 24 72 65 70 6f 73 2d 3e 67 65 74 50 61 63 6b 61 67 65 73 28 29 29 2c 20 73 74 61 74 69 63 20 66 | $repos->getPackages()),.static.f |
24000 | 75 6e 63 74 69 6f 6e 20 28 73 74 72 69 6e 67 20 24 6e 61 6d 65 29 20 75 73 65 20 28 24 70 61 74 | unction.(string.$name).use.($pat |
24020 | 74 65 72 6e 29 3a 20 62 6f 6f 6c 20 7b 0a 72 65 74 75 72 6e 20 50 72 65 67 3a 3a 69 73 4d 61 74 | tern):.bool.{.return.Preg::isMat |
24040 | 63 68 28 24 70 61 74 74 65 72 6e 2c 20 24 6e 61 6d 65 29 3b 0a 7d 29 3b 0a 7d 3b 0a 7d 0a 7d 0a | ch($pattern,.$name);.});.};.}.}. |
24060 | 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a | <?php.declare(strict_types=1);.. |
24080 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6d | ..........namespace.Composer\Com |
240a0 | 6d 61 6e 64 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 63 72 65 5c 50 72 65 67 3b 0a 75 | mand;..use.Composer\Pcre\Preg;.u |
240c0 | 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 46 69 6c 65 73 79 73 74 65 6d 3b 0a 75 73 65 | se.Composer\Util\Filesystem;.use |
240e0 | 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 6c 61 74 66 6f 72 6d 3b 0a 75 73 65 20 43 6f 6d | .Composer\Util\Platform;.use.Com |
24100 | 70 6f 73 65 72 5c 55 74 69 6c 5c 53 69 6c 65 6e 63 65 72 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 | poser\Util\Silencer;.use.Symfony |
24120 | 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 49 6e | \Component\Console\Input\InputIn |
24140 | 74 65 72 66 61 63 65 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 | terface;.use.Symfony\Component\C |
24160 | 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 3b 0a 75 73 65 20 | onsole\Input\InputArgument;.use. |
24180 | 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c | Symfony\Component\Console\Input\ |
241a0 | 49 6e 70 75 74 4f 70 74 69 6f 6e 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 | InputOption;.use.Symfony\Compone |
241c0 | 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 4f 75 74 70 75 74 5c 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 | nt\Console\Output\OutputInterfac |
241e0 | 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 66 69 67 3b 0a 75 73 65 20 43 6f 6d 70 | e;.use.Composer\Config;.use.Comp |
24200 | 6f 73 65 72 5c 43 6f 6e 66 69 67 5c 4a 73 6f 6e 43 6f 6e 66 69 67 53 6f 75 72 63 65 3b 0a 75 73 | oser\Config\JsonConfigSource;.us |
24220 | 65 20 43 6f 6d 70 6f 73 65 72 5c 46 61 63 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 | e.Composer\Factory;.use.Composer |
24240 | 5c 49 4f 5c 49 4f 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 4a 73 | \IO\IOInterface;.use.Composer\Js |
24260 | 6f 6e 5c 4a 73 6f 6e 46 69 6c 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 65 6d 76 65 72 | on\JsonFile;.use.Composer\Semver |
24280 | 5c 56 65 72 73 69 6f 6e 50 61 72 73 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 | \VersionParser;.use.Composer\Pac |
242a0 | 6b 61 67 65 5c 42 61 73 65 50 61 63 6b 61 67 65 3b 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 43 6f 6e | kage\BasePackage;......class.Con |
242c0 | 66 69 67 43 6f 6d 6d 61 6e 64 20 65 78 74 65 6e 64 73 20 42 61 73 65 43 6f 6d 6d 61 6e 64 0a 7b | figCommand.extends.BaseCommand.{ |
242e0 | 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 63 6f 6e 66 69 67 3b 0a 0a 0a 0a 0a 70 72 6f 74 65 | ....protected.$config;.....prote |
24300 | 63 74 65 64 20 24 63 6f 6e 66 69 67 46 69 6c 65 3b 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 | cted.$configFile;.....protected. |
24320 | 24 63 6f 6e 66 69 67 53 6f 75 72 63 65 3b 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 61 75 | $configSource;.....protected.$au |
24340 | 74 68 43 6f 6e 66 69 67 46 69 6c 65 3b 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 61 75 74 | thConfigFile;.....protected.$aut |
24360 | 68 43 6f 6e 66 69 67 53 6f 75 72 63 65 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 | hConfigSource;..protected.functi |
24380 | 6f 6e 20 63 6f 6e 66 69 67 75 72 65 28 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 0a 2d 3e 73 | on.configure():.void.{.$this.->s |
243a0 | 65 74 4e 61 6d 65 28 27 63 6f 6e 66 69 67 27 29 0a 2d 3e 73 65 74 44 65 73 63 72 69 70 74 69 6f | etName('config').->setDescriptio |
243c0 | 6e 28 27 53 65 74 73 20 63 6f 6e 66 69 67 20 6f 70 74 69 6f 6e 73 27 29 0a 2d 3e 73 65 74 44 65 | n('Sets.config.options').->setDe |
243e0 | 66 69 6e 69 74 69 6f 6e 28 5b 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 67 6c 6f 62 | finition([.new.InputOption('glob |
24400 | 61 6c 27 2c 20 27 67 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e | al',.'g',.InputOption::VALUE_NON |
24420 | 45 2c 20 27 41 70 70 6c 79 20 63 6f 6d 6d 61 6e 64 20 74 6f 20 74 68 65 20 67 6c 6f 62 61 6c 20 | E,.'Apply.command.to.the.global. |
24440 | 63 6f 6e 66 69 67 20 66 69 6c 65 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 | config.file'),.new.InputOption(' |
24460 | 65 64 69 74 6f 72 27 2c 20 27 65 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 | editor',.'e',.InputOption::VALUE |
24480 | 5f 4e 4f 4e 45 2c 20 27 4f 70 65 6e 20 65 64 69 74 6f 72 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 | _NONE,.'Open.editor'),.new.Input |
244a0 | 4f 70 74 69 6f 6e 28 27 61 75 74 68 27 2c 20 27 61 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a | Option('auth',.'a',.InputOption: |
244c0 | 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 41 66 66 65 63 74 20 61 75 74 68 20 63 6f 6e 66 69 67 | :VALUE_NONE,.'Affect.auth.config |
244e0 | 20 66 69 6c 65 20 28 6f 6e 6c 79 20 75 73 65 64 20 66 6f 72 20 2d 2d 65 64 69 74 6f 72 29 27 29 | .file.(only.used.for.--editor)') |
24500 | 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 75 6e 73 65 74 27 2c 20 6e 75 6c 6c 2c | ,.new.InputOption('unset',.null, |
24520 | 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 55 6e 73 65 74 | .InputOption::VALUE_NONE,.'Unset |
24540 | 20 74 68 65 20 67 69 76 65 6e 20 73 65 74 74 69 6e 67 2d 6b 65 79 27 29 2c 0a 6e 65 77 20 49 6e | .the.given.setting-key'),.new.In |
24560 | 70 75 74 4f 70 74 69 6f 6e 28 27 6c 69 73 74 27 2c 20 27 6c 27 2c 20 49 6e 70 75 74 4f 70 74 69 | putOption('list',.'l',.InputOpti |
24580 | 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 4c 69 73 74 20 63 6f 6e 66 69 67 75 72 61 74 | on::VALUE_NONE,.'List.configurat |
245a0 | 69 6f 6e 20 73 65 74 74 69 6e 67 73 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 | ion.settings'),.new.InputOption( |
245c0 | 27 66 69 6c 65 27 2c 20 27 66 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f | 'file',.'f',.InputOption::VALUE_ |
245e0 | 52 45 51 55 49 52 45 44 2c 20 27 49 66 20 79 6f 75 20 77 61 6e 74 20 74 6f 20 63 68 6f 6f 73 65 | REQUIRED,.'If.you.want.to.choose |
24600 | 20 61 20 64 69 66 66 65 72 65 6e 74 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 20 6f 72 20 63 6f | .a.different.composer.json.or.co |
24620 | 6e 66 69 67 2e 6a 73 6f 6e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 61 62 | nfig.json'),.new.InputOption('ab |
24640 | 73 6f 6c 75 74 65 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 | solute',.null,.InputOption::VALU |
24660 | 45 5f 4e 4f 4e 45 2c 20 27 52 65 74 75 72 6e 73 20 61 62 73 6f 6c 75 74 65 20 70 61 74 68 73 20 | E_NONE,.'Returns.absolute.paths. |
24680 | 77 68 65 6e 20 66 65 74 63 68 69 6e 67 20 2a 2d 64 69 72 20 63 6f 6e 66 69 67 20 76 61 6c 75 65 | when.fetching.*-dir.config.value |
246a0 | 73 20 69 6e 73 74 65 61 64 20 6f 66 20 72 65 6c 61 74 69 76 65 27 29 2c 0a 6e 65 77 20 49 6e 70 | s.instead.of.relative'),.new.Inp |
246c0 | 75 74 4f 70 74 69 6f 6e 28 27 6a 73 6f 6e 27 2c 20 27 6a 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f | utOption('json',.'j',.InputOptio |
246e0 | 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 4a 53 4f 4e 20 64 65 63 6f 64 65 20 74 68 65 20 | n::VALUE_NONE,.'JSON.decode.the. |
24700 | 73 65 74 74 69 6e 67 20 76 61 6c 75 65 2c 20 74 6f 20 62 65 20 75 73 65 64 20 77 69 74 68 20 65 | setting.value,.to.be.used.with.e |
24720 | 78 74 72 61 2e 2a 20 6b 65 79 73 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 | xtra.*.keys'),.new.InputOption(' |
24740 | 6d 65 72 67 65 27 2c 20 27 6d 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f | merge',.'m',.InputOption::VALUE_ |
24760 | 4e 4f 4e 45 2c 20 27 4d 65 72 67 65 20 74 68 65 20 73 65 74 74 69 6e 67 20 76 61 6c 75 65 20 77 | NONE,.'Merge.the.setting.value.w |
24780 | 69 74 68 20 74 68 65 20 63 75 72 72 65 6e 74 20 76 61 6c 75 65 2c 20 74 6f 20 62 65 20 75 73 65 | ith.the.current.value,.to.be.use |
247a0 | 64 20 77 69 74 68 20 65 78 74 72 61 2e 2a 20 6b 65 79 73 20 69 6e 20 63 6f 6d 62 69 6e 61 74 69 | d.with.extra.*.keys.in.combinati |
247c0 | 6f 6e 20 77 69 74 68 20 2d 2d 6a 73 6f 6e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f | on.with.--json'),.new.InputOptio |
247e0 | 6e 28 27 61 70 70 65 6e 64 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 | n('append',.null,.InputOption::V |
24800 | 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 57 68 65 6e 20 61 64 64 69 6e 67 20 61 20 72 65 70 6f 73 69 | ALUE_NONE,.'When.adding.a.reposi |
24820 | 74 6f 72 79 2c 20 61 70 70 65 6e 64 20 69 74 20 28 6c 6f 77 65 73 74 20 70 72 69 6f 72 69 74 79 | tory,.append.it.(lowest.priority |
24840 | 29 20 74 6f 20 74 68 65 20 65 78 69 73 74 69 6e 67 20 6f 6e 65 73 20 69 6e 73 74 65 61 64 20 6f | ).to.the.existing.ones.instead.o |
24860 | 66 20 70 72 65 70 65 6e 64 69 6e 67 20 69 74 20 28 68 69 67 68 65 73 74 20 70 72 69 6f 72 69 74 | f.prepending.it.(highest.priorit |
24880 | 79 29 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 73 6f 75 72 63 65 27 2c 20 | y)'),.new.InputOption('source',. |
248a0 | 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 | null,.InputOption::VALUE_NONE,.' |
248c0 | 44 69 73 70 6c 61 79 20 77 68 65 72 65 20 74 68 65 20 63 6f 6e 66 69 67 20 76 61 6c 75 65 20 69 | Display.where.the.config.value.i |
248e0 | 73 20 6c 6f 61 64 65 64 20 66 72 6f 6d 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 41 72 67 75 6d 65 | s.loaded.from'),.new.InputArgume |
24900 | 6e 74 28 27 73 65 74 74 69 6e 67 2d 6b 65 79 27 2c 20 6e 75 6c 6c 2c 20 27 53 65 74 74 69 6e 67 | nt('setting-key',.null,.'Setting |
24920 | 20 6b 65 79 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 28 27 73 65 74 74 69 | .key'),.new.InputArgument('setti |
24940 | 6e 67 2d 76 61 6c 75 65 27 2c 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 3a 3a 49 53 5f 41 52 52 | ng-value',.InputArgument::IS_ARR |
24960 | 41 59 2c 20 27 53 65 74 74 69 6e 67 20 76 61 6c 75 65 27 29 2c 0a 5d 29 0a 2d 3e 73 65 74 48 65 | AY,.'Setting.value'),.]).->setHe |
24980 | 6c 70 28 0a 3c 3c 3c 45 4f 54 0a 54 68 69 73 20 63 6f 6d 6d 61 6e 64 20 61 6c 6c 6f 77 73 20 79 | lp(.<<<EOT.This.command.allows.y |
249a0 | 6f 75 20 74 6f 20 65 64 69 74 20 63 6f 6d 70 6f 73 65 72 20 63 6f 6e 66 69 67 20 73 65 74 74 69 | ou.to.edit.composer.config.setti |
249c0 | 6e 67 73 20 61 6e 64 20 72 65 70 6f 73 69 74 6f 72 69 65 73 0a 69 6e 20 65 69 74 68 65 72 20 74 | ngs.and.repositories.in.either.t |
249e0 | 68 65 20 6c 6f 63 61 6c 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 20 66 69 6c 65 20 6f 72 20 74 | he.local.composer.json.file.or.t |
24a00 | 68 65 20 67 6c 6f 62 61 6c 20 63 6f 6e 66 69 67 2e 6a 73 6f 6e 20 66 69 6c 65 2e 0a 0a 41 64 64 | he.global.config.json.file...Add |
24a20 | 69 74 69 6f 6e 61 6c 6c 79 20 69 74 20 6c 65 74 73 20 79 6f 75 20 65 64 69 74 20 6d 6f 73 74 20 | itionally.it.lets.you.edit.most. |
24a40 | 70 72 6f 70 65 72 74 69 65 73 20 69 6e 20 74 68 65 20 6c 6f 63 61 6c 20 63 6f 6d 70 6f 73 65 72 | properties.in.the.local.composer |
24a60 | 2e 6a 73 6f 6e 2e 0a 0a 54 6f 20 73 65 74 20 61 20 63 6f 6e 66 69 67 20 73 65 74 74 69 6e 67 3a | .json...To.set.a.config.setting: |
24a80 | 0a 0a 20 20 20 20 3c 63 6f 6d 6d 65 6e 74 3e 25 63 6f 6d 6d 61 6e 64 2e 66 75 6c 6c 5f 6e 61 6d | ......<comment>%command.full_nam |
24aa0 | 65 25 20 62 69 6e 2d 64 69 72 20 62 69 6e 2f 3c 2f 63 6f 6d 6d 65 6e 74 3e 0a 0a 54 6f 20 72 65 | e%.bin-dir.bin/</comment>..To.re |
24ac0 | 61 64 20 61 20 63 6f 6e 66 69 67 20 73 65 74 74 69 6e 67 3a 0a 0a 20 20 20 20 3c 63 6f 6d 6d 65 | ad.a.config.setting:......<comme |
24ae0 | 6e 74 3e 25 63 6f 6d 6d 61 6e 64 2e 66 75 6c 6c 5f 6e 61 6d 65 25 20 62 69 6e 2d 64 69 72 3c 2f | nt>%command.full_name%.bin-dir</ |
24b00 | 63 6f 6d 6d 65 6e 74 3e 0a 20 20 20 20 4f 75 74 70 75 74 73 3a 20 3c 69 6e 66 6f 3e 62 69 6e 3c | comment>.....Outputs:.<info>bin< |
24b20 | 2f 69 6e 66 6f 3e 0a 0a 54 6f 20 65 64 69 74 20 74 68 65 20 67 6c 6f 62 61 6c 20 63 6f 6e 66 69 | /info>..To.edit.the.global.confi |
24b40 | 67 2e 6a 73 6f 6e 20 66 69 6c 65 3a 0a 0a 20 20 20 20 3c 63 6f 6d 6d 65 6e 74 3e 25 63 6f 6d 6d | g.json.file:......<comment>%comm |
24b60 | 61 6e 64 2e 66 75 6c 6c 5f 6e 61 6d 65 25 20 2d 2d 67 6c 6f 62 61 6c 3c 2f 63 6f 6d 6d 65 6e 74 | and.full_name%.--global</comment |
24b80 | 3e 0a 0a 54 6f 20 61 64 64 20 61 20 72 65 70 6f 73 69 74 6f 72 79 3a 0a 0a 20 20 20 20 3c 63 6f | >..To.add.a.repository:......<co |
24ba0 | 6d 6d 65 6e 74 3e 25 63 6f 6d 6d 61 6e 64 2e 66 75 6c 6c 5f 6e 61 6d 65 25 20 72 65 70 6f 73 69 | mment>%command.full_name%.reposi |
24bc0 | 74 6f 72 69 65 73 2e 66 6f 6f 20 76 63 73 20 68 74 74 70 73 3a 2f 2f 62 61 72 2e 63 6f 6d 3c 2f | tories.foo.vcs.https://bar.com</ |
24be0 | 63 6f 6d 6d 65 6e 74 3e 0a 0a 54 6f 20 72 65 6d 6f 76 65 20 61 20 72 65 70 6f 73 69 74 6f 72 79 | comment>..To.remove.a.repository |
24c00 | 20 28 72 65 70 6f 20 69 73 20 61 20 73 68 6f 72 74 20 61 6c 69 61 73 20 66 6f 72 20 72 65 70 6f | .(repo.is.a.short.alias.for.repo |
24c20 | 73 69 74 6f 72 69 65 73 29 3a 0a 0a 20 20 20 20 3c 63 6f 6d 6d 65 6e 74 3e 25 63 6f 6d 6d 61 6e | sitories):......<comment>%comman |
24c40 | 64 2e 66 75 6c 6c 5f 6e 61 6d 65 25 20 2d 2d 75 6e 73 65 74 20 72 65 70 6f 2e 66 6f 6f 3c 2f 63 | d.full_name%.--unset.repo.foo</c |
24c60 | 6f 6d 6d 65 6e 74 3e 0a 0a 54 6f 20 64 69 73 61 62 6c 65 20 70 61 63 6b 61 67 69 73 74 3a 0a 0a | omment>..To.disable.packagist:.. |
24c80 | 20 20 20 20 3c 63 6f 6d 6d 65 6e 74 3e 25 63 6f 6d 6d 61 6e 64 2e 66 75 6c 6c 5f 6e 61 6d 65 25 | ....<comment>%command.full_name% |
24ca0 | 20 72 65 70 6f 2e 70 61 63 6b 61 67 69 73 74 20 66 61 6c 73 65 3c 2f 63 6f 6d 6d 65 6e 74 3e 0a | .repo.packagist.false</comment>. |
24cc0 | 0a 59 6f 75 20 63 61 6e 20 61 6c 74 65 72 20 72 65 70 6f 73 69 74 6f 72 69 65 73 20 69 6e 20 74 | .You.can.alter.repositories.in.t |
24ce0 | 68 65 20 67 6c 6f 62 61 6c 20 63 6f 6e 66 69 67 2e 6a 73 6f 6e 20 66 69 6c 65 20 62 79 20 70 61 | he.global.config.json.file.by.pa |
24d00 | 73 73 69 6e 67 20 69 6e 20 74 68 65 0a 3c 69 6e 66 6f 3e 2d 2d 67 6c 6f 62 61 6c 3c 2f 69 6e 66 | ssing.in.the.<info>--global</inf |
24d20 | 6f 3e 20 6f 70 74 69 6f 6e 2e 0a 0a 54 6f 20 61 64 64 20 6f 72 20 65 64 69 74 20 73 75 67 67 65 | o>.option...To.add.or.edit.sugge |
24d40 | 73 74 65 64 20 70 61 63 6b 61 67 65 73 20 79 6f 75 20 63 61 6e 20 75 73 65 3a 0a 0a 20 20 20 20 | sted.packages.you.can.use:...... |
24d60 | 3c 63 6f 6d 6d 65 6e 74 3e 25 63 6f 6d 6d 61 6e 64 2e 66 75 6c 6c 5f 6e 61 6d 65 25 20 73 75 67 | <comment>%command.full_name%.sug |
24d80 | 67 65 73 74 2e 70 61 63 6b 61 67 65 20 72 65 61 73 6f 6e 20 66 6f 72 20 74 68 65 20 73 75 67 67 | gest.package.reason.for.the.sugg |
24da0 | 65 73 74 69 6f 6e 3c 2f 63 6f 6d 6d 65 6e 74 3e 0a 0a 54 6f 20 61 64 64 20 6f 72 20 65 64 69 74 | estion</comment>..To.add.or.edit |
24dc0 | 20 65 78 74 72 61 20 70 72 6f 70 65 72 74 69 65 73 20 79 6f 75 20 63 61 6e 20 75 73 65 3a 0a 0a | .extra.properties.you.can.use:.. |
24de0 | 20 20 20 20 3c 63 6f 6d 6d 65 6e 74 3e 25 63 6f 6d 6d 61 6e 64 2e 66 75 6c 6c 5f 6e 61 6d 65 25 | ....<comment>%command.full_name% |
24e00 | 20 65 78 74 72 61 2e 70 72 6f 70 65 72 74 79 20 76 61 6c 75 65 3c 2f 63 6f 6d 6d 65 6e 74 3e 0a | .extra.property.value</comment>. |
24e20 | 0a 4f 72 20 74 6f 20 61 64 64 20 61 20 63 6f 6d 70 6c 65 78 20 76 61 6c 75 65 20 79 6f 75 20 63 | .Or.to.add.a.complex.value.you.c |
24e40 | 61 6e 20 75 73 65 20 6a 73 6f 6e 20 77 69 74 68 3a 0a 0a 20 20 20 20 3c 63 6f 6d 6d 65 6e 74 3e | an.use.json.with:......<comment> |
24e60 | 25 63 6f 6d 6d 61 6e 64 2e 66 75 6c 6c 5f 6e 61 6d 65 25 20 65 78 74 72 61 2e 70 72 6f 70 65 72 | %command.full_name%.extra.proper |
24e80 | 74 79 20 2d 2d 6a 73 6f 6e 20 27 7b 22 66 6f 6f 22 3a 74 72 75 65 2c 20 22 62 61 72 22 3a 20 5b | ty.--json.'{"foo":true,."bar":.[ |
24ea0 | 5d 7d 27 3c 2f 63 6f 6d 6d 65 6e 74 3e 0a 0a 54 6f 20 65 64 69 74 20 74 68 65 20 66 69 6c 65 20 | ]}'</comment>..To.edit.the.file. |
24ec0 | 69 6e 20 61 6e 20 65 78 74 65 72 6e 61 6c 20 65 64 69 74 6f 72 3a 0a 0a 20 20 20 20 3c 63 6f 6d | in.an.external.editor:......<com |
24ee0 | 6d 65 6e 74 3e 25 63 6f 6d 6d 61 6e 64 2e 66 75 6c 6c 5f 6e 61 6d 65 25 20 2d 2d 65 64 69 74 6f | ment>%command.full_name%.--edito |
24f00 | 72 3c 2f 63 6f 6d 6d 65 6e 74 3e 0a 0a 54 6f 20 63 68 6f 6f 73 65 20 79 6f 75 72 20 65 64 69 74 | r</comment>..To.choose.your.edit |
24f20 | 6f 72 20 79 6f 75 20 63 61 6e 20 73 65 74 20 74 68 65 20 22 45 44 49 54 4f 52 22 20 65 6e 76 20 | or.you.can.set.the."EDITOR".env. |
24f40 | 76 61 72 69 61 62 6c 65 2e 0a 0a 54 6f 20 67 65 74 20 61 20 6c 69 73 74 20 6f 66 20 63 6f 6e 66 | variable...To.get.a.list.of.conf |
24f60 | 69 67 75 72 61 74 69 6f 6e 20 76 61 6c 75 65 73 20 69 6e 20 74 68 65 20 66 69 6c 65 3a 0a 0a 20 | iguration.values.in.the.file:... |
24f80 | 20 20 20 3c 63 6f 6d 6d 65 6e 74 3e 25 63 6f 6d 6d 61 6e 64 2e 66 75 6c 6c 5f 6e 61 6d 65 25 20 | ...<comment>%command.full_name%. |
24fa0 | 2d 2d 6c 69 73 74 3c 2f 63 6f 6d 6d 65 6e 74 3e 0a 0a 59 6f 75 20 63 61 6e 20 61 6c 77 61 79 73 | --list</comment>..You.can.always |
24fc0 | 20 70 61 73 73 20 6d 6f 72 65 20 74 68 61 6e 20 6f 6e 65 20 6f 70 74 69 6f 6e 2e 20 41 73 20 61 | .pass.more.than.one.option..As.a |
24fe0 | 6e 20 65 78 61 6d 70 6c 65 2c 20 69 66 20 79 6f 75 20 77 61 6e 74 20 74 6f 20 65 64 69 74 20 74 | n.example,.if.you.want.to.edit.t |
25000 | 68 65 0a 67 6c 6f 62 61 6c 20 63 6f 6e 66 69 67 2e 6a 73 6f 6e 20 66 69 6c 65 2e 0a 0a 20 20 20 | he.global.config.json.file...... |
25020 | 20 3c 63 6f 6d 6d 65 6e 74 3e 25 63 6f 6d 6d 61 6e 64 2e 66 75 6c 6c 5f 6e 61 6d 65 25 20 2d 2d | .<comment>%command.full_name%.-- |
25040 | 65 64 69 74 6f 72 20 2d 2d 67 6c 6f 62 61 6c 3c 2f 63 6f 6d 6d 65 6e 74 3e 0a 0a 52 65 61 64 20 | editor.--global</comment>..Read. |
25060 | 6d 6f 72 65 20 61 74 20 68 74 74 70 73 3a 2f 2f 67 65 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 67 2f | more.at.https://getcomposer.org/ |
25080 | 64 6f 63 2f 30 33 2d 63 6c 69 2e 6d 64 23 63 6f 6e 66 69 67 0a 45 4f 54 0a 29 0a 3b 0a 7d 0a 0a | doc/03-cli.md#config.EOT.).;.}.. |
250a0 | 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 69 6e 69 74 69 61 6c 69 7a 65 | ...protected.function.initialize |
250c0 | 28 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 69 6e 70 75 74 2c 20 4f 75 74 70 75 74 49 6e | (InputInterface.$input,.OutputIn |
250e0 | 74 65 72 66 61 63 65 20 24 6f 75 74 70 75 74 29 3a 20 76 6f 69 64 0a 7b 0a 70 61 72 65 6e 74 3a | terface.$output):.void.{.parent: |
25100 | 3a 69 6e 69 74 69 61 6c 69 7a 65 28 24 69 6e 70 75 74 2c 20 24 6f 75 74 70 75 74 29 3b 0a 0a 69 | :initialize($input,.$output);..i |
25120 | 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 67 6c 6f 62 61 6c 27 29 20 26 | f.($input->getOption('global').& |
25140 | 26 20 6e 75 6c 6c 20 21 3d 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 66 69 | &.null.!==.$input->getOption('fi |
25160 | 6c 65 27 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 | le')).{.throw.new.\RuntimeExcept |
25180 | 69 6f 6e 28 27 2d 2d 66 69 6c 65 20 61 6e 64 20 2d 2d 67 6c 6f 62 61 6c 20 63 61 6e 20 6e 6f 74 | ion('--file.and.--global.can.not |
251a0 | 20 62 65 20 63 6f 6d 62 69 6e 65 64 27 29 3b 0a 7d 0a 0a 24 69 6f 20 3d 20 24 74 68 69 73 2d 3e | .be.combined');.}..$io.=.$this-> |
251c0 | 67 65 74 49 4f 28 29 3b 0a 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 20 3d 20 46 61 63 74 6f 72 79 | getIO();.$this->config.=.Factory |
251e0 | 3a 3a 63 72 65 61 74 65 43 6f 6e 66 69 67 28 24 69 6f 29 3b 0a 0a 0a 0a 24 63 6f 6e 66 69 67 46 | ::createConfig($io);....$configF |
25200 | 69 6c 65 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 67 6c 6f 62 61 6c 27 | ile.=.$input->getOption('global' |
25220 | 29 0a 3f 20 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 68 6f 6d 65 27 29 20 | ).?.($this->config->get('home'). |
25240 | 2e 20 27 2f 63 6f 6e 66 69 67 2e 6a 73 6f 6e 27 29 0a 3a 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 | ..'/config.json').:.($input->get |
25260 | 4f 70 74 69 6f 6e 28 27 66 69 6c 65 27 29 20 3f 3a 20 46 61 63 74 6f 72 79 3a 3a 67 65 74 43 6f | Option('file').?:.Factory::getCo |
25280 | 6d 70 6f 73 65 72 46 69 6c 65 28 29 29 3b 0a 0a 0a 69 66 20 28 0a 28 24 63 6f 6e 66 69 67 46 69 | mposerFile());...if.(.($configFi |
252a0 | 6c 65 20 3d 3d 3d 20 27 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 27 20 7c 7c 20 24 63 6f 6e 66 69 | le.===.'composer.json'.||.$confi |
252c0 | 67 46 69 6c 65 20 3d 3d 3d 20 27 2e 2f 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 27 29 0a 26 26 20 | gFile.===.'./composer.json').&&. |
252e0 | 21 66 69 6c 65 5f 65 78 69 73 74 73 28 24 63 6f 6e 66 69 67 46 69 6c 65 29 0a 26 26 20 72 65 61 | !file_exists($configFile).&&.rea |
25300 | 6c 70 61 74 68 28 50 6c 61 74 66 6f 72 6d 3a 3a 67 65 74 43 77 64 28 29 29 20 3d 3d 3d 20 72 65 | lpath(Platform::getCwd()).===.re |
25320 | 61 6c 70 61 74 68 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 68 6f 6d 65 27 | alpath($this->config->get('home' |
25340 | 29 29 0a 29 20 7b 0a 66 69 6c 65 5f 70 75 74 5f 63 6f 6e 74 65 6e 74 73 28 24 63 6f 6e 66 69 67 | )).).{.file_put_contents($config |
25360 | 46 69 6c 65 2c 20 22 7b 5c 6e 7d 5c 6e 22 29 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 63 6f 6e 66 69 | File,."{\n}\n");.}..$this->confi |
25380 | 67 46 69 6c 65 20 3d 20 6e 65 77 20 4a 73 6f 6e 46 69 6c 65 28 24 63 6f 6e 66 69 67 46 69 6c 65 | gFile.=.new.JsonFile($configFile |
253a0 | 2c 20 6e 75 6c 6c 2c 20 24 69 6f 29 3b 0a 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 53 6f 75 72 63 | ,.null,.$io);.$this->configSourc |
253c0 | 65 20 3d 20 6e 65 77 20 4a 73 6f 6e 43 6f 6e 66 69 67 53 6f 75 72 63 65 28 24 74 68 69 73 2d 3e | e.=.new.JsonConfigSource($this-> |
253e0 | 63 6f 6e 66 69 67 46 69 6c 65 29 3b 0a 0a 24 61 75 74 68 43 6f 6e 66 69 67 46 69 6c 65 20 3d 20 | configFile);..$authConfigFile.=. |
25400 | 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 67 6c 6f 62 61 6c 27 29 0a 3f 20 28 24 | $input->getOption('global').?.($ |
25420 | 74 68 69 73 2d 3e 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 68 6f 6d 65 27 29 20 2e 20 27 2f 61 75 | this->config->get('home')...'/au |
25440 | 74 68 2e 6a 73 6f 6e 27 29 0a 3a 20 64 69 72 6e 61 6d 65 28 24 63 6f 6e 66 69 67 46 69 6c 65 29 | th.json').:.dirname($configFile) |
25460 | 20 2e 20 27 2f 61 75 74 68 2e 6a 73 6f 6e 27 3b 0a 0a 24 74 68 69 73 2d 3e 61 75 74 68 43 6f 6e | ...'/auth.json';..$this->authCon |
25480 | 66 69 67 46 69 6c 65 20 3d 20 6e 65 77 20 4a 73 6f 6e 46 69 6c 65 28 24 61 75 74 68 43 6f 6e 66 | figFile.=.new.JsonFile($authConf |
254a0 | 69 67 46 69 6c 65 2c 20 6e 75 6c 6c 2c 20 24 69 6f 29 3b 0a 24 74 68 69 73 2d 3e 61 75 74 68 43 | igFile,.null,.$io);.$this->authC |
254c0 | 6f 6e 66 69 67 53 6f 75 72 63 65 20 3d 20 6e 65 77 20 4a 73 6f 6e 43 6f 6e 66 69 67 53 6f 75 72 | onfigSource.=.new.JsonConfigSour |
254e0 | 63 65 28 24 74 68 69 73 2d 3e 61 75 74 68 43 6f 6e 66 69 67 46 69 6c 65 2c 20 74 72 75 65 29 3b | ce($this->authConfigFile,.true); |
25500 | 0a 0a 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 67 6c 6f 62 61 6c | ...if.($input->getOption('global |
25520 | 27 29 20 26 26 20 21 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 46 69 6c 65 2d 3e 65 78 69 73 74 73 | ').&&.!$this->configFile->exists |
25540 | 28 29 29 20 7b 0a 74 6f 75 63 68 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 46 69 6c 65 2d 3e 67 | ()).{.touch($this->configFile->g |
25560 | 65 74 50 61 74 68 28 29 29 3b 0a 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 46 69 6c 65 2d 3e 77 72 | etPath());.$this->configFile->wr |
25580 | 69 74 65 28 5b 27 63 6f 6e 66 69 67 27 20 3d 3e 20 6e 65 77 20 5c 41 72 72 61 79 4f 62 6a 65 63 | ite(['config'.=>.new.\ArrayObjec |
255a0 | 74 5d 29 3b 0a 53 69 6c 65 6e 63 65 72 3a 3a 63 61 6c 6c 28 27 63 68 6d 6f 64 27 2c 20 24 74 68 | t]);.Silencer::call('chmod',.$th |
255c0 | 69 73 2d 3e 63 6f 6e 66 69 67 46 69 6c 65 2d 3e 67 65 74 50 61 74 68 28 29 2c 20 30 36 30 30 29 | is->configFile->getPath(),.0600) |
255e0 | 3b 0a 7d 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 67 6c 6f 62 61 | ;.}.if.($input->getOption('globa |
25600 | 6c 27 29 20 26 26 20 21 24 74 68 69 73 2d 3e 61 75 74 68 43 6f 6e 66 69 67 46 69 6c 65 2d 3e 65 | l').&&.!$this->authConfigFile->e |
25620 | 78 69 73 74 73 28 29 29 20 7b 0a 74 6f 75 63 68 28 24 74 68 69 73 2d 3e 61 75 74 68 43 6f 6e 66 | xists()).{.touch($this->authConf |
25640 | 69 67 46 69 6c 65 2d 3e 67 65 74 50 61 74 68 28 29 29 3b 0a 24 74 68 69 73 2d 3e 61 75 74 68 43 | igFile->getPath());.$this->authC |
25660 | 6f 6e 66 69 67 46 69 6c 65 2d 3e 77 72 69 74 65 28 5b 27 62 69 74 62 75 63 6b 65 74 2d 6f 61 75 | onfigFile->write(['bitbucket-oau |
25680 | 74 68 27 20 3d 3e 20 6e 65 77 20 5c 41 72 72 61 79 4f 62 6a 65 63 74 2c 20 27 67 69 74 68 75 62 | th'.=>.new.\ArrayObject,.'github |
256a0 | 2d 6f 61 75 74 68 27 20 3d 3e 20 6e 65 77 20 5c 41 72 72 61 79 4f 62 6a 65 63 74 2c 20 27 67 69 | -oauth'.=>.new.\ArrayObject,.'gi |
256c0 | 74 6c 61 62 2d 6f 61 75 74 68 27 20 3d 3e 20 6e 65 77 20 5c 41 72 72 61 79 4f 62 6a 65 63 74 2c | tlab-oauth'.=>.new.\ArrayObject, |
256e0 | 20 27 67 69 74 6c 61 62 2d 74 6f 6b 65 6e 27 20 3d 3e 20 6e 65 77 20 5c 41 72 72 61 79 4f 62 6a | .'gitlab-token'.=>.new.\ArrayObj |
25700 | 65 63 74 2c 20 27 68 74 74 70 2d 62 61 73 69 63 27 20 3d 3e 20 6e 65 77 20 5c 41 72 72 61 79 4f | ect,.'http-basic'.=>.new.\ArrayO |
25720 | 62 6a 65 63 74 2c 20 27 62 65 61 72 65 72 27 20 3d 3e 20 6e 65 77 20 5c 41 72 72 61 79 4f 62 6a | bject,.'bearer'.=>.new.\ArrayObj |
25740 | 65 63 74 5d 29 3b 0a 53 69 6c 65 6e 63 65 72 3a 3a 63 61 6c 6c 28 27 63 68 6d 6f 64 27 2c 20 24 | ect]);.Silencer::call('chmod',.$ |
25760 | 74 68 69 73 2d 3e 61 75 74 68 43 6f 6e 66 69 67 46 69 6c 65 2d 3e 67 65 74 50 61 74 68 28 29 2c | this->authConfigFile->getPath(), |
25780 | 20 30 36 30 30 29 3b 0a 7d 0a 0a 69 66 20 28 21 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 46 69 6c | .0600);.}..if.(!$this->configFil |
257a0 | 65 2d 3e 65 78 69 73 74 73 28 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d | e->exists()).{.throw.new.\Runtim |
257c0 | 65 45 78 63 65 70 74 69 6f 6e 28 73 70 72 69 6e 74 66 28 27 46 69 6c 65 20 22 25 73 22 20 63 61 | eException(sprintf('File."%s".ca |
257e0 | 6e 6e 6f 74 20 62 65 20 66 6f 75 6e 64 20 69 6e 20 74 68 65 20 63 75 72 72 65 6e 74 20 64 69 72 | nnot.be.found.in.the.current.dir |
25800 | 65 63 74 6f 72 79 27 2c 20 24 63 6f 6e 66 69 67 46 69 6c 65 29 29 3b 0a 7d 0a 7d 0a 0a 0a 0a 0a | ectory',.$configFile));.}.}..... |
25820 | 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 65 78 65 63 75 74 65 28 49 6e 70 75 74 | protected.function.execute(Input |
25840 | 49 6e 74 65 72 66 61 63 65 20 24 69 6e 70 75 74 2c 20 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 | Interface.$input,.OutputInterfac |
25860 | 65 20 24 6f 75 74 70 75 74 29 3a 20 69 6e 74 0a 7b 0a 0a 69 66 20 28 74 72 75 65 20 3d 3d 3d 20 | e.$output):.int.{..if.(true.===. |
25880 | 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 65 64 69 74 6f 72 27 29 29 20 7b 0a 24 | $input->getOption('editor')).{.$ |
258a0 | 65 64 69 74 6f 72 20 3d 20 50 6c 61 74 66 6f 72 6d 3a 3a 67 65 74 45 6e 76 28 27 45 44 49 54 4f | editor.=.Platform::getEnv('EDITO |
258c0 | 52 27 29 3b 0a 69 66 20 28 66 61 6c 73 65 20 3d 3d 3d 20 24 65 64 69 74 6f 72 20 7c 7c 20 27 27 | R');.if.(false.===.$editor.||.'' |
258e0 | 20 3d 3d 3d 20 24 65 64 69 74 6f 72 29 20 7b 0a 69 66 20 28 50 6c 61 74 66 6f 72 6d 3a 3a 69 73 | .===.$editor).{.if.(Platform::is |
25900 | 57 69 6e 64 6f 77 73 28 29 29 20 7b 0a 24 65 64 69 74 6f 72 20 3d 20 27 6e 6f 74 65 70 61 64 27 | Windows()).{.$editor.=.'notepad' |
25920 | 3b 0a 7d 20 65 6c 73 65 20 7b 0a 66 6f 72 65 61 63 68 20 28 5b 27 65 64 69 74 6f 72 27 2c 20 27 | ;.}.else.{.foreach.(['editor',.' |
25940 | 76 69 6d 27 2c 20 27 76 69 27 2c 20 27 6e 61 6e 6f 27 2c 20 27 70 69 63 6f 27 2c 20 27 65 64 27 | vim',.'vi',.'nano',.'pico',.'ed' |
25960 | 5d 20 61 73 20 24 63 61 6e 64 69 64 61 74 65 29 20 7b 0a 69 66 20 28 65 78 65 63 28 27 77 68 69 | ].as.$candidate).{.if.(exec('whi |
25980 | 63 68 20 27 2e 24 63 61 6e 64 69 64 61 74 65 29 29 20 7b 0a 24 65 64 69 74 6f 72 20 3d 20 24 63 | ch.'.$candidate)).{.$editor.=.$c |
259a0 | 61 6e 64 69 64 61 74 65 3b 0a 62 72 65 61 6b 3b 0a 7d 0a 7d 0a 7d 0a 7d 20 65 6c 73 65 20 7b 0a | andidate;.break;.}.}.}.}.else.{. |
259c0 | 24 65 64 69 74 6f 72 20 3d 20 65 73 63 61 70 65 73 68 65 6c 6c 63 6d 64 28 24 65 64 69 74 6f 72 | $editor.=.escapeshellcmd($editor |
259e0 | 29 3b 0a 7d 0a 0a 24 66 69 6c 65 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 | );.}..$file.=.$input->getOption( |
25a00 | 27 61 75 74 68 27 29 20 3f 20 24 74 68 69 73 2d 3e 61 75 74 68 43 6f 6e 66 69 67 46 69 6c 65 2d | 'auth').?.$this->authConfigFile- |
25a20 | 3e 67 65 74 50 61 74 68 28 29 20 3a 20 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 46 69 6c 65 2d 3e | >getPath().:.$this->configFile-> |
25a40 | 67 65 74 50 61 74 68 28 29 3b 0a 73 79 73 74 65 6d 28 24 65 64 69 74 6f 72 20 2e 20 27 20 27 20 | getPath();.system($editor...'.'. |
25a60 | 2e 20 24 66 69 6c 65 20 2e 20 28 50 6c 61 74 66 6f 72 6d 3a 3a 69 73 57 69 6e 64 6f 77 73 28 29 | ..$file...(Platform::isWindows() |
25a80 | 20 3f 20 27 27 20 3a 20 27 20 3e 20 60 74 74 79 60 27 29 29 3b 0a 0a 72 65 74 75 72 6e 20 30 3b | .?.''.:.'.>.`tty`'));..return.0; |
25aa0 | 0a 7d 0a 0a 69 66 20 28 66 61 6c 73 65 20 3d 3d 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 | .}..if.(false.===.$input->getOpt |
25ac0 | 69 6f 6e 28 27 67 6c 6f 62 61 6c 27 29 29 20 7b 0a 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 2d 3e | ion('global')).{.$this->config-> |
25ae0 | 6d 65 72 67 65 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 46 69 6c 65 2d 3e 72 65 61 64 28 29 2c | merge($this->configFile->read(), |
25b00 | 20 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 46 69 6c 65 2d 3e 67 65 74 50 61 74 68 28 29 29 3b 0a | .$this->configFile->getPath());. |
25b20 | 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 2d 3e 6d 65 72 67 65 28 5b 27 63 6f 6e 66 69 67 27 20 3d | $this->config->merge(['config'.= |
25b40 | 3e 20 24 74 68 69 73 2d 3e 61 75 74 68 43 6f 6e 66 69 67 46 69 6c 65 2d 3e 65 78 69 73 74 73 28 | >.$this->authConfigFile->exists( |
25b60 | 29 20 3f 20 24 74 68 69 73 2d 3e 61 75 74 68 43 6f 6e 66 69 67 46 69 6c 65 2d 3e 72 65 61 64 28 | ).?.$this->authConfigFile->read( |
25b80 | 29 20 3a 20 5b 5d 5d 2c 20 24 74 68 69 73 2d 3e 61 75 74 68 43 6f 6e 66 69 67 46 69 6c 65 2d 3e | ).:.[]],.$this->authConfigFile-> |
25ba0 | 67 65 74 50 61 74 68 28 29 29 3b 0a 7d 0a 0a 0a 69 66 20 28 74 72 75 65 20 3d 3d 3d 20 24 69 6e | getPath());.}...if.(true.===.$in |
25bc0 | 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6c 69 73 74 27 29 29 20 7b 0a 24 74 68 69 73 2d | put->getOption('list')).{.$this- |
25be0 | 3e 6c 69 73 74 43 6f 6e 66 69 67 75 72 61 74 69 6f 6e 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 | >listConfiguration($this->config |
25c00 | 2d 3e 61 6c 6c 28 29 2c 20 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 2d 3e 72 61 77 28 29 2c 20 24 | ->all(),.$this->config->raw(),.$ |
25c20 | 6f 75 74 70 75 74 2c 20 6e 75 6c 6c 2c 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 | output,.null,.$input->getOption( |
25c40 | 27 73 6f 75 72 63 65 27 29 29 3b 0a 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 0a 24 73 65 74 74 69 | 'source'));..return.0;.}..$setti |
25c60 | 6e 67 4b 65 79 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 41 72 67 75 6d 65 6e 74 28 27 73 65 74 | ngKey.=.$input->getArgument('set |
25c80 | 74 69 6e 67 2d 6b 65 79 27 29 3b 0a 69 66 20 28 21 69 73 5f 73 74 72 69 6e 67 28 24 73 65 74 74 | ting-key');.if.(!is_string($sett |
25ca0 | 69 6e 67 4b 65 79 29 29 20 7b 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 0a 0a 69 66 20 28 5b 5d 20 | ingKey)).{.return.0;.}...if.([]. |
25cc0 | 21 3d 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 41 72 67 75 6d 65 6e 74 28 27 73 65 74 74 69 6e 67 | !==.$input->getArgument('setting |
25ce0 | 2d 76 61 6c 75 65 27 29 20 26 26 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 75 | -value').&&.$input->getOption('u |
25d00 | 6e 73 65 74 27 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 | nset')).{.throw.new.\RuntimeExce |
25d20 | 70 74 69 6f 6e 28 27 59 6f 75 20 63 61 6e 20 6e 6f 74 20 63 6f 6d 62 69 6e 65 20 61 20 73 65 74 | ption('You.can.not.combine.a.set |
25d40 | 74 69 6e 67 20 76 61 6c 75 65 20 77 69 74 68 20 2d 2d 75 6e 73 65 74 27 29 3b 0a 7d 0a 0a 0a 69 | ting.value.with.--unset');.}...i |
25d60 | 66 20 28 5b 5d 20 3d 3d 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 41 72 67 75 6d 65 6e 74 28 27 73 | f.([].===.$input->getArgument('s |
25d80 | 65 74 74 69 6e 67 2d 76 61 6c 75 65 27 29 20 26 26 20 21 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 | etting-value').&&.!$input->getOp |
25da0 | 74 69 6f 6e 28 27 75 6e 73 65 74 27 29 29 20 7b 0a 24 70 72 6f 70 65 72 74 69 65 73 20 3d 20 5b | tion('unset')).{.$properties.=.[ |
25dc0 | 27 6e 61 6d 65 27 2c 20 27 74 79 70 65 27 2c 20 27 64 65 73 63 72 69 70 74 69 6f 6e 27 2c 20 27 | 'name',.'type',.'description',.' |
25de0 | 68 6f 6d 65 70 61 67 65 27 2c 20 27 76 65 72 73 69 6f 6e 27 2c 20 27 6d 69 6e 69 6d 75 6d 2d 73 | homepage',.'version',.'minimum-s |
25e00 | 74 61 62 69 6c 69 74 79 27 2c 20 27 70 72 65 66 65 72 2d 73 74 61 62 6c 65 27 2c 20 27 6b 65 79 | tability',.'prefer-stable',.'key |
25e20 | 77 6f 72 64 73 27 2c 20 27 6c 69 63 65 6e 73 65 27 2c 20 27 65 78 74 72 61 27 5d 3b 0a 24 72 61 | words',.'license',.'extra'];.$ra |
25e40 | 77 44 61 74 61 20 3d 20 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 46 69 6c 65 2d 3e 72 65 61 64 28 | wData.=.$this->configFile->read( |
25e60 | 29 3b 0a 24 64 61 74 61 20 3d 20 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 2d 3e 61 6c 6c 28 29 3b | );.$data.=.$this->config->all(); |
25e80 | 0a 69 66 20 28 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 2f 5e 72 65 70 6f 73 3f 28 3f 3a 69 | .if.(Preg::isMatch('/^repos?(?:i |
25ea0 | 74 6f 72 69 65 73 29 3f 28 3f 3a 5c 2e 28 2e 2b 29 29 3f 2f 27 2c 20 24 73 65 74 74 69 6e 67 4b | tories)?(?:\.(.+))?/',.$settingK |
25ec0 | 65 79 2c 20 24 6d 61 74 63 68 65 73 29 29 20 7b 0a 69 66 20 28 21 69 73 73 65 74 28 24 6d 61 74 | ey,.$matches)).{.if.(!isset($mat |
25ee0 | 63 68 65 73 5b 31 5d 29 20 7c 7c 20 24 6d 61 74 63 68 65 73 5b 31 5d 20 3d 3d 3d 20 27 27 29 20 | ches[1]).||.$matches[1].===.''). |
25f00 | 7b 0a 24 76 61 6c 75 65 20 3d 20 24 64 61 74 61 5b 27 72 65 70 6f 73 69 74 6f 72 69 65 73 27 5d | {.$value.=.$data['repositories'] |
25f20 | 20 3f 3f 20 5b 5d 3b 0a 7d 20 65 6c 73 65 20 7b 0a 69 66 20 28 21 69 73 73 65 74 28 24 64 61 74 | .??.[];.}.else.{.if.(!isset($dat |
25f40 | 61 5b 27 72 65 70 6f 73 69 74 6f 72 69 65 73 27 5d 5b 24 6d 61 74 63 68 65 73 5b 31 5d 5d 29 29 | a['repositories'][$matches[1]])) |
25f60 | 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 | .{.throw.new.\InvalidArgumentExc |
25f80 | 65 70 74 69 6f 6e 28 27 54 68 65 72 65 20 69 73 20 6e 6f 20 27 2e 24 6d 61 74 63 68 65 73 5b 31 | eption('There.is.no.'.$matches[1 |
25fa0 | 5d 2e 27 20 72 65 70 6f 73 69 74 6f 72 79 20 64 65 66 69 6e 65 64 27 29 3b 0a 7d 0a 0a 24 76 61 | ].'.repository.defined');.}..$va |
25fc0 | 6c 75 65 20 3d 20 24 64 61 74 61 5b 27 72 65 70 6f 73 69 74 6f 72 69 65 73 27 5d 5b 24 6d 61 74 | lue.=.$data['repositories'][$mat |
25fe0 | 63 68 65 73 5b 31 5d 5d 3b 0a 7d 0a 7d 20 65 6c 73 65 69 66 20 28 73 74 72 70 6f 73 28 24 73 65 | ches[1]];.}.}.elseif.(strpos($se |
26000 | 74 74 69 6e 67 4b 65 79 2c 20 27 2e 27 29 29 20 7b 0a 24 62 69 74 73 20 3d 20 65 78 70 6c 6f 64 | ttingKey,.'.')).{.$bits.=.explod |
26020 | 65 28 27 2e 27 2c 20 24 73 65 74 74 69 6e 67 4b 65 79 29 3b 0a 69 66 20 28 24 62 69 74 73 5b 30 | e('.',.$settingKey);.if.($bits[0 |
26040 | 5d 20 3d 3d 3d 20 27 65 78 74 72 61 27 29 20 7b 0a 24 64 61 74 61 20 3d 20 24 72 61 77 44 61 74 | ].===.'extra').{.$data.=.$rawDat |
26060 | 61 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 64 61 74 61 20 3d 20 24 64 61 74 61 5b 27 63 6f 6e 66 69 | a;.}.else.{.$data.=.$data['confi |
26080 | 67 27 5d 3b 0a 7d 0a 24 6d 61 74 63 68 20 3d 20 66 61 6c 73 65 3b 0a 66 6f 72 65 61 63 68 20 28 | g'];.}.$match.=.false;.foreach.( |
260a0 | 24 62 69 74 73 20 61 73 20 24 62 69 74 29 20 7b 0a 24 6b 65 79 20 3d 20 69 73 73 65 74 28 24 6b | $bits.as.$bit).{.$key.=.isset($k |
260c0 | 65 79 29 20 3f 20 24 6b 65 79 2e 27 2e 27 2e 24 62 69 74 20 3a 20 24 62 69 74 3b 0a 24 6d 61 74 | ey).?.$key.'.'.$bit.:.$bit;.$mat |
260e0 | 63 68 20 3d 20 66 61 6c 73 65 3b 0a 69 66 20 28 69 73 73 65 74 28 24 64 61 74 61 5b 24 6b 65 79 | ch.=.false;.if.(isset($data[$key |
26100 | 5d 29 29 20 7b 0a 24 6d 61 74 63 68 20 3d 20 74 72 75 65 3b 0a 24 64 61 74 61 20 3d 20 24 64 61 | ])).{.$match.=.true;.$data.=.$da |
26120 | 74 61 5b 24 6b 65 79 5d 3b 0a 75 6e 73 65 74 28 24 6b 65 79 29 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 | ta[$key];.unset($key);.}.}..if.( |
26140 | 21 24 6d 61 74 63 68 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 | !$match).{.throw.new.\RuntimeExc |
26160 | 65 70 74 69 6f 6e 28 24 73 65 74 74 69 6e 67 4b 65 79 2e 27 20 69 73 20 6e 6f 74 20 64 65 66 69 | eption($settingKey.'.is.not.defi |
26180 | 6e 65 64 2e 27 29 3b 0a 7d 0a 0a 24 76 61 6c 75 65 20 3d 20 24 64 61 74 61 3b 0a 7d 20 65 6c 73 | ned.');.}..$value.=.$data;.}.els |
261a0 | 65 69 66 20 28 69 73 73 65 74 28 24 64 61 74 61 5b 27 63 6f 6e 66 69 67 27 5d 5b 24 73 65 74 74 | eif.(isset($data['config'][$sett |
261c0 | 69 6e 67 4b 65 79 5d 29 29 20 7b 0a 24 76 61 6c 75 65 20 3d 20 24 74 68 69 73 2d 3e 63 6f 6e 66 | ingKey])).{.$value.=.$this->conf |
261e0 | 69 67 2d 3e 67 65 74 28 24 73 65 74 74 69 6e 67 4b 65 79 2c 20 24 69 6e 70 75 74 2d 3e 67 65 74 | ig->get($settingKey,.$input->get |
26200 | 4f 70 74 69 6f 6e 28 27 61 62 73 6f 6c 75 74 65 27 29 20 3f 20 30 20 3a 20 43 6f 6e 66 69 67 3a | Option('absolute').?.0.:.Config: |
26220 | 3a 52 45 4c 41 54 49 56 45 5f 50 41 54 48 53 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 69 73 73 65 | :RELATIVE_PATHS);.}.elseif.(isse |
26240 | 74 28 24 72 61 77 44 61 74 61 5b 24 73 65 74 74 69 6e 67 4b 65 79 5d 29 20 26 26 20 69 6e 5f 61 | t($rawData[$settingKey]).&&.in_a |
26260 | 72 72 61 79 28 24 73 65 74 74 69 6e 67 4b 65 79 2c 20 24 70 72 6f 70 65 72 74 69 65 73 2c 20 74 | rray($settingKey,.$properties,.t |
26280 | 72 75 65 29 29 20 7b 0a 24 76 61 6c 75 65 20 3d 20 24 72 61 77 44 61 74 61 5b 24 73 65 74 74 69 | rue)).{.$value.=.$rawData[$setti |
262a0 | 6e 67 4b 65 79 5d 3b 0a 7d 20 65 6c 73 65 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 | ngKey];.}.else.{.throw.new.\Runt |
262c0 | 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 24 73 65 74 74 69 6e 67 4b 65 79 2e 27 20 69 73 20 6e 6f | imeException($settingKey.'.is.no |
262e0 | 74 20 64 65 66 69 6e 65 64 27 29 3b 0a 7d 0a 0a 69 66 20 28 69 73 5f 61 72 72 61 79 28 24 76 61 | t.defined');.}..if.(is_array($va |
26300 | 6c 75 65 29 29 20 7b 0a 24 76 61 6c 75 65 20 3d 20 4a 73 6f 6e 46 69 6c 65 3a 3a 65 6e 63 6f 64 | lue)).{.$value.=.JsonFile::encod |
26320 | 65 28 24 76 61 6c 75 65 2c 20 4a 53 4f 4e 5f 55 4e 45 53 43 41 50 45 44 5f 53 4c 41 53 48 45 53 | e($value,.JSON_UNESCAPED_SLASHES |
26340 | 20 7c 20 4a 53 4f 4e 5f 55 4e 45 53 43 41 50 45 44 5f 55 4e 49 43 4f 44 45 29 3b 0a 7d 0a 0a 24 | .|.JSON_UNESCAPED_UNICODE);.}..$ |
26360 | 73 6f 75 72 63 65 4f 66 43 6f 6e 66 69 67 56 61 6c 75 65 20 3d 20 27 27 3b 0a 69 66 20 28 24 69 | sourceOfConfigValue.=.'';.if.($i |
26380 | 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 73 6f 75 72 63 65 27 29 29 20 7b 0a 24 73 6f | nput->getOption('source')).{.$so |
263a0 | 75 72 63 65 4f 66 43 6f 6e 66 69 67 56 61 6c 75 65 20 3d 20 27 20 28 27 20 2e 20 24 74 68 69 73 | urceOfConfigValue.=.'.('...$this |
263c0 | 2d 3e 63 6f 6e 66 69 67 2d 3e 67 65 74 53 6f 75 72 63 65 4f 66 56 61 6c 75 65 28 24 73 65 74 74 | ->config->getSourceOfValue($sett |
263e0 | 69 6e 67 4b 65 79 29 20 2e 20 27 29 27 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 | ingKey)...')';.}..$this->getIO() |
26400 | 2d 3e 77 72 69 74 65 28 24 76 61 6c 75 65 20 2e 20 24 73 6f 75 72 63 65 4f 66 43 6f 6e 66 69 67 | ->write($value...$sourceOfConfig |
26420 | 56 61 6c 75 65 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 3a 3a 51 55 49 45 54 29 | Value,.true,.IOInterface::QUIET) |
26440 | 3b 0a 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 0a 24 76 61 6c 75 65 73 20 3d 20 24 69 6e 70 75 74 | ;..return.0;.}..$values.=.$input |
26460 | 2d 3e 67 65 74 41 72 67 75 6d 65 6e 74 28 27 73 65 74 74 69 6e 67 2d 76 61 6c 75 65 27 29 3b 20 | ->getArgument('setting-value');. |
26480 | 0a 0a 24 62 6f 6f 6c 65 61 6e 56 61 6c 69 64 61 74 6f 72 20 3d 20 73 74 61 74 69 63 20 66 75 6e | ..$booleanValidator.=.static.fun |
264a0 | 63 74 69 6f 6e 20 28 24 76 61 6c 29 3a 20 62 6f 6f 6c 20 7b 0a 72 65 74 75 72 6e 20 69 6e 5f 61 | ction.($val):.bool.{.return.in_a |
264c0 | 72 72 61 79 28 24 76 61 6c 2c 20 5b 27 74 72 75 65 27 2c 20 27 66 61 6c 73 65 27 2c 20 27 31 27 | rray($val,.['true',.'false',.'1' |
264e0 | 2c 20 27 30 27 5d 2c 20 74 72 75 65 29 3b 0a 7d 3b 0a 24 62 6f 6f 6c 65 61 6e 4e 6f 72 6d 61 6c | ,.'0'],.true);.};.$booleanNormal |
26500 | 69 7a 65 72 20 3d 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 76 61 6c 29 3a 20 62 | izer.=.static.function.($val):.b |
26520 | 6f 6f 6c 20 7b 0a 72 65 74 75 72 6e 20 24 76 61 6c 20 21 3d 3d 20 27 66 61 6c 73 65 27 20 26 26 | ool.{.return.$val.!==.'false'.&& |
26540 | 20 28 62 6f 6f 6c 29 20 24 76 61 6c 3b 0a 7d 3b 0a 0a 0a 24 75 6e 69 71 75 65 43 6f 6e 66 69 67 | .(bool).$val;.};...$uniqueConfig |
26560 | 56 61 6c 75 65 73 20 3d 20 5b 0a 27 70 72 6f 63 65 73 73 2d 74 69 6d 65 6f 75 74 27 20 3d 3e 20 | Values.=.[.'process-timeout'.=>. |
26580 | 5b 27 69 73 5f 6e 75 6d 65 72 69 63 27 2c 20 27 69 6e 74 76 61 6c 27 5d 2c 0a 27 75 73 65 2d 69 | ['is_numeric',.'intval'],.'use-i |
265a0 | 6e 63 6c 75 64 65 2d 70 61 74 68 27 20 3d 3e 20 5b 24 62 6f 6f 6c 65 61 6e 56 61 6c 69 64 61 74 | nclude-path'.=>.[$booleanValidat |
265c0 | 6f 72 2c 20 24 62 6f 6f 6c 65 61 6e 4e 6f 72 6d 61 6c 69 7a 65 72 5d 2c 0a 27 75 73 65 2d 67 69 | or,.$booleanNormalizer],.'use-gi |
265e0 | 74 68 75 62 2d 61 70 69 27 20 3d 3e 20 5b 24 62 6f 6f 6c 65 61 6e 56 61 6c 69 64 61 74 6f 72 2c | thub-api'.=>.[$booleanValidator, |
26600 | 20 24 62 6f 6f 6c 65 61 6e 4e 6f 72 6d 61 6c 69 7a 65 72 5d 2c 0a 27 70 72 65 66 65 72 72 65 64 | .$booleanNormalizer],.'preferred |
26620 | 2d 69 6e 73 74 61 6c 6c 27 20 3d 3e 20 5b 0a 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 | -install'.=>.[.static.function.( |
26640 | 24 76 61 6c 29 3a 20 62 6f 6f 6c 20 7b 0a 72 65 74 75 72 6e 20 69 6e 5f 61 72 72 61 79 28 24 76 | $val):.bool.{.return.in_array($v |
26660 | 61 6c 2c 20 5b 27 61 75 74 6f 27 2c 20 27 73 6f 75 72 63 65 27 2c 20 27 64 69 73 74 27 5d 2c 20 | al,.['auto',.'source',.'dist'],. |
26680 | 74 72 75 65 29 3b 0a 7d 2c 0a 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 76 61 6c 29 | true);.},.static.function.($val) |
266a0 | 20 7b 0a 72 65 74 75 72 6e 20 24 76 61 6c 3b 0a 7d 2c 0a 5d 2c 0a 27 67 69 74 6c 61 62 2d 70 72 | .{.return.$val;.},.],.'gitlab-pr |
266c0 | 6f 74 6f 63 6f 6c 27 20 3d 3e 20 5b 0a 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 76 | otocol'.=>.[.static.function.($v |
266e0 | 61 6c 29 3a 20 62 6f 6f 6c 20 7b 0a 72 65 74 75 72 6e 20 69 6e 5f 61 72 72 61 79 28 24 76 61 6c | al):.bool.{.return.in_array($val |
26700 | 2c 20 5b 27 67 69 74 27 2c 20 27 68 74 74 70 27 2c 20 27 68 74 74 70 73 27 5d 2c 20 74 72 75 65 | ,.['git',.'http',.'https'],.true |
26720 | 29 3b 0a 7d 2c 0a 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 76 61 6c 29 20 7b 0a 72 | );.},.static.function.($val).{.r |
26740 | 65 74 75 72 6e 20 24 76 61 6c 3b 0a 7d 2c 0a 5d 2c 0a 27 73 74 6f 72 65 2d 61 75 74 68 73 27 20 | eturn.$val;.},.],.'store-auths'. |
26760 | 3d 3e 20 5b 0a 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 76 61 6c 29 3a 20 62 6f 6f | =>.[.static.function.($val):.boo |
26780 | 6c 20 7b 0a 72 65 74 75 72 6e 20 69 6e 5f 61 72 72 61 79 28 24 76 61 6c 2c 20 5b 27 74 72 75 65 | l.{.return.in_array($val,.['true |
267a0 | 27 2c 20 27 66 61 6c 73 65 27 2c 20 27 70 72 6f 6d 70 74 27 5d 2c 20 74 72 75 65 29 3b 0a 7d 2c | ',.'false',.'prompt'],.true);.}, |
267c0 | 0a 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 76 61 6c 29 20 7b 0a 69 66 20 28 27 70 | .static.function.($val).{.if.('p |
267e0 | 72 6f 6d 70 74 27 20 3d 3d 3d 20 24 76 61 6c 29 20 7b 0a 72 65 74 75 72 6e 20 27 70 72 6f 6d 70 | rompt'.===.$val).{.return.'promp |
26800 | 74 27 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 76 61 6c 20 21 3d 3d 20 27 66 61 6c 73 65 27 20 26 | t';.}..return.$val.!==.'false'.& |
26820 | 26 20 28 62 6f 6f 6c 29 20 24 76 61 6c 3b 0a 7d 2c 0a 5d 2c 0a 27 6e 6f 74 69 66 79 2d 6f 6e 2d | &.(bool).$val;.},.],.'notify-on- |
26840 | 69 6e 73 74 61 6c 6c 27 20 3d 3e 20 5b 24 62 6f 6f 6c 65 61 6e 56 61 6c 69 64 61 74 6f 72 2c 20 | install'.=>.[$booleanValidator,. |
26860 | 24 62 6f 6f 6c 65 61 6e 4e 6f 72 6d 61 6c 69 7a 65 72 5d 2c 0a 27 76 65 6e 64 6f 72 2d 64 69 72 | $booleanNormalizer],.'vendor-dir |
26880 | 27 20 3d 3e 20 5b 27 69 73 5f 73 74 72 69 6e 67 27 2c 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 | '.=>.['is_string',.static.functi |
268a0 | 6f 6e 20 28 24 76 61 6c 29 20 7b 0a 72 65 74 75 72 6e 20 24 76 61 6c 3b 0a 7d 5d 2c 0a 27 62 69 | on.($val).{.return.$val;.}],.'bi |
268c0 | 6e 2d 64 69 72 27 20 3d 3e 20 5b 27 69 73 5f 73 74 72 69 6e 67 27 2c 20 73 74 61 74 69 63 20 66 | n-dir'.=>.['is_string',.static.f |
268e0 | 75 6e 63 74 69 6f 6e 20 28 24 76 61 6c 29 20 7b 0a 72 65 74 75 72 6e 20 24 76 61 6c 3b 0a 7d 5d | unction.($val).{.return.$val;.}] |
26900 | 2c 0a 27 61 72 63 68 69 76 65 2d 64 69 72 27 20 3d 3e 20 5b 27 69 73 5f 73 74 72 69 6e 67 27 2c | ,.'archive-dir'.=>.['is_string', |
26920 | 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 76 61 6c 29 20 7b 0a 72 65 74 75 72 6e | .static.function.($val).{.return |
26940 | 20 24 76 61 6c 3b 0a 7d 5d 2c 0a 27 61 72 63 68 69 76 65 2d 66 6f 72 6d 61 74 27 20 3d 3e 20 5b | .$val;.}],.'archive-format'.=>.[ |
26960 | 27 69 73 5f 73 74 72 69 6e 67 27 2c 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 76 | 'is_string',.static.function.($v |
26980 | 61 6c 29 20 7b 0a 72 65 74 75 72 6e 20 24 76 61 6c 3b 0a 7d 5d 2c 0a 27 64 61 74 61 2d 64 69 72 | al).{.return.$val;.}],.'data-dir |
269a0 | 27 20 3d 3e 20 5b 27 69 73 5f 73 74 72 69 6e 67 27 2c 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 | '.=>.['is_string',.static.functi |
269c0 | 6f 6e 20 28 24 76 61 6c 29 20 7b 0a 72 65 74 75 72 6e 20 24 76 61 6c 3b 0a 7d 5d 2c 0a 27 63 61 | on.($val).{.return.$val;.}],.'ca |
269e0 | 63 68 65 2d 64 69 72 27 20 3d 3e 20 5b 27 69 73 5f 73 74 72 69 6e 67 27 2c 20 73 74 61 74 69 63 | che-dir'.=>.['is_string',.static |
26a00 | 20 66 75 6e 63 74 69 6f 6e 20 28 24 76 61 6c 29 20 7b 0a 72 65 74 75 72 6e 20 24 76 61 6c 3b 0a | .function.($val).{.return.$val;. |
26a20 | 7d 5d 2c 0a 27 63 61 63 68 65 2d 66 69 6c 65 73 2d 64 69 72 27 20 3d 3e 20 5b 27 69 73 5f 73 74 | }],.'cache-files-dir'.=>.['is_st |
26a40 | 72 69 6e 67 27 2c 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 76 61 6c 29 20 7b 0a | ring',.static.function.($val).{. |
26a60 | 72 65 74 75 72 6e 20 24 76 61 6c 3b 0a 7d 5d 2c 0a 27 63 61 63 68 65 2d 72 65 70 6f 2d 64 69 72 | return.$val;.}],.'cache-repo-dir |
26a80 | 27 20 3d 3e 20 5b 27 69 73 5f 73 74 72 69 6e 67 27 2c 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 | '.=>.['is_string',.static.functi |
26aa0 | 6f 6e 20 28 24 76 61 6c 29 20 7b 0a 72 65 74 75 72 6e 20 24 76 61 6c 3b 0a 7d 5d 2c 0a 27 63 61 | on.($val).{.return.$val;.}],.'ca |
26ac0 | 63 68 65 2d 76 63 73 2d 64 69 72 27 20 3d 3e 20 5b 27 69 73 5f 73 74 72 69 6e 67 27 2c 20 73 74 | che-vcs-dir'.=>.['is_string',.st |
26ae0 | 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 76 61 6c 29 20 7b 0a 72 65 74 75 72 6e 20 24 76 | atic.function.($val).{.return.$v |
26b00 | 61 6c 3b 0a 7d 5d 2c 0a 27 63 61 63 68 65 2d 74 74 6c 27 20 3d 3e 20 5b 27 69 73 5f 6e 75 6d 65 | al;.}],.'cache-ttl'.=>.['is_nume |
26b20 | 72 69 63 27 2c 20 27 69 6e 74 76 61 6c 27 5d 2c 0a 27 63 61 63 68 65 2d 66 69 6c 65 73 2d 74 74 | ric',.'intval'],.'cache-files-tt |
26b40 | 6c 27 20 3d 3e 20 5b 27 69 73 5f 6e 75 6d 65 72 69 63 27 2c 20 27 69 6e 74 76 61 6c 27 5d 2c 0a | l'.=>.['is_numeric',.'intval'],. |
26b60 | 27 63 61 63 68 65 2d 66 69 6c 65 73 2d 6d 61 78 73 69 7a 65 27 20 3d 3e 20 5b 0a 73 74 61 74 69 | 'cache-files-maxsize'.=>.[.stati |
26b80 | 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 76 61 6c 29 3a 20 62 6f 6f 6c 20 7b 0a 72 65 74 75 72 6e | c.function.($val):.bool.{.return |
26ba0 | 20 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 2f 5e 5c 73 2a 28 5b 30 2d 39 2e 5d 2b 29 5c 73 | .Preg::isMatch('/^\s*([0-9.]+)\s |
26bc0 | 2a 28 3f 3a 28 5b 6b 6d 67 5d 29 28 3f 3a 69 3f 62 29 3f 29 3f 5c 73 2a 24 2f 69 27 2c 20 24 76 | *(?:([kmg])(?:i?b)?)?\s*$/i',.$v |
26be0 | 61 6c 29 3b 0a 7d 2c 0a 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 76 61 6c 29 20 7b | al);.},.static.function.($val).{ |
26c00 | 0a 72 65 74 75 72 6e 20 24 76 61 6c 3b 0a 7d 2c 0a 5d 2c 0a 27 62 69 6e 2d 63 6f 6d 70 61 74 27 | .return.$val;.},.],.'bin-compat' |
26c20 | 20 3d 3e 20 5b 0a 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 76 61 6c 29 3a 20 62 6f | .=>.[.static.function.($val):.bo |
26c40 | 6f 6c 20 7b 0a 72 65 74 75 72 6e 20 69 6e 5f 61 72 72 61 79 28 24 76 61 6c 2c 20 5b 27 61 75 74 | ol.{.return.in_array($val,.['aut |
26c60 | 6f 27 2c 20 27 66 75 6c 6c 27 2c 20 27 73 79 6d 6c 69 6e 6b 27 5d 29 3b 0a 7d 2c 0a 73 74 61 74 | o',.'full',.'symlink']);.},.stat |
26c80 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 76 61 6c 29 20 7b 0a 72 65 74 75 72 6e 20 24 76 61 6c | ic.function.($val).{.return.$val |
26ca0 | 3b 0a 7d 2c 0a 5d 2c 0a 27 64 69 73 63 61 72 64 2d 63 68 61 6e 67 65 73 27 20 3d 3e 20 5b 0a 73 | ;.},.],.'discard-changes'.=>.[.s |
26cc0 | 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 76 61 6c 29 3a 20 62 6f 6f 6c 20 7b 0a 72 65 | tatic.function.($val):.bool.{.re |
26ce0 | 74 75 72 6e 20 69 6e 5f 61 72 72 61 79 28 24 76 61 6c 2c 20 5b 27 73 74 61 73 68 27 2c 20 27 74 | turn.in_array($val,.['stash',.'t |
26d00 | 72 75 65 27 2c 20 27 66 61 6c 73 65 27 2c 20 27 31 27 2c 20 27 30 27 5d 2c 20 74 72 75 65 29 3b | rue',.'false',.'1',.'0'],.true); |
26d20 | 0a 7d 2c 0a 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 76 61 6c 29 20 7b 0a 69 66 20 | .},.static.function.($val).{.if. |
26d40 | 28 27 73 74 61 73 68 27 20 3d 3d 3d 20 24 76 61 6c 29 20 7b 0a 72 65 74 75 72 6e 20 27 73 74 61 | ('stash'.===.$val).{.return.'sta |
26d60 | 73 68 27 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 76 61 6c 20 21 3d 3d 20 27 66 61 6c 73 65 27 20 | sh';.}..return.$val.!==.'false'. |
26d80 | 26 26 20 28 62 6f 6f 6c 29 20 24 76 61 6c 3b 0a 7d 2c 0a 5d 2c 0a 27 61 75 74 6f 6c 6f 61 64 65 | &&.(bool).$val;.},.],.'autoloade |
26da0 | 72 2d 73 75 66 66 69 78 27 20 3d 3e 20 5b 27 69 73 5f 73 74 72 69 6e 67 27 2c 20 73 74 61 74 69 | r-suffix'.=>.['is_string',.stati |
26dc0 | 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 76 61 6c 29 20 7b 0a 72 65 74 75 72 6e 20 24 76 61 6c 20 | c.function.($val).{.return.$val. |
26de0 | 3d 3d 3d 20 27 6e 75 6c 6c 27 20 3f 20 6e 75 6c 6c 20 3a 20 24 76 61 6c 3b 0a 7d 5d 2c 0a 27 73 | ===.'null'.?.null.:.$val;.}],.'s |
26e00 | 6f 72 74 2d 70 61 63 6b 61 67 65 73 27 20 3d 3e 20 5b 24 62 6f 6f 6c 65 61 6e 56 61 6c 69 64 61 | ort-packages'.=>.[$booleanValida |
26e20 | 74 6f 72 2c 20 24 62 6f 6f 6c 65 61 6e 4e 6f 72 6d 61 6c 69 7a 65 72 5d 2c 0a 27 6f 70 74 69 6d | tor,.$booleanNormalizer],.'optim |
26e40 | 69 7a 65 2d 61 75 74 6f 6c 6f 61 64 65 72 27 20 3d 3e 20 5b 24 62 6f 6f 6c 65 61 6e 56 61 6c 69 | ize-autoloader'.=>.[$booleanVali |
26e60 | 64 61 74 6f 72 2c 20 24 62 6f 6f 6c 65 61 6e 4e 6f 72 6d 61 6c 69 7a 65 72 5d 2c 0a 27 63 6c 61 | dator,.$booleanNormalizer],.'cla |
26e80 | 73 73 6d 61 70 2d 61 75 74 68 6f 72 69 74 61 74 69 76 65 27 20 3d 3e 20 5b 24 62 6f 6f 6c 65 61 | ssmap-authoritative'.=>.[$boolea |
26ea0 | 6e 56 61 6c 69 64 61 74 6f 72 2c 20 24 62 6f 6f 6c 65 61 6e 4e 6f 72 6d 61 6c 69 7a 65 72 5d 2c | nValidator,.$booleanNormalizer], |
26ec0 | 0a 27 61 70 63 75 2d 61 75 74 6f 6c 6f 61 64 65 72 27 20 3d 3e 20 5b 24 62 6f 6f 6c 65 61 6e 56 | .'apcu-autoloader'.=>.[$booleanV |
26ee0 | 61 6c 69 64 61 74 6f 72 2c 20 24 62 6f 6f 6c 65 61 6e 4e 6f 72 6d 61 6c 69 7a 65 72 5d 2c 0a 27 | alidator,.$booleanNormalizer],.' |
26f00 | 70 72 65 70 65 6e 64 2d 61 75 74 6f 6c 6f 61 64 65 72 27 20 3d 3e 20 5b 24 62 6f 6f 6c 65 61 6e | prepend-autoloader'.=>.[$boolean |
26f20 | 56 61 6c 69 64 61 74 6f 72 2c 20 24 62 6f 6f 6c 65 61 6e 4e 6f 72 6d 61 6c 69 7a 65 72 5d 2c 0a | Validator,.$booleanNormalizer],. |
26f40 | 27 64 69 73 61 62 6c 65 2d 74 6c 73 27 20 3d 3e 20 5b 24 62 6f 6f 6c 65 61 6e 56 61 6c 69 64 61 | 'disable-tls'.=>.[$booleanValida |
26f60 | 74 6f 72 2c 20 24 62 6f 6f 6c 65 61 6e 4e 6f 72 6d 61 6c 69 7a 65 72 5d 2c 0a 27 73 65 63 75 72 | tor,.$booleanNormalizer],.'secur |
26f80 | 65 2d 68 74 74 70 27 20 3d 3e 20 5b 24 62 6f 6f 6c 65 61 6e 56 61 6c 69 64 61 74 6f 72 2c 20 24 | e-http'.=>.[$booleanValidator,.$ |
26fa0 | 62 6f 6f 6c 65 61 6e 4e 6f 72 6d 61 6c 69 7a 65 72 5d 2c 0a 27 63 61 66 69 6c 65 27 20 3d 3e 20 | booleanNormalizer],.'cafile'.=>. |
26fc0 | 5b 0a 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 76 61 6c 29 3a 20 62 6f 6f 6c 20 7b | [.static.function.($val):.bool.{ |
26fe0 | 0a 72 65 74 75 72 6e 20 66 69 6c 65 5f 65 78 69 73 74 73 28 24 76 61 6c 29 20 26 26 20 46 69 6c | .return.file_exists($val).&&.Fil |
27000 | 65 73 79 73 74 65 6d 3a 3a 69 73 52 65 61 64 61 62 6c 65 28 24 76 61 6c 29 3b 0a 7d 2c 0a 73 74 | esystem::isReadable($val);.},.st |
27020 | 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 76 61 6c 29 20 7b 0a 72 65 74 75 72 6e 20 24 76 | atic.function.($val).{.return.$v |
27040 | 61 6c 20 3d 3d 3d 20 27 6e 75 6c 6c 27 20 3f 20 6e 75 6c 6c 20 3a 20 24 76 61 6c 3b 0a 7d 2c 0a | al.===.'null'.?.null.:.$val;.},. |
27060 | 5d 2c 0a 27 63 61 70 61 74 68 27 20 3d 3e 20 5b 0a 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e | ],.'capath'.=>.[.static.function |
27080 | 20 28 24 76 61 6c 29 3a 20 62 6f 6f 6c 20 7b 0a 72 65 74 75 72 6e 20 69 73 5f 64 69 72 28 24 76 | .($val):.bool.{.return.is_dir($v |
270a0 | 61 6c 29 20 26 26 20 46 69 6c 65 73 79 73 74 65 6d 3a 3a 69 73 52 65 61 64 61 62 6c 65 28 24 76 | al).&&.Filesystem::isReadable($v |
270c0 | 61 6c 29 3b 0a 7d 2c 0a 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 76 61 6c 29 20 7b | al);.},.static.function.($val).{ |
270e0 | 0a 72 65 74 75 72 6e 20 24 76 61 6c 20 3d 3d 3d 20 27 6e 75 6c 6c 27 20 3f 20 6e 75 6c 6c 20 3a | .return.$val.===.'null'.?.null.: |
27100 | 20 24 76 61 6c 3b 0a 7d 2c 0a 5d 2c 0a 27 67 69 74 68 75 62 2d 65 78 70 6f 73 65 2d 68 6f 73 74 | .$val;.},.],.'github-expose-host |
27120 | 6e 61 6d 65 27 20 3d 3e 20 5b 24 62 6f 6f 6c 65 61 6e 56 61 6c 69 64 61 74 6f 72 2c 20 24 62 6f | name'.=>.[$booleanValidator,.$bo |
27140 | 6f 6c 65 61 6e 4e 6f 72 6d 61 6c 69 7a 65 72 5d 2c 0a 27 68 74 61 63 63 65 73 73 2d 70 72 6f 74 | oleanNormalizer],.'htaccess-prot |
27160 | 65 63 74 27 20 3d 3e 20 5b 24 62 6f 6f 6c 65 61 6e 56 61 6c 69 64 61 74 6f 72 2c 20 24 62 6f 6f | ect'.=>.[$booleanValidator,.$boo |
27180 | 6c 65 61 6e 4e 6f 72 6d 61 6c 69 7a 65 72 5d 2c 0a 27 6c 6f 63 6b 27 20 3d 3e 20 5b 24 62 6f 6f | leanNormalizer],.'lock'.=>.[$boo |
271a0 | 6c 65 61 6e 56 61 6c 69 64 61 74 6f 72 2c 20 24 62 6f 6f 6c 65 61 6e 4e 6f 72 6d 61 6c 69 7a 65 | leanValidator,.$booleanNormalize |
271c0 | 72 5d 2c 0a 27 61 6c 6c 6f 77 2d 70 6c 75 67 69 6e 73 27 20 3d 3e 20 5b 24 62 6f 6f 6c 65 61 6e | r],.'allow-plugins'.=>.[$boolean |
271e0 | 56 61 6c 69 64 61 74 6f 72 2c 20 24 62 6f 6f 6c 65 61 6e 4e 6f 72 6d 61 6c 69 7a 65 72 5d 2c 0a | Validator,.$booleanNormalizer],. |
27200 | 27 70 6c 61 74 66 6f 72 6d 2d 63 68 65 63 6b 27 20 3d 3e 20 5b 0a 73 74 61 74 69 63 20 66 75 6e | 'platform-check'.=>.[.static.fun |
27220 | 63 74 69 6f 6e 20 28 24 76 61 6c 29 3a 20 62 6f 6f 6c 20 7b 0a 72 65 74 75 72 6e 20 69 6e 5f 61 | ction.($val):.bool.{.return.in_a |
27240 | 72 72 61 79 28 24 76 61 6c 2c 20 5b 27 70 68 70 2d 6f 6e 6c 79 27 2c 20 27 74 72 75 65 27 2c 20 | rray($val,.['php-only',.'true',. |
27260 | 27 66 61 6c 73 65 27 2c 20 27 31 27 2c 20 27 30 27 5d 2c 20 74 72 75 65 29 3b 0a 7d 2c 0a 73 74 | 'false',.'1',.'0'],.true);.},.st |
27280 | 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 76 61 6c 29 20 7b 0a 69 66 20 28 27 70 68 70 2d | atic.function.($val).{.if.('php- |
272a0 | 6f 6e 6c 79 27 20 3d 3d 3d 20 24 76 61 6c 29 20 7b 0a 72 65 74 75 72 6e 20 27 70 68 70 2d 6f 6e | only'.===.$val).{.return.'php-on |
272c0 | 6c 79 27 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 76 61 6c 20 21 3d 3d 20 27 66 61 6c 73 65 27 20 | ly';.}..return.$val.!==.'false'. |
272e0 | 26 26 20 28 62 6f 6f 6c 29 20 24 76 61 6c 3b 0a 7d 2c 0a 5d 2c 0a 27 75 73 65 2d 70 61 72 65 6e | &&.(bool).$val;.},.],.'use-paren |
27300 | 74 2d 64 69 72 27 20 3d 3e 20 5b 0a 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 76 61 | t-dir'.=>.[.static.function.($va |
27320 | 6c 29 3a 20 62 6f 6f 6c 20 7b 0a 72 65 74 75 72 6e 20 69 6e 5f 61 72 72 61 79 28 24 76 61 6c 2c | l):.bool.{.return.in_array($val, |
27340 | 20 5b 27 74 72 75 65 27 2c 20 27 66 61 6c 73 65 27 2c 20 27 70 72 6f 6d 70 74 27 5d 2c 20 74 72 | .['true',.'false',.'prompt'],.tr |
27360 | 75 65 29 3b 0a 7d 2c 0a 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 76 61 6c 29 20 7b | ue);.},.static.function.($val).{ |
27380 | 0a 69 66 20 28 27 70 72 6f 6d 70 74 27 20 3d 3d 3d 20 24 76 61 6c 29 20 7b 0a 72 65 74 75 72 6e | .if.('prompt'.===.$val).{.return |
273a0 | 20 27 70 72 6f 6d 70 74 27 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 76 61 6c 20 21 3d 3d 20 27 66 | .'prompt';.}..return.$val.!==.'f |
273c0 | 61 6c 73 65 27 20 26 26 20 28 62 6f 6f 6c 29 20 24 76 61 6c 3b 0a 7d 2c 0a 5d 2c 0a 5d 3b 0a 24 | alse'.&&.(bool).$val;.},.],.];.$ |
273e0 | 6d 75 6c 74 69 43 6f 6e 66 69 67 56 61 6c 75 65 73 20 3d 20 5b 0a 27 67 69 74 68 75 62 2d 70 72 | multiConfigValues.=.[.'github-pr |
27400 | 6f 74 6f 63 6f 6c 73 27 20 3d 3e 20 5b 0a 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 | otocols'.=>.[.static.function.($ |
27420 | 76 61 6c 73 29 20 7b 0a 69 66 20 28 21 69 73 5f 61 72 72 61 79 28 24 76 61 6c 73 29 29 20 7b 0a | vals).{.if.(!is_array($vals)).{. |
27440 | 72 65 74 75 72 6e 20 27 61 72 72 61 79 20 65 78 70 65 63 74 65 64 27 3b 0a 7d 0a 0a 66 6f 72 65 | return.'array.expected';.}..fore |
27460 | 61 63 68 20 28 24 76 61 6c 73 20 61 73 20 24 76 61 6c 29 20 7b 0a 69 66 20 28 21 69 6e 5f 61 72 | ach.($vals.as.$val).{.if.(!in_ar |
27480 | 72 61 79 28 24 76 61 6c 2c 20 5b 27 67 69 74 27 2c 20 27 68 74 74 70 73 27 2c 20 27 73 73 68 27 | ray($val,.['git',.'https',.'ssh' |
274a0 | 5d 29 29 20 7b 0a 72 65 74 75 72 6e 20 27 76 61 6c 69 64 20 70 72 6f 74 6f 63 6f 6c 73 20 69 6e | ])).{.return.'valid.protocols.in |
274c0 | 63 6c 75 64 65 3a 20 67 69 74 2c 20 68 74 74 70 73 2c 20 73 73 68 27 3b 0a 7d 0a 7d 0a 0a 72 65 | clude:.git,.https,.ssh';.}.}..re |
274e0 | 74 75 72 6e 20 74 72 75 65 3b 0a 7d 2c 0a 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 | turn.true;.},.static.function.($ |
27500 | 76 61 6c 73 29 20 7b 0a 72 65 74 75 72 6e 20 24 76 61 6c 73 3b 0a 7d 2c 0a 5d 2c 0a 27 67 69 74 | vals).{.return.$vals;.},.],.'git |
27520 | 68 75 62 2d 64 6f 6d 61 69 6e 73 27 20 3d 3e 20 5b 0a 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f | hub-domains'.=>.[.static.functio |
27540 | 6e 20 28 24 76 61 6c 73 29 20 7b 0a 69 66 20 28 21 69 73 5f 61 72 72 61 79 28 24 76 61 6c 73 29 | n.($vals).{.if.(!is_array($vals) |
27560 | 29 20 7b 0a 72 65 74 75 72 6e 20 27 61 72 72 61 79 20 65 78 70 65 63 74 65 64 27 3b 0a 7d 0a 0a | ).{.return.'array.expected';.}.. |
27580 | 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 2c 0a 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 | return.true;.},.static.function. |
275a0 | 28 24 76 61 6c 73 29 20 7b 0a 72 65 74 75 72 6e 20 24 76 61 6c 73 3b 0a 7d 2c 0a 5d 2c 0a 27 67 | ($vals).{.return.$vals;.},.],.'g |
275c0 | 69 74 6c 61 62 2d 64 6f 6d 61 69 6e 73 27 20 3d 3e 20 5b 0a 73 74 61 74 69 63 20 66 75 6e 63 74 | itlab-domains'.=>.[.static.funct |
275e0 | 69 6f 6e 20 28 24 76 61 6c 73 29 20 7b 0a 69 66 20 28 21 69 73 5f 61 72 72 61 79 28 24 76 61 6c | ion.($vals).{.if.(!is_array($val |
27600 | 73 29 29 20 7b 0a 72 65 74 75 72 6e 20 27 61 72 72 61 79 20 65 78 70 65 63 74 65 64 27 3b 0a 7d | s)).{.return.'array.expected';.} |
27620 | 0a 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 2c 0a 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f | ..return.true;.},.static.functio |
27640 | 6e 20 28 24 76 61 6c 73 29 20 7b 0a 72 65 74 75 72 6e 20 24 76 61 6c 73 3b 0a 7d 2c 0a 5d 2c 0a | n.($vals).{.return.$vals;.},.],. |
27660 | 5d 3b 0a 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 75 6e 73 65 74 | ];..if.($input->getOption('unset |
27680 | 27 29 20 26 26 20 28 69 73 73 65 74 28 24 75 6e 69 71 75 65 43 6f 6e 66 69 67 56 61 6c 75 65 73 | ').&&.(isset($uniqueConfigValues |
276a0 | 5b 24 73 65 74 74 69 6e 67 4b 65 79 5d 29 20 7c 7c 20 69 73 73 65 74 28 24 6d 75 6c 74 69 43 6f | [$settingKey]).||.isset($multiCo |
276c0 | 6e 66 69 67 56 61 6c 75 65 73 5b 24 73 65 74 74 69 6e 67 4b 65 79 5d 29 29 29 20 7b 0a 69 66 20 | nfigValues[$settingKey]))).{.if. |
276e0 | 28 24 73 65 74 74 69 6e 67 4b 65 79 20 3d 3d 3d 20 27 64 69 73 61 62 6c 65 2d 74 6c 73 27 20 26 | ($settingKey.===.'disable-tls'.& |
27700 | 26 20 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 64 69 73 61 62 6c 65 2d 74 6c | &.$this->config->get('disable-tl |
27720 | 73 27 29 29 20 7b 0a 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 2d 3e 77 72 69 74 65 45 72 72 6f | s')).{.$this->getIO()->writeErro |
27740 | 72 28 27 3c 69 6e 66 6f 3e 59 6f 75 20 61 72 65 20 6e 6f 77 20 72 75 6e 6e 69 6e 67 20 43 6f 6d | r('<info>You.are.now.running.Com |
27760 | 70 6f 73 65 72 20 77 69 74 68 20 53 53 4c 2f 54 4c 53 20 70 72 6f 74 65 63 74 69 6f 6e 20 65 6e | poser.with.SSL/TLS.protection.en |
27780 | 61 62 6c 65 64 2e 3c 2f 69 6e 66 6f 3e 27 29 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 63 6f 6e 66 69 | abled.</info>');.}..$this->confi |
277a0 | 67 53 6f 75 72 63 65 2d 3e 72 65 6d 6f 76 65 43 6f 6e 66 69 67 53 65 74 74 69 6e 67 28 24 73 65 | gSource->removeConfigSetting($se |
277c0 | 74 74 69 6e 67 4b 65 79 29 3b 0a 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 69 66 20 28 69 73 73 65 | ttingKey);..return.0;.}.if.(isse |
277e0 | 74 28 24 75 6e 69 71 75 65 43 6f 6e 66 69 67 56 61 6c 75 65 73 5b 24 73 65 74 74 69 6e 67 4b 65 | t($uniqueConfigValues[$settingKe |
27800 | 79 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 68 61 6e 64 6c 65 53 69 6e 67 6c 65 56 61 6c 75 65 28 | y])).{.$this->handleSingleValue( |
27820 | 24 73 65 74 74 69 6e 67 4b 65 79 2c 20 24 75 6e 69 71 75 65 43 6f 6e 66 69 67 56 61 6c 75 65 73 | $settingKey,.$uniqueConfigValues |
27840 | 5b 24 73 65 74 74 69 6e 67 4b 65 79 5d 2c 20 24 76 61 6c 75 65 73 2c 20 27 61 64 64 43 6f 6e 66 | [$settingKey],.$values,.'addConf |
27860 | 69 67 53 65 74 74 69 6e 67 27 29 3b 0a 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 69 66 20 28 69 73 | igSetting');..return.0;.}.if.(is |
27880 | 73 65 74 28 24 6d 75 6c 74 69 43 6f 6e 66 69 67 56 61 6c 75 65 73 5b 24 73 65 74 74 69 6e 67 4b | set($multiConfigValues[$settingK |
278a0 | 65 79 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 68 61 6e 64 6c 65 4d 75 6c 74 69 56 61 6c 75 65 28 | ey])).{.$this->handleMultiValue( |
278c0 | 24 73 65 74 74 69 6e 67 4b 65 79 2c 20 24 6d 75 6c 74 69 43 6f 6e 66 69 67 56 61 6c 75 65 73 5b | $settingKey,.$multiConfigValues[ |
278e0 | 24 73 65 74 74 69 6e 67 4b 65 79 5d 2c 20 24 76 61 6c 75 65 73 2c 20 27 61 64 64 43 6f 6e 66 69 | $settingKey],.$values,.'addConfi |
27900 | 67 53 65 74 74 69 6e 67 27 29 3b 0a 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 0a 69 66 20 28 50 72 | gSetting');..return.0;.}..if.(Pr |
27920 | 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 2f 5e 70 72 65 66 65 72 72 65 64 2d 69 6e 73 74 61 6c 6c | eg::isMatch('/^preferred-install |
27940 | 5c 2e 28 2e 2b 29 2f 27 2c 20 24 73 65 74 74 69 6e 67 4b 65 79 2c 20 24 6d 61 74 63 68 65 73 29 | \.(.+)/',.$settingKey,.$matches) |
27960 | 29 20 7b 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 75 6e 73 65 74 | ).{.if.($input->getOption('unset |
27980 | 27 29 29 20 7b 0a 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 53 6f 75 72 63 65 2d 3e 72 65 6d 6f 76 | ')).{.$this->configSource->remov |
279a0 | 65 43 6f 6e 66 69 67 53 65 74 74 69 6e 67 28 24 73 65 74 74 69 6e 67 4b 65 79 29 3b 0a 0a 72 65 | eConfigSetting($settingKey);..re |
279c0 | 74 75 72 6e 20 30 3b 0a 7d 0a 0a 5b 24 76 61 6c 69 64 61 74 6f 72 5d 20 3d 20 24 75 6e 69 71 75 | turn.0;.}..[$validator].=.$uniqu |
279e0 | 65 43 6f 6e 66 69 67 56 61 6c 75 65 73 5b 27 70 72 65 66 65 72 72 65 64 2d 69 6e 73 74 61 6c 6c | eConfigValues['preferred-install |
27a00 | 27 5d 3b 0a 69 66 20 28 21 24 76 61 6c 69 64 61 74 6f 72 28 24 76 61 6c 75 65 73 5b 30 5d 29 29 | '];.if.(!$validator($values[0])) |
27a20 | 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 | .{.throw.new.\RuntimeException(' |
27a40 | 49 6e 76 61 6c 69 64 20 76 61 6c 75 65 20 66 6f 72 20 27 2e 24 73 65 74 74 69 6e 67 4b 65 79 2e | Invalid.value.for.'.$settingKey. |
27a60 | 27 2e 20 53 68 6f 75 6c 64 20 62 65 20 6f 6e 65 20 6f 66 3a 20 61 75 74 6f 2c 20 73 6f 75 72 63 | '..Should.be.one.of:.auto,.sourc |
27a80 | 65 2c 20 6f 72 20 64 69 73 74 27 29 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 53 6f | e,.or.dist');.}..$this->configSo |
27aa0 | 75 72 63 65 2d 3e 61 64 64 43 6f 6e 66 69 67 53 65 74 74 69 6e 67 28 24 73 65 74 74 69 6e 67 4b | urce->addConfigSetting($settingK |
27ac0 | 65 79 2c 20 24 76 61 6c 75 65 73 5b 30 5d 29 3b 0a 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 0a 0a | ey,.$values[0]);..return.0;.}... |
27ae0 | 69 66 20 28 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b 5e 61 6c 6c 6f 77 2d 70 6c 75 67 69 | if.(Preg::isMatch('{^allow-plugi |
27b00 | 6e 73 5c 2e 28 5b 61 2d 7a 41 2d 5a 30 2d 39 2f 2a 2d 5d 2b 29 7d 27 2c 20 24 73 65 74 74 69 6e | ns\.([a-zA-Z0-9/*-]+)}',.$settin |
27b20 | 67 4b 65 79 2c 20 24 6d 61 74 63 68 65 73 29 29 20 7b 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 | gKey,.$matches)).{.if.($input->g |
27b40 | 65 74 4f 70 74 69 6f 6e 28 27 75 6e 73 65 74 27 29 29 20 7b 0a 24 74 68 69 73 2d 3e 63 6f 6e 66 | etOption('unset')).{.$this->conf |
27b60 | 69 67 53 6f 75 72 63 65 2d 3e 72 65 6d 6f 76 65 43 6f 6e 66 69 67 53 65 74 74 69 6e 67 28 24 73 | igSource->removeConfigSetting($s |
27b80 | 65 74 74 69 6e 67 4b 65 79 29 3b 0a 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 0a 69 66 20 28 74 72 | ettingKey);..return.0;.}..if.(tr |
27ba0 | 75 65 20 21 3d 3d 20 24 62 6f 6f 6c 65 61 6e 56 61 6c 69 64 61 74 6f 72 28 24 76 61 6c 75 65 73 | ue.!==.$booleanValidator($values |
27bc0 | 5b 30 5d 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 | [0])).{.throw.new.\RuntimeExcept |
27be0 | 69 6f 6e 28 73 70 72 69 6e 74 66 28 0a 27 22 25 73 22 20 69 73 20 61 6e 20 69 6e 76 61 6c 69 64 | ion(sprintf(.'"%s".is.an.invalid |
27c00 | 20 76 61 6c 75 65 27 2c 0a 24 76 61 6c 75 65 73 5b 30 5d 0a 29 29 3b 0a 7d 0a 0a 24 6e 6f 72 6d | .value',.$values[0].));.}..$norm |
27c20 | 61 6c 69 7a 65 64 56 61 6c 75 65 20 3d 20 24 62 6f 6f 6c 65 61 6e 4e 6f 72 6d 61 6c 69 7a 65 72 | alizedValue.=.$booleanNormalizer |
27c40 | 28 24 76 61 6c 75 65 73 5b 30 5d 29 3b 0a 0a 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 53 6f 75 72 | ($values[0]);..$this->configSour |
27c60 | 63 65 2d 3e 61 64 64 43 6f 6e 66 69 67 53 65 74 74 69 6e 67 28 24 73 65 74 74 69 6e 67 4b 65 79 | ce->addConfigSetting($settingKey |
27c80 | 2c 20 24 6e 6f 72 6d 61 6c 69 7a 65 64 56 61 6c 75 65 29 3b 0a 0a 72 65 74 75 72 6e 20 30 3b 0a | ,.$normalizedValue);..return.0;. |
27ca0 | 7d 0a 0a 0a 24 75 6e 69 71 75 65 50 72 6f 70 73 20 3d 20 5b 0a 27 6e 61 6d 65 27 20 3d 3e 20 5b | }...$uniqueProps.=.[.'name'.=>.[ |
27cc0 | 27 69 73 5f 73 74 72 69 6e 67 27 2c 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 76 | 'is_string',.static.function.($v |
27ce0 | 61 6c 29 20 7b 0a 72 65 74 75 72 6e 20 24 76 61 6c 3b 0a 7d 5d 2c 0a 27 74 79 70 65 27 20 3d 3e | al).{.return.$val;.}],.'type'.=> |
27d00 | 20 5b 27 69 73 5f 73 74 72 69 6e 67 27 2c 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 | .['is_string',.static.function.( |
27d20 | 24 76 61 6c 29 20 7b 0a 72 65 74 75 72 6e 20 24 76 61 6c 3b 0a 7d 5d 2c 0a 27 64 65 73 63 72 69 | $val).{.return.$val;.}],.'descri |
27d40 | 70 74 69 6f 6e 27 20 3d 3e 20 5b 27 69 73 5f 73 74 72 69 6e 67 27 2c 20 73 74 61 74 69 63 20 66 | ption'.=>.['is_string',.static.f |
27d60 | 75 6e 63 74 69 6f 6e 20 28 24 76 61 6c 29 20 7b 0a 72 65 74 75 72 6e 20 24 76 61 6c 3b 0a 7d 5d | unction.($val).{.return.$val;.}] |
27d80 | 2c 0a 27 68 6f 6d 65 70 61 67 65 27 20 3d 3e 20 5b 27 69 73 5f 73 74 72 69 6e 67 27 2c 20 73 74 | ,.'homepage'.=>.['is_string',.st |
27da0 | 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 76 61 6c 29 20 7b 0a 72 65 74 75 72 6e 20 24 76 | atic.function.($val).{.return.$v |
27dc0 | 61 6c 3b 0a 7d 5d 2c 0a 27 76 65 72 73 69 6f 6e 27 20 3d 3e 20 5b 27 69 73 5f 73 74 72 69 6e 67 | al;.}],.'version'.=>.['is_string |
27de0 | 27 2c 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 76 61 6c 29 20 7b 0a 72 65 74 75 | ',.static.function.($val).{.retu |
27e00 | 72 6e 20 24 76 61 6c 3b 0a 7d 5d 2c 0a 27 6d 69 6e 69 6d 75 6d 2d 73 74 61 62 69 6c 69 74 79 27 | rn.$val;.}],.'minimum-stability' |
27e20 | 20 3d 3e 20 5b 0a 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 76 61 6c 29 3a 20 62 6f | .=>.[.static.function.($val):.bo |
27e40 | 6f 6c 20 7b 0a 72 65 74 75 72 6e 20 69 73 73 65 74 28 42 61 73 65 50 61 63 6b 61 67 65 3a 3a 24 | ol.{.return.isset(BasePackage::$ |
27e60 | 73 74 61 62 69 6c 69 74 69 65 73 5b 56 65 72 73 69 6f 6e 50 61 72 73 65 72 3a 3a 6e 6f 72 6d 61 | stabilities[VersionParser::norma |
27e80 | 6c 69 7a 65 53 74 61 62 69 6c 69 74 79 28 24 76 61 6c 29 5d 29 3b 0a 7d 2c 0a 73 74 61 74 69 63 | lizeStability($val)]);.},.static |
27ea0 | 20 66 75 6e 63 74 69 6f 6e 20 28 24 76 61 6c 29 3a 20 73 74 72 69 6e 67 20 7b 0a 72 65 74 75 72 | .function.($val):.string.{.retur |
27ec0 | 6e 20 56 65 72 73 69 6f 6e 50 61 72 73 65 72 3a 3a 6e 6f 72 6d 61 6c 69 7a 65 53 74 61 62 69 6c | n.VersionParser::normalizeStabil |
27ee0 | 69 74 79 28 24 76 61 6c 29 3b 0a 7d 2c 0a 5d 2c 0a 27 70 72 65 66 65 72 2d 73 74 61 62 6c 65 27 | ity($val);.},.],.'prefer-stable' |
27f00 | 20 3d 3e 20 5b 24 62 6f 6f 6c 65 61 6e 56 61 6c 69 64 61 74 6f 72 2c 20 24 62 6f 6f 6c 65 61 6e | .=>.[$booleanValidator,.$boolean |
27f20 | 4e 6f 72 6d 61 6c 69 7a 65 72 5d 2c 0a 5d 3b 0a 24 6d 75 6c 74 69 50 72 6f 70 73 20 3d 20 5b 0a | Normalizer],.];.$multiProps.=.[. |
27f40 | 27 6b 65 79 77 6f 72 64 73 27 20 3d 3e 20 5b 0a 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 | 'keywords'.=>.[.static.function. |
27f60 | 28 24 76 61 6c 73 29 20 7b 0a 69 66 20 28 21 69 73 5f 61 72 72 61 79 28 24 76 61 6c 73 29 29 20 | ($vals).{.if.(!is_array($vals)). |
27f80 | 7b 0a 72 65 74 75 72 6e 20 27 61 72 72 61 79 20 65 78 70 65 63 74 65 64 27 3b 0a 7d 0a 0a 72 65 | {.return.'array.expected';.}..re |
27fa0 | 74 75 72 6e 20 74 72 75 65 3b 0a 7d 2c 0a 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 | turn.true;.},.static.function.($ |
27fc0 | 76 61 6c 73 29 20 7b 0a 72 65 74 75 72 6e 20 24 76 61 6c 73 3b 0a 7d 2c 0a 5d 2c 0a 27 6c 69 63 | vals).{.return.$vals;.},.],.'lic |
27fe0 | 65 6e 73 65 27 20 3d 3e 20 5b 0a 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 76 61 6c | ense'.=>.[.static.function.($val |
28000 | 73 29 20 7b 0a 69 66 20 28 21 69 73 5f 61 72 72 61 79 28 24 76 61 6c 73 29 29 20 7b 0a 72 65 74 | s).{.if.(!is_array($vals)).{.ret |
28020 | 75 72 6e 20 27 61 72 72 61 79 20 65 78 70 65 63 74 65 64 27 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 | urn.'array.expected';.}..return. |
28040 | 74 72 75 65 3b 0a 7d 2c 0a 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 76 61 6c 73 29 | true;.},.static.function.($vals) |
28060 | 20 7b 0a 72 65 74 75 72 6e 20 24 76 61 6c 73 3b 0a 7d 2c 0a 5d 2c 0a 5d 3b 0a 0a 69 66 20 28 24 | .{.return.$vals;.},.],.];..if.($ |
28080 | 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 67 6c 6f 62 61 6c 27 29 20 26 26 20 28 69 | input->getOption('global').&&.(i |
280a0 | 73 73 65 74 28 24 75 6e 69 71 75 65 50 72 6f 70 73 5b 24 73 65 74 74 69 6e 67 4b 65 79 5d 29 20 | sset($uniqueProps[$settingKey]). |
280c0 | 7c 7c 20 69 73 73 65 74 28 24 6d 75 6c 74 69 50 72 6f 70 73 5b 24 73 65 74 74 69 6e 67 4b 65 79 | ||.isset($multiProps[$settingKey |
280e0 | 5d 29 20 7c 7c 20 73 74 72 70 6f 73 28 24 73 65 74 74 69 6e 67 4b 65 79 2c 20 27 65 78 74 72 61 | ]).||.strpos($settingKey,.'extra |
28100 | 2e 27 29 20 3d 3d 3d 20 30 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 64 | .').===.0)).{.throw.new.\Invalid |
28120 | 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 27 54 68 65 20 27 20 2e 20 24 73 65 74 74 | ArgumentException('The.'...$sett |
28140 | 69 6e 67 4b 65 79 20 2e 20 27 20 70 72 6f 70 65 72 74 79 20 63 61 6e 20 6e 6f 74 20 62 65 20 73 | ingKey...'.property.can.not.be.s |
28160 | 65 74 20 69 6e 20 74 68 65 20 67 6c 6f 62 61 6c 20 63 6f 6e 66 69 67 2e 6a 73 6f 6e 20 66 69 6c | et.in.the.global.config.json.fil |
28180 | 65 2e 20 55 73 65 20 60 63 6f 6d 70 6f 73 65 72 20 67 6c 6f 62 61 6c 20 63 6f 6e 66 69 67 60 20 | e..Use.`composer.global.config`. |
281a0 | 74 6f 20 61 70 70 6c 79 20 63 68 61 6e 67 65 73 20 74 6f 20 74 68 65 20 67 6c 6f 62 61 6c 20 63 | to.apply.changes.to.the.global.c |
281c0 | 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 27 29 3b 0a 7d 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 | omposer.json');.}.if.($input->ge |
281e0 | 74 4f 70 74 69 6f 6e 28 27 75 6e 73 65 74 27 29 20 26 26 20 28 69 73 73 65 74 28 24 75 6e 69 71 | tOption('unset').&&.(isset($uniq |
28200 | 75 65 50 72 6f 70 73 5b 24 73 65 74 74 69 6e 67 4b 65 79 5d 29 20 7c 7c 20 69 73 73 65 74 28 24 | ueProps[$settingKey]).||.isset($ |
28220 | 6d 75 6c 74 69 50 72 6f 70 73 5b 24 73 65 74 74 69 6e 67 4b 65 79 5d 29 29 29 20 7b 0a 24 74 68 | multiProps[$settingKey]))).{.$th |
28240 | 69 73 2d 3e 63 6f 6e 66 69 67 53 6f 75 72 63 65 2d 3e 72 65 6d 6f 76 65 50 72 6f 70 65 72 74 79 | is->configSource->removeProperty |
28260 | 28 24 73 65 74 74 69 6e 67 4b 65 79 29 3b 0a 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 69 66 20 28 | ($settingKey);..return.0;.}.if.( |
28280 | 69 73 73 65 74 28 24 75 6e 69 71 75 65 50 72 6f 70 73 5b 24 73 65 74 74 69 6e 67 4b 65 79 5d 29 | isset($uniqueProps[$settingKey]) |
282a0 | 29 20 7b 0a 24 74 68 69 73 2d 3e 68 61 6e 64 6c 65 53 69 6e 67 6c 65 56 61 6c 75 65 28 24 73 65 | ).{.$this->handleSingleValue($se |
282c0 | 74 74 69 6e 67 4b 65 79 2c 20 24 75 6e 69 71 75 65 50 72 6f 70 73 5b 24 73 65 74 74 69 6e 67 4b | ttingKey,.$uniqueProps[$settingK |
282e0 | 65 79 5d 2c 20 24 76 61 6c 75 65 73 2c 20 27 61 64 64 50 72 6f 70 65 72 74 79 27 29 3b 0a 0a 72 | ey],.$values,.'addProperty');..r |
28300 | 65 74 75 72 6e 20 30 3b 0a 7d 0a 69 66 20 28 69 73 73 65 74 28 24 6d 75 6c 74 69 50 72 6f 70 73 | eturn.0;.}.if.(isset($multiProps |
28320 | 5b 24 73 65 74 74 69 6e 67 4b 65 79 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 68 61 6e 64 6c 65 4d | [$settingKey])).{.$this->handleM |
28340 | 75 6c 74 69 56 61 6c 75 65 28 24 73 65 74 74 69 6e 67 4b 65 79 2c 20 24 6d 75 6c 74 69 50 72 6f | ultiValue($settingKey,.$multiPro |
28360 | 70 73 5b 24 73 65 74 74 69 6e 67 4b 65 79 5d 2c 20 24 76 61 6c 75 65 73 2c 20 27 61 64 64 50 72 | ps[$settingKey],.$values,.'addPr |
28380 | 6f 70 65 72 74 79 27 29 3b 0a 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 0a 0a 69 66 20 28 50 72 65 | operty');..return.0;.}...if.(Pre |
283a0 | 67 3a 3a 69 73 4d 61 74 63 68 28 27 2f 5e 72 65 70 6f 73 3f 28 3f 3a 69 74 6f 72 69 65 73 29 3f | g::isMatch('/^repos?(?:itories)? |
283c0 | 5c 2e 28 2e 2b 29 2f 27 2c 20 24 73 65 74 74 69 6e 67 4b 65 79 2c 20 24 6d 61 74 63 68 65 73 29 | \.(.+)/',.$settingKey,.$matches) |
283e0 | 29 20 7b 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 75 6e 73 65 74 | ).{.if.($input->getOption('unset |
28400 | 27 29 29 20 7b 0a 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 53 6f 75 72 63 65 2d 3e 72 65 6d 6f 76 | ')).{.$this->configSource->remov |
28420 | 65 52 65 70 6f 73 69 74 6f 72 79 28 24 6d 61 74 63 68 65 73 5b 31 5d 29 3b 0a 0a 72 65 74 75 72 | eRepository($matches[1]);..retur |
28440 | 6e 20 30 3b 0a 7d 0a 0a 69 66 20 28 32 20 3d 3d 3d 20 63 6f 75 6e 74 28 24 76 61 6c 75 65 73 29 | n.0;.}..if.(2.===.count($values) |
28460 | 29 20 7b 0a 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 53 6f 75 72 63 65 2d 3e 61 64 64 52 65 70 6f | ).{.$this->configSource->addRepo |
28480 | 73 69 74 6f 72 79 28 24 6d 61 74 63 68 65 73 5b 31 5d 2c 20 5b 0a 27 74 79 70 65 27 20 3d 3e 20 | sitory($matches[1],.[.'type'.=>. |
284a0 | 24 76 61 6c 75 65 73 5b 30 5d 2c 0a 27 75 72 6c 27 20 3d 3e 20 24 76 61 6c 75 65 73 5b 31 5d 2c | $values[0],.'url'.=>.$values[1], |
284c0 | 0a 5d 2c 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 61 70 70 65 6e 64 27 29 29 | .],.$input->getOption('append')) |
284e0 | 3b 0a 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 0a 69 66 20 28 31 20 3d 3d 3d 20 63 6f 75 6e 74 28 | ;..return.0;.}..if.(1.===.count( |
28500 | 24 76 61 6c 75 65 73 29 29 20 7b 0a 24 76 61 6c 75 65 20 3d 20 73 74 72 74 6f 6c 6f 77 65 72 28 | $values)).{.$value.=.strtolower( |
28520 | 24 76 61 6c 75 65 73 5b 30 5d 29 3b 0a 69 66 20 28 74 72 75 65 20 3d 3d 3d 20 24 62 6f 6f 6c 65 | $values[0]);.if.(true.===.$boole |
28540 | 61 6e 56 61 6c 69 64 61 74 6f 72 28 24 76 61 6c 75 65 29 29 20 7b 0a 69 66 20 28 66 61 6c 73 65 | anValidator($value)).{.if.(false |
28560 | 20 3d 3d 3d 20 24 62 6f 6f 6c 65 61 6e 4e 6f 72 6d 61 6c 69 7a 65 72 28 24 76 61 6c 75 65 29 29 | .===.$booleanNormalizer($value)) |
28580 | 20 7b 0a 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 53 6f 75 72 63 65 2d 3e 61 64 64 52 65 70 6f 73 | .{.$this->configSource->addRepos |
285a0 | 69 74 6f 72 79 28 24 6d 61 74 63 68 65 73 5b 31 5d 2c 20 66 61 6c 73 65 2c 20 24 69 6e 70 75 74 | itory($matches[1],.false,.$input |
285c0 | 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 61 70 70 65 6e 64 27 29 29 3b 0a 0a 72 65 74 75 72 6e 20 | ->getOption('append'));..return. |
285e0 | 30 3b 0a 7d 0a 7d 20 65 6c 73 65 20 7b 0a 24 76 61 6c 75 65 20 3d 20 4a 73 6f 6e 46 69 6c 65 3a | 0;.}.}.else.{.$value.=.JsonFile: |
28600 | 3a 70 61 72 73 65 4a 73 6f 6e 28 24 76 61 6c 75 65 73 5b 30 5d 29 3b 0a 24 74 68 69 73 2d 3e 63 | :parseJson($values[0]);.$this->c |
28620 | 6f 6e 66 69 67 53 6f 75 72 63 65 2d 3e 61 64 64 52 65 70 6f 73 69 74 6f 72 79 28 24 6d 61 74 63 | onfigSource->addRepository($matc |
28640 | 68 65 73 5b 31 5d 2c 20 24 76 61 6c 75 65 2c 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f | hes[1],.$value,.$input->getOptio |
28660 | 6e 28 27 61 70 70 65 6e 64 27 29 29 3b 0a 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 7d 0a 0a 74 68 | n('append'));..return.0;.}.}..th |
28680 | 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 59 6f 75 20 6d | row.new.\RuntimeException('You.m |
286a0 | 75 73 74 20 70 61 73 73 20 74 68 65 20 74 79 70 65 20 61 6e 64 20 61 20 75 72 6c 2e 20 45 78 61 | ust.pass.the.type.and.a.url..Exa |
286c0 | 6d 70 6c 65 3a 20 70 68 70 20 63 6f 6d 70 6f 73 65 72 2e 70 68 61 72 20 63 6f 6e 66 69 67 20 72 | mple:.php.composer.phar.config.r |
286e0 | 65 70 6f 73 69 74 6f 72 69 65 73 2e 66 6f 6f 20 76 63 73 20 68 74 74 70 73 3a 2f 2f 62 61 72 2e | epositories.foo.vcs.https://bar. |
28700 | 63 6f 6d 27 29 3b 0a 7d 0a 0a 0a 69 66 20 28 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 2f 5e | com');.}...if.(Preg::isMatch('/^ |
28720 | 65 78 74 72 61 5c 2e 28 2e 2b 29 2f 27 2c 20 24 73 65 74 74 69 6e 67 4b 65 79 2c 20 24 6d 61 74 | extra\.(.+)/',.$settingKey,.$mat |
28740 | 63 68 65 73 29 29 20 7b 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 | ches)).{.if.($input->getOption(' |
28760 | 75 6e 73 65 74 27 29 29 20 7b 0a 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 53 6f 75 72 63 65 2d 3e | unset')).{.$this->configSource-> |
28780 | 72 65 6d 6f 76 65 50 72 6f 70 65 72 74 79 28 24 73 65 74 74 69 6e 67 4b 65 79 29 3b 0a 0a 72 65 | removeProperty($settingKey);..re |
287a0 | 74 75 72 6e 20 30 3b 0a 7d 0a 0a 24 76 61 6c 75 65 20 3d 20 24 76 61 6c 75 65 73 5b 30 5d 3b 0a | turn.0;.}..$value.=.$values[0];. |
287c0 | 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6a 73 6f 6e 27 29 29 20 7b | if.($input->getOption('json')).{ |
287e0 | 0a 24 76 61 6c 75 65 20 3d 20 4a 73 6f 6e 46 69 6c 65 3a 3a 70 61 72 73 65 4a 73 6f 6e 28 24 76 | .$value.=.JsonFile::parseJson($v |
28800 | 61 6c 75 65 29 3b 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6d 65 | alue);.if.($input->getOption('me |
28820 | 72 67 65 27 29 29 20 7b 0a 24 63 75 72 72 65 6e 74 56 61 6c 75 65 20 3d 20 24 74 68 69 73 2d 3e | rge')).{.$currentValue.=.$this-> |
28840 | 63 6f 6e 66 69 67 46 69 6c 65 2d 3e 72 65 61 64 28 29 3b 0a 24 62 69 74 73 20 3d 20 65 78 70 6c | configFile->read();.$bits.=.expl |
28860 | 6f 64 65 28 27 2e 27 2c 20 24 73 65 74 74 69 6e 67 4b 65 79 29 3b 0a 66 6f 72 65 61 63 68 20 28 | ode('.',.$settingKey);.foreach.( |
28880 | 24 62 69 74 73 20 61 73 20 24 62 69 74 29 20 7b 0a 24 63 75 72 72 65 6e 74 56 61 6c 75 65 20 3d | $bits.as.$bit).{.$currentValue.= |
288a0 | 20 24 63 75 72 72 65 6e 74 56 61 6c 75 65 5b 24 62 69 74 5d 20 3f 3f 20 6e 75 6c 6c 3b 0a 7d 0a | .$currentValue[$bit].??.null;.}. |
288c0 | 69 66 20 28 69 73 5f 61 72 72 61 79 28 24 63 75 72 72 65 6e 74 56 61 6c 75 65 29 29 20 7b 0a 24 | if.(is_array($currentValue)).{.$ |
288e0 | 76 61 6c 75 65 20 3d 20 61 72 72 61 79 5f 6d 65 72 67 65 28 24 63 75 72 72 65 6e 74 56 61 6c 75 | value.=.array_merge($currentValu |
28900 | 65 2c 20 24 76 61 6c 75 65 29 3b 0a 7d 0a 7d 0a 7d 0a 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 53 | e,.$value);.}.}.}.$this->configS |
28920 | 6f 75 72 63 65 2d 3e 61 64 64 50 72 6f 70 65 72 74 79 28 24 73 65 74 74 69 6e 67 4b 65 79 2c 20 | ource->addProperty($settingKey,. |
28940 | 24 76 61 6c 75 65 29 3b 0a 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 0a 0a 69 66 20 28 50 72 65 67 | $value);..return.0;.}...if.(Preg |
28960 | 3a 3a 69 73 4d 61 74 63 68 28 27 2f 5e 73 75 67 67 65 73 74 5c 2e 28 2e 2b 29 2f 27 2c 20 24 73 | ::isMatch('/^suggest\.(.+)/',.$s |
28980 | 65 74 74 69 6e 67 4b 65 79 2c 20 24 6d 61 74 63 68 65 73 29 29 20 7b 0a 69 66 20 28 24 69 6e 70 | ettingKey,.$matches)).{.if.($inp |
289a0 | 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 75 6e 73 65 74 27 29 29 20 7b 0a 24 74 68 69 73 2d | ut->getOption('unset')).{.$this- |
289c0 | 3e 63 6f 6e 66 69 67 53 6f 75 72 63 65 2d 3e 72 65 6d 6f 76 65 50 72 6f 70 65 72 74 79 28 24 73 | >configSource->removeProperty($s |
289e0 | 65 74 74 69 6e 67 4b 65 79 29 3b 0a 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 0a 24 74 68 69 73 2d | ettingKey);..return.0;.}..$this- |
28a00 | 3e 63 6f 6e 66 69 67 53 6f 75 72 63 65 2d 3e 61 64 64 50 72 6f 70 65 72 74 79 28 24 73 65 74 74 | >configSource->addProperty($sett |
28a20 | 69 6e 67 4b 65 79 2c 20 69 6d 70 6c 6f 64 65 28 27 20 27 2c 20 24 76 61 6c 75 65 73 29 29 3b 0a | ingKey,.implode('.',.$values));. |
28a40 | 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 0a 0a 69 66 20 28 69 6e 5f 61 72 72 61 79 28 24 73 65 74 | .return.0;.}...if.(in_array($set |
28a60 | 74 69 6e 67 4b 65 79 2c 20 5b 27 73 75 67 67 65 73 74 27 2c 20 27 65 78 74 72 61 27 5d 2c 20 74 | tingKey,.['suggest',.'extra'],.t |
28a80 | 72 75 65 29 20 26 26 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 75 6e 73 65 74 | rue).&&.$input->getOption('unset |
28aa0 | 27 29 29 20 7b 0a 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 53 6f 75 72 63 65 2d 3e 72 65 6d 6f 76 | ')).{.$this->configSource->remov |
28ac0 | 65 50 72 6f 70 65 72 74 79 28 24 73 65 74 74 69 6e 67 4b 65 79 29 3b 0a 0a 72 65 74 75 72 6e 20 | eProperty($settingKey);..return. |
28ae0 | 30 3b 0a 7d 0a 0a 0a 69 66 20 28 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 2f 5e 70 6c 61 74 | 0;.}...if.(Preg::isMatch('/^plat |
28b00 | 66 6f 72 6d 5c 2e 28 2e 2b 29 2f 27 2c 20 24 73 65 74 74 69 6e 67 4b 65 79 2c 20 24 6d 61 74 63 | form\.(.+)/',.$settingKey,.$matc |
28b20 | 68 65 73 29 29 20 7b 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 75 | hes)).{.if.($input->getOption('u |
28b40 | 6e 73 65 74 27 29 29 20 7b 0a 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 53 6f 75 72 63 65 2d 3e 72 | nset')).{.$this->configSource->r |
28b60 | 65 6d 6f 76 65 43 6f 6e 66 69 67 53 65 74 74 69 6e 67 28 24 73 65 74 74 69 6e 67 4b 65 79 29 3b | emoveConfigSetting($settingKey); |
28b80 | 0a 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 53 6f 75 72 | ..return.0;.}..$this->configSour |
28ba0 | 63 65 2d 3e 61 64 64 43 6f 6e 66 69 67 53 65 74 74 69 6e 67 28 24 73 65 74 74 69 6e 67 4b 65 79 | ce->addConfigSetting($settingKey |
28bc0 | 2c 20 24 76 61 6c 75 65 73 5b 30 5d 20 3d 3d 3d 20 27 66 61 6c 73 65 27 20 3f 20 66 61 6c 73 65 | ,.$values[0].===.'false'.?.false |
28be0 | 20 3a 20 24 76 61 6c 75 65 73 5b 30 5d 29 3b 0a 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 0a 0a 69 | .:.$values[0]);..return.0;.}...i |
28c00 | 66 20 28 24 73 65 74 74 69 6e 67 4b 65 79 20 3d 3d 3d 20 27 70 6c 61 74 66 6f 72 6d 27 20 26 26 | f.($settingKey.===.'platform'.&& |
28c20 | 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 75 6e 73 65 74 27 29 29 20 7b 0a 24 | .$input->getOption('unset')).{.$ |
28c40 | 74 68 69 73 2d 3e 63 6f 6e 66 69 67 53 6f 75 72 63 65 2d 3e 72 65 6d 6f 76 65 43 6f 6e 66 69 67 | this->configSource->removeConfig |
28c60 | 53 65 74 74 69 6e 67 28 24 73 65 74 74 69 6e 67 4b 65 79 29 3b 0a 0a 72 65 74 75 72 6e 20 30 3b | Setting($settingKey);..return.0; |
28c80 | 0a 7d 0a 0a 0a 69 66 20 28 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 2f 5e 28 62 69 74 62 75 | .}...if.(Preg::isMatch('/^(bitbu |
28ca0 | 63 6b 65 74 2d 6f 61 75 74 68 7c 67 69 74 68 75 62 2d 6f 61 75 74 68 7c 67 69 74 6c 61 62 2d 6f | cket-oauth|github-oauth|gitlab-o |
28cc0 | 61 75 74 68 7c 67 69 74 6c 61 62 2d 74 6f 6b 65 6e 7c 68 74 74 70 2d 62 61 73 69 63 7c 62 65 61 | auth|gitlab-token|http-basic|bea |
28ce0 | 72 65 72 29 5c 2e 28 2e 2b 29 2f 27 2c 20 24 73 65 74 74 69 6e 67 4b 65 79 2c 20 24 6d 61 74 63 | rer)\.(.+)/',.$settingKey,.$matc |
28d00 | 68 65 73 29 29 20 7b 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 75 | hes)).{.if.($input->getOption('u |
28d20 | 6e 73 65 74 27 29 29 20 7b 0a 24 74 68 69 73 2d 3e 61 75 74 68 43 6f 6e 66 69 67 53 6f 75 72 63 | nset')).{.$this->authConfigSourc |
28d40 | 65 2d 3e 72 65 6d 6f 76 65 43 6f 6e 66 69 67 53 65 74 74 69 6e 67 28 24 6d 61 74 63 68 65 73 5b | e->removeConfigSetting($matches[ |
28d60 | 31 5d 2e 27 2e 27 2e 24 6d 61 74 63 68 65 73 5b 32 5d 29 3b 0a 24 74 68 69 73 2d 3e 63 6f 6e 66 | 1].'.'.$matches[2]);.$this->conf |
28d80 | 69 67 53 6f 75 72 63 65 2d 3e 72 65 6d 6f 76 65 43 6f 6e 66 69 67 53 65 74 74 69 6e 67 28 24 6d | igSource->removeConfigSetting($m |
28da0 | 61 74 63 68 65 73 5b 31 5d 2e 27 2e 27 2e 24 6d 61 74 63 68 65 73 5b 32 5d 29 3b 0a 0a 72 65 74 | atches[1].'.'.$matches[2]);..ret |
28dc0 | 75 72 6e 20 30 3b 0a 7d 0a 0a 69 66 20 28 24 6d 61 74 63 68 65 73 5b 31 5d 20 3d 3d 3d 20 27 62 | urn.0;.}..if.($matches[1].===.'b |
28de0 | 69 74 62 75 63 6b 65 74 2d 6f 61 75 74 68 27 29 20 7b 0a 69 66 20 28 32 20 21 3d 3d 20 63 6f 75 | itbucket-oauth').{.if.(2.!==.cou |
28e00 | 6e 74 28 24 76 61 6c 75 65 73 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d | nt($values)).{.throw.new.\Runtim |
28e20 | 65 45 78 63 65 70 74 69 6f 6e 28 27 45 78 70 65 63 74 65 64 20 74 77 6f 20 61 72 67 75 6d 65 6e | eException('Expected.two.argumen |
28e40 | 74 73 20 28 63 6f 6e 73 75 6d 65 72 2d 6b 65 79 2c 20 63 6f 6e 73 75 6d 65 72 2d 73 65 63 72 65 | ts.(consumer-key,.consumer-secre |
28e60 | 74 29 2c 20 67 6f 74 20 27 2e 63 6f 75 6e 74 28 24 76 61 6c 75 65 73 29 29 3b 0a 7d 0a 24 74 68 | t),.got.'.count($values));.}.$th |
28e80 | 69 73 2d 3e 63 6f 6e 66 69 67 53 6f 75 72 63 65 2d 3e 72 65 6d 6f 76 65 43 6f 6e 66 69 67 53 65 | is->configSource->removeConfigSe |
28ea0 | 74 74 69 6e 67 28 24 6d 61 74 63 68 65 73 5b 31 5d 2e 27 2e 27 2e 24 6d 61 74 63 68 65 73 5b 32 | tting($matches[1].'.'.$matches[2 |
28ec0 | 5d 29 3b 0a 24 74 68 69 73 2d 3e 61 75 74 68 43 6f 6e 66 69 67 53 6f 75 72 63 65 2d 3e 61 64 64 | ]);.$this->authConfigSource->add |
28ee0 | 43 6f 6e 66 69 67 53 65 74 74 69 6e 67 28 24 6d 61 74 63 68 65 73 5b 31 5d 2e 27 2e 27 2e 24 6d | ConfigSetting($matches[1].'.'.$m |
28f00 | 61 74 63 68 65 73 5b 32 5d 2c 20 5b 27 63 6f 6e 73 75 6d 65 72 2d 6b 65 79 27 20 3d 3e 20 24 76 | atches[2],.['consumer-key'.=>.$v |
28f20 | 61 6c 75 65 73 5b 30 5d 2c 20 27 63 6f 6e 73 75 6d 65 72 2d 73 65 63 72 65 74 27 20 3d 3e 20 24 | alues[0],.'consumer-secret'.=>.$ |
28f40 | 76 61 6c 75 65 73 5b 31 5d 5d 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 6d 61 74 63 68 65 73 5b | values[1]]);.}.elseif.($matches[ |
28f60 | 31 5d 20 3d 3d 3d 20 27 67 69 74 6c 61 62 2d 74 6f 6b 65 6e 27 20 26 26 20 32 20 3d 3d 3d 20 63 | 1].===.'gitlab-token'.&&.2.===.c |
28f80 | 6f 75 6e 74 28 24 76 61 6c 75 65 73 29 29 20 7b 0a 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 53 6f | ount($values)).{.$this->configSo |
28fa0 | 75 72 63 65 2d 3e 72 65 6d 6f 76 65 43 6f 6e 66 69 67 53 65 74 74 69 6e 67 28 24 6d 61 74 63 68 | urce->removeConfigSetting($match |
28fc0 | 65 73 5b 31 5d 2e 27 2e 27 2e 24 6d 61 74 63 68 65 73 5b 32 5d 29 3b 0a 24 74 68 69 73 2d 3e 61 | es[1].'.'.$matches[2]);.$this->a |
28fe0 | 75 74 68 43 6f 6e 66 69 67 53 6f 75 72 63 65 2d 3e 61 64 64 43 6f 6e 66 69 67 53 65 74 74 69 6e | uthConfigSource->addConfigSettin |
29000 | 67 28 24 6d 61 74 63 68 65 73 5b 31 5d 2e 27 2e 27 2e 24 6d 61 74 63 68 65 73 5b 32 5d 2c 20 5b | g($matches[1].'.'.$matches[2],.[ |
29020 | 27 75 73 65 72 6e 61 6d 65 27 20 3d 3e 20 24 76 61 6c 75 65 73 5b 30 5d 2c 20 27 74 6f 6b 65 6e | 'username'.=>.$values[0],.'token |
29040 | 27 20 3d 3e 20 24 76 61 6c 75 65 73 5b 31 5d 5d 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 69 6e 5f | '.=>.$values[1]]);.}.elseif.(in_ |
29060 | 61 72 72 61 79 28 24 6d 61 74 63 68 65 73 5b 31 5d 2c 20 5b 27 67 69 74 68 75 62 2d 6f 61 75 74 | array($matches[1],.['github-oaut |
29080 | 68 27 2c 20 27 67 69 74 6c 61 62 2d 6f 61 75 74 68 27 2c 20 27 67 69 74 6c 61 62 2d 74 6f 6b 65 | h',.'gitlab-oauth',.'gitlab-toke |
290a0 | 6e 27 2c 20 27 62 65 61 72 65 72 27 5d 2c 20 74 72 75 65 29 29 20 7b 0a 69 66 20 28 31 20 21 3d | n',.'bearer'],.true)).{.if.(1.!= |
290c0 | 3d 20 63 6f 75 6e 74 28 24 76 61 6c 75 65 73 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 | =.count($values)).{.throw.new.\R |
290e0 | 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 54 6f 6f 20 6d 61 6e 79 20 61 72 67 75 6d 65 | untimeException('Too.many.argume |
29100 | 6e 74 73 2c 20 65 78 70 65 63 74 65 64 20 6f 6e 6c 79 20 6f 6e 65 20 74 6f 6b 65 6e 27 29 3b 0a | nts,.expected.only.one.token');. |
29120 | 7d 0a 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 53 6f 75 72 63 65 2d 3e 72 65 6d 6f 76 65 43 6f 6e | }.$this->configSource->removeCon |
29140 | 66 69 67 53 65 74 74 69 6e 67 28 24 6d 61 74 63 68 65 73 5b 31 5d 2e 27 2e 27 2e 24 6d 61 74 63 | figSetting($matches[1].'.'.$matc |
29160 | 68 65 73 5b 32 5d 29 3b 0a 24 74 68 69 73 2d 3e 61 75 74 68 43 6f 6e 66 69 67 53 6f 75 72 63 65 | hes[2]);.$this->authConfigSource |
29180 | 2d 3e 61 64 64 43 6f 6e 66 69 67 53 65 74 74 69 6e 67 28 24 6d 61 74 63 68 65 73 5b 31 5d 2e 27 | ->addConfigSetting($matches[1].' |
291a0 | 2e 27 2e 24 6d 61 74 63 68 65 73 5b 32 5d 2c 20 24 76 61 6c 75 65 73 5b 30 5d 29 3b 0a 7d 20 65 | .'.$matches[2],.$values[0]);.}.e |
291c0 | 6c 73 65 69 66 20 28 24 6d 61 74 63 68 65 73 5b 31 5d 20 3d 3d 3d 20 27 68 74 74 70 2d 62 61 73 | lseif.($matches[1].===.'http-bas |
291e0 | 69 63 27 29 20 7b 0a 69 66 20 28 32 20 21 3d 3d 20 63 6f 75 6e 74 28 24 76 61 6c 75 65 73 29 29 | ic').{.if.(2.!==.count($values)) |
29200 | 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 | .{.throw.new.\RuntimeException(' |
29220 | 45 78 70 65 63 74 65 64 20 74 77 6f 20 61 72 67 75 6d 65 6e 74 73 20 28 75 73 65 72 6e 61 6d 65 | Expected.two.arguments.(username |
29240 | 2c 20 70 61 73 73 77 6f 72 64 29 2c 20 67 6f 74 20 27 2e 63 6f 75 6e 74 28 24 76 61 6c 75 65 73 | ,.password),.got.'.count($values |
29260 | 29 29 3b 0a 7d 0a 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 53 6f 75 72 63 65 2d 3e 72 65 6d 6f 76 | ));.}.$this->configSource->remov |
29280 | 65 43 6f 6e 66 69 67 53 65 74 74 69 6e 67 28 24 6d 61 74 63 68 65 73 5b 31 5d 2e 27 2e 27 2e 24 | eConfigSetting($matches[1].'.'.$ |
292a0 | 6d 61 74 63 68 65 73 5b 32 5d 29 3b 0a 24 74 68 69 73 2d 3e 61 75 74 68 43 6f 6e 66 69 67 53 6f | matches[2]);.$this->authConfigSo |
292c0 | 75 72 63 65 2d 3e 61 64 64 43 6f 6e 66 69 67 53 65 74 74 69 6e 67 28 24 6d 61 74 63 68 65 73 5b | urce->addConfigSetting($matches[ |
292e0 | 31 5d 2e 27 2e 27 2e 24 6d 61 74 63 68 65 73 5b 32 5d 2c 20 5b 27 75 73 65 72 6e 61 6d 65 27 20 | 1].'.'.$matches[2],.['username'. |
29300 | 3d 3e 20 24 76 61 6c 75 65 73 5b 30 5d 2c 20 27 70 61 73 73 77 6f 72 64 27 20 3d 3e 20 24 76 61 | =>.$values[0],.'password'.=>.$va |
29320 | 6c 75 65 73 5b 31 5d 5d 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 0a 0a 69 66 20 28 | lues[1]]);.}..return.0;.}...if.( |
29340 | 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 2f 5e 73 63 72 69 70 74 73 5c 2e 28 2e 2b 29 2f 27 | Preg::isMatch('/^scripts\.(.+)/' |
29360 | 2c 20 24 73 65 74 74 69 6e 67 4b 65 79 2c 20 24 6d 61 74 63 68 65 73 29 29 20 7b 0a 69 66 20 28 | ,.$settingKey,.$matches)).{.if.( |
29380 | 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 75 6e 73 65 74 27 29 29 20 7b 0a 24 74 | $input->getOption('unset')).{.$t |
293a0 | 68 69 73 2d 3e 63 6f 6e 66 69 67 53 6f 75 72 63 65 2d 3e 72 65 6d 6f 76 65 50 72 6f 70 65 72 74 | his->configSource->removePropert |
293c0 | 79 28 24 73 65 74 74 69 6e 67 4b 65 79 29 3b 0a 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 0a 24 74 | y($settingKey);..return.0;.}..$t |
293e0 | 68 69 73 2d 3e 63 6f 6e 66 69 67 53 6f 75 72 63 65 2d 3e 61 64 64 50 72 6f 70 65 72 74 79 28 24 | his->configSource->addProperty($ |
29400 | 73 65 74 74 69 6e 67 4b 65 79 2c 20 63 6f 75 6e 74 28 24 76 61 6c 75 65 73 29 20 3e 20 31 20 3f | settingKey,.count($values).>.1.? |
29420 | 20 24 76 61 6c 75 65 73 20 3a 20 24 76 61 6c 75 65 73 5b 30 5d 29 3b 0a 0a 72 65 74 75 72 6e 20 | .$values.:.$values[0]);..return. |
29440 | 30 3b 0a 7d 0a 0a 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 75 6e | 0;.}...if.($input->getOption('un |
29460 | 73 65 74 27 29 29 20 7b 0a 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 53 6f 75 72 63 65 2d 3e 72 65 | set')).{.$this->configSource->re |
29480 | 6d 6f 76 65 50 72 6f 70 65 72 74 79 28 24 73 65 74 74 69 6e 67 4b 65 79 29 3b 0a 0a 72 65 74 75 | moveProperty($settingKey);..retu |
294a0 | 72 6e 20 30 3b 0a 7d 0a 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d | rn.0;.}..throw.new.\InvalidArgum |
294c0 | 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 27 53 65 74 74 69 6e 67 20 27 2e 24 73 65 74 74 69 6e 67 | entException('Setting.'.$setting |
294e0 | 4b 65 79 2e 27 20 64 6f 65 73 20 6e 6f 74 20 65 78 69 73 74 20 6f 72 20 69 73 20 6e 6f 74 20 73 | Key.'.does.not.exist.or.is.not.s |
29500 | 75 70 70 6f 72 74 65 64 20 62 79 20 74 68 69 73 20 63 6f 6d 6d 61 6e 64 27 29 3b 0a 7d 0a 0a 0a | upported.by.this.command');.}... |
29520 | 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 68 61 6e 64 6c 65 53 69 6e 67 | ...protected.function.handleSing |
29540 | 6c 65 56 61 6c 75 65 28 73 74 72 69 6e 67 20 24 6b 65 79 2c 20 61 72 72 61 79 20 24 63 61 6c 6c | leValue(string.$key,.array.$call |
29560 | 62 61 63 6b 73 2c 20 61 72 72 61 79 20 24 76 61 6c 75 65 73 2c 20 73 74 72 69 6e 67 20 24 6d 65 | backs,.array.$values,.string.$me |
29580 | 74 68 6f 64 29 3a 20 76 6f 69 64 0a 7b 0a 5b 24 76 61 6c 69 64 61 74 6f 72 2c 20 24 6e 6f 72 6d | thod):.void.{.[$validator,.$norm |
295a0 | 61 6c 69 7a 65 72 5d 20 3d 20 24 63 61 6c 6c 62 61 63 6b 73 3b 0a 69 66 20 28 31 20 21 3d 3d 20 | alizer].=.$callbacks;.if.(1.!==. |
295c0 | 63 6f 75 6e 74 28 24 76 61 6c 75 65 73 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e | count($values)).{.throw.new.\Run |
295e0 | 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 59 6f 75 20 63 61 6e 20 6f 6e 6c 79 20 70 61 73 73 | timeException('You.can.only.pass |
29600 | 20 6f 6e 65 20 76 61 6c 75 65 2e 20 45 78 61 6d 70 6c 65 3a 20 70 68 70 20 63 6f 6d 70 6f 73 65 | .one.value..Example:.php.compose |
29620 | 72 2e 70 68 61 72 20 63 6f 6e 66 69 67 20 70 72 6f 63 65 73 73 2d 74 69 6d 65 6f 75 74 20 33 30 | r.phar.config.process-timeout.30 |
29640 | 30 27 29 3b 0a 7d 0a 0a 69 66 20 28 74 72 75 65 20 21 3d 3d 20 24 76 61 6c 69 64 61 74 69 6f 6e | 0');.}..if.(true.!==.$validation |
29660 | 20 3d 20 24 76 61 6c 69 64 61 74 6f 72 28 24 76 61 6c 75 65 73 5b 30 5d 29 29 20 7b 0a 74 68 72 | .=.$validator($values[0])).{.thr |
29680 | 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 73 70 72 69 6e 74 66 | ow.new.\RuntimeException(sprintf |
296a0 | 28 0a 27 22 25 73 22 20 69 73 20 61 6e 20 69 6e 76 61 6c 69 64 20 76 61 6c 75 65 27 2e 28 24 76 | (.'"%s".is.an.invalid.value'.($v |
296c0 | 61 6c 69 64 61 74 69 6f 6e 20 3f 20 27 20 28 27 2e 24 76 61 6c 69 64 61 74 69 6f 6e 2e 27 29 27 | alidation.?.'.('.$validation.')' |
296e0 | 20 3a 20 27 27 29 2c 0a 24 76 61 6c 75 65 73 5b 30 5d 0a 29 29 3b 0a 7d 0a 0a 24 6e 6f 72 6d 61 | .:.''),.$values[0].));.}..$norma |
29700 | 6c 69 7a 65 64 56 61 6c 75 65 20 3d 20 24 6e 6f 72 6d 61 6c 69 7a 65 72 28 24 76 61 6c 75 65 73 | lizedValue.=.$normalizer($values |
29720 | 5b 30 5d 29 3b 0a 0a 69 66 20 28 24 6b 65 79 20 3d 3d 3d 20 27 64 69 73 61 62 6c 65 2d 74 6c 73 | [0]);..if.($key.===.'disable-tls |
29740 | 27 29 20 7b 0a 69 66 20 28 21 24 6e 6f 72 6d 61 6c 69 7a 65 64 56 61 6c 75 65 20 26 26 20 24 74 | ').{.if.(!$normalizedValue.&&.$t |
29760 | 68 69 73 2d 3e 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 64 69 73 61 62 6c 65 2d 74 6c 73 27 29 29 | his->config->get('disable-tls')) |
29780 | 20 7b 0a 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c | .{.$this->getIO()->writeError('< |
297a0 | 69 6e 66 6f 3e 59 6f 75 20 61 72 65 20 6e 6f 77 20 72 75 6e 6e 69 6e 67 20 43 6f 6d 70 6f 73 65 | info>You.are.now.running.Compose |
297c0 | 72 20 77 69 74 68 20 53 53 4c 2f 54 4c 53 20 70 72 6f 74 65 63 74 69 6f 6e 20 65 6e 61 62 6c 65 | r.with.SSL/TLS.protection.enable |
297e0 | 64 2e 3c 2f 69 6e 66 6f 3e 27 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 6e 6f 72 6d 61 6c 69 7a | d.</info>');.}.elseif.($normaliz |
29800 | 65 64 56 61 6c 75 65 20 26 26 20 21 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 | edValue.&&.!$this->config->get(' |
29820 | 64 69 73 61 62 6c 65 2d 74 6c 73 27 29 29 20 7b 0a 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 2d | disable-tls')).{.$this->getIO()- |
29840 | 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 77 61 72 6e 69 6e 67 3e 59 6f 75 20 61 72 65 20 6e 6f | >writeError('<warning>You.are.no |
29860 | 77 20 72 75 6e 6e 69 6e 67 20 43 6f 6d 70 6f 73 65 72 20 77 69 74 68 20 53 53 4c 2f 54 4c 53 20 | w.running.Composer.with.SSL/TLS. |
29880 | 70 72 6f 74 65 63 74 69 6f 6e 20 64 69 73 61 62 6c 65 64 2e 3c 2f 77 61 72 6e 69 6e 67 3e 27 29 | protection.disabled.</warning>') |
298a0 | 3b 0a 7d 0a 7d 0a 0a 63 61 6c 6c 5f 75 73 65 72 5f 66 75 6e 63 28 5b 24 74 68 69 73 2d 3e 63 6f | ;.}.}..call_user_func([$this->co |
298c0 | 6e 66 69 67 53 6f 75 72 63 65 2c 20 24 6d 65 74 68 6f 64 5d 2c 20 24 6b 65 79 2c 20 24 6e 6f 72 | nfigSource,.$method],.$key,.$nor |
298e0 | 6d 61 6c 69 7a 65 64 56 61 6c 75 65 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 | malizedValue);.}......protected. |
29900 | 66 75 6e 63 74 69 6f 6e 20 68 61 6e 64 6c 65 4d 75 6c 74 69 56 61 6c 75 65 28 73 74 72 69 6e 67 | function.handleMultiValue(string |
29920 | 20 24 6b 65 79 2c 20 61 72 72 61 79 20 24 63 61 6c 6c 62 61 63 6b 73 2c 20 61 72 72 61 79 20 24 | .$key,.array.$callbacks,.array.$ |
29940 | 76 61 6c 75 65 73 2c 20 73 74 72 69 6e 67 20 24 6d 65 74 68 6f 64 29 3a 20 76 6f 69 64 0a 7b 0a | values,.string.$method):.void.{. |
29960 | 5b 24 76 61 6c 69 64 61 74 6f 72 2c 20 24 6e 6f 72 6d 61 6c 69 7a 65 72 5d 20 3d 20 24 63 61 6c | [$validator,.$normalizer].=.$cal |
29980 | 6c 62 61 63 6b 73 3b 0a 69 66 20 28 74 72 75 65 20 21 3d 3d 20 24 76 61 6c 69 64 61 74 69 6f 6e | lbacks;.if.(true.!==.$validation |
299a0 | 20 3d 20 24 76 61 6c 69 64 61 74 6f 72 28 24 76 61 6c 75 65 73 29 29 20 7b 0a 74 68 72 6f 77 20 | .=.$validator($values)).{.throw. |
299c0 | 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 73 70 72 69 6e 74 66 28 0a 27 | new.\RuntimeException(sprintf(.' |
299e0 | 25 73 20 69 73 20 61 6e 20 69 6e 76 61 6c 69 64 20 76 61 6c 75 65 27 2e 28 24 76 61 6c 69 64 61 | %s.is.an.invalid.value'.($valida |
29a00 | 74 69 6f 6e 20 3f 20 27 20 28 27 2e 24 76 61 6c 69 64 61 74 69 6f 6e 2e 27 29 27 20 3a 20 27 27 | tion.?.'.('.$validation.')'.:.'' |
29a20 | 29 2c 0a 6a 73 6f 6e 5f 65 6e 63 6f 64 65 28 24 76 61 6c 75 65 73 29 0a 29 29 3b 0a 7d 0a 0a 63 | ),.json_encode($values).));.}..c |
29a40 | 61 6c 6c 5f 75 73 65 72 5f 66 75 6e 63 28 5b 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 53 6f 75 72 | all_user_func([$this->configSour |
29a60 | 63 65 2c 20 24 6d 65 74 68 6f 64 5d 2c 20 24 6b 65 79 2c 20 24 6e 6f 72 6d 61 6c 69 7a 65 72 28 | ce,.$method],.$key,.$normalizer( |
29a80 | 24 76 61 6c 75 65 73 29 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 | $values));.}........protected.fu |
29aa0 | 6e 63 74 69 6f 6e 20 6c 69 73 74 43 6f 6e 66 69 67 75 72 61 74 69 6f 6e 28 61 72 72 61 79 20 24 | nction.listConfiguration(array.$ |
29ac0 | 63 6f 6e 74 65 6e 74 73 2c 20 61 72 72 61 79 20 24 72 61 77 43 6f 6e 74 65 6e 74 73 2c 20 4f 75 | contents,.array.$rawContents,.Ou |
29ae0 | 74 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 6f 75 74 70 75 74 2c 20 3f 73 74 72 69 6e 67 20 24 | tputInterface.$output,.?string.$ |
29b00 | 6b 20 3d 20 6e 75 6c 6c 2c 20 62 6f 6f 6c 20 24 73 68 6f 77 53 6f 75 72 63 65 20 3d 20 66 61 6c | k.=.null,.bool.$showSource.=.fal |
29b20 | 73 65 29 3a 20 76 6f 69 64 0a 7b 0a 24 6f 72 69 67 4b 20 3d 20 24 6b 3b 0a 24 69 6f 20 3d 20 24 | se):.void.{.$origK.=.$k;.$io.=.$ |
29b40 | 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 3b 0a 66 6f 72 65 61 63 68 20 28 24 63 6f 6e 74 65 6e 74 | this->getIO();.foreach.($content |
29b60 | 73 20 61 73 20 24 6b 65 79 20 3d 3e 20 24 76 61 6c 75 65 29 20 7b 0a 69 66 20 28 24 6b 20 3d 3d | s.as.$key.=>.$value).{.if.($k.== |
29b80 | 3d 20 6e 75 6c 6c 20 26 26 20 21 69 6e 5f 61 72 72 61 79 28 24 6b 65 79 2c 20 5b 27 63 6f 6e 66 | =.null.&&.!in_array($key,.['conf |
29ba0 | 69 67 27 2c 20 27 72 65 70 6f 73 69 74 6f 72 69 65 73 27 5d 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 | ig',.'repositories'])).{.continu |
29bc0 | 65 3b 0a 7d 0a 0a 24 72 61 77 56 61 6c 20 3d 20 24 72 61 77 43 6f 6e 74 65 6e 74 73 5b 24 6b 65 | e;.}..$rawVal.=.$rawContents[$ke |
29be0 | 79 5d 20 3f 3f 20 6e 75 6c 6c 3b 0a 0a 69 66 20 28 69 73 5f 61 72 72 61 79 28 24 76 61 6c 75 65 | y].??.null;..if.(is_array($value |
29c00 | 29 20 26 26 20 28 21 69 73 5f 6e 75 6d 65 72 69 63 28 6b 65 79 28 24 76 61 6c 75 65 29 29 20 7c | ).&&.(!is_numeric(key($value)).| |
29c20 | 7c 20 28 24 6b 65 79 20 3d 3d 3d 20 27 72 65 70 6f 73 69 74 6f 72 69 65 73 27 20 26 26 20 6e 75 | |.($key.===.'repositories'.&&.nu |
29c40 | 6c 6c 20 3d 3d 3d 20 24 6b 29 29 29 20 7b 0a 24 6b 20 2e 3d 20 50 72 65 67 3a 3a 72 65 70 6c 61 | ll.===.$k))).{.$k..=.Preg::repla |
29c60 | 63 65 28 27 7b 5e 63 6f 6e 66 69 67 5c 2e 7d 27 2c 20 27 27 2c 20 24 6b 65 79 20 2e 20 27 2e 27 | ce('{^config\.}',.'',.$key...'.' |
29c80 | 29 3b 0a 24 74 68 69 73 2d 3e 6c 69 73 74 43 6f 6e 66 69 67 75 72 61 74 69 6f 6e 28 24 76 61 6c | );.$this->listConfiguration($val |
29ca0 | 75 65 2c 20 24 72 61 77 56 61 6c 2c 20 24 6f 75 74 70 75 74 2c 20 24 6b 2c 20 24 73 68 6f 77 53 | ue,.$rawVal,.$output,.$k,.$showS |
29cc0 | 6f 75 72 63 65 29 3b 0a 24 6b 20 3d 20 24 6f 72 69 67 4b 3b 0a 0a 63 6f 6e 74 69 6e 75 65 3b 0a | ource);.$k.=.$origK;..continue;. |
29ce0 | 7d 0a 0a 69 66 20 28 69 73 5f 61 72 72 61 79 28 24 76 61 6c 75 65 29 29 20 7b 0a 24 76 61 6c 75 | }..if.(is_array($value)).{.$valu |
29d00 | 65 20 3d 20 61 72 72 61 79 5f 6d 61 70 28 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 | e.=.array_map(static.function.($ |
29d20 | 76 61 6c 29 20 7b 0a 72 65 74 75 72 6e 20 69 73 5f 61 72 72 61 79 28 24 76 61 6c 29 20 3f 20 6a | val).{.return.is_array($val).?.j |
29d40 | 73 6f 6e 5f 65 6e 63 6f 64 65 28 24 76 61 6c 29 20 3a 20 24 76 61 6c 3b 0a 7d 2c 20 24 76 61 6c | son_encode($val).:.$val;.},.$val |
29d60 | 75 65 29 3b 0a 0a 24 76 61 6c 75 65 20 3d 20 27 5b 27 2e 69 6d 70 6c 6f 64 65 28 27 2c 20 27 2c | ue);..$value.=.'['.implode(',.', |
29d80 | 20 24 76 61 6c 75 65 29 2e 27 5d 27 3b 0a 7d 0a 0a 69 66 20 28 69 73 5f 62 6f 6f 6c 28 24 76 61 | .$value).']';.}..if.(is_bool($va |
29da0 | 6c 75 65 29 29 20 7b 0a 24 76 61 6c 75 65 20 3d 20 76 61 72 5f 65 78 70 6f 72 74 28 24 76 61 6c | lue)).{.$value.=.var_export($val |
29dc0 | 75 65 2c 20 74 72 75 65 29 3b 0a 7d 0a 0a 24 73 6f 75 72 63 65 20 3d 20 27 27 3b 0a 69 66 20 28 | ue,.true);.}..$source.=.'';.if.( |
29de0 | 24 73 68 6f 77 53 6f 75 72 63 65 29 20 7b 0a 24 73 6f 75 72 63 65 20 3d 20 27 20 28 27 20 2e 20 | $showSource).{.$source.=.'.('... |
29e00 | 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 2d 3e 67 65 74 53 6f 75 72 63 65 4f 66 56 61 6c 75 65 28 | $this->config->getSourceOfValue( |
29e20 | 24 6b 20 2e 20 24 6b 65 79 29 20 2e 20 27 29 27 3b 0a 7d 0a 0a 69 66 20 28 6e 75 6c 6c 20 21 3d | $k...$key)...')';.}..if.(null.!= |
29e40 | 3d 20 24 6b 20 26 26 20 30 20 3d 3d 3d 20 73 74 72 70 6f 73 28 24 6b 2c 20 27 72 65 70 6f 73 69 | =.$k.&&.0.===.strpos($k,.'reposi |
29e60 | 74 6f 72 69 65 73 27 29 29 20 7b 0a 24 6c 69 6e 6b 20 3d 20 27 68 74 74 70 73 3a 2f 2f 67 65 74 | tories')).{.$link.=.'https://get |
29e80 | 63 6f 6d 70 6f 73 65 72 2e 6f 72 67 2f 64 6f 63 2f 30 35 2d 72 65 70 6f 73 69 74 6f 72 69 65 73 | composer.org/doc/05-repositories |
29ea0 | 2e 6d 64 27 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 69 64 20 3d 20 50 72 65 67 3a 3a 72 65 70 6c 61 | .md';.}.else.{.$id.=.Preg::repla |
29ec0 | 63 65 28 27 7b 5c 2e 2e 2a 24 7d 27 2c 20 27 27 2c 20 24 6b 20 3d 3d 3d 20 27 27 20 7c 7c 20 24 | ce('{\..*$}',.'',.$k.===.''.||.$ |
29ee0 | 6b 20 3d 3d 3d 20 6e 75 6c 6c 20 3f 20 28 73 74 72 69 6e 67 29 20 24 6b 65 79 20 3a 20 24 6b 29 | k.===.null.?.(string).$key.:.$k) |
29f00 | 3b 0a 24 69 64 20 3d 20 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 28 27 7b 5b 5e 61 2d 7a 30 2d 39 | ;.$id.=.Preg::replace('{[^a-z0-9 |
29f20 | 5d 7d 69 27 2c 20 27 2d 27 2c 20 73 74 72 74 6f 6c 6f 77 65 72 28 74 72 69 6d 28 24 69 64 29 29 | ]}i',.'-',.strtolower(trim($id)) |
29f40 | 29 3b 0a 24 69 64 20 3d 20 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 28 27 7b 2d 2b 7d 27 2c 20 27 | );.$id.=.Preg::replace('{-+}',.' |
29f60 | 2d 27 2c 20 24 69 64 29 3b 0a 24 6c 69 6e 6b 20 3d 20 27 68 74 74 70 73 3a 2f 2f 67 65 74 63 6f | -',.$id);.$link.=.'https://getco |
29f80 | 6d 70 6f 73 65 72 2e 6f 72 67 2f 64 6f 63 2f 30 36 2d 63 6f 6e 66 69 67 2e 6d 64 23 27 20 2e 20 | mposer.org/doc/06-config.md#'... |
29fa0 | 24 69 64 3b 0a 7d 0a 69 66 20 28 69 73 5f 73 74 72 69 6e 67 28 24 72 61 77 56 61 6c 29 20 26 26 | $id;.}.if.(is_string($rawVal).&& |
29fc0 | 20 24 72 61 77 56 61 6c 20 21 3d 3d 20 24 76 61 6c 75 65 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 | .$rawVal.!==.$value).{.$io->writ |
29fe0 | 65 28 27 5b 3c 66 67 3d 79 65 6c 6c 6f 77 3b 68 72 65 66 3d 27 20 2e 20 24 6c 69 6e 6b 20 2e 27 | e('[<fg=yellow;href='...$link..' |
2a000 | 3e 27 20 2e 20 24 6b 20 2e 20 24 6b 65 79 20 2e 20 27 3c 2f 3e 5d 20 3c 69 6e 66 6f 3e 27 20 2e | >'...$k...$key...'</>].<info>'.. |
2a020 | 20 24 72 61 77 56 61 6c 20 2e 20 27 20 28 27 20 2e 20 24 76 61 6c 75 65 20 2e 20 27 29 3c 2f 69 | .$rawVal...'.('...$value...')</i |
2a040 | 6e 66 6f 3e 27 20 2e 20 24 73 6f 75 72 63 65 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 61 | nfo>'...$source,.true,.IOInterfa |
2a060 | 63 65 3a 3a 51 55 49 45 54 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 | ce::QUIET);.}.else.{.$io->write( |
2a080 | 27 5b 3c 66 67 3d 79 65 6c 6c 6f 77 3b 68 72 65 66 3d 27 20 2e 20 24 6c 69 6e 6b 20 2e 27 3e 27 | '[<fg=yellow;href='...$link..'>' |
2a0a0 | 20 2e 20 24 6b 20 2e 20 24 6b 65 79 20 2e 20 27 3c 2f 3e 5d 20 3c 69 6e 66 6f 3e 27 20 2e 20 24 | ...$k...$key...'</>].<info>'...$ |
2a0c0 | 76 61 6c 75 65 20 2e 20 27 3c 2f 69 6e 66 6f 3e 27 20 2e 20 24 73 6f 75 72 63 65 2c 20 74 72 75 | value...'</info>'...$source,.tru |
2a0e0 | 65 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 3a 3a 51 55 49 45 54 29 3b 0a 7d 0a 7d 0a 7d 0a 7d 0a | e,.IOInterface::QUIET);.}.}.}.}. |
2a100 | 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a | <?php.declare(strict_types=1);.. |
2a120 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6d | ..........namespace.Composer\Com |
2a140 | 6d 61 6e 64 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 66 69 67 3b 0a 75 73 65 20 | mand;..use.Composer\Config;.use. |
2a160 | 43 6f 6d 70 6f 73 65 72 5c 46 61 63 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 46 | Composer\Factory;.use.Composer\F |
2a180 | 69 6c 74 65 72 5c 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 5c | ilter\PlatformRequirementFilter\ |
2a1a0 | 49 67 6e 6f 72 65 41 6c 6c 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 | IgnoreAllPlatformRequirementFilt |
2a1c0 | 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 46 69 6c 74 65 72 5c 50 6c 61 74 66 6f 72 6d | er;.use.Composer\Filter\Platform |
2a1e0 | 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 5c 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 | RequirementFilter\PlatformRequir |
2a200 | 65 6d 65 6e 74 46 69 6c 74 65 72 46 61 63 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 | ementFilterFactory;.use.Composer |
2a220 | 5c 46 69 6c 74 65 72 5c 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 | \Filter\PlatformRequirementFilte |
2a240 | 72 5c 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 49 6e 74 65 72 | r\PlatformRequirementFilterInter |
2a260 | 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 6e 73 74 61 6c 6c 65 72 3b 0a 75 73 | face;.use.Composer\Installer;.us |
2a280 | 65 20 43 6f 6d 70 6f 73 65 72 5c 49 6e 73 74 61 6c 6c 65 72 5c 50 72 6f 6a 65 63 74 49 6e 73 74 | e.Composer\Installer\ProjectInst |
2a2a0 | 61 6c 6c 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 6e 73 74 61 6c 6c 65 72 5c 53 75 | aller;.use.Composer\Installer\Su |
2a2c0 | 67 67 65 73 74 65 64 50 61 63 6b 61 67 65 73 52 65 70 6f 72 74 65 72 3b 0a 75 73 65 20 43 6f 6d | ggestedPackagesReporter;.use.Com |
2a2e0 | 70 6f 73 65 72 5c 49 4f 5c 49 4f 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 | poser\IO\IOInterface;.use.Compos |
2a300 | 65 72 5c 50 61 63 6b 61 67 65 5c 42 61 73 65 50 61 63 6b 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 | er\Package\BasePackage;.use.Comp |
2a320 | 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 5c 4f 70 65 72 61 74 69 6f | oser\DependencyResolver\Operatio |
2a340 | 6e 5c 49 6e 73 74 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 | n\InstallOperation;.use.Composer |
2a360 | 5c 50 61 63 6b 61 67 65 5c 56 65 72 73 69 6f 6e 5c 56 65 72 73 69 6f 6e 53 65 6c 65 63 74 6f 72 | \Package\Version\VersionSelector |
2a380 | 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 41 6c 69 61 73 50 61 63 6b | ;.use.Composer\Package\AliasPack |
2a3a0 | 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 63 72 65 5c 50 72 65 67 3b 0a 75 73 65 | age;.use.Composer\Pcre\Preg;.use |
2a3c0 | 20 43 6f 6d 70 6f 73 65 72 5c 50 6c 75 67 69 6e 5c 50 6c 75 67 69 6e 42 6c 6f 63 6b 65 64 45 78 | .Composer\Plugin\PluginBlockedEx |
2a3e0 | 63 65 70 74 69 6f 6e 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 | ception;.use.Composer\Repository |
2a400 | 5c 52 65 70 6f 73 69 74 6f 72 79 46 61 63 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 | \RepositoryFactory;.use.Composer |
2a420 | 5c 52 65 70 6f 73 69 74 6f 72 79 5c 43 6f 6d 70 6f 73 69 74 65 52 65 70 6f 73 69 74 6f 72 79 3b | \Repository\CompositeRepository; |
2a440 | 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 50 6c 61 74 66 6f 72 | .use.Composer\Repository\Platfor |
2a460 | 6d 52 65 70 6f 73 69 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 | mRepository;.use.Composer\Reposi |
2a480 | 74 6f 72 79 5c 49 6e 73 74 61 6c 6c 65 64 41 72 72 61 79 52 65 70 6f 73 69 74 6f 72 79 3b 0a 75 | tory\InstalledArrayRepository;.u |
2a4a0 | 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 52 65 70 6f 73 69 74 6f 72 | se.Composer\Repository\Repositor |
2a4c0 | 79 53 65 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 63 72 69 70 74 5c 53 63 72 69 70 74 | ySet;.use.Composer\Script\Script |
2a4e0 | 45 76 65 6e 74 73 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 53 69 6c 65 6e 63 | Events;.use.Composer\Util\Silenc |
2a500 | 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 | er;.use.Composer\Console\Input\I |
2a520 | 6e 70 75 74 41 72 67 75 6d 65 6e 74 3b 0a 75 73 65 20 53 65 6c 64 5c 53 69 67 6e 61 6c 5c 53 69 | nputArgument;.use.Seld\Signal\Si |
2a540 | 67 6e 61 6c 48 61 6e 64 6c 65 72 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 | gnalHandler;.use.Symfony\Compone |
2a560 | 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 3b | nt\Console\Input\InputInterface; |
2a580 | 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 | .use.Composer\Console\Input\Inpu |
2a5a0 | 74 4f 70 74 69 6f 6e 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 | tOption;.use.Symfony\Component\C |
2a5c0 | 6f 6e 73 6f 6c 65 5c 4f 75 74 70 75 74 5c 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 | onsole\Output\OutputInterface;.u |
2a5e0 | 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 46 69 6e 64 65 72 5c 46 69 6e 64 | se.Symfony\Component\Finder\Find |
2a600 | 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 4a 73 6f 6e 5c 4a 73 6f 6e 46 69 6c 65 3b 0a | er;.use.Composer\Json\JsonFile;. |
2a620 | 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 66 69 67 5c 4a 73 6f 6e 43 6f 6e 66 69 67 53 6f | use.Composer\Config\JsonConfigSo |
2a640 | 75 72 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 46 69 6c 65 73 79 73 74 | urce;.use.Composer\Util\Filesyst |
2a660 | 65 6d 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 6c 61 74 66 6f 72 6d 3b 0a | em;.use.Composer\Util\Platform;. |
2a680 | 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f | use.Composer\Util\ProcessExecuto |
2a6a0 | 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 56 65 72 73 69 6f 6e 5c | r;.use.Composer\Package\Version\ |
2a6c0 | 56 65 72 73 69 6f 6e 50 61 72 73 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 41 64 76 69 | VersionParser;.use.Composer\Advi |
2a6e0 | 73 6f 72 79 5c 41 75 64 69 74 6f 72 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 43 72 65 | sory\Auditor;..........class.Cre |
2a700 | 61 74 65 50 72 6f 6a 65 63 74 43 6f 6d 6d 61 6e 64 20 65 78 74 65 6e 64 73 20 42 61 73 65 43 6f | ateProjectCommand.extends.BaseCo |
2a720 | 6d 6d 61 6e 64 0a 7b 0a 75 73 65 20 43 6f 6d 70 6c 65 74 69 6f 6e 54 72 61 69 74 3b 0a 0a 0a 0a | mmand.{.use.CompletionTrait;.... |
2a740 | 0a 70 72 6f 74 65 63 74 65 64 20 24 73 75 67 67 65 73 74 65 64 50 61 63 6b 61 67 65 73 52 65 70 | .protected.$suggestedPackagesRep |
2a760 | 6f 72 74 65 72 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 63 6f 6e 66 69 | orter;..protected.function.confi |
2a780 | 67 75 72 65 28 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 0a 2d 3e 73 65 74 4e 61 6d 65 28 27 | gure():.void.{.$this.->setName(' |
2a7a0 | 63 72 65 61 74 65 2d 70 72 6f 6a 65 63 74 27 29 0a 2d 3e 73 65 74 44 65 73 63 72 69 70 74 69 6f | create-project').->setDescriptio |
2a7c0 | 6e 28 27 43 72 65 61 74 65 73 20 6e 65 77 20 70 72 6f 6a 65 63 74 20 66 72 6f 6d 20 61 20 70 61 | n('Creates.new.project.from.a.pa |
2a7e0 | 63 6b 61 67 65 20 69 6e 74 6f 20 67 69 76 65 6e 20 64 69 72 65 63 74 6f 72 79 27 29 0a 2d 3e 73 | ckage.into.given.directory').->s |
2a800 | 65 74 44 65 66 69 6e 69 74 69 6f 6e 28 5b 0a 6e 65 77 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 | etDefinition([.new.InputArgument |
2a820 | 28 27 70 61 63 6b 61 67 65 27 2c 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 3a 3a 4f 50 54 49 4f | ('package',.InputArgument::OPTIO |
2a840 | 4e 41 4c 2c 20 27 50 61 63 6b 61 67 65 20 6e 61 6d 65 20 74 6f 20 62 65 20 69 6e 73 74 61 6c 6c | NAL,.'Package.name.to.be.install |
2a860 | 65 64 27 2c 20 6e 75 6c 6c 2c 20 24 74 68 69 73 2d 3e 73 75 67 67 65 73 74 41 76 61 69 6c 61 62 | ed',.null,.$this->suggestAvailab |
2a880 | 6c 65 50 61 63 6b 61 67 65 28 29 29 2c 0a 6e 65 77 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 28 | lePackage()),.new.InputArgument( |
2a8a0 | 27 64 69 72 65 63 74 6f 72 79 27 2c 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 3a 3a 4f 50 54 49 | 'directory',.InputArgument::OPTI |
2a8c0 | 4f 4e 41 4c 2c 20 27 44 69 72 65 63 74 6f 72 79 20 77 68 65 72 65 20 74 68 65 20 66 69 6c 65 73 | ONAL,.'Directory.where.the.files |
2a8e0 | 20 73 68 6f 75 6c 64 20 62 65 20 63 72 65 61 74 65 64 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 41 | .should.be.created'),.new.InputA |
2a900 | 72 67 75 6d 65 6e 74 28 27 76 65 72 73 69 6f 6e 27 2c 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 | rgument('version',.InputArgument |
2a920 | 3a 3a 4f 50 54 49 4f 4e 41 4c 2c 20 27 56 65 72 73 69 6f 6e 2c 20 77 69 6c 6c 20 64 65 66 61 75 | ::OPTIONAL,.'Version,.will.defau |
2a940 | 6c 74 20 74 6f 20 6c 61 74 65 73 74 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 | lt.to.latest'),.new.InputOption( |
2a960 | 27 73 74 61 62 69 6c 69 74 79 27 2c 20 27 73 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 | 'stability',.'s',.InputOption::V |
2a980 | 41 4c 55 45 5f 52 45 51 55 49 52 45 44 2c 20 27 4d 69 6e 69 6d 75 6d 2d 73 74 61 62 69 6c 69 74 | ALUE_REQUIRED,.'Minimum-stabilit |
2a9a0 | 79 20 61 6c 6c 6f 77 65 64 20 28 75 6e 6c 65 73 73 20 61 20 76 65 72 73 69 6f 6e 20 69 73 20 73 | y.allowed.(unless.a.version.is.s |
2a9c0 | 70 65 63 69 66 69 65 64 29 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 70 | pecified).'),.new.InputOption('p |
2a9e0 | 72 65 66 65 72 2d 73 6f 75 72 63 65 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e | refer-source',.null,.InputOption |
2aa00 | 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 46 6f 72 63 65 73 20 69 6e 73 74 61 6c 6c 61 74 69 | ::VALUE_NONE,.'Forces.installati |
2aa20 | 6f 6e 20 66 72 6f 6d 20 70 61 63 6b 61 67 65 20 73 6f 75 72 63 65 73 20 77 68 65 6e 20 70 6f 73 | on.from.package.sources.when.pos |
2aa40 | 73 69 62 6c 65 2c 20 69 6e 63 6c 75 64 69 6e 67 20 56 43 53 20 69 6e 66 6f 72 6d 61 74 69 6f 6e | sible,.including.VCS.information |
2aa60 | 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 70 72 65 66 65 72 2d 64 69 73 | .'),.new.InputOption('prefer-dis |
2aa80 | 74 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e | t',.null,.InputOption::VALUE_NON |
2aaa0 | 45 2c 20 27 46 6f 72 63 65 73 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 66 72 6f 6d 20 70 61 63 | E,.'Forces.installation.from.pac |
2aac0 | 6b 61 67 65 20 64 69 73 74 20 28 64 65 66 61 75 6c 74 20 62 65 68 61 76 69 6f 72 29 2e 27 29 2c | kage.dist.(default.behavior).'), |
2aae0 | 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 70 72 65 66 65 72 2d 69 6e 73 74 61 6c 6c | .new.InputOption('prefer-install |
2ab00 | 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 52 45 51 55 | ',.null,.InputOption::VALUE_REQU |
2ab20 | 49 52 45 44 2c 20 27 46 6f 72 63 65 73 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 66 72 6f 6d 20 | IRED,.'Forces.installation.from. |
2ab40 | 70 61 63 6b 61 67 65 20 64 69 73 74 7c 73 6f 75 72 63 65 7c 61 75 74 6f 20 28 61 75 74 6f 20 63 | package.dist|source|auto.(auto.c |
2ab60 | 68 6f 6f 73 65 73 20 73 6f 75 72 63 65 20 66 6f 72 20 64 65 76 20 76 65 72 73 69 6f 6e 73 2c 20 | hooses.source.for.dev.versions,. |
2ab80 | 64 69 73 74 20 66 6f 72 20 74 68 65 20 72 65 73 74 29 2e 27 2c 20 6e 75 6c 6c 2c 20 24 74 68 69 | dist.for.the.rest).',.null,.$thi |
2aba0 | 73 2d 3e 73 75 67 67 65 73 74 50 72 65 66 65 72 49 6e 73 74 61 6c 6c 28 29 29 2c 0a 6e 65 77 20 | s->suggestPreferInstall()),.new. |
2abc0 | 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 72 65 70 6f 73 69 74 6f 72 79 27 2c 20 6e 75 6c 6c 2c 20 | InputOption('repository',.null,. |
2abe0 | 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 52 45 51 55 49 52 45 44 20 7c 20 49 6e | InputOption::VALUE_REQUIRED.|.In |
2ac00 | 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 49 53 5f 41 52 52 41 59 2c 20 27 41 64 64 20 | putOption::VALUE_IS_ARRAY,.'Add. |
2ac20 | 63 75 73 74 6f 6d 20 72 65 70 6f 73 69 74 6f 72 69 65 73 20 74 6f 20 6c 6f 6f 6b 20 74 68 65 20 | custom.repositories.to.look.the. |
2ac40 | 70 61 63 6b 61 67 65 20 75 70 2c 20 65 69 74 68 65 72 20 62 79 20 55 52 4c 20 6f 72 20 75 73 69 | package.up,.either.by.URL.or.usi |
2ac60 | 6e 67 20 4a 53 4f 4e 20 61 72 72 61 79 73 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f | ng.JSON.arrays'),.new.InputOptio |
2ac80 | 6e 28 27 72 65 70 6f 73 69 74 6f 72 79 2d 75 72 6c 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f | n('repository-url',.null,.InputO |
2aca0 | 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 52 45 51 55 49 52 45 44 2c 20 27 44 45 50 52 45 43 41 54 | ption::VALUE_REQUIRED,.'DEPRECAT |
2acc0 | 45 44 3a 20 55 73 65 20 2d 2d 72 65 70 6f 73 69 74 6f 72 79 20 69 6e 73 74 65 61 64 2e 27 29 2c | ED:.Use.--repository.instead.'), |
2ace0 | 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 61 64 64 2d 72 65 70 6f 73 69 74 6f 72 79 | .new.InputOption('add-repository |
2ad00 | 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 | ',.null,.InputOption::VALUE_NONE |
2ad20 | 2c 20 27 41 64 64 20 74 68 65 20 63 75 73 74 6f 6d 20 72 65 70 6f 73 69 74 6f 72 79 20 69 6e 20 | ,.'Add.the.custom.repository.in. |
2ad40 | 74 68 65 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 2e 20 49 66 20 61 20 6c 6f 63 6b 20 66 69 6c | the.composer.json..If.a.lock.fil |
2ad60 | 65 20 69 73 20 70 72 65 73 65 6e 74 20 69 74 20 77 69 6c 6c 20 62 65 20 64 65 6c 65 74 65 64 20 | e.is.present.it.will.be.deleted. |
2ad80 | 61 6e 64 20 61 6e 20 75 70 64 61 74 65 20 77 69 6c 6c 20 62 65 20 72 75 6e 20 69 6e 73 74 65 61 | and.an.update.will.be.run.instea |
2ada0 | 64 20 6f 66 20 69 6e 73 74 61 6c 6c 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e | d.of.install.'),.new.InputOption |
2adc0 | 28 27 64 65 76 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 | ('dev',.null,.InputOption::VALUE |
2ade0 | 5f 4e 4f 4e 45 2c 20 27 45 6e 61 62 6c 65 73 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 6f 66 20 | _NONE,.'Enables.installation.of. |
2ae00 | 72 65 71 75 69 72 65 2d 64 65 76 20 70 61 63 6b 61 67 65 73 20 28 65 6e 61 62 6c 65 64 20 62 79 | require-dev.packages.(enabled.by |
2ae20 | 20 64 65 66 61 75 6c 74 2c 20 6f 6e 6c 79 20 70 72 65 73 65 6e 74 20 66 6f 72 20 42 43 29 2e 27 | .default,.only.present.for.BC).' |
2ae40 | 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 64 65 76 27 2c 20 6e 75 6c | ),.new.InputOption('no-dev',.nul |
2ae60 | 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 44 69 73 | l,.InputOption::VALUE_NONE,.'Dis |
2ae80 | 61 62 6c 65 73 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 6f 66 20 72 65 71 75 69 72 65 2d 64 65 | ables.installation.of.require-de |
2aea0 | 76 20 70 61 63 6b 61 67 65 73 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 | v.packages.'),.new.InputOption(' |
2aec0 | 6e 6f 2d 63 75 73 74 6f 6d 2d 69 6e 73 74 61 6c 6c 65 72 73 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 | no-custom-installers',.null,.Inp |
2aee0 | 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 44 45 50 52 45 43 41 54 45 | utOption::VALUE_NONE,.'DEPRECATE |
2af00 | 44 3a 20 55 73 65 20 6e 6f 2d 70 6c 75 67 69 6e 73 20 69 6e 73 74 65 61 64 2e 27 29 2c 0a 6e 65 | D:.Use.no-plugins.instead.'),.ne |
2af20 | 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 73 63 72 69 70 74 73 27 2c 20 6e 75 6c 6c | w.InputOption('no-scripts',.null |
2af40 | 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 57 68 65 74 | ,.InputOption::VALUE_NONE,.'Whet |
2af60 | 68 65 72 20 74 6f 20 70 72 65 76 65 6e 74 20 65 78 65 63 75 74 69 6f 6e 20 6f 66 20 61 6c 6c 20 | her.to.prevent.execution.of.all. |
2af80 | 64 65 66 69 6e 65 64 20 73 63 72 69 70 74 73 20 69 6e 20 74 68 65 20 72 6f 6f 74 20 70 61 63 6b | defined.scripts.in.the.root.pack |
2afa0 | 61 67 65 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 70 72 6f 67 | age.'),.new.InputOption('no-prog |
2afc0 | 72 65 73 73 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f | ress',.null,.InputOption::VALUE_ |
2afe0 | 4e 4f 4e 45 2c 20 27 44 6f 20 6e 6f 74 20 6f 75 74 70 75 74 20 64 6f 77 6e 6c 6f 61 64 20 70 72 | NONE,.'Do.not.output.download.pr |
2b000 | 6f 67 72 65 73 73 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 73 | ogress.'),.new.InputOption('no-s |
2b020 | 65 63 75 72 65 2d 68 74 74 70 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a | ecure-http',.null,.InputOption:: |
2b040 | 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 44 69 73 61 62 6c 65 20 74 68 65 20 73 65 63 75 72 65 2d | VALUE_NONE,.'Disable.the.secure- |
2b060 | 68 74 74 70 20 63 6f 6e 66 69 67 20 6f 70 74 69 6f 6e 20 74 65 6d 70 6f 72 61 72 69 6c 79 20 77 | http.config.option.temporarily.w |
2b080 | 68 69 6c 65 20 69 6e 73 74 61 6c 6c 69 6e 67 20 74 68 65 20 72 6f 6f 74 20 70 61 63 6b 61 67 65 | hile.installing.the.root.package |
2b0a0 | 2e 20 55 73 65 20 61 74 20 79 6f 75 72 20 6f 77 6e 20 72 69 73 6b 2e 20 55 73 69 6e 67 20 74 68 | ..Use.at.your.own.risk..Using.th |
2b0c0 | 69 73 20 66 6c 61 67 20 69 73 20 61 20 62 61 64 20 69 64 65 61 2e 27 29 2c 0a 6e 65 77 20 49 6e | is.flag.is.a.bad.idea.'),.new.In |
2b0e0 | 70 75 74 4f 70 74 69 6f 6e 28 27 6b 65 65 70 2d 76 63 73 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 | putOption('keep-vcs',.null,.Inpu |
2b100 | 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 57 68 65 74 68 65 72 20 74 6f | tOption::VALUE_NONE,.'Whether.to |
2b120 | 20 70 72 65 76 65 6e 74 20 64 65 6c 65 74 69 6e 67 20 74 68 65 20 76 63 73 20 66 6f 6c 64 65 72 | .prevent.deleting.the.vcs.folder |
2b140 | 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 72 65 6d 6f 76 65 2d 76 63 73 | .'),.new.InputOption('remove-vcs |
2b160 | 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 | ',.null,.InputOption::VALUE_NONE |
2b180 | 2c 20 27 57 68 65 74 68 65 72 20 74 6f 20 66 6f 72 63 65 20 64 65 6c 65 74 69 6f 6e 20 6f 66 20 | ,.'Whether.to.force.deletion.of. |
2b1a0 | 74 68 65 20 76 63 73 20 66 6f 6c 64 65 72 20 77 69 74 68 6f 75 74 20 70 72 6f 6d 70 74 69 6e 67 | the.vcs.folder.without.prompting |
2b1c0 | 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 69 6e 73 74 61 6c 6c | .'),.new.InputOption('no-install |
2b1e0 | 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 | ',.null,.InputOption::VALUE_NONE |
2b200 | 2c 20 27 57 68 65 74 68 65 72 20 74 6f 20 73 6b 69 70 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 | ,.'Whether.to.skip.installation. |
2b220 | 6f 66 20 74 68 65 20 70 61 63 6b 61 67 65 20 64 65 70 65 6e 64 65 6e 63 69 65 73 2e 27 29 2c 0a | of.the.package.dependencies.'),. |
2b240 | 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 61 75 64 69 74 27 2c 20 6e 75 6c 6c | new.InputOption('no-audit',.null |
2b260 | 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 57 68 65 74 | ,.InputOption::VALUE_NONE,.'Whet |
2b280 | 68 65 72 20 74 6f 20 73 6b 69 70 20 61 75 64 69 74 69 6e 67 20 6f 66 20 74 68 65 20 69 6e 73 74 | her.to.skip.auditing.of.the.inst |
2b2a0 | 61 6c 6c 65 64 20 70 61 63 6b 61 67 65 20 64 65 70 65 6e 64 65 6e 63 69 65 73 20 28 63 61 6e 20 | alled.package.dependencies.(can. |
2b2c0 | 61 6c 73 6f 20 62 65 20 73 65 74 20 76 69 61 20 74 68 65 20 43 4f 4d 50 4f 53 45 52 5f 4e 4f 5f | also.be.set.via.the.COMPOSER_NO_ |
2b2e0 | 41 55 44 49 54 3d 31 20 65 6e 76 20 76 61 72 29 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 | AUDIT=1.env.var).'),.new.InputOp |
2b300 | 74 69 6f 6e 28 27 61 75 64 69 74 2d 66 6f 72 6d 61 74 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 | tion('audit-format',.null,.Input |
2b320 | 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 52 45 51 55 49 52 45 44 2c 20 27 41 75 64 69 74 20 6f | Option::VALUE_REQUIRED,.'Audit.o |
2b340 | 75 74 70 75 74 20 66 6f 72 6d 61 74 2e 20 4d 75 73 74 20 62 65 20 22 74 61 62 6c 65 22 2c 20 22 | utput.format..Must.be."table",." |
2b360 | 70 6c 61 69 6e 22 2c 20 22 6a 73 6f 6e 22 20 6f 72 20 22 73 75 6d 6d 61 72 79 22 2e 27 2c 20 41 | plain",."json".or."summary".',.A |
2b380 | 75 64 69 74 6f 72 3a 3a 46 4f 52 4d 41 54 5f 53 55 4d 4d 41 52 59 2c 20 41 75 64 69 74 6f 72 3a | uditor::FORMAT_SUMMARY,.Auditor: |
2b3a0 | 3a 46 4f 52 4d 41 54 53 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 69 67 6e 6f | :FORMATS),.new.InputOption('igno |
2b3c0 | 72 65 2d 70 6c 61 74 66 6f 72 6d 2d 72 65 71 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 | re-platform-req',.null,.InputOpt |
2b3e0 | 69 6f 6e 3a 3a 56 41 4c 55 45 5f 52 45 51 55 49 52 45 44 20 7c 20 49 6e 70 75 74 4f 70 74 69 6f | ion::VALUE_REQUIRED.|.InputOptio |
2b400 | 6e 3a 3a 56 41 4c 55 45 5f 49 53 5f 41 52 52 41 59 2c 20 27 49 67 6e 6f 72 65 20 61 20 73 70 65 | n::VALUE_IS_ARRAY,.'Ignore.a.spe |
2b420 | 63 69 66 69 63 20 70 6c 61 74 66 6f 72 6d 20 72 65 71 75 69 72 65 6d 65 6e 74 20 28 70 68 70 20 | cific.platform.requirement.(php. |
2b440 | 26 20 65 78 74 2d 20 70 61 63 6b 61 67 65 73 29 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 | &.ext-.packages).'),.new.InputOp |
2b460 | 74 69 6f 6e 28 27 69 67 6e 6f 72 65 2d 70 6c 61 74 66 6f 72 6d 2d 72 65 71 73 27 2c 20 6e 75 6c | tion('ignore-platform-reqs',.nul |
2b480 | 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 49 67 6e | l,.InputOption::VALUE_NONE,.'Ign |
2b4a0 | 6f 72 65 20 61 6c 6c 20 70 6c 61 74 66 6f 72 6d 20 72 65 71 75 69 72 65 6d 65 6e 74 73 20 28 70 | ore.all.platform.requirements.(p |
2b4c0 | 68 70 20 26 20 65 78 74 2d 20 70 61 63 6b 61 67 65 73 29 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 | hp.&.ext-.packages).'),.new.Inpu |
2b4e0 | 74 4f 70 74 69 6f 6e 28 27 61 73 6b 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e | tOption('ask',.null,.InputOption |
2b500 | 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 57 68 65 74 68 65 72 20 74 6f 20 61 73 6b 20 66 6f | ::VALUE_NONE,.'Whether.to.ask.fo |
2b520 | 72 20 70 72 6f 6a 65 63 74 20 64 69 72 65 63 74 6f 72 79 2e 27 29 2c 0a 5d 29 0a 2d 3e 73 65 74 | r.project.directory.'),.]).->set |
2b540 | 48 65 6c 70 28 0a 3c 3c 3c 45 4f 54 0a 54 68 65 20 3c 69 6e 66 6f 3e 63 72 65 61 74 65 2d 70 72 | Help(.<<<EOT.The.<info>create-pr |
2b560 | 6f 6a 65 63 74 3c 2f 69 6e 66 6f 3e 20 63 6f 6d 6d 61 6e 64 20 63 72 65 61 74 65 73 20 61 20 6e | oject</info>.command.creates.a.n |
2b580 | 65 77 20 70 72 6f 6a 65 63 74 20 66 72 6f 6d 20 61 20 67 69 76 65 6e 0a 70 61 63 6b 61 67 65 20 | ew.project.from.a.given.package. |
2b5a0 | 69 6e 74 6f 20 61 20 6e 65 77 20 64 69 72 65 63 74 6f 72 79 2e 20 49 66 20 65 78 65 63 75 74 65 | into.a.new.directory..If.execute |
2b5c0 | 64 20 77 69 74 68 6f 75 74 20 70 61 72 61 6d 73 20 61 6e 64 20 69 6e 20 61 20 64 69 72 65 63 74 | d.without.params.and.in.a.direct |
2b5e0 | 6f 72 79 0a 77 69 74 68 20 61 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 20 66 69 6c 65 20 69 74 | ory.with.a.composer.json.file.it |
2b600 | 20 69 6e 73 74 61 6c 6c 73 20 74 68 65 20 70 61 63 6b 61 67 65 73 20 66 6f 72 20 74 68 65 20 63 | .installs.the.packages.for.the.c |
2b620 | 75 72 72 65 6e 74 20 70 72 6f 6a 65 63 74 2e 0a 0a 59 6f 75 20 63 61 6e 20 75 73 65 20 74 68 69 | urrent.project...You.can.use.thi |
2b640 | 73 20 63 6f 6d 6d 61 6e 64 20 74 6f 20 62 6f 6f 74 73 74 72 61 70 20 6e 65 77 20 70 72 6f 6a 65 | s.command.to.bootstrap.new.proje |
2b660 | 63 74 73 20 6f 72 20 73 65 74 75 70 20 61 20 63 6c 65 61 6e 0a 76 65 72 73 69 6f 6e 2d 63 6f 6e | cts.or.setup.a.clean.version-con |
2b680 | 74 72 6f 6c 6c 65 64 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 66 6f 72 20 64 65 76 65 6c 6f 70 | trolled.installation.for.develop |
2b6a0 | 65 72 73 20 6f 66 20 79 6f 75 72 20 70 72 6f 6a 65 63 74 2e 0a 0a 3c 69 6e 66 6f 3e 70 68 70 20 | ers.of.your.project...<info>php. |
2b6c0 | 63 6f 6d 70 6f 73 65 72 2e 70 68 61 72 20 63 72 65 61 74 65 2d 70 72 6f 6a 65 63 74 20 76 65 6e | composer.phar.create-project.ven |
2b6e0 | 64 6f 72 2f 70 72 6f 6a 65 63 74 20 74 61 72 67 65 74 2d 64 69 72 65 63 74 6f 72 79 20 5b 76 65 | dor/project.target-directory.[ve |
2b700 | 72 73 69 6f 6e 5d 3c 2f 69 6e 66 6f 3e 0a 0a 59 6f 75 20 63 61 6e 20 61 6c 73 6f 20 73 70 65 63 | rsion]</info>..You.can.also.spec |
2b720 | 69 66 79 20 74 68 65 20 76 65 72 73 69 6f 6e 20 77 69 74 68 20 74 68 65 20 70 61 63 6b 61 67 65 | ify.the.version.with.the.package |
2b740 | 20 6e 61 6d 65 20 75 73 69 6e 67 20 3d 20 6f 72 20 3a 20 61 73 20 73 65 70 61 72 61 74 6f 72 2e | .name.using.=.or.:.as.separator. |
2b760 | 0a 0a 3c 69 6e 66 6f 3e 70 68 70 20 63 6f 6d 70 6f 73 65 72 2e 70 68 61 72 20 63 72 65 61 74 65 | ..<info>php.composer.phar.create |
2b780 | 2d 70 72 6f 6a 65 63 74 20 76 65 6e 64 6f 72 2f 70 72 6f 6a 65 63 74 3a 76 65 72 73 69 6f 6e 20 | -project.vendor/project:version. |
2b7a0 | 74 61 72 67 65 74 2d 64 69 72 65 63 74 6f 72 79 3c 2f 69 6e 66 6f 3e 0a 0a 54 6f 20 69 6e 73 74 | target-directory</info>..To.inst |
2b7c0 | 61 6c 6c 20 75 6e 73 74 61 62 6c 65 20 70 61 63 6b 61 67 65 73 2c 20 65 69 74 68 65 72 20 73 70 | all.unstable.packages,.either.sp |
2b7e0 | 65 63 69 66 79 20 74 68 65 20 76 65 72 73 69 6f 6e 20 79 6f 75 20 77 61 6e 74 2c 20 6f 72 20 75 | ecify.the.version.you.want,.or.u |
2b800 | 73 65 20 74 68 65 0a 2d 2d 73 74 61 62 69 6c 69 74 79 3d 64 65 76 20 28 77 68 65 72 65 20 64 65 | se.the.--stability=dev.(where.de |
2b820 | 76 20 63 61 6e 20 62 65 20 6f 6e 65 20 6f 66 20 52 43 2c 20 62 65 74 61 2c 20 61 6c 70 68 61 20 | v.can.be.one.of.RC,.beta,.alpha. |
2b840 | 6f 72 20 64 65 76 29 2e 0a 0a 54 6f 20 73 65 74 75 70 20 61 20 64 65 76 65 6c 6f 70 65 72 20 77 | or.dev)...To.setup.a.developer.w |
2b860 | 6f 72 6b 61 62 6c 65 20 76 65 72 73 69 6f 6e 20 79 6f 75 20 73 68 6f 75 6c 64 20 63 72 65 61 74 | orkable.version.you.should.creat |
2b880 | 65 20 74 68 65 20 70 72 6f 6a 65 63 74 20 75 73 69 6e 67 20 74 68 65 20 73 6f 75 72 63 65 0a 63 | e.the.project.using.the.source.c |
2b8a0 | 6f 6e 74 72 6f 6c 6c 65 64 20 63 6f 64 65 20 62 79 20 61 70 70 65 6e 64 69 6e 67 20 74 68 65 20 | ontrolled.code.by.appending.the. |
2b8c0 | 3c 69 6e 66 6f 3e 27 2d 2d 70 72 65 66 65 72 2d 73 6f 75 72 63 65 27 3c 2f 69 6e 66 6f 3e 20 66 | <info>'--prefer-source'</info>.f |
2b8e0 | 6c 61 67 2e 0a 0a 54 6f 20 69 6e 73 74 61 6c 6c 20 61 20 70 61 63 6b 61 67 65 20 66 72 6f 6d 20 | lag...To.install.a.package.from. |
2b900 | 61 6e 6f 74 68 65 72 20 72 65 70 6f 73 69 74 6f 72 79 20 74 68 61 6e 20 74 68 65 20 64 65 66 61 | another.repository.than.the.defa |
2b920 | 75 6c 74 20 6f 6e 65 20 79 6f 75 0a 63 61 6e 20 70 61 73 73 20 74 68 65 20 3c 69 6e 66 6f 3e 27 | ult.one.you.can.pass.the.<info>' |
2b940 | 2d 2d 72 65 70 6f 73 69 74 6f 72 79 3d 68 74 74 70 73 3a 2f 2f 6d 79 72 65 70 6f 73 69 74 6f 72 | --repository=https://myrepositor |
2b960 | 79 2e 6f 72 67 27 3c 2f 69 6e 66 6f 3e 20 66 6c 61 67 2e 0a 0a 52 65 61 64 20 6d 6f 72 65 20 61 | y.org'</info>.flag...Read.more.a |
2b980 | 74 20 68 74 74 70 73 3a 2f 2f 67 65 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 67 2f 64 6f 63 2f 30 33 | t.https://getcomposer.org/doc/03 |
2b9a0 | 2d 63 6c 69 2e 6d 64 23 63 72 65 61 74 65 2d 70 72 6f 6a 65 63 74 0a 45 4f 54 0a 29 0a 3b 0a 7d | -cli.md#create-project.EOT.).;.} |
2b9c0 | 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 65 78 65 63 75 74 65 28 49 6e 70 | ..protected.function.execute(Inp |
2b9e0 | 75 74 49 6e 74 65 72 66 61 63 65 20 24 69 6e 70 75 74 2c 20 4f 75 74 70 75 74 49 6e 74 65 72 66 | utInterface.$input,.OutputInterf |
2ba00 | 61 63 65 20 24 6f 75 74 70 75 74 29 3a 20 69 6e 74 0a 7b 0a 24 63 6f 6e 66 69 67 20 3d 20 46 61 | ace.$output):.int.{.$config.=.Fa |
2ba20 | 63 74 6f 72 79 3a 3a 63 72 65 61 74 65 43 6f 6e 66 69 67 28 29 3b 0a 24 69 6f 20 3d 20 24 74 68 | ctory::createConfig();.$io.=.$th |
2ba40 | 69 73 2d 3e 67 65 74 49 4f 28 29 3b 0a 0a 5b 24 70 72 65 66 65 72 53 6f 75 72 63 65 2c 20 24 70 | is->getIO();..[$preferSource,.$p |
2ba60 | 72 65 66 65 72 44 69 73 74 5d 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 50 72 65 66 65 72 72 65 64 | referDist].=.$this->getPreferred |
2ba80 | 49 6e 73 74 61 6c 6c 4f 70 74 69 6f 6e 73 28 24 63 6f 6e 66 69 67 2c 20 24 69 6e 70 75 74 2c 20 | InstallOptions($config,.$input,. |
2baa0 | 74 72 75 65 29 3b 0a 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 64 | true);..if.($input->getOption('d |
2bac0 | 65 76 27 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 77 61 72 6e 69 6e | ev')).{.$io->writeError('<warnin |
2bae0 | 67 3e 59 6f 75 20 61 72 65 20 75 73 69 6e 67 20 74 68 65 20 64 65 70 72 65 63 61 74 65 64 20 6f | g>You.are.using.the.deprecated.o |
2bb00 | 70 74 69 6f 6e 20 22 64 65 76 22 2e 20 44 65 76 20 70 61 63 6b 61 67 65 73 20 61 72 65 20 69 6e | ption."dev"..Dev.packages.are.in |
2bb20 | 73 74 61 6c 6c 65 64 20 62 79 20 64 65 66 61 75 6c 74 20 6e 6f 77 2e 3c 2f 77 61 72 6e 69 6e 67 | stalled.by.default.now.</warning |
2bb40 | 3e 27 29 3b 0a 7d 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6e 6f | >');.}.if.($input->getOption('no |
2bb60 | 2d 63 75 73 74 6f 6d 2d 69 6e 73 74 61 6c 6c 65 72 73 27 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 | -custom-installers')).{.$io->wri |
2bb80 | 74 65 45 72 72 6f 72 28 27 3c 77 61 72 6e 69 6e 67 3e 59 6f 75 20 61 72 65 20 75 73 69 6e 67 20 | teError('<warning>You.are.using. |
2bba0 | 74 68 65 20 64 65 70 72 65 63 61 74 65 64 20 6f 70 74 69 6f 6e 20 22 6e 6f 2d 63 75 73 74 6f 6d | the.deprecated.option."no-custom |
2bbc0 | 2d 69 6e 73 74 61 6c 6c 65 72 73 22 2e 20 55 73 65 20 22 6e 6f 2d 70 6c 75 67 69 6e 73 22 20 69 | -installers"..Use."no-plugins".i |
2bbe0 | 6e 73 74 65 61 64 2e 3c 2f 77 61 72 6e 69 6e 67 3e 27 29 3b 0a 24 69 6e 70 75 74 2d 3e 73 65 74 | nstead.</warning>');.$input->set |
2bc00 | 4f 70 74 69 6f 6e 28 27 6e 6f 2d 70 6c 75 67 69 6e 73 27 2c 20 74 72 75 65 29 3b 0a 7d 0a 0a 69 | Option('no-plugins',.true);.}..i |
2bc20 | 66 20 28 24 69 6e 70 75 74 2d 3e 69 73 49 6e 74 65 72 61 63 74 69 76 65 28 29 20 26 26 20 24 69 | f.($input->isInteractive().&&.$i |
2bc40 | 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 61 73 6b 27 29 29 20 7b 0a 24 70 61 63 6b 61 | nput->getOption('ask')).{.$packa |
2bc60 | 67 65 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 41 72 67 75 6d 65 6e 74 28 27 70 61 63 6b 61 67 | ge.=.$input->getArgument('packag |
2bc80 | 65 27 29 3b 0a 69 66 20 28 6e 75 6c 6c 20 3d 3d 3d 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 74 68 | e');.if.(null.===.$package).{.th |
2bca0 | 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 4e 6f 74 20 65 | row.new.\RuntimeException('Not.e |
2bcc0 | 6e 6f 75 67 68 20 61 72 67 75 6d 65 6e 74 73 20 28 6d 69 73 73 69 6e 67 3a 20 22 70 61 63 6b 61 | nough.arguments.(missing:."packa |
2bce0 | 67 65 22 29 2e 27 29 3b 0a 7d 0a 24 70 61 72 74 73 20 3d 20 65 78 70 6c 6f 64 65 28 22 2f 22 2c | ge").');.}.$parts.=.explode("/", |
2bd00 | 20 73 74 72 74 6f 6c 6f 77 65 72 28 24 70 61 63 6b 61 67 65 29 2c 20 32 29 3b 0a 24 69 6e 70 75 | .strtolower($package),.2);.$inpu |
2bd20 | 74 2d 3e 73 65 74 41 72 67 75 6d 65 6e 74 28 27 64 69 72 65 63 74 6f 72 79 27 2c 20 24 69 6f 2d | t->setArgument('directory',.$io- |
2bd40 | 3e 61 73 6b 28 27 4e 65 77 20 70 72 6f 6a 65 63 74 20 64 69 72 65 63 74 6f 72 79 20 5b 3c 63 6f | >ask('New.project.directory.[<co |
2bd60 | 6d 6d 65 6e 74 3e 27 2e 61 72 72 61 79 5f 70 6f 70 28 24 70 61 72 74 73 29 2e 27 3c 2f 63 6f 6d | mment>'.array_pop($parts).'</com |
2bd80 | 6d 65 6e 74 3e 5d 3a 20 27 29 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 69 6e | ment>]:.'));.}..return.$this->in |
2bda0 | 73 74 61 6c 6c 50 72 6f 6a 65 63 74 28 0a 24 69 6f 2c 0a 24 63 6f 6e 66 69 67 2c 0a 24 69 6e 70 | stallProject(.$io,.$config,.$inp |
2bdc0 | 75 74 2c 0a 24 69 6e 70 75 74 2d 3e 67 65 74 41 72 67 75 6d 65 6e 74 28 27 70 61 63 6b 61 67 65 | ut,.$input->getArgument('package |
2bde0 | 27 29 2c 0a 24 69 6e 70 75 74 2d 3e 67 65 74 41 72 67 75 6d 65 6e 74 28 27 64 69 72 65 63 74 6f | '),.$input->getArgument('directo |
2be00 | 72 79 27 29 2c 0a 24 69 6e 70 75 74 2d 3e 67 65 74 41 72 67 75 6d 65 6e 74 28 27 76 65 72 73 69 | ry'),.$input->getArgument('versi |
2be20 | 6f 6e 27 29 2c 0a 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 73 74 61 62 69 6c 69 | on'),.$input->getOption('stabili |
2be40 | 74 79 27 29 2c 0a 24 70 72 65 66 65 72 53 6f 75 72 63 65 2c 0a 24 70 72 65 66 65 72 44 69 73 74 | ty'),.$preferSource,.$preferDist |
2be60 | 2c 0a 21 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 64 65 76 27 29 2c 0a | ,.!$input->getOption('no-dev'),. |
2be80 | 5c 63 6f 75 6e 74 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 72 65 70 6f 73 69 | \count($input->getOption('reposi |
2bea0 | 74 6f 72 79 27 29 29 20 3e 20 30 20 3f 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 | tory')).>.0.?.$input->getOption( |
2bec0 | 27 72 65 70 6f 73 69 74 6f 72 79 27 29 20 3a 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f | 'repository').:.$input->getOptio |
2bee0 | 6e 28 27 72 65 70 6f 73 69 74 6f 72 79 2d 75 72 6c 27 29 2c 0a 24 69 6e 70 75 74 2d 3e 67 65 74 | n('repository-url'),.$input->get |
2bf00 | 4f 70 74 69 6f 6e 28 27 6e 6f 2d 70 6c 75 67 69 6e 73 27 29 2c 0a 24 69 6e 70 75 74 2d 3e 67 65 | Option('no-plugins'),.$input->ge |
2bf20 | 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 73 63 72 69 70 74 73 27 29 2c 0a 24 69 6e 70 75 74 2d 3e 67 | tOption('no-scripts'),.$input->g |
2bf40 | 65 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 70 72 6f 67 72 65 73 73 27 29 2c 0a 24 69 6e 70 75 74 2d | etOption('no-progress'),.$input- |
2bf60 | 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 69 6e 73 74 61 6c 6c 27 29 2c 0a 24 74 68 69 73 2d | >getOption('no-install'),.$this- |
2bf80 | 3e 67 65 74 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 28 24 69 | >getPlatformRequirementFilter($i |
2bfa0 | 6e 70 75 74 29 2c 0a 21 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 73 65 | nput),.!$input->getOption('no-se |
2bfc0 | 63 75 72 65 2d 68 74 74 70 27 29 2c 0a 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 | cure-http'),.$input->getOption(' |
2bfe0 | 61 64 64 2d 72 65 70 6f 73 69 74 6f 72 79 27 29 0a 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c | add-repository').);.}.......publ |
2c000 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 6e 73 74 61 6c 6c 50 72 6f 6a 65 63 74 28 49 4f 49 6e 74 | ic.function.installProject(IOInt |
2c020 | 65 72 66 61 63 65 20 24 69 6f 2c 20 43 6f 6e 66 69 67 20 24 63 6f 6e 66 69 67 2c 20 49 6e 70 75 | erface.$io,.Config.$config,.Inpu |
2c040 | 74 49 6e 74 65 72 66 61 63 65 20 24 69 6e 70 75 74 2c 20 3f 73 74 72 69 6e 67 20 24 70 61 63 6b | tInterface.$input,.?string.$pack |
2c060 | 61 67 65 4e 61 6d 65 20 3d 20 6e 75 6c 6c 2c 20 3f 73 74 72 69 6e 67 20 24 64 69 72 65 63 74 6f | ageName.=.null,.?string.$directo |
2c080 | 72 79 20 3d 20 6e 75 6c 6c 2c 20 3f 73 74 72 69 6e 67 20 24 70 61 63 6b 61 67 65 56 65 72 73 69 | ry.=.null,.?string.$packageVersi |
2c0a0 | 6f 6e 20 3d 20 6e 75 6c 6c 2c 20 3f 73 74 72 69 6e 67 20 24 73 74 61 62 69 6c 69 74 79 20 3d 20 | on.=.null,.?string.$stability.=. |
2c0c0 | 27 73 74 61 62 6c 65 27 2c 20 62 6f 6f 6c 20 24 70 72 65 66 65 72 53 6f 75 72 63 65 20 3d 20 66 | 'stable',.bool.$preferSource.=.f |
2c0e0 | 61 6c 73 65 2c 20 62 6f 6f 6c 20 24 70 72 65 66 65 72 44 69 73 74 20 3d 20 66 61 6c 73 65 2c 20 | alse,.bool.$preferDist.=.false,. |
2c100 | 62 6f 6f 6c 20 24 69 6e 73 74 61 6c 6c 44 65 76 50 61 63 6b 61 67 65 73 20 3d 20 66 61 6c 73 65 | bool.$installDevPackages.=.false |
2c120 | 2c 20 24 72 65 70 6f 73 69 74 6f 72 69 65 73 20 3d 20 6e 75 6c 6c 2c 20 62 6f 6f 6c 20 24 64 69 | ,.$repositories.=.null,.bool.$di |
2c140 | 73 61 62 6c 65 50 6c 75 67 69 6e 73 20 3d 20 66 61 6c 73 65 2c 20 62 6f 6f 6c 20 24 64 69 73 61 | sablePlugins.=.false,.bool.$disa |
2c160 | 62 6c 65 53 63 72 69 70 74 73 20 3d 20 66 61 6c 73 65 2c 20 62 6f 6f 6c 20 24 6e 6f 50 72 6f 67 | bleScripts.=.false,.bool.$noProg |
2c180 | 72 65 73 73 20 3d 20 66 61 6c 73 65 2c 20 62 6f 6f 6c 20 24 6e 6f 49 6e 73 74 61 6c 6c 20 3d 20 | ress.=.false,.bool.$noInstall.=. |
2c1a0 | 66 61 6c 73 65 2c 20 3f 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 | false,.?PlatformRequirementFilte |
2c1c0 | 72 49 6e 74 65 72 66 61 63 65 20 24 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 | rInterface.$platformRequirementF |
2c1e0 | 69 6c 74 65 72 20 3d 20 6e 75 6c 6c 2c 20 62 6f 6f 6c 20 24 73 65 63 75 72 65 48 74 74 70 20 3d | ilter.=.null,.bool.$secureHttp.= |
2c200 | 20 74 72 75 65 2c 20 62 6f 6f 6c 20 24 61 64 64 52 65 70 6f 73 69 74 6f 72 79 20 3d 20 66 61 6c | .true,.bool.$addRepository.=.fal |
2c220 | 73 65 29 3a 20 69 6e 74 0a 7b 0a 24 6f 6c 64 43 77 64 20 3d 20 50 6c 61 74 66 6f 72 6d 3a 3a 67 | se):.int.{.$oldCwd.=.Platform::g |
2c240 | 65 74 43 77 64 28 29 3b 0a 0a 69 66 20 28 24 72 65 70 6f 73 69 74 6f 72 69 65 73 20 21 3d 3d 20 | etCwd();..if.($repositories.!==. |
2c260 | 6e 75 6c 6c 20 26 26 20 21 69 73 5f 61 72 72 61 79 28 24 72 65 70 6f 73 69 74 6f 72 69 65 73 29 | null.&&.!is_array($repositories) |
2c280 | 29 20 7b 0a 24 72 65 70 6f 73 69 74 6f 72 69 65 73 20 3d 20 28 61 72 72 61 79 29 20 24 72 65 70 | ).{.$repositories.=.(array).$rep |
2c2a0 | 6f 73 69 74 6f 72 69 65 73 3b 0a 7d 0a 0a 24 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 | ositories;.}..$platformRequireme |
2c2c0 | 6e 74 46 69 6c 74 65 72 20 3d 20 24 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 | ntFilter.=.$platformRequirementF |
2c2e0 | 69 6c 74 65 72 20 3f 3f 20 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 | ilter.??.PlatformRequirementFilt |
2c300 | 65 72 46 61 63 74 6f 72 79 3a 3a 69 67 6e 6f 72 65 4e 6f 74 68 69 6e 67 28 29 3b 0a 0a 0a 24 69 | erFactory::ignoreNothing();...$i |
2c320 | 6f 2d 3e 6c 6f 61 64 43 6f 6e 66 69 67 75 72 61 74 69 6f 6e 28 24 63 6f 6e 66 69 67 29 3b 0a 0a | o->loadConfiguration($config);.. |
2c340 | 24 74 68 69 73 2d 3e 73 75 67 67 65 73 74 65 64 50 61 63 6b 61 67 65 73 52 65 70 6f 72 74 65 72 | $this->suggestedPackagesReporter |
2c360 | 20 3d 20 6e 65 77 20 53 75 67 67 65 73 74 65 64 50 61 63 6b 61 67 65 73 52 65 70 6f 72 74 65 72 | .=.new.SuggestedPackagesReporter |
2c380 | 28 24 69 6f 29 3b 0a 0a 69 66 20 28 24 70 61 63 6b 61 67 65 4e 61 6d 65 20 21 3d 3d 20 6e 75 6c | ($io);..if.($packageName.!==.nul |
2c3a0 | 6c 29 20 7b 0a 24 69 6e 73 74 61 6c 6c 65 64 46 72 6f 6d 56 63 73 20 3d 20 24 74 68 69 73 2d 3e | l).{.$installedFromVcs.=.$this-> |
2c3c0 | 69 6e 73 74 61 6c 6c 52 6f 6f 74 50 61 63 6b 61 67 65 28 24 69 6f 2c 20 24 63 6f 6e 66 69 67 2c | installRootPackage($io,.$config, |
2c3e0 | 20 24 70 61 63 6b 61 67 65 4e 61 6d 65 2c 20 24 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d | .$packageName,.$platformRequirem |
2c400 | 65 6e 74 46 69 6c 74 65 72 2c 20 24 64 69 72 65 63 74 6f 72 79 2c 20 24 70 61 63 6b 61 67 65 56 | entFilter,.$directory,.$packageV |
2c420 | 65 72 73 69 6f 6e 2c 20 24 73 74 61 62 69 6c 69 74 79 2c 20 24 70 72 65 66 65 72 53 6f 75 72 63 | ersion,.$stability,.$preferSourc |
2c440 | 65 2c 20 24 70 72 65 66 65 72 44 69 73 74 2c 20 24 69 6e 73 74 61 6c 6c 44 65 76 50 61 63 6b 61 | e,.$preferDist,.$installDevPacka |
2c460 | 67 65 73 2c 20 24 72 65 70 6f 73 69 74 6f 72 69 65 73 2c 20 24 64 69 73 61 62 6c 65 50 6c 75 67 | ges,.$repositories,.$disablePlug |
2c480 | 69 6e 73 2c 20 24 64 69 73 61 62 6c 65 53 63 72 69 70 74 73 2c 20 24 6e 6f 50 72 6f 67 72 65 73 | ins,.$disableScripts,.$noProgres |
2c4a0 | 73 2c 20 24 73 65 63 75 72 65 48 74 74 70 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 69 6e 73 74 61 | s,.$secureHttp);.}.else.{.$insta |
2c4c0 | 6c 6c 65 64 46 72 6f 6d 56 63 73 20 3d 20 66 61 6c 73 65 3b 0a 7d 0a 0a 69 66 20 28 24 72 65 70 | lledFromVcs.=.false;.}..if.($rep |
2c4e0 | 6f 73 69 74 6f 72 69 65 73 20 21 3d 3d 20 6e 75 6c 6c 20 26 26 20 24 61 64 64 52 65 70 6f 73 69 | ositories.!==.null.&&.$addReposi |
2c500 | 74 6f 72 79 20 26 26 20 69 73 5f 66 69 6c 65 28 27 63 6f 6d 70 6f 73 65 72 2e 6c 6f 63 6b 27 29 | tory.&&.is_file('composer.lock') |
2c520 | 29 20 7b 0a 75 6e 6c 69 6e 6b 28 27 63 6f 6d 70 6f 73 65 72 2e 6c 6f 63 6b 27 29 3b 0a 7d 0a 0a | ).{.unlink('composer.lock');.}.. |
2c540 | 24 63 6f 6d 70 6f 73 65 72 20 3d 20 46 61 63 74 6f 72 79 3a 3a 63 72 65 61 74 65 28 24 69 6f 2c | $composer.=.Factory::create($io, |
2c560 | 20 6e 75 6c 6c 2c 20 24 64 69 73 61 62 6c 65 50 6c 75 67 69 6e 73 2c 20 24 64 69 73 61 62 6c 65 | .null,.$disablePlugins,.$disable |
2c580 | 53 63 72 69 70 74 73 29 3b 0a 0a 0a 69 66 20 28 24 72 65 70 6f 73 69 74 6f 72 69 65 73 20 21 3d | Scripts);...if.($repositories.!= |
2c5a0 | 3d 20 6e 75 6c 6c 20 26 26 20 24 61 64 64 52 65 70 6f 73 69 74 6f 72 79 29 20 7b 0a 66 6f 72 65 | =.null.&&.$addRepository).{.fore |
2c5c0 | 61 63 68 20 28 24 72 65 70 6f 73 69 74 6f 72 69 65 73 20 61 73 20 24 69 6e 64 65 78 20 3d 3e 20 | ach.($repositories.as.$index.=>. |
2c5e0 | 24 72 65 70 6f 29 20 7b 0a 24 72 65 70 6f 43 6f 6e 66 69 67 20 3d 20 52 65 70 6f 73 69 74 6f 72 | $repo).{.$repoConfig.=.Repositor |
2c600 | 79 46 61 63 74 6f 72 79 3a 3a 63 6f 6e 66 69 67 46 72 6f 6d 53 74 72 69 6e 67 28 24 69 6f 2c 20 | yFactory::configFromString($io,. |
2c620 | 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 43 6f 6e 66 69 67 28 29 2c 20 24 72 65 70 6f 2c 20 74 | $composer->getConfig(),.$repo,.t |
2c640 | 72 75 65 29 3b 0a 24 63 6f 6d 70 6f 73 65 72 4a 73 6f 6e 52 65 70 6f 73 69 74 6f 72 69 65 73 43 | rue);.$composerJsonRepositoriesC |
2c660 | 6f 6e 66 69 67 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 43 6f 6e 66 69 67 28 29 2d 3e | onfig.=.$composer->getConfig()-> |
2c680 | 67 65 74 52 65 70 6f 73 69 74 6f 72 69 65 73 28 29 3b 0a 24 6e 61 6d 65 20 3d 20 52 65 70 6f 73 | getRepositories();.$name.=.Repos |
2c6a0 | 69 74 6f 72 79 46 61 63 74 6f 72 79 3a 3a 67 65 6e 65 72 61 74 65 52 65 70 6f 73 69 74 6f 72 79 | itoryFactory::generateRepository |
2c6c0 | 4e 61 6d 65 28 24 69 6e 64 65 78 2c 20 24 72 65 70 6f 43 6f 6e 66 69 67 2c 20 24 63 6f 6d 70 6f | Name($index,.$repoConfig,.$compo |
2c6e0 | 73 65 72 4a 73 6f 6e 52 65 70 6f 73 69 74 6f 72 69 65 73 43 6f 6e 66 69 67 29 3b 0a 24 63 6f 6e | serJsonRepositoriesConfig);.$con |
2c700 | 66 69 67 53 6f 75 72 63 65 20 3d 20 6e 65 77 20 4a 73 6f 6e 43 6f 6e 66 69 67 53 6f 75 72 63 65 | figSource.=.new.JsonConfigSource |
2c720 | 28 6e 65 77 20 4a 73 6f 6e 46 69 6c 65 28 27 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 27 29 29 3b | (new.JsonFile('composer.json')); |
2c740 | 0a 0a 69 66 20 28 0a 28 69 73 73 65 74 28 24 72 65 70 6f 43 6f 6e 66 69 67 5b 27 70 61 63 6b 61 | ..if.(.(isset($repoConfig['packa |
2c760 | 67 69 73 74 27 5d 29 20 26 26 20 24 72 65 70 6f 43 6f 6e 66 69 67 20 3d 3d 3d 20 5b 27 70 61 63 | gist']).&&.$repoConfig.===.['pac |
2c780 | 6b 61 67 69 73 74 27 20 3d 3e 20 66 61 6c 73 65 5d 29 0a 7c 7c 20 28 69 73 73 65 74 28 24 72 65 | kagist'.=>.false]).||.(isset($re |
2c7a0 | 70 6f 43 6f 6e 66 69 67 5b 27 70 61 63 6b 61 67 69 73 74 2e 6f 72 67 27 5d 29 20 26 26 20 24 72 | poConfig['packagist.org']).&&.$r |
2c7c0 | 65 70 6f 43 6f 6e 66 69 67 20 3d 3d 3d 20 5b 27 70 61 63 6b 61 67 69 73 74 2e 6f 72 67 27 20 3d | epoConfig.===.['packagist.org'.= |
2c7e0 | 3e 20 66 61 6c 73 65 5d 29 0a 29 20 7b 0a 24 63 6f 6e 66 69 67 53 6f 75 72 63 65 2d 3e 61 64 64 | >.false]).).{.$configSource->add |
2c800 | 52 65 70 6f 73 69 74 6f 72 79 28 27 70 61 63 6b 61 67 69 73 74 2e 6f 72 67 27 2c 20 66 61 6c 73 | Repository('packagist.org',.fals |
2c820 | 65 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 63 6f 6e 66 69 67 53 6f 75 72 63 65 2d 3e 61 64 64 52 | e);.}.else.{.$configSource->addR |
2c840 | 65 70 6f 73 69 74 6f 72 79 28 24 6e 61 6d 65 2c 20 24 72 65 70 6f 43 6f 6e 66 69 67 2c 20 66 61 | epository($name,.$repoConfig,.fa |
2c860 | 6c 73 65 29 3b 0a 7d 0a 0a 24 63 6f 6d 70 6f 73 65 72 20 3d 20 46 61 63 74 6f 72 79 3a 3a 63 72 | lse);.}..$composer.=.Factory::cr |
2c880 | 65 61 74 65 28 24 69 6f 2c 20 6e 75 6c 6c 2c 20 24 64 69 73 61 62 6c 65 50 6c 75 67 69 6e 73 29 | eate($io,.null,.$disablePlugins) |
2c8a0 | 3b 0a 7d 0a 7d 0a 0a 24 70 72 6f 63 65 73 73 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 | ;.}.}..$process.=.$composer->get |
2c8c0 | 4c 6f 6f 70 28 29 2d 3e 67 65 74 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 28 29 3b 0a 24 66 | Loop()->getProcessExecutor();.$f |
2c8e0 | 73 20 3d 20 6e 65 77 20 46 69 6c 65 73 79 73 74 65 6d 28 24 70 72 6f 63 65 73 73 29 3b 0a 0a 0a | s.=.new.Filesystem($process);... |
2c900 | 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 28 29 2d | $composer->getEventDispatcher()- |
2c920 | 3e 64 69 73 70 61 74 63 68 53 63 72 69 70 74 28 53 63 72 69 70 74 45 76 65 6e 74 73 3a 3a 50 4f | >dispatchScript(ScriptEvents::PO |
2c940 | 53 54 5f 52 4f 4f 54 5f 50 41 43 4b 41 47 45 5f 49 4e 53 54 41 4c 4c 2c 20 24 69 6e 73 74 61 6c | ST_ROOT_PACKAGE_INSTALL,.$instal |
2c960 | 6c 44 65 76 50 61 63 6b 61 67 65 73 29 3b 0a 0a 0a 24 63 6f 6e 66 69 67 20 3d 20 24 63 6f 6d 70 | lDevPackages);...$config.=.$comp |
2c980 | 6f 73 65 72 2d 3e 67 65 74 43 6f 6e 66 69 67 28 29 3b 0a 5b 24 70 72 65 66 65 72 53 6f 75 72 63 | oser->getConfig();.[$preferSourc |
2c9a0 | 65 2c 20 24 70 72 65 66 65 72 44 69 73 74 5d 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 50 72 65 66 | e,.$preferDist].=.$this->getPref |
2c9c0 | 65 72 72 65 64 49 6e 73 74 61 6c 6c 4f 70 74 69 6f 6e 73 28 24 63 6f 6e 66 69 67 2c 20 24 69 6e | erredInstallOptions($config,.$in |
2c9e0 | 70 75 74 29 3b 0a 0a 0a 69 66 20 28 24 6e 6f 49 6e 73 74 61 6c 6c 20 3d 3d 3d 20 66 61 6c 73 65 | put);...if.($noInstall.===.false |
2ca00 | 29 20 7b 0a 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 | ).{.$composer->getInstallationMa |
2ca20 | 6e 61 67 65 72 28 29 2d 3e 73 65 74 4f 75 74 70 75 74 50 72 6f 67 72 65 73 73 28 21 24 6e 6f 50 | nager()->setOutputProgress(!$noP |
2ca40 | 72 6f 67 72 65 73 73 29 3b 0a 0a 24 69 6e 73 74 61 6c 6c 65 72 20 3d 20 49 6e 73 74 61 6c 6c 65 | rogress);..$installer.=.Installe |
2ca60 | 72 3a 3a 63 72 65 61 74 65 28 24 69 6f 2c 20 24 63 6f 6d 70 6f 73 65 72 29 3b 0a 24 69 6e 73 74 | r::create($io,.$composer);.$inst |
2ca80 | 61 6c 6c 65 72 2d 3e 73 65 74 50 72 65 66 65 72 53 6f 75 72 63 65 28 24 70 72 65 66 65 72 53 6f | aller->setPreferSource($preferSo |
2caa0 | 75 72 63 65 29 0a 2d 3e 73 65 74 50 72 65 66 65 72 44 69 73 74 28 24 70 72 65 66 65 72 44 69 73 | urce).->setPreferDist($preferDis |
2cac0 | 74 29 0a 2d 3e 73 65 74 44 65 76 4d 6f 64 65 28 24 69 6e 73 74 61 6c 6c 44 65 76 50 61 63 6b 61 | t).->setDevMode($installDevPacka |
2cae0 | 67 65 73 29 0a 2d 3e 73 65 74 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c | ges).->setPlatformRequirementFil |
2cb00 | 74 65 72 28 24 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 29 0a | ter($platformRequirementFilter). |
2cb20 | 2d 3e 73 65 74 53 75 67 67 65 73 74 65 64 50 61 63 6b 61 67 65 73 52 65 70 6f 72 74 65 72 28 24 | ->setSuggestedPackagesReporter($ |
2cb40 | 74 68 69 73 2d 3e 73 75 67 67 65 73 74 65 64 50 61 63 6b 61 67 65 73 52 65 70 6f 72 74 65 72 29 | this->suggestedPackagesReporter) |
2cb60 | 0a 2d 3e 73 65 74 4f 70 74 69 6d 69 7a 65 41 75 74 6f 6c 6f 61 64 65 72 28 24 63 6f 6e 66 69 67 | .->setOptimizeAutoloader($config |
2cb80 | 2d 3e 67 65 74 28 27 6f 70 74 69 6d 69 7a 65 2d 61 75 74 6f 6c 6f 61 64 65 72 27 29 29 0a 2d 3e | ->get('optimize-autoloader')).-> |
2cba0 | 73 65 74 43 6c 61 73 73 4d 61 70 41 75 74 68 6f 72 69 74 61 74 69 76 65 28 24 63 6f 6e 66 69 67 | setClassMapAuthoritative($config |
2cbc0 | 2d 3e 67 65 74 28 27 63 6c 61 73 73 6d 61 70 2d 61 75 74 68 6f 72 69 74 61 74 69 76 65 27 29 29 | ->get('classmap-authoritative')) |
2cbe0 | 0a 2d 3e 73 65 74 41 70 63 75 41 75 74 6f 6c 6f 61 64 65 72 28 24 63 6f 6e 66 69 67 2d 3e 67 65 | .->setApcuAutoloader($config->ge |
2cc00 | 74 28 27 61 70 63 75 2d 61 75 74 6f 6c 6f 61 64 65 72 27 29 29 0a 2d 3e 73 65 74 41 75 64 69 74 | t('apcu-autoloader')).->setAudit |
2cc20 | 28 21 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 61 75 64 69 74 27 29 29 | (!$input->getOption('no-audit')) |
2cc40 | 0a 2d 3e 73 65 74 41 75 64 69 74 46 6f 72 6d 61 74 28 24 74 68 69 73 2d 3e 67 65 74 41 75 64 69 | .->setAuditFormat($this->getAudi |
2cc60 | 74 46 6f 72 6d 61 74 28 24 69 6e 70 75 74 29 29 3b 0a 0a 69 66 20 28 21 24 63 6f 6d 70 6f 73 65 | tFormat($input));..if.(!$compose |
2cc80 | 72 2d 3e 67 65 74 4c 6f 63 6b 65 72 28 29 2d 3e 69 73 4c 6f 63 6b 65 64 28 29 29 20 7b 0a 24 69 | r->getLocker()->isLocked()).{.$i |
2cca0 | 6e 73 74 61 6c 6c 65 72 2d 3e 73 65 74 55 70 64 61 74 65 28 74 72 75 65 29 3b 0a 7d 0a 0a 69 66 | nstaller->setUpdate(true);.}..if |
2ccc0 | 20 28 24 64 69 73 61 62 6c 65 50 6c 75 67 69 6e 73 29 20 7b 0a 24 69 6e 73 74 61 6c 6c 65 72 2d | .($disablePlugins).{.$installer- |
2cce0 | 3e 64 69 73 61 62 6c 65 50 6c 75 67 69 6e 73 28 29 3b 0a 7d 0a 0a 74 72 79 20 7b 0a 24 73 74 61 | >disablePlugins();.}..try.{.$sta |
2cd00 | 74 75 73 20 3d 20 24 69 6e 73 74 61 6c 6c 65 72 2d 3e 72 75 6e 28 29 3b 0a 69 66 20 28 30 20 21 | tus.=.$installer->run();.if.(0.! |
2cd20 | 3d 3d 20 24 73 74 61 74 75 73 29 20 7b 0a 72 65 74 75 72 6e 20 24 73 74 61 74 75 73 3b 0a 7d 0a | ==.$status).{.return.$status;.}. |
2cd40 | 7d 20 63 61 74 63 68 20 28 50 6c 75 67 69 6e 42 6c 6f 63 6b 65 64 45 78 63 65 70 74 69 6f 6e 20 | }.catch.(PluginBlockedException. |
2cd60 | 24 65 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 65 72 72 6f 72 3e 48 69 | $e).{.$io->writeError('<error>Hi |
2cd80 | 6e 74 3a 20 54 6f 20 61 6c 6c 6f 77 20 72 75 6e 6e 69 6e 67 20 74 68 65 20 63 6f 6e 66 69 67 20 | nt:.To.allow.running.the.config. |
2cda0 | 63 6f 6d 6d 61 6e 64 20 72 65 63 6f 6d 6d 65 6e 64 65 64 20 62 65 6c 6f 77 20 62 65 66 6f 72 65 | command.recommended.below.before |
2cdc0 | 20 64 65 70 65 6e 64 65 6e 63 69 65 73 20 61 72 65 20 69 6e 73 74 61 6c 6c 65 64 2c 20 72 75 6e | .dependencies.are.installed,.run |
2cde0 | 20 63 72 65 61 74 65 2d 70 72 6f 6a 65 63 74 20 77 69 74 68 20 2d 2d 6e 6f 2d 69 6e 73 74 61 6c | .create-project.with.--no-instal |
2ce00 | 6c 2e 3c 2f 65 72 72 6f 72 3e 27 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c | l.</error>');.$io->writeError('< |
2ce20 | 65 72 72 6f 72 3e 59 6f 75 20 63 61 6e 20 74 68 65 6e 20 63 64 20 69 6e 74 6f 20 27 2e 67 65 74 | error>You.can.then.cd.into.'.get |
2ce40 | 63 77 64 28 29 2e 27 2c 20 63 6f 6e 66 69 67 75 72 65 20 61 6c 6c 6f 77 2d 70 6c 75 67 69 6e 73 | cwd().',.configure.allow-plugins |
2ce60 | 2c 20 61 6e 64 20 66 69 6e 61 6c 6c 79 20 72 75 6e 20 61 20 63 6f 6d 70 6f 73 65 72 20 69 6e 73 | ,.and.finally.run.a.composer.ins |
2ce80 | 74 61 6c 6c 20 74 6f 20 63 6f 6d 70 6c 65 74 65 20 74 68 65 20 70 72 6f 63 65 73 73 2e 3c 2f 65 | tall.to.complete.the.process.</e |
2cea0 | 72 72 6f 72 3e 27 29 3b 0a 74 68 72 6f 77 20 24 65 3b 0a 7d 0a 7d 0a 0a 24 68 61 73 56 63 73 20 | rror>');.throw.$e;.}.}..$hasVcs. |
2cec0 | 3d 20 24 69 6e 73 74 61 6c 6c 65 64 46 72 6f 6d 56 63 73 3b 0a 69 66 20 28 0a 21 24 69 6e 70 75 | =.$installedFromVcs;.if.(.!$inpu |
2cee0 | 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6b 65 65 70 2d 76 63 73 27 29 0a 26 26 20 24 69 6e 73 | t->getOption('keep-vcs').&&.$ins |
2cf00 | 74 61 6c 6c 65 64 46 72 6f 6d 56 63 73 0a 26 26 20 28 0a 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 | talledFromVcs.&&.(.$input->getOp |
2cf20 | 74 69 6f 6e 28 27 72 65 6d 6f 76 65 2d 76 63 73 27 29 0a 7c 7c 20 21 24 69 6f 2d 3e 69 73 49 6e | tion('remove-vcs').||.!$io->isIn |
2cf40 | 74 65 72 61 63 74 69 76 65 28 29 0a 7c 7c 20 24 69 6f 2d 3e 61 73 6b 43 6f 6e 66 69 72 6d 61 74 | teractive().||.$io->askConfirmat |
2cf60 | 69 6f 6e 28 27 3c 69 6e 66 6f 3e 44 6f 20 79 6f 75 20 77 61 6e 74 20 74 6f 20 72 65 6d 6f 76 65 | ion('<info>Do.you.want.to.remove |
2cf80 | 20 74 68 65 20 65 78 69 73 74 69 6e 67 20 56 43 53 20 28 2e 67 69 74 2c 20 2e 73 76 6e 2e 2e 29 | .the.existing.VCS.(.git,..svn..) |
2cfa0 | 20 68 69 73 74 6f 72 79 3f 3c 2f 69 6e 66 6f 3e 20 5b 3c 63 6f 6d 6d 65 6e 74 3e 59 2c 6e 3c 2f | .history?</info>.[<comment>Y,n</ |
2cfc0 | 63 6f 6d 6d 65 6e 74 3e 5d 3f 20 27 29 0a 29 0a 29 20 7b 0a 24 66 69 6e 64 65 72 20 3d 20 6e 65 | comment>]?.').).).{.$finder.=.ne |
2cfe0 | 77 20 46 69 6e 64 65 72 28 29 3b 0a 24 66 69 6e 64 65 72 2d 3e 64 65 70 74 68 28 30 29 2d 3e 64 | w.Finder();.$finder->depth(0)->d |
2d000 | 69 72 65 63 74 6f 72 69 65 73 28 29 2d 3e 69 6e 28 50 6c 61 74 66 6f 72 6d 3a 3a 67 65 74 43 77 | irectories()->in(Platform::getCw |
2d020 | 64 28 29 29 2d 3e 69 67 6e 6f 72 65 56 43 53 28 66 61 6c 73 65 29 2d 3e 69 67 6e 6f 72 65 44 6f | d())->ignoreVCS(false)->ignoreDo |
2d040 | 74 46 69 6c 65 73 28 66 61 6c 73 65 29 3b 0a 66 6f 72 65 61 63 68 20 28 5b 27 2e 73 76 6e 27 2c | tFiles(false);.foreach.(['.svn', |
2d060 | 20 27 5f 73 76 6e 27 2c 20 27 43 56 53 27 2c 20 27 5f 64 61 72 63 73 27 2c 20 27 2e 61 72 63 68 | .'_svn',.'CVS',.'_darcs',.'.arch |
2d080 | 2d 70 61 72 61 6d 73 27 2c 20 27 2e 6d 6f 6e 6f 74 6f 6e 65 27 2c 20 27 2e 62 7a 72 27 2c 20 27 | -params',.'.monotone',.'.bzr',.' |
2d0a0 | 2e 67 69 74 27 2c 20 27 2e 68 67 27 2c 20 27 2e 66 73 6c 63 6b 6f 75 74 27 2c 20 27 5f 46 4f 53 | .git',.'.hg',.'.fslckout',.'_FOS |
2d0c0 | 53 49 4c 5f 27 5d 20 61 73 20 24 76 63 73 4e 61 6d 65 29 20 7b 0a 24 66 69 6e 64 65 72 2d 3e 6e | SIL_'].as.$vcsName).{.$finder->n |
2d0e0 | 61 6d 65 28 24 76 63 73 4e 61 6d 65 29 3b 0a 7d 0a 0a 74 72 79 20 7b 0a 24 64 69 72 73 20 3d 20 | ame($vcsName);.}..try.{.$dirs.=. |
2d100 | 69 74 65 72 61 74 6f 72 5f 74 6f 5f 61 72 72 61 79 28 24 66 69 6e 64 65 72 29 3b 0a 75 6e 73 65 | iterator_to_array($finder);.unse |
2d120 | 74 28 24 66 69 6e 64 65 72 29 3b 0a 66 6f 72 65 61 63 68 20 28 24 64 69 72 73 20 61 73 20 24 64 | t($finder);.foreach.($dirs.as.$d |
2d140 | 69 72 29 20 7b 0a 69 66 20 28 21 24 66 73 2d 3e 72 65 6d 6f 76 65 44 69 72 65 63 74 6f 72 79 28 | ir).{.if.(!$fs->removeDirectory( |
2d160 | 28 73 74 72 69 6e 67 29 20 24 64 69 72 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e | (string).$dir)).{.throw.new.\Run |
2d180 | 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 43 6f 75 6c 64 20 6e 6f 74 20 72 65 6d 6f 76 65 20 | timeException('Could.not.remove. |
2d1a0 | 27 2e 24 64 69 72 29 3b 0a 7d 0a 7d 0a 7d 20 63 61 74 63 68 20 28 5c 45 78 63 65 70 74 69 6f 6e | '.$dir);.}.}.}.catch.(\Exception |
2d1c0 | 20 24 65 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 65 72 72 6f 72 3e 41 | .$e).{.$io->writeError('<error>A |
2d1e0 | 6e 20 65 72 72 6f 72 20 6f 63 63 75 72 72 65 64 20 77 68 69 6c 65 20 72 65 6d 6f 76 69 6e 67 20 | n.error.occurred.while.removing. |
2d200 | 74 68 65 20 56 43 53 20 6d 65 74 61 64 61 74 61 3a 20 27 2e 24 65 2d 3e 67 65 74 4d 65 73 73 61 | the.VCS.metadata:.'.$e->getMessa |
2d220 | 67 65 28 29 2e 27 3c 2f 65 72 72 6f 72 3e 27 29 3b 0a 7d 0a 0a 24 68 61 73 56 63 73 20 3d 20 66 | ge().'</error>');.}..$hasVcs.=.f |
2d240 | 61 6c 73 65 3b 0a 7d 0a 0a 0a 69 66 20 28 21 24 68 61 73 56 63 73 29 20 7b 0a 24 70 61 63 6b 61 | alse;.}...if.(!$hasVcs).{.$packa |
2d260 | 67 65 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 50 61 63 6b 61 67 65 28 29 3b 0a 24 63 | ge.=.$composer->getPackage();.$c |
2d280 | 6f 6e 66 69 67 53 6f 75 72 63 65 20 3d 20 6e 65 77 20 4a 73 6f 6e 43 6f 6e 66 69 67 53 6f 75 72 | onfigSource.=.new.JsonConfigSour |
2d2a0 | 63 65 28 6e 65 77 20 4a 73 6f 6e 46 69 6c 65 28 27 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 27 29 | ce(new.JsonFile('composer.json') |
2d2c0 | 29 3b 0a 66 6f 72 65 61 63 68 20 28 42 61 73 65 50 61 63 6b 61 67 65 3a 3a 24 73 75 70 70 6f 72 | );.foreach.(BasePackage::$suppor |
2d2e0 | 74 65 64 4c 69 6e 6b 54 79 70 65 73 20 61 73 20 24 74 79 70 65 20 3d 3e 20 24 6d 65 74 61 29 20 | tedLinkTypes.as.$type.=>.$meta). |
2d300 | 7b 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 2d 3e 7b 27 67 65 74 27 2e 24 6d 65 74 | {.foreach.($package->{'get'.$met |
2d320 | 61 5b 27 6d 65 74 68 6f 64 27 5d 7d 28 29 20 61 73 20 24 6c 69 6e 6b 29 20 7b 0a 69 66 20 28 24 | a['method']}().as.$link).{.if.($ |
2d340 | 6c 69 6e 6b 2d 3e 67 65 74 50 72 65 74 74 79 43 6f 6e 73 74 72 61 69 6e 74 28 29 20 3d 3d 3d 20 | link->getPrettyConstraint().===. |
2d360 | 27 73 65 6c 66 2e 76 65 72 73 69 6f 6e 27 29 20 7b 0a 24 63 6f 6e 66 69 67 53 6f 75 72 63 65 2d | 'self.version').{.$configSource- |
2d380 | 3e 61 64 64 4c 69 6e 6b 28 24 74 79 70 65 2c 20 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 74 | >addLink($type,.$link->getTarget |
2d3a0 | 28 29 2c 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 | (),.$package->getPrettyVersion() |
2d3c0 | 29 3b 0a 7d 0a 7d 0a 7d 0a 7d 0a 0a 0a 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 45 76 65 6e 74 | );.}.}.}.}...$composer->getEvent |
2d3e0 | 44 69 73 70 61 74 63 68 65 72 28 29 2d 3e 64 69 73 70 61 74 63 68 53 63 72 69 70 74 28 53 63 72 | Dispatcher()->dispatchScript(Scr |
2d400 | 69 70 74 45 76 65 6e 74 73 3a 3a 50 4f 53 54 5f 43 52 45 41 54 45 5f 50 52 4f 4a 45 43 54 5f 43 | iptEvents::POST_CREATE_PROJECT_C |
2d420 | 4d 44 2c 20 24 69 6e 73 74 61 6c 6c 44 65 76 50 61 63 6b 61 67 65 73 29 3b 0a 0a 63 68 64 69 72 | MD,.$installDevPackages);..chdir |
2d440 | 28 24 6f 6c 64 43 77 64 29 3b 0a 24 76 65 6e 64 6f 72 43 6f 6d 70 6f 73 65 72 44 69 72 20 3d 20 | ($oldCwd);.$vendorComposerDir.=. |
2d460 | 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 76 65 6e 64 6f 72 2d 64 69 72 27 29 2e 27 2f 63 6f 6d | $config->get('vendor-dir').'/com |
2d480 | 70 6f 73 65 72 27 3b 0a 69 66 20 28 69 73 5f 64 69 72 28 24 76 65 6e 64 6f 72 43 6f 6d 70 6f 73 | poser';.if.(is_dir($vendorCompos |
2d4a0 | 65 72 44 69 72 29 20 26 26 20 24 66 73 2d 3e 69 73 44 69 72 45 6d 70 74 79 28 24 76 65 6e 64 6f | erDir).&&.$fs->isDirEmpty($vendo |
2d4c0 | 72 43 6f 6d 70 6f 73 65 72 44 69 72 29 29 20 7b 0a 53 69 6c 65 6e 63 65 72 3a 3a 63 61 6c 6c 28 | rComposerDir)).{.Silencer::call( |
2d4e0 | 27 72 6d 64 69 72 27 2c 20 24 76 65 6e 64 6f 72 43 6f 6d 70 6f 73 65 72 44 69 72 29 3b 0a 24 76 | 'rmdir',.$vendorComposerDir);.$v |
2d500 | 65 6e 64 6f 72 44 69 72 20 3d 20 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 76 65 6e 64 6f 72 2d | endorDir.=.$config->get('vendor- |
2d520 | 64 69 72 27 29 3b 0a 69 66 20 28 69 73 5f 64 69 72 28 24 76 65 6e 64 6f 72 44 69 72 29 20 26 26 | dir');.if.(is_dir($vendorDir).&& |
2d540 | 20 24 66 73 2d 3e 69 73 44 69 72 45 6d 70 74 79 28 24 76 65 6e 64 6f 72 44 69 72 29 29 20 7b 0a | .$fs->isDirEmpty($vendorDir)).{. |
2d560 | 53 69 6c 65 6e 63 65 72 3a 3a 63 61 6c 6c 28 27 72 6d 64 69 72 27 2c 20 24 76 65 6e 64 6f 72 44 | Silencer::call('rmdir',.$vendorD |
2d580 | 69 72 29 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 | ir);.}.}..return.0;.}.......prot |
2d5a0 | 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 69 6e 73 74 61 6c 6c 52 6f 6f 74 50 61 63 6b 61 67 | ected.function.installRootPackag |
2d5c0 | 65 28 49 4f 49 6e 74 65 72 66 61 63 65 20 24 69 6f 2c 20 43 6f 6e 66 69 67 20 24 63 6f 6e 66 69 | e(IOInterface.$io,.Config.$confi |
2d5e0 | 67 2c 20 73 74 72 69 6e 67 20 24 70 61 63 6b 61 67 65 4e 61 6d 65 2c 20 50 6c 61 74 66 6f 72 6d | g,.string.$packageName,.Platform |
2d600 | 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 49 6e 74 65 72 66 61 63 65 20 24 70 6c 61 74 | RequirementFilterInterface.$plat |
2d620 | 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 2c 20 3f 73 74 72 69 6e 67 20 24 | formRequirementFilter,.?string.$ |
2d640 | 64 69 72 65 63 74 6f 72 79 20 3d 20 6e 75 6c 6c 2c 20 3f 73 74 72 69 6e 67 20 24 70 61 63 6b 61 | directory.=.null,.?string.$packa |
2d660 | 67 65 56 65 72 73 69 6f 6e 20 3d 20 6e 75 6c 6c 2c 20 3f 73 74 72 69 6e 67 20 24 73 74 61 62 69 | geVersion.=.null,.?string.$stabi |
2d680 | 6c 69 74 79 20 3d 20 27 73 74 61 62 6c 65 27 2c 20 62 6f 6f 6c 20 24 70 72 65 66 65 72 53 6f 75 | lity.=.'stable',.bool.$preferSou |
2d6a0 | 72 63 65 20 3d 20 66 61 6c 73 65 2c 20 62 6f 6f 6c 20 24 70 72 65 66 65 72 44 69 73 74 20 3d 20 | rce.=.false,.bool.$preferDist.=. |
2d6c0 | 66 61 6c 73 65 2c 20 62 6f 6f 6c 20 24 69 6e 73 74 61 6c 6c 44 65 76 50 61 63 6b 61 67 65 73 20 | false,.bool.$installDevPackages. |
2d6e0 | 3d 20 66 61 6c 73 65 2c 20 3f 61 72 72 61 79 20 24 72 65 70 6f 73 69 74 6f 72 69 65 73 20 3d 20 | =.false,.?array.$repositories.=. |
2d700 | 6e 75 6c 6c 2c 20 62 6f 6f 6c 20 24 64 69 73 61 62 6c 65 50 6c 75 67 69 6e 73 20 3d 20 66 61 6c | null,.bool.$disablePlugins.=.fal |
2d720 | 73 65 2c 20 62 6f 6f 6c 20 24 64 69 73 61 62 6c 65 53 63 72 69 70 74 73 20 3d 20 66 61 6c 73 65 | se,.bool.$disableScripts.=.false |
2d740 | 2c 20 62 6f 6f 6c 20 24 6e 6f 50 72 6f 67 72 65 73 73 20 3d 20 66 61 6c 73 65 2c 20 62 6f 6f 6c | ,.bool.$noProgress.=.false,.bool |
2d760 | 20 24 73 65 63 75 72 65 48 74 74 70 20 3d 20 74 72 75 65 29 3a 20 62 6f 6f 6c 0a 7b 0a 69 66 20 | .$secureHttp.=.true):.bool.{.if. |
2d780 | 28 21 24 73 65 63 75 72 65 48 74 74 70 29 20 7b 0a 24 63 6f 6e 66 69 67 2d 3e 6d 65 72 67 65 28 | (!$secureHttp).{.$config->merge( |
2d7a0 | 5b 27 63 6f 6e 66 69 67 27 20 3d 3e 20 5b 27 73 65 63 75 72 65 2d 68 74 74 70 27 20 3d 3e 20 66 | ['config'.=>.['secure-http'.=>.f |
2d7c0 | 61 6c 73 65 5d 5d 2c 20 43 6f 6e 66 69 67 3a 3a 53 4f 55 52 43 45 5f 43 4f 4d 4d 41 4e 44 29 3b | alse]],.Config::SOURCE_COMMAND); |
2d7e0 | 0a 7d 0a 0a 24 70 61 72 73 65 72 20 3d 20 6e 65 77 20 56 65 72 73 69 6f 6e 50 61 72 73 65 72 28 | .}..$parser.=.new.VersionParser( |
2d800 | 29 3b 0a 24 72 65 71 75 69 72 65 6d 65 6e 74 73 20 3d 20 24 70 61 72 73 65 72 2d 3e 70 61 72 73 | );.$requirements.=.$parser->pars |
2d820 | 65 4e 61 6d 65 56 65 72 73 69 6f 6e 50 61 69 72 73 28 5b 24 70 61 63 6b 61 67 65 4e 61 6d 65 5d | eNameVersionPairs([$packageName] |
2d840 | 29 3b 0a 24 6e 61 6d 65 20 3d 20 73 74 72 74 6f 6c 6f 77 65 72 28 24 72 65 71 75 69 72 65 6d 65 | );.$name.=.strtolower($requireme |
2d860 | 6e 74 73 5b 30 5d 5b 27 6e 61 6d 65 27 5d 29 3b 0a 69 66 20 28 21 24 70 61 63 6b 61 67 65 56 65 | nts[0]['name']);.if.(!$packageVe |
2d880 | 72 73 69 6f 6e 20 26 26 20 69 73 73 65 74 28 24 72 65 71 75 69 72 65 6d 65 6e 74 73 5b 30 5d 5b | rsion.&&.isset($requirements[0][ |
2d8a0 | 27 76 65 72 73 69 6f 6e 27 5d 29 29 20 7b 0a 24 70 61 63 6b 61 67 65 56 65 72 73 69 6f 6e 20 3d | 'version'])).{.$packageVersion.= |
2d8c0 | 20 24 72 65 71 75 69 72 65 6d 65 6e 74 73 5b 30 5d 5b 27 76 65 72 73 69 6f 6e 27 5d 3b 0a 7d 0a | .$requirements[0]['version'];.}. |
2d8e0 | 0a 0a 69 66 20 28 6e 75 6c 6c 20 3d 3d 3d 20 24 64 69 72 65 63 74 6f 72 79 29 20 7b 0a 24 70 61 | ..if.(null.===.$directory).{.$pa |
2d900 | 72 74 73 20 3d 20 65 78 70 6c 6f 64 65 28 22 2f 22 2c 20 24 6e 61 6d 65 2c 20 32 29 3b 0a 24 64 | rts.=.explode("/",.$name,.2);.$d |
2d920 | 69 72 65 63 74 6f 72 79 20 3d 20 50 6c 61 74 66 6f 72 6d 3a 3a 67 65 74 43 77 64 28 29 20 2e 20 | irectory.=.Platform::getCwd()... |
2d940 | 44 49 52 45 43 54 4f 52 59 5f 53 45 50 41 52 41 54 4f 52 20 2e 20 61 72 72 61 79 5f 70 6f 70 28 | DIRECTORY_SEPARATOR...array_pop( |
2d960 | 24 70 61 72 74 73 29 3b 0a 7d 0a 0a 24 70 72 6f 63 65 73 73 20 3d 20 6e 65 77 20 50 72 6f 63 65 | $parts);.}..$process.=.new.Proce |
2d980 | 73 73 45 78 65 63 75 74 6f 72 28 24 69 6f 29 3b 0a 24 66 73 20 3d 20 6e 65 77 20 46 69 6c 65 73 | ssExecutor($io);.$fs.=.new.Files |
2d9a0 | 79 73 74 65 6d 28 24 70 72 6f 63 65 73 73 29 3b 0a 69 66 20 28 21 24 66 73 2d 3e 69 73 41 62 73 | ystem($process);.if.(!$fs->isAbs |
2d9c0 | 6f 6c 75 74 65 50 61 74 68 28 24 64 69 72 65 63 74 6f 72 79 29 29 20 7b 0a 24 64 69 72 65 63 74 | olutePath($directory)).{.$direct |
2d9e0 | 6f 72 79 20 3d 20 50 6c 61 74 66 6f 72 6d 3a 3a 67 65 74 43 77 64 28 29 20 2e 20 44 49 52 45 43 | ory.=.Platform::getCwd()...DIREC |
2da00 | 54 4f 52 59 5f 53 45 50 41 52 41 54 4f 52 20 2e 20 24 64 69 72 65 63 74 6f 72 79 3b 0a 7d 0a 0a | TORY_SEPARATOR...$directory;.}.. |
2da20 | 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 69 6e 66 6f 3e 43 72 65 61 74 69 6e 67 20 | $io->writeError('<info>Creating. |
2da40 | 61 20 22 27 20 2e 20 24 70 61 63 6b 61 67 65 4e 61 6d 65 20 2e 20 27 22 20 70 72 6f 6a 65 63 74 | a."'...$packageName...'".project |
2da60 | 20 61 74 20 22 27 20 2e 20 24 66 73 2d 3e 66 69 6e 64 53 68 6f 72 74 65 73 74 50 61 74 68 28 50 | .at."'...$fs->findShortestPath(P |
2da80 | 6c 61 74 66 6f 72 6d 3a 3a 67 65 74 43 77 64 28 29 2c 20 24 64 69 72 65 63 74 6f 72 79 2c 20 74 | latform::getCwd(),.$directory,.t |
2daa0 | 72 75 65 29 20 2e 20 27 22 3c 2f 69 6e 66 6f 3e 27 29 3b 0a 0a 69 66 20 28 66 69 6c 65 5f 65 78 | rue)...'"</info>');..if.(file_ex |
2dac0 | 69 73 74 73 28 24 64 69 72 65 63 74 6f 72 79 29 29 20 7b 0a 69 66 20 28 21 69 73 5f 64 69 72 28 | ists($directory)).{.if.(!is_dir( |
2dae0 | 24 64 69 72 65 63 74 6f 72 79 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 | $directory)).{.throw.new.\Invali |
2db00 | 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 27 43 61 6e 6e 6f 74 20 63 72 65 61 74 | dArgumentException('Cannot.creat |
2db20 | 65 20 70 72 6f 6a 65 63 74 20 64 69 72 65 63 74 6f 72 79 20 61 74 20 22 27 2e 24 64 69 72 65 63 | e.project.directory.at."'.$direc |
2db40 | 74 6f 72 79 2e 27 22 2c 20 69 74 20 65 78 69 73 74 73 20 61 73 20 61 20 66 69 6c 65 2e 27 29 3b | tory.'",.it.exists.as.a.file.'); |
2db60 | 0a 7d 0a 69 66 20 28 21 24 66 73 2d 3e 69 73 44 69 72 45 6d 70 74 79 28 24 64 69 72 65 63 74 6f | .}.if.(!$fs->isDirEmpty($directo |
2db80 | 72 79 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e | ry)).{.throw.new.\InvalidArgumen |
2dba0 | 74 45 78 63 65 70 74 69 6f 6e 28 27 50 72 6f 6a 65 63 74 20 64 69 72 65 63 74 6f 72 79 20 22 27 | tException('Project.directory."' |
2dbc0 | 2e 24 64 69 72 65 63 74 6f 72 79 2e 27 22 20 69 73 20 6e 6f 74 20 65 6d 70 74 79 2e 27 29 3b 0a | .$directory.'".is.not.empty.');. |
2dbe0 | 7d 0a 7d 0a 0a 69 66 20 28 6e 75 6c 6c 20 3d 3d 3d 20 24 73 74 61 62 69 6c 69 74 79 29 20 7b 0a | }.}..if.(null.===.$stability).{. |
2dc00 | 69 66 20 28 6e 75 6c 6c 20 3d 3d 3d 20 24 70 61 63 6b 61 67 65 56 65 72 73 69 6f 6e 29 20 7b 0a | if.(null.===.$packageVersion).{. |
2dc20 | 24 73 74 61 62 69 6c 69 74 79 20 3d 20 27 73 74 61 62 6c 65 27 3b 0a 7d 20 65 6c 73 65 69 66 20 | $stability.=.'stable';.}.elseif. |
2dc40 | 28 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b 5e 5b 5e 2c 5c 73 5d 2a 3f 40 28 27 2e 69 6d | (Preg::isMatch('{^[^,\s]*?@('.im |
2dc60 | 70 6c 6f 64 65 28 27 7c 27 2c 20 61 72 72 61 79 5f 6b 65 79 73 28 42 61 73 65 50 61 63 6b 61 67 | plode('|',.array_keys(BasePackag |
2dc80 | 65 3a 3a 24 73 74 61 62 69 6c 69 74 69 65 73 29 29 2e 27 29 24 7d 69 27 2c 20 24 70 61 63 6b 61 | e::$stabilities)).')$}i',.$packa |
2dca0 | 67 65 56 65 72 73 69 6f 6e 2c 20 24 6d 61 74 63 68 29 29 20 7b 0a 24 73 74 61 62 69 6c 69 74 79 | geVersion,.$match)).{.$stability |
2dcc0 | 20 3d 20 24 6d 61 74 63 68 5b 31 5d 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 73 74 61 62 69 6c 69 74 | .=.$match[1];.}.else.{.$stabilit |
2dce0 | 79 20 3d 20 56 65 72 73 69 6f 6e 50 61 72 73 65 72 3a 3a 70 61 72 73 65 53 74 61 62 69 6c 69 74 | y.=.VersionParser::parseStabilit |
2dd00 | 79 28 24 70 61 63 6b 61 67 65 56 65 72 73 69 6f 6e 29 3b 0a 7d 0a 7d 0a 0a 24 73 74 61 62 69 6c | y($packageVersion);.}.}..$stabil |
2dd20 | 69 74 79 20 3d 20 56 65 72 73 69 6f 6e 50 61 72 73 65 72 3a 3a 6e 6f 72 6d 61 6c 69 7a 65 53 74 | ity.=.VersionParser::normalizeSt |
2dd40 | 61 62 69 6c 69 74 79 28 24 73 74 61 62 69 6c 69 74 79 29 3b 0a 0a 69 66 20 28 21 69 73 73 65 74 | ability($stability);..if.(!isset |
2dd60 | 28 42 61 73 65 50 61 63 6b 61 67 65 3a 3a 24 73 74 61 62 69 6c 69 74 69 65 73 5b 24 73 74 61 62 | (BasePackage::$stabilities[$stab |
2dd80 | 69 6c 69 74 79 5d 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 64 41 72 67 | ility])).{.throw.new.\InvalidArg |
2dda0 | 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 27 49 6e 76 61 6c 69 64 20 73 74 61 62 69 6c 69 74 | umentException('Invalid.stabilit |
2ddc0 | 79 20 70 72 6f 76 69 64 65 64 20 28 27 2e 24 73 74 61 62 69 6c 69 74 79 2e 27 29 2c 20 6d 75 73 | y.provided.('.$stability.'),.mus |
2dde0 | 74 20 62 65 20 6f 6e 65 20 6f 66 3a 20 27 2e 69 6d 70 6c 6f 64 65 28 27 2c 20 27 2c 20 61 72 72 | t.be.one.of:.'.implode(',.',.arr |
2de00 | 61 79 5f 6b 65 79 73 28 42 61 73 65 50 61 63 6b 61 67 65 3a 3a 24 73 74 61 62 69 6c 69 74 69 65 | ay_keys(BasePackage::$stabilitie |
2de20 | 73 29 29 29 3b 0a 7d 0a 0a 24 63 6f 6d 70 6f 73 65 72 20 3d 20 46 61 63 74 6f 72 79 3a 3a 63 72 | s)));.}..$composer.=.Factory::cr |
2de40 | 65 61 74 65 28 24 69 6f 2c 20 24 63 6f 6e 66 69 67 2d 3e 61 6c 6c 28 29 2c 20 24 64 69 73 61 62 | eate($io,.$config->all(),.$disab |
2de60 | 6c 65 50 6c 75 67 69 6e 73 2c 20 24 64 69 73 61 62 6c 65 53 63 72 69 70 74 73 29 3b 0a 24 63 6f | lePlugins,.$disableScripts);.$co |
2de80 | 6e 66 69 67 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 43 6f 6e 66 69 67 28 29 3b 0a 24 | nfig.=.$composer->getConfig();.$ |
2dea0 | 72 6d 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 79 4d 61 6e | rm.=.$composer->getRepositoryMan |
2dec0 | 61 67 65 72 28 29 3b 0a 0a 24 72 65 70 6f 73 69 74 6f 72 79 53 65 74 20 3d 20 6e 65 77 20 52 65 | ager();..$repositorySet.=.new.Re |
2dee0 | 70 6f 73 69 74 6f 72 79 53 65 74 28 24 73 74 61 62 69 6c 69 74 79 29 3b 0a 69 66 20 28 6e 75 6c | positorySet($stability);.if.(nul |
2df00 | 6c 20 3d 3d 3d 20 24 72 65 70 6f 73 69 74 6f 72 69 65 73 29 20 7b 0a 24 72 65 70 6f 73 69 74 6f | l.===.$repositories).{.$reposito |
2df20 | 72 79 53 65 74 2d 3e 61 64 64 52 65 70 6f 73 69 74 6f 72 79 28 6e 65 77 20 43 6f 6d 70 6f 73 69 | rySet->addRepository(new.Composi |
2df40 | 74 65 52 65 70 6f 73 69 74 6f 72 79 28 52 65 70 6f 73 69 74 6f 72 79 46 61 63 74 6f 72 79 3a 3a | teRepository(RepositoryFactory:: |
2df60 | 64 65 66 61 75 6c 74 52 65 70 6f 73 28 24 69 6f 2c 20 24 63 6f 6e 66 69 67 2c 20 24 72 6d 29 29 | defaultRepos($io,.$config,.$rm)) |
2df80 | 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 72 65 70 6f 73 69 74 6f 72 69 | );.}.else.{.foreach.($repositori |
2dfa0 | 65 73 20 61 73 20 24 72 65 70 6f 29 20 7b 0a 24 72 65 70 6f 43 6f 6e 66 69 67 20 3d 20 52 65 70 | es.as.$repo).{.$repoConfig.=.Rep |
2dfc0 | 6f 73 69 74 6f 72 79 46 61 63 74 6f 72 79 3a 3a 63 6f 6e 66 69 67 46 72 6f 6d 53 74 72 69 6e 67 | ositoryFactory::configFromString |
2dfe0 | 28 24 69 6f 2c 20 24 63 6f 6e 66 69 67 2c 20 24 72 65 70 6f 2c 20 74 72 75 65 29 3b 0a 69 66 20 | ($io,.$config,.$repo,.true);.if. |
2e000 | 28 0a 28 69 73 73 65 74 28 24 72 65 70 6f 43 6f 6e 66 69 67 5b 27 70 61 63 6b 61 67 69 73 74 27 | (.(isset($repoConfig['packagist' |
2e020 | 5d 29 20 26 26 20 24 72 65 70 6f 43 6f 6e 66 69 67 20 3d 3d 3d 20 5b 27 70 61 63 6b 61 67 69 73 | ]).&&.$repoConfig.===.['packagis |
2e040 | 74 27 20 3d 3e 20 66 61 6c 73 65 5d 29 0a 7c 7c 20 28 69 73 73 65 74 28 24 72 65 70 6f 43 6f 6e | t'.=>.false]).||.(isset($repoCon |
2e060 | 66 69 67 5b 27 70 61 63 6b 61 67 69 73 74 2e 6f 72 67 27 5d 29 20 26 26 20 24 72 65 70 6f 43 6f | fig['packagist.org']).&&.$repoCo |
2e080 | 6e 66 69 67 20 3d 3d 3d 20 5b 27 70 61 63 6b 61 67 69 73 74 2e 6f 72 67 27 20 3d 3e 20 66 61 6c | nfig.===.['packagist.org'.=>.fal |
2e0a0 | 73 65 5d 29 0a 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 24 72 65 70 6f 73 69 74 6f 72 79 | se]).).{.continue;.}.$repository |
2e0c0 | 53 65 74 2d 3e 61 64 64 52 65 70 6f 73 69 74 6f 72 79 28 52 65 70 6f 73 69 74 6f 72 79 46 61 63 | Set->addRepository(RepositoryFac |
2e0e0 | 74 6f 72 79 3a 3a 63 72 65 61 74 65 52 65 70 6f 28 24 69 6f 2c 20 24 63 6f 6e 66 69 67 2c 20 24 | tory::createRepo($io,.$config,.$ |
2e100 | 72 65 70 6f 43 6f 6e 66 69 67 2c 20 24 72 6d 29 29 3b 0a 7d 0a 7d 0a 0a 24 70 6c 61 74 66 6f 72 | repoConfig,.$rm));.}.}..$platfor |
2e120 | 6d 4f 76 65 72 72 69 64 65 73 20 3d 20 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 70 6c 61 74 66 | mOverrides.=.$config->get('platf |
2e140 | 6f 72 6d 27 29 3b 0a 24 70 6c 61 74 66 6f 72 6d 52 65 70 6f 20 3d 20 6e 65 77 20 50 6c 61 74 66 | orm');.$platformRepo.=.new.Platf |
2e160 | 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 28 5b 5d 2c 20 24 70 6c 61 74 66 6f 72 6d 4f 76 65 72 72 | ormRepository([],.$platformOverr |
2e180 | 69 64 65 73 29 3b 0a 0a 0a 24 76 65 72 73 69 6f 6e 53 65 6c 65 63 74 6f 72 20 3d 20 6e 65 77 20 | ides);...$versionSelector.=.new. |
2e1a0 | 56 65 72 73 69 6f 6e 53 65 6c 65 63 74 6f 72 28 24 72 65 70 6f 73 69 74 6f 72 79 53 65 74 2c 20 | VersionSelector($repositorySet,. |
2e1c0 | 24 70 6c 61 74 66 6f 72 6d 52 65 70 6f 29 3b 0a 24 70 61 63 6b 61 67 65 20 3d 20 24 76 65 72 73 | $platformRepo);.$package.=.$vers |
2e1e0 | 69 6f 6e 53 65 6c 65 63 74 6f 72 2d 3e 66 69 6e 64 42 65 73 74 43 61 6e 64 69 64 61 74 65 28 24 | ionSelector->findBestCandidate($ |
2e200 | 6e 61 6d 65 2c 20 24 70 61 63 6b 61 67 65 56 65 72 73 69 6f 6e 2c 20 24 73 74 61 62 69 6c 69 74 | name,.$packageVersion,.$stabilit |
2e220 | 79 2c 20 24 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 2c 20 30 | y,.$platformRequirementFilter,.0 |
2e240 | 2c 20 24 69 6f 29 3b 0a 0a 69 66 20 28 21 24 70 61 63 6b 61 67 65 29 20 7b 0a 24 65 72 72 6f 72 | ,.$io);..if.(!$package).{.$error |
2e260 | 4d 65 73 73 61 67 65 20 3d 20 22 43 6f 75 6c 64 20 6e 6f 74 20 66 69 6e 64 20 70 61 63 6b 61 67 | Message.=."Could.not.find.packag |
2e280 | 65 20 24 6e 61 6d 65 20 77 69 74 68 20 22 20 2e 20 28 24 70 61 63 6b 61 67 65 56 65 72 73 69 6f | e.$name.with."...($packageVersio |
2e2a0 | 6e 20 3f 20 22 76 65 72 73 69 6f 6e 20 24 70 61 63 6b 61 67 65 56 65 72 73 69 6f 6e 22 20 3a 20 | n.?."version.$packageVersion".:. |
2e2c0 | 22 73 74 61 62 69 6c 69 74 79 20 24 73 74 61 62 69 6c 69 74 79 22 29 3b 0a 69 66 20 28 21 28 24 | "stability.$stability");.if.(!($ |
2e2e0 | 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 20 69 6e 73 74 61 6e | platformRequirementFilter.instan |
2e300 | 63 65 6f 66 20 49 67 6e 6f 72 65 41 6c 6c 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e | ceof.IgnoreAllPlatformRequiremen |
2e320 | 74 46 69 6c 74 65 72 29 20 26 26 20 24 76 65 72 73 69 6f 6e 53 65 6c 65 63 74 6f 72 2d 3e 66 69 | tFilter).&&.$versionSelector->fi |
2e340 | 6e 64 42 65 73 74 43 61 6e 64 69 64 61 74 65 28 24 6e 61 6d 65 2c 20 24 70 61 63 6b 61 67 65 56 | ndBestCandidate($name,.$packageV |
2e360 | 65 72 73 69 6f 6e 2c 20 24 73 74 61 62 69 6c 69 74 79 2c 20 50 6c 61 74 66 6f 72 6d 52 65 71 75 | ersion,.$stability,.PlatformRequ |
2e380 | 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 46 61 63 74 6f 72 79 3a 3a 69 67 6e 6f 72 65 41 6c 6c 28 | irementFilterFactory::ignoreAll( |
2e3a0 | 29 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 | ))).{.throw.new.\InvalidArgument |
2e3c0 | 45 78 63 65 70 74 69 6f 6e 28 24 65 72 72 6f 72 4d 65 73 73 61 67 65 20 2e 27 20 69 6e 20 61 20 | Exception($errorMessage..'.in.a. |
2e3e0 | 76 65 72 73 69 6f 6e 20 69 6e 73 74 61 6c 6c 61 62 6c 65 20 75 73 69 6e 67 20 79 6f 75 72 20 50 | version.installable.using.your.P |
2e400 | 48 50 20 76 65 72 73 69 6f 6e 2c 20 50 48 50 20 65 78 74 65 6e 73 69 6f 6e 73 20 61 6e 64 20 43 | HP.version,.PHP.extensions.and.C |
2e420 | 6f 6d 70 6f 73 65 72 20 76 65 72 73 69 6f 6e 2e 27 29 3b 0a 7d 0a 0a 74 68 72 6f 77 20 6e 65 77 | omposer.version.');.}..throw.new |
2e440 | 20 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 24 65 72 72 6f | .\InvalidArgumentException($erro |
2e460 | 72 4d 65 73 73 61 67 65 20 2e 27 2e 27 29 3b 0a 7d 0a 0a 0a 40 6d 6b 64 69 72 28 24 64 69 72 65 | rMessage..'.');.}...@mkdir($dire |
2e480 | 63 74 6f 72 79 2c 20 30 37 37 37 2c 20 74 72 75 65 29 3b 0a 69 66 20 28 66 61 6c 73 65 20 21 3d | ctory,.0777,.true);.if.(false.!= |
2e4a0 | 3d 20 28 24 72 65 61 6c 44 69 72 20 3d 20 72 65 61 6c 70 61 74 68 28 24 64 69 72 65 63 74 6f 72 | =.($realDir.=.realpath($director |
2e4c0 | 79 29 29 29 20 7b 0a 24 73 69 67 6e 61 6c 48 61 6e 64 6c 65 72 20 3d 20 53 69 67 6e 61 6c 48 61 | y))).{.$signalHandler.=.SignalHa |
2e4e0 | 6e 64 6c 65 72 3a 3a 63 72 65 61 74 65 28 5b 53 69 67 6e 61 6c 48 61 6e 64 6c 65 72 3a 3a 53 49 | ndler::create([SignalHandler::SI |
2e500 | 47 49 4e 54 2c 20 53 69 67 6e 61 6c 48 61 6e 64 6c 65 72 3a 3a 53 49 47 54 45 52 4d 2c 20 53 69 | GINT,.SignalHandler::SIGTERM,.Si |
2e520 | 67 6e 61 6c 48 61 6e 64 6c 65 72 3a 3a 53 49 47 48 55 50 5d 2c 20 66 75 6e 63 74 69 6f 6e 20 28 | gnalHandler::SIGHUP],.function.( |
2e540 | 73 74 72 69 6e 67 20 24 73 69 67 6e 61 6c 2c 20 53 69 67 6e 61 6c 48 61 6e 64 6c 65 72 20 24 68 | string.$signal,.SignalHandler.$h |
2e560 | 61 6e 64 6c 65 72 29 20 75 73 65 20 28 24 72 65 61 6c 44 69 72 29 20 7b 0a 24 74 68 69 73 2d 3e | andler).use.($realDir).{.$this-> |
2e580 | 67 65 74 49 4f 28 29 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 52 65 63 65 69 76 65 64 20 27 2e | getIO()->writeError('Received.'. |
2e5a0 | 24 73 69 67 6e 61 6c 2e 27 2c 20 61 62 6f 72 74 69 6e 67 27 2c 20 74 72 75 65 2c 20 49 4f 49 6e | $signal.',.aborting',.true,.IOIn |
2e5c0 | 74 65 72 66 61 63 65 3a 3a 44 45 42 55 47 29 3b 0a 24 66 73 20 3d 20 6e 65 77 20 46 69 6c 65 73 | terface::DEBUG);.$fs.=.new.Files |
2e5e0 | 79 73 74 65 6d 28 29 3b 0a 24 66 73 2d 3e 72 65 6d 6f 76 65 44 69 72 65 63 74 6f 72 79 28 24 72 | ystem();.$fs->removeDirectory($r |
2e600 | 65 61 6c 44 69 72 29 3b 0a 24 68 61 6e 64 6c 65 72 2d 3e 65 78 69 74 57 69 74 68 4c 61 73 74 53 | ealDir);.$handler->exitWithLastS |
2e620 | 69 67 6e 61 6c 28 29 3b 0a 7d 29 3b 0a 7d 0a 0a 0a 69 66 20 28 24 70 61 63 6b 61 67 65 20 69 6e | ignal();.});.}...if.($package.in |
2e640 | 73 74 61 6e 63 65 6f 66 20 41 6c 69 61 73 50 61 63 6b 61 67 65 20 26 26 20 24 70 61 63 6b 61 67 | stanceof.AliasPackage.&&.$packag |
2e660 | 65 2d 3e 67 65 74 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 20 3d 3d 3d 20 56 65 72 73 69 6f | e->getPrettyVersion().===.Versio |
2e680 | 6e 50 61 72 73 65 72 3a 3a 44 45 46 41 55 4c 54 5f 42 52 41 4e 43 48 5f 41 4c 49 41 53 29 20 7b | nParser::DEFAULT_BRANCH_ALIAS).{ |
2e6a0 | 0a 24 70 61 63 6b 61 67 65 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 41 6c 69 61 73 4f 66 | .$package.=.$package->getAliasOf |
2e6c0 | 28 29 3b 0a 7d 0a 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 69 6e 66 6f 3e 49 6e | ();.}..$io->writeError('<info>In |
2e6e0 | 73 74 61 6c 6c 69 6e 67 20 27 20 2e 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 | stalling.'...$package->getName() |
2e700 | 20 2e 20 27 20 28 27 20 2e 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 46 75 6c 6c 50 72 65 74 74 | ...'.('...$package->getFullPrett |
2e720 | 79 56 65 72 73 69 6f 6e 28 66 61 6c 73 65 29 20 2e 20 27 29 3c 2f 69 6e 66 6f 3e 27 29 3b 0a 0a | yVersion(false)...')</info>');.. |
2e740 | 69 66 20 28 24 64 69 73 61 62 6c 65 50 6c 75 67 69 6e 73 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 | if.($disablePlugins).{.$io->writ |
2e760 | 65 45 72 72 6f 72 28 27 3c 69 6e 66 6f 3e 50 6c 75 67 69 6e 73 20 68 61 76 65 20 62 65 65 6e 20 | eError('<info>Plugins.have.been. |
2e780 | 64 69 73 61 62 6c 65 64 2e 3c 2f 69 6e 66 6f 3e 27 29 3b 0a 7d 0a 0a 69 66 20 28 24 70 61 63 6b | disabled.</info>');.}..if.($pack |
2e7a0 | 61 67 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 41 6c 69 61 73 50 61 63 6b 61 67 65 29 20 7b 0a 24 | age.instanceof.AliasPackage).{.$ |
2e7c0 | 70 61 63 6b 61 67 65 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 41 6c 69 61 73 4f 66 28 29 | package.=.$package->getAliasOf() |
2e7e0 | 3b 0a 7d 0a 0a 24 64 6d 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 44 6f 77 6e 6c 6f 61 | ;.}..$dm.=.$composer->getDownloa |
2e800 | 64 4d 61 6e 61 67 65 72 28 29 3b 0a 24 64 6d 2d 3e 73 65 74 50 72 65 66 65 72 53 6f 75 72 63 65 | dManager();.$dm->setPreferSource |
2e820 | 28 24 70 72 65 66 65 72 53 6f 75 72 63 65 29 0a 2d 3e 73 65 74 50 72 65 66 65 72 44 69 73 74 28 | ($preferSource).->setPreferDist( |
2e840 | 24 70 72 65 66 65 72 44 69 73 74 29 3b 0a 0a 24 70 72 6f 6a 65 63 74 49 6e 73 74 61 6c 6c 65 72 | $preferDist);..$projectInstaller |
2e860 | 20 3d 20 6e 65 77 20 50 72 6f 6a 65 63 74 49 6e 73 74 61 6c 6c 65 72 28 24 64 69 72 65 63 74 6f | .=.new.ProjectInstaller($directo |
2e880 | 72 79 2c 20 24 64 6d 2c 20 24 66 73 29 3b 0a 24 69 6d 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e | ry,.$dm,.$fs);.$im.=.$composer-> |
2e8a0 | 67 65 74 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 72 28 29 3b 0a 24 69 6d 2d 3e 73 | getInstallationManager();.$im->s |
2e8c0 | 65 74 4f 75 74 70 75 74 50 72 6f 67 72 65 73 73 28 21 24 6e 6f 50 72 6f 67 72 65 73 73 29 3b 0a | etOutputProgress(!$noProgress);. |
2e8e0 | 24 69 6d 2d 3e 61 64 64 49 6e 73 74 61 6c 6c 65 72 28 24 70 72 6f 6a 65 63 74 49 6e 73 74 61 6c | $im->addInstaller($projectInstal |
2e900 | 6c 65 72 29 3b 0a 24 69 6d 2d 3e 65 78 65 63 75 74 65 28 6e 65 77 20 49 6e 73 74 61 6c 6c 65 64 | ler);.$im->execute(new.Installed |
2e920 | 41 72 72 61 79 52 65 70 6f 73 69 74 6f 72 79 28 29 2c 20 5b 6e 65 77 20 49 6e 73 74 61 6c 6c 4f | ArrayRepository(),.[new.InstallO |
2e940 | 70 65 72 61 74 69 6f 6e 28 24 70 61 63 6b 61 67 65 29 5d 29 3b 0a 24 69 6d 2d 3e 6e 6f 74 69 66 | peration($package)]);.$im->notif |
2e960 | 79 49 6e 73 74 61 6c 6c 73 28 24 69 6f 29 3b 0a 0a 0a 24 74 68 69 73 2d 3e 73 75 67 67 65 73 74 | yInstalls($io);...$this->suggest |
2e980 | 65 64 50 61 63 6b 61 67 65 73 52 65 70 6f 72 74 65 72 2d 3e 61 64 64 53 75 67 67 65 73 74 69 6f | edPackagesReporter->addSuggestio |
2e9a0 | 6e 73 46 72 6f 6d 50 61 63 6b 61 67 65 28 24 70 61 63 6b 61 67 65 29 3b 0a 0a 24 69 6e 73 74 61 | nsFromPackage($package);..$insta |
2e9c0 | 6c 6c 65 64 46 72 6f 6d 56 63 73 20 3d 20 27 73 6f 75 72 63 65 27 20 3d 3d 3d 20 24 70 61 63 6b | lledFromVcs.=.'source'.===.$pack |
2e9e0 | 61 67 65 2d 3e 67 65 74 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 53 6f 75 72 63 65 28 29 3b 0a 0a 24 | age->getInstallationSource();..$ |
2ea00 | 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 69 6e 66 6f 3e 43 72 65 61 74 65 64 20 70 72 | io->writeError('<info>Created.pr |
2ea20 | 6f 6a 65 63 74 20 69 6e 20 27 20 2e 20 24 64 69 72 65 63 74 6f 72 79 20 2e 20 27 3c 2f 69 6e 66 | oject.in.'...$directory...'</inf |
2ea40 | 6f 3e 27 29 3b 0a 63 68 64 69 72 28 24 64 69 72 65 63 74 6f 72 79 29 3b 0a 0a 50 6c 61 74 66 6f | o>');.chdir($directory);..Platfo |
2ea60 | 72 6d 3a 3a 70 75 74 45 6e 76 28 27 43 4f 4d 50 4f 53 45 52 5f 52 4f 4f 54 5f 56 45 52 53 49 4f | rm::putEnv('COMPOSER_ROOT_VERSIO |
2ea80 | 4e 27 2c 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 | N',.$package->getPrettyVersion() |
2eaa0 | 29 3b 0a 0a 0a 69 66 20 28 69 73 73 65 74 28 24 73 69 67 6e 61 6c 48 61 6e 64 6c 65 72 29 29 20 | );...if.(isset($signalHandler)). |
2eac0 | 7b 0a 24 73 69 67 6e 61 6c 48 61 6e 64 6c 65 72 2d 3e 75 6e 72 65 67 69 73 74 65 72 28 29 3b 0a | {.$signalHandler->unregister();. |
2eae0 | 7d 0a 0a 72 65 74 75 72 6e 20 24 69 6e 73 74 61 6c 6c 65 64 46 72 6f 6d 56 63 73 3b 0a 7d 0a 7d | }..return.$installedFromVcs;.}.} |
2eb00 | 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a | .<?php.declare(strict_types=1);. |
2eb20 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f | ...........namespace.Composer\Co |
2eb40 | 6d 6d 61 6e 64 3b 0a 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f | mmand;..use.Symfony\Component\Co |
2eb60 | 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 | nsole\Input\InputInterface;.use. |
2eb80 | 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 4f 75 74 70 75 74 | Symfony\Component\Console\Output |
2eba0 | 5c 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 | \OutputInterface;.use.Composer\C |
2ebc0 | 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 3b 0a 75 73 65 20 | onsole\Input\InputArgument;.use. |
2ebe0 | 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 4f 70 74 69 | Composer\Console\Input\InputOpti |
2ec00 | 6f 6e 3b 0a 0a 0a 0a 0a 63 6c 61 73 73 20 44 65 70 65 6e 64 73 43 6f 6d 6d 61 6e 64 20 65 78 74 | on;.....class.DependsCommand.ext |
2ec20 | 65 6e 64 73 20 42 61 73 65 44 65 70 65 6e 64 65 6e 63 79 43 6f 6d 6d 61 6e 64 0a 7b 0a 75 73 65 | ends.BaseDependencyCommand.{.use |
2ec40 | 20 43 6f 6d 70 6c 65 74 69 6f 6e 54 72 61 69 74 3b 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 | .CompletionTrait;.....protected. |
2ec60 | 66 75 6e 63 74 69 6f 6e 20 63 6f 6e 66 69 67 75 72 65 28 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 | function.configure():.void.{.$th |
2ec80 | 69 73 0a 2d 3e 73 65 74 4e 61 6d 65 28 27 64 65 70 65 6e 64 73 27 29 0a 2d 3e 73 65 74 41 6c 69 | is.->setName('depends').->setAli |
2eca0 | 61 73 65 73 28 5b 27 77 68 79 27 5d 29 0a 2d 3e 73 65 74 44 65 73 63 72 69 70 74 69 6f 6e 28 27 | ases(['why']).->setDescription(' |
2ecc0 | 53 68 6f 77 73 20 77 68 69 63 68 20 70 61 63 6b 61 67 65 73 20 63 61 75 73 65 20 74 68 65 20 67 | Shows.which.packages.cause.the.g |
2ece0 | 69 76 65 6e 20 70 61 63 6b 61 67 65 20 74 6f 20 62 65 20 69 6e 73 74 61 6c 6c 65 64 27 29 0a 2d | iven.package.to.be.installed').- |
2ed00 | 3e 73 65 74 44 65 66 69 6e 69 74 69 6f 6e 28 5b 0a 6e 65 77 20 49 6e 70 75 74 41 72 67 75 6d 65 | >setDefinition([.new.InputArgume |
2ed20 | 6e 74 28 73 65 6c 66 3a 3a 41 52 47 55 4d 45 4e 54 5f 50 41 43 4b 41 47 45 2c 20 49 6e 70 75 74 | nt(self::ARGUMENT_PACKAGE,.Input |
2ed40 | 41 72 67 75 6d 65 6e 74 3a 3a 52 45 51 55 49 52 45 44 2c 20 27 50 61 63 6b 61 67 65 20 74 6f 20 | Argument::REQUIRED,.'Package.to. |
2ed60 | 69 6e 73 70 65 63 74 27 2c 20 6e 75 6c 6c 2c 20 24 74 68 69 73 2d 3e 73 75 67 67 65 73 74 49 6e | inspect',.null,.$this->suggestIn |
2ed80 | 73 74 61 6c 6c 65 64 50 61 63 6b 61 67 65 28 74 72 75 65 2c 20 74 72 75 65 29 29 2c 0a 6e 65 77 | stalledPackage(true,.true)),.new |
2eda0 | 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 73 65 6c 66 3a 3a 4f 50 54 49 4f 4e 5f 52 45 43 55 52 53 | .InputOption(self::OPTION_RECURS |
2edc0 | 49 56 45 2c 20 27 72 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e | IVE,.'r',.InputOption::VALUE_NON |
2ede0 | 45 2c 20 27 52 65 63 75 72 73 69 76 65 6c 79 20 72 65 73 6f 6c 76 65 73 20 75 70 20 74 6f 20 74 | E,.'Recursively.resolves.up.to.t |
2ee00 | 68 65 20 72 6f 6f 74 20 70 61 63 6b 61 67 65 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 | he.root.package'),.new.InputOpti |
2ee20 | 6f 6e 28 73 65 6c 66 3a 3a 4f 50 54 49 4f 4e 5f 54 52 45 45 2c 20 27 74 27 2c 20 49 6e 70 75 74 | on(self::OPTION_TREE,.'t',.Input |
2ee40 | 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 50 72 69 6e 74 73 20 74 68 65 20 | Option::VALUE_NONE,.'Prints.the. |
2ee60 | 72 65 73 75 6c 74 73 20 61 73 20 61 20 6e 65 73 74 65 64 20 74 72 65 65 27 29 2c 0a 6e 65 77 20 | results.as.a.nested.tree'),.new. |
2ee80 | 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6c 6f 63 6b 65 64 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 | InputOption('locked',.null,.Inpu |
2eea0 | 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 52 65 61 64 20 64 65 70 65 6e | tOption::VALUE_NONE,.'Read.depen |
2eec0 | 64 65 6e 63 79 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 66 72 6f 6d 20 63 6f 6d 70 6f 73 65 72 2e | dency.information.from.composer. |
2eee0 | 6c 6f 63 6b 27 29 2c 0a 5d 29 0a 2d 3e 73 65 74 48 65 6c 70 28 0a 3c 3c 3c 45 4f 54 0a 44 69 73 | lock'),.]).->setHelp(.<<<EOT.Dis |
2ef00 | 70 6c 61 79 73 20 64 65 74 61 69 6c 65 64 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 61 62 6f 75 74 | plays.detailed.information.about |
2ef20 | 20 77 68 65 72 65 20 61 20 70 61 63 6b 61 67 65 20 69 73 20 72 65 66 65 72 65 6e 63 65 64 2e 0a | .where.a.package.is.referenced.. |
2ef40 | 0a 3c 69 6e 66 6f 3e 70 68 70 20 63 6f 6d 70 6f 73 65 72 2e 70 68 61 72 20 64 65 70 65 6e 64 73 | .<info>php.composer.phar.depends |
2ef60 | 20 63 6f 6d 70 6f 73 65 72 2f 63 6f 6d 70 6f 73 65 72 3c 2f 69 6e 66 6f 3e 0a 0a 52 65 61 64 20 | .composer/composer</info>..Read. |
2ef80 | 6d 6f 72 65 20 61 74 20 68 74 74 70 73 3a 2f 2f 67 65 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 67 2f | more.at.https://getcomposer.org/ |
2efa0 | 64 6f 63 2f 30 33 2d 63 6c 69 2e 6d 64 23 64 65 70 65 6e 64 73 2d 77 68 79 2d 0a 45 4f 54 0a 29 | doc/03-cli.md#depends-why-.EOT.) |
2efc0 | 0a 3b 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 65 78 65 63 75 74 65 | .;.}..protected.function.execute |
2efe0 | 28 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 69 6e 70 75 74 2c 20 4f 75 74 70 75 74 49 6e | (InputInterface.$input,.OutputIn |
2f000 | 74 65 72 66 61 63 65 20 24 6f 75 74 70 75 74 29 3a 20 69 6e 74 0a 7b 0a 72 65 74 75 72 6e 20 70 | terface.$output):.int.{.return.p |
2f020 | 61 72 65 6e 74 3a 3a 64 6f 45 78 65 63 75 74 65 28 24 69 6e 70 75 74 2c 20 24 6f 75 74 70 75 74 | arent::doExecute($input,.$output |
2f040 | 29 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 | );.}.}.<?php.declare(strict_type |
2f060 | 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f | s=1);............namespace.Compo |
2f080 | 73 65 72 5c 43 6f 6d 6d 61 6e 64 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6d 70 6f | ser\Command;..use.Composer\Compo |
2f0a0 | 73 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 46 61 63 74 6f 72 79 3b 0a 75 73 65 20 43 | ser;.use.Composer\Factory;.use.C |
2f0c0 | 6f 6d 70 6f 73 65 72 5c 43 6f 6e 66 69 67 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 44 6f 77 | omposer\Config;.use.Composer\Dow |
2f0e0 | 6e 6c 6f 61 64 65 72 5c 54 72 61 6e 73 70 6f 72 74 45 78 63 65 70 74 69 6f 6e 3b 0a 75 73 65 20 | nloader\TransportException;.use. |
2f100 | 43 6f 6d 70 6f 73 65 72 5c 50 63 72 65 5c 50 72 65 67 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 | Composer\Pcre\Preg;.use.Composer |
2f120 | 5c 52 65 70 6f 73 69 74 6f 72 79 5c 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 3b 0a | \Repository\PlatformRepository;. |
2f140 | 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 6c 75 67 69 6e 5c 43 6f 6d 6d 61 6e 64 45 76 65 6e 74 | use.Composer\Plugin\CommandEvent |
2f160 | 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 6c 75 67 69 6e 5c 50 6c 75 67 69 6e 45 76 65 6e | ;.use.Composer\Plugin\PluginEven |
2f180 | 74 73 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 43 6f 6e 66 69 67 56 61 6c 69 | ts;.use.Composer\Util\ConfigVali |
2f1a0 | 64 61 74 6f 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 47 69 74 3b 0a 75 73 | dator;.use.Composer\Util\Git;.us |
2f1c0 | 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 49 6e 69 48 65 6c 70 65 72 3b 0a 75 73 65 20 43 | e.Composer\Util\IniHelper;.use.C |
2f1e0 | 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3b 0a 75 73 | omposer\Util\ProcessExecutor;.us |
2f200 | 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 48 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 3b 0a | e.Composer\Util\HttpDownloader;. |
2f220 | 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 53 74 72 65 61 6d 43 6f 6e 74 65 78 74 46 | use.Composer\Util\StreamContextF |
2f240 | 61 63 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 6c 61 74 66 6f | actory;.use.Composer\Util\Platfo |
2f260 | 72 6d 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 65 6c 66 55 70 64 61 74 65 5c 4b 65 79 73 | rm;.use.Composer\SelfUpdate\Keys |
2f280 | 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 65 6c 66 55 70 64 61 74 65 5c 56 65 72 73 69 6f | ;.use.Composer\SelfUpdate\Versio |
2f2a0 | 6e 73 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 4f 5c 4e 75 6c 6c 49 4f 3b 0a 75 73 65 20 | ns;.use.Composer\IO\NullIO;.use. |
2f2c0 | 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 | Composer\Package\CompletePackage |
2f2e0 | 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 58 64 65 62 75 67 48 61 | Interface;.use.Composer\XdebugHa |
2f300 | 6e 64 6c 65 72 5c 58 64 65 62 75 67 48 61 6e 64 6c 65 72 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 | ndler\XdebugHandler;.use.Symfony |
2f320 | 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 49 6e | \Component\Console\Input\InputIn |
2f340 | 74 65 72 66 61 63 65 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 | terface;.use.Symfony\Component\C |
2f360 | 6f 6e 73 6f 6c 65 5c 4f 75 74 70 75 74 5c 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 | onsole\Output\OutputInterface;.u |
2f380 | 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 50 72 6f 63 65 73 73 5c 45 78 65 | se.Symfony\Component\Process\Exe |
2f3a0 | 63 75 74 61 62 6c 65 46 69 6e 64 65 72 3b 0a 0a 0a 0a 0a 63 6c 61 73 73 20 44 69 61 67 6e 6f 73 | cutableFinder;.....class.Diagnos |
2f3c0 | 65 43 6f 6d 6d 61 6e 64 20 65 78 74 65 6e 64 73 20 42 61 73 65 43 6f 6d 6d 61 6e 64 0a 7b 0a 0a | eCommand.extends.BaseCommand.{.. |
2f3e0 | 70 72 6f 74 65 63 74 65 64 20 24 68 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 3b 0a 0a 0a 70 72 6f | protected.$httpDownloader;...pro |
2f400 | 74 65 63 74 65 64 20 24 70 72 6f 63 65 73 73 3b 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 65 78 | tected.$process;...protected.$ex |
2f420 | 69 74 43 6f 64 65 20 3d 20 30 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 | itCode.=.0;..protected.function. |
2f440 | 63 6f 6e 66 69 67 75 72 65 28 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 0a 2d 3e 73 65 74 4e | configure():.void.{.$this.->setN |
2f460 | 61 6d 65 28 27 64 69 61 67 6e 6f 73 65 27 29 0a 2d 3e 73 65 74 44 65 73 63 72 69 70 74 69 6f 6e | ame('diagnose').->setDescription |
2f480 | 28 27 44 69 61 67 6e 6f 73 65 73 20 74 68 65 20 73 79 73 74 65 6d 20 74 6f 20 69 64 65 6e 74 69 | ('Diagnoses.the.system.to.identi |
2f4a0 | 66 79 20 63 6f 6d 6d 6f 6e 20 65 72 72 6f 72 73 27 29 0a 2d 3e 73 65 74 48 65 6c 70 28 0a 3c 3c | fy.common.errors').->setHelp(.<< |
2f4c0 | 3c 45 4f 54 0a 54 68 65 20 3c 69 6e 66 6f 3e 64 69 61 67 6e 6f 73 65 3c 2f 69 6e 66 6f 3e 20 63 | <EOT.The.<info>diagnose</info>.c |
2f4e0 | 6f 6d 6d 61 6e 64 20 63 68 65 63 6b 73 20 63 6f 6d 6d 6f 6e 20 65 72 72 6f 72 73 20 74 6f 20 68 | ommand.checks.common.errors.to.h |
2f500 | 65 6c 70 20 64 65 62 75 67 67 69 6e 67 20 70 72 6f 62 6c 65 6d 73 2e 0a 0a 54 68 65 20 70 72 6f | elp.debugging.problems...The.pro |
2f520 | 63 65 73 73 20 65 78 69 74 20 63 6f 64 65 20 77 69 6c 6c 20 62 65 20 31 20 69 6e 20 63 61 73 65 | cess.exit.code.will.be.1.in.case |
2f540 | 20 6f 66 20 77 61 72 6e 69 6e 67 73 20 61 6e 64 20 32 20 66 6f 72 20 65 72 72 6f 72 73 2e 0a 0a | .of.warnings.and.2.for.errors... |
2f560 | 52 65 61 64 20 6d 6f 72 65 20 61 74 20 68 74 74 70 73 3a 2f 2f 67 65 74 63 6f 6d 70 6f 73 65 72 | Read.more.at.https://getcomposer |
2f580 | 2e 6f 72 67 2f 64 6f 63 2f 30 33 2d 63 6c 69 2e 6d 64 23 64 69 61 67 6e 6f 73 65 0a 45 4f 54 0a | .org/doc/03-cli.md#diagnose.EOT. |
2f5a0 | 29 0a 3b 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 65 78 65 63 75 74 | ).;.}..protected.function.execut |
2f5c0 | 65 28 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 69 6e 70 75 74 2c 20 4f 75 74 70 75 74 49 | e(InputInterface.$input,.OutputI |
2f5e0 | 6e 74 65 72 66 61 63 65 20 24 6f 75 74 70 75 74 29 0a 7b 0a 24 63 6f 6d 70 6f 73 65 72 20 3d 20 | nterface.$output).{.$composer.=. |
2f600 | 24 74 68 69 73 2d 3e 74 72 79 43 6f 6d 70 6f 73 65 72 28 29 3b 0a 24 69 6f 20 3d 20 24 74 68 69 | $this->tryComposer();.$io.=.$thi |
2f620 | 73 2d 3e 67 65 74 49 4f 28 29 3b 0a 0a 69 66 20 28 24 63 6f 6d 70 6f 73 65 72 29 20 7b 0a 24 63 | s->getIO();..if.($composer).{.$c |
2f640 | 6f 6d 6d 61 6e 64 45 76 65 6e 74 20 3d 20 6e 65 77 20 43 6f 6d 6d 61 6e 64 45 76 65 6e 74 28 50 | ommandEvent.=.new.CommandEvent(P |
2f660 | 6c 75 67 69 6e 45 76 65 6e 74 73 3a 3a 43 4f 4d 4d 41 4e 44 2c 20 27 64 69 61 67 6e 6f 73 65 27 | luginEvents::COMMAND,.'diagnose' |
2f680 | 2c 20 24 69 6e 70 75 74 2c 20 24 6f 75 74 70 75 74 29 3b 0a 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 | ,.$input,.$output);.$composer->g |
2f6a0 | 65 74 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 28 29 2d 3e 64 69 73 70 61 74 63 68 28 24 63 | etEventDispatcher()->dispatch($c |
2f6c0 | 6f 6d 6d 61 6e 64 45 76 65 6e 74 2d 3e 67 65 74 4e 61 6d 65 28 29 2c 20 24 63 6f 6d 6d 61 6e 64 | ommandEvent->getName(),.$command |
2f6e0 | 45 76 65 6e 74 29 3b 0a 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 43 68 65 63 6b 69 6e 67 20 63 6f | Event);..$io->write('Checking.co |
2f700 | 6d 70 6f 73 65 72 2e 6a 73 6f 6e 3a 20 27 2c 20 66 61 6c 73 65 29 3b 0a 24 74 68 69 73 2d 3e 6f | mposer.json:.',.false);.$this->o |
2f720 | 75 74 70 75 74 52 65 73 75 6c 74 28 24 74 68 69 73 2d 3e 63 68 65 63 6b 43 6f 6d 70 6f 73 65 72 | utputResult($this->checkComposer |
2f740 | 53 63 68 65 6d 61 28 29 29 3b 0a 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 20 3d 20 24 63 6f 6d | Schema());.$this->process.=.$com |
2f760 | 70 6f 73 65 72 2d 3e 67 65 74 4c 6f 6f 70 28 29 2d 3e 67 65 74 50 72 6f 63 65 73 73 45 78 65 63 | poser->getLoop()->getProcessExec |
2f780 | 75 74 6f 72 28 29 20 3f 3f 20 6e 65 77 20 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 28 24 69 | utor().??.new.ProcessExecutor($i |
2f7a0 | 6f 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 20 3d 20 6e 65 | o);.}.else.{.$this->process.=.ne |
2f7c0 | 77 20 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 28 24 69 6f 29 3b 0a 7d 0a 0a 69 66 20 28 24 | w.ProcessExecutor($io);.}..if.($ |
2f7e0 | 63 6f 6d 70 6f 73 65 72 29 20 7b 0a 24 63 6f 6e 66 69 67 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d | composer).{.$config.=.$composer- |
2f800 | 3e 67 65 74 43 6f 6e 66 69 67 28 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 63 6f 6e 66 69 67 20 3d | >getConfig();.}.else.{.$config.= |
2f820 | 20 46 61 63 74 6f 72 79 3a 3a 63 72 65 61 74 65 43 6f 6e 66 69 67 28 29 3b 0a 7d 0a 0a 24 63 6f | .Factory::createConfig();.}..$co |
2f840 | 6e 66 69 67 2d 3e 6d 65 72 67 65 28 5b 27 63 6f 6e 66 69 67 27 20 3d 3e 20 5b 27 73 65 63 75 72 | nfig->merge(['config'.=>.['secur |
2f860 | 65 2d 68 74 74 70 27 20 3d 3e 20 66 61 6c 73 65 5d 5d 2c 20 43 6f 6e 66 69 67 3a 3a 53 4f 55 52 | e-http'.=>.false]],.Config::SOUR |
2f880 | 43 45 5f 43 4f 4d 4d 41 4e 44 29 3b 0a 24 63 6f 6e 66 69 67 2d 3e 70 72 6f 68 69 62 69 74 55 72 | CE_COMMAND);.$config->prohibitUr |
2f8a0 | 6c 42 79 43 6f 6e 66 69 67 28 27 68 74 74 70 3a 2f 2f 72 65 70 6f 2e 70 61 63 6b 61 67 69 73 74 | lByConfig('http://repo.packagist |
2f8c0 | 2e 6f 72 67 27 2c 20 6e 65 77 20 4e 75 6c 6c 49 4f 29 3b 0a 0a 24 74 68 69 73 2d 3e 68 74 74 70 | .org',.new.NullIO);..$this->http |
2f8e0 | 44 6f 77 6e 6c 6f 61 64 65 72 20 3d 20 46 61 63 74 6f 72 79 3a 3a 63 72 65 61 74 65 48 74 74 70 | Downloader.=.Factory::createHttp |
2f900 | 44 6f 77 6e 6c 6f 61 64 65 72 28 24 69 6f 2c 20 24 63 6f 6e 66 69 67 29 3b 0a 0a 24 69 6f 2d 3e | Downloader($io,.$config);..$io-> |
2f920 | 77 72 69 74 65 28 27 43 68 65 63 6b 69 6e 67 20 70 6c 61 74 66 6f 72 6d 20 73 65 74 74 69 6e 67 | write('Checking.platform.setting |
2f940 | 73 3a 20 27 2c 20 66 61 6c 73 65 29 3b 0a 24 74 68 69 73 2d 3e 6f 75 74 70 75 74 52 65 73 75 6c | s:.',.false);.$this->outputResul |
2f960 | 74 28 24 74 68 69 73 2d 3e 63 68 65 63 6b 50 6c 61 74 66 6f 72 6d 28 29 29 3b 0a 0a 24 69 6f 2d | t($this->checkPlatform());..$io- |
2f980 | 3e 77 72 69 74 65 28 27 43 68 65 63 6b 69 6e 67 20 67 69 74 20 73 65 74 74 69 6e 67 73 3a 20 27 | >write('Checking.git.settings:.' |
2f9a0 | 2c 20 66 61 6c 73 65 29 3b 0a 24 74 68 69 73 2d 3e 6f 75 74 70 75 74 52 65 73 75 6c 74 28 24 74 | ,.false);.$this->outputResult($t |
2f9c0 | 68 69 73 2d 3e 63 68 65 63 6b 47 69 74 28 29 29 3b 0a 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 43 | his->checkGit());..$io->write('C |
2f9e0 | 68 65 63 6b 69 6e 67 20 68 74 74 70 20 63 6f 6e 6e 65 63 74 69 76 69 74 79 20 74 6f 20 70 61 63 | hecking.http.connectivity.to.pac |
2fa00 | 6b 61 67 69 73 74 3a 20 27 2c 20 66 61 6c 73 65 29 3b 0a 24 74 68 69 73 2d 3e 6f 75 74 70 75 74 | kagist:.',.false);.$this->output |
2fa20 | 52 65 73 75 6c 74 28 24 74 68 69 73 2d 3e 63 68 65 63 6b 48 74 74 70 28 27 68 74 74 70 27 2c 20 | Result($this->checkHttp('http',. |
2fa40 | 24 63 6f 6e 66 69 67 29 29 3b 0a 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 43 68 65 63 6b 69 6e 67 | $config));..$io->write('Checking |
2fa60 | 20 68 74 74 70 73 20 63 6f 6e 6e 65 63 74 69 76 69 74 79 20 74 6f 20 70 61 63 6b 61 67 69 73 74 | .https.connectivity.to.packagist |
2fa80 | 3a 20 27 2c 20 66 61 6c 73 65 29 3b 0a 24 74 68 69 73 2d 3e 6f 75 74 70 75 74 52 65 73 75 6c 74 | :.',.false);.$this->outputResult |
2faa0 | 28 24 74 68 69 73 2d 3e 63 68 65 63 6b 48 74 74 70 28 27 68 74 74 70 73 27 2c 20 24 63 6f 6e 66 | ($this->checkHttp('https',.$conf |
2fac0 | 69 67 29 29 3b 0a 0a 24 6f 70 74 73 20 3d 20 73 74 72 65 61 6d 5f 63 6f 6e 74 65 78 74 5f 67 65 | ig));..$opts.=.stream_context_ge |
2fae0 | 74 5f 6f 70 74 69 6f 6e 73 28 53 74 72 65 61 6d 43 6f 6e 74 65 78 74 46 61 63 74 6f 72 79 3a 3a | t_options(StreamContextFactory:: |
2fb00 | 67 65 74 43 6f 6e 74 65 78 74 28 27 68 74 74 70 3a 2f 2f 65 78 61 6d 70 6c 65 2e 6f 72 67 27 29 | getContext('http://example.org') |
2fb20 | 29 3b 0a 69 66 20 28 21 65 6d 70 74 79 28 24 6f 70 74 73 5b 27 68 74 74 70 27 5d 5b 27 70 72 6f | );.if.(!empty($opts['http']['pro |
2fb40 | 78 79 27 5d 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 43 68 65 63 6b 69 6e 67 20 48 54 | xy'])).{.$io->write('Checking.HT |
2fb60 | 54 50 20 70 72 6f 78 79 3a 20 27 2c 20 66 61 6c 73 65 29 3b 0a 24 74 68 69 73 2d 3e 6f 75 74 70 | TP.proxy:.',.false);.$this->outp |
2fb80 | 75 74 52 65 73 75 6c 74 28 24 74 68 69 73 2d 3e 63 68 65 63 6b 48 74 74 70 50 72 6f 78 79 28 29 | utResult($this->checkHttpProxy() |
2fba0 | 29 3b 0a 7d 0a 0a 69 66 20 28 63 6f 75 6e 74 28 24 6f 61 75 74 68 20 3d 20 24 63 6f 6e 66 69 67 | );.}..if.(count($oauth.=.$config |
2fbc0 | 2d 3e 67 65 74 28 27 67 69 74 68 75 62 2d 6f 61 75 74 68 27 29 29 20 3e 20 30 29 20 7b 0a 66 6f | ->get('github-oauth')).>.0).{.fo |
2fbe0 | 72 65 61 63 68 20 28 24 6f 61 75 74 68 20 61 73 20 24 64 6f 6d 61 69 6e 20 3d 3e 20 24 74 6f 6b | reach.($oauth.as.$domain.=>.$tok |
2fc00 | 65 6e 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 43 68 65 63 6b 69 6e 67 20 27 2e 24 64 6f | en).{.$io->write('Checking.'.$do |
2fc20 | 6d 61 69 6e 2e 27 20 6f 61 75 74 68 20 61 63 63 65 73 73 3a 20 27 2c 20 66 61 6c 73 65 29 3b 0a | main.'.oauth.access:.',.false);. |
2fc40 | 24 74 68 69 73 2d 3e 6f 75 74 70 75 74 52 65 73 75 6c 74 28 24 74 68 69 73 2d 3e 63 68 65 63 6b | $this->outputResult($this->check |
2fc60 | 47 69 74 68 75 62 4f 61 75 74 68 28 24 64 6f 6d 61 69 6e 2c 20 24 74 6f 6b 65 6e 29 29 3b 0a 7d | GithubOauth($domain,.$token));.} |
2fc80 | 0a 7d 20 65 6c 73 65 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 43 68 65 63 6b 69 6e 67 20 67 | .}.else.{.$io->write('Checking.g |
2fca0 | 69 74 68 75 62 2e 63 6f 6d 20 72 61 74 65 20 6c 69 6d 69 74 3a 20 27 2c 20 66 61 6c 73 65 29 3b | ithub.com.rate.limit:.',.false); |
2fcc0 | 0a 74 72 79 20 7b 0a 24 72 61 74 65 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 47 69 74 68 75 62 52 | .try.{.$rate.=.$this->getGithubR |
2fce0 | 61 74 65 4c 69 6d 69 74 28 27 67 69 74 68 75 62 2e 63 6f 6d 27 29 3b 0a 69 66 20 28 21 69 73 5f | ateLimit('github.com');.if.(!is_ |
2fd00 | 61 72 72 61 79 28 24 72 61 74 65 29 29 20 7b 0a 24 74 68 69 73 2d 3e 6f 75 74 70 75 74 52 65 73 | array($rate)).{.$this->outputRes |
2fd20 | 75 6c 74 28 24 72 61 74 65 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 31 30 20 3e 20 24 72 61 74 65 | ult($rate);.}.elseif.(10.>.$rate |
2fd40 | 5b 27 72 65 6d 61 69 6e 69 6e 67 27 5d 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 3c 77 61 | ['remaining']).{.$io->write('<wa |
2fd60 | 72 6e 69 6e 67 3e 57 41 52 4e 49 4e 47 3c 2f 77 61 72 6e 69 6e 67 3e 27 29 3b 0a 24 69 6f 2d 3e | rning>WARNING</warning>');.$io-> |
2fd80 | 77 72 69 74 65 28 73 70 72 69 6e 74 66 28 0a 27 3c 63 6f 6d 6d 65 6e 74 3e 47 69 74 68 75 62 20 | write(sprintf(.'<comment>Github. |
2fda0 | 68 61 73 20 61 20 72 61 74 65 20 6c 69 6d 69 74 20 6f 6e 20 74 68 65 69 72 20 41 50 49 2e 20 27 | has.a.rate.limit.on.their.API..' |
2fdc0 | 0a 2e 20 27 59 6f 75 20 63 75 72 72 65 6e 74 6c 79 20 68 61 76 65 20 3c 6f 70 74 69 6f 6e 73 3d | ...'You.currently.have.<options= |
2fde0 | 62 6f 6c 64 3e 25 75 3c 2f 6f 70 74 69 6f 6e 73 3d 62 6f 6c 64 3e 20 27 0a 2e 20 27 6f 75 74 20 | bold>%u</options=bold>.'...'out. |
2fe00 | 6f 66 20 3c 6f 70 74 69 6f 6e 73 3d 62 6f 6c 64 3e 25 75 3c 2f 6f 70 74 69 6f 6e 73 3d 62 6f 6c | of.<options=bold>%u</options=bol |
2fe20 | 64 3e 20 72 65 71 75 65 73 74 73 20 6c 65 66 74 2e 27 20 2e 20 50 48 50 5f 45 4f 4c 0a 2e 20 27 | d>.requests.left.'...PHP_EOL...' |
2fe40 | 53 65 65 20 68 74 74 70 73 3a 2f 2f 64 65 76 65 6c 6f 70 65 72 2e 67 69 74 68 75 62 2e 63 6f 6d | See.https://developer.github.com |
2fe60 | 2f 76 33 2f 23 72 61 74 65 2d 6c 69 6d 69 74 69 6e 67 20 61 6e 64 20 61 6c 73 6f 27 20 2e 20 50 | /v3/#rate-limiting.and.also'...P |
2fe80 | 48 50 5f 45 4f 4c 0a 2e 20 27 20 20 20 20 68 74 74 70 73 3a 2f 2f 67 65 74 63 6f 6d 70 6f 73 65 | HP_EOL...'....https://getcompose |
2fea0 | 72 2e 6f 72 67 2f 64 6f 63 2f 61 72 74 69 63 6c 65 73 2f 74 72 6f 75 62 6c 65 73 68 6f 6f 74 69 | r.org/doc/articles/troubleshooti |
2fec0 | 6e 67 2e 6d 64 23 61 70 69 2d 72 61 74 65 2d 6c 69 6d 69 74 2d 61 6e 64 2d 6f 61 75 74 68 2d 74 | ng.md#api-rate-limit-and-oauth-t |
2fee0 | 6f 6b 65 6e 73 3c 2f 63 6f 6d 6d 65 6e 74 3e 27 2c 0a 24 72 61 74 65 5b 27 72 65 6d 61 69 6e 69 | okens</comment>',.$rate['remaini |
2ff00 | 6e 67 27 5d 2c 0a 24 72 61 74 65 5b 27 6c 69 6d 69 74 27 5d 0a 29 29 3b 0a 7d 20 65 6c 73 65 20 | ng'],.$rate['limit'].));.}.else. |
2ff20 | 7b 0a 24 74 68 69 73 2d 3e 6f 75 74 70 75 74 52 65 73 75 6c 74 28 74 72 75 65 29 3b 0a 7d 0a 7d | {.$this->outputResult(true);.}.} |
2ff40 | 20 63 61 74 63 68 20 28 5c 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 69 66 20 28 24 65 20 | .catch.(\Exception.$e).{.if.($e. |
2ff60 | 69 6e 73 74 61 6e 63 65 6f 66 20 54 72 61 6e 73 70 6f 72 74 45 78 63 65 70 74 69 6f 6e 20 26 26 | instanceof.TransportException.&& |
2ff80 | 20 24 65 2d 3e 67 65 74 43 6f 64 65 28 29 20 3d 3d 3d 20 34 30 31 29 20 7b 0a 24 74 68 69 73 2d | .$e->getCode().===.401).{.$this- |
2ffa0 | 3e 6f 75 74 70 75 74 52 65 73 75 6c 74 28 27 3c 63 6f 6d 6d 65 6e 74 3e 54 68 65 20 6f 61 75 74 | >outputResult('<comment>The.oaut |
2ffc0 | 68 20 74 6f 6b 65 6e 20 66 6f 72 20 67 69 74 68 75 62 2e 63 6f 6d 20 73 65 65 6d 73 20 69 6e 76 | h.token.for.github.com.seems.inv |
2ffe0 | 61 6c 69 64 2c 20 72 75 6e 20 22 63 6f 6d 70 6f 73 65 72 20 63 6f 6e 66 69 67 20 2d 2d 67 6c 6f | alid,.run."composer.config.--glo |
30000 | 62 61 6c 20 2d 2d 75 6e 73 65 74 20 67 69 74 68 75 62 2d 6f 61 75 74 68 2e 67 69 74 68 75 62 2e | bal.--unset.github-oauth.github. |
30020 | 63 6f 6d 22 20 74 6f 20 72 65 6d 6f 76 65 20 69 74 3c 2f 63 6f 6d 6d 65 6e 74 3e 27 29 3b 0a 7d | com".to.remove.it</comment>');.} |
30040 | 20 65 6c 73 65 20 7b 0a 24 74 68 69 73 2d 3e 6f 75 74 70 75 74 52 65 73 75 6c 74 28 24 65 29 3b | .else.{.$this->outputResult($e); |
30060 | 0a 7d 0a 7d 0a 7d 0a 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 43 68 65 63 6b 69 6e 67 20 64 69 73 | .}.}.}..$io->write('Checking.dis |
30080 | 6b 20 66 72 65 65 20 73 70 61 63 65 3a 20 27 2c 20 66 61 6c 73 65 29 3b 0a 24 74 68 69 73 2d 3e | k.free.space:.',.false);.$this-> |
300a0 | 6f 75 74 70 75 74 52 65 73 75 6c 74 28 24 74 68 69 73 2d 3e 63 68 65 63 6b 44 69 73 6b 53 70 61 | outputResult($this->checkDiskSpa |
300c0 | 63 65 28 24 63 6f 6e 66 69 67 29 29 3b 0a 0a 69 66 20 28 73 74 72 70 6f 73 28 5f 5f 46 49 4c 45 | ce($config));..if.(strpos(__FILE |
300e0 | 5f 5f 2c 20 27 70 68 61 72 3a 27 29 20 3d 3d 3d 20 30 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 | __,.'phar:').===.0).{.$io->write |
30100 | 28 27 43 68 65 63 6b 69 6e 67 20 70 75 62 6b 65 79 73 3a 20 27 2c 20 66 61 6c 73 65 29 3b 0a 24 | ('Checking.pubkeys:.',.false);.$ |
30120 | 74 68 69 73 2d 3e 6f 75 74 70 75 74 52 65 73 75 6c 74 28 24 74 68 69 73 2d 3e 63 68 65 63 6b 50 | this->outputResult($this->checkP |
30140 | 75 62 4b 65 79 73 28 24 63 6f 6e 66 69 67 29 29 3b 0a 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 43 | ubKeys($config));..$io->write('C |
30160 | 68 65 63 6b 69 6e 67 20 63 6f 6d 70 6f 73 65 72 20 76 65 72 73 69 6f 6e 3a 20 27 2c 20 66 61 6c | hecking.composer.version:.',.fal |
30180 | 73 65 29 3b 0a 24 74 68 69 73 2d 3e 6f 75 74 70 75 74 52 65 73 75 6c 74 28 24 74 68 69 73 2d 3e | se);.$this->outputResult($this-> |
301a0 | 63 68 65 63 6b 56 65 72 73 69 6f 6e 28 24 63 6f 6e 66 69 67 29 29 3b 0a 7d 0a 0a 24 69 6f 2d 3e | checkVersion($config));.}..$io-> |
301c0 | 77 72 69 74 65 28 73 70 72 69 6e 74 66 28 27 43 6f 6d 70 6f 73 65 72 20 76 65 72 73 69 6f 6e 3a | write(sprintf('Composer.version: |
301e0 | 20 3c 63 6f 6d 6d 65 6e 74 3e 25 73 3c 2f 63 6f 6d 6d 65 6e 74 3e 27 2c 20 43 6f 6d 70 6f 73 65 | .<comment>%s</comment>',.Compose |
30200 | 72 3a 3a 67 65 74 56 65 72 73 69 6f 6e 28 29 29 29 3b 0a 0a 24 70 6c 61 74 66 6f 72 6d 4f 76 65 | r::getVersion()));..$platformOve |
30220 | 72 72 69 64 65 73 20 3d 20 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 70 6c 61 74 66 6f 72 6d 27 | rrides.=.$config->get('platform' |
30240 | 29 20 3f 3a 20 5b 5d 3b 0a 24 70 6c 61 74 66 6f 72 6d 52 65 70 6f 20 3d 20 6e 65 77 20 50 6c 61 | ).?:.[];.$platformRepo.=.new.Pla |
30260 | 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 28 5b 5d 2c 20 24 70 6c 61 74 66 6f 72 6d 4f 76 65 | tformRepository([],.$platformOve |
30280 | 72 72 69 64 65 73 29 3b 0a 24 70 68 70 50 6b 67 20 3d 20 24 70 6c 61 74 66 6f 72 6d 52 65 70 6f | rrides);.$phpPkg.=.$platformRepo |
302a0 | 2d 3e 66 69 6e 64 50 61 63 6b 61 67 65 28 27 70 68 70 27 2c 20 27 2a 27 29 3b 0a 24 70 68 70 56 | ->findPackage('php',.'*');.$phpV |
302c0 | 65 72 73 69 6f 6e 20 3d 20 24 70 68 70 50 6b 67 2d 3e 67 65 74 50 72 65 74 74 79 56 65 72 73 69 | ersion.=.$phpPkg->getPrettyVersi |
302e0 | 6f 6e 28 29 3b 0a 69 66 20 28 24 70 68 70 50 6b 67 20 69 6e 73 74 61 6e 63 65 6f 66 20 43 6f 6d | on();.if.($phpPkg.instanceof.Com |
30300 | 70 6c 65 74 65 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 26 26 20 66 61 6c 73 65 20 21 | pletePackageInterface.&&.false.! |
30320 | 3d 3d 20 73 74 72 70 6f 73 28 24 70 68 70 50 6b 67 2d 3e 67 65 74 44 65 73 63 72 69 70 74 69 6f | ==.strpos($phpPkg->getDescriptio |
30340 | 6e 28 29 2c 20 27 6f 76 65 72 72 69 64 64 65 6e 27 29 29 20 7b 0a 24 70 68 70 56 65 72 73 69 6f | n(),.'overridden')).{.$phpVersio |
30360 | 6e 20 2e 3d 20 27 20 2d 20 27 20 2e 20 24 70 68 70 50 6b 67 2d 3e 67 65 74 44 65 73 63 72 69 70 | n..=.'.-.'...$phpPkg->getDescrip |
30380 | 74 69 6f 6e 28 29 3b 0a 7d 0a 0a 24 69 6f 2d 3e 77 72 69 74 65 28 73 70 72 69 6e 74 66 28 27 50 | tion();.}..$io->write(sprintf('P |
303a0 | 48 50 20 76 65 72 73 69 6f 6e 3a 20 3c 63 6f 6d 6d 65 6e 74 3e 25 73 3c 2f 63 6f 6d 6d 65 6e 74 | HP.version:.<comment>%s</comment |
303c0 | 3e 27 2c 20 24 70 68 70 56 65 72 73 69 6f 6e 29 29 3b 0a 0a 69 66 20 28 64 65 66 69 6e 65 64 28 | >',.$phpVersion));..if.(defined( |
303e0 | 27 50 48 50 5f 42 49 4e 41 52 59 27 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 73 70 72 69 | 'PHP_BINARY')).{.$io->write(spri |
30400 | 6e 74 66 28 27 50 48 50 20 62 69 6e 61 72 79 20 70 61 74 68 3a 20 3c 63 6f 6d 6d 65 6e 74 3e 25 | ntf('PHP.binary.path:.<comment>% |
30420 | 73 3c 2f 63 6f 6d 6d 65 6e 74 3e 27 2c 20 50 48 50 5f 42 49 4e 41 52 59 29 29 3b 0a 7d 0a 0a 24 | s</comment>',.PHP_BINARY));.}..$ |
30440 | 69 6f 2d 3e 77 72 69 74 65 28 27 4f 70 65 6e 53 53 4c 20 76 65 72 73 69 6f 6e 3a 20 27 20 2e 20 | io->write('OpenSSL.version:.'... |
30460 | 28 64 65 66 69 6e 65 64 28 27 4f 50 45 4e 53 53 4c 5f 56 45 52 53 49 4f 4e 5f 54 45 58 54 27 29 | (defined('OPENSSL_VERSION_TEXT') |
30480 | 20 3f 20 27 3c 63 6f 6d 6d 65 6e 74 3e 27 2e 4f 50 45 4e 53 53 4c 5f 56 45 52 53 49 4f 4e 5f 54 | .?.'<comment>'.OPENSSL_VERSION_T |
304a0 | 45 58 54 2e 27 3c 2f 63 6f 6d 6d 65 6e 74 3e 27 20 3a 20 27 3c 65 72 72 6f 72 3e 6d 69 73 73 69 | EXT.'</comment>'.:.'<error>missi |
304c0 | 6e 67 3c 2f 65 72 72 6f 72 3e 27 29 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 63 55 52 4c 20 | ng</error>'));.$io->write('cURL. |
304e0 | 76 65 72 73 69 6f 6e 3a 20 27 20 2e 20 24 74 68 69 73 2d 3e 67 65 74 43 75 72 6c 56 65 72 73 69 | version:.'...$this->getCurlVersi |
30500 | 6f 6e 28 29 29 3b 0a 0a 24 66 69 6e 64 65 72 20 3d 20 6e 65 77 20 45 78 65 63 75 74 61 62 6c 65 | on());..$finder.=.new.Executable |
30520 | 46 69 6e 64 65 72 3b 0a 24 68 61 73 53 79 73 74 65 6d 55 6e 7a 69 70 20 3d 20 28 62 6f 6f 6c 29 | Finder;.$hasSystemUnzip.=.(bool) |
30540 | 20 24 66 69 6e 64 65 72 2d 3e 66 69 6e 64 28 27 75 6e 7a 69 70 27 29 3b 0a 24 62 69 6e 37 7a 69 | .$finder->find('unzip');.$bin7zi |
30560 | 70 20 3d 20 27 27 3b 0a 69 66 20 28 24 68 61 73 53 79 73 74 65 6d 37 7a 69 70 20 3d 20 28 62 6f | p.=.'';.if.($hasSystem7zip.=.(bo |
30580 | 6f 6c 29 20 24 66 69 6e 64 65 72 2d 3e 66 69 6e 64 28 27 37 7a 27 2c 20 6e 75 6c 6c 2c 20 5b 27 | ol).$finder->find('7z',.null,.[' |
305a0 | 43 3a 5c 50 72 6f 67 72 61 6d 20 46 69 6c 65 73 5c 37 2d 5a 69 70 27 5d 29 29 20 7b 0a 24 62 69 | C:\Program.Files\7-Zip'])).{.$bi |
305c0 | 6e 37 7a 69 70 20 3d 20 27 37 7a 27 3b 0a 7d 0a 69 66 20 28 21 50 6c 61 74 66 6f 72 6d 3a 3a 69 | n7zip.=.'7z';.}.if.(!Platform::i |
305e0 | 73 57 69 6e 64 6f 77 73 28 29 20 26 26 20 21 24 68 61 73 53 79 73 74 65 6d 37 7a 69 70 20 26 26 | sWindows().&&.!$hasSystem7zip.&& |
30600 | 20 24 68 61 73 53 79 73 74 65 6d 37 7a 69 70 20 3d 20 28 62 6f 6f 6c 29 20 24 66 69 6e 64 65 72 | .$hasSystem7zip.=.(bool).$finder |
30620 | 2d 3e 66 69 6e 64 28 27 37 7a 7a 27 29 29 20 7b 0a 24 62 69 6e 37 7a 69 70 20 3d 20 27 37 7a 7a | ->find('7zz')).{.$bin7zip.=.'7zz |
30640 | 27 3b 0a 7d 0a 0a 24 69 6f 2d 3e 77 72 69 74 65 28 0a 27 7a 69 70 3a 20 27 20 2e 20 28 65 78 74 | ';.}..$io->write(.'zip:.'...(ext |
30660 | 65 6e 73 69 6f 6e 5f 6c 6f 61 64 65 64 28 27 7a 69 70 27 29 20 3f 20 27 3c 63 6f 6d 6d 65 6e 74 | ension_loaded('zip').?.'<comment |
30680 | 3e 65 78 74 65 6e 73 69 6f 6e 20 70 72 65 73 65 6e 74 3c 2f 63 6f 6d 6d 65 6e 74 3e 27 20 3a 20 | >extension.present</comment>'.:. |
306a0 | 27 3c 63 6f 6d 6d 65 6e 74 3e 65 78 74 65 6e 73 69 6f 6e 20 6e 6f 74 20 6c 6f 61 64 65 64 3c 2f | '<comment>extension.not.loaded</ |
306c0 | 63 6f 6d 6d 65 6e 74 3e 27 29 0a 2e 20 27 2c 20 27 20 2e 20 28 24 68 61 73 53 79 73 74 65 6d 55 | comment>')...',.'...($hasSystemU |
306e0 | 6e 7a 69 70 20 3f 20 27 3c 63 6f 6d 6d 65 6e 74 3e 75 6e 7a 69 70 20 70 72 65 73 65 6e 74 3c 2f | nzip.?.'<comment>unzip.present</ |
30700 | 63 6f 6d 6d 65 6e 74 3e 27 20 3a 20 27 3c 63 6f 6d 6d 65 6e 74 3e 75 6e 7a 69 70 20 6e 6f 74 20 | comment>'.:.'<comment>unzip.not. |
30720 | 61 76 61 69 6c 61 62 6c 65 3c 2f 63 6f 6d 6d 65 6e 74 3e 27 29 0a 2e 20 27 2c 20 27 20 2e 20 28 | available</comment>')...',.'...( |
30740 | 24 68 61 73 53 79 73 74 65 6d 37 7a 69 70 20 3f 20 27 3c 63 6f 6d 6d 65 6e 74 3e 37 2d 5a 69 70 | $hasSystem7zip.?.'<comment>7-Zip |
30760 | 20 70 72 65 73 65 6e 74 20 28 27 2e 24 62 69 6e 37 7a 69 70 2e 27 29 3c 2f 63 6f 6d 6d 65 6e 74 | .present.('.$bin7zip.')</comment |
30780 | 3e 27 20 3a 20 27 3c 63 6f 6d 6d 65 6e 74 3e 37 2d 5a 69 70 20 6e 6f 74 20 61 76 61 69 6c 61 62 | >'.:.'<comment>7-Zip.not.availab |
307a0 | 6c 65 3c 2f 63 6f 6d 6d 65 6e 74 3e 27 29 0a 2e 20 28 28 24 68 61 73 53 79 73 74 65 6d 37 7a 69 | le</comment>')...(($hasSystem7zi |
307c0 | 70 20 7c 7c 20 24 68 61 73 53 79 73 74 65 6d 55 6e 7a 69 70 29 20 26 26 20 21 66 75 6e 63 74 69 | p.||.$hasSystemUnzip).&&.!functi |
307e0 | 6f 6e 5f 65 78 69 73 74 73 28 27 70 72 6f 63 5f 6f 70 65 6e 27 29 20 3f 20 27 2c 20 3c 77 61 72 | on_exists('proc_open').?.',.<war |
30800 | 6e 69 6e 67 3e 70 72 6f 63 5f 6f 70 65 6e 20 69 73 20 64 69 73 61 62 6c 65 64 20 6f 72 20 6e 6f | ning>proc_open.is.disabled.or.no |
30820 | 74 20 70 72 65 73 65 6e 74 2c 20 75 6e 7a 69 70 2f 37 2d 7a 20 77 69 6c 6c 20 6e 6f 74 20 62 65 | t.present,.unzip/7-z.will.not.be |
30840 | 20 75 73 61 62 6c 65 3c 2f 77 61 72 6e 69 6e 67 3e 27 20 3a 20 27 27 29 0a 29 3b 0a 0a 72 65 74 | .usable</warning>'.:.'').);..ret |
30860 | 75 72 6e 20 24 74 68 69 73 2d 3e 65 78 69 74 43 6f 64 65 3b 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 | urn.$this->exitCode;.}.....priva |
30880 | 74 65 20 66 75 6e 63 74 69 6f 6e 20 63 68 65 63 6b 43 6f 6d 70 6f 73 65 72 53 63 68 65 6d 61 28 | te.function.checkComposerSchema( |
308a0 | 29 0a 7b 0a 24 76 61 6c 69 64 61 74 6f 72 20 3d 20 6e 65 77 20 43 6f 6e 66 69 67 56 61 6c 69 64 | ).{.$validator.=.new.ConfigValid |
308c0 | 61 74 6f 72 28 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 29 3b 0a 5b 24 65 72 72 6f 72 73 2c 20 | ator($this->getIO());.[$errors,. |
308e0 | 2c 20 24 77 61 72 6e 69 6e 67 73 5d 20 3d 20 24 76 61 6c 69 64 61 74 6f 72 2d 3e 76 61 6c 69 64 | ,.$warnings].=.$validator->valid |
30900 | 61 74 65 28 46 61 63 74 6f 72 79 3a 3a 67 65 74 43 6f 6d 70 6f 73 65 72 46 69 6c 65 28 29 29 3b | ate(Factory::getComposerFile()); |
30920 | 0a 0a 69 66 20 28 24 65 72 72 6f 72 73 20 7c 7c 20 24 77 61 72 6e 69 6e 67 73 29 20 7b 0a 24 6d | ..if.($errors.||.$warnings).{.$m |
30940 | 65 73 73 61 67 65 73 20 3d 20 5b 0a 27 65 72 72 6f 72 27 20 3d 3e 20 24 65 72 72 6f 72 73 2c 0a | essages.=.[.'error'.=>.$errors,. |
30960 | 27 77 61 72 6e 69 6e 67 27 20 3d 3e 20 24 77 61 72 6e 69 6e 67 73 2c 0a 5d 3b 0a 0a 24 6f 75 74 | 'warning'.=>.$warnings,.];..$out |
30980 | 70 75 74 20 3d 20 27 27 3b 0a 66 6f 72 65 61 63 68 20 28 24 6d 65 73 73 61 67 65 73 20 61 73 20 | put.=.'';.foreach.($messages.as. |
309a0 | 24 73 74 79 6c 65 20 3d 3e 20 24 6d 73 67 73 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 6d 73 67 | $style.=>.$msgs).{.foreach.($msg |
309c0 | 73 20 61 73 20 24 6d 73 67 29 20 7b 0a 24 6f 75 74 70 75 74 20 2e 3d 20 27 3c 27 20 2e 20 24 73 | s.as.$msg).{.$output..=.'<'...$s |
309e0 | 74 79 6c 65 20 2e 20 27 3e 27 20 2e 20 24 6d 73 67 20 2e 20 27 3c 2f 27 20 2e 20 24 73 74 79 6c | tyle...'>'...$msg...'</'...$styl |
30a00 | 65 20 2e 20 27 3e 27 20 2e 20 50 48 50 5f 45 4f 4c 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 72 | e...'>'...PHP_EOL;.}.}..return.r |
30a20 | 74 72 69 6d 28 24 6f 75 74 70 75 74 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d | trim($output);.}..return.true;.} |
30a40 | 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 63 68 65 63 6b 47 69 74 28 29 3a 20 73 | ..private.function.checkGit():.s |
30a60 | 74 72 69 6e 67 0a 7b 0a 69 66 20 28 21 66 75 6e 63 74 69 6f 6e 5f 65 78 69 73 74 73 28 27 70 72 | tring.{.if.(!function_exists('pr |
30a80 | 6f 63 5f 6f 70 65 6e 27 29 29 20 7b 0a 72 65 74 75 72 6e 20 27 3c 63 6f 6d 6d 65 6e 74 3e 70 72 | oc_open')).{.return.'<comment>pr |
30aa0 | 6f 63 5f 6f 70 65 6e 20 69 73 20 6e 6f 74 20 61 76 61 69 6c 61 62 6c 65 2c 20 67 69 74 20 63 61 | oc_open.is.not.available,.git.ca |
30ac0 | 6e 6e 6f 74 20 62 65 20 75 73 65 64 3c 2f 63 6f 6d 6d 65 6e 74 3e 27 3b 0a 7d 0a 0a 24 74 68 69 | nnot.be.used</comment>';.}..$thi |
30ae0 | 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 65 78 65 63 75 74 65 28 27 67 69 74 20 63 6f 6e 66 69 67 20 | s->process->execute('git.config. |
30b00 | 63 6f 6c 6f 72 2e 75 69 27 2c 20 24 6f 75 74 70 75 74 29 3b 0a 69 66 20 28 73 74 72 74 6f 6c 6f | color.ui',.$output);.if.(strtolo |
30b20 | 77 65 72 28 74 72 69 6d 28 24 6f 75 74 70 75 74 29 29 20 3d 3d 3d 20 27 61 6c 77 61 79 73 27 29 | wer(trim($output)).===.'always') |
30b40 | 20 7b 0a 72 65 74 75 72 6e 20 27 3c 63 6f 6d 6d 65 6e 74 3e 59 6f 75 72 20 67 69 74 20 63 6f 6c | .{.return.'<comment>Your.git.col |
30b60 | 6f 72 2e 75 69 20 73 65 74 74 69 6e 67 20 69 73 20 73 65 74 20 74 6f 20 61 6c 77 61 79 73 2c 20 | or.ui.setting.is.set.to.always,. |
30b80 | 74 68 69 73 20 69 73 20 6b 6e 6f 77 6e 20 74 6f 20 63 72 65 61 74 65 20 69 73 73 75 65 73 2e 20 | this.is.known.to.create.issues.. |
30ba0 | 55 73 65 20 22 67 69 74 20 63 6f 6e 66 69 67 20 2d 2d 67 6c 6f 62 61 6c 20 63 6f 6c 6f 72 2e 75 | Use."git.config.--global.color.u |
30bc0 | 69 20 74 72 75 65 22 20 74 6f 20 73 65 74 20 69 74 20 63 6f 72 72 65 63 74 6c 79 2e 3c 2f 63 6f | i.true".to.set.it.correctly.</co |
30be0 | 6d 6d 65 6e 74 3e 27 3b 0a 7d 0a 0a 24 67 69 74 56 65 72 73 69 6f 6e 20 3d 20 47 69 74 3a 3a 67 | mment>';.}..$gitVersion.=.Git::g |
30c00 | 65 74 56 65 72 73 69 6f 6e 28 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 29 3b 0a 69 66 20 28 6e | etVersion($this->process);.if.(n |
30c20 | 75 6c 6c 20 3d 3d 3d 20 24 67 69 74 56 65 72 73 69 6f 6e 29 20 7b 0a 72 65 74 75 72 6e 20 27 3c | ull.===.$gitVersion).{.return.'< |
30c40 | 63 6f 6d 6d 65 6e 74 3e 4e 6f 20 67 69 74 20 70 72 6f 63 65 73 73 20 66 6f 75 6e 64 3c 2f 3e 27 | comment>No.git.process.found</>' |
30c60 | 3b 0a 7d 0a 0a 69 66 20 28 76 65 72 73 69 6f 6e 5f 63 6f 6d 70 61 72 65 28 27 32 2e 32 34 2e 30 | ;.}..if.(version_compare('2.24.0 |
30c80 | 27 2c 20 24 67 69 74 56 65 72 73 69 6f 6e 2c 20 27 3e 27 29 29 20 7b 0a 72 65 74 75 72 6e 20 27 | ',.$gitVersion,.'>')).{.return.' |
30ca0 | 3c 77 61 72 6e 69 6e 67 3e 59 6f 75 72 20 67 69 74 20 76 65 72 73 69 6f 6e 20 28 27 2e 24 67 69 | <warning>Your.git.version.('.$gi |
30cc0 | 74 56 65 72 73 69 6f 6e 2e 27 29 20 69 73 20 74 6f 6f 20 6f 6c 64 20 61 6e 64 20 70 6f 73 73 69 | tVersion.').is.too.old.and.possi |
30ce0 | 62 6c 79 20 77 69 6c 6c 20 63 61 75 73 65 20 69 73 73 75 65 73 2e 20 50 6c 65 61 73 65 20 75 70 | bly.will.cause.issues..Please.up |
30d00 | 67 72 61 64 65 20 74 6f 20 67 69 74 20 32 2e 32 34 20 6f 72 20 61 62 6f 76 65 3c 2f 3e 27 3b 0a | grade.to.git.2.24.or.above</>';. |
30d20 | 7d 0a 0a 72 65 74 75 72 6e 20 27 3c 69 6e 66 6f 3e 4f 4b 3c 2f 3e 20 3c 63 6f 6d 6d 65 6e 74 3e | }..return.'<info>OK</>.<comment> |
30d40 | 67 69 74 20 76 65 72 73 69 6f 6e 20 27 2e 24 67 69 74 56 65 72 73 69 6f 6e 2e 27 3c 2f 3e 27 3b | git.version.'.$gitVersion.'</>'; |
30d60 | 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 63 68 65 63 6b 48 74 74 | .}.....private.function.checkHtt |
30d80 | 70 28 73 74 72 69 6e 67 20 24 70 72 6f 74 6f 2c 20 43 6f 6e 66 69 67 20 24 63 6f 6e 66 69 67 29 | p(string.$proto,.Config.$config) |
30da0 | 0a 7b 0a 24 72 65 73 75 6c 74 20 3d 20 24 74 68 69 73 2d 3e 63 68 65 63 6b 43 6f 6e 6e 65 63 74 | .{.$result.=.$this->checkConnect |
30dc0 | 69 76 69 74 79 28 29 3b 0a 69 66 20 28 24 72 65 73 75 6c 74 20 21 3d 3d 20 74 72 75 65 29 20 7b | ivity();.if.($result.!==.true).{ |
30de0 | 0a 72 65 74 75 72 6e 20 24 72 65 73 75 6c 74 3b 0a 7d 0a 0a 24 72 65 73 75 6c 74 20 3d 20 5b 5d | .return.$result;.}..$result.=.[] |
30e00 | 3b 0a 69 66 20 28 24 70 72 6f 74 6f 20 3d 3d 3d 20 27 68 74 74 70 73 27 20 26 26 20 24 63 6f 6e | ;.if.($proto.===.'https'.&&.$con |
30e20 | 66 69 67 2d 3e 67 65 74 28 27 64 69 73 61 62 6c 65 2d 74 6c 73 27 29 20 3d 3d 3d 20 74 72 75 65 | fig->get('disable-tls').===.true |
30e40 | 29 20 7b 0a 24 74 6c 73 57 61 72 6e 69 6e 67 20 3d 20 27 3c 77 61 72 6e 69 6e 67 3e 43 6f 6d 70 | ).{.$tlsWarning.=.'<warning>Comp |
30e60 | 6f 73 65 72 20 69 73 20 63 6f 6e 66 69 67 75 72 65 64 20 74 6f 20 64 69 73 61 62 6c 65 20 53 53 | oser.is.configured.to.disable.SS |
30e80 | 4c 2f 54 4c 53 20 70 72 6f 74 65 63 74 69 6f 6e 2e 20 54 68 69 73 20 77 69 6c 6c 20 6c 65 61 76 | L/TLS.protection..This.will.leav |
30ea0 | 65 20 72 65 6d 6f 74 65 20 48 54 54 50 53 20 72 65 71 75 65 73 74 73 20 76 75 6c 6e 65 72 61 62 | e.remote.HTTPS.requests.vulnerab |
30ec0 | 6c 65 20 74 6f 20 4d 61 6e 2d 49 6e 2d 54 68 65 2d 4d 69 64 64 6c 65 20 61 74 74 61 63 6b 73 2e | le.to.Man-In-The-Middle.attacks. |
30ee0 | 3c 2f 77 61 72 6e 69 6e 67 3e 27 3b 0a 7d 0a 0a 74 72 79 20 7b 0a 24 74 68 69 73 2d 3e 68 74 74 | </warning>';.}..try.{.$this->htt |
30f00 | 70 44 6f 77 6e 6c 6f 61 64 65 72 2d 3e 67 65 74 28 24 70 72 6f 74 6f 20 2e 20 27 3a 2f 2f 72 65 | pDownloader->get($proto...'://re |
30f20 | 70 6f 2e 70 61 63 6b 61 67 69 73 74 2e 6f 72 67 2f 70 61 63 6b 61 67 65 73 2e 6a 73 6f 6e 27 29 | po.packagist.org/packages.json') |
30f40 | 3b 0a 7d 20 63 61 74 63 68 20 28 54 72 61 6e 73 70 6f 72 74 45 78 63 65 70 74 69 6f 6e 20 24 65 | ;.}.catch.(TransportException.$e |
30f60 | 29 20 7b 0a 24 68 69 6e 74 73 20 3d 20 48 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 3a 3a 67 65 74 | ).{.$hints.=.HttpDownloader::get |
30f80 | 45 78 63 65 70 74 69 6f 6e 48 69 6e 74 73 28 24 65 29 3b 0a 69 66 20 28 6e 75 6c 6c 20 21 3d 3d | ExceptionHints($e);.if.(null.!== |
30fa0 | 20 24 68 69 6e 74 73 20 26 26 20 63 6f 75 6e 74 28 24 68 69 6e 74 73 29 20 3e 20 30 29 20 7b 0a | .$hints.&&.count($hints).>.0).{. |
30fc0 | 66 6f 72 65 61 63 68 20 28 24 68 69 6e 74 73 20 61 73 20 24 68 69 6e 74 29 20 7b 0a 24 72 65 73 | foreach.($hints.as.$hint).{.$res |
30fe0 | 75 6c 74 5b 5d 20 3d 20 24 68 69 6e 74 3b 0a 7d 0a 7d 0a 0a 24 72 65 73 75 6c 74 5b 5d 20 3d 20 | ult[].=.$hint;.}.}..$result[].=. |
31000 | 27 3c 65 72 72 6f 72 3e 5b 27 20 2e 20 67 65 74 5f 63 6c 61 73 73 28 24 65 29 20 2e 20 27 5d 20 | '<error>['...get_class($e)...']. |
31020 | 27 20 2e 20 24 65 2d 3e 67 65 74 4d 65 73 73 61 67 65 28 29 20 2e 20 27 3c 2f 65 72 72 6f 72 3e | '...$e->getMessage()...'</error> |
31040 | 27 3b 0a 7d 0a 0a 69 66 20 28 69 73 73 65 74 28 24 74 6c 73 57 61 72 6e 69 6e 67 29 29 20 7b 0a | ';.}..if.(isset($tlsWarning)).{. |
31060 | 24 72 65 73 75 6c 74 5b 5d 20 3d 20 24 74 6c 73 57 61 72 6e 69 6e 67 3b 0a 7d 0a 0a 69 66 20 28 | $result[].=.$tlsWarning;.}..if.( |
31080 | 63 6f 75 6e 74 28 24 72 65 73 75 6c 74 29 20 3e 20 30 29 20 7b 0a 72 65 74 75 72 6e 20 24 72 65 | count($result).>.0).{.return.$re |
310a0 | 73 75 6c 74 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 | sult;.}..return.true;.}.....priv |
310c0 | 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 63 68 65 63 6b 48 74 74 70 50 72 6f 78 79 28 29 0a 7b 0a | ate.function.checkHttpProxy().{. |
310e0 | 24 72 65 73 75 6c 74 20 3d 20 24 74 68 69 73 2d 3e 63 68 65 63 6b 43 6f 6e 6e 65 63 74 69 76 69 | $result.=.$this->checkConnectivi |
31100 | 74 79 28 29 3b 0a 69 66 20 28 24 72 65 73 75 6c 74 20 21 3d 3d 20 74 72 75 65 29 20 7b 0a 72 65 | ty();.if.($result.!==.true).{.re |
31120 | 74 75 72 6e 20 24 72 65 73 75 6c 74 3b 0a 7d 0a 0a 24 70 72 6f 74 6f 63 6f 6c 20 3d 20 65 78 74 | turn.$result;.}..$protocol.=.ext |
31140 | 65 6e 73 69 6f 6e 5f 6c 6f 61 64 65 64 28 27 6f 70 65 6e 73 73 6c 27 29 20 3f 20 27 68 74 74 70 | ension_loaded('openssl').?.'http |
31160 | 73 27 20 3a 20 27 68 74 74 70 27 3b 0a 74 72 79 20 7b 0a 24 6a 73 6f 6e 20 3d 20 24 74 68 69 73 | s'.:.'http';.try.{.$json.=.$this |
31180 | 2d 3e 68 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 2d 3e 67 65 74 28 24 70 72 6f 74 6f 63 6f 6c 20 | ->httpDownloader->get($protocol. |
311a0 | 2e 20 27 3a 2f 2f 72 65 70 6f 2e 70 61 63 6b 61 67 69 73 74 2e 6f 72 67 2f 70 61 63 6b 61 67 65 | ..'://repo.packagist.org/package |
311c0 | 73 2e 6a 73 6f 6e 27 29 2d 3e 64 65 63 6f 64 65 4a 73 6f 6e 28 29 3b 0a 24 68 61 73 68 20 3d 20 | s.json')->decodeJson();.$hash.=. |
311e0 | 72 65 73 65 74 28 24 6a 73 6f 6e 5b 27 70 72 6f 76 69 64 65 72 2d 69 6e 63 6c 75 64 65 73 27 5d | reset($json['provider-includes'] |
31200 | 29 3b 0a 24 68 61 73 68 20 3d 20 24 68 61 73 68 5b 27 73 68 61 32 35 36 27 5d 3b 0a 24 70 61 74 | );.$hash.=.$hash['sha256'];.$pat |
31220 | 68 20 3d 20 73 74 72 5f 72 65 70 6c 61 63 65 28 27 25 68 61 73 68 25 27 2c 20 24 68 61 73 68 2c | h.=.str_replace('%hash%',.$hash, |
31240 | 20 6b 65 79 28 24 6a 73 6f 6e 5b 27 70 72 6f 76 69 64 65 72 2d 69 6e 63 6c 75 64 65 73 27 5d 29 | .key($json['provider-includes']) |
31260 | 29 3b 0a 24 70 72 6f 76 69 64 65 72 20 3d 20 24 74 68 69 73 2d 3e 68 74 74 70 44 6f 77 6e 6c 6f | );.$provider.=.$this->httpDownlo |
31280 | 61 64 65 72 2d 3e 67 65 74 28 24 70 72 6f 74 6f 63 6f 6c 20 2e 20 27 3a 2f 2f 72 65 70 6f 2e 70 | ader->get($protocol...'://repo.p |
312a0 | 61 63 6b 61 67 69 73 74 2e 6f 72 67 2f 27 2e 24 70 61 74 68 29 2d 3e 67 65 74 42 6f 64 79 28 29 | ackagist.org/'.$path)->getBody() |
312c0 | 3b 0a 0a 69 66 20 28 68 61 73 68 28 27 73 68 61 32 35 36 27 2c 20 24 70 72 6f 76 69 64 65 72 29 | ;..if.(hash('sha256',.$provider) |
312e0 | 20 21 3d 3d 20 24 68 61 73 68 29 20 7b 0a 72 65 74 75 72 6e 20 27 49 74 20 73 65 65 6d 73 20 74 | .!==.$hash).{.return.'It.seems.t |
31300 | 68 61 74 20 79 6f 75 72 20 70 72 6f 78 79 20 69 73 20 6d 6f 64 69 66 79 69 6e 67 20 68 74 74 70 | hat.your.proxy.is.modifying.http |
31320 | 20 74 72 61 66 66 69 63 20 6f 6e 20 74 68 65 20 66 6c 79 27 3b 0a 7d 0a 7d 20 63 61 74 63 68 20 | .traffic.on.the.fly';.}.}.catch. |
31340 | 28 5c 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 72 65 74 75 72 6e 20 24 65 3b 0a 7d 0a 0a | (\Exception.$e).{.return.$e;.}.. |
31360 | 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 | return.true;.}.....private.funct |
31380 | 69 6f 6e 20 63 68 65 63 6b 47 69 74 68 75 62 4f 61 75 74 68 28 73 74 72 69 6e 67 20 24 64 6f 6d | ion.checkGithubOauth(string.$dom |
313a0 | 61 69 6e 2c 20 73 74 72 69 6e 67 20 24 74 6f 6b 65 6e 29 0a 7b 0a 24 72 65 73 75 6c 74 20 3d 20 | ain,.string.$token).{.$result.=. |
313c0 | 24 74 68 69 73 2d 3e 63 68 65 63 6b 43 6f 6e 6e 65 63 74 69 76 69 74 79 28 29 3b 0a 69 66 20 28 | $this->checkConnectivity();.if.( |
313e0 | 24 72 65 73 75 6c 74 20 21 3d 3d 20 74 72 75 65 29 20 7b 0a 72 65 74 75 72 6e 20 24 72 65 73 75 | $result.!==.true).{.return.$resu |
31400 | 6c 74 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 2d 3e 73 65 74 41 75 74 68 65 6e | lt;.}..$this->getIO()->setAuthen |
31420 | 74 69 63 61 74 69 6f 6e 28 24 64 6f 6d 61 69 6e 2c 20 24 74 6f 6b 65 6e 2c 20 27 78 2d 6f 61 75 | tication($domain,.$token,.'x-oau |
31440 | 74 68 2d 62 61 73 69 63 27 29 3b 0a 74 72 79 20 7b 0a 24 75 72 6c 20 3d 20 24 64 6f 6d 61 69 6e | th-basic');.try.{.$url.=.$domain |
31460 | 20 3d 3d 3d 20 27 67 69 74 68 75 62 2e 63 6f 6d 27 20 3f 20 27 68 74 74 70 73 3a 2f 2f 61 70 69 | .===.'github.com'.?.'https://api |
31480 | 2e 27 2e 24 64 6f 6d 61 69 6e 2e 27 2f 27 20 3a 20 27 68 74 74 70 73 3a 2f 2f 27 2e 24 64 6f 6d | .'.$domain.'/'.:.'https://'.$dom |
314a0 | 61 69 6e 2e 27 2f 61 70 69 2f 76 33 2f 27 3b 0a 0a 24 74 68 69 73 2d 3e 68 74 74 70 44 6f 77 6e | ain.'/api/v3/';..$this->httpDown |
314c0 | 6c 6f 61 64 65 72 2d 3e 67 65 74 28 24 75 72 6c 2c 20 5b 0a 27 72 65 74 72 79 2d 61 75 74 68 2d | loader->get($url,.[.'retry-auth- |
314e0 | 66 61 69 6c 75 72 65 27 20 3d 3e 20 66 61 6c 73 65 2c 0a 5d 29 3b 0a 0a 72 65 74 75 72 6e 20 74 | failure'.=>.false,.]);..return.t |
31500 | 72 75 65 3b 0a 7d 20 63 61 74 63 68 20 28 5c 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 69 | rue;.}.catch.(\Exception.$e).{.i |
31520 | 66 20 28 24 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 54 72 61 6e 73 70 6f 72 74 45 78 63 65 70 74 | f.($e.instanceof.TransportExcept |
31540 | 69 6f 6e 20 26 26 20 24 65 2d 3e 67 65 74 43 6f 64 65 28 29 20 3d 3d 3d 20 34 30 31 29 20 7b 0a | ion.&&.$e->getCode().===.401).{. |
31560 | 72 65 74 75 72 6e 20 27 3c 63 6f 6d 6d 65 6e 74 3e 54 68 65 20 6f 61 75 74 68 20 74 6f 6b 65 6e | return.'<comment>The.oauth.token |
31580 | 20 66 6f 72 20 27 2e 24 64 6f 6d 61 69 6e 2e 27 20 73 65 65 6d 73 20 69 6e 76 61 6c 69 64 2c 20 | .for.'.$domain.'.seems.invalid,. |
315a0 | 72 75 6e 20 22 63 6f 6d 70 6f 73 65 72 20 63 6f 6e 66 69 67 20 2d 2d 67 6c 6f 62 61 6c 20 2d 2d | run."composer.config.--global.-- |
315c0 | 75 6e 73 65 74 20 67 69 74 68 75 62 2d 6f 61 75 74 68 2e 27 2e 24 64 6f 6d 61 69 6e 2e 27 22 20 | unset.github-oauth.'.$domain.'". |
315e0 | 74 6f 20 72 65 6d 6f 76 65 20 69 74 3c 2f 63 6f 6d 6d 65 6e 74 3e 27 3b 0a 7d 0a 0a 72 65 74 75 | to.remove.it</comment>';.}..retu |
31600 | 72 6e 20 24 65 3b 0a 7d 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f | rn.$e;.}.}.......private.functio |
31620 | 6e 20 67 65 74 47 69 74 68 75 62 52 61 74 65 4c 69 6d 69 74 28 73 74 72 69 6e 67 20 24 64 6f 6d | n.getGithubRateLimit(string.$dom |
31640 | 61 69 6e 2c 20 3f 73 74 72 69 6e 67 20 24 74 6f 6b 65 6e 20 3d 20 6e 75 6c 6c 29 0a 7b 0a 24 72 | ain,.?string.$token.=.null).{.$r |
31660 | 65 73 75 6c 74 20 3d 20 24 74 68 69 73 2d 3e 63 68 65 63 6b 43 6f 6e 6e 65 63 74 69 76 69 74 79 | esult.=.$this->checkConnectivity |
31680 | 28 29 3b 0a 69 66 20 28 24 72 65 73 75 6c 74 20 21 3d 3d 20 74 72 75 65 29 20 7b 0a 72 65 74 75 | ();.if.($result.!==.true).{.retu |
316a0 | 72 6e 20 24 72 65 73 75 6c 74 3b 0a 7d 0a 0a 69 66 20 28 24 74 6f 6b 65 6e 29 20 7b 0a 24 74 68 | rn.$result;.}..if.($token).{.$th |
316c0 | 69 73 2d 3e 67 65 74 49 4f 28 29 2d 3e 73 65 74 41 75 74 68 65 6e 74 69 63 61 74 69 6f 6e 28 24 | is->getIO()->setAuthentication($ |
316e0 | 64 6f 6d 61 69 6e 2c 20 24 74 6f 6b 65 6e 2c 20 27 78 2d 6f 61 75 74 68 2d 62 61 73 69 63 27 29 | domain,.$token,.'x-oauth-basic') |
31700 | 3b 0a 7d 0a 0a 24 75 72 6c 20 3d 20 24 64 6f 6d 61 69 6e 20 3d 3d 3d 20 27 67 69 74 68 75 62 2e | ;.}..$url.=.$domain.===.'github. |
31720 | 63 6f 6d 27 20 3f 20 27 68 74 74 70 73 3a 2f 2f 61 70 69 2e 27 2e 24 64 6f 6d 61 69 6e 2e 27 2f | com'.?.'https://api.'.$domain.'/ |
31740 | 72 61 74 65 5f 6c 69 6d 69 74 27 20 3a 20 27 68 74 74 70 73 3a 2f 2f 27 2e 24 64 6f 6d 61 69 6e | rate_limit'.:.'https://'.$domain |
31760 | 2e 27 2f 61 70 69 2f 72 61 74 65 5f 6c 69 6d 69 74 27 3b 0a 24 64 61 74 61 20 3d 20 24 74 68 69 | .'/api/rate_limit';.$data.=.$thi |
31780 | 73 2d 3e 68 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 2d 3e 67 65 74 28 24 75 72 6c 2c 20 5b 27 72 | s->httpDownloader->get($url,.['r |
317a0 | 65 74 72 79 2d 61 75 74 68 2d 66 61 69 6c 75 72 65 27 20 3d 3e 20 66 61 6c 73 65 5d 29 2d 3e 64 | etry-auth-failure'.=>.false])->d |
317c0 | 65 63 6f 64 65 4a 73 6f 6e 28 29 3b 0a 0a 72 65 74 75 72 6e 20 24 64 61 74 61 5b 27 72 65 73 6f | ecodeJson();..return.$data['reso |
317e0 | 75 72 63 65 73 27 5d 5b 27 63 6f 72 65 27 5d 3b 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 | urces']['core'];.}.....private.f |
31800 | 75 6e 63 74 69 6f 6e 20 63 68 65 63 6b 44 69 73 6b 53 70 61 63 65 28 43 6f 6e 66 69 67 20 24 63 | unction.checkDiskSpace(Config.$c |
31820 | 6f 6e 66 69 67 29 0a 7b 0a 69 66 20 28 21 66 75 6e 63 74 69 6f 6e 5f 65 78 69 73 74 73 28 27 64 | onfig).{.if.(!function_exists('d |
31840 | 69 73 6b 5f 66 72 65 65 5f 73 70 61 63 65 27 29 29 20 7b 0a 72 65 74 75 72 6e 20 74 72 75 65 3b | isk_free_space')).{.return.true; |
31860 | 0a 7d 0a 0a 24 6d 69 6e 53 70 61 63 65 46 72 65 65 20 3d 20 31 30 32 34 20 2a 20 31 30 32 34 3b | .}..$minSpaceFree.=.1024.*.1024; |
31880 | 0a 69 66 20 28 28 28 24 64 66 20 3d 20 40 64 69 73 6b 5f 66 72 65 65 5f 73 70 61 63 65 28 24 64 | .if.((($df.=.@disk_free_space($d |
318a0 | 69 72 20 3d 20 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 68 6f 6d 65 27 29 29 29 20 21 3d 3d 20 | ir.=.$config->get('home'))).!==. |
318c0 | 66 61 6c 73 65 20 26 26 20 24 64 66 20 3c 20 24 6d 69 6e 53 70 61 63 65 46 72 65 65 29 0a 7c 7c | false.&&.$df.<.$minSpaceFree).|| |
318e0 | 20 28 28 24 64 66 20 3d 20 40 64 69 73 6b 5f 66 72 65 65 5f 73 70 61 63 65 28 24 64 69 72 20 3d | .(($df.=.@disk_free_space($dir.= |
31900 | 20 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 76 65 6e 64 6f 72 2d 64 69 72 27 29 29 29 20 21 3d | .$config->get('vendor-dir'))).!= |
31920 | 3d 20 66 61 6c 73 65 20 26 26 20 24 64 66 20 3c 20 24 6d 69 6e 53 70 61 63 65 46 72 65 65 29 0a | =.false.&&.$df.<.$minSpaceFree). |
31940 | 29 20 7b 0a 72 65 74 75 72 6e 20 27 3c 65 72 72 6f 72 3e 54 68 65 20 64 69 73 6b 20 68 6f 73 74 | ).{.return.'<error>The.disk.host |
31960 | 69 6e 67 20 27 2e 24 64 69 72 2e 27 20 69 73 20 66 75 6c 6c 3c 2f 65 72 72 6f 72 3e 27 3b 0a 7d | ing.'.$dir.'.is.full</error>';.} |
31980 | 0a 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e | ..return.true;.}.....private.fun |
319a0 | 63 74 69 6f 6e 20 63 68 65 63 6b 50 75 62 4b 65 79 73 28 43 6f 6e 66 69 67 20 24 63 6f 6e 66 69 | ction.checkPubKeys(Config.$confi |
319c0 | 67 29 0a 7b 0a 24 68 6f 6d 65 20 3d 20 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 68 6f 6d 65 27 | g).{.$home.=.$config->get('home' |
319e0 | 29 3b 0a 24 65 72 72 6f 72 73 20 3d 20 5b 5d 3b 0a 24 69 6f 20 3d 20 24 74 68 69 73 2d 3e 67 65 | );.$errors.=.[];.$io.=.$this->ge |
31a00 | 74 49 4f 28 29 3b 0a 0a 69 66 20 28 66 69 6c 65 5f 65 78 69 73 74 73 28 24 68 6f 6d 65 2e 27 2f | tIO();..if.(file_exists($home.'/ |
31a20 | 6b 65 79 73 2e 74 61 67 73 2e 70 75 62 27 29 20 26 26 20 66 69 6c 65 5f 65 78 69 73 74 73 28 24 | keys.tags.pub').&&.file_exists($ |
31a40 | 68 6f 6d 65 2e 27 2f 6b 65 79 73 2e 64 65 76 2e 70 75 62 27 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 | home.'/keys.dev.pub')).{.$io->wr |
31a60 | 69 74 65 28 27 27 29 3b 0a 7d 0a 0a 69 66 20 28 66 69 6c 65 5f 65 78 69 73 74 73 28 24 68 6f 6d | ite('');.}..if.(file_exists($hom |
31a80 | 65 2e 27 2f 6b 65 79 73 2e 74 61 67 73 2e 70 75 62 27 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 | e.'/keys.tags.pub')).{.$io->writ |
31aa0 | 65 28 27 54 61 67 73 20 50 75 62 6c 69 63 20 4b 65 79 20 46 69 6e 67 65 72 70 72 69 6e 74 3a 20 | e('Tags.Public.Key.Fingerprint:. |
31ac0 | 27 20 2e 20 4b 65 79 73 3a 3a 66 69 6e 67 65 72 70 72 69 6e 74 28 24 68 6f 6d 65 2e 27 2f 6b 65 | '...Keys::fingerprint($home.'/ke |
31ae0 | 79 73 2e 74 61 67 73 2e 70 75 62 27 29 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 65 72 72 6f 72 73 | ys.tags.pub'));.}.else.{.$errors |
31b00 | 5b 5d 20 3d 20 27 3c 65 72 72 6f 72 3e 4d 69 73 73 69 6e 67 20 70 75 62 6b 65 79 20 66 6f 72 20 | [].=.'<error>Missing.pubkey.for. |
31b20 | 74 61 67 73 20 76 65 72 69 66 69 63 61 74 69 6f 6e 3c 2f 65 72 72 6f 72 3e 27 3b 0a 7d 0a 0a 69 | tags.verification</error>';.}..i |
31b40 | 66 20 28 66 69 6c 65 5f 65 78 69 73 74 73 28 24 68 6f 6d 65 2e 27 2f 6b 65 79 73 2e 64 65 76 2e | f.(file_exists($home.'/keys.dev. |
31b60 | 70 75 62 27 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 44 65 76 20 50 75 62 6c 69 63 20 | pub')).{.$io->write('Dev.Public. |
31b80 | 4b 65 79 20 46 69 6e 67 65 72 70 72 69 6e 74 3a 20 27 20 2e 20 4b 65 79 73 3a 3a 66 69 6e 67 65 | Key.Fingerprint:.'...Keys::finge |
31ba0 | 72 70 72 69 6e 74 28 24 68 6f 6d 65 2e 27 2f 6b 65 79 73 2e 64 65 76 2e 70 75 62 27 29 29 3b 0a | rprint($home.'/keys.dev.pub'));. |
31bc0 | 7d 20 65 6c 73 65 20 7b 0a 24 65 72 72 6f 72 73 5b 5d 20 3d 20 27 3c 65 72 72 6f 72 3e 4d 69 73 | }.else.{.$errors[].=.'<error>Mis |
31be0 | 73 69 6e 67 20 70 75 62 6b 65 79 20 66 6f 72 20 64 65 76 20 76 65 72 69 66 69 63 61 74 69 6f 6e | sing.pubkey.for.dev.verification |
31c00 | 3c 2f 65 72 72 6f 72 3e 27 3b 0a 7d 0a 0a 69 66 20 28 24 65 72 72 6f 72 73 29 20 7b 0a 24 65 72 | </error>';.}..if.($errors).{.$er |
31c20 | 72 6f 72 73 5b 5d 20 3d 20 27 3c 65 72 72 6f 72 3e 52 75 6e 20 63 6f 6d 70 6f 73 65 72 20 73 65 | rors[].=.'<error>Run.composer.se |
31c40 | 6c 66 2d 75 70 64 61 74 65 20 2d 2d 75 70 64 61 74 65 2d 6b 65 79 73 20 74 6f 20 73 65 74 20 74 | lf-update.--update-keys.to.set.t |
31c60 | 68 65 6d 20 75 70 3c 2f 65 72 72 6f 72 3e 27 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 65 72 72 6f | hem.up</error>';.}..return.$erro |
31c80 | 72 73 20 3f 3a 20 74 72 75 65 3b 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 | rs.?:.true;.}.....private.functi |
31ca0 | 6f 6e 20 63 68 65 63 6b 56 65 72 73 69 6f 6e 28 43 6f 6e 66 69 67 20 24 63 6f 6e 66 69 67 29 0a | on.checkVersion(Config.$config). |
31cc0 | 7b 0a 24 72 65 73 75 6c 74 20 3d 20 24 74 68 69 73 2d 3e 63 68 65 63 6b 43 6f 6e 6e 65 63 74 69 | {.$result.=.$this->checkConnecti |
31ce0 | 76 69 74 79 28 29 3b 0a 69 66 20 28 24 72 65 73 75 6c 74 20 21 3d 3d 20 74 72 75 65 29 20 7b 0a | vity();.if.($result.!==.true).{. |
31d00 | 72 65 74 75 72 6e 20 24 72 65 73 75 6c 74 3b 0a 7d 0a 0a 24 76 65 72 73 69 6f 6e 73 55 74 69 6c | return.$result;.}..$versionsUtil |
31d20 | 20 3d 20 6e 65 77 20 56 65 72 73 69 6f 6e 73 28 24 63 6f 6e 66 69 67 2c 20 24 74 68 69 73 2d 3e | .=.new.Versions($config,.$this-> |
31d40 | 68 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 29 3b 0a 74 72 79 20 7b 0a 24 6c 61 74 65 73 74 20 3d | httpDownloader);.try.{.$latest.= |
31d60 | 20 24 76 65 72 73 69 6f 6e 73 55 74 69 6c 2d 3e 67 65 74 4c 61 74 65 73 74 28 29 3b 0a 7d 20 63 | .$versionsUtil->getLatest();.}.c |
31d80 | 61 74 63 68 20 28 5c 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 72 65 74 75 72 6e 20 24 65 | atch.(\Exception.$e).{.return.$e |
31da0 | 3b 0a 7d 0a 0a 69 66 20 28 43 6f 6d 70 6f 73 65 72 3a 3a 56 45 52 53 49 4f 4e 20 21 3d 3d 20 24 | ;.}..if.(Composer::VERSION.!==.$ |
31dc0 | 6c 61 74 65 73 74 5b 27 76 65 72 73 69 6f 6e 27 5d 20 26 26 20 43 6f 6d 70 6f 73 65 72 3a 3a 56 | latest['version'].&&.Composer::V |
31de0 | 45 52 53 49 4f 4e 20 21 3d 3d 20 27 40 70 61 63 6b 61 67 65 5f 76 65 72 73 69 6f 6e 40 27 29 20 | ERSION.!==.'@package_version@'). |
31e00 | 7b 0a 72 65 74 75 72 6e 20 27 3c 63 6f 6d 6d 65 6e 74 3e 59 6f 75 20 61 72 65 20 6e 6f 74 20 72 | {.return.'<comment>You.are.not.r |
31e20 | 75 6e 6e 69 6e 67 20 74 68 65 20 6c 61 74 65 73 74 20 27 2e 24 76 65 72 73 69 6f 6e 73 55 74 69 | unning.the.latest.'.$versionsUti |
31e40 | 6c 2d 3e 67 65 74 43 68 61 6e 6e 65 6c 28 29 2e 27 20 76 65 72 73 69 6f 6e 2c 20 72 75 6e 20 60 | l->getChannel().'.version,.run.` |
31e60 | 63 6f 6d 70 6f 73 65 72 20 73 65 6c 66 2d 75 70 64 61 74 65 60 20 74 6f 20 75 70 64 61 74 65 20 | composer.self-update`.to.update. |
31e80 | 28 27 2e 43 6f 6d 70 6f 73 65 72 3a 3a 56 45 52 53 49 4f 4e 2e 27 20 3d 3e 20 27 2e 24 6c 61 74 | ('.Composer::VERSION.'.=>.'.$lat |
31ea0 | 65 73 74 5b 27 76 65 72 73 69 6f 6e 27 5d 2e 27 29 3c 2f 63 6f 6d 6d 65 6e 74 3e 27 3b 0a 7d 0a | est['version'].')</comment>';.}. |
31ec0 | 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f | .return.true;.}..private.functio |
31ee0 | 6e 20 67 65 74 43 75 72 6c 56 65 72 73 69 6f 6e 28 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 69 66 20 | n.getCurlVersion():.string.{.if. |
31f00 | 28 65 78 74 65 6e 73 69 6f 6e 5f 6c 6f 61 64 65 64 28 27 63 75 72 6c 27 29 29 20 7b 0a 69 66 20 | (extension_loaded('curl')).{.if. |
31f20 | 28 21 48 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 3a 3a 69 73 43 75 72 6c 45 6e 61 62 6c 65 64 28 | (!HttpDownloader::isCurlEnabled( |
31f40 | 29 29 20 7b 0a 72 65 74 75 72 6e 20 27 3c 65 72 72 6f 72 3e 64 69 73 61 62 6c 65 64 20 76 69 61 | )).{.return.'<error>disabled.via |
31f60 | 20 64 69 73 61 62 6c 65 5f 66 75 6e 63 74 69 6f 6e 73 2c 20 75 73 69 6e 67 20 70 68 70 20 73 74 | .disable_functions,.using.php.st |
31f80 | 72 65 61 6d 73 20 66 61 6c 6c 62 61 63 6b 2c 20 77 68 69 63 68 20 72 65 64 75 63 65 73 20 70 65 | reams.fallback,.which.reduces.pe |
31fa0 | 72 66 6f 72 6d 61 6e 63 65 3c 2f 65 72 72 6f 72 3e 27 3b 0a 7d 0a 0a 24 76 65 72 73 69 6f 6e 20 | rformance</error>';.}..$version. |
31fc0 | 3d 20 63 75 72 6c 5f 76 65 72 73 69 6f 6e 28 29 3b 0a 0a 72 65 74 75 72 6e 20 27 3c 63 6f 6d 6d | =.curl_version();..return.'<comm |
31fe0 | 65 6e 74 3e 27 2e 24 76 65 72 73 69 6f 6e 5b 27 76 65 72 73 69 6f 6e 27 5d 2e 27 3c 2f 63 6f 6d | ent>'.$version['version'].'</com |
32000 | 6d 65 6e 74 3e 20 27 2e 0a 27 6c 69 62 7a 20 3c 63 6f 6d 6d 65 6e 74 3e 27 2e 28 21 65 6d 70 74 | ment>.'..'libz.<comment>'.(!empt |
32020 | 79 28 24 76 65 72 73 69 6f 6e 5b 27 6c 69 62 7a 5f 76 65 72 73 69 6f 6e 27 5d 29 20 3f 20 24 76 | y($version['libz_version']).?.$v |
32040 | 65 72 73 69 6f 6e 5b 27 6c 69 62 7a 5f 76 65 72 73 69 6f 6e 27 5d 20 3a 20 27 6d 69 73 73 69 6e | ersion['libz_version'].:.'missin |
32060 | 67 27 29 2e 27 3c 2f 63 6f 6d 6d 65 6e 74 3e 20 27 2e 0a 27 73 73 6c 20 3c 63 6f 6d 6d 65 6e 74 | g').'</comment>.'..'ssl.<comment |
32080 | 3e 27 2e 28 24 76 65 72 73 69 6f 6e 5b 27 73 73 6c 5f 76 65 72 73 69 6f 6e 27 5d 20 3f 3f 20 27 | >'.($version['ssl_version'].??.' |
320a0 | 6d 69 73 73 69 6e 67 27 29 2e 27 3c 2f 63 6f 6d 6d 65 6e 74 3e 27 3b 0a 7d 0a 0a 72 65 74 75 72 | missing').'</comment>';.}..retur |
320c0 | 6e 20 27 3c 65 72 72 6f 72 3e 6d 69 73 73 69 6e 67 2c 20 75 73 69 6e 67 20 70 68 70 20 73 74 72 | n.'<error>missing,.using.php.str |
320e0 | 65 61 6d 73 20 66 61 6c 6c 62 61 63 6b 2c 20 77 68 69 63 68 20 72 65 64 75 63 65 73 20 70 65 72 | eams.fallback,.which.reduces.per |
32100 | 66 6f 72 6d 61 6e 63 65 3c 2f 65 72 72 6f 72 3e 27 3b 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 | formance</error>';.}.....private |
32120 | 20 66 75 6e 63 74 69 6f 6e 20 6f 75 74 70 75 74 52 65 73 75 6c 74 28 24 72 65 73 75 6c 74 29 3a | .function.outputResult($result): |
32140 | 20 76 6f 69 64 0a 7b 0a 24 69 6f 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 3b 0a 69 66 | .void.{.$io.=.$this->getIO();.if |
32160 | 20 28 74 72 75 65 20 3d 3d 3d 20 24 72 65 73 75 6c 74 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 | .(true.===.$result).{.$io->write |
32180 | 28 27 3c 69 6e 66 6f 3e 4f 4b 3c 2f 69 6e 66 6f 3e 27 29 3b 0a 0a 72 65 74 75 72 6e 3b 0a 7d 0a | ('<info>OK</info>');..return;.}. |
321a0 | 0a 24 68 61 64 45 72 72 6f 72 20 3d 20 66 61 6c 73 65 3b 0a 24 68 61 64 57 61 72 6e 69 6e 67 20 | .$hadError.=.false;.$hadWarning. |
321c0 | 3d 20 66 61 6c 73 65 3b 0a 69 66 20 28 24 72 65 73 75 6c 74 20 69 6e 73 74 61 6e 63 65 6f 66 20 | =.false;.if.($result.instanceof. |
321e0 | 5c 45 78 63 65 70 74 69 6f 6e 29 20 7b 0a 24 72 65 73 75 6c 74 20 3d 20 27 3c 65 72 72 6f 72 3e | \Exception).{.$result.=.'<error> |
32200 | 5b 27 2e 67 65 74 5f 63 6c 61 73 73 28 24 72 65 73 75 6c 74 29 2e 27 5d 20 27 2e 24 72 65 73 75 | ['.get_class($result).'].'.$resu |
32220 | 6c 74 2d 3e 67 65 74 4d 65 73 73 61 67 65 28 29 2e 27 3c 2f 65 72 72 6f 72 3e 27 3b 0a 7d 0a 0a | lt->getMessage().'</error>';.}.. |
32240 | 69 66 20 28 21 24 72 65 73 75 6c 74 29 20 7b 0a 0a 24 68 61 64 45 72 72 6f 72 20 3d 20 74 72 75 | if.(!$result).{..$hadError.=.tru |
32260 | 65 3b 0a 7d 20 65 6c 73 65 20 7b 0a 69 66 20 28 21 69 73 5f 61 72 72 61 79 28 24 72 65 73 75 6c | e;.}.else.{.if.(!is_array($resul |
32280 | 74 29 29 20 7b 0a 24 72 65 73 75 6c 74 20 3d 20 5b 24 72 65 73 75 6c 74 5d 3b 0a 7d 0a 66 6f 72 | t)).{.$result.=.[$result];.}.for |
322a0 | 65 61 63 68 20 28 24 72 65 73 75 6c 74 20 61 73 20 24 6d 65 73 73 61 67 65 29 20 7b 0a 69 66 20 | each.($result.as.$message).{.if. |
322c0 | 28 66 61 6c 73 65 20 21 3d 3d 20 73 74 72 70 6f 73 28 24 6d 65 73 73 61 67 65 2c 20 27 3c 65 72 | (false.!==.strpos($message,.'<er |
322e0 | 72 6f 72 3e 27 29 29 20 7b 0a 24 68 61 64 45 72 72 6f 72 20 3d 20 74 72 75 65 3b 0a 7d 20 65 6c | ror>')).{.$hadError.=.true;.}.el |
32300 | 73 65 69 66 20 28 66 61 6c 73 65 20 21 3d 3d 20 73 74 72 70 6f 73 28 24 6d 65 73 73 61 67 65 2c | seif.(false.!==.strpos($message, |
32320 | 20 27 3c 77 61 72 6e 69 6e 67 3e 27 29 29 20 7b 0a 24 68 61 64 57 61 72 6e 69 6e 67 20 3d 20 74 | .'<warning>')).{.$hadWarning.=.t |
32340 | 72 75 65 3b 0a 7d 0a 7d 0a 7d 0a 0a 69 66 20 28 24 68 61 64 45 72 72 6f 72 29 20 7b 0a 24 69 6f | rue;.}.}.}..if.($hadError).{.$io |
32360 | 2d 3e 77 72 69 74 65 28 27 3c 65 72 72 6f 72 3e 46 41 49 4c 3c 2f 65 72 72 6f 72 3e 27 29 3b 0a | ->write('<error>FAIL</error>');. |
32380 | 24 74 68 69 73 2d 3e 65 78 69 74 43 6f 64 65 20 3d 20 6d 61 78 28 24 74 68 69 73 2d 3e 65 78 69 | $this->exitCode.=.max($this->exi |
323a0 | 74 43 6f 64 65 2c 20 32 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 68 61 64 57 61 72 6e 69 6e 67 | tCode,.2);.}.elseif.($hadWarning |
323c0 | 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 3c 77 61 72 6e 69 6e 67 3e 57 41 52 4e 49 4e 47 | ).{.$io->write('<warning>WARNING |
323e0 | 3c 2f 77 61 72 6e 69 6e 67 3e 27 29 3b 0a 24 74 68 69 73 2d 3e 65 78 69 74 43 6f 64 65 20 3d 20 | </warning>');.$this->exitCode.=. |
32400 | 6d 61 78 28 24 74 68 69 73 2d 3e 65 78 69 74 43 6f 64 65 2c 20 31 29 3b 0a 7d 0a 0a 69 66 20 28 | max($this->exitCode,.1);.}..if.( |
32420 | 24 72 65 73 75 6c 74 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 72 65 73 75 6c 74 20 61 73 20 24 | $result).{.foreach.($result.as.$ |
32440 | 6d 65 73 73 61 67 65 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 24 6d 65 73 73 61 67 65 29 3b | message).{.$io->write($message); |
32460 | 0a 7d 0a 7d 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 63 68 65 63 | .}.}.}.....private.function.chec |
32480 | 6b 50 6c 61 74 66 6f 72 6d 28 29 0a 7b 0a 24 6f 75 74 70 75 74 20 3d 20 27 27 3b 0a 24 6f 75 74 | kPlatform().{.$output.=.'';.$out |
324a0 | 20 3d 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 6d 73 67 2c 20 24 73 74 79 6c 65 | .=.static.function.($msg,.$style |
324c0 | 29 20 75 73 65 20 28 26 24 6f 75 74 70 75 74 29 3a 20 76 6f 69 64 20 7b 0a 24 6f 75 74 70 75 74 | ).use.(&$output):.void.{.$output |
324e0 | 20 2e 3d 20 27 3c 27 2e 24 73 74 79 6c 65 2e 27 3e 27 2e 24 6d 73 67 2e 27 3c 2f 27 2e 24 73 74 | ..=.'<'.$style.'>'.$msg.'</'.$st |
32500 | 79 6c 65 2e 27 3e 27 2e 50 48 50 5f 45 4f 4c 3b 0a 7d 3b 0a 0a 0a 24 65 72 72 6f 72 73 20 3d 20 | yle.'>'.PHP_EOL;.};...$errors.=. |
32520 | 5b 5d 3b 0a 24 77 61 72 6e 69 6e 67 73 20 3d 20 5b 5d 3b 0a 24 64 69 73 70 6c 61 79 49 6e 69 4d | [];.$warnings.=.[];.$displayIniM |
32540 | 65 73 73 61 67 65 20 3d 20 66 61 6c 73 65 3b 0a 0a 24 69 6e 69 4d 65 73 73 61 67 65 20 3d 20 50 | essage.=.false;..$iniMessage.=.P |
32560 | 48 50 5f 45 4f 4c 2e 50 48 50 5f 45 4f 4c 2e 49 6e 69 48 65 6c 70 65 72 3a 3a 67 65 74 4d 65 73 | HP_EOL.PHP_EOL.IniHelper::getMes |
32580 | 73 61 67 65 28 29 3b 0a 24 69 6e 69 4d 65 73 73 61 67 65 20 2e 3d 20 50 48 50 5f 45 4f 4c 2e 27 | sage();.$iniMessage..=.PHP_EOL.' |
325a0 | 49 66 20 79 6f 75 20 63 61 6e 20 6e 6f 74 20 6d 6f 64 69 66 79 20 74 68 65 20 69 6e 69 20 66 69 | If.you.can.not.modify.the.ini.fi |
325c0 | 6c 65 2c 20 79 6f 75 20 63 61 6e 20 61 6c 73 6f 20 72 75 6e 20 60 70 68 70 20 2d 64 20 6f 70 74 | le,.you.can.also.run.`php.-d.opt |
325e0 | 69 6f 6e 3d 76 61 6c 75 65 60 20 74 6f 20 6d 6f 64 69 66 79 20 69 6e 69 20 76 61 6c 75 65 73 20 | ion=value`.to.modify.ini.values. |
32600 | 6f 6e 20 74 68 65 20 66 6c 79 2e 20 59 6f 75 20 63 61 6e 20 75 73 65 20 2d 64 20 6d 75 6c 74 69 | on.the.fly..You.can.use.-d.multi |
32620 | 70 6c 65 20 74 69 6d 65 73 2e 27 3b 0a 0a 69 66 20 28 21 66 75 6e 63 74 69 6f 6e 5f 65 78 69 73 | ple.times.';..if.(!function_exis |
32640 | 74 73 28 27 6a 73 6f 6e 5f 64 65 63 6f 64 65 27 29 29 20 7b 0a 24 65 72 72 6f 72 73 5b 27 6a 73 | ts('json_decode')).{.$errors['js |
32660 | 6f 6e 27 5d 20 3d 20 74 72 75 65 3b 0a 7d 0a 0a 69 66 20 28 21 65 78 74 65 6e 73 69 6f 6e 5f 6c | on'].=.true;.}..if.(!extension_l |
32680 | 6f 61 64 65 64 28 27 50 68 61 72 27 29 29 20 7b 0a 24 65 72 72 6f 72 73 5b 27 70 68 61 72 27 5d | oaded('Phar')).{.$errors['phar'] |
326a0 | 20 3d 20 74 72 75 65 3b 0a 7d 0a 0a 69 66 20 28 21 65 78 74 65 6e 73 69 6f 6e 5f 6c 6f 61 64 65 | .=.true;.}..if.(!extension_loade |
326c0 | 64 28 27 66 69 6c 74 65 72 27 29 29 20 7b 0a 24 65 72 72 6f 72 73 5b 27 66 69 6c 74 65 72 27 5d | d('filter')).{.$errors['filter'] |
326e0 | 20 3d 20 74 72 75 65 3b 0a 7d 0a 0a 69 66 20 28 21 65 78 74 65 6e 73 69 6f 6e 5f 6c 6f 61 64 65 | .=.true;.}..if.(!extension_loade |
32700 | 64 28 27 68 61 73 68 27 29 29 20 7b 0a 24 65 72 72 6f 72 73 5b 27 68 61 73 68 27 5d 20 3d 20 74 | d('hash')).{.$errors['hash'].=.t |
32720 | 72 75 65 3b 0a 7d 0a 0a 69 66 20 28 21 65 78 74 65 6e 73 69 6f 6e 5f 6c 6f 61 64 65 64 28 27 69 | rue;.}..if.(!extension_loaded('i |
32740 | 63 6f 6e 76 27 29 20 26 26 20 21 65 78 74 65 6e 73 69 6f 6e 5f 6c 6f 61 64 65 64 28 27 6d 62 73 | conv').&&.!extension_loaded('mbs |
32760 | 74 72 69 6e 67 27 29 29 20 7b 0a 24 65 72 72 6f 72 73 5b 27 69 63 6f 6e 76 5f 6d 62 73 74 72 69 | tring')).{.$errors['iconv_mbstri |
32780 | 6e 67 27 5d 20 3d 20 74 72 75 65 3b 0a 7d 0a 0a 69 66 20 28 21 66 69 6c 74 65 72 5f 76 61 72 28 | ng'].=.true;.}..if.(!filter_var( |
327a0 | 69 6e 69 5f 67 65 74 28 27 61 6c 6c 6f 77 5f 75 72 6c 5f 66 6f 70 65 6e 27 29 2c 20 46 49 4c 54 | ini_get('allow_url_fopen'),.FILT |
327c0 | 45 52 5f 56 41 4c 49 44 41 54 45 5f 42 4f 4f 4c 45 41 4e 29 29 20 7b 0a 24 65 72 72 6f 72 73 5b | ER_VALIDATE_BOOLEAN)).{.$errors[ |
327e0 | 27 61 6c 6c 6f 77 5f 75 72 6c 5f 66 6f 70 65 6e 27 5d 20 3d 20 74 72 75 65 3b 0a 7d 0a 0a 69 66 | 'allow_url_fopen'].=.true;.}..if |
32800 | 20 28 65 78 74 65 6e 73 69 6f 6e 5f 6c 6f 61 64 65 64 28 27 69 6f 6e 43 75 62 65 20 4c 6f 61 64 | .(extension_loaded('ionCube.Load |
32820 | 65 72 27 29 20 26 26 20 69 6f 6e 63 75 62 65 5f 6c 6f 61 64 65 72 5f 69 76 65 72 73 69 6f 6e 28 | er').&&.ioncube_loader_iversion( |
32840 | 29 20 3c 20 34 30 30 30 39 29 20 7b 0a 24 65 72 72 6f 72 73 5b 27 69 6f 6e 63 75 62 65 27 5d 20 | ).<.40009).{.$errors['ioncube']. |
32860 | 3d 20 69 6f 6e 63 75 62 65 5f 6c 6f 61 64 65 72 5f 76 65 72 73 69 6f 6e 28 29 3b 0a 7d 0a 0a 69 | =.ioncube_loader_version();.}..i |
32880 | 66 20 28 50 48 50 5f 56 45 52 53 49 4f 4e 5f 49 44 20 3c 20 37 30 32 30 35 29 20 7b 0a 24 65 72 | f.(PHP_VERSION_ID.<.70205).{.$er |
328a0 | 72 6f 72 73 5b 27 70 68 70 27 5d 20 3d 20 50 48 50 5f 56 45 52 53 49 4f 4e 3b 0a 7d 0a 0a 69 66 | rors['php'].=.PHP_VERSION;.}..if |
328c0 | 20 28 21 65 78 74 65 6e 73 69 6f 6e 5f 6c 6f 61 64 65 64 28 27 6f 70 65 6e 73 73 6c 27 29 29 20 | .(!extension_loaded('openssl')). |
328e0 | 7b 0a 24 65 72 72 6f 72 73 5b 27 6f 70 65 6e 73 73 6c 27 5d 20 3d 20 74 72 75 65 3b 0a 7d 0a 0a | {.$errors['openssl'].=.true;.}.. |
32900 | 69 66 20 28 65 78 74 65 6e 73 69 6f 6e 5f 6c 6f 61 64 65 64 28 27 6f 70 65 6e 73 73 6c 27 29 20 | if.(extension_loaded('openssl'). |
32920 | 26 26 20 4f 50 45 4e 53 53 4c 5f 56 45 52 53 49 4f 4e 5f 4e 55 4d 42 45 52 20 3c 20 30 78 31 30 | &&.OPENSSL_VERSION_NUMBER.<.0x10 |
32940 | 30 30 31 30 30 66 29 20 7b 0a 24 77 61 72 6e 69 6e 67 73 5b 27 6f 70 65 6e 73 73 6c 5f 76 65 72 | 00100f).{.$warnings['openssl_ver |
32960 | 73 69 6f 6e 27 5d 20 3d 20 74 72 75 65 3b 0a 7d 0a 0a 69 66 20 28 21 64 65 66 69 6e 65 64 28 27 | sion'].=.true;.}..if.(!defined(' |
32980 | 48 48 56 4d 5f 56 45 52 53 49 4f 4e 27 29 20 26 26 20 21 65 78 74 65 6e 73 69 6f 6e 5f 6c 6f 61 | HHVM_VERSION').&&.!extension_loa |
329a0 | 64 65 64 28 27 61 70 63 75 27 29 20 26 26 20 66 69 6c 74 65 72 5f 76 61 72 28 69 6e 69 5f 67 65 | ded('apcu').&&.filter_var(ini_ge |
329c0 | 74 28 27 61 70 63 2e 65 6e 61 62 6c 65 5f 63 6c 69 27 29 2c 20 46 49 4c 54 45 52 5f 56 41 4c 49 | t('apc.enable_cli'),.FILTER_VALI |
329e0 | 44 41 54 45 5f 42 4f 4f 4c 45 41 4e 29 29 20 7b 0a 24 77 61 72 6e 69 6e 67 73 5b 27 61 70 63 5f | DATE_BOOLEAN)).{.$warnings['apc_ |
32a00 | 63 6c 69 27 5d 20 3d 20 74 72 75 65 3b 0a 7d 0a 0a 69 66 20 28 21 65 78 74 65 6e 73 69 6f 6e 5f | cli'].=.true;.}..if.(!extension_ |
32a20 | 6c 6f 61 64 65 64 28 27 7a 6c 69 62 27 29 29 20 7b 0a 24 77 61 72 6e 69 6e 67 73 5b 27 7a 6c 69 | loaded('zlib')).{.$warnings['zli |
32a40 | 62 27 5d 20 3d 20 74 72 75 65 3b 0a 7d 0a 0a 6f 62 5f 73 74 61 72 74 28 29 3b 0a 70 68 70 69 6e | b'].=.true;.}..ob_start();.phpin |
32a60 | 66 6f 28 49 4e 46 4f 5f 47 45 4e 45 52 41 4c 29 3b 0a 24 70 68 70 69 6e 66 6f 20 3d 20 6f 62 5f | fo(INFO_GENERAL);.$phpinfo.=.ob_ |
32a80 | 67 65 74 5f 63 6c 65 61 6e 28 29 3b 0a 69 66 20 28 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 | get_clean();.if.(Preg::isMatch(' |
32aa0 | 7b 43 6f 6e 66 69 67 75 72 65 20 43 6f 6d 6d 61 6e 64 28 3f 3a 20 2a 3c 2f 74 64 3e 3c 74 64 20 | {Configure.Command(?:.*</td><td. |
32ac0 | 63 6c 61 73 73 3d 22 76 22 3e 7c 20 2a 3d 3e 20 2a 29 28 2e 2a 3f 29 28 3f 3a 3c 2f 74 64 3e 7c | class="v">|.*=>.*)(.*?)(?:</td>| |
32ae0 | 24 29 7d 6d 27 2c 20 24 70 68 70 69 6e 66 6f 2c 20 24 6d 61 74 63 68 29 29 20 7b 0a 24 63 6f 6e | $)}m',.$phpinfo,.$match)).{.$con |
32b00 | 66 69 67 75 72 65 20 3d 20 24 6d 61 74 63 68 5b 31 5d 3b 0a 0a 69 66 20 28 66 61 6c 73 65 20 21 | figure.=.$match[1];..if.(false.! |
32b20 | 3d 3d 20 73 74 72 70 6f 73 28 24 63 6f 6e 66 69 67 75 72 65 2c 20 27 2d 2d 65 6e 61 62 6c 65 2d | ==.strpos($configure,.'--enable- |
32b40 | 73 69 67 63 68 69 6c 64 27 29 29 20 7b 0a 24 77 61 72 6e 69 6e 67 73 5b 27 73 69 67 63 68 69 6c | sigchild')).{.$warnings['sigchil |
32b60 | 64 27 5d 20 3d 20 74 72 75 65 3b 0a 7d 0a 0a 69 66 20 28 66 61 6c 73 65 20 21 3d 3d 20 73 74 72 | d'].=.true;.}..if.(false.!==.str |
32b80 | 70 6f 73 28 24 63 6f 6e 66 69 67 75 72 65 2c 20 27 2d 2d 77 69 74 68 2d 63 75 72 6c 77 72 61 70 | pos($configure,.'--with-curlwrap |
32ba0 | 70 65 72 73 27 29 29 20 7b 0a 24 77 61 72 6e 69 6e 67 73 5b 27 63 75 72 6c 77 72 61 70 70 65 72 | pers')).{.$warnings['curlwrapper |
32bc0 | 73 27 5d 20 3d 20 74 72 75 65 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 66 69 6c 74 65 72 5f 76 61 72 28 | s'].=.true;.}.}..if.(filter_var( |
32be0 | 69 6e 69 5f 67 65 74 28 27 78 64 65 62 75 67 2e 70 72 6f 66 69 6c 65 72 5f 65 6e 61 62 6c 65 64 | ini_get('xdebug.profiler_enabled |
32c00 | 27 29 2c 20 46 49 4c 54 45 52 5f 56 41 4c 49 44 41 54 45 5f 42 4f 4f 4c 45 41 4e 29 29 20 7b 0a | '),.FILTER_VALIDATE_BOOLEAN)).{. |
32c20 | 24 77 61 72 6e 69 6e 67 73 5b 27 78 64 65 62 75 67 5f 70 72 6f 66 69 6c 65 27 5d 20 3d 20 74 72 | $warnings['xdebug_profile'].=.tr |
32c40 | 75 65 3b 0a 7d 20 65 6c 73 65 69 66 20 28 58 64 65 62 75 67 48 61 6e 64 6c 65 72 3a 3a 69 73 58 | ue;.}.elseif.(XdebugHandler::isX |
32c60 | 64 65 62 75 67 41 63 74 69 76 65 28 29 29 20 7b 0a 24 77 61 72 6e 69 6e 67 73 5b 27 78 64 65 62 | debugActive()).{.$warnings['xdeb |
32c80 | 75 67 5f 6c 6f 61 64 65 64 27 5d 20 3d 20 74 72 75 65 3b 0a 7d 0a 0a 69 66 20 28 64 65 66 69 6e | ug_loaded'].=.true;.}..if.(defin |
32ca0 | 65 64 28 27 50 48 50 5f 57 49 4e 44 4f 57 53 5f 56 45 52 53 49 4f 4e 5f 42 55 49 4c 44 27 29 0a | ed('PHP_WINDOWS_VERSION_BUILD'). |
32cc0 | 26 26 20 28 76 65 72 73 69 6f 6e 5f 63 6f 6d 70 61 72 65 28 50 48 50 5f 56 45 52 53 49 4f 4e 2c | &&.(version_compare(PHP_VERSION, |
32ce0 | 20 27 37 2e 32 2e 32 33 27 2c 20 27 3c 27 29 0a 7c 7c 20 28 76 65 72 73 69 6f 6e 5f 63 6f 6d 70 | .'7.2.23',.'<').||.(version_comp |
32d00 | 61 72 65 28 50 48 50 5f 56 45 52 53 49 4f 4e 2c 20 27 37 2e 33 2e 30 27 2c 20 27 3e 3d 27 29 0a | are(PHP_VERSION,.'7.3.0',.'>='). |
32d20 | 26 26 20 76 65 72 73 69 6f 6e 5f 63 6f 6d 70 61 72 65 28 50 48 50 5f 56 45 52 53 49 4f 4e 2c 20 | &&.version_compare(PHP_VERSION,. |
32d40 | 27 37 2e 33 2e 31 30 27 2c 20 27 3c 27 29 29 29 29 20 7b 0a 24 77 61 72 6e 69 6e 67 73 5b 27 6f | '7.3.10',.'<')))).{.$warnings['o |
32d60 | 6e 65 64 72 69 76 65 27 5d 20 3d 20 50 48 50 5f 56 45 52 53 49 4f 4e 3b 0a 7d 0a 0a 69 66 20 28 | nedrive'].=.PHP_VERSION;.}..if.( |
32d80 | 21 65 6d 70 74 79 28 24 65 72 72 6f 72 73 29 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 65 72 72 | !empty($errors)).{.foreach.($err |
32da0 | 6f 72 73 20 61 73 20 24 65 72 72 6f 72 20 3d 3e 20 24 63 75 72 72 65 6e 74 29 20 7b 0a 73 77 69 | ors.as.$error.=>.$current).{.swi |
32dc0 | 74 63 68 20 28 24 65 72 72 6f 72 29 20 7b 0a 63 61 73 65 20 27 6a 73 6f 6e 27 3a 0a 24 74 65 78 | tch.($error).{.case.'json':.$tex |
32de0 | 74 20 3d 20 50 48 50 5f 45 4f 4c 2e 22 54 68 65 20 6a 73 6f 6e 20 65 78 74 65 6e 73 69 6f 6e 20 | t.=.PHP_EOL."The.json.extension. |
32e00 | 69 73 20 6d 69 73 73 69 6e 67 2e 22 2e 50 48 50 5f 45 4f 4c 3b 0a 24 74 65 78 74 20 2e 3d 20 22 | is.missing.".PHP_EOL;.$text..=." |
32e20 | 49 6e 73 74 61 6c 6c 20 69 74 20 6f 72 20 72 65 63 6f 6d 70 69 6c 65 20 70 68 70 20 77 69 74 68 | Install.it.or.recompile.php.with |
32e40 | 6f 75 74 20 2d 2d 64 69 73 61 62 6c 65 2d 6a 73 6f 6e 22 3b 0a 62 72 65 61 6b 3b 0a 0a 63 61 73 | out.--disable-json";.break;..cas |
32e60 | 65 20 27 70 68 61 72 27 3a 0a 24 74 65 78 74 20 3d 20 50 48 50 5f 45 4f 4c 2e 22 54 68 65 20 70 | e.'phar':.$text.=.PHP_EOL."The.p |
32e80 | 68 61 72 20 65 78 74 65 6e 73 69 6f 6e 20 69 73 20 6d 69 73 73 69 6e 67 2e 22 2e 50 48 50 5f 45 | har.extension.is.missing.".PHP_E |
32ea0 | 4f 4c 3b 0a 24 74 65 78 74 20 2e 3d 20 22 49 6e 73 74 61 6c 6c 20 69 74 20 6f 72 20 72 65 63 6f | OL;.$text..=."Install.it.or.reco |
32ec0 | 6d 70 69 6c 65 20 70 68 70 20 77 69 74 68 6f 75 74 20 2d 2d 64 69 73 61 62 6c 65 2d 70 68 61 72 | mpile.php.without.--disable-phar |
32ee0 | 22 3b 0a 62 72 65 61 6b 3b 0a 0a 63 61 73 65 20 27 66 69 6c 74 65 72 27 3a 0a 24 74 65 78 74 20 | ";.break;..case.'filter':.$text. |
32f00 | 3d 20 50 48 50 5f 45 4f 4c 2e 22 54 68 65 20 66 69 6c 74 65 72 20 65 78 74 65 6e 73 69 6f 6e 20 | =.PHP_EOL."The.filter.extension. |
32f20 | 69 73 20 6d 69 73 73 69 6e 67 2e 22 2e 50 48 50 5f 45 4f 4c 3b 0a 24 74 65 78 74 20 2e 3d 20 22 | is.missing.".PHP_EOL;.$text..=." |
32f40 | 49 6e 73 74 61 6c 6c 20 69 74 20 6f 72 20 72 65 63 6f 6d 70 69 6c 65 20 70 68 70 20 77 69 74 68 | Install.it.or.recompile.php.with |
32f60 | 6f 75 74 20 2d 2d 64 69 73 61 62 6c 65 2d 66 69 6c 74 65 72 22 3b 0a 62 72 65 61 6b 3b 0a 0a 63 | out.--disable-filter";.break;..c |
32f80 | 61 73 65 20 27 68 61 73 68 27 3a 0a 24 74 65 78 74 20 3d 20 50 48 50 5f 45 4f 4c 2e 22 54 68 65 | ase.'hash':.$text.=.PHP_EOL."The |
32fa0 | 20 68 61 73 68 20 65 78 74 65 6e 73 69 6f 6e 20 69 73 20 6d 69 73 73 69 6e 67 2e 22 2e 50 48 50 | .hash.extension.is.missing.".PHP |
32fc0 | 5f 45 4f 4c 3b 0a 24 74 65 78 74 20 2e 3d 20 22 49 6e 73 74 61 6c 6c 20 69 74 20 6f 72 20 72 65 | _EOL;.$text..=."Install.it.or.re |
32fe0 | 63 6f 6d 70 69 6c 65 20 70 68 70 20 77 69 74 68 6f 75 74 20 2d 2d 64 69 73 61 62 6c 65 2d 68 61 | compile.php.without.--disable-ha |
33000 | 73 68 22 3b 0a 62 72 65 61 6b 3b 0a 0a 63 61 73 65 20 27 69 63 6f 6e 76 5f 6d 62 73 74 72 69 6e | sh";.break;..case.'iconv_mbstrin |
33020 | 67 27 3a 0a 24 74 65 78 74 20 3d 20 50 48 50 5f 45 4f 4c 2e 22 54 68 65 20 69 63 6f 6e 76 20 4f | g':.$text.=.PHP_EOL."The.iconv.O |
33040 | 52 20 6d 62 73 74 72 69 6e 67 20 65 78 74 65 6e 73 69 6f 6e 20 69 73 20 72 65 71 75 69 72 65 64 | R.mbstring.extension.is.required |
33060 | 20 61 6e 64 20 62 6f 74 68 20 61 72 65 20 6d 69 73 73 69 6e 67 2e 22 2e 50 48 50 5f 45 4f 4c 3b | .and.both.are.missing.".PHP_EOL; |
33080 | 0a 24 74 65 78 74 20 2e 3d 20 22 49 6e 73 74 61 6c 6c 20 65 69 74 68 65 72 20 6f 66 20 74 68 65 | .$text..=."Install.either.of.the |
330a0 | 6d 20 6f 72 20 72 65 63 6f 6d 70 69 6c 65 20 70 68 70 20 77 69 74 68 6f 75 74 20 2d 2d 64 69 73 | m.or.recompile.php.without.--dis |
330c0 | 61 62 6c 65 2d 69 63 6f 6e 76 22 3b 0a 62 72 65 61 6b 3b 0a 0a 63 61 73 65 20 27 70 68 70 27 3a | able-iconv";.break;..case.'php': |
330e0 | 0a 24 74 65 78 74 20 3d 20 50 48 50 5f 45 4f 4c 2e 22 59 6f 75 72 20 50 48 50 20 28 7b 24 63 75 | .$text.=.PHP_EOL."Your.PHP.({$cu |
33100 | 72 72 65 6e 74 7d 29 20 69 73 20 74 6f 6f 20 6f 6c 64 2c 20 79 6f 75 20 6d 75 73 74 20 75 70 67 | rrent}).is.too.old,.you.must.upg |
33120 | 72 61 64 65 20 74 6f 20 50 48 50 20 37 2e 32 2e 35 20 6f 72 20 68 69 67 68 65 72 2e 22 3b 0a 62 | rade.to.PHP.7.2.5.or.higher.";.b |
33140 | 72 65 61 6b 3b 0a 0a 63 61 73 65 20 27 61 6c 6c 6f 77 5f 75 72 6c 5f 66 6f 70 65 6e 27 3a 0a 24 | reak;..case.'allow_url_fopen':.$ |
33160 | 74 65 78 74 20 3d 20 50 48 50 5f 45 4f 4c 2e 22 54 68 65 20 61 6c 6c 6f 77 5f 75 72 6c 5f 66 6f | text.=.PHP_EOL."The.allow_url_fo |
33180 | 70 65 6e 20 73 65 74 74 69 6e 67 20 69 73 20 69 6e 63 6f 72 72 65 63 74 2e 22 2e 50 48 50 5f 45 | pen.setting.is.incorrect.".PHP_E |
331a0 | 4f 4c 3b 0a 24 74 65 78 74 20 2e 3d 20 22 41 64 64 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 | OL;.$text..=."Add.the.following. |
331c0 | 74 6f 20 74 68 65 20 65 6e 64 20 6f 66 20 79 6f 75 72 20 60 70 68 70 2e 69 6e 69 60 3a 22 2e 50 | to.the.end.of.your.`php.ini`:".P |
331e0 | 48 50 5f 45 4f 4c 3b 0a 24 74 65 78 74 20 2e 3d 20 22 20 20 20 20 61 6c 6c 6f 77 5f 75 72 6c 5f | HP_EOL;.$text..=."....allow_url_ |
33200 | 66 6f 70 65 6e 20 3d 20 4f 6e 22 3b 0a 24 64 69 73 70 6c 61 79 49 6e 69 4d 65 73 73 61 67 65 20 | fopen.=.On";.$displayIniMessage. |
33220 | 3d 20 74 72 75 65 3b 0a 62 72 65 61 6b 3b 0a 0a 63 61 73 65 20 27 69 6f 6e 63 75 62 65 27 3a 0a | =.true;.break;..case.'ioncube':. |
33240 | 24 74 65 78 74 20 3d 20 50 48 50 5f 45 4f 4c 2e 22 59 6f 75 72 20 69 6f 6e 43 75 62 65 20 4c 6f | $text.=.PHP_EOL."Your.ionCube.Lo |
33260 | 61 64 65 72 20 65 78 74 65 6e 73 69 6f 6e 20 28 24 63 75 72 72 65 6e 74 29 20 69 73 20 69 6e 63 | ader.extension.($current).is.inc |
33280 | 6f 6d 70 61 74 69 62 6c 65 20 77 69 74 68 20 50 68 61 72 20 66 69 6c 65 73 2e 22 2e 50 48 50 5f | ompatible.with.Phar.files.".PHP_ |
332a0 | 45 4f 4c 3b 0a 24 74 65 78 74 20 2e 3d 20 22 55 70 67 72 61 64 65 20 74 6f 20 69 6f 6e 43 75 62 | EOL;.$text..=."Upgrade.to.ionCub |
332c0 | 65 20 34 2e 30 2e 39 20 6f 72 20 68 69 67 68 65 72 20 6f 72 20 72 65 6d 6f 76 65 20 74 68 69 73 | e.4.0.9.or.higher.or.remove.this |
332e0 | 20 6c 69 6e 65 20 28 70 61 74 68 20 6d 61 79 20 62 65 20 64 69 66 66 65 72 65 6e 74 29 20 66 72 | .line.(path.may.be.different).fr |
33300 | 6f 6d 20 79 6f 75 72 20 60 70 68 70 2e 69 6e 69 60 20 74 6f 20 64 69 73 61 62 6c 65 20 69 74 3a | om.your.`php.ini`.to.disable.it: |
33320 | 22 2e 50 48 50 5f 45 4f 4c 3b 0a 24 74 65 78 74 20 2e 3d 20 22 20 20 20 20 7a 65 6e 64 5f 65 78 | ".PHP_EOL;.$text..=."....zend_ex |
33340 | 74 65 6e 73 69 6f 6e 20 3d 20 2f 75 73 72 2f 6c 69 62 2f 70 68 70 35 2f 32 30 30 39 30 36 32 36 | tension.=./usr/lib/php5/20090626 |
33360 | 2b 6c 66 73 2f 69 6f 6e 63 75 62 65 5f 6c 6f 61 64 65 72 5f 6c 69 6e 5f 35 2e 33 2e 73 6f 22 3b | +lfs/ioncube_loader_lin_5.3.so"; |
33380 | 0a 24 64 69 73 70 6c 61 79 49 6e 69 4d 65 73 73 61 67 65 20 3d 20 74 72 75 65 3b 0a 62 72 65 61 | .$displayIniMessage.=.true;.brea |
333a0 | 6b 3b 0a 0a 63 61 73 65 20 27 6f 70 65 6e 73 73 6c 27 3a 0a 24 74 65 78 74 20 3d 20 50 48 50 5f | k;..case.'openssl':.$text.=.PHP_ |
333c0 | 45 4f 4c 2e 22 54 68 65 20 6f 70 65 6e 73 73 6c 20 65 78 74 65 6e 73 69 6f 6e 20 69 73 20 6d 69 | EOL."The.openssl.extension.is.mi |
333e0 | 73 73 69 6e 67 2c 20 77 68 69 63 68 20 6d 65 61 6e 73 20 74 68 61 74 20 73 65 63 75 72 65 20 48 | ssing,.which.means.that.secure.H |
33400 | 54 54 50 53 20 74 72 61 6e 73 66 65 72 73 20 61 72 65 20 69 6d 70 6f 73 73 69 62 6c 65 2e 22 2e | TTPS.transfers.are.impossible.". |
33420 | 50 48 50 5f 45 4f 4c 3b 0a 24 74 65 78 74 20 2e 3d 20 22 49 66 20 70 6f 73 73 69 62 6c 65 20 79 | PHP_EOL;.$text..=."If.possible.y |
33440 | 6f 75 20 73 68 6f 75 6c 64 20 65 6e 61 62 6c 65 20 69 74 20 6f 72 20 72 65 63 6f 6d 70 69 6c 65 | ou.should.enable.it.or.recompile |
33460 | 20 70 68 70 20 77 69 74 68 20 2d 2d 77 69 74 68 2d 6f 70 65 6e 73 73 6c 22 3b 0a 62 72 65 61 6b | .php.with.--with-openssl";.break |
33480 | 3b 0a 0a 64 65 66 61 75 6c 74 3a 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 64 41 72 | ;..default:.throw.new.\InvalidAr |
334a0 | 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 73 70 72 69 6e 74 66 28 22 44 69 61 67 6e 6f 73 | gumentException(sprintf("Diagnos |
334c0 | 65 43 6f 6d 6d 61 6e 64 3a 20 55 6e 6b 6e 6f 77 6e 20 65 72 72 6f 72 20 74 79 70 65 20 5c 22 25 | eCommand:.Unknown.error.type.\"% |
334e0 | 73 5c 22 2e 20 50 6c 65 61 73 65 20 72 65 70 6f 72 74 20 61 74 20 68 74 74 70 73 3a 2f 2f 67 69 | s\"..Please.report.at.https://gi |
33500 | 74 68 75 62 2e 63 6f 6d 2f 63 6f 6d 70 6f 73 65 72 2f 63 6f 6d 70 6f 73 65 72 2f 69 73 73 75 65 | thub.com/composer/composer/issue |
33520 | 73 2f 6e 65 77 2e 22 2c 20 24 65 72 72 6f 72 29 29 3b 0a 7d 0a 24 6f 75 74 28 24 74 65 78 74 2c | s/new.",.$error));.}.$out($text, |
33540 | 20 27 65 72 72 6f 72 27 29 3b 0a 7d 0a 0a 24 6f 75 74 70 75 74 20 2e 3d 20 50 48 50 5f 45 4f 4c | .'error');.}..$output..=.PHP_EOL |
33560 | 3b 0a 7d 0a 0a 69 66 20 28 21 65 6d 70 74 79 28 24 77 61 72 6e 69 6e 67 73 29 29 20 7b 0a 66 6f | ;.}..if.(!empty($warnings)).{.fo |
33580 | 72 65 61 63 68 20 28 24 77 61 72 6e 69 6e 67 73 20 61 73 20 24 77 61 72 6e 69 6e 67 20 3d 3e 20 | reach.($warnings.as.$warning.=>. |
335a0 | 24 63 75 72 72 65 6e 74 29 20 7b 0a 73 77 69 74 63 68 20 28 24 77 61 72 6e 69 6e 67 29 20 7b 0a | $current).{.switch.($warning).{. |
335c0 | 63 61 73 65 20 27 61 70 63 5f 63 6c 69 27 3a 0a 24 74 65 78 74 20 3d 20 22 54 68 65 20 61 70 63 | case.'apc_cli':.$text.=."The.apc |
335e0 | 2e 65 6e 61 62 6c 65 5f 63 6c 69 20 73 65 74 74 69 6e 67 20 69 73 20 69 6e 63 6f 72 72 65 63 74 | .enable_cli.setting.is.incorrect |
33600 | 2e 22 2e 50 48 50 5f 45 4f 4c 3b 0a 24 74 65 78 74 20 2e 3d 20 22 41 64 64 20 74 68 65 20 66 6f | .".PHP_EOL;.$text..=."Add.the.fo |
33620 | 6c 6c 6f 77 69 6e 67 20 74 6f 20 74 68 65 20 65 6e 64 20 6f 66 20 79 6f 75 72 20 60 70 68 70 2e | llowing.to.the.end.of.your.`php. |
33640 | 69 6e 69 60 3a 22 2e 50 48 50 5f 45 4f 4c 3b 0a 24 74 65 78 74 20 2e 3d 20 22 20 20 61 70 63 2e | ini`:".PHP_EOL;.$text..=."..apc. |
33660 | 65 6e 61 62 6c 65 5f 63 6c 69 20 3d 20 4f 66 66 22 3b 0a 24 64 69 73 70 6c 61 79 49 6e 69 4d 65 | enable_cli.=.Off";.$displayIniMe |
33680 | 73 73 61 67 65 20 3d 20 74 72 75 65 3b 0a 62 72 65 61 6b 3b 0a 0a 63 61 73 65 20 27 7a 6c 69 62 | ssage.=.true;.break;..case.'zlib |
336a0 | 27 3a 0a 24 74 65 78 74 20 3d 20 27 54 68 65 20 7a 6c 69 62 20 65 78 74 65 6e 73 69 6f 6e 20 69 | ':.$text.=.'The.zlib.extension.i |
336c0 | 73 20 6e 6f 74 20 6c 6f 61 64 65 64 2c 20 74 68 69 73 20 63 61 6e 20 73 6c 6f 77 20 64 6f 77 6e | s.not.loaded,.this.can.slow.down |
336e0 | 20 43 6f 6d 70 6f 73 65 72 20 61 20 6c 6f 74 2e 27 2e 50 48 50 5f 45 4f 4c 3b 0a 24 74 65 78 74 | .Composer.a.lot.'.PHP_EOL;.$text |
33700 | 20 2e 3d 20 27 49 66 20 70 6f 73 73 69 62 6c 65 2c 20 65 6e 61 62 6c 65 20 69 74 20 6f 72 20 72 | ..=.'If.possible,.enable.it.or.r |
33720 | 65 63 6f 6d 70 69 6c 65 20 70 68 70 20 77 69 74 68 20 2d 2d 77 69 74 68 2d 7a 6c 69 62 27 2e 50 | ecompile.php.with.--with-zlib'.P |
33740 | 48 50 5f 45 4f 4c 3b 0a 24 64 69 73 70 6c 61 79 49 6e 69 4d 65 73 73 61 67 65 20 3d 20 74 72 75 | HP_EOL;.$displayIniMessage.=.tru |
33760 | 65 3b 0a 62 72 65 61 6b 3b 0a 0a 63 61 73 65 20 27 73 69 67 63 68 69 6c 64 27 3a 0a 24 74 65 78 | e;.break;..case.'sigchild':.$tex |
33780 | 74 20 3d 20 22 50 48 50 20 77 61 73 20 63 6f 6d 70 69 6c 65 64 20 77 69 74 68 20 2d 2d 65 6e 61 | t.=."PHP.was.compiled.with.--ena |
337a0 | 62 6c 65 2d 73 69 67 63 68 69 6c 64 20 77 68 69 63 68 20 63 61 6e 20 63 61 75 73 65 20 69 73 73 | ble-sigchild.which.can.cause.iss |
337c0 | 75 65 73 20 6f 6e 20 73 6f 6d 65 20 70 6c 61 74 66 6f 72 6d 73 2e 22 2e 50 48 50 5f 45 4f 4c 3b | ues.on.some.platforms.".PHP_EOL; |
337e0 | 0a 24 74 65 78 74 20 2e 3d 20 22 52 65 63 6f 6d 70 69 6c 65 20 69 74 20 77 69 74 68 6f 75 74 20 | .$text..=."Recompile.it.without. |
33800 | 74 68 69 73 20 66 6c 61 67 20 69 66 20 70 6f 73 73 69 62 6c 65 2c 20 73 65 65 20 61 6c 73 6f 3a | this.flag.if.possible,.see.also: |
33820 | 22 2e 50 48 50 5f 45 4f 4c 3b 0a 24 74 65 78 74 20 2e 3d 20 22 20 20 68 74 74 70 73 3a 2f 2f 62 | ".PHP_EOL;.$text..=."..https://b |
33840 | 75 67 73 2e 70 68 70 2e 6e 65 74 2f 62 75 67 2e 70 68 70 3f 69 64 3d 32 32 39 39 39 22 3b 0a 62 | ugs.php.net/bug.php?id=22999";.b |
33860 | 72 65 61 6b 3b 0a 0a 63 61 73 65 20 27 63 75 72 6c 77 72 61 70 70 65 72 73 27 3a 0a 24 74 65 78 | reak;..case.'curlwrappers':.$tex |
33880 | 74 20 3d 20 22 50 48 50 20 77 61 73 20 63 6f 6d 70 69 6c 65 64 20 77 69 74 68 20 2d 2d 77 69 74 | t.=."PHP.was.compiled.with.--wit |
338a0 | 68 2d 63 75 72 6c 77 72 61 70 70 65 72 73 20 77 68 69 63 68 20 77 69 6c 6c 20 63 61 75 73 65 20 | h-curlwrappers.which.will.cause. |
338c0 | 69 73 73 75 65 73 20 77 69 74 68 20 48 54 54 50 20 61 75 74 68 65 6e 74 69 63 61 74 69 6f 6e 20 | issues.with.HTTP.authentication. |
338e0 | 61 6e 64 20 47 69 74 48 75 62 2e 22 2e 50 48 50 5f 45 4f 4c 3b 0a 24 74 65 78 74 20 2e 3d 20 22 | and.GitHub.".PHP_EOL;.$text..=." |
33900 | 20 52 65 63 6f 6d 70 69 6c 65 20 69 74 20 77 69 74 68 6f 75 74 20 74 68 69 73 20 66 6c 61 67 20 | .Recompile.it.without.this.flag. |
33920 | 69 66 20 70 6f 73 73 69 62 6c 65 22 3b 0a 62 72 65 61 6b 3b 0a 0a 63 61 73 65 20 27 6f 70 65 6e | if.possible";.break;..case.'open |
33940 | 73 73 6c 5f 76 65 72 73 69 6f 6e 27 3a 0a 0a 24 6f 70 65 6e 73 73 6c 56 65 72 73 69 6f 6e 20 3d | ssl_version':..$opensslVersion.= |
33960 | 20 73 74 72 73 74 72 28 74 72 69 6d 28 73 74 72 73 74 72 28 4f 50 45 4e 53 53 4c 5f 56 45 52 53 | .strstr(trim(strstr(OPENSSL_VERS |
33980 | 49 4f 4e 5f 54 45 58 54 2c 20 27 20 27 29 29 2c 20 27 20 27 2c 20 74 72 75 65 29 3b 0a 24 6f 70 | ION_TEXT,.'.')),.'.',.true);.$op |
339a0 | 65 6e 73 73 6c 56 65 72 73 69 6f 6e 20 3d 20 24 6f 70 65 6e 73 73 6c 56 65 72 73 69 6f 6e 20 3f | ensslVersion.=.$opensslVersion.? |
339c0 | 3a 20 4f 50 45 4e 53 53 4c 5f 56 45 52 53 49 4f 4e 5f 54 45 58 54 3b 0a 0a 24 74 65 78 74 20 3d | :.OPENSSL_VERSION_TEXT;..$text.= |
339e0 | 20 22 54 68 65 20 4f 70 65 6e 53 53 4c 20 6c 69 62 72 61 72 79 20 28 7b 24 6f 70 65 6e 73 73 6c | ."The.OpenSSL.library.({$openssl |
33a00 | 56 65 72 73 69 6f 6e 7d 29 20 75 73 65 64 20 62 79 20 50 48 50 20 64 6f 65 73 20 6e 6f 74 20 73 | Version}).used.by.PHP.does.not.s |
33a20 | 75 70 70 6f 72 74 20 54 4c 53 76 31 2e 32 20 6f 72 20 54 4c 53 76 31 2e 31 2e 22 2e 50 48 50 5f | upport.TLSv1.2.or.TLSv1.1.".PHP_ |
33a40 | 45 4f 4c 3b 0a 24 74 65 78 74 20 2e 3d 20 22 49 66 20 70 6f 73 73 69 62 6c 65 20 79 6f 75 20 73 | EOL;.$text..=."If.possible.you.s |
33a60 | 68 6f 75 6c 64 20 75 70 67 72 61 64 65 20 4f 70 65 6e 53 53 4c 20 74 6f 20 76 65 72 73 69 6f 6e | hould.upgrade.OpenSSL.to.version |
33a80 | 20 31 2e 30 2e 31 20 6f 72 20 61 62 6f 76 65 2e 22 3b 0a 62 72 65 61 6b 3b 0a 0a 63 61 73 65 20 | .1.0.1.or.above.";.break;..case. |
33aa0 | 27 78 64 65 62 75 67 5f 6c 6f 61 64 65 64 27 3a 0a 24 74 65 78 74 20 3d 20 22 54 68 65 20 78 64 | 'xdebug_loaded':.$text.=."The.xd |
33ac0 | 65 62 75 67 20 65 78 74 65 6e 73 69 6f 6e 20 69 73 20 6c 6f 61 64 65 64 2c 20 74 68 69 73 20 63 | ebug.extension.is.loaded,.this.c |
33ae0 | 61 6e 20 73 6c 6f 77 20 64 6f 77 6e 20 43 6f 6d 70 6f 73 65 72 20 61 20 6c 69 74 74 6c 65 2e 22 | an.slow.down.Composer.a.little." |
33b00 | 2e 50 48 50 5f 45 4f 4c 3b 0a 24 74 65 78 74 20 2e 3d 20 22 20 44 69 73 61 62 6c 69 6e 67 20 69 | .PHP_EOL;.$text..=.".Disabling.i |
33b20 | 74 20 77 68 65 6e 20 75 73 69 6e 67 20 43 6f 6d 70 6f 73 65 72 20 69 73 20 72 65 63 6f 6d 6d 65 | t.when.using.Composer.is.recomme |
33b40 | 6e 64 65 64 2e 22 3b 0a 62 72 65 61 6b 3b 0a 0a 63 61 73 65 20 27 78 64 65 62 75 67 5f 70 72 6f | nded.";.break;..case.'xdebug_pro |
33b60 | 66 69 6c 65 27 3a 0a 24 74 65 78 74 20 3d 20 22 54 68 65 20 78 64 65 62 75 67 2e 70 72 6f 66 69 | file':.$text.=."The.xdebug.profi |
33b80 | 6c 65 72 5f 65 6e 61 62 6c 65 64 20 73 65 74 74 69 6e 67 20 69 73 20 65 6e 61 62 6c 65 64 2c 20 | ler_enabled.setting.is.enabled,. |
33ba0 | 74 68 69 73 20 63 61 6e 20 73 6c 6f 77 20 64 6f 77 6e 20 43 6f 6d 70 6f 73 65 72 20 61 20 6c 6f | this.can.slow.down.Composer.a.lo |
33bc0 | 74 2e 22 2e 50 48 50 5f 45 4f 4c 3b 0a 24 74 65 78 74 20 2e 3d 20 22 41 64 64 20 74 68 65 20 66 | t.".PHP_EOL;.$text..=."Add.the.f |
33be0 | 6f 6c 6c 6f 77 69 6e 67 20 74 6f 20 74 68 65 20 65 6e 64 20 6f 66 20 79 6f 75 72 20 60 70 68 70 | ollowing.to.the.end.of.your.`php |
33c00 | 2e 69 6e 69 60 20 74 6f 20 64 69 73 61 62 6c 65 20 69 74 3a 22 2e 50 48 50 5f 45 4f 4c 3b 0a 24 | .ini`.to.disable.it:".PHP_EOL;.$ |
33c20 | 74 65 78 74 20 2e 3d 20 22 20 20 78 64 65 62 75 67 2e 70 72 6f 66 69 6c 65 72 5f 65 6e 61 62 6c | text..=."..xdebug.profiler_enabl |
33c40 | 65 64 20 3d 20 30 22 3b 0a 24 64 69 73 70 6c 61 79 49 6e 69 4d 65 73 73 61 67 65 20 3d 20 74 72 | ed.=.0";.$displayIniMessage.=.tr |
33c60 | 75 65 3b 0a 62 72 65 61 6b 3b 0a 0a 63 61 73 65 20 27 6f 6e 65 64 72 69 76 65 27 3a 0a 24 74 65 | ue;.break;..case.'onedrive':.$te |
33c80 | 78 74 20 3d 20 22 54 68 65 20 57 69 6e 64 6f 77 73 20 4f 6e 65 44 72 69 76 65 20 66 6f 6c 64 65 | xt.=."The.Windows.OneDrive.folde |
33ca0 | 72 20 69 73 20 6e 6f 74 20 73 75 70 70 6f 72 74 65 64 20 6f 6e 20 50 48 50 20 76 65 72 73 69 6f | r.is.not.supported.on.PHP.versio |
33cc0 | 6e 73 20 62 65 6c 6f 77 20 37 2e 32 2e 32 33 20 61 6e 64 20 37 2e 33 2e 31 30 2e 22 2e 50 48 50 | ns.below.7.2.23.and.7.3.10.".PHP |
33ce0 | 5f 45 4f 4c 3b 0a 24 74 65 78 74 20 2e 3d 20 22 55 70 67 72 61 64 65 20 79 6f 75 72 20 50 48 50 | _EOL;.$text..=."Upgrade.your.PHP |
33d00 | 20 28 7b 24 63 75 72 72 65 6e 74 7d 29 20 74 6f 20 75 73 65 20 74 68 69 73 20 6c 6f 63 61 74 69 | .({$current}).to.use.this.locati |
33d20 | 6f 6e 20 77 69 74 68 20 43 6f 6d 70 6f 73 65 72 2e 22 2e 50 48 50 5f 45 4f 4c 3b 0a 62 72 65 61 | on.with.Composer.".PHP_EOL;.brea |
33d40 | 6b 3b 0a 0a 64 65 66 61 75 6c 74 3a 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 64 41 | k;..default:.throw.new.\InvalidA |
33d60 | 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 73 70 72 69 6e 74 66 28 22 44 69 61 67 6e 6f | rgumentException(sprintf("Diagno |
33d80 | 73 65 43 6f 6d 6d 61 6e 64 3a 20 55 6e 6b 6e 6f 77 6e 20 77 61 72 6e 69 6e 67 20 74 79 70 65 20 | seCommand:.Unknown.warning.type. |
33da0 | 5c 22 25 73 5c 22 2e 20 50 6c 65 61 73 65 20 72 65 70 6f 72 74 20 61 74 20 68 74 74 70 73 3a 2f | \"%s\"..Please.report.at.https:/ |
33dc0 | 2f 67 69 74 68 75 62 2e 63 6f 6d 2f 63 6f 6d 70 6f 73 65 72 2f 63 6f 6d 70 6f 73 65 72 2f 69 73 | /github.com/composer/composer/is |
33de0 | 73 75 65 73 2f 6e 65 77 2e 22 2c 20 24 77 61 72 6e 69 6e 67 29 29 3b 0a 7d 0a 24 6f 75 74 28 24 | sues/new.",.$warning));.}.$out($ |
33e00 | 74 65 78 74 2c 20 27 63 6f 6d 6d 65 6e 74 27 29 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 24 64 69 73 70 | text,.'comment');.}.}..if.($disp |
33e20 | 6c 61 79 49 6e 69 4d 65 73 73 61 67 65 29 20 7b 0a 24 6f 75 74 28 24 69 6e 69 4d 65 73 73 61 67 | layIniMessage).{.$out($iniMessag |
33e40 | 65 2c 20 27 63 6f 6d 6d 65 6e 74 27 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 21 24 77 61 72 6e 69 | e,.'comment');.}..return.!$warni |
33e60 | 6e 67 73 20 26 26 20 21 24 65 72 72 6f 72 73 20 3f 20 74 72 75 65 20 3a 20 24 6f 75 74 70 75 74 | ngs.&&.!$errors.?.true.:.$output |
33e80 | 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 63 68 65 63 6b | ;.}.......private.function.check |
33ea0 | 43 6f 6e 6e 65 63 74 69 76 69 74 79 28 29 0a 7b 0a 69 66 20 28 21 69 6e 69 5f 67 65 74 28 27 61 | Connectivity().{.if.(!ini_get('a |
33ec0 | 6c 6c 6f 77 5f 75 72 6c 5f 66 6f 70 65 6e 27 29 29 20 7b 0a 72 65 74 75 72 6e 20 27 3c 69 6e 66 | llow_url_fopen')).{.return.'<inf |
33ee0 | 6f 3e 53 6b 69 70 70 65 64 20 62 65 63 61 75 73 65 20 61 6c 6c 6f 77 5f 75 72 6c 5f 66 6f 70 65 | o>Skipped.because.allow_url_fope |
33f00 | 6e 20 69 73 20 6d 69 73 73 69 6e 67 2e 3c 2f 69 6e 66 6f 3e 27 3b 0a 7d 0a 0a 72 65 74 75 72 6e | n.is.missing.</info>';.}..return |
33f20 | 20 74 72 75 65 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f | .true;.}.}.<?php.declare(strict_ |
33f40 | 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 | types=1);............namespace.C |
33f60 | 6f 6d 70 6f 73 65 72 5c 43 6f 6d 6d 61 6e 64 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 | omposer\Command;..use.Composer\P |
33f80 | 6c 75 67 69 6e 5c 43 6f 6d 6d 61 6e 64 45 76 65 6e 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 | lugin\CommandEvent;.use.Composer |
33fa0 | 5c 50 6c 75 67 69 6e 5c 50 6c 75 67 69 6e 45 76 65 6e 74 73 3b 0a 75 73 65 20 53 79 6d 66 6f 6e | \Plugin\PluginEvents;.use.Symfon |
33fc0 | 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 49 | y\Component\Console\Input\InputI |
33fe0 | 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c | nterface;.use.Symfony\Component\ |
34000 | 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 4f 70 74 69 6f 6e 3b 0a 75 73 65 20 53 | Console\Input\InputOption;.use.S |
34020 | 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 4f 75 74 70 75 74 5c | ymfony\Component\Console\Output\ |
34040 | 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 0a 0a 0a 0a 63 6c 61 73 73 20 44 75 6d 70 41 | OutputInterface;.....class.DumpA |
34060 | 75 74 6f 6c 6f 61 64 43 6f 6d 6d 61 6e 64 20 65 78 74 65 6e 64 73 20 42 61 73 65 43 6f 6d 6d 61 | utoloadCommand.extends.BaseComma |
34080 | 6e 64 0a 7b 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 63 6f 6e 66 69 | nd.{....protected.function.confi |
340a0 | 67 75 72 65 28 29 0a 7b 0a 24 74 68 69 73 0a 2d 3e 73 65 74 4e 61 6d 65 28 27 64 75 6d 70 2d 61 | gure().{.$this.->setName('dump-a |
340c0 | 75 74 6f 6c 6f 61 64 27 29 0a 2d 3e 73 65 74 41 6c 69 61 73 65 73 28 5b 27 64 75 6d 70 61 75 74 | utoload').->setAliases(['dumpaut |
340e0 | 6f 6c 6f 61 64 27 5d 29 0a 2d 3e 73 65 74 44 65 73 63 72 69 70 74 69 6f 6e 28 27 44 75 6d 70 73 | oload']).->setDescription('Dumps |
34100 | 20 74 68 65 20 61 75 74 6f 6c 6f 61 64 65 72 27 29 0a 2d 3e 73 65 74 44 65 66 69 6e 69 74 69 6f | .the.autoloader').->setDefinitio |
34120 | 6e 28 5b 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6f 70 74 69 6d 69 7a 65 27 2c 20 | n([.new.InputOption('optimize',. |
34140 | 27 6f 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 4f | 'o',.InputOption::VALUE_NONE,.'O |
34160 | 70 74 69 6d 69 7a 65 73 20 50 53 52 30 20 61 6e 64 20 50 53 52 34 20 70 61 63 6b 61 67 65 73 20 | ptimizes.PSR0.and.PSR4.packages. |
34180 | 74 6f 20 62 65 20 6c 6f 61 64 65 64 20 77 69 74 68 20 63 6c 61 73 73 6d 61 70 73 20 74 6f 6f 2c | to.be.loaded.with.classmaps.too, |
341a0 | 20 67 6f 6f 64 20 66 6f 72 20 70 72 6f 64 75 63 74 69 6f 6e 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 | .good.for.production.'),.new.Inp |
341c0 | 75 74 4f 70 74 69 6f 6e 28 27 63 6c 61 73 73 6d 61 70 2d 61 75 74 68 6f 72 69 74 61 74 69 76 65 | utOption('classmap-authoritative |
341e0 | 27 2c 20 27 61 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c | ',.'a',.InputOption::VALUE_NONE, |
34200 | 20 27 41 75 74 6f 6c 6f 61 64 20 63 6c 61 73 73 65 73 20 66 72 6f 6d 20 74 68 65 20 63 6c 61 73 | .'Autoload.classes.from.the.clas |
34220 | 73 6d 61 70 20 6f 6e 6c 79 2e 20 49 6d 70 6c 69 63 69 74 6c 79 20 65 6e 61 62 6c 65 73 20 60 2d | smap.only..Implicitly.enables.`- |
34240 | 2d 6f 70 74 69 6d 69 7a 65 60 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 | -optimize`.'),.new.InputOption(' |
34260 | 61 70 63 75 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f | apcu',.null,.InputOption::VALUE_ |
34280 | 4e 4f 4e 45 2c 20 27 55 73 65 20 41 50 43 75 20 74 6f 20 63 61 63 68 65 20 66 6f 75 6e 64 2f 6e | NONE,.'Use.APCu.to.cache.found/n |
342a0 | 6f 74 2d 66 6f 75 6e 64 20 63 6c 61 73 73 65 73 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 | ot-found.classes.'),.new.InputOp |
342c0 | 74 69 6f 6e 28 27 61 70 63 75 2d 70 72 65 66 69 78 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f | tion('apcu-prefix',.null,.InputO |
342e0 | 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 52 45 51 55 49 52 45 44 2c 20 27 55 73 65 20 61 20 63 75 | ption::VALUE_REQUIRED,.'Use.a.cu |
34300 | 73 74 6f 6d 20 70 72 65 66 69 78 20 66 6f 72 20 74 68 65 20 41 50 43 75 20 61 75 74 6f 6c 6f 61 | stom.prefix.for.the.APCu.autoloa |
34320 | 64 65 72 20 63 61 63 68 65 2e 20 49 6d 70 6c 69 63 69 74 6c 79 20 65 6e 61 62 6c 65 73 20 2d 2d | der.cache..Implicitly.enables.-- |
34340 | 61 70 63 75 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 64 65 76 27 2c 20 6e | apcu'),.new.InputOption('dev',.n |
34360 | 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 45 | ull,.InputOption::VALUE_NONE,.'E |
34380 | 6e 61 62 6c 65 73 20 61 75 74 6f 6c 6f 61 64 2d 64 65 76 20 72 75 6c 65 73 2e 20 43 6f 6d 70 6f | nables.autoload-dev.rules..Compo |
343a0 | 73 65 72 20 77 69 6c 6c 20 62 79 20 64 65 66 61 75 6c 74 20 69 6e 66 65 72 20 74 68 69 73 20 61 | ser.will.by.default.infer.this.a |
343c0 | 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 61 63 63 6f 72 64 69 6e 67 20 74 6f 20 74 68 65 20 6c 61 | utomatically.according.to.the.la |
343e0 | 73 74 20 69 6e 73 74 61 6c 6c 20 6f 72 20 75 70 64 61 74 65 20 2d 2d 6e 6f 2d 64 65 76 20 73 74 | st.install.or.update.--no-dev.st |
34400 | 61 74 65 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 64 65 76 27 | ate.'),.new.InputOption('no-dev' |
34420 | 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c | ,.null,.InputOption::VALUE_NONE, |
34440 | 20 27 44 69 73 61 62 6c 65 73 20 61 75 74 6f 6c 6f 61 64 2d 64 65 76 20 72 75 6c 65 73 2e 20 43 | .'Disables.autoload-dev.rules..C |
34460 | 6f 6d 70 6f 73 65 72 20 77 69 6c 6c 20 62 79 20 64 65 66 61 75 6c 74 20 69 6e 66 65 72 20 74 68 | omposer.will.by.default.infer.th |
34480 | 69 73 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 61 63 63 6f 72 64 69 6e 67 20 74 6f 20 74 68 | is.automatically.according.to.th |
344a0 | 65 20 6c 61 73 74 20 69 6e 73 74 61 6c 6c 20 6f 72 20 75 70 64 61 74 65 20 2d 2d 6e 6f 2d 64 65 | e.last.install.or.update.--no-de |
344c0 | 76 20 73 74 61 74 65 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 69 67 6e | v.state.'),.new.InputOption('ign |
344e0 | 6f 72 65 2d 70 6c 61 74 66 6f 72 6d 2d 72 65 71 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 | ore-platform-req',.null,.InputOp |
34500 | 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 52 45 51 55 49 52 45 44 20 7c 20 49 6e 70 75 74 4f 70 74 69 | tion::VALUE_REQUIRED.|.InputOpti |
34520 | 6f 6e 3a 3a 56 41 4c 55 45 5f 49 53 5f 41 52 52 41 59 2c 20 27 49 67 6e 6f 72 65 20 61 20 73 70 | on::VALUE_IS_ARRAY,.'Ignore.a.sp |
34540 | 65 63 69 66 69 63 20 70 6c 61 74 66 6f 72 6d 20 72 65 71 75 69 72 65 6d 65 6e 74 20 28 70 68 70 | ecific.platform.requirement.(php |
34560 | 20 26 20 65 78 74 2d 20 70 61 63 6b 61 67 65 73 29 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f | .&.ext-.packages).'),.new.InputO |
34580 | 70 74 69 6f 6e 28 27 69 67 6e 6f 72 65 2d 70 6c 61 74 66 6f 72 6d 2d 72 65 71 73 27 2c 20 6e 75 | ption('ignore-platform-reqs',.nu |
345a0 | 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 49 67 | ll,.InputOption::VALUE_NONE,.'Ig |
345c0 | 6e 6f 72 65 20 61 6c 6c 20 70 6c 61 74 66 6f 72 6d 20 72 65 71 75 69 72 65 6d 65 6e 74 73 20 28 | nore.all.platform.requirements.( |
345e0 | 70 68 70 20 26 20 65 78 74 2d 20 70 61 63 6b 61 67 65 73 29 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 | php.&.ext-.packages).'),.new.Inp |
34600 | 75 74 4f 70 74 69 6f 6e 28 27 73 74 72 69 63 74 2d 70 73 72 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 | utOption('strict-psr',.null,.Inp |
34620 | 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 52 65 74 75 72 6e 20 61 20 | utOption::VALUE_NONE,.'Return.a. |
34640 | 66 61 69 6c 65 64 20 73 74 61 74 75 73 20 63 6f 64 65 20 28 31 29 20 69 66 20 50 53 52 2d 34 20 | failed.status.code.(1).if.PSR-4. |
34660 | 6f 72 20 50 53 52 2d 30 20 6d 61 70 70 69 6e 67 20 65 72 72 6f 72 73 20 61 72 65 20 70 72 65 73 | or.PSR-0.mapping.errors.are.pres |
34680 | 65 6e 74 2e 20 52 65 71 75 69 72 65 73 20 2d 2d 6f 70 74 69 6d 69 7a 65 20 74 6f 20 77 6f 72 6b | ent..Requires.--optimize.to.work |
346a0 | 2e 27 29 2c 0a 5d 29 0a 2d 3e 73 65 74 48 65 6c 70 28 0a 3c 3c 3c 45 4f 54 0a 3c 69 6e 66 6f 3e | .'),.]).->setHelp(.<<<EOT.<info> |
346c0 | 70 68 70 20 63 6f 6d 70 6f 73 65 72 2e 70 68 61 72 20 64 75 6d 70 2d 61 75 74 6f 6c 6f 61 64 3c | php.composer.phar.dump-autoload< |
346e0 | 2f 69 6e 66 6f 3e 0a 0a 52 65 61 64 20 6d 6f 72 65 20 61 74 20 68 74 74 70 73 3a 2f 2f 67 65 74 | /info>..Read.more.at.https://get |
34700 | 63 6f 6d 70 6f 73 65 72 2e 6f 72 67 2f 64 6f 63 2f 30 33 2d 63 6c 69 2e 6d 64 23 64 75 6d 70 2d | composer.org/doc/03-cli.md#dump- |
34720 | 61 75 74 6f 6c 6f 61 64 2d 64 75 6d 70 61 75 74 6f 6c 6f 61 64 2d 0a 45 4f 54 0a 29 0a 3b 0a 7d | autoload-dumpautoload-.EOT.).;.} |
34740 | 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 65 78 65 63 75 74 65 28 49 6e 70 | ..protected.function.execute(Inp |
34760 | 75 74 49 6e 74 65 72 66 61 63 65 20 24 69 6e 70 75 74 2c 20 4f 75 74 70 75 74 49 6e 74 65 72 66 | utInterface.$input,.OutputInterf |
34780 | 61 63 65 20 24 6f 75 74 70 75 74 29 0a 7b 0a 24 63 6f 6d 70 6f 73 65 72 20 3d 20 24 74 68 69 73 | ace.$output).{.$composer.=.$this |
347a0 | 2d 3e 72 65 71 75 69 72 65 43 6f 6d 70 6f 73 65 72 28 29 3b 0a 0a 24 63 6f 6d 6d 61 6e 64 45 76 | ->requireComposer();..$commandEv |
347c0 | 65 6e 74 20 3d 20 6e 65 77 20 43 6f 6d 6d 61 6e 64 45 76 65 6e 74 28 50 6c 75 67 69 6e 45 76 65 | ent.=.new.CommandEvent(PluginEve |
347e0 | 6e 74 73 3a 3a 43 4f 4d 4d 41 4e 44 2c 20 27 64 75 6d 70 2d 61 75 74 6f 6c 6f 61 64 27 2c 20 24 | nts::COMMAND,.'dump-autoload',.$ |
34800 | 69 6e 70 75 74 2c 20 24 6f 75 74 70 75 74 29 3b 0a 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 45 | input,.$output);.$composer->getE |
34820 | 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 28 29 2d 3e 64 69 73 70 61 74 63 68 28 24 63 6f 6d 6d | ventDispatcher()->dispatch($comm |
34840 | 61 6e 64 45 76 65 6e 74 2d 3e 67 65 74 4e 61 6d 65 28 29 2c 20 24 63 6f 6d 6d 61 6e 64 45 76 65 | andEvent->getName(),.$commandEve |
34860 | 6e 74 29 3b 0a 0a 24 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 72 20 3d 20 24 63 6f | nt);..$installationManager.=.$co |
34880 | 6d 70 6f 73 65 72 2d 3e 67 65 74 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 72 28 29 | mposer->getInstallationManager() |
348a0 | 3b 0a 24 6c 6f 63 61 6c 52 65 70 6f 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 52 65 70 | ;.$localRepo.=.$composer->getRep |
348c0 | 6f 73 69 74 6f 72 79 4d 61 6e 61 67 65 72 28 29 2d 3e 67 65 74 4c 6f 63 61 6c 52 65 70 6f 73 69 | ositoryManager()->getLocalReposi |
348e0 | 74 6f 72 79 28 29 3b 0a 24 70 61 63 6b 61 67 65 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 | tory();.$package.=.$composer->ge |
34900 | 74 50 61 63 6b 61 67 65 28 29 3b 0a 24 63 6f 6e 66 69 67 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d | tPackage();.$config.=.$composer- |
34920 | 3e 67 65 74 43 6f 6e 66 69 67 28 29 3b 0a 0a 24 6f 70 74 69 6d 69 7a 65 20 3d 20 24 69 6e 70 75 | >getConfig();..$optimize.=.$inpu |
34940 | 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6f 70 74 69 6d 69 7a 65 27 29 20 7c 7c 20 24 63 6f 6e | t->getOption('optimize').||.$con |
34960 | 66 69 67 2d 3e 67 65 74 28 27 6f 70 74 69 6d 69 7a 65 2d 61 75 74 6f 6c 6f 61 64 65 72 27 29 3b | fig->get('optimize-autoloader'); |
34980 | 0a 24 61 75 74 68 6f 72 69 74 61 74 69 76 65 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 | .$authoritative.=.$input->getOpt |
349a0 | 69 6f 6e 28 27 63 6c 61 73 73 6d 61 70 2d 61 75 74 68 6f 72 69 74 61 74 69 76 65 27 29 20 7c 7c | ion('classmap-authoritative').|| |
349c0 | 20 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 63 6c 61 73 73 6d 61 70 2d 61 75 74 68 6f 72 69 74 | .$config->get('classmap-authorit |
349e0 | 61 74 69 76 65 27 29 3b 0a 24 61 70 63 75 50 72 65 66 69 78 20 3d 20 24 69 6e 70 75 74 2d 3e 67 | ative');.$apcuPrefix.=.$input->g |
34a00 | 65 74 4f 70 74 69 6f 6e 28 27 61 70 63 75 2d 70 72 65 66 69 78 27 29 3b 0a 24 61 70 63 75 20 3d | etOption('apcu-prefix');.$apcu.= |
34a20 | 20 24 61 70 63 75 50 72 65 66 69 78 20 21 3d 3d 20 6e 75 6c 6c 20 7c 7c 20 24 69 6e 70 75 74 2d | .$apcuPrefix.!==.null.||.$input- |
34a40 | 3e 67 65 74 4f 70 74 69 6f 6e 28 27 61 70 63 75 27 29 20 7c 7c 20 24 63 6f 6e 66 69 67 2d 3e 67 | >getOption('apcu').||.$config->g |
34a60 | 65 74 28 27 61 70 63 75 2d 61 75 74 6f 6c 6f 61 64 65 72 27 29 3b 0a 0a 69 66 20 28 24 69 6e 70 | et('apcu-autoloader');..if.($inp |
34a80 | 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 73 74 72 69 63 74 2d 70 73 72 27 29 20 26 26 20 21 | ut->getOption('strict-psr').&&.! |
34aa0 | 24 6f 70 74 69 6d 69 7a 65 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 64 41 | $optimize).{.throw.new.\InvalidA |
34ac0 | 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 27 2d 2d 73 74 72 69 63 74 2d 70 73 72 20 6d | rgumentException('--strict-psr.m |
34ae0 | 6f 64 65 20 6f 6e 6c 79 20 77 6f 72 6b 73 20 77 69 74 68 20 6f 70 74 69 6d 69 7a 65 64 20 61 75 | ode.only.works.with.optimized.au |
34b00 | 74 6f 6c 6f 61 64 65 72 2c 20 75 73 65 20 2d 2d 6f 70 74 69 6d 69 7a 65 20 69 66 20 79 6f 75 20 | toloader,.use.--optimize.if.you. |
34b20 | 77 61 6e 74 20 61 20 73 74 72 69 63 74 20 72 65 74 75 72 6e 20 76 61 6c 75 65 2e 27 29 3b 0a 7d | want.a.strict.return.value.');.} |
34b40 | 0a 0a 69 66 20 28 24 61 75 74 68 6f 72 69 74 61 74 69 76 65 29 20 7b 0a 24 74 68 69 73 2d 3e 67 | ..if.($authoritative).{.$this->g |
34b60 | 65 74 49 4f 28 29 2d 3e 77 72 69 74 65 28 27 3c 69 6e 66 6f 3e 47 65 6e 65 72 61 74 69 6e 67 20 | etIO()->write('<info>Generating. |
34b80 | 6f 70 74 69 6d 69 7a 65 64 20 61 75 74 6f 6c 6f 61 64 20 66 69 6c 65 73 20 28 61 75 74 68 6f 72 | optimized.autoload.files.(author |
34ba0 | 69 74 61 74 69 76 65 29 3c 2f 69 6e 66 6f 3e 27 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 6f 70 | itative)</info>');.}.elseif.($op |
34bc0 | 74 69 6d 69 7a 65 29 20 7b 0a 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 2d 3e 77 72 69 74 65 28 | timize).{.$this->getIO()->write( |
34be0 | 27 3c 69 6e 66 6f 3e 47 65 6e 65 72 61 74 69 6e 67 20 6f 70 74 69 6d 69 7a 65 64 20 61 75 74 6f | '<info>Generating.optimized.auto |
34c00 | 6c 6f 61 64 20 66 69 6c 65 73 3c 2f 69 6e 66 6f 3e 27 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 74 | load.files</info>');.}.else.{.$t |
34c20 | 68 69 73 2d 3e 67 65 74 49 4f 28 29 2d 3e 77 72 69 74 65 28 27 3c 69 6e 66 6f 3e 47 65 6e 65 72 | his->getIO()->write('<info>Gener |
34c40 | 61 74 69 6e 67 20 61 75 74 6f 6c 6f 61 64 20 66 69 6c 65 73 3c 2f 69 6e 66 6f 3e 27 29 3b 0a 7d | ating.autoload.files</info>');.} |
34c60 | 0a 0a 24 67 65 6e 65 72 61 74 6f 72 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 41 75 74 | ..$generator.=.$composer->getAut |
34c80 | 6f 6c 6f 61 64 47 65 6e 65 72 61 74 6f 72 28 29 3b 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 | oloadGenerator();.if.($input->ge |
34ca0 | 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 64 65 76 27 29 29 20 7b 0a 24 67 65 6e 65 72 61 74 6f 72 2d | tOption('no-dev')).{.$generator- |
34cc0 | 3e 73 65 74 44 65 76 4d 6f 64 65 28 66 61 6c 73 65 29 3b 0a 7d 0a 69 66 20 28 24 69 6e 70 75 74 | >setDevMode(false);.}.if.($input |
34ce0 | 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 64 65 76 27 29 29 20 7b 0a 69 66 20 28 24 69 6e 70 75 74 | ->getOption('dev')).{.if.($input |
34d00 | 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 64 65 76 27 29 29 20 7b 0a 74 68 72 6f 77 20 6e | ->getOption('no-dev')).{.throw.n |
34d20 | 65 77 20 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 27 59 6f | ew.\InvalidArgumentException('Yo |
34d40 | 75 20 63 61 6e 20 6e 6f 74 20 75 73 65 20 62 6f 74 68 20 2d 2d 6e 6f 2d 64 65 76 20 61 6e 64 20 | u.can.not.use.both.--no-dev.and. |
34d60 | 2d 2d 64 65 76 20 61 73 20 74 68 65 79 20 63 6f 6e 66 6c 69 63 74 20 77 69 74 68 20 65 61 63 68 | --dev.as.they.conflict.with.each |
34d80 | 20 6f 74 68 65 72 2e 27 29 3b 0a 7d 0a 24 67 65 6e 65 72 61 74 6f 72 2d 3e 73 65 74 44 65 76 4d | .other.');.}.$generator->setDevM |
34da0 | 6f 64 65 28 74 72 75 65 29 3b 0a 7d 0a 24 67 65 6e 65 72 61 74 6f 72 2d 3e 73 65 74 43 6c 61 73 | ode(true);.}.$generator->setClas |
34dc0 | 73 4d 61 70 41 75 74 68 6f 72 69 74 61 74 69 76 65 28 24 61 75 74 68 6f 72 69 74 61 74 69 76 65 | sMapAuthoritative($authoritative |
34de0 | 29 3b 0a 24 67 65 6e 65 72 61 74 6f 72 2d 3e 73 65 74 52 75 6e 53 63 72 69 70 74 73 28 74 72 75 | );.$generator->setRunScripts(tru |
34e00 | 65 29 3b 0a 24 67 65 6e 65 72 61 74 6f 72 2d 3e 73 65 74 41 70 63 75 28 24 61 70 63 75 2c 20 24 | e);.$generator->setApcu($apcu,.$ |
34e20 | 61 70 63 75 50 72 65 66 69 78 29 3b 0a 24 67 65 6e 65 72 61 74 6f 72 2d 3e 73 65 74 50 6c 61 74 | apcuPrefix);.$generator->setPlat |
34e40 | 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 28 24 74 68 69 73 2d 3e 67 65 74 | formRequirementFilter($this->get |
34e60 | 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 28 24 69 6e 70 75 74 | PlatformRequirementFilter($input |
34e80 | 29 29 3b 0a 24 63 6c 61 73 73 4d 61 70 20 3d 20 24 67 65 6e 65 72 61 74 6f 72 2d 3e 64 75 6d 70 | ));.$classMap.=.$generator->dump |
34ea0 | 28 24 63 6f 6e 66 69 67 2c 20 24 6c 6f 63 61 6c 52 65 70 6f 2c 20 24 70 61 63 6b 61 67 65 2c 20 | ($config,.$localRepo,.$package,. |
34ec0 | 24 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 72 2c 20 27 63 6f 6d 70 6f 73 65 72 27 | $installationManager,.'composer' |
34ee0 | 2c 20 24 6f 70 74 69 6d 69 7a 65 29 3b 0a 24 6e 75 6d 62 65 72 4f 66 43 6c 61 73 73 65 73 20 3d | ,.$optimize);.$numberOfClasses.= |
34f00 | 20 63 6f 75 6e 74 28 24 63 6c 61 73 73 4d 61 70 29 3b 0a 0a 69 66 20 28 24 61 75 74 68 6f 72 69 | .count($classMap);..if.($authori |
34f20 | 74 61 74 69 76 65 29 20 7b 0a 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 2d 3e 77 72 69 74 65 28 | tative).{.$this->getIO()->write( |
34f40 | 27 3c 69 6e 66 6f 3e 47 65 6e 65 72 61 74 65 64 20 6f 70 74 69 6d 69 7a 65 64 20 61 75 74 6f 6c | '<info>Generated.optimized.autol |
34f60 | 6f 61 64 20 66 69 6c 65 73 20 28 61 75 74 68 6f 72 69 74 61 74 69 76 65 29 20 63 6f 6e 74 61 69 | oad.files.(authoritative).contai |
34f80 | 6e 69 6e 67 20 27 2e 20 24 6e 75 6d 62 65 72 4f 66 43 6c 61 73 73 65 73 20 2e 27 20 63 6c 61 73 | ning.'..$numberOfClasses..'.clas |
34fa0 | 73 65 73 3c 2f 69 6e 66 6f 3e 27 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 6f 70 74 69 6d 69 7a | ses</info>');.}.elseif.($optimiz |
34fc0 | 65 29 20 7b 0a 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 2d 3e 77 72 69 74 65 28 27 3c 69 6e 66 | e).{.$this->getIO()->write('<inf |
34fe0 | 6f 3e 47 65 6e 65 72 61 74 65 64 20 6f 70 74 69 6d 69 7a 65 64 20 61 75 74 6f 6c 6f 61 64 20 66 | o>Generated.optimized.autoload.f |
35000 | 69 6c 65 73 20 63 6f 6e 74 61 69 6e 69 6e 67 20 27 2e 20 24 6e 75 6d 62 65 72 4f 66 43 6c 61 73 | iles.containing.'..$numberOfClas |
35020 | 73 65 73 20 2e 27 20 63 6c 61 73 73 65 73 3c 2f 69 6e 66 6f 3e 27 29 3b 0a 7d 20 65 6c 73 65 20 | ses..'.classes</info>');.}.else. |
35040 | 7b 0a 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 2d 3e 77 72 69 74 65 28 27 3c 69 6e 66 6f 3e 47 | {.$this->getIO()->write('<info>G |
35060 | 65 6e 65 72 61 74 65 64 20 61 75 74 6f 6c 6f 61 64 20 66 69 6c 65 73 3c 2f 69 6e 66 6f 3e 27 29 | enerated.autoload.files</info>') |
35080 | 3b 0a 7d 0a 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 73 74 72 69 | ;.}..if.($input->getOption('stri |
350a0 | 63 74 2d 70 73 72 27 29 20 26 26 20 63 6f 75 6e 74 28 24 63 6c 61 73 73 4d 61 70 2d 3e 67 65 74 | ct-psr').&&.count($classMap->get |
350c0 | 50 73 72 56 69 6f 6c 61 74 69 6f 6e 73 28 29 29 20 3e 20 30 29 20 7b 0a 72 65 74 75 72 6e 20 31 | PsrViolations()).>.0).{.return.1 |
350e0 | 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 | ;.}..return.0;.}.}.<?php.declare |
35100 | 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d | (strict_types=1);............nam |
35120 | 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6d 6d 61 6e 64 3b 0a 0a 75 73 65 20 53 79 | espace.Composer\Command;..use.Sy |
35140 | 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e | mfony\Component\Console\Input\In |
35160 | 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 73 6f | putInterface;.use.Composer\Conso |
35180 | 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 4f 70 74 69 6f 6e 3b 0a 75 73 65 20 53 79 6d 66 6f 6e | le\Input\InputOption;.use.Symfon |
351a0 | 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 4f 75 74 70 75 74 5c 4f 75 74 70 75 | y\Component\Console\Output\Outpu |
351c0 | 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 73 6f 6c 65 | tInterface;.use.Composer\Console |
351e0 | 5c 49 6e 70 75 74 5c 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 3b 0a 0a 0a 0a 0a 63 6c 61 73 73 20 | \Input\InputArgument;.....class. |
35200 | 45 78 65 63 43 6f 6d 6d 61 6e 64 20 65 78 74 65 6e 64 73 20 42 61 73 65 43 6f 6d 6d 61 6e 64 0a | ExecCommand.extends.BaseCommand. |
35220 | 7b 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 63 6f 6e 66 69 67 75 72 | {....protected.function.configur |
35240 | 65 28 29 0a 7b 0a 24 74 68 69 73 0a 2d 3e 73 65 74 4e 61 6d 65 28 27 65 78 65 63 27 29 0a 2d 3e | e().{.$this.->setName('exec').-> |
35260 | 73 65 74 44 65 73 63 72 69 70 74 69 6f 6e 28 27 45 78 65 63 75 74 65 73 20 61 20 76 65 6e 64 6f | setDescription('Executes.a.vendo |
35280 | 72 65 64 20 62 69 6e 61 72 79 2f 73 63 72 69 70 74 27 29 0a 2d 3e 73 65 74 44 65 66 69 6e 69 74 | red.binary/script').->setDefinit |
352a0 | 69 6f 6e 28 5b 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6c 69 73 74 27 2c 20 27 6c | ion([.new.InputOption('list',.'l |
352c0 | 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 29 2c 0a 6e 65 77 | ',.InputOption::VALUE_NONE),.new |
352e0 | 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 28 27 62 69 6e 61 72 79 27 2c 20 49 6e 70 75 74 41 72 | .InputArgument('binary',.InputAr |
35300 | 67 75 6d 65 6e 74 3a 3a 4f 50 54 49 4f 4e 41 4c 2c 20 27 54 68 65 20 62 69 6e 61 72 79 20 74 6f | gument::OPTIONAL,.'The.binary.to |
35320 | 20 72 75 6e 2c 20 65 2e 67 2e 20 70 68 70 75 6e 69 74 27 2c 20 6e 75 6c 6c 2c 20 66 75 6e 63 74 | .run,.e.g..phpunit',.null,.funct |
35340 | 69 6f 6e 20 28 29 20 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 67 65 74 42 69 6e 61 72 69 | ion.().{.return.$this->getBinari |
35360 | 65 73 28 66 61 6c 73 65 29 3b 0a 7d 29 2c 0a 6e 65 77 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 | es(false);.}),.new.InputArgument |
35380 | 28 0a 27 61 72 67 73 27 2c 0a 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 3a 3a 49 53 5f 41 52 52 41 | (.'args',.InputArgument::IS_ARRA |
353a0 | 59 20 7c 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 3a 3a 4f 50 54 49 4f 4e 41 4c 2c 0a 27 41 72 | Y.|.InputArgument::OPTIONAL,.'Ar |
353c0 | 67 75 6d 65 6e 74 73 20 74 6f 20 70 61 73 73 20 74 6f 20 74 68 65 20 62 69 6e 61 72 79 2e 20 55 | guments.to.pass.to.the.binary..U |
353e0 | 73 65 20 3c 69 6e 66 6f 3e 2d 2d 3c 2f 69 6e 66 6f 3e 20 74 6f 20 73 65 70 61 72 61 74 65 20 66 | se.<info>--</info>.to.separate.f |
35400 | 72 6f 6d 20 63 6f 6d 70 6f 73 65 72 20 61 72 67 75 6d 65 6e 74 73 27 0a 29 2c 0a 5d 29 0a 2d 3e | rom.composer.arguments'.),.]).-> |
35420 | 73 65 74 48 65 6c 70 28 0a 3c 3c 3c 45 4f 54 0a 45 78 65 63 75 74 65 73 20 61 20 76 65 6e 64 6f | setHelp(.<<<EOT.Executes.a.vendo |
35440 | 72 65 64 20 62 69 6e 61 72 79 2f 73 63 72 69 70 74 2e 0a 0a 52 65 61 64 20 6d 6f 72 65 20 61 74 | red.binary/script...Read.more.at |
35460 | 20 68 74 74 70 73 3a 2f 2f 67 65 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 67 2f 64 6f 63 2f 30 33 2d | .https://getcomposer.org/doc/03- |
35480 | 63 6c 69 2e 6d 64 23 65 78 65 63 0a 45 4f 54 0a 29 0a 3b 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 | cli.md#exec.EOT.).;.}..protected |
354a0 | 20 66 75 6e 63 74 69 6f 6e 20 65 78 65 63 75 74 65 28 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 | .function.execute(InputInterface |
354c0 | 20 24 69 6e 70 75 74 2c 20 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 6f 75 74 70 75 74 | .$input,.OutputInterface.$output |
354e0 | 29 0a 7b 0a 24 63 6f 6d 70 6f 73 65 72 20 3d 20 24 74 68 69 73 2d 3e 72 65 71 75 69 72 65 43 6f | ).{.$composer.=.$this->requireCo |
35500 | 6d 70 6f 73 65 72 28 29 3b 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 | mposer();.if.($input->getOption( |
35520 | 27 6c 69 73 74 27 29 20 7c 7c 20 6e 75 6c 6c 20 3d 3d 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 41 | 'list').||.null.===.$input->getA |
35540 | 72 67 75 6d 65 6e 74 28 27 62 69 6e 61 72 79 27 29 29 20 7b 0a 24 62 69 6e 73 20 3d 20 24 74 68 | rgument('binary')).{.$bins.=.$th |
35560 | 69 73 2d 3e 67 65 74 42 69 6e 61 72 69 65 73 28 74 72 75 65 29 3b 0a 69 66 20 28 5b 5d 20 3d 3d | is->getBinaries(true);.if.([].== |
35580 | 3d 20 24 62 69 6e 73 29 20 7b 0a 24 62 69 6e 44 69 72 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e | =.$bins).{.$binDir.=.$composer-> |
355a0 | 67 65 74 43 6f 6e 66 69 67 28 29 2d 3e 67 65 74 28 27 62 69 6e 2d 64 69 72 27 29 3b 0a 0a 74 68 | getConfig()->get('bin-dir');..th |
355c0 | 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 22 4e 6f 20 62 69 | row.new.\RuntimeException("No.bi |
355e0 | 6e 61 72 69 65 73 20 66 6f 75 6e 64 20 69 6e 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 20 6f 72 | naries.found.in.composer.json.or |
35600 | 20 69 6e 20 62 69 6e 2d 64 69 72 20 28 24 62 69 6e 44 69 72 29 22 29 3b 0a 7d 0a 0a 24 74 68 69 | .in.bin-dir.($binDir)");.}..$thi |
35620 | 73 2d 3e 67 65 74 49 4f 28 29 2d 3e 77 72 69 74 65 28 0a 3c 3c 3c 45 4f 54 0a 3c 63 6f 6d 6d 65 | s->getIO()->write(.<<<EOT.<comme |
35640 | 6e 74 3e 41 76 61 69 6c 61 62 6c 65 20 62 69 6e 61 72 69 65 73 3a 3c 2f 63 6f 6d 6d 65 6e 74 3e | nt>Available.binaries:</comment> |
35660 | 0a 45 4f 54 0a 29 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 62 69 6e 73 20 61 73 20 24 62 69 6e 29 | .EOT.);..foreach.($bins.as.$bin) |
35680 | 20 7b 0a 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 2d 3e 77 72 69 74 65 28 0a 3c 3c 3c 45 4f 54 | .{.$this->getIO()->write(.<<<EOT |
356a0 | 0a 3c 69 6e 66 6f 3e 2d 20 24 62 69 6e 3c 2f 69 6e 66 6f 3e 0a 45 4f 54 0a 29 3b 0a 7d 0a 0a 72 | .<info>-.$bin</info>.EOT.);.}..r |
356c0 | 65 74 75 72 6e 20 30 3b 0a 7d 0a 0a 24 62 69 6e 61 72 79 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 | eturn.0;.}..$binary.=.$input->ge |
356e0 | 74 41 72 67 75 6d 65 6e 74 28 27 62 69 6e 61 72 79 27 29 3b 0a 0a 24 64 69 73 70 61 74 63 68 65 | tArgument('binary');..$dispatche |
35700 | 72 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 | r.=.$composer->getEventDispatche |
35720 | 72 28 29 3b 0a 24 64 69 73 70 61 74 63 68 65 72 2d 3e 61 64 64 4c 69 73 74 65 6e 65 72 28 27 5f | r();.$dispatcher->addListener('_ |
35740 | 5f 65 78 65 63 5f 63 6f 6d 6d 61 6e 64 27 2c 20 24 62 69 6e 61 72 79 29 3b 0a 0a 0a 0a 0a 69 66 | _exec_command',.$binary);.....if |
35760 | 20 28 67 65 74 63 77 64 28 29 20 21 3d 3d 20 24 74 68 69 73 2d 3e 67 65 74 41 70 70 6c 69 63 61 | .(getcwd().!==.$this->getApplica |
35780 | 74 69 6f 6e 28 29 2d 3e 67 65 74 49 6e 69 74 69 61 6c 57 6f 72 6b 69 6e 67 44 69 72 65 63 74 6f | tion()->getInitialWorkingDirecto |
357a0 | 72 79 28 29 20 26 26 20 24 74 68 69 73 2d 3e 67 65 74 41 70 70 6c 69 63 61 74 69 6f 6e 28 29 2d | ry().&&.$this->getApplication()- |
357c0 | 3e 67 65 74 49 6e 69 74 69 61 6c 57 6f 72 6b 69 6e 67 44 69 72 65 63 74 6f 72 79 28 29 20 21 3d | >getInitialWorkingDirectory().!= |
357e0 | 3d 20 66 61 6c 73 65 29 20 7b 0a 74 72 79 20 7b 0a 63 68 64 69 72 28 24 74 68 69 73 2d 3e 67 65 | =.false).{.try.{.chdir($this->ge |
35800 | 74 41 70 70 6c 69 63 61 74 69 6f 6e 28 29 2d 3e 67 65 74 49 6e 69 74 69 61 6c 57 6f 72 6b 69 6e | tApplication()->getInitialWorkin |
35820 | 67 44 69 72 65 63 74 6f 72 79 28 29 29 3b 0a 7d 20 63 61 74 63 68 20 28 5c 45 78 63 65 70 74 69 | gDirectory());.}.catch.(\Excepti |
35840 | 6f 6e 20 24 65 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 | on.$e).{.throw.new.\RuntimeExcep |
35860 | 74 69 6f 6e 28 27 43 6f 75 6c 64 20 6e 6f 74 20 73 77 69 74 63 68 20 62 61 63 6b 20 74 6f 20 77 | tion('Could.not.switch.back.to.w |
35880 | 6f 72 6b 69 6e 67 20 64 69 72 65 63 74 6f 72 79 20 22 27 2e 24 74 68 69 73 2d 3e 67 65 74 41 70 | orking.directory."'.$this->getAp |
358a0 | 70 6c 69 63 61 74 69 6f 6e 28 29 2d 3e 67 65 74 49 6e 69 74 69 61 6c 57 6f 72 6b 69 6e 67 44 69 | plication()->getInitialWorkingDi |
358c0 | 72 65 63 74 6f 72 79 28 29 2e 27 22 27 2c 20 30 2c 20 24 65 29 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 | rectory().'"',.0,.$e);.}.}..retu |
358e0 | 72 6e 20 24 64 69 73 70 61 74 63 68 65 72 2d 3e 64 69 73 70 61 74 63 68 53 63 72 69 70 74 28 27 | rn.$dispatcher->dispatchScript(' |
35900 | 5f 5f 65 78 65 63 5f 63 6f 6d 6d 61 6e 64 27 2c 20 74 72 75 65 2c 20 24 69 6e 70 75 74 2d 3e 67 | __exec_command',.true,.$input->g |
35920 | 65 74 41 72 67 75 6d 65 6e 74 28 27 61 72 67 73 27 29 29 3b 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 | etArgument('args'));.}.....priva |
35940 | 74 65 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 42 69 6e 61 72 69 65 73 28 62 6f 6f 6c 20 24 66 6f | te.function.getBinaries(bool.$fo |
35960 | 72 44 69 73 70 6c 61 79 29 3a 20 61 72 72 61 79 0a 7b 0a 24 63 6f 6d 70 6f 73 65 72 20 3d 20 24 | rDisplay):.array.{.$composer.=.$ |
35980 | 74 68 69 73 2d 3e 72 65 71 75 69 72 65 43 6f 6d 70 6f 73 65 72 28 29 3b 0a 24 62 69 6e 44 69 72 | this->requireComposer();.$binDir |
359a0 | 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 43 6f 6e 66 69 67 28 29 2d 3e 67 65 74 28 27 | .=.$composer->getConfig()->get(' |
359c0 | 62 69 6e 2d 64 69 72 27 29 3b 0a 24 62 69 6e 73 20 3d 20 67 6c 6f 62 28 24 62 69 6e 44 69 72 20 | bin-dir');.$bins.=.glob($binDir. |
359e0 | 2e 20 27 2f 2a 27 29 3b 0a 24 6c 6f 63 61 6c 42 69 6e 73 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d | ..'/*');.$localBins.=.$composer- |
35a00 | 3e 67 65 74 50 61 63 6b 61 67 65 28 29 2d 3e 67 65 74 42 69 6e 61 72 69 65 73 28 29 3b 0a 69 66 | >getPackage()->getBinaries();.if |
35a20 | 20 28 24 66 6f 72 44 69 73 70 6c 61 79 29 20 7b 0a 24 6c 6f 63 61 6c 42 69 6e 73 20 3d 20 61 72 | .($forDisplay).{.$localBins.=.ar |
35a40 | 72 61 79 5f 6d 61 70 28 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 65 29 20 7b 0a 72 | ray_map(static.function.($e).{.r |
35a60 | 65 74 75 72 6e 20 22 24 65 20 28 6c 6f 63 61 6c 29 22 3b 0a 7d 2c 20 24 6c 6f 63 61 6c 42 69 6e | eturn."$e.(local)";.},.$localBin |
35a80 | 73 29 3b 0a 7d 0a 0a 24 62 69 6e 61 72 69 65 73 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 | s);.}..$binaries.=.[];.foreach.( |
35aa0 | 61 72 72 61 79 5f 6d 65 72 67 65 28 24 62 69 6e 73 2c 20 24 6c 6f 63 61 6c 42 69 6e 73 29 20 61 | array_merge($bins,.$localBins).a |
35ac0 | 73 20 24 62 69 6e 29 20 7b 0a 0a 69 66 20 28 69 73 73 65 74 28 24 70 72 65 76 69 6f 75 73 42 69 | s.$bin).{..if.(isset($previousBi |
35ae0 | 6e 29 20 26 26 20 24 62 69 6e 20 3d 3d 3d 20 24 70 72 65 76 69 6f 75 73 42 69 6e 2e 27 2e 62 61 | n).&&.$bin.===.$previousBin.'.ba |
35b00 | 74 27 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 24 70 72 65 76 69 6f 75 73 42 69 6e 20 | t').{.continue;.}..$previousBin. |
35b20 | 3d 20 24 62 69 6e 3b 0a 24 62 69 6e 61 72 69 65 73 5b 5d 20 3d 20 62 61 73 65 6e 61 6d 65 28 24 | =.$bin;.$binaries[].=.basename($ |
35b40 | 62 69 6e 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 62 69 6e 61 72 69 65 73 3b 0a 7d 0a 7d 0a 3c | bin);.}..return.$binaries;.}.}.< |
35b60 | 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a | ?php.declare(strict_types=1);... |
35b80 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6d 6d | .........namespace.Composer\Comm |
35ba0 | 61 6e 64 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 4a 73 6f 6e 5c 4a 73 6f 6e 46 69 6c 65 | and;..use.Composer\Json\JsonFile |
35bc0 | 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 41 6c 69 61 73 50 61 63 6b | ;.use.Composer\Package\AliasPack |
35be0 | 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 42 61 73 65 50 61 | age;.use.Composer\Package\BasePa |
35c00 | 63 6b 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 43 6f 6d 70 | ckage;.use.Composer\Package\Comp |
35c20 | 6c 65 74 65 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 | letePackageInterface;.use.Compos |
35c40 | 65 72 5c 50 63 72 65 5c 50 72 65 67 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 | er\Pcre\Preg;.use.Composer\Repos |
35c60 | 69 74 6f 72 79 5c 43 6f 6d 70 6f 73 69 74 65 52 65 70 6f 73 69 74 6f 72 79 3b 0a 75 73 65 20 43 | itory\CompositeRepository;.use.C |
35c80 | 6f 6d 70 6f 73 65 72 5c 53 65 6d 76 65 72 5c 43 6f 6e 73 74 72 61 69 6e 74 5c 4d 61 74 63 68 41 | omposer\Semver\Constraint\MatchA |
35ca0 | 6c 6c 43 6f 6e 73 74 72 61 69 6e 74 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e | llConstraint;.use.Symfony\Compon |
35cc0 | 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 46 6f 72 6d 61 74 74 65 72 5c 4f 75 74 70 75 74 46 6f 72 6d | ent\Console\Formatter\OutputForm |
35ce0 | 61 74 74 65 72 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e | atter;.use.Symfony\Component\Con |
35d00 | 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 | sole\Input\InputInterface;.use.C |
35d20 | 6f 6d 70 6f 73 65 72 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 4f 70 74 69 6f | omposer\Console\Input\InputOptio |
35d40 | 6e 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 | n;.use.Symfony\Component\Console |
35d60 | 5c 4f 75 74 70 75 74 5c 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 0a 0a 0a 0a 0a 63 6c | \Output\OutputInterface;......cl |
35d80 | 61 73 73 20 46 75 6e 64 43 6f 6d 6d 61 6e 64 20 65 78 74 65 6e 64 73 20 42 61 73 65 43 6f 6d 6d | ass.FundCommand.extends.BaseComm |
35da0 | 61 6e 64 0a 7b 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 63 6f 6e 66 69 67 75 | and.{.protected.function.configu |
35dc0 | 72 65 28 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 73 65 74 4e 61 6d 65 28 27 66 75 6e | re():.void.{.$this->setName('fun |
35de0 | 64 27 29 0a 2d 3e 73 65 74 44 65 73 63 72 69 70 74 69 6f 6e 28 27 44 69 73 63 6f 76 65 72 20 68 | d').->setDescription('Discover.h |
35e00 | 6f 77 20 74 6f 20 68 65 6c 70 20 66 75 6e 64 20 74 68 65 20 6d 61 69 6e 74 65 6e 61 6e 63 65 20 | ow.to.help.fund.the.maintenance. |
35e20 | 6f 66 20 79 6f 75 72 20 64 65 70 65 6e 64 65 6e 63 69 65 73 27 29 0a 2d 3e 73 65 74 44 65 66 69 | of.your.dependencies').->setDefi |
35e40 | 6e 69 74 69 6f 6e 28 5b 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 66 6f 72 6d 61 74 | nition([.new.InputOption('format |
35e60 | 27 2c 20 27 66 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 52 45 51 55 49 | ',.'f',.InputOption::VALUE_REQUI |
35e80 | 52 45 44 2c 20 27 46 6f 72 6d 61 74 20 6f 66 20 74 68 65 20 6f 75 74 70 75 74 3a 20 74 65 78 74 | RED,.'Format.of.the.output:.text |
35ea0 | 20 6f 72 20 6a 73 6f 6e 27 2c 20 27 74 65 78 74 27 2c 20 5b 27 74 65 78 74 27 2c 20 27 6a 73 6f | .or.json',.'text',.['text',.'jso |
35ec0 | 6e 27 5d 29 2c 0a 5d 29 0a 3b 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e | n']),.]).;.}..protected.function |
35ee0 | 20 65 78 65 63 75 74 65 28 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 69 6e 70 75 74 2c 20 | .execute(InputInterface.$input,. |
35f00 | 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 6f 75 74 70 75 74 29 3a 20 69 6e 74 0a 7b 0a | OutputInterface.$output):.int.{. |
35f20 | 24 63 6f 6d 70 6f 73 65 72 20 3d 20 24 74 68 69 73 2d 3e 72 65 71 75 69 72 65 43 6f 6d 70 6f 73 | $composer.=.$this->requireCompos |
35f40 | 65 72 28 29 3b 0a 0a 24 72 65 70 6f 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 52 65 70 | er();..$repo.=.$composer->getRep |
35f60 | 6f 73 69 74 6f 72 79 4d 61 6e 61 67 65 72 28 29 2d 3e 67 65 74 4c 6f 63 61 6c 52 65 70 6f 73 69 | ositoryManager()->getLocalReposi |
35f80 | 74 6f 72 79 28 29 3b 0a 24 72 65 6d 6f 74 65 52 65 70 6f 73 20 3d 20 6e 65 77 20 43 6f 6d 70 6f | tory();.$remoteRepos.=.new.Compo |
35fa0 | 73 69 74 65 52 65 70 6f 73 69 74 6f 72 79 28 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 52 65 70 | siteRepository($composer->getRep |
35fc0 | 6f 73 69 74 6f 72 79 4d 61 6e 61 67 65 72 28 29 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 69 65 | ositoryManager()->getRepositorie |
35fe0 | 73 28 29 29 3b 0a 24 66 75 6e 64 69 6e 67 73 20 3d 20 5b 5d 3b 0a 0a 24 70 61 63 6b 61 67 65 73 | s());.$fundings.=.[];..$packages |
36000 | 54 6f 4c 6f 61 64 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 72 65 70 6f 2d 3e 67 65 74 | ToLoad.=.[];.foreach.($repo->get |
36020 | 50 61 63 6b 61 67 65 73 28 29 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 69 66 20 28 24 70 | Packages().as.$package).{.if.($p |
36040 | 61 63 6b 61 67 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 41 6c 69 61 73 50 61 63 6b 61 67 65 29 20 | ackage.instanceof.AliasPackage). |
36060 | 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 24 70 61 63 6b 61 67 65 73 54 6f 4c 6f 61 64 5b 24 70 | {.continue;.}.$packagesToLoad[$p |
36080 | 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 20 3d 20 6e 65 77 20 4d 61 74 63 68 41 6c | ackage->getName()].=.new.MatchAl |
360a0 | 6c 43 6f 6e 73 74 72 61 69 6e 74 28 29 3b 0a 7d 0a 0a 0a 24 72 65 73 75 6c 74 20 3d 20 24 72 65 | lConstraint();.}...$result.=.$re |
360c0 | 6d 6f 74 65 52 65 70 6f 73 2d 3e 6c 6f 61 64 50 61 63 6b 61 67 65 73 28 24 70 61 63 6b 61 67 65 | moteRepos->loadPackages($package |
360e0 | 73 54 6f 4c 6f 61 64 2c 20 5b 27 64 65 76 27 20 3d 3e 20 42 61 73 65 50 61 63 6b 61 67 65 3a 3a | sToLoad,.['dev'.=>.BasePackage:: |
36100 | 53 54 41 42 49 4c 49 54 59 5f 44 45 56 5d 2c 20 5b 5d 29 3b 0a 0a 0a 66 6f 72 65 61 63 68 20 28 | STABILITY_DEV],.[]);...foreach.( |
36120 | 24 72 65 73 75 6c 74 5b 27 70 61 63 6b 61 67 65 73 27 5d 20 61 73 20 24 70 61 63 6b 61 67 65 29 | $result['packages'].as.$package) |
36140 | 20 7b 0a 69 66 20 28 0a 21 24 70 61 63 6b 61 67 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 41 6c 69 | .{.if.(.!$package.instanceof.Ali |
36160 | 61 73 50 61 63 6b 61 67 65 0a 26 26 20 24 70 61 63 6b 61 67 65 20 69 6e 73 74 61 6e 63 65 6f 66 | asPackage.&&.$package.instanceof |
36180 | 20 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 0a 26 26 20 24 70 61 | .CompletePackageInterface.&&.$pa |
361a0 | 63 6b 61 67 65 2d 3e 69 73 44 65 66 61 75 6c 74 42 72 61 6e 63 68 28 29 0a 26 26 20 24 70 61 63 | ckage->isDefaultBranch().&&.$pac |
361c0 | 6b 61 67 65 2d 3e 67 65 74 46 75 6e 64 69 6e 67 28 29 0a 26 26 20 69 73 73 65 74 28 24 70 61 63 | kage->getFunding().&&.isset($pac |
361e0 | 6b 61 67 65 73 54 6f 4c 6f 61 64 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 5d | kagesToLoad[$package->getName()] |
36200 | 29 0a 29 20 7b 0a 24 66 75 6e 64 69 6e 67 73 20 3d 20 24 74 68 69 73 2d 3e 69 6e 73 65 72 74 46 | ).).{.$fundings.=.$this->insertF |
36220 | 75 6e 64 69 6e 67 44 61 74 61 28 24 66 75 6e 64 69 6e 67 73 2c 20 24 70 61 63 6b 61 67 65 29 3b | undingData($fundings,.$package); |
36240 | 0a 75 6e 73 65 74 28 24 70 61 63 6b 61 67 65 73 54 6f 4c 6f 61 64 5b 24 70 61 63 6b 61 67 65 2d | .unset($packagesToLoad[$package- |
36260 | 3e 67 65 74 4e 61 6d 65 28 29 5d 29 3b 0a 7d 0a 7d 0a 0a 0a 66 6f 72 65 61 63 68 20 28 24 72 65 | >getName()]);.}.}...foreach.($re |
36280 | 70 6f 2d 3e 67 65 74 50 61 63 6b 61 67 65 73 28 29 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b | po->getPackages().as.$package).{ |
362a0 | 0a 69 66 20 28 24 70 61 63 6b 61 67 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 41 6c 69 61 73 50 61 | .if.($package.instanceof.AliasPa |
362c0 | 63 6b 61 67 65 20 7c 7c 20 21 69 73 73 65 74 28 24 70 61 63 6b 61 67 65 73 54 6f 4c 6f 61 64 5b | ckage.||.!isset($packagesToLoad[ |
362e0 | 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 | $package->getName()])).{.continu |
36300 | 65 3b 0a 7d 0a 0a 69 66 20 28 24 70 61 63 6b 61 67 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 43 6f | e;.}..if.($package.instanceof.Co |
36320 | 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 26 26 20 24 70 61 63 6b 61 | mpletePackageInterface.&&.$packa |
36340 | 67 65 2d 3e 67 65 74 46 75 6e 64 69 6e 67 28 29 29 20 7b 0a 24 66 75 6e 64 69 6e 67 73 20 3d 20 | ge->getFunding()).{.$fundings.=. |
36360 | 24 74 68 69 73 2d 3e 69 6e 73 65 72 74 46 75 6e 64 69 6e 67 44 61 74 61 28 24 66 75 6e 64 69 6e | $this->insertFundingData($fundin |
36380 | 67 73 2c 20 24 70 61 63 6b 61 67 65 29 3b 0a 7d 0a 7d 0a 0a 6b 73 6f 72 74 28 24 66 75 6e 64 69 | gs,.$package);.}.}..ksort($fundi |
363a0 | 6e 67 73 29 3b 0a 0a 24 69 6f 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 3b 0a 0a 24 66 | ngs);..$io.=.$this->getIO();..$f |
363c0 | 6f 72 6d 61 74 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 66 6f 72 6d 61 | ormat.=.$input->getOption('forma |
363e0 | 74 27 29 3b 0a 69 66 20 28 21 69 6e 5f 61 72 72 61 79 28 24 66 6f 72 6d 61 74 2c 20 5b 27 74 65 | t');.if.(!in_array($format,.['te |
36400 | 78 74 27 2c 20 27 6a 73 6f 6e 27 5d 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 | xt',.'json'])).{.$io->writeError |
36420 | 28 73 70 72 69 6e 74 66 28 27 55 6e 73 75 70 70 6f 72 74 65 64 20 66 6f 72 6d 61 74 20 22 25 73 | (sprintf('Unsupported.format."%s |
36440 | 22 2e 20 53 65 65 20 68 65 6c 70 20 66 6f 72 20 73 75 70 70 6f 72 74 65 64 20 66 6f 72 6d 61 74 | "..See.help.for.supported.format |
36460 | 73 2e 27 2c 20 24 66 6f 72 6d 61 74 29 29 3b 0a 0a 72 65 74 75 72 6e 20 31 3b 0a 7d 0a 0a 69 66 | s.',.$format));..return.1;.}..if |
36480 | 20 28 24 66 75 6e 64 69 6e 67 73 20 26 26 20 24 66 6f 72 6d 61 74 20 3d 3d 3d 20 27 74 65 78 74 | .($fundings.&&.$format.===.'text |
364a0 | 27 29 20 7b 0a 24 70 72 65 76 20 3d 20 6e 75 6c 6c 3b 0a 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 | ').{.$prev.=.null;..$io->write(' |
364c0 | 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 70 61 63 6b 61 67 65 73 20 77 65 72 65 20 66 6f 75 6e | The.following.packages.were.foun |
364e0 | 64 20 69 6e 20 79 6f 75 72 20 64 65 70 65 6e 64 65 6e 63 69 65 73 20 77 68 69 63 68 20 70 75 62 | d.in.your.dependencies.which.pub |
36500 | 6c 69 73 68 20 66 75 6e 64 69 6e 67 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 3a 27 29 3b 0a 0a 66 6f | lish.funding.information:');..fo |
36520 | 72 65 61 63 68 20 28 24 66 75 6e 64 69 6e 67 73 20 61 73 20 24 76 65 6e 64 6f 72 20 3d 3e 20 24 | reach.($fundings.as.$vendor.=>.$ |
36540 | 6c 69 6e 6b 73 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 27 29 3b 0a 24 69 6f 2d 3e 77 72 | links).{.$io->write('');.$io->wr |
36560 | 69 74 65 28 73 70 72 69 6e 74 66 28 22 3c 63 6f 6d 6d 65 6e 74 3e 25 73 3c 2f 63 6f 6d 6d 65 6e | ite(sprintf("<comment>%s</commen |
36580 | 74 3e 22 2c 20 24 76 65 6e 64 6f 72 29 29 3b 0a 66 6f 72 65 61 63 68 20 28 24 6c 69 6e 6b 73 20 | t>",.$vendor));.foreach.($links. |
365a0 | 61 73 20 24 75 72 6c 20 3d 3e 20 24 70 61 63 6b 61 67 65 73 29 20 7b 0a 24 6c 69 6e 65 20 3d 20 | as.$url.=>.$packages).{.$line.=. |
365c0 | 73 70 72 69 6e 74 66 28 27 20 20 3c 69 6e 66 6f 3e 25 73 3c 2f 69 6e 66 6f 3e 27 2c 20 69 6d 70 | sprintf('..<info>%s</info>',.imp |
365e0 | 6c 6f 64 65 28 27 2c 20 27 2c 20 24 70 61 63 6b 61 67 65 73 29 29 3b 0a 0a 69 66 20 28 24 70 72 | lode(',.',.$packages));..if.($pr |
36600 | 65 76 20 21 3d 3d 20 24 6c 69 6e 65 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 24 6c 69 6e 65 | ev.!==.$line).{.$io->write($line |
36620 | 29 3b 0a 24 70 72 65 76 20 3d 20 24 6c 69 6e 65 3b 0a 7d 0a 0a 24 69 6f 2d 3e 77 72 69 74 65 28 | );.$prev.=.$line;.}..$io->write( |
36640 | 73 70 72 69 6e 74 66 28 27 20 20 20 20 3c 68 72 65 66 3d 25 73 3e 25 73 3c 2f 3e 27 2c 20 4f 75 | sprintf('....<href=%s>%s</>',.Ou |
36660 | 74 70 75 74 46 6f 72 6d 61 74 74 65 72 3a 3a 65 73 63 61 70 65 28 24 75 72 6c 29 2c 20 24 75 72 | tputFormatter::escape($url),.$ur |
36680 | 6c 29 29 3b 0a 7d 0a 7d 0a 0a 24 69 6f 2d 3e 77 72 69 74 65 28 22 22 29 3b 0a 24 69 6f 2d 3e 77 | l));.}.}..$io->write("");.$io->w |
366a0 | 72 69 74 65 28 22 50 6c 65 61 73 65 20 63 6f 6e 73 69 64 65 72 20 66 6f 6c 6c 6f 77 69 6e 67 20 | rite("Please.consider.following. |
366c0 | 74 68 65 73 65 20 6c 69 6e 6b 73 20 61 6e 64 20 73 70 6f 6e 73 6f 72 69 6e 67 20 74 68 65 20 77 | these.links.and.sponsoring.the.w |
366e0 | 6f 72 6b 20 6f 66 20 70 61 63 6b 61 67 65 20 61 75 74 68 6f 72 73 21 22 29 3b 0a 24 69 6f 2d 3e | ork.of.package.authors!");.$io-> |
36700 | 77 72 69 74 65 28 22 54 68 61 6e 6b 20 79 6f 75 21 22 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 | write("Thank.you!");.}.elseif.($ |
36720 | 66 6f 72 6d 61 74 20 3d 3d 3d 20 27 6a 73 6f 6e 27 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 | format.===.'json').{.$io->write( |
36740 | 4a 73 6f 6e 46 69 6c 65 3a 3a 65 6e 63 6f 64 65 28 24 66 75 6e 64 69 6e 67 73 29 29 3b 0a 7d 20 | JsonFile::encode($fundings));.}. |
36760 | 65 6c 73 65 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 22 4e 6f 20 66 75 6e 64 69 6e 67 20 6c 69 | else.{.$io->write("No.funding.li |
36780 | 6e 6b 73 20 77 65 72 65 20 66 6f 75 6e 64 20 69 6e 20 79 6f 75 72 20 70 61 63 6b 61 67 65 20 64 | nks.were.found.in.your.package.d |
367a0 | 65 70 65 6e 64 65 6e 63 69 65 73 2e 20 54 68 69 73 20 64 6f 65 73 6e 27 74 20 6d 65 61 6e 20 74 | ependencies..This.doesn't.mean.t |
367c0 | 68 65 79 20 64 6f 6e 27 74 20 6e 65 65 64 20 79 6f 75 72 20 73 75 70 70 6f 72 74 21 22 29 3b 0a | hey.don't.need.your.support!");. |
367e0 | 7d 0a 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 | }..return.0;.}......private.func |
36800 | 74 69 6f 6e 20 69 6e 73 65 72 74 46 75 6e 64 69 6e 67 44 61 74 61 28 61 72 72 61 79 20 24 66 75 | tion.insertFundingData(array.$fu |
36820 | 6e 64 69 6e 67 73 2c 20 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 | ndings,.CompletePackageInterface |
36840 | 20 24 70 61 63 6b 61 67 65 29 3a 20 61 72 72 61 79 0a 7b 0a 66 6f 72 65 61 63 68 20 28 24 70 61 | .$package):.array.{.foreach.($pa |
36860 | 63 6b 61 67 65 2d 3e 67 65 74 46 75 6e 64 69 6e 67 28 29 20 61 73 20 24 66 75 6e 64 69 6e 67 4f | ckage->getFunding().as.$fundingO |
36880 | 70 74 69 6f 6e 29 20 7b 0a 5b 24 76 65 6e 64 6f 72 2c 20 24 70 61 63 6b 61 67 65 4e 61 6d 65 5d | ption).{.[$vendor,.$packageName] |
368a0 | 20 3d 20 65 78 70 6c 6f 64 65 28 27 2f 27 2c 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 | .=.explode('/',.$package->getPre |
368c0 | 74 74 79 4e 61 6d 65 28 29 29 3b 0a 0a 69 66 20 28 65 6d 70 74 79 28 24 66 75 6e 64 69 6e 67 4f | ttyName());..if.(empty($fundingO |
368e0 | 70 74 69 6f 6e 5b 27 75 72 6c 27 5d 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 24 75 72 | ption['url'])).{.continue;.}.$ur |
36900 | 6c 20 3d 20 24 66 75 6e 64 69 6e 67 4f 70 74 69 6f 6e 5b 27 75 72 6c 27 5d 3b 0a 69 66 20 28 21 | l.=.$fundingOption['url'];.if.(! |
36920 | 65 6d 70 74 79 28 24 66 75 6e 64 69 6e 67 4f 70 74 69 6f 6e 5b 27 74 79 70 65 27 5d 29 20 26 26 | empty($fundingOption['type']).&& |
36940 | 20 24 66 75 6e 64 69 6e 67 4f 70 74 69 6f 6e 5b 27 74 79 70 65 27 5d 20 3d 3d 3d 20 27 67 69 74 | .$fundingOption['type'].===.'git |
36960 | 68 75 62 27 20 26 26 20 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b 5e 68 74 74 70 73 3a 2f | hub'.&&.Preg::isMatch('{^https:/ |
36980 | 2f 67 69 74 68 75 62 2e 63 6f 6d 2f 28 5b 5e 2f 5d 2b 29 24 7d 27 2c 20 24 75 72 6c 2c 20 24 6d | /github.com/([^/]+)$}',.$url,.$m |
369a0 | 61 74 63 68 29 29 20 7b 0a 24 75 72 6c 20 3d 20 27 68 74 74 70 73 3a 2f 2f 67 69 74 68 75 62 2e | atch)).{.$url.=.'https://github. |
369c0 | 63 6f 6d 2f 73 70 6f 6e 73 6f 72 73 2f 27 2e 24 6d 61 74 63 68 5b 31 5d 3b 0a 7d 0a 24 66 75 6e | com/sponsors/'.$match[1];.}.$fun |
369e0 | 64 69 6e 67 73 5b 24 76 65 6e 64 6f 72 5d 5b 24 75 72 6c 5d 5b 5d 20 3d 20 24 70 61 63 6b 61 67 | dings[$vendor][$url][].=.$packag |
36a00 | 65 4e 61 6d 65 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 66 75 6e 64 69 6e 67 73 3b 0a 7d 0a 7d 0a | eName;.}..return.$fundings;.}.}. |
36a20 | 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a | <?php.declare(strict_types=1);.. |
36a40 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6d | ..........namespace.Composer\Com |
36a60 | 6d 61 6e 64 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 46 61 63 74 6f 72 79 3b 0a 75 73 65 | mand;..use.Composer\Factory;.use |
36a80 | 20 43 6f 6d 70 6f 73 65 72 5c 50 63 72 65 5c 50 72 65 67 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 | .Composer\Pcre\Preg;.use.Compose |
36aa0 | 72 5c 55 74 69 6c 5c 46 69 6c 65 73 79 73 74 65 6d 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c | r\Util\Filesystem;.use.Composer\ |
36ac0 | 55 74 69 6c 5c 50 6c 61 74 66 6f 72 6d 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f | Util\Platform;.use.Symfony\Compo |
36ae0 | 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 43 6f 6d 6d 61 6e 64 5c 43 6f 6d 6d 61 6e 64 3b 0a 75 73 | nent\Console\Command\Command;.us |
36b00 | 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 43 6f 6d 70 | e.Symfony\Component\Console\Comp |
36b20 | 6c 65 74 69 6f 6e 5c 43 6f 6d 70 6c 65 74 69 6f 6e 49 6e 70 75 74 3b 0a 75 73 65 20 53 79 6d 66 | letion\CompletionInput;.use.Symf |
36b40 | 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 43 6f 6d 70 6c 65 74 69 6f 6e | ony\Component\Console\Completion |
36b60 | 5c 43 6f 6d 70 6c 65 74 69 6f 6e 53 75 67 67 65 73 74 69 6f 6e 73 3b 0a 75 73 65 20 53 79 6d 66 | \CompletionSuggestions;.use.Symf |
36b80 | 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 | ony\Component\Console\Input\Inpu |
36ba0 | 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 73 6f 6c 65 | tInterface;.use.Composer\Console |
36bc0 | 5c 49 6e 70 75 74 5c 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 3b 0a 75 73 65 20 53 79 6d 66 6f 6e | \Input\InputArgument;.use.Symfon |
36be0 | 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 53 74 72 69 6e 67 | y\Component\Console\Input\String |
36c00 | 49 6e 70 75 74 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e | Input;.use.Symfony\Component\Con |
36c20 | 73 6f 6c 65 5c 4f 75 74 70 75 74 5c 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 0a 0a 0a | sole\Output\OutputInterface;.... |
36c40 | 0a 63 6c 61 73 73 20 47 6c 6f 62 61 6c 43 6f 6d 6d 61 6e 64 20 65 78 74 65 6e 64 73 20 42 61 73 | .class.GlobalCommand.extends.Bas |
36c60 | 65 43 6f 6d 6d 61 6e 64 0a 7b 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 63 6f 6d 70 6c | eCommand.{.public.function.compl |
36c80 | 65 74 65 28 43 6f 6d 70 6c 65 74 69 6f 6e 49 6e 70 75 74 20 24 69 6e 70 75 74 2c 20 43 6f 6d 70 | ete(CompletionInput.$input,.Comp |
36ca0 | 6c 65 74 69 6f 6e 53 75 67 67 65 73 74 69 6f 6e 73 20 24 73 75 67 67 65 73 74 69 6f 6e 73 29 3a | letionSuggestions.$suggestions): |
36cc0 | 20 76 6f 69 64 0a 7b 0a 24 61 70 70 6c 69 63 61 74 69 6f 6e 20 3d 20 24 74 68 69 73 2d 3e 67 65 | .void.{.$application.=.$this->ge |
36ce0 | 74 41 70 70 6c 69 63 61 74 69 6f 6e 28 29 3b 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 6d 75 73 74 | tApplication();.if.($input->must |
36d00 | 53 75 67 67 65 73 74 41 72 67 75 6d 65 6e 74 56 61 6c 75 65 73 46 6f 72 28 27 63 6f 6d 6d 61 6e | SuggestArgumentValuesFor('comman |
36d20 | 64 2d 6e 61 6d 65 27 29 29 20 7b 0a 24 73 75 67 67 65 73 74 69 6f 6e 73 2d 3e 73 75 67 67 65 73 | d-name')).{.$suggestions->sugges |
36d40 | 74 56 61 6c 75 65 73 28 61 72 72 61 79 5f 66 69 6c 74 65 72 28 61 72 72 61 79 5f 6d 61 70 28 73 | tValues(array_filter(array_map(s |
36d60 | 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 43 6f 6d 6d 61 6e 64 20 24 63 6f 6d 6d 61 6e 64 | tatic.function.(Command.$command |
36d80 | 29 20 7b 0a 72 65 74 75 72 6e 20 24 63 6f 6d 6d 61 6e 64 2d 3e 69 73 48 69 64 64 65 6e 28 29 20 | ).{.return.$command->isHidden(). |
36da0 | 3f 20 6e 75 6c 6c 20 3a 20 24 63 6f 6d 6d 61 6e 64 2d 3e 67 65 74 4e 61 6d 65 28 29 3b 0a 7d 2c | ?.null.:.$command->getName();.}, |
36dc0 | 20 24 61 70 70 6c 69 63 61 74 69 6f 6e 2d 3e 61 6c 6c 28 29 29 29 29 3b 0a 0a 72 65 74 75 72 6e | .$application->all())));..return |
36de0 | 3b 0a 7d 0a 0a 69 66 20 28 24 61 70 70 6c 69 63 61 74 69 6f 6e 2d 3e 68 61 73 28 24 63 6f 6d 6d | ;.}..if.($application->has($comm |
36e00 | 61 6e 64 4e 61 6d 65 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 41 72 67 75 6d 65 6e 74 28 27 63 | andName.=.$input->getArgument('c |
36e20 | 6f 6d 6d 61 6e 64 2d 6e 61 6d 65 27 29 29 29 20 7b 0a 24 69 6e 70 75 74 20 3d 20 24 74 68 69 73 | ommand-name'))).{.$input.=.$this |
36e40 | 2d 3e 70 72 65 70 61 72 65 53 75 62 63 6f 6d 6d 61 6e 64 49 6e 70 75 74 28 24 69 6e 70 75 74 2c | ->prepareSubcommandInput($input, |
36e60 | 20 74 72 75 65 29 3b 0a 24 69 6e 70 75 74 20 3d 20 43 6f 6d 70 6c 65 74 69 6f 6e 49 6e 70 75 74 | .true);.$input.=.CompletionInput |
36e80 | 3a 3a 66 72 6f 6d 53 74 72 69 6e 67 28 24 69 6e 70 75 74 2d 3e 5f 5f 74 6f 53 74 72 69 6e 67 28 | ::fromString($input->__toString( |
36ea0 | 29 2c 20 32 29 3b 0a 24 63 6f 6d 6d 61 6e 64 20 3d 20 24 61 70 70 6c 69 63 61 74 69 6f 6e 2d 3e | ),.2);.$command.=.$application-> |
36ec0 | 66 69 6e 64 28 24 63 6f 6d 6d 61 6e 64 4e 61 6d 65 29 3b 0a 24 63 6f 6d 6d 61 6e 64 2d 3e 6d 65 | find($commandName);.$command->me |
36ee0 | 72 67 65 41 70 70 6c 69 63 61 74 69 6f 6e 44 65 66 69 6e 69 74 69 6f 6e 28 29 3b 0a 0a 24 69 6e | rgeApplicationDefinition();..$in |
36f00 | 70 75 74 2d 3e 62 69 6e 64 28 24 63 6f 6d 6d 61 6e 64 2d 3e 67 65 74 44 65 66 69 6e 69 74 69 6f | put->bind($command->getDefinitio |
36f20 | 6e 28 29 29 3b 0a 24 63 6f 6d 6d 61 6e 64 2d 3e 63 6f 6d 70 6c 65 74 65 28 24 69 6e 70 75 74 2c | n());.$command->complete($input, |
36f40 | 20 24 73 75 67 67 65 73 74 69 6f 6e 73 29 3b 0a 7d 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 | .$suggestions);.}.}..protected.f |
36f60 | 75 6e 63 74 69 6f 6e 20 63 6f 6e 66 69 67 75 72 65 28 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 | unction.configure():.void.{.$thi |
36f80 | 73 0a 2d 3e 73 65 74 4e 61 6d 65 28 27 67 6c 6f 62 61 6c 27 29 0a 2d 3e 73 65 74 44 65 73 63 72 | s.->setName('global').->setDescr |
36fa0 | 69 70 74 69 6f 6e 28 27 41 6c 6c 6f 77 73 20 72 75 6e 6e 69 6e 67 20 63 6f 6d 6d 61 6e 64 73 20 | iption('Allows.running.commands. |
36fc0 | 69 6e 20 74 68 65 20 67 6c 6f 62 61 6c 20 63 6f 6d 70 6f 73 65 72 20 64 69 72 20 28 24 43 4f 4d | in.the.global.composer.dir.($COM |
36fe0 | 50 4f 53 45 52 5f 48 4f 4d 45 29 27 29 0a 2d 3e 73 65 74 44 65 66 69 6e 69 74 69 6f 6e 28 5b 0a | POSER_HOME)').->setDefinition([. |
37000 | 6e 65 77 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 28 27 63 6f 6d 6d 61 6e 64 2d 6e 61 6d 65 27 | new.InputArgument('command-name' |
37020 | 2c 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 3a 3a 52 45 51 55 49 52 45 44 2c 20 27 27 29 2c 0a | ,.InputArgument::REQUIRED,.''),. |
37040 | 6e 65 77 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 28 27 61 72 67 73 27 2c 20 49 6e 70 75 74 41 | new.InputArgument('args',.InputA |
37060 | 72 67 75 6d 65 6e 74 3a 3a 49 53 5f 41 52 52 41 59 20 7c 20 49 6e 70 75 74 41 72 67 75 6d 65 6e | rgument::IS_ARRAY.|.InputArgumen |
37080 | 74 3a 3a 4f 50 54 49 4f 4e 41 4c 2c 20 27 27 29 2c 0a 5d 29 0a 2d 3e 73 65 74 48 65 6c 70 28 0a | t::OPTIONAL,.''),.]).->setHelp(. |
370a0 | 3c 3c 3c 45 4f 54 0a 55 73 65 20 74 68 69 73 20 63 6f 6d 6d 61 6e 64 20 61 73 20 61 20 77 72 61 | <<<EOT.Use.this.command.as.a.wra |
370c0 | 70 70 65 72 20 74 6f 20 72 75 6e 20 6f 74 68 65 72 20 43 6f 6d 70 6f 73 65 72 20 63 6f 6d 6d 61 | pper.to.run.other.Composer.comma |
370e0 | 6e 64 73 0a 77 69 74 68 69 6e 20 74 68 65 20 67 6c 6f 62 61 6c 20 63 6f 6e 74 65 78 74 20 6f 66 | nds.within.the.global.context.of |
37100 | 20 43 4f 4d 50 4f 53 45 52 5f 48 4f 4d 45 2e 0a 0a 59 6f 75 20 63 61 6e 20 75 73 65 20 74 68 69 | .COMPOSER_HOME...You.can.use.thi |
37120 | 73 20 74 6f 20 69 6e 73 74 61 6c 6c 20 43 4c 49 20 75 74 69 6c 69 74 69 65 73 20 67 6c 6f 62 61 | s.to.install.CLI.utilities.globa |
37140 | 6c 6c 79 2c 20 61 6c 6c 20 79 6f 75 20 6e 65 65 64 0a 69 73 20 74 6f 20 61 64 64 20 74 68 65 20 | lly,.all.you.need.is.to.add.the. |
37160 | 43 4f 4d 50 4f 53 45 52 5f 48 4f 4d 45 2f 76 65 6e 64 6f 72 2f 62 69 6e 20 64 69 72 20 74 6f 20 | COMPOSER_HOME/vendor/bin.dir.to. |
37180 | 79 6f 75 72 20 50 41 54 48 20 65 6e 76 20 76 61 72 2e 0a 0a 43 4f 4d 50 4f 53 45 52 5f 48 4f 4d | your.PATH.env.var...COMPOSER_HOM |
371a0 | 45 20 69 73 20 63 3a 5c 55 73 65 72 73 5c 3c 75 73 65 72 3e 5c 41 70 70 44 61 74 61 5c 52 6f 61 | E.is.c:\Users\<user>\AppData\Roa |
371c0 | 6d 69 6e 67 5c 43 6f 6d 70 6f 73 65 72 20 6f 6e 20 57 69 6e 64 6f 77 73 0a 61 6e 64 20 2f 68 6f | ming\Composer.on.Windows.and./ho |
371e0 | 6d 65 2f 3c 75 73 65 72 3e 2f 2e 63 6f 6d 70 6f 73 65 72 20 6f 6e 20 75 6e 69 78 20 73 79 73 74 | me/<user>/.composer.on.unix.syst |
37200 | 65 6d 73 2e 0a 0a 49 66 20 79 6f 75 72 20 73 79 73 74 65 6d 20 75 73 65 73 20 66 72 65 65 64 65 | ems...If.your.system.uses.freede |
37220 | 73 6b 74 6f 70 2e 6f 72 67 20 73 74 61 6e 64 61 72 64 73 2c 20 74 68 65 6e 20 69 74 20 77 69 6c | sktop.org.standards,.then.it.wil |
37240 | 6c 20 66 69 72 73 74 20 63 68 65 63 6b 0a 58 44 47 5f 43 4f 4e 46 49 47 5f 48 4f 4d 45 20 6f 72 | l.first.check.XDG_CONFIG_HOME.or |
37260 | 20 64 65 66 61 75 6c 74 20 74 6f 20 2f 68 6f 6d 65 2f 3c 75 73 65 72 3e 2f 2e 63 6f 6e 66 69 67 | .default.to./home/<user>/.config |
37280 | 2f 63 6f 6d 70 6f 73 65 72 0a 0a 4e 6f 74 65 3a 20 54 68 69 73 20 70 61 74 68 20 6d 61 79 20 76 | /composer..Note:.This.path.may.v |
372a0 | 61 72 79 20 64 65 70 65 6e 64 69 6e 67 20 6f 6e 20 63 75 73 74 6f 6d 69 7a 61 74 69 6f 6e 73 20 | ary.depending.on.customizations. |
372c0 | 74 6f 20 62 69 6e 2d 64 69 72 20 69 6e 0a 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 20 6f 72 20 74 | to.bin-dir.in.composer.json.or.t |
372e0 | 68 65 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 61 6c 20 76 61 72 69 61 62 6c 65 20 43 4f 4d 50 4f 53 | he.environmental.variable.COMPOS |
37300 | 45 52 5f 42 49 4e 5f 44 49 52 2e 0a 0a 52 65 61 64 20 6d 6f 72 65 20 61 74 20 68 74 74 70 73 3a | ER_BIN_DIR...Read.more.at.https: |
37320 | 2f 2f 67 65 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 67 2f 64 6f 63 2f 30 33 2d 63 6c 69 2e 6d 64 23 | //getcomposer.org/doc/03-cli.md# |
37340 | 67 6c 6f 62 61 6c 0a 45 4f 54 0a 29 0a 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 | global.EOT.).;.}.....public.func |
37360 | 74 69 6f 6e 20 72 75 6e 28 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 69 6e 70 75 74 2c 20 | tion.run(InputInterface.$input,. |
37380 | 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 6f 75 74 70 75 74 29 3a 20 69 6e 74 0a 7b 0a | OutputInterface.$output):.int.{. |
373a0 | 0a 69 66 20 28 21 6d 65 74 68 6f 64 5f 65 78 69 73 74 73 28 24 69 6e 70 75 74 2c 20 27 5f 5f 74 | .if.(!method_exists($input,.'__t |
373c0 | 6f 53 74 72 69 6e 67 27 29 29 20 7b 20 0a 74 68 72 6f 77 20 6e 65 77 20 5c 4c 6f 67 69 63 45 78 | oString')).{..throw.new.\LogicEx |
373e0 | 63 65 70 74 69 6f 6e 28 27 45 78 70 65 63 74 65 64 20 61 6e 20 49 6e 70 75 74 20 69 6e 73 74 61 | ception('Expected.an.Input.insta |
37400 | 6e 63 65 20 74 68 61 74 20 69 73 20 73 74 72 69 6e 67 61 62 6c 65 2c 20 67 6f 74 20 27 2e 67 65 | nce.that.is.stringable,.got.'.ge |
37420 | 74 5f 63 6c 61 73 73 28 24 69 6e 70 75 74 29 29 3b 0a 7d 0a 0a 0a 24 74 6f 6b 65 6e 73 20 3d 20 | t_class($input));.}...$tokens.=. |
37440 | 50 72 65 67 3a 3a 73 70 6c 69 74 28 27 7b 5c 73 2b 7d 27 2c 20 24 69 6e 70 75 74 2d 3e 5f 5f 74 | Preg::split('{\s+}',.$input->__t |
37460 | 6f 53 74 72 69 6e 67 28 29 29 3b 0a 24 61 72 67 73 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 | oString());.$args.=.[];.foreach. |
37480 | 28 24 74 6f 6b 65 6e 73 20 61 73 20 24 74 6f 6b 65 6e 29 20 7b 0a 69 66 20 28 24 74 6f 6b 65 6e | ($tokens.as.$token).{.if.($token |
374a0 | 20 26 26 20 24 74 6f 6b 65 6e 5b 30 5d 20 21 3d 3d 20 27 2d 27 29 20 7b 0a 24 61 72 67 73 5b 5d | .&&.$token[0].!==.'-').{.$args[] |
374c0 | 20 3d 20 24 74 6f 6b 65 6e 3b 0a 69 66 20 28 63 6f 75 6e 74 28 24 61 72 67 73 29 20 3e 3d 20 32 | .=.$token;.if.(count($args).>=.2 |
374e0 | 29 20 7b 0a 62 72 65 61 6b 3b 0a 7d 0a 7d 0a 7d 0a 0a 0a 69 66 20 28 63 6f 75 6e 74 28 24 61 72 | ).{.break;.}.}.}...if.(count($ar |
37500 | 67 73 29 20 3c 20 32 29 20 7b 0a 72 65 74 75 72 6e 20 70 61 72 65 6e 74 3a 3a 72 75 6e 28 24 69 | gs).<.2).{.return.parent::run($i |
37520 | 6e 70 75 74 2c 20 24 6f 75 74 70 75 74 29 3b 0a 7d 0a 0a 24 69 6e 70 75 74 20 3d 20 24 74 68 69 | nput,.$output);.}..$input.=.$thi |
37540 | 73 2d 3e 70 72 65 70 61 72 65 53 75 62 63 6f 6d 6d 61 6e 64 49 6e 70 75 74 28 24 69 6e 70 75 74 | s->prepareSubcommandInput($input |
37560 | 29 3b 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 67 65 74 41 70 70 6c 69 63 61 74 69 6f 6e | );..return.$this->getApplication |
37580 | 28 29 2d 3e 72 75 6e 28 24 69 6e 70 75 74 2c 20 24 6f 75 74 70 75 74 29 3b 0a 7d 0a 0a 70 72 69 | ()->run($input,.$output);.}..pri |
375a0 | 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 70 72 65 70 61 72 65 53 75 62 63 6f 6d 6d 61 6e 64 49 | vate.function.prepareSubcommandI |
375c0 | 6e 70 75 74 28 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 69 6e 70 75 74 2c 20 62 6f 6f 6c | nput(InputInterface.$input,.bool |
375e0 | 20 24 71 75 69 65 74 20 3d 20 66 61 6c 73 65 29 3a 20 53 74 72 69 6e 67 49 6e 70 75 74 0a 7b 0a | .$quiet.=.false):.StringInput.{. |
37600 | 0a 69 66 20 28 21 6d 65 74 68 6f 64 5f 65 78 69 73 74 73 28 24 69 6e 70 75 74 2c 20 27 5f 5f 74 | .if.(!method_exists($input,.'__t |
37620 | 6f 53 74 72 69 6e 67 27 29 29 20 7b 20 0a 74 68 72 6f 77 20 6e 65 77 20 5c 4c 6f 67 69 63 45 78 | oString')).{..throw.new.\LogicEx |
37640 | 63 65 70 74 69 6f 6e 28 27 45 78 70 65 63 74 65 64 20 61 6e 20 49 6e 70 75 74 20 69 6e 73 74 61 | ception('Expected.an.Input.insta |
37660 | 6e 63 65 20 74 68 61 74 20 69 73 20 73 74 72 69 6e 67 61 62 6c 65 2c 20 67 6f 74 20 27 2e 67 65 | nce.that.is.stringable,.got.'.ge |
37680 | 74 5f 63 6c 61 73 73 28 24 69 6e 70 75 74 29 29 3b 0a 7d 0a 0a 0a 69 66 20 28 50 6c 61 74 66 6f | t_class($input));.}...if.(Platfo |
376a0 | 72 6d 3a 3a 67 65 74 45 6e 76 28 27 43 4f 4d 50 4f 53 45 52 27 29 29 20 7b 0a 50 6c 61 74 66 6f | rm::getEnv('COMPOSER')).{.Platfo |
376c0 | 72 6d 3a 3a 63 6c 65 61 72 45 6e 76 28 27 43 4f 4d 50 4f 53 45 52 27 29 3b 0a 7d 0a 0a 0a 24 63 | rm::clearEnv('COMPOSER');.}...$c |
376e0 | 6f 6e 66 69 67 20 3d 20 46 61 63 74 6f 72 79 3a 3a 63 72 65 61 74 65 43 6f 6e 66 69 67 28 29 3b | onfig.=.Factory::createConfig(); |
37700 | 0a 24 68 6f 6d 65 20 3d 20 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 68 6f 6d 65 27 29 3b 0a 0a | .$home.=.$config->get('home');.. |
37720 | 69 66 20 28 21 69 73 5f 64 69 72 28 24 68 6f 6d 65 29 29 20 7b 0a 24 66 73 20 3d 20 6e 65 77 20 | if.(!is_dir($home)).{.$fs.=.new. |
37740 | 46 69 6c 65 73 79 73 74 65 6d 28 29 3b 0a 24 66 73 2d 3e 65 6e 73 75 72 65 44 69 72 65 63 74 6f | Filesystem();.$fs->ensureDirecto |
37760 | 72 79 45 78 69 73 74 73 28 24 68 6f 6d 65 29 3b 0a 69 66 20 28 21 69 73 5f 64 69 72 28 24 68 6f | ryExists($home);.if.(!is_dir($ho |
37780 | 6d 65 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 | me)).{.throw.new.\RuntimeExcepti |
377a0 | 6f 6e 28 27 43 6f 75 6c 64 20 6e 6f 74 20 63 72 65 61 74 65 20 68 6f 6d 65 20 64 69 72 65 63 74 | on('Could.not.create.home.direct |
377c0 | 6f 72 79 27 29 3b 0a 7d 0a 7d 0a 0a 74 72 79 20 7b 0a 63 68 64 69 72 28 24 68 6f 6d 65 29 3b 0a | ory');.}.}..try.{.chdir($home);. |
377e0 | 7d 20 63 61 74 63 68 20 28 5c 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 74 68 72 6f 77 20 | }.catch.(\Exception.$e).{.throw. |
37800 | 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 43 6f 75 6c 64 20 6e 6f 74 | new.\RuntimeException('Could.not |
37820 | 20 73 77 69 74 63 68 20 74 6f 20 68 6f 6d 65 20 64 69 72 65 63 74 6f 72 79 20 22 27 2e 24 68 6f | .switch.to.home.directory."'.$ho |
37840 | 6d 65 2e 27 22 27 2c 20 30 2c 20 24 65 29 3b 0a 7d 0a 69 66 20 28 21 24 71 75 69 65 74 29 20 7b | me.'"',.0,.$e);.}.if.(!$quiet).{ |
37860 | 0a 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 69 6e | .$this->getIO()->writeError('<in |
37880 | 66 6f 3e 43 68 61 6e 67 65 64 20 63 75 72 72 65 6e 74 20 64 69 72 65 63 74 6f 72 79 20 74 6f 20 | fo>Changed.current.directory.to. |
378a0 | 27 2e 24 68 6f 6d 65 2e 27 3c 2f 69 6e 66 6f 3e 27 29 3b 0a 7d 0a 0a 0a 24 69 6e 70 75 74 20 3d | '.$home.'</info>');.}...$input.= |
378c0 | 20 6e 65 77 20 53 74 72 69 6e 67 49 6e 70 75 74 28 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 28 27 | .new.StringInput(Preg::replace(' |
378e0 | 7b 5c 62 67 28 3f 3a 6c 28 3f 3a 6f 28 3f 3a 62 28 3f 3a 61 28 3f 3a 6c 29 3f 29 3f 29 3f 29 3f | {\bg(?:l(?:o(?:b(?:a(?:l)?)?)?)? |
37900 | 29 3f 5c 62 7d 27 2c 20 27 27 2c 20 24 69 6e 70 75 74 2d 3e 5f 5f 74 6f 53 74 72 69 6e 67 28 29 | )?\b}',.'',.$input->__toString() |
37920 | 2c 20 31 29 29 3b 0a 24 74 68 69 73 2d 3e 67 65 74 41 70 70 6c 69 63 61 74 69 6f 6e 28 29 2d 3e | ,.1));.$this->getApplication()-> |
37940 | 72 65 73 65 74 43 6f 6d 70 6f 73 65 72 28 29 3b 0a 0a 72 65 74 75 72 6e 20 24 69 6e 70 75 74 3b | resetComposer();..return.$input; |
37960 | 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 50 72 6f 78 79 43 6f | .}.....public.function.isProxyCo |
37980 | 6d 6d 61 6e 64 28 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 7d | mmand():.bool.{.return.true;.}.} |
379a0 | 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a | .<?php.declare(strict_types=1);. |
379c0 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f | ...........namespace.Composer\Co |
379e0 | 6d 6d 61 6e 64 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 43 6f 6d | mmand;..use.Composer\Package\Com |
37a00 | 70 6c 65 74 65 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f | pletePackageInterface;.use.Compo |
37a20 | 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 | ser\Repository\RepositoryInterfa |
37a40 | 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 52 6f 6f 74 | ce;.use.Composer\Repository\Root |
37a60 | 50 61 63 6b 61 67 65 52 65 70 6f 73 69 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c | PackageRepository;.use.Composer\ |
37a80 | 52 65 70 6f 73 69 74 6f 72 79 5c 52 65 70 6f 73 69 74 6f 72 79 46 61 63 74 6f 72 79 3b 0a 75 73 | Repository\RepositoryFactory;.us |
37aa0 | 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 6c 61 74 66 6f 72 6d 3b 0a 75 73 65 20 43 6f | e.Composer\Util\Platform;.use.Co |
37ac0 | 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3b 0a 75 73 65 | mposer\Util\ProcessExecutor;.use |
37ae0 | 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 41 72 67 | .Composer\Console\Input\InputArg |
37b00 | 75 6d 65 6e 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 | ument;.use.Composer\Console\Inpu |
37b20 | 74 5c 49 6e 70 75 74 4f 70 74 69 6f 6e 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f | t\InputOption;.use.Symfony\Compo |
37b40 | 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 49 6e 74 65 72 66 61 63 | nent\Console\Input\InputInterfac |
37b60 | 65 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 | e;.use.Symfony\Component\Console |
37b80 | 5c 4f 75 74 70 75 74 5c 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 0a 0a 0a 0a 63 6c 61 | \Output\OutputInterface;.....cla |
37ba0 | 73 73 20 48 6f 6d 65 43 6f 6d 6d 61 6e 64 20 65 78 74 65 6e 64 73 20 42 61 73 65 43 6f 6d 6d 61 | ss.HomeCommand.extends.BaseComma |
37bc0 | 6e 64 0a 7b 0a 75 73 65 20 43 6f 6d 70 6c 65 74 69 6f 6e 54 72 61 69 74 3b 0a 0a 0a 0a 0a 70 72 | nd.{.use.CompletionTrait;.....pr |
37be0 | 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 63 6f 6e 66 69 67 75 72 65 28 29 3a 20 76 6f | otected.function.configure():.vo |
37c00 | 69 64 0a 7b 0a 24 74 68 69 73 0a 2d 3e 73 65 74 4e 61 6d 65 28 27 62 72 6f 77 73 65 27 29 0a 2d | id.{.$this.->setName('browse').- |
37c20 | 3e 73 65 74 41 6c 69 61 73 65 73 28 5b 27 68 6f 6d 65 27 5d 29 0a 2d 3e 73 65 74 44 65 73 63 72 | >setAliases(['home']).->setDescr |
37c40 | 69 70 74 69 6f 6e 28 27 4f 70 65 6e 73 20 74 68 65 20 70 61 63 6b 61 67 65 5c 27 73 20 72 65 70 | iption('Opens.the.package\'s.rep |
37c60 | 6f 73 69 74 6f 72 79 20 55 52 4c 20 6f 72 20 68 6f 6d 65 70 61 67 65 20 69 6e 20 79 6f 75 72 20 | ository.URL.or.homepage.in.your. |
37c80 | 62 72 6f 77 73 65 72 27 29 0a 2d 3e 73 65 74 44 65 66 69 6e 69 74 69 6f 6e 28 5b 0a 6e 65 77 20 | browser').->setDefinition([.new. |
37ca0 | 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 28 27 70 61 63 6b 61 67 65 73 27 2c 20 49 6e 70 75 74 41 | InputArgument('packages',.InputA |
37cc0 | 72 67 75 6d 65 6e 74 3a 3a 49 53 5f 41 52 52 41 59 2c 20 27 50 61 63 6b 61 67 65 28 73 29 20 74 | rgument::IS_ARRAY,.'Package(s).t |
37ce0 | 6f 20 62 72 6f 77 73 65 20 74 6f 2e 27 2c 20 6e 75 6c 6c 2c 20 24 74 68 69 73 2d 3e 73 75 67 67 | o.browse.to.',.null,.$this->sugg |
37d00 | 65 73 74 49 6e 73 74 61 6c 6c 65 64 50 61 63 6b 61 67 65 28 29 29 2c 0a 6e 65 77 20 49 6e 70 75 | estInstalledPackage()),.new.Inpu |
37d20 | 74 4f 70 74 69 6f 6e 28 27 68 6f 6d 65 70 61 67 65 27 2c 20 27 48 27 2c 20 49 6e 70 75 74 4f 70 | tOption('homepage',.'H',.InputOp |
37d40 | 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 4f 70 65 6e 20 74 68 65 20 68 6f 6d 65 | tion::VALUE_NONE,.'Open.the.home |
37d60 | 70 61 67 65 20 69 6e 73 74 65 61 64 20 6f 66 20 74 68 65 20 72 65 70 6f 73 69 74 6f 72 79 20 55 | page.instead.of.the.repository.U |
37d80 | 52 4c 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 73 68 6f 77 27 2c 20 27 | RL.'),.new.InputOption('show',.' |
37da0 | 73 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 4f 6e | s',.InputOption::VALUE_NONE,.'On |
37dc0 | 6c 79 20 73 68 6f 77 20 74 68 65 20 68 6f 6d 65 70 61 67 65 20 6f 72 20 72 65 70 6f 73 69 74 6f | ly.show.the.homepage.or.reposito |
37de0 | 72 79 20 55 52 4c 2e 27 29 2c 0a 5d 29 0a 2d 3e 73 65 74 48 65 6c 70 28 0a 3c 3c 3c 45 4f 54 0a | ry.URL.'),.]).->setHelp(.<<<EOT. |
37e00 | 54 68 65 20 68 6f 6d 65 20 63 6f 6d 6d 61 6e 64 20 6f 70 65 6e 73 20 6f 72 20 73 68 6f 77 73 20 | The.home.command.opens.or.shows. |
37e20 | 61 20 70 61 63 6b 61 67 65 27 73 20 72 65 70 6f 73 69 74 6f 72 79 20 55 52 4c 20 6f 72 0a 68 6f | a.package's.repository.URL.or.ho |
37e40 | 6d 65 70 61 67 65 20 69 6e 20 79 6f 75 72 20 64 65 66 61 75 6c 74 20 62 72 6f 77 73 65 72 2e 0a | mepage.in.your.default.browser.. |
37e60 | 0a 54 6f 20 6f 70 65 6e 20 74 68 65 20 68 6f 6d 65 70 61 67 65 20 62 79 20 64 65 66 61 75 6c 74 | .To.open.the.homepage.by.default |
37e80 | 2c 20 75 73 65 20 2d 48 20 6f 72 20 2d 2d 68 6f 6d 65 70 61 67 65 2e 0a 54 6f 20 73 68 6f 77 20 | ,.use.-H.or.--homepage..To.show. |
37ea0 | 69 6e 73 74 65 61 64 20 6f 66 20 6f 70 65 6e 20 74 68 65 20 72 65 70 6f 73 69 74 6f 72 79 20 6f | instead.of.open.the.repository.o |
37ec0 | 72 20 68 6f 6d 65 70 61 67 65 20 55 52 4c 2c 20 75 73 65 20 2d 73 20 6f 72 20 2d 2d 73 68 6f 77 | r.homepage.URL,.use.-s.or.--show |
37ee0 | 2e 0a 0a 52 65 61 64 20 6d 6f 72 65 20 61 74 20 68 74 74 70 73 3a 2f 2f 67 65 74 63 6f 6d 70 6f | ...Read.more.at.https://getcompo |
37f00 | 73 65 72 2e 6f 72 67 2f 64 6f 63 2f 30 33 2d 63 6c 69 2e 6d 64 23 62 72 6f 77 73 65 2d 68 6f 6d | ser.org/doc/03-cli.md#browse-hom |
37f20 | 65 0a 45 4f 54 0a 29 3b 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 65 | e.EOT.);.}..protected.function.e |
37f40 | 78 65 63 75 74 65 28 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 69 6e 70 75 74 2c 20 4f 75 | xecute(InputInterface.$input,.Ou |
37f60 | 74 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 6f 75 74 70 75 74 29 3a 20 69 6e 74 0a 7b 0a 24 72 | tputInterface.$output):.int.{.$r |
37f80 | 65 70 6f 73 20 3d 20 24 74 68 69 73 2d 3e 69 6e 69 74 69 61 6c 69 7a 65 52 65 70 6f 73 28 29 3b | epos.=.$this->initializeRepos(); |
37fa0 | 0a 24 69 6f 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 3b 0a 24 72 65 74 75 72 6e 20 3d | .$io.=.$this->getIO();.$return.= |
37fc0 | 20 30 3b 0a 0a 24 70 61 63 6b 61 67 65 73 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 41 72 67 75 | .0;..$packages.=.$input->getArgu |
37fe0 | 6d 65 6e 74 28 27 70 61 63 6b 61 67 65 73 27 29 3b 0a 69 66 20 28 63 6f 75 6e 74 28 24 70 61 63 | ment('packages');.if.(count($pac |
38000 | 6b 61 67 65 73 29 20 3d 3d 3d 20 30 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 | kages).===.0).{.$io->writeError( |
38020 | 27 4e 6f 20 70 61 63 6b 61 67 65 20 73 70 65 63 69 66 69 65 64 2c 20 6f 70 65 6e 69 6e 67 20 68 | 'No.package.specified,.opening.h |
38040 | 6f 6d 65 70 61 67 65 20 66 6f 72 20 74 68 65 20 72 6f 6f 74 20 70 61 63 6b 61 67 65 27 29 3b 0a | omepage.for.the.root.package');. |
38060 | 24 70 61 63 6b 61 67 65 73 20 3d 20 5b 24 74 68 69 73 2d 3e 72 65 71 75 69 72 65 43 6f 6d 70 6f | $packages.=.[$this->requireCompo |
38080 | 73 65 72 28 29 2d 3e 67 65 74 50 61 63 6b 61 67 65 28 29 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 3b | ser()->getPackage()->getName()]; |
380a0 | 0a 7d 0a 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 73 20 61 73 20 24 70 61 63 6b 61 | .}..foreach.($packages.as.$packa |
380c0 | 67 65 4e 61 6d 65 29 20 7b 0a 24 68 61 6e 64 6c 65 64 20 3d 20 66 61 6c 73 65 3b 0a 24 70 61 63 | geName).{.$handled.=.false;.$pac |
380e0 | 6b 61 67 65 45 78 69 73 74 73 20 3d 20 66 61 6c 73 65 3b 0a 66 6f 72 65 61 63 68 20 28 24 72 65 | kageExists.=.false;.foreach.($re |
38100 | 70 6f 73 20 61 73 20 24 72 65 70 6f 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 72 65 70 6f 2d 3e | pos.as.$repo).{.foreach.($repo-> |
38120 | 66 69 6e 64 50 61 63 6b 61 67 65 73 28 24 70 61 63 6b 61 67 65 4e 61 6d 65 29 20 61 73 20 24 70 | findPackages($packageName).as.$p |
38140 | 61 63 6b 61 67 65 29 20 7b 0a 24 70 61 63 6b 61 67 65 45 78 69 73 74 73 20 3d 20 74 72 75 65 3b | ackage).{.$packageExists.=.true; |
38160 | 0a 69 66 20 28 24 70 61 63 6b 61 67 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 43 6f 6d 70 6c 65 74 | .if.($package.instanceof.Complet |
38180 | 65 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 26 26 20 24 74 68 69 73 2d 3e 68 61 6e 64 | ePackageInterface.&&.$this->hand |
381a0 | 6c 65 50 61 63 6b 61 67 65 28 24 70 61 63 6b 61 67 65 2c 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f | lePackage($package,.$input->getO |
381c0 | 70 74 69 6f 6e 28 27 68 6f 6d 65 70 61 67 65 27 29 2c 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 | ption('homepage'),.$input->getOp |
381e0 | 74 69 6f 6e 28 27 73 68 6f 77 27 29 29 29 20 7b 0a 24 68 61 6e 64 6c 65 64 20 3d 20 74 72 75 65 | tion('show'))).{.$handled.=.true |
38200 | 3b 0a 62 72 65 61 6b 20 32 3b 0a 7d 0a 7d 0a 7d 0a 0a 69 66 20 28 21 24 70 61 63 6b 61 67 65 45 | ;.break.2;.}.}.}..if.(!$packageE |
38220 | 78 69 73 74 73 29 20 7b 0a 24 72 65 74 75 72 6e 20 3d 20 31 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 | xists).{.$return.=.1;.$io->write |
38240 | 45 72 72 6f 72 28 27 3c 77 61 72 6e 69 6e 67 3e 50 61 63 6b 61 67 65 20 27 2e 24 70 61 63 6b 61 | Error('<warning>Package.'.$packa |
38260 | 67 65 4e 61 6d 65 2e 27 20 6e 6f 74 20 66 6f 75 6e 64 3c 2f 77 61 72 6e 69 6e 67 3e 27 29 3b 0a | geName.'.not.found</warning>');. |
38280 | 7d 0a 0a 69 66 20 28 21 24 68 61 6e 64 6c 65 64 29 20 7b 0a 24 72 65 74 75 72 6e 20 3d 20 31 3b | }..if.(!$handled).{.$return.=.1; |
382a0 | 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 77 61 72 6e 69 6e 67 3e 27 2e 28 24 69 | .$io->writeError('<warning>'.($i |
382c0 | 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 68 6f 6d 65 70 61 67 65 27 29 20 3f 20 27 49 | nput->getOption('homepage').?.'I |
382e0 | 6e 76 61 6c 69 64 20 6f 72 20 6d 69 73 73 69 6e 67 20 68 6f 6d 65 70 61 67 65 27 20 3a 20 27 49 | nvalid.or.missing.homepage'.:.'I |
38300 | 6e 76 61 6c 69 64 20 6f 72 20 6d 69 73 73 69 6e 67 20 72 65 70 6f 73 69 74 6f 72 79 20 55 52 4c | nvalid.or.missing.repository.URL |
38320 | 27 29 2e 27 20 66 6f 72 20 27 2e 24 70 61 63 6b 61 67 65 4e 61 6d 65 2e 27 3c 2f 77 61 72 6e 69 | ').'.for.'.$packageName.'</warni |
38340 | 6e 67 3e 27 29 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 72 65 74 75 72 6e 3b 0a 7d 0a 0a 70 | ng>');.}.}..return.$return;.}..p |
38360 | 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 68 61 6e 64 6c 65 50 61 63 6b 61 67 65 28 43 6f | rivate.function.handlePackage(Co |
38380 | 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c | mpletePackageInterface.$package, |
383a0 | 20 62 6f 6f 6c 20 24 73 68 6f 77 48 6f 6d 65 70 61 67 65 2c 20 62 6f 6f 6c 20 24 73 68 6f 77 4f | .bool.$showHomepage,.bool.$showO |
383c0 | 6e 6c 79 29 3a 20 62 6f 6f 6c 0a 7b 0a 24 73 75 70 70 6f 72 74 20 3d 20 24 70 61 63 6b 61 67 65 | nly):.bool.{.$support.=.$package |
383e0 | 2d 3e 67 65 74 53 75 70 70 6f 72 74 28 29 3b 0a 24 75 72 6c 20 3d 20 24 73 75 70 70 6f 72 74 5b | ->getSupport();.$url.=.$support[ |
38400 | 27 73 6f 75 72 63 65 27 5d 20 3f 3f 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 53 6f 75 72 63 65 | 'source'].??.$package->getSource |
38420 | 55 72 6c 28 29 3b 0a 69 66 20 28 21 24 75 72 6c 20 7c 7c 20 24 73 68 6f 77 48 6f 6d 65 70 61 67 | Url();.if.(!$url.||.$showHomepag |
38440 | 65 29 20 7b 0a 24 75 72 6c 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 48 6f 6d 65 70 61 67 | e).{.$url.=.$package->getHomepag |
38460 | 65 28 29 3b 0a 7d 0a 0a 69 66 20 28 21 24 75 72 6c 20 7c 7c 20 21 66 69 6c 74 65 72 5f 76 61 72 | e();.}..if.(!$url.||.!filter_var |
38480 | 28 24 75 72 6c 2c 20 46 49 4c 54 45 52 5f 56 41 4c 49 44 41 54 45 5f 55 52 4c 29 29 20 7b 0a 72 | ($url,.FILTER_VALIDATE_URL)).{.r |
384a0 | 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 69 66 20 28 24 73 68 6f 77 4f 6e 6c 79 29 20 7b | eturn.false;.}..if.($showOnly).{ |
384c0 | 0a 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 2d 3e 77 72 69 74 65 28 73 70 72 69 6e 74 66 28 27 | .$this->getIO()->write(sprintf(' |
384e0 | 3c 69 6e 66 6f 3e 25 73 3c 2f 69 6e 66 6f 3e 27 2c 20 24 75 72 6c 29 29 3b 0a 7d 20 65 6c 73 65 | <info>%s</info>',.$url));.}.else |
38500 | 20 7b 0a 24 74 68 69 73 2d 3e 6f 70 65 6e 42 72 6f 77 73 65 72 28 24 75 72 6c 29 3b 0a 7d 0a 0a | .{.$this->openBrowser($url);.}.. |
38520 | 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 | return.true;.}.....private.funct |
38540 | 69 6f 6e 20 6f 70 65 6e 42 72 6f 77 73 65 72 28 73 74 72 69 6e 67 20 24 75 72 6c 29 3a 20 76 6f | ion.openBrowser(string.$url):.vo |
38560 | 69 64 0a 7b 0a 24 75 72 6c 20 3d 20 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3a 3a 65 73 63 | id.{.$url.=.ProcessExecutor::esc |
38580 | 61 70 65 28 24 75 72 6c 29 3b 0a 0a 24 70 72 6f 63 65 73 73 20 3d 20 6e 65 77 20 50 72 6f 63 65 | ape($url);..$process.=.new.Proce |
385a0 | 73 73 45 78 65 63 75 74 6f 72 28 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 29 3b 0a 69 66 20 28 | ssExecutor($this->getIO());.if.( |
385c0 | 50 6c 61 74 66 6f 72 6d 3a 3a 69 73 57 69 6e 64 6f 77 73 28 29 29 20 7b 0a 24 70 72 6f 63 65 73 | Platform::isWindows()).{.$proces |
385e0 | 73 2d 3e 65 78 65 63 75 74 65 28 27 73 74 61 72 74 20 22 77 65 62 22 20 65 78 70 6c 6f 72 65 72 | s->execute('start."web".explorer |
38600 | 20 27 20 2e 20 24 75 72 6c 2c 20 24 6f 75 74 70 75 74 29 3b 0a 0a 72 65 74 75 72 6e 3b 0a 7d 0a | .'...$url,.$output);..return;.}. |
38620 | 0a 24 6c 69 6e 75 78 20 3d 20 24 70 72 6f 63 65 73 73 2d 3e 65 78 65 63 75 74 65 28 27 77 68 69 | .$linux.=.$process->execute('whi |
38640 | 63 68 20 78 64 67 2d 6f 70 65 6e 27 2c 20 24 6f 75 74 70 75 74 29 3b 0a 24 6f 73 78 20 3d 20 24 | ch.xdg-open',.$output);.$osx.=.$ |
38660 | 70 72 6f 63 65 73 73 2d 3e 65 78 65 63 75 74 65 28 27 77 68 69 63 68 20 6f 70 65 6e 27 2c 20 24 | process->execute('which.open',.$ |
38680 | 6f 75 74 70 75 74 29 3b 0a 0a 69 66 20 28 30 20 3d 3d 3d 20 24 6c 69 6e 75 78 29 20 7b 0a 24 70 | output);..if.(0.===.$linux).{.$p |
386a0 | 72 6f 63 65 73 73 2d 3e 65 78 65 63 75 74 65 28 27 78 64 67 2d 6f 70 65 6e 20 27 20 2e 20 24 75 | rocess->execute('xdg-open.'...$u |
386c0 | 72 6c 2c 20 24 6f 75 74 70 75 74 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 30 20 3d 3d 3d 20 24 6f | rl,.$output);.}.elseif.(0.===.$o |
386e0 | 73 78 29 20 7b 0a 24 70 72 6f 63 65 73 73 2d 3e 65 78 65 63 75 74 65 28 27 6f 70 65 6e 20 27 20 | sx).{.$process->execute('open.'. |
38700 | 2e 20 24 75 72 6c 2c 20 24 6f 75 74 70 75 74 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 74 68 69 73 | ..$url,.$output);.}.else.{.$this |
38720 | 2d 3e 67 65 74 49 4f 28 29 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 4e 6f 20 73 75 69 74 61 62 | ->getIO()->writeError('No.suitab |
38740 | 6c 65 20 62 72 6f 77 73 65 72 20 6f 70 65 6e 69 6e 67 20 63 6f 6d 6d 61 6e 64 20 66 6f 75 6e 64 | le.browser.opening.command.found |
38760 | 2c 20 6f 70 65 6e 20 79 6f 75 72 73 65 6c 66 3a 20 27 20 2e 20 24 75 72 6c 29 3b 0a 7d 0a 7d 0a | ,.open.yourself:.'...$url);.}.}. |
38780 | 0a 0a 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 69 6e 69 74 69 61 6c | ........private.function.initial |
387a0 | 69 7a 65 52 65 70 6f 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 24 63 6f 6d 70 6f 73 65 72 20 3d 20 | izeRepos():.array.{.$composer.=. |
387c0 | 24 74 68 69 73 2d 3e 74 72 79 43 6f 6d 70 6f 73 65 72 28 29 3b 0a 0a 69 66 20 28 24 63 6f 6d 70 | $this->tryComposer();..if.($comp |
387e0 | 6f 73 65 72 29 20 7b 0a 72 65 74 75 72 6e 20 61 72 72 61 79 5f 6d 65 72 67 65 28 0a 5b 6e 65 77 | oser).{.return.array_merge(.[new |
38800 | 20 52 6f 6f 74 50 61 63 6b 61 67 65 52 65 70 6f 73 69 74 6f 72 79 28 63 6c 6f 6e 65 20 24 63 6f | .RootPackageRepository(clone.$co |
38820 | 6d 70 6f 73 65 72 2d 3e 67 65 74 50 61 63 6b 61 67 65 28 29 29 5d 2c 20 0a 5b 24 63 6f 6d 70 6f | mposer->getPackage())],..[$compo |
38840 | 73 65 72 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 79 4d 61 6e 61 67 65 72 28 29 2d 3e 67 65 74 | ser->getRepositoryManager()->get |
38860 | 4c 6f 63 61 6c 52 65 70 6f 73 69 74 6f 72 79 28 29 5d 2c 20 0a 24 63 6f 6d 70 6f 73 65 72 2d 3e | LocalRepository()],..$composer-> |
38880 | 67 65 74 52 65 70 6f 73 69 74 6f 72 79 4d 61 6e 61 67 65 72 28 29 2d 3e 67 65 74 52 65 70 6f 73 | getRepositoryManager()->getRepos |
388a0 | 69 74 6f 72 69 65 73 28 29 20 0a 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 52 65 70 6f 73 69 74 6f | itories()..);.}..return.Reposito |
388c0 | 72 79 46 61 63 74 6f 72 79 3a 3a 64 65 66 61 75 6c 74 52 65 70 6f 73 57 69 74 68 44 65 66 61 75 | ryFactory::defaultReposWithDefau |
388e0 | 6c 74 4d 61 6e 61 67 65 72 28 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 29 3b 0a 7d 0a 7d 0a 3c | ltManager($this->getIO());.}.}.< |
38900 | 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a | ?php.declare(strict_types=1);... |
38920 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6d 6d | .........namespace.Composer\Comm |
38940 | 61 6e 64 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 46 61 63 74 6f 72 79 3b 0a 75 73 65 20 | and;..use.Composer\Factory;.use. |
38960 | 43 6f 6d 70 6f 73 65 72 5c 4a 73 6f 6e 5c 4a 73 6f 6e 46 69 6c 65 3b 0a 75 73 65 20 43 6f 6d 70 | Composer\Json\JsonFile;.use.Comp |
38980 | 6f 73 65 72 5c 4a 73 6f 6e 5c 4a 73 6f 6e 56 61 6c 69 64 61 74 69 6f 6e 45 78 63 65 70 74 69 6f | oser\Json\JsonValidationExceptio |
389a0 | 6e 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 42 61 73 65 50 61 63 6b | n;.use.Composer\Package\BasePack |
389c0 | 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 50 61 63 6b 61 67 | age;.use.Composer\Package\Packag |
389e0 | 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 63 72 65 5c 50 72 65 67 3b 0a 75 73 65 20 43 | e;.use.Composer\Pcre\Preg;.use.C |
38a00 | 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 43 6f 6d 70 6f 73 69 74 65 52 65 70 6f | omposer\Repository\CompositeRepo |
38a20 | 73 69 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c | sitory;.use.Composer\Repository\ |
38a40 | 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 | PlatformRepository;.use.Composer |
38a60 | 5c 52 65 70 6f 73 69 74 6f 72 79 5c 52 65 70 6f 73 69 74 6f 72 79 46 61 63 74 6f 72 79 3b 0a 75 | \Repository\RepositoryFactory;.u |
38a80 | 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 46 69 6c 65 73 79 73 74 65 6d 3b 0a 75 73 65 | se.Composer\Util\Filesystem;.use |
38aa0 | 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 53 69 6c 65 6e 63 65 72 3b 0a 75 73 65 20 53 79 6d | .Composer\Util\Silencer;.use.Sym |
38ac0 | 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 41 72 72 | fony\Component\Console\Input\Arr |
38ae0 | 61 79 49 6e 70 75 74 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 | ayInput;.use.Symfony\Component\C |
38b00 | 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 | onsole\Input\InputInterface;.use |
38b20 | 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 4f 70 74 | .Composer\Console\Input\InputOpt |
38b40 | 69 6f 6e 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f | ion;.use.Symfony\Component\Conso |
38b60 | 6c 65 5c 4f 75 74 70 75 74 5c 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 53 | le\Output\OutputInterface;.use.S |
38b80 | 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 50 72 6f 63 65 73 73 5c 45 78 65 63 75 74 61 | ymfony\Component\Process\Executa |
38ba0 | 62 6c 65 46 69 6e 64 65 72 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 | bleFinder;.use.Symfony\Component |
38bc0 | 5c 50 72 6f 63 65 73 73 5c 50 72 6f 63 65 73 73 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f | \Process\Process;.use.Symfony\Co |
38be0 | 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 48 65 6c 70 65 72 5c 46 6f 72 6d 61 74 74 65 72 | mponent\Console\Helper\Formatter |
38c00 | 48 65 6c 70 65 72 3b 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 49 6e 69 74 43 6f 6d 6d 61 6e 64 20 65 | Helper;......class.InitCommand.e |
38c20 | 78 74 65 6e 64 73 20 42 61 73 65 43 6f 6d 6d 61 6e 64 0a 7b 0a 75 73 65 20 43 6f 6d 70 6c 65 74 | xtends.BaseCommand.{.use.Complet |
38c40 | 69 6f 6e 54 72 61 69 74 3b 0a 75 73 65 20 50 61 63 6b 61 67 65 44 69 73 63 6f 76 65 72 79 54 72 | ionTrait;.use.PackageDiscoveryTr |
38c60 | 61 69 74 3b 0a 0a 0a 70 72 69 76 61 74 65 20 24 67 69 74 43 6f 6e 66 69 67 3b 0a 0a 0a 0a 0a 0a | ait;...private.$gitConfig;...... |
38c80 | 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 63 6f 6e 66 69 67 75 72 65 28 29 0a | .protected.function.configure(). |
38ca0 | 7b 0a 24 74 68 69 73 0a 2d 3e 73 65 74 4e 61 6d 65 28 27 69 6e 69 74 27 29 0a 2d 3e 73 65 74 44 | {.$this.->setName('init').->setD |
38cc0 | 65 73 63 72 69 70 74 69 6f 6e 28 27 43 72 65 61 74 65 73 20 61 20 62 61 73 69 63 20 63 6f 6d 70 | escription('Creates.a.basic.comp |
38ce0 | 6f 73 65 72 2e 6a 73 6f 6e 20 66 69 6c 65 20 69 6e 20 63 75 72 72 65 6e 74 20 64 69 72 65 63 74 | oser.json.file.in.current.direct |
38d00 | 6f 72 79 27 29 0a 2d 3e 73 65 74 44 65 66 69 6e 69 74 69 6f 6e 28 5b 0a 6e 65 77 20 49 6e 70 75 | ory').->setDefinition([.new.Inpu |
38d20 | 74 4f 70 74 69 6f 6e 28 27 6e 61 6d 65 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f | tOption('name',.null,.InputOptio |
38d40 | 6e 3a 3a 56 41 4c 55 45 5f 52 45 51 55 49 52 45 44 2c 20 27 4e 61 6d 65 20 6f 66 20 74 68 65 20 | n::VALUE_REQUIRED,.'Name.of.the. |
38d60 | 70 61 63 6b 61 67 65 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 64 65 73 63 | package'),.new.InputOption('desc |
38d80 | 72 69 70 74 69 6f 6e 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c | ription',.null,.InputOption::VAL |
38da0 | 55 45 5f 52 45 51 55 49 52 45 44 2c 20 27 44 65 73 63 72 69 70 74 69 6f 6e 20 6f 66 20 70 61 63 | UE_REQUIRED,.'Description.of.pac |
38dc0 | 6b 61 67 65 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 61 75 74 68 6f 72 27 | kage'),.new.InputOption('author' |
38de0 | 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 52 45 51 55 49 | ,.null,.InputOption::VALUE_REQUI |
38e00 | 52 45 44 2c 20 27 41 75 74 68 6f 72 20 6e 61 6d 65 20 6f 66 20 70 61 63 6b 61 67 65 27 29 2c 0a | RED,.'Author.name.of.package'),. |
38e20 | 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 74 79 70 65 27 2c 20 6e 75 6c 6c 2c 20 49 6e | new.InputOption('type',.null,.In |
38e40 | 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4f 50 54 49 4f 4e 41 4c 2c 20 27 54 79 70 65 | putOption::VALUE_OPTIONAL,.'Type |
38e60 | 20 6f 66 20 70 61 63 6b 61 67 65 20 28 65 2e 67 2e 20 6c 69 62 72 61 72 79 2c 20 70 72 6f 6a 65 | .of.package.(e.g..library,.proje |
38e80 | 63 74 2c 20 6d 65 74 61 70 61 63 6b 61 67 65 2c 20 63 6f 6d 70 6f 73 65 72 2d 70 6c 75 67 69 6e | ct,.metapackage,.composer-plugin |
38ea0 | 29 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 68 6f 6d 65 70 61 67 65 27 2c | )'),.new.InputOption('homepage', |
38ec0 | 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 52 45 51 55 49 52 | .null,.InputOption::VALUE_REQUIR |
38ee0 | 45 44 2c 20 27 48 6f 6d 65 70 61 67 65 20 6f 66 20 70 61 63 6b 61 67 65 27 29 2c 0a 6e 65 77 20 | ED,.'Homepage.of.package'),.new. |
38f00 | 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 72 65 71 75 69 72 65 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 | InputOption('require',.null,.Inp |
38f20 | 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 49 53 5f 41 52 52 41 59 20 7c 20 49 6e 70 75 74 | utOption::VALUE_IS_ARRAY.|.Input |
38f40 | 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 52 45 51 55 49 52 45 44 2c 20 27 50 61 63 6b 61 67 65 | Option::VALUE_REQUIRED,.'Package |
38f60 | 20 74 6f 20 72 65 71 75 69 72 65 20 77 69 74 68 20 61 20 76 65 72 73 69 6f 6e 20 63 6f 6e 73 74 | .to.require.with.a.version.const |
38f80 | 72 61 69 6e 74 2c 20 65 2e 67 2e 20 66 6f 6f 2f 62 61 72 3a 31 2e 30 2e 30 20 6f 72 20 66 6f 6f | raint,.e.g..foo/bar:1.0.0.or.foo |
38fa0 | 2f 62 61 72 3d 31 2e 30 2e 30 20 6f 72 20 22 66 6f 6f 2f 62 61 72 20 31 2e 30 2e 30 22 27 2c 20 | /bar=1.0.0.or."foo/bar.1.0.0"',. |
38fc0 | 6e 75 6c 6c 2c 20 24 74 68 69 73 2d 3e 73 75 67 67 65 73 74 41 76 61 69 6c 61 62 6c 65 50 61 63 | null,.$this->suggestAvailablePac |
38fe0 | 6b 61 67 65 49 6e 63 6c 50 6c 61 74 66 6f 72 6d 28 29 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 | kageInclPlatform()),.new.InputOp |
39000 | 74 69 6f 6e 28 27 72 65 71 75 69 72 65 2d 64 65 76 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f | tion('require-dev',.null,.InputO |
39020 | 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 49 53 5f 41 52 52 41 59 20 7c 20 49 6e 70 75 74 4f 70 74 | ption::VALUE_IS_ARRAY.|.InputOpt |
39040 | 69 6f 6e 3a 3a 56 41 4c 55 45 5f 52 45 51 55 49 52 45 44 2c 20 27 50 61 63 6b 61 67 65 20 74 6f | ion::VALUE_REQUIRED,.'Package.to |
39060 | 20 72 65 71 75 69 72 65 20 66 6f 72 20 64 65 76 65 6c 6f 70 6d 65 6e 74 20 77 69 74 68 20 61 20 | .require.for.development.with.a. |
39080 | 76 65 72 73 69 6f 6e 20 63 6f 6e 73 74 72 61 69 6e 74 2c 20 65 2e 67 2e 20 66 6f 6f 2f 62 61 72 | version.constraint,.e.g..foo/bar |
390a0 | 3a 31 2e 30 2e 30 20 6f 72 20 66 6f 6f 2f 62 61 72 3d 31 2e 30 2e 30 20 6f 72 20 22 66 6f 6f 2f | :1.0.0.or.foo/bar=1.0.0.or."foo/ |
390c0 | 62 61 72 20 31 2e 30 2e 30 22 27 2c 20 6e 75 6c 6c 2c 20 24 74 68 69 73 2d 3e 73 75 67 67 65 73 | bar.1.0.0"',.null,.$this->sugges |
390e0 | 74 41 76 61 69 6c 61 62 6c 65 50 61 63 6b 61 67 65 49 6e 63 6c 50 6c 61 74 66 6f 72 6d 28 29 29 | tAvailablePackageInclPlatform()) |
39100 | 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 73 74 61 62 69 6c 69 74 79 27 2c 20 27 | ,.new.InputOption('stability',.' |
39120 | 73 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 52 45 51 55 49 52 45 44 2c | s',.InputOption::VALUE_REQUIRED, |
39140 | 20 27 4d 69 6e 69 6d 75 6d 20 73 74 61 62 69 6c 69 74 79 20 28 65 6d 70 74 79 20 6f 72 20 6f 6e | .'Minimum.stability.(empty.or.on |
39160 | 65 20 6f 66 3a 20 27 2e 69 6d 70 6c 6f 64 65 28 27 2c 20 27 2c 20 61 72 72 61 79 5f 6b 65 79 73 | e.of:.'.implode(',.',.array_keys |
39180 | 28 42 61 73 65 50 61 63 6b 61 67 65 3a 3a 24 73 74 61 62 69 6c 69 74 69 65 73 29 29 2e 27 29 27 | (BasePackage::$stabilities)).')' |
391a0 | 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6c 69 63 65 6e 73 65 27 2c 20 27 6c | ),.new.InputOption('license',.'l |
391c0 | 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 52 45 51 55 49 52 45 44 2c 20 | ',.InputOption::VALUE_REQUIRED,. |
391e0 | 27 4c 69 63 65 6e 73 65 20 6f 66 20 70 61 63 6b 61 67 65 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 | 'License.of.package'),.new.Input |
39200 | 4f 70 74 69 6f 6e 28 27 72 65 70 6f 73 69 74 6f 72 79 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 | Option('repository',.null,.Input |
39220 | 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 52 45 51 55 49 52 45 44 20 7c 20 49 6e 70 75 74 4f 70 | Option::VALUE_REQUIRED.|.InputOp |
39240 | 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 49 53 5f 41 52 52 41 59 2c 20 27 41 64 64 20 63 75 73 74 6f | tion::VALUE_IS_ARRAY,.'Add.custo |
39260 | 6d 20 72 65 70 6f 73 69 74 6f 72 69 65 73 2c 20 65 69 74 68 65 72 20 62 79 20 55 52 4c 20 6f 72 | m.repositories,.either.by.URL.or |
39280 | 20 75 73 69 6e 67 20 4a 53 4f 4e 20 61 72 72 61 79 73 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f | .using.JSON.arrays'),.new.InputO |
392a0 | 70 74 69 6f 6e 28 27 61 75 74 6f 6c 6f 61 64 27 2c 20 27 61 27 2c 20 49 6e 70 75 74 4f 70 74 69 | ption('autoload',.'a',.InputOpti |
392c0 | 6f 6e 3a 3a 56 41 4c 55 45 5f 52 45 51 55 49 52 45 44 2c 20 27 41 64 64 20 50 53 52 2d 34 20 61 | on::VALUE_REQUIRED,.'Add.PSR-4.a |
392e0 | 75 74 6f 6c 6f 61 64 20 6d 61 70 70 69 6e 67 2e 20 4d 61 70 73 20 79 6f 75 72 20 70 61 63 6b 61 | utoload.mapping..Maps.your.packa |
39300 | 67 65 5c 27 73 20 6e 61 6d 65 73 70 61 63 65 20 74 6f 20 74 68 65 20 70 72 6f 76 69 64 65 64 20 | ge\'s.namespace.to.the.provided. |
39320 | 64 69 72 65 63 74 6f 72 79 2e 20 28 45 78 70 65 63 74 73 20 61 20 72 65 6c 61 74 69 76 65 20 70 | directory..(Expects.a.relative.p |
39340 | 61 74 68 2c 20 65 2e 67 2e 20 73 72 63 2f 29 27 29 2c 0a 5d 29 0a 2d 3e 73 65 74 48 65 6c 70 28 | ath,.e.g..src/)'),.]).->setHelp( |
39360 | 0a 3c 3c 3c 45 4f 54 0a 54 68 65 20 3c 69 6e 66 6f 3e 69 6e 69 74 3c 2f 69 6e 66 6f 3e 20 63 6f | .<<<EOT.The.<info>init</info>.co |
39380 | 6d 6d 61 6e 64 20 63 72 65 61 74 65 73 20 61 20 62 61 73 69 63 20 63 6f 6d 70 6f 73 65 72 2e 6a | mmand.creates.a.basic.composer.j |
393a0 | 73 6f 6e 20 66 69 6c 65 0a 69 6e 20 74 68 65 20 63 75 72 72 65 6e 74 20 64 69 72 65 63 74 6f 72 | son.file.in.the.current.director |
393c0 | 79 2e 0a 0a 3c 69 6e 66 6f 3e 70 68 70 20 63 6f 6d 70 6f 73 65 72 2e 70 68 61 72 20 69 6e 69 74 | y...<info>php.composer.phar.init |
393e0 | 3c 2f 69 6e 66 6f 3e 0a 0a 52 65 61 64 20 6d 6f 72 65 20 61 74 20 68 74 74 70 73 3a 2f 2f 67 65 | </info>..Read.more.at.https://ge |
39400 | 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 67 2f 64 6f 63 2f 30 33 2d 63 6c 69 2e 6d 64 23 69 6e 69 74 | tcomposer.org/doc/03-cli.md#init |
39420 | 0a 45 4f 54 0a 29 0a 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f | .EOT.).;.}.....protected.functio |
39440 | 6e 20 65 78 65 63 75 74 65 28 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 69 6e 70 75 74 2c | n.execute(InputInterface.$input, |
39460 | 20 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 6f 75 74 70 75 74 29 0a 7b 0a 24 69 6f 20 | .OutputInterface.$output).{.$io. |
39480 | 3d 20 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 3b 0a 0a 24 61 6c 6c 6f 77 6c 69 73 74 20 3d 20 | =.$this->getIO();..$allowlist.=. |
394a0 | 5b 27 6e 61 6d 65 27 2c 20 27 64 65 73 63 72 69 70 74 69 6f 6e 27 2c 20 27 61 75 74 68 6f 72 27 | ['name',.'description',.'author' |
394c0 | 2c 20 27 74 79 70 65 27 2c 20 27 68 6f 6d 65 70 61 67 65 27 2c 20 27 72 65 71 75 69 72 65 27 2c | ,.'type',.'homepage',.'require', |
394e0 | 20 27 72 65 71 75 69 72 65 2d 64 65 76 27 2c 20 27 73 74 61 62 69 6c 69 74 79 27 2c 20 27 6c 69 | .'require-dev',.'stability',.'li |
39500 | 63 65 6e 73 65 27 2c 20 27 61 75 74 6f 6c 6f 61 64 27 5d 3b 0a 24 6f 70 74 69 6f 6e 73 20 3d 20 | cense',.'autoload'];.$options.=. |
39520 | 61 72 72 61 79 5f 66 69 6c 74 65 72 28 61 72 72 61 79 5f 69 6e 74 65 72 73 65 63 74 5f 6b 65 79 | array_filter(array_intersect_key |
39540 | 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 73 28 29 2c 20 61 72 72 61 79 5f 66 6c 69 | ($input->getOptions(),.array_fli |
39560 | 70 28 24 61 6c 6c 6f 77 6c 69 73 74 29 29 29 3b 0a 0a 69 66 20 28 69 73 73 65 74 28 24 6f 70 74 | p($allowlist)));..if.(isset($opt |
39580 | 69 6f 6e 73 5b 27 6e 61 6d 65 27 5d 29 20 26 26 20 21 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 | ions['name']).&&.!Preg::isMatch( |
395a0 | 27 7b 5e 5b 61 2d 7a 30 2d 39 5f 2e 2d 5d 2b 2f 5b 61 2d 7a 30 2d 39 5f 2e 2d 5d 2b 24 7d 44 27 | '{^[a-z0-9_.-]+/[a-z0-9_.-]+$}D' |
395c0 | 2c 20 24 6f 70 74 69 6f 6e 73 5b 27 6e 61 6d 65 27 5d 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 | ,.$options['name'])).{.throw.new |
395e0 | 20 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 0a 27 54 68 65 | .\InvalidArgumentException(.'The |
39600 | 20 70 61 63 6b 61 67 65 20 6e 61 6d 65 20 27 2e 24 6f 70 74 69 6f 6e 73 5b 27 6e 61 6d 65 27 5d | .package.name.'.$options['name'] |
39620 | 2e 27 20 69 73 20 69 6e 76 61 6c 69 64 2c 20 69 74 20 73 68 6f 75 6c 64 20 62 65 20 6c 6f 77 65 | .'.is.invalid,.it.should.be.lowe |
39640 | 72 63 61 73 65 20 61 6e 64 20 68 61 76 65 20 61 20 76 65 6e 64 6f 72 20 6e 61 6d 65 2c 20 61 20 | rcase.and.have.a.vendor.name,.a. |
39660 | 66 6f 72 77 61 72 64 20 73 6c 61 73 68 2c 20 61 6e 64 20 61 20 70 61 63 6b 61 67 65 20 6e 61 6d | forward.slash,.and.a.package.nam |
39680 | 65 2c 20 6d 61 74 63 68 69 6e 67 3a 20 5b 61 2d 7a 30 2d 39 5f 2e 2d 5d 2b 2f 5b 61 2d 7a 30 2d | e,.matching:.[a-z0-9_.-]+/[a-z0- |
396a0 | 39 5f 2e 2d 5d 2b 27 0a 29 3b 0a 7d 0a 0a 69 66 20 28 69 73 73 65 74 28 24 6f 70 74 69 6f 6e 73 | 9_.-]+'.);.}..if.(isset($options |
396c0 | 5b 27 61 75 74 68 6f 72 27 5d 29 29 20 7b 0a 24 6f 70 74 69 6f 6e 73 5b 27 61 75 74 68 6f 72 73 | ['author'])).{.$options['authors |
396e0 | 27 5d 20 3d 20 24 74 68 69 73 2d 3e 66 6f 72 6d 61 74 41 75 74 68 6f 72 73 28 24 6f 70 74 69 6f | '].=.$this->formatAuthors($optio |
39700 | 6e 73 5b 27 61 75 74 68 6f 72 27 5d 29 3b 0a 75 6e 73 65 74 28 24 6f 70 74 69 6f 6e 73 5b 27 61 | ns['author']);.unset($options['a |
39720 | 75 74 68 6f 72 27 5d 29 3b 0a 7d 0a 0a 24 72 65 70 6f 73 69 74 6f 72 69 65 73 20 3d 20 24 69 6e | uthor']);.}..$repositories.=.$in |
39740 | 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 72 65 70 6f 73 69 74 6f 72 79 27 29 3b 0a 69 66 | put->getOption('repository');.if |
39760 | 20 28 63 6f 75 6e 74 28 24 72 65 70 6f 73 69 74 6f 72 69 65 73 29 20 3e 20 30 29 20 7b 0a 24 63 | .(count($repositories).>.0).{.$c |
39780 | 6f 6e 66 69 67 20 3d 20 46 61 63 74 6f 72 79 3a 3a 63 72 65 61 74 65 43 6f 6e 66 69 67 28 24 69 | onfig.=.Factory::createConfig($i |
397a0 | 6f 29 3b 0a 66 6f 72 65 61 63 68 20 28 24 72 65 70 6f 73 69 74 6f 72 69 65 73 20 61 73 20 24 72 | o);.foreach.($repositories.as.$r |
397c0 | 65 70 6f 29 20 7b 0a 24 6f 70 74 69 6f 6e 73 5b 27 72 65 70 6f 73 69 74 6f 72 69 65 73 27 5d 5b | epo).{.$options['repositories'][ |
397e0 | 5d 20 3d 20 52 65 70 6f 73 69 74 6f 72 79 46 61 63 74 6f 72 79 3a 3a 63 6f 6e 66 69 67 46 72 6f | ].=.RepositoryFactory::configFro |
39800 | 6d 53 74 72 69 6e 67 28 24 69 6f 2c 20 24 63 6f 6e 66 69 67 2c 20 24 72 65 70 6f 2c 20 74 72 75 | mString($io,.$config,.$repo,.tru |
39820 | 65 29 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 69 73 73 65 74 28 24 6f 70 74 69 6f 6e 73 5b 27 73 74 61 | e);.}.}..if.(isset($options['sta |
39840 | 62 69 6c 69 74 79 27 5d 29 29 20 7b 0a 24 6f 70 74 69 6f 6e 73 5b 27 6d 69 6e 69 6d 75 6d 2d 73 | bility'])).{.$options['minimum-s |
39860 | 74 61 62 69 6c 69 74 79 27 5d 20 3d 20 24 6f 70 74 69 6f 6e 73 5b 27 73 74 61 62 69 6c 69 74 79 | tability'].=.$options['stability |
39880 | 27 5d 3b 0a 75 6e 73 65 74 28 24 6f 70 74 69 6f 6e 73 5b 27 73 74 61 62 69 6c 69 74 79 27 5d 29 | '];.unset($options['stability']) |
398a0 | 3b 0a 7d 0a 0a 24 6f 70 74 69 6f 6e 73 5b 27 72 65 71 75 69 72 65 27 5d 20 3d 20 69 73 73 65 74 | ;.}..$options['require'].=.isset |
398c0 | 28 24 6f 70 74 69 6f 6e 73 5b 27 72 65 71 75 69 72 65 27 5d 29 20 3f 20 24 74 68 69 73 2d 3e 66 | ($options['require']).?.$this->f |
398e0 | 6f 72 6d 61 74 52 65 71 75 69 72 65 6d 65 6e 74 73 28 24 6f 70 74 69 6f 6e 73 5b 27 72 65 71 75 | ormatRequirements($options['requ |
39900 | 69 72 65 27 5d 29 20 3a 20 6e 65 77 20 5c 73 74 64 43 6c 61 73 73 3b 0a 69 66 20 28 5b 5d 20 3d | ire']).:.new.\stdClass;.if.([].= |
39920 | 3d 3d 20 24 6f 70 74 69 6f 6e 73 5b 27 72 65 71 75 69 72 65 27 5d 29 20 7b 0a 24 6f 70 74 69 6f | ==.$options['require']).{.$optio |
39940 | 6e 73 5b 27 72 65 71 75 69 72 65 27 5d 20 3d 20 6e 65 77 20 5c 73 74 64 43 6c 61 73 73 3b 0a 7d | ns['require'].=.new.\stdClass;.} |
39960 | 0a 0a 69 66 20 28 69 73 73 65 74 28 24 6f 70 74 69 6f 6e 73 5b 27 72 65 71 75 69 72 65 2d 64 65 | ..if.(isset($options['require-de |
39980 | 76 27 5d 29 29 20 7b 0a 24 6f 70 74 69 6f 6e 73 5b 27 72 65 71 75 69 72 65 2d 64 65 76 27 5d 20 | v'])).{.$options['require-dev']. |
399a0 | 3d 20 24 74 68 69 73 2d 3e 66 6f 72 6d 61 74 52 65 71 75 69 72 65 6d 65 6e 74 73 28 24 6f 70 74 | =.$this->formatRequirements($opt |
399c0 | 69 6f 6e 73 5b 27 72 65 71 75 69 72 65 2d 64 65 76 27 5d 29 3b 0a 69 66 20 28 5b 5d 20 3d 3d 3d | ions['require-dev']);.if.([].=== |
399e0 | 20 24 6f 70 74 69 6f 6e 73 5b 27 72 65 71 75 69 72 65 2d 64 65 76 27 5d 29 20 7b 0a 24 6f 70 74 | .$options['require-dev']).{.$opt |
39a00 | 69 6f 6e 73 5b 27 72 65 71 75 69 72 65 2d 64 65 76 27 5d 20 3d 20 6e 65 77 20 5c 73 74 64 43 6c | ions['require-dev'].=.new.\stdCl |
39a20 | 61 73 73 3b 0a 7d 0a 7d 0a 0a 0a 24 61 75 74 6f 6c 6f 61 64 50 61 74 68 20 3d 20 6e 75 6c 6c 3b | ass;.}.}...$autoloadPath.=.null; |
39a40 | 0a 69 66 20 28 69 73 73 65 74 28 24 6f 70 74 69 6f 6e 73 5b 27 61 75 74 6f 6c 6f 61 64 27 5d 29 | .if.(isset($options['autoload']) |
39a60 | 29 20 7b 0a 24 61 75 74 6f 6c 6f 61 64 50 61 74 68 20 3d 20 24 6f 70 74 69 6f 6e 73 5b 27 61 75 | ).{.$autoloadPath.=.$options['au |
39a80 | 74 6f 6c 6f 61 64 27 5d 3b 0a 24 6e 61 6d 65 73 70 61 63 65 20 3d 20 24 74 68 69 73 2d 3e 6e 61 | toload'];.$namespace.=.$this->na |
39aa0 | 6d 65 73 70 61 63 65 46 72 6f 6d 50 61 63 6b 61 67 65 4e 61 6d 65 28 28 73 74 72 69 6e 67 29 20 | mespaceFromPackageName((string). |
39ac0 | 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6e 61 6d 65 27 29 29 3b 0a 24 6f 70 74 | $input->getOption('name'));.$opt |
39ae0 | 69 6f 6e 73 5b 27 61 75 74 6f 6c 6f 61 64 27 5d 20 3d 20 28 6f 62 6a 65 63 74 29 20 5b 0a 27 70 | ions['autoload'].=.(object).[.'p |
39b00 | 73 72 2d 34 27 20 3d 3e 20 5b 0a 24 6e 61 6d 65 73 70 61 63 65 20 2e 20 27 5c 5c 27 20 3d 3e 20 | sr-4'.=>.[.$namespace...'\\'.=>. |
39b20 | 24 61 75 74 6f 6c 6f 61 64 50 61 74 68 2c 0a 5d 2c 0a 5d 3b 0a 7d 0a 0a 24 66 69 6c 65 20 3d 20 | $autoloadPath,.],.];.}..$file.=. |
39b40 | 6e 65 77 20 4a 73 6f 6e 46 69 6c 65 28 46 61 63 74 6f 72 79 3a 3a 67 65 74 43 6f 6d 70 6f 73 65 | new.JsonFile(Factory::getCompose |
39b60 | 72 46 69 6c 65 28 29 29 3b 0a 24 6a 73 6f 6e 20 3d 20 4a 73 6f 6e 46 69 6c 65 3a 3a 65 6e 63 6f | rFile());.$json.=.JsonFile::enco |
39b80 | 64 65 28 24 6f 70 74 69 6f 6e 73 29 3b 0a 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 69 73 49 6e 74 | de($options);..if.($input->isInt |
39ba0 | 65 72 61 63 74 69 76 65 28 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 5b 27 | eractive()).{.$io->writeError([' |
39bc0 | 27 2c 20 24 6a 73 6f 6e 2c 20 27 27 5d 29 3b 0a 69 66 20 28 21 24 69 6f 2d 3e 61 73 6b 43 6f 6e | ',.$json,.'']);.if.(!$io->askCon |
39be0 | 66 69 72 6d 61 74 69 6f 6e 28 27 44 6f 20 79 6f 75 20 63 6f 6e 66 69 72 6d 20 67 65 6e 65 72 61 | firmation('Do.you.confirm.genera |
39c00 | 74 69 6f 6e 20 5b 3c 63 6f 6d 6d 65 6e 74 3e 79 65 73 3c 2f 63 6f 6d 6d 65 6e 74 3e 5d 3f 20 27 | tion.[<comment>yes</comment>]?.' |
39c20 | 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 65 72 72 6f 72 3e 43 6f 6d | )).{.$io->writeError('<error>Com |
39c40 | 6d 61 6e 64 20 61 62 6f 72 74 65 64 3c 2f 65 72 72 6f 72 3e 27 29 3b 0a 0a 72 65 74 75 72 6e 20 | mand.aborted</error>');..return. |
39c60 | 31 3b 0a 7d 0a 7d 20 65 6c 73 65 20 7b 0a 69 66 20 28 6a 73 6f 6e 5f 65 6e 63 6f 64 65 28 24 6f | 1;.}.}.else.{.if.(json_encode($o |
39c80 | 70 74 69 6f 6e 73 29 20 3d 3d 3d 20 27 7b 22 72 65 71 75 69 72 65 22 3a 7b 7d 7d 27 29 20 7b 0a | ptions).===.'{"require":{}}').{. |
39ca0 | 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 59 6f 75 | throw.new.\RuntimeException('You |
39cc0 | 20 68 61 76 65 20 74 6f 20 72 75 6e 20 74 68 69 73 20 63 6f 6d 6d 61 6e 64 20 69 6e 20 69 6e 74 | .have.to.run.this.command.in.int |
39ce0 | 65 72 61 63 74 69 76 65 20 6d 6f 64 65 2c 20 6f 72 20 73 70 65 63 69 66 79 20 61 74 20 6c 65 61 | eractive.mode,.or.specify.at.lea |
39d00 | 73 74 20 73 6f 6d 65 20 64 61 74 61 20 75 73 69 6e 67 20 2d 2d 6e 61 6d 65 2c 20 2d 2d 72 65 71 | st.some.data.using.--name,.--req |
39d20 | 75 69 72 65 2c 20 65 74 63 2e 27 29 3b 0a 7d 0a 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 | uire,.etc.');.}..$io->writeError |
39d40 | 28 27 57 72 69 74 69 6e 67 20 27 2e 24 66 69 6c 65 2d 3e 67 65 74 50 61 74 68 28 29 29 3b 0a 7d | ('Writing.'.$file->getPath());.} |
39d60 | 0a 0a 24 66 69 6c 65 2d 3e 77 72 69 74 65 28 24 6f 70 74 69 6f 6e 73 29 3b 0a 74 72 79 20 7b 0a | ..$file->write($options);.try.{. |
39d80 | 24 66 69 6c 65 2d 3e 76 61 6c 69 64 61 74 65 53 63 68 65 6d 61 28 4a 73 6f 6e 46 69 6c 65 3a 3a | $file->validateSchema(JsonFile:: |
39da0 | 4c 41 58 5f 53 43 48 45 4d 41 29 3b 0a 7d 20 63 61 74 63 68 20 28 4a 73 6f 6e 56 61 6c 69 64 61 | LAX_SCHEMA);.}.catch.(JsonValida |
39dc0 | 74 69 6f 6e 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 | tionException.$e).{.$io->writeEr |
39de0 | 72 6f 72 28 27 3c 65 72 72 6f 72 3e 53 63 68 65 6d 61 20 76 61 6c 69 64 61 74 69 6f 6e 20 65 72 | ror('<error>Schema.validation.er |
39e00 | 72 6f 72 2c 20 61 62 6f 72 74 69 6e 67 3c 2f 65 72 72 6f 72 3e 27 29 3b 0a 24 65 72 72 6f 72 73 | ror,.aborting</error>');.$errors |
39e20 | 20 3d 20 27 20 2d 20 27 20 2e 20 69 6d 70 6c 6f 64 65 28 50 48 50 5f 45 4f 4c 20 2e 20 27 20 2d | .=.'.-.'...implode(PHP_EOL...'.- |
39e40 | 20 27 2c 20 24 65 2d 3e 67 65 74 45 72 72 6f 72 73 28 29 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 | .',.$e->getErrors());.$io->write |
39e60 | 45 72 72 6f 72 28 24 65 2d 3e 67 65 74 4d 65 73 73 61 67 65 28 29 20 2e 20 27 3a 27 20 2e 20 50 | Error($e->getMessage()...':'...P |
39e80 | 48 50 5f 45 4f 4c 20 2e 20 24 65 72 72 6f 72 73 29 3b 0a 53 69 6c 65 6e 63 65 72 3a 3a 63 61 6c | HP_EOL...$errors);.Silencer::cal |
39ea0 | 6c 28 27 75 6e 6c 69 6e 6b 27 2c 20 24 66 69 6c 65 2d 3e 67 65 74 50 61 74 68 28 29 29 3b 0a 0a | l('unlink',.$file->getPath());.. |
39ec0 | 72 65 74 75 72 6e 20 31 3b 0a 7d 0a 0a 0a 69 66 20 28 24 61 75 74 6f 6c 6f 61 64 50 61 74 68 29 | return.1;.}...if.($autoloadPath) |
39ee0 | 20 7b 0a 24 66 69 6c 65 73 79 73 74 65 6d 20 3d 20 6e 65 77 20 46 69 6c 65 73 79 73 74 65 6d 28 | .{.$filesystem.=.new.Filesystem( |
39f00 | 29 3b 0a 24 66 69 6c 65 73 79 73 74 65 6d 2d 3e 65 6e 73 75 72 65 44 69 72 65 63 74 6f 72 79 45 | );.$filesystem->ensureDirectoryE |
39f20 | 78 69 73 74 73 28 24 61 75 74 6f 6c 6f 61 64 50 61 74 68 29 3b 0a 0a 0a 69 66 20 28 21 24 74 68 | xists($autoloadPath);...if.(!$th |
39f40 | 69 73 2d 3e 68 61 73 44 65 70 65 6e 64 65 6e 63 69 65 73 28 24 6f 70 74 69 6f 6e 73 29 29 20 7b | is->hasDependencies($options)).{ |
39f60 | 0a 24 74 68 69 73 2d 3e 72 75 6e 44 75 6d 70 41 75 74 6f 6c 6f 61 64 43 6f 6d 6d 61 6e 64 28 24 | .$this->runDumpAutoloadCommand($ |
39f80 | 6f 75 74 70 75 74 29 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 69 73 49 6e 74 65 | output);.}.}..if.($input->isInte |
39fa0 | 72 61 63 74 69 76 65 28 29 20 26 26 20 69 73 5f 64 69 72 28 27 2e 67 69 74 27 29 29 20 7b 0a 24 | ractive().&&.is_dir('.git')).{.$ |
39fc0 | 69 67 6e 6f 72 65 46 69 6c 65 20 3d 20 72 65 61 6c 70 61 74 68 28 27 2e 67 69 74 69 67 6e 6f 72 | ignoreFile.=.realpath('.gitignor |
39fe0 | 65 27 29 3b 0a 0a 69 66 20 28 66 61 6c 73 65 20 3d 3d 3d 20 24 69 67 6e 6f 72 65 46 69 6c 65 29 | e');..if.(false.===.$ignoreFile) |
3a000 | 20 7b 0a 24 69 67 6e 6f 72 65 46 69 6c 65 20 3d 20 72 65 61 6c 70 61 74 68 28 27 2e 27 29 20 2e | .{.$ignoreFile.=.realpath('.').. |
3a020 | 20 27 2f 2e 67 69 74 69 67 6e 6f 72 65 27 3b 0a 7d 0a 0a 69 66 20 28 21 24 74 68 69 73 2d 3e 68 | .'/.gitignore';.}..if.(!$this->h |
3a040 | 61 73 56 65 6e 64 6f 72 49 67 6e 6f 72 65 28 24 69 67 6e 6f 72 65 46 69 6c 65 29 29 20 7b 0a 24 | asVendorIgnore($ignoreFile)).{.$ |
3a060 | 71 75 65 73 74 69 6f 6e 20 3d 20 27 57 6f 75 6c 64 20 79 6f 75 20 6c 69 6b 65 20 74 68 65 20 3c | question.=.'Would.you.like.the.< |
3a080 | 69 6e 66 6f 3e 76 65 6e 64 6f 72 3c 2f 69 6e 66 6f 3e 20 64 69 72 65 63 74 6f 72 79 20 61 64 64 | info>vendor</info>.directory.add |
3a0a0 | 65 64 20 74 6f 20 79 6f 75 72 20 3c 69 6e 66 6f 3e 2e 67 69 74 69 67 6e 6f 72 65 3c 2f 69 6e 66 | ed.to.your.<info>.gitignore</inf |
3a0c0 | 6f 3e 20 5b 3c 63 6f 6d 6d 65 6e 74 3e 79 65 73 3c 2f 63 6f 6d 6d 65 6e 74 3e 5d 3f 20 27 3b 0a | o>.[<comment>yes</comment>]?.';. |
3a0e0 | 0a 69 66 20 28 24 69 6f 2d 3e 61 73 6b 43 6f 6e 66 69 72 6d 61 74 69 6f 6e 28 24 71 75 65 73 74 | .if.($io->askConfirmation($quest |
3a100 | 69 6f 6e 29 29 20 7b 0a 24 74 68 69 73 2d 3e 61 64 64 56 65 6e 64 6f 72 49 67 6e 6f 72 65 28 24 | ion)).{.$this->addVendorIgnore($ |
3a120 | 69 67 6e 6f 72 65 46 69 6c 65 29 3b 0a 7d 0a 7d 0a 7d 0a 0a 24 71 75 65 73 74 69 6f 6e 20 3d 20 | ignoreFile);.}.}.}..$question.=. |
3a140 | 27 57 6f 75 6c 64 20 79 6f 75 20 6c 69 6b 65 20 74 6f 20 69 6e 73 74 61 6c 6c 20 64 65 70 65 6e | 'Would.you.like.to.install.depen |
3a160 | 64 65 6e 63 69 65 73 20 6e 6f 77 20 5b 3c 63 6f 6d 6d 65 6e 74 3e 79 65 73 3c 2f 63 6f 6d 6d 65 | dencies.now.[<comment>yes</comme |
3a180 | 6e 74 3e 5d 3f 20 27 3b 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 69 73 49 6e 74 65 72 61 63 74 69 | nt>]?.';.if.($input->isInteracti |
3a1a0 | 76 65 28 29 20 26 26 20 24 74 68 69 73 2d 3e 68 61 73 44 65 70 65 6e 64 65 6e 63 69 65 73 28 24 | ve().&&.$this->hasDependencies($ |
3a1c0 | 6f 70 74 69 6f 6e 73 29 20 26 26 20 24 69 6f 2d 3e 61 73 6b 43 6f 6e 66 69 72 6d 61 74 69 6f 6e | options).&&.$io->askConfirmation |
3a1e0 | 28 24 71 75 65 73 74 69 6f 6e 29 29 20 7b 0a 24 74 68 69 73 2d 3e 75 70 64 61 74 65 44 65 70 65 | ($question)).{.$this->updateDepe |
3a200 | 6e 64 65 6e 63 69 65 73 28 24 6f 75 74 70 75 74 29 3b 0a 7d 0a 0a 0a 69 66 20 28 24 61 75 74 6f | ndencies($output);.}...if.($auto |
3a220 | 6c 6f 61 64 50 61 74 68 29 20 7b 0a 24 6e 61 6d 65 73 70 61 63 65 20 3d 20 24 74 68 69 73 2d 3e | loadPath).{.$namespace.=.$this-> |
3a240 | 6e 61 6d 65 73 70 61 63 65 46 72 6f 6d 50 61 63 6b 61 67 65 4e 61 6d 65 28 28 73 74 72 69 6e 67 | namespaceFromPackageName((string |
3a260 | 29 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6e 61 6d 65 27 29 29 3b 0a 0a 24 | ).$input->getOption('name'));..$ |
3a280 | 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 50 53 52 2d 34 20 61 75 74 6f 6c 6f 61 64 69 6e | io->writeError('PSR-4.autoloadin |
3a2a0 | 67 20 63 6f 6e 66 69 67 75 72 65 64 2e 20 55 73 65 20 22 3c 63 6f 6d 6d 65 6e 74 3e 6e 61 6d 65 | g.configured..Use."<comment>name |
3a2c0 | 73 70 61 63 65 20 27 2e 24 6e 61 6d 65 73 70 61 63 65 2e 27 3b 3c 2f 63 6f 6d 6d 65 6e 74 3e 22 | space.'.$namespace.';</comment>" |
3a2e0 | 20 69 6e 20 27 2e 24 61 75 74 6f 6c 6f 61 64 50 61 74 68 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 | .in.'.$autoloadPath);.$io->write |
3a300 | 45 72 72 6f 72 28 27 49 6e 63 6c 75 64 65 20 74 68 65 20 43 6f 6d 70 6f 73 65 72 20 61 75 74 6f | Error('Include.the.Composer.auto |
3a320 | 6c 6f 61 64 65 72 20 77 69 74 68 3a 20 3c 63 6f 6d 6d 65 6e 74 3e 72 65 71 75 69 72 65 20 5c 27 | loader.with:.<comment>require.\' |
3a340 | 76 65 6e 64 6f 72 2f 61 75 74 6f 6c 6f 61 64 2e 70 68 70 5c 27 3b 3c 2f 63 6f 6d 6d 65 6e 74 3e | vendor/autoload.php\';</comment> |
3a360 | 27 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 | ');.}..return.0;.}.......protect |
3a380 | 65 64 20 66 75 6e 63 74 69 6f 6e 20 69 6e 74 65 72 61 63 74 28 49 6e 70 75 74 49 6e 74 65 72 66 | ed.function.interact(InputInterf |
3a3a0 | 61 63 65 20 24 69 6e 70 75 74 2c 20 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 6f 75 74 | ace.$input,.OutputInterface.$out |
3a3c0 | 70 75 74 29 0a 7b 0a 24 67 69 74 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 47 69 74 43 6f 6e 66 69 | put).{.$git.=.$this->getGitConfi |
3a3e0 | 67 28 29 3b 0a 24 69 6f 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 3b 0a 0a 24 66 6f 72 | g();.$io.=.$this->getIO();..$for |
3a400 | 6d 61 74 74 65 72 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 48 65 6c 70 65 72 53 65 74 28 29 2d 3e | matter.=.$this->getHelperSet()-> |
3a420 | 67 65 74 28 27 66 6f 72 6d 61 74 74 65 72 27 29 3b 0a 0a 0a 24 72 65 70 6f 73 69 74 6f 72 69 65 | get('formatter');...$repositorie |
3a440 | 73 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 72 65 70 6f 73 69 74 6f 72 | s.=.$input->getOption('repositor |
3a460 | 79 27 29 3b 0a 69 66 20 28 63 6f 75 6e 74 28 24 72 65 70 6f 73 69 74 6f 72 69 65 73 29 20 3e 20 | y');.if.(count($repositories).>. |
3a480 | 30 29 20 7b 0a 24 63 6f 6e 66 69 67 20 3d 20 46 61 63 74 6f 72 79 3a 3a 63 72 65 61 74 65 43 6f | 0).{.$config.=.Factory::createCo |
3a4a0 | 6e 66 69 67 28 24 69 6f 29 3b 0a 24 69 6f 2d 3e 6c 6f 61 64 43 6f 6e 66 69 67 75 72 61 74 69 6f | nfig($io);.$io->loadConfiguratio |
3a4c0 | 6e 28 24 63 6f 6e 66 69 67 29 3b 0a 24 72 65 70 6f 4d 61 6e 61 67 65 72 20 3d 20 52 65 70 6f 73 | n($config);.$repoManager.=.Repos |
3a4e0 | 69 74 6f 72 79 46 61 63 74 6f 72 79 3a 3a 6d 61 6e 61 67 65 72 28 24 69 6f 2c 20 24 63 6f 6e 66 | itoryFactory::manager($io,.$conf |
3a500 | 69 67 29 3b 0a 0a 24 72 65 70 6f 73 20 3d 20 5b 6e 65 77 20 50 6c 61 74 66 6f 72 6d 52 65 70 6f | ig);..$repos.=.[new.PlatformRepo |
3a520 | 73 69 74 6f 72 79 5d 3b 0a 24 63 72 65 61 74 65 44 65 66 61 75 6c 74 50 61 63 6b 61 67 69 73 74 | sitory];.$createDefaultPackagist |
3a540 | 52 65 70 6f 20 3d 20 74 72 75 65 3b 0a 66 6f 72 65 61 63 68 20 28 24 72 65 70 6f 73 69 74 6f 72 | Repo.=.true;.foreach.($repositor |
3a560 | 69 65 73 20 61 73 20 24 72 65 70 6f 29 20 7b 0a 24 72 65 70 6f 43 6f 6e 66 69 67 20 3d 20 52 65 | ies.as.$repo).{.$repoConfig.=.Re |
3a580 | 70 6f 73 69 74 6f 72 79 46 61 63 74 6f 72 79 3a 3a 63 6f 6e 66 69 67 46 72 6f 6d 53 74 72 69 6e | positoryFactory::configFromStrin |
3a5a0 | 67 28 24 69 6f 2c 20 24 63 6f 6e 66 69 67 2c 20 24 72 65 70 6f 2c 20 74 72 75 65 29 3b 0a 69 66 | g($io,.$config,.$repo,.true);.if |
3a5c0 | 20 28 0a 28 69 73 73 65 74 28 24 72 65 70 6f 43 6f 6e 66 69 67 5b 27 70 61 63 6b 61 67 69 73 74 | .(.(isset($repoConfig['packagist |
3a5e0 | 27 5d 29 20 26 26 20 24 72 65 70 6f 43 6f 6e 66 69 67 20 3d 3d 3d 20 5b 27 70 61 63 6b 61 67 69 | ']).&&.$repoConfig.===.['packagi |
3a600 | 73 74 27 20 3d 3e 20 66 61 6c 73 65 5d 29 0a 7c 7c 20 28 69 73 73 65 74 28 24 72 65 70 6f 43 6f | st'.=>.false]).||.(isset($repoCo |
3a620 | 6e 66 69 67 5b 27 70 61 63 6b 61 67 69 73 74 2e 6f 72 67 27 5d 29 20 26 26 20 24 72 65 70 6f 43 | nfig['packagist.org']).&&.$repoC |
3a640 | 6f 6e 66 69 67 20 3d 3d 3d 20 5b 27 70 61 63 6b 61 67 69 73 74 2e 6f 72 67 27 20 3d 3e 20 66 61 | onfig.===.['packagist.org'.=>.fa |
3a660 | 6c 73 65 5d 29 0a 29 20 7b 0a 24 63 72 65 61 74 65 44 65 66 61 75 6c 74 50 61 63 6b 61 67 69 73 | lse]).).{.$createDefaultPackagis |
3a680 | 74 52 65 70 6f 20 3d 20 66 61 6c 73 65 3b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 24 72 65 70 6f | tRepo.=.false;.continue;.}.$repo |
3a6a0 | 73 5b 5d 20 3d 20 52 65 70 6f 73 69 74 6f 72 79 46 61 63 74 6f 72 79 3a 3a 63 72 65 61 74 65 52 | s[].=.RepositoryFactory::createR |
3a6c0 | 65 70 6f 28 24 69 6f 2c 20 24 63 6f 6e 66 69 67 2c 20 24 72 65 70 6f 43 6f 6e 66 69 67 2c 20 24 | epo($io,.$config,.$repoConfig,.$ |
3a6e0 | 72 65 70 6f 4d 61 6e 61 67 65 72 29 3b 0a 7d 0a 0a 69 66 20 28 24 63 72 65 61 74 65 44 65 66 61 | repoManager);.}..if.($createDefa |
3a700 | 75 6c 74 50 61 63 6b 61 67 69 73 74 52 65 70 6f 29 20 7b 0a 24 72 65 70 6f 73 5b 5d 20 3d 20 52 | ultPackagistRepo).{.$repos[].=.R |
3a720 | 65 70 6f 73 69 74 6f 72 79 46 61 63 74 6f 72 79 3a 3a 63 72 65 61 74 65 52 65 70 6f 28 24 69 6f | epositoryFactory::createRepo($io |
3a740 | 2c 20 24 63 6f 6e 66 69 67 2c 20 5b 0a 27 74 79 70 65 27 20 3d 3e 20 27 63 6f 6d 70 6f 73 65 72 | ,.$config,.[.'type'.=>.'composer |
3a760 | 27 2c 0a 27 75 72 6c 27 20 3d 3e 20 27 68 74 74 70 73 3a 2f 2f 72 65 70 6f 2e 70 61 63 6b 61 67 | ',.'url'.=>.'https://repo.packag |
3a780 | 69 73 74 2e 6f 72 67 27 2c 0a 5d 2c 20 24 72 65 70 6f 4d 61 6e 61 67 65 72 29 3b 0a 7d 0a 0a 24 | ist.org',.],.$repoManager);.}..$ |
3a7a0 | 74 68 69 73 2d 3e 72 65 70 6f 73 20 3d 20 6e 65 77 20 43 6f 6d 70 6f 73 69 74 65 52 65 70 6f 73 | this->repos.=.new.CompositeRepos |
3a7c0 | 69 74 6f 72 79 28 24 72 65 70 6f 73 29 3b 0a 75 6e 73 65 74 28 24 72 65 70 6f 73 2c 20 24 63 6f | itory($repos);.unset($repos,.$co |
3a7e0 | 6e 66 69 67 2c 20 24 72 65 70 6f 73 69 74 6f 72 69 65 73 29 3b 0a 7d 0a 0a 24 69 6f 2d 3e 77 72 | nfig,.$repositories);.}..$io->wr |
3a800 | 69 74 65 45 72 72 6f 72 28 5b 0a 27 27 2c 0a 24 66 6f 72 6d 61 74 74 65 72 2d 3e 66 6f 72 6d 61 | iteError([.'',.$formatter->forma |
3a820 | 74 42 6c 6f 63 6b 28 27 57 65 6c 63 6f 6d 65 20 74 6f 20 74 68 65 20 43 6f 6d 70 6f 73 65 72 20 | tBlock('Welcome.to.the.Composer. |
3a840 | 63 6f 6e 66 69 67 20 67 65 6e 65 72 61 74 6f 72 27 2c 20 27 62 67 3d 62 6c 75 65 3b 66 67 3d 77 | config.generator',.'bg=blue;fg=w |
3a860 | 68 69 74 65 27 2c 20 74 72 75 65 29 2c 0a 27 27 2c 0a 5d 29 3b 0a 0a 0a 24 69 6f 2d 3e 77 72 69 | hite',.true),.'',.]);...$io->wri |
3a880 | 74 65 45 72 72 6f 72 28 5b 0a 27 27 2c 0a 27 54 68 69 73 20 63 6f 6d 6d 61 6e 64 20 77 69 6c 6c | teError([.'',.'This.command.will |
3a8a0 | 20 67 75 69 64 65 20 79 6f 75 20 74 68 72 6f 75 67 68 20 63 72 65 61 74 69 6e 67 20 79 6f 75 72 | .guide.you.through.creating.your |
3a8c0 | 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 20 63 6f 6e 66 69 67 2e 27 2c 0a 27 27 2c 0a 5d 29 3b | .composer.json.config.',.'',.]); |
3a8e0 | 0a 0a 24 63 77 64 20 3d 20 72 65 61 6c 70 61 74 68 28 22 2e 22 29 3b 0a 0a 24 6e 61 6d 65 20 3d | ..$cwd.=.realpath(".");..$name.= |
3a900 | 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6e 61 6d 65 27 29 3b 0a 69 66 20 28 | .$input->getOption('name');.if.( |
3a920 | 6e 75 6c 6c 20 3d 3d 3d 20 24 6e 61 6d 65 29 20 7b 0a 24 6e 61 6d 65 20 3d 20 62 61 73 65 6e 61 | null.===.$name).{.$name.=.basena |
3a940 | 6d 65 28 24 63 77 64 29 3b 0a 24 6e 61 6d 65 20 3d 20 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 28 | me($cwd);.$name.=.Preg::replace( |
3a960 | 27 7b 28 3f 3a 28 5b 61 2d 7a 5d 29 28 5b 41 2d 5a 5d 29 7c 28 5b 41 2d 5a 5d 29 28 5b 41 2d 5a | '{(?:([a-z])([A-Z])|([A-Z])([A-Z |
3a980 | 5d 5b 61 2d 7a 5d 29 29 7d 27 2c 20 27 5c 5c 31 5c 5c 33 2d 5c 5c 32 5c 5c 34 27 2c 20 24 6e 61 | ][a-z]))}',.'\\1\\3-\\2\\4',.$na |
3a9a0 | 6d 65 29 3b 0a 24 6e 61 6d 65 20 3d 20 73 74 72 74 6f 6c 6f 77 65 72 28 24 6e 61 6d 65 29 3b 0a | me);.$name.=.strtolower($name);. |
3a9c0 | 69 66 20 28 21 65 6d 70 74 79 28 24 5f 53 45 52 56 45 52 5b 27 43 4f 4d 50 4f 53 45 52 5f 44 45 | if.(!empty($_SERVER['COMPOSER_DE |
3a9e0 | 46 41 55 4c 54 5f 56 45 4e 44 4f 52 27 5d 29 29 20 7b 0a 24 6e 61 6d 65 20 3d 20 24 5f 53 45 52 | FAULT_VENDOR'])).{.$name.=.$_SER |
3aa00 | 56 45 52 5b 27 43 4f 4d 50 4f 53 45 52 5f 44 45 46 41 55 4c 54 5f 56 45 4e 44 4f 52 27 5d 20 2e | VER['COMPOSER_DEFAULT_VENDOR'].. |
3aa20 | 20 27 2f 27 20 2e 20 24 6e 61 6d 65 3b 0a 7d 20 65 6c 73 65 69 66 20 28 69 73 73 65 74 28 24 67 | .'/'...$name;.}.elseif.(isset($g |
3aa40 | 69 74 5b 27 67 69 74 68 75 62 2e 75 73 65 72 27 5d 29 29 20 7b 0a 24 6e 61 6d 65 20 3d 20 24 67 | it['github.user'])).{.$name.=.$g |
3aa60 | 69 74 5b 27 67 69 74 68 75 62 2e 75 73 65 72 27 5d 20 2e 20 27 2f 27 20 2e 20 24 6e 61 6d 65 3b | it['github.user']...'/'...$name; |
3aa80 | 0a 7d 20 65 6c 73 65 69 66 20 28 21 65 6d 70 74 79 28 24 5f 53 45 52 56 45 52 5b 27 55 53 45 52 | .}.elseif.(!empty($_SERVER['USER |
3aaa0 | 4e 41 4d 45 27 5d 29 29 20 7b 0a 24 6e 61 6d 65 20 3d 20 24 5f 53 45 52 56 45 52 5b 27 55 53 45 | NAME'])).{.$name.=.$_SERVER['USE |
3aac0 | 52 4e 41 4d 45 27 5d 20 2e 20 27 2f 27 20 2e 20 24 6e 61 6d 65 3b 0a 7d 20 65 6c 73 65 69 66 20 | RNAME']...'/'...$name;.}.elseif. |
3aae0 | 28 21 65 6d 70 74 79 28 24 5f 53 45 52 56 45 52 5b 27 55 53 45 52 27 5d 29 29 20 7b 0a 24 6e 61 | (!empty($_SERVER['USER'])).{.$na |
3ab00 | 6d 65 20 3d 20 24 5f 53 45 52 56 45 52 5b 27 55 53 45 52 27 5d 20 2e 20 27 2f 27 20 2e 20 24 6e | me.=.$_SERVER['USER']...'/'...$n |
3ab20 | 61 6d 65 3b 0a 7d 20 65 6c 73 65 69 66 20 28 67 65 74 5f 63 75 72 72 65 6e 74 5f 75 73 65 72 28 | ame;.}.elseif.(get_current_user( |
3ab40 | 29 29 20 7b 0a 24 6e 61 6d 65 20 3d 20 67 65 74 5f 63 75 72 72 65 6e 74 5f 75 73 65 72 28 29 20 | )).{.$name.=.get_current_user(). |
3ab60 | 2e 20 27 2f 27 20 2e 20 24 6e 61 6d 65 3b 0a 7d 20 65 6c 73 65 20 7b 0a 0a 24 6e 61 6d 65 20 2e | ..'/'...$name;.}.else.{..$name.. |
3ab80 | 3d 20 27 2f 27 20 2e 20 24 6e 61 6d 65 3b 0a 7d 0a 24 6e 61 6d 65 20 3d 20 73 74 72 74 6f 6c 6f | =.'/'...$name;.}.$name.=.strtolo |
3aba0 | 77 65 72 28 24 6e 61 6d 65 29 3b 0a 7d 0a 0a 24 6e 61 6d 65 20 3d 20 24 69 6f 2d 3e 61 73 6b 41 | wer($name);.}..$name.=.$io->askA |
3abc0 | 6e 64 56 61 6c 69 64 61 74 65 28 0a 27 50 61 63 6b 61 67 65 20 6e 61 6d 65 20 28 3c 76 65 6e 64 | ndValidate(.'Package.name.(<vend |
3abe0 | 6f 72 3e 2f 3c 6e 61 6d 65 3e 29 20 5b 3c 63 6f 6d 6d 65 6e 74 3e 27 2e 24 6e 61 6d 65 2e 27 3c | or>/<name>).[<comment>'.$name.'< |
3ac00 | 2f 63 6f 6d 6d 65 6e 74 3e 5d 3a 20 27 2c 0a 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 | /comment>]:.',.static.function.( |
3ac20 | 24 76 61 6c 75 65 29 20 75 73 65 20 28 24 6e 61 6d 65 29 20 7b 0a 69 66 20 28 6e 75 6c 6c 20 3d | $value).use.($name).{.if.(null.= |
3ac40 | 3d 3d 20 24 76 61 6c 75 65 29 20 7b 0a 72 65 74 75 72 6e 20 24 6e 61 6d 65 3b 0a 7d 0a 0a 69 66 | ==.$value).{.return.$name;.}..if |
3ac60 | 20 28 21 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b 5e 5b 61 2d 7a 30 2d 39 5f 2e 2d 5d 2b | .(!Preg::isMatch('{^[a-z0-9_.-]+ |
3ac80 | 2f 5b 61 2d 7a 30 2d 39 5f 2e 2d 5d 2b 24 7d 44 27 2c 20 24 76 61 6c 75 65 29 29 20 7b 0a 74 68 | /[a-z0-9_.-]+$}D',.$value)).{.th |
3aca0 | 72 6f 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f | row.new.\InvalidArgumentExceptio |
3acc0 | 6e 28 0a 27 54 68 65 20 70 61 63 6b 61 67 65 20 6e 61 6d 65 20 27 2e 24 76 61 6c 75 65 2e 27 20 | n(.'The.package.name.'.$value.'. |
3ace0 | 69 73 20 69 6e 76 61 6c 69 64 2c 20 69 74 20 73 68 6f 75 6c 64 20 62 65 20 6c 6f 77 65 72 63 61 | is.invalid,.it.should.be.lowerca |
3ad00 | 73 65 20 61 6e 64 20 68 61 76 65 20 61 20 76 65 6e 64 6f 72 20 6e 61 6d 65 2c 20 61 20 66 6f 72 | se.and.have.a.vendor.name,.a.for |
3ad20 | 77 61 72 64 20 73 6c 61 73 68 2c 20 61 6e 64 20 61 20 70 61 63 6b 61 67 65 20 6e 61 6d 65 2c 20 | ward.slash,.and.a.package.name,. |
3ad40 | 6d 61 74 63 68 69 6e 67 3a 20 5b 61 2d 7a 30 2d 39 5f 2e 2d 5d 2b 2f 5b 61 2d 7a 30 2d 39 5f 2e | matching:.[a-z0-9_.-]+/[a-z0-9_. |
3ad60 | 2d 5d 2b 27 0a 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 76 61 6c 75 65 3b 0a 7d 2c 0a 6e 75 6c | -]+'.);.}..return.$value;.},.nul |
3ad80 | 6c 2c 0a 24 6e 61 6d 65 0a 29 3b 0a 24 69 6e 70 75 74 2d 3e 73 65 74 4f 70 74 69 6f 6e 28 27 6e | l,.$name.);.$input->setOption('n |
3ada0 | 61 6d 65 27 2c 20 24 6e 61 6d 65 29 3b 0a 0a 24 64 65 73 63 72 69 70 74 69 6f 6e 20 3d 20 24 69 | ame',.$name);..$description.=.$i |
3adc0 | 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 64 65 73 63 72 69 70 74 69 6f 6e 27 29 20 3f | nput->getOption('description').? |
3ade0 | 3a 20 6e 75 6c 6c 3b 0a 24 64 65 73 63 72 69 70 74 69 6f 6e 20 3d 20 24 69 6f 2d 3e 61 73 6b 28 | :.null;.$description.=.$io->ask( |
3ae00 | 0a 27 44 65 73 63 72 69 70 74 69 6f 6e 20 5b 3c 63 6f 6d 6d 65 6e 74 3e 27 2e 24 64 65 73 63 72 | .'Description.[<comment>'.$descr |
3ae20 | 69 70 74 69 6f 6e 2e 27 3c 2f 63 6f 6d 6d 65 6e 74 3e 5d 3a 20 27 2c 0a 24 64 65 73 63 72 69 70 | iption.'</comment>]:.',.$descrip |
3ae40 | 74 69 6f 6e 0a 29 3b 0a 24 69 6e 70 75 74 2d 3e 73 65 74 4f 70 74 69 6f 6e 28 27 64 65 73 63 72 | tion.);.$input->setOption('descr |
3ae60 | 69 70 74 69 6f 6e 27 2c 20 24 64 65 73 63 72 69 70 74 69 6f 6e 29 3b 0a 0a 69 66 20 28 6e 75 6c | iption',.$description);..if.(nul |
3ae80 | 6c 20 3d 3d 3d 20 24 61 75 74 68 6f 72 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f | l.===.$author.=.$input->getOptio |
3aea0 | 6e 28 27 61 75 74 68 6f 72 27 29 29 20 7b 0a 69 66 20 28 21 65 6d 70 74 79 28 24 5f 53 45 52 56 | n('author')).{.if.(!empty($_SERV |
3aec0 | 45 52 5b 27 43 4f 4d 50 4f 53 45 52 5f 44 45 46 41 55 4c 54 5f 41 55 54 48 4f 52 27 5d 29 29 20 | ER['COMPOSER_DEFAULT_AUTHOR'])). |
3aee0 | 7b 0a 24 61 75 74 68 6f 72 5f 6e 61 6d 65 20 3d 20 24 5f 53 45 52 56 45 52 5b 27 43 4f 4d 50 4f | {.$author_name.=.$_SERVER['COMPO |
3af00 | 53 45 52 5f 44 45 46 41 55 4c 54 5f 41 55 54 48 4f 52 27 5d 3b 0a 7d 20 65 6c 73 65 69 66 20 28 | SER_DEFAULT_AUTHOR'];.}.elseif.( |
3af20 | 69 73 73 65 74 28 24 67 69 74 5b 27 75 73 65 72 2e 6e 61 6d 65 27 5d 29 29 20 7b 0a 24 61 75 74 | isset($git['user.name'])).{.$aut |
3af40 | 68 6f 72 5f 6e 61 6d 65 20 3d 20 24 67 69 74 5b 27 75 73 65 72 2e 6e 61 6d 65 27 5d 3b 0a 7d 0a | hor_name.=.$git['user.name'];.}. |
3af60 | 0a 69 66 20 28 21 65 6d 70 74 79 28 24 5f 53 45 52 56 45 52 5b 27 43 4f 4d 50 4f 53 45 52 5f 44 | .if.(!empty($_SERVER['COMPOSER_D |
3af80 | 45 46 41 55 4c 54 5f 45 4d 41 49 4c 27 5d 29 29 20 7b 0a 24 61 75 74 68 6f 72 5f 65 6d 61 69 6c | EFAULT_EMAIL'])).{.$author_email |
3afa0 | 20 3d 20 24 5f 53 45 52 56 45 52 5b 27 43 4f 4d 50 4f 53 45 52 5f 44 45 46 41 55 4c 54 5f 45 4d | .=.$_SERVER['COMPOSER_DEFAULT_EM |
3afc0 | 41 49 4c 27 5d 3b 0a 7d 20 65 6c 73 65 69 66 20 28 69 73 73 65 74 28 24 67 69 74 5b 27 75 73 65 | AIL'];.}.elseif.(isset($git['use |
3afe0 | 72 2e 65 6d 61 69 6c 27 5d 29 29 20 7b 0a 24 61 75 74 68 6f 72 5f 65 6d 61 69 6c 20 3d 20 24 67 | r.email'])).{.$author_email.=.$g |
3b000 | 69 74 5b 27 75 73 65 72 2e 65 6d 61 69 6c 27 5d 3b 0a 7d 0a 0a 69 66 20 28 69 73 73 65 74 28 24 | it['user.email'];.}..if.(isset($ |
3b020 | 61 75 74 68 6f 72 5f 6e 61 6d 65 2c 20 24 61 75 74 68 6f 72 5f 65 6d 61 69 6c 29 29 20 7b 0a 24 | author_name,.$author_email)).{.$ |
3b040 | 61 75 74 68 6f 72 20 3d 20 73 70 72 69 6e 74 66 28 27 25 73 20 3c 25 73 3e 27 2c 20 24 61 75 74 | author.=.sprintf('%s.<%s>',.$aut |
3b060 | 68 6f 72 5f 6e 61 6d 65 2c 20 24 61 75 74 68 6f 72 5f 65 6d 61 69 6c 29 3b 0a 7d 0a 7d 0a 0a 24 | hor_name,.$author_email);.}.}..$ |
3b080 | 61 75 74 68 6f 72 20 3d 20 24 69 6f 2d 3e 61 73 6b 41 6e 64 56 61 6c 69 64 61 74 65 28 0a 27 41 | author.=.$io->askAndValidate(.'A |
3b0a0 | 75 74 68 6f 72 20 5b 27 2e 28 69 73 5f 73 74 72 69 6e 67 28 24 61 75 74 68 6f 72 29 20 3f 20 27 | uthor.['.(is_string($author).?.' |
3b0c0 | 3c 63 6f 6d 6d 65 6e 74 3e 27 2e 24 61 75 74 68 6f 72 2e 27 3c 2f 63 6f 6d 6d 65 6e 74 3e 2c 20 | <comment>'.$author.'</comment>,. |
3b0e0 | 27 20 3a 20 27 27 29 20 2e 20 27 6e 20 74 6f 20 73 6b 69 70 5d 3a 20 27 2c 0a 66 75 6e 63 74 69 | '.:.'')...'n.to.skip]:.',.functi |
3b100 | 6f 6e 20 28 24 76 61 6c 75 65 29 20 75 73 65 20 28 24 61 75 74 68 6f 72 29 20 7b 0a 69 66 20 28 | on.($value).use.($author).{.if.( |
3b120 | 24 76 61 6c 75 65 20 3d 3d 3d 20 27 6e 27 20 7c 7c 20 24 76 61 6c 75 65 20 3d 3d 3d 20 27 6e 6f | $value.===.'n'.||.$value.===.'no |
3b140 | 27 29 20 7b 0a 72 65 74 75 72 6e 3b 0a 7d 0a 24 76 61 6c 75 65 20 3d 20 24 76 61 6c 75 65 20 3f | ').{.return;.}.$value.=.$value.? |
3b160 | 3a 20 24 61 75 74 68 6f 72 3b 0a 24 61 75 74 68 6f 72 20 3d 20 24 74 68 69 73 2d 3e 70 61 72 73 | :.$author;.$author.=.$this->pars |
3b180 | 65 41 75 74 68 6f 72 53 74 72 69 6e 67 28 24 76 61 6c 75 65 20 3f 3f 20 27 27 29 3b 0a 0a 69 66 | eAuthorString($value.??.'');..if |
3b1a0 | 20 28 24 61 75 74 68 6f 72 5b 27 65 6d 61 69 6c 27 5d 20 3d 3d 3d 20 6e 75 6c 6c 29 20 7b 0a 72 | .($author['email'].===.null).{.r |
3b1c0 | 65 74 75 72 6e 20 24 61 75 74 68 6f 72 5b 27 6e 61 6d 65 27 5d 3b 0a 7d 0a 0a 72 65 74 75 72 6e | eturn.$author['name'];.}..return |
3b1e0 | 20 73 70 72 69 6e 74 66 28 27 25 73 20 3c 25 73 3e 27 2c 20 24 61 75 74 68 6f 72 5b 27 6e 61 6d | .sprintf('%s.<%s>',.$author['nam |
3b200 | 65 27 5d 2c 20 24 61 75 74 68 6f 72 5b 27 65 6d 61 69 6c 27 5d 29 3b 0a 7d 2c 0a 6e 75 6c 6c 2c | e'],.$author['email']);.},.null, |
3b220 | 0a 24 61 75 74 68 6f 72 0a 29 3b 0a 24 69 6e 70 75 74 2d 3e 73 65 74 4f 70 74 69 6f 6e 28 27 61 | .$author.);.$input->setOption('a |
3b240 | 75 74 68 6f 72 27 2c 20 24 61 75 74 68 6f 72 29 3b 0a 0a 24 6d 69 6e 69 6d 75 6d 53 74 61 62 69 | uthor',.$author);..$minimumStabi |
3b260 | 6c 69 74 79 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 73 74 61 62 69 6c | lity.=.$input->getOption('stabil |
3b280 | 69 74 79 27 29 20 3f 3a 20 6e 75 6c 6c 3b 0a 24 6d 69 6e 69 6d 75 6d 53 74 61 62 69 6c 69 74 79 | ity').?:.null;.$minimumStability |
3b2a0 | 20 3d 20 24 69 6f 2d 3e 61 73 6b 41 6e 64 56 61 6c 69 64 61 74 65 28 0a 27 4d 69 6e 69 6d 75 6d | .=.$io->askAndValidate(.'Minimum |
3b2c0 | 20 53 74 61 62 69 6c 69 74 79 20 5b 3c 63 6f 6d 6d 65 6e 74 3e 27 2e 24 6d 69 6e 69 6d 75 6d 53 | .Stability.[<comment>'.$minimumS |
3b2e0 | 74 61 62 69 6c 69 74 79 2e 27 3c 2f 63 6f 6d 6d 65 6e 74 3e 5d 3a 20 27 2c 0a 73 74 61 74 69 63 | tability.'</comment>]:.',.static |
3b300 | 20 66 75 6e 63 74 69 6f 6e 20 28 24 76 61 6c 75 65 29 20 75 73 65 20 28 24 6d 69 6e 69 6d 75 6d | .function.($value).use.($minimum |
3b320 | 53 74 61 62 69 6c 69 74 79 29 20 7b 0a 69 66 20 28 6e 75 6c 6c 20 3d 3d 3d 20 24 76 61 6c 75 65 | Stability).{.if.(null.===.$value |
3b340 | 29 20 7b 0a 72 65 74 75 72 6e 20 24 6d 69 6e 69 6d 75 6d 53 74 61 62 69 6c 69 74 79 3b 0a 7d 0a | ).{.return.$minimumStability;.}. |
3b360 | 0a 69 66 20 28 21 69 73 73 65 74 28 42 61 73 65 50 61 63 6b 61 67 65 3a 3a 24 73 74 61 62 69 6c | .if.(!isset(BasePackage::$stabil |
3b380 | 69 74 69 65 73 5b 24 76 61 6c 75 65 5d 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e 76 | ities[$value])).{.throw.new.\Inv |
3b3a0 | 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 0a 27 49 6e 76 61 6c 69 64 20 | alidArgumentException(.'Invalid. |
3b3c0 | 6d 69 6e 69 6d 75 6d 20 73 74 61 62 69 6c 69 74 79 20 22 27 2e 24 76 61 6c 75 65 2e 27 22 2e 20 | minimum.stability."'.$value.'".. |
3b3e0 | 4d 75 73 74 20 62 65 20 65 6d 70 74 79 20 6f 72 20 6f 6e 65 20 6f 66 3a 20 27 2e 0a 69 6d 70 6c | Must.be.empty.or.one.of:.'..impl |
3b400 | 6f 64 65 28 27 2c 20 27 2c 20 61 72 72 61 79 5f 6b 65 79 73 28 42 61 73 65 50 61 63 6b 61 67 65 | ode(',.',.array_keys(BasePackage |
3b420 | 3a 3a 24 73 74 61 62 69 6c 69 74 69 65 73 29 29 0a 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 76 | ::$stabilities)).);.}..return.$v |
3b440 | 61 6c 75 65 3b 0a 7d 2c 0a 6e 75 6c 6c 2c 0a 24 6d 69 6e 69 6d 75 6d 53 74 61 62 69 6c 69 74 79 | alue;.},.null,.$minimumStability |
3b460 | 0a 29 3b 0a 24 69 6e 70 75 74 2d 3e 73 65 74 4f 70 74 69 6f 6e 28 27 73 74 61 62 69 6c 69 74 79 | .);.$input->setOption('stability |
3b480 | 27 2c 20 24 6d 69 6e 69 6d 75 6d 53 74 61 62 69 6c 69 74 79 29 3b 0a 0a 24 74 79 70 65 20 3d 20 | ',.$minimumStability);..$type.=. |
3b4a0 | 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 74 79 70 65 27 29 20 3f 3a 20 66 61 6c | $input->getOption('type').?:.fal |
3b4c0 | 73 65 3b 0a 24 74 79 70 65 20 3d 20 24 69 6f 2d 3e 61 73 6b 28 0a 27 50 61 63 6b 61 67 65 20 54 | se;.$type.=.$io->ask(.'Package.T |
3b4e0 | 79 70 65 20 28 65 2e 67 2e 20 6c 69 62 72 61 72 79 2c 20 70 72 6f 6a 65 63 74 2c 20 6d 65 74 61 | ype.(e.g..library,.project,.meta |
3b500 | 70 61 63 6b 61 67 65 2c 20 63 6f 6d 70 6f 73 65 72 2d 70 6c 75 67 69 6e 29 20 5b 3c 63 6f 6d 6d | package,.composer-plugin).[<comm |
3b520 | 65 6e 74 3e 27 2e 24 74 79 70 65 2e 27 3c 2f 63 6f 6d 6d 65 6e 74 3e 5d 3a 20 27 2c 0a 24 74 79 | ent>'.$type.'</comment>]:.',.$ty |
3b540 | 70 65 0a 29 3b 0a 24 69 6e 70 75 74 2d 3e 73 65 74 4f 70 74 69 6f 6e 28 27 74 79 70 65 27 2c 20 | pe.);.$input->setOption('type',. |
3b560 | 24 74 79 70 65 29 3b 0a 0a 69 66 20 28 6e 75 6c 6c 20 3d 3d 3d 20 24 6c 69 63 65 6e 73 65 20 3d | $type);..if.(null.===.$license.= |
3b580 | 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6c 69 63 65 6e 73 65 27 29 29 20 7b | .$input->getOption('license')).{ |
3b5a0 | 0a 69 66 20 28 21 65 6d 70 74 79 28 24 5f 53 45 52 56 45 52 5b 27 43 4f 4d 50 4f 53 45 52 5f 44 | .if.(!empty($_SERVER['COMPOSER_D |
3b5c0 | 45 46 41 55 4c 54 5f 4c 49 43 45 4e 53 45 27 5d 29 29 20 7b 0a 24 6c 69 63 65 6e 73 65 20 3d 20 | EFAULT_LICENSE'])).{.$license.=. |
3b5e0 | 24 5f 53 45 52 56 45 52 5b 27 43 4f 4d 50 4f 53 45 52 5f 44 45 46 41 55 4c 54 5f 4c 49 43 45 4e | $_SERVER['COMPOSER_DEFAULT_LICEN |
3b600 | 53 45 27 5d 3b 0a 7d 0a 7d 0a 0a 24 6c 69 63 65 6e 73 65 20 3d 20 24 69 6f 2d 3e 61 73 6b 28 0a | SE'];.}.}..$license.=.$io->ask(. |
3b620 | 27 4c 69 63 65 6e 73 65 20 5b 3c 63 6f 6d 6d 65 6e 74 3e 27 2e 24 6c 69 63 65 6e 73 65 2e 27 3c | 'License.[<comment>'.$license.'< |
3b640 | 2f 63 6f 6d 6d 65 6e 74 3e 5d 3a 20 27 2c 0a 24 6c 69 63 65 6e 73 65 0a 29 3b 0a 24 69 6e 70 75 | /comment>]:.',.$license.);.$inpu |
3b660 | 74 2d 3e 73 65 74 4f 70 74 69 6f 6e 28 27 6c 69 63 65 6e 73 65 27 2c 20 24 6c 69 63 65 6e 73 65 | t->setOption('license',.$license |
3b680 | 29 3b 0a 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 5b 27 27 2c 20 27 44 65 66 69 6e 65 | );..$io->writeError(['',.'Define |
3b6a0 | 20 79 6f 75 72 20 64 65 70 65 6e 64 65 6e 63 69 65 73 2e 27 2c 20 27 27 5d 29 3b 0a 0a 0a 24 72 | .your.dependencies.',.'']);...$r |
3b6c0 | 65 70 6f 73 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 52 65 70 6f 73 28 29 3b 0a 24 70 72 65 66 65 | epos.=.$this->getRepos();.$prefe |
3b6e0 | 72 72 65 64 53 74 61 62 69 6c 69 74 79 20 3d 20 24 6d 69 6e 69 6d 75 6d 53 74 61 62 69 6c 69 74 | rredStability.=.$minimumStabilit |
3b700 | 79 20 3f 3a 20 27 73 74 61 62 6c 65 27 3b 0a 24 70 6c 61 74 66 6f 72 6d 52 65 70 6f 20 3d 20 6e | y.?:.'stable';.$platformRepo.=.n |
3b720 | 75 6c 6c 3b 0a 69 66 20 28 24 72 65 70 6f 73 20 69 6e 73 74 61 6e 63 65 6f 66 20 43 6f 6d 70 6f | ull;.if.($repos.instanceof.Compo |
3b740 | 73 69 74 65 52 65 70 6f 73 69 74 6f 72 79 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 72 65 70 6f | siteRepository).{.foreach.($repo |
3b760 | 73 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 69 65 73 28 29 20 61 73 20 24 63 61 6e 64 69 64 61 | s->getRepositories().as.$candida |
3b780 | 74 65 52 65 70 6f 29 20 7b 0a 69 66 20 28 24 63 61 6e 64 69 64 61 74 65 52 65 70 6f 20 69 6e 73 | teRepo).{.if.($candidateRepo.ins |
3b7a0 | 74 61 6e 63 65 6f 66 20 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 29 20 7b 0a 24 70 | tanceof.PlatformRepository).{.$p |
3b7c0 | 6c 61 74 66 6f 72 6d 52 65 70 6f 20 3d 20 24 63 61 6e 64 69 64 61 74 65 52 65 70 6f 3b 0a 62 72 | latformRepo.=.$candidateRepo;.br |
3b7e0 | 65 61 6b 3b 0a 7d 0a 7d 0a 7d 0a 0a 24 71 75 65 73 74 69 6f 6e 20 3d 20 27 57 6f 75 6c 64 20 79 | eak;.}.}.}..$question.=.'Would.y |
3b800 | 6f 75 20 6c 69 6b 65 20 74 6f 20 64 65 66 69 6e 65 20 79 6f 75 72 20 64 65 70 65 6e 64 65 6e 63 | ou.like.to.define.your.dependenc |
3b820 | 69 65 73 20 28 72 65 71 75 69 72 65 29 20 69 6e 74 65 72 61 63 74 69 76 65 6c 79 20 5b 3c 63 6f | ies.(require).interactively.[<co |
3b840 | 6d 6d 65 6e 74 3e 79 65 73 3c 2f 63 6f 6d 6d 65 6e 74 3e 5d 3f 20 27 3b 0a 24 72 65 71 75 69 72 | mment>yes</comment>]?.';.$requir |
3b860 | 65 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 72 65 71 75 69 72 65 27 29 | e.=.$input->getOption('require') |
3b880 | 3b 0a 24 72 65 71 75 69 72 65 6d 65 6e 74 73 20 3d 20 5b 5d 3b 0a 69 66 20 28 63 6f 75 6e 74 28 | ;.$requirements.=.[];.if.(count( |
3b8a0 | 24 72 65 71 75 69 72 65 29 20 3e 20 30 20 7c 7c 20 24 69 6f 2d 3e 61 73 6b 43 6f 6e 66 69 72 6d | $require).>.0.||.$io->askConfirm |
3b8c0 | 61 74 69 6f 6e 28 24 71 75 65 73 74 69 6f 6e 29 29 20 7b 0a 24 72 65 71 75 69 72 65 6d 65 6e 74 | ation($question)).{.$requirement |
3b8e0 | 73 20 3d 20 24 74 68 69 73 2d 3e 64 65 74 65 72 6d 69 6e 65 52 65 71 75 69 72 65 6d 65 6e 74 73 | s.=.$this->determineRequirements |
3b900 | 28 24 69 6e 70 75 74 2c 20 24 6f 75 74 70 75 74 2c 20 24 72 65 71 75 69 72 65 2c 20 24 70 6c 61 | ($input,.$output,.$require,.$pla |
3b920 | 74 66 6f 72 6d 52 65 70 6f 2c 20 24 70 72 65 66 65 72 72 65 64 53 74 61 62 69 6c 69 74 79 29 3b | tformRepo,.$preferredStability); |
3b940 | 0a 7d 0a 24 69 6e 70 75 74 2d 3e 73 65 74 4f 70 74 69 6f 6e 28 27 72 65 71 75 69 72 65 27 2c 20 | .}.$input->setOption('require',. |
3b960 | 24 72 65 71 75 69 72 65 6d 65 6e 74 73 29 3b 0a 0a 24 71 75 65 73 74 69 6f 6e 20 3d 20 27 57 6f | $requirements);..$question.=.'Wo |
3b980 | 75 6c 64 20 79 6f 75 20 6c 69 6b 65 20 74 6f 20 64 65 66 69 6e 65 20 79 6f 75 72 20 64 65 76 20 | uld.you.like.to.define.your.dev. |
3b9a0 | 64 65 70 65 6e 64 65 6e 63 69 65 73 20 28 72 65 71 75 69 72 65 2d 64 65 76 29 20 69 6e 74 65 72 | dependencies.(require-dev).inter |
3b9c0 | 61 63 74 69 76 65 6c 79 20 5b 3c 63 6f 6d 6d 65 6e 74 3e 79 65 73 3c 2f 63 6f 6d 6d 65 6e 74 3e | actively.[<comment>yes</comment> |
3b9e0 | 5d 3f 20 27 3b 0a 24 72 65 71 75 69 72 65 44 65 76 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f | ]?.';.$requireDev.=.$input->getO |
3ba00 | 70 74 69 6f 6e 28 27 72 65 71 75 69 72 65 2d 64 65 76 27 29 3b 0a 24 64 65 76 52 65 71 75 69 72 | ption('require-dev');.$devRequir |
3ba20 | 65 6d 65 6e 74 73 20 3d 20 5b 5d 3b 0a 69 66 20 28 63 6f 75 6e 74 28 24 72 65 71 75 69 72 65 44 | ements.=.[];.if.(count($requireD |
3ba40 | 65 76 29 20 3e 20 30 20 7c 7c 20 24 69 6f 2d 3e 61 73 6b 43 6f 6e 66 69 72 6d 61 74 69 6f 6e 28 | ev).>.0.||.$io->askConfirmation( |
3ba60 | 24 71 75 65 73 74 69 6f 6e 29 29 20 7b 0a 24 64 65 76 52 65 71 75 69 72 65 6d 65 6e 74 73 20 3d | $question)).{.$devRequirements.= |
3ba80 | 20 24 74 68 69 73 2d 3e 64 65 74 65 72 6d 69 6e 65 52 65 71 75 69 72 65 6d 65 6e 74 73 28 24 69 | .$this->determineRequirements($i |
3baa0 | 6e 70 75 74 2c 20 24 6f 75 74 70 75 74 2c 20 24 72 65 71 75 69 72 65 44 65 76 2c 20 24 70 6c 61 | nput,.$output,.$requireDev,.$pla |
3bac0 | 74 66 6f 72 6d 52 65 70 6f 2c 20 24 70 72 65 66 65 72 72 65 64 53 74 61 62 69 6c 69 74 79 29 3b | tformRepo,.$preferredStability); |
3bae0 | 0a 7d 0a 24 69 6e 70 75 74 2d 3e 73 65 74 4f 70 74 69 6f 6e 28 27 72 65 71 75 69 72 65 2d 64 65 | .}.$input->setOption('require-de |
3bb00 | 76 27 2c 20 24 64 65 76 52 65 71 75 69 72 65 6d 65 6e 74 73 29 3b 0a 0a 0a 24 61 75 74 6f 6c 6f | v',.$devRequirements);...$autolo |
3bb20 | 61 64 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 61 75 74 6f 6c 6f 61 64 | ad.=.$input->getOption('autoload |
3bb40 | 27 29 20 3f 3a 20 27 73 72 63 2f 27 3b 0a 24 6e 61 6d 65 73 70 61 63 65 20 3d 20 24 74 68 69 73 | ').?:.'src/';.$namespace.=.$this |
3bb60 | 2d 3e 6e 61 6d 65 73 70 61 63 65 46 72 6f 6d 50 61 63 6b 61 67 65 4e 61 6d 65 28 28 73 74 72 69 | ->namespaceFromPackageName((stri |
3bb80 | 6e 67 29 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6e 61 6d 65 27 29 29 3b 0a | ng).$input->getOption('name'));. |
3bba0 | 24 61 75 74 6f 6c 6f 61 64 20 3d 20 24 69 6f 2d 3e 61 73 6b 41 6e 64 56 61 6c 69 64 61 74 65 28 | $autoload.=.$io->askAndValidate( |
3bbc0 | 0a 27 41 64 64 20 50 53 52 2d 34 20 61 75 74 6f 6c 6f 61 64 20 6d 61 70 70 69 6e 67 3f 20 4d 61 | .'Add.PSR-4.autoload.mapping?.Ma |
3bbe0 | 70 73 20 6e 61 6d 65 73 70 61 63 65 20 22 27 2e 24 6e 61 6d 65 73 70 61 63 65 2e 27 22 20 74 6f | ps.namespace."'.$namespace.'".to |
3bc00 | 20 74 68 65 20 65 6e 74 65 72 65 64 20 72 65 6c 61 74 69 76 65 20 70 61 74 68 2e 20 5b 3c 63 6f | .the.entered.relative.path..[<co |
3bc20 | 6d 6d 65 6e 74 3e 27 2e 24 61 75 74 6f 6c 6f 61 64 2e 27 3c 2f 63 6f 6d 6d 65 6e 74 3e 2c 20 6e | mment>'.$autoload.'</comment>,.n |
3bc40 | 20 74 6f 20 73 6b 69 70 5d 3a 20 27 2c 0a 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 | .to.skip]:.',.static.function.($ |
3bc60 | 76 61 6c 75 65 29 20 75 73 65 20 28 24 61 75 74 6f 6c 6f 61 64 29 20 7b 0a 69 66 20 28 6e 75 6c | value).use.($autoload).{.if.(nul |
3bc80 | 6c 20 3d 3d 3d 20 24 76 61 6c 75 65 29 20 7b 0a 72 65 74 75 72 6e 20 24 61 75 74 6f 6c 6f 61 64 | l.===.$value).{.return.$autoload |
3bca0 | 3b 0a 7d 0a 0a 69 66 20 28 24 76 61 6c 75 65 20 3d 3d 3d 20 27 6e 27 20 7c 7c 20 24 76 61 6c 75 | ;.}..if.($value.===.'n'.||.$valu |
3bcc0 | 65 20 3d 3d 3d 20 27 6e 6f 27 29 20 7b 0a 72 65 74 75 72 6e 3b 0a 7d 0a 0a 24 76 61 6c 75 65 20 | e.===.'no').{.return;.}..$value. |
3bce0 | 3d 20 24 76 61 6c 75 65 20 3f 3a 20 24 61 75 74 6f 6c 6f 61 64 3b 0a 0a 69 66 20 28 21 50 72 65 | =.$value.?:.$autoload;..if.(!Pre |
3bd00 | 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b 5e 5b 5e 2f 5d 5b 41 2d 5a 61 2d 7a 30 2d 39 5c 2d 5f 2f | g::isMatch('{^[^/][A-Za-z0-9\-_/ |
3bd20 | 5d 2b 2f 24 7d 27 2c 20 24 76 61 6c 75 65 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e | ]+/$}',.$value)).{.throw.new.\In |
3bd40 | 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 73 70 72 69 6e 74 66 28 0a | validArgumentException(sprintf(. |
3bd60 | 27 54 68 65 20 73 72 63 20 66 6f 6c 64 65 72 20 6e 61 6d 65 20 22 25 73 22 20 69 73 20 69 6e 76 | 'The.src.folder.name."%s".is.inv |
3bd80 | 61 6c 69 64 2e 20 50 6c 65 61 73 65 20 61 64 64 20 61 20 72 65 6c 61 74 69 76 65 20 70 61 74 68 | alid..Please.add.a.relative.path |
3bda0 | 20 77 69 74 68 20 74 61 69 6c 69 6e 67 20 66 6f 72 77 61 72 64 20 73 6c 61 73 68 2e 20 5b 41 2d | .with.tailing.forward.slash..[A- |
3bdc0 | 5a 61 2d 7a 30 2d 39 5f 2d 2f 5d 2b 2f 27 2c 0a 24 76 61 6c 75 65 0a 29 29 3b 0a 7d 0a 0a 72 65 | Za-z0-9_-/]+/',.$value.));.}..re |
3bde0 | 74 75 72 6e 20 24 76 61 6c 75 65 3b 0a 7d 2c 0a 6e 75 6c 6c 2c 0a 24 61 75 74 6f 6c 6f 61 64 0a | turn.$value;.},.null,.$autoload. |
3be00 | 29 3b 0a 24 69 6e 70 75 74 2d 3e 73 65 74 4f 70 74 69 6f 6e 28 27 61 75 74 6f 6c 6f 61 64 27 2c | );.$input->setOption('autoload', |
3be20 | 20 24 61 75 74 6f 6c 6f 61 64 29 3b 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 | .$autoload);.}.....private.funct |
3be40 | 69 6f 6e 20 70 61 72 73 65 41 75 74 68 6f 72 53 74 72 69 6e 67 28 73 74 72 69 6e 67 20 24 61 75 | ion.parseAuthorString(string.$au |
3be60 | 74 68 6f 72 29 3a 20 61 72 72 61 79 0a 7b 0a 69 66 20 28 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 | thor):.array.{.if.(Preg::isMatch |
3be80 | 28 27 2f 5e 28 3f 50 3c 6e 61 6d 65 3e 5b 2d 20 2e 2c 5c 70 7b 4c 7d 5c 70 7b 4e 7d 5c 70 7b 4d | ('/^(?P<name>[-..,\p{L}\p{N}\p{M |
3bea0 | 6e 7d 5c 27 e2 80 99 22 28 29 5d 2b 29 28 3f 3a 5c 73 2b 3c 28 3f 50 3c 65 6d 61 69 6c 3e 2e 2b | n}\'..."()]+)(?:\s+<(?P<email>.+ |
3bec0 | 3f 29 3e 29 3f 24 2f 75 27 2c 20 24 61 75 74 68 6f 72 2c 20 24 6d 61 74 63 68 29 29 20 7b 0a 24 | ?)>)?$/u',.$author,.$match)).{.$ |
3bee0 | 68 61 73 45 6d 61 69 6c 20 3d 20 69 73 73 65 74 28 24 6d 61 74 63 68 5b 27 65 6d 61 69 6c 27 5d | hasEmail.=.isset($match['email'] |
3bf00 | 29 20 26 26 20 27 27 20 21 3d 3d 20 24 6d 61 74 63 68 5b 27 65 6d 61 69 6c 27 5d 3b 0a 69 66 20 | ).&&.''.!==.$match['email'];.if. |
3bf20 | 28 24 68 61 73 45 6d 61 69 6c 20 26 26 20 21 24 74 68 69 73 2d 3e 69 73 56 61 6c 69 64 45 6d 61 | ($hasEmail.&&.!$this->isValidEma |
3bf40 | 69 6c 28 24 6d 61 74 63 68 5b 27 65 6d 61 69 6c 27 5d 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 | il($match['email'])).{.throw.new |
3bf60 | 20 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 27 49 6e 76 61 | .\InvalidArgumentException('Inva |
3bf80 | 6c 69 64 20 65 6d 61 69 6c 20 22 27 2e 24 6d 61 74 63 68 5b 27 65 6d 61 69 6c 27 5d 2e 27 22 27 | lid.email."'.$match['email'].'"' |
3bfa0 | 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 5b 0a 27 6e 61 6d 65 27 20 3d 3e 20 74 72 69 6d 28 24 6d | );.}..return.[.'name'.=>.trim($m |
3bfc0 | 61 74 63 68 5b 27 6e 61 6d 65 27 5d 29 2c 0a 27 65 6d 61 69 6c 27 20 3d 3e 20 24 68 61 73 45 6d | atch['name']),.'email'.=>.$hasEm |
3bfe0 | 61 69 6c 20 3f 20 24 6d 61 74 63 68 5b 27 65 6d 61 69 6c 27 5d 20 3a 20 6e 75 6c 6c 2c 0a 5d 3b | ail.?.$match['email'].:.null,.]; |
3c000 | 0a 7d 0a 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 | .}..throw.new.\InvalidArgumentEx |
3c020 | 63 65 70 74 69 6f 6e 28 0a 27 49 6e 76 61 6c 69 64 20 61 75 74 68 6f 72 20 73 74 72 69 6e 67 2e | ception(.'Invalid.author.string. |
3c040 | 20 20 4d 75 73 74 20 62 65 20 69 6e 20 74 68 65 20 66 6f 72 6d 61 74 73 3a 20 27 2e 0a 27 4a 61 | ..Must.be.in.the.formats:.'..'Ja |
3c060 | 6e 65 20 44 6f 65 20 6f 72 20 4a 6f 68 6e 20 53 6d 69 74 68 20 3c 6a 6f 68 6e 40 65 78 61 6d 70 | ne.Doe.or.John.Smith.<john@examp |
3c080 | 6c 65 2e 63 6f 6d 3e 27 0a 29 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 | le.com>'.);.}.....protected.func |
3c0a0 | 74 69 6f 6e 20 66 6f 72 6d 61 74 41 75 74 68 6f 72 73 28 73 74 72 69 6e 67 20 24 61 75 74 68 6f | tion.formatAuthors(string.$autho |
3c0c0 | 72 29 3a 20 61 72 72 61 79 0a 7b 0a 24 61 75 74 68 6f 72 20 3d 20 24 74 68 69 73 2d 3e 70 61 72 | r):.array.{.$author.=.$this->par |
3c0e0 | 73 65 41 75 74 68 6f 72 53 74 72 69 6e 67 28 24 61 75 74 68 6f 72 29 3b 0a 69 66 20 28 6e 75 6c | seAuthorString($author);.if.(nul |
3c100 | 6c 20 3d 3d 3d 20 24 61 75 74 68 6f 72 5b 27 65 6d 61 69 6c 27 5d 29 20 7b 0a 75 6e 73 65 74 28 | l.===.$author['email']).{.unset( |
3c120 | 24 61 75 74 68 6f 72 5b 27 65 6d 61 69 6c 27 5d 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 5b 24 61 | $author['email']);.}..return.[$a |
3c140 | 75 74 68 6f 72 5d 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 | uthor];.}.......public.function. |
3c160 | 6e 61 6d 65 73 70 61 63 65 46 72 6f 6d 50 61 63 6b 61 67 65 4e 61 6d 65 28 73 74 72 69 6e 67 20 | namespaceFromPackageName(string. |
3c180 | 24 70 61 63 6b 61 67 65 4e 61 6d 65 29 3a 20 3f 73 74 72 69 6e 67 0a 7b 0a 69 66 20 28 21 24 70 | $packageName):.?string.{.if.(!$p |
3c1a0 | 61 63 6b 61 67 65 4e 61 6d 65 20 7c 7c 20 73 74 72 70 6f 73 28 24 70 61 63 6b 61 67 65 4e 61 6d | ackageName.||.strpos($packageNam |
3c1c0 | 65 2c 20 27 2f 27 29 20 3d 3d 3d 20 66 61 6c 73 65 29 20 7b 0a 72 65 74 75 72 6e 20 6e 75 6c 6c | e,.'/').===.false).{.return.null |
3c1e0 | 3b 0a 7d 0a 0a 24 6e 61 6d 65 73 70 61 63 65 20 3d 20 61 72 72 61 79 5f 6d 61 70 28 0a 73 74 61 | ;.}..$namespace.=.array_map(.sta |
3c200 | 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 70 61 72 74 29 3a 20 73 74 72 69 6e 67 20 7b 0a 24 | tic.function.($part):.string.{.$ |
3c220 | 70 61 72 74 20 3d 20 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 28 27 2f 5b 5e 61 2d 7a 30 2d 39 5d | part.=.Preg::replace('/[^a-z0-9] |
3c240 | 2f 69 27 2c 20 27 20 27 2c 20 24 70 61 72 74 29 3b 0a 24 70 61 72 74 20 3d 20 75 63 77 6f 72 64 | /i',.'.',.$part);.$part.=.ucword |
3c260 | 73 28 24 70 61 72 74 29 3b 0a 0a 72 65 74 75 72 6e 20 73 74 72 5f 72 65 70 6c 61 63 65 28 27 20 | s($part);..return.str_replace('. |
3c280 | 27 2c 20 27 27 2c 20 24 70 61 72 74 29 3b 0a 7d 2c 0a 65 78 70 6c 6f 64 65 28 27 2f 27 2c 20 24 | ',.'',.$part);.},.explode('/',.$ |
3c2a0 | 70 61 63 6b 61 67 65 4e 61 6d 65 29 0a 29 3b 0a 0a 72 65 74 75 72 6e 20 69 6d 70 6c 6f 64 65 28 | packageName).);..return.implode( |
3c2c0 | 27 5c 5c 27 2c 20 24 6e 61 6d 65 73 70 61 63 65 29 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 | '\\',.$namespace);.}.....protect |
3c2e0 | 65 64 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 47 69 74 43 6f 6e 66 69 67 28 29 3a 20 61 72 72 61 | ed.function.getGitConfig():.arra |
3c300 | 79 0a 7b 0a 69 66 20 28 6e 75 6c 6c 20 21 3d 3d 20 24 74 68 69 73 2d 3e 67 69 74 43 6f 6e 66 69 | y.{.if.(null.!==.$this->gitConfi |
3c320 | 67 29 20 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 67 69 74 43 6f 6e 66 69 67 3b 0a 7d 0a | g).{.return.$this->gitConfig;.}. |
3c340 | 0a 24 66 69 6e 64 65 72 20 3d 20 6e 65 77 20 45 78 65 63 75 74 61 62 6c 65 46 69 6e 64 65 72 28 | .$finder.=.new.ExecutableFinder( |
3c360 | 29 3b 0a 24 67 69 74 42 69 6e 20 3d 20 24 66 69 6e 64 65 72 2d 3e 66 69 6e 64 28 27 67 69 74 27 | );.$gitBin.=.$finder->find('git' |
3c380 | 29 3b 0a 0a 24 63 6d 64 20 3d 20 6e 65 77 20 50 72 6f 63 65 73 73 28 5b 24 67 69 74 42 69 6e 2c | );..$cmd.=.new.Process([$gitBin, |
3c3a0 | 20 27 63 6f 6e 66 69 67 27 2c 20 27 2d 6c 27 5d 29 3b 0a 24 63 6d 64 2d 3e 72 75 6e 28 29 3b 0a | .'config',.'-l']);.$cmd->run();. |
3c3c0 | 0a 69 66 20 28 24 63 6d 64 2d 3e 69 73 53 75 63 63 65 73 73 66 75 6c 28 29 29 20 7b 0a 24 74 68 | .if.($cmd->isSuccessful()).{.$th |
3c3e0 | 69 73 2d 3e 67 69 74 43 6f 6e 66 69 67 20 3d 20 5b 5d 3b 0a 50 72 65 67 3a 3a 6d 61 74 63 68 41 | is->gitConfig.=.[];.Preg::matchA |
3c400 | 6c 6c 28 27 7b 5e 28 5b 5e 3d 5d 2b 29 3d 28 2e 2a 29 24 7d 6d 27 2c 20 24 63 6d 64 2d 3e 67 65 | ll('{^([^=]+)=(.*)$}m',.$cmd->ge |
3c420 | 74 4f 75 74 70 75 74 28 29 2c 20 24 6d 61 74 63 68 65 73 29 3b 0a 66 6f 72 65 61 63 68 20 28 24 | tOutput(),.$matches);.foreach.($ |
3c440 | 6d 61 74 63 68 65 73 5b 31 5d 20 61 73 20 24 6b 65 79 20 3d 3e 20 24 6d 61 74 63 68 29 20 7b 0a | matches[1].as.$key.=>.$match).{. |
3c460 | 24 74 68 69 73 2d 3e 67 69 74 43 6f 6e 66 69 67 5b 24 6d 61 74 63 68 5d 20 3d 20 24 6d 61 74 63 | $this->gitConfig[$match].=.$matc |
3c480 | 68 65 73 5b 32 5d 5b 24 6b 65 79 5d 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 67 | hes[2][$key];.}..return.$this->g |
3c4a0 | 69 74 43 6f 6e 66 69 67 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 67 69 74 43 6f | itConfig;.}..return.$this->gitCo |
3c4c0 | 6e 66 69 67 20 3d 20 5b 5d 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 | nfig.=.[];.}.............protect |
3c4e0 | 65 64 20 66 75 6e 63 74 69 6f 6e 20 68 61 73 56 65 6e 64 6f 72 49 67 6e 6f 72 65 28 73 74 72 69 | ed.function.hasVendorIgnore(stri |
3c500 | 6e 67 20 24 69 67 6e 6f 72 65 46 69 6c 65 2c 20 73 74 72 69 6e 67 20 24 76 65 6e 64 6f 72 20 3d | ng.$ignoreFile,.string.$vendor.= |
3c520 | 20 27 76 65 6e 64 6f 72 27 29 3a 20 62 6f 6f 6c 0a 7b 0a 69 66 20 28 21 66 69 6c 65 5f 65 78 69 | .'vendor'):.bool.{.if.(!file_exi |
3c540 | 73 74 73 28 24 69 67 6e 6f 72 65 46 69 6c 65 29 29 20 7b 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 | sts($ignoreFile)).{.return.false |
3c560 | 3b 0a 7d 0a 0a 24 70 61 74 74 65 72 6e 20 3d 20 73 70 72 69 6e 74 66 28 27 7b 5e 2f 3f 25 73 28 | ;.}..$pattern.=.sprintf('{^/?%s( |
3c580 | 2f 5c 2a 3f 29 3f 24 7d 27 2c 20 70 72 65 67 5f 71 75 6f 74 65 28 24 76 65 6e 64 6f 72 29 29 3b | /\*?)?$}',.preg_quote($vendor)); |
3c5a0 | 0a 0a 24 6c 69 6e 65 73 20 3d 20 66 69 6c 65 28 24 69 67 6e 6f 72 65 46 69 6c 65 2c 20 46 49 4c | ..$lines.=.file($ignoreFile,.FIL |
3c5c0 | 45 5f 49 47 4e 4f 52 45 5f 4e 45 57 5f 4c 49 4e 45 53 29 3b 0a 66 6f 72 65 61 63 68 20 28 24 6c | E_IGNORE_NEW_LINES);.foreach.($l |
3c5e0 | 69 6e 65 73 20 61 73 20 24 6c 69 6e 65 29 20 7b 0a 69 66 20 28 50 72 65 67 3a 3a 69 73 4d 61 74 | ines.as.$line).{.if.(Preg::isMat |
3c600 | 63 68 28 24 70 61 74 74 65 72 6e 2c 20 24 6c 69 6e 65 29 29 20 7b 0a 72 65 74 75 72 6e 20 74 72 | ch($pattern,.$line)).{.return.tr |
3c620 | 75 65 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 70 72 6f 74 65 63 | ue;.}.}..return.false;.}..protec |
3c640 | 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 61 64 64 56 65 6e 64 6f 72 49 67 6e 6f 72 65 28 73 74 72 | ted.function.addVendorIgnore(str |
3c660 | 69 6e 67 20 24 69 67 6e 6f 72 65 46 69 6c 65 2c 20 73 74 72 69 6e 67 20 24 76 65 6e 64 6f 72 20 | ing.$ignoreFile,.string.$vendor. |
3c680 | 3d 20 27 2f 76 65 6e 64 6f 72 2f 27 29 3a 20 76 6f 69 64 0a 7b 0a 24 63 6f 6e 74 65 6e 74 73 20 | =.'/vendor/'):.void.{.$contents. |
3c6a0 | 3d 20 22 22 3b 0a 69 66 20 28 66 69 6c 65 5f 65 78 69 73 74 73 28 24 69 67 6e 6f 72 65 46 69 6c | =."";.if.(file_exists($ignoreFil |
3c6c0 | 65 29 29 20 7b 0a 24 63 6f 6e 74 65 6e 74 73 20 3d 20 66 69 6c 65 5f 67 65 74 5f 63 6f 6e 74 65 | e)).{.$contents.=.file_get_conte |
3c6e0 | 6e 74 73 28 24 69 67 6e 6f 72 65 46 69 6c 65 29 3b 0a 0a 69 66 20 28 73 74 72 70 6f 73 28 24 63 | nts($ignoreFile);..if.(strpos($c |
3c700 | 6f 6e 74 65 6e 74 73 2c 20 22 5c 6e 22 29 20 21 3d 3d 20 30 29 20 7b 0a 24 63 6f 6e 74 65 6e 74 | ontents,."\n").!==.0).{.$content |
3c720 | 73 20 2e 3d 20 22 5c 6e 22 3b 0a 7d 0a 7d 0a 0a 66 69 6c 65 5f 70 75 74 5f 63 6f 6e 74 65 6e 74 | s..=."\n";.}.}..file_put_content |
3c740 | 73 28 24 69 67 6e 6f 72 65 46 69 6c 65 2c 20 24 63 6f 6e 74 65 6e 74 73 20 2e 20 24 76 65 6e 64 | s($ignoreFile,.$contents...$vend |
3c760 | 6f 72 2e 20 22 5c 6e 22 29 3b 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e | or.."\n");.}..protected.function |
3c780 | 20 69 73 56 61 6c 69 64 45 6d 61 69 6c 28 73 74 72 69 6e 67 20 24 65 6d 61 69 6c 29 3a 20 62 6f | .isValidEmail(string.$email):.bo |
3c7a0 | 6f 6c 0a 7b 0a 0a 69 66 20 28 21 66 75 6e 63 74 69 6f 6e 5f 65 78 69 73 74 73 28 27 66 69 6c 74 | ol.{..if.(!function_exists('filt |
3c7c0 | 65 72 5f 76 61 72 27 29 29 20 7b 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 0a 72 65 74 75 | er_var')).{.return.true;.}..retu |
3c7e0 | 72 6e 20 66 61 6c 73 65 20 21 3d 3d 20 66 69 6c 74 65 72 5f 76 61 72 28 24 65 6d 61 69 6c 2c 20 | rn.false.!==.filter_var($email,. |
3c800 | 46 49 4c 54 45 52 5f 56 41 4c 49 44 41 54 45 5f 45 4d 41 49 4c 29 3b 0a 7d 0a 0a 70 72 69 76 61 | FILTER_VALIDATE_EMAIL);.}..priva |
3c820 | 74 65 20 66 75 6e 63 74 69 6f 6e 20 75 70 64 61 74 65 44 65 70 65 6e 64 65 6e 63 69 65 73 28 4f | te.function.updateDependencies(O |
3c840 | 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 6f 75 74 70 75 74 29 3a 20 76 6f 69 64 0a 7b 0a | utputInterface.$output):.void.{. |
3c860 | 74 72 79 20 7b 0a 24 75 70 64 61 74 65 43 6f 6d 6d 61 6e 64 20 3d 20 24 74 68 69 73 2d 3e 67 65 | try.{.$updateCommand.=.$this->ge |
3c880 | 74 41 70 70 6c 69 63 61 74 69 6f 6e 28 29 2d 3e 66 69 6e 64 28 27 75 70 64 61 74 65 27 29 3b 0a | tApplication()->find('update');. |
3c8a0 | 24 74 68 69 73 2d 3e 67 65 74 41 70 70 6c 69 63 61 74 69 6f 6e 28 29 2d 3e 72 65 73 65 74 43 6f | $this->getApplication()->resetCo |
3c8c0 | 6d 70 6f 73 65 72 28 29 3b 0a 24 75 70 64 61 74 65 43 6f 6d 6d 61 6e 64 2d 3e 72 75 6e 28 6e 65 | mposer();.$updateCommand->run(ne |
3c8e0 | 77 20 41 72 72 61 79 49 6e 70 75 74 28 5b 5d 29 2c 20 24 6f 75 74 70 75 74 29 3b 0a 7d 20 63 61 | w.ArrayInput([]),.$output);.}.ca |
3c900 | 74 63 68 20 28 5c 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 24 74 68 69 73 2d 3e 67 65 74 | tch.(\Exception.$e).{.$this->get |
3c920 | 49 4f 28 29 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 43 6f 75 6c 64 20 6e 6f 74 20 75 70 64 61 | IO()->writeError('Could.not.upda |
3c940 | 74 65 20 64 65 70 65 6e 64 65 6e 63 69 65 73 2e 20 52 75 6e 20 60 63 6f 6d 70 6f 73 65 72 20 75 | te.dependencies..Run.`composer.u |
3c960 | 70 64 61 74 65 60 20 74 6f 20 73 65 65 20 6d 6f 72 65 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 2e 27 | pdate`.to.see.more.information.' |
3c980 | 29 3b 0a 7d 0a 7d 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 72 75 6e 44 75 6d 70 | );.}.}..private.function.runDump |
3c9a0 | 41 75 74 6f 6c 6f 61 64 43 6f 6d 6d 61 6e 64 28 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 20 | AutoloadCommand(OutputInterface. |
3c9c0 | 24 6f 75 74 70 75 74 29 3a 20 76 6f 69 64 0a 7b 0a 74 72 79 20 7b 0a 24 63 6f 6d 6d 61 6e 64 20 | $output):.void.{.try.{.$command. |
3c9e0 | 3d 20 24 74 68 69 73 2d 3e 67 65 74 41 70 70 6c 69 63 61 74 69 6f 6e 28 29 2d 3e 66 69 6e 64 28 | =.$this->getApplication()->find( |
3ca00 | 27 64 75 6d 70 2d 61 75 74 6f 6c 6f 61 64 27 29 3b 0a 24 74 68 69 73 2d 3e 67 65 74 41 70 70 6c | 'dump-autoload');.$this->getAppl |
3ca20 | 69 63 61 74 69 6f 6e 28 29 2d 3e 72 65 73 65 74 43 6f 6d 70 6f 73 65 72 28 29 3b 0a 24 63 6f 6d | ication()->resetComposer();.$com |
3ca40 | 6d 61 6e 64 2d 3e 72 75 6e 28 6e 65 77 20 41 72 72 61 79 49 6e 70 75 74 28 5b 5d 29 2c 20 24 6f | mand->run(new.ArrayInput([]),.$o |
3ca60 | 75 74 70 75 74 29 3b 0a 7d 20 63 61 74 63 68 20 28 5c 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 | utput);.}.catch.(\Exception.$e). |
3ca80 | 7b 0a 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 43 6f | {.$this->getIO()->writeError('Co |
3caa0 | 75 6c 64 20 6e 6f 74 20 72 75 6e 20 64 75 6d 70 2d 61 75 74 6f 6c 6f 61 64 2e 27 29 3b 0a 7d 0a | uld.not.run.dump-autoload.');.}. |
3cac0 | 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 68 61 73 44 65 70 65 6e 64 | }.....private.function.hasDepend |
3cae0 | 65 6e 63 69 65 73 28 61 72 72 61 79 20 24 6f 70 74 69 6f 6e 73 29 3a 20 62 6f 6f 6c 0a 7b 0a 24 | encies(array.$options):.bool.{.$ |
3cb00 | 72 65 71 75 69 72 65 73 20 3d 20 28 61 72 72 61 79 29 20 24 6f 70 74 69 6f 6e 73 5b 27 72 65 71 | requires.=.(array).$options['req |
3cb20 | 75 69 72 65 27 5d 3b 0a 24 64 65 76 52 65 71 75 69 72 65 73 20 3d 20 69 73 73 65 74 28 24 6f 70 | uire'];.$devRequires.=.isset($op |
3cb40 | 74 69 6f 6e 73 5b 27 72 65 71 75 69 72 65 2d 64 65 76 27 5d 29 20 3f 20 28 61 72 72 61 79 29 20 | tions['require-dev']).?.(array). |
3cb60 | 24 6f 70 74 69 6f 6e 73 5b 27 72 65 71 75 69 72 65 2d 64 65 76 27 5d 20 3a 20 5b 5d 3b 0a 0a 72 | $options['require-dev'].:.[];..r |
3cb80 | 65 74 75 72 6e 20 21 65 6d 70 74 79 28 24 72 65 71 75 69 72 65 73 29 20 7c 7c 20 21 65 6d 70 74 | eturn.!empty($requires).||.!empt |
3cba0 | 79 28 24 64 65 76 52 65 71 75 69 72 65 73 29 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 | y($devRequires);.}.}.<?php.decla |
3cbc0 | 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e | re(strict_types=1);............n |
3cbe0 | 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6d 6d 61 6e 64 3b 0a 0a 75 73 65 20 | amespace.Composer\Command;..use. |
3cc00 | 43 6f 6d 70 6f 73 65 72 5c 49 6e 73 74 61 6c 6c 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 | Composer\Installer;.use.Composer |
3cc20 | 5c 50 6c 75 67 69 6e 5c 43 6f 6d 6d 61 6e 64 45 76 65 6e 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 | \Plugin\CommandEvent;.use.Compos |
3cc40 | 65 72 5c 50 6c 75 67 69 6e 5c 50 6c 75 67 69 6e 45 76 65 6e 74 73 3b 0a 75 73 65 20 43 6f 6d 70 | er\Plugin\PluginEvents;.use.Comp |
3cc60 | 6f 73 65 72 5c 41 64 76 69 73 6f 72 79 5c 41 75 64 69 74 6f 72 3b 0a 75 73 65 20 43 6f 6d 70 6f | oser\Advisory\Auditor;.use.Compo |
3cc80 | 73 65 72 5c 55 74 69 6c 5c 48 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 3b 0a 75 73 65 20 53 79 6d | ser\Util\HttpDownloader;.use.Sym |
3cca0 | 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 | fony\Component\Console\Input\Inp |
3ccc0 | 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 73 6f 6c | utInterface;.use.Composer\Consol |
3cce0 | 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 4f 70 74 69 6f 6e 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 | e\Input\InputOption;.use.Compose |
3cd00 | 72 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 3b 0a 75 | r\Console\Input\InputArgument;.u |
3cd20 | 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 4f 75 74 | se.Symfony\Component\Console\Out |
3cd40 | 70 75 74 5c 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 | put\OutputInterface;........clas |
3cd60 | 73 20 49 6e 73 74 61 6c 6c 43 6f 6d 6d 61 6e 64 20 65 78 74 65 6e 64 73 20 42 61 73 65 43 6f 6d | s.InstallCommand.extends.BaseCom |
3cd80 | 6d 61 6e 64 0a 7b 0a 75 73 65 20 43 6f 6d 70 6c 65 74 69 6f 6e 54 72 61 69 74 3b 0a 0a 0a 0a 0a | mand.{.use.CompletionTrait;..... |
3cda0 | 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 63 6f 6e 66 69 67 75 72 65 28 29 0a 7b | protected.function.configure().{ |
3cdc0 | 0a 24 74 68 69 73 0a 2d 3e 73 65 74 4e 61 6d 65 28 27 69 6e 73 74 61 6c 6c 27 29 0a 2d 3e 73 65 | .$this.->setName('install').->se |
3cde0 | 74 41 6c 69 61 73 65 73 28 5b 27 69 27 5d 29 0a 2d 3e 73 65 74 44 65 73 63 72 69 70 74 69 6f 6e | tAliases(['i']).->setDescription |
3ce00 | 28 27 49 6e 73 74 61 6c 6c 73 20 74 68 65 20 70 72 6f 6a 65 63 74 20 64 65 70 65 6e 64 65 6e 63 | ('Installs.the.project.dependenc |
3ce20 | 69 65 73 20 66 72 6f 6d 20 74 68 65 20 63 6f 6d 70 6f 73 65 72 2e 6c 6f 63 6b 20 66 69 6c 65 20 | ies.from.the.composer.lock.file. |
3ce40 | 69 66 20 70 72 65 73 65 6e 74 2c 20 6f 72 20 66 61 6c 6c 73 20 62 61 63 6b 20 6f 6e 20 74 68 65 | if.present,.or.falls.back.on.the |
3ce60 | 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 27 29 0a 2d 3e 73 65 74 44 65 66 69 6e 69 74 69 6f 6e | .composer.json').->setDefinition |
3ce80 | 28 5b 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 70 72 65 66 65 72 2d 73 6f 75 72 63 | ([.new.InputOption('prefer-sourc |
3cea0 | 65 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e | e',.null,.InputOption::VALUE_NON |
3cec0 | 45 2c 20 27 46 6f 72 63 65 73 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 66 72 6f 6d 20 70 61 63 | E,.'Forces.installation.from.pac |
3cee0 | 6b 61 67 65 20 73 6f 75 72 63 65 73 20 77 68 65 6e 20 70 6f 73 73 69 62 6c 65 2c 20 69 6e 63 6c | kage.sources.when.possible,.incl |
3cf00 | 75 64 69 6e 67 20 56 43 53 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 2e 27 29 2c 0a 6e 65 77 20 49 6e | uding.VCS.information.'),.new.In |
3cf20 | 70 75 74 4f 70 74 69 6f 6e 28 27 70 72 65 66 65 72 2d 64 69 73 74 27 2c 20 6e 75 6c 6c 2c 20 49 | putOption('prefer-dist',.null,.I |
3cf40 | 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 46 6f 72 63 65 73 20 | nputOption::VALUE_NONE,.'Forces. |
3cf60 | 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 66 72 6f 6d 20 70 61 63 6b 61 67 65 20 64 69 73 74 20 28 | installation.from.package.dist.( |
3cf80 | 64 65 66 61 75 6c 74 20 62 65 68 61 76 69 6f 72 29 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f | default.behavior).'),.new.InputO |
3cfa0 | 70 74 69 6f 6e 28 27 70 72 65 66 65 72 2d 69 6e 73 74 61 6c 6c 27 2c 20 6e 75 6c 6c 2c 20 49 6e | ption('prefer-install',.null,.In |
3cfc0 | 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 52 45 51 55 49 52 45 44 2c 20 27 46 6f 72 63 | putOption::VALUE_REQUIRED,.'Forc |
3cfe0 | 65 73 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 66 72 6f 6d 20 70 61 63 6b 61 67 65 20 64 69 73 | es.installation.from.package.dis |
3d000 | 74 7c 73 6f 75 72 63 65 7c 61 75 74 6f 20 28 61 75 74 6f 20 63 68 6f 6f 73 65 73 20 73 6f 75 72 | t|source|auto.(auto.chooses.sour |
3d020 | 63 65 20 66 6f 72 20 64 65 76 20 76 65 72 73 69 6f 6e 73 2c 20 64 69 73 74 20 66 6f 72 20 74 68 | ce.for.dev.versions,.dist.for.th |
3d040 | 65 20 72 65 73 74 29 2e 27 2c 20 6e 75 6c 6c 2c 20 24 74 68 69 73 2d 3e 73 75 67 67 65 73 74 50 | e.rest).',.null,.$this->suggestP |
3d060 | 72 65 66 65 72 49 6e 73 74 61 6c 6c 28 29 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e | referInstall()),.new.InputOption |
3d080 | 28 27 64 72 79 2d 72 75 6e 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 | ('dry-run',.null,.InputOption::V |
3d0a0 | 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 4f 75 74 70 75 74 73 20 74 68 65 20 6f 70 65 72 61 74 69 6f | ALUE_NONE,.'Outputs.the.operatio |
3d0c0 | 6e 73 20 62 75 74 20 77 69 6c 6c 20 6e 6f 74 20 65 78 65 63 75 74 65 20 61 6e 79 74 68 69 6e 67 | ns.but.will.not.execute.anything |
3d0e0 | 20 28 69 6d 70 6c 69 63 69 74 6c 79 20 65 6e 61 62 6c 65 73 20 2d 2d 76 65 72 62 6f 73 65 29 2e | .(implicitly.enables.--verbose). |
3d100 | 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 64 65 76 27 2c 20 6e 75 6c 6c 2c | '),.new.InputOption('dev',.null, |
3d120 | 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 44 45 50 52 45 | .InputOption::VALUE_NONE,.'DEPRE |
3d140 | 43 41 54 45 44 3a 20 45 6e 61 62 6c 65 73 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 6f 66 20 72 | CATED:.Enables.installation.of.r |
3d160 | 65 71 75 69 72 65 2d 64 65 76 20 70 61 63 6b 61 67 65 73 20 28 65 6e 61 62 6c 65 64 20 62 79 20 | equire-dev.packages.(enabled.by. |
3d180 | 64 65 66 61 75 6c 74 2c 20 6f 6e 6c 79 20 70 72 65 73 65 6e 74 20 66 6f 72 20 42 43 29 2e 27 29 | default,.only.present.for.BC).') |
3d1a0 | 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 73 75 67 67 65 73 74 27 2c 20 | ,.new.InputOption('no-suggest',. |
3d1c0 | 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 | null,.InputOption::VALUE_NONE,.' |
3d1e0 | 44 45 50 52 45 43 41 54 45 44 3a 20 54 68 69 73 20 66 6c 61 67 20 64 6f 65 73 20 6e 6f 74 20 65 | DEPRECATED:.This.flag.does.not.e |
3d200 | 78 69 73 74 20 61 6e 79 6d 6f 72 65 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e | xist.anymore.'),.new.InputOption |
3d220 | 28 27 6e 6f 2d 64 65 76 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 | ('no-dev',.null,.InputOption::VA |
3d240 | 4c 55 45 5f 4e 4f 4e 45 2c 20 27 44 69 73 61 62 6c 65 73 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e | LUE_NONE,.'Disables.installation |
3d260 | 20 6f 66 20 72 65 71 75 69 72 65 2d 64 65 76 20 70 61 63 6b 61 67 65 73 2e 27 29 2c 0a 6e 65 77 | .of.require-dev.packages.'),.new |
3d280 | 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 61 75 74 6f 6c 6f 61 64 65 72 27 2c 20 6e 75 | .InputOption('no-autoloader',.nu |
3d2a0 | 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 53 6b | ll,.InputOption::VALUE_NONE,.'Sk |
3d2c0 | 69 70 73 20 61 75 74 6f 6c 6f 61 64 65 72 20 67 65 6e 65 72 61 74 69 6f 6e 27 29 2c 0a 6e 65 77 | ips.autoloader.generation'),.new |
3d2e0 | 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 70 72 6f 67 72 65 73 73 27 2c 20 6e 75 6c 6c | .InputOption('no-progress',.null |
3d300 | 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 44 6f 20 6e | ,.InputOption::VALUE_NONE,.'Do.n |
3d320 | 6f 74 20 6f 75 74 70 75 74 20 64 6f 77 6e 6c 6f 61 64 20 70 72 6f 67 72 65 73 73 2e 27 29 2c 0a | ot.output.download.progress.'),. |
3d340 | 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 69 6e 73 74 61 6c 6c 27 2c 20 6e 75 | new.InputOption('no-install',.nu |
3d360 | 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 44 6f | ll,.InputOption::VALUE_NONE,.'Do |
3d380 | 20 6e 6f 74 20 75 73 65 2c 20 6f 6e 6c 79 20 64 65 66 69 6e 65 64 20 68 65 72 65 20 74 6f 20 63 | .not.use,.only.defined.here.to.c |
3d3a0 | 61 74 63 68 20 6d 69 73 75 73 65 20 6f 66 20 74 68 65 20 69 6e 73 74 61 6c 6c 20 63 6f 6d 6d 61 | atch.misuse.of.the.install.comma |
3d3c0 | 6e 64 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 61 75 64 69 74 27 2c 20 | nd.'),.new.InputOption('audit',. |
3d3e0 | 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 | null,.InputOption::VALUE_NONE,.' |
3d400 | 52 75 6e 20 61 6e 20 61 75 64 69 74 20 61 66 74 65 72 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 | Run.an.audit.after.installation. |
3d420 | 69 73 20 63 6f 6d 70 6c 65 74 65 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 | is.complete.'),.new.InputOption( |
3d440 | 27 61 75 64 69 74 2d 66 6f 72 6d 61 74 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f | 'audit-format',.null,.InputOptio |
3d460 | 6e 3a 3a 56 41 4c 55 45 5f 52 45 51 55 49 52 45 44 2c 20 27 41 75 64 69 74 20 6f 75 74 70 75 74 | n::VALUE_REQUIRED,.'Audit.output |
3d480 | 20 66 6f 72 6d 61 74 2e 20 4d 75 73 74 20 62 65 20 22 74 61 62 6c 65 22 2c 20 22 70 6c 61 69 6e | .format..Must.be."table",."plain |
3d4a0 | 22 2c 20 22 6a 73 6f 6e 22 2c 20 6f 72 20 22 73 75 6d 6d 61 72 79 22 2e 27 2c 20 41 75 64 69 74 | ",."json",.or."summary".',.Audit |
3d4c0 | 6f 72 3a 3a 46 4f 52 4d 41 54 5f 53 55 4d 4d 41 52 59 2c 20 41 75 64 69 74 6f 72 3a 3a 46 4f 52 | or::FORMAT_SUMMARY,.Auditor::FOR |
3d4e0 | 4d 41 54 53 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 76 65 72 62 6f 73 65 27 | MATS),.new.InputOption('verbose' |
3d500 | 2c 20 27 76 7c 76 76 7c 76 76 76 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 | ,.'v|vv|vvv',.InputOption::VALUE |
3d520 | 5f 4e 4f 4e 45 2c 20 27 53 68 6f 77 73 20 6d 6f 72 65 20 64 65 74 61 69 6c 73 20 69 6e 63 6c 75 | _NONE,.'Shows.more.details.inclu |
3d540 | 64 69 6e 67 20 6e 65 77 20 63 6f 6d 6d 69 74 73 20 70 75 6c 6c 65 64 20 69 6e 20 77 68 65 6e 20 | ding.new.commits.pulled.in.when. |
3d560 | 75 70 64 61 74 69 6e 67 20 70 61 63 6b 61 67 65 73 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f | updating.packages.'),.new.InputO |
3d580 | 70 74 69 6f 6e 28 27 6f 70 74 69 6d 69 7a 65 2d 61 75 74 6f 6c 6f 61 64 65 72 27 2c 20 27 6f 27 | ption('optimize-autoloader',.'o' |
3d5a0 | 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 4f 70 74 69 | ,.InputOption::VALUE_NONE,.'Opti |
3d5c0 | 6d 69 7a 65 20 61 75 74 6f 6c 6f 61 64 65 72 20 64 75 72 69 6e 67 20 61 75 74 6f 6c 6f 61 64 65 | mize.autoloader.during.autoloade |
3d5e0 | 72 20 64 75 6d 70 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 63 6c 61 73 73 | r.dump'),.new.InputOption('class |
3d600 | 6d 61 70 2d 61 75 74 68 6f 72 69 74 61 74 69 76 65 27 2c 20 27 61 27 2c 20 49 6e 70 75 74 4f 70 | map-authoritative',.'a',.InputOp |
3d620 | 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 41 75 74 6f 6c 6f 61 64 20 63 6c 61 73 | tion::VALUE_NONE,.'Autoload.clas |
3d640 | 73 65 73 20 66 72 6f 6d 20 74 68 65 20 63 6c 61 73 73 6d 61 70 20 6f 6e 6c 79 2e 20 49 6d 70 6c | ses.from.the.classmap.only..Impl |
3d660 | 69 63 69 74 6c 79 20 65 6e 61 62 6c 65 73 20 60 2d 2d 6f 70 74 69 6d 69 7a 65 2d 61 75 74 6f 6c | icitly.enables.`--optimize-autol |
3d680 | 6f 61 64 65 72 60 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 61 70 63 75 | oader`.'),.new.InputOption('apcu |
3d6a0 | 2d 61 75 74 6f 6c 6f 61 64 65 72 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a | -autoloader',.null,.InputOption: |
3d6c0 | 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 55 73 65 20 41 50 43 75 20 74 6f 20 63 61 63 68 65 20 | :VALUE_NONE,.'Use.APCu.to.cache. |
3d6e0 | 66 6f 75 6e 64 2f 6e 6f 74 2d 66 6f 75 6e 64 20 63 6c 61 73 73 65 73 2e 27 29 2c 0a 6e 65 77 20 | found/not-found.classes.'),.new. |
3d700 | 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 61 70 63 75 2d 61 75 74 6f 6c 6f 61 64 65 72 2d 70 72 65 | InputOption('apcu-autoloader-pre |
3d720 | 66 69 78 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 52 | fix',.null,.InputOption::VALUE_R |
3d740 | 45 51 55 49 52 45 44 2c 20 27 55 73 65 20 61 20 63 75 73 74 6f 6d 20 70 72 65 66 69 78 20 66 6f | EQUIRED,.'Use.a.custom.prefix.fo |
3d760 | 72 20 74 68 65 20 41 50 43 75 20 61 75 74 6f 6c 6f 61 64 65 72 20 63 61 63 68 65 2e 20 49 6d 70 | r.the.APCu.autoloader.cache..Imp |
3d780 | 6c 69 63 69 74 6c 79 20 65 6e 61 62 6c 65 73 20 2d 2d 61 70 63 75 2d 61 75 74 6f 6c 6f 61 64 65 | licitly.enables.--apcu-autoloade |
3d7a0 | 72 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 69 67 6e 6f 72 65 2d 70 6c 61 | r'),.new.InputOption('ignore-pla |
3d7c0 | 74 66 6f 72 6d 2d 72 65 71 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 | tform-req',.null,.InputOption::V |
3d7e0 | 41 4c 55 45 5f 52 45 51 55 49 52 45 44 20 7c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c | ALUE_REQUIRED.|.InputOption::VAL |
3d800 | 55 45 5f 49 53 5f 41 52 52 41 59 2c 20 27 49 67 6e 6f 72 65 20 61 20 73 70 65 63 69 66 69 63 20 | UE_IS_ARRAY,.'Ignore.a.specific. |
3d820 | 70 6c 61 74 66 6f 72 6d 20 72 65 71 75 69 72 65 6d 65 6e 74 20 28 70 68 70 20 26 20 65 78 74 2d | platform.requirement.(php.&.ext- |
3d840 | 20 70 61 63 6b 61 67 65 73 29 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 | .packages).'),.new.InputOption(' |
3d860 | 69 67 6e 6f 72 65 2d 70 6c 61 74 66 6f 72 6d 2d 72 65 71 73 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 | ignore-platform-reqs',.null,.Inp |
3d880 | 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 49 67 6e 6f 72 65 20 61 6c | utOption::VALUE_NONE,.'Ignore.al |
3d8a0 | 6c 20 70 6c 61 74 66 6f 72 6d 20 72 65 71 75 69 72 65 6d 65 6e 74 73 20 28 70 68 70 20 26 20 65 | l.platform.requirements.(php.&.e |
3d8c0 | 78 74 2d 20 70 61 63 6b 61 67 65 73 29 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 41 72 67 75 6d | xt-.packages).'),.new.InputArgum |
3d8e0 | 65 6e 74 28 27 70 61 63 6b 61 67 65 73 27 2c 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 3a 3a 49 | ent('packages',.InputArgument::I |
3d900 | 53 5f 41 52 52 41 59 20 7c 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 3a 3a 4f 50 54 49 4f 4e 41 | S_ARRAY.|.InputArgument::OPTIONA |
3d920 | 4c 2c 20 27 53 68 6f 75 6c 64 20 6e 6f 74 20 62 65 20 70 72 6f 76 69 64 65 64 2c 20 75 73 65 20 | L,.'Should.not.be.provided,.use. |
3d940 | 63 6f 6d 70 6f 73 65 72 20 72 65 71 75 69 72 65 20 69 6e 73 74 65 61 64 20 74 6f 20 61 64 64 20 | composer.require.instead.to.add. |
3d960 | 61 20 67 69 76 65 6e 20 70 61 63 6b 61 67 65 20 74 6f 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e | a.given.package.to.composer.json |
3d980 | 2e 27 29 2c 0a 5d 29 0a 2d 3e 73 65 74 48 65 6c 70 28 0a 3c 3c 3c 45 4f 54 0a 54 68 65 20 3c 69 | .'),.]).->setHelp(.<<<EOT.The.<i |
3d9a0 | 6e 66 6f 3e 69 6e 73 74 61 6c 6c 3c 2f 69 6e 66 6f 3e 20 63 6f 6d 6d 61 6e 64 20 72 65 61 64 73 | nfo>install</info>.command.reads |
3d9c0 | 20 74 68 65 20 63 6f 6d 70 6f 73 65 72 2e 6c 6f 63 6b 20 66 69 6c 65 20 66 72 6f 6d 0a 74 68 65 | .the.composer.lock.file.from.the |
3d9e0 | 20 63 75 72 72 65 6e 74 20 64 69 72 65 63 74 6f 72 79 2c 20 70 72 6f 63 65 73 73 65 73 20 69 74 | .current.directory,.processes.it |
3da00 | 2c 20 61 6e 64 20 64 6f 77 6e 6c 6f 61 64 73 20 61 6e 64 20 69 6e 73 74 61 6c 6c 73 20 61 6c 6c | ,.and.downloads.and.installs.all |
3da20 | 20 74 68 65 0a 6c 69 62 72 61 72 69 65 73 20 61 6e 64 20 64 65 70 65 6e 64 65 6e 63 69 65 73 20 | .the.libraries.and.dependencies. |
3da40 | 6f 75 74 6c 69 6e 65 64 20 69 6e 20 74 68 61 74 20 66 69 6c 65 2e 20 49 66 20 74 68 65 20 66 69 | outlined.in.that.file..If.the.fi |
3da60 | 6c 65 20 64 6f 65 73 20 6e 6f 74 0a 65 78 69 73 74 20 69 74 20 77 69 6c 6c 20 6c 6f 6f 6b 20 66 | le.does.not.exist.it.will.look.f |
3da80 | 6f 72 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 20 61 6e 64 20 64 6f 20 74 68 65 20 73 61 6d 65 | or.composer.json.and.do.the.same |
3daa0 | 2e 0a 0a 3c 69 6e 66 6f 3e 70 68 70 20 63 6f 6d 70 6f 73 65 72 2e 70 68 61 72 20 69 6e 73 74 61 | ...<info>php.composer.phar.insta |
3dac0 | 6c 6c 3c 2f 69 6e 66 6f 3e 0a 0a 52 65 61 64 20 6d 6f 72 65 20 61 74 20 68 74 74 70 73 3a 2f 2f | ll</info>..Read.more.at.https:// |
3dae0 | 67 65 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 67 2f 64 6f 63 2f 30 33 2d 63 6c 69 2e 6d 64 23 69 6e | getcomposer.org/doc/03-cli.md#in |
3db00 | 73 74 61 6c 6c 2d 69 0a 45 4f 54 0a 29 0a 3b 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e | stall-i.EOT.).;.}..protected.fun |
3db20 | 63 74 69 6f 6e 20 65 78 65 63 75 74 65 28 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 69 6e | ction.execute(InputInterface.$in |
3db40 | 70 75 74 2c 20 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 6f 75 74 70 75 74 29 0a 7b 0a | put,.OutputInterface.$output).{. |
3db60 | 24 69 6f 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 3b 0a 69 66 20 28 24 69 6e 70 75 74 | $io.=.$this->getIO();.if.($input |
3db80 | 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 64 65 76 27 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 | ->getOption('dev')).{.$io->write |
3dba0 | 45 72 72 6f 72 28 27 3c 77 61 72 6e 69 6e 67 3e 59 6f 75 20 61 72 65 20 75 73 69 6e 67 20 74 68 | Error('<warning>You.are.using.th |
3dbc0 | 65 20 64 65 70 72 65 63 61 74 65 64 20 6f 70 74 69 6f 6e 20 22 2d 2d 64 65 76 22 2e 20 49 74 20 | e.deprecated.option."--dev"..It. |
3dbe0 | 68 61 73 20 6e 6f 20 65 66 66 65 63 74 20 61 6e 64 20 77 69 6c 6c 20 62 72 65 61 6b 20 69 6e 20 | has.no.effect.and.will.break.in. |
3dc00 | 43 6f 6d 70 6f 73 65 72 20 33 2e 3c 2f 77 61 72 6e 69 6e 67 3e 27 29 3b 0a 7d 0a 69 66 20 28 24 | Composer.3.</warning>');.}.if.($ |
3dc20 | 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 73 75 67 67 65 73 74 27 29 29 20 | input->getOption('no-suggest')). |
3dc40 | 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 77 61 72 6e 69 6e 67 3e 59 6f 75 20 | {.$io->writeError('<warning>You. |
3dc60 | 61 72 65 20 75 73 69 6e 67 20 74 68 65 20 64 65 70 72 65 63 61 74 65 64 20 6f 70 74 69 6f 6e 20 | are.using.the.deprecated.option. |
3dc80 | 22 2d 2d 6e 6f 2d 73 75 67 67 65 73 74 22 2e 20 49 74 20 68 61 73 20 6e 6f 20 65 66 66 65 63 74 | "--no-suggest"..It.has.no.effect |
3dca0 | 20 61 6e 64 20 77 69 6c 6c 20 62 72 65 61 6b 20 69 6e 20 43 6f 6d 70 6f 73 65 72 20 33 2e 3c 2f | .and.will.break.in.Composer.3.</ |
3dcc0 | 77 61 72 6e 69 6e 67 3e 27 29 3b 0a 7d 0a 0a 24 61 72 67 73 20 3d 20 24 69 6e 70 75 74 2d 3e 67 | warning>');.}..$args.=.$input->g |
3dce0 | 65 74 41 72 67 75 6d 65 6e 74 28 27 70 61 63 6b 61 67 65 73 27 29 3b 0a 69 66 20 28 63 6f 75 6e | etArgument('packages');.if.(coun |
3dd00 | 74 28 24 61 72 67 73 29 20 3e 20 30 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 | t($args).>.0).{.$io->writeError( |
3dd20 | 27 3c 65 72 72 6f 72 3e 49 6e 76 61 6c 69 64 20 61 72 67 75 6d 65 6e 74 20 27 2e 69 6d 70 6c 6f | '<error>Invalid.argument.'.implo |
3dd40 | 64 65 28 27 20 27 2c 20 24 61 72 67 73 29 2e 27 2e 20 55 73 65 20 22 63 6f 6d 70 6f 73 65 72 20 | de('.',.$args).'..Use."composer. |
3dd60 | 72 65 71 75 69 72 65 20 27 2e 69 6d 70 6c 6f 64 65 28 27 20 27 2c 20 24 61 72 67 73 29 2e 27 22 | require.'.implode('.',.$args).'" |
3dd80 | 20 69 6e 73 74 65 61 64 20 74 6f 20 61 64 64 20 70 61 63 6b 61 67 65 73 20 74 6f 20 79 6f 75 72 | .instead.to.add.packages.to.your |
3dda0 | 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 2e 3c 2f 65 72 72 6f 72 3e 27 29 3b 0a 0a 72 65 74 75 | .composer.json.</error>');..retu |
3ddc0 | 72 6e 20 31 3b 0a 7d 0a 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 | rn.1;.}..if.($input->getOption(' |
3dde0 | 6e 6f 2d 69 6e 73 74 61 6c 6c 27 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 | no-install')).{.$io->writeError( |
3de00 | 27 3c 65 72 72 6f 72 3e 49 6e 76 61 6c 69 64 20 6f 70 74 69 6f 6e 20 22 2d 2d 6e 6f 2d 69 6e 73 | '<error>Invalid.option."--no-ins |
3de20 | 74 61 6c 6c 22 2e 20 55 73 65 20 22 63 6f 6d 70 6f 73 65 72 20 75 70 64 61 74 65 20 2d 2d 6e 6f | tall"..Use."composer.update.--no |
3de40 | 2d 69 6e 73 74 61 6c 6c 22 20 69 6e 73 74 65 61 64 20 69 66 20 79 6f 75 20 61 72 65 20 74 72 79 | -install".instead.if.you.are.try |
3de60 | 69 6e 67 20 74 6f 20 75 70 64 61 74 65 20 74 68 65 20 63 6f 6d 70 6f 73 65 72 2e 6c 6f 63 6b 20 | ing.to.update.the.composer.lock. |
3de80 | 66 69 6c 65 2e 3c 2f 65 72 72 6f 72 3e 27 29 3b 0a 0a 72 65 74 75 72 6e 20 31 3b 0a 7d 0a 0a 24 | file.</error>');..return.1;.}..$ |
3dea0 | 63 6f 6d 70 6f 73 65 72 20 3d 20 24 74 68 69 73 2d 3e 72 65 71 75 69 72 65 43 6f 6d 70 6f 73 65 | composer.=.$this->requireCompose |
3dec0 | 72 28 29 3b 0a 0a 69 66 20 28 21 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 4c 6f 63 6b 65 72 28 | r();..if.(!$composer->getLocker( |
3dee0 | 29 2d 3e 69 73 4c 6f 63 6b 65 64 28 29 20 26 26 20 21 48 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 | )->isLocked().&&.!HttpDownloader |
3df00 | 3a 3a 69 73 43 75 72 6c 45 6e 61 62 6c 65 64 28 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 | ::isCurlEnabled()).{.$io->writeE |
3df20 | 72 72 6f 72 28 27 3c 77 61 72 6e 69 6e 67 3e 43 6f 6d 70 6f 73 65 72 20 69 73 20 6f 70 65 72 61 | rror('<warning>Composer.is.opera |
3df40 | 74 69 6e 67 20 73 69 67 6e 69 66 69 63 61 6e 74 6c 79 20 73 6c 6f 77 65 72 20 74 68 61 6e 20 6e | ting.significantly.slower.than.n |
3df60 | 6f 72 6d 61 6c 20 62 65 63 61 75 73 65 20 79 6f 75 20 64 6f 20 6e 6f 74 20 68 61 76 65 20 74 68 | ormal.because.you.do.not.have.th |
3df80 | 65 20 50 48 50 20 63 75 72 6c 20 65 78 74 65 6e 73 69 6f 6e 20 65 6e 61 62 6c 65 64 2e 3c 2f 77 | e.PHP.curl.extension.enabled.</w |
3dfa0 | 61 72 6e 69 6e 67 3e 27 29 3b 0a 7d 0a 0a 24 63 6f 6d 6d 61 6e 64 45 76 65 6e 74 20 3d 20 6e 65 | arning>');.}..$commandEvent.=.ne |
3dfc0 | 77 20 43 6f 6d 6d 61 6e 64 45 76 65 6e 74 28 50 6c 75 67 69 6e 45 76 65 6e 74 73 3a 3a 43 4f 4d | w.CommandEvent(PluginEvents::COM |
3dfe0 | 4d 41 4e 44 2c 20 27 69 6e 73 74 61 6c 6c 27 2c 20 24 69 6e 70 75 74 2c 20 24 6f 75 74 70 75 74 | MAND,.'install',.$input,.$output |
3e000 | 29 3b 0a 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 | );.$composer->getEventDispatcher |
3e020 | 28 29 2d 3e 64 69 73 70 61 74 63 68 28 24 63 6f 6d 6d 61 6e 64 45 76 65 6e 74 2d 3e 67 65 74 4e | ()->dispatch($commandEvent->getN |
3e040 | 61 6d 65 28 29 2c 20 24 63 6f 6d 6d 61 6e 64 45 76 65 6e 74 29 3b 0a 0a 24 69 6e 73 74 61 6c 6c | ame(),.$commandEvent);..$install |
3e060 | 20 3d 20 49 6e 73 74 61 6c 6c 65 72 3a 3a 63 72 65 61 74 65 28 24 69 6f 2c 20 24 63 6f 6d 70 6f | .=.Installer::create($io,.$compo |
3e080 | 73 65 72 29 3b 0a 0a 24 63 6f 6e 66 69 67 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 43 | ser);..$config.=.$composer->getC |
3e0a0 | 6f 6e 66 69 67 28 29 3b 0a 5b 24 70 72 65 66 65 72 53 6f 75 72 63 65 2c 20 24 70 72 65 66 65 72 | onfig();.[$preferSource,.$prefer |
3e0c0 | 44 69 73 74 5d 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 50 72 65 66 65 72 72 65 64 49 6e 73 74 61 | Dist].=.$this->getPreferredInsta |
3e0e0 | 6c 6c 4f 70 74 69 6f 6e 73 28 24 63 6f 6e 66 69 67 2c 20 24 69 6e 70 75 74 29 3b 0a 0a 24 6f 70 | llOptions($config,.$input);..$op |
3e100 | 74 69 6d 69 7a 65 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6f 70 74 69 | timize.=.$input->getOption('opti |
3e120 | 6d 69 7a 65 2d 61 75 74 6f 6c 6f 61 64 65 72 27 29 20 7c 7c 20 24 63 6f 6e 66 69 67 2d 3e 67 65 | mize-autoloader').||.$config->ge |
3e140 | 74 28 27 6f 70 74 69 6d 69 7a 65 2d 61 75 74 6f 6c 6f 61 64 65 72 27 29 3b 0a 24 61 75 74 68 6f | t('optimize-autoloader');.$autho |
3e160 | 72 69 74 61 74 69 76 65 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 63 6c | ritative.=.$input->getOption('cl |
3e180 | 61 73 73 6d 61 70 2d 61 75 74 68 6f 72 69 74 61 74 69 76 65 27 29 20 7c 7c 20 24 63 6f 6e 66 69 | assmap-authoritative').||.$confi |
3e1a0 | 67 2d 3e 67 65 74 28 27 63 6c 61 73 73 6d 61 70 2d 61 75 74 68 6f 72 69 74 61 74 69 76 65 27 29 | g->get('classmap-authoritative') |
3e1c0 | 3b 0a 24 61 70 63 75 50 72 65 66 69 78 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f | ;.$apcuPrefix.=.$input->getOptio |
3e1e0 | 6e 28 27 61 70 63 75 2d 61 75 74 6f 6c 6f 61 64 65 72 2d 70 72 65 66 69 78 27 29 3b 0a 24 61 70 | n('apcu-autoloader-prefix');.$ap |
3e200 | 63 75 20 3d 20 24 61 70 63 75 50 72 65 66 69 78 20 21 3d 3d 20 6e 75 6c 6c 20 7c 7c 20 24 69 6e | cu.=.$apcuPrefix.!==.null.||.$in |
3e220 | 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 61 70 63 75 2d 61 75 74 6f 6c 6f 61 64 65 72 27 | put->getOption('apcu-autoloader' |
3e240 | 29 20 7c 7c 20 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 61 70 63 75 2d 61 75 74 6f 6c 6f 61 64 | ).||.$config->get('apcu-autoload |
3e260 | 65 72 27 29 3b 0a 0a 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 49 6e 73 74 61 6c 6c 61 74 69 6f | er');..$composer->getInstallatio |
3e280 | 6e 4d 61 6e 61 67 65 72 28 29 2d 3e 73 65 74 4f 75 74 70 75 74 50 72 6f 67 72 65 73 73 28 21 24 | nManager()->setOutputProgress(!$ |
3e2a0 | 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 70 72 6f 67 72 65 73 73 27 29 29 | input->getOption('no-progress')) |
3e2c0 | 3b 0a 0a 24 69 6e 73 74 61 6c 6c 0a 2d 3e 73 65 74 44 72 79 52 75 6e 28 24 69 6e 70 75 74 2d 3e | ;..$install.->setDryRun($input-> |
3e2e0 | 67 65 74 4f 70 74 69 6f 6e 28 27 64 72 79 2d 72 75 6e 27 29 29 0a 2d 3e 73 65 74 56 65 72 62 6f | getOption('dry-run')).->setVerbo |
3e300 | 73 65 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 76 65 72 62 6f 73 65 27 29 29 | se($input->getOption('verbose')) |
3e320 | 0a 2d 3e 73 65 74 50 72 65 66 65 72 53 6f 75 72 63 65 28 24 70 72 65 66 65 72 53 6f 75 72 63 65 | .->setPreferSource($preferSource |
3e340 | 29 0a 2d 3e 73 65 74 50 72 65 66 65 72 44 69 73 74 28 24 70 72 65 66 65 72 44 69 73 74 29 0a 2d | ).->setPreferDist($preferDist).- |
3e360 | 3e 73 65 74 44 65 76 4d 6f 64 65 28 21 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 | >setDevMode(!$input->getOption(' |
3e380 | 6e 6f 2d 64 65 76 27 29 29 0a 2d 3e 73 65 74 44 75 6d 70 41 75 74 6f 6c 6f 61 64 65 72 28 21 24 | no-dev')).->setDumpAutoloader(!$ |
3e3a0 | 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 61 75 74 6f 6c 6f 61 64 65 72 27 | input->getOption('no-autoloader' |
3e3c0 | 29 29 0a 2d 3e 73 65 74 4f 70 74 69 6d 69 7a 65 41 75 74 6f 6c 6f 61 64 65 72 28 24 6f 70 74 69 | )).->setOptimizeAutoloader($opti |
3e3e0 | 6d 69 7a 65 29 0a 2d 3e 73 65 74 43 6c 61 73 73 4d 61 70 41 75 74 68 6f 72 69 74 61 74 69 76 65 | mize).->setClassMapAuthoritative |
3e400 | 28 24 61 75 74 68 6f 72 69 74 61 74 69 76 65 29 0a 2d 3e 73 65 74 41 70 63 75 41 75 74 6f 6c 6f | ($authoritative).->setApcuAutolo |
3e420 | 61 64 65 72 28 24 61 70 63 75 2c 20 24 61 70 63 75 50 72 65 66 69 78 29 0a 2d 3e 73 65 74 50 6c | ader($apcu,.$apcuPrefix).->setPl |
3e440 | 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 28 24 74 68 69 73 2d 3e 67 | atformRequirementFilter($this->g |
3e460 | 65 74 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 28 24 69 6e 70 | etPlatformRequirementFilter($inp |
3e480 | 75 74 29 29 0a 2d 3e 73 65 74 41 75 64 69 74 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f | ut)).->setAudit($input->getOptio |
3e4a0 | 6e 28 27 61 75 64 69 74 27 29 29 0a 2d 3e 73 65 74 41 75 64 69 74 46 6f 72 6d 61 74 28 24 74 68 | n('audit')).->setAuditFormat($th |
3e4c0 | 69 73 2d 3e 67 65 74 41 75 64 69 74 46 6f 72 6d 61 74 28 24 69 6e 70 75 74 29 29 0a 3b 0a 0a 69 | is->getAuditFormat($input)).;..i |
3e4e0 | 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 70 6c 75 67 69 6e 73 | f.($input->getOption('no-plugins |
3e500 | 27 29 29 20 7b 0a 24 69 6e 73 74 61 6c 6c 2d 3e 64 69 73 61 62 6c 65 50 6c 75 67 69 6e 73 28 29 | ')).{.$install->disablePlugins() |
3e520 | 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 69 6e 73 74 61 6c 6c 2d 3e 72 75 6e 28 29 3b 0a 7d 0a 7d | ;.}..return.$install->run();.}.} |
3e540 | 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a | .<?php.declare(strict_types=1);. |
3e560 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f | ...........namespace.Composer\Co |
3e580 | 6d 6d 61 6e 64 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 | mmand;..use.Composer\Console\Inp |
3e5a0 | 75 74 5c 49 6e 70 75 74 4f 70 74 69 6f 6e 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 4a 73 6f | ut\InputOption;.use.Composer\Jso |
3e5c0 | 6e 5c 4a 73 6f 6e 46 69 6c 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 | n\JsonFile;.use.Composer\Package |
3e5e0 | 5c 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 | \CompletePackageInterface;.use.C |
3e600 | 6f 6d 70 6f 73 65 72 5c 50 6c 75 67 69 6e 5c 43 6f 6d 6d 61 6e 64 45 76 65 6e 74 3b 0a 75 73 65 | omposer\Plugin\CommandEvent;.use |
3e620 | 20 43 6f 6d 70 6f 73 65 72 5c 50 6c 75 67 69 6e 5c 50 6c 75 67 69 6e 45 76 65 6e 74 73 3b 0a 75 | .Composer\Plugin\PluginEvents;.u |
3e640 | 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 52 65 70 6f 73 69 74 6f 72 | se.Composer\Repository\Repositor |
3e660 | 79 55 74 69 6c 73 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 61 63 6b 61 67 | yUtils;.use.Composer\Util\Packag |
3e680 | 65 49 6e 66 6f 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 61 63 6b 61 67 65 | eInfo;.use.Composer\Util\Package |
3e6a0 | 53 6f 72 74 65 72 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f | Sorter;.use.Symfony\Component\Co |
3e6c0 | 6e 73 6f 6c 65 5c 46 6f 72 6d 61 74 74 65 72 5c 4f 75 74 70 75 74 46 6f 72 6d 61 74 74 65 72 3b | nsole\Formatter\OutputFormatter; |
3e6e0 | 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 48 | .use.Symfony\Component\Console\H |
3e700 | 65 6c 70 65 72 5c 54 61 62 6c 65 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 | elper\Table;.use.Symfony\Compone |
3e720 | 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 3b | nt\Console\Input\InputInterface; |
3e740 | 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 4f | .use.Symfony\Component\Console\O |
3e760 | 75 74 70 75 74 5c 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 53 79 6d 66 6f | utput\OutputInterface;.use.Symfo |
3e780 | 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 53 74 79 6c 65 5c 53 79 6d 66 6f | ny\Component\Console\Style\Symfo |
3e7a0 | 6e 79 53 74 79 6c 65 3b 0a 0a 0a 0a 0a 63 6c 61 73 73 20 4c 69 63 65 6e 73 65 73 43 6f 6d 6d 61 | nyStyle;.....class.LicensesComma |
3e7c0 | 6e 64 20 65 78 74 65 6e 64 73 20 42 61 73 65 43 6f 6d 6d 61 6e 64 0a 7b 0a 70 72 6f 74 65 63 74 | nd.extends.BaseCommand.{.protect |
3e7e0 | 65 64 20 66 75 6e 63 74 69 6f 6e 20 63 6f 6e 66 69 67 75 72 65 28 29 3a 20 76 6f 69 64 0a 7b 0a | ed.function.configure():.void.{. |
3e800 | 24 74 68 69 73 0a 2d 3e 73 65 74 4e 61 6d 65 28 27 6c 69 63 65 6e 73 65 73 27 29 0a 2d 3e 73 65 | $this.->setName('licenses').->se |
3e820 | 74 44 65 73 63 72 69 70 74 69 6f 6e 28 27 53 68 6f 77 73 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 | tDescription('Shows.information. |
3e840 | 61 62 6f 75 74 20 6c 69 63 65 6e 73 65 73 20 6f 66 20 64 65 70 65 6e 64 65 6e 63 69 65 73 27 29 | about.licenses.of.dependencies') |
3e860 | 0a 2d 3e 73 65 74 44 65 66 69 6e 69 74 69 6f 6e 28 5b 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 | .->setDefinition([.new.InputOpti |
3e880 | 6f 6e 28 27 66 6f 72 6d 61 74 27 2c 20 27 66 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 | on('format',.'f',.InputOption::V |
3e8a0 | 41 4c 55 45 5f 52 45 51 55 49 52 45 44 2c 20 27 46 6f 72 6d 61 74 20 6f 66 20 74 68 65 20 6f 75 | ALUE_REQUIRED,.'Format.of.the.ou |
3e8c0 | 74 70 75 74 3a 20 74 65 78 74 2c 20 6a 73 6f 6e 20 6f 72 20 73 75 6d 6d 61 72 79 27 2c 20 27 74 | tput:.text,.json.or.summary',.'t |
3e8e0 | 65 78 74 27 2c 20 5b 27 74 65 78 74 27 2c 20 27 6a 73 6f 6e 27 2c 20 27 73 75 6d 6d 61 72 79 27 | ext',.['text',.'json',.'summary' |
3e900 | 5d 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 64 65 76 27 2c 20 6e 75 | ]),.new.InputOption('no-dev',.nu |
3e920 | 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 44 69 | ll,.InputOption::VALUE_NONE,.'Di |
3e940 | 73 61 62 6c 65 73 20 73 65 61 72 63 68 20 69 6e 20 72 65 71 75 69 72 65 2d 64 65 76 20 70 61 63 | sables.search.in.require-dev.pac |
3e960 | 6b 61 67 65 73 2e 27 29 2c 0a 5d 29 0a 2d 3e 73 65 74 48 65 6c 70 28 0a 3c 3c 3c 45 4f 54 0a 54 | kages.'),.]).->setHelp(.<<<EOT.T |
3e980 | 68 65 20 6c 69 63 65 6e 73 65 20 63 6f 6d 6d 61 6e 64 20 64 69 73 70 6c 61 79 73 20 64 65 74 61 | he.license.command.displays.deta |
3e9a0 | 69 6c 65 64 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 61 62 6f 75 74 20 74 68 65 20 6c 69 63 65 6e | iled.information.about.the.licen |
3e9c0 | 73 65 73 20 6f 66 0a 74 68 65 20 69 6e 73 74 61 6c 6c 65 64 20 64 65 70 65 6e 64 65 6e 63 69 65 | ses.of.the.installed.dependencie |
3e9e0 | 73 2e 0a 0a 52 65 61 64 20 6d 6f 72 65 20 61 74 20 68 74 74 70 73 3a 2f 2f 67 65 74 63 6f 6d 70 | s...Read.more.at.https://getcomp |
3ea00 | 6f 73 65 72 2e 6f 72 67 2f 64 6f 63 2f 30 33 2d 63 6c 69 2e 6d 64 23 6c 69 63 65 6e 73 65 73 0a | oser.org/doc/03-cli.md#licenses. |
3ea20 | 45 4f 54 0a 29 0a 3b 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 65 78 | EOT.).;.}..protected.function.ex |
3ea40 | 65 63 75 74 65 28 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 69 6e 70 75 74 2c 20 4f 75 74 | ecute(InputInterface.$input,.Out |
3ea60 | 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 6f 75 74 70 75 74 29 3a 20 69 6e 74 0a 7b 0a 24 63 6f | putInterface.$output):.int.{.$co |
3ea80 | 6d 70 6f 73 65 72 20 3d 20 24 74 68 69 73 2d 3e 72 65 71 75 69 72 65 43 6f 6d 70 6f 73 65 72 28 | mposer.=.$this->requireComposer( |
3eaa0 | 29 3b 0a 0a 24 63 6f 6d 6d 61 6e 64 45 76 65 6e 74 20 3d 20 6e 65 77 20 43 6f 6d 6d 61 6e 64 45 | );..$commandEvent.=.new.CommandE |
3eac0 | 76 65 6e 74 28 50 6c 75 67 69 6e 45 76 65 6e 74 73 3a 3a 43 4f 4d 4d 41 4e 44 2c 20 27 6c 69 63 | vent(PluginEvents::COMMAND,.'lic |
3eae0 | 65 6e 73 65 73 27 2c 20 24 69 6e 70 75 74 2c 20 24 6f 75 74 70 75 74 29 3b 0a 24 63 6f 6d 70 6f | enses',.$input,.$output);.$compo |
3eb00 | 73 65 72 2d 3e 67 65 74 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 28 29 2d 3e 64 69 73 70 61 | ser->getEventDispatcher()->dispa |
3eb20 | 74 63 68 28 24 63 6f 6d 6d 61 6e 64 45 76 65 6e 74 2d 3e 67 65 74 4e 61 6d 65 28 29 2c 20 24 63 | tch($commandEvent->getName(),.$c |
3eb40 | 6f 6d 6d 61 6e 64 45 76 65 6e 74 29 3b 0a 0a 24 72 6f 6f 74 20 3d 20 24 63 6f 6d 70 6f 73 65 72 | ommandEvent);..$root.=.$composer |
3eb60 | 2d 3e 67 65 74 50 61 63 6b 61 67 65 28 29 3b 0a 24 72 65 70 6f 20 3d 20 24 63 6f 6d 70 6f 73 65 | ->getPackage();.$repo.=.$compose |
3eb80 | 72 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 79 4d 61 6e 61 67 65 72 28 29 2d 3e 67 65 74 4c 6f | r->getRepositoryManager()->getLo |
3eba0 | 63 61 6c 52 65 70 6f 73 69 74 6f 72 79 28 29 3b 0a 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 | calRepository();..if.($input->ge |
3ebc0 | 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 64 65 76 27 29 29 20 7b 0a 24 70 61 63 6b 61 67 65 73 20 3d | tOption('no-dev')).{.$packages.= |
3ebe0 | 20 52 65 70 6f 73 69 74 6f 72 79 55 74 69 6c 73 3a 3a 66 69 6c 74 65 72 52 65 71 75 69 72 65 64 | .RepositoryUtils::filterRequired |
3ec00 | 50 61 63 6b 61 67 65 73 28 24 72 65 70 6f 2d 3e 67 65 74 50 61 63 6b 61 67 65 73 28 29 2c 20 24 | Packages($repo->getPackages(),.$ |
3ec20 | 72 6f 6f 74 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 70 61 63 6b 61 67 65 73 20 3d 20 24 72 65 70 | root);.}.else.{.$packages.=.$rep |
3ec40 | 6f 2d 3e 67 65 74 50 61 63 6b 61 67 65 73 28 29 3b 0a 7d 0a 0a 24 70 61 63 6b 61 67 65 73 20 3d | o->getPackages();.}..$packages.= |
3ec60 | 20 50 61 63 6b 61 67 65 53 6f 72 74 65 72 3a 3a 73 6f 72 74 50 61 63 6b 61 67 65 73 41 6c 70 68 | .PackageSorter::sortPackagesAlph |
3ec80 | 61 62 65 74 69 63 61 6c 6c 79 28 24 70 61 63 6b 61 67 65 73 29 3b 0a 24 69 6f 20 3d 20 24 74 68 | abetically($packages);.$io.=.$th |
3eca0 | 69 73 2d 3e 67 65 74 49 4f 28 29 3b 0a 0a 73 77 69 74 63 68 20 28 24 66 6f 72 6d 61 74 20 3d 20 | is->getIO();..switch.($format.=. |
3ecc0 | 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 66 6f 72 6d 61 74 27 29 29 20 7b 0a 63 | $input->getOption('format')).{.c |
3ece0 | 61 73 65 20 27 74 65 78 74 27 3a 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 4e 61 6d 65 3a 20 3c 63 | ase.'text':.$io->write('Name:.<c |
3ed00 | 6f 6d 6d 65 6e 74 3e 27 2e 24 72 6f 6f 74 2d 3e 67 65 74 50 72 65 74 74 79 4e 61 6d 65 28 29 2e | omment>'.$root->getPrettyName(). |
3ed20 | 27 3c 2f 63 6f 6d 6d 65 6e 74 3e 27 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 56 65 72 73 69 | '</comment>');.$io->write('Versi |
3ed40 | 6f 6e 3a 20 3c 63 6f 6d 6d 65 6e 74 3e 27 2e 24 72 6f 6f 74 2d 3e 67 65 74 46 75 6c 6c 50 72 65 | on:.<comment>'.$root->getFullPre |
3ed60 | 74 74 79 56 65 72 73 69 6f 6e 28 29 2e 27 3c 2f 63 6f 6d 6d 65 6e 74 3e 27 29 3b 0a 24 69 6f 2d | ttyVersion().'</comment>');.$io- |
3ed80 | 3e 77 72 69 74 65 28 27 4c 69 63 65 6e 73 65 73 3a 20 3c 63 6f 6d 6d 65 6e 74 3e 27 2e 28 69 6d | >write('Licenses:.<comment>'.(im |
3eda0 | 70 6c 6f 64 65 28 27 2c 20 27 2c 20 24 72 6f 6f 74 2d 3e 67 65 74 4c 69 63 65 6e 73 65 28 29 29 | plode(',.',.$root->getLicense()) |
3edc0 | 20 3f 3a 20 27 6e 6f 6e 65 27 29 2e 27 3c 2f 63 6f 6d 6d 65 6e 74 3e 27 29 3b 0a 24 69 6f 2d 3e | .?:.'none').'</comment>');.$io-> |
3ede0 | 77 72 69 74 65 28 27 44 65 70 65 6e 64 65 6e 63 69 65 73 3a 27 29 3b 0a 24 69 6f 2d 3e 77 72 69 | write('Dependencies:');.$io->wri |
3ee00 | 74 65 28 27 27 29 3b 0a 0a 24 74 61 62 6c 65 20 3d 20 6e 65 77 20 54 61 62 6c 65 28 24 6f 75 74 | te('');..$table.=.new.Table($out |
3ee20 | 70 75 74 29 3b 0a 24 74 61 62 6c 65 2d 3e 73 65 74 53 74 79 6c 65 28 27 63 6f 6d 70 61 63 74 27 | put);.$table->setStyle('compact' |
3ee40 | 29 3b 0a 24 74 61 62 6c 65 2d 3e 73 65 74 48 65 61 64 65 72 73 28 5b 27 4e 61 6d 65 27 2c 20 27 | );.$table->setHeaders(['Name',.' |
3ee60 | 56 65 72 73 69 6f 6e 27 2c 20 27 4c 69 63 65 6e 73 65 73 27 5d 29 3b 0a 66 6f 72 65 61 63 68 20 | Version',.'Licenses']);.foreach. |
3ee80 | 28 24 70 61 63 6b 61 67 65 73 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 24 6c 69 6e 6b 20 | ($packages.as.$package).{.$link. |
3eea0 | 3d 20 50 61 63 6b 61 67 65 49 6e 66 6f 3a 3a 67 65 74 56 69 65 77 53 6f 75 72 63 65 4f 72 48 6f | =.PackageInfo::getViewSourceOrHo |
3eec0 | 6d 65 70 61 67 65 55 72 6c 28 24 70 61 63 6b 61 67 65 29 3b 0a 69 66 20 28 24 6c 69 6e 6b 20 21 | mepageUrl($package);.if.($link.! |
3eee0 | 3d 3d 20 6e 75 6c 6c 29 20 7b 0a 24 6e 61 6d 65 20 3d 20 27 3c 68 72 65 66 3d 27 2e 4f 75 74 70 | ==.null).{.$name.=.'<href='.Outp |
3ef00 | 75 74 46 6f 72 6d 61 74 74 65 72 3a 3a 65 73 63 61 70 65 28 24 6c 69 6e 6b 29 2e 27 3e 27 2e 24 | utFormatter::escape($link).'>'.$ |
3ef20 | 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 4e 61 6d 65 28 29 2e 27 3c 2f 3e 27 3b 0a | package->getPrettyName().'</>';. |
3ef40 | 7d 20 65 6c 73 65 20 7b 0a 24 6e 61 6d 65 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 | }.else.{.$name.=.$package->getPr |
3ef60 | 65 74 74 79 4e 61 6d 65 28 29 3b 0a 7d 0a 0a 24 74 61 62 6c 65 2d 3e 61 64 64 52 6f 77 28 5b 0a | ettyName();.}..$table->addRow([. |
3ef80 | 24 6e 61 6d 65 2c 0a 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 46 75 6c 6c 50 72 65 74 74 79 56 65 | $name,.$package->getFullPrettyVe |
3efa0 | 72 73 69 6f 6e 28 29 2c 0a 69 6d 70 6c 6f 64 65 28 27 2c 20 27 2c 20 24 70 61 63 6b 61 67 65 20 | rsion(),.implode(',.',.$package. |
3efc0 | 69 6e 73 74 61 6e 63 65 6f 66 20 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 49 6e 74 65 72 66 | instanceof.CompletePackageInterf |
3efe0 | 61 63 65 20 3f 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4c 69 63 65 6e 73 65 28 29 20 3a 20 5b | ace.?.$package->getLicense().:.[ |
3f000 | 5d 29 20 3f 3a 20 27 6e 6f 6e 65 27 2c 0a 5d 29 3b 0a 7d 0a 24 74 61 62 6c 65 2d 3e 72 65 6e 64 | ]).?:.'none',.]);.}.$table->rend |
3f020 | 65 72 28 29 3b 0a 62 72 65 61 6b 3b 0a 0a 63 61 73 65 20 27 6a 73 6f 6e 27 3a 0a 24 64 65 70 65 | er();.break;..case.'json':.$depe |
3f040 | 6e 64 65 6e 63 69 65 73 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 | ndencies.=.[];.foreach.($package |
3f060 | 73 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 24 64 65 70 65 6e 64 65 6e 63 69 65 73 5b 24 | s.as.$package).{.$dependencies[$ |
3f080 | 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 4e 61 6d 65 28 29 5d 20 3d 20 5b 0a 27 76 | package->getPrettyName()].=.[.'v |
3f0a0 | 65 72 73 69 6f 6e 27 20 3d 3e 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 46 75 6c 6c 50 72 65 74 | ersion'.=>.$package->getFullPret |
3f0c0 | 74 79 56 65 72 73 69 6f 6e 28 29 2c 0a 27 6c 69 63 65 6e 73 65 27 20 3d 3e 20 24 70 61 63 6b 61 | tyVersion(),.'license'.=>.$packa |
3f0e0 | 67 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 49 6e 74 | ge.instanceof.CompletePackageInt |
3f100 | 65 72 66 61 63 65 20 3f 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4c 69 63 65 6e 73 65 28 29 20 | erface.?.$package->getLicense(). |
3f120 | 3a 20 5b 5d 2c 0a 5d 3b 0a 7d 0a 0a 24 69 6f 2d 3e 77 72 69 74 65 28 4a 73 6f 6e 46 69 6c 65 3a | :.[],.];.}..$io->write(JsonFile: |
3f140 | 3a 65 6e 63 6f 64 65 28 5b 0a 27 6e 61 6d 65 27 20 3d 3e 20 24 72 6f 6f 74 2d 3e 67 65 74 50 72 | :encode([.'name'.=>.$root->getPr |
3f160 | 65 74 74 79 4e 61 6d 65 28 29 2c 0a 27 76 65 72 73 69 6f 6e 27 20 3d 3e 20 24 72 6f 6f 74 2d 3e | ettyName(),.'version'.=>.$root-> |
3f180 | 67 65 74 46 75 6c 6c 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 2c 0a 27 6c 69 63 65 6e 73 65 | getFullPrettyVersion(),.'license |
3f1a0 | 27 20 3d 3e 20 24 72 6f 6f 74 2d 3e 67 65 74 4c 69 63 65 6e 73 65 28 29 2c 0a 27 64 65 70 65 6e | '.=>.$root->getLicense(),.'depen |
3f1c0 | 64 65 6e 63 69 65 73 27 20 3d 3e 20 24 64 65 70 65 6e 64 65 6e 63 69 65 73 2c 0a 5d 29 29 3b 0a | dencies'.=>.$dependencies,.]));. |
3f1e0 | 62 72 65 61 6b 3b 0a 0a 63 61 73 65 20 27 73 75 6d 6d 61 72 79 27 3a 0a 24 75 73 65 64 4c 69 63 | break;..case.'summary':.$usedLic |
3f200 | 65 6e 73 65 73 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 73 20 61 | enses.=.[];.foreach.($packages.a |
3f220 | 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 24 6c 69 63 65 6e 73 65 73 20 3d 20 24 70 61 63 6b 61 | s.$package).{.$licenses.=.$packa |
3f240 | 67 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 49 6e 74 | ge.instanceof.CompletePackageInt |
3f260 | 65 72 66 61 63 65 20 3f 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4c 69 63 65 6e 73 65 28 29 20 | erface.?.$package->getLicense(). |
3f280 | 3a 20 5b 5d 3b 0a 69 66 20 28 63 6f 75 6e 74 28 24 6c 69 63 65 6e 73 65 73 29 20 3d 3d 3d 20 30 | :.[];.if.(count($licenses).===.0 |
3f2a0 | 29 20 7b 0a 24 6c 69 63 65 6e 73 65 73 5b 5d 20 3d 20 27 6e 6f 6e 65 27 3b 0a 7d 0a 66 6f 72 65 | ).{.$licenses[].=.'none';.}.fore |
3f2c0 | 61 63 68 20 28 24 6c 69 63 65 6e 73 65 73 20 61 73 20 24 6c 69 63 65 6e 73 65 4e 61 6d 65 29 20 | ach.($licenses.as.$licenseName). |
3f2e0 | 7b 0a 69 66 20 28 21 69 73 73 65 74 28 24 75 73 65 64 4c 69 63 65 6e 73 65 73 5b 24 6c 69 63 65 | {.if.(!isset($usedLicenses[$lice |
3f300 | 6e 73 65 4e 61 6d 65 5d 29 29 20 7b 0a 24 75 73 65 64 4c 69 63 65 6e 73 65 73 5b 24 6c 69 63 65 | nseName])).{.$usedLicenses[$lice |
3f320 | 6e 73 65 4e 61 6d 65 5d 20 3d 20 30 3b 0a 7d 0a 24 75 73 65 64 4c 69 63 65 6e 73 65 73 5b 24 6c | nseName].=.0;.}.$usedLicenses[$l |
3f340 | 69 63 65 6e 73 65 4e 61 6d 65 5d 2b 2b 3b 0a 7d 0a 7d 0a 0a 0a 61 72 73 6f 72 74 28 24 75 73 65 | icenseName]++;.}.}...arsort($use |
3f360 | 64 4c 69 63 65 6e 73 65 73 2c 20 53 4f 52 54 5f 4e 55 4d 45 52 49 43 29 3b 0a 0a 24 72 6f 77 73 | dLicenses,.SORT_NUMERIC);..$rows |
3f380 | 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 75 73 65 64 4c 69 63 65 6e 73 65 73 20 61 73 | .=.[];.foreach.($usedLicenses.as |
3f3a0 | 20 24 75 73 65 64 4c 69 63 65 6e 73 65 20 3d 3e 20 24 6e 75 6d 62 65 72 4f 66 44 65 70 65 6e 64 | .$usedLicense.=>.$numberOfDepend |
3f3c0 | 65 6e 63 69 65 73 29 20 7b 0a 24 72 6f 77 73 5b 5d 20 3d 20 5b 24 75 73 65 64 4c 69 63 65 6e 73 | encies).{.$rows[].=.[$usedLicens |
3f3e0 | 65 2c 20 24 6e 75 6d 62 65 72 4f 66 44 65 70 65 6e 64 65 6e 63 69 65 73 5d 3b 0a 7d 0a 0a 24 73 | e,.$numberOfDependencies];.}..$s |
3f400 | 79 6d 66 6f 6e 79 49 6f 20 3d 20 6e 65 77 20 53 79 6d 66 6f 6e 79 53 74 79 6c 65 28 24 69 6e 70 | ymfonyIo.=.new.SymfonyStyle($inp |
3f420 | 75 74 2c 20 24 6f 75 74 70 75 74 29 3b 0a 24 73 79 6d 66 6f 6e 79 49 6f 2d 3e 74 61 62 6c 65 28 | ut,.$output);.$symfonyIo->table( |
3f440 | 0a 5b 27 4c 69 63 65 6e 73 65 27 2c 20 27 4e 75 6d 62 65 72 20 6f 66 20 64 65 70 65 6e 64 65 6e | .['License',.'Number.of.dependen |
3f460 | 63 69 65 73 27 5d 2c 0a 24 72 6f 77 73 0a 29 3b 0a 62 72 65 61 6b 3b 0a 64 65 66 61 75 6c 74 3a | cies'],.$rows.);.break;.default: |
3f480 | 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 73 70 72 | .throw.new.\RuntimeException(spr |
3f4a0 | 69 6e 74 66 28 27 55 6e 73 75 70 70 6f 72 74 65 64 20 66 6f 72 6d 61 74 20 22 25 73 22 2e 20 20 | intf('Unsupported.format."%s"... |
3f4c0 | 53 65 65 20 68 65 6c 70 20 66 6f 72 20 73 75 70 70 6f 72 74 65 64 20 66 6f 72 6d 61 74 73 2e 27 | See.help.for.supported.formats.' |
3f4e0 | 2c 20 24 66 6f 72 6d 61 74 29 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 7d 0a 3c 3f | ,.$format));.}..return.0;.}.}.<? |
3f500 | 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a | php.declare(strict_types=1);.... |
3f520 | 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6d 6d 61 | ........namespace.Composer\Comma |
3f540 | 6e 64 3b 0a 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f | nd;..use.Symfony\Component\Conso |
3f560 | 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d | le\Input\InputInterface;.use.Com |
3f580 | 70 6f 73 65 72 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 41 72 67 75 6d 65 6e | poser\Console\Input\InputArgumen |
3f5a0 | 74 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 | t;.use.Symfony\Component\Console |
3f5c0 | 5c 49 6e 70 75 74 5c 41 72 72 61 79 49 6e 70 75 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c | \Input\ArrayInput;.use.Composer\ |
3f5e0 | 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 4f 70 74 69 6f 6e 3b 0a 75 73 65 20 53 | Console\Input\InputOption;.use.S |
3f600 | 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 4f 75 74 70 75 74 5c | ymfony\Component\Console\Output\ |
3f620 | 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 0a 0a 0a 0a 63 6c 61 73 73 20 4f 75 74 64 61 | OutputInterface;.....class.Outda |
3f640 | 74 65 64 43 6f 6d 6d 61 6e 64 20 65 78 74 65 6e 64 73 20 42 61 73 65 43 6f 6d 6d 61 6e 64 0a 7b | tedCommand.extends.BaseCommand.{ |
3f660 | 0a 75 73 65 20 43 6f 6d 70 6c 65 74 69 6f 6e 54 72 61 69 74 3b 0a 0a 70 72 6f 74 65 63 74 65 64 | .use.CompletionTrait;..protected |
3f680 | 20 66 75 6e 63 74 69 6f 6e 20 63 6f 6e 66 69 67 75 72 65 28 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 | .function.configure():.void.{.$t |
3f6a0 | 68 69 73 0a 2d 3e 73 65 74 4e 61 6d 65 28 27 6f 75 74 64 61 74 65 64 27 29 0a 2d 3e 73 65 74 44 | his.->setName('outdated').->setD |
3f6c0 | 65 73 63 72 69 70 74 69 6f 6e 28 27 53 68 6f 77 73 20 61 20 6c 69 73 74 20 6f 66 20 69 6e 73 74 | escription('Shows.a.list.of.inst |
3f6e0 | 61 6c 6c 65 64 20 70 61 63 6b 61 67 65 73 20 74 68 61 74 20 68 61 76 65 20 75 70 64 61 74 65 73 | alled.packages.that.have.updates |
3f700 | 20 61 76 61 69 6c 61 62 6c 65 2c 20 69 6e 63 6c 75 64 69 6e 67 20 74 68 65 69 72 20 6c 61 74 65 | .available,.including.their.late |
3f720 | 73 74 20 76 65 72 73 69 6f 6e 27 29 0a 2d 3e 73 65 74 44 65 66 69 6e 69 74 69 6f 6e 28 5b 0a 6e | st.version').->setDefinition([.n |
3f740 | 65 77 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 28 27 70 61 63 6b 61 67 65 27 2c 20 49 6e 70 75 | ew.InputArgument('package',.Inpu |
3f760 | 74 41 72 67 75 6d 65 6e 74 3a 3a 4f 50 54 49 4f 4e 41 4c 2c 20 27 50 61 63 6b 61 67 65 20 74 6f | tArgument::OPTIONAL,.'Package.to |
3f780 | 20 69 6e 73 70 65 63 74 2e 20 4f 72 20 61 20 6e 61 6d 65 20 69 6e 63 6c 75 64 69 6e 67 20 61 20 | .inspect..Or.a.name.including.a. |
3f7a0 | 77 69 6c 64 63 61 72 64 20 28 2a 29 20 74 6f 20 66 69 6c 74 65 72 20 6c 69 73 74 73 20 6f 66 20 | wildcard.(*).to.filter.lists.of. |
3f7c0 | 70 61 63 6b 61 67 65 73 20 69 6e 73 74 65 61 64 2e 27 2c 20 6e 75 6c 6c 2c 20 24 74 68 69 73 2d | packages.instead.',.null,.$this- |
3f7e0 | 3e 73 75 67 67 65 73 74 49 6e 73 74 61 6c 6c 65 64 50 61 63 6b 61 67 65 28 66 61 6c 73 65 29 29 | >suggestInstalledPackage(false)) |
3f800 | 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6f 75 74 64 61 74 65 64 27 2c 20 27 6f | ,.new.InputOption('outdated',.'o |
3f820 | 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 53 68 6f | ',.InputOption::VALUE_NONE,.'Sho |
3f840 | 77 20 6f 6e 6c 79 20 70 61 63 6b 61 67 65 73 20 74 68 61 74 20 61 72 65 20 6f 75 74 64 61 74 65 | w.only.packages.that.are.outdate |
3f860 | 64 20 28 74 68 69 73 20 69 73 20 74 68 65 20 64 65 66 61 75 6c 74 2c 20 62 75 74 20 70 72 65 73 | d.(this.is.the.default,.but.pres |
3f880 | 65 6e 74 20 68 65 72 65 20 66 6f 72 20 63 6f 6d 70 61 74 20 77 69 74 68 20 60 73 68 6f 77 60 27 | ent.here.for.compat.with.`show`' |
3f8a0 | 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 61 6c 6c 27 2c 20 27 61 27 2c 20 49 | ),.new.InputOption('all',.'a',.I |
3f8c0 | 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 53 68 6f 77 20 61 6c | nputOption::VALUE_NONE,.'Show.al |
3f8e0 | 6c 20 69 6e 73 74 61 6c 6c 65 64 20 70 61 63 6b 61 67 65 73 20 77 69 74 68 20 74 68 65 69 72 20 | l.installed.packages.with.their. |
3f900 | 6c 61 74 65 73 74 20 76 65 72 73 69 6f 6e 73 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 | latest.versions'),.new.InputOpti |
3f920 | 6f 6e 28 27 6c 6f 63 6b 65 64 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a | on('locked',.null,.InputOption:: |
3f940 | 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 53 68 6f 77 73 20 75 70 64 61 74 65 73 20 66 6f 72 20 70 | VALUE_NONE,.'Shows.updates.for.p |
3f960 | 61 63 6b 61 67 65 73 20 66 72 6f 6d 20 74 68 65 20 6c 6f 63 6b 20 66 69 6c 65 2c 20 72 65 67 61 | ackages.from.the.lock.file,.rega |
3f980 | 72 64 6c 65 73 73 20 6f 66 20 77 68 61 74 20 69 73 20 63 75 72 72 65 6e 74 6c 79 20 69 6e 20 76 | rdless.of.what.is.currently.in.v |
3f9a0 | 65 6e 64 6f 72 20 64 69 72 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 64 69 | endor.dir'),.new.InputOption('di |
3f9c0 | 72 65 63 74 27 2c 20 27 44 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e | rect',.'D',.InputOption::VALUE_N |
3f9e0 | 4f 4e 45 2c 20 27 53 68 6f 77 73 20 6f 6e 6c 79 20 70 61 63 6b 61 67 65 73 20 74 68 61 74 20 61 | ONE,.'Shows.only.packages.that.a |
3fa00 | 72 65 20 64 69 72 65 63 74 6c 79 20 72 65 71 75 69 72 65 64 20 62 79 20 74 68 65 20 72 6f 6f 74 | re.directly.required.by.the.root |
3fa20 | 20 70 61 63 6b 61 67 65 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 73 74 72 | .package'),.new.InputOption('str |
3fa40 | 69 63 74 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e | ict',.null,.InputOption::VALUE_N |
3fa60 | 4f 4e 45 2c 20 27 52 65 74 75 72 6e 20 61 20 6e 6f 6e 2d 7a 65 72 6f 20 65 78 69 74 20 63 6f 64 | ONE,.'Return.a.non-zero.exit.cod |
3fa80 | 65 20 77 68 65 6e 20 74 68 65 72 65 20 61 72 65 20 6f 75 74 64 61 74 65 64 20 70 61 63 6b 61 67 | e.when.there.are.outdated.packag |
3faa0 | 65 73 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6d 61 6a 6f 72 2d 6f 6e 6c | es'),.new.InputOption('major-onl |
3fac0 | 79 27 2c 20 27 4d 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 | y',.'M',.InputOption::VALUE_NONE |
3fae0 | 2c 20 27 53 68 6f 77 20 6f 6e 6c 79 20 70 61 63 6b 61 67 65 73 20 74 68 61 74 20 68 61 76 65 20 | ,.'Show.only.packages.that.have. |
3fb00 | 6d 61 6a 6f 72 20 53 65 6d 56 65 72 2d 63 6f 6d 70 61 74 69 62 6c 65 20 75 70 64 61 74 65 73 2e | major.SemVer-compatible.updates. |
3fb20 | 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6d 69 6e 6f 72 2d 6f 6e 6c 79 27 | '),.new.InputOption('minor-only' |
3fb40 | 2c 20 27 6d 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 | ,.'m',.InputOption::VALUE_NONE,. |
3fb60 | 27 53 68 6f 77 20 6f 6e 6c 79 20 70 61 63 6b 61 67 65 73 20 74 68 61 74 20 68 61 76 65 20 6d 69 | 'Show.only.packages.that.have.mi |
3fb80 | 6e 6f 72 20 53 65 6d 56 65 72 2d 63 6f 6d 70 61 74 69 62 6c 65 20 75 70 64 61 74 65 73 2e 27 29 | nor.SemVer-compatible.updates.') |
3fba0 | 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 70 61 74 63 68 2d 6f 6e 6c 79 27 2c 20 | ,.new.InputOption('patch-only',. |
3fbc0 | 27 70 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 53 | 'p',.InputOption::VALUE_NONE,.'S |
3fbe0 | 68 6f 77 20 6f 6e 6c 79 20 70 61 63 6b 61 67 65 73 20 74 68 61 74 20 68 61 76 65 20 70 61 74 63 | how.only.packages.that.have.patc |
3fc00 | 68 20 53 65 6d 56 65 72 2d 63 6f 6d 70 61 74 69 62 6c 65 20 75 70 64 61 74 65 73 2e 27 29 2c 0a | h.SemVer-compatible.updates.'),. |
3fc20 | 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 66 6f 72 6d 61 74 27 2c 20 27 66 27 2c 20 49 | new.InputOption('format',.'f',.I |
3fc40 | 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 52 45 51 55 49 52 45 44 2c 20 27 46 6f 72 | nputOption::VALUE_REQUIRED,.'For |
3fc60 | 6d 61 74 20 6f 66 20 74 68 65 20 6f 75 74 70 75 74 3a 20 74 65 78 74 20 6f 72 20 6a 73 6f 6e 27 | mat.of.the.output:.text.or.json' |
3fc80 | 2c 20 27 74 65 78 74 27 2c 20 5b 27 6a 73 6f 6e 27 2c 20 27 74 65 78 74 27 5d 29 2c 0a 6e 65 77 | ,.'text',.['json',.'text']),.new |
3fca0 | 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 69 67 6e 6f 72 65 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 | .InputOption('ignore',.null,.Inp |
3fcc0 | 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 52 45 51 55 49 52 45 44 20 7c 20 49 6e 70 75 74 | utOption::VALUE_REQUIRED.|.Input |
3fce0 | 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 49 53 5f 41 52 52 41 59 2c 20 27 49 67 6e 6f 72 65 20 | Option::VALUE_IS_ARRAY,.'Ignore. |
3fd00 | 73 70 65 63 69 66 69 65 64 20 70 61 63 6b 61 67 65 28 73 29 2e 20 55 73 65 20 69 74 20 69 66 20 | specified.package(s)..Use.it.if. |
3fd20 | 79 6f 75 20 64 6f 6e 5c 27 74 20 77 61 6e 74 20 74 6f 20 62 65 20 69 6e 66 6f 72 6d 65 64 20 61 | you.don\'t.want.to.be.informed.a |
3fd40 | 62 6f 75 74 20 6e 65 77 20 76 65 72 73 69 6f 6e 73 20 6f 66 20 73 6f 6d 65 20 70 61 63 6b 61 67 | bout.new.versions.of.some.packag |
3fd60 | 65 73 2e 27 2c 20 6e 75 6c 6c 2c 20 24 74 68 69 73 2d 3e 73 75 67 67 65 73 74 49 6e 73 74 61 6c | es.',.null,.$this->suggestInstal |
3fd80 | 6c 65 64 50 61 63 6b 61 67 65 28 66 61 6c 73 65 29 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 | ledPackage(false)),.new.InputOpt |
3fda0 | 69 6f 6e 28 27 6e 6f 2d 64 65 76 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a | ion('no-dev',.null,.InputOption: |
3fdc0 | 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 44 69 73 61 62 6c 65 73 20 73 65 61 72 63 68 20 69 6e | :VALUE_NONE,.'Disables.search.in |
3fde0 | 20 72 65 71 75 69 72 65 2d 64 65 76 20 70 61 63 6b 61 67 65 73 2e 27 29 2c 0a 6e 65 77 20 49 6e | .require-dev.packages.'),.new.In |
3fe00 | 70 75 74 4f 70 74 69 6f 6e 28 27 69 67 6e 6f 72 65 2d 70 6c 61 74 66 6f 72 6d 2d 72 65 71 27 2c | putOption('ignore-platform-req', |
3fe20 | 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 52 45 51 55 49 52 | .null,.InputOption::VALUE_REQUIR |
3fe40 | 45 44 20 7c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 49 53 5f 41 52 52 41 59 | ED.|.InputOption::VALUE_IS_ARRAY |
3fe60 | 2c 20 27 49 67 6e 6f 72 65 20 61 20 73 70 65 63 69 66 69 63 20 70 6c 61 74 66 6f 72 6d 20 72 65 | ,.'Ignore.a.specific.platform.re |
3fe80 | 71 75 69 72 65 6d 65 6e 74 20 28 70 68 70 20 26 20 65 78 74 2d 20 70 61 63 6b 61 67 65 73 29 2e | quirement.(php.&.ext-.packages). |
3fea0 | 20 55 73 65 20 77 69 74 68 20 74 68 65 20 2d 2d 6f 75 74 64 61 74 65 64 20 6f 70 74 69 6f 6e 27 | .Use.with.the.--outdated.option' |
3fec0 | 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 69 67 6e 6f 72 65 2d 70 6c 61 74 66 | ),.new.InputOption('ignore-platf |
3fee0 | 6f 72 6d 2d 72 65 71 73 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 | orm-reqs',.null,.InputOption::VA |
3ff00 | 4c 55 45 5f 4e 4f 4e 45 2c 20 27 49 67 6e 6f 72 65 20 61 6c 6c 20 70 6c 61 74 66 6f 72 6d 20 72 | LUE_NONE,.'Ignore.all.platform.r |
3ff20 | 65 71 75 69 72 65 6d 65 6e 74 73 20 28 70 68 70 20 26 20 65 78 74 2d 20 70 61 63 6b 61 67 65 73 | equirements.(php.&.ext-.packages |
3ff40 | 29 2e 20 55 73 65 20 77 69 74 68 20 74 68 65 20 2d 2d 6f 75 74 64 61 74 65 64 20 6f 70 74 69 6f | )..Use.with.the.--outdated.optio |
3ff60 | 6e 27 29 2c 0a 5d 29 0a 2d 3e 73 65 74 48 65 6c 70 28 0a 3c 3c 3c 45 4f 54 0a 54 68 65 20 6f 75 | n'),.]).->setHelp(.<<<EOT.The.ou |
3ff80 | 74 64 61 74 65 64 20 63 6f 6d 6d 61 6e 64 20 69 73 20 6a 75 73 74 20 61 20 70 72 6f 78 79 20 66 | tdated.command.is.just.a.proxy.f |
3ffa0 | 6f 72 20 60 63 6f 6d 70 6f 73 65 72 20 73 68 6f 77 20 2d 6c 60 0a 0a 54 68 65 20 63 6f 6c 6f 72 | or.`composer.show.-l`..The.color |
3ffc0 | 20 63 6f 64 69 6e 67 20 28 6f 72 20 73 69 67 6e 61 67 65 20 69 66 20 79 6f 75 20 68 61 76 65 20 | .coding.(or.signage.if.you.have. |
3ffe0 | 41 4e 53 49 20 63 6f 6c 6f 72 73 20 64 69 73 61 62 6c 65 64 29 20 66 6f 72 20 64 65 70 65 6e 64 | ANSI.colors.disabled).for.depend |
40000 | 65 6e 63 79 20 76 65 72 73 69 6f 6e 73 20 69 73 20 61 73 20 73 75 63 68 3a 0a 0a 2d 20 3c 69 6e | ency.versions.is.as.such:..-.<in |
40020 | 66 6f 3e 67 72 65 65 6e 3c 2f 69 6e 66 6f 3e 20 28 3d 29 3a 20 44 65 70 65 6e 64 65 6e 63 79 20 | fo>green</info>.(=):.Dependency. |
40040 | 69 73 20 69 6e 20 74 68 65 20 6c 61 74 65 73 74 20 76 65 72 73 69 6f 6e 20 61 6e 64 20 69 73 20 | is.in.the.latest.version.and.is. |
40060 | 75 70 20 74 6f 20 64 61 74 65 2e 0a 2d 20 3c 63 6f 6d 6d 65 6e 74 3e 79 65 6c 6c 6f 77 3c 2f 63 | up.to.date..-.<comment>yellow</c |
40080 | 6f 6d 6d 65 6e 74 3e 20 28 7e 29 3a 20 44 65 70 65 6e 64 65 6e 63 79 20 68 61 73 20 61 20 6e 65 | omment>.(~):.Dependency.has.a.ne |
400a0 | 77 20 76 65 72 73 69 6f 6e 20 61 76 61 69 6c 61 62 6c 65 20 74 68 61 74 20 69 6e 63 6c 75 64 65 | w.version.available.that.include |
400c0 | 73 20 62 61 63 6b 77 61 72 64 73 0a 20 20 63 6f 6d 70 61 74 69 62 69 6c 69 74 79 20 62 72 65 61 | s.backwards...compatibility.brea |
400e0 | 6b 73 20 61 63 63 6f 72 64 69 6e 67 20 74 6f 20 73 65 6d 76 65 72 2c 20 73 6f 20 75 70 67 72 61 | ks.according.to.semver,.so.upgra |
40100 | 64 65 20 77 68 65 6e 20 79 6f 75 20 63 61 6e 20 62 75 74 20 69 74 0a 20 20 6d 61 79 20 69 6e 76 | de.when.you.can.but.it...may.inv |
40120 | 6f 6c 76 65 20 77 6f 72 6b 2e 0a 2d 20 3c 68 69 67 68 6c 69 67 68 74 3e 72 65 64 3c 2f 68 69 67 | olve.work..-.<highlight>red</hig |
40140 | 68 6c 69 67 68 74 3e 20 28 21 29 3a 20 44 65 70 65 6e 64 65 6e 63 79 20 68 61 73 20 61 20 6e 65 | hlight>.(!):.Dependency.has.a.ne |
40160 | 77 20 76 65 72 73 69 6f 6e 20 74 68 61 74 20 69 73 20 73 65 6d 76 65 72 2d 63 6f 6d 70 61 74 69 | w.version.that.is.semver-compati |
40180 | 62 6c 65 20 61 6e 64 20 79 6f 75 20 73 68 6f 75 6c 64 20 75 70 67 72 61 64 65 20 69 74 2e 0a 0a | ble.and.you.should.upgrade.it... |
401a0 | 52 65 61 64 20 6d 6f 72 65 20 61 74 20 68 74 74 70 73 3a 2f 2f 67 65 74 63 6f 6d 70 6f 73 65 72 | Read.more.at.https://getcomposer |
401c0 | 2e 6f 72 67 2f 64 6f 63 2f 30 33 2d 63 6c 69 2e 6d 64 23 6f 75 74 64 61 74 65 64 0a 45 4f 54 0a | .org/doc/03-cli.md#outdated.EOT. |
401e0 | 29 0a 3b 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 65 78 65 63 75 74 | ).;.}..protected.function.execut |
40200 | 65 28 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 69 6e 70 75 74 2c 20 4f 75 74 70 75 74 49 | e(InputInterface.$input,.OutputI |
40220 | 6e 74 65 72 66 61 63 65 20 24 6f 75 74 70 75 74 29 3a 20 69 6e 74 0a 7b 0a 24 61 72 67 73 20 3d | nterface.$output):.int.{.$args.= |
40240 | 20 5b 0a 27 63 6f 6d 6d 61 6e 64 27 20 3d 3e 20 27 73 68 6f 77 27 2c 0a 27 2d 2d 6c 61 74 65 73 | .[.'command'.=>.'show',.'--lates |
40260 | 74 27 20 3d 3e 20 74 72 75 65 2c 0a 5d 3b 0a 69 66 20 28 21 24 69 6e 70 75 74 2d 3e 67 65 74 4f | t'.=>.true,.];.if.(!$input->getO |
40280 | 70 74 69 6f 6e 28 27 61 6c 6c 27 29 29 20 7b 0a 24 61 72 67 73 5b 27 2d 2d 6f 75 74 64 61 74 65 | ption('all')).{.$args['--outdate |
402a0 | 64 27 5d 20 3d 20 74 72 75 65 3b 0a 7d 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 | d'].=.true;.}.if.($input->getOpt |
402c0 | 69 6f 6e 28 27 64 69 72 65 63 74 27 29 29 20 7b 0a 24 61 72 67 73 5b 27 2d 2d 64 69 72 65 63 74 | ion('direct')).{.$args['--direct |
402e0 | 27 5d 20 3d 20 74 72 75 65 3b 0a 7d 0a 69 66 20 28 6e 75 6c 6c 20 21 3d 3d 20 24 69 6e 70 75 74 | '].=.true;.}.if.(null.!==.$input |
40300 | 2d 3e 67 65 74 41 72 67 75 6d 65 6e 74 28 27 70 61 63 6b 61 67 65 27 29 29 20 7b 0a 24 61 72 67 | ->getArgument('package')).{.$arg |
40320 | 73 5b 27 70 61 63 6b 61 67 65 27 5d 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 41 72 67 75 6d 65 | s['package'].=.$input->getArgume |
40340 | 6e 74 28 27 70 61 63 6b 61 67 65 27 29 3b 0a 7d 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 | nt('package');.}.if.($input->get |
40360 | 4f 70 74 69 6f 6e 28 27 73 74 72 69 63 74 27 29 29 20 7b 0a 24 61 72 67 73 5b 27 2d 2d 73 74 72 | Option('strict')).{.$args['--str |
40380 | 69 63 74 27 5d 20 3d 20 74 72 75 65 3b 0a 7d 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f | ict'].=.true;.}.if.($input->getO |
403a0 | 70 74 69 6f 6e 28 27 6d 61 6a 6f 72 2d 6f 6e 6c 79 27 29 29 20 7b 0a 24 61 72 67 73 5b 27 2d 2d | ption('major-only')).{.$args['-- |
403c0 | 6d 61 6a 6f 72 2d 6f 6e 6c 79 27 5d 20 3d 20 74 72 75 65 3b 0a 7d 0a 69 66 20 28 24 69 6e 70 75 | major-only'].=.true;.}.if.($inpu |
403e0 | 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6d 69 6e 6f 72 2d 6f 6e 6c 79 27 29 29 20 7b 0a 24 61 | t->getOption('minor-only')).{.$a |
40400 | 72 67 73 5b 27 2d 2d 6d 69 6e 6f 72 2d 6f 6e 6c 79 27 5d 20 3d 20 74 72 75 65 3b 0a 7d 0a 69 66 | rgs['--minor-only'].=.true;.}.if |
40420 | 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 70 61 74 63 68 2d 6f 6e 6c 79 27 | .($input->getOption('patch-only' |
40440 | 29 29 20 7b 0a 24 61 72 67 73 5b 27 2d 2d 70 61 74 63 68 2d 6f 6e 6c 79 27 5d 20 3d 20 74 72 75 | )).{.$args['--patch-only'].=.tru |
40460 | 65 3b 0a 7d 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6c 6f 63 6b | e;.}.if.($input->getOption('lock |
40480 | 65 64 27 29 29 20 7b 0a 24 61 72 67 73 5b 27 2d 2d 6c 6f 63 6b 65 64 27 5d 20 3d 20 74 72 75 65 | ed')).{.$args['--locked'].=.true |
404a0 | 3b 0a 7d 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 64 65 | ;.}.if.($input->getOption('no-de |
404c0 | 76 27 29 29 20 7b 0a 24 61 72 67 73 5b 27 2d 2d 6e 6f 2d 64 65 76 27 5d 20 3d 20 74 72 75 65 3b | v')).{.$args['--no-dev'].=.true; |
404e0 | 0a 7d 0a 24 61 72 67 73 5b 27 2d 2d 69 67 6e 6f 72 65 2d 70 6c 61 74 66 6f 72 6d 2d 72 65 71 27 | .}.$args['--ignore-platform-req' |
40500 | 5d 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 69 67 6e 6f 72 65 2d 70 6c | ].=.$input->getOption('ignore-pl |
40520 | 61 74 66 6f 72 6d 2d 72 65 71 27 29 3b 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 | atform-req');.if.($input->getOpt |
40540 | 69 6f 6e 28 27 69 67 6e 6f 72 65 2d 70 6c 61 74 66 6f 72 6d 2d 72 65 71 73 27 29 29 20 7b 0a 24 | ion('ignore-platform-reqs')).{.$ |
40560 | 61 72 67 73 5b 27 2d 2d 69 67 6e 6f 72 65 2d 70 6c 61 74 66 6f 72 6d 2d 72 65 71 73 27 5d 20 3d | args['--ignore-platform-reqs'].= |
40580 | 20 74 72 75 65 3b 0a 7d 0a 24 61 72 67 73 5b 27 2d 2d 66 6f 72 6d 61 74 27 5d 20 3d 20 24 69 6e | .true;.}.$args['--format'].=.$in |
405a0 | 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 66 6f 72 6d 61 74 27 29 3b 0a 24 61 72 67 73 5b | put->getOption('format');.$args[ |
405c0 | 27 2d 2d 69 67 6e 6f 72 65 27 5d 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 | '--ignore'].=.$input->getOption( |
405e0 | 27 69 67 6e 6f 72 65 27 29 3b 0a 0a 24 69 6e 70 75 74 20 3d 20 6e 65 77 20 41 72 72 61 79 49 6e | 'ignore');..$input.=.new.ArrayIn |
40600 | 70 75 74 28 24 61 72 67 73 29 3b 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 67 65 74 41 70 | put($args);..return.$this->getAp |
40620 | 70 6c 69 63 61 74 69 6f 6e 28 29 2d 3e 72 75 6e 28 24 69 6e 70 75 74 2c 20 24 6f 75 74 70 75 74 | plication()->run($input,.$output |
40640 | 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 50 72 6f 78 79 | );.}.....public.function.isProxy |
40660 | 43 6f 6d 6d 61 6e 64 28 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d | Command():.bool.{.return.true;.} |
40680 | 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 | .}.<?php.declare(strict_types=1) |
406a0 | 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c | ;............namespace.Composer\ |
406c0 | 43 6f 6d 6d 61 6e 64 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 46 61 63 74 6f 72 79 3b 0a | Command;..use.Composer\Factory;. |
406e0 | 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 46 69 6c 74 65 72 5c 50 6c 61 74 66 6f 72 6d 52 65 71 75 | use.Composer\Filter\PlatformRequ |
40700 | 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 5c 49 67 6e 6f 72 65 41 6c 6c 50 6c 61 74 66 6f 72 6d 52 | irementFilter\IgnoreAllPlatformR |
40720 | 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 46 | equirementFilter;.use.Composer\F |
40740 | 69 6c 74 65 72 5c 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 5c | ilter\PlatformRequirementFilter\ |
40760 | 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 46 61 63 74 6f 72 79 | PlatformRequirementFilterFactory |
40780 | 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 43 6f 6d 70 6c 65 74 65 50 | ;.use.Composer\Package\CompleteP |
407a0 | 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 | ackageInterface;.use.Composer\Pa |
407c0 | 63 6b 61 67 65 5c 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 | ckage\PackageInterface;.use.Comp |
407e0 | 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 56 65 72 73 69 6f 6e 5c 56 65 72 73 69 6f 6e 50 61 72 73 | oser\Package\Version\VersionPars |
40800 | 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 56 65 72 73 69 6f 6e | er;.use.Composer\Package\Version |
40820 | 5c 56 65 72 73 69 6f 6e 53 65 6c 65 63 74 6f 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 | \VersionSelector;.use.Composer\P |
40840 | 63 72 65 5c 50 72 65 67 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 | cre\Preg;.use.Composer\Repositor |
40860 | 79 5c 43 6f 6d 70 6f 73 69 74 65 52 65 70 6f 73 69 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f | y\CompositeRepository;.use.Compo |
40880 | 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 | ser\Repository\PlatformRepositor |
408a0 | 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 52 65 70 6f 73 | y;.use.Composer\Repository\Repos |
408c0 | 69 74 6f 72 79 46 61 63 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 | itoryFactory;.use.Composer\Repos |
408e0 | 69 74 6f 72 79 5c 52 65 70 6f 73 69 74 6f 72 79 53 65 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 | itory\RepositorySet;.use.Compose |
40900 | 72 5c 53 65 6d 76 65 72 5c 43 6f 6e 73 74 72 61 69 6e 74 5c 43 6f 6e 73 74 72 61 69 6e 74 3b 0a | r\Semver\Constraint\Constraint;. |
40920 | 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 46 69 6c 65 73 79 73 74 65 6d 3b 0a 75 73 | use.Composer\Util\Filesystem;.us |
40940 | 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 | e.Symfony\Component\Console\Inpu |
40960 | 74 5c 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f | t\InputInterface;.use.Symfony\Co |
40980 | 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 4f 75 74 70 75 74 5c 4f 75 74 70 75 74 49 6e 74 | mponent\Console\Output\OutputInt |
409a0 | 65 72 66 61 63 65 3b 0a 0a 0a 0a 0a 74 72 61 69 74 20 50 61 63 6b 61 67 65 44 69 73 63 6f 76 65 | erface;.....trait.PackageDiscove |
409c0 | 72 79 54 72 61 69 74 0a 7b 0a 0a 70 72 69 76 61 74 65 20 24 72 65 70 6f 73 3b 0a 0a 70 72 69 76 | ryTrait.{..private.$repos;..priv |
409e0 | 61 74 65 20 24 72 65 70 6f 73 69 74 6f 72 79 53 65 74 73 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 | ate.$repositorySets;..protected. |
40a00 | 66 75 6e 63 74 69 6f 6e 20 67 65 74 52 65 70 6f 73 28 29 3a 20 43 6f 6d 70 6f 73 69 74 65 52 65 | function.getRepos():.CompositeRe |
40a20 | 70 6f 73 69 74 6f 72 79 0a 7b 0a 69 66 20 28 6e 75 6c 6c 20 3d 3d 3d 20 24 74 68 69 73 2d 3e 72 | pository.{.if.(null.===.$this->r |
40a40 | 65 70 6f 73 29 20 7b 0a 24 74 68 69 73 2d 3e 72 65 70 6f 73 20 3d 20 6e 65 77 20 43 6f 6d 70 6f | epos).{.$this->repos.=.new.Compo |
40a60 | 73 69 74 65 52 65 70 6f 73 69 74 6f 72 79 28 61 72 72 61 79 5f 6d 65 72 67 65 28 0a 5b 6e 65 77 | siteRepository(array_merge(.[new |
40a80 | 20 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 5d 2c 0a 52 65 70 6f 73 69 74 6f 72 79 | .PlatformRepository],.Repository |
40aa0 | 46 61 63 74 6f 72 79 3a 3a 64 65 66 61 75 6c 74 52 65 70 6f 73 57 69 74 68 44 65 66 61 75 6c 74 | Factory::defaultReposWithDefault |
40ac0 | 4d 61 6e 61 67 65 72 28 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 29 0a 29 29 3b 0a 7d 0a 0a 72 | Manager($this->getIO()).));.}..r |
40ae0 | 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 72 65 70 6f 73 3b 0a 7d 0a 0a 70 72 69 76 61 74 65 20 66 | eturn.$this->repos;.}..private.f |
40b00 | 75 6e 63 74 69 6f 6e 20 67 65 74 52 65 70 6f 73 69 74 6f 72 79 53 65 74 28 49 6e 70 75 74 49 6e | unction.getRepositorySet(InputIn |
40b20 | 74 65 72 66 61 63 65 20 24 69 6e 70 75 74 2c 20 3f 73 74 72 69 6e 67 20 24 6d 69 6e 69 6d 75 6d | terface.$input,.?string.$minimum |
40b40 | 53 74 61 62 69 6c 69 74 79 20 3d 20 6e 75 6c 6c 29 3a 20 52 65 70 6f 73 69 74 6f 72 79 53 65 74 | Stability.=.null):.RepositorySet |
40b60 | 0a 7b 0a 24 6b 65 79 20 3d 20 24 6d 69 6e 69 6d 75 6d 53 74 61 62 69 6c 69 74 79 20 3f 3f 20 27 | .{.$key.=.$minimumStability.??.' |
40b80 | 64 65 66 61 75 6c 74 27 3b 0a 0a 69 66 20 28 21 69 73 73 65 74 28 24 74 68 69 73 2d 3e 72 65 70 | default';..if.(!isset($this->rep |
40ba0 | 6f 73 69 74 6f 72 79 53 65 74 73 5b 24 6b 65 79 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 72 65 70 | ositorySets[$key])).{.$this->rep |
40bc0 | 6f 73 69 74 6f 72 79 53 65 74 73 5b 24 6b 65 79 5d 20 3d 20 24 72 65 70 6f 73 69 74 6f 72 79 53 | ositorySets[$key].=.$repositoryS |
40be0 | 65 74 20 3d 20 6e 65 77 20 52 65 70 6f 73 69 74 6f 72 79 53 65 74 28 24 6d 69 6e 69 6d 75 6d 53 | et.=.new.RepositorySet($minimumS |
40c00 | 74 61 62 69 6c 69 74 79 20 3f 3f 20 24 74 68 69 73 2d 3e 67 65 74 4d 69 6e 69 6d 75 6d 53 74 61 | tability.??.$this->getMinimumSta |
40c20 | 62 69 6c 69 74 79 28 24 69 6e 70 75 74 29 29 3b 0a 24 72 65 70 6f 73 69 74 6f 72 79 53 65 74 2d | bility($input));.$repositorySet- |
40c40 | 3e 61 64 64 52 65 70 6f 73 69 74 6f 72 79 28 24 74 68 69 73 2d 3e 67 65 74 52 65 70 6f 73 28 29 | >addRepository($this->getRepos() |
40c60 | 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 72 65 70 6f 73 69 74 6f 72 79 53 65 | );.}..return.$this->repositorySe |
40c80 | 74 73 5b 24 6b 65 79 5d 3b 0a 7d 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 67 65 | ts[$key];.}..private.function.ge |
40ca0 | 74 4d 69 6e 69 6d 75 6d 53 74 61 62 69 6c 69 74 79 28 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 | tMinimumStability(InputInterface |
40cc0 | 20 24 69 6e 70 75 74 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 68 | .$input):.string.{.if.($input->h |
40ce0 | 61 73 4f 70 74 69 6f 6e 28 27 73 74 61 62 69 6c 69 74 79 27 29 29 20 7b 20 0a 72 65 74 75 72 6e | asOption('stability')).{..return |
40d00 | 20 56 65 72 73 69 6f 6e 50 61 72 73 65 72 3a 3a 6e 6f 72 6d 61 6c 69 7a 65 53 74 61 62 69 6c 69 | .VersionParser::normalizeStabili |
40d20 | 74 79 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 73 74 61 62 69 6c 69 74 79 27 | ty($input->getOption('stability' |
40d40 | 29 20 3f 3f 20 27 73 74 61 62 6c 65 27 29 3b 0a 7d 0a 0a 0a 24 66 69 6c 65 20 3d 20 46 61 63 74 | ).??.'stable');.}...$file.=.Fact |
40d60 | 6f 72 79 3a 3a 67 65 74 43 6f 6d 70 6f 73 65 72 46 69 6c 65 28 29 3b 0a 69 66 20 28 69 73 5f 66 | ory::getComposerFile();.if.(is_f |
40d80 | 69 6c 65 28 24 66 69 6c 65 29 20 26 26 20 46 69 6c 65 73 79 73 74 65 6d 3a 3a 69 73 52 65 61 64 | ile($file).&&.Filesystem::isRead |
40da0 | 61 62 6c 65 28 24 66 69 6c 65 29 20 26 26 20 69 73 5f 61 72 72 61 79 28 24 63 6f 6d 70 6f 73 65 | able($file).&&.is_array($compose |
40dc0 | 72 20 3d 20 6a 73 6f 6e 5f 64 65 63 6f 64 65 28 28 73 74 72 69 6e 67 29 20 66 69 6c 65 5f 67 65 | r.=.json_decode((string).file_ge |
40de0 | 74 5f 63 6f 6e 74 65 6e 74 73 28 24 66 69 6c 65 29 2c 20 74 72 75 65 29 29 29 20 7b 0a 69 66 20 | t_contents($file),.true))).{.if. |
40e00 | 28 21 65 6d 70 74 79 28 24 63 6f 6d 70 6f 73 65 72 5b 27 6d 69 6e 69 6d 75 6d 2d 73 74 61 62 69 | (!empty($composer['minimum-stabi |
40e20 | 6c 69 74 79 27 5d 29 29 20 7b 0a 72 65 74 75 72 6e 20 56 65 72 73 69 6f 6e 50 61 72 73 65 72 3a | lity'])).{.return.VersionParser: |
40e40 | 3a 6e 6f 72 6d 61 6c 69 7a 65 53 74 61 62 69 6c 69 74 79 28 24 63 6f 6d 70 6f 73 65 72 5b 27 6d | :normalizeStability($composer['m |
40e60 | 69 6e 69 6d 75 6d 2d 73 74 61 62 69 6c 69 74 79 27 5d 29 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e | inimum-stability']);.}.}..return |
40e80 | 20 27 73 74 61 62 6c 65 27 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 66 69 6e 61 6c 20 70 72 6f 74 65 63 | .'stable';.}........final.protec |
40ea0 | 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 64 65 74 65 72 6d 69 6e 65 52 65 71 75 69 72 65 6d 65 6e | ted.function.determineRequiremen |
40ec0 | 74 73 28 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 69 6e 70 75 74 2c 20 4f 75 74 70 75 74 | ts(InputInterface.$input,.Output |
40ee0 | 49 6e 74 65 72 66 61 63 65 20 24 6f 75 74 70 75 74 2c 20 61 72 72 61 79 20 24 72 65 71 75 69 72 | Interface.$output,.array.$requir |
40f00 | 65 73 20 3d 20 5b 5d 2c 20 3f 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 20 24 70 6c | es.=.[],.?PlatformRepository.$pl |
40f20 | 61 74 66 6f 72 6d 52 65 70 6f 20 3d 20 6e 75 6c 6c 2c 20 73 74 72 69 6e 67 20 24 70 72 65 66 65 | atformRepo.=.null,.string.$prefe |
40f40 | 72 72 65 64 53 74 61 62 69 6c 69 74 79 20 3d 20 27 73 74 61 62 6c 65 27 2c 20 62 6f 6f 6c 20 24 | rredStability.=.'stable',.bool.$ |
40f60 | 63 68 65 63 6b 50 72 6f 76 69 64 65 64 56 65 72 73 69 6f 6e 73 20 3d 20 74 72 75 65 2c 20 62 6f | checkProvidedVersions.=.true,.bo |
40f80 | 6f 6c 20 24 66 69 78 65 64 20 3d 20 66 61 6c 73 65 29 3a 20 61 72 72 61 79 0a 7b 0a 69 66 20 28 | ol.$fixed.=.false):.array.{.if.( |
40fa0 | 63 6f 75 6e 74 28 24 72 65 71 75 69 72 65 73 29 20 3e 20 30 29 20 7b 0a 24 72 65 71 75 69 72 65 | count($requires).>.0).{.$require |
40fc0 | 73 20 3d 20 24 74 68 69 73 2d 3e 6e 6f 72 6d 61 6c 69 7a 65 52 65 71 75 69 72 65 6d 65 6e 74 73 | s.=.$this->normalizeRequirements |
40fe0 | 28 24 72 65 71 75 69 72 65 73 29 3b 0a 24 72 65 73 75 6c 74 20 3d 20 5b 5d 3b 0a 24 69 6f 20 3d | ($requires);.$result.=.[];.$io.= |
41000 | 20 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 72 65 71 75 | .$this->getIO();..foreach.($requ |
41020 | 69 72 65 73 20 61 73 20 24 72 65 71 75 69 72 65 6d 65 6e 74 29 20 7b 0a 69 66 20 28 69 73 73 65 | ires.as.$requirement).{.if.(isse |
41040 | 74 28 24 72 65 71 75 69 72 65 6d 65 6e 74 5b 27 76 65 72 73 69 6f 6e 27 5d 29 20 26 26 20 50 72 | t($requirement['version']).&&.Pr |
41060 | 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b 5e 5c 64 2b 28 5c 2e 5c 64 2b 29 3f 24 7d 27 2c 20 24 | eg::isMatch('{^\d+(\.\d+)?$}',.$ |
41080 | 72 65 71 75 69 72 65 6d 65 6e 74 5b 27 76 65 72 73 69 6f 6e 27 5d 29 29 20 7b 0a 24 69 6f 2d 3e | requirement['version'])).{.$io-> |
410a0 | 77 72 69 74 65 45 72 72 6f 72 28 27 3c 77 61 72 6e 69 6e 67 3e 54 68 65 20 22 27 2e 24 72 65 71 | writeError('<warning>The."'.$req |
410c0 | 75 69 72 65 6d 65 6e 74 5b 27 76 65 72 73 69 6f 6e 27 5d 2e 27 22 20 63 6f 6e 73 74 72 61 69 6e | uirement['version'].'".constrain |
410e0 | 74 20 66 6f 72 20 22 27 2e 24 72 65 71 75 69 72 65 6d 65 6e 74 5b 27 6e 61 6d 65 27 5d 2e 27 22 | t.for."'.$requirement['name'].'" |
41100 | 20 61 70 70 65 61 72 73 20 74 6f 6f 20 73 74 72 69 63 74 20 61 6e 64 20 77 69 6c 6c 20 6c 69 6b | .appears.too.strict.and.will.lik |
41120 | 65 6c 79 20 6e 6f 74 20 6d 61 74 63 68 20 77 68 61 74 20 79 6f 75 20 77 61 6e 74 2e 20 53 65 65 | ely.not.match.what.you.want..See |
41140 | 20 68 74 74 70 73 3a 2f 2f 67 65 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 67 2f 63 6f 6e 73 74 72 61 | .https://getcomposer.org/constra |
41160 | 69 6e 74 73 27 29 3b 0a 7d 0a 0a 69 66 20 28 21 69 73 73 65 74 28 24 72 65 71 75 69 72 65 6d 65 | ints');.}..if.(!isset($requireme |
41180 | 6e 74 5b 27 76 65 72 73 69 6f 6e 27 5d 29 29 20 7b 0a 0a 5b 24 6e 61 6d 65 2c 20 24 76 65 72 73 | nt['version'])).{..[$name,.$vers |
411a0 | 69 6f 6e 5d 20 3d 20 24 74 68 69 73 2d 3e 66 69 6e 64 42 65 73 74 56 65 72 73 69 6f 6e 41 6e 64 | ion].=.$this->findBestVersionAnd |
411c0 | 4e 61 6d 65 46 6f 72 50 61 63 6b 61 67 65 28 24 69 6e 70 75 74 2c 20 24 72 65 71 75 69 72 65 6d | NameForPackage($input,.$requirem |
411e0 | 65 6e 74 5b 27 6e 61 6d 65 27 5d 2c 20 24 70 6c 61 74 66 6f 72 6d 52 65 70 6f 2c 20 24 70 72 65 | ent['name'],.$platformRepo,.$pre |
41200 | 66 65 72 72 65 64 53 74 61 62 69 6c 69 74 79 2c 20 24 66 69 78 65 64 29 3b 0a 24 72 65 71 75 69 | ferredStability,.$fixed);.$requi |
41220 | 72 65 6d 65 6e 74 5b 27 76 65 72 73 69 6f 6e 27 5d 20 3d 20 24 76 65 72 73 69 6f 6e 3b 0a 0a 0a | rement['version'].=.$version;... |
41240 | 24 72 65 71 75 69 72 65 6d 65 6e 74 5b 27 6e 61 6d 65 27 5d 20 3d 20 24 6e 61 6d 65 3b 0a 0a 24 | $requirement['name'].=.$name;..$ |
41260 | 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 73 70 72 69 6e 74 66 28 0a 27 55 73 69 6e 67 20 76 | io->writeError(sprintf(.'Using.v |
41280 | 65 72 73 69 6f 6e 20 3c 69 6e 66 6f 3e 25 73 3c 2f 69 6e 66 6f 3e 20 66 6f 72 20 3c 69 6e 66 6f | ersion.<info>%s</info>.for.<info |
412a0 | 3e 25 73 3c 2f 69 6e 66 6f 3e 27 2c 0a 24 72 65 71 75 69 72 65 6d 65 6e 74 5b 27 76 65 72 73 69 | >%s</info>',.$requirement['versi |
412c0 | 6f 6e 27 5d 2c 0a 24 72 65 71 75 69 72 65 6d 65 6e 74 5b 27 6e 61 6d 65 27 5d 0a 29 29 3b 0a 7d | on'],.$requirement['name'].));.} |
412e0 | 0a 0a 24 72 65 73 75 6c 74 5b 5d 20 3d 20 24 72 65 71 75 69 72 65 6d 65 6e 74 5b 27 6e 61 6d 65 | ..$result[].=.$requirement['name |
41300 | 27 5d 20 2e 20 27 20 27 20 2e 20 24 72 65 71 75 69 72 65 6d 65 6e 74 5b 27 76 65 72 73 69 6f 6e | ']...'.'...$requirement['version |
41320 | 27 5d 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 72 65 73 75 6c 74 3b 0a 7d 0a 0a 24 76 65 72 73 69 | '];.}..return.$result;.}..$versi |
41340 | 6f 6e 50 61 72 73 65 72 20 3d 20 6e 65 77 20 56 65 72 73 69 6f 6e 50 61 72 73 65 72 28 29 3b 0a | onParser.=.new.VersionParser();. |
41360 | 0a 0a 24 63 6f 6d 70 6f 73 65 72 20 3d 20 24 74 68 69 73 2d 3e 74 72 79 43 6f 6d 70 6f 73 65 72 | ..$composer.=.$this->tryComposer |
41380 | 28 29 3b 0a 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 20 3d 20 6e 75 6c 6c 3b 0a 69 66 20 28 6e | ();.$installedRepo.=.null;.if.(n |
413a0 | 75 6c 6c 20 21 3d 3d 20 24 63 6f 6d 70 6f 73 65 72 29 20 7b 0a 24 69 6e 73 74 61 6c 6c 65 64 52 | ull.!==.$composer).{.$installedR |
413c0 | 65 70 6f 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 79 4d 61 | epo.=.$composer->getRepositoryMa |
413e0 | 6e 61 67 65 72 28 29 2d 3e 67 65 74 4c 6f 63 61 6c 52 65 70 6f 73 69 74 6f 72 79 28 29 3b 0a 7d | nager()->getLocalRepository();.} |
41400 | 0a 24 65 78 69 73 74 69 6e 67 50 61 63 6b 61 67 65 73 20 3d 20 5b 5d 3b 0a 69 66 20 28 6e 75 6c | .$existingPackages.=.[];.if.(nul |
41420 | 6c 20 21 3d 3d 20 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 29 20 7b 0a 66 6f 72 65 61 63 68 20 | l.!==.$installedRepo).{.foreach. |
41440 | 28 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 2d 3e 67 65 74 50 61 63 6b 61 67 65 73 28 29 20 61 | ($installedRepo->getPackages().a |
41460 | 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 24 65 78 69 73 74 69 6e 67 50 61 63 6b 61 67 65 73 5b | s.$package).{.$existingPackages[ |
41480 | 5d 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 3b 0a 7d 0a 7d 0a 75 6e 73 | ].=.$package->getName();.}.}.uns |
414a0 | 65 74 28 24 63 6f 6d 70 6f 73 65 72 2c 20 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 29 3b 0a 0a | et($composer,.$installedRepo);.. |
414c0 | 24 69 6f 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 3b 0a 77 68 69 6c 65 20 28 6e 75 6c | $io.=.$this->getIO();.while.(nul |
414e0 | 6c 20 21 3d 3d 20 24 70 61 63 6b 61 67 65 20 3d 20 24 69 6f 2d 3e 61 73 6b 28 27 53 65 61 72 63 | l.!==.$package.=.$io->ask('Searc |
41500 | 68 20 66 6f 72 20 61 20 70 61 63 6b 61 67 65 3a 20 27 29 29 20 7b 0a 24 6d 61 74 63 68 65 73 20 | h.for.a.package:.')).{.$matches. |
41520 | 3d 20 24 74 68 69 73 2d 3e 67 65 74 52 65 70 6f 73 28 29 2d 3e 73 65 61 72 63 68 28 24 70 61 63 | =.$this->getRepos()->search($pac |
41540 | 6b 61 67 65 29 3b 0a 0a 69 66 20 28 63 6f 75 6e 74 28 24 6d 61 74 63 68 65 73 29 20 3e 20 30 29 | kage);..if.(count($matches).>.0) |
41560 | 20 7b 0a 0a 66 6f 72 65 61 63 68 20 28 24 6d 61 74 63 68 65 73 20 61 73 20 24 70 6f 73 69 74 69 | .{..foreach.($matches.as.$positi |
41580 | 6f 6e 20 3d 3e 20 24 66 6f 75 6e 64 50 61 63 6b 61 67 65 29 20 7b 0a 69 66 20 28 69 6e 5f 61 72 | on.=>.$foundPackage).{.if.(in_ar |
415a0 | 72 61 79 28 24 66 6f 75 6e 64 50 61 63 6b 61 67 65 5b 27 6e 61 6d 65 27 5d 2c 20 24 65 78 69 73 | ray($foundPackage['name'],.$exis |
415c0 | 74 69 6e 67 50 61 63 6b 61 67 65 73 2c 20 74 72 75 65 29 29 20 7b 0a 75 6e 73 65 74 28 24 6d 61 | tingPackages,.true)).{.unset($ma |
415e0 | 74 63 68 65 73 5b 24 70 6f 73 69 74 69 6f 6e 5d 29 3b 0a 7d 0a 7d 0a 24 6d 61 74 63 68 65 73 20 | tches[$position]);.}.}.$matches. |
41600 | 3d 20 61 72 72 61 79 5f 76 61 6c 75 65 73 28 24 6d 61 74 63 68 65 73 29 3b 0a 0a 24 65 78 61 63 | =.array_values($matches);..$exac |
41620 | 74 4d 61 74 63 68 20 3d 20 66 61 6c 73 65 3b 0a 66 6f 72 65 61 63 68 20 28 24 6d 61 74 63 68 65 | tMatch.=.false;.foreach.($matche |
41640 | 73 20 61 73 20 24 6d 61 74 63 68 29 20 7b 0a 69 66 20 28 24 6d 61 74 63 68 5b 27 6e 61 6d 65 27 | s.as.$match).{.if.($match['name' |
41660 | 5d 20 3d 3d 3d 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 24 65 78 61 63 74 4d 61 74 63 68 20 3d 20 | ].===.$package).{.$exactMatch.=. |
41680 | 74 72 75 65 3b 0a 62 72 65 61 6b 3b 0a 7d 0a 7d 0a 0a 0a 69 66 20 28 21 24 65 78 61 63 74 4d 61 | true;.break;.}.}...if.(!$exactMa |
416a0 | 74 63 68 29 20 7b 0a 24 70 72 6f 76 69 64 65 72 73 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 52 65 | tch).{.$providers.=.$this->getRe |
416c0 | 70 6f 73 28 29 2d 3e 67 65 74 50 72 6f 76 69 64 65 72 73 28 24 70 61 63 6b 61 67 65 29 3b 0a 69 | pos()->getProviders($package);.i |
416e0 | 66 20 28 63 6f 75 6e 74 28 24 70 72 6f 76 69 64 65 72 73 29 20 3e 20 30 29 20 7b 0a 61 72 72 61 | f.(count($providers).>.0).{.arra |
41700 | 79 5f 75 6e 73 68 69 66 74 28 24 6d 61 74 63 68 65 73 2c 20 5b 27 6e 61 6d 65 27 20 3d 3e 20 24 | y_unshift($matches,.['name'.=>.$ |
41720 | 70 61 63 6b 61 67 65 2c 20 27 64 65 73 63 72 69 70 74 69 6f 6e 27 20 3d 3e 20 27 27 5d 29 3b 0a | package,.'description'.=>.'']);. |
41740 | 7d 0a 0a 24 63 68 6f 69 63 65 73 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 6d 61 74 63 | }..$choices.=.[];.foreach.($matc |
41760 | 68 65 73 20 61 73 20 24 70 6f 73 69 74 69 6f 6e 20 3d 3e 20 24 66 6f 75 6e 64 50 61 63 6b 61 67 | hes.as.$position.=>.$foundPackag |
41780 | 65 29 20 7b 0a 24 61 62 61 6e 64 6f 6e 65 64 20 3d 20 27 27 3b 0a 69 66 20 28 69 73 73 65 74 28 | e).{.$abandoned.=.'';.if.(isset( |
417a0 | 24 66 6f 75 6e 64 50 61 63 6b 61 67 65 5b 27 61 62 61 6e 64 6f 6e 65 64 27 5d 29 29 20 7b 0a 69 | $foundPackage['abandoned'])).{.i |
417c0 | 66 20 28 69 73 5f 73 74 72 69 6e 67 28 24 66 6f 75 6e 64 50 61 63 6b 61 67 65 5b 27 61 62 61 6e | f.(is_string($foundPackage['aban |
417e0 | 64 6f 6e 65 64 27 5d 29 29 20 7b 0a 24 72 65 70 6c 61 63 65 6d 65 6e 74 20 3d 20 73 70 72 69 6e | doned'])).{.$replacement.=.sprin |
41800 | 74 66 28 27 55 73 65 20 25 73 20 69 6e 73 74 65 61 64 27 2c 20 24 66 6f 75 6e 64 50 61 63 6b 61 | tf('Use.%s.instead',.$foundPacka |
41820 | 67 65 5b 27 61 62 61 6e 64 6f 6e 65 64 27 5d 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 72 65 70 6c | ge['abandoned']);.}.else.{.$repl |
41840 | 61 63 65 6d 65 6e 74 20 3d 20 27 4e 6f 20 72 65 70 6c 61 63 65 6d 65 6e 74 20 77 61 73 20 73 75 | acement.=.'No.replacement.was.su |
41860 | 67 67 65 73 74 65 64 27 3b 0a 7d 0a 24 61 62 61 6e 64 6f 6e 65 64 20 3d 20 73 70 72 69 6e 74 66 | ggested';.}.$abandoned.=.sprintf |
41880 | 28 27 3c 77 61 72 6e 69 6e 67 3e 41 62 61 6e 64 6f 6e 65 64 2e 20 25 73 2e 3c 2f 77 61 72 6e 69 | ('<warning>Abandoned..%s.</warni |
418a0 | 6e 67 3e 27 2c 20 24 72 65 70 6c 61 63 65 6d 65 6e 74 29 3b 0a 7d 0a 0a 24 63 68 6f 69 63 65 73 | ng>',.$replacement);.}..$choices |
418c0 | 5b 5d 20 3d 20 73 70 72 69 6e 74 66 28 27 20 3c 69 6e 66 6f 3e 25 35 73 3c 2f 69 6e 66 6f 3e 20 | [].=.sprintf('.<info>%5s</info>. |
418e0 | 25 73 20 25 73 27 2c 20 22 5b 24 70 6f 73 69 74 69 6f 6e 5d 22 2c 20 24 66 6f 75 6e 64 50 61 63 | %s.%s',."[$position]",.$foundPac |
41900 | 6b 61 67 65 5b 27 6e 61 6d 65 27 5d 2c 20 24 61 62 61 6e 64 6f 6e 65 64 29 3b 0a 7d 0a 0a 24 69 | kage['name'],.$abandoned);.}..$i |
41920 | 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 5b 0a 27 27 2c 0a 73 70 72 69 6e 74 66 28 27 46 6f 75 | o->writeError([.'',.sprintf('Fou |
41940 | 6e 64 20 3c 69 6e 66 6f 3e 25 73 3c 2f 69 6e 66 6f 3e 20 70 61 63 6b 61 67 65 73 20 6d 61 74 63 | nd.<info>%s</info>.packages.matc |
41960 | 68 69 6e 67 20 3c 69 6e 66 6f 3e 25 73 3c 2f 69 6e 66 6f 3e 27 2c 20 63 6f 75 6e 74 28 24 6d 61 | hing.<info>%s</info>',.count($ma |
41980 | 74 63 68 65 73 29 2c 20 24 70 61 63 6b 61 67 65 29 2c 0a 27 27 2c 0a 5d 29 3b 0a 0a 24 69 6f 2d | tches),.$package),.'',.]);..$io- |
419a0 | 3e 77 72 69 74 65 45 72 72 6f 72 28 24 63 68 6f 69 63 65 73 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 | >writeError($choices);.$io->writ |
419c0 | 65 45 72 72 6f 72 28 27 27 29 3b 0a 0a 24 76 61 6c 69 64 61 74 6f 72 20 3d 20 73 74 61 74 69 63 | eError('');..$validator.=.static |
419e0 | 20 66 75 6e 63 74 69 6f 6e 20 28 73 74 72 69 6e 67 20 24 73 65 6c 65 63 74 69 6f 6e 29 20 75 73 | .function.(string.$selection).us |
41a00 | 65 20 28 24 6d 61 74 63 68 65 73 2c 20 24 76 65 72 73 69 6f 6e 50 61 72 73 65 72 29 20 7b 0a 69 | e.($matches,.$versionParser).{.i |
41a20 | 66 20 28 27 27 20 3d 3d 3d 20 24 73 65 6c 65 63 74 69 6f 6e 29 20 7b 0a 72 65 74 75 72 6e 20 66 | f.(''.===.$selection).{.return.f |
41a40 | 61 6c 73 65 3b 0a 7d 0a 0a 69 66 20 28 69 73 5f 6e 75 6d 65 72 69 63 28 24 73 65 6c 65 63 74 69 | alse;.}..if.(is_numeric($selecti |
41a60 | 6f 6e 29 20 26 26 20 69 73 73 65 74 28 24 6d 61 74 63 68 65 73 5b 28 69 6e 74 29 20 24 73 65 6c | on).&&.isset($matches[(int).$sel |
41a80 | 65 63 74 69 6f 6e 5d 29 29 20 7b 0a 24 70 61 63 6b 61 67 65 20 3d 20 24 6d 61 74 63 68 65 73 5b | ection])).{.$package.=.$matches[ |
41aa0 | 28 69 6e 74 29 20 24 73 65 6c 65 63 74 69 6f 6e 5d 3b 0a 0a 72 65 74 75 72 6e 20 24 70 61 63 6b | (int).$selection];..return.$pack |
41ac0 | 61 67 65 5b 27 6e 61 6d 65 27 5d 3b 0a 7d 0a 0a 69 66 20 28 50 72 65 67 3a 3a 69 73 4d 61 74 63 | age['name'];.}..if.(Preg::isMatc |
41ae0 | 68 28 27 7b 5e 5c 73 2a 28 3f 50 3c 6e 61 6d 65 3e 5b 5c 53 2f 5d 2b 29 28 3f 3a 5c 73 2b 28 3f | h('{^\s*(?P<name>[\S/]+)(?:\s+(? |
41b00 | 50 3c 76 65 72 73 69 6f 6e 3e 5c 53 2b 29 29 3f 5c 73 2a 24 7d 27 2c 20 24 73 65 6c 65 63 74 69 | P<version>\S+))?\s*$}',.$selecti |
41b20 | 6f 6e 2c 20 24 70 61 63 6b 61 67 65 4d 61 74 63 68 65 73 29 29 20 7b 0a 69 66 20 28 69 73 73 65 | on,.$packageMatches)).{.if.(isse |
41b40 | 74 28 24 70 61 63 6b 61 67 65 4d 61 74 63 68 65 73 5b 27 76 65 72 73 69 6f 6e 27 5d 29 29 20 7b | t($packageMatches['version'])).{ |
41b60 | 0a 0a 0a 0a 24 76 65 72 73 69 6f 6e 50 61 72 73 65 72 2d 3e 70 61 72 73 65 43 6f 6e 73 74 72 61 | ....$versionParser->parseConstra |
41b80 | 69 6e 74 73 28 24 70 61 63 6b 61 67 65 4d 61 74 63 68 65 73 5b 27 76 65 72 73 69 6f 6e 27 5d 29 | ints($packageMatches['version']) |
41ba0 | 3b 0a 0a 72 65 74 75 72 6e 20 24 70 61 63 6b 61 67 65 4d 61 74 63 68 65 73 5b 27 6e 61 6d 65 27 | ;..return.$packageMatches['name' |
41bc0 | 5d 2e 27 20 27 2e 24 70 61 63 6b 61 67 65 4d 61 74 63 68 65 73 5b 27 76 65 72 73 69 6f 6e 27 5d | ].'.'.$packageMatches['version'] |
41be0 | 3b 0a 7d 0a 0a 0a 72 65 74 75 72 6e 20 24 70 61 63 6b 61 67 65 4d 61 74 63 68 65 73 5b 27 6e 61 | ;.}...return.$packageMatches['na |
41c00 | 6d 65 27 5d 3b 0a 7d 0a 0a 74 68 72 6f 77 20 6e 65 77 20 5c 45 78 63 65 70 74 69 6f 6e 28 27 4e | me'];.}..throw.new.\Exception('N |
41c20 | 6f 74 20 61 20 76 61 6c 69 64 20 73 65 6c 65 63 74 69 6f 6e 27 29 3b 0a 7d 3b 0a 0a 24 70 61 63 | ot.a.valid.selection');.};..$pac |
41c40 | 6b 61 67 65 20 3d 20 24 69 6f 2d 3e 61 73 6b 41 6e 64 56 61 6c 69 64 61 74 65 28 0a 27 45 6e 74 | kage.=.$io->askAndValidate(.'Ent |
41c60 | 65 72 20 70 61 63 6b 61 67 65 20 23 20 74 6f 20 61 64 64 2c 20 6f 72 20 74 68 65 20 63 6f 6d 70 | er.package.#.to.add,.or.the.comp |
41c80 | 6c 65 74 65 20 70 61 63 6b 61 67 65 20 6e 61 6d 65 20 69 66 20 69 74 20 69 73 20 6e 6f 74 20 6c | lete.package.name.if.it.is.not.l |
41ca0 | 69 73 74 65 64 3a 20 27 2c 0a 24 76 61 6c 69 64 61 74 6f 72 2c 0a 33 2c 0a 27 27 0a 29 3b 0a 7d | isted:.',.$validator,.3,.''.);.} |
41cc0 | 0a 0a 0a 69 66 20 28 66 61 6c 73 65 20 21 3d 3d 20 24 70 61 63 6b 61 67 65 20 26 26 20 66 61 6c | ...if.(false.!==.$package.&&.fal |
41ce0 | 73 65 20 3d 3d 3d 20 73 74 72 70 6f 73 28 24 70 61 63 6b 61 67 65 2c 20 27 20 27 29 29 20 7b 0a | se.===.strpos($package,.'.')).{. |
41d00 | 24 76 61 6c 69 64 61 74 6f 72 20 3d 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 73 74 | $validator.=.static.function.(st |
41d20 | 72 69 6e 67 20 24 69 6e 70 75 74 29 20 7b 0a 24 69 6e 70 75 74 20 3d 20 74 72 69 6d 28 24 69 6e | ring.$input).{.$input.=.trim($in |
41d40 | 70 75 74 29 3b 0a 0a 72 65 74 75 72 6e 20 73 74 72 6c 65 6e 28 24 69 6e 70 75 74 29 20 3e 20 30 | put);..return.strlen($input).>.0 |
41d60 | 20 3f 20 24 69 6e 70 75 74 20 3a 20 66 61 6c 73 65 3b 0a 7d 3b 0a 0a 24 63 6f 6e 73 74 72 61 69 | .?.$input.:.false;.};..$constrai |
41d80 | 6e 74 20 3d 20 24 69 6f 2d 3e 61 73 6b 41 6e 64 56 61 6c 69 64 61 74 65 28 0a 27 45 6e 74 65 72 | nt.=.$io->askAndValidate(.'Enter |
41da0 | 20 74 68 65 20 76 65 72 73 69 6f 6e 20 63 6f 6e 73 74 72 61 69 6e 74 20 74 6f 20 72 65 71 75 69 | .the.version.constraint.to.requi |
41dc0 | 72 65 20 28 6f 72 20 6c 65 61 76 65 20 62 6c 61 6e 6b 20 74 6f 20 75 73 65 20 74 68 65 20 6c 61 | re.(or.leave.blank.to.use.the.la |
41de0 | 74 65 73 74 20 76 65 72 73 69 6f 6e 29 3a 20 27 2c 0a 24 76 61 6c 69 64 61 74 6f 72 2c 0a 33 2c | test.version):.',.$validator,.3, |
41e00 | 0a 27 27 0a 29 3b 0a 0a 69 66 20 28 66 61 6c 73 65 20 3d 3d 3d 20 24 63 6f 6e 73 74 72 61 69 6e | .''.);..if.(false.===.$constrain |
41e20 | 74 29 20 7b 0a 5b 2c 20 24 63 6f 6e 73 74 72 61 69 6e 74 5d 20 3d 20 24 74 68 69 73 2d 3e 66 69 | t).{.[,.$constraint].=.$this->fi |
41e40 | 6e 64 42 65 73 74 56 65 72 73 69 6f 6e 41 6e 64 4e 61 6d 65 46 6f 72 50 61 63 6b 61 67 65 28 24 | ndBestVersionAndNameForPackage($ |
41e60 | 69 6e 70 75 74 2c 20 24 70 61 63 6b 61 67 65 2c 20 24 70 6c 61 74 66 6f 72 6d 52 65 70 6f 2c 20 | input,.$package,.$platformRepo,. |
41e80 | 24 70 72 65 66 65 72 72 65 64 53 74 61 62 69 6c 69 74 79 29 3b 0a 0a 24 69 6f 2d 3e 77 72 69 74 | $preferredStability);..$io->writ |
41ea0 | 65 45 72 72 6f 72 28 73 70 72 69 6e 74 66 28 0a 27 55 73 69 6e 67 20 76 65 72 73 69 6f 6e 20 3c | eError(sprintf(.'Using.version.< |
41ec0 | 69 6e 66 6f 3e 25 73 3c 2f 69 6e 66 6f 3e 20 66 6f 72 20 3c 69 6e 66 6f 3e 25 73 3c 2f 69 6e 66 | info>%s</info>.for.<info>%s</inf |
41ee0 | 6f 3e 27 2c 0a 24 63 6f 6e 73 74 72 61 69 6e 74 2c 0a 24 70 61 63 6b 61 67 65 0a 29 29 3b 0a 7d | o>',.$constraint,.$package.));.} |
41f00 | 0a 0a 24 70 61 63 6b 61 67 65 20 2e 3d 20 27 20 27 2e 24 63 6f 6e 73 74 72 61 69 6e 74 3b 0a 7d | ..$package..=.'.'.$constraint;.} |
41f20 | 0a 0a 69 66 20 28 66 61 6c 73 65 20 21 3d 3d 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 24 72 65 71 | ..if.(false.!==.$package).{.$req |
41f40 | 75 69 72 65 73 5b 5d 20 3d 20 24 70 61 63 6b 61 67 65 3b 0a 24 65 78 69 73 74 69 6e 67 50 61 63 | uires[].=.$package;.$existingPac |
41f60 | 6b 61 67 65 73 5b 5d 20 3d 20 65 78 70 6c 6f 64 65 28 27 20 27 2c 20 24 70 61 63 6b 61 67 65 29 | kages[].=.explode('.',.$package) |
41f80 | 5b 30 5d 3b 0a 7d 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 72 65 71 75 69 72 65 73 3b 0a 7d 0a | [0];.}.}.}..return.$requires;.}. |
41fa0 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 66 69 6e 64 42 65 | .........private.function.findBe |
41fc0 | 73 74 56 65 72 73 69 6f 6e 41 6e 64 4e 61 6d 65 46 6f 72 50 61 63 6b 61 67 65 28 49 6e 70 75 74 | stVersionAndNameForPackage(Input |
41fe0 | 49 6e 74 65 72 66 61 63 65 20 24 69 6e 70 75 74 2c 20 73 74 72 69 6e 67 20 24 6e 61 6d 65 2c 20 | Interface.$input,.string.$name,. |
42000 | 3f 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 20 24 70 6c 61 74 66 6f 72 6d 52 65 70 | ?PlatformRepository.$platformRep |
42020 | 6f 20 3d 20 6e 75 6c 6c 2c 20 73 74 72 69 6e 67 20 24 70 72 65 66 65 72 72 65 64 53 74 61 62 69 | o.=.null,.string.$preferredStabi |
42040 | 6c 69 74 79 20 3d 20 27 73 74 61 62 6c 65 27 2c 20 62 6f 6f 6c 20 24 66 69 78 65 64 20 3d 20 66 | lity.=.'stable',.bool.$fixed.=.f |
42060 | 61 6c 73 65 29 3a 20 61 72 72 61 79 0a 7b 0a 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 68 61 73 4f | alse):.array.{..if.($input->hasO |
42080 | 70 74 69 6f 6e 28 27 69 67 6e 6f 72 65 2d 70 6c 61 74 66 6f 72 6d 2d 72 65 71 73 27 29 20 26 26 | ption('ignore-platform-reqs').&& |
420a0 | 20 24 69 6e 70 75 74 2d 3e 68 61 73 4f 70 74 69 6f 6e 28 27 69 67 6e 6f 72 65 2d 70 6c 61 74 66 | .$input->hasOption('ignore-platf |
420c0 | 6f 72 6d 2d 72 65 71 27 29 29 20 7b 0a 24 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e | orm-req')).{.$platformRequiremen |
420e0 | 74 46 69 6c 74 65 72 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 50 6c 61 74 66 6f 72 6d 52 65 71 75 | tFilter.=.$this->getPlatformRequ |
42100 | 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 28 24 69 6e 70 75 74 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a | irementFilter($input);.}.else.{. |
42120 | 24 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 20 3d 20 50 6c 61 | $platformRequirementFilter.=.Pla |
42140 | 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 46 61 63 74 6f 72 79 3a 3a 69 | tformRequirementFilterFactory::i |
42160 | 67 6e 6f 72 65 4e 6f 74 68 69 6e 67 28 29 3b 0a 7d 0a 0a 0a 24 72 65 70 6f 53 65 74 20 3d 20 24 | gnoreNothing();.}...$repoSet.=.$ |
42180 | 74 68 69 73 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 79 53 65 74 28 24 69 6e 70 75 74 29 3b 0a | this->getRepositorySet($input);. |
421a0 | 24 76 65 72 73 69 6f 6e 53 65 6c 65 63 74 6f 72 20 3d 20 6e 65 77 20 56 65 72 73 69 6f 6e 53 65 | $versionSelector.=.new.VersionSe |
421c0 | 6c 65 63 74 6f 72 28 24 72 65 70 6f 53 65 74 2c 20 24 70 6c 61 74 66 6f 72 6d 52 65 70 6f 29 3b | lector($repoSet,.$platformRepo); |
421e0 | 0a 24 65 66 66 65 63 74 69 76 65 4d 69 6e 69 6d 75 6d 53 74 61 62 69 6c 69 74 79 20 3d 20 24 74 | .$effectiveMinimumStability.=.$t |
42200 | 68 69 73 2d 3e 67 65 74 4d 69 6e 69 6d 75 6d 53 74 61 62 69 6c 69 74 79 28 24 69 6e 70 75 74 29 | his->getMinimumStability($input) |
42220 | 3b 0a 0a 24 70 61 63 6b 61 67 65 20 3d 20 24 76 65 72 73 69 6f 6e 53 65 6c 65 63 74 6f 72 2d 3e | ;..$package.=.$versionSelector-> |
42240 | 66 69 6e 64 42 65 73 74 43 61 6e 64 69 64 61 74 65 28 24 6e 61 6d 65 2c 20 6e 75 6c 6c 2c 20 24 | findBestCandidate($name,.null,.$ |
42260 | 70 72 65 66 65 72 72 65 64 53 74 61 62 69 6c 69 74 79 2c 20 24 70 6c 61 74 66 6f 72 6d 52 65 71 | preferredStability,.$platformReq |
42280 | 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 2c 20 30 2c 20 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 | uirementFilter,.0,.$this->getIO( |
422a0 | 29 29 3b 0a 0a 69 66 20 28 66 61 6c 73 65 20 3d 3d 3d 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 0a | ));..if.(false.===.$package).{.. |
422c0 | 0a 69 66 20 28 24 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 2d | .if.($platformRequirementFilter- |
422e0 | 3e 69 73 49 67 6e 6f 72 65 64 28 24 6e 61 6d 65 29 29 20 7b 0a 72 65 74 75 72 6e 20 5b 24 6e 61 | >isIgnored($name)).{.return.[$na |
42300 | 6d 65 2c 20 27 2a 27 5d 3b 0a 7d 0a 0a 0a 24 70 72 6f 76 69 64 65 72 73 20 3d 20 24 72 65 70 6f | me,.'*'];.}...$providers.=.$repo |
42320 | 53 65 74 2d 3e 67 65 74 50 72 6f 76 69 64 65 72 73 28 24 6e 61 6d 65 29 3b 0a 69 66 20 28 63 6f | Set->getProviders($name);.if.(co |
42340 | 75 6e 74 28 24 70 72 6f 76 69 64 65 72 73 29 20 3e 20 30 29 20 7b 0a 24 63 6f 6e 73 74 72 61 69 | unt($providers).>.0).{.$constrai |
42360 | 6e 74 20 3d 20 27 2a 27 3b 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 69 73 49 6e 74 65 72 61 63 74 | nt.=.'*';.if.($input->isInteract |
42380 | 69 76 65 28 29 29 20 7b 0a 24 63 6f 6e 73 74 72 61 69 6e 74 20 3d 20 24 74 68 69 73 2d 3e 67 65 | ive()).{.$constraint.=.$this->ge |
423a0 | 74 49 4f 28 29 2d 3e 61 73 6b 41 6e 64 56 61 6c 69 64 61 74 65 28 27 50 61 63 6b 61 67 65 20 22 | tIO()->askAndValidate('Package." |
423c0 | 3c 69 6e 66 6f 3e 27 2e 24 6e 61 6d 65 2e 27 3c 2f 69 6e 66 6f 3e 22 20 64 6f 65 73 20 6e 6f 74 | <info>'.$name.'</info>".does.not |
423e0 | 20 65 78 69 73 74 20 62 75 74 20 69 73 20 70 72 6f 76 69 64 65 64 20 62 79 20 27 2e 63 6f 75 6e | .exist.but.is.provided.by.'.coun |
42400 | 74 28 24 70 72 6f 76 69 64 65 72 73 29 2e 27 20 70 61 63 6b 61 67 65 73 2e 20 57 68 69 63 68 20 | t($providers).'.packages..Which. |
42420 | 76 65 72 73 69 6f 6e 20 63 6f 6e 73 74 72 61 69 6e 74 20 77 6f 75 6c 64 20 79 6f 75 20 6c 69 6b | version.constraint.would.you.lik |
42440 | 65 20 74 6f 20 75 73 65 3f 20 5b 3c 69 6e 66 6f 3e 2a 3c 2f 69 6e 66 6f 3e 5d 20 27 2c 20 73 74 | e.to.use?.[<info>*</info>].',.st |
42460 | 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 76 61 6c 75 65 29 20 7b 0a 24 70 61 72 73 65 72 | atic.function.($value).{.$parser |
42480 | 20 3d 20 6e 65 77 20 56 65 72 73 69 6f 6e 50 61 72 73 65 72 28 29 3b 0a 24 70 61 72 73 65 72 2d | .=.new.VersionParser();.$parser- |
424a0 | 3e 70 61 72 73 65 43 6f 6e 73 74 72 61 69 6e 74 73 28 24 76 61 6c 75 65 29 3b 0a 0a 72 65 74 75 | >parseConstraints($value);..retu |
424c0 | 72 6e 20 24 76 61 6c 75 65 3b 0a 7d 2c 20 33 2c 20 27 2a 27 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e | rn.$value;.},.3,.'*');.}..return |
424e0 | 20 5b 24 6e 61 6d 65 2c 20 24 63 6f 6e 73 74 72 61 69 6e 74 5d 3b 0a 7d 0a 0a 0a 69 66 20 28 21 | .[$name,.$constraint];.}...if.(! |
42500 | 28 24 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 20 69 6e 73 74 | ($platformRequirementFilter.inst |
42520 | 61 6e 63 65 6f 66 20 49 67 6e 6f 72 65 41 6c 6c 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d | anceof.IgnoreAllPlatformRequirem |
42540 | 65 6e 74 46 69 6c 74 65 72 29 20 26 26 20 66 61 6c 73 65 20 21 3d 3d 20 28 24 63 61 6e 64 69 64 | entFilter).&&.false.!==.($candid |
42560 | 61 74 65 20 3d 20 24 76 65 72 73 69 6f 6e 53 65 6c 65 63 74 6f 72 2d 3e 66 69 6e 64 42 65 73 74 | ate.=.$versionSelector->findBest |
42580 | 43 61 6e 64 69 64 61 74 65 28 24 6e 61 6d 65 2c 20 6e 75 6c 6c 2c 20 24 70 72 65 66 65 72 72 65 | Candidate($name,.null,.$preferre |
425a0 | 64 53 74 61 62 69 6c 69 74 79 2c 20 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 | dStability,.PlatformRequirementF |
425c0 | 69 6c 74 65 72 46 61 63 74 6f 72 79 3a 3a 69 67 6e 6f 72 65 41 6c 6c 28 29 29 29 29 20 7b 0a 74 | ilterFactory::ignoreAll()))).{.t |
425e0 | 68 72 6f 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 | hrow.new.\InvalidArgumentExcepti |
42600 | 6f 6e 28 73 70 72 69 6e 74 66 28 0a 27 50 61 63 6b 61 67 65 20 25 73 20 68 61 73 20 72 65 71 75 | on(sprintf(.'Package.%s.has.requ |
42620 | 69 72 65 6d 65 6e 74 73 20 69 6e 63 6f 6d 70 61 74 69 62 6c 65 20 77 69 74 68 20 79 6f 75 72 20 | irements.incompatible.with.your. |
42640 | 50 48 50 20 76 65 72 73 69 6f 6e 2c 20 50 48 50 20 65 78 74 65 6e 73 69 6f 6e 73 20 61 6e 64 20 | PHP.version,.PHP.extensions.and. |
42660 | 43 6f 6d 70 6f 73 65 72 20 76 65 72 73 69 6f 6e 27 20 2e 20 24 74 68 69 73 2d 3e 67 65 74 50 6c | Composer.version'...$this->getPl |
42680 | 61 74 66 6f 72 6d 45 78 63 65 70 74 69 6f 6e 44 65 74 61 69 6c 73 28 24 63 61 6e 64 69 64 61 74 | atformExceptionDetails($candidat |
426a0 | 65 2c 20 24 70 6c 61 74 66 6f 72 6d 52 65 70 6f 29 2c 0a 24 6e 61 6d 65 0a 29 29 3b 0a 7d 0a 0a | e,.$platformRepo),.$name.));.}.. |
426c0 | 69 66 20 28 66 61 6c 73 65 20 21 3d 3d 20 28 24 70 61 63 6b 61 67 65 20 3d 20 24 76 65 72 73 69 | if.(false.!==.($package.=.$versi |
426e0 | 6f 6e 53 65 6c 65 63 74 6f 72 2d 3e 66 69 6e 64 42 65 73 74 43 61 6e 64 69 64 61 74 65 28 24 6e | onSelector->findBestCandidate($n |
42700 | 61 6d 65 2c 20 6e 75 6c 6c 2c 20 24 70 72 65 66 65 72 72 65 64 53 74 61 62 69 6c 69 74 79 2c 20 | ame,.null,.$preferredStability,. |
42720 | 24 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 2c 20 52 65 70 6f | $platformRequirementFilter,.Repo |
42740 | 73 69 74 6f 72 79 53 65 74 3a 3a 41 4c 4c 4f 57 5f 55 4e 41 43 43 45 50 54 41 42 4c 45 5f 53 54 | sitorySet::ALLOW_UNACCEPTABLE_ST |
42760 | 41 42 49 4c 49 54 49 45 53 29 29 29 20 7b 0a 0a 69 66 20 28 66 61 6c 73 65 20 21 3d 3d 20 28 24 | ABILITIES))).{..if.(false.!==.($ |
42780 | 61 6c 6c 52 65 70 6f 73 50 61 63 6b 61 67 65 20 3d 20 24 76 65 72 73 69 6f 6e 53 65 6c 65 63 74 | allReposPackage.=.$versionSelect |
427a0 | 6f 72 2d 3e 66 69 6e 64 42 65 73 74 43 61 6e 64 69 64 61 74 65 28 24 6e 61 6d 65 2c 20 6e 75 6c | or->findBestCandidate($name,.nul |
427c0 | 6c 2c 20 24 70 72 65 66 65 72 72 65 64 53 74 61 62 69 6c 69 74 79 2c 20 24 70 6c 61 74 66 6f 72 | l,.$preferredStability,.$platfor |
427e0 | 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 2c 20 52 65 70 6f 73 69 74 6f 72 79 53 65 | mRequirementFilter,.RepositorySe |
42800 | 74 3a 3a 41 4c 4c 4f 57 5f 53 48 41 44 4f 57 45 44 5f 52 45 50 4f 53 49 54 4f 52 49 45 53 29 29 | t::ALLOW_SHADOWED_REPOSITORIES)) |
42820 | 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 | ).{.throw.new.\InvalidArgumentEx |
42840 | 63 65 70 74 69 6f 6e 28 0a 27 50 61 63 6b 61 67 65 20 27 2e 24 6e 61 6d 65 2e 27 20 65 78 69 73 | ception(.'Package.'.$name.'.exis |
42860 | 74 73 20 69 6e 20 27 2e 24 61 6c 6c 52 65 70 6f 73 50 61 63 6b 61 67 65 2d 3e 67 65 74 52 65 70 | ts.in.'.$allReposPackage->getRep |
42880 | 6f 73 69 74 6f 72 79 28 29 2d 3e 67 65 74 52 65 70 6f 4e 61 6d 65 28 29 2e 27 20 61 6e 64 20 27 | ository()->getRepoName().'.and.' |
428a0 | 2e 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 79 28 29 2d 3e 67 65 74 52 | .$package->getRepository()->getR |
428c0 | 65 70 6f 4e 61 6d 65 28 29 2e 27 20 77 68 69 63 68 20 68 61 73 20 61 20 68 69 67 68 65 72 20 72 | epoName().'.which.has.a.higher.r |
428e0 | 65 70 6f 73 69 74 6f 72 79 20 70 72 69 6f 72 69 74 79 2e 20 54 68 65 20 70 61 63 6b 61 67 65 73 | epository.priority..The.packages |
42900 | 20 66 72 6f 6d 20 74 68 65 20 68 69 67 68 65 72 20 70 72 69 6f 72 69 74 79 20 72 65 70 6f 73 69 | .from.the.higher.priority.reposi |
42920 | 74 6f 72 79 20 64 6f 20 6e 6f 74 20 6d 61 74 63 68 20 79 6f 75 72 20 6d 69 6e 69 6d 75 6d 2d 73 | tory.do.not.match.your.minimum-s |
42940 | 74 61 62 69 6c 69 74 79 20 61 6e 64 20 61 72 65 20 74 68 65 72 65 66 6f 72 65 20 6e 6f 74 20 69 | tability.and.are.therefore.not.i |
42960 | 6e 73 74 61 6c 6c 61 62 6c 65 2e 20 54 68 61 74 20 72 65 70 6f 73 69 74 6f 72 79 20 69 73 20 63 | nstallable..That.repository.is.c |
42980 | 61 6e 6f 6e 69 63 61 6c 20 73 6f 20 74 68 65 20 6c 6f 77 65 72 20 70 72 69 6f 72 69 74 79 20 72 | anonical.so.the.lower.priority.r |
429a0 | 65 70 6f 5c 27 73 20 70 61 63 6b 61 67 65 73 20 61 72 65 20 6e 6f 74 20 69 6e 73 74 61 6c 6c 61 | epo\'s.packages.are.not.installa |
429c0 | 62 6c 65 2e 20 53 65 65 20 68 74 74 70 73 3a 2f 2f 67 65 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 67 | ble..See.https://getcomposer.org |
429e0 | 2f 72 65 70 6f 70 72 69 6f 20 66 6f 72 20 64 65 74 61 69 6c 73 20 61 6e 64 20 61 73 73 69 73 74 | /repoprio.for.details.and.assist |
42a00 | 61 6e 63 65 2e 27 0a 29 3b 0a 7d 0a 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 64 41 | ance.'.);.}..throw.new.\InvalidA |
42a20 | 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 73 70 72 69 6e 74 66 28 0a 27 43 6f 75 6c 64 | rgumentException(sprintf(.'Could |
42a40 | 20 6e 6f 74 20 66 69 6e 64 20 61 20 76 65 72 73 69 6f 6e 20 6f 66 20 70 61 63 6b 61 67 65 20 25 | .not.find.a.version.of.package.% |
42a60 | 73 20 6d 61 74 63 68 69 6e 67 20 79 6f 75 72 20 6d 69 6e 69 6d 75 6d 2d 73 74 61 62 69 6c 69 74 | s.matching.your.minimum-stabilit |
42a80 | 79 20 28 25 73 29 2e 20 52 65 71 75 69 72 65 20 69 74 20 77 69 74 68 20 61 6e 20 65 78 70 6c 69 | y.(%s)..Require.it.with.an.expli |
42aa0 | 63 69 74 20 76 65 72 73 69 6f 6e 20 63 6f 6e 73 74 72 61 69 6e 74 20 61 6c 6c 6f 77 69 6e 67 20 | cit.version.constraint.allowing. |
42ac0 | 69 74 73 20 64 65 73 69 72 65 64 20 73 74 61 62 69 6c 69 74 79 2e 27 2c 0a 24 6e 61 6d 65 2c 0a | its.desired.stability.',.$name,. |
42ae0 | 24 65 66 66 65 63 74 69 76 65 4d 69 6e 69 6d 75 6d 53 74 61 62 69 6c 69 74 79 0a 29 29 3b 0a 7d | $effectiveMinimumStability.));.} |
42b00 | 0a 0a 69 66 20 28 21 24 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 | ..if.(!$platformRequirementFilte |
42b20 | 72 20 69 6e 73 74 61 6e 63 65 6f 66 20 49 67 6e 6f 72 65 41 6c 6c 50 6c 61 74 66 6f 72 6d 52 65 | r.instanceof.IgnoreAllPlatformRe |
42b40 | 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 20 26 26 20 66 61 6c 73 65 20 21 3d 3d 20 28 24 63 | quirementFilter.&&.false.!==.($c |
42b60 | 61 6e 64 69 64 61 74 65 20 3d 20 24 76 65 72 73 69 6f 6e 53 65 6c 65 63 74 6f 72 2d 3e 66 69 6e | andidate.=.$versionSelector->fin |
42b80 | 64 42 65 73 74 43 61 6e 64 69 64 61 74 65 28 24 6e 61 6d 65 2c 20 6e 75 6c 6c 2c 20 24 70 72 65 | dBestCandidate($name,.null,.$pre |
42ba0 | 66 65 72 72 65 64 53 74 61 62 69 6c 69 74 79 2c 20 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 | ferredStability,.PlatformRequire |
42bc0 | 6d 65 6e 74 46 69 6c 74 65 72 46 61 63 74 6f 72 79 3a 3a 69 67 6e 6f 72 65 41 6c 6c 28 29 2c 20 | mentFilterFactory::ignoreAll(),. |
42be0 | 52 65 70 6f 73 69 74 6f 72 79 53 65 74 3a 3a 41 4c 4c 4f 57 5f 55 4e 41 43 43 45 50 54 41 42 4c | RepositorySet::ALLOW_UNACCEPTABL |
42c00 | 45 5f 53 54 41 42 49 4c 49 54 49 45 53 29 29 29 20 7b 0a 24 61 64 64 69 74 69 6f 6e 61 6c 20 3d | E_STABILITIES))).{.$additional.= |
42c20 | 20 27 27 3b 0a 69 66 20 28 66 61 6c 73 65 20 3d 3d 3d 20 24 76 65 72 73 69 6f 6e 53 65 6c 65 63 | .'';.if.(false.===.$versionSelec |
42c40 | 74 6f 72 2d 3e 66 69 6e 64 42 65 73 74 43 61 6e 64 69 64 61 74 65 28 24 6e 61 6d 65 2c 20 6e 75 | tor->findBestCandidate($name,.nu |
42c60 | 6c 6c 2c 20 24 70 72 65 66 65 72 72 65 64 53 74 61 62 69 6c 69 74 79 2c 20 50 6c 61 74 66 6f 72 | ll,.$preferredStability,.Platfor |
42c80 | 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 46 61 63 74 6f 72 79 3a 3a 69 67 6e 6f 72 | mRequirementFilterFactory::ignor |
42ca0 | 65 41 6c 6c 28 29 29 29 20 7b 0a 24 61 64 64 69 74 69 6f 6e 61 6c 20 3d 20 50 48 50 5f 45 4f 4c | eAll())).{.$additional.=.PHP_EOL |
42cc0 | 2e 50 48 50 5f 45 4f 4c 2e 27 41 64 64 69 74 69 6f 6e 61 6c 6c 79 2c 20 74 68 65 20 70 61 63 6b | .PHP_EOL.'Additionally,.the.pack |
42ce0 | 61 67 65 20 77 61 73 20 6f 6e 6c 79 20 66 6f 75 6e 64 20 77 69 74 68 20 61 20 73 74 61 62 69 6c | age.was.only.found.with.a.stabil |
42d00 | 69 74 79 20 6f 66 20 22 27 2e 24 63 61 6e 64 69 64 61 74 65 2d 3e 67 65 74 53 74 61 62 69 6c 69 | ity.of."'.$candidate->getStabili |
42d20 | 74 79 28 29 2e 27 22 20 77 68 69 6c 65 20 79 6f 75 72 20 6d 69 6e 69 6d 75 6d 20 73 74 61 62 69 | ty().'".while.your.minimum.stabi |
42d40 | 6c 69 74 79 20 69 73 20 22 27 2e 24 65 66 66 65 63 74 69 76 65 4d 69 6e 69 6d 75 6d 53 74 61 62 | lity.is."'.$effectiveMinimumStab |
42d60 | 69 6c 69 74 79 2e 27 22 2e 27 3b 0a 7d 0a 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 | ility.'".';.}..throw.new.\Invali |
42d80 | 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 73 70 72 69 6e 74 66 28 0a 27 43 6f 75 | dArgumentException(sprintf(.'Cou |
42da0 | 6c 64 20 6e 6f 74 20 66 69 6e 64 20 70 61 63 6b 61 67 65 20 25 73 20 69 6e 20 61 6e 79 20 76 65 | ld.not.find.package.%s.in.any.ve |
42dc0 | 72 73 69 6f 6e 20 6d 61 74 63 68 69 6e 67 20 79 6f 75 72 20 50 48 50 20 76 65 72 73 69 6f 6e 2c | rsion.matching.your.PHP.version, |
42de0 | 20 50 48 50 20 65 78 74 65 6e 73 69 6f 6e 73 20 61 6e 64 20 43 6f 6d 70 6f 73 65 72 20 76 65 72 | .PHP.extensions.and.Composer.ver |
42e00 | 73 69 6f 6e 27 20 2e 20 24 74 68 69 73 2d 3e 67 65 74 50 6c 61 74 66 6f 72 6d 45 78 63 65 70 74 | sion'...$this->getPlatformExcept |
42e20 | 69 6f 6e 44 65 74 61 69 6c 73 28 24 63 61 6e 64 69 64 61 74 65 2c 20 24 70 6c 61 74 66 6f 72 6d | ionDetails($candidate,.$platform |
42e40 | 52 65 70 6f 29 20 2e 20 27 25 73 27 2c 0a 24 6e 61 6d 65 2c 0a 24 61 64 64 69 74 69 6f 6e 61 6c | Repo)...'%s',.$name,.$additional |
42e60 | 0a 29 29 3b 0a 7d 0a 0a 0a 24 73 69 6d 69 6c 61 72 20 3d 20 24 74 68 69 73 2d 3e 66 69 6e 64 53 | .));.}...$similar.=.$this->findS |
42e80 | 69 6d 69 6c 61 72 28 24 6e 61 6d 65 29 3b 0a 69 66 20 28 63 6f 75 6e 74 28 24 73 69 6d 69 6c 61 | imilar($name);.if.(count($simila |
42ea0 | 72 29 20 3e 20 30 29 20 7b 0a 69 66 20 28 69 6e 5f 61 72 72 61 79 28 24 6e 61 6d 65 2c 20 24 73 | r).>.0).{.if.(in_array($name,.$s |
42ec0 | 69 6d 69 6c 61 72 2c 20 74 72 75 65 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e 76 61 | imilar,.true)).{.throw.new.\Inva |
42ee0 | 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 73 70 72 69 6e 74 66 28 0a 22 43 | lidArgumentException(sprintf(."C |
42f00 | 6f 75 6c 64 20 6e 6f 74 20 66 69 6e 64 20 70 61 63 6b 61 67 65 20 25 73 2e 20 49 74 20 77 61 73 | ould.not.find.package.%s..It.was |
42f20 | 20 68 6f 77 65 76 65 72 20 66 6f 75 6e 64 20 76 69 61 20 72 65 70 6f 73 69 74 6f 72 79 20 73 65 | .however.found.via.repository.se |
42f40 | 61 72 63 68 2c 20 77 68 69 63 68 20 69 6e 64 69 63 61 74 65 73 20 61 20 63 6f 6e 73 69 73 74 65 | arch,.which.indicates.a.consiste |
42f60 | 6e 63 79 20 69 73 73 75 65 20 77 69 74 68 20 74 68 65 20 72 65 70 6f 73 69 74 6f 72 79 2e 22 2c | ncy.issue.with.the.repository.", |
42f80 | 0a 24 6e 61 6d 65 0a 29 29 3b 0a 7d 0a 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 64 | .$name.));.}..throw.new.\Invalid |
42fa0 | 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 73 70 72 69 6e 74 66 28 0a 22 43 6f 75 6c | ArgumentException(sprintf(."Coul |
42fc0 | 64 20 6e 6f 74 20 66 69 6e 64 20 70 61 63 6b 61 67 65 20 25 73 2e 5c 6e 5c 6e 44 69 64 20 79 6f | d.not.find.package.%s.\n\nDid.yo |
42fe0 | 75 20 6d 65 61 6e 20 22 20 2e 20 28 63 6f 75 6e 74 28 24 73 69 6d 69 6c 61 72 29 20 3e 20 31 20 | u.mean."...(count($similar).>.1. |
43000 | 3f 20 27 6f 6e 65 20 6f 66 20 74 68 65 73 65 27 20 3a 20 27 74 68 69 73 27 29 20 2e 20 22 3f 5c | ?.'one.of.these'.:.'this')..."?\ |
43020 | 6e 20 20 20 20 25 73 22 2c 0a 24 6e 61 6d 65 2c 0a 69 6d 70 6c 6f 64 65 28 22 5c 6e 20 20 20 20 | n....%s",.$name,.implode("\n.... |
43040 | 22 2c 20 24 73 69 6d 69 6c 61 72 29 0a 29 29 3b 0a 7d 0a 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 | ",.$similar).));.}..throw.new.\I |
43060 | 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 73 70 72 69 6e 74 66 28 | nvalidArgumentException(sprintf( |
43080 | 0a 27 43 6f 75 6c 64 20 6e 6f 74 20 66 69 6e 64 20 61 20 6d 61 74 63 68 69 6e 67 20 76 65 72 73 | .'Could.not.find.a.matching.vers |
430a0 | 69 6f 6e 20 6f 66 20 70 61 63 6b 61 67 65 20 25 73 2e 20 43 68 65 63 6b 20 74 68 65 20 70 61 63 | ion.of.package.%s..Check.the.pac |
430c0 | 6b 61 67 65 20 73 70 65 6c 6c 69 6e 67 2c 20 79 6f 75 72 20 76 65 72 73 69 6f 6e 20 63 6f 6e 73 | kage.spelling,.your.version.cons |
430e0 | 74 72 61 69 6e 74 20 61 6e 64 20 74 68 61 74 20 74 68 65 20 70 61 63 6b 61 67 65 20 69 73 20 61 | traint.and.that.the.package.is.a |
43100 | 76 61 69 6c 61 62 6c 65 20 69 6e 20 61 20 73 74 61 62 69 6c 69 74 79 20 77 68 69 63 68 20 6d 61 | vailable.in.a.stability.which.ma |
43120 | 74 63 68 65 73 20 79 6f 75 72 20 6d 69 6e 69 6d 75 6d 2d 73 74 61 62 69 6c 69 74 79 20 28 25 73 | tches.your.minimum-stability.(%s |
43140 | 29 2e 27 2c 0a 24 6e 61 6d 65 2c 0a 24 65 66 66 65 63 74 69 76 65 4d 69 6e 69 6d 75 6d 53 74 61 | ).',.$name,.$effectiveMinimumSta |
43160 | 62 69 6c 69 74 79 0a 29 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 5b 0a 24 70 61 63 6b 61 67 65 2d | bility.));.}..return.[.$package- |
43180 | 3e 67 65 74 50 72 65 74 74 79 4e 61 6d 65 28 29 2c 0a 24 66 69 78 65 64 20 3f 20 24 70 61 63 6b | >getPrettyName(),.$fixed.?.$pack |
431a0 | 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 20 3a 20 24 76 65 72 73 69 | age->getPrettyVersion().:.$versi |
431c0 | 6f 6e 53 65 6c 65 63 74 6f 72 2d 3e 66 69 6e 64 52 65 63 6f 6d 6d 65 6e 64 65 64 52 65 71 75 69 | onSelector->findRecommendedRequi |
431e0 | 72 65 56 65 72 73 69 6f 6e 28 24 70 61 63 6b 61 67 65 29 2c 0a 5d 3b 0a 7d 0a 0a 0a 0a 0a 70 72 | reVersion($package),.];.}.....pr |
43200 | 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 66 69 6e 64 53 69 6d 69 6c 61 72 28 73 74 72 69 6e | ivate.function.findSimilar(strin |
43220 | 67 20 24 70 61 63 6b 61 67 65 29 3a 20 61 72 72 61 79 0a 7b 0a 74 72 79 20 7b 0a 69 66 20 28 6e | g.$package):.array.{.try.{.if.(n |
43240 | 75 6c 6c 20 3d 3d 3d 20 24 74 68 69 73 2d 3e 72 65 70 6f 73 29 20 7b 0a 74 68 72 6f 77 20 6e 65 | ull.===.$this->repos).{.throw.ne |
43260 | 77 20 5c 4c 6f 67 69 63 45 78 63 65 70 74 69 6f 6e 28 27 66 69 6e 64 53 69 6d 69 6c 61 72 20 77 | w.\LogicException('findSimilar.w |
43280 | 61 73 20 63 61 6c 6c 65 64 20 62 65 66 6f 72 65 20 24 74 68 69 73 2d 3e 72 65 70 6f 73 20 77 61 | as.called.before.$this->repos.wa |
432a0 | 73 20 69 6e 69 74 69 61 6c 69 7a 65 64 27 29 3b 0a 7d 0a 24 72 65 73 75 6c 74 73 20 3d 20 24 74 | s.initialized');.}.$results.=.$t |
432c0 | 68 69 73 2d 3e 72 65 70 6f 73 2d 3e 73 65 61 72 63 68 28 24 70 61 63 6b 61 67 65 29 3b 0a 7d 20 | his->repos->search($package);.}. |
432e0 | 63 61 74 63 68 20 28 5c 54 68 72 6f 77 61 62 6c 65 20 24 65 29 20 7b 0a 69 66 20 28 24 65 20 69 | catch.(\Throwable.$e).{.if.($e.i |
43300 | 6e 73 74 61 6e 63 65 6f 66 20 5c 4c 6f 67 69 63 45 78 63 65 70 74 69 6f 6e 29 20 7b 0a 74 68 72 | nstanceof.\LogicException).{.thr |
43320 | 6f 77 20 24 65 3b 0a 7d 0a 0a 0a 72 65 74 75 72 6e 20 5b 5d 3b 0a 7d 0a 24 73 69 6d 69 6c 61 72 | ow.$e;.}...return.[];.}.$similar |
43340 | 50 61 63 6b 61 67 65 73 20 3d 20 5b 5d 3b 0a 0a 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 20 3d | Packages.=.[];..$installedRepo.= |
43360 | 20 24 74 68 69 73 2d 3e 72 65 71 75 69 72 65 43 6f 6d 70 6f 73 65 72 28 29 2d 3e 67 65 74 52 65 | .$this->requireComposer()->getRe |
43380 | 70 6f 73 69 74 6f 72 79 4d 61 6e 61 67 65 72 28 29 2d 3e 67 65 74 4c 6f 63 61 6c 52 65 70 6f 73 | positoryManager()->getLocalRepos |
433a0 | 69 74 6f 72 79 28 29 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 72 65 73 75 6c 74 73 20 61 73 20 24 | itory();..foreach.($results.as.$ |
433c0 | 72 65 73 75 6c 74 29 20 7b 0a 69 66 20 28 6e 75 6c 6c 20 21 3d 3d 20 24 69 6e 73 74 61 6c 6c 65 | result).{.if.(null.!==.$installe |
433e0 | 64 52 65 70 6f 2d 3e 66 69 6e 64 50 61 63 6b 61 67 65 28 24 72 65 73 75 6c 74 5b 27 6e 61 6d 65 | dRepo->findPackage($result['name |
43400 | 27 5d 2c 20 27 2a 27 29 29 20 7b 0a 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 24 73 69 6d 69 6c 61 | '],.'*')).{..continue;.}.$simila |
43420 | 72 50 61 63 6b 61 67 65 73 5b 24 72 65 73 75 6c 74 5b 27 6e 61 6d 65 27 5d 5d 20 3d 20 6c 65 76 | rPackages[$result['name']].=.lev |
43440 | 65 6e 73 68 74 65 69 6e 28 24 70 61 63 6b 61 67 65 2c 20 24 72 65 73 75 6c 74 5b 27 6e 61 6d 65 | enshtein($package,.$result['name |
43460 | 27 5d 29 3b 0a 7d 0a 61 73 6f 72 74 28 24 73 69 6d 69 6c 61 72 50 61 63 6b 61 67 65 73 29 3b 0a | ']);.}.asort($similarPackages);. |
43480 | 0a 72 65 74 75 72 6e 20 61 72 72 61 79 5f 6b 65 79 73 28 61 72 72 61 79 5f 73 6c 69 63 65 28 24 | .return.array_keys(array_slice($ |
434a0 | 73 69 6d 69 6c 61 72 50 61 63 6b 61 67 65 73 2c 20 30 2c 20 35 29 29 3b 0a 7d 0a 0a 70 72 69 76 | similarPackages,.0,.5));.}..priv |
434c0 | 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 50 6c 61 74 66 6f 72 6d 45 78 63 65 70 74 69 6f | ate.function.getPlatformExceptio |
434e0 | 6e 44 65 74 61 69 6c 73 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 63 61 6e 64 69 | nDetails(PackageInterface.$candi |
43500 | 64 61 74 65 2c 20 3f 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 20 24 70 6c 61 74 66 | date,.?PlatformRepository.$platf |
43520 | 6f 72 6d 52 65 70 6f 20 3d 20 6e 75 6c 6c 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 24 64 65 74 61 69 | ormRepo.=.null):.string.{.$detai |
43540 | 6c 73 20 3d 20 5b 5d 3b 0a 69 66 20 28 6e 75 6c 6c 20 3d 3d 3d 20 24 70 6c 61 74 66 6f 72 6d 52 | ls.=.[];.if.(null.===.$platformR |
43560 | 65 70 6f 29 20 7b 0a 72 65 74 75 72 6e 20 27 27 3b 0a 7d 0a 0a 66 6f 72 65 61 63 68 20 28 24 63 | epo).{.return.'';.}..foreach.($c |
43580 | 61 6e 64 69 64 61 74 65 2d 3e 67 65 74 52 65 71 75 69 72 65 73 28 29 20 61 73 20 24 6c 69 6e 6b | andidate->getRequires().as.$link |
435a0 | 29 20 7b 0a 69 66 20 28 21 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 3a 3a 69 73 50 | ).{.if.(!PlatformRepository::isP |
435c0 | 6c 61 74 66 6f 72 6d 50 61 63 6b 61 67 65 28 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 74 28 | latformPackage($link->getTarget( |
435e0 | 29 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 24 70 6c 61 74 66 6f 72 6d 50 6b 67 20 3d | ))).{.continue;.}.$platformPkg.= |
43600 | 20 24 70 6c 61 74 66 6f 72 6d 52 65 70 6f 2d 3e 66 69 6e 64 50 61 63 6b 61 67 65 28 24 6c 69 6e | .$platformRepo->findPackage($lin |
43620 | 6b 2d 3e 67 65 74 54 61 72 67 65 74 28 29 2c 20 27 2a 27 29 3b 0a 69 66 20 28 6e 75 6c 6c 20 3d | k->getTarget(),.'*');.if.(null.= |
43640 | 3d 3d 20 24 70 6c 61 74 66 6f 72 6d 50 6b 67 29 20 7b 0a 69 66 20 28 24 70 6c 61 74 66 6f 72 6d | ==.$platformPkg).{.if.($platform |
43660 | 52 65 70 6f 2d 3e 69 73 50 6c 61 74 66 6f 72 6d 50 61 63 6b 61 67 65 44 69 73 61 62 6c 65 64 28 | Repo->isPlatformPackageDisabled( |
43680 | 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 74 28 29 29 29 20 7b 0a 24 64 65 74 61 69 6c 73 5b | $link->getTarget())).{.$details[ |
436a0 | 5d 20 3d 20 24 63 61 6e 64 69 64 61 74 65 2d 3e 67 65 74 50 72 65 74 74 79 4e 61 6d 65 28 29 2e | ].=.$candidate->getPrettyName(). |
436c0 | 27 20 27 2e 24 63 61 6e 64 69 64 61 74 65 2d 3e 67 65 74 50 72 65 74 74 79 56 65 72 73 69 6f 6e | '.'.$candidate->getPrettyVersion |
436e0 | 28 29 2e 27 20 72 65 71 75 69 72 65 73 20 27 2e 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 74 | ().'.requires.'.$link->getTarget |
43700 | 28 29 2e 27 20 27 2e 24 6c 69 6e 6b 2d 3e 67 65 74 50 72 65 74 74 79 43 6f 6e 73 74 72 61 69 6e | ().'.'.$link->getPrettyConstrain |
43720 | 74 28 29 2e 27 20 62 75 74 20 69 74 20 69 73 20 64 69 73 61 62 6c 65 64 20 62 79 20 79 6f 75 72 | t().'.but.it.is.disabled.by.your |
43740 | 20 70 6c 61 74 66 6f 72 6d 20 63 6f 6e 66 69 67 2e 20 45 6e 61 62 6c 65 20 69 74 20 61 67 61 69 | .platform.config..Enable.it.agai |
43760 | 6e 20 77 69 74 68 20 22 63 6f 6d 70 6f 73 65 72 20 63 6f 6e 66 69 67 20 70 6c 61 74 66 6f 72 6d | n.with."composer.config.platform |
43780 | 2e 27 2e 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 74 28 29 2e 27 20 2d 2d 75 6e 73 65 74 22 | .'.$link->getTarget().'.--unset" |
437a0 | 2e 27 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 64 65 74 61 69 6c 73 5b 5d 20 3d 20 24 63 61 6e 64 69 | .';.}.else.{.$details[].=.$candi |
437c0 | 64 61 74 65 2d 3e 67 65 74 50 72 65 74 74 79 4e 61 6d 65 28 29 2e 27 20 27 2e 24 63 61 6e 64 69 | date->getPrettyName().'.'.$candi |
437e0 | 64 61 74 65 2d 3e 67 65 74 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 2e 27 20 72 65 71 75 69 | date->getPrettyVersion().'.requi |
43800 | 72 65 73 20 27 2e 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 74 28 29 2e 27 20 27 2e 24 6c 69 | res.'.$link->getTarget().'.'.$li |
43820 | 6e 6b 2d 3e 67 65 74 50 72 65 74 74 79 43 6f 6e 73 74 72 61 69 6e 74 28 29 2e 27 20 62 75 74 20 | nk->getPrettyConstraint().'.but. |
43840 | 69 74 20 69 73 20 6e 6f 74 20 70 72 65 73 65 6e 74 2e 27 3b 0a 7d 0a 63 6f 6e 74 69 6e 75 65 3b | it.is.not.present.';.}.continue; |
43860 | 0a 7d 0a 69 66 20 28 21 24 6c 69 6e 6b 2d 3e 67 65 74 43 6f 6e 73 74 72 61 69 6e 74 28 29 2d 3e | .}.if.(!$link->getConstraint()-> |
43880 | 6d 61 74 63 68 65 73 28 6e 65 77 20 43 6f 6e 73 74 72 61 69 6e 74 28 27 3d 3d 27 2c 20 24 70 6c | matches(new.Constraint('==',.$pl |
438a0 | 61 74 66 6f 72 6d 50 6b 67 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 29 29 29 20 7b 0a 24 70 6c | atformPkg->getVersion()))).{.$pl |
438c0 | 61 74 66 6f 72 6d 50 6b 67 56 65 72 73 69 6f 6e 20 3d 20 24 70 6c 61 74 66 6f 72 6d 50 6b 67 2d | atformPkgVersion.=.$platformPkg- |
438e0 | 3e 67 65 74 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 3b 0a 24 70 6c 61 74 66 6f 72 6d 45 78 | >getPrettyVersion();.$platformEx |
43900 | 74 72 61 20 3d 20 24 70 6c 61 74 66 6f 72 6d 50 6b 67 2d 3e 67 65 74 45 78 74 72 61 28 29 3b 0a | tra.=.$platformPkg->getExtra();. |
43920 | 69 66 20 28 69 73 73 65 74 28 24 70 6c 61 74 66 6f 72 6d 45 78 74 72 61 5b 27 63 6f 6e 66 69 67 | if.(isset($platformExtra['config |
43940 | 2e 70 6c 61 74 66 6f 72 6d 27 5d 29 20 26 26 20 24 70 6c 61 74 66 6f 72 6d 50 6b 67 20 69 6e 73 | .platform']).&&.$platformPkg.ins |
43960 | 74 61 6e 63 65 6f 66 20 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 | tanceof.CompletePackageInterface |
43980 | 29 20 7b 0a 24 70 6c 61 74 66 6f 72 6d 50 6b 67 56 65 72 73 69 6f 6e 20 2e 3d 20 27 20 28 27 2e | ).{.$platformPkgVersion..=.'.('. |
439a0 | 24 70 6c 61 74 66 6f 72 6d 50 6b 67 2d 3e 67 65 74 44 65 73 63 72 69 70 74 69 6f 6e 28 29 2e 27 | $platformPkg->getDescription().' |
439c0 | 29 27 3b 0a 7d 0a 24 64 65 74 61 69 6c 73 5b 5d 20 3d 20 24 63 61 6e 64 69 64 61 74 65 2d 3e 67 | )';.}.$details[].=.$candidate->g |
439e0 | 65 74 50 72 65 74 74 79 4e 61 6d 65 28 29 2e 27 20 27 2e 24 63 61 6e 64 69 64 61 74 65 2d 3e 67 | etPrettyName().'.'.$candidate->g |
43a00 | 65 74 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 2e 27 20 72 65 71 75 69 72 65 73 20 27 2e 24 | etPrettyVersion().'.requires.'.$ |
43a20 | 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 74 28 29 2e 27 20 27 2e 24 6c 69 6e 6b 2d 3e 67 65 74 | link->getTarget().'.'.$link->get |
43a40 | 50 72 65 74 74 79 43 6f 6e 73 74 72 61 69 6e 74 28 29 2e 27 20 77 68 69 63 68 20 64 6f 65 73 20 | PrettyConstraint().'.which.does. |
43a60 | 6e 6f 74 20 6d 61 74 63 68 20 79 6f 75 72 20 69 6e 73 74 61 6c 6c 65 64 20 76 65 72 73 69 6f 6e | not.match.your.installed.version |
43a80 | 20 27 2e 24 70 6c 61 74 66 6f 72 6d 50 6b 67 56 65 72 73 69 6f 6e 2e 27 2e 27 3b 0a 7d 0a 7d 0a | .'.$platformPkgVersion.'.';.}.}. |
43aa0 | 0a 69 66 20 28 63 6f 75 6e 74 28 24 64 65 74 61 69 6c 73 29 20 3d 3d 3d 20 30 29 20 7b 0a 72 65 | .if.(count($details).===.0).{.re |
43ac0 | 74 75 72 6e 20 27 27 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 27 3a 27 2e 50 48 50 5f 45 4f 4c 2e 27 | turn.'';.}..return.':'.PHP_EOL.' |
43ae0 | 20 20 2d 20 27 20 2e 20 69 6d 70 6c 6f 64 65 28 50 48 50 5f 45 4f 4c 2e 27 20 20 2d 20 27 2c 20 | ..-.'...implode(PHP_EOL.'..-.',. |
43b00 | 24 64 65 74 61 69 6c 73 29 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 | $details);.}.}.<?php.declare(str |
43b20 | 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 | ict_types=1);............namespa |
43b40 | 63 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6d 6d 61 6e 64 3b 0a 0a 75 73 65 20 53 79 6d 66 6f 6e | ce.Composer\Command;..use.Symfon |
43b60 | 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 49 | y\Component\Console\Input\InputI |
43b80 | 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c | nterface;.use.Symfony\Component\ |
43ba0 | 43 6f 6e 73 6f 6c 65 5c 4f 75 74 70 75 74 5c 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a | Console\Output\OutputInterface;. |
43bc0 | 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 | use.Composer\Console\Input\Input |
43be0 | 41 72 67 75 6d 65 6e 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 73 6f 6c 65 5c 49 | Argument;.use.Composer\Console\I |
43c00 | 6e 70 75 74 5c 49 6e 70 75 74 4f 70 74 69 6f 6e 3b 0a 0a 0a 0a 0a 63 6c 61 73 73 20 50 72 6f 68 | nput\InputOption;.....class.Proh |
43c20 | 69 62 69 74 73 43 6f 6d 6d 61 6e 64 20 65 78 74 65 6e 64 73 20 42 61 73 65 44 65 70 65 6e 64 65 | ibitsCommand.extends.BaseDepende |
43c40 | 6e 63 79 43 6f 6d 6d 61 6e 64 0a 7b 0a 75 73 65 20 43 6f 6d 70 6c 65 74 69 6f 6e 54 72 61 69 74 | ncyCommand.{.use.CompletionTrait |
43c60 | 3b 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 63 6f 6e 66 69 67 75 | ;.....protected.function.configu |
43c80 | 72 65 28 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 0a 2d 3e 73 65 74 4e 61 6d 65 28 27 70 72 | re():.void.{.$this.->setName('pr |
43ca0 | 6f 68 69 62 69 74 73 27 29 0a 2d 3e 73 65 74 41 6c 69 61 73 65 73 28 5b 27 77 68 79 2d 6e 6f 74 | ohibits').->setAliases(['why-not |
43cc0 | 27 5d 29 0a 2d 3e 73 65 74 44 65 73 63 72 69 70 74 69 6f 6e 28 27 53 68 6f 77 73 20 77 68 69 63 | ']).->setDescription('Shows.whic |
43ce0 | 68 20 70 61 63 6b 61 67 65 73 20 70 72 65 76 65 6e 74 20 74 68 65 20 67 69 76 65 6e 20 70 61 63 | h.packages.prevent.the.given.pac |
43d00 | 6b 61 67 65 20 66 72 6f 6d 20 62 65 69 6e 67 20 69 6e 73 74 61 6c 6c 65 64 27 29 0a 2d 3e 73 65 | kage.from.being.installed').->se |
43d20 | 74 44 65 66 69 6e 69 74 69 6f 6e 28 5b 0a 6e 65 77 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 28 | tDefinition([.new.InputArgument( |
43d40 | 73 65 6c 66 3a 3a 41 52 47 55 4d 45 4e 54 5f 50 41 43 4b 41 47 45 2c 20 49 6e 70 75 74 41 72 67 | self::ARGUMENT_PACKAGE,.InputArg |
43d60 | 75 6d 65 6e 74 3a 3a 52 45 51 55 49 52 45 44 2c 20 27 50 61 63 6b 61 67 65 20 74 6f 20 69 6e 73 | ument::REQUIRED,.'Package.to.ins |
43d80 | 70 65 63 74 27 2c 20 6e 75 6c 6c 2c 20 24 74 68 69 73 2d 3e 73 75 67 67 65 73 74 41 76 61 69 6c | pect',.null,.$this->suggestAvail |
43da0 | 61 62 6c 65 50 61 63 6b 61 67 65 28 29 29 2c 0a 6e 65 77 20 49 6e 70 75 74 41 72 67 75 6d 65 6e | ablePackage()),.new.InputArgumen |
43dc0 | 74 28 73 65 6c 66 3a 3a 41 52 47 55 4d 45 4e 54 5f 43 4f 4e 53 54 52 41 49 4e 54 2c 20 49 6e 70 | t(self::ARGUMENT_CONSTRAINT,.Inp |
43de0 | 75 74 41 72 67 75 6d 65 6e 74 3a 3a 52 45 51 55 49 52 45 44 2c 20 27 56 65 72 73 69 6f 6e 20 63 | utArgument::REQUIRED,.'Version.c |
43e00 | 6f 6e 73 74 72 61 69 6e 74 2c 20 77 68 69 63 68 20 76 65 72 73 69 6f 6e 20 79 6f 75 20 65 78 70 | onstraint,.which.version.you.exp |
43e20 | 65 63 74 65 64 20 74 6f 20 62 65 20 69 6e 73 74 61 6c 6c 65 64 27 29 2c 0a 6e 65 77 20 49 6e 70 | ected.to.be.installed'),.new.Inp |
43e40 | 75 74 4f 70 74 69 6f 6e 28 73 65 6c 66 3a 3a 4f 50 54 49 4f 4e 5f 52 45 43 55 52 53 49 56 45 2c | utOption(self::OPTION_RECURSIVE, |
43e60 | 20 27 72 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 | .'r',.InputOption::VALUE_NONE,.' |
43e80 | 52 65 63 75 72 73 69 76 65 6c 79 20 72 65 73 6f 6c 76 65 73 20 75 70 20 74 6f 20 74 68 65 20 72 | Recursively.resolves.up.to.the.r |
43ea0 | 6f 6f 74 20 70 61 63 6b 61 67 65 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 73 | oot.package'),.new.InputOption(s |
43ec0 | 65 6c 66 3a 3a 4f 50 54 49 4f 4e 5f 54 52 45 45 2c 20 27 74 27 2c 20 49 6e 70 75 74 4f 70 74 69 | elf::OPTION_TREE,.'t',.InputOpti |
43ee0 | 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 50 72 69 6e 74 73 20 74 68 65 20 72 65 73 75 | on::VALUE_NONE,.'Prints.the.resu |
43f00 | 6c 74 73 20 61 73 20 61 20 6e 65 73 74 65 64 20 74 72 65 65 27 29 2c 0a 6e 65 77 20 49 6e 70 75 | lts.as.a.nested.tree'),.new.Inpu |
43f20 | 74 4f 70 74 69 6f 6e 28 27 6c 6f 63 6b 65 64 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 | tOption('locked',.null,.InputOpt |
43f40 | 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 52 65 61 64 20 64 65 70 65 6e 64 65 6e 63 | ion::VALUE_NONE,.'Read.dependenc |
43f60 | 79 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 66 72 6f 6d 20 63 6f 6d 70 6f 73 65 72 2e 6c 6f 63 6b | y.information.from.composer.lock |
43f80 | 27 29 2c 0a 5d 29 0a 2d 3e 73 65 74 48 65 6c 70 28 0a 3c 3c 3c 45 4f 54 0a 44 69 73 70 6c 61 79 | '),.]).->setHelp(.<<<EOT.Display |
43fa0 | 73 20 64 65 74 61 69 6c 65 64 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 61 62 6f 75 74 20 77 68 79 | s.detailed.information.about.why |
43fc0 | 20 61 20 70 61 63 6b 61 67 65 20 63 61 6e 6e 6f 74 20 62 65 20 69 6e 73 74 61 6c 6c 65 64 2e 0a | .a.package.cannot.be.installed.. |
43fe0 | 0a 3c 69 6e 66 6f 3e 70 68 70 20 63 6f 6d 70 6f 73 65 72 2e 70 68 61 72 20 70 72 6f 68 69 62 69 | .<info>php.composer.phar.prohibi |
44000 | 74 73 20 63 6f 6d 70 6f 73 65 72 2f 63 6f 6d 70 6f 73 65 72 3c 2f 69 6e 66 6f 3e 0a 0a 52 65 61 | ts.composer/composer</info>..Rea |
44020 | 64 20 6d 6f 72 65 20 61 74 20 68 74 74 70 73 3a 2f 2f 67 65 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 | d.more.at.https://getcomposer.or |
44040 | 67 2f 64 6f 63 2f 30 33 2d 63 6c 69 2e 6d 64 23 70 72 6f 68 69 62 69 74 73 2d 77 68 79 2d 6e 6f | g/doc/03-cli.md#prohibits-why-no |
44060 | 74 2d 0a 45 4f 54 0a 29 0a 3b 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e | t-.EOT.).;.}..protected.function |
44080 | 20 65 78 65 63 75 74 65 28 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 69 6e 70 75 74 2c 20 | .execute(InputInterface.$input,. |
440a0 | 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 6f 75 74 70 75 74 29 3a 20 69 6e 74 0a 7b 0a | OutputInterface.$output):.int.{. |
440c0 | 72 65 74 75 72 6e 20 70 61 72 65 6e 74 3a 3a 64 6f 45 78 65 63 75 74 65 28 24 69 6e 70 75 74 2c | return.parent::doExecute($input, |
440e0 | 20 24 6f 75 74 70 75 74 2c 20 74 72 75 65 29 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 | .$output,.true);.}.}.<?php.decla |
44100 | 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e | re(strict_types=1);............n |
44120 | 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6d 6d 61 6e 64 3b 0a 0a 75 73 65 20 | amespace.Composer\Command;..use. |
44140 | 43 6f 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 5c 4f 70 65 72 | Composer\DependencyResolver\Oper |
44160 | 61 74 69 6f 6e 5c 49 6e 73 74 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 3b 0a 75 73 65 20 43 6f 6d 70 | ation\InstallOperation;.use.Comp |
44180 | 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 5c 4f 70 65 72 61 74 69 6f | oser\DependencyResolver\Operatio |
441a0 | 6e 5c 55 6e 69 6e 73 74 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 | n\UninstallOperation;.use.Compos |
441c0 | 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 5c 54 72 61 6e 73 61 63 74 69 6f | er\DependencyResolver\Transactio |
441e0 | 6e 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 41 6c 69 61 73 50 61 63 | n;.use.Composer\Package\AliasPac |
44200 | 6b 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 42 61 73 65 50 | kage;.use.Composer\Package\BaseP |
44220 | 61 63 6b 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 63 72 65 5c 50 72 65 67 3b 0a | ackage;.use.Composer\Pcre\Preg;. |
44240 | 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 6c 75 67 69 6e 5c 43 6f 6d 6d 61 6e 64 45 76 65 6e 74 | use.Composer\Plugin\CommandEvent |
44260 | 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 6c 75 67 69 6e 5c 50 6c 75 67 69 6e 45 76 65 6e | ;.use.Composer\Plugin\PluginEven |
44280 | 74 73 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 63 72 69 70 74 5c 53 63 72 69 70 74 45 76 | ts;.use.Composer\Script\ScriptEv |
442a0 | 65 6e 74 73 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 6c 61 74 66 6f 72 6d | ents;.use.Composer\Util\Platform |
442c0 | 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c | ;.use.Symfony\Component\Console\ |
442e0 | 49 6e 70 75 74 5c 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 | Input\InputInterface;.use.Compos |
44300 | 65 72 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 4f 70 74 69 6f 6e 3b 0a 75 73 | er\Console\Input\InputOption;.us |
44320 | 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 41 72 | e.Composer\Console\Input\InputAr |
44340 | 67 75 6d 65 6e 74 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f | gument;.use.Symfony\Component\Co |
44360 | 6e 73 6f 6c 65 5c 4f 75 74 70 75 74 5c 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 0a 0a | nsole\Output\OutputInterface;... |
44380 | 0a 0a 63 6c 61 73 73 20 52 65 69 6e 73 74 61 6c 6c 43 6f 6d 6d 61 6e 64 20 65 78 74 65 6e 64 73 | ..class.ReinstallCommand.extends |
443a0 | 20 42 61 73 65 43 6f 6d 6d 61 6e 64 0a 7b 0a 75 73 65 20 43 6f 6d 70 6c 65 74 69 6f 6e 54 72 61 | .BaseCommand.{.use.CompletionTra |
443c0 | 69 74 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 63 6f 6e 66 69 67 75 72 | it;..protected.function.configur |
443e0 | 65 28 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 0a 2d 3e 73 65 74 4e 61 6d 65 28 27 72 65 69 | e():.void.{.$this.->setName('rei |
44400 | 6e 73 74 61 6c 6c 27 29 0a 2d 3e 73 65 74 44 65 73 63 72 69 70 74 69 6f 6e 28 27 55 6e 69 6e 73 | nstall').->setDescription('Unins |
44420 | 74 61 6c 6c 73 20 61 6e 64 20 72 65 69 6e 73 74 61 6c 6c 73 20 74 68 65 20 67 69 76 65 6e 20 70 | talls.and.reinstalls.the.given.p |
44440 | 61 63 6b 61 67 65 20 6e 61 6d 65 73 27 29 0a 2d 3e 73 65 74 44 65 66 69 6e 69 74 69 6f 6e 28 5b | ackage.names').->setDefinition([ |
44460 | 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 70 72 65 66 65 72 2d 73 6f 75 72 63 65 27 | .new.InputOption('prefer-source' |
44480 | 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c | ,.null,.InputOption::VALUE_NONE, |
444a0 | 20 27 46 6f 72 63 65 73 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 66 72 6f 6d 20 70 61 63 6b 61 | .'Forces.installation.from.packa |
444c0 | 67 65 20 73 6f 75 72 63 65 73 20 77 68 65 6e 20 70 6f 73 73 69 62 6c 65 2c 20 69 6e 63 6c 75 64 | ge.sources.when.possible,.includ |
444e0 | 69 6e 67 20 56 43 53 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 | ing.VCS.information.'),.new.Inpu |
44500 | 74 4f 70 74 69 6f 6e 28 27 70 72 65 66 65 72 2d 64 69 73 74 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 | tOption('prefer-dist',.null,.Inp |
44520 | 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 46 6f 72 63 65 73 20 69 6e | utOption::VALUE_NONE,.'Forces.in |
44540 | 73 74 61 6c 6c 61 74 69 6f 6e 20 66 72 6f 6d 20 70 61 63 6b 61 67 65 20 64 69 73 74 20 28 64 65 | stallation.from.package.dist.(de |
44560 | 66 61 75 6c 74 20 62 65 68 61 76 69 6f 72 29 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 | fault.behavior).'),.new.InputOpt |
44580 | 69 6f 6e 28 27 70 72 65 66 65 72 2d 69 6e 73 74 61 6c 6c 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 | ion('prefer-install',.null,.Inpu |
445a0 | 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 52 45 51 55 49 52 45 44 2c 20 27 46 6f 72 63 65 73 | tOption::VALUE_REQUIRED,.'Forces |
445c0 | 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 66 72 6f 6d 20 70 61 63 6b 61 67 65 20 64 69 73 74 7c | .installation.from.package.dist| |
445e0 | 73 6f 75 72 63 65 7c 61 75 74 6f 20 28 61 75 74 6f 20 63 68 6f 6f 73 65 73 20 73 6f 75 72 63 65 | source|auto.(auto.chooses.source |
44600 | 20 66 6f 72 20 64 65 76 20 76 65 72 73 69 6f 6e 73 2c 20 64 69 73 74 20 66 6f 72 20 74 68 65 20 | .for.dev.versions,.dist.for.the. |
44620 | 72 65 73 74 29 2e 27 2c 20 6e 75 6c 6c 2c 20 24 74 68 69 73 2d 3e 73 75 67 67 65 73 74 50 72 65 | rest).',.null,.$this->suggestPre |
44640 | 66 65 72 49 6e 73 74 61 6c 6c 28 29 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 | ferInstall()),.new.InputOption(' |
44660 | 6e 6f 2d 61 75 74 6f 6c 6f 61 64 65 72 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f | no-autoloader',.null,.InputOptio |
44680 | 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 53 6b 69 70 73 20 61 75 74 6f 6c 6f 61 64 65 72 | n::VALUE_NONE,.'Skips.autoloader |
446a0 | 20 67 65 6e 65 72 61 74 69 6f 6e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 | .generation'),.new.InputOption(' |
446c0 | 6e 6f 2d 70 72 6f 67 72 65 73 73 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a | no-progress',.null,.InputOption: |
446e0 | 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 44 6f 20 6e 6f 74 20 6f 75 74 70 75 74 20 64 6f 77 6e | :VALUE_NONE,.'Do.not.output.down |
44700 | 6c 6f 61 64 20 70 72 6f 67 72 65 73 73 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f | load.progress.'),.new.InputOptio |
44720 | 6e 28 27 6f 70 74 69 6d 69 7a 65 2d 61 75 74 6f 6c 6f 61 64 65 72 27 2c 20 27 6f 27 2c 20 49 6e | n('optimize-autoloader',.'o',.In |
44740 | 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 4f 70 74 69 6d 69 7a 65 | putOption::VALUE_NONE,.'Optimize |
44760 | 20 61 75 74 6f 6c 6f 61 64 65 72 20 64 75 72 69 6e 67 20 61 75 74 6f 6c 6f 61 64 65 72 20 64 75 | .autoloader.during.autoloader.du |
44780 | 6d 70 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 63 6c 61 73 73 6d 61 70 2d | mp'),.new.InputOption('classmap- |
447a0 | 61 75 74 68 6f 72 69 74 61 74 69 76 65 27 2c 20 27 61 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e | authoritative',.'a',.InputOption |
447c0 | 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 41 75 74 6f 6c 6f 61 64 20 63 6c 61 73 73 65 73 20 | ::VALUE_NONE,.'Autoload.classes. |
447e0 | 66 72 6f 6d 20 74 68 65 20 63 6c 61 73 73 6d 61 70 20 6f 6e 6c 79 2e 20 49 6d 70 6c 69 63 69 74 | from.the.classmap.only..Implicit |
44800 | 6c 79 20 65 6e 61 62 6c 65 73 20 60 2d 2d 6f 70 74 69 6d 69 7a 65 2d 61 75 74 6f 6c 6f 61 64 65 | ly.enables.`--optimize-autoloade |
44820 | 72 60 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 61 70 63 75 2d 61 75 74 | r`.'),.new.InputOption('apcu-aut |
44840 | 6f 6c 6f 61 64 65 72 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c | oloader',.null,.InputOption::VAL |
44860 | 55 45 5f 4e 4f 4e 45 2c 20 27 55 73 65 20 41 50 43 75 20 74 6f 20 63 61 63 68 65 20 66 6f 75 6e | UE_NONE,.'Use.APCu.to.cache.foun |
44880 | 64 2f 6e 6f 74 2d 66 6f 75 6e 64 20 63 6c 61 73 73 65 73 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 | d/not-found.classes.'),.new.Inpu |
448a0 | 74 4f 70 74 69 6f 6e 28 27 61 70 63 75 2d 61 75 74 6f 6c 6f 61 64 65 72 2d 70 72 65 66 69 78 27 | tOption('apcu-autoloader-prefix' |
448c0 | 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 52 45 51 55 49 | ,.null,.InputOption::VALUE_REQUI |
448e0 | 52 45 44 2c 20 27 55 73 65 20 61 20 63 75 73 74 6f 6d 20 70 72 65 66 69 78 20 66 6f 72 20 74 68 | RED,.'Use.a.custom.prefix.for.th |
44900 | 65 20 41 50 43 75 20 61 75 74 6f 6c 6f 61 64 65 72 20 63 61 63 68 65 2e 20 49 6d 70 6c 69 63 69 | e.APCu.autoloader.cache..Implici |
44920 | 74 6c 79 20 65 6e 61 62 6c 65 73 20 2d 2d 61 70 63 75 2d 61 75 74 6f 6c 6f 61 64 65 72 27 29 2c | tly.enables.--apcu-autoloader'), |
44940 | 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 69 67 6e 6f 72 65 2d 70 6c 61 74 66 6f 72 | .new.InputOption('ignore-platfor |
44960 | 6d 2d 72 65 71 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 | m-req',.null,.InputOption::VALUE |
44980 | 5f 52 45 51 55 49 52 45 44 20 7c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 49 | _REQUIRED.|.InputOption::VALUE_I |
449a0 | 53 5f 41 52 52 41 59 2c 20 27 49 67 6e 6f 72 65 20 61 20 73 70 65 63 69 66 69 63 20 70 6c 61 74 | S_ARRAY,.'Ignore.a.specific.plat |
449c0 | 66 6f 72 6d 20 72 65 71 75 69 72 65 6d 65 6e 74 20 28 70 68 70 20 26 20 65 78 74 2d 20 70 61 63 | form.requirement.(php.&.ext-.pac |
449e0 | 6b 61 67 65 73 29 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 69 67 6e 6f | kages).'),.new.InputOption('igno |
44a00 | 72 65 2d 70 6c 61 74 66 6f 72 6d 2d 72 65 71 73 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 | re-platform-reqs',.null,.InputOp |
44a20 | 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 49 67 6e 6f 72 65 20 61 6c 6c 20 70 6c | tion::VALUE_NONE,.'Ignore.all.pl |
44a40 | 61 74 66 6f 72 6d 20 72 65 71 75 69 72 65 6d 65 6e 74 73 20 28 70 68 70 20 26 20 65 78 74 2d 20 | atform.requirements.(php.&.ext-. |
44a60 | 70 61 63 6b 61 67 65 73 29 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 28 | packages).'),.new.InputArgument( |
44a80 | 27 70 61 63 6b 61 67 65 73 27 2c 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 3a 3a 49 53 5f 41 52 | 'packages',.InputArgument::IS_AR |
44aa0 | 52 41 59 20 7c 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 3a 3a 52 45 51 55 49 52 45 44 2c 20 27 | RAY.|.InputArgument::REQUIRED,.' |
44ac0 | 4c 69 73 74 20 6f 66 20 70 61 63 6b 61 67 65 20 6e 61 6d 65 73 20 74 6f 20 72 65 69 6e 73 74 61 | List.of.package.names.to.reinsta |
44ae0 | 6c 6c 2c 20 63 61 6e 20 69 6e 63 6c 75 64 65 20 61 20 77 69 6c 64 63 61 72 64 20 28 2a 29 20 74 | ll,.can.include.a.wildcard.(*).t |
44b00 | 6f 20 6d 61 74 63 68 20 61 6e 79 20 73 75 62 73 74 72 69 6e 67 2e 27 2c 20 6e 75 6c 6c 2c 20 24 | o.match.any.substring.',.null,.$ |
44b20 | 74 68 69 73 2d 3e 73 75 67 67 65 73 74 49 6e 73 74 61 6c 6c 65 64 50 61 63 6b 61 67 65 28 66 61 | this->suggestInstalledPackage(fa |
44b40 | 6c 73 65 29 29 2c 0a 5d 29 0a 2d 3e 73 65 74 48 65 6c 70 28 0a 3c 3c 3c 45 4f 54 0a 54 68 65 20 | lse)),.]).->setHelp(.<<<EOT.The. |
44b60 | 3c 69 6e 66 6f 3e 72 65 69 6e 73 74 61 6c 6c 3c 2f 69 6e 66 6f 3e 20 63 6f 6d 6d 61 6e 64 20 6c | <info>reinstall</info>.command.l |
44b80 | 6f 6f 6b 73 20 75 70 20 69 6e 73 74 61 6c 6c 65 64 20 70 61 63 6b 61 67 65 73 20 62 79 20 6e 61 | ooks.up.installed.packages.by.na |
44ba0 | 6d 65 2c 0a 75 6e 69 6e 73 74 61 6c 6c 73 20 74 68 65 6d 20 61 6e 64 20 72 65 69 6e 73 74 61 6c | me,.uninstalls.them.and.reinstal |
44bc0 | 6c 73 20 74 68 65 6d 2e 20 54 68 69 73 20 6c 65 74 73 20 79 6f 75 20 64 6f 20 61 20 63 6c 65 61 | ls.them..This.lets.you.do.a.clea |
44be0 | 6e 20 69 6e 73 74 61 6c 6c 0a 6f 66 20 61 20 70 61 63 6b 61 67 65 20 69 66 20 79 6f 75 20 6d 65 | n.install.of.a.package.if.you.me |
44c00 | 73 73 65 64 20 77 69 74 68 20 69 74 73 20 66 69 6c 65 73 2c 20 6f 72 20 69 66 20 79 6f 75 20 77 | ssed.with.its.files,.or.if.you.w |
44c20 | 69 73 68 20 74 6f 20 63 68 61 6e 67 65 0a 74 68 65 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 74 | ish.to.change.the.installation.t |
44c40 | 79 70 65 20 75 73 69 6e 67 20 2d 2d 70 72 65 66 65 72 2d 69 6e 73 74 61 6c 6c 2e 0a 0a 3c 69 6e | ype.using.--prefer-install...<in |
44c60 | 66 6f 3e 70 68 70 20 63 6f 6d 70 6f 73 65 72 2e 70 68 61 72 20 72 65 69 6e 73 74 61 6c 6c 20 61 | fo>php.composer.phar.reinstall.a |
44c80 | 63 6d 65 2f 66 6f 6f 20 22 61 63 6d 65 2f 62 61 72 2d 2a 22 3c 2f 69 6e 66 6f 3e 0a 0a 52 65 61 | cme/foo."acme/bar-*"</info>..Rea |
44ca0 | 64 20 6d 6f 72 65 20 61 74 20 68 74 74 70 73 3a 2f 2f 67 65 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 | d.more.at.https://getcomposer.or |
44cc0 | 67 2f 64 6f 63 2f 30 33 2d 63 6c 69 2e 6d 64 23 72 65 69 6e 73 74 61 6c 6c 0a 45 4f 54 0a 29 0a | g/doc/03-cli.md#reinstall.EOT.). |
44ce0 | 3b 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 65 78 65 63 75 74 65 28 | ;.}..protected.function.execute( |
44d00 | 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 69 6e 70 75 74 2c 20 4f 75 74 70 75 74 49 6e 74 | InputInterface.$input,.OutputInt |
44d20 | 65 72 66 61 63 65 20 24 6f 75 74 70 75 74 29 3a 20 69 6e 74 0a 7b 0a 24 69 6f 20 3d 20 24 74 68 | erface.$output):.int.{.$io.=.$th |
44d40 | 69 73 2d 3e 67 65 74 49 4f 28 29 3b 0a 0a 24 63 6f 6d 70 6f 73 65 72 20 3d 20 24 74 68 69 73 2d | is->getIO();..$composer.=.$this- |
44d60 | 3e 72 65 71 75 69 72 65 43 6f 6d 70 6f 73 65 72 28 29 3b 0a 0a 24 6c 6f 63 61 6c 52 65 70 6f 20 | >requireComposer();..$localRepo. |
44d80 | 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 79 4d 61 6e 61 67 65 | =.$composer->getRepositoryManage |
44da0 | 72 28 29 2d 3e 67 65 74 4c 6f 63 61 6c 52 65 70 6f 73 69 74 6f 72 79 28 29 3b 0a 24 70 61 63 6b | r()->getLocalRepository();.$pack |
44dc0 | 61 67 65 73 54 6f 52 65 69 6e 73 74 61 6c 6c 20 3d 20 5b 5d 3b 0a 24 70 61 63 6b 61 67 65 4e 61 | agesToReinstall.=.[];.$packageNa |
44de0 | 6d 65 73 54 6f 52 65 69 6e 73 74 61 6c 6c 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 69 | mesToReinstall.=.[];.foreach.($i |
44e00 | 6e 70 75 74 2d 3e 67 65 74 41 72 67 75 6d 65 6e 74 28 27 70 61 63 6b 61 67 65 73 27 29 20 61 73 | nput->getArgument('packages').as |
44e20 | 20 24 70 61 74 74 65 72 6e 29 20 7b 0a 24 70 61 74 74 65 72 6e 52 65 67 65 78 70 20 3d 20 42 61 | .$pattern).{.$patternRegexp.=.Ba |
44e40 | 73 65 50 61 63 6b 61 67 65 3a 3a 70 61 63 6b 61 67 65 4e 61 6d 65 54 6f 52 65 67 65 78 70 28 24 | sePackage::packageNameToRegexp($ |
44e60 | 70 61 74 74 65 72 6e 29 3b 0a 24 6d 61 74 63 68 65 64 20 3d 20 66 61 6c 73 65 3b 0a 66 6f 72 65 | pattern);.$matched.=.false;.fore |
44e80 | 61 63 68 20 28 24 6c 6f 63 61 6c 52 65 70 6f 2d 3e 67 65 74 43 61 6e 6f 6e 69 63 61 6c 50 61 63 | ach.($localRepo->getCanonicalPac |
44ea0 | 6b 61 67 65 73 28 29 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 69 66 20 28 50 72 65 67 3a | kages().as.$package).{.if.(Preg: |
44ec0 | 3a 69 73 4d 61 74 63 68 28 24 70 61 74 74 65 72 6e 52 65 67 65 78 70 2c 20 24 70 61 63 6b 61 67 | :isMatch($patternRegexp,.$packag |
44ee0 | 65 2d 3e 67 65 74 4e 61 6d 65 28 29 29 29 20 7b 0a 24 6d 61 74 63 68 65 64 20 3d 20 74 72 75 65 | e->getName())).{.$matched.=.true |
44f00 | 3b 0a 24 70 61 63 6b 61 67 65 73 54 6f 52 65 69 6e 73 74 61 6c 6c 5b 5d 20 3d 20 24 70 61 63 6b | ;.$packagesToReinstall[].=.$pack |
44f20 | 61 67 65 3b 0a 24 70 61 63 6b 61 67 65 4e 61 6d 65 73 54 6f 52 65 69 6e 73 74 61 6c 6c 5b 5d 20 | age;.$packageNamesToReinstall[]. |
44f40 | 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 | =.$package->getName();.}.}..if.( |
44f60 | 21 24 6d 61 74 63 68 65 64 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 77 | !$matched).{.$io->writeError('<w |
44f80 | 61 72 6e 69 6e 67 3e 50 61 74 74 65 72 6e 20 22 27 20 2e 20 24 70 61 74 74 65 72 6e 20 2e 20 27 | arning>Pattern."'...$pattern...' |
44fa0 | 22 20 64 6f 65 73 20 6e 6f 74 20 6d 61 74 63 68 20 61 6e 79 20 63 75 72 72 65 6e 74 6c 79 20 69 | ".does.not.match.any.currently.i |
44fc0 | 6e 73 74 61 6c 6c 65 64 20 70 61 63 6b 61 67 65 73 2e 3c 2f 77 61 72 6e 69 6e 67 3e 27 29 3b 0a | nstalled.packages.</warning>');. |
44fe0 | 7d 0a 7d 0a 0a 69 66 20 28 21 24 70 61 63 6b 61 67 65 73 54 6f 52 65 69 6e 73 74 61 6c 6c 29 20 | }.}..if.(!$packagesToReinstall). |
45000 | 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 77 61 72 6e 69 6e 67 3e 46 6f 75 6e | {.$io->writeError('<warning>Foun |
45020 | 64 20 6e 6f 20 70 61 63 6b 61 67 65 73 20 74 6f 20 72 65 69 6e 73 74 61 6c 6c 2c 20 61 62 6f 72 | d.no.packages.to.reinstall,.abor |
45040 | 74 69 6e 67 2e 3c 2f 77 61 72 6e 69 6e 67 3e 27 29 3b 0a 0a 72 65 74 75 72 6e 20 31 3b 0a 7d 0a | ting.</warning>');..return.1;.}. |
45060 | 0a 24 75 6e 69 6e 73 74 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 73 20 3d 20 5b 5d 3b 0a 66 6f 72 65 | .$uninstallOperations.=.[];.fore |
45080 | 61 63 68 20 28 24 70 61 63 6b 61 67 65 73 54 6f 52 65 69 6e 73 74 61 6c 6c 20 61 73 20 24 70 61 | ach.($packagesToReinstall.as.$pa |
450a0 | 63 6b 61 67 65 29 20 7b 0a 24 75 6e 69 6e 73 74 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 73 5b 5d 20 | ckage).{.$uninstallOperations[]. |
450c0 | 3d 20 6e 65 77 20 55 6e 69 6e 73 74 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 28 24 70 61 63 6b 61 67 | =.new.UninstallOperation($packag |
450e0 | 65 29 3b 0a 7d 0a 0a 0a 24 70 72 65 73 65 6e 74 50 61 63 6b 61 67 65 73 20 3d 20 24 6c 6f 63 61 | e);.}...$presentPackages.=.$loca |
45100 | 6c 52 65 70 6f 2d 3e 67 65 74 50 61 63 6b 61 67 65 73 28 29 3b 0a 24 72 65 73 75 6c 74 50 61 63 | lRepo->getPackages();.$resultPac |
45120 | 6b 61 67 65 73 20 3d 20 24 70 72 65 73 65 6e 74 50 61 63 6b 61 67 65 73 3b 0a 66 6f 72 65 61 63 | kages.=.$presentPackages;.foreac |
45140 | 68 20 28 24 70 72 65 73 65 6e 74 50 61 63 6b 61 67 65 73 20 61 73 20 24 69 6e 64 65 78 20 3d 3e | h.($presentPackages.as.$index.=> |
45160 | 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 69 66 20 28 69 6e 5f 61 72 72 61 79 28 24 70 61 63 6b 61 | .$package).{.if.(in_array($packa |
45180 | 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 2c 20 24 70 61 63 6b 61 67 65 4e 61 6d 65 73 54 6f 52 65 | ge->getName(),.$packageNamesToRe |
451a0 | 69 6e 73 74 61 6c 6c 2c 20 74 72 75 65 29 29 20 7b 0a 75 6e 73 65 74 28 24 70 72 65 73 65 6e 74 | install,.true)).{.unset($present |
451c0 | 50 61 63 6b 61 67 65 73 5b 24 69 6e 64 65 78 5d 29 3b 0a 7d 0a 7d 0a 24 74 72 61 6e 73 61 63 74 | Packages[$index]);.}.}.$transact |
451e0 | 69 6f 6e 20 3d 20 6e 65 77 20 54 72 61 6e 73 61 63 74 69 6f 6e 28 24 70 72 65 73 65 6e 74 50 61 | ion.=.new.Transaction($presentPa |
45200 | 63 6b 61 67 65 73 2c 20 24 72 65 73 75 6c 74 50 61 63 6b 61 67 65 73 29 3b 0a 24 69 6e 73 74 61 | ckages,.$resultPackages);.$insta |
45220 | 6c 6c 4f 70 65 72 61 74 69 6f 6e 73 20 3d 20 24 74 72 61 6e 73 61 63 74 69 6f 6e 2d 3e 67 65 74 | llOperations.=.$transaction->get |
45240 | 4f 70 65 72 61 74 69 6f 6e 73 28 29 3b 0a 0a 0a 24 69 6e 73 74 61 6c 6c 4f 72 64 65 72 20 3d 20 | Operations();...$installOrder.=. |
45260 | 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 69 6e 73 74 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 73 20 | [];.foreach.($installOperations. |
45280 | 61 73 20 24 69 6e 64 65 78 20 3d 3e 20 24 6f 70 29 20 7b 0a 69 66 20 28 24 6f 70 20 69 6e 73 74 | as.$index.=>.$op).{.if.($op.inst |
452a0 | 61 6e 63 65 6f 66 20 49 6e 73 74 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 20 26 26 20 21 24 6f 70 2d | anceof.InstallOperation.&&.!$op- |
452c0 | 3e 67 65 74 50 61 63 6b 61 67 65 28 29 20 69 6e 73 74 61 6e 63 65 6f 66 20 41 6c 69 61 73 50 61 | >getPackage().instanceof.AliasPa |
452e0 | 63 6b 61 67 65 29 20 7b 0a 24 69 6e 73 74 61 6c 6c 4f 72 64 65 72 5b 24 6f 70 2d 3e 67 65 74 50 | ckage).{.$installOrder[$op->getP |
45300 | 61 63 6b 61 67 65 28 29 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 20 3d 20 24 69 6e 64 65 78 3b 0a 7d | ackage()->getName()].=.$index;.} |
45320 | 0a 7d 0a 75 73 6f 72 74 28 24 75 6e 69 6e 73 74 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 73 2c 20 73 | .}.usort($uninstallOperations,.s |
45340 | 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 61 2c 20 24 62 29 20 75 73 65 20 28 24 69 6e | tatic.function.($a,.$b).use.($in |
45360 | 73 74 61 6c 6c 4f 72 64 65 72 29 3a 20 69 6e 74 20 7b 0a 72 65 74 75 72 6e 20 24 69 6e 73 74 61 | stallOrder):.int.{.return.$insta |
45380 | 6c 6c 4f 72 64 65 72 5b 24 62 2d 3e 67 65 74 50 61 63 6b 61 67 65 28 29 2d 3e 67 65 74 4e 61 6d | llOrder[$b->getPackage()->getNam |
453a0 | 65 28 29 5d 20 2d 20 24 69 6e 73 74 61 6c 6c 4f 72 64 65 72 5b 24 61 2d 3e 67 65 74 50 61 63 6b | e()].-.$installOrder[$a->getPack |
453c0 | 61 67 65 28 29 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 3b 0a 7d 29 3b 0a 0a 24 63 6f 6d 6d 61 6e 64 | age()->getName()];.});..$command |
453e0 | 45 76 65 6e 74 20 3d 20 6e 65 77 20 43 6f 6d 6d 61 6e 64 45 76 65 6e 74 28 50 6c 75 67 69 6e 45 | Event.=.new.CommandEvent(PluginE |
45400 | 76 65 6e 74 73 3a 3a 43 4f 4d 4d 41 4e 44 2c 20 27 72 65 69 6e 73 74 61 6c 6c 27 2c 20 24 69 6e | vents::COMMAND,.'reinstall',.$in |
45420 | 70 75 74 2c 20 24 6f 75 74 70 75 74 29 3b 0a 24 65 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 20 | put,.$output);.$eventDispatcher. |
45440 | 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 28 | =.$composer->getEventDispatcher( |
45460 | 29 3b 0a 24 65 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 2d 3e 64 69 73 70 61 74 63 68 28 24 63 | );.$eventDispatcher->dispatch($c |
45480 | 6f 6d 6d 61 6e 64 45 76 65 6e 74 2d 3e 67 65 74 4e 61 6d 65 28 29 2c 20 24 63 6f 6d 6d 61 6e 64 | ommandEvent->getName(),.$command |
454a0 | 45 76 65 6e 74 29 3b 0a 0a 24 63 6f 6e 66 69 67 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 | Event);..$config.=.$composer->ge |
454c0 | 74 43 6f 6e 66 69 67 28 29 3b 0a 5b 24 70 72 65 66 65 72 53 6f 75 72 63 65 2c 20 24 70 72 65 66 | tConfig();.[$preferSource,.$pref |
454e0 | 65 72 44 69 73 74 5d 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 50 72 65 66 65 72 72 65 64 49 6e 73 | erDist].=.$this->getPreferredIns |
45500 | 74 61 6c 6c 4f 70 74 69 6f 6e 73 28 24 63 6f 6e 66 69 67 2c 20 24 69 6e 70 75 74 29 3b 0a 0a 24 | tallOptions($config,.$input);..$ |
45520 | 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 72 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d | installationManager.=.$composer- |
45540 | 3e 67 65 74 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 72 28 29 3b 0a 24 64 6f 77 6e | >getInstallationManager();.$down |
45560 | 6c 6f 61 64 4d 61 6e 61 67 65 72 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 44 6f 77 6e | loadManager.=.$composer->getDown |
45580 | 6c 6f 61 64 4d 61 6e 61 67 65 72 28 29 3b 0a 24 70 61 63 6b 61 67 65 20 3d 20 24 63 6f 6d 70 6f | loadManager();.$package.=.$compo |
455a0 | 73 65 72 2d 3e 67 65 74 50 61 63 6b 61 67 65 28 29 3b 0a 0a 24 69 6e 73 74 61 6c 6c 61 74 69 6f | ser->getPackage();..$installatio |
455c0 | 6e 4d 61 6e 61 67 65 72 2d 3e 73 65 74 4f 75 74 70 75 74 50 72 6f 67 72 65 73 73 28 21 24 69 6e | nManager->setOutputProgress(!$in |
455e0 | 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 70 72 6f 67 72 65 73 73 27 29 29 3b 0a | put->getOption('no-progress'));. |
45600 | 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 70 6c 75 67 69 6e | if.($input->getOption('no-plugin |
45620 | 73 27 29 29 20 7b 0a 24 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 72 2d 3e 64 69 73 | s')).{.$installationManager->dis |
45640 | 61 62 6c 65 50 6c 75 67 69 6e 73 28 29 3b 0a 7d 0a 0a 24 64 6f 77 6e 6c 6f 61 64 4d 61 6e 61 67 | ablePlugins();.}..$downloadManag |
45660 | 65 72 2d 3e 73 65 74 50 72 65 66 65 72 53 6f 75 72 63 65 28 24 70 72 65 66 65 72 53 6f 75 72 63 | er->setPreferSource($preferSourc |
45680 | 65 29 3b 0a 24 64 6f 77 6e 6c 6f 61 64 4d 61 6e 61 67 65 72 2d 3e 73 65 74 50 72 65 66 65 72 44 | e);.$downloadManager->setPreferD |
456a0 | 69 73 74 28 24 70 72 65 66 65 72 44 69 73 74 29 3b 0a 0a 24 64 65 76 4d 6f 64 65 20 3d 20 24 6c | ist($preferDist);..$devMode.=.$l |
456c0 | 6f 63 61 6c 52 65 70 6f 2d 3e 67 65 74 44 65 76 4d 6f 64 65 28 29 20 21 3d 3d 20 6e 75 6c 6c 20 | ocalRepo->getDevMode().!==.null. |
456e0 | 3f 20 24 6c 6f 63 61 6c 52 65 70 6f 2d 3e 67 65 74 44 65 76 4d 6f 64 65 28 29 20 3a 20 74 72 75 | ?.$localRepo->getDevMode().:.tru |
45700 | 65 3b 0a 0a 50 6c 61 74 66 6f 72 6d 3a 3a 70 75 74 45 6e 76 28 27 43 4f 4d 50 4f 53 45 52 5f 44 | e;..Platform::putEnv('COMPOSER_D |
45720 | 45 56 5f 4d 4f 44 45 27 2c 20 24 64 65 76 4d 6f 64 65 20 3f 20 27 31 27 20 3a 20 27 30 27 29 3b | EV_MODE',.$devMode.?.'1'.:.'0'); |
45740 | 0a 24 65 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 2d 3e 64 69 73 70 61 74 63 68 53 63 72 69 70 | .$eventDispatcher->dispatchScrip |
45760 | 74 28 53 63 72 69 70 74 45 76 65 6e 74 73 3a 3a 50 52 45 5f 49 4e 53 54 41 4c 4c 5f 43 4d 44 2c | t(ScriptEvents::PRE_INSTALL_CMD, |
45780 | 20 24 64 65 76 4d 6f 64 65 29 3b 0a 0a 24 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 | .$devMode);..$installationManage |
457a0 | 72 2d 3e 65 78 65 63 75 74 65 28 24 6c 6f 63 61 6c 52 65 70 6f 2c 20 24 75 6e 69 6e 73 74 61 6c | r->execute($localRepo,.$uninstal |
457c0 | 6c 4f 70 65 72 61 74 69 6f 6e 73 2c 20 24 64 65 76 4d 6f 64 65 29 3b 0a 24 69 6e 73 74 61 6c 6c | lOperations,.$devMode);.$install |
457e0 | 61 74 69 6f 6e 4d 61 6e 61 67 65 72 2d 3e 65 78 65 63 75 74 65 28 24 6c 6f 63 61 6c 52 65 70 6f | ationManager->execute($localRepo |
45800 | 2c 20 24 69 6e 73 74 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 73 2c 20 24 64 65 76 4d 6f 64 65 29 3b | ,.$installOperations,.$devMode); |
45820 | 0a 0a 69 66 20 28 21 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 61 75 74 | ..if.(!$input->getOption('no-aut |
45840 | 6f 6c 6f 61 64 65 72 27 29 29 20 7b 0a 24 6f 70 74 69 6d 69 7a 65 20 3d 20 24 69 6e 70 75 74 2d | oloader')).{.$optimize.=.$input- |
45860 | 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6f 70 74 69 6d 69 7a 65 2d 61 75 74 6f 6c 6f 61 64 65 72 27 | >getOption('optimize-autoloader' |
45880 | 29 20 7c 7c 20 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 6f 70 74 69 6d 69 7a 65 2d 61 75 74 6f | ).||.$config->get('optimize-auto |
458a0 | 6c 6f 61 64 65 72 27 29 3b 0a 24 61 75 74 68 6f 72 69 74 61 74 69 76 65 20 3d 20 24 69 6e 70 75 | loader');.$authoritative.=.$inpu |
458c0 | 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 63 6c 61 73 73 6d 61 70 2d 61 75 74 68 6f 72 69 74 61 | t->getOption('classmap-authorita |
458e0 | 74 69 76 65 27 29 20 7c 7c 20 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 63 6c 61 73 73 6d 61 70 | tive').||.$config->get('classmap |
45900 | 2d 61 75 74 68 6f 72 69 74 61 74 69 76 65 27 29 3b 0a 24 61 70 63 75 50 72 65 66 69 78 20 3d 20 | -authoritative');.$apcuPrefix.=. |
45920 | 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 61 70 63 75 2d 61 75 74 6f 6c 6f 61 64 | $input->getOption('apcu-autoload |
45940 | 65 72 2d 70 72 65 66 69 78 27 29 3b 0a 24 61 70 63 75 20 3d 20 24 61 70 63 75 50 72 65 66 69 78 | er-prefix');.$apcu.=.$apcuPrefix |
45960 | 20 21 3d 3d 20 6e 75 6c 6c 20 7c 7c 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 | .!==.null.||.$input->getOption(' |
45980 | 61 70 63 75 2d 61 75 74 6f 6c 6f 61 64 65 72 27 29 20 7c 7c 20 24 63 6f 6e 66 69 67 2d 3e 67 65 | apcu-autoloader').||.$config->ge |
459a0 | 74 28 27 61 70 63 75 2d 61 75 74 6f 6c 6f 61 64 65 72 27 29 3b 0a 0a 24 67 65 6e 65 72 61 74 6f | t('apcu-autoloader');..$generato |
459c0 | 72 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 41 75 74 6f 6c 6f 61 64 47 65 6e 65 72 61 | r.=.$composer->getAutoloadGenera |
459e0 | 74 6f 72 28 29 3b 0a 24 67 65 6e 65 72 61 74 6f 72 2d 3e 73 65 74 43 6c 61 73 73 4d 61 70 41 75 | tor();.$generator->setClassMapAu |
45a00 | 74 68 6f 72 69 74 61 74 69 76 65 28 24 61 75 74 68 6f 72 69 74 61 74 69 76 65 29 3b 0a 24 67 65 | thoritative($authoritative);.$ge |
45a20 | 6e 65 72 61 74 6f 72 2d 3e 73 65 74 41 70 63 75 28 24 61 70 63 75 2c 20 24 61 70 63 75 50 72 65 | nerator->setApcu($apcu,.$apcuPre |
45a40 | 66 69 78 29 3b 0a 24 67 65 6e 65 72 61 74 6f 72 2d 3e 73 65 74 50 6c 61 74 66 6f 72 6d 52 65 71 | fix);.$generator->setPlatformReq |
45a60 | 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 28 24 74 68 69 73 2d 3e 67 65 74 50 6c 61 74 66 6f 72 | uirementFilter($this->getPlatfor |
45a80 | 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 28 24 69 6e 70 75 74 29 29 3b 0a 24 67 65 | mRequirementFilter($input));.$ge |
45aa0 | 6e 65 72 61 74 6f 72 2d 3e 64 75 6d 70 28 24 63 6f 6e 66 69 67 2c 20 24 6c 6f 63 61 6c 52 65 70 | nerator->dump($config,.$localRep |
45ac0 | 6f 2c 20 24 70 61 63 6b 61 67 65 2c 20 24 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 | o,.$package,.$installationManage |
45ae0 | 72 2c 20 27 63 6f 6d 70 6f 73 65 72 27 2c 20 24 6f 70 74 69 6d 69 7a 65 29 3b 0a 7d 0a 0a 24 65 | r,.'composer',.$optimize);.}..$e |
45b00 | 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 2d 3e 64 69 73 70 61 74 63 68 53 63 72 69 70 74 28 53 | ventDispatcher->dispatchScript(S |
45b20 | 63 72 69 70 74 45 76 65 6e 74 73 3a 3a 50 4f 53 54 5f 49 4e 53 54 41 4c 4c 5f 43 4d 44 2c 20 24 | criptEvents::POST_INSTALL_CMD,.$ |
45b40 | 64 65 76 4d 6f 64 65 29 3b 0a 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 | devMode);..return.0;.}.}.<?php.d |
45b60 | 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a | eclare(strict_types=1);......... |
45b80 | 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6d 6d 61 6e 64 3b 0a 0a | ...namespace.Composer\Command;.. |
45ba0 | 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 66 69 67 5c 4a 73 6f 6e 43 6f 6e 66 69 67 53 6f | use.Composer\Config\JsonConfigSo |
45bc0 | 75 72 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 | urce;.use.Composer\DependencyRes |
45be0 | 6f 6c 76 65 72 5c 52 65 71 75 65 73 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 6e 73 74 | olver\Request;.use.Composer\Inst |
45c00 | 61 6c 6c 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 63 72 65 5c 50 72 65 67 3b 0a 75 | aller;.use.Composer\Pcre\Preg;.u |
45c20 | 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 6c 75 67 69 6e 5c 43 6f 6d 6d 61 6e 64 45 76 65 6e 74 3b | se.Composer\Plugin\CommandEvent; |
45c40 | 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 6c 75 67 69 6e 5c 50 6c 75 67 69 6e 45 76 65 6e 74 | .use.Composer\Plugin\PluginEvent |
45c60 | 73 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 4a 73 6f 6e 5c 4a 73 6f 6e 46 69 6c 65 3b 0a 75 | s;.use.Composer\Json\JsonFile;.u |
45c80 | 73 65 20 43 6f 6d 70 6f 73 65 72 5c 46 61 63 74 6f 72 79 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 | se.Composer\Factory;.use.Symfony |
45ca0 | 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 49 6e | \Component\Console\Input\InputIn |
45cc0 | 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 73 6f 6c 65 5c 49 6e | terface;.use.Composer\Console\In |
45ce0 | 70 75 74 5c 49 6e 70 75 74 4f 70 74 69 6f 6e 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f | put\InputOption;.use.Composer\Co |
45d00 | 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 3b 0a 75 73 65 20 53 | nsole\Input\InputArgument;.use.S |
45d20 | 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 4f 75 74 70 75 74 5c | ymfony\Component\Console\Output\ |
45d40 | 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 | OutputInterface;.use.Composer\Pa |
45d60 | 63 6b 61 67 65 5c 42 61 73 65 50 61 63 6b 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c | ckage\BasePackage;.use.Composer\ |
45d80 | 41 64 76 69 73 6f 72 79 5c 41 75 64 69 74 6f 72 3b 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 52 65 6d | Advisory\Auditor;......class.Rem |
45da0 | 6f 76 65 43 6f 6d 6d 61 6e 64 20 65 78 74 65 6e 64 73 20 42 61 73 65 43 6f 6d 6d 61 6e 64 0a 7b | oveCommand.extends.BaseCommand.{ |
45dc0 | 0a 75 73 65 20 43 6f 6d 70 6c 65 74 69 6f 6e 54 72 61 69 74 3b 0a 0a 0a 0a 0a 70 72 6f 74 65 63 | .use.CompletionTrait;.....protec |
45de0 | 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 63 6f 6e 66 69 67 75 72 65 28 29 0a 7b 0a 24 74 68 69 73 | ted.function.configure().{.$this |
45e00 | 0a 2d 3e 73 65 74 4e 61 6d 65 28 27 72 65 6d 6f 76 65 27 29 0a 2d 3e 73 65 74 44 65 73 63 72 69 | .->setName('remove').->setDescri |
45e20 | 70 74 69 6f 6e 28 27 52 65 6d 6f 76 65 73 20 61 20 70 61 63 6b 61 67 65 20 66 72 6f 6d 20 74 68 | ption('Removes.a.package.from.th |
45e40 | 65 20 72 65 71 75 69 72 65 20 6f 72 20 72 65 71 75 69 72 65 2d 64 65 76 27 29 0a 2d 3e 73 65 74 | e.require.or.require-dev').->set |
45e60 | 44 65 66 69 6e 69 74 69 6f 6e 28 5b 0a 6e 65 77 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 28 27 | Definition([.new.InputArgument(' |
45e80 | 70 61 63 6b 61 67 65 73 27 2c 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 3a 3a 49 53 5f 41 52 52 | packages',.InputArgument::IS_ARR |
45ea0 | 41 59 20 7c 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 3a 3a 52 45 51 55 49 52 45 44 2c 20 27 50 | AY.|.InputArgument::REQUIRED,.'P |
45ec0 | 61 63 6b 61 67 65 73 20 74 68 61 74 20 73 68 6f 75 6c 64 20 62 65 20 72 65 6d 6f 76 65 64 2e 27 | ackages.that.should.be.removed.' |
45ee0 | 2c 20 6e 75 6c 6c 2c 20 24 74 68 69 73 2d 3e 73 75 67 67 65 73 74 52 6f 6f 74 52 65 71 75 69 72 | ,.null,.$this->suggestRootRequir |
45f00 | 65 6d 65 6e 74 28 29 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 64 65 76 27 2c | ement()),.new.InputOption('dev', |
45f20 | 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 | .null,.InputOption::VALUE_NONE,. |
45f40 | 27 52 65 6d 6f 76 65 73 20 61 20 70 61 63 6b 61 67 65 20 66 72 6f 6d 20 74 68 65 20 72 65 71 75 | 'Removes.a.package.from.the.requ |
45f60 | 69 72 65 2d 64 65 76 20 73 65 63 74 69 6f 6e 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 | ire-dev.section.'),.new.InputOpt |
45f80 | 69 6f 6e 28 27 64 72 79 2d 72 75 6e 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e | ion('dry-run',.null,.InputOption |
45fa0 | 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 4f 75 74 70 75 74 73 20 74 68 65 20 6f 70 65 72 61 | ::VALUE_NONE,.'Outputs.the.opera |
45fc0 | 74 69 6f 6e 73 20 62 75 74 20 77 69 6c 6c 20 6e 6f 74 20 65 78 65 63 75 74 65 20 61 6e 79 74 68 | tions.but.will.not.execute.anyth |
45fe0 | 69 6e 67 20 28 69 6d 70 6c 69 63 69 74 6c 79 20 65 6e 61 62 6c 65 73 20 2d 2d 76 65 72 62 6f 73 | ing.(implicitly.enables.--verbos |
46000 | 65 29 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 70 72 6f 67 72 | e).'),.new.InputOption('no-progr |
46020 | 65 73 73 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e | ess',.null,.InputOption::VALUE_N |
46040 | 4f 4e 45 2c 20 27 44 6f 20 6e 6f 74 20 6f 75 74 70 75 74 20 64 6f 77 6e 6c 6f 61 64 20 70 72 6f | ONE,.'Do.not.output.download.pro |
46060 | 67 72 65 73 73 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 75 70 | gress.'),.new.InputOption('no-up |
46080 | 64 61 74 65 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f | date',.null,.InputOption::VALUE_ |
460a0 | 4e 4f 4e 45 2c 20 27 44 69 73 61 62 6c 65 73 20 74 68 65 20 61 75 74 6f 6d 61 74 69 63 20 75 70 | NONE,.'Disables.the.automatic.up |
460c0 | 64 61 74 65 20 6f 66 20 74 68 65 20 64 65 70 65 6e 64 65 6e 63 69 65 73 20 28 69 6d 70 6c 69 65 | date.of.the.dependencies.(implie |
460e0 | 73 20 2d 2d 6e 6f 2d 69 6e 73 74 61 6c 6c 29 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 | s.--no-install).'),.new.InputOpt |
46100 | 69 6f 6e 28 27 6e 6f 2d 69 6e 73 74 61 6c 6c 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 | ion('no-install',.null,.InputOpt |
46120 | 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 53 6b 69 70 20 74 68 65 20 69 6e 73 74 61 | ion::VALUE_NONE,.'Skip.the.insta |
46140 | 6c 6c 20 73 74 65 70 20 61 66 74 65 72 20 75 70 64 61 74 69 6e 67 20 74 68 65 20 63 6f 6d 70 6f | ll.step.after.updating.the.compo |
46160 | 73 65 72 2e 6c 6f 63 6b 20 66 69 6c 65 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f | ser.lock.file.'),.new.InputOptio |
46180 | 6e 28 27 6e 6f 2d 61 75 64 69 74 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a | n('no-audit',.null,.InputOption: |
461a0 | 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 53 6b 69 70 20 74 68 65 20 61 75 64 69 74 20 73 74 65 | :VALUE_NONE,.'Skip.the.audit.ste |
461c0 | 70 20 61 66 74 65 72 20 75 70 64 61 74 69 6e 67 20 74 68 65 20 63 6f 6d 70 6f 73 65 72 2e 6c 6f | p.after.updating.the.composer.lo |
461e0 | 63 6b 20 66 69 6c 65 20 28 63 61 6e 20 61 6c 73 6f 20 62 65 20 73 65 74 20 76 69 61 20 74 68 65 | ck.file.(can.also.be.set.via.the |
46200 | 20 43 4f 4d 50 4f 53 45 52 5f 4e 4f 5f 41 55 44 49 54 3d 31 20 65 6e 76 20 76 61 72 29 2e 27 29 | .COMPOSER_NO_AUDIT=1.env.var).') |
46220 | 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 61 75 64 69 74 2d 66 6f 72 6d 61 74 27 | ,.new.InputOption('audit-format' |
46240 | 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 52 45 51 55 49 | ,.null,.InputOption::VALUE_REQUI |
46260 | 52 45 44 2c 20 27 41 75 64 69 74 20 6f 75 74 70 75 74 20 66 6f 72 6d 61 74 2e 20 4d 75 73 74 20 | RED,.'Audit.output.format..Must. |
46280 | 62 65 20 22 74 61 62 6c 65 22 2c 20 22 70 6c 61 69 6e 22 2c 20 22 6a 73 6f 6e 22 2c 20 6f 72 20 | be."table",."plain",."json",.or. |
462a0 | 22 73 75 6d 6d 61 72 79 22 2e 27 2c 20 41 75 64 69 74 6f 72 3a 3a 46 4f 52 4d 41 54 5f 53 55 4d | "summary".',.Auditor::FORMAT_SUM |
462c0 | 4d 41 52 59 2c 20 41 75 64 69 74 6f 72 3a 3a 46 4f 52 4d 41 54 53 29 2c 0a 6e 65 77 20 49 6e 70 | MARY,.Auditor::FORMATS),.new.Inp |
462e0 | 75 74 4f 70 74 69 6f 6e 28 27 75 70 64 61 74 65 2d 6e 6f 2d 64 65 76 27 2c 20 6e 75 6c 6c 2c 20 | utOption('update-no-dev',.null,. |
46300 | 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 52 75 6e 20 74 68 | InputOption::VALUE_NONE,.'Run.th |
46320 | 65 20 64 65 70 65 6e 64 65 6e 63 79 20 75 70 64 61 74 65 20 77 69 74 68 20 74 68 65 20 2d 2d 6e | e.dependency.update.with.the.--n |
46340 | 6f 2d 64 65 76 20 6f 70 74 69 6f 6e 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e | o-dev.option.'),.new.InputOption |
46360 | 28 27 75 70 64 61 74 65 2d 77 69 74 68 2d 64 65 70 65 6e 64 65 6e 63 69 65 73 27 2c 20 27 77 27 | ('update-with-dependencies',.'w' |
46380 | 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 41 6c 6c 6f | ,.InputOption::VALUE_NONE,.'Allo |
463a0 | 77 73 20 69 6e 68 65 72 69 74 65 64 20 64 65 70 65 6e 64 65 6e 63 69 65 73 20 74 6f 20 62 65 20 | ws.inherited.dependencies.to.be. |
463c0 | 75 70 64 61 74 65 64 20 77 69 74 68 20 65 78 70 6c 69 63 69 74 20 64 65 70 65 6e 64 65 6e 63 69 | updated.with.explicit.dependenci |
463e0 | 65 73 2e 20 28 44 65 70 72 65 63 72 61 74 65 64 2c 20 69 73 20 6e 6f 77 20 64 65 66 61 75 6c 74 | es..(Deprecrated,.is.now.default |
46400 | 20 62 65 68 61 76 69 6f 72 29 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 75 | .behavior)'),.new.InputOption('u |
46420 | 70 64 61 74 65 2d 77 69 74 68 2d 61 6c 6c 2d 64 65 70 65 6e 64 65 6e 63 69 65 73 27 2c 20 27 57 | pdate-with-all-dependencies',.'W |
46440 | 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 41 6c 6c | ',.InputOption::VALUE_NONE,.'All |
46460 | 6f 77 73 20 61 6c 6c 20 69 6e 68 65 72 69 74 65 64 20 64 65 70 65 6e 64 65 6e 63 69 65 73 20 74 | ows.all.inherited.dependencies.t |
46480 | 6f 20 62 65 20 75 70 64 61 74 65 64 2c 20 69 6e 63 6c 75 64 69 6e 67 20 74 68 6f 73 65 20 74 68 | o.be.updated,.including.those.th |
464a0 | 61 74 20 61 72 65 20 72 6f 6f 74 20 72 65 71 75 69 72 65 6d 65 6e 74 73 2e 27 29 2c 0a 6e 65 77 | at.are.root.requirements.'),.new |
464c0 | 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 77 69 74 68 2d 61 6c 6c 2d 64 65 70 65 6e 64 65 6e 63 | .InputOption('with-all-dependenc |
464e0 | 69 65 73 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e | ies',.null,.InputOption::VALUE_N |
46500 | 4f 4e 45 2c 20 27 41 6c 69 61 73 20 66 6f 72 20 2d 2d 75 70 64 61 74 65 2d 77 69 74 68 2d 61 6c | ONE,.'Alias.for.--update-with-al |
46520 | 6c 2d 64 65 70 65 6e 64 65 6e 63 69 65 73 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f | l-dependencies'),.new.InputOptio |
46540 | 6e 28 27 6e 6f 2d 75 70 64 61 74 65 2d 77 69 74 68 2d 64 65 70 65 6e 64 65 6e 63 69 65 73 27 2c | n('no-update-with-dependencies', |
46560 | 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 | .null,.InputOption::VALUE_NONE,. |
46580 | 27 44 6f 65 73 20 6e 6f 74 20 61 6c 6c 6f 77 20 69 6e 68 65 72 69 74 65 64 20 64 65 70 65 6e 64 | 'Does.not.allow.inherited.depend |
465a0 | 65 6e 63 69 65 73 20 74 6f 20 62 65 20 75 70 64 61 74 65 64 20 77 69 74 68 20 65 78 70 6c 69 63 | encies.to.be.updated.with.explic |
465c0 | 69 74 20 64 65 70 65 6e 64 65 6e 63 69 65 73 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 | it.dependencies.'),.new.InputOpt |
465e0 | 69 6f 6e 28 27 75 6e 75 73 65 64 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a | ion('unused',.null,.InputOption: |
46600 | 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 52 65 6d 6f 76 65 20 61 6c 6c 20 70 61 63 6b 61 67 65 | :VALUE_NONE,.'Remove.all.package |
46620 | 73 20 77 68 69 63 68 20 61 72 65 20 6c 6f 63 6b 65 64 20 62 75 74 20 6e 6f 74 20 72 65 71 75 69 | s.which.are.locked.but.not.requi |
46640 | 72 65 64 20 62 79 20 61 6e 79 20 6f 74 68 65 72 20 70 61 63 6b 61 67 65 2e 27 29 2c 0a 6e 65 77 | red.by.any.other.package.'),.new |
46660 | 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 69 67 6e 6f 72 65 2d 70 6c 61 74 66 6f 72 6d 2d 72 65 | .InputOption('ignore-platform-re |
46680 | 71 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 52 45 51 | q',.null,.InputOption::VALUE_REQ |
466a0 | 55 49 52 45 44 20 7c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 49 53 5f 41 52 | UIRED.|.InputOption::VALUE_IS_AR |
466c0 | 52 41 59 2c 20 27 49 67 6e 6f 72 65 20 61 20 73 70 65 63 69 66 69 63 20 70 6c 61 74 66 6f 72 6d | RAY,.'Ignore.a.specific.platform |
466e0 | 20 72 65 71 75 69 72 65 6d 65 6e 74 20 28 70 68 70 20 26 20 65 78 74 2d 20 70 61 63 6b 61 67 65 | .requirement.(php.&.ext-.package |
46700 | 73 29 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 69 67 6e 6f 72 65 2d 70 | s).'),.new.InputOption('ignore-p |
46720 | 6c 61 74 66 6f 72 6d 2d 72 65 71 73 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e | latform-reqs',.null,.InputOption |
46740 | 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 49 67 6e 6f 72 65 20 61 6c 6c 20 70 6c 61 74 66 6f | ::VALUE_NONE,.'Ignore.all.platfo |
46760 | 72 6d 20 72 65 71 75 69 72 65 6d 65 6e 74 73 20 28 70 68 70 20 26 20 65 78 74 2d 20 70 61 63 6b | rm.requirements.(php.&.ext-.pack |
46780 | 61 67 65 73 29 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6f 70 74 69 6d | ages).'),.new.InputOption('optim |
467a0 | 69 7a 65 2d 61 75 74 6f 6c 6f 61 64 65 72 27 2c 20 27 6f 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f | ize-autoloader',.'o',.InputOptio |
467c0 | 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 4f 70 74 69 6d 69 7a 65 20 61 75 74 6f 6c 6f 61 | n::VALUE_NONE,.'Optimize.autoloa |
467e0 | 64 65 72 20 64 75 72 69 6e 67 20 61 75 74 6f 6c 6f 61 64 65 72 20 64 75 6d 70 27 29 2c 0a 6e 65 | der.during.autoloader.dump'),.ne |
46800 | 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 63 6c 61 73 73 6d 61 70 2d 61 75 74 68 6f 72 69 74 | w.InputOption('classmap-authorit |
46820 | 61 74 69 76 65 27 2c 20 27 61 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f | ative',.'a',.InputOption::VALUE_ |
46840 | 4e 4f 4e 45 2c 20 27 41 75 74 6f 6c 6f 61 64 20 63 6c 61 73 73 65 73 20 66 72 6f 6d 20 74 68 65 | NONE,.'Autoload.classes.from.the |
46860 | 20 63 6c 61 73 73 6d 61 70 20 6f 6e 6c 79 2e 20 49 6d 70 6c 69 63 69 74 6c 79 20 65 6e 61 62 6c | .classmap.only..Implicitly.enabl |
46880 | 65 73 20 60 2d 2d 6f 70 74 69 6d 69 7a 65 2d 61 75 74 6f 6c 6f 61 64 65 72 60 2e 27 29 2c 0a 6e | es.`--optimize-autoloader`.'),.n |
468a0 | 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 61 70 63 75 2d 61 75 74 6f 6c 6f 61 64 65 72 27 | ew.InputOption('apcu-autoloader' |
468c0 | 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c | ,.null,.InputOption::VALUE_NONE, |
468e0 | 20 27 55 73 65 20 41 50 43 75 20 74 6f 20 63 61 63 68 65 20 66 6f 75 6e 64 2f 6e 6f 74 2d 66 6f | .'Use.APCu.to.cache.found/not-fo |
46900 | 75 6e 64 20 63 6c 61 73 73 65 73 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 | und.classes.'),.new.InputOption( |
46920 | 27 61 70 63 75 2d 61 75 74 6f 6c 6f 61 64 65 72 2d 70 72 65 66 69 78 27 2c 20 6e 75 6c 6c 2c 20 | 'apcu-autoloader-prefix',.null,. |
46940 | 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 52 45 51 55 49 52 45 44 2c 20 27 55 73 | InputOption::VALUE_REQUIRED,.'Us |
46960 | 65 20 61 20 63 75 73 74 6f 6d 20 70 72 65 66 69 78 20 66 6f 72 20 74 68 65 20 41 50 43 75 20 61 | e.a.custom.prefix.for.the.APCu.a |
46980 | 75 74 6f 6c 6f 61 64 65 72 20 63 61 63 68 65 2e 20 49 6d 70 6c 69 63 69 74 6c 79 20 65 6e 61 62 | utoloader.cache..Implicitly.enab |
469a0 | 6c 65 73 20 2d 2d 61 70 63 75 2d 61 75 74 6f 6c 6f 61 64 65 72 27 29 2c 0a 5d 29 0a 2d 3e 73 65 | les.--apcu-autoloader'),.]).->se |
469c0 | 74 48 65 6c 70 28 0a 3c 3c 3c 45 4f 54 0a 54 68 65 20 3c 69 6e 66 6f 3e 72 65 6d 6f 76 65 3c 2f | tHelp(.<<<EOT.The.<info>remove</ |
469e0 | 69 6e 66 6f 3e 20 63 6f 6d 6d 61 6e 64 20 72 65 6d 6f 76 65 73 20 61 20 70 61 63 6b 61 67 65 20 | info>.command.removes.a.package. |
46a00 | 66 72 6f 6d 20 74 68 65 20 63 75 72 72 65 6e 74 0a 6c 69 73 74 20 6f 66 20 69 6e 73 74 61 6c 6c | from.the.current.list.of.install |
46a20 | 65 64 20 70 61 63 6b 61 67 65 73 0a 0a 3c 69 6e 66 6f 3e 70 68 70 20 63 6f 6d 70 6f 73 65 72 2e | ed.packages..<info>php.composer. |
46a40 | 70 68 61 72 20 72 65 6d 6f 76 65 3c 2f 69 6e 66 6f 3e 0a 0a 52 65 61 64 20 6d 6f 72 65 20 61 74 | phar.remove</info>..Read.more.at |
46a60 | 20 68 74 74 70 73 3a 2f 2f 67 65 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 67 2f 64 6f 63 2f 30 33 2d | .https://getcomposer.org/doc/03- |
46a80 | 63 6c 69 2e 6d 64 23 72 65 6d 6f 76 65 0a 45 4f 54 0a 29 0a 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 | cli.md#remove.EOT.).;.}.....prot |
46aa0 | 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 69 6e 74 65 72 61 63 74 28 49 6e 70 75 74 49 6e 74 | ected.function.interact(InputInt |
46ac0 | 65 72 66 61 63 65 20 24 69 6e 70 75 74 2c 20 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 | erface.$input,.OutputInterface.$ |
46ae0 | 6f 75 74 70 75 74 29 0a 7b 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 | output).{.if.($input->getOption( |
46b00 | 27 75 6e 75 73 65 64 27 29 29 20 7b 0a 24 63 6f 6d 70 6f 73 65 72 20 3d 20 24 74 68 69 73 2d 3e | 'unused')).{.$composer.=.$this-> |
46b20 | 72 65 71 75 69 72 65 43 6f 6d 70 6f 73 65 72 28 29 3b 0a 24 6c 6f 63 6b 65 72 20 3d 20 24 63 6f | requireComposer();.$locker.=.$co |
46b40 | 6d 70 6f 73 65 72 2d 3e 67 65 74 4c 6f 63 6b 65 72 28 29 3b 0a 69 66 20 28 21 24 6c 6f 63 6b 65 | mposer->getLocker();.if.(!$locke |
46b60 | 72 2d 3e 69 73 4c 6f 63 6b 65 64 28 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 55 6e 65 78 | r->isLocked()).{.throw.new.\Unex |
46b80 | 70 65 63 74 65 64 56 61 6c 75 65 45 78 63 65 70 74 69 6f 6e 28 27 41 20 76 61 6c 69 64 20 63 6f | pectedValueException('A.valid.co |
46ba0 | 6d 70 6f 73 65 72 2e 6c 6f 63 6b 20 66 69 6c 65 20 69 73 20 72 65 71 75 69 72 65 64 20 74 6f 20 | mposer.lock.file.is.required.to. |
46bc0 | 72 75 6e 20 74 68 69 73 20 63 6f 6d 6d 61 6e 64 20 77 69 74 68 20 2d 2d 75 6e 75 73 65 64 27 29 | run.this.command.with.--unused') |
46be0 | 3b 0a 7d 0a 0a 24 6c 6f 63 6b 65 64 50 61 63 6b 61 67 65 73 20 3d 20 24 6c 6f 63 6b 65 72 2d 3e | ;.}..$lockedPackages.=.$locker-> |
46c00 | 67 65 74 4c 6f 63 6b 65 64 52 65 70 6f 73 69 74 6f 72 79 28 29 2d 3e 67 65 74 50 61 63 6b 61 67 | getLockedRepository()->getPackag |
46c20 | 65 73 28 29 3b 0a 0a 24 72 65 71 75 69 72 65 64 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 | es();..$required.=.[];.foreach.( |
46c40 | 61 72 72 61 79 5f 6d 65 72 67 65 28 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 50 61 63 6b 61 67 | array_merge($composer->getPackag |
46c60 | 65 28 29 2d 3e 67 65 74 52 65 71 75 69 72 65 73 28 29 2c 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 | e()->getRequires(),.$composer->g |
46c80 | 65 74 50 61 63 6b 61 67 65 28 29 2d 3e 67 65 74 44 65 76 52 65 71 75 69 72 65 73 28 29 29 20 61 | etPackage()->getDevRequires()).a |
46ca0 | 73 20 24 6c 69 6e 6b 29 20 7b 0a 24 72 65 71 75 69 72 65 64 5b 24 6c 69 6e 6b 2d 3e 67 65 74 54 | s.$link).{.$required[$link->getT |
46cc0 | 61 72 67 65 74 28 29 5d 20 3d 20 74 72 75 65 3b 0a 7d 0a 0a 64 6f 20 7b 0a 24 66 6f 75 6e 64 20 | arget()].=.true;.}..do.{.$found. |
46ce0 | 3d 20 66 61 6c 73 65 3b 0a 66 6f 72 65 61 63 68 20 28 24 6c 6f 63 6b 65 64 50 61 63 6b 61 67 65 | =.false;.foreach.($lockedPackage |
46d00 | 73 20 61 73 20 24 69 6e 64 65 78 20 3d 3e 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 66 6f 72 65 61 | s.as.$index.=>.$package).{.forea |
46d20 | 63 68 20 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 73 28 29 20 61 73 20 24 6e 61 6d | ch.($package->getNames().as.$nam |
46d40 | 65 29 20 7b 0a 69 66 20 28 69 73 73 65 74 28 24 72 65 71 75 69 72 65 64 5b 24 6e 61 6d 65 5d 29 | e).{.if.(isset($required[$name]) |
46d60 | 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 52 65 71 75 69 72 | ).{.foreach.($package->getRequir |
46d80 | 65 73 28 29 20 61 73 20 24 6c 69 6e 6b 29 20 7b 0a 24 72 65 71 75 69 72 65 64 5b 24 6c 69 6e 6b | es().as.$link).{.$required[$link |
46da0 | 2d 3e 67 65 74 54 61 72 67 65 74 28 29 5d 20 3d 20 74 72 75 65 3b 0a 7d 0a 24 66 6f 75 6e 64 20 | ->getTarget()].=.true;.}.$found. |
46dc0 | 3d 20 74 72 75 65 3b 0a 75 6e 73 65 74 28 24 6c 6f 63 6b 65 64 50 61 63 6b 61 67 65 73 5b 24 69 | =.true;.unset($lockedPackages[$i |
46de0 | 6e 64 65 78 5d 29 3b 0a 62 72 65 61 6b 3b 0a 7d 0a 7d 0a 7d 0a 7d 20 77 68 69 6c 65 20 28 24 66 | ndex]);.break;.}.}.}.}.while.($f |
46e00 | 6f 75 6e 64 29 3b 0a 0a 24 75 6e 75 73 65 64 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 | ound);..$unused.=.[];.foreach.($ |
46e20 | 6c 6f 63 6b 65 64 50 61 63 6b 61 67 65 73 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 24 75 | lockedPackages.as.$package).{.$u |
46e40 | 6e 75 73 65 64 5b 5d 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 3b 0a 7d | nused[].=.$package->getName();.} |
46e60 | 0a 24 69 6e 70 75 74 2d 3e 73 65 74 41 72 67 75 6d 65 6e 74 28 27 70 61 63 6b 61 67 65 73 27 2c | .$input->setArgument('packages', |
46e80 | 20 61 72 72 61 79 5f 6d 65 72 67 65 28 24 69 6e 70 75 74 2d 3e 67 65 74 41 72 67 75 6d 65 6e 74 | .array_merge($input->getArgument |
46ea0 | 28 27 70 61 63 6b 61 67 65 73 27 29 2c 20 24 75 6e 75 73 65 64 29 29 3b 0a 0a 69 66 20 28 63 6f | ('packages'),.$unused));..if.(co |
46ec0 | 75 6e 74 28 24 69 6e 70 75 74 2d 3e 67 65 74 41 72 67 75 6d 65 6e 74 28 27 70 61 63 6b 61 67 65 | unt($input->getArgument('package |
46ee0 | 73 27 29 29 20 3d 3d 3d 20 30 29 20 7b 0a 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 2d 3e 77 72 | s')).===.0).{.$this->getIO()->wr |
46f00 | 69 74 65 45 72 72 6f 72 28 27 3c 69 6e 66 6f 3e 4e 6f 20 75 6e 75 73 65 64 20 70 61 63 6b 61 67 | iteError('<info>No.unused.packag |
46f20 | 65 73 20 74 6f 20 72 65 6d 6f 76 65 3c 2f 69 6e 66 6f 3e 27 29 3b 0a 24 74 68 69 73 2d 3e 73 65 | es.to.remove</info>');.$this->se |
46f40 | 74 43 6f 64 65 28 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 29 3a 20 69 6e 74 20 7b 0a | tCode(static.function.():.int.{. |
46f60 | 72 65 74 75 72 6e 20 30 3b 0a 7d 29 3b 0a 7d 0a 7d 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 | return.0;.});.}.}.}.....protecte |
46f80 | 64 20 66 75 6e 63 74 69 6f 6e 20 65 78 65 63 75 74 65 28 49 6e 70 75 74 49 6e 74 65 72 66 61 63 | d.function.execute(InputInterfac |
46fa0 | 65 20 24 69 6e 70 75 74 2c 20 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 6f 75 74 70 75 | e.$input,.OutputInterface.$outpu |
46fc0 | 74 29 0a 7b 0a 24 70 61 63 6b 61 67 65 73 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 41 72 67 75 | t).{.$packages.=.$input->getArgu |
46fe0 | 6d 65 6e 74 28 27 70 61 63 6b 61 67 65 73 27 29 3b 0a 24 70 61 63 6b 61 67 65 73 20 3d 20 61 72 | ment('packages');.$packages.=.ar |
47000 | 72 61 79 5f 6d 61 70 28 27 73 74 72 74 6f 6c 6f 77 65 72 27 2c 20 24 70 61 63 6b 61 67 65 73 29 | ray_map('strtolower',.$packages) |
47020 | 3b 0a 0a 24 66 69 6c 65 20 3d 20 46 61 63 74 6f 72 79 3a 3a 67 65 74 43 6f 6d 70 6f 73 65 72 46 | ;..$file.=.Factory::getComposerF |
47040 | 69 6c 65 28 29 3b 0a 0a 24 6a 73 6f 6e 46 69 6c 65 20 3d 20 6e 65 77 20 4a 73 6f 6e 46 69 6c 65 | ile();..$jsonFile.=.new.JsonFile |
47060 | 28 24 66 69 6c 65 29 3b 0a 0a 24 63 6f 6d 70 6f 73 65 72 20 3d 20 24 6a 73 6f 6e 46 69 6c 65 2d | ($file);..$composer.=.$jsonFile- |
47080 | 3e 72 65 61 64 28 29 3b 0a 24 63 6f 6d 70 6f 73 65 72 42 61 63 6b 75 70 20 3d 20 66 69 6c 65 5f | >read();.$composerBackup.=.file_ |
470a0 | 67 65 74 5f 63 6f 6e 74 65 6e 74 73 28 24 6a 73 6f 6e 46 69 6c 65 2d 3e 67 65 74 50 61 74 68 28 | get_contents($jsonFile->getPath( |
470c0 | 29 29 3b 0a 0a 24 6a 73 6f 6e 20 3d 20 6e 65 77 20 4a 73 6f 6e 43 6f 6e 66 69 67 53 6f 75 72 63 | ));..$json.=.new.JsonConfigSourc |
470e0 | 65 28 24 6a 73 6f 6e 46 69 6c 65 29 3b 0a 0a 24 74 79 70 65 20 3d 20 24 69 6e 70 75 74 2d 3e 67 | e($jsonFile);..$type.=.$input->g |
47100 | 65 74 4f 70 74 69 6f 6e 28 27 64 65 76 27 29 20 3f 20 27 72 65 71 75 69 72 65 2d 64 65 76 27 20 | etOption('dev').?.'require-dev'. |
47120 | 3a 20 27 72 65 71 75 69 72 65 27 3b 0a 24 61 6c 74 54 79 70 65 20 3d 20 21 24 69 6e 70 75 74 2d | :.'require';.$altType.=.!$input- |
47140 | 3e 67 65 74 4f 70 74 69 6f 6e 28 27 64 65 76 27 29 20 3f 20 27 72 65 71 75 69 72 65 2d 64 65 76 | >getOption('dev').?.'require-dev |
47160 | 27 20 3a 20 27 72 65 71 75 69 72 65 27 3b 0a 24 69 6f 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 49 | '.:.'require';.$io.=.$this->getI |
47180 | 4f 28 29 3b 0a 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 75 70 64 | O();..if.($input->getOption('upd |
471a0 | 61 74 65 2d 77 69 74 68 2d 64 65 70 65 6e 64 65 6e 63 69 65 73 27 29 29 20 7b 0a 24 69 6f 2d 3e | ate-with-dependencies')).{.$io-> |
471c0 | 77 72 69 74 65 45 72 72 6f 72 28 27 3c 77 61 72 6e 69 6e 67 3e 59 6f 75 20 61 72 65 20 75 73 69 | writeError('<warning>You.are.usi |
471e0 | 6e 67 20 74 68 65 20 64 65 70 72 65 63 61 74 65 64 20 6f 70 74 69 6f 6e 20 22 75 70 64 61 74 65 | ng.the.deprecated.option."update |
47200 | 2d 77 69 74 68 2d 64 65 70 65 6e 64 65 6e 63 69 65 73 22 2e 20 54 68 69 73 20 69 73 20 6e 6f 77 | -with-dependencies"..This.is.now |
47220 | 20 64 65 66 61 75 6c 74 20 62 65 68 61 76 69 6f 75 72 2e 20 54 68 65 20 2d 2d 6e 6f 2d 75 70 64 | .default.behaviour..The.--no-upd |
47240 | 61 74 65 2d 77 69 74 68 2d 64 65 70 65 6e 64 65 6e 63 69 65 73 20 6f 70 74 69 6f 6e 20 63 61 6e | ate-with-dependencies.option.can |
47260 | 20 62 65 20 75 73 65 64 20 74 6f 20 72 65 6d 6f 76 65 20 61 20 70 61 63 6b 61 67 65 20 77 69 74 | .be.used.to.remove.a.package.wit |
47280 | 68 6f 75 74 20 69 74 73 20 64 65 70 65 6e 64 65 6e 63 69 65 73 2e 3c 2f 77 61 72 6e 69 6e 67 3e | hout.its.dependencies.</warning> |
472a0 | 27 29 3b 0a 7d 0a 0a 0a 66 6f 72 65 61 63 68 20 28 5b 27 72 65 71 75 69 72 65 27 2c 20 27 72 65 | ');.}...foreach.(['require',.'re |
472c0 | 71 75 69 72 65 2d 64 65 76 27 5d 20 61 73 20 24 6c 69 6e 6b 54 79 70 65 29 20 7b 0a 69 66 20 28 | quire-dev'].as.$linkType).{.if.( |
472e0 | 69 73 73 65 74 28 24 63 6f 6d 70 6f 73 65 72 5b 24 6c 69 6e 6b 54 79 70 65 5d 29 29 20 7b 0a 66 | isset($composer[$linkType])).{.f |
47300 | 6f 72 65 61 63 68 20 28 24 63 6f 6d 70 6f 73 65 72 5b 24 6c 69 6e 6b 54 79 70 65 5d 20 61 73 20 | oreach.($composer[$linkType].as. |
47320 | 24 6e 61 6d 65 20 3d 3e 20 24 76 65 72 73 69 6f 6e 29 20 7b 0a 24 63 6f 6d 70 6f 73 65 72 5b 24 | $name.=>.$version).{.$composer[$ |
47340 | 6c 69 6e 6b 54 79 70 65 5d 5b 73 74 72 74 6f 6c 6f 77 65 72 28 24 6e 61 6d 65 29 5d 20 3d 20 24 | linkType][strtolower($name)].=.$ |
47360 | 6e 61 6d 65 3b 0a 7d 0a 7d 0a 7d 0a 0a 24 64 72 79 52 75 6e 20 3d 20 24 69 6e 70 75 74 2d 3e 67 | name;.}.}.}..$dryRun.=.$input->g |
47380 | 65 74 4f 70 74 69 6f 6e 28 27 64 72 79 2d 72 75 6e 27 29 3b 0a 24 74 6f 52 65 6d 6f 76 65 20 3d | etOption('dry-run');.$toRemove.= |
473a0 | 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 73 20 61 73 20 24 70 61 63 6b | .[];.foreach.($packages.as.$pack |
473c0 | 61 67 65 29 20 7b 0a 69 66 20 28 69 73 73 65 74 28 24 63 6f 6d 70 6f 73 65 72 5b 24 74 79 70 65 | age).{.if.(isset($composer[$type |
473e0 | 5d 5b 24 70 61 63 6b 61 67 65 5d 29 29 20 7b 0a 69 66 20 28 24 64 72 79 52 75 6e 29 20 7b 0a 24 | ][$package])).{.if.($dryRun).{.$ |
47400 | 74 6f 52 65 6d 6f 76 65 5b 24 74 79 70 65 5d 5b 5d 20 3d 20 24 63 6f 6d 70 6f 73 65 72 5b 24 74 | toRemove[$type][].=.$composer[$t |
47420 | 79 70 65 5d 5b 24 70 61 63 6b 61 67 65 5d 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 6a 73 6f 6e 2d 3e | ype][$package];.}.else.{.$json-> |
47440 | 72 65 6d 6f 76 65 4c 69 6e 6b 28 24 74 79 70 65 2c 20 24 63 6f 6d 70 6f 73 65 72 5b 24 74 79 70 | removeLink($type,.$composer[$typ |
47460 | 65 5d 5b 24 70 61 63 6b 61 67 65 5d 29 3b 0a 7d 0a 7d 20 65 6c 73 65 69 66 20 28 69 73 73 65 74 | e][$package]);.}.}.elseif.(isset |
47480 | 28 24 63 6f 6d 70 6f 73 65 72 5b 24 61 6c 74 54 79 70 65 5d 5b 24 70 61 63 6b 61 67 65 5d 29 29 | ($composer[$altType][$package])) |
474a0 | 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 77 61 72 6e 69 6e 67 3e 27 20 2e | .{.$io->writeError('<warning>'.. |
474c0 | 20 24 63 6f 6d 70 6f 73 65 72 5b 24 61 6c 74 54 79 70 65 5d 5b 24 70 61 63 6b 61 67 65 5d 20 2e | .$composer[$altType][$package].. |
474e0 | 20 27 20 63 6f 75 6c 64 20 6e 6f 74 20 62 65 20 66 6f 75 6e 64 20 69 6e 20 27 20 2e 20 24 74 79 | .'.could.not.be.found.in.'...$ty |
47500 | 70 65 20 2e 20 27 20 62 75 74 20 69 74 20 69 73 20 70 72 65 73 65 6e 74 20 69 6e 20 27 20 2e 20 | pe...'.but.it.is.present.in.'... |
47520 | 24 61 6c 74 54 79 70 65 20 2e 20 27 3c 2f 77 61 72 6e 69 6e 67 3e 27 29 3b 0a 69 66 20 28 24 69 | $altType...'</warning>');.if.($i |
47540 | 6f 2d 3e 69 73 49 6e 74 65 72 61 63 74 69 76 65 28 29 29 20 7b 0a 69 66 20 28 24 69 6f 2d 3e 61 | o->isInteractive()).{.if.($io->a |
47560 | 73 6b 43 6f 6e 66 69 72 6d 61 74 69 6f 6e 28 27 44 6f 20 79 6f 75 20 77 61 6e 74 20 74 6f 20 72 | skConfirmation('Do.you.want.to.r |
47580 | 65 6d 6f 76 65 20 69 74 20 66 72 6f 6d 20 27 20 2e 20 24 61 6c 74 54 79 70 65 20 2e 20 27 20 5b | emove.it.from.'...$altType...'.[ |
475a0 | 3c 63 6f 6d 6d 65 6e 74 3e 79 65 73 3c 2f 63 6f 6d 6d 65 6e 74 3e 5d 3f 20 27 29 29 20 7b 0a 69 | <comment>yes</comment>]?.')).{.i |
475c0 | 66 20 28 24 64 72 79 52 75 6e 29 20 7b 0a 24 74 6f 52 65 6d 6f 76 65 5b 24 61 6c 74 54 79 70 65 | f.($dryRun).{.$toRemove[$altType |
475e0 | 5d 5b 5d 20 3d 20 24 63 6f 6d 70 6f 73 65 72 5b 24 61 6c 74 54 79 70 65 5d 5b 24 70 61 63 6b 61 | ][].=.$composer[$altType][$packa |
47600 | 67 65 5d 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 6a 73 6f 6e 2d 3e 72 65 6d 6f 76 65 4c 69 6e 6b 28 | ge];.}.else.{.$json->removeLink( |
47620 | 24 61 6c 74 54 79 70 65 2c 20 24 63 6f 6d 70 6f 73 65 72 5b 24 61 6c 74 54 79 70 65 5d 5b 24 70 | $altType,.$composer[$altType][$p |
47640 | 61 63 6b 61 67 65 5d 29 3b 0a 7d 0a 7d 0a 7d 0a 7d 20 65 6c 73 65 69 66 20 28 69 73 73 65 74 28 | ackage]);.}.}.}.}.elseif.(isset( |
47660 | 24 63 6f 6d 70 6f 73 65 72 5b 24 74 79 70 65 5d 29 20 26 26 20 63 6f 75 6e 74 28 24 6d 61 74 63 | $composer[$type]).&&.count($matc |
47680 | 68 65 73 20 3d 20 50 72 65 67 3a 3a 67 72 65 70 28 42 61 73 65 50 61 63 6b 61 67 65 3a 3a 70 61 | hes.=.Preg::grep(BasePackage::pa |
476a0 | 63 6b 61 67 65 4e 61 6d 65 54 6f 52 65 67 65 78 70 28 24 70 61 63 6b 61 67 65 29 2c 20 61 72 72 | ckageNameToRegexp($package),.arr |
476c0 | 61 79 5f 6b 65 79 73 28 24 63 6f 6d 70 6f 73 65 72 5b 24 74 79 70 65 5d 29 29 29 20 3e 20 30 29 | ay_keys($composer[$type]))).>.0) |
476e0 | 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 6d 61 74 63 68 65 73 20 61 73 20 24 6d 61 74 63 68 65 64 | .{.foreach.($matches.as.$matched |
47700 | 50 61 63 6b 61 67 65 29 20 7b 0a 69 66 20 28 24 64 72 79 52 75 6e 29 20 7b 0a 24 74 6f 52 65 6d | Package).{.if.($dryRun).{.$toRem |
47720 | 6f 76 65 5b 24 74 79 70 65 5d 5b 5d 20 3d 20 24 6d 61 74 63 68 65 64 50 61 63 6b 61 67 65 3b 0a | ove[$type][].=.$matchedPackage;. |
47740 | 7d 20 65 6c 73 65 20 7b 0a 24 6a 73 6f 6e 2d 3e 72 65 6d 6f 76 65 4c 69 6e 6b 28 24 74 79 70 65 | }.else.{.$json->removeLink($type |
47760 | 2c 20 24 6d 61 74 63 68 65 64 50 61 63 6b 61 67 65 29 3b 0a 7d 0a 7d 0a 7d 20 65 6c 73 65 69 66 | ,.$matchedPackage);.}.}.}.elseif |
47780 | 20 28 69 73 73 65 74 28 24 63 6f 6d 70 6f 73 65 72 5b 24 61 6c 74 54 79 70 65 5d 29 20 26 26 20 | .(isset($composer[$altType]).&&. |
477a0 | 63 6f 75 6e 74 28 24 6d 61 74 63 68 65 73 20 3d 20 50 72 65 67 3a 3a 67 72 65 70 28 42 61 73 65 | count($matches.=.Preg::grep(Base |
477c0 | 50 61 63 6b 61 67 65 3a 3a 70 61 63 6b 61 67 65 4e 61 6d 65 54 6f 52 65 67 65 78 70 28 24 70 61 | Package::packageNameToRegexp($pa |
477e0 | 63 6b 61 67 65 29 2c 20 61 72 72 61 79 5f 6b 65 79 73 28 24 63 6f 6d 70 6f 73 65 72 5b 24 61 6c | ckage),.array_keys($composer[$al |
47800 | 74 54 79 70 65 5d 29 29 29 20 3e 20 30 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 6d 61 74 63 68 | tType]))).>.0).{.foreach.($match |
47820 | 65 73 20 61 73 20 24 6d 61 74 63 68 65 64 50 61 63 6b 61 67 65 29 20 7b 0a 24 69 6f 2d 3e 77 72 | es.as.$matchedPackage).{.$io->wr |
47840 | 69 74 65 45 72 72 6f 72 28 27 3c 77 61 72 6e 69 6e 67 3e 27 20 2e 20 24 6d 61 74 63 68 65 64 50 | iteError('<warning>'...$matchedP |
47860 | 61 63 6b 61 67 65 20 2e 20 27 20 63 6f 75 6c 64 20 6e 6f 74 20 62 65 20 66 6f 75 6e 64 20 69 6e | ackage...'.could.not.be.found.in |
47880 | 20 27 20 2e 20 24 74 79 70 65 20 2e 20 27 20 62 75 74 20 69 74 20 69 73 20 70 72 65 73 65 6e 74 | .'...$type...'.but.it.is.present |
478a0 | 20 69 6e 20 27 20 2e 20 24 61 6c 74 54 79 70 65 20 2e 20 27 3c 2f 77 61 72 6e 69 6e 67 3e 27 29 | .in.'...$altType...'</warning>') |
478c0 | 3b 0a 69 66 20 28 24 69 6f 2d 3e 69 73 49 6e 74 65 72 61 63 74 69 76 65 28 29 29 20 7b 0a 69 66 | ;.if.($io->isInteractive()).{.if |
478e0 | 20 28 24 69 6f 2d 3e 61 73 6b 43 6f 6e 66 69 72 6d 61 74 69 6f 6e 28 27 44 6f 20 79 6f 75 20 77 | .($io->askConfirmation('Do.you.w |
47900 | 61 6e 74 20 74 6f 20 72 65 6d 6f 76 65 20 69 74 20 66 72 6f 6d 20 27 20 2e 20 24 61 6c 74 54 79 | ant.to.remove.it.from.'...$altTy |
47920 | 70 65 20 2e 20 27 20 5b 3c 63 6f 6d 6d 65 6e 74 3e 79 65 73 3c 2f 63 6f 6d 6d 65 6e 74 3e 5d 3f | pe...'.[<comment>yes</comment>]? |
47940 | 20 27 29 29 20 7b 0a 69 66 20 28 24 64 72 79 52 75 6e 29 20 7b 0a 24 74 6f 52 65 6d 6f 76 65 5b | .')).{.if.($dryRun).{.$toRemove[ |
47960 | 24 61 6c 74 54 79 70 65 5d 5b 5d 20 3d 20 24 6d 61 74 63 68 65 64 50 61 63 6b 61 67 65 3b 0a 7d | $altType][].=.$matchedPackage;.} |
47980 | 20 65 6c 73 65 20 7b 0a 24 6a 73 6f 6e 2d 3e 72 65 6d 6f 76 65 4c 69 6e 6b 28 24 61 6c 74 54 79 | .else.{.$json->removeLink($altTy |
479a0 | 70 65 2c 20 24 6d 61 74 63 68 65 64 50 61 63 6b 61 67 65 29 3b 0a 7d 0a 7d 0a 7d 0a 7d 0a 7d 20 | pe,.$matchedPackage);.}.}.}.}.}. |
479c0 | 65 6c 73 65 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 77 61 72 6e 69 6e 67 | else.{.$io->writeError('<warning |
479e0 | 3e 27 2e 24 70 61 63 6b 61 67 65 2e 27 20 69 73 20 6e 6f 74 20 72 65 71 75 69 72 65 64 20 69 6e | >'.$package.'.is.not.required.in |
47a00 | 20 79 6f 75 72 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 20 61 6e 64 20 68 61 73 20 6e 6f 74 20 | .your.composer.json.and.has.not. |
47a20 | 62 65 65 6e 20 72 65 6d 6f 76 65 64 3c 2f 77 61 72 6e 69 6e 67 3e 27 29 3b 0a 7d 0a 7d 0a 0a 24 | been.removed</warning>');.}.}..$ |
47a40 | 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 69 6e 66 6f 3e 27 2e 24 66 69 6c 65 2e 27 20 | io->writeError('<info>'.$file.'. |
47a60 | 68 61 73 20 62 65 65 6e 20 75 70 64 61 74 65 64 3c 2f 69 6e 66 6f 3e 27 29 3b 0a 0a 69 66 20 28 | has.been.updated</info>');..if.( |
47a80 | 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 75 70 64 61 74 65 27 29 29 20 | $input->getOption('no-update')). |
47aa0 | 7b 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 0a 69 66 20 28 24 63 6f 6d 70 6f 73 65 72 20 3d 20 24 | {.return.0;.}..if.($composer.=.$ |
47ac0 | 74 68 69 73 2d 3e 74 72 79 43 6f 6d 70 6f 73 65 72 28 29 29 20 7b 0a 24 63 6f 6d 70 6f 73 65 72 | this->tryComposer()).{.$composer |
47ae0 | 2d 3e 67 65 74 50 6c 75 67 69 6e 4d 61 6e 61 67 65 72 28 29 2d 3e 64 65 61 63 74 69 76 61 74 65 | ->getPluginManager()->deactivate |
47b00 | 49 6e 73 74 61 6c 6c 65 64 50 6c 75 67 69 6e 73 28 29 3b 0a 7d 0a 0a 0a 24 74 68 69 73 2d 3e 72 | InstalledPlugins();.}...$this->r |
47b20 | 65 73 65 74 43 6f 6d 70 6f 73 65 72 28 29 3b 0a 24 63 6f 6d 70 6f 73 65 72 20 3d 20 24 74 68 69 | esetComposer();.$composer.=.$thi |
47b40 | 73 2d 3e 72 65 71 75 69 72 65 43 6f 6d 70 6f 73 65 72 28 29 3b 0a 0a 69 66 20 28 24 64 72 79 52 | s->requireComposer();..if.($dryR |
47b60 | 75 6e 29 20 7b 0a 24 72 6f 6f 74 50 61 63 6b 61 67 65 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e | un).{.$rootPackage.=.$composer-> |
47b80 | 67 65 74 50 61 63 6b 61 67 65 28 29 3b 0a 24 6c 69 6e 6b 73 20 3d 20 5b 0a 27 72 65 71 75 69 72 | getPackage();.$links.=.[.'requir |
47ba0 | 65 27 20 3d 3e 20 24 72 6f 6f 74 50 61 63 6b 61 67 65 2d 3e 67 65 74 52 65 71 75 69 72 65 73 28 | e'.=>.$rootPackage->getRequires( |
47bc0 | 29 2c 0a 27 72 65 71 75 69 72 65 2d 64 65 76 27 20 3d 3e 20 24 72 6f 6f 74 50 61 63 6b 61 67 65 | ),.'require-dev'.=>.$rootPackage |
47be0 | 2d 3e 67 65 74 44 65 76 52 65 71 75 69 72 65 73 28 29 2c 0a 5d 3b 0a 66 6f 72 65 61 63 68 20 28 | ->getDevRequires(),.];.foreach.( |
47c00 | 24 74 6f 52 65 6d 6f 76 65 20 61 73 20 24 74 79 70 65 20 3d 3e 20 24 6e 61 6d 65 73 29 20 7b 0a | $toRemove.as.$type.=>.$names).{. |
47c20 | 66 6f 72 65 61 63 68 20 28 24 6e 61 6d 65 73 20 61 73 20 24 6e 61 6d 65 29 20 7b 0a 75 6e 73 65 | foreach.($names.as.$name).{.unse |
47c40 | 74 28 24 6c 69 6e 6b 73 5b 24 74 79 70 65 5d 5b 24 6e 61 6d 65 5d 29 3b 0a 7d 0a 7d 0a 24 72 6f | t($links[$type][$name]);.}.}.$ro |
47c60 | 6f 74 50 61 63 6b 61 67 65 2d 3e 73 65 74 52 65 71 75 69 72 65 73 28 24 6c 69 6e 6b 73 5b 27 72 | otPackage->setRequires($links['r |
47c80 | 65 71 75 69 72 65 27 5d 29 3b 0a 24 72 6f 6f 74 50 61 63 6b 61 67 65 2d 3e 73 65 74 44 65 76 52 | equire']);.$rootPackage->setDevR |
47ca0 | 65 71 75 69 72 65 73 28 24 6c 69 6e 6b 73 5b 27 72 65 71 75 69 72 65 2d 64 65 76 27 5d 29 3b 0a | equires($links['require-dev']);. |
47cc0 | 7d 0a 0a 24 63 6f 6d 6d 61 6e 64 45 76 65 6e 74 20 3d 20 6e 65 77 20 43 6f 6d 6d 61 6e 64 45 76 | }..$commandEvent.=.new.CommandEv |
47ce0 | 65 6e 74 28 50 6c 75 67 69 6e 45 76 65 6e 74 73 3a 3a 43 4f 4d 4d 41 4e 44 2c 20 27 72 65 6d 6f | ent(PluginEvents::COMMAND,.'remo |
47d00 | 76 65 27 2c 20 24 69 6e 70 75 74 2c 20 24 6f 75 74 70 75 74 29 3b 0a 24 63 6f 6d 70 6f 73 65 72 | ve',.$input,.$output);.$composer |
47d20 | 2d 3e 67 65 74 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 28 29 2d 3e 64 69 73 70 61 74 63 68 | ->getEventDispatcher()->dispatch |
47d40 | 28 24 63 6f 6d 6d 61 6e 64 45 76 65 6e 74 2d 3e 67 65 74 4e 61 6d 65 28 29 2c 20 24 63 6f 6d 6d | ($commandEvent->getName(),.$comm |
47d60 | 61 6e 64 45 76 65 6e 74 29 3b 0a 0a 24 61 6c 6c 6f 77 50 6c 75 67 69 6e 73 20 3d 20 24 63 6f 6d | andEvent);..$allowPlugins.=.$com |
47d80 | 70 6f 73 65 72 2d 3e 67 65 74 43 6f 6e 66 69 67 28 29 2d 3e 67 65 74 28 27 61 6c 6c 6f 77 2d 70 | poser->getConfig()->get('allow-p |
47da0 | 6c 75 67 69 6e 73 27 29 3b 0a 24 72 65 6d 6f 76 65 64 50 6c 75 67 69 6e 73 20 3d 20 69 73 5f 61 | lugins');.$removedPlugins.=.is_a |
47dc0 | 72 72 61 79 28 24 61 6c 6c 6f 77 50 6c 75 67 69 6e 73 29 20 3f 20 61 72 72 61 79 5f 69 6e 74 65 | rray($allowPlugins).?.array_inte |
47de0 | 72 73 65 63 74 28 61 72 72 61 79 5f 6b 65 79 73 28 24 61 6c 6c 6f 77 50 6c 75 67 69 6e 73 29 2c | rsect(array_keys($allowPlugins), |
47e00 | 20 24 70 61 63 6b 61 67 65 73 29 20 3a 20 5b 5d 3b 0a 69 66 20 28 21 24 64 72 79 52 75 6e 20 26 | .$packages).:.[];.if.(!$dryRun.& |
47e20 | 26 20 69 73 5f 61 72 72 61 79 28 24 61 6c 6c 6f 77 50 6c 75 67 69 6e 73 29 20 26 26 20 63 6f 75 | &.is_array($allowPlugins).&&.cou |
47e40 | 6e 74 28 24 72 65 6d 6f 76 65 64 50 6c 75 67 69 6e 73 29 20 3e 20 30 29 20 7b 0a 69 66 20 28 63 | nt($removedPlugins).>.0).{.if.(c |
47e60 | 6f 75 6e 74 28 24 61 6c 6c 6f 77 50 6c 75 67 69 6e 73 29 20 3d 3d 3d 20 63 6f 75 6e 74 28 24 72 | ount($allowPlugins).===.count($r |
47e80 | 65 6d 6f 76 65 64 50 6c 75 67 69 6e 73 29 29 20 7b 0a 24 6a 73 6f 6e 2d 3e 72 65 6d 6f 76 65 43 | emovedPlugins)).{.$json->removeC |
47ea0 | 6f 6e 66 69 67 53 65 74 74 69 6e 67 28 27 61 6c 6c 6f 77 2d 70 6c 75 67 69 6e 73 27 29 3b 0a 7d | onfigSetting('allow-plugins');.} |
47ec0 | 20 65 6c 73 65 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 72 65 6d 6f 76 65 64 50 6c 75 67 69 6e 73 | .else.{.foreach.($removedPlugins |
47ee0 | 20 61 73 20 24 70 6c 75 67 69 6e 29 20 7b 0a 24 6a 73 6f 6e 2d 3e 72 65 6d 6f 76 65 43 6f 6e 66 | .as.$plugin).{.$json->removeConf |
47f00 | 69 67 53 65 74 74 69 6e 67 28 27 61 6c 6c 6f 77 2d 70 6c 75 67 69 6e 73 2e 27 2e 24 70 6c 75 67 | igSetting('allow-plugins.'.$plug |
47f20 | 69 6e 29 3b 0a 7d 0a 7d 0a 7d 0a 0a 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 49 6e 73 74 61 6c | in);.}.}.}..$composer->getInstal |
47f40 | 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 72 28 29 2d 3e 73 65 74 4f 75 74 70 75 74 50 72 6f 67 72 65 | lationManager()->setOutputProgre |
47f60 | 73 73 28 21 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 70 72 6f 67 72 65 | ss(!$input->getOption('no-progre |
47f80 | 73 73 27 29 29 3b 0a 0a 24 69 6e 73 74 61 6c 6c 20 3d 20 49 6e 73 74 61 6c 6c 65 72 3a 3a 63 72 | ss'));..$install.=.Installer::cr |
47fa0 | 65 61 74 65 28 24 69 6f 2c 20 24 63 6f 6d 70 6f 73 65 72 29 3b 0a 0a 24 75 70 64 61 74 65 44 65 | eate($io,.$composer);..$updateDe |
47fc0 | 76 4d 6f 64 65 20 3d 20 21 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 75 70 64 61 | vMode.=.!$input->getOption('upda |
47fe0 | 74 65 2d 6e 6f 2d 64 65 76 27 29 3b 0a 24 6f 70 74 69 6d 69 7a 65 20 3d 20 24 69 6e 70 75 74 2d | te-no-dev');.$optimize.=.$input- |
48000 | 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6f 70 74 69 6d 69 7a 65 2d 61 75 74 6f 6c 6f 61 64 65 72 27 | >getOption('optimize-autoloader' |
48020 | 29 20 7c 7c 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 43 6f 6e 66 69 67 28 29 2d 3e 67 65 74 | ).||.$composer->getConfig()->get |
48040 | 28 27 6f 70 74 69 6d 69 7a 65 2d 61 75 74 6f 6c 6f 61 64 65 72 27 29 3b 0a 24 61 75 74 68 6f 72 | ('optimize-autoloader');.$author |
48060 | 69 74 61 74 69 76 65 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 63 6c 61 | itative.=.$input->getOption('cla |
48080 | 73 73 6d 61 70 2d 61 75 74 68 6f 72 69 74 61 74 69 76 65 27 29 20 7c 7c 20 24 63 6f 6d 70 6f 73 | ssmap-authoritative').||.$compos |
480a0 | 65 72 2d 3e 67 65 74 43 6f 6e 66 69 67 28 29 2d 3e 67 65 74 28 27 63 6c 61 73 73 6d 61 70 2d 61 | er->getConfig()->get('classmap-a |
480c0 | 75 74 68 6f 72 69 74 61 74 69 76 65 27 29 3b 0a 24 61 70 63 75 50 72 65 66 69 78 20 3d 20 24 69 | uthoritative');.$apcuPrefix.=.$i |
480e0 | 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 61 70 63 75 2d 61 75 74 6f 6c 6f 61 64 65 72 | nput->getOption('apcu-autoloader |
48100 | 2d 70 72 65 66 69 78 27 29 3b 0a 24 61 70 63 75 20 3d 20 24 61 70 63 75 50 72 65 66 69 78 20 21 | -prefix');.$apcu.=.$apcuPrefix.! |
48120 | 3d 3d 20 6e 75 6c 6c 20 7c 7c 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 61 70 | ==.null.||.$input->getOption('ap |
48140 | 63 75 2d 61 75 74 6f 6c 6f 61 64 65 72 27 29 20 7c 7c 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 | cu-autoloader').||.$composer->ge |
48160 | 74 43 6f 6e 66 69 67 28 29 2d 3e 67 65 74 28 27 61 70 63 75 2d 61 75 74 6f 6c 6f 61 64 65 72 27 | tConfig()->get('apcu-autoloader' |
48180 | 29 3b 0a 0a 24 75 70 64 61 74 65 41 6c 6c 6f 77 54 72 61 6e 73 69 74 69 76 65 44 65 70 65 6e 64 | );..$updateAllowTransitiveDepend |
481a0 | 65 6e 63 69 65 73 20 3d 20 52 65 71 75 65 73 74 3a 3a 55 50 44 41 54 45 5f 4c 49 53 54 45 44 5f | encies.=.Request::UPDATE_LISTED_ |
481c0 | 57 49 54 48 5f 54 52 41 4e 53 49 54 49 56 45 5f 44 45 50 53 5f 4e 4f 5f 52 4f 4f 54 5f 52 45 51 | WITH_TRANSITIVE_DEPS_NO_ROOT_REQ |
481e0 | 55 49 52 45 3b 0a 24 66 6c 61 67 73 20 3d 20 27 27 3b 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 | UIRE;.$flags.=.'';.if.($input->g |
48200 | 65 74 4f 70 74 69 6f 6e 28 27 75 70 64 61 74 65 2d 77 69 74 68 2d 61 6c 6c 2d 64 65 70 65 6e 64 | etOption('update-with-all-depend |
48220 | 65 6e 63 69 65 73 27 29 20 7c 7c 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 77 | encies').||.$input->getOption('w |
48240 | 69 74 68 2d 61 6c 6c 2d 64 65 70 65 6e 64 65 6e 63 69 65 73 27 29 29 20 7b 0a 24 75 70 64 61 74 | ith-all-dependencies')).{.$updat |
48260 | 65 41 6c 6c 6f 77 54 72 61 6e 73 69 74 69 76 65 44 65 70 65 6e 64 65 6e 63 69 65 73 20 3d 20 52 | eAllowTransitiveDependencies.=.R |
48280 | 65 71 75 65 73 74 3a 3a 55 50 44 41 54 45 5f 4c 49 53 54 45 44 5f 57 49 54 48 5f 54 52 41 4e 53 | equest::UPDATE_LISTED_WITH_TRANS |
482a0 | 49 54 49 56 45 5f 44 45 50 53 3b 0a 24 66 6c 61 67 73 20 2e 3d 20 27 20 2d 2d 77 69 74 68 2d 61 | ITIVE_DEPS;.$flags..=.'.--with-a |
482c0 | 6c 6c 2d 64 65 70 65 6e 64 65 6e 63 69 65 73 27 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 69 6e 70 | ll-dependencies';.}.elseif.($inp |
482e0 | 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 75 70 64 61 74 65 2d 77 69 74 68 2d 64 65 | ut->getOption('no-update-with-de |
48300 | 70 65 6e 64 65 6e 63 69 65 73 27 29 29 20 7b 0a 24 75 70 64 61 74 65 41 6c 6c 6f 77 54 72 61 6e | pendencies')).{.$updateAllowTran |
48320 | 73 69 74 69 76 65 44 65 70 65 6e 64 65 6e 63 69 65 73 20 3d 20 52 65 71 75 65 73 74 3a 3a 55 50 | sitiveDependencies.=.Request::UP |
48340 | 44 41 54 45 5f 4f 4e 4c 59 5f 4c 49 53 54 45 44 3b 0a 24 66 6c 61 67 73 20 2e 3d 20 27 20 2d 2d | DATE_ONLY_LISTED;.$flags..=.'.-- |
48360 | 77 69 74 68 2d 64 65 70 65 6e 64 65 6e 63 69 65 73 27 3b 0a 7d 0a 0a 24 69 6f 2d 3e 77 72 69 74 | with-dependencies';.}..$io->writ |
48380 | 65 45 72 72 6f 72 28 27 3c 69 6e 66 6f 3e 52 75 6e 6e 69 6e 67 20 63 6f 6d 70 6f 73 65 72 20 75 | eError('<info>Running.composer.u |
483a0 | 70 64 61 74 65 20 27 2e 69 6d 70 6c 6f 64 65 28 27 20 27 2c 20 24 70 61 63 6b 61 67 65 73 29 2e | pdate.'.implode('.',.$packages). |
483c0 | 24 66 6c 61 67 73 2e 27 3c 2f 69 6e 66 6f 3e 27 29 3b 0a 0a 24 69 6e 73 74 61 6c 6c 0a 2d 3e 73 | $flags.'</info>');..$install.->s |
483e0 | 65 74 56 65 72 62 6f 73 65 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 76 65 72 | etVerbose($input->getOption('ver |
48400 | 62 6f 73 65 27 29 29 0a 2d 3e 73 65 74 44 65 76 4d 6f 64 65 28 24 75 70 64 61 74 65 44 65 76 4d | bose')).->setDevMode($updateDevM |
48420 | 6f 64 65 29 0a 2d 3e 73 65 74 4f 70 74 69 6d 69 7a 65 41 75 74 6f 6c 6f 61 64 65 72 28 24 6f 70 | ode).->setOptimizeAutoloader($op |
48440 | 74 69 6d 69 7a 65 29 0a 2d 3e 73 65 74 43 6c 61 73 73 4d 61 70 41 75 74 68 6f 72 69 74 61 74 69 | timize).->setClassMapAuthoritati |
48460 | 76 65 28 24 61 75 74 68 6f 72 69 74 61 74 69 76 65 29 0a 2d 3e 73 65 74 41 70 63 75 41 75 74 6f | ve($authoritative).->setApcuAuto |
48480 | 6c 6f 61 64 65 72 28 24 61 70 63 75 2c 20 24 61 70 63 75 50 72 65 66 69 78 29 0a 2d 3e 73 65 74 | loader($apcu,.$apcuPrefix).->set |
484a0 | 55 70 64 61 74 65 28 74 72 75 65 29 0a 2d 3e 73 65 74 49 6e 73 74 61 6c 6c 28 21 24 69 6e 70 75 | Update(true).->setInstall(!$inpu |
484c0 | 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 69 6e 73 74 61 6c 6c 27 29 29 0a 2d 3e 73 65 | t->getOption('no-install')).->se |
484e0 | 74 55 70 64 61 74 65 41 6c 6c 6f 77 54 72 61 6e 73 69 74 69 76 65 44 65 70 65 6e 64 65 6e 63 69 | tUpdateAllowTransitiveDependenci |
48500 | 65 73 28 24 75 70 64 61 74 65 41 6c 6c 6f 77 54 72 61 6e 73 69 74 69 76 65 44 65 70 65 6e 64 65 | es($updateAllowTransitiveDepende |
48520 | 6e 63 69 65 73 29 0a 2d 3e 73 65 74 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 | ncies).->setPlatformRequirementF |
48540 | 69 6c 74 65 72 28 24 74 68 69 73 2d 3e 67 65 74 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d | ilter($this->getPlatformRequirem |
48560 | 65 6e 74 46 69 6c 74 65 72 28 24 69 6e 70 75 74 29 29 0a 2d 3e 73 65 74 44 72 79 52 75 6e 28 24 | entFilter($input)).->setDryRun($ |
48580 | 64 72 79 52 75 6e 29 0a 2d 3e 73 65 74 41 75 64 69 74 28 21 24 69 6e 70 75 74 2d 3e 67 65 74 4f | dryRun).->setAudit(!$input->getO |
485a0 | 70 74 69 6f 6e 28 27 6e 6f 2d 61 75 64 69 74 27 29 29 0a 2d 3e 73 65 74 41 75 64 69 74 46 6f 72 | ption('no-audit')).->setAuditFor |
485c0 | 6d 61 74 28 24 74 68 69 73 2d 3e 67 65 74 41 75 64 69 74 46 6f 72 6d 61 74 28 24 69 6e 70 75 74 | mat($this->getAuditFormat($input |
485e0 | 29 29 0a 3b 0a 0a 0a 0a 69 66 20 28 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 4c 6f 63 6b 65 72 | )).;....if.($composer->getLocker |
48600 | 28 29 2d 3e 69 73 4c 6f 63 6b 65 64 28 29 29 20 7b 0a 24 69 6e 73 74 61 6c 6c 2d 3e 73 65 74 55 | ()->isLocked()).{.$install->setU |
48620 | 70 64 61 74 65 41 6c 6c 6f 77 4c 69 73 74 28 24 70 61 63 6b 61 67 65 73 29 3b 0a 7d 0a 0a 24 73 | pdateAllowList($packages);.}..$s |
48640 | 74 61 74 75 73 20 3d 20 24 69 6e 73 74 61 6c 6c 2d 3e 72 75 6e 28 29 3b 0a 69 66 20 28 24 73 74 | tatus.=.$install->run();.if.($st |
48660 | 61 74 75 73 20 21 3d 3d 20 30 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 22 5c | atus.!==.0).{.$io->writeError("\ |
48680 | 6e 22 2e 27 3c 65 72 72 6f 72 3e 52 65 6d 6f 76 61 6c 20 66 61 69 6c 65 64 2c 20 72 65 76 65 72 | n".'<error>Removal.failed,.rever |
486a0 | 74 69 6e 67 20 27 2e 24 66 69 6c 65 2e 27 20 74 6f 20 69 74 73 20 6f 72 69 67 69 6e 61 6c 20 63 | ting.'.$file.'.to.its.original.c |
486c0 | 6f 6e 74 65 6e 74 2e 3c 2f 65 72 72 6f 72 3e 27 29 3b 0a 66 69 6c 65 5f 70 75 74 5f 63 6f 6e 74 | ontent.</error>');.file_put_cont |
486e0 | 65 6e 74 73 28 24 6a 73 6f 6e 46 69 6c 65 2d 3e 67 65 74 50 61 74 68 28 29 2c 20 24 63 6f 6d 70 | ents($jsonFile->getPath(),.$comp |
48700 | 6f 73 65 72 42 61 63 6b 75 70 29 3b 0a 7d 0a 0a 69 66 20 28 21 24 64 72 79 52 75 6e 29 20 7b 0a | oserBackup);.}..if.(!$dryRun).{. |
48720 | 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 73 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 | foreach.($packages.as.$package). |
48740 | 7b 0a 69 66 20 28 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 79 4d 61 | {.if.($composer->getRepositoryMa |
48760 | 6e 61 67 65 72 28 29 2d 3e 67 65 74 4c 6f 63 61 6c 52 65 70 6f 73 69 74 6f 72 79 28 29 2d 3e 66 | nager()->getLocalRepository()->f |
48780 | 69 6e 64 50 61 63 6b 61 67 65 73 28 24 70 61 63 6b 61 67 65 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 | indPackages($package)).{.$io->wr |
487a0 | 69 74 65 45 72 72 6f 72 28 27 3c 65 72 72 6f 72 3e 52 65 6d 6f 76 61 6c 20 66 61 69 6c 65 64 2c | iteError('<error>Removal.failed, |
487c0 | 20 27 2e 24 70 61 63 6b 61 67 65 2e 27 20 69 73 20 73 74 69 6c 6c 20 70 72 65 73 65 6e 74 2c 20 | .'.$package.'.is.still.present,. |
487e0 | 69 74 20 6d 61 79 20 62 65 20 72 65 71 75 69 72 65 64 20 62 79 20 61 6e 6f 74 68 65 72 20 70 61 | it.may.be.required.by.another.pa |
48800 | 63 6b 61 67 65 2e 20 53 65 65 20 60 63 6f 6d 70 6f 73 65 72 20 77 68 79 20 27 2e 24 70 61 63 6b | ckage..See.`composer.why.'.$pack |
48820 | 61 67 65 2e 27 60 2e 3c 2f 65 72 72 6f 72 3e 27 29 3b 0a 0a 72 65 74 75 72 6e 20 32 3b 0a 7d 0a | age.'`.</error>');..return.2;.}. |
48840 | 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 73 74 61 74 75 73 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 | }.}..return.$status;.}.}.<?php.d |
48860 | 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a | eclare(strict_types=1);......... |
48880 | 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6d 6d 61 6e 64 3b 0a 0a | ...namespace.Composer\Command;.. |
488a0 | 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 5c | use.Composer\DependencyResolver\ |
488c0 | 52 65 71 75 65 73 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 43 6f | Request;.use.Composer\Package\Co |
488e0 | 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 | mpletePackageInterface;.use.Comp |
48900 | 6f 73 65 72 5c 55 74 69 6c 5c 46 69 6c 65 73 79 73 74 65 6d 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 | oser\Util\Filesystem;.use.Compos |
48920 | 65 72 5c 55 74 69 6c 5c 50 61 63 6b 61 67 65 53 6f 72 74 65 72 3b 0a 75 73 65 20 53 65 6c 64 5c | er\Util\PackageSorter;.use.Seld\ |
48940 | 53 69 67 6e 61 6c 5c 53 69 67 6e 61 6c 48 61 6e 64 6c 65 72 3b 0a 75 73 65 20 53 79 6d 66 6f 6e | Signal\SignalHandler;.use.Symfon |
48960 | 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 49 | y\Component\Console\Input\InputI |
48980 | 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 73 6f 6c 65 5c 49 | nterface;.use.Composer\Console\I |
489a0 | 6e 70 75 74 5c 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 | nput\InputArgument;.use.Composer |
489c0 | 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 4f 70 74 69 6f 6e 3b 0a 75 73 65 20 | \Console\Input\InputOption;.use. |
489e0 | 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 4f 75 74 70 75 74 | Symfony\Component\Console\Output |
48a00 | 5c 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 46 | \OutputInterface;.use.Composer\F |
48a20 | 61 63 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 6e 73 74 61 6c 6c 65 72 3b 0a | actory;.use.Composer\Installer;. |
48a40 | 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 6e 73 74 61 6c 6c 65 72 5c 49 6e 73 74 61 6c 6c 65 72 | use.Composer\Installer\Installer |
48a60 | 45 76 65 6e 74 73 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 4a 73 6f 6e 5c 4a 73 6f 6e 46 69 | Events;.use.Composer\Json\JsonFi |
48a80 | 6c 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 4a 73 6f 6e 5c 4a 73 6f 6e 4d 61 6e 69 70 75 | le;.use.Composer\Json\JsonManipu |
48aa0 | 6c 61 74 6f 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 56 65 72 73 | lator;.use.Composer\Package\Vers |
48ac0 | 69 6f 6e 5c 56 65 72 73 69 6f 6e 50 61 72 73 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c | ion\VersionParser;.use.Composer\ |
48ae0 | 50 61 63 6b 61 67 65 5c 4c 6f 61 64 65 72 5c 41 72 72 61 79 4c 6f 61 64 65 72 3b 0a 75 73 65 20 | Package\Loader\ArrayLoader;.use. |
48b00 | 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 42 61 73 65 50 61 63 6b 61 67 65 3b 0a 75 73 | Composer\Package\BasePackage;.us |
48b20 | 65 20 43 6f 6d 70 6f 73 65 72 5c 50 6c 75 67 69 6e 5c 43 6f 6d 6d 61 6e 64 45 76 65 6e 74 3b 0a | e.Composer\Plugin\CommandEvent;. |
48b40 | 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 6c 75 67 69 6e 5c 50 6c 75 67 69 6e 45 76 65 6e 74 73 | use.Composer\Plugin\PluginEvents |
48b60 | 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 43 6f 6d 70 6f 73 | ;.use.Composer\Repository\Compos |
48b80 | 69 74 65 52 65 70 6f 73 69 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f | iteRepository;.use.Composer\Repo |
48ba0 | 73 69 74 6f 72 79 5c 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 3b 0a 75 73 65 20 43 | sitory\PlatformRepository;.use.C |
48bc0 | 6f 6d 70 6f 73 65 72 5c 49 4f 5c 49 4f 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 | omposer\IO\IOInterface;.use.Comp |
48be0 | 6f 73 65 72 5c 41 64 76 69 73 6f 72 79 5c 41 75 64 69 74 6f 72 3b 0a 75 73 65 20 43 6f 6d 70 6f | oser\Advisory\Auditor;.use.Compo |
48c00 | 73 65 72 5c 55 74 69 6c 5c 53 69 6c 65 6e 63 65 72 3b 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 52 65 | ser\Util\Silencer;......class.Re |
48c20 | 71 75 69 72 65 43 6f 6d 6d 61 6e 64 20 65 78 74 65 6e 64 73 20 42 61 73 65 43 6f 6d 6d 61 6e 64 | quireCommand.extends.BaseCommand |
48c40 | 0a 7b 0a 75 73 65 20 43 6f 6d 70 6c 65 74 69 6f 6e 54 72 61 69 74 3b 0a 75 73 65 20 50 61 63 6b | .{.use.CompletionTrait;.use.Pack |
48c60 | 61 67 65 44 69 73 63 6f 76 65 72 79 54 72 61 69 74 3b 0a 0a 0a 70 72 69 76 61 74 65 20 24 6e 65 | ageDiscoveryTrait;...private.$ne |
48c80 | 77 6c 79 43 72 65 61 74 65 64 3b 0a 0a 70 72 69 76 61 74 65 20 24 66 69 72 73 74 52 65 71 75 69 | wlyCreated;..private.$firstRequi |
48ca0 | 72 65 3b 0a 0a 70 72 69 76 61 74 65 20 24 6a 73 6f 6e 3b 0a 0a 70 72 69 76 61 74 65 20 24 66 69 | re;..private.$json;..private.$fi |
48cc0 | 6c 65 3b 0a 0a 70 72 69 76 61 74 65 20 24 63 6f 6d 70 6f 73 65 72 42 61 63 6b 75 70 3b 0a 0a 70 | le;..private.$composerBackup;..p |
48ce0 | 72 69 76 61 74 65 20 24 6c 6f 63 6b 3b 0a 0a 70 72 69 76 61 74 65 20 24 6c 6f 63 6b 42 61 63 6b | rivate.$lock;..private.$lockBack |
48d00 | 75 70 3b 0a 0a 70 72 69 76 61 74 65 20 24 64 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 75 74 69 | up;..private.$dependencyResoluti |
48d20 | 6f 6e 43 6f 6d 70 6c 65 74 65 64 20 3d 20 66 61 6c 73 65 3b 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 | onCompleted.=.false;.....protect |
48d40 | 65 64 20 66 75 6e 63 74 69 6f 6e 20 63 6f 6e 66 69 67 75 72 65 28 29 0a 7b 0a 24 74 68 69 73 0a | ed.function.configure().{.$this. |
48d60 | 2d 3e 73 65 74 4e 61 6d 65 28 27 72 65 71 75 69 72 65 27 29 0a 2d 3e 73 65 74 41 6c 69 61 73 65 | ->setName('require').->setAliase |
48d80 | 73 28 5b 27 72 27 5d 29 0a 2d 3e 73 65 74 44 65 73 63 72 69 70 74 69 6f 6e 28 27 41 64 64 73 20 | s(['r']).->setDescription('Adds. |
48da0 | 72 65 71 75 69 72 65 64 20 70 61 63 6b 61 67 65 73 20 74 6f 20 79 6f 75 72 20 63 6f 6d 70 6f 73 | required.packages.to.your.compos |
48dc0 | 65 72 2e 6a 73 6f 6e 20 61 6e 64 20 69 6e 73 74 61 6c 6c 73 20 74 68 65 6d 27 29 0a 2d 3e 73 65 | er.json.and.installs.them').->se |
48de0 | 74 44 65 66 69 6e 69 74 69 6f 6e 28 5b 0a 6e 65 77 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 28 | tDefinition([.new.InputArgument( |
48e00 | 27 70 61 63 6b 61 67 65 73 27 2c 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 3a 3a 49 53 5f 41 52 | 'packages',.InputArgument::IS_AR |
48e20 | 52 41 59 20 7c 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 3a 3a 4f 50 54 49 4f 4e 41 4c 2c 20 27 | RAY.|.InputArgument::OPTIONAL,.' |
48e40 | 4f 70 74 69 6f 6e 61 6c 20 70 61 63 6b 61 67 65 20 6e 61 6d 65 20 63 61 6e 20 61 6c 73 6f 20 69 | Optional.package.name.can.also.i |
48e60 | 6e 63 6c 75 64 65 20 61 20 76 65 72 73 69 6f 6e 20 63 6f 6e 73 74 72 61 69 6e 74 2c 20 65 2e 67 | nclude.a.version.constraint,.e.g |
48e80 | 2e 20 66 6f 6f 2f 62 61 72 20 6f 72 20 66 6f 6f 2f 62 61 72 3a 31 2e 30 2e 30 20 6f 72 20 66 6f | ..foo/bar.or.foo/bar:1.0.0.or.fo |
48ea0 | 6f 2f 62 61 72 3d 31 2e 30 2e 30 20 6f 72 20 22 66 6f 6f 2f 62 61 72 20 31 2e 30 2e 30 22 27 2c | o/bar=1.0.0.or."foo/bar.1.0.0"', |
48ec0 | 20 6e 75 6c 6c 2c 20 24 74 68 69 73 2d 3e 73 75 67 67 65 73 74 41 76 61 69 6c 61 62 6c 65 50 61 | .null,.$this->suggestAvailablePa |
48ee0 | 63 6b 61 67 65 49 6e 63 6c 50 6c 61 74 66 6f 72 6d 28 29 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f | ckageInclPlatform()),.new.InputO |
48f00 | 70 74 69 6f 6e 28 27 64 65 76 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a | ption('dev',.null,.InputOption:: |
48f20 | 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 41 64 64 20 72 65 71 75 69 72 65 6d 65 6e 74 20 74 6f 20 | VALUE_NONE,.'Add.requirement.to. |
48f40 | 72 65 71 75 69 72 65 2d 64 65 76 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 | require-dev.'),.new.InputOption( |
48f60 | 27 64 72 79 2d 72 75 6e 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 | 'dry-run',.null,.InputOption::VA |
48f80 | 4c 55 45 5f 4e 4f 4e 45 2c 20 27 4f 75 74 70 75 74 73 20 74 68 65 20 6f 70 65 72 61 74 69 6f 6e | LUE_NONE,.'Outputs.the.operation |
48fa0 | 73 20 62 75 74 20 77 69 6c 6c 20 6e 6f 74 20 65 78 65 63 75 74 65 20 61 6e 79 74 68 69 6e 67 20 | s.but.will.not.execute.anything. |
48fc0 | 28 69 6d 70 6c 69 63 69 74 6c 79 20 65 6e 61 62 6c 65 73 20 2d 2d 76 65 72 62 6f 73 65 29 2e 27 | (implicitly.enables.--verbose).' |
48fe0 | 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 70 72 65 66 65 72 2d 73 6f 75 72 63 | ),.new.InputOption('prefer-sourc |
49000 | 65 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e | e',.null,.InputOption::VALUE_NON |
49020 | 45 2c 20 27 46 6f 72 63 65 73 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 66 72 6f 6d 20 70 61 63 | E,.'Forces.installation.from.pac |
49040 | 6b 61 67 65 20 73 6f 75 72 63 65 73 20 77 68 65 6e 20 70 6f 73 73 69 62 6c 65 2c 20 69 6e 63 6c | kage.sources.when.possible,.incl |
49060 | 75 64 69 6e 67 20 56 43 53 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 2e 27 29 2c 0a 6e 65 77 20 49 6e | uding.VCS.information.'),.new.In |
49080 | 70 75 74 4f 70 74 69 6f 6e 28 27 70 72 65 66 65 72 2d 64 69 73 74 27 2c 20 6e 75 6c 6c 2c 20 49 | putOption('prefer-dist',.null,.I |
490a0 | 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 46 6f 72 63 65 73 20 | nputOption::VALUE_NONE,.'Forces. |
490c0 | 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 66 72 6f 6d 20 70 61 63 6b 61 67 65 20 64 69 73 74 20 28 | installation.from.package.dist.( |
490e0 | 64 65 66 61 75 6c 74 20 62 65 68 61 76 69 6f 72 29 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f | default.behavior).'),.new.InputO |
49100 | 70 74 69 6f 6e 28 27 70 72 65 66 65 72 2d 69 6e 73 74 61 6c 6c 27 2c 20 6e 75 6c 6c 2c 20 49 6e | ption('prefer-install',.null,.In |
49120 | 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 52 45 51 55 49 52 45 44 2c 20 27 46 6f 72 63 | putOption::VALUE_REQUIRED,.'Forc |
49140 | 65 73 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 66 72 6f 6d 20 70 61 63 6b 61 67 65 20 64 69 73 | es.installation.from.package.dis |
49160 | 74 7c 73 6f 75 72 63 65 7c 61 75 74 6f 20 28 61 75 74 6f 20 63 68 6f 6f 73 65 73 20 73 6f 75 72 | t|source|auto.(auto.chooses.sour |
49180 | 63 65 20 66 6f 72 20 64 65 76 20 76 65 72 73 69 6f 6e 73 2c 20 64 69 73 74 20 66 6f 72 20 74 68 | ce.for.dev.versions,.dist.for.th |
491a0 | 65 20 72 65 73 74 29 2e 27 2c 20 6e 75 6c 6c 2c 20 24 74 68 69 73 2d 3e 73 75 67 67 65 73 74 50 | e.rest).',.null,.$this->suggestP |
491c0 | 72 65 66 65 72 49 6e 73 74 61 6c 6c 28 29 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e | referInstall()),.new.InputOption |
491e0 | 28 27 66 69 78 65 64 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c | ('fixed',.null,.InputOption::VAL |
49200 | 55 45 5f 4e 4f 4e 45 2c 20 27 57 72 69 74 65 20 66 69 78 65 64 20 76 65 72 73 69 6f 6e 20 74 6f | UE_NONE,.'Write.fixed.version.to |
49220 | 20 74 68 65 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 | .the.composer.json.'),.new.Input |
49240 | 4f 70 74 69 6f 6e 28 27 6e 6f 2d 73 75 67 67 65 73 74 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 | Option('no-suggest',.null,.Input |
49260 | 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 44 45 50 52 45 43 41 54 45 44 3a | Option::VALUE_NONE,.'DEPRECATED: |
49280 | 20 54 68 69 73 20 66 6c 61 67 20 64 6f 65 73 20 6e 6f 74 20 65 78 69 73 74 20 61 6e 79 6d 6f 72 | .This.flag.does.not.exist.anymor |
492a0 | 65 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 70 72 6f 67 72 65 | e.'),.new.InputOption('no-progre |
492c0 | 73 73 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f | ss',.null,.InputOption::VALUE_NO |
492e0 | 4e 45 2c 20 27 44 6f 20 6e 6f 74 20 6f 75 74 70 75 74 20 64 6f 77 6e 6c 6f 61 64 20 70 72 6f 67 | NE,.'Do.not.output.download.prog |
49300 | 72 65 73 73 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 75 70 64 | ress.'),.new.InputOption('no-upd |
49320 | 61 74 65 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e | ate',.null,.InputOption::VALUE_N |
49340 | 4f 4e 45 2c 20 27 44 69 73 61 62 6c 65 73 20 74 68 65 20 61 75 74 6f 6d 61 74 69 63 20 75 70 64 | ONE,.'Disables.the.automatic.upd |
49360 | 61 74 65 20 6f 66 20 74 68 65 20 64 65 70 65 6e 64 65 6e 63 69 65 73 20 28 69 6d 70 6c 69 65 73 | ate.of.the.dependencies.(implies |
49380 | 20 2d 2d 6e 6f 2d 69 6e 73 74 61 6c 6c 29 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 | .--no-install).'),.new.InputOpti |
493a0 | 6f 6e 28 27 6e 6f 2d 69 6e 73 74 61 6c 6c 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 | on('no-install',.null,.InputOpti |
493c0 | 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 53 6b 69 70 20 74 68 65 20 69 6e 73 74 61 6c | on::VALUE_NONE,.'Skip.the.instal |
493e0 | 6c 20 73 74 65 70 20 61 66 74 65 72 20 75 70 64 61 74 69 6e 67 20 74 68 65 20 63 6f 6d 70 6f 73 | l.step.after.updating.the.compos |
49400 | 65 72 2e 6c 6f 63 6b 20 66 69 6c 65 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e | er.lock.file.'),.new.InputOption |
49420 | 28 27 6e 6f 2d 61 75 64 69 74 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a | ('no-audit',.null,.InputOption:: |
49440 | 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 53 6b 69 70 20 74 68 65 20 61 75 64 69 74 20 73 74 65 70 | VALUE_NONE,.'Skip.the.audit.step |
49460 | 20 61 66 74 65 72 20 75 70 64 61 74 69 6e 67 20 74 68 65 20 63 6f 6d 70 6f 73 65 72 2e 6c 6f 63 | .after.updating.the.composer.loc |
49480 | 6b 20 66 69 6c 65 20 28 63 61 6e 20 61 6c 73 6f 20 62 65 20 73 65 74 20 76 69 61 20 74 68 65 20 | k.file.(can.also.be.set.via.the. |
494a0 | 43 4f 4d 50 4f 53 45 52 5f 4e 4f 5f 41 55 44 49 54 3d 31 20 65 6e 76 20 76 61 72 29 2e 27 29 2c | COMPOSER_NO_AUDIT=1.env.var).'), |
494c0 | 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 61 75 64 69 74 2d 66 6f 72 6d 61 74 27 2c | .new.InputOption('audit-format', |
494e0 | 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 52 45 51 55 49 52 | .null,.InputOption::VALUE_REQUIR |
49500 | 45 44 2c 20 27 41 75 64 69 74 20 6f 75 74 70 75 74 20 66 6f 72 6d 61 74 2e 20 4d 75 73 74 20 62 | ED,.'Audit.output.format..Must.b |
49520 | 65 20 22 74 61 62 6c 65 22 2c 20 22 70 6c 61 69 6e 22 2c 20 22 6a 73 6f 6e 22 2c 20 6f 72 20 22 | e."table",."plain",."json",.or." |
49540 | 73 75 6d 6d 61 72 79 22 2e 27 2c 20 41 75 64 69 74 6f 72 3a 3a 46 4f 52 4d 41 54 5f 53 55 4d 4d | summary".',.Auditor::FORMAT_SUMM |
49560 | 41 52 59 2c 20 41 75 64 69 74 6f 72 3a 3a 46 4f 52 4d 41 54 53 29 2c 0a 6e 65 77 20 49 6e 70 75 | ARY,.Auditor::FORMATS),.new.Inpu |
49580 | 74 4f 70 74 69 6f 6e 28 27 75 70 64 61 74 65 2d 6e 6f 2d 64 65 76 27 2c 20 6e 75 6c 6c 2c 20 49 | tOption('update-no-dev',.null,.I |
495a0 | 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 52 75 6e 20 74 68 65 | nputOption::VALUE_NONE,.'Run.the |
495c0 | 20 64 65 70 65 6e 64 65 6e 63 79 20 75 70 64 61 74 65 20 77 69 74 68 20 74 68 65 20 2d 2d 6e 6f | .dependency.update.with.the.--no |
495e0 | 2d 64 65 76 20 6f 70 74 69 6f 6e 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 | -dev.option.'),.new.InputOption( |
49600 | 27 75 70 64 61 74 65 2d 77 69 74 68 2d 64 65 70 65 6e 64 65 6e 63 69 65 73 27 2c 20 27 77 27 2c | 'update-with-dependencies',.'w', |
49620 | 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 41 6c 6c 6f 77 | .InputOption::VALUE_NONE,.'Allow |
49640 | 73 20 69 6e 68 65 72 69 74 65 64 20 64 65 70 65 6e 64 65 6e 63 69 65 73 20 74 6f 20 62 65 20 75 | s.inherited.dependencies.to.be.u |
49660 | 70 64 61 74 65 64 2c 20 65 78 63 65 70 74 20 74 68 6f 73 65 20 74 68 61 74 20 61 72 65 20 72 6f | pdated,.except.those.that.are.ro |
49680 | 6f 74 20 72 65 71 75 69 72 65 6d 65 6e 74 73 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 | ot.requirements.'),.new.InputOpt |
496a0 | 69 6f 6e 28 27 75 70 64 61 74 65 2d 77 69 74 68 2d 61 6c 6c 2d 64 65 70 65 6e 64 65 6e 63 69 65 | ion('update-with-all-dependencie |
496c0 | 73 27 2c 20 27 57 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 | s',.'W',.InputOption::VALUE_NONE |
496e0 | 2c 20 27 41 6c 6c 6f 77 73 20 61 6c 6c 20 69 6e 68 65 72 69 74 65 64 20 64 65 70 65 6e 64 65 6e | ,.'Allows.all.inherited.dependen |
49700 | 63 69 65 73 20 74 6f 20 62 65 20 75 70 64 61 74 65 64 2c 20 69 6e 63 6c 75 64 69 6e 67 20 74 68 | cies.to.be.updated,.including.th |
49720 | 6f 73 65 20 74 68 61 74 20 61 72 65 20 72 6f 6f 74 20 72 65 71 75 69 72 65 6d 65 6e 74 73 2e 27 | ose.that.are.root.requirements.' |
49740 | 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 77 69 74 68 2d 64 65 70 65 6e 64 65 | ),.new.InputOption('with-depende |
49760 | 6e 63 69 65 73 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 | ncies',.null,.InputOption::VALUE |
49780 | 5f 4e 4f 4e 45 2c 20 27 41 6c 69 61 73 20 66 6f 72 20 2d 2d 75 70 64 61 74 65 2d 77 69 74 68 2d | _NONE,.'Alias.for.--update-with- |
497a0 | 64 65 70 65 6e 64 65 6e 63 69 65 73 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 | dependencies'),.new.InputOption( |
497c0 | 27 77 69 74 68 2d 61 6c 6c 2d 64 65 70 65 6e 64 65 6e 63 69 65 73 27 2c 20 6e 75 6c 6c 2c 20 49 | 'with-all-dependencies',.null,.I |
497e0 | 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 41 6c 69 61 73 20 66 | nputOption::VALUE_NONE,.'Alias.f |
49800 | 6f 72 20 2d 2d 75 70 64 61 74 65 2d 77 69 74 68 2d 61 6c 6c 2d 64 65 70 65 6e 64 65 6e 63 69 65 | or.--update-with-all-dependencie |
49820 | 73 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 69 67 6e 6f 72 65 2d 70 6c 61 | s'),.new.InputOption('ignore-pla |
49840 | 74 66 6f 72 6d 2d 72 65 71 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 | tform-req',.null,.InputOption::V |
49860 | 41 4c 55 45 5f 52 45 51 55 49 52 45 44 20 7c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c | ALUE_REQUIRED.|.InputOption::VAL |
49880 | 55 45 5f 49 53 5f 41 52 52 41 59 2c 20 27 49 67 6e 6f 72 65 20 61 20 73 70 65 63 69 66 69 63 20 | UE_IS_ARRAY,.'Ignore.a.specific. |
498a0 | 70 6c 61 74 66 6f 72 6d 20 72 65 71 75 69 72 65 6d 65 6e 74 20 28 70 68 70 20 26 20 65 78 74 2d | platform.requirement.(php.&.ext- |
498c0 | 20 70 61 63 6b 61 67 65 73 29 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 | .packages).'),.new.InputOption(' |
498e0 | 69 67 6e 6f 72 65 2d 70 6c 61 74 66 6f 72 6d 2d 72 65 71 73 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 | ignore-platform-reqs',.null,.Inp |
49900 | 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 49 67 6e 6f 72 65 20 61 6c | utOption::VALUE_NONE,.'Ignore.al |
49920 | 6c 20 70 6c 61 74 66 6f 72 6d 20 72 65 71 75 69 72 65 6d 65 6e 74 73 20 28 70 68 70 20 26 20 65 | l.platform.requirements.(php.&.e |
49940 | 78 74 2d 20 70 61 63 6b 61 67 65 73 29 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f | xt-.packages).'),.new.InputOptio |
49960 | 6e 28 27 70 72 65 66 65 72 2d 73 74 61 62 6c 65 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 | n('prefer-stable',.null,.InputOp |
49980 | 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 50 72 65 66 65 72 20 73 74 61 62 6c 65 | tion::VALUE_NONE,.'Prefer.stable |
499a0 | 20 76 65 72 73 69 6f 6e 73 20 6f 66 20 64 65 70 65 6e 64 65 6e 63 69 65 73 20 28 63 61 6e 20 61 | .versions.of.dependencies.(can.a |
499c0 | 6c 73 6f 20 62 65 20 73 65 74 20 76 69 61 20 74 68 65 20 43 4f 4d 50 4f 53 45 52 5f 50 52 45 46 | lso.be.set.via.the.COMPOSER_PREF |
499e0 | 45 52 5f 53 54 41 42 4c 45 3d 31 20 65 6e 76 20 76 61 72 29 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 | ER_STABLE=1.env.var).'),.new.Inp |
49a00 | 75 74 4f 70 74 69 6f 6e 28 27 70 72 65 66 65 72 2d 6c 6f 77 65 73 74 27 2c 20 6e 75 6c 6c 2c 20 | utOption('prefer-lowest',.null,. |
49a20 | 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 50 72 65 66 65 72 | InputOption::VALUE_NONE,.'Prefer |
49a40 | 20 6c 6f 77 65 73 74 20 76 65 72 73 69 6f 6e 73 20 6f 66 20 64 65 70 65 6e 64 65 6e 63 69 65 73 | .lowest.versions.of.dependencies |
49a60 | 20 28 63 61 6e 20 61 6c 73 6f 20 62 65 20 73 65 74 20 76 69 61 20 74 68 65 20 43 4f 4d 50 4f 53 | .(can.also.be.set.via.the.COMPOS |
49a80 | 45 52 5f 50 52 45 46 45 52 5f 4c 4f 57 45 53 54 3d 31 20 65 6e 76 20 76 61 72 29 2e 27 29 2c 0a | ER_PREFER_LOWEST=1.env.var).'),. |
49aa0 | 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 73 6f 72 74 2d 70 61 63 6b 61 67 65 73 27 2c | new.InputOption('sort-packages', |
49ac0 | 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 | .null,.InputOption::VALUE_NONE,. |
49ae0 | 27 53 6f 72 74 73 20 70 61 63 6b 61 67 65 73 20 77 68 65 6e 20 61 64 64 69 6e 67 2f 75 70 64 61 | 'Sorts.packages.when.adding/upda |
49b00 | 74 69 6e 67 20 61 20 6e 65 77 20 64 65 70 65 6e 64 65 6e 63 79 27 29 2c 0a 6e 65 77 20 49 6e 70 | ting.a.new.dependency'),.new.Inp |
49b20 | 75 74 4f 70 74 69 6f 6e 28 27 6f 70 74 69 6d 69 7a 65 2d 61 75 74 6f 6c 6f 61 64 65 72 27 2c 20 | utOption('optimize-autoloader',. |
49b40 | 27 6f 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 4f | 'o',.InputOption::VALUE_NONE,.'O |
49b60 | 70 74 69 6d 69 7a 65 20 61 75 74 6f 6c 6f 61 64 65 72 20 64 75 72 69 6e 67 20 61 75 74 6f 6c 6f | ptimize.autoloader.during.autolo |
49b80 | 61 64 65 72 20 64 75 6d 70 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 63 6c | ader.dump'),.new.InputOption('cl |
49ba0 | 61 73 73 6d 61 70 2d 61 75 74 68 6f 72 69 74 61 74 69 76 65 27 2c 20 27 61 27 2c 20 49 6e 70 75 | assmap-authoritative',.'a',.Inpu |
49bc0 | 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 41 75 74 6f 6c 6f 61 64 20 63 | tOption::VALUE_NONE,.'Autoload.c |
49be0 | 6c 61 73 73 65 73 20 66 72 6f 6d 20 74 68 65 20 63 6c 61 73 73 6d 61 70 20 6f 6e 6c 79 2e 20 49 | lasses.from.the.classmap.only..I |
49c00 | 6d 70 6c 69 63 69 74 6c 79 20 65 6e 61 62 6c 65 73 20 60 2d 2d 6f 70 74 69 6d 69 7a 65 2d 61 75 | mplicitly.enables.`--optimize-au |
49c20 | 74 6f 6c 6f 61 64 65 72 60 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 61 | toloader`.'),.new.InputOption('a |
49c40 | 70 63 75 2d 61 75 74 6f 6c 6f 61 64 65 72 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 | pcu-autoloader',.null,.InputOpti |
49c60 | 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 55 73 65 20 41 50 43 75 20 74 6f 20 63 61 63 | on::VALUE_NONE,.'Use.APCu.to.cac |
49c80 | 68 65 20 66 6f 75 6e 64 2f 6e 6f 74 2d 66 6f 75 6e 64 20 63 6c 61 73 73 65 73 2e 27 29 2c 0a 6e | he.found/not-found.classes.'),.n |
49ca0 | 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 61 70 63 75 2d 61 75 74 6f 6c 6f 61 64 65 72 2d | ew.InputOption('apcu-autoloader- |
49cc0 | 70 72 65 66 69 78 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 | prefix',.null,.InputOption::VALU |
49ce0 | 45 5f 52 45 51 55 49 52 45 44 2c 20 27 55 73 65 20 61 20 63 75 73 74 6f 6d 20 70 72 65 66 69 78 | E_REQUIRED,.'Use.a.custom.prefix |
49d00 | 20 66 6f 72 20 74 68 65 20 41 50 43 75 20 61 75 74 6f 6c 6f 61 64 65 72 20 63 61 63 68 65 2e 20 | .for.the.APCu.autoloader.cache.. |
49d20 | 49 6d 70 6c 69 63 69 74 6c 79 20 65 6e 61 62 6c 65 73 20 2d 2d 61 70 63 75 2d 61 75 74 6f 6c 6f | Implicitly.enables.--apcu-autolo |
49d40 | 61 64 65 72 27 29 2c 0a 5d 29 0a 2d 3e 73 65 74 48 65 6c 70 28 0a 3c 3c 3c 45 4f 54 0a 54 68 65 | ader'),.]).->setHelp(.<<<EOT.The |
49d60 | 20 72 65 71 75 69 72 65 20 63 6f 6d 6d 61 6e 64 20 61 64 64 73 20 72 65 71 75 69 72 65 64 20 70 | .require.command.adds.required.p |
49d80 | 61 63 6b 61 67 65 73 20 74 6f 20 79 6f 75 72 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 20 61 6e | ackages.to.your.composer.json.an |
49da0 | 64 20 69 6e 73 74 61 6c 6c 73 20 74 68 65 6d 2e 0a 0a 49 66 20 79 6f 75 20 64 6f 20 6e 6f 74 20 | d.installs.them...If.you.do.not. |
49dc0 | 73 70 65 63 69 66 79 20 61 20 70 61 63 6b 61 67 65 2c 20 63 6f 6d 70 6f 73 65 72 20 77 69 6c 6c | specify.a.package,.composer.will |
49de0 | 20 70 72 6f 6d 70 74 20 79 6f 75 20 74 6f 20 73 65 61 72 63 68 20 66 6f 72 20 61 20 70 61 63 6b | .prompt.you.to.search.for.a.pack |
49e00 | 61 67 65 2c 20 61 6e 64 20 67 69 76 65 6e 20 72 65 73 75 6c 74 73 2c 20 70 72 6f 76 69 64 65 20 | age,.and.given.results,.provide. |
49e20 | 61 20 6c 69 73 74 20 6f 66 0a 6d 61 74 63 68 65 73 20 74 6f 20 72 65 71 75 69 72 65 2e 0a 0a 49 | a.list.of.matches.to.require...I |
49e40 | 66 20 79 6f 75 20 64 6f 20 6e 6f 74 20 73 70 65 63 69 66 79 20 61 20 76 65 72 73 69 6f 6e 20 63 | f.you.do.not.specify.a.version.c |
49e60 | 6f 6e 73 74 72 61 69 6e 74 2c 20 63 6f 6d 70 6f 73 65 72 20 77 69 6c 6c 20 63 68 6f 6f 73 65 20 | onstraint,.composer.will.choose. |
49e80 | 61 20 73 75 69 74 61 62 6c 65 20 6f 6e 65 20 62 61 73 65 64 20 6f 6e 20 74 68 65 20 61 76 61 69 | a.suitable.one.based.on.the.avai |
49ea0 | 6c 61 62 6c 65 20 70 61 63 6b 61 67 65 20 76 65 72 73 69 6f 6e 73 2e 0a 0a 49 66 20 79 6f 75 20 | lable.package.versions...If.you. |
49ec0 | 64 6f 20 6e 6f 74 20 77 61 6e 74 20 74 6f 20 69 6e 73 74 61 6c 6c 20 74 68 65 20 6e 65 77 20 64 | do.not.want.to.install.the.new.d |
49ee0 | 65 70 65 6e 64 65 6e 63 69 65 73 20 69 6d 6d 65 64 69 61 74 65 6c 79 20 79 6f 75 20 63 61 6e 20 | ependencies.immediately.you.can. |
49f00 | 63 61 6c 6c 20 69 74 20 77 69 74 68 20 2d 2d 6e 6f 2d 75 70 64 61 74 65 0a 0a 52 65 61 64 20 6d | call.it.with.--no-update..Read.m |
49f20 | 6f 72 65 20 61 74 20 68 74 74 70 73 3a 2f 2f 67 65 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 67 2f 64 | ore.at.https://getcomposer.org/d |
49f40 | 6f 63 2f 30 33 2d 63 6c 69 2e 6d 64 23 72 65 71 75 69 72 65 0a 45 4f 54 0a 29 0a 3b 0a 7d 0a 0a | oc/03-cli.md#require.EOT.).;.}.. |
49f60 | 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 65 78 65 63 75 74 65 28 49 6e | ...protected.function.execute(In |
49f80 | 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 69 6e 70 75 74 2c 20 4f 75 74 70 75 74 49 6e 74 65 72 | putInterface.$input,.OutputInter |
49fa0 | 66 61 63 65 20 24 6f 75 74 70 75 74 29 0a 7b 0a 24 74 68 69 73 2d 3e 66 69 6c 65 20 3d 20 46 61 | face.$output).{.$this->file.=.Fa |
49fc0 | 63 74 6f 72 79 3a 3a 67 65 74 43 6f 6d 70 6f 73 65 72 46 69 6c 65 28 29 3b 0a 24 69 6f 20 3d 20 | ctory::getComposerFile();.$io.=. |
49fe0 | 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 3b 0a 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 | $this->getIO();..if.($input->get |
4a000 | 4f 70 74 69 6f 6e 28 27 6e 6f 2d 73 75 67 67 65 73 74 27 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 | Option('no-suggest')).{.$io->wri |
4a020 | 74 65 45 72 72 6f 72 28 27 3c 77 61 72 6e 69 6e 67 3e 59 6f 75 20 61 72 65 20 75 73 69 6e 67 20 | teError('<warning>You.are.using. |
4a040 | 74 68 65 20 64 65 70 72 65 63 61 74 65 64 20 6f 70 74 69 6f 6e 20 22 2d 2d 6e 6f 2d 73 75 67 67 | the.deprecated.option."--no-sugg |
4a060 | 65 73 74 22 2e 20 49 74 20 68 61 73 20 6e 6f 20 65 66 66 65 63 74 20 61 6e 64 20 77 69 6c 6c 20 | est"..It.has.no.effect.and.will. |
4a080 | 62 72 65 61 6b 20 69 6e 20 43 6f 6d 70 6f 73 65 72 20 33 2e 3c 2f 77 61 72 6e 69 6e 67 3e 27 29 | break.in.Composer.3.</warning>') |
4a0a0 | 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 6e 65 77 6c 79 43 72 65 61 74 65 64 20 3d 20 21 66 69 6c 65 | ;.}..$this->newlyCreated.=.!file |
4a0c0 | 5f 65 78 69 73 74 73 28 24 74 68 69 73 2d 3e 66 69 6c 65 29 3b 0a 69 66 20 28 24 74 68 69 73 2d | _exists($this->file);.if.($this- |
4a0e0 | 3e 6e 65 77 6c 79 43 72 65 61 74 65 64 20 26 26 20 21 66 69 6c 65 5f 70 75 74 5f 63 6f 6e 74 65 | >newlyCreated.&&.!file_put_conte |
4a100 | 6e 74 73 28 24 74 68 69 73 2d 3e 66 69 6c 65 2c 20 22 7b 5c 6e 7d 5c 6e 22 29 29 20 7b 0a 24 69 | nts($this->file,."{\n}\n")).{.$i |
4a120 | 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 65 72 72 6f 72 3e 27 2e 24 74 68 69 73 2d 3e 66 | o->writeError('<error>'.$this->f |
4a140 | 69 6c 65 2e 27 20 63 6f 75 6c 64 20 6e 6f 74 20 62 65 20 63 72 65 61 74 65 64 2e 3c 2f 65 72 72 | ile.'.could.not.be.created.</err |
4a160 | 6f 72 3e 27 29 3b 0a 0a 72 65 74 75 72 6e 20 31 3b 0a 7d 0a 69 66 20 28 21 46 69 6c 65 73 79 73 | or>');..return.1;.}.if.(!Filesys |
4a180 | 74 65 6d 3a 3a 69 73 52 65 61 64 61 62 6c 65 28 24 74 68 69 73 2d 3e 66 69 6c 65 29 29 20 7b 0a | tem::isReadable($this->file)).{. |
4a1a0 | 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 65 72 72 6f 72 3e 27 2e 24 74 68 69 73 2d | $io->writeError('<error>'.$this- |
4a1c0 | 3e 66 69 6c 65 2e 27 20 69 73 20 6e 6f 74 20 72 65 61 64 61 62 6c 65 2e 3c 2f 65 72 72 6f 72 3e | >file.'.is.not.readable.</error> |
4a1e0 | 27 29 3b 0a 0a 72 65 74 75 72 6e 20 31 3b 0a 7d 0a 0a 69 66 20 28 66 69 6c 65 73 69 7a 65 28 24 | ');..return.1;.}..if.(filesize($ |
4a200 | 74 68 69 73 2d 3e 66 69 6c 65 29 20 3d 3d 3d 20 30 29 20 7b 0a 66 69 6c 65 5f 70 75 74 5f 63 6f | this->file).===.0).{.file_put_co |
4a220 | 6e 74 65 6e 74 73 28 24 74 68 69 73 2d 3e 66 69 6c 65 2c 20 22 7b 5c 6e 7d 5c 6e 22 29 3b 0a 7d | ntents($this->file,."{\n}\n");.} |
4a240 | 0a 0a 24 74 68 69 73 2d 3e 6a 73 6f 6e 20 3d 20 6e 65 77 20 4a 73 6f 6e 46 69 6c 65 28 24 74 68 | ..$this->json.=.new.JsonFile($th |
4a260 | 69 73 2d 3e 66 69 6c 65 29 3b 0a 24 74 68 69 73 2d 3e 6c 6f 63 6b 20 3d 20 46 61 63 74 6f 72 79 | is->file);.$this->lock.=.Factory |
4a280 | 3a 3a 67 65 74 4c 6f 63 6b 46 69 6c 65 28 24 74 68 69 73 2d 3e 66 69 6c 65 29 3b 0a 24 74 68 69 | ::getLockFile($this->file);.$thi |
4a2a0 | 73 2d 3e 63 6f 6d 70 6f 73 65 72 42 61 63 6b 75 70 20 3d 20 66 69 6c 65 5f 67 65 74 5f 63 6f 6e | s->composerBackup.=.file_get_con |
4a2c0 | 74 65 6e 74 73 28 24 74 68 69 73 2d 3e 6a 73 6f 6e 2d 3e 67 65 74 50 61 74 68 28 29 29 3b 0a 24 | tents($this->json->getPath());.$ |
4a2e0 | 74 68 69 73 2d 3e 6c 6f 63 6b 42 61 63 6b 75 70 20 3d 20 66 69 6c 65 5f 65 78 69 73 74 73 28 24 | this->lockBackup.=.file_exists($ |
4a300 | 74 68 69 73 2d 3e 6c 6f 63 6b 29 20 3f 20 66 69 6c 65 5f 67 65 74 5f 63 6f 6e 74 65 6e 74 73 28 | this->lock).?.file_get_contents( |
4a320 | 24 74 68 69 73 2d 3e 6c 6f 63 6b 29 20 3a 20 6e 75 6c 6c 3b 0a 0a 24 73 69 67 6e 61 6c 48 61 6e | $this->lock).:.null;..$signalHan |
4a340 | 64 6c 65 72 20 3d 20 53 69 67 6e 61 6c 48 61 6e 64 6c 65 72 3a 3a 63 72 65 61 74 65 28 5b 53 69 | dler.=.SignalHandler::create([Si |
4a360 | 67 6e 61 6c 48 61 6e 64 6c 65 72 3a 3a 53 49 47 49 4e 54 2c 20 53 69 67 6e 61 6c 48 61 6e 64 6c | gnalHandler::SIGINT,.SignalHandl |
4a380 | 65 72 3a 3a 53 49 47 54 45 52 4d 2c 20 53 69 67 6e 61 6c 48 61 6e 64 6c 65 72 3a 3a 53 49 47 48 | er::SIGTERM,.SignalHandler::SIGH |
4a3a0 | 55 50 5d 2c 20 66 75 6e 63 74 69 6f 6e 20 28 73 74 72 69 6e 67 20 24 73 69 67 6e 61 6c 2c 20 53 | UP],.function.(string.$signal,.S |
4a3c0 | 69 67 6e 61 6c 48 61 6e 64 6c 65 72 20 24 68 61 6e 64 6c 65 72 29 20 7b 0a 24 74 68 69 73 2d 3e | ignalHandler.$handler).{.$this-> |
4a3e0 | 67 65 74 49 4f 28 29 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 52 65 63 65 69 76 65 64 20 27 2e | getIO()->writeError('Received.'. |
4a400 | 24 73 69 67 6e 61 6c 2e 27 2c 20 61 62 6f 72 74 69 6e 67 27 2c 20 74 72 75 65 2c 20 49 4f 49 6e | $signal.',.aborting',.true,.IOIn |
4a420 | 74 65 72 66 61 63 65 3a 3a 44 45 42 55 47 29 3b 0a 24 74 68 69 73 2d 3e 72 65 76 65 72 74 43 6f | terface::DEBUG);.$this->revertCo |
4a440 | 6d 70 6f 73 65 72 46 69 6c 65 28 29 3b 0a 24 68 61 6e 64 6c 65 72 2d 3e 65 78 69 74 57 69 74 68 | mposerFile();.$handler->exitWith |
4a460 | 4c 61 73 74 53 69 67 6e 61 6c 28 29 3b 0a 7d 29 3b 0a 0a 0a 0a 69 66 20 28 21 69 73 5f 77 72 69 | LastSignal();.});....if.(!is_wri |
4a480 | 74 61 62 6c 65 28 24 74 68 69 73 2d 3e 66 69 6c 65 29 20 26 26 20 66 61 6c 73 65 20 3d 3d 3d 20 | table($this->file).&&.false.===. |
4a4a0 | 53 69 6c 65 6e 63 65 72 3a 3a 63 61 6c 6c 28 27 66 69 6c 65 5f 70 75 74 5f 63 6f 6e 74 65 6e 74 | Silencer::call('file_put_content |
4a4c0 | 73 27 2c 20 24 74 68 69 73 2d 3e 66 69 6c 65 2c 20 24 74 68 69 73 2d 3e 63 6f 6d 70 6f 73 65 72 | s',.$this->file,.$this->composer |
4a4e0 | 42 61 63 6b 75 70 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 65 72 72 | Backup)).{.$io->writeError('<err |
4a500 | 6f 72 3e 27 2e 24 74 68 69 73 2d 3e 66 69 6c 65 2e 27 20 69 73 20 6e 6f 74 20 77 72 69 74 61 62 | or>'.$this->file.'.is.not.writab |
4a520 | 6c 65 2e 3c 2f 65 72 72 6f 72 3e 27 29 3b 0a 0a 72 65 74 75 72 6e 20 31 3b 0a 7d 0a 0a 69 66 20 | le.</error>');..return.1;.}..if. |
4a540 | 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 66 69 78 65 64 27 29 20 3d 3d 3d 20 | ($input->getOption('fixed').===. |
4a560 | 74 72 75 65 29 20 7b 0a 24 63 6f 6e 66 69 67 20 3d 20 24 74 68 69 73 2d 3e 6a 73 6f 6e 2d 3e 72 | true).{.$config.=.$this->json->r |
4a580 | 65 61 64 28 29 3b 0a 0a 24 70 61 63 6b 61 67 65 54 79 70 65 20 3d 20 65 6d 70 74 79 28 24 63 6f | ead();..$packageType.=.empty($co |
4a5a0 | 6e 66 69 67 5b 27 74 79 70 65 27 5d 29 20 3f 20 27 6c 69 62 72 61 72 79 27 20 3a 20 24 63 6f 6e | nfig['type']).?.'library'.:.$con |
4a5c0 | 66 69 67 5b 27 74 79 70 65 27 5d 3b 0a 0a 0a 0a 0a 69 66 20 28 24 70 61 63 6b 61 67 65 54 79 70 | fig['type'];.....if.($packageTyp |
4a5e0 | 65 20 21 3d 3d 20 27 70 72 6f 6a 65 63 74 27 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 | e.!==.'project').{.$io->writeErr |
4a600 | 6f 72 28 27 3c 65 72 72 6f 72 3e 54 68 65 20 22 2d 2d 66 69 78 65 64 22 20 6f 70 74 69 6f 6e 20 | or('<error>The."--fixed".option. |
4a620 | 69 73 20 6f 6e 6c 79 20 61 6c 6c 6f 77 65 64 20 66 6f 72 20 70 61 63 6b 61 67 65 73 20 77 69 74 | is.only.allowed.for.packages.wit |
4a640 | 68 20 61 20 22 70 72 6f 6a 65 63 74 22 20 74 79 70 65 20 74 6f 20 70 72 65 76 65 6e 74 20 70 6f | h.a."project".type.to.prevent.po |
4a660 | 73 73 69 62 6c 65 20 6d 69 73 75 73 65 73 2e 3c 2f 65 72 72 6f 72 3e 27 29 3b 0a 0a 69 66 20 28 | ssible.misuses.</error>');..if.( |
4a680 | 21 69 73 73 65 74 28 24 63 6f 6e 66 69 67 5b 27 74 79 70 65 27 5d 29 29 20 7b 0a 24 69 6f 2d 3e | !isset($config['type'])).{.$io-> |
4a6a0 | 77 72 69 74 65 45 72 72 6f 72 28 27 3c 65 72 72 6f 72 3e 49 66 20 79 6f 75 72 20 70 61 63 6b 61 | writeError('<error>If.your.packa |
4a6c0 | 67 65 20 69 73 20 6e 6f 74 20 61 20 6c 69 62 72 61 72 79 2c 20 79 6f 75 20 63 61 6e 20 65 78 70 | ge.is.not.a.library,.you.can.exp |
4a6e0 | 6c 69 63 69 74 6c 79 20 73 70 65 63 69 66 79 20 74 68 65 20 22 74 79 70 65 22 20 62 79 20 75 73 | licitly.specify.the."type".by.us |
4a700 | 69 6e 67 20 22 63 6f 6d 70 6f 73 65 72 20 63 6f 6e 66 69 67 20 74 79 70 65 20 70 72 6f 6a 65 63 | ing."composer.config.type.projec |
4a720 | 74 22 2e 3c 2f 65 72 72 6f 72 3e 27 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 31 3b 0a 7d 0a 7d 0a | t".</error>');.}..return.1;.}.}. |
4a740 | 0a 24 63 6f 6d 70 6f 73 65 72 20 3d 20 24 74 68 69 73 2d 3e 72 65 71 75 69 72 65 43 6f 6d 70 6f | .$composer.=.$this->requireCompo |
4a760 | 73 65 72 28 29 3b 0a 24 72 65 70 6f 73 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 52 65 | ser();.$repos.=.$composer->getRe |
4a780 | 70 6f 73 69 74 6f 72 79 4d 61 6e 61 67 65 72 28 29 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 69 | positoryManager()->getRepositori |
4a7a0 | 65 73 28 29 3b 0a 0a 24 70 6c 61 74 66 6f 72 6d 4f 76 65 72 72 69 64 65 73 20 3d 20 24 63 6f 6d | es();..$platformOverrides.=.$com |
4a7c0 | 70 6f 73 65 72 2d 3e 67 65 74 43 6f 6e 66 69 67 28 29 2d 3e 67 65 74 28 27 70 6c 61 74 66 6f 72 | poser->getConfig()->get('platfor |
4a7e0 | 6d 27 29 3b 0a 0a 24 74 68 69 73 2d 3e 72 65 70 6f 73 20 3d 20 6e 65 77 20 43 6f 6d 70 6f 73 69 | m');..$this->repos.=.new.Composi |
4a800 | 74 65 52 65 70 6f 73 69 74 6f 72 79 28 61 72 72 61 79 5f 6d 65 72 67 65 28 0a 5b 24 70 6c 61 74 | teRepository(array_merge(.[$plat |
4a820 | 66 6f 72 6d 52 65 70 6f 20 3d 20 6e 65 77 20 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 | formRepo.=.new.PlatformRepositor |
4a840 | 79 28 5b 5d 2c 20 24 70 6c 61 74 66 6f 72 6d 4f 76 65 72 72 69 64 65 73 29 5d 2c 0a 24 72 65 70 | y([],.$platformOverrides)],.$rep |
4a860 | 6f 73 0a 29 29 3b 0a 0a 69 66 20 28 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 50 61 63 6b 61 67 | os.));..if.($composer->getPackag |
4a880 | 65 28 29 2d 3e 67 65 74 50 72 65 66 65 72 53 74 61 62 6c 65 28 29 29 20 7b 0a 24 70 72 65 66 65 | e()->getPreferStable()).{.$prefe |
4a8a0 | 72 72 65 64 53 74 61 62 69 6c 69 74 79 20 3d 20 27 73 74 61 62 6c 65 27 3b 0a 7d 20 65 6c 73 65 | rredStability.=.'stable';.}.else |
4a8c0 | 20 7b 0a 24 70 72 65 66 65 72 72 65 64 53 74 61 62 69 6c 69 74 79 20 3d 20 24 63 6f 6d 70 6f 73 | .{.$preferredStability.=.$compos |
4a8e0 | 65 72 2d 3e 67 65 74 50 61 63 6b 61 67 65 28 29 2d 3e 67 65 74 4d 69 6e 69 6d 75 6d 53 74 61 62 | er->getPackage()->getMinimumStab |
4a900 | 69 6c 69 74 79 28 29 3b 0a 7d 0a 0a 74 72 79 20 7b 0a 24 72 65 71 75 69 72 65 6d 65 6e 74 73 20 | ility();.}..try.{.$requirements. |
4a920 | 3d 20 24 74 68 69 73 2d 3e 64 65 74 65 72 6d 69 6e 65 52 65 71 75 69 72 65 6d 65 6e 74 73 28 0a | =.$this->determineRequirements(. |
4a940 | 24 69 6e 70 75 74 2c 0a 24 6f 75 74 70 75 74 2c 0a 24 69 6e 70 75 74 2d 3e 67 65 74 41 72 67 75 | $input,.$output,.$input->getArgu |
4a960 | 6d 65 6e 74 28 27 70 61 63 6b 61 67 65 73 27 29 2c 0a 24 70 6c 61 74 66 6f 72 6d 52 65 70 6f 2c | ment('packages'),.$platformRepo, |
4a980 | 0a 24 70 72 65 66 65 72 72 65 64 53 74 61 62 69 6c 69 74 79 2c 0a 21 24 69 6e 70 75 74 2d 3e 67 | .$preferredStability,.!$input->g |
4a9a0 | 65 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 75 70 64 61 74 65 27 29 2c 0a 24 69 6e 70 75 74 2d 3e 67 | etOption('no-update'),.$input->g |
4a9c0 | 65 74 4f 70 74 69 6f 6e 28 27 66 69 78 65 64 27 29 0a 29 3b 0a 7d 20 63 61 74 63 68 20 28 5c 45 | etOption('fixed').);.}.catch.(\E |
4a9e0 | 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 69 66 20 28 24 74 68 69 73 2d 3e 6e 65 77 6c 79 43 | xception.$e).{.if.($this->newlyC |
4aa00 | 72 65 61 74 65 64 29 20 7b 0a 24 74 68 69 73 2d 3e 72 65 76 65 72 74 43 6f 6d 70 6f 73 65 72 46 | reated).{.$this->revertComposerF |
4aa20 | 69 6c 65 28 29 3b 0a 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 | ile();..throw.new.\RuntimeExcept |
4aa40 | 69 6f 6e 28 27 4e 6f 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 20 70 72 65 73 65 6e 74 20 69 6e | ion('No.composer.json.present.in |
4aa60 | 20 74 68 65 20 63 75 72 72 65 6e 74 20 64 69 72 65 63 74 6f 72 79 20 28 27 2e 24 74 68 69 73 2d | .the.current.directory.('.$this- |
4aa80 | 3e 66 69 6c 65 2e 27 29 2c 20 74 68 69 73 20 6d 61 79 20 62 65 20 74 68 65 20 63 61 75 73 65 20 | >file.'),.this.may.be.the.cause. |
4aaa0 | 6f 66 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 65 78 63 65 70 74 69 6f 6e 2e 27 2c 20 30 2c | of.the.following.exception.',.0, |
4aac0 | 20 24 65 29 3b 0a 7d 0a 0a 74 68 72 6f 77 20 24 65 3b 0a 7d 0a 0a 24 72 65 71 75 69 72 65 6d 65 | .$e);.}..throw.$e;.}..$requireme |
4aae0 | 6e 74 73 20 3d 20 24 74 68 69 73 2d 3e 66 6f 72 6d 61 74 52 65 71 75 69 72 65 6d 65 6e 74 73 28 | nts.=.$this->formatRequirements( |
4ab00 | 24 72 65 71 75 69 72 65 6d 65 6e 74 73 29 3b 0a 0a 69 66 20 28 21 24 69 6e 70 75 74 2d 3e 67 65 | $requirements);..if.(!$input->ge |
4ab20 | 74 4f 70 74 69 6f 6e 28 27 64 65 76 27 29 20 26 26 20 24 69 6f 2d 3e 69 73 49 6e 74 65 72 61 63 | tOption('dev').&&.$io->isInterac |
4ab40 | 74 69 76 65 28 29 29 20 7b 0a 24 64 65 76 50 61 63 6b 61 67 65 73 20 3d 20 5b 5d 3b 0a 24 64 65 | tive()).{.$devPackages.=.[];.$de |
4ab60 | 76 54 61 67 73 20 3d 20 5b 27 64 65 76 27 2c 20 27 74 65 73 74 69 6e 67 27 2c 20 27 73 74 61 74 | vTags.=.['dev',.'testing',.'stat |
4ab80 | 69 63 20 61 6e 61 6c 79 73 69 73 27 5d 3b 0a 24 63 75 72 72 65 6e 74 52 65 71 75 69 72 65 73 42 | ic.analysis'];.$currentRequiresB |
4aba0 | 79 4b 65 79 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 50 61 63 6b 61 67 65 73 42 79 52 65 71 75 69 | yKey.=.$this->getPackagesByRequi |
4abc0 | 72 65 4b 65 79 28 29 3b 0a 66 6f 72 65 61 63 68 20 28 24 72 65 71 75 69 72 65 6d 65 6e 74 73 20 | reKey();.foreach.($requirements. |
4abe0 | 61 73 20 24 6e 61 6d 65 20 3d 3e 20 24 76 65 72 73 69 6f 6e 29 20 7b 0a 0a 69 66 20 28 69 73 73 | as.$name.=>.$version).{..if.(iss |
4ac00 | 65 74 28 24 63 75 72 72 65 6e 74 52 65 71 75 69 72 65 73 42 79 4b 65 79 5b 24 6e 61 6d 65 5d 29 | et($currentRequiresByKey[$name]) |
4ac20 | 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 24 70 6b 67 20 3d 20 50 61 63 6b 61 67 65 53 | ).{.continue;.}..$pkg.=.PackageS |
4ac40 | 6f 72 74 65 72 3a 3a 67 65 74 4d 6f 73 74 43 75 72 72 65 6e 74 56 65 72 73 69 6f 6e 28 24 74 68 | orter::getMostCurrentVersion($th |
4ac60 | 69 73 2d 3e 67 65 74 52 65 70 6f 73 28 29 2d 3e 66 69 6e 64 50 61 63 6b 61 67 65 73 28 24 6e 61 | is->getRepos()->findPackages($na |
4ac80 | 6d 65 29 29 3b 0a 69 66 20 28 24 70 6b 67 20 69 6e 73 74 61 6e 63 65 6f 66 20 43 6f 6d 70 6c 65 | me));.if.($pkg.instanceof.Comple |
4aca0 | 74 65 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 26 26 20 63 6f 75 6e 74 28 61 72 72 61 | tePackageInterface.&&.count(arra |
4acc0 | 79 5f 69 6e 74 65 72 73 65 63 74 28 24 64 65 76 54 61 67 73 2c 20 61 72 72 61 79 5f 6d 61 70 28 | y_intersect($devTags,.array_map( |
4ace0 | 27 73 74 72 74 6f 6c 6f 77 65 72 27 2c 20 24 70 6b 67 2d 3e 67 65 74 4b 65 79 77 6f 72 64 73 28 | 'strtolower',.$pkg->getKeywords( |
4ad00 | 29 29 29 29 20 3e 20 30 29 20 7b 0a 24 64 65 76 50 61 63 6b 61 67 65 73 5b 5d 20 3d 20 24 6e 61 | )))).>.0).{.$devPackages[].=.$na |
4ad20 | 6d 65 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 63 6f 75 6e 74 28 24 64 65 76 50 61 63 6b 61 67 65 73 29 | me;.}.}..if.(count($devPackages) |
4ad40 | 20 3d 3d 3d 20 63 6f 75 6e 74 28 24 72 65 71 75 69 72 65 6d 65 6e 74 73 29 29 20 7b 0a 24 70 6c | .===.count($requirements)).{.$pl |
4ad60 | 75 72 61 6c 20 3d 20 63 6f 75 6e 74 28 24 72 65 71 75 69 72 65 6d 65 6e 74 73 29 20 3e 20 31 20 | ural.=.count($requirements).>.1. |
4ad80 | 3f 20 27 73 27 20 3a 20 27 27 3b 0a 24 70 6c 75 72 61 6c 32 20 3d 20 63 6f 75 6e 74 28 24 72 65 | ?.'s'.:.'';.$plural2.=.count($re |
4ada0 | 71 75 69 72 65 6d 65 6e 74 73 29 20 3e 20 31 20 3f 20 27 61 72 65 27 20 3a 20 27 69 73 27 3b 0a | quirements).>.1.?.'are'.:.'is';. |
4adc0 | 24 69 6f 2d 3e 77 61 72 6e 69 6e 67 28 27 54 68 65 20 70 61 63 6b 61 67 65 27 2e 24 70 6c 75 72 | $io->warning('The.package'.$plur |
4ade0 | 61 6c 2e 27 20 79 6f 75 20 72 65 71 75 69 72 65 64 20 27 2e 24 70 6c 75 72 61 6c 32 2e 27 20 72 | al.'.you.required.'.$plural2.'.r |
4ae00 | 65 63 6f 6d 6d 65 6e 64 65 64 20 74 6f 20 62 65 20 70 6c 61 63 65 64 20 69 6e 20 72 65 71 75 69 | ecommended.to.be.placed.in.requi |
4ae20 | 72 65 2d 64 65 76 20 62 75 74 20 79 6f 75 20 64 69 64 20 6e 6f 74 20 75 73 65 20 2d 2d 64 65 76 | re-dev.but.you.did.not.use.--dev |
4ae40 | 2e 27 29 3b 0a 69 66 20 28 24 69 6f 2d 3e 61 73 6b 43 6f 6e 66 69 72 6d 61 74 69 6f 6e 28 27 3c | .');.if.($io->askConfirmation('< |
4ae60 | 69 6e 66 6f 3e 44 6f 20 79 6f 75 20 77 61 6e 74 20 74 6f 20 72 65 2d 72 75 6e 20 74 68 65 20 63 | info>Do.you.want.to.re-run.the.c |
4ae80 | 6f 6d 6d 61 6e 64 20 77 69 74 68 20 2d 2d 64 65 76 3f 3c 2f 3e 20 5b 3c 63 6f 6d 6d 65 6e 74 3e | ommand.with.--dev?</>.[<comment> |
4aea0 | 79 65 73 3c 2f 3e 5d 3f 20 27 29 29 20 7b 0a 24 69 6e 70 75 74 2d 3e 73 65 74 4f 70 74 69 6f 6e | yes</>]?.')).{.$input->setOption |
4aec0 | 28 27 64 65 76 27 2c 20 74 72 75 65 29 3b 0a 7d 0a 7d 0a 7d 0a 0a 24 72 65 71 75 69 72 65 4b 65 | ('dev',.true);.}.}.}..$requireKe |
4aee0 | 79 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 64 65 76 27 29 20 3f 20 27 | y.=.$input->getOption('dev').?.' |
4af00 | 72 65 71 75 69 72 65 2d 64 65 76 27 20 3a 20 27 72 65 71 75 69 72 65 27 3b 0a 24 72 65 6d 6f 76 | require-dev'.:.'require';.$remov |
4af20 | 65 4b 65 79 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 64 65 76 27 29 20 | eKey.=.$input->getOption('dev'). |
4af40 | 3f 20 27 72 65 71 75 69 72 65 27 20 3a 20 27 72 65 71 75 69 72 65 2d 64 65 76 27 3b 0a 0a 0a 24 | ?.'require'.:.'require-dev';...$ |
4af60 | 76 65 72 73 69 6f 6e 50 61 72 73 65 72 20 3d 20 6e 65 77 20 56 65 72 73 69 6f 6e 50 61 72 73 65 | versionParser.=.new.VersionParse |
4af80 | 72 28 29 3b 0a 66 6f 72 65 61 63 68 20 28 24 72 65 71 75 69 72 65 6d 65 6e 74 73 20 61 73 20 24 | r();.foreach.($requirements.as.$ |
4afa0 | 70 61 63 6b 61 67 65 20 3d 3e 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 20 7b 0a 69 66 20 28 73 74 | package.=>.$constraint).{.if.(st |
4afc0 | 72 74 6f 6c 6f 77 65 72 28 24 70 61 63 6b 61 67 65 29 20 3d 3d 3d 20 24 63 6f 6d 70 6f 73 65 72 | rtolower($package).===.$composer |
4afe0 | 2d 3e 67 65 74 50 61 63 6b 61 67 65 28 29 2d 3e 67 65 74 4e 61 6d 65 28 29 29 20 7b 0a 24 69 6f | ->getPackage()->getName()).{.$io |
4b000 | 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 73 70 72 69 6e 74 66 28 27 3c 65 72 72 6f 72 3e 52 6f 6f | ->writeError(sprintf('<error>Roo |
4b020 | 74 20 70 61 63 6b 61 67 65 20 5c 27 25 73 5c 27 20 63 61 6e 6e 6f 74 20 72 65 71 75 69 72 65 20 | t.package.\'%s\'.cannot.require. |
4b040 | 69 74 73 65 6c 66 20 69 6e 20 69 74 73 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 3c 2f 65 72 72 | itself.in.its.composer.json</err |
4b060 | 6f 72 3e 27 2c 20 24 70 61 63 6b 61 67 65 29 29 3b 0a 0a 72 65 74 75 72 6e 20 31 3b 0a 7d 0a 69 | or>',.$package));..return.1;.}.i |
4b080 | 66 20 28 24 63 6f 6e 73 74 72 61 69 6e 74 20 3d 3d 3d 20 27 73 65 6c 66 2e 76 65 72 73 69 6f 6e | f.($constraint.===.'self.version |
4b0a0 | 27 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 24 76 65 72 73 69 6f 6e 50 61 72 73 65 72 2d | ').{.continue;.}.$versionParser- |
4b0c0 | 3e 70 61 72 73 65 43 6f 6e 73 74 72 61 69 6e 74 73 28 24 63 6f 6e 73 74 72 61 69 6e 74 29 3b 0a | >parseConstraints($constraint);. |
4b0e0 | 7d 0a 0a 24 69 6e 63 6f 6e 73 69 73 74 65 6e 74 52 65 71 75 69 72 65 4b 65 79 73 20 3d 20 24 74 | }..$inconsistentRequireKeys.=.$t |
4b100 | 68 69 73 2d 3e 67 65 74 49 6e 63 6f 6e 73 69 73 74 65 6e 74 52 65 71 75 69 72 65 4b 65 79 73 28 | his->getInconsistentRequireKeys( |
4b120 | 24 72 65 71 75 69 72 65 6d 65 6e 74 73 2c 20 24 72 65 71 75 69 72 65 4b 65 79 29 3b 0a 69 66 20 | $requirements,.$requireKey);.if. |
4b140 | 28 63 6f 75 6e 74 28 24 69 6e 63 6f 6e 73 69 73 74 65 6e 74 52 65 71 75 69 72 65 4b 65 79 73 29 | (count($inconsistentRequireKeys) |
4b160 | 20 3e 20 30 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 69 6e 63 6f 6e 73 69 73 74 65 6e 74 52 65 | .>.0).{.foreach.($inconsistentRe |
4b180 | 71 75 69 72 65 4b 65 79 73 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 24 69 6f 2d 3e 77 61 | quireKeys.as.$package).{.$io->wa |
4b1a0 | 72 6e 69 6e 67 28 73 70 72 69 6e 74 66 28 0a 27 25 73 20 69 73 20 63 75 72 72 65 6e 74 6c 79 20 | rning(sprintf(.'%s.is.currently. |
4b1c0 | 70 72 65 73 65 6e 74 20 69 6e 20 74 68 65 20 25 73 20 6b 65 79 20 61 6e 64 20 79 6f 75 20 72 61 | present.in.the.%s.key.and.you.ra |
4b1e0 | 6e 20 74 68 65 20 63 6f 6d 6d 61 6e 64 20 25 73 20 74 68 65 20 2d 2d 64 65 76 20 66 6c 61 67 2c | n.the.command.%s.the.--dev.flag, |
4b200 | 20 77 68 69 63 68 20 77 69 6c 6c 20 6d 6f 76 65 20 69 74 20 74 6f 20 74 68 65 20 25 73 20 6b 65 | .which.will.move.it.to.the.%s.ke |
4b220 | 79 2e 27 2c 0a 24 70 61 63 6b 61 67 65 2c 0a 24 72 65 6d 6f 76 65 4b 65 79 2c 0a 24 69 6e 70 75 | y.',.$package,.$removeKey,.$inpu |
4b240 | 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 64 65 76 27 29 20 3f 20 27 77 69 74 68 27 20 3a 20 27 | t->getOption('dev').?.'with'.:.' |
4b260 | 77 69 74 68 6f 75 74 27 2c 0a 24 72 65 71 75 69 72 65 4b 65 79 0a 29 29 3b 0a 7d 0a 0a 69 66 20 | without',.$requireKey.));.}..if. |
4b280 | 28 24 69 6f 2d 3e 69 73 49 6e 74 65 72 61 63 74 69 76 65 28 29 29 20 7b 0a 69 66 20 28 21 24 69 | ($io->isInteractive()).{.if.(!$i |
4b2a0 | 6f 2d 3e 61 73 6b 43 6f 6e 66 69 72 6d 61 74 69 6f 6e 28 73 70 72 69 6e 74 66 28 27 3c 69 6e 66 | o->askConfirmation(sprintf('<inf |
4b2c0 | 6f 3e 44 6f 20 79 6f 75 20 77 61 6e 74 20 74 6f 20 6d 6f 76 65 20 25 73 3f 3c 2f 69 6e 66 6f 3e | o>Do.you.want.to.move.%s?</info> |
4b2e0 | 20 5b 3c 63 6f 6d 6d 65 6e 74 3e 6e 6f 3c 2f 63 6f 6d 6d 65 6e 74 3e 5d 3f 20 27 2c 20 63 6f 75 | .[<comment>no</comment>]?.',.cou |
4b300 | 6e 74 28 24 69 6e 63 6f 6e 73 69 73 74 65 6e 74 52 65 71 75 69 72 65 4b 65 79 73 29 20 3e 20 31 | nt($inconsistentRequireKeys).>.1 |
4b320 | 20 3f 20 27 74 68 65 73 65 20 72 65 71 75 69 72 65 6d 65 6e 74 73 27 20 3a 20 27 74 68 69 73 20 | .?.'these.requirements'.:.'this. |
4b340 | 72 65 71 75 69 72 65 6d 65 6e 74 27 29 2c 20 66 61 6c 73 65 29 29 20 7b 0a 69 66 20 28 21 24 69 | requirement'),.false)).{.if.(!$i |
4b360 | 6f 2d 3e 61 73 6b 43 6f 6e 66 69 72 6d 61 74 69 6f 6e 28 73 70 72 69 6e 74 66 28 27 3c 69 6e 66 | o->askConfirmation(sprintf('<inf |
4b380 | 6f 3e 44 6f 20 79 6f 75 20 77 61 6e 74 20 74 6f 20 72 65 2d 72 75 6e 20 74 68 65 20 63 6f 6d 6d | o>Do.you.want.to.re-run.the.comm |
4b3a0 | 61 6e 64 20 25 73 20 2d 2d 64 65 76 3f 3c 2f 69 6e 66 6f 3e 20 5b 3c 63 6f 6d 6d 65 6e 74 3e 79 | and.%s.--dev?</info>.[<comment>y |
4b3c0 | 65 73 3c 2f 63 6f 6d 6d 65 6e 74 3e 5d 3f 20 27 2c 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 | es</comment>]?.',.$input->getOpt |
4b3e0 | 69 6f 6e 28 27 64 65 76 27 29 20 3f 20 27 77 69 74 68 6f 75 74 27 20 3a 20 27 77 69 74 68 27 29 | ion('dev').?.'without'.:.'with') |
4b400 | 2c 20 74 72 75 65 29 29 20 7b 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 0a 24 69 6e 70 75 74 2d 3e | ,.true)).{.return.0;.}..$input-> |
4b420 | 73 65 74 4f 70 74 69 6f 6e 28 27 64 65 76 27 2c 20 74 72 75 65 29 3b 0a 5b 24 72 65 71 75 69 72 | setOption('dev',.true);.[$requir |
4b440 | 65 4b 65 79 2c 20 24 72 65 6d 6f 76 65 4b 65 79 5d 20 3d 20 5b 24 72 65 6d 6f 76 65 4b 65 79 2c | eKey,.$removeKey].=.[$removeKey, |
4b460 | 20 24 72 65 71 75 69 72 65 4b 65 79 5d 3b 0a 7d 0a 7d 0a 7d 0a 0a 24 73 6f 72 74 50 61 63 6b 61 | .$requireKey];.}.}.}..$sortPacka |
4b480 | 67 65 73 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 73 6f 72 74 2d 70 61 | ges.=.$input->getOption('sort-pa |
4b4a0 | 63 6b 61 67 65 73 27 29 20 7c 7c 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 43 6f 6e 66 69 67 | ckages').||.$composer->getConfig |
4b4c0 | 28 29 2d 3e 67 65 74 28 27 73 6f 72 74 2d 70 61 63 6b 61 67 65 73 27 29 3b 0a 0a 24 74 68 69 73 | ()->get('sort-packages');..$this |
4b4e0 | 2d 3e 66 69 72 73 74 52 65 71 75 69 72 65 20 3d 20 24 74 68 69 73 2d 3e 6e 65 77 6c 79 43 72 65 | ->firstRequire.=.$this->newlyCre |
4b500 | 61 74 65 64 3b 0a 69 66 20 28 21 24 74 68 69 73 2d 3e 66 69 72 73 74 52 65 71 75 69 72 65 29 20 | ated;.if.(!$this->firstRequire). |
4b520 | 7b 0a 24 63 6f 6d 70 6f 73 65 72 44 65 66 69 6e 69 74 69 6f 6e 20 3d 20 24 74 68 69 73 2d 3e 6a | {.$composerDefinition.=.$this->j |
4b540 | 73 6f 6e 2d 3e 72 65 61 64 28 29 3b 0a 69 66 20 28 63 6f 75 6e 74 28 24 63 6f 6d 70 6f 73 65 72 | son->read();.if.(count($composer |
4b560 | 44 65 66 69 6e 69 74 69 6f 6e 5b 27 72 65 71 75 69 72 65 27 5d 20 3f 3f 20 5b 5d 29 20 3d 3d 3d | Definition['require'].??.[]).=== |
4b580 | 20 30 20 26 26 20 63 6f 75 6e 74 28 24 63 6f 6d 70 6f 73 65 72 44 65 66 69 6e 69 74 69 6f 6e 5b | .0.&&.count($composerDefinition[ |
4b5a0 | 27 72 65 71 75 69 72 65 2d 64 65 76 27 5d 20 3f 3f 20 5b 5d 29 20 3d 3d 3d 20 30 29 20 7b 0a 24 | 'require-dev'].??.[]).===.0).{.$ |
4b5c0 | 74 68 69 73 2d 3e 66 69 72 73 74 52 65 71 75 69 72 65 20 3d 20 74 72 75 65 3b 0a 7d 0a 7d 0a 0a | this->firstRequire.=.true;.}.}.. |
4b5e0 | 69 66 20 28 21 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 64 72 79 2d 72 75 6e 27 | if.(!$input->getOption('dry-run' |
4b600 | 29 20 26 26 20 21 24 74 68 69 73 2d 3e 75 70 64 61 74 65 46 69 6c 65 43 6c 65 61 6e 6c 79 28 24 | ).&&.!$this->updateFileCleanly($ |
4b620 | 74 68 69 73 2d 3e 6a 73 6f 6e 2c 20 24 72 65 71 75 69 72 65 6d 65 6e 74 73 2c 20 24 72 65 71 75 | this->json,.$requirements,.$requ |
4b640 | 69 72 65 4b 65 79 2c 20 24 72 65 6d 6f 76 65 4b 65 79 2c 20 24 73 6f 72 74 50 61 63 6b 61 67 65 | ireKey,.$removeKey,.$sortPackage |
4b660 | 73 29 29 20 7b 0a 24 63 6f 6d 70 6f 73 65 72 44 65 66 69 6e 69 74 69 6f 6e 20 3d 20 24 74 68 69 | s)).{.$composerDefinition.=.$thi |
4b680 | 73 2d 3e 6a 73 6f 6e 2d 3e 72 65 61 64 28 29 3b 0a 66 6f 72 65 61 63 68 20 28 24 72 65 71 75 69 | s->json->read();.foreach.($requi |
4b6a0 | 72 65 6d 65 6e 74 73 20 61 73 20 24 70 61 63 6b 61 67 65 20 3d 3e 20 24 76 65 72 73 69 6f 6e 29 | rements.as.$package.=>.$version) |
4b6c0 | 20 7b 0a 24 63 6f 6d 70 6f 73 65 72 44 65 66 69 6e 69 74 69 6f 6e 5b 24 72 65 71 75 69 72 65 4b | .{.$composerDefinition[$requireK |
4b6e0 | 65 79 5d 5b 24 70 61 63 6b 61 67 65 5d 20 3d 20 24 76 65 72 73 69 6f 6e 3b 0a 75 6e 73 65 74 28 | ey][$package].=.$version;.unset( |
4b700 | 24 63 6f 6d 70 6f 73 65 72 44 65 66 69 6e 69 74 69 6f 6e 5b 24 72 65 6d 6f 76 65 4b 65 79 5d 5b | $composerDefinition[$removeKey][ |
4b720 | 24 70 61 63 6b 61 67 65 5d 29 3b 0a 69 66 20 28 69 73 73 65 74 28 24 63 6f 6d 70 6f 73 65 72 44 | $package]);.if.(isset($composerD |
4b740 | 65 66 69 6e 69 74 69 6f 6e 5b 24 72 65 6d 6f 76 65 4b 65 79 5d 29 20 26 26 20 63 6f 75 6e 74 28 | efinition[$removeKey]).&&.count( |
4b760 | 24 63 6f 6d 70 6f 73 65 72 44 65 66 69 6e 69 74 69 6f 6e 5b 24 72 65 6d 6f 76 65 4b 65 79 5d 29 | $composerDefinition[$removeKey]) |
4b780 | 20 3d 3d 3d 20 30 29 20 7b 0a 75 6e 73 65 74 28 24 63 6f 6d 70 6f 73 65 72 44 65 66 69 6e 69 74 | .===.0).{.unset($composerDefinit |
4b7a0 | 69 6f 6e 5b 24 72 65 6d 6f 76 65 4b 65 79 5d 29 3b 0a 7d 0a 7d 0a 24 74 68 69 73 2d 3e 6a 73 6f | ion[$removeKey]);.}.}.$this->jso |
4b7c0 | 6e 2d 3e 77 72 69 74 65 28 24 63 6f 6d 70 6f 73 65 72 44 65 66 69 6e 69 74 69 6f 6e 29 3b 0a 7d | n->write($composerDefinition);.} |
4b7e0 | 0a 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 69 6e 66 6f 3e 27 2e 24 74 68 69 73 | ..$io->writeError('<info>'.$this |
4b800 | 2d 3e 66 69 6c 65 2e 27 20 68 61 73 20 62 65 65 6e 20 27 2e 28 24 74 68 69 73 2d 3e 6e 65 77 6c | ->file.'.has.been.'.($this->newl |
4b820 | 79 43 72 65 61 74 65 64 20 3f 20 27 63 72 65 61 74 65 64 27 20 3a 20 27 75 70 64 61 74 65 64 27 | yCreated.?.'created'.:.'updated' |
4b840 | 29 2e 27 3c 2f 69 6e 66 6f 3e 27 29 3b 0a 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 | ).'</info>');..if.($input->getOp |
4b860 | 74 69 6f 6e 28 27 6e 6f 2d 75 70 64 61 74 65 27 29 29 20 7b 0a 72 65 74 75 72 6e 20 30 3b 0a 7d | tion('no-update')).{.return.0;.} |
4b880 | 0a 0a 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 50 6c 75 67 69 6e 4d 61 6e 61 67 65 72 28 29 2d | ..$composer->getPluginManager()- |
4b8a0 | 3e 64 65 61 63 74 69 76 61 74 65 49 6e 73 74 61 6c 6c 65 64 50 6c 75 67 69 6e 73 28 29 3b 0a 0a | >deactivateInstalledPlugins();.. |
4b8c0 | 74 72 79 20 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 64 6f 55 70 64 61 74 65 28 24 69 6e | try.{.return.$this->doUpdate($in |
4b8e0 | 70 75 74 2c 20 24 6f 75 74 70 75 74 2c 20 24 69 6f 2c 20 24 72 65 71 75 69 72 65 6d 65 6e 74 73 | put,.$output,.$io,.$requirements |
4b900 | 2c 20 24 72 65 71 75 69 72 65 4b 65 79 2c 20 24 72 65 6d 6f 76 65 4b 65 79 29 3b 0a 7d 20 63 61 | ,.$requireKey,.$removeKey);.}.ca |
4b920 | 74 63 68 20 28 5c 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 69 66 20 28 21 24 74 68 69 73 | tch.(\Exception.$e).{.if.(!$this |
4b940 | 2d 3e 64 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 75 74 69 6f 6e 43 6f 6d 70 6c 65 74 65 64 29 | ->dependencyResolutionCompleted) |
4b960 | 20 7b 0a 24 74 68 69 73 2d 3e 72 65 76 65 72 74 43 6f 6d 70 6f 73 65 72 46 69 6c 65 28 29 3b 0a | .{.$this->revertComposerFile();. |
4b980 | 7d 0a 74 68 72 6f 77 20 24 65 3b 0a 7d 20 66 69 6e 61 6c 6c 79 20 7b 0a 24 73 69 67 6e 61 6c 48 | }.throw.$e;.}.finally.{.$signalH |
4b9a0 | 61 6e 64 6c 65 72 2d 3e 75 6e 72 65 67 69 73 74 65 72 28 29 3b 0a 7d 0a 7d 0a 0a 0a 0a 0a 0a 70 | andler->unregister();.}.}......p |
4b9c0 | 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 49 6e 63 6f 6e 73 69 73 74 65 6e 74 52 | rivate.function.getInconsistentR |
4b9e0 | 65 71 75 69 72 65 4b 65 79 73 28 61 72 72 61 79 20 24 6e 65 77 52 65 71 75 69 72 65 6d 65 6e 74 | equireKeys(array.$newRequirement |
4ba00 | 73 2c 20 73 74 72 69 6e 67 20 24 72 65 71 75 69 72 65 4b 65 79 29 3a 20 61 72 72 61 79 0a 7b 0a | s,.string.$requireKey):.array.{. |
4ba20 | 24 72 65 71 75 69 72 65 4b 65 79 73 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 50 61 63 6b 61 67 65 | $requireKeys.=.$this->getPackage |
4ba40 | 73 42 79 52 65 71 75 69 72 65 4b 65 79 28 29 3b 0a 24 69 6e 63 6f 6e 73 69 73 74 65 6e 74 52 65 | sByRequireKey();.$inconsistentRe |
4ba60 | 71 75 69 72 65 6d 65 6e 74 73 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 72 65 71 75 69 | quirements.=.[];.foreach.($requi |
4ba80 | 72 65 4b 65 79 73 20 61 73 20 24 70 61 63 6b 61 67 65 20 3d 3e 20 24 70 61 63 6b 61 67 65 52 65 | reKeys.as.$package.=>.$packageRe |
4baa0 | 71 75 69 72 65 4b 65 79 29 20 7b 0a 69 66 20 28 21 69 73 73 65 74 28 24 6e 65 77 52 65 71 75 69 | quireKey).{.if.(!isset($newRequi |
4bac0 | 72 65 6d 65 6e 74 73 5b 24 70 61 63 6b 61 67 65 5d 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a | rements[$package])).{.continue;. |
4bae0 | 7d 0a 69 66 20 28 24 72 65 71 75 69 72 65 4b 65 79 20 21 3d 3d 20 24 70 61 63 6b 61 67 65 52 65 | }.if.($requireKey.!==.$packageRe |
4bb00 | 71 75 69 72 65 4b 65 79 29 20 7b 0a 24 69 6e 63 6f 6e 73 69 73 74 65 6e 74 52 65 71 75 69 72 65 | quireKey).{.$inconsistentRequire |
4bb20 | 6d 65 6e 74 73 5b 5d 20 3d 20 24 70 61 63 6b 61 67 65 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 | ments[].=.$package;.}.}..return. |
4bb40 | 24 69 6e 63 6f 6e 73 69 73 74 65 6e 74 52 65 71 75 69 72 65 6d 65 6e 74 73 3b 0a 7d 0a 0a 0a 0a | $inconsistentRequirements;.}.... |
4bb60 | 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 50 61 63 6b 61 67 65 73 42 79 52 | .private.function.getPackagesByR |
4bb80 | 65 71 75 69 72 65 4b 65 79 28 29 3a 20 61 72 72 61 79 0a 7b 0a 24 63 6f 6d 70 6f 73 65 72 44 65 | equireKey():.array.{.$composerDe |
4bba0 | 66 69 6e 69 74 69 6f 6e 20 3d 20 24 74 68 69 73 2d 3e 6a 73 6f 6e 2d 3e 72 65 61 64 28 29 3b 0a | finition.=.$this->json->read();. |
4bbc0 | 24 72 65 71 75 69 72 65 20 3d 20 5b 5d 3b 0a 24 72 65 71 75 69 72 65 44 65 76 20 3d 20 5b 5d 3b | $require.=.[];.$requireDev.=.[]; |
4bbe0 | 0a 0a 69 66 20 28 69 73 73 65 74 28 24 63 6f 6d 70 6f 73 65 72 44 65 66 69 6e 69 74 69 6f 6e 5b | ..if.(isset($composerDefinition[ |
4bc00 | 27 72 65 71 75 69 72 65 27 5d 29 29 20 7b 0a 24 72 65 71 75 69 72 65 20 3d 20 24 63 6f 6d 70 6f | 'require'])).{.$require.=.$compo |
4bc20 | 73 65 72 44 65 66 69 6e 69 74 69 6f 6e 5b 27 72 65 71 75 69 72 65 27 5d 3b 0a 7d 0a 0a 69 66 20 | serDefinition['require'];.}..if. |
4bc40 | 28 69 73 73 65 74 28 24 63 6f 6d 70 6f 73 65 72 44 65 66 69 6e 69 74 69 6f 6e 5b 27 72 65 71 75 | (isset($composerDefinition['requ |
4bc60 | 69 72 65 2d 64 65 76 27 5d 29 29 20 7b 0a 24 72 65 71 75 69 72 65 44 65 76 20 3d 20 24 63 6f 6d | ire-dev'])).{.$requireDev.=.$com |
4bc80 | 70 6f 73 65 72 44 65 66 69 6e 69 74 69 6f 6e 5b 27 72 65 71 75 69 72 65 2d 64 65 76 27 5d 3b 0a | poserDefinition['require-dev'];. |
4bca0 | 7d 0a 0a 72 65 74 75 72 6e 20 61 72 72 61 79 5f 6d 65 72 67 65 28 0a 61 72 72 61 79 5f 66 69 6c | }..return.array_merge(.array_fil |
4bcc0 | 6c 5f 6b 65 79 73 28 61 72 72 61 79 5f 6b 65 79 73 28 24 72 65 71 75 69 72 65 29 2c 20 27 72 65 | l_keys(array_keys($require),.'re |
4bce0 | 71 75 69 72 65 27 29 2c 0a 61 72 72 61 79 5f 66 69 6c 6c 5f 6b 65 79 73 28 61 72 72 61 79 5f 6b | quire'),.array_fill_keys(array_k |
4bd00 | 65 79 73 28 24 72 65 71 75 69 72 65 44 65 76 29 2c 20 27 72 65 71 75 69 72 65 2d 64 65 76 27 29 | eys($requireDev),.'require-dev') |
4bd20 | 0a 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 64 6f 55 70 | .);.}......private.function.doUp |
4bd40 | 64 61 74 65 28 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 69 6e 70 75 74 2c 20 4f 75 74 70 | date(InputInterface.$input,.Outp |
4bd60 | 75 74 49 6e 74 65 72 66 61 63 65 20 24 6f 75 74 70 75 74 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 | utInterface.$output,.IOInterface |
4bd80 | 20 24 69 6f 2c 20 61 72 72 61 79 20 24 72 65 71 75 69 72 65 6d 65 6e 74 73 2c 20 73 74 72 69 6e | .$io,.array.$requirements,.strin |
4bda0 | 67 20 24 72 65 71 75 69 72 65 4b 65 79 2c 20 73 74 72 69 6e 67 20 24 72 65 6d 6f 76 65 4b 65 79 | g.$requireKey,.string.$removeKey |
4bdc0 | 29 3a 20 69 6e 74 0a 7b 0a 0a 24 74 68 69 73 2d 3e 72 65 73 65 74 43 6f 6d 70 6f 73 65 72 28 29 | ):.int.{..$this->resetComposer() |
4bde0 | 3b 0a 24 63 6f 6d 70 6f 73 65 72 20 3d 20 24 74 68 69 73 2d 3e 72 65 71 75 69 72 65 43 6f 6d 70 | ;.$composer.=.$this->requireComp |
4be00 | 6f 73 65 72 28 29 3b 0a 0a 24 74 68 69 73 2d 3e 64 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 75 | oser();..$this->dependencyResolu |
4be20 | 74 69 6f 6e 43 6f 6d 70 6c 65 74 65 64 20 3d 20 66 61 6c 73 65 3b 0a 24 63 6f 6d 70 6f 73 65 72 | tionCompleted.=.false;.$composer |
4be40 | 2d 3e 67 65 74 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 28 29 2d 3e 61 64 64 4c 69 73 74 65 | ->getEventDispatcher()->addListe |
4be60 | 6e 65 72 28 49 6e 73 74 61 6c 6c 65 72 45 76 65 6e 74 73 3a 3a 50 52 45 5f 4f 50 45 52 41 54 49 | ner(InstallerEvents::PRE_OPERATI |
4be80 | 4f 4e 53 5f 45 58 45 43 2c 20 66 75 6e 63 74 69 6f 6e 20 28 29 3a 20 76 6f 69 64 20 7b 0a 24 74 | ONS_EXEC,.function.():.void.{.$t |
4bea0 | 68 69 73 2d 3e 64 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 75 74 69 6f 6e 43 6f 6d 70 6c 65 74 | his->dependencyResolutionComplet |
4bec0 | 65 64 20 3d 20 74 72 75 65 3b 0a 7d 2c 20 31 30 30 30 30 29 3b 0a 0a 69 66 20 28 24 69 6e 70 75 | ed.=.true;.},.10000);..if.($inpu |
4bee0 | 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 64 72 79 2d 72 75 6e 27 29 29 20 7b 0a 24 72 6f 6f 74 | t->getOption('dry-run')).{.$root |
4bf00 | 50 61 63 6b 61 67 65 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 50 61 63 6b 61 67 65 28 | Package.=.$composer->getPackage( |
4bf20 | 29 3b 0a 24 6c 69 6e 6b 73 20 3d 20 5b 0a 27 72 65 71 75 69 72 65 27 20 3d 3e 20 24 72 6f 6f 74 | );.$links.=.[.'require'.=>.$root |
4bf40 | 50 61 63 6b 61 67 65 2d 3e 67 65 74 52 65 71 75 69 72 65 73 28 29 2c 0a 27 72 65 71 75 69 72 65 | Package->getRequires(),.'require |
4bf60 | 2d 64 65 76 27 20 3d 3e 20 24 72 6f 6f 74 50 61 63 6b 61 67 65 2d 3e 67 65 74 44 65 76 52 65 71 | -dev'.=>.$rootPackage->getDevReq |
4bf80 | 75 69 72 65 73 28 29 2c 0a 5d 3b 0a 24 6c 6f 61 64 65 72 20 3d 20 6e 65 77 20 41 72 72 61 79 4c | uires(),.];.$loader.=.new.ArrayL |
4bfa0 | 6f 61 64 65 72 28 29 3b 0a 24 6e 65 77 4c 69 6e 6b 73 20 3d 20 24 6c 6f 61 64 65 72 2d 3e 70 61 | oader();.$newLinks.=.$loader->pa |
4bfc0 | 72 73 65 4c 69 6e 6b 73 28 24 72 6f 6f 74 50 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 | rseLinks($rootPackage->getName() |
4bfe0 | 2c 20 24 72 6f 6f 74 50 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 56 65 72 73 69 6f 6e | ,.$rootPackage->getPrettyVersion |
4c000 | 28 29 2c 20 42 61 73 65 50 61 63 6b 61 67 65 3a 3a 24 73 75 70 70 6f 72 74 65 64 4c 69 6e 6b 54 | (),.BasePackage::$supportedLinkT |
4c020 | 79 70 65 73 5b 24 72 65 71 75 69 72 65 4b 65 79 5d 5b 27 6d 65 74 68 6f 64 27 5d 2c 20 24 72 65 | ypes[$requireKey]['method'],.$re |
4c040 | 71 75 69 72 65 6d 65 6e 74 73 29 3b 0a 24 6c 69 6e 6b 73 5b 24 72 65 71 75 69 72 65 4b 65 79 5d | quirements);.$links[$requireKey] |
4c060 | 20 3d 20 61 72 72 61 79 5f 6d 65 72 67 65 28 24 6c 69 6e 6b 73 5b 24 72 65 71 75 69 72 65 4b 65 | .=.array_merge($links[$requireKe |
4c080 | 79 5d 2c 20 24 6e 65 77 4c 69 6e 6b 73 29 3b 0a 66 6f 72 65 61 63 68 20 28 24 72 65 71 75 69 72 | y],.$newLinks);.foreach.($requir |
4c0a0 | 65 6d 65 6e 74 73 20 61 73 20 24 70 61 63 6b 61 67 65 20 3d 3e 20 24 63 6f 6e 73 74 72 61 69 6e | ements.as.$package.=>.$constrain |
4c0c0 | 74 29 20 7b 0a 75 6e 73 65 74 28 24 6c 69 6e 6b 73 5b 24 72 65 6d 6f 76 65 4b 65 79 5d 5b 24 70 | t).{.unset($links[$removeKey][$p |
4c0e0 | 61 63 6b 61 67 65 5d 29 3b 0a 7d 0a 24 72 6f 6f 74 50 61 63 6b 61 67 65 2d 3e 73 65 74 52 65 71 | ackage]);.}.$rootPackage->setReq |
4c100 | 75 69 72 65 73 28 24 6c 69 6e 6b 73 5b 27 72 65 71 75 69 72 65 27 5d 29 3b 0a 24 72 6f 6f 74 50 | uires($links['require']);.$rootP |
4c120 | 61 63 6b 61 67 65 2d 3e 73 65 74 44 65 76 52 65 71 75 69 72 65 73 28 24 6c 69 6e 6b 73 5b 27 72 | ackage->setDevRequires($links['r |
4c140 | 65 71 75 69 72 65 2d 64 65 76 27 5d 29 3b 0a 7d 0a 0a 24 75 70 64 61 74 65 44 65 76 4d 6f 64 65 | equire-dev']);.}..$updateDevMode |
4c160 | 20 3d 20 21 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 75 70 64 61 74 65 2d 6e 6f | .=.!$input->getOption('update-no |
4c180 | 2d 64 65 76 27 29 3b 0a 24 6f 70 74 69 6d 69 7a 65 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f | -dev');.$optimize.=.$input->getO |
4c1a0 | 70 74 69 6f 6e 28 27 6f 70 74 69 6d 69 7a 65 2d 61 75 74 6f 6c 6f 61 64 65 72 27 29 20 7c 7c 20 | ption('optimize-autoloader').||. |
4c1c0 | 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 43 6f 6e 66 69 67 28 29 2d 3e 67 65 74 28 27 6f 70 74 | $composer->getConfig()->get('opt |
4c1e0 | 69 6d 69 7a 65 2d 61 75 74 6f 6c 6f 61 64 65 72 27 29 3b 0a 24 61 75 74 68 6f 72 69 74 61 74 69 | imize-autoloader');.$authoritati |
4c200 | 76 65 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 63 6c 61 73 73 6d 61 70 | ve.=.$input->getOption('classmap |
4c220 | 2d 61 75 74 68 6f 72 69 74 61 74 69 76 65 27 29 20 7c 7c 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 | -authoritative').||.$composer->g |
4c240 | 65 74 43 6f 6e 66 69 67 28 29 2d 3e 67 65 74 28 27 63 6c 61 73 73 6d 61 70 2d 61 75 74 68 6f 72 | etConfig()->get('classmap-author |
4c260 | 69 74 61 74 69 76 65 27 29 3b 0a 24 61 70 63 75 50 72 65 66 69 78 20 3d 20 24 69 6e 70 75 74 2d | itative');.$apcuPrefix.=.$input- |
4c280 | 3e 67 65 74 4f 70 74 69 6f 6e 28 27 61 70 63 75 2d 61 75 74 6f 6c 6f 61 64 65 72 2d 70 72 65 66 | >getOption('apcu-autoloader-pref |
4c2a0 | 69 78 27 29 3b 0a 24 61 70 63 75 20 3d 20 24 61 70 63 75 50 72 65 66 69 78 20 21 3d 3d 20 6e 75 | ix');.$apcu.=.$apcuPrefix.!==.nu |
4c2c0 | 6c 6c 20 7c 7c 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 61 70 63 75 2d 61 75 | ll.||.$input->getOption('apcu-au |
4c2e0 | 74 6f 6c 6f 61 64 65 72 27 29 20 7c 7c 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 43 6f 6e 66 | toloader').||.$composer->getConf |
4c300 | 69 67 28 29 2d 3e 67 65 74 28 27 61 70 63 75 2d 61 75 74 6f 6c 6f 61 64 65 72 27 29 3b 0a 0a 24 | ig()->get('apcu-autoloader');..$ |
4c320 | 75 70 64 61 74 65 41 6c 6c 6f 77 54 72 61 6e 73 69 74 69 76 65 44 65 70 65 6e 64 65 6e 63 69 65 | updateAllowTransitiveDependencie |
4c340 | 73 20 3d 20 52 65 71 75 65 73 74 3a 3a 55 50 44 41 54 45 5f 4f 4e 4c 59 5f 4c 49 53 54 45 44 3b | s.=.Request::UPDATE_ONLY_LISTED; |
4c360 | 0a 24 66 6c 61 67 73 20 3d 20 27 27 3b 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 | .$flags.=.'';.if.($input->getOpt |
4c380 | 69 6f 6e 28 27 75 70 64 61 74 65 2d 77 69 74 68 2d 61 6c 6c 2d 64 65 70 65 6e 64 65 6e 63 69 65 | ion('update-with-all-dependencie |
4c3a0 | 73 27 29 20 7c 7c 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 77 69 74 68 2d 61 | s').||.$input->getOption('with-a |
4c3c0 | 6c 6c 2d 64 65 70 65 6e 64 65 6e 63 69 65 73 27 29 29 20 7b 0a 24 75 70 64 61 74 65 41 6c 6c 6f | ll-dependencies')).{.$updateAllo |
4c3e0 | 77 54 72 61 6e 73 69 74 69 76 65 44 65 70 65 6e 64 65 6e 63 69 65 73 20 3d 20 52 65 71 75 65 73 | wTransitiveDependencies.=.Reques |
4c400 | 74 3a 3a 55 50 44 41 54 45 5f 4c 49 53 54 45 44 5f 57 49 54 48 5f 54 52 41 4e 53 49 54 49 56 45 | t::UPDATE_LISTED_WITH_TRANSITIVE |
4c420 | 5f 44 45 50 53 3b 0a 24 66 6c 61 67 73 20 2e 3d 20 27 20 2d 2d 77 69 74 68 2d 61 6c 6c 2d 64 65 | _DEPS;.$flags..=.'.--with-all-de |
4c440 | 70 65 6e 64 65 6e 63 69 65 73 27 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 | pendencies';.}.elseif.($input->g |
4c460 | 65 74 4f 70 74 69 6f 6e 28 27 75 70 64 61 74 65 2d 77 69 74 68 2d 64 65 70 65 6e 64 65 6e 63 69 | etOption('update-with-dependenci |
4c480 | 65 73 27 29 20 7c 7c 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 77 69 74 68 2d | es').||.$input->getOption('with- |
4c4a0 | 64 65 70 65 6e 64 65 6e 63 69 65 73 27 29 29 20 7b 0a 24 75 70 64 61 74 65 41 6c 6c 6f 77 54 72 | dependencies')).{.$updateAllowTr |
4c4c0 | 61 6e 73 69 74 69 76 65 44 65 70 65 6e 64 65 6e 63 69 65 73 20 3d 20 52 65 71 75 65 73 74 3a 3a | ansitiveDependencies.=.Request:: |
4c4e0 | 55 50 44 41 54 45 5f 4c 49 53 54 45 44 5f 57 49 54 48 5f 54 52 41 4e 53 49 54 49 56 45 5f 44 45 | UPDATE_LISTED_WITH_TRANSITIVE_DE |
4c500 | 50 53 5f 4e 4f 5f 52 4f 4f 54 5f 52 45 51 55 49 52 45 3b 0a 24 66 6c 61 67 73 20 2e 3d 20 27 20 | PS_NO_ROOT_REQUIRE;.$flags..=.'. |
4c520 | 2d 2d 77 69 74 68 2d 64 65 70 65 6e 64 65 6e 63 69 65 73 27 3b 0a 7d 0a 0a 24 69 6f 2d 3e 77 72 | --with-dependencies';.}..$io->wr |
4c540 | 69 74 65 45 72 72 6f 72 28 27 3c 69 6e 66 6f 3e 52 75 6e 6e 69 6e 67 20 63 6f 6d 70 6f 73 65 72 | iteError('<info>Running.composer |
4c560 | 20 75 70 64 61 74 65 20 27 2e 69 6d 70 6c 6f 64 65 28 27 20 27 2c 20 61 72 72 61 79 5f 6b 65 79 | .update.'.implode('.',.array_key |
4c580 | 73 28 24 72 65 71 75 69 72 65 6d 65 6e 74 73 29 29 2e 24 66 6c 61 67 73 2e 27 3c 2f 69 6e 66 6f | s($requirements)).$flags.'</info |
4c5a0 | 3e 27 29 3b 0a 0a 24 63 6f 6d 6d 61 6e 64 45 76 65 6e 74 20 3d 20 6e 65 77 20 43 6f 6d 6d 61 6e | >');..$commandEvent.=.new.Comman |
4c5c0 | 64 45 76 65 6e 74 28 50 6c 75 67 69 6e 45 76 65 6e 74 73 3a 3a 43 4f 4d 4d 41 4e 44 2c 20 27 72 | dEvent(PluginEvents::COMMAND,.'r |
4c5e0 | 65 71 75 69 72 65 27 2c 20 24 69 6e 70 75 74 2c 20 24 6f 75 74 70 75 74 29 3b 0a 24 63 6f 6d 70 | equire',.$input,.$output);.$comp |
4c600 | 6f 73 65 72 2d 3e 67 65 74 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 28 29 2d 3e 64 69 73 70 | oser->getEventDispatcher()->disp |
4c620 | 61 74 63 68 28 24 63 6f 6d 6d 61 6e 64 45 76 65 6e 74 2d 3e 67 65 74 4e 61 6d 65 28 29 2c 20 24 | atch($commandEvent->getName(),.$ |
4c640 | 63 6f 6d 6d 61 6e 64 45 76 65 6e 74 29 3b 0a 0a 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 49 6e | commandEvent);..$composer->getIn |
4c660 | 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 72 28 29 2d 3e 73 65 74 4f 75 74 70 75 74 50 72 | stallationManager()->setOutputPr |
4c680 | 6f 67 72 65 73 73 28 21 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 70 72 | ogress(!$input->getOption('no-pr |
4c6a0 | 6f 67 72 65 73 73 27 29 29 3b 0a 0a 24 69 6e 73 74 61 6c 6c 20 3d 20 49 6e 73 74 61 6c 6c 65 72 | ogress'));..$install.=.Installer |
4c6c0 | 3a 3a 63 72 65 61 74 65 28 24 69 6f 2c 20 24 63 6f 6d 70 6f 73 65 72 29 3b 0a 0a 5b 24 70 72 65 | ::create($io,.$composer);..[$pre |
4c6e0 | 66 65 72 53 6f 75 72 63 65 2c 20 24 70 72 65 66 65 72 44 69 73 74 5d 20 3d 20 24 74 68 69 73 2d | ferSource,.$preferDist].=.$this- |
4c700 | 3e 67 65 74 50 72 65 66 65 72 72 65 64 49 6e 73 74 61 6c 6c 4f 70 74 69 6f 6e 73 28 24 63 6f 6d | >getPreferredInstallOptions($com |
4c720 | 70 6f 73 65 72 2d 3e 67 65 74 43 6f 6e 66 69 67 28 29 2c 20 24 69 6e 70 75 74 29 3b 0a 0a 24 69 | poser->getConfig(),.$input);..$i |
4c740 | 6e 73 74 61 6c 6c 0a 2d 3e 73 65 74 44 72 79 52 75 6e 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 | nstall.->setDryRun($input->getOp |
4c760 | 74 69 6f 6e 28 27 64 72 79 2d 72 75 6e 27 29 29 0a 2d 3e 73 65 74 56 65 72 62 6f 73 65 28 24 69 | tion('dry-run')).->setVerbose($i |
4c780 | 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 76 65 72 62 6f 73 65 27 29 29 0a 2d 3e 73 65 | nput->getOption('verbose')).->se |
4c7a0 | 74 50 72 65 66 65 72 53 6f 75 72 63 65 28 24 70 72 65 66 65 72 53 6f 75 72 63 65 29 0a 2d 3e 73 | tPreferSource($preferSource).->s |
4c7c0 | 65 74 50 72 65 66 65 72 44 69 73 74 28 24 70 72 65 66 65 72 44 69 73 74 29 0a 2d 3e 73 65 74 44 | etPreferDist($preferDist).->setD |
4c7e0 | 65 76 4d 6f 64 65 28 24 75 70 64 61 74 65 44 65 76 4d 6f 64 65 29 0a 2d 3e 73 65 74 4f 70 74 69 | evMode($updateDevMode).->setOpti |
4c800 | 6d 69 7a 65 41 75 74 6f 6c 6f 61 64 65 72 28 24 6f 70 74 69 6d 69 7a 65 29 0a 2d 3e 73 65 74 43 | mizeAutoloader($optimize).->setC |
4c820 | 6c 61 73 73 4d 61 70 41 75 74 68 6f 72 69 74 61 74 69 76 65 28 24 61 75 74 68 6f 72 69 74 61 74 | lassMapAuthoritative($authoritat |
4c840 | 69 76 65 29 0a 2d 3e 73 65 74 41 70 63 75 41 75 74 6f 6c 6f 61 64 65 72 28 24 61 70 63 75 2c 20 | ive).->setApcuAutoloader($apcu,. |
4c860 | 24 61 70 63 75 50 72 65 66 69 78 29 0a 2d 3e 73 65 74 55 70 64 61 74 65 28 74 72 75 65 29 0a 2d | $apcuPrefix).->setUpdate(true).- |
4c880 | 3e 73 65 74 49 6e 73 74 61 6c 6c 28 21 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 | >setInstall(!$input->getOption(' |
4c8a0 | 6e 6f 2d 69 6e 73 74 61 6c 6c 27 29 29 0a 2d 3e 73 65 74 55 70 64 61 74 65 41 6c 6c 6f 77 54 72 | no-install')).->setUpdateAllowTr |
4c8c0 | 61 6e 73 69 74 69 76 65 44 65 70 65 6e 64 65 6e 63 69 65 73 28 24 75 70 64 61 74 65 41 6c 6c 6f | ansitiveDependencies($updateAllo |
4c8e0 | 77 54 72 61 6e 73 69 74 69 76 65 44 65 70 65 6e 64 65 6e 63 69 65 73 29 0a 2d 3e 73 65 74 50 6c | wTransitiveDependencies).->setPl |
4c900 | 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 28 24 74 68 69 73 2d 3e 67 | atformRequirementFilter($this->g |
4c920 | 65 74 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 28 24 69 6e 70 | etPlatformRequirementFilter($inp |
4c940 | 75 74 29 29 0a 2d 3e 73 65 74 50 72 65 66 65 72 53 74 61 62 6c 65 28 24 69 6e 70 75 74 2d 3e 67 | ut)).->setPreferStable($input->g |
4c960 | 65 74 4f 70 74 69 6f 6e 28 27 70 72 65 66 65 72 2d 73 74 61 62 6c 65 27 29 29 0a 2d 3e 73 65 74 | etOption('prefer-stable')).->set |
4c980 | 50 72 65 66 65 72 4c 6f 77 65 73 74 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 | PreferLowest($input->getOption(' |
4c9a0 | 70 72 65 66 65 72 2d 6c 6f 77 65 73 74 27 29 29 0a 2d 3e 73 65 74 41 75 64 69 74 28 21 24 69 6e | prefer-lowest')).->setAudit(!$in |
4c9c0 | 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 61 75 64 69 74 27 29 29 0a 2d 3e 73 65 | put->getOption('no-audit')).->se |
4c9e0 | 74 41 75 64 69 74 46 6f 72 6d 61 74 28 24 74 68 69 73 2d 3e 67 65 74 41 75 64 69 74 46 6f 72 6d | tAuditFormat($this->getAuditForm |
4ca00 | 61 74 28 24 69 6e 70 75 74 29 29 0a 3b 0a 0a 0a 0a 69 66 20 28 21 24 74 68 69 73 2d 3e 66 69 72 | at($input)).;....if.(!$this->fir |
4ca20 | 73 74 52 65 71 75 69 72 65 20 26 26 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 4c 6f 63 6b 65 | stRequire.&&.$composer->getLocke |
4ca40 | 72 28 29 2d 3e 69 73 4c 6f 63 6b 65 64 28 29 29 20 7b 0a 24 69 6e 73 74 61 6c 6c 2d 3e 73 65 74 | r()->isLocked()).{.$install->set |
4ca60 | 55 70 64 61 74 65 41 6c 6c 6f 77 4c 69 73 74 28 61 72 72 61 79 5f 6b 65 79 73 28 24 72 65 71 75 | UpdateAllowList(array_keys($requ |
4ca80 | 69 72 65 6d 65 6e 74 73 29 29 3b 0a 7d 0a 0a 24 73 74 61 74 75 73 20 3d 20 24 69 6e 73 74 61 6c | irements));.}..$status.=.$instal |
4caa0 | 6c 2d 3e 72 75 6e 28 29 3b 0a 69 66 20 28 24 73 74 61 74 75 73 20 21 3d 3d 20 30 29 20 7b 0a 69 | l->run();.if.($status.!==.0).{.i |
4cac0 | 66 20 28 24 73 74 61 74 75 73 20 3d 3d 3d 20 49 6e 73 74 61 6c 6c 65 72 3a 3a 45 52 52 4f 52 5f | f.($status.===.Installer::ERROR_ |
4cae0 | 44 45 50 45 4e 44 45 4e 43 59 5f 52 45 53 4f 4c 55 54 49 4f 4e 5f 46 41 49 4c 45 44 29 20 7b 0a | DEPENDENCY_RESOLUTION_FAILED).{. |
4cb00 | 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 6e 6f 72 6d 61 6c 69 7a 65 52 65 71 75 69 72 65 | foreach.($this->normalizeRequire |
4cb20 | 6d 65 6e 74 73 28 24 69 6e 70 75 74 2d 3e 67 65 74 41 72 67 75 6d 65 6e 74 28 27 70 61 63 6b 61 | ments($input->getArgument('packa |
4cb40 | 67 65 73 27 29 29 20 61 73 20 24 72 65 71 29 20 7b 0a 69 66 20 28 21 69 73 73 65 74 28 24 72 65 | ges')).as.$req).{.if.(!isset($re |
4cb60 | 71 5b 27 76 65 72 73 69 6f 6e 27 5d 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 | q['version'])).{.$io->writeError |
4cb80 | 28 27 59 6f 75 20 63 61 6e 20 61 6c 73 6f 20 74 72 79 20 72 65 2d 72 75 6e 6e 69 6e 67 20 63 6f | ('You.can.also.try.re-running.co |
4cba0 | 6d 70 6f 73 65 72 20 72 65 71 75 69 72 65 20 77 69 74 68 20 61 6e 20 65 78 70 6c 69 63 69 74 20 | mposer.require.with.an.explicit. |
4cbc0 | 76 65 72 73 69 6f 6e 20 63 6f 6e 73 74 72 61 69 6e 74 2c 20 65 2e 67 2e 20 22 63 6f 6d 70 6f 73 | version.constraint,.e.g.."compos |
4cbe0 | 65 72 20 72 65 71 75 69 72 65 20 27 2e 24 72 65 71 5b 27 6e 61 6d 65 27 5d 2e 27 3a 2a 22 20 74 | er.require.'.$req['name'].':*".t |
4cc00 | 6f 20 66 69 67 75 72 65 20 6f 75 74 20 69 66 20 61 6e 79 20 76 65 72 73 69 6f 6e 20 69 73 20 69 | o.figure.out.if.any.version.is.i |
4cc20 | 6e 73 74 61 6c 6c 61 62 6c 65 2c 20 6f 72 20 22 63 6f 6d 70 6f 73 65 72 20 72 65 71 75 69 72 65 | nstallable,.or."composer.require |
4cc40 | 20 27 2e 24 72 65 71 5b 27 6e 61 6d 65 27 5d 2e 27 3a 5e 32 2e 31 22 20 69 66 20 79 6f 75 20 6b | .'.$req['name'].':^2.1".if.you.k |
4cc60 | 6e 6f 77 20 77 68 69 63 68 20 79 6f 75 20 6e 65 65 64 2e 27 29 3b 0a 62 72 65 61 6b 3b 0a 7d 0a | now.which.you.need.');.break;.}. |
4cc80 | 7d 0a 7d 0a 24 74 68 69 73 2d 3e 72 65 76 65 72 74 43 6f 6d 70 6f 73 65 72 46 69 6c 65 28 29 3b | }.}.$this->revertComposerFile(); |
4cca0 | 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 73 74 61 74 75 73 3b 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 | .}..return.$status;.}.....privat |
4ccc0 | 65 20 66 75 6e 63 74 69 6f 6e 20 75 70 64 61 74 65 46 69 6c 65 43 6c 65 61 6e 6c 79 28 4a 73 6f | e.function.updateFileCleanly(Jso |
4cce0 | 6e 46 69 6c 65 20 24 6a 73 6f 6e 2c 20 61 72 72 61 79 20 24 6e 65 77 2c 20 73 74 72 69 6e 67 20 | nFile.$json,.array.$new,.string. |
4cd00 | 24 72 65 71 75 69 72 65 4b 65 79 2c 20 73 74 72 69 6e 67 20 24 72 65 6d 6f 76 65 4b 65 79 2c 20 | $requireKey,.string.$removeKey,. |
4cd20 | 62 6f 6f 6c 20 24 73 6f 72 74 50 61 63 6b 61 67 65 73 29 3a 20 62 6f 6f 6c 0a 7b 0a 24 63 6f 6e | bool.$sortPackages):.bool.{.$con |
4cd40 | 74 65 6e 74 73 20 3d 20 66 69 6c 65 5f 67 65 74 5f 63 6f 6e 74 65 6e 74 73 28 24 6a 73 6f 6e 2d | tents.=.file_get_contents($json- |
4cd60 | 3e 67 65 74 50 61 74 68 28 29 29 3b 0a 0a 24 6d 61 6e 69 70 75 6c 61 74 6f 72 20 3d 20 6e 65 77 | >getPath());..$manipulator.=.new |
4cd80 | 20 4a 73 6f 6e 4d 61 6e 69 70 75 6c 61 74 6f 72 28 24 63 6f 6e 74 65 6e 74 73 29 3b 0a 0a 66 6f | .JsonManipulator($contents);..fo |
4cda0 | 72 65 61 63 68 20 28 24 6e 65 77 20 61 73 20 24 70 61 63 6b 61 67 65 20 3d 3e 20 24 63 6f 6e 73 | reach.($new.as.$package.=>.$cons |
4cdc0 | 74 72 61 69 6e 74 29 20 7b 0a 69 66 20 28 21 24 6d 61 6e 69 70 75 6c 61 74 6f 72 2d 3e 61 64 64 | traint).{.if.(!$manipulator->add |
4cde0 | 4c 69 6e 6b 28 24 72 65 71 75 69 72 65 4b 65 79 2c 20 24 70 61 63 6b 61 67 65 2c 20 24 63 6f 6e | Link($requireKey,.$package,.$con |
4ce00 | 73 74 72 61 69 6e 74 2c 20 24 73 6f 72 74 50 61 63 6b 61 67 65 73 29 29 20 7b 0a 72 65 74 75 72 | straint,.$sortPackages)).{.retur |
4ce20 | 6e 20 66 61 6c 73 65 3b 0a 7d 0a 69 66 20 28 21 24 6d 61 6e 69 70 75 6c 61 74 6f 72 2d 3e 72 65 | n.false;.}.if.(!$manipulator->re |
4ce40 | 6d 6f 76 65 53 75 62 4e 6f 64 65 28 24 72 65 6d 6f 76 65 4b 65 79 2c 20 24 70 61 63 6b 61 67 65 | moveSubNode($removeKey,.$package |
4ce60 | 29 29 20 7b 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 7d 0a 0a 24 6d 61 6e 69 70 75 6c | )).{.return.false;.}.}..$manipul |
4ce80 | 61 74 6f 72 2d 3e 72 65 6d 6f 76 65 4d 61 69 6e 4b 65 79 49 66 45 6d 70 74 79 28 24 72 65 6d 6f | ator->removeMainKeyIfEmpty($remo |
4cea0 | 76 65 4b 65 79 29 3b 0a 0a 66 69 6c 65 5f 70 75 74 5f 63 6f 6e 74 65 6e 74 73 28 24 6a 73 6f 6e | veKey);..file_put_contents($json |
4cec0 | 2d 3e 67 65 74 50 61 74 68 28 29 2c 20 24 6d 61 6e 69 70 75 6c 61 74 6f 72 2d 3e 67 65 74 43 6f | ->getPath(),.$manipulator->getCo |
4cee0 | 6e 74 65 6e 74 73 28 29 29 3b 0a 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 0a 70 72 6f 74 | ntents());..return.true;.}..prot |
4cf00 | 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 69 6e 74 65 72 61 63 74 28 49 6e 70 75 74 49 6e 74 | ected.function.interact(InputInt |
4cf20 | 65 72 66 61 63 65 20 24 69 6e 70 75 74 2c 20 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 | erface.$input,.OutputInterface.$ |
4cf40 | 6f 75 74 70 75 74 29 3a 20 76 6f 69 64 0a 7b 0a 7d 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 | output):.void.{.}..private.funct |
4cf60 | 69 6f 6e 20 72 65 76 65 72 74 43 6f 6d 70 6f 73 65 72 46 69 6c 65 28 29 3a 20 76 6f 69 64 0a 7b | ion.revertComposerFile():.void.{ |
4cf80 | 0a 24 69 6f 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 3b 0a 0a 69 66 20 28 24 74 68 69 | .$io.=.$this->getIO();..if.($thi |
4cfa0 | 73 2d 3e 6e 65 77 6c 79 43 72 65 61 74 65 64 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 | s->newlyCreated).{.$io->writeErr |
4cfc0 | 6f 72 28 22 5c 6e 22 2e 27 3c 65 72 72 6f 72 3e 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 66 61 69 | or("\n".'<error>Installation.fai |
4cfe0 | 6c 65 64 2c 20 64 65 6c 65 74 69 6e 67 20 27 2e 24 74 68 69 73 2d 3e 66 69 6c 65 2e 27 2e 3c 2f | led,.deleting.'.$this->file.'.</ |
4d000 | 65 72 72 6f 72 3e 27 29 3b 0a 75 6e 6c 69 6e 6b 28 24 74 68 69 73 2d 3e 6a 73 6f 6e 2d 3e 67 65 | error>');.unlink($this->json->ge |
4d020 | 74 50 61 74 68 28 29 29 3b 0a 69 66 20 28 66 69 6c 65 5f 65 78 69 73 74 73 28 24 74 68 69 73 2d | tPath());.if.(file_exists($this- |
4d040 | 3e 6c 6f 63 6b 29 29 20 7b 0a 75 6e 6c 69 6e 6b 28 24 74 68 69 73 2d 3e 6c 6f 63 6b 29 3b 0a 7d | >lock)).{.unlink($this->lock);.} |
4d060 | 0a 7d 20 65 6c 73 65 20 7b 0a 24 6d 73 67 20 3d 20 27 20 74 6f 20 69 74 73 20 27 3b 0a 69 66 20 | .}.else.{.$msg.=.'.to.its.';.if. |
4d080 | 28 24 74 68 69 73 2d 3e 6c 6f 63 6b 42 61 63 6b 75 70 29 20 7b 0a 24 6d 73 67 20 3d 20 27 20 61 | ($this->lockBackup).{.$msg.=.'.a |
4d0a0 | 6e 64 20 27 2e 24 74 68 69 73 2d 3e 6c 6f 63 6b 2e 27 20 74 6f 20 74 68 65 69 72 20 27 3b 0a 7d | nd.'.$this->lock.'.to.their.';.} |
4d0c0 | 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 22 5c 6e 22 2e 27 3c 65 72 72 6f 72 3e 49 6e | .$io->writeError("\n".'<error>In |
4d0e0 | 73 74 61 6c 6c 61 74 69 6f 6e 20 66 61 69 6c 65 64 2c 20 72 65 76 65 72 74 69 6e 67 20 27 2e 24 | stallation.failed,.reverting.'.$ |
4d100 | 74 68 69 73 2d 3e 66 69 6c 65 2e 24 6d 73 67 2e 27 6f 72 69 67 69 6e 61 6c 20 63 6f 6e 74 65 6e | this->file.$msg.'original.conten |
4d120 | 74 2e 3c 2f 65 72 72 6f 72 3e 27 29 3b 0a 66 69 6c 65 5f 70 75 74 5f 63 6f 6e 74 65 6e 74 73 28 | t.</error>');.file_put_contents( |
4d140 | 24 74 68 69 73 2d 3e 6a 73 6f 6e 2d 3e 67 65 74 50 61 74 68 28 29 2c 20 24 74 68 69 73 2d 3e 63 | $this->json->getPath(),.$this->c |
4d160 | 6f 6d 70 6f 73 65 72 42 61 63 6b 75 70 29 3b 0a 69 66 20 28 24 74 68 69 73 2d 3e 6c 6f 63 6b 42 | omposerBackup);.if.($this->lockB |
4d180 | 61 63 6b 75 70 29 20 7b 0a 66 69 6c 65 5f 70 75 74 5f 63 6f 6e 74 65 6e 74 73 28 24 74 68 69 73 | ackup).{.file_put_contents($this |
4d1a0 | 2d 3e 6c 6f 63 6b 2c 20 24 74 68 69 73 2d 3e 6c 6f 63 6b 42 61 63 6b 75 70 29 3b 0a 7d 0a 7d 0a | ->lock,.$this->lockBackup);.}.}. |
4d1c0 | 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 | }.}.<?php.declare(strict_types=1 |
4d1e0 | 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 | );............namespace.Composer |
4d200 | 5c 43 6f 6d 6d 61 6e 64 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 63 72 69 70 74 5c 45 | \Command;..use.Composer\Script\E |
4d220 | 76 65 6e 74 20 61 73 20 53 63 72 69 70 74 45 76 65 6e 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 | vent.as.ScriptEvent;.use.Compose |
4d240 | 72 5c 53 63 72 69 70 74 5c 53 63 72 69 70 74 45 76 65 6e 74 73 3b 0a 75 73 65 20 43 6f 6d 70 6f | r\Script\ScriptEvents;.use.Compo |
4d260 | 73 65 72 5c 55 74 69 6c 5c 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3b 0a 75 73 65 20 43 6f | ser\Util\ProcessExecutor;.use.Co |
4d280 | 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 6c 61 74 66 6f 72 6d 3b 0a 75 73 65 20 53 79 6d 66 6f 6e | mposer\Util\Platform;.use.Symfon |
4d2a0 | 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 49 | y\Component\Console\Input\InputI |
4d2c0 | 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 73 6f 6c 65 5c 49 | nterface;.use.Composer\Console\I |
4d2e0 | 6e 70 75 74 5c 49 6e 70 75 74 4f 70 74 69 6f 6e 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 | nput\InputOption;.use.Composer\C |
4d300 | 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 3b 0a 75 73 65 20 | onsole\Input\InputArgument;.use. |
4d320 | 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 4f 75 74 70 75 74 | Symfony\Component\Console\Output |
4d340 | 5c 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 0a 0a 0a 0a 63 6c 61 73 73 20 52 75 6e 53 | \OutputInterface;.....class.RunS |
4d360 | 63 72 69 70 74 43 6f 6d 6d 61 6e 64 20 65 78 74 65 6e 64 73 20 42 61 73 65 43 6f 6d 6d 61 6e 64 | criptCommand.extends.BaseCommand |
4d380 | 0a 7b 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 73 63 72 69 70 74 45 76 65 6e 74 73 20 3d 20 | .{....protected.$scriptEvents.=. |
4d3a0 | 5b 0a 53 63 72 69 70 74 45 76 65 6e 74 73 3a 3a 50 52 45 5f 49 4e 53 54 41 4c 4c 5f 43 4d 44 2c | [.ScriptEvents::PRE_INSTALL_CMD, |
4d3c0 | 0a 53 63 72 69 70 74 45 76 65 6e 74 73 3a 3a 50 4f 53 54 5f 49 4e 53 54 41 4c 4c 5f 43 4d 44 2c | .ScriptEvents::POST_INSTALL_CMD, |
4d3e0 | 0a 53 63 72 69 70 74 45 76 65 6e 74 73 3a 3a 50 52 45 5f 55 50 44 41 54 45 5f 43 4d 44 2c 0a 53 | .ScriptEvents::PRE_UPDATE_CMD,.S |
4d400 | 63 72 69 70 74 45 76 65 6e 74 73 3a 3a 50 4f 53 54 5f 55 50 44 41 54 45 5f 43 4d 44 2c 0a 53 63 | criptEvents::POST_UPDATE_CMD,.Sc |
4d420 | 72 69 70 74 45 76 65 6e 74 73 3a 3a 50 52 45 5f 53 54 41 54 55 53 5f 43 4d 44 2c 0a 53 63 72 69 | riptEvents::PRE_STATUS_CMD,.Scri |
4d440 | 70 74 45 76 65 6e 74 73 3a 3a 50 4f 53 54 5f 53 54 41 54 55 53 5f 43 4d 44 2c 0a 53 63 72 69 70 | ptEvents::POST_STATUS_CMD,.Scrip |
4d460 | 74 45 76 65 6e 74 73 3a 3a 50 4f 53 54 5f 52 4f 4f 54 5f 50 41 43 4b 41 47 45 5f 49 4e 53 54 41 | tEvents::POST_ROOT_PACKAGE_INSTA |
4d480 | 4c 4c 2c 0a 53 63 72 69 70 74 45 76 65 6e 74 73 3a 3a 50 4f 53 54 5f 43 52 45 41 54 45 5f 50 52 | LL,.ScriptEvents::POST_CREATE_PR |
4d4a0 | 4f 4a 45 43 54 5f 43 4d 44 2c 0a 53 63 72 69 70 74 45 76 65 6e 74 73 3a 3a 50 52 45 5f 41 52 43 | OJECT_CMD,.ScriptEvents::PRE_ARC |
4d4c0 | 48 49 56 45 5f 43 4d 44 2c 0a 53 63 72 69 70 74 45 76 65 6e 74 73 3a 3a 50 4f 53 54 5f 41 52 43 | HIVE_CMD,.ScriptEvents::POST_ARC |
4d4e0 | 48 49 56 45 5f 43 4d 44 2c 0a 53 63 72 69 70 74 45 76 65 6e 74 73 3a 3a 50 52 45 5f 41 55 54 4f | HIVE_CMD,.ScriptEvents::PRE_AUTO |
4d500 | 4c 4f 41 44 5f 44 55 4d 50 2c 0a 53 63 72 69 70 74 45 76 65 6e 74 73 3a 3a 50 4f 53 54 5f 41 55 | LOAD_DUMP,.ScriptEvents::POST_AU |
4d520 | 54 4f 4c 4f 41 44 5f 44 55 4d 50 2c 0a 5d 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 | TOLOAD_DUMP,.];..protected.funct |
4d540 | 69 6f 6e 20 63 6f 6e 66 69 67 75 72 65 28 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 0a 2d 3e | ion.configure():.void.{.$this.-> |
4d560 | 73 65 74 4e 61 6d 65 28 27 72 75 6e 2d 73 63 72 69 70 74 27 29 0a 2d 3e 73 65 74 41 6c 69 61 73 | setName('run-script').->setAlias |
4d580 | 65 73 28 5b 27 72 75 6e 27 5d 29 0a 2d 3e 73 65 74 44 65 73 63 72 69 70 74 69 6f 6e 28 27 52 75 | es(['run']).->setDescription('Ru |
4d5a0 | 6e 73 20 74 68 65 20 73 63 72 69 70 74 73 20 64 65 66 69 6e 65 64 20 69 6e 20 63 6f 6d 70 6f 73 | ns.the.scripts.defined.in.compos |
4d5c0 | 65 72 2e 6a 73 6f 6e 27 29 0a 2d 3e 73 65 74 44 65 66 69 6e 69 74 69 6f 6e 28 5b 0a 6e 65 77 20 | er.json').->setDefinition([.new. |
4d5e0 | 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 28 27 73 63 72 69 70 74 27 2c 20 49 6e 70 75 74 41 72 67 | InputArgument('script',.InputArg |
4d600 | 75 6d 65 6e 74 3a 3a 4f 50 54 49 4f 4e 41 4c 2c 20 27 53 63 72 69 70 74 20 6e 61 6d 65 20 74 6f | ument::OPTIONAL,.'Script.name.to |
4d620 | 20 72 75 6e 2e 27 2c 20 6e 75 6c 6c 2c 20 66 75 6e 63 74 69 6f 6e 20 28 29 20 7b 0a 72 65 74 75 | .run.',.null,.function.().{.retu |
4d640 | 72 6e 20 61 72 72 61 79 5f 6b 65 79 73 28 24 74 68 69 73 2d 3e 72 65 71 75 69 72 65 43 6f 6d 70 | rn.array_keys($this->requireComp |
4d660 | 6f 73 65 72 28 29 2d 3e 67 65 74 50 61 63 6b 61 67 65 28 29 2d 3e 67 65 74 53 63 72 69 70 74 73 | oser()->getPackage()->getScripts |
4d680 | 28 29 29 3b 0a 7d 29 2c 0a 6e 65 77 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 28 27 61 72 67 73 | ());.}),.new.InputArgument('args |
4d6a0 | 27 2c 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 3a 3a 49 53 5f 41 52 52 41 59 20 7c 20 49 6e 70 | ',.InputArgument::IS_ARRAY.|.Inp |
4d6c0 | 75 74 41 72 67 75 6d 65 6e 74 3a 3a 4f 50 54 49 4f 4e 41 4c 2c 20 27 27 29 2c 0a 6e 65 77 20 49 | utArgument::OPTIONAL,.''),.new.I |
4d6e0 | 6e 70 75 74 4f 70 74 69 6f 6e 28 27 74 69 6d 65 6f 75 74 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 | nputOption('timeout',.null,.Inpu |
4d700 | 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 52 45 51 55 49 52 45 44 2c 20 27 53 65 74 73 20 73 | tOption::VALUE_REQUIRED,.'Sets.s |
4d720 | 63 72 69 70 74 20 74 69 6d 65 6f 75 74 20 69 6e 20 73 65 63 6f 6e 64 73 2c 20 6f 72 20 30 20 66 | cript.timeout.in.seconds,.or.0.f |
4d740 | 6f 72 20 6e 65 76 65 72 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 64 65 | or.never.'),.new.InputOption('de |
4d760 | 76 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e | v',.null,.InputOption::VALUE_NON |
4d780 | 45 2c 20 27 53 65 74 73 20 74 68 65 20 64 65 76 20 6d 6f 64 65 2e 27 29 2c 0a 6e 65 77 20 49 6e | E,.'Sets.the.dev.mode.'),.new.In |
4d7a0 | 70 75 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 64 65 76 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f | putOption('no-dev',.null,.InputO |
4d7c0 | 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 44 69 73 61 62 6c 65 73 20 74 68 65 | ption::VALUE_NONE,.'Disables.the |
4d7e0 | 20 64 65 76 20 6d 6f 64 65 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6c | .dev.mode.'),.new.InputOption('l |
4d800 | 69 73 74 27 2c 20 27 6c 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f | ist',.'l',.InputOption::VALUE_NO |
4d820 | 4e 45 2c 20 27 4c 69 73 74 20 73 63 72 69 70 74 73 2e 27 29 2c 0a 5d 29 0a 2d 3e 73 65 74 48 65 | NE,.'List.scripts.'),.]).->setHe |
4d840 | 6c 70 28 0a 3c 3c 3c 45 4f 54 0a 54 68 65 20 3c 69 6e 66 6f 3e 72 75 6e 2d 73 63 72 69 70 74 3c | lp(.<<<EOT.The.<info>run-script< |
4d860 | 2f 69 6e 66 6f 3e 20 63 6f 6d 6d 61 6e 64 20 72 75 6e 73 20 73 63 72 69 70 74 73 20 64 65 66 69 | /info>.command.runs.scripts.defi |
4d880 | 6e 65 64 20 69 6e 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 3a 0a 0a 3c 69 6e 66 6f 3e 70 68 70 | ned.in.composer.json:..<info>php |
4d8a0 | 20 63 6f 6d 70 6f 73 65 72 2e 70 68 61 72 20 72 75 6e 2d 73 63 72 69 70 74 20 70 6f 73 74 2d 75 | .composer.phar.run-script.post-u |
4d8c0 | 70 64 61 74 65 2d 63 6d 64 3c 2f 69 6e 66 6f 3e 0a 0a 52 65 61 64 20 6d 6f 72 65 20 61 74 20 68 | pdate-cmd</info>..Read.more.at.h |
4d8e0 | 74 74 70 73 3a 2f 2f 67 65 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 67 2f 64 6f 63 2f 30 33 2d 63 6c | ttps://getcomposer.org/doc/03-cl |
4d900 | 69 2e 6d 64 23 72 75 6e 2d 73 63 72 69 70 74 0a 45 4f 54 0a 29 0a 3b 0a 7d 0a 0a 70 72 6f 74 65 | i.md#run-script.EOT.).;.}..prote |
4d920 | 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 65 78 65 63 75 74 65 28 49 6e 70 75 74 49 6e 74 65 72 | cted.function.execute(InputInter |
4d940 | 66 61 63 65 20 24 69 6e 70 75 74 2c 20 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 6f 75 | face.$input,.OutputInterface.$ou |
4d960 | 74 70 75 74 29 3a 20 69 6e 74 0a 7b 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 | tput):.int.{.if.($input->getOpti |
4d980 | 6f 6e 28 27 6c 69 73 74 27 29 29 20 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 6c 69 73 74 | on('list')).{.return.$this->list |
4d9a0 | 53 63 72 69 70 74 73 28 24 6f 75 74 70 75 74 29 3b 0a 7d 0a 0a 24 73 63 72 69 70 74 20 3d 20 24 | Scripts($output);.}..$script.=.$ |
4d9c0 | 69 6e 70 75 74 2d 3e 67 65 74 41 72 67 75 6d 65 6e 74 28 27 73 63 72 69 70 74 27 29 3b 0a 69 66 | input->getArgument('script');.if |
4d9e0 | 20 28 24 73 63 72 69 70 74 20 3d 3d 3d 20 6e 75 6c 6c 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 | .($script.===.null).{.throw.new. |
4da00 | 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 4d 69 73 73 69 6e 67 20 72 65 71 75 69 | \RuntimeException('Missing.requi |
4da20 | 72 65 64 20 61 72 67 75 6d 65 6e 74 20 22 73 63 72 69 70 74 22 27 29 3b 0a 7d 0a 0a 69 66 20 28 | red.argument."script"');.}..if.( |
4da40 | 21 69 6e 5f 61 72 72 61 79 28 24 73 63 72 69 70 74 2c 20 24 74 68 69 73 2d 3e 73 63 72 69 70 74 | !in_array($script,.$this->script |
4da60 | 45 76 65 6e 74 73 29 29 20 7b 0a 69 66 20 28 64 65 66 69 6e 65 64 28 27 43 6f 6d 70 6f 73 65 72 | Events)).{.if.(defined('Composer |
4da80 | 5c 53 63 72 69 70 74 5c 53 63 72 69 70 74 45 76 65 6e 74 73 3a 3a 27 2e 73 74 72 5f 72 65 70 6c | \Script\ScriptEvents::'.str_repl |
4daa0 | 61 63 65 28 27 2d 27 2c 20 27 5f 27 2c 20 73 74 72 74 6f 75 70 70 65 72 28 24 73 63 72 69 70 74 | ace('-',.'_',.strtoupper($script |
4dac0 | 29 29 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e | )))).{.throw.new.\InvalidArgumen |
4dae0 | 74 45 78 63 65 70 74 69 6f 6e 28 73 70 72 69 6e 74 66 28 27 53 63 72 69 70 74 20 22 25 73 22 20 | tException(sprintf('Script."%s". |
4db00 | 63 61 6e 6e 6f 74 20 62 65 20 72 75 6e 20 77 69 74 68 20 74 68 69 73 20 63 6f 6d 6d 61 6e 64 27 | cannot.be.run.with.this.command' |
4db20 | 2c 20 24 73 63 72 69 70 74 29 29 3b 0a 7d 0a 7d 0a 0a 24 63 6f 6d 70 6f 73 65 72 20 3d 20 24 74 | ,.$script));.}.}..$composer.=.$t |
4db40 | 68 69 73 2d 3e 72 65 71 75 69 72 65 43 6f 6d 70 6f 73 65 72 28 29 3b 0a 24 64 65 76 4d 6f 64 65 | his->requireComposer();.$devMode |
4db60 | 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 64 65 76 27 29 20 7c 7c 20 21 | .=.$input->getOption('dev').||.! |
4db80 | 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 64 65 76 27 29 3b 0a 24 65 76 | $input->getOption('no-dev');.$ev |
4dba0 | 65 6e 74 20 3d 20 6e 65 77 20 53 63 72 69 70 74 45 76 65 6e 74 28 24 73 63 72 69 70 74 2c 20 24 | ent.=.new.ScriptEvent($script,.$ |
4dbc0 | 63 6f 6d 70 6f 73 65 72 2c 20 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 2c 20 24 64 65 76 4d 6f | composer,.$this->getIO(),.$devMo |
4dbe0 | 64 65 29 3b 0a 24 68 61 73 4c 69 73 74 65 6e 65 72 73 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e | de);.$hasListeners.=.$composer-> |
4dc00 | 67 65 74 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 28 29 2d 3e 68 61 73 45 76 65 6e 74 4c 69 | getEventDispatcher()->hasEventLi |
4dc20 | 73 74 65 6e 65 72 73 28 24 65 76 65 6e 74 29 3b 0a 69 66 20 28 21 24 68 61 73 4c 69 73 74 65 6e | steners($event);.if.(!$hasListen |
4dc40 | 65 72 73 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e | ers).{.throw.new.\InvalidArgumen |
4dc60 | 74 45 78 63 65 70 74 69 6f 6e 28 73 70 72 69 6e 74 66 28 27 53 63 72 69 70 74 20 22 25 73 22 20 | tException(sprintf('Script."%s". |
4dc80 | 69 73 20 6e 6f 74 20 64 65 66 69 6e 65 64 20 69 6e 20 74 68 69 73 20 70 61 63 6b 61 67 65 27 2c | is.not.defined.in.this.package', |
4dca0 | 20 24 73 63 72 69 70 74 29 29 3b 0a 7d 0a 0a 24 61 72 67 73 20 3d 20 24 69 6e 70 75 74 2d 3e 67 | .$script));.}..$args.=.$input->g |
4dcc0 | 65 74 41 72 67 75 6d 65 6e 74 28 27 61 72 67 73 27 29 3b 0a 0a 69 66 20 28 6e 75 6c 6c 20 21 3d | etArgument('args');..if.(null.!= |
4dce0 | 3d 20 24 74 69 6d 65 6f 75 74 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 | =.$timeout.=.$input->getOption(' |
4dd00 | 74 69 6d 65 6f 75 74 27 29 29 20 7b 0a 69 66 20 28 21 63 74 79 70 65 5f 64 69 67 69 74 28 24 74 | timeout')).{.if.(!ctype_digit($t |
4dd20 | 69 6d 65 6f 75 74 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 | imeout)).{.throw.new.\RuntimeExc |
4dd40 | 65 70 74 69 6f 6e 28 27 54 69 6d 65 6f 75 74 20 76 61 6c 75 65 20 6d 75 73 74 20 62 65 20 6e 75 | eption('Timeout.value.must.be.nu |
4dd60 | 6d 65 72 69 63 20 61 6e 64 20 70 6f 73 69 74 69 76 65 20 69 66 20 64 65 66 69 6e 65 64 2c 20 6f | meric.and.positive.if.defined,.o |
4dd80 | 72 20 30 20 66 6f 72 20 66 6f 72 65 76 65 72 27 29 3b 0a 7d 0a 0a 50 72 6f 63 65 73 73 45 78 65 | r.0.for.forever');.}..ProcessExe |
4dda0 | 63 75 74 6f 72 3a 3a 73 65 74 54 69 6d 65 6f 75 74 28 28 69 6e 74 29 20 24 74 69 6d 65 6f 75 74 | cutor::setTimeout((int).$timeout |
4ddc0 | 29 3b 0a 7d 0a 0a 50 6c 61 74 66 6f 72 6d 3a 3a 70 75 74 45 6e 76 28 27 43 4f 4d 50 4f 53 45 52 | );.}..Platform::putEnv('COMPOSER |
4dde0 | 5f 44 45 56 5f 4d 4f 44 45 27 2c 20 24 64 65 76 4d 6f 64 65 20 3f 20 27 31 27 20 3a 20 27 30 27 | _DEV_MODE',.$devMode.?.'1'.:.'0' |
4de00 | 29 3b 0a 0a 72 65 74 75 72 6e 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 45 76 65 6e 74 44 69 | );..return.$composer->getEventDi |
4de20 | 73 70 61 74 63 68 65 72 28 29 2d 3e 64 69 73 70 61 74 63 68 53 63 72 69 70 74 28 24 73 63 72 69 | spatcher()->dispatchScript($scri |
4de40 | 70 74 2c 20 24 64 65 76 4d 6f 64 65 2c 20 24 61 72 67 73 29 3b 0a 7d 0a 0a 70 72 6f 74 65 63 74 | pt,.$devMode,.$args);.}..protect |
4de60 | 65 64 20 66 75 6e 63 74 69 6f 6e 20 6c 69 73 74 53 63 72 69 70 74 73 28 4f 75 74 70 75 74 49 6e | ed.function.listScripts(OutputIn |
4de80 | 74 65 72 66 61 63 65 20 24 6f 75 74 70 75 74 29 3a 20 69 6e 74 0a 7b 0a 24 73 63 72 69 70 74 73 | terface.$output):.int.{.$scripts |
4dea0 | 20 3d 20 24 74 68 69 73 2d 3e 72 65 71 75 69 72 65 43 6f 6d 70 6f 73 65 72 28 29 2d 3e 67 65 74 | .=.$this->requireComposer()->get |
4dec0 | 50 61 63 6b 61 67 65 28 29 2d 3e 67 65 74 53 63 72 69 70 74 73 28 29 3b 0a 0a 69 66 20 28 21 63 | Package()->getScripts();..if.(!c |
4dee0 | 6f 75 6e 74 28 24 73 63 72 69 70 74 73 29 29 20 7b 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 0a 24 | ount($scripts)).{.return.0;.}..$ |
4df00 | 69 6f 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 | io.=.$this->getIO();.$io->writeE |
4df20 | 72 72 6f 72 28 27 3c 69 6e 66 6f 3e 73 63 72 69 70 74 73 3a 3c 2f 69 6e 66 6f 3e 27 29 3b 0a 24 | rror('<info>scripts:</info>');.$ |
4df40 | 74 61 62 6c 65 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 73 63 72 69 70 74 73 20 61 73 | table.=.[];.foreach.($scripts.as |
4df60 | 20 24 6e 61 6d 65 20 3d 3e 20 24 73 63 72 69 70 74 29 20 7b 0a 24 64 65 73 63 72 69 70 74 69 6f | .$name.=>.$script).{.$descriptio |
4df80 | 6e 20 3d 20 27 27 3b 0a 74 72 79 20 7b 0a 24 63 6d 64 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 41 | n.=.'';.try.{.$cmd.=.$this->getA |
4dfa0 | 70 70 6c 69 63 61 74 69 6f 6e 28 29 2d 3e 66 69 6e 64 28 24 6e 61 6d 65 29 3b 0a 69 66 20 28 24 | pplication()->find($name);.if.($ |
4dfc0 | 63 6d 64 20 69 6e 73 74 61 6e 63 65 6f 66 20 53 63 72 69 70 74 41 6c 69 61 73 43 6f 6d 6d 61 6e | cmd.instanceof.ScriptAliasComman |
4dfe0 | 64 29 20 7b 0a 24 64 65 73 63 72 69 70 74 69 6f 6e 20 3d 20 24 63 6d 64 2d 3e 67 65 74 44 65 73 | d).{.$description.=.$cmd->getDes |
4e000 | 63 72 69 70 74 69 6f 6e 28 29 3b 0a 7d 0a 7d 20 63 61 74 63 68 20 28 5c 53 79 6d 66 6f 6e 79 5c | cription();.}.}.catch.(\Symfony\ |
4e020 | 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 45 78 63 65 70 74 69 6f 6e 5c 43 6f 6d 6d | Component\Console\Exception\Comm |
4e040 | 61 6e 64 4e 6f 74 46 6f 75 6e 64 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 0a 7d 0a 24 74 | andNotFoundException.$e).{..}.$t |
4e060 | 61 62 6c 65 5b 5d 20 3d 20 5b 27 20 20 27 2e 24 6e 61 6d 65 2c 20 24 64 65 73 63 72 69 70 74 69 | able[].=.['..'.$name,.$descripti |
4e080 | 6f 6e 5d 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 72 65 6e 64 65 72 54 61 62 6c 65 28 24 74 61 62 6c | on];.}..$this->renderTable($tabl |
4e0a0 | 65 2c 20 24 6f 75 74 70 75 74 29 3b 0a 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 7d 0a 3c 3f 70 68 | e,.$output);..return.0;.}.}.<?ph |
4e0c0 | 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a | p.declare(strict_types=1);...... |
4e0e0 | 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6d 6d 61 6e 64 | ......namespace.Composer\Command |
4e100 | 3b 0a 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 | ;..use.Symfony\Component\Console |
4e120 | 5c 49 6e 70 75 74 5c 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f | \Input\InputInterface;.use.Compo |
4e140 | 73 65 72 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 4f 70 74 69 6f 6e 3b 0a 75 | ser\Console\Input\InputOption;.u |
4e160 | 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 41 | se.Composer\Console\Input\InputA |
4e180 | 72 67 75 6d 65 6e 74 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 | rgument;.use.Symfony\Component\C |
4e1a0 | 6f 6e 73 6f 6c 65 5c 4f 75 74 70 75 74 5c 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 0a | onsole\Output\OutputInterface;.. |
4e1c0 | 0a 0a 0a 63 6c 61 73 73 20 53 63 72 69 70 74 41 6c 69 61 73 43 6f 6d 6d 61 6e 64 20 65 78 74 65 | ...class.ScriptAliasCommand.exte |
4e1e0 | 6e 64 73 20 42 61 73 65 43 6f 6d 6d 61 6e 64 0a 7b 0a 0a 70 72 69 76 61 74 65 20 24 73 63 72 69 | nds.BaseCommand.{..private.$scri |
4e200 | 70 74 3b 0a 0a 70 72 69 76 61 74 65 20 24 64 65 73 63 72 69 70 74 69 6f 6e 3b 0a 0a 70 75 62 6c | pt;..private.$description;..publ |
4e220 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 73 74 72 69 6e 67 20 24 | ic.function.__construct(string.$ |
4e240 | 73 63 72 69 70 74 2c 20 3f 73 74 72 69 6e 67 20 24 64 65 73 63 72 69 70 74 69 6f 6e 29 0a 7b 0a | script,.?string.$description).{. |
4e260 | 24 74 68 69 73 2d 3e 73 63 72 69 70 74 20 3d 20 24 73 63 72 69 70 74 3b 0a 24 74 68 69 73 2d 3e | $this->script.=.$script;.$this-> |
4e280 | 64 65 73 63 72 69 70 74 69 6f 6e 20 3d 20 24 64 65 73 63 72 69 70 74 69 6f 6e 20 3f 3f 20 27 52 | description.=.$description.??.'R |
4e2a0 | 75 6e 73 20 74 68 65 20 27 2e 24 73 63 72 69 70 74 2e 27 20 73 63 72 69 70 74 20 61 73 20 64 65 | uns.the.'.$script.'.script.as.de |
4e2c0 | 66 69 6e 65 64 20 69 6e 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 27 3b 0a 0a 70 61 72 65 6e 74 | fined.in.composer.json';..parent |
4e2e0 | 3a 3a 5f 5f 63 6f 6e 73 74 72 75 63 74 28 29 3b 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 | ::__construct();.}..protected.fu |
4e300 | 6e 63 74 69 6f 6e 20 63 6f 6e 66 69 67 75 72 65 28 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 | nction.configure():.void.{.$this |
4e320 | 0a 2d 3e 73 65 74 4e 61 6d 65 28 24 74 68 69 73 2d 3e 73 63 72 69 70 74 29 0a 2d 3e 73 65 74 44 | .->setName($this->script).->setD |
4e340 | 65 73 63 72 69 70 74 69 6f 6e 28 24 74 68 69 73 2d 3e 64 65 73 63 72 69 70 74 69 6f 6e 29 0a 2d | escription($this->description).- |
4e360 | 3e 73 65 74 44 65 66 69 6e 69 74 69 6f 6e 28 5b 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e | >setDefinition([.new.InputOption |
4e380 | 28 27 64 65 76 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 | ('dev',.null,.InputOption::VALUE |
4e3a0 | 5f 4e 4f 4e 45 2c 20 27 53 65 74 73 20 74 68 65 20 64 65 76 20 6d 6f 64 65 2e 27 29 2c 0a 6e 65 | _NONE,.'Sets.the.dev.mode.'),.ne |
4e3c0 | 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 64 65 76 27 2c 20 6e 75 6c 6c 2c 20 49 6e | w.InputOption('no-dev',.null,.In |
4e3e0 | 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 44 69 73 61 62 6c 65 73 | putOption::VALUE_NONE,.'Disables |
4e400 | 20 74 68 65 20 64 65 76 20 6d 6f 64 65 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 41 72 67 75 6d | .the.dev.mode.'),.new.InputArgum |
4e420 | 65 6e 74 28 27 61 72 67 73 27 2c 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 3a 3a 49 53 5f 41 52 | ent('args',.InputArgument::IS_AR |
4e440 | 52 41 59 20 7c 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 3a 3a 4f 50 54 49 4f 4e 41 4c 2c 20 27 | RAY.|.InputArgument::OPTIONAL,.' |
4e460 | 27 29 2c 0a 5d 29 0a 2d 3e 73 65 74 48 65 6c 70 28 0a 3c 3c 3c 45 4f 54 0a 54 68 65 20 3c 69 6e | '),.]).->setHelp(.<<<EOT.The.<in |
4e480 | 66 6f 3e 72 75 6e 2d 73 63 72 69 70 74 3c 2f 69 6e 66 6f 3e 20 63 6f 6d 6d 61 6e 64 20 72 75 6e | fo>run-script</info>.command.run |
4e4a0 | 73 20 73 63 72 69 70 74 73 20 64 65 66 69 6e 65 64 20 69 6e 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 | s.scripts.defined.in.composer.js |
4e4c0 | 6f 6e 3a 0a 0a 3c 69 6e 66 6f 3e 70 68 70 20 63 6f 6d 70 6f 73 65 72 2e 70 68 61 72 20 72 75 6e | on:..<info>php.composer.phar.run |
4e4e0 | 2d 73 63 72 69 70 74 20 70 6f 73 74 2d 75 70 64 61 74 65 2d 63 6d 64 3c 2f 69 6e 66 6f 3e 0a 0a | -script.post-update-cmd</info>.. |
4e500 | 52 65 61 64 20 6d 6f 72 65 20 61 74 20 68 74 74 70 73 3a 2f 2f 67 65 74 63 6f 6d 70 6f 73 65 72 | Read.more.at.https://getcomposer |
4e520 | 2e 6f 72 67 2f 64 6f 63 2f 30 33 2d 63 6c 69 2e 6d 64 23 72 75 6e 2d 73 63 72 69 70 74 0a 45 4f | .org/doc/03-cli.md#run-script.EO |
4e540 | 54 0a 29 0a 3b 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 65 78 65 63 | T.).;.}..protected.function.exec |
4e560 | 75 74 65 28 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 69 6e 70 75 74 2c 20 4f 75 74 70 75 | ute(InputInterface.$input,.Outpu |
4e580 | 74 49 6e 74 65 72 66 61 63 65 20 24 6f 75 74 70 75 74 29 3a 20 69 6e 74 0a 7b 0a 24 63 6f 6d 70 | tInterface.$output):.int.{.$comp |
4e5a0 | 6f 73 65 72 20 3d 20 24 74 68 69 73 2d 3e 72 65 71 75 69 72 65 43 6f 6d 70 6f 73 65 72 28 29 3b | oser.=.$this->requireComposer(); |
4e5c0 | 0a 0a 24 61 72 67 73 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 41 72 67 75 6d 65 6e 74 73 28 29 | ..$args.=.$input->getArguments() |
4e5e0 | 3b 0a 0a 72 65 74 75 72 6e 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 45 76 65 6e 74 44 69 73 | ;..return.$composer->getEventDis |
4e600 | 70 61 74 63 68 65 72 28 29 2d 3e 64 69 73 70 61 74 63 68 53 63 72 69 70 74 28 24 74 68 69 73 2d | patcher()->dispatchScript($this- |
4e620 | 3e 73 63 72 69 70 74 2c 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 64 65 76 27 | >script,.$input->getOption('dev' |
4e640 | 29 20 7c 7c 20 21 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 64 65 76 27 | ).||.!$input->getOption('no-dev' |
4e660 | 29 2c 20 24 61 72 67 73 5b 27 61 72 67 73 27 5d 29 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 | ),.$args['args']);.}.}.<?php.dec |
4e680 | 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a | lare(strict_types=1);........... |
4e6a0 | 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6d 6d 61 6e 64 3b 0a 0a 75 73 | .namespace.Composer\Command;..us |
4e6c0 | 65 20 43 6f 6d 70 6f 73 65 72 5c 46 61 63 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 | e.Composer\Factory;.use.Composer |
4e6e0 | 5c 4a 73 6f 6e 5c 4a 73 6f 6e 46 69 6c 65 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 | \Json\JsonFile;.use.Symfony\Comp |
4e700 | 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 46 6f 72 6d 61 74 74 65 72 5c 4f 75 74 70 75 74 46 6f | onent\Console\Formatter\OutputFo |
4e720 | 72 6d 61 74 74 65 72 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 | rmatter;.use.Symfony\Component\C |
4e740 | 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 | onsole\Input\InputInterface;.use |
4e760 | 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 41 72 67 | .Composer\Console\Input\InputArg |
4e780 | 75 6d 65 6e 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 | ument;.use.Composer\Console\Inpu |
4e7a0 | 74 5c 49 6e 70 75 74 4f 70 74 69 6f 6e 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f | t\InputOption;.use.Symfony\Compo |
4e7c0 | 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 4f 75 74 70 75 74 5c 4f 75 74 70 75 74 49 6e 74 65 72 66 | nent\Console\Output\OutputInterf |
4e7e0 | 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 43 6f 6d | ace;.use.Composer\Repository\Com |
4e800 | 70 6f 73 69 74 65 52 65 70 6f 73 69 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 | positeRepository;.use.Composer\R |
4e820 | 65 70 6f 73 69 74 6f 72 79 5c 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 3b 0a 75 73 | epository\PlatformRepository;.us |
4e840 | 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 52 65 70 6f 73 69 74 6f 72 79 | e.Composer\Repository\Repository |
4e860 | 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 6c 75 67 69 6e 5c 43 | Interface;.use.Composer\Plugin\C |
4e880 | 6f 6d 6d 61 6e 64 45 76 65 6e 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 6c 75 67 69 6e | ommandEvent;.use.Composer\Plugin |
4e8a0 | 5c 50 6c 75 67 69 6e 45 76 65 6e 74 73 3b 0a 0a 0a 0a 0a 63 6c 61 73 73 20 53 65 61 72 63 68 43 | \PluginEvents;.....class.SearchC |
4e8c0 | 6f 6d 6d 61 6e 64 20 65 78 74 65 6e 64 73 20 42 61 73 65 43 6f 6d 6d 61 6e 64 0a 7b 0a 70 72 6f | ommand.extends.BaseCommand.{.pro |
4e8e0 | 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 63 6f 6e 66 69 67 75 72 65 28 29 3a 20 76 6f 69 | tected.function.configure():.voi |
4e900 | 64 0a 7b 0a 24 74 68 69 73 0a 2d 3e 73 65 74 4e 61 6d 65 28 27 73 65 61 72 63 68 27 29 0a 2d 3e | d.{.$this.->setName('search').-> |
4e920 | 73 65 74 44 65 73 63 72 69 70 74 69 6f 6e 28 27 53 65 61 72 63 68 65 73 20 66 6f 72 20 70 61 63 | setDescription('Searches.for.pac |
4e940 | 6b 61 67 65 73 27 29 0a 2d 3e 73 65 74 44 65 66 69 6e 69 74 69 6f 6e 28 5b 0a 6e 65 77 20 49 6e | kages').->setDefinition([.new.In |
4e960 | 70 75 74 4f 70 74 69 6f 6e 28 27 6f 6e 6c 79 2d 6e 61 6d 65 27 2c 20 27 4e 27 2c 20 49 6e 70 75 | putOption('only-name',.'N',.Inpu |
4e980 | 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 53 65 61 72 63 68 20 6f 6e 6c | tOption::VALUE_NONE,.'Search.onl |
4e9a0 | 79 20 69 6e 20 70 61 63 6b 61 67 65 20 6e 61 6d 65 73 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f | y.in.package.names'),.new.InputO |
4e9c0 | 70 74 69 6f 6e 28 27 6f 6e 6c 79 2d 76 65 6e 64 6f 72 27 2c 20 27 4f 27 2c 20 49 6e 70 75 74 4f | ption('only-vendor',.'O',.InputO |
4e9e0 | 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 53 65 61 72 63 68 20 6f 6e 6c 79 20 | ption::VALUE_NONE,.'Search.only. |
4ea00 | 66 6f 72 20 76 65 6e 64 6f 72 20 2f 20 6f 72 67 61 6e 69 7a 61 74 69 6f 6e 20 6e 61 6d 65 73 2c | for.vendor./.organization.names, |
4ea20 | 20 72 65 74 75 72 6e 73 20 6f 6e 6c 79 20 22 76 65 6e 64 6f 72 22 20 61 73 20 72 65 73 75 6c 74 | .returns.only."vendor".as.result |
4ea40 | 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 74 79 70 65 27 2c 20 27 74 27 2c | '),.new.InputOption('type',.'t', |
4ea60 | 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 52 45 51 55 49 52 45 44 2c 20 27 53 | .InputOption::VALUE_REQUIRED,.'S |
4ea80 | 65 61 72 63 68 20 66 6f 72 20 61 20 73 70 65 63 69 66 69 63 20 70 61 63 6b 61 67 65 20 74 79 70 | earch.for.a.specific.package.typ |
4eaa0 | 65 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 66 6f 72 6d 61 74 27 2c 20 27 | e'),.new.InputOption('format',.' |
4eac0 | 66 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 52 45 51 55 49 52 45 44 2c | f',.InputOption::VALUE_REQUIRED, |
4eae0 | 20 27 46 6f 72 6d 61 74 20 6f 66 20 74 68 65 20 6f 75 74 70 75 74 3a 20 74 65 78 74 20 6f 72 20 | .'Format.of.the.output:.text.or. |
4eb00 | 6a 73 6f 6e 27 2c 20 27 74 65 78 74 27 2c 20 5b 27 6a 73 6f 6e 27 2c 20 27 74 65 78 74 27 5d 29 | json',.'text',.['json',.'text']) |
4eb20 | 2c 0a 6e 65 77 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 28 27 74 6f 6b 65 6e 73 27 2c 20 49 6e | ,.new.InputArgument('tokens',.In |
4eb40 | 70 75 74 41 72 67 75 6d 65 6e 74 3a 3a 49 53 5f 41 52 52 41 59 20 7c 20 49 6e 70 75 74 41 72 67 | putArgument::IS_ARRAY.|.InputArg |
4eb60 | 75 6d 65 6e 74 3a 3a 52 45 51 55 49 52 45 44 2c 20 27 74 6f 6b 65 6e 73 20 74 6f 20 73 65 61 72 | ument::REQUIRED,.'tokens.to.sear |
4eb80 | 63 68 20 66 6f 72 27 29 2c 0a 5d 29 0a 2d 3e 73 65 74 48 65 6c 70 28 0a 3c 3c 3c 45 4f 54 0a 54 | ch.for'),.]).->setHelp(.<<<EOT.T |
4eba0 | 68 65 20 73 65 61 72 63 68 20 63 6f 6d 6d 61 6e 64 20 73 65 61 72 63 68 65 73 20 66 6f 72 20 70 | he.search.command.searches.for.p |
4ebc0 | 61 63 6b 61 67 65 73 20 62 79 20 69 74 73 20 6e 61 6d 65 0a 3c 69 6e 66 6f 3e 70 68 70 20 63 6f | ackages.by.its.name.<info>php.co |
4ebe0 | 6d 70 6f 73 65 72 2e 70 68 61 72 20 73 65 61 72 63 68 20 73 79 6d 66 6f 6e 79 20 63 6f 6d 70 6f | mposer.phar.search.symfony.compo |
4ec00 | 73 65 72 3c 2f 69 6e 66 6f 3e 0a 0a 52 65 61 64 20 6d 6f 72 65 20 61 74 20 68 74 74 70 73 3a 2f | ser</info>..Read.more.at.https:/ |
4ec20 | 2f 67 65 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 67 2f 64 6f 63 2f 30 33 2d 63 6c 69 2e 6d 64 23 73 | /getcomposer.org/doc/03-cli.md#s |
4ec40 | 65 61 72 63 68 0a 45 4f 54 0a 29 0a 3b 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 | earch.EOT.).;.}..protected.funct |
4ec60 | 69 6f 6e 20 65 78 65 63 75 74 65 28 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 69 6e 70 75 | ion.execute(InputInterface.$inpu |
4ec80 | 74 2c 20 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 6f 75 74 70 75 74 29 3a 20 69 6e 74 | t,.OutputInterface.$output):.int |
4eca0 | 0a 7b 0a 0a 24 70 6c 61 74 66 6f 72 6d 52 65 70 6f 20 3d 20 6e 65 77 20 50 6c 61 74 66 6f 72 6d | .{..$platformRepo.=.new.Platform |
4ecc0 | 52 65 70 6f 73 69 74 6f 72 79 3b 0a 24 69 6f 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 | Repository;.$io.=.$this->getIO() |
4ece0 | 3b 0a 0a 24 66 6f 72 6d 61 74 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 | ;..$format.=.$input->getOption(' |
4ed00 | 66 6f 72 6d 61 74 27 29 3b 0a 69 66 20 28 21 69 6e 5f 61 72 72 61 79 28 24 66 6f 72 6d 61 74 2c | format');.if.(!in_array($format, |
4ed20 | 20 5b 27 74 65 78 74 27 2c 20 27 6a 73 6f 6e 27 5d 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 | .['text',.'json'])).{.$io->write |
4ed40 | 45 72 72 6f 72 28 73 70 72 69 6e 74 66 28 27 55 6e 73 75 70 70 6f 72 74 65 64 20 66 6f 72 6d 61 | Error(sprintf('Unsupported.forma |
4ed60 | 74 20 22 25 73 22 2e 20 53 65 65 20 68 65 6c 70 20 66 6f 72 20 73 75 70 70 6f 72 74 65 64 20 66 | t."%s"..See.help.for.supported.f |
4ed80 | 6f 72 6d 61 74 73 2e 27 2c 20 24 66 6f 72 6d 61 74 29 29 3b 0a 0a 72 65 74 75 72 6e 20 31 3b 0a | ormats.',.$format));..return.1;. |
4eda0 | 7d 0a 0a 69 66 20 28 21 28 24 63 6f 6d 70 6f 73 65 72 20 3d 20 24 74 68 69 73 2d 3e 74 72 79 43 | }..if.(!($composer.=.$this->tryC |
4edc0 | 6f 6d 70 6f 73 65 72 28 29 29 29 20 7b 0a 24 63 6f 6d 70 6f 73 65 72 20 3d 20 46 61 63 74 6f 72 | omposer())).{.$composer.=.Factor |
4ede0 | 79 3a 3a 63 72 65 61 74 65 28 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 2c 20 5b 5d 2c 20 24 69 | y::create($this->getIO(),.[],.$i |
4ee00 | 6e 70 75 74 2d 3e 68 61 73 50 61 72 61 6d 65 74 65 72 4f 70 74 69 6f 6e 28 27 2d 2d 6e 6f 2d 70 | nput->hasParameterOption('--no-p |
4ee20 | 6c 75 67 69 6e 73 27 29 29 3b 0a 7d 0a 24 6c 6f 63 61 6c 52 65 70 6f 20 3d 20 24 63 6f 6d 70 6f | lugins'));.}.$localRepo.=.$compo |
4ee40 | 73 65 72 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 79 4d 61 6e 61 67 65 72 28 29 2d 3e 67 65 74 | ser->getRepositoryManager()->get |
4ee60 | 4c 6f 63 61 6c 52 65 70 6f 73 69 74 6f 72 79 28 29 3b 0a 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 | LocalRepository();.$installedRep |
4ee80 | 6f 20 3d 20 6e 65 77 20 43 6f 6d 70 6f 73 69 74 65 52 65 70 6f 73 69 74 6f 72 79 28 5b 24 6c 6f | o.=.new.CompositeRepository([$lo |
4eea0 | 63 61 6c 52 65 70 6f 2c 20 24 70 6c 61 74 66 6f 72 6d 52 65 70 6f 5d 29 3b 0a 24 72 65 70 6f 73 | calRepo,.$platformRepo]);.$repos |
4eec0 | 20 3d 20 6e 65 77 20 43 6f 6d 70 6f 73 69 74 65 52 65 70 6f 73 69 74 6f 72 79 28 61 72 72 61 79 | .=.new.CompositeRepository(array |
4eee0 | 5f 6d 65 72 67 65 28 5b 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 5d 2c 20 24 63 6f 6d 70 6f 73 | _merge([$installedRepo],.$compos |
4ef00 | 65 72 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 79 4d 61 6e 61 67 65 72 28 29 2d 3e 67 65 74 52 | er->getRepositoryManager()->getR |
4ef20 | 65 70 6f 73 69 74 6f 72 69 65 73 28 29 29 29 3b 0a 0a 24 63 6f 6d 6d 61 6e 64 45 76 65 6e 74 20 | epositories()));..$commandEvent. |
4ef40 | 3d 20 6e 65 77 20 43 6f 6d 6d 61 6e 64 45 76 65 6e 74 28 50 6c 75 67 69 6e 45 76 65 6e 74 73 3a | =.new.CommandEvent(PluginEvents: |
4ef60 | 3a 43 4f 4d 4d 41 4e 44 2c 20 27 73 65 61 72 63 68 27 2c 20 24 69 6e 70 75 74 2c 20 24 6f 75 74 | :COMMAND,.'search',.$input,.$out |
4ef80 | 70 75 74 29 3b 0a 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 45 76 65 6e 74 44 69 73 70 61 74 63 | put);.$composer->getEventDispatc |
4efa0 | 68 65 72 28 29 2d 3e 64 69 73 70 61 74 63 68 28 24 63 6f 6d 6d 61 6e 64 45 76 65 6e 74 2d 3e 67 | her()->dispatch($commandEvent->g |
4efc0 | 65 74 4e 61 6d 65 28 29 2c 20 24 63 6f 6d 6d 61 6e 64 45 76 65 6e 74 29 3b 0a 0a 24 6d 6f 64 65 | etName(),.$commandEvent);..$mode |
4efe0 | 20 3d 20 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 3a 3a 53 45 41 52 43 48 5f 46 | .=.RepositoryInterface::SEARCH_F |
4f000 | 55 4c 4c 54 45 58 54 3b 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 | ULLTEXT;.if.($input->getOption(' |
4f020 | 6f 6e 6c 79 2d 6e 61 6d 65 27 29 20 3d 3d 3d 20 74 72 75 65 29 20 7b 0a 69 66 20 28 24 69 6e 70 | only-name').===.true).{.if.($inp |
4f040 | 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6f 6e 6c 79 2d 76 65 6e 64 6f 72 27 29 20 3d 3d 3d | ut->getOption('only-vendor').=== |
4f060 | 20 74 72 75 65 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d | .true).{.throw.new.\InvalidArgum |
4f080 | 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 27 2d 2d 6f 6e 6c 79 2d 6e 61 6d 65 20 61 6e 64 20 2d 2d | entException('--only-name.and.-- |
4f0a0 | 6f 6e 6c 79 2d 76 65 6e 64 6f 72 20 63 61 6e 6e 6f 74 20 62 65 20 75 73 65 64 20 74 6f 67 65 74 | only-vendor.cannot.be.used.toget |
4f0c0 | 68 65 72 27 29 3b 0a 7d 0a 24 6d 6f 64 65 20 3d 20 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 | her');.}.$mode.=.RepositoryInter |
4f0e0 | 66 61 63 65 3a 3a 53 45 41 52 43 48 5f 4e 41 4d 45 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 69 6e | face::SEARCH_NAME;.}.elseif.($in |
4f100 | 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6f 6e 6c 79 2d 76 65 6e 64 6f 72 27 29 20 3d 3d | put->getOption('only-vendor').== |
4f120 | 3d 20 74 72 75 65 29 20 7b 0a 24 6d 6f 64 65 20 3d 20 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 | =.true).{.$mode.=.RepositoryInte |
4f140 | 72 66 61 63 65 3a 3a 53 45 41 52 43 48 5f 56 45 4e 44 4f 52 3b 0a 7d 0a 0a 24 74 79 70 65 20 3d | rface::SEARCH_VENDOR;.}..$type.= |
4f160 | 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 74 79 70 65 27 29 3b 0a 0a 24 71 75 | .$input->getOption('type');..$qu |
4f180 | 65 72 79 20 3d 20 69 6d 70 6c 6f 64 65 28 27 20 27 2c 20 24 69 6e 70 75 74 2d 3e 67 65 74 41 72 | ery.=.implode('.',.$input->getAr |
4f1a0 | 67 75 6d 65 6e 74 28 27 74 6f 6b 65 6e 73 27 29 29 3b 0a 69 66 20 28 24 6d 6f 64 65 20 21 3d 3d | gument('tokens'));.if.($mode.!== |
4f1c0 | 20 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 3a 3a 53 45 41 52 43 48 5f 46 55 4c | .RepositoryInterface::SEARCH_FUL |
4f1e0 | 4c 54 45 58 54 29 20 7b 0a 24 71 75 65 72 79 20 3d 20 70 72 65 67 5f 71 75 6f 74 65 28 24 71 75 | LTEXT).{.$query.=.preg_quote($qu |
4f200 | 65 72 79 29 3b 0a 7d 0a 0a 24 72 65 73 75 6c 74 73 20 3d 20 24 72 65 70 6f 73 2d 3e 73 65 61 72 | ery);.}..$results.=.$repos->sear |
4f220 | 63 68 28 24 71 75 65 72 79 2c 20 24 6d 6f 64 65 2c 20 24 74 79 70 65 29 3b 0a 0a 69 66 20 28 24 | ch($query,.$mode,.$type);..if.($ |
4f240 | 72 65 73 75 6c 74 73 20 26 26 20 24 66 6f 72 6d 61 74 20 3d 3d 3d 20 27 74 65 78 74 27 29 20 7b | results.&&.$format.===.'text').{ |
4f260 | 0a 24 77 69 64 74 68 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 54 65 72 6d 69 6e 61 6c 57 69 64 74 | .$width.=.$this->getTerminalWidt |
4f280 | 68 28 29 3b 0a 0a 24 6e 61 6d 65 4c 65 6e 67 74 68 20 3d 20 30 3b 0a 66 6f 72 65 61 63 68 20 28 | h();..$nameLength.=.0;.foreach.( |
4f2a0 | 24 72 65 73 75 6c 74 73 20 61 73 20 24 72 65 73 75 6c 74 29 20 7b 0a 24 6e 61 6d 65 4c 65 6e 67 | $results.as.$result).{.$nameLeng |
4f2c0 | 74 68 20 3d 20 6d 61 78 28 73 74 72 6c 65 6e 28 24 72 65 73 75 6c 74 5b 27 6e 61 6d 65 27 5d 29 | th.=.max(strlen($result['name']) |
4f2e0 | 2c 20 24 6e 61 6d 65 4c 65 6e 67 74 68 29 3b 0a 7d 0a 24 6e 61 6d 65 4c 65 6e 67 74 68 20 2b 3d | ,.$nameLength);.}.$nameLength.+= |
4f300 | 20 31 3b 0a 66 6f 72 65 61 63 68 20 28 24 72 65 73 75 6c 74 73 20 61 73 20 24 72 65 73 75 6c 74 | .1;.foreach.($results.as.$result |
4f320 | 29 20 7b 0a 24 64 65 73 63 72 69 70 74 69 6f 6e 20 3d 20 24 72 65 73 75 6c 74 5b 27 64 65 73 63 | ).{.$description.=.$result['desc |
4f340 | 72 69 70 74 69 6f 6e 27 5d 20 3f 3f 20 27 27 3b 0a 24 77 61 72 6e 69 6e 67 20 3d 20 21 65 6d 70 | ription'].??.'';.$warning.=.!emp |
4f360 | 74 79 28 24 72 65 73 75 6c 74 5b 27 61 62 61 6e 64 6f 6e 65 64 27 5d 29 20 3f 20 27 3c 77 61 72 | ty($result['abandoned']).?.'<war |
4f380 | 6e 69 6e 67 3e 21 20 41 62 61 6e 64 6f 6e 65 64 20 21 3c 2f 77 61 72 6e 69 6e 67 3e 20 27 20 3a | ning>!.Abandoned.!</warning>.'.: |
4f3a0 | 20 27 27 3b 0a 24 72 65 6d 61 69 6e 69 6e 67 20 3d 20 24 77 69 64 74 68 20 2d 20 24 6e 61 6d 65 | .'';.$remaining.=.$width.-.$name |
4f3c0 | 4c 65 6e 67 74 68 20 2d 20 73 74 72 6c 65 6e 28 24 77 61 72 6e 69 6e 67 29 20 2d 20 32 3b 0a 69 | Length.-.strlen($warning).-.2;.i |
4f3e0 | 66 20 28 73 74 72 6c 65 6e 28 24 64 65 73 63 72 69 70 74 69 6f 6e 29 20 3e 20 24 72 65 6d 61 69 | f.(strlen($description).>.$remai |
4f400 | 6e 69 6e 67 29 20 7b 0a 24 64 65 73 63 72 69 70 74 69 6f 6e 20 3d 20 73 75 62 73 74 72 28 24 64 | ning).{.$description.=.substr($d |
4f420 | 65 73 63 72 69 70 74 69 6f 6e 2c 20 30 2c 20 24 72 65 6d 61 69 6e 69 6e 67 20 2d 20 33 29 20 2e | escription,.0,.$remaining.-.3).. |
4f440 | 20 27 2e 2e 2e 27 3b 0a 7d 0a 0a 24 6c 69 6e 6b 20 3d 20 24 72 65 73 75 6c 74 5b 27 75 72 6c 27 | .'...';.}..$link.=.$result['url' |
4f460 | 5d 20 3f 3f 20 6e 75 6c 6c 3b 0a 69 66 20 28 24 6c 69 6e 6b 20 21 3d 3d 20 6e 75 6c 6c 29 20 7b | ].??.null;.if.($link.!==.null).{ |
4f480 | 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 3c 68 72 65 66 3d 27 2e 4f 75 74 70 75 74 46 6f 72 6d 61 | .$io->write('<href='.OutputForma |
4f4a0 | 74 74 65 72 3a 3a 65 73 63 61 70 65 28 24 6c 69 6e 6b 29 2e 27 3e 27 2e 24 72 65 73 75 6c 74 5b | tter::escape($link).'>'.$result[ |
4f4c0 | 27 6e 61 6d 65 27 5d 2e 27 3c 2f 3e 27 2e 20 73 74 72 5f 72 65 70 65 61 74 28 27 20 27 2c 20 24 | 'name'].'</>'..str_repeat('.',.$ |
4f4e0 | 6e 61 6d 65 4c 65 6e 67 74 68 20 2d 20 73 74 72 6c 65 6e 28 24 72 65 73 75 6c 74 5b 27 6e 61 6d | nameLength.-.strlen($result['nam |
4f500 | 65 27 5d 29 29 20 2e 20 24 77 61 72 6e 69 6e 67 20 2e 20 24 64 65 73 63 72 69 70 74 69 6f 6e 29 | e']))...$warning...$description) |
4f520 | 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 73 74 72 5f 70 61 64 28 24 72 | ;.}.else.{.$io->write(str_pad($r |
4f540 | 65 73 75 6c 74 5b 27 6e 61 6d 65 27 5d 2c 20 24 6e 61 6d 65 4c 65 6e 67 74 68 2c 20 27 20 27 29 | esult['name'],.$nameLength,.'.') |
4f560 | 20 2e 20 24 77 61 72 6e 69 6e 67 20 2e 20 24 64 65 73 63 72 69 70 74 69 6f 6e 29 3b 0a 7d 0a 7d | ...$warning...$description);.}.} |
4f580 | 0a 7d 20 65 6c 73 65 69 66 20 28 24 66 6f 72 6d 61 74 20 3d 3d 3d 20 27 6a 73 6f 6e 27 29 20 7b | .}.elseif.($format.===.'json').{ |
4f5a0 | 0a 24 69 6f 2d 3e 77 72 69 74 65 28 4a 73 6f 6e 46 69 6c 65 3a 3a 65 6e 63 6f 64 65 28 24 72 65 | .$io->write(JsonFile::encode($re |
4f5c0 | 73 75 6c 74 73 29 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 | sults));.}..return.0;.}.}.<?php. |
4f5e0 | 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a | declare(strict_types=1);........ |
4f600 | 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6d 6d 61 6e 64 3b 0a | ....namespace.Composer\Command;. |
4f620 | 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6d 70 6f 73 65 72 3b 0a 75 73 65 20 43 6f 6d 70 | .use.Composer\Composer;.use.Comp |
4f640 | 6f 73 65 72 5c 46 61 63 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 66 69 | oser\Factory;.use.Composer\Confi |
4f660 | 67 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 63 72 65 5c 50 72 65 67 3b 0a 75 73 65 20 43 | g;.use.Composer\Pcre\Preg;.use.C |
4f680 | 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 46 69 6c 65 73 79 73 74 65 6d 3b 0a 75 73 65 20 43 6f 6d | omposer\Util\Filesystem;.use.Com |
4f6a0 | 70 6f 73 65 72 5c 55 74 69 6c 5c 50 6c 61 74 66 6f 72 6d 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 | poser\Util\Platform;.use.Compose |
4f6c0 | 72 5c 53 65 6c 66 55 70 64 61 74 65 5c 4b 65 79 73 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c | r\SelfUpdate\Keys;.use.Composer\ |
4f6e0 | 53 65 6c 66 55 70 64 61 74 65 5c 56 65 72 73 69 6f 6e 73 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 | SelfUpdate\Versions;.use.Compose |
4f700 | 72 5c 49 4f 5c 49 4f 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 44 | r\IO\IOInterface;.use.Composer\D |
4f720 | 6f 77 6e 6c 6f 61 64 65 72 5c 46 69 6c 65 73 79 73 74 65 6d 45 78 63 65 70 74 69 6f 6e 3b 0a 75 | ownloader\FilesystemException;.u |
4f740 | 73 65 20 43 6f 6d 70 6f 73 65 72 5c 44 6f 77 6e 6c 6f 61 64 65 72 5c 54 72 61 6e 73 70 6f 72 74 | se.Composer\Downloader\Transport |
4f760 | 45 78 63 65 70 74 69 6f 6e 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 | Exception;.use.Symfony\Component |
4f780 | 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 | \Console\Input\InputInterface;.u |
4f7a0 | 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 4f | se.Composer\Console\Input\InputO |
4f7c0 | 70 74 69 6f 6e 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 | ption;.use.Composer\Console\Inpu |
4f7e0 | 74 5c 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d | t\InputArgument;.use.Symfony\Com |
4f800 | 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 4f 75 74 70 75 74 5c 4f 75 74 70 75 74 49 6e 74 65 | ponent\Console\Output\OutputInte |
4f820 | 72 66 61 63 65 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 46 69 6e | rface;.use.Symfony\Component\Fin |
4f840 | 64 65 72 5c 46 69 6e 64 65 72 3b 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 53 65 6c 66 55 70 64 61 | der\Finder;.......class.SelfUpda |
4f860 | 74 65 43 6f 6d 6d 61 6e 64 20 65 78 74 65 6e 64 73 20 42 61 73 65 43 6f 6d 6d 61 6e 64 0a 7b 0a | teCommand.extends.BaseCommand.{. |
4f880 | 70 72 69 76 61 74 65 20 63 6f 6e 73 74 20 48 4f 4d 45 50 41 47 45 20 3d 20 27 67 65 74 63 6f 6d | private.const.HOMEPAGE.=.'getcom |
4f8a0 | 70 6f 73 65 72 2e 6f 72 67 27 3b 0a 70 72 69 76 61 74 65 20 63 6f 6e 73 74 20 4f 4c 44 5f 49 4e | poser.org';.private.const.OLD_IN |
4f8c0 | 53 54 41 4c 4c 5f 45 58 54 20 3d 20 27 2d 6f 6c 64 2e 70 68 61 72 27 3b 0a 0a 70 72 6f 74 65 63 | STALL_EXT.=.'-old.phar';..protec |
4f8e0 | 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 63 6f 6e 66 69 67 75 72 65 28 29 3a 20 76 6f 69 64 0a 7b | ted.function.configure():.void.{ |
4f900 | 0a 24 74 68 69 73 0a 2d 3e 73 65 74 4e 61 6d 65 28 27 73 65 6c 66 2d 75 70 64 61 74 65 27 29 0a | .$this.->setName('self-update'). |
4f920 | 2d 3e 73 65 74 41 6c 69 61 73 65 73 28 5b 27 73 65 6c 66 75 70 64 61 74 65 27 5d 29 0a 2d 3e 73 | ->setAliases(['selfupdate']).->s |
4f940 | 65 74 44 65 73 63 72 69 70 74 69 6f 6e 28 27 55 70 64 61 74 65 73 20 63 6f 6d 70 6f 73 65 72 2e | etDescription('Updates.composer. |
4f960 | 70 68 61 72 20 74 6f 20 74 68 65 20 6c 61 74 65 73 74 20 76 65 72 73 69 6f 6e 27 29 0a 2d 3e 73 | phar.to.the.latest.version').->s |
4f980 | 65 74 44 65 66 69 6e 69 74 69 6f 6e 28 5b 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 | etDefinition([.new.InputOption(' |
4f9a0 | 72 6f 6c 6c 62 61 63 6b 27 2c 20 27 72 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c | rollback',.'r',.InputOption::VAL |
4f9c0 | 55 45 5f 4e 4f 4e 45 2c 20 27 52 65 76 65 72 74 20 74 6f 20 61 6e 20 6f 6c 64 65 72 20 69 6e 73 | UE_NONE,.'Revert.to.an.older.ins |
4f9e0 | 74 61 6c 6c 61 74 69 6f 6e 20 6f 66 20 63 6f 6d 70 6f 73 65 72 27 29 2c 0a 6e 65 77 20 49 6e 70 | tallation.of.composer'),.new.Inp |
4fa00 | 75 74 4f 70 74 69 6f 6e 28 27 63 6c 65 61 6e 2d 62 61 63 6b 75 70 73 27 2c 20 6e 75 6c 6c 2c 20 | utOption('clean-backups',.null,. |
4fa20 | 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 44 65 6c 65 74 65 | InputOption::VALUE_NONE,.'Delete |
4fa40 | 20 6f 6c 64 20 62 61 63 6b 75 70 73 20 64 75 72 69 6e 67 20 61 6e 20 75 70 64 61 74 65 2e 20 54 | .old.backups.during.an.update..T |
4fa60 | 68 69 73 20 6d 61 6b 65 73 20 74 68 65 20 63 75 72 72 65 6e 74 20 76 65 72 73 69 6f 6e 20 6f 66 | his.makes.the.current.version.of |
4fa80 | 20 63 6f 6d 70 6f 73 65 72 20 74 68 65 20 6f 6e 6c 79 20 62 61 63 6b 75 70 20 61 76 61 69 6c 61 | .composer.the.only.backup.availa |
4faa0 | 62 6c 65 20 61 66 74 65 72 20 74 68 65 20 75 70 64 61 74 65 27 29 2c 0a 6e 65 77 20 49 6e 70 75 | ble.after.the.update'),.new.Inpu |
4fac0 | 74 41 72 67 75 6d 65 6e 74 28 27 76 65 72 73 69 6f 6e 27 2c 20 49 6e 70 75 74 41 72 67 75 6d 65 | tArgument('version',.InputArgume |
4fae0 | 6e 74 3a 3a 4f 50 54 49 4f 4e 41 4c 2c 20 27 54 68 65 20 76 65 72 73 69 6f 6e 20 74 6f 20 75 70 | nt::OPTIONAL,.'The.version.to.up |
4fb00 | 64 61 74 65 20 74 6f 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 70 | date.to'),.new.InputOption('no-p |
4fb20 | 72 6f 67 72 65 73 73 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c | rogress',.null,.InputOption::VAL |
4fb40 | 55 45 5f 4e 4f 4e 45 2c 20 27 44 6f 20 6e 6f 74 20 6f 75 74 70 75 74 20 64 6f 77 6e 6c 6f 61 64 | UE_NONE,.'Do.not.output.download |
4fb60 | 20 70 72 6f 67 72 65 73 73 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 75 | .progress.'),.new.InputOption('u |
4fb80 | 70 64 61 74 65 2d 6b 65 79 73 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a | pdate-keys',.null,.InputOption:: |
4fba0 | 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 50 72 6f 6d 70 74 20 75 73 65 72 20 66 6f 72 20 61 20 6b | VALUE_NONE,.'Prompt.user.for.a.k |
4fbc0 | 65 79 20 75 70 64 61 74 65 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 73 74 | ey.update'),.new.InputOption('st |
4fbe0 | 61 62 6c 65 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f | able',.null,.InputOption::VALUE_ |
4fc00 | 4e 4f 4e 45 2c 20 27 46 6f 72 63 65 20 61 6e 20 75 70 64 61 74 65 20 74 6f 20 74 68 65 20 73 74 | NONE,.'Force.an.update.to.the.st |
4fc20 | 61 62 6c 65 20 63 68 61 6e 6e 65 6c 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 | able.channel'),.new.InputOption( |
4fc40 | 27 70 72 65 76 69 65 77 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 | 'preview',.null,.InputOption::VA |
4fc60 | 4c 55 45 5f 4e 4f 4e 45 2c 20 27 46 6f 72 63 65 20 61 6e 20 75 70 64 61 74 65 20 74 6f 20 74 68 | LUE_NONE,.'Force.an.update.to.th |
4fc80 | 65 20 70 72 65 76 69 65 77 20 63 68 61 6e 6e 65 6c 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 | e.preview.channel'),.new.InputOp |
4fca0 | 74 69 6f 6e 28 27 73 6e 61 70 73 68 6f 74 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 | tion('snapshot',.null,.InputOpti |
4fcc0 | 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 46 6f 72 63 65 20 61 6e 20 75 70 64 61 74 65 | on::VALUE_NONE,.'Force.an.update |
4fce0 | 20 74 6f 20 74 68 65 20 73 6e 61 70 73 68 6f 74 20 63 68 61 6e 6e 65 6c 27 29 2c 0a 6e 65 77 20 | .to.the.snapshot.channel'),.new. |
4fd00 | 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 31 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 | InputOption('1',.null,.InputOpti |
4fd20 | 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 46 6f 72 63 65 20 61 6e 20 75 70 64 61 74 65 | on::VALUE_NONE,.'Force.an.update |
4fd40 | 20 74 6f 20 74 68 65 20 73 74 61 62 6c 65 20 63 68 61 6e 6e 65 6c 2c 20 62 75 74 20 6f 6e 6c 79 | .to.the.stable.channel,.but.only |
4fd60 | 20 75 73 65 20 31 2e 78 20 76 65 72 73 69 6f 6e 73 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 | .use.1.x.versions'),.new.InputOp |
4fd80 | 74 69 6f 6e 28 27 32 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c | tion('2',.null,.InputOption::VAL |
4fda0 | 55 45 5f 4e 4f 4e 45 2c 20 27 46 6f 72 63 65 20 61 6e 20 75 70 64 61 74 65 20 74 6f 20 74 68 65 | UE_NONE,.'Force.an.update.to.the |
4fdc0 | 20 73 74 61 62 6c 65 20 63 68 61 6e 6e 65 6c 2c 20 62 75 74 20 6f 6e 6c 79 20 75 73 65 20 32 2e | .stable.channel,.but.only.use.2. |
4fde0 | 78 20 76 65 72 73 69 6f 6e 73 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 32 | x.versions'),.new.InputOption('2 |
4fe00 | 2e 32 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f | .2',.null,.InputOption::VALUE_NO |
4fe20 | 4e 45 2c 20 27 46 6f 72 63 65 20 61 6e 20 75 70 64 61 74 65 20 74 6f 20 74 68 65 20 73 74 61 62 | NE,.'Force.an.update.to.the.stab |
4fe40 | 6c 65 20 63 68 61 6e 6e 65 6c 2c 20 62 75 74 20 6f 6e 6c 79 20 75 73 65 20 32 2e 32 2e 78 20 4c | le.channel,.but.only.use.2.2.x.L |
4fe60 | 54 53 20 76 65 72 73 69 6f 6e 73 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 | TS.versions'),.new.InputOption(' |
4fe80 | 73 65 74 2d 63 68 61 6e 6e 65 6c 2d 6f 6e 6c 79 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 | set-channel-only',.null,.InputOp |
4fea0 | 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 4f 6e 6c 79 20 73 74 6f 72 65 20 74 68 | tion::VALUE_NONE,.'Only.store.th |
4fec0 | 65 20 63 68 61 6e 6e 65 6c 20 61 73 20 74 68 65 20 64 65 66 61 75 6c 74 20 6f 6e 65 20 61 6e 64 | e.channel.as.the.default.one.and |
4fee0 | 20 74 68 65 6e 20 65 78 69 74 27 29 2c 0a 5d 29 0a 2d 3e 73 65 74 48 65 6c 70 28 0a 3c 3c 3c 45 | .then.exit'),.]).->setHelp(.<<<E |
4ff00 | 4f 54 0a 54 68 65 20 3c 69 6e 66 6f 3e 73 65 6c 66 2d 75 70 64 61 74 65 3c 2f 69 6e 66 6f 3e 20 | OT.The.<info>self-update</info>. |
4ff20 | 63 6f 6d 6d 61 6e 64 20 63 68 65 63 6b 73 20 67 65 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 67 20 66 | command.checks.getcomposer.org.f |
4ff40 | 6f 72 20 6e 65 77 65 72 0a 76 65 72 73 69 6f 6e 73 20 6f 66 20 63 6f 6d 70 6f 73 65 72 20 61 6e | or.newer.versions.of.composer.an |
4ff60 | 64 20 69 66 20 66 6f 75 6e 64 2c 20 69 6e 73 74 61 6c 6c 73 20 74 68 65 20 6c 61 74 65 73 74 2e | d.if.found,.installs.the.latest. |
4ff80 | 0a 0a 3c 69 6e 66 6f 3e 70 68 70 20 63 6f 6d 70 6f 73 65 72 2e 70 68 61 72 20 73 65 6c 66 2d 75 | ..<info>php.composer.phar.self-u |
4ffa0 | 70 64 61 74 65 3c 2f 69 6e 66 6f 3e 0a 0a 52 65 61 64 20 6d 6f 72 65 20 61 74 20 68 74 74 70 73 | pdate</info>..Read.more.at.https |
4ffc0 | 3a 2f 2f 67 65 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 67 2f 64 6f 63 2f 30 33 2d 63 6c 69 2e 6d 64 | ://getcomposer.org/doc/03-cli.md |
4ffe0 | 23 73 65 6c 66 2d 75 70 64 61 74 65 2d 73 65 6c 66 75 70 64 61 74 65 2d 0a 45 4f 54 0a 29 0a 3b | #self-update-selfupdate-.EOT.).; |
50000 | 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 65 78 65 63 75 74 | .}.....protected.function.execut |
50020 | 65 28 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 69 6e 70 75 74 2c 20 4f 75 74 70 75 74 49 | e(InputInterface.$input,.OutputI |
50040 | 6e 74 65 72 66 61 63 65 20 24 6f 75 74 70 75 74 29 3a 20 69 6e 74 0a 7b 0a 69 66 20 28 24 5f 53 | nterface.$output):.int.{.if.($_S |
50060 | 45 52 56 45 52 5b 27 61 72 67 76 27 5d 5b 30 5d 20 3d 3d 3d 20 27 53 74 61 6e 64 61 72 64 20 69 | ERVER['argv'][0].===.'Standard.i |
50080 | 6e 70 75 74 20 63 6f 64 65 27 29 20 7b 0a 72 65 74 75 72 6e 20 31 3b 0a 7d 0a 0a 0a 0a 63 6c 61 | nput.code').{.return.1;.}....cla |
500a0 | 73 73 5f 65 78 69 73 74 73 28 27 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 6c 61 74 66 6f 72 | ss_exists('Composer\Util\Platfor |
500c0 | 6d 27 29 3b 0a 63 6c 61 73 73 5f 65 78 69 73 74 73 28 27 43 6f 6d 70 6f 73 65 72 5c 44 6f 77 6e | m');.class_exists('Composer\Down |
500e0 | 6c 6f 61 64 65 72 5c 46 69 6c 65 73 79 73 74 65 6d 45 78 63 65 70 74 69 6f 6e 27 29 3b 0a 0a 24 | loader\FilesystemException');..$ |
50100 | 63 6f 6e 66 69 67 20 3d 20 46 61 63 74 6f 72 79 3a 3a 63 72 65 61 74 65 43 6f 6e 66 69 67 28 29 | config.=.Factory::createConfig() |
50120 | 3b 0a 0a 69 66 20 28 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 64 69 73 61 62 6c 65 2d 74 6c 73 | ;..if.($config->get('disable-tls |
50140 | 27 29 20 3d 3d 3d 20 74 72 75 65 29 20 7b 0a 24 62 61 73 65 55 72 6c 20 3d 20 27 68 74 74 70 3a | ').===.true).{.$baseUrl.=.'http: |
50160 | 2f 2f 27 20 2e 20 73 65 6c 66 3a 3a 48 4f 4d 45 50 41 47 45 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 | //'...self::HOMEPAGE;.}.else.{.$ |
50180 | 62 61 73 65 55 72 6c 20 3d 20 27 68 74 74 70 73 3a 2f 2f 27 20 2e 20 73 65 6c 66 3a 3a 48 4f 4d | baseUrl.=.'https://'...self::HOM |
501a0 | 45 50 41 47 45 3b 0a 7d 0a 0a 24 69 6f 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 3b 0a | EPAGE;.}..$io.=.$this->getIO();. |
501c0 | 24 68 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 20 3d 20 46 61 63 74 6f 72 79 3a 3a 63 72 65 61 74 | $httpDownloader.=.Factory::creat |
501e0 | 65 48 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 28 24 69 6f 2c 20 24 63 6f 6e 66 69 67 29 3b 0a 0a | eHttpDownloader($io,.$config);.. |
50200 | 24 76 65 72 73 69 6f 6e 73 55 74 69 6c 20 3d 20 6e 65 77 20 56 65 72 73 69 6f 6e 73 28 24 63 6f | $versionsUtil.=.new.Versions($co |
50220 | 6e 66 69 67 2c 20 24 68 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 29 3b 0a 0a 0a 24 72 65 71 75 65 | nfig,.$httpDownloader);...$reque |
50240 | 73 74 65 64 43 68 61 6e 6e 65 6c 20 3d 20 6e 75 6c 6c 3b 0a 66 6f 72 65 61 63 68 20 28 56 65 72 | stedChannel.=.null;.foreach.(Ver |
50260 | 73 69 6f 6e 73 3a 3a 43 48 41 4e 4e 45 4c 53 20 61 73 20 24 63 68 61 6e 6e 65 6c 29 20 7b 0a 69 | sions::CHANNELS.as.$channel).{.i |
50280 | 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 24 63 68 61 6e 6e 65 6c 29 29 20 | f.($input->getOption($channel)). |
502a0 | 7b 0a 24 72 65 71 75 65 73 74 65 64 43 68 61 6e 6e 65 6c 20 3d 20 24 63 68 61 6e 6e 65 6c 3b 0a | {.$requestedChannel.=.$channel;. |
502c0 | 24 76 65 72 73 69 6f 6e 73 55 74 69 6c 2d 3e 73 65 74 43 68 61 6e 6e 65 6c 28 24 63 68 61 6e 6e | $versionsUtil->setChannel($chann |
502e0 | 65 6c 2c 20 24 69 6f 29 3b 0a 62 72 65 61 6b 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 24 69 6e 70 75 74 | el,.$io);.break;.}.}..if.($input |
50300 | 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 73 65 74 2d 63 68 61 6e 6e 65 6c 2d 6f 6e 6c 79 27 29 29 | ->getOption('set-channel-only')) |
50320 | 20 7b 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 0a 24 63 61 63 68 65 44 69 72 20 3d 20 24 63 6f 6e | .{.return.0;.}..$cacheDir.=.$con |
50340 | 66 69 67 2d 3e 67 65 74 28 27 63 61 63 68 65 2d 64 69 72 27 29 3b 0a 24 72 6f 6c 6c 62 61 63 6b | fig->get('cache-dir');.$rollback |
50360 | 44 69 72 20 3d 20 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 64 61 74 61 2d 64 69 72 27 29 3b 0a | Dir.=.$config->get('data-dir');. |
50380 | 24 68 6f 6d 65 20 3d 20 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 68 6f 6d 65 27 29 3b 0a 24 6c | $home.=.$config->get('home');.$l |
503a0 | 6f 63 61 6c 46 69 6c 65 6e 61 6d 65 20 3d 20 72 65 61 6c 70 61 74 68 28 24 5f 53 45 52 56 45 52 | ocalFilename.=.realpath($_SERVER |
503c0 | 5b 27 61 72 67 76 27 5d 5b 30 5d 29 3b 0a 69 66 20 28 66 61 6c 73 65 20 3d 3d 3d 20 24 6c 6f 63 | ['argv'][0]);.if.(false.===.$loc |
503e0 | 61 6c 46 69 6c 65 6e 61 6d 65 29 20 7b 0a 24 6c 6f 63 61 6c 46 69 6c 65 6e 61 6d 65 20 3d 20 24 | alFilename).{.$localFilename.=.$ |
50400 | 5f 53 45 52 56 45 52 5b 27 61 72 67 76 27 5d 5b 30 5d 3b 0a 7d 0a 0a 69 66 20 28 24 69 6e 70 75 | _SERVER['argv'][0];.}..if.($inpu |
50420 | 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 75 70 64 61 74 65 2d 6b 65 79 73 27 29 29 20 7b 0a 24 | t->getOption('update-keys')).{.$ |
50440 | 74 68 69 73 2d 3e 66 65 74 63 68 4b 65 79 73 28 24 69 6f 2c 20 24 63 6f 6e 66 69 67 29 3b 0a 0a | this->fetchKeys($io,.$config);.. |
50460 | 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 0a 0a 69 66 20 28 21 66 69 6c 65 5f 65 78 69 73 74 73 28 24 | return.0;.}...if.(!file_exists($ |
50480 | 6c 6f 63 61 6c 46 69 6c 65 6e 61 6d 65 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 46 69 6c 65 | localFilename)).{.throw.new.File |
504a0 | 73 79 73 74 65 6d 45 78 63 65 70 74 69 6f 6e 28 27 43 6f 6d 70 6f 73 65 72 20 75 70 64 61 74 65 | systemException('Composer.update |
504c0 | 20 66 61 69 6c 65 64 3a 20 74 68 65 20 22 27 2e 24 6c 6f 63 61 6c 46 69 6c 65 6e 61 6d 65 2e 27 | .failed:.the."'.$localFilename.' |
504e0 | 22 20 69 73 20 6e 6f 74 20 61 63 63 65 73 73 69 62 6c 65 27 29 3b 0a 7d 0a 0a 0a 24 74 6d 70 44 | ".is.not.accessible');.}...$tmpD |
50500 | 69 72 20 3d 20 69 73 5f 77 72 69 74 61 62 6c 65 28 64 69 72 6e 61 6d 65 28 24 6c 6f 63 61 6c 46 | ir.=.is_writable(dirname($localF |
50520 | 69 6c 65 6e 61 6d 65 29 29 20 3f 20 64 69 72 6e 61 6d 65 28 24 6c 6f 63 61 6c 46 69 6c 65 6e 61 | ilename)).?.dirname($localFilena |
50540 | 6d 65 29 20 3a 20 24 63 61 63 68 65 44 69 72 3b 0a 0a 0a 69 66 20 28 21 69 73 5f 77 72 69 74 61 | me).:.$cacheDir;...if.(!is_writa |
50560 | 62 6c 65 28 24 74 6d 70 44 69 72 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 46 69 6c 65 73 79 | ble($tmpDir)).{.throw.new.Filesy |
50580 | 73 74 65 6d 45 78 63 65 70 74 69 6f 6e 28 27 43 6f 6d 70 6f 73 65 72 20 75 70 64 61 74 65 20 66 | stemException('Composer.update.f |
505a0 | 61 69 6c 65 64 3a 20 74 68 65 20 22 27 2e 24 74 6d 70 44 69 72 2e 27 22 20 64 69 72 65 63 74 6f | ailed:.the."'.$tmpDir.'".directo |
505c0 | 72 79 20 75 73 65 64 20 74 6f 20 64 6f 77 6e 6c 6f 61 64 20 74 68 65 20 74 65 6d 70 20 66 69 6c | ry.used.to.download.the.temp.fil |
505e0 | 65 20 63 6f 75 6c 64 20 6e 6f 74 20 62 65 20 77 72 69 74 74 65 6e 27 29 3b 0a 7d 0a 0a 0a 69 66 | e.could.not.be.written');.}...if |
50600 | 20 28 66 75 6e 63 74 69 6f 6e 5f 65 78 69 73 74 73 28 27 70 6f 73 69 78 5f 67 65 74 70 77 75 69 | .(function_exists('posix_getpwui |
50620 | 64 27 29 20 26 26 20 66 75 6e 63 74 69 6f 6e 5f 65 78 69 73 74 73 28 27 70 6f 73 69 78 5f 67 65 | d').&&.function_exists('posix_ge |
50640 | 74 65 75 69 64 27 29 29 20 7b 0a 24 63 6f 6d 70 6f 73 65 72 55 73 65 72 20 3d 20 70 6f 73 69 78 | teuid')).{.$composerUser.=.posix |
50660 | 5f 67 65 74 70 77 75 69 64 28 70 6f 73 69 78 5f 67 65 74 65 75 69 64 28 29 29 3b 0a 24 68 6f 6d | _getpwuid(posix_geteuid());.$hom |
50680 | 65 44 69 72 4f 77 6e 65 72 49 64 20 3d 20 66 69 6c 65 6f 77 6e 65 72 28 24 68 6f 6d 65 29 3b 0a | eDirOwnerId.=.fileowner($home);. |
506a0 | 69 66 20 28 69 73 5f 61 72 72 61 79 28 24 63 6f 6d 70 6f 73 65 72 55 73 65 72 29 20 26 26 20 24 | if.(is_array($composerUser).&&.$ |
506c0 | 68 6f 6d 65 44 69 72 4f 77 6e 65 72 49 64 20 21 3d 3d 20 66 61 6c 73 65 29 20 7b 0a 24 68 6f 6d | homeDirOwnerId.!==.false).{.$hom |
506e0 | 65 4f 77 6e 65 72 20 3d 20 70 6f 73 69 78 5f 67 65 74 70 77 75 69 64 28 24 68 6f 6d 65 44 69 72 | eOwner.=.posix_getpwuid($homeDir |
50700 | 4f 77 6e 65 72 49 64 29 3b 0a 69 66 20 28 69 73 5f 61 72 72 61 79 28 24 68 6f 6d 65 4f 77 6e 65 | OwnerId);.if.(is_array($homeOwne |
50720 | 72 29 20 26 26 20 69 73 73 65 74 28 24 63 6f 6d 70 6f 73 65 72 55 73 65 72 5b 27 6e 61 6d 65 27 | r).&&.isset($composerUser['name' |
50740 | 5d 2c 20 24 68 6f 6d 65 4f 77 6e 65 72 5b 27 6e 61 6d 65 27 5d 29 20 26 26 20 24 63 6f 6d 70 6f | ],.$homeOwner['name']).&&.$compo |
50760 | 73 65 72 55 73 65 72 5b 27 6e 61 6d 65 27 5d 20 21 3d 3d 20 24 68 6f 6d 65 4f 77 6e 65 72 5b 27 | serUser['name'].!==.$homeOwner[' |
50780 | 6e 61 6d 65 27 5d 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 77 61 72 6e | name']).{.$io->writeError('<warn |
507a0 | 69 6e 67 3e 59 6f 75 20 61 72 65 20 72 75 6e 6e 69 6e 67 20 43 6f 6d 70 6f 73 65 72 20 61 73 20 | ing>You.are.running.Composer.as. |
507c0 | 22 27 2e 24 63 6f 6d 70 6f 73 65 72 55 73 65 72 5b 27 6e 61 6d 65 27 5d 2e 27 22 2c 20 77 68 69 | "'.$composerUser['name'].'",.whi |
507e0 | 6c 65 20 22 27 2e 24 68 6f 6d 65 2e 27 22 20 69 73 20 6f 77 6e 65 64 20 62 79 20 22 27 2e 24 68 | le."'.$home.'".is.owned.by."'.$h |
50800 | 6f 6d 65 4f 77 6e 65 72 5b 27 6e 61 6d 65 27 5d 2e 27 22 3c 2f 77 61 72 6e 69 6e 67 3e 27 29 3b | omeOwner['name'].'"</warning>'); |
50820 | 0a 7d 0a 7d 0a 7d 0a 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 72 | .}.}.}..if.($input->getOption('r |
50840 | 6f 6c 6c 62 61 63 6b 27 29 29 20 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 72 6f 6c 6c 62 | ollback')).{.return.$this->rollb |
50860 | 61 63 6b 28 24 6f 75 74 70 75 74 2c 20 24 72 6f 6c 6c 62 61 63 6b 44 69 72 2c 20 24 6c 6f 63 61 | ack($output,.$rollbackDir,.$loca |
50880 | 6c 46 69 6c 65 6e 61 6d 65 29 3b 0a 7d 0a 0a 24 6c 61 74 65 73 74 20 3d 20 24 76 65 72 73 69 6f | lFilename);.}..$latest.=.$versio |
508a0 | 6e 73 55 74 69 6c 2d 3e 67 65 74 4c 61 74 65 73 74 28 29 3b 0a 24 6c 61 74 65 73 74 53 74 61 62 | nsUtil->getLatest();.$latestStab |
508c0 | 6c 65 20 3d 20 24 76 65 72 73 69 6f 6e 73 55 74 69 6c 2d 3e 67 65 74 4c 61 74 65 73 74 28 27 73 | le.=.$versionsUtil->getLatest('s |
508e0 | 74 61 62 6c 65 27 29 3b 0a 74 72 79 20 7b 0a 24 6c 61 74 65 73 74 50 72 65 76 69 65 77 20 3d 20 | table');.try.{.$latestPreview.=. |
50900 | 24 76 65 72 73 69 6f 6e 73 55 74 69 6c 2d 3e 67 65 74 4c 61 74 65 73 74 28 27 70 72 65 76 69 65 | $versionsUtil->getLatest('previe |
50920 | 77 27 29 3b 0a 7d 20 63 61 74 63 68 20 28 5c 55 6e 65 78 70 65 63 74 65 64 56 61 6c 75 65 45 78 | w');.}.catch.(\UnexpectedValueEx |
50940 | 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 24 6c 61 74 65 73 74 50 72 65 76 69 65 77 20 3d 20 24 | ception.$e).{.$latestPreview.=.$ |
50960 | 6c 61 74 65 73 74 53 74 61 62 6c 65 3b 0a 7d 0a 24 6c 61 74 65 73 74 56 65 72 73 69 6f 6e 20 3d | latestStable;.}.$latestVersion.= |
50980 | 20 24 6c 61 74 65 73 74 5b 27 76 65 72 73 69 6f 6e 27 5d 3b 0a 24 75 70 64 61 74 65 56 65 72 73 | .$latest['version'];.$updateVers |
509a0 | 69 6f 6e 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 41 72 67 75 6d 65 6e 74 28 27 76 65 72 73 69 | ion.=.$input->getArgument('versi |
509c0 | 6f 6e 27 29 20 3f 3f 20 24 6c 61 74 65 73 74 56 65 72 73 69 6f 6e 3b 0a 24 63 75 72 72 65 6e 74 | on').??.$latestVersion;.$current |
509e0 | 4d 61 6a 6f 72 56 65 72 73 69 6f 6e 20 3d 20 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 28 27 7b 5e | MajorVersion.=.Preg::replace('{^ |
50a00 | 28 5c 64 2b 29 2e 2a 7d 27 2c 20 27 24 31 27 2c 20 43 6f 6d 70 6f 73 65 72 3a 3a 67 65 74 56 65 | (\d+).*}',.'$1',.Composer::getVe |
50a20 | 72 73 69 6f 6e 28 29 29 3b 0a 24 75 70 64 61 74 65 4d 61 6a 6f 72 56 65 72 73 69 6f 6e 20 3d 20 | rsion());.$updateMajorVersion.=. |
50a40 | 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 28 27 7b 5e 28 5c 64 2b 29 2e 2a 7d 27 2c 20 27 24 31 27 | Preg::replace('{^(\d+).*}',.'$1' |
50a60 | 2c 20 24 75 70 64 61 74 65 56 65 72 73 69 6f 6e 29 3b 0a 24 70 72 65 76 69 65 77 4d 61 6a 6f 72 | ,.$updateVersion);.$previewMajor |
50a80 | 56 65 72 73 69 6f 6e 20 3d 20 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 28 27 7b 5e 28 5c 64 2b 29 | Version.=.Preg::replace('{^(\d+) |
50aa0 | 2e 2a 7d 27 2c 20 27 24 31 27 2c 20 24 6c 61 74 65 73 74 50 72 65 76 69 65 77 5b 27 76 65 72 73 | .*}',.'$1',.$latestPreview['vers |
50ac0 | 69 6f 6e 27 5d 29 3b 0a 0a 69 66 20 28 24 76 65 72 73 69 6f 6e 73 55 74 69 6c 2d 3e 67 65 74 43 | ion']);..if.($versionsUtil->getC |
50ae0 | 68 61 6e 6e 65 6c 28 29 20 3d 3d 3d 20 27 73 74 61 62 6c 65 27 20 26 26 20 6e 75 6c 6c 20 3d 3d | hannel().===.'stable'.&&.null.== |
50b00 | 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 41 72 67 75 6d 65 6e 74 28 27 76 65 72 73 69 6f 6e 27 29 | =.$input->getArgument('version') |
50b20 | 29 20 7b 0a 0a 0a 69 66 20 28 24 63 75 72 72 65 6e 74 4d 61 6a 6f 72 56 65 72 73 69 6f 6e 20 3c | ).{...if.($currentMajorVersion.< |
50b40 | 20 24 75 70 64 61 74 65 4d 61 6a 6f 72 56 65 72 73 69 6f 6e 29 20 7b 0a 24 73 6b 69 70 70 65 64 | .$updateMajorVersion).{.$skipped |
50b60 | 56 65 72 73 69 6f 6e 20 3d 20 24 75 70 64 61 74 65 56 65 72 73 69 6f 6e 3b 0a 0a 24 76 65 72 73 | Version.=.$updateVersion;..$vers |
50b80 | 69 6f 6e 73 55 74 69 6c 2d 3e 73 65 74 43 68 61 6e 6e 65 6c 28 24 63 75 72 72 65 6e 74 4d 61 6a | ionsUtil->setChannel($currentMaj |
50ba0 | 6f 72 56 65 72 73 69 6f 6e 29 3b 0a 0a 24 6c 61 74 65 73 74 20 3d 20 24 76 65 72 73 69 6f 6e 73 | orVersion);..$latest.=.$versions |
50bc0 | 55 74 69 6c 2d 3e 67 65 74 4c 61 74 65 73 74 28 29 3b 0a 24 6c 61 74 65 73 74 53 74 61 62 6c 65 | Util->getLatest();.$latestStable |
50be0 | 20 3d 20 24 76 65 72 73 69 6f 6e 73 55 74 69 6c 2d 3e 67 65 74 4c 61 74 65 73 74 28 27 73 74 61 | .=.$versionsUtil->getLatest('sta |
50c00 | 62 6c 65 27 29 3b 0a 24 6c 61 74 65 73 74 56 65 72 73 69 6f 6e 20 3d 20 24 6c 61 74 65 73 74 5b | ble');.$latestVersion.=.$latest[ |
50c20 | 27 76 65 72 73 69 6f 6e 27 5d 3b 0a 24 75 70 64 61 74 65 56 65 72 73 69 6f 6e 20 3d 20 24 6c 61 | 'version'];.$updateVersion.=.$la |
50c40 | 74 65 73 74 56 65 72 73 69 6f 6e 3b 0a 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c | testVersion;..$io->writeError('< |
50c60 | 77 61 72 6e 69 6e 67 3e 41 20 6e 65 77 20 73 74 61 62 6c 65 20 6d 61 6a 6f 72 20 76 65 72 73 69 | warning>A.new.stable.major.versi |
50c80 | 6f 6e 20 6f 66 20 43 6f 6d 70 6f 73 65 72 20 69 73 20 61 76 61 69 6c 61 62 6c 65 20 28 27 2e 24 | on.of.Composer.is.available.('.$ |
50ca0 | 73 6b 69 70 70 65 64 56 65 72 73 69 6f 6e 2e 27 29 2c 20 72 75 6e 20 22 63 6f 6d 70 6f 73 65 72 | skippedVersion.'),.run."composer |
50cc0 | 20 73 65 6c 66 2d 75 70 64 61 74 65 20 2d 2d 27 2e 24 75 70 64 61 74 65 4d 61 6a 6f 72 56 65 72 | .self-update.--'.$updateMajorVer |
50ce0 | 73 69 6f 6e 2e 27 22 20 74 6f 20 75 70 64 61 74 65 20 74 6f 20 69 74 2e 20 53 65 65 20 61 6c 73 | sion.'".to.update.to.it..See.als |
50d00 | 6f 20 68 74 74 70 73 3a 2f 2f 67 65 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 67 2f 27 2e 24 75 70 64 | o.https://getcomposer.org/'.$upd |
50d20 | 61 74 65 4d 61 6a 6f 72 56 65 72 73 69 6f 6e 2e 27 3c 2f 77 61 72 6e 69 6e 67 3e 27 29 3b 0a 7d | ateMajorVersion.'</warning>');.} |
50d40 | 20 65 6c 73 65 69 66 20 28 24 63 75 72 72 65 6e 74 4d 61 6a 6f 72 56 65 72 73 69 6f 6e 20 3c 20 | .elseif.($currentMajorVersion.<. |
50d60 | 24 70 72 65 76 69 65 77 4d 61 6a 6f 72 56 65 72 73 69 6f 6e 29 20 7b 0a 0a 24 69 6f 2d 3e 77 72 | $previewMajorVersion).{..$io->wr |
50d80 | 69 74 65 45 72 72 6f 72 28 27 3c 77 61 72 6e 69 6e 67 3e 41 20 70 72 65 76 69 65 77 20 72 65 6c | iteError('<warning>A.preview.rel |
50da0 | 65 61 73 65 20 6f 66 20 74 68 65 20 6e 65 78 74 20 6d 61 6a 6f 72 20 76 65 72 73 69 6f 6e 20 6f | ease.of.the.next.major.version.o |
50dc0 | 66 20 43 6f 6d 70 6f 73 65 72 20 69 73 20 61 76 61 69 6c 61 62 6c 65 20 28 27 2e 24 6c 61 74 65 | f.Composer.is.available.('.$late |
50de0 | 73 74 50 72 65 76 69 65 77 5b 27 76 65 72 73 69 6f 6e 27 5d 2e 27 29 2c 20 72 75 6e 20 22 63 6f | stPreview['version'].'),.run."co |
50e00 | 6d 70 6f 73 65 72 20 73 65 6c 66 2d 75 70 64 61 74 65 20 2d 2d 70 72 65 76 69 65 77 22 20 74 6f | mposer.self-update.--preview".to |
50e20 | 20 67 69 76 65 20 69 74 20 61 20 74 72 79 2e 20 53 65 65 20 61 6c 73 6f 20 68 74 74 70 73 3a 2f | .give.it.a.try..See.also.https:/ |
50e40 | 2f 67 69 74 68 75 62 2e 63 6f 6d 2f 63 6f 6d 70 6f 73 65 72 2f 63 6f 6d 70 6f 73 65 72 2f 72 65 | /github.com/composer/composer/re |
50e60 | 6c 65 61 73 65 73 20 66 6f 72 20 63 68 61 6e 67 65 6c 6f 67 73 2e 3c 2f 77 61 72 6e 69 6e 67 3e | leases.for.changelogs.</warning> |
50e80 | 27 29 3b 0a 7d 0a 7d 0a 0a 24 65 66 66 65 63 74 69 76 65 43 68 61 6e 6e 65 6c 20 3d 20 24 72 65 | ');.}.}..$effectiveChannel.=.$re |
50ea0 | 71 75 65 73 74 65 64 43 68 61 6e 6e 65 6c 20 3d 3d 3d 20 6e 75 6c 6c 20 3f 20 24 76 65 72 73 69 | questedChannel.===.null.?.$versi |
50ec0 | 6f 6e 73 55 74 69 6c 2d 3e 67 65 74 43 68 61 6e 6e 65 6c 28 29 20 3a 20 24 72 65 71 75 65 73 74 | onsUtil->getChannel().:.$request |
50ee0 | 65 64 43 68 61 6e 6e 65 6c 3b 0a 69 66 20 28 69 73 5f 6e 75 6d 65 72 69 63 28 24 65 66 66 65 63 | edChannel;.if.(is_numeric($effec |
50f00 | 74 69 76 65 43 68 61 6e 6e 65 6c 29 20 26 26 20 73 74 72 70 6f 73 28 24 6c 61 74 65 73 74 53 74 | tiveChannel).&&.strpos($latestSt |
50f20 | 61 62 6c 65 5b 27 76 65 72 73 69 6f 6e 27 5d 2c 20 24 65 66 66 65 63 74 69 76 65 43 68 61 6e 6e | able['version'],.$effectiveChann |
50f40 | 65 6c 29 20 21 3d 3d 20 30 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 77 | el).!==.0).{.$io->writeError('<w |
50f60 | 61 72 6e 69 6e 67 3e 57 61 72 6e 69 6e 67 3a 20 59 6f 75 20 66 6f 72 63 65 64 20 74 68 65 20 69 | arning>Warning:.You.forced.the.i |
50f80 | 6e 73 74 61 6c 6c 20 6f 66 20 27 2e 24 6c 61 74 65 73 74 56 65 72 73 69 6f 6e 2e 27 20 76 69 61 | nstall.of.'.$latestVersion.'.via |
50fa0 | 20 2d 2d 27 2e 24 65 66 66 65 63 74 69 76 65 43 68 61 6e 6e 65 6c 2e 27 2c 20 62 75 74 20 27 2e | .--'.$effectiveChannel.',.but.'. |
50fc0 | 24 6c 61 74 65 73 74 53 74 61 62 6c 65 5b 27 76 65 72 73 69 6f 6e 27 5d 2e 27 20 69 73 20 74 68 | $latestStable['version'].'.is.th |
50fe0 | 65 20 6c 61 74 65 73 74 20 73 74 61 62 6c 65 20 76 65 72 73 69 6f 6e 2e 20 55 70 64 61 74 69 6e | e.latest.stable.version..Updatin |
51000 | 67 20 74 6f 20 69 74 20 76 69 61 20 63 6f 6d 70 6f 73 65 72 20 73 65 6c 66 2d 75 70 64 61 74 65 | g.to.it.via.composer.self-update |
51020 | 20 2d 2d 73 74 61 62 6c 65 20 69 73 20 72 65 63 6f 6d 6d 65 6e 64 65 64 2e 3c 2f 77 61 72 6e 69 | .--stable.is.recommended.</warni |
51040 | 6e 67 3e 27 29 3b 0a 7d 0a 69 66 20 28 69 73 73 65 74 28 24 6c 61 74 65 73 74 5b 27 65 6f 6c 27 | ng>');.}.if.(isset($latest['eol' |
51060 | 5d 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 77 61 72 6e 69 6e 67 3e | ])).{.$io->writeError('<warning> |
51080 | 57 61 72 6e 69 6e 67 3a 20 56 65 72 73 69 6f 6e 20 27 2e 24 6c 61 74 65 73 74 56 65 72 73 69 6f | Warning:.Version.'.$latestVersio |
510a0 | 6e 2e 27 20 69 73 20 45 4f 4c 20 2f 20 45 6e 64 20 6f 66 20 4c 69 66 65 2e 20 27 2e 24 6c 61 74 | n.'.is.EOL./.End.of.Life..'.$lat |
510c0 | 65 73 74 53 74 61 62 6c 65 5b 27 76 65 72 73 69 6f 6e 27 5d 2e 27 20 69 73 20 74 68 65 20 6c 61 | estStable['version'].'.is.the.la |
510e0 | 74 65 73 74 20 73 74 61 62 6c 65 20 76 65 72 73 69 6f 6e 2e 20 55 70 64 61 74 69 6e 67 20 74 6f | test.stable.version..Updating.to |
51100 | 20 69 74 20 76 69 61 20 63 6f 6d 70 6f 73 65 72 20 73 65 6c 66 2d 75 70 64 61 74 65 20 2d 2d 73 | .it.via.composer.self-update.--s |
51120 | 74 61 62 6c 65 20 69 73 20 72 65 63 6f 6d 6d 65 6e 64 65 64 2e 3c 2f 77 61 72 6e 69 6e 67 3e 27 | table.is.recommended.</warning>' |
51140 | 29 3b 0a 7d 0a 0a 69 66 20 28 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b 5e 5b 30 2d 39 61 | );.}..if.(Preg::isMatch('{^[0-9a |
51160 | 2d 66 5d 7b 34 30 7d 24 7d 27 2c 20 24 75 70 64 61 74 65 56 65 72 73 69 6f 6e 29 20 26 26 20 24 | -f]{40}$}',.$updateVersion).&&.$ |
51180 | 75 70 64 61 74 65 56 65 72 73 69 6f 6e 20 21 3d 3d 20 24 6c 61 74 65 73 74 56 65 72 73 69 6f 6e | updateVersion.!==.$latestVersion |
511a0 | 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 65 72 72 6f 72 3e 59 6f 75 20 | ).{.$io->writeError('<error>You. |
511c0 | 63 61 6e 20 6e 6f 74 20 75 70 64 61 74 65 20 74 6f 20 61 20 73 70 65 63 69 66 69 63 20 53 48 41 | can.not.update.to.a.specific.SHA |
511e0 | 2d 31 20 61 73 20 74 68 6f 73 65 20 70 68 61 72 73 20 61 72 65 20 6e 6f 74 20 61 76 61 69 6c 61 | -1.as.those.phars.are.not.availa |
51200 | 62 6c 65 20 66 6f 72 20 64 6f 77 6e 6c 6f 61 64 3c 2f 65 72 72 6f 72 3e 27 29 3b 0a 0a 72 65 74 | ble.for.download</error>');..ret |
51220 | 75 72 6e 20 31 3b 0a 7d 0a 0a 24 63 68 61 6e 6e 65 6c 53 74 72 69 6e 67 20 3d 20 24 76 65 72 73 | urn.1;.}..$channelString.=.$vers |
51240 | 69 6f 6e 73 55 74 69 6c 2d 3e 67 65 74 43 68 61 6e 6e 65 6c 28 29 3b 0a 69 66 20 28 69 73 5f 6e | ionsUtil->getChannel();.if.(is_n |
51260 | 75 6d 65 72 69 63 28 24 63 68 61 6e 6e 65 6c 53 74 72 69 6e 67 29 29 20 7b 0a 24 63 68 61 6e 6e | umeric($channelString)).{.$chann |
51280 | 65 6c 53 74 72 69 6e 67 20 2e 3d 20 27 2e 78 27 3b 0a 7d 0a 0a 69 66 20 28 43 6f 6d 70 6f 73 65 | elString..=.'.x';.}..if.(Compose |
512a0 | 72 3a 3a 56 45 52 53 49 4f 4e 20 3d 3d 3d 20 24 75 70 64 61 74 65 56 65 72 73 69 6f 6e 29 20 7b | r::VERSION.===.$updateVersion).{ |
512c0 | 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 0a 73 70 72 69 6e 74 66 28 0a 27 3c 69 6e 66 | .$io->writeError(.sprintf(.'<inf |
512e0 | 6f 3e 59 6f 75 20 61 72 65 20 61 6c 72 65 61 64 79 20 75 73 69 6e 67 20 74 68 65 20 6c 61 74 65 | o>You.are.already.using.the.late |
51300 | 73 74 20 61 76 61 69 6c 61 62 6c 65 20 43 6f 6d 70 6f 73 65 72 20 76 65 72 73 69 6f 6e 20 25 73 | st.available.Composer.version.%s |
51320 | 20 28 25 73 20 63 68 61 6e 6e 65 6c 29 2e 3c 2f 69 6e 66 6f 3e 27 2c 0a 24 75 70 64 61 74 65 56 | .(%s.channel).</info>',.$updateV |
51340 | 65 72 73 69 6f 6e 2c 0a 24 63 68 61 6e 6e 65 6c 53 74 72 69 6e 67 0a 29 0a 29 3b 0a 0a 0a 69 66 | ersion,.$channelString.).);...if |
51360 | 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 63 6c 65 61 6e 2d 62 61 63 6b 75 | .($input->getOption('clean-backu |
51380 | 70 73 27 29 29 20 7b 0a 24 74 68 69 73 2d 3e 63 6c 65 61 6e 42 61 63 6b 75 70 73 28 24 72 6f 6c | ps')).{.$this->cleanBackups($rol |
513a0 | 6c 62 61 63 6b 44 69 72 2c 20 24 74 68 69 73 2d 3e 67 65 74 4c 61 73 74 42 61 63 6b 75 70 56 65 | lbackDir,.$this->getLastBackupVe |
513c0 | 72 73 69 6f 6e 28 24 72 6f 6c 6c 62 61 63 6b 44 69 72 29 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 | rsion($rollbackDir));.}..return. |
513e0 | 30 3b 0a 7d 0a 0a 24 74 65 6d 70 46 69 6c 65 6e 61 6d 65 20 3d 20 24 74 6d 70 44 69 72 20 2e 20 | 0;.}..$tempFilename.=.$tmpDir... |
51400 | 27 2f 27 20 2e 20 62 61 73 65 6e 61 6d 65 28 24 6c 6f 63 61 6c 46 69 6c 65 6e 61 6d 65 2c 20 27 | '/'...basename($localFilename,.' |
51420 | 2e 70 68 61 72 27 29 2e 27 2d 74 65 6d 70 27 2e 72 61 6e 64 6f 6d 5f 69 6e 74 28 30 2c 20 31 30 | .phar').'-temp'.random_int(0,.10 |
51440 | 30 30 30 30 30 30 29 2e 27 2e 70 68 61 72 27 3b 0a 24 62 61 63 6b 75 70 46 69 6c 65 20 3d 20 73 | 000000).'.phar';.$backupFile.=.s |
51460 | 70 72 69 6e 74 66 28 0a 27 25 73 2f 25 73 2d 25 73 25 73 27 2c 0a 24 72 6f 6c 6c 62 61 63 6b 44 | printf(.'%s/%s-%s%s',.$rollbackD |
51480 | 69 72 2c 0a 73 74 72 74 72 28 43 6f 6d 70 6f 73 65 72 3a 3a 52 45 4c 45 41 53 45 5f 44 41 54 45 | ir,.strtr(Composer::RELEASE_DATE |
514a0 | 2c 20 27 20 3a 27 2c 20 27 5f 2d 27 29 2c 0a 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 28 27 7b 5e | ,.'.:',.'_-'),.Preg::replace('{^ |
514c0 | 28 5b 30 2d 39 61 2d 66 5d 7b 37 7d 29 5b 30 2d 39 61 2d 66 5d 7b 33 33 7d 24 7d 27 2c 20 27 24 | ([0-9a-f]{7})[0-9a-f]{33}$}',.'$ |
514e0 | 31 27 2c 20 43 6f 6d 70 6f 73 65 72 3a 3a 56 45 52 53 49 4f 4e 29 2c 0a 73 65 6c 66 3a 3a 4f 4c | 1',.Composer::VERSION),.self::OL |
51500 | 44 5f 49 4e 53 54 41 4c 4c 5f 45 58 54 0a 29 3b 0a 0a 24 75 70 64 61 74 69 6e 67 54 6f 54 61 67 | D_INSTALL_EXT.);..$updatingToTag |
51520 | 20 3d 20 21 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b 5e 5b 30 2d 39 61 2d 66 5d 7b 34 30 | .=.!Preg::isMatch('{^[0-9a-f]{40 |
51540 | 7d 24 7d 27 2c 20 24 75 70 64 61 74 65 56 65 72 73 69 6f 6e 29 3b 0a 0a 24 69 6f 2d 3e 77 72 69 | }$}',.$updateVersion);..$io->wri |
51560 | 74 65 28 73 70 72 69 6e 74 66 28 22 55 70 67 72 61 64 69 6e 67 20 74 6f 20 76 65 72 73 69 6f 6e | te(sprintf("Upgrading.to.version |
51580 | 20 3c 69 6e 66 6f 3e 25 73 3c 2f 69 6e 66 6f 3e 20 28 25 73 20 63 68 61 6e 6e 65 6c 29 2e 22 2c | .<info>%s</info>.(%s.channel).", |
515a0 | 20 24 75 70 64 61 74 65 56 65 72 73 69 6f 6e 2c 20 24 63 68 61 6e 6e 65 6c 53 74 72 69 6e 67 29 | .$updateVersion,.$channelString) |
515c0 | 29 3b 0a 24 72 65 6d 6f 74 65 46 69 6c 65 6e 61 6d 65 20 3d 20 24 62 61 73 65 55 72 6c 20 2e 20 | );.$remoteFilename.=.$baseUrl... |
515e0 | 28 24 75 70 64 61 74 69 6e 67 54 6f 54 61 67 20 3f 20 22 2f 64 6f 77 6e 6c 6f 61 64 2f 7b 24 75 | ($updatingToTag.?."/download/{$u |
51600 | 70 64 61 74 65 56 65 72 73 69 6f 6e 7d 2f 63 6f 6d 70 6f 73 65 72 2e 70 68 61 72 22 20 3a 20 27 | pdateVersion}/composer.phar".:.' |
51620 | 2f 63 6f 6d 70 6f 73 65 72 2e 70 68 61 72 27 29 3b 0a 74 72 79 20 7b 0a 24 73 69 67 6e 61 74 75 | /composer.phar');.try.{.$signatu |
51640 | 72 65 20 3d 20 24 68 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 2d 3e 67 65 74 28 24 72 65 6d 6f 74 | re.=.$httpDownloader->get($remot |
51660 | 65 46 69 6c 65 6e 61 6d 65 2e 27 2e 73 69 67 27 29 2d 3e 67 65 74 42 6f 64 79 28 29 3b 0a 7d 20 | eFilename.'.sig')->getBody();.}. |
51680 | 63 61 74 63 68 20 28 54 72 61 6e 73 70 6f 72 74 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a | catch.(TransportException.$e).{. |
516a0 | 69 66 20 28 24 65 2d 3e 67 65 74 53 74 61 74 75 73 43 6f 64 65 28 29 20 3d 3d 3d 20 34 30 34 29 | if.($e->getStatusCode().===.404) |
516c0 | 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 | .{.throw.new.\InvalidArgumentExc |
516e0 | 65 70 74 69 6f 6e 28 27 56 65 72 73 69 6f 6e 20 22 27 2e 24 75 70 64 61 74 65 56 65 72 73 69 6f | eption('Version."'.$updateVersio |
51700 | 6e 2e 27 22 20 63 6f 75 6c 64 20 6e 6f 74 20 62 65 20 66 6f 75 6e 64 2e 27 2c 20 30 2c 20 24 65 | n.'".could.not.be.found.',.0,.$e |
51720 | 29 3b 0a 7d 0a 74 68 72 6f 77 20 24 65 3b 0a 7d 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 | );.}.throw.$e;.}.$io->writeError |
51740 | 28 27 20 20 20 27 2c 20 66 61 6c 73 65 29 3b 0a 24 68 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 2d | ('...',.false);.$httpDownloader- |
51760 | 3e 63 6f 70 79 28 24 72 65 6d 6f 74 65 46 69 6c 65 6e 61 6d 65 2c 20 24 74 65 6d 70 46 69 6c 65 | >copy($remoteFilename,.$tempFile |
51780 | 6e 61 6d 65 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 27 29 3b 0a 0a 69 66 20 | name);.$io->writeError('');..if. |
517a0 | 28 21 66 69 6c 65 5f 65 78 69 73 74 73 28 24 74 65 6d 70 46 69 6c 65 6e 61 6d 65 29 20 7c 7c 20 | (!file_exists($tempFilename).||. |
517c0 | 6e 75 6c 6c 20 3d 3d 3d 20 24 73 69 67 6e 61 74 75 72 65 20 7c 7c 20 27 27 20 3d 3d 3d 20 24 73 | null.===.$signature.||.''.===.$s |
517e0 | 69 67 6e 61 74 75 72 65 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 65 72 | ignature).{.$io->writeError('<er |
51800 | 72 6f 72 3e 54 68 65 20 64 6f 77 6e 6c 6f 61 64 20 6f 66 20 74 68 65 20 6e 65 77 20 63 6f 6d 70 | ror>The.download.of.the.new.comp |
51820 | 6f 73 65 72 20 76 65 72 73 69 6f 6e 20 66 61 69 6c 65 64 20 66 6f 72 20 61 6e 20 75 6e 65 78 70 | oser.version.failed.for.an.unexp |
51840 | 65 63 74 65 64 20 72 65 61 73 6f 6e 3c 2f 65 72 72 6f 72 3e 27 29 3b 0a 0a 72 65 74 75 72 6e 20 | ected.reason</error>');..return. |
51860 | 31 3b 0a 7d 0a 0a 0a 69 66 20 28 21 65 78 74 65 6e 73 69 6f 6e 5f 6c 6f 61 64 65 64 28 27 6f 70 | 1;.}...if.(!extension_loaded('op |
51880 | 65 6e 73 73 6c 27 29 20 26 26 20 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 64 69 73 61 62 6c 65 | enssl').&&.$config->get('disable |
518a0 | 2d 74 6c 73 27 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 77 61 72 6e | -tls')).{.$io->writeError('<warn |
518c0 | 69 6e 67 3e 53 6b 69 70 70 69 6e 67 20 70 68 61 72 20 73 69 67 6e 61 74 75 72 65 20 76 65 72 69 | ing>Skipping.phar.signature.veri |
518e0 | 66 69 63 61 74 69 6f 6e 20 61 73 20 79 6f 75 20 68 61 76 65 20 64 69 73 61 62 6c 65 64 20 4f 70 | fication.as.you.have.disabled.Op |
51900 | 65 6e 53 53 4c 20 76 69 61 20 63 6f 6e 66 69 67 2e 64 69 73 61 62 6c 65 2d 74 6c 73 3c 2f 77 61 | enSSL.via.config.disable-tls</wa |
51920 | 72 6e 69 6e 67 3e 27 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 69 66 20 28 21 65 78 74 65 6e 73 69 6f | rning>');.}.else.{.if.(!extensio |
51940 | 6e 5f 6c 6f 61 64 65 64 28 27 6f 70 65 6e 73 73 6c 27 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 | n_loaded('openssl')).{.throw.new |
51960 | 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 54 68 65 20 6f 70 65 6e 73 73 6c 20 | .\RuntimeException('The.openssl. |
51980 | 65 78 74 65 6e 73 69 6f 6e 20 69 73 20 72 65 71 75 69 72 65 64 20 66 6f 72 20 70 68 61 72 20 73 | extension.is.required.for.phar.s |
519a0 | 69 67 6e 61 74 75 72 65 73 20 74 6f 20 62 65 20 76 65 72 69 66 69 65 64 20 62 75 74 20 69 74 20 | ignatures.to.be.verified.but.it. |
519c0 | 69 73 20 6e 6f 74 20 61 76 61 69 6c 61 62 6c 65 2e 20 27 0a 2e 20 27 49 66 20 79 6f 75 20 63 61 | is.not.available..'...'If.you.ca |
519e0 | 6e 20 6e 6f 74 20 65 6e 61 62 6c 65 20 74 68 65 20 6f 70 65 6e 73 73 6c 20 65 78 74 65 6e 73 69 | n.not.enable.the.openssl.extensi |
51a00 | 6f 6e 2c 20 79 6f 75 20 63 61 6e 20 64 69 73 61 62 6c 65 20 74 68 69 73 20 65 72 72 6f 72 2c 20 | on,.you.can.disable.this.error,. |
51a20 | 61 74 20 79 6f 75 72 20 6f 77 6e 20 72 69 73 6b 2c 20 62 79 20 73 65 74 74 69 6e 67 20 74 68 65 | at.your.own.risk,.by.setting.the |
51a40 | 20 5c 27 64 69 73 61 62 6c 65 2d 74 6c 73 5c 27 20 6f 70 74 69 6f 6e 20 74 6f 20 74 72 75 65 2e | .\'disable-tls\'.option.to.true. |
51a60 | 27 29 3b 0a 7d 0a 0a 24 73 69 67 46 69 6c 65 20 3d 20 27 66 69 6c 65 3a 2f 2f 27 2e 24 68 6f 6d | ');.}..$sigFile.=.'file://'.$hom |
51a80 | 65 2e 27 2f 27 20 2e 20 28 24 75 70 64 61 74 69 6e 67 54 6f 54 61 67 20 3f 20 27 6b 65 79 73 2e | e.'/'...($updatingToTag.?.'keys. |
51aa0 | 74 61 67 73 2e 70 75 62 27 20 3a 20 27 6b 65 79 73 2e 64 65 76 2e 70 75 62 27 29 3b 0a 69 66 20 | tags.pub'.:.'keys.dev.pub');.if. |
51ac0 | 28 21 66 69 6c 65 5f 65 78 69 73 74 73 28 24 73 69 67 46 69 6c 65 29 29 20 7b 0a 66 69 6c 65 5f | (!file_exists($sigFile)).{.file_ |
51ae0 | 70 75 74 5f 63 6f 6e 74 65 6e 74 73 28 0a 24 68 6f 6d 65 2e 27 2f 6b 65 79 73 2e 64 65 76 2e 70 | put_contents(.$home.'/keys.dev.p |
51b00 | 75 62 27 2c 0a 3c 3c 3c 44 45 56 50 55 42 4b 45 59 0a 2d 2d 2d 2d 2d 42 45 47 49 4e 20 50 55 42 | ub',.<<<DEVPUBKEY.-----BEGIN.PUB |
51b20 | 4c 49 43 20 4b 45 59 2d 2d 2d 2d 2d 0a 4d 49 49 43 49 6a 41 4e 42 67 6b 71 68 6b 69 47 39 77 30 | LIC.KEY-----.MIICIjANBgkqhkiG9w0 |
51b40 | 42 41 51 45 46 41 41 4f 43 41 67 38 41 4d 49 49 43 43 67 4b 43 41 67 45 41 6e 42 44 48 6a 5a 53 | BAQEFAAOCAg8AMIICCgKCAgEAnBDHjZS |
51b60 | 36 65 30 5a 4d 6f 4b 33 78 54 44 37 66 0a 46 4e 43 7a 6c 58 6a 58 2f 41 69 65 32 64 69 74 38 51 | 6e0ZMoK3xTD7f.FNCzlXjX/Aie2dit8Q |
51b80 | 58 41 30 33 70 53 72 4f 54 62 61 4d 6e 78 4f 4e 33 68 55 4c 34 37 4c 7a 33 67 31 53 43 36 59 4a | XA03pSrOTbaMnxON3hUL47Lz3g1SC6YJ |
51ba0 | 45 4d 56 48 72 30 7a 59 71 34 65 6c 57 69 0a 69 33 65 63 46 45 67 7a 4c 63 6a 2b 70 5a 4d 35 58 | EMVHr0zYq4elWi.i3ecFEgzLcj+pZM5X |
51bc0 | 36 71 57 75 32 4f 7a 7a 34 76 57 78 33 4a 59 6f 31 2f 61 2f 48 59 64 4f 75 57 39 65 33 6c 77 53 | 6qWu2Ozz4vWx3JYo1/a/HYdOuW9e3lwS |
51be0 | 38 56 74 53 30 41 56 4a 41 2b 55 38 58 30 41 0a 68 5a 6e 42 6d 47 70 6c 74 48 68 4f 38 68 50 4b | 8VtS0AVJA+U8X0A.hZnBmGpltHhO8hPK |
51c00 | 48 67 6b 4a 74 6b 54 55 78 43 68 65 54 63 62 71 6e 34 77 47 48 6c 38 5a 32 53 65 64 69 44 63 50 | HgkJtkTUxCheTcbqn4wGHl8Z2SediDcP |
51c20 | 54 4c 77 71 65 7a 57 4b 55 66 72 59 7a 75 31 66 0a 6f 2f 6a 33 57 46 77 46 73 36 47 74 4b 34 77 | TLwqezWKUfrYzu1f.o/j3WFwFs6GtK4w |
51c40 | 64 59 74 69 58 72 2b 79 73 70 42 5a 48 4f 33 79 31 75 64 66 38 65 46 46 47 63 62 32 56 33 45 61 | dYtiXr+yspBZHO3y1udf8eFFGcb2V3Ea |
51c60 | 4c 4f 72 74 66 75 72 36 58 51 56 69 7a 6a 4f 75 6b 0a 38 6c 77 35 7a 7a 73 65 31 51 70 2f 6b 6c | LOrtfur6XQVizjOuk.8lw5zzse1Qp/kl |
51c80 | 48 71 62 44 52 73 6a 53 7a 4a 36 69 4c 36 46 34 61 79 6e 42 63 36 45 75 71 74 2f 38 63 63 4e 41 | HqbDRsjSzJ6iL6F4aynBc6Euqt/8ccNA |
51ca0 | 49 7a 30 72 4c 6a 4c 68 4f 72 61 65 79 6a 34 65 4e 6e 0a 38 69 6f 6b 77 4d 4b 69 58 70 63 72 51 | Iz0rLjLhOraeyj4eNn.8iokwMKiXpcrQ |
51cc0 | 4c 54 4b 48 2b 52 48 31 4a 43 75 4f 56 78 51 34 33 36 62 4a 77 62 53 73 70 31 56 77 69 71 66 74 | LTKH+RH1JCuOVxQ436bJwbSsp1Vwiqft |
51ce0 | 50 51 69 65 4e 2b 74 7a 71 79 2b 45 69 48 4a 4a 6d 47 66 0a 54 42 41 62 57 63 6e 63 69 63 43 6b | PQieN+tzqy+EiHJJmGf.TBAbWcncicCk |
51d00 | 39 71 32 6d 64 2b 41 6d 68 4e 62 76 48 4f 34 50 57 62 62 7a 39 54 7a 43 37 48 4a 62 34 36 30 6a | 9q2md+AmhNbvHO4PWbbz9TzC7HJb460j |
51d20 | 79 57 65 75 4d 45 76 77 33 67 4e 49 70 45 6f 32 6a 59 61 39 0a 70 4d 56 36 63 56 71 6e 53 61 2b | yWeuMEvw3gNIpEo2jYa9.pMV6cVqnSa+ |
51d40 | 77 4f 63 30 44 37 70 43 39 61 36 62 6e 65 30 62 76 4c 63 6d 33 53 2b 77 36 49 35 69 44 42 33 6c | wOc0D7pC9a6bne0bvLcm3S+w6I5iDB3l |
51d60 | 5a 73 62 33 41 39 55 74 52 69 53 50 37 61 47 53 6f 37 44 37 32 0a 38 74 43 38 2b 63 49 67 5a 63 | Zsb3A9UtRiSP7aGSo7D72.8tC8+cIgZc |
51d80 | 49 37 6b 39 76 6a 76 4f 71 48 2b 64 37 73 64 4f 55 32 79 50 43 6e 52 59 36 77 46 68 36 32 2f 67 | I7k9vjvOqH+d7sdOU2yPCnRY6wFh62/g |
51da0 | 38 62 44 6e 55 70 72 35 36 6e 5a 4e 31 47 38 39 47 77 4d 34 64 34 0a 72 2f 54 55 37 42 51 51 49 | 8bDnUpr56nZN1G89GwM4d4.r/TU7BQQI |
51dc0 | 7a 73 5a 67 41 69 71 4f 47 58 76 56 6b 6c 49 67 41 4d 69 56 30 69 75 63 67 66 33 72 4e 42 4c 6a | zsZgAiqOGXvVklIgAMiV0iucgf3rNBLj |
51de0 | 6a 65 4e 45 77 4e 53 54 54 47 39 46 30 43 74 51 2b 37 4a 4c 77 61 45 0a 77 53 45 75 41 75 52 6d | jeNEwNSTTG9F0CtQ+7JLwaE.wSEuAuRm |
51e00 | 2b 70 52 71 69 38 42 52 6e 51 2f 47 4b 55 63 43 41 77 45 41 41 51 3d 3d 0a 2d 2d 2d 2d 2d 45 4e | +pRqi8BRnQ/GKUcCAwEAAQ==.-----EN |
51e20 | 44 20 50 55 42 4c 49 43 20 4b 45 59 2d 2d 2d 2d 2d 0a 44 45 56 50 55 42 4b 45 59 0a 29 3b 0a 0a | D.PUBLIC.KEY-----.DEVPUBKEY.);.. |
51e40 | 66 69 6c 65 5f 70 75 74 5f 63 6f 6e 74 65 6e 74 73 28 0a 24 68 6f 6d 65 2e 27 2f 6b 65 79 73 2e | file_put_contents(.$home.'/keys. |
51e60 | 74 61 67 73 2e 70 75 62 27 2c 0a 3c 3c 3c 54 41 47 53 50 55 42 4b 45 59 0a 2d 2d 2d 2d 2d 42 45 | tags.pub',.<<<TAGSPUBKEY.-----BE |
51e80 | 47 49 4e 20 50 55 42 4c 49 43 20 4b 45 59 2d 2d 2d 2d 2d 0a 4d 49 49 43 49 6a 41 4e 42 67 6b 71 | GIN.PUBLIC.KEY-----.MIICIjANBgkq |
51ea0 | 68 6b 69 47 39 77 30 42 41 51 45 46 41 41 4f 43 41 67 38 41 4d 49 49 43 43 67 4b 43 41 67 45 41 | hkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA |
51ec0 | 30 56 69 2f 32 4b 36 61 70 43 56 6a 37 36 6e 43 6e 43 6c 32 0a 4d 51 55 50 64 4b 2b 41 39 65 71 | 0Vi/2K6apCVj76nCnCl2.MQUPdK+A9eq |
51ee0 | 6b 59 42 61 63 58 6f 32 77 51 42 59 6d 79 56 6c 58 6d 32 2f 6e 2f 5a 73 58 36 70 43 4c 59 50 51 | kYBacXo2wQBYmyVlXm2/n/ZsX6pCLYPQ |
51f00 | 54 48 79 72 35 6a 58 62 6b 51 7a 42 77 38 53 4b 71 50 64 6c 68 0a 76 41 37 4e 70 62 4d 65 4e 43 | THyr5jXbkQzBw8SKqPdlh.vA7NpbMeNC |
51f20 | 7a 37 77 50 2f 41 6f 62 76 55 58 4d 38 78 51 75 58 4b 62 4d 44 54 59 32 75 5a 34 4f 37 73 4d 2b | z7wP/AobvUXM8xQuXKbMDTY2uZ4O7sM+ |
51f40 | 50 66 47 62 70 74 4b 50 42 47 4c 65 38 5a 38 64 32 73 55 6e 54 4f 0a 62 58 74 58 36 4c 72 6a 31 | PfGbptKPBGLe8Z8d2sUnTO.bXtX6Lrj1 |
51f60 | 33 77 6b 52 74 6f 37 73 74 2f 77 2f 59 70 33 33 52 48 65 39 53 6c 71 6b 69 69 53 34 4d 73 48 31 | 3wkRto7st/w/Yp33RHe9SlqkiiS4MsH1 |
51f80 | 6a 42 6b 63 49 6b 45 48 73 52 61 76 65 5a 7a 65 64 55 61 78 59 30 4d 0a 6d 62 61 30 75 50 68 47 | jBkcIkEHsRaveZzedUaxY0M.mba0uPhG |
51fa0 | 55 49 6e 70 50 7a 45 48 77 72 59 71 42 42 45 74 57 76 50 39 37 74 32 76 74 66 78 38 49 35 71 76 | UInpPzEHwrYqBBEtWvP97t2vtfx8I5qv |
51fc0 | 32 38 6b 68 30 59 36 74 2b 6a 6e 6a 4c 31 55 72 69 64 32 69 75 51 5a 66 0a 6e 6f 43 4d 46 49 4f | 28kh0Y6t+jnjL1Urid2iuQZf.noCMFIO |
51fe0 | 75 34 76 6b 73 4b 35 48 78 4a 78 78 72 4e 30 47 4f 6d 47 6d 77 56 51 6a 4f 4f 74 78 6b 77 69 6b | u4vksK5HxJxxrN0GOmGmwVQjOOtxkwik |
52000 | 4e 69 6f 74 5a 47 50 52 34 4b 73 56 6a 38 4e 6e 42 72 4c 58 37 6f 47 75 4d 0a 6e 51 76 47 63 69 | NiotZGPR4KsVj8NnBrLX7oGuM.nQvGci |
52020 | 69 75 2b 4b 6f 43 32 72 33 48 44 42 72 70 44 65 42 56 64 4f 57 78 44 7a 54 35 52 34 69 49 30 4b | iu+KoC2r3HDBrpDeBVdOWxDzT5R4iI0K |
52040 | 6f 4c 7a 46 68 32 70 4b 71 77 62 59 2b 6f 62 4e 50 53 32 62 6a 2b 32 64 67 4a 0a 72 56 33 56 35 | oLzFh2pKqwbY+obNPS2bj+2dgJ.rV3V5 |
52060 | 4a 6a 72 79 34 32 51 4f 43 42 4e 33 63 38 38 77 55 31 50 4b 66 74 4f 4c 6a 32 45 43 70 65 77 59 | Jjry42QOCBN3c88wU1PKftOLj2ECpewY |
52080 | 36 76 6e 45 34 37 38 49 69 70 69 45 75 37 45 41 64 4b 38 5a 77 6a 32 4c 6d 54 72 0a 52 4b 51 55 | 6vnE478IipiEu7EAdK8Zwj2LmTr.RKQU |
520a0 | 53 61 39 6b 37 67 67 42 6b 59 5a 57 41 65 4f 2f 32 41 67 30 65 79 33 67 32 62 67 37 65 71 6b 2b | Sa9k7ggBkYZWAeO/2Ag0ey3g2bg7eqk+ |
520c0 | 73 48 45 71 35 79 6e 49 58 64 35 6c 68 76 36 74 43 35 50 42 64 48 6c 57 69 70 44 4b 0a 74 6c 32 | sHEq5ynIXd5lhv6tC5PBdHlWipDK.tl2 |
520e0 | 49 78 69 45 6e 65 6a 6e 4f 6d 41 7a 47 56 69 76 45 31 59 47 64 75 59 42 6a 4e 2b 6d 6a 78 44 56 | IxiEnejnOmAzGVivE1YGduYBjN+mjxDV |
52100 | 79 38 4b 47 42 72 6a 6e 7a 31 4a 50 67 41 76 67 64 77 4a 32 64 59 77 34 52 73 63 2f 65 0a 54 7a | y8KGBrjnz1JPgAvgdwJ2dYw4Rsc/e.Tz |
52120 | 43 46 57 47 6b 2f 48 4d 36 61 34 66 30 49 7a 42 57 62 4a 35 6f 74 30 50 49 69 34 61 6d 6b 30 37 | CFWGk/HM6a4f0IzBWbJ5ot0PIi4amk07 |
52140 | 49 6f 74 42 58 44 57 77 71 44 69 51 54 77 79 75 47 43 79 6d 35 45 71 57 51 32 42 44 39 35 0a 52 | IotBXDWwqDiQTwyuGCym5EqWQ2BD95.R |
52160 | 47 76 38 39 42 50 44 2b 32 44 4c 6e 4a 79 73 6e 67 73 76 56 61 55 43 41 77 45 41 41 51 3d 3d 0a | Gv89BPD+2DLnJysngsvVaUCAwEAAQ==. |
52180 | 2d 2d 2d 2d 2d 45 4e 44 20 50 55 42 4c 49 43 20 4b 45 59 2d 2d 2d 2d 2d 0a 54 41 47 53 50 55 42 | -----END.PUBLIC.KEY-----.TAGSPUB |
521a0 | 4b 45 59 0a 29 3b 0a 7d 0a 0a 24 70 75 62 6b 65 79 69 64 20 3d 20 6f 70 65 6e 73 73 6c 5f 70 6b | KEY.);.}..$pubkeyid.=.openssl_pk |
521c0 | 65 79 5f 67 65 74 5f 70 75 62 6c 69 63 28 24 73 69 67 46 69 6c 65 29 3b 0a 69 66 20 28 66 61 6c | ey_get_public($sigFile);.if.(fal |
521e0 | 73 65 20 3d 3d 3d 20 24 70 75 62 6b 65 79 69 64 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 | se.===.$pubkeyid).{.throw.new.\R |
52200 | 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 46 61 69 6c 65 64 20 6c 6f 61 64 69 6e 67 20 | untimeException('Failed.loading. |
52220 | 74 68 65 20 70 75 62 6c 69 63 20 6b 65 79 20 66 72 6f 6d 20 27 2e 24 73 69 67 46 69 6c 65 29 3b | the.public.key.from.'.$sigFile); |
52240 | 0a 7d 0a 24 61 6c 67 6f 20 3d 20 64 65 66 69 6e 65 64 28 27 4f 50 45 4e 53 53 4c 5f 41 4c 47 4f | .}.$algo.=.defined('OPENSSL_ALGO |
52260 | 5f 53 48 41 33 38 34 27 29 20 3f 20 4f 50 45 4e 53 53 4c 5f 41 4c 47 4f 5f 53 48 41 33 38 34 20 | _SHA384').?.OPENSSL_ALGO_SHA384. |
52280 | 3a 20 27 53 48 41 33 38 34 27 3b 0a 69 66 20 28 21 69 6e 5f 61 72 72 61 79 28 27 73 68 61 33 38 | :.'SHA384';.if.(!in_array('sha38 |
522a0 | 34 27 2c 20 61 72 72 61 79 5f 6d 61 70 28 27 73 74 72 74 6f 6c 6f 77 65 72 27 2c 20 6f 70 65 6e | 4',.array_map('strtolower',.open |
522c0 | 73 73 6c 5f 67 65 74 5f 6d 64 5f 6d 65 74 68 6f 64 73 28 29 29 2c 20 74 72 75 65 29 29 20 7b 0a | ssl_get_md_methods()),.true)).{. |
522e0 | 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 53 48 41 | throw.new.\RuntimeException('SHA |
52300 | 33 38 34 20 69 73 20 6e 6f 74 20 73 75 70 70 6f 72 74 65 64 20 62 79 20 79 6f 75 72 20 6f 70 65 | 384.is.not.supported.by.your.ope |
52320 | 6e 73 73 6c 20 65 78 74 65 6e 73 69 6f 6e 2c 20 63 6f 75 6c 64 20 6e 6f 74 20 76 65 72 69 66 79 | nssl.extension,.could.not.verify |
52340 | 20 74 68 65 20 70 68 61 72 20 66 69 6c 65 20 69 6e 74 65 67 72 69 74 79 27 29 3b 0a 7d 0a 24 73 | .the.phar.file.integrity');.}.$s |
52360 | 69 67 6e 61 74 75 72 65 44 61 74 61 20 3d 20 6a 73 6f 6e 5f 64 65 63 6f 64 65 28 24 73 69 67 6e | ignatureData.=.json_decode($sign |
52380 | 61 74 75 72 65 2c 20 74 72 75 65 29 3b 0a 24 73 69 67 6e 61 74 75 72 65 53 68 61 33 38 34 20 3d | ature,.true);.$signatureSha384.= |
523a0 | 20 62 61 73 65 36 34 5f 64 65 63 6f 64 65 28 24 73 69 67 6e 61 74 75 72 65 44 61 74 61 5b 27 73 | .base64_decode($signatureData['s |
523c0 | 68 61 33 38 34 27 5d 2c 20 74 72 75 65 29 3b 0a 69 66 20 28 66 61 6c 73 65 20 3d 3d 3d 20 24 73 | ha384'],.true);.if.(false.===.$s |
523e0 | 69 67 6e 61 74 75 72 65 53 68 61 33 38 34 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e | ignatureSha384).{.throw.new.\Run |
52400 | 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 46 61 69 6c 65 64 20 6c 6f 61 64 69 6e 67 20 74 68 | timeException('Failed.loading.th |
52420 | 65 20 70 68 61 72 20 73 69 67 6e 61 74 75 72 65 20 66 72 6f 6d 20 27 2e 24 72 65 6d 6f 74 65 46 | e.phar.signature.from.'.$remoteF |
52440 | 69 6c 65 6e 61 6d 65 2e 27 2e 73 69 67 2c 20 67 6f 74 20 27 2e 24 73 69 67 6e 61 74 75 72 65 29 | ilename.'.sig,.got.'.$signature) |
52460 | 3b 0a 7d 0a 24 76 65 72 69 66 69 65 64 20 3d 20 31 20 3d 3d 3d 20 6f 70 65 6e 73 73 6c 5f 76 65 | ;.}.$verified.=.1.===.openssl_ve |
52480 | 72 69 66 79 28 28 73 74 72 69 6e 67 29 20 66 69 6c 65 5f 67 65 74 5f 63 6f 6e 74 65 6e 74 73 28 | rify((string).file_get_contents( |
524a0 | 24 74 65 6d 70 46 69 6c 65 6e 61 6d 65 29 2c 20 24 73 69 67 6e 61 74 75 72 65 53 68 61 33 38 34 | $tempFilename),.$signatureSha384 |
524c0 | 2c 20 24 70 75 62 6b 65 79 69 64 2c 20 24 61 6c 67 6f 29 3b 0a 0a 0a 69 66 20 28 50 48 50 5f 56 | ,.$pubkeyid,.$algo);...if.(PHP_V |
524e0 | 45 52 53 49 4f 4e 5f 49 44 20 3c 20 38 30 30 30 30 29 20 7b 0a 0a 6f 70 65 6e 73 73 6c 5f 66 72 | ERSION_ID.<.80000).{..openssl_fr |
52500 | 65 65 5f 6b 65 79 28 24 70 75 62 6b 65 79 69 64 29 3b 0a 7d 0a 0a 69 66 20 28 21 24 76 65 72 69 | ee_key($pubkeyid);.}..if.(!$veri |
52520 | 66 69 65 64 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 | fied).{.throw.new.\RuntimeExcept |
52540 | 69 6f 6e 28 27 54 68 65 20 70 68 61 72 20 73 69 67 6e 61 74 75 72 65 20 64 69 64 20 6e 6f 74 20 | ion('The.phar.signature.did.not. |
52560 | 6d 61 74 63 68 20 74 68 65 20 66 69 6c 65 20 79 6f 75 20 64 6f 77 6e 6c 6f 61 64 65 64 2c 20 74 | match.the.file.you.downloaded,.t |
52580 | 68 69 73 20 6d 65 61 6e 73 20 79 6f 75 72 20 70 75 62 6c 69 63 20 6b 65 79 73 20 61 72 65 20 6f | his.means.your.public.keys.are.o |
525a0 | 75 74 64 61 74 65 64 20 6f 72 20 74 68 61 74 20 74 68 65 20 70 68 61 72 20 66 69 6c 65 20 69 73 | utdated.or.that.the.phar.file.is |
525c0 | 20 63 6f 72 72 75 70 74 2f 68 61 73 20 62 65 65 6e 20 6d 6f 64 69 66 69 65 64 27 29 3b 0a 7d 0a | .corrupt/has.been.modified');.}. |
525e0 | 7d 0a 0a 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 63 6c 65 61 6e | }...if.($input->getOption('clean |
52600 | 2d 62 61 63 6b 75 70 73 27 29 29 20 7b 0a 24 74 68 69 73 2d 3e 63 6c 65 61 6e 42 61 63 6b 75 70 | -backups')).{.$this->cleanBackup |
52620 | 73 28 24 72 6f 6c 6c 62 61 63 6b 44 69 72 29 3b 0a 7d 0a 0a 69 66 20 28 21 24 74 68 69 73 2d 3e | s($rollbackDir);.}..if.(!$this-> |
52640 | 73 65 74 4c 6f 63 61 6c 50 68 61 72 28 24 6c 6f 63 61 6c 46 69 6c 65 6e 61 6d 65 2c 20 24 74 65 | setLocalPhar($localFilename,.$te |
52660 | 6d 70 46 69 6c 65 6e 61 6d 65 2c 20 24 62 61 63 6b 75 70 46 69 6c 65 29 29 20 7b 0a 40 75 6e 6c | mpFilename,.$backupFile)).{.@unl |
52680 | 69 6e 6b 28 24 74 65 6d 70 46 69 6c 65 6e 61 6d 65 29 3b 0a 0a 72 65 74 75 72 6e 20 31 3b 0a 7d | ink($tempFilename);..return.1;.} |
526a0 | 0a 0a 69 66 20 28 66 69 6c 65 5f 65 78 69 73 74 73 28 24 62 61 63 6b 75 70 46 69 6c 65 29 29 20 | ..if.(file_exists($backupFile)). |
526c0 | 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 73 70 72 69 6e 74 66 28 0a 27 55 73 65 20 | {.$io->writeError(sprintf(.'Use. |
526e0 | 3c 69 6e 66 6f 3e 63 6f 6d 70 6f 73 65 72 20 73 65 6c 66 2d 75 70 64 61 74 65 20 2d 2d 72 6f 6c | <info>composer.self-update.--rol |
52700 | 6c 62 61 63 6b 3c 2f 69 6e 66 6f 3e 20 74 6f 20 72 65 74 75 72 6e 20 74 6f 20 76 65 72 73 69 6f | lback</info>.to.return.to.versio |
52720 | 6e 20 3c 63 6f 6d 6d 65 6e 74 3e 25 73 3c 2f 63 6f 6d 6d 65 6e 74 3e 27 2c 0a 43 6f 6d 70 6f 73 | n.<comment>%s</comment>',.Compos |
52740 | 65 72 3a 3a 56 45 52 53 49 4f 4e 0a 29 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 69 6f 2d 3e 77 72 | er::VERSION.));.}.else.{.$io->wr |
52760 | 69 74 65 45 72 72 6f 72 28 27 3c 77 61 72 6e 69 6e 67 3e 41 20 62 61 63 6b 75 70 20 6f 66 20 74 | iteError('<warning>A.backup.of.t |
52780 | 68 65 20 63 75 72 72 65 6e 74 20 76 65 72 73 69 6f 6e 20 63 6f 75 6c 64 20 6e 6f 74 20 62 65 20 | he.current.version.could.not.be. |
527a0 | 77 72 69 74 74 65 6e 20 74 6f 20 27 2e 24 62 61 63 6b 75 70 46 69 6c 65 2e 27 2c 20 6e 6f 20 72 | written.to.'.$backupFile.',.no.r |
527c0 | 6f 6c 6c 62 61 63 6b 20 70 6f 73 73 69 62 6c 65 3c 2f 77 61 72 6e 69 6e 67 3e 27 29 3b 0a 7d 0a | ollback.possible</warning>');.}. |
527e0 | 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 | .return.0;.}.....protected.funct |
52800 | 69 6f 6e 20 66 65 74 63 68 4b 65 79 73 28 49 4f 49 6e 74 65 72 66 61 63 65 20 24 69 6f 2c 20 43 | ion.fetchKeys(IOInterface.$io,.C |
52820 | 6f 6e 66 69 67 20 24 63 6f 6e 66 69 67 29 3a 20 76 6f 69 64 0a 7b 0a 69 66 20 28 21 24 69 6f 2d | onfig.$config):.void.{.if.(!$io- |
52840 | 3e 69 73 49 6e 74 65 72 61 63 74 69 76 65 28 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 | >isInteractive()).{.throw.new.\R |
52860 | 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 50 75 62 6c 69 63 20 6b 65 79 73 20 63 61 6e | untimeException('Public.keys.can |
52880 | 20 6e 6f 74 20 62 65 20 66 65 74 63 68 65 64 20 69 6e 20 6e 6f 6e 2d 69 6e 74 65 72 61 63 74 69 | .not.be.fetched.in.non-interacti |
528a0 | 76 65 20 6d 6f 64 65 2c 20 70 6c 65 61 73 65 20 72 75 6e 20 43 6f 6d 70 6f 73 65 72 20 69 6e 74 | ve.mode,.please.run.Composer.int |
528c0 | 65 72 61 63 74 69 76 65 6c 79 27 29 3b 0a 7d 0a 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 4f 70 65 | eractively');.}..$io->write('Ope |
528e0 | 6e 20 3c 69 6e 66 6f 3e 68 74 74 70 73 3a 2f 2f 63 6f 6d 70 6f 73 65 72 2e 67 69 74 68 75 62 2e | n.<info>https://composer.github. |
52900 | 69 6f 2f 70 75 62 6b 65 79 73 2e 68 74 6d 6c 3c 2f 69 6e 66 6f 3e 20 74 6f 20 66 69 6e 64 20 74 | io/pubkeys.html</info>.to.find.t |
52920 | 68 65 20 6c 61 74 65 73 74 20 6b 65 79 73 27 29 3b 0a 0a 24 76 61 6c 69 64 61 74 6f 72 20 3d 20 | he.latest.keys');..$validator.=. |
52940 | 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 76 61 6c 75 65 29 3a 20 73 74 72 69 6e 67 | static.function.($value):.string |
52960 | 20 7b 0a 69 66 20 28 21 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b 5e 2d 2d 2d 2d 2d 42 45 | .{.if.(!Preg::isMatch('{^-----BE |
52980 | 47 49 4e 20 50 55 42 4c 49 43 20 4b 45 59 2d 2d 2d 2d 2d 24 7d 27 2c 20 74 72 69 6d 28 24 76 61 | GIN.PUBLIC.KEY-----$}',.trim($va |
529a0 | 6c 75 65 29 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 55 6e 65 78 70 65 63 74 65 64 56 61 | lue))).{.throw.new.\UnexpectedVa |
529c0 | 6c 75 65 45 78 63 65 70 74 69 6f 6e 28 27 49 6e 76 61 6c 69 64 20 69 6e 70 75 74 27 29 3b 0a 7d | lueException('Invalid.input');.} |
529e0 | 0a 0a 72 65 74 75 72 6e 20 74 72 69 6d 28 24 76 61 6c 75 65 29 2e 22 5c 6e 22 3b 0a 7d 3b 0a 0a | ..return.trim($value)."\n";.};.. |
52a00 | 24 64 65 76 4b 65 79 20 3d 20 27 27 3b 0a 77 68 69 6c 65 20 28 21 50 72 65 67 3a 3a 69 73 4d 61 | $devKey.=.'';.while.(!Preg::isMa |
52a20 | 74 63 68 28 27 7b 28 2d 2d 2d 2d 2d 42 45 47 49 4e 20 50 55 42 4c 49 43 20 4b 45 59 2d 2d 2d 2d | tch('{(-----BEGIN.PUBLIC.KEY---- |
52a40 | 2d 2e 2b 3f 2d 2d 2d 2d 2d 45 4e 44 20 50 55 42 4c 49 43 20 4b 45 59 2d 2d 2d 2d 2d 29 7d 73 27 | -.+?-----END.PUBLIC.KEY-----)}s' |
52a60 | 2c 20 24 64 65 76 4b 65 79 2c 20 24 6d 61 74 63 68 29 29 20 7b 0a 24 64 65 76 4b 65 79 20 3d 20 | ,.$devKey,.$match)).{.$devKey.=. |
52a80 | 24 69 6f 2d 3e 61 73 6b 41 6e 64 56 61 6c 69 64 61 74 65 28 27 45 6e 74 65 72 20 44 65 76 20 2f | $io->askAndValidate('Enter.Dev./ |
52aa0 | 20 53 6e 61 70 73 68 6f 74 20 50 75 62 6c 69 63 20 4b 65 79 20 28 69 6e 63 6c 75 64 69 6e 67 20 | .Snapshot.Public.Key.(including. |
52ac0 | 6c 69 6e 65 73 20 77 69 74 68 20 2d 2d 2d 2d 2d 29 3a 20 27 2c 20 24 76 61 6c 69 64 61 74 6f 72 | lines.with.-----):.',.$validator |
52ae0 | 29 3b 0a 77 68 69 6c 65 20 28 24 6c 69 6e 65 20 3d 20 24 69 6f 2d 3e 61 73 6b 28 27 27 29 29 20 | );.while.($line.=.$io->ask('')). |
52b00 | 7b 0a 24 64 65 76 4b 65 79 20 2e 3d 20 74 72 69 6d 28 24 6c 69 6e 65 29 2e 22 5c 6e 22 3b 0a 69 | {.$devKey..=.trim($line)."\n";.i |
52b20 | 66 20 28 74 72 69 6d 28 24 6c 69 6e 65 29 20 3d 3d 3d 20 27 2d 2d 2d 2d 2d 45 4e 44 20 50 55 42 | f.(trim($line).===.'-----END.PUB |
52b40 | 4c 49 43 20 4b 45 59 2d 2d 2d 2d 2d 27 29 20 7b 0a 62 72 65 61 6b 3b 0a 7d 0a 7d 0a 7d 0a 66 69 | LIC.KEY-----').{.break;.}.}.}.fi |
52b60 | 6c 65 5f 70 75 74 5f 63 6f 6e 74 65 6e 74 73 28 24 6b 65 79 50 61 74 68 20 3d 20 24 63 6f 6e 66 | le_put_contents($keyPath.=.$conf |
52b80 | 69 67 2d 3e 67 65 74 28 27 68 6f 6d 65 27 29 2e 27 2f 6b 65 79 73 2e 64 65 76 2e 70 75 62 27 2c | ig->get('home').'/keys.dev.pub', |
52ba0 | 20 24 6d 61 74 63 68 5b 30 5d 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 53 74 6f 72 65 64 20 | .$match[0]);.$io->write('Stored. |
52bc0 | 6b 65 79 20 77 69 74 68 20 66 69 6e 67 65 72 70 72 69 6e 74 3a 20 27 20 2e 20 4b 65 79 73 3a 3a | key.with.fingerprint:.'...Keys:: |
52be0 | 66 69 6e 67 65 72 70 72 69 6e 74 28 24 6b 65 79 50 61 74 68 29 29 3b 0a 0a 24 74 61 67 73 4b 65 | fingerprint($keyPath));..$tagsKe |
52c00 | 79 20 3d 20 27 27 3b 0a 77 68 69 6c 65 20 28 21 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b | y.=.'';.while.(!Preg::isMatch('{ |
52c20 | 28 2d 2d 2d 2d 2d 42 45 47 49 4e 20 50 55 42 4c 49 43 20 4b 45 59 2d 2d 2d 2d 2d 2e 2b 3f 2d 2d | (-----BEGIN.PUBLIC.KEY-----.+?-- |
52c40 | 2d 2d 2d 45 4e 44 20 50 55 42 4c 49 43 20 4b 45 59 2d 2d 2d 2d 2d 29 7d 73 27 2c 20 24 74 61 67 | ---END.PUBLIC.KEY-----)}s',.$tag |
52c60 | 73 4b 65 79 2c 20 24 6d 61 74 63 68 29 29 20 7b 0a 24 74 61 67 73 4b 65 79 20 3d 20 24 69 6f 2d | sKey,.$match)).{.$tagsKey.=.$io- |
52c80 | 3e 61 73 6b 41 6e 64 56 61 6c 69 64 61 74 65 28 27 45 6e 74 65 72 20 54 61 67 73 20 50 75 62 6c | >askAndValidate('Enter.Tags.Publ |
52ca0 | 69 63 20 4b 65 79 20 28 69 6e 63 6c 75 64 69 6e 67 20 6c 69 6e 65 73 20 77 69 74 68 20 2d 2d 2d | ic.Key.(including.lines.with.--- |
52cc0 | 2d 2d 29 3a 20 27 2c 20 24 76 61 6c 69 64 61 74 6f 72 29 3b 0a 77 68 69 6c 65 20 28 24 6c 69 6e | --):.',.$validator);.while.($lin |
52ce0 | 65 20 3d 20 24 69 6f 2d 3e 61 73 6b 28 27 27 29 29 20 7b 0a 24 74 61 67 73 4b 65 79 20 2e 3d 20 | e.=.$io->ask('')).{.$tagsKey..=. |
52d00 | 74 72 69 6d 28 24 6c 69 6e 65 29 2e 22 5c 6e 22 3b 0a 69 66 20 28 74 72 69 6d 28 24 6c 69 6e 65 | trim($line)."\n";.if.(trim($line |
52d20 | 29 20 3d 3d 3d 20 27 2d 2d 2d 2d 2d 45 4e 44 20 50 55 42 4c 49 43 20 4b 45 59 2d 2d 2d 2d 2d 27 | ).===.'-----END.PUBLIC.KEY-----' |
52d40 | 29 20 7b 0a 62 72 65 61 6b 3b 0a 7d 0a 7d 0a 7d 0a 66 69 6c 65 5f 70 75 74 5f 63 6f 6e 74 65 6e | ).{.break;.}.}.}.file_put_conten |
52d60 | 74 73 28 24 6b 65 79 50 61 74 68 20 3d 20 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 68 6f 6d 65 | ts($keyPath.=.$config->get('home |
52d80 | 27 29 2e 27 2f 6b 65 79 73 2e 74 61 67 73 2e 70 75 62 27 2c 20 24 6d 61 74 63 68 5b 30 5d 29 3b | ').'/keys.tags.pub',.$match[0]); |
52da0 | 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 53 74 6f 72 65 64 20 6b 65 79 20 77 69 74 68 20 66 69 6e | .$io->write('Stored.key.with.fin |
52dc0 | 67 65 72 70 72 69 6e 74 3a 20 27 20 2e 20 4b 65 79 73 3a 3a 66 69 6e 67 65 72 70 72 69 6e 74 28 | gerprint:.'...Keys::fingerprint( |
52de0 | 24 6b 65 79 50 61 74 68 29 29 3b 0a 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 50 75 62 6c 69 63 20 | $keyPath));..$io->write('Public. |
52e00 | 6b 65 79 73 20 73 74 6f 72 65 64 20 69 6e 20 27 2e 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 68 | keys.stored.in.'.$config->get('h |
52e20 | 6f 6d 65 27 29 29 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e | ome'));.}.....protected.function |
52e40 | 20 72 6f 6c 6c 62 61 63 6b 28 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 6f 75 74 70 75 | .rollback(OutputInterface.$outpu |
52e60 | 74 2c 20 73 74 72 69 6e 67 20 24 72 6f 6c 6c 62 61 63 6b 44 69 72 2c 20 73 74 72 69 6e 67 20 24 | t,.string.$rollbackDir,.string.$ |
52e80 | 6c 6f 63 61 6c 46 69 6c 65 6e 61 6d 65 29 3a 20 69 6e 74 0a 7b 0a 24 72 6f 6c 6c 62 61 63 6b 56 | localFilename):.int.{.$rollbackV |
52ea0 | 65 72 73 69 6f 6e 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 4c 61 73 74 42 61 63 6b 75 70 56 65 72 | ersion.=.$this->getLastBackupVer |
52ec0 | 73 69 6f 6e 28 24 72 6f 6c 6c 62 61 63 6b 44 69 72 29 3b 0a 69 66 20 28 6e 75 6c 6c 20 3d 3d 3d | sion($rollbackDir);.if.(null.=== |
52ee0 | 20 24 72 6f 6c 6c 62 61 63 6b 56 65 72 73 69 6f 6e 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c | .$rollbackVersion).{.throw.new.\ |
52f00 | 55 6e 65 78 70 65 63 74 65 64 56 61 6c 75 65 45 78 63 65 70 74 69 6f 6e 28 27 43 6f 6d 70 6f 73 | UnexpectedValueException('Compos |
52f20 | 65 72 20 72 6f 6c 6c 62 61 63 6b 20 66 61 69 6c 65 64 3a 20 6e 6f 20 69 6e 73 74 61 6c 6c 61 74 | er.rollback.failed:.no.installat |
52f40 | 69 6f 6e 20 74 6f 20 72 6f 6c 6c 20 62 61 63 6b 20 74 6f 20 69 6e 20 22 27 2e 24 72 6f 6c 6c 62 | ion.to.roll.back.to.in."'.$rollb |
52f60 | 61 63 6b 44 69 72 2e 27 22 27 29 3b 0a 7d 0a 0a 24 6f 6c 64 46 69 6c 65 20 3d 20 24 72 6f 6c 6c | ackDir.'"');.}..$oldFile.=.$roll |
52f80 | 62 61 63 6b 44 69 72 20 2e 20 27 2f 27 20 2e 20 24 72 6f 6c 6c 62 61 63 6b 56 65 72 73 69 6f 6e | backDir...'/'...$rollbackVersion |
52fa0 | 20 2e 20 73 65 6c 66 3a 3a 4f 4c 44 5f 49 4e 53 54 41 4c 4c 5f 45 58 54 3b 0a 0a 69 66 20 28 21 | ...self::OLD_INSTALL_EXT;..if.(! |
52fc0 | 69 73 5f 66 69 6c 65 28 24 6f 6c 64 46 69 6c 65 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 46 | is_file($oldFile)).{.throw.new.F |
52fe0 | 69 6c 65 73 79 73 74 65 6d 45 78 63 65 70 74 69 6f 6e 28 27 43 6f 6d 70 6f 73 65 72 20 72 6f 6c | ilesystemException('Composer.rol |
53000 | 6c 62 61 63 6b 20 66 61 69 6c 65 64 3a 20 22 27 2e 24 6f 6c 64 46 69 6c 65 2e 27 22 20 63 6f 75 | lback.failed:."'.$oldFile.'".cou |
53020 | 6c 64 20 6e 6f 74 20 62 65 20 66 6f 75 6e 64 27 29 3b 0a 7d 0a 69 66 20 28 21 46 69 6c 65 73 79 | ld.not.be.found');.}.if.(!Filesy |
53040 | 73 74 65 6d 3a 3a 69 73 52 65 61 64 61 62 6c 65 28 24 6f 6c 64 46 69 6c 65 29 29 20 7b 0a 74 68 | stem::isReadable($oldFile)).{.th |
53060 | 72 6f 77 20 6e 65 77 20 46 69 6c 65 73 79 73 74 65 6d 45 78 63 65 70 74 69 6f 6e 28 27 43 6f 6d | row.new.FilesystemException('Com |
53080 | 70 6f 73 65 72 20 72 6f 6c 6c 62 61 63 6b 20 66 61 69 6c 65 64 3a 20 22 27 2e 24 6f 6c 64 46 69 | poser.rollback.failed:."'.$oldFi |
530a0 | 6c 65 2e 27 22 20 63 6f 75 6c 64 20 6e 6f 74 20 62 65 20 72 65 61 64 27 29 3b 0a 7d 0a 0a 24 69 | le.'".could.not.be.read');.}..$i |
530c0 | 6f 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 | o.=.$this->getIO();.$io->writeEr |
530e0 | 72 6f 72 28 73 70 72 69 6e 74 66 28 22 52 6f 6c 6c 69 6e 67 20 62 61 63 6b 20 74 6f 20 76 65 72 | ror(sprintf("Rolling.back.to.ver |
53100 | 73 69 6f 6e 20 3c 69 6e 66 6f 3e 25 73 3c 2f 69 6e 66 6f 3e 2e 22 2c 20 24 72 6f 6c 6c 62 61 63 | sion.<info>%s</info>.",.$rollbac |
53120 | 6b 56 65 72 73 69 6f 6e 29 29 3b 0a 69 66 20 28 21 24 74 68 69 73 2d 3e 73 65 74 4c 6f 63 61 6c | kVersion));.if.(!$this->setLocal |
53140 | 50 68 61 72 28 24 6c 6f 63 61 6c 46 69 6c 65 6e 61 6d 65 2c 20 24 6f 6c 64 46 69 6c 65 29 29 20 | Phar($localFilename,.$oldFile)). |
53160 | 7b 0a 72 65 74 75 72 6e 20 31 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 0a 0a 0a 0a 0a | {.return.1;.}..return.0;.}...... |
53180 | 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 4c 6f 63 61 6c | .....protected.function.setLocal |
531a0 | 50 68 61 72 28 73 74 72 69 6e 67 20 24 6c 6f 63 61 6c 46 69 6c 65 6e 61 6d 65 2c 20 73 74 72 69 | Phar(string.$localFilename,.stri |
531c0 | 6e 67 20 24 6e 65 77 46 69 6c 65 6e 61 6d 65 2c 20 3f 73 74 72 69 6e 67 20 24 62 61 63 6b 75 70 | ng.$newFilename,.?string.$backup |
531e0 | 54 61 72 67 65 74 20 3d 20 6e 75 6c 6c 29 3a 20 62 6f 6f 6c 0a 7b 0a 24 69 6f 20 3d 20 24 74 68 | Target.=.null):.bool.{.$io.=.$th |
53200 | 69 73 2d 3e 67 65 74 49 4f 28 29 3b 0a 24 70 65 72 6d 73 20 3d 20 40 66 69 6c 65 70 65 72 6d 73 | is->getIO();.$perms.=.@fileperms |
53220 | 28 24 6c 6f 63 61 6c 46 69 6c 65 6e 61 6d 65 29 3b 0a 69 66 20 28 24 70 65 72 6d 73 20 21 3d 3d | ($localFilename);.if.($perms.!== |
53240 | 20 66 61 6c 73 65 29 20 7b 0a 40 63 68 6d 6f 64 28 24 6e 65 77 46 69 6c 65 6e 61 6d 65 2c 20 24 | .false).{.@chmod($newFilename,.$ |
53260 | 70 65 72 6d 73 29 3b 0a 7d 0a 0a 0a 69 66 20 28 21 24 74 68 69 73 2d 3e 76 61 6c 69 64 61 74 65 | perms);.}...if.(!$this->validate |
53280 | 50 68 61 72 28 24 6e 65 77 46 69 6c 65 6e 61 6d 65 2c 20 24 65 72 72 6f 72 29 29 20 7b 0a 24 69 | Phar($newFilename,.$error)).{.$i |
532a0 | 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 65 72 72 6f 72 3e 54 68 65 20 27 2e 28 24 62 61 | o->writeError('<error>The.'.($ba |
532c0 | 63 6b 75 70 54 61 72 67 65 74 20 21 3d 3d 20 6e 75 6c 6c 20 3f 20 27 75 70 64 61 74 65 27 20 3a | ckupTarget.!==.null.?.'update'.: |
532e0 | 20 27 62 61 63 6b 75 70 27 29 2e 27 20 66 69 6c 65 20 69 73 20 63 6f 72 72 75 70 74 65 64 20 28 | .'backup').'.file.is.corrupted.( |
53300 | 27 2e 24 65 72 72 6f 72 2e 27 29 3c 2f 65 72 72 6f 72 3e 27 29 3b 0a 0a 69 66 20 28 24 62 61 63 | '.$error.')</error>');..if.($bac |
53320 | 6b 75 70 54 61 72 67 65 74 20 21 3d 3d 20 6e 75 6c 6c 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 | kupTarget.!==.null).{.$io->write |
53340 | 45 72 72 6f 72 28 27 3c 65 72 72 6f 72 3e 50 6c 65 61 73 65 20 72 65 2d 72 75 6e 20 74 68 65 20 | Error('<error>Please.re-run.the. |
53360 | 73 65 6c 66 2d 75 70 64 61 74 65 20 63 6f 6d 6d 61 6e 64 20 74 6f 20 74 72 79 20 61 67 61 69 6e | self-update.command.to.try.again |
53380 | 2e 3c 2f 65 72 72 6f 72 3e 27 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a | .</error>');.}..return.false;.}. |
533a0 | 0a 0a 69 66 20 28 24 62 61 63 6b 75 70 54 61 72 67 65 74 20 21 3d 3d 20 6e 75 6c 6c 29 20 7b 0a | ..if.($backupTarget.!==.null).{. |
533c0 | 40 63 6f 70 79 28 24 6c 6f 63 61 6c 46 69 6c 65 6e 61 6d 65 2c 20 24 62 61 63 6b 75 70 54 61 72 | @copy($localFilename,.$backupTar |
533e0 | 67 65 74 29 3b 0a 7d 0a 0a 74 72 79 20 7b 0a 69 66 20 28 50 6c 61 74 66 6f 72 6d 3a 3a 69 73 57 | get);.}..try.{.if.(Platform::isW |
53400 | 69 6e 64 6f 77 73 28 29 29 20 7b 0a 0a 0a 63 6f 70 79 28 24 6e 65 77 46 69 6c 65 6e 61 6d 65 2c | indows()).{...copy($newFilename, |
53420 | 20 24 6c 6f 63 61 6c 46 69 6c 65 6e 61 6d 65 29 3b 0a 40 75 6e 6c 69 6e 6b 28 24 6e 65 77 46 69 | .$localFilename);.@unlink($newFi |
53440 | 6c 65 6e 61 6d 65 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 72 65 6e 61 6d 65 28 24 6e 65 77 46 69 6c | lename);.}.else.{.rename($newFil |
53460 | 65 6e 61 6d 65 2c 20 24 6c 6f 63 61 6c 46 69 6c 65 6e 61 6d 65 29 3b 0a 7d 0a 0a 72 65 74 75 72 | ename,.$localFilename);.}..retur |
53480 | 6e 20 74 72 75 65 3b 0a 7d 20 63 61 74 63 68 20 28 5c 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 | n.true;.}.catch.(\Exception.$e). |
534a0 | 7b 0a 0a 69 66 20 28 21 69 73 5f 77 72 69 74 61 62 6c 65 28 64 69 72 6e 61 6d 65 28 24 6c 6f 63 | {..if.(!is_writable(dirname($loc |
534c0 | 61 6c 46 69 6c 65 6e 61 6d 65 29 29 0a 26 26 20 24 69 6f 2d 3e 69 73 49 6e 74 65 72 61 63 74 69 | alFilename)).&&.$io->isInteracti |
534e0 | 76 65 28 29 0a 26 26 20 24 74 68 69 73 2d 3e 69 73 57 69 6e 64 6f 77 73 4e 6f 6e 41 64 6d 69 6e | ve().&&.$this->isWindowsNonAdmin |
53500 | 55 73 65 72 28 29 29 20 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 74 72 79 41 73 57 69 6e | User()).{.return.$this->tryAsWin |
53520 | 64 6f 77 73 41 64 6d 69 6e 28 24 6c 6f 63 61 6c 46 69 6c 65 6e 61 6d 65 2c 20 24 6e 65 77 46 69 | dowsAdmin($localFilename,.$newFi |
53540 | 6c 65 6e 61 6d 65 29 3b 0a 7d 0a 0a 40 75 6e 6c 69 6e 6b 28 24 6e 65 77 46 69 6c 65 6e 61 6d 65 | lename);.}..@unlink($newFilename |
53560 | 29 3b 0a 24 61 63 74 69 6f 6e 20 3d 20 27 43 6f 6d 70 6f 73 65 72 20 27 2e 28 24 62 61 63 6b 75 | );.$action.=.'Composer.'.($backu |
53580 | 70 54 61 72 67 65 74 20 21 3d 3d 20 6e 75 6c 6c 20 3f 20 27 75 70 64 61 74 65 27 20 3a 20 27 72 | pTarget.!==.null.?.'update'.:.'r |
535a0 | 6f 6c 6c 62 61 63 6b 27 29 3b 0a 74 68 72 6f 77 20 6e 65 77 20 46 69 6c 65 73 79 73 74 65 6d 45 | ollback');.throw.new.FilesystemE |
535c0 | 78 63 65 70 74 69 6f 6e 28 24 61 63 74 69 6f 6e 2e 27 20 66 61 69 6c 65 64 3a 20 22 27 2e 24 6c | xception($action.'.failed:."'.$l |
535e0 | 6f 63 61 6c 46 69 6c 65 6e 61 6d 65 2e 27 22 20 63 6f 75 6c 64 20 6e 6f 74 20 62 65 20 77 72 69 | ocalFilename.'".could.not.be.wri |
53600 | 74 74 65 6e 2e 27 2e 50 48 50 5f 45 4f 4c 2e 24 65 2d 3e 67 65 74 4d 65 73 73 61 67 65 28 29 29 | tten.'.PHP_EOL.$e->getMessage()) |
53620 | 3b 0a 7d 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 63 6c 65 61 6e 42 | ;.}.}..protected.function.cleanB |
53640 | 61 63 6b 75 70 73 28 73 74 72 69 6e 67 20 24 72 6f 6c 6c 62 61 63 6b 44 69 72 2c 20 3f 73 74 72 | ackups(string.$rollbackDir,.?str |
53660 | 69 6e 67 20 24 65 78 63 65 70 74 20 3d 20 6e 75 6c 6c 29 3a 20 76 6f 69 64 0a 7b 0a 24 66 69 6e | ing.$except.=.null):.void.{.$fin |
53680 | 64 65 72 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 4f 6c 64 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 46 | der.=.$this->getOldInstallationF |
536a0 | 69 6e 64 65 72 28 24 72 6f 6c 6c 62 61 63 6b 44 69 72 29 3b 0a 24 69 6f 20 3d 20 24 74 68 69 73 | inder($rollbackDir);.$io.=.$this |
536c0 | 2d 3e 67 65 74 49 4f 28 29 3b 0a 24 66 73 20 3d 20 6e 65 77 20 46 69 6c 65 73 79 73 74 65 6d 3b | ->getIO();.$fs.=.new.Filesystem; |
536e0 | 0a 0a 66 6f 72 65 61 63 68 20 28 24 66 69 6e 64 65 72 20 61 73 20 24 66 69 6c 65 29 20 7b 0a 69 | ..foreach.($finder.as.$file).{.i |
53700 | 66 20 28 24 66 69 6c 65 2d 3e 67 65 74 42 61 73 65 6e 61 6d 65 28 73 65 6c 66 3a 3a 4f 4c 44 5f | f.($file->getBasename(self::OLD_ |
53720 | 49 4e 53 54 41 4c 4c 5f 45 58 54 29 20 3d 3d 3d 20 24 65 78 63 65 70 74 29 20 7b 0a 63 6f 6e 74 | INSTALL_EXT).===.$except).{.cont |
53740 | 69 6e 75 65 3b 0a 7d 0a 24 66 69 6c 65 20 3d 20 28 73 74 72 69 6e 67 29 20 24 66 69 6c 65 3b 0a | inue;.}.$file.=.(string).$file;. |
53760 | 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 69 6e 66 6f 3e 52 65 6d 6f 76 69 6e 67 3a | $io->writeError('<info>Removing: |
53780 | 20 27 2e 24 66 69 6c 65 2e 27 3c 2f 69 6e 66 6f 3e 27 29 3b 0a 24 66 73 2d 3e 72 65 6d 6f 76 65 | .'.$file.'</info>');.$fs->remove |
537a0 | 28 24 66 69 6c 65 29 3b 0a 7d 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e | ($file);.}.}..protected.function |
537c0 | 20 67 65 74 4c 61 73 74 42 61 63 6b 75 70 56 65 72 73 69 6f 6e 28 73 74 72 69 6e 67 20 24 72 6f | .getLastBackupVersion(string.$ro |
537e0 | 6c 6c 62 61 63 6b 44 69 72 29 3a 20 3f 73 74 72 69 6e 67 0a 7b 0a 24 66 69 6e 64 65 72 20 3d 20 | llbackDir):.?string.{.$finder.=. |
53800 | 24 74 68 69 73 2d 3e 67 65 74 4f 6c 64 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 46 69 6e 64 65 72 28 | $this->getOldInstallationFinder( |
53820 | 24 72 6f 6c 6c 62 61 63 6b 44 69 72 29 3b 0a 24 66 69 6e 64 65 72 2d 3e 73 6f 72 74 42 79 4e 61 | $rollbackDir);.$finder->sortByNa |
53840 | 6d 65 28 29 3b 0a 24 66 69 6c 65 73 20 3d 20 69 74 65 72 61 74 6f 72 5f 74 6f 5f 61 72 72 61 79 | me();.$files.=.iterator_to_array |
53860 | 28 24 66 69 6e 64 65 72 29 3b 0a 0a 69 66 20 28 63 6f 75 6e 74 28 24 66 69 6c 65 73 29 20 3e 20 | ($finder);..if.(count($files).>. |
53880 | 30 29 20 7b 0a 72 65 74 75 72 6e 20 65 6e 64 28 24 66 69 6c 65 73 29 2d 3e 67 65 74 42 61 73 65 | 0).{.return.end($files)->getBase |
538a0 | 6e 61 6d 65 28 73 65 6c 66 3a 3a 4f 4c 44 5f 49 4e 53 54 41 4c 4c 5f 45 58 54 29 3b 0a 7d 0a 0a | name(self::OLD_INSTALL_EXT);.}.. |
538c0 | 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 | return.null;.}..protected.functi |
538e0 | 6f 6e 20 67 65 74 4f 6c 64 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 46 69 6e 64 65 72 28 73 74 72 69 | on.getOldInstallationFinder(stri |
53900 | 6e 67 20 24 72 6f 6c 6c 62 61 63 6b 44 69 72 29 3a 20 46 69 6e 64 65 72 0a 7b 0a 72 65 74 75 72 | ng.$rollbackDir):.Finder.{.retur |
53920 | 6e 20 46 69 6e 64 65 72 3a 3a 63 72 65 61 74 65 28 29 0a 2d 3e 64 65 70 74 68 28 30 29 0a 2d 3e | n.Finder::create().->depth(0).-> |
53940 | 66 69 6c 65 73 28 29 0a 2d 3e 6e 61 6d 65 28 27 2a 27 20 2e 20 73 65 6c 66 3a 3a 4f 4c 44 5f 49 | files().->name('*'...self::OLD_I |
53960 | 4e 53 54 41 4c 4c 5f 45 58 54 29 0a 2d 3e 69 6e 28 24 72 6f 6c 6c 62 61 63 6b 44 69 72 29 3b 0a | NSTALL_EXT).->in($rollbackDir);. |
53980 | 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f | }..............protected.functio |
539a0 | 6e 20 76 61 6c 69 64 61 74 65 50 68 61 72 28 73 74 72 69 6e 67 20 24 70 68 61 72 46 69 6c 65 2c | n.validatePhar(string.$pharFile, |
539c0 | 20 3f 73 74 72 69 6e 67 20 26 24 65 72 72 6f 72 29 3a 20 62 6f 6f 6c 0a 7b 0a 69 66 20 28 28 62 | .?string.&$error):.bool.{.if.((b |
539e0 | 6f 6f 6c 29 20 69 6e 69 5f 67 65 74 28 27 70 68 61 72 2e 72 65 61 64 6f 6e 6c 79 27 29 29 20 7b | ool).ini_get('phar.readonly')).{ |
53a00 | 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 0a 74 72 79 20 7b 0a 0a 24 70 68 61 72 20 3d 20 | .return.true;.}..try.{..$phar.=. |
53a20 | 6e 65 77 20 5c 50 68 61 72 28 24 70 68 61 72 46 69 6c 65 29 3b 0a 0a 75 6e 73 65 74 28 24 70 68 | new.\Phar($pharFile);..unset($ph |
53a40 | 61 72 29 3b 0a 24 72 65 73 75 6c 74 20 3d 20 74 72 75 65 3b 0a 7d 20 63 61 74 63 68 20 28 5c 45 | ar);.$result.=.true;.}.catch.(\E |
53a60 | 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 69 66 20 28 21 24 65 20 69 6e 73 74 61 6e 63 65 6f | xception.$e).{.if.(!$e.instanceo |
53a80 | 66 20 5c 55 6e 65 78 70 65 63 74 65 64 56 61 6c 75 65 45 78 63 65 70 74 69 6f 6e 20 26 26 20 21 | f.\UnexpectedValueException.&&.! |
53aa0 | 24 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 5c 50 68 61 72 45 78 63 65 70 74 69 6f 6e 29 20 7b 0a | $e.instanceof.\PharException).{. |
53ac0 | 74 68 72 6f 77 20 24 65 3b 0a 7d 0a 24 65 72 72 6f 72 20 3d 20 24 65 2d 3e 67 65 74 4d 65 73 73 | throw.$e;.}.$error.=.$e->getMess |
53ae0 | 61 67 65 28 29 3b 0a 24 72 65 73 75 6c 74 20 3d 20 66 61 6c 73 65 3b 0a 7d 0a 0a 72 65 74 75 72 | age();.$result.=.false;.}..retur |
53b00 | 6e 20 24 72 65 73 75 6c 74 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 | n.$result;.}.....protected.funct |
53b20 | 69 6f 6e 20 69 73 57 69 6e 64 6f 77 73 4e 6f 6e 41 64 6d 69 6e 55 73 65 72 28 29 3a 20 62 6f 6f | ion.isWindowsNonAdminUser():.boo |
53b40 | 6c 0a 7b 0a 69 66 20 28 21 50 6c 61 74 66 6f 72 6d 3a 3a 69 73 57 69 6e 64 6f 77 73 28 29 29 20 | l.{.if.(!Platform::isWindows()). |
53b60 | 7b 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 0a 65 78 65 63 28 27 66 6c 74 6d 63 2e | {.return.false;.}...exec('fltmc. |
53b80 | 65 78 65 20 66 69 6c 74 65 72 73 27 2c 20 24 6f 75 74 70 75 74 2c 20 24 65 78 69 74 43 6f 64 65 | exe.filters',.$output,.$exitCode |
53ba0 | 29 3b 0a 0a 72 65 74 75 72 6e 20 24 65 78 69 74 43 6f 64 65 20 21 3d 3d 20 30 3b 0a 7d 0a 0a 0a | );..return.$exitCode.!==.0;.}... |
53bc0 | 0a 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 74 72 79 41 73 | ........protected.function.tryAs |
53be0 | 57 69 6e 64 6f 77 73 41 64 6d 69 6e 28 73 74 72 69 6e 67 20 24 6c 6f 63 61 6c 46 69 6c 65 6e 61 | WindowsAdmin(string.$localFilena |
53c00 | 6d 65 2c 20 73 74 72 69 6e 67 20 24 6e 65 77 46 69 6c 65 6e 61 6d 65 29 3a 20 62 6f 6f 6c 0a 7b | me,.string.$newFilename):.bool.{ |
53c20 | 0a 24 69 6f 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 3b 0a 0a 24 69 6f 2d 3e 77 72 69 | .$io.=.$this->getIO();..$io->wri |
53c40 | 74 65 45 72 72 6f 72 28 27 3c 65 72 72 6f 72 3e 55 6e 61 62 6c 65 20 74 6f 20 77 72 69 74 65 20 | teError('<error>Unable.to.write. |
53c60 | 22 27 2e 24 6c 6f 63 61 6c 46 69 6c 65 6e 61 6d 65 2e 27 22 2e 20 41 63 63 65 73 73 20 69 73 20 | "'.$localFilename.'"..Access.is. |
53c80 | 64 65 6e 69 65 64 2e 3c 2f 65 72 72 6f 72 3e 27 29 3b 0a 24 68 65 6c 70 4d 65 73 73 61 67 65 20 | denied.</error>');.$helpMessage. |
53ca0 | 3d 20 27 50 6c 65 61 73 65 20 72 75 6e 20 74 68 65 20 73 65 6c 66 2d 75 70 64 61 74 65 20 63 6f | =.'Please.run.the.self-update.co |
53cc0 | 6d 6d 61 6e 64 20 61 73 20 61 6e 20 41 64 6d 69 6e 69 73 74 72 61 74 6f 72 2e 27 3b 0a 24 71 75 | mmand.as.an.Administrator.';.$qu |
53ce0 | 65 73 74 69 6f 6e 20 3d 20 27 43 6f 6d 70 6c 65 74 65 20 74 68 69 73 20 6f 70 65 72 61 74 69 6f | estion.=.'Complete.this.operatio |
53d00 | 6e 20 77 69 74 68 20 41 64 6d 69 6e 69 73 74 72 61 74 6f 72 20 70 72 69 76 69 6c 65 67 65 73 20 | n.with.Administrator.privileges. |
53d20 | 5b 3c 63 6f 6d 6d 65 6e 74 3e 59 2c 6e 3c 2f 63 6f 6d 6d 65 6e 74 3e 5d 3f 20 27 3b 0a 0a 69 66 | [<comment>Y,n</comment>]?.';..if |
53d40 | 20 28 21 24 69 6f 2d 3e 61 73 6b 43 6f 6e 66 69 72 6d 61 74 69 6f 6e 28 24 71 75 65 73 74 69 6f | .(!$io->askConfirmation($questio |
53d60 | 6e 2c 20 74 72 75 65 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 77 61 | n,.true)).{.$io->writeError('<wa |
53d80 | 72 6e 69 6e 67 3e 4f 70 65 72 61 74 69 6f 6e 20 63 61 6e 63 65 6c 6c 65 64 2e 20 27 2e 24 68 65 | rning>Operation.cancelled..'.$he |
53da0 | 6c 70 4d 65 73 73 61 67 65 2e 27 3c 2f 77 61 72 6e 69 6e 67 3e 27 29 3b 0a 0a 72 65 74 75 72 6e | lpMessage.'</warning>');..return |
53dc0 | 20 66 61 6c 73 65 3b 0a 7d 0a 0a 24 74 6d 70 46 69 6c 65 20 3d 20 74 65 6d 70 6e 61 6d 28 73 79 | .false;.}..$tmpFile.=.tempnam(sy |
53de0 | 73 5f 67 65 74 5f 74 65 6d 70 5f 64 69 72 28 29 2c 20 27 27 29 3b 0a 69 66 20 28 66 61 6c 73 65 | s_get_temp_dir(),.'');.if.(false |
53e00 | 20 3d 3d 3d 20 24 74 6d 70 46 69 6c 65 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 | .===.$tmpFile).{.$io->writeError |
53e20 | 28 27 3c 65 72 72 6f 72 3e 4f 70 65 72 61 74 69 6f 6e 20 66 61 69 6c 65 64 2e 27 2e 24 68 65 6c | ('<error>Operation.failed.'.$hel |
53e40 | 70 4d 65 73 73 61 67 65 2e 27 3c 2f 65 72 72 6f 72 3e 27 29 3b 0a 0a 72 65 74 75 72 6e 20 66 61 | pMessage.'</error>');..return.fa |
53e60 | 6c 73 65 3b 0a 7d 0a 24 73 63 72 69 70 74 20 3d 20 24 74 6d 70 46 69 6c 65 2e 27 2e 76 62 73 27 | lse;.}.$script.=.$tmpFile.'.vbs' |
53e80 | 3b 0a 72 65 6e 61 6d 65 28 24 74 6d 70 46 69 6c 65 2c 20 24 73 63 72 69 70 74 29 3b 0a 0a 24 63 | ;.rename($tmpFile,.$script);..$c |
53ea0 | 68 65 63 6b 73 75 6d 20 3d 20 68 61 73 68 5f 66 69 6c 65 28 27 73 68 61 32 35 36 27 2c 20 24 6e | hecksum.=.hash_file('sha256',.$n |
53ec0 | 65 77 46 69 6c 65 6e 61 6d 65 29 3b 0a 0a 0a 24 73 6f 75 72 63 65 20 3d 20 73 74 72 5f 72 65 70 | ewFilename);...$source.=.str_rep |
53ee0 | 6c 61 63 65 28 27 2f 27 2c 20 27 5c 5c 27 2c 20 24 6e 65 77 46 69 6c 65 6e 61 6d 65 29 3b 0a 24 | lace('/',.'\\',.$newFilename);.$ |
53f00 | 64 65 73 74 69 6e 61 74 69 6f 6e 20 3d 20 73 74 72 5f 72 65 70 6c 61 63 65 28 27 2f 27 2c 20 27 | destination.=.str_replace('/',.' |
53f20 | 5c 5c 27 2c 20 24 6c 6f 63 61 6c 46 69 6c 65 6e 61 6d 65 29 3b 0a 0a 24 76 62 73 20 3d 20 3c 3c | \\',.$localFilename);..$vbs.=.<< |
53f40 | 3c 45 4f 54 0a 53 65 74 20 55 41 43 20 3d 20 43 72 65 61 74 65 4f 62 6a 65 63 74 28 22 53 68 65 | <EOT.Set.UAC.=.CreateObject("She |
53f60 | 6c 6c 2e 41 70 70 6c 69 63 61 74 69 6f 6e 22 29 0a 55 41 43 2e 53 68 65 6c 6c 45 78 65 63 75 74 | ll.Application").UAC.ShellExecut |
53f80 | 65 20 22 63 6d 64 2e 65 78 65 22 2c 20 22 2f 63 20 63 6f 70 79 20 2f 62 20 2f 79 20 22 22 24 73 | e."cmd.exe",."/c.copy./b./y.""$s |
53fa0 | 6f 75 72 63 65 22 22 20 22 22 24 64 65 73 74 69 6e 61 74 69 6f 6e 22 22 22 2c 20 22 22 2c 20 22 | ource"".""$destination""",."",." |
53fc0 | 72 75 6e 61 73 22 2c 20 30 0a 57 73 63 72 69 70 74 2e 53 6c 65 65 70 28 33 30 30 29 0a 45 4f 54 | runas",.0.Wscript.Sleep(300).EOT |
53fe0 | 3b 0a 0a 66 69 6c 65 5f 70 75 74 5f 63 6f 6e 74 65 6e 74 73 28 24 73 63 72 69 70 74 2c 20 24 76 | ;..file_put_contents($script,.$v |
54000 | 62 73 29 3b 0a 65 78 65 63 28 27 22 27 2e 24 73 63 72 69 70 74 2e 27 22 27 29 3b 0a 40 75 6e 6c | bs);.exec('"'.$script.'"');.@unl |
54020 | 69 6e 6b 28 24 73 63 72 69 70 74 29 3b 0a 0a 0a 69 66 20 28 24 72 65 73 75 6c 74 20 3d 20 46 69 | ink($script);...if.($result.=.Fi |
54040 | 6c 65 73 79 73 74 65 6d 3a 3a 69 73 52 65 61 64 61 62 6c 65 28 24 6c 6f 63 61 6c 46 69 6c 65 6e | lesystem::isReadable($localFilen |
54060 | 61 6d 65 29 20 26 26 20 28 68 61 73 68 5f 66 69 6c 65 28 27 73 68 61 32 35 36 27 2c 20 24 6c 6f | ame).&&.(hash_file('sha256',.$lo |
54080 | 63 61 6c 46 69 6c 65 6e 61 6d 65 29 20 3d 3d 3d 20 24 63 68 65 63 6b 73 75 6d 29 29 20 7b 0a 24 | calFilename).===.$checksum)).{.$ |
540a0 | 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 69 6e 66 6f 3e 4f 70 65 72 61 74 69 6f 6e 20 | io->writeError('<info>Operation. |
540c0 | 73 75 63 63 65 65 64 65 64 2e 3c 2f 69 6e 66 6f 3e 27 29 3b 0a 40 75 6e 6c 69 6e 6b 28 24 6e 65 | succeeded.</info>');.@unlink($ne |
540e0 | 77 46 69 6c 65 6e 61 6d 65 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 | wFilename);.}.else.{.$io->writeE |
54100 | 72 72 6f 72 28 27 3c 65 72 72 6f 72 3e 4f 70 65 72 61 74 69 6f 6e 20 66 61 69 6c 65 64 2e 27 2e | rror('<error>Operation.failed.'. |
54120 | 24 68 65 6c 70 4d 65 73 73 61 67 65 2e 27 3c 2f 65 72 72 6f 72 3e 27 29 3b 0a 7d 0a 0a 72 65 74 | $helpMessage.'</error>');.}..ret |
54140 | 75 72 6e 20 24 72 65 73 75 6c 74 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 | urn.$result;.}.}.<?php.declare(s |
54160 | 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 | trict_types=1);............names |
54180 | 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6d 6d 61 6e 64 3b 0a 0a 75 73 65 20 43 6f 6d 70 | pace.Composer\Command;..use.Comp |
541a0 | 6f 73 65 72 5c 43 6f 6d 70 6f 73 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 44 65 70 65 | oser\Composer;.use.Composer\Depe |
541c0 | 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 5c 44 65 66 61 75 6c 74 50 6f 6c 69 63 79 3b 0a 75 73 | ndencyResolver\DefaultPolicy;.us |
541e0 | 65 20 43 6f 6d 70 6f 73 65 72 5c 46 69 6c 74 65 72 5c 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 | e.Composer\Filter\PlatformRequir |
54200 | 65 6d 65 6e 74 46 69 6c 74 65 72 5c 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 | ementFilter\PlatformRequirementF |
54220 | 69 6c 74 65 72 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 4f 5c | ilterInterface;.use.Composer\IO\ |
54240 | 49 4f 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 4a 73 6f 6e 5c 4a | IOInterface;.use.Composer\Json\J |
54260 | 73 6f 6e 46 69 6c 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 42 61 | sonFile;.use.Composer\Package\Ba |
54280 | 73 65 50 61 63 6b 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c | sePackage;.use.Composer\Package\ |
542a0 | 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f | CompletePackageInterface;.use.Co |
542c0 | 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 4c 69 6e 6b 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 | mposer\Package\Link;.use.Compose |
542e0 | 72 5c 50 61 63 6b 61 67 65 5c 41 6c 69 61 73 50 61 63 6b 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 | r\Package\AliasPackage;.use.Comp |
54300 | 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 | oser\Package\PackageInterface;.u |
54320 | 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 56 65 72 73 69 6f 6e 5c 56 65 72 73 | se.Composer\Package\Version\Vers |
54340 | 69 6f 6e 50 61 72 73 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c | ionParser;.use.Composer\Package\ |
54360 | 56 65 72 73 69 6f 6e 5c 56 65 72 73 69 6f 6e 53 65 6c 65 63 74 6f 72 3b 0a 75 73 65 20 43 6f 6d | Version\VersionSelector;.use.Com |
54380 | 70 6f 73 65 72 5c 50 63 72 65 5c 50 72 65 67 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 6c | poser\Pcre\Preg;.use.Composer\Pl |
543a0 | 75 67 69 6e 5c 43 6f 6d 6d 61 6e 64 45 76 65 6e 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c | ugin\CommandEvent;.use.Composer\ |
543c0 | 50 6c 75 67 69 6e 5c 50 6c 75 67 69 6e 45 76 65 6e 74 73 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 | Plugin\PluginEvents;.use.Compose |
543e0 | 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 49 6e 73 74 61 6c 6c 65 64 41 72 72 61 79 52 65 70 6f 73 | r\Repository\InstalledArrayRepos |
54400 | 69 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 43 | itory;.use.Composer\Repository\C |
54420 | 6f 6d 70 6f 73 65 72 52 65 70 6f 73 69 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c | omposerRepository;.use.Composer\ |
54440 | 52 65 70 6f 73 69 74 6f 72 79 5c 43 6f 6d 70 6f 73 69 74 65 52 65 70 6f 73 69 74 6f 72 79 3b 0a | Repository\CompositeRepository;. |
54460 | 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 46 69 6c 74 65 72 52 65 | use.Composer\Repository\FilterRe |
54480 | 70 6f 73 69 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 | pository;.use.Composer\Repositor |
544a0 | 79 5c 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 | y\PlatformRepository;.use.Compos |
544c0 | 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 52 65 70 6f 73 69 74 6f 72 79 46 61 63 74 6f 72 79 3b | er\Repository\RepositoryFactory; |
544e0 | 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 49 6e 73 74 61 6c 6c | .use.Composer\Repository\Install |
54500 | 65 64 52 65 70 6f 73 69 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 | edRepository;.use.Composer\Repos |
54520 | 69 74 6f 72 79 5c 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 | itory\RepositoryInterface;.use.C |
54540 | 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 52 65 70 6f 73 69 74 6f 72 79 53 65 74 | omposer\Repository\RepositorySet |
54560 | 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 52 65 70 6f 73 69 | ;.use.Composer\Repository\Reposi |
54580 | 74 6f 72 79 55 74 69 6c 73 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f | toryUtils;.use.Composer\Reposito |
545a0 | 72 79 5c 52 6f 6f 74 50 61 63 6b 61 67 65 52 65 70 6f 73 69 74 6f 72 79 3b 0a 75 73 65 20 43 6f | ry\RootPackageRepository;.use.Co |
545c0 | 6d 70 6f 73 65 72 5c 53 65 6d 76 65 72 5c 43 6f 6e 73 74 72 61 69 6e 74 5c 43 6f 6e 73 74 72 61 | mposer\Semver\Constraint\Constra |
545e0 | 69 6e 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 65 6d 76 65 | intInterface;.use.Composer\Semve |
54600 | 72 5c 53 65 6d 76 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 70 64 78 5c 53 70 64 78 | r\Semver;.use.Composer\Spdx\Spdx |
54620 | 4c 69 63 65 6e 73 65 73 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 61 63 6b | Licenses;.use.Composer\Util\Pack |
54640 | 61 67 65 49 6e 66 6f 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 | ageInfo;.use.Symfony\Component\C |
54660 | 6f 6e 73 6f 6c 65 5c 43 6f 6d 70 6c 65 74 69 6f 6e 5c 43 6f 6d 70 6c 65 74 69 6f 6e 49 6e 70 75 | onsole\Completion\CompletionInpu |
54680 | 74 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 | t;.use.Symfony\Component\Console |
546a0 | 5c 46 6f 72 6d 61 74 74 65 72 5c 4f 75 74 70 75 74 46 6f 72 6d 61 74 74 65 72 3b 0a 75 73 65 20 | \Formatter\OutputFormatter;.use. |
546c0 | 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 46 6f 72 6d 61 74 | Symfony\Component\Console\Format |
546e0 | 74 65 72 5c 4f 75 74 70 75 74 46 6f 72 6d 61 74 74 65 72 53 74 79 6c 65 3b 0a 75 73 65 20 43 6f | ter\OutputFormatterStyle;.use.Co |
54700 | 6d 70 6f 73 65 72 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 41 72 67 75 6d 65 | mposer\Console\Input\InputArgume |
54720 | 6e 74 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c | nt;.use.Symfony\Component\Consol |
54740 | 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 | e\Input\InputInterface;.use.Comp |
54760 | 6f 73 65 72 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 4f 70 74 69 6f 6e 3b 0a | oser\Console\Input\InputOption;. |
54780 | 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 4f 75 | use.Symfony\Component\Console\Ou |
547a0 | 74 70 75 74 5c 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 0a 0a 0a 0a 0a 0a 0a 63 6c 61 | tput\OutputInterface;........cla |
547c0 | 73 73 20 53 68 6f 77 43 6f 6d 6d 61 6e 64 20 65 78 74 65 6e 64 73 20 42 61 73 65 43 6f 6d 6d 61 | ss.ShowCommand.extends.BaseComma |
547e0 | 6e 64 0a 7b 0a 75 73 65 20 43 6f 6d 70 6c 65 74 69 6f 6e 54 72 61 69 74 3b 0a 0a 0a 70 72 6f 74 | nd.{.use.CompletionTrait;...prot |
54800 | 65 63 74 65 64 20 24 76 65 72 73 69 6f 6e 50 61 72 73 65 72 3b 0a 0a 70 72 6f 74 65 63 74 65 64 | ected.$versionParser;..protected |
54820 | 20 24 63 6f 6c 6f 72 73 3b 0a 0a 0a 70 72 69 76 61 74 65 20 24 72 65 70 6f 73 69 74 6f 72 79 53 | .$colors;...private.$repositoryS |
54840 | 65 74 3b 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 63 6f 6e 66 69 | et;.....protected.function.confi |
54860 | 67 75 72 65 28 29 0a 7b 0a 24 74 68 69 73 0a 2d 3e 73 65 74 4e 61 6d 65 28 27 73 68 6f 77 27 29 | gure().{.$this.->setName('show') |
54880 | 0a 2d 3e 73 65 74 41 6c 69 61 73 65 73 28 5b 27 69 6e 66 6f 27 5d 29 0a 2d 3e 73 65 74 44 65 73 | .->setAliases(['info']).->setDes |
548a0 | 63 72 69 70 74 69 6f 6e 28 27 53 68 6f 77 73 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 61 62 6f 75 | cription('Shows.information.abou |
548c0 | 74 20 70 61 63 6b 61 67 65 73 27 29 0a 2d 3e 73 65 74 44 65 66 69 6e 69 74 69 6f 6e 28 5b 0a 6e | t.packages').->setDefinition([.n |
548e0 | 65 77 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 28 27 70 61 63 6b 61 67 65 27 2c 20 49 6e 70 75 | ew.InputArgument('package',.Inpu |
54900 | 74 41 72 67 75 6d 65 6e 74 3a 3a 4f 50 54 49 4f 4e 41 4c 2c 20 27 50 61 63 6b 61 67 65 20 74 6f | tArgument::OPTIONAL,.'Package.to |
54920 | 20 69 6e 73 70 65 63 74 2e 20 4f 72 20 61 20 6e 61 6d 65 20 69 6e 63 6c 75 64 69 6e 67 20 61 20 | .inspect..Or.a.name.including.a. |
54940 | 77 69 6c 64 63 61 72 64 20 28 2a 29 20 74 6f 20 66 69 6c 74 65 72 20 6c 69 73 74 73 20 6f 66 20 | wildcard.(*).to.filter.lists.of. |
54960 | 70 61 63 6b 61 67 65 73 20 69 6e 73 74 65 61 64 2e 27 2c 20 6e 75 6c 6c 2c 20 24 74 68 69 73 2d | packages.instead.',.null,.$this- |
54980 | 3e 73 75 67 67 65 73 74 50 61 63 6b 61 67 65 42 61 73 65 64 4f 6e 4d 6f 64 65 28 29 29 2c 0a 6e | >suggestPackageBasedOnMode()),.n |
549a0 | 65 77 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 28 27 76 65 72 73 69 6f 6e 27 2c 20 49 6e 70 75 | ew.InputArgument('version',.Inpu |
549c0 | 74 41 72 67 75 6d 65 6e 74 3a 3a 4f 50 54 49 4f 4e 41 4c 2c 20 27 56 65 72 73 69 6f 6e 20 6f 72 | tArgument::OPTIONAL,.'Version.or |
549e0 | 20 76 65 72 73 69 6f 6e 20 63 6f 6e 73 74 72 61 69 6e 74 20 74 6f 20 69 6e 73 70 65 63 74 27 29 | .version.constraint.to.inspect') |
54a00 | 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 61 6c 6c 27 2c 20 6e 75 6c 6c 2c 20 49 | ,.new.InputOption('all',.null,.I |
54a20 | 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 4c 69 73 74 20 61 6c | nputOption::VALUE_NONE,.'List.al |
54a40 | 6c 20 70 61 63 6b 61 67 65 73 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6c | l.packages'),.new.InputOption('l |
54a60 | 6f 63 6b 65 64 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 | ocked',.null,.InputOption::VALUE |
54a80 | 5f 4e 4f 4e 45 2c 20 27 4c 69 73 74 20 61 6c 6c 20 6c 6f 63 6b 65 64 20 70 61 63 6b 61 67 65 73 | _NONE,.'List.all.locked.packages |
54aa0 | 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 69 6e 73 74 61 6c 6c 65 64 27 2c | '),.new.InputOption('installed', |
54ac0 | 20 27 69 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 | .'i',.InputOption::VALUE_NONE,.' |
54ae0 | 4c 69 73 74 20 69 6e 73 74 61 6c 6c 65 64 20 70 61 63 6b 61 67 65 73 20 6f 6e 6c 79 20 28 65 6e | List.installed.packages.only.(en |
54b00 | 61 62 6c 65 64 20 62 79 20 64 65 66 61 75 6c 74 2c 20 6f 6e 6c 79 20 70 72 65 73 65 6e 74 20 66 | abled.by.default,.only.present.f |
54b20 | 6f 72 20 42 43 29 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 70 6c 61 74 | or.BC).'),.new.InputOption('plat |
54b40 | 66 6f 72 6d 27 2c 20 27 70 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e | form',.'p',.InputOption::VALUE_N |
54b60 | 4f 4e 45 2c 20 27 4c 69 73 74 20 70 6c 61 74 66 6f 72 6d 20 70 61 63 6b 61 67 65 73 20 6f 6e 6c | ONE,.'List.platform.packages.onl |
54b80 | 79 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 61 76 61 69 6c 61 62 6c 65 27 | y'),.new.InputOption('available' |
54ba0 | 2c 20 27 61 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 | ,.'a',.InputOption::VALUE_NONE,. |
54bc0 | 27 4c 69 73 74 20 61 76 61 69 6c 61 62 6c 65 20 70 61 63 6b 61 67 65 73 20 6f 6e 6c 79 27 29 2c | 'List.available.packages.only'), |
54be0 | 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 73 65 6c 66 27 2c 20 27 73 27 2c 20 49 6e | .new.InputOption('self',.'s',.In |
54c00 | 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 53 68 6f 77 20 74 68 65 | putOption::VALUE_NONE,.'Show.the |
54c20 | 20 72 6f 6f 74 20 70 61 63 6b 61 67 65 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 27 29 2c 0a 6e 65 77 | .root.package.information'),.new |
54c40 | 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6e 61 6d 65 2d 6f 6e 6c 79 27 2c 20 27 4e 27 2c 20 49 | .InputOption('name-only',.'N',.I |
54c60 | 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 4c 69 73 74 20 70 61 | nputOption::VALUE_NONE,.'List.pa |
54c80 | 63 6b 61 67 65 20 6e 61 6d 65 73 20 6f 6e 6c 79 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 | ckage.names.only'),.new.InputOpt |
54ca0 | 69 6f 6e 28 27 70 61 74 68 27 2c 20 27 50 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 | ion('path',.'P',.InputOption::VA |
54cc0 | 4c 55 45 5f 4e 4f 4e 45 2c 20 27 53 68 6f 77 20 70 61 63 6b 61 67 65 20 70 61 74 68 73 27 29 2c | LUE_NONE,.'Show.package.paths'), |
54ce0 | 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 74 72 65 65 27 2c 20 27 74 27 2c 20 49 6e | .new.InputOption('tree',.'t',.In |
54d00 | 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 4c 69 73 74 20 74 68 65 | putOption::VALUE_NONE,.'List.the |
54d20 | 20 64 65 70 65 6e 64 65 6e 63 69 65 73 20 61 73 20 61 20 74 72 65 65 27 29 2c 0a 6e 65 77 20 49 | .dependencies.as.a.tree'),.new.I |
54d40 | 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6c 61 74 65 73 74 27 2c 20 27 6c 27 2c 20 49 6e 70 75 74 4f | nputOption('latest',.'l',.InputO |
54d60 | 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 53 68 6f 77 20 74 68 65 20 6c 61 74 | ption::VALUE_NONE,.'Show.the.lat |
54d80 | 65 73 74 20 76 65 72 73 69 6f 6e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 | est.version'),.new.InputOption(' |
54da0 | 6f 75 74 64 61 74 65 64 27 2c 20 27 6f 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c | outdated',.'o',.InputOption::VAL |
54dc0 | 55 45 5f 4e 4f 4e 45 2c 20 27 53 68 6f 77 20 74 68 65 20 6c 61 74 65 73 74 20 76 65 72 73 69 6f | UE_NONE,.'Show.the.latest.versio |
54de0 | 6e 20 62 75 74 20 6f 6e 6c 79 20 66 6f 72 20 70 61 63 6b 61 67 65 73 20 74 68 61 74 20 61 72 65 | n.but.only.for.packages.that.are |
54e00 | 20 6f 75 74 64 61 74 65 64 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 69 67 | .outdated'),.new.InputOption('ig |
54e20 | 6e 6f 72 65 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f | nore',.null,.InputOption::VALUE_ |
54e40 | 52 45 51 55 49 52 45 44 20 7c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 49 53 | REQUIRED.|.InputOption::VALUE_IS |
54e60 | 5f 41 52 52 41 59 2c 20 27 49 67 6e 6f 72 65 20 73 70 65 63 69 66 69 65 64 20 70 61 63 6b 61 67 | _ARRAY,.'Ignore.specified.packag |
54e80 | 65 28 73 29 2e 20 55 73 65 20 69 74 20 77 69 74 68 20 74 68 65 20 2d 2d 6f 75 74 64 61 74 65 64 | e(s)..Use.it.with.the.--outdated |
54ea0 | 20 6f 70 74 69 6f 6e 20 69 66 20 79 6f 75 20 64 6f 6e 5c 27 74 20 77 61 6e 74 20 74 6f 20 62 65 | .option.if.you.don\'t.want.to.be |
54ec0 | 20 69 6e 66 6f 72 6d 65 64 20 61 62 6f 75 74 20 6e 65 77 20 76 65 72 73 69 6f 6e 73 20 6f 66 20 | .informed.about.new.versions.of. |
54ee0 | 73 6f 6d 65 20 70 61 63 6b 61 67 65 73 2e 27 2c 20 6e 75 6c 6c 2c 20 24 74 68 69 73 2d 3e 73 75 | some.packages.',.null,.$this->su |
54f00 | 67 67 65 73 74 49 6e 73 74 61 6c 6c 65 64 50 61 63 6b 61 67 65 28 66 61 6c 73 65 29 29 2c 0a 6e | ggestInstalledPackage(false)),.n |
54f20 | 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6d 61 6a 6f 72 2d 6f 6e 6c 79 27 2c 20 27 4d 27 | ew.InputOption('major-only',.'M' |
54f40 | 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 53 68 6f 77 | ,.InputOption::VALUE_NONE,.'Show |
54f60 | 20 6f 6e 6c 79 20 70 61 63 6b 61 67 65 73 20 74 68 61 74 20 68 61 76 65 20 6d 61 6a 6f 72 20 53 | .only.packages.that.have.major.S |
54f80 | 65 6d 56 65 72 2d 63 6f 6d 70 61 74 69 62 6c 65 20 75 70 64 61 74 65 73 2e 20 55 73 65 20 77 69 | emVer-compatible.updates..Use.wi |
54fa0 | 74 68 20 74 68 65 20 2d 2d 6c 61 74 65 73 74 20 6f 72 20 2d 2d 6f 75 74 64 61 74 65 64 20 6f 70 | th.the.--latest.or.--outdated.op |
54fc0 | 74 69 6f 6e 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6d 69 6e 6f 72 2d | tion.'),.new.InputOption('minor- |
54fe0 | 6f 6e 6c 79 27 2c 20 27 6d 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e | only',.'m',.InputOption::VALUE_N |
55000 | 4f 4e 45 2c 20 27 53 68 6f 77 20 6f 6e 6c 79 20 70 61 63 6b 61 67 65 73 20 74 68 61 74 20 68 61 | ONE,.'Show.only.packages.that.ha |
55020 | 76 65 20 6d 69 6e 6f 72 20 53 65 6d 56 65 72 2d 63 6f 6d 70 61 74 69 62 6c 65 20 75 70 64 61 74 | ve.minor.SemVer-compatible.updat |
55040 | 65 73 2e 20 55 73 65 20 77 69 74 68 20 74 68 65 20 2d 2d 6c 61 74 65 73 74 20 6f 72 20 2d 2d 6f | es..Use.with.the.--latest.or.--o |
55060 | 75 74 64 61 74 65 64 20 6f 70 74 69 6f 6e 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 | utdated.option.'),.new.InputOpti |
55080 | 6f 6e 28 27 70 61 74 63 68 2d 6f 6e 6c 79 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 | on('patch-only',.null,.InputOpti |
550a0 | 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 53 68 6f 77 20 6f 6e 6c 79 20 70 61 63 6b 61 | on::VALUE_NONE,.'Show.only.packa |
550c0 | 67 65 73 20 74 68 61 74 20 68 61 76 65 20 70 61 74 63 68 20 53 65 6d 56 65 72 2d 63 6f 6d 70 61 | ges.that.have.patch.SemVer-compa |
550e0 | 74 69 62 6c 65 20 75 70 64 61 74 65 73 2e 20 55 73 65 20 77 69 74 68 20 74 68 65 20 2d 2d 6c 61 | tible.updates..Use.with.the.--la |
55100 | 74 65 73 74 20 6f 72 20 2d 2d 6f 75 74 64 61 74 65 64 20 6f 70 74 69 6f 6e 2e 27 29 2c 0a 6e 65 | test.or.--outdated.option.'),.ne |
55120 | 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 64 69 72 65 63 74 27 2c 20 27 44 27 2c 20 49 6e 70 | w.InputOption('direct',.'D',.Inp |
55140 | 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 53 68 6f 77 73 20 6f 6e 6c | utOption::VALUE_NONE,.'Shows.onl |
55160 | 79 20 70 61 63 6b 61 67 65 73 20 74 68 61 74 20 61 72 65 20 64 69 72 65 63 74 6c 79 20 72 65 71 | y.packages.that.are.directly.req |
55180 | 75 69 72 65 64 20 62 79 20 74 68 65 20 72 6f 6f 74 20 70 61 63 6b 61 67 65 27 29 2c 0a 6e 65 77 | uired.by.the.root.package'),.new |
551a0 | 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 73 74 72 69 63 74 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 | .InputOption('strict',.null,.Inp |
551c0 | 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 52 65 74 75 72 6e 20 61 20 | utOption::VALUE_NONE,.'Return.a. |
551e0 | 6e 6f 6e 2d 7a 65 72 6f 20 65 78 69 74 20 63 6f 64 65 20 77 68 65 6e 20 74 68 65 72 65 20 61 72 | non-zero.exit.code.when.there.ar |
55200 | 65 20 6f 75 74 64 61 74 65 64 20 70 61 63 6b 61 67 65 73 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 | e.outdated.packages'),.new.Input |
55220 | 4f 70 74 69 6f 6e 28 27 66 6f 72 6d 61 74 27 2c 20 27 66 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f | Option('format',.'f',.InputOptio |
55240 | 6e 3a 3a 56 41 4c 55 45 5f 52 45 51 55 49 52 45 44 2c 20 27 46 6f 72 6d 61 74 20 6f 66 20 74 68 | n::VALUE_REQUIRED,.'Format.of.th |
55260 | 65 20 6f 75 74 70 75 74 3a 20 74 65 78 74 20 6f 72 20 6a 73 6f 6e 27 2c 20 27 74 65 78 74 27 2c | e.output:.text.or.json',.'text', |
55280 | 20 5b 27 6a 73 6f 6e 27 2c 20 27 74 65 78 74 27 5d 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 | .['json',.'text']),.new.InputOpt |
552a0 | 69 6f 6e 28 27 6e 6f 2d 64 65 76 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a | ion('no-dev',.null,.InputOption: |
552c0 | 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 44 69 73 61 62 6c 65 73 20 73 65 61 72 63 68 20 69 6e | :VALUE_NONE,.'Disables.search.in |
552e0 | 20 72 65 71 75 69 72 65 2d 64 65 76 20 70 61 63 6b 61 67 65 73 2e 27 29 2c 0a 6e 65 77 20 49 6e | .require-dev.packages.'),.new.In |
55300 | 70 75 74 4f 70 74 69 6f 6e 28 27 69 67 6e 6f 72 65 2d 70 6c 61 74 66 6f 72 6d 2d 72 65 71 27 2c | putOption('ignore-platform-req', |
55320 | 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 52 45 51 55 49 52 | .null,.InputOption::VALUE_REQUIR |
55340 | 45 44 20 7c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 49 53 5f 41 52 52 41 59 | ED.|.InputOption::VALUE_IS_ARRAY |
55360 | 2c 20 27 49 67 6e 6f 72 65 20 61 20 73 70 65 63 69 66 69 63 20 70 6c 61 74 66 6f 72 6d 20 72 65 | ,.'Ignore.a.specific.platform.re |
55380 | 71 75 69 72 65 6d 65 6e 74 20 28 70 68 70 20 26 20 65 78 74 2d 20 70 61 63 6b 61 67 65 73 29 2e | quirement.(php.&.ext-.packages). |
553a0 | 20 55 73 65 20 77 69 74 68 20 74 68 65 20 2d 2d 6f 75 74 64 61 74 65 64 20 6f 70 74 69 6f 6e 27 | .Use.with.the.--outdated.option' |
553c0 | 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 69 67 6e 6f 72 65 2d 70 6c 61 74 66 | ),.new.InputOption('ignore-platf |
553e0 | 6f 72 6d 2d 72 65 71 73 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 | orm-reqs',.null,.InputOption::VA |
55400 | 4c 55 45 5f 4e 4f 4e 45 2c 20 27 49 67 6e 6f 72 65 20 61 6c 6c 20 70 6c 61 74 66 6f 72 6d 20 72 | LUE_NONE,.'Ignore.all.platform.r |
55420 | 65 71 75 69 72 65 6d 65 6e 74 73 20 28 70 68 70 20 26 20 65 78 74 2d 20 70 61 63 6b 61 67 65 73 | equirements.(php.&.ext-.packages |
55440 | 29 2e 20 55 73 65 20 77 69 74 68 20 74 68 65 20 2d 2d 6f 75 74 64 61 74 65 64 20 6f 70 74 69 6f | )..Use.with.the.--outdated.optio |
55460 | 6e 27 29 2c 0a 5d 29 0a 2d 3e 73 65 74 48 65 6c 70 28 0a 3c 3c 3c 45 4f 54 0a 54 68 65 20 73 68 | n'),.]).->setHelp(.<<<EOT.The.sh |
55480 | 6f 77 20 63 6f 6d 6d 61 6e 64 20 64 69 73 70 6c 61 79 73 20 64 65 74 61 69 6c 65 64 20 69 6e 66 | ow.command.displays.detailed.inf |
554a0 | 6f 72 6d 61 74 69 6f 6e 20 61 62 6f 75 74 20 61 20 70 61 63 6b 61 67 65 2c 20 6f 72 0a 6c 69 73 | ormation.about.a.package,.or.lis |
554c0 | 74 73 20 61 6c 6c 20 70 61 63 6b 61 67 65 73 20 61 76 61 69 6c 61 62 6c 65 2e 0a 0a 52 65 61 64 | ts.all.packages.available...Read |
554e0 | 20 6d 6f 72 65 20 61 74 20 68 74 74 70 73 3a 2f 2f 67 65 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 67 | .more.at.https://getcomposer.org |
55500 | 2f 64 6f 63 2f 30 33 2d 63 6c 69 2e 6d 64 23 73 68 6f 77 0a 45 4f 54 0a 29 0a 3b 0a 7d 0a 0a 70 | /doc/03-cli.md#show.EOT.).;.}..p |
55520 | 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 73 75 67 67 65 73 74 50 61 63 6b 61 67 65 | rotected.function.suggestPackage |
55540 | 42 61 73 65 64 4f 6e 4d 6f 64 65 28 29 3a 20 5c 43 6c 6f 73 75 72 65 0a 7b 0a 72 65 74 75 72 6e | BasedOnMode():.\Closure.{.return |
55560 | 20 66 75 6e 63 74 69 6f 6e 20 28 43 6f 6d 70 6c 65 74 69 6f 6e 49 6e 70 75 74 20 24 69 6e 70 75 | .function.(CompletionInput.$inpu |
55580 | 74 29 20 7b 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 61 76 61 69 | t).{.if.($input->getOption('avai |
555a0 | 6c 61 62 6c 65 27 29 20 7c 7c 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 61 6c | lable').||.$input->getOption('al |
555c0 | 6c 27 29 29 20 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 73 75 67 67 65 73 74 41 76 61 69 | l')).{.return.$this->suggestAvai |
555e0 | 6c 61 62 6c 65 50 61 63 6b 61 67 65 49 6e 63 6c 50 6c 61 74 66 6f 72 6d 28 29 28 24 69 6e 70 75 | lablePackageInclPlatform()($inpu |
55600 | 74 29 3b 0a 7d 0a 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 70 6c | t);.}..if.($input->getOption('pl |
55620 | 61 74 66 6f 72 6d 27 29 29 20 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 73 75 67 67 65 73 | atform')).{.return.$this->sugges |
55640 | 74 50 6c 61 74 66 6f 72 6d 50 61 63 6b 61 67 65 28 29 28 24 69 6e 70 75 74 29 3b 0a 7d 0a 0a 72 | tPlatformPackage()($input);.}..r |
55660 | 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 73 75 67 67 65 73 74 49 6e 73 74 61 6c 6c 65 64 50 61 63 | eturn.$this->suggestInstalledPac |
55680 | 6b 61 67 65 28 66 61 6c 73 65 29 28 24 69 6e 70 75 74 29 3b 0a 7d 3b 0a 7d 0a 0a 70 72 6f 74 65 | kage(false)($input);.};.}..prote |
556a0 | 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 65 78 65 63 75 74 65 28 49 6e 70 75 74 49 6e 74 65 72 | cted.function.execute(InputInter |
556c0 | 66 61 63 65 20 24 69 6e 70 75 74 2c 20 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 6f 75 | face.$input,.OutputInterface.$ou |
556e0 | 74 70 75 74 29 0a 7b 0a 24 74 68 69 73 2d 3e 76 65 72 73 69 6f 6e 50 61 72 73 65 72 20 3d 20 6e | tput).{.$this->versionParser.=.n |
55700 | 65 77 20 56 65 72 73 69 6f 6e 50 61 72 73 65 72 3b 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 | ew.VersionParser;.if.($input->ge |
55720 | 74 4f 70 74 69 6f 6e 28 27 74 72 65 65 27 29 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6e 69 74 53 74 | tOption('tree')).{.$this->initSt |
55740 | 79 6c 65 73 28 24 6f 75 74 70 75 74 29 3b 0a 7d 0a 0a 24 63 6f 6d 70 6f 73 65 72 20 3d 20 24 74 | yles($output);.}..$composer.=.$t |
55760 | 68 69 73 2d 3e 74 72 79 43 6f 6d 70 6f 73 65 72 28 29 3b 0a 24 69 6f 20 3d 20 24 74 68 69 73 2d | his->tryComposer();.$io.=.$this- |
55780 | 3e 67 65 74 49 4f 28 29 3b 0a 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e | >getIO();..if.($input->getOption |
557a0 | 28 27 69 6e 73 74 61 6c 6c 65 64 27 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 | ('installed')).{.$io->writeError |
557c0 | 28 27 3c 77 61 72 6e 69 6e 67 3e 59 6f 75 20 61 72 65 20 75 73 69 6e 67 20 74 68 65 20 64 65 70 | ('<warning>You.are.using.the.dep |
557e0 | 72 65 63 61 74 65 64 20 6f 70 74 69 6f 6e 20 22 69 6e 73 74 61 6c 6c 65 64 22 2e 20 4f 6e 6c 79 | recated.option."installed"..Only |
55800 | 20 69 6e 73 74 61 6c 6c 65 64 20 70 61 63 6b 61 67 65 73 20 61 72 65 20 73 68 6f 77 6e 20 62 79 | .installed.packages.are.shown.by |
55820 | 20 64 65 66 61 75 6c 74 20 6e 6f 77 2e 20 54 68 65 20 2d 2d 61 6c 6c 20 6f 70 74 69 6f 6e 20 63 | .default.now..The.--all.option.c |
55840 | 61 6e 20 62 65 20 75 73 65 64 20 74 6f 20 73 68 6f 77 20 61 6c 6c 20 70 61 63 6b 61 67 65 73 2e | an.be.used.to.show.all.packages. |
55860 | 3c 2f 77 61 72 6e 69 6e 67 3e 27 29 3b 0a 7d 0a 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 | </warning>');.}..if.($input->get |
55880 | 4f 70 74 69 6f 6e 28 27 6f 75 74 64 61 74 65 64 27 29 29 20 7b 0a 24 69 6e 70 75 74 2d 3e 73 65 | Option('outdated')).{.$input->se |
558a0 | 74 4f 70 74 69 6f 6e 28 27 6c 61 74 65 73 74 27 2c 20 74 72 75 65 29 3b 0a 7d 20 65 6c 73 65 69 | tOption('latest',.true);.}.elsei |
558c0 | 66 20 28 63 6f 75 6e 74 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 69 67 6e 6f | f.(count($input->getOption('igno |
558e0 | 72 65 27 29 29 20 3e 20 30 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 77 | re')).>.0).{.$io->writeError('<w |
55900 | 61 72 6e 69 6e 67 3e 59 6f 75 20 61 72 65 20 75 73 69 6e 67 20 74 68 65 20 6f 70 74 69 6f 6e 20 | arning>You.are.using.the.option. |
55920 | 22 69 67 6e 6f 72 65 22 20 66 6f 72 20 61 63 74 69 6f 6e 20 6f 74 68 65 72 20 74 68 61 6e 20 22 | "ignore".for.action.other.than." |
55940 | 6f 75 74 64 61 74 65 64 22 2c 20 69 74 20 77 69 6c 6c 20 62 65 20 69 67 6e 6f 72 65 64 2e 3c 2f | outdated",.it.will.be.ignored.</ |
55960 | 77 61 72 6e 69 6e 67 3e 27 29 3b 0a 7d 0a 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 | warning>');.}..if.($input->getOp |
55980 | 74 69 6f 6e 28 27 64 69 72 65 63 74 27 29 20 26 26 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 | tion('direct').&&.($input->getOp |
559a0 | 74 69 6f 6e 28 27 61 6c 6c 27 29 20 7c 7c 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e | tion('all').||.$input->getOption |
559c0 | 28 27 61 76 61 69 6c 61 62 6c 65 27 29 20 7c 7c 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 | ('available').||.$input->getOpti |
559e0 | 6f 6e 28 27 70 6c 61 74 66 6f 72 6d 27 29 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 | on('platform'))).{.$io->writeErr |
55a00 | 6f 72 28 27 54 68 65 20 2d 2d 64 69 72 65 63 74 20 28 2d 44 29 20 6f 70 74 69 6f 6e 20 69 73 20 | or('The.--direct.(-D).option.is. |
55a20 | 6e 6f 74 20 75 73 61 62 6c 65 20 69 6e 20 63 6f 6d 62 69 6e 61 74 69 6f 6e 20 77 69 74 68 20 2d | not.usable.in.combination.with.- |
55a40 | 2d 61 6c 6c 2c 20 2d 2d 70 6c 61 74 66 6f 72 6d 20 28 2d 70 29 20 6f 72 20 2d 2d 61 76 61 69 6c | -all,.--platform.(-p).or.--avail |
55a60 | 61 62 6c 65 20 28 2d 61 29 27 29 3b 0a 0a 72 65 74 75 72 6e 20 31 3b 0a 7d 0a 0a 69 66 20 28 24 | able.(-a)');..return.1;.}..if.($ |
55a80 | 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 74 72 65 65 27 29 20 26 26 20 28 24 69 6e | input->getOption('tree').&&.($in |
55aa0 | 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 61 6c 6c 27 29 20 7c 7c 20 24 69 6e 70 75 74 2d | put->getOption('all').||.$input- |
55ac0 | 3e 67 65 74 4f 70 74 69 6f 6e 28 27 61 76 61 69 6c 61 62 6c 65 27 29 29 29 20 7b 0a 24 69 6f 2d | >getOption('available'))).{.$io- |
55ae0 | 3e 77 72 69 74 65 45 72 72 6f 72 28 27 54 68 65 20 2d 2d 74 72 65 65 20 28 2d 74 29 20 6f 70 74 | >writeError('The.--tree.(-t).opt |
55b00 | 69 6f 6e 20 69 73 20 6e 6f 74 20 75 73 61 62 6c 65 20 69 6e 20 63 6f 6d 62 69 6e 61 74 69 6f 6e | ion.is.not.usable.in.combination |
55b20 | 20 77 69 74 68 20 2d 2d 61 6c 6c 20 6f 72 20 2d 2d 61 76 61 69 6c 61 62 6c 65 20 28 2d 61 29 27 | .with.--all.or.--available.(-a)' |
55b40 | 29 3b 0a 0a 72 65 74 75 72 6e 20 31 3b 0a 7d 0a 0a 69 66 20 28 63 6f 75 6e 74 28 61 72 72 61 79 | );..return.1;.}..if.(count(array |
55b60 | 5f 66 69 6c 74 65 72 28 5b 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 70 61 74 63 | _filter([$input->getOption('patc |
55b80 | 68 2d 6f 6e 6c 79 27 29 2c 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6d 69 6e | h-only'),.$input->getOption('min |
55ba0 | 6f 72 2d 6f 6e 6c 79 27 29 2c 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6d 61 | or-only'),.$input->getOption('ma |
55bc0 | 6a 6f 72 2d 6f 6e 6c 79 27 29 5d 29 29 20 3e 20 31 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 | jor-only')])).>.1).{.$io->writeE |
55be0 | 72 72 6f 72 28 27 4f 6e 6c 79 20 6f 6e 65 20 6f 66 20 2d 2d 6d 61 6a 6f 72 2d 6f 6e 6c 79 2c 20 | rror('Only.one.of.--major-only,. |
55c00 | 2d 2d 6d 69 6e 6f 72 2d 6f 6e 6c 79 20 6f 72 20 2d 2d 70 61 74 63 68 2d 6f 6e 6c 79 20 63 61 6e | --minor-only.or.--patch-only.can |
55c20 | 20 62 65 20 75 73 65 64 20 61 74 20 6f 6e 63 65 27 29 3b 0a 0a 72 65 74 75 72 6e 20 31 3b 0a 7d | .be.used.at.once');..return.1;.} |
55c40 | 0a 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 74 72 65 65 27 29 20 | ..if.($input->getOption('tree'). |
55c60 | 26 26 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6c 61 74 65 73 74 27 29 29 20 | &&.$input->getOption('latest')). |
55c80 | 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 54 68 65 20 2d 2d 74 72 65 65 20 28 2d | {.$io->writeError('The.--tree.(- |
55ca0 | 74 29 20 6f 70 74 69 6f 6e 20 69 73 20 6e 6f 74 20 75 73 61 62 6c 65 20 69 6e 20 63 6f 6d 62 69 | t).option.is.not.usable.in.combi |
55cc0 | 6e 61 74 69 6f 6e 20 77 69 74 68 20 2d 2d 6c 61 74 65 73 74 20 28 2d 6c 29 27 29 3b 0a 0a 72 65 | nation.with.--latest.(-l)');..re |
55ce0 | 74 75 72 6e 20 31 3b 0a 7d 0a 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e | turn.1;.}..if.($input->getOption |
55d00 | 28 27 74 72 65 65 27 29 20 26 26 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 70 | ('tree').&&.$input->getOption('p |
55d20 | 61 74 68 27 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 54 68 65 20 2d 2d | ath')).{.$io->writeError('The.-- |
55d40 | 74 72 65 65 20 28 2d 74 29 20 6f 70 74 69 6f 6e 20 69 73 20 6e 6f 74 20 75 73 61 62 6c 65 20 69 | tree.(-t).option.is.not.usable.i |
55d60 | 6e 20 63 6f 6d 62 69 6e 61 74 69 6f 6e 20 77 69 74 68 20 2d 2d 70 61 74 68 20 28 2d 50 29 27 29 | n.combination.with.--path.(-P)') |
55d80 | 3b 0a 0a 72 65 74 75 72 6e 20 31 3b 0a 7d 0a 0a 24 66 6f 72 6d 61 74 20 3d 20 24 69 6e 70 75 74 | ;..return.1;.}..$format.=.$input |
55da0 | 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 66 6f 72 6d 61 74 27 29 3b 0a 69 66 20 28 21 69 6e 5f 61 | ->getOption('format');.if.(!in_a |
55dc0 | 72 72 61 79 28 24 66 6f 72 6d 61 74 2c 20 5b 27 74 65 78 74 27 2c 20 27 6a 73 6f 6e 27 5d 29 29 | rray($format,.['text',.'json'])) |
55de0 | 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 73 70 72 69 6e 74 66 28 27 55 6e 73 75 | .{.$io->writeError(sprintf('Unsu |
55e00 | 70 70 6f 72 74 65 64 20 66 6f 72 6d 61 74 20 22 25 73 22 2e 20 53 65 65 20 68 65 6c 70 20 66 6f | pported.format."%s"..See.help.fo |
55e20 | 72 20 73 75 70 70 6f 72 74 65 64 20 66 6f 72 6d 61 74 73 2e 27 2c 20 24 66 6f 72 6d 61 74 29 29 | r.supported.formats.',.$format)) |
55e40 | 3b 0a 0a 72 65 74 75 72 6e 20 31 3b 0a 7d 0a 0a 24 70 6c 61 74 66 6f 72 6d 52 65 71 46 69 6c 74 | ;..return.1;.}..$platformReqFilt |
55e60 | 65 72 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 | er.=.$this->getPlatformRequireme |
55e80 | 6e 74 46 69 6c 74 65 72 28 24 69 6e 70 75 74 29 3b 0a 0a 0a 24 70 6c 61 74 66 6f 72 6d 4f 76 65 | ntFilter($input);...$platformOve |
55ea0 | 72 72 69 64 65 73 20 3d 20 5b 5d 3b 0a 69 66 20 28 24 63 6f 6d 70 6f 73 65 72 29 20 7b 0a 24 70 | rrides.=.[];.if.($composer).{.$p |
55ec0 | 6c 61 74 66 6f 72 6d 4f 76 65 72 72 69 64 65 73 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 | latformOverrides.=.$composer->ge |
55ee0 | 74 43 6f 6e 66 69 67 28 29 2d 3e 67 65 74 28 27 70 6c 61 74 66 6f 72 6d 27 29 3b 0a 7d 0a 24 70 | tConfig()->get('platform');.}.$p |
55f00 | 6c 61 74 66 6f 72 6d 52 65 70 6f 20 3d 20 6e 65 77 20 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 | latformRepo.=.new.PlatformReposi |
55f20 | 74 6f 72 79 28 5b 5d 2c 20 24 70 6c 61 74 66 6f 72 6d 4f 76 65 72 72 69 64 65 73 29 3b 0a 24 6c | tory([],.$platformOverrides);.$l |
55f40 | 6f 63 6b 65 64 52 65 70 6f 20 3d 20 6e 75 6c 6c 3b 0a 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 | ockedRepo.=.null;..if.($input->g |
55f60 | 65 74 4f 70 74 69 6f 6e 28 27 73 65 6c 66 27 29 29 20 7b 0a 24 70 61 63 6b 61 67 65 20 3d 20 63 | etOption('self')).{.$package.=.c |
55f80 | 6c 6f 6e 65 20 24 74 68 69 73 2d 3e 72 65 71 75 69 72 65 43 6f 6d 70 6f 73 65 72 28 29 2d 3e 67 | lone.$this->requireComposer()->g |
55fa0 | 65 74 50 61 63 6b 61 67 65 28 29 3b 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 | etPackage();.if.($input->getOpti |
55fc0 | 6f 6e 28 27 6e 61 6d 65 2d 6f 6e 6c 79 27 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 24 70 | on('name-only')).{.$io->write($p |
55fe0 | 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 29 3b 0a 0a 72 65 74 75 72 6e 20 30 3b 0a 7d | ackage->getName());..return.0;.} |
56000 | 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 41 72 67 75 6d 65 6e 74 28 27 70 61 63 6b 61 67 | .if.($input->getArgument('packag |
56020 | 65 27 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e | e')).{.throw.new.\InvalidArgumen |
56040 | 74 45 78 63 65 70 74 69 6f 6e 28 27 59 6f 75 20 63 61 6e 6e 6f 74 20 75 73 65 20 2d 2d 73 65 6c | tException('You.cannot.use.--sel |
56060 | 66 20 74 6f 67 65 74 68 65 72 20 77 69 74 68 20 61 20 70 61 63 6b 61 67 65 20 6e 61 6d 65 27 29 | f.together.with.a.package.name') |
56080 | 3b 0a 7d 0a 24 72 65 70 6f 73 20 3d 20 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 20 3d 20 6e 65 | ;.}.$repos.=.$installedRepo.=.ne |
560a0 | 77 20 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 28 5b 6e 65 77 20 52 6f 6f 74 50 | w.InstalledRepository([new.RootP |
560c0 | 61 63 6b 61 67 65 52 65 70 6f 73 69 74 6f 72 79 28 24 70 61 63 6b 61 67 65 29 5d 29 3b 0a 7d 20 | ackageRepository($package)]);.}. |
560e0 | 65 6c 73 65 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 70 6c 61 74 66 | elseif.($input->getOption('platf |
56100 | 6f 72 6d 27 29 29 20 7b 0a 24 72 65 70 6f 73 20 3d 20 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f | orm')).{.$repos.=.$installedRepo |
56120 | 20 3d 20 6e 65 77 20 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 28 5b 24 70 6c 61 | .=.new.InstalledRepository([$pla |
56140 | 74 66 6f 72 6d 52 65 70 6f 5d 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 | tformRepo]);.}.elseif.($input->g |
56160 | 65 74 4f 70 74 69 6f 6e 28 27 61 76 61 69 6c 61 62 6c 65 27 29 29 20 7b 0a 24 69 6e 73 74 61 6c | etOption('available')).{.$instal |
56180 | 6c 65 64 52 65 70 6f 20 3d 20 6e 65 77 20 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 | ledRepo.=.new.InstalledRepositor |
561a0 | 79 28 5b 24 70 6c 61 74 66 6f 72 6d 52 65 70 6f 5d 29 3b 0a 69 66 20 28 24 63 6f 6d 70 6f 73 65 | y([$platformRepo]);.if.($compose |
561c0 | 72 29 20 7b 0a 24 72 65 70 6f 73 20 3d 20 6e 65 77 20 43 6f 6d 70 6f 73 69 74 65 52 65 70 6f 73 | r).{.$repos.=.new.CompositeRepos |
561e0 | 69 74 6f 72 79 28 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 79 4d 61 | itory($composer->getRepositoryMa |
56200 | 6e 61 67 65 72 28 29 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 69 65 73 28 29 29 3b 0a 24 69 6e | nager()->getRepositories());.$in |
56220 | 73 74 61 6c 6c 65 64 52 65 70 6f 2d 3e 61 64 64 52 65 70 6f 73 69 74 6f 72 79 28 24 63 6f 6d 70 | stalledRepo->addRepository($comp |
56240 | 6f 73 65 72 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 79 4d 61 6e 61 67 65 72 28 29 2d 3e 67 65 | oser->getRepositoryManager()->ge |
56260 | 74 4c 6f 63 61 6c 52 65 70 6f 73 69 74 6f 72 79 28 29 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 64 | tLocalRepository());.}.else.{.$d |
56280 | 65 66 61 75 6c 74 52 65 70 6f 73 20 3d 20 52 65 70 6f 73 69 74 6f 72 79 46 61 63 74 6f 72 79 3a | efaultRepos.=.RepositoryFactory: |
562a0 | 3a 64 65 66 61 75 6c 74 52 65 70 6f 73 57 69 74 68 44 65 66 61 75 6c 74 4d 61 6e 61 67 65 72 28 | :defaultReposWithDefaultManager( |
562c0 | 24 69 6f 29 3b 0a 24 72 65 70 6f 73 20 3d 20 6e 65 77 20 43 6f 6d 70 6f 73 69 74 65 52 65 70 6f | $io);.$repos.=.new.CompositeRepo |
562e0 | 73 69 74 6f 72 79 28 24 64 65 66 61 75 6c 74 52 65 70 6f 73 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 | sitory($defaultRepos);.$io->writ |
56300 | 65 45 72 72 6f 72 28 27 4e 6f 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 20 66 6f 75 6e 64 20 69 | eError('No.composer.json.found.i |
56320 | 6e 20 74 68 65 20 63 75 72 72 65 6e 74 20 64 69 72 65 63 74 6f 72 79 2c 20 73 68 6f 77 69 6e 67 | n.the.current.directory,.showing |
56340 | 20 61 76 61 69 6c 61 62 6c 65 20 70 61 63 6b 61 67 65 73 20 66 72 6f 6d 20 27 20 2e 20 69 6d 70 | .available.packages.from.'...imp |
56360 | 6c 6f 64 65 28 27 2c 20 27 2c 20 61 72 72 61 79 5f 6b 65 79 73 28 24 64 65 66 61 75 6c 74 52 65 | lode(',.',.array_keys($defaultRe |
56380 | 70 6f 73 29 29 29 3b 0a 7d 0a 7d 20 65 6c 73 65 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f | pos)));.}.}.elseif.($input->getO |
563a0 | 70 74 69 6f 6e 28 27 61 6c 6c 27 29 20 26 26 20 24 63 6f 6d 70 6f 73 65 72 29 20 7b 0a 24 6c 6f | ption('all').&&.$composer).{.$lo |
563c0 | 63 61 6c 52 65 70 6f 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f | calRepo.=.$composer->getReposito |
563e0 | 72 79 4d 61 6e 61 67 65 72 28 29 2d 3e 67 65 74 4c 6f 63 61 6c 52 65 70 6f 73 69 74 6f 72 79 28 | ryManager()->getLocalRepository( |
56400 | 29 3b 0a 24 6c 6f 63 6b 65 72 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 4c 6f 63 6b 65 | );.$locker.=.$composer->getLocke |
56420 | 72 28 29 3b 0a 69 66 20 28 24 6c 6f 63 6b 65 72 2d 3e 69 73 4c 6f 63 6b 65 64 28 29 29 20 7b 0a | r();.if.($locker->isLocked()).{. |
56440 | 24 6c 6f 63 6b 65 64 52 65 70 6f 20 3d 20 24 6c 6f 63 6b 65 72 2d 3e 67 65 74 4c 6f 63 6b 65 64 | $lockedRepo.=.$locker->getLocked |
56460 | 52 65 70 6f 73 69 74 6f 72 79 28 74 72 75 65 29 3b 0a 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f | Repository(true);.$installedRepo |
56480 | 20 3d 20 6e 65 77 20 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 28 5b 24 6c 6f 63 | .=.new.InstalledRepository([$loc |
564a0 | 6b 65 64 52 65 70 6f 2c 20 24 6c 6f 63 61 6c 52 65 70 6f 2c 20 24 70 6c 61 74 66 6f 72 6d 52 65 | kedRepo,.$localRepo,.$platformRe |
564c0 | 70 6f 5d 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 20 3d 20 | po]);.}.else.{.$installedRepo.=. |
564e0 | 6e 65 77 20 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 28 5b 24 6c 6f 63 61 6c 52 | new.InstalledRepository([$localR |
56500 | 65 70 6f 2c 20 24 70 6c 61 74 66 6f 72 6d 52 65 70 6f 5d 29 3b 0a 7d 0a 24 72 65 70 6f 73 20 3d | epo,.$platformRepo]);.}.$repos.= |
56520 | 20 6e 65 77 20 43 6f 6d 70 6f 73 69 74 65 52 65 70 6f 73 69 74 6f 72 79 28 61 72 72 61 79 5f 6d | .new.CompositeRepository(array_m |
56540 | 65 72 67 65 28 5b 6e 65 77 20 46 69 6c 74 65 72 52 65 70 6f 73 69 74 6f 72 79 28 24 69 6e 73 74 | erge([new.FilterRepository($inst |
56560 | 61 6c 6c 65 64 52 65 70 6f 2c 20 5b 27 63 61 6e 6f 6e 69 63 61 6c 27 20 3d 3e 20 66 61 6c 73 65 | alledRepo,.['canonical'.=>.false |
56580 | 5d 29 5d 2c 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 79 4d 61 6e | ])],.$composer->getRepositoryMan |
565a0 | 61 67 65 72 28 29 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 69 65 73 28 29 29 29 3b 0a 7d 20 65 | ager()->getRepositories()));.}.e |
565c0 | 6c 73 65 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 61 6c 6c 27 29 29 | lseif.($input->getOption('all')) |
565e0 | 20 7b 0a 24 64 65 66 61 75 6c 74 52 65 70 6f 73 20 3d 20 52 65 70 6f 73 69 74 6f 72 79 46 61 63 | .{.$defaultRepos.=.RepositoryFac |
56600 | 74 6f 72 79 3a 3a 64 65 66 61 75 6c 74 52 65 70 6f 73 57 69 74 68 44 65 66 61 75 6c 74 4d 61 6e | tory::defaultReposWithDefaultMan |
56620 | 61 67 65 72 28 24 69 6f 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 4e 6f 20 63 | ager($io);.$io->writeError('No.c |
56640 | 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 20 66 6f 75 6e 64 20 69 6e 20 74 68 65 20 63 75 72 72 65 6e | omposer.json.found.in.the.curren |
56660 | 74 20 64 69 72 65 63 74 6f 72 79 2c 20 73 68 6f 77 69 6e 67 20 61 76 61 69 6c 61 62 6c 65 20 70 | t.directory,.showing.available.p |
56680 | 61 63 6b 61 67 65 73 20 66 72 6f 6d 20 27 20 2e 20 69 6d 70 6c 6f 64 65 28 27 2c 20 27 2c 20 61 | ackages.from.'...implode(',.',.a |
566a0 | 72 72 61 79 5f 6b 65 79 73 28 24 64 65 66 61 75 6c 74 52 65 70 6f 73 29 29 29 3b 0a 24 69 6e 73 | rray_keys($defaultRepos)));.$ins |
566c0 | 74 61 6c 6c 65 64 52 65 70 6f 20 3d 20 6e 65 77 20 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 | talledRepo.=.new.InstalledReposi |
566e0 | 74 6f 72 79 28 5b 24 70 6c 61 74 66 6f 72 6d 52 65 70 6f 5d 29 3b 0a 24 72 65 70 6f 73 20 3d 20 | tory([$platformRepo]);.$repos.=. |
56700 | 6e 65 77 20 43 6f 6d 70 6f 73 69 74 65 52 65 70 6f 73 69 74 6f 72 79 28 61 72 72 61 79 5f 6d 65 | new.CompositeRepository(array_me |
56720 | 72 67 65 28 5b 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 5d 2c 20 24 64 65 66 61 75 6c 74 52 65 | rge([$installedRepo],.$defaultRe |
56740 | 70 6f 73 29 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 | pos));.}.elseif.($input->getOpti |
56760 | 6f 6e 28 27 6c 6f 63 6b 65 64 27 29 29 20 7b 0a 69 66 20 28 21 24 63 6f 6d 70 6f 73 65 72 20 7c | on('locked')).{.if.(!$composer.| |
56780 | 7c 20 21 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 4c 6f 63 6b 65 72 28 29 2d 3e 69 73 4c 6f 63 | |.!$composer->getLocker()->isLoc |
567a0 | 6b 65 64 28 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 55 6e 65 78 70 65 63 74 65 64 56 61 | ked()).{.throw.new.\UnexpectedVa |
567c0 | 6c 75 65 45 78 63 65 70 74 69 6f 6e 28 27 41 20 76 61 6c 69 64 20 63 6f 6d 70 6f 73 65 72 2e 6a | lueException('A.valid.composer.j |
567e0 | 73 6f 6e 20 61 6e 64 20 63 6f 6d 70 6f 73 65 72 2e 6c 6f 63 6b 20 66 69 6c 65 73 20 69 73 20 72 | son.and.composer.lock.files.is.r |
56800 | 65 71 75 69 72 65 64 20 74 6f 20 72 75 6e 20 74 68 69 73 20 63 6f 6d 6d 61 6e 64 20 77 69 74 68 | equired.to.run.this.command.with |
56820 | 20 2d 2d 6c 6f 63 6b 65 64 27 29 3b 0a 7d 0a 24 6c 6f 63 6b 65 72 20 3d 20 24 63 6f 6d 70 6f 73 | .--locked');.}.$locker.=.$compos |
56840 | 65 72 2d 3e 67 65 74 4c 6f 63 6b 65 72 28 29 3b 0a 24 6c 6f 63 6b 65 64 52 65 70 6f 20 3d 20 24 | er->getLocker();.$lockedRepo.=.$ |
56860 | 6c 6f 63 6b 65 72 2d 3e 67 65 74 4c 6f 63 6b 65 64 52 65 70 6f 73 69 74 6f 72 79 28 21 24 69 6e | locker->getLockedRepository(!$in |
56880 | 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 64 65 76 27 29 29 3b 0a 24 72 65 70 6f | put->getOption('no-dev'));.$repo |
568a0 | 73 20 3d 20 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 20 3d 20 6e 65 77 20 49 6e 73 74 61 6c 6c | s.=.$installedRepo.=.new.Install |
568c0 | 65 64 52 65 70 6f 73 69 74 6f 72 79 28 5b 24 6c 6f 63 6b 65 64 52 65 70 6f 5d 29 3b 0a 7d 20 65 | edRepository([$lockedRepo]);.}.e |
568e0 | 6c 73 65 20 7b 0a 0a 69 66 20 28 21 24 63 6f 6d 70 6f 73 65 72 29 20 7b 0a 24 63 6f 6d 70 6f 73 | lse.{..if.(!$composer).{.$compos |
56900 | 65 72 20 3d 20 24 74 68 69 73 2d 3e 72 65 71 75 69 72 65 43 6f 6d 70 6f 73 65 72 28 29 3b 0a 7d | er.=.$this->requireComposer();.} |
56920 | 0a 24 72 6f 6f 74 50 6b 67 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 50 61 63 6b 61 67 | .$rootPkg.=.$composer->getPackag |
56940 | 65 28 29 3b 0a 24 72 65 70 6f 73 20 3d 20 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 20 3d 20 6e | e();.$repos.=.$installedRepo.=.n |
56960 | 65 77 20 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 28 5b 24 63 6f 6d 70 6f 73 65 | ew.InstalledRepository([$compose |
56980 | 72 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 79 4d 61 6e 61 67 65 72 28 29 2d 3e 67 65 74 4c 6f | r->getRepositoryManager()->getLo |
569a0 | 63 61 6c 52 65 70 6f 73 69 74 6f 72 79 28 29 5d 29 3b 0a 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e | calRepository()]);..if.($input-> |
569c0 | 67 65 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 64 65 76 27 29 29 20 7b 0a 24 70 61 63 6b 61 67 65 73 | getOption('no-dev')).{.$packages |
569e0 | 20 3d 20 52 65 70 6f 73 69 74 6f 72 79 55 74 69 6c 73 3a 3a 66 69 6c 74 65 72 52 65 71 75 69 72 | .=.RepositoryUtils::filterRequir |
56a00 | 65 64 50 61 63 6b 61 67 65 73 28 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 2d 3e 67 65 74 50 61 | edPackages($installedRepo->getPa |
56a20 | 63 6b 61 67 65 73 28 29 2c 20 24 72 6f 6f 74 50 6b 67 29 3b 0a 24 72 65 70 6f 73 20 3d 20 24 69 | ckages(),.$rootPkg);.$repos.=.$i |
56a40 | 6e 73 74 61 6c 6c 65 64 52 65 70 6f 20 3d 20 6e 65 77 20 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f | nstalledRepo.=.new.InstalledRepo |
56a60 | 73 69 74 6f 72 79 28 5b 6e 65 77 20 49 6e 73 74 61 6c 6c 65 64 41 72 72 61 79 52 65 70 6f 73 69 | sitory([new.InstalledArrayReposi |
56a80 | 74 6f 72 79 28 61 72 72 61 79 5f 6d 61 70 28 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 | tory(array_map(static.function.( |
56aa0 | 24 70 6b 67 29 3a 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 7b 0a 72 65 74 75 72 6e | $pkg):.PackageInterface.{.return |
56ac0 | 20 63 6c 6f 6e 65 20 24 70 6b 67 3b 0a 7d 2c 20 24 70 61 63 6b 61 67 65 73 29 29 5d 29 3b 0a 7d | .clone.$pkg;.},.$packages))]);.} |
56ae0 | 0a 0a 69 66 20 28 21 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 2d 3e 67 65 74 50 61 63 6b 61 67 | ..if.(!$installedRepo->getPackag |
56b00 | 65 73 28 29 20 26 26 20 28 24 72 6f 6f 74 50 6b 67 2d 3e 67 65 74 52 65 71 75 69 72 65 73 28 29 | es().&&.($rootPkg->getRequires() |
56b20 | 20 7c 7c 20 24 72 6f 6f 74 50 6b 67 2d 3e 67 65 74 44 65 76 52 65 71 75 69 72 65 73 28 29 29 29 | .||.$rootPkg->getDevRequires())) |
56b40 | 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 77 61 72 6e 69 6e 67 3e 4e 6f 20 | .{.$io->writeError('<warning>No. |
56b60 | 64 65 70 65 6e 64 65 6e 63 69 65 73 20 69 6e 73 74 61 6c 6c 65 64 2e 20 54 72 79 20 72 75 6e 6e | dependencies.installed..Try.runn |
56b80 | 69 6e 67 20 63 6f 6d 70 6f 73 65 72 20 69 6e 73 74 61 6c 6c 20 6f 72 20 75 70 64 61 74 65 2e 3c | ing.composer.install.or.update.< |
56ba0 | 2f 77 61 72 6e 69 6e 67 3e 27 29 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 24 63 6f 6d 70 6f 73 65 72 29 | /warning>');.}.}..if.($composer) |
56bc0 | 20 7b 0a 24 63 6f 6d 6d 61 6e 64 45 76 65 6e 74 20 3d 20 6e 65 77 20 43 6f 6d 6d 61 6e 64 45 76 | .{.$commandEvent.=.new.CommandEv |
56be0 | 65 6e 74 28 50 6c 75 67 69 6e 45 76 65 6e 74 73 3a 3a 43 4f 4d 4d 41 4e 44 2c 20 27 73 68 6f 77 | ent(PluginEvents::COMMAND,.'show |
56c00 | 27 2c 20 24 69 6e 70 75 74 2c 20 24 6f 75 74 70 75 74 29 3b 0a 24 63 6f 6d 70 6f 73 65 72 2d 3e | ',.$input,.$output);.$composer-> |
56c20 | 67 65 74 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 28 29 2d 3e 64 69 73 70 61 74 63 68 28 24 | getEventDispatcher()->dispatch($ |
56c40 | 63 6f 6d 6d 61 6e 64 45 76 65 6e 74 2d 3e 67 65 74 4e 61 6d 65 28 29 2c 20 24 63 6f 6d 6d 61 6e | commandEvent->getName(),.$comman |
56c60 | 64 45 76 65 6e 74 29 3b 0a 7d 0a 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f | dEvent);.}..if.($input->getOptio |
56c80 | 6e 28 27 6c 61 74 65 73 74 27 29 20 26 26 20 6e 75 6c 6c 20 3d 3d 3d 20 24 63 6f 6d 70 6f 73 65 | n('latest').&&.null.===.$compose |
56ca0 | 72 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 4e 6f 20 63 6f 6d 70 6f 73 65 | r).{.$io->writeError('No.compose |
56cc0 | 72 2e 6a 73 6f 6e 20 66 6f 75 6e 64 20 69 6e 20 74 68 65 20 63 75 72 72 65 6e 74 20 64 69 72 65 | r.json.found.in.the.current.dire |
56ce0 | 63 74 6f 72 79 2c 20 64 69 73 61 62 6c 69 6e 67 20 22 6c 61 74 65 73 74 22 20 6f 70 74 69 6f 6e | ctory,.disabling."latest".option |
56d00 | 27 29 3b 0a 24 69 6e 70 75 74 2d 3e 73 65 74 4f 70 74 69 6f 6e 28 27 6c 61 74 65 73 74 27 2c 20 | ');.$input->setOption('latest',. |
56d20 | 66 61 6c 73 65 29 3b 0a 7d 0a 0a 24 70 61 63 6b 61 67 65 46 69 6c 74 65 72 20 3d 20 24 69 6e 70 | false);.}..$packageFilter.=.$inp |
56d40 | 75 74 2d 3e 67 65 74 41 72 67 75 6d 65 6e 74 28 27 70 61 63 6b 61 67 65 27 29 3b 0a 0a 0a 69 66 | ut->getArgument('package');...if |
56d60 | 20 28 69 73 73 65 74 28 24 70 61 63 6b 61 67 65 29 29 20 7b 0a 24 76 65 72 73 69 6f 6e 73 20 3d | .(isset($package)).{.$versions.= |
56d80 | 20 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 20 3d | .[$package->getPrettyVersion().= |
56da0 | 3e 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 5d 3b 0a 7d 20 65 6c 73 | >.$package->getVersion()];.}.els |
56dc0 | 65 69 66 20 28 6e 75 6c 6c 20 21 3d 3d 20 24 70 61 63 6b 61 67 65 46 69 6c 74 65 72 20 26 26 20 | eif.(null.!==.$packageFilter.&&. |
56de0 | 21 73 74 72 5f 63 6f 6e 74 61 69 6e 73 28 24 70 61 63 6b 61 67 65 46 69 6c 74 65 72 2c 20 27 2a | !str_contains($packageFilter,.'* |
56e00 | 27 29 29 20 7b 0a 5b 24 70 61 63 6b 61 67 65 2c 20 24 76 65 72 73 69 6f 6e 73 5d 20 3d 20 24 74 | ')).{.[$package,.$versions].=.$t |
56e20 | 68 69 73 2d 3e 67 65 74 50 61 63 6b 61 67 65 28 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 2c 20 | his->getPackage($installedRepo,. |
56e40 | 24 72 65 70 6f 73 2c 20 24 70 61 63 6b 61 67 65 46 69 6c 74 65 72 2c 20 24 69 6e 70 75 74 2d 3e | $repos,.$packageFilter,.$input-> |
56e60 | 67 65 74 41 72 67 75 6d 65 6e 74 28 27 76 65 72 73 69 6f 6e 27 29 29 3b 0a 0a 69 66 20 28 21 69 | getArgument('version'));..if.(!i |
56e80 | 73 73 65 74 28 24 70 61 63 6b 61 67 65 29 29 20 7b 0a 24 6f 70 74 69 6f 6e 73 20 3d 20 24 69 6e | sset($package)).{.$options.=.$in |
56ea0 | 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 73 28 29 3b 0a 24 68 69 6e 74 20 3d 20 27 27 3b 0a 69 | put->getOptions();.$hint.=.'';.i |
56ec0 | 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6c 6f 63 6b 65 64 27 29 29 20 | f.($input->getOption('locked')). |
56ee0 | 7b 0a 24 68 69 6e 74 20 2e 3d 20 27 20 69 6e 20 6c 6f 63 6b 20 66 69 6c 65 27 3b 0a 7d 0a 69 66 | {.$hint..=.'.in.lock.file';.}.if |
56f00 | 20 28 69 73 73 65 74 28 24 6f 70 74 69 6f 6e 73 5b 27 77 6f 72 6b 69 6e 67 2d 64 69 72 27 5d 29 | .(isset($options['working-dir']) |
56f20 | 29 20 7b 0a 24 68 69 6e 74 20 2e 3d 20 27 20 69 6e 20 27 20 2e 20 24 6f 70 74 69 6f 6e 73 5b 27 | ).{.$hint..=.'.in.'...$options[' |
56f40 | 77 6f 72 6b 69 6e 67 2d 64 69 72 27 5d 20 2e 20 27 2f 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 27 | working-dir']...'/composer.json' |
56f60 | 3b 0a 7d 0a 69 66 20 28 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 3a 3a 69 73 50 6c | ;.}.if.(PlatformRepository::isPl |
56f80 | 61 74 66 6f 72 6d 50 61 63 6b 61 67 65 28 24 70 61 63 6b 61 67 65 46 69 6c 74 65 72 29 20 26 26 | atformPackage($packageFilter).&& |
56fa0 | 20 21 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 70 6c 61 74 66 6f 72 6d 27 29 29 | .!$input->getOption('platform')) |
56fc0 | 20 7b 0a 24 68 69 6e 74 20 2e 3d 20 27 2c 20 74 72 79 20 75 73 69 6e 67 20 2d 2d 70 6c 61 74 66 | .{.$hint..=.',.try.using.--platf |
56fe0 | 6f 72 6d 20 28 2d 70 29 20 74 6f 20 73 68 6f 77 20 70 6c 61 74 66 6f 72 6d 20 70 61 63 6b 61 67 | orm.(-p).to.show.platform.packag |
57000 | 65 73 27 3b 0a 7d 0a 69 66 20 28 21 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 61 | es';.}.if.(!$input->getOption('a |
57020 | 6c 6c 27 29 29 20 7b 0a 24 68 69 6e 74 20 2e 3d 20 27 2c 20 74 72 79 20 75 73 69 6e 67 20 2d 2d | ll')).{.$hint..=.',.try.using.-- |
57040 | 61 76 61 69 6c 61 62 6c 65 20 28 2d 61 29 20 74 6f 20 73 68 6f 77 20 61 6c 6c 20 61 76 61 69 6c | available.(-a).to.show.all.avail |
57060 | 61 62 6c 65 20 70 61 63 6b 61 67 65 73 27 3b 0a 7d 0a 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e | able.packages';.}..throw.new.\In |
57080 | 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 27 50 61 63 6b 61 67 65 20 | validArgumentException('Package. |
570a0 | 22 27 20 2e 20 24 70 61 63 6b 61 67 65 46 69 6c 74 65 72 20 2e 20 27 22 20 6e 6f 74 20 66 6f 75 | "'...$packageFilter...'".not.fou |
570c0 | 6e 64 27 2e 24 68 69 6e 74 2e 27 2e 27 29 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 69 73 73 65 74 28 24 | nd'.$hint.'.');.}.}..if.(isset($ |
570e0 | 70 61 63 6b 61 67 65 29 29 20 7b 0a 61 73 73 65 72 74 28 69 73 73 65 74 28 24 76 65 72 73 69 6f | package)).{.assert(isset($versio |
57100 | 6e 73 29 29 3b 0a 0a 24 65 78 69 74 43 6f 64 65 20 3d 20 30 3b 0a 69 66 20 28 24 69 6e 70 75 74 | ns));..$exitCode.=.0;.if.($input |
57120 | 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 74 72 65 65 27 29 29 20 7b 0a 24 61 72 72 61 79 54 72 65 | ->getOption('tree')).{.$arrayTre |
57140 | 65 20 3d 20 24 74 68 69 73 2d 3e 67 65 6e 65 72 61 74 65 50 61 63 6b 61 67 65 54 72 65 65 28 24 | e.=.$this->generatePackageTree($ |
57160 | 70 61 63 6b 61 67 65 2c 20 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 2c 20 24 72 65 70 6f 73 29 | package,.$installedRepo,.$repos) |
57180 | 3b 0a 0a 69 66 20 28 27 6a 73 6f 6e 27 20 3d 3d 3d 20 24 66 6f 72 6d 61 74 29 20 7b 0a 24 69 6f | ;..if.('json'.===.$format).{.$io |
571a0 | 2d 3e 77 72 69 74 65 28 4a 73 6f 6e 46 69 6c 65 3a 3a 65 6e 63 6f 64 65 28 5b 27 69 6e 73 74 61 | ->write(JsonFile::encode(['insta |
571c0 | 6c 6c 65 64 27 20 3d 3e 20 5b 24 61 72 72 61 79 54 72 65 65 5d 5d 29 29 3b 0a 7d 20 65 6c 73 65 | lled'.=>.[$arrayTree]]));.}.else |
571e0 | 20 7b 0a 24 74 68 69 73 2d 3e 64 69 73 70 6c 61 79 50 61 63 6b 61 67 65 54 72 65 65 28 5b 24 61 | .{.$this->displayPackageTree([$a |
57200 | 72 72 61 79 54 72 65 65 5d 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 65 78 69 74 43 6f 64 65 3b | rrayTree]);.}..return.$exitCode; |
57220 | 0a 7d 0a 0a 24 6c 61 74 65 73 74 50 61 63 6b 61 67 65 20 3d 20 6e 75 6c 6c 3b 0a 69 66 20 28 24 | .}..$latestPackage.=.null;.if.($ |
57240 | 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6c 61 74 65 73 74 27 29 29 20 7b 0a 24 6c | input->getOption('latest')).{.$l |
57260 | 61 74 65 73 74 50 61 63 6b 61 67 65 20 3d 20 24 74 68 69 73 2d 3e 66 69 6e 64 4c 61 74 65 73 74 | atestPackage.=.$this->findLatest |
57280 | 50 61 63 6b 61 67 65 28 24 70 61 63 6b 61 67 65 2c 20 24 63 6f 6d 70 6f 73 65 72 2c 20 24 70 6c | Package($package,.$composer,.$pl |
572a0 | 61 74 66 6f 72 6d 52 65 70 6f 2c 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6d | atformRepo,.$input->getOption('m |
572c0 | 61 6a 6f 72 2d 6f 6e 6c 79 27 29 2c 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 | ajor-only'),.$input->getOption(' |
572e0 | 6d 69 6e 6f 72 2d 6f 6e 6c 79 27 29 2c 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 | minor-only'),.$input->getOption( |
57300 | 27 70 61 74 63 68 2d 6f 6e 6c 79 27 29 2c 20 24 70 6c 61 74 66 6f 72 6d 52 65 71 46 69 6c 74 65 | 'patch-only'),.$platformReqFilte |
57320 | 72 29 3b 0a 7d 0a 69 66 20 28 0a 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6f 75 | r);.}.if.(.$input->getOption('ou |
57340 | 74 64 61 74 65 64 27 29 0a 26 26 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 73 | tdated').&&.$input->getOption('s |
57360 | 74 72 69 63 74 27 29 0a 26 26 20 6e 75 6c 6c 20 21 3d 3d 20 24 6c 61 74 65 73 74 50 61 63 6b 61 | trict').&&.null.!==.$latestPacka |
57380 | 67 65 0a 26 26 20 24 6c 61 74 65 73 74 50 61 63 6b 61 67 65 2d 3e 67 65 74 46 75 6c 6c 50 72 65 | ge.&&.$latestPackage->getFullPre |
573a0 | 74 74 79 56 65 72 73 69 6f 6e 28 29 20 21 3d 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 46 75 | ttyVersion().!==.$package->getFu |
573c0 | 6c 6c 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 0a 26 26 20 28 21 24 6c 61 74 65 73 74 50 61 | llPrettyVersion().&&.(!$latestPa |
573e0 | 63 6b 61 67 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 | ckage.instanceof.CompletePackage |
57400 | 49 6e 74 65 72 66 61 63 65 20 7c 7c 20 21 24 6c 61 74 65 73 74 50 61 63 6b 61 67 65 2d 3e 69 73 | Interface.||.!$latestPackage->is |
57420 | 41 62 61 6e 64 6f 6e 65 64 28 29 29 0a 29 20 7b 0a 24 65 78 69 74 43 6f 64 65 20 3d 20 31 3b 0a | Abandoned()).).{.$exitCode.=.1;. |
57440 | 7d 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 70 61 74 68 27 29 29 | }.if.($input->getOption('path')) |
57460 | 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 | .{.$io->write($package->getName( |
57480 | 29 2c 20 66 61 6c 73 65 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 20 27 20 2e 20 73 74 72 74 | ),.false);.$io->write('.'...strt |
574a0 | 6f 6b 28 72 65 61 6c 70 61 74 68 28 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 49 6e 73 74 61 6c | ok(realpath($composer->getInstal |
574c0 | 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 72 28 29 2d 3e 67 65 74 49 6e 73 74 61 6c 6c 50 61 74 68 28 | lationManager()->getInstallPath( |
574e0 | 24 70 61 63 6b 61 67 65 29 29 2c 20 22 5c 72 5c 6e 22 29 29 3b 0a 0a 72 65 74 75 72 6e 20 24 65 | $package)),."\r\n"));..return.$e |
57500 | 78 69 74 43 6f 64 65 3b 0a 7d 0a 0a 69 66 20 28 27 6a 73 6f 6e 27 20 3d 3d 3d 20 24 66 6f 72 6d | xitCode;.}..if.('json'.===.$form |
57520 | 61 74 29 20 7b 0a 24 74 68 69 73 2d 3e 70 72 69 6e 74 50 61 63 6b 61 67 65 49 6e 66 6f 41 73 4a | at).{.$this->printPackageInfoAsJ |
57540 | 73 6f 6e 28 24 70 61 63 6b 61 67 65 2c 20 24 76 65 72 73 69 6f 6e 73 2c 20 24 69 6e 73 74 61 6c | son($package,.$versions,.$instal |
57560 | 6c 65 64 52 65 70 6f 2c 20 24 6c 61 74 65 73 74 50 61 63 6b 61 67 65 20 3f 3a 20 6e 75 6c 6c 29 | ledRepo,.$latestPackage.?:.null) |
57580 | 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 74 68 69 73 2d 3e 70 72 69 6e 74 50 61 63 6b 61 67 65 49 6e | ;.}.else.{.$this->printPackageIn |
575a0 | 66 6f 28 24 70 61 63 6b 61 67 65 2c 20 24 76 65 72 73 69 6f 6e 73 2c 20 24 69 6e 73 74 61 6c 6c | fo($package,.$versions,.$install |
575c0 | 65 64 52 65 70 6f 2c 20 24 6c 61 74 65 73 74 50 61 63 6b 61 67 65 20 3f 3a 20 6e 75 6c 6c 29 3b | edRepo,.$latestPackage.?:.null); |
575e0 | 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 65 78 69 74 43 6f 64 65 3b 0a 7d 0a 0a 0a 69 66 20 28 24 69 | .}..return.$exitCode;.}...if.($i |
57600 | 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 74 72 65 65 27 29 29 20 7b 0a 24 72 6f 6f 74 | nput->getOption('tree')).{.$root |
57620 | 52 65 71 75 69 72 65 73 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 52 6f 6f 74 52 65 71 75 69 72 65 | Requires.=.$this->getRootRequire |
57640 | 73 28 29 3b 0a 24 70 61 63 6b 61 67 65 73 20 3d 20 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 2d | s();.$packages.=.$installedRepo- |
57660 | 3e 67 65 74 50 61 63 6b 61 67 65 73 28 29 3b 0a 75 73 6f 72 74 28 24 70 61 63 6b 61 67 65 73 2c | >getPackages();.usort($packages, |
57680 | 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 42 61 73 65 50 61 63 6b 61 67 65 20 24 61 | .static.function.(BasePackage.$a |
576a0 | 2c 20 42 61 73 65 50 61 63 6b 61 67 65 20 24 62 29 3a 20 69 6e 74 20 7b 0a 72 65 74 75 72 6e 20 | ,.BasePackage.$b):.int.{.return. |
576c0 | 73 74 72 63 6d 70 28 28 73 74 72 69 6e 67 29 20 24 61 2c 20 28 73 74 72 69 6e 67 29 20 24 62 29 | strcmp((string).$a,.(string).$b) |
576e0 | 3b 0a 7d 29 3b 0a 24 61 72 72 61 79 54 72 65 65 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 | ;.});.$arrayTree.=.[];.foreach.( |
57700 | 24 70 61 63 6b 61 67 65 73 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 69 66 20 28 69 6e 5f | $packages.as.$package).{.if.(in_ |
57720 | 61 72 72 61 79 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 2c 20 24 72 6f 6f 74 | array($package->getName(),.$root |
57740 | 52 65 71 75 69 72 65 73 2c 20 74 72 75 65 29 29 20 7b 0a 24 61 72 72 61 79 54 72 65 65 5b 5d 20 | Requires,.true)).{.$arrayTree[]. |
57760 | 3d 20 24 74 68 69 73 2d 3e 67 65 6e 65 72 61 74 65 50 61 63 6b 61 67 65 54 72 65 65 28 24 70 61 | =.$this->generatePackageTree($pa |
57780 | 63 6b 61 67 65 2c 20 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 2c 20 24 72 65 70 6f 73 29 3b 0a | ckage,.$installedRepo,.$repos);. |
577a0 | 7d 0a 7d 0a 0a 69 66 20 28 27 6a 73 6f 6e 27 20 3d 3d 3d 20 24 66 6f 72 6d 61 74 29 20 7b 0a 24 | }.}..if.('json'.===.$format).{.$ |
577c0 | 69 6f 2d 3e 77 72 69 74 65 28 4a 73 6f 6e 46 69 6c 65 3a 3a 65 6e 63 6f 64 65 28 5b 27 69 6e 73 | io->write(JsonFile::encode(['ins |
577e0 | 74 61 6c 6c 65 64 27 20 3d 3e 20 24 61 72 72 61 79 54 72 65 65 5d 29 29 3b 0a 7d 20 65 6c 73 65 | talled'.=>.$arrayTree]));.}.else |
57800 | 20 7b 0a 24 74 68 69 73 2d 3e 64 69 73 70 6c 61 79 50 61 63 6b 61 67 65 54 72 65 65 28 24 61 72 | .{.$this->displayPackageTree($ar |
57820 | 72 61 79 54 72 65 65 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 0a 0a 0a 24 70 61 63 | rayTree);.}..return.0;.}....$pac |
57840 | 6b 61 67 65 73 20 3d 20 5b 5d 3b 0a 24 70 61 63 6b 61 67 65 46 69 6c 74 65 72 52 65 67 65 78 20 | kages.=.[];.$packageFilterRegex. |
57860 | 3d 20 6e 75 6c 6c 3b 0a 69 66 20 28 6e 75 6c 6c 20 21 3d 3d 20 24 70 61 63 6b 61 67 65 46 69 6c | =.null;.if.(null.!==.$packageFil |
57880 | 74 65 72 29 20 7b 0a 24 70 61 63 6b 61 67 65 46 69 6c 74 65 72 52 65 67 65 78 20 3d 20 27 7b 5e | ter).{.$packageFilterRegex.=.'{^ |
578a0 | 27 2e 73 74 72 5f 72 65 70 6c 61 63 65 28 27 5c 5c 2a 27 2c 20 27 2e 2a 3f 27 2c 20 70 72 65 67 | '.str_replace('\\*',.'.*?',.preg |
578c0 | 5f 71 75 6f 74 65 28 24 70 61 63 6b 61 67 65 46 69 6c 74 65 72 29 29 2e 27 24 7d 69 27 3b 0a 7d | _quote($packageFilter)).'$}i';.} |
578e0 | 0a 0a 24 70 61 63 6b 61 67 65 4c 69 73 74 46 69 6c 74 65 72 20 3d 20 6e 75 6c 6c 3b 0a 69 66 20 | ..$packageListFilter.=.null;.if. |
57900 | 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 64 69 72 65 63 74 27 29 29 20 7b 0a | ($input->getOption('direct')).{. |
57920 | 24 70 61 63 6b 61 67 65 4c 69 73 74 46 69 6c 74 65 72 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 52 | $packageListFilter.=.$this->getR |
57940 | 6f 6f 74 52 65 71 75 69 72 65 73 28 29 3b 0a 7d 0a 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 | ootRequires();.}..if.($input->ge |
57960 | 74 4f 70 74 69 6f 6e 28 27 70 61 74 68 27 29 20 26 26 20 6e 75 6c 6c 20 3d 3d 3d 20 24 63 6f 6d | tOption('path').&&.null.===.$com |
57980 | 70 6f 73 65 72 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 4e 6f 20 63 6f 6d | poser).{.$io->writeError('No.com |
579a0 | 70 6f 73 65 72 2e 6a 73 6f 6e 20 66 6f 75 6e 64 20 69 6e 20 74 68 65 20 63 75 72 72 65 6e 74 20 | poser.json.found.in.the.current. |
579c0 | 64 69 72 65 63 74 6f 72 79 2c 20 64 69 73 61 62 6c 69 6e 67 20 22 70 61 74 68 22 20 6f 70 74 69 | directory,.disabling."path".opti |
579e0 | 6f 6e 27 29 3b 0a 24 69 6e 70 75 74 2d 3e 73 65 74 4f 70 74 69 6f 6e 28 27 70 61 74 68 27 2c 20 | on');.$input->setOption('path',. |
57a00 | 66 61 6c 73 65 29 3b 0a 7d 0a 0a 66 6f 72 65 61 63 68 20 28 52 65 70 6f 73 69 74 6f 72 79 55 74 | false);.}..foreach.(RepositoryUt |
57a20 | 69 6c 73 3a 3a 66 6c 61 74 74 65 6e 52 65 70 6f 73 69 74 6f 72 69 65 73 28 24 72 65 70 6f 73 29 | ils::flattenRepositories($repos) |
57a40 | 20 61 73 20 24 72 65 70 6f 29 20 7b 0a 69 66 20 28 24 72 65 70 6f 20 3d 3d 3d 20 24 70 6c 61 74 | .as.$repo).{.if.($repo.===.$plat |
57a60 | 66 6f 72 6d 52 65 70 6f 29 20 7b 0a 24 74 79 70 65 20 3d 20 27 70 6c 61 74 66 6f 72 6d 27 3b 0a | formRepo).{.$type.=.'platform';. |
57a80 | 7d 20 65 6c 73 65 69 66 20 28 24 6c 6f 63 6b 65 64 52 65 70 6f 20 21 3d 3d 20 6e 75 6c 6c 20 26 | }.elseif.($lockedRepo.!==.null.& |
57aa0 | 26 20 24 72 65 70 6f 20 3d 3d 3d 20 24 6c 6f 63 6b 65 64 52 65 70 6f 29 20 7b 0a 24 74 79 70 65 | &.$repo.===.$lockedRepo).{.$type |
57ac0 | 20 3d 20 27 6c 6f 63 6b 65 64 27 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 72 65 70 6f 20 3d 3d 3d | .=.'locked';.}.elseif.($repo.=== |
57ae0 | 20 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 20 7c 7c 20 69 6e 5f 61 72 72 61 79 28 24 72 65 70 | .$installedRepo.||.in_array($rep |
57b00 | 6f 2c 20 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 69 | o,.$installedRepo->getRepositori |
57b20 | 65 73 28 29 2c 20 74 72 75 65 29 29 20 7b 0a 24 74 79 70 65 20 3d 20 27 69 6e 73 74 61 6c 6c 65 | es(),.true)).{.$type.=.'installe |
57b40 | 64 27 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 74 79 70 65 20 3d 20 27 61 76 61 69 6c 61 62 6c 65 27 | d';.}.else.{.$type.=.'available' |
57b60 | 3b 0a 7d 0a 69 66 20 28 24 72 65 70 6f 20 69 6e 73 74 61 6e 63 65 6f 66 20 43 6f 6d 70 6f 73 65 | ;.}.if.($repo.instanceof.Compose |
57b80 | 72 52 65 70 6f 73 69 74 6f 72 79 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 72 65 70 6f 2d 3e 67 | rRepository).{.foreach.($repo->g |
57ba0 | 65 74 50 61 63 6b 61 67 65 4e 61 6d 65 73 28 24 70 61 63 6b 61 67 65 46 69 6c 74 65 72 29 20 61 | etPackageNames($packageFilter).a |
57bc0 | 73 20 24 6e 61 6d 65 29 20 7b 0a 24 70 61 63 6b 61 67 65 73 5b 24 74 79 70 65 5d 5b 24 6e 61 6d | s.$name).{.$packages[$type][$nam |
57be0 | 65 5d 20 3d 20 24 6e 61 6d 65 3b 0a 7d 0a 7d 20 65 6c 73 65 20 7b 0a 66 6f 72 65 61 63 68 20 28 | e].=.$name;.}.}.else.{.foreach.( |
57c00 | 24 72 65 70 6f 2d 3e 67 65 74 50 61 63 6b 61 67 65 73 28 29 20 61 73 20 24 70 61 63 6b 61 67 65 | $repo->getPackages().as.$package |
57c20 | 29 20 7b 0a 69 66 20 28 21 69 73 73 65 74 28 24 70 61 63 6b 61 67 65 73 5b 24 74 79 70 65 5d 5b | ).{.if.(!isset($packages[$type][ |
57c40 | 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 29 0a 7c 7c 20 21 69 73 5f 6f 62 6a | $package->getName()]).||.!is_obj |
57c60 | 65 63 74 28 24 70 61 63 6b 61 67 65 73 5b 24 74 79 70 65 5d 5b 24 70 61 63 6b 61 67 65 2d 3e 67 | ect($packages[$type][$package->g |
57c80 | 65 74 4e 61 6d 65 28 29 5d 29 0a 7c 7c 20 76 65 72 73 69 6f 6e 5f 63 6f 6d 70 61 72 65 28 24 70 | etName()]).||.version_compare($p |
57ca0 | 61 63 6b 61 67 65 73 5b 24 74 79 70 65 5d 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 | ackages[$type][$package->getName |
57cc0 | 28 29 5d 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 2c 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 | ()]->getVersion(),.$package->get |
57ce0 | 56 65 72 73 69 6f 6e 28 29 2c 20 27 3c 27 29 0a 29 20 7b 0a 77 68 69 6c 65 20 28 24 70 61 63 6b | Version(),.'<').).{.while.($pack |
57d00 | 61 67 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 41 6c 69 61 73 50 61 63 6b 61 67 65 29 20 7b 0a 24 | age.instanceof.AliasPackage).{.$ |
57d20 | 70 61 63 6b 61 67 65 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 41 6c 69 61 73 4f 66 28 29 | package.=.$package->getAliasOf() |
57d40 | 3b 0a 7d 0a 69 66 20 28 21 24 70 61 63 6b 61 67 65 46 69 6c 74 65 72 52 65 67 65 78 20 7c 7c 20 | ;.}.if.(!$packageFilterRegex.||. |
57d60 | 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 24 70 61 63 6b 61 67 65 46 69 6c 74 65 72 52 65 67 65 | Preg::isMatch($packageFilterRege |
57d80 | 78 2c 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 29 29 20 7b 0a 69 66 20 28 6e | x,.$package->getName())).{.if.(n |
57da0 | 75 6c 6c 20 3d 3d 3d 20 24 70 61 63 6b 61 67 65 4c 69 73 74 46 69 6c 74 65 72 20 7c 7c 20 69 6e | ull.===.$packageListFilter.||.in |
57dc0 | 5f 61 72 72 61 79 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 2c 20 24 70 61 63 | _array($package->getName(),.$pac |
57de0 | 6b 61 67 65 4c 69 73 74 46 69 6c 74 65 72 2c 20 74 72 75 65 29 29 20 7b 0a 24 70 61 63 6b 61 67 | kageListFilter,.true)).{.$packag |
57e00 | 65 73 5b 24 74 79 70 65 5d 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 20 3d | es[$type][$package->getName()].= |
57e20 | 20 24 70 61 63 6b 61 67 65 3b 0a 7d 0a 7d 0a 7d 0a 7d 0a 69 66 20 28 24 72 65 70 6f 20 3d 3d 3d | .$package;.}.}.}.}.if.($repo.=== |
57e40 | 20 24 70 6c 61 74 66 6f 72 6d 52 65 70 6f 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 70 6c 61 74 | .$platformRepo).{.foreach.($plat |
57e60 | 66 6f 72 6d 52 65 70 6f 2d 3e 67 65 74 44 69 73 61 62 6c 65 64 50 61 63 6b 61 67 65 73 28 29 20 | formRepo->getDisabledPackages(). |
57e80 | 61 73 20 24 6e 61 6d 65 20 3d 3e 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 24 70 61 63 6b 61 67 65 | as.$name.=>.$package).{.$package |
57ea0 | 73 5b 24 74 79 70 65 5d 5b 24 6e 61 6d 65 5d 20 3d 20 24 70 61 63 6b 61 67 65 3b 0a 7d 0a 7d 0a | s[$type][$name].=.$package;.}.}. |
57ec0 | 7d 0a 7d 0a 0a 24 73 68 6f 77 41 6c 6c 54 79 70 65 73 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 | }.}..$showAllTypes.=.$input->get |
57ee0 | 4f 70 74 69 6f 6e 28 27 61 6c 6c 27 29 3b 0a 24 73 68 6f 77 4c 61 74 65 73 74 20 3d 20 24 69 6e | Option('all');.$showLatest.=.$in |
57f00 | 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6c 61 74 65 73 74 27 29 3b 0a 24 73 68 6f 77 4d | put->getOption('latest');.$showM |
57f20 | 61 6a 6f 72 4f 6e 6c 79 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6d 61 | ajorOnly.=.$input->getOption('ma |
57f40 | 6a 6f 72 2d 6f 6e 6c 79 27 29 3b 0a 24 73 68 6f 77 4d 69 6e 6f 72 4f 6e 6c 79 20 3d 20 24 69 6e | jor-only');.$showMinorOnly.=.$in |
57f60 | 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6d 69 6e 6f 72 2d 6f 6e 6c 79 27 29 3b 0a 24 73 | put->getOption('minor-only');.$s |
57f80 | 68 6f 77 50 61 74 63 68 4f 6e 6c 79 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e | howPatchOnly.=.$input->getOption |
57fa0 | 28 27 70 61 74 63 68 2d 6f 6e 6c 79 27 29 3b 0a 24 69 67 6e 6f 72 65 64 50 61 63 6b 61 67 65 73 | ('patch-only');.$ignoredPackages |
57fc0 | 20 3d 20 61 72 72 61 79 5f 6d 61 70 28 27 73 74 72 74 6f 6c 6f 77 65 72 27 2c 20 24 69 6e 70 75 | .=.array_map('strtolower',.$inpu |
57fe0 | 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 69 67 6e 6f 72 65 27 29 29 3b 0a 24 69 6e 64 65 6e 74 | t->getOption('ignore'));.$indent |
58000 | 20 3d 20 24 73 68 6f 77 41 6c 6c 54 79 70 65 73 20 3f 20 27 20 20 27 20 3a 20 27 27 3b 0a 0a 24 | .=.$showAllTypes.?.'..'.:.'';..$ |
58020 | 6c 61 74 65 73 74 50 61 63 6b 61 67 65 73 20 3d 20 5b 5d 3b 0a 24 65 78 69 74 43 6f 64 65 20 3d | latestPackages.=.[];.$exitCode.= |
58040 | 20 30 3b 0a 24 76 69 65 77 44 61 74 61 20 3d 20 5b 5d 3b 0a 24 76 69 65 77 4d 65 74 61 44 61 74 | .0;.$viewData.=.[];.$viewMetaDat |
58060 | 61 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 5b 27 70 6c 61 74 66 6f 72 6d 27 20 3d 3e 20 | a.=.[];.foreach.(['platform'.=>. |
58080 | 74 72 75 65 2c 20 27 6c 6f 63 6b 65 64 27 20 3d 3e 20 74 72 75 65 2c 20 27 61 76 61 69 6c 61 62 | true,.'locked'.=>.true,.'availab |
580a0 | 6c 65 27 20 3d 3e 20 66 61 6c 73 65 2c 20 27 69 6e 73 74 61 6c 6c 65 64 27 20 3d 3e 20 74 72 75 | le'.=>.false,.'installed'.=>.tru |
580c0 | 65 5d 20 61 73 20 24 74 79 70 65 20 3d 3e 20 24 73 68 6f 77 56 65 72 73 69 6f 6e 29 20 7b 0a 69 | e].as.$type.=>.$showVersion).{.i |
580e0 | 66 20 28 69 73 73 65 74 28 24 70 61 63 6b 61 67 65 73 5b 24 74 79 70 65 5d 29 29 20 7b 0a 6b 73 | f.(isset($packages[$type])).{.ks |
58100 | 6f 72 74 28 24 70 61 63 6b 61 67 65 73 5b 24 74 79 70 65 5d 29 3b 0a 0a 24 6e 61 6d 65 4c 65 6e | ort($packages[$type]);..$nameLen |
58120 | 67 74 68 20 3d 20 24 76 65 72 73 69 6f 6e 4c 65 6e 67 74 68 20 3d 20 24 6c 61 74 65 73 74 4c 65 | gth.=.$versionLength.=.$latestLe |
58140 | 6e 67 74 68 20 3d 20 30 3b 0a 0a 69 66 20 28 24 73 68 6f 77 4c 61 74 65 73 74 20 26 26 20 24 73 | ngth.=.0;..if.($showLatest.&&.$s |
58160 | 68 6f 77 56 65 72 73 69 6f 6e 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 73 | howVersion).{.foreach.($packages |
58180 | 5b 24 74 79 70 65 5d 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 69 66 20 28 69 73 5f 6f 62 | [$type].as.$package).{.if.(is_ob |
581a0 | 6a 65 63 74 28 24 70 61 63 6b 61 67 65 29 29 20 7b 0a 24 6c 61 74 65 73 74 50 61 63 6b 61 67 65 | ject($package)).{.$latestPackage |
581c0 | 20 3d 20 24 74 68 69 73 2d 3e 66 69 6e 64 4c 61 74 65 73 74 50 61 63 6b 61 67 65 28 24 70 61 63 | .=.$this->findLatestPackage($pac |
581e0 | 6b 61 67 65 2c 20 24 63 6f 6d 70 6f 73 65 72 2c 20 24 70 6c 61 74 66 6f 72 6d 52 65 70 6f 2c 20 | kage,.$composer,.$platformRepo,. |
58200 | 24 73 68 6f 77 4d 61 6a 6f 72 4f 6e 6c 79 2c 20 24 73 68 6f 77 4d 69 6e 6f 72 4f 6e 6c 79 2c 20 | $showMajorOnly,.$showMinorOnly,. |
58220 | 24 73 68 6f 77 50 61 74 63 68 4f 6e 6c 79 2c 20 24 70 6c 61 74 66 6f 72 6d 52 65 71 46 69 6c 74 | $showPatchOnly,.$platformReqFilt |
58240 | 65 72 29 3b 0a 69 66 20 28 24 6c 61 74 65 73 74 50 61 63 6b 61 67 65 20 3d 3d 3d 20 6e 75 6c 6c | er);.if.($latestPackage.===.null |
58260 | 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 24 6c 61 74 65 73 74 50 61 63 6b 61 67 65 73 | ).{.continue;.}..$latestPackages |
58280 | 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 4e 61 6d 65 28 29 5d 20 3d 20 24 6c | [$package->getPrettyName()].=.$l |
582a0 | 61 74 65 73 74 50 61 63 6b 61 67 65 3b 0a 7d 0a 7d 0a 7d 0a 0a 24 77 72 69 74 65 50 61 74 68 20 | atestPackage;.}.}.}..$writePath. |
582c0 | 3d 20 21 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6e 61 6d 65 2d 6f 6e 6c 79 27 | =.!$input->getOption('name-only' |
582e0 | 29 20 26 26 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 70 61 74 68 27 29 3b 0a | ).&&.$input->getOption('path');. |
58300 | 24 77 72 69 74 65 56 65 72 73 69 6f 6e 20 3d 20 21 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 | $writeVersion.=.!$input->getOpti |
58320 | 6f 6e 28 27 6e 61 6d 65 2d 6f 6e 6c 79 27 29 20 26 26 20 21 24 69 6e 70 75 74 2d 3e 67 65 74 4f | on('name-only').&&.!$input->getO |
58340 | 70 74 69 6f 6e 28 27 70 61 74 68 27 29 20 26 26 20 24 73 68 6f 77 56 65 72 73 69 6f 6e 3b 0a 24 | ption('path').&&.$showVersion;.$ |
58360 | 77 72 69 74 65 4c 61 74 65 73 74 20 3d 20 24 77 72 69 74 65 56 65 72 73 69 6f 6e 20 26 26 20 24 | writeLatest.=.$writeVersion.&&.$ |
58380 | 73 68 6f 77 4c 61 74 65 73 74 3b 0a 24 77 72 69 74 65 44 65 73 63 72 69 70 74 69 6f 6e 20 3d 20 | showLatest;.$writeDescription.=. |
583a0 | 21 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6e 61 6d 65 2d 6f 6e 6c 79 27 29 20 | !$input->getOption('name-only'). |
583c0 | 26 26 20 21 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 70 61 74 68 27 29 3b 0a 0a | &&.!$input->getOption('path');.. |
583e0 | 24 68 61 73 4f 75 74 64 61 74 65 64 50 61 63 6b 61 67 65 73 20 3d 20 66 61 6c 73 65 3b 0a 0a 24 | $hasOutdatedPackages.=.false;..$ |
58400 | 76 69 65 77 44 61 74 61 5b 24 74 79 70 65 5d 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 | viewData[$type].=.[];.foreach.($ |
58420 | 70 61 63 6b 61 67 65 73 5b 24 74 79 70 65 5d 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 24 | packages[$type].as.$package).{.$ |
58440 | 70 61 63 6b 61 67 65 56 69 65 77 44 61 74 61 20 3d 20 5b 5d 3b 0a 69 66 20 28 69 73 5f 6f 62 6a | packageViewData.=.[];.if.(is_obj |
58460 | 65 63 74 28 24 70 61 63 6b 61 67 65 29 29 20 7b 0a 24 6c 61 74 65 73 74 50 61 63 6b 61 67 65 20 | ect($package)).{.$latestPackage. |
58480 | 3d 20 6e 75 6c 6c 3b 0a 69 66 20 28 24 73 68 6f 77 4c 61 74 65 73 74 20 26 26 20 69 73 73 65 74 | =.null;.if.($showLatest.&&.isset |
584a0 | 28 24 6c 61 74 65 73 74 50 61 63 6b 61 67 65 73 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 | ($latestPackages[$package->getPr |
584c0 | 65 74 74 79 4e 61 6d 65 28 29 5d 29 29 20 7b 0a 24 6c 61 74 65 73 74 50 61 63 6b 61 67 65 20 3d | ettyName()])).{.$latestPackage.= |
584e0 | 20 24 6c 61 74 65 73 74 50 61 63 6b 61 67 65 73 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 | .$latestPackages[$package->getPr |
58500 | 65 74 74 79 4e 61 6d 65 28 29 5d 3b 0a 7d 0a 0a 0a 24 70 61 63 6b 61 67 65 49 73 55 70 54 6f 44 | ettyName()];.}...$packageIsUpToD |
58520 | 61 74 65 20 3d 20 24 6c 61 74 65 73 74 50 61 63 6b 61 67 65 20 26 26 20 24 6c 61 74 65 73 74 50 | ate.=.$latestPackage.&&.$latestP |
58540 | 61 63 6b 61 67 65 2d 3e 67 65 74 46 75 6c 6c 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 20 3d | ackage->getFullPrettyVersion().= |
58560 | 3d 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 46 75 6c 6c 50 72 65 74 74 79 56 65 72 73 69 6f | ==.$package->getFullPrettyVersio |
58580 | 6e 28 29 20 26 26 20 28 21 24 6c 61 74 65 73 74 50 61 63 6b 61 67 65 20 69 6e 73 74 61 6e 63 65 | n().&&.(!$latestPackage.instance |
585a0 | 6f 66 20 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 7c 7c 20 21 | of.CompletePackageInterface.||.! |
585c0 | 24 6c 61 74 65 73 74 50 61 63 6b 61 67 65 2d 3e 69 73 41 62 61 6e 64 6f 6e 65 64 28 29 29 3b 0a | $latestPackage->isAbandoned());. |
585e0 | 0a 24 70 61 63 6b 61 67 65 49 73 55 70 54 6f 44 61 74 65 20 3d 20 24 70 61 63 6b 61 67 65 49 73 | .$packageIsUpToDate.=.$packageIs |
58600 | 55 70 54 6f 44 61 74 65 20 7c 7c 20 28 24 6c 61 74 65 73 74 50 61 63 6b 61 67 65 20 3d 3d 3d 20 | UpToDate.||.($latestPackage.===. |
58620 | 6e 75 6c 6c 20 26 26 20 24 73 68 6f 77 4d 61 6a 6f 72 4f 6e 6c 79 29 3b 0a 24 70 61 63 6b 61 67 | null.&&.$showMajorOnly);.$packag |
58640 | 65 49 73 49 67 6e 6f 72 65 64 20 3d 20 5c 69 6e 5f 61 72 72 61 79 28 24 70 61 63 6b 61 67 65 2d | eIsIgnored.=.\in_array($package- |
58660 | 3e 67 65 74 50 72 65 74 74 79 4e 61 6d 65 28 29 2c 20 24 69 67 6e 6f 72 65 64 50 61 63 6b 61 67 | >getPrettyName(),.$ignoredPackag |
58680 | 65 73 2c 20 74 72 75 65 29 3b 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e | es,.true);.if.($input->getOption |
586a0 | 28 27 6f 75 74 64 61 74 65 64 27 29 20 26 26 20 28 24 70 61 63 6b 61 67 65 49 73 55 70 54 6f 44 | ('outdated').&&.($packageIsUpToD |
586c0 | 61 74 65 20 7c 7c 20 24 70 61 63 6b 61 67 65 49 73 49 67 6e 6f 72 65 64 29 29 20 7b 0a 63 6f 6e | ate.||.$packageIsIgnored)).{.con |
586e0 | 74 69 6e 75 65 3b 0a 7d 0a 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 | tinue;.}..if.($input->getOption( |
58700 | 27 6f 75 74 64 61 74 65 64 27 29 20 7c 7c 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e | 'outdated').||.$input->getOption |
58720 | 28 27 73 74 72 69 63 74 27 29 29 20 7b 0a 24 68 61 73 4f 75 74 64 61 74 65 64 50 61 63 6b 61 67 | ('strict')).{.$hasOutdatedPackag |
58740 | 65 73 20 3d 20 74 72 75 65 3b 0a 7d 0a 0a 24 70 61 63 6b 61 67 65 56 69 65 77 44 61 74 61 5b 27 | es.=.true;.}..$packageViewData[' |
58760 | 6e 61 6d 65 27 5d 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 4e 61 6d 65 | name'].=.$package->getPrettyName |
58780 | 28 29 3b 0a 24 70 61 63 6b 61 67 65 56 69 65 77 44 61 74 61 5b 27 64 69 72 65 63 74 2d 64 65 70 | ();.$packageViewData['direct-dep |
587a0 | 65 6e 64 65 6e 63 79 27 5d 20 3d 20 69 6e 5f 61 72 72 61 79 28 24 70 61 63 6b 61 67 65 2d 3e 67 | endency'].=.in_array($package->g |
587c0 | 65 74 4e 61 6d 65 28 29 2c 20 24 74 68 69 73 2d 3e 67 65 74 52 6f 6f 74 52 65 71 75 69 72 65 73 | etName(),.$this->getRootRequires |
587e0 | 28 29 2c 20 74 72 75 65 29 3b 0a 69 66 20 28 24 66 6f 72 6d 61 74 20 21 3d 3d 20 27 6a 73 6f 6e | (),.true);.if.($format.!==.'json |
58800 | 27 20 7c 7c 20 74 72 75 65 20 21 3d 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 | '.||.true.!==.$input->getOption( |
58820 | 27 6e 61 6d 65 2d 6f 6e 6c 79 27 29 29 20 7b 0a 24 70 61 63 6b 61 67 65 56 69 65 77 44 61 74 61 | 'name-only')).{.$packageViewData |
58840 | 5b 27 68 6f 6d 65 70 61 67 65 27 5d 20 3d 20 24 70 61 63 6b 61 67 65 20 69 6e 73 74 61 6e 63 65 | ['homepage'].=.$package.instance |
58860 | 6f 66 20 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 3f 20 24 70 | of.CompletePackageInterface.?.$p |
58880 | 61 63 6b 61 67 65 2d 3e 67 65 74 48 6f 6d 65 70 61 67 65 28 29 20 3a 20 6e 75 6c 6c 3b 0a 24 70 | ackage->getHomepage().:.null;.$p |
588a0 | 61 63 6b 61 67 65 56 69 65 77 44 61 74 61 5b 27 73 6f 75 72 63 65 27 5d 20 3d 20 50 61 63 6b 61 | ackageViewData['source'].=.Packa |
588c0 | 67 65 49 6e 66 6f 3a 3a 67 65 74 56 69 65 77 53 6f 75 72 63 65 55 72 6c 28 24 70 61 63 6b 61 67 | geInfo::getViewSourceUrl($packag |
588e0 | 65 29 3b 0a 7d 0a 24 6e 61 6d 65 4c 65 6e 67 74 68 20 3d 20 6d 61 78 28 24 6e 61 6d 65 4c 65 6e | e);.}.$nameLength.=.max($nameLen |
58900 | 67 74 68 2c 20 73 74 72 6c 65 6e 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 4e | gth,.strlen($package->getPrettyN |
58920 | 61 6d 65 28 29 29 29 3b 0a 69 66 20 28 24 77 72 69 74 65 56 65 72 73 69 6f 6e 29 20 7b 0a 24 70 | ame()));.if.($writeVersion).{.$p |
58940 | 61 63 6b 61 67 65 56 69 65 77 44 61 74 61 5b 27 76 65 72 73 69 6f 6e 27 5d 20 3d 20 24 70 61 63 | ackageViewData['version'].=.$pac |
58960 | 6b 61 67 65 2d 3e 67 65 74 46 75 6c 6c 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 3b 0a 24 76 | kage->getFullPrettyVersion();.$v |
58980 | 65 72 73 69 6f 6e 4c 65 6e 67 74 68 20 3d 20 6d 61 78 28 24 76 65 72 73 69 6f 6e 4c 65 6e 67 74 | ersionLength.=.max($versionLengt |
589a0 | 68 2c 20 73 74 72 6c 65 6e 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 46 75 6c 6c 50 72 65 74 74 | h,.strlen($package->getFullPrett |
589c0 | 79 56 65 72 73 69 6f 6e 28 29 29 29 3b 0a 7d 0a 69 66 20 28 24 77 72 69 74 65 4c 61 74 65 73 74 | yVersion()));.}.if.($writeLatest |
589e0 | 20 26 26 20 24 6c 61 74 65 73 74 50 61 63 6b 61 67 65 29 20 7b 0a 24 70 61 63 6b 61 67 65 56 69 | .&&.$latestPackage).{.$packageVi |
58a00 | 65 77 44 61 74 61 5b 27 6c 61 74 65 73 74 27 5d 20 3d 20 24 6c 61 74 65 73 74 50 61 63 6b 61 67 | ewData['latest'].=.$latestPackag |
58a20 | 65 2d 3e 67 65 74 46 75 6c 6c 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 3b 0a 24 70 61 63 6b | e->getFullPrettyVersion();.$pack |
58a40 | 61 67 65 56 69 65 77 44 61 74 61 5b 27 6c 61 74 65 73 74 2d 73 74 61 74 75 73 27 5d 20 3d 20 24 | ageViewData['latest-status'].=.$ |
58a60 | 74 68 69 73 2d 3e 67 65 74 55 70 64 61 74 65 53 74 61 74 75 73 28 24 6c 61 74 65 73 74 50 61 63 | this->getUpdateStatus($latestPac |
58a80 | 6b 61 67 65 2c 20 24 70 61 63 6b 61 67 65 29 3b 0a 24 6c 61 74 65 73 74 4c 65 6e 67 74 68 20 3d | kage,.$package);.$latestLength.= |
58aa0 | 20 6d 61 78 28 24 6c 61 74 65 73 74 4c 65 6e 67 74 68 2c 20 73 74 72 6c 65 6e 28 24 70 61 63 6b | .max($latestLength,.strlen($pack |
58ac0 | 61 67 65 56 69 65 77 44 61 74 61 5b 27 6c 61 74 65 73 74 27 5d 29 29 3b 0a 7d 20 65 6c 73 65 69 | ageViewData['latest']));.}.elsei |
58ae0 | 66 20 28 24 77 72 69 74 65 4c 61 74 65 73 74 29 20 7b 0a 24 70 61 63 6b 61 67 65 56 69 65 77 44 | f.($writeLatest).{.$packageViewD |
58b00 | 61 74 61 5b 27 6c 61 74 65 73 74 27 5d 20 3d 20 27 5b 6e 6f 6e 65 20 6d 61 74 63 68 65 64 5d 27 | ata['latest'].=.'[none.matched]' |
58b20 | 3b 0a 24 70 61 63 6b 61 67 65 56 69 65 77 44 61 74 61 5b 27 6c 61 74 65 73 74 2d 73 74 61 74 75 | ;.$packageViewData['latest-statu |
58b40 | 73 27 5d 20 3d 20 27 75 70 2d 74 6f 2d 64 61 74 65 27 3b 0a 24 6c 61 74 65 73 74 4c 65 6e 67 74 | s'].=.'up-to-date';.$latestLengt |
58b60 | 68 20 3d 20 6d 61 78 28 24 6c 61 74 65 73 74 4c 65 6e 67 74 68 2c 20 73 74 72 6c 65 6e 28 24 70 | h.=.max($latestLength,.strlen($p |
58b80 | 61 63 6b 61 67 65 56 69 65 77 44 61 74 61 5b 27 6c 61 74 65 73 74 27 5d 29 29 3b 0a 7d 0a 69 66 | ackageViewData['latest']));.}.if |
58ba0 | 20 28 24 77 72 69 74 65 44 65 73 63 72 69 70 74 69 6f 6e 20 26 26 20 24 70 61 63 6b 61 67 65 20 | .($writeDescription.&&.$package. |
58bc0 | 69 6e 73 74 61 6e 63 65 6f 66 20 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 49 6e 74 65 72 66 | instanceof.CompletePackageInterf |
58be0 | 61 63 65 29 20 7b 0a 24 70 61 63 6b 61 67 65 56 69 65 77 44 61 74 61 5b 27 64 65 73 63 72 69 70 | ace).{.$packageViewData['descrip |
58c00 | 74 69 6f 6e 27 5d 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 44 65 73 63 72 69 70 74 69 6f | tion'].=.$package->getDescriptio |
58c20 | 6e 28 29 3b 0a 7d 0a 69 66 20 28 24 77 72 69 74 65 50 61 74 68 29 20 7b 0a 24 70 61 63 6b 61 67 | n();.}.if.($writePath).{.$packag |
58c40 | 65 56 69 65 77 44 61 74 61 5b 27 70 61 74 68 27 5d 20 3d 20 73 74 72 74 6f 6b 28 72 65 61 6c 70 | eViewData['path'].=.strtok(realp |
58c60 | 61 74 68 28 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 | ath($composer->getInstallationMa |
58c80 | 6e 61 67 65 72 28 29 2d 3e 67 65 74 49 6e 73 74 61 6c 6c 50 61 74 68 28 24 70 61 63 6b 61 67 65 | nager()->getInstallPath($package |
58ca0 | 29 29 2c 20 22 5c 72 5c 6e 22 29 3b 0a 7d 0a 0a 24 70 61 63 6b 61 67 65 49 73 41 62 61 6e 64 6f | )),."\r\n");.}..$packageIsAbando |
58cc0 | 6e 65 64 20 3d 20 66 61 6c 73 65 3b 0a 69 66 20 28 24 6c 61 74 65 73 74 50 61 63 6b 61 67 65 20 | ned.=.false;.if.($latestPackage. |
58ce0 | 69 6e 73 74 61 6e 63 65 6f 66 20 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 49 6e 74 65 72 66 | instanceof.CompletePackageInterf |
58d00 | 61 63 65 20 26 26 20 24 6c 61 74 65 73 74 50 61 63 6b 61 67 65 2d 3e 69 73 41 62 61 6e 64 6f 6e | ace.&&.$latestPackage->isAbandon |
58d20 | 65 64 28 29 29 20 7b 0a 24 72 65 70 6c 61 63 65 6d 65 6e 74 50 61 63 6b 61 67 65 4e 61 6d 65 20 | ed()).{.$replacementPackageName. |
58d40 | 3d 20 24 6c 61 74 65 73 74 50 61 63 6b 61 67 65 2d 3e 67 65 74 52 65 70 6c 61 63 65 6d 65 6e 74 | =.$latestPackage->getReplacement |
58d60 | 50 61 63 6b 61 67 65 28 29 3b 0a 24 72 65 70 6c 61 63 65 6d 65 6e 74 20 3d 20 24 72 65 70 6c 61 | Package();.$replacement.=.$repla |
58d80 | 63 65 6d 65 6e 74 50 61 63 6b 61 67 65 4e 61 6d 65 20 21 3d 3d 20 6e 75 6c 6c 0a 3f 20 27 55 73 | cementPackageName.!==.null.?.'Us |
58da0 | 65 20 27 20 2e 20 24 6c 61 74 65 73 74 50 61 63 6b 61 67 65 2d 3e 67 65 74 52 65 70 6c 61 63 65 | e.'...$latestPackage->getReplace |
58dc0 | 6d 65 6e 74 50 61 63 6b 61 67 65 28 29 20 2e 20 27 20 69 6e 73 74 65 61 64 27 0a 3a 20 27 4e 6f | mentPackage()...'.instead'.:.'No |
58de0 | 20 72 65 70 6c 61 63 65 6d 65 6e 74 20 77 61 73 20 73 75 67 67 65 73 74 65 64 27 3b 0a 24 70 61 | .replacement.was.suggested';.$pa |
58e00 | 63 6b 61 67 65 57 61 72 6e 69 6e 67 20 3d 20 73 70 72 69 6e 74 66 28 0a 27 50 61 63 6b 61 67 65 | ckageWarning.=.sprintf(.'Package |
58e20 | 20 25 73 20 69 73 20 61 62 61 6e 64 6f 6e 65 64 2c 20 79 6f 75 20 73 68 6f 75 6c 64 20 61 76 6f | .%s.is.abandoned,.you.should.avo |
58e40 | 69 64 20 75 73 69 6e 67 20 69 74 2e 20 25 73 2e 27 2c 0a 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 | id.using.it..%s.',.$package->get |
58e60 | 50 72 65 74 74 79 4e 61 6d 65 28 29 2c 0a 24 72 65 70 6c 61 63 65 6d 65 6e 74 0a 29 3b 0a 24 70 | PrettyName(),.$replacement.);.$p |
58e80 | 61 63 6b 61 67 65 56 69 65 77 44 61 74 61 5b 27 77 61 72 6e 69 6e 67 27 5d 20 3d 20 24 70 61 63 | ackageViewData['warning'].=.$pac |
58ea0 | 6b 61 67 65 57 61 72 6e 69 6e 67 3b 0a 24 70 61 63 6b 61 67 65 49 73 41 62 61 6e 64 6f 6e 65 64 | kageWarning;.$packageIsAbandoned |
58ec0 | 20 3d 20 24 72 65 70 6c 61 63 65 6d 65 6e 74 50 61 63 6b 61 67 65 4e 61 6d 65 20 3f 3f 20 74 72 | .=.$replacementPackageName.??.tr |
58ee0 | 75 65 3b 0a 7d 0a 0a 24 70 61 63 6b 61 67 65 56 69 65 77 44 61 74 61 5b 27 61 62 61 6e 64 6f 6e | ue;.}..$packageViewData['abandon |
58f00 | 65 64 27 5d 20 3d 20 24 70 61 63 6b 61 67 65 49 73 41 62 61 6e 64 6f 6e 65 64 3b 0a 7d 20 65 6c | ed'].=.$packageIsAbandoned;.}.el |
58f20 | 73 65 20 7b 0a 24 70 61 63 6b 61 67 65 56 69 65 77 44 61 74 61 5b 27 6e 61 6d 65 27 5d 20 3d 20 | se.{.$packageViewData['name'].=. |
58f40 | 24 70 61 63 6b 61 67 65 3b 0a 24 6e 61 6d 65 4c 65 6e 67 74 68 20 3d 20 6d 61 78 28 24 6e 61 6d | $package;.$nameLength.=.max($nam |
58f60 | 65 4c 65 6e 67 74 68 2c 20 73 74 72 6c 65 6e 28 24 70 61 63 6b 61 67 65 29 29 3b 0a 7d 0a 24 76 | eLength,.strlen($package));.}.$v |
58f80 | 69 65 77 44 61 74 61 5b 24 74 79 70 65 5d 5b 5d 20 3d 20 24 70 61 63 6b 61 67 65 56 69 65 77 44 | iewData[$type][].=.$packageViewD |
58fa0 | 61 74 61 3b 0a 7d 0a 24 76 69 65 77 4d 65 74 61 44 61 74 61 5b 24 74 79 70 65 5d 20 3d 20 5b 0a | ata;.}.$viewMetaData[$type].=.[. |
58fc0 | 27 6e 61 6d 65 4c 65 6e 67 74 68 27 20 3d 3e 20 24 6e 61 6d 65 4c 65 6e 67 74 68 2c 0a 27 76 65 | 'nameLength'.=>.$nameLength,.'ve |
58fe0 | 72 73 69 6f 6e 4c 65 6e 67 74 68 27 20 3d 3e 20 24 76 65 72 73 69 6f 6e 4c 65 6e 67 74 68 2c 0a | rsionLength'.=>.$versionLength,. |
59000 | 27 6c 61 74 65 73 74 4c 65 6e 67 74 68 27 20 3d 3e 20 24 6c 61 74 65 73 74 4c 65 6e 67 74 68 2c | 'latestLength'.=>.$latestLength, |
59020 | 0a 27 77 72 69 74 65 4c 61 74 65 73 74 27 20 3d 3e 20 24 77 72 69 74 65 4c 61 74 65 73 74 2c 0a | .'writeLatest'.=>.$writeLatest,. |
59040 | 5d 3b 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 73 74 72 69 63 74 | ];.if.($input->getOption('strict |
59060 | 27 29 20 26 26 20 24 68 61 73 4f 75 74 64 61 74 65 64 50 61 63 6b 61 67 65 73 29 20 7b 0a 24 65 | ').&&.$hasOutdatedPackages).{.$e |
59080 | 78 69 74 43 6f 64 65 20 3d 20 31 3b 0a 62 72 65 61 6b 3b 0a 7d 0a 7d 0a 7d 0a 0a 69 66 20 28 27 | xitCode.=.1;.break;.}.}.}..if.(' |
590a0 | 6a 73 6f 6e 27 20 3d 3d 3d 20 24 66 6f 72 6d 61 74 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 | json'.===.$format).{.$io->write( |
590c0 | 4a 73 6f 6e 46 69 6c 65 3a 3a 65 6e 63 6f 64 65 28 24 76 69 65 77 44 61 74 61 29 29 3b 0a 7d 20 | JsonFile::encode($viewData));.}. |
590e0 | 65 6c 73 65 20 7b 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6c 61 | else.{.if.($input->getOption('la |
59100 | 74 65 73 74 27 29 20 26 26 20 61 72 72 61 79 5f 66 69 6c 74 65 72 28 24 76 69 65 77 44 61 74 61 | test').&&.array_filter($viewData |
59120 | 29 29 20 7b 0a 69 66 20 28 21 24 69 6f 2d 3e 69 73 44 65 63 6f 72 61 74 65 64 28 29 29 20 7b 0a | )).{.if.(!$io->isDecorated()).{. |
59140 | 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 4c 65 67 65 6e 64 3a 27 29 3b 0a 24 69 6f 2d | $io->writeError('Legend:');.$io- |
59160 | 3e 77 72 69 74 65 45 72 72 6f 72 28 27 21 20 70 61 74 63 68 20 6f 72 20 6d 69 6e 6f 72 20 72 65 | >writeError('!.patch.or.minor.re |
59180 | 6c 65 61 73 65 20 61 76 61 69 6c 61 62 6c 65 20 2d 20 75 70 64 61 74 65 20 72 65 63 6f 6d 6d 65 | lease.available.-.update.recomme |
591a0 | 6e 64 65 64 27 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 7e 20 6d 61 6a 6f 72 | nded');.$io->writeError('~.major |
591c0 | 20 72 65 6c 65 61 73 65 20 61 76 61 69 6c 61 62 6c 65 20 2d 20 75 70 64 61 74 65 20 70 6f 73 73 | .release.available.-.update.poss |
591e0 | 69 62 6c 65 27 29 3b 0a 69 66 20 28 21 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 | ible');.if.(!$input->getOption(' |
59200 | 6f 75 74 64 61 74 65 64 27 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3d | outdated')).{.$io->writeError('= |
59220 | 20 75 70 20 74 6f 20 64 61 74 65 20 76 65 72 73 69 6f 6e 27 29 3b 0a 7d 0a 7d 20 65 6c 73 65 20 | .up.to.date.version');.}.}.else. |
59240 | 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 69 6e 66 6f 3e 43 6f 6c 6f 72 20 6c | {.$io->writeError('<info>Color.l |
59260 | 65 67 65 6e 64 3a 3c 2f 69 6e 66 6f 3e 27 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 | egend:</info>');.$io->writeError |
59280 | 28 27 2d 20 3c 68 69 67 68 6c 69 67 68 74 3e 70 61 74 63 68 20 6f 72 20 6d 69 6e 6f 72 3c 2f 68 | ('-.<highlight>patch.or.minor</h |
592a0 | 69 67 68 6c 69 67 68 74 3e 20 72 65 6c 65 61 73 65 20 61 76 61 69 6c 61 62 6c 65 20 2d 20 75 70 | ighlight>.release.available.-.up |
592c0 | 64 61 74 65 20 72 65 63 6f 6d 6d 65 6e 64 65 64 27 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 | date.recommended');.$io->writeEr |
592e0 | 72 6f 72 28 27 2d 20 3c 63 6f 6d 6d 65 6e 74 3e 6d 61 6a 6f 72 3c 2f 63 6f 6d 6d 65 6e 74 3e 20 | ror('-.<comment>major</comment>. |
59300 | 72 65 6c 65 61 73 65 20 61 76 61 69 6c 61 62 6c 65 20 2d 20 75 70 64 61 74 65 20 70 6f 73 73 69 | release.available.-.update.possi |
59320 | 62 6c 65 27 29 3b 0a 69 66 20 28 21 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6f | ble');.if.(!$input->getOption('o |
59340 | 75 74 64 61 74 65 64 27 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 2d 20 | utdated')).{.$io->writeError('-. |
59360 | 3c 69 6e 66 6f 3e 75 70 20 74 6f 20 64 61 74 65 3c 2f 69 6e 66 6f 3e 20 76 65 72 73 69 6f 6e 27 | <info>up.to.date</info>.version' |
59380 | 29 3b 0a 7d 0a 7d 0a 7d 0a 0a 24 77 69 64 74 68 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 54 65 72 | );.}.}.}..$width.=.$this->getTer |
593a0 | 6d 69 6e 61 6c 57 69 64 74 68 28 29 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 76 69 65 77 44 61 74 | minalWidth();..foreach.($viewDat |
593c0 | 61 20 61 73 20 24 74 79 70 65 20 3d 3e 20 24 70 61 63 6b 61 67 65 73 29 20 7b 0a 24 6e 61 6d 65 | a.as.$type.=>.$packages).{.$name |
593e0 | 4c 65 6e 67 74 68 20 3d 20 24 76 69 65 77 4d 65 74 61 44 61 74 61 5b 24 74 79 70 65 5d 5b 27 6e | Length.=.$viewMetaData[$type]['n |
59400 | 61 6d 65 4c 65 6e 67 74 68 27 5d 3b 0a 24 76 65 72 73 69 6f 6e 4c 65 6e 67 74 68 20 3d 20 24 76 | ameLength'];.$versionLength.=.$v |
59420 | 69 65 77 4d 65 74 61 44 61 74 61 5b 24 74 79 70 65 5d 5b 27 76 65 72 73 69 6f 6e 4c 65 6e 67 74 | iewMetaData[$type]['versionLengt |
59440 | 68 27 5d 3b 0a 24 6c 61 74 65 73 74 4c 65 6e 67 74 68 20 3d 20 24 76 69 65 77 4d 65 74 61 44 61 | h'];.$latestLength.=.$viewMetaDa |
59460 | 74 61 5b 24 74 79 70 65 5d 5b 27 6c 61 74 65 73 74 4c 65 6e 67 74 68 27 5d 3b 0a 24 77 72 69 74 | ta[$type]['latestLength'];.$writ |
59480 | 65 4c 61 74 65 73 74 20 3d 20 24 76 69 65 77 4d 65 74 61 44 61 74 61 5b 24 74 79 70 65 5d 5b 27 | eLatest.=.$viewMetaData[$type][' |
594a0 | 77 72 69 74 65 4c 61 74 65 73 74 27 5d 3b 0a 0a 24 76 65 72 73 69 6f 6e 46 69 74 73 20 3d 20 24 | writeLatest'];..$versionFits.=.$ |
594c0 | 6e 61 6d 65 4c 65 6e 67 74 68 20 2b 20 24 76 65 72 73 69 6f 6e 4c 65 6e 67 74 68 20 2b 20 33 20 | nameLength.+.$versionLength.+.3. |
594e0 | 3c 3d 20 24 77 69 64 74 68 3b 0a 24 6c 61 74 65 73 74 46 69 74 73 20 3d 20 24 6e 61 6d 65 4c 65 | <=.$width;.$latestFits.=.$nameLe |
59500 | 6e 67 74 68 20 2b 20 24 76 65 72 73 69 6f 6e 4c 65 6e 67 74 68 20 2b 20 24 6c 61 74 65 73 74 4c | ngth.+.$versionLength.+.$latestL |
59520 | 65 6e 67 74 68 20 2b 20 33 20 3c 3d 20 24 77 69 64 74 68 3b 0a 24 64 65 73 63 72 69 70 74 69 6f | ength.+.3.<=.$width;.$descriptio |
59540 | 6e 46 69 74 73 20 3d 20 24 6e 61 6d 65 4c 65 6e 67 74 68 20 2b 20 24 76 65 72 73 69 6f 6e 4c 65 | nFits.=.$nameLength.+.$versionLe |
59560 | 6e 67 74 68 20 2b 20 24 6c 61 74 65 73 74 4c 65 6e 67 74 68 20 2b 20 32 34 20 3c 3d 20 24 77 69 | ngth.+.$latestLength.+.24.<=.$wi |
59580 | 64 74 68 3b 0a 0a 69 66 20 28 24 6c 61 74 65 73 74 46 69 74 73 20 26 26 20 21 24 69 6f 2d 3e 69 | dth;..if.($latestFits.&&.!$io->i |
595a0 | 73 44 65 63 6f 72 61 74 65 64 28 29 29 20 7b 0a 24 6c 61 74 65 73 74 4c 65 6e 67 74 68 20 2b 3d | sDecorated()).{.$latestLength.+= |
595c0 | 20 32 3b 0a 7d 0a 0a 69 66 20 28 24 73 68 6f 77 41 6c 6c 54 79 70 65 73 29 20 7b 0a 69 66 20 28 | .2;.}..if.($showAllTypes).{.if.( |
595e0 | 27 61 76 61 69 6c 61 62 6c 65 27 20 3d 3d 3d 20 24 74 79 70 65 29 20 7b 0a 24 69 6f 2d 3e 77 72 | 'available'.===.$type).{.$io->wr |
59600 | 69 74 65 28 27 3c 63 6f 6d 6d 65 6e 74 3e 27 20 2e 20 24 74 79 70 65 20 2e 20 27 3c 2f 63 6f 6d | ite('<comment>'...$type...'</com |
59620 | 6d 65 6e 74 3e 3a 27 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 3c | ment>:');.}.else.{.$io->write('< |
59640 | 69 6e 66 6f 3e 27 20 2e 20 24 74 79 70 65 20 2e 20 27 3c 2f 69 6e 66 6f 3e 3a 27 29 3b 0a 7d 0a | info>'...$type...'</info>:');.}. |
59660 | 7d 0a 0a 69 66 20 28 24 77 72 69 74 65 4c 61 74 65 73 74 20 26 26 20 21 24 69 6e 70 75 74 2d 3e | }..if.($writeLatest.&&.!$input-> |
59680 | 67 65 74 4f 70 74 69 6f 6e 28 27 64 69 72 65 63 74 27 29 29 20 7b 0a 24 64 69 72 65 63 74 44 65 | getOption('direct')).{.$directDe |
596a0 | 70 73 20 3d 20 5b 5d 3b 0a 24 74 72 61 6e 73 69 74 69 76 65 44 65 70 73 20 3d 20 5b 5d 3b 0a 66 | ps.=.[];.$transitiveDeps.=.[];.f |
596c0 | 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 73 20 61 73 20 24 70 6b 67 29 20 7b 0a 69 66 20 | oreach.($packages.as.$pkg).{.if. |
596e0 | 28 24 70 6b 67 5b 27 64 69 72 65 63 74 2d 64 65 70 65 6e 64 65 6e 63 79 27 5d 20 3f 3f 20 66 61 | ($pkg['direct-dependency'].??.fa |
59700 | 6c 73 65 29 20 7b 0a 24 64 69 72 65 63 74 44 65 70 73 5b 5d 20 3d 20 24 70 6b 67 3b 0a 7d 20 65 | lse).{.$directDeps[].=.$pkg;.}.e |
59720 | 6c 73 65 20 7b 0a 24 74 72 61 6e 73 69 74 69 76 65 44 65 70 73 5b 5d 20 3d 20 24 70 6b 67 3b 0a | lse.{.$transitiveDeps[].=.$pkg;. |
59740 | 7d 0a 7d 0a 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 27 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 | }.}..$io->write('');.$io->write( |
59760 | 27 3c 69 6e 66 6f 3e 44 69 72 65 63 74 20 64 65 70 65 6e 64 65 6e 63 69 65 73 20 72 65 71 75 69 | '<info>Direct.dependencies.requi |
59780 | 72 65 64 20 69 6e 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 3a 3c 2f 3e 27 29 3b 0a 69 66 20 28 | red.in.composer.json:</>');.if.( |
597a0 | 5c 63 6f 75 6e 74 28 24 64 69 72 65 63 74 44 65 70 73 29 20 3e 20 30 29 20 7b 0a 24 74 68 69 73 | \count($directDeps).>.0).{.$this |
597c0 | 2d 3e 70 72 69 6e 74 50 61 63 6b 61 67 65 73 28 24 69 6f 2c 20 24 64 69 72 65 63 74 44 65 70 73 | ->printPackages($io,.$directDeps |
597e0 | 2c 20 24 69 6e 64 65 6e 74 2c 20 24 76 65 72 73 69 6f 6e 46 69 74 73 2c 20 24 6c 61 74 65 73 74 | ,.$indent,.$versionFits,.$latest |
59800 | 46 69 74 73 2c 20 24 64 65 73 63 72 69 70 74 69 6f 6e 46 69 74 73 2c 20 24 77 69 64 74 68 2c 20 | Fits,.$descriptionFits,.$width,. |
59820 | 24 76 65 72 73 69 6f 6e 4c 65 6e 67 74 68 2c 20 24 6e 61 6d 65 4c 65 6e 67 74 68 2c 20 24 6c 61 | $versionLength,.$nameLength,.$la |
59840 | 74 65 73 74 4c 65 6e 67 74 68 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 | testLength);.}.else.{.$io->write |
59860 | 28 27 45 76 65 72 79 74 68 69 6e 67 20 75 70 20 74 6f 20 64 61 74 65 27 29 3b 0a 7d 0a 24 69 6f | ('Everything.up.to.date');.}.$io |
59880 | 2d 3e 77 72 69 74 65 28 27 27 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 3c 69 6e 66 6f 3e 54 | ->write('');.$io->write('<info>T |
598a0 | 72 61 6e 73 69 74 69 76 65 20 64 65 70 65 6e 64 65 6e 63 69 65 73 20 6e 6f 74 20 72 65 71 75 69 | ransitive.dependencies.not.requi |
598c0 | 72 65 64 20 69 6e 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 3a 3c 2f 3e 27 29 3b 0a 69 66 20 28 | red.in.composer.json:</>');.if.( |
598e0 | 5c 63 6f 75 6e 74 28 24 74 72 61 6e 73 69 74 69 76 65 44 65 70 73 29 20 3e 20 30 29 20 7b 0a 24 | \count($transitiveDeps).>.0).{.$ |
59900 | 74 68 69 73 2d 3e 70 72 69 6e 74 50 61 63 6b 61 67 65 73 28 24 69 6f 2c 20 24 74 72 61 6e 73 69 | this->printPackages($io,.$transi |
59920 | 74 69 76 65 44 65 70 73 2c 20 24 69 6e 64 65 6e 74 2c 20 24 76 65 72 73 69 6f 6e 46 69 74 73 2c | tiveDeps,.$indent,.$versionFits, |
59940 | 20 24 6c 61 74 65 73 74 46 69 74 73 2c 20 24 64 65 73 63 72 69 70 74 69 6f 6e 46 69 74 73 2c 20 | .$latestFits,.$descriptionFits,. |
59960 | 24 77 69 64 74 68 2c 20 24 76 65 72 73 69 6f 6e 4c 65 6e 67 74 68 2c 20 24 6e 61 6d 65 4c 65 6e | $width,.$versionLength,.$nameLen |
59980 | 67 74 68 2c 20 24 6c 61 74 65 73 74 4c 65 6e 67 74 68 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 69 | gth,.$latestLength);.}.else.{.$i |
599a0 | 6f 2d 3e 77 72 69 74 65 28 27 45 76 65 72 79 74 68 69 6e 67 20 75 70 20 74 6f 20 64 61 74 65 27 | o->write('Everything.up.to.date' |
599c0 | 29 3b 0a 7d 0a 7d 20 65 6c 73 65 20 7b 0a 24 74 68 69 73 2d 3e 70 72 69 6e 74 50 61 63 6b 61 67 | );.}.}.else.{.$this->printPackag |
599e0 | 65 73 28 24 69 6f 2c 20 24 70 61 63 6b 61 67 65 73 2c 20 24 69 6e 64 65 6e 74 2c 20 24 76 65 72 | es($io,.$packages,.$indent,.$ver |
59a00 | 73 69 6f 6e 46 69 74 73 2c 20 24 6c 61 74 65 73 74 46 69 74 73 2c 20 24 64 65 73 63 72 69 70 74 | sionFits,.$latestFits,.$descript |
59a20 | 69 6f 6e 46 69 74 73 2c 20 24 77 69 64 74 68 2c 20 24 76 65 72 73 69 6f 6e 4c 65 6e 67 74 68 2c | ionFits,.$width,.$versionLength, |
59a40 | 20 24 6e 61 6d 65 4c 65 6e 67 74 68 2c 20 24 6c 61 74 65 73 74 4c 65 6e 67 74 68 29 3b 0a 7d 0a | .$nameLength,.$latestLength);.}. |
59a60 | 0a 69 66 20 28 24 73 68 6f 77 41 6c 6c 54 79 70 65 73 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 | .if.($showAllTypes).{.$io->write |
59a80 | 28 27 27 29 3b 0a 7d 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 65 78 69 74 43 6f 64 65 3b 0a 7d | ('');.}.}.}..return.$exitCode;.} |
59aa0 | 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 70 72 69 6e 74 50 61 63 6b 61 | .....private.function.printPacka |
59ac0 | 67 65 73 28 49 4f 49 6e 74 65 72 66 61 63 65 20 24 69 6f 2c 20 61 72 72 61 79 20 24 70 61 63 6b | ges(IOInterface.$io,.array.$pack |
59ae0 | 61 67 65 73 2c 20 73 74 72 69 6e 67 20 24 69 6e 64 65 6e 74 2c 20 62 6f 6f 6c 20 24 77 72 69 74 | ages,.string.$indent,.bool.$writ |
59b00 | 65 56 65 72 73 69 6f 6e 2c 20 62 6f 6f 6c 20 24 77 72 69 74 65 4c 61 74 65 73 74 2c 20 62 6f 6f | eVersion,.bool.$writeLatest,.boo |
59b20 | 6c 20 24 77 72 69 74 65 44 65 73 63 72 69 70 74 69 6f 6e 2c 20 69 6e 74 20 24 77 69 64 74 68 2c | l.$writeDescription,.int.$width, |
59b40 | 20 69 6e 74 20 24 76 65 72 73 69 6f 6e 4c 65 6e 67 74 68 2c 20 69 6e 74 20 24 6e 61 6d 65 4c 65 | .int.$versionLength,.int.$nameLe |
59b60 | 6e 67 74 68 2c 20 69 6e 74 20 24 6c 61 74 65 73 74 4c 65 6e 67 74 68 29 3a 20 76 6f 69 64 0a 7b | ngth,.int.$latestLength):.void.{ |
59b80 | 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 73 20 61 73 20 24 70 61 63 6b 61 67 65 29 | .foreach.($packages.as.$package) |
59ba0 | 20 7b 0a 24 6c 69 6e 6b 20 3d 20 24 70 61 63 6b 61 67 65 5b 27 73 6f 75 72 63 65 27 5d 20 3f 3f | .{.$link.=.$package['source'].?? |
59bc0 | 20 24 70 61 63 6b 61 67 65 5b 27 68 6f 6d 65 70 61 67 65 27 5d 20 3f 3f 20 27 27 3b 0a 69 66 20 | .$package['homepage'].??.'';.if. |
59be0 | 28 24 6c 69 6e 6b 20 21 3d 3d 20 27 27 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 24 69 6e 64 | ($link.!==.'').{.$io->write($ind |
59c00 | 65 6e 74 20 2e 20 27 3c 68 72 65 66 3d 27 2e 4f 75 74 70 75 74 46 6f 72 6d 61 74 74 65 72 3a 3a | ent...'<href='.OutputFormatter:: |
59c20 | 65 73 63 61 70 65 28 24 6c 69 6e 6b 29 2e 27 3e 27 2e 24 70 61 63 6b 61 67 65 5b 27 6e 61 6d 65 | escape($link).'>'.$package['name |
59c40 | 27 5d 2e 27 3c 2f 3e 27 2e 20 73 74 72 5f 72 65 70 65 61 74 28 27 20 27 2c 20 24 6e 61 6d 65 4c | '].'</>'..str_repeat('.',.$nameL |
59c60 | 65 6e 67 74 68 20 2d 20 73 74 72 6c 65 6e 28 24 70 61 63 6b 61 67 65 5b 27 6e 61 6d 65 27 5d 29 | ength.-.strlen($package['name']) |
59c80 | 29 2c 20 66 61 6c 73 65 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 24 | ),.false);.}.else.{.$io->write($ |
59ca0 | 69 6e 64 65 6e 74 20 2e 20 73 74 72 5f 70 61 64 28 24 70 61 63 6b 61 67 65 5b 27 6e 61 6d 65 27 | indent...str_pad($package['name' |
59cc0 | 5d 2c 20 24 6e 61 6d 65 4c 65 6e 67 74 68 2c 20 27 20 27 29 2c 20 66 61 6c 73 65 29 3b 0a 7d 0a | ],.$nameLength,.'.'),.false);.}. |
59ce0 | 69 66 20 28 69 73 73 65 74 28 24 70 61 63 6b 61 67 65 5b 27 76 65 72 73 69 6f 6e 27 5d 29 20 26 | if.(isset($package['version']).& |
59d00 | 26 20 24 77 72 69 74 65 56 65 72 73 69 6f 6e 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 20 | &.$writeVersion).{.$io->write('. |
59d20 | 27 20 2e 20 73 74 72 5f 70 61 64 28 24 70 61 63 6b 61 67 65 5b 27 76 65 72 73 69 6f 6e 27 5d 2c | '...str_pad($package['version'], |
59d40 | 20 24 76 65 72 73 69 6f 6e 4c 65 6e 67 74 68 2c 20 27 20 27 29 2c 20 66 61 6c 73 65 29 3b 0a 7d | .$versionLength,.'.'),.false);.} |
59d60 | 0a 69 66 20 28 69 73 73 65 74 28 24 70 61 63 6b 61 67 65 5b 27 6c 61 74 65 73 74 27 5d 29 20 26 | .if.(isset($package['latest']).& |
59d80 | 26 20 69 73 73 65 74 28 24 70 61 63 6b 61 67 65 5b 27 6c 61 74 65 73 74 2d 73 74 61 74 75 73 27 | &.isset($package['latest-status' |
59da0 | 5d 29 20 26 26 20 24 77 72 69 74 65 4c 61 74 65 73 74 29 20 7b 0a 24 6c 61 74 65 73 74 56 65 72 | ]).&&.$writeLatest).{.$latestVer |
59dc0 | 73 69 6f 6e 20 3d 20 24 70 61 63 6b 61 67 65 5b 27 6c 61 74 65 73 74 27 5d 3b 0a 24 75 70 64 61 | sion.=.$package['latest'];.$upda |
59de0 | 74 65 53 74 61 74 75 73 20 3d 20 24 70 61 63 6b 61 67 65 5b 27 6c 61 74 65 73 74 2d 73 74 61 74 | teStatus.=.$package['latest-stat |
59e00 | 75 73 27 5d 3b 0a 24 73 74 79 6c 65 20 3d 20 24 74 68 69 73 2d 3e 75 70 64 61 74 65 53 74 61 74 | us'];.$style.=.$this->updateStat |
59e20 | 75 73 54 6f 56 65 72 73 69 6f 6e 53 74 79 6c 65 28 24 75 70 64 61 74 65 53 74 61 74 75 73 29 3b | usToVersionStyle($updateStatus); |
59e40 | 0a 69 66 20 28 21 24 69 6f 2d 3e 69 73 44 65 63 6f 72 61 74 65 64 28 29 29 20 7b 0a 24 6c 61 74 | .if.(!$io->isDecorated()).{.$lat |
59e60 | 65 73 74 56 65 72 73 69 6f 6e 20 3d 20 73 74 72 5f 72 65 70 6c 61 63 65 28 5b 27 75 70 2d 74 6f | estVersion.=.str_replace(['up-to |
59e80 | 2d 64 61 74 65 27 2c 20 27 73 65 6d 76 65 72 2d 73 61 66 65 2d 75 70 64 61 74 65 27 2c 20 27 75 | -date',.'semver-safe-update',.'u |
59ea0 | 70 64 61 74 65 2d 70 6f 73 73 69 62 6c 65 27 5d 2c 20 5b 27 3d 27 2c 20 27 21 27 2c 20 27 7e 27 | pdate-possible'],.['=',.'!',.'~' |
59ec0 | 5d 2c 20 24 75 70 64 61 74 65 53 74 61 74 75 73 29 20 2e 20 27 20 27 20 2e 20 24 6c 61 74 65 73 | ],.$updateStatus)...'.'...$lates |
59ee0 | 74 56 65 72 73 69 6f 6e 3b 0a 7d 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 20 3c 27 20 2e 20 24 73 | tVersion;.}.$io->write('.<'...$s |
59f00 | 74 79 6c 65 20 2e 20 27 3e 27 20 2e 20 73 74 72 5f 70 61 64 28 24 6c 61 74 65 73 74 56 65 72 73 | tyle...'>'...str_pad($latestVers |
59f20 | 69 6f 6e 2c 20 24 6c 61 74 65 73 74 4c 65 6e 67 74 68 2c 20 27 20 27 29 20 2e 20 27 3c 2f 27 20 | ion,.$latestLength,.'.')...'</'. |
59f40 | 2e 20 24 73 74 79 6c 65 20 2e 20 27 3e 27 2c 20 66 61 6c 73 65 29 3b 0a 7d 0a 69 66 20 28 69 73 | ..$style...'>',.false);.}.if.(is |
59f60 | 73 65 74 28 24 70 61 63 6b 61 67 65 5b 27 64 65 73 63 72 69 70 74 69 6f 6e 27 5d 29 20 26 26 20 | set($package['description']).&&. |
59f80 | 24 77 72 69 74 65 44 65 73 63 72 69 70 74 69 6f 6e 29 20 7b 0a 24 64 65 73 63 72 69 70 74 69 6f | $writeDescription).{.$descriptio |
59fa0 | 6e 20 3d 20 73 74 72 74 6f 6b 28 24 70 61 63 6b 61 67 65 5b 27 64 65 73 63 72 69 70 74 69 6f 6e | n.=.strtok($package['description |
59fc0 | 27 5d 2c 20 22 5c 72 5c 6e 22 29 3b 0a 24 72 65 6d 61 69 6e 69 6e 67 20 3d 20 24 77 69 64 74 68 | '],."\r\n");.$remaining.=.$width |
59fe0 | 20 2d 20 24 6e 61 6d 65 4c 65 6e 67 74 68 20 2d 20 24 76 65 72 73 69 6f 6e 4c 65 6e 67 74 68 20 | .-.$nameLength.-.$versionLength. |
5a000 | 2d 20 34 3b 0a 69 66 20 28 24 77 72 69 74 65 4c 61 74 65 73 74 29 20 7b 0a 24 72 65 6d 61 69 6e | -.4;.if.($writeLatest).{.$remain |
5a020 | 69 6e 67 20 2d 3d 20 24 6c 61 74 65 73 74 4c 65 6e 67 74 68 3b 0a 7d 0a 69 66 20 28 73 74 72 6c | ing.-=.$latestLength;.}.if.(strl |
5a040 | 65 6e 28 24 64 65 73 63 72 69 70 74 69 6f 6e 29 20 3e 20 24 72 65 6d 61 69 6e 69 6e 67 29 20 7b | en($description).>.$remaining).{ |
5a060 | 0a 24 64 65 73 63 72 69 70 74 69 6f 6e 20 3d 20 73 75 62 73 74 72 28 24 64 65 73 63 72 69 70 74 | .$description.=.substr($descript |
5a080 | 69 6f 6e 2c 20 30 2c 20 24 72 65 6d 61 69 6e 69 6e 67 20 2d 20 33 29 20 2e 20 27 2e 2e 2e 27 3b | ion,.0,.$remaining.-.3)...'...'; |
5a0a0 | 0a 7d 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 20 27 20 2e 20 24 64 65 73 63 72 69 70 74 69 6f 6e | .}.$io->write('.'...$description |
5a0c0 | 2c 20 66 61 6c 73 65 29 3b 0a 7d 0a 69 66 20 28 69 73 73 65 74 28 24 70 61 63 6b 61 67 65 5b 27 | ,.false);.}.if.(isset($package[' |
5a0e0 | 70 61 74 68 27 5d 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 20 27 20 2e 20 24 70 61 63 | path'])).{.$io->write('.'...$pac |
5a100 | 6b 61 67 65 5b 27 70 61 74 68 27 5d 2c 20 66 61 6c 73 65 29 3b 0a 7d 0a 24 69 6f 2d 3e 77 72 69 | kage['path'],.false);.}.$io->wri |
5a120 | 74 65 28 27 27 29 3b 0a 69 66 20 28 69 73 73 65 74 28 24 70 61 63 6b 61 67 65 5b 27 77 61 72 6e | te('');.if.(isset($package['warn |
5a140 | 69 6e 67 27 5d 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 3c 77 61 72 6e 69 6e 67 3e 27 | ing'])).{.$io->write('<warning>' |
5a160 | 20 2e 20 24 70 61 63 6b 61 67 65 5b 27 77 61 72 6e 69 6e 67 27 5d 20 2e 20 27 3c 2f 77 61 72 6e | ...$package['warning']...'</warn |
5a180 | 69 6e 67 3e 27 29 3b 0a 7d 0a 7d 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 | ing>');.}.}.}.....protected.func |
5a1a0 | 74 69 6f 6e 20 67 65 74 52 6f 6f 74 52 65 71 75 69 72 65 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a | tion.getRootRequires():.array.{. |
5a1c0 | 24 72 6f 6f 74 50 61 63 6b 61 67 65 20 3d 20 24 74 68 69 73 2d 3e 72 65 71 75 69 72 65 43 6f 6d | $rootPackage.=.$this->requireCom |
5a1e0 | 70 6f 73 65 72 28 29 2d 3e 67 65 74 50 61 63 6b 61 67 65 28 29 3b 0a 0a 72 65 74 75 72 6e 20 61 | poser()->getPackage();..return.a |
5a200 | 72 72 61 79 5f 6d 61 70 28 0a 27 73 74 72 74 6f 6c 6f 77 65 72 27 2c 0a 61 72 72 61 79 5f 6b 65 | rray_map(.'strtolower',.array_ke |
5a220 | 79 73 28 61 72 72 61 79 5f 6d 65 72 67 65 28 24 72 6f 6f 74 50 61 63 6b 61 67 65 2d 3e 67 65 74 | ys(array_merge($rootPackage->get |
5a240 | 52 65 71 75 69 72 65 73 28 29 2c 20 24 72 6f 6f 74 50 61 63 6b 61 67 65 2d 3e 67 65 74 44 65 76 | Requires(),.$rootPackage->getDev |
5a260 | 52 65 71 75 69 72 65 73 28 29 29 29 0a 29 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 | Requires())).);.}.....protected. |
5a280 | 66 75 6e 63 74 69 6f 6e 20 67 65 74 56 65 72 73 69 6f 6e 53 74 79 6c 65 28 50 61 63 6b 61 67 65 | function.getVersionStyle(Package |
5a2a0 | 49 6e 74 65 72 66 61 63 65 20 24 6c 61 74 65 73 74 50 61 63 6b 61 67 65 2c 20 50 61 63 6b 61 67 | Interface.$latestPackage,.Packag |
5a2c0 | 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 29 0a 7b 0a 72 65 74 75 72 6e 20 24 74 | eInterface.$package).{.return.$t |
5a2e0 | 68 69 73 2d 3e 75 70 64 61 74 65 53 74 61 74 75 73 54 6f 56 65 72 73 69 6f 6e 53 74 79 6c 65 28 | his->updateStatusToVersionStyle( |
5a300 | 24 74 68 69 73 2d 3e 67 65 74 55 70 64 61 74 65 53 74 61 74 75 73 28 24 6c 61 74 65 73 74 50 61 | $this->getUpdateStatus($latestPa |
5a320 | 63 6b 61 67 65 2c 20 24 70 61 63 6b 61 67 65 29 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 72 6f | ckage,.$package));.}.........pro |
5a340 | 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 50 61 63 6b 61 67 65 28 49 6e 73 74 61 | tected.function.getPackage(Insta |
5a360 | 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 20 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 2c 20 52 | lledRepository.$installedRepo,.R |
5a380 | 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 20 24 72 65 70 6f 73 2c 20 73 74 72 69 6e | epositoryInterface.$repos,.strin |
5a3a0 | 67 20 24 6e 61 6d 65 2c 20 24 76 65 72 73 69 6f 6e 20 3d 20 6e 75 6c 6c 29 3a 20 61 72 72 61 79 | g.$name,.$version.=.null):.array |
5a3c0 | 0a 7b 0a 24 6e 61 6d 65 20 3d 20 73 74 72 74 6f 6c 6f 77 65 72 28 24 6e 61 6d 65 29 3b 0a 24 63 | .{.$name.=.strtolower($name);.$c |
5a3e0 | 6f 6e 73 74 72 61 69 6e 74 20 3d 20 69 73 5f 73 74 72 69 6e 67 28 24 76 65 72 73 69 6f 6e 29 20 | onstraint.=.is_string($version). |
5a400 | 3f 20 24 74 68 69 73 2d 3e 76 65 72 73 69 6f 6e 50 61 72 73 65 72 2d 3e 70 61 72 73 65 43 6f 6e | ?.$this->versionParser->parseCon |
5a420 | 73 74 72 61 69 6e 74 73 28 24 76 65 72 73 69 6f 6e 29 20 3a 20 24 76 65 72 73 69 6f 6e 3b 0a 0a | straints($version).:.$version;.. |
5a440 | 24 70 6f 6c 69 63 79 20 3d 20 6e 65 77 20 44 65 66 61 75 6c 74 50 6f 6c 69 63 79 28 29 3b 0a 24 | $policy.=.new.DefaultPolicy();.$ |
5a460 | 72 65 70 6f 73 69 74 6f 72 79 53 65 74 20 3d 20 6e 65 77 20 52 65 70 6f 73 69 74 6f 72 79 53 65 | repositorySet.=.new.RepositorySe |
5a480 | 74 28 27 64 65 76 27 29 3b 0a 24 72 65 70 6f 73 69 74 6f 72 79 53 65 74 2d 3e 61 6c 6c 6f 77 49 | t('dev');.$repositorySet->allowI |
5a4a0 | 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 69 65 73 28 29 3b 0a 24 72 65 70 6f 73 69 74 | nstalledRepositories();.$reposit |
5a4c0 | 6f 72 79 53 65 74 2d 3e 61 64 64 52 65 70 6f 73 69 74 6f 72 79 28 24 72 65 70 6f 73 29 3b 0a 0a | orySet->addRepository($repos);.. |
5a4e0 | 24 6d 61 74 63 68 65 64 50 61 63 6b 61 67 65 20 3d 20 6e 75 6c 6c 3b 0a 24 76 65 72 73 69 6f 6e | $matchedPackage.=.null;.$version |
5a500 | 73 20 3d 20 5b 5d 3b 0a 69 66 20 28 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 3a 3a | s.=.[];.if.(PlatformRepository:: |
5a520 | 69 73 50 6c 61 74 66 6f 72 6d 50 61 63 6b 61 67 65 28 24 6e 61 6d 65 29 29 20 7b 0a 24 70 6f 6f | isPlatformPackage($name)).{.$poo |
5a540 | 6c 20 3d 20 24 72 65 70 6f 73 69 74 6f 72 79 53 65 74 2d 3e 63 72 65 61 74 65 50 6f 6f 6c 57 69 | l.=.$repositorySet->createPoolWi |
5a560 | 74 68 41 6c 6c 50 61 63 6b 61 67 65 73 28 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 70 6f 6f 6c 20 | thAllPackages();.}.else.{.$pool. |
5a580 | 3d 20 24 72 65 70 6f 73 69 74 6f 72 79 53 65 74 2d 3e 63 72 65 61 74 65 50 6f 6f 6c 46 6f 72 50 | =.$repositorySet->createPoolForP |
5a5a0 | 61 63 6b 61 67 65 28 24 6e 61 6d 65 29 3b 0a 7d 0a 24 6d 61 74 63 68 65 73 20 3d 20 24 70 6f 6f | ackage($name);.}.$matches.=.$poo |
5a5c0 | 6c 2d 3e 77 68 61 74 50 72 6f 76 69 64 65 73 28 24 6e 61 6d 65 2c 20 24 63 6f 6e 73 74 72 61 69 | l->whatProvides($name,.$constrai |
5a5e0 | 6e 74 29 3b 0a 66 6f 72 65 61 63 68 20 28 24 6d 61 74 63 68 65 73 20 61 73 20 24 69 6e 64 65 78 | nt);.foreach.($matches.as.$index |
5a600 | 20 3d 3e 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 0a 69 66 20 28 24 70 61 63 6b 61 67 65 20 69 6e | .=>.$package).{..if.($package.in |
5a620 | 73 74 61 6e 63 65 6f 66 20 41 6c 69 61 73 50 61 63 6b 61 67 65 20 26 26 20 24 70 61 63 6b 61 67 | stanceof.AliasPackage.&&.$packag |
5a640 | 65 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 20 3d 3d 3d 20 56 65 72 73 69 6f 6e 50 61 72 73 65 | e->getVersion().===.VersionParse |
5a660 | 72 3a 3a 44 45 46 41 55 4c 54 5f 42 52 41 4e 43 48 5f 41 4c 49 41 53 29 20 7b 0a 24 70 61 63 6b | r::DEFAULT_BRANCH_ALIAS).{.$pack |
5a680 | 61 67 65 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 41 6c 69 61 73 4f 66 28 29 3b 0a 7d 0a | age.=.$package->getAliasOf();.}. |
5a6a0 | 0a 0a 69 66 20 28 6e 75 6c 6c 20 3d 3d 3d 20 24 76 65 72 73 69 6f 6e 20 26 26 20 24 69 6e 73 74 | ..if.(null.===.$version.&&.$inst |
5a6c0 | 61 6c 6c 65 64 52 65 70 6f 2d 3e 68 61 73 50 61 63 6b 61 67 65 28 24 70 61 63 6b 61 67 65 29 29 | alledRepo->hasPackage($package)) |
5a6e0 | 20 7b 0a 24 6d 61 74 63 68 65 64 50 61 63 6b 61 67 65 20 3d 20 24 70 61 63 6b 61 67 65 3b 0a 7d | .{.$matchedPackage.=.$package;.} |
5a700 | 0a 0a 24 76 65 72 73 69 6f 6e 73 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 56 | ..$versions[$package->getPrettyV |
5a720 | 65 72 73 69 6f 6e 28 29 5d 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 56 65 72 73 69 6f 6e | ersion()].=.$package->getVersion |
5a740 | 28 29 3b 0a 24 6d 61 74 63 68 65 73 5b 24 69 6e 64 65 78 5d 20 3d 20 24 70 61 63 6b 61 67 65 2d | ();.$matches[$index].=.$package- |
5a760 | 3e 67 65 74 49 64 28 29 3b 0a 7d 0a 0a 0a 69 66 20 28 21 24 6d 61 74 63 68 65 64 50 61 63 6b 61 | >getId();.}...if.(!$matchedPacka |
5a780 | 67 65 20 26 26 20 24 6d 61 74 63 68 65 73 20 26 26 20 24 70 72 65 66 65 72 72 65 64 20 3d 20 24 | ge.&&.$matches.&&.$preferred.=.$ |
5a7a0 | 70 6f 6c 69 63 79 2d 3e 73 65 6c 65 63 74 50 72 65 66 65 72 72 65 64 50 61 63 6b 61 67 65 73 28 | policy->selectPreferredPackages( |
5a7c0 | 24 70 6f 6f 6c 2c 20 24 6d 61 74 63 68 65 73 29 29 20 7b 0a 24 6d 61 74 63 68 65 64 50 61 63 6b | $pool,.$matches)).{.$matchedPack |
5a7e0 | 61 67 65 20 3d 20 24 70 6f 6f 6c 2d 3e 6c 69 74 65 72 61 6c 54 6f 50 61 63 6b 61 67 65 28 24 70 | age.=.$pool->literalToPackage($p |
5a800 | 72 65 66 65 72 72 65 64 5b 30 5d 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 5b 24 6d 61 74 63 68 65 | referred[0]);.}..return.[$matche |
5a820 | 64 50 61 63 6b 61 67 65 2c 20 24 76 65 72 73 69 6f 6e 73 5d 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 72 | dPackage,.$versions];.}.......pr |
5a840 | 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 70 72 69 6e 74 50 61 63 6b 61 67 65 49 6e 66 | otected.function.printPackageInf |
5a860 | 6f 28 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b | o(CompletePackageInterface.$pack |
5a880 | 61 67 65 2c 20 61 72 72 61 79 20 24 76 65 72 73 69 6f 6e 73 2c 20 49 6e 73 74 61 6c 6c 65 64 52 | age,.array.$versions,.InstalledR |
5a8a0 | 65 70 6f 73 69 74 6f 72 79 20 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 2c 20 3f 50 61 63 6b 61 | epository.$installedRepo,.?Packa |
5a8c0 | 67 65 49 6e 74 65 72 66 61 63 65 20 24 6c 61 74 65 73 74 50 61 63 6b 61 67 65 20 3d 20 6e 75 6c | geInterface.$latestPackage.=.nul |
5a8e0 | 6c 29 3a 20 76 6f 69 64 0a 7b 0a 24 69 6f 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 3b | l):.void.{.$io.=.$this->getIO(); |
5a900 | 0a 0a 24 74 68 69 73 2d 3e 70 72 69 6e 74 4d 65 74 61 28 24 70 61 63 6b 61 67 65 2c 20 24 76 65 | ..$this->printMeta($package,.$ve |
5a920 | 72 73 69 6f 6e 73 2c 20 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 2c 20 24 6c 61 74 65 73 74 50 | rsions,.$installedRepo,.$latestP |
5a940 | 61 63 6b 61 67 65 20 3f 3a 20 6e 75 6c 6c 29 3b 0a 24 74 68 69 73 2d 3e 70 72 69 6e 74 4c 69 6e | ackage.?:.null);.$this->printLin |
5a960 | 6b 73 28 24 70 61 63 6b 61 67 65 2c 20 4c 69 6e 6b 3a 3a 54 59 50 45 5f 52 45 51 55 49 52 45 29 | ks($package,.Link::TYPE_REQUIRE) |
5a980 | 3b 0a 24 74 68 69 73 2d 3e 70 72 69 6e 74 4c 69 6e 6b 73 28 24 70 61 63 6b 61 67 65 2c 20 4c 69 | ;.$this->printLinks($package,.Li |
5a9a0 | 6e 6b 3a 3a 54 59 50 45 5f 44 45 56 5f 52 45 51 55 49 52 45 2c 20 27 72 65 71 75 69 72 65 73 20 | nk::TYPE_DEV_REQUIRE,.'requires. |
5a9c0 | 28 64 65 76 29 27 29 3b 0a 0a 69 66 20 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 53 75 67 67 65 | (dev)');..if.($package->getSugge |
5a9e0 | 73 74 73 28 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 22 5c 6e 3c 69 6e 66 6f 3e 73 75 67 | sts()).{.$io->write("\n<info>sug |
5aa00 | 67 65 73 74 73 3c 2f 69 6e 66 6f 3e 22 29 3b 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 | gests</info>");.foreach.($packag |
5aa20 | 65 2d 3e 67 65 74 53 75 67 67 65 73 74 73 28 29 20 61 73 20 24 73 75 67 67 65 73 74 65 64 20 3d | e->getSuggests().as.$suggested.= |
5aa40 | 3e 20 24 72 65 61 73 6f 6e 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 24 73 75 67 67 65 73 74 | >.$reason).{.$io->write($suggest |
5aa60 | 65 64 20 2e 20 27 20 3c 63 6f 6d 6d 65 6e 74 3e 27 20 2e 20 24 72 65 61 73 6f 6e 20 2e 20 27 3c | ed...'.<comment>'...$reason...'< |
5aa80 | 2f 63 6f 6d 6d 65 6e 74 3e 27 29 3b 0a 7d 0a 7d 0a 0a 24 74 68 69 73 2d 3e 70 72 69 6e 74 4c 69 | /comment>');.}.}..$this->printLi |
5aaa0 | 6e 6b 73 28 24 70 61 63 6b 61 67 65 2c 20 4c 69 6e 6b 3a 3a 54 59 50 45 5f 50 52 4f 56 49 44 45 | nks($package,.Link::TYPE_PROVIDE |
5aac0 | 29 3b 0a 24 74 68 69 73 2d 3e 70 72 69 6e 74 4c 69 6e 6b 73 28 24 70 61 63 6b 61 67 65 2c 20 4c | );.$this->printLinks($package,.L |
5aae0 | 69 6e 6b 3a 3a 54 59 50 45 5f 43 4f 4e 46 4c 49 43 54 29 3b 0a 24 74 68 69 73 2d 3e 70 72 69 6e | ink::TYPE_CONFLICT);.$this->prin |
5ab00 | 74 4c 69 6e 6b 73 28 24 70 61 63 6b 61 67 65 2c 20 4c 69 6e 6b 3a 3a 54 59 50 45 5f 52 45 50 4c | tLinks($package,.Link::TYPE_REPL |
5ab20 | 41 43 45 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e | ACE);.}.......protected.function |
5ab40 | 20 70 72 69 6e 74 4d 65 74 61 28 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 49 6e 74 65 72 66 | .printMeta(CompletePackageInterf |
5ab60 | 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 61 72 72 61 79 20 24 76 65 72 73 69 6f 6e 73 2c 20 49 | ace.$package,.array.$versions,.I |
5ab80 | 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 20 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 | nstalledRepository.$installedRep |
5aba0 | 6f 2c 20 3f 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 6c 61 74 65 73 74 50 61 63 6b | o,.?PackageInterface.$latestPack |
5abc0 | 61 67 65 20 3d 20 6e 75 6c 6c 29 3a 20 76 6f 69 64 0a 7b 0a 24 69 6f 20 3d 20 24 74 68 69 73 2d | age.=.null):.void.{.$io.=.$this- |
5abe0 | 3e 67 65 74 49 4f 28 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 3c 69 6e 66 6f 3e 6e 61 6d 65 | >getIO();.$io->write('<info>name |
5ac00 | 3c 2f 69 6e 66 6f 3e 20 20 20 20 20 3a 20 27 20 2e 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 | </info>.....:.'...$package->getP |
5ac20 | 72 65 74 74 79 4e 61 6d 65 28 29 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 3c 69 6e 66 6f 3e | rettyName());.$io->write('<info> |
5ac40 | 64 65 73 63 72 69 70 2e 3c 2f 69 6e 66 6f 3e 20 3a 20 27 20 2e 20 24 70 61 63 6b 61 67 65 2d 3e | descrip.</info>.:.'...$package-> |
5ac60 | 67 65 74 44 65 73 63 72 69 70 74 69 6f 6e 28 29 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 3c | getDescription());.$io->write('< |
5ac80 | 69 6e 66 6f 3e 6b 65 79 77 6f 72 64 73 3c 2f 69 6e 66 6f 3e 20 3a 20 27 20 2e 20 69 6d 70 6c 6f | info>keywords</info>.:.'...implo |
5aca0 | 64 65 28 27 2c 20 27 2c 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4b 65 79 77 6f 72 64 73 28 29 | de(',.',.$package->getKeywords() |
5acc0 | 20 3f 3a 20 5b 5d 29 29 3b 0a 24 74 68 69 73 2d 3e 70 72 69 6e 74 56 65 72 73 69 6f 6e 73 28 24 | .?:.[]));.$this->printVersions($ |
5ace0 | 70 61 63 6b 61 67 65 2c 20 24 76 65 72 73 69 6f 6e 73 2c 20 24 69 6e 73 74 61 6c 6c 65 64 52 65 | package,.$versions,.$installedRe |
5ad00 | 70 6f 29 3b 0a 69 66 20 28 24 6c 61 74 65 73 74 50 61 63 6b 61 67 65 29 20 7b 0a 24 73 74 79 6c | po);.if.($latestPackage).{.$styl |
5ad20 | 65 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 56 65 72 73 69 6f 6e 53 74 79 6c 65 28 24 6c 61 74 65 | e.=.$this->getVersionStyle($late |
5ad40 | 73 74 50 61 63 6b 61 67 65 2c 20 24 70 61 63 6b 61 67 65 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 | stPackage,.$package);.$io->write |
5ad60 | 28 27 3c 69 6e 66 6f 3e 6c 61 74 65 73 74 3c 2f 69 6e 66 6f 3e 20 20 20 3a 20 3c 27 2e 24 73 74 | ('<info>latest</info>...:.<'.$st |
5ad80 | 79 6c 65 2e 27 3e 27 20 2e 20 24 6c 61 74 65 73 74 50 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 | yle.'>'...$latestPackage->getPre |
5ada0 | 74 74 79 56 65 72 73 69 6f 6e 28 29 20 2e 20 27 3c 2f 27 2e 24 73 74 79 6c 65 2e 27 3e 27 29 3b | ttyVersion()...'</'.$style.'>'); |
5adc0 | 0a 7d 20 65 6c 73 65 20 7b 0a 24 6c 61 74 65 73 74 50 61 63 6b 61 67 65 20 3d 20 24 70 61 63 6b | .}.else.{.$latestPackage.=.$pack |
5ade0 | 61 67 65 3b 0a 7d 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 3c 69 6e 66 6f 3e 74 79 70 65 3c 2f 69 | age;.}.$io->write('<info>type</i |
5ae00 | 6e 66 6f 3e 20 20 20 20 20 3a 20 27 20 2e 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 54 79 70 65 | nfo>.....:.'...$package->getType |
5ae20 | 28 29 29 3b 0a 24 74 68 69 73 2d 3e 70 72 69 6e 74 4c 69 63 65 6e 73 65 73 28 24 70 61 63 6b 61 | ());.$this->printLicenses($packa |
5ae40 | 67 65 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 3c 69 6e 66 6f 3e 68 6f 6d 65 70 61 67 65 3c | ge);.$io->write('<info>homepage< |
5ae60 | 2f 69 6e 66 6f 3e 20 3a 20 27 20 2e 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 48 6f 6d 65 70 61 | /info>.:.'...$package->getHomepa |
5ae80 | 67 65 28 29 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 3c 69 6e 66 6f 3e 73 6f 75 72 63 65 3c | ge());.$io->write('<info>source< |
5aea0 | 2f 69 6e 66 6f 3e 20 20 20 3a 20 27 20 2e 20 73 70 72 69 6e 74 66 28 27 5b 25 73 5d 20 3c 63 6f | /info>...:.'...sprintf('[%s].<co |
5aec0 | 6d 6d 65 6e 74 3e 25 73 3c 2f 63 6f 6d 6d 65 6e 74 3e 20 25 73 27 2c 20 24 70 61 63 6b 61 67 65 | mment>%s</comment>.%s',.$package |
5aee0 | 2d 3e 67 65 74 53 6f 75 72 63 65 54 79 70 65 28 29 2c 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 | ->getSourceType(),.$package->get |
5af00 | 53 6f 75 72 63 65 55 72 6c 28 29 2c 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 53 6f 75 72 63 65 | SourceUrl(),.$package->getSource |
5af20 | 52 65 66 65 72 65 6e 63 65 28 29 29 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 3c 69 6e 66 6f | Reference()));.$io->write('<info |
5af40 | 3e 64 69 73 74 3c 2f 69 6e 66 6f 3e 20 20 20 20 20 3a 20 27 20 2e 20 73 70 72 69 6e 74 66 28 27 | >dist</info>.....:.'...sprintf(' |
5af60 | 5b 25 73 5d 20 3c 63 6f 6d 6d 65 6e 74 3e 25 73 3c 2f 63 6f 6d 6d 65 6e 74 3e 20 25 73 27 2c 20 | [%s].<comment>%s</comment>.%s',. |
5af80 | 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 44 69 73 74 54 79 70 65 28 29 2c 20 24 70 61 63 6b 61 67 | $package->getDistType(),.$packag |
5afa0 | 65 2d 3e 67 65 74 44 69 73 74 55 72 6c 28 29 2c 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 44 69 | e->getDistUrl(),.$package->getDi |
5afc0 | 73 74 52 65 66 65 72 65 6e 63 65 28 29 29 29 3b 0a 69 66 20 28 24 69 6e 73 74 61 6c 6c 65 64 52 | stReference()));.if.($installedR |
5afe0 | 65 70 6f 2d 3e 68 61 73 50 61 63 6b 61 67 65 28 24 70 61 63 6b 61 67 65 29 29 20 7b 0a 24 69 6f | epo->hasPackage($package)).{.$io |
5b000 | 2d 3e 77 72 69 74 65 28 27 3c 69 6e 66 6f 3e 70 61 74 68 3c 2f 69 6e 66 6f 3e 20 20 20 20 20 3a | ->write('<info>path</info>.....: |
5b020 | 20 27 20 2e 20 73 70 72 69 6e 74 66 28 27 25 73 27 2c 20 72 65 61 6c 70 61 74 68 28 24 74 68 69 | .'...sprintf('%s',.realpath($thi |
5b040 | 73 2d 3e 72 65 71 75 69 72 65 43 6f 6d 70 6f 73 65 72 28 29 2d 3e 67 65 74 49 6e 73 74 61 6c 6c | s->requireComposer()->getInstall |
5b060 | 61 74 69 6f 6e 4d 61 6e 61 67 65 72 28 29 2d 3e 67 65 74 49 6e 73 74 61 6c 6c 50 61 74 68 28 24 | ationManager()->getInstallPath($ |
5b080 | 70 61 63 6b 61 67 65 29 29 29 29 3b 0a 7d 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 3c 69 6e 66 6f | package))));.}.$io->write('<info |
5b0a0 | 3e 6e 61 6d 65 73 3c 2f 69 6e 66 6f 3e 20 20 20 20 3a 20 27 20 2e 20 69 6d 70 6c 6f 64 65 28 27 | >names</info>....:.'...implode(' |
5b0c0 | 2c 20 27 2c 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 73 28 29 29 29 3b 0a 0a 69 66 | ,.',.$package->getNames()));..if |
5b0e0 | 20 28 24 6c 61 74 65 73 74 50 61 63 6b 61 67 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 43 6f 6d 70 | .($latestPackage.instanceof.Comp |
5b100 | 6c 65 74 65 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 26 26 20 24 6c 61 74 65 73 74 50 | letePackageInterface.&&.$latestP |
5b120 | 61 63 6b 61 67 65 2d 3e 69 73 41 62 61 6e 64 6f 6e 65 64 28 29 29 20 7b 0a 24 72 65 70 6c 61 63 | ackage->isAbandoned()).{.$replac |
5b140 | 65 6d 65 6e 74 20 3d 20 28 24 6c 61 74 65 73 74 50 61 63 6b 61 67 65 2d 3e 67 65 74 52 65 70 6c | ement.=.($latestPackage->getRepl |
5b160 | 61 63 65 6d 65 6e 74 50 61 63 6b 61 67 65 28 29 20 21 3d 3d 20 6e 75 6c 6c 29 0a 3f 20 27 20 54 | acementPackage().!==.null).?.'.T |
5b180 | 68 65 20 61 75 74 68 6f 72 20 73 75 67 67 65 73 74 73 20 75 73 69 6e 67 20 74 68 65 20 27 20 2e | he.author.suggests.using.the.'.. |
5b1a0 | 20 24 6c 61 74 65 73 74 50 61 63 6b 61 67 65 2d 3e 67 65 74 52 65 70 6c 61 63 65 6d 65 6e 74 50 | .$latestPackage->getReplacementP |
5b1c0 | 61 63 6b 61 67 65 28 29 2e 20 27 20 70 61 63 6b 61 67 65 20 69 6e 73 74 65 61 64 2e 27 0a 3a 20 | ackage()..'.package.instead.'.:. |
5b1e0 | 6e 75 6c 6c 3b 0a 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 0a 73 70 72 69 6e 74 66 28 | null;..$io->writeError(.sprintf( |
5b200 | 27 3c 77 61 72 6e 69 6e 67 3e 41 74 74 65 6e 74 69 6f 6e 3a 20 54 68 69 73 20 70 61 63 6b 61 67 | '<warning>Attention:.This.packag |
5b220 | 65 20 69 73 20 61 62 61 6e 64 6f 6e 65 64 20 61 6e 64 20 6e 6f 20 6c 6f 6e 67 65 72 20 6d 61 69 | e.is.abandoned.and.no.longer.mai |
5b240 | 6e 74 61 69 6e 65 64 2e 25 73 3c 2f 77 61 72 6e 69 6e 67 3e 27 2c 20 24 72 65 70 6c 61 63 65 6d | ntained.%s</warning>',.$replacem |
5b260 | 65 6e 74 29 0a 29 3b 0a 7d 0a 0a 69 66 20 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 53 75 70 70 | ent).);.}..if.($package->getSupp |
5b280 | 6f 72 74 28 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 22 5c 6e 3c 69 6e 66 6f 3e 73 75 70 | ort()).{.$io->write("\n<info>sup |
5b2a0 | 70 6f 72 74 3c 2f 69 6e 66 6f 3e 22 29 3b 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 | port</info>");.foreach.($package |
5b2c0 | 2d 3e 67 65 74 53 75 70 70 6f 72 74 28 29 20 61 73 20 24 74 79 70 65 20 3d 3e 20 24 76 61 6c 75 | ->getSupport().as.$type.=>.$valu |
5b2e0 | 65 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 3c 63 6f 6d 6d 65 6e 74 3e 27 20 2e 20 24 74 | e).{.$io->write('<comment>'...$t |
5b300 | 79 70 65 20 2e 20 27 3c 2f 63 6f 6d 6d 65 6e 74 3e 20 3a 20 27 2e 24 76 61 6c 75 65 29 3b 0a 7d | ype...'</comment>.:.'.$value);.} |
5b320 | 0a 7d 0a 0a 69 66 20 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 41 75 74 6f 6c 6f 61 64 28 29 29 | .}..if.($package->getAutoload()) |
5b340 | 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 22 5c 6e 3c 69 6e 66 6f 3e 61 75 74 6f 6c 6f 61 64 3c | .{.$io->write("\n<info>autoload< |
5b360 | 2f 69 6e 66 6f 3e 22 29 3b 0a 24 61 75 74 6f 6c 6f 61 64 43 6f 6e 66 69 67 20 3d 20 24 70 61 63 | /info>");.$autoloadConfig.=.$pac |
5b380 | 6b 61 67 65 2d 3e 67 65 74 41 75 74 6f 6c 6f 61 64 28 29 3b 0a 66 6f 72 65 61 63 68 20 28 24 61 | kage->getAutoload();.foreach.($a |
5b3a0 | 75 74 6f 6c 6f 61 64 43 6f 6e 66 69 67 20 61 73 20 24 74 79 70 65 20 3d 3e 20 24 61 75 74 6f 6c | utoloadConfig.as.$type.=>.$autol |
5b3c0 | 6f 61 64 73 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 3c 63 6f 6d 6d 65 6e 74 3e 27 20 2e | oads).{.$io->write('<comment>'.. |
5b3e0 | 20 24 74 79 70 65 20 2e 20 27 3c 2f 63 6f 6d 6d 65 6e 74 3e 27 29 3b 0a 0a 69 66 20 28 24 74 79 | .$type...'</comment>');..if.($ty |
5b400 | 70 65 20 3d 3d 3d 20 27 70 73 72 2d 30 27 20 7c 7c 20 24 74 79 70 65 20 3d 3d 3d 20 27 70 73 72 | pe.===.'psr-0'.||.$type.===.'psr |
5b420 | 2d 34 27 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 61 75 74 6f 6c 6f 61 64 73 20 61 73 20 24 6e | -4').{.foreach.($autoloads.as.$n |
5b440 | 61 6d 65 20 3d 3e 20 24 70 61 74 68 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 28 24 6e 61 6d | ame.=>.$path).{.$io->write(($nam |
5b460 | 65 20 3f 3a 20 27 2a 27 29 20 2e 20 27 20 3d 3e 20 27 20 2e 20 28 69 73 5f 61 72 72 61 79 28 24 | e.?:.'*')...'.=>.'...(is_array($ |
5b480 | 70 61 74 68 29 20 3f 20 69 6d 70 6c 6f 64 65 28 27 2c 20 27 2c 20 24 70 61 74 68 29 20 3a 20 28 | path).?.implode(',.',.$path).:.( |
5b4a0 | 24 70 61 74 68 20 3f 3a 20 27 2e 27 29 29 29 3b 0a 7d 0a 7d 20 65 6c 73 65 69 66 20 28 24 74 79 | $path.?:.'.')));.}.}.elseif.($ty |
5b4c0 | 70 65 20 3d 3d 3d 20 27 63 6c 61 73 73 6d 61 70 27 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 | pe.===.'classmap').{.$io->write( |
5b4e0 | 69 6d 70 6c 6f 64 65 28 27 2c 20 27 2c 20 24 61 75 74 6f 6c 6f 61 64 43 6f 6e 66 69 67 5b 24 74 | implode(',.',.$autoloadConfig[$t |
5b500 | 79 70 65 5d 29 29 3b 0a 7d 0a 7d 0a 69 66 20 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 49 6e 63 | ype]));.}.}.if.($package->getInc |
5b520 | 6c 75 64 65 50 61 74 68 73 28 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 3c 63 6f 6d 6d | ludePaths()).{.$io->write('<comm |
5b540 | 65 6e 74 3e 69 6e 63 6c 75 64 65 2d 70 61 74 68 3c 2f 63 6f 6d 6d 65 6e 74 3e 27 29 3b 0a 24 69 | ent>include-path</comment>');.$i |
5b560 | 6f 2d 3e 77 72 69 74 65 28 69 6d 70 6c 6f 64 65 28 27 2c 20 27 2c 20 24 70 61 63 6b 61 67 65 2d | o->write(implode(',.',.$package- |
5b580 | 3e 67 65 74 49 6e 63 6c 75 64 65 50 61 74 68 73 28 29 29 29 3b 0a 7d 0a 7d 0a 7d 0a 0a 0a 0a 0a | >getIncludePaths()));.}.}.}..... |
5b5a0 | 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 70 72 69 6e 74 56 65 72 73 69 6f | ..protected.function.printVersio |
5b5c0 | 6e 73 28 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 | ns(CompletePackageInterface.$pac |
5b5e0 | 6b 61 67 65 2c 20 61 72 72 61 79 20 24 76 65 72 73 69 6f 6e 73 2c 20 49 6e 73 74 61 6c 6c 65 64 | kage,.array.$versions,.Installed |
5b600 | 52 65 70 6f 73 69 74 6f 72 79 20 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 29 3a 20 76 6f 69 64 | Repository.$installedRepo):.void |
5b620 | 0a 7b 0a 24 76 65 72 73 69 6f 6e 73 20 3d 20 61 72 72 61 79 5f 6b 65 79 73 28 24 76 65 72 73 69 | .{.$versions.=.array_keys($versi |
5b640 | 6f 6e 73 29 3b 0a 24 76 65 72 73 69 6f 6e 73 20 3d 20 53 65 6d 76 65 72 3a 3a 72 73 6f 72 74 28 | ons);.$versions.=.Semver::rsort( |
5b660 | 24 76 65 72 73 69 6f 6e 73 29 3b 0a 0a 0a 69 66 20 28 24 69 6e 73 74 61 6c 6c 65 64 50 61 63 6b | $versions);...if.($installedPack |
5b680 | 61 67 65 73 20 3d 20 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 2d 3e 66 69 6e 64 50 61 63 6b 61 | ages.=.$installedRepo->findPacka |
5b6a0 | 67 65 73 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 29 29 20 7b 0a 66 6f 72 65 | ges($package->getName())).{.fore |
5b6c0 | 61 63 68 20 28 24 69 6e 73 74 61 6c 6c 65 64 50 61 63 6b 61 67 65 73 20 61 73 20 24 69 6e 73 74 | ach.($installedPackages.as.$inst |
5b6e0 | 61 6c 6c 65 64 50 61 63 6b 61 67 65 29 20 7b 0a 24 69 6e 73 74 61 6c 6c 65 64 56 65 72 73 69 6f | alledPackage).{.$installedVersio |
5b700 | 6e 20 3d 20 24 69 6e 73 74 61 6c 6c 65 64 50 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 | n.=.$installedPackage->getPretty |
5b720 | 56 65 72 73 69 6f 6e 28 29 3b 0a 24 6b 65 79 20 3d 20 61 72 72 61 79 5f 73 65 61 72 63 68 28 24 | Version();.$key.=.array_search($ |
5b740 | 69 6e 73 74 61 6c 6c 65 64 56 65 72 73 69 6f 6e 2c 20 24 76 65 72 73 69 6f 6e 73 29 3b 0a 69 66 | installedVersion,.$versions);.if |
5b760 | 20 28 66 61 6c 73 65 20 21 3d 3d 20 24 6b 65 79 29 20 7b 0a 24 76 65 72 73 69 6f 6e 73 5b 24 6b | .(false.!==.$key).{.$versions[$k |
5b780 | 65 79 5d 20 3d 20 27 3c 69 6e 66 6f 3e 2a 20 27 20 2e 20 24 69 6e 73 74 61 6c 6c 65 64 56 65 72 | ey].=.'<info>*.'...$installedVer |
5b7a0 | 73 69 6f 6e 20 2e 20 27 3c 2f 69 6e 66 6f 3e 27 3b 0a 7d 0a 7d 0a 7d 0a 0a 24 76 65 72 73 69 6f | sion...'</info>';.}.}.}..$versio |
5b7c0 | 6e 73 20 3d 20 69 6d 70 6c 6f 64 65 28 27 2c 20 27 2c 20 24 76 65 72 73 69 6f 6e 73 29 3b 0a 0a | ns.=.implode(',.',.$versions);.. |
5b7e0 | 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 2d 3e 77 72 69 74 65 28 27 3c 69 6e 66 6f 3e 76 65 72 | $this->getIO()->write('<info>ver |
5b800 | 73 69 6f 6e 73 3c 2f 69 6e 66 6f 3e 20 3a 20 27 20 2e 20 24 76 65 72 73 69 6f 6e 73 29 3b 0a 7d | sions</info>.:.'...$versions);.} |
5b820 | 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 70 72 69 6e 74 4c | .......protected.function.printL |
5b840 | 69 6e 6b 73 28 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 | inks(CompletePackageInterface.$p |
5b860 | 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 6c 69 6e 6b 54 79 70 65 2c 20 3f 73 74 72 69 6e | ackage,.string.$linkType,.?strin |
5b880 | 67 20 24 74 69 74 6c 65 20 3d 20 6e 75 6c 6c 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 69 74 6c 65 20 | g.$title.=.null):.void.{.$title. |
5b8a0 | 3d 20 24 74 69 74 6c 65 20 3f 3a 20 24 6c 69 6e 6b 54 79 70 65 3b 0a 24 69 6f 20 3d 20 24 74 68 | =.$title.?:.$linkType;.$io.=.$th |
5b8c0 | 69 73 2d 3e 67 65 74 49 4f 28 29 3b 0a 69 66 20 28 24 6c 69 6e 6b 73 20 3d 20 24 70 61 63 6b 61 | is->getIO();.if.($links.=.$packa |
5b8e0 | 67 65 2d 3e 7b 27 67 65 74 27 2e 75 63 66 69 72 73 74 28 24 6c 69 6e 6b 54 79 70 65 29 7d 28 29 | ge->{'get'.ucfirst($linkType)}() |
5b900 | 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 22 5c 6e 3c 69 6e 66 6f 3e 22 20 2e 20 24 74 69 74 | ).{.$io->write("\n<info>"...$tit |
5b920 | 6c 65 20 2e 20 22 3c 2f 69 6e 66 6f 3e 22 29 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 6c 69 6e 6b | le..."</info>");..foreach.($link |
5b940 | 73 20 61 73 20 24 6c 69 6e 6b 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 24 6c 69 6e 6b 2d 3e | s.as.$link).{.$io->write($link-> |
5b960 | 67 65 74 54 61 72 67 65 74 28 29 20 2e 20 27 20 3c 63 6f 6d 6d 65 6e 74 3e 27 20 2e 20 24 6c 69 | getTarget()...'.<comment>'...$li |
5b980 | 6e 6b 2d 3e 67 65 74 50 72 65 74 74 79 43 6f 6e 73 74 72 61 69 6e 74 28 29 20 2e 20 27 3c 2f 63 | nk->getPrettyConstraint()...'</c |
5b9a0 | 6f 6d 6d 65 6e 74 3e 27 29 3b 0a 7d 0a 7d 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 | omment>');.}.}.}.....protected.f |
5b9c0 | 75 6e 63 74 69 6f 6e 20 70 72 69 6e 74 4c 69 63 65 6e 73 65 73 28 43 6f 6d 70 6c 65 74 65 50 61 | unction.printLicenses(CompletePa |
5b9e0 | 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 29 3a 20 76 6f 69 64 0a 7b | ckageInterface.$package):.void.{ |
5ba00 | 0a 24 73 70 64 78 4c 69 63 65 6e 73 65 73 20 3d 20 6e 65 77 20 53 70 64 78 4c 69 63 65 6e 73 65 | .$spdxLicenses.=.new.SpdxLicense |
5ba20 | 73 28 29 3b 0a 0a 24 6c 69 63 65 6e 73 65 73 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4c | s();..$licenses.=.$package->getL |
5ba40 | 69 63 65 6e 73 65 28 29 3b 0a 24 69 6f 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 3b 0a | icense();.$io.=.$this->getIO();. |
5ba60 | 0a 66 6f 72 65 61 63 68 20 28 24 6c 69 63 65 6e 73 65 73 20 61 73 20 24 6c 69 63 65 6e 73 65 49 | .foreach.($licenses.as.$licenseI |
5ba80 | 64 29 20 7b 0a 24 6c 69 63 65 6e 73 65 20 3d 20 24 73 70 64 78 4c 69 63 65 6e 73 65 73 2d 3e 67 | d).{.$license.=.$spdxLicenses->g |
5baa0 | 65 74 4c 69 63 65 6e 73 65 42 79 49 64 65 6e 74 69 66 69 65 72 28 24 6c 69 63 65 6e 73 65 49 64 | etLicenseByIdentifier($licenseId |
5bac0 | 29 3b 20 0a 0a 69 66 20 28 21 24 6c 69 63 65 6e 73 65 29 20 7b 0a 24 6f 75 74 20 3d 20 24 6c 69 | );...if.(!$license).{.$out.=.$li |
5bae0 | 63 65 6e 73 65 49 64 3b 0a 7d 20 65 6c 73 65 20 7b 0a 0a 69 66 20 28 24 6c 69 63 65 6e 73 65 5b | censeId;.}.else.{..if.($license[ |
5bb00 | 31 5d 20 3d 3d 3d 20 74 72 75 65 29 20 7b 0a 24 6f 75 74 20 3d 20 73 70 72 69 6e 74 66 28 27 25 | 1].===.true).{.$out.=.sprintf('% |
5bb20 | 73 20 28 25 73 29 20 28 4f 53 49 20 61 70 70 72 6f 76 65 64 29 20 25 73 27 2c 20 24 6c 69 63 65 | s.(%s).(OSI.approved).%s',.$lice |
5bb40 | 6e 73 65 5b 30 5d 2c 20 24 6c 69 63 65 6e 73 65 49 64 2c 20 24 6c 69 63 65 6e 73 65 5b 32 5d 29 | nse[0],.$licenseId,.$license[2]) |
5bb60 | 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 6f 75 74 20 3d 20 73 70 72 69 6e 74 66 28 27 25 73 20 28 25 | ;.}.else.{.$out.=.sprintf('%s.(% |
5bb80 | 73 29 20 25 73 27 2c 20 24 6c 69 63 65 6e 73 65 5b 30 5d 2c 20 24 6c 69 63 65 6e 73 65 49 64 2c | s).%s',.$license[0],.$licenseId, |
5bba0 | 20 24 6c 69 63 65 6e 73 65 5b 32 5d 29 3b 0a 7d 0a 7d 0a 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 | .$license[2]);.}.}..$io->write(' |
5bbc0 | 3c 69 6e 66 6f 3e 6c 69 63 65 6e 73 65 3c 2f 69 6e 66 6f 3e 20 20 3a 20 27 20 2e 20 24 6f 75 74 | <info>license</info>..:.'...$out |
5bbe0 | 29 3b 0a 7d 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 | );.}.}.......protected.function. |
5bc00 | 70 72 69 6e 74 50 61 63 6b 61 67 65 49 6e 66 6f 41 73 4a 73 6f 6e 28 43 6f 6d 70 6c 65 74 65 50 | printPackageInfoAsJson(CompleteP |
5bc20 | 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 61 72 72 61 79 20 | ackageInterface.$package,.array. |
5bc40 | 24 76 65 72 73 69 6f 6e 73 2c 20 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 20 24 | $versions,.InstalledRepository.$ |
5bc60 | 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 2c 20 3f 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 | installedRepo,.?PackageInterface |
5bc80 | 20 24 6c 61 74 65 73 74 50 61 63 6b 61 67 65 20 3d 20 6e 75 6c 6c 29 3a 20 76 6f 69 64 0a 7b 0a | .$latestPackage.=.null):.void.{. |
5bca0 | 24 6a 73 6f 6e 20 3d 20 5b 0a 27 6e 61 6d 65 27 20 3d 3e 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 | $json.=.[.'name'.=>.$package->ge |
5bcc0 | 74 50 72 65 74 74 79 4e 61 6d 65 28 29 2c 0a 27 64 65 73 63 72 69 70 74 69 6f 6e 27 20 3d 3e 20 | tPrettyName(),.'description'.=>. |
5bce0 | 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 44 65 73 63 72 69 70 74 69 6f 6e 28 29 2c 0a 27 6b 65 79 | $package->getDescription(),.'key |
5bd00 | 77 6f 72 64 73 27 20 3d 3e 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4b 65 79 77 6f 72 64 73 28 | words'.=>.$package->getKeywords( |
5bd20 | 29 20 3f 3a 20 5b 5d 2c 0a 27 74 79 70 65 27 20 3d 3e 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 | ).?:.[],.'type'.=>.$package->get |
5bd40 | 54 79 70 65 28 29 2c 0a 27 68 6f 6d 65 70 61 67 65 27 20 3d 3e 20 24 70 61 63 6b 61 67 65 2d 3e | Type(),.'homepage'.=>.$package-> |
5bd60 | 67 65 74 48 6f 6d 65 70 61 67 65 28 29 2c 0a 27 6e 61 6d 65 73 27 20 3d 3e 20 24 70 61 63 6b 61 | getHomepage(),.'names'.=>.$packa |
5bd80 | 67 65 2d 3e 67 65 74 4e 61 6d 65 73 28 29 2c 0a 5d 3b 0a 0a 24 6a 73 6f 6e 20 3d 20 24 74 68 69 | ge->getNames(),.];..$json.=.$thi |
5bda0 | 73 2d 3e 61 70 70 65 6e 64 56 65 72 73 69 6f 6e 73 28 24 6a 73 6f 6e 2c 20 24 76 65 72 73 69 6f | s->appendVersions($json,.$versio |
5bdc0 | 6e 73 29 3b 0a 24 6a 73 6f 6e 20 3d 20 24 74 68 69 73 2d 3e 61 70 70 65 6e 64 4c 69 63 65 6e 73 | ns);.$json.=.$this->appendLicens |
5bde0 | 65 73 28 24 6a 73 6f 6e 2c 20 24 70 61 63 6b 61 67 65 29 3b 0a 0a 69 66 20 28 24 6c 61 74 65 73 | es($json,.$package);..if.($lates |
5be00 | 74 50 61 63 6b 61 67 65 29 20 7b 0a 24 6a 73 6f 6e 5b 27 6c 61 74 65 73 74 27 5d 20 3d 20 24 6c | tPackage).{.$json['latest'].=.$l |
5be20 | 61 74 65 73 74 50 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 | atestPackage->getPrettyVersion() |
5be40 | 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 6c 61 74 65 73 74 50 61 63 6b 61 67 65 20 3d 20 24 70 61 63 | ;.}.else.{.$latestPackage.=.$pac |
5be60 | 6b 61 67 65 3b 0a 7d 0a 0a 69 66 20 28 6e 75 6c 6c 20 21 3d 3d 20 24 70 61 63 6b 61 67 65 2d 3e | kage;.}..if.(null.!==.$package-> |
5be80 | 67 65 74 53 6f 75 72 63 65 54 79 70 65 28 29 29 20 7b 0a 24 6a 73 6f 6e 5b 27 73 6f 75 72 63 65 | getSourceType()).{.$json['source |
5bea0 | 27 5d 20 3d 20 5b 0a 27 74 79 70 65 27 20 3d 3e 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 53 6f | '].=.[.'type'.=>.$package->getSo |
5bec0 | 75 72 63 65 54 79 70 65 28 29 2c 0a 27 75 72 6c 27 20 3d 3e 20 24 70 61 63 6b 61 67 65 2d 3e 67 | urceType(),.'url'.=>.$package->g |
5bee0 | 65 74 53 6f 75 72 63 65 55 72 6c 28 29 2c 0a 27 72 65 66 65 72 65 6e 63 65 27 20 3d 3e 20 24 70 | etSourceUrl(),.'reference'.=>.$p |
5bf00 | 61 63 6b 61 67 65 2d 3e 67 65 74 53 6f 75 72 63 65 52 65 66 65 72 65 6e 63 65 28 29 2c 0a 5d 3b | ackage->getSourceReference(),.]; |
5bf20 | 0a 7d 0a 0a 69 66 20 28 6e 75 6c 6c 20 21 3d 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 44 69 | .}..if.(null.!==.$package->getDi |
5bf40 | 73 74 54 79 70 65 28 29 29 20 7b 0a 24 6a 73 6f 6e 5b 27 64 69 73 74 27 5d 20 3d 20 5b 0a 27 74 | stType()).{.$json['dist'].=.[.'t |
5bf60 | 79 70 65 27 20 3d 3e 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 44 69 73 74 54 79 70 65 28 29 2c | ype'.=>.$package->getDistType(), |
5bf80 | 0a 27 75 72 6c 27 20 3d 3e 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 44 69 73 74 55 72 6c 28 29 | .'url'.=>.$package->getDistUrl() |
5bfa0 | 2c 0a 27 72 65 66 65 72 65 6e 63 65 27 20 3d 3e 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 44 69 | ,.'reference'.=>.$package->getDi |
5bfc0 | 73 74 52 65 66 65 72 65 6e 63 65 28 29 2c 0a 5d 3b 0a 7d 0a 0a 69 66 20 28 24 69 6e 73 74 61 6c | stReference(),.];.}..if.($instal |
5bfe0 | 6c 65 64 52 65 70 6f 2d 3e 68 61 73 50 61 63 6b 61 67 65 28 24 70 61 63 6b 61 67 65 29 29 20 7b | ledRepo->hasPackage($package)).{ |
5c000 | 0a 24 6a 73 6f 6e 5b 27 70 61 74 68 27 5d 20 3d 20 72 65 61 6c 70 61 74 68 28 24 74 68 69 73 2d | .$json['path'].=.realpath($this- |
5c020 | 3e 72 65 71 75 69 72 65 43 6f 6d 70 6f 73 65 72 28 29 2d 3e 67 65 74 49 6e 73 74 61 6c 6c 61 74 | >requireComposer()->getInstallat |
5c040 | 69 6f 6e 4d 61 6e 61 67 65 72 28 29 2d 3e 67 65 74 49 6e 73 74 61 6c 6c 50 61 74 68 28 24 70 61 | ionManager()->getInstallPath($pa |
5c060 | 63 6b 61 67 65 29 29 3b 0a 69 66 20 28 24 6a 73 6f 6e 5b 27 70 61 74 68 27 5d 20 3d 3d 3d 20 66 | ckage));.if.($json['path'].===.f |
5c080 | 61 6c 73 65 29 20 7b 0a 75 6e 73 65 74 28 24 6a 73 6f 6e 5b 27 70 61 74 68 27 5d 29 3b 0a 7d 0a | alse).{.unset($json['path']);.}. |
5c0a0 | 7d 0a 0a 69 66 20 28 24 6c 61 74 65 73 74 50 61 63 6b 61 67 65 20 69 6e 73 74 61 6e 63 65 6f 66 | }..if.($latestPackage.instanceof |
5c0c0 | 20 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 26 26 20 24 6c 61 | .CompletePackageInterface.&&.$la |
5c0e0 | 74 65 73 74 50 61 63 6b 61 67 65 2d 3e 69 73 41 62 61 6e 64 6f 6e 65 64 28 29 29 20 7b 0a 24 6a | testPackage->isAbandoned()).{.$j |
5c100 | 73 6f 6e 5b 27 72 65 70 6c 61 63 65 6d 65 6e 74 27 5d 20 3d 20 24 6c 61 74 65 73 74 50 61 63 6b | son['replacement'].=.$latestPack |
5c120 | 61 67 65 2d 3e 67 65 74 52 65 70 6c 61 63 65 6d 65 6e 74 50 61 63 6b 61 67 65 28 29 3b 0a 7d 0a | age->getReplacementPackage();.}. |
5c140 | 0a 69 66 20 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 53 75 67 67 65 73 74 73 28 29 29 20 7b 0a | .if.($package->getSuggests()).{. |
5c160 | 24 6a 73 6f 6e 5b 27 73 75 67 67 65 73 74 73 27 5d 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 | $json['suggests'].=.$package->ge |
5c180 | 74 53 75 67 67 65 73 74 73 28 29 3b 0a 7d 0a 0a 69 66 20 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 | tSuggests();.}..if.($package->ge |
5c1a0 | 74 53 75 70 70 6f 72 74 28 29 29 20 7b 0a 24 6a 73 6f 6e 5b 27 73 75 70 70 6f 72 74 27 5d 20 3d | tSupport()).{.$json['support'].= |
5c1c0 | 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 53 75 70 70 6f 72 74 28 29 3b 0a 7d 0a 0a 24 6a 73 6f | .$package->getSupport();.}..$jso |
5c1e0 | 6e 20 3d 20 24 74 68 69 73 2d 3e 61 70 70 65 6e 64 41 75 74 6f 6c 6f 61 64 28 24 6a 73 6f 6e 2c | n.=.$this->appendAutoload($json, |
5c200 | 20 24 70 61 63 6b 61 67 65 29 3b 0a 0a 69 66 20 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 49 6e | .$package);..if.($package->getIn |
5c220 | 63 6c 75 64 65 50 61 74 68 73 28 29 29 20 7b 0a 24 6a 73 6f 6e 5b 27 69 6e 63 6c 75 64 65 5f 70 | cludePaths()).{.$json['include_p |
5c240 | 61 74 68 27 5d 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 49 6e 63 6c 75 64 65 50 61 74 68 | ath'].=.$package->getIncludePath |
5c260 | 73 28 29 3b 0a 7d 0a 0a 24 6a 73 6f 6e 20 3d 20 24 74 68 69 73 2d 3e 61 70 70 65 6e 64 4c 69 6e | s();.}..$json.=.$this->appendLin |
5c280 | 6b 73 28 24 6a 73 6f 6e 2c 20 24 70 61 63 6b 61 67 65 29 3b 0a 0a 24 74 68 69 73 2d 3e 67 65 74 | ks($json,.$package);..$this->get |
5c2a0 | 49 4f 28 29 2d 3e 77 72 69 74 65 28 4a 73 6f 6e 46 69 6c 65 3a 3a 65 6e 63 6f 64 65 28 24 6a 73 | IO()->write(JsonFile::encode($js |
5c2c0 | 6f 6e 29 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 61 | on));.}.......private.function.a |
5c2e0 | 70 70 65 6e 64 56 65 72 73 69 6f 6e 73 28 61 72 72 61 79 20 24 6a 73 6f 6e 2c 20 61 72 72 61 79 | ppendVersions(array.$json,.array |
5c300 | 20 24 76 65 72 73 69 6f 6e 73 29 3a 20 61 72 72 61 79 0a 7b 0a 75 61 73 6f 72 74 28 24 76 65 72 | .$versions):.array.{.uasort($ver |
5c320 | 73 69 6f 6e 73 2c 20 27 76 65 72 73 69 6f 6e 5f 63 6f 6d 70 61 72 65 27 29 3b 0a 24 76 65 72 73 | sions,.'version_compare');.$vers |
5c340 | 69 6f 6e 73 20 3d 20 61 72 72 61 79 5f 6b 65 79 73 28 61 72 72 61 79 5f 72 65 76 65 72 73 65 28 | ions.=.array_keys(array_reverse( |
5c360 | 24 76 65 72 73 69 6f 6e 73 29 29 3b 0a 24 6a 73 6f 6e 5b 27 76 65 72 73 69 6f 6e 73 27 5d 20 3d | $versions));.$json['versions'].= |
5c380 | 20 24 76 65 72 73 69 6f 6e 73 3b 0a 0a 72 65 74 75 72 6e 20 24 6a 73 6f 6e 3b 0a 7d 0a 0a 0a 0a | .$versions;..return.$json;.}.... |
5c3a0 | 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 61 70 70 65 6e 64 4c 69 63 65 6e 73 65 | ..private.function.appendLicense |
5c3c0 | 73 28 61 72 72 61 79 20 24 6a 73 6f 6e 2c 20 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 49 6e | s(array.$json,.CompletePackageIn |
5c3e0 | 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 29 3a 20 61 72 72 61 79 0a 7b 0a 69 66 20 28 24 | terface.$package):.array.{.if.($ |
5c400 | 6c 69 63 65 6e 73 65 73 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4c 69 63 65 6e 73 65 28 | licenses.=.$package->getLicense( |
5c420 | 29 29 20 7b 0a 24 73 70 64 78 4c 69 63 65 6e 73 65 73 20 3d 20 6e 65 77 20 53 70 64 78 4c 69 63 | )).{.$spdxLicenses.=.new.SpdxLic |
5c440 | 65 6e 73 65 73 28 29 3b 0a 0a 24 6a 73 6f 6e 5b 27 6c 69 63 65 6e 73 65 73 27 5d 20 3d 20 61 72 | enses();..$json['licenses'].=.ar |
5c460 | 72 61 79 5f 6d 61 70 28 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 6c 69 63 65 6e 73 | ray_map(static.function.($licens |
5c480 | 65 49 64 29 20 75 73 65 20 28 24 73 70 64 78 4c 69 63 65 6e 73 65 73 29 20 7b 0a 24 6c 69 63 65 | eId).use.($spdxLicenses).{.$lice |
5c4a0 | 6e 73 65 20 3d 20 24 73 70 64 78 4c 69 63 65 6e 73 65 73 2d 3e 67 65 74 4c 69 63 65 6e 73 65 42 | nse.=.$spdxLicenses->getLicenseB |
5c4c0 | 79 49 64 65 6e 74 69 66 69 65 72 28 24 6c 69 63 65 6e 73 65 49 64 29 3b 20 0a 0a 69 66 20 28 21 | yIdentifier($licenseId);...if.(! |
5c4e0 | 24 6c 69 63 65 6e 73 65 29 20 7b 0a 72 65 74 75 72 6e 20 24 6c 69 63 65 6e 73 65 49 64 3b 0a 7d | $license).{.return.$licenseId;.} |
5c500 | 0a 0a 72 65 74 75 72 6e 20 5b 0a 27 6e 61 6d 65 27 20 3d 3e 20 24 6c 69 63 65 6e 73 65 5b 30 5d | ..return.[.'name'.=>.$license[0] |
5c520 | 2c 0a 27 6f 73 69 27 20 3d 3e 20 24 6c 69 63 65 6e 73 65 49 64 2c 0a 27 75 72 6c 27 20 3d 3e 20 | ,.'osi'.=>.$licenseId,.'url'.=>. |
5c540 | 24 6c 69 63 65 6e 73 65 5b 32 5d 2c 0a 5d 3b 0a 7d 2c 20 24 6c 69 63 65 6e 73 65 73 29 3b 0a 7d | $license[2],.];.},.$licenses);.} |
5c560 | 0a 0a 72 65 74 75 72 6e 20 24 6a 73 6f 6e 3b 0a 7d 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 | ..return.$json;.}......private.f |
5c580 | 75 6e 63 74 69 6f 6e 20 61 70 70 65 6e 64 41 75 74 6f 6c 6f 61 64 28 61 72 72 61 79 20 24 6a 73 | unction.appendAutoload(array.$js |
5c5a0 | 6f 6e 2c 20 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 | on,.CompletePackageInterface.$pa |
5c5c0 | 63 6b 61 67 65 29 3a 20 61 72 72 61 79 0a 7b 0a 69 66 20 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 | ckage):.array.{.if.($package->ge |
5c5e0 | 74 41 75 74 6f 6c 6f 61 64 28 29 29 20 7b 0a 24 61 75 74 6f 6c 6f 61 64 20 3d 20 5b 5d 3b 0a 0a | tAutoload()).{.$autoload.=.[];.. |
5c600 | 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 41 75 74 6f 6c 6f 61 64 28 29 | foreach.($package->getAutoload() |
5c620 | 20 61 73 20 24 74 79 70 65 20 3d 3e 20 24 61 75 74 6f 6c 6f 61 64 73 29 20 7b 0a 69 66 20 28 24 | .as.$type.=>.$autoloads).{.if.($ |
5c640 | 74 79 70 65 20 3d 3d 3d 20 27 70 73 72 2d 30 27 20 7c 7c 20 24 74 79 70 65 20 3d 3d 3d 20 27 70 | type.===.'psr-0'.||.$type.===.'p |
5c660 | 73 72 2d 34 27 29 20 7b 0a 24 70 73 72 20 3d 20 5b 5d 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 61 | sr-4').{.$psr.=.[];..foreach.($a |
5c680 | 75 74 6f 6c 6f 61 64 73 20 61 73 20 24 6e 61 6d 65 20 3d 3e 20 24 70 61 74 68 29 20 7b 0a 69 66 | utoloads.as.$name.=>.$path).{.if |
5c6a0 | 20 28 21 24 70 61 74 68 29 20 7b 0a 24 70 61 74 68 20 3d 20 27 2e 27 3b 0a 7d 0a 0a 24 70 73 72 | .(!$path).{.$path.=.'.';.}..$psr |
5c6c0 | 5b 24 6e 61 6d 65 20 3f 3a 20 27 2a 27 5d 20 3d 20 24 70 61 74 68 3b 0a 7d 0a 0a 24 61 75 74 6f | [$name.?:.'*'].=.$path;.}..$auto |
5c6e0 | 6c 6f 61 64 5b 24 74 79 70 65 5d 20 3d 20 24 70 73 72 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 74 | load[$type].=.$psr;.}.elseif.($t |
5c700 | 79 70 65 20 3d 3d 3d 20 27 63 6c 61 73 73 6d 61 70 27 29 20 7b 0a 24 61 75 74 6f 6c 6f 61 64 5b | ype.===.'classmap').{.$autoload[ |
5c720 | 27 63 6c 61 73 73 6d 61 70 27 5d 20 3d 20 24 61 75 74 6f 6c 6f 61 64 73 3b 0a 7d 0a 7d 0a 0a 24 | 'classmap'].=.$autoloads;.}.}..$ |
5c740 | 6a 73 6f 6e 5b 27 61 75 74 6f 6c 6f 61 64 27 5d 20 3d 20 24 61 75 74 6f 6c 6f 61 64 3b 0a 7d 0a | json['autoload'].=.$autoload;.}. |
5c760 | 0a 72 65 74 75 72 6e 20 24 6a 73 6f 6e 3b 0a 7d 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 | .return.$json;.}......private.fu |
5c780 | 6e 63 74 69 6f 6e 20 61 70 70 65 6e 64 4c 69 6e 6b 73 28 61 72 72 61 79 20 24 6a 73 6f 6e 2c 20 | nction.appendLinks(array.$json,. |
5c7a0 | 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 | CompletePackageInterface.$packag |
5c7c0 | 65 29 3a 20 61 72 72 61 79 0a 7b 0a 66 6f 72 65 61 63 68 20 28 4c 69 6e 6b 3a 3a 24 54 59 50 45 | e):.array.{.foreach.(Link::$TYPE |
5c7e0 | 53 20 61 73 20 24 6c 69 6e 6b 54 79 70 65 29 20 7b 0a 24 6a 73 6f 6e 20 3d 20 24 74 68 69 73 2d | S.as.$linkType).{.$json.=.$this- |
5c800 | 3e 61 70 70 65 6e 64 4c 69 6e 6b 28 24 6a 73 6f 6e 2c 20 24 70 61 63 6b 61 67 65 2c 20 24 6c 69 | >appendLink($json,.$package,.$li |
5c820 | 6e 6b 54 79 70 65 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 6a 73 6f 6e 3b 0a 7d 0a 0a 0a 0a 0a | nkType);.}..return.$json;.}..... |
5c840 | 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 61 70 70 65 6e 64 4c 69 6e 6b 28 61 72 72 | .private.function.appendLink(arr |
5c860 | 61 79 20 24 6a 73 6f 6e 2c 20 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 | ay.$json,.CompletePackageInterfa |
5c880 | 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 6c 69 6e 6b 54 79 70 65 29 3a 20 | ce.$package,.string.$linkType):. |
5c8a0 | 61 72 72 61 79 0a 7b 0a 24 6c 69 6e 6b 73 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 7b 27 67 65 74 | array.{.$links.=.$package->{'get |
5c8c0 | 27 20 2e 20 75 63 66 69 72 73 74 28 24 6c 69 6e 6b 54 79 70 65 29 7d 28 29 3b 0a 0a 69 66 20 28 | '...ucfirst($linkType)}();..if.( |
5c8e0 | 24 6c 69 6e 6b 73 29 20 7b 0a 24 6a 73 6f 6e 5b 24 6c 69 6e 6b 54 79 70 65 5d 20 3d 20 5b 5d 3b | $links).{.$json[$linkType].=.[]; |
5c900 | 0a 0a 66 6f 72 65 61 63 68 20 28 24 6c 69 6e 6b 73 20 61 73 20 24 6c 69 6e 6b 29 20 7b 0a 24 6a | ..foreach.($links.as.$link).{.$j |
5c920 | 73 6f 6e 5b 24 6c 69 6e 6b 54 79 70 65 5d 5b 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 74 28 | son[$linkType][$link->getTarget( |
5c940 | 29 5d 20 3d 20 24 6c 69 6e 6b 2d 3e 67 65 74 50 72 65 74 74 79 43 6f 6e 73 74 72 61 69 6e 74 28 | )].=.$link->getPrettyConstraint( |
5c960 | 29 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 6a 73 6f 6e 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 | );.}.}..return.$json;.}.....prot |
5c980 | 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 69 6e 69 74 53 74 79 6c 65 73 28 4f 75 74 70 75 74 | ected.function.initStyles(Output |
5c9a0 | 49 6e 74 65 72 66 61 63 65 20 24 6f 75 74 70 75 74 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 | Interface.$output):.void.{.$this |
5c9c0 | 2d 3e 63 6f 6c 6f 72 73 20 3d 20 5b 0a 27 67 72 65 65 6e 27 2c 0a 27 79 65 6c 6c 6f 77 27 2c 0a | ->colors.=.[.'green',.'yellow',. |
5c9e0 | 27 63 79 61 6e 27 2c 0a 27 6d 61 67 65 6e 74 61 27 2c 0a 27 62 6c 75 65 27 2c 0a 5d 3b 0a 0a 66 | 'cyan',.'magenta',.'blue',.];..f |
5ca00 | 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 63 6f 6c 6f 72 73 20 61 73 20 24 63 6f 6c 6f 72 29 | oreach.($this->colors.as.$color) |
5ca20 | 20 7b 0a 24 73 74 79 6c 65 20 3d 20 6e 65 77 20 4f 75 74 70 75 74 46 6f 72 6d 61 74 74 65 72 53 | .{.$style.=.new.OutputFormatterS |
5ca40 | 74 79 6c 65 28 24 63 6f 6c 6f 72 29 3b 0a 24 6f 75 74 70 75 74 2d 3e 67 65 74 46 6f 72 6d 61 74 | tyle($color);.$output->getFormat |
5ca60 | 74 65 72 28 29 2d 3e 73 65 74 53 74 79 6c 65 28 24 63 6f 6c 6f 72 2c 20 24 73 74 79 6c 65 29 3b | ter()->setStyle($color,.$style); |
5ca80 | 0a 7d 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 64 69 | .}.}.......protected.function.di |
5caa0 | 73 70 6c 61 79 50 61 63 6b 61 67 65 54 72 65 65 28 61 72 72 61 79 20 24 61 72 72 61 79 54 72 65 | splayPackageTree(array.$arrayTre |
5cac0 | 65 29 3a 20 76 6f 69 64 0a 7b 0a 24 69 6f 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 3b | e):.void.{.$io.=.$this->getIO(); |
5cae0 | 0a 66 6f 72 65 61 63 68 20 28 24 61 72 72 61 79 54 72 65 65 20 61 73 20 24 70 61 63 6b 61 67 65 | .foreach.($arrayTree.as.$package |
5cb00 | 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 73 70 72 69 6e 74 66 28 27 3c 69 6e 66 6f 3e 25 73 | ).{.$io->write(sprintf('<info>%s |
5cb20 | 3c 2f 69 6e 66 6f 3e 27 2c 20 24 70 61 63 6b 61 67 65 5b 27 6e 61 6d 65 27 5d 29 2c 20 66 61 6c | </info>',.$package['name']),.fal |
5cb40 | 73 65 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 20 27 20 2e 20 24 70 61 63 6b 61 67 65 5b 27 | se);.$io->write('.'...$package[' |
5cb60 | 76 65 72 73 69 6f 6e 27 5d 2c 20 66 61 6c 73 65 29 3b 0a 69 66 20 28 69 73 73 65 74 28 24 70 61 | version'],.false);.if.(isset($pa |
5cb80 | 63 6b 61 67 65 5b 27 64 65 73 63 72 69 70 74 69 6f 6e 27 5d 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 | ckage['description'])).{.$io->wr |
5cba0 | 69 74 65 28 27 20 27 20 2e 20 73 74 72 74 6f 6b 28 24 70 61 63 6b 61 67 65 5b 27 64 65 73 63 72 | ite('.'...strtok($package['descr |
5cbc0 | 69 70 74 69 6f 6e 27 5d 2c 20 22 5c 72 5c 6e 22 29 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 0a 24 69 | iption'],."\r\n"));.}.else.{..$i |
5cbe0 | 6f 2d 3e 77 72 69 74 65 28 27 27 29 3b 0a 7d 0a 0a 69 66 20 28 69 73 73 65 74 28 24 70 61 63 6b | o->write('');.}..if.(isset($pack |
5cc00 | 61 67 65 5b 27 72 65 71 75 69 72 65 73 27 5d 29 29 20 7b 0a 24 72 65 71 75 69 72 65 73 20 3d 20 | age['requires'])).{.$requires.=. |
5cc20 | 24 70 61 63 6b 61 67 65 5b 27 72 65 71 75 69 72 65 73 27 5d 3b 0a 24 74 72 65 65 42 61 72 20 3d | $package['requires'];.$treeBar.= |
5cc40 | 20 27 e2 94 9c 27 3b 0a 24 6a 20 3d 20 30 3b 0a 24 74 6f 74 61 6c 20 3d 20 63 6f 75 6e 74 28 24 | .'...';.$j.=.0;.$total.=.count($ |
5cc60 | 72 65 71 75 69 72 65 73 29 3b 0a 66 6f 72 65 61 63 68 20 28 24 72 65 71 75 69 72 65 73 20 61 73 | requires);.foreach.($requires.as |
5cc80 | 20 24 72 65 71 75 69 72 65 29 20 7b 0a 24 72 65 71 75 69 72 65 4e 61 6d 65 20 3d 20 24 72 65 71 | .$require).{.$requireName.=.$req |
5cca0 | 75 69 72 65 5b 27 6e 61 6d 65 27 5d 3b 0a 24 6a 2b 2b 3b 0a 69 66 20 28 24 6a 20 3d 3d 3d 20 24 | uire['name'];.$j++;.if.($j.===.$ |
5ccc0 | 74 6f 74 61 6c 29 20 7b 0a 24 74 72 65 65 42 61 72 20 3d 20 27 e2 94 94 27 3b 0a 7d 0a 24 6c 65 | total).{.$treeBar.=.'...';.}.$le |
5cce0 | 76 65 6c 20 3d 20 31 3b 0a 24 63 6f 6c 6f 72 20 3d 20 24 74 68 69 73 2d 3e 63 6f 6c 6f 72 73 5b | vel.=.1;.$color.=.$this->colors[ |
5cd00 | 24 6c 65 76 65 6c 5d 3b 0a 24 69 6e 66 6f 20 3d 20 73 70 72 69 6e 74 66 28 0a 27 25 73 e2 94 80 | $level];.$info.=.sprintf(.'%s... |
5cd20 | e2 94 80 3c 25 73 3e 25 73 3c 2f 25 73 3e 20 25 73 27 2c 0a 24 74 72 65 65 42 61 72 2c 0a 24 63 | ...<%s>%s</%s>.%s',.$treeBar,.$c |
5cd40 | 6f 6c 6f 72 2c 0a 24 72 65 71 75 69 72 65 4e 61 6d 65 2c 0a 24 63 6f 6c 6f 72 2c 0a 24 72 65 71 | olor,.$requireName,.$color,.$req |
5cd60 | 75 69 72 65 5b 27 76 65 72 73 69 6f 6e 27 5d 0a 29 3b 0a 24 74 68 69 73 2d 3e 77 72 69 74 65 54 | uire['version'].);.$this->writeT |
5cd80 | 72 65 65 4c 69 6e 65 28 24 69 6e 66 6f 29 3b 0a 0a 24 74 72 65 65 42 61 72 20 3d 20 73 74 72 5f | reeLine($info);..$treeBar.=.str_ |
5cda0 | 72 65 70 6c 61 63 65 28 27 e2 94 94 27 2c 20 27 20 27 2c 20 24 74 72 65 65 42 61 72 29 3b 0a 24 | replace('...',.'.',.$treeBar);.$ |
5cdc0 | 70 61 63 6b 61 67 65 73 49 6e 54 72 65 65 20 3d 20 5b 24 70 61 63 6b 61 67 65 5b 27 6e 61 6d 65 | packagesInTree.=.[$package['name |
5cde0 | 27 5d 2c 20 24 72 65 71 75 69 72 65 4e 61 6d 65 5d 3b 0a 0a 24 74 68 69 73 2d 3e 64 69 73 70 6c | '],.$requireName];..$this->displ |
5ce00 | 61 79 54 72 65 65 28 24 72 65 71 75 69 72 65 2c 20 24 70 61 63 6b 61 67 65 73 49 6e 54 72 65 65 | ayTree($require,.$packagesInTree |
5ce20 | 2c 20 24 74 72 65 65 42 61 72 2c 20 24 6c 65 76 65 6c 20 2b 20 31 29 3b 0a 7d 0a 7d 0a 7d 0a 7d | ,.$treeBar,.$level.+.1);.}.}.}.} |
5ce40 | 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 67 65 6e 65 72 61 | .......protected.function.genera |
5ce60 | 74 65 50 61 63 6b 61 67 65 54 72 65 65 28 0a 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 | tePackageTree(.PackageInterface. |
5ce80 | 24 70 61 63 6b 61 67 65 2c 0a 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 20 24 69 | $package,.InstalledRepository.$i |
5cea0 | 6e 73 74 61 6c 6c 65 64 52 65 70 6f 2c 0a 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 | nstalledRepo,.RepositoryInterfac |
5cec0 | 65 20 24 72 65 6d 6f 74 65 52 65 70 6f 73 0a 29 3a 20 61 72 72 61 79 20 7b 0a 24 72 65 71 75 69 | e.$remoteRepos.):.array.{.$requi |
5cee0 | 72 65 73 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 52 65 71 75 69 72 65 73 28 29 3b 0a 6b | res.=.$package->getRequires();.k |
5cf00 | 73 6f 72 74 28 24 72 65 71 75 69 72 65 73 29 3b 0a 24 63 68 69 6c 64 72 65 6e 20 3d 20 5b 5d 3b | sort($requires);.$children.=.[]; |
5cf20 | 0a 66 6f 72 65 61 63 68 20 28 24 72 65 71 75 69 72 65 73 20 61 73 20 24 72 65 71 75 69 72 65 4e | .foreach.($requires.as.$requireN |
5cf40 | 61 6d 65 20 3d 3e 20 24 72 65 71 75 69 72 65 29 20 7b 0a 24 70 61 63 6b 61 67 65 73 49 6e 54 72 | ame.=>.$require).{.$packagesInTr |
5cf60 | 65 65 20 3d 20 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 2c 20 24 72 65 71 75 | ee.=.[$package->getName(),.$requ |
5cf80 | 69 72 65 4e 61 6d 65 5d 3b 0a 0a 24 74 72 65 65 43 68 69 6c 64 44 65 73 63 20 3d 20 5b 0a 27 6e | ireName];..$treeChildDesc.=.[.'n |
5cfa0 | 61 6d 65 27 20 3d 3e 20 24 72 65 71 75 69 72 65 4e 61 6d 65 2c 0a 27 76 65 72 73 69 6f 6e 27 20 | ame'.=>.$requireName,.'version'. |
5cfc0 | 3d 3e 20 24 72 65 71 75 69 72 65 2d 3e 67 65 74 50 72 65 74 74 79 43 6f 6e 73 74 72 61 69 6e 74 | =>.$require->getPrettyConstraint |
5cfe0 | 28 29 2c 0a 5d 3b 0a 0a 24 64 65 65 70 43 68 69 6c 64 72 65 6e 20 3d 20 24 74 68 69 73 2d 3e 61 | (),.];..$deepChildren.=.$this->a |
5d000 | 64 64 54 72 65 65 28 24 72 65 71 75 69 72 65 4e 61 6d 65 2c 20 24 72 65 71 75 69 72 65 2c 20 24 | ddTree($requireName,.$require,.$ |
5d020 | 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 2c 20 24 72 65 6d 6f 74 65 52 65 70 6f 73 2c 20 24 70 61 | installedRepo,.$remoteRepos,.$pa |
5d040 | 63 6b 61 67 65 73 49 6e 54 72 65 65 29 3b 0a 0a 69 66 20 28 24 64 65 65 70 43 68 69 6c 64 72 65 | ckagesInTree);..if.($deepChildre |
5d060 | 6e 29 20 7b 0a 24 74 72 65 65 43 68 69 6c 64 44 65 73 63 5b 27 72 65 71 75 69 72 65 73 27 5d 20 | n).{.$treeChildDesc['requires']. |
5d080 | 3d 20 24 64 65 65 70 43 68 69 6c 64 72 65 6e 3b 0a 7d 0a 0a 24 63 68 69 6c 64 72 65 6e 5b 5d 20 | =.$deepChildren;.}..$children[]. |
5d0a0 | 3d 20 24 74 72 65 65 43 68 69 6c 64 44 65 73 63 3b 0a 7d 0a 24 74 72 65 65 20 3d 20 5b 0a 27 6e | =.$treeChildDesc;.}.$tree.=.[.'n |
5d0c0 | 61 6d 65 27 20 3d 3e 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 4e 61 6d 65 28 | ame'.=>.$package->getPrettyName( |
5d0e0 | 29 2c 0a 27 76 65 72 73 69 6f 6e 27 20 3d 3e 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 | ),.'version'.=>.$package->getPre |
5d100 | 74 74 79 56 65 72 73 69 6f 6e 28 29 2c 0a 27 64 65 73 63 72 69 70 74 69 6f 6e 27 20 3d 3e 20 24 | ttyVersion(),.'description'.=>.$ |
5d120 | 70 61 63 6b 61 67 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 | package.instanceof.CompletePacka |
5d140 | 67 65 49 6e 74 65 72 66 61 63 65 20 3f 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 44 65 73 63 72 | geInterface.?.$package->getDescr |
5d160 | 69 70 74 69 6f 6e 28 29 20 3a 20 27 27 2c 0a 5d 3b 0a 0a 69 66 20 28 24 63 68 69 6c 64 72 65 6e | iption().:.'',.];..if.($children |
5d180 | 29 20 7b 0a 24 74 72 65 65 5b 27 72 65 71 75 69 72 65 73 27 5d 20 3d 20 24 63 68 69 6c 64 72 65 | ).{.$tree['requires'].=.$childre |
5d1a0 | 6e 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 74 72 65 65 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 72 6f | n;.}..return.$tree;.}........pro |
5d1c0 | 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 64 69 73 70 6c 61 79 54 72 65 65 28 0a 24 70 61 | tected.function.displayTree(.$pa |
5d1e0 | 63 6b 61 67 65 2c 0a 61 72 72 61 79 20 24 70 61 63 6b 61 67 65 73 49 6e 54 72 65 65 2c 0a 73 74 | ckage,.array.$packagesInTree,.st |
5d200 | 72 69 6e 67 20 24 70 72 65 76 69 6f 75 73 54 72 65 65 42 61 72 20 3d 20 27 e2 94 9c 27 2c 0a 69 | ring.$previousTreeBar.=.'...',.i |
5d220 | 6e 74 20 24 6c 65 76 65 6c 20 3d 20 31 0a 29 3a 20 76 6f 69 64 20 7b 0a 24 70 72 65 76 69 6f 75 | nt.$level.=.1.):.void.{.$previou |
5d240 | 73 54 72 65 65 42 61 72 20 3d 20 73 74 72 5f 72 65 70 6c 61 63 65 28 27 e2 94 9c 27 2c 20 27 e2 | sTreeBar.=.str_replace('...',.'. |
5d260 | 94 82 27 2c 20 24 70 72 65 76 69 6f 75 73 54 72 65 65 42 61 72 29 3b 0a 69 66 20 28 69 73 5f 61 | ..',.$previousTreeBar);.if.(is_a |
5d280 | 72 72 61 79 28 24 70 61 63 6b 61 67 65 29 20 26 26 20 69 73 73 65 74 28 24 70 61 63 6b 61 67 65 | rray($package).&&.isset($package |
5d2a0 | 5b 27 72 65 71 75 69 72 65 73 27 5d 29 29 20 7b 0a 24 72 65 71 75 69 72 65 73 20 3d 20 24 70 61 | ['requires'])).{.$requires.=.$pa |
5d2c0 | 63 6b 61 67 65 5b 27 72 65 71 75 69 72 65 73 27 5d 3b 0a 24 74 72 65 65 42 61 72 20 3d 20 24 70 | ckage['requires'];.$treeBar.=.$p |
5d2e0 | 72 65 76 69 6f 75 73 54 72 65 65 42 61 72 20 2e 20 27 20 20 e2 94 9c 27 3b 0a 24 69 20 3d 20 30 | reviousTreeBar...'.....';.$i.=.0 |
5d300 | 3b 0a 24 74 6f 74 61 6c 20 3d 20 63 6f 75 6e 74 28 24 72 65 71 75 69 72 65 73 29 3b 0a 66 6f 72 | ;.$total.=.count($requires);.for |
5d320 | 65 61 63 68 20 28 24 72 65 71 75 69 72 65 73 20 61 73 20 24 72 65 71 75 69 72 65 29 20 7b 0a 24 | each.($requires.as.$require).{.$ |
5d340 | 63 75 72 72 65 6e 74 54 72 65 65 20 3d 20 24 70 61 63 6b 61 67 65 73 49 6e 54 72 65 65 3b 0a 24 | currentTree.=.$packagesInTree;.$ |
5d360 | 69 2b 2b 3b 0a 69 66 20 28 24 69 20 3d 3d 3d 20 24 74 6f 74 61 6c 29 20 7b 0a 24 74 72 65 65 42 | i++;.if.($i.===.$total).{.$treeB |
5d380 | 61 72 20 3d 20 24 70 72 65 76 69 6f 75 73 54 72 65 65 42 61 72 20 2e 20 27 20 20 e2 94 94 27 3b | ar.=.$previousTreeBar...'.....'; |
5d3a0 | 0a 7d 0a 24 63 6f 6c 6f 72 49 64 65 6e 74 20 3d 20 24 6c 65 76 65 6c 20 25 20 63 6f 75 6e 74 28 | .}.$colorIdent.=.$level.%.count( |
5d3c0 | 24 74 68 69 73 2d 3e 63 6f 6c 6f 72 73 29 3b 0a 24 63 6f 6c 6f 72 20 3d 20 24 74 68 69 73 2d 3e | $this->colors);.$color.=.$this-> |
5d3e0 | 63 6f 6c 6f 72 73 5b 24 63 6f 6c 6f 72 49 64 65 6e 74 5d 3b 0a 0a 24 63 69 72 63 75 6c 61 72 57 | colors[$colorIdent];..$circularW |
5d400 | 61 72 6e 20 3d 20 69 6e 5f 61 72 72 61 79 28 0a 24 72 65 71 75 69 72 65 5b 27 6e 61 6d 65 27 5d | arn.=.in_array(.$require['name'] |
5d420 | 2c 0a 24 63 75 72 72 65 6e 74 54 72 65 65 2c 0a 74 72 75 65 0a 29 20 3f 20 27 28 63 69 72 63 75 | ,.$currentTree,.true.).?.'(circu |
5d440 | 6c 61 72 20 64 65 70 65 6e 64 65 6e 63 79 20 61 62 6f 72 74 65 64 20 68 65 72 65 29 27 20 3a 20 | lar.dependency.aborted.here)'.:. |
5d460 | 27 27 3b 0a 24 69 6e 66 6f 20 3d 20 72 74 72 69 6d 28 73 70 72 69 6e 74 66 28 0a 27 25 73 e2 94 | '';.$info.=.rtrim(sprintf(.'%s.. |
5d480 | 80 e2 94 80 3c 25 73 3e 25 73 3c 2f 25 73 3e 20 25 73 20 25 73 27 2c 0a 24 74 72 65 65 42 61 72 | ....<%s>%s</%s>.%s.%s',.$treeBar |
5d4a0 | 2c 0a 24 63 6f 6c 6f 72 2c 0a 24 72 65 71 75 69 72 65 5b 27 6e 61 6d 65 27 5d 2c 0a 24 63 6f 6c | ,.$color,.$require['name'],.$col |
5d4c0 | 6f 72 2c 0a 24 72 65 71 75 69 72 65 5b 27 76 65 72 73 69 6f 6e 27 5d 2c 0a 24 63 69 72 63 75 6c | or,.$require['version'],.$circul |
5d4e0 | 61 72 57 61 72 6e 0a 29 29 3b 0a 24 74 68 69 73 2d 3e 77 72 69 74 65 54 72 65 65 4c 69 6e 65 28 | arWarn.));.$this->writeTreeLine( |
5d500 | 24 69 6e 66 6f 29 3b 0a 0a 24 74 72 65 65 42 61 72 20 3d 20 73 74 72 5f 72 65 70 6c 61 63 65 28 | $info);..$treeBar.=.str_replace( |
5d520 | 27 e2 94 94 27 2c 20 27 20 27 2c 20 24 74 72 65 65 42 61 72 29 3b 0a 0a 24 63 75 72 72 65 6e 74 | '...',.'.',.$treeBar);..$current |
5d540 | 54 72 65 65 5b 5d 20 3d 20 24 72 65 71 75 69 72 65 5b 27 6e 61 6d 65 27 5d 3b 0a 24 74 68 69 73 | Tree[].=.$require['name'];.$this |
5d560 | 2d 3e 64 69 73 70 6c 61 79 54 72 65 65 28 24 72 65 71 75 69 72 65 2c 20 24 63 75 72 72 65 6e 74 | ->displayTree($require,.$current |
5d580 | 54 72 65 65 2c 20 24 74 72 65 65 42 61 72 2c 20 24 6c 65 76 65 6c 20 2b 20 31 29 3b 0a 7d 0a 7d | Tree,.$treeBar,.$level.+.1);.}.} |
5d5a0 | 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 61 64 64 | .}........protected.function.add |
5d5c0 | 54 72 65 65 28 0a 73 74 72 69 6e 67 20 24 6e 61 6d 65 2c 0a 4c 69 6e 6b 20 24 6c 69 6e 6b 2c 0a | Tree(.string.$name,.Link.$link,. |
5d5e0 | 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 20 24 69 6e 73 74 61 6c 6c 65 64 52 65 | InstalledRepository.$installedRe |
5d600 | 70 6f 2c 0a 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 20 24 72 65 6d 6f 74 65 52 | po,.RepositoryInterface.$remoteR |
5d620 | 65 70 6f 73 2c 0a 61 72 72 61 79 20 24 70 61 63 6b 61 67 65 73 49 6e 54 72 65 65 0a 29 3a 20 61 | epos,.array.$packagesInTree.):.a |
5d640 | 72 72 61 79 20 7b 0a 24 63 68 69 6c 64 72 65 6e 20 3d 20 5b 5d 3b 0a 5b 24 70 61 63 6b 61 67 65 | rray.{.$children.=.[];.[$package |
5d660 | 5d 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 50 61 63 6b 61 67 65 28 0a 24 69 6e 73 74 61 6c 6c 65 | ].=.$this->getPackage(.$installe |
5d680 | 64 52 65 70 6f 2c 0a 24 72 65 6d 6f 74 65 52 65 70 6f 73 2c 0a 24 6e 61 6d 65 2c 0a 24 6c 69 6e | dRepo,.$remoteRepos,.$name,.$lin |
5d6a0 | 6b 2d 3e 67 65 74 50 72 65 74 74 79 43 6f 6e 73 74 72 61 69 6e 74 28 29 20 3d 3d 3d 20 27 73 65 | k->getPrettyConstraint().===.'se |
5d6c0 | 6c 66 2e 76 65 72 73 69 6f 6e 27 20 3f 20 24 6c 69 6e 6b 2d 3e 67 65 74 43 6f 6e 73 74 72 61 69 | lf.version'.?.$link->getConstrai |
5d6e0 | 6e 74 28 29 20 3a 20 24 6c 69 6e 6b 2d 3e 67 65 74 50 72 65 74 74 79 43 6f 6e 73 74 72 61 69 6e | nt().:.$link->getPrettyConstrain |
5d700 | 74 28 29 0a 29 3b 0a 69 66 20 28 69 73 5f 6f 62 6a 65 63 74 28 24 70 61 63 6b 61 67 65 29 29 20 | t().);.if.(is_object($package)). |
5d720 | 7b 0a 24 72 65 71 75 69 72 65 73 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 52 65 71 75 69 | {.$requires.=.$package->getRequi |
5d740 | 72 65 73 28 29 3b 0a 6b 73 6f 72 74 28 24 72 65 71 75 69 72 65 73 29 3b 0a 66 6f 72 65 61 63 68 | res();.ksort($requires);.foreach |
5d760 | 20 28 24 72 65 71 75 69 72 65 73 20 61 73 20 24 72 65 71 75 69 72 65 4e 61 6d 65 20 3d 3e 20 24 | .($requires.as.$requireName.=>.$ |
5d780 | 72 65 71 75 69 72 65 29 20 7b 0a 24 63 75 72 72 65 6e 74 54 72 65 65 20 3d 20 24 70 61 63 6b 61 | require).{.$currentTree.=.$packa |
5d7a0 | 67 65 73 49 6e 54 72 65 65 3b 0a 0a 24 74 72 65 65 43 68 69 6c 64 44 65 73 63 20 3d 20 5b 0a 27 | gesInTree;..$treeChildDesc.=.[.' |
5d7c0 | 6e 61 6d 65 27 20 3d 3e 20 24 72 65 71 75 69 72 65 4e 61 6d 65 2c 0a 27 76 65 72 73 69 6f 6e 27 | name'.=>.$requireName,.'version' |
5d7e0 | 20 3d 3e 20 24 72 65 71 75 69 72 65 2d 3e 67 65 74 50 72 65 74 74 79 43 6f 6e 73 74 72 61 69 6e | .=>.$require->getPrettyConstrain |
5d800 | 74 28 29 2c 0a 5d 3b 0a 0a 69 66 20 28 21 69 6e 5f 61 72 72 61 79 28 24 72 65 71 75 69 72 65 4e | t(),.];..if.(!in_array($requireN |
5d820 | 61 6d 65 2c 20 24 63 75 72 72 65 6e 74 54 72 65 65 2c 20 74 72 75 65 29 29 20 7b 0a 24 63 75 72 | ame,.$currentTree,.true)).{.$cur |
5d840 | 72 65 6e 74 54 72 65 65 5b 5d 20 3d 20 24 72 65 71 75 69 72 65 4e 61 6d 65 3b 0a 24 64 65 65 70 | rentTree[].=.$requireName;.$deep |
5d860 | 43 68 69 6c 64 72 65 6e 20 3d 20 24 74 68 69 73 2d 3e 61 64 64 54 72 65 65 28 24 72 65 71 75 69 | Children.=.$this->addTree($requi |
5d880 | 72 65 4e 61 6d 65 2c 20 24 72 65 71 75 69 72 65 2c 20 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f | reName,.$require,.$installedRepo |
5d8a0 | 2c 20 24 72 65 6d 6f 74 65 52 65 70 6f 73 2c 20 24 63 75 72 72 65 6e 74 54 72 65 65 29 3b 0a 69 | ,.$remoteRepos,.$currentTree);.i |
5d8c0 | 66 20 28 24 64 65 65 70 43 68 69 6c 64 72 65 6e 29 20 7b 0a 24 74 72 65 65 43 68 69 6c 64 44 65 | f.($deepChildren).{.$treeChildDe |
5d8e0 | 73 63 5b 27 72 65 71 75 69 72 65 73 27 5d 20 3d 20 24 64 65 65 70 43 68 69 6c 64 72 65 6e 3b 0a | sc['requires'].=.$deepChildren;. |
5d900 | 7d 0a 7d 0a 0a 24 63 68 69 6c 64 72 65 6e 5b 5d 20 3d 20 24 74 72 65 65 43 68 69 6c 64 44 65 73 | }.}..$children[].=.$treeChildDes |
5d920 | 63 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 63 68 69 6c 64 72 65 6e 3b 0a 7d 0a 0a 70 72 69 | c;.}.}..return.$children;.}..pri |
5d940 | 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 75 70 64 61 74 65 53 74 61 74 75 73 54 6f 56 65 72 73 | vate.function.updateStatusToVers |
5d960 | 69 6f 6e 53 74 79 6c 65 28 73 74 72 69 6e 67 20 24 75 70 64 61 74 65 53 74 61 74 75 73 29 3a 20 | ionStyle(string.$updateStatus):. |
5d980 | 73 74 72 69 6e 67 0a 7b 0a 0a 0a 0a 72 65 74 75 72 6e 20 73 74 72 5f 72 65 70 6c 61 63 65 28 5b | string.{....return.str_replace([ |
5d9a0 | 27 75 70 2d 74 6f 2d 64 61 74 65 27 2c 20 27 73 65 6d 76 65 72 2d 73 61 66 65 2d 75 70 64 61 74 | 'up-to-date',.'semver-safe-updat |
5d9c0 | 65 27 2c 20 27 75 70 64 61 74 65 2d 70 6f 73 73 69 62 6c 65 27 5d 2c 20 5b 27 69 6e 66 6f 27 2c | e',.'update-possible'],.['info', |
5d9e0 | 20 27 68 69 67 68 6c 69 67 68 74 27 2c 20 27 63 6f 6d 6d 65 6e 74 27 5d 2c 20 24 75 70 64 61 74 | .'highlight',.'comment'],.$updat |
5da00 | 65 53 74 61 74 75 73 29 3b 0a 7d 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 67 65 | eStatus);.}..private.function.ge |
5da20 | 74 55 70 64 61 74 65 53 74 61 74 75 73 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 | tUpdateStatus(PackageInterface.$ |
5da40 | 6c 61 74 65 73 74 50 61 63 6b 61 67 65 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 | latestPackage,.PackageInterface. |
5da60 | 24 70 61 63 6b 61 67 65 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 69 66 20 28 24 6c 61 74 65 73 74 50 | $package):.string.{.if.($latestP |
5da80 | 61 63 6b 61 67 65 2d 3e 67 65 74 46 75 6c 6c 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 20 3d | ackage->getFullPrettyVersion().= |
5daa0 | 3d 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 46 75 6c 6c 50 72 65 74 74 79 56 65 72 73 69 6f | ==.$package->getFullPrettyVersio |
5dac0 | 6e 28 29 29 20 7b 0a 72 65 74 75 72 6e 20 27 75 70 2d 74 6f 2d 64 61 74 65 27 3b 0a 7d 0a 0a 24 | n()).{.return.'up-to-date';.}..$ |
5dae0 | 63 6f 6e 73 74 72 61 69 6e 74 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 56 65 72 73 69 6f | constraint.=.$package->getVersio |
5db00 | 6e 28 29 3b 0a 69 66 20 28 30 20 21 3d 3d 20 73 74 72 70 6f 73 28 24 63 6f 6e 73 74 72 61 69 6e | n();.if.(0.!==.strpos($constrain |
5db20 | 74 2c 20 27 64 65 76 2d 27 29 29 20 7b 0a 24 63 6f 6e 73 74 72 61 69 6e 74 20 3d 20 27 5e 27 2e | t,.'dev-')).{.$constraint.=.'^'. |
5db40 | 24 63 6f 6e 73 74 72 61 69 6e 74 3b 0a 7d 0a 69 66 20 28 24 6c 61 74 65 73 74 50 61 63 6b 61 67 | $constraint;.}.if.($latestPackag |
5db60 | 65 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 20 26 26 20 53 65 6d 76 65 72 3a 3a 73 61 74 69 73 | e->getVersion().&&.Semver::satis |
5db80 | 66 69 65 73 28 24 6c 61 74 65 73 74 50 61 63 6b 61 67 65 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 | fies($latestPackage->getVersion( |
5dba0 | 29 2c 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 29 20 7b 0a 0a 72 65 74 75 72 6e 20 27 73 65 6d 76 | ),.$constraint)).{..return.'semv |
5dbc0 | 65 72 2d 73 61 66 65 2d 75 70 64 61 74 65 27 3b 0a 7d 0a 0a 0a 72 65 74 75 72 6e 20 27 75 70 64 | er-safe-update';.}...return.'upd |
5dbe0 | 61 74 65 2d 70 6f 73 73 69 62 6c 65 27 3b 0a 7d 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 | ate-possible';.}..private.functi |
5dc00 | 6f 6e 20 77 72 69 74 65 54 72 65 65 4c 69 6e 65 28 73 74 72 69 6e 67 20 24 6c 69 6e 65 29 3a 20 | on.writeTreeLine(string.$line):. |
5dc20 | 76 6f 69 64 0a 7b 0a 24 69 6f 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 3b 0a 69 66 20 | void.{.$io.=.$this->getIO();.if. |
5dc40 | 28 21 24 69 6f 2d 3e 69 73 44 65 63 6f 72 61 74 65 64 28 29 29 20 7b 0a 24 6c 69 6e 65 20 3d 20 | (!$io->isDecorated()).{.$line.=. |
5dc60 | 73 74 72 5f 72 65 70 6c 61 63 65 28 5b 27 e2 94 94 27 2c 20 27 e2 94 9c 27 2c 20 27 e2 94 80 e2 | str_replace(['...',.'...',.'.... |
5dc80 | 94 80 27 2c 20 27 e2 94 82 27 5d 2c 20 5b 27 60 2d 27 2c 20 27 7c 2d 27 2c 20 27 2d 27 2c 20 27 | ..',.'...'],.['`-',.'|-',.'-',.' |
5dca0 | 7c 27 5d 2c 20 24 6c 69 6e 65 29 3b 0a 7d 0a 0a 24 69 6f 2d 3e 77 72 69 74 65 28 24 6c 69 6e 65 | |'],.$line);.}..$io->write($line |
5dcc0 | 29 3b 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 66 69 6e 64 4c 61 | );.}.....private.function.findLa |
5dce0 | 74 65 73 74 50 61 63 6b 61 67 65 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 | testPackage(PackageInterface.$pa |
5dd00 | 63 6b 61 67 65 2c 20 43 6f 6d 70 6f 73 65 72 20 24 63 6f 6d 70 6f 73 65 72 2c 20 50 6c 61 74 66 | ckage,.Composer.$composer,.Platf |
5dd20 | 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 20 24 70 6c 61 74 66 6f 72 6d 52 65 70 6f 2c 20 62 6f 6f | ormRepository.$platformRepo,.boo |
5dd40 | 6c 20 24 6d 61 6a 6f 72 4f 6e 6c 79 2c 20 62 6f 6f 6c 20 24 6d 69 6e 6f 72 4f 6e 6c 79 2c 20 62 | l.$majorOnly,.bool.$minorOnly,.b |
5dd60 | 6f 6f 6c 20 24 70 61 74 63 68 4f 6e 6c 79 2c 20 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d | ool.$patchOnly,.PlatformRequirem |
5dd80 | 65 6e 74 46 69 6c 74 65 72 49 6e 74 65 72 66 61 63 65 20 24 70 6c 61 74 66 6f 72 6d 52 65 71 46 | entFilterInterface.$platformReqF |
5dda0 | 69 6c 74 65 72 29 3a 20 3f 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 0a 24 6e 61 | ilter):.?PackageInterface.{..$na |
5ddc0 | 6d 65 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 3b 0a 24 76 65 72 73 69 | me.=.$package->getName();.$versi |
5dde0 | 6f 6e 53 65 6c 65 63 74 6f 72 20 3d 20 6e 65 77 20 56 65 72 73 69 6f 6e 53 65 6c 65 63 74 6f 72 | onSelector.=.new.VersionSelector |
5de00 | 28 24 74 68 69 73 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 79 53 65 74 28 24 63 6f 6d 70 6f 73 | ($this->getRepositorySet($compos |
5de20 | 65 72 29 2c 20 24 70 6c 61 74 66 6f 72 6d 52 65 70 6f 29 3b 0a 24 73 74 61 62 69 6c 69 74 79 20 | er),.$platformRepo);.$stability. |
5de40 | 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 50 61 63 6b 61 67 65 28 29 2d 3e 67 65 74 4d 69 | =.$composer->getPackage()->getMi |
5de60 | 6e 69 6d 75 6d 53 74 61 62 69 6c 69 74 79 28 29 3b 0a 24 66 6c 61 67 73 20 3d 20 24 63 6f 6d 70 | nimumStability();.$flags.=.$comp |
5de80 | 6f 73 65 72 2d 3e 67 65 74 50 61 63 6b 61 67 65 28 29 2d 3e 67 65 74 53 74 61 62 69 6c 69 74 79 | oser->getPackage()->getStability |
5dea0 | 46 6c 61 67 73 28 29 3b 0a 69 66 20 28 69 73 73 65 74 28 24 66 6c 61 67 73 5b 24 6e 61 6d 65 5d | Flags();.if.(isset($flags[$name] |
5dec0 | 29 29 20 7b 0a 24 73 74 61 62 69 6c 69 74 79 20 3d 20 61 72 72 61 79 5f 73 65 61 72 63 68 28 24 | )).{.$stability.=.array_search($ |
5dee0 | 66 6c 61 67 73 5b 24 6e 61 6d 65 5d 2c 20 42 61 73 65 50 61 63 6b 61 67 65 3a 3a 24 73 74 61 62 | flags[$name],.BasePackage::$stab |
5df00 | 69 6c 69 74 69 65 73 2c 20 74 72 75 65 29 3b 0a 7d 0a 0a 24 62 65 73 74 53 74 61 62 69 6c 69 74 | ilities,.true);.}..$bestStabilit |
5df20 | 79 20 3d 20 24 73 74 61 62 69 6c 69 74 79 3b 0a 69 66 20 28 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 | y.=.$stability;.if.($composer->g |
5df40 | 65 74 50 61 63 6b 61 67 65 28 29 2d 3e 67 65 74 50 72 65 66 65 72 53 74 61 62 6c 65 28 29 29 20 | etPackage()->getPreferStable()). |
5df60 | 7b 0a 24 62 65 73 74 53 74 61 62 69 6c 69 74 79 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 | {.$bestStability.=.$package->get |
5df80 | 53 74 61 62 69 6c 69 74 79 28 29 3b 0a 7d 0a 0a 24 74 61 72 67 65 74 56 65 72 73 69 6f 6e 20 3d | Stability();.}..$targetVersion.= |
5dfa0 | 20 6e 75 6c 6c 3b 0a 69 66 20 28 30 20 3d 3d 3d 20 73 74 72 70 6f 73 28 24 70 61 63 6b 61 67 65 | .null;.if.(0.===.strpos($package |
5dfc0 | 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 2c 20 27 64 65 76 2d 27 29 29 20 7b 0a 24 74 61 72 67 | ->getVersion(),.'dev-')).{.$targ |
5dfe0 | 65 74 56 65 72 73 69 6f 6e 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 56 65 72 73 69 6f 6e | etVersion.=.$package->getVersion |
5e000 | 28 29 3b 0a 0a 0a 69 66 20 28 24 6d 61 6a 6f 72 4f 6e 6c 79 29 20 7b 0a 72 65 74 75 72 6e 20 6e | ();...if.($majorOnly).{.return.n |
5e020 | 75 6c 6c 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 24 74 61 72 67 65 74 56 65 72 73 69 6f 6e 20 3d 3d 3d | ull;.}.}..if.($targetVersion.=== |
5e040 | 20 6e 75 6c 6c 29 20 7b 0a 69 66 20 28 24 6d 61 6a 6f 72 4f 6e 6c 79 20 26 26 20 50 72 65 67 3a | .null).{.if.($majorOnly.&&.Preg: |
5e060 | 3a 69 73 4d 61 74 63 68 28 27 7b 5e 28 5c 64 2b 29 5c 2e 7d 27 2c 20 24 70 61 63 6b 61 67 65 2d | :isMatch('{^(\d+)\.}',.$package- |
5e080 | 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 2c 20 24 6d 61 74 63 68 29 29 20 7b 0a 24 74 61 72 67 65 | >getVersion(),.$match)).{.$targe |
5e0a0 | 74 56 65 72 73 69 6f 6e 20 3d 20 27 3e 3d 27 2e 28 24 6d 61 74 63 68 5b 31 5d 20 2b 20 31 29 2e | tVersion.=.'>='.($match[1].+.1). |
5e0c0 | 27 2c 3c 39 39 39 39 39 39 39 2d 64 65 76 27 3b 0a 7d 0a 0a 69 66 20 28 24 6d 69 6e 6f 72 4f 6e | ',<9999999-dev';.}..if.($minorOn |
5e0e0 | 6c 79 29 20 7b 0a 24 74 61 72 67 65 74 56 65 72 73 69 6f 6e 20 3d 20 27 5e 27 2e 24 70 61 63 6b | ly).{.$targetVersion.=.'^'.$pack |
5e100 | 61 67 65 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 3b 0a 7d 0a 0a 69 66 20 28 24 70 61 74 63 68 | age->getVersion();.}..if.($patch |
5e120 | 4f 6e 6c 79 29 20 7b 0a 24 74 72 69 6d 6d 65 64 56 65 72 73 69 6f 6e 20 3d 20 50 72 65 67 3a 3a | Only).{.$trimmedVersion.=.Preg:: |
5e140 | 72 65 70 6c 61 63 65 28 27 7b 28 5c 2e 30 29 2b 24 7d 44 27 2c 20 27 27 2c 20 24 70 61 63 6b 61 | replace('{(\.0)+$}D',.'',.$packa |
5e160 | 67 65 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 29 3b 0a 24 70 61 72 74 73 4e 65 65 64 65 64 20 | ge->getVersion());.$partsNeeded. |
5e180 | 3d 20 73 75 62 73 74 72 28 24 74 72 69 6d 6d 65 64 56 65 72 73 69 6f 6e 2c 20 30 2c 20 31 29 20 | =.substr($trimmedVersion,.0,.1). |
5e1a0 | 3d 3d 3d 20 27 30 27 20 3f 20 34 20 3a 20 33 3b 0a 77 68 69 6c 65 20 28 73 75 62 73 74 72 5f 63 | ===.'0'.?.4.:.3;.while.(substr_c |
5e1c0 | 6f 75 6e 74 28 24 74 72 69 6d 6d 65 64 56 65 72 73 69 6f 6e 2c 20 27 2e 27 29 20 2b 20 31 20 3c | ount($trimmedVersion,.'.').+.1.< |
5e1e0 | 20 24 70 61 72 74 73 4e 65 65 64 65 64 29 20 7b 0a 24 74 72 69 6d 6d 65 64 56 65 72 73 69 6f 6e | .$partsNeeded).{.$trimmedVersion |
5e200 | 20 2e 3d 20 27 2e 30 27 3b 0a 7d 0a 24 74 61 72 67 65 74 56 65 72 73 69 6f 6e 20 3d 20 27 7e 27 | ..=.'.0';.}.$targetVersion.=.'~' |
5e220 | 2e 24 74 72 69 6d 6d 65 64 56 65 72 73 69 6f 6e 3b 0a 7d 0a 7d 0a 0a 24 63 61 6e 64 69 64 61 74 | .$trimmedVersion;.}.}..$candidat |
5e240 | 65 20 3d 20 24 76 65 72 73 69 6f 6e 53 65 6c 65 63 74 6f 72 2d 3e 66 69 6e 64 42 65 73 74 43 61 | e.=.$versionSelector->findBestCa |
5e260 | 6e 64 69 64 61 74 65 28 24 6e 61 6d 65 2c 20 24 74 61 72 67 65 74 56 65 72 73 69 6f 6e 2c 20 24 | ndidate($name,.$targetVersion,.$ |
5e280 | 62 65 73 74 53 74 61 62 69 6c 69 74 79 2c 20 24 70 6c 61 74 66 6f 72 6d 52 65 71 46 69 6c 74 65 | bestStability,.$platformReqFilte |
5e2a0 | 72 29 3b 0a 77 68 69 6c 65 20 28 24 63 61 6e 64 69 64 61 74 65 20 69 6e 73 74 61 6e 63 65 6f 66 | r);.while.($candidate.instanceof |
5e2c0 | 20 41 6c 69 61 73 50 61 63 6b 61 67 65 29 20 7b 0a 24 63 61 6e 64 69 64 61 74 65 20 3d 20 24 63 | .AliasPackage).{.$candidate.=.$c |
5e2e0 | 61 6e 64 69 64 61 74 65 2d 3e 67 65 74 41 6c 69 61 73 4f 66 28 29 3b 0a 7d 0a 0a 72 65 74 75 72 | andidate->getAliasOf();.}..retur |
5e300 | 6e 20 24 63 61 6e 64 69 64 61 74 65 20 21 3d 3d 20 66 61 6c 73 65 20 3f 20 24 63 61 6e 64 69 64 | n.$candidate.!==.false.?.$candid |
5e320 | 61 74 65 20 3a 20 6e 75 6c 6c 3b 0a 7d 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 | ate.:.null;.}..private.function. |
5e340 | 67 65 74 52 65 70 6f 73 69 74 6f 72 79 53 65 74 28 43 6f 6d 70 6f 73 65 72 20 24 63 6f 6d 70 6f | getRepositorySet(Composer.$compo |
5e360 | 73 65 72 29 3a 20 52 65 70 6f 73 69 74 6f 72 79 53 65 74 0a 7b 0a 69 66 20 28 21 24 74 68 69 73 | ser):.RepositorySet.{.if.(!$this |
5e380 | 2d 3e 72 65 70 6f 73 69 74 6f 72 79 53 65 74 29 20 7b 0a 24 74 68 69 73 2d 3e 72 65 70 6f 73 69 | ->repositorySet).{.$this->reposi |
5e3a0 | 74 6f 72 79 53 65 74 20 3d 20 6e 65 77 20 52 65 70 6f 73 69 74 6f 72 79 53 65 74 28 24 63 6f 6d | torySet.=.new.RepositorySet($com |
5e3c0 | 70 6f 73 65 72 2d 3e 67 65 74 50 61 63 6b 61 67 65 28 29 2d 3e 67 65 74 4d 69 6e 69 6d 75 6d 53 | poser->getPackage()->getMinimumS |
5e3e0 | 74 61 62 69 6c 69 74 79 28 29 2c 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 50 61 63 6b 61 67 | tability(),.$composer->getPackag |
5e400 | 65 28 29 2d 3e 67 65 74 53 74 61 62 69 6c 69 74 79 46 6c 61 67 73 28 29 29 3b 0a 24 74 68 69 73 | e()->getStabilityFlags());.$this |
5e420 | 2d 3e 72 65 70 6f 73 69 74 6f 72 79 53 65 74 2d 3e 61 64 64 52 65 70 6f 73 69 74 6f 72 79 28 6e | ->repositorySet->addRepository(n |
5e440 | 65 77 20 43 6f 6d 70 6f 73 69 74 65 52 65 70 6f 73 69 74 6f 72 79 28 24 63 6f 6d 70 6f 73 65 72 | ew.CompositeRepository($composer |
5e460 | 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 79 4d 61 6e 61 67 65 72 28 29 2d 3e 67 65 74 52 65 70 | ->getRepositoryManager()->getRep |
5e480 | 6f 73 69 74 6f 72 69 65 73 28 29 29 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e | ositories()));.}..return.$this-> |
5e4a0 | 72 65 70 6f 73 69 74 6f 72 79 53 65 74 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 | repositorySet;.}.}.<?php.declare |
5e4c0 | 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d | (strict_types=1);............nam |
5e4e0 | 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6d 6d 61 6e 64 3b 0a 0a 75 73 65 20 53 79 | espace.Composer\Command;..use.Sy |
5e500 | 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e | mfony\Component\Console\Input\In |
5e520 | 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 73 6f | putInterface;.use.Composer\Conso |
5e540 | 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 4f 70 74 69 6f 6e 3b 0a 75 73 65 20 53 79 6d 66 6f 6e | le\Input\InputOption;.use.Symfon |
5e560 | 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 4f 75 74 70 75 74 5c 4f 75 74 70 75 | y\Component\Console\Output\Outpu |
5e580 | 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 44 6f 77 6e 6c 6f 61 | tInterface;.use.Composer\Downloa |
5e5a0 | 64 65 72 5c 43 68 61 6e 67 65 52 65 70 6f 72 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 | der\ChangeReportInterface;.use.C |
5e5c0 | 6f 6d 70 6f 73 65 72 5c 44 6f 77 6e 6c 6f 61 64 65 72 5c 44 76 63 73 44 6f 77 6e 6c 6f 61 64 65 | omposer\Downloader\DvcsDownloade |
5e5e0 | 72 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 44 6f 77 6e 6c 6f 61 | rInterface;.use.Composer\Downloa |
5e600 | 64 65 72 5c 56 63 73 43 61 70 61 62 6c 65 44 6f 77 6e 6c 6f 61 64 65 72 49 6e 74 65 72 66 61 63 | der\VcsCapableDownloaderInterfac |
5e620 | 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 44 75 6d 70 65 72 5c 41 | e;.use.Composer\Package\Dumper\A |
5e640 | 72 72 61 79 44 75 6d 70 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 | rrayDumper;.use.Composer\Package |
5e660 | 5c 56 65 72 73 69 6f 6e 5c 56 65 72 73 69 6f 6e 47 75 65 73 73 65 72 3b 0a 75 73 65 20 43 6f 6d | \Version\VersionGuesser;.use.Com |
5e680 | 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 56 65 72 73 69 6f 6e 5c 56 65 72 73 69 6f 6e 50 61 72 | poser\Package\Version\VersionPar |
5e6a0 | 73 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 6c 75 67 69 6e 5c 43 6f 6d 6d 61 6e 64 | ser;.use.Composer\Plugin\Command |
5e6c0 | 45 76 65 6e 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 6c 75 67 69 6e 5c 50 6c 75 67 69 | Event;.use.Composer\Plugin\Plugi |
5e6e0 | 6e 45 76 65 6e 74 73 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 63 72 69 70 74 5c 53 63 72 | nEvents;.use.Composer\Script\Scr |
5e700 | 69 70 74 45 76 65 6e 74 73 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 72 6f | iptEvents;.use.Composer\Util\Pro |
5e720 | 63 65 73 73 45 78 65 63 75 74 6f 72 3b 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 53 74 61 74 75 73 43 | cessExecutor;......class.StatusC |
5e740 | 6f 6d 6d 61 6e 64 20 65 78 74 65 6e 64 73 20 42 61 73 65 43 6f 6d 6d 61 6e 64 0a 7b 0a 70 72 69 | ommand.extends.BaseCommand.{.pri |
5e760 | 76 61 74 65 20 63 6f 6e 73 74 20 45 58 49 54 5f 43 4f 44 45 5f 45 52 52 4f 52 53 20 3d 20 31 3b | vate.const.EXIT_CODE_ERRORS.=.1; |
5e780 | 0a 70 72 69 76 61 74 65 20 63 6f 6e 73 74 20 45 58 49 54 5f 43 4f 44 45 5f 55 4e 50 55 53 48 45 | .private.const.EXIT_CODE_UNPUSHE |
5e7a0 | 44 5f 43 48 41 4e 47 45 53 20 3d 20 32 3b 0a 70 72 69 76 61 74 65 20 63 6f 6e 73 74 20 45 58 49 | D_CHANGES.=.2;.private.const.EXI |
5e7c0 | 54 5f 43 4f 44 45 5f 56 45 52 53 49 4f 4e 5f 43 48 41 4e 47 45 53 20 3d 20 34 3b 0a 0a 0a 0a 0a | T_CODE_VERSION_CHANGES.=.4;..... |
5e7e0 | 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 63 6f 6e 66 69 67 75 72 65 28 29 3a 20 | protected.function.configure():. |
5e800 | 76 6f 69 64 0a 7b 0a 24 74 68 69 73 0a 2d 3e 73 65 74 4e 61 6d 65 28 27 73 74 61 74 75 73 27 29 | void.{.$this.->setName('status') |
5e820 | 0a 2d 3e 73 65 74 44 65 73 63 72 69 70 74 69 6f 6e 28 27 53 68 6f 77 73 20 61 20 6c 69 73 74 20 | .->setDescription('Shows.a.list. |
5e840 | 6f 66 20 6c 6f 63 61 6c 6c 79 20 6d 6f 64 69 66 69 65 64 20 70 61 63 6b 61 67 65 73 27 29 0a 2d | of.locally.modified.packages').- |
5e860 | 3e 73 65 74 44 65 66 69 6e 69 74 69 6f 6e 28 5b 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e | >setDefinition([.new.InputOption |
5e880 | 28 27 76 65 72 62 6f 73 65 27 2c 20 27 76 7c 76 76 7c 76 76 76 27 2c 20 49 6e 70 75 74 4f 70 74 | ('verbose',.'v|vv|vvv',.InputOpt |
5e8a0 | 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 53 68 6f 77 20 6d 6f 64 69 66 69 65 64 20 | ion::VALUE_NONE,.'Show.modified. |
5e8c0 | 66 69 6c 65 73 20 66 6f 72 20 65 61 63 68 20 64 69 72 65 63 74 6f 72 79 20 74 68 61 74 20 63 6f | files.for.each.directory.that.co |
5e8e0 | 6e 74 61 69 6e 73 20 63 68 61 6e 67 65 73 2e 27 29 2c 0a 5d 29 0a 2d 3e 73 65 74 48 65 6c 70 28 | ntains.changes.'),.]).->setHelp( |
5e900 | 0a 3c 3c 3c 45 4f 54 0a 54 68 65 20 73 74 61 74 75 73 20 63 6f 6d 6d 61 6e 64 20 64 69 73 70 6c | .<<<EOT.The.status.command.displ |
5e920 | 61 79 73 20 61 20 6c 69 73 74 20 6f 66 20 64 65 70 65 6e 64 65 6e 63 69 65 73 20 74 68 61 74 20 | ays.a.list.of.dependencies.that. |
5e940 | 68 61 76 65 0a 62 65 65 6e 20 6d 6f 64 69 66 69 65 64 20 6c 6f 63 61 6c 6c 79 2e 0a 0a 52 65 61 | have.been.modified.locally...Rea |
5e960 | 64 20 6d 6f 72 65 20 61 74 20 68 74 74 70 73 3a 2f 2f 67 65 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 | d.more.at.https://getcomposer.or |
5e980 | 67 2f 64 6f 63 2f 30 33 2d 63 6c 69 2e 6d 64 23 73 74 61 74 75 73 0a 45 4f 54 0a 29 0a 3b 0a 7d | g/doc/03-cli.md#status.EOT.).;.} |
5e9a0 | 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 65 78 65 63 75 74 65 28 49 6e 70 | ..protected.function.execute(Inp |
5e9c0 | 75 74 49 6e 74 65 72 66 61 63 65 20 24 69 6e 70 75 74 2c 20 4f 75 74 70 75 74 49 6e 74 65 72 66 | utInterface.$input,.OutputInterf |
5e9e0 | 61 63 65 20 24 6f 75 74 70 75 74 29 3a 20 69 6e 74 0a 7b 0a 24 63 6f 6d 70 6f 73 65 72 20 3d 20 | ace.$output):.int.{.$composer.=. |
5ea00 | 24 74 68 69 73 2d 3e 72 65 71 75 69 72 65 43 6f 6d 70 6f 73 65 72 28 29 3b 0a 0a 24 63 6f 6d 6d | $this->requireComposer();..$comm |
5ea20 | 61 6e 64 45 76 65 6e 74 20 3d 20 6e 65 77 20 43 6f 6d 6d 61 6e 64 45 76 65 6e 74 28 50 6c 75 67 | andEvent.=.new.CommandEvent(Plug |
5ea40 | 69 6e 45 76 65 6e 74 73 3a 3a 43 4f 4d 4d 41 4e 44 2c 20 27 73 74 61 74 75 73 27 2c 20 24 69 6e | inEvents::COMMAND,.'status',.$in |
5ea60 | 70 75 74 2c 20 24 6f 75 74 70 75 74 29 3b 0a 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 45 76 65 | put,.$output);.$composer->getEve |
5ea80 | 6e 74 44 69 73 70 61 74 63 68 65 72 28 29 2d 3e 64 69 73 70 61 74 63 68 28 24 63 6f 6d 6d 61 6e | ntDispatcher()->dispatch($comman |
5eaa0 | 64 45 76 65 6e 74 2d 3e 67 65 74 4e 61 6d 65 28 29 2c 20 24 63 6f 6d 6d 61 6e 64 45 76 65 6e 74 | dEvent->getName(),.$commandEvent |
5eac0 | 29 3b 0a 0a 0a 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 45 76 65 6e 74 44 69 73 70 61 74 63 68 | );...$composer->getEventDispatch |
5eae0 | 65 72 28 29 2d 3e 64 69 73 70 61 74 63 68 53 63 72 69 70 74 28 53 63 72 69 70 74 45 76 65 6e 74 | er()->dispatchScript(ScriptEvent |
5eb00 | 73 3a 3a 50 52 45 5f 53 54 41 54 55 53 5f 43 4d 44 2c 20 74 72 75 65 29 3b 0a 0a 24 65 78 69 74 | s::PRE_STATUS_CMD,.true);..$exit |
5eb20 | 43 6f 64 65 20 3d 20 24 74 68 69 73 2d 3e 64 6f 45 78 65 63 75 74 65 28 24 69 6e 70 75 74 29 3b | Code.=.$this->doExecute($input); |
5eb40 | 0a 0a 0a 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 | ...$composer->getEventDispatcher |
5eb60 | 28 29 2d 3e 64 69 73 70 61 74 63 68 53 63 72 69 70 74 28 53 63 72 69 70 74 45 76 65 6e 74 73 3a | ()->dispatchScript(ScriptEvents: |
5eb80 | 3a 50 4f 53 54 5f 53 54 41 54 55 53 5f 43 4d 44 2c 20 74 72 75 65 29 3b 0a 0a 72 65 74 75 72 6e | :POST_STATUS_CMD,.true);..return |
5eba0 | 20 24 65 78 69 74 43 6f 64 65 3b 0a 7d 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 | .$exitCode;.}..private.function. |
5ebc0 | 64 6f 45 78 65 63 75 74 65 28 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 69 6e 70 75 74 29 | doExecute(InputInterface.$input) |
5ebe0 | 3a 20 69 6e 74 0a 7b 0a 0a 24 63 6f 6d 70 6f 73 65 72 20 3d 20 24 74 68 69 73 2d 3e 72 65 71 75 | :.int.{..$composer.=.$this->requ |
5ec00 | 69 72 65 43 6f 6d 70 6f 73 65 72 28 29 3b 0a 0a 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 20 3d | ireComposer();..$installedRepo.= |
5ec20 | 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 79 4d 61 6e 61 67 65 72 | .$composer->getRepositoryManager |
5ec40 | 28 29 2d 3e 67 65 74 4c 6f 63 61 6c 52 65 70 6f 73 69 74 6f 72 79 28 29 3b 0a 0a 24 64 6d 20 3d | ()->getLocalRepository();..$dm.= |
5ec60 | 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 44 6f 77 6e 6c 6f 61 64 4d 61 6e 61 67 65 72 28 29 | .$composer->getDownloadManager() |
5ec80 | 3b 0a 24 69 6d 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 49 6e 73 74 61 6c 6c 61 74 69 | ;.$im.=.$composer->getInstallati |
5eca0 | 6f 6e 4d 61 6e 61 67 65 72 28 29 3b 0a 0a 24 65 72 72 6f 72 73 20 3d 20 5b 5d 3b 0a 24 69 6f 20 | onManager();..$errors.=.[];.$io. |
5ecc0 | 3d 20 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 3b 0a 24 75 6e 70 75 73 68 65 64 43 68 61 6e 67 | =.$this->getIO();.$unpushedChang |
5ece0 | 65 73 20 3d 20 5b 5d 3b 0a 24 76 63 73 56 65 72 73 69 6f 6e 43 68 61 6e 67 65 73 20 3d 20 5b 5d | es.=.[];.$vcsVersionChanges.=.[] |
5ed00 | 3b 0a 0a 24 70 61 72 73 65 72 20 3d 20 6e 65 77 20 56 65 72 73 69 6f 6e 50 61 72 73 65 72 3b 0a | ;..$parser.=.new.VersionParser;. |
5ed20 | 24 67 75 65 73 73 65 72 20 3d 20 6e 65 77 20 56 65 72 73 69 6f 6e 47 75 65 73 73 65 72 28 24 63 | $guesser.=.new.VersionGuesser($c |
5ed40 | 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 43 6f 6e 66 69 67 28 29 2c 20 24 63 6f 6d 70 6f 73 65 72 2d | omposer->getConfig(),.$composer- |
5ed60 | 3e 67 65 74 4c 6f 6f 70 28 29 2d 3e 67 65 74 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 28 29 | >getLoop()->getProcessExecutor() |
5ed80 | 20 3f 3f 20 6e 65 77 20 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 28 24 69 6f 29 2c 20 24 70 | .??.new.ProcessExecutor($io),.$p |
5eda0 | 61 72 73 65 72 29 3b 0a 24 64 75 6d 70 65 72 20 3d 20 6e 65 77 20 41 72 72 61 79 44 75 6d 70 65 | arser);.$dumper.=.new.ArrayDumpe |
5edc0 | 72 3b 0a 0a 0a 66 6f 72 65 61 63 68 20 28 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 2d 3e 67 65 | r;...foreach.($installedRepo->ge |
5ede0 | 74 43 61 6e 6f 6e 69 63 61 6c 50 61 63 6b 61 67 65 73 28 29 20 61 73 20 24 70 61 63 6b 61 67 65 | tCanonicalPackages().as.$package |
5ee00 | 29 20 7b 0a 24 64 6f 77 6e 6c 6f 61 64 65 72 20 3d 20 24 64 6d 2d 3e 67 65 74 44 6f 77 6e 6c 6f | ).{.$downloader.=.$dm->getDownlo |
5ee20 | 61 64 65 72 46 6f 72 50 61 63 6b 61 67 65 28 24 70 61 63 6b 61 67 65 29 3b 0a 24 74 61 72 67 65 | aderForPackage($package);.$targe |
5ee40 | 74 44 69 72 20 3d 20 24 69 6d 2d 3e 67 65 74 49 6e 73 74 61 6c 6c 50 61 74 68 28 24 70 61 63 6b | tDir.=.$im->getInstallPath($pack |
5ee60 | 61 67 65 29 3b 0a 0a 69 66 20 28 24 64 6f 77 6e 6c 6f 61 64 65 72 20 69 6e 73 74 61 6e 63 65 6f | age);..if.($downloader.instanceo |
5ee80 | 66 20 43 68 61 6e 67 65 52 65 70 6f 72 74 49 6e 74 65 72 66 61 63 65 29 20 7b 0a 69 66 20 28 69 | f.ChangeReportInterface).{.if.(i |
5eea0 | 73 5f 6c 69 6e 6b 28 24 74 61 72 67 65 74 44 69 72 29 29 20 7b 0a 24 65 72 72 6f 72 73 5b 24 74 | s_link($targetDir)).{.$errors[$t |
5eec0 | 61 72 67 65 74 44 69 72 5d 20 3d 20 24 74 61 72 67 65 74 44 69 72 20 2e 20 27 20 69 73 20 61 20 | argetDir].=.$targetDir...'.is.a. |
5eee0 | 73 79 6d 62 6f 6c 69 63 20 6c 69 6e 6b 2e 27 3b 0a 7d 0a 0a 69 66 20 28 6e 75 6c 6c 20 21 3d 3d | symbolic.link.';.}..if.(null.!== |
5ef00 | 20 28 24 63 68 61 6e 67 65 73 20 3d 20 24 64 6f 77 6e 6c 6f 61 64 65 72 2d 3e 67 65 74 4c 6f 63 | .($changes.=.$downloader->getLoc |
5ef20 | 61 6c 43 68 61 6e 67 65 73 28 24 70 61 63 6b 61 67 65 2c 20 24 74 61 72 67 65 74 44 69 72 29 29 | alChanges($package,.$targetDir)) |
5ef40 | 29 20 7b 0a 24 65 72 72 6f 72 73 5b 24 74 61 72 67 65 74 44 69 72 5d 20 3d 20 24 63 68 61 6e 67 | ).{.$errors[$targetDir].=.$chang |
5ef60 | 65 73 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 24 64 6f 77 6e 6c 6f 61 64 65 72 20 69 6e 73 74 61 6e 63 | es;.}.}..if.($downloader.instanc |
5ef80 | 65 6f 66 20 56 63 73 43 61 70 61 62 6c 65 44 6f 77 6e 6c 6f 61 64 65 72 49 6e 74 65 72 66 61 63 | eof.VcsCapableDownloaderInterfac |
5efa0 | 65 29 20 7b 0a 69 66 20 28 24 64 6f 77 6e 6c 6f 61 64 65 72 2d 3e 67 65 74 56 63 73 52 65 66 65 | e).{.if.($downloader->getVcsRefe |
5efc0 | 72 65 6e 63 65 28 24 70 61 63 6b 61 67 65 2c 20 24 74 61 72 67 65 74 44 69 72 29 29 20 7b 0a 73 | rence($package,.$targetDir)).{.s |
5efe0 | 77 69 74 63 68 20 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 49 6e 73 74 61 6c 6c 61 74 69 6f 6e | witch.($package->getInstallation |
5f000 | 53 6f 75 72 63 65 28 29 29 20 7b 0a 63 61 73 65 20 27 73 6f 75 72 63 65 27 3a 0a 24 70 72 65 76 | Source()).{.case.'source':.$prev |
5f020 | 69 6f 75 73 52 65 66 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 53 6f 75 72 63 65 52 65 66 | iousRef.=.$package->getSourceRef |
5f040 | 65 72 65 6e 63 65 28 29 3b 0a 62 72 65 61 6b 3b 0a 63 61 73 65 20 27 64 69 73 74 27 3a 0a 24 70 | erence();.break;.case.'dist':.$p |
5f060 | 72 65 76 69 6f 75 73 52 65 66 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 44 69 73 74 52 65 | reviousRef.=.$package->getDistRe |
5f080 | 66 65 72 65 6e 63 65 28 29 3b 0a 62 72 65 61 6b 3b 0a 64 65 66 61 75 6c 74 3a 0a 24 70 72 65 76 | ference();.break;.default:.$prev |
5f0a0 | 69 6f 75 73 52 65 66 20 3d 20 6e 75 6c 6c 3b 0a 7d 0a 0a 24 63 75 72 72 65 6e 74 56 65 72 73 69 | iousRef.=.null;.}..$currentVersi |
5f0c0 | 6f 6e 20 3d 20 24 67 75 65 73 73 65 72 2d 3e 67 75 65 73 73 56 65 72 73 69 6f 6e 28 24 64 75 6d | on.=.$guesser->guessVersion($dum |
5f0e0 | 70 65 72 2d 3e 64 75 6d 70 28 24 70 61 63 6b 61 67 65 29 2c 20 24 74 61 72 67 65 74 44 69 72 29 | per->dump($package),.$targetDir) |
5f100 | 3b 0a 0a 69 66 20 28 24 70 72 65 76 69 6f 75 73 52 65 66 20 26 26 20 24 63 75 72 72 65 6e 74 56 | ;..if.($previousRef.&&.$currentV |
5f120 | 65 72 73 69 6f 6e 20 26 26 20 24 63 75 72 72 65 6e 74 56 65 72 73 69 6f 6e 5b 27 63 6f 6d 6d 69 | ersion.&&.$currentVersion['commi |
5f140 | 74 27 5d 20 21 3d 3d 20 24 70 72 65 76 69 6f 75 73 52 65 66 29 20 7b 0a 24 76 63 73 56 65 72 73 | t'].!==.$previousRef).{.$vcsVers |
5f160 | 69 6f 6e 43 68 61 6e 67 65 73 5b 24 74 61 72 67 65 74 44 69 72 5d 20 3d 20 5b 0a 27 70 72 65 76 | ionChanges[$targetDir].=.[.'prev |
5f180 | 69 6f 75 73 27 20 3d 3e 20 5b 0a 27 76 65 72 73 69 6f 6e 27 20 3d 3e 20 24 70 61 63 6b 61 67 65 | ious'.=>.[.'version'.=>.$package |
5f1a0 | 2d 3e 67 65 74 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 2c 0a 27 72 65 66 27 20 3d 3e 20 24 | ->getPrettyVersion(),.'ref'.=>.$ |
5f1c0 | 70 72 65 76 69 6f 75 73 52 65 66 2c 0a 5d 2c 0a 27 63 75 72 72 65 6e 74 27 20 3d 3e 20 5b 0a 27 | previousRef,.],.'current'.=>.[.' |
5f1e0 | 76 65 72 73 69 6f 6e 27 20 3d 3e 20 24 63 75 72 72 65 6e 74 56 65 72 73 69 6f 6e 5b 27 70 72 65 | version'.=>.$currentVersion['pre |
5f200 | 74 74 79 5f 76 65 72 73 69 6f 6e 27 5d 2c 0a 27 72 65 66 27 20 3d 3e 20 24 63 75 72 72 65 6e 74 | tty_version'],.'ref'.=>.$current |
5f220 | 56 65 72 73 69 6f 6e 5b 27 63 6f 6d 6d 69 74 27 5d 2c 0a 5d 2c 0a 5d 3b 0a 7d 0a 7d 0a 7d 0a 0a | Version['commit'],.],.];.}.}.}.. |
5f240 | 69 66 20 28 24 64 6f 77 6e 6c 6f 61 64 65 72 20 69 6e 73 74 61 6e 63 65 6f 66 20 44 76 63 73 44 | if.($downloader.instanceof.DvcsD |
5f260 | 6f 77 6e 6c 6f 61 64 65 72 49 6e 74 65 72 66 61 63 65 29 20 7b 0a 69 66 20 28 24 75 6e 70 75 73 | ownloaderInterface).{.if.($unpus |
5f280 | 68 65 64 20 3d 20 24 64 6f 77 6e 6c 6f 61 64 65 72 2d 3e 67 65 74 55 6e 70 75 73 68 65 64 43 68 | hed.=.$downloader->getUnpushedCh |
5f2a0 | 61 6e 67 65 73 28 24 70 61 63 6b 61 67 65 2c 20 24 74 61 72 67 65 74 44 69 72 29 29 20 7b 0a 24 | anges($package,.$targetDir)).{.$ |
5f2c0 | 75 6e 70 75 73 68 65 64 43 68 61 6e 67 65 73 5b 24 74 61 72 67 65 74 44 69 72 5d 20 3d 20 24 75 | unpushedChanges[$targetDir].=.$u |
5f2e0 | 6e 70 75 73 68 65 64 3b 0a 7d 0a 7d 0a 7d 0a 0a 0a 69 66 20 28 21 24 65 72 72 6f 72 73 20 26 26 | npushed;.}.}.}...if.(!$errors.&& |
5f300 | 20 21 24 75 6e 70 75 73 68 65 64 43 68 61 6e 67 65 73 20 26 26 20 21 24 76 63 73 56 65 72 73 69 | .!$unpushedChanges.&&.!$vcsVersi |
5f320 | 6f 6e 43 68 61 6e 67 65 73 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 69 | onChanges).{.$io->writeError('<i |
5f340 | 6e 66 6f 3e 4e 6f 20 6c 6f 63 61 6c 20 63 68 61 6e 67 65 73 3c 2f 69 6e 66 6f 3e 27 29 3b 0a 0a | nfo>No.local.changes</info>');.. |
5f360 | 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 0a 69 66 20 28 24 65 72 72 6f 72 73 29 20 7b 0a 24 69 6f 2d | return.0;.}..if.($errors).{.$io- |
5f380 | 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 65 72 72 6f 72 3e 59 6f 75 20 68 61 76 65 20 63 68 61 | >writeError('<error>You.have.cha |
5f3a0 | 6e 67 65 73 20 69 6e 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 64 65 70 65 6e 64 65 6e 63 69 | nges.in.the.following.dependenci |
5f3c0 | 65 73 3a 3c 2f 65 72 72 6f 72 3e 27 29 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 65 72 72 6f 72 73 | es:</error>');..foreach.($errors |
5f3e0 | 20 61 73 20 24 70 61 74 68 20 3d 3e 20 24 63 68 61 6e 67 65 73 29 20 7b 0a 69 66 20 28 24 69 6e | .as.$path.=>.$changes).{.if.($in |
5f400 | 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 76 65 72 62 6f 73 65 27 29 29 20 7b 0a 24 69 6e | put->getOption('verbose')).{.$in |
5f420 | 64 65 6e 74 65 64 43 68 61 6e 67 65 73 20 3d 20 69 6d 70 6c 6f 64 65 28 22 5c 6e 22 2c 20 61 72 | dentedChanges.=.implode("\n",.ar |
5f440 | 72 61 79 5f 6d 61 70 28 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 6c 69 6e 65 29 3a | ray_map(static.function.($line): |
5f460 | 20 73 74 72 69 6e 67 20 7b 0a 72 65 74 75 72 6e 20 27 20 20 20 20 27 20 2e 20 6c 74 72 69 6d 28 | .string.{.return.'....'...ltrim( |
5f480 | 24 6c 69 6e 65 29 3b 0a 7d 2c 20 65 78 70 6c 6f 64 65 28 22 5c 6e 22 2c 20 24 63 68 61 6e 67 65 | $line);.},.explode("\n",.$change |
5f4a0 | 73 29 29 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 3c 69 6e 66 6f 3e 27 2e 24 70 61 74 68 2e | s)));.$io->write('<info>'.$path. |
5f4c0 | 27 3c 2f 69 6e 66 6f 3e 3a 27 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 24 69 6e 64 65 6e 74 65 | '</info>:');.$io->write($indente |
5f4e0 | 64 43 68 61 6e 67 65 73 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 24 | dChanges);.}.else.{.$io->write($ |
5f500 | 70 61 74 68 29 3b 0a 7d 0a 7d 0a 7d 0a 0a 69 66 20 28 24 75 6e 70 75 73 68 65 64 43 68 61 6e 67 | path);.}.}.}..if.($unpushedChang |
5f520 | 65 73 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 77 61 72 6e 69 6e 67 3e | es).{.$io->writeError('<warning> |
5f540 | 59 6f 75 20 68 61 76 65 20 75 6e 70 75 73 68 65 64 20 63 68 61 6e 67 65 73 20 6f 6e 20 74 68 65 | You.have.unpushed.changes.on.the |
5f560 | 20 63 75 72 72 65 6e 74 20 62 72 61 6e 63 68 20 69 6e 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 | .current.branch.in.the.following |
5f580 | 20 64 65 70 65 6e 64 65 6e 63 69 65 73 3a 3c 2f 77 61 72 6e 69 6e 67 3e 27 29 3b 0a 0a 66 6f 72 | .dependencies:</warning>');..for |
5f5a0 | 65 61 63 68 20 28 24 75 6e 70 75 73 68 65 64 43 68 61 6e 67 65 73 20 61 73 20 24 70 61 74 68 20 | each.($unpushedChanges.as.$path. |
5f5c0 | 3d 3e 20 24 63 68 61 6e 67 65 73 29 20 7b 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 | =>.$changes).{.if.($input->getOp |
5f5e0 | 74 69 6f 6e 28 27 76 65 72 62 6f 73 65 27 29 29 20 7b 0a 24 69 6e 64 65 6e 74 65 64 43 68 61 6e | tion('verbose')).{.$indentedChan |
5f600 | 67 65 73 20 3d 20 69 6d 70 6c 6f 64 65 28 22 5c 6e 22 2c 20 61 72 72 61 79 5f 6d 61 70 28 73 74 | ges.=.implode("\n",.array_map(st |
5f620 | 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 6c 69 6e 65 29 3a 20 73 74 72 69 6e 67 20 7b 0a | atic.function.($line):.string.{. |
5f640 | 72 65 74 75 72 6e 20 27 20 20 20 20 27 20 2e 20 6c 74 72 69 6d 28 24 6c 69 6e 65 29 3b 0a 7d 2c | return.'....'...ltrim($line);.}, |
5f660 | 20 65 78 70 6c 6f 64 65 28 22 5c 6e 22 2c 20 24 63 68 61 6e 67 65 73 29 29 29 3b 0a 24 69 6f 2d | .explode("\n",.$changes)));.$io- |
5f680 | 3e 77 72 69 74 65 28 27 3c 69 6e 66 6f 3e 27 2e 24 70 61 74 68 2e 27 3c 2f 69 6e 66 6f 3e 3a 27 | >write('<info>'.$path.'</info>:' |
5f6a0 | 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 24 69 6e 64 65 6e 74 65 64 43 68 61 6e 67 65 73 29 3b | );.$io->write($indentedChanges); |
5f6c0 | 0a 7d 20 65 6c 73 65 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 24 70 61 74 68 29 3b 0a 7d 0a 7d | .}.else.{.$io->write($path);.}.} |
5f6e0 | 0a 7d 0a 0a 69 66 20 28 24 76 63 73 56 65 72 73 69 6f 6e 43 68 61 6e 67 65 73 29 20 7b 0a 24 69 | .}..if.($vcsVersionChanges).{.$i |
5f700 | 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 77 61 72 6e 69 6e 67 3e 59 6f 75 20 68 61 76 65 | o->writeError('<warning>You.have |
5f720 | 20 76 65 72 73 69 6f 6e 20 76 61 72 69 61 74 69 6f 6e 73 20 69 6e 20 74 68 65 20 66 6f 6c 6c 6f | .version.variations.in.the.follo |
5f740 | 77 69 6e 67 20 64 65 70 65 6e 64 65 6e 63 69 65 73 3a 3c 2f 77 61 72 6e 69 6e 67 3e 27 29 3b 0a | wing.dependencies:</warning>');. |
5f760 | 0a 66 6f 72 65 61 63 68 20 28 24 76 63 73 56 65 72 73 69 6f 6e 43 68 61 6e 67 65 73 20 61 73 20 | .foreach.($vcsVersionChanges.as. |
5f780 | 24 70 61 74 68 20 3d 3e 20 24 63 68 61 6e 67 65 73 29 20 7b 0a 69 66 20 28 24 69 6e 70 75 74 2d | $path.=>.$changes).{.if.($input- |
5f7a0 | 3e 67 65 74 4f 70 74 69 6f 6e 28 27 76 65 72 62 6f 73 65 27 29 29 20 7b 0a 0a 24 63 75 72 72 65 | >getOption('verbose')).{..$curre |
5f7c0 | 6e 74 56 65 72 73 69 6f 6e 20 3d 20 24 63 68 61 6e 67 65 73 5b 27 63 75 72 72 65 6e 74 27 5d 5b | ntVersion.=.$changes['current'][ |
5f7e0 | 27 76 65 72 73 69 6f 6e 27 5d 20 3f 3a 20 24 63 68 61 6e 67 65 73 5b 27 63 75 72 72 65 6e 74 27 | 'version'].?:.$changes['current' |
5f800 | 5d 5b 27 72 65 66 27 5d 3b 0a 24 70 72 65 76 69 6f 75 73 56 65 72 73 69 6f 6e 20 3d 20 24 63 68 | ]['ref'];.$previousVersion.=.$ch |
5f820 | 61 6e 67 65 73 5b 27 70 72 65 76 69 6f 75 73 27 5d 5b 27 76 65 72 73 69 6f 6e 27 5d 20 3f 3a 20 | anges['previous']['version'].?:. |
5f840 | 24 63 68 61 6e 67 65 73 5b 27 70 72 65 76 69 6f 75 73 27 5d 5b 27 72 65 66 27 5d 3b 0a 0a 69 66 | $changes['previous']['ref'];..if |
5f860 | 20 28 24 69 6f 2d 3e 69 73 56 65 72 79 56 65 72 62 6f 73 65 28 29 29 20 7b 0a 0a 24 63 75 72 72 | .($io->isVeryVerbose()).{..$curr |
5f880 | 65 6e 74 56 65 72 73 69 6f 6e 20 2e 3d 20 73 70 72 69 6e 74 66 28 27 20 28 25 73 29 27 2c 20 24 | entVersion..=.sprintf('.(%s)',.$ |
5f8a0 | 63 68 61 6e 67 65 73 5b 27 63 75 72 72 65 6e 74 27 5d 5b 27 72 65 66 27 5d 29 3b 0a 24 70 72 65 | changes['current']['ref']);.$pre |
5f8c0 | 76 69 6f 75 73 56 65 72 73 69 6f 6e 20 2e 3d 20 73 70 72 69 6e 74 66 28 27 20 28 25 73 29 27 2c | viousVersion..=.sprintf('.(%s)', |
5f8e0 | 20 24 63 68 61 6e 67 65 73 5b 27 70 72 65 76 69 6f 75 73 27 5d 5b 27 72 65 66 27 5d 29 3b 0a 7d | .$changes['previous']['ref']);.} |
5f900 | 0a 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 3c 69 6e 66 6f 3e 27 2e 24 70 61 74 68 2e 27 3c 2f 69 | ..$io->write('<info>'.$path.'</i |
5f920 | 6e 66 6f 3e 3a 27 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 73 70 72 69 6e 74 66 28 27 20 20 20 | nfo>:');.$io->write(sprintf('... |
5f940 | 20 46 72 6f 6d 20 3c 63 6f 6d 6d 65 6e 74 3e 25 73 3c 2f 63 6f 6d 6d 65 6e 74 3e 20 74 6f 20 3c | .From.<comment>%s</comment>.to.< |
5f960 | 63 6f 6d 6d 65 6e 74 3e 25 73 3c 2f 63 6f 6d 6d 65 6e 74 3e 27 2c 20 24 70 72 65 76 69 6f 75 73 | comment>%s</comment>',.$previous |
5f980 | 56 65 72 73 69 6f 6e 2c 20 24 63 75 72 72 65 6e 74 56 65 72 73 69 6f 6e 29 29 3b 0a 7d 20 65 6c | Version,.$currentVersion));.}.el |
5f9a0 | 73 65 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 24 70 61 74 68 29 3b 0a 7d 0a 7d 0a 7d 0a 0a 69 | se.{.$io->write($path);.}.}.}..i |
5f9c0 | 66 20 28 28 24 65 72 72 6f 72 73 20 7c 7c 20 24 75 6e 70 75 73 68 65 64 43 68 61 6e 67 65 73 20 | f.(($errors.||.$unpushedChanges. |
5f9e0 | 7c 7c 20 24 76 63 73 56 65 72 73 69 6f 6e 43 68 61 6e 67 65 73 29 20 26 26 20 21 24 69 6e 70 75 | ||.$vcsVersionChanges).&&.!$inpu |
5fa00 | 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 76 65 72 62 6f 73 65 27 29 29 20 7b 0a 24 69 6f 2d 3e | t->getOption('verbose')).{.$io-> |
5fa20 | 77 72 69 74 65 45 72 72 6f 72 28 27 55 73 65 20 2d 2d 76 65 72 62 6f 73 65 20 28 2d 76 29 20 74 | writeError('Use.--verbose.(-v).t |
5fa40 | 6f 20 73 65 65 20 61 20 6c 69 73 74 20 6f 66 20 66 69 6c 65 73 27 29 3b 0a 7d 0a 0a 72 65 74 75 | o.see.a.list.of.files');.}..retu |
5fa60 | 72 6e 20 28 24 65 72 72 6f 72 73 20 3f 20 73 65 6c 66 3a 3a 45 58 49 54 5f 43 4f 44 45 5f 45 52 | rn.($errors.?.self::EXIT_CODE_ER |
5fa80 | 52 4f 52 53 20 3a 20 30 29 20 2b 20 28 24 75 6e 70 75 73 68 65 64 43 68 61 6e 67 65 73 20 3f 20 | RORS.:.0).+.($unpushedChanges.?. |
5faa0 | 73 65 6c 66 3a 3a 45 58 49 54 5f 43 4f 44 45 5f 55 4e 50 55 53 48 45 44 5f 43 48 41 4e 47 45 53 | self::EXIT_CODE_UNPUSHED_CHANGES |
5fac0 | 20 3a 20 30 29 20 2b 20 28 24 76 63 73 56 65 72 73 69 6f 6e 43 68 61 6e 67 65 73 20 3f 20 73 65 | .:.0).+.($vcsVersionChanges.?.se |
5fae0 | 6c 66 3a 3a 45 58 49 54 5f 43 4f 44 45 5f 56 45 52 53 49 4f 4e 5f 43 48 41 4e 47 45 53 20 3a 20 | lf::EXIT_CODE_VERSION_CHANGES.:. |
5fb00 | 30 29 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 | 0);.}.}.<?php.declare(strict_typ |
5fb20 | 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 | es=1);............namespace.Comp |
5fb40 | 6f 73 65 72 5c 43 6f 6d 6d 61 6e 64 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f | oser\Command;..use.Composer\Repo |
5fb60 | 73 69 74 6f 72 79 5c 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 3b 0a 75 73 65 20 43 | sitory\PlatformRepository;.use.C |
5fb80 | 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 52 6f 6f 74 50 61 63 6b 61 67 65 52 65 | omposer\Repository\RootPackageRe |
5fba0 | 70 6f 73 69 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 | pository;.use.Composer\Repositor |
5fbc0 | 79 5c 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f | y\InstalledRepository;.use.Compo |
5fbe0 | 73 65 72 5c 49 6e 73 74 61 6c 6c 65 72 5c 53 75 67 67 65 73 74 65 64 50 61 63 6b 61 67 65 73 52 | ser\Installer\SuggestedPackagesR |
5fc00 | 65 70 6f 72 74 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 73 6f 6c 65 5c 49 6e | eporter;.use.Composer\Console\In |
5fc20 | 70 75 74 5c 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 | put\InputArgument;.use.Symfony\C |
5fc40 | 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 49 6e 74 65 | omponent\Console\Input\InputInte |
5fc60 | 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 | rface;.use.Composer\Console\Inpu |
5fc80 | 74 5c 49 6e 70 75 74 4f 70 74 69 6f 6e 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f | t\InputOption;.use.Symfony\Compo |
5fca0 | 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 4f 75 74 70 75 74 5c 4f 75 74 70 75 74 49 6e 74 65 72 66 | nent\Console\Output\OutputInterf |
5fcc0 | 61 63 65 3b 0a 0a 63 6c 61 73 73 20 53 75 67 67 65 73 74 73 43 6f 6d 6d 61 6e 64 20 65 78 74 65 | ace;..class.SuggestsCommand.exte |
5fce0 | 6e 64 73 20 42 61 73 65 43 6f 6d 6d 61 6e 64 0a 7b 0a 75 73 65 20 43 6f 6d 70 6c 65 74 69 6f 6e | nds.BaseCommand.{.use.Completion |
5fd00 | 54 72 61 69 74 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 63 6f 6e 66 69 | Trait;..protected.function.confi |
5fd20 | 67 75 72 65 28 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 0a 2d 3e 73 65 74 4e 61 6d 65 28 27 | gure():.void.{.$this.->setName(' |
5fd40 | 73 75 67 67 65 73 74 73 27 29 0a 2d 3e 73 65 74 44 65 73 63 72 69 70 74 69 6f 6e 28 27 53 68 6f | suggests').->setDescription('Sho |
5fd60 | 77 73 20 70 61 63 6b 61 67 65 20 73 75 67 67 65 73 74 69 6f 6e 73 27 29 0a 2d 3e 73 65 74 44 65 | ws.package.suggestions').->setDe |
5fd80 | 66 69 6e 69 74 69 6f 6e 28 5b 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 62 79 2d 70 | finition([.new.InputOption('by-p |
5fda0 | 61 63 6b 61 67 65 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 | ackage',.null,.InputOption::VALU |
5fdc0 | 45 5f 4e 4f 4e 45 2c 20 27 47 72 6f 75 70 73 20 6f 75 74 70 75 74 20 62 79 20 73 75 67 67 65 73 | E_NONE,.'Groups.output.by.sugges |
5fde0 | 74 69 6e 67 20 70 61 63 6b 61 67 65 20 28 64 65 66 61 75 6c 74 29 27 29 2c 0a 6e 65 77 20 49 6e | ting.package.(default)'),.new.In |
5fe00 | 70 75 74 4f 70 74 69 6f 6e 28 27 62 79 2d 73 75 67 67 65 73 74 69 6f 6e 27 2c 20 6e 75 6c 6c 2c | putOption('by-suggestion',.null, |
5fe20 | 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 47 72 6f 75 70 | .InputOption::VALUE_NONE,.'Group |
5fe40 | 73 20 6f 75 74 70 75 74 20 62 79 20 73 75 67 67 65 73 74 65 64 20 70 61 63 6b 61 67 65 27 29 2c | s.output.by.suggested.package'), |
5fe60 | 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 61 6c 6c 27 2c 20 27 61 27 2c 20 49 6e 70 | .new.InputOption('all',.'a',.Inp |
5fe80 | 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 53 68 6f 77 20 73 75 67 67 | utOption::VALUE_NONE,.'Show.sugg |
5fea0 | 65 73 74 69 6f 6e 73 20 66 72 6f 6d 20 61 6c 6c 20 64 65 70 65 6e 64 65 6e 63 69 65 73 2c 20 69 | estions.from.all.dependencies,.i |
5fec0 | 6e 63 6c 75 64 69 6e 67 20 74 72 61 6e 73 69 74 69 76 65 20 6f 6e 65 73 27 29 2c 0a 6e 65 77 20 | ncluding.transitive.ones'),.new. |
5fee0 | 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6c 69 73 74 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f | InputOption('list',.null,.InputO |
5ff00 | 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 53 68 6f 77 20 6f 6e 6c 79 20 6c 69 | ption::VALUE_NONE,.'Show.only.li |
5ff20 | 73 74 20 6f 66 20 73 75 67 67 65 73 74 65 64 20 70 61 63 6b 61 67 65 20 6e 61 6d 65 73 27 29 2c | st.of.suggested.package.names'), |
5ff40 | 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 64 65 76 27 2c 20 6e 75 6c 6c 2c | .new.InputOption('no-dev',.null, |
5ff60 | 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 45 78 63 6c 75 | .InputOption::VALUE_NONE,.'Exclu |
5ff80 | 64 65 20 73 75 67 67 65 73 74 69 6f 6e 73 20 66 72 6f 6d 20 72 65 71 75 69 72 65 2d 64 65 76 20 | de.suggestions.from.require-dev. |
5ffa0 | 70 61 63 6b 61 67 65 73 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 28 27 70 | packages'),.new.InputArgument('p |
5ffc0 | 61 63 6b 61 67 65 73 27 2c 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 3a 3a 49 53 5f 41 52 52 41 | ackages',.InputArgument::IS_ARRA |
5ffe0 | 59 20 7c 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 3a 3a 4f 50 54 49 4f 4e 41 4c 2c 20 27 50 61 | Y.|.InputArgument::OPTIONAL,.'Pa |
60000 | 63 6b 61 67 65 73 20 74 68 61 74 20 79 6f 75 20 77 61 6e 74 20 74 6f 20 6c 69 73 74 20 73 75 67 | ckages.that.you.want.to.list.sug |
60020 | 67 65 73 74 69 6f 6e 73 20 66 72 6f 6d 2e 27 2c 20 6e 75 6c 6c 2c 20 24 74 68 69 73 2d 3e 73 75 | gestions.from.',.null,.$this->su |
60040 | 67 67 65 73 74 49 6e 73 74 61 6c 6c 65 64 50 61 63 6b 61 67 65 28 29 29 2c 0a 5d 29 0a 2d 3e 73 | ggestInstalledPackage()),.]).->s |
60060 | 65 74 48 65 6c 70 28 0a 3c 3c 3c 45 4f 54 0a 0a 54 68 65 20 3c 69 6e 66 6f 3e 25 63 6f 6d 6d 61 | etHelp(.<<<EOT..The.<info>%comma |
60080 | 6e 64 2e 6e 61 6d 65 25 3c 2f 69 6e 66 6f 3e 20 63 6f 6d 6d 61 6e 64 20 73 68 6f 77 73 20 61 20 | nd.name%</info>.command.shows.a. |
600a0 | 73 6f 72 74 65 64 20 6c 69 73 74 20 6f 66 20 73 75 67 67 65 73 74 65 64 20 70 61 63 6b 61 67 65 | sorted.list.of.suggested.package |
600c0 | 73 2e 0a 0a 52 65 61 64 20 6d 6f 72 65 20 61 74 20 68 74 74 70 73 3a 2f 2f 67 65 74 63 6f 6d 70 | s...Read.more.at.https://getcomp |
600e0 | 6f 73 65 72 2e 6f 72 67 2f 64 6f 63 2f 30 33 2d 63 6c 69 2e 6d 64 23 73 75 67 67 65 73 74 73 0a | oser.org/doc/03-cli.md#suggests. |
60100 | 45 4f 54 0a 29 0a 3b 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 65 78 | EOT.).;.}..protected.function.ex |
60120 | 65 63 75 74 65 28 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 69 6e 70 75 74 2c 20 4f 75 74 | ecute(InputInterface.$input,.Out |
60140 | 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 6f 75 74 70 75 74 29 3a 20 69 6e 74 0a 7b 0a 24 63 6f | putInterface.$output):.int.{.$co |
60160 | 6d 70 6f 73 65 72 20 3d 20 24 74 68 69 73 2d 3e 72 65 71 75 69 72 65 43 6f 6d 70 6f 73 65 72 28 | mposer.=.$this->requireComposer( |
60180 | 29 3b 0a 0a 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 20 3d 20 5b 0a 6e 65 77 20 52 6f 6f 74 | );..$installedRepos.=.[.new.Root |
601a0 | 50 61 63 6b 61 67 65 52 65 70 6f 73 69 74 6f 72 79 28 63 6c 6f 6e 65 20 24 63 6f 6d 70 6f 73 65 | PackageRepository(clone.$compose |
601c0 | 72 2d 3e 67 65 74 50 61 63 6b 61 67 65 28 29 29 2c 0a 5d 3b 0a 0a 24 6c 6f 63 6b 65 72 20 3d 20 | r->getPackage()),.];..$locker.=. |
601e0 | 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 4c 6f 63 6b 65 72 28 29 3b 0a 69 66 20 28 24 6c 6f 63 | $composer->getLocker();.if.($loc |
60200 | 6b 65 72 2d 3e 69 73 4c 6f 63 6b 65 64 28 29 29 20 7b 0a 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 | ker->isLocked()).{.$installedRep |
60220 | 6f 73 5b 5d 20 3d 20 6e 65 77 20 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 28 5b 5d | os[].=.new.PlatformRepository([] |
60240 | 2c 20 24 6c 6f 63 6b 65 72 2d 3e 67 65 74 50 6c 61 74 66 6f 72 6d 4f 76 65 72 72 69 64 65 73 28 | ,.$locker->getPlatformOverrides( |
60260 | 29 29 3b 0a 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 5b 5d 20 3d 20 24 6c 6f 63 6b 65 72 2d | ));.$installedRepos[].=.$locker- |
60280 | 3e 67 65 74 4c 6f 63 6b 65 64 52 65 70 6f 73 69 74 6f 72 79 28 21 24 69 6e 70 75 74 2d 3e 67 65 | >getLockedRepository(!$input->ge |
602a0 | 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 64 65 76 27 29 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 69 6e | tOption('no-dev'));.}.else.{.$in |
602c0 | 73 74 61 6c 6c 65 64 52 65 70 6f 73 5b 5d 20 3d 20 6e 65 77 20 50 6c 61 74 66 6f 72 6d 52 65 70 | stalledRepos[].=.new.PlatformRep |
602e0 | 6f 73 69 74 6f 72 79 28 5b 5d 2c 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 43 6f 6e 66 69 67 | ository([],.$composer->getConfig |
60300 | 28 29 2d 3e 67 65 74 28 27 70 6c 61 74 66 6f 72 6d 27 29 29 3b 0a 24 69 6e 73 74 61 6c 6c 65 64 | ()->get('platform'));.$installed |
60320 | 52 65 70 6f 73 5b 5d 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f | Repos[].=.$composer->getReposito |
60340 | 72 79 4d 61 6e 61 67 65 72 28 29 2d 3e 67 65 74 4c 6f 63 61 6c 52 65 70 6f 73 69 74 6f 72 79 28 | ryManager()->getLocalRepository( |
60360 | 29 3b 0a 7d 0a 0a 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 20 3d 20 6e 65 77 20 49 6e 73 74 61 | );.}..$installedRepo.=.new.Insta |
60380 | 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 28 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 29 3b | lledRepository($installedRepos); |
603a0 | 0a 24 72 65 70 6f 72 74 65 72 20 3d 20 6e 65 77 20 53 75 67 67 65 73 74 65 64 50 61 63 6b 61 67 | .$reporter.=.new.SuggestedPackag |
603c0 | 65 73 52 65 70 6f 72 74 65 72 28 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 29 3b 0a 0a 24 66 69 | esReporter($this->getIO());..$fi |
603e0 | 6c 74 65 72 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 41 72 67 75 6d 65 6e 74 28 27 70 61 63 6b | lter.=.$input->getArgument('pack |
60400 | 61 67 65 73 27 29 3b 0a 24 70 61 63 6b 61 67 65 73 20 3d 20 24 69 6e 73 74 61 6c 6c 65 64 52 65 | ages');.$packages.=.$installedRe |
60420 | 70 6f 2d 3e 67 65 74 50 61 63 6b 61 67 65 73 28 29 3b 0a 24 70 61 63 6b 61 67 65 73 5b 5d 20 3d | po->getPackages();.$packages[].= |
60440 | 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 50 61 63 6b 61 67 65 28 29 3b 0a 66 6f 72 65 61 63 | .$composer->getPackage();.foreac |
60460 | 68 20 28 24 70 61 63 6b 61 67 65 73 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 69 66 20 28 | h.($packages.as.$package).{.if.( |
60480 | 21 65 6d 70 74 79 28 24 66 69 6c 74 65 72 29 20 26 26 20 21 69 6e 5f 61 72 72 61 79 28 24 70 61 | !empty($filter).&&.!in_array($pa |
604a0 | 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 2c 20 24 66 69 6c 74 65 72 29 29 20 7b 0a 63 6f | ckage->getName(),.$filter)).{.co |
604c0 | 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 24 72 65 70 6f 72 74 65 72 2d 3e 61 64 64 53 75 67 67 65 73 74 | ntinue;.}..$reporter->addSuggest |
604e0 | 69 6f 6e 73 46 72 6f 6d 50 61 63 6b 61 67 65 28 24 70 61 63 6b 61 67 65 29 3b 0a 7d 0a 0a 0a 24 | ionsFromPackage($package);.}...$ |
60500 | 6d 6f 64 65 20 3d 20 53 75 67 67 65 73 74 65 64 50 61 63 6b 61 67 65 73 52 65 70 6f 72 74 65 72 | mode.=.SuggestedPackagesReporter |
60520 | 3a 3a 4d 4f 44 45 5f 42 59 5f 50 41 43 4b 41 47 45 3b 0a 0a 0a 69 66 20 28 24 69 6e 70 75 74 2d | ::MODE_BY_PACKAGE;...if.($input- |
60540 | 3e 67 65 74 4f 70 74 69 6f 6e 28 27 62 79 2d 73 75 67 67 65 73 74 69 6f 6e 27 29 29 20 7b 0a 24 | >getOption('by-suggestion')).{.$ |
60560 | 6d 6f 64 65 20 3d 20 53 75 67 67 65 73 74 65 64 50 61 63 6b 61 67 65 73 52 65 70 6f 72 74 65 72 | mode.=.SuggestedPackagesReporter |
60580 | 3a 3a 4d 4f 44 45 5f 42 59 5f 53 55 47 47 45 53 54 49 4f 4e 3b 0a 7d 0a 0a 69 66 20 28 24 69 6e | ::MODE_BY_SUGGESTION;.}..if.($in |
605a0 | 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 62 79 2d 70 61 63 6b 61 67 65 27 29 29 20 7b 0a | put->getOption('by-package')).{. |
605c0 | 24 6d 6f 64 65 20 7c 3d 20 53 75 67 67 65 73 74 65 64 50 61 63 6b 61 67 65 73 52 65 70 6f 72 74 | $mode.|=.SuggestedPackagesReport |
605e0 | 65 72 3a 3a 4d 4f 44 45 5f 42 59 5f 50 41 43 4b 41 47 45 3b 0a 7d 0a 0a 69 66 20 28 24 69 6e 70 | er::MODE_BY_PACKAGE;.}..if.($inp |
60600 | 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6c 69 73 74 27 29 29 20 7b 0a 24 6d 6f 64 65 20 3d | ut->getOption('list')).{.$mode.= |
60620 | 20 53 75 67 67 65 73 74 65 64 50 61 63 6b 61 67 65 73 52 65 70 6f 72 74 65 72 3a 3a 4d 4f 44 45 | .SuggestedPackagesReporter::MODE |
60640 | 5f 4c 49 53 54 3b 0a 7d 0a 0a 24 72 65 70 6f 72 74 65 72 2d 3e 6f 75 74 70 75 74 28 24 6d 6f 64 | _LIST;.}..$reporter->output($mod |
60660 | 65 2c 20 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 2c 20 65 6d 70 74 79 28 24 66 69 6c 74 65 72 | e,.$installedRepo,.empty($filter |
60680 | 29 20 26 26 20 21 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 61 6c 6c 27 29 20 3f | ).&&.!$input->getOption('all').? |
606a0 | 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 50 61 63 6b 61 67 65 28 29 20 3a 20 6e 75 6c 6c 29 | .$composer->getPackage().:.null) |
606c0 | 3b 0a 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 | ;..return.0;.}.}.<?php.declare(s |
606e0 | 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 | trict_types=1);............names |
60700 | 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6d 6d 61 6e 64 3b 0a 0a 75 73 65 20 43 6f 6d 70 | pace.Composer\Command;..use.Comp |
60720 | 6f 73 65 72 5c 43 6f 6d 70 6f 73 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 44 65 70 65 | oser\Composer;.use.Composer\Depe |
60740 | 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 5c 52 65 71 75 65 73 74 3b 0a 75 73 65 20 43 6f 6d 70 | ndencyResolver\Request;.use.Comp |
60760 | 6f 73 65 72 5c 49 6e 73 74 61 6c 6c 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 4f 5c | oser\Installer;.use.Composer\IO\ |
60780 | 49 4f 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 | IOInterface;.use.Composer\Packag |
607a0 | 65 5c 4c 6f 61 64 65 72 5c 52 6f 6f 74 50 61 63 6b 61 67 65 4c 6f 61 64 65 72 3b 0a 75 73 65 20 | e\Loader\RootPackageLoader;.use. |
607c0 | 43 6f 6d 70 6f 73 65 72 5c 50 63 72 65 5c 50 72 65 67 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 | Composer\Pcre\Preg;.use.Composer |
607e0 | 5c 50 6c 75 67 69 6e 5c 43 6f 6d 6d 61 6e 64 45 76 65 6e 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 | \Plugin\CommandEvent;.use.Compos |
60800 | 65 72 5c 50 6c 75 67 69 6e 5c 50 6c 75 67 69 6e 45 76 65 6e 74 73 3b 0a 75 73 65 20 43 6f 6d 70 | er\Plugin\PluginEvents;.use.Comp |
60820 | 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 56 65 72 73 69 6f 6e 5c 56 65 72 73 69 6f 6e 50 61 72 73 | oser\Package\Version\VersionPars |
60840 | 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 48 74 74 70 44 6f 77 6e 6c 6f | er;.use.Composer\Util\HttpDownlo |
60860 | 61 64 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 41 64 76 69 73 6f 72 79 5c 41 75 64 69 | ader;.use.Composer\Advisory\Audi |
60880 | 74 6f 72 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f | tor;.use.Symfony\Component\Conso |
608a0 | 6c 65 5c 48 65 6c 70 65 72 5c 54 61 62 6c 65 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d | le\Helper\Table;.use.Symfony\Com |
608c0 | 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 49 6e 74 65 72 66 | ponent\Console\Input\InputInterf |
608e0 | 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c | ace;.use.Composer\Console\Input\ |
60900 | 49 6e 70 75 74 4f 70 74 69 6f 6e 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 73 6f 6c | InputOption;.use.Composer\Consol |
60920 | 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 3b 0a 75 73 65 20 53 79 6d 66 6f | e\Input\InputArgument;.use.Symfo |
60940 | 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 4f 75 74 70 75 74 5c 4f 75 74 70 | ny\Component\Console\Output\Outp |
60960 | 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 | utInterface;.use.Symfony\Compone |
60980 | 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 51 75 65 73 74 69 6f 6e 5c 51 75 65 73 74 69 6f 6e 3b 0a 0a 0a | nt\Console\Question\Question;... |
609a0 | 0a 0a 0a 63 6c 61 73 73 20 55 70 64 61 74 65 43 6f 6d 6d 61 6e 64 20 65 78 74 65 6e 64 73 20 42 | ...class.UpdateCommand.extends.B |
609c0 | 61 73 65 43 6f 6d 6d 61 6e 64 0a 7b 0a 75 73 65 20 43 6f 6d 70 6c 65 74 69 6f 6e 54 72 61 69 74 | aseCommand.{.use.CompletionTrait |
609e0 | 3b 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 63 6f 6e 66 69 67 75 | ;.....protected.function.configu |
60a00 | 72 65 28 29 0a 7b 0a 24 74 68 69 73 0a 2d 3e 73 65 74 4e 61 6d 65 28 27 75 70 64 61 74 65 27 29 | re().{.$this.->setName('update') |
60a20 | 0a 2d 3e 73 65 74 41 6c 69 61 73 65 73 28 5b 27 75 27 2c 20 27 75 70 67 72 61 64 65 27 5d 29 0a | .->setAliases(['u',.'upgrade']). |
60a40 | 2d 3e 73 65 74 44 65 73 63 72 69 70 74 69 6f 6e 28 27 55 70 64 61 74 65 73 20 79 6f 75 72 20 64 | ->setDescription('Updates.your.d |
60a60 | 65 70 65 6e 64 65 6e 63 69 65 73 20 74 6f 20 74 68 65 20 6c 61 74 65 73 74 20 76 65 72 73 69 6f | ependencies.to.the.latest.versio |
60a80 | 6e 20 61 63 63 6f 72 64 69 6e 67 20 74 6f 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 2c 20 61 6e | n.according.to.composer.json,.an |
60aa0 | 64 20 75 70 64 61 74 65 73 20 74 68 65 20 63 6f 6d 70 6f 73 65 72 2e 6c 6f 63 6b 20 66 69 6c 65 | d.updates.the.composer.lock.file |
60ac0 | 27 29 0a 2d 3e 73 65 74 44 65 66 69 6e 69 74 69 6f 6e 28 5b 0a 6e 65 77 20 49 6e 70 75 74 41 72 | ').->setDefinition([.new.InputAr |
60ae0 | 67 75 6d 65 6e 74 28 27 70 61 63 6b 61 67 65 73 27 2c 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 | gument('packages',.InputArgument |
60b00 | 3a 3a 49 53 5f 41 52 52 41 59 20 7c 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 3a 3a 4f 50 54 49 | ::IS_ARRAY.|.InputArgument::OPTI |
60b20 | 4f 4e 41 4c 2c 20 27 50 61 63 6b 61 67 65 73 20 74 68 61 74 20 73 68 6f 75 6c 64 20 62 65 20 75 | ONAL,.'Packages.that.should.be.u |
60b40 | 70 64 61 74 65 64 2c 20 69 66 20 6e 6f 74 20 70 72 6f 76 69 64 65 64 20 61 6c 6c 20 70 61 63 6b | pdated,.if.not.provided.all.pack |
60b60 | 61 67 65 73 20 61 72 65 2e 27 2c 20 6e 75 6c 6c 2c 20 24 74 68 69 73 2d 3e 73 75 67 67 65 73 74 | ages.are.',.null,.$this->suggest |
60b80 | 49 6e 73 74 61 6c 6c 65 64 50 61 63 6b 61 67 65 28 66 61 6c 73 65 29 29 2c 0a 6e 65 77 20 49 6e | InstalledPackage(false)),.new.In |
60ba0 | 70 75 74 4f 70 74 69 6f 6e 28 27 77 69 74 68 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 | putOption('with',.null,.InputOpt |
60bc0 | 69 6f 6e 3a 3a 56 41 4c 55 45 5f 49 53 5f 41 52 52 41 59 20 7c 20 49 6e 70 75 74 4f 70 74 69 6f | ion::VALUE_IS_ARRAY.|.InputOptio |
60be0 | 6e 3a 3a 56 41 4c 55 45 5f 52 45 51 55 49 52 45 44 2c 20 27 54 65 6d 70 6f 72 61 72 79 20 76 65 | n::VALUE_REQUIRED,.'Temporary.ve |
60c00 | 72 73 69 6f 6e 20 63 6f 6e 73 74 72 61 69 6e 74 20 74 6f 20 61 64 64 2c 20 65 2e 67 2e 20 66 6f | rsion.constraint.to.add,.e.g..fo |
60c20 | 6f 2f 62 61 72 3a 31 2e 30 2e 30 20 6f 72 20 66 6f 6f 2f 62 61 72 3d 31 2e 30 2e 30 27 29 2c 0a | o/bar:1.0.0.or.foo/bar=1.0.0'),. |
60c40 | 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 70 72 65 66 65 72 2d 73 6f 75 72 63 65 27 2c | new.InputOption('prefer-source', |
60c60 | 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 | .null,.InputOption::VALUE_NONE,. |
60c80 | 27 46 6f 72 63 65 73 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 66 72 6f 6d 20 70 61 63 6b 61 67 | 'Forces.installation.from.packag |
60ca0 | 65 20 73 6f 75 72 63 65 73 20 77 68 65 6e 20 70 6f 73 73 69 62 6c 65 2c 20 69 6e 63 6c 75 64 69 | e.sources.when.possible,.includi |
60cc0 | 6e 67 20 56 43 53 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 | ng.VCS.information.'),.new.Input |
60ce0 | 4f 70 74 69 6f 6e 28 27 70 72 65 66 65 72 2d 64 69 73 74 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 | Option('prefer-dist',.null,.Inpu |
60d00 | 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 46 6f 72 63 65 73 20 69 6e 73 | tOption::VALUE_NONE,.'Forces.ins |
60d20 | 74 61 6c 6c 61 74 69 6f 6e 20 66 72 6f 6d 20 70 61 63 6b 61 67 65 20 64 69 73 74 20 28 64 65 66 | tallation.from.package.dist.(def |
60d40 | 61 75 6c 74 20 62 65 68 61 76 69 6f 72 29 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 | ault.behavior).'),.new.InputOpti |
60d60 | 6f 6e 28 27 70 72 65 66 65 72 2d 69 6e 73 74 61 6c 6c 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 | on('prefer-install',.null,.Input |
60d80 | 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 52 45 51 55 49 52 45 44 2c 20 27 46 6f 72 63 65 73 20 | Option::VALUE_REQUIRED,.'Forces. |
60da0 | 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 66 72 6f 6d 20 70 61 63 6b 61 67 65 20 64 69 73 74 7c 73 | installation.from.package.dist|s |
60dc0 | 6f 75 72 63 65 7c 61 75 74 6f 20 28 61 75 74 6f 20 63 68 6f 6f 73 65 73 20 73 6f 75 72 63 65 20 | ource|auto.(auto.chooses.source. |
60de0 | 66 6f 72 20 64 65 76 20 76 65 72 73 69 6f 6e 73 2c 20 64 69 73 74 20 66 6f 72 20 74 68 65 20 72 | for.dev.versions,.dist.for.the.r |
60e00 | 65 73 74 29 2e 27 2c 20 6e 75 6c 6c 2c 20 24 74 68 69 73 2d 3e 73 75 67 67 65 73 74 50 72 65 66 | est).',.null,.$this->suggestPref |
60e20 | 65 72 49 6e 73 74 61 6c 6c 28 29 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 64 | erInstall()),.new.InputOption('d |
60e40 | 72 79 2d 72 75 6e 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 | ry-run',.null,.InputOption::VALU |
60e60 | 45 5f 4e 4f 4e 45 2c 20 27 4f 75 74 70 75 74 73 20 74 68 65 20 6f 70 65 72 61 74 69 6f 6e 73 20 | E_NONE,.'Outputs.the.operations. |
60e80 | 62 75 74 20 77 69 6c 6c 20 6e 6f 74 20 65 78 65 63 75 74 65 20 61 6e 79 74 68 69 6e 67 20 28 69 | but.will.not.execute.anything.(i |
60ea0 | 6d 70 6c 69 63 69 74 6c 79 20 65 6e 61 62 6c 65 73 20 2d 2d 76 65 72 62 6f 73 65 29 2e 27 29 2c | mplicitly.enables.--verbose).'), |
60ec0 | 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 64 65 76 27 2c 20 6e 75 6c 6c 2c 20 49 6e | .new.InputOption('dev',.null,.In |
60ee0 | 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 44 45 50 52 45 43 41 54 | putOption::VALUE_NONE,.'DEPRECAT |
60f00 | 45 44 3a 20 45 6e 61 62 6c 65 73 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 6f 66 20 72 65 71 75 | ED:.Enables.installation.of.requ |
60f20 | 69 72 65 2d 64 65 76 20 70 61 63 6b 61 67 65 73 20 28 65 6e 61 62 6c 65 64 20 62 79 20 64 65 66 | ire-dev.packages.(enabled.by.def |
60f40 | 61 75 6c 74 2c 20 6f 6e 6c 79 20 70 72 65 73 65 6e 74 20 66 6f 72 20 42 43 29 2e 27 29 2c 0a 6e | ault,.only.present.for.BC).'),.n |
60f60 | 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 64 65 76 27 2c 20 6e 75 6c 6c 2c 20 49 | ew.InputOption('no-dev',.null,.I |
60f80 | 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 44 69 73 61 62 6c 65 | nputOption::VALUE_NONE,.'Disable |
60fa0 | 73 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 6f 66 20 72 65 71 75 69 72 65 2d 64 65 76 20 70 61 | s.installation.of.require-dev.pa |
60fc0 | 63 6b 61 67 65 73 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6c 6f 63 6b | ckages.'),.new.InputOption('lock |
60fe0 | 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 | ',.null,.InputOption::VALUE_NONE |
61000 | 2c 20 27 4f 76 65 72 77 72 69 74 65 73 20 74 68 65 20 6c 6f 63 6b 20 66 69 6c 65 20 68 61 73 68 | ,.'Overwrites.the.lock.file.hash |
61020 | 20 74 6f 20 73 75 70 70 72 65 73 73 20 77 61 72 6e 69 6e 67 20 61 62 6f 75 74 20 74 68 65 20 6c | .to.suppress.warning.about.the.l |
61040 | 6f 63 6b 20 66 69 6c 65 20 62 65 69 6e 67 20 6f 75 74 20 6f 66 20 64 61 74 65 20 77 69 74 68 6f | ock.file.being.out.of.date.witho |
61060 | 75 74 20 75 70 64 61 74 69 6e 67 20 70 61 63 6b 61 67 65 20 76 65 72 73 69 6f 6e 73 2e 20 50 61 | ut.updating.package.versions..Pa |
61080 | 63 6b 61 67 65 20 6d 65 74 61 64 61 74 61 20 6c 69 6b 65 20 6d 69 72 72 6f 72 73 20 61 6e 64 20 | ckage.metadata.like.mirrors.and. |
610a0 | 55 52 4c 73 20 61 72 65 20 75 70 64 61 74 65 64 20 69 66 20 74 68 65 79 20 63 68 61 6e 67 65 64 | URLs.are.updated.if.they.changed |
610c0 | 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 69 6e 73 74 61 6c 6c | .'),.new.InputOption('no-install |
610e0 | 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 | ',.null,.InputOption::VALUE_NONE |
61100 | 2c 20 27 53 6b 69 70 20 74 68 65 20 69 6e 73 74 61 6c 6c 20 73 74 65 70 20 61 66 74 65 72 20 75 | ,.'Skip.the.install.step.after.u |
61120 | 70 64 61 74 69 6e 67 20 74 68 65 20 63 6f 6d 70 6f 73 65 72 2e 6c 6f 63 6b 20 66 69 6c 65 2e 27 | pdating.the.composer.lock.file.' |
61140 | 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 61 75 64 69 74 27 2c 20 6e | ),.new.InputOption('no-audit',.n |
61160 | 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 53 | ull,.InputOption::VALUE_NONE,.'S |
61180 | 6b 69 70 20 74 68 65 20 61 75 64 69 74 20 73 74 65 70 20 61 66 74 65 72 20 75 70 64 61 74 69 6e | kip.the.audit.step.after.updatin |
611a0 | 67 20 74 68 65 20 63 6f 6d 70 6f 73 65 72 2e 6c 6f 63 6b 20 66 69 6c 65 20 28 63 61 6e 20 61 6c | g.the.composer.lock.file.(can.al |
611c0 | 73 6f 20 62 65 20 73 65 74 20 76 69 61 20 74 68 65 20 43 4f 4d 50 4f 53 45 52 5f 4e 4f 5f 41 55 | so.be.set.via.the.COMPOSER_NO_AU |
611e0 | 44 49 54 3d 31 20 65 6e 76 20 76 61 72 29 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 | DIT=1.env.var).'),.new.InputOpti |
61200 | 6f 6e 28 27 61 75 64 69 74 2d 66 6f 72 6d 61 74 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 | on('audit-format',.null,.InputOp |
61220 | 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 52 45 51 55 49 52 45 44 2c 20 27 41 75 64 69 74 20 6f 75 74 | tion::VALUE_REQUIRED,.'Audit.out |
61240 | 70 75 74 20 66 6f 72 6d 61 74 2e 20 4d 75 73 74 20 62 65 20 22 74 61 62 6c 65 22 2c 20 22 70 6c | put.format..Must.be."table",."pl |
61260 | 61 69 6e 22 2c 20 22 6a 73 6f 6e 22 2c 20 6f 72 20 22 73 75 6d 6d 61 72 79 22 2e 27 2c 20 41 75 | ain",."json",.or."summary".',.Au |
61280 | 64 69 74 6f 72 3a 3a 46 4f 52 4d 41 54 5f 53 55 4d 4d 41 52 59 2c 20 41 75 64 69 74 6f 72 3a 3a | ditor::FORMAT_SUMMARY,.Auditor:: |
612a0 | 46 4f 52 4d 41 54 53 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 61 75 | FORMATS),.new.InputOption('no-au |
612c0 | 74 6f 6c 6f 61 64 65 72 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 | toloader',.null,.InputOption::VA |
612e0 | 4c 55 45 5f 4e 4f 4e 45 2c 20 27 53 6b 69 70 73 20 61 75 74 6f 6c 6f 61 64 65 72 20 67 65 6e 65 | LUE_NONE,.'Skips.autoloader.gene |
61300 | 72 61 74 69 6f 6e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 73 75 | ration'),.new.InputOption('no-su |
61320 | 67 67 65 73 74 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 | ggest',.null,.InputOption::VALUE |
61340 | 5f 4e 4f 4e 45 2c 20 27 44 45 50 52 45 43 41 54 45 44 3a 20 54 68 69 73 20 66 6c 61 67 20 64 6f | _NONE,.'DEPRECATED:.This.flag.do |
61360 | 65 73 20 6e 6f 74 20 65 78 69 73 74 20 61 6e 79 6d 6f 72 65 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 | es.not.exist.anymore.'),.new.Inp |
61380 | 75 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 70 72 6f 67 72 65 73 73 27 2c 20 6e 75 6c 6c 2c 20 49 6e | utOption('no-progress',.null,.In |
613a0 | 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 44 6f 20 6e 6f 74 20 6f | putOption::VALUE_NONE,.'Do.not.o |
613c0 | 75 74 70 75 74 20 64 6f 77 6e 6c 6f 61 64 20 70 72 6f 67 72 65 73 73 2e 27 29 2c 0a 6e 65 77 20 | utput.download.progress.'),.new. |
613e0 | 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 77 69 74 68 2d 64 65 70 65 6e 64 65 6e 63 69 65 73 27 2c | InputOption('with-dependencies', |
61400 | 20 27 77 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 | .'w',.InputOption::VALUE_NONE,.' |
61420 | 55 70 64 61 74 65 20 61 6c 73 6f 20 64 65 70 65 6e 64 65 6e 63 69 65 73 20 6f 66 20 70 61 63 6b | Update.also.dependencies.of.pack |
61440 | 61 67 65 73 20 69 6e 20 74 68 65 20 61 72 67 75 6d 65 6e 74 20 6c 69 73 74 2c 20 65 78 63 65 70 | ages.in.the.argument.list,.excep |
61460 | 74 20 74 68 6f 73 65 20 77 68 69 63 68 20 61 72 65 20 72 6f 6f 74 20 72 65 71 75 69 72 65 6d 65 | t.those.which.are.root.requireme |
61480 | 6e 74 73 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 77 69 74 68 2d 61 6c | nts.'),.new.InputOption('with-al |
614a0 | 6c 2d 64 65 70 65 6e 64 65 6e 63 69 65 73 27 2c 20 27 57 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f | l-dependencies',.'W',.InputOptio |
614c0 | 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 55 70 64 61 74 65 20 61 6c 73 6f 20 64 65 70 65 | n::VALUE_NONE,.'Update.also.depe |
614e0 | 6e 64 65 6e 63 69 65 73 20 6f 66 20 70 61 63 6b 61 67 65 73 20 69 6e 20 74 68 65 20 61 72 67 75 | ndencies.of.packages.in.the.argu |
61500 | 6d 65 6e 74 20 6c 69 73 74 2c 20 69 6e 63 6c 75 64 69 6e 67 20 74 68 6f 73 65 20 77 68 69 63 68 | ment.list,.including.those.which |
61520 | 20 61 72 65 20 72 6f 6f 74 20 72 65 71 75 69 72 65 6d 65 6e 74 73 2e 27 29 2c 0a 6e 65 77 20 49 | .are.root.requirements.'),.new.I |
61540 | 6e 70 75 74 4f 70 74 69 6f 6e 28 27 76 65 72 62 6f 73 65 27 2c 20 27 76 7c 76 76 7c 76 76 76 27 | nputOption('verbose',.'v|vv|vvv' |
61560 | 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 53 68 6f 77 | ,.InputOption::VALUE_NONE,.'Show |
61580 | 73 20 6d 6f 72 65 20 64 65 74 61 69 6c 73 20 69 6e 63 6c 75 64 69 6e 67 20 6e 65 77 20 63 6f 6d | s.more.details.including.new.com |
615a0 | 6d 69 74 73 20 70 75 6c 6c 65 64 20 69 6e 20 77 68 65 6e 20 75 70 64 61 74 69 6e 67 20 70 61 63 | mits.pulled.in.when.updating.pac |
615c0 | 6b 61 67 65 73 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6f 70 74 69 6d | kages.'),.new.InputOption('optim |
615e0 | 69 7a 65 2d 61 75 74 6f 6c 6f 61 64 65 72 27 2c 20 27 6f 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f | ize-autoloader',.'o',.InputOptio |
61600 | 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 4f 70 74 69 6d 69 7a 65 20 61 75 74 6f 6c 6f 61 | n::VALUE_NONE,.'Optimize.autoloa |
61620 | 64 65 72 20 64 75 72 69 6e 67 20 61 75 74 6f 6c 6f 61 64 65 72 20 64 75 6d 70 2e 27 29 2c 0a 6e | der.during.autoloader.dump.'),.n |
61640 | 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 63 6c 61 73 73 6d 61 70 2d 61 75 74 68 6f 72 69 | ew.InputOption('classmap-authori |
61660 | 74 61 74 69 76 65 27 2c 20 27 61 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 | tative',.'a',.InputOption::VALUE |
61680 | 5f 4e 4f 4e 45 2c 20 27 41 75 74 6f 6c 6f 61 64 20 63 6c 61 73 73 65 73 20 66 72 6f 6d 20 74 68 | _NONE,.'Autoload.classes.from.th |
616a0 | 65 20 63 6c 61 73 73 6d 61 70 20 6f 6e 6c 79 2e 20 49 6d 70 6c 69 63 69 74 6c 79 20 65 6e 61 62 | e.classmap.only..Implicitly.enab |
616c0 | 6c 65 73 20 60 2d 2d 6f 70 74 69 6d 69 7a 65 2d 61 75 74 6f 6c 6f 61 64 65 72 60 2e 27 29 2c 0a | les.`--optimize-autoloader`.'),. |
616e0 | 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 61 70 63 75 2d 61 75 74 6f 6c 6f 61 64 65 72 | new.InputOption('apcu-autoloader |
61700 | 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 | ',.null,.InputOption::VALUE_NONE |
61720 | 2c 20 27 55 73 65 20 41 50 43 75 20 74 6f 20 63 61 63 68 65 20 66 6f 75 6e 64 2f 6e 6f 74 2d 66 | ,.'Use.APCu.to.cache.found/not-f |
61740 | 6f 75 6e 64 20 63 6c 61 73 73 65 73 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e | ound.classes.'),.new.InputOption |
61760 | 28 27 61 70 63 75 2d 61 75 74 6f 6c 6f 61 64 65 72 2d 70 72 65 66 69 78 27 2c 20 6e 75 6c 6c 2c | ('apcu-autoloader-prefix',.null, |
61780 | 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 52 45 51 55 49 52 45 44 2c 20 27 55 | .InputOption::VALUE_REQUIRED,.'U |
617a0 | 73 65 20 61 20 63 75 73 74 6f 6d 20 70 72 65 66 69 78 20 66 6f 72 20 74 68 65 20 41 50 43 75 20 | se.a.custom.prefix.for.the.APCu. |
617c0 | 61 75 74 6f 6c 6f 61 64 65 72 20 63 61 63 68 65 2e 20 49 6d 70 6c 69 63 69 74 6c 79 20 65 6e 61 | autoloader.cache..Implicitly.ena |
617e0 | 62 6c 65 73 20 2d 2d 61 70 63 75 2d 61 75 74 6f 6c 6f 61 64 65 72 27 29 2c 0a 6e 65 77 20 49 6e | bles.--apcu-autoloader'),.new.In |
61800 | 70 75 74 4f 70 74 69 6f 6e 28 27 69 67 6e 6f 72 65 2d 70 6c 61 74 66 6f 72 6d 2d 72 65 71 27 2c | putOption('ignore-platform-req', |
61820 | 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 52 45 51 55 49 52 | .null,.InputOption::VALUE_REQUIR |
61840 | 45 44 20 7c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 49 53 5f 41 52 52 41 59 | ED.|.InputOption::VALUE_IS_ARRAY |
61860 | 2c 20 27 49 67 6e 6f 72 65 20 61 20 73 70 65 63 69 66 69 63 20 70 6c 61 74 66 6f 72 6d 20 72 65 | ,.'Ignore.a.specific.platform.re |
61880 | 71 75 69 72 65 6d 65 6e 74 20 28 70 68 70 20 26 20 65 78 74 2d 20 70 61 63 6b 61 67 65 73 29 2e | quirement.(php.&.ext-.packages). |
618a0 | 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 69 67 6e 6f 72 65 2d 70 6c 61 74 | '),.new.InputOption('ignore-plat |
618c0 | 66 6f 72 6d 2d 72 65 71 73 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 | form-reqs',.null,.InputOption::V |
618e0 | 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 49 67 6e 6f 72 65 20 61 6c 6c 20 70 6c 61 74 66 6f 72 6d 20 | ALUE_NONE,.'Ignore.all.platform. |
61900 | 72 65 71 75 69 72 65 6d 65 6e 74 73 20 28 70 68 70 20 26 20 65 78 74 2d 20 70 61 63 6b 61 67 65 | requirements.(php.&.ext-.package |
61920 | 73 29 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 70 72 65 66 65 72 2d 73 | s).'),.new.InputOption('prefer-s |
61940 | 74 61 62 6c 65 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 | table',.null,.InputOption::VALUE |
61960 | 5f 4e 4f 4e 45 2c 20 27 50 72 65 66 65 72 20 73 74 61 62 6c 65 20 76 65 72 73 69 6f 6e 73 20 6f | _NONE,.'Prefer.stable.versions.o |
61980 | 66 20 64 65 70 65 6e 64 65 6e 63 69 65 73 20 28 63 61 6e 20 61 6c 73 6f 20 62 65 20 73 65 74 20 | f.dependencies.(can.also.be.set. |
619a0 | 76 69 61 20 74 68 65 20 43 4f 4d 50 4f 53 45 52 5f 50 52 45 46 45 52 5f 53 54 41 42 4c 45 3d 31 | via.the.COMPOSER_PREFER_STABLE=1 |
619c0 | 20 65 6e 76 20 76 61 72 29 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 70 | .env.var).'),.new.InputOption('p |
619e0 | 72 65 66 65 72 2d 6c 6f 77 65 73 74 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e | refer-lowest',.null,.InputOption |
61a00 | 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 50 72 65 66 65 72 20 6c 6f 77 65 73 74 20 76 65 72 | ::VALUE_NONE,.'Prefer.lowest.ver |
61a20 | 73 69 6f 6e 73 20 6f 66 20 64 65 70 65 6e 64 65 6e 63 69 65 73 20 28 63 61 6e 20 61 6c 73 6f 20 | sions.of.dependencies.(can.also. |
61a40 | 62 65 20 73 65 74 20 76 69 61 20 74 68 65 20 43 4f 4d 50 4f 53 45 52 5f 50 52 45 46 45 52 5f 4c | be.set.via.the.COMPOSER_PREFER_L |
61a60 | 4f 57 45 53 54 3d 31 20 65 6e 76 20 76 61 72 29 2e 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 | OWEST=1.env.var).'),.new.InputOp |
61a80 | 74 69 6f 6e 28 27 69 6e 74 65 72 61 63 74 69 76 65 27 2c 20 27 69 27 2c 20 49 6e 70 75 74 4f 70 | tion('interactive',.'i',.InputOp |
61aa0 | 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 49 6e 74 65 72 61 63 74 69 76 65 20 69 | tion::VALUE_NONE,.'Interactive.i |
61ac0 | 6e 74 65 72 66 61 63 65 20 77 69 74 68 20 61 75 74 6f 63 6f 6d 70 6c 65 74 69 6f 6e 20 74 6f 20 | nterface.with.autocompletion.to. |
61ae0 | 73 65 6c 65 63 74 20 74 68 65 20 70 61 63 6b 61 67 65 73 20 74 6f 20 75 70 64 61 74 65 2e 27 29 | select.the.packages.to.update.') |
61b00 | 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 72 6f 6f 74 2d 72 65 71 73 27 2c 20 6e | ,.new.InputOption('root-reqs',.n |
61b20 | 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 52 | ull,.InputOption::VALUE_NONE,.'R |
61b40 | 65 73 74 72 69 63 74 73 20 74 68 65 20 75 70 64 61 74 65 20 74 6f 20 79 6f 75 72 20 66 69 72 73 | estricts.the.update.to.your.firs |
61b60 | 74 20 64 65 67 72 65 65 20 64 65 70 65 6e 64 65 6e 63 69 65 73 2e 27 29 2c 0a 5d 29 0a 2d 3e 73 | t.degree.dependencies.'),.]).->s |
61b80 | 65 74 48 65 6c 70 28 0a 3c 3c 3c 45 4f 54 0a 54 68 65 20 3c 69 6e 66 6f 3e 75 70 64 61 74 65 3c | etHelp(.<<<EOT.The.<info>update< |
61ba0 | 2f 69 6e 66 6f 3e 20 63 6f 6d 6d 61 6e 64 20 72 65 61 64 73 20 74 68 65 20 63 6f 6d 70 6f 73 65 | /info>.command.reads.the.compose |
61bc0 | 72 2e 6a 73 6f 6e 20 66 69 6c 65 20 66 72 6f 6d 20 74 68 65 0a 63 75 72 72 65 6e 74 20 64 69 72 | r.json.file.from.the.current.dir |
61be0 | 65 63 74 6f 72 79 2c 20 70 72 6f 63 65 73 73 65 73 20 69 74 2c 20 61 6e 64 20 75 70 64 61 74 65 | ectory,.processes.it,.and.update |
61c00 | 73 2c 20 72 65 6d 6f 76 65 73 20 6f 72 20 69 6e 73 74 61 6c 6c 73 20 61 6c 6c 20 74 68 65 0a 64 | s,.removes.or.installs.all.the.d |
61c20 | 65 70 65 6e 64 65 6e 63 69 65 73 2e 0a 0a 3c 69 6e 66 6f 3e 70 68 70 20 63 6f 6d 70 6f 73 65 72 | ependencies...<info>php.composer |
61c40 | 2e 70 68 61 72 20 75 70 64 61 74 65 3c 2f 69 6e 66 6f 3e 0a 0a 54 6f 20 6c 69 6d 69 74 20 74 68 | .phar.update</info>..To.limit.th |
61c60 | 65 20 75 70 64 61 74 65 20 6f 70 65 72 61 74 69 6f 6e 20 74 6f 20 61 20 66 65 77 20 70 61 63 6b | e.update.operation.to.a.few.pack |
61c80 | 61 67 65 73 2c 20 79 6f 75 20 63 61 6e 20 6c 69 73 74 20 74 68 65 20 70 61 63 6b 61 67 65 28 73 | ages,.you.can.list.the.package(s |
61ca0 | 29 0a 79 6f 75 20 77 61 6e 74 20 74 6f 20 75 70 64 61 74 65 20 61 73 20 73 75 63 68 3a 0a 0a 3c | ).you.want.to.update.as.such:..< |
61cc0 | 69 6e 66 6f 3e 70 68 70 20 63 6f 6d 70 6f 73 65 72 2e 70 68 61 72 20 75 70 64 61 74 65 20 76 65 | info>php.composer.phar.update.ve |
61ce0 | 6e 64 6f 72 2f 70 61 63 6b 61 67 65 31 20 66 6f 6f 2f 6d 79 70 61 63 6b 61 67 65 20 5b 2e 2e 2e | ndor/package1.foo/mypackage.[... |
61d00 | 5d 3c 2f 69 6e 66 6f 3e 0a 0a 59 6f 75 20 6d 61 79 20 61 6c 73 6f 20 75 73 65 20 61 6e 20 61 73 | ]</info>..You.may.also.use.an.as |
61d20 | 74 65 72 69 73 6b 20 28 2a 29 20 70 61 74 74 65 72 6e 20 74 6f 20 6c 69 6d 69 74 20 74 68 65 20 | terisk.(*).pattern.to.limit.the. |
61d40 | 75 70 64 61 74 65 20 6f 70 65 72 61 74 69 6f 6e 20 74 6f 20 70 61 63 6b 61 67 65 28 73 29 0a 66 | update.operation.to.package(s).f |
61d60 | 72 6f 6d 20 61 20 73 70 65 63 69 66 69 63 20 76 65 6e 64 6f 72 3a 0a 0a 3c 69 6e 66 6f 3e 70 68 | rom.a.specific.vendor:..<info>ph |
61d80 | 70 20 63 6f 6d 70 6f 73 65 72 2e 70 68 61 72 20 75 70 64 61 74 65 20 76 65 6e 64 6f 72 2f 70 61 | p.composer.phar.update.vendor/pa |
61da0 | 63 6b 61 67 65 31 20 66 6f 6f 2f 2a 20 5b 2e 2e 2e 5d 3c 2f 69 6e 66 6f 3e 0a 0a 54 6f 20 72 75 | ckage1.foo/*.[...]</info>..To.ru |
61dc0 | 6e 20 61 6e 20 75 70 64 61 74 65 20 77 69 74 68 20 6d 6f 72 65 20 72 65 73 74 72 69 63 74 69 76 | n.an.update.with.more.restrictiv |
61de0 | 65 20 63 6f 6e 73 74 72 61 69 6e 74 73 20 79 6f 75 20 63 61 6e 20 75 73 65 3a 0a 0a 3c 69 6e 66 | e.constraints.you.can.use:..<inf |
61e00 | 6f 3e 70 68 70 20 63 6f 6d 70 6f 73 65 72 2e 70 68 61 72 20 75 70 64 61 74 65 20 2d 2d 77 69 74 | o>php.composer.phar.update.--wit |
61e20 | 68 20 76 65 6e 64 6f 72 2f 70 61 63 6b 61 67 65 3a 31 2e 30 2e 2a 3c 2f 69 6e 66 6f 3e 0a 0a 54 | h.vendor/package:1.0.*</info>..T |
61e40 | 6f 20 72 75 6e 20 61 20 70 61 72 74 69 61 6c 20 75 70 64 61 74 65 20 77 69 74 68 20 6d 6f 72 65 | o.run.a.partial.update.with.more |
61e60 | 20 72 65 73 74 72 69 63 74 69 76 65 20 63 6f 6e 73 74 72 61 69 6e 74 73 20 79 6f 75 20 63 61 6e | .restrictive.constraints.you.can |
61e80 | 20 75 73 65 20 74 68 65 20 73 68 6f 72 74 68 61 6e 64 3a 0a 0a 3c 69 6e 66 6f 3e 70 68 70 20 63 | .use.the.shorthand:..<info>php.c |
61ea0 | 6f 6d 70 6f 73 65 72 2e 70 68 61 72 20 75 70 64 61 74 65 20 76 65 6e 64 6f 72 2f 70 61 63 6b 61 | omposer.phar.update.vendor/packa |
61ec0 | 67 65 3a 31 2e 30 2e 2a 3c 2f 69 6e 66 6f 3e 0a 0a 54 6f 20 73 65 6c 65 63 74 20 70 61 63 6b 61 | ge:1.0.*</info>..To.select.packa |
61ee0 | 67 65 73 20 6e 61 6d 65 73 20 69 6e 74 65 72 61 63 74 69 76 65 6c 79 20 77 69 74 68 20 61 75 74 | ges.names.interactively.with.aut |
61f00 | 6f 2d 63 6f 6d 70 6c 65 74 69 6f 6e 20 75 73 65 20 3c 69 6e 66 6f 3e 2d 69 3c 2f 69 6e 66 6f 3e | o-completion.use.<info>-i</info> |
61f20 | 2e 0a 0a 52 65 61 64 20 6d 6f 72 65 20 61 74 20 68 74 74 70 73 3a 2f 2f 67 65 74 63 6f 6d 70 6f | ...Read.more.at.https://getcompo |
61f40 | 73 65 72 2e 6f 72 67 2f 64 6f 63 2f 30 33 2d 63 6c 69 2e 6d 64 23 75 70 64 61 74 65 2d 75 0a 45 | ser.org/doc/03-cli.md#update-u.E |
61f60 | 4f 54 0a 29 0a 3b 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 65 78 65 | OT.).;.}..protected.function.exe |
61f80 | 63 75 74 65 28 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 69 6e 70 75 74 2c 20 4f 75 74 70 | cute(InputInterface.$input,.Outp |
61fa0 | 75 74 49 6e 74 65 72 66 61 63 65 20 24 6f 75 74 70 75 74 29 0a 7b 0a 24 69 6f 20 3d 20 24 74 68 | utInterface.$output).{.$io.=.$th |
61fc0 | 69 73 2d 3e 67 65 74 49 4f 28 29 3b 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 | is->getIO();.if.($input->getOpti |
61fe0 | 6f 6e 28 27 64 65 76 27 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 77 | on('dev')).{.$io->writeError('<w |
62000 | 61 72 6e 69 6e 67 3e 59 6f 75 20 61 72 65 20 75 73 69 6e 67 20 74 68 65 20 64 65 70 72 65 63 61 | arning>You.are.using.the.depreca |
62020 | 74 65 64 20 6f 70 74 69 6f 6e 20 22 2d 2d 64 65 76 22 2e 20 49 74 20 68 61 73 20 6e 6f 20 65 66 | ted.option."--dev"..It.has.no.ef |
62040 | 66 65 63 74 20 61 6e 64 20 77 69 6c 6c 20 62 72 65 61 6b 20 69 6e 20 43 6f 6d 70 6f 73 65 72 20 | fect.and.will.break.in.Composer. |
62060 | 33 2e 3c 2f 77 61 72 6e 69 6e 67 3e 27 29 3b 0a 7d 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 | 3.</warning>');.}.if.($input->ge |
62080 | 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 73 75 67 67 65 73 74 27 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 | tOption('no-suggest')).{.$io->wr |
620a0 | 69 74 65 45 72 72 6f 72 28 27 3c 77 61 72 6e 69 6e 67 3e 59 6f 75 20 61 72 65 20 75 73 69 6e 67 | iteError('<warning>You.are.using |
620c0 | 20 74 68 65 20 64 65 70 72 65 63 61 74 65 64 20 6f 70 74 69 6f 6e 20 22 2d 2d 6e 6f 2d 73 75 67 | .the.deprecated.option."--no-sug |
620e0 | 67 65 73 74 22 2e 20 49 74 20 68 61 73 20 6e 6f 20 65 66 66 65 63 74 20 61 6e 64 20 77 69 6c 6c | gest"..It.has.no.effect.and.will |
62100 | 20 62 72 65 61 6b 20 69 6e 20 43 6f 6d 70 6f 73 65 72 20 33 2e 3c 2f 77 61 72 6e 69 6e 67 3e 27 | .break.in.Composer.3.</warning>' |
62120 | 29 3b 0a 7d 0a 0a 24 63 6f 6d 70 6f 73 65 72 20 3d 20 24 74 68 69 73 2d 3e 72 65 71 75 69 72 65 | );.}..$composer.=.$this->require |
62140 | 43 6f 6d 70 6f 73 65 72 28 29 3b 0a 0a 69 66 20 28 21 48 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 | Composer();..if.(!HttpDownloader |
62160 | 3a 3a 69 73 43 75 72 6c 45 6e 61 62 6c 65 64 28 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 | ::isCurlEnabled()).{.$io->writeE |
62180 | 72 72 6f 72 28 27 3c 77 61 72 6e 69 6e 67 3e 43 6f 6d 70 6f 73 65 72 20 69 73 20 6f 70 65 72 61 | rror('<warning>Composer.is.opera |
621a0 | 74 69 6e 67 20 73 69 67 6e 69 66 69 63 61 6e 74 6c 79 20 73 6c 6f 77 65 72 20 74 68 61 6e 20 6e | ting.significantly.slower.than.n |
621c0 | 6f 72 6d 61 6c 20 62 65 63 61 75 73 65 20 79 6f 75 20 64 6f 20 6e 6f 74 20 68 61 76 65 20 74 68 | ormal.because.you.do.not.have.th |
621e0 | 65 20 50 48 50 20 63 75 72 6c 20 65 78 74 65 6e 73 69 6f 6e 20 65 6e 61 62 6c 65 64 2e 3c 2f 77 | e.PHP.curl.extension.enabled.</w |
62200 | 61 72 6e 69 6e 67 3e 27 29 3b 0a 7d 0a 0a 24 70 61 63 6b 61 67 65 73 20 3d 20 24 69 6e 70 75 74 | arning>');.}..$packages.=.$input |
62220 | 2d 3e 67 65 74 41 72 67 75 6d 65 6e 74 28 27 70 61 63 6b 61 67 65 73 27 29 3b 0a 24 72 65 71 73 | ->getArgument('packages');.$reqs |
62240 | 20 3d 20 24 74 68 69 73 2d 3e 66 6f 72 6d 61 74 52 65 71 75 69 72 65 6d 65 6e 74 73 28 24 69 6e | .=.$this->formatRequirements($in |
62260 | 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 77 69 74 68 27 29 29 3b 0a 0a 0a 69 66 20 28 63 | put->getOption('with'));...if.(c |
62280 | 6f 75 6e 74 28 24 70 61 63 6b 61 67 65 73 29 20 3e 20 30 29 20 7b 0a 24 61 6c 6c 6f 77 6c 69 73 | ount($packages).>.0).{.$allowlis |
622a0 | 74 50 61 63 6b 61 67 65 73 57 69 74 68 52 65 71 75 69 72 65 6d 65 6e 74 73 20 3d 20 61 72 72 61 | tPackagesWithRequirements.=.arra |
622c0 | 79 5f 66 69 6c 74 65 72 28 24 70 61 63 6b 61 67 65 73 2c 20 73 74 61 74 69 63 20 66 75 6e 63 74 | y_filter($packages,.static.funct |
622e0 | 69 6f 6e 20 28 24 70 6b 67 29 3a 20 62 6f 6f 6c 20 7b 0a 72 65 74 75 72 6e 20 50 72 65 67 3a 3a | ion.($pkg):.bool.{.return.Preg:: |
62300 | 69 73 4d 61 74 63 68 28 27 7b 5c 53 2b 5b 20 3d 3a 5d 5c 53 2b 7d 27 2c 20 24 70 6b 67 29 3b 0a | isMatch('{\S+[.=:]\S+}',.$pkg);. |
62320 | 7d 29 3b 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 66 6f 72 6d 61 74 52 65 71 75 69 72 | });.foreach.($this->formatRequir |
62340 | 65 6d 65 6e 74 73 28 24 61 6c 6c 6f 77 6c 69 73 74 50 61 63 6b 61 67 65 73 57 69 74 68 52 65 71 | ements($allowlistPackagesWithReq |
62360 | 75 69 72 65 6d 65 6e 74 73 29 20 61 73 20 24 70 61 63 6b 61 67 65 20 3d 3e 20 24 63 6f 6e 73 74 | uirements).as.$package.=>.$const |
62380 | 72 61 69 6e 74 29 20 7b 0a 24 72 65 71 73 5b 24 70 61 63 6b 61 67 65 5d 20 3d 20 24 63 6f 6e 73 | raint).{.$reqs[$package].=.$cons |
623a0 | 74 72 61 69 6e 74 3b 0a 7d 0a 0a 0a 66 6f 72 65 61 63 68 20 28 24 61 6c 6c 6f 77 6c 69 73 74 50 | traint;.}...foreach.($allowlistP |
623c0 | 61 63 6b 61 67 65 73 57 69 74 68 52 65 71 75 69 72 65 6d 65 6e 74 73 20 61 73 20 24 70 61 63 6b | ackagesWithRequirements.as.$pack |
623e0 | 61 67 65 29 20 7b 0a 24 70 61 63 6b 61 67 65 4e 61 6d 65 20 3d 20 50 72 65 67 3a 3a 72 65 70 6c | age).{.$packageName.=.Preg::repl |
62400 | 61 63 65 28 27 7b 5e 28 5b 5e 20 3d 3a 5d 2b 29 5b 20 3d 3a 5d 2e 2a 24 7d 27 2c 20 27 24 31 27 | ace('{^([^.=:]+)[.=:].*$}',.'$1' |
62420 | 2c 20 24 70 61 63 6b 61 67 65 29 3b 0a 24 69 6e 64 65 78 20 3d 20 61 72 72 61 79 5f 73 65 61 72 | ,.$package);.$index.=.array_sear |
62440 | 63 68 28 24 70 61 63 6b 61 67 65 2c 20 24 70 61 63 6b 61 67 65 73 29 3b 0a 24 70 61 63 6b 61 67 | ch($package,.$packages);.$packag |
62460 | 65 73 5b 24 69 6e 64 65 78 5d 20 3d 20 24 70 61 63 6b 61 67 65 4e 61 6d 65 3b 0a 7d 0a 7d 0a 0a | es[$index].=.$packageName;.}.}.. |
62480 | 24 70 61 72 73 65 72 20 3d 20 6e 65 77 20 56 65 72 73 69 6f 6e 50 61 72 73 65 72 3b 0a 24 74 65 | $parser.=.new.VersionParser;.$te |
624a0 | 6d 70 6f 72 61 72 79 43 6f 6e 73 74 72 61 69 6e 74 73 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 | mporaryConstraints.=.[];.foreach |
624c0 | 20 28 24 72 65 71 73 20 61 73 20 24 70 61 63 6b 61 67 65 20 3d 3e 20 24 63 6f 6e 73 74 72 61 69 | .($reqs.as.$package.=>.$constrai |
624e0 | 6e 74 29 20 7b 0a 24 74 65 6d 70 6f 72 61 72 79 43 6f 6e 73 74 72 61 69 6e 74 73 5b 73 74 72 74 | nt).{.$temporaryConstraints[strt |
62500 | 6f 6c 6f 77 65 72 28 24 70 61 63 6b 61 67 65 29 5d 20 3d 20 24 70 61 72 73 65 72 2d 3e 70 61 72 | olower($package)].=.$parser->par |
62520 | 73 65 43 6f 6e 73 74 72 61 69 6e 74 73 28 24 63 6f 6e 73 74 72 61 69 6e 74 29 3b 0a 7d 0a 0a 24 | seConstraints($constraint);.}..$ |
62540 | 72 6f 6f 74 50 61 63 6b 61 67 65 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 50 61 63 6b | rootPackage.=.$composer->getPack |
62560 | 61 67 65 28 29 3b 0a 24 72 6f 6f 74 50 61 63 6b 61 67 65 2d 3e 73 65 74 52 65 66 65 72 65 6e 63 | age();.$rootPackage->setReferenc |
62580 | 65 73 28 52 6f 6f 74 50 61 63 6b 61 67 65 4c 6f 61 64 65 72 3a 3a 65 78 74 72 61 63 74 52 65 66 | es(RootPackageLoader::extractRef |
625a0 | 65 72 65 6e 63 65 73 28 24 72 65 71 73 2c 20 24 72 6f 6f 74 50 61 63 6b 61 67 65 2d 3e 67 65 74 | erences($reqs,.$rootPackage->get |
625c0 | 52 65 66 65 72 65 6e 63 65 73 28 29 29 29 3b 0a 24 72 6f 6f 74 50 61 63 6b 61 67 65 2d 3e 73 65 | References()));.$rootPackage->se |
625e0 | 74 53 74 61 62 69 6c 69 74 79 46 6c 61 67 73 28 52 6f 6f 74 50 61 63 6b 61 67 65 4c 6f 61 64 65 | tStabilityFlags(RootPackageLoade |
62600 | 72 3a 3a 65 78 74 72 61 63 74 53 74 61 62 69 6c 69 74 79 46 6c 61 67 73 28 24 72 65 71 73 2c 20 | r::extractStabilityFlags($reqs,. |
62620 | 24 72 6f 6f 74 50 61 63 6b 61 67 65 2d 3e 67 65 74 4d 69 6e 69 6d 75 6d 53 74 61 62 69 6c 69 74 | $rootPackage->getMinimumStabilit |
62640 | 79 28 29 2c 20 24 72 6f 6f 74 50 61 63 6b 61 67 65 2d 3e 67 65 74 53 74 61 62 69 6c 69 74 79 46 | y(),.$rootPackage->getStabilityF |
62660 | 6c 61 67 73 28 29 29 29 3b 0a 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e | lags()));..if.($input->getOption |
62680 | 28 27 69 6e 74 65 72 61 63 74 69 76 65 27 29 29 20 7b 0a 24 70 61 63 6b 61 67 65 73 20 3d 20 24 | ('interactive')).{.$packages.=.$ |
626a0 | 74 68 69 73 2d 3e 67 65 74 50 61 63 6b 61 67 65 73 49 6e 74 65 72 61 63 74 69 76 65 6c 79 28 24 | this->getPackagesInteractively($ |
626c0 | 69 6f 2c 20 24 69 6e 70 75 74 2c 20 24 6f 75 74 70 75 74 2c 20 24 63 6f 6d 70 6f 73 65 72 2c 20 | io,.$input,.$output,.$composer,. |
626e0 | 24 70 61 63 6b 61 67 65 73 29 3b 0a 7d 0a 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 | $packages);.}..if.($input->getOp |
62700 | 74 69 6f 6e 28 27 72 6f 6f 74 2d 72 65 71 73 27 29 29 20 7b 0a 24 72 65 71 75 69 72 65 73 20 3d | tion('root-reqs')).{.$requires.= |
62720 | 20 61 72 72 61 79 5f 6b 65 79 73 28 24 72 6f 6f 74 50 61 63 6b 61 67 65 2d 3e 67 65 74 52 65 71 | .array_keys($rootPackage->getReq |
62740 | 75 69 72 65 73 28 29 29 3b 0a 69 66 20 28 21 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e | uires());.if.(!$input->getOption |
62760 | 28 27 6e 6f 2d 64 65 76 27 29 29 20 7b 0a 24 72 65 71 75 69 72 65 73 20 3d 20 61 72 72 61 79 5f | ('no-dev')).{.$requires.=.array_ |
62780 | 6d 65 72 67 65 28 24 72 65 71 75 69 72 65 73 2c 20 61 72 72 61 79 5f 6b 65 79 73 28 24 72 6f 6f | merge($requires,.array_keys($roo |
627a0 | 74 50 61 63 6b 61 67 65 2d 3e 67 65 74 44 65 76 52 65 71 75 69 72 65 73 28 29 29 29 3b 0a 7d 0a | tPackage->getDevRequires()));.}. |
627c0 | 0a 69 66 20 28 21 65 6d 70 74 79 28 24 70 61 63 6b 61 67 65 73 29 29 20 7b 0a 24 70 61 63 6b 61 | .if.(!empty($packages)).{.$packa |
627e0 | 67 65 73 20 3d 20 61 72 72 61 79 5f 69 6e 74 65 72 73 65 63 74 28 24 70 61 63 6b 61 67 65 73 2c | ges.=.array_intersect($packages, |
62800 | 20 24 72 65 71 75 69 72 65 73 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 70 61 63 6b 61 67 65 73 20 | .$requires);.}.else.{.$packages. |
62820 | 3d 20 24 72 65 71 75 69 72 65 73 3b 0a 7d 0a 7d 0a 0a 0a 0a 24 66 69 6c 74 65 72 65 64 50 61 63 | =.$requires;.}.}....$filteredPac |
62840 | 6b 61 67 65 73 20 3d 20 61 72 72 61 79 5f 66 69 6c 74 65 72 28 24 70 61 63 6b 61 67 65 73 2c 20 | kages.=.array_filter($packages,. |
62860 | 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 70 61 63 6b 61 67 65 29 3a 20 62 6f 6f 6c | static.function.($package):.bool |
62880 | 20 7b 0a 72 65 74 75 72 6e 20 21 69 6e 5f 61 72 72 61 79 28 24 70 61 63 6b 61 67 65 2c 20 5b 27 | .{.return.!in_array($package,.[' |
628a0 | 6c 6f 63 6b 27 2c 20 27 6e 6f 74 68 69 6e 67 27 2c 20 27 6d 69 72 72 6f 72 73 27 5d 2c 20 74 72 | lock',.'nothing',.'mirrors'],.tr |
628c0 | 75 65 29 3b 0a 7d 29 3b 0a 24 75 70 64 61 74 65 4d 69 72 72 6f 72 73 20 3d 20 24 69 6e 70 75 74 | ue);.});.$updateMirrors.=.$input |
628e0 | 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6c 6f 63 6b 27 29 20 7c 7c 20 63 6f 75 6e 74 28 24 66 69 | ->getOption('lock').||.count($fi |
62900 | 6c 74 65 72 65 64 50 61 63 6b 61 67 65 73 29 20 21 3d 3d 20 63 6f 75 6e 74 28 24 70 61 63 6b 61 | lteredPackages).!==.count($packa |
62920 | 67 65 73 29 3b 0a 24 70 61 63 6b 61 67 65 73 20 3d 20 24 66 69 6c 74 65 72 65 64 50 61 63 6b 61 | ges);.$packages.=.$filteredPacka |
62940 | 67 65 73 3b 0a 0a 69 66 20 28 24 75 70 64 61 74 65 4d 69 72 72 6f 72 73 20 26 26 20 21 65 6d 70 | ges;..if.($updateMirrors.&&.!emp |
62960 | 74 79 28 24 70 61 63 6b 61 67 65 73 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 | ty($packages)).{.$io->writeError |
62980 | 28 27 3c 65 72 72 6f 72 3e 59 6f 75 20 63 61 6e 6e 6f 74 20 73 69 6d 75 6c 74 61 6e 65 6f 75 73 | ('<error>You.cannot.simultaneous |
629a0 | 6c 79 20 75 70 64 61 74 65 20 6f 6e 6c 79 20 61 20 73 65 6c 65 63 74 69 6f 6e 20 6f 66 20 70 61 | ly.update.only.a.selection.of.pa |
629c0 | 63 6b 61 67 65 73 20 61 6e 64 20 72 65 67 65 6e 65 72 61 74 65 20 74 68 65 20 6c 6f 63 6b 20 66 | ckages.and.regenerate.the.lock.f |
629e0 | 69 6c 65 20 6d 65 74 61 64 61 74 61 2e 3c 2f 65 72 72 6f 72 3e 27 29 3b 0a 0a 72 65 74 75 72 6e | ile.metadata.</error>');..return |
62a00 | 20 2d 31 3b 0a 7d 0a 0a 24 63 6f 6d 6d 61 6e 64 45 76 65 6e 74 20 3d 20 6e 65 77 20 43 6f 6d 6d | .-1;.}..$commandEvent.=.new.Comm |
62a20 | 61 6e 64 45 76 65 6e 74 28 50 6c 75 67 69 6e 45 76 65 6e 74 73 3a 3a 43 4f 4d 4d 41 4e 44 2c 20 | andEvent(PluginEvents::COMMAND,. |
62a40 | 27 75 70 64 61 74 65 27 2c 20 24 69 6e 70 75 74 2c 20 24 6f 75 74 70 75 74 29 3b 0a 24 63 6f 6d | 'update',.$input,.$output);.$com |
62a60 | 70 6f 73 65 72 2d 3e 67 65 74 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 28 29 2d 3e 64 69 73 | poser->getEventDispatcher()->dis |
62a80 | 70 61 74 63 68 28 24 63 6f 6d 6d 61 6e 64 45 76 65 6e 74 2d 3e 67 65 74 4e 61 6d 65 28 29 2c 20 | patch($commandEvent->getName(),. |
62aa0 | 24 63 6f 6d 6d 61 6e 64 45 76 65 6e 74 29 3b 0a 0a 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 49 | $commandEvent);..$composer->getI |
62ac0 | 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 72 28 29 2d 3e 73 65 74 4f 75 74 70 75 74 50 | nstallationManager()->setOutputP |
62ae0 | 72 6f 67 72 65 73 73 28 21 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 70 | rogress(!$input->getOption('no-p |
62b00 | 72 6f 67 72 65 73 73 27 29 29 3b 0a 0a 24 69 6e 73 74 61 6c 6c 20 3d 20 49 6e 73 74 61 6c 6c 65 | rogress'));..$install.=.Installe |
62b20 | 72 3a 3a 63 72 65 61 74 65 28 24 69 6f 2c 20 24 63 6f 6d 70 6f 73 65 72 29 3b 0a 0a 24 63 6f 6e | r::create($io,.$composer);..$con |
62b40 | 66 69 67 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 43 6f 6e 66 69 67 28 29 3b 0a 5b 24 | fig.=.$composer->getConfig();.[$ |
62b60 | 70 72 65 66 65 72 53 6f 75 72 63 65 2c 20 24 70 72 65 66 65 72 44 69 73 74 5d 20 3d 20 24 74 68 | preferSource,.$preferDist].=.$th |
62b80 | 69 73 2d 3e 67 65 74 50 72 65 66 65 72 72 65 64 49 6e 73 74 61 6c 6c 4f 70 74 69 6f 6e 73 28 24 | is->getPreferredInstallOptions($ |
62ba0 | 63 6f 6e 66 69 67 2c 20 24 69 6e 70 75 74 29 3b 0a 0a 24 6f 70 74 69 6d 69 7a 65 20 3d 20 24 69 | config,.$input);..$optimize.=.$i |
62bc0 | 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6f 70 74 69 6d 69 7a 65 2d 61 75 74 6f 6c 6f | nput->getOption('optimize-autolo |
62be0 | 61 64 65 72 27 29 20 7c 7c 20 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 6f 70 74 69 6d 69 7a 65 | ader').||.$config->get('optimize |
62c00 | 2d 61 75 74 6f 6c 6f 61 64 65 72 27 29 3b 0a 24 61 75 74 68 6f 72 69 74 61 74 69 76 65 20 3d 20 | -autoloader');.$authoritative.=. |
62c20 | 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 63 6c 61 73 73 6d 61 70 2d 61 75 74 68 | $input->getOption('classmap-auth |
62c40 | 6f 72 69 74 61 74 69 76 65 27 29 20 7c 7c 20 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 63 6c 61 | oritative').||.$config->get('cla |
62c60 | 73 73 6d 61 70 2d 61 75 74 68 6f 72 69 74 61 74 69 76 65 27 29 3b 0a 24 61 70 63 75 50 72 65 66 | ssmap-authoritative');.$apcuPref |
62c80 | 69 78 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 61 70 63 75 2d 61 75 74 | ix.=.$input->getOption('apcu-aut |
62ca0 | 6f 6c 6f 61 64 65 72 2d 70 72 65 66 69 78 27 29 3b 0a 24 61 70 63 75 20 3d 20 24 61 70 63 75 50 | oloader-prefix');.$apcu.=.$apcuP |
62cc0 | 72 65 66 69 78 20 21 3d 3d 20 6e 75 6c 6c 20 7c 7c 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 | refix.!==.null.||.$input->getOpt |
62ce0 | 69 6f 6e 28 27 61 70 63 75 2d 61 75 74 6f 6c 6f 61 64 65 72 27 29 20 7c 7c 20 24 63 6f 6e 66 69 | ion('apcu-autoloader').||.$confi |
62d00 | 67 2d 3e 67 65 74 28 27 61 70 63 75 2d 61 75 74 6f 6c 6f 61 64 65 72 27 29 3b 0a 0a 24 75 70 64 | g->get('apcu-autoloader');..$upd |
62d20 | 61 74 65 41 6c 6c 6f 77 54 72 61 6e 73 69 74 69 76 65 44 65 70 65 6e 64 65 6e 63 69 65 73 20 3d | ateAllowTransitiveDependencies.= |
62d40 | 20 52 65 71 75 65 73 74 3a 3a 55 50 44 41 54 45 5f 4f 4e 4c 59 5f 4c 49 53 54 45 44 3b 0a 69 66 | .Request::UPDATE_ONLY_LISTED;.if |
62d60 | 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 77 69 74 68 2d 61 6c 6c 2d 64 65 | .($input->getOption('with-all-de |
62d80 | 70 65 6e 64 65 6e 63 69 65 73 27 29 29 20 7b 0a 24 75 70 64 61 74 65 41 6c 6c 6f 77 54 72 61 6e | pendencies')).{.$updateAllowTran |
62da0 | 73 69 74 69 76 65 44 65 70 65 6e 64 65 6e 63 69 65 73 20 3d 20 52 65 71 75 65 73 74 3a 3a 55 50 | sitiveDependencies.=.Request::UP |
62dc0 | 44 41 54 45 5f 4c 49 53 54 45 44 5f 57 49 54 48 5f 54 52 41 4e 53 49 54 49 56 45 5f 44 45 50 53 | DATE_LISTED_WITH_TRANSITIVE_DEPS |
62de0 | 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 77 | ;.}.elseif.($input->getOption('w |
62e00 | 69 74 68 2d 64 65 70 65 6e 64 65 6e 63 69 65 73 27 29 29 20 7b 0a 24 75 70 64 61 74 65 41 6c 6c | ith-dependencies')).{.$updateAll |
62e20 | 6f 77 54 72 61 6e 73 69 74 69 76 65 44 65 70 65 6e 64 65 6e 63 69 65 73 20 3d 20 52 65 71 75 65 | owTransitiveDependencies.=.Reque |
62e40 | 73 74 3a 3a 55 50 44 41 54 45 5f 4c 49 53 54 45 44 5f 57 49 54 48 5f 54 52 41 4e 53 49 54 49 56 | st::UPDATE_LISTED_WITH_TRANSITIV |
62e60 | 45 5f 44 45 50 53 5f 4e 4f 5f 52 4f 4f 54 5f 52 45 51 55 49 52 45 3b 0a 7d 0a 0a 24 69 6e 73 74 | E_DEPS_NO_ROOT_REQUIRE;.}..$inst |
62e80 | 61 6c 6c 0a 2d 3e 73 65 74 44 72 79 52 75 6e 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f | all.->setDryRun($input->getOptio |
62ea0 | 6e 28 27 64 72 79 2d 72 75 6e 27 29 29 0a 2d 3e 73 65 74 56 65 72 62 6f 73 65 28 24 69 6e 70 75 | n('dry-run')).->setVerbose($inpu |
62ec0 | 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 76 65 72 62 6f 73 65 27 29 29 0a 2d 3e 73 65 74 50 72 | t->getOption('verbose')).->setPr |
62ee0 | 65 66 65 72 53 6f 75 72 63 65 28 24 70 72 65 66 65 72 53 6f 75 72 63 65 29 0a 2d 3e 73 65 74 50 | eferSource($preferSource).->setP |
62f00 | 72 65 66 65 72 44 69 73 74 28 24 70 72 65 66 65 72 44 69 73 74 29 0a 2d 3e 73 65 74 44 65 76 4d | referDist($preferDist).->setDevM |
62f20 | 6f 64 65 28 21 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 64 65 76 27 29 | ode(!$input->getOption('no-dev') |
62f40 | 29 0a 2d 3e 73 65 74 44 75 6d 70 41 75 74 6f 6c 6f 61 64 65 72 28 21 24 69 6e 70 75 74 2d 3e 67 | ).->setDumpAutoloader(!$input->g |
62f60 | 65 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 61 75 74 6f 6c 6f 61 64 65 72 27 29 29 0a 2d 3e 73 65 74 | etOption('no-autoloader')).->set |
62f80 | 4f 70 74 69 6d 69 7a 65 41 75 74 6f 6c 6f 61 64 65 72 28 24 6f 70 74 69 6d 69 7a 65 29 0a 2d 3e | OptimizeAutoloader($optimize).-> |
62fa0 | 73 65 74 43 6c 61 73 73 4d 61 70 41 75 74 68 6f 72 69 74 61 74 69 76 65 28 24 61 75 74 68 6f 72 | setClassMapAuthoritative($author |
62fc0 | 69 74 61 74 69 76 65 29 0a 2d 3e 73 65 74 41 70 63 75 41 75 74 6f 6c 6f 61 64 65 72 28 24 61 70 | itative).->setApcuAutoloader($ap |
62fe0 | 63 75 2c 20 24 61 70 63 75 50 72 65 66 69 78 29 0a 2d 3e 73 65 74 55 70 64 61 74 65 28 74 72 75 | cu,.$apcuPrefix).->setUpdate(tru |
63000 | 65 29 0a 2d 3e 73 65 74 49 6e 73 74 61 6c 6c 28 21 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 | e).->setInstall(!$input->getOpti |
63020 | 6f 6e 28 27 6e 6f 2d 69 6e 73 74 61 6c 6c 27 29 29 0a 2d 3e 73 65 74 55 70 64 61 74 65 4d 69 72 | on('no-install')).->setUpdateMir |
63040 | 72 6f 72 73 28 24 75 70 64 61 74 65 4d 69 72 72 6f 72 73 29 0a 2d 3e 73 65 74 55 70 64 61 74 65 | rors($updateMirrors).->setUpdate |
63060 | 41 6c 6c 6f 77 4c 69 73 74 28 24 70 61 63 6b 61 67 65 73 29 0a 2d 3e 73 65 74 55 70 64 61 74 65 | AllowList($packages).->setUpdate |
63080 | 41 6c 6c 6f 77 54 72 61 6e 73 69 74 69 76 65 44 65 70 65 6e 64 65 6e 63 69 65 73 28 24 75 70 64 | AllowTransitiveDependencies($upd |
630a0 | 61 74 65 41 6c 6c 6f 77 54 72 61 6e 73 69 74 69 76 65 44 65 70 65 6e 64 65 6e 63 69 65 73 29 0a | ateAllowTransitiveDependencies). |
630c0 | 2d 3e 73 65 74 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 28 24 | ->setPlatformRequirementFilter($ |
630e0 | 74 68 69 73 2d 3e 67 65 74 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 | this->getPlatformRequirementFilt |
63100 | 65 72 28 24 69 6e 70 75 74 29 29 0a 2d 3e 73 65 74 50 72 65 66 65 72 53 74 61 62 6c 65 28 24 69 | er($input)).->setPreferStable($i |
63120 | 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 70 72 65 66 65 72 2d 73 74 61 62 6c 65 27 29 | nput->getOption('prefer-stable') |
63140 | 29 0a 2d 3e 73 65 74 50 72 65 66 65 72 4c 6f 77 65 73 74 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f | ).->setPreferLowest($input->getO |
63160 | 70 74 69 6f 6e 28 27 70 72 65 66 65 72 2d 6c 6f 77 65 73 74 27 29 29 0a 2d 3e 73 65 74 54 65 6d | ption('prefer-lowest')).->setTem |
63180 | 70 6f 72 61 72 79 43 6f 6e 73 74 72 61 69 6e 74 73 28 24 74 65 6d 70 6f 72 61 72 79 43 6f 6e 73 | poraryConstraints($temporaryCons |
631a0 | 74 72 61 69 6e 74 73 29 0a 2d 3e 73 65 74 41 75 64 69 74 28 21 24 69 6e 70 75 74 2d 3e 67 65 74 | traints).->setAudit(!$input->get |
631c0 | 4f 70 74 69 6f 6e 28 27 6e 6f 2d 61 75 64 69 74 27 29 29 0a 2d 3e 73 65 74 41 75 64 69 74 46 6f | Option('no-audit')).->setAuditFo |
631e0 | 72 6d 61 74 28 24 74 68 69 73 2d 3e 67 65 74 41 75 64 69 74 46 6f 72 6d 61 74 28 24 69 6e 70 75 | rmat($this->getAuditFormat($inpu |
63200 | 74 29 29 0a 3b 0a 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6e 6f | t)).;..if.($input->getOption('no |
63220 | 2d 70 6c 75 67 69 6e 73 27 29 29 20 7b 0a 24 69 6e 73 74 61 6c 6c 2d 3e 64 69 73 61 62 6c 65 50 | -plugins')).{.$install->disableP |
63240 | 6c 75 67 69 6e 73 28 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 69 6e 73 74 61 6c 6c 2d 3e 72 75 | lugins();.}..return.$install->ru |
63260 | 6e 28 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 | n();.}......private.function.get |
63280 | 50 61 63 6b 61 67 65 73 49 6e 74 65 72 61 63 74 69 76 65 6c 79 28 49 4f 49 6e 74 65 72 66 61 63 | PackagesInteractively(IOInterfac |
632a0 | 65 20 24 69 6f 2c 20 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 69 6e 70 75 74 2c 20 4f 75 | e.$io,.InputInterface.$input,.Ou |
632c0 | 74 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 6f 75 74 70 75 74 2c 20 43 6f 6d 70 6f 73 65 72 20 | tputInterface.$output,.Composer. |
632e0 | 24 63 6f 6d 70 6f 73 65 72 2c 20 61 72 72 61 79 20 24 70 61 63 6b 61 67 65 73 29 3a 20 61 72 72 | $composer,.array.$packages):.arr |
63300 | 61 79 0a 7b 0a 69 66 20 28 21 24 69 6e 70 75 74 2d 3e 69 73 49 6e 74 65 72 61 63 74 69 76 65 28 | ay.{.if.(!$input->isInteractive( |
63320 | 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 | )).{.throw.new.\InvalidArgumentE |
63340 | 78 63 65 70 74 69 6f 6e 28 27 2d 2d 69 6e 74 65 72 61 63 74 69 76 65 20 63 61 6e 6e 6f 74 20 62 | xception('--interactive.cannot.b |
63360 | 65 20 75 73 65 64 20 69 6e 20 6e 6f 6e 2d 69 6e 74 65 72 61 63 74 69 76 65 20 74 65 72 6d 69 6e | e.used.in.non-interactive.termin |
63380 | 61 6c 73 2e 27 29 3b 0a 7d 0a 0a 24 72 65 71 75 69 72 65 73 20 3d 20 61 72 72 61 79 5f 6d 65 72 | als.');.}..$requires.=.array_mer |
633a0 | 67 65 28 0a 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 50 61 63 6b 61 67 65 28 29 2d 3e 67 65 74 | ge(.$composer->getPackage()->get |
633c0 | 52 65 71 75 69 72 65 73 28 29 2c 0a 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 50 61 63 6b 61 67 | Requires(),.$composer->getPackag |
633e0 | 65 28 29 2d 3e 67 65 74 44 65 76 52 65 71 75 69 72 65 73 28 29 0a 29 3b 0a 24 61 75 74 6f 63 6f | e()->getDevRequires().);.$autoco |
63400 | 6d 70 6c 65 74 65 72 56 61 6c 75 65 73 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 72 65 | mpleterValues.=.[];.foreach.($re |
63420 | 71 75 69 72 65 73 20 61 73 20 24 72 65 71 75 69 72 65 29 20 7b 0a 24 74 61 72 67 65 74 20 3d 20 | quires.as.$require).{.$target.=. |
63440 | 24 72 65 71 75 69 72 65 2d 3e 67 65 74 54 61 72 67 65 74 28 29 3b 0a 24 61 75 74 6f 63 6f 6d 70 | $require->getTarget();.$autocomp |
63460 | 6c 65 74 65 72 56 61 6c 75 65 73 5b 73 74 72 74 6f 6c 6f 77 65 72 28 24 74 61 72 67 65 74 29 5d | leterValues[strtolower($target)] |
63480 | 20 3d 20 24 74 61 72 67 65 74 3b 0a 7d 0a 0a 24 69 6e 73 74 61 6c 6c 65 64 50 61 63 6b 61 67 65 | .=.$target;.}..$installedPackage |
634a0 | 73 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 79 4d 61 6e 61 | s.=.$composer->getRepositoryMana |
634c0 | 67 65 72 28 29 2d 3e 67 65 74 4c 6f 63 61 6c 52 65 70 6f 73 69 74 6f 72 79 28 29 2d 3e 67 65 74 | ger()->getLocalRepository()->get |
634e0 | 50 61 63 6b 61 67 65 73 28 29 3b 0a 66 6f 72 65 61 63 68 20 28 24 69 6e 73 74 61 6c 6c 65 64 50 | Packages();.foreach.($installedP |
63500 | 61 63 6b 61 67 65 73 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 24 61 75 74 6f 63 6f 6d 70 | ackages.as.$package).{.$autocomp |
63520 | 6c 65 74 65 72 56 61 6c 75 65 73 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 5d | leterValues[$package->getName()] |
63540 | 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 4e 61 6d 65 28 29 3b 0a 7d 0a | .=.$package->getPrettyName();.}. |
63560 | 0a 24 68 65 6c 70 65 72 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 48 65 6c 70 65 72 28 27 71 75 65 | .$helper.=.$this->getHelper('que |
63580 | 73 74 69 6f 6e 27 29 3b 0a 24 71 75 65 73 74 69 6f 6e 20 3d 20 6e 65 77 20 51 75 65 73 74 69 6f | stion');.$question.=.new.Questio |
635a0 | 6e 28 27 3c 63 6f 6d 6d 65 6e 74 3e 45 6e 74 65 72 20 70 61 63 6b 61 67 65 20 6e 61 6d 65 3a 20 | n('<comment>Enter.package.name:. |
635c0 | 3c 2f 63 6f 6d 6d 65 6e 74 3e 27 2c 20 6e 75 6c 6c 29 3b 0a 0a 24 69 6f 2d 3e 77 72 69 74 65 45 | </comment>',.null);..$io->writeE |
635e0 | 72 72 6f 72 28 27 3c 69 6e 66 6f 3e 50 72 65 73 73 20 65 6e 74 65 72 20 77 69 74 68 6f 75 74 20 | rror('<info>Press.enter.without. |
63600 | 76 61 6c 75 65 20 74 6f 20 65 6e 64 20 73 75 62 6d 69 73 73 69 6f 6e 3c 2f 69 6e 66 6f 3e 27 29 | value.to.end.submission</info>') |
63620 | 3b 0a 0a 64 6f 20 7b 0a 24 61 75 74 6f 63 6f 6d 70 6c 65 74 65 72 56 61 6c 75 65 73 20 3d 20 61 | ;..do.{.$autocompleterValues.=.a |
63640 | 72 72 61 79 5f 64 69 66 66 28 24 61 75 74 6f 63 6f 6d 70 6c 65 74 65 72 56 61 6c 75 65 73 2c 20 | rray_diff($autocompleterValues,. |
63660 | 24 70 61 63 6b 61 67 65 73 29 3b 0a 24 71 75 65 73 74 69 6f 6e 2d 3e 73 65 74 41 75 74 6f 63 6f | $packages);.$question->setAutoco |
63680 | 6d 70 6c 65 74 65 72 56 61 6c 75 65 73 28 24 61 75 74 6f 63 6f 6d 70 6c 65 74 65 72 56 61 6c 75 | mpleterValues($autocompleterValu |
636a0 | 65 73 29 3b 0a 24 61 64 64 65 64 50 61 63 6b 61 67 65 20 3d 20 24 68 65 6c 70 65 72 2d 3e 61 73 | es);.$addedPackage.=.$helper->as |
636c0 | 6b 28 24 69 6e 70 75 74 2c 20 24 6f 75 74 70 75 74 2c 20 24 71 75 65 73 74 69 6f 6e 29 3b 0a 0a | k($input,.$output,.$question);.. |
636e0 | 69 66 20 28 21 69 73 5f 73 74 72 69 6e 67 28 24 61 64 64 65 64 50 61 63 6b 61 67 65 29 20 7c 7c | if.(!is_string($addedPackage).|| |
63700 | 20 65 6d 70 74 79 28 24 61 64 64 65 64 50 61 63 6b 61 67 65 29 29 20 7b 0a 62 72 65 61 6b 3b 0a | .empty($addedPackage)).{.break;. |
63720 | 7d 0a 0a 24 61 64 64 65 64 50 61 63 6b 61 67 65 20 3d 20 73 74 72 74 6f 6c 6f 77 65 72 28 24 61 | }..$addedPackage.=.strtolower($a |
63740 | 64 64 65 64 50 61 63 6b 61 67 65 29 3b 0a 69 66 20 28 21 69 6e 5f 61 72 72 61 79 28 24 61 64 64 | ddedPackage);.if.(!in_array($add |
63760 | 65 64 50 61 63 6b 61 67 65 2c 20 24 70 61 63 6b 61 67 65 73 29 29 20 7b 0a 24 70 61 63 6b 61 67 | edPackage,.$packages)).{.$packag |
63780 | 65 73 5b 5d 20 3d 20 24 61 64 64 65 64 50 61 63 6b 61 67 65 3b 0a 7d 0a 7d 20 77 68 69 6c 65 20 | es[].=.$addedPackage;.}.}.while. |
637a0 | 28 74 72 75 65 29 3b 0a 0a 24 70 61 63 6b 61 67 65 73 20 3d 20 61 72 72 61 79 5f 66 69 6c 74 65 | (true);..$packages.=.array_filte |
637c0 | 72 28 24 70 61 63 6b 61 67 65 73 29 3b 0a 69 66 20 28 21 24 70 61 63 6b 61 67 65 73 29 20 7b 0a | r($packages);.if.(!$packages).{. |
637e0 | 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 | throw.new.\InvalidArgumentExcept |
63800 | 69 6f 6e 28 27 59 6f 75 20 6d 75 73 74 20 65 6e 74 65 72 20 6d 69 6e 69 6d 75 6d 20 6f 6e 65 20 | ion('You.must.enter.minimum.one. |
63820 | 70 61 63 6b 61 67 65 2e 27 29 3b 0a 7d 0a 0a 24 74 61 62 6c 65 20 3d 20 6e 65 77 20 54 61 62 6c | package.');.}..$table.=.new.Tabl |
63840 | 65 28 24 6f 75 74 70 75 74 29 3b 0a 24 74 61 62 6c 65 2d 3e 73 65 74 48 65 61 64 65 72 73 28 5b | e($output);.$table->setHeaders([ |
63860 | 27 53 65 6c 65 63 74 65 64 20 70 61 63 6b 61 67 65 73 27 5d 29 3b 0a 66 6f 72 65 61 63 68 20 28 | 'Selected.packages']);.foreach.( |
63880 | 24 70 61 63 6b 61 67 65 73 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 24 74 61 62 6c 65 2d | $packages.as.$package).{.$table- |
638a0 | 3e 61 64 64 52 6f 77 28 5b 24 70 61 63 6b 61 67 65 5d 29 3b 0a 7d 0a 24 74 61 62 6c 65 2d 3e 72 | >addRow([$package]);.}.$table->r |
638c0 | 65 6e 64 65 72 28 29 3b 0a 0a 69 66 20 28 24 69 6f 2d 3e 61 73 6b 43 6f 6e 66 69 72 6d 61 74 69 | ender();..if.($io->askConfirmati |
638e0 | 6f 6e 28 73 70 72 69 6e 74 66 28 0a 27 57 6f 75 6c 64 20 79 6f 75 20 6c 69 6b 65 20 74 6f 20 63 | on(sprintf(.'Would.you.like.to.c |
63900 | 6f 6e 74 69 6e 75 65 20 61 6e 64 20 75 70 64 61 74 65 20 74 68 65 20 61 62 6f 76 65 20 70 61 63 | ontinue.and.update.the.above.pac |
63920 | 6b 61 67 65 25 73 20 5b 3c 63 6f 6d 6d 65 6e 74 3e 79 65 73 3c 2f 63 6f 6d 6d 65 6e 74 3e 5d 3f | kage%s.[<comment>yes</comment>]? |
63940 | 20 27 2c 0a 31 20 3d 3d 3d 20 63 6f 75 6e 74 28 24 70 61 63 6b 61 67 65 73 29 20 3f 20 27 27 20 | .',.1.===.count($packages).?.''. |
63960 | 3a 20 27 73 27 0a 29 29 29 20 7b 0a 72 65 74 75 72 6e 20 24 70 61 63 6b 61 67 65 73 3b 0a 7d 0a | :.'s'.))).{.return.$packages;.}. |
63980 | 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 49 6e | .throw.new.\RuntimeException('In |
639a0 | 73 74 61 6c 6c 61 74 69 6f 6e 20 61 62 6f 72 74 65 64 2e 27 29 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 | stallation.aborted.');.}.}.<?php |
639c0 | 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a | .declare(strict_types=1);....... |
639e0 | 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6d 6d 61 6e 64 3b | .....namespace.Composer\Command; |
63a00 | 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 46 61 63 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 | ..use.Composer\Factory;.use.Comp |
63a20 | 6f 73 65 72 5c 49 4f 5c 49 4f 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 | oser\IO\IOInterface;.use.Compose |
63a40 | 72 5c 50 61 63 6b 61 67 65 5c 4c 6f 61 64 65 72 5c 56 61 6c 69 64 61 74 69 6e 67 41 72 72 61 79 | r\Package\Loader\ValidatingArray |
63a60 | 4c 6f 61 64 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 6c 75 67 69 6e 5c 43 6f 6d 6d | Loader;.use.Composer\Plugin\Comm |
63a80 | 61 6e 64 45 76 65 6e 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 6c 75 67 69 6e 5c 50 6c | andEvent;.use.Composer\Plugin\Pl |
63aa0 | 75 67 69 6e 45 76 65 6e 74 73 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 | uginEvents;.use.Composer\Reposit |
63ac0 | 6f 72 79 5c 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d | ory\InstalledRepository;.use.Com |
63ae0 | 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 | poser\Repository\PlatformReposit |
63b00 | 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 43 6f 6e 66 69 67 56 61 6c | ory;.use.Composer\Util\ConfigVal |
63b20 | 69 64 61 74 6f 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 46 69 6c 65 73 79 | idator;.use.Composer\Util\Filesy |
63b40 | 73 74 65 6d 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 | stem;.use.Symfony\Component\Cons |
63b60 | 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 3b 0a 75 73 65 20 53 79 6d | ole\Input\InputArgument;.use.Sym |
63b80 | 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 | fony\Component\Console\Input\Inp |
63ba0 | 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 | utInterface;.use.Symfony\Compone |
63bc0 | 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 4f 70 74 69 6f 6e 3b 0a 75 73 | nt\Console\Input\InputOption;.us |
63be0 | 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 4f 75 74 70 | e.Symfony\Component\Console\Outp |
63c00 | 75 74 5c 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 | ut\OutputInterface;........class |
63c20 | 20 56 61 6c 69 64 61 74 65 43 6f 6d 6d 61 6e 64 20 65 78 74 65 6e 64 73 20 42 61 73 65 43 6f 6d | .ValidateCommand.extends.BaseCom |
63c40 | 6d 61 6e 64 0a 7b 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 63 6f 6e | mand.{....protected.function.con |
63c60 | 66 69 67 75 72 65 28 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 0a 2d 3e 73 65 74 4e 61 6d 65 | figure():.void.{.$this.->setName |
63c80 | 28 27 76 61 6c 69 64 61 74 65 27 29 0a 2d 3e 73 65 74 44 65 73 63 72 69 70 74 69 6f 6e 28 27 56 | ('validate').->setDescription('V |
63ca0 | 61 6c 69 64 61 74 65 73 20 61 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 20 61 6e 64 20 63 6f 6d | alidates.a.composer.json.and.com |
63cc0 | 70 6f 73 65 72 2e 6c 6f 63 6b 27 29 0a 2d 3e 73 65 74 44 65 66 69 6e 69 74 69 6f 6e 28 5b 0a 6e | poser.lock').->setDefinition([.n |
63ce0 | 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 63 68 65 63 6b 2d 61 6c 6c 27 2c 20 6e | ew.InputOption('no-check-all',.n |
63d00 | 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 44 | ull,.InputOption::VALUE_NONE,.'D |
63d20 | 6f 20 6e 6f 74 20 76 61 6c 69 64 61 74 65 20 72 65 71 75 69 72 65 73 20 66 6f 72 20 6f 76 65 72 | o.not.validate.requires.for.over |
63d40 | 6c 79 20 73 74 72 69 63 74 2f 6c 6f 6f 73 65 20 63 6f 6e 73 74 72 61 69 6e 74 73 27 29 2c 0a 6e | ly.strict/loose.constraints'),.n |
63d60 | 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 63 68 65 63 6b 2d 6c 6f 63 6b 27 2c 20 6e 75 6c | ew.InputOption('check-lock',.nul |
63d80 | 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 43 68 65 | l,.InputOption::VALUE_NONE,.'Che |
63da0 | 63 6b 20 69 66 20 6c 6f 63 6b 20 66 69 6c 65 20 69 73 20 75 70 20 74 6f 20 64 61 74 65 20 28 65 | ck.if.lock.file.is.up.to.date.(e |
63dc0 | 76 65 6e 20 77 68 65 6e 20 63 6f 6e 66 69 67 2e 6c 6f 63 6b 20 69 73 20 66 61 6c 73 65 29 27 29 | ven.when.config.lock.is.false)') |
63de0 | 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 63 68 65 63 6b 2d 6c 6f 63 6b | ,.new.InputOption('no-check-lock |
63e00 | 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 | ',.null,.InputOption::VALUE_NONE |
63e20 | 2c 20 27 44 6f 20 6e 6f 74 20 63 68 65 63 6b 20 69 66 20 6c 6f 63 6b 20 66 69 6c 65 20 69 73 20 | ,.'Do.not.check.if.lock.file.is. |
63e40 | 75 70 20 74 6f 20 64 61 74 65 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 6e | up.to.date'),.new.InputOption('n |
63e60 | 6f 2d 63 68 65 63 6b 2d 70 75 62 6c 69 73 68 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 | o-check-publish',.null,.InputOpt |
63e80 | 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 44 6f 20 6e 6f 74 20 63 68 65 63 6b 20 66 | ion::VALUE_NONE,.'Do.not.check.f |
63ea0 | 6f 72 20 70 75 62 6c 69 73 68 20 65 72 72 6f 72 73 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 | or.publish.errors'),.new.InputOp |
63ec0 | 74 69 6f 6e 28 27 6e 6f 2d 63 68 65 63 6b 2d 76 65 72 73 69 6f 6e 27 2c 20 6e 75 6c 6c 2c 20 49 | tion('no-check-version',.null,.I |
63ee0 | 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 44 6f 20 6e 6f 74 20 | nputOption::VALUE_NONE,.'Do.not. |
63f00 | 72 65 70 6f 72 74 20 61 20 77 61 72 6e 69 6e 67 20 69 66 20 74 68 65 20 76 65 72 73 69 6f 6e 20 | report.a.warning.if.the.version. |
63f20 | 66 69 65 6c 64 20 69 73 20 70 72 65 73 65 6e 74 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 4f 70 74 | field.is.present'),.new.InputOpt |
63f40 | 69 6f 6e 28 27 77 69 74 68 2d 64 65 70 65 6e 64 65 6e 63 69 65 73 27 2c 20 27 41 27 2c 20 49 6e | ion('with-dependencies',.'A',.In |
63f60 | 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 41 6c 73 6f 20 76 61 6c | putOption::VALUE_NONE,.'Also.val |
63f80 | 69 64 61 74 65 20 74 68 65 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 20 6f 66 20 61 6c 6c 20 69 | idate.the.composer.json.of.all.i |
63fa0 | 6e 73 74 61 6c 6c 65 64 20 64 65 70 65 6e 64 65 6e 63 69 65 73 27 29 2c 0a 6e 65 77 20 49 6e 70 | nstalled.dependencies'),.new.Inp |
63fc0 | 75 74 4f 70 74 69 6f 6e 28 27 73 74 72 69 63 74 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 | utOption('strict',.null,.InputOp |
63fe0 | 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 52 65 74 75 72 6e 20 61 20 6e 6f 6e 2d | tion::VALUE_NONE,.'Return.a.non- |
64000 | 7a 65 72 6f 20 65 78 69 74 20 63 6f 64 65 20 66 6f 72 20 77 61 72 6e 69 6e 67 73 20 61 73 20 77 | zero.exit.code.for.warnings.as.w |
64020 | 65 6c 6c 20 61 73 20 65 72 72 6f 72 73 27 29 2c 0a 6e 65 77 20 49 6e 70 75 74 41 72 67 75 6d 65 | ell.as.errors'),.new.InputArgume |
64040 | 6e 74 28 27 66 69 6c 65 27 2c 20 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 3a 3a 4f 50 54 49 4f 4e | nt('file',.InputArgument::OPTION |
64060 | 41 4c 2c 20 27 70 61 74 68 20 74 6f 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 20 66 69 6c 65 27 | AL,.'path.to.composer.json.file' |
64080 | 29 2c 0a 5d 29 0a 2d 3e 73 65 74 48 65 6c 70 28 0a 3c 3c 3c 45 4f 54 0a 54 68 65 20 76 61 6c 69 | ),.]).->setHelp(.<<<EOT.The.vali |
640a0 | 64 61 74 65 20 63 6f 6d 6d 61 6e 64 20 76 61 6c 69 64 61 74 65 73 20 61 20 67 69 76 65 6e 20 63 | date.command.validates.a.given.c |
640c0 | 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 20 61 6e 64 20 63 6f 6d 70 6f 73 65 72 2e 6c 6f 63 6b 0a 0a | omposer.json.and.composer.lock.. |
640e0 | 45 78 69 74 20 63 6f 64 65 73 20 69 6e 20 63 61 73 65 20 6f 66 20 65 72 72 6f 72 73 20 61 72 65 | Exit.codes.in.case.of.errors.are |
64100 | 3a 0a 31 20 76 61 6c 69 64 61 74 69 6f 6e 20 77 61 72 6e 69 6e 67 28 73 29 2c 20 6f 6e 6c 79 20 | :.1.validation.warning(s),.only. |
64120 | 77 68 65 6e 20 2d 2d 73 74 72 69 63 74 20 69 73 20 67 69 76 65 6e 0a 32 20 76 61 6c 69 64 61 74 | when.--strict.is.given.2.validat |
64140 | 69 6f 6e 20 65 72 72 6f 72 28 73 29 0a 33 20 66 69 6c 65 20 75 6e 72 65 61 64 61 62 6c 65 20 6f | ion.error(s).3.file.unreadable.o |
64160 | 72 20 6d 69 73 73 69 6e 67 0a 0a 52 65 61 64 20 6d 6f 72 65 20 61 74 20 68 74 74 70 73 3a 2f 2f | r.missing..Read.more.at.https:// |
64180 | 67 65 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 67 2f 64 6f 63 2f 30 33 2d 63 6c 69 2e 6d 64 23 76 61 | getcomposer.org/doc/03-cli.md#va |
641a0 | 6c 69 64 61 74 65 0a 45 4f 54 0a 29 3b 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 | lidate.EOT.);.}..protected.funct |
641c0 | 69 6f 6e 20 65 78 65 63 75 74 65 28 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 69 6e 70 75 | ion.execute(InputInterface.$inpu |
641e0 | 74 2c 20 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 6f 75 74 70 75 74 29 3a 20 69 6e 74 | t,.OutputInterface.$output):.int |
64200 | 0a 7b 0a 24 66 69 6c 65 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 41 72 67 75 6d 65 6e 74 28 27 | .{.$file.=.$input->getArgument(' |
64220 | 66 69 6c 65 27 29 20 3f 3a 20 46 61 63 74 6f 72 79 3a 3a 67 65 74 43 6f 6d 70 6f 73 65 72 46 69 | file').?:.Factory::getComposerFi |
64240 | 6c 65 28 29 3b 0a 24 69 6f 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 3b 0a 0a 69 66 20 | le();.$io.=.$this->getIO();..if. |
64260 | 28 21 66 69 6c 65 5f 65 78 69 73 74 73 28 24 66 69 6c 65 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 | (!file_exists($file)).{.$io->wri |
64280 | 74 65 45 72 72 6f 72 28 27 3c 65 72 72 6f 72 3e 27 20 2e 20 24 66 69 6c 65 20 2e 20 27 20 6e 6f | teError('<error>'...$file...'.no |
642a0 | 74 20 66 6f 75 6e 64 2e 3c 2f 65 72 72 6f 72 3e 27 29 3b 0a 0a 72 65 74 75 72 6e 20 33 3b 0a 7d | t.found.</error>');..return.3;.} |
642c0 | 0a 69 66 20 28 21 46 69 6c 65 73 79 73 74 65 6d 3a 3a 69 73 52 65 61 64 61 62 6c 65 28 24 66 69 | .if.(!Filesystem::isReadable($fi |
642e0 | 6c 65 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 65 72 72 6f 72 3e 27 | le)).{.$io->writeError('<error>' |
64300 | 20 2e 20 24 66 69 6c 65 20 2e 20 27 20 69 73 20 6e 6f 74 20 72 65 61 64 61 62 6c 65 2e 3c 2f 65 | ...$file...'.is.not.readable.</e |
64320 | 72 72 6f 72 3e 27 29 3b 0a 0a 72 65 74 75 72 6e 20 33 3b 0a 7d 0a 0a 24 76 61 6c 69 64 61 74 6f | rror>');..return.3;.}..$validato |
64340 | 72 20 3d 20 6e 65 77 20 43 6f 6e 66 69 67 56 61 6c 69 64 61 74 6f 72 28 24 69 6f 29 3b 0a 24 63 | r.=.new.ConfigValidator($io);.$c |
64360 | 68 65 63 6b 41 6c 6c 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d | heckAll.=.$input->getOption('no- |
64380 | 63 68 65 63 6b 2d 61 6c 6c 27 29 20 3f 20 30 20 3a 20 56 61 6c 69 64 61 74 69 6e 67 41 72 72 61 | check-all').?.0.:.ValidatingArra |
643a0 | 79 4c 6f 61 64 65 72 3a 3a 43 48 45 43 4b 5f 41 4c 4c 3b 0a 24 63 68 65 63 6b 50 75 62 6c 69 73 | yLoader::CHECK_ALL;.$checkPublis |
643c0 | 68 20 3d 20 21 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 63 68 65 63 6b | h.=.!$input->getOption('no-check |
643e0 | 2d 70 75 62 6c 69 73 68 27 29 3b 0a 24 63 68 65 63 6b 4c 6f 63 6b 20 3d 20 21 24 69 6e 70 75 74 | -publish');.$checkLock.=.!$input |
64400 | 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 6e 6f 2d 63 68 65 63 6b 2d 6c 6f 63 6b 27 29 3b 0a 24 63 | ->getOption('no-check-lock');.$c |
64420 | 68 65 63 6b 56 65 72 73 69 6f 6e 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 | heckVersion.=.$input->getOption( |
64440 | 27 6e 6f 2d 63 68 65 63 6b 2d 76 65 72 73 69 6f 6e 27 29 20 3f 20 30 20 3a 20 43 6f 6e 66 69 67 | 'no-check-version').?.0.:.Config |
64460 | 56 61 6c 69 64 61 74 6f 72 3a 3a 43 48 45 43 4b 5f 56 45 52 53 49 4f 4e 3b 0a 24 69 73 53 74 72 | Validator::CHECK_VERSION;.$isStr |
64480 | 69 63 74 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 27 73 74 72 69 63 74 27 | ict.=.$input->getOption('strict' |
644a0 | 29 3b 0a 5b 24 65 72 72 6f 72 73 2c 20 24 70 75 62 6c 69 73 68 45 72 72 6f 72 73 2c 20 24 77 61 | );.[$errors,.$publishErrors,.$wa |
644c0 | 72 6e 69 6e 67 73 5d 20 3d 20 24 76 61 6c 69 64 61 74 6f 72 2d 3e 76 61 6c 69 64 61 74 65 28 24 | rnings].=.$validator->validate($ |
644e0 | 66 69 6c 65 2c 20 24 63 68 65 63 6b 41 6c 6c 2c 20 24 63 68 65 63 6b 56 65 72 73 69 6f 6e 29 3b | file,.$checkAll,.$checkVersion); |
64500 | 0a 0a 24 6c 6f 63 6b 45 72 72 6f 72 73 20 3d 20 5b 5d 3b 0a 24 63 6f 6d 70 6f 73 65 72 20 3d 20 | ..$lockErrors.=.[];.$composer.=. |
64520 | 46 61 63 74 6f 72 79 3a 3a 63 72 65 61 74 65 28 24 69 6f 2c 20 24 66 69 6c 65 2c 20 24 69 6e 70 | Factory::create($io,.$file,.$inp |
64540 | 75 74 2d 3e 68 61 73 50 61 72 61 6d 65 74 65 72 4f 70 74 69 6f 6e 28 27 2d 2d 6e 6f 2d 70 6c 75 | ut->hasParameterOption('--no-plu |
64560 | 67 69 6e 73 27 29 29 3b 0a 0a 24 63 68 65 63 6b 4c 6f 63 6b 20 3d 20 28 24 63 68 65 63 6b 4c 6f | gins'));..$checkLock.=.($checkLo |
64580 | 63 6b 20 26 26 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 43 6f 6e 66 69 67 28 29 2d 3e 67 65 | ck.&&.$composer->getConfig()->ge |
645a0 | 74 28 27 6c 6f 63 6b 27 29 29 20 7c 7c 20 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 6f 6e 28 | t('lock')).||.$input->getOption( |
645c0 | 27 63 68 65 63 6b 2d 6c 6f 63 6b 27 29 3b 0a 24 6c 6f 63 6b 65 72 20 3d 20 24 63 6f 6d 70 6f 73 | 'check-lock');.$locker.=.$compos |
645e0 | 65 72 2d 3e 67 65 74 4c 6f 63 6b 65 72 28 29 3b 0a 69 66 20 28 24 6c 6f 63 6b 65 72 2d 3e 69 73 | er->getLocker();.if.($locker->is |
64600 | 4c 6f 63 6b 65 64 28 29 20 26 26 20 21 24 6c 6f 63 6b 65 72 2d 3e 69 73 46 72 65 73 68 28 29 29 | Locked().&&.!$locker->isFresh()) |
64620 | 20 7b 0a 24 6c 6f 63 6b 45 72 72 6f 72 73 5b 5d 20 3d 20 27 2d 20 54 68 65 20 6c 6f 63 6b 20 66 | .{.$lockErrors[].=.'-.The.lock.f |
64640 | 69 6c 65 20 69 73 20 6e 6f 74 20 75 70 20 74 6f 20 64 61 74 65 20 77 69 74 68 20 74 68 65 20 6c | ile.is.not.up.to.date.with.the.l |
64660 | 61 74 65 73 74 20 63 68 61 6e 67 65 73 20 69 6e 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 2c 20 | atest.changes.in.composer.json,. |
64680 | 69 74 20 69 73 20 72 65 63 6f 6d 6d 65 6e 64 65 64 20 74 68 61 74 20 79 6f 75 20 72 75 6e 20 60 | it.is.recommended.that.you.run.` |
646a0 | 63 6f 6d 70 6f 73 65 72 20 75 70 64 61 74 65 60 20 6f 72 20 60 63 6f 6d 70 6f 73 65 72 20 75 70 | composer.update`.or.`composer.up |
646c0 | 64 61 74 65 20 3c 70 61 63 6b 61 67 65 20 6e 61 6d 65 3e 60 2e 27 3b 0a 7d 0a 0a 69 66 20 28 24 | date.<package.name>`.';.}..if.($ |
646e0 | 6c 6f 63 6b 65 72 2d 3e 69 73 4c 6f 63 6b 65 64 28 29 29 20 7b 0a 24 6d 69 73 73 69 6e 67 52 65 | locker->isLocked()).{.$missingRe |
64700 | 71 75 69 72 65 6d 65 6e 74 73 20 3d 20 66 61 6c 73 65 3b 0a 24 73 65 74 73 20 3d 20 5b 0a 5b 27 | quirements.=.false;.$sets.=.[.[' |
64720 | 72 65 70 6f 27 20 3d 3e 20 24 6c 6f 63 6b 65 72 2d 3e 67 65 74 4c 6f 63 6b 65 64 52 65 70 6f 73 | repo'.=>.$locker->getLockedRepos |
64740 | 69 74 6f 72 79 28 66 61 6c 73 65 29 2c 20 27 6d 65 74 68 6f 64 27 20 3d 3e 20 27 67 65 74 52 65 | itory(false),.'method'.=>.'getRe |
64760 | 71 75 69 72 65 73 27 2c 20 27 64 65 73 63 72 69 70 74 69 6f 6e 27 20 3d 3e 20 27 52 65 71 75 69 | quires',.'description'.=>.'Requi |
64780 | 72 65 64 27 5d 2c 0a 5b 27 72 65 70 6f 27 20 3d 3e 20 24 6c 6f 63 6b 65 72 2d 3e 67 65 74 4c 6f | red'],.['repo'.=>.$locker->getLo |
647a0 | 63 6b 65 64 52 65 70 6f 73 69 74 6f 72 79 28 74 72 75 65 29 2c 20 27 6d 65 74 68 6f 64 27 20 3d | ckedRepository(true),.'method'.= |
647c0 | 3e 20 27 67 65 74 44 65 76 52 65 71 75 69 72 65 73 27 2c 20 27 64 65 73 63 72 69 70 74 69 6f 6e | >.'getDevRequires',.'description |
647e0 | 27 20 3d 3e 20 27 52 65 71 75 69 72 65 64 20 28 69 6e 20 72 65 71 75 69 72 65 2d 64 65 76 29 27 | '.=>.'Required.(in.require-dev)' |
64800 | 5d 2c 0a 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 73 65 74 73 20 61 73 20 24 73 65 74 29 20 7b 0a | ],.];.foreach.($sets.as.$set).{. |
64820 | 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 20 3d 20 6e 65 77 20 49 6e 73 74 61 6c 6c 65 64 52 65 | $installedRepo.=.new.InstalledRe |
64840 | 70 6f 73 69 74 6f 72 79 28 5b 24 73 65 74 5b 27 72 65 70 6f 27 5d 5d 29 3b 0a 0a 66 6f 72 65 61 | pository([$set['repo']]);..forea |
64860 | 63 68 20 28 63 61 6c 6c 5f 75 73 65 72 5f 66 75 6e 63 28 5b 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 | ch.(call_user_func([$composer->g |
64880 | 65 74 50 61 63 6b 61 67 65 28 29 2c 20 24 73 65 74 5b 27 6d 65 74 68 6f 64 27 5d 5d 29 20 61 73 | etPackage(),.$set['method']]).as |
648a0 | 20 24 6c 69 6e 6b 29 20 7b 0a 69 66 20 28 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 | .$link).{.if.(PlatformRepository |
648c0 | 3a 3a 69 73 50 6c 61 74 66 6f 72 6d 50 61 63 6b 61 67 65 28 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 | ::isPlatformPackage($link->getTa |
648e0 | 72 67 65 74 28 29 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 69 66 20 28 21 24 69 6e 73 | rget())).{.continue;.}.if.(!$ins |
64900 | 74 61 6c 6c 65 64 52 65 70 6f 2d 3e 66 69 6e 64 50 61 63 6b 61 67 65 73 57 69 74 68 52 65 70 6c | talledRepo->findPackagesWithRepl |
64920 | 61 63 65 72 73 41 6e 64 50 72 6f 76 69 64 65 72 73 28 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 | acersAndProviders($link->getTarg |
64940 | 65 74 28 29 2c 20 24 6c 69 6e 6b 2d 3e 67 65 74 43 6f 6e 73 74 72 61 69 6e 74 28 29 29 29 20 7b | et(),.$link->getConstraint())).{ |
64960 | 0a 69 66 20 28 24 72 65 73 75 6c 74 73 20 3d 20 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 2d 3e | .if.($results.=.$installedRepo-> |
64980 | 66 69 6e 64 50 61 63 6b 61 67 65 73 57 69 74 68 52 65 70 6c 61 63 65 72 73 41 6e 64 50 72 6f 76 | findPackagesWithReplacersAndProv |
649a0 | 69 64 65 72 73 28 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 74 28 29 29 29 20 7b 0a 24 70 72 | iders($link->getTarget())).{.$pr |
649c0 | 6f 76 69 64 65 72 20 3d 20 72 65 73 65 74 28 24 72 65 73 75 6c 74 73 29 3b 0a 24 6c 6f 63 6b 45 | ovider.=.reset($results);.$lockE |
649e0 | 72 72 6f 72 73 5b 5d 20 3d 20 27 2d 20 27 20 2e 20 24 73 65 74 5b 27 64 65 73 63 72 69 70 74 69 | rrors[].=.'-.'...$set['descripti |
64a00 | 6f 6e 27 5d 2e 27 20 70 61 63 6b 61 67 65 20 22 27 20 2e 20 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 | on'].'.package."'...$link->getTa |
64a20 | 72 67 65 74 28 29 20 2e 20 27 22 20 69 73 20 69 6e 20 74 68 65 20 6c 6f 63 6b 20 66 69 6c 65 20 | rget()...'".is.in.the.lock.file. |
64a40 | 61 73 20 22 27 2e 24 70 72 6f 76 69 64 65 72 2d 3e 67 65 74 50 72 65 74 74 79 56 65 72 73 69 6f | as."'.$provider->getPrettyVersio |
64a60 | 6e 28 29 2e 27 22 20 62 75 74 20 74 68 61 74 20 64 6f 65 73 20 6e 6f 74 20 73 61 74 69 73 66 79 | n().'".but.that.does.not.satisfy |
64a80 | 20 79 6f 75 72 20 63 6f 6e 73 74 72 61 69 6e 74 20 22 27 2e 24 6c 69 6e 6b 2d 3e 67 65 74 50 72 | .your.constraint."'.$link->getPr |
64aa0 | 65 74 74 79 43 6f 6e 73 74 72 61 69 6e 74 28 29 2e 27 22 2e 27 3b 0a 7d 20 65 6c 73 65 20 7b 0a | ettyConstraint().'".';.}.else.{. |
64ac0 | 24 6c 6f 63 6b 45 72 72 6f 72 73 5b 5d 20 3d 20 27 2d 20 27 20 2e 20 24 73 65 74 5b 27 64 65 73 | $lockErrors[].=.'-.'...$set['des |
64ae0 | 63 72 69 70 74 69 6f 6e 27 5d 2e 27 20 70 61 63 6b 61 67 65 20 22 27 20 2e 20 24 6c 69 6e 6b 2d | cription'].'.package."'...$link- |
64b00 | 3e 67 65 74 54 61 72 67 65 74 28 29 20 2e 20 27 22 20 69 73 20 6e 6f 74 20 70 72 65 73 65 6e 74 | >getTarget()...'".is.not.present |
64b20 | 20 69 6e 20 74 68 65 20 6c 6f 63 6b 20 66 69 6c 65 2e 27 3b 0a 7d 0a 24 6d 69 73 73 69 6e 67 52 | .in.the.lock.file.';.}.$missingR |
64b40 | 65 71 75 69 72 65 6d 65 6e 74 73 20 3d 20 74 72 75 65 3b 0a 7d 0a 7d 0a 7d 0a 0a 69 66 20 28 24 | equirements.=.true;.}.}.}..if.($ |
64b60 | 6d 69 73 73 69 6e 67 52 65 71 75 69 72 65 6d 65 6e 74 73 29 20 7b 0a 24 6c 6f 63 6b 45 72 72 6f | missingRequirements).{.$lockErro |
64b80 | 72 73 5b 5d 20 3d 20 27 54 68 69 73 20 75 73 75 61 6c 6c 79 20 68 61 70 70 65 6e 73 20 77 68 65 | rs[].=.'This.usually.happens.whe |
64ba0 | 6e 20 63 6f 6d 70 6f 73 65 72 20 66 69 6c 65 73 20 61 72 65 20 69 6e 63 6f 72 72 65 63 74 6c 79 | n.composer.files.are.incorrectly |
64bc0 | 20 6d 65 72 67 65 64 20 6f 72 20 74 68 65 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 20 66 69 6c | .merged.or.the.composer.json.fil |
64be0 | 65 20 69 73 20 6d 61 6e 75 61 6c 6c 79 20 65 64 69 74 65 64 2e 27 3b 0a 24 6c 6f 63 6b 45 72 72 | e.is.manually.edited.';.$lockErr |
64c00 | 6f 72 73 5b 5d 20 3d 20 27 52 65 61 64 20 6d 6f 72 65 20 61 62 6f 75 74 20 63 6f 72 72 65 63 74 | ors[].=.'Read.more.about.correct |
64c20 | 6c 79 20 72 65 73 6f 6c 76 69 6e 67 20 6d 65 72 67 65 20 63 6f 6e 66 6c 69 63 74 73 20 68 74 74 | ly.resolving.merge.conflicts.htt |
64c40 | 70 73 3a 2f 2f 67 65 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 67 2f 64 6f 63 2f 61 72 74 69 63 6c 65 | ps://getcomposer.org/doc/article |
64c60 | 73 2f 72 65 73 6f 6c 76 69 6e 67 2d 6d 65 72 67 65 2d 63 6f 6e 66 6c 69 63 74 73 2e 6d 64 27 3b | s/resolving-merge-conflicts.md'; |
64c80 | 0a 24 6c 6f 63 6b 45 72 72 6f 72 73 5b 5d 20 3d 20 27 61 6e 64 20 70 72 65 66 65 72 20 75 73 69 | .$lockErrors[].=.'and.prefer.usi |
64ca0 | 6e 67 20 74 68 65 20 22 72 65 71 75 69 72 65 22 20 63 6f 6d 6d 61 6e 64 20 6f 76 65 72 20 65 64 | ng.the."require".command.over.ed |
64cc0 | 69 74 69 6e 67 20 74 68 65 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 20 66 69 6c 65 20 64 69 72 | iting.the.composer.json.file.dir |
64ce0 | 65 63 74 6c 79 20 68 74 74 70 73 3a 2f 2f 67 65 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 67 2f 64 6f | ectly.https://getcomposer.org/do |
64d00 | 63 2f 30 33 2d 63 6c 69 2e 6d 64 23 72 65 71 75 69 72 65 27 3b 0a 7d 0a 7d 0a 0a 24 74 68 69 73 | c/03-cli.md#require';.}.}..$this |
64d20 | 2d 3e 6f 75 74 70 75 74 52 65 73 75 6c 74 28 24 69 6f 2c 20 24 66 69 6c 65 2c 20 24 65 72 72 6f | ->outputResult($io,.$file,.$erro |
64d40 | 72 73 2c 20 24 77 61 72 6e 69 6e 67 73 2c 20 24 63 68 65 63 6b 50 75 62 6c 69 73 68 2c 20 24 70 | rs,.$warnings,.$checkPublish,.$p |
64d60 | 75 62 6c 69 73 68 45 72 72 6f 72 73 2c 20 24 63 68 65 63 6b 4c 6f 63 6b 2c 20 24 6c 6f 63 6b 45 | ublishErrors,.$checkLock,.$lockE |
64d80 | 72 72 6f 72 73 2c 20 74 72 75 65 29 3b 0a 0a 0a 24 65 78 69 74 43 6f 64 65 20 3d 20 24 65 72 72 | rrors,.true);...$exitCode.=.$err |
64da0 | 6f 72 73 20 3f 20 32 20 3a 20 28 24 69 73 53 74 72 69 63 74 20 26 26 20 24 77 61 72 6e 69 6e 67 | ors.?.2.:.($isStrict.&&.$warning |
64dc0 | 73 20 3f 20 31 20 3a 20 30 29 3b 0a 0a 69 66 20 28 24 69 6e 70 75 74 2d 3e 67 65 74 4f 70 74 69 | s.?.1.:.0);..if.($input->getOpti |
64de0 | 6f 6e 28 27 77 69 74 68 2d 64 65 70 65 6e 64 65 6e 63 69 65 73 27 29 29 20 7b 0a 24 6c 6f 63 61 | on('with-dependencies')).{.$loca |
64e00 | 6c 52 65 70 6f 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 79 | lRepo.=.$composer->getRepository |
64e20 | 4d 61 6e 61 67 65 72 28 29 2d 3e 67 65 74 4c 6f 63 61 6c 52 65 70 6f 73 69 74 6f 72 79 28 29 3b | Manager()->getLocalRepository(); |
64e40 | 0a 66 6f 72 65 61 63 68 20 28 24 6c 6f 63 61 6c 52 65 70 6f 2d 3e 67 65 74 50 61 63 6b 61 67 65 | .foreach.($localRepo->getPackage |
64e60 | 73 28 29 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 24 70 61 74 68 20 3d 20 24 63 6f 6d 70 | s().as.$package).{.$path.=.$comp |
64e80 | 6f 73 65 72 2d 3e 67 65 74 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 72 28 29 2d 3e | oser->getInstallationManager()-> |
64ea0 | 67 65 74 49 6e 73 74 61 6c 6c 50 61 74 68 28 24 70 61 63 6b 61 67 65 29 3b 0a 24 66 69 6c 65 20 | getInstallPath($package);.$file. |
64ec0 | 3d 20 24 70 61 74 68 20 2e 20 27 2f 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 27 3b 0a 69 66 20 28 | =.$path...'/composer.json';.if.( |
64ee0 | 69 73 5f 64 69 72 28 24 70 61 74 68 29 20 26 26 20 66 69 6c 65 5f 65 78 69 73 74 73 28 24 66 69 | is_dir($path).&&.file_exists($fi |
64f00 | 6c 65 29 29 20 7b 0a 5b 24 65 72 72 6f 72 73 2c 20 24 70 75 62 6c 69 73 68 45 72 72 6f 72 73 2c | le)).{.[$errors,.$publishErrors, |
64f20 | 20 24 77 61 72 6e 69 6e 67 73 5d 20 3d 20 24 76 61 6c 69 64 61 74 6f 72 2d 3e 76 61 6c 69 64 61 | .$warnings].=.$validator->valida |
64f40 | 74 65 28 24 66 69 6c 65 2c 20 24 63 68 65 63 6b 41 6c 6c 2c 20 24 63 68 65 63 6b 56 65 72 73 69 | te($file,.$checkAll,.$checkVersi |
64f60 | 6f 6e 29 3b 0a 0a 24 74 68 69 73 2d 3e 6f 75 74 70 75 74 52 65 73 75 6c 74 28 24 69 6f 2c 20 24 | on);..$this->outputResult($io,.$ |
64f80 | 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 4e 61 6d 65 28 29 2c 20 24 65 72 72 6f 72 | package->getPrettyName(),.$error |
64fa0 | 73 2c 20 24 77 61 72 6e 69 6e 67 73 2c 20 24 63 68 65 63 6b 50 75 62 6c 69 73 68 2c 20 24 70 75 | s,.$warnings,.$checkPublish,.$pu |
64fc0 | 62 6c 69 73 68 45 72 72 6f 72 73 29 3b 0a 0a 0a 24 64 65 70 43 6f 64 65 20 3d 20 24 65 72 72 6f | blishErrors);...$depCode.=.$erro |
64fe0 | 72 73 20 3f 20 32 20 3a 20 28 24 69 73 53 74 72 69 63 74 20 26 26 20 24 77 61 72 6e 69 6e 67 73 | rs.?.2.:.($isStrict.&&.$warnings |
65000 | 20 3f 20 31 20 3a 20 30 29 3b 0a 24 65 78 69 74 43 6f 64 65 20 3d 20 6d 61 78 28 24 64 65 70 43 | .?.1.:.0);.$exitCode.=.max($depC |
65020 | 6f 64 65 2c 20 24 65 78 69 74 43 6f 64 65 29 3b 0a 7d 0a 7d 0a 7d 0a 0a 24 63 6f 6d 6d 61 6e 64 | ode,.$exitCode);.}.}.}..$command |
65040 | 45 76 65 6e 74 20 3d 20 6e 65 77 20 43 6f 6d 6d 61 6e 64 45 76 65 6e 74 28 50 6c 75 67 69 6e 45 | Event.=.new.CommandEvent(PluginE |
65060 | 76 65 6e 74 73 3a 3a 43 4f 4d 4d 41 4e 44 2c 20 27 76 61 6c 69 64 61 74 65 27 2c 20 24 69 6e 70 | vents::COMMAND,.'validate',.$inp |
65080 | 75 74 2c 20 24 6f 75 74 70 75 74 29 3b 0a 24 65 76 65 6e 74 43 6f 64 65 20 3d 20 24 63 6f 6d 70 | ut,.$output);.$eventCode.=.$comp |
650a0 | 6f 73 65 72 2d 3e 67 65 74 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 28 29 2d 3e 64 69 73 70 | oser->getEventDispatcher()->disp |
650c0 | 61 74 63 68 28 24 63 6f 6d 6d 61 6e 64 45 76 65 6e 74 2d 3e 67 65 74 4e 61 6d 65 28 29 2c 20 24 | atch($commandEvent->getName(),.$ |
650e0 | 63 6f 6d 6d 61 6e 64 45 76 65 6e 74 29 3b 0a 0a 72 65 74 75 72 6e 20 6d 61 78 28 24 65 76 65 6e | commandEvent);..return.max($even |
65100 | 74 43 6f 64 65 2c 20 24 65 78 69 74 43 6f 64 65 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 72 69 76 | tCode,.$exitCode);.}........priv |
65120 | 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 6f 75 74 70 75 74 52 65 73 75 6c 74 28 49 4f 49 6e 74 65 | ate.function.outputResult(IOInte |
65140 | 72 66 61 63 65 20 24 69 6f 2c 20 73 74 72 69 6e 67 20 24 6e 61 6d 65 2c 20 61 72 72 61 79 20 26 | rface.$io,.string.$name,.array.& |
65160 | 24 65 72 72 6f 72 73 2c 20 61 72 72 61 79 20 26 24 77 61 72 6e 69 6e 67 73 2c 20 62 6f 6f 6c 20 | $errors,.array.&$warnings,.bool. |
65180 | 24 63 68 65 63 6b 50 75 62 6c 69 73 68 20 3d 20 66 61 6c 73 65 2c 20 61 72 72 61 79 20 24 70 75 | $checkPublish.=.false,.array.$pu |
651a0 | 62 6c 69 73 68 45 72 72 6f 72 73 20 3d 20 5b 5d 2c 20 62 6f 6f 6c 20 24 63 68 65 63 6b 4c 6f 63 | blishErrors.=.[],.bool.$checkLoc |
651c0 | 6b 20 3d 20 66 61 6c 73 65 2c 20 61 72 72 61 79 20 24 6c 6f 63 6b 45 72 72 6f 72 73 20 3d 20 5b | k.=.false,.array.$lockErrors.=.[ |
651e0 | 5d 2c 20 62 6f 6f 6c 20 24 70 72 69 6e 74 53 63 68 65 6d 61 55 72 6c 20 3d 20 66 61 6c 73 65 29 | ],.bool.$printSchemaUrl.=.false) |
65200 | 3a 20 76 6f 69 64 0a 7b 0a 24 64 6f 50 72 69 6e 74 53 63 68 65 6d 61 55 72 6c 20 3d 20 66 61 6c | :.void.{.$doPrintSchemaUrl.=.fal |
65220 | 73 65 3b 0a 0a 69 66 20 28 24 65 72 72 6f 72 73 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 | se;..if.($errors).{.$io->writeEr |
65240 | 72 6f 72 28 27 3c 65 72 72 6f 72 3e 27 20 2e 20 24 6e 61 6d 65 20 2e 20 27 20 69 73 20 69 6e 76 | ror('<error>'...$name...'.is.inv |
65260 | 61 6c 69 64 2c 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 65 72 72 6f 72 73 2f 77 61 72 6e 69 | alid,.the.following.errors/warni |
65280 | 6e 67 73 20 77 65 72 65 20 66 6f 75 6e 64 3a 3c 2f 65 72 72 6f 72 3e 27 29 3b 0a 7d 20 65 6c 73 | ngs.were.found:</error>');.}.els |
652a0 | 65 69 66 20 28 24 70 75 62 6c 69 73 68 45 72 72 6f 72 73 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 | eif.($publishErrors).{.$io->writ |
652c0 | 65 45 72 72 6f 72 28 27 3c 69 6e 66 6f 3e 27 20 2e 20 24 6e 61 6d 65 20 2e 20 27 20 69 73 20 76 | eError('<info>'...$name...'.is.v |
652e0 | 61 6c 69 64 20 66 6f 72 20 73 69 6d 70 6c 65 20 75 73 61 67 65 20 77 69 74 68 20 43 6f 6d 70 6f | alid.for.simple.usage.with.Compo |
65300 | 73 65 72 20 62 75 74 20 68 61 73 3c 2f 69 6e 66 6f 3e 27 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 | ser.but.has</info>');.$io->write |
65320 | 45 72 72 6f 72 28 27 3c 69 6e 66 6f 3e 73 74 72 69 63 74 20 65 72 72 6f 72 73 20 74 68 61 74 20 | Error('<info>strict.errors.that. |
65340 | 6d 61 6b 65 20 69 74 20 75 6e 61 62 6c 65 20 74 6f 20 62 65 20 70 75 62 6c 69 73 68 65 64 20 61 | make.it.unable.to.be.published.a |
65360 | 73 20 61 20 70 61 63 6b 61 67 65 3c 2f 69 6e 66 6f 3e 27 29 3b 0a 24 64 6f 50 72 69 6e 74 53 63 | s.a.package</info>');.$doPrintSc |
65380 | 68 65 6d 61 55 72 6c 20 3d 20 24 70 72 69 6e 74 53 63 68 65 6d 61 55 72 6c 3b 0a 7d 20 65 6c 73 | hemaUrl.=.$printSchemaUrl;.}.els |
653a0 | 65 69 66 20 28 24 77 61 72 6e 69 6e 67 73 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f | eif.($warnings).{.$io->writeErro |
653c0 | 72 28 27 3c 69 6e 66 6f 3e 27 20 2e 20 24 6e 61 6d 65 20 2e 20 27 20 69 73 20 76 61 6c 69 64 2c | r('<info>'...$name...'.is.valid, |
653e0 | 20 62 75 74 20 77 69 74 68 20 61 20 66 65 77 20 77 61 72 6e 69 6e 67 73 3c 2f 69 6e 66 6f 3e 27 | .but.with.a.few.warnings</info>' |
65400 | 29 3b 0a 24 64 6f 50 72 69 6e 74 53 63 68 65 6d 61 55 72 6c 20 3d 20 24 70 72 69 6e 74 53 63 68 | );.$doPrintSchemaUrl.=.$printSch |
65420 | 65 6d 61 55 72 6c 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 6c 6f 63 6b 45 72 72 6f 72 73 29 20 7b | emaUrl;.}.elseif.($lockErrors).{ |
65440 | 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 3c 69 6e 66 6f 3e 27 20 2e 20 24 6e 61 6d 65 20 2e 20 27 | .$io->write('<info>'...$name...' |
65460 | 20 69 73 20 76 61 6c 69 64 20 62 75 74 20 79 6f 75 72 20 63 6f 6d 70 6f 73 65 72 2e 6c 6f 63 6b | .is.valid.but.your.composer.lock |
65480 | 20 68 61 73 20 73 6f 6d 65 20 27 2e 28 24 63 68 65 63 6b 4c 6f 63 6b 20 3f 20 27 65 72 72 6f 72 | .has.some.'.($checkLock.?.'error |
654a0 | 73 27 20 3a 20 27 77 61 72 6e 69 6e 67 73 27 29 2e 27 3c 2f 69 6e 66 6f 3e 27 29 3b 0a 7d 20 65 | s'.:.'warnings').'</info>');.}.e |
654c0 | 6c 73 65 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 3c 69 6e 66 6f 3e 27 20 2e 20 24 6e 61 6d | lse.{.$io->write('<info>'...$nam |
654e0 | 65 20 2e 20 27 20 69 73 20 76 61 6c 69 64 3c 2f 69 6e 66 6f 3e 27 29 3b 0a 7d 0a 0a 69 66 20 28 | e...'.is.valid</info>');.}..if.( |
65500 | 24 64 6f 50 72 69 6e 74 53 63 68 65 6d 61 55 72 6c 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 | $doPrintSchemaUrl).{.$io->writeE |
65520 | 72 72 6f 72 28 27 3c 77 61 72 6e 69 6e 67 3e 53 65 65 20 68 74 74 70 73 3a 2f 2f 67 65 74 63 6f | rror('<warning>See.https://getco |
65540 | 6d 70 6f 73 65 72 2e 6f 72 67 2f 64 6f 63 2f 30 34 2d 73 63 68 65 6d 61 2e 6d 64 20 66 6f 72 20 | mposer.org/doc/04-schema.md.for. |
65560 | 64 65 74 61 69 6c 73 20 6f 6e 20 74 68 65 20 73 63 68 65 6d 61 3c 2f 77 61 72 6e 69 6e 67 3e 27 | details.on.the.schema</warning>' |
65580 | 29 3b 0a 7d 0a 0a 69 66 20 28 24 65 72 72 6f 72 73 29 20 7b 0a 24 65 72 72 6f 72 73 20 3d 20 61 | );.}..if.($errors).{.$errors.=.a |
655a0 | 72 72 61 79 5f 6d 61 70 28 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 65 72 72 29 3a | rray_map(static.function.($err): |
655c0 | 20 73 74 72 69 6e 67 20 7b 0a 72 65 74 75 72 6e 20 27 2d 20 27 20 2e 20 24 65 72 72 3b 0a 7d 2c | .string.{.return.'-.'...$err;.}, |
655e0 | 20 24 65 72 72 6f 72 73 29 3b 0a 61 72 72 61 79 5f 75 6e 73 68 69 66 74 28 24 65 72 72 6f 72 73 | .$errors);.array_unshift($errors |
65600 | 2c 20 27 23 20 47 65 6e 65 72 61 6c 20 65 72 72 6f 72 73 27 29 3b 0a 7d 0a 69 66 20 28 24 77 61 | ,.'#.General.errors');.}.if.($wa |
65620 | 72 6e 69 6e 67 73 29 20 7b 0a 24 77 61 72 6e 69 6e 67 73 20 3d 20 61 72 72 61 79 5f 6d 61 70 28 | rnings).{.$warnings.=.array_map( |
65640 | 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 65 72 72 29 3a 20 73 74 72 69 6e 67 20 7b | static.function.($err):.string.{ |
65660 | 0a 72 65 74 75 72 6e 20 27 2d 20 27 20 2e 20 24 65 72 72 3b 0a 7d 2c 20 24 77 61 72 6e 69 6e 67 | .return.'-.'...$err;.},.$warning |
65680 | 73 29 3b 0a 61 72 72 61 79 5f 75 6e 73 68 69 66 74 28 24 77 61 72 6e 69 6e 67 73 2c 20 27 23 20 | s);.array_unshift($warnings,.'#. |
656a0 | 47 65 6e 65 72 61 6c 20 77 61 72 6e 69 6e 67 73 27 29 3b 0a 7d 0a 0a 0a 24 65 78 74 72 61 57 61 | General.warnings');.}...$extraWa |
656c0 | 72 6e 69 6e 67 73 20 3d 20 5b 5d 3b 0a 0a 0a 69 66 20 28 24 70 75 62 6c 69 73 68 45 72 72 6f 72 | rnings.=.[];...if.($publishError |
656e0 | 73 29 20 7b 0a 24 70 75 62 6c 69 73 68 45 72 72 6f 72 73 20 3d 20 61 72 72 61 79 5f 6d 61 70 28 | s).{.$publishErrors.=.array_map( |
65700 | 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 65 72 72 29 3a 20 73 74 72 69 6e 67 20 7b | static.function.($err):.string.{ |
65720 | 0a 72 65 74 75 72 6e 20 27 2d 20 27 20 2e 20 24 65 72 72 3b 0a 7d 2c 20 24 70 75 62 6c 69 73 68 | .return.'-.'...$err;.},.$publish |
65740 | 45 72 72 6f 72 73 29 3b 0a 0a 69 66 20 28 24 63 68 65 63 6b 50 75 62 6c 69 73 68 29 20 7b 0a 61 | Errors);..if.($checkPublish).{.a |
65760 | 72 72 61 79 5f 75 6e 73 68 69 66 74 28 24 70 75 62 6c 69 73 68 45 72 72 6f 72 73 2c 20 27 23 20 | rray_unshift($publishErrors,.'#. |
65780 | 50 75 62 6c 69 73 68 20 65 72 72 6f 72 73 27 29 3b 0a 24 65 72 72 6f 72 73 20 3d 20 61 72 72 61 | Publish.errors');.$errors.=.arra |
657a0 | 79 5f 6d 65 72 67 65 28 24 65 72 72 6f 72 73 2c 20 24 70 75 62 6c 69 73 68 45 72 72 6f 72 73 29 | y_merge($errors,.$publishErrors) |
657c0 | 3b 0a 7d 20 65 6c 73 65 20 7b 0a 61 72 72 61 79 5f 75 6e 73 68 69 66 74 28 24 70 75 62 6c 69 73 | ;.}.else.{.array_unshift($publis |
657e0 | 68 45 72 72 6f 72 73 2c 20 27 23 20 50 75 62 6c 69 73 68 20 77 61 72 6e 69 6e 67 73 27 29 3b 0a | hErrors,.'#.Publish.warnings');. |
65800 | 24 65 78 74 72 61 57 61 72 6e 69 6e 67 73 20 3d 20 61 72 72 61 79 5f 6d 65 72 67 65 28 24 65 78 | $extraWarnings.=.array_merge($ex |
65820 | 74 72 61 57 61 72 6e 69 6e 67 73 2c 20 24 70 75 62 6c 69 73 68 45 72 72 6f 72 73 29 3b 0a 7d 0a | traWarnings,.$publishErrors);.}. |
65840 | 7d 0a 0a 0a 69 66 20 28 24 6c 6f 63 6b 45 72 72 6f 72 73 29 20 7b 0a 69 66 20 28 24 63 68 65 63 | }...if.($lockErrors).{.if.($chec |
65860 | 6b 4c 6f 63 6b 29 20 7b 0a 61 72 72 61 79 5f 75 6e 73 68 69 66 74 28 24 6c 6f 63 6b 45 72 72 6f | kLock).{.array_unshift($lockErro |
65880 | 72 73 2c 20 27 23 20 4c 6f 63 6b 20 66 69 6c 65 20 65 72 72 6f 72 73 27 29 3b 0a 24 65 72 72 6f | rs,.'#.Lock.file.errors');.$erro |
658a0 | 72 73 20 3d 20 61 72 72 61 79 5f 6d 65 72 67 65 28 24 65 72 72 6f 72 73 2c 20 24 6c 6f 63 6b 45 | rs.=.array_merge($errors,.$lockE |
658c0 | 72 72 6f 72 73 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 61 72 72 61 79 5f 75 6e 73 68 69 66 74 28 24 | rrors);.}.else.{.array_unshift($ |
658e0 | 6c 6f 63 6b 45 72 72 6f 72 73 2c 20 27 23 20 4c 6f 63 6b 20 66 69 6c 65 20 77 61 72 6e 69 6e 67 | lockErrors,.'#.Lock.file.warning |
65900 | 73 27 29 3b 0a 24 65 78 74 72 61 57 61 72 6e 69 6e 67 73 20 3d 20 61 72 72 61 79 5f 6d 65 72 67 | s');.$extraWarnings.=.array_merg |
65920 | 65 28 24 65 78 74 72 61 57 61 72 6e 69 6e 67 73 2c 20 24 6c 6f 63 6b 45 72 72 6f 72 73 29 3b 0a | e($extraWarnings,.$lockErrors);. |
65940 | 7d 0a 7d 0a 0a 24 6d 65 73 73 61 67 65 73 20 3d 20 5b 0a 27 65 72 72 6f 72 27 20 3d 3e 20 24 65 | }.}..$messages.=.[.'error'.=>.$e |
65960 | 72 72 6f 72 73 2c 0a 27 77 61 72 6e 69 6e 67 27 20 3d 3e 20 61 72 72 61 79 5f 6d 65 72 67 65 28 | rrors,.'warning'.=>.array_merge( |
65980 | 24 77 61 72 6e 69 6e 67 73 2c 20 24 65 78 74 72 61 57 61 72 6e 69 6e 67 73 29 2c 0a 5d 3b 0a 0a | $warnings,.$extraWarnings),.];.. |
659a0 | 66 6f 72 65 61 63 68 20 28 24 6d 65 73 73 61 67 65 73 20 61 73 20 24 73 74 79 6c 65 20 3d 3e 20 | foreach.($messages.as.$style.=>. |
659c0 | 24 6d 73 67 73 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 6d 73 67 73 20 61 73 20 24 6d 73 67 29 | $msgs).{.foreach.($msgs.as.$msg) |
659e0 | 20 7b 0a 69 66 20 28 73 74 72 70 6f 73 28 24 6d 73 67 2c 20 27 23 27 29 20 3d 3d 3d 20 30 29 20 | .{.if.(strpos($msg,.'#').===.0). |
65a00 | 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 27 20 2e 20 24 73 74 79 6c 65 20 2e | {.$io->writeError('<'...$style.. |
65a20 | 20 27 3e 27 20 2e 20 24 6d 73 67 20 2e 20 27 3c 2f 27 20 2e 20 24 73 74 79 6c 65 20 2e 20 27 3e | .'>'...$msg...'</'...$style...'> |
65a40 | 27 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 24 6d 73 | ');.}.else.{.$io->writeError($ms |
65a60 | 67 29 3b 0a 7d 0a 7d 0a 7d 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 | g);.}.}.}.}.}.<?php.declare(stri |
65a80 | 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 | ct_types=1);............namespac |
65aa0 | 65 20 43 6f 6d 70 6f 73 65 72 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 | e.Composer;..use.Composer\Packag |
65ac0 | 65 5c 4c 6f 63 6b 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 63 72 65 5c 50 72 65 67 | e\Locker;.use.Composer\Pcre\Preg |
65ae0 | 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 6c 75 67 69 6e 5c 50 6c 75 67 69 6e 4d 61 6e 61 | ;.use.Composer\Plugin\PluginMana |
65b00 | 67 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 44 6f 77 6e 6c 6f 61 64 65 72 5c 44 6f 77 | ger;.use.Composer\Downloader\Dow |
65b20 | 6e 6c 6f 61 64 4d 61 6e 61 67 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 41 75 74 6f 6c | nloadManager;.use.Composer\Autol |
65b40 | 6f 61 64 5c 41 75 74 6f 6c 6f 61 64 47 65 6e 65 72 61 74 6f 72 3b 0a 75 73 65 20 43 6f 6d 70 6f | oad\AutoloadGenerator;.use.Compo |
65b60 | 73 65 72 5c 50 61 63 6b 61 67 65 5c 41 72 63 68 69 76 65 72 5c 41 72 63 68 69 76 65 4d 61 6e 61 | ser\Package\Archiver\ArchiveMana |
65b80 | 67 65 72 3b 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 43 6f 6d 70 6f 73 65 72 20 65 78 74 65 6e 64 | ger;.......class.Composer.extend |
65ba0 | 73 20 50 61 72 74 69 61 6c 43 6f 6d 70 6f 73 65 72 0a 7b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a | s.PartialComposer.{............. |
65bc0 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 56 45 52 53 49 4f | .............public.const.VERSIO |
65be0 | 4e 20 3d 20 27 32 2e 34 2e 31 27 3b 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 42 52 41 4e 43 48 | N.=.'2.4.1';.public.const.BRANCH |
65c00 | 5f 41 4c 49 41 53 5f 56 45 52 53 49 4f 4e 20 3d 20 27 27 3b 0a 70 75 62 6c 69 63 20 63 6f 6e 73 | _ALIAS_VERSION.=.'';.public.cons |
65c20 | 74 20 52 45 4c 45 41 53 45 5f 44 41 54 45 20 3d 20 27 32 30 32 32 2d 30 38 2d 32 30 20 31 31 3a | t.RELEASE_DATE.=.'2022-08-20.11: |
65c40 | 34 34 3a 35 30 27 3b 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 53 4f 55 52 43 45 5f 56 45 52 53 | 44:50';.public.const.SOURCE_VERS |
65c60 | 49 4f 4e 20 3d 20 27 27 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 | ION.=.'';...........public.const |
65c80 | 20 52 55 4e 54 49 4d 45 5f 41 50 49 5f 56 45 52 53 49 4f 4e 20 3d 20 27 32 2e 32 2e 32 27 3b 0a | .RUNTIME_API_VERSION.=.'2.2.2';. |
65ca0 | 0a 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 56 65 72 73 69 | .public.static.function.getVersi |
65cc0 | 6f 6e 28 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 0a 69 66 20 28 73 65 6c 66 3a 3a 56 45 52 53 49 4f | on():.string.{..if.(self::VERSIO |
65ce0 | 4e 20 3d 3d 3d 20 27 40 70 61 63 6b 61 67 65 5f 76 65 72 73 69 6f 6e 27 2e 27 40 27 29 20 7b 0a | N.===.'@package_version'.'@').{. |
65d00 | 72 65 74 75 72 6e 20 73 65 6c 66 3a 3a 53 4f 55 52 43 45 5f 56 45 52 53 49 4f 4e 3b 0a 7d 0a 0a | return.self::SOURCE_VERSION;.}.. |
65d20 | 0a 69 66 20 28 73 65 6c 66 3a 3a 42 52 41 4e 43 48 5f 41 4c 49 41 53 5f 56 45 52 53 49 4f 4e 20 | .if.(self::BRANCH_ALIAS_VERSION. |
65d40 | 21 3d 3d 20 27 27 20 26 26 20 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b 5e 5b 61 2d 66 30 | !==.''.&&.Preg::isMatch('{^[a-f0 |
65d60 | 2d 39 5d 7b 34 30 7d 24 7d 27 2c 20 73 65 6c 66 3a 3a 56 45 52 53 49 4f 4e 29 29 20 7b 0a 72 65 | -9]{40}$}',.self::VERSION)).{.re |
65d80 | 74 75 72 6e 20 73 65 6c 66 3a 3a 42 52 41 4e 43 48 5f 41 4c 49 41 53 5f 56 45 52 53 49 4f 4e 2e | turn.self::BRANCH_ALIAS_VERSION. |
65da0 | 27 2b 27 2e 73 65 6c 66 3a 3a 56 45 52 53 49 4f 4e 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 73 65 6c | '+'.self::VERSION;.}..return.sel |
65dc0 | 66 3a 3a 56 45 52 53 49 4f 4e 3b 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 6c 6f 63 6b 65 | f::VERSION;.}.....private.$locke |
65de0 | 72 3b 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 64 6f 77 6e 6c 6f 61 64 4d 61 6e 61 67 65 72 3b | r;.....private.$downloadManager; |
65e00 | 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 70 6c 75 67 69 6e 4d 61 6e 61 67 65 72 3b 0a 0a 0a 0a | .....private.$pluginManager;.... |
65e20 | 0a 70 72 69 76 61 74 65 20 24 61 75 74 6f 6c 6f 61 64 47 65 6e 65 72 61 74 6f 72 3b 0a 0a 0a 0a | .private.$autoloadGenerator;.... |
65e40 | 0a 70 72 69 76 61 74 65 20 24 61 72 63 68 69 76 65 4d 61 6e 61 67 65 72 3b 0a 0a 70 75 62 6c 69 | .private.$archiveManager;..publi |
65e60 | 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 4c 6f 63 6b 65 72 28 4c 6f 63 6b 65 72 20 24 6c 6f 63 | c.function.setLocker(Locker.$loc |
65e80 | 6b 65 72 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 6c 6f 63 6b 65 72 20 3d 20 24 6c 6f | ker):.void.{.$this->locker.=.$lo |
65ea0 | 63 6b 65 72 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 4c 6f 63 6b | cker;.}..public.function.getLock |
65ec0 | 65 72 28 29 3a 20 4c 6f 63 6b 65 72 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 6c 6f 63 | er():.Locker.{.return.$this->loc |
65ee0 | 6b 65 72 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 44 6f 77 6e 6c | ker;.}..public.function.setDownl |
65f00 | 6f 61 64 4d 61 6e 61 67 65 72 28 44 6f 77 6e 6c 6f 61 64 4d 61 6e 61 67 65 72 20 24 6d 61 6e 61 | oadManager(DownloadManager.$mana |
65f20 | 67 65 72 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 64 6f 77 6e 6c 6f 61 64 4d 61 6e 61 | ger):.void.{.$this->downloadMana |
65f40 | 67 65 72 20 3d 20 24 6d 61 6e 61 67 65 72 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 | ger.=.$manager;.}..public.functi |
65f60 | 6f 6e 20 67 65 74 44 6f 77 6e 6c 6f 61 64 4d 61 6e 61 67 65 72 28 29 3a 20 44 6f 77 6e 6c 6f 61 | on.getDownloadManager():.Downloa |
65f80 | 64 4d 61 6e 61 67 65 72 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 64 6f 77 6e 6c 6f 61 | dManager.{.return.$this->downloa |
65fa0 | 64 4d 61 6e 61 67 65 72 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 | dManager;.}..public.function.set |
65fc0 | 41 72 63 68 69 76 65 4d 61 6e 61 67 65 72 28 41 72 63 68 69 76 65 4d 61 6e 61 67 65 72 20 24 6d | ArchiveManager(ArchiveManager.$m |
65fe0 | 61 6e 61 67 65 72 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 61 72 63 68 69 76 65 4d 61 | anager):.void.{.$this->archiveMa |
66000 | 6e 61 67 65 72 20 3d 20 24 6d 61 6e 61 67 65 72 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 | nager.=.$manager;.}..public.func |
66020 | 74 69 6f 6e 20 67 65 74 41 72 63 68 69 76 65 4d 61 6e 61 67 65 72 28 29 3a 20 41 72 63 68 69 76 | tion.getArchiveManager():.Archiv |
66040 | 65 4d 61 6e 61 67 65 72 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 61 72 63 68 69 76 65 | eManager.{.return.$this->archive |
66060 | 4d 61 6e 61 67 65 72 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 50 | Manager;.}..public.function.setP |
66080 | 6c 75 67 69 6e 4d 61 6e 61 67 65 72 28 50 6c 75 67 69 6e 4d 61 6e 61 67 65 72 20 24 6d 61 6e 61 | luginManager(PluginManager.$mana |
660a0 | 67 65 72 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 70 6c 75 67 69 6e 4d 61 6e 61 67 65 | ger):.void.{.$this->pluginManage |
660c0 | 72 20 3d 20 24 6d 61 6e 61 67 65 72 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e | r.=.$manager;.}..public.function |
660e0 | 20 67 65 74 50 6c 75 67 69 6e 4d 61 6e 61 67 65 72 28 29 3a 20 50 6c 75 67 69 6e 4d 61 6e 61 67 | .getPluginManager():.PluginManag |
66100 | 65 72 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 70 6c 75 67 69 6e 4d 61 6e 61 67 65 72 | er.{.return.$this->pluginManager |
66120 | 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 41 75 74 6f 6c 6f 61 64 | ;.}..public.function.setAutoload |
66140 | 47 65 6e 65 72 61 74 6f 72 28 41 75 74 6f 6c 6f 61 64 47 65 6e 65 72 61 74 6f 72 20 24 61 75 74 | Generator(AutoloadGenerator.$aut |
66160 | 6f 6c 6f 61 64 47 65 6e 65 72 61 74 6f 72 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 61 | oloadGenerator):.void.{.$this->a |
66180 | 75 74 6f 6c 6f 61 64 47 65 6e 65 72 61 74 6f 72 20 3d 20 24 61 75 74 6f 6c 6f 61 64 47 65 6e 65 | utoloadGenerator.=.$autoloadGene |
661a0 | 72 61 74 6f 72 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 41 75 74 | rator;.}..public.function.getAut |
661c0 | 6f 6c 6f 61 64 47 65 6e 65 72 61 74 6f 72 28 29 3a 20 41 75 74 6f 6c 6f 61 64 47 65 6e 65 72 61 | oloadGenerator():.AutoloadGenera |
661e0 | 74 6f 72 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 61 75 74 6f 6c 6f 61 64 47 65 6e 65 | tor.{.return.$this->autoloadGene |
66200 | 72 61 74 6f 72 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f | rator;.}.}.<?php.declare(strict_ |
66220 | 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 | types=1);............namespace.C |
66240 | 6f 6d 70 6f 73 65 72 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 66 69 67 5c 43 6f | omposer;..use.Composer\Config\Co |
66260 | 6e 66 69 67 53 6f 75 72 63 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 | nfigSourceInterface;.use.Compose |
66280 | 72 5c 44 6f 77 6e 6c 6f 61 64 65 72 5c 54 72 61 6e 73 70 6f 72 74 45 78 63 65 70 74 69 6f 6e 3b | r\Downloader\TransportException; |
662a0 | 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 4f 5c 49 4f 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 | .use.Composer\IO\IOInterface;.us |
662c0 | 65 20 43 6f 6d 70 6f 73 65 72 5c 50 63 72 65 5c 50 72 65 67 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 | e.Composer\Pcre\Preg;.use.Compos |
662e0 | 65 72 5c 55 74 69 6c 5c 50 6c 61 74 66 6f 72 6d 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 | er\Util\Platform;.use.Composer\U |
66300 | 74 69 6c 5c 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3b 0a 0a 0a 0a 0a 63 6c 61 73 73 20 43 | til\ProcessExecutor;.....class.C |
66320 | 6f 6e 66 69 67 0a 7b 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 53 4f 55 52 43 45 5f 44 45 46 41 | onfig.{.public.const.SOURCE_DEFA |
66340 | 55 4c 54 20 3d 20 27 64 65 66 61 75 6c 74 27 3b 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 53 4f | ULT.=.'default';.public.const.SO |
66360 | 55 52 43 45 5f 43 4f 4d 4d 41 4e 44 20 3d 20 27 63 6f 6d 6d 61 6e 64 27 3b 0a 70 75 62 6c 69 63 | URCE_COMMAND.=.'command';.public |
66380 | 20 63 6f 6e 73 74 20 53 4f 55 52 43 45 5f 55 4e 4b 4e 4f 57 4e 20 3d 20 27 75 6e 6b 6e 6f 77 6e | .const.SOURCE_UNKNOWN.=.'unknown |
663a0 | 27 3b 0a 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 52 45 4c 41 54 49 56 45 5f 50 41 54 48 53 20 | ';..public.const.RELATIVE_PATHS. |
663c0 | 3d 20 31 3b 0a 0a 0a 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 24 64 65 66 61 75 6c 74 43 6f 6e | =.1;...public.static.$defaultCon |
663e0 | 66 69 67 20 3d 20 5b 0a 27 70 72 6f 63 65 73 73 2d 74 69 6d 65 6f 75 74 27 20 3d 3e 20 33 30 30 | fig.=.[.'process-timeout'.=>.300 |
66400 | 2c 0a 27 75 73 65 2d 69 6e 63 6c 75 64 65 2d 70 61 74 68 27 20 3d 3e 20 66 61 6c 73 65 2c 0a 27 | ,.'use-include-path'.=>.false,.' |
66420 | 61 6c 6c 6f 77 2d 70 6c 75 67 69 6e 73 27 20 3d 3e 20 5b 5d 2c 0a 27 75 73 65 2d 70 61 72 65 6e | allow-plugins'.=>.[],.'use-paren |
66440 | 74 2d 64 69 72 27 20 3d 3e 20 27 70 72 6f 6d 70 74 27 2c 0a 27 70 72 65 66 65 72 72 65 64 2d 69 | t-dir'.=>.'prompt',.'preferred-i |
66460 | 6e 73 74 61 6c 6c 27 20 3d 3e 20 27 64 69 73 74 27 2c 0a 27 6e 6f 74 69 66 79 2d 6f 6e 2d 69 6e | nstall'.=>.'dist',.'notify-on-in |
66480 | 73 74 61 6c 6c 27 20 3d 3e 20 74 72 75 65 2c 0a 27 67 69 74 68 75 62 2d 70 72 6f 74 6f 63 6f 6c | stall'.=>.true,.'github-protocol |
664a0 | 73 27 20 3d 3e 20 5b 27 68 74 74 70 73 27 2c 20 27 73 73 68 27 2c 20 27 67 69 74 27 5d 2c 0a 27 | s'.=>.['https',.'ssh',.'git'],.' |
664c0 | 67 69 74 6c 61 62 2d 70 72 6f 74 6f 63 6f 6c 27 20 3d 3e 20 6e 75 6c 6c 2c 0a 27 76 65 6e 64 6f | gitlab-protocol'.=>.null,.'vendo |
664e0 | 72 2d 64 69 72 27 20 3d 3e 20 27 76 65 6e 64 6f 72 27 2c 0a 27 62 69 6e 2d 64 69 72 27 20 3d 3e | r-dir'.=>.'vendor',.'bin-dir'.=> |
66500 | 20 27 7b 24 76 65 6e 64 6f 72 2d 64 69 72 7d 2f 62 69 6e 27 2c 0a 27 63 61 63 68 65 2d 64 69 72 | .'{$vendor-dir}/bin',.'cache-dir |
66520 | 27 20 3d 3e 20 27 7b 24 68 6f 6d 65 7d 2f 63 61 63 68 65 27 2c 0a 27 64 61 74 61 2d 64 69 72 27 | '.=>.'{$home}/cache',.'data-dir' |
66540 | 20 3d 3e 20 27 7b 24 68 6f 6d 65 7d 27 2c 0a 27 63 61 63 68 65 2d 66 69 6c 65 73 2d 64 69 72 27 | .=>.'{$home}',.'cache-files-dir' |
66560 | 20 3d 3e 20 27 7b 24 63 61 63 68 65 2d 64 69 72 7d 2f 66 69 6c 65 73 27 2c 0a 27 63 61 63 68 65 | .=>.'{$cache-dir}/files',.'cache |
66580 | 2d 72 65 70 6f 2d 64 69 72 27 20 3d 3e 20 27 7b 24 63 61 63 68 65 2d 64 69 72 7d 2f 72 65 70 6f | -repo-dir'.=>.'{$cache-dir}/repo |
665a0 | 27 2c 0a 27 63 61 63 68 65 2d 76 63 73 2d 64 69 72 27 20 3d 3e 20 27 7b 24 63 61 63 68 65 2d 64 | ',.'cache-vcs-dir'.=>.'{$cache-d |
665c0 | 69 72 7d 2f 76 63 73 27 2c 0a 27 63 61 63 68 65 2d 74 74 6c 27 20 3d 3e 20 31 35 35 35 32 30 30 | ir}/vcs',.'cache-ttl'.=>.1555200 |
665e0 | 30 2c 20 0a 27 63 61 63 68 65 2d 66 69 6c 65 73 2d 74 74 6c 27 20 3d 3e 20 6e 75 6c 6c 2c 20 0a | 0,..'cache-files-ttl'.=>.null,.. |
66600 | 27 63 61 63 68 65 2d 66 69 6c 65 73 2d 6d 61 78 73 69 7a 65 27 20 3d 3e 20 27 33 30 30 4d 69 42 | 'cache-files-maxsize'.=>.'300MiB |
66620 | 27 2c 0a 27 63 61 63 68 65 2d 72 65 61 64 2d 6f 6e 6c 79 27 20 3d 3e 20 66 61 6c 73 65 2c 0a 27 | ',.'cache-read-only'.=>.false,.' |
66640 | 62 69 6e 2d 63 6f 6d 70 61 74 27 20 3d 3e 20 27 61 75 74 6f 27 2c 0a 27 64 69 73 63 61 72 64 2d | bin-compat'.=>.'auto',.'discard- |
66660 | 63 68 61 6e 67 65 73 27 20 3d 3e 20 66 61 6c 73 65 2c 0a 27 61 75 74 6f 6c 6f 61 64 65 72 2d 73 | changes'.=>.false,.'autoloader-s |
66680 | 75 66 66 69 78 27 20 3d 3e 20 6e 75 6c 6c 2c 0a 27 73 6f 72 74 2d 70 61 63 6b 61 67 65 73 27 20 | uffix'.=>.null,.'sort-packages'. |
666a0 | 3d 3e 20 66 61 6c 73 65 2c 0a 27 6f 70 74 69 6d 69 7a 65 2d 61 75 74 6f 6c 6f 61 64 65 72 27 20 | =>.false,.'optimize-autoloader'. |
666c0 | 3d 3e 20 66 61 6c 73 65 2c 0a 27 63 6c 61 73 73 6d 61 70 2d 61 75 74 68 6f 72 69 74 61 74 69 76 | =>.false,.'classmap-authoritativ |
666e0 | 65 27 20 3d 3e 20 66 61 6c 73 65 2c 0a 27 61 70 63 75 2d 61 75 74 6f 6c 6f 61 64 65 72 27 20 3d | e'.=>.false,.'apcu-autoloader'.= |
66700 | 3e 20 66 61 6c 73 65 2c 0a 27 70 72 65 70 65 6e 64 2d 61 75 74 6f 6c 6f 61 64 65 72 27 20 3d 3e | >.false,.'prepend-autoloader'.=> |
66720 | 20 74 72 75 65 2c 0a 27 67 69 74 68 75 62 2d 64 6f 6d 61 69 6e 73 27 20 3d 3e 20 5b 27 67 69 74 | .true,.'github-domains'.=>.['git |
66740 | 68 75 62 2e 63 6f 6d 27 5d 2c 0a 27 62 69 74 62 75 63 6b 65 74 2d 65 78 70 6f 73 65 2d 68 6f 73 | hub.com'],.'bitbucket-expose-hos |
66760 | 74 6e 61 6d 65 27 20 3d 3e 20 74 72 75 65 2c 0a 27 64 69 73 61 62 6c 65 2d 74 6c 73 27 20 3d 3e | tname'.=>.true,.'disable-tls'.=> |
66780 | 20 66 61 6c 73 65 2c 0a 27 73 65 63 75 72 65 2d 68 74 74 70 27 20 3d 3e 20 74 72 75 65 2c 0a 27 | .false,.'secure-http'.=>.true,.' |
667a0 | 73 65 63 75 72 65 2d 73 76 6e 2d 64 6f 6d 61 69 6e 73 27 20 3d 3e 20 5b 5d 2c 0a 27 63 61 66 69 | secure-svn-domains'.=>.[],.'cafi |
667c0 | 6c 65 27 20 3d 3e 20 6e 75 6c 6c 2c 0a 27 63 61 70 61 74 68 27 20 3d 3e 20 6e 75 6c 6c 2c 0a 27 | le'.=>.null,.'capath'.=>.null,.' |
667e0 | 67 69 74 68 75 62 2d 65 78 70 6f 73 65 2d 68 6f 73 74 6e 61 6d 65 27 20 3d 3e 20 74 72 75 65 2c | github-expose-hostname'.=>.true, |
66800 | 0a 27 67 69 74 6c 61 62 2d 64 6f 6d 61 69 6e 73 27 20 3d 3e 20 5b 27 67 69 74 6c 61 62 2e 63 6f | .'gitlab-domains'.=>.['gitlab.co |
66820 | 6d 27 5d 2c 0a 27 73 74 6f 72 65 2d 61 75 74 68 73 27 20 3d 3e 20 27 70 72 6f 6d 70 74 27 2c 0a | m'],.'store-auths'.=>.'prompt',. |
66840 | 27 70 6c 61 74 66 6f 72 6d 27 20 3d 3e 20 5b 5d 2c 0a 27 61 72 63 68 69 76 65 2d 66 6f 72 6d 61 | 'platform'.=>.[],.'archive-forma |
66860 | 74 27 20 3d 3e 20 27 74 61 72 27 2c 0a 27 61 72 63 68 69 76 65 2d 64 69 72 27 20 3d 3e 20 27 2e | t'.=>.'tar',.'archive-dir'.=>.'. |
66880 | 27 2c 0a 27 68 74 61 63 63 65 73 73 2d 70 72 6f 74 65 63 74 27 20 3d 3e 20 74 72 75 65 2c 0a 27 | ',.'htaccess-protect'.=>.true,.' |
668a0 | 75 73 65 2d 67 69 74 68 75 62 2d 61 70 69 27 20 3d 3e 20 74 72 75 65 2c 0a 27 6c 6f 63 6b 27 20 | use-github-api'.=>.true,.'lock'. |
668c0 | 3d 3e 20 74 72 75 65 2c 0a 27 70 6c 61 74 66 6f 72 6d 2d 63 68 65 63 6b 27 20 3d 3e 20 27 70 68 | =>.true,.'platform-check'.=>.'ph |
668e0 | 70 2d 6f 6e 6c 79 27 2c 0a 27 62 69 74 62 75 63 6b 65 74 2d 6f 61 75 74 68 27 20 3d 3e 20 5b 5d | p-only',.'bitbucket-oauth'.=>.[] |
66900 | 2c 0a 27 67 69 74 68 75 62 2d 6f 61 75 74 68 27 20 3d 3e 20 5b 5d 2c 0a 27 67 69 74 6c 61 62 2d | ,.'github-oauth'.=>.[],.'gitlab- |
66920 | 6f 61 75 74 68 27 20 3d 3e 20 5b 5d 2c 0a 27 67 69 74 6c 61 62 2d 74 6f 6b 65 6e 27 20 3d 3e 20 | oauth'.=>.[],.'gitlab-token'.=>. |
66940 | 5b 5d 2c 0a 27 68 74 74 70 2d 62 61 73 69 63 27 20 3d 3e 20 5b 5d 2c 0a 27 62 65 61 72 65 72 27 | [],.'http-basic'.=>.[],.'bearer' |
66960 | 20 3d 3e 20 5b 5d 2c 0a 5d 3b 0a 0a 0a 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 24 64 65 66 61 | .=>.[],.];...public.static.$defa |
66980 | 75 6c 74 52 65 70 6f 73 69 74 6f 72 69 65 73 20 3d 20 5b 0a 27 70 61 63 6b 61 67 69 73 74 2e 6f | ultRepositories.=.[.'packagist.o |
669a0 | 72 67 27 20 3d 3e 20 5b 0a 27 74 79 70 65 27 20 3d 3e 20 27 63 6f 6d 70 6f 73 65 72 27 2c 0a 27 | rg'.=>.[.'type'.=>.'composer',.' |
669c0 | 75 72 6c 27 20 3d 3e 20 27 68 74 74 70 73 3a 2f 2f 72 65 70 6f 2e 70 61 63 6b 61 67 69 73 74 2e | url'.=>.'https://repo.packagist. |
669e0 | 6f 72 67 27 2c 0a 5d 2c 0a 5d 3b 0a 0a 0a 70 72 69 76 61 74 65 20 24 63 6f 6e 66 69 67 3b 0a 0a | org',.],.];...private.$config;.. |
66a00 | 70 72 69 76 61 74 65 20 24 62 61 73 65 44 69 72 3b 0a 0a 70 72 69 76 61 74 65 20 24 72 65 70 6f | private.$baseDir;..private.$repo |
66a20 | 73 69 74 6f 72 69 65 73 3b 0a 0a 70 72 69 76 61 74 65 20 24 63 6f 6e 66 69 67 53 6f 75 72 63 65 | sitories;..private.$configSource |
66a40 | 3b 0a 0a 70 72 69 76 61 74 65 20 24 61 75 74 68 43 6f 6e 66 69 67 53 6f 75 72 63 65 3b 0a 0a 70 | ;..private.$authConfigSource;..p |
66a60 | 72 69 76 61 74 65 20 24 75 73 65 45 6e 76 69 72 6f 6e 6d 65 6e 74 3b 0a 0a 70 72 69 76 61 74 65 | rivate.$useEnvironment;..private |
66a80 | 20 24 77 61 72 6e 65 64 48 6f 73 74 73 20 3d 20 5b 5d 3b 0a 0a 70 72 69 76 61 74 65 20 24 73 73 | .$warnedHosts.=.[];..private.$ss |
66aa0 | 6c 56 65 72 69 66 79 57 61 72 6e 65 64 48 6f 73 74 73 20 3d 20 5b 5d 3b 0a 0a 70 72 69 76 61 74 | lVerifyWarnedHosts.=.[];..privat |
66ac0 | 65 20 24 73 6f 75 72 63 65 4f 66 43 6f 6e 66 69 67 56 61 6c 75 65 20 3d 20 5b 5d 3b 0a 0a 0a 0a | e.$sourceOfConfigValue.=.[];.... |
66ae0 | 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 62 6f | ..public.function.__construct(bo |
66b00 | 6f 6c 20 24 75 73 65 45 6e 76 69 72 6f 6e 6d 65 6e 74 20 3d 20 74 72 75 65 2c 20 3f 73 74 72 69 | ol.$useEnvironment.=.true,.?stri |
66b20 | 6e 67 20 24 62 61 73 65 44 69 72 20 3d 20 6e 75 6c 6c 29 0a 7b 0a 0a 24 74 68 69 73 2d 3e 63 6f | ng.$baseDir.=.null).{..$this->co |
66b40 | 6e 66 69 67 20 3d 20 73 74 61 74 69 63 3a 3a 24 64 65 66 61 75 6c 74 43 6f 6e 66 69 67 3b 0a 0a | nfig.=.static::$defaultConfig;.. |
66b60 | 24 74 68 69 73 2d 3e 72 65 70 6f 73 69 74 6f 72 69 65 73 20 3d 20 73 74 61 74 69 63 3a 3a 24 64 | $this->repositories.=.static::$d |
66b80 | 65 66 61 75 6c 74 52 65 70 6f 73 69 74 6f 72 69 65 73 3b 0a 24 74 68 69 73 2d 3e 75 73 65 45 6e | efaultRepositories;.$this->useEn |
66ba0 | 76 69 72 6f 6e 6d 65 6e 74 20 3d 20 28 62 6f 6f 6c 29 20 24 75 73 65 45 6e 76 69 72 6f 6e 6d 65 | vironment.=.(bool).$useEnvironme |
66bc0 | 6e 74 3b 0a 24 74 68 69 73 2d 3e 62 61 73 65 44 69 72 20 3d 20 69 73 5f 73 74 72 69 6e 67 28 24 | nt;.$this->baseDir.=.is_string($ |
66be0 | 62 61 73 65 44 69 72 29 20 26 26 20 27 27 20 21 3d 3d 20 24 62 61 73 65 44 69 72 20 3f 20 24 62 | baseDir).&&.''.!==.$baseDir.?.$b |
66c00 | 61 73 65 44 69 72 20 3a 20 6e 75 6c 6c 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e | aseDir.:.null;..foreach.($this-> |
66c20 | 63 6f 6e 66 69 67 20 61 73 20 24 63 6f 6e 66 69 67 4b 65 79 20 3d 3e 20 24 63 6f 6e 66 69 67 56 | config.as.$configKey.=>.$configV |
66c40 | 61 6c 75 65 29 20 7b 0a 24 74 68 69 73 2d 3e 73 65 74 53 6f 75 72 63 65 4f 66 43 6f 6e 66 69 67 | alue).{.$this->setSourceOfConfig |
66c60 | 56 61 6c 75 65 28 24 63 6f 6e 66 69 67 56 61 6c 75 65 2c 20 24 63 6f 6e 66 69 67 4b 65 79 2c 20 | Value($configValue,.$configKey,. |
66c80 | 73 65 6c 66 3a 3a 53 4f 55 52 43 45 5f 44 45 46 41 55 4c 54 29 3b 0a 7d 0a 0a 66 6f 72 65 61 63 | self::SOURCE_DEFAULT);.}..foreac |
66ca0 | 68 20 28 24 74 68 69 73 2d 3e 72 65 70 6f 73 69 74 6f 72 69 65 73 20 61 73 20 24 63 6f 6e 66 69 | h.($this->repositories.as.$confi |
66cc0 | 67 4b 65 79 20 3d 3e 20 24 63 6f 6e 66 69 67 56 61 6c 75 65 29 20 7b 0a 24 74 68 69 73 2d 3e 73 | gKey.=>.$configValue).{.$this->s |
66ce0 | 65 74 53 6f 75 72 63 65 4f 66 43 6f 6e 66 69 67 56 61 6c 75 65 28 24 63 6f 6e 66 69 67 56 61 6c | etSourceOfConfigValue($configVal |
66d00 | 75 65 2c 20 27 72 65 70 6f 73 69 74 6f 72 69 65 73 2e 27 20 2e 20 24 63 6f 6e 66 69 67 4b 65 79 | ue,.'repositories.'...$configKey |
66d20 | 2c 20 73 65 6c 66 3a 3a 53 4f 55 52 43 45 5f 44 45 46 41 55 4c 54 29 3b 0a 7d 0a 7d 0a 0a 70 75 | ,.self::SOURCE_DEFAULT);.}.}..pu |
66d40 | 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 43 6f 6e 66 69 67 53 6f 75 72 63 65 28 43 6f | blic.function.setConfigSource(Co |
66d60 | 6e 66 69 67 53 6f 75 72 63 65 49 6e 74 65 72 66 61 63 65 20 24 73 6f 75 72 63 65 29 3a 20 76 6f | nfigSourceInterface.$source):.vo |
66d80 | 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 53 6f 75 72 63 65 20 3d 20 24 73 6f 75 72 | id.{.$this->configSource.=.$sour |
66da0 | 63 65 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 43 6f 6e 66 69 67 | ce;.}..public.function.getConfig |
66dc0 | 53 6f 75 72 63 65 28 29 3a 20 43 6f 6e 66 69 67 53 6f 75 72 63 65 49 6e 74 65 72 66 61 63 65 0a | Source():.ConfigSourceInterface. |
66de0 | 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 53 6f 75 72 63 65 3b 0a 7d 0a | {.return.$this->configSource;.}. |
66e00 | 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 41 75 74 68 43 6f 6e 66 69 67 53 6f | .public.function.setAuthConfigSo |
66e20 | 75 72 63 65 28 43 6f 6e 66 69 67 53 6f 75 72 63 65 49 6e 74 65 72 66 61 63 65 20 24 73 6f 75 72 | urce(ConfigSourceInterface.$sour |
66e40 | 63 65 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 61 75 74 68 43 6f 6e 66 69 67 53 6f 75 | ce):.void.{.$this->authConfigSou |
66e60 | 72 63 65 20 3d 20 24 73 6f 75 72 63 65 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f | rce.=.$source;.}..public.functio |
66e80 | 6e 20 67 65 74 41 75 74 68 43 6f 6e 66 69 67 53 6f 75 72 63 65 28 29 3a 20 43 6f 6e 66 69 67 53 | n.getAuthConfigSource():.ConfigS |
66ea0 | 6f 75 72 63 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 61 | ourceInterface.{.return.$this->a |
66ec0 | 75 74 68 43 6f 6e 66 69 67 53 6f 75 72 63 65 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 | uthConfigSource;.}.......public. |
66ee0 | 66 75 6e 63 74 69 6f 6e 20 6d 65 72 67 65 28 61 72 72 61 79 20 24 63 6f 6e 66 69 67 2c 20 73 74 | function.merge(array.$config,.st |
66f00 | 72 69 6e 67 20 24 73 6f 75 72 63 65 20 3d 20 73 65 6c 66 3a 3a 53 4f 55 52 43 45 5f 55 4e 4b 4e | ring.$source.=.self::SOURCE_UNKN |
66f20 | 4f 57 4e 29 3a 20 76 6f 69 64 0a 7b 0a 0a 69 66 20 28 21 65 6d 70 74 79 28 24 63 6f 6e 66 69 67 | OWN):.void.{..if.(!empty($config |
66f40 | 5b 27 63 6f 6e 66 69 67 27 5d 29 20 26 26 20 69 73 5f 61 72 72 61 79 28 24 63 6f 6e 66 69 67 5b | ['config']).&&.is_array($config[ |
66f60 | 27 63 6f 6e 66 69 67 27 5d 29 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 63 6f 6e 66 69 67 5b 27 | 'config'])).{.foreach.($config[' |
66f80 | 63 6f 6e 66 69 67 27 5d 20 61 73 20 24 6b 65 79 20 3d 3e 20 24 76 61 6c 29 20 7b 0a 69 66 20 28 | config'].as.$key.=>.$val).{.if.( |
66fa0 | 69 6e 5f 61 72 72 61 79 28 24 6b 65 79 2c 20 5b 27 62 69 74 62 75 63 6b 65 74 2d 6f 61 75 74 68 | in_array($key,.['bitbucket-oauth |
66fc0 | 27 2c 20 27 67 69 74 68 75 62 2d 6f 61 75 74 68 27 2c 20 27 67 69 74 6c 61 62 2d 6f 61 75 74 68 | ',.'github-oauth',.'gitlab-oauth |
66fe0 | 27 2c 20 27 67 69 74 6c 61 62 2d 74 6f 6b 65 6e 27 2c 20 27 68 74 74 70 2d 62 61 73 69 63 27 2c | ',.'gitlab-token',.'http-basic', |
67000 | 20 27 62 65 61 72 65 72 27 5d 2c 20 74 72 75 65 29 20 26 26 20 69 73 73 65 74 28 24 74 68 69 73 | .'bearer'],.true).&&.isset($this |
67020 | 2d 3e 63 6f 6e 66 69 67 5b 24 6b 65 79 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 | ->config[$key])).{.$this->config |
67040 | 5b 24 6b 65 79 5d 20 3d 20 61 72 72 61 79 5f 6d 65 72 67 65 28 24 74 68 69 73 2d 3e 63 6f 6e 66 | [$key].=.array_merge($this->conf |
67060 | 69 67 5b 24 6b 65 79 5d 2c 20 24 76 61 6c 29 3b 0a 24 74 68 69 73 2d 3e 73 65 74 53 6f 75 72 63 | ig[$key],.$val);.$this->setSourc |
67080 | 65 4f 66 43 6f 6e 66 69 67 56 61 6c 75 65 28 24 76 61 6c 2c 20 24 6b 65 79 2c 20 24 73 6f 75 72 | eOfConfigValue($val,.$key,.$sour |
670a0 | 63 65 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 69 6e 5f 61 72 72 61 79 28 24 6b 65 79 2c 20 5b 27 | ce);.}.elseif.(in_array($key,.[' |
670c0 | 61 6c 6c 6f 77 2d 70 6c 75 67 69 6e 73 27 5d 2c 20 74 72 75 65 29 20 26 26 20 69 73 73 65 74 28 | allow-plugins'],.true).&&.isset( |
670e0 | 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 6b 65 79 5d 29 20 26 26 20 69 73 5f 61 72 72 61 79 | $this->config[$key]).&&.is_array |
67100 | 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 6b 65 79 5d 29 20 26 26 20 69 73 5f 61 72 72 61 | ($this->config[$key]).&&.is_arra |
67120 | 79 28 24 76 61 6c 29 29 20 7b 0a 0a 0a 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 6b 65 79 5d | y($val)).{...$this->config[$key] |
67140 | 20 3d 20 61 72 72 61 79 5f 6d 65 72 67 65 28 24 76 61 6c 2c 20 24 74 68 69 73 2d 3e 63 6f 6e 66 | .=.array_merge($val,.$this->conf |
67160 | 69 67 5b 24 6b 65 79 5d 2c 20 24 76 61 6c 29 3b 0a 24 74 68 69 73 2d 3e 73 65 74 53 6f 75 72 63 | ig[$key],.$val);.$this->setSourc |
67180 | 65 4f 66 43 6f 6e 66 69 67 56 61 6c 75 65 28 24 76 61 6c 2c 20 24 6b 65 79 2c 20 24 73 6f 75 72 | eOfConfigValue($val,.$key,.$sour |
671a0 | 63 65 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 69 6e 5f 61 72 72 61 79 28 24 6b 65 79 2c 20 5b 27 | ce);.}.elseif.(in_array($key,.[' |
671c0 | 67 69 74 6c 61 62 2d 64 6f 6d 61 69 6e 73 27 2c 20 27 67 69 74 68 75 62 2d 64 6f 6d 61 69 6e 73 | gitlab-domains',.'github-domains |
671e0 | 27 5d 2c 20 74 72 75 65 29 20 26 26 20 69 73 73 65 74 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 | '],.true).&&.isset($this->config |
67200 | 5b 24 6b 65 79 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 6b 65 79 5d 20 3d | [$key])).{.$this->config[$key].= |
67220 | 20 61 72 72 61 79 5f 75 6e 69 71 75 65 28 61 72 72 61 79 5f 6d 65 72 67 65 28 24 74 68 69 73 2d | .array_unique(array_merge($this- |
67240 | 3e 63 6f 6e 66 69 67 5b 24 6b 65 79 5d 2c 20 24 76 61 6c 29 29 3b 0a 24 74 68 69 73 2d 3e 73 65 | >config[$key],.$val));.$this->se |
67260 | 74 53 6f 75 72 63 65 4f 66 43 6f 6e 66 69 67 56 61 6c 75 65 28 24 76 61 6c 2c 20 24 6b 65 79 2c | tSourceOfConfigValue($val,.$key, |
67280 | 20 24 73 6f 75 72 63 65 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 27 70 72 65 66 65 72 72 65 64 2d | .$source);.}.elseif.('preferred- |
672a0 | 69 6e 73 74 61 6c 6c 27 20 3d 3d 3d 20 24 6b 65 79 20 26 26 20 69 73 73 65 74 28 24 74 68 69 73 | install'.===.$key.&&.isset($this |
672c0 | 2d 3e 63 6f 6e 66 69 67 5b 24 6b 65 79 5d 29 29 20 7b 0a 69 66 20 28 69 73 5f 61 72 72 61 79 28 | ->config[$key])).{.if.(is_array( |
672e0 | 24 76 61 6c 29 20 7c 7c 20 69 73 5f 61 72 72 61 79 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b | $val).||.is_array($this->config[ |
67300 | 24 6b 65 79 5d 29 29 20 7b 0a 69 66 20 28 69 73 5f 73 74 72 69 6e 67 28 24 76 61 6c 29 29 20 7b | $key])).{.if.(is_string($val)).{ |
67320 | 0a 24 76 61 6c 20 3d 20 5b 27 2a 27 20 3d 3e 20 24 76 61 6c 5d 3b 0a 7d 0a 69 66 20 28 69 73 5f | .$val.=.['*'.=>.$val];.}.if.(is_ |
67340 | 73 74 72 69 6e 67 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 6b 65 79 5d 29 29 20 7b 0a 24 | string($this->config[$key])).{.$ |
67360 | 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 6b 65 79 5d 20 3d 20 5b 27 2a 27 20 3d 3e 20 24 74 68 | this->config[$key].=.['*'.=>.$th |
67380 | 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 6b 65 79 5d 5d 3b 0a 24 74 68 69 73 2d 3e 73 6f 75 72 63 65 | is->config[$key]];.$this->source |
673a0 | 4f 66 43 6f 6e 66 69 67 56 61 6c 75 65 5b 24 6b 65 79 20 2e 20 27 2a 27 5d 20 3d 20 24 73 6f 75 | OfConfigValue[$key...'*'].=.$sou |
673c0 | 72 63 65 3b 0a 7d 0a 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 6b 65 79 5d 20 3d 20 61 72 72 | rce;.}.$this->config[$key].=.arr |
673e0 | 61 79 5f 6d 65 72 67 65 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 6b 65 79 5d 2c 20 24 76 | ay_merge($this->config[$key],.$v |
67400 | 61 6c 29 3b 0a 24 74 68 69 73 2d 3e 73 65 74 53 6f 75 72 63 65 4f 66 43 6f 6e 66 69 67 56 61 6c | al);.$this->setSourceOfConfigVal |
67420 | 75 65 28 24 76 61 6c 2c 20 24 6b 65 79 2c 20 24 73 6f 75 72 63 65 29 3b 0a 0a 69 66 20 28 69 73 | ue($val,.$key,.$source);..if.(is |
67440 | 73 65 74 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 6b 65 79 5d 5b 27 2a 27 5d 29 29 20 7b | set($this->config[$key]['*'])).{ |
67460 | 0a 24 77 69 6c 64 63 61 72 64 20 3d 20 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 6b 65 79 5d | .$wildcard.=.$this->config[$key] |
67480 | 5b 27 2a 27 5d 3b 0a 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 6b 65 79 5d | ['*'];.unset($this->config[$key] |
674a0 | 5b 27 2a 27 5d 29 3b 0a 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 6b 65 79 5d 5b 27 2a 27 5d | ['*']);.$this->config[$key]['*'] |
674c0 | 20 3d 20 24 77 69 6c 64 63 61 72 64 3b 0a 7d 0a 7d 20 65 6c 73 65 20 7b 0a 24 74 68 69 73 2d 3e | .=.$wildcard;.}.}.else.{.$this-> |
674e0 | 63 6f 6e 66 69 67 5b 24 6b 65 79 5d 20 3d 20 24 76 61 6c 3b 0a 24 74 68 69 73 2d 3e 73 65 74 53 | config[$key].=.$val;.$this->setS |
67500 | 6f 75 72 63 65 4f 66 43 6f 6e 66 69 67 56 61 6c 75 65 28 24 76 61 6c 2c 20 24 6b 65 79 2c 20 24 | ourceOfConfigValue($val,.$key,.$ |
67520 | 73 6f 75 72 63 65 29 3b 0a 7d 0a 7d 20 65 6c 73 65 20 7b 0a 24 74 68 69 73 2d 3e 63 6f 6e 66 69 | source);.}.}.else.{.$this->confi |
67540 | 67 5b 24 6b 65 79 5d 20 3d 20 24 76 61 6c 3b 0a 24 74 68 69 73 2d 3e 73 65 74 53 6f 75 72 63 65 | g[$key].=.$val;.$this->setSource |
67560 | 4f 66 43 6f 6e 66 69 67 56 61 6c 75 65 28 24 76 61 6c 2c 20 24 6b 65 79 2c 20 24 73 6f 75 72 63 | OfConfigValue($val,.$key,.$sourc |
67580 | 65 29 3b 0a 7d 0a 7d 0a 7d 0a 0a 69 66 20 28 21 65 6d 70 74 79 28 24 63 6f 6e 66 69 67 5b 27 72 | e);.}.}.}..if.(!empty($config['r |
675a0 | 65 70 6f 73 69 74 6f 72 69 65 73 27 5d 29 20 26 26 20 69 73 5f 61 72 72 61 79 28 24 63 6f 6e 66 | epositories']).&&.is_array($conf |
675c0 | 69 67 5b 27 72 65 70 6f 73 69 74 6f 72 69 65 73 27 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 72 65 | ig['repositories'])).{.$this->re |
675e0 | 70 6f 73 69 74 6f 72 69 65 73 20 3d 20 61 72 72 61 79 5f 72 65 76 65 72 73 65 28 24 74 68 69 73 | positories.=.array_reverse($this |
67600 | 2d 3e 72 65 70 6f 73 69 74 6f 72 69 65 73 2c 20 74 72 75 65 29 3b 0a 24 6e 65 77 52 65 70 6f 73 | ->repositories,.true);.$newRepos |
67620 | 20 3d 20 61 72 72 61 79 5f 72 65 76 65 72 73 65 28 24 63 6f 6e 66 69 67 5b 27 72 65 70 6f 73 69 | .=.array_reverse($config['reposi |
67640 | 74 6f 72 69 65 73 27 5d 2c 20 74 72 75 65 29 3b 0a 66 6f 72 65 61 63 68 20 28 24 6e 65 77 52 65 | tories'],.true);.foreach.($newRe |
67660 | 70 6f 73 20 61 73 20 24 6e 61 6d 65 20 3d 3e 20 24 72 65 70 6f 73 69 74 6f 72 79 29 20 7b 0a 0a | pos.as.$name.=>.$repository).{.. |
67680 | 69 66 20 28 66 61 6c 73 65 20 3d 3d 3d 20 24 72 65 70 6f 73 69 74 6f 72 79 29 20 7b 0a 24 74 68 | if.(false.===.$repository).{.$th |
676a0 | 69 73 2d 3e 64 69 73 61 62 6c 65 52 65 70 6f 42 79 4e 61 6d 65 28 28 73 74 72 69 6e 67 29 20 24 | is->disableRepoByName((string).$ |
676c0 | 6e 61 6d 65 29 3b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 0a 69 66 20 28 69 73 5f 61 72 72 61 | name);.continue;.}...if.(is_arra |
676e0 | 79 28 24 72 65 70 6f 73 69 74 6f 72 79 29 20 26 26 20 31 20 3d 3d 3d 20 63 6f 75 6e 74 28 24 72 | y($repository).&&.1.===.count($r |
67700 | 65 70 6f 73 69 74 6f 72 79 29 20 26 26 20 66 61 6c 73 65 20 3d 3d 3d 20 63 75 72 72 65 6e 74 28 | epository).&&.false.===.current( |
67720 | 24 72 65 70 6f 73 69 74 6f 72 79 29 29 20 7b 0a 24 74 68 69 73 2d 3e 64 69 73 61 62 6c 65 52 65 | $repository)).{.$this->disableRe |
67740 | 70 6f 42 79 4e 61 6d 65 28 28 73 74 72 69 6e 67 29 20 6b 65 79 28 24 72 65 70 6f 73 69 74 6f 72 | poByName((string).key($repositor |
67760 | 79 29 29 3b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 0a 69 66 20 28 69 73 73 65 74 28 24 72 65 | y));.continue;.}...if.(isset($re |
67780 | 70 6f 73 69 74 6f 72 79 5b 27 74 79 70 65 27 5d 2c 20 24 72 65 70 6f 73 69 74 6f 72 79 5b 27 75 | pository['type'],.$repository['u |
677a0 | 72 6c 27 5d 29 20 26 26 20 24 72 65 70 6f 73 69 74 6f 72 79 5b 27 74 79 70 65 27 5d 20 3d 3d 3d | rl']).&&.$repository['type'].=== |
677c0 | 20 27 63 6f 6d 70 6f 73 65 72 27 20 26 26 20 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b 5e | .'composer'.&&.Preg::isMatch('{^ |
677e0 | 68 74 74 70 73 3f 3a 2f 2f 28 3f 3a 5b 61 2d 7a 30 2d 39 2d 2e 5d 2b 5c 2e 29 3f 70 61 63 6b 61 | https?://(?:[a-z0-9-.]+\.)?packa |
67800 | 67 69 73 74 2e 6f 72 67 28 2f 7c 24 29 7d 27 2c 20 24 72 65 70 6f 73 69 74 6f 72 79 5b 27 75 72 | gist.org(/|$)}',.$repository['ur |
67820 | 6c 27 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 64 69 73 61 62 6c 65 52 65 70 6f 42 79 4e 61 6d 65 | l'])).{.$this->disableRepoByName |
67840 | 28 27 70 61 63 6b 61 67 69 73 74 2e 6f 72 67 27 29 3b 0a 7d 0a 0a 0a 69 66 20 28 69 73 5f 69 6e | ('packagist.org');.}...if.(is_in |
67860 | 74 28 24 6e 61 6d 65 29 29 20 7b 0a 24 74 68 69 73 2d 3e 72 65 70 6f 73 69 74 6f 72 69 65 73 5b | t($name)).{.$this->repositories[ |
67880 | 5d 20 3d 20 24 72 65 70 6f 73 69 74 6f 72 79 3b 0a 24 74 68 69 73 2d 3e 73 65 74 53 6f 75 72 63 | ].=.$repository;.$this->setSourc |
678a0 | 65 4f 66 43 6f 6e 66 69 67 56 61 6c 75 65 28 24 72 65 70 6f 73 69 74 6f 72 79 2c 20 27 72 65 70 | eOfConfigValue($repository,.'rep |
678c0 | 6f 73 69 74 6f 72 69 65 73 2e 27 20 2e 20 61 72 72 61 79 5f 73 65 61 72 63 68 28 24 72 65 70 6f | ositories.'...array_search($repo |
678e0 | 73 69 74 6f 72 79 2c 20 24 74 68 69 73 2d 3e 72 65 70 6f 73 69 74 6f 72 69 65 73 2c 20 74 72 75 | sitory,.$this->repositories,.tru |
67900 | 65 29 2c 20 24 73 6f 75 72 63 65 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 69 66 20 28 24 6e 61 6d 65 | e),.$source);.}.else.{.if.($name |
67920 | 20 3d 3d 3d 20 27 70 61 63 6b 61 67 69 73 74 27 29 20 7b 20 0a 24 74 68 69 73 2d 3e 72 65 70 6f | .===.'packagist').{..$this->repo |
67940 | 73 69 74 6f 72 69 65 73 5b 24 6e 61 6d 65 20 2e 20 27 2e 6f 72 67 27 5d 20 3d 20 24 72 65 70 6f | sitories[$name...'.org'].=.$repo |
67960 | 73 69 74 6f 72 79 3b 0a 24 74 68 69 73 2d 3e 73 65 74 53 6f 75 72 63 65 4f 66 43 6f 6e 66 69 67 | sitory;.$this->setSourceOfConfig |
67980 | 56 61 6c 75 65 28 24 72 65 70 6f 73 69 74 6f 72 79 2c 20 27 72 65 70 6f 73 69 74 6f 72 69 65 73 | Value($repository,.'repositories |
679a0 | 2e 27 20 2e 20 24 6e 61 6d 65 20 2e 20 27 2e 6f 72 67 27 2c 20 24 73 6f 75 72 63 65 29 3b 0a 7d | .'...$name...'.org',.$source);.} |
679c0 | 20 65 6c 73 65 20 7b 0a 24 74 68 69 73 2d 3e 72 65 70 6f 73 69 74 6f 72 69 65 73 5b 24 6e 61 6d | .else.{.$this->repositories[$nam |
679e0 | 65 5d 20 3d 20 24 72 65 70 6f 73 69 74 6f 72 79 3b 0a 24 74 68 69 73 2d 3e 73 65 74 53 6f 75 72 | e].=.$repository;.$this->setSour |
67a00 | 63 65 4f 66 43 6f 6e 66 69 67 56 61 6c 75 65 28 24 72 65 70 6f 73 69 74 6f 72 79 2c 20 27 72 65 | ceOfConfigValue($repository,.'re |
67a20 | 70 6f 73 69 74 6f 72 69 65 73 2e 27 20 2e 20 24 6e 61 6d 65 2c 20 24 73 6f 75 72 63 65 29 3b 0a | positories.'...$name,.$source);. |
67a40 | 7d 0a 7d 0a 7d 0a 24 74 68 69 73 2d 3e 72 65 70 6f 73 69 74 6f 72 69 65 73 20 3d 20 61 72 72 61 | }.}.}.$this->repositories.=.arra |
67a60 | 79 5f 72 65 76 65 72 73 65 28 24 74 68 69 73 2d 3e 72 65 70 6f 73 69 74 6f 72 69 65 73 2c 20 74 | y_reverse($this->repositories,.t |
67a80 | 72 75 65 29 3b 0a 7d 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 | rue);.}.}.....public.function.ge |
67aa0 | 74 52 65 70 6f 73 69 74 6f 72 69 65 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 | tRepositories():.array.{.return. |
67ac0 | 24 74 68 69 73 2d 3e 72 65 70 6f 73 69 74 6f 72 69 65 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a | $this->repositories;.}.......... |
67ae0 | 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 28 73 74 72 69 6e 67 20 24 6b 65 79 2c | public.function.get(string.$key, |
67b00 | 20 69 6e 74 20 24 66 6c 61 67 73 20 3d 20 30 29 0a 7b 0a 73 77 69 74 63 68 20 28 24 6b 65 79 29 | .int.$flags.=.0).{.switch.($key) |
67b20 | 20 7b 0a 0a 63 61 73 65 20 27 76 65 6e 64 6f 72 2d 64 69 72 27 3a 0a 63 61 73 65 20 27 62 69 6e | .{..case.'vendor-dir':.case.'bin |
67b40 | 2d 64 69 72 27 3a 0a 63 61 73 65 20 27 70 72 6f 63 65 73 73 2d 74 69 6d 65 6f 75 74 27 3a 0a 63 | -dir':.case.'process-timeout':.c |
67b60 | 61 73 65 20 27 64 61 74 61 2d 64 69 72 27 3a 0a 63 61 73 65 20 27 63 61 63 68 65 2d 64 69 72 27 | ase.'data-dir':.case.'cache-dir' |
67b80 | 3a 0a 63 61 73 65 20 27 63 61 63 68 65 2d 66 69 6c 65 73 2d 64 69 72 27 3a 0a 63 61 73 65 20 27 | :.case.'cache-files-dir':.case.' |
67ba0 | 63 61 63 68 65 2d 72 65 70 6f 2d 64 69 72 27 3a 0a 63 61 73 65 20 27 63 61 63 68 65 2d 76 63 73 | cache-repo-dir':.case.'cache-vcs |
67bc0 | 2d 64 69 72 27 3a 0a 63 61 73 65 20 27 63 61 66 69 6c 65 27 3a 0a 63 61 73 65 20 27 63 61 70 61 | -dir':.case.'cafile':.case.'capa |
67be0 | 74 68 27 3a 0a 0a 24 65 6e 76 20 3d 20 27 43 4f 4d 50 4f 53 45 52 5f 27 20 2e 20 73 74 72 74 6f | th':..$env.=.'COMPOSER_'...strto |
67c00 | 75 70 70 65 72 28 73 74 72 74 72 28 24 6b 65 79 2c 20 27 2d 27 2c 20 27 5f 27 29 29 3b 0a 0a 24 | upper(strtr($key,.'-',.'_'));..$ |
67c20 | 76 61 6c 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 43 6f 6d 70 6f 73 65 72 45 6e 76 28 24 65 6e 76 | val.=.$this->getComposerEnv($env |
67c40 | 29 3b 0a 69 66 20 28 24 76 61 6c 20 21 3d 3d 20 66 61 6c 73 65 29 20 7b 0a 24 74 68 69 73 2d 3e | );.if.($val.!==.false).{.$this-> |
67c60 | 73 65 74 53 6f 75 72 63 65 4f 66 43 6f 6e 66 69 67 56 61 6c 75 65 28 24 76 61 6c 2c 20 24 6b 65 | setSourceOfConfigValue($val,.$ke |
67c80 | 79 2c 20 24 65 6e 76 29 3b 0a 7d 0a 0a 69 66 20 28 24 6b 65 79 20 3d 3d 3d 20 27 70 72 6f 63 65 | y,.$env);.}..if.($key.===.'proce |
67ca0 | 73 73 2d 74 69 6d 65 6f 75 74 27 29 20 7b 0a 72 65 74 75 72 6e 20 6d 61 78 28 30 2c 20 66 61 6c | ss-timeout').{.return.max(0,.fal |
67cc0 | 73 65 20 21 3d 3d 20 24 76 61 6c 20 3f 20 28 69 6e 74 29 20 24 76 61 6c 20 3a 20 24 74 68 69 73 | se.!==.$val.?.(int).$val.:.$this |
67ce0 | 2d 3e 63 6f 6e 66 69 67 5b 24 6b 65 79 5d 29 3b 0a 7d 0a 0a 24 76 61 6c 20 3d 20 72 74 72 69 6d | ->config[$key]);.}..$val.=.rtrim |
67d00 | 28 28 73 74 72 69 6e 67 29 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 28 66 61 6c 73 65 20 21 | ((string).$this->process(false.! |
67d20 | 3d 3d 20 24 76 61 6c 20 3f 20 24 76 61 6c 20 3a 20 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 | ==.$val.?.$val.:.$this->config[$ |
67d40 | 6b 65 79 5d 2c 20 24 66 6c 61 67 73 29 2c 20 27 2f 5c 5c 27 29 3b 0a 24 76 61 6c 20 3d 20 50 6c | key],.$flags),.'/\\');.$val.=.Pl |
67d60 | 61 74 66 6f 72 6d 3a 3a 65 78 70 61 6e 64 50 61 74 68 28 24 76 61 6c 29 3b 0a 0a 69 66 20 28 73 | atform::expandPath($val);..if.(s |
67d80 | 75 62 73 74 72 28 24 6b 65 79 2c 20 2d 34 29 20 21 3d 3d 20 27 2d 64 69 72 27 29 20 7b 0a 72 65 | ubstr($key,.-4).!==.'-dir').{.re |
67da0 | 74 75 72 6e 20 24 76 61 6c 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 28 28 24 66 6c 61 67 73 20 26 20 | turn.$val;.}..return.(($flags.&. |
67dc0 | 73 65 6c 66 3a 3a 52 45 4c 41 54 49 56 45 5f 50 41 54 48 53 29 20 3d 3d 3d 20 73 65 6c 66 3a 3a | self::RELATIVE_PATHS).===.self:: |
67de0 | 52 45 4c 41 54 49 56 45 5f 50 41 54 48 53 29 20 3f 20 24 76 61 6c 20 3a 20 24 74 68 69 73 2d 3e | RELATIVE_PATHS).?.$val.:.$this-> |
67e00 | 72 65 61 6c 70 61 74 68 28 24 76 61 6c 29 3b 0a 0a 0a 63 61 73 65 20 27 63 61 63 68 65 2d 72 65 | realpath($val);...case.'cache-re |
67e20 | 61 64 2d 6f 6e 6c 79 27 3a 0a 63 61 73 65 20 27 68 74 61 63 63 65 73 73 2d 70 72 6f 74 65 63 74 | ad-only':.case.'htaccess-protect |
67e40 | 27 3a 0a 0a 24 65 6e 76 20 3d 20 27 43 4f 4d 50 4f 53 45 52 5f 27 20 2e 20 73 74 72 74 6f 75 70 | ':..$env.=.'COMPOSER_'...strtoup |
67e60 | 70 65 72 28 73 74 72 74 72 28 24 6b 65 79 2c 20 27 2d 27 2c 20 27 5f 27 29 29 3b 0a 0a 24 76 61 | per(strtr($key,.'-',.'_'));..$va |
67e80 | 6c 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 43 6f 6d 70 6f 73 65 72 45 6e 76 28 24 65 6e 76 29 3b | l.=.$this->getComposerEnv($env); |
67ea0 | 0a 69 66 20 28 66 61 6c 73 65 20 3d 3d 3d 20 24 76 61 6c 29 20 7b 0a 24 76 61 6c 20 3d 20 24 74 | .if.(false.===.$val).{.$val.=.$t |
67ec0 | 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 6b 65 79 5d 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 74 68 69 | his->config[$key];.}.else.{.$thi |
67ee0 | 73 2d 3e 73 65 74 53 6f 75 72 63 65 4f 66 43 6f 6e 66 69 67 56 61 6c 75 65 28 24 76 61 6c 2c 20 | s->setSourceOfConfigValue($val,. |
67f00 | 24 6b 65 79 2c 20 24 65 6e 76 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 76 61 6c 20 21 3d 3d 20 | $key,.$env);.}..return.$val.!==. |
67f20 | 27 66 61 6c 73 65 27 20 26 26 20 28 62 6f 6f 6c 29 20 24 76 61 6c 3b 0a 0a 0a 63 61 73 65 20 27 | 'false'.&&.(bool).$val;...case.' |
67f40 | 64 69 73 61 62 6c 65 2d 74 6c 73 27 3a 0a 63 61 73 65 20 27 73 65 63 75 72 65 2d 68 74 74 70 27 | disable-tls':.case.'secure-http' |
67f60 | 3a 0a 63 61 73 65 20 27 75 73 65 2d 67 69 74 68 75 62 2d 61 70 69 27 3a 0a 63 61 73 65 20 27 6c | :.case.'use-github-api':.case.'l |
67f80 | 6f 63 6b 27 3a 0a 0a 69 66 20 28 24 6b 65 79 20 3d 3d 3d 20 27 73 65 63 75 72 65 2d 68 74 74 70 | ock':..if.($key.===.'secure-http |
67fa0 | 27 20 26 26 20 24 74 68 69 73 2d 3e 67 65 74 28 27 64 69 73 61 62 6c 65 2d 74 6c 73 27 29 20 3d | '.&&.$this->get('disable-tls').= |
67fc0 | 3d 3d 20 74 72 75 65 29 20 7b 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 72 65 74 75 | ==.true).{.return.false;.}..retu |
67fe0 | 72 6e 20 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 6b 65 79 5d 20 21 3d 3d 20 27 66 61 6c 73 | rn.$this->config[$key].!==.'fals |
68000 | 65 27 20 26 26 20 28 62 6f 6f 6c 29 20 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 6b 65 79 5d | e'.&&.(bool).$this->config[$key] |
68020 | 3b 0a 0a 0a 63 61 73 65 20 27 63 61 63 68 65 2d 74 74 6c 27 3a 0a 72 65 74 75 72 6e 20 6d 61 78 | ;...case.'cache-ttl':.return.max |
68040 | 28 30 2c 20 28 69 6e 74 29 20 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 6b 65 79 5d 29 3b 0a | (0,.(int).$this->config[$key]);. |
68060 | 0a 0a 63 61 73 65 20 27 63 61 63 68 65 2d 66 69 6c 65 73 2d 6d 61 78 73 69 7a 65 27 3a 0a 69 66 | ..case.'cache-files-maxsize':.if |
68080 | 20 28 21 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 2f 5e 5c 73 2a 28 5b 30 2d 39 2e 5d 2b 29 | .(!Preg::isMatch('/^\s*([0-9.]+) |
680a0 | 5c 73 2a 28 3f 3a 28 5b 6b 6d 67 5d 29 28 3f 3a 69 3f 62 29 3f 29 3f 5c 73 2a 24 2f 69 27 2c 20 | \s*(?:([kmg])(?:i?b)?)?\s*$/i',. |
680c0 | 28 73 74 72 69 6e 67 29 20 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 6b 65 79 5d 2c 20 24 6d | (string).$this->config[$key],.$m |
680e0 | 61 74 63 68 65 73 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 | atches)).{.throw.new.\RuntimeExc |
68100 | 65 70 74 69 6f 6e 28 0a 22 43 6f 75 6c 64 20 6e 6f 74 20 70 61 72 73 65 20 74 68 65 20 76 61 6c | eption(."Could.not.parse.the.val |
68120 | 75 65 20 6f 66 20 27 24 6b 65 79 27 3a 20 7b 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 6b 65 | ue.of.'$key':.{$this->config[$ke |
68140 | 79 5d 7d 22 0a 29 3b 0a 7d 0a 24 73 69 7a 65 20 3d 20 28 66 6c 6f 61 74 29 20 24 6d 61 74 63 68 | y]}".);.}.$size.=.(float).$match |
68160 | 65 73 5b 31 5d 3b 0a 69 66 20 28 69 73 73 65 74 28 24 6d 61 74 63 68 65 73 5b 32 5d 29 29 20 7b | es[1];.if.(isset($matches[2])).{ |
68180 | 0a 73 77 69 74 63 68 20 28 73 74 72 74 6f 6c 6f 77 65 72 28 24 6d 61 74 63 68 65 73 5b 32 5d 29 | .switch.(strtolower($matches[2]) |
681a0 | 29 20 7b 0a 63 61 73 65 20 27 67 27 3a 0a 24 73 69 7a 65 20 2a 3d 20 31 30 32 34 3b 0a 0a 0a 63 | ).{.case.'g':.$size.*=.1024;...c |
681c0 | 61 73 65 20 27 6d 27 3a 0a 24 73 69 7a 65 20 2a 3d 20 31 30 32 34 3b 0a 0a 0a 63 61 73 65 20 27 | ase.'m':.$size.*=.1024;...case.' |
681e0 | 6b 27 3a 0a 24 73 69 7a 65 20 2a 3d 20 31 30 32 34 3b 0a 62 72 65 61 6b 3b 0a 7d 0a 7d 0a 0a 72 | k':.$size.*=.1024;.break;.}.}..r |
68200 | 65 74 75 72 6e 20 6d 61 78 28 30 2c 20 28 69 6e 74 29 20 24 73 69 7a 65 29 3b 0a 0a 0a 63 61 73 | eturn.max(0,.(int).$size);...cas |
68220 | 65 20 27 63 61 63 68 65 2d 66 69 6c 65 73 2d 74 74 6c 27 3a 0a 69 66 20 28 69 73 73 65 74 28 24 | e.'cache-files-ttl':.if.(isset($ |
68240 | 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 6b 65 79 5d 29 29 20 7b 0a 72 65 74 75 72 6e 20 6d 61 | this->config[$key])).{.return.ma |
68260 | 78 28 30 2c 20 28 69 6e 74 29 20 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 6b 65 79 5d 29 3b | x(0,.(int).$this->config[$key]); |
68280 | 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 67 65 74 28 27 63 61 63 68 65 2d 74 74 6c | .}..return.$this->get('cache-ttl |
682a0 | 27 29 3b 0a 0a 63 61 73 65 20 27 68 6f 6d 65 27 3a 0a 72 65 74 75 72 6e 20 72 74 72 69 6d 28 24 | ');..case.'home':.return.rtrim($ |
682c0 | 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 28 50 6c 61 74 66 6f 72 6d 3a 3a 65 78 70 61 6e 64 50 61 | this->process(Platform::expandPa |
682e0 | 74 68 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 6b 65 79 5d 29 2c 20 24 66 6c 61 67 73 29 | th($this->config[$key]),.$flags) |
68300 | 2c 20 27 2f 5c 5c 27 29 3b 0a 0a 63 61 73 65 20 27 62 69 6e 2d 63 6f 6d 70 61 74 27 3a 0a 24 76 | ,.'/\\');..case.'bin-compat':.$v |
68320 | 61 6c 75 65 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 43 6f 6d 70 6f 73 65 72 45 6e 76 28 27 43 4f | alue.=.$this->getComposerEnv('CO |
68340 | 4d 50 4f 53 45 52 5f 42 49 4e 5f 43 4f 4d 50 41 54 27 29 20 3f 3a 20 24 74 68 69 73 2d 3e 63 6f | MPOSER_BIN_COMPAT').?:.$this->co |
68360 | 6e 66 69 67 5b 24 6b 65 79 5d 3b 0a 0a 69 66 20 28 21 69 6e 5f 61 72 72 61 79 28 24 76 61 6c 75 | nfig[$key];..if.(!in_array($valu |
68380 | 65 2c 20 5b 27 61 75 74 6f 27 2c 20 27 66 75 6c 6c 27 2c 20 27 70 72 6f 78 79 27 2c 20 27 73 79 | e,.['auto',.'full',.'proxy',.'sy |
683a0 | 6d 6c 69 6e 6b 27 5d 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 | mlink'])).{.throw.new.\RuntimeEx |
683c0 | 63 65 70 74 69 6f 6e 28 0a 22 49 6e 76 61 6c 69 64 20 76 61 6c 75 65 20 66 6f 72 20 27 62 69 6e | ception(."Invalid.value.for.'bin |
683e0 | 2d 63 6f 6d 70 61 74 27 3a 20 7b 24 76 61 6c 75 65 7d 2e 20 45 78 70 65 63 74 65 64 20 61 75 74 | -compat':.{$value}..Expected.aut |
68400 | 6f 2c 20 66 75 6c 6c 20 6f 72 20 70 72 6f 78 79 22 0a 29 3b 0a 7d 0a 0a 69 66 20 28 24 76 61 6c | o,.full.or.proxy".);.}..if.($val |
68420 | 75 65 20 3d 3d 3d 20 27 73 79 6d 6c 69 6e 6b 27 29 20 7b 0a 74 72 69 67 67 65 72 5f 65 72 72 6f | ue.===.'symlink').{.trigger_erro |
68440 | 72 28 27 63 6f 6e 66 69 67 2e 62 69 6e 2d 63 6f 6d 70 61 74 20 22 73 79 6d 6c 69 6e 6b 22 20 69 | r('config.bin-compat."symlink".i |
68460 | 73 20 64 65 70 72 65 63 61 74 65 64 20 73 69 6e 63 65 20 43 6f 6d 70 6f 73 65 72 20 32 2e 32 2c | s.deprecated.since.Composer.2.2, |
68480 | 20 75 73 65 20 61 75 74 6f 2c 20 66 75 6c 6c 20 28 66 6f 72 20 57 69 6e 64 6f 77 73 20 63 6f 6d | .use.auto,.full.(for.Windows.com |
684a0 | 70 61 74 69 62 69 6c 69 74 79 29 20 6f 72 20 70 72 6f 78 79 20 69 6e 73 74 65 61 64 2e 27 2c 20 | patibility).or.proxy.instead.',. |
684c0 | 45 5f 55 53 45 52 5f 44 45 50 52 45 43 41 54 45 44 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 76 | E_USER_DEPRECATED);.}..return.$v |
684e0 | 61 6c 75 65 3b 0a 0a 63 61 73 65 20 27 64 69 73 63 61 72 64 2d 63 68 61 6e 67 65 73 27 3a 0a 69 | alue;..case.'discard-changes':.i |
68500 | 66 20 28 24 65 6e 76 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 43 6f 6d 70 6f 73 65 72 45 6e 76 28 | f.($env.=.$this->getComposerEnv( |
68520 | 27 43 4f 4d 50 4f 53 45 52 5f 44 49 53 43 41 52 44 5f 43 48 41 4e 47 45 53 27 29 29 20 7b 0a 69 | 'COMPOSER_DISCARD_CHANGES')).{.i |
68540 | 66 20 28 21 69 6e 5f 61 72 72 61 79 28 24 65 6e 76 2c 20 5b 27 73 74 61 73 68 27 2c 20 27 74 72 | f.(!in_array($env,.['stash',.'tr |
68560 | 75 65 27 2c 20 27 66 61 6c 73 65 27 2c 20 27 31 27 2c 20 27 30 27 5d 2c 20 74 72 75 65 29 29 20 | ue',.'false',.'1',.'0'],.true)). |
68580 | 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 0a 22 | {.throw.new.\RuntimeException(." |
685a0 | 49 6e 76 61 6c 69 64 20 76 61 6c 75 65 20 66 6f 72 20 43 4f 4d 50 4f 53 45 52 5f 44 49 53 43 41 | Invalid.value.for.COMPOSER_DISCA |
685c0 | 52 44 5f 43 48 41 4e 47 45 53 3a 20 7b 24 65 6e 76 7d 2e 20 45 78 70 65 63 74 65 64 20 31 2c 20 | RD_CHANGES:.{$env}..Expected.1,. |
685e0 | 30 2c 20 74 72 75 65 2c 20 66 61 6c 73 65 20 6f 72 20 73 74 61 73 68 22 0a 29 3b 0a 7d 0a 69 66 | 0,.true,.false.or.stash".);.}.if |
68600 | 20 28 27 73 74 61 73 68 27 20 3d 3d 3d 20 24 65 6e 76 29 20 7b 0a 72 65 74 75 72 6e 20 27 73 74 | .('stash'.===.$env).{.return.'st |
68620 | 61 73 68 27 3b 0a 7d 0a 0a 0a 72 65 74 75 72 6e 20 24 65 6e 76 20 21 3d 3d 20 27 66 61 6c 73 65 | ash';.}...return.$env.!==.'false |
68640 | 27 20 26 26 20 28 62 6f 6f 6c 29 20 24 65 6e 76 3b 0a 7d 0a 0a 69 66 20 28 21 69 6e 5f 61 72 72 | '.&&.(bool).$env;.}..if.(!in_arr |
68660 | 61 79 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 6b 65 79 5d 2c 20 5b 74 72 75 65 2c 20 66 | ay($this->config[$key],.[true,.f |
68680 | 61 6c 73 65 2c 20 27 73 74 61 73 68 27 5d 2c 20 74 72 75 65 29 29 20 7b 0a 74 68 72 6f 77 20 6e | alse,.'stash'],.true)).{.throw.n |
686a0 | 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 0a 22 49 6e 76 61 6c 69 64 20 76 | ew.\RuntimeException(."Invalid.v |
686c0 | 61 6c 75 65 20 66 6f 72 20 27 64 69 73 63 61 72 64 2d 63 68 61 6e 67 65 73 27 3a 20 7b 24 74 68 | alue.for.'discard-changes':.{$th |
686e0 | 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 6b 65 79 5d 7d 2e 20 45 78 70 65 63 74 65 64 20 74 72 75 65 | is->config[$key]}..Expected.true |
68700 | 2c 20 66 61 6c 73 65 20 6f 72 20 73 74 61 73 68 22 0a 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 | ,.false.or.stash".);.}..return.$ |
68720 | 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 6b 65 79 5d 3b 0a 0a 63 61 73 65 20 27 67 69 74 68 75 | this->config[$key];..case.'githu |
68740 | 62 2d 70 72 6f 74 6f 63 6f 6c 73 27 3a 0a 24 70 72 6f 74 6f 73 20 3d 20 24 74 68 69 73 2d 3e 63 | b-protocols':.$protos.=.$this->c |
68760 | 6f 6e 66 69 67 5b 27 67 69 74 68 75 62 2d 70 72 6f 74 6f 63 6f 6c 73 27 5d 3b 0a 69 66 20 28 24 | onfig['github-protocols'];.if.($ |
68780 | 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 73 65 63 75 72 65 2d 68 74 74 70 27 5d 20 26 26 20 66 | this->config['secure-http'].&&.f |
687a0 | 61 6c 73 65 20 21 3d 3d 20 28 24 69 6e 64 65 78 20 3d 20 61 72 72 61 79 5f 73 65 61 72 63 68 28 | alse.!==.($index.=.array_search( |
687c0 | 27 67 69 74 27 2c 20 24 70 72 6f 74 6f 73 29 29 29 20 7b 0a 75 6e 73 65 74 28 24 70 72 6f 74 6f | 'git',.$protos))).{.unset($proto |
687e0 | 73 5b 24 69 6e 64 65 78 5d 29 3b 0a 7d 0a 69 66 20 28 72 65 73 65 74 28 24 70 72 6f 74 6f 73 29 | s[$index]);.}.if.(reset($protos) |
68800 | 20 3d 3d 3d 20 27 68 74 74 70 27 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d | .===.'http').{.throw.new.\Runtim |
68820 | 65 45 78 63 65 70 74 69 6f 6e 28 27 54 68 65 20 68 74 74 70 20 70 72 6f 74 6f 63 6f 6c 20 66 6f | eException('The.http.protocol.fo |
68840 | 72 20 67 69 74 68 75 62 20 69 73 20 6e 6f 74 20 61 76 61 69 6c 61 62 6c 65 20 61 6e 79 6d 6f 72 | r.github.is.not.available.anymor |
68860 | 65 2c 20 75 70 64 61 74 65 20 79 6f 75 72 20 63 6f 6e 66 69 67 5c 27 73 20 67 69 74 68 75 62 2d | e,.update.your.config\'s.github- |
68880 | 70 72 6f 74 6f 63 6f 6c 73 20 74 6f 20 75 73 65 20 22 68 74 74 70 73 22 2c 20 22 67 69 74 22 20 | protocols.to.use."https",."git". |
688a0 | 6f 72 20 22 73 73 68 22 27 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 70 72 6f 74 6f 73 3b 0a 0a | or."ssh"');.}..return.$protos;.. |
688c0 | 63 61 73 65 20 27 61 75 74 6f 6c 6f 61 64 65 72 2d 73 75 66 66 69 78 27 3a 0a 69 66 20 28 24 74 | case.'autoloader-suffix':.if.($t |
688e0 | 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 6b 65 79 5d 20 3d 3d 3d 20 27 27 29 20 7b 20 0a 72 65 74 | his->config[$key].===.'').{..ret |
68900 | 75 72 6e 20 6e 75 6c 6c 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 | urn.null;.}..return.$this->proce |
68920 | 73 73 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 6b 65 79 5d 2c 20 24 66 6c 61 67 73 29 3b | ss($this->config[$key],.$flags); |
68940 | 0a 0a 64 65 66 61 75 6c 74 3a 0a 69 66 20 28 21 69 73 73 65 74 28 24 74 68 69 73 2d 3e 63 6f 6e | ..default:.if.(!isset($this->con |
68960 | 66 69 67 5b 24 6b 65 79 5d 29 29 20 7b 0a 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0a 7d 0a 0a 72 65 | fig[$key])).{.return.null;.}..re |
68980 | 74 75 72 6e 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 | turn.$this->process($this->confi |
689a0 | 67 5b 24 6b 65 79 5d 2c 20 24 66 6c 61 67 73 29 3b 0a 7d 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 | g[$key],.$flags);.}.}.....public |
689c0 | 20 66 75 6e 63 74 69 6f 6e 20 61 6c 6c 28 69 6e 74 20 24 66 6c 61 67 73 20 3d 20 30 29 3a 20 61 | .function.all(int.$flags.=.0):.a |
689e0 | 72 72 61 79 0a 7b 0a 24 61 6c 6c 20 3d 20 5b 0a 27 72 65 70 6f 73 69 74 6f 72 69 65 73 27 20 3d | rray.{.$all.=.[.'repositories'.= |
68a00 | 3e 20 24 74 68 69 73 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 69 65 73 28 29 2c 0a 5d 3b 0a 66 | >.$this->getRepositories(),.];.f |
68a20 | 6f 72 65 61 63 68 20 28 61 72 72 61 79 5f 6b 65 79 73 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 | oreach.(array_keys($this->config |
68a40 | 29 20 61 73 20 24 6b 65 79 29 20 7b 0a 24 61 6c 6c 5b 27 63 6f 6e 66 69 67 27 5d 5b 24 6b 65 79 | ).as.$key).{.$all['config'][$key |
68a60 | 5d 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 28 24 6b 65 79 2c 20 24 66 6c 61 67 73 29 3b 0a 7d 0a | ].=.$this->get($key,.$flags);.}. |
68a80 | 0a 72 65 74 75 72 6e 20 24 61 6c 6c 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e | .return.$all;.}..public.function |
68aa0 | 20 67 65 74 53 6f 75 72 63 65 4f 66 56 61 6c 75 65 28 73 74 72 69 6e 67 20 24 6b 65 79 29 3a 20 | .getSourceOfValue(string.$key):. |
68ac0 | 73 74 72 69 6e 67 0a 7b 0a 24 74 68 69 73 2d 3e 67 65 74 28 24 6b 65 79 29 3b 0a 0a 72 65 74 75 | string.{.$this->get($key);..retu |
68ae0 | 72 6e 20 24 74 68 69 73 2d 3e 73 6f 75 72 63 65 4f 66 43 6f 6e 66 69 67 56 61 6c 75 65 5b 24 6b | rn.$this->sourceOfConfigValue[$k |
68b00 | 65 79 5d 20 3f 3f 20 73 65 6c 66 3a 3a 53 4f 55 52 43 45 5f 55 4e 4b 4e 4f 57 4e 3b 0a 7d 0a 0a | ey].??.self::SOURCE_UNKNOWN;.}.. |
68b20 | 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 53 6f 75 72 63 65 4f 66 43 | ...private.function.setSourceOfC |
68b40 | 6f 6e 66 69 67 56 61 6c 75 65 28 24 63 6f 6e 66 69 67 56 61 6c 75 65 2c 20 73 74 72 69 6e 67 20 | onfigValue($configValue,.string. |
68b60 | 24 70 61 74 68 2c 20 73 74 72 69 6e 67 20 24 73 6f 75 72 63 65 29 3a 20 76 6f 69 64 0a 7b 0a 24 | $path,.string.$source):.void.{.$ |
68b80 | 74 68 69 73 2d 3e 73 6f 75 72 63 65 4f 66 43 6f 6e 66 69 67 56 61 6c 75 65 5b 24 70 61 74 68 5d | this->sourceOfConfigValue[$path] |
68ba0 | 20 3d 20 24 73 6f 75 72 63 65 3b 0a 0a 69 66 20 28 69 73 5f 61 72 72 61 79 28 24 63 6f 6e 66 69 | .=.$source;..if.(is_array($confi |
68bc0 | 67 56 61 6c 75 65 29 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 63 6f 6e 66 69 67 56 61 6c 75 65 | gValue)).{.foreach.($configValue |
68be0 | 20 61 73 20 24 6b 65 79 20 3d 3e 20 24 76 61 6c 75 65 29 20 7b 0a 24 74 68 69 73 2d 3e 73 65 74 | .as.$key.=>.$value).{.$this->set |
68c00 | 53 6f 75 72 63 65 4f 66 43 6f 6e 66 69 67 56 61 6c 75 65 28 24 76 61 6c 75 65 2c 20 24 70 61 74 | SourceOfConfigValue($value,.$pat |
68c20 | 68 20 2e 20 27 2e 27 20 2e 20 24 6b 65 79 2c 20 24 73 6f 75 72 63 65 29 3b 0a 7d 0a 7d 0a 7d 0a | h...'.'...$key,.$source);.}.}.}. |
68c40 | 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 72 61 77 28 29 3a 20 61 72 72 61 79 | ....public.function.raw():.array |
68c60 | 0a 7b 0a 72 65 74 75 72 6e 20 5b 0a 27 72 65 70 6f 73 69 74 6f 72 69 65 73 27 20 3d 3e 20 24 74 | .{.return.[.'repositories'.=>.$t |
68c80 | 68 69 73 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 69 65 73 28 29 2c 0a 27 63 6f 6e 66 69 67 27 | his->getRepositories(),.'config' |
68ca0 | 20 3d 3e 20 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 2c 0a 5d 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c | .=>.$this->config,.];.}.....publ |
68cc0 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 68 61 73 28 73 74 72 69 6e 67 20 24 6b 65 79 29 3a 20 62 6f | ic.function.has(string.$key):.bo |
68ce0 | 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 61 72 72 61 79 5f 6b 65 79 5f 65 78 69 73 74 73 28 24 6b 65 | ol.{.return.array_key_exists($ke |
68d00 | 79 2c 20 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 72 | y,.$this->config);.}..........pr |
68d20 | 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 70 72 6f 63 65 73 73 28 24 76 61 6c 75 65 2c 20 69 | ivate.function.process($value,.i |
68d40 | 6e 74 20 24 66 6c 61 67 73 29 0a 7b 0a 69 66 20 28 21 69 73 5f 73 74 72 69 6e 67 28 24 76 61 6c | nt.$flags).{.if.(!is_string($val |
68d60 | 75 65 29 29 20 7b 0a 72 65 74 75 72 6e 20 24 76 61 6c 75 65 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 | ue)).{.return.$value;.}..return. |
68d80 | 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 43 61 6c 6c 62 61 63 6b 28 27 23 5c 7b 5c 24 28 2e 2b 29 | Preg::replaceCallback('#\{\$(.+) |
68da0 | 5c 7d 23 27 2c 20 66 75 6e 63 74 69 6f 6e 20 28 24 6d 61 74 63 68 29 20 75 73 65 20 28 24 66 6c | \}#',.function.($match).use.($fl |
68dc0 | 61 67 73 29 20 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 67 65 74 28 24 6d 61 74 63 68 5b | ags).{.return.$this->get($match[ |
68de0 | 31 5d 2c 20 24 66 6c 61 67 73 29 3b 0a 7d 2c 20 24 76 61 6c 75 65 29 3b 0a 7d 0a 0a 0a 0a 0a 0a | 1],.$flags);.},.$value);.}...... |
68e00 | 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 72 65 61 6c 70 61 74 68 28 73 74 72 69 6e | .private.function.realpath(strin |
68e20 | 67 20 24 70 61 74 68 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 69 66 20 28 50 72 65 67 3a 3a 69 73 4d | g.$path):.string.{.if.(Preg::isM |
68e40 | 61 74 63 68 28 27 7b 5e 28 3f 3a 2f 7c 5b 61 2d 7a 5d 3a 7c 5b 61 2d 7a 30 2d 39 2e 5d 2b 3a 2f | atch('{^(?:/|[a-z]:|[a-z0-9.]+:/ |
68e60 | 2f 7c 5c 5c 5c 5c 5c 5c 5c 5c 29 7d 69 27 2c 20 24 70 61 74 68 29 29 20 7b 0a 72 65 74 75 72 6e | /|\\\\\\\\)}i',.$path)).{.return |
68e80 | 20 24 70 61 74 68 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 62 61 73 65 44 69 72 | .$path;.}..return.$this->baseDir |
68ea0 | 20 3f 20 24 74 68 69 73 2d 3e 62 61 73 65 44 69 72 20 2e 20 27 2f 27 20 2e 20 24 70 61 74 68 20 | .?.$this->baseDir...'/'...$path. |
68ec0 | 3a 20 24 70 61 74 68 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 | :.$path;.}..........private.func |
68ee0 | 74 69 6f 6e 20 67 65 74 43 6f 6d 70 6f 73 65 72 45 6e 76 28 73 74 72 69 6e 67 20 24 76 61 72 29 | tion.getComposerEnv(string.$var) |
68f00 | 0a 7b 0a 69 66 20 28 24 74 68 69 73 2d 3e 75 73 65 45 6e 76 69 72 6f 6e 6d 65 6e 74 29 20 7b 0a | .{.if.($this->useEnvironment).{. |
68f20 | 72 65 74 75 72 6e 20 50 6c 61 74 66 6f 72 6d 3a 3a 67 65 74 45 6e 76 28 24 76 61 72 29 3b 0a 7d | return.Platform::getEnv($var);.} |
68f40 | 0a 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 | ..return.false;.}..private.funct |
68f60 | 69 6f 6e 20 64 69 73 61 62 6c 65 52 65 70 6f 42 79 4e 61 6d 65 28 73 74 72 69 6e 67 20 24 6e 61 | ion.disableRepoByName(string.$na |
68f80 | 6d 65 29 3a 20 76 6f 69 64 0a 7b 0a 69 66 20 28 69 73 73 65 74 28 24 74 68 69 73 2d 3e 72 65 70 | me):.void.{.if.(isset($this->rep |
68fa0 | 6f 73 69 74 6f 72 69 65 73 5b 24 6e 61 6d 65 5d 29 29 20 7b 0a 75 6e 73 65 74 28 24 74 68 69 73 | ositories[$name])).{.unset($this |
68fc0 | 2d 3e 72 65 70 6f 73 69 74 6f 72 69 65 73 5b 24 6e 61 6d 65 5d 29 3b 0a 7d 20 65 6c 73 65 69 66 | ->repositories[$name]);.}.elseif |
68fe0 | 20 28 24 6e 61 6d 65 20 3d 3d 3d 20 27 70 61 63 6b 61 67 69 73 74 27 29 20 7b 20 0a 75 6e 73 65 | .($name.===.'packagist').{..unse |
69000 | 74 28 24 74 68 69 73 2d 3e 72 65 70 6f 73 69 74 6f 72 69 65 73 5b 27 70 61 63 6b 61 67 69 73 74 | t($this->repositories['packagist |
69020 | 2e 6f 72 67 27 5d 29 3b 0a 7d 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 | .org']);.}.}........public.funct |
69040 | 69 6f 6e 20 70 72 6f 68 69 62 69 74 55 72 6c 42 79 43 6f 6e 66 69 67 28 73 74 72 69 6e 67 20 24 | ion.prohibitUrlByConfig(string.$ |
69060 | 75 72 6c 2c 20 3f 49 4f 49 6e 74 65 72 66 61 63 65 20 24 69 6f 20 3d 20 6e 75 6c 6c 2c 20 61 72 | url,.?IOInterface.$io.=.null,.ar |
69080 | 72 61 79 20 24 72 65 70 6f 4f 70 74 69 6f 6e 73 20 3d 20 5b 5d 29 3a 20 76 6f 69 64 0a 7b 0a 0a | ray.$repoOptions.=.[]):.void.{.. |
690a0 | 69 66 20 28 66 61 6c 73 65 20 3d 3d 3d 20 66 69 6c 74 65 72 5f 76 61 72 28 24 75 72 6c 2c 20 46 | if.(false.===.filter_var($url,.F |
690c0 | 49 4c 54 45 52 5f 56 41 4c 49 44 41 54 45 5f 55 52 4c 29 29 20 7b 0a 72 65 74 75 72 6e 3b 0a 7d | ILTER_VALIDATE_URL)).{.return;.} |
690e0 | 0a 0a 0a 24 73 63 68 65 6d 65 20 3d 20 70 61 72 73 65 5f 75 72 6c 28 24 75 72 6c 2c 20 50 48 50 | ...$scheme.=.parse_url($url,.PHP |
69100 | 5f 55 52 4c 5f 53 43 48 45 4d 45 29 3b 0a 24 68 6f 73 74 6e 61 6d 65 20 3d 20 70 61 72 73 65 5f | _URL_SCHEME);.$hostname.=.parse_ |
69120 | 75 72 6c 28 24 75 72 6c 2c 20 50 48 50 5f 55 52 4c 5f 48 4f 53 54 29 3b 0a 69 66 20 28 69 6e 5f | url($url,.PHP_URL_HOST);.if.(in_ |
69140 | 61 72 72 61 79 28 24 73 63 68 65 6d 65 2c 20 5b 27 68 74 74 70 27 2c 20 27 67 69 74 27 2c 20 27 | array($scheme,.['http',.'git',.' |
69160 | 66 74 70 27 2c 20 27 73 76 6e 27 5d 29 29 20 7b 0a 69 66 20 28 24 74 68 69 73 2d 3e 67 65 74 28 | ftp',.'svn'])).{.if.($this->get( |
69180 | 27 73 65 63 75 72 65 2d 68 74 74 70 27 29 29 20 7b 0a 69 66 20 28 24 73 63 68 65 6d 65 20 3d 3d | 'secure-http')).{.if.($scheme.== |
691a0 | 3d 20 27 73 76 6e 27 29 20 7b 0a 69 66 20 28 69 6e 5f 61 72 72 61 79 28 24 68 6f 73 74 6e 61 6d | =.'svn').{.if.(in_array($hostnam |
691c0 | 65 2c 20 24 74 68 69 73 2d 3e 67 65 74 28 27 73 65 63 75 72 65 2d 73 76 6e 2d 64 6f 6d 61 69 6e | e,.$this->get('secure-svn-domain |
691e0 | 73 27 29 2c 20 74 72 75 65 29 29 20 7b 0a 72 65 74 75 72 6e 3b 0a 7d 0a 0a 74 68 72 6f 77 20 6e | s'),.true)).{.return;.}..throw.n |
69200 | 65 77 20 54 72 61 6e 73 70 6f 72 74 45 78 63 65 70 74 69 6f 6e 28 22 59 6f 75 72 20 63 6f 6e 66 | ew.TransportException("Your.conf |
69220 | 69 67 75 72 61 74 69 6f 6e 20 64 6f 65 73 20 6e 6f 74 20 61 6c 6c 6f 77 20 63 6f 6e 6e 65 63 74 | iguration.does.not.allow.connect |
69240 | 69 6f 6e 73 20 74 6f 20 24 75 72 6c 2e 20 53 65 65 20 68 74 74 70 73 3a 2f 2f 67 65 74 63 6f 6d | ions.to.$url..See.https://getcom |
69260 | 70 6f 73 65 72 2e 6f 72 67 2f 64 6f 63 2f 30 36 2d 63 6f 6e 66 69 67 2e 6d 64 23 73 65 63 75 72 | poser.org/doc/06-config.md#secur |
69280 | 65 2d 73 76 6e 2d 64 6f 6d 61 69 6e 73 20 66 6f 72 20 64 65 74 61 69 6c 73 2e 22 29 3b 0a 7d 0a | e-svn-domains.for.details.");.}. |
692a0 | 0a 74 68 72 6f 77 20 6e 65 77 20 54 72 61 6e 73 70 6f 72 74 45 78 63 65 70 74 69 6f 6e 28 22 59 | .throw.new.TransportException("Y |
692c0 | 6f 75 72 20 63 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 64 6f 65 73 20 6e 6f 74 20 61 6c 6c 6f 77 | our.configuration.does.not.allow |
692e0 | 20 63 6f 6e 6e 65 63 74 69 6f 6e 73 20 74 6f 20 24 75 72 6c 2e 20 53 65 65 20 68 74 74 70 73 3a | .connections.to.$url..See.https: |
69300 | 2f 2f 67 65 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 67 2f 64 6f 63 2f 30 36 2d 63 6f 6e 66 69 67 2e | //getcomposer.org/doc/06-config. |
69320 | 6d 64 23 73 65 63 75 72 65 2d 68 74 74 70 20 66 6f 72 20 64 65 74 61 69 6c 73 2e 22 29 3b 0a 7d | md#secure-http.for.details.");.} |
69340 | 0a 69 66 20 28 24 69 6f 20 21 3d 3d 20 6e 75 6c 6c 29 20 7b 0a 69 66 20 28 69 73 5f 73 74 72 69 | .if.($io.!==.null).{.if.(is_stri |
69360 | 6e 67 28 24 68 6f 73 74 6e 61 6d 65 29 29 20 7b 0a 69 66 20 28 21 69 73 73 65 74 28 24 74 68 69 | ng($hostname)).{.if.(!isset($thi |
69380 | 73 2d 3e 77 61 72 6e 65 64 48 6f 73 74 73 5b 24 68 6f 73 74 6e 61 6d 65 5d 29 29 20 7b 0a 24 69 | s->warnedHosts[$hostname])).{.$i |
693a0 | 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 22 3c 77 61 72 6e 69 6e 67 3e 57 61 72 6e 69 6e 67 3a | o->writeError("<warning>Warning: |
693c0 | 20 41 63 63 65 73 73 69 6e 67 20 24 68 6f 73 74 6e 61 6d 65 20 6f 76 65 72 20 24 73 63 68 65 6d | .Accessing.$hostname.over.$schem |
693e0 | 65 20 77 68 69 63 68 20 69 73 20 61 6e 20 69 6e 73 65 63 75 72 65 20 70 72 6f 74 6f 63 6f 6c 2e | e.which.is.an.insecure.protocol. |
69400 | 3c 2f 77 61 72 6e 69 6e 67 3e 22 29 3b 0a 7d 0a 24 74 68 69 73 2d 3e 77 61 72 6e 65 64 48 6f 73 | </warning>");.}.$this->warnedHos |
69420 | 74 73 5b 24 68 6f 73 74 6e 61 6d 65 5d 20 3d 20 74 72 75 65 3b 0a 7d 0a 7d 0a 7d 0a 0a 69 66 20 | ts[$hostname].=.true;.}.}.}..if. |
69440 | 28 24 69 6f 20 21 3d 3d 20 6e 75 6c 6c 20 26 26 20 69 73 5f 73 74 72 69 6e 67 28 24 68 6f 73 74 | ($io.!==.null.&&.is_string($host |
69460 | 6e 61 6d 65 29 20 26 26 20 21 69 73 73 65 74 28 24 74 68 69 73 2d 3e 73 73 6c 56 65 72 69 66 79 | name).&&.!isset($this->sslVerify |
69480 | 57 61 72 6e 65 64 48 6f 73 74 73 5b 24 68 6f 73 74 6e 61 6d 65 5d 29 29 20 7b 0a 24 77 61 72 6e | WarnedHosts[$hostname])).{.$warn |
694a0 | 69 6e 67 20 3d 20 6e 75 6c 6c 3b 0a 69 66 20 28 69 73 73 65 74 28 24 72 65 70 6f 4f 70 74 69 6f | ing.=.null;.if.(isset($repoOptio |
694c0 | 6e 73 5b 27 73 73 6c 27 5d 5b 27 76 65 72 69 66 79 5f 70 65 65 72 27 5d 29 20 26 26 20 21 28 62 | ns['ssl']['verify_peer']).&&.!(b |
694e0 | 6f 6f 6c 29 20 24 72 65 70 6f 4f 70 74 69 6f 6e 73 5b 27 73 73 6c 27 5d 5b 27 76 65 72 69 66 79 | ool).$repoOptions['ssl']['verify |
69500 | 5f 70 65 65 72 27 5d 29 20 7b 0a 24 77 61 72 6e 69 6e 67 20 3d 20 27 76 65 72 69 66 79 5f 70 65 | _peer']).{.$warning.=.'verify_pe |
69520 | 65 72 27 3b 0a 7d 0a 0a 69 66 20 28 69 73 73 65 74 28 24 72 65 70 6f 4f 70 74 69 6f 6e 73 5b 27 | er';.}..if.(isset($repoOptions[' |
69540 | 73 73 6c 27 5d 5b 27 76 65 72 69 66 79 5f 70 65 65 72 5f 6e 61 6d 65 27 5d 29 20 26 26 20 21 28 | ssl']['verify_peer_name']).&&.!( |
69560 | 62 6f 6f 6c 29 20 24 72 65 70 6f 4f 70 74 69 6f 6e 73 5b 27 73 73 6c 27 5d 5b 27 76 65 72 69 66 | bool).$repoOptions['ssl']['verif |
69580 | 79 5f 70 65 65 72 5f 6e 61 6d 65 27 5d 29 20 7b 0a 24 77 61 72 6e 69 6e 67 20 3d 20 24 77 61 72 | y_peer_name']).{.$warning.=.$war |
695a0 | 6e 69 6e 67 20 3d 3d 3d 20 6e 75 6c 6c 20 3f 20 27 76 65 72 69 66 79 5f 70 65 65 72 5f 6e 61 6d | ning.===.null.?.'verify_peer_nam |
695c0 | 65 27 20 3a 20 24 77 61 72 6e 69 6e 67 20 2e 20 27 20 61 6e 64 20 76 65 72 69 66 79 5f 70 65 65 | e'.:.$warning...'.and.verify_pee |
695e0 | 72 5f 6e 61 6d 65 27 3b 0a 7d 0a 0a 69 66 20 28 24 77 61 72 6e 69 6e 67 20 21 3d 3d 20 6e 75 6c | r_name';.}..if.($warning.!==.nul |
69600 | 6c 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 22 3c 77 61 72 6e 69 6e 67 3e 57 | l).{.$io->writeError("<warning>W |
69620 | 61 72 6e 69 6e 67 3a 20 41 63 63 65 73 73 69 6e 67 20 24 68 6f 73 74 6e 61 6d 65 20 77 69 74 68 | arning:.Accessing.$hostname.with |
69640 | 20 24 77 61 72 6e 69 6e 67 20 64 69 73 61 62 6c 65 64 2e 3c 2f 77 61 72 6e 69 6e 67 3e 22 29 3b | .$warning.disabled.</warning>"); |
69660 | 0a 24 74 68 69 73 2d 3e 73 73 6c 56 65 72 69 66 79 57 61 72 6e 65 64 48 6f 73 74 73 5b 24 68 6f | .$this->sslVerifyWarnedHosts[$ho |
69680 | 73 74 6e 61 6d 65 5d 20 3d 20 74 72 75 65 3b 0a 7d 0a 7d 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a | stname].=.true;.}.}.}........... |
696a0 | 0a 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 64 69 73 61 62 6c 65 50 | .public.static.function.disableP |
696c0 | 72 6f 63 65 73 73 54 69 6d 65 6f 75 74 28 29 3a 20 76 6f 69 64 0a 7b 0a 0a 50 72 6f 63 65 73 73 | rocessTimeout():.void.{..Process |
696e0 | 45 78 65 63 75 74 6f 72 3a 3a 73 65 74 54 69 6d 65 6f 75 74 28 30 29 3b 0a 7d 0a 7d 0a 3c 3f 70 | Executor::setTimeout(0);.}.}.<?p |
69700 | 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a | hp.declare(strict_types=1);..... |
69720 | 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 66 69 67 | .......namespace.Composer\Config |
69740 | 3b 0a 0a 0a 0a 0a 0a 0a 0a 69 6e 74 65 72 66 61 63 65 20 43 6f 6e 66 69 67 53 6f 75 72 63 65 49 | ;........interface.ConfigSourceI |
69760 | 6e 74 65 72 66 61 63 65 0a 7b 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f | nterface.{........public.functio |
69780 | 6e 20 61 64 64 52 65 70 6f 73 69 74 6f 72 79 28 73 74 72 69 6e 67 20 24 6e 61 6d 65 2c 20 24 63 | n.addRepository(string.$name,.$c |
697a0 | 6f 6e 66 69 67 2c 20 62 6f 6f 6c 20 24 61 70 70 65 6e 64 20 3d 20 74 72 75 65 29 3a 20 76 6f 69 | onfig,.bool.$append.=.true):.voi |
697c0 | 64 3b 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 72 65 6d 6f 76 65 52 65 70 | d;.....public.function.removeRep |
697e0 | 6f 73 69 74 6f 72 79 28 73 74 72 69 6e 67 20 24 6e 61 6d 65 29 3a 20 76 6f 69 64 3b 0a 0a 0a 0a | ository(string.$name):.void;.... |
69800 | 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 61 64 64 43 6f 6e 66 69 67 53 65 74 | ....public.function.addConfigSet |
69820 | 74 69 6e 67 28 73 74 72 69 6e 67 20 24 6e 61 6d 65 2c 20 24 76 61 6c 75 65 29 3a 20 76 6f 69 64 | ting(string.$name,.$value):.void |
69840 | 3b 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 72 65 6d 6f 76 65 43 6f 6e 66 | ;.....public.function.removeConf |
69860 | 69 67 53 65 74 74 69 6e 67 28 73 74 72 69 6e 67 20 24 6e 61 6d 65 29 3a 20 76 6f 69 64 3b 0a 0a | igSetting(string.$name):.void;.. |
69880 | 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 61 64 64 50 72 6f 70 65 72 74 | ......public.function.addPropert |
698a0 | 79 28 73 74 72 69 6e 67 20 24 6e 61 6d 65 2c 20 24 76 61 6c 75 65 29 3a 20 76 6f 69 64 3b 0a 0a | y(string.$name,.$value):.void;.. |
698c0 | 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 72 65 6d 6f 76 65 50 72 6f 70 65 72 74 | ...public.function.removePropert |
698e0 | 79 28 73 74 72 69 6e 67 20 24 6e 61 6d 65 29 3a 20 76 6f 69 64 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 | y(string.$name):.void;.........p |
69900 | 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 61 64 64 4c 69 6e 6b 28 73 74 72 69 6e 67 20 24 74 | ublic.function.addLink(string.$t |
69920 | 79 70 65 2c 20 73 74 72 69 6e 67 20 24 6e 61 6d 65 2c 20 73 74 72 69 6e 67 20 24 76 61 6c 75 65 | ype,.string.$name,.string.$value |
69940 | 29 3a 20 76 6f 69 64 3b 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 | ):.void;........public.function. |
69960 | 72 65 6d 6f 76 65 4c 69 6e 6b 28 73 74 72 69 6e 67 20 24 74 79 70 65 2c 20 73 74 72 69 6e 67 20 | removeLink(string.$type,.string. |
69980 | 24 6e 61 6d 65 29 3a 20 76 6f 69 64 3b 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f | $name):.void;.....public.functio |
699a0 | 6e 20 67 65 74 4e 61 6d 65 28 29 3a 20 73 74 72 69 6e 67 3b 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 | n.getName():.string;.}.<?php.dec |
699c0 | 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a | lare(strict_types=1);........... |
699e0 | 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 66 69 67 3b 0a 0a 75 73 65 | .namespace.Composer\Config;..use |
69a00 | 20 43 6f 6d 70 6f 73 65 72 5c 4a 73 6f 6e 5c 4a 73 6f 6e 46 69 6c 65 3b 0a 75 73 65 20 43 6f 6d | .Composer\Json\JsonFile;.use.Com |
69a20 | 70 6f 73 65 72 5c 4a 73 6f 6e 5c 4a 73 6f 6e 4d 61 6e 69 70 75 6c 61 74 6f 72 3b 0a 75 73 65 20 | poser\Json\JsonManipulator;.use. |
69a40 | 43 6f 6d 70 6f 73 65 72 5c 4a 73 6f 6e 5c 4a 73 6f 6e 56 61 6c 69 64 61 74 69 6f 6e 45 78 63 65 | Composer\Json\JsonValidationExce |
69a60 | 70 74 69 6f 6e 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 63 72 65 5c 50 72 65 67 3b 0a 75 | ption;.use.Composer\Pcre\Preg;.u |
69a80 | 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 46 69 6c 65 73 79 73 74 65 6d 3b 0a 75 73 65 | se.Composer\Util\Filesystem;.use |
69aa0 | 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 53 69 6c 65 6e 63 65 72 3b 0a 0a 0a 0a 0a 0a 0a 0a | .Composer\Util\Silencer;........ |
69ac0 | 63 6c 61 73 73 20 4a 73 6f 6e 43 6f 6e 66 69 67 53 6f 75 72 63 65 20 69 6d 70 6c 65 6d 65 6e 74 | class.JsonConfigSource.implement |
69ae0 | 73 20 43 6f 6e 66 69 67 53 6f 75 72 63 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 0a 0a 0a 70 72 69 | s.ConfigSourceInterface.{....pri |
69b00 | 76 61 74 65 20 24 66 69 6c 65 3b 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 61 75 74 68 43 6f 6e | vate.$file;.....private.$authCon |
69b20 | 66 69 67 3b 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 | fig;.....public.function.__const |
69b40 | 72 75 63 74 28 4a 73 6f 6e 46 69 6c 65 20 24 66 69 6c 65 2c 20 62 6f 6f 6c 20 24 61 75 74 68 43 | ruct(JsonFile.$file,.bool.$authC |
69b60 | 6f 6e 66 69 67 20 3d 20 66 61 6c 73 65 29 0a 7b 0a 24 74 68 69 73 2d 3e 66 69 6c 65 20 3d 20 24 | onfig.=.false).{.$this->file.=.$ |
69b80 | 66 69 6c 65 3b 0a 24 74 68 69 73 2d 3e 61 75 74 68 43 6f 6e 66 69 67 20 3d 20 24 61 75 74 68 43 | file;.$this->authConfig.=.$authC |
69ba0 | 6f 6e 66 69 67 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 | onfig;.}.....public.function.get |
69bc0 | 4e 61 6d 65 28 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 66 | Name():.string.{.return.$this->f |
69be0 | 69 6c 65 2d 3e 67 65 74 50 61 74 68 28 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e | ile->getPath();.}.....public.fun |
69c00 | 63 74 69 6f 6e 20 61 64 64 52 65 70 6f 73 69 74 6f 72 79 28 73 74 72 69 6e 67 20 24 6e 61 6d 65 | ction.addRepository(string.$name |
69c20 | 2c 20 24 63 6f 6e 66 69 67 2c 20 62 6f 6f 6c 20 24 61 70 70 65 6e 64 20 3d 20 74 72 75 65 29 3a | ,.$config,.bool.$append.=.true): |
69c40 | 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 6d 61 6e 69 70 75 6c 61 74 65 4a 73 6f 6e 28 27 61 | .void.{.$this->manipulateJson('a |
69c60 | 64 64 52 65 70 6f 73 69 74 6f 72 79 27 2c 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 | ddRepository',.static.function.( |
69c80 | 26 24 63 6f 6e 66 69 67 2c 20 24 72 65 70 6f 2c 20 24 72 65 70 6f 43 6f 6e 66 69 67 29 20 75 73 | &$config,.$repo,.$repoConfig).us |
69ca0 | 65 20 28 24 61 70 70 65 6e 64 29 3a 20 76 6f 69 64 20 7b 0a 0a 0a 69 66 20 28 69 73 73 65 74 28 | e.($append):.void.{...if.(isset( |
69cc0 | 24 63 6f 6e 66 69 67 5b 27 72 65 70 6f 73 69 74 6f 72 69 65 73 27 5d 29 29 20 7b 0a 66 6f 72 65 | $config['repositories'])).{.fore |
69ce0 | 61 63 68 20 28 24 63 6f 6e 66 69 67 5b 27 72 65 70 6f 73 69 74 6f 72 69 65 73 27 5d 20 61 73 20 | ach.($config['repositories'].as. |
69d00 | 24 69 6e 64 65 78 20 3d 3e 20 24 76 61 6c 29 20 7b 0a 69 66 20 28 24 69 6e 64 65 78 20 3d 3d 3d | $index.=>.$val).{.if.($index.=== |
69d20 | 20 24 72 65 70 6f 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 69 66 20 28 69 73 5f 6e 75 6d | .$repo).{.continue;.}.if.(is_num |
69d40 | 65 72 69 63 28 24 69 6e 64 65 78 29 20 26 26 20 28 24 76 61 6c 20 3d 3d 3d 20 5b 27 70 61 63 6b | eric($index).&&.($val.===.['pack |
69d60 | 61 67 69 73 74 27 20 3d 3e 20 66 61 6c 73 65 5d 20 7c 7c 20 24 76 61 6c 20 3d 3d 3d 20 5b 27 70 | agist'.=>.false].||.$val.===.['p |
69d80 | 61 63 6b 61 67 69 73 74 2e 6f 72 67 27 20 3d 3e 20 66 61 6c 73 65 5d 29 29 20 7b 0a 75 6e 73 65 | ackagist.org'.=>.false])).{.unse |
69da0 | 74 28 24 63 6f 6e 66 69 67 5b 27 72 65 70 6f 73 69 74 6f 72 69 65 73 27 5d 5b 24 69 6e 64 65 78 | t($config['repositories'][$index |
69dc0 | 5d 29 3b 0a 24 63 6f 6e 66 69 67 5b 27 72 65 70 6f 73 69 74 6f 72 69 65 73 27 5d 5b 27 70 61 63 | ]);.$config['repositories']['pac |
69de0 | 6b 61 67 69 73 74 2e 6f 72 67 27 5d 20 3d 20 66 61 6c 73 65 3b 0a 62 72 65 61 6b 3b 0a 7d 0a 7d | kagist.org'].=.false;.break;.}.} |
69e00 | 0a 7d 0a 0a 69 66 20 28 24 61 70 70 65 6e 64 29 20 7b 0a 24 63 6f 6e 66 69 67 5b 27 72 65 70 6f | .}..if.($append).{.$config['repo |
69e20 | 73 69 74 6f 72 69 65 73 27 5d 5b 24 72 65 70 6f 5d 20 3d 20 24 72 65 70 6f 43 6f 6e 66 69 67 3b | sitories'][$repo].=.$repoConfig; |
69e40 | 0a 7d 20 65 6c 73 65 20 7b 0a 24 63 6f 6e 66 69 67 5b 27 72 65 70 6f 73 69 74 6f 72 69 65 73 27 | .}.else.{.$config['repositories' |
69e60 | 5d 20 3d 20 5b 24 72 65 70 6f 20 3d 3e 20 24 72 65 70 6f 43 6f 6e 66 69 67 5d 20 2b 20 24 63 6f | ].=.[$repo.=>.$repoConfig].+.$co |
69e80 | 6e 66 69 67 5b 27 72 65 70 6f 73 69 74 6f 72 69 65 73 27 5d 3b 0a 7d 0a 7d 2c 20 24 6e 61 6d 65 | nfig['repositories'];.}.},.$name |
69ea0 | 2c 20 24 63 6f 6e 66 69 67 2c 20 24 61 70 70 65 6e 64 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 | ,.$config,.$append);.}.....publi |
69ec0 | 63 20 66 75 6e 63 74 69 6f 6e 20 72 65 6d 6f 76 65 52 65 70 6f 73 69 74 6f 72 79 28 73 74 72 69 | c.function.removeRepository(stri |
69ee0 | 6e 67 20 24 6e 61 6d 65 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 6d 61 6e 69 70 75 6c | ng.$name):.void.{.$this->manipul |
69f00 | 61 74 65 4a 73 6f 6e 28 27 72 65 6d 6f 76 65 52 65 70 6f 73 69 74 6f 72 79 27 2c 20 73 74 61 74 | ateJson('removeRepository',.stat |
69f20 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 26 24 63 6f 6e 66 69 67 2c 20 24 72 65 70 6f 29 3a 20 76 | ic.function.(&$config,.$repo):.v |
69f40 | 6f 69 64 20 7b 0a 75 6e 73 65 74 28 24 63 6f 6e 66 69 67 5b 27 72 65 70 6f 73 69 74 6f 72 69 65 | oid.{.unset($config['repositorie |
69f60 | 73 27 5d 5b 24 72 65 70 6f 5d 29 3b 0a 7d 2c 20 24 6e 61 6d 65 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 | s'][$repo]);.},.$name);.}.....pu |
69f80 | 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 61 64 64 43 6f 6e 66 69 67 53 65 74 74 69 6e 67 28 73 | blic.function.addConfigSetting(s |
69fa0 | 74 72 69 6e 67 20 24 6e 61 6d 65 2c 20 24 76 61 6c 75 65 29 3a 20 76 6f 69 64 0a 7b 0a 24 61 75 | tring.$name,.$value):.void.{.$au |
69fc0 | 74 68 43 6f 6e 66 69 67 20 3d 20 24 74 68 69 73 2d 3e 61 75 74 68 43 6f 6e 66 69 67 3b 0a 24 74 | thConfig.=.$this->authConfig;.$t |
69fe0 | 68 69 73 2d 3e 6d 61 6e 69 70 75 6c 61 74 65 4a 73 6f 6e 28 27 61 64 64 43 6f 6e 66 69 67 53 65 | his->manipulateJson('addConfigSe |
6a000 | 74 74 69 6e 67 27 2c 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 26 24 63 6f 6e 66 69 | tting',.static.function.(&$confi |
6a020 | 67 2c 20 24 6b 65 79 2c 20 24 76 61 6c 29 20 75 73 65 20 28 24 61 75 74 68 43 6f 6e 66 69 67 29 | g,.$key,.$val).use.($authConfig) |
6a040 | 3a 20 76 6f 69 64 20 7b 0a 69 66 20 28 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b 5e 28 62 | :.void.{.if.(Preg::isMatch('{^(b |
6a060 | 69 74 62 75 63 6b 65 74 2d 6f 61 75 74 68 7c 67 69 74 68 75 62 2d 6f 61 75 74 68 7c 67 69 74 6c | itbucket-oauth|github-oauth|gitl |
6a080 | 61 62 2d 6f 61 75 74 68 7c 67 69 74 6c 61 62 2d 74 6f 6b 65 6e 7c 62 65 61 72 65 72 7c 68 74 74 | ab-oauth|gitlab-token|bearer|htt |
6a0a0 | 70 2d 62 61 73 69 63 7c 70 6c 61 74 66 6f 72 6d 29 5c 2e 7d 27 2c 20 24 6b 65 79 29 29 20 7b 0a | p-basic|platform)\.}',.$key)).{. |
6a0c0 | 5b 24 6b 65 79 2c 20 24 68 6f 73 74 5d 20 3d 20 65 78 70 6c 6f 64 65 28 27 2e 27 2c 20 24 6b 65 | [$key,.$host].=.explode('.',.$ke |
6a0e0 | 79 2c 20 32 29 3b 0a 69 66 20 28 24 61 75 74 68 43 6f 6e 66 69 67 29 20 7b 0a 24 63 6f 6e 66 69 | y,.2);.if.($authConfig).{.$confi |
6a100 | 67 5b 24 6b 65 79 5d 5b 24 68 6f 73 74 5d 20 3d 20 24 76 61 6c 3b 0a 7d 20 65 6c 73 65 20 7b 0a | g[$key][$host].=.$val;.}.else.{. |
6a120 | 24 63 6f 6e 66 69 67 5b 27 63 6f 6e 66 69 67 27 5d 5b 24 6b 65 79 5d 5b 24 68 6f 73 74 5d 20 3d | $config['config'][$key][$host].= |
6a140 | 20 24 76 61 6c 3b 0a 7d 0a 7d 20 65 6c 73 65 20 7b 0a 24 63 6f 6e 66 69 67 5b 27 63 6f 6e 66 69 | .$val;.}.}.else.{.$config['confi |
6a160 | 67 27 5d 5b 24 6b 65 79 5d 20 3d 20 24 76 61 6c 3b 0a 7d 0a 7d 2c 20 24 6e 61 6d 65 2c 20 24 76 | g'][$key].=.$val;.}.},.$name,.$v |
6a180 | 61 6c 75 65 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 72 65 6d | alue);.}.....public.function.rem |
6a1a0 | 6f 76 65 43 6f 6e 66 69 67 53 65 74 74 69 6e 67 28 73 74 72 69 6e 67 20 24 6e 61 6d 65 29 3a 20 | oveConfigSetting(string.$name):. |
6a1c0 | 76 6f 69 64 0a 7b 0a 24 61 75 74 68 43 6f 6e 66 69 67 20 3d 20 24 74 68 69 73 2d 3e 61 75 74 68 | void.{.$authConfig.=.$this->auth |
6a1e0 | 43 6f 6e 66 69 67 3b 0a 24 74 68 69 73 2d 3e 6d 61 6e 69 70 75 6c 61 74 65 4a 73 6f 6e 28 27 72 | Config;.$this->manipulateJson('r |
6a200 | 65 6d 6f 76 65 43 6f 6e 66 69 67 53 65 74 74 69 6e 67 27 2c 20 73 74 61 74 69 63 20 66 75 6e 63 | emoveConfigSetting',.static.func |
6a220 | 74 69 6f 6e 20 28 26 24 63 6f 6e 66 69 67 2c 20 24 6b 65 79 29 20 75 73 65 20 28 24 61 75 74 68 | tion.(&$config,.$key).use.($auth |
6a240 | 43 6f 6e 66 69 67 29 3a 20 76 6f 69 64 20 7b 0a 69 66 20 28 50 72 65 67 3a 3a 69 73 4d 61 74 63 | Config):.void.{.if.(Preg::isMatc |
6a260 | 68 28 27 7b 5e 28 62 69 74 62 75 63 6b 65 74 2d 6f 61 75 74 68 7c 67 69 74 68 75 62 2d 6f 61 75 | h('{^(bitbucket-oauth|github-oau |
6a280 | 74 68 7c 67 69 74 6c 61 62 2d 6f 61 75 74 68 7c 67 69 74 6c 61 62 2d 74 6f 6b 65 6e 7c 62 65 61 | th|gitlab-oauth|gitlab-token|bea |
6a2a0 | 72 65 72 7c 68 74 74 70 2d 62 61 73 69 63 7c 70 6c 61 74 66 6f 72 6d 29 5c 2e 7d 27 2c 20 24 6b | rer|http-basic|platform)\.}',.$k |
6a2c0 | 65 79 29 29 20 7b 0a 5b 24 6b 65 79 2c 20 24 68 6f 73 74 5d 20 3d 20 65 78 70 6c 6f 64 65 28 27 | ey)).{.[$key,.$host].=.explode(' |
6a2e0 | 2e 27 2c 20 24 6b 65 79 2c 20 32 29 3b 0a 69 66 20 28 24 61 75 74 68 43 6f 6e 66 69 67 29 20 7b | .',.$key,.2);.if.($authConfig).{ |
6a300 | 0a 75 6e 73 65 74 28 24 63 6f 6e 66 69 67 5b 24 6b 65 79 5d 5b 24 68 6f 73 74 5d 29 3b 0a 7d 20 | .unset($config[$key][$host]);.}. |
6a320 | 65 6c 73 65 20 7b 0a 75 6e 73 65 74 28 24 63 6f 6e 66 69 67 5b 27 63 6f 6e 66 69 67 27 5d 5b 24 | else.{.unset($config['config'][$ |
6a340 | 6b 65 79 5d 5b 24 68 6f 73 74 5d 29 3b 0a 7d 0a 7d 20 65 6c 73 65 20 7b 0a 75 6e 73 65 74 28 24 | key][$host]);.}.}.else.{.unset($ |
6a360 | 63 6f 6e 66 69 67 5b 27 63 6f 6e 66 69 67 27 5d 5b 24 6b 65 79 5d 29 3b 0a 7d 0a 7d 2c 20 24 6e | config['config'][$key]);.}.},.$n |
6a380 | 61 6d 65 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 61 64 64 50 | ame);.}.....public.function.addP |
6a3a0 | 72 6f 70 65 72 74 79 28 73 74 72 69 6e 67 20 24 6e 61 6d 65 2c 20 24 76 61 6c 75 65 29 3a 20 76 | roperty(string.$name,.$value):.v |
6a3c0 | 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 6d 61 6e 69 70 75 6c 61 74 65 4a 73 6f 6e 28 27 61 64 64 | oid.{.$this->manipulateJson('add |
6a3e0 | 50 72 6f 70 65 72 74 79 27 2c 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 26 24 63 6f | Property',.static.function.(&$co |
6a400 | 6e 66 69 67 2c 20 24 6b 65 79 2c 20 24 76 61 6c 29 3a 20 76 6f 69 64 20 7b 0a 69 66 20 28 73 74 | nfig,.$key,.$val):.void.{.if.(st |
6a420 | 72 70 6f 73 28 24 6b 65 79 2c 20 27 65 78 74 72 61 2e 27 29 20 3d 3d 3d 20 30 20 7c 7c 20 73 74 | rpos($key,.'extra.').===.0.||.st |
6a440 | 72 70 6f 73 28 24 6b 65 79 2c 20 27 73 63 72 69 70 74 73 2e 27 29 20 3d 3d 3d 20 30 29 20 7b 0a | rpos($key,.'scripts.').===.0).{. |
6a460 | 24 62 69 74 73 20 3d 20 65 78 70 6c 6f 64 65 28 27 2e 27 2c 20 24 6b 65 79 29 3b 0a 24 6c 61 73 | $bits.=.explode('.',.$key);.$las |
6a480 | 74 20 3d 20 61 72 72 61 79 5f 70 6f 70 28 24 62 69 74 73 29 3b 0a 24 61 72 72 20 3d 20 26 24 63 | t.=.array_pop($bits);.$arr.=.&$c |
6a4a0 | 6f 6e 66 69 67 5b 72 65 73 65 74 28 24 62 69 74 73 29 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 62 | onfig[reset($bits)];.foreach.($b |
6a4c0 | 69 74 73 20 61 73 20 24 62 69 74 29 20 7b 0a 69 66 20 28 21 69 73 73 65 74 28 24 61 72 72 5b 24 | its.as.$bit).{.if.(!isset($arr[$ |
6a4e0 | 62 69 74 5d 29 29 20 7b 0a 24 61 72 72 5b 24 62 69 74 5d 20 3d 20 5b 5d 3b 0a 7d 0a 24 61 72 72 | bit])).{.$arr[$bit].=.[];.}.$arr |
6a500 | 20 3d 20 26 24 61 72 72 5b 24 62 69 74 5d 3b 0a 7d 0a 24 61 72 72 5b 24 6c 61 73 74 5d 20 3d 20 | .=.&$arr[$bit];.}.$arr[$last].=. |
6a520 | 24 76 61 6c 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 63 6f 6e 66 69 67 5b 24 6b 65 79 5d 20 3d 20 24 | $val;.}.else.{.$config[$key].=.$ |
6a540 | 76 61 6c 3b 0a 7d 0a 7d 2c 20 24 6e 61 6d 65 2c 20 24 76 61 6c 75 65 29 3b 0a 7d 0a 0a 0a 0a 0a | val;.}.},.$name,.$value);.}..... |
6a560 | 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 72 65 6d 6f 76 65 50 72 6f 70 65 72 74 79 28 73 | public.function.removeProperty(s |
6a580 | 74 72 69 6e 67 20 24 6e 61 6d 65 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 6d 61 6e 69 | tring.$name):.void.{.$this->mani |
6a5a0 | 70 75 6c 61 74 65 4a 73 6f 6e 28 27 72 65 6d 6f 76 65 50 72 6f 70 65 72 74 79 27 2c 20 73 74 61 | pulateJson('removeProperty',.sta |
6a5c0 | 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 26 24 63 6f 6e 66 69 67 2c 20 24 6b 65 79 29 3a 20 76 | tic.function.(&$config,.$key):.v |
6a5e0 | 6f 69 64 20 7b 0a 69 66 20 28 73 74 72 70 6f 73 28 24 6b 65 79 2c 20 27 65 78 74 72 61 2e 27 29 | oid.{.if.(strpos($key,.'extra.') |
6a600 | 20 3d 3d 3d 20 30 20 7c 7c 20 73 74 72 70 6f 73 28 24 6b 65 79 2c 20 27 73 63 72 69 70 74 73 2e | .===.0.||.strpos($key,.'scripts. |
6a620 | 27 29 20 3d 3d 3d 20 30 29 20 7b 0a 24 62 69 74 73 20 3d 20 65 78 70 6c 6f 64 65 28 27 2e 27 2c | ').===.0).{.$bits.=.explode('.', |
6a640 | 20 24 6b 65 79 29 3b 0a 24 6c 61 73 74 20 3d 20 61 72 72 61 79 5f 70 6f 70 28 24 62 69 74 73 29 | .$key);.$last.=.array_pop($bits) |
6a660 | 3b 0a 24 61 72 72 20 3d 20 26 24 63 6f 6e 66 69 67 5b 72 65 73 65 74 28 24 62 69 74 73 29 5d 3b | ;.$arr.=.&$config[reset($bits)]; |
6a680 | 0a 66 6f 72 65 61 63 68 20 28 24 62 69 74 73 20 61 73 20 24 62 69 74 29 20 7b 0a 69 66 20 28 21 | .foreach.($bits.as.$bit).{.if.(! |
6a6a0 | 69 73 73 65 74 28 24 61 72 72 5b 24 62 69 74 5d 29 29 20 7b 0a 72 65 74 75 72 6e 3b 0a 7d 0a 24 | isset($arr[$bit])).{.return;.}.$ |
6a6c0 | 61 72 72 20 3d 20 26 24 61 72 72 5b 24 62 69 74 5d 3b 0a 7d 0a 75 6e 73 65 74 28 24 61 72 72 5b | arr.=.&$arr[$bit];.}.unset($arr[ |
6a6e0 | 24 6c 61 73 74 5d 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 75 6e 73 65 74 28 24 63 6f 6e 66 69 67 5b | $last]);.}.else.{.unset($config[ |
6a700 | 24 6b 65 79 5d 29 3b 0a 7d 0a 7d 2c 20 24 6e 61 6d 65 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 | $key]);.}.},.$name);.}.....publi |
6a720 | 63 20 66 75 6e 63 74 69 6f 6e 20 61 64 64 4c 69 6e 6b 28 73 74 72 69 6e 67 20 24 74 79 70 65 2c | c.function.addLink(string.$type, |
6a740 | 20 73 74 72 69 6e 67 20 24 6e 61 6d 65 2c 20 73 74 72 69 6e 67 20 24 76 61 6c 75 65 29 3a 20 76 | .string.$name,.string.$value):.v |
6a760 | 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 6d 61 6e 69 70 75 6c 61 74 65 4a 73 6f 6e 28 27 61 64 64 | oid.{.$this->manipulateJson('add |
6a780 | 4c 69 6e 6b 27 2c 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 26 24 63 6f 6e 66 69 67 | Link',.static.function.(&$config |
6a7a0 | 2c 20 24 74 79 70 65 2c 20 24 6e 61 6d 65 2c 20 24 76 61 6c 75 65 29 3a 20 76 6f 69 64 20 7b 0a | ,.$type,.$name,.$value):.void.{. |
6a7c0 | 24 63 6f 6e 66 69 67 5b 24 74 79 70 65 5d 5b 24 6e 61 6d 65 5d 20 3d 20 24 76 61 6c 75 65 3b 0a | $config[$type][$name].=.$value;. |
6a7e0 | 7d 2c 20 24 74 79 70 65 2c 20 24 6e 61 6d 65 2c 20 24 76 61 6c 75 65 29 3b 0a 7d 0a 0a 0a 0a 0a | },.$type,.$name,.$value);.}..... |
6a800 | 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 72 65 6d 6f 76 65 4c 69 6e 6b 28 73 74 72 69 6e | public.function.removeLink(strin |
6a820 | 67 20 24 74 79 70 65 2c 20 73 74 72 69 6e 67 20 24 6e 61 6d 65 29 3a 20 76 6f 69 64 0a 7b 0a 24 | g.$type,.string.$name):.void.{.$ |
6a840 | 74 68 69 73 2d 3e 6d 61 6e 69 70 75 6c 61 74 65 4a 73 6f 6e 28 27 72 65 6d 6f 76 65 53 75 62 4e | this->manipulateJson('removeSubN |
6a860 | 6f 64 65 27 2c 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 26 24 63 6f 6e 66 69 67 2c | ode',.static.function.(&$config, |
6a880 | 20 24 74 79 70 65 2c 20 24 6e 61 6d 65 29 3a 20 76 6f 69 64 20 7b 0a 75 6e 73 65 74 28 24 63 6f | .$type,.$name):.void.{.unset($co |
6a8a0 | 6e 66 69 67 5b 24 74 79 70 65 5d 5b 24 6e 61 6d 65 5d 29 3b 0a 7d 2c 20 24 74 79 70 65 2c 20 24 | nfig[$type][$name]);.},.$type,.$ |
6a8c0 | 6e 61 6d 65 29 3b 0a 24 74 68 69 73 2d 3e 6d 61 6e 69 70 75 6c 61 74 65 4a 73 6f 6e 28 27 72 65 | name);.$this->manipulateJson('re |
6a8e0 | 6d 6f 76 65 4d 61 69 6e 4b 65 79 49 66 45 6d 70 74 79 27 2c 20 73 74 61 74 69 63 20 66 75 6e 63 | moveMainKeyIfEmpty',.static.func |
6a900 | 74 69 6f 6e 20 28 26 24 63 6f 6e 66 69 67 2c 20 24 74 79 70 65 29 3a 20 76 6f 69 64 20 7b 0a 69 | tion.(&$config,.$type):.void.{.i |
6a920 | 66 20 28 30 20 3d 3d 3d 20 63 6f 75 6e 74 28 24 63 6f 6e 66 69 67 5b 24 74 79 70 65 5d 29 29 20 | f.(0.===.count($config[$type])). |
6a940 | 7b 0a 75 6e 73 65 74 28 24 63 6f 6e 66 69 67 5b 24 74 79 70 65 5d 29 3b 0a 7d 0a 7d 2c 20 24 74 | {.unset($config[$type]);.}.},.$t |
6a960 | 79 70 65 29 3b 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 6d 61 6e | ype);.}.....private.function.man |
6a980 | 69 70 75 6c 61 74 65 4a 73 6f 6e 28 73 74 72 69 6e 67 20 24 6d 65 74 68 6f 64 2c 20 63 61 6c 6c | ipulateJson(string.$method,.call |
6a9a0 | 61 62 6c 65 20 24 66 61 6c 6c 62 61 63 6b 2c 20 2e 2e 2e 24 61 72 67 73 29 3a 20 76 6f 69 64 0a | able.$fallback,....$args):.void. |
6a9c0 | 7b 0a 69 66 20 28 24 74 68 69 73 2d 3e 66 69 6c 65 2d 3e 65 78 69 73 74 73 28 29 29 20 7b 0a 69 | {.if.($this->file->exists()).{.i |
6a9e0 | 66 20 28 21 69 73 5f 77 72 69 74 61 62 6c 65 28 24 74 68 69 73 2d 3e 66 69 6c 65 2d 3e 67 65 74 | f.(!is_writable($this->file->get |
6aa00 | 50 61 74 68 28 29 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 | Path())).{.throw.new.\RuntimeExc |
6aa20 | 65 70 74 69 6f 6e 28 73 70 72 69 6e 74 66 28 27 54 68 65 20 66 69 6c 65 20 22 25 73 22 20 69 73 | eption(sprintf('The.file."%s".is |
6aa40 | 20 6e 6f 74 20 77 72 69 74 61 62 6c 65 2e 27 2c 20 24 74 68 69 73 2d 3e 66 69 6c 65 2d 3e 67 65 | .not.writable.',.$this->file->ge |
6aa60 | 74 50 61 74 68 28 29 29 29 3b 0a 7d 0a 0a 69 66 20 28 21 46 69 6c 65 73 79 73 74 65 6d 3a 3a 69 | tPath()));.}..if.(!Filesystem::i |
6aa80 | 73 52 65 61 64 61 62 6c 65 28 24 74 68 69 73 2d 3e 66 69 6c 65 2d 3e 67 65 74 50 61 74 68 28 29 | sReadable($this->file->getPath() |
6aaa0 | 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e | )).{.throw.new.\RuntimeException |
6aac0 | 28 73 70 72 69 6e 74 66 28 27 54 68 65 20 66 69 6c 65 20 22 25 73 22 20 69 73 20 6e 6f 74 20 72 | (sprintf('The.file."%s".is.not.r |
6aae0 | 65 61 64 61 62 6c 65 2e 27 2c 20 24 74 68 69 73 2d 3e 66 69 6c 65 2d 3e 67 65 74 50 61 74 68 28 | eadable.',.$this->file->getPath( |
6ab00 | 29 29 29 3b 0a 7d 0a 0a 24 63 6f 6e 74 65 6e 74 73 20 3d 20 66 69 6c 65 5f 67 65 74 5f 63 6f 6e | )));.}..$contents.=.file_get_con |
6ab20 | 74 65 6e 74 73 28 24 74 68 69 73 2d 3e 66 69 6c 65 2d 3e 67 65 74 50 61 74 68 28 29 29 3b 0a 7d | tents($this->file->getPath());.} |
6ab40 | 20 65 6c 73 65 69 66 20 28 24 74 68 69 73 2d 3e 61 75 74 68 43 6f 6e 66 69 67 29 20 7b 0a 24 63 | .elseif.($this->authConfig).{.$c |
6ab60 | 6f 6e 74 65 6e 74 73 20 3d 20 22 7b 5c 6e 7d 5c 6e 22 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 63 6f | ontents.=."{\n}\n";.}.else.{.$co |
6ab80 | 6e 74 65 6e 74 73 20 3d 20 22 7b 5c 6e 20 20 20 20 5c 22 63 6f 6e 66 69 67 5c 22 3a 20 7b 5c 6e | ntents.=."{\n....\"config\":.{\n |
6aba0 | 20 20 20 20 7d 5c 6e 7d 5c 6e 22 3b 0a 7d 0a 0a 24 6d 61 6e 69 70 75 6c 61 74 6f 72 20 3d 20 6e | ....}\n}\n";.}..$manipulator.=.n |
6abc0 | 65 77 20 4a 73 6f 6e 4d 61 6e 69 70 75 6c 61 74 6f 72 28 24 63 6f 6e 74 65 6e 74 73 29 3b 0a 0a | ew.JsonManipulator($contents);.. |
6abe0 | 24 6e 65 77 46 69 6c 65 20 3d 20 21 24 74 68 69 73 2d 3e 66 69 6c 65 2d 3e 65 78 69 73 74 73 28 | $newFile.=.!$this->file->exists( |
6ac00 | 29 3b 0a 0a 0a 69 66 20 28 24 74 68 69 73 2d 3e 61 75 74 68 43 6f 6e 66 69 67 20 26 26 20 24 6d | );...if.($this->authConfig.&&.$m |
6ac20 | 65 74 68 6f 64 20 3d 3d 3d 20 27 61 64 64 43 6f 6e 66 69 67 53 65 74 74 69 6e 67 27 29 20 7b 0a | ethod.===.'addConfigSetting').{. |
6ac40 | 24 6d 65 74 68 6f 64 20 3d 20 27 61 64 64 53 75 62 4e 6f 64 65 27 3b 0a 5b 24 6d 61 69 6e 4e 6f | $method.=.'addSubNode';.[$mainNo |
6ac60 | 64 65 2c 20 24 6e 61 6d 65 5d 20 3d 20 65 78 70 6c 6f 64 65 28 27 2e 27 2c 20 24 61 72 67 73 5b | de,.$name].=.explode('.',.$args[ |
6ac80 | 30 5d 2c 20 32 29 3b 0a 24 61 72 67 73 20 3d 20 5b 24 6d 61 69 6e 4e 6f 64 65 2c 20 24 6e 61 6d | 0],.2);.$args.=.[$mainNode,.$nam |
6aca0 | 65 2c 20 24 61 72 67 73 5b 31 5d 5d 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 74 68 69 73 2d 3e 61 | e,.$args[1]];.}.elseif.($this->a |
6acc0 | 75 74 68 43 6f 6e 66 69 67 20 26 26 20 24 6d 65 74 68 6f 64 20 3d 3d 3d 20 27 72 65 6d 6f 76 65 | uthConfig.&&.$method.===.'remove |
6ace0 | 43 6f 6e 66 69 67 53 65 74 74 69 6e 67 27 29 20 7b 0a 24 6d 65 74 68 6f 64 20 3d 20 27 72 65 6d | ConfigSetting').{.$method.=.'rem |
6ad00 | 6f 76 65 53 75 62 4e 6f 64 65 27 3b 0a 5b 24 6d 61 69 6e 4e 6f 64 65 2c 20 24 6e 61 6d 65 5d 20 | oveSubNode';.[$mainNode,.$name]. |
6ad20 | 3d 20 65 78 70 6c 6f 64 65 28 27 2e 27 2c 20 24 61 72 67 73 5b 30 5d 2c 20 32 29 3b 0a 24 61 72 | =.explode('.',.$args[0],.2);.$ar |
6ad40 | 67 73 20 3d 20 5b 24 6d 61 69 6e 4e 6f 64 65 2c 20 24 6e 61 6d 65 5d 3b 0a 7d 0a 0a 0a 69 66 20 | gs.=.[$mainNode,.$name];.}...if. |
6ad60 | 28 63 61 6c 6c 5f 75 73 65 72 5f 66 75 6e 63 5f 61 72 72 61 79 28 5b 24 6d 61 6e 69 70 75 6c 61 | (call_user_func_array([$manipula |
6ad80 | 74 6f 72 2c 20 24 6d 65 74 68 6f 64 5d 2c 20 24 61 72 67 73 29 29 20 7b 0a 66 69 6c 65 5f 70 75 | tor,.$method],.$args)).{.file_pu |
6ada0 | 74 5f 63 6f 6e 74 65 6e 74 73 28 24 74 68 69 73 2d 3e 66 69 6c 65 2d 3e 67 65 74 50 61 74 68 28 | t_contents($this->file->getPath( |
6adc0 | 29 2c 20 24 6d 61 6e 69 70 75 6c 61 74 6f 72 2d 3e 67 65 74 43 6f 6e 74 65 6e 74 73 28 29 29 3b | ),.$manipulator->getContents()); |
6ade0 | 0a 7d 20 65 6c 73 65 20 7b 0a 0a 24 63 6f 6e 66 69 67 20 3d 20 24 74 68 69 73 2d 3e 66 69 6c 65 | .}.else.{..$config.=.$this->file |
6ae00 | 2d 3e 72 65 61 64 28 29 3b 0a 24 74 68 69 73 2d 3e 61 72 72 61 79 55 6e 73 68 69 66 74 52 65 66 | ->read();.$this->arrayUnshiftRef |
6ae20 | 28 24 61 72 67 73 2c 20 24 63 6f 6e 66 69 67 29 3b 0a 24 66 61 6c 6c 62 61 63 6b 28 2e 2e 2e 24 | ($args,.$config);.$fallback(...$ |
6ae40 | 61 72 67 73 29 3b 0a 0a 66 6f 72 65 61 63 68 20 28 5b 27 72 65 71 75 69 72 65 27 2c 20 27 72 65 | args);..foreach.(['require',.'re |
6ae60 | 71 75 69 72 65 2d 64 65 76 27 2c 20 27 63 6f 6e 66 6c 69 63 74 27 2c 20 27 70 72 6f 76 69 64 65 | quire-dev',.'conflict',.'provide |
6ae80 | 27 2c 20 27 72 65 70 6c 61 63 65 27 2c 20 27 73 75 67 67 65 73 74 27 2c 20 27 63 6f 6e 66 69 67 | ',.'replace',.'suggest',.'config |
6aea0 | 27 2c 20 27 61 75 74 6f 6c 6f 61 64 27 2c 20 27 61 75 74 6f 6c 6f 61 64 2d 64 65 76 27 2c 20 27 | ',.'autoload',.'autoload-dev',.' |
6aec0 | 73 63 72 69 70 74 73 27 2c 20 27 73 63 72 69 70 74 73 2d 64 65 73 63 72 69 70 74 69 6f 6e 73 27 | scripts',.'scripts-descriptions' |
6aee0 | 2c 20 27 73 75 70 70 6f 72 74 27 5d 20 61 73 20 24 70 72 6f 70 29 20 7b 0a 69 66 20 28 69 73 73 | ,.'support'].as.$prop).{.if.(iss |
6af00 | 65 74 28 24 63 6f 6e 66 69 67 5b 24 70 72 6f 70 5d 29 20 26 26 20 24 63 6f 6e 66 69 67 5b 24 70 | et($config[$prop]).&&.$config[$p |
6af20 | 72 6f 70 5d 20 3d 3d 3d 20 5b 5d 29 20 7b 0a 24 63 6f 6e 66 69 67 5b 24 70 72 6f 70 5d 20 3d 20 | rop].===.[]).{.$config[$prop].=. |
6af40 | 6e 65 77 20 5c 73 74 64 43 6c 61 73 73 3b 0a 7d 0a 7d 0a 66 6f 72 65 61 63 68 20 28 5b 27 70 73 | new.\stdClass;.}.}.foreach.(['ps |
6af60 | 72 2d 30 27 2c 20 27 70 73 72 2d 34 27 5d 20 61 73 20 24 70 72 6f 70 29 20 7b 0a 69 66 20 28 69 | r-0',.'psr-4'].as.$prop).{.if.(i |
6af80 | 73 73 65 74 28 24 63 6f 6e 66 69 67 5b 27 61 75 74 6f 6c 6f 61 64 27 5d 5b 24 70 72 6f 70 5d 29 | sset($config['autoload'][$prop]) |
6afa0 | 20 26 26 20 24 63 6f 6e 66 69 67 5b 27 61 75 74 6f 6c 6f 61 64 27 5d 5b 24 70 72 6f 70 5d 20 3d | .&&.$config['autoload'][$prop].= |
6afc0 | 3d 3d 20 5b 5d 29 20 7b 0a 24 63 6f 6e 66 69 67 5b 27 61 75 74 6f 6c 6f 61 64 27 5d 5b 24 70 72 | ==.[]).{.$config['autoload'][$pr |
6afe0 | 6f 70 5d 20 3d 20 6e 65 77 20 5c 73 74 64 43 6c 61 73 73 3b 0a 7d 0a 69 66 20 28 69 73 73 65 74 | op].=.new.\stdClass;.}.if.(isset |
6b000 | 28 24 63 6f 6e 66 69 67 5b 27 61 75 74 6f 6c 6f 61 64 2d 64 65 76 27 5d 5b 24 70 72 6f 70 5d 29 | ($config['autoload-dev'][$prop]) |
6b020 | 20 26 26 20 24 63 6f 6e 66 69 67 5b 27 61 75 74 6f 6c 6f 61 64 2d 64 65 76 27 5d 5b 24 70 72 6f | .&&.$config['autoload-dev'][$pro |
6b040 | 70 5d 20 3d 3d 3d 20 5b 5d 29 20 7b 0a 24 63 6f 6e 66 69 67 5b 27 61 75 74 6f 6c 6f 61 64 2d 64 | p].===.[]).{.$config['autoload-d |
6b060 | 65 76 27 5d 5b 24 70 72 6f 70 5d 20 3d 20 6e 65 77 20 5c 73 74 64 43 6c 61 73 73 3b 0a 7d 0a 7d | ev'][$prop].=.new.\stdClass;.}.} |
6b080 | 0a 66 6f 72 65 61 63 68 20 28 5b 27 70 6c 61 74 66 6f 72 6d 27 2c 20 27 68 74 74 70 2d 62 61 73 | .foreach.(['platform',.'http-bas |
6b0a0 | 69 63 27 2c 20 27 62 65 61 72 65 72 27 2c 20 27 67 69 74 6c 61 62 2d 74 6f 6b 65 6e 27 2c 20 27 | ic',.'bearer',.'gitlab-token',.' |
6b0c0 | 67 69 74 6c 61 62 2d 6f 61 75 74 68 27 2c 20 27 67 69 74 68 75 62 2d 6f 61 75 74 68 27 2c 20 27 | gitlab-oauth',.'github-oauth',.' |
6b0e0 | 70 72 65 66 65 72 72 65 64 2d 69 6e 73 74 61 6c 6c 27 5d 20 61 73 20 24 70 72 6f 70 29 20 7b 0a | preferred-install'].as.$prop).{. |
6b100 | 69 66 20 28 69 73 73 65 74 28 24 63 6f 6e 66 69 67 5b 27 63 6f 6e 66 69 67 27 5d 5b 24 70 72 6f | if.(isset($config['config'][$pro |
6b120 | 70 5d 29 20 26 26 20 24 63 6f 6e 66 69 67 5b 27 63 6f 6e 66 69 67 27 5d 5b 24 70 72 6f 70 5d 20 | p]).&&.$config['config'][$prop]. |
6b140 | 3d 3d 3d 20 5b 5d 29 20 7b 0a 24 63 6f 6e 66 69 67 5b 27 63 6f 6e 66 69 67 27 5d 5b 24 70 72 6f | ===.[]).{.$config['config'][$pro |
6b160 | 70 5d 20 3d 20 6e 65 77 20 5c 73 74 64 43 6c 61 73 73 3b 0a 7d 0a 7d 0a 24 74 68 69 73 2d 3e 66 | p].=.new.\stdClass;.}.}.$this->f |
6b180 | 69 6c 65 2d 3e 77 72 69 74 65 28 24 63 6f 6e 66 69 67 29 3b 0a 7d 0a 0a 74 72 79 20 7b 0a 24 74 | ile->write($config);.}..try.{.$t |
6b1a0 | 68 69 73 2d 3e 66 69 6c 65 2d 3e 76 61 6c 69 64 61 74 65 53 63 68 65 6d 61 28 4a 73 6f 6e 46 69 | his->file->validateSchema(JsonFi |
6b1c0 | 6c 65 3a 3a 4c 41 58 5f 53 43 48 45 4d 41 29 3b 0a 7d 20 63 61 74 63 68 20 28 4a 73 6f 6e 56 61 | le::LAX_SCHEMA);.}.catch.(JsonVa |
6b1e0 | 6c 69 64 61 74 69 6f 6e 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 0a 66 69 6c 65 5f 70 75 | lidationException.$e).{..file_pu |
6b200 | 74 5f 63 6f 6e 74 65 6e 74 73 28 24 74 68 69 73 2d 3e 66 69 6c 65 2d 3e 67 65 74 50 61 74 68 28 | t_contents($this->file->getPath( |
6b220 | 29 2c 20 24 63 6f 6e 74 65 6e 74 73 29 3b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d | ),.$contents);.throw.new.\Runtim |
6b240 | 65 45 78 63 65 70 74 69 6f 6e 28 27 46 61 69 6c 65 64 20 74 6f 20 75 70 64 61 74 65 20 63 6f 6d | eException('Failed.to.update.com |
6b260 | 70 6f 73 65 72 2e 6a 73 6f 6e 20 77 69 74 68 20 61 20 76 61 6c 69 64 20 66 6f 72 6d 61 74 2c 20 | poser.json.with.a.valid.format,. |
6b280 | 72 65 76 65 72 74 69 6e 67 20 74 6f 20 74 68 65 20 6f 72 69 67 69 6e 61 6c 20 63 6f 6e 74 65 6e | reverting.to.the.original.conten |
6b2a0 | 74 2e 20 50 6c 65 61 73 65 20 72 65 70 6f 72 74 20 61 6e 20 69 73 73 75 65 20 74 6f 20 75 73 20 | t..Please.report.an.issue.to.us. |
6b2c0 | 77 69 74 68 20 64 65 74 61 69 6c 73 20 28 63 6f 6d 6d 61 6e 64 20 79 6f 75 20 72 75 6e 20 61 6e | with.details.(command.you.run.an |
6b2e0 | 64 20 61 20 63 6f 70 79 20 6f 66 20 79 6f 75 72 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 29 2e | d.a.copy.of.your.composer.json). |
6b300 | 20 27 2e 50 48 50 5f 45 4f 4c 2e 69 6d 70 6c 6f 64 65 28 50 48 50 5f 45 4f 4c 2c 20 24 65 2d 3e | .'.PHP_EOL.implode(PHP_EOL,.$e-> |
6b320 | 67 65 74 45 72 72 6f 72 73 28 29 29 2c 20 30 2c 20 24 65 29 3b 0a 7d 0a 0a 69 66 20 28 24 6e 65 | getErrors()),.0,.$e);.}..if.($ne |
6b340 | 77 46 69 6c 65 29 20 7b 0a 53 69 6c 65 6e 63 65 72 3a 3a 63 61 6c 6c 28 27 63 68 6d 6f 64 27 2c | wFile).{.Silencer::call('chmod', |
6b360 | 20 24 74 68 69 73 2d 3e 66 69 6c 65 2d 3e 67 65 74 50 61 74 68 28 29 2c 20 30 36 30 30 29 3b 0a | .$this->file->getPath(),.0600);. |
6b380 | 7d 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 61 72 72 61 | }.}........private.function.arra |
6b3a0 | 79 55 6e 73 68 69 66 74 52 65 66 28 61 72 72 61 79 20 26 24 61 72 72 61 79 2c 20 26 24 76 61 6c | yUnshiftRef(array.&$array,.&$val |
6b3c0 | 75 65 29 3a 20 69 6e 74 0a 7b 0a 24 72 65 74 75 72 6e 20 3d 20 61 72 72 61 79 5f 75 6e 73 68 69 | ue):.int.{.$return.=.array_unshi |
6b3e0 | 66 74 28 24 61 72 72 61 79 2c 20 27 27 29 3b 0a 24 61 72 72 61 79 5b 30 5d 20 3d 20 26 24 76 61 | ft($array,.'');.$array[0].=.&$va |
6b400 | 6c 75 65 3b 0a 0a 72 65 74 75 72 6e 20 24 72 65 74 75 72 6e 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 | lue;..return.$return;.}.}.<?php. |
6b420 | 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a | declare(strict_types=1);........ |
6b440 | 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 73 6f 6c 65 3b 0a | ....namespace.Composer\Console;. |
6b460 | 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 4f 5c 4e 75 6c 6c 49 4f 3b 0a 75 73 65 20 43 6f 6d | .use.Composer\IO\NullIO;.use.Com |
6b480 | 70 6f 73 65 72 5c 55 74 69 6c 5c 46 69 6c 65 73 79 73 74 65 6d 3b 0a 75 73 65 20 43 6f 6d 70 6f | poser\Util\Filesystem;.use.Compo |
6b4a0 | 73 65 72 5c 55 74 69 6c 5c 50 6c 61 74 66 6f 72 6d 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c | ser\Util\Platform;.use.Composer\ |
6b4c0 | 55 74 69 6c 5c 53 69 6c 65 6e 63 65 72 3b 0a 75 73 65 20 4c 6f 67 69 63 45 78 63 65 70 74 69 6f | Util\Silencer;.use.LogicExceptio |
6b4e0 | 6e 3b 0a 75 73 65 20 53 65 6c 64 5c 53 69 67 6e 61 6c 5c 53 69 67 6e 61 6c 48 61 6e 64 6c 65 72 | n;.use.Seld\Signal\SignalHandler |
6b500 | 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c | ;.use.Symfony\Component\Console\ |
6b520 | 41 70 70 6c 69 63 61 74 69 6f 6e 20 61 73 20 42 61 73 65 41 70 70 6c 69 63 61 74 69 6f 6e 3b 0a | Application.as.BaseApplication;. |
6b540 | 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 45 78 | use.Symfony\Component\Console\Ex |
6b560 | 63 65 70 74 69 6f 6e 5c 43 6f 6d 6d 61 6e 64 4e 6f 74 46 6f 75 6e 64 45 78 63 65 70 74 69 6f 6e | ception\CommandNotFoundException |
6b580 | 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c | ;.use.Symfony\Component\Console\ |
6b5a0 | 48 65 6c 70 65 72 5c 48 65 6c 70 65 72 53 65 74 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f | Helper\HelperSet;.use.Symfony\Co |
6b5c0 | 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 48 65 6c 70 65 72 5c 51 75 65 73 74 69 6f 6e 48 | mponent\Console\Helper\QuestionH |
6b5e0 | 65 6c 70 65 72 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e | elper;.use.Symfony\Component\Con |
6b600 | 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 44 65 66 69 6e 69 74 69 6f 6e 3b 0a 75 73 65 20 | sole\Input\InputDefinition;.use. |
6b620 | 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c | Symfony\Component\Console\Input\ |
6b640 | 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 | InputInterface;.use.Symfony\Comp |
6b660 | 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 4f 70 74 69 6f 6e 3b | onent\Console\Input\InputOption; |
6b680 | 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 4f | .use.Symfony\Component\Console\O |
6b6a0 | 75 74 70 75 74 5c 43 6f 6e 73 6f 6c 65 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 | utput\ConsoleOutputInterface;.us |
6b6c0 | 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 4f 75 74 70 | e.Symfony\Component\Console\Outp |
6b6e0 | 75 74 5c 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 53 65 6c 64 5c 4a 73 6f | ut\OutputInterface;.use.Seld\Jso |
6b700 | 6e 4c 69 6e 74 5c 50 61 72 73 69 6e 67 45 78 63 65 70 74 69 6f 6e 3b 0a 75 73 65 20 43 6f 6d 70 | nLint\ParsingException;.use.Comp |
6b720 | 6f 73 65 72 5c 43 6f 6d 6d 61 6e 64 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6d 70 6f | oser\Command;.use.Composer\Compo |
6b740 | 73 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 46 61 63 74 6f 72 79 3b 0a 75 73 65 20 43 | ser;.use.Composer\Factory;.use.C |
6b760 | 6f 6d 70 6f 73 65 72 5c 49 4f 5c 49 4f 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 | omposer\IO\IOInterface;.use.Comp |
6b780 | 6f 73 65 72 5c 49 4f 5c 43 6f 6e 73 6f 6c 65 49 4f 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c | oser\IO\ConsoleIO;.use.Composer\ |
6b7a0 | 4a 73 6f 6e 5c 4a 73 6f 6e 56 61 6c 69 64 61 74 69 6f 6e 45 78 63 65 70 74 69 6f 6e 3b 0a 75 73 | Json\JsonValidationException;.us |
6b7c0 | 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 45 72 72 6f 72 48 61 6e 64 6c 65 72 3b 0a 75 73 | e.Composer\Util\ErrorHandler;.us |
6b7e0 | 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 48 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 3b 0a | e.Composer\Util\HttpDownloader;. |
6b800 | 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 5c 53 63 72 | use.Composer\EventDispatcher\Scr |
6b820 | 69 70 74 45 78 65 63 75 74 69 6f 6e 45 78 63 65 70 74 69 6f 6e 3b 0a 75 73 65 20 43 6f 6d 70 6f | iptExecutionException;.use.Compo |
6b840 | 73 65 72 5c 45 78 63 65 70 74 69 6f 6e 5c 4e 6f 53 73 6c 45 78 63 65 70 74 69 6f 6e 3b 0a 75 73 | ser\Exception\NoSslException;.us |
6b860 | 65 20 43 6f 6d 70 6f 73 65 72 5c 58 64 65 62 75 67 48 61 6e 64 6c 65 72 5c 58 64 65 62 75 67 48 | e.Composer\XdebugHandler\XdebugH |
6b880 | 61 6e 64 6c 65 72 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 50 72 | andler;.use.Symfony\Component\Pr |
6b8a0 | 6f 63 65 73 73 5c 45 78 63 65 70 74 69 6f 6e 5c 50 72 6f 63 65 73 73 54 69 6d 65 64 4f 75 74 45 | ocess\Exception\ProcessTimedOutE |
6b8c0 | 78 63 65 70 74 69 6f 6e 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 41 70 70 6c 69 63 61 74 | xception;.........class.Applicat |
6b8e0 | 69 6f 6e 20 65 78 74 65 6e 64 73 20 42 61 73 65 41 70 70 6c 69 63 61 74 69 6f 6e 0a 7b 0a 0a 0a | ion.extends.BaseApplication.{... |
6b900 | 0a 70 72 6f 74 65 63 74 65 64 20 24 63 6f 6d 70 6f 73 65 72 3b 0a 0a 0a 0a 0a 70 72 6f 74 65 63 | .protected.$composer;.....protec |
6b920 | 74 65 64 20 24 69 6f 3b 0a 0a 0a 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 24 6c 6f 67 6f 20 | ted.$io;...private.static.$logo. |
6b940 | 3d 20 27 20 20 20 5f 5f 5f 5f 5f 5f 0a 20 20 2f 20 5f 5f 5f 5f 2f 5f 5f 5f 20 20 5f 5f 5f 5f 20 | =.'...______.../.____/___..____. |
6b960 | 5f 5f 5f 20 20 5f 5f 5f 5f 20 20 5f 5f 5f 5f 20 20 5f 5f 5f 5f 5f 5f 5f 5f 20 20 5f 5f 5f 5f 5f | ___..____..____..________.._____ |
6b980 | 0a 20 2f 20 2f 20 20 20 2f 20 5f 5f 20 5c 2f 20 5f 5f 20 60 5f 5f 20 5c 2f 20 5f 5f 20 5c 2f 20 | .././.../.__.\/.__.`__.\/.__.\/. |
6b9a0 | 5f 5f 20 5c 2f 20 5f 5f 5f 2f 20 5f 20 5c 2f 20 5f 5f 5f 2f 0a 2f 20 2f 5f 5f 5f 2f 20 2f 5f 2f | __.\/.___/._.\/.___/././___/./_/ |
6b9c0 | 20 2f 20 2f 20 2f 20 2f 20 2f 20 2f 20 2f 5f 2f 20 2f 20 2f 5f 2f 20 28 5f 5f 20 20 29 20 20 5f | ./././././././_/././_/.(__..).._ |
6b9e0 | 5f 2f 20 2f 0a 5c 5f 5f 5f 5f 2f 5c 5f 5f 5f 5f 2f 5f 2f 20 2f 5f 2f 20 2f 5f 2f 20 2e 5f 5f 5f | _/./.\____/\____/_/./_/./_/..___ |
6ba00 | 2f 5c 5f 5f 5f 5f 2f 5f 5f 5f 5f 2f 5c 5f 5f 5f 2f 5f 2f 0a 20 20 20 20 20 20 20 20 20 20 20 20 | /\____/____/\___/_/............. |
6ba20 | 20 20 20 20 20 20 20 20 2f 5f 2f 0a 27 3b 0a 0a 0a 70 72 69 76 61 74 65 20 24 68 61 73 50 6c 75 | ......../_/.';...private.$hasPlu |
6ba40 | 67 69 6e 43 6f 6d 6d 61 6e 64 73 20 3d 20 66 61 6c 73 65 3b 0a 0a 70 72 69 76 61 74 65 20 24 64 | ginCommands.=.false;..private.$d |
6ba60 | 69 73 61 62 6c 65 50 6c 75 67 69 6e 73 42 79 44 65 66 61 75 6c 74 20 3d 20 66 61 6c 73 65 3b 0a | isablePluginsByDefault.=.false;. |
6ba80 | 0a 70 72 69 76 61 74 65 20 24 64 69 73 61 62 6c 65 53 63 72 69 70 74 73 42 79 44 65 66 61 75 6c | .private.$disableScriptsByDefaul |
6baa0 | 74 20 3d 20 66 61 6c 73 65 3b 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 69 6e 69 74 69 61 6c 57 | t.=.false;.....private.$initialW |
6bac0 | 6f 72 6b 69 6e 67 44 69 72 65 63 74 6f 72 79 3b 0a 0a 0a 70 72 69 76 61 74 65 20 24 73 69 67 6e | orkingDirectory;...private.$sign |
6bae0 | 61 6c 48 61 6e 64 6c 65 72 3b 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f | alHandler;..public.function.__co |
6bb00 | 6e 73 74 72 75 63 74 28 29 0a 7b 0a 73 74 61 74 69 63 20 24 73 68 75 74 64 6f 77 6e 52 65 67 69 | nstruct().{.static.$shutdownRegi |
6bb20 | 73 74 65 72 65 64 20 3d 20 66 61 6c 73 65 3b 0a 0a 69 66 20 28 66 75 6e 63 74 69 6f 6e 5f 65 78 | stered.=.false;..if.(function_ex |
6bb40 | 69 73 74 73 28 27 69 6e 69 5f 73 65 74 27 29 20 26 26 20 65 78 74 65 6e 73 69 6f 6e 5f 6c 6f 61 | ists('ini_set').&&.extension_loa |
6bb60 | 64 65 64 28 27 78 64 65 62 75 67 27 29 29 20 7b 0a 69 6e 69 5f 73 65 74 28 27 78 64 65 62 75 67 | ded('xdebug')).{.ini_set('xdebug |
6bb80 | 2e 73 68 6f 77 5f 65 78 63 65 70 74 69 6f 6e 5f 74 72 61 63 65 27 2c 20 27 30 27 29 3b 0a 69 6e | .show_exception_trace',.'0');.in |
6bba0 | 69 5f 73 65 74 28 27 78 64 65 62 75 67 2e 73 63 72 65 61 6d 27 2c 20 27 30 27 29 3b 0a 7d 0a 0a | i_set('xdebug.scream',.'0');.}.. |
6bbc0 | 69 66 20 28 66 75 6e 63 74 69 6f 6e 5f 65 78 69 73 74 73 28 27 64 61 74 65 5f 64 65 66 61 75 6c | if.(function_exists('date_defaul |
6bbe0 | 74 5f 74 69 6d 65 7a 6f 6e 65 5f 73 65 74 27 29 20 26 26 20 66 75 6e 63 74 69 6f 6e 5f 65 78 69 | t_timezone_set').&&.function_exi |
6bc00 | 73 74 73 28 27 64 61 74 65 5f 64 65 66 61 75 6c 74 5f 74 69 6d 65 7a 6f 6e 65 5f 67 65 74 27 29 | sts('date_default_timezone_get') |
6bc20 | 29 20 7b 0a 64 61 74 65 5f 64 65 66 61 75 6c 74 5f 74 69 6d 65 7a 6f 6e 65 5f 73 65 74 28 53 69 | ).{.date_default_timezone_set(Si |
6bc40 | 6c 65 6e 63 65 72 3a 3a 63 61 6c 6c 28 27 64 61 74 65 5f 64 65 66 61 75 6c 74 5f 74 69 6d 65 7a | lencer::call('date_default_timez |
6bc60 | 6f 6e 65 5f 67 65 74 27 29 29 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 69 6f 20 3d 20 6e 65 77 20 4e | one_get'));.}..$this->io.=.new.N |
6bc80 | 75 6c 6c 49 4f 28 29 3b 0a 0a 24 74 68 69 73 2d 3e 73 69 67 6e 61 6c 48 61 6e 64 6c 65 72 20 3d | ullIO();..$this->signalHandler.= |
6bca0 | 20 53 69 67 6e 61 6c 48 61 6e 64 6c 65 72 3a 3a 63 72 65 61 74 65 28 5b 53 69 67 6e 61 6c 48 61 | .SignalHandler::create([SignalHa |
6bcc0 | 6e 64 6c 65 72 3a 3a 53 49 47 49 4e 54 2c 20 53 69 67 6e 61 6c 48 61 6e 64 6c 65 72 3a 3a 53 49 | ndler::SIGINT,.SignalHandler::SI |
6bce0 | 47 54 45 52 4d 2c 20 53 69 67 6e 61 6c 48 61 6e 64 6c 65 72 3a 3a 53 49 47 48 55 50 5d 2c 20 66 | GTERM,.SignalHandler::SIGHUP],.f |
6bd00 | 75 6e 63 74 69 6f 6e 20 28 73 74 72 69 6e 67 20 24 73 69 67 6e 61 6c 2c 20 53 69 67 6e 61 6c 48 | unction.(string.$signal,.SignalH |
6bd20 | 61 6e 64 6c 65 72 20 24 68 61 6e 64 6c 65 72 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 | andler.$handler).{.$this->io->wr |
6bd40 | 69 74 65 45 72 72 6f 72 28 27 52 65 63 65 69 76 65 64 20 27 2e 24 73 69 67 6e 61 6c 2e 27 2c 20 | iteError('Received.'.$signal.',. |
6bd60 | 61 62 6f 72 74 69 6e 67 27 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 3a 3a 44 45 | aborting',.true,.IOInterface::DE |
6bd80 | 42 55 47 29 3b 0a 0a 24 68 61 6e 64 6c 65 72 2d 3e 65 78 69 74 57 69 74 68 4c 61 73 74 53 69 67 | BUG);..$handler->exitWithLastSig |
6bda0 | 6e 61 6c 28 29 3b 0a 7d 29 3b 0a 0a 69 66 20 28 21 24 73 68 75 74 64 6f 77 6e 52 65 67 69 73 74 | nal();.});..if.(!$shutdownRegist |
6bdc0 | 65 72 65 64 29 20 7b 0a 24 73 68 75 74 64 6f 77 6e 52 65 67 69 73 74 65 72 65 64 20 3d 20 74 72 | ered).{.$shutdownRegistered.=.tr |
6bde0 | 75 65 3b 0a 0a 72 65 67 69 73 74 65 72 5f 73 68 75 74 64 6f 77 6e 5f 66 75 6e 63 74 69 6f 6e 28 | ue;..register_shutdown_function( |
6be00 | 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 29 3a 20 76 6f 69 64 20 7b 0a 24 6c 61 73 74 | static.function.():.void.{.$last |
6be20 | 45 72 72 6f 72 20 3d 20 65 72 72 6f 72 5f 67 65 74 5f 6c 61 73 74 28 29 3b 0a 0a 69 66 20 28 24 | Error.=.error_get_last();..if.($ |
6be40 | 6c 61 73 74 45 72 72 6f 72 20 26 26 20 24 6c 61 73 74 45 72 72 6f 72 5b 27 6d 65 73 73 61 67 65 | lastError.&&.$lastError['message |
6be60 | 27 5d 20 26 26 0a 28 73 74 72 70 6f 73 28 24 6c 61 73 74 45 72 72 6f 72 5b 27 6d 65 73 73 61 67 | '].&&.(strpos($lastError['messag |
6be80 | 65 27 5d 2c 20 27 41 6c 6c 6f 77 65 64 20 6d 65 6d 6f 72 79 27 29 20 21 3d 3d 20 66 61 6c 73 65 | e'],.'Allowed.memory').!==.false |
6bea0 | 20 20 7c 7c 0a 73 74 72 70 6f 73 28 24 6c 61 73 74 45 72 72 6f 72 5b 27 6d 65 73 73 61 67 65 27 | ..||.strpos($lastError['message' |
6bec0 | 5d 2c 20 27 65 78 63 65 65 64 65 64 20 6d 65 6d 6f 72 79 27 29 20 21 3d 3d 20 66 61 6c 73 65 20 | ],.'exceeded.memory').!==.false. |
6bee0 | 29 29 20 7b 0a 65 63 68 6f 20 22 5c 6e 22 2e 20 27 43 68 65 63 6b 20 68 74 74 70 73 3a 2f 2f 67 | )).{.echo."\n"..'Check.https://g |
6bf00 | 65 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 67 2f 64 6f 63 2f 61 72 74 69 63 6c 65 73 2f 74 72 6f 75 | etcomposer.org/doc/articles/trou |
6bf20 | 62 6c 65 73 68 6f 6f 74 69 6e 67 2e 6d 64 23 6d 65 6d 6f 72 79 2d 6c 69 6d 69 74 2d 65 72 72 6f | bleshooting.md#memory-limit-erro |
6bf40 | 72 73 20 66 6f 72 20 6d 6f 72 65 20 69 6e 66 6f 20 6f 6e 20 68 6f 77 20 74 6f 20 68 61 6e 64 6c | rs.for.more.info.on.how.to.handl |
6bf60 | 65 20 6f 75 74 20 6f 66 20 6d 65 6d 6f 72 79 20 65 72 72 6f 72 73 2e 27 3b 0a 7d 0a 7d 29 3b 0a | e.out.of.memory.errors.';.}.});. |
6bf80 | 7d 0a 0a 24 74 68 69 73 2d 3e 69 6e 69 74 69 61 6c 57 6f 72 6b 69 6e 67 44 69 72 65 63 74 6f 72 | }..$this->initialWorkingDirector |
6bfa0 | 79 20 3d 20 67 65 74 63 77 64 28 29 3b 0a 0a 70 61 72 65 6e 74 3a 3a 5f 5f 63 6f 6e 73 74 72 75 | y.=.getcwd();..parent::__constru |
6bfc0 | 63 74 28 27 43 6f 6d 70 6f 73 65 72 27 2c 20 43 6f 6d 70 6f 73 65 72 3a 3a 67 65 74 56 65 72 73 | ct('Composer',.Composer::getVers |
6bfe0 | 69 6f 6e 28 29 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 64 65 73 | ion());.}..public.function.__des |
6c000 | 74 72 75 63 74 28 29 0a 7b 0a 24 74 68 69 73 2d 3e 73 69 67 6e 61 6c 48 61 6e 64 6c 65 72 2d 3e | truct().{.$this->signalHandler-> |
6c020 | 75 6e 72 65 67 69 73 74 65 72 28 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e | unregister();.}..public.function |
6c040 | 20 72 75 6e 28 3f 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 69 6e 70 75 74 20 3d 20 6e 75 | .run(?InputInterface.$input.=.nu |
6c060 | 6c 6c 2c 20 3f 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 6f 75 74 70 75 74 20 3d 20 6e | ll,.?OutputInterface.$output.=.n |
6c080 | 75 6c 6c 29 3a 20 69 6e 74 0a 7b 0a 69 66 20 28 6e 75 6c 6c 20 3d 3d 3d 20 24 6f 75 74 70 75 74 | ull):.int.{.if.(null.===.$output |
6c0a0 | 29 20 7b 0a 24 6f 75 74 70 75 74 20 3d 20 46 61 63 74 6f 72 79 3a 3a 63 72 65 61 74 65 4f 75 74 | ).{.$output.=.Factory::createOut |
6c0c0 | 70 75 74 28 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 70 61 72 65 6e 74 3a 3a 72 75 6e 28 24 69 6e | put();.}..return.parent::run($in |
6c0e0 | 70 75 74 2c 20 24 6f 75 74 70 75 74 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f | put,.$output);.}..public.functio |
6c100 | 6e 20 64 6f 52 75 6e 28 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 69 6e 70 75 74 2c 20 4f | n.doRun(InputInterface.$input,.O |
6c120 | 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 6f 75 74 70 75 74 29 3a 20 69 6e 74 0a 7b 0a 24 | utputInterface.$output):.int.{.$ |
6c140 | 74 68 69 73 2d 3e 64 69 73 61 62 6c 65 50 6c 75 67 69 6e 73 42 79 44 65 66 61 75 6c 74 20 3d 20 | this->disablePluginsByDefault.=. |
6c160 | 24 69 6e 70 75 74 2d 3e 68 61 73 50 61 72 61 6d 65 74 65 72 4f 70 74 69 6f 6e 28 27 2d 2d 6e 6f | $input->hasParameterOption('--no |
6c180 | 2d 70 6c 75 67 69 6e 73 27 29 3b 0a 24 74 68 69 73 2d 3e 64 69 73 61 62 6c 65 53 63 72 69 70 74 | -plugins');.$this->disableScript |
6c1a0 | 73 42 79 44 65 66 61 75 6c 74 20 3d 20 24 69 6e 70 75 74 2d 3e 68 61 73 50 61 72 61 6d 65 74 65 | sByDefault.=.$input->hasParamete |
6c1c0 | 72 4f 70 74 69 6f 6e 28 27 2d 2d 6e 6f 2d 73 63 72 69 70 74 73 27 29 3b 0a 0a 24 73 74 64 69 6e | rOption('--no-scripts');..$stdin |
6c1e0 | 20 3d 20 64 65 66 69 6e 65 64 28 27 53 54 44 49 4e 27 29 20 3f 20 53 54 44 49 4e 20 3a 20 66 6f | .=.defined('STDIN').?.STDIN.:.fo |
6c200 | 70 65 6e 28 27 70 68 70 3a 2f 2f 73 74 64 69 6e 27 2c 20 27 72 27 29 3b 0a 69 66 20 28 50 6c 61 | pen('php://stdin',.'r');.if.(Pla |
6c220 | 74 66 6f 72 6d 3a 3a 67 65 74 45 6e 76 28 27 43 4f 4d 50 4f 53 45 52 5f 4e 4f 5f 49 4e 54 45 52 | tform::getEnv('COMPOSER_NO_INTER |
6c240 | 41 43 54 49 4f 4e 27 29 20 7c 7c 20 24 73 74 64 69 6e 20 3d 3d 3d 20 66 61 6c 73 65 20 7c 7c 20 | ACTION').||.$stdin.===.false.||. |
6c260 | 21 50 6c 61 74 66 6f 72 6d 3a 3a 69 73 54 74 79 28 24 73 74 64 69 6e 29 29 20 7b 0a 24 69 6e 70 | !Platform::isTty($stdin)).{.$inp |
6c280 | 75 74 2d 3e 73 65 74 49 6e 74 65 72 61 63 74 69 76 65 28 66 61 6c 73 65 29 3b 0a 7d 0a 0a 24 69 | ut->setInteractive(false);.}..$i |
6c2a0 | 6f 20 3d 20 24 74 68 69 73 2d 3e 69 6f 20 3d 20 6e 65 77 20 43 6f 6e 73 6f 6c 65 49 4f 28 24 69 | o.=.$this->io.=.new.ConsoleIO($i |
6c2c0 | 6e 70 75 74 2c 20 24 6f 75 74 70 75 74 2c 20 6e 65 77 20 48 65 6c 70 65 72 53 65 74 28 5b 0a 6e | nput,.$output,.new.HelperSet([.n |
6c2e0 | 65 77 20 51 75 65 73 74 69 6f 6e 48 65 6c 70 65 72 28 29 2c 0a 5d 29 29 3b 0a 0a 0a 45 72 72 6f | ew.QuestionHelper(),.]));...Erro |
6c300 | 72 48 61 6e 64 6c 65 72 3a 3a 72 65 67 69 73 74 65 72 28 24 69 6f 29 3b 0a 0a 69 66 20 28 24 69 | rHandler::register($io);..if.($i |
6c320 | 6e 70 75 74 2d 3e 68 61 73 50 61 72 61 6d 65 74 65 72 4f 70 74 69 6f 6e 28 27 2d 2d 6e 6f 2d 63 | nput->hasParameterOption('--no-c |
6c340 | 61 63 68 65 27 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 44 69 73 61 62 | ache')).{.$io->writeError('Disab |
6c360 | 6c 69 6e 67 20 63 61 63 68 65 20 75 73 61 67 65 27 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 | ling.cache.usage',.true,.IOInter |
6c380 | 66 61 63 65 3a 3a 44 45 42 55 47 29 3b 0a 50 6c 61 74 66 6f 72 6d 3a 3a 70 75 74 45 6e 76 28 27 | face::DEBUG);.Platform::putEnv(' |
6c3a0 | 43 4f 4d 50 4f 53 45 52 5f 43 41 43 48 45 5f 44 49 52 27 2c 20 50 6c 61 74 66 6f 72 6d 3a 3a 69 | COMPOSER_CACHE_DIR',.Platform::i |
6c3c0 | 73 57 69 6e 64 6f 77 73 28 29 20 3f 20 27 6e 75 6c 27 20 3a 20 27 2f 64 65 76 2f 6e 75 6c 6c 27 | sWindows().?.'nul'.:.'/dev/null' |
6c3e0 | 29 3b 0a 7d 0a 0a 0a 24 6e 65 77 57 6f 72 6b 44 69 72 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 4e | );.}...$newWorkDir.=.$this->getN |
6c400 | 65 77 57 6f 72 6b 69 6e 67 44 69 72 28 24 69 6e 70 75 74 29 3b 0a 69 66 20 28 6e 75 6c 6c 20 21 | ewWorkingDir($input);.if.(null.! |
6c420 | 3d 3d 20 24 6e 65 77 57 6f 72 6b 44 69 72 29 20 7b 0a 24 6f 6c 64 57 6f 72 6b 69 6e 67 44 69 72 | ==.$newWorkDir).{.$oldWorkingDir |
6c440 | 20 3d 20 50 6c 61 74 66 6f 72 6d 3a 3a 67 65 74 43 77 64 28 74 72 75 65 29 3b 0a 63 68 64 69 72 | .=.Platform::getCwd(true);.chdir |
6c460 | 28 24 6e 65 77 57 6f 72 6b 44 69 72 29 3b 0a 24 74 68 69 73 2d 3e 69 6e 69 74 69 61 6c 57 6f 72 | ($newWorkDir);.$this->initialWor |
6c480 | 6b 69 6e 67 44 69 72 65 63 74 6f 72 79 20 3d 20 24 6e 65 77 57 6f 72 6b 44 69 72 3b 0a 24 63 77 | kingDirectory.=.$newWorkDir;.$cw |
6c4a0 | 64 20 3d 20 50 6c 61 74 66 6f 72 6d 3a 3a 67 65 74 43 77 64 28 74 72 75 65 29 3b 0a 24 69 6f 2d | d.=.Platform::getCwd(true);.$io- |
6c4c0 | 3e 77 72 69 74 65 45 72 72 6f 72 28 27 43 68 61 6e 67 65 64 20 43 57 44 20 74 6f 20 27 20 2e 20 | >writeError('Changed.CWD.to.'... |
6c4e0 | 28 24 63 77 64 20 21 3d 3d 20 27 27 20 3f 20 24 63 77 64 20 3a 20 24 6e 65 77 57 6f 72 6b 44 69 | ($cwd.!==.''.?.$cwd.:.$newWorkDi |
6c500 | 72 29 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 3a 3a 44 45 42 55 47 29 3b 0a 7d | r),.true,.IOInterface::DEBUG);.} |
6c520 | 0a 0a 0a 24 63 6f 6d 6d 61 6e 64 4e 61 6d 65 20 3d 20 27 27 3b 0a 69 66 20 28 24 6e 61 6d 65 20 | ...$commandName.=.'';.if.($name. |
6c540 | 3d 20 24 74 68 69 73 2d 3e 67 65 74 43 6f 6d 6d 61 6e 64 4e 61 6d 65 28 24 69 6e 70 75 74 29 29 | =.$this->getCommandName($input)) |
6c560 | 20 7b 0a 74 72 79 20 7b 0a 24 63 6f 6d 6d 61 6e 64 4e 61 6d 65 20 3d 20 24 74 68 69 73 2d 3e 66 | .{.try.{.$commandName.=.$this->f |
6c580 | 69 6e 64 28 24 6e 61 6d 65 29 2d 3e 67 65 74 4e 61 6d 65 28 29 3b 0a 7d 20 63 61 74 63 68 20 28 | ind($name)->getName();.}.catch.( |
6c5a0 | 43 6f 6d 6d 61 6e 64 4e 6f 74 46 6f 75 6e 64 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 0a | CommandNotFoundException.$e).{.. |
6c5c0 | 24 63 6f 6d 6d 61 6e 64 4e 61 6d 65 20 3d 20 66 61 6c 73 65 3b 0a 7d 20 63 61 74 63 68 20 28 5c | $commandName.=.false;.}.catch.(\ |
6c5e0 | 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 7d | InvalidArgumentException.$e).{.} |
6c600 | 0a 7d 0a 0a 0a 69 66 20 28 24 69 6f 2d 3e 69 73 49 6e 74 65 72 61 63 74 69 76 65 28 29 20 26 26 | .}...if.($io->isInteractive().&& |
6c620 | 20 6e 75 6c 6c 20 3d 3d 3d 20 24 6e 65 77 57 6f 72 6b 44 69 72 20 26 26 20 21 69 6e 5f 61 72 72 | .null.===.$newWorkDir.&&.!in_arr |
6c640 | 61 79 28 24 63 6f 6d 6d 61 6e 64 4e 61 6d 65 2c 20 5b 27 27 2c 20 27 6c 69 73 74 27 2c 20 27 69 | ay($commandName,.['',.'list',.'i |
6c660 | 6e 69 74 27 2c 20 27 61 62 6f 75 74 27 2c 20 27 68 65 6c 70 27 2c 20 27 64 69 61 67 6e 6f 73 65 | nit',.'about',.'help',.'diagnose |
6c680 | 27 2c 20 27 73 65 6c 66 2d 75 70 64 61 74 65 27 2c 20 27 67 6c 6f 62 61 6c 27 2c 20 27 63 72 65 | ',.'self-update',.'global',.'cre |
6c6a0 | 61 74 65 2d 70 72 6f 6a 65 63 74 27 2c 20 27 6f 75 74 64 61 74 65 64 27 5d 2c 20 74 72 75 65 29 | ate-project',.'outdated'],.true) |
6c6c0 | 20 26 26 20 21 66 69 6c 65 5f 65 78 69 73 74 73 28 46 61 63 74 6f 72 79 3a 3a 67 65 74 43 6f 6d | .&&.!file_exists(Factory::getCom |
6c6e0 | 70 6f 73 65 72 46 69 6c 65 28 29 29 20 26 26 20 28 24 75 73 65 50 61 72 65 6e 74 44 69 72 49 66 | poserFile()).&&.($useParentDirIf |
6c700 | 4e 6f 4a 73 6f 6e 41 76 61 69 6c 61 62 6c 65 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 55 73 65 50 | NoJsonAvailable.=.$this->getUseP |
6c720 | 61 72 65 6e 74 44 69 72 43 6f 6e 66 69 67 56 61 6c 75 65 28 29 29 20 21 3d 3d 20 66 61 6c 73 65 | arentDirConfigValue()).!==.false |
6c740 | 29 20 7b 0a 24 64 69 72 20 3d 20 64 69 72 6e 61 6d 65 28 50 6c 61 74 66 6f 72 6d 3a 3a 67 65 74 | ).{.$dir.=.dirname(Platform::get |
6c760 | 43 77 64 28 74 72 75 65 29 29 3b 0a 24 68 6f 6d 65 20 3d 20 72 65 61 6c 70 61 74 68 28 50 6c 61 | Cwd(true));.$home.=.realpath(Pla |
6c780 | 74 66 6f 72 6d 3a 3a 67 65 74 45 6e 76 28 27 48 4f 4d 45 27 29 20 3f 3a 20 50 6c 61 74 66 6f 72 | tform::getEnv('HOME').?:.Platfor |
6c7a0 | 6d 3a 3a 67 65 74 45 6e 76 28 27 55 53 45 52 50 52 4f 46 49 4c 45 27 29 20 3f 3a 20 27 2f 27 29 | m::getEnv('USERPROFILE').?:.'/') |
6c7c0 | 3b 0a 0a 0a 77 68 69 6c 65 20 28 64 69 72 6e 61 6d 65 28 24 64 69 72 29 20 21 3d 3d 20 24 64 69 | ;...while.(dirname($dir).!==.$di |
6c7e0 | 72 20 26 26 20 24 64 69 72 20 21 3d 3d 20 24 68 6f 6d 65 29 20 7b 0a 69 66 20 28 66 69 6c 65 5f | r.&&.$dir.!==.$home).{.if.(file_ |
6c800 | 65 78 69 73 74 73 28 24 64 69 72 2e 27 2f 27 2e 46 61 63 74 6f 72 79 3a 3a 67 65 74 43 6f 6d 70 | exists($dir.'/'.Factory::getComp |
6c820 | 6f 73 65 72 46 69 6c 65 28 29 29 29 20 7b 0a 69 66 20 28 24 75 73 65 50 61 72 65 6e 74 44 69 72 | oserFile())).{.if.($useParentDir |
6c840 | 49 66 4e 6f 4a 73 6f 6e 41 76 61 69 6c 61 62 6c 65 20 3d 3d 3d 20 74 72 75 65 20 7c 7c 20 24 69 | IfNoJsonAvailable.===.true.||.$i |
6c860 | 6f 2d 3e 61 73 6b 43 6f 6e 66 69 72 6d 61 74 69 6f 6e 28 27 3c 69 6e 66 6f 3e 4e 6f 20 63 6f 6d | o->askConfirmation('<info>No.com |
6c880 | 70 6f 73 65 72 2e 6a 73 6f 6e 20 69 6e 20 63 75 72 72 65 6e 74 20 64 69 72 65 63 74 6f 72 79 2c | poser.json.in.current.directory, |
6c8a0 | 20 64 6f 20 79 6f 75 20 77 61 6e 74 20 74 6f 20 75 73 65 20 74 68 65 20 6f 6e 65 20 61 74 20 27 | .do.you.want.to.use.the.one.at.' |
6c8c0 | 2e 24 64 69 72 2e 27 3f 3c 2f 69 6e 66 6f 3e 20 5b 3c 63 6f 6d 6d 65 6e 74 3e 59 2c 6e 3c 2f 63 | .$dir.'?</info>.[<comment>Y,n</c |
6c8e0 | 6f 6d 6d 65 6e 74 3e 5d 3f 20 27 29 29 20 7b 0a 69 66 20 28 24 75 73 65 50 61 72 65 6e 74 44 69 | omment>]?.')).{.if.($useParentDi |
6c900 | 72 49 66 4e 6f 4a 73 6f 6e 41 76 61 69 6c 61 62 6c 65 20 3d 3d 3d 20 74 72 75 65 29 20 7b 0a 24 | rIfNoJsonAvailable.===.true).{.$ |
6c920 | 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 69 6e 66 6f 3e 4e 6f 20 63 6f 6d 70 6f 73 65 | io->writeError('<info>No.compose |
6c940 | 72 2e 6a 73 6f 6e 20 69 6e 20 63 75 72 72 65 6e 74 20 64 69 72 65 63 74 6f 72 79 2c 20 63 68 61 | r.json.in.current.directory,.cha |
6c960 | 6e 67 69 6e 67 20 77 6f 72 6b 69 6e 67 20 64 69 72 65 63 74 6f 72 79 20 74 6f 20 27 2e 24 64 69 | nging.working.directory.to.'.$di |
6c980 | 72 2e 27 3c 2f 69 6e 66 6f 3e 27 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 | r.'</info>');.}.else.{.$io->writ |
6c9a0 | 65 45 72 72 6f 72 28 27 3c 69 6e 66 6f 3e 41 6c 77 61 79 73 20 77 61 6e 74 20 74 6f 20 75 73 65 | eError('<info>Always.want.to.use |
6c9c0 | 20 74 68 65 20 70 61 72 65 6e 74 20 64 69 72 3f 20 55 73 65 20 22 63 6f 6d 70 6f 73 65 72 20 63 | .the.parent.dir?.Use."composer.c |
6c9e0 | 6f 6e 66 69 67 20 2d 2d 67 6c 6f 62 61 6c 20 75 73 65 2d 70 61 72 65 6e 74 2d 64 69 72 20 74 72 | onfig.--global.use-parent-dir.tr |
6ca00 | 75 65 22 20 74 6f 20 63 68 61 6e 67 65 20 74 68 65 20 64 65 66 61 75 6c 74 2e 3c 2f 69 6e 66 6f | ue".to.change.the.default.</info |
6ca20 | 3e 27 29 3b 0a 7d 0a 24 6f 6c 64 57 6f 72 6b 69 6e 67 44 69 72 20 3d 20 50 6c 61 74 66 6f 72 6d | >');.}.$oldWorkingDir.=.Platform |
6ca40 | 3a 3a 67 65 74 43 77 64 28 74 72 75 65 29 3b 0a 63 68 64 69 72 28 24 64 69 72 29 3b 0a 7d 0a 62 | ::getCwd(true);.chdir($dir);.}.b |
6ca60 | 72 65 61 6b 3b 0a 7d 0a 24 64 69 72 20 3d 20 64 69 72 6e 61 6d 65 28 24 64 69 72 29 3b 0a 7d 0a | reak;.}.$dir.=.dirname($dir);.}. |
6ca80 | 7d 0a 0a 0a 0a 24 6d 61 79 4e 65 65 64 50 6c 75 67 69 6e 43 6f 6d 6d 61 6e 64 20 3d 20 66 61 6c | }....$mayNeedPluginCommand.=.fal |
6caa0 | 73 65 20 3d 3d 3d 20 24 69 6e 70 75 74 2d 3e 68 61 73 50 61 72 61 6d 65 74 65 72 4f 70 74 69 6f | se.===.$input->hasParameterOptio |
6cac0 | 6e 28 5b 27 2d 2d 76 65 72 73 69 6f 6e 27 2c 20 27 2d 56 27 5d 29 0a 26 26 20 28 0a 0a 66 61 6c | n(['--version',.'-V']).&&.(..fal |
6cae0 | 73 65 20 3d 3d 3d 20 24 63 6f 6d 6d 61 6e 64 4e 61 6d 65 0a 0a 7c 7c 20 69 6e 5f 61 72 72 61 79 | se.===.$commandName..||.in_array |
6cb00 | 28 24 63 6f 6d 6d 61 6e 64 4e 61 6d 65 2c 20 5b 27 27 2c 20 27 6c 69 73 74 27 2c 20 27 68 65 6c | ($commandName,.['',.'list',.'hel |
6cb20 | 70 27 5d 2c 20 74 72 75 65 29 0a 29 3b 0a 0a 69 66 20 28 24 6d 61 79 4e 65 65 64 50 6c 75 67 69 | p'],.true).);..if.($mayNeedPlugi |
6cb40 | 6e 43 6f 6d 6d 61 6e 64 20 26 26 20 21 24 74 68 69 73 2d 3e 64 69 73 61 62 6c 65 50 6c 75 67 69 | nCommand.&&.!$this->disablePlugi |
6cb60 | 6e 73 42 79 44 65 66 61 75 6c 74 20 26 26 20 21 24 74 68 69 73 2d 3e 68 61 73 50 6c 75 67 69 6e | nsByDefault.&&.!$this->hasPlugin |
6cb80 | 43 6f 6d 6d 61 6e 64 73 29 20 7b 0a 74 72 79 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 | Commands).{.try.{.foreach.($this |
6cba0 | 2d 3e 67 65 74 50 6c 75 67 69 6e 43 6f 6d 6d 61 6e 64 73 28 29 20 61 73 20 24 63 6f 6d 6d 61 6e | ->getPluginCommands().as.$comman |
6cbc0 | 64 29 20 7b 0a 69 66 20 28 24 74 68 69 73 2d 3e 68 61 73 28 24 63 6f 6d 6d 61 6e 64 2d 3e 67 65 | d).{.if.($this->has($command->ge |
6cbe0 | 74 4e 61 6d 65 28 29 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 77 61 | tName())).{.$io->writeError('<wa |
6cc00 | 72 6e 69 6e 67 3e 50 6c 75 67 69 6e 20 63 6f 6d 6d 61 6e 64 20 27 2e 24 63 6f 6d 6d 61 6e 64 2d | rning>Plugin.command.'.$command- |
6cc20 | 3e 67 65 74 4e 61 6d 65 28 29 2e 27 20 28 27 2e 67 65 74 5f 63 6c 61 73 73 28 24 63 6f 6d 6d 61 | >getName().'.('.get_class($comma |
6cc40 | 6e 64 29 2e 27 29 20 77 6f 75 6c 64 20 6f 76 65 72 72 69 64 65 20 61 20 43 6f 6d 70 6f 73 65 72 | nd).').would.override.a.Composer |
6cc60 | 20 63 6f 6d 6d 61 6e 64 20 61 6e 64 20 68 61 73 20 62 65 65 6e 20 73 6b 69 70 70 65 64 3c 2f 77 | .command.and.has.been.skipped</w |
6cc80 | 61 72 6e 69 6e 67 3e 27 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 74 68 69 73 2d 3e 61 64 64 28 24 | arning>');.}.else.{.$this->add($ |
6cca0 | 63 6f 6d 6d 61 6e 64 29 3b 0a 7d 0a 7d 0a 7d 20 63 61 74 63 68 20 28 4e 6f 53 73 6c 45 78 63 65 | command);.}.}.}.catch.(NoSslExce |
6ccc0 | 70 74 69 6f 6e 20 24 65 29 20 7b 0a 0a 7d 20 63 61 74 63 68 20 28 50 61 72 73 69 6e 67 45 78 63 | ption.$e).{..}.catch.(ParsingExc |
6cce0 | 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 24 64 65 74 61 69 6c 73 20 3d 20 24 65 2d 3e 67 65 74 44 | eption.$e).{.$details.=.$e->getD |
6cd00 | 65 74 61 69 6c 73 28 29 3b 0a 0a 24 66 69 6c 65 20 3d 20 72 65 61 6c 70 61 74 68 28 46 61 63 74 | etails();..$file.=.realpath(Fact |
6cd20 | 6f 72 79 3a 3a 67 65 74 43 6f 6d 70 6f 73 65 72 46 69 6c 65 28 29 29 3b 0a 0a 24 6c 69 6e 65 20 | ory::getComposerFile());..$line. |
6cd40 | 3d 20 6e 75 6c 6c 3b 0a 69 66 20 28 24 64 65 74 61 69 6c 73 20 26 26 20 69 73 73 65 74 28 24 64 | =.null;.if.($details.&&.isset($d |
6cd60 | 65 74 61 69 6c 73 5b 27 6c 69 6e 65 27 5d 29 29 20 7b 0a 24 6c 69 6e 65 20 3d 20 24 64 65 74 61 | etails['line'])).{.$line.=.$deta |
6cd80 | 69 6c 73 5b 27 6c 69 6e 65 27 5d 3b 0a 7d 0a 0a 24 67 68 65 20 3d 20 6e 65 77 20 47 69 74 68 75 | ils['line'];.}..$ghe.=.new.Githu |
6cda0 | 62 41 63 74 69 6f 6e 45 72 72 6f 72 28 24 74 68 69 73 2d 3e 69 6f 29 3b 0a 24 67 68 65 2d 3e 65 | bActionError($this->io);.$ghe->e |
6cdc0 | 6d 69 74 28 24 65 2d 3e 67 65 74 4d 65 73 73 61 67 65 28 29 2c 20 24 66 69 6c 65 2c 20 24 6c 69 | mit($e->getMessage(),.$file,.$li |
6cde0 | 6e 65 29 3b 0a 0a 74 68 72 6f 77 20 24 65 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 68 61 73 50 6c 75 | ne);..throw.$e;.}..$this->hasPlu |
6ce00 | 67 69 6e 43 6f 6d 6d 61 6e 64 73 20 3d 20 74 72 75 65 3b 0a 7d 0a 0a 0a 24 69 73 50 72 6f 78 79 | ginCommands.=.true;.}...$isProxy |
6ce20 | 43 6f 6d 6d 61 6e 64 20 3d 20 66 61 6c 73 65 3b 0a 69 66 20 28 24 6e 61 6d 65 20 3d 20 24 74 68 | Command.=.false;.if.($name.=.$th |
6ce40 | 69 73 2d 3e 67 65 74 43 6f 6d 6d 61 6e 64 4e 61 6d 65 28 24 69 6e 70 75 74 29 29 20 7b 0a 74 72 | is->getCommandName($input)).{.tr |
6ce60 | 79 20 7b 0a 24 63 6f 6d 6d 61 6e 64 20 3d 20 24 74 68 69 73 2d 3e 66 69 6e 64 28 24 6e 61 6d 65 | y.{.$command.=.$this->find($name |
6ce80 | 29 3b 0a 24 63 6f 6d 6d 61 6e 64 4e 61 6d 65 20 3d 20 24 63 6f 6d 6d 61 6e 64 2d 3e 67 65 74 4e | );.$commandName.=.$command->getN |
6cea0 | 61 6d 65 28 29 3b 0a 24 69 73 50 72 6f 78 79 43 6f 6d 6d 61 6e 64 20 3d 20 28 24 63 6f 6d 6d 61 | ame();.$isProxyCommand.=.($comma |
6cec0 | 6e 64 20 69 6e 73 74 61 6e 63 65 6f 66 20 43 6f 6d 6d 61 6e 64 5c 42 61 73 65 43 6f 6d 6d 61 6e | nd.instanceof.Command\BaseComman |
6cee0 | 64 20 26 26 20 24 63 6f 6d 6d 61 6e 64 2d 3e 69 73 50 72 6f 78 79 43 6f 6d 6d 61 6e 64 28 29 29 | d.&&.$command->isProxyCommand()) |
6cf00 | 3b 0a 7d 20 63 61 74 63 68 20 28 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 | ;.}.catch.(\InvalidArgumentExcep |
6cf20 | 74 69 6f 6e 20 24 65 29 20 7b 0a 7d 0a 7d 0a 0a 69 66 20 28 21 24 69 73 50 72 6f 78 79 43 6f 6d | tion.$e).{.}.}..if.(!$isProxyCom |
6cf40 | 6d 61 6e 64 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 73 70 72 69 6e 74 66 28 | mand).{.$io->writeError(sprintf( |
6cf60 | 0a 27 52 75 6e 6e 69 6e 67 20 25 73 20 28 25 73 29 20 77 69 74 68 20 25 73 20 6f 6e 20 25 73 27 | .'Running.%s.(%s).with.%s.on.%s' |
6cf80 | 2c 0a 43 6f 6d 70 6f 73 65 72 3a 3a 67 65 74 56 65 72 73 69 6f 6e 28 29 2c 0a 43 6f 6d 70 6f 73 | ,.Composer::getVersion(),.Compos |
6cfa0 | 65 72 3a 3a 52 45 4c 45 41 53 45 5f 44 41 54 45 2c 0a 64 65 66 69 6e 65 64 28 27 48 48 56 4d 5f | er::RELEASE_DATE,.defined('HHVM_ |
6cfc0 | 56 45 52 53 49 4f 4e 27 29 20 3f 20 27 48 48 56 4d 20 27 2e 48 48 56 4d 5f 56 45 52 53 49 4f 4e | VERSION').?.'HHVM.'.HHVM_VERSION |
6cfe0 | 20 3a 20 27 50 48 50 20 27 2e 50 48 50 5f 56 45 52 53 49 4f 4e 2c 0a 66 75 6e 63 74 69 6f 6e 5f | .:.'PHP.'.PHP_VERSION,.function_ |
6d000 | 65 78 69 73 74 73 28 27 70 68 70 5f 75 6e 61 6d 65 27 29 20 3f 20 70 68 70 5f 75 6e 61 6d 65 28 | exists('php_uname').?.php_uname( |
6d020 | 27 73 27 29 20 2e 20 27 20 2f 20 27 20 2e 20 70 68 70 5f 75 6e 61 6d 65 28 27 72 27 29 20 3a 20 | 's')...'./.'...php_uname('r').:. |
6d040 | 27 55 6e 6b 6e 6f 77 6e 20 4f 53 27 0a 29 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 61 63 | 'Unknown.OS'.),.true,.IOInterfac |
6d060 | 65 3a 3a 44 45 42 55 47 29 3b 0a 0a 69 66 20 28 50 48 50 5f 56 45 52 53 49 4f 4e 5f 49 44 20 3c | e::DEBUG);..if.(PHP_VERSION_ID.< |
6d080 | 20 37 30 32 30 35 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 77 61 72 6e | .70205).{.$io->writeError('<warn |
6d0a0 | 69 6e 67 3e 43 6f 6d 70 6f 73 65 72 20 73 75 70 70 6f 72 74 73 20 50 48 50 20 37 2e 32 2e 35 20 | ing>Composer.supports.PHP.7.2.5. |
6d0c0 | 61 6e 64 20 61 62 6f 76 65 2c 20 79 6f 75 20 77 69 6c 6c 20 6d 6f 73 74 20 6c 69 6b 65 6c 79 20 | and.above,.you.will.most.likely. |
6d0e0 | 65 6e 63 6f 75 6e 74 65 72 20 70 72 6f 62 6c 65 6d 73 20 77 69 74 68 20 79 6f 75 72 20 50 48 50 | encounter.problems.with.your.PHP |
6d100 | 20 27 2e 50 48 50 5f 56 45 52 53 49 4f 4e 2e 27 2e 20 55 70 67 72 61 64 69 6e 67 20 69 73 20 73 | .'.PHP_VERSION.'..Upgrading.is.s |
6d120 | 74 72 6f 6e 67 6c 79 20 72 65 63 6f 6d 6d 65 6e 64 65 64 20 62 75 74 20 79 6f 75 20 63 61 6e 20 | trongly.recommended.but.you.can. |
6d140 | 75 73 65 20 43 6f 6d 70 6f 73 65 72 20 32 2e 32 2e 78 20 4c 54 53 20 61 73 20 61 20 66 61 6c 6c | use.Composer.2.2.x.LTS.as.a.fall |
6d160 | 62 61 63 6b 2e 3c 2f 77 61 72 6e 69 6e 67 3e 27 29 3b 0a 7d 0a 0a 69 66 20 28 58 64 65 62 75 67 | back.</warning>');.}..if.(Xdebug |
6d180 | 48 61 6e 64 6c 65 72 3a 3a 69 73 58 64 65 62 75 67 41 63 74 69 76 65 28 29 20 26 26 20 21 50 6c | Handler::isXdebugActive().&&.!Pl |
6d1a0 | 61 74 66 6f 72 6d 3a 3a 67 65 74 45 6e 76 28 27 43 4f 4d 50 4f 53 45 52 5f 44 49 53 41 42 4c 45 | atform::getEnv('COMPOSER_DISABLE |
6d1c0 | 5f 58 44 45 42 55 47 5f 57 41 52 4e 27 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f | _XDEBUG_WARN')).{.$io->writeErro |
6d1e0 | 72 28 27 3c 77 61 72 6e 69 6e 67 3e 43 6f 6d 70 6f 73 65 72 20 69 73 20 6f 70 65 72 61 74 69 6e | r('<warning>Composer.is.operatin |
6d200 | 67 20 73 6c 6f 77 65 72 20 74 68 61 6e 20 6e 6f 72 6d 61 6c 20 62 65 63 61 75 73 65 20 79 6f 75 | g.slower.than.normal.because.you |
6d220 | 20 68 61 76 65 20 58 64 65 62 75 67 20 65 6e 61 62 6c 65 64 2e 20 53 65 65 20 68 74 74 70 73 3a | .have.Xdebug.enabled..See.https: |
6d240 | 2f 2f 67 65 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 67 2f 78 64 65 62 75 67 3c 2f 77 61 72 6e 69 6e | //getcomposer.org/xdebug</warnin |
6d260 | 67 3e 27 29 3b 0a 7d 0a 0a 69 66 20 28 64 65 66 69 6e 65 64 28 27 43 4f 4d 50 4f 53 45 52 5f 44 | g>');.}..if.(defined('COMPOSER_D |
6d280 | 45 56 5f 57 41 52 4e 49 4e 47 5f 54 49 4d 45 27 29 20 26 26 20 24 63 6f 6d 6d 61 6e 64 4e 61 6d | EV_WARNING_TIME').&&.$commandNam |
6d2a0 | 65 20 21 3d 3d 20 27 73 65 6c 66 2d 75 70 64 61 74 65 27 20 26 26 20 24 63 6f 6d 6d 61 6e 64 4e | e.!==.'self-update'.&&.$commandN |
6d2c0 | 61 6d 65 20 21 3d 3d 20 27 73 65 6c 66 75 70 64 61 74 65 27 20 26 26 20 74 69 6d 65 28 29 20 3e | ame.!==.'selfupdate'.&&.time().> |
6d2e0 | 20 43 4f 4d 50 4f 53 45 52 5f 44 45 56 5f 57 41 52 4e 49 4e 47 5f 54 49 4d 45 29 20 7b 0a 24 69 | .COMPOSER_DEV_WARNING_TIME).{.$i |
6d300 | 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 73 70 72 69 6e 74 66 28 27 3c 77 61 72 6e 69 6e 67 3e | o->writeError(sprintf('<warning> |
6d320 | 57 61 72 6e 69 6e 67 3a 20 54 68 69 73 20 64 65 76 65 6c 6f 70 6d 65 6e 74 20 62 75 69 6c 64 20 | Warning:.This.development.build. |
6d340 | 6f 66 20 43 6f 6d 70 6f 73 65 72 20 69 73 20 6f 76 65 72 20 36 30 20 64 61 79 73 20 6f 6c 64 2e | of.Composer.is.over.60.days.old. |
6d360 | 20 49 74 20 69 73 20 72 65 63 6f 6d 6d 65 6e 64 65 64 20 74 6f 20 75 70 64 61 74 65 20 69 74 20 | .It.is.recommended.to.update.it. |
6d380 | 62 79 20 72 75 6e 6e 69 6e 67 20 22 25 73 20 73 65 6c 66 2d 75 70 64 61 74 65 22 20 74 6f 20 67 | by.running."%s.self-update".to.g |
6d3a0 | 65 74 20 74 68 65 20 6c 61 74 65 73 74 20 76 65 72 73 69 6f 6e 2e 3c 2f 77 61 72 6e 69 6e 67 3e | et.the.latest.version.</warning> |
6d3c0 | 27 2c 20 24 5f 53 45 52 56 45 52 5b 27 50 48 50 5f 53 45 4c 46 27 5d 29 29 3b 0a 7d 0a 0a 69 66 | ',.$_SERVER['PHP_SELF']));.}..if |
6d3e0 | 20 28 0a 21 50 6c 61 74 66 6f 72 6d 3a 3a 69 73 57 69 6e 64 6f 77 73 28 29 0a 26 26 20 66 75 6e | .(.!Platform::isWindows().&&.fun |
6d400 | 63 74 69 6f 6e 5f 65 78 69 73 74 73 28 27 65 78 65 63 27 29 0a 26 26 20 21 50 6c 61 74 66 6f 72 | ction_exists('exec').&&.!Platfor |
6d420 | 6d 3a 3a 67 65 74 45 6e 76 28 27 43 4f 4d 50 4f 53 45 52 5f 41 4c 4c 4f 57 5f 53 55 50 45 52 55 | m::getEnv('COMPOSER_ALLOW_SUPERU |
6d440 | 53 45 52 27 29 0a 26 26 20 28 69 6e 69 5f 67 65 74 28 27 6f 70 65 6e 5f 62 61 73 65 64 69 72 27 | SER').&&.(ini_get('open_basedir' |
6d460 | 29 20 7c 7c 20 21 66 69 6c 65 5f 65 78 69 73 74 73 28 27 2f 2e 64 6f 63 6b 65 72 65 6e 76 27 29 | ).||.!file_exists('/.dockerenv') |
6d480 | 29 0a 29 20 7b 0a 69 66 20 28 66 75 6e 63 74 69 6f 6e 5f 65 78 69 73 74 73 28 27 70 6f 73 69 78 | ).).{.if.(function_exists('posix |
6d4a0 | 5f 67 65 74 75 69 64 27 29 20 26 26 20 70 6f 73 69 78 5f 67 65 74 75 69 64 28 29 20 3d 3d 3d 20 | _getuid').&&.posix_getuid().===. |
6d4c0 | 30 29 20 7b 0a 69 66 20 28 24 63 6f 6d 6d 61 6e 64 4e 61 6d 65 20 21 3d 3d 20 27 73 65 6c 66 2d | 0).{.if.($commandName.!==.'self- |
6d4e0 | 75 70 64 61 74 65 27 20 26 26 20 24 63 6f 6d 6d 61 6e 64 4e 61 6d 65 20 21 3d 3d 20 27 73 65 6c | update'.&&.$commandName.!==.'sel |
6d500 | 66 75 70 64 61 74 65 27 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 77 61 | fupdate').{.$io->writeError('<wa |
6d520 | 72 6e 69 6e 67 3e 44 6f 20 6e 6f 74 20 72 75 6e 20 43 6f 6d 70 6f 73 65 72 20 61 73 20 72 6f 6f | rning>Do.not.run.Composer.as.roo |
6d540 | 74 2f 73 75 70 65 72 20 75 73 65 72 21 20 53 65 65 20 68 74 74 70 73 3a 2f 2f 67 65 74 63 6f 6d | t/super.user!.See.https://getcom |
6d560 | 70 6f 73 65 72 2e 6f 72 67 2f 72 6f 6f 74 20 66 6f 72 20 64 65 74 61 69 6c 73 3c 2f 77 61 72 6e | poser.org/root.for.details</warn |
6d580 | 69 6e 67 3e 27 29 3b 0a 0a 69 66 20 28 24 69 6f 2d 3e 69 73 49 6e 74 65 72 61 63 74 69 76 65 28 | ing>');..if.($io->isInteractive( |
6d5a0 | 29 29 20 7b 0a 69 66 20 28 21 24 69 6f 2d 3e 61 73 6b 43 6f 6e 66 69 72 6d 61 74 69 6f 6e 28 27 | )).{.if.(!$io->askConfirmation(' |
6d5c0 | 3c 69 6e 66 6f 3e 43 6f 6e 74 69 6e 75 65 20 61 73 20 72 6f 6f 74 2f 73 75 70 65 72 20 75 73 65 | <info>Continue.as.root/super.use |
6d5e0 | 72 3c 2f 69 6e 66 6f 3e 20 5b 3c 63 6f 6d 6d 65 6e 74 3e 79 65 73 3c 2f 63 6f 6d 6d 65 6e 74 3e | r</info>.[<comment>yes</comment> |
6d600 | 5d 3f 20 27 29 29 20 7b 0a 72 65 74 75 72 6e 20 31 3b 0a 7d 0a 7d 0a 7d 0a 69 66 20 28 24 75 69 | ]?.')).{.return.1;.}.}.}.if.($ui |
6d620 | 64 20 3d 20 28 69 6e 74 29 20 50 6c 61 74 66 6f 72 6d 3a 3a 67 65 74 45 6e 76 28 27 53 55 44 4f | d.=.(int).Platform::getEnv('SUDO |
6d640 | 5f 55 49 44 27 29 29 20 7b 0a 0a 0a 53 69 6c 65 6e 63 65 72 3a 3a 63 61 6c 6c 28 27 65 78 65 63 | _UID')).{...Silencer::call('exec |
6d660 | 27 2c 20 22 73 75 64 6f 20 2d 75 20 5c 5c 23 7b 24 75 69 64 7d 20 73 75 64 6f 20 2d 4b 20 3e 20 | ',."sudo.-u.\\#{$uid}.sudo.-K.>. |
6d680 | 2f 64 65 76 2f 6e 75 6c 6c 20 32 3e 26 31 22 29 3b 0a 7d 0a 7d 0a 0a 53 69 6c 65 6e 63 65 72 3a | /dev/null.2>&1");.}.}..Silencer: |
6d6a0 | 3a 63 61 6c 6c 28 27 65 78 65 63 27 2c 20 27 73 75 64 6f 20 2d 4b 20 3e 20 2f 64 65 76 2f 6e 75 | :call('exec',.'sudo.-K.>./dev/nu |
6d6c0 | 6c 6c 20 32 3e 26 31 27 29 3b 0a 7d 0a 0a 0a 53 69 6c 65 6e 63 65 72 3a 3a 63 61 6c 6c 28 73 74 | ll.2>&1');.}...Silencer::call(st |
6d6e0 | 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 29 20 75 73 65 20 28 24 69 6f 29 3a 20 76 6f 69 64 | atic.function.().use.($io):.void |
6d700 | 20 7b 0a 24 74 65 6d 70 66 69 6c 65 20 3d 20 73 79 73 5f 67 65 74 5f 74 65 6d 70 5f 64 69 72 28 | .{.$tempfile.=.sys_get_temp_dir( |
6d720 | 29 20 2e 20 27 2f 74 65 6d 70 2d 27 20 2e 20 6d 64 35 28 6d 69 63 72 6f 74 69 6d 65 28 29 29 3b | )...'/temp-'...md5(microtime()); |
6d740 | 0a 69 66 20 28 21 28 66 69 6c 65 5f 70 75 74 5f 63 6f 6e 74 65 6e 74 73 28 24 74 65 6d 70 66 69 | .if.(!(file_put_contents($tempfi |
6d760 | 6c 65 2c 20 5f 5f 46 49 4c 45 5f 5f 29 20 26 26 20 28 66 69 6c 65 5f 67 65 74 5f 63 6f 6e 74 65 | le,.__FILE__).&&.(file_get_conte |
6d780 | 6e 74 73 28 24 74 65 6d 70 66 69 6c 65 29 20 3d 3d 3d 20 5f 5f 46 49 4c 45 5f 5f 29 20 26 26 20 | nts($tempfile).===.__FILE__).&&. |
6d7a0 | 75 6e 6c 69 6e 6b 28 24 74 65 6d 70 66 69 6c 65 29 20 26 26 20 21 66 69 6c 65 5f 65 78 69 73 74 | unlink($tempfile).&&.!file_exist |
6d7c0 | 73 28 24 74 65 6d 70 66 69 6c 65 29 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 | s($tempfile))).{.$io->writeError |
6d7e0 | 28 73 70 72 69 6e 74 66 28 27 3c 65 72 72 6f 72 3e 50 48 50 20 74 65 6d 70 20 64 69 72 65 63 74 | (sprintf('<error>PHP.temp.direct |
6d800 | 6f 72 79 20 28 25 73 29 20 64 6f 65 73 20 6e 6f 74 20 65 78 69 73 74 20 6f 72 20 69 73 20 6e 6f | ory.(%s).does.not.exist.or.is.no |
6d820 | 74 20 77 72 69 74 61 62 6c 65 20 74 6f 20 43 6f 6d 70 6f 73 65 72 2e 20 53 65 74 20 73 79 73 5f | t.writable.to.Composer..Set.sys_ |
6d840 | 74 65 6d 70 5f 64 69 72 20 69 6e 20 79 6f 75 72 20 70 68 70 2e 69 6e 69 3c 2f 65 72 72 6f 72 3e | temp_dir.in.your.php.ini</error> |
6d860 | 27 2c 20 73 79 73 5f 67 65 74 5f 74 65 6d 70 5f 64 69 72 28 29 29 29 3b 0a 7d 0a 7d 29 3b 0a 0a | ',.sys_get_temp_dir()));.}.});.. |
6d880 | 0a 24 66 69 6c 65 20 3d 20 46 61 63 74 6f 72 79 3a 3a 67 65 74 43 6f 6d 70 6f 73 65 72 46 69 6c | .$file.=.Factory::getComposerFil |
6d8a0 | 65 28 29 3b 0a 69 66 20 28 69 73 5f 66 69 6c 65 28 24 66 69 6c 65 29 20 26 26 20 46 69 6c 65 73 | e();.if.(is_file($file).&&.Files |
6d8c0 | 79 73 74 65 6d 3a 3a 69 73 52 65 61 64 61 62 6c 65 28 24 66 69 6c 65 29 20 26 26 20 69 73 5f 61 | ystem::isReadable($file).&&.is_a |
6d8e0 | 72 72 61 79 28 24 63 6f 6d 70 6f 73 65 72 20 3d 20 6a 73 6f 6e 5f 64 65 63 6f 64 65 28 66 69 6c | rray($composer.=.json_decode(fil |
6d900 | 65 5f 67 65 74 5f 63 6f 6e 74 65 6e 74 73 28 24 66 69 6c 65 29 2c 20 74 72 75 65 29 29 29 20 7b | e_get_contents($file),.true))).{ |
6d920 | 0a 69 66 20 28 69 73 73 65 74 28 24 63 6f 6d 70 6f 73 65 72 5b 27 73 63 72 69 70 74 73 27 5d 29 | .if.(isset($composer['scripts']) |
6d940 | 20 26 26 20 69 73 5f 61 72 72 61 79 28 24 63 6f 6d 70 6f 73 65 72 5b 27 73 63 72 69 70 74 73 27 | .&&.is_array($composer['scripts' |
6d960 | 5d 29 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 63 6f 6d 70 6f 73 65 72 5b 27 73 63 72 69 70 74 | ])).{.foreach.($composer['script |
6d980 | 73 27 5d 20 61 73 20 24 73 63 72 69 70 74 20 3d 3e 20 24 64 75 6d 6d 79 29 20 7b 0a 69 66 20 28 | s'].as.$script.=>.$dummy).{.if.( |
6d9a0 | 21 64 65 66 69 6e 65 64 28 27 43 6f 6d 70 6f 73 65 72 5c 53 63 72 69 70 74 5c 53 63 72 69 70 74 | !defined('Composer\Script\Script |
6d9c0 | 45 76 65 6e 74 73 3a 3a 27 2e 73 74 72 5f 72 65 70 6c 61 63 65 28 27 2d 27 2c 20 27 5f 27 2c 20 | Events::'.str_replace('-',.'_',. |
6d9e0 | 73 74 72 74 6f 75 70 70 65 72 28 24 73 63 72 69 70 74 29 29 29 29 20 7b 0a 69 66 20 28 24 74 68 | strtoupper($script)))).{.if.($th |
6da00 | 69 73 2d 3e 68 61 73 28 24 73 63 72 69 70 74 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 | is->has($script)).{.$io->writeEr |
6da20 | 72 6f 72 28 27 3c 77 61 72 6e 69 6e 67 3e 41 20 73 63 72 69 70 74 20 6e 61 6d 65 64 20 27 2e 24 | ror('<warning>A.script.named.'.$ |
6da40 | 73 63 72 69 70 74 2e 27 20 77 6f 75 6c 64 20 6f 76 65 72 72 69 64 65 20 61 20 43 6f 6d 70 6f 73 | script.'.would.override.a.Compos |
6da60 | 65 72 20 63 6f 6d 6d 61 6e 64 20 61 6e 64 20 68 61 73 20 62 65 65 6e 20 73 6b 69 70 70 65 64 3c | er.command.and.has.been.skipped< |
6da80 | 2f 77 61 72 6e 69 6e 67 3e 27 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 64 65 73 63 72 69 70 74 69 | /warning>');.}.else.{.$descripti |
6daa0 | 6f 6e 20 3d 20 6e 75 6c 6c 3b 0a 0a 69 66 20 28 69 73 73 65 74 28 24 63 6f 6d 70 6f 73 65 72 5b | on.=.null;..if.(isset($composer[ |
6dac0 | 27 73 63 72 69 70 74 73 2d 64 65 73 63 72 69 70 74 69 6f 6e 73 27 5d 5b 24 73 63 72 69 70 74 5d | 'scripts-descriptions'][$script] |
6dae0 | 29 29 20 7b 0a 24 64 65 73 63 72 69 70 74 69 6f 6e 20 3d 20 24 63 6f 6d 70 6f 73 65 72 5b 27 73 | )).{.$description.=.$composer['s |
6db00 | 63 72 69 70 74 73 2d 64 65 73 63 72 69 70 74 69 6f 6e 73 27 5d 5b 24 73 63 72 69 70 74 5d 3b 0a | cripts-descriptions'][$script];. |
6db20 | 7d 0a 0a 24 74 68 69 73 2d 3e 61 64 64 28 6e 65 77 20 43 6f 6d 6d 61 6e 64 5c 53 63 72 69 70 74 | }..$this->add(new.Command\Script |
6db40 | 41 6c 69 61 73 43 6f 6d 6d 61 6e 64 28 24 73 63 72 69 70 74 2c 20 24 64 65 73 63 72 69 70 74 69 | AliasCommand($script,.$descripti |
6db60 | 6f 6e 29 29 3b 0a 7d 0a 7d 0a 7d 0a 7d 0a 7d 0a 7d 0a 0a 74 72 79 20 7b 0a 69 66 20 28 24 69 6e | on));.}.}.}.}.}.}..try.{.if.($in |
6db80 | 70 75 74 2d 3e 68 61 73 50 61 72 61 6d 65 74 65 72 4f 70 74 69 6f 6e 28 27 2d 2d 70 72 6f 66 69 | put->hasParameterOption('--profi |
6dba0 | 6c 65 27 29 29 20 7b 0a 24 73 74 61 72 74 54 69 6d 65 20 3d 20 6d 69 63 72 6f 74 69 6d 65 28 74 | le')).{.$startTime.=.microtime(t |
6dbc0 | 72 75 65 29 3b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 65 6e 61 62 6c 65 44 65 62 75 67 67 69 6e 67 | rue);.$this->io->enableDebugging |
6dbe0 | 28 24 73 74 61 72 74 54 69 6d 65 29 3b 0a 7d 0a 0a 24 72 65 73 75 6c 74 20 3d 20 70 61 72 65 6e | ($startTime);.}..$result.=.paren |
6dc00 | 74 3a 3a 64 6f 52 75 6e 28 24 69 6e 70 75 74 2c 20 24 6f 75 74 70 75 74 29 3b 0a 0a 0a 69 66 20 | t::doRun($input,.$output);...if. |
6dc20 | 28 69 73 73 65 74 28 24 6f 6c 64 57 6f 72 6b 69 6e 67 44 69 72 29 20 26 26 20 27 27 20 21 3d 3d | (isset($oldWorkingDir).&&.''.!== |
6dc40 | 20 24 6f 6c 64 57 6f 72 6b 69 6e 67 44 69 72 29 20 7b 0a 53 69 6c 65 6e 63 65 72 3a 3a 63 61 6c | .$oldWorkingDir).{.Silencer::cal |
6dc60 | 6c 28 27 63 68 64 69 72 27 2c 20 24 6f 6c 64 57 6f 72 6b 69 6e 67 44 69 72 29 3b 0a 7d 0a 0a 69 | l('chdir',.$oldWorkingDir);.}..i |
6dc80 | 66 20 28 69 73 73 65 74 28 24 73 74 61 72 74 54 69 6d 65 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 | f.(isset($startTime)).{.$io->wri |
6dca0 | 74 65 45 72 72 6f 72 28 27 3c 69 6e 66 6f 3e 4d 65 6d 6f 72 79 20 75 73 61 67 65 3a 20 27 2e 72 | teError('<info>Memory.usage:.'.r |
6dcc0 | 6f 75 6e 64 28 6d 65 6d 6f 72 79 5f 67 65 74 5f 75 73 61 67 65 28 29 20 2f 20 31 30 32 34 20 2f | ound(memory_get_usage()./.1024./ |
6dce0 | 20 31 30 32 34 2c 20 32 29 2e 27 4d 69 42 20 28 70 65 61 6b 3a 20 27 2e 72 6f 75 6e 64 28 6d 65 | .1024,.2).'MiB.(peak:.'.round(me |
6dd00 | 6d 6f 72 79 5f 67 65 74 5f 70 65 61 6b 5f 75 73 61 67 65 28 29 20 2f 20 31 30 32 34 20 2f 20 31 | mory_get_peak_usage()./.1024./.1 |
6dd20 | 30 32 34 2c 20 32 29 2e 27 4d 69 42 29 2c 20 74 69 6d 65 3a 20 27 2e 72 6f 75 6e 64 28 6d 69 63 | 024,.2).'MiB),.time:.'.round(mic |
6dd40 | 72 6f 74 69 6d 65 28 74 72 75 65 29 20 2d 20 24 73 74 61 72 74 54 69 6d 65 2c 20 32 29 2e 27 73 | rotime(true).-.$startTime,.2).'s |
6dd60 | 27 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 72 65 73 75 6c 74 3b 0a 7d 20 63 61 74 63 68 20 28 | ');.}..return.$result;.}.catch.( |
6dd80 | 53 63 72 69 70 74 45 78 65 63 75 74 69 6f 6e 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 72 | ScriptExecutionException.$e).{.r |
6dda0 | 65 74 75 72 6e 20 24 65 2d 3e 67 65 74 43 6f 64 65 28 29 3b 0a 7d 20 63 61 74 63 68 20 28 5c 54 | eturn.$e->getCode();.}.catch.(\T |
6ddc0 | 68 72 6f 77 61 62 6c 65 20 24 65 29 20 7b 0a 24 67 68 65 20 3d 20 6e 65 77 20 47 69 74 68 75 62 | hrowable.$e).{.$ghe.=.new.Github |
6dde0 | 41 63 74 69 6f 6e 45 72 72 6f 72 28 24 74 68 69 73 2d 3e 69 6f 29 3b 0a 24 67 68 65 2d 3e 65 6d | ActionError($this->io);.$ghe->em |
6de00 | 69 74 28 24 65 2d 3e 67 65 74 4d 65 73 73 61 67 65 28 29 29 3b 0a 0a 24 74 68 69 73 2d 3e 68 69 | it($e->getMessage());..$this->hi |
6de20 | 6e 74 43 6f 6d 6d 6f 6e 45 72 72 6f 72 73 28 24 65 2c 20 24 6f 75 74 70 75 74 29 3b 0a 0a 0a 0a | ntCommonErrors($e,.$output);.... |
6de40 | 69 66 20 28 21 24 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 5c 45 78 63 65 70 74 69 6f 6e 29 20 7b | if.(!$e.instanceof.\Exception).{ |
6de60 | 0a 69 66 20 28 24 6f 75 74 70 75 74 20 69 6e 73 74 61 6e 63 65 6f 66 20 43 6f 6e 73 6f 6c 65 4f | .if.($output.instanceof.ConsoleO |
6de80 | 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 29 20 7b 0a 24 74 68 69 73 2d 3e 72 65 6e 64 65 72 54 | utputInterface).{.$this->renderT |
6dea0 | 68 72 6f 77 61 62 6c 65 28 24 65 2c 20 24 6f 75 74 70 75 74 2d 3e 67 65 74 45 72 72 6f 72 4f 75 | hrowable($e,.$output->getErrorOu |
6dec0 | 74 70 75 74 28 29 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 74 68 69 73 2d 3e 72 65 6e 64 65 72 54 | tput());.}.else.{.$this->renderT |
6dee0 | 68 72 6f 77 61 62 6c 65 28 24 65 2c 20 24 6f 75 74 70 75 74 29 3b 0a 7d 0a 0a 24 65 78 69 74 43 | hrowable($e,.$output);.}..$exitC |
6df00 | 6f 64 65 20 3d 20 24 65 2d 3e 67 65 74 43 6f 64 65 28 29 3b 0a 69 66 20 28 69 73 5f 6e 75 6d 65 | ode.=.$e->getCode();.if.(is_nume |
6df20 | 72 69 63 28 24 65 78 69 74 43 6f 64 65 29 29 20 7b 0a 24 65 78 69 74 43 6f 64 65 20 3d 20 28 69 | ric($exitCode)).{.$exitCode.=.(i |
6df40 | 6e 74 29 20 24 65 78 69 74 43 6f 64 65 3b 0a 69 66 20 28 30 20 3d 3d 3d 20 24 65 78 69 74 43 6f | nt).$exitCode;.if.(0.===.$exitCo |
6df60 | 64 65 29 20 7b 0a 24 65 78 69 74 43 6f 64 65 20 3d 20 31 3b 0a 7d 0a 7d 20 65 6c 73 65 20 7b 0a | de).{.$exitCode.=.1;.}.}.else.{. |
6df80 | 24 65 78 69 74 43 6f 64 65 20 3d 20 31 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 65 78 69 74 43 6f | $exitCode.=.1;.}..return.$exitCo |
6dfa0 | 64 65 3b 0a 7d 0a 0a 74 68 72 6f 77 20 24 65 3b 0a 7d 20 66 69 6e 61 6c 6c 79 20 7b 0a 72 65 73 | de;.}..throw.$e;.}.finally.{.res |
6dfc0 | 74 6f 72 65 5f 65 72 72 6f 72 5f 68 61 6e 64 6c 65 72 28 29 3b 0a 7d 0a 7d 0a 0a 0a 0a 0a 0a 70 | tore_error_handler();.}.}......p |
6dfe0 | 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 4e 65 77 57 6f 72 6b 69 6e 67 44 69 72 | rivate.function.getNewWorkingDir |
6e000 | 28 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 69 6e 70 75 74 29 3a 20 3f 73 74 72 69 6e 67 | (InputInterface.$input):.?string |
6e020 | 0a 7b 0a 0a 24 77 6f 72 6b 69 6e 67 44 69 72 20 3d 20 24 69 6e 70 75 74 2d 3e 67 65 74 50 61 72 | .{..$workingDir.=.$input->getPar |
6e040 | 61 6d 65 74 65 72 4f 70 74 69 6f 6e 28 5b 27 2d 2d 77 6f 72 6b 69 6e 67 2d 64 69 72 27 2c 20 27 | ameterOption(['--working-dir',.' |
6e060 | 2d 64 27 5d 2c 20 6e 75 6c 6c 2c 20 74 72 75 65 29 3b 0a 69 66 20 28 6e 75 6c 6c 20 21 3d 3d 20 | -d'],.null,.true);.if.(null.!==. |
6e080 | 24 77 6f 72 6b 69 6e 67 44 69 72 20 26 26 20 21 69 73 5f 64 69 72 28 24 77 6f 72 6b 69 6e 67 44 | $workingDir.&&.!is_dir($workingD |
6e0a0 | 69 72 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 | ir)).{.throw.new.\RuntimeExcepti |
6e0c0 | 6f 6e 28 27 49 6e 76 61 6c 69 64 20 77 6f 72 6b 69 6e 67 20 64 69 72 65 63 74 6f 72 79 20 73 70 | on('Invalid.working.directory.sp |
6e0e0 | 65 63 69 66 69 65 64 2c 20 27 2e 24 77 6f 72 6b 69 6e 67 44 69 72 2e 27 20 64 6f 65 73 20 6e 6f | ecified,.'.$workingDir.'.does.no |
6e100 | 74 20 65 78 69 73 74 2e 27 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 77 6f 72 6b 69 6e 67 44 69 | t.exist.');.}..return.$workingDi |
6e120 | 72 3b 0a 7d 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 68 69 6e 74 43 6f 6d 6d 6f | r;.}..private.function.hintCommo |
6e140 | 6e 45 72 72 6f 72 73 28 5c 54 68 72 6f 77 61 62 6c 65 20 24 65 78 63 65 70 74 69 6f 6e 2c 20 4f | nErrors(\Throwable.$exception,.O |
6e160 | 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 6f 75 74 70 75 74 29 3a 20 76 6f 69 64 0a 7b 0a | utputInterface.$output):.void.{. |
6e180 | 24 69 6f 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 3b 0a 0a 69 66 20 28 28 67 65 74 5f | $io.=.$this->getIO();..if.((get_ |
6e1a0 | 63 6c 61 73 73 28 24 65 78 63 65 70 74 69 6f 6e 29 20 3d 3d 3d 20 4c 6f 67 69 63 45 78 63 65 70 | class($exception).===.LogicExcep |
6e1c0 | 74 69 6f 6e 3a 3a 63 6c 61 73 73 20 7c 7c 20 24 65 78 63 65 70 74 69 6f 6e 20 69 6e 73 74 61 6e | tion::class.||.$exception.instan |
6e1e0 | 63 65 6f 66 20 5c 45 72 72 6f 72 29 20 26 26 20 24 6f 75 74 70 75 74 2d 3e 67 65 74 56 65 72 62 | ceof.\Error).&&.$output->getVerb |
6e200 | 6f 73 69 74 79 28 29 20 3c 20 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 3a 3a 56 45 52 42 4f | osity().<.OutputInterface::VERBO |
6e220 | 53 49 54 59 5f 56 45 52 42 4f 53 45 29 20 7b 0a 24 6f 75 74 70 75 74 2d 3e 73 65 74 56 65 72 62 | SITY_VERBOSE).{.$output->setVerb |
6e240 | 6f 73 69 74 79 28 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 3a 3a 56 45 52 42 4f 53 49 54 59 | osity(OutputInterface::VERBOSITY |
6e260 | 5f 56 45 52 42 4f 53 45 29 3b 0a 7d 0a 0a 53 69 6c 65 6e 63 65 72 3a 3a 73 75 70 70 72 65 73 73 | _VERBOSE);.}..Silencer::suppress |
6e280 | 28 29 3b 0a 74 72 79 20 7b 0a 24 63 6f 6d 70 6f 73 65 72 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 | ();.try.{.$composer.=.$this->get |
6e2a0 | 43 6f 6d 70 6f 73 65 72 28 66 61 6c 73 65 2c 20 74 72 75 65 29 3b 0a 69 66 20 28 6e 75 6c 6c 20 | Composer(false,.true);.if.(null. |
6e2c0 | 21 3d 3d 20 24 63 6f 6d 70 6f 73 65 72 20 26 26 20 66 75 6e 63 74 69 6f 6e 5f 65 78 69 73 74 73 | !==.$composer.&&.function_exists |
6e2e0 | 28 27 64 69 73 6b 5f 66 72 65 65 5f 73 70 61 63 65 27 29 29 20 7b 0a 24 63 6f 6e 66 69 67 20 3d | ('disk_free_space')).{.$config.= |
6e300 | 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 43 6f 6e 66 69 67 28 29 3b 0a 0a 24 6d 69 6e 53 70 | .$composer->getConfig();..$minSp |
6e320 | 61 63 65 46 72 65 65 20 3d 20 31 30 32 34 20 2a 20 31 30 32 34 3b 0a 69 66 20 28 28 28 24 64 66 | aceFree.=.1024.*.1024;.if.((($df |
6e340 | 20 3d 20 64 69 73 6b 5f 66 72 65 65 5f 73 70 61 63 65 28 24 64 69 72 20 3d 20 24 63 6f 6e 66 69 | .=.disk_free_space($dir.=.$confi |
6e360 | 67 2d 3e 67 65 74 28 27 68 6f 6d 65 27 29 29 29 20 21 3d 3d 20 66 61 6c 73 65 20 26 26 20 24 64 | g->get('home'))).!==.false.&&.$d |
6e380 | 66 20 3c 20 24 6d 69 6e 53 70 61 63 65 46 72 65 65 29 0a 7c 7c 20 28 28 24 64 66 20 3d 20 64 69 | f.<.$minSpaceFree).||.(($df.=.di |
6e3a0 | 73 6b 5f 66 72 65 65 5f 73 70 61 63 65 28 24 64 69 72 20 3d 20 24 63 6f 6e 66 69 67 2d 3e 67 65 | sk_free_space($dir.=.$config->ge |
6e3c0 | 74 28 27 76 65 6e 64 6f 72 2d 64 69 72 27 29 29 29 20 21 3d 3d 20 66 61 6c 73 65 20 26 26 20 24 | t('vendor-dir'))).!==.false.&&.$ |
6e3e0 | 64 66 20 3c 20 24 6d 69 6e 53 70 61 63 65 46 72 65 65 29 0a 7c 7c 20 28 28 24 64 66 20 3d 20 64 | df.<.$minSpaceFree).||.(($df.=.d |
6e400 | 69 73 6b 5f 66 72 65 65 5f 73 70 61 63 65 28 24 64 69 72 20 3d 20 73 79 73 5f 67 65 74 5f 74 65 | isk_free_space($dir.=.sys_get_te |
6e420 | 6d 70 5f 64 69 72 28 29 29 29 20 21 3d 3d 20 66 61 6c 73 65 20 26 26 20 24 64 66 20 3c 20 24 6d | mp_dir())).!==.false.&&.$df.<.$m |
6e440 | 69 6e 53 70 61 63 65 46 72 65 65 29 0a 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 | inSpaceFree).).{.$io->writeError |
6e460 | 28 27 3c 65 72 72 6f 72 3e 54 68 65 20 64 69 73 6b 20 68 6f 73 74 69 6e 67 20 27 2e 24 64 69 72 | ('<error>The.disk.hosting.'.$dir |
6e480 | 2e 27 20 69 73 20 66 75 6c 6c 2c 20 74 68 69 73 20 6d 61 79 20 62 65 20 74 68 65 20 63 61 75 73 | .'.is.full,.this.may.be.the.caus |
6e4a0 | 65 20 6f 66 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 65 78 63 65 70 74 69 6f 6e 3c 2f 65 72 | e.of.the.following.exception</er |
6e4c0 | 72 6f 72 3e 27 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 3a 3a 51 55 49 45 54 29 | ror>',.true,.IOInterface::QUIET) |
6e4e0 | 3b 0a 7d 0a 7d 0a 7d 20 63 61 74 63 68 20 28 5c 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a | ;.}.}.}.catch.(\Exception.$e).{. |
6e500 | 7d 0a 53 69 6c 65 6e 63 65 72 3a 3a 72 65 73 74 6f 72 65 28 29 3b 0a 0a 69 66 20 28 50 6c 61 74 | }.Silencer::restore();..if.(Plat |
6e520 | 66 6f 72 6d 3a 3a 69 73 57 69 6e 64 6f 77 73 28 29 20 26 26 20 66 61 6c 73 65 20 21 3d 3d 20 73 | form::isWindows().&&.false.!==.s |
6e540 | 74 72 70 6f 73 28 24 65 78 63 65 70 74 69 6f 6e 2d 3e 67 65 74 4d 65 73 73 61 67 65 28 29 2c 20 | trpos($exception->getMessage(),. |
6e560 | 27 54 68 65 20 73 79 73 74 65 6d 20 63 61 6e 6e 6f 74 20 66 69 6e 64 20 74 68 65 20 70 61 74 68 | 'The.system.cannot.find.the.path |
6e580 | 20 73 70 65 63 69 66 69 65 64 27 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 | .specified')).{.$io->writeError( |
6e5a0 | 27 3c 65 72 72 6f 72 3e 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 65 78 63 65 70 74 69 6f 6e 20 | '<error>The.following.exception. |
6e5c0 | 6d 61 79 20 62 65 20 63 61 75 73 65 64 20 62 79 20 61 20 73 74 61 6c 65 20 65 6e 74 72 79 20 69 | may.be.caused.by.a.stale.entry.i |
6e5e0 | 6e 20 79 6f 75 72 20 63 6d 64 2e 65 78 65 20 41 75 74 6f 52 75 6e 3c 2f 65 72 72 6f 72 3e 27 2c | n.your.cmd.exe.AutoRun</error>', |
6e600 | 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 3a 3a 51 55 49 45 54 29 3b 0a 24 69 6f 2d | .true,.IOInterface::QUIET);.$io- |
6e620 | 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 65 72 72 6f 72 3e 43 68 65 63 6b 20 68 74 74 70 73 3a | >writeError('<error>Check.https: |
6e640 | 2f 2f 67 65 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 67 2f 64 6f 63 2f 61 72 74 69 63 6c 65 73 2f 74 | //getcomposer.org/doc/articles/t |
6e660 | 72 6f 75 62 6c 65 73 68 6f 6f 74 69 6e 67 2e 6d 64 23 2d 74 68 65 2d 73 79 73 74 65 6d 2d 63 61 | roubleshooting.md#-the-system-ca |
6e680 | 6e 6e 6f 74 2d 66 69 6e 64 2d 74 68 65 2d 70 61 74 68 2d 73 70 65 63 69 66 69 65 64 2d 77 69 6e | nnot-find-the-path-specified-win |
6e6a0 | 64 6f 77 73 2d 20 66 6f 72 20 64 65 74 61 69 6c 73 3c 2f 65 72 72 6f 72 3e 27 2c 20 74 72 75 65 | dows-.for.details</error>',.true |
6e6c0 | 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 3a 3a 51 55 49 45 54 29 3b 0a 7d 0a 0a 69 66 20 28 66 61 | ,.IOInterface::QUIET);.}..if.(fa |
6e6e0 | 6c 73 65 20 21 3d 3d 20 73 74 72 70 6f 73 28 24 65 78 63 65 70 74 69 6f 6e 2d 3e 67 65 74 4d 65 | lse.!==.strpos($exception->getMe |
6e700 | 73 73 61 67 65 28 29 2c 20 27 66 6f 72 6b 20 66 61 69 6c 65 64 20 2d 20 43 61 6e 6e 6f 74 20 61 | ssage(),.'fork.failed.-.Cannot.a |
6e720 | 6c 6c 6f 63 61 74 65 20 6d 65 6d 6f 72 79 27 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 | llocate.memory')).{.$io->writeEr |
6e740 | 72 6f 72 28 27 3c 65 72 72 6f 72 3e 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 65 78 63 65 70 74 | ror('<error>The.following.except |
6e760 | 69 6f 6e 20 69 73 20 63 61 75 73 65 64 20 62 79 20 61 20 6c 61 63 6b 20 6f 66 20 6d 65 6d 6f 72 | ion.is.caused.by.a.lack.of.memor |
6e780 | 79 20 6f 72 20 73 77 61 70 2c 20 6f 72 20 6e 6f 74 20 68 61 76 69 6e 67 20 73 77 61 70 20 63 6f | y.or.swap,.or.not.having.swap.co |
6e7a0 | 6e 66 69 67 75 72 65 64 3c 2f 65 72 72 6f 72 3e 27 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 | nfigured</error>',.true,.IOInter |
6e7c0 | 66 61 63 65 3a 3a 51 55 49 45 54 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c | face::QUIET);.$io->writeError('< |
6e7e0 | 65 72 72 6f 72 3e 43 68 65 63 6b 20 68 74 74 70 73 3a 2f 2f 67 65 74 63 6f 6d 70 6f 73 65 72 2e | error>Check.https://getcomposer. |
6e800 | 6f 72 67 2f 64 6f 63 2f 61 72 74 69 63 6c 65 73 2f 74 72 6f 75 62 6c 65 73 68 6f 6f 74 69 6e 67 | org/doc/articles/troubleshooting |
6e820 | 2e 6d 64 23 70 72 6f 63 2d 6f 70 65 6e 2d 66 6f 72 6b 2d 66 61 69 6c 65 64 2d 65 72 72 6f 72 73 | .md#proc-open-fork-failed-errors |
6e840 | 20 66 6f 72 20 64 65 74 61 69 6c 73 3c 2f 65 72 72 6f 72 3e 27 2c 20 74 72 75 65 2c 20 49 4f 49 | .for.details</error>',.true,.IOI |
6e860 | 6e 74 65 72 66 61 63 65 3a 3a 51 55 49 45 54 29 3b 0a 7d 0a 0a 69 66 20 28 24 65 78 63 65 70 74 | nterface::QUIET);.}..if.($except |
6e880 | 69 6f 6e 20 69 6e 73 74 61 6e 63 65 6f 66 20 50 72 6f 63 65 73 73 54 69 6d 65 64 4f 75 74 45 78 | ion.instanceof.ProcessTimedOutEx |
6e8a0 | 63 65 70 74 69 6f 6e 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 65 72 72 | ception).{.$io->writeError('<err |
6e8c0 | 6f 72 3e 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 65 78 63 65 70 74 69 6f 6e 20 69 73 20 63 61 | or>The.following.exception.is.ca |
6e8e0 | 75 73 65 64 20 62 79 20 61 20 70 72 6f 63 65 73 73 20 74 69 6d 65 6f 75 74 3c 2f 65 72 72 6f 72 | used.by.a.process.timeout</error |
6e900 | 3e 27 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 3a 3a 51 55 49 45 54 29 3b 0a 24 | >',.true,.IOInterface::QUIET);.$ |
6e920 | 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 65 72 72 6f 72 3e 43 68 65 63 6b 20 68 74 74 | io->writeError('<error>Check.htt |
6e940 | 70 73 3a 2f 2f 67 65 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 67 2f 64 6f 63 2f 30 36 2d 63 6f 6e 66 | ps://getcomposer.org/doc/06-conf |
6e960 | 69 67 2e 6d 64 23 70 72 6f 63 65 73 73 2d 74 69 6d 65 6f 75 74 20 66 6f 72 20 64 65 74 61 69 6c | ig.md#process-timeout.for.detail |
6e980 | 73 3c 2f 65 72 72 6f 72 3e 27 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 3a 3a 51 | s</error>',.true,.IOInterface::Q |
6e9a0 | 55 49 45 54 29 3b 0a 7d 0a 0a 24 68 69 6e 74 73 20 3d 20 48 74 74 70 44 6f 77 6e 6c 6f 61 64 65 | UIET);.}..$hints.=.HttpDownloade |
6e9c0 | 72 3a 3a 67 65 74 45 78 63 65 70 74 69 6f 6e 48 69 6e 74 73 28 24 65 78 63 65 70 74 69 6f 6e 29 | r::getExceptionHints($exception) |
6e9e0 | 3b 0a 69 66 20 28 6e 75 6c 6c 20 21 3d 3d 20 24 68 69 6e 74 73 20 26 26 20 63 6f 75 6e 74 28 24 | ;.if.(null.!==.$hints.&&.count($ |
6ea00 | 68 69 6e 74 73 29 20 3e 20 30 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 68 69 6e 74 73 20 61 73 | hints).>.0).{.foreach.($hints.as |
6ea20 | 20 24 68 69 6e 74 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 24 68 69 6e 74 2c | .$hint).{.$io->writeError($hint, |
6ea40 | 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 3a 3a 51 55 49 45 54 29 3b 0a 7d 0a 7d 0a | .true,.IOInterface::QUIET);.}.}. |
6ea60 | 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 43 6f 6d 70 6f | }.......public.function.getCompo |
6ea80 | 73 65 72 28 62 6f 6f 6c 20 24 72 65 71 75 69 72 65 64 20 3d 20 74 72 75 65 2c 20 3f 62 6f 6f 6c | ser(bool.$required.=.true,.?bool |
6eaa0 | 20 24 64 69 73 61 62 6c 65 50 6c 75 67 69 6e 73 20 3d 20 6e 75 6c 6c 2c 20 3f 62 6f 6f 6c 20 24 | .$disablePlugins.=.null,.?bool.$ |
6eac0 | 64 69 73 61 62 6c 65 53 63 72 69 70 74 73 20 3d 20 6e 75 6c 6c 29 3a 20 3f 43 6f 6d 70 6f 73 65 | disableScripts.=.null):.?Compose |
6eae0 | 72 0a 7b 0a 69 66 20 28 6e 75 6c 6c 20 3d 3d 3d 20 24 64 69 73 61 62 6c 65 50 6c 75 67 69 6e 73 | r.{.if.(null.===.$disablePlugins |
6eb00 | 29 20 7b 0a 24 64 69 73 61 62 6c 65 50 6c 75 67 69 6e 73 20 3d 20 24 74 68 69 73 2d 3e 64 69 73 | ).{.$disablePlugins.=.$this->dis |
6eb20 | 61 62 6c 65 50 6c 75 67 69 6e 73 42 79 44 65 66 61 75 6c 74 3b 0a 7d 0a 69 66 20 28 6e 75 6c 6c | ablePluginsByDefault;.}.if.(null |
6eb40 | 20 3d 3d 3d 20 24 64 69 73 61 62 6c 65 53 63 72 69 70 74 73 29 20 7b 0a 24 64 69 73 61 62 6c 65 | .===.$disableScripts).{.$disable |
6eb60 | 53 63 72 69 70 74 73 20 3d 20 24 74 68 69 73 2d 3e 64 69 73 61 62 6c 65 53 63 72 69 70 74 73 42 | Scripts.=.$this->disableScriptsB |
6eb80 | 79 44 65 66 61 75 6c 74 3b 0a 7d 0a 0a 69 66 20 28 6e 75 6c 6c 20 3d 3d 3d 20 24 74 68 69 73 2d | yDefault;.}..if.(null.===.$this- |
6eba0 | 3e 63 6f 6d 70 6f 73 65 72 29 20 7b 0a 74 72 79 20 7b 0a 24 74 68 69 73 2d 3e 63 6f 6d 70 6f 73 | >composer).{.try.{.$this->compos |
6ebc0 | 65 72 20 3d 20 46 61 63 74 6f 72 79 3a 3a 63 72 65 61 74 65 28 50 6c 61 74 66 6f 72 6d 3a 3a 69 | er.=.Factory::create(Platform::i |
6ebe0 | 73 49 6e 70 75 74 43 6f 6d 70 6c 65 74 69 6f 6e 50 72 6f 63 65 73 73 28 29 20 3f 20 6e 65 77 20 | sInputCompletionProcess().?.new. |
6ec00 | 4e 75 6c 6c 49 4f 28 29 20 3a 20 24 74 68 69 73 2d 3e 69 6f 2c 20 6e 75 6c 6c 2c 20 24 64 69 73 | NullIO().:.$this->io,.null,.$dis |
6ec20 | 61 62 6c 65 50 6c 75 67 69 6e 73 2c 20 24 64 69 73 61 62 6c 65 53 63 72 69 70 74 73 29 3b 0a 7d | ablePlugins,.$disableScripts);.} |
6ec40 | 20 63 61 74 63 68 20 28 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f | .catch.(\InvalidArgumentExceptio |
6ec60 | 6e 20 24 65 29 20 7b 0a 69 66 20 28 24 72 65 71 75 69 72 65 64 29 20 7b 0a 24 74 68 69 73 2d 3e | n.$e).{.if.($required).{.$this-> |
6ec80 | 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 24 65 2d 3e 67 65 74 4d 65 73 73 61 67 65 28 29 29 | io->writeError($e->getMessage()) |
6eca0 | 3b 0a 69 66 20 28 24 74 68 69 73 2d 3e 61 72 65 45 78 63 65 70 74 69 6f 6e 73 43 61 75 67 68 74 | ;.if.($this->areExceptionsCaught |
6ecc0 | 28 29 29 20 7b 0a 65 78 69 74 28 31 29 3b 0a 7d 0a 74 68 72 6f 77 20 24 65 3b 0a 7d 0a 7d 20 63 | ()).{.exit(1);.}.throw.$e;.}.}.c |
6ece0 | 61 74 63 68 20 28 4a 73 6f 6e 56 61 6c 69 64 61 74 69 6f 6e 45 78 63 65 70 74 69 6f 6e 20 24 65 | atch.(JsonValidationException.$e |
6ed00 | 29 20 7b 0a 69 66 20 28 24 72 65 71 75 69 72 65 64 29 20 7b 0a 74 68 72 6f 77 20 24 65 3b 0a 7d | ).{.if.($required).{.throw.$e;.} |
6ed20 | 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 63 6f 6d 70 6f 73 65 72 3b 0a 7d 0a | .}.}..return.$this->composer;.}. |
6ed40 | 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 72 65 73 65 74 43 6f 6d 70 6f 73 65 | ....public.function.resetCompose |
6ed60 | 72 28 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 63 6f 6d 70 6f 73 65 72 20 3d 20 6e 75 | r():.void.{.$this->composer.=.nu |
6ed80 | 6c 6c 3b 0a 69 66 20 28 6d 65 74 68 6f 64 5f 65 78 69 73 74 73 28 24 74 68 69 73 2d 3e 67 65 74 | ll;.if.(method_exists($this->get |
6eda0 | 49 4f 28 29 2c 20 27 72 65 73 65 74 41 75 74 68 65 6e 74 69 63 61 74 69 6f 6e 73 27 29 29 20 7b | IO(),.'resetAuthentications')).{ |
6edc0 | 0a 24 74 68 69 73 2d 3e 67 65 74 49 4f 28 29 2d 3e 72 65 73 65 74 41 75 74 68 65 6e 74 69 63 61 | .$this->getIO()->resetAuthentica |
6ede0 | 74 69 6f 6e 73 28 29 3b 0a 7d 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 | tions();.}.}..public.function.ge |
6ee00 | 74 49 4f 28 29 3a 20 49 4f 49 6e 74 65 72 66 61 63 65 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 | tIO():.IOInterface.{.return.$thi |
6ee20 | 73 2d 3e 69 6f 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 48 65 6c | s->io;.}..public.function.getHel |
6ee40 | 70 28 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 73 65 6c 66 3a 3a 24 6c 6f 67 6f | p():.string.{.return.self::$logo |
6ee60 | 20 2e 20 70 61 72 65 6e 74 3a 3a 67 65 74 48 65 6c 70 28 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 70 72 6f | ...parent::getHelp();.}......pro |
6ee80 | 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 44 65 66 61 75 6c 74 43 6f 6d 6d 61 6e | tected.function.getDefaultComman |
6eea0 | 64 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 24 63 6f 6d 6d 61 6e 64 73 20 3d 20 61 72 72 61 79 5f | ds():.array.{.$commands.=.array_ |
6eec0 | 6d 65 72 67 65 28 70 61 72 65 6e 74 3a 3a 67 65 74 44 65 66 61 75 6c 74 43 6f 6d 6d 61 6e 64 73 | merge(parent::getDefaultCommands |
6eee0 | 28 29 2c 20 5b 0a 6e 65 77 20 43 6f 6d 6d 61 6e 64 5c 41 62 6f 75 74 43 6f 6d 6d 61 6e 64 28 29 | (),.[.new.Command\AboutCommand() |
6ef00 | 2c 0a 6e 65 77 20 43 6f 6d 6d 61 6e 64 5c 43 6f 6e 66 69 67 43 6f 6d 6d 61 6e 64 28 29 2c 0a 6e | ,.new.Command\ConfigCommand(),.n |
6ef20 | 65 77 20 43 6f 6d 6d 61 6e 64 5c 44 65 70 65 6e 64 73 43 6f 6d 6d 61 6e 64 28 29 2c 0a 6e 65 77 | ew.Command\DependsCommand(),.new |
6ef40 | 20 43 6f 6d 6d 61 6e 64 5c 50 72 6f 68 69 62 69 74 73 43 6f 6d 6d 61 6e 64 28 29 2c 0a 6e 65 77 | .Command\ProhibitsCommand(),.new |
6ef60 | 20 43 6f 6d 6d 61 6e 64 5c 49 6e 69 74 43 6f 6d 6d 61 6e 64 28 29 2c 0a 6e 65 77 20 43 6f 6d 6d | .Command\InitCommand(),.new.Comm |
6ef80 | 61 6e 64 5c 49 6e 73 74 61 6c 6c 43 6f 6d 6d 61 6e 64 28 29 2c 0a 6e 65 77 20 43 6f 6d 6d 61 6e | and\InstallCommand(),.new.Comman |
6efa0 | 64 5c 43 72 65 61 74 65 50 72 6f 6a 65 63 74 43 6f 6d 6d 61 6e 64 28 29 2c 0a 6e 65 77 20 43 6f | d\CreateProjectCommand(),.new.Co |
6efc0 | 6d 6d 61 6e 64 5c 55 70 64 61 74 65 43 6f 6d 6d 61 6e 64 28 29 2c 0a 6e 65 77 20 43 6f 6d 6d 61 | mmand\UpdateCommand(),.new.Comma |
6efe0 | 6e 64 5c 53 65 61 72 63 68 43 6f 6d 6d 61 6e 64 28 29 2c 0a 6e 65 77 20 43 6f 6d 6d 61 6e 64 5c | nd\SearchCommand(),.new.Command\ |
6f000 | 56 61 6c 69 64 61 74 65 43 6f 6d 6d 61 6e 64 28 29 2c 0a 6e 65 77 20 43 6f 6d 6d 61 6e 64 5c 41 | ValidateCommand(),.new.Command\A |
6f020 | 75 64 69 74 43 6f 6d 6d 61 6e 64 28 29 2c 0a 6e 65 77 20 43 6f 6d 6d 61 6e 64 5c 53 68 6f 77 43 | uditCommand(),.new.Command\ShowC |
6f040 | 6f 6d 6d 61 6e 64 28 29 2c 0a 6e 65 77 20 43 6f 6d 6d 61 6e 64 5c 53 75 67 67 65 73 74 73 43 6f | ommand(),.new.Command\SuggestsCo |
6f060 | 6d 6d 61 6e 64 28 29 2c 0a 6e 65 77 20 43 6f 6d 6d 61 6e 64 5c 52 65 71 75 69 72 65 43 6f 6d 6d | mmand(),.new.Command\RequireComm |
6f080 | 61 6e 64 28 29 2c 0a 6e 65 77 20 43 6f 6d 6d 61 6e 64 5c 44 75 6d 70 41 75 74 6f 6c 6f 61 64 43 | and(),.new.Command\DumpAutoloadC |
6f0a0 | 6f 6d 6d 61 6e 64 28 29 2c 0a 6e 65 77 20 43 6f 6d 6d 61 6e 64 5c 53 74 61 74 75 73 43 6f 6d 6d | ommand(),.new.Command\StatusComm |
6f0c0 | 61 6e 64 28 29 2c 0a 6e 65 77 20 43 6f 6d 6d 61 6e 64 5c 41 72 63 68 69 76 65 43 6f 6d 6d 61 6e | and(),.new.Command\ArchiveComman |
6f0e0 | 64 28 29 2c 0a 6e 65 77 20 43 6f 6d 6d 61 6e 64 5c 44 69 61 67 6e 6f 73 65 43 6f 6d 6d 61 6e 64 | d(),.new.Command\DiagnoseCommand |
6f100 | 28 29 2c 0a 6e 65 77 20 43 6f 6d 6d 61 6e 64 5c 52 75 6e 53 63 72 69 70 74 43 6f 6d 6d 61 6e 64 | (),.new.Command\RunScriptCommand |
6f120 | 28 29 2c 0a 6e 65 77 20 43 6f 6d 6d 61 6e 64 5c 4c 69 63 65 6e 73 65 73 43 6f 6d 6d 61 6e 64 28 | (),.new.Command\LicensesCommand( |
6f140 | 29 2c 0a 6e 65 77 20 43 6f 6d 6d 61 6e 64 5c 47 6c 6f 62 61 6c 43 6f 6d 6d 61 6e 64 28 29 2c 0a | ),.new.Command\GlobalCommand(),. |
6f160 | 6e 65 77 20 43 6f 6d 6d 61 6e 64 5c 43 6c 65 61 72 43 61 63 68 65 43 6f 6d 6d 61 6e 64 28 29 2c | new.Command\ClearCacheCommand(), |
6f180 | 0a 6e 65 77 20 43 6f 6d 6d 61 6e 64 5c 52 65 6d 6f 76 65 43 6f 6d 6d 61 6e 64 28 29 2c 0a 6e 65 | .new.Command\RemoveCommand(),.ne |
6f1a0 | 77 20 43 6f 6d 6d 61 6e 64 5c 48 6f 6d 65 43 6f 6d 6d 61 6e 64 28 29 2c 0a 6e 65 77 20 43 6f 6d | w.Command\HomeCommand(),.new.Com |
6f1c0 | 6d 61 6e 64 5c 45 78 65 63 43 6f 6d 6d 61 6e 64 28 29 2c 0a 6e 65 77 20 43 6f 6d 6d 61 6e 64 5c | mand\ExecCommand(),.new.Command\ |
6f1e0 | 4f 75 74 64 61 74 65 64 43 6f 6d 6d 61 6e 64 28 29 2c 0a 6e 65 77 20 43 6f 6d 6d 61 6e 64 5c 43 | OutdatedCommand(),.new.Command\C |
6f200 | 68 65 63 6b 50 6c 61 74 66 6f 72 6d 52 65 71 73 43 6f 6d 6d 61 6e 64 28 29 2c 0a 6e 65 77 20 43 | heckPlatformReqsCommand(),.new.C |
6f220 | 6f 6d 6d 61 6e 64 5c 46 75 6e 64 43 6f 6d 6d 61 6e 64 28 29 2c 0a 6e 65 77 20 43 6f 6d 6d 61 6e | ommand\FundCommand(),.new.Comman |
6f240 | 64 5c 52 65 69 6e 73 74 61 6c 6c 43 6f 6d 6d 61 6e 64 28 29 2c 0a 6e 65 77 20 43 6f 6d 6d 61 6e | d\ReinstallCommand(),.new.Comman |
6f260 | 64 5c 42 75 6d 70 43 6f 6d 6d 61 6e 64 28 29 2c 0a 5d 29 3b 0a 0a 69 66 20 28 73 74 72 70 6f 73 | d\BumpCommand(),.]);..if.(strpos |
6f280 | 28 5f 5f 46 49 4c 45 5f 5f 2c 20 27 70 68 61 72 3a 27 29 20 3d 3d 3d 20 30 20 7c 7c 20 27 31 27 | (__FILE__,.'phar:').===.0.||.'1' |
6f2a0 | 20 3d 3d 3d 20 50 6c 61 74 66 6f 72 6d 3a 3a 67 65 74 45 6e 76 28 27 43 4f 4d 50 4f 53 45 52 5f | .===.Platform::getEnv('COMPOSER_ |
6f2c0 | 54 45 53 54 53 5f 41 52 45 5f 52 55 4e 4e 49 4e 47 27 29 29 20 7b 0a 24 63 6f 6d 6d 61 6e 64 73 | TESTS_ARE_RUNNING')).{.$commands |
6f2e0 | 5b 5d 20 3d 20 6e 65 77 20 43 6f 6d 6d 61 6e 64 5c 53 65 6c 66 55 70 64 61 74 65 43 6f 6d 6d 61 | [].=.new.Command\SelfUpdateComma |
6f300 | 6e 64 28 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 63 6f 6d 6d 61 6e 64 73 3b 0a 7d 0a 0a 70 75 | nd();.}..return.$commands;.}..pu |
6f320 | 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 4c 6f 6e 67 56 65 72 73 69 6f 6e 28 29 3a 20 | blic.function.getLongVersion():. |
6f340 | 73 74 72 69 6e 67 0a 7b 0a 24 62 72 61 6e 63 68 41 6c 69 61 73 53 74 72 69 6e 67 20 3d 20 27 27 | string.{.$branchAliasString.=.'' |
6f360 | 3b 0a 69 66 20 28 43 6f 6d 70 6f 73 65 72 3a 3a 42 52 41 4e 43 48 5f 41 4c 49 41 53 5f 56 45 52 | ;.if.(Composer::BRANCH_ALIAS_VER |
6f380 | 53 49 4f 4e 20 26 26 20 43 6f 6d 70 6f 73 65 72 3a 3a 42 52 41 4e 43 48 5f 41 4c 49 41 53 5f 56 | SION.&&.Composer::BRANCH_ALIAS_V |
6f3a0 | 45 52 53 49 4f 4e 20 21 3d 3d 20 27 40 70 61 63 6b 61 67 65 5f 62 72 61 6e 63 68 5f 61 6c 69 61 | ERSION.!==.'@package_branch_alia |
6f3c0 | 73 5f 76 65 72 73 69 6f 6e 27 2e 27 40 27 29 20 7b 0a 24 62 72 61 6e 63 68 41 6c 69 61 73 53 74 | s_version'.'@').{.$branchAliasSt |
6f3e0 | 72 69 6e 67 20 3d 20 73 70 72 69 6e 74 66 28 27 20 28 25 73 29 27 2c 20 43 6f 6d 70 6f 73 65 72 | ring.=.sprintf('.(%s)',.Composer |
6f400 | 3a 3a 42 52 41 4e 43 48 5f 41 4c 49 41 53 5f 56 45 52 53 49 4f 4e 29 3b 0a 7d 0a 0a 72 65 74 75 | ::BRANCH_ALIAS_VERSION);.}..retu |
6f420 | 72 6e 20 73 70 72 69 6e 74 66 28 0a 27 3c 69 6e 66 6f 3e 25 73 3c 2f 69 6e 66 6f 3e 20 76 65 72 | rn.sprintf(.'<info>%s</info>.ver |
6f440 | 73 69 6f 6e 20 3c 63 6f 6d 6d 65 6e 74 3e 25 73 25 73 3c 2f 63 6f 6d 6d 65 6e 74 3e 20 25 73 27 | sion.<comment>%s%s</comment>.%s' |
6f460 | 2c 0a 24 74 68 69 73 2d 3e 67 65 74 4e 61 6d 65 28 29 2c 0a 24 74 68 69 73 2d 3e 67 65 74 56 65 | ,.$this->getName(),.$this->getVe |
6f480 | 72 73 69 6f 6e 28 29 2c 0a 24 62 72 61 6e 63 68 41 6c 69 61 73 53 74 72 69 6e 67 2c 0a 43 6f 6d | rsion(),.$branchAliasString,.Com |
6f4a0 | 70 6f 73 65 72 3a 3a 52 45 4c 45 41 53 45 5f 44 41 54 45 0a 29 3b 0a 7d 0a 0a 70 72 6f 74 65 63 | poser::RELEASE_DATE.);.}..protec |
6f4c0 | 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 44 65 66 61 75 6c 74 49 6e 70 75 74 44 65 66 69 | ted.function.getDefaultInputDefi |
6f4e0 | 6e 69 74 69 6f 6e 28 29 3a 20 49 6e 70 75 74 44 65 66 69 6e 69 74 69 6f 6e 0a 7b 0a 24 64 65 66 | nition():.InputDefinition.{.$def |
6f500 | 69 6e 69 74 69 6f 6e 20 3d 20 70 61 72 65 6e 74 3a 3a 67 65 74 44 65 66 61 75 6c 74 49 6e 70 75 | inition.=.parent::getDefaultInpu |
6f520 | 74 44 65 66 69 6e 69 74 69 6f 6e 28 29 3b 0a 24 64 65 66 69 6e 69 74 69 6f 6e 2d 3e 61 64 64 4f | tDefinition();.$definition->addO |
6f540 | 70 74 69 6f 6e 28 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 2d 2d 70 72 6f 66 69 6c 65 | ption(new.InputOption('--profile |
6f560 | 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 | ',.null,.InputOption::VALUE_NONE |
6f580 | 2c 20 27 44 69 73 70 6c 61 79 20 74 69 6d 69 6e 67 20 61 6e 64 20 6d 65 6d 6f 72 79 20 75 73 61 | ,.'Display.timing.and.memory.usa |
6f5a0 | 67 65 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 27 29 29 3b 0a 24 64 65 66 69 6e 69 74 69 6f 6e 2d 3e | ge.information'));.$definition-> |
6f5c0 | 61 64 64 4f 70 74 69 6f 6e 28 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 2d 2d 6e 6f 2d | addOption(new.InputOption('--no- |
6f5e0 | 70 6c 75 67 69 6e 73 27 2c 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c | plugins',.null,.InputOption::VAL |
6f600 | 55 45 5f 4e 4f 4e 45 2c 20 27 57 68 65 74 68 65 72 20 74 6f 20 64 69 73 61 62 6c 65 20 70 6c 75 | UE_NONE,.'Whether.to.disable.plu |
6f620 | 67 69 6e 73 2e 27 29 29 3b 0a 24 64 65 66 69 6e 69 74 69 6f 6e 2d 3e 61 64 64 4f 70 74 69 6f 6e | gins.'));.$definition->addOption |
6f640 | 28 6e 65 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 2d 2d 6e 6f 2d 73 63 72 69 70 74 73 27 2c | (new.InputOption('--no-scripts', |
6f660 | 20 6e 75 6c 6c 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 | .null,.InputOption::VALUE_NONE,. |
6f680 | 27 53 6b 69 70 73 20 74 68 65 20 65 78 65 63 75 74 69 6f 6e 20 6f 66 20 61 6c 6c 20 73 63 72 69 | 'Skips.the.execution.of.all.scri |
6f6a0 | 70 74 73 20 64 65 66 69 6e 65 64 20 69 6e 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 20 66 69 6c | pts.defined.in.composer.json.fil |
6f6c0 | 65 2e 27 29 29 3b 0a 24 64 65 66 69 6e 69 74 69 6f 6e 2d 3e 61 64 64 4f 70 74 69 6f 6e 28 6e 65 | e.'));.$definition->addOption(ne |
6f6e0 | 77 20 49 6e 70 75 74 4f 70 74 69 6f 6e 28 27 2d 2d 77 6f 72 6b 69 6e 67 2d 64 69 72 27 2c 20 27 | w.InputOption('--working-dir',.' |
6f700 | 2d 64 27 2c 20 49 6e 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 52 45 51 55 49 52 45 44 | -d',.InputOption::VALUE_REQUIRED |
6f720 | 2c 20 27 49 66 20 73 70 65 63 69 66 69 65 64 2c 20 75 73 65 20 74 68 65 20 67 69 76 65 6e 20 64 | ,.'If.specified,.use.the.given.d |
6f740 | 69 72 65 63 74 6f 72 79 20 61 73 20 77 6f 72 6b 69 6e 67 20 64 69 72 65 63 74 6f 72 79 2e 27 29 | irectory.as.working.directory.') |
6f760 | 29 3b 0a 24 64 65 66 69 6e 69 74 69 6f 6e 2d 3e 61 64 64 4f 70 74 69 6f 6e 28 6e 65 77 20 49 6e | );.$definition->addOption(new.In |
6f780 | 70 75 74 4f 70 74 69 6f 6e 28 27 2d 2d 6e 6f 2d 63 61 63 68 65 27 2c 20 6e 75 6c 6c 2c 20 49 6e | putOption('--no-cache',.null,.In |
6f7a0 | 70 75 74 4f 70 74 69 6f 6e 3a 3a 56 41 4c 55 45 5f 4e 4f 4e 45 2c 20 27 50 72 65 76 65 6e 74 20 | putOption::VALUE_NONE,.'Prevent. |
6f7c0 | 75 73 65 20 6f 66 20 74 68 65 20 63 61 63 68 65 27 29 29 3b 0a 0a 72 65 74 75 72 6e 20 24 64 65 | use.of.the.cache'));..return.$de |
6f7e0 | 66 69 6e 69 74 69 6f 6e 3b 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e | finition;.}.....private.function |
6f800 | 20 67 65 74 50 6c 75 67 69 6e 43 6f 6d 6d 61 6e 64 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 24 63 | .getPluginCommands():.array.{.$c |
6f820 | 6f 6d 6d 61 6e 64 73 20 3d 20 5b 5d 3b 0a 0a 24 63 6f 6d 70 6f 73 65 72 20 3d 20 24 74 68 69 73 | ommands.=.[];..$composer.=.$this |
6f840 | 2d 3e 67 65 74 43 6f 6d 70 6f 73 65 72 28 66 61 6c 73 65 2c 20 66 61 6c 73 65 29 3b 0a 69 66 20 | ->getComposer(false,.false);.if. |
6f860 | 28 6e 75 6c 6c 20 3d 3d 3d 20 24 63 6f 6d 70 6f 73 65 72 29 20 7b 0a 24 63 6f 6d 70 6f 73 65 72 | (null.===.$composer).{.$composer |
6f880 | 20 3d 20 46 61 63 74 6f 72 79 3a 3a 63 72 65 61 74 65 47 6c 6f 62 61 6c 28 24 74 68 69 73 2d 3e | .=.Factory::createGlobal($this-> |
6f8a0 | 69 6f 2c 20 24 74 68 69 73 2d 3e 64 69 73 61 62 6c 65 50 6c 75 67 69 6e 73 42 79 44 65 66 61 75 | io,.$this->disablePluginsByDefau |
6f8c0 | 6c 74 2c 20 24 74 68 69 73 2d 3e 64 69 73 61 62 6c 65 53 63 72 69 70 74 73 42 79 44 65 66 61 75 | lt,.$this->disableScriptsByDefau |
6f8e0 | 6c 74 29 3b 0a 7d 0a 0a 69 66 20 28 6e 75 6c 6c 20 21 3d 3d 20 24 63 6f 6d 70 6f 73 65 72 29 20 | lt);.}..if.(null.!==.$composer). |
6f900 | 7b 0a 24 70 6d 20 3d 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 50 6c 75 67 69 6e 4d 61 6e 61 | {.$pm.=.$composer->getPluginMana |
6f920 | 67 65 72 28 29 3b 0a 66 6f 72 65 61 63 68 20 28 24 70 6d 2d 3e 67 65 74 50 6c 75 67 69 6e 43 61 | ger();.foreach.($pm->getPluginCa |
6f940 | 70 61 62 69 6c 69 74 69 65 73 28 27 43 6f 6d 70 6f 73 65 72 5c 50 6c 75 67 69 6e 5c 43 61 70 61 | pabilities('Composer\Plugin\Capa |
6f960 | 62 69 6c 69 74 79 5c 43 6f 6d 6d 61 6e 64 50 72 6f 76 69 64 65 72 27 2c 20 5b 27 63 6f 6d 70 6f | bility\CommandProvider',.['compo |
6f980 | 73 65 72 27 20 3d 3e 20 24 63 6f 6d 70 6f 73 65 72 2c 20 27 69 6f 27 20 3d 3e 20 24 74 68 69 73 | ser'.=>.$composer,.'io'.=>.$this |
6f9a0 | 2d 3e 69 6f 5d 29 20 61 73 20 24 63 61 70 61 62 69 6c 69 74 79 29 20 7b 0a 24 6e 65 77 43 6f 6d | ->io]).as.$capability).{.$newCom |
6f9c0 | 6d 61 6e 64 73 20 3d 20 24 63 61 70 61 62 69 6c 69 74 79 2d 3e 67 65 74 43 6f 6d 6d 61 6e 64 73 | mands.=.$capability->getCommands |
6f9e0 | 28 29 3b 0a 69 66 20 28 21 69 73 5f 61 72 72 61 79 28 24 6e 65 77 43 6f 6d 6d 61 6e 64 73 29 29 | ();.if.(!is_array($newCommands)) |
6fa00 | 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 55 6e 65 78 70 65 63 74 65 64 56 61 6c 75 65 45 78 63 | .{.throw.new.\UnexpectedValueExc |
6fa20 | 65 70 74 69 6f 6e 28 27 50 6c 75 67 69 6e 20 63 61 70 61 62 69 6c 69 74 79 20 27 2e 67 65 74 5f | eption('Plugin.capability.'.get_ |
6fa40 | 63 6c 61 73 73 28 24 63 61 70 61 62 69 6c 69 74 79 29 2e 27 20 66 61 69 6c 65 64 20 74 6f 20 72 | class($capability).'.failed.to.r |
6fa60 | 65 74 75 72 6e 20 61 6e 20 61 72 72 61 79 20 66 72 6f 6d 20 67 65 74 43 6f 6d 6d 61 6e 64 73 27 | eturn.an.array.from.getCommands' |
6fa80 | 29 3b 0a 7d 0a 66 6f 72 65 61 63 68 20 28 24 6e 65 77 43 6f 6d 6d 61 6e 64 73 20 61 73 20 24 63 | );.}.foreach.($newCommands.as.$c |
6faa0 | 6f 6d 6d 61 6e 64 29 20 7b 0a 69 66 20 28 21 24 63 6f 6d 6d 61 6e 64 20 69 6e 73 74 61 6e 63 65 | ommand).{.if.(!$command.instance |
6fac0 | 6f 66 20 43 6f 6d 6d 61 6e 64 5c 42 61 73 65 43 6f 6d 6d 61 6e 64 29 20 7b 0a 74 68 72 6f 77 20 | of.Command\BaseCommand).{.throw. |
6fae0 | 6e 65 77 20 5c 55 6e 65 78 70 65 63 74 65 64 56 61 6c 75 65 45 78 63 65 70 74 69 6f 6e 28 27 50 | new.\UnexpectedValueException('P |
6fb00 | 6c 75 67 69 6e 20 63 61 70 61 62 69 6c 69 74 79 20 27 2e 67 65 74 5f 63 6c 61 73 73 28 24 63 61 | lugin.capability.'.get_class($ca |
6fb20 | 70 61 62 69 6c 69 74 79 29 2e 27 20 72 65 74 75 72 6e 65 64 20 61 6e 20 69 6e 76 61 6c 69 64 20 | pability).'.returned.an.invalid. |
6fb40 | 76 61 6c 75 65 2c 20 77 65 20 65 78 70 65 63 74 65 64 20 61 6e 20 61 72 72 61 79 20 6f 66 20 43 | value,.we.expected.an.array.of.C |
6fb60 | 6f 6d 70 6f 73 65 72 5c 43 6f 6d 6d 61 6e 64 5c 42 61 73 65 43 6f 6d 6d 61 6e 64 20 6f 62 6a 65 | omposer\Command\BaseCommand.obje |
6fb80 | 63 74 73 27 29 3b 0a 7d 0a 7d 0a 24 63 6f 6d 6d 61 6e 64 73 20 3d 20 61 72 72 61 79 5f 6d 65 72 | cts');.}.}.$commands.=.array_mer |
6fba0 | 67 65 28 24 63 6f 6d 6d 61 6e 64 73 2c 20 24 6e 65 77 43 6f 6d 6d 61 6e 64 73 29 3b 0a 7d 0a 7d | ge($commands,.$newCommands);.}.} |
6fbc0 | 0a 0a 72 65 74 75 72 6e 20 24 63 6f 6d 6d 61 6e 64 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c | ..return.$commands;.}.......publ |
6fbe0 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 49 6e 69 74 69 61 6c 57 6f 72 6b 69 6e 67 44 69 72 | ic.function.getInitialWorkingDir |
6fc00 | 65 63 74 6f 72 79 28 29 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 69 6e 69 74 69 61 6c | ectory().{.return.$this->initial |
6fc20 | 57 6f 72 6b 69 6e 67 44 69 72 65 63 74 6f 72 79 3b 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 | WorkingDirectory;.}.....private. |
6fc40 | 66 75 6e 63 74 69 6f 6e 20 67 65 74 55 73 65 50 61 72 65 6e 74 44 69 72 43 6f 6e 66 69 67 56 61 | function.getUseParentDirConfigVa |
6fc60 | 6c 75 65 28 29 0a 7b 0a 24 63 6f 6e 66 69 67 20 3d 20 46 61 63 74 6f 72 79 3a 3a 63 72 65 61 74 | lue().{.$config.=.Factory::creat |
6fc80 | 65 43 6f 6e 66 69 67 28 24 74 68 69 73 2d 3e 69 6f 29 3b 0a 0a 72 65 74 75 72 6e 20 24 63 6f 6e | eConfig($this->io);..return.$con |
6fca0 | 66 69 67 2d 3e 67 65 74 28 27 75 73 65 2d 70 61 72 65 6e 74 2d 64 69 72 27 29 3b 0a 7d 0a 7d 0a | fig->get('use-parent-dir');.}.}. |
6fcc0 | 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a | <?php.declare(strict_types=1);.. |
6fce0 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e | ..........namespace.Composer\Con |
6fd00 | 73 6f 6c 65 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 4f 5c 49 4f 49 6e 74 65 72 66 61 | sole;..use.Composer\IO\IOInterfa |
6fd20 | 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 6c 61 74 66 6f 72 6d 3b 0a | ce;.use.Composer\Util\Platform;. |
6fd40 | 0a 66 69 6e 61 6c 20 63 6c 61 73 73 20 47 69 74 68 75 62 41 63 74 69 6f 6e 45 72 72 6f 72 0a 7b | .final.class.GithubActionError.{ |
6fd60 | 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 69 6f 3b 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 | ....protected.$io;..public.funct |
6fd80 | 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 49 4f 49 6e 74 65 72 66 61 63 65 20 24 69 6f 29 | ion.__construct(IOInterface.$io) |
6fda0 | 0a 7b 0a 24 74 68 69 73 2d 3e 69 6f 20 3d 20 24 69 6f 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 | .{.$this->io.=.$io;.}..public.fu |
6fdc0 | 6e 63 74 69 6f 6e 20 65 6d 69 74 28 73 74 72 69 6e 67 20 24 6d 65 73 73 61 67 65 2c 20 3f 73 74 | nction.emit(string.$message,.?st |
6fde0 | 72 69 6e 67 20 24 66 69 6c 65 20 3d 20 6e 75 6c 6c 2c 20 3f 69 6e 74 20 24 6c 69 6e 65 20 3d 20 | ring.$file.=.null,.?int.$line.=. |
6fe00 | 6e 75 6c 6c 29 3a 20 76 6f 69 64 0a 7b 0a 69 66 20 28 50 6c 61 74 66 6f 72 6d 3a 3a 67 65 74 45 | null):.void.{.if.(Platform::getE |
6fe20 | 6e 76 28 27 47 49 54 48 55 42 5f 41 43 54 49 4f 4e 53 27 29 20 26 26 20 21 50 6c 61 74 66 6f 72 | nv('GITHUB_ACTIONS').&&.!Platfor |
6fe40 | 6d 3a 3a 67 65 74 45 6e 76 28 27 43 4f 4d 50 4f 53 45 52 5f 54 45 53 54 53 5f 41 52 45 5f 52 55 | m::getEnv('COMPOSER_TESTS_ARE_RU |
6fe60 | 4e 4e 49 4e 47 27 29 29 20 7b 0a 24 6d 65 73 73 61 67 65 20 3d 20 24 74 68 69 73 2d 3e 65 73 63 | NNING')).{.$message.=.$this->esc |
6fe80 | 61 70 65 44 61 74 61 28 24 6d 65 73 73 61 67 65 29 3b 0a 0a 69 66 20 28 24 66 69 6c 65 20 26 26 | apeData($message);..if.($file.&& |
6fea0 | 20 24 6c 69 6e 65 29 20 7b 0a 24 66 69 6c 65 20 3d 20 24 74 68 69 73 2d 3e 65 73 63 61 70 65 50 | .$line).{.$file.=.$this->escapeP |
6fec0 | 72 6f 70 65 72 74 79 28 24 66 69 6c 65 29 3b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 | roperty($file);.$this->io->write |
6fee0 | 28 22 3a 3a 65 72 72 6f 72 20 66 69 6c 65 3d 22 2e 20 24 66 69 6c 65 20 2e 22 2c 6c 69 6e 65 3d | ("::error.file="..$file..",line= |
6ff00 | 22 2e 20 24 6c 69 6e 65 20 2e 22 3a 3a 22 2e 20 24 6d 65 73 73 61 67 65 29 3b 0a 7d 20 65 6c 73 | "..$line.."::"..$message);.}.els |
6ff20 | 65 69 66 20 28 24 66 69 6c 65 29 20 7b 0a 24 66 69 6c 65 20 3d 20 24 74 68 69 73 2d 3e 65 73 63 | eif.($file).{.$file.=.$this->esc |
6ff40 | 61 70 65 50 72 6f 70 65 72 74 79 28 24 66 69 6c 65 29 3b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 | apeProperty($file);.$this->io->w |
6ff60 | 72 69 74 65 28 22 3a 3a 65 72 72 6f 72 20 66 69 6c 65 3d 22 2e 20 24 66 69 6c 65 20 2e 22 3a 3a | rite("::error.file="..$file..":: |
6ff80 | 22 2e 20 24 6d 65 73 73 61 67 65 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 74 68 69 73 2d 3e 69 6f | "..$message);.}.else.{.$this->io |
6ffa0 | 2d 3e 77 72 69 74 65 28 22 3a 3a 65 72 72 6f 72 20 3a 3a 22 2e 20 24 6d 65 73 73 61 67 65 29 3b | ->write("::error.::"..$message); |
6ffc0 | 0a 7d 0a 7d 0a 7d 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 65 73 63 61 70 65 44 | .}.}.}..private.function.escapeD |
6ffe0 | 61 74 61 28 73 74 72 69 6e 67 20 24 64 61 74 61 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 0a 24 64 61 | ata(string.$data):.string.{..$da |
70000 | 74 61 20 3d 20 73 74 72 5f 72 65 70 6c 61 63 65 28 22 25 22 2c 20 27 25 32 35 27 2c 20 24 64 61 | ta.=.str_replace("%",.'%25',.$da |
70020 | 74 61 29 3b 0a 24 64 61 74 61 20 3d 20 73 74 72 5f 72 65 70 6c 61 63 65 28 22 5c 72 22 2c 20 27 | ta);.$data.=.str_replace("\r",.' |
70040 | 25 30 44 27 2c 20 24 64 61 74 61 29 3b 0a 24 64 61 74 61 20 3d 20 73 74 72 5f 72 65 70 6c 61 63 | %0D',.$data);.$data.=.str_replac |
70060 | 65 28 22 5c 6e 22 2c 20 27 25 30 41 27 2c 20 24 64 61 74 61 29 3b 0a 0a 72 65 74 75 72 6e 20 24 | e("\n",.'%0A',.$data);..return.$ |
70080 | 64 61 74 61 3b 0a 7d 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 65 73 63 61 70 65 | data;.}..private.function.escape |
700a0 | 50 72 6f 70 65 72 74 79 28 73 74 72 69 6e 67 20 24 70 72 6f 70 65 72 74 79 29 3a 20 73 74 72 69 | Property(string.$property):.stri |
700c0 | 6e 67 0a 7b 0a 0a 24 70 72 6f 70 65 72 74 79 20 3d 20 73 74 72 5f 72 65 70 6c 61 63 65 28 22 25 | ng.{..$property.=.str_replace("% |
700e0 | 22 2c 20 27 25 32 35 27 2c 20 24 70 72 6f 70 65 72 74 79 29 3b 0a 24 70 72 6f 70 65 72 74 79 20 | ",.'%25',.$property);.$property. |
70100 | 3d 20 73 74 72 5f 72 65 70 6c 61 63 65 28 22 5c 72 22 2c 20 27 25 30 44 27 2c 20 24 70 72 6f 70 | =.str_replace("\r",.'%0D',.$prop |
70120 | 65 72 74 79 29 3b 0a 24 70 72 6f 70 65 72 74 79 20 3d 20 73 74 72 5f 72 65 70 6c 61 63 65 28 22 | erty);.$property.=.str_replace(" |
70140 | 5c 6e 22 2c 20 27 25 30 41 27 2c 20 24 70 72 6f 70 65 72 74 79 29 3b 0a 24 70 72 6f 70 65 72 74 | \n",.'%0A',.$property);.$propert |
70160 | 79 20 3d 20 73 74 72 5f 72 65 70 6c 61 63 65 28 22 3a 22 2c 20 27 25 33 41 27 2c 20 24 70 72 6f | y.=.str_replace(":",.'%3A',.$pro |
70180 | 70 65 72 74 79 29 3b 0a 24 70 72 6f 70 65 72 74 79 20 3d 20 73 74 72 5f 72 65 70 6c 61 63 65 28 | perty);.$property.=.str_replace( |
701a0 | 22 2c 22 2c 20 27 25 32 43 27 2c 20 24 70 72 6f 70 65 72 74 79 29 3b 0a 0a 72 65 74 75 72 6e 20 | ",",.'%2C',.$property);..return. |
701c0 | 24 70 72 6f 70 65 72 74 79 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 | $property;.}.}.<?php.declare(str |
701e0 | 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 | ict_types=1);............namespa |
70200 | 63 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 73 6f 6c 65 3b 0a 0a 75 73 65 20 43 6c 6f 73 75 72 | ce.Composer\Console;..use.Closur |
70220 | 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 63 72 65 5c 50 72 65 67 3b 0a 75 73 65 20 53 | e;.use.Composer\Pcre\Preg;.use.S |
70240 | 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 46 6f 72 6d 61 74 74 | ymfony\Component\Console\Formatt |
70260 | 65 72 5c 4f 75 74 70 75 74 46 6f 72 6d 61 74 74 65 72 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c | er\OutputFormatter;.use.Symfony\ |
70280 | 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 46 6f 72 6d 61 74 74 65 72 5c 4f 75 74 70 | Component\Console\Formatter\Outp |
702a0 | 75 74 46 6f 72 6d 61 74 74 65 72 53 74 79 6c 65 3b 0a 0a 0a 0a 0a 63 6c 61 73 73 20 48 74 6d 6c | utFormatterStyle;.....class.Html |
702c0 | 4f 75 74 70 75 74 46 6f 72 6d 61 74 74 65 72 20 65 78 74 65 6e 64 73 20 4f 75 74 70 75 74 46 6f | OutputFormatter.extends.OutputFo |
702e0 | 72 6d 61 74 74 65 72 0a 7b 0a 0a 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 24 61 76 61 69 6c | rmatter.{..private.static.$avail |
70300 | 61 62 6c 65 46 6f 72 65 67 72 6f 75 6e 64 43 6f 6c 6f 72 73 20 3d 20 5b 0a 33 30 20 3d 3e 20 27 | ableForegroundColors.=.[.30.=>.' |
70320 | 62 6c 61 63 6b 27 2c 0a 33 31 20 3d 3e 20 27 72 65 64 27 2c 0a 33 32 20 3d 3e 20 27 67 72 65 65 | black',.31.=>.'red',.32.=>.'gree |
70340 | 6e 27 2c 0a 33 33 20 3d 3e 20 27 79 65 6c 6c 6f 77 27 2c 0a 33 34 20 3d 3e 20 27 62 6c 75 65 27 | n',.33.=>.'yellow',.34.=>.'blue' |
70360 | 2c 0a 33 35 20 3d 3e 20 27 6d 61 67 65 6e 74 61 27 2c 0a 33 36 20 3d 3e 20 27 63 79 61 6e 27 2c | ,.35.=>.'magenta',.36.=>.'cyan', |
70380 | 0a 33 37 20 3d 3e 20 27 77 68 69 74 65 27 2c 0a 5d 3b 0a 0a 70 72 69 76 61 74 65 20 73 74 61 74 | .37.=>.'white',.];..private.stat |
703a0 | 69 63 20 24 61 76 61 69 6c 61 62 6c 65 42 61 63 6b 67 72 6f 75 6e 64 43 6f 6c 6f 72 73 20 3d 20 | ic.$availableBackgroundColors.=. |
703c0 | 5b 0a 34 30 20 3d 3e 20 27 62 6c 61 63 6b 27 2c 0a 34 31 20 3d 3e 20 27 72 65 64 27 2c 0a 34 32 | [.40.=>.'black',.41.=>.'red',.42 |
703e0 | 20 3d 3e 20 27 67 72 65 65 6e 27 2c 0a 34 33 20 3d 3e 20 27 79 65 6c 6c 6f 77 27 2c 0a 34 34 20 | .=>.'green',.43.=>.'yellow',.44. |
70400 | 3d 3e 20 27 62 6c 75 65 27 2c 0a 34 35 20 3d 3e 20 27 6d 61 67 65 6e 74 61 27 2c 0a 34 36 20 3d | =>.'blue',.45.=>.'magenta',.46.= |
70420 | 3e 20 27 63 79 61 6e 27 2c 0a 34 37 20 3d 3e 20 27 77 68 69 74 65 27 2c 0a 5d 3b 0a 0a 70 72 69 | >.'cyan',.47.=>.'white',.];..pri |
70440 | 76 61 74 65 20 73 74 61 74 69 63 20 24 61 76 61 69 6c 61 62 6c 65 4f 70 74 69 6f 6e 73 20 3d 20 | vate.static.$availableOptions.=. |
70460 | 5b 0a 31 20 3d 3e 20 27 62 6f 6c 64 27 2c 0a 34 20 3d 3e 20 27 75 6e 64 65 72 73 63 6f 72 65 27 | [.1.=>.'bold',.4.=>.'underscore' |
70480 | 2c 0a 0a 0a 0a 5d 3b 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f | ,....];.....public.function.__co |
704a0 | 6e 73 74 72 75 63 74 28 61 72 72 61 79 20 24 73 74 79 6c 65 73 20 3d 20 5b 5d 29 0a 7b 0a 70 61 | nstruct(array.$styles.=.[]).{.pa |
704c0 | 72 65 6e 74 3a 3a 5f 5f 63 6f 6e 73 74 72 75 63 74 28 74 72 75 65 2c 20 24 73 74 79 6c 65 73 29 | rent::__construct(true,.$styles) |
704e0 | 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 66 6f 72 6d 61 74 28 3f 73 74 72 | ;.}..public.function.format(?str |
70500 | 69 6e 67 20 24 6d 65 73 73 61 67 65 29 3a 20 3f 73 74 72 69 6e 67 0a 7b 0a 24 66 6f 72 6d 61 74 | ing.$message):.?string.{.$format |
70520 | 74 65 64 20 3d 20 70 61 72 65 6e 74 3a 3a 66 6f 72 6d 61 74 28 24 6d 65 73 73 61 67 65 29 3b 0a | ted.=.parent::format($message);. |
70540 | 0a 69 66 20 28 24 66 6f 72 6d 61 74 74 65 64 20 3d 3d 3d 20 6e 75 6c 6c 29 20 7b 0a 72 65 74 75 | .if.($formatted.===.null).{.retu |
70560 | 72 6e 20 6e 75 6c 6c 3b 0a 7d 0a 0a 24 63 6c 65 61 72 45 73 63 61 70 65 43 6f 64 65 73 20 3d 20 | rn.null;.}..$clearEscapeCodes.=. |
70580 | 27 28 3f 3a 33 39 7c 34 39 7c 30 7c 32 32 7c 32 34 7c 32 35 7c 32 37 7c 32 38 29 27 3b 0a 0a 72 | '(?:39|49|0|22|24|25|27|28)';..r |
705a0 | 65 74 75 72 6e 20 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 43 61 6c 6c 62 61 63 6b 28 22 7b 5c 30 | eturn.Preg::replaceCallback("{\0 |
705c0 | 33 33 5c 5b 28 5b 30 2d 39 3b 5d 2b 29 6d 28 2e 2a 3f 29 5c 30 33 33 5c 5b 28 3f 3a 22 2e 24 63 | 33\[([0-9;]+)m(.*?)\033\[(?:".$c |
705e0 | 6c 65 61 72 45 73 63 61 70 65 43 6f 64 65 73 2e 22 3b 29 2a 3f 22 2e 24 63 6c 65 61 72 45 73 63 | learEscapeCodes.";)*?".$clearEsc |
70600 | 61 70 65 43 6f 64 65 73 2e 22 6d 7d 73 22 2c 20 43 6c 6f 73 75 72 65 3a 3a 66 72 6f 6d 43 61 6c | apeCodes."m}s",.Closure::fromCal |
70620 | 6c 61 62 6c 65 28 5b 24 74 68 69 73 2c 20 27 66 6f 72 6d 61 74 48 74 6d 6c 27 5d 29 2c 20 24 66 | lable([$this,.'formatHtml']),.$f |
70640 | 6f 72 6d 61 74 74 65 64 29 3b 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f | ormatted);.}.....private.functio |
70660 | 6e 20 66 6f 72 6d 61 74 48 74 6d 6c 28 61 72 72 61 79 20 24 6d 61 74 63 68 65 73 29 3a 20 73 74 | n.formatHtml(array.$matches):.st |
70680 | 72 69 6e 67 0a 7b 0a 24 6f 75 74 20 3d 20 27 3c 73 70 61 6e 20 73 74 79 6c 65 3d 22 27 3b 0a 66 | ring.{.$out.=.'<span.style="';.f |
706a0 | 6f 72 65 61 63 68 20 28 65 78 70 6c 6f 64 65 28 27 3b 27 2c 20 24 6d 61 74 63 68 65 73 5b 31 5d | oreach.(explode(';',.$matches[1] |
706c0 | 29 20 61 73 20 24 63 6f 64 65 29 20 7b 0a 69 66 20 28 69 73 73 65 74 28 73 65 6c 66 3a 3a 24 61 | ).as.$code).{.if.(isset(self::$a |
706e0 | 76 61 69 6c 61 62 6c 65 46 6f 72 65 67 72 6f 75 6e 64 43 6f 6c 6f 72 73 5b 28 69 6e 74 29 20 24 | vailableForegroundColors[(int).$ |
70700 | 63 6f 64 65 5d 29 29 20 7b 0a 24 6f 75 74 20 2e 3d 20 27 63 6f 6c 6f 72 3a 27 2e 73 65 6c 66 3a | code])).{.$out..=.'color:'.self: |
70720 | 3a 24 61 76 61 69 6c 61 62 6c 65 46 6f 72 65 67 72 6f 75 6e 64 43 6f 6c 6f 72 73 5b 28 69 6e 74 | :$availableForegroundColors[(int |
70740 | 29 20 24 63 6f 64 65 5d 2e 27 3b 27 3b 0a 7d 20 65 6c 73 65 69 66 20 28 69 73 73 65 74 28 73 65 | ).$code].';';.}.elseif.(isset(se |
70760 | 6c 66 3a 3a 24 61 76 61 69 6c 61 62 6c 65 42 61 63 6b 67 72 6f 75 6e 64 43 6f 6c 6f 72 73 5b 28 | lf::$availableBackgroundColors[( |
70780 | 69 6e 74 29 20 24 63 6f 64 65 5d 29 29 20 7b 0a 24 6f 75 74 20 2e 3d 20 27 62 61 63 6b 67 72 6f | int).$code])).{.$out..=.'backgro |
707a0 | 75 6e 64 2d 63 6f 6c 6f 72 3a 27 2e 73 65 6c 66 3a 3a 24 61 76 61 69 6c 61 62 6c 65 42 61 63 6b | und-color:'.self::$availableBack |
707c0 | 67 72 6f 75 6e 64 43 6f 6c 6f 72 73 5b 28 69 6e 74 29 20 24 63 6f 64 65 5d 2e 27 3b 27 3b 0a 7d | groundColors[(int).$code].';';.} |
707e0 | 20 65 6c 73 65 69 66 20 28 69 73 73 65 74 28 73 65 6c 66 3a 3a 24 61 76 61 69 6c 61 62 6c 65 4f | .elseif.(isset(self::$availableO |
70800 | 70 74 69 6f 6e 73 5b 28 69 6e 74 29 20 24 63 6f 64 65 5d 29 29 20 7b 0a 73 77 69 74 63 68 20 28 | ptions[(int).$code])).{.switch.( |
70820 | 73 65 6c 66 3a 3a 24 61 76 61 69 6c 61 62 6c 65 4f 70 74 69 6f 6e 73 5b 28 69 6e 74 29 20 24 63 | self::$availableOptions[(int).$c |
70840 | 6f 64 65 5d 29 20 7b 0a 63 61 73 65 20 27 62 6f 6c 64 27 3a 0a 24 6f 75 74 20 2e 3d 20 27 66 6f | ode]).{.case.'bold':.$out..=.'fo |
70860 | 6e 74 2d 77 65 69 67 68 74 3a 62 6f 6c 64 3b 27 3b 0a 62 72 65 61 6b 3b 0a 0a 63 61 73 65 20 27 | nt-weight:bold;';.break;..case.' |
70880 | 75 6e 64 65 72 73 63 6f 72 65 27 3a 0a 24 6f 75 74 20 2e 3d 20 27 74 65 78 74 2d 64 65 63 6f 72 | underscore':.$out..=.'text-decor |
708a0 | 61 74 69 6f 6e 3a 75 6e 64 65 72 6c 69 6e 65 3b 27 3b 0a 62 72 65 61 6b 3b 0a 7d 0a 7d 0a 7d 0a | ation:underline;';.break;.}.}.}. |
708c0 | 0a 72 65 74 75 72 6e 20 24 6f 75 74 2e 27 22 3e 27 2e 24 6d 61 74 63 68 65 73 5b 32 5d 2e 27 3c | .return.$out.'">'.$matches[2].'< |
708e0 | 2f 73 70 61 6e 3e 27 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 | /span>';.}.}.<?php.declare(stric |
70900 | 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 | t_types=1);............namespace |
70920 | 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 3b 0a 0a 75 73 65 20 53 79 | .Composer\Console\Input;..use.Sy |
70940 | 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 43 6f 6d 70 6c 65 74 69 | mfony\Component\Console\Completi |
70960 | 6f 6e 5c 43 6f 6d 70 6c 65 74 69 6f 6e 49 6e 70 75 74 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c | on\CompletionInput;.use.Symfony\ |
70980 | 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 43 6f 6d 70 6c 65 74 69 6f 6e 5c 43 6f 6d | Component\Console\Completion\Com |
709a0 | 70 6c 65 74 69 6f 6e 53 75 67 67 65 73 74 69 6f 6e 73 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c | pletionSuggestions;.use.Symfony\ |
709c0 | 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 43 6f 6d 70 6c 65 74 69 6f 6e 5c 53 75 67 | Component\Console\Completion\Sug |
709e0 | 67 65 73 74 69 6f 6e 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 | gestion;.use.Symfony\Component\C |
70a00 | 6f 6e 73 6f 6c 65 5c 45 78 63 65 70 74 69 6f 6e 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 | onsole\Exception\InvalidArgument |
70a20 | 45 78 63 65 70 74 69 6f 6e 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 | Exception;.use.Symfony\Component |
70a40 | 5c 43 6f 6e 73 6f 6c 65 5c 45 78 63 65 70 74 69 6f 6e 5c 4c 6f 67 69 63 45 78 63 65 70 74 69 6f | \Console\Exception\LogicExceptio |
70a60 | 6e 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 | n;.use.Symfony\Component\Console |
70a80 | 5c 49 6e 70 75 74 5c 49 6e 70 75 74 41 72 67 75 6d 65 6e 74 20 61 73 20 42 61 73 65 49 6e 70 75 | \Input\InputArgument.as.BaseInpu |
70aa0 | 74 41 72 67 75 6d 65 6e 74 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 49 6e 70 75 74 | tArgument;...........class.Input |
70ac0 | 41 72 67 75 6d 65 6e 74 20 65 78 74 65 6e 64 73 20 42 61 73 65 49 6e 70 75 74 41 72 67 75 6d 65 | Argument.extends.BaseInputArgume |
70ae0 | 6e 74 0a 7b 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 73 75 67 67 65 73 74 65 64 56 61 6c 75 65 73 | nt.{....private.$suggestedValues |
70b00 | 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f | ;...........public.function.__co |
70b20 | 6e 73 74 72 75 63 74 28 73 74 72 69 6e 67 20 24 6e 61 6d 65 2c 20 3f 69 6e 74 20 24 6d 6f 64 65 | nstruct(string.$name,.?int.$mode |
70b40 | 20 3d 20 6e 75 6c 6c 2c 20 73 74 72 69 6e 67 20 24 64 65 73 63 72 69 70 74 69 6f 6e 20 3d 20 27 | .=.null,.string.$description.=.' |
70b60 | 27 2c 20 24 64 65 66 61 75 6c 74 20 3d 20 6e 75 6c 6c 2c 20 24 73 75 67 67 65 73 74 65 64 56 61 | ',.$default.=.null,.$suggestedVa |
70b80 | 6c 75 65 73 20 3d 20 5b 5d 29 0a 7b 0a 70 61 72 65 6e 74 3a 3a 5f 5f 63 6f 6e 73 74 72 75 63 74 | lues.=.[]).{.parent::__construct |
70ba0 | 28 24 6e 61 6d 65 2c 20 24 6d 6f 64 65 2c 20 24 64 65 73 63 72 69 70 74 69 6f 6e 2c 20 24 64 65 | ($name,.$mode,.$description,.$de |
70bc0 | 66 61 75 6c 74 29 3b 0a 0a 24 74 68 69 73 2d 3e 73 75 67 67 65 73 74 65 64 56 61 6c 75 65 73 20 | fault);..$this->suggestedValues. |
70be0 | 3d 20 24 73 75 67 67 65 73 74 65 64 56 61 6c 75 65 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c | =.$suggestedValues;.}.......publ |
70c00 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 63 6f 6d 70 6c 65 74 65 28 43 6f 6d 70 6c 65 74 69 6f 6e 49 | ic.function.complete(CompletionI |
70c20 | 6e 70 75 74 20 24 69 6e 70 75 74 2c 20 43 6f 6d 70 6c 65 74 69 6f 6e 53 75 67 67 65 73 74 69 6f | nput.$input,.CompletionSuggestio |
70c40 | 6e 73 20 24 73 75 67 67 65 73 74 69 6f 6e 73 29 3a 20 76 6f 69 64 0a 7b 0a 24 76 61 6c 75 65 73 | ns.$suggestions):.void.{.$values |
70c60 | 20 3d 20 24 74 68 69 73 2d 3e 73 75 67 67 65 73 74 65 64 56 61 6c 75 65 73 3b 0a 69 66 20 28 24 | .=.$this->suggestedValues;.if.($ |
70c80 | 76 61 6c 75 65 73 20 69 6e 73 74 61 6e 63 65 6f 66 20 5c 43 6c 6f 73 75 72 65 20 26 26 20 21 5c | values.instanceof.\Closure.&&.!\ |
70ca0 | 69 73 5f 61 72 72 61 79 28 24 76 61 6c 75 65 73 20 3d 20 24 76 61 6c 75 65 73 28 24 69 6e 70 75 | is_array($values.=.$values($inpu |
70cc0 | 74 2c 20 24 73 75 67 67 65 73 74 69 6f 6e 73 29 29 29 20 7b 20 0a 74 68 72 6f 77 20 6e 65 77 20 | t,.$suggestions))).{..throw.new. |
70ce0 | 4c 6f 67 69 63 45 78 63 65 70 74 69 6f 6e 28 73 70 72 69 6e 74 66 28 27 43 6c 6f 73 75 72 65 20 | LogicException(sprintf('Closure. |
70d00 | 66 6f 72 20 6f 70 74 69 6f 6e 20 22 25 73 22 20 6d 75 73 74 20 72 65 74 75 72 6e 20 61 6e 20 61 | for.option."%s".must.return.an.a |
70d20 | 72 72 61 79 2e 20 47 6f 74 20 22 25 73 22 2e 27 2c 20 24 74 68 69 73 2d 3e 67 65 74 4e 61 6d 65 | rray..Got."%s".',.$this->getName |
70d40 | 28 29 2c 20 67 65 74 5f 64 65 62 75 67 5f 74 79 70 65 28 24 76 61 6c 75 65 73 29 29 29 3b 0a 7d | (),.get_debug_type($values)));.} |
70d60 | 0a 69 66 20 28 5b 5d 20 21 3d 3d 20 24 76 61 6c 75 65 73 29 20 7b 0a 24 73 75 67 67 65 73 74 69 | .if.([].!==.$values).{.$suggesti |
70d80 | 6f 6e 73 2d 3e 73 75 67 67 65 73 74 56 61 6c 75 65 73 28 24 76 61 6c 75 65 73 29 3b 0a 7d 0a 7d | ons->suggestValues($values);.}.} |
70da0 | 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 | .}.<?php.declare(strict_types=1) |
70dc0 | 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c | ;............namespace.Composer\ |
70de0 | 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 3b 0a 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 | Console\Input;..use.Symfony\Comp |
70e00 | 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 43 6f 6d 70 6c 65 74 69 6f 6e 5c 43 6f 6d 70 6c 65 74 | onent\Console\Completion\Complet |
70e20 | 69 6f 6e 49 6e 70 75 74 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c | ionInput;.use.Symfony\Component\ |
70e40 | 43 6f 6e 73 6f 6c 65 5c 43 6f 6d 70 6c 65 74 69 6f 6e 5c 43 6f 6d 70 6c 65 74 69 6f 6e 53 75 67 | Console\Completion\CompletionSug |
70e60 | 67 65 73 74 69 6f 6e 73 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c | gestions;.use.Symfony\Component\ |
70e80 | 43 6f 6e 73 6f 6c 65 5c 43 6f 6d 70 6c 65 74 69 6f 6e 5c 53 75 67 67 65 73 74 69 6f 6e 3b 0a 75 | Console\Completion\Suggestion;.u |
70ea0 | 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 45 78 63 | se.Symfony\Component\Console\Exc |
70ec0 | 65 70 74 69 6f 6e 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 3b | eption\InvalidArgumentException; |
70ee0 | 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 45 | .use.Symfony\Component\Console\E |
70f00 | 78 63 65 70 74 69 6f 6e 5c 4c 6f 67 69 63 45 78 63 65 70 74 69 6f 6e 3b 0a 75 73 65 20 53 79 6d | xception\LogicException;.use.Sym |
70f20 | 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 | fony\Component\Console\Input\Inp |
70f40 | 75 74 4f 70 74 69 6f 6e 20 61 73 20 42 61 73 65 49 6e 70 75 74 4f 70 74 69 6f 6e 3b 0a 0a 0a 0a | utOption.as.BaseInputOption;.... |
70f60 | 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 49 6e 70 75 74 4f 70 74 69 6f 6e 20 65 78 74 65 6e 64 73 | .......class.InputOption.extends |
70f80 | 20 42 61 73 65 49 6e 70 75 74 4f 70 74 69 6f 6e 0a 7b 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 73 | .BaseInputOption.{....private.$s |
70fa0 | 75 67 67 65 73 74 65 64 56 61 6c 75 65 73 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 | uggestedValues;..........public. |
70fc0 | 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 73 74 72 69 6e 67 20 24 6e 61 6d | function.__construct(string.$nam |
70fe0 | 65 2c 20 24 73 68 6f 72 74 63 75 74 20 3d 20 6e 75 6c 6c 2c 20 3f 69 6e 74 20 24 6d 6f 64 65 20 | e,.$shortcut.=.null,.?int.$mode. |
71000 | 3d 20 6e 75 6c 6c 2c 20 73 74 72 69 6e 67 20 24 64 65 73 63 72 69 70 74 69 6f 6e 20 3d 20 27 27 | =.null,.string.$description.=.'' |
71020 | 2c 20 24 64 65 66 61 75 6c 74 20 3d 20 6e 75 6c 6c 2c 20 24 73 75 67 67 65 73 74 65 64 56 61 6c | ,.$default.=.null,.$suggestedVal |
71040 | 75 65 73 20 3d 20 5b 5d 29 0a 7b 0a 70 61 72 65 6e 74 3a 3a 5f 5f 63 6f 6e 73 74 72 75 63 74 28 | ues.=.[]).{.parent::__construct( |
71060 | 24 6e 61 6d 65 2c 20 24 73 68 6f 72 74 63 75 74 2c 20 24 6d 6f 64 65 2c 20 24 64 65 73 63 72 69 | $name,.$shortcut,.$mode,.$descri |
71080 | 70 74 69 6f 6e 2c 20 24 64 65 66 61 75 6c 74 29 3b 0a 0a 24 74 68 69 73 2d 3e 73 75 67 67 65 73 | ption,.$default);..$this->sugges |
710a0 | 74 65 64 56 61 6c 75 65 73 20 3d 20 24 73 75 67 67 65 73 74 65 64 56 61 6c 75 65 73 3b 0a 0a 69 | tedValues.=.$suggestedValues;..i |
710c0 | 66 20 28 5b 5d 20 21 3d 3d 20 24 73 75 67 67 65 73 74 65 64 56 61 6c 75 65 73 20 26 26 20 21 24 | f.([].!==.$suggestedValues.&&.!$ |
710e0 | 74 68 69 73 2d 3e 61 63 63 65 70 74 56 61 6c 75 65 28 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 | this->acceptValue()).{.throw.new |
71100 | 20 4c 6f 67 69 63 45 78 63 65 70 74 69 6f 6e 28 27 43 61 6e 6e 6f 74 20 73 65 74 20 73 75 67 67 | .LogicException('Cannot.set.sugg |
71120 | 65 73 74 65 64 20 76 61 6c 75 65 73 20 69 66 20 74 68 65 20 6f 70 74 69 6f 6e 20 64 6f 65 73 20 | ested.values.if.the.option.does. |
71140 | 6e 6f 74 20 61 63 63 65 70 74 20 61 20 76 61 6c 75 65 2e 27 29 3b 0a 7d 0a 7d 0a 0a 0a 0a 0a 0a | not.accept.a.value.');.}.}...... |
71160 | 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 63 6f 6d 70 6c 65 74 65 28 43 6f 6d 70 6c 65 | .public.function.complete(Comple |
71180 | 74 69 6f 6e 49 6e 70 75 74 20 24 69 6e 70 75 74 2c 20 43 6f 6d 70 6c 65 74 69 6f 6e 53 75 67 67 | tionInput.$input,.CompletionSugg |
711a0 | 65 73 74 69 6f 6e 73 20 24 73 75 67 67 65 73 74 69 6f 6e 73 29 3a 20 76 6f 69 64 0a 7b 0a 24 76 | estions.$suggestions):.void.{.$v |
711c0 | 61 6c 75 65 73 20 3d 20 24 74 68 69 73 2d 3e 73 75 67 67 65 73 74 65 64 56 61 6c 75 65 73 3b 0a | alues.=.$this->suggestedValues;. |
711e0 | 69 66 20 28 24 76 61 6c 75 65 73 20 69 6e 73 74 61 6e 63 65 6f 66 20 5c 43 6c 6f 73 75 72 65 20 | if.($values.instanceof.\Closure. |
71200 | 26 26 20 21 5c 69 73 5f 61 72 72 61 79 28 24 76 61 6c 75 65 73 20 3d 20 24 76 61 6c 75 65 73 28 | &&.!\is_array($values.=.$values( |
71220 | 24 69 6e 70 75 74 2c 20 24 73 75 67 67 65 73 74 69 6f 6e 73 29 29 29 20 7b 20 0a 74 68 72 6f 77 | $input,.$suggestions))).{..throw |
71240 | 20 6e 65 77 20 4c 6f 67 69 63 45 78 63 65 70 74 69 6f 6e 28 73 70 72 69 6e 74 66 28 27 43 6c 6f | .new.LogicException(sprintf('Clo |
71260 | 73 75 72 65 20 66 6f 72 20 61 72 67 75 6d 65 6e 74 20 22 25 73 22 20 6d 75 73 74 20 72 65 74 75 | sure.for.argument."%s".must.retu |
71280 | 72 6e 20 61 6e 20 61 72 72 61 79 2e 20 47 6f 74 20 22 25 73 22 2e 27 2c 20 24 74 68 69 73 2d 3e | rn.an.array..Got."%s".',.$this-> |
712a0 | 67 65 74 4e 61 6d 65 28 29 2c 20 67 65 74 5f 64 65 62 75 67 5f 74 79 70 65 28 24 76 61 6c 75 65 | getName(),.get_debug_type($value |
712c0 | 73 29 29 29 3b 0a 7d 0a 69 66 20 28 5b 5d 20 21 3d 3d 20 24 76 61 6c 75 65 73 29 20 7b 0a 24 73 | s)));.}.if.([].!==.$values).{.$s |
712e0 | 75 67 67 65 73 74 69 6f 6e 73 2d 3e 73 75 67 67 65 73 74 56 61 6c 75 65 73 28 24 76 61 6c 75 65 | uggestions->suggestValues($value |
71300 | 73 29 3b 0a 7d 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 | s);.}.}.}.<?php.declare(strict_t |
71320 | 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f | ypes=1);............namespace.Co |
71340 | 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 3b 0a 0a 0a 0a 0a 0a | mposer\DependencyResolver;...... |
71360 | 0a 0a 63 6c 61 73 73 20 44 65 63 69 73 69 6f 6e 73 20 69 6d 70 6c 65 6d 65 6e 74 73 20 5c 49 74 | ..class.Decisions.implements.\It |
71380 | 65 72 61 74 6f 72 2c 20 5c 43 6f 75 6e 74 61 62 6c 65 0a 7b 0a 70 75 62 6c 69 63 20 63 6f 6e 73 | erator,.\Countable.{.public.cons |
713a0 | 74 20 44 45 43 49 53 49 4f 4e 5f 4c 49 54 45 52 41 4c 20 3d 20 30 3b 0a 70 75 62 6c 69 63 20 63 | t.DECISION_LITERAL.=.0;.public.c |
713c0 | 6f 6e 73 74 20 44 45 43 49 53 49 4f 4e 5f 52 45 41 53 4f 4e 20 3d 20 31 3b 0a 0a 0a 70 72 6f 74 | onst.DECISION_REASON.=.1;...prot |
713e0 | 65 63 74 65 64 20 24 70 6f 6f 6c 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 64 65 63 69 73 69 6f | ected.$pool;..protected.$decisio |
71400 | 6e 4d 61 70 3b 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 64 65 63 69 73 69 6f 6e 51 75 65 75 | nMap;....protected.$decisionQueu |
71420 | 65 20 3d 20 5b 5d 3b 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 | e.=.[];..public.function.__const |
71440 | 72 75 63 74 28 50 6f 6f 6c 20 24 70 6f 6f 6c 29 0a 7b 0a 24 74 68 69 73 2d 3e 70 6f 6f 6c 20 3d | ruct(Pool.$pool).{.$this->pool.= |
71460 | 20 24 70 6f 6f 6c 3b 0a 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 4d 61 70 20 3d 20 5b 5d 3b | .$pool;.$this->decisionMap.=.[]; |
71480 | 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 64 65 63 69 64 65 28 69 6e 74 20 24 | .}..public.function.decide(int.$ |
714a0 | 6c 69 74 65 72 61 6c 2c 20 69 6e 74 20 24 6c 65 76 65 6c 2c 20 52 75 6c 65 20 24 77 68 79 29 3a | literal,.int.$level,.Rule.$why): |
714c0 | 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 61 64 64 44 65 63 69 73 69 6f 6e 28 24 6c 69 74 65 | .void.{.$this->addDecision($lite |
714e0 | 72 61 6c 2c 20 24 6c 65 76 65 6c 29 3b 0a 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 51 75 65 | ral,.$level);.$this->decisionQue |
71500 | 75 65 5b 5d 20 3d 20 5b 0a 73 65 6c 66 3a 3a 44 45 43 49 53 49 4f 4e 5f 4c 49 54 45 52 41 4c 20 | ue[].=.[.self::DECISION_LITERAL. |
71520 | 3d 3e 20 24 6c 69 74 65 72 61 6c 2c 0a 73 65 6c 66 3a 3a 44 45 43 49 53 49 4f 4e 5f 52 45 41 53 | =>.$literal,.self::DECISION_REAS |
71540 | 4f 4e 20 3d 3e 20 24 77 68 79 2c 0a 5d 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f | ON.=>.$why,.];.}..public.functio |
71560 | 6e 20 73 61 74 69 73 66 79 28 69 6e 74 20 24 6c 69 74 65 72 61 6c 29 3a 20 62 6f 6f 6c 0a 7b 0a | n.satisfy(int.$literal):.bool.{. |
71580 | 24 70 61 63 6b 61 67 65 49 64 20 3d 20 61 62 73 28 24 6c 69 74 65 72 61 6c 29 3b 0a 0a 72 65 74 | $packageId.=.abs($literal);..ret |
715a0 | 75 72 6e 20 28 0a 24 6c 69 74 65 72 61 6c 20 3e 20 30 20 26 26 20 69 73 73 65 74 28 24 74 68 69 | urn.(.$literal.>.0.&&.isset($thi |
715c0 | 73 2d 3e 64 65 63 69 73 69 6f 6e 4d 61 70 5b 24 70 61 63 6b 61 67 65 49 64 5d 29 20 26 26 20 24 | s->decisionMap[$packageId]).&&.$ |
715e0 | 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 4d 61 70 5b 24 70 61 63 6b 61 67 65 49 64 5d 20 3e 20 | this->decisionMap[$packageId].>. |
71600 | 30 20 7c 7c 0a 24 6c 69 74 65 72 61 6c 20 3c 20 30 20 26 26 20 69 73 73 65 74 28 24 74 68 69 73 | 0.||.$literal.<.0.&&.isset($this |
71620 | 2d 3e 64 65 63 69 73 69 6f 6e 4d 61 70 5b 24 70 61 63 6b 61 67 65 49 64 5d 29 20 26 26 20 24 74 | ->decisionMap[$packageId]).&&.$t |
71640 | 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 4d 61 70 5b 24 70 61 63 6b 61 67 65 49 64 5d 20 3c 20 30 | his->decisionMap[$packageId].<.0 |
71660 | 0a 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 63 6f 6e 66 6c 69 63 74 28 | .);.}..public.function.conflict( |
71680 | 69 6e 74 20 24 6c 69 74 65 72 61 6c 29 3a 20 62 6f 6f 6c 0a 7b 0a 24 70 61 63 6b 61 67 65 49 64 | int.$literal):.bool.{.$packageId |
716a0 | 20 3d 20 61 62 73 28 24 6c 69 74 65 72 61 6c 29 3b 0a 0a 72 65 74 75 72 6e 20 28 0a 28 69 73 73 | .=.abs($literal);..return.(.(iss |
716c0 | 65 74 28 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 4d 61 70 5b 24 70 61 63 6b 61 67 65 49 64 | et($this->decisionMap[$packageId |
716e0 | 5d 29 20 26 26 20 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 4d 61 70 5b 24 70 61 63 6b 61 67 | ]).&&.$this->decisionMap[$packag |
71700 | 65 49 64 5d 20 3e 20 30 20 26 26 20 24 6c 69 74 65 72 61 6c 20 3c 20 30 29 20 7c 7c 0a 28 69 73 | eId].>.0.&&.$literal.<.0).||.(is |
71720 | 73 65 74 28 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 4d 61 70 5b 24 70 61 63 6b 61 67 65 49 | set($this->decisionMap[$packageI |
71740 | 64 5d 29 20 26 26 20 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 4d 61 70 5b 24 70 61 63 6b 61 | d]).&&.$this->decisionMap[$packa |
71760 | 67 65 49 64 5d 20 3c 20 30 20 26 26 20 24 6c 69 74 65 72 61 6c 20 3e 20 30 29 0a 29 3b 0a 7d 0a | geId].<.0.&&.$literal.>.0).);.}. |
71780 | 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 64 65 63 69 64 65 64 28 69 6e 74 20 24 6c 69 | .public.function.decided(int.$li |
717a0 | 74 65 72 61 6c 4f 72 50 61 63 6b 61 67 65 49 64 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e | teralOrPackageId):.bool.{.return |
717c0 | 20 21 65 6d 70 74 79 28 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 4d 61 70 5b 61 62 73 28 24 | .!empty($this->decisionMap[abs($ |
717e0 | 6c 69 74 65 72 61 6c 4f 72 50 61 63 6b 61 67 65 49 64 29 5d 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 | literalOrPackageId)]);.}..public |
71800 | 20 66 75 6e 63 74 69 6f 6e 20 75 6e 64 65 63 69 64 65 64 28 69 6e 74 20 24 6c 69 74 65 72 61 6c | .function.undecided(int.$literal |
71820 | 4f 72 50 61 63 6b 61 67 65 49 64 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 65 6d 70 74 | OrPackageId):.bool.{.return.empt |
71840 | 79 28 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 4d 61 70 5b 61 62 73 28 24 6c 69 74 65 72 61 | y($this->decisionMap[abs($litera |
71860 | 6c 4f 72 50 61 63 6b 61 67 65 49 64 29 5d 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 | lOrPackageId)]);.}..public.funct |
71880 | 69 6f 6e 20 64 65 63 69 64 65 64 49 6e 73 74 61 6c 6c 28 69 6e 74 20 24 6c 69 74 65 72 61 6c 4f | ion.decidedInstall(int.$literalO |
718a0 | 72 50 61 63 6b 61 67 65 49 64 29 3a 20 62 6f 6f 6c 0a 7b 0a 24 70 61 63 6b 61 67 65 49 64 20 3d | rPackageId):.bool.{.$packageId.= |
718c0 | 20 61 62 73 28 24 6c 69 74 65 72 61 6c 4f 72 50 61 63 6b 61 67 65 49 64 29 3b 0a 0a 72 65 74 75 | .abs($literalOrPackageId);..retu |
718e0 | 72 6e 20 69 73 73 65 74 28 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 4d 61 70 5b 24 70 61 63 | rn.isset($this->decisionMap[$pac |
71900 | 6b 61 67 65 49 64 5d 29 20 26 26 20 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 4d 61 70 5b 24 | kageId]).&&.$this->decisionMap[$ |
71920 | 70 61 63 6b 61 67 65 49 64 5d 20 3e 20 30 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 | packageId].>.0;.}..public.functi |
71940 | 6f 6e 20 64 65 63 69 73 69 6f 6e 4c 65 76 65 6c 28 69 6e 74 20 24 6c 69 74 65 72 61 6c 4f 72 50 | on.decisionLevel(int.$literalOrP |
71960 | 61 63 6b 61 67 65 49 64 29 3a 20 69 6e 74 0a 7b 0a 24 70 61 63 6b 61 67 65 49 64 20 3d 20 61 62 | ackageId):.int.{.$packageId.=.ab |
71980 | 73 28 24 6c 69 74 65 72 61 6c 4f 72 50 61 63 6b 61 67 65 49 64 29 3b 0a 69 66 20 28 69 73 73 65 | s($literalOrPackageId);.if.(isse |
719a0 | 74 28 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 4d 61 70 5b 24 70 61 63 6b 61 67 65 49 64 5d | t($this->decisionMap[$packageId] |
719c0 | 29 29 20 7b 0a 72 65 74 75 72 6e 20 61 62 73 28 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 4d | )).{.return.abs($this->decisionM |
719e0 | 61 70 5b 24 70 61 63 6b 61 67 65 49 64 5d 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a | ap[$packageId]);.}..return.0;.}. |
71a00 | 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 64 65 63 69 73 69 6f 6e 52 75 6c 65 28 69 6e | .public.function.decisionRule(in |
71a20 | 74 20 24 6c 69 74 65 72 61 6c 4f 72 50 61 63 6b 61 67 65 49 64 29 3a 20 3f 52 75 6c 65 0a 7b 0a | t.$literalOrPackageId):.?Rule.{. |
71a40 | 24 70 61 63 6b 61 67 65 49 64 20 3d 20 61 62 73 28 24 6c 69 74 65 72 61 6c 4f 72 50 61 63 6b 61 | $packageId.=.abs($literalOrPacka |
71a60 | 67 65 49 64 29 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e | geId);..foreach.($this->decision |
71a80 | 51 75 65 75 65 20 61 73 20 24 64 65 63 69 73 69 6f 6e 29 20 7b 0a 69 66 20 28 24 70 61 63 6b 61 | Queue.as.$decision).{.if.($packa |
71aa0 | 67 65 49 64 20 3d 3d 3d 20 61 62 73 28 24 64 65 63 69 73 69 6f 6e 5b 73 65 6c 66 3a 3a 44 45 43 | geId.===.abs($decision[self::DEC |
71ac0 | 49 53 49 4f 4e 5f 4c 49 54 45 52 41 4c 5d 29 29 20 7b 0a 72 65 74 75 72 6e 20 24 64 65 63 69 73 | ISION_LITERAL])).{.return.$decis |
71ae0 | 69 6f 6e 5b 73 65 6c 66 3a 3a 44 45 43 49 53 49 4f 4e 5f 52 45 41 53 4f 4e 5d 3b 0a 7d 0a 7d 0a | ion[self::DECISION_REASON];.}.}. |
71b00 | 0a 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 | .return.null;.}.....public.funct |
71b20 | 69 6f 6e 20 61 74 4f 66 66 73 65 74 28 69 6e 74 20 24 71 75 65 75 65 4f 66 66 73 65 74 29 3a 20 | ion.atOffset(int.$queueOffset):. |
71b40 | 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 51 75 | array.{.return.$this->decisionQu |
71b60 | 65 75 65 5b 24 71 75 65 75 65 4f 66 66 73 65 74 5d 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e | eue[$queueOffset];.}..public.fun |
71b80 | 63 74 69 6f 6e 20 76 61 6c 69 64 4f 66 66 73 65 74 28 69 6e 74 20 24 71 75 65 75 65 4f 66 66 73 | ction.validOffset(int.$queueOffs |
71ba0 | 65 74 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 24 71 75 65 75 65 4f 66 66 73 65 74 20 | et):.bool.{.return.$queueOffset. |
71bc0 | 3e 3d 20 30 20 26 26 20 24 71 75 65 75 65 4f 66 66 73 65 74 20 3c 20 5c 63 6f 75 6e 74 28 24 74 | >=.0.&&.$queueOffset.<.\count($t |
71be0 | 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 51 75 65 75 65 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 | his->decisionQueue);.}..public.f |
71c00 | 75 6e 63 74 69 6f 6e 20 6c 61 73 74 52 65 61 73 6f 6e 28 29 3a 20 52 75 6c 65 0a 7b 0a 72 65 74 | unction.lastReason():.Rule.{.ret |
71c20 | 75 72 6e 20 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 51 75 65 75 65 5b 5c 63 6f 75 6e 74 28 | urn.$this->decisionQueue[\count( |
71c40 | 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 51 75 65 75 65 29 20 2d 20 31 5d 5b 73 65 6c 66 3a | $this->decisionQueue).-.1][self: |
71c60 | 3a 44 45 43 49 53 49 4f 4e 5f 52 45 41 53 4f 4e 5d 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e | :DECISION_REASON];.}..public.fun |
71c80 | 63 74 69 6f 6e 20 6c 61 73 74 4c 69 74 65 72 61 6c 28 29 3a 20 69 6e 74 0a 7b 0a 72 65 74 75 72 | ction.lastLiteral():.int.{.retur |
71ca0 | 6e 20 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 51 75 65 75 65 5b 5c 63 6f 75 6e 74 28 24 74 | n.$this->decisionQueue[\count($t |
71cc0 | 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 51 75 65 75 65 29 20 2d 20 31 5d 5b 73 65 6c 66 3a 3a 44 | his->decisionQueue).-.1][self::D |
71ce0 | 45 43 49 53 49 4f 4e 5f 4c 49 54 45 52 41 4c 5d 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 | ECISION_LITERAL];.}..public.func |
71d00 | 74 69 6f 6e 20 72 65 73 65 74 28 29 3a 20 76 6f 69 64 0a 7b 0a 77 68 69 6c 65 20 28 24 64 65 63 | tion.reset():.void.{.while.($dec |
71d20 | 69 73 69 6f 6e 20 3d 20 61 72 72 61 79 5f 70 6f 70 28 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f | ision.=.array_pop($this->decisio |
71d40 | 6e 51 75 65 75 65 29 29 20 7b 0a 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 4d 61 70 5b 61 62 | nQueue)).{.$this->decisionMap[ab |
71d60 | 73 28 24 64 65 63 69 73 69 6f 6e 5b 73 65 6c 66 3a 3a 44 45 43 49 53 49 4f 4e 5f 4c 49 54 45 52 | s($decision[self::DECISION_LITER |
71d80 | 41 4c 5d 29 5d 20 3d 20 30 3b 0a 7d 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 | AL])].=.0;.}.}..public.function. |
71da0 | 72 65 73 65 74 54 6f 4f 66 66 73 65 74 28 69 6e 74 20 24 6f 66 66 73 65 74 29 3a 20 76 6f 69 64 | resetToOffset(int.$offset):.void |
71dc0 | 0a 7b 0a 77 68 69 6c 65 20 28 5c 63 6f 75 6e 74 28 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e | .{.while.(\count($this->decision |
71de0 | 51 75 65 75 65 29 20 3e 20 24 6f 66 66 73 65 74 20 2b 20 31 29 20 7b 0a 24 64 65 63 69 73 69 6f | Queue).>.$offset.+.1).{.$decisio |
71e00 | 6e 20 3d 20 61 72 72 61 79 5f 70 6f 70 28 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 51 75 65 | n.=.array_pop($this->decisionQue |
71e20 | 75 65 29 3b 0a 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 4d 61 70 5b 61 62 73 28 24 64 65 63 | ue);.$this->decisionMap[abs($dec |
71e40 | 69 73 69 6f 6e 5b 73 65 6c 66 3a 3a 44 45 43 49 53 49 4f 4e 5f 4c 49 54 45 52 41 4c 5d 29 5d 20 | ision[self::DECISION_LITERAL])]. |
71e60 | 3d 20 30 3b 0a 7d 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 72 65 76 65 72 74 | =.0;.}.}..public.function.revert |
71e80 | 4c 61 73 74 28 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 4d 61 | Last():.void.{.$this->decisionMa |
71ea0 | 70 5b 61 62 73 28 24 74 68 69 73 2d 3e 6c 61 73 74 4c 69 74 65 72 61 6c 28 29 29 5d 20 3d 20 30 | p[abs($this->lastLiteral())].=.0 |
71ec0 | 3b 0a 61 72 72 61 79 5f 70 6f 70 28 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 51 75 65 75 65 | ;.array_pop($this->decisionQueue |
71ee0 | 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 63 6f 75 6e 74 28 29 3a 20 69 | );.}..public.function.count():.i |
71f00 | 6e 74 0a 7b 0a 72 65 74 75 72 6e 20 5c 63 6f 75 6e 74 28 24 74 68 69 73 2d 3e 64 65 63 69 73 69 | nt.{.return.\count($this->decisi |
71f20 | 6f 6e 51 75 65 75 65 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 72 65 77 | onQueue);.}..public.function.rew |
71f40 | 69 6e 64 28 29 3a 20 76 6f 69 64 0a 7b 0a 65 6e 64 28 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f | ind():.void.{.end($this->decisio |
71f60 | 6e 51 75 65 75 65 29 3b 0a 7d 0a 0a 0a 0a 0a 23 5b 5c 52 65 74 75 72 6e 54 79 70 65 57 69 6c 6c | nQueue);.}.....#[\ReturnTypeWill |
71f80 | 43 68 61 6e 67 65 5d 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 63 75 72 72 65 6e 74 28 | Change].public.function.current( |
71fa0 | 29 0a 7b 0a 72 65 74 75 72 6e 20 63 75 72 72 65 6e 74 28 24 74 68 69 73 2d 3e 64 65 63 69 73 69 | ).{.return.current($this->decisi |
71fc0 | 6f 6e 51 75 65 75 65 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 6b 65 79 | onQueue);.}..public.function.key |
71fe0 | 28 29 3a 20 3f 69 6e 74 0a 7b 0a 72 65 74 75 72 6e 20 6b 65 79 28 24 74 68 69 73 2d 3e 64 65 63 | ():.?int.{.return.key($this->dec |
72000 | 69 73 69 6f 6e 51 75 65 75 65 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 | isionQueue);.}..public.function. |
72020 | 6e 65 78 74 28 29 3a 20 76 6f 69 64 0a 7b 0a 70 72 65 76 28 24 74 68 69 73 2d 3e 64 65 63 69 73 | next():.void.{.prev($this->decis |
72040 | 69 6f 6e 51 75 65 75 65 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 76 61 | ionQueue);.}..public.function.va |
72060 | 6c 69 64 28 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 20 21 3d 3d 20 63 | lid():.bool.{.return.false.!==.c |
72080 | 75 72 72 65 6e 74 28 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 51 75 65 75 65 29 3b 0a 7d 0a | urrent($this->decisionQueue);.}. |
720a0 | 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 45 6d 70 74 79 28 29 3a 20 62 6f 6f 6c | .public.function.isEmpty():.bool |
720c0 | 0a 7b 0a 72 65 74 75 72 6e 20 5c 63 6f 75 6e 74 28 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e | .{.return.\count($this->decision |
720e0 | 51 75 65 75 65 29 20 3d 3d 3d 20 30 3b 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 | Queue).===.0;.}..protected.funct |
72100 | 69 6f 6e 20 61 64 64 44 65 63 69 73 69 6f 6e 28 69 6e 74 20 24 6c 69 74 65 72 61 6c 2c 20 69 6e | ion.addDecision(int.$literal,.in |
72120 | 74 20 24 6c 65 76 65 6c 29 3a 20 76 6f 69 64 0a 7b 0a 24 70 61 63 6b 61 67 65 49 64 20 3d 20 61 | t.$level):.void.{.$packageId.=.a |
72140 | 62 73 28 24 6c 69 74 65 72 61 6c 29 3b 0a 0a 24 70 72 65 76 69 6f 75 73 44 65 63 69 73 69 6f 6e | bs($literal);..$previousDecision |
72160 | 20 3d 20 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 4d 61 70 5b 24 70 61 63 6b 61 67 65 49 64 | .=.$this->decisionMap[$packageId |
72180 | 5d 20 3f 3f 20 30 3b 0a 69 66 20 28 24 70 72 65 76 69 6f 75 73 44 65 63 69 73 69 6f 6e 20 21 3d | ].??.0;.if.($previousDecision.!= |
721a0 | 3d 20 30 29 20 7b 0a 24 6c 69 74 65 72 61 6c 53 74 72 69 6e 67 20 3d 20 24 74 68 69 73 2d 3e 70 | =.0).{.$literalString.=.$this->p |
721c0 | 6f 6f 6c 2d 3e 6c 69 74 65 72 61 6c 54 6f 50 72 65 74 74 79 53 74 72 69 6e 67 28 24 6c 69 74 65 | ool->literalToPrettyString($lite |
721e0 | 72 61 6c 2c 20 5b 5d 29 3b 0a 24 70 61 63 6b 61 67 65 20 3d 20 24 74 68 69 73 2d 3e 70 6f 6f 6c | ral,.[]);.$package.=.$this->pool |
72200 | 2d 3e 6c 69 74 65 72 61 6c 54 6f 50 61 63 6b 61 67 65 28 24 6c 69 74 65 72 61 6c 29 3b 0a 74 68 | ->literalToPackage($literal);.th |
72220 | 72 6f 77 20 6e 65 77 20 53 6f 6c 76 65 72 42 75 67 45 78 63 65 70 74 69 6f 6e 28 0a 22 54 72 79 | row.new.SolverBugException(."Try |
72240 | 69 6e 67 20 74 6f 20 64 65 63 69 64 65 20 24 6c 69 74 65 72 61 6c 53 74 72 69 6e 67 20 6f 6e 20 | ing.to.decide.$literalString.on. |
72260 | 6c 65 76 65 6c 20 24 6c 65 76 65 6c 2c 20 65 76 65 6e 20 74 68 6f 75 67 68 20 24 70 61 63 6b 61 | level.$level,.even.though.$packa |
72280 | 67 65 20 77 61 73 20 70 72 65 76 69 6f 75 73 6c 79 20 64 65 63 69 64 65 64 20 61 73 20 22 2e 24 | ge.was.previously.decided.as.".$ |
722a0 | 70 72 65 76 69 6f 75 73 44 65 63 69 73 69 6f 6e 2e 22 2e 22 0a 29 3b 0a 7d 0a 0a 69 66 20 28 24 | previousDecision.".".);.}..if.($ |
722c0 | 6c 69 74 65 72 61 6c 20 3e 20 30 29 20 7b 0a 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 4d 61 | literal.>.0).{.$this->decisionMa |
722e0 | 70 5b 24 70 61 63 6b 61 67 65 49 64 5d 20 3d 20 24 6c 65 76 65 6c 3b 0a 7d 20 65 6c 73 65 20 7b | p[$packageId].=.$level;.}.else.{ |
72300 | 0a 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 4d 61 70 5b 24 70 61 63 6b 61 67 65 49 64 5d 20 | .$this->decisionMap[$packageId]. |
72320 | 3d 20 2d 24 6c 65 76 65 6c 3b 0a 7d 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 | =.-$level;.}.}..public.function. |
72340 | 74 6f 53 74 72 69 6e 67 28 3f 50 6f 6f 6c 20 24 70 6f 6f 6c 20 3d 20 6e 75 6c 6c 29 3a 20 73 74 | toString(?Pool.$pool.=.null):.st |
72360 | 72 69 6e 67 0a 7b 0a 24 64 65 63 69 73 69 6f 6e 4d 61 70 20 3d 20 24 74 68 69 73 2d 3e 64 65 63 | ring.{.$decisionMap.=.$this->dec |
72380 | 69 73 69 6f 6e 4d 61 70 3b 0a 6b 73 6f 72 74 28 24 64 65 63 69 73 69 6f 6e 4d 61 70 29 3b 0a 24 | isionMap;.ksort($decisionMap);.$ |
723a0 | 73 74 72 20 3d 20 27 5b 27 3b 0a 66 6f 72 65 61 63 68 20 28 24 64 65 63 69 73 69 6f 6e 4d 61 70 | str.=.'[';.foreach.($decisionMap |
723c0 | 20 61 73 20 24 70 61 63 6b 61 67 65 49 64 20 3d 3e 20 24 6c 65 76 65 6c 29 20 7b 0a 24 73 74 72 | .as.$packageId.=>.$level).{.$str |
723e0 | 20 2e 3d 20 28 28 24 70 6f 6f 6c 29 20 3f 20 24 70 6f 6f 6c 2d 3e 6c 69 74 65 72 61 6c 54 6f 50 | ..=.(($pool).?.$pool->literalToP |
72400 | 61 63 6b 61 67 65 28 24 70 61 63 6b 61 67 65 49 64 29 20 3a 20 24 70 61 63 6b 61 67 65 49 64 29 | ackage($packageId).:.$packageId) |
72420 | 2e 27 3a 27 2e 24 6c 65 76 65 6c 2e 27 2c 27 3b 0a 7d 0a 24 73 74 72 20 2e 3d 20 27 5d 27 3b 0a | .':'.$level.',';.}.$str..=.']';. |
72440 | 0a 72 65 74 75 72 6e 20 24 73 74 72 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e | .return.$str;.}..public.function |
72460 | 20 5f 5f 74 6f 53 74 72 69 6e 67 28 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 24 | .__toString():.string.{.return.$ |
72480 | 74 68 69 73 2d 3e 74 6f 53 74 72 69 6e 67 28 29 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c | this->toString();.}.}.<?php.decl |
724a0 | 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a | are(strict_types=1);............ |
724c0 | 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 | namespace.Composer\DependencyRes |
724e0 | 6f 6c 76 65 72 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 41 6c 69 | olver;..use.Composer\Package\Ali |
72500 | 61 73 50 61 63 6b 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c | asPackage;.use.Composer\Package\ |
72520 | 42 61 73 65 50 61 63 6b 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 | BasePackage;.use.Composer\Packag |
72540 | 65 5c 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 | e\PackageInterface;.use.Composer |
72560 | 5c 53 65 6d 76 65 72 5c 43 6f 6e 73 74 72 61 69 6e 74 5c 43 6f 6e 73 74 72 61 69 6e 74 3b 0a 0a | \Semver\Constraint\Constraint;.. |
72580 | 0a 0a 0a 0a 63 6c 61 73 73 20 44 65 66 61 75 6c 74 50 6f 6c 69 63 79 20 69 6d 70 6c 65 6d 65 6e | ....class.DefaultPolicy.implemen |
725a0 | 74 73 20 50 6f 6c 69 63 79 49 6e 74 65 72 66 61 63 65 0a 7b 0a 0a 70 72 69 76 61 74 65 20 24 70 | ts.PolicyInterface.{..private.$p |
725c0 | 72 65 66 65 72 53 74 61 62 6c 65 3b 0a 0a 70 72 69 76 61 74 65 20 24 70 72 65 66 65 72 4c 6f 77 | referStable;..private.$preferLow |
725e0 | 65 73 74 3b 0a 0a 70 72 69 76 61 74 65 20 24 70 72 65 66 65 72 72 65 64 50 61 63 6b 61 67 65 52 | est;..private.$preferredPackageR |
72600 | 65 73 75 6c 74 43 61 63 68 65 50 65 72 50 6f 6f 6c 3b 0a 0a 70 72 69 76 61 74 65 20 24 73 6f 72 | esultCachePerPool;..private.$sor |
72620 | 74 69 6e 67 43 61 63 68 65 50 65 72 50 6f 6f 6c 3b 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 | tingCachePerPool;..public.functi |
72640 | 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 62 6f 6f 6c 20 24 70 72 65 66 65 72 53 74 61 62 6c | on.__construct(bool.$preferStabl |
72660 | 65 20 3d 20 66 61 6c 73 65 2c 20 62 6f 6f 6c 20 24 70 72 65 66 65 72 4c 6f 77 65 73 74 20 3d 20 | e.=.false,.bool.$preferLowest.=. |
72680 | 66 61 6c 73 65 29 0a 7b 0a 24 74 68 69 73 2d 3e 70 72 65 66 65 72 53 74 61 62 6c 65 20 3d 20 24 | false).{.$this->preferStable.=.$ |
726a0 | 70 72 65 66 65 72 53 74 61 62 6c 65 3b 0a 24 74 68 69 73 2d 3e 70 72 65 66 65 72 4c 6f 77 65 73 | preferStable;.$this->preferLowes |
726c0 | 74 20 3d 20 24 70 72 65 66 65 72 4c 6f 77 65 73 74 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 | t.=.$preferLowest;.}.......publi |
726e0 | 63 20 66 75 6e 63 74 69 6f 6e 20 76 65 72 73 69 6f 6e 43 6f 6d 70 61 72 65 28 50 61 63 6b 61 67 | c.function.versionCompare(Packag |
72700 | 65 49 6e 74 65 72 66 61 63 65 20 24 61 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 | eInterface.$a,.PackageInterface. |
72720 | 24 62 2c 20 73 74 72 69 6e 67 20 24 6f 70 65 72 61 74 6f 72 29 3a 20 62 6f 6f 6c 0a 7b 0a 69 66 | $b,.string.$operator):.bool.{.if |
72740 | 20 28 24 74 68 69 73 2d 3e 70 72 65 66 65 72 53 74 61 62 6c 65 20 26 26 20 28 24 73 74 61 62 41 | .($this->preferStable.&&.($stabA |
72760 | 20 3d 20 24 61 2d 3e 67 65 74 53 74 61 62 69 6c 69 74 79 28 29 29 20 21 3d 3d 20 28 24 73 74 61 | .=.$a->getStability()).!==.($sta |
72780 | 62 42 20 3d 20 24 62 2d 3e 67 65 74 53 74 61 62 69 6c 69 74 79 28 29 29 29 20 7b 0a 72 65 74 75 | bB.=.$b->getStability())).{.retu |
727a0 | 72 6e 20 42 61 73 65 50 61 63 6b 61 67 65 3a 3a 24 73 74 61 62 69 6c 69 74 69 65 73 5b 24 73 74 | rn.BasePackage::$stabilities[$st |
727c0 | 61 62 41 5d 20 3c 20 42 61 73 65 50 61 63 6b 61 67 65 3a 3a 24 73 74 61 62 69 6c 69 74 69 65 73 | abA].<.BasePackage::$stabilities |
727e0 | 5b 24 73 74 61 62 42 5d 3b 0a 7d 0a 0a 24 63 6f 6e 73 74 72 61 69 6e 74 20 3d 20 6e 65 77 20 43 | [$stabB];.}..$constraint.=.new.C |
72800 | 6f 6e 73 74 72 61 69 6e 74 28 24 6f 70 65 72 61 74 6f 72 2c 20 24 62 2d 3e 67 65 74 56 65 72 73 | onstraint($operator,.$b->getVers |
72820 | 69 6f 6e 28 29 29 3b 0a 24 76 65 72 73 69 6f 6e 20 3d 20 6e 65 77 20 43 6f 6e 73 74 72 61 69 6e | ion());.$version.=.new.Constrain |
72840 | 74 28 27 3d 3d 27 2c 20 24 61 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 29 3b 0a 0a 72 65 74 75 | t('==',.$a->getVersion());..retu |
72860 | 72 6e 20 24 63 6f 6e 73 74 72 61 69 6e 74 2d 3e 6d 61 74 63 68 53 70 65 63 69 66 69 63 28 24 76 | rn.$constraint->matchSpecific($v |
72880 | 65 72 73 69 6f 6e 2c 20 74 72 75 65 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 | ersion,.true);.}.......public.fu |
728a0 | 6e 63 74 69 6f 6e 20 73 65 6c 65 63 74 50 72 65 66 65 72 72 65 64 50 61 63 6b 61 67 65 73 28 50 | nction.selectPreferredPackages(P |
728c0 | 6f 6f 6c 20 24 70 6f 6f 6c 2c 20 61 72 72 61 79 20 24 6c 69 74 65 72 61 6c 73 2c 20 3f 73 74 72 | ool.$pool,.array.$literals,.?str |
728e0 | 69 6e 67 20 24 72 65 71 75 69 72 65 64 50 61 63 6b 61 67 65 20 3d 20 6e 75 6c 6c 29 3a 20 61 72 | ing.$requiredPackage.=.null):.ar |
72900 | 72 61 79 0a 7b 0a 73 6f 72 74 28 24 6c 69 74 65 72 61 6c 73 29 3b 0a 24 72 65 73 75 6c 74 43 61 | ray.{.sort($literals);.$resultCa |
72920 | 63 68 65 4b 65 79 20 3d 20 69 6d 70 6c 6f 64 65 28 27 2c 27 2c 20 24 6c 69 74 65 72 61 6c 73 29 | cheKey.=.implode(',',.$literals) |
72940 | 2e 24 72 65 71 75 69 72 65 64 50 61 63 6b 61 67 65 3b 0a 24 70 6f 6f 6c 49 64 20 3d 20 73 70 6c | .$requiredPackage;.$poolId.=.spl |
72960 | 5f 6f 62 6a 65 63 74 5f 69 64 28 24 70 6f 6f 6c 29 3b 0a 0a 69 66 20 28 69 73 73 65 74 28 24 74 | _object_id($pool);..if.(isset($t |
72980 | 68 69 73 2d 3e 70 72 65 66 65 72 72 65 64 50 61 63 6b 61 67 65 52 65 73 75 6c 74 43 61 63 68 65 | his->preferredPackageResultCache |
729a0 | 50 65 72 50 6f 6f 6c 5b 24 70 6f 6f 6c 49 64 5d 5b 24 72 65 73 75 6c 74 43 61 63 68 65 4b 65 79 | PerPool[$poolId][$resultCacheKey |
729c0 | 5d 29 29 20 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 70 72 65 66 65 72 72 65 64 50 61 63 | ])).{.return.$this->preferredPac |
729e0 | 6b 61 67 65 52 65 73 75 6c 74 43 61 63 68 65 50 65 72 50 6f 6f 6c 5b 24 70 6f 6f 6c 49 64 5d 5b | kageResultCachePerPool[$poolId][ |
72a00 | 24 72 65 73 75 6c 74 43 61 63 68 65 4b 65 79 5d 3b 0a 7d 0a 0a 24 70 61 63 6b 61 67 65 73 20 3d | $resultCacheKey];.}..$packages.= |
72a20 | 20 24 74 68 69 73 2d 3e 67 72 6f 75 70 4c 69 74 65 72 61 6c 73 42 79 4e 61 6d 65 28 24 70 6f 6f | .$this->groupLiteralsByName($poo |
72a40 | 6c 2c 20 24 6c 69 74 65 72 61 6c 73 29 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 | l,.$literals);..foreach.($packag |
72a60 | 65 73 20 61 73 20 26 24 6e 61 6d 65 4c 69 74 65 72 61 6c 73 29 20 7b 0a 75 73 6f 72 74 28 24 6e | es.as.&$nameLiterals).{.usort($n |
72a80 | 61 6d 65 4c 69 74 65 72 61 6c 73 2c 20 66 75 6e 63 74 69 6f 6e 20 28 24 61 2c 20 24 62 29 20 75 | ameLiterals,.function.($a,.$b).u |
72aa0 | 73 65 20 28 24 70 6f 6f 6c 2c 20 24 72 65 71 75 69 72 65 64 50 61 63 6b 61 67 65 2c 20 24 70 6f | se.($pool,.$requiredPackage,.$po |
72ac0 | 6f 6c 49 64 29 3a 20 69 6e 74 20 7b 0a 24 63 61 63 68 65 4b 65 79 20 3d 20 27 69 27 2e 24 61 2e | olId):.int.{.$cacheKey.=.'i'.$a. |
72ae0 | 27 2e 27 2e 24 62 2e 24 72 65 71 75 69 72 65 64 50 61 63 6b 61 67 65 3b 20 0a 0a 69 66 20 28 69 | '.'.$b.$requiredPackage;...if.(i |
72b00 | 73 73 65 74 28 24 74 68 69 73 2d 3e 73 6f 72 74 69 6e 67 43 61 63 68 65 50 65 72 50 6f 6f 6c 5b | sset($this->sortingCachePerPool[ |
72b20 | 24 70 6f 6f 6c 49 64 5d 5b 24 63 61 63 68 65 4b 65 79 5d 29 29 20 7b 0a 72 65 74 75 72 6e 20 24 | $poolId][$cacheKey])).{.return.$ |
72b40 | 74 68 69 73 2d 3e 73 6f 72 74 69 6e 67 43 61 63 68 65 50 65 72 50 6f 6f 6c 5b 24 70 6f 6f 6c 49 | this->sortingCachePerPool[$poolI |
72b60 | 64 5d 5b 24 63 61 63 68 65 4b 65 79 5d 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e | d][$cacheKey];.}..return.$this-> |
72b80 | 73 6f 72 74 69 6e 67 43 61 63 68 65 50 65 72 50 6f 6f 6c 5b 24 70 6f 6f 6c 49 64 5d 5b 24 63 61 | sortingCachePerPool[$poolId][$ca |
72ba0 | 63 68 65 4b 65 79 5d 20 3d 20 24 74 68 69 73 2d 3e 63 6f 6d 70 61 72 65 42 79 50 72 69 6f 72 69 | cheKey].=.$this->compareByPriori |
72bc0 | 74 79 28 24 70 6f 6f 6c 2c 20 24 70 6f 6f 6c 2d 3e 6c 69 74 65 72 61 6c 54 6f 50 61 63 6b 61 67 | ty($pool,.$pool->literalToPackag |
72be0 | 65 28 24 61 29 2c 20 24 70 6f 6f 6c 2d 3e 6c 69 74 65 72 61 6c 54 6f 50 61 63 6b 61 67 65 28 24 | e($a),.$pool->literalToPackage($ |
72c00 | 62 29 2c 20 24 72 65 71 75 69 72 65 64 50 61 63 6b 61 67 65 2c 20 74 72 75 65 29 3b 0a 7d 29 3b | b),.$requiredPackage,.true);.}); |
72c20 | 0a 7d 0a 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 73 20 61 73 20 26 24 73 6f 72 74 | .}..foreach.($packages.as.&$sort |
72c40 | 65 64 4c 69 74 65 72 61 6c 73 29 20 7b 0a 24 73 6f 72 74 65 64 4c 69 74 65 72 61 6c 73 20 3d 20 | edLiterals).{.$sortedLiterals.=. |
72c60 | 24 74 68 69 73 2d 3e 70 72 75 6e 65 54 6f 42 65 73 74 56 65 72 73 69 6f 6e 28 24 70 6f 6f 6c 2c | $this->pruneToBestVersion($pool, |
72c80 | 20 24 73 6f 72 74 65 64 4c 69 74 65 72 61 6c 73 29 3b 0a 24 73 6f 72 74 65 64 4c 69 74 65 72 61 | .$sortedLiterals);.$sortedLitera |
72ca0 | 6c 73 20 3d 20 24 74 68 69 73 2d 3e 70 72 75 6e 65 52 65 6d 6f 74 65 41 6c 69 61 73 65 73 28 24 | ls.=.$this->pruneRemoteAliases($ |
72cc0 | 70 6f 6f 6c 2c 20 24 73 6f 72 74 65 64 4c 69 74 65 72 61 6c 73 29 3b 0a 7d 0a 0a 24 73 65 6c 65 | pool,.$sortedLiterals);.}..$sele |
72ce0 | 63 74 65 64 20 3d 20 61 72 72 61 79 5f 6d 65 72 67 65 28 2e 2e 2e 61 72 72 61 79 5f 76 61 6c 75 | cted.=.array_merge(...array_valu |
72d00 | 65 73 28 24 70 61 63 6b 61 67 65 73 29 29 3b 0a 0a 0a 75 73 6f 72 74 28 24 73 65 6c 65 63 74 65 | es($packages));...usort($selecte |
72d20 | 64 2c 20 66 75 6e 63 74 69 6f 6e 20 28 24 61 2c 20 24 62 29 20 75 73 65 20 28 24 70 6f 6f 6c 2c | d,.function.($a,.$b).use.($pool, |
72d40 | 20 24 72 65 71 75 69 72 65 64 50 61 63 6b 61 67 65 2c 20 24 70 6f 6f 6c 49 64 29 3a 20 69 6e 74 | .$requiredPackage,.$poolId):.int |
72d60 | 20 7b 0a 24 63 61 63 68 65 4b 65 79 20 3d 20 24 61 2e 27 2e 27 2e 24 62 2e 24 72 65 71 75 69 72 | .{.$cacheKey.=.$a.'.'.$b.$requir |
72d80 | 65 64 50 61 63 6b 61 67 65 3b 20 0a 0a 69 66 20 28 69 73 73 65 74 28 24 74 68 69 73 2d 3e 73 6f | edPackage;...if.(isset($this->so |
72da0 | 72 74 69 6e 67 43 61 63 68 65 50 65 72 50 6f 6f 6c 5b 24 70 6f 6f 6c 49 64 5d 5b 24 63 61 63 68 | rtingCachePerPool[$poolId][$cach |
72dc0 | 65 4b 65 79 5d 29 29 20 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 73 6f 72 74 69 6e 67 43 | eKey])).{.return.$this->sortingC |
72de0 | 61 63 68 65 50 65 72 50 6f 6f 6c 5b 24 70 6f 6f 6c 49 64 5d 5b 24 63 61 63 68 65 4b 65 79 5d 3b | achePerPool[$poolId][$cacheKey]; |
72e00 | 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 73 6f 72 74 69 6e 67 43 61 63 68 65 50 65 | .}..return.$this->sortingCachePe |
72e20 | 72 50 6f 6f 6c 5b 24 70 6f 6f 6c 49 64 5d 5b 24 63 61 63 68 65 4b 65 79 5d 20 3d 20 24 74 68 69 | rPool[$poolId][$cacheKey].=.$thi |
72e40 | 73 2d 3e 63 6f 6d 70 61 72 65 42 79 50 72 69 6f 72 69 74 79 28 24 70 6f 6f 6c 2c 20 24 70 6f 6f | s->compareByPriority($pool,.$poo |
72e60 | 6c 2d 3e 6c 69 74 65 72 61 6c 54 6f 50 61 63 6b 61 67 65 28 24 61 29 2c 20 24 70 6f 6f 6c 2d 3e | l->literalToPackage($a),.$pool-> |
72e80 | 6c 69 74 65 72 61 6c 54 6f 50 61 63 6b 61 67 65 28 24 62 29 2c 20 24 72 65 71 75 69 72 65 64 50 | literalToPackage($b),.$requiredP |
72ea0 | 61 63 6b 61 67 65 29 3b 0a 7d 29 3b 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 70 72 65 66 | ackage);.});..return.$this->pref |
72ec0 | 65 72 72 65 64 50 61 63 6b 61 67 65 52 65 73 75 6c 74 43 61 63 68 65 50 65 72 50 6f 6f 6c 5b 24 | erredPackageResultCachePerPool[$ |
72ee0 | 70 6f 6f 6c 49 64 5d 5b 24 72 65 73 75 6c 74 43 61 63 68 65 4b 65 79 5d 20 3d 20 24 73 65 6c 65 | poolId][$resultCacheKey].=.$sele |
72f00 | 63 74 65 64 3b 0a 7d 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 | cted;.}......protected.function. |
72f20 | 67 72 6f 75 70 4c 69 74 65 72 61 6c 73 42 79 4e 61 6d 65 28 50 6f 6f 6c 20 24 70 6f 6f 6c 2c 20 | groupLiteralsByName(Pool.$pool,. |
72f40 | 61 72 72 61 79 20 24 6c 69 74 65 72 61 6c 73 29 3a 20 61 72 72 61 79 0a 7b 0a 24 70 61 63 6b 61 | array.$literals):.array.{.$packa |
72f60 | 67 65 73 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 6c 69 74 65 72 61 6c 73 20 61 73 20 | ges.=.[];.foreach.($literals.as. |
72f80 | 24 6c 69 74 65 72 61 6c 29 20 7b 0a 24 70 61 63 6b 61 67 65 4e 61 6d 65 20 3d 20 24 70 6f 6f 6c | $literal).{.$packageName.=.$pool |
72fa0 | 2d 3e 6c 69 74 65 72 61 6c 54 6f 50 61 63 6b 61 67 65 28 24 6c 69 74 65 72 61 6c 29 2d 3e 67 65 | ->literalToPackage($literal)->ge |
72fc0 | 74 4e 61 6d 65 28 29 3b 0a 0a 69 66 20 28 21 69 73 73 65 74 28 24 70 61 63 6b 61 67 65 73 5b 24 | tName();..if.(!isset($packages[$ |
72fe0 | 70 61 63 6b 61 67 65 4e 61 6d 65 5d 29 29 20 7b 0a 24 70 61 63 6b 61 67 65 73 5b 24 70 61 63 6b | packageName])).{.$packages[$pack |
73000 | 61 67 65 4e 61 6d 65 5d 20 3d 20 5b 5d 3b 0a 7d 0a 24 70 61 63 6b 61 67 65 73 5b 24 70 61 63 6b | ageName].=.[];.}.$packages[$pack |
73020 | 61 67 65 4e 61 6d 65 5d 5b 5d 20 3d 20 24 6c 69 74 65 72 61 6c 3b 0a 7d 0a 0a 72 65 74 75 72 6e | ageName][].=.$literal;.}..return |
73040 | 20 24 70 61 63 6b 61 67 65 73 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f | .$packages;.}.....public.functio |
73060 | 6e 20 63 6f 6d 70 61 72 65 42 79 50 72 69 6f 72 69 74 79 28 50 6f 6f 6c 20 24 70 6f 6f 6c 2c 20 | n.compareByPriority(Pool.$pool,. |
73080 | 42 61 73 65 50 61 63 6b 61 67 65 20 24 61 2c 20 42 61 73 65 50 61 63 6b 61 67 65 20 24 62 2c 20 | BasePackage.$a,.BasePackage.$b,. |
730a0 | 3f 73 74 72 69 6e 67 20 24 72 65 71 75 69 72 65 64 50 61 63 6b 61 67 65 20 3d 20 6e 75 6c 6c 2c | ?string.$requiredPackage.=.null, |
730c0 | 20 62 6f 6f 6c 20 24 69 67 6e 6f 72 65 52 65 70 6c 61 63 65 20 3d 20 66 61 6c 73 65 29 3a 20 69 | .bool.$ignoreReplace.=.false):.i |
730e0 | 6e 74 0a 7b 0a 0a 69 66 20 28 24 61 2d 3e 67 65 74 4e 61 6d 65 28 29 20 3d 3d 3d 20 24 62 2d 3e | nt.{..if.($a->getName().===.$b-> |
73100 | 67 65 74 4e 61 6d 65 28 29 29 20 7b 0a 24 61 41 6c 69 61 73 65 64 20 3d 20 24 61 20 69 6e 73 74 | getName()).{.$aAliased.=.$a.inst |
73120 | 61 6e 63 65 6f 66 20 41 6c 69 61 73 50 61 63 6b 61 67 65 3b 0a 24 62 41 6c 69 61 73 65 64 20 3d | anceof.AliasPackage;.$bAliased.= |
73140 | 20 24 62 20 69 6e 73 74 61 6e 63 65 6f 66 20 41 6c 69 61 73 50 61 63 6b 61 67 65 3b 0a 69 66 20 | .$b.instanceof.AliasPackage;.if. |
73160 | 28 24 61 41 6c 69 61 73 65 64 20 26 26 20 21 24 62 41 6c 69 61 73 65 64 29 20 7b 0a 72 65 74 75 | ($aAliased.&&.!$bAliased).{.retu |
73180 | 72 6e 20 2d 31 3b 20 0a 7d 0a 69 66 20 28 21 24 61 41 6c 69 61 73 65 64 20 26 26 20 24 62 41 6c | rn.-1;..}.if.(!$aAliased.&&.$bAl |
731a0 | 69 61 73 65 64 29 20 7b 0a 72 65 74 75 72 6e 20 31 3b 20 0a 7d 0a 7d 0a 0a 69 66 20 28 21 24 69 | iased).{.return.1;..}.}..if.(!$i |
731c0 | 67 6e 6f 72 65 52 65 70 6c 61 63 65 29 20 7b 0a 0a 69 66 20 28 24 74 68 69 73 2d 3e 72 65 70 6c | gnoreReplace).{..if.($this->repl |
731e0 | 61 63 65 73 28 24 61 2c 20 24 62 29 29 20 7b 0a 72 65 74 75 72 6e 20 31 3b 20 0a 7d 0a 69 66 20 | aces($a,.$b)).{.return.1;..}.if. |
73200 | 28 24 74 68 69 73 2d 3e 72 65 70 6c 61 63 65 73 28 24 62 2c 20 24 61 29 29 20 7b 0a 72 65 74 75 | ($this->replaces($b,.$a)).{.retu |
73220 | 72 6e 20 2d 31 3b 20 0a 7d 0a 0a 0a 0a 69 66 20 28 24 72 65 71 75 69 72 65 64 50 61 63 6b 61 67 | rn.-1;..}....if.($requiredPackag |
73240 | 65 20 26 26 20 66 61 6c 73 65 20 21 3d 3d 20 28 24 70 6f 73 20 3d 20 73 74 72 70 6f 73 28 24 72 | e.&&.false.!==.($pos.=.strpos($r |
73260 | 65 71 75 69 72 65 64 50 61 63 6b 61 67 65 2c 20 27 2f 27 29 29 29 20 7b 0a 24 72 65 71 75 69 72 | equiredPackage,.'/'))).{.$requir |
73280 | 65 64 56 65 6e 64 6f 72 20 3d 20 73 75 62 73 74 72 28 24 72 65 71 75 69 72 65 64 50 61 63 6b 61 | edVendor.=.substr($requiredPacka |
732a0 | 67 65 2c 20 30 2c 20 24 70 6f 73 29 3b 0a 0a 24 61 49 73 53 61 6d 65 56 65 6e 64 6f 72 20 3d 20 | ge,.0,.$pos);..$aIsSameVendor.=. |
732c0 | 73 74 72 70 6f 73 28 24 61 2d 3e 67 65 74 4e 61 6d 65 28 29 2c 20 24 72 65 71 75 69 72 65 64 56 | strpos($a->getName(),.$requiredV |
732e0 | 65 6e 64 6f 72 29 20 3d 3d 3d 20 30 3b 0a 24 62 49 73 53 61 6d 65 56 65 6e 64 6f 72 20 3d 20 73 | endor).===.0;.$bIsSameVendor.=.s |
73300 | 74 72 70 6f 73 28 24 62 2d 3e 67 65 74 4e 61 6d 65 28 29 2c 20 24 72 65 71 75 69 72 65 64 56 65 | trpos($b->getName(),.$requiredVe |
73320 | 6e 64 6f 72 29 20 3d 3d 3d 20 30 3b 0a 0a 69 66 20 28 24 62 49 73 53 61 6d 65 56 65 6e 64 6f 72 | ndor).===.0;..if.($bIsSameVendor |
73340 | 20 21 3d 3d 20 24 61 49 73 53 61 6d 65 56 65 6e 64 6f 72 29 20 7b 0a 72 65 74 75 72 6e 20 24 61 | .!==.$aIsSameVendor).{.return.$a |
73360 | 49 73 53 61 6d 65 56 65 6e 64 6f 72 20 3f 20 2d 31 20 3a 20 31 3b 0a 7d 0a 7d 0a 7d 0a 0a 0a 69 | IsSameVendor.?.-1.:.1;.}.}.}...i |
73380 | 66 20 28 24 61 2d 3e 69 64 20 3d 3d 3d 20 24 62 2d 3e 69 64 29 20 7b 0a 72 65 74 75 72 6e 20 30 | f.($a->id.===.$b->id).{.return.0 |
733a0 | 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 28 24 61 2d 3e 69 64 20 3c 20 24 62 2d 3e 69 64 29 20 3f 20 | ;.}..return.($a->id.<.$b->id).?. |
733c0 | 2d 31 20 3a 20 31 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 | -1.:.1;.}........protected.funct |
733e0 | 69 6f 6e 20 72 65 70 6c 61 63 65 73 28 42 61 73 65 50 61 63 6b 61 67 65 20 24 73 6f 75 72 63 65 | ion.replaces(BasePackage.$source |
73400 | 2c 20 42 61 73 65 50 61 63 6b 61 67 65 20 24 74 61 72 67 65 74 29 3a 20 62 6f 6f 6c 0a 7b 0a 66 | ,.BasePackage.$target):.bool.{.f |
73420 | 6f 72 65 61 63 68 20 28 24 73 6f 75 72 63 65 2d 3e 67 65 74 52 65 70 6c 61 63 65 73 28 29 20 61 | oreach.($source->getReplaces().a |
73440 | 73 20 24 6c 69 6e 6b 29 20 7b 0a 69 66 20 28 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 74 28 | s.$link).{.if.($link->getTarget( |
73460 | 29 20 3d 3d 3d 20 24 74 61 72 67 65 74 2d 3e 67 65 74 4e 61 6d 65 28 29 0a 0a 0a 29 20 7b 0a 72 | ).===.$target->getName()...).{.r |
73480 | 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d | eturn.true;.}.}..return.false;.} |
734a0 | 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 70 72 75 6e 65 54 6f | ......protected.function.pruneTo |
734c0 | 42 65 73 74 56 65 72 73 69 6f 6e 28 50 6f 6f 6c 20 24 70 6f 6f 6c 2c 20 61 72 72 61 79 20 24 6c | BestVersion(Pool.$pool,.array.$l |
734e0 | 69 74 65 72 61 6c 73 29 3a 20 61 72 72 61 79 0a 7b 0a 24 6f 70 65 72 61 74 6f 72 20 3d 20 24 74 | iterals):.array.{.$operator.=.$t |
73500 | 68 69 73 2d 3e 70 72 65 66 65 72 4c 6f 77 65 73 74 20 3f 20 27 3c 27 20 3a 20 27 3e 27 3b 0a 24 | his->preferLowest.?.'<'.:.'>';.$ |
73520 | 62 65 73 74 4c 69 74 65 72 61 6c 73 20 3d 20 5b 24 6c 69 74 65 72 61 6c 73 5b 30 5d 5d 3b 0a 24 | bestLiterals.=.[$literals[0]];.$ |
73540 | 62 65 73 74 50 61 63 6b 61 67 65 20 3d 20 24 70 6f 6f 6c 2d 3e 6c 69 74 65 72 61 6c 54 6f 50 61 | bestPackage.=.$pool->literalToPa |
73560 | 63 6b 61 67 65 28 24 6c 69 74 65 72 61 6c 73 5b 30 5d 29 3b 0a 66 6f 72 65 61 63 68 20 28 24 6c | ckage($literals[0]);.foreach.($l |
73580 | 69 74 65 72 61 6c 73 20 61 73 20 24 69 20 3d 3e 20 24 6c 69 74 65 72 61 6c 29 20 7b 0a 69 66 20 | iterals.as.$i.=>.$literal).{.if. |
735a0 | 28 30 20 3d 3d 3d 20 24 69 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 24 70 61 63 6b 61 | (0.===.$i).{.continue;.}..$packa |
735c0 | 67 65 20 3d 20 24 70 6f 6f 6c 2d 3e 6c 69 74 65 72 61 6c 54 6f 50 61 63 6b 61 67 65 28 24 6c 69 | ge.=.$pool->literalToPackage($li |
735e0 | 74 65 72 61 6c 29 3b 0a 0a 69 66 20 28 24 74 68 69 73 2d 3e 76 65 72 73 69 6f 6e 43 6f 6d 70 61 | teral);..if.($this->versionCompa |
73600 | 72 65 28 24 70 61 63 6b 61 67 65 2c 20 24 62 65 73 74 50 61 63 6b 61 67 65 2c 20 24 6f 70 65 72 | re($package,.$bestPackage,.$oper |
73620 | 61 74 6f 72 29 29 20 7b 0a 24 62 65 73 74 50 61 63 6b 61 67 65 20 3d 20 24 70 61 63 6b 61 67 65 | ator)).{.$bestPackage.=.$package |
73640 | 3b 0a 24 62 65 73 74 4c 69 74 65 72 61 6c 73 20 3d 20 5b 24 6c 69 74 65 72 61 6c 5d 3b 0a 7d 20 | ;.$bestLiterals.=.[$literal];.}. |
73660 | 65 6c 73 65 69 66 20 28 24 74 68 69 73 2d 3e 76 65 72 73 69 6f 6e 43 6f 6d 70 61 72 65 28 24 70 | elseif.($this->versionCompare($p |
73680 | 61 63 6b 61 67 65 2c 20 24 62 65 73 74 50 61 63 6b 61 67 65 2c 20 27 3d 3d 27 29 29 20 7b 0a 24 | ackage,.$bestPackage,.'==')).{.$ |
736a0 | 62 65 73 74 4c 69 74 65 72 61 6c 73 5b 5d 20 3d 20 24 6c 69 74 65 72 61 6c 3b 0a 7d 0a 7d 0a 0a | bestLiterals[].=.$literal;.}.}.. |
736c0 | 72 65 74 75 72 6e 20 24 62 65 73 74 4c 69 74 65 72 61 6c 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a | return.$bestLiterals;.}......... |
736e0 | 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 70 72 75 6e 65 52 65 6d 6f 74 65 41 | .protected.function.pruneRemoteA |
73700 | 6c 69 61 73 65 73 28 50 6f 6f 6c 20 24 70 6f 6f 6c 2c 20 61 72 72 61 79 20 24 6c 69 74 65 72 61 | liases(Pool.$pool,.array.$litera |
73720 | 6c 73 29 3a 20 61 72 72 61 79 0a 7b 0a 24 68 61 73 4c 6f 63 61 6c 41 6c 69 61 73 20 3d 20 66 61 | ls):.array.{.$hasLocalAlias.=.fa |
73740 | 6c 73 65 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 6c 69 74 65 72 61 6c 73 20 61 73 20 24 6c 69 74 | lse;..foreach.($literals.as.$lit |
73760 | 65 72 61 6c 29 20 7b 0a 24 70 61 63 6b 61 67 65 20 3d 20 24 70 6f 6f 6c 2d 3e 6c 69 74 65 72 61 | eral).{.$package.=.$pool->litera |
73780 | 6c 54 6f 50 61 63 6b 61 67 65 28 24 6c 69 74 65 72 61 6c 29 3b 0a 0a 69 66 20 28 24 70 61 63 6b | lToPackage($literal);..if.($pack |
737a0 | 61 67 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 41 6c 69 61 73 50 61 63 6b 61 67 65 20 26 26 20 24 | age.instanceof.AliasPackage.&&.$ |
737c0 | 70 61 63 6b 61 67 65 2d 3e 69 73 52 6f 6f 74 50 61 63 6b 61 67 65 41 6c 69 61 73 28 29 29 20 7b | package->isRootPackageAlias()).{ |
737e0 | 0a 24 68 61 73 4c 6f 63 61 6c 41 6c 69 61 73 20 3d 20 74 72 75 65 3b 0a 62 72 65 61 6b 3b 0a 7d | .$hasLocalAlias.=.true;.break;.} |
73800 | 0a 7d 0a 0a 69 66 20 28 21 24 68 61 73 4c 6f 63 61 6c 41 6c 69 61 73 29 20 7b 0a 72 65 74 75 72 | .}..if.(!$hasLocalAlias).{.retur |
73820 | 6e 20 24 6c 69 74 65 72 61 6c 73 3b 0a 7d 0a 0a 24 73 65 6c 65 63 74 65 64 20 3d 20 5b 5d 3b 0a | n.$literals;.}..$selected.=.[];. |
73840 | 66 6f 72 65 61 63 68 20 28 24 6c 69 74 65 72 61 6c 73 20 61 73 20 24 6c 69 74 65 72 61 6c 29 20 | foreach.($literals.as.$literal). |
73860 | 7b 0a 24 70 61 63 6b 61 67 65 20 3d 20 24 70 6f 6f 6c 2d 3e 6c 69 74 65 72 61 6c 54 6f 50 61 63 | {.$package.=.$pool->literalToPac |
73880 | 6b 61 67 65 28 24 6c 69 74 65 72 61 6c 29 3b 0a 0a 69 66 20 28 24 70 61 63 6b 61 67 65 20 69 6e | kage($literal);..if.($package.in |
738a0 | 73 74 61 6e 63 65 6f 66 20 41 6c 69 61 73 50 61 63 6b 61 67 65 20 26 26 20 24 70 61 63 6b 61 67 | stanceof.AliasPackage.&&.$packag |
738c0 | 65 2d 3e 69 73 52 6f 6f 74 50 61 63 6b 61 67 65 41 6c 69 61 73 28 29 29 20 7b 0a 24 73 65 6c 65 | e->isRootPackageAlias()).{.$sele |
738e0 | 63 74 65 64 5b 5d 20 3d 20 24 6c 69 74 65 72 61 6c 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 | cted[].=.$literal;.}.}..return.$ |
73900 | 73 65 6c 65 63 74 65 64 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 | selected;.}.}.<?php.declare(stri |
73920 | 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 | ct_types=1);............namespac |
73940 | 65 20 43 6f 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 3b 0a 0a | e.Composer\DependencyResolver;.. |
73960 | 0a 0a 0a 63 6c 61 73 73 20 47 65 6e 65 72 69 63 52 75 6c 65 20 65 78 74 65 6e 64 73 20 52 75 6c | ...class.GenericRule.extends.Rul |
73980 | 65 0a 7b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 6c 69 74 65 72 61 6c 73 3b 0a 0a 0a 0a 0a 70 75 | e.{..protected.$literals;.....pu |
739a0 | 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 61 72 72 61 79 20 | blic.function.__construct(array. |
739c0 | 24 6c 69 74 65 72 61 6c 73 2c 20 24 72 65 61 73 6f 6e 2c 20 24 72 65 61 73 6f 6e 44 61 74 61 29 | $literals,.$reason,.$reasonData) |
739e0 | 0a 7b 0a 70 61 72 65 6e 74 3a 3a 5f 5f 63 6f 6e 73 74 72 75 63 74 28 24 72 65 61 73 6f 6e 2c 20 | .{.parent::__construct($reason,. |
73a00 | 24 72 65 61 73 6f 6e 44 61 74 61 29 3b 0a 0a 0a 73 6f 72 74 28 24 6c 69 74 65 72 61 6c 73 29 3b | $reasonData);...sort($literals); |
73a20 | 0a 0a 24 74 68 69 73 2d 3e 6c 69 74 65 72 61 6c 73 20 3d 20 24 6c 69 74 65 72 61 6c 73 3b 0a 7d | ..$this->literals.=.$literals;.} |
73a40 | 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 4c 69 74 65 72 61 6c 73 | .....public.function.getLiterals |
73a60 | 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 6c 69 74 65 72 61 | ():.array.{.return.$this->litera |
73a80 | 6c 73 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 48 61 73 | ls;.}.....public.function.getHas |
73aa0 | 68 28 29 0a 7b 0a 24 64 61 74 61 20 3d 20 75 6e 70 61 63 6b 28 27 69 68 61 73 68 27 2c 20 6d 64 | h().{.$data.=.unpack('ihash',.md |
73ac0 | 35 28 69 6d 70 6c 6f 64 65 28 27 2c 27 2c 20 24 74 68 69 73 2d 3e 6c 69 74 65 72 61 6c 73 29 2c | 5(implode(',',.$this->literals), |
73ae0 | 20 74 72 75 65 29 29 3b 0a 0a 72 65 74 75 72 6e 20 24 64 61 74 61 5b 27 68 61 73 68 27 5d 3b 0a | .true));..return.$data['hash'];. |
73b00 | 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 65 71 75 61 6c | }..........public.function.equal |
73b20 | 73 28 52 75 6c 65 20 24 72 75 6c 65 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 | s(Rule.$rule):.bool.{.return.$th |
73b40 | 69 73 2d 3e 6c 69 74 65 72 61 6c 73 20 3d 3d 3d 20 24 72 75 6c 65 2d 3e 67 65 74 4c 69 74 65 72 | is->literals.===.$rule->getLiter |
73b60 | 61 6c 73 28 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 41 73 73 65 | als();.}..public.function.isAsse |
73b80 | 72 74 69 6f 6e 28 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 31 20 3d 3d 3d 20 5c 63 6f | rtion():.bool.{.return.1.===.\co |
73ba0 | 75 6e 74 28 24 74 68 69 73 2d 3e 6c 69 74 65 72 61 6c 73 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c | unt($this->literals);.}.....publ |
73bc0 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 74 6f 53 74 72 69 6e 67 28 29 3a 20 73 74 72 69 6e 67 | ic.function.__toString():.string |
73be0 | 0a 7b 0a 24 72 65 73 75 6c 74 20 3d 20 24 74 68 69 73 2d 3e 69 73 44 69 73 61 62 6c 65 64 28 29 | .{.$result.=.$this->isDisabled() |
73c00 | 20 3f 20 27 64 69 73 61 62 6c 65 64 28 27 20 3a 20 27 28 27 3b 0a 0a 66 6f 72 65 61 63 68 20 28 | .?.'disabled('.:.'(';..foreach.( |
73c20 | 24 74 68 69 73 2d 3e 6c 69 74 65 72 61 6c 73 20 61 73 20 24 69 20 3d 3e 20 24 6c 69 74 65 72 61 | $this->literals.as.$i.=>.$litera |
73c40 | 6c 29 20 7b 0a 69 66 20 28 24 69 20 21 3d 3d 20 30 29 20 7b 0a 24 72 65 73 75 6c 74 20 2e 3d 20 | l).{.if.($i.!==.0).{.$result..=. |
73c60 | 27 7c 27 3b 0a 7d 0a 24 72 65 73 75 6c 74 20 2e 3d 20 24 6c 69 74 65 72 61 6c 3b 0a 7d 0a 0a 24 | '|';.}.$result..=.$literal;.}..$ |
73c80 | 72 65 73 75 6c 74 20 2e 3d 20 27 29 27 3b 0a 0a 72 65 74 75 72 6e 20 24 72 65 73 75 6c 74 3b 0a | result..=.')';..return.$result;. |
73ca0 | 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 | }.}.<?php.declare(strict_types=1 |
73cc0 | 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 | );............namespace.Composer |
73ce0 | 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 | \DependencyResolver;..use.Compos |
73d00 | 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 | er\Repository\InstalledRepositor |
73d20 | 79 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 | yInterface;.use.Composer\Reposit |
73d40 | 6f 72 79 5c 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 3b 0a 0a 0a 0a 0a 0a 63 6c | ory\RepositoryInterface;......cl |
73d60 | 61 73 73 20 4c 6f 63 61 6c 52 65 70 6f 54 72 61 6e 73 61 63 74 69 6f 6e 20 65 78 74 65 6e 64 73 | ass.LocalRepoTransaction.extends |
73d80 | 20 54 72 61 6e 73 61 63 74 69 6f 6e 0a 7b 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f | .Transaction.{.public.function._ |
73da0 | 5f 63 6f 6e 73 74 72 75 63 74 28 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 20 24 | _construct(RepositoryInterface.$ |
73dc0 | 6c 6f 63 6b 65 64 52 65 70 6f 73 69 74 6f 72 79 2c 20 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 | lockedRepository,.InstalledRepos |
73de0 | 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 20 24 6c 6f 63 61 6c 52 65 70 6f 73 69 74 6f 72 79 29 | itoryInterface.$localRepository) |
73e00 | 0a 7b 0a 70 61 72 65 6e 74 3a 3a 5f 5f 63 6f 6e 73 74 72 75 63 74 28 0a 24 6c 6f 63 61 6c 52 65 | .{.parent::__construct(.$localRe |
73e20 | 70 6f 73 69 74 6f 72 79 2d 3e 67 65 74 50 61 63 6b 61 67 65 73 28 29 2c 0a 24 6c 6f 63 6b 65 64 | pository->getPackages(),.$locked |
73e40 | 52 65 70 6f 73 69 74 6f 72 79 2d 3e 67 65 74 50 61 63 6b 61 67 65 73 28 29 0a 29 3b 0a 7d 0a 7d | Repository->getPackages().);.}.} |
73e60 | 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a | .<?php.declare(strict_types=1);. |
73e80 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 44 65 | ...........namespace.Composer\De |
73ea0 | 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c | pendencyResolver;..use.Composer\ |
73ec0 | 50 61 63 6b 61 67 65 5c 41 6c 69 61 73 50 61 63 6b 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 | Package\AliasPackage;.use.Compos |
73ee0 | 65 72 5c 50 61 63 6b 61 67 65 5c 42 61 73 65 50 61 63 6b 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 | er\Package\BasePackage;.use.Comp |
73f00 | 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 50 61 63 6b 61 67 65 3b 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 | oser\Package\Package;......class |
73f20 | 20 4c 6f 63 6b 54 72 61 6e 73 61 63 74 69 6f 6e 20 65 78 74 65 6e 64 73 20 54 72 61 6e 73 61 63 | .LockTransaction.extends.Transac |
73f40 | 74 69 6f 6e 0a 7b 0a 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 70 72 65 73 65 6e 74 | tion.{........protected.$present |
73f60 | 4d 61 70 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 75 6e 6c 6f 63 6b 61 62 | Map;.........protected.$unlockab |
73f80 | 6c 65 4d 61 70 3b 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 72 65 73 75 6c 74 50 61 63 6b | leMap;.....protected.$resultPack |
73fa0 | 61 67 65 73 3b 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e | ages;......public.function.__con |
73fc0 | 73 74 72 75 63 74 28 50 6f 6f 6c 20 24 70 6f 6f 6c 2c 20 61 72 72 61 79 20 24 70 72 65 73 65 6e | struct(Pool.$pool,.array.$presen |
73fe0 | 74 4d 61 70 2c 20 61 72 72 61 79 20 24 75 6e 6c 6f 63 6b 61 62 6c 65 4d 61 70 2c 20 44 65 63 69 | tMap,.array.$unlockableMap,.Deci |
74000 | 73 69 6f 6e 73 20 24 64 65 63 69 73 69 6f 6e 73 29 0a 7b 0a 24 74 68 69 73 2d 3e 70 72 65 73 65 | sions.$decisions).{.$this->prese |
74020 | 6e 74 4d 61 70 20 3d 20 24 70 72 65 73 65 6e 74 4d 61 70 3b 0a 24 74 68 69 73 2d 3e 75 6e 6c 6f | ntMap.=.$presentMap;.$this->unlo |
74040 | 63 6b 61 62 6c 65 4d 61 70 20 3d 20 24 75 6e 6c 6f 63 6b 61 62 6c 65 4d 61 70 3b 0a 0a 24 74 68 | ckableMap.=.$unlockableMap;..$th |
74060 | 69 73 2d 3e 73 65 74 52 65 73 75 6c 74 50 61 63 6b 61 67 65 73 28 24 70 6f 6f 6c 2c 20 24 64 65 | is->setResultPackages($pool,.$de |
74080 | 63 69 73 69 6f 6e 73 29 3b 0a 70 61 72 65 6e 74 3a 3a 5f 5f 63 6f 6e 73 74 72 75 63 74 28 24 74 | cisions);.parent::__construct($t |
740a0 | 68 69 73 2d 3e 70 72 65 73 65 6e 74 4d 61 70 2c 20 24 74 68 69 73 2d 3e 72 65 73 75 6c 74 50 61 | his->presentMap,.$this->resultPa |
740c0 | 63 6b 61 67 65 73 5b 27 61 6c 6c 27 5d 29 3b 0a 7d 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 | ckages['all']);.}....public.func |
740e0 | 74 69 6f 6e 20 73 65 74 52 65 73 75 6c 74 50 61 63 6b 61 67 65 73 28 50 6f 6f 6c 20 24 70 6f 6f | tion.setResultPackages(Pool.$poo |
74100 | 6c 2c 20 44 65 63 69 73 69 6f 6e 73 20 24 64 65 63 69 73 69 6f 6e 73 29 3a 20 76 6f 69 64 0a 7b | l,.Decisions.$decisions):.void.{ |
74120 | 0a 24 74 68 69 73 2d 3e 72 65 73 75 6c 74 50 61 63 6b 61 67 65 73 20 3d 20 5b 27 61 6c 6c 27 20 | .$this->resultPackages.=.['all'. |
74140 | 3d 3e 20 5b 5d 2c 20 27 6e 6f 6e 2d 64 65 76 27 20 3d 3e 20 5b 5d 2c 20 27 64 65 76 27 20 3d 3e | =>.[],.'non-dev'.=>.[],.'dev'.=> |
74160 | 20 5b 5d 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 64 65 63 69 73 69 6f 6e 73 20 61 73 20 24 69 20 | .[]];.foreach.($decisions.as.$i. |
74180 | 3d 3e 20 24 64 65 63 69 73 69 6f 6e 29 20 7b 0a 24 6c 69 74 65 72 61 6c 20 3d 20 24 64 65 63 69 | =>.$decision).{.$literal.=.$deci |
741a0 | 73 69 6f 6e 5b 44 65 63 69 73 69 6f 6e 73 3a 3a 44 45 43 49 53 49 4f 4e 5f 4c 49 54 45 52 41 4c | sion[Decisions::DECISION_LITERAL |
741c0 | 5d 3b 0a 0a 69 66 20 28 24 6c 69 74 65 72 61 6c 20 3e 20 30 29 20 7b 0a 24 70 61 63 6b 61 67 65 | ];..if.($literal.>.0).{.$package |
741e0 | 20 3d 20 24 70 6f 6f 6c 2d 3e 6c 69 74 65 72 61 6c 54 6f 50 61 63 6b 61 67 65 28 24 6c 69 74 65 | .=.$pool->literalToPackage($lite |
74200 | 72 61 6c 29 3b 0a 0a 24 74 68 69 73 2d 3e 72 65 73 75 6c 74 50 61 63 6b 61 67 65 73 5b 27 61 6c | ral);..$this->resultPackages['al |
74220 | 6c 27 5d 5b 5d 20 3d 20 24 70 61 63 6b 61 67 65 3b 0a 69 66 20 28 21 69 73 73 65 74 28 24 74 68 | l'][].=.$package;.if.(!isset($th |
74240 | 69 73 2d 3e 75 6e 6c 6f 63 6b 61 62 6c 65 4d 61 70 5b 24 70 61 63 6b 61 67 65 2d 3e 69 64 5d 29 | is->unlockableMap[$package->id]) |
74260 | 29 20 7b 0a 24 74 68 69 73 2d 3e 72 65 73 75 6c 74 50 61 63 6b 61 67 65 73 5b 27 6e 6f 6e 2d 64 | ).{.$this->resultPackages['non-d |
74280 | 65 76 27 5d 5b 5d 20 3d 20 24 70 61 63 6b 61 67 65 3b 0a 7d 0a 7d 0a 7d 0a 7d 0a 0a 70 75 62 6c | ev'][].=.$package;.}.}.}.}..publ |
742a0 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 4e 6f 6e 44 65 76 50 61 63 6b 61 67 65 73 28 4c 6f | ic.function.setNonDevPackages(Lo |
742c0 | 63 6b 54 72 61 6e 73 61 63 74 69 6f 6e 20 24 65 78 74 72 61 63 74 69 6f 6e 52 65 73 75 6c 74 29 | ckTransaction.$extractionResult) |
742e0 | 3a 20 76 6f 69 64 0a 7b 0a 24 70 61 63 6b 61 67 65 73 20 3d 20 24 65 78 74 72 61 63 74 69 6f 6e | :.void.{.$packages.=.$extraction |
74300 | 52 65 73 75 6c 74 2d 3e 67 65 74 4e 65 77 4c 6f 63 6b 50 61 63 6b 61 67 65 73 28 66 61 6c 73 65 | Result->getNewLockPackages(false |
74320 | 29 3b 0a 0a 24 74 68 69 73 2d 3e 72 65 73 75 6c 74 50 61 63 6b 61 67 65 73 5b 27 64 65 76 27 5d | );..$this->resultPackages['dev'] |
74340 | 20 3d 20 24 74 68 69 73 2d 3e 72 65 73 75 6c 74 50 61 63 6b 61 67 65 73 5b 27 6e 6f 6e 2d 64 65 | .=.$this->resultPackages['non-de |
74360 | 76 27 5d 3b 0a 24 74 68 69 73 2d 3e 72 65 73 75 6c 74 50 61 63 6b 61 67 65 73 5b 27 6e 6f 6e 2d | v'];.$this->resultPackages['non- |
74380 | 64 65 76 27 5d 20 3d 20 5b 5d 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 73 20 | dev'].=.[];..foreach.($packages. |
743a0 | 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 72 | as.$package).{.foreach.($this->r |
743c0 | 65 73 75 6c 74 50 61 63 6b 61 67 65 73 5b 27 64 65 76 27 5d 20 61 73 20 24 69 20 3d 3e 20 24 72 | esultPackages['dev'].as.$i.=>.$r |
743e0 | 65 73 75 6c 74 50 61 63 6b 61 67 65 29 20 7b 0a 0a 69 66 20 28 24 70 61 63 6b 61 67 65 2d 3e 67 | esultPackage).{..if.($package->g |
74400 | 65 74 4e 61 6d 65 28 29 20 3d 3d 3d 20 24 72 65 73 75 6c 74 50 61 63 6b 61 67 65 2d 3e 67 65 74 | etName().===.$resultPackage->get |
74420 | 4e 61 6d 65 28 29 29 20 7b 0a 24 74 68 69 73 2d 3e 72 65 73 75 6c 74 50 61 63 6b 61 67 65 73 5b | Name()).{.$this->resultPackages[ |
74440 | 27 6e 6f 6e 2d 64 65 76 27 5d 5b 5d 20 3d 20 24 72 65 73 75 6c 74 50 61 63 6b 61 67 65 3b 0a 75 | 'non-dev'][].=.$resultPackage;.u |
74460 | 6e 73 65 74 28 24 74 68 69 73 2d 3e 72 65 73 75 6c 74 50 61 63 6b 61 67 65 73 5b 27 64 65 76 27 | nset($this->resultPackages['dev' |
74480 | 5d 5b 24 69 5d 29 3b 0a 7d 0a 7d 0a 7d 0a 7d 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 | ][$i]);.}.}.}.}......public.func |
744a0 | 74 69 6f 6e 20 67 65 74 4e 65 77 4c 6f 63 6b 50 61 63 6b 61 67 65 73 28 62 6f 6f 6c 20 24 64 65 | tion.getNewLockPackages(bool.$de |
744c0 | 76 4d 6f 64 65 2c 20 62 6f 6f 6c 20 24 75 70 64 61 74 65 4d 69 72 72 6f 72 73 20 3d 20 66 61 6c | vMode,.bool.$updateMirrors.=.fal |
744e0 | 73 65 29 3a 20 61 72 72 61 79 0a 7b 0a 24 70 61 63 6b 61 67 65 73 20 3d 20 5b 5d 3b 0a 66 6f 72 | se):.array.{.$packages.=.[];.for |
74500 | 65 61 63 68 20 28 24 74 68 69 73 2d 3e 72 65 73 75 6c 74 50 61 63 6b 61 67 65 73 5b 24 64 65 76 | each.($this->resultPackages[$dev |
74520 | 4d 6f 64 65 20 3f 20 27 64 65 76 27 20 3a 20 27 6e 6f 6e 2d 64 65 76 27 5d 20 61 73 20 24 70 61 | Mode.?.'dev'.:.'non-dev'].as.$pa |
74540 | 63 6b 61 67 65 29 20 7b 0a 69 66 20 28 21 24 70 61 63 6b 61 67 65 20 69 6e 73 74 61 6e 63 65 6f | ckage).{.if.(!$package.instanceo |
74560 | 66 20 41 6c 69 61 73 50 61 63 6b 61 67 65 29 20 7b 0a 0a 0a 69 66 20 28 24 75 70 64 61 74 65 4d | f.AliasPackage).{...if.($updateM |
74580 | 69 72 72 6f 72 73 20 26 26 20 21 69 73 73 65 74 28 24 74 68 69 73 2d 3e 70 72 65 73 65 6e 74 4d | irrors.&&.!isset($this->presentM |
745a0 | 61 70 5b 73 70 6c 5f 6f 62 6a 65 63 74 5f 68 61 73 68 28 24 70 61 63 6b 61 67 65 29 5d 29 29 20 | ap[spl_object_hash($package)])). |
745c0 | 7b 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 70 72 65 73 65 6e 74 4d 61 70 20 61 73 20 | {.foreach.($this->presentMap.as. |
745e0 | 24 70 72 65 73 65 6e 74 50 61 63 6b 61 67 65 29 20 7b 0a 69 66 20 28 24 70 61 63 6b 61 67 65 2d | $presentPackage).{.if.($package- |
74600 | 3e 67 65 74 4e 61 6d 65 28 29 20 3d 3d 3d 20 24 70 72 65 73 65 6e 74 50 61 63 6b 61 67 65 2d 3e | >getName().===.$presentPackage-> |
74620 | 67 65 74 4e 61 6d 65 28 29 20 26 26 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 56 65 72 73 69 6f | getName().&&.$package->getVersio |
74640 | 6e 28 29 20 3d 3d 3d 20 24 70 72 65 73 65 6e 74 50 61 63 6b 61 67 65 2d 3e 67 65 74 56 65 72 73 | n().===.$presentPackage->getVers |
74660 | 69 6f 6e 28 29 29 20 7b 0a 69 66 20 28 24 70 72 65 73 65 6e 74 50 61 63 6b 61 67 65 2d 3e 67 65 | ion()).{.if.($presentPackage->ge |
74680 | 74 53 6f 75 72 63 65 52 65 66 65 72 65 6e 63 65 28 29 20 26 26 20 24 70 72 65 73 65 6e 74 50 61 | tSourceReference().&&.$presentPa |
746a0 | 63 6b 61 67 65 2d 3e 67 65 74 53 6f 75 72 63 65 54 79 70 65 28 29 20 3d 3d 3d 20 24 70 61 63 6b | ckage->getSourceType().===.$pack |
746c0 | 61 67 65 2d 3e 67 65 74 53 6f 75 72 63 65 54 79 70 65 28 29 29 20 7b 0a 24 70 61 63 6b 61 67 65 | age->getSourceType()).{.$package |
746e0 | 2d 3e 73 65 74 53 6f 75 72 63 65 44 69 73 74 52 65 66 65 72 65 6e 63 65 73 28 24 70 72 65 73 65 | ->setSourceDistReferences($prese |
74700 | 6e 74 50 61 63 6b 61 67 65 2d 3e 67 65 74 53 6f 75 72 63 65 52 65 66 65 72 65 6e 63 65 28 29 29 | ntPackage->getSourceReference()) |
74720 | 3b 0a 7d 0a 69 66 20 28 24 70 72 65 73 65 6e 74 50 61 63 6b 61 67 65 2d 3e 67 65 74 52 65 6c 65 | ;.}.if.($presentPackage->getRele |
74740 | 61 73 65 44 61 74 65 28 29 20 21 3d 3d 20 6e 75 6c 6c 20 26 26 20 24 70 61 63 6b 61 67 65 20 69 | aseDate().!==.null.&&.$package.i |
74760 | 6e 73 74 61 6e 63 65 6f 66 20 50 61 63 6b 61 67 65 29 20 7b 0a 24 70 61 63 6b 61 67 65 2d 3e 73 | nstanceof.Package).{.$package->s |
74780 | 65 74 52 65 6c 65 61 73 65 44 61 74 65 28 24 70 72 65 73 65 6e 74 50 61 63 6b 61 67 65 2d 3e 67 | etReleaseDate($presentPackage->g |
747a0 | 65 74 52 65 6c 65 61 73 65 44 61 74 65 28 29 29 3b 0a 7d 0a 7d 0a 7d 0a 7d 0a 24 70 61 63 6b 61 | etReleaseDate());.}.}.}.}.$packa |
747c0 | 67 65 73 5b 5d 20 3d 20 24 70 61 63 6b 61 67 65 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 70 | ges[].=.$package;.}.}..return.$p |
747e0 | 61 63 6b 61 67 65 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e | ackages;.}.......public.function |
74800 | 20 67 65 74 41 6c 69 61 73 65 73 28 61 72 72 61 79 20 24 61 6c 69 61 73 65 73 29 3a 20 61 72 72 | .getAliases(array.$aliases):.arr |
74820 | 61 79 0a 7b 0a 24 75 73 65 64 41 6c 69 61 73 65 73 20 3d 20 5b 5d 3b 0a 0a 66 6f 72 65 61 63 68 | ay.{.$usedAliases.=.[];..foreach |
74840 | 20 28 24 74 68 69 73 2d 3e 72 65 73 75 6c 74 50 61 63 6b 61 67 65 73 5b 27 61 6c 6c 27 5d 20 61 | .($this->resultPackages['all'].a |
74860 | 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 69 66 20 28 24 70 61 63 6b 61 67 65 20 69 6e 73 74 61 | s.$package).{.if.($package.insta |
74880 | 6e 63 65 6f 66 20 41 6c 69 61 73 50 61 63 6b 61 67 65 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 | nceof.AliasPackage).{.foreach.($ |
748a0 | 61 6c 69 61 73 65 73 20 61 73 20 24 69 6e 64 65 78 20 3d 3e 20 24 61 6c 69 61 73 29 20 7b 0a 69 | aliases.as.$index.=>.$alias).{.i |
748c0 | 66 20 28 24 61 6c 69 61 73 5b 27 70 61 63 6b 61 67 65 27 5d 20 3d 3d 3d 20 24 70 61 63 6b 61 67 | f.($alias['package'].===.$packag |
748e0 | 65 2d 3e 67 65 74 4e 61 6d 65 28 29 29 20 7b 0a 24 75 73 65 64 41 6c 69 61 73 65 73 5b 5d 20 3d | e->getName()).{.$usedAliases[].= |
74900 | 20 24 61 6c 69 61 73 3b 0a 75 6e 73 65 74 28 24 61 6c 69 61 73 65 73 5b 24 69 6e 64 65 78 5d 29 | .$alias;.unset($aliases[$index]) |
74920 | 3b 0a 7d 0a 7d 0a 7d 0a 7d 0a 0a 75 73 6f 72 74 28 24 75 73 65 64 41 6c 69 61 73 65 73 2c 20 73 | ;.}.}.}.}..usort($usedAliases,.s |
74940 | 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 61 2c 20 24 62 29 3a 20 69 6e 74 20 7b 0a 72 | tatic.function.($a,.$b):.int.{.r |
74960 | 65 74 75 72 6e 20 73 74 72 63 6d 70 28 24 61 5b 27 70 61 63 6b 61 67 65 27 5d 2c 20 24 62 5b 27 | eturn.strcmp($a['package'],.$b[' |
74980 | 70 61 63 6b 61 67 65 27 5d 29 3b 0a 7d 29 3b 0a 0a 72 65 74 75 72 6e 20 24 75 73 65 64 41 6c 69 | package']);.});..return.$usedAli |
749a0 | 61 73 65 73 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 | ases;.}.}.<?php.declare(strict_t |
749c0 | 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f | ypes=1);............namespace.Co |
749e0 | 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 3b 0a 0a 0a 0a 0a 0a | mposer\DependencyResolver;...... |
74a00 | 0a 63 6c 61 73 73 20 4d 75 6c 74 69 43 6f 6e 66 6c 69 63 74 52 75 6c 65 20 65 78 74 65 6e 64 73 | .class.MultiConflictRule.extends |
74a20 | 20 52 75 6c 65 0a 7b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 6c 69 74 65 72 61 6c 73 3b 0a 0a 0a | .Rule.{..protected.$literals;... |
74a40 | 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 61 72 | ..public.function.__construct(ar |
74a60 | 72 61 79 20 24 6c 69 74 65 72 61 6c 73 2c 20 24 72 65 61 73 6f 6e 2c 20 24 72 65 61 73 6f 6e 44 | ray.$literals,.$reason,.$reasonD |
74a80 | 61 74 61 29 0a 7b 0a 70 61 72 65 6e 74 3a 3a 5f 5f 63 6f 6e 73 74 72 75 63 74 28 24 72 65 61 73 | ata).{.parent::__construct($reas |
74aa0 | 6f 6e 2c 20 24 72 65 61 73 6f 6e 44 61 74 61 29 3b 0a 0a 69 66 20 28 5c 63 6f 75 6e 74 28 24 6c | on,.$reasonData);..if.(\count($l |
74ac0 | 69 74 65 72 61 6c 73 29 20 3c 20 33 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 | iterals).<.3).{.throw.new.\Runti |
74ae0 | 6d 65 45 78 63 65 70 74 69 6f 6e 28 22 6d 75 6c 74 69 20 63 6f 6e 66 6c 69 63 74 20 72 75 6c 65 | meException("multi.conflict.rule |
74b00 | 20 72 65 71 75 69 72 65 73 20 61 74 20 6c 65 61 73 74 20 33 20 6c 69 74 65 72 61 6c 73 22 29 3b | .requires.at.least.3.literals"); |
74b20 | 0a 7d 0a 0a 0a 73 6f 72 74 28 24 6c 69 74 65 72 61 6c 73 29 3b 0a 0a 24 74 68 69 73 2d 3e 6c 69 | .}...sort($literals);..$this->li |
74b40 | 74 65 72 61 6c 73 20 3d 20 24 6c 69 74 65 72 61 6c 73 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 | terals.=.$literals;.}.....public |
74b60 | 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 4c 69 74 65 72 61 6c 73 28 29 3a 20 61 72 72 61 79 0a 7b | .function.getLiterals():.array.{ |
74b80 | 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 6c 69 74 65 72 61 6c 73 3b 0a 7d 0a 0a 0a 0a 0a 70 | .return.$this->literals;.}.....p |
74ba0 | 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 48 61 73 68 28 29 0a 7b 0a 24 64 61 74 61 | ublic.function.getHash().{.$data |
74bc0 | 20 3d 20 75 6e 70 61 63 6b 28 27 69 68 61 73 68 27 2c 20 6d 64 35 28 27 63 3a 27 2e 69 6d 70 6c | .=.unpack('ihash',.md5('c:'.impl |
74be0 | 6f 64 65 28 27 2c 27 2c 20 24 74 68 69 73 2d 3e 6c 69 74 65 72 61 6c 73 29 2c 20 74 72 75 65 29 | ode(',',.$this->literals),.true) |
74c00 | 29 3b 0a 0a 72 65 74 75 72 6e 20 24 64 61 74 61 5b 27 68 61 73 68 27 5d 3b 0a 7d 0a 0a 0a 0a 0a | );..return.$data['hash'];.}..... |
74c20 | 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 65 71 75 61 6c 73 28 52 75 6c 65 | .....public.function.equals(Rule |
74c40 | 20 24 72 75 6c 65 29 3a 20 62 6f 6f 6c 0a 7b 0a 69 66 20 28 24 72 75 6c 65 20 69 6e 73 74 61 6e | .$rule):.bool.{.if.($rule.instan |
74c60 | 63 65 6f 66 20 4d 75 6c 74 69 43 6f 6e 66 6c 69 63 74 52 75 6c 65 29 20 7b 0a 72 65 74 75 72 6e | ceof.MultiConflictRule).{.return |
74c80 | 20 24 74 68 69 73 2d 3e 6c 69 74 65 72 61 6c 73 20 3d 3d 3d 20 24 72 75 6c 65 2d 3e 67 65 74 4c | .$this->literals.===.$rule->getL |
74ca0 | 69 74 65 72 61 6c 73 28 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 70 | iterals();.}..return.false;.}..p |
74cc0 | 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 41 73 73 65 72 74 69 6f 6e 28 29 3a 20 62 6f | ublic.function.isAssertion():.bo |
74ce0 | 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 | ol.{.return.false;.}......public |
74d00 | 20 66 75 6e 63 74 69 6f 6e 20 64 69 73 61 62 6c 65 28 29 3a 20 76 6f 69 64 0a 7b 0a 74 68 72 6f | .function.disable():.void.{.thro |
74d20 | 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 22 44 69 73 61 62 6c 69 | w.new.\RuntimeException("Disabli |
74d40 | 6e 67 20 6d 75 6c 74 69 20 63 6f 6e 66 6c 69 63 74 20 72 75 6c 65 73 20 69 73 20 6e 6f 74 20 70 | ng.multi.conflict.rules.is.not.p |
74d60 | 6f 73 73 69 62 6c 65 2e 20 50 6c 65 61 73 65 20 63 6f 6e 74 61 63 74 20 63 6f 6d 70 6f 73 65 72 | ossible..Please.contact.composer |
74d80 | 20 61 74 20 68 74 74 70 73 3a 2f 2f 67 69 74 68 75 62 2e 63 6f 6d 2f 63 6f 6d 70 6f 73 65 72 2f | .at.https://github.com/composer/ |
74da0 | 63 6f 6d 70 6f 73 65 72 20 74 6f 20 6c 65 74 20 75 73 20 64 65 62 75 67 20 77 68 61 74 20 6c 65 | composer.to.let.us.debug.what.le |
74dc0 | 61 64 20 74 6f 20 74 68 69 73 20 73 69 74 75 61 74 69 6f 6e 2e 22 29 3b 0a 7d 0a 0a 0a 0a 0a 70 | ad.to.this.situation.");.}.....p |
74de0 | 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 74 6f 53 74 72 69 6e 67 28 29 3a 20 73 74 72 | ublic.function.__toString():.str |
74e00 | 69 6e 67 0a 7b 0a 0a 24 72 65 73 75 6c 74 20 3d 20 24 74 68 69 73 2d 3e 69 73 44 69 73 61 62 6c | ing.{..$result.=.$this->isDisabl |
74e20 | 65 64 28 29 20 3f 20 27 64 69 73 61 62 6c 65 64 28 6d 75 6c 74 69 28 27 20 3a 20 27 28 6d 75 6c | ed().?.'disabled(multi('.:.'(mul |
74e40 | 74 69 28 27 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 6c 69 74 65 72 61 6c 73 20 | ti(';..foreach.($this->literals. |
74e60 | 61 73 20 24 69 20 3d 3e 20 24 6c 69 74 65 72 61 6c 29 20 7b 0a 69 66 20 28 24 69 20 21 3d 3d 20 | as.$i.=>.$literal).{.if.($i.!==. |
74e80 | 30 29 20 7b 0a 24 72 65 73 75 6c 74 20 2e 3d 20 27 7c 27 3b 0a 7d 0a 24 72 65 73 75 6c 74 20 2e | 0).{.$result..=.'|';.}.$result.. |
74ea0 | 3d 20 24 6c 69 74 65 72 61 6c 3b 0a 7d 0a 0a 24 72 65 73 75 6c 74 20 2e 3d 20 27 29 29 27 3b 0a | =.$literal;.}..$result..=.'))';. |
74ec0 | 0a 72 65 74 75 72 6e 20 24 72 65 73 75 6c 74 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 | .return.$result;.}.}.<?php.decla |
74ee0 | 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e | re(strict_types=1);............n |
74f00 | 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f | amespace.Composer\DependencyReso |
74f20 | 6c 76 65 72 5c 4f 70 65 72 61 74 69 6f 6e 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 | lver\Operation;..use.Composer\Pa |
74f40 | 63 6b 61 67 65 5c 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 0a 0a 0a 0a 0a 0a 63 6c | ckage\PackageInterface;.......cl |
74f60 | 61 73 73 20 49 6e 73 74 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 20 65 78 74 65 6e 64 73 20 53 6f 6c | ass.InstallOperation.extends.Sol |
74f80 | 76 65 72 4f 70 65 72 61 74 69 6f 6e 20 69 6d 70 6c 65 6d 65 6e 74 73 20 4f 70 65 72 61 74 69 6f | verOperation.implements.Operatio |
74fa0 | 6e 49 6e 74 65 72 66 61 63 65 0a 7b 0a 70 72 6f 74 65 63 74 65 64 20 63 6f 6e 73 74 20 54 59 50 | nInterface.{.protected.const.TYP |
74fc0 | 45 20 3d 20 27 69 6e 73 74 61 6c 6c 27 3b 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 70 61 | E.=.'install';.....protected.$pa |
74fe0 | 63 6b 61 67 65 3b 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 | ckage;..public.function.__constr |
75000 | 75 63 74 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 29 0a 7b | uct(PackageInterface.$package).{ |
75020 | 0a 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 20 3d 20 24 70 61 63 6b 61 67 65 3b 0a 7d 0a 0a 0a | .$this->package.=.$package;.}... |
75040 | 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 50 61 63 6b 61 67 65 28 29 3a 20 | ..public.function.getPackage():. |
75060 | 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d | PackageInterface.{.return.$this- |
75080 | 3e 70 61 63 6b 61 67 65 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 | >package;.}.....public.function. |
750a0 | 73 68 6f 77 28 24 6c 6f 63 6b 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 73 65 6c | show($lock):.string.{.return.sel |
750c0 | 66 3a 3a 66 6f 72 6d 61 74 28 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 2c 20 24 6c 6f 63 6b 29 | f::format($this->package,.$lock) |
750e0 | 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 66 6f 72 6d | ;.}..public.static.function.form |
75100 | 61 74 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 62 6f | at(PackageInterface.$package,.bo |
75120 | 6f 6c 20 24 6c 6f 63 6b 20 3d 20 66 61 6c 73 65 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 | ol.$lock.=.false):.string.{.retu |
75140 | 72 6e 20 28 24 6c 6f 63 6b 20 3f 20 27 4c 6f 63 6b 69 6e 67 20 27 20 3a 20 27 49 6e 73 74 61 6c | rn.($lock.?.'Locking.'.:.'Instal |
75160 | 6c 69 6e 67 20 27 29 2e 27 3c 69 6e 66 6f 3e 27 2e 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 | ling.').'<info>'.$package->getPr |
75180 | 65 74 74 79 4e 61 6d 65 28 29 2e 27 3c 2f 69 6e 66 6f 3e 20 28 3c 63 6f 6d 6d 65 6e 74 3e 27 2e | ettyName().'</info>.(<comment>'. |
751a0 | 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 46 75 6c 6c 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 | $package->getFullPrettyVersion() |
751c0 | 2e 27 3c 2f 63 6f 6d 6d 65 6e 74 3e 29 27 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 | .'</comment>)';.}.}.<?php.declar |
751e0 | 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 | e(strict_types=1);............na |
75200 | 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c | mespace.Composer\DependencyResol |
75220 | 76 65 72 5c 4f 70 65 72 61 74 69 6f 6e 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 | ver\Operation;..use.Composer\Pac |
75240 | 6b 61 67 65 5c 41 6c 69 61 73 50 61 63 6b 61 67 65 3b 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 4d | kage\AliasPackage;.......class.M |
75260 | 61 72 6b 41 6c 69 61 73 49 6e 73 74 61 6c 6c 65 64 4f 70 65 72 61 74 69 6f 6e 20 65 78 74 65 6e | arkAliasInstalledOperation.exten |
75280 | 64 73 20 53 6f 6c 76 65 72 4f 70 65 72 61 74 69 6f 6e 20 69 6d 70 6c 65 6d 65 6e 74 73 20 4f 70 | ds.SolverOperation.implements.Op |
752a0 | 65 72 61 74 69 6f 6e 49 6e 74 65 72 66 61 63 65 0a 7b 0a 70 72 6f 74 65 63 74 65 64 20 63 6f 6e | erationInterface.{.protected.con |
752c0 | 73 74 20 54 59 50 45 20 3d 20 27 6d 61 72 6b 41 6c 69 61 73 49 6e 73 74 61 6c 6c 65 64 27 3b 0a | st.TYPE.=.'markAliasInstalled';. |
752e0 | 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 70 61 63 6b 61 67 65 3b 0a 0a 70 75 62 6c 69 63 20 | ....protected.$package;..public. |
75300 | 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 41 6c 69 61 73 50 61 63 6b 61 67 | function.__construct(AliasPackag |
75320 | 65 20 24 70 61 63 6b 61 67 65 29 0a 7b 0a 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 20 3d 20 24 | e.$package).{.$this->package.=.$ |
75340 | 70 61 63 6b 61 67 65 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 | package;.}.....public.function.g |
75360 | 65 74 50 61 63 6b 61 67 65 28 29 3a 20 41 6c 69 61 73 50 61 63 6b 61 67 65 0a 7b 0a 72 65 74 75 | etPackage():.AliasPackage.{.retu |
75380 | 72 6e 20 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 | rn.$this->package;.}.....public. |
753a0 | 66 75 6e 63 74 69 6f 6e 20 73 68 6f 77 28 24 6c 6f 63 6b 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 | function.show($lock):.string.{.r |
753c0 | 65 74 75 72 6e 20 27 4d 61 72 6b 69 6e 67 20 3c 69 6e 66 6f 3e 27 2e 24 74 68 69 73 2d 3e 70 61 | eturn.'Marking.<info>'.$this->pa |
753e0 | 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 4e 61 6d 65 28 29 2e 27 3c 2f 69 6e 66 6f 3e 20 | ckage->getPrettyName().'</info>. |
75400 | 28 3c 63 6f 6d 6d 65 6e 74 3e 27 2e 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 2d 3e 67 65 74 46 | (<comment>'.$this->package->getF |
75420 | 75 6c 6c 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 2e 27 3c 2f 63 6f 6d 6d 65 6e 74 3e 29 20 | ullPrettyVersion().'</comment>). |
75440 | 61 73 20 69 6e 73 74 61 6c 6c 65 64 2c 20 61 6c 69 61 73 20 6f 66 20 3c 69 6e 66 6f 3e 27 2e 24 | as.installed,.alias.of.<info>'.$ |
75460 | 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 2d 3e 67 65 74 41 6c 69 61 73 4f 66 28 29 2d 3e 67 65 74 | this->package->getAliasOf()->get |
75480 | 50 72 65 74 74 79 4e 61 6d 65 28 29 2e 27 3c 2f 69 6e 66 6f 3e 20 28 3c 63 6f 6d 6d 65 6e 74 3e | PrettyName().'</info>.(<comment> |
754a0 | 27 2e 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 2d 3e 67 65 74 41 6c 69 61 73 4f 66 28 29 2d 3e | '.$this->package->getAliasOf()-> |
754c0 | 67 65 74 46 75 6c 6c 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 2e 27 3c 2f 63 6f 6d 6d 65 6e | getFullPrettyVersion().'</commen |
754e0 | 74 3e 29 27 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 | t>)';.}.}.<?php.declare(strict_t |
75500 | 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f | ypes=1);............namespace.Co |
75520 | 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 5c 4f 70 65 72 61 74 | mposer\DependencyResolver\Operat |
75540 | 69 6f 6e 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 41 6c 69 61 73 | ion;..use.Composer\Package\Alias |
75560 | 50 61 63 6b 61 67 65 3b 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 4d 61 72 6b 41 6c 69 61 73 55 6e | Package;.......class.MarkAliasUn |
75580 | 69 6e 73 74 61 6c 6c 65 64 4f 70 65 72 61 74 69 6f 6e 20 65 78 74 65 6e 64 73 20 53 6f 6c 76 65 | installedOperation.extends.Solve |
755a0 | 72 4f 70 65 72 61 74 69 6f 6e 20 69 6d 70 6c 65 6d 65 6e 74 73 20 4f 70 65 72 61 74 69 6f 6e 49 | rOperation.implements.OperationI |
755c0 | 6e 74 65 72 66 61 63 65 0a 7b 0a 70 72 6f 74 65 63 74 65 64 20 63 6f 6e 73 74 20 54 59 50 45 20 | nterface.{.protected.const.TYPE. |
755e0 | 3d 20 27 6d 61 72 6b 41 6c 69 61 73 55 6e 69 6e 73 74 61 6c 6c 65 64 27 3b 0a 0a 0a 0a 0a 70 72 | =.'markAliasUninstalled';.....pr |
75600 | 6f 74 65 63 74 65 64 20 24 70 61 63 6b 61 67 65 3b 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 | otected.$package;..public.functi |
75620 | 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 41 6c 69 61 73 50 61 63 6b 61 67 65 20 24 70 61 63 | on.__construct(AliasPackage.$pac |
75640 | 6b 61 67 65 29 0a 7b 0a 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 20 3d 20 24 70 61 63 6b 61 67 | kage).{.$this->package.=.$packag |
75660 | 65 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 50 61 63 6b | e;.}.....public.function.getPack |
75680 | 61 67 65 28 29 3a 20 41 6c 69 61 73 50 61 63 6b 61 67 65 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 | age():.AliasPackage.{.return.$th |
756a0 | 69 73 2d 3e 70 61 63 6b 61 67 65 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 | is->package;.}.....public.functi |
756c0 | 6f 6e 20 73 68 6f 77 28 24 6c 6f 63 6b 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 | on.show($lock):.string.{.return. |
756e0 | 27 4d 61 72 6b 69 6e 67 20 3c 69 6e 66 6f 3e 27 2e 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 2d | 'Marking.<info>'.$this->package- |
75700 | 3e 67 65 74 50 72 65 74 74 79 4e 61 6d 65 28 29 2e 27 3c 2f 69 6e 66 6f 3e 20 28 3c 63 6f 6d 6d | >getPrettyName().'</info>.(<comm |
75720 | 65 6e 74 3e 27 2e 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 2d 3e 67 65 74 46 75 6c 6c 50 72 65 | ent>'.$this->package->getFullPre |
75740 | 74 74 79 56 65 72 73 69 6f 6e 28 29 2e 27 3c 2f 63 6f 6d 6d 65 6e 74 3e 29 20 61 73 20 75 6e 69 | ttyVersion().'</comment>).as.uni |
75760 | 6e 73 74 61 6c 6c 65 64 2c 20 61 6c 69 61 73 20 6f 66 20 3c 69 6e 66 6f 3e 27 2e 24 74 68 69 73 | nstalled,.alias.of.<info>'.$this |
75780 | 2d 3e 70 61 63 6b 61 67 65 2d 3e 67 65 74 41 6c 69 61 73 4f 66 28 29 2d 3e 67 65 74 50 72 65 74 | ->package->getAliasOf()->getPret |
757a0 | 74 79 4e 61 6d 65 28 29 2e 27 3c 2f 69 6e 66 6f 3e 20 28 3c 63 6f 6d 6d 65 6e 74 3e 27 2e 24 74 | tyName().'</info>.(<comment>'.$t |
757c0 | 68 69 73 2d 3e 70 61 63 6b 61 67 65 2d 3e 67 65 74 41 6c 69 61 73 4f 66 28 29 2d 3e 67 65 74 46 | his->package->getAliasOf()->getF |
757e0 | 75 6c 6c 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 2e 27 3c 2f 63 6f 6d 6d 65 6e 74 3e 29 27 | ullPrettyVersion().'</comment>)' |
75800 | 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 | ;.}.}.<?php.declare(strict_types |
75820 | 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 | =1);............namespace.Compos |
75840 | 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 5c 4f 70 65 72 61 74 69 6f 6e 3b | er\DependencyResolver\Operation; |
75860 | 0a 0a 0a 0a 0a 0a 0a 69 6e 74 65 72 66 61 63 65 20 4f 70 65 72 61 74 69 6f 6e 49 6e 74 65 72 66 | .......interface.OperationInterf |
75880 | 61 63 65 0a 7b 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 4f 70 | ace.{......public.function.getOp |
758a0 | 65 72 61 74 69 6f 6e 54 79 70 65 28 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e | erationType();........public.fun |
758c0 | 63 74 69 6f 6e 20 73 68 6f 77 28 62 6f 6f 6c 20 24 6c 6f 63 6b 29 3b 0a 0a 0a 0a 0a 0a 0a 70 75 | ction.show(bool.$lock);.......pu |
758e0 | 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 74 6f 53 74 72 69 6e 67 28 29 3b 0a 7d 0a 3c 3f | blic.function.__toString();.}.<? |
75900 | 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a | php.declare(strict_types=1);.... |
75920 | 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 44 65 70 65 6e | ........namespace.Composer\Depen |
75940 | 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 5c 4f 70 65 72 61 74 69 6f 6e 3b 0a 0a 0a 0a 0a 0a 0a 61 | dencyResolver\Operation;.......a |
75960 | 62 73 74 72 61 63 74 20 63 6c 61 73 73 20 53 6f 6c 76 65 72 4f 70 65 72 61 74 69 6f 6e 20 69 6d | bstract.class.SolverOperation.im |
75980 | 70 6c 65 6d 65 6e 74 73 20 4f 70 65 72 61 74 69 6f 6e 49 6e 74 65 72 66 61 63 65 0a 7b 0a 0a 0a | plements.OperationInterface.{... |
759a0 | 0a 70 72 6f 74 65 63 74 65 64 20 63 6f 6e 73 74 20 54 59 50 45 20 3d 20 27 27 3b 0a 0a 0a 0a 0a | .protected.const.TYPE.=.'';..... |
759c0 | 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 4f 70 65 72 61 74 69 6f 6e 54 79 70 65 | public.function.getOperationType |
759e0 | 28 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 73 74 61 74 69 63 3a 3a 54 59 50 45 | ():.string.{.return.static::TYPE |
75a00 | 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 74 6f 53 74 72 69 | ;.}.....public.function.__toStri |
75a20 | 6e 67 28 29 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 73 68 6f 77 28 66 61 6c 73 65 29 | ng().{.return.$this->show(false) |
75a40 | 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 | ;.}.}.<?php.declare(strict_types |
75a60 | 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 | =1);............namespace.Compos |
75a80 | 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 5c 4f 70 65 72 61 74 69 6f 6e 3b | er\DependencyResolver\Operation; |
75aa0 | 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 50 61 63 6b 61 67 65 49 6e | ..use.Composer\Package\PackageIn |
75ac0 | 74 65 72 66 61 63 65 3b 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 55 6e 69 6e 73 74 61 6c 6c 4f 70 | terface;.......class.UninstallOp |
75ae0 | 65 72 61 74 69 6f 6e 20 65 78 74 65 6e 64 73 20 53 6f 6c 76 65 72 4f 70 65 72 61 74 69 6f 6e 20 | eration.extends.SolverOperation. |
75b00 | 69 6d 70 6c 65 6d 65 6e 74 73 20 4f 70 65 72 61 74 69 6f 6e 49 6e 74 65 72 66 61 63 65 0a 7b 0a | implements.OperationInterface.{. |
75b20 | 70 72 6f 74 65 63 74 65 64 20 63 6f 6e 73 74 20 54 59 50 45 20 3d 20 27 75 6e 69 6e 73 74 61 6c | protected.const.TYPE.=.'uninstal |
75b40 | 6c 27 3b 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 70 61 63 6b 61 67 65 3b 0a 0a 70 75 62 | l';.....protected.$package;..pub |
75b60 | 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 50 61 63 6b 61 67 65 | lic.function.__construct(Package |
75b80 | 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 29 0a 7b 0a 24 74 68 69 73 2d 3e 70 61 63 | Interface.$package).{.$this->pac |
75ba0 | 6b 61 67 65 20 3d 20 24 70 61 63 6b 61 67 65 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 | kage.=.$package;.}.....public.fu |
75bc0 | 6e 63 74 69 6f 6e 20 67 65 74 50 61 63 6b 61 67 65 28 29 3a 20 50 61 63 6b 61 67 65 49 6e 74 65 | nction.getPackage():.PackageInte |
75be0 | 72 66 61 63 65 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 3b 0a 7d | rface.{.return.$this->package;.} |
75c00 | 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 68 6f 77 28 24 6c 6f 63 6b 29 | .....public.function.show($lock) |
75c20 | 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 73 65 6c 66 3a 3a 66 6f 72 6d 61 74 28 24 | :.string.{.return.self::format($ |
75c40 | 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 2c 20 24 6c 6f 63 6b 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 | this->package,.$lock);.}..public |
75c60 | 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 66 6f 72 6d 61 74 28 50 61 63 6b 61 67 65 49 | .static.function.format(PackageI |
75c80 | 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 62 6f 6f 6c 20 24 6c 6f 63 6b 20 3d 20 | nterface.$package,.bool.$lock.=. |
75ca0 | 66 61 6c 73 65 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 27 52 65 6d 6f 76 69 6e | false):.string.{.return.'Removin |
75cc0 | 67 20 3c 69 6e 66 6f 3e 27 2e 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 4e 61 6d | g.<info>'.$package->getPrettyNam |
75ce0 | 65 28 29 2e 27 3c 2f 69 6e 66 6f 3e 20 28 3c 63 6f 6d 6d 65 6e 74 3e 27 2e 24 70 61 63 6b 61 67 | e().'</info>.(<comment>'.$packag |
75d00 | 65 2d 3e 67 65 74 46 75 6c 6c 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 2e 27 3c 2f 63 6f 6d | e->getFullPrettyVersion().'</com |
75d20 | 6d 65 6e 74 3e 29 27 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 | ment>)';.}.}.<?php.declare(stric |
75d40 | 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 | t_types=1);............namespace |
75d60 | 20 43 6f 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 5c 4f 70 65 | .Composer\DependencyResolver\Ope |
75d80 | 72 61 74 69 6f 6e 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 50 61 | ration;..use.Composer\Package\Pa |
75da0 | 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 | ckageInterface;.use.Composer\Pac |
75dc0 | 6b 61 67 65 5c 56 65 72 73 69 6f 6e 5c 56 65 72 73 69 6f 6e 50 61 72 73 65 72 3b 0a 0a 0a 0a 0a | kage\Version\VersionParser;..... |
75de0 | 0a 0a 63 6c 61 73 73 20 55 70 64 61 74 65 4f 70 65 72 61 74 69 6f 6e 20 65 78 74 65 6e 64 73 20 | ..class.UpdateOperation.extends. |
75e00 | 53 6f 6c 76 65 72 4f 70 65 72 61 74 69 6f 6e 20 69 6d 70 6c 65 6d 65 6e 74 73 20 4f 70 65 72 61 | SolverOperation.implements.Opera |
75e20 | 74 69 6f 6e 49 6e 74 65 72 66 61 63 65 0a 7b 0a 70 72 6f 74 65 63 74 65 64 20 63 6f 6e 73 74 20 | tionInterface.{.protected.const. |
75e40 | 54 59 50 45 20 3d 20 27 75 70 64 61 74 65 27 3b 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 | TYPE.=.'update';.....protected.$ |
75e60 | 69 6e 69 74 69 61 6c 50 61 63 6b 61 67 65 3b 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 74 | initialPackage;.....protected.$t |
75e80 | 61 72 67 65 74 50 61 63 6b 61 67 65 3b 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 | argetPackage;......public.functi |
75ea0 | 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 | on.__construct(PackageInterface. |
75ec0 | 24 69 6e 69 74 69 61 6c 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 74 61 72 67 | $initial,.PackageInterface.$targ |
75ee0 | 65 74 29 0a 7b 0a 24 74 68 69 73 2d 3e 69 6e 69 74 69 61 6c 50 61 63 6b 61 67 65 20 3d 20 24 69 | et).{.$this->initialPackage.=.$i |
75f00 | 6e 69 74 69 61 6c 3b 0a 24 74 68 69 73 2d 3e 74 61 72 67 65 74 50 61 63 6b 61 67 65 20 3d 20 24 | nitial;.$this->targetPackage.=.$ |
75f20 | 74 61 72 67 65 74 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 | target;.}.....public.function.ge |
75f40 | 74 49 6e 69 74 69 61 6c 50 61 63 6b 61 67 65 28 29 3a 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 | tInitialPackage():.PackageInterf |
75f60 | 61 63 65 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 69 6e 69 74 69 61 6c 50 61 63 6b 61 | ace.{.return.$this->initialPacka |
75f80 | 67 65 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 54 61 72 | ge;.}.....public.function.getTar |
75fa0 | 67 65 74 50 61 63 6b 61 67 65 28 29 3a 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 0a 7b | getPackage():.PackageInterface.{ |
75fc0 | 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 74 61 72 67 65 74 50 61 63 6b 61 67 65 3b 0a 7d 0a | .return.$this->targetPackage;.}. |
75fe0 | 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 68 6f 77 28 24 6c 6f 63 6b 29 3a | ....public.function.show($lock): |
76000 | 20 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 73 65 6c 66 3a 3a 66 6f 72 6d 61 74 28 24 74 | .string.{.return.self::format($t |
76020 | 68 69 73 2d 3e 69 6e 69 74 69 61 6c 50 61 63 6b 61 67 65 2c 20 24 74 68 69 73 2d 3e 74 61 72 67 | his->initialPackage,.$this->targ |
76040 | 65 74 50 61 63 6b 61 67 65 2c 20 24 6c 6f 63 6b 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 73 74 61 | etPackage,.$lock);.}..public.sta |
76060 | 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 66 6f 72 6d 61 74 28 50 61 63 6b 61 67 65 49 6e 74 65 72 | tic.function.format(PackageInter |
76080 | 66 61 63 65 20 24 69 6e 69 74 69 61 6c 50 61 63 6b 61 67 65 2c 20 50 61 63 6b 61 67 65 49 6e 74 | face.$initialPackage,.PackageInt |
760a0 | 65 72 66 61 63 65 20 24 74 61 72 67 65 74 50 61 63 6b 61 67 65 2c 20 62 6f 6f 6c 20 24 6c 6f 63 | erface.$targetPackage,.bool.$loc |
760c0 | 6b 20 3d 20 66 61 6c 73 65 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 24 66 72 6f 6d 56 65 72 73 69 6f | k.=.false):.string.{.$fromVersio |
760e0 | 6e 20 3d 20 24 69 6e 69 74 69 61 6c 50 61 63 6b 61 67 65 2d 3e 67 65 74 46 75 6c 6c 50 72 65 74 | n.=.$initialPackage->getFullPret |
76100 | 74 79 56 65 72 73 69 6f 6e 28 29 3b 0a 24 74 6f 56 65 72 73 69 6f 6e 20 3d 20 24 74 61 72 67 65 | tyVersion();.$toVersion.=.$targe |
76120 | 74 50 61 63 6b 61 67 65 2d 3e 67 65 74 46 75 6c 6c 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 | tPackage->getFullPrettyVersion() |
76140 | 3b 0a 0a 69 66 20 28 24 66 72 6f 6d 56 65 72 73 69 6f 6e 20 3d 3d 3d 20 24 74 6f 56 65 72 73 69 | ;..if.($fromVersion.===.$toVersi |
76160 | 6f 6e 20 26 26 20 24 69 6e 69 74 69 61 6c 50 61 63 6b 61 67 65 2d 3e 67 65 74 53 6f 75 72 63 65 | on.&&.$initialPackage->getSource |
76180 | 52 65 66 65 72 65 6e 63 65 28 29 20 21 3d 3d 20 24 74 61 72 67 65 74 50 61 63 6b 61 67 65 2d 3e | Reference().!==.$targetPackage-> |
761a0 | 67 65 74 53 6f 75 72 63 65 52 65 66 65 72 65 6e 63 65 28 29 29 20 7b 0a 24 66 72 6f 6d 56 65 72 | getSourceReference()).{.$fromVer |
761c0 | 73 69 6f 6e 20 3d 20 24 69 6e 69 74 69 61 6c 50 61 63 6b 61 67 65 2d 3e 67 65 74 46 75 6c 6c 50 | sion.=.$initialPackage->getFullP |
761e0 | 72 65 74 74 79 56 65 72 73 69 6f 6e 28 74 72 75 65 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 | rettyVersion(true,.PackageInterf |
76200 | 61 63 65 3a 3a 44 49 53 50 4c 41 59 5f 53 4f 55 52 43 45 5f 52 45 46 29 3b 0a 24 74 6f 56 65 72 | ace::DISPLAY_SOURCE_REF);.$toVer |
76220 | 73 69 6f 6e 20 3d 20 24 74 61 72 67 65 74 50 61 63 6b 61 67 65 2d 3e 67 65 74 46 75 6c 6c 50 72 | sion.=.$targetPackage->getFullPr |
76240 | 65 74 74 79 56 65 72 73 69 6f 6e 28 74 72 75 65 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 | ettyVersion(true,.PackageInterfa |
76260 | 63 65 3a 3a 44 49 53 50 4c 41 59 5f 53 4f 55 52 43 45 5f 52 45 46 29 3b 0a 7d 20 65 6c 73 65 69 | ce::DISPLAY_SOURCE_REF);.}.elsei |
76280 | 66 20 28 24 66 72 6f 6d 56 65 72 73 69 6f 6e 20 3d 3d 3d 20 24 74 6f 56 65 72 73 69 6f 6e 20 26 | f.($fromVersion.===.$toVersion.& |
762a0 | 26 20 24 69 6e 69 74 69 61 6c 50 61 63 6b 61 67 65 2d 3e 67 65 74 44 69 73 74 52 65 66 65 72 65 | &.$initialPackage->getDistRefere |
762c0 | 6e 63 65 28 29 20 21 3d 3d 20 24 74 61 72 67 65 74 50 61 63 6b 61 67 65 2d 3e 67 65 74 44 69 73 | nce().!==.$targetPackage->getDis |
762e0 | 74 52 65 66 65 72 65 6e 63 65 28 29 29 20 7b 0a 24 66 72 6f 6d 56 65 72 73 69 6f 6e 20 3d 20 24 | tReference()).{.$fromVersion.=.$ |
76300 | 69 6e 69 74 69 61 6c 50 61 63 6b 61 67 65 2d 3e 67 65 74 46 75 6c 6c 50 72 65 74 74 79 56 65 72 | initialPackage->getFullPrettyVer |
76320 | 73 69 6f 6e 28 74 72 75 65 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3a 3a 44 49 53 | sion(true,.PackageInterface::DIS |
76340 | 50 4c 41 59 5f 44 49 53 54 5f 52 45 46 29 3b 0a 24 74 6f 56 65 72 73 69 6f 6e 20 3d 20 24 74 61 | PLAY_DIST_REF);.$toVersion.=.$ta |
76360 | 72 67 65 74 50 61 63 6b 61 67 65 2d 3e 67 65 74 46 75 6c 6c 50 72 65 74 74 79 56 65 72 73 69 6f | rgetPackage->getFullPrettyVersio |
76380 | 6e 28 74 72 75 65 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3a 3a 44 49 53 50 4c 41 | n(true,.PackageInterface::DISPLA |
763a0 | 59 5f 44 49 53 54 5f 52 45 46 29 3b 0a 7d 0a 0a 24 61 63 74 69 6f 6e 4e 61 6d 65 20 3d 20 56 65 | Y_DIST_REF);.}..$actionName.=.Ve |
763c0 | 72 73 69 6f 6e 50 61 72 73 65 72 3a 3a 69 73 55 70 67 72 61 64 65 28 24 69 6e 69 74 69 61 6c 50 | rsionParser::isUpgrade($initialP |
763e0 | 61 63 6b 61 67 65 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 2c 20 24 74 61 72 67 65 74 50 61 63 | ackage->getVersion(),.$targetPac |
76400 | 6b 61 67 65 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 29 20 3f 20 27 55 70 67 72 61 64 69 6e 67 | kage->getVersion()).?.'Upgrading |
76420 | 27 20 3a 20 27 44 6f 77 6e 67 72 61 64 69 6e 67 27 3b 0a 0a 72 65 74 75 72 6e 20 24 61 63 74 69 | '.:.'Downgrading';..return.$acti |
76440 | 6f 6e 4e 61 6d 65 2e 27 20 3c 69 6e 66 6f 3e 27 2e 24 69 6e 69 74 69 61 6c 50 61 63 6b 61 67 65 | onName.'.<info>'.$initialPackage |
76460 | 2d 3e 67 65 74 50 72 65 74 74 79 4e 61 6d 65 28 29 2e 27 3c 2f 69 6e 66 6f 3e 20 28 3c 63 6f 6d | ->getPrettyName().'</info>.(<com |
76480 | 6d 65 6e 74 3e 27 2e 24 66 72 6f 6d 56 65 72 73 69 6f 6e 2e 27 3c 2f 63 6f 6d 6d 65 6e 74 3e 20 | ment>'.$fromVersion.'</comment>. |
764a0 | 3d 3e 20 3c 63 6f 6d 6d 65 6e 74 3e 27 2e 24 74 6f 56 65 72 73 69 6f 6e 2e 27 3c 2f 63 6f 6d 6d | =>.<comment>'.$toVersion.'</comm |
764c0 | 65 6e 74 3e 29 27 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 | ent>)';.}.}.<?php.declare(strict |
764e0 | 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 | _types=1);............namespace. |
76500 | 43 6f 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 3b 0a 0a 75 73 | Composer\DependencyResolver;..us |
76520 | 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 50 61 63 6b 61 67 65 49 6e 74 65 72 66 | e.Composer\Package\PackageInterf |
76540 | 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 65 6d 76 65 72 5c 43 6f 6e 73 74 72 61 | ace;.use.Composer\Semver\Constra |
76560 | 69 6e 74 5c 43 6f 6e 73 74 72 61 69 6e 74 3b 0a 0a 0a 0a 0a 69 6e 74 65 72 66 61 63 65 20 50 6f | int\Constraint;.....interface.Po |
76580 | 6c 69 63 79 49 6e 74 65 72 66 61 63 65 0a 7b 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 | licyInterface.{....public.functi |
765a0 | 6f 6e 20 76 65 72 73 69 6f 6e 43 6f 6d 70 61 72 65 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 | on.versionCompare(PackageInterfa |
765c0 | 63 65 20 24 61 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 62 2c 20 73 74 72 69 | ce.$a,.PackageInterface.$b,.stri |
765e0 | 6e 67 20 24 6f 70 65 72 61 74 6f 72 29 3a 20 62 6f 6f 6c 3b 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 | ng.$operator):.bool;......public |
76600 | 20 66 75 6e 63 74 69 6f 6e 20 73 65 6c 65 63 74 50 72 65 66 65 72 72 65 64 50 61 63 6b 61 67 65 | .function.selectPreferredPackage |
76620 | 73 28 50 6f 6f 6c 20 24 70 6f 6f 6c 2c 20 61 72 72 61 79 20 24 6c 69 74 65 72 61 6c 73 2c 20 3f | s(Pool.$pool,.array.$literals,.? |
76640 | 73 74 72 69 6e 67 20 24 72 65 71 75 69 72 65 64 50 61 63 6b 61 67 65 20 3d 20 6e 75 6c 6c 29 3a | string.$requiredPackage.=.null): |
76660 | 20 61 72 72 61 79 3b 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 | .array;.}.<?php.declare(strict_t |
76680 | 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f | ypes=1);............namespace.Co |
766a0 | 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 3b 0a 0a 75 73 65 20 | mposer\DependencyResolver;..use. |
766c0 | 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 42 61 73 65 50 61 63 6b 61 67 65 3b 0a 75 73 | Composer\Package\BasePackage;.us |
766e0 | 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 56 65 72 73 69 6f 6e 5c 56 65 72 73 69 | e.Composer\Package\Version\Versi |
76700 | 6f 6e 50 61 72 73 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 65 6d 76 65 72 5c 43 6f | onParser;.use.Composer\Semver\Co |
76720 | 6d 70 69 6c 69 6e 67 4d 61 74 63 68 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 65 6d | mpilingMatcher;.use.Composer\Sem |
76740 | 76 65 72 5c 43 6f 6e 73 74 72 61 69 6e 74 5c 43 6f 6e 73 74 72 61 69 6e 74 49 6e 74 65 72 66 61 | ver\Constraint\ConstraintInterfa |
76760 | 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 65 6d 76 65 72 5c 43 6f 6e 73 74 72 61 69 | ce;.use.Composer\Semver\Constrai |
76780 | 6e 74 5c 43 6f 6e 73 74 72 61 69 6e 74 3b 0a 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 50 6f 6f 6c | nt\Constraint;........class.Pool |
767a0 | 20 69 6d 70 6c 65 6d 65 6e 74 73 20 5c 43 6f 75 6e 74 61 62 6c 65 0a 7b 0a 0a 70 72 6f 74 65 63 | .implements.\Countable.{..protec |
767c0 | 74 65 64 20 24 70 61 63 6b 61 67 65 73 20 3d 20 5b 5d 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 | ted.$packages.=.[];..protected.$ |
767e0 | 70 61 63 6b 61 67 65 42 79 4e 61 6d 65 20 3d 20 5b 5d 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 | packageByName.=.[];..protected.$ |
76800 | 76 65 72 73 69 6f 6e 50 61 72 73 65 72 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 70 72 6f 76 69 | versionParser;..protected.$provi |
76820 | 64 65 72 43 61 63 68 65 20 3d 20 5b 5d 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 75 6e 61 63 63 | derCache.=.[];..protected.$unacc |
76840 | 65 70 74 61 62 6c 65 46 69 78 65 64 4f 72 4c 6f 63 6b 65 64 50 61 63 6b 61 67 65 73 3b 0a 0a 70 | eptableFixedOrLockedPackages;..p |
76860 | 72 6f 74 65 63 74 65 64 20 24 72 65 6d 6f 76 65 64 56 65 72 73 69 6f 6e 73 20 3d 20 5b 5d 3b 0a | rotected.$removedVersions.=.[];. |
76880 | 0a 70 72 6f 74 65 63 74 65 64 20 24 72 65 6d 6f 76 65 64 56 65 72 73 69 6f 6e 73 42 79 50 61 63 | .protected.$removedVersionsByPac |
768a0 | 6b 61 67 65 20 3d 20 5b 5d 3b 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f | kage.=.[];........public.functio |
768c0 | 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 61 72 72 61 79 20 24 70 61 63 6b 61 67 65 73 20 3d 20 | n.__construct(array.$packages.=. |
768e0 | 5b 5d 2c 20 61 72 72 61 79 20 24 75 6e 61 63 63 65 70 74 61 62 6c 65 46 69 78 65 64 4f 72 4c 6f | [],.array.$unacceptableFixedOrLo |
76900 | 63 6b 65 64 50 61 63 6b 61 67 65 73 20 3d 20 5b 5d 2c 20 61 72 72 61 79 20 24 72 65 6d 6f 76 65 | ckedPackages.=.[],.array.$remove |
76920 | 64 56 65 72 73 69 6f 6e 73 20 3d 20 5b 5d 2c 20 61 72 72 61 79 20 24 72 65 6d 6f 76 65 64 56 65 | dVersions.=.[],.array.$removedVe |
76940 | 72 73 69 6f 6e 73 42 79 50 61 63 6b 61 67 65 20 3d 20 5b 5d 29 0a 7b 0a 24 74 68 69 73 2d 3e 76 | rsionsByPackage.=.[]).{.$this->v |
76960 | 65 72 73 69 6f 6e 50 61 72 73 65 72 20 3d 20 6e 65 77 20 56 65 72 73 69 6f 6e 50 61 72 73 65 72 | ersionParser.=.new.VersionParser |
76980 | 3b 0a 24 74 68 69 73 2d 3e 73 65 74 50 61 63 6b 61 67 65 73 28 24 70 61 63 6b 61 67 65 73 29 3b | ;.$this->setPackages($packages); |
769a0 | 0a 24 74 68 69 73 2d 3e 75 6e 61 63 63 65 70 74 61 62 6c 65 46 69 78 65 64 4f 72 4c 6f 63 6b 65 | .$this->unacceptableFixedOrLocke |
769c0 | 64 50 61 63 6b 61 67 65 73 20 3d 20 24 75 6e 61 63 63 65 70 74 61 62 6c 65 46 69 78 65 64 4f 72 | dPackages.=.$unacceptableFixedOr |
769e0 | 4c 6f 63 6b 65 64 50 61 63 6b 61 67 65 73 3b 0a 24 74 68 69 73 2d 3e 72 65 6d 6f 76 65 64 56 65 | LockedPackages;.$this->removedVe |
76a00 | 72 73 69 6f 6e 73 20 3d 20 24 72 65 6d 6f 76 65 64 56 65 72 73 69 6f 6e 73 3b 0a 24 74 68 69 73 | rsions.=.$removedVersions;.$this |
76a20 | 2d 3e 72 65 6d 6f 76 65 64 56 65 72 73 69 6f 6e 73 42 79 50 61 63 6b 61 67 65 20 3d 20 24 72 65 | ->removedVersionsByPackage.=.$re |
76a40 | 6d 6f 76 65 64 56 65 72 73 69 6f 6e 73 42 79 50 61 63 6b 61 67 65 3b 0a 7d 0a 0a 0a 0a 0a 70 75 | movedVersionsByPackage;.}.....pu |
76a60 | 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 52 65 6d 6f 76 65 64 56 65 72 73 69 6f 6e 73 | blic.function.getRemovedVersions |
76a80 | 28 73 74 72 69 6e 67 20 24 6e 61 6d 65 2c 20 43 6f 6e 73 74 72 61 69 6e 74 49 6e 74 65 72 66 61 | (string.$name,.ConstraintInterfa |
76aa0 | 63 65 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 3a 20 61 72 72 61 79 0a 7b 0a 69 66 20 28 21 69 73 | ce.$constraint):.array.{.if.(!is |
76ac0 | 73 65 74 28 24 74 68 69 73 2d 3e 72 65 6d 6f 76 65 64 56 65 72 73 69 6f 6e 73 5b 24 6e 61 6d 65 | set($this->removedVersions[$name |
76ae0 | 5d 29 29 20 7b 0a 72 65 74 75 72 6e 20 5b 5d 3b 0a 7d 0a 0a 24 72 65 73 75 6c 74 20 3d 20 5b 5d | ])).{.return.[];.}..$result.=.[] |
76b00 | 3b 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 72 65 6d 6f 76 65 64 56 65 72 73 69 6f 6e | ;.foreach.($this->removedVersion |
76b20 | 73 5b 24 6e 61 6d 65 5d 20 61 73 20 24 76 65 72 73 69 6f 6e 20 3d 3e 20 24 70 72 65 74 74 79 56 | s[$name].as.$version.=>.$prettyV |
76b40 | 65 72 73 69 6f 6e 29 20 7b 0a 69 66 20 28 24 63 6f 6e 73 74 72 61 69 6e 74 2d 3e 6d 61 74 63 68 | ersion).{.if.($constraint->match |
76b60 | 65 73 28 6e 65 77 20 43 6f 6e 73 74 72 61 69 6e 74 28 27 3d 3d 27 2c 20 24 76 65 72 73 69 6f 6e | es(new.Constraint('==',.$version |
76b80 | 29 29 29 20 7b 0a 24 72 65 73 75 6c 74 5b 24 76 65 72 73 69 6f 6e 5d 20 3d 20 24 70 72 65 74 74 | ))).{.$result[$version].=.$prett |
76ba0 | 79 56 65 72 73 69 6f 6e 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 72 65 73 75 6c 74 3b 0a 7d | yVersion;.}.}..return.$result;.} |
76bc0 | 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 52 65 6d 6f 76 65 64 56 | .....public.function.getRemovedV |
76be0 | 65 72 73 69 6f 6e 73 42 79 50 61 63 6b 61 67 65 28 73 74 72 69 6e 67 20 24 6f 62 6a 65 63 74 48 | ersionsByPackage(string.$objectH |
76c00 | 61 73 68 29 3a 20 61 72 72 61 79 0a 7b 0a 69 66 20 28 21 69 73 73 65 74 28 24 74 68 69 73 2d 3e | ash):.array.{.if.(!isset($this-> |
76c20 | 72 65 6d 6f 76 65 64 56 65 72 73 69 6f 6e 73 42 79 50 61 63 6b 61 67 65 5b 24 6f 62 6a 65 63 74 | removedVersionsByPackage[$object |
76c40 | 48 61 73 68 5d 29 29 20 7b 0a 72 65 74 75 72 6e 20 5b 5d 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 | Hash])).{.return.[];.}..return.$ |
76c60 | 74 68 69 73 2d 3e 72 65 6d 6f 76 65 64 56 65 72 73 69 6f 6e 73 42 79 50 61 63 6b 61 67 65 5b 24 | this->removedVersionsByPackage[$ |
76c80 | 6f 62 6a 65 63 74 48 61 73 68 5d 3b 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 | objectHash];.}.....private.funct |
76ca0 | 69 6f 6e 20 73 65 74 50 61 63 6b 61 67 65 73 28 61 72 72 61 79 20 24 70 61 63 6b 61 67 65 73 29 | ion.setPackages(array.$packages) |
76cc0 | 3a 20 76 6f 69 64 0a 7b 0a 24 69 64 20 3d 20 31 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 | :.void.{.$id.=.1;..foreach.($pac |
76ce0 | 6b 61 67 65 73 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 24 74 68 69 73 2d 3e 70 61 63 6b | kages.as.$package).{.$this->pack |
76d00 | 61 67 65 73 5b 5d 20 3d 20 24 70 61 63 6b 61 67 65 3b 0a 0a 24 70 61 63 6b 61 67 65 2d 3e 69 64 | ages[].=.$package;..$package->id |
76d20 | 20 3d 20 24 69 64 2b 2b 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 | .=.$id++;..foreach.($package->ge |
76d40 | 74 4e 61 6d 65 73 28 29 20 61 73 20 24 70 72 6f 76 69 64 65 64 29 20 7b 0a 24 74 68 69 73 2d 3e | tNames().as.$provided).{.$this-> |
76d60 | 70 61 63 6b 61 67 65 42 79 4e 61 6d 65 5b 24 70 72 6f 76 69 64 65 64 5d 5b 5d 20 3d 20 24 70 61 | packageByName[$provided][].=.$pa |
76d80 | 63 6b 61 67 65 3b 0a 7d 0a 7d 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e | ckage;.}.}.}.....public.function |
76da0 | 20 67 65 74 50 61 63 6b 61 67 65 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 | .getPackages():.array.{.return.$ |
76dc0 | 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 73 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e | this->packages;.}.....public.fun |
76de0 | 63 74 69 6f 6e 20 70 61 63 6b 61 67 65 42 79 49 64 28 69 6e 74 20 24 69 64 29 3a 20 42 61 73 65 | ction.packageById(int.$id):.Base |
76e00 | 50 61 63 6b 61 67 65 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 73 | Package.{.return.$this->packages |
76e20 | 5b 24 69 64 20 2d 20 31 5d 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e | [$id.-.1];.}.....public.function |
76e40 | 20 63 6f 75 6e 74 28 29 3a 20 69 6e 74 0a 7b 0a 72 65 74 75 72 6e 20 5c 63 6f 75 6e 74 28 24 74 | .count():.int.{.return.\count($t |
76e60 | 68 69 73 2d 3e 70 61 63 6b 61 67 65 73 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 | his->packages);.}..........publi |
76e80 | 63 20 66 75 6e 63 74 69 6f 6e 20 77 68 61 74 50 72 6f 76 69 64 65 73 28 73 74 72 69 6e 67 20 24 | c.function.whatProvides(string.$ |
76ea0 | 6e 61 6d 65 2c 20 3f 43 6f 6e 73 74 72 61 69 6e 74 49 6e 74 65 72 66 61 63 65 20 24 63 6f 6e 73 | name,.?ConstraintInterface.$cons |
76ec0 | 74 72 61 69 6e 74 20 3d 20 6e 75 6c 6c 29 3a 20 61 72 72 61 79 0a 7b 0a 24 6b 65 79 20 3d 20 28 | traint.=.null):.array.{.$key.=.( |
76ee0 | 73 74 72 69 6e 67 29 20 24 63 6f 6e 73 74 72 61 69 6e 74 3b 0a 69 66 20 28 69 73 73 65 74 28 24 | string).$constraint;.if.(isset($ |
76f00 | 74 68 69 73 2d 3e 70 72 6f 76 69 64 65 72 43 61 63 68 65 5b 24 6e 61 6d 65 5d 5b 24 6b 65 79 5d | this->providerCache[$name][$key] |
76f20 | 29 29 20 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 70 72 6f 76 69 64 65 72 43 61 63 68 65 | )).{.return.$this->providerCache |
76f40 | 5b 24 6e 61 6d 65 5d 5b 24 6b 65 79 5d 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e | [$name][$key];.}..return.$this-> |
76f60 | 70 72 6f 76 69 64 65 72 43 61 63 68 65 5b 24 6e 61 6d 65 5d 5b 24 6b 65 79 5d 20 3d 20 24 74 68 | providerCache[$name][$key].=.$th |
76f80 | 69 73 2d 3e 63 6f 6d 70 75 74 65 57 68 61 74 50 72 6f 76 69 64 65 73 28 24 6e 61 6d 65 2c 20 24 | is->computeWhatProvides($name,.$ |
76fa0 | 63 6f 6e 73 74 72 61 69 6e 74 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 | constraint);.}........private.fu |
76fc0 | 6e 63 74 69 6f 6e 20 63 6f 6d 70 75 74 65 57 68 61 74 50 72 6f 76 69 64 65 73 28 73 74 72 69 6e | nction.computeWhatProvides(strin |
76fe0 | 67 20 24 6e 61 6d 65 2c 20 3f 43 6f 6e 73 74 72 61 69 6e 74 49 6e 74 65 72 66 61 63 65 20 24 63 | g.$name,.?ConstraintInterface.$c |
77000 | 6f 6e 73 74 72 61 69 6e 74 20 3d 20 6e 75 6c 6c 29 3a 20 61 72 72 61 79 0a 7b 0a 69 66 20 28 21 | onstraint.=.null):.array.{.if.(! |
77020 | 69 73 73 65 74 28 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 42 79 4e 61 6d 65 5b 24 6e 61 6d 65 | isset($this->packageByName[$name |
77040 | 5d 29 29 20 7b 0a 72 65 74 75 72 6e 20 5b 5d 3b 0a 7d 0a 0a 24 6d 61 74 63 68 65 73 20 3d 20 5b | ])).{.return.[];.}..$matches.=.[ |
77060 | 5d 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 42 79 4e 61 6d | ];..foreach.($this->packageByNam |
77080 | 65 5b 24 6e 61 6d 65 5d 20 61 73 20 24 63 61 6e 64 69 64 61 74 65 29 20 7b 0a 69 66 20 28 24 74 | e[$name].as.$candidate).{.if.($t |
770a0 | 68 69 73 2d 3e 6d 61 74 63 68 28 24 63 61 6e 64 69 64 61 74 65 2c 20 24 6e 61 6d 65 2c 20 24 63 | his->match($candidate,.$name,.$c |
770c0 | 6f 6e 73 74 72 61 69 6e 74 29 29 20 7b 0a 24 6d 61 74 63 68 65 73 5b 5d 20 3d 20 24 63 61 6e 64 | onstraint)).{.$matches[].=.$cand |
770e0 | 69 64 61 74 65 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 6d 61 74 63 68 65 73 3b 0a 7d 0a 0a | idate;.}.}..return.$matches;.}.. |
77100 | 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 6c 69 74 65 72 61 6c 54 6f 50 61 63 6b 61 67 65 | public.function.literalToPackage |
77120 | 28 69 6e 74 20 24 6c 69 74 65 72 61 6c 29 3a 20 42 61 73 65 50 61 63 6b 61 67 65 0a 7b 0a 24 70 | (int.$literal):.BasePackage.{.$p |
77140 | 61 63 6b 61 67 65 49 64 20 3d 20 61 62 73 28 24 6c 69 74 65 72 61 6c 29 3b 0a 0a 72 65 74 75 72 | ackageId.=.abs($literal);..retur |
77160 | 6e 20 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 42 79 49 64 28 24 70 61 63 6b 61 67 65 49 64 29 | n.$this->packageById($packageId) |
77180 | 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 6c 69 74 65 72 61 6c 54 | ;.}.....public.function.literalT |
771a0 | 6f 50 72 65 74 74 79 53 74 72 69 6e 67 28 69 6e 74 20 24 6c 69 74 65 72 61 6c 2c 20 61 72 72 61 | oPrettyString(int.$literal,.arra |
771c0 | 79 20 24 69 6e 73 74 61 6c 6c 65 64 4d 61 70 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 24 70 61 63 6b | y.$installedMap):.string.{.$pack |
771e0 | 61 67 65 20 3d 20 24 74 68 69 73 2d 3e 6c 69 74 65 72 61 6c 54 6f 50 61 63 6b 61 67 65 28 24 6c | age.=.$this->literalToPackage($l |
77200 | 69 74 65 72 61 6c 29 3b 0a 0a 69 66 20 28 69 73 73 65 74 28 24 69 6e 73 74 61 6c 6c 65 64 4d 61 | iteral);..if.(isset($installedMa |
77220 | 70 5b 24 70 61 63 6b 61 67 65 2d 3e 69 64 5d 29 29 20 7b 0a 24 70 72 65 66 69 78 20 3d 20 28 24 | p[$package->id])).{.$prefix.=.($ |
77240 | 6c 69 74 65 72 61 6c 20 3e 20 30 20 3f 20 27 6b 65 65 70 27 20 3a 20 27 72 65 6d 6f 76 65 27 29 | literal.>.0.?.'keep'.:.'remove') |
77260 | 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 70 72 65 66 69 78 20 3d 20 28 24 6c 69 74 65 72 61 6c 20 3e | ;.}.else.{.$prefix.=.($literal.> |
77280 | 20 30 20 3f 20 27 69 6e 73 74 61 6c 6c 27 20 3a 20 27 64 6f 6e 5c 27 74 20 69 6e 73 74 61 6c 6c | .0.?.'install'.:.'don\'t.install |
772a0 | 27 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 70 72 65 66 69 78 2e 27 20 27 2e 24 70 61 63 6b 61 | ');.}..return.$prefix.'.'.$packa |
772c0 | 67 65 2d 3e 67 65 74 50 72 65 74 74 79 53 74 72 69 6e 67 28 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a | ge->getPrettyString();.}........ |
772e0 | 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 6d 61 74 63 68 28 42 61 73 65 50 61 63 6b 61 67 | public.function.match(BasePackag |
77300 | 65 20 24 63 61 6e 64 69 64 61 74 65 2c 20 73 74 72 69 6e 67 20 24 6e 61 6d 65 2c 20 3f 43 6f 6e | e.$candidate,.string.$name,.?Con |
77320 | 73 74 72 61 69 6e 74 49 6e 74 65 72 66 61 63 65 20 24 63 6f 6e 73 74 72 61 69 6e 74 20 3d 20 6e | straintInterface.$constraint.=.n |
77340 | 75 6c 6c 29 3a 20 62 6f 6f 6c 0a 7b 0a 24 63 61 6e 64 69 64 61 74 65 4e 61 6d 65 20 3d 20 24 63 | ull):.bool.{.$candidateName.=.$c |
77360 | 61 6e 64 69 64 61 74 65 2d 3e 67 65 74 4e 61 6d 65 28 29 3b 0a 24 63 61 6e 64 69 64 61 74 65 56 | andidate->getName();.$candidateV |
77380 | 65 72 73 69 6f 6e 20 3d 20 24 63 61 6e 64 69 64 61 74 65 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 | ersion.=.$candidate->getVersion( |
773a0 | 29 3b 0a 0a 69 66 20 28 24 63 61 6e 64 69 64 61 74 65 4e 61 6d 65 20 3d 3d 3d 20 24 6e 61 6d 65 | );..if.($candidateName.===.$name |
773c0 | 29 20 7b 0a 72 65 74 75 72 6e 20 24 63 6f 6e 73 74 72 61 69 6e 74 20 3d 3d 3d 20 6e 75 6c 6c 20 | ).{.return.$constraint.===.null. |
773e0 | 7c 7c 20 43 6f 6d 70 69 6c 69 6e 67 4d 61 74 63 68 65 72 3a 3a 6d 61 74 63 68 28 24 63 6f 6e 73 | ||.CompilingMatcher::match($cons |
77400 | 74 72 61 69 6e 74 2c 20 43 6f 6e 73 74 72 61 69 6e 74 3a 3a 4f 50 5f 45 51 2c 20 24 63 61 6e 64 | traint,.Constraint::OP_EQ,.$cand |
77420 | 69 64 61 74 65 56 65 72 73 69 6f 6e 29 3b 0a 7d 0a 0a 24 70 72 6f 76 69 64 65 73 20 3d 20 24 63 | idateVersion);.}..$provides.=.$c |
77440 | 61 6e 64 69 64 61 74 65 2d 3e 67 65 74 50 72 6f 76 69 64 65 73 28 29 3b 0a 24 72 65 70 6c 61 63 | andidate->getProvides();.$replac |
77460 | 65 73 20 3d 20 24 63 61 6e 64 69 64 61 74 65 2d 3e 67 65 74 52 65 70 6c 61 63 65 73 28 29 3b 0a | es.=.$candidate->getReplaces();. |
77480 | 0a 0a 69 66 20 28 69 73 73 65 74 28 24 72 65 70 6c 61 63 65 73 5b 30 5d 29 20 7c 7c 20 69 73 73 | ..if.(isset($replaces[0]).||.iss |
774a0 | 65 74 28 24 70 72 6f 76 69 64 65 73 5b 30 5d 29 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 70 72 | et($provides[0])).{.foreach.($pr |
774c0 | 6f 76 69 64 65 73 20 61 73 20 24 6c 69 6e 6b 29 20 7b 0a 69 66 20 28 24 6c 69 6e 6b 2d 3e 67 65 | ovides.as.$link).{.if.($link->ge |
774e0 | 74 54 61 72 67 65 74 28 29 20 3d 3d 3d 20 24 6e 61 6d 65 20 26 26 20 28 24 63 6f 6e 73 74 72 61 | tTarget().===.$name.&&.($constra |
77500 | 69 6e 74 20 3d 3d 3d 20 6e 75 6c 6c 20 7c 7c 20 24 63 6f 6e 73 74 72 61 69 6e 74 2d 3e 6d 61 74 | int.===.null.||.$constraint->mat |
77520 | 63 68 65 73 28 24 6c 69 6e 6b 2d 3e 67 65 74 43 6f 6e 73 74 72 61 69 6e 74 28 29 29 29 29 20 7b | ches($link->getConstraint()))).{ |
77540 | 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 7d 0a 0a 66 6f 72 65 61 63 68 20 28 24 72 65 70 | .return.true;.}.}..foreach.($rep |
77560 | 6c 61 63 65 73 20 61 73 20 24 6c 69 6e 6b 29 20 7b 0a 69 66 20 28 24 6c 69 6e 6b 2d 3e 67 65 74 | laces.as.$link).{.if.($link->get |
77580 | 54 61 72 67 65 74 28 29 20 3d 3d 3d 20 24 6e 61 6d 65 20 26 26 20 28 24 63 6f 6e 73 74 72 61 69 | Target().===.$name.&&.($constrai |
775a0 | 6e 74 20 3d 3d 3d 20 6e 75 6c 6c 20 7c 7c 20 24 63 6f 6e 73 74 72 61 69 6e 74 2d 3e 6d 61 74 63 | nt.===.null.||.$constraint->matc |
775c0 | 68 65 73 28 24 6c 69 6e 6b 2d 3e 67 65 74 43 6f 6e 73 74 72 61 69 6e 74 28 29 29 29 29 20 7b 0a | hes($link->getConstraint()))).{. |
775e0 | 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a | return.true;.}.}..return.false;. |
77600 | 7d 0a 0a 69 66 20 28 69 73 73 65 74 28 24 70 72 6f 76 69 64 65 73 5b 24 6e 61 6d 65 5d 29 20 26 | }..if.(isset($provides[$name]).& |
77620 | 26 20 28 24 63 6f 6e 73 74 72 61 69 6e 74 20 3d 3d 3d 20 6e 75 6c 6c 20 7c 7c 20 24 63 6f 6e 73 | &.($constraint.===.null.||.$cons |
77640 | 74 72 61 69 6e 74 2d 3e 6d 61 74 63 68 65 73 28 24 70 72 6f 76 69 64 65 73 5b 24 6e 61 6d 65 5d | traint->matches($provides[$name] |
77660 | 2d 3e 67 65 74 43 6f 6e 73 74 72 61 69 6e 74 28 29 29 29 29 20 7b 0a 72 65 74 75 72 6e 20 74 72 | ->getConstraint()))).{.return.tr |
77680 | 75 65 3b 0a 7d 0a 0a 69 66 20 28 69 73 73 65 74 28 24 72 65 70 6c 61 63 65 73 5b 24 6e 61 6d 65 | ue;.}..if.(isset($replaces[$name |
776a0 | 5d 29 20 26 26 20 28 24 63 6f 6e 73 74 72 61 69 6e 74 20 3d 3d 3d 20 6e 75 6c 6c 20 7c 7c 20 24 | ]).&&.($constraint.===.null.||.$ |
776c0 | 63 6f 6e 73 74 72 61 69 6e 74 2d 3e 6d 61 74 63 68 65 73 28 24 72 65 70 6c 61 63 65 73 5b 24 6e | constraint->matches($replaces[$n |
776e0 | 61 6d 65 5d 2d 3e 67 65 74 43 6f 6e 73 74 72 61 69 6e 74 28 29 29 29 29 20 7b 0a 72 65 74 75 72 | ame]->getConstraint()))).{.retur |
77700 | 6e 20 74 72 75 65 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 70 75 62 6c | n.true;.}..return.false;.}..publ |
77720 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 55 6e 61 63 63 65 70 74 61 62 6c 65 46 69 78 65 64 4f | ic.function.isUnacceptableFixedO |
77740 | 72 4c 6f 63 6b 65 64 50 61 63 6b 61 67 65 28 42 61 73 65 50 61 63 6b 61 67 65 20 24 70 61 63 6b | rLockedPackage(BasePackage.$pack |
77760 | 61 67 65 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 5c 69 6e 5f 61 72 72 61 79 28 24 70 | age):.bool.{.return.\in_array($p |
77780 | 61 63 6b 61 67 65 2c 20 24 74 68 69 73 2d 3e 75 6e 61 63 63 65 70 74 61 62 6c 65 46 69 78 65 64 | ackage,.$this->unacceptableFixed |
777a0 | 4f 72 4c 6f 63 6b 65 64 50 61 63 6b 61 67 65 73 2c 20 74 72 75 65 29 3b 0a 7d 0a 0a 0a 0a 0a 70 | OrLockedPackages,.true);.}.....p |
777c0 | 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 55 6e 61 63 63 65 70 74 61 62 6c 65 46 69 | ublic.function.getUnacceptableFi |
777e0 | 78 65 64 4f 72 4c 6f 63 6b 65 64 50 61 63 6b 61 67 65 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 | xedOrLockedPackages():.array.{.r |
77800 | 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 75 6e 61 63 63 65 70 74 61 62 6c 65 46 69 78 65 64 4f 72 | eturn.$this->unacceptableFixedOr |
77820 | 4c 6f 63 6b 65 64 50 61 63 6b 61 67 65 73 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 | LockedPackages;.}..public.functi |
77840 | 6f 6e 20 5f 5f 74 6f 53 74 72 69 6e 67 28 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 24 73 74 72 20 3d | on.__toString():.string.{.$str.= |
77860 | 20 22 50 6f 6f 6c 3a 5c 6e 22 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 70 61 63 | ."Pool:\n";..foreach.($this->pac |
77880 | 6b 61 67 65 73 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 24 73 74 72 20 2e 3d 20 27 2d 20 | kages.as.$package).{.$str..=.'-. |
778a0 | 27 2e 73 74 72 5f 70 61 64 28 28 73 74 72 69 6e 67 29 20 24 70 61 63 6b 61 67 65 2d 3e 69 64 2c | '.str_pad((string).$package->id, |
778c0 | 20 36 2c 20 27 20 27 2c 20 53 54 52 5f 50 41 44 5f 4c 45 46 54 29 2e 27 3a 20 27 2e 24 70 61 63 | .6,.'.',.STR_PAD_LEFT).':.'.$pac |
778e0 | 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 2e 22 5c 6e 22 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 | kage->getName()."\n";.}..return. |
77900 | 24 73 74 72 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 | $str;.}.}.<?php.declare(strict_t |
77920 | 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f | ypes=1);............namespace.Co |
77940 | 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 3b 0a 0a 75 73 65 20 | mposer\DependencyResolver;..use. |
77960 | 43 6f 6d 70 6f 73 65 72 5c 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 5c 45 76 65 6e 74 44 69 | Composer\EventDispatcher\EventDi |
77980 | 73 70 61 74 63 68 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 4f 5c 49 4f 49 6e 74 65 | spatcher;.use.Composer\IO\IOInte |
779a0 | 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 41 6c 69 61 | rface;.use.Composer\Package\Alia |
779c0 | 73 50 61 63 6b 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 42 | sPackage;.use.Composer\Package\B |
779e0 | 61 73 65 50 61 63 6b 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 | asePackage;.use.Composer\Package |
77a00 | 5c 43 6f 6d 70 6c 65 74 65 41 6c 69 61 73 50 61 63 6b 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 6f | \CompleteAliasPackage;.use.Compo |
77a20 | 73 65 72 5c 50 61 63 6b 61 67 65 5c 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 3b 0a 75 73 65 | ser\Package\CompletePackage;.use |
77a40 | 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 | .Composer\Package\PackageInterfa |
77a60 | 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 56 65 72 73 69 6f 6e | ce;.use.Composer\Package\Version |
77a80 | 5c 53 74 61 62 69 6c 69 74 79 46 69 6c 74 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 | \StabilityFilter;.use.Composer\P |
77aa0 | 63 72 65 5c 50 72 65 67 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 6c 75 67 69 6e 5c 50 6c | cre\Preg;.use.Composer\Plugin\Pl |
77ac0 | 75 67 69 6e 45 76 65 6e 74 73 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 6c 75 67 69 6e 5c | uginEvents;.use.Composer\Plugin\ |
77ae0 | 50 72 65 50 6f 6f 6c 43 72 65 61 74 65 45 76 65 6e 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 | PrePoolCreateEvent;.use.Composer |
77b00 | 5c 52 65 70 6f 73 69 74 6f 72 79 5c 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 3b 0a | \Repository\PlatformRepository;. |
77b20 | 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 52 65 70 6f 73 69 74 6f | use.Composer\Repository\Reposito |
77b40 | 72 79 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 | ryInterface;.use.Composer\Reposi |
77b60 | 74 6f 72 79 5c 52 6f 6f 74 50 61 63 6b 61 67 65 52 65 70 6f 73 69 74 6f 72 79 3b 0a 75 73 65 20 | tory\RootPackageRepository;.use. |
77b80 | 43 6f 6d 70 6f 73 65 72 5c 53 65 6d 76 65 72 5c 43 6f 6d 70 69 6c 69 6e 67 4d 61 74 63 68 65 72 | Composer\Semver\CompilingMatcher |
77ba0 | 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 65 6d 76 65 72 5c 43 6f 6e 73 74 72 61 69 6e 74 | ;.use.Composer\Semver\Constraint |
77bc0 | 5c 43 6f 6e 73 74 72 61 69 6e 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 65 6d 76 65 72 | \Constraint;.use.Composer\Semver |
77be0 | 5c 43 6f 6e 73 74 72 61 69 6e 74 5c 43 6f 6e 73 74 72 61 69 6e 74 49 6e 74 65 72 66 61 63 65 3b | \Constraint\ConstraintInterface; |
77c00 | 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 65 6d 76 65 72 5c 43 6f 6e 73 74 72 61 69 6e 74 5c | .use.Composer\Semver\Constraint\ |
77c20 | 4d 61 74 63 68 41 6c 6c 43 6f 6e 73 74 72 61 69 6e 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 | MatchAllConstraint;.use.Composer |
77c40 | 5c 53 65 6d 76 65 72 5c 43 6f 6e 73 74 72 61 69 6e 74 5c 4d 75 6c 74 69 43 6f 6e 73 74 72 61 69 | \Semver\Constraint\MultiConstrai |
77c60 | 6e 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 65 6d 76 65 72 5c 49 6e 74 65 72 76 61 6c | nt;.use.Composer\Semver\Interval |
77c80 | 73 3b 0a 0a 0a 0a 0a 63 6c 61 73 73 20 50 6f 6f 6c 42 75 69 6c 64 65 72 0a 7b 0a 0a 0a 0a 0a 70 | s;.....class.PoolBuilder.{.....p |
77ca0 | 72 69 76 61 74 65 20 24 61 63 63 65 70 74 61 62 6c 65 53 74 61 62 69 6c 69 74 69 65 73 3b 0a 0a | rivate.$acceptableStabilities;.. |
77cc0 | 0a 0a 0a 70 72 69 76 61 74 65 20 24 73 74 61 62 69 6c 69 74 79 46 6c 61 67 73 3b 0a 0a 0a 0a 0a | ...private.$stabilityFlags;..... |
77ce0 | 70 72 69 76 61 74 65 20 24 72 6f 6f 74 41 6c 69 61 73 65 73 3b 0a 0a 0a 0a 0a 70 72 69 76 61 74 | private.$rootAliases;.....privat |
77d00 | 65 20 24 72 6f 6f 74 52 65 66 65 72 65 6e 63 65 73 3b 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 74 | e.$rootReferences;....private.$t |
77d20 | 65 6d 70 6f 72 61 72 79 43 6f 6e 73 74 72 61 69 6e 74 73 3b 0a 0a 0a 0a 70 72 69 76 61 74 65 20 | emporaryConstraints;....private. |
77d40 | 24 65 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 3b 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 70 6f | $eventDispatcher;....private.$po |
77d60 | 6f 6c 4f 70 74 69 6d 69 7a 65 72 3b 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 69 6f 3b 0a 0a 0a 0a | olOptimizer;....private.$io;.... |
77d80 | 0a 70 72 69 76 61 74 65 20 24 61 6c 69 61 73 4d 61 70 20 3d 20 5b 5d 3b 0a 0a 0a 0a 0a 70 72 69 | .private.$aliasMap.=.[];.....pri |
77da0 | 76 61 74 65 20 24 70 61 63 6b 61 67 65 73 54 6f 4c 6f 61 64 20 3d 20 5b 5d 3b 0a 0a 0a 0a 0a 70 | vate.$packagesToLoad.=.[];.....p |
77dc0 | 72 69 76 61 74 65 20 24 6c 6f 61 64 65 64 50 61 63 6b 61 67 65 73 20 3d 20 5b 5d 3b 0a 0a 0a 0a | rivate.$loadedPackages.=.[];.... |
77de0 | 0a 70 72 69 76 61 74 65 20 24 6c 6f 61 64 65 64 50 65 72 52 65 70 6f 20 3d 20 5b 5d 3b 0a 0a 0a | .private.$loadedPerRepo.=.[];... |
77e00 | 0a 70 72 69 76 61 74 65 20 24 70 61 63 6b 61 67 65 73 20 3d 20 5b 5d 3b 0a 0a 0a 0a 70 72 69 76 | .private.$packages.=.[];....priv |
77e20 | 61 74 65 20 24 75 6e 61 63 63 65 70 74 61 62 6c 65 46 69 78 65 64 4f 72 4c 6f 63 6b 65 64 50 61 | ate.$unacceptableFixedOrLockedPa |
77e40 | 63 6b 61 67 65 73 20 3d 20 5b 5d 3b 0a 0a 70 72 69 76 61 74 65 20 24 75 70 64 61 74 65 41 6c 6c | ckages.=.[];..private.$updateAll |
77e60 | 6f 77 4c 69 73 74 20 3d 20 5b 5d 3b 0a 0a 70 72 69 76 61 74 65 20 24 73 6b 69 70 70 65 64 4c 6f | owList.=.[];..private.$skippedLo |
77e80 | 61 64 20 3d 20 5b 5d 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 70 61 74 68 52 | ad.=.[];..........private.$pathR |
77ea0 | 65 70 6f 55 6e 6c 6f 63 6b 65 64 20 3d 20 5b 5d 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 72 69 | epoUnlocked.=.[];............pri |
77ec0 | 76 61 74 65 20 24 6d 61 78 45 78 74 65 6e 64 65 64 52 65 71 73 20 3d 20 5b 5d 3b 0a 0a 0a 0a 0a | vate.$maxExtendedReqs.=.[];..... |
77ee0 | 70 72 69 76 61 74 65 20 24 75 70 64 61 74 65 41 6c 6c 6f 77 57 61 72 6e 65 64 20 3d 20 5b 5d 3b | private.$updateAllowWarned.=.[]; |
77f00 | 0a 0a 0a 70 72 69 76 61 74 65 20 24 69 6e 64 65 78 43 6f 75 6e 74 65 72 20 3d 20 30 3b 0a 0a 0a | ...private.$indexCounter.=.0;... |
77f20 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 | ..........public.function.__cons |
77f40 | 74 72 75 63 74 28 61 72 72 61 79 20 24 61 63 63 65 70 74 61 62 6c 65 53 74 61 62 69 6c 69 74 69 | truct(array.$acceptableStabiliti |
77f60 | 65 73 2c 20 61 72 72 61 79 20 24 73 74 61 62 69 6c 69 74 79 46 6c 61 67 73 2c 20 61 72 72 61 79 | es,.array.$stabilityFlags,.array |
77f80 | 20 24 72 6f 6f 74 41 6c 69 61 73 65 73 2c 20 61 72 72 61 79 20 24 72 6f 6f 74 52 65 66 65 72 65 | .$rootAliases,.array.$rootRefere |
77fa0 | 6e 63 65 73 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 20 24 69 6f 2c 20 3f 45 76 65 6e 74 44 69 73 | nces,.IOInterface.$io,.?EventDis |
77fc0 | 70 61 74 63 68 65 72 20 24 65 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 20 3d 20 6e 75 6c 6c 2c | patcher.$eventDispatcher.=.null, |
77fe0 | 20 3f 50 6f 6f 6c 4f 70 74 69 6d 69 7a 65 72 20 24 70 6f 6f 6c 4f 70 74 69 6d 69 7a 65 72 20 3d | .?PoolOptimizer.$poolOptimizer.= |
78000 | 20 6e 75 6c 6c 2c 20 61 72 72 61 79 20 24 74 65 6d 70 6f 72 61 72 79 43 6f 6e 73 74 72 61 69 6e | .null,.array.$temporaryConstrain |
78020 | 74 73 20 3d 20 5b 5d 29 0a 7b 0a 24 74 68 69 73 2d 3e 61 63 63 65 70 74 61 62 6c 65 53 74 61 62 | ts.=.[]).{.$this->acceptableStab |
78040 | 69 6c 69 74 69 65 73 20 3d 20 24 61 63 63 65 70 74 61 62 6c 65 53 74 61 62 69 6c 69 74 69 65 73 | ilities.=.$acceptableStabilities |
78060 | 3b 0a 24 74 68 69 73 2d 3e 73 74 61 62 69 6c 69 74 79 46 6c 61 67 73 20 3d 20 24 73 74 61 62 69 | ;.$this->stabilityFlags.=.$stabi |
78080 | 6c 69 74 79 46 6c 61 67 73 3b 0a 24 74 68 69 73 2d 3e 72 6f 6f 74 41 6c 69 61 73 65 73 20 3d 20 | lityFlags;.$this->rootAliases.=. |
780a0 | 24 72 6f 6f 74 41 6c 69 61 73 65 73 3b 0a 24 74 68 69 73 2d 3e 72 6f 6f 74 52 65 66 65 72 65 6e | $rootAliases;.$this->rootReferen |
780c0 | 63 65 73 20 3d 20 24 72 6f 6f 74 52 65 66 65 72 65 6e 63 65 73 3b 0a 24 74 68 69 73 2d 3e 65 76 | ces.=.$rootReferences;.$this->ev |
780e0 | 65 6e 74 44 69 73 70 61 74 63 68 65 72 20 3d 20 24 65 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 | entDispatcher.=.$eventDispatcher |
78100 | 3b 0a 24 74 68 69 73 2d 3e 70 6f 6f 6c 4f 70 74 69 6d 69 7a 65 72 20 3d 20 24 70 6f 6f 6c 4f 70 | ;.$this->poolOptimizer.=.$poolOp |
78120 | 74 69 6d 69 7a 65 72 3b 0a 24 74 68 69 73 2d 3e 69 6f 20 3d 20 24 69 6f 3b 0a 24 74 68 69 73 2d | timizer;.$this->io.=.$io;.$this- |
78140 | 3e 74 65 6d 70 6f 72 61 72 79 43 6f 6e 73 74 72 61 69 6e 74 73 20 3d 20 24 74 65 6d 70 6f 72 61 | >temporaryConstraints.=.$tempora |
78160 | 72 79 43 6f 6e 73 74 72 61 69 6e 74 73 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 | ryConstraints;.}.....public.func |
78180 | 74 69 6f 6e 20 62 75 69 6c 64 50 6f 6f 6c 28 61 72 72 61 79 20 24 72 65 70 6f 73 69 74 6f 72 69 | tion.buildPool(array.$repositori |
781a0 | 65 73 2c 20 52 65 71 75 65 73 74 20 24 72 65 71 75 65 73 74 29 3a 20 50 6f 6f 6c 0a 7b 0a 69 66 | es,.Request.$request):.Pool.{.if |
781c0 | 20 28 24 72 65 71 75 65 73 74 2d 3e 67 65 74 55 70 64 61 74 65 41 6c 6c 6f 77 4c 69 73 74 28 29 | .($request->getUpdateAllowList() |
781e0 | 29 20 7b 0a 24 74 68 69 73 2d 3e 75 70 64 61 74 65 41 6c 6c 6f 77 4c 69 73 74 20 3d 20 24 72 65 | ).{.$this->updateAllowList.=.$re |
78200 | 71 75 65 73 74 2d 3e 67 65 74 55 70 64 61 74 65 41 6c 6c 6f 77 4c 69 73 74 28 29 3b 0a 24 74 68 | quest->getUpdateAllowList();.$th |
78220 | 69 73 2d 3e 77 61 72 6e 41 62 6f 75 74 4e 6f 6e 4d 61 74 63 68 69 6e 67 55 70 64 61 74 65 41 6c | is->warnAboutNonMatchingUpdateAl |
78240 | 6c 6f 77 4c 69 73 74 28 24 72 65 71 75 65 73 74 29 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 72 65 | lowList($request);..foreach.($re |
78260 | 71 75 65 73 74 2d 3e 67 65 74 4c 6f 63 6b 65 64 52 65 70 6f 73 69 74 6f 72 79 28 29 2d 3e 67 65 | quest->getLockedRepository()->ge |
78280 | 74 50 61 63 6b 61 67 65 73 28 29 20 61 73 20 24 6c 6f 63 6b 65 64 50 61 63 6b 61 67 65 29 20 7b | tPackages().as.$lockedPackage).{ |
782a0 | 0a 69 66 20 28 21 24 74 68 69 73 2d 3e 69 73 55 70 64 61 74 65 41 6c 6c 6f 77 65 64 28 24 6c 6f | .if.(!$this->isUpdateAllowed($lo |
782c0 | 63 6b 65 64 50 61 63 6b 61 67 65 29 29 20 7b 0a 0a 24 74 68 69 73 2d 3e 73 6b 69 70 70 65 64 4c | ckedPackage)).{..$this->skippedL |
782e0 | 6f 61 64 5b 24 6c 6f 63 6b 65 64 50 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 5b 5d | oad[$lockedPackage->getName()][] |
78300 | 20 3d 20 24 6c 6f 63 6b 65 64 50 61 63 6b 61 67 65 3b 0a 66 6f 72 65 61 63 68 20 28 24 6c 6f 63 | .=.$lockedPackage;.foreach.($loc |
78320 | 6b 65 64 50 61 63 6b 61 67 65 2d 3e 67 65 74 52 65 70 6c 61 63 65 73 28 29 20 61 73 20 24 6c 69 | kedPackage->getReplaces().as.$li |
78340 | 6e 6b 29 20 7b 0a 24 74 68 69 73 2d 3e 73 6b 69 70 70 65 64 4c 6f 61 64 5b 24 6c 69 6e 6b 2d 3e | nk).{.$this->skippedLoad[$link-> |
78360 | 67 65 74 54 61 72 67 65 74 28 29 5d 5b 5d 20 3d 20 24 6c 6f 63 6b 65 64 50 61 63 6b 61 67 65 3b | getTarget()][].=.$lockedPackage; |
78380 | 0a 7d 0a 0a 0a 0a 0a 0a 69 66 20 28 24 6c 6f 63 6b 65 64 50 61 63 6b 61 67 65 2d 3e 67 65 74 44 | .}......if.($lockedPackage->getD |
783a0 | 69 73 74 54 79 70 65 28 29 20 3d 3d 3d 20 27 70 61 74 68 27 29 20 7b 0a 24 74 72 61 6e 73 70 6f | istType().===.'path').{.$transpo |
783c0 | 72 74 4f 70 74 69 6f 6e 73 20 3d 20 24 6c 6f 63 6b 65 64 50 61 63 6b 61 67 65 2d 3e 67 65 74 54 | rtOptions.=.$lockedPackage->getT |
783e0 | 72 61 6e 73 70 6f 72 74 4f 70 74 69 6f 6e 73 28 29 3b 0a 69 66 20 28 21 69 73 73 65 74 28 24 74 | ransportOptions();.if.(!isset($t |
78400 | 72 61 6e 73 70 6f 72 74 4f 70 74 69 6f 6e 73 5b 27 73 79 6d 6c 69 6e 6b 27 5d 29 20 7c 7c 20 24 | ransportOptions['symlink']).||.$ |
78420 | 74 72 61 6e 73 70 6f 72 74 4f 70 74 69 6f 6e 73 5b 27 73 79 6d 6c 69 6e 6b 27 5d 20 21 3d 3d 20 | transportOptions['symlink'].!==. |
78440 | 66 61 6c 73 65 29 20 7b 0a 24 74 68 69 73 2d 3e 70 61 74 68 52 65 70 6f 55 6e 6c 6f 63 6b 65 64 | false).{.$this->pathRepoUnlocked |
78460 | 5b 24 6c 6f 63 6b 65 64 50 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 20 3d 20 74 72 | [$lockedPackage->getName()].=.tr |
78480 | 75 65 3b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 7d 0a 0a 24 72 65 71 75 65 73 74 2d 3e 6c 6f 63 | ue;.continue;.}.}..$request->loc |
784a0 | 6b 50 61 63 6b 61 67 65 28 24 6c 6f 63 6b 65 64 50 61 63 6b 61 67 65 29 3b 0a 7d 0a 7d 0a 7d 0a | kPackage($lockedPackage);.}.}.}. |
784c0 | 0a 66 6f 72 65 61 63 68 20 28 24 72 65 71 75 65 73 74 2d 3e 67 65 74 46 69 78 65 64 4f 72 4c 6f | .foreach.($request->getFixedOrLo |
784e0 | 63 6b 65 64 50 61 63 6b 61 67 65 73 28 29 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 0a 0a | ckedPackages().as.$package).{... |
78500 | 24 74 68 69 73 2d 3e 6c 6f 61 64 65 64 50 61 63 6b 61 67 65 73 5b 24 70 61 63 6b 61 67 65 2d 3e | $this->loadedPackages[$package-> |
78520 | 67 65 74 4e 61 6d 65 28 29 5d 20 3d 20 6e 65 77 20 4d 61 74 63 68 41 6c 6c 43 6f 6e 73 74 72 61 | getName()].=.new.MatchAllConstra |
78540 | 69 6e 74 28 29 3b 0a 0a 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 52 | int();...foreach.($package->getR |
78560 | 65 70 6c 61 63 65 73 28 29 20 61 73 20 24 6c 69 6e 6b 29 20 7b 0a 24 74 68 69 73 2d 3e 6c 6f 61 | eplaces().as.$link).{.$this->loa |
78580 | 64 65 64 50 61 63 6b 61 67 65 73 5b 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 74 28 29 5d 20 | dedPackages[$link->getTarget()]. |
785a0 | 3d 20 6e 65 77 20 4d 61 74 63 68 41 6c 6c 43 6f 6e 73 74 72 61 69 6e 74 28 29 3b 0a 7d 0a 0a 0a | =.new.MatchAllConstraint();.}... |
785c0 | 0a 0a 69 66 20 28 0a 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 79 28 29 | ..if.(.$package->getRepository() |
785e0 | 20 69 6e 73 74 61 6e 63 65 6f 66 20 52 6f 6f 74 50 61 63 6b 61 67 65 52 65 70 6f 73 69 74 6f 72 | .instanceof.RootPackageRepositor |
78600 | 79 0a 7c 7c 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 79 28 29 20 69 | y.||.$package->getRepository().i |
78620 | 6e 73 74 61 6e 63 65 6f 66 20 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 0a 7c 7c 20 | nstanceof.PlatformRepository.||. |
78640 | 53 74 61 62 69 6c 69 74 79 46 69 6c 74 65 72 3a 3a 69 73 50 61 63 6b 61 67 65 41 63 63 65 70 74 | StabilityFilter::isPackageAccept |
78660 | 61 62 6c 65 28 24 74 68 69 73 2d 3e 61 63 63 65 70 74 61 62 6c 65 53 74 61 62 69 6c 69 74 69 65 | able($this->acceptableStabilitie |
78680 | 73 2c 20 24 74 68 69 73 2d 3e 73 74 61 62 69 6c 69 74 79 46 6c 61 67 73 2c 20 24 70 61 63 6b 61 | s,.$this->stabilityFlags,.$packa |
786a0 | 67 65 2d 3e 67 65 74 4e 61 6d 65 73 28 29 2c 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 53 74 61 | ge->getNames(),.$package->getSta |
786c0 | 62 69 6c 69 74 79 28 29 29 0a 29 20 7b 0a 24 74 68 69 73 2d 3e 6c 6f 61 64 50 61 63 6b 61 67 65 | bility()).).{.$this->loadPackage |
786e0 | 28 24 72 65 71 75 65 73 74 2c 20 24 72 65 70 6f 73 69 74 6f 72 69 65 73 2c 20 24 70 61 63 6b 61 | ($request,.$repositories,.$packa |
78700 | 67 65 2c 20 66 61 6c 73 65 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 74 68 69 73 2d 3e 75 6e 61 63 | ge,.false);.}.else.{.$this->unac |
78720 | 63 65 70 74 61 62 6c 65 46 69 78 65 64 4f 72 4c 6f 63 6b 65 64 50 61 63 6b 61 67 65 73 5b 5d 20 | ceptableFixedOrLockedPackages[]. |
78740 | 3d 20 24 70 61 63 6b 61 67 65 3b 0a 7d 0a 7d 0a 0a 66 6f 72 65 61 63 68 20 28 24 72 65 71 75 65 | =.$package;.}.}..foreach.($reque |
78760 | 73 74 2d 3e 67 65 74 52 65 71 75 69 72 65 73 28 29 20 61 73 20 24 70 61 63 6b 61 67 65 4e 61 6d | st->getRequires().as.$packageNam |
78780 | 65 20 3d 3e 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 20 7b 0a 0a 69 66 20 28 69 73 73 65 74 28 24 | e.=>.$constraint).{..if.(isset($ |
787a0 | 74 68 69 73 2d 3e 6c 6f 61 64 65 64 50 61 63 6b 61 67 65 73 5b 24 70 61 63 6b 61 67 65 4e 61 6d | this->loadedPackages[$packageNam |
787c0 | 65 5d 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 70 61 63 6b 61 | e])).{.continue;.}..$this->packa |
787e0 | 67 65 73 54 6f 4c 6f 61 64 5b 24 70 61 63 6b 61 67 65 4e 61 6d 65 5d 20 3d 20 24 63 6f 6e 73 74 | gesToLoad[$packageName].=.$const |
78800 | 72 61 69 6e 74 3b 0a 24 74 68 69 73 2d 3e 6d 61 78 45 78 74 65 6e 64 65 64 52 65 71 73 5b 24 70 | raint;.$this->maxExtendedReqs[$p |
78820 | 61 63 6b 61 67 65 4e 61 6d 65 5d 20 3d 20 74 72 75 65 3b 0a 7d 0a 0a 0a 66 6f 72 65 61 63 68 20 | ackageName].=.true;.}...foreach. |
78840 | 28 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 73 54 6f 4c 6f 61 64 20 61 73 20 24 6e 61 6d 65 20 | ($this->packagesToLoad.as.$name. |
78860 | 3d 3e 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 20 7b 0a 69 66 20 28 69 73 73 65 74 28 24 74 68 69 | =>.$constraint).{.if.(isset($thi |
78880 | 73 2d 3e 6c 6f 61 64 65 64 50 61 63 6b 61 67 65 73 5b 24 6e 61 6d 65 5d 29 29 20 7b 0a 75 6e 73 | s->loadedPackages[$name])).{.uns |
788a0 | 65 74 28 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 73 54 6f 4c 6f 61 64 5b 24 6e 61 6d 65 5d 29 | et($this->packagesToLoad[$name]) |
788c0 | 3b 0a 7d 0a 7d 0a 0a 77 68 69 6c 65 20 28 21 65 6d 70 74 79 28 24 74 68 69 73 2d 3e 70 61 63 6b | ;.}.}..while.(!empty($this->pack |
788e0 | 61 67 65 73 54 6f 4c 6f 61 64 29 29 20 7b 0a 24 74 68 69 73 2d 3e 6c 6f 61 64 50 61 63 6b 61 67 | agesToLoad)).{.$this->loadPackag |
78900 | 65 73 4d 61 72 6b 65 64 46 6f 72 4c 6f 61 64 69 6e 67 28 24 72 65 71 75 65 73 74 2c 20 24 72 65 | esMarkedForLoading($request,.$re |
78920 | 70 6f 73 69 74 6f 72 69 65 73 29 3b 0a 7d 0a 0a 69 66 20 28 5c 63 6f 75 6e 74 28 24 74 68 69 73 | positories);.}..if.(\count($this |
78940 | 2d 3e 74 65 6d 70 6f 72 61 72 79 43 6f 6e 73 74 72 61 69 6e 74 73 29 20 3e 20 30 29 20 7b 0a 66 | ->temporaryConstraints).>.0).{.f |
78960 | 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 73 20 61 73 20 24 69 20 3d 3e | oreach.($this->packages.as.$i.=> |
78980 | 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 0a 69 66 20 28 21 69 73 73 65 74 28 24 74 68 69 73 2d 3e | .$package).{..if.(!isset($this-> |
789a0 | 74 65 6d 70 6f 72 61 72 79 43 6f 6e 73 74 72 61 69 6e 74 73 5b 24 70 61 63 6b 61 67 65 2d 3e 67 | temporaryConstraints[$package->g |
789c0 | 65 74 4e 61 6d 65 28 29 5d 29 20 7c 7c 20 24 70 61 63 6b 61 67 65 20 69 6e 73 74 61 6e 63 65 6f | etName()]).||.$package.instanceo |
789e0 | 66 20 41 6c 69 61 73 50 61 63 6b 61 67 65 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 24 | f.AliasPackage).{.continue;.}..$ |
78a00 | 63 6f 6e 73 74 72 61 69 6e 74 20 3d 20 24 74 68 69 73 2d 3e 74 65 6d 70 6f 72 61 72 79 43 6f 6e | constraint.=.$this->temporaryCon |
78a20 | 73 74 72 61 69 6e 74 73 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 3b 0a 24 | straints[$package->getName()];.$ |
78a40 | 70 61 63 6b 61 67 65 41 6e 64 41 6c 69 61 73 65 73 20 3d 20 5b 24 69 20 3d 3e 20 24 70 61 63 6b | packageAndAliases.=.[$i.=>.$pack |
78a60 | 61 67 65 5d 3b 0a 69 66 20 28 69 73 73 65 74 28 24 74 68 69 73 2d 3e 61 6c 69 61 73 4d 61 70 5b | age];.if.(isset($this->aliasMap[ |
78a80 | 73 70 6c 5f 6f 62 6a 65 63 74 5f 68 61 73 68 28 24 70 61 63 6b 61 67 65 29 5d 29 29 20 7b 0a 24 | spl_object_hash($package)])).{.$ |
78aa0 | 70 61 63 6b 61 67 65 41 6e 64 41 6c 69 61 73 65 73 20 2b 3d 20 24 74 68 69 73 2d 3e 61 6c 69 61 | packageAndAliases.+=.$this->alia |
78ac0 | 73 4d 61 70 5b 73 70 6c 5f 6f 62 6a 65 63 74 5f 68 61 73 68 28 24 70 61 63 6b 61 67 65 29 5d 3b | sMap[spl_object_hash($package)]; |
78ae0 | 0a 7d 0a 0a 24 66 6f 75 6e 64 20 3d 20 66 61 6c 73 65 3b 0a 66 6f 72 65 61 63 68 20 28 24 70 61 | .}..$found.=.false;.foreach.($pa |
78b00 | 63 6b 61 67 65 41 6e 64 41 6c 69 61 73 65 73 20 61 73 20 24 70 61 63 6b 61 67 65 4f 72 41 6c 69 | ckageAndAliases.as.$packageOrAli |
78b20 | 61 73 29 20 7b 0a 69 66 20 28 43 6f 6d 70 69 6c 69 6e 67 4d 61 74 63 68 65 72 3a 3a 6d 61 74 63 | as).{.if.(CompilingMatcher::matc |
78b40 | 68 28 24 63 6f 6e 73 74 72 61 69 6e 74 2c 20 43 6f 6e 73 74 72 61 69 6e 74 3a 3a 4f 50 5f 45 51 | h($constraint,.Constraint::OP_EQ |
78b60 | 2c 20 24 70 61 63 6b 61 67 65 4f 72 41 6c 69 61 73 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 29 | ,.$packageOrAlias->getVersion()) |
78b80 | 29 20 7b 0a 24 66 6f 75 6e 64 20 3d 20 74 72 75 65 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 21 24 66 6f | ).{.$found.=.true;.}.}..if.(!$fo |
78ba0 | 75 6e 64 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 41 6e 64 41 6c 69 61 73 | und).{.foreach.($packageAndAlias |
78bc0 | 65 73 20 61 73 20 24 69 6e 64 65 78 20 3d 3e 20 24 70 61 63 6b 61 67 65 4f 72 41 6c 69 61 73 29 | es.as.$index.=>.$packageOrAlias) |
78be0 | 20 7b 0a 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 73 5b 24 69 6e 64 65 78 5d | .{.unset($this->packages[$index] |
78c00 | 29 3b 0a 7d 0a 7d 0a 7d 0a 7d 0a 0a 69 66 20 28 24 74 68 69 73 2d 3e 65 76 65 6e 74 44 69 73 70 | );.}.}.}.}..if.($this->eventDisp |
78c20 | 61 74 63 68 65 72 29 20 7b 0a 24 70 72 65 50 6f 6f 6c 43 72 65 61 74 65 45 76 65 6e 74 20 3d 20 | atcher).{.$prePoolCreateEvent.=. |
78c40 | 6e 65 77 20 50 72 65 50 6f 6f 6c 43 72 65 61 74 65 45 76 65 6e 74 28 0a 50 6c 75 67 69 6e 45 76 | new.PrePoolCreateEvent(.PluginEv |
78c60 | 65 6e 74 73 3a 3a 50 52 45 5f 50 4f 4f 4c 5f 43 52 45 41 54 45 2c 0a 24 72 65 70 6f 73 69 74 6f | ents::PRE_POOL_CREATE,.$reposito |
78c80 | 72 69 65 73 2c 0a 24 72 65 71 75 65 73 74 2c 0a 24 74 68 69 73 2d 3e 61 63 63 65 70 74 61 62 6c | ries,.$request,.$this->acceptabl |
78ca0 | 65 53 74 61 62 69 6c 69 74 69 65 73 2c 0a 24 74 68 69 73 2d 3e 73 74 61 62 69 6c 69 74 79 46 6c | eStabilities,.$this->stabilityFl |
78cc0 | 61 67 73 2c 0a 24 74 68 69 73 2d 3e 72 6f 6f 74 41 6c 69 61 73 65 73 2c 0a 24 74 68 69 73 2d 3e | ags,.$this->rootAliases,.$this-> |
78ce0 | 72 6f 6f 74 52 65 66 65 72 65 6e 63 65 73 2c 0a 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 73 2c | rootReferences,.$this->packages, |
78d00 | 0a 24 74 68 69 73 2d 3e 75 6e 61 63 63 65 70 74 61 62 6c 65 46 69 78 65 64 4f 72 4c 6f 63 6b 65 | .$this->unacceptableFixedOrLocke |
78d20 | 64 50 61 63 6b 61 67 65 73 0a 29 3b 0a 24 74 68 69 73 2d 3e 65 76 65 6e 74 44 69 73 70 61 74 63 | dPackages.);.$this->eventDispatc |
78d40 | 68 65 72 2d 3e 64 69 73 70 61 74 63 68 28 24 70 72 65 50 6f 6f 6c 43 72 65 61 74 65 45 76 65 6e | her->dispatch($prePoolCreateEven |
78d60 | 74 2d 3e 67 65 74 4e 61 6d 65 28 29 2c 20 24 70 72 65 50 6f 6f 6c 43 72 65 61 74 65 45 76 65 6e | t->getName(),.$prePoolCreateEven |
78d80 | 74 29 3b 0a 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 73 20 3d 20 24 70 72 65 50 6f 6f 6c 43 72 | t);.$this->packages.=.$prePoolCr |
78da0 | 65 61 74 65 45 76 65 6e 74 2d 3e 67 65 74 50 61 63 6b 61 67 65 73 28 29 3b 0a 24 74 68 69 73 2d | eateEvent->getPackages();.$this- |
78dc0 | 3e 75 6e 61 63 63 65 70 74 61 62 6c 65 46 69 78 65 64 4f 72 4c 6f 63 6b 65 64 50 61 63 6b 61 67 | >unacceptableFixedOrLockedPackag |
78de0 | 65 73 20 3d 20 24 70 72 65 50 6f 6f 6c 43 72 65 61 74 65 45 76 65 6e 74 2d 3e 67 65 74 55 6e 61 | es.=.$prePoolCreateEvent->getUna |
78e00 | 63 63 65 70 74 61 62 6c 65 46 69 78 65 64 50 61 63 6b 61 67 65 73 28 29 3b 0a 7d 0a 0a 24 70 6f | cceptableFixedPackages();.}..$po |
78e20 | 6f 6c 20 3d 20 6e 65 77 20 50 6f 6f 6c 28 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 73 2c 20 24 | ol.=.new.Pool($this->packages,.$ |
78e40 | 74 68 69 73 2d 3e 75 6e 61 63 63 65 70 74 61 62 6c 65 46 69 78 65 64 4f 72 4c 6f 63 6b 65 64 50 | this->unacceptableFixedOrLockedP |
78e60 | 61 63 6b 61 67 65 73 29 3b 0a 0a 24 74 68 69 73 2d 3e 61 6c 69 61 73 4d 61 70 20 3d 20 5b 5d 3b | ackages);..$this->aliasMap.=.[]; |
78e80 | 0a 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 73 54 6f 4c 6f 61 64 20 3d 20 5b 5d 3b 0a 24 74 68 | .$this->packagesToLoad.=.[];.$th |
78ea0 | 69 73 2d 3e 6c 6f 61 64 65 64 50 61 63 6b 61 67 65 73 20 3d 20 5b 5d 3b 0a 24 74 68 69 73 2d 3e | is->loadedPackages.=.[];.$this-> |
78ec0 | 6c 6f 61 64 65 64 50 65 72 52 65 70 6f 20 3d 20 5b 5d 3b 0a 24 74 68 69 73 2d 3e 70 61 63 6b 61 | loadedPerRepo.=.[];.$this->packa |
78ee0 | 67 65 73 20 3d 20 5b 5d 3b 0a 24 74 68 69 73 2d 3e 75 6e 61 63 63 65 70 74 61 62 6c 65 46 69 78 | ges.=.[];.$this->unacceptableFix |
78f00 | 65 64 4f 72 4c 6f 63 6b 65 64 50 61 63 6b 61 67 65 73 20 3d 20 5b 5d 3b 0a 24 74 68 69 73 2d 3e | edOrLockedPackages.=.[];.$this-> |
78f20 | 6d 61 78 45 78 74 65 6e 64 65 64 52 65 71 73 20 3d 20 5b 5d 3b 0a 24 74 68 69 73 2d 3e 73 6b 69 | maxExtendedReqs.=.[];.$this->ski |
78f40 | 70 70 65 64 4c 6f 61 64 20 3d 20 5b 5d 3b 0a 24 74 68 69 73 2d 3e 69 6e 64 65 78 43 6f 75 6e 74 | ppedLoad.=.[];.$this->indexCount |
78f60 | 65 72 20 3d 20 30 3b 0a 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 64 65 62 75 67 28 27 42 75 69 6c 74 | er.=.0;..$this->io->debug('Built |
78f80 | 20 70 6f 6f 6c 2e 27 29 3b 0a 0a 24 70 6f 6f 6c 20 3d 20 24 74 68 69 73 2d 3e 72 75 6e 4f 70 74 | .pool.');..$pool.=.$this->runOpt |
78fa0 | 69 6d 69 7a 65 72 28 24 72 65 71 75 65 73 74 2c 20 24 70 6f 6f 6c 29 3b 0a 0a 49 6e 74 65 72 76 | imizer($request,.$pool);..Interv |
78fc0 | 61 6c 73 3a 3a 63 6c 65 61 72 28 29 3b 0a 0a 72 65 74 75 72 6e 20 24 70 6f 6f 6c 3b 0a 7d 0a 0a | als::clear();..return.$pool;.}.. |
78fe0 | 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 6d 61 72 6b 50 61 63 6b 61 67 65 4e 61 6d 65 | private.function.markPackageName |
79000 | 46 6f 72 4c 6f 61 64 69 6e 67 28 52 65 71 75 65 73 74 20 24 72 65 71 75 65 73 74 2c 20 73 74 72 | ForLoading(Request.$request,.str |
79020 | 69 6e 67 20 24 6e 61 6d 65 2c 20 43 6f 6e 73 74 72 61 69 6e 74 49 6e 74 65 72 66 61 63 65 20 24 | ing.$name,.ConstraintInterface.$ |
79040 | 63 6f 6e 73 74 72 61 69 6e 74 29 3a 20 76 6f 69 64 0a 7b 0a 0a 69 66 20 28 50 6c 61 74 66 6f 72 | constraint):.void.{..if.(Platfor |
79060 | 6d 52 65 70 6f 73 69 74 6f 72 79 3a 3a 69 73 50 6c 61 74 66 6f 72 6d 50 61 63 6b 61 67 65 28 24 | mRepository::isPlatformPackage($ |
79080 | 6e 61 6d 65 29 29 20 7b 0a 72 65 74 75 72 6e 3b 0a 7d 0a 0a 0a 0a 69 66 20 28 69 73 73 65 74 28 | name)).{.return;.}....if.(isset( |
790a0 | 24 74 68 69 73 2d 3e 6d 61 78 45 78 74 65 6e 64 65 64 52 65 71 73 5b 24 6e 61 6d 65 5d 29 29 20 | $this->maxExtendedReqs[$name])). |
790c0 | 7b 0a 72 65 74 75 72 6e 3b 0a 7d 0a 0a 0a 0a 0a 0a 24 72 6f 6f 74 52 65 71 75 69 72 65 73 20 3d | {.return;.}......$rootRequires.= |
790e0 | 20 24 72 65 71 75 65 73 74 2d 3e 67 65 74 52 65 71 75 69 72 65 73 28 29 3b 0a 69 66 20 28 69 73 | .$request->getRequires();.if.(is |
79100 | 73 65 74 28 24 72 6f 6f 74 52 65 71 75 69 72 65 73 5b 24 6e 61 6d 65 5d 29 20 26 26 20 21 49 6e | set($rootRequires[$name]).&&.!In |
79120 | 74 65 72 76 61 6c 73 3a 3a 69 73 53 75 62 73 65 74 4f 66 28 24 63 6f 6e 73 74 72 61 69 6e 74 2c | tervals::isSubsetOf($constraint, |
79140 | 20 24 72 6f 6f 74 52 65 71 75 69 72 65 73 5b 24 6e 61 6d 65 5d 29 29 20 7b 0a 24 63 6f 6e 73 74 | .$rootRequires[$name])).{.$const |
79160 | 72 61 69 6e 74 20 3d 20 24 72 6f 6f 74 52 65 71 75 69 72 65 73 5b 24 6e 61 6d 65 5d 3b 0a 7d 0a | raint.=.$rootRequires[$name];.}. |
79180 | 0a 0a 69 66 20 28 21 69 73 73 65 74 28 24 74 68 69 73 2d 3e 6c 6f 61 64 65 64 50 61 63 6b 61 67 | ..if.(!isset($this->loadedPackag |
791a0 | 65 73 5b 24 6e 61 6d 65 5d 29 29 20 7b 0a 0a 0a 0a 69 66 20 28 69 73 73 65 74 28 24 74 68 69 73 | es[$name])).{....if.(isset($this |
791c0 | 2d 3e 70 61 63 6b 61 67 65 73 54 6f 4c 6f 61 64 5b 24 6e 61 6d 65 5d 29 29 20 7b 0a 0a 69 66 20 | ->packagesToLoad[$name])).{..if. |
791e0 | 28 49 6e 74 65 72 76 61 6c 73 3a 3a 69 73 53 75 62 73 65 74 4f 66 28 24 63 6f 6e 73 74 72 61 69 | (Intervals::isSubsetOf($constrai |
79200 | 6e 74 2c 20 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 73 54 6f 4c 6f 61 64 5b 24 6e 61 6d 65 5d | nt,.$this->packagesToLoad[$name] |
79220 | 29 29 20 7b 0a 72 65 74 75 72 6e 3b 0a 7d 0a 0a 0a 24 63 6f 6e 73 74 72 61 69 6e 74 20 3d 20 49 | )).{.return;.}...$constraint.=.I |
79240 | 6e 74 65 72 76 61 6c 73 3a 3a 63 6f 6d 70 61 63 74 43 6f 6e 73 74 72 61 69 6e 74 28 4d 75 6c 74 | ntervals::compactConstraint(Mult |
79260 | 69 43 6f 6e 73 74 72 61 69 6e 74 3a 3a 63 72 65 61 74 65 28 5b 24 74 68 69 73 2d 3e 70 61 63 6b | iConstraint::create([$this->pack |
79280 | 61 67 65 73 54 6f 4c 6f 61 64 5b 24 6e 61 6d 65 5d 2c 20 24 63 6f 6e 73 74 72 61 69 6e 74 5d 2c | agesToLoad[$name],.$constraint], |
792a0 | 20 66 61 6c 73 65 29 29 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 73 54 6f 4c 6f | .false));.}..$this->packagesToLo |
792c0 | 61 64 5b 24 6e 61 6d 65 5d 20 3d 20 24 63 6f 6e 73 74 72 61 69 6e 74 3b 0a 0a 72 65 74 75 72 6e | ad[$name].=.$constraint;..return |
792e0 | 3b 0a 7d 0a 0a 0a 0a 69 66 20 28 49 6e 74 65 72 76 61 6c 73 3a 3a 69 73 53 75 62 73 65 74 4f 66 | ;.}....if.(Intervals::isSubsetOf |
79300 | 28 24 63 6f 6e 73 74 72 61 69 6e 74 2c 20 24 74 68 69 73 2d 3e 6c 6f 61 64 65 64 50 61 63 6b 61 | ($constraint,.$this->loadedPacka |
79320 | 67 65 73 5b 24 6e 61 6d 65 5d 29 29 20 7b 0a 72 65 74 75 72 6e 3b 0a 7d 0a 0a 0a 0a 0a 24 74 68 | ges[$name])).{.return;.}.....$th |
79340 | 69 73 2d 3e 70 61 63 6b 61 67 65 73 54 6f 4c 6f 61 64 5b 24 6e 61 6d 65 5d 20 3d 20 49 6e 74 65 | is->packagesToLoad[$name].=.Inte |
79360 | 72 76 61 6c 73 3a 3a 63 6f 6d 70 61 63 74 43 6f 6e 73 74 72 61 69 6e 74 28 4d 75 6c 74 69 43 6f | rvals::compactConstraint(MultiCo |
79380 | 6e 73 74 72 61 69 6e 74 3a 3a 63 72 65 61 74 65 28 5b 24 74 68 69 73 2d 3e 6c 6f 61 64 65 64 50 | nstraint::create([$this->loadedP |
793a0 | 61 63 6b 61 67 65 73 5b 24 6e 61 6d 65 5d 2c 20 24 63 6f 6e 73 74 72 61 69 6e 74 5d 2c 20 66 61 | ackages[$name],.$constraint],.fa |
793c0 | 6c 73 65 29 29 3b 0a 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 6c 6f 61 64 65 64 50 61 63 6b 61 67 | lse));.unset($this->loadedPackag |
793e0 | 65 73 5b 24 6e 61 6d 65 5d 29 3b 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 | es[$name]);.}.....private.functi |
79400 | 6f 6e 20 6c 6f 61 64 50 61 63 6b 61 67 65 73 4d 61 72 6b 65 64 46 6f 72 4c 6f 61 64 69 6e 67 28 | on.loadPackagesMarkedForLoading( |
79420 | 52 65 71 75 65 73 74 20 24 72 65 71 75 65 73 74 2c 20 61 72 72 61 79 20 24 72 65 70 6f 73 69 74 | Request.$request,.array.$reposit |
79440 | 6f 72 69 65 73 29 3a 20 76 6f 69 64 0a 7b 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 70 | ories):.void.{.foreach.($this->p |
79460 | 61 63 6b 61 67 65 73 54 6f 4c 6f 61 64 20 61 73 20 24 6e 61 6d 65 20 3d 3e 20 24 63 6f 6e 73 74 | ackagesToLoad.as.$name.=>.$const |
79480 | 72 61 69 6e 74 29 20 7b 0a 24 74 68 69 73 2d 3e 6c 6f 61 64 65 64 50 61 63 6b 61 67 65 73 5b 24 | raint).{.$this->loadedPackages[$ |
794a0 | 6e 61 6d 65 5d 20 3d 20 24 63 6f 6e 73 74 72 61 69 6e 74 3b 0a 7d 0a 0a 24 70 61 63 6b 61 67 65 | name].=.$constraint;.}..$package |
794c0 | 42 61 74 63 68 20 3d 20 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 73 54 6f 4c 6f 61 64 3b 0a 24 | Batch.=.$this->packagesToLoad;.$ |
794e0 | 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 73 54 6f 4c 6f 61 64 20 3d 20 5b 5d 3b 0a 0a 66 6f 72 65 | this->packagesToLoad.=.[];..fore |
79500 | 61 63 68 20 28 24 72 65 70 6f 73 69 74 6f 72 69 65 73 20 61 73 20 24 72 65 70 6f 49 6e 64 65 78 | ach.($repositories.as.$repoIndex |
79520 | 20 3d 3e 20 24 72 65 70 6f 73 69 74 6f 72 79 29 20 7b 0a 69 66 20 28 65 6d 70 74 79 28 24 70 61 | .=>.$repository).{.if.(empty($pa |
79540 | 63 6b 61 67 65 42 61 74 63 68 29 29 20 7b 0a 62 72 65 61 6b 3b 0a 7d 0a 0a 0a 0a 69 66 20 28 24 | ckageBatch)).{.break;.}....if.($ |
79560 | 72 65 70 6f 73 69 74 6f 72 79 20 69 6e 73 74 61 6e 63 65 6f 66 20 50 6c 61 74 66 6f 72 6d 52 65 | repository.instanceof.PlatformRe |
79580 | 70 6f 73 69 74 6f 72 79 20 7c 7c 20 24 72 65 70 6f 73 69 74 6f 72 79 20 3d 3d 3d 20 24 72 65 71 | pository.||.$repository.===.$req |
795a0 | 75 65 73 74 2d 3e 67 65 74 4c 6f 63 6b 65 64 52 65 70 6f 73 69 74 6f 72 79 28 29 29 20 7b 0a 63 | uest->getLockedRepository()).{.c |
795c0 | 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 24 72 65 73 75 6c 74 20 3d 20 24 72 65 70 6f 73 69 74 6f 72 79 | ontinue;.}.$result.=.$repository |
795e0 | 2d 3e 6c 6f 61 64 50 61 63 6b 61 67 65 73 28 24 70 61 63 6b 61 67 65 42 61 74 63 68 2c 20 24 74 | ->loadPackages($packageBatch,.$t |
79600 | 68 69 73 2d 3e 61 63 63 65 70 74 61 62 6c 65 53 74 61 62 69 6c 69 74 69 65 73 2c 20 24 74 68 69 | his->acceptableStabilities,.$thi |
79620 | 73 2d 3e 73 74 61 62 69 6c 69 74 79 46 6c 61 67 73 2c 20 24 74 68 69 73 2d 3e 6c 6f 61 64 65 64 | s->stabilityFlags,.$this->loaded |
79640 | 50 65 72 52 65 70 6f 5b 24 72 65 70 6f 49 6e 64 65 78 5d 20 3f 3f 20 5b 5d 29 3b 0a 0a 66 6f 72 | PerRepo[$repoIndex].??.[]);..for |
79660 | 65 61 63 68 20 28 24 72 65 73 75 6c 74 5b 27 6e 61 6d 65 73 46 6f 75 6e 64 27 5d 20 61 73 20 24 | each.($result['namesFound'].as.$ |
79680 | 6e 61 6d 65 29 20 7b 0a 0a 75 6e 73 65 74 28 24 70 61 63 6b 61 67 65 42 61 74 63 68 5b 24 6e 61 | name).{..unset($packageBatch[$na |
796a0 | 6d 65 5d 29 3b 0a 7d 0a 66 6f 72 65 61 63 68 20 28 24 72 65 73 75 6c 74 5b 27 70 61 63 6b 61 67 | me]);.}.foreach.($result['packag |
796c0 | 65 73 27 5d 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 24 74 68 69 73 2d 3e 6c 6f 61 64 65 | es'].as.$package).{.$this->loade |
796e0 | 64 50 65 72 52 65 70 6f 5b 24 72 65 70 6f 49 6e 64 65 78 5d 5b 24 70 61 63 6b 61 67 65 2d 3e 67 | dPerRepo[$repoIndex][$package->g |
79700 | 65 74 4e 61 6d 65 28 29 5d 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 | etName()][$package->getVersion() |
79720 | 5d 20 3d 20 24 70 61 63 6b 61 67 65 3b 0a 24 74 68 69 73 2d 3e 6c 6f 61 64 50 61 63 6b 61 67 65 | ].=.$package;.$this->loadPackage |
79740 | 28 24 72 65 71 75 65 73 74 2c 20 24 72 65 70 6f 73 69 74 6f 72 69 65 73 2c 20 24 70 61 63 6b 61 | ($request,.$repositories,.$packa |
79760 | 67 65 2c 20 21 69 73 73 65 74 28 24 74 68 69 73 2d 3e 70 61 74 68 52 65 70 6f 55 6e 6c 6f 63 6b | ge,.!isset($this->pathRepoUnlock |
79780 | 65 64 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 29 29 3b 0a 7d 0a 7d 0a 7d | ed[$package->getName()]));.}.}.} |
797a0 | 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 6c 6f 61 64 50 61 63 6b 61 67 | .....private.function.loadPackag |
797c0 | 65 28 52 65 71 75 65 73 74 20 24 72 65 71 75 65 73 74 2c 20 61 72 72 61 79 20 24 72 65 70 6f 73 | e(Request.$request,.array.$repos |
797e0 | 69 74 6f 72 69 65 73 2c 20 42 61 73 65 50 61 63 6b 61 67 65 20 24 70 61 63 6b 61 67 65 2c 20 62 | itories,.BasePackage.$package,.b |
79800 | 6f 6f 6c 20 24 70 72 6f 70 61 67 61 74 65 55 70 64 61 74 65 29 3a 20 76 6f 69 64 0a 7b 0a 24 69 | ool.$propagateUpdate):.void.{.$i |
79820 | 6e 64 65 78 20 3d 20 24 74 68 69 73 2d 3e 69 6e 64 65 78 43 6f 75 6e 74 65 72 2b 2b 3b 0a 24 74 | ndex.=.$this->indexCounter++;.$t |
79840 | 68 69 73 2d 3e 70 61 63 6b 61 67 65 73 5b 24 69 6e 64 65 78 5d 20 3d 20 24 70 61 63 6b 61 67 65 | his->packages[$index].=.$package |
79860 | 3b 0a 0a 69 66 20 28 24 70 61 63 6b 61 67 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 41 6c 69 61 73 | ;..if.($package.instanceof.Alias |
79880 | 50 61 63 6b 61 67 65 29 20 7b 0a 24 74 68 69 73 2d 3e 61 6c 69 61 73 4d 61 70 5b 73 70 6c 5f 6f | Package).{.$this->aliasMap[spl_o |
798a0 | 62 6a 65 63 74 5f 68 61 73 68 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 41 6c 69 61 73 4f 66 28 | bject_hash($package->getAliasOf( |
798c0 | 29 29 5d 5b 24 69 6e 64 65 78 5d 20 3d 20 24 70 61 63 6b 61 67 65 3b 0a 7d 0a 0a 24 6e 61 6d 65 | ))][$index].=.$package;.}..$name |
798e0 | 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 3b 0a 0a 0a 0a 0a 69 66 20 28 | .=.$package->getName();.....if.( |
79900 | 69 73 73 65 74 28 24 74 68 69 73 2d 3e 72 6f 6f 74 52 65 66 65 72 65 6e 63 65 73 5b 24 6e 61 6d | isset($this->rootReferences[$nam |
79920 | 65 5d 29 29 20 7b 0a 0a 69 66 20 28 21 24 72 65 71 75 65 73 74 2d 3e 69 73 4c 6f 63 6b 65 64 50 | e])).{..if.(!$request->isLockedP |
79940 | 61 63 6b 61 67 65 28 24 70 61 63 6b 61 67 65 29 20 26 26 20 21 24 72 65 71 75 65 73 74 2d 3e 69 | ackage($package).&&.!$request->i |
79960 | 73 46 69 78 65 64 50 61 63 6b 61 67 65 28 24 70 61 63 6b 61 67 65 29 29 20 7b 0a 24 70 61 63 6b | sFixedPackage($package)).{.$pack |
79980 | 61 67 65 2d 3e 73 65 74 53 6f 75 72 63 65 44 69 73 74 52 65 66 65 72 65 6e 63 65 73 28 24 74 68 | age->setSourceDistReferences($th |
799a0 | 69 73 2d 3e 72 6f 6f 74 52 65 66 65 72 65 6e 63 65 73 5b 24 6e 61 6d 65 5d 29 3b 0a 7d 0a 7d 0a | is->rootReferences[$name]);.}.}. |
799c0 | 0a 0a 0a 69 66 20 28 24 70 72 6f 70 61 67 61 74 65 55 70 64 61 74 65 20 26 26 20 69 73 73 65 74 | ...if.($propagateUpdate.&&.isset |
799e0 | 28 24 74 68 69 73 2d 3e 72 6f 6f 74 41 6c 69 61 73 65 73 5b 24 6e 61 6d 65 5d 5b 24 70 61 63 6b | ($this->rootAliases[$name][$pack |
79a00 | 61 67 65 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 5d 29 29 20 7b 0a 24 61 6c 69 61 73 20 3d 20 | age->getVersion()])).{.$alias.=. |
79a20 | 24 74 68 69 73 2d 3e 72 6f 6f 74 41 6c 69 61 73 65 73 5b 24 6e 61 6d 65 5d 5b 24 70 61 63 6b 61 | $this->rootAliases[$name][$packa |
79a40 | 67 65 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 5d 3b 0a 69 66 20 28 24 70 61 63 6b 61 67 65 20 | ge->getVersion()];.if.($package. |
79a60 | 69 6e 73 74 61 6e 63 65 6f 66 20 41 6c 69 61 73 50 61 63 6b 61 67 65 29 20 7b 0a 24 62 61 73 65 | instanceof.AliasPackage).{.$base |
79a80 | 50 61 63 6b 61 67 65 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 41 6c 69 61 73 4f 66 28 29 | Package.=.$package->getAliasOf() |
79aa0 | 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 62 61 73 65 50 61 63 6b 61 67 65 20 3d 20 24 70 61 63 6b 61 | ;.}.else.{.$basePackage.=.$packa |
79ac0 | 67 65 3b 0a 7d 0a 69 66 20 28 24 62 61 73 65 50 61 63 6b 61 67 65 20 69 6e 73 74 61 6e 63 65 6f | ge;.}.if.($basePackage.instanceo |
79ae0 | 66 20 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 29 20 7b 0a 24 61 6c 69 61 73 50 61 63 6b 61 | f.CompletePackage).{.$aliasPacka |
79b00 | 67 65 20 3d 20 6e 65 77 20 43 6f 6d 70 6c 65 74 65 41 6c 69 61 73 50 61 63 6b 61 67 65 28 24 62 | ge.=.new.CompleteAliasPackage($b |
79b20 | 61 73 65 50 61 63 6b 61 67 65 2c 20 24 61 6c 69 61 73 5b 27 61 6c 69 61 73 5f 6e 6f 72 6d 61 6c | asePackage,.$alias['alias_normal |
79b40 | 69 7a 65 64 27 5d 2c 20 24 61 6c 69 61 73 5b 27 61 6c 69 61 73 27 5d 29 3b 0a 7d 20 65 6c 73 65 | ized'],.$alias['alias']);.}.else |
79b60 | 20 7b 0a 24 61 6c 69 61 73 50 61 63 6b 61 67 65 20 3d 20 6e 65 77 20 41 6c 69 61 73 50 61 63 6b | .{.$aliasPackage.=.new.AliasPack |
79b80 | 61 67 65 28 24 62 61 73 65 50 61 63 6b 61 67 65 2c 20 24 61 6c 69 61 73 5b 27 61 6c 69 61 73 5f | age($basePackage,.$alias['alias_ |
79ba0 | 6e 6f 72 6d 61 6c 69 7a 65 64 27 5d 2c 20 24 61 6c 69 61 73 5b 27 61 6c 69 61 73 27 5d 29 3b 0a | normalized'],.$alias['alias']);. |
79bc0 | 7d 0a 24 61 6c 69 61 73 50 61 63 6b 61 67 65 2d 3e 73 65 74 52 6f 6f 74 50 61 63 6b 61 67 65 41 | }.$aliasPackage->setRootPackageA |
79be0 | 6c 69 61 73 28 74 72 75 65 29 3b 0a 0a 24 6e 65 77 49 6e 64 65 78 20 3d 20 24 74 68 69 73 2d 3e | lias(true);..$newIndex.=.$this-> |
79c00 | 69 6e 64 65 78 43 6f 75 6e 74 65 72 2b 2b 3b 0a 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 73 5b | indexCounter++;.$this->packages[ |
79c20 | 24 6e 65 77 49 6e 64 65 78 5d 20 3d 20 24 61 6c 69 61 73 50 61 63 6b 61 67 65 3b 0a 24 74 68 69 | $newIndex].=.$aliasPackage;.$thi |
79c40 | 73 2d 3e 61 6c 69 61 73 4d 61 70 5b 73 70 6c 5f 6f 62 6a 65 63 74 5f 68 61 73 68 28 24 61 6c 69 | s->aliasMap[spl_object_hash($ali |
79c60 | 61 73 50 61 63 6b 61 67 65 2d 3e 67 65 74 41 6c 69 61 73 4f 66 28 29 29 5d 5b 24 6e 65 77 49 6e | asPackage->getAliasOf())][$newIn |
79c80 | 64 65 78 5d 20 3d 20 24 61 6c 69 61 73 50 61 63 6b 61 67 65 3b 0a 7d 0a 0a 66 6f 72 65 61 63 68 | dex].=.$aliasPackage;.}..foreach |
79ca0 | 20 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 52 65 71 75 69 72 65 73 28 29 20 61 73 20 24 6c 69 | .($package->getRequires().as.$li |
79cc0 | 6e 6b 29 20 7b 0a 24 72 65 71 75 69 72 65 20 3d 20 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 | nk).{.$require.=.$link->getTarge |
79ce0 | 74 28 29 3b 0a 24 6c 69 6e 6b 43 6f 6e 73 74 72 61 69 6e 74 20 3d 20 24 6c 69 6e 6b 2d 3e 67 65 | t();.$linkConstraint.=.$link->ge |
79d00 | 74 43 6f 6e 73 74 72 61 69 6e 74 28 29 3b 0a 0a 0a 69 66 20 28 69 73 73 65 74 28 24 74 68 69 73 | tConstraint();...if.(isset($this |
79d20 | 2d 3e 73 6b 69 70 70 65 64 4c 6f 61 64 5b 24 72 65 71 75 69 72 65 5d 29 29 20 7b 0a 0a 0a 0a 69 | ->skippedLoad[$require])).{....i |
79d40 | 66 20 28 24 70 72 6f 70 61 67 61 74 65 55 70 64 61 74 65 20 26 26 20 24 72 65 71 75 65 73 74 2d | f.($propagateUpdate.&&.$request- |
79d60 | 3e 67 65 74 55 70 64 61 74 65 41 6c 6c 6f 77 54 72 61 6e 73 69 74 69 76 65 44 65 70 65 6e 64 65 | >getUpdateAllowTransitiveDepende |
79d80 | 6e 63 69 65 73 28 29 29 20 7b 0a 24 73 6b 69 70 70 65 64 52 6f 6f 74 52 65 71 75 69 72 65 73 20 | ncies()).{.$skippedRootRequires. |
79da0 | 3d 20 24 74 68 69 73 2d 3e 67 65 74 53 6b 69 70 70 65 64 52 6f 6f 74 52 65 71 75 69 72 65 73 28 | =.$this->getSkippedRootRequires( |
79dc0 | 24 72 65 71 75 65 73 74 2c 20 24 72 65 71 75 69 72 65 29 3b 0a 0a 69 66 20 28 24 72 65 71 75 65 | $request,.$require);..if.($reque |
79de0 | 73 74 2d 3e 67 65 74 55 70 64 61 74 65 41 6c 6c 6f 77 54 72 61 6e 73 69 74 69 76 65 52 6f 6f 74 | st->getUpdateAllowTransitiveRoot |
79e00 | 44 65 70 65 6e 64 65 6e 63 69 65 73 28 29 20 7c 7c 20 21 24 73 6b 69 70 70 65 64 52 6f 6f 74 52 | Dependencies().||.!$skippedRootR |
79e20 | 65 71 75 69 72 65 73 29 20 7b 0a 24 74 68 69 73 2d 3e 75 6e 6c 6f 63 6b 50 61 63 6b 61 67 65 28 | equires).{.$this->unlockPackage( |
79e40 | 24 72 65 71 75 65 73 74 2c 20 24 72 65 70 6f 73 69 74 6f 72 69 65 73 2c 20 24 72 65 71 75 69 72 | $request,.$repositories,.$requir |
79e60 | 65 29 3b 0a 24 74 68 69 73 2d 3e 6d 61 72 6b 50 61 63 6b 61 67 65 4e 61 6d 65 46 6f 72 4c 6f 61 | e);.$this->markPackageNameForLoa |
79e80 | 64 69 6e 67 28 24 72 65 71 75 65 73 74 2c 20 24 72 65 71 75 69 72 65 2c 20 24 6c 69 6e 6b 43 6f | ding($request,.$require,.$linkCo |
79ea0 | 6e 73 74 72 61 69 6e 74 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 73 6b | nstraint);.}.else.{.foreach.($sk |
79ec0 | 69 70 70 65 64 52 6f 6f 74 52 65 71 75 69 72 65 73 20 61 73 20 24 72 6f 6f 74 52 65 71 75 69 72 | ippedRootRequires.as.$rootRequir |
79ee0 | 65 29 20 7b 0a 69 66 20 28 21 69 73 73 65 74 28 24 74 68 69 73 2d 3e 75 70 64 61 74 65 41 6c 6c | e).{.if.(!isset($this->updateAll |
79f00 | 6f 77 57 61 72 6e 65 64 5b 24 72 6f 6f 74 52 65 71 75 69 72 65 5d 29 29 20 7b 0a 24 74 68 69 73 | owWarned[$rootRequire])).{.$this |
79f20 | 2d 3e 75 70 64 61 74 65 41 6c 6c 6f 77 57 61 72 6e 65 64 5b 24 72 6f 6f 74 52 65 71 75 69 72 65 | ->updateAllowWarned[$rootRequire |
79f40 | 5d 20 3d 20 74 72 75 65 3b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 | ].=.true;.$this->io->writeError( |
79f60 | 27 3c 77 61 72 6e 69 6e 67 3e 44 65 70 65 6e 64 65 6e 63 79 20 27 2e 24 72 6f 6f 74 52 65 71 75 | '<warning>Dependency.'.$rootRequ |
79f80 | 69 72 65 2e 27 20 69 73 20 61 6c 73 6f 20 61 20 72 6f 6f 74 20 72 65 71 75 69 72 65 6d 65 6e 74 | ire.'.is.also.a.root.requirement |
79fa0 | 2e 20 50 61 63 6b 61 67 65 20 68 61 73 20 6e 6f 74 20 62 65 65 6e 20 6c 69 73 74 65 64 20 61 73 | ..Package.has.not.been.listed.as |
79fc0 | 20 61 6e 20 75 70 64 61 74 65 20 61 72 67 75 6d 65 6e 74 2c 20 73 6f 20 6b 65 65 70 69 6e 67 20 | .an.update.argument,.so.keeping. |
79fe0 | 6c 6f 63 6b 65 64 20 61 74 20 6f 6c 64 20 76 65 72 73 69 6f 6e 2e 20 55 73 65 20 2d 2d 77 69 74 | locked.at.old.version..Use.--wit |
7a000 | 68 2d 61 6c 6c 2d 64 65 70 65 6e 64 65 6e 63 69 65 73 20 28 2d 57 29 20 74 6f 20 69 6e 63 6c 75 | h-all-dependencies.(-W).to.inclu |
7a020 | 64 65 20 72 6f 6f 74 20 64 65 70 65 6e 64 65 6e 63 69 65 73 2e 3c 2f 77 61 72 6e 69 6e 67 3e 27 | de.root.dependencies.</warning>' |
7a040 | 29 3b 0a 7d 0a 7d 0a 7d 0a 7d 20 65 6c 73 65 69 66 20 28 69 73 73 65 74 28 24 74 68 69 73 2d 3e | );.}.}.}.}.elseif.(isset($this-> |
7a060 | 70 61 74 68 52 65 70 6f 55 6e 6c 6f 63 6b 65 64 5b 24 72 65 71 75 69 72 65 5d 29 20 26 26 20 21 | pathRepoUnlocked[$require]).&&.! |
7a080 | 69 73 73 65 74 28 24 74 68 69 73 2d 3e 6c 6f 61 64 65 64 50 61 63 6b 61 67 65 73 5b 24 72 65 71 | isset($this->loadedPackages[$req |
7a0a0 | 75 69 72 65 5d 29 29 20 7b 0a 0a 0a 24 74 68 69 73 2d 3e 6d 61 72 6b 50 61 63 6b 61 67 65 4e 61 | uire])).{...$this->markPackageNa |
7a0c0 | 6d 65 46 6f 72 4c 6f 61 64 69 6e 67 28 24 72 65 71 75 65 73 74 2c 20 24 72 65 71 75 69 72 65 2c | meForLoading($request,.$require, |
7a0e0 | 20 24 6c 69 6e 6b 43 6f 6e 73 74 72 61 69 6e 74 29 3b 0a 7d 0a 7d 20 65 6c 73 65 20 7b 0a 24 74 | .$linkConstraint);.}.}.else.{.$t |
7a100 | 68 69 73 2d 3e 6d 61 72 6b 50 61 63 6b 61 67 65 4e 61 6d 65 46 6f 72 4c 6f 61 64 69 6e 67 28 24 | his->markPackageNameForLoading($ |
7a120 | 72 65 71 75 65 73 74 2c 20 24 72 65 71 75 69 72 65 2c 20 24 6c 69 6e 6b 43 6f 6e 73 74 72 61 69 | request,.$require,.$linkConstrai |
7a140 | 6e 74 29 3b 0a 7d 0a 7d 0a 0a 0a 0a 69 66 20 28 24 70 72 6f 70 61 67 61 74 65 55 70 64 61 74 65 | nt);.}.}....if.($propagateUpdate |
7a160 | 20 26 26 20 24 72 65 71 75 65 73 74 2d 3e 67 65 74 55 70 64 61 74 65 41 6c 6c 6f 77 54 72 61 6e | .&&.$request->getUpdateAllowTran |
7a180 | 73 69 74 69 76 65 44 65 70 65 6e 64 65 6e 63 69 65 73 28 29 29 20 7b 0a 66 6f 72 65 61 63 68 20 | sitiveDependencies()).{.foreach. |
7a1a0 | 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 52 65 70 6c 61 63 65 73 28 29 20 61 73 20 24 6c 69 6e | ($package->getReplaces().as.$lin |
7a1c0 | 6b 29 20 7b 0a 24 72 65 70 6c 61 63 65 20 3d 20 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 74 | k).{.$replace.=.$link->getTarget |
7a1e0 | 28 29 3b 0a 69 66 20 28 69 73 73 65 74 28 24 74 68 69 73 2d 3e 6c 6f 61 64 65 64 50 61 63 6b 61 | ();.if.(isset($this->loadedPacka |
7a200 | 67 65 73 5b 24 72 65 70 6c 61 63 65 5d 2c 20 24 74 68 69 73 2d 3e 73 6b 69 70 70 65 64 4c 6f 61 | ges[$replace],.$this->skippedLoa |
7a220 | 64 5b 24 72 65 70 6c 61 63 65 5d 29 29 20 7b 0a 24 73 6b 69 70 70 65 64 52 6f 6f 74 52 65 71 75 | d[$replace])).{.$skippedRootRequ |
7a240 | 69 72 65 73 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 53 6b 69 70 70 65 64 52 6f 6f 74 52 65 71 75 | ires.=.$this->getSkippedRootRequ |
7a260 | 69 72 65 73 28 24 72 65 71 75 65 73 74 2c 20 24 72 65 70 6c 61 63 65 29 3b 0a 0a 69 66 20 28 24 | ires($request,.$replace);..if.($ |
7a280 | 72 65 71 75 65 73 74 2d 3e 67 65 74 55 70 64 61 74 65 41 6c 6c 6f 77 54 72 61 6e 73 69 74 69 76 | request->getUpdateAllowTransitiv |
7a2a0 | 65 52 6f 6f 74 44 65 70 65 6e 64 65 6e 63 69 65 73 28 29 20 7c 7c 20 21 24 73 6b 69 70 70 65 64 | eRootDependencies().||.!$skipped |
7a2c0 | 52 6f 6f 74 52 65 71 75 69 72 65 73 29 20 7b 0a 24 74 68 69 73 2d 3e 75 6e 6c 6f 63 6b 50 61 63 | RootRequires).{.$this->unlockPac |
7a2e0 | 6b 61 67 65 28 24 72 65 71 75 65 73 74 2c 20 24 72 65 70 6f 73 69 74 6f 72 69 65 73 2c 20 24 72 | kage($request,.$repositories,.$r |
7a300 | 65 70 6c 61 63 65 29 3b 0a 24 74 68 69 73 2d 3e 6d 61 72 6b 50 61 63 6b 61 67 65 4e 61 6d 65 46 | eplace);.$this->markPackageNameF |
7a320 | 6f 72 4c 6f 61 64 69 6e 67 28 24 72 65 71 75 65 73 74 2c 20 24 72 65 70 6c 61 63 65 2c 20 24 6c | orLoading($request,.$replace,.$l |
7a340 | 69 6e 6b 2d 3e 67 65 74 43 6f 6e 73 74 72 61 69 6e 74 28 29 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a | ink->getConstraint());.}.else.{. |
7a360 | 66 6f 72 65 61 63 68 20 28 24 73 6b 69 70 70 65 64 52 6f 6f 74 52 65 71 75 69 72 65 73 20 61 73 | foreach.($skippedRootRequires.as |
7a380 | 20 24 72 6f 6f 74 52 65 71 75 69 72 65 29 20 7b 0a 69 66 20 28 21 69 73 73 65 74 28 24 74 68 69 | .$rootRequire).{.if.(!isset($thi |
7a3a0 | 73 2d 3e 75 70 64 61 74 65 41 6c 6c 6f 77 57 61 72 6e 65 64 5b 24 72 6f 6f 74 52 65 71 75 69 72 | s->updateAllowWarned[$rootRequir |
7a3c0 | 65 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 75 70 64 61 74 65 41 6c 6c 6f 77 57 61 72 6e 65 64 5b | e])).{.$this->updateAllowWarned[ |
7a3e0 | 24 72 6f 6f 74 52 65 71 75 69 72 65 5d 20 3d 20 74 72 75 65 3b 0a 24 74 68 69 73 2d 3e 69 6f 2d | $rootRequire].=.true;.$this->io- |
7a400 | 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 77 61 72 6e 69 6e 67 3e 44 65 70 65 6e 64 65 6e 63 79 | >writeError('<warning>Dependency |
7a420 | 20 27 2e 24 72 6f 6f 74 52 65 71 75 69 72 65 2e 27 20 69 73 20 61 6c 73 6f 20 61 20 72 6f 6f 74 | .'.$rootRequire.'.is.also.a.root |
7a440 | 20 72 65 71 75 69 72 65 6d 65 6e 74 2e 20 50 61 63 6b 61 67 65 20 68 61 73 20 6e 6f 74 20 62 65 | .requirement..Package.has.not.be |
7a460 | 65 6e 20 6c 69 73 74 65 64 20 61 73 20 61 6e 20 75 70 64 61 74 65 20 61 72 67 75 6d 65 6e 74 2c | en.listed.as.an.update.argument, |
7a480 | 20 73 6f 20 6b 65 65 70 69 6e 67 20 6c 6f 63 6b 65 64 20 61 74 20 6f 6c 64 20 76 65 72 73 69 6f | .so.keeping.locked.at.old.versio |
7a4a0 | 6e 2e 20 55 73 65 20 2d 2d 77 69 74 68 2d 61 6c 6c 2d 64 65 70 65 6e 64 65 6e 63 69 65 73 20 28 | n..Use.--with-all-dependencies.( |
7a4c0 | 2d 57 29 20 74 6f 20 69 6e 63 6c 75 64 65 20 72 6f 6f 74 20 64 65 70 65 6e 64 65 6e 63 69 65 73 | -W).to.include.root.dependencies |
7a4e0 | 2e 3c 2f 77 61 72 6e 69 6e 67 3e 27 29 3b 0a 7d 0a 7d 0a 7d 0a 7d 0a 7d 0a 7d 0a 7d 0a 0a 0a 0a | .</warning>');.}.}.}.}.}.}.}.... |
7a500 | 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 69 73 52 6f 6f 74 52 65 71 75 69 72 | ...private.function.isRootRequir |
7a520 | 65 28 52 65 71 75 65 73 74 20 24 72 65 71 75 65 73 74 2c 20 73 74 72 69 6e 67 20 24 6e 61 6d 65 | e(Request.$request,.string.$name |
7a540 | 29 3a 20 62 6f 6f 6c 0a 7b 0a 24 72 6f 6f 74 52 65 71 75 69 72 65 73 20 3d 20 24 72 65 71 75 65 | ):.bool.{.$rootRequires.=.$reque |
7a560 | 73 74 2d 3e 67 65 74 52 65 71 75 69 72 65 73 28 29 3b 0a 0a 72 65 74 75 72 6e 20 69 73 73 65 74 | st->getRequires();..return.isset |
7a580 | 28 24 72 6f 6f 74 52 65 71 75 69 72 65 73 5b 24 6e 61 6d 65 5d 29 3b 0a 7d 0a 0a 0a 0a 0a 70 72 | ($rootRequires[$name]);.}.....pr |
7a5a0 | 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 53 6b 69 70 70 65 64 52 6f 6f 74 52 65 71 | ivate.function.getSkippedRootReq |
7a5c0 | 75 69 72 65 73 28 52 65 71 75 65 73 74 20 24 72 65 71 75 65 73 74 2c 20 73 74 72 69 6e 67 20 24 | uires(Request.$request,.string.$ |
7a5e0 | 6e 61 6d 65 29 3a 20 61 72 72 61 79 0a 7b 0a 69 66 20 28 21 69 73 73 65 74 28 24 74 68 69 73 2d | name):.array.{.if.(!isset($this- |
7a600 | 3e 73 6b 69 70 70 65 64 4c 6f 61 64 5b 24 6e 61 6d 65 5d 29 29 20 7b 0a 72 65 74 75 72 6e 20 5b | >skippedLoad[$name])).{.return.[ |
7a620 | 5d 3b 0a 7d 0a 0a 24 72 6f 6f 74 52 65 71 75 69 72 65 73 20 3d 20 24 72 65 71 75 65 73 74 2d 3e | ];.}..$rootRequires.=.$request-> |
7a640 | 67 65 74 52 65 71 75 69 72 65 73 28 29 3b 0a 24 6d 61 74 63 68 65 73 20 3d 20 5b 5d 3b 0a 0a 69 | getRequires();.$matches.=.[];..i |
7a660 | 66 20 28 69 73 73 65 74 28 24 72 6f 6f 74 52 65 71 75 69 72 65 73 5b 24 6e 61 6d 65 5d 29 29 20 | f.(isset($rootRequires[$name])). |
7a680 | 7b 0a 72 65 74 75 72 6e 20 61 72 72 61 79 5f 6d 61 70 28 73 74 61 74 69 63 20 66 75 6e 63 74 69 | {.return.array_map(static.functi |
7a6a0 | 6f 6e 20 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 29 20 75 | on.(PackageInterface.$package).u |
7a6c0 | 73 65 20 28 24 6e 61 6d 65 29 3a 20 73 74 72 69 6e 67 20 7b 0a 69 66 20 28 24 6e 61 6d 65 20 21 | se.($name):.string.{.if.($name.! |
7a6e0 | 3d 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 29 20 7b 0a 72 65 74 75 72 6e | ==.$package->getName()).{.return |
7a700 | 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 20 2e 27 20 28 76 69 61 20 72 65 70 | .$package->getName()..'.(via.rep |
7a720 | 6c 61 63 65 20 6f 66 20 27 2e 24 6e 61 6d 65 2e 27 29 27 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 | lace.of.'.$name.')';.}..return.$ |
7a740 | 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 3b 0a 7d 2c 20 24 74 68 69 73 2d 3e 73 6b | package->getName();.},.$this->sk |
7a760 | 69 70 70 65 64 4c 6f 61 64 5b 24 6e 61 6d 65 5d 29 3b 0a 7d 0a 0a 66 6f 72 65 61 63 68 20 28 24 | ippedLoad[$name]);.}..foreach.($ |
7a780 | 74 68 69 73 2d 3e 73 6b 69 70 70 65 64 4c 6f 61 64 5b 24 6e 61 6d 65 5d 20 61 73 20 24 70 61 63 | this->skippedLoad[$name].as.$pac |
7a7a0 | 6b 61 67 65 4f 72 52 65 70 6c 61 63 65 72 29 20 7b 0a 69 66 20 28 69 73 73 65 74 28 24 72 6f 6f | kageOrReplacer).{.if.(isset($roo |
7a7c0 | 74 52 65 71 75 69 72 65 73 5b 24 70 61 63 6b 61 67 65 4f 72 52 65 70 6c 61 63 65 72 2d 3e 67 65 | tRequires[$packageOrReplacer->ge |
7a7e0 | 74 4e 61 6d 65 28 29 5d 29 29 20 7b 0a 24 6d 61 74 63 68 65 73 5b 5d 20 3d 20 24 70 61 63 6b 61 | tName()])).{.$matches[].=.$packa |
7a800 | 67 65 4f 72 52 65 70 6c 61 63 65 72 2d 3e 67 65 74 4e 61 6d 65 28 29 3b 0a 7d 0a 66 6f 72 65 61 | geOrReplacer->getName();.}.forea |
7a820 | 63 68 20 28 24 70 61 63 6b 61 67 65 4f 72 52 65 70 6c 61 63 65 72 2d 3e 67 65 74 52 65 70 6c 61 | ch.($packageOrReplacer->getRepla |
7a840 | 63 65 73 28 29 20 61 73 20 24 6c 69 6e 6b 29 20 7b 0a 69 66 20 28 69 73 73 65 74 28 24 72 6f 6f | ces().as.$link).{.if.(isset($roo |
7a860 | 74 52 65 71 75 69 72 65 73 5b 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 74 28 29 5d 29 29 20 | tRequires[$link->getTarget()])). |
7a880 | 7b 0a 69 66 20 28 24 6e 61 6d 65 20 21 3d 3d 20 24 70 61 63 6b 61 67 65 4f 72 52 65 70 6c 61 63 | {.if.($name.!==.$packageOrReplac |
7a8a0 | 65 72 2d 3e 67 65 74 4e 61 6d 65 28 29 29 20 7b 0a 24 6d 61 74 63 68 65 73 5b 5d 20 3d 20 24 70 | er->getName()).{.$matches[].=.$p |
7a8c0 | 61 63 6b 61 67 65 4f 72 52 65 70 6c 61 63 65 72 2d 3e 67 65 74 4e 61 6d 65 28 29 20 2e 27 20 28 | ackageOrReplacer->getName()..'.( |
7a8e0 | 76 69 61 20 72 65 70 6c 61 63 65 20 6f 66 20 27 2e 24 6e 61 6d 65 2e 27 29 27 3b 0a 7d 20 65 6c | via.replace.of.'.$name.')';.}.el |
7a900 | 73 65 20 7b 0a 24 6d 61 74 63 68 65 73 5b 5d 20 3d 20 24 70 61 63 6b 61 67 65 4f 72 52 65 70 6c | se.{.$matches[].=.$packageOrRepl |
7a920 | 61 63 65 72 2d 3e 67 65 74 4e 61 6d 65 28 29 3b 0a 7d 0a 62 72 65 61 6b 3b 0a 7d 0a 7d 0a 7d 0a | acer->getName();.}.break;.}.}.}. |
7a940 | 0a 72 65 74 75 72 6e 20 24 6d 61 74 63 68 65 73 3b 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 | .return.$matches;.}.....private. |
7a960 | 66 75 6e 63 74 69 6f 6e 20 69 73 55 70 64 61 74 65 41 6c 6c 6f 77 65 64 28 42 61 73 65 50 61 63 | function.isUpdateAllowed(BasePac |
7a980 | 6b 61 67 65 20 24 70 61 63 6b 61 67 65 29 3a 20 62 6f 6f 6c 0a 7b 0a 66 6f 72 65 61 63 68 20 28 | kage.$package):.bool.{.foreach.( |
7a9a0 | 24 74 68 69 73 2d 3e 75 70 64 61 74 65 41 6c 6c 6f 77 4c 69 73 74 20 61 73 20 24 70 61 74 74 65 | $this->updateAllowList.as.$patte |
7a9c0 | 72 6e 20 3d 3e 20 24 76 6f 69 64 29 20 7b 0a 24 70 61 74 74 65 72 6e 52 65 67 65 78 70 20 3d 20 | rn.=>.$void).{.$patternRegexp.=. |
7a9e0 | 42 61 73 65 50 61 63 6b 61 67 65 3a 3a 70 61 63 6b 61 67 65 4e 61 6d 65 54 6f 52 65 67 65 78 70 | BasePackage::packageNameToRegexp |
7aa00 | 28 24 70 61 74 74 65 72 6e 29 3b 0a 69 66 20 28 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 24 70 | ($pattern);.if.(Preg::isMatch($p |
7aa20 | 61 74 74 65 72 6e 52 65 67 65 78 70 2c 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 | atternRegexp,.$package->getName( |
7aa40 | 29 29 29 20 7b 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 66 | ))).{.return.true;.}.}..return.f |
7aa60 | 61 6c 73 65 3b 0a 7d 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 77 61 72 6e 41 62 | alse;.}..private.function.warnAb |
7aa80 | 6f 75 74 4e 6f 6e 4d 61 74 63 68 69 6e 67 55 70 64 61 74 65 41 6c 6c 6f 77 4c 69 73 74 28 52 65 | outNonMatchingUpdateAllowList(Re |
7aaa0 | 71 75 65 73 74 20 24 72 65 71 75 65 73 74 29 3a 20 76 6f 69 64 0a 7b 0a 66 6f 72 65 61 63 68 20 | quest.$request):.void.{.foreach. |
7aac0 | 28 24 74 68 69 73 2d 3e 75 70 64 61 74 65 41 6c 6c 6f 77 4c 69 73 74 20 61 73 20 24 70 61 74 74 | ($this->updateAllowList.as.$patt |
7aae0 | 65 72 6e 20 3d 3e 20 24 76 6f 69 64 29 20 7b 0a 24 70 61 74 74 65 72 6e 52 65 67 65 78 70 20 3d | ern.=>.$void).{.$patternRegexp.= |
7ab00 | 20 42 61 73 65 50 61 63 6b 61 67 65 3a 3a 70 61 63 6b 61 67 65 4e 61 6d 65 54 6f 52 65 67 65 78 | .BasePackage::packageNameToRegex |
7ab20 | 70 28 24 70 61 74 74 65 72 6e 29 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 72 65 71 75 65 73 74 2d | p($pattern);..foreach.($request- |
7ab40 | 3e 67 65 74 4c 6f 63 6b 65 64 52 65 70 6f 73 69 74 6f 72 79 28 29 2d 3e 67 65 74 50 61 63 6b 61 | >getLockedRepository()->getPacka |
7ab60 | 67 65 73 28 29 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 69 66 20 28 50 72 65 67 3a 3a 69 | ges().as.$package).{.if.(Preg::i |
7ab80 | 73 4d 61 74 63 68 28 24 70 61 74 74 65 72 6e 52 65 67 65 78 70 2c 20 24 70 61 63 6b 61 67 65 2d | sMatch($patternRegexp,.$package- |
7aba0 | 3e 67 65 74 4e 61 6d 65 28 29 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 20 32 3b 0a 7d 0a 7d 0a 0a | >getName())).{.continue.2;.}.}.. |
7abc0 | 66 6f 72 65 61 63 68 20 28 24 72 65 71 75 65 73 74 2d 3e 67 65 74 52 65 71 75 69 72 65 73 28 29 | foreach.($request->getRequires() |
7abe0 | 20 61 73 20 24 70 61 63 6b 61 67 65 4e 61 6d 65 20 3d 3e 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 | .as.$packageName.=>.$constraint) |
7ac00 | 20 7b 0a 69 66 20 28 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 24 70 61 74 74 65 72 6e 52 65 67 | .{.if.(Preg::isMatch($patternReg |
7ac20 | 65 78 70 2c 20 24 70 61 63 6b 61 67 65 4e 61 6d 65 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 20 32 | exp,.$packageName)).{.continue.2 |
7ac40 | 3b 0a 7d 0a 7d 0a 69 66 20 28 73 74 72 70 6f 73 28 24 70 61 74 74 65 72 6e 2c 20 27 2a 27 29 20 | ;.}.}.if.(strpos($pattern,.'*'). |
7ac60 | 21 3d 3d 20 66 61 6c 73 65 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 | !==.false).{.$this->io->writeErr |
7ac80 | 6f 72 28 27 3c 77 61 72 6e 69 6e 67 3e 50 61 74 74 65 72 6e 20 22 27 20 2e 20 24 70 61 74 74 65 | or('<warning>Pattern."'...$patte |
7aca0 | 72 6e 20 2e 20 27 22 20 6c 69 73 74 65 64 20 66 6f 72 20 75 70 64 61 74 65 20 64 6f 65 73 20 6e | rn...'".listed.for.update.does.n |
7acc0 | 6f 74 20 6d 61 74 63 68 20 61 6e 79 20 6c 6f 63 6b 65 64 20 70 61 63 6b 61 67 65 73 2e 3c 2f 77 | ot.match.any.locked.packages.</w |
7ace0 | 61 72 6e 69 6e 67 3e 27 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 | arning>');.}.else.{.$this->io->w |
7ad00 | 72 69 74 65 45 72 72 6f 72 28 27 3c 77 61 72 6e 69 6e 67 3e 50 61 63 6b 61 67 65 20 22 27 20 2e | riteError('<warning>Package."'.. |
7ad20 | 20 24 70 61 74 74 65 72 6e 20 2e 20 27 22 20 6c 69 73 74 65 64 20 66 6f 72 20 75 70 64 61 74 65 | .$pattern...'".listed.for.update |
7ad40 | 20 69 73 20 6e 6f 74 20 6c 6f 63 6b 65 64 2e 3c 2f 77 61 72 6e 69 6e 67 3e 27 29 3b 0a 7d 0a 7d | .is.not.locked.</warning>');.}.} |
7ad60 | 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 75 6e 6c 6f 63 | .}........private.function.unloc |
7ad80 | 6b 50 61 63 6b 61 67 65 28 52 65 71 75 65 73 74 20 24 72 65 71 75 65 73 74 2c 20 61 72 72 61 79 | kPackage(Request.$request,.array |
7ada0 | 20 24 72 65 70 6f 73 69 74 6f 72 69 65 73 2c 20 73 74 72 69 6e 67 20 24 6e 61 6d 65 29 3a 20 76 | .$repositories,.string.$name):.v |
7adc0 | 6f 69 64 0a 7b 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 73 6b 69 70 70 65 64 4c 6f 61 | oid.{.foreach.($this->skippedLoa |
7ade0 | 64 5b 24 6e 61 6d 65 5d 20 61 73 20 24 70 61 63 6b 61 67 65 4f 72 52 65 70 6c 61 63 65 72 29 20 | d[$name].as.$packageOrReplacer). |
7ae00 | 7b 0a 0a 0a 69 66 20 28 24 70 61 63 6b 61 67 65 4f 72 52 65 70 6c 61 63 65 72 2d 3e 67 65 74 4e | {...if.($packageOrReplacer->getN |
7ae20 | 61 6d 65 28 29 20 21 3d 3d 20 24 6e 61 6d 65 20 26 26 20 69 73 73 65 74 28 24 74 68 69 73 2d 3e | ame().!==.$name.&&.isset($this-> |
7ae40 | 73 6b 69 70 70 65 64 4c 6f 61 64 5b 24 70 61 63 6b 61 67 65 4f 72 52 65 70 6c 61 63 65 72 2d 3e | skippedLoad[$packageOrReplacer-> |
7ae60 | 67 65 74 4e 61 6d 65 28 29 5d 29 29 20 7b 0a 24 72 65 70 6c 61 63 65 72 4e 61 6d 65 20 3d 20 24 | getName()])).{.$replacerName.=.$ |
7ae80 | 70 61 63 6b 61 67 65 4f 72 52 65 70 6c 61 63 65 72 2d 3e 67 65 74 4e 61 6d 65 28 29 3b 0a 69 66 | packageOrReplacer->getName();.if |
7aea0 | 20 28 24 72 65 71 75 65 73 74 2d 3e 67 65 74 55 70 64 61 74 65 41 6c 6c 6f 77 54 72 61 6e 73 69 | .($request->getUpdateAllowTransi |
7aec0 | 74 69 76 65 52 6f 6f 74 44 65 70 65 6e 64 65 6e 63 69 65 73 28 29 20 7c 7c 20 28 21 24 74 68 69 | tiveRootDependencies().||.(!$thi |
7aee0 | 73 2d 3e 69 73 52 6f 6f 74 52 65 71 75 69 72 65 28 24 72 65 71 75 65 73 74 2c 20 24 6e 61 6d 65 | s->isRootRequire($request,.$name |
7af00 | 29 20 26 26 20 21 24 74 68 69 73 2d 3e 69 73 52 6f 6f 74 52 65 71 75 69 72 65 28 24 72 65 71 75 | ).&&.!$this->isRootRequire($requ |
7af20 | 65 73 74 2c 20 24 72 65 70 6c 61 63 65 72 4e 61 6d 65 29 29 29 20 7b 0a 24 74 68 69 73 2d 3e 75 | est,.$replacerName))).{.$this->u |
7af40 | 6e 6c 6f 63 6b 50 61 63 6b 61 67 65 28 24 72 65 71 75 65 73 74 2c 20 24 72 65 70 6f 73 69 74 6f | nlockPackage($request,.$reposito |
7af60 | 72 69 65 73 2c 20 24 72 65 70 6c 61 63 65 72 4e 61 6d 65 29 3b 0a 0a 69 66 20 28 24 74 68 69 73 | ries,.$replacerName);..if.($this |
7af80 | 2d 3e 69 73 52 6f 6f 74 52 65 71 75 69 72 65 28 24 72 65 71 75 65 73 74 2c 20 24 72 65 70 6c 61 | ->isRootRequire($request,.$repla |
7afa0 | 63 65 72 4e 61 6d 65 29 29 20 7b 0a 24 74 68 69 73 2d 3e 6d 61 72 6b 50 61 63 6b 61 67 65 4e 61 | cerName)).{.$this->markPackageNa |
7afc0 | 6d 65 46 6f 72 4c 6f 61 64 69 6e 67 28 24 72 65 71 75 65 73 74 2c 20 24 72 65 70 6c 61 63 65 72 | meForLoading($request,.$replacer |
7afe0 | 4e 61 6d 65 2c 20 6e 65 77 20 4d 61 74 63 68 41 6c 6c 43 6f 6e 73 74 72 61 69 6e 74 29 3b 0a 7d | Name,.new.MatchAllConstraint);.} |
7b000 | 20 65 6c 73 65 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 73 | .else.{.foreach.($this->packages |
7b020 | 20 61 73 20 24 6c 6f 61 64 65 64 50 61 63 6b 61 67 65 29 20 7b 0a 24 72 65 71 75 69 72 65 73 20 | .as.$loadedPackage).{.$requires. |
7b040 | 3d 20 24 6c 6f 61 64 65 64 50 61 63 6b 61 67 65 2d 3e 67 65 74 52 65 71 75 69 72 65 73 28 29 3b | =.$loadedPackage->getRequires(); |
7b060 | 0a 69 66 20 28 69 73 73 65 74 28 24 72 65 71 75 69 72 65 73 5b 24 72 65 70 6c 61 63 65 72 4e 61 | .if.(isset($requires[$replacerNa |
7b080 | 6d 65 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 6d 61 72 6b 50 61 63 6b 61 67 65 4e 61 6d 65 46 6f | me])).{.$this->markPackageNameFo |
7b0a0 | 72 4c 6f 61 64 69 6e 67 28 24 72 65 71 75 65 73 74 2c 20 24 72 65 70 6c 61 63 65 72 4e 61 6d 65 | rLoading($request,.$replacerName |
7b0c0 | 2c 20 24 72 65 71 75 69 72 65 73 5b 24 72 65 70 6c 61 63 65 72 4e 61 6d 65 5d 2d 3e 67 65 74 43 | ,.$requires[$replacerName]->getC |
7b0e0 | 6f 6e 73 74 72 61 69 6e 74 28 29 29 3b 0a 7d 0a 7d 0a 7d 0a 7d 0a 7d 0a 7d 0a 0a 69 66 20 28 69 | onstraint());.}.}.}.}.}.}..if.(i |
7b100 | 73 73 65 74 28 24 74 68 69 73 2d 3e 70 61 74 68 52 65 70 6f 55 6e 6c 6f 63 6b 65 64 5b 24 6e 61 | sset($this->pathRepoUnlocked[$na |
7b120 | 6d 65 5d 29 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 73 | me])).{.foreach.($this->packages |
7b140 | 20 61 73 20 24 69 6e 64 65 78 20 3d 3e 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 69 66 20 28 24 70 | .as.$index.=>.$package).{.if.($p |
7b160 | 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 20 3d 3d 3d 20 24 6e 61 6d 65 29 20 7b 0a 24 | ackage->getName().===.$name).{.$ |
7b180 | 74 68 69 73 2d 3e 72 65 6d 6f 76 65 4c 6f 61 64 65 64 50 61 63 6b 61 67 65 28 24 72 65 71 75 65 | this->removeLoadedPackage($reque |
7b1a0 | 73 74 2c 20 24 72 65 70 6f 73 69 74 6f 72 69 65 73 2c 20 24 70 61 63 6b 61 67 65 2c 20 24 69 6e | st,.$repositories,.$package,.$in |
7b1c0 | 64 65 78 29 3b 0a 7d 0a 7d 0a 7d 0a 0a 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 73 6b 69 70 70 65 | dex);.}.}.}..unset($this->skippe |
7b1e0 | 64 4c 6f 61 64 5b 24 6e 61 6d 65 5d 2c 20 24 74 68 69 73 2d 3e 6c 6f 61 64 65 64 50 61 63 6b 61 | dLoad[$name],.$this->loadedPacka |
7b200 | 67 65 73 5b 24 6e 61 6d 65 5d 2c 20 24 74 68 69 73 2d 3e 6d 61 78 45 78 74 65 6e 64 65 64 52 65 | ges[$name],.$this->maxExtendedRe |
7b220 | 71 73 5b 24 6e 61 6d 65 5d 2c 20 24 74 68 69 73 2d 3e 70 61 74 68 52 65 70 6f 55 6e 6c 6f 63 6b | qs[$name],.$this->pathRepoUnlock |
7b240 | 65 64 5b 24 6e 61 6d 65 5d 29 3b 0a 0a 0a 66 6f 72 65 61 63 68 20 28 24 72 65 71 75 65 73 74 2d | ed[$name]);...foreach.($request- |
7b260 | 3e 67 65 74 4c 6f 63 6b 65 64 50 61 63 6b 61 67 65 73 28 29 20 61 73 20 24 6c 6f 63 6b 65 64 50 | >getLockedPackages().as.$lockedP |
7b280 | 61 63 6b 61 67 65 29 20 7b 0a 69 66 20 28 21 28 24 6c 6f 63 6b 65 64 50 61 63 6b 61 67 65 20 69 | ackage).{.if.(!($lockedPackage.i |
7b2a0 | 6e 73 74 61 6e 63 65 6f 66 20 41 6c 69 61 73 50 61 63 6b 61 67 65 29 20 26 26 20 24 6c 6f 63 6b | nstanceof.AliasPackage).&&.$lock |
7b2c0 | 65 64 50 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 20 3d 3d 3d 20 24 6e 61 6d 65 29 20 | edPackage->getName().===.$name). |
7b2e0 | 7b 0a 69 66 20 28 66 61 6c 73 65 20 21 3d 3d 20 24 69 6e 64 65 78 20 3d 20 61 72 72 61 79 5f 73 | {.if.(false.!==.$index.=.array_s |
7b300 | 65 61 72 63 68 28 24 6c 6f 63 6b 65 64 50 61 63 6b 61 67 65 2c 20 24 74 68 69 73 2d 3e 70 61 63 | earch($lockedPackage,.$this->pac |
7b320 | 6b 61 67 65 73 2c 20 74 72 75 65 29 29 20 7b 0a 24 72 65 71 75 65 73 74 2d 3e 75 6e 6c 6f 63 6b | kages,.true)).{.$request->unlock |
7b340 | 50 61 63 6b 61 67 65 28 24 6c 6f 63 6b 65 64 50 61 63 6b 61 67 65 29 3b 0a 24 74 68 69 73 2d 3e | Package($lockedPackage);.$this-> |
7b360 | 72 65 6d 6f 76 65 4c 6f 61 64 65 64 50 61 63 6b 61 67 65 28 24 72 65 71 75 65 73 74 2c 20 24 72 | removeLoadedPackage($request,.$r |
7b380 | 65 70 6f 73 69 74 6f 72 69 65 73 2c 20 24 6c 6f 63 6b 65 64 50 61 63 6b 61 67 65 2c 20 24 69 6e | epositories,.$lockedPackage,.$in |
7b3a0 | 64 65 78 29 3b 0a 0a 0a 0a 0a 66 6f 72 65 61 63 68 20 28 24 72 65 71 75 65 73 74 2d 3e 67 65 74 | dex);.....foreach.($request->get |
7b3c0 | 46 69 78 65 64 4f 72 4c 6f 63 6b 65 64 50 61 63 6b 61 67 65 73 28 29 20 61 73 20 24 66 69 78 65 | FixedOrLockedPackages().as.$fixe |
7b3e0 | 64 4f 72 4c 6f 63 6b 65 64 50 61 63 6b 61 67 65 29 20 7b 0a 69 66 20 28 24 66 69 78 65 64 4f 72 | dOrLockedPackage).{.if.($fixedOr |
7b400 | 4c 6f 63 6b 65 64 50 61 63 6b 61 67 65 20 3d 3d 3d 20 24 6c 6f 63 6b 65 64 50 61 63 6b 61 67 65 | LockedPackage.===.$lockedPackage |
7b420 | 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 69 66 20 28 69 73 73 65 74 28 24 74 68 69 73 | ).{.continue;.}..if.(isset($this |
7b440 | 2d 3e 73 6b 69 70 70 65 64 4c 6f 61 64 5b 24 66 69 78 65 64 4f 72 4c 6f 63 6b 65 64 50 61 63 6b | ->skippedLoad[$fixedOrLockedPack |
7b460 | 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 29 29 20 7b 0a 24 72 65 71 75 69 72 65 73 20 3d 20 | age->getName()])).{.$requires.=. |
7b480 | 24 66 69 78 65 64 4f 72 4c 6f 63 6b 65 64 50 61 63 6b 61 67 65 2d 3e 67 65 74 52 65 71 75 69 72 | $fixedOrLockedPackage->getRequir |
7b4a0 | 65 73 28 29 3b 0a 69 66 20 28 69 73 73 65 74 28 24 72 65 71 75 69 72 65 73 5b 24 6c 6f 63 6b 65 | es();.if.(isset($requires[$locke |
7b4c0 | 64 50 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e | dPackage->getName()])).{.$this-> |
7b4e0 | 6d 61 72 6b 50 61 63 6b 61 67 65 4e 61 6d 65 46 6f 72 4c 6f 61 64 69 6e 67 28 24 72 65 71 75 65 | markPackageNameForLoading($reque |
7b500 | 73 74 2c 20 24 6c 6f 63 6b 65 64 50 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 2c 20 24 | st,.$lockedPackage->getName(),.$ |
7b520 | 72 65 71 75 69 72 65 73 5b 24 6c 6f 63 6b 65 64 50 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 | requires[$lockedPackage->getName |
7b540 | 28 29 5d 2d 3e 67 65 74 43 6f 6e 73 74 72 61 69 6e 74 28 29 29 3b 0a 7d 0a 7d 0a 7d 0a 7d 0a 7d | ()]->getConstraint());.}.}.}.}.} |
7b560 | 0a 7d 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 72 65 6d 6f 76 65 | .}.}.....private.function.remove |
7b580 | 4c 6f 61 64 65 64 50 61 63 6b 61 67 65 28 52 65 71 75 65 73 74 20 24 72 65 71 75 65 73 74 2c 20 | LoadedPackage(Request.$request,. |
7b5a0 | 61 72 72 61 79 20 24 72 65 70 6f 73 69 74 6f 72 69 65 73 2c 20 42 61 73 65 50 61 63 6b 61 67 65 | array.$repositories,.BasePackage |
7b5c0 | 20 24 70 61 63 6b 61 67 65 2c 20 69 6e 74 20 24 69 6e 64 65 78 29 3a 20 76 6f 69 64 0a 7b 0a 24 | .$package,.int.$index):.void.{.$ |
7b5e0 | 72 65 70 6f 49 6e 64 65 78 20 3d 20 61 72 72 61 79 5f 73 65 61 72 63 68 28 24 70 61 63 6b 61 67 | repoIndex.=.array_search($packag |
7b600 | 65 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 79 28 29 2c 20 24 72 65 70 6f 73 69 74 6f 72 69 65 | e->getRepository(),.$repositorie |
7b620 | 73 2c 20 74 72 75 65 29 3b 0a 0a 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 6c 6f 61 64 65 64 50 65 | s,.true);..unset($this->loadedPe |
7b640 | 72 52 65 70 6f 5b 24 72 65 70 6f 49 6e 64 65 78 5d 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e | rRepo[$repoIndex][$package->getN |
7b660 | 61 6d 65 28 29 5d 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 5d 29 3b | ame()][$package->getVersion()]); |
7b680 | 0a 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 73 5b 24 69 6e 64 65 78 5d 29 3b | .unset($this->packages[$index]); |
7b6a0 | 0a 69 66 20 28 69 73 73 65 74 28 24 74 68 69 73 2d 3e 61 6c 69 61 73 4d 61 70 5b 73 70 6c 5f 6f | .if.(isset($this->aliasMap[spl_o |
7b6c0 | 62 6a 65 63 74 5f 68 61 73 68 28 24 70 61 63 6b 61 67 65 29 5d 29 29 20 7b 0a 66 6f 72 65 61 63 | bject_hash($package)])).{.foreac |
7b6e0 | 68 20 28 24 74 68 69 73 2d 3e 61 6c 69 61 73 4d 61 70 5b 73 70 6c 5f 6f 62 6a 65 63 74 5f 68 61 | h.($this->aliasMap[spl_object_ha |
7b700 | 73 68 28 24 70 61 63 6b 61 67 65 29 5d 20 61 73 20 24 61 6c 69 61 73 49 6e 64 65 78 20 3d 3e 20 | sh($package)].as.$aliasIndex.=>. |
7b720 | 24 61 6c 69 61 73 50 61 63 6b 61 67 65 29 20 7b 0a 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 6c 6f | $aliasPackage).{.unset($this->lo |
7b740 | 61 64 65 64 50 65 72 52 65 70 6f 5b 24 72 65 70 6f 49 6e 64 65 78 5d 5b 24 61 6c 69 61 73 50 61 | adedPerRepo[$repoIndex][$aliasPa |
7b760 | 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 5b 24 61 6c 69 61 73 50 61 63 6b 61 67 65 2d | ckage->getName()][$aliasPackage- |
7b780 | 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 5d 29 3b 0a 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 70 61 | >getVersion()]);.unset($this->pa |
7b7a0 | 63 6b 61 67 65 73 5b 24 61 6c 69 61 73 49 6e 64 65 78 5d 29 3b 0a 7d 0a 75 6e 73 65 74 28 24 74 | ckages[$aliasIndex]);.}.unset($t |
7b7c0 | 68 69 73 2d 3e 61 6c 69 61 73 4d 61 70 5b 73 70 6c 5f 6f 62 6a 65 63 74 5f 68 61 73 68 28 24 70 | his->aliasMap[spl_object_hash($p |
7b7e0 | 61 63 6b 61 67 65 29 5d 29 3b 0a 7d 0a 7d 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e | ackage)]);.}.}..private.function |
7b800 | 20 72 75 6e 4f 70 74 69 6d 69 7a 65 72 28 52 65 71 75 65 73 74 20 24 72 65 71 75 65 73 74 2c 20 | .runOptimizer(Request.$request,. |
7b820 | 50 6f 6f 6c 20 24 70 6f 6f 6c 29 3a 20 50 6f 6f 6c 0a 7b 0a 69 66 20 28 6e 75 6c 6c 20 3d 3d 3d | Pool.$pool):.Pool.{.if.(null.=== |
7b840 | 20 24 74 68 69 73 2d 3e 70 6f 6f 6c 4f 70 74 69 6d 69 7a 65 72 29 20 7b 0a 72 65 74 75 72 6e 20 | .$this->poolOptimizer).{.return. |
7b860 | 24 70 6f 6f 6c 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 64 65 62 75 67 28 27 52 75 6e 6e | $pool;.}..$this->io->debug('Runn |
7b880 | 69 6e 67 20 70 6f 6f 6c 20 6f 70 74 69 6d 69 7a 65 72 2e 27 29 3b 0a 0a 24 62 65 66 6f 72 65 20 | ing.pool.optimizer.');..$before. |
7b8a0 | 3d 20 6d 69 63 72 6f 74 69 6d 65 28 74 72 75 65 29 3b 0a 24 74 6f 74 61 6c 20 3d 20 5c 63 6f 75 | =.microtime(true);.$total.=.\cou |
7b8c0 | 6e 74 28 24 70 6f 6f 6c 2d 3e 67 65 74 50 61 63 6b 61 67 65 73 28 29 29 3b 0a 0a 24 70 6f 6f 6c | nt($pool->getPackages());..$pool |
7b8e0 | 20 3d 20 24 74 68 69 73 2d 3e 70 6f 6f 6c 4f 70 74 69 6d 69 7a 65 72 2d 3e 6f 70 74 69 6d 69 7a | .=.$this->poolOptimizer->optimiz |
7b900 | 65 28 24 72 65 71 75 65 73 74 2c 20 24 70 6f 6f 6c 29 3b 0a 0a 24 66 69 6c 74 65 72 65 64 20 3d | e($request,.$pool);..$filtered.= |
7b920 | 20 24 74 6f 74 61 6c 20 2d 20 5c 63 6f 75 6e 74 28 24 70 6f 6f 6c 2d 3e 67 65 74 50 61 63 6b 61 | .$total.-.\count($pool->getPacka |
7b940 | 67 65 73 28 29 29 3b 0a 0a 69 66 20 28 30 20 3d 3d 3d 20 24 66 69 6c 74 65 72 65 64 29 20 7b 0a | ges());..if.(0.===.$filtered).{. |
7b960 | 72 65 74 75 72 6e 20 24 70 6f 6f 6c 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 | return.$pool;.}..$this->io->writ |
7b980 | 65 28 73 70 72 69 6e 74 66 28 27 50 6f 6f 6c 20 6f 70 74 69 6d 69 7a 65 72 20 63 6f 6d 70 6c 65 | e(sprintf('Pool.optimizer.comple |
7b9a0 | 74 65 64 20 69 6e 20 25 2e 33 66 20 73 65 63 6f 6e 64 73 27 2c 20 6d 69 63 72 6f 74 69 6d 65 28 | ted.in.%.3f.seconds',.microtime( |
7b9c0 | 74 72 75 65 29 20 2d 20 24 62 65 66 6f 72 65 29 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 | true).-.$before),.true,.IOInterf |
7b9e0 | 61 63 65 3a 3a 56 45 52 59 5f 56 45 52 42 4f 53 45 29 3b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 | ace::VERY_VERBOSE);.$this->io->w |
7ba00 | 72 69 74 65 28 73 70 72 69 6e 74 66 28 0a 27 3c 69 6e 66 6f 3e 46 6f 75 6e 64 20 25 73 20 70 61 | rite(sprintf(.'<info>Found.%s.pa |
7ba20 | 63 6b 61 67 65 20 76 65 72 73 69 6f 6e 73 20 72 65 66 65 72 65 6e 63 65 64 20 69 6e 20 79 6f 75 | ckage.versions.referenced.in.you |
7ba40 | 72 20 64 65 70 65 6e 64 65 6e 63 79 20 67 72 61 70 68 2e 20 25 73 20 28 25 64 25 25 29 20 77 65 | r.dependency.graph..%s.(%d%%).we |
7ba60 | 72 65 20 6f 70 74 69 6d 69 7a 65 64 20 61 77 61 79 2e 3c 2f 69 6e 66 6f 3e 27 2c 0a 6e 75 6d 62 | re.optimized.away.</info>',.numb |
7ba80 | 65 72 5f 66 6f 72 6d 61 74 28 24 74 6f 74 61 6c 29 2c 0a 6e 75 6d 62 65 72 5f 66 6f 72 6d 61 74 | er_format($total),.number_format |
7baa0 | 28 24 66 69 6c 74 65 72 65 64 29 2c 0a 72 6f 75 6e 64 28 31 30 30 20 2f 20 24 74 6f 74 61 6c 20 | ($filtered),.round(100./.$total. |
7bac0 | 2a 20 24 66 69 6c 74 65 72 65 64 29 0a 29 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 61 63 | *.$filtered).),.true,.IOInterfac |
7bae0 | 65 3a 3a 56 45 52 59 5f 56 45 52 42 4f 53 45 29 3b 0a 0a 72 65 74 75 72 6e 20 24 70 6f 6f 6c 3b | e::VERY_VERBOSE);..return.$pool; |
7bb00 | 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d | .}.}.<?php.declare(strict_types= |
7bb20 | 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 | 1);............namespace.Compose |
7bb40 | 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f | r\DependencyResolver;..use.Compo |
7bb60 | 73 65 72 5c 50 61 63 6b 61 67 65 5c 41 6c 69 61 73 50 61 63 6b 61 67 65 3b 0a 75 73 65 20 43 6f | ser\Package\AliasPackage;.use.Co |
7bb80 | 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 42 61 73 65 50 61 63 6b 61 67 65 3b 0a 75 73 65 20 | mposer\Package\BasePackage;.use. |
7bba0 | 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 56 65 72 73 69 6f 6e 5c 56 65 72 73 69 6f 6e | Composer\Package\Version\Version |
7bbc0 | 50 61 72 73 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 65 6d 76 65 72 5c 43 6f 6d 70 | Parser;.use.Composer\Semver\Comp |
7bbe0 | 69 6c 69 6e 67 4d 61 74 63 68 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 65 6d 76 65 | ilingMatcher;.use.Composer\Semve |
7bc00 | 72 5c 43 6f 6e 73 74 72 61 69 6e 74 5c 43 6f 6e 73 74 72 61 69 6e 74 49 6e 74 65 72 66 61 63 65 | r\Constraint\ConstraintInterface |
7bc20 | 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 65 6d 76 65 72 5c 43 6f 6e 73 74 72 61 69 6e 74 | ;.use.Composer\Semver\Constraint |
7bc40 | 5c 43 6f 6e 73 74 72 61 69 6e 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 65 6d 76 65 72 | \Constraint;.use.Composer\Semver |
7bc60 | 5c 43 6f 6e 73 74 72 61 69 6e 74 5c 4d 75 6c 74 69 43 6f 6e 73 74 72 61 69 6e 74 3b 0a 75 73 65 | \Constraint\MultiConstraint;.use |
7bc80 | 20 43 6f 6d 70 6f 73 65 72 5c 53 65 6d 76 65 72 5c 49 6e 74 65 72 76 61 6c 73 3b 0a 0a 0a 0a 0a | .Composer\Semver\Intervals;..... |
7bca0 | 0a 0a 63 6c 61 73 73 20 50 6f 6f 6c 4f 70 74 69 6d 69 7a 65 72 0a 7b 0a 0a 0a 0a 70 72 69 76 61 | ..class.PoolOptimizer.{....priva |
7bcc0 | 74 65 20 24 70 6f 6c 69 63 79 3b 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 69 72 72 65 6d 6f 76 | te.$policy;.....private.$irremov |
7bce0 | 61 62 6c 65 50 61 63 6b 61 67 65 73 20 3d 20 5b 5d 3b 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 | ablePackages.=.[];.....private.$ |
7bd00 | 72 65 71 75 69 72 65 43 6f 6e 73 74 72 61 69 6e 74 73 50 65 72 50 61 63 6b 61 67 65 20 3d 20 5b | requireConstraintsPerPackage.=.[ |
7bd20 | 5d 3b 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 63 6f 6e 66 6c 69 63 74 43 6f 6e 73 74 72 61 69 | ];.....private.$conflictConstrai |
7bd40 | 6e 74 73 50 65 72 50 61 63 6b 61 67 65 20 3d 20 5b 5d 3b 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 | ntsPerPackage.=.[];.....private. |
7bd60 | 24 70 61 63 6b 61 67 65 73 54 6f 52 65 6d 6f 76 65 20 3d 20 5b 5d 3b 0a 0a 0a 0a 0a 70 72 69 76 | $packagesToRemove.=.[];.....priv |
7bd80 | 61 74 65 20 24 61 6c 69 61 73 65 73 50 65 72 50 61 63 6b 61 67 65 20 3d 20 5b 5d 3b 0a 0a 0a 0a | ate.$aliasesPerPackage.=.[];.... |
7bda0 | 0a 70 72 69 76 61 74 65 20 24 72 65 6d 6f 76 65 64 56 65 72 73 69 6f 6e 73 42 79 50 61 63 6b 61 | .private.$removedVersionsByPacka |
7bdc0 | 67 65 20 3d 20 5b 5d 3b 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 | ge.=.[];..public.function.__cons |
7bde0 | 74 72 75 63 74 28 50 6f 6c 69 63 79 49 6e 74 65 72 66 61 63 65 20 24 70 6f 6c 69 63 79 29 0a 7b | truct(PolicyInterface.$policy).{ |
7be00 | 0a 24 74 68 69 73 2d 3e 70 6f 6c 69 63 79 20 3d 20 24 70 6f 6c 69 63 79 3b 0a 7d 0a 0a 70 75 62 | .$this->policy.=.$policy;.}..pub |
7be20 | 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 6f 70 74 69 6d 69 7a 65 28 52 65 71 75 65 73 74 20 24 72 | lic.function.optimize(Request.$r |
7be40 | 65 71 75 65 73 74 2c 20 50 6f 6f 6c 20 24 70 6f 6f 6c 29 3a 20 50 6f 6f 6c 0a 7b 0a 24 74 68 69 | equest,.Pool.$pool):.Pool.{.$thi |
7be60 | 73 2d 3e 70 72 65 70 61 72 65 28 24 72 65 71 75 65 73 74 2c 20 24 70 6f 6f 6c 29 3b 0a 0a 24 74 | s->prepare($request,.$pool);..$t |
7be80 | 68 69 73 2d 3e 6f 70 74 69 6d 69 7a 65 42 79 49 64 65 6e 74 69 63 61 6c 44 65 70 65 6e 64 65 6e | his->optimizeByIdenticalDependen |
7bea0 | 63 69 65 73 28 24 72 65 71 75 65 73 74 2c 20 24 70 6f 6f 6c 29 3b 0a 0a 24 74 68 69 73 2d 3e 6f | cies($request,.$pool);..$this->o |
7bec0 | 70 74 69 6d 69 7a 65 49 6d 70 6f 73 73 69 62 6c 65 50 61 63 6b 61 67 65 73 41 77 61 79 28 24 72 | ptimizeImpossiblePackagesAway($r |
7bee0 | 65 71 75 65 73 74 2c 20 24 70 6f 6f 6c 29 3b 0a 0a 24 6f 70 74 69 6d 69 7a 65 64 50 6f 6f 6c 20 | equest,.$pool);..$optimizedPool. |
7bf00 | 3d 20 24 74 68 69 73 2d 3e 61 70 70 6c 79 52 65 6d 6f 76 61 6c 73 54 6f 50 6f 6f 6c 28 24 70 6f | =.$this->applyRemovalsToPool($po |
7bf20 | 6f 6c 29 3b 0a 0a 0a 0a 0a 0a 0a 24 74 68 69 73 2d 3e 69 72 72 65 6d 6f 76 61 62 6c 65 50 61 63 | ol);.......$this->irremovablePac |
7bf40 | 6b 61 67 65 73 20 3d 20 5b 5d 3b 0a 24 74 68 69 73 2d 3e 72 65 71 75 69 72 65 43 6f 6e 73 74 72 | kages.=.[];.$this->requireConstr |
7bf60 | 61 69 6e 74 73 50 65 72 50 61 63 6b 61 67 65 20 3d 20 5b 5d 3b 0a 24 74 68 69 73 2d 3e 63 6f 6e | aintsPerPackage.=.[];.$this->con |
7bf80 | 66 6c 69 63 74 43 6f 6e 73 74 72 61 69 6e 74 73 50 65 72 50 61 63 6b 61 67 65 20 3d 20 5b 5d 3b | flictConstraintsPerPackage.=.[]; |
7bfa0 | 0a 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 73 54 6f 52 65 6d 6f 76 65 20 3d 20 5b 5d 3b 0a 24 | .$this->packagesToRemove.=.[];.$ |
7bfc0 | 74 68 69 73 2d 3e 61 6c 69 61 73 65 73 50 65 72 50 61 63 6b 61 67 65 20 3d 20 5b 5d 3b 0a 24 74 | this->aliasesPerPackage.=.[];.$t |
7bfe0 | 68 69 73 2d 3e 72 65 6d 6f 76 65 64 56 65 72 73 69 6f 6e 73 42 79 50 61 63 6b 61 67 65 20 3d 20 | his->removedVersionsByPackage.=. |
7c000 | 5b 5d 3b 0a 0a 72 65 74 75 72 6e 20 24 6f 70 74 69 6d 69 7a 65 64 50 6f 6f 6c 3b 0a 7d 0a 0a 70 | [];..return.$optimizedPool;.}..p |
7c020 | 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 70 72 65 70 61 72 65 28 52 65 71 75 65 73 74 20 | rivate.function.prepare(Request. |
7c040 | 24 72 65 71 75 65 73 74 2c 20 50 6f 6f 6c 20 24 70 6f 6f 6c 29 3a 20 76 6f 69 64 0a 7b 0a 24 69 | $request,.Pool.$pool):.void.{.$i |
7c060 | 72 72 65 6d 6f 76 61 62 6c 65 50 61 63 6b 61 67 65 43 6f 6e 73 74 72 61 69 6e 74 47 72 6f 75 70 | rremovablePackageConstraintGroup |
7c080 | 73 20 3d 20 5b 5d 3b 0a 0a 0a 66 6f 72 65 61 63 68 20 28 24 72 65 71 75 65 73 74 2d 3e 67 65 74 | s.=.[];...foreach.($request->get |
7c0a0 | 46 69 78 65 64 4f 72 4c 6f 63 6b 65 64 50 61 63 6b 61 67 65 73 28 29 20 61 73 20 24 70 61 63 6b | FixedOrLockedPackages().as.$pack |
7c0c0 | 61 67 65 29 20 7b 0a 24 69 72 72 65 6d 6f 76 61 62 6c 65 50 61 63 6b 61 67 65 43 6f 6e 73 74 72 | age).{.$irremovablePackageConstr |
7c0e0 | 61 69 6e 74 47 72 6f 75 70 73 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 5b | aintGroups[$package->getName()][ |
7c100 | 5d 20 3d 20 6e 65 77 20 43 6f 6e 73 74 72 61 69 6e 74 28 27 3d 3d 27 2c 20 24 70 61 63 6b 61 67 | ].=.new.Constraint('==',.$packag |
7c120 | 65 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 29 3b 0a 7d 0a 0a 0a 66 6f 72 65 61 63 68 20 28 24 | e->getVersion());.}...foreach.($ |
7c140 | 72 65 71 75 65 73 74 2d 3e 67 65 74 52 65 71 75 69 72 65 73 28 29 20 61 73 20 24 72 65 71 75 69 | request->getRequires().as.$requi |
7c160 | 72 65 20 3d 3e 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 20 7b 0a 24 74 68 69 73 2d 3e 65 78 74 72 | re.=>.$constraint).{.$this->extr |
7c180 | 61 63 74 52 65 71 75 69 72 65 43 6f 6e 73 74 72 61 69 6e 74 73 50 65 72 50 61 63 6b 61 67 65 28 | actRequireConstraintsPerPackage( |
7c1a0 | 24 72 65 71 75 69 72 65 2c 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 3b 0a 7d 0a 0a 0a 66 6f 72 65 | $require,.$constraint);.}...fore |
7c1c0 | 61 63 68 20 28 24 70 6f 6f 6c 2d 3e 67 65 74 50 61 63 6b 61 67 65 73 28 29 20 61 73 20 24 70 61 | ach.($pool->getPackages().as.$pa |
7c1e0 | 63 6b 61 67 65 29 20 7b 0a 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 | ckage).{..foreach.($package->get |
7c200 | 52 65 71 75 69 72 65 73 28 29 20 61 73 20 24 6c 69 6e 6b 29 20 7b 0a 24 74 68 69 73 2d 3e 65 78 | Requires().as.$link).{.$this->ex |
7c220 | 74 72 61 63 74 52 65 71 75 69 72 65 43 6f 6e 73 74 72 61 69 6e 74 73 50 65 72 50 61 63 6b 61 67 | tractRequireConstraintsPerPackag |
7c240 | 65 28 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 74 28 29 2c 20 24 6c 69 6e 6b 2d 3e 67 65 74 | e($link->getTarget(),.$link->get |
7c260 | 43 6f 6e 73 74 72 61 69 6e 74 28 29 29 3b 0a 7d 0a 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b | Constraint());.}..foreach.($pack |
7c280 | 61 67 65 2d 3e 67 65 74 43 6f 6e 66 6c 69 63 74 73 28 29 20 61 73 20 24 6c 69 6e 6b 29 20 7b 0a | age->getConflicts().as.$link).{. |
7c2a0 | 24 74 68 69 73 2d 3e 65 78 74 72 61 63 74 43 6f 6e 66 6c 69 63 74 43 6f 6e 73 74 72 61 69 6e 74 | $this->extractConflictConstraint |
7c2c0 | 73 50 65 72 50 61 63 6b 61 67 65 28 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 74 28 29 2c 20 | sPerPackage($link->getTarget(),. |
7c2e0 | 24 6c 69 6e 6b 2d 3e 67 65 74 43 6f 6e 73 74 72 61 69 6e 74 28 29 29 3b 0a 7d 0a 0a 0a 0a 69 66 | $link->getConstraint());.}....if |
7c300 | 20 28 24 70 61 63 6b 61 67 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 41 6c 69 61 73 50 61 63 6b 61 | .($package.instanceof.AliasPacka |
7c320 | 67 65 29 20 7b 0a 24 74 68 69 73 2d 3e 61 6c 69 61 73 65 73 50 65 72 50 61 63 6b 61 67 65 5b 24 | ge).{.$this->aliasesPerPackage[$ |
7c340 | 70 61 63 6b 61 67 65 2d 3e 67 65 74 41 6c 69 61 73 4f 66 28 29 2d 3e 69 64 5d 5b 5d 20 3d 20 24 | package->getAliasOf()->id][].=.$ |
7c360 | 70 61 63 6b 61 67 65 3b 0a 7d 0a 7d 0a 0a 24 69 72 72 65 6d 6f 76 61 62 6c 65 50 61 63 6b 61 67 | package;.}.}..$irremovablePackag |
7c380 | 65 43 6f 6e 73 74 72 61 69 6e 74 73 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 69 72 72 | eConstraints.=.[];.foreach.($irr |
7c3a0 | 65 6d 6f 76 61 62 6c 65 50 61 63 6b 61 67 65 43 6f 6e 73 74 72 61 69 6e 74 47 72 6f 75 70 73 20 | emovablePackageConstraintGroups. |
7c3c0 | 61 73 20 24 70 61 63 6b 61 67 65 4e 61 6d 65 20 3d 3e 20 24 63 6f 6e 73 74 72 61 69 6e 74 73 29 | as.$packageName.=>.$constraints) |
7c3e0 | 20 7b 0a 24 69 72 72 65 6d 6f 76 61 62 6c 65 50 61 63 6b 61 67 65 43 6f 6e 73 74 72 61 69 6e 74 | .{.$irremovablePackageConstraint |
7c400 | 73 5b 24 70 61 63 6b 61 67 65 4e 61 6d 65 5d 20 3d 20 31 20 3d 3d 3d 20 5c 63 6f 75 6e 74 28 24 | s[$packageName].=.1.===.\count($ |
7c420 | 63 6f 6e 73 74 72 61 69 6e 74 73 29 20 3f 20 24 63 6f 6e 73 74 72 61 69 6e 74 73 5b 30 5d 20 3a | constraints).?.$constraints[0].: |
7c440 | 20 6e 65 77 20 4d 75 6c 74 69 43 6f 6e 73 74 72 61 69 6e 74 28 24 63 6f 6e 73 74 72 61 69 6e 74 | .new.MultiConstraint($constraint |
7c460 | 73 2c 20 66 61 6c 73 65 29 3b 0a 7d 0a 75 6e 73 65 74 28 24 69 72 72 65 6d 6f 76 61 62 6c 65 50 | s,.false);.}.unset($irremovableP |
7c480 | 61 63 6b 61 67 65 43 6f 6e 73 74 72 61 69 6e 74 47 72 6f 75 70 73 29 3b 0a 0a 0a 66 6f 72 65 61 | ackageConstraintGroups);...forea |
7c4a0 | 63 68 20 28 24 70 6f 6f 6c 2d 3e 67 65 74 50 61 63 6b 61 67 65 73 28 29 20 61 73 20 24 70 61 63 | ch.($pool->getPackages().as.$pac |
7c4c0 | 6b 61 67 65 29 20 7b 0a 69 66 20 28 21 69 73 73 65 74 28 24 69 72 72 65 6d 6f 76 61 62 6c 65 50 | kage).{.if.(!isset($irremovableP |
7c4e0 | 61 63 6b 61 67 65 43 6f 6e 73 74 72 61 69 6e 74 73 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e | ackageConstraints[$package->getN |
7c500 | 61 6d 65 28 29 5d 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 69 66 20 28 43 6f 6d 70 | ame()])).{.continue;.}..if.(Comp |
7c520 | 69 6c 69 6e 67 4d 61 74 63 68 65 72 3a 3a 6d 61 74 63 68 28 24 69 72 72 65 6d 6f 76 61 62 6c 65 | ilingMatcher::match($irremovable |
7c540 | 50 61 63 6b 61 67 65 43 6f 6e 73 74 72 61 69 6e 74 73 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 | PackageConstraints[$package->get |
7c560 | 4e 61 6d 65 28 29 5d 2c 20 43 6f 6e 73 74 72 61 69 6e 74 3a 3a 4f 50 5f 45 51 2c 20 24 70 61 63 | Name()],.Constraint::OP_EQ,.$pac |
7c580 | 6b 61 67 65 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 29 29 20 7b 0a 24 74 68 69 73 2d 3e 6d 61 | kage->getVersion())).{.$this->ma |
7c5a0 | 72 6b 50 61 63 6b 61 67 65 49 72 72 65 6d 6f 76 61 62 6c 65 28 24 70 61 63 6b 61 67 65 29 3b 0a | rkPackageIrremovable($package);. |
7c5c0 | 7d 0a 7d 0a 7d 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 6d 61 72 6b 50 61 63 6b | }.}.}..private.function.markPack |
7c5e0 | 61 67 65 49 72 72 65 6d 6f 76 61 62 6c 65 28 42 61 73 65 50 61 63 6b 61 67 65 20 24 70 61 63 6b | ageIrremovable(BasePackage.$pack |
7c600 | 61 67 65 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 69 72 72 65 6d 6f 76 61 62 6c 65 50 | age):.void.{.$this->irremovableP |
7c620 | 61 63 6b 61 67 65 73 5b 24 70 61 63 6b 61 67 65 2d 3e 69 64 5d 20 3d 20 74 72 75 65 3b 0a 69 66 | ackages[$package->id].=.true;.if |
7c640 | 20 28 24 70 61 63 6b 61 67 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 41 6c 69 61 73 50 61 63 6b 61 | .($package.instanceof.AliasPacka |
7c660 | 67 65 29 20 7b 0a 0a 0a 24 74 68 69 73 2d 3e 6d 61 72 6b 50 61 63 6b 61 67 65 49 72 72 65 6d 6f | ge).{...$this->markPackageIrremo |
7c680 | 76 61 62 6c 65 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 41 6c 69 61 73 4f 66 28 29 29 3b 0a 7d | vable($package->getAliasOf());.} |
7c6a0 | 0a 69 66 20 28 69 73 73 65 74 28 24 74 68 69 73 2d 3e 61 6c 69 61 73 65 73 50 65 72 50 61 63 6b | .if.(isset($this->aliasesPerPack |
7c6c0 | 61 67 65 5b 24 70 61 63 6b 61 67 65 2d 3e 69 64 5d 29 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 | age[$package->id])).{.foreach.($ |
7c6e0 | 74 68 69 73 2d 3e 61 6c 69 61 73 65 73 50 65 72 50 61 63 6b 61 67 65 5b 24 70 61 63 6b 61 67 65 | this->aliasesPerPackage[$package |
7c700 | 2d 3e 69 64 5d 20 61 73 20 24 61 6c 69 61 73 50 61 63 6b 61 67 65 29 20 7b 0a 24 74 68 69 73 2d | ->id].as.$aliasPackage).{.$this- |
7c720 | 3e 69 72 72 65 6d 6f 76 61 62 6c 65 50 61 63 6b 61 67 65 73 5b 24 61 6c 69 61 73 50 61 63 6b 61 | >irremovablePackages[$aliasPacka |
7c740 | 67 65 2d 3e 69 64 5d 20 3d 20 74 72 75 65 3b 0a 7d 0a 7d 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 | ge->id].=.true;.}.}.}.....privat |
7c760 | 65 20 66 75 6e 63 74 69 6f 6e 20 61 70 70 6c 79 52 65 6d 6f 76 61 6c 73 54 6f 50 6f 6f 6c 28 50 | e.function.applyRemovalsToPool(P |
7c780 | 6f 6f 6c 20 24 70 6f 6f 6c 29 3a 20 50 6f 6f 6c 0a 7b 0a 24 70 61 63 6b 61 67 65 73 20 3d 20 5b | ool.$pool):.Pool.{.$packages.=.[ |
7c7a0 | 5d 3b 0a 24 72 65 6d 6f 76 65 64 56 65 72 73 69 6f 6e 73 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 | ];.$removedVersions.=.[];.foreac |
7c7c0 | 68 20 28 24 70 6f 6f 6c 2d 3e 67 65 74 50 61 63 6b 61 67 65 73 28 29 20 61 73 20 24 70 61 63 6b | h.($pool->getPackages().as.$pack |
7c7e0 | 61 67 65 29 20 7b 0a 69 66 20 28 21 69 73 73 65 74 28 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 | age).{.if.(!isset($this->package |
7c800 | 73 54 6f 52 65 6d 6f 76 65 5b 24 70 61 63 6b 61 67 65 2d 3e 69 64 5d 29 29 20 7b 0a 24 70 61 63 | sToRemove[$package->id])).{.$pac |
7c820 | 6b 61 67 65 73 5b 5d 20 3d 20 24 70 61 63 6b 61 67 65 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 72 65 | kages[].=.$package;.}.else.{.$re |
7c840 | 6d 6f 76 65 64 56 65 72 73 69 6f 6e 73 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 | movedVersions[$package->getName( |
7c860 | 29 5d 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 5d 20 3d 20 24 70 61 | )][$package->getVersion()].=.$pa |
7c880 | 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 3b 0a 7d 0a 7d 0a 0a | ckage->getPrettyVersion();.}.}.. |
7c8a0 | 24 6f 70 74 69 6d 69 7a 65 64 50 6f 6f 6c 20 3d 20 6e 65 77 20 50 6f 6f 6c 28 24 70 61 63 6b 61 | $optimizedPool.=.new.Pool($packa |
7c8c0 | 67 65 73 2c 20 24 70 6f 6f 6c 2d 3e 67 65 74 55 6e 61 63 63 65 70 74 61 62 6c 65 46 69 78 65 64 | ges,.$pool->getUnacceptableFixed |
7c8e0 | 4f 72 4c 6f 63 6b 65 64 50 61 63 6b 61 67 65 73 28 29 2c 20 24 72 65 6d 6f 76 65 64 56 65 72 73 | OrLockedPackages(),.$removedVers |
7c900 | 69 6f 6e 73 2c 20 24 74 68 69 73 2d 3e 72 65 6d 6f 76 65 64 56 65 72 73 69 6f 6e 73 42 79 50 61 | ions,.$this->removedVersionsByPa |
7c920 | 63 6b 61 67 65 29 3b 0a 0a 72 65 74 75 72 6e 20 24 6f 70 74 69 6d 69 7a 65 64 50 6f 6f 6c 3b 0a | ckage);..return.$optimizedPool;. |
7c940 | 7d 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 6f 70 74 69 6d 69 7a 65 42 79 49 64 | }..private.function.optimizeById |
7c960 | 65 6e 74 69 63 61 6c 44 65 70 65 6e 64 65 6e 63 69 65 73 28 52 65 71 75 65 73 74 20 24 72 65 71 | enticalDependencies(Request.$req |
7c980 | 75 65 73 74 2c 20 50 6f 6f 6c 20 24 70 6f 6f 6c 29 3a 20 76 6f 69 64 0a 7b 0a 24 69 64 65 6e 74 | uest,.Pool.$pool):.void.{.$ident |
7c9a0 | 69 63 61 6c 44 65 66 69 6e 69 74 69 6f 6e 73 50 65 72 50 61 63 6b 61 67 65 20 3d 20 5b 5d 3b 0a | icalDefinitionsPerPackage.=.[];. |
7c9c0 | 24 70 61 63 6b 61 67 65 49 64 65 6e 74 69 63 61 6c 44 65 66 69 6e 69 74 69 6f 6e 4c 6f 6f 6b 75 | $packageIdenticalDefinitionLooku |
7c9e0 | 70 20 3d 20 5b 5d 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 70 6f 6f 6c 2d 3e 67 65 74 50 61 63 6b | p.=.[];..foreach.($pool->getPack |
7ca00 | 61 67 65 73 28 29 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 0a 0a 0a 69 66 20 28 69 73 73 | ages().as.$package).{....if.(iss |
7ca20 | 65 74 28 24 74 68 69 73 2d 3e 69 72 72 65 6d 6f 76 61 62 6c 65 50 61 63 6b 61 67 65 73 5b 24 70 | et($this->irremovablePackages[$p |
7ca40 | 61 63 6b 61 67 65 2d 3e 69 64 5d 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 24 74 68 | ackage->id])).{.continue;.}..$th |
7ca60 | 69 73 2d 3e 6d 61 72 6b 50 61 63 6b 61 67 65 46 6f 72 52 65 6d 6f 76 61 6c 28 24 70 61 63 6b 61 | is->markPackageForRemoval($packa |
7ca80 | 67 65 2d 3e 69 64 29 3b 0a 0a 24 64 65 70 65 6e 64 65 6e 63 79 48 61 73 68 20 3d 20 24 74 68 69 | ge->id);..$dependencyHash.=.$thi |
7caa0 | 73 2d 3e 63 61 6c 63 75 6c 61 74 65 44 65 70 65 6e 64 65 6e 63 79 48 61 73 68 28 24 70 61 63 6b | s->calculateDependencyHash($pack |
7cac0 | 61 67 65 29 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d | age);..foreach.($package->getNam |
7cae0 | 65 73 28 66 61 6c 73 65 29 20 61 73 20 24 70 61 63 6b 61 67 65 4e 61 6d 65 29 20 7b 0a 69 66 20 | es(false).as.$packageName).{.if. |
7cb00 | 28 21 69 73 73 65 74 28 24 74 68 69 73 2d 3e 72 65 71 75 69 72 65 43 6f 6e 73 74 72 61 69 6e 74 | (!isset($this->requireConstraint |
7cb20 | 73 50 65 72 50 61 63 6b 61 67 65 5b 24 70 61 63 6b 61 67 65 4e 61 6d 65 5d 29 29 20 7b 0a 63 6f | sPerPackage[$packageName])).{.co |
7cb40 | 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 72 65 71 75 69 | ntinue;.}..foreach.($this->requi |
7cb60 | 72 65 43 6f 6e 73 74 72 61 69 6e 74 73 50 65 72 50 61 63 6b 61 67 65 5b 24 70 61 63 6b 61 67 65 | reConstraintsPerPackage[$package |
7cb80 | 4e 61 6d 65 5d 20 61 73 20 24 72 65 71 75 69 72 65 43 6f 6e 73 74 72 61 69 6e 74 29 20 7b 0a 24 | Name].as.$requireConstraint).{.$ |
7cba0 | 67 72 6f 75 70 48 61 73 68 50 61 72 74 73 20 3d 20 5b 5d 3b 0a 0a 69 66 20 28 43 6f 6d 70 69 6c | groupHashParts.=.[];..if.(Compil |
7cbc0 | 69 6e 67 4d 61 74 63 68 65 72 3a 3a 6d 61 74 63 68 28 24 72 65 71 75 69 72 65 43 6f 6e 73 74 72 | ingMatcher::match($requireConstr |
7cbe0 | 61 69 6e 74 2c 20 43 6f 6e 73 74 72 61 69 6e 74 3a 3a 4f 50 5f 45 51 2c 20 24 70 61 63 6b 61 67 | aint,.Constraint::OP_EQ,.$packag |
7cc00 | 65 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 29 29 20 7b 0a 24 67 72 6f 75 70 48 61 73 68 50 61 | e->getVersion())).{.$groupHashPa |
7cc20 | 72 74 73 5b 5d 20 3d 20 27 72 65 71 75 69 72 65 3a 27 20 2e 20 28 73 74 72 69 6e 67 29 20 24 72 | rts[].=.'require:'...(string).$r |
7cc40 | 65 71 75 69 72 65 43 6f 6e 73 74 72 61 69 6e 74 3b 0a 7d 0a 0a 69 66 20 28 24 70 61 63 6b 61 67 | equireConstraint;.}..if.($packag |
7cc60 | 65 2d 3e 67 65 74 52 65 70 6c 61 63 65 73 28 29 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 70 61 | e->getReplaces()).{.foreach.($pa |
7cc80 | 63 6b 61 67 65 2d 3e 67 65 74 52 65 70 6c 61 63 65 73 28 29 20 61 73 20 24 6c 69 6e 6b 29 20 7b | ckage->getReplaces().as.$link).{ |
7cca0 | 0a 69 66 20 28 43 6f 6d 70 69 6c 69 6e 67 4d 61 74 63 68 65 72 3a 3a 6d 61 74 63 68 28 24 6c 69 | .if.(CompilingMatcher::match($li |
7ccc0 | 6e 6b 2d 3e 67 65 74 43 6f 6e 73 74 72 61 69 6e 74 28 29 2c 20 43 6f 6e 73 74 72 61 69 6e 74 3a | nk->getConstraint(),.Constraint: |
7cce0 | 3a 4f 50 5f 45 51 2c 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 29 29 | :OP_EQ,.$package->getVersion())) |
7cd00 | 20 7b 0a 0a 24 67 72 6f 75 70 48 61 73 68 50 61 72 74 73 5b 5d 20 3d 20 27 72 65 71 75 69 72 65 | .{..$groupHashParts[].=.'require |
7cd20 | 3a 27 20 2e 20 28 73 74 72 69 6e 67 29 20 24 6c 69 6e 6b 2d 3e 67 65 74 43 6f 6e 73 74 72 61 69 | :'...(string).$link->getConstrai |
7cd40 | 6e 74 28 29 3b 0a 7d 0a 7d 0a 7d 0a 0a 69 66 20 28 69 73 73 65 74 28 24 74 68 69 73 2d 3e 63 6f | nt();.}.}.}..if.(isset($this->co |
7cd60 | 6e 66 6c 69 63 74 43 6f 6e 73 74 72 61 69 6e 74 73 50 65 72 50 61 63 6b 61 67 65 5b 24 70 61 63 | nflictConstraintsPerPackage[$pac |
7cd80 | 6b 61 67 65 4e 61 6d 65 5d 29 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 63 6f | kageName])).{.foreach.($this->co |
7cda0 | 6e 66 6c 69 63 74 43 6f 6e 73 74 72 61 69 6e 74 73 50 65 72 50 61 63 6b 61 67 65 5b 24 70 61 63 | nflictConstraintsPerPackage[$pac |
7cdc0 | 6b 61 67 65 4e 61 6d 65 5d 20 61 73 20 24 63 6f 6e 66 6c 69 63 74 43 6f 6e 73 74 72 61 69 6e 74 | kageName].as.$conflictConstraint |
7cde0 | 29 20 7b 0a 69 66 20 28 43 6f 6d 70 69 6c 69 6e 67 4d 61 74 63 68 65 72 3a 3a 6d 61 74 63 68 28 | ).{.if.(CompilingMatcher::match( |
7ce00 | 24 63 6f 6e 66 6c 69 63 74 43 6f 6e 73 74 72 61 69 6e 74 2c 20 43 6f 6e 73 74 72 61 69 6e 74 3a | $conflictConstraint,.Constraint: |
7ce20 | 3a 4f 50 5f 45 51 2c 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 29 29 | :OP_EQ,.$package->getVersion())) |
7ce40 | 20 7b 0a 24 67 72 6f 75 70 48 61 73 68 50 61 72 74 73 5b 5d 20 3d 20 27 63 6f 6e 66 6c 69 63 74 | .{.$groupHashParts[].=.'conflict |
7ce60 | 3a 27 20 2e 20 28 73 74 72 69 6e 67 29 20 24 63 6f 6e 66 6c 69 63 74 43 6f 6e 73 74 72 61 69 6e | :'...(string).$conflictConstrain |
7ce80 | 74 3b 0a 7d 0a 7d 0a 7d 0a 0a 69 66 20 28 21 24 67 72 6f 75 70 48 61 73 68 50 61 72 74 73 29 20 | t;.}.}.}..if.(!$groupHashParts). |
7cea0 | 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 24 67 72 6f 75 70 48 61 73 68 20 3d 20 69 6d 70 6c | {.continue;.}..$groupHash.=.impl |
7cec0 | 6f 64 65 28 27 27 2c 20 24 67 72 6f 75 70 48 61 73 68 50 61 72 74 73 29 3b 0a 24 69 64 65 6e 74 | ode('',.$groupHashParts);.$ident |
7cee0 | 69 63 61 6c 44 65 66 69 6e 69 74 69 6f 6e 73 50 65 72 50 61 63 6b 61 67 65 5b 24 70 61 63 6b 61 | icalDefinitionsPerPackage[$packa |
7cf00 | 67 65 4e 61 6d 65 5d 5b 24 67 72 6f 75 70 48 61 73 68 5d 5b 24 64 65 70 65 6e 64 65 6e 63 79 48 | geName][$groupHash][$dependencyH |
7cf20 | 61 73 68 5d 5b 5d 20 3d 20 24 70 61 63 6b 61 67 65 3b 0a 24 70 61 63 6b 61 67 65 49 64 65 6e 74 | ash][].=.$package;.$packageIdent |
7cf40 | 69 63 61 6c 44 65 66 69 6e 69 74 69 6f 6e 4c 6f 6f 6b 75 70 5b 24 70 61 63 6b 61 67 65 2d 3e 69 | icalDefinitionLookup[$package->i |
7cf60 | 64 5d 5b 24 70 61 63 6b 61 67 65 4e 61 6d 65 5d 20 3d 20 5b 27 67 72 6f 75 70 48 61 73 68 27 20 | d][$packageName].=.['groupHash'. |
7cf80 | 3d 3e 20 24 67 72 6f 75 70 48 61 73 68 2c 20 27 64 65 70 65 6e 64 65 6e 63 79 48 61 73 68 27 20 | =>.$groupHash,.'dependencyHash'. |
7cfa0 | 3d 3e 20 24 64 65 70 65 6e 64 65 6e 63 79 48 61 73 68 5d 3b 0a 7d 0a 7d 0a 7d 0a 0a 66 6f 72 65 | =>.$dependencyHash];.}.}.}..fore |
7cfc0 | 61 63 68 20 28 24 69 64 65 6e 74 69 63 61 6c 44 65 66 69 6e 69 74 69 6f 6e 73 50 65 72 50 61 63 | ach.($identicalDefinitionsPerPac |
7cfe0 | 6b 61 67 65 20 61 73 20 24 63 6f 6e 73 74 72 61 69 6e 74 47 72 6f 75 70 73 29 20 7b 0a 66 6f 72 | kage.as.$constraintGroups).{.for |
7d000 | 65 61 63 68 20 28 24 63 6f 6e 73 74 72 61 69 6e 74 47 72 6f 75 70 73 20 61 73 20 24 63 6f 6e 73 | each.($constraintGroups.as.$cons |
7d020 | 74 72 61 69 6e 74 47 72 6f 75 70 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 63 6f 6e 73 74 72 61 | traintGroup).{.foreach.($constra |
7d040 | 69 6e 74 47 72 6f 75 70 20 61 73 20 24 70 61 63 6b 61 67 65 73 29 20 7b 0a 0a 69 66 20 28 31 20 | intGroup.as.$packages).{..if.(1. |
7d060 | 3d 3d 3d 20 5c 63 6f 75 6e 74 28 24 70 61 63 6b 61 67 65 73 29 29 20 7b 0a 24 74 68 69 73 2d 3e | ===.\count($packages)).{.$this-> |
7d080 | 6b 65 65 70 50 61 63 6b 61 67 65 28 24 70 61 63 6b 61 67 65 73 5b 30 5d 2c 20 24 69 64 65 6e 74 | keepPackage($packages[0],.$ident |
7d0a0 | 69 63 61 6c 44 65 66 69 6e 69 74 69 6f 6e 73 50 65 72 50 61 63 6b 61 67 65 2c 20 24 70 61 63 6b | icalDefinitionsPerPackage,.$pack |
7d0c0 | 61 67 65 49 64 65 6e 74 69 63 61 6c 44 65 66 69 6e 69 74 69 6f 6e 4c 6f 6f 6b 75 70 29 3b 0a 63 | ageIdenticalDefinitionLookup);.c |
7d0e0 | 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 0a 0a 24 6c 69 74 65 72 61 6c 73 20 3d 20 5b 5d 3b 0a 0a 66 | ontinue;.}....$literals.=.[];..f |
7d100 | 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 73 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b | oreach.($packages.as.$package).{ |
7d120 | 0a 24 6c 69 74 65 72 61 6c 73 5b 5d 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 69 64 3b 0a 7d 0a 0a | .$literals[].=.$package->id;.}.. |
7d140 | 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 70 6f 6c 69 63 79 2d 3e 73 65 6c 65 63 74 50 72 | foreach.($this->policy->selectPr |
7d160 | 65 66 65 72 72 65 64 50 61 63 6b 61 67 65 73 28 24 70 6f 6f 6c 2c 20 24 6c 69 74 65 72 61 6c 73 | eferredPackages($pool,.$literals |
7d180 | 29 20 61 73 20 24 70 72 65 66 65 72 72 65 64 4c 69 74 65 72 61 6c 29 20 7b 0a 24 74 68 69 73 2d | ).as.$preferredLiteral).{.$this- |
7d1a0 | 3e 6b 65 65 70 50 61 63 6b 61 67 65 28 24 70 6f 6f 6c 2d 3e 6c 69 74 65 72 61 6c 54 6f 50 61 63 | >keepPackage($pool->literalToPac |
7d1c0 | 6b 61 67 65 28 24 70 72 65 66 65 72 72 65 64 4c 69 74 65 72 61 6c 29 2c 20 24 69 64 65 6e 74 69 | kage($preferredLiteral),.$identi |
7d1e0 | 63 61 6c 44 65 66 69 6e 69 74 69 6f 6e 73 50 65 72 50 61 63 6b 61 67 65 2c 20 24 70 61 63 6b 61 | calDefinitionsPerPackage,.$packa |
7d200 | 67 65 49 64 65 6e 74 69 63 61 6c 44 65 66 69 6e 69 74 69 6f 6e 4c 6f 6f 6b 75 70 29 3b 0a 7d 0a | geIdenticalDefinitionLookup);.}. |
7d220 | 7d 0a 7d 0a 7d 0a 7d 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 63 61 6c 63 75 6c | }.}.}.}..private.function.calcul |
7d240 | 61 74 65 44 65 70 65 6e 64 65 6e 63 79 48 61 73 68 28 42 61 73 65 50 61 63 6b 61 67 65 20 24 70 | ateDependencyHash(BasePackage.$p |
7d260 | 61 63 6b 61 67 65 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 24 68 61 73 68 20 3d 20 27 27 3b 0a 0a 24 | ackage):.string.{.$hash.=.'';..$ |
7d280 | 68 61 73 68 52 65 6c 65 76 61 6e 74 4c 69 6e 6b 73 20 3d 20 5b 0a 27 72 65 71 75 69 72 65 73 27 | hashRelevantLinks.=.[.'requires' |
7d2a0 | 20 3d 3e 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 52 65 71 75 69 72 65 73 28 29 2c 0a 27 63 6f | .=>.$package->getRequires(),.'co |
7d2c0 | 6e 66 6c 69 63 74 73 27 20 3d 3e 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 43 6f 6e 66 6c 69 63 | nflicts'.=>.$package->getConflic |
7d2e0 | 74 73 28 29 2c 0a 27 72 65 70 6c 61 63 65 73 27 20 3d 3e 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 | ts(),.'replaces'.=>.$package->ge |
7d300 | 74 52 65 70 6c 61 63 65 73 28 29 2c 0a 27 70 72 6f 76 69 64 65 73 27 20 3d 3e 20 24 70 61 63 6b | tReplaces(),.'provides'.=>.$pack |
7d320 | 61 67 65 2d 3e 67 65 74 50 72 6f 76 69 64 65 73 28 29 2c 0a 5d 3b 0a 0a 66 6f 72 65 61 63 68 20 | age->getProvides(),.];..foreach. |
7d340 | 28 24 68 61 73 68 52 65 6c 65 76 61 6e 74 4c 69 6e 6b 73 20 61 73 20 24 6b 65 79 20 3d 3e 20 24 | ($hashRelevantLinks.as.$key.=>.$ |
7d360 | 6c 69 6e 6b 73 29 20 7b 0a 69 66 20 28 30 20 3d 3d 3d 20 5c 63 6f 75 6e 74 28 24 6c 69 6e 6b 73 | links).{.if.(0.===.\count($links |
7d380 | 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 0a 24 68 61 73 68 20 2e 3d 20 24 6b 65 79 | )).{.continue;.}...$hash..=.$key |
7d3a0 | 20 2e 20 27 3a 27 3b 0a 0a 24 73 75 62 68 61 73 68 20 3d 20 5b 5d 3b 0a 0a 66 6f 72 65 61 63 68 | ...':';..$subhash.=.[];..foreach |
7d3c0 | 20 28 24 6c 69 6e 6b 73 20 61 73 20 24 6c 69 6e 6b 29 20 7b 0a 0a 0a 0a 0a 24 73 75 62 68 61 73 | .($links.as.$link).{.....$subhas |
7d3e0 | 68 5b 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 74 28 29 5d 20 3d 20 28 73 74 72 69 6e 67 29 | h[$link->getTarget()].=.(string) |
7d400 | 20 24 6c 69 6e 6b 2d 3e 67 65 74 43 6f 6e 73 74 72 61 69 6e 74 28 29 3b 0a 7d 0a 0a 0a 6b 73 6f | .$link->getConstraint();.}...kso |
7d420 | 72 74 28 24 73 75 62 68 61 73 68 29 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 73 75 62 68 61 73 68 | rt($subhash);..foreach.($subhash |
7d440 | 20 61 73 20 24 74 61 72 67 65 74 20 3d 3e 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 20 7b 0a 24 68 | .as.$target.=>.$constraint).{.$h |
7d460 | 61 73 68 20 2e 3d 20 24 74 61 72 67 65 74 20 2e 20 27 40 27 20 2e 20 24 63 6f 6e 73 74 72 61 69 | ash..=.$target...'@'...$constrai |
7d480 | 6e 74 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 68 61 73 68 3b 0a 7d 0a 0a 70 72 69 76 61 74 | nt;.}.}..return.$hash;.}..privat |
7d4a0 | 65 20 66 75 6e 63 74 69 6f 6e 20 6d 61 72 6b 50 61 63 6b 61 67 65 46 6f 72 52 65 6d 6f 76 61 6c | e.function.markPackageForRemoval |
7d4c0 | 28 69 6e 74 20 24 69 64 29 3a 20 76 6f 69 64 0a 7b 0a 0a 69 66 20 28 69 73 73 65 74 28 24 74 68 | (int.$id):.void.{..if.(isset($th |
7d4e0 | 69 73 2d 3e 69 72 72 65 6d 6f 76 61 62 6c 65 50 61 63 6b 61 67 65 73 5b 24 69 64 5d 29 29 20 7b | is->irremovablePackages[$id])).{ |
7d500 | 0a 74 68 72 6f 77 20 6e 65 77 20 5c 4c 6f 67 69 63 45 78 63 65 70 74 69 6f 6e 28 27 41 74 74 65 | .throw.new.\LogicException('Atte |
7d520 | 6d 70 74 65 64 20 72 65 6d 6f 76 69 6e 67 20 61 20 70 61 63 6b 61 67 65 20 77 68 69 63 68 20 77 | mpted.removing.a.package.which.w |
7d540 | 61 73 20 70 72 65 76 69 6f 75 73 6c 79 20 6d 61 72 6b 65 64 20 69 72 72 65 6d 6f 76 61 62 6c 65 | as.previously.marked.irremovable |
7d560 | 27 29 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 73 54 6f 52 65 6d 6f 76 65 5b 24 | ');.}..$this->packagesToRemove[$ |
7d580 | 69 64 5d 20 3d 20 74 72 75 65 3b 0a 7d 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 | id].=.true;.}......private.funct |
7d5a0 | 69 6f 6e 20 6b 65 65 70 50 61 63 6b 61 67 65 28 42 61 73 65 50 61 63 6b 61 67 65 20 24 70 61 63 | ion.keepPackage(BasePackage.$pac |
7d5c0 | 6b 61 67 65 2c 20 61 72 72 61 79 20 24 69 64 65 6e 74 69 63 61 6c 44 65 66 69 6e 69 74 69 6f 6e | kage,.array.$identicalDefinition |
7d5e0 | 73 50 65 72 50 61 63 6b 61 67 65 2c 20 61 72 72 61 79 20 24 70 61 63 6b 61 67 65 49 64 65 6e 74 | sPerPackage,.array.$packageIdent |
7d600 | 69 63 61 6c 44 65 66 69 6e 69 74 69 6f 6e 4c 6f 6f 6b 75 70 29 3a 20 76 6f 69 64 0a 7b 0a 0a 69 | icalDefinitionLookup):.void.{..i |
7d620 | 66 20 28 21 69 73 73 65 74 28 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 73 54 6f 52 65 6d 6f 76 | f.(!isset($this->packagesToRemov |
7d640 | 65 5b 24 70 61 63 6b 61 67 65 2d 3e 69 64 5d 29 29 20 7b 0a 72 65 74 75 72 6e 3b 0a 7d 0a 0a 75 | e[$package->id])).{.return;.}..u |
7d660 | 6e 73 65 74 28 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 73 54 6f 52 65 6d 6f 76 65 5b 24 70 61 | nset($this->packagesToRemove[$pa |
7d680 | 63 6b 61 67 65 2d 3e 69 64 5d 29 3b 0a 0a 69 66 20 28 24 70 61 63 6b 61 67 65 20 69 6e 73 74 61 | ckage->id]);..if.($package.insta |
7d6a0 | 6e 63 65 6f 66 20 41 6c 69 61 73 50 61 63 6b 61 67 65 29 20 7b 0a 0a 0a 24 74 68 69 73 2d 3e 6b | nceof.AliasPackage).{...$this->k |
7d6c0 | 65 65 70 50 61 63 6b 61 67 65 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 41 6c 69 61 73 4f 66 28 | eepPackage($package->getAliasOf( |
7d6e0 | 29 2c 20 24 69 64 65 6e 74 69 63 61 6c 44 65 66 69 6e 69 74 69 6f 6e 73 50 65 72 50 61 63 6b 61 | ),.$identicalDefinitionsPerPacka |
7d700 | 67 65 2c 20 24 70 61 63 6b 61 67 65 49 64 65 6e 74 69 63 61 6c 44 65 66 69 6e 69 74 69 6f 6e 4c | ge,.$packageIdenticalDefinitionL |
7d720 | 6f 6f 6b 75 70 29 3b 0a 7d 0a 0a 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 2d 3e 67 | ookup);.}...foreach.($package->g |
7d740 | 65 74 4e 61 6d 65 73 28 66 61 6c 73 65 29 20 61 73 20 24 6e 61 6d 65 29 20 7b 0a 69 66 20 28 69 | etNames(false).as.$name).{.if.(i |
7d760 | 73 73 65 74 28 24 70 61 63 6b 61 67 65 49 64 65 6e 74 69 63 61 6c 44 65 66 69 6e 69 74 69 6f 6e | sset($packageIdenticalDefinition |
7d780 | 4c 6f 6f 6b 75 70 5b 24 70 61 63 6b 61 67 65 2d 3e 69 64 5d 5b 24 6e 61 6d 65 5d 29 29 20 7b 0a | Lookup[$package->id][$name])).{. |
7d7a0 | 24 70 61 63 6b 61 67 65 47 72 6f 75 70 50 6f 69 6e 74 65 72 73 20 3d 20 24 70 61 63 6b 61 67 65 | $packageGroupPointers.=.$package |
7d7c0 | 49 64 65 6e 74 69 63 61 6c 44 65 66 69 6e 69 74 69 6f 6e 4c 6f 6f 6b 75 70 5b 24 70 61 63 6b 61 | IdenticalDefinitionLookup[$packa |
7d7e0 | 67 65 2d 3e 69 64 5d 5b 24 6e 61 6d 65 5d 3b 0a 24 70 61 63 6b 61 67 65 47 72 6f 75 70 20 3d 20 | ge->id][$name];.$packageGroup.=. |
7d800 | 24 69 64 65 6e 74 69 63 61 6c 44 65 66 69 6e 69 74 69 6f 6e 73 50 65 72 50 61 63 6b 61 67 65 5b | $identicalDefinitionsPerPackage[ |
7d820 | 24 6e 61 6d 65 5d 5b 24 70 61 63 6b 61 67 65 47 72 6f 75 70 50 6f 69 6e 74 65 72 73 5b 27 67 72 | $name][$packageGroupPointers['gr |
7d840 | 6f 75 70 48 61 73 68 27 5d 5d 5b 24 70 61 63 6b 61 67 65 47 72 6f 75 70 50 6f 69 6e 74 65 72 73 | oupHash']][$packageGroupPointers |
7d860 | 5b 27 64 65 70 65 6e 64 65 6e 63 79 48 61 73 68 27 5d 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 70 | ['dependencyHash']];.foreach.($p |
7d880 | 61 63 6b 61 67 65 47 72 6f 75 70 20 61 73 20 24 70 6b 67 29 20 7b 0a 69 66 20 28 24 70 6b 67 20 | ackageGroup.as.$pkg).{.if.($pkg. |
7d8a0 | 69 6e 73 74 61 6e 63 65 6f 66 20 41 6c 69 61 73 50 61 63 6b 61 67 65 20 26 26 20 24 70 6b 67 2d | instanceof.AliasPackage.&&.$pkg- |
7d8c0 | 3e 67 65 74 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 20 3d 3d 3d 20 56 65 72 73 69 6f 6e 50 | >getPrettyVersion().===.VersionP |
7d8e0 | 61 72 73 65 72 3a 3a 44 45 46 41 55 4c 54 5f 42 52 41 4e 43 48 5f 41 4c 49 41 53 29 20 7b 0a 24 | arser::DEFAULT_BRANCH_ALIAS).{.$ |
7d900 | 70 6b 67 20 3d 20 24 70 6b 67 2d 3e 67 65 74 41 6c 69 61 73 4f 66 28 29 3b 0a 7d 0a 24 74 68 69 | pkg.=.$pkg->getAliasOf();.}.$thi |
7d920 | 73 2d 3e 72 65 6d 6f 76 65 64 56 65 72 73 69 6f 6e 73 42 79 50 61 63 6b 61 67 65 5b 73 70 6c 5f | s->removedVersionsByPackage[spl_ |
7d940 | 6f 62 6a 65 63 74 5f 68 61 73 68 28 24 70 61 63 6b 61 67 65 29 5d 5b 24 70 6b 67 2d 3e 67 65 74 | object_hash($package)][$pkg->get |
7d960 | 56 65 72 73 69 6f 6e 28 29 5d 20 3d 20 24 70 6b 67 2d 3e 67 65 74 50 72 65 74 74 79 56 65 72 73 | Version()].=.$pkg->getPrettyVers |
7d980 | 69 6f 6e 28 29 3b 0a 7d 0a 7d 0a 7d 0a 0a 69 66 20 28 69 73 73 65 74 28 24 74 68 69 73 2d 3e 61 | ion();.}.}.}..if.(isset($this->a |
7d9a0 | 6c 69 61 73 65 73 50 65 72 50 61 63 6b 61 67 65 5b 24 70 61 63 6b 61 67 65 2d 3e 69 64 5d 29 29 | liasesPerPackage[$package->id])) |
7d9c0 | 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 61 6c 69 61 73 65 73 50 65 72 50 61 63 | .{.foreach.($this->aliasesPerPac |
7d9e0 | 6b 61 67 65 5b 24 70 61 63 6b 61 67 65 2d 3e 69 64 5d 20 61 73 20 24 61 6c 69 61 73 50 61 63 6b | kage[$package->id].as.$aliasPack |
7da00 | 61 67 65 29 20 7b 0a 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 73 54 6f 52 65 | age).{.unset($this->packagesToRe |
7da20 | 6d 6f 76 65 5b 24 61 6c 69 61 73 50 61 63 6b 61 67 65 2d 3e 69 64 5d 29 3b 0a 0a 0a 66 6f 72 65 | move[$aliasPackage->id]);...fore |
7da40 | 61 63 68 20 28 24 61 6c 69 61 73 50 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 73 28 66 61 6c | ach.($aliasPackage->getNames(fal |
7da60 | 73 65 29 20 61 73 20 24 6e 61 6d 65 29 20 7b 0a 69 66 20 28 69 73 73 65 74 28 24 70 61 63 6b 61 | se).as.$name).{.if.(isset($packa |
7da80 | 67 65 49 64 65 6e 74 69 63 61 6c 44 65 66 69 6e 69 74 69 6f 6e 4c 6f 6f 6b 75 70 5b 24 61 6c 69 | geIdenticalDefinitionLookup[$ali |
7daa0 | 61 73 50 61 63 6b 61 67 65 2d 3e 69 64 5d 5b 24 6e 61 6d 65 5d 29 29 20 7b 0a 24 70 61 63 6b 61 | asPackage->id][$name])).{.$packa |
7dac0 | 67 65 47 72 6f 75 70 50 6f 69 6e 74 65 72 73 20 3d 20 24 70 61 63 6b 61 67 65 49 64 65 6e 74 69 | geGroupPointers.=.$packageIdenti |
7dae0 | 63 61 6c 44 65 66 69 6e 69 74 69 6f 6e 4c 6f 6f 6b 75 70 5b 24 61 6c 69 61 73 50 61 63 6b 61 67 | calDefinitionLookup[$aliasPackag |
7db00 | 65 2d 3e 69 64 5d 5b 24 6e 61 6d 65 5d 3b 0a 24 70 61 63 6b 61 67 65 47 72 6f 75 70 20 3d 20 24 | e->id][$name];.$packageGroup.=.$ |
7db20 | 69 64 65 6e 74 69 63 61 6c 44 65 66 69 6e 69 74 69 6f 6e 73 50 65 72 50 61 63 6b 61 67 65 5b 24 | identicalDefinitionsPerPackage[$ |
7db40 | 6e 61 6d 65 5d 5b 24 70 61 63 6b 61 67 65 47 72 6f 75 70 50 6f 69 6e 74 65 72 73 5b 27 67 72 6f | name][$packageGroupPointers['gro |
7db60 | 75 70 48 61 73 68 27 5d 5d 5b 24 70 61 63 6b 61 67 65 47 72 6f 75 70 50 6f 69 6e 74 65 72 73 5b | upHash']][$packageGroupPointers[ |
7db80 | 27 64 65 70 65 6e 64 65 6e 63 79 48 61 73 68 27 5d 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 70 61 | 'dependencyHash']];.foreach.($pa |
7dba0 | 63 6b 61 67 65 47 72 6f 75 70 20 61 73 20 24 70 6b 67 29 20 7b 0a 69 66 20 28 24 70 6b 67 20 69 | ckageGroup.as.$pkg).{.if.($pkg.i |
7dbc0 | 6e 73 74 61 6e 63 65 6f 66 20 41 6c 69 61 73 50 61 63 6b 61 67 65 20 26 26 20 24 70 6b 67 2d 3e | nstanceof.AliasPackage.&&.$pkg-> |
7dbe0 | 67 65 74 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 20 3d 3d 3d 20 56 65 72 73 69 6f 6e 50 61 | getPrettyVersion().===.VersionPa |
7dc00 | 72 73 65 72 3a 3a 44 45 46 41 55 4c 54 5f 42 52 41 4e 43 48 5f 41 4c 49 41 53 29 20 7b 0a 24 70 | rser::DEFAULT_BRANCH_ALIAS).{.$p |
7dc20 | 6b 67 20 3d 20 24 70 6b 67 2d 3e 67 65 74 41 6c 69 61 73 4f 66 28 29 3b 0a 7d 0a 24 74 68 69 73 | kg.=.$pkg->getAliasOf();.}.$this |
7dc40 | 2d 3e 72 65 6d 6f 76 65 64 56 65 72 73 69 6f 6e 73 42 79 50 61 63 6b 61 67 65 5b 73 70 6c 5f 6f | ->removedVersionsByPackage[spl_o |
7dc60 | 62 6a 65 63 74 5f 68 61 73 68 28 24 61 6c 69 61 73 50 61 63 6b 61 67 65 29 5d 5b 24 70 6b 67 2d | bject_hash($aliasPackage)][$pkg- |
7dc80 | 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 5d 20 3d 20 24 70 6b 67 2d 3e 67 65 74 50 72 65 74 74 79 | >getVersion()].=.$pkg->getPretty |
7dca0 | 56 65 72 73 69 6f 6e 28 29 3b 0a 7d 0a 7d 0a 7d 0a 7d 0a 7d 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 72 69 | Version();.}.}.}.}.}.}.......pri |
7dcc0 | 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 6f 70 74 69 6d 69 7a 65 49 6d 70 6f 73 73 69 62 6c 65 | vate.function.optimizeImpossible |
7dce0 | 50 61 63 6b 61 67 65 73 41 77 61 79 28 52 65 71 75 65 73 74 20 24 72 65 71 75 65 73 74 2c 20 50 | PackagesAway(Request.$request,.P |
7dd00 | 6f 6f 6c 20 24 70 6f 6f 6c 29 3a 20 76 6f 69 64 0a 7b 0a 69 66 20 28 63 6f 75 6e 74 28 24 72 65 | ool.$pool):.void.{.if.(count($re |
7dd20 | 71 75 65 73 74 2d 3e 67 65 74 4c 6f 63 6b 65 64 50 61 63 6b 61 67 65 73 28 29 29 20 3d 3d 3d 20 | quest->getLockedPackages()).===. |
7dd40 | 30 29 20 7b 0a 72 65 74 75 72 6e 3b 0a 7d 0a 0a 24 70 61 63 6b 61 67 65 49 6e 64 65 78 20 3d 20 | 0).{.return;.}..$packageIndex.=. |
7dd60 | 5b 5d 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 70 6f 6f 6c 2d 3e 67 65 74 50 61 63 6b 61 67 65 73 | [];..foreach.($pool->getPackages |
7dd80 | 28 29 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 24 69 64 20 3d 20 24 70 61 63 6b 61 67 65 | ().as.$package).{.$id.=.$package |
7dda0 | 2d 3e 69 64 3b 0a 0a 0a 69 66 20 28 69 73 73 65 74 28 24 74 68 69 73 2d 3e 69 72 72 65 6d 6f 76 | ->id;...if.(isset($this->irremov |
7ddc0 | 61 62 6c 65 50 61 63 6b 61 67 65 73 5b 24 69 64 5d 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a | ablePackages[$id])).{.continue;. |
7dde0 | 7d 0a 0a 69 66 20 28 69 73 73 65 74 28 24 74 68 69 73 2d 3e 61 6c 69 61 73 65 73 50 65 72 50 61 | }..if.(isset($this->aliasesPerPa |
7de00 | 63 6b 61 67 65 5b 24 69 64 5d 29 20 7c 7c 20 24 70 61 63 6b 61 67 65 20 69 6e 73 74 61 6e 63 65 | ckage[$id]).||.$package.instance |
7de20 | 6f 66 20 41 6c 69 61 73 50 61 63 6b 61 67 65 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a | of.AliasPackage).{.continue;.}.. |
7de40 | 69 66 20 28 24 72 65 71 75 65 73 74 2d 3e 69 73 46 69 78 65 64 50 61 63 6b 61 67 65 28 24 70 61 | if.($request->isFixedPackage($pa |
7de60 | 63 6b 61 67 65 29 20 7c 7c 20 24 72 65 71 75 65 73 74 2d 3e 69 73 4c 6f 63 6b 65 64 50 61 63 6b | ckage).||.$request->isLockedPack |
7de80 | 61 67 65 28 24 70 61 63 6b 61 67 65 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 24 70 | age($package)).{.continue;.}..$p |
7dea0 | 61 63 6b 61 67 65 49 6e 64 65 78 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 5d | ackageIndex[$package->getName()] |
7dec0 | 5b 24 70 61 63 6b 61 67 65 2d 3e 69 64 5d 20 3d 20 24 70 61 63 6b 61 67 65 3b 0a 7d 0a 0a 66 6f | [$package->id].=.$package;.}..fo |
7dee0 | 72 65 61 63 68 20 28 24 72 65 71 75 65 73 74 2d 3e 67 65 74 4c 6f 63 6b 65 64 50 61 63 6b 61 67 | reach.($request->getLockedPackag |
7df00 | 65 73 28 29 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 0a 0a 24 69 73 55 6e 75 73 65 64 50 | es().as.$package).{...$isUnusedP |
7df20 | 61 63 6b 61 67 65 20 3d 20 74 72 75 65 3b 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 | ackage.=.true;.foreach.($package |
7df40 | 2d 3e 67 65 74 4e 61 6d 65 73 28 66 61 6c 73 65 29 20 61 73 20 24 70 61 63 6b 61 67 65 4e 61 6d | ->getNames(false).as.$packageNam |
7df60 | 65 29 20 7b 0a 69 66 20 28 69 73 73 65 74 28 24 74 68 69 73 2d 3e 72 65 71 75 69 72 65 43 6f 6e | e).{.if.(isset($this->requireCon |
7df80 | 73 74 72 61 69 6e 74 73 50 65 72 50 61 63 6b 61 67 65 5b 24 70 61 63 6b 61 67 65 4e 61 6d 65 5d | straintsPerPackage[$packageName] |
7dfa0 | 29 29 20 7b 0a 24 69 73 55 6e 75 73 65 64 50 61 63 6b 61 67 65 20 3d 20 66 61 6c 73 65 3b 0a 62 | )).{.$isUnusedPackage.=.false;.b |
7dfc0 | 72 65 61 6b 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 24 69 73 55 6e 75 73 65 64 50 61 63 6b 61 67 65 29 | reak;.}.}..if.($isUnusedPackage) |
7dfe0 | 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 | .{.continue;.}..foreach.($packag |
7e000 | 65 2d 3e 67 65 74 52 65 71 75 69 72 65 73 28 29 20 61 73 20 24 6c 69 6e 6b 29 20 7b 0a 24 72 65 | e->getRequires().as.$link).{.$re |
7e020 | 71 75 69 72 65 20 3d 20 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 74 28 29 3b 0a 69 66 20 28 | quire.=.$link->getTarget();.if.( |
7e040 | 21 69 73 73 65 74 28 24 70 61 63 6b 61 67 65 49 6e 64 65 78 5b 24 72 65 71 75 69 72 65 5d 29 29 | !isset($packageIndex[$require])) |
7e060 | 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 24 6c 69 6e 6b 43 6f 6e 73 74 72 61 69 6e 74 20 | .{.continue;.}..$linkConstraint. |
7e080 | 3d 20 24 6c 69 6e 6b 2d 3e 67 65 74 43 6f 6e 73 74 72 61 69 6e 74 28 29 3b 0a 66 6f 72 65 61 63 | =.$link->getConstraint();.foreac |
7e0a0 | 68 20 28 24 70 61 63 6b 61 67 65 49 6e 64 65 78 5b 24 72 65 71 75 69 72 65 5d 20 61 73 20 24 69 | h.($packageIndex[$require].as.$i |
7e0c0 | 64 20 3d 3e 20 24 72 65 71 75 69 72 65 64 50 6b 67 29 20 7b 0a 69 66 20 28 66 61 6c 73 65 20 3d | d.=>.$requiredPkg).{.if.(false.= |
7e0e0 | 3d 3d 20 43 6f 6d 70 69 6c 69 6e 67 4d 61 74 63 68 65 72 3a 3a 6d 61 74 63 68 28 24 6c 69 6e 6b | ==.CompilingMatcher::match($link |
7e100 | 43 6f 6e 73 74 72 61 69 6e 74 2c 20 43 6f 6e 73 74 72 61 69 6e 74 3a 3a 4f 50 5f 45 51 2c 20 24 | Constraint,.Constraint::OP_EQ,.$ |
7e120 | 72 65 71 75 69 72 65 64 50 6b 67 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 29 29 20 7b 0a 24 74 | requiredPkg->getVersion())).{.$t |
7e140 | 68 69 73 2d 3e 6d 61 72 6b 50 61 63 6b 61 67 65 46 6f 72 52 65 6d 6f 76 61 6c 28 24 69 64 29 3b | his->markPackageForRemoval($id); |
7e160 | 0a 75 6e 73 65 74 28 24 70 61 63 6b 61 67 65 49 6e 64 65 78 5b 24 72 65 71 75 69 72 65 5d 5b 24 | .unset($packageIndex[$require][$ |
7e180 | 69 64 5d 29 3b 0a 7d 0a 7d 0a 7d 0a 7d 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 | id]);.}.}.}.}.}.........private. |
7e1a0 | 66 75 6e 63 74 69 6f 6e 20 65 78 74 72 61 63 74 52 65 71 75 69 72 65 43 6f 6e 73 74 72 61 69 6e | function.extractRequireConstrain |
7e1c0 | 74 73 50 65 72 50 61 63 6b 61 67 65 28 73 74 72 69 6e 67 20 24 70 61 63 6b 61 67 65 2c 20 43 6f | tsPerPackage(string.$package,.Co |
7e1e0 | 6e 73 74 72 61 69 6e 74 49 6e 74 65 72 66 61 63 65 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 0a 7b | nstraintInterface.$constraint).{ |
7e200 | 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 65 78 70 61 6e 64 44 69 73 6a 75 6e 63 74 69 | .foreach.($this->expandDisjuncti |
7e220 | 76 65 4d 75 6c 74 69 43 6f 6e 73 74 72 61 69 6e 74 73 28 24 63 6f 6e 73 74 72 61 69 6e 74 29 20 | veMultiConstraints($constraint). |
7e240 | 61 73 20 24 65 78 70 61 6e 64 65 64 29 20 7b 0a 24 74 68 69 73 2d 3e 72 65 71 75 69 72 65 43 6f | as.$expanded).{.$this->requireCo |
7e260 | 6e 73 74 72 61 69 6e 74 73 50 65 72 50 61 63 6b 61 67 65 5b 24 70 61 63 6b 61 67 65 5d 5b 28 73 | nstraintsPerPackage[$package][(s |
7e280 | 74 72 69 6e 67 29 20 24 65 78 70 61 6e 64 65 64 5d 20 3d 20 24 65 78 70 61 6e 64 65 64 3b 0a 7d | tring).$expanded].=.$expanded;.} |
7e2a0 | 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 65 78 74 72 | .}.........private.function.extr |
7e2c0 | 61 63 74 43 6f 6e 66 6c 69 63 74 43 6f 6e 73 74 72 61 69 6e 74 73 50 65 72 50 61 63 6b 61 67 65 | actConflictConstraintsPerPackage |
7e2e0 | 28 73 74 72 69 6e 67 20 24 70 61 63 6b 61 67 65 2c 20 43 6f 6e 73 74 72 61 69 6e 74 49 6e 74 65 | (string.$package,.ConstraintInte |
7e300 | 72 66 61 63 65 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 0a 7b 0a 66 6f 72 65 61 63 68 20 28 24 74 | rface.$constraint).{.foreach.($t |
7e320 | 68 69 73 2d 3e 65 78 70 61 6e 64 44 69 73 6a 75 6e 63 74 69 76 65 4d 75 6c 74 69 43 6f 6e 73 74 | his->expandDisjunctiveMultiConst |
7e340 | 72 61 69 6e 74 73 28 24 63 6f 6e 73 74 72 61 69 6e 74 29 20 61 73 20 24 65 78 70 61 6e 64 65 64 | raints($constraint).as.$expanded |
7e360 | 29 20 7b 0a 24 74 68 69 73 2d 3e 63 6f 6e 66 6c 69 63 74 43 6f 6e 73 74 72 61 69 6e 74 73 50 65 | ).{.$this->conflictConstraintsPe |
7e380 | 72 50 61 63 6b 61 67 65 5b 24 70 61 63 6b 61 67 65 5d 5b 28 73 74 72 69 6e 67 29 20 24 65 78 70 | rPackage[$package][(string).$exp |
7e3a0 | 61 6e 64 65 64 5d 20 3d 20 24 65 78 70 61 6e 64 65 64 3b 0a 7d 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 | anded].=.$expanded;.}.}.....priv |
7e3c0 | 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 65 78 70 61 6e 64 44 69 73 6a 75 6e 63 74 69 76 65 4d 75 | ate.function.expandDisjunctiveMu |
7e3e0 | 6c 74 69 43 6f 6e 73 74 72 61 69 6e 74 73 28 43 6f 6e 73 74 72 61 69 6e 74 49 6e 74 65 72 66 61 | ltiConstraints(ConstraintInterfa |
7e400 | 63 65 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 0a 7b 0a 24 63 6f 6e 73 74 72 61 69 6e 74 20 3d 20 | ce.$constraint).{.$constraint.=. |
7e420 | 49 6e 74 65 72 76 61 6c 73 3a 3a 63 6f 6d 70 61 63 74 43 6f 6e 73 74 72 61 69 6e 74 28 24 63 6f | Intervals::compactConstraint($co |
7e440 | 6e 73 74 72 61 69 6e 74 29 3b 0a 0a 69 66 20 28 24 63 6f 6e 73 74 72 61 69 6e 74 20 69 6e 73 74 | nstraint);..if.($constraint.inst |
7e460 | 61 6e 63 65 6f 66 20 4d 75 6c 74 69 43 6f 6e 73 74 72 61 69 6e 74 20 26 26 20 24 63 6f 6e 73 74 | anceof.MultiConstraint.&&.$const |
7e480 | 72 61 69 6e 74 2d 3e 69 73 44 69 73 6a 75 6e 63 74 69 76 65 28 29 29 20 7b 0a 0a 0a 72 65 74 75 | raint->isDisjunctive()).{...retu |
7e4a0 | 72 6e 20 24 63 6f 6e 73 74 72 61 69 6e 74 2d 3e 67 65 74 43 6f 6e 73 74 72 61 69 6e 74 73 28 29 | rn.$constraint->getConstraints() |
7e4c0 | 3b 0a 7d 0a 0a 0a 72 65 74 75 72 6e 20 5b 24 63 6f 6e 73 74 72 61 69 6e 74 5d 3b 0a 7d 0a 7d 0a | ;.}...return.[$constraint];.}.}. |
7e4e0 | 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a | <?php.declare(strict_types=1);.. |
7e500 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 44 65 70 | ..........namespace.Composer\Dep |
7e520 | 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 | endencyResolver;..use.Composer\P |
7e540 | 61 63 6b 61 67 65 5c 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b | ackage\CompletePackageInterface; |
7e560 | 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 41 6c 69 61 73 50 61 63 6b 61 | .use.Composer\Package\AliasPacka |
7e580 | 67 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 42 61 73 65 50 61 63 | ge;.use.Composer\Package\BasePac |
7e5a0 | 6b 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 4c 69 6e 6b 3b | kage;.use.Composer\Package\Link; |
7e5c0 | 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 50 61 63 6b 61 67 65 49 6e 74 | .use.Composer\Package\PackageInt |
7e5e0 | 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 52 6f 6f | erface;.use.Composer\Package\Roo |
7e600 | 74 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c | tPackageInterface;.use.Composer\ |
7e620 | 50 63 72 65 5c 50 72 65 67 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f | Pcre\Preg;.use.Composer\Reposito |
7e640 | 72 79 5c 52 65 70 6f 73 69 74 6f 72 79 53 65 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 | ry\RepositorySet;.use.Composer\R |
7e660 | 65 70 6f 73 69 74 6f 72 79 5c 4c 6f 63 6b 41 72 72 61 79 52 65 70 6f 73 69 74 6f 72 79 3b 0a 75 | epository\LockArrayRepository;.u |
7e680 | 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 65 6d 76 65 72 5c 43 6f 6e 73 74 72 61 69 6e 74 5c 43 6f | se.Composer\Semver\Constraint\Co |
7e6a0 | 6e 73 74 72 61 69 6e 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 65 6d 76 65 72 5c 43 6f | nstraint;.use.Composer\Semver\Co |
7e6c0 | 6e 73 74 72 61 69 6e 74 5c 43 6f 6e 73 74 72 61 69 6e 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 | nstraint\ConstraintInterface;.us |
7e6e0 | 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 56 65 72 73 69 6f 6e 5c 56 65 72 73 69 | e.Composer\Package\Version\Versi |
7e700 | 6f 6e 50 61 72 73 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 | onParser;.use.Composer\Repositor |
7e720 | 79 5c 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 3b 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 | y\PlatformRepository;.......clas |
7e740 | 73 20 50 72 6f 62 6c 65 6d 0a 7b 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 72 65 61 73 6f | s.Problem.{.....protected.$reaso |
7e760 | 6e 53 65 65 6e 3b 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 72 65 61 73 6f 6e 73 20 3d | nSeen;......protected.$reasons.= |
7e780 | 20 5b 5d 3b 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 73 65 63 74 69 6f 6e 20 3d 20 30 3b 0a 0a | .[];...protected.$section.=.0;.. |
7e7a0 | 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 61 64 64 52 75 6c 65 28 52 75 6c | .....public.function.addRule(Rul |
7e7c0 | 65 20 24 72 75 6c 65 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 61 64 64 52 65 61 73 6f | e.$rule):.void.{.$this->addReaso |
7e7e0 | 6e 28 73 70 6c 5f 6f 62 6a 65 63 74 5f 68 61 73 68 28 24 72 75 6c 65 29 2c 20 24 72 75 6c 65 29 | n(spl_object_hash($rule),.$rule) |
7e800 | 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 52 65 61 | ;.}.......public.function.getRea |
7e820 | 73 6f 6e 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 72 65 | sons():.array.{.return.$this->re |
7e840 | 61 73 6f 6e 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 | asons;.}........public.function. |
7e860 | 67 65 74 50 72 65 74 74 79 53 74 72 69 6e 67 28 52 65 70 6f 73 69 74 6f 72 79 53 65 74 20 24 72 | getPrettyString(RepositorySet.$r |
7e880 | 65 70 6f 73 69 74 6f 72 79 53 65 74 2c 20 52 65 71 75 65 73 74 20 24 72 65 71 75 65 73 74 2c 20 | epositorySet,.Request.$request,. |
7e8a0 | 50 6f 6f 6c 20 24 70 6f 6f 6c 2c 20 62 6f 6f 6c 20 24 69 73 56 65 72 62 6f 73 65 2c 20 61 72 72 | Pool.$pool,.bool.$isVerbose,.arr |
7e8c0 | 61 79 20 24 69 6e 73 74 61 6c 6c 65 64 4d 61 70 20 3d 20 5b 5d 2c 20 61 72 72 61 79 20 24 6c 65 | ay.$installedMap.=.[],.array.$le |
7e8e0 | 61 72 6e 65 64 50 6f 6f 6c 20 3d 20 5b 5d 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 0a 24 72 65 61 73 | arnedPool.=.[]):.string.{..$reas |
7e900 | 6f 6e 73 20 3d 20 61 72 72 61 79 5f 6d 65 72 67 65 28 2e 2e 2e 61 72 72 61 79 5f 72 65 76 65 72 | ons.=.array_merge(...array_rever |
7e920 | 73 65 28 24 74 68 69 73 2d 3e 72 65 61 73 6f 6e 73 29 29 3b 0a 0a 69 66 20 28 63 6f 75 6e 74 28 | se($this->reasons));..if.(count( |
7e940 | 24 72 65 61 73 6f 6e 73 29 20 3d 3d 3d 20 31 29 20 7b 0a 72 65 73 65 74 28 24 72 65 61 73 6f 6e | $reasons).===.1).{.reset($reason |
7e960 | 73 29 3b 0a 24 72 75 6c 65 20 3d 20 63 75 72 72 65 6e 74 28 24 72 65 61 73 6f 6e 73 29 3b 0a 0a | s);.$rule.=.current($reasons);.. |
7e980 | 69 66 20 28 24 72 75 6c 65 2d 3e 67 65 74 52 65 61 73 6f 6e 28 29 20 21 3d 3d 20 52 75 6c 65 3a | if.($rule->getReason().!==.Rule: |
7e9a0 | 3a 52 55 4c 45 5f 52 4f 4f 54 5f 52 45 51 55 49 52 45 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 | :RULE_ROOT_REQUIRE).{.throw.new. |
7e9c0 | 5c 4c 6f 67 69 63 45 78 63 65 70 74 69 6f 6e 28 22 53 69 6e 67 6c 65 20 72 65 61 73 6f 6e 20 70 | \LogicException("Single.reason.p |
7e9e0 | 72 6f 62 6c 65 6d 73 20 6d 75 73 74 20 63 6f 6e 74 61 69 6e 20 61 20 72 6f 6f 74 20 72 65 71 75 | roblems.must.contain.a.root.requ |
7ea00 | 69 72 65 20 72 75 6c 65 2e 22 29 3b 0a 7d 0a 0a 24 72 65 61 73 6f 6e 44 61 74 61 20 3d 20 24 72 | ire.rule.");.}..$reasonData.=.$r |
7ea20 | 75 6c 65 2d 3e 67 65 74 52 65 61 73 6f 6e 44 61 74 61 28 29 3b 0a 24 70 61 63 6b 61 67 65 4e 61 | ule->getReasonData();.$packageNa |
7ea40 | 6d 65 20 3d 20 24 72 65 61 73 6f 6e 44 61 74 61 5b 27 70 61 63 6b 61 67 65 4e 61 6d 65 27 5d 3b | me.=.$reasonData['packageName']; |
7ea60 | 0a 24 63 6f 6e 73 74 72 61 69 6e 74 20 3d 20 24 72 65 61 73 6f 6e 44 61 74 61 5b 27 63 6f 6e 73 | .$constraint.=.$reasonData['cons |
7ea80 | 74 72 61 69 6e 74 27 5d 3b 0a 0a 24 70 61 63 6b 61 67 65 73 20 3d 20 24 70 6f 6f 6c 2d 3e 77 68 | traint'];..$packages.=.$pool->wh |
7eaa0 | 61 74 50 72 6f 76 69 64 65 73 28 24 70 61 63 6b 61 67 65 4e 61 6d 65 2c 20 24 63 6f 6e 73 74 72 | atProvides($packageName,.$constr |
7eac0 | 61 69 6e 74 29 3b 0a 69 66 20 28 63 6f 75 6e 74 28 24 70 61 63 6b 61 67 65 73 29 20 3d 3d 3d 20 | aint);.if.(count($packages).===. |
7eae0 | 30 29 20 7b 0a 72 65 74 75 72 6e 20 22 5c 6e 20 20 20 20 22 2e 69 6d 70 6c 6f 64 65 28 73 65 6c | 0).{.return."\n....".implode(sel |
7eb00 | 66 3a 3a 67 65 74 4d 69 73 73 69 6e 67 50 61 63 6b 61 67 65 52 65 61 73 6f 6e 28 24 72 65 70 6f | f::getMissingPackageReason($repo |
7eb20 | 73 69 74 6f 72 79 53 65 74 2c 20 24 72 65 71 75 65 73 74 2c 20 24 70 6f 6f 6c 2c 20 24 69 73 56 | sitorySet,.$request,.$pool,.$isV |
7eb40 | 65 72 62 6f 73 65 2c 20 24 70 61 63 6b 61 67 65 4e 61 6d 65 2c 20 24 63 6f 6e 73 74 72 61 69 6e | erbose,.$packageName,.$constrain |
7eb60 | 74 29 29 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 73 65 6c 66 3a 3a 66 6f 72 6d 61 74 44 65 64 | t));.}.}..return.self::formatDed |
7eb80 | 75 70 6c 69 63 61 74 65 64 52 75 6c 65 73 28 24 72 65 61 73 6f 6e 73 2c 20 27 20 20 20 20 27 2c | uplicatedRules($reasons,.'....', |
7eba0 | 20 24 72 65 70 6f 73 69 74 6f 72 79 53 65 74 2c 20 24 72 65 71 75 65 73 74 2c 20 24 70 6f 6f 6c | .$repositorySet,.$request,.$pool |
7ebc0 | 2c 20 24 69 73 56 65 72 62 6f 73 65 2c 20 24 69 6e 73 74 61 6c 6c 65 64 4d 61 70 2c 20 24 6c 65 | ,.$isVerbose,.$installedMap,.$le |
7ebe0 | 61 72 6e 65 64 50 6f 6f 6c 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 73 74 61 74 | arnedPool);.}........public.stat |
7ec00 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 66 6f 72 6d 61 74 44 65 64 75 70 6c 69 63 61 74 65 64 52 75 | ic.function.formatDeduplicatedRu |
7ec20 | 6c 65 73 28 61 72 72 61 79 20 24 72 75 6c 65 73 2c 20 73 74 72 69 6e 67 20 24 69 6e 64 65 6e 74 | les(array.$rules,.string.$indent |
7ec40 | 2c 20 52 65 70 6f 73 69 74 6f 72 79 53 65 74 20 24 72 65 70 6f 73 69 74 6f 72 79 53 65 74 2c 20 | ,.RepositorySet.$repositorySet,. |
7ec60 | 52 65 71 75 65 73 74 20 24 72 65 71 75 65 73 74 2c 20 50 6f 6f 6c 20 24 70 6f 6f 6c 2c 20 62 6f | Request.$request,.Pool.$pool,.bo |
7ec80 | 6f 6c 20 24 69 73 56 65 72 62 6f 73 65 2c 20 61 72 72 61 79 20 24 69 6e 73 74 61 6c 6c 65 64 4d | ol.$isVerbose,.array.$installedM |
7eca0 | 61 70 20 3d 20 5b 5d 2c 20 61 72 72 61 79 20 24 6c 65 61 72 6e 65 64 50 6f 6f 6c 20 3d 20 5b 5d | ap.=.[],.array.$learnedPool.=.[] |
7ecc0 | 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 24 6d 65 73 73 61 67 65 73 20 3d 20 5b 5d 3b 0a 24 74 65 6d | ):.string.{.$messages.=.[];.$tem |
7ece0 | 70 6c 61 74 65 73 20 3d 20 5b 5d 3b 0a 24 70 61 72 73 65 72 20 3d 20 6e 65 77 20 56 65 72 73 69 | plates.=.[];.$parser.=.new.Versi |
7ed00 | 6f 6e 50 61 72 73 65 72 3b 0a 24 64 65 64 75 70 6c 69 63 61 74 61 62 6c 65 52 75 6c 65 54 79 70 | onParser;.$deduplicatableRuleTyp |
7ed20 | 65 73 20 3d 20 5b 52 75 6c 65 3a 3a 52 55 4c 45 5f 50 41 43 4b 41 47 45 5f 52 45 51 55 49 52 45 | es.=.[Rule::RULE_PACKAGE_REQUIRE |
7ed40 | 53 2c 20 52 75 6c 65 3a 3a 52 55 4c 45 5f 50 41 43 4b 41 47 45 5f 43 4f 4e 46 4c 49 43 54 5d 3b | S,.Rule::RULE_PACKAGE_CONFLICT]; |
7ed60 | 0a 66 6f 72 65 61 63 68 20 28 24 72 75 6c 65 73 20 61 73 20 24 72 75 6c 65 29 20 7b 0a 24 6d 65 | .foreach.($rules.as.$rule).{.$me |
7ed80 | 73 73 61 67 65 20 3d 20 24 72 75 6c 65 2d 3e 67 65 74 50 72 65 74 74 79 53 74 72 69 6e 67 28 24 | ssage.=.$rule->getPrettyString($ |
7eda0 | 72 65 70 6f 73 69 74 6f 72 79 53 65 74 2c 20 24 72 65 71 75 65 73 74 2c 20 24 70 6f 6f 6c 2c 20 | repositorySet,.$request,.$pool,. |
7edc0 | 24 69 73 56 65 72 62 6f 73 65 2c 20 24 69 6e 73 74 61 6c 6c 65 64 4d 61 70 2c 20 24 6c 65 61 72 | $isVerbose,.$installedMap,.$lear |
7ede0 | 6e 65 64 50 6f 6f 6c 29 3b 0a 69 66 20 28 69 6e 5f 61 72 72 61 79 28 24 72 75 6c 65 2d 3e 67 65 | nedPool);.if.(in_array($rule->ge |
7ee00 | 74 52 65 61 73 6f 6e 28 29 2c 20 24 64 65 64 75 70 6c 69 63 61 74 61 62 6c 65 52 75 6c 65 54 79 | tReason(),.$deduplicatableRuleTy |
7ee20 | 70 65 73 2c 20 74 72 75 65 29 20 26 26 20 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b 5e 28 | pes,.true).&&.Preg::isMatch('{^( |
7ee40 | 3f 50 3c 70 61 63 6b 61 67 65 3e 5c 53 2b 29 20 28 3f 50 3c 76 65 72 73 69 6f 6e 3e 5c 53 2b 29 | ?P<package>\S+).(?P<version>\S+) |
7ee60 | 20 28 3f 50 3c 74 79 70 65 3e 72 65 71 75 69 72 65 73 7c 63 6f 6e 66 6c 69 63 74 73 29 7d 27 2c | .(?P<type>requires|conflicts)}', |
7ee80 | 20 24 6d 65 73 73 61 67 65 2c 20 24 6d 29 29 20 7b 0a 24 74 65 6d 70 6c 61 74 65 20 3d 20 50 72 | .$message,.$m)).{.$template.=.Pr |
7eea0 | 65 67 3a 3a 72 65 70 6c 61 63 65 28 27 7b 5e 5c 53 2b 20 5c 53 2b 20 7d 27 2c 20 27 25 73 25 73 | eg::replace('{^\S+.\S+.}',.'%s%s |
7eec0 | 20 27 2c 20 24 6d 65 73 73 61 67 65 29 3b 0a 24 6d 65 73 73 61 67 65 73 5b 5d 20 3d 20 24 74 65 | .',.$message);.$messages[].=.$te |
7eee0 | 6d 70 6c 61 74 65 3b 0a 24 74 65 6d 70 6c 61 74 65 73 5b 24 74 65 6d 70 6c 61 74 65 5d 5b 24 6d | mplate;.$templates[$template][$m |
7ef00 | 5b 31 5d 5d 5b 24 70 61 72 73 65 72 2d 3e 6e 6f 72 6d 61 6c 69 7a 65 28 24 6d 5b 32 5d 29 5d 20 | [1]][$parser->normalize($m[2])]. |
7ef20 | 3d 20 24 6d 5b 32 5d 3b 0a 24 73 6f 75 72 63 65 50 61 63 6b 61 67 65 20 3d 20 24 72 75 6c 65 2d | =.$m[2];.$sourcePackage.=.$rule- |
7ef40 | 3e 67 65 74 53 6f 75 72 63 65 50 61 63 6b 61 67 65 28 24 70 6f 6f 6c 29 3b 0a 66 6f 72 65 61 63 | >getSourcePackage($pool);.foreac |
7ef60 | 68 20 28 24 70 6f 6f 6c 2d 3e 67 65 74 52 65 6d 6f 76 65 64 56 65 72 73 69 6f 6e 73 42 79 50 61 | h.($pool->getRemovedVersionsByPa |
7ef80 | 63 6b 61 67 65 28 73 70 6c 5f 6f 62 6a 65 63 74 5f 68 61 73 68 28 24 73 6f 75 72 63 65 50 61 63 | ckage(spl_object_hash($sourcePac |
7efa0 | 6b 61 67 65 29 29 20 61 73 20 24 76 65 72 73 69 6f 6e 20 3d 3e 20 24 70 72 65 74 74 79 56 65 72 | kage)).as.$version.=>.$prettyVer |
7efc0 | 73 69 6f 6e 29 20 7b 0a 24 74 65 6d 70 6c 61 74 65 73 5b 24 74 65 6d 70 6c 61 74 65 5d 5b 24 6d | sion).{.$templates[$template][$m |
7efe0 | 5b 31 5d 5d 5b 24 76 65 72 73 69 6f 6e 5d 20 3d 20 24 70 72 65 74 74 79 56 65 72 73 69 6f 6e 3b | [1]][$version].=.$prettyVersion; |
7f000 | 0a 7d 0a 7d 20 65 6c 73 65 69 66 20 28 24 6d 65 73 73 61 67 65 20 21 3d 3d 20 27 27 29 20 7b 0a | .}.}.elseif.($message.!==.'').{. |
7f020 | 24 6d 65 73 73 61 67 65 73 5b 5d 20 3d 20 24 6d 65 73 73 61 67 65 3b 0a 7d 0a 7d 0a 0a 24 72 65 | $messages[].=.$message;.}.}..$re |
7f040 | 73 75 6c 74 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 61 72 72 61 79 5f 75 6e 69 71 75 65 | sult.=.[];.foreach.(array_unique |
7f060 | 28 24 6d 65 73 73 61 67 65 73 29 20 61 73 20 24 6d 65 73 73 61 67 65 29 20 7b 0a 69 66 20 28 69 | ($messages).as.$message).{.if.(i |
7f080 | 73 73 65 74 28 24 74 65 6d 70 6c 61 74 65 73 5b 24 6d 65 73 73 61 67 65 5d 29 29 20 7b 0a 66 6f | sset($templates[$message])).{.fo |
7f0a0 | 72 65 61 63 68 20 28 24 74 65 6d 70 6c 61 74 65 73 5b 24 6d 65 73 73 61 67 65 5d 20 61 73 20 24 | reach.($templates[$message].as.$ |
7f0c0 | 70 61 63 6b 61 67 65 20 3d 3e 20 24 76 65 72 73 69 6f 6e 73 29 20 7b 0a 75 6b 73 6f 72 74 28 24 | package.=>.$versions).{.uksort($ |
7f0e0 | 76 65 72 73 69 6f 6e 73 2c 20 27 76 65 72 73 69 6f 6e 5f 63 6f 6d 70 61 72 65 27 29 3b 0a 69 66 | versions,.'version_compare');.if |
7f100 | 20 28 21 24 69 73 56 65 72 62 6f 73 65 29 20 7b 0a 24 76 65 72 73 69 6f 6e 73 20 3d 20 73 65 6c | .(!$isVerbose).{.$versions.=.sel |
7f120 | 66 3a 3a 63 6f 6e 64 65 6e 73 65 56 65 72 73 69 6f 6e 4c 69 73 74 28 24 76 65 72 73 69 6f 6e 73 | f::condenseVersionList($versions |
7f140 | 2c 20 31 29 3b 0a 7d 0a 69 66 20 28 63 6f 75 6e 74 28 24 76 65 72 73 69 6f 6e 73 29 20 3e 20 31 | ,.1);.}.if.(count($versions).>.1 |
7f160 | 29 20 7b 0a 0a 24 6d 65 73 73 61 67 65 20 3d 20 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 28 27 7b | ).{..$message.=.Preg::replace('{ |
7f180 | 5e 28 25 73 25 73 20 28 3f 3a 72 65 71 75 69 72 65 7c 63 6f 6e 66 6c 69 63 74 29 29 73 7d 27 2c | ^(%s%s.(?:require|conflict))s}', |
7f1a0 | 20 27 24 31 27 2c 20 24 6d 65 73 73 61 67 65 29 3b 0a 24 72 65 73 75 6c 74 5b 5d 20 3d 20 73 70 | .'$1',.$message);.$result[].=.sp |
7f1c0 | 72 69 6e 74 66 28 24 6d 65 73 73 61 67 65 2c 20 24 70 61 63 6b 61 67 65 2c 20 27 5b 27 2e 69 6d | rintf($message,.$package,.'['.im |
7f1e0 | 70 6c 6f 64 65 28 27 2c 20 27 2c 20 24 76 65 72 73 69 6f 6e 73 29 2e 27 5d 27 29 3b 0a 7d 20 65 | plode(',.',.$versions).']');.}.e |
7f200 | 6c 73 65 20 7b 0a 24 72 65 73 75 6c 74 5b 5d 20 3d 20 73 70 72 69 6e 74 66 28 24 6d 65 73 73 61 | lse.{.$result[].=.sprintf($messa |
7f220 | 67 65 2c 20 24 70 61 63 6b 61 67 65 2c 20 27 20 27 2e 72 65 73 65 74 28 24 76 65 72 73 69 6f 6e | ge,.$package,.'.'.reset($version |
7f240 | 73 29 29 3b 0a 7d 0a 7d 0a 7d 20 65 6c 73 65 20 7b 0a 24 72 65 73 75 6c 74 5b 5d 20 3d 20 24 6d | s));.}.}.}.else.{.$result[].=.$m |
7f260 | 65 73 73 61 67 65 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 22 5c 6e 24 69 6e 64 65 6e 74 2d 20 | essage;.}.}..return."\n$indent-. |
7f280 | 22 2e 69 6d 70 6c 6f 64 65 28 22 5c 6e 24 69 6e 64 65 6e 74 2d 20 22 2c 20 24 72 65 73 75 6c 74 | ".implode("\n$indent-.",.$result |
7f2a0 | 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 43 61 75 73 65 64 42 79 | );.}..public.function.isCausedBy |
7f2c0 | 4c 6f 63 6b 28 52 65 70 6f 73 69 74 6f 72 79 53 65 74 20 24 72 65 70 6f 73 69 74 6f 72 79 53 65 | Lock(RepositorySet.$repositorySe |
7f2e0 | 74 2c 20 52 65 71 75 65 73 74 20 24 72 65 71 75 65 73 74 2c 20 50 6f 6f 6c 20 24 70 6f 6f 6c 29 | t,.Request.$request,.Pool.$pool) |
7f300 | 3a 20 62 6f 6f 6c 0a 7b 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 72 65 61 73 6f 6e 73 | :.bool.{.foreach.($this->reasons |
7f320 | 20 61 73 20 24 73 65 63 74 69 6f 6e 52 75 6c 65 73 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 73 | .as.$sectionRules).{.foreach.($s |
7f340 | 65 63 74 69 6f 6e 52 75 6c 65 73 20 61 73 20 24 72 75 6c 65 29 20 7b 0a 69 66 20 28 24 72 75 6c | ectionRules.as.$rule).{.if.($rul |
7f360 | 65 2d 3e 69 73 43 61 75 73 65 64 42 79 4c 6f 63 6b 28 24 72 65 70 6f 73 69 74 6f 72 79 53 65 74 | e->isCausedByLock($repositorySet |
7f380 | 2c 20 24 72 65 71 75 65 73 74 2c 20 24 70 6f 6f 6c 29 29 20 7b 0a 72 65 74 75 72 6e 20 74 72 75 | ,.$request,.$pool)).{.return.tru |
7f3a0 | 65 3b 0a 7d 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a | e;.}.}.}..return.false;.}....... |
7f3c0 | 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 61 64 64 52 65 61 73 6f 6e 28 73 74 | .protected.function.addReason(st |
7f3e0 | 72 69 6e 67 20 24 69 64 2c 20 52 75 6c 65 20 24 72 65 61 73 6f 6e 29 3a 20 76 6f 69 64 0a 7b 0a | ring.$id,.Rule.$reason):.void.{. |
7f400 | 0a 0a 0a 69 66 20 28 21 69 73 73 65 74 28 24 74 68 69 73 2d 3e 72 65 61 73 6f 6e 53 65 65 6e 5b | ...if.(!isset($this->reasonSeen[ |
7f420 | 24 69 64 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 72 65 61 73 6f 6e 53 65 65 6e 5b 24 69 64 5d 20 | $id])).{.$this->reasonSeen[$id]. |
7f440 | 3d 20 74 72 75 65 3b 0a 24 74 68 69 73 2d 3e 72 65 61 73 6f 6e 73 5b 24 74 68 69 73 2d 3e 73 65 | =.true;.$this->reasons[$this->se |
7f460 | 63 74 69 6f 6e 5d 5b 5d 20 3d 20 24 72 65 61 73 6f 6e 3b 0a 7d 0a 7d 0a 0a 70 75 62 6c 69 63 20 | ction][].=.$reason;.}.}..public. |
7f480 | 66 75 6e 63 74 69 6f 6e 20 6e 65 78 74 53 65 63 74 69 6f 6e 28 29 3a 20 76 6f 69 64 0a 7b 0a 24 | function.nextSection():.void.{.$ |
7f4a0 | 74 68 69 73 2d 3e 73 65 63 74 69 6f 6e 2b 2b 3b 0a 7d 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 73 | this->section++;.}......public.s |
7f4c0 | 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 4d 69 73 73 69 6e 67 50 61 63 6b 61 67 65 | tatic.function.getMissingPackage |
7f4e0 | 52 65 61 73 6f 6e 28 52 65 70 6f 73 69 74 6f 72 79 53 65 74 20 24 72 65 70 6f 73 69 74 6f 72 79 | Reason(RepositorySet.$repository |
7f500 | 53 65 74 2c 20 52 65 71 75 65 73 74 20 24 72 65 71 75 65 73 74 2c 20 50 6f 6f 6c 20 24 70 6f 6f | Set,.Request.$request,.Pool.$poo |
7f520 | 6c 2c 20 62 6f 6f 6c 20 24 69 73 56 65 72 62 6f 73 65 2c 20 73 74 72 69 6e 67 20 24 70 61 63 6b | l,.bool.$isVerbose,.string.$pack |
7f540 | 61 67 65 4e 61 6d 65 2c 20 3f 43 6f 6e 73 74 72 61 69 6e 74 49 6e 74 65 72 66 61 63 65 20 24 63 | ageName,.?ConstraintInterface.$c |
7f560 | 6f 6e 73 74 72 61 69 6e 74 20 3d 20 6e 75 6c 6c 29 3a 20 61 72 72 61 79 0a 7b 0a 69 66 20 28 50 | onstraint.=.null):.array.{.if.(P |
7f580 | 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 3a 3a 69 73 50 6c 61 74 66 6f 72 6d 50 61 63 | latformRepository::isPlatformPac |
7f5a0 | 6b 61 67 65 28 24 70 61 63 6b 61 67 65 4e 61 6d 65 29 29 20 7b 0a 0a 69 66 20 28 30 20 3d 3d 3d | kage($packageName)).{..if.(0.=== |
7f5c0 | 20 73 74 72 69 70 6f 73 28 24 70 61 63 6b 61 67 65 4e 61 6d 65 2c 20 27 70 68 70 27 29 20 7c 7c | .stripos($packageName,.'php').|| |
7f5e0 | 20 24 70 61 63 6b 61 67 65 4e 61 6d 65 20 3d 3d 3d 20 27 68 68 76 6d 27 29 20 7b 0a 24 76 65 72 | .$packageName.===.'hhvm').{.$ver |
7f600 | 73 69 6f 6e 20 3d 20 73 65 6c 66 3a 3a 67 65 74 50 6c 61 74 66 6f 72 6d 50 61 63 6b 61 67 65 56 | sion.=.self::getPlatformPackageV |
7f620 | 65 72 73 69 6f 6e 28 24 70 6f 6f 6c 2c 20 24 70 61 63 6b 61 67 65 4e 61 6d 65 2c 20 70 68 70 76 | ersion($pool,.$packageName,.phpv |
7f640 | 65 72 73 69 6f 6e 28 29 29 3b 0a 0a 24 6d 73 67 20 3d 20 22 2d 20 52 6f 6f 74 20 63 6f 6d 70 6f | ersion());..$msg.=."-.Root.compo |
7f660 | 73 65 72 2e 6a 73 6f 6e 20 72 65 71 75 69 72 65 73 20 22 2e 24 70 61 63 6b 61 67 65 4e 61 6d 65 | ser.json.requires.".$packageName |
7f680 | 2e 73 65 6c 66 3a 3a 63 6f 6e 73 74 72 61 69 6e 74 54 6f 54 65 78 74 28 24 63 6f 6e 73 74 72 61 | .self::constraintToText($constra |
7f6a0 | 69 6e 74 29 2e 27 20 62 75 74 20 27 3b 0a 0a 69 66 20 28 64 65 66 69 6e 65 64 28 27 48 48 56 4d | int).'.but.';..if.(defined('HHVM |
7f6c0 | 5f 56 45 52 53 49 4f 4e 27 29 20 7c 7c 20 28 24 70 61 63 6b 61 67 65 4e 61 6d 65 20 3d 3d 3d 20 | _VERSION').||.($packageName.===. |
7f6e0 | 27 68 68 76 6d 27 20 26 26 20 63 6f 75 6e 74 28 24 70 6f 6f 6c 2d 3e 77 68 61 74 50 72 6f 76 69 | 'hhvm'.&&.count($pool->whatProvi |
7f700 | 64 65 73 28 24 70 61 63 6b 61 67 65 4e 61 6d 65 29 29 20 3e 20 30 29 29 20 7b 0a 72 65 74 75 72 | des($packageName)).>.0)).{.retur |
7f720 | 6e 20 5b 24 6d 73 67 2c 20 27 79 6f 75 72 20 48 48 56 4d 20 76 65 72 73 69 6f 6e 20 64 6f 65 73 | n.[$msg,.'your.HHVM.version.does |
7f740 | 20 6e 6f 74 20 73 61 74 69 73 66 79 20 74 68 61 74 20 72 65 71 75 69 72 65 6d 65 6e 74 2e 27 5d | .not.satisfy.that.requirement.'] |
7f760 | 3b 0a 7d 0a 0a 69 66 20 28 24 70 61 63 6b 61 67 65 4e 61 6d 65 20 3d 3d 3d 20 27 68 68 76 6d 27 | ;.}..if.($packageName.===.'hhvm' |
7f780 | 29 20 7b 0a 72 65 74 75 72 6e 20 5b 24 6d 73 67 2c 20 27 48 48 56 4d 20 77 61 73 20 6e 6f 74 20 | ).{.return.[$msg,.'HHVM.was.not. |
7f7a0 | 64 65 74 65 63 74 65 64 20 6f 6e 20 74 68 69 73 20 6d 61 63 68 69 6e 65 2c 20 6d 61 6b 65 20 73 | detected.on.this.machine,.make.s |
7f7c0 | 75 72 65 20 69 74 20 69 73 20 69 6e 20 79 6f 75 72 20 50 41 54 48 2e 27 5d 3b 0a 7d 0a 0a 69 66 | ure.it.is.in.your.PATH.'];.}..if |
7f7e0 | 20 28 6e 75 6c 6c 20 3d 3d 3d 20 24 76 65 72 73 69 6f 6e 29 20 7b 0a 72 65 74 75 72 6e 20 5b 24 | .(null.===.$version).{.return.[$ |
7f800 | 6d 73 67 2c 20 27 74 68 65 20 27 2e 24 70 61 63 6b 61 67 65 4e 61 6d 65 2e 27 20 70 61 63 6b 61 | msg,.'the.'.$packageName.'.packa |
7f820 | 67 65 20 69 73 20 64 69 73 61 62 6c 65 64 20 62 79 20 79 6f 75 72 20 70 6c 61 74 66 6f 72 6d 20 | ge.is.disabled.by.your.platform. |
7f840 | 63 6f 6e 66 69 67 2e 20 45 6e 61 62 6c 65 20 69 74 20 61 67 61 69 6e 20 77 69 74 68 20 22 63 6f | config..Enable.it.again.with."co |
7f860 | 6d 70 6f 73 65 72 20 63 6f 6e 66 69 67 20 70 6c 61 74 66 6f 72 6d 2e 27 2e 24 70 61 63 6b 61 67 | mposer.config.platform.'.$packag |
7f880 | 65 4e 61 6d 65 2e 27 20 2d 2d 75 6e 73 65 74 22 2e 27 5d 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 5b | eName.'.--unset".'];.}..return.[ |
7f8a0 | 24 6d 73 67 2c 20 27 79 6f 75 72 20 27 2e 24 70 61 63 6b 61 67 65 4e 61 6d 65 2e 27 20 76 65 72 | $msg,.'your.'.$packageName.'.ver |
7f8c0 | 73 69 6f 6e 20 28 27 2e 20 24 76 65 72 73 69 6f 6e 20 2e 27 29 20 64 6f 65 73 20 6e 6f 74 20 73 | sion.('..$version..').does.not.s |
7f8e0 | 61 74 69 73 66 79 20 74 68 61 74 20 72 65 71 75 69 72 65 6d 65 6e 74 2e 27 5d 3b 0a 7d 0a 0a 0a | atisfy.that.requirement.'];.}... |
7f900 | 69 66 20 28 30 20 3d 3d 3d 20 73 74 72 69 70 6f 73 28 24 70 61 63 6b 61 67 65 4e 61 6d 65 2c 20 | if.(0.===.stripos($packageName,. |
7f920 | 27 65 78 74 2d 27 29 29 20 7b 0a 69 66 20 28 66 61 6c 73 65 20 21 3d 3d 20 73 74 72 70 6f 73 28 | 'ext-')).{.if.(false.!==.strpos( |
7f940 | 24 70 61 63 6b 61 67 65 4e 61 6d 65 2c 20 27 20 27 29 29 20 7b 0a 72 65 74 75 72 6e 20 5b 27 2d | $packageName,.'.')).{.return.['- |
7f960 | 20 27 2c 20 22 50 48 50 20 65 78 74 65 6e 73 69 6f 6e 20 22 2e 24 70 61 63 6b 61 67 65 4e 61 6d | .',."PHP.extension.".$packageNam |
7f980 | 65 2e 27 20 73 68 6f 75 6c 64 20 62 65 20 72 65 71 75 69 72 65 64 20 61 73 20 27 2e 73 74 72 5f | e.'.should.be.required.as.'.str_ |
7f9a0 | 72 65 70 6c 61 63 65 28 27 20 27 2c 20 27 2d 27 2c 20 24 70 61 63 6b 61 67 65 4e 61 6d 65 29 2e | replace('.',.'-',.$packageName). |
7f9c0 | 27 2e 27 5d 3b 0a 7d 0a 0a 24 65 78 74 20 3d 20 73 75 62 73 74 72 28 24 70 61 63 6b 61 67 65 4e | '.'];.}..$ext.=.substr($packageN |
7f9e0 | 61 6d 65 2c 20 34 29 3b 0a 24 6d 73 67 20 3d 20 22 2d 20 52 6f 6f 74 20 63 6f 6d 70 6f 73 65 72 | ame,.4);.$msg.=."-.Root.composer |
7fa00 | 2e 6a 73 6f 6e 20 72 65 71 75 69 72 65 73 20 50 48 50 20 65 78 74 65 6e 73 69 6f 6e 20 22 2e 24 | .json.requires.PHP.extension.".$ |
7fa20 | 70 61 63 6b 61 67 65 4e 61 6d 65 2e 73 65 6c 66 3a 3a 63 6f 6e 73 74 72 61 69 6e 74 54 6f 54 65 | packageName.self::constraintToTe |
7fa40 | 78 74 28 24 63 6f 6e 73 74 72 61 69 6e 74 29 2e 27 20 62 75 74 20 27 3b 0a 0a 24 76 65 72 73 69 | xt($constraint).'.but.';..$versi |
7fa60 | 6f 6e 20 3d 20 73 65 6c 66 3a 3a 67 65 74 50 6c 61 74 66 6f 72 6d 50 61 63 6b 61 67 65 56 65 72 | on.=.self::getPlatformPackageVer |
7fa80 | 73 69 6f 6e 28 24 70 6f 6f 6c 2c 20 24 70 61 63 6b 61 67 65 4e 61 6d 65 2c 20 70 68 70 76 65 72 | sion($pool,.$packageName,.phpver |
7faa0 | 73 69 6f 6e 28 24 65 78 74 29 20 3f 3a 20 27 30 27 29 3b 0a 69 66 20 28 6e 75 6c 6c 20 3d 3d 3d | sion($ext).?:.'0');.if.(null.=== |
7fac0 | 20 24 76 65 72 73 69 6f 6e 29 20 7b 0a 69 66 20 28 65 78 74 65 6e 73 69 6f 6e 5f 6c 6f 61 64 65 | .$version).{.if.(extension_loade |
7fae0 | 64 28 24 65 78 74 29 29 20 7b 0a 72 65 74 75 72 6e 20 5b 0a 24 6d 73 67 2c 0a 27 74 68 65 20 27 | d($ext)).{.return.[.$msg,.'the.' |
7fb00 | 2e 24 70 61 63 6b 61 67 65 4e 61 6d 65 2e 27 20 70 61 63 6b 61 67 65 20 69 73 20 64 69 73 61 62 | .$packageName.'.package.is.disab |
7fb20 | 6c 65 64 20 62 79 20 79 6f 75 72 20 70 6c 61 74 66 6f 72 6d 20 63 6f 6e 66 69 67 2e 20 45 6e 61 | led.by.your.platform.config..Ena |
7fb40 | 62 6c 65 20 69 74 20 61 67 61 69 6e 20 77 69 74 68 20 22 63 6f 6d 70 6f 73 65 72 20 63 6f 6e 66 | ble.it.again.with."composer.conf |
7fb60 | 69 67 20 70 6c 61 74 66 6f 72 6d 2e 27 2e 24 70 61 63 6b 61 67 65 4e 61 6d 65 2e 27 20 2d 2d 75 | ig.platform.'.$packageName.'.--u |
7fb80 | 6e 73 65 74 22 2e 27 2c 0a 5d 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 5b 24 6d 73 67 2c 20 27 69 74 | nset".',.];.}..return.[$msg,.'it |
7fba0 | 20 69 73 20 6d 69 73 73 69 6e 67 20 66 72 6f 6d 20 79 6f 75 72 20 73 79 73 74 65 6d 2e 20 49 6e | .is.missing.from.your.system..In |
7fbc0 | 73 74 61 6c 6c 20 6f 72 20 65 6e 61 62 6c 65 20 50 48 50 5c 27 73 20 27 2e 24 65 78 74 2e 27 20 | stall.or.enable.PHP\'s.'.$ext.'. |
7fbe0 | 65 78 74 65 6e 73 69 6f 6e 2e 27 5d 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 5b 24 6d 73 67 2c 20 27 | extension.'];.}..return.[$msg,.' |
7fc00 | 69 74 20 68 61 73 20 74 68 65 20 77 72 6f 6e 67 20 76 65 72 73 69 6f 6e 20 69 6e 73 74 61 6c 6c | it.has.the.wrong.version.install |
7fc20 | 65 64 20 28 27 2e 24 76 65 72 73 69 6f 6e 2e 27 29 2e 27 5d 3b 0a 7d 0a 0a 0a 69 66 20 28 30 20 | ed.('.$version.').'];.}...if.(0. |
7fc40 | 3d 3d 3d 20 73 74 72 69 70 6f 73 28 24 70 61 63 6b 61 67 65 4e 61 6d 65 2c 20 27 6c 69 62 2d 27 | ===.stripos($packageName,.'lib-' |
7fc60 | 29 29 20 7b 0a 69 66 20 28 73 74 72 74 6f 6c 6f 77 65 72 28 24 70 61 63 6b 61 67 65 4e 61 6d 65 | )).{.if.(strtolower($packageName |
7fc80 | 29 20 3d 3d 3d 20 27 6c 69 62 2d 69 63 75 27 29 20 7b 0a 24 65 72 72 6f 72 20 3d 20 65 78 74 65 | ).===.'lib-icu').{.$error.=.exte |
7fca0 | 6e 73 69 6f 6e 5f 6c 6f 61 64 65 64 28 27 69 6e 74 6c 27 29 20 3f 20 27 69 74 20 68 61 73 20 74 | nsion_loaded('intl').?.'it.has.t |
7fcc0 | 68 65 20 77 72 6f 6e 67 20 76 65 72 73 69 6f 6e 20 69 6e 73 74 61 6c 6c 65 64 2c 20 74 72 79 20 | he.wrong.version.installed,.try. |
7fce0 | 75 70 67 72 61 64 69 6e 67 20 74 68 65 20 69 6e 74 6c 20 65 78 74 65 6e 73 69 6f 6e 2e 27 20 3a | upgrading.the.intl.extension.'.: |
7fd00 | 20 27 69 74 20 69 73 20 6d 69 73 73 69 6e 67 20 66 72 6f 6d 20 79 6f 75 72 20 73 79 73 74 65 6d | .'it.is.missing.from.your.system |
7fd20 | 2c 20 6d 61 6b 65 20 73 75 72 65 20 74 68 65 20 69 6e 74 6c 20 65 78 74 65 6e 73 69 6f 6e 20 69 | ,.make.sure.the.intl.extension.i |
7fd40 | 73 20 6c 6f 61 64 65 64 2e 27 3b 0a 0a 72 65 74 75 72 6e 20 5b 22 2d 20 52 6f 6f 74 20 63 6f 6d | s.loaded.';..return.["-.Root.com |
7fd60 | 70 6f 73 65 72 2e 6a 73 6f 6e 20 72 65 71 75 69 72 65 73 20 6c 69 6e 6b 65 64 20 6c 69 62 72 61 | poser.json.requires.linked.libra |
7fd80 | 72 79 20 22 2e 24 70 61 63 6b 61 67 65 4e 61 6d 65 2e 73 65 6c 66 3a 3a 63 6f 6e 73 74 72 61 69 | ry.".$packageName.self::constrai |
7fda0 | 6e 74 54 6f 54 65 78 74 28 24 63 6f 6e 73 74 72 61 69 6e 74 29 2e 27 20 62 75 74 20 27 2c 20 24 | ntToText($constraint).'.but.',.$ |
7fdc0 | 65 72 72 6f 72 5d 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 5b 22 2d 20 52 6f 6f 74 20 63 6f 6d 70 6f | error];.}..return.["-.Root.compo |
7fde0 | 73 65 72 2e 6a 73 6f 6e 20 72 65 71 75 69 72 65 73 20 6c 69 6e 6b 65 64 20 6c 69 62 72 61 72 79 | ser.json.requires.linked.library |
7fe00 | 20 22 2e 24 70 61 63 6b 61 67 65 4e 61 6d 65 2e 73 65 6c 66 3a 3a 63 6f 6e 73 74 72 61 69 6e 74 | .".$packageName.self::constraint |
7fe20 | 54 6f 54 65 78 74 28 24 63 6f 6e 73 74 72 61 69 6e 74 29 2e 27 20 62 75 74 20 27 2c 20 27 69 74 | ToText($constraint).'.but.',.'it |
7fe40 | 20 68 61 73 20 74 68 65 20 77 72 6f 6e 67 20 76 65 72 73 69 6f 6e 20 69 6e 73 74 61 6c 6c 65 64 | .has.the.wrong.version.installed |
7fe60 | 20 6f 72 20 69 73 20 6d 69 73 73 69 6e 67 20 66 72 6f 6d 20 79 6f 75 72 20 73 79 73 74 65 6d 2c | .or.is.missing.from.your.system, |
7fe80 | 20 6d 61 6b 65 20 73 75 72 65 20 74 6f 20 6c 6f 61 64 20 74 68 65 20 65 78 74 65 6e 73 69 6f 6e | .make.sure.to.load.the.extension |
7fea0 | 20 70 72 6f 76 69 64 69 6e 67 20 69 74 2e 27 5d 3b 0a 7d 0a 7d 0a 0a 24 6c 6f 63 6b 65 64 50 61 | .providing.it.'];.}.}..$lockedPa |
7fec0 | 63 6b 61 67 65 20 3d 20 6e 75 6c 6c 3b 0a 66 6f 72 65 61 63 68 20 28 24 72 65 71 75 65 73 74 2d | ckage.=.null;.foreach.($request- |
7fee0 | 3e 67 65 74 4c 6f 63 6b 65 64 50 61 63 6b 61 67 65 73 28 29 20 61 73 20 24 70 61 63 6b 61 67 65 | >getLockedPackages().as.$package |
7ff00 | 29 20 7b 0a 69 66 20 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 20 3d 3d 3d 20 | ).{.if.($package->getName().===. |
7ff20 | 24 70 61 63 6b 61 67 65 4e 61 6d 65 29 20 7b 0a 24 6c 6f 63 6b 65 64 50 61 63 6b 61 67 65 20 3d | $packageName).{.$lockedPackage.= |
7ff40 | 20 24 70 61 63 6b 61 67 65 3b 0a 69 66 20 28 24 70 6f 6f 6c 2d 3e 69 73 55 6e 61 63 63 65 70 74 | .$package;.if.($pool->isUnaccept |
7ff60 | 61 62 6c 65 46 69 78 65 64 4f 72 4c 6f 63 6b 65 64 50 61 63 6b 61 67 65 28 24 70 61 63 6b 61 67 | ableFixedOrLockedPackage($packag |
7ff80 | 65 29 29 20 7b 0a 72 65 74 75 72 6e 20 5b 22 2d 20 22 2c 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 | e)).{.return.["-.",.$package->ge |
7ffa0 | 74 50 72 65 74 74 79 4e 61 6d 65 28 29 2e 27 20 69 73 20 66 69 78 65 64 20 74 6f 20 27 2e 24 70 | tPrettyName().'.is.fixed.to.'.$p |
7ffc0 | 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 2e 27 20 28 6c 6f | ackage->getPrettyVersion().'.(lo |
7ffe0 | 63 6b 20 66 69 6c 65 20 76 65 72 73 69 6f 6e 29 20 62 79 20 61 20 70 61 72 74 69 61 6c 20 75 70 | ck.file.version).by.a.partial.up |
80000 | 64 61 74 65 20 62 75 74 20 74 68 61 74 20 76 65 72 73 69 6f 6e 20 69 73 20 72 65 6a 65 63 74 65 | date.but.that.version.is.rejecte |
80020 | 64 20 62 79 20 79 6f 75 72 20 6d 69 6e 69 6d 75 6d 2d 73 74 61 62 69 6c 69 74 79 2e 20 4d 61 6b | d.by.your.minimum-stability..Mak |
80040 | 65 20 73 75 72 65 20 79 6f 75 20 6c 69 73 74 20 69 74 20 61 73 20 61 6e 20 61 72 67 75 6d 65 6e | e.sure.you.list.it.as.an.argumen |
80060 | 74 20 66 6f 72 20 74 68 65 20 75 70 64 61 74 65 20 63 6f 6d 6d 61 6e 64 2e 27 5d 3b 0a 7d 0a 62 | t.for.the.update.command.'];.}.b |
80080 | 72 65 61 6b 3b 0a 7d 0a 7d 0a 0a 0a 0a 69 66 20 28 24 70 61 63 6b 61 67 65 73 20 3d 20 24 72 65 | reak;.}.}....if.($packages.=.$re |
800a0 | 70 6f 73 69 74 6f 72 79 53 65 74 2d 3e 66 69 6e 64 50 61 63 6b 61 67 65 73 28 24 70 61 63 6b 61 | positorySet->findPackages($packa |
800c0 | 67 65 4e 61 6d 65 2c 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 29 20 7b 0a 24 72 6f 6f 74 52 65 71 | geName,.$constraint)).{.$rootReq |
800e0 | 73 20 3d 20 24 72 65 70 6f 73 69 74 6f 72 79 53 65 74 2d 3e 67 65 74 52 6f 6f 74 52 65 71 75 69 | s.=.$repositorySet->getRootRequi |
80100 | 72 65 73 28 29 3b 0a 69 66 20 28 69 73 73 65 74 28 24 72 6f 6f 74 52 65 71 73 5b 24 70 61 63 6b | res();.if.(isset($rootReqs[$pack |
80120 | 61 67 65 4e 61 6d 65 5d 29 29 20 7b 0a 24 66 69 6c 74 65 72 65 64 20 3d 20 61 72 72 61 79 5f 66 | ageName])).{.$filtered.=.array_f |
80140 | 69 6c 74 65 72 28 24 70 61 63 6b 61 67 65 73 2c 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e | ilter($packages,.static.function |
80160 | 20 28 24 70 29 20 75 73 65 20 28 24 72 6f 6f 74 52 65 71 73 2c 20 24 70 61 63 6b 61 67 65 4e 61 | .($p).use.($rootReqs,.$packageNa |
80180 | 6d 65 29 3a 20 62 6f 6f 6c 20 7b 0a 72 65 74 75 72 6e 20 24 72 6f 6f 74 52 65 71 73 5b 24 70 61 | me):.bool.{.return.$rootReqs[$pa |
801a0 | 63 6b 61 67 65 4e 61 6d 65 5d 2d 3e 6d 61 74 63 68 65 73 28 6e 65 77 20 43 6f 6e 73 74 72 61 69 | ckageName]->matches(new.Constrai |
801c0 | 6e 74 28 27 3d 3d 27 2c 20 24 70 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 29 29 3b 0a 7d 29 3b | nt('==',.$p->getVersion()));.}); |
801e0 | 0a 69 66 20 28 30 20 3d 3d 3d 20 63 6f 75 6e 74 28 24 66 69 6c 74 65 72 65 64 29 29 20 7b 0a 72 | .if.(0.===.count($filtered)).{.r |
80200 | 65 74 75 72 6e 20 5b 22 2d 20 52 6f 6f 74 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 20 72 65 71 | eturn.["-.Root.composer.json.req |
80220 | 75 69 72 65 73 20 24 70 61 63 6b 61 67 65 4e 61 6d 65 22 2e 73 65 6c 66 3a 3a 63 6f 6e 73 74 72 | uires.$packageName".self::constr |
80240 | 61 69 6e 74 54 6f 54 65 78 74 28 24 63 6f 6e 73 74 72 61 69 6e 74 29 20 2e 20 27 2c 20 27 2c 20 | aintToText($constraint)...',.',. |
80260 | 27 66 6f 75 6e 64 20 27 2e 73 65 6c 66 3a 3a 67 65 74 50 61 63 6b 61 67 65 4c 69 73 74 28 24 70 | 'found.'.self::getPackageList($p |
80280 | 61 63 6b 61 67 65 73 2c 20 24 69 73 56 65 72 62 6f 73 65 2c 20 24 70 6f 6f 6c 2c 20 24 63 6f 6e | ackages,.$isVerbose,.$pool,.$con |
802a0 | 73 74 72 61 69 6e 74 29 2e 27 20 62 75 74 20 27 2e 28 73 65 6c 66 3a 3a 68 61 73 4d 75 6c 74 69 | straint).'.but.'.(self::hasMulti |
802c0 | 70 6c 65 4e 61 6d 65 73 28 24 70 61 63 6b 61 67 65 73 29 20 3f 20 27 74 68 65 73 65 20 63 6f 6e | pleNames($packages).?.'these.con |
802e0 | 66 6c 69 63 74 27 20 3a 20 27 69 74 20 63 6f 6e 66 6c 69 63 74 73 27 29 2e 27 20 77 69 74 68 20 | flict'.:.'it.conflicts').'.with. |
80300 | 79 6f 75 72 20 72 6f 6f 74 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 20 72 65 71 75 69 72 65 20 | your.root.composer.json.require. |
80320 | 28 27 2e 24 72 6f 6f 74 52 65 71 73 5b 24 70 61 63 6b 61 67 65 4e 61 6d 65 5d 2d 3e 67 65 74 50 | ('.$rootReqs[$packageName]->getP |
80340 | 72 65 74 74 79 53 74 72 69 6e 67 28 29 2e 27 29 2e 27 5d 3b 0a 7d 0a 7d 0a 0a 24 74 65 6d 70 52 | rettyString().').'];.}.}..$tempR |
80360 | 65 71 73 20 3d 20 24 72 65 70 6f 73 69 74 6f 72 79 53 65 74 2d 3e 67 65 74 54 65 6d 70 6f 72 61 | eqs.=.$repositorySet->getTempora |
80380 | 72 79 43 6f 6e 73 74 72 61 69 6e 74 73 28 29 3b 0a 69 66 20 28 69 73 73 65 74 28 24 74 65 6d 70 | ryConstraints();.if.(isset($temp |
803a0 | 52 65 71 73 5b 24 70 61 63 6b 61 67 65 4e 61 6d 65 5d 29 29 20 7b 0a 24 66 69 6c 74 65 72 65 64 | Reqs[$packageName])).{.$filtered |
803c0 | 20 3d 20 61 72 72 61 79 5f 66 69 6c 74 65 72 28 24 70 61 63 6b 61 67 65 73 2c 20 73 74 61 74 69 | .=.array_filter($packages,.stati |
803e0 | 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 70 29 20 75 73 65 20 28 24 74 65 6d 70 52 65 71 73 2c 20 | c.function.($p).use.($tempReqs,. |
80400 | 24 70 61 63 6b 61 67 65 4e 61 6d 65 29 3a 20 62 6f 6f 6c 20 7b 0a 72 65 74 75 72 6e 20 24 74 65 | $packageName):.bool.{.return.$te |
80420 | 6d 70 52 65 71 73 5b 24 70 61 63 6b 61 67 65 4e 61 6d 65 5d 2d 3e 6d 61 74 63 68 65 73 28 6e 65 | mpReqs[$packageName]->matches(ne |
80440 | 77 20 43 6f 6e 73 74 72 61 69 6e 74 28 27 3d 3d 27 2c 20 24 70 2d 3e 67 65 74 56 65 72 73 69 6f | w.Constraint('==',.$p->getVersio |
80460 | 6e 28 29 29 29 3b 0a 7d 29 3b 0a 69 66 20 28 30 20 3d 3d 3d 20 63 6f 75 6e 74 28 24 66 69 6c 74 | n()));.});.if.(0.===.count($filt |
80480 | 65 72 65 64 29 29 20 7b 0a 72 65 74 75 72 6e 20 5b 22 2d 20 52 6f 6f 74 20 63 6f 6d 70 6f 73 65 | ered)).{.return.["-.Root.compose |
804a0 | 72 2e 6a 73 6f 6e 20 72 65 71 75 69 72 65 73 20 24 70 61 63 6b 61 67 65 4e 61 6d 65 22 2e 73 65 | r.json.requires.$packageName".se |
804c0 | 6c 66 3a 3a 63 6f 6e 73 74 72 61 69 6e 74 54 6f 54 65 78 74 28 24 63 6f 6e 73 74 72 61 69 6e 74 | lf::constraintToText($constraint |
804e0 | 29 20 2e 20 27 2c 20 27 2c 20 27 66 6f 75 6e 64 20 27 2e 73 65 6c 66 3a 3a 67 65 74 50 61 63 6b | )...',.',.'found.'.self::getPack |
80500 | 61 67 65 4c 69 73 74 28 24 70 61 63 6b 61 67 65 73 2c 20 24 69 73 56 65 72 62 6f 73 65 2c 20 24 | ageList($packages,.$isVerbose,.$ |
80520 | 70 6f 6f 6c 2c 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 2e 27 20 62 75 74 20 27 2e 28 73 65 6c 66 | pool,.$constraint).'.but.'.(self |
80540 | 3a 3a 68 61 73 4d 75 6c 74 69 70 6c 65 4e 61 6d 65 73 28 24 70 61 63 6b 61 67 65 73 29 20 3f 20 | ::hasMultipleNames($packages).?. |
80560 | 27 74 68 65 73 65 20 63 6f 6e 66 6c 69 63 74 27 20 3a 20 27 69 74 20 63 6f 6e 66 6c 69 63 74 73 | 'these.conflict'.:.'it.conflicts |
80580 | 27 29 2e 27 20 77 69 74 68 20 79 6f 75 72 20 74 65 6d 70 6f 72 61 72 79 20 75 70 64 61 74 65 20 | ').'.with.your.temporary.update. |
805a0 | 63 6f 6e 73 74 72 61 69 6e 74 20 28 27 2e 24 70 61 63 6b 61 67 65 4e 61 6d 65 2e 27 3a 27 2e 24 | constraint.('.$packageName.':'.$ |
805c0 | 74 65 6d 70 52 65 71 73 5b 24 70 61 63 6b 61 67 65 4e 61 6d 65 5d 2d 3e 67 65 74 50 72 65 74 74 | tempReqs[$packageName]->getPrett |
805e0 | 79 53 74 72 69 6e 67 28 29 2e 27 29 2e 27 5d 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 24 6c 6f 63 6b 65 | yString().').'];.}.}..if.($locke |
80600 | 64 50 61 63 6b 61 67 65 29 20 7b 0a 24 66 69 78 65 64 43 6f 6e 73 74 72 61 69 6e 74 20 3d 20 6e | dPackage).{.$fixedConstraint.=.n |
80620 | 65 77 20 43 6f 6e 73 74 72 61 69 6e 74 28 27 3d 3d 27 2c 20 24 6c 6f 63 6b 65 64 50 61 63 6b 61 | ew.Constraint('==',.$lockedPacka |
80640 | 67 65 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 29 3b 0a 24 66 69 6c 74 65 72 65 64 20 3d 20 61 | ge->getVersion());.$filtered.=.a |
80660 | 72 72 61 79 5f 66 69 6c 74 65 72 28 24 70 61 63 6b 61 67 65 73 2c 20 73 74 61 74 69 63 20 66 75 | rray_filter($packages,.static.fu |
80680 | 6e 63 74 69 6f 6e 20 28 24 70 29 20 75 73 65 20 28 24 66 69 78 65 64 43 6f 6e 73 74 72 61 69 6e | nction.($p).use.($fixedConstrain |
806a0 | 74 29 3a 20 62 6f 6f 6c 20 7b 0a 72 65 74 75 72 6e 20 24 66 69 78 65 64 43 6f 6e 73 74 72 61 69 | t):.bool.{.return.$fixedConstrai |
806c0 | 6e 74 2d 3e 6d 61 74 63 68 65 73 28 6e 65 77 20 43 6f 6e 73 74 72 61 69 6e 74 28 27 3d 3d 27 2c | nt->matches(new.Constraint('==', |
806e0 | 20 24 70 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 29 29 3b 0a 7d 29 3b 0a 69 66 20 28 30 20 3d | .$p->getVersion()));.});.if.(0.= |
80700 | 3d 3d 20 63 6f 75 6e 74 28 24 66 69 6c 74 65 72 65 64 29 29 20 7b 0a 72 65 74 75 72 6e 20 5b 22 | ==.count($filtered)).{.return.[" |
80720 | 2d 20 52 6f 6f 74 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 20 72 65 71 75 69 72 65 73 20 24 70 | -.Root.composer.json.requires.$p |
80740 | 61 63 6b 61 67 65 4e 61 6d 65 22 2e 73 65 6c 66 3a 3a 63 6f 6e 73 74 72 61 69 6e 74 54 6f 54 65 | ackageName".self::constraintToTe |
80760 | 78 74 28 24 63 6f 6e 73 74 72 61 69 6e 74 29 20 2e 20 27 2c 20 27 2c 20 27 66 6f 75 6e 64 20 27 | xt($constraint)...',.',.'found.' |
80780 | 2e 73 65 6c 66 3a 3a 67 65 74 50 61 63 6b 61 67 65 4c 69 73 74 28 24 70 61 63 6b 61 67 65 73 2c | .self::getPackageList($packages, |
807a0 | 20 24 69 73 56 65 72 62 6f 73 65 2c 20 24 70 6f 6f 6c 2c 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 | .$isVerbose,.$pool,.$constraint) |
807c0 | 2e 27 20 62 75 74 20 74 68 65 20 70 61 63 6b 61 67 65 20 69 73 20 66 69 78 65 64 20 74 6f 20 27 | .'.but.the.package.is.fixed.to.' |
807e0 | 2e 24 6c 6f 63 6b 65 64 50 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 56 65 72 73 69 6f | .$lockedPackage->getPrettyVersio |
80800 | 6e 28 29 2e 27 20 28 6c 6f 63 6b 20 66 69 6c 65 20 76 65 72 73 69 6f 6e 29 20 62 79 20 61 20 70 | n().'.(lock.file.version).by.a.p |
80820 | 61 72 74 69 61 6c 20 75 70 64 61 74 65 20 61 6e 64 20 74 68 61 74 20 76 65 72 73 69 6f 6e 20 64 | artial.update.and.that.version.d |
80840 | 6f 65 73 20 6e 6f 74 20 6d 61 74 63 68 2e 20 4d 61 6b 65 20 73 75 72 65 20 79 6f 75 20 6c 69 73 | oes.not.match..Make.sure.you.lis |
80860 | 74 20 69 74 20 61 73 20 61 6e 20 61 72 67 75 6d 65 6e 74 20 66 6f 72 20 74 68 65 20 75 70 64 61 | t.it.as.an.argument.for.the.upda |
80880 | 74 65 20 63 6f 6d 6d 61 6e 64 2e 27 5d 3b 0a 7d 0a 7d 0a 0a 24 6e 6f 6e 4c 6f 63 6b 65 64 50 61 | te.command.'];.}.}..$nonLockedPa |
808a0 | 63 6b 61 67 65 73 20 3d 20 61 72 72 61 79 5f 66 69 6c 74 65 72 28 24 70 61 63 6b 61 67 65 73 2c | ckages.=.array_filter($packages, |
808c0 | 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 70 29 3a 20 62 6f 6f 6c 20 7b 0a 72 65 | .static.function.($p):.bool.{.re |
808e0 | 74 75 72 6e 20 21 24 70 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 79 28 29 20 69 6e 73 74 61 6e | turn.!$p->getRepository().instan |
80900 | 63 65 6f 66 20 4c 6f 63 6b 41 72 72 61 79 52 65 70 6f 73 69 74 6f 72 79 3b 0a 7d 29 3b 0a 0a 69 | ceof.LockArrayRepository;.});..i |
80920 | 66 20 28 21 24 6e 6f 6e 4c 6f 63 6b 65 64 50 61 63 6b 61 67 65 73 29 20 7b 0a 72 65 74 75 72 6e | f.(!$nonLockedPackages).{.return |
80940 | 20 5b 22 2d 20 52 6f 6f 74 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 20 72 65 71 75 69 72 65 73 | .["-.Root.composer.json.requires |
80960 | 20 24 70 61 63 6b 61 67 65 4e 61 6d 65 22 2e 73 65 6c 66 3a 3a 63 6f 6e 73 74 72 61 69 6e 74 54 | .$packageName".self::constraintT |
80980 | 6f 54 65 78 74 28 24 63 6f 6e 73 74 72 61 69 6e 74 29 20 2e 20 27 2c 20 27 2c 20 27 66 6f 75 6e | oText($constraint)...',.',.'foun |
809a0 | 64 20 27 2e 73 65 6c 66 3a 3a 67 65 74 50 61 63 6b 61 67 65 4c 69 73 74 28 24 70 61 63 6b 61 67 | d.'.self::getPackageList($packag |
809c0 | 65 73 2c 20 24 69 73 56 65 72 62 6f 73 65 2c 20 24 70 6f 6f 6c 2c 20 24 63 6f 6e 73 74 72 61 69 | es,.$isVerbose,.$pool,.$constrai |
809e0 | 6e 74 29 2e 27 20 69 6e 20 74 68 65 20 6c 6f 63 6b 20 66 69 6c 65 20 62 75 74 20 6e 6f 74 20 69 | nt).'.in.the.lock.file.but.not.i |
80a00 | 6e 20 72 65 6d 6f 74 65 20 72 65 70 6f 73 69 74 6f 72 69 65 73 2c 20 6d 61 6b 65 20 73 75 72 65 | n.remote.repositories,.make.sure |
80a20 | 20 79 6f 75 20 61 76 6f 69 64 20 75 70 64 61 74 69 6e 67 20 74 68 69 73 20 70 61 63 6b 61 67 65 | .you.avoid.updating.this.package |
80a40 | 20 74 6f 20 6b 65 65 70 20 74 68 65 20 6f 6e 65 20 66 72 6f 6d 20 74 68 65 20 6c 6f 63 6b 20 66 | .to.keep.the.one.from.the.lock.f |
80a60 | 69 6c 65 2e 27 5d 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 5b 22 2d 20 52 6f 6f 74 20 63 6f 6d 70 6f | ile.'];.}..return.["-.Root.compo |
80a80 | 73 65 72 2e 6a 73 6f 6e 20 72 65 71 75 69 72 65 73 20 24 70 61 63 6b 61 67 65 4e 61 6d 65 22 2e | ser.json.requires.$packageName". |
80aa0 | 73 65 6c 66 3a 3a 63 6f 6e 73 74 72 61 69 6e 74 54 6f 54 65 78 74 28 24 63 6f 6e 73 74 72 61 69 | self::constraintToText($constrai |
80ac0 | 6e 74 29 20 2e 20 27 2c 20 27 2c 20 27 66 6f 75 6e 64 20 27 2e 73 65 6c 66 3a 3a 67 65 74 50 61 | nt)...',.',.'found.'.self::getPa |
80ae0 | 63 6b 61 67 65 4c 69 73 74 28 24 70 61 63 6b 61 67 65 73 2c 20 24 69 73 56 65 72 62 6f 73 65 2c | ckageList($packages,.$isVerbose, |
80b00 | 20 24 70 6f 6f 6c 2c 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 2e 27 20 62 75 74 20 74 68 65 73 65 | .$pool,.$constraint).'.but.these |
80b20 | 20 77 65 72 65 20 6e 6f 74 20 6c 6f 61 64 65 64 2c 20 6c 69 6b 65 6c 79 20 62 65 63 61 75 73 65 | .were.not.loaded,.likely.because |
80b40 | 20 27 2e 28 73 65 6c 66 3a 3a 68 61 73 4d 75 6c 74 69 70 6c 65 4e 61 6d 65 73 28 24 70 61 63 6b | .'.(self::hasMultipleNames($pack |
80b60 | 61 67 65 73 29 20 3f 20 27 74 68 65 79 20 63 6f 6e 66 6c 69 63 74 27 20 3a 20 27 69 74 20 63 6f | ages).?.'they.conflict'.:.'it.co |
80b80 | 6e 66 6c 69 63 74 73 27 29 2e 27 20 77 69 74 68 20 61 6e 6f 74 68 65 72 20 72 65 71 75 69 72 65 | nflicts').'.with.another.require |
80ba0 | 2e 27 5d 3b 0a 7d 0a 0a 0a 69 66 20 28 24 70 61 63 6b 61 67 65 73 20 3d 20 24 72 65 70 6f 73 69 | .'];.}...if.($packages.=.$reposi |
80bc0 | 74 6f 72 79 53 65 74 2d 3e 66 69 6e 64 50 61 63 6b 61 67 65 73 28 24 70 61 63 6b 61 67 65 4e 61 | torySet->findPackages($packageNa |
80be0 | 6d 65 2c 20 24 63 6f 6e 73 74 72 61 69 6e 74 2c 20 52 65 70 6f 73 69 74 6f 72 79 53 65 74 3a 3a | me,.$constraint,.RepositorySet:: |
80c00 | 41 4c 4c 4f 57 5f 55 4e 41 43 43 45 50 54 41 42 4c 45 5f 53 54 41 42 49 4c 49 54 49 45 53 29 29 | ALLOW_UNACCEPTABLE_STABILITIES)) |
80c20 | 20 7b 0a 0a 69 66 20 28 24 61 6c 6c 52 65 70 6f 73 50 61 63 6b 61 67 65 73 20 3d 20 24 72 65 70 | .{..if.($allReposPackages.=.$rep |
80c40 | 6f 73 69 74 6f 72 79 53 65 74 2d 3e 66 69 6e 64 50 61 63 6b 61 67 65 73 28 24 70 61 63 6b 61 67 | ositorySet->findPackages($packag |
80c60 | 65 4e 61 6d 65 2c 20 24 63 6f 6e 73 74 72 61 69 6e 74 2c 20 52 65 70 6f 73 69 74 6f 72 79 53 65 | eName,.$constraint,.RepositorySe |
80c80 | 74 3a 3a 41 4c 4c 4f 57 5f 53 48 41 44 4f 57 45 44 5f 52 45 50 4f 53 49 54 4f 52 49 45 53 29 29 | t::ALLOW_SHADOWED_REPOSITORIES)) |
80ca0 | 20 7b 0a 72 65 74 75 72 6e 20 73 65 6c 66 3a 3a 63 6f 6d 70 75 74 65 43 68 65 63 6b 46 6f 72 4c | .{.return.self::computeCheckForL |
80cc0 | 6f 77 65 72 50 72 69 6f 52 65 70 6f 28 24 70 6f 6f 6c 2c 20 24 69 73 56 65 72 62 6f 73 65 2c 20 | owerPrioRepo($pool,.$isVerbose,. |
80ce0 | 24 70 61 63 6b 61 67 65 4e 61 6d 65 2c 20 24 70 61 63 6b 61 67 65 73 2c 20 24 61 6c 6c 52 65 70 | $packageName,.$packages,.$allRep |
80d00 | 6f 73 50 61 63 6b 61 67 65 73 2c 20 27 6d 69 6e 69 6d 75 6d 2d 73 74 61 62 69 6c 69 74 79 27 2c | osPackages,.'minimum-stability', |
80d20 | 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 5b 22 2d 20 52 6f 6f | .$constraint);.}..return.["-.Roo |
80d40 | 74 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 20 72 65 71 75 69 72 65 73 20 24 70 61 63 6b 61 67 | t.composer.json.requires.$packag |
80d60 | 65 4e 61 6d 65 22 2e 73 65 6c 66 3a 3a 63 6f 6e 73 74 72 61 69 6e 74 54 6f 54 65 78 74 28 24 63 | eName".self::constraintToText($c |
80d80 | 6f 6e 73 74 72 61 69 6e 74 29 20 2e 20 27 2c 20 27 2c 20 27 66 6f 75 6e 64 20 27 2e 73 65 6c 66 | onstraint)...',.',.'found.'.self |
80da0 | 3a 3a 67 65 74 50 61 63 6b 61 67 65 4c 69 73 74 28 24 70 61 63 6b 61 67 65 73 2c 20 24 69 73 56 | ::getPackageList($packages,.$isV |
80dc0 | 65 72 62 6f 73 65 2c 20 24 70 6f 6f 6c 2c 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 2e 27 20 62 75 | erbose,.$pool,.$constraint).'.bu |
80de0 | 74 20 27 2e 28 73 65 6c 66 3a 3a 68 61 73 4d 75 6c 74 69 70 6c 65 4e 61 6d 65 73 28 24 70 61 63 | t.'.(self::hasMultipleNames($pac |
80e00 | 6b 61 67 65 73 29 20 3f 20 27 74 68 65 73 65 20 64 6f 27 20 3a 20 27 69 74 20 64 6f 65 73 27 29 | kages).?.'these.do'.:.'it.does') |
80e20 | 2e 27 20 6e 6f 74 20 6d 61 74 63 68 20 79 6f 75 72 20 6d 69 6e 69 6d 75 6d 2d 73 74 61 62 69 6c | .'.not.match.your.minimum-stabil |
80e40 | 69 74 79 2e 27 5d 3b 0a 7d 0a 0a 0a 69 66 20 28 24 70 61 63 6b 61 67 65 73 20 3d 20 24 72 65 70 | ity.'];.}...if.($packages.=.$rep |
80e60 | 6f 73 69 74 6f 72 79 53 65 74 2d 3e 66 69 6e 64 50 61 63 6b 61 67 65 73 28 24 70 61 63 6b 61 67 | ositorySet->findPackages($packag |
80e80 | 65 4e 61 6d 65 2c 20 6e 75 6c 6c 2c 20 52 65 70 6f 73 69 74 6f 72 79 53 65 74 3a 3a 41 4c 4c 4f | eName,.null,.RepositorySet::ALLO |
80ea0 | 57 5f 55 4e 41 43 43 45 50 54 41 42 4c 45 5f 53 54 41 42 49 4c 49 54 49 45 53 29 29 20 7b 0a 0a | W_UNACCEPTABLE_STABILITIES)).{.. |
80ec0 | 69 66 20 28 24 61 6c 6c 52 65 70 6f 73 50 61 63 6b 61 67 65 73 20 3d 20 24 72 65 70 6f 73 69 74 | if.($allReposPackages.=.$reposit |
80ee0 | 6f 72 79 53 65 74 2d 3e 66 69 6e 64 50 61 63 6b 61 67 65 73 28 24 70 61 63 6b 61 67 65 4e 61 6d | orySet->findPackages($packageNam |
80f00 | 65 2c 20 24 63 6f 6e 73 74 72 61 69 6e 74 2c 20 52 65 70 6f 73 69 74 6f 72 79 53 65 74 3a 3a 41 | e,.$constraint,.RepositorySet::A |
80f20 | 4c 4c 4f 57 5f 53 48 41 44 4f 57 45 44 5f 52 45 50 4f 53 49 54 4f 52 49 45 53 29 29 20 7b 0a 72 | LLOW_SHADOWED_REPOSITORIES)).{.r |
80f40 | 65 74 75 72 6e 20 73 65 6c 66 3a 3a 63 6f 6d 70 75 74 65 43 68 65 63 6b 46 6f 72 4c 6f 77 65 72 | eturn.self::computeCheckForLower |
80f60 | 50 72 69 6f 52 65 70 6f 28 24 70 6f 6f 6c 2c 20 24 69 73 56 65 72 62 6f 73 65 2c 20 24 70 61 63 | PrioRepo($pool,.$isVerbose,.$pac |
80f80 | 6b 61 67 65 4e 61 6d 65 2c 20 24 70 61 63 6b 61 67 65 73 2c 20 24 61 6c 6c 52 65 70 6f 73 50 61 | kageName,.$packages,.$allReposPa |
80fa0 | 63 6b 61 67 65 73 2c 20 27 63 6f 6e 73 74 72 61 69 6e 74 27 2c 20 24 63 6f 6e 73 74 72 61 69 6e | ckages,.'constraint',.$constrain |
80fc0 | 74 29 3b 0a 7d 0a 0a 24 73 75 66 66 69 78 20 3d 20 27 27 3b 0a 69 66 20 28 24 63 6f 6e 73 74 72 | t);.}..$suffix.=.'';.if.($constr |
80fe0 | 61 69 6e 74 20 69 6e 73 74 61 6e 63 65 6f 66 20 43 6f 6e 73 74 72 61 69 6e 74 20 26 26 20 24 63 | aint.instanceof.Constraint.&&.$c |
81000 | 6f 6e 73 74 72 61 69 6e 74 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 20 3d 3d 3d 20 27 64 65 76 | onstraint->getVersion().===.'dev |
81020 | 2d 6d 61 73 74 65 72 27 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 73 20 61 | -master').{.foreach.($packages.a |
81040 | 73 20 24 63 61 6e 64 69 64 61 74 65 29 20 7b 0a 69 66 20 28 69 6e 5f 61 72 72 61 79 28 24 63 61 | s.$candidate).{.if.(in_array($ca |
81060 | 6e 64 69 64 61 74 65 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 2c 20 5b 27 64 65 76 2d 64 65 66 | ndidate->getVersion(),.['dev-def |
81080 | 61 75 6c 74 27 2c 20 27 64 65 76 2d 6d 61 69 6e 27 5d 2c 20 74 72 75 65 29 29 20 7b 0a 24 73 75 | ault',.'dev-main'],.true)).{.$su |
810a0 | 66 66 69 78 20 3d 20 27 20 50 65 72 68 61 70 73 20 64 65 76 2d 6d 61 73 74 65 72 20 77 61 73 20 | ffix.=.'.Perhaps.dev-master.was. |
810c0 | 72 65 6e 61 6d 65 64 20 74 6f 20 27 2e 24 63 61 6e 64 69 64 61 74 65 2d 3e 67 65 74 50 72 65 74 | renamed.to.'.$candidate->getPret |
810e0 | 74 79 56 65 72 73 69 6f 6e 28 29 2e 27 3f 27 3b 0a 62 72 65 61 6b 3b 0a 7d 0a 7d 0a 7d 0a 0a 0a | tyVersion().'?';.break;.}.}.}... |
81100 | 24 61 6c 6c 52 65 70 6f 73 50 61 63 6b 61 67 65 73 20 3d 20 24 70 61 63 6b 61 67 65 73 3b 0a 24 | $allReposPackages.=.$packages;.$ |
81120 | 74 6f 70 50 61 63 6b 61 67 65 20 3d 20 72 65 73 65 74 28 24 61 6c 6c 52 65 70 6f 73 50 61 63 6b | topPackage.=.reset($allReposPack |
81140 | 61 67 65 73 29 3b 0a 69 66 20 28 24 74 6f 70 50 61 63 6b 61 67 65 20 69 6e 73 74 61 6e 63 65 6f | ages);.if.($topPackage.instanceo |
81160 | 66 20 52 6f 6f 74 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 29 20 7b 0a 24 73 75 66 66 69 | f.RootPackageInterface).{.$suffi |
81180 | 78 20 3d 20 27 20 53 65 65 20 68 74 74 70 73 3a 2f 2f 67 65 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 | x.=.'.See.https://getcomposer.or |
811a0 | 67 2f 64 65 70 2d 6f 6e 2d 72 6f 6f 74 20 66 6f 72 20 64 65 74 61 69 6c 73 20 61 6e 64 20 61 73 | g/dep-on-root.for.details.and.as |
811c0 | 73 69 73 74 61 6e 63 65 2e 27 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 5b 22 2d 20 52 6f 6f 74 20 63 | sistance.';.}..return.["-.Root.c |
811e0 | 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 20 72 65 71 75 69 72 65 73 20 24 70 61 63 6b 61 67 65 4e 61 | omposer.json.requires.$packageNa |
81200 | 6d 65 22 2e 73 65 6c 66 3a 3a 63 6f 6e 73 74 72 61 69 6e 74 54 6f 54 65 78 74 28 24 63 6f 6e 73 | me".self::constraintToText($cons |
81220 | 74 72 61 69 6e 74 29 20 2e 20 27 2c 20 27 2c 20 27 66 6f 75 6e 64 20 27 2e 73 65 6c 66 3a 3a 67 | traint)...',.',.'found.'.self::g |
81240 | 65 74 50 61 63 6b 61 67 65 4c 69 73 74 28 24 70 61 63 6b 61 67 65 73 2c 20 24 69 73 56 65 72 62 | etPackageList($packages,.$isVerb |
81260 | 6f 73 65 2c 20 24 70 6f 6f 6c 2c 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 2e 27 20 62 75 74 20 27 | ose,.$pool,.$constraint).'.but.' |
81280 | 2e 28 73 65 6c 66 3a 3a 68 61 73 4d 75 6c 74 69 70 6c 65 4e 61 6d 65 73 28 24 70 61 63 6b 61 67 | .(self::hasMultipleNames($packag |
812a0 | 65 73 29 20 3f 20 27 74 68 65 73 65 20 64 6f 27 20 3a 20 27 69 74 20 64 6f 65 73 27 29 2e 27 20 | es).?.'these.do'.:.'it.does').'. |
812c0 | 6e 6f 74 20 6d 61 74 63 68 20 74 68 65 20 63 6f 6e 73 74 72 61 69 6e 74 2e 27 20 2e 20 24 73 75 | not.match.the.constraint.'...$su |
812e0 | 66 66 69 78 5d 3b 0a 7d 0a 0a 69 66 20 28 21 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b 5e | ffix];.}..if.(!Preg::isMatch('{^ |
81300 | 5b 41 2d 5a 61 2d 7a 30 2d 39 5f 2e 2f 2d 5d 2b 24 7d 27 2c 20 24 70 61 63 6b 61 67 65 4e 61 6d | [A-Za-z0-9_./-]+$}',.$packageNam |
81320 | 65 29 29 20 7b 0a 24 69 6c 6c 65 67 61 6c 43 68 61 72 73 20 3d 20 50 72 65 67 3a 3a 72 65 70 6c | e)).{.$illegalChars.=.Preg::repl |
81340 | 61 63 65 28 27 7b 5b 41 2d 5a 61 2d 7a 30 2d 39 5f 2e 2f 2d 5d 2b 7d 27 2c 20 27 27 2c 20 24 70 | ace('{[A-Za-z0-9_./-]+}',.'',.$p |
81360 | 61 63 6b 61 67 65 4e 61 6d 65 29 3b 0a 0a 72 65 74 75 72 6e 20 5b 22 2d 20 52 6f 6f 74 20 63 6f | ackageName);..return.["-.Root.co |
81380 | 6d 70 6f 73 65 72 2e 6a 73 6f 6e 20 72 65 71 75 69 72 65 73 20 24 70 61 63 6b 61 67 65 4e 61 6d | mposer.json.requires.$packageNam |
813a0 | 65 2c 20 69 74 20 22 2c 20 27 63 6f 75 6c 64 20 6e 6f 74 20 62 65 20 66 6f 75 6e 64 2c 20 69 74 | e,.it.",.'could.not.be.found,.it |
813c0 | 20 6c 6f 6f 6b 73 20 6c 69 6b 65 20 69 74 73 20 6e 61 6d 65 20 69 73 20 69 6e 76 61 6c 69 64 2c | .looks.like.its.name.is.invalid, |
813e0 | 20 22 27 2e 24 69 6c 6c 65 67 61 6c 43 68 61 72 73 2e 27 22 20 69 73 20 6e 6f 74 20 61 6c 6c 6f | ."'.$illegalChars.'".is.not.allo |
81400 | 77 65 64 20 69 6e 20 70 61 63 6b 61 67 65 20 6e 61 6d 65 73 2e 27 5d 3b 0a 7d 0a 0a 69 66 20 28 | wed.in.package.names.'];.}..if.( |
81420 | 24 70 72 6f 76 69 64 65 72 73 20 3d 20 24 72 65 70 6f 73 69 74 6f 72 79 53 65 74 2d 3e 67 65 74 | $providers.=.$repositorySet->get |
81440 | 50 72 6f 76 69 64 65 72 73 28 24 70 61 63 6b 61 67 65 4e 61 6d 65 29 29 20 7b 0a 24 6d 61 78 50 | Providers($packageName)).{.$maxP |
81460 | 72 6f 76 69 64 65 72 73 20 3d 20 32 30 3b 0a 24 70 72 6f 76 69 64 65 72 73 53 74 72 20 3d 20 69 | roviders.=.20;.$providersStr.=.i |
81480 | 6d 70 6c 6f 64 65 28 61 72 72 61 79 5f 6d 61 70 28 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e | mplode(array_map(static.function |
814a0 | 20 28 24 70 29 3a 20 73 74 72 69 6e 67 20 7b 0a 24 64 65 73 63 72 69 70 74 69 6f 6e 20 3d 20 24 | .($p):.string.{.$description.=.$ |
814c0 | 70 5b 27 64 65 73 63 72 69 70 74 69 6f 6e 27 5d 20 3f 20 27 20 27 2e 73 75 62 73 74 72 28 24 70 | p['description'].?.'.'.substr($p |
814e0 | 5b 27 64 65 73 63 72 69 70 74 69 6f 6e 27 5d 2c 20 30 2c 20 31 30 30 29 20 3a 20 27 27 3b 0a 0a | ['description'],.0,.100).:.'';.. |
81500 | 72 65 74 75 72 6e 20 27 20 20 20 20 20 20 2d 20 27 2e 24 70 5b 27 6e 61 6d 65 27 5d 2e 24 64 65 | return.'......-.'.$p['name'].$de |
81520 | 73 63 72 69 70 74 69 6f 6e 2e 22 5c 6e 22 3b 0a 7d 2c 20 63 6f 75 6e 74 28 24 70 72 6f 76 69 64 | scription."\n";.},.count($provid |
81540 | 65 72 73 29 20 3e 20 24 6d 61 78 50 72 6f 76 69 64 65 72 73 20 2b 20 31 20 3f 20 61 72 72 61 79 | ers).>.$maxProviders.+.1.?.array |
81560 | 5f 73 6c 69 63 65 28 24 70 72 6f 76 69 64 65 72 73 2c 20 30 2c 20 24 6d 61 78 50 72 6f 76 69 64 | _slice($providers,.0,.$maxProvid |
81580 | 65 72 73 29 20 3a 20 24 70 72 6f 76 69 64 65 72 73 29 29 3b 0a 69 66 20 28 63 6f 75 6e 74 28 24 | ers).:.$providers));.if.(count($ |
815a0 | 70 72 6f 76 69 64 65 72 73 29 20 3e 20 24 6d 61 78 50 72 6f 76 69 64 65 72 73 20 2b 20 31 29 20 | providers).>.$maxProviders.+.1). |
815c0 | 7b 0a 24 70 72 6f 76 69 64 65 72 73 53 74 72 20 2e 3d 20 27 20 20 20 20 20 20 2e 2e 2e 20 61 6e | {.$providersStr..=.'..........an |
815e0 | 64 20 27 2e 28 63 6f 75 6e 74 28 24 70 72 6f 76 69 64 65 72 73 29 20 2d 20 24 6d 61 78 50 72 6f | d.'.(count($providers).-.$maxPro |
81600 | 76 69 64 65 72 73 29 2e 27 20 6d 6f 72 65 2e 27 2e 22 5c 6e 22 3b 0a 7d 0a 0a 72 65 74 75 72 6e | viders).'.more.'."\n";.}..return |
81620 | 20 5b 22 2d 20 52 6f 6f 74 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 20 72 65 71 75 69 72 65 73 | .["-.Root.composer.json.requires |
81640 | 20 24 70 61 63 6b 61 67 65 4e 61 6d 65 22 2e 73 65 6c 66 3a 3a 63 6f 6e 73 74 72 61 69 6e 74 54 | .$packageName".self::constraintT |
81660 | 6f 54 65 78 74 28 24 63 6f 6e 73 74 72 61 69 6e 74 29 2e 22 2c 20 69 74 20 22 2c 20 22 63 6f 75 | oText($constraint).",.it.",."cou |
81680 | 6c 64 20 6e 6f 74 20 62 65 20 66 6f 75 6e 64 20 69 6e 20 61 6e 79 20 76 65 72 73 69 6f 6e 2c 20 | ld.not.be.found.in.any.version,. |
816a0 | 62 75 74 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 70 61 63 6b 61 67 65 73 20 70 72 6f 76 69 | but.the.following.packages.provi |
816c0 | 64 65 20 69 74 3a 5c 6e 22 2e 24 70 72 6f 76 69 64 65 72 73 53 74 72 2e 22 20 20 20 20 20 20 43 | de.it:\n".$providersStr."......C |
816e0 | 6f 6e 73 69 64 65 72 20 72 65 71 75 69 72 69 6e 67 20 6f 6e 65 20 6f 66 20 74 68 65 73 65 20 74 | onsider.requiring.one.of.these.t |
81700 | 6f 20 73 61 74 69 73 66 79 20 74 68 65 20 24 70 61 63 6b 61 67 65 4e 61 6d 65 20 72 65 71 75 69 | o.satisfy.the.$packageName.requi |
81720 | 72 65 6d 65 6e 74 2e 22 5d 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 5b 22 2d 20 52 6f 6f 74 20 63 6f | rement."];.}..return.["-.Root.co |
81740 | 6d 70 6f 73 65 72 2e 6a 73 6f 6e 20 72 65 71 75 69 72 65 73 20 24 70 61 63 6b 61 67 65 4e 61 6d | mposer.json.requires.$packageNam |
81760 | 65 2c 20 69 74 20 22 2c 20 22 63 6f 75 6c 64 20 6e 6f 74 20 62 65 20 66 6f 75 6e 64 20 69 6e 20 | e,.it.",."could.not.be.found.in. |
81780 | 61 6e 79 20 76 65 72 73 69 6f 6e 2c 20 74 68 65 72 65 20 6d 61 79 20 62 65 20 61 20 74 79 70 6f | any.version,.there.may.be.a.typo |
817a0 | 20 69 6e 20 74 68 65 20 70 61 63 6b 61 67 65 20 6e 61 6d 65 2e 22 5d 3b 0a 7d 0a 0a 0a 0a 0a 0a | .in.the.package.name."];.}...... |
817c0 | 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 50 61 63 6b 61 67 | public.static.function.getPackag |
817e0 | 65 4c 69 73 74 28 61 72 72 61 79 20 24 70 61 63 6b 61 67 65 73 2c 20 62 6f 6f 6c 20 24 69 73 56 | eList(array.$packages,.bool.$isV |
81800 | 65 72 62 6f 73 65 2c 20 3f 50 6f 6f 6c 20 24 70 6f 6f 6c 20 3d 20 6e 75 6c 6c 2c 20 3f 43 6f 6e | erbose,.?Pool.$pool.=.null,.?Con |
81820 | 73 74 72 61 69 6e 74 49 6e 74 65 72 66 61 63 65 20 24 63 6f 6e 73 74 72 61 69 6e 74 20 3d 20 6e | straintInterface.$constraint.=.n |
81840 | 75 6c 6c 2c 20 62 6f 6f 6c 20 24 75 73 65 52 65 6d 6f 76 65 64 56 65 72 73 69 6f 6e 47 72 6f 75 | ull,.bool.$useRemovedVersionGrou |
81860 | 70 20 3d 20 66 61 6c 73 65 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 24 70 72 65 70 61 72 65 64 20 3d | p.=.false):.string.{.$prepared.= |
81880 | 20 5b 5d 3b 0a 24 68 61 73 44 65 66 61 75 6c 74 42 72 61 6e 63 68 20 3d 20 5b 5d 3b 0a 66 6f 72 | .[];.$hasDefaultBranch.=.[];.for |
818a0 | 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 73 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 24 | each.($packages.as.$package).{.$ |
818c0 | 70 72 65 70 61 72 65 64 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 5b 27 6e | prepared[$package->getName()]['n |
818e0 | 61 6d 65 27 5d 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 4e 61 6d 65 28 | ame'].=.$package->getPrettyName( |
81900 | 29 3b 0a 24 70 72 65 70 61 72 65 64 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 | );.$prepared[$package->getName() |
81920 | 5d 5b 27 76 65 72 73 69 6f 6e 73 27 5d 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 56 65 72 73 69 | ]['versions'][$package->getVersi |
81940 | 6f 6e 28 29 5d 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 56 65 72 73 69 | on()].=.$package->getPrettyVersi |
81960 | 6f 6e 28 29 2e 28 24 70 61 63 6b 61 67 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 41 6c 69 61 73 50 | on().($package.instanceof.AliasP |
81980 | 61 63 6b 61 67 65 20 3f 20 27 20 28 61 6c 69 61 73 20 6f 66 20 27 2e 24 70 61 63 6b 61 67 65 2d | ackage.?.'.(alias.of.'.$package- |
819a0 | 3e 67 65 74 41 6c 69 61 73 4f 66 28 29 2d 3e 67 65 74 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 | >getAliasOf()->getPrettyVersion( |
819c0 | 29 2e 27 29 27 20 3a 20 27 27 29 3b 0a 69 66 20 28 24 70 6f 6f 6c 20 26 26 20 24 63 6f 6e 73 74 | ).')'.:.'');.if.($pool.&&.$const |
819e0 | 72 61 69 6e 74 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 70 6f 6f 6c 2d 3e 67 65 74 52 65 6d 6f | raint).{.foreach.($pool->getRemo |
81a00 | 76 65 64 56 65 72 73 69 6f 6e 73 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 2c | vedVersions($package->getName(), |
81a20 | 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 20 61 73 20 24 76 65 72 73 69 6f 6e 20 3d 3e 20 24 70 72 | .$constraint).as.$version.=>.$pr |
81a40 | 65 74 74 79 56 65 72 73 69 6f 6e 29 20 7b 0a 24 70 72 65 70 61 72 65 64 5b 24 70 61 63 6b 61 67 | ettyVersion).{.$prepared[$packag |
81a60 | 65 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 5b 27 76 65 72 73 69 6f 6e 73 27 5d 5b 24 76 65 72 73 69 | e->getName()]['versions'][$versi |
81a80 | 6f 6e 5d 20 3d 20 24 70 72 65 74 74 79 56 65 72 73 69 6f 6e 3b 0a 7d 0a 7d 0a 69 66 20 28 24 70 | on].=.$prettyVersion;.}.}.if.($p |
81aa0 | 6f 6f 6c 20 26 26 20 24 75 73 65 52 65 6d 6f 76 65 64 56 65 72 73 69 6f 6e 47 72 6f 75 70 29 20 | ool.&&.$useRemovedVersionGroup). |
81ac0 | 7b 0a 66 6f 72 65 61 63 68 20 28 24 70 6f 6f 6c 2d 3e 67 65 74 52 65 6d 6f 76 65 64 56 65 72 73 | {.foreach.($pool->getRemovedVers |
81ae0 | 69 6f 6e 73 42 79 50 61 63 6b 61 67 65 28 73 70 6c 5f 6f 62 6a 65 63 74 5f 68 61 73 68 28 24 70 | ionsByPackage(spl_object_hash($p |
81b00 | 61 63 6b 61 67 65 29 29 20 61 73 20 24 76 65 72 73 69 6f 6e 20 3d 3e 20 24 70 72 65 74 74 79 56 | ackage)).as.$version.=>.$prettyV |
81b20 | 65 72 73 69 6f 6e 29 20 7b 0a 24 70 72 65 70 61 72 65 64 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 | ersion).{.$prepared[$package->ge |
81b40 | 74 4e 61 6d 65 28 29 5d 5b 27 76 65 72 73 69 6f 6e 73 27 5d 5b 24 76 65 72 73 69 6f 6e 5d 20 3d | tName()]['versions'][$version].= |
81b60 | 20 24 70 72 65 74 74 79 56 65 72 73 69 6f 6e 3b 0a 7d 0a 7d 0a 69 66 20 28 24 70 61 63 6b 61 67 | .$prettyVersion;.}.}.if.($packag |
81b80 | 65 2d 3e 69 73 44 65 66 61 75 6c 74 42 72 61 6e 63 68 28 29 29 20 7b 0a 24 68 61 73 44 65 66 61 | e->isDefaultBranch()).{.$hasDefa |
81ba0 | 75 6c 74 42 72 61 6e 63 68 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 20 3d | ultBranch[$package->getName()].= |
81bc0 | 20 74 72 75 65 3b 0a 7d 0a 7d 0a 0a 24 70 72 65 70 61 72 65 64 53 74 72 69 6e 67 73 20 3d 20 5b | .true;.}.}..$preparedStrings.=.[ |
81be0 | 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 70 72 65 70 61 72 65 64 20 61 73 20 24 6e 61 6d 65 20 3d | ];.foreach.($prepared.as.$name.= |
81c00 | 3e 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 0a 69 66 20 28 69 73 73 65 74 28 24 70 61 63 6b 61 67 | >.$package).{..if.(isset($packag |
81c20 | 65 5b 27 76 65 72 73 69 6f 6e 73 27 5d 5b 56 65 72 73 69 6f 6e 50 61 72 73 65 72 3a 3a 44 45 46 | e['versions'][VersionParser::DEF |
81c40 | 41 55 4c 54 5f 42 52 41 4e 43 48 5f 41 4c 49 41 53 5d 2c 20 24 68 61 73 44 65 66 61 75 6c 74 42 | AULT_BRANCH_ALIAS],.$hasDefaultB |
81c60 | 72 61 6e 63 68 5b 24 6e 61 6d 65 5d 29 29 20 7b 0a 75 6e 73 65 74 28 24 70 61 63 6b 61 67 65 5b | ranch[$name])).{.unset($package[ |
81c80 | 27 76 65 72 73 69 6f 6e 73 27 5d 5b 56 65 72 73 69 6f 6e 50 61 72 73 65 72 3a 3a 44 45 46 41 55 | 'versions'][VersionParser::DEFAU |
81ca0 | 4c 54 5f 42 52 41 4e 43 48 5f 41 4c 49 41 53 5d 29 3b 0a 7d 0a 0a 75 6b 73 6f 72 74 28 24 70 61 | LT_BRANCH_ALIAS]);.}..uksort($pa |
81cc0 | 63 6b 61 67 65 5b 27 76 65 72 73 69 6f 6e 73 27 5d 2c 20 27 76 65 72 73 69 6f 6e 5f 63 6f 6d 70 | ckage['versions'],.'version_comp |
81ce0 | 61 72 65 27 29 3b 0a 0a 69 66 20 28 21 24 69 73 56 65 72 62 6f 73 65 29 20 7b 0a 24 70 61 63 6b | are');..if.(!$isVerbose).{.$pack |
81d00 | 61 67 65 5b 27 76 65 72 73 69 6f 6e 73 27 5d 20 3d 20 73 65 6c 66 3a 3a 63 6f 6e 64 65 6e 73 65 | age['versions'].=.self::condense |
81d20 | 56 65 72 73 69 6f 6e 4c 69 73 74 28 24 70 61 63 6b 61 67 65 5b 27 76 65 72 73 69 6f 6e 73 27 5d | VersionList($package['versions'] |
81d40 | 2c 20 34 29 3b 0a 7d 0a 24 70 72 65 70 61 72 65 64 53 74 72 69 6e 67 73 5b 5d 20 3d 20 24 70 61 | ,.4);.}.$preparedStrings[].=.$pa |
81d60 | 63 6b 61 67 65 5b 27 6e 61 6d 65 27 5d 2e 27 5b 27 2e 69 6d 70 6c 6f 64 65 28 27 2c 20 27 2c 20 | ckage['name'].'['.implode(',.',. |
81d80 | 24 70 61 63 6b 61 67 65 5b 27 76 65 72 73 69 6f 6e 73 27 5d 29 2e 27 5d 27 3b 0a 7d 0a 0a 72 65 | $package['versions']).']';.}..re |
81da0 | 74 75 72 6e 20 69 6d 70 6c 6f 64 65 28 27 2c 20 27 2c 20 24 70 72 65 70 61 72 65 64 53 74 72 69 | turn.implode(',.',.$preparedStri |
81dc0 | 6e 67 73 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 66 75 6e 63 | ngs);.}......private.static.func |
81de0 | 74 69 6f 6e 20 67 65 74 50 6c 61 74 66 6f 72 6d 50 61 63 6b 61 67 65 56 65 72 73 69 6f 6e 28 50 | tion.getPlatformPackageVersion(P |
81e00 | 6f 6f 6c 20 24 70 6f 6f 6c 2c 20 73 74 72 69 6e 67 20 24 70 61 63 6b 61 67 65 4e 61 6d 65 2c 20 | ool.$pool,.string.$packageName,. |
81e20 | 73 74 72 69 6e 67 20 24 76 65 72 73 69 6f 6e 29 3a 20 3f 73 74 72 69 6e 67 0a 7b 0a 24 61 76 61 | string.$version):.?string.{.$ava |
81e40 | 69 6c 61 62 6c 65 20 3d 20 24 70 6f 6f 6c 2d 3e 77 68 61 74 50 72 6f 76 69 64 65 73 28 24 70 61 | ilable.=.$pool->whatProvides($pa |
81e60 | 63 6b 61 67 65 4e 61 6d 65 29 3b 0a 0a 69 66 20 28 63 6f 75 6e 74 28 24 61 76 61 69 6c 61 62 6c | ckageName);..if.(count($availabl |
81e80 | 65 29 29 20 7b 0a 24 73 65 6c 65 63 74 65 64 20 3d 20 6e 75 6c 6c 3b 0a 66 6f 72 65 61 63 68 20 | e)).{.$selected.=.null;.foreach. |
81ea0 | 28 24 61 76 61 69 6c 61 62 6c 65 20 61 73 20 24 70 6b 67 29 20 7b 0a 69 66 20 28 24 70 6b 67 2d | ($available.as.$pkg).{.if.($pkg- |
81ec0 | 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 79 28 29 20 69 6e 73 74 61 6e 63 65 6f 66 20 50 6c 61 74 | >getRepository().instanceof.Plat |
81ee0 | 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 29 20 7b 0a 24 73 65 6c 65 63 74 65 64 20 3d 20 24 70 | formRepository).{.$selected.=.$p |
81f00 | 6b 67 3b 0a 62 72 65 61 6b 3b 0a 7d 0a 7d 0a 69 66 20 28 24 73 65 6c 65 63 74 65 64 20 3d 3d 3d | kg;.break;.}.}.if.($selected.=== |
81f20 | 20 6e 75 6c 6c 29 20 7b 0a 24 73 65 6c 65 63 74 65 64 20 3d 20 72 65 73 65 74 28 24 61 76 61 69 | .null).{.$selected.=.reset($avai |
81f40 | 6c 61 62 6c 65 29 3b 0a 7d 0a 0a 0a 69 66 20 28 24 73 65 6c 65 63 74 65 64 2d 3e 67 65 74 4e 61 | lable);.}...if.($selected->getNa |
81f60 | 6d 65 28 29 20 21 3d 3d 20 24 70 61 63 6b 61 67 65 4e 61 6d 65 29 20 7b 0a 0a 66 6f 72 65 61 63 | me().!==.$packageName).{..foreac |
81f80 | 68 20 28 61 72 72 61 79 5f 6d 65 72 67 65 28 61 72 72 61 79 5f 76 61 6c 75 65 73 28 24 73 65 6c | h.(array_merge(array_values($sel |
81fa0 | 65 63 74 65 64 2d 3e 67 65 74 50 72 6f 76 69 64 65 73 28 29 29 2c 20 61 72 72 61 79 5f 76 61 6c | ected->getProvides()),.array_val |
81fc0 | 75 65 73 28 24 73 65 6c 65 63 74 65 64 2d 3e 67 65 74 52 65 70 6c 61 63 65 73 28 29 29 29 20 61 | ues($selected->getReplaces())).a |
81fe0 | 73 20 24 6c 69 6e 6b 29 20 7b 0a 69 66 20 28 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 74 28 | s.$link).{.if.($link->getTarget( |
82000 | 29 20 3d 3d 3d 20 24 70 61 63 6b 61 67 65 4e 61 6d 65 29 20 7b 0a 72 65 74 75 72 6e 20 24 6c 69 | ).===.$packageName).{.return.$li |
82020 | 6e 6b 2d 3e 67 65 74 50 72 65 74 74 79 43 6f 6e 73 74 72 61 69 6e 74 28 29 2e 27 20 27 2e 73 75 | nk->getPrettyConstraint().'.'.su |
82040 | 62 73 74 72 28 24 6c 69 6e 6b 2d 3e 67 65 74 44 65 73 63 72 69 70 74 69 6f 6e 28 29 2c 20 30 2c | bstr($link->getDescription(),.0, |
82060 | 20 2d 31 29 2e 27 64 20 62 79 20 27 2e 24 73 65 6c 65 63 74 65 64 2d 3e 67 65 74 50 72 65 74 74 | .-1).'d.by.'.$selected->getPrett |
82080 | 79 53 74 72 69 6e 67 28 29 3b 0a 7d 0a 7d 0a 7d 0a 0a 24 76 65 72 73 69 6f 6e 20 3d 20 24 73 65 | yString();.}.}.}..$version.=.$se |
820a0 | 6c 65 63 74 65 64 2d 3e 67 65 74 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 3b 0a 24 65 78 74 | lected->getPrettyVersion();.$ext |
820c0 | 72 61 20 3d 20 24 73 65 6c 65 63 74 65 64 2d 3e 67 65 74 45 78 74 72 61 28 29 3b 0a 69 66 20 28 | ra.=.$selected->getExtra();.if.( |
820e0 | 24 73 65 6c 65 63 74 65 64 20 69 6e 73 74 61 6e 63 65 6f 66 20 43 6f 6d 70 6c 65 74 65 50 61 63 | $selected.instanceof.CompletePac |
82100 | 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 26 26 20 69 73 73 65 74 28 24 65 78 74 72 61 5b 27 63 | kageInterface.&&.isset($extra['c |
82120 | 6f 6e 66 69 67 2e 70 6c 61 74 66 6f 72 6d 27 5d 29 20 26 26 20 24 65 78 74 72 61 5b 27 63 6f 6e | onfig.platform']).&&.$extra['con |
82140 | 66 69 67 2e 70 6c 61 74 66 6f 72 6d 27 5d 20 3d 3d 3d 20 74 72 75 65 29 20 7b 0a 24 76 65 72 73 | fig.platform'].===.true).{.$vers |
82160 | 69 6f 6e 20 2e 3d 20 27 3b 20 27 20 2e 20 73 74 72 5f 72 65 70 6c 61 63 65 28 27 50 61 63 6b 61 | ion..=.';.'...str_replace('Packa |
82180 | 67 65 20 27 2c 20 27 27 2c 20 24 73 65 6c 65 63 74 65 64 2d 3e 67 65 74 44 65 73 63 72 69 70 74 | ge.',.'',.$selected->getDescript |
821a0 | 69 6f 6e 28 29 29 3b 0a 7d 0a 7d 20 65 6c 73 65 20 7b 0a 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0a | ion());.}.}.else.{.return.null;. |
821c0 | 7d 0a 0a 72 65 74 75 72 6e 20 24 76 65 72 73 69 6f 6e 3b 0a 7d 0a 0a 0a 0a 0a 0a 70 72 69 76 61 | }..return.$version;.}......priva |
821e0 | 74 65 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 63 6f 6e 64 65 6e 73 65 56 65 72 73 69 | te.static.function.condenseVersi |
82200 | 6f 6e 4c 69 73 74 28 61 72 72 61 79 20 24 76 65 72 73 69 6f 6e 73 2c 20 69 6e 74 20 24 6d 61 78 | onList(array.$versions,.int.$max |
82220 | 2c 20 69 6e 74 20 24 6d 61 78 44 65 76 20 3d 20 31 36 29 3a 20 61 72 72 61 79 0a 7b 0a 69 66 20 | ,.int.$maxDev.=.16):.array.{.if. |
82240 | 28 63 6f 75 6e 74 28 24 76 65 72 73 69 6f 6e 73 29 20 3c 3d 20 24 6d 61 78 29 20 7b 0a 72 65 74 | (count($versions).<=.$max).{.ret |
82260 | 75 72 6e 20 24 76 65 72 73 69 6f 6e 73 3b 0a 7d 0a 0a 24 66 69 6c 74 65 72 65 64 20 3d 20 5b 5d | urn.$versions;.}..$filtered.=.[] |
82280 | 3b 0a 24 62 79 4d 61 6a 6f 72 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 76 65 72 73 69 | ;.$byMajor.=.[];.foreach.($versi |
822a0 | 6f 6e 73 20 61 73 20 24 76 65 72 73 69 6f 6e 20 3d 3e 20 24 70 72 65 74 74 79 29 20 7b 0a 69 66 | ons.as.$version.=>.$pretty).{.if |
822c0 | 20 28 30 20 3d 3d 3d 20 73 74 72 69 70 6f 73 28 24 76 65 72 73 69 6f 6e 2c 20 27 64 65 76 2d 27 | .(0.===.stripos($version,.'dev-' |
822e0 | 29 29 20 7b 0a 24 62 79 4d 61 6a 6f 72 5b 27 64 65 76 27 5d 5b 5d 20 3d 20 24 70 72 65 74 74 79 | )).{.$byMajor['dev'][].=.$pretty |
82300 | 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 62 79 4d 61 6a 6f 72 5b 50 72 65 67 3a 3a 72 65 70 6c 61 63 | ;.}.else.{.$byMajor[Preg::replac |
82320 | 65 28 27 7b 5e 28 5c 64 2b 29 5c 2e 2e 2a 7d 27 2c 20 27 24 31 27 2c 20 24 76 65 72 73 69 6f 6e | e('{^(\d+)\..*}',.'$1',.$version |
82340 | 29 5d 5b 5d 20 3d 20 24 70 72 65 74 74 79 3b 0a 7d 0a 7d 0a 66 6f 72 65 61 63 68 20 28 24 62 79 | )][].=.$pretty;.}.}.foreach.($by |
82360 | 4d 61 6a 6f 72 20 61 73 20 24 6d 61 6a 6f 72 56 65 72 73 69 6f 6e 20 3d 3e 20 24 76 65 72 73 69 | Major.as.$majorVersion.=>.$versi |
82380 | 6f 6e 73 46 6f 72 4d 61 6a 6f 72 29 20 7b 0a 24 6d 61 78 56 65 72 73 69 6f 6e 73 20 3d 20 24 6d | onsForMajor).{.$maxVersions.=.$m |
823a0 | 61 6a 6f 72 56 65 72 73 69 6f 6e 20 3d 3d 3d 20 27 64 65 76 27 20 3f 20 24 6d 61 78 44 65 76 20 | ajorVersion.===.'dev'.?.$maxDev. |
823c0 | 3a 20 24 6d 61 78 3b 0a 69 66 20 28 63 6f 75 6e 74 28 24 76 65 72 73 69 6f 6e 73 46 6f 72 4d 61 | :.$max;.if.(count($versionsForMa |
823e0 | 6a 6f 72 29 20 3e 20 24 6d 61 78 56 65 72 73 69 6f 6e 73 29 20 7b 0a 0a 24 66 69 6c 74 65 72 65 | jor).>.$maxVersions).{..$filtere |
82400 | 64 5b 5d 20 3d 20 24 76 65 72 73 69 6f 6e 73 46 6f 72 4d 61 6a 6f 72 5b 30 5d 3b 0a 24 66 69 6c | d[].=.$versionsForMajor[0];.$fil |
82420 | 74 65 72 65 64 5b 5d 20 3d 20 27 2e 2e 2e 27 3b 0a 24 66 69 6c 74 65 72 65 64 5b 5d 20 3d 20 24 | tered[].=.'...';.$filtered[].=.$ |
82440 | 76 65 72 73 69 6f 6e 73 46 6f 72 4d 61 6a 6f 72 5b 63 6f 75 6e 74 28 24 76 65 72 73 69 6f 6e 73 | versionsForMajor[count($versions |
82460 | 46 6f 72 4d 61 6a 6f 72 29 20 2d 20 31 5d 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 66 69 6c 74 65 72 | ForMajor).-.1];.}.else.{.$filter |
82480 | 65 64 20 3d 20 61 72 72 61 79 5f 6d 65 72 67 65 28 24 66 69 6c 74 65 72 65 64 2c 20 24 76 65 72 | ed.=.array_merge($filtered,.$ver |
824a0 | 73 69 6f 6e 73 46 6f 72 4d 61 6a 6f 72 29 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 66 69 6c | sionsForMajor);.}.}..return.$fil |
824c0 | 74 65 72 65 64 3b 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 66 75 6e 63 | tered;.}.....private.static.func |
824e0 | 74 69 6f 6e 20 68 61 73 4d 75 6c 74 69 70 6c 65 4e 61 6d 65 73 28 61 72 72 61 79 20 24 70 61 63 | tion.hasMultipleNames(array.$pac |
82500 | 6b 61 67 65 73 29 3a 20 62 6f 6f 6c 0a 7b 0a 24 6e 61 6d 65 20 3d 20 6e 75 6c 6c 3b 0a 66 6f 72 | kages):.bool.{.$name.=.null;.for |
82520 | 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 73 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 69 | each.($packages.as.$package).{.i |
82540 | 66 20 28 24 6e 61 6d 65 20 3d 3d 3d 20 6e 75 6c 6c 20 7c 7c 20 24 6e 61 6d 65 20 3d 3d 3d 20 24 | f.($name.===.null.||.$name.===.$ |
82560 | 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 29 20 7b 0a 24 6e 61 6d 65 20 3d 20 24 70 | package->getName()).{.$name.=.$p |
82580 | 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 72 65 74 75 | ackage->getName();.}.else.{.retu |
825a0 | 72 6e 20 74 72 75 65 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 0a | rn.true;.}.}..return.false;.}... |
825c0 | 0a 0a 0a 0a 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 63 6f 6d 70 | ....private.static.function.comp |
825e0 | 75 74 65 43 68 65 63 6b 46 6f 72 4c 6f 77 65 72 50 72 69 6f 52 65 70 6f 28 50 6f 6f 6c 20 24 70 | uteCheckForLowerPrioRepo(Pool.$p |
82600 | 6f 6f 6c 2c 20 62 6f 6f 6c 20 24 69 73 56 65 72 62 6f 73 65 2c 20 73 74 72 69 6e 67 20 24 70 61 | ool,.bool.$isVerbose,.string.$pa |
82620 | 63 6b 61 67 65 4e 61 6d 65 2c 20 61 72 72 61 79 20 24 68 69 67 68 65 72 52 65 70 6f 50 61 63 6b | ckageName,.array.$higherRepoPack |
82640 | 61 67 65 73 2c 20 61 72 72 61 79 20 24 61 6c 6c 52 65 70 6f 73 50 61 63 6b 61 67 65 73 2c 20 73 | ages,.array.$allReposPackages,.s |
82660 | 74 72 69 6e 67 20 24 72 65 61 73 6f 6e 2c 20 3f 43 6f 6e 73 74 72 61 69 6e 74 49 6e 74 65 72 66 | tring.$reason,.?ConstraintInterf |
82680 | 61 63 65 20 24 63 6f 6e 73 74 72 61 69 6e 74 20 3d 20 6e 75 6c 6c 29 3a 20 61 72 72 61 79 0a 7b | ace.$constraint.=.null):.array.{ |
826a0 | 0a 24 6e 65 78 74 52 65 70 6f 50 61 63 6b 61 67 65 73 20 3d 20 5b 5d 3b 0a 24 6e 65 78 74 52 65 | .$nextRepoPackages.=.[];.$nextRe |
826c0 | 70 6f 20 3d 20 6e 75 6c 6c 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 61 6c 6c 52 65 70 6f 73 50 61 | po.=.null;..foreach.($allReposPa |
826e0 | 63 6b 61 67 65 73 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 69 66 20 28 24 6e 65 78 74 52 | ckages.as.$package).{.if.($nextR |
82700 | 65 70 6f 20 3d 3d 3d 20 6e 75 6c 6c 20 7c 7c 20 24 6e 65 78 74 52 65 70 6f 20 3d 3d 3d 20 24 70 | epo.===.null.||.$nextRepo.===.$p |
82720 | 61 63 6b 61 67 65 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 79 28 29 29 20 7b 0a 24 6e 65 78 74 | ackage->getRepository()).{.$next |
82740 | 52 65 70 6f 50 61 63 6b 61 67 65 73 5b 5d 20 3d 20 24 70 61 63 6b 61 67 65 3b 0a 24 6e 65 78 74 | RepoPackages[].=.$package;.$next |
82760 | 52 65 70 6f 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 79 28 29 | Repo.=.$package->getRepository() |
82780 | 3b 0a 7d 20 65 6c 73 65 20 7b 0a 62 72 65 61 6b 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 24 68 69 67 68 | ;.}.else.{.break;.}.}..if.($high |
827a0 | 65 72 52 65 70 6f 50 61 63 6b 61 67 65 73 29 20 7b 0a 24 74 6f 70 50 61 63 6b 61 67 65 20 3d 20 | erRepoPackages).{.$topPackage.=. |
827c0 | 72 65 73 65 74 28 24 68 69 67 68 65 72 52 65 70 6f 50 61 63 6b 61 67 65 73 29 3b 0a 69 66 20 28 | reset($higherRepoPackages);.if.( |
827e0 | 24 74 6f 70 50 61 63 6b 61 67 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 52 6f 6f 74 50 61 63 6b 61 | $topPackage.instanceof.RootPacka |
82800 | 67 65 49 6e 74 65 72 66 61 63 65 29 20 7b 0a 72 65 74 75 72 6e 20 5b 0a 22 2d 20 52 6f 6f 74 20 | geInterface).{.return.[."-.Root. |
82820 | 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 20 72 65 71 75 69 72 65 73 20 24 70 61 63 6b 61 67 65 4e | composer.json.requires.$packageN |
82840 | 61 6d 65 22 2e 73 65 6c 66 3a 3a 63 6f 6e 73 74 72 61 69 6e 74 54 6f 54 65 78 74 28 24 63 6f 6e | ame".self::constraintToText($con |
82860 | 73 74 72 61 69 6e 74 29 2e 27 2c 20 69 74 20 69 73 20 27 2c 0a 27 73 61 74 69 73 66 69 61 62 6c | straint).',.it.is.',.'satisfiabl |
82880 | 65 20 62 79 20 27 2e 73 65 6c 66 3a 3a 67 65 74 50 61 63 6b 61 67 65 4c 69 73 74 28 24 6e 65 78 | e.by.'.self::getPackageList($nex |
828a0 | 74 52 65 70 6f 50 61 63 6b 61 67 65 73 2c 20 24 69 73 56 65 72 62 6f 73 65 2c 20 24 70 6f 6f 6c | tRepoPackages,.$isVerbose,.$pool |
828c0 | 2c 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 2e 27 20 66 72 6f 6d 20 27 2e 24 6e 65 78 74 52 65 70 | ,.$constraint).'.from.'.$nextRep |
828e0 | 6f 2d 3e 67 65 74 52 65 70 6f 4e 61 6d 65 28 29 2e 27 20 62 75 74 20 27 2e 24 74 6f 70 50 61 63 | o->getRepoName().'.but.'.$topPac |
82900 | 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 4e 61 6d 65 28 29 2e 27 20 69 73 20 74 68 65 20 72 | kage->getPrettyName().'.is.the.r |
82920 | 6f 6f 74 20 70 61 63 6b 61 67 65 20 61 6e 64 20 63 61 6e 6e 6f 74 20 62 65 20 6d 6f 64 69 66 69 | oot.package.and.cannot.be.modifi |
82940 | 65 64 2e 20 53 65 65 20 68 74 74 70 73 3a 2f 2f 67 65 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 67 2f | ed..See.https://getcomposer.org/ |
82960 | 64 65 70 2d 6f 6e 2d 72 6f 6f 74 20 66 6f 72 20 64 65 74 61 69 6c 73 20 61 6e 64 20 61 73 73 69 | dep-on-root.for.details.and.assi |
82980 | 73 74 61 6e 63 65 2e 27 2c 0a 5d 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 24 6e 65 78 74 52 65 70 6f 20 | stance.',.];.}.}..if.($nextRepo. |
829a0 | 69 6e 73 74 61 6e 63 65 6f 66 20 4c 6f 63 6b 41 72 72 61 79 52 65 70 6f 73 69 74 6f 72 79 29 20 | instanceof.LockArrayRepository). |
829c0 | 7b 0a 24 73 69 6e 67 75 6c 61 72 20 3d 20 63 6f 75 6e 74 28 24 68 69 67 68 65 72 52 65 70 6f 50 | {.$singular.=.count($higherRepoP |
829e0 | 61 63 6b 61 67 65 73 29 20 3d 3d 3d 20 31 3b 0a 0a 24 73 75 67 67 65 73 74 69 6f 6e 20 3d 20 27 | ackages).===.1;..$suggestion.=.' |
82a00 | 4d 61 6b 65 20 73 75 72 65 20 79 6f 75 20 65 69 74 68 65 72 20 66 69 78 20 74 68 65 20 27 2e 24 | Make.sure.you.either.fix.the.'.$ |
82a20 | 72 65 61 73 6f 6e 2e 27 20 6f 72 20 61 76 6f 69 64 20 75 70 64 61 74 69 6e 67 20 74 68 69 73 20 | reason.'.or.avoid.updating.this. |
82a40 | 70 61 63 6b 61 67 65 20 74 6f 20 6b 65 65 70 20 74 68 65 20 6f 6e 65 20 70 72 65 73 65 6e 74 20 | package.to.keep.the.one.present. |
82a60 | 69 6e 20 74 68 65 20 6c 6f 63 6b 20 66 69 6c 65 20 28 27 2e 73 65 6c 66 3a 3a 67 65 74 50 61 63 | in.the.lock.file.('.self::getPac |
82a80 | 6b 61 67 65 4c 69 73 74 28 24 6e 65 78 74 52 65 70 6f 50 61 63 6b 61 67 65 73 2c 20 24 69 73 56 | kageList($nextRepoPackages,.$isV |
82aa0 | 65 72 62 6f 73 65 2c 20 24 70 6f 6f 6c 2c 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 2e 27 29 2e 27 | erbose,.$pool,.$constraint).').' |
82ac0 | 3b 0a 0a 69 66 20 28 24 6e 65 78 74 52 65 70 6f 50 61 63 6b 61 67 65 73 5b 30 5d 2d 3e 67 65 74 | ;..if.($nextRepoPackages[0]->get |
82ae0 | 44 69 73 74 54 79 70 65 28 29 20 3d 3d 3d 20 27 70 61 74 68 27 29 20 7b 0a 24 74 72 61 6e 73 70 | DistType().===.'path').{.$transp |
82b00 | 6f 72 74 4f 70 74 69 6f 6e 73 20 3d 20 24 6e 65 78 74 52 65 70 6f 50 61 63 6b 61 67 65 73 5b 30 | ortOptions.=.$nextRepoPackages[0 |
82b20 | 5d 2d 3e 67 65 74 54 72 61 6e 73 70 6f 72 74 4f 70 74 69 6f 6e 73 28 29 3b 0a 69 66 20 28 21 69 | ]->getTransportOptions();.if.(!i |
82b40 | 73 73 65 74 28 24 74 72 61 6e 73 70 6f 72 74 4f 70 74 69 6f 6e 73 5b 27 73 79 6d 6c 69 6e 6b 27 | sset($transportOptions['symlink' |
82b60 | 5d 29 20 7c 7c 20 24 74 72 61 6e 73 70 6f 72 74 4f 70 74 69 6f 6e 73 5b 27 73 79 6d 6c 69 6e 6b | ]).||.$transportOptions['symlink |
82b80 | 27 5d 20 21 3d 3d 20 66 61 6c 73 65 29 20 7b 0a 24 73 75 67 67 65 73 74 69 6f 6e 20 3d 20 27 4d | '].!==.false).{.$suggestion.=.'M |
82ba0 | 61 6b 65 20 73 75 72 65 20 79 6f 75 20 66 69 78 20 74 68 65 20 27 2e 24 72 65 61 73 6f 6e 2e 27 | ake.sure.you.fix.the.'.$reason.' |
82bc0 | 20 61 73 20 70 61 63 6b 61 67 65 73 20 69 6e 73 74 61 6c 6c 65 64 20 66 72 6f 6d 20 73 79 6d 6c | .as.packages.installed.from.syml |
82be0 | 69 6e 6b 65 64 20 70 61 74 68 20 72 65 70 6f 73 20 61 72 65 20 75 70 64 61 74 65 64 20 65 76 65 | inked.path.repos.are.updated.eve |
82c00 | 6e 20 69 6e 20 70 61 72 74 69 61 6c 20 75 70 64 61 74 65 73 20 61 6e 64 20 74 68 65 20 6f 6e 65 | n.in.partial.updates.and.the.one |
82c20 | 20 66 72 6f 6d 20 74 68 65 20 6c 6f 63 6b 20 66 69 6c 65 20 63 61 6e 20 74 68 75 73 20 6e 6f 74 | .from.the.lock.file.can.thus.not |
82c40 | 20 62 65 20 75 73 65 64 2e 27 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 5b 22 2d 20 52 6f 6f 74 | .be.used.';.}.}..return.["-.Root |
82c60 | 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 20 72 65 71 75 69 72 65 73 20 24 70 61 63 6b 61 67 65 | .composer.json.requires.$package |
82c80 | 4e 61 6d 65 22 2e 73 65 6c 66 3a 3a 63 6f 6e 73 74 72 61 69 6e 74 54 6f 54 65 78 74 28 24 63 6f | Name".self::constraintToText($co |
82ca0 | 6e 73 74 72 61 69 6e 74 29 20 2e 20 27 2c 20 27 2c 0a 27 66 6f 75 6e 64 20 27 20 2e 20 73 65 6c | nstraint)...',.',.'found.'...sel |
82cc0 | 66 3a 3a 67 65 74 50 61 63 6b 61 67 65 4c 69 73 74 28 24 68 69 67 68 65 72 52 65 70 6f 50 61 63 | f::getPackageList($higherRepoPac |
82ce0 | 6b 61 67 65 73 2c 20 24 69 73 56 65 72 62 6f 73 65 2c 20 24 70 6f 6f 6c 2c 20 24 63 6f 6e 73 74 | kages,.$isVerbose,.$pool,.$const |
82d00 | 72 61 69 6e 74 29 2e 27 20 62 75 74 20 27 20 2e 20 28 24 73 69 6e 67 75 6c 61 72 20 3f 20 27 69 | raint).'.but.'...($singular.?.'i |
82d20 | 74 20 64 6f 65 73 27 20 3a 20 27 74 68 65 73 65 20 64 6f 27 29 20 2e 20 27 20 6e 6f 74 20 6d 61 | t.does'.:.'these.do')...'.not.ma |
82d40 | 74 63 68 20 79 6f 75 72 20 27 2e 24 72 65 61 73 6f 6e 2e 27 20 61 6e 64 20 27 20 2e 20 28 24 73 | tch.your.'.$reason.'.and.'...($s |
82d60 | 69 6e 67 75 6c 61 72 20 3f 20 27 69 73 27 20 3a 20 27 61 72 65 27 29 20 2e 20 27 20 74 68 65 72 | ingular.?.'is'.:.'are')...'.ther |
82d80 | 65 66 6f 72 65 20 6e 6f 74 20 69 6e 73 74 61 6c 6c 61 62 6c 65 2e 20 27 2e 24 73 75 67 67 65 73 | efore.not.installable..'.$sugges |
82da0 | 74 69 6f 6e 2c 0a 5d 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 5b 22 2d 20 52 6f 6f 74 20 63 6f 6d 70 | tion,.];.}..return.["-.Root.comp |
82dc0 | 6f 73 65 72 2e 6a 73 6f 6e 20 72 65 71 75 69 72 65 73 20 24 70 61 63 6b 61 67 65 4e 61 6d 65 22 | oser.json.requires.$packageName" |
82de0 | 2e 73 65 6c 66 3a 3a 63 6f 6e 73 74 72 61 69 6e 74 54 6f 54 65 78 74 28 24 63 6f 6e 73 74 72 61 | .self::constraintToText($constra |
82e00 | 69 6e 74 29 20 2e 20 27 2c 20 69 74 20 69 73 20 27 2c 20 27 73 61 74 69 73 66 69 61 62 6c 65 20 | int)...',.it.is.',.'satisfiable. |
82e20 | 62 79 20 27 2e 73 65 6c 66 3a 3a 67 65 74 50 61 63 6b 61 67 65 4c 69 73 74 28 24 6e 65 78 74 52 | by.'.self::getPackageList($nextR |
82e40 | 65 70 6f 50 61 63 6b 61 67 65 73 2c 20 24 69 73 56 65 72 62 6f 73 65 2c 20 24 70 6f 6f 6c 2c 20 | epoPackages,.$isVerbose,.$pool,. |
82e60 | 24 63 6f 6e 73 74 72 61 69 6e 74 29 2e 27 20 66 72 6f 6d 20 27 2e 24 6e 65 78 74 52 65 70 6f 2d | $constraint).'.from.'.$nextRepo- |
82e80 | 3e 67 65 74 52 65 70 6f 4e 61 6d 65 28 29 2e 27 20 62 75 74 20 27 2e 73 65 6c 66 3a 3a 67 65 74 | >getRepoName().'.but.'.self::get |
82ea0 | 50 61 63 6b 61 67 65 4c 69 73 74 28 24 68 69 67 68 65 72 52 65 70 6f 50 61 63 6b 61 67 65 73 2c | PackageList($higherRepoPackages, |
82ec0 | 20 24 69 73 56 65 72 62 6f 73 65 2c 20 24 70 6f 6f 6c 2c 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 | .$isVerbose,.$pool,.$constraint) |
82ee0 | 2e 27 20 66 72 6f 6d 20 27 2e 72 65 73 65 74 28 24 68 69 67 68 65 72 52 65 70 6f 50 61 63 6b 61 | .'.from.'.reset($higherRepoPacka |
82f00 | 67 65 73 29 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 79 28 29 2d 3e 67 65 74 52 65 70 6f 4e 61 | ges)->getRepository()->getRepoNa |
82f20 | 6d 65 28 29 2e 27 20 68 61 73 20 68 69 67 68 65 72 20 72 65 70 6f 73 69 74 6f 72 79 20 70 72 69 | me().'.has.higher.repository.pri |
82f40 | 6f 72 69 74 79 2e 20 54 68 65 20 70 61 63 6b 61 67 65 73 20 66 72 6f 6d 20 74 68 65 20 68 69 67 | ority..The.packages.from.the.hig |
82f60 | 68 65 72 20 70 72 69 6f 72 69 74 79 20 72 65 70 6f 73 69 74 6f 72 79 20 64 6f 20 6e 6f 74 20 6d | her.priority.repository.do.not.m |
82f80 | 61 74 63 68 20 79 6f 75 72 20 27 2e 24 72 65 61 73 6f 6e 2e 27 20 61 6e 64 20 61 72 65 20 74 68 | atch.your.'.$reason.'.and.are.th |
82fa0 | 65 72 65 66 6f 72 65 20 6e 6f 74 20 69 6e 73 74 61 6c 6c 61 62 6c 65 2e 20 54 68 61 74 20 72 65 | erefore.not.installable..That.re |
82fc0 | 70 6f 73 69 74 6f 72 79 20 69 73 20 63 61 6e 6f 6e 69 63 61 6c 20 73 6f 20 74 68 65 20 6c 6f 77 | pository.is.canonical.so.the.low |
82fe0 | 65 72 20 70 72 69 6f 72 69 74 79 20 72 65 70 6f 5c 27 73 20 70 61 63 6b 61 67 65 73 20 61 72 65 | er.priority.repo\'s.packages.are |
83000 | 20 6e 6f 74 20 69 6e 73 74 61 6c 6c 61 62 6c 65 2e 20 53 65 65 20 68 74 74 70 73 3a 2f 2f 67 65 | .not.installable..See.https://ge |
83020 | 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 67 2f 72 65 70 6f 70 72 69 6f 20 66 6f 72 20 64 65 74 61 69 | tcomposer.org/repoprio.for.detai |
83040 | 6c 73 20 61 6e 64 20 61 73 73 69 73 74 61 6e 63 65 2e 27 5d 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 | ls.and.assistance.'];.}.....prot |
83060 | 65 63 74 65 64 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 63 6f 6e 73 74 72 61 69 6e 74 | ected.static.function.constraint |
83080 | 54 6f 54 65 78 74 28 3f 43 6f 6e 73 74 72 61 69 6e 74 49 6e 74 65 72 66 61 63 65 20 24 63 6f 6e | ToText(?ConstraintInterface.$con |
830a0 | 73 74 72 61 69 6e 74 20 3d 20 6e 75 6c 6c 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e | straint.=.null):.string.{.return |
830c0 | 20 24 63 6f 6e 73 74 72 61 69 6e 74 20 3f 20 27 20 27 2e 24 63 6f 6e 73 74 72 61 69 6e 74 2d 3e | .$constraint.?.'.'.$constraint-> |
830e0 | 67 65 74 50 72 65 74 74 79 53 74 72 69 6e 67 28 29 20 3a 20 27 27 3b 0a 7d 0a 7d 0a 3c 3f 70 68 | getPrettyString().:.'';.}.}.<?ph |
83100 | 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a | p.declare(strict_types=1);...... |
83120 | 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 65 | ......namespace.Composer\Depende |
83140 | 6e 63 79 52 65 73 6f 6c 76 65 72 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 | ncyResolver;..use.Composer\Packa |
83160 | 67 65 5c 42 61 73 65 50 61 63 6b 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 | ge\BasePackage;.use.Composer\Pac |
83180 | 6b 61 67 65 5c 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f | kage\PackageInterface;.use.Compo |
831a0 | 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 4c 6f 63 6b 41 72 72 61 79 52 65 70 6f 73 69 74 6f | ser\Repository\LockArrayReposito |
831c0 | 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 65 6d 76 65 72 5c 43 6f 6e 73 74 72 61 69 | ry;.use.Composer\Semver\Constrai |
831e0 | 6e 74 5c 43 6f 6e 73 74 72 61 69 6e 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 | nt\ConstraintInterface;.use.Comp |
83200 | 6f 73 65 72 5c 53 65 6d 76 65 72 5c 43 6f 6e 73 74 72 61 69 6e 74 5c 4d 61 74 63 68 41 6c 6c 43 | oser\Semver\Constraint\MatchAllC |
83220 | 6f 6e 73 74 72 61 69 6e 74 3b 0a 0a 0a 0a 0a 63 6c 61 73 73 20 52 65 71 75 65 73 74 0a 7b 0a 0a | onstraint;.....class.Request.{.. |
83240 | 0a 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 55 50 44 41 54 45 5f 4f 4e 4c 59 5f 4c 49 53 54 45 | ..public.const.UPDATE_ONLY_LISTE |
83260 | 44 20 3d 20 30 3b 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 55 50 44 41 54 45 5f | D.=.0;......public.const.UPDATE_ |
83280 | 4c 49 53 54 45 44 5f 57 49 54 48 5f 54 52 41 4e 53 49 54 49 56 45 5f 44 45 50 53 5f 4e 4f 5f 52 | LISTED_WITH_TRANSITIVE_DEPS_NO_R |
832a0 | 4f 4f 54 5f 52 45 51 55 49 52 45 20 3d 20 31 3b 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 63 6f 6e | OOT_REQUIRE.=.1;......public.con |
832c0 | 73 74 20 55 50 44 41 54 45 5f 4c 49 53 54 45 44 5f 57 49 54 48 5f 54 52 41 4e 53 49 54 49 56 45 | st.UPDATE_LISTED_WITH_TRANSITIVE |
832e0 | 5f 44 45 50 53 20 3d 20 32 3b 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 6c 6f 63 6b 65 64 52 65 | _DEPS.=.2;...protected.$lockedRe |
83300 | 70 6f 73 69 74 6f 72 79 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 72 65 71 75 69 72 65 73 20 3d | pository;..protected.$requires.= |
83320 | 20 5b 5d 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 66 69 78 65 64 50 61 63 6b 61 67 65 73 20 3d | .[];..protected.$fixedPackages.= |
83340 | 20 5b 5d 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 6c 6f 63 6b 65 64 50 61 63 6b 61 67 65 73 20 | .[];..protected.$lockedPackages. |
83360 | 3d 20 5b 5d 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 66 69 78 65 64 4c 6f 63 6b 65 64 50 61 63 | =.[];..protected.$fixedLockedPac |
83380 | 6b 61 67 65 73 20 3d 20 5b 5d 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 75 70 64 61 74 65 41 6c | kages.=.[];..protected.$updateAl |
833a0 | 6c 6f 77 4c 69 73 74 20 3d 20 5b 5d 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 75 70 64 61 74 65 | lowList.=.[];..protected.$update |
833c0 | 41 6c 6c 6f 77 54 72 61 6e 73 69 74 69 76 65 44 65 70 65 6e 64 65 6e 63 69 65 73 20 3d 20 66 61 | AllowTransitiveDependencies.=.fa |
833e0 | 6c 73 65 3b 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 | lse;..public.function.__construc |
83400 | 74 28 3f 4c 6f 63 6b 41 72 72 61 79 52 65 70 6f 73 69 74 6f 72 79 20 24 6c 6f 63 6b 65 64 52 65 | t(?LockArrayRepository.$lockedRe |
83420 | 70 6f 73 69 74 6f 72 79 20 3d 20 6e 75 6c 6c 29 0a 7b 0a 24 74 68 69 73 2d 3e 6c 6f 63 6b 65 64 | pository.=.null).{.$this->locked |
83440 | 52 65 70 6f 73 69 74 6f 72 79 20 3d 20 24 6c 6f 63 6b 65 64 52 65 70 6f 73 69 74 6f 72 79 3b 0a | Repository.=.$lockedRepository;. |
83460 | 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 72 65 71 75 69 72 65 4e 61 6d 65 28 73 | }..public.function.requireName(s |
83480 | 74 72 69 6e 67 20 24 70 61 63 6b 61 67 65 4e 61 6d 65 2c 20 3f 43 6f 6e 73 74 72 61 69 6e 74 49 | tring.$packageName,.?ConstraintI |
834a0 | 6e 74 65 72 66 61 63 65 20 24 63 6f 6e 73 74 72 61 69 6e 74 20 3d 20 6e 75 6c 6c 29 3a 20 76 6f | nterface.$constraint.=.null):.vo |
834c0 | 69 64 0a 7b 0a 24 70 61 63 6b 61 67 65 4e 61 6d 65 20 3d 20 73 74 72 74 6f 6c 6f 77 65 72 28 24 | id.{.$packageName.=.strtolower($ |
834e0 | 70 61 63 6b 61 67 65 4e 61 6d 65 29 3b 0a 0a 69 66 20 28 24 63 6f 6e 73 74 72 61 69 6e 74 20 3d | packageName);..if.($constraint.= |
83500 | 3d 3d 20 6e 75 6c 6c 29 20 7b 0a 24 63 6f 6e 73 74 72 61 69 6e 74 20 3d 20 6e 65 77 20 4d 61 74 | ==.null).{.$constraint.=.new.Mat |
83520 | 63 68 41 6c 6c 43 6f 6e 73 74 72 61 69 6e 74 28 29 3b 0a 7d 0a 69 66 20 28 69 73 73 65 74 28 24 | chAllConstraint();.}.if.(isset($ |
83540 | 74 68 69 73 2d 3e 72 65 71 75 69 72 65 73 5b 24 70 61 63 6b 61 67 65 4e 61 6d 65 5d 29 29 20 7b | this->requires[$packageName])).{ |
83560 | 0a 74 68 72 6f 77 20 6e 65 77 20 5c 4c 6f 67 69 63 45 78 63 65 70 74 69 6f 6e 28 27 4f 76 65 72 | .throw.new.\LogicException('Over |
83580 | 77 72 69 74 69 6e 67 20 72 65 71 75 69 72 65 73 20 73 65 65 6d 73 20 6c 69 6b 65 20 61 20 62 75 | writing.requires.seems.like.a.bu |
835a0 | 67 20 28 27 2e 24 70 61 63 6b 61 67 65 4e 61 6d 65 2e 27 20 27 2e 24 74 68 69 73 2d 3e 72 65 71 | g.('.$packageName.'.'.$this->req |
835c0 | 75 69 72 65 73 5b 24 70 61 63 6b 61 67 65 4e 61 6d 65 5d 2d 3e 67 65 74 50 72 65 74 74 79 53 74 | uires[$packageName]->getPrettySt |
835e0 | 72 69 6e 67 28 29 2e 27 20 3d 3e 20 27 2e 24 63 6f 6e 73 74 72 61 69 6e 74 2d 3e 67 65 74 50 72 | ring().'.=>.'.$constraint->getPr |
83600 | 65 74 74 79 53 74 72 69 6e 67 28 29 2e 27 2c 20 63 68 65 63 6b 20 77 68 79 20 69 74 20 69 73 20 | ettyString().',.check.why.it.is. |
83620 | 68 61 70 70 65 6e 69 6e 67 2c 20 6d 69 67 68 74 20 62 65 20 61 20 72 6f 6f 74 20 61 6c 69 61 73 | happening,.might.be.a.root.alias |
83640 | 27 29 3b 0a 7d 0a 24 74 68 69 73 2d 3e 72 65 71 75 69 72 65 73 5b 24 70 61 63 6b 61 67 65 4e 61 | ');.}.$this->requires[$packageNa |
83660 | 6d 65 5d 20 3d 20 24 63 6f 6e 73 74 72 61 69 6e 74 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c | me].=.$constraint;.}........publ |
83680 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 66 69 78 50 61 63 6b 61 67 65 28 42 61 73 65 50 61 63 6b 61 | ic.function.fixPackage(BasePacka |
836a0 | 67 65 20 24 70 61 63 6b 61 67 65 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 66 69 78 65 | ge.$package):.void.{.$this->fixe |
836c0 | 64 50 61 63 6b 61 67 65 73 5b 73 70 6c 5f 6f 62 6a 65 63 74 5f 68 61 73 68 28 24 70 61 63 6b 61 | dPackages[spl_object_hash($packa |
836e0 | 67 65 29 5d 20 3d 20 24 70 61 63 6b 61 67 65 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 | ge)].=.$package;.}............pu |
83700 | 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 6c 6f 63 6b 50 61 63 6b 61 67 65 28 42 61 73 65 50 61 | blic.function.lockPackage(BasePa |
83720 | 63 6b 61 67 65 20 24 70 61 63 6b 61 67 65 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 6c | ckage.$package):.void.{.$this->l |
83740 | 6f 63 6b 65 64 50 61 63 6b 61 67 65 73 5b 73 70 6c 5f 6f 62 6a 65 63 74 5f 68 61 73 68 28 24 70 | ockedPackages[spl_object_hash($p |
83760 | 61 63 6b 61 67 65 29 5d 20 3d 20 24 70 61 63 6b 61 67 65 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 | ackage)].=.$package;.}.........p |
83780 | 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 66 69 78 4c 6f 63 6b 65 64 50 61 63 6b 61 67 65 28 | ublic.function.fixLockedPackage( |
837a0 | 42 61 73 65 50 61 63 6b 61 67 65 20 24 70 61 63 6b 61 67 65 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 | BasePackage.$package):.void.{.$t |
837c0 | 68 69 73 2d 3e 66 69 78 65 64 50 61 63 6b 61 67 65 73 5b 73 70 6c 5f 6f 62 6a 65 63 74 5f 68 61 | his->fixedPackages[spl_object_ha |
837e0 | 73 68 28 24 70 61 63 6b 61 67 65 29 5d 20 3d 20 24 70 61 63 6b 61 67 65 3b 0a 24 74 68 69 73 2d | sh($package)].=.$package;.$this- |
83800 | 3e 66 69 78 65 64 4c 6f 63 6b 65 64 50 61 63 6b 61 67 65 73 5b 73 70 6c 5f 6f 62 6a 65 63 74 5f | >fixedLockedPackages[spl_object_ |
83820 | 68 61 73 68 28 24 70 61 63 6b 61 67 65 29 5d 20 3d 20 24 70 61 63 6b 61 67 65 3b 0a 7d 0a 0a 70 | hash($package)].=.$package;.}..p |
83840 | 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 75 6e 6c 6f 63 6b 50 61 63 6b 61 67 65 28 42 61 73 | ublic.function.unlockPackage(Bas |
83860 | 65 50 61 63 6b 61 67 65 20 24 70 61 63 6b 61 67 65 29 3a 20 76 6f 69 64 0a 7b 0a 75 6e 73 65 74 | ePackage.$package):.void.{.unset |
83880 | 28 24 74 68 69 73 2d 3e 6c 6f 63 6b 65 64 50 61 63 6b 61 67 65 73 5b 73 70 6c 5f 6f 62 6a 65 63 | ($this->lockedPackages[spl_objec |
838a0 | 74 5f 68 61 73 68 28 24 70 61 63 6b 61 67 65 29 5d 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 | t_hash($package)]);.}......publi |
838c0 | 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 55 70 64 61 74 65 41 6c 6c 6f 77 4c 69 73 74 28 61 72 | c.function.setUpdateAllowList(ar |
838e0 | 72 61 79 20 24 75 70 64 61 74 65 41 6c 6c 6f 77 4c 69 73 74 2c 20 24 75 70 64 61 74 65 41 6c 6c | ray.$updateAllowList,.$updateAll |
83900 | 6f 77 54 72 61 6e 73 69 74 69 76 65 44 65 70 65 6e 64 65 6e 63 69 65 73 29 3a 20 76 6f 69 64 0a | owTransitiveDependencies):.void. |
83920 | 7b 0a 24 74 68 69 73 2d 3e 75 70 64 61 74 65 41 6c 6c 6f 77 4c 69 73 74 20 3d 20 24 75 70 64 61 | {.$this->updateAllowList.=.$upda |
83940 | 74 65 41 6c 6c 6f 77 4c 69 73 74 3b 0a 24 74 68 69 73 2d 3e 75 70 64 61 74 65 41 6c 6c 6f 77 54 | teAllowList;.$this->updateAllowT |
83960 | 72 61 6e 73 69 74 69 76 65 44 65 70 65 6e 64 65 6e 63 69 65 73 20 3d 20 24 75 70 64 61 74 65 41 | ransitiveDependencies.=.$updateA |
83980 | 6c 6c 6f 77 54 72 61 6e 73 69 74 69 76 65 44 65 70 65 6e 64 65 6e 63 69 65 73 3b 0a 7d 0a 0a 0a | llowTransitiveDependencies;.}... |
839a0 | 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 55 70 64 61 74 65 41 6c 6c 6f 77 | ..public.function.getUpdateAllow |
839c0 | 4c 69 73 74 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 75 70 | List():.array.{.return.$this->up |
839e0 | 64 61 74 65 41 6c 6c 6f 77 4c 69 73 74 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f | dateAllowList;.}..public.functio |
83a00 | 6e 20 67 65 74 55 70 64 61 74 65 41 6c 6c 6f 77 54 72 61 6e 73 69 74 69 76 65 44 65 70 65 6e 64 | n.getUpdateAllowTransitiveDepend |
83a20 | 65 6e 63 69 65 73 28 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 75 | encies():.bool.{.return.$this->u |
83a40 | 70 64 61 74 65 41 6c 6c 6f 77 54 72 61 6e 73 69 74 69 76 65 44 65 70 65 6e 64 65 6e 63 69 65 73 | pdateAllowTransitiveDependencies |
83a60 | 20 21 3d 3d 20 73 65 6c 66 3a 3a 55 50 44 41 54 45 5f 4f 4e 4c 59 5f 4c 49 53 54 45 44 3b 0a 7d | .!==.self::UPDATE_ONLY_LISTED;.} |
83a80 | 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 55 70 64 61 74 65 41 6c 6c 6f 77 | ..public.function.getUpdateAllow |
83aa0 | 54 72 61 6e 73 69 74 69 76 65 52 6f 6f 74 44 65 70 65 6e 64 65 6e 63 69 65 73 28 29 3a 20 62 6f | TransitiveRootDependencies():.bo |
83ac0 | 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 75 70 64 61 74 65 41 6c 6c 6f 77 54 72 | ol.{.return.$this->updateAllowTr |
83ae0 | 61 6e 73 69 74 69 76 65 44 65 70 65 6e 64 65 6e 63 69 65 73 20 3d 3d 3d 20 73 65 6c 66 3a 3a 55 | ansitiveDependencies.===.self::U |
83b00 | 50 44 41 54 45 5f 4c 49 53 54 45 44 5f 57 49 54 48 5f 54 52 41 4e 53 49 54 49 56 45 5f 44 45 50 | PDATE_LISTED_WITH_TRANSITIVE_DEP |
83b20 | 53 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 52 65 71 75 | S;.}.....public.function.getRequ |
83b40 | 69 72 65 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 72 65 | ires():.array.{.return.$this->re |
83b60 | 71 75 69 72 65 73 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 | quires;.}.....public.function.ge |
83b80 | 74 46 69 78 65 64 50 61 63 6b 61 67 65 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e | tFixedPackages():.array.{.return |
83ba0 | 20 24 74 68 69 73 2d 3e 66 69 78 65 64 50 61 63 6b 61 67 65 73 3b 0a 7d 0a 0a 70 75 62 6c 69 63 | .$this->fixedPackages;.}..public |
83bc0 | 20 66 75 6e 63 74 69 6f 6e 20 69 73 46 69 78 65 64 50 61 63 6b 61 67 65 28 42 61 73 65 50 61 63 | .function.isFixedPackage(BasePac |
83be0 | 6b 61 67 65 20 24 70 61 63 6b 61 67 65 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 69 73 | kage.$package):.bool.{.return.is |
83c00 | 73 65 74 28 24 74 68 69 73 2d 3e 66 69 78 65 64 50 61 63 6b 61 67 65 73 5b 73 70 6c 5f 6f 62 6a | set($this->fixedPackages[spl_obj |
83c20 | 65 63 74 5f 68 61 73 68 28 24 70 61 63 6b 61 67 65 29 5d 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c | ect_hash($package)]);.}.....publ |
83c40 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 4c 6f 63 6b 65 64 50 61 63 6b 61 67 65 73 28 29 3a | ic.function.getLockedPackages(): |
83c60 | 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 6c 6f 63 6b 65 64 50 61 63 | .array.{.return.$this->lockedPac |
83c80 | 6b 61 67 65 73 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 4c 6f 63 6b | kages;.}..public.function.isLock |
83ca0 | 65 64 50 61 63 6b 61 67 65 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b | edPackage(PackageInterface.$pack |
83cc0 | 61 67 65 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 69 73 73 65 74 28 24 74 68 69 73 2d | age):.bool.{.return.isset($this- |
83ce0 | 3e 6c 6f 63 6b 65 64 50 61 63 6b 61 67 65 73 5b 73 70 6c 5f 6f 62 6a 65 63 74 5f 68 61 73 68 28 | >lockedPackages[spl_object_hash( |
83d00 | 24 70 61 63 6b 61 67 65 29 5d 29 20 7c 7c 20 69 73 73 65 74 28 24 74 68 69 73 2d 3e 66 69 78 65 | $package)]).||.isset($this->fixe |
83d20 | 64 4c 6f 63 6b 65 64 50 61 63 6b 61 67 65 73 5b 73 70 6c 5f 6f 62 6a 65 63 74 5f 68 61 73 68 28 | dLockedPackages[spl_object_hash( |
83d40 | 24 70 61 63 6b 61 67 65 29 5d 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 | $package)]);.}.....public.functi |
83d60 | 6f 6e 20 67 65 74 46 69 78 65 64 4f 72 4c 6f 63 6b 65 64 50 61 63 6b 61 67 65 73 28 29 3a 20 61 | on.getFixedOrLockedPackages():.a |
83d80 | 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 61 72 72 61 79 5f 6d 65 72 67 65 28 24 74 68 69 73 2d | rray.{.return.array_merge($this- |
83da0 | 3e 66 69 78 65 64 50 61 63 6b 61 67 65 73 2c 20 24 74 68 69 73 2d 3e 6c 6f 63 6b 65 64 50 61 63 | >fixedPackages,.$this->lockedPac |
83dc0 | 6b 61 67 65 73 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 | kages);.}..........public.functi |
83de0 | 6f 6e 20 67 65 74 50 72 65 73 65 6e 74 4d 61 70 28 62 6f 6f 6c 20 24 70 61 63 6b 61 67 65 49 64 | on.getPresentMap(bool.$packageId |
83e00 | 73 20 3d 20 66 61 6c 73 65 29 3a 20 61 72 72 61 79 0a 7b 0a 24 70 72 65 73 65 6e 74 4d 61 70 20 | s.=.false):.array.{.$presentMap. |
83e20 | 3d 20 5b 5d 3b 0a 0a 69 66 20 28 24 74 68 69 73 2d 3e 6c 6f 63 6b 65 64 52 65 70 6f 73 69 74 6f | =.[];..if.($this->lockedReposito |
83e40 | 72 79 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 6c 6f 63 6b 65 64 52 65 70 6f | ry).{.foreach.($this->lockedRepo |
83e60 | 73 69 74 6f 72 79 2d 3e 67 65 74 50 61 63 6b 61 67 65 73 28 29 20 61 73 20 24 70 61 63 6b 61 67 | sitory->getPackages().as.$packag |
83e80 | 65 29 20 7b 0a 24 70 72 65 73 65 6e 74 4d 61 70 5b 24 70 61 63 6b 61 67 65 49 64 73 20 3f 20 24 | e).{.$presentMap[$packageIds.?.$ |
83ea0 | 70 61 63 6b 61 67 65 2d 3e 67 65 74 49 64 28 29 20 3a 20 73 70 6c 5f 6f 62 6a 65 63 74 5f 68 61 | package->getId().:.spl_object_ha |
83ec0 | 73 68 28 24 70 61 63 6b 61 67 65 29 5d 20 3d 20 24 70 61 63 6b 61 67 65 3b 0a 7d 0a 7d 0a 0a 66 | sh($package)].=.$package;.}.}..f |
83ee0 | 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 66 69 78 65 64 50 61 63 6b 61 67 65 73 20 61 73 20 | oreach.($this->fixedPackages.as. |
83f00 | 24 70 61 63 6b 61 67 65 29 20 7b 0a 24 70 72 65 73 65 6e 74 4d 61 70 5b 24 70 61 63 6b 61 67 65 | $package).{.$presentMap[$package |
83f20 | 49 64 73 20 3f 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 49 64 28 29 20 3a 20 73 70 6c 5f 6f 62 | Ids.?.$package->getId().:.spl_ob |
83f40 | 6a 65 63 74 5f 68 61 73 68 28 24 70 61 63 6b 61 67 65 29 5d 20 3d 20 24 70 61 63 6b 61 67 65 3b | ject_hash($package)].=.$package; |
83f60 | 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 70 72 65 73 65 6e 74 4d 61 70 3b 0a 7d 0a 0a 0a 0a 0a 70 75 | .}..return.$presentMap;.}.....pu |
83f80 | 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 46 69 78 65 64 50 61 63 6b 61 67 65 73 4d 61 | blic.function.getFixedPackagesMa |
83fa0 | 70 28 29 3a 20 61 72 72 61 79 0a 7b 0a 24 66 69 78 65 64 50 61 63 6b 61 67 65 73 4d 61 70 20 3d | p():.array.{.$fixedPackagesMap.= |
83fc0 | 20 5b 5d 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 66 69 78 65 64 50 61 63 6b 61 | .[];..foreach.($this->fixedPacka |
83fe0 | 67 65 73 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 24 66 69 78 65 64 50 61 63 6b 61 67 65 | ges.as.$package).{.$fixedPackage |
84000 | 73 4d 61 70 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 49 64 28 29 5d 20 3d 20 24 70 61 63 6b 61 | sMap[$package->getId()].=.$packa |
84020 | 67 65 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 66 69 78 65 64 50 61 63 6b 61 67 65 73 4d 61 70 3b | ge;.}..return.$fixedPackagesMap; |
84040 | 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 4c 6f 63 6b 65 64 | .}.....public.function.getLocked |
84060 | 52 65 70 6f 73 69 74 6f 72 79 28 29 3a 20 3f 4c 6f 63 6b 41 72 72 61 79 52 65 70 6f 73 69 74 6f | Repository():.?LockArrayReposito |
84080 | 72 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 6c 6f 63 6b 65 64 52 65 70 6f 73 69 74 | ry.{.return.$this->lockedReposit |
840a0 | 6f 72 79 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 | ory;.}.}.<?php.declare(strict_ty |
840c0 | 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d | pes=1);............namespace.Com |
840e0 | 70 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 3b 0a 0a 75 73 65 20 43 | poser\DependencyResolver;..use.C |
84100 | 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 41 6c 69 61 73 50 61 63 6b 61 67 65 3b 0a 75 73 | omposer\Package\AliasPackage;.us |
84120 | 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 42 61 73 65 50 61 63 6b 61 67 65 3b 0a | e.Composer\Package\BasePackage;. |
84140 | 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 4c 69 6e 6b 3b 0a 75 73 65 20 43 | use.Composer\Package\Link;.use.C |
84160 | 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 | omposer\Repository\PlatformRepos |
84180 | 69 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 52 | itory;.use.Composer\Repository\R |
841a0 | 65 70 6f 73 69 74 6f 72 79 53 65 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 | epositorySet;.use.Composer\Packa |
841c0 | 67 65 5c 56 65 72 73 69 6f 6e 5c 56 65 72 73 69 6f 6e 50 61 72 73 65 72 3b 0a 75 73 65 20 43 6f | ge\Version\VersionParser;.use.Co |
841e0 | 6d 70 6f 73 65 72 5c 53 65 6d 76 65 72 5c 43 6f 6e 73 74 72 61 69 6e 74 5c 43 6f 6e 73 74 72 61 | mposer\Semver\Constraint\Constra |
84200 | 69 6e 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 65 6d 76 65 72 5c 43 6f 6e 73 74 72 61 | int;.use.Composer\Semver\Constra |
84220 | 69 6e 74 5c 43 6f 6e 73 74 72 61 69 6e 74 49 6e 74 65 72 66 61 63 65 3b 0a 0a 0a 0a 0a 0a 0a 61 | int\ConstraintInterface;.......a |
84240 | 62 73 74 72 61 63 74 20 63 6c 61 73 73 20 52 75 6c 65 0a 7b 0a 0a 70 75 62 6c 69 63 20 63 6f 6e | bstract.class.Rule.{..public.con |
84260 | 73 74 20 52 55 4c 45 5f 52 4f 4f 54 5f 52 45 51 55 49 52 45 20 3d 20 32 3b 20 0a 70 75 62 6c 69 | st.RULE_ROOT_REQUIRE.=.2;..publi |
84280 | 63 20 63 6f 6e 73 74 20 52 55 4c 45 5f 46 49 58 45 44 20 3d 20 33 3b 20 0a 70 75 62 6c 69 63 20 | c.const.RULE_FIXED.=.3;..public. |
842a0 | 63 6f 6e 73 74 20 52 55 4c 45 5f 50 41 43 4b 41 47 45 5f 43 4f 4e 46 4c 49 43 54 20 3d 20 36 3b | const.RULE_PACKAGE_CONFLICT.=.6; |
842c0 | 20 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 52 55 4c 45 5f 50 41 43 4b 41 47 45 5f 52 45 51 55 | ..public.const.RULE_PACKAGE_REQU |
842e0 | 49 52 45 53 20 3d 20 37 3b 20 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 52 55 4c 45 5f 50 41 43 | IRES.=.7;..public.const.RULE_PAC |
84300 | 4b 41 47 45 5f 53 41 4d 45 5f 4e 41 4d 45 20 3d 20 31 30 3b 20 0a 70 75 62 6c 69 63 20 63 6f 6e | KAGE_SAME_NAME.=.10;..public.con |
84320 | 73 74 20 52 55 4c 45 5f 4c 45 41 52 4e 45 44 20 3d 20 31 32 3b 20 0a 70 75 62 6c 69 63 20 63 6f | st.RULE_LEARNED.=.12;..public.co |
84340 | 6e 73 74 20 52 55 4c 45 5f 50 41 43 4b 41 47 45 5f 41 4c 49 41 53 20 3d 20 31 33 3b 20 0a 70 75 | nst.RULE_PACKAGE_ALIAS.=.13;..pu |
84360 | 62 6c 69 63 20 63 6f 6e 73 74 20 52 55 4c 45 5f 50 41 43 4b 41 47 45 5f 49 4e 56 45 52 53 45 5f | blic.const.RULE_PACKAGE_INVERSE_ |
84380 | 41 4c 49 41 53 20 3d 20 31 34 3b 20 0a 0a 0a 70 72 69 76 61 74 65 20 63 6f 6e 73 74 20 42 49 54 | ALIAS.=.14;....private.const.BIT |
843a0 | 46 49 45 4c 44 5f 54 59 50 45 20 3d 20 30 3b 0a 70 72 69 76 61 74 65 20 63 6f 6e 73 74 20 42 49 | FIELD_TYPE.=.0;.private.const.BI |
843c0 | 54 46 49 45 4c 44 5f 52 45 41 53 4f 4e 20 3d 20 38 3b 0a 70 72 69 76 61 74 65 20 63 6f 6e 73 74 | TFIELD_REASON.=.8;.private.const |
843e0 | 20 42 49 54 46 49 45 4c 44 5f 44 49 53 41 42 4c 45 44 20 3d 20 31 36 3b 0a 0a 0a 70 72 6f 74 65 | .BITFIELD_DISABLED.=.16;...prote |
84400 | 63 74 65 64 20 24 62 69 74 66 69 65 6c 64 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 72 65 71 75 | cted.$bitfield;..protected.$requ |
84420 | 65 73 74 3b 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 72 65 61 73 6f 6e 44 61 74 61 3b 0a | est;.....protected.$reasonData;. |
84440 | 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 | .......public.function.__constru |
84460 | 63 74 28 24 72 65 61 73 6f 6e 2c 20 24 72 65 61 73 6f 6e 44 61 74 61 29 0a 7b 0a 24 74 68 69 73 | ct($reason,.$reasonData).{.$this |
84480 | 2d 3e 72 65 61 73 6f 6e 44 61 74 61 20 3d 20 24 72 65 61 73 6f 6e 44 61 74 61 3b 0a 0a 24 74 68 | ->reasonData.=.$reasonData;..$th |
844a0 | 69 73 2d 3e 62 69 74 66 69 65 6c 64 20 3d 20 28 30 20 3c 3c 20 73 65 6c 66 3a 3a 42 49 54 46 49 | is->bitfield.=.(0.<<.self::BITFI |
844c0 | 45 4c 44 5f 44 49 53 41 42 4c 45 44 29 20 7c 0a 28 24 72 65 61 73 6f 6e 20 3c 3c 20 73 65 6c 66 | ELD_DISABLED).|.($reason.<<.self |
844e0 | 3a 3a 42 49 54 46 49 45 4c 44 5f 52 45 41 53 4f 4e 29 20 7c 0a 28 32 35 35 20 3c 3c 20 73 65 6c | ::BITFIELD_REASON).|.(255.<<.sel |
84500 | 66 3a 3a 42 49 54 46 49 45 4c 44 5f 54 59 50 45 29 3b 0a 7d 0a 0a 0a 0a 0a 61 62 73 74 72 61 63 | f::BITFIELD_TYPE);.}.....abstrac |
84520 | 74 20 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 4c 69 74 65 72 61 6c 73 28 29 3a | t.public.function.getLiterals(): |
84540 | 20 61 72 72 61 79 3b 0a 0a 0a 0a 0a 61 62 73 74 72 61 63 74 20 70 75 62 6c 69 63 20 66 75 6e 63 | .array;.....abstract.public.func |
84560 | 74 69 6f 6e 20 67 65 74 48 61 73 68 28 29 3b 0a 0a 61 62 73 74 72 61 63 74 20 70 75 62 6c 69 63 | tion.getHash();..abstract.public |
84580 | 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 74 6f 53 74 72 69 6e 67 28 29 3a 20 73 74 72 69 6e 67 3b 0a | .function.__toString():.string;. |
845a0 | 0a 61 62 73 74 72 61 63 74 20 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 65 71 75 61 6c 73 | .abstract.public.function.equals |
845c0 | 28 52 75 6c 65 20 24 72 75 6c 65 29 3a 20 62 6f 6f 6c 3b 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 | (Rule.$rule):.bool;.....public.f |
845e0 | 75 6e 63 74 69 6f 6e 20 67 65 74 52 65 61 73 6f 6e 28 29 3a 20 69 6e 74 0a 7b 0a 72 65 74 75 72 | unction.getReason():.int.{.retur |
84600 | 6e 20 28 24 74 68 69 73 2d 3e 62 69 74 66 69 65 6c 64 20 26 20 28 32 35 35 20 3c 3c 20 73 65 6c | n.($this->bitfield.&.(255.<<.sel |
84620 | 66 3a 3a 42 49 54 46 49 45 4c 44 5f 52 45 41 53 4f 4e 29 29 20 3e 3e 20 73 65 6c 66 3a 3a 42 49 | f::BITFIELD_REASON)).>>.self::BI |
84640 | 54 46 49 45 4c 44 5f 52 45 41 53 4f 4e 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 | TFIELD_REASON;.}.....public.func |
84660 | 74 69 6f 6e 20 67 65 74 52 65 61 73 6f 6e 44 61 74 61 28 29 0a 7b 0a 72 65 74 75 72 6e 20 24 74 | tion.getReasonData().{.return.$t |
84680 | 68 69 73 2d 3e 72 65 61 73 6f 6e 44 61 74 61 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 | his->reasonData;.}..public.funct |
846a0 | 69 6f 6e 20 67 65 74 52 65 71 75 69 72 65 64 50 61 63 6b 61 67 65 28 29 3a 20 3f 73 74 72 69 6e | ion.getRequiredPackage():.?strin |
846c0 | 67 0a 7b 0a 73 77 69 74 63 68 20 28 24 74 68 69 73 2d 3e 67 65 74 52 65 61 73 6f 6e 28 29 29 20 | g.{.switch.($this->getReason()). |
846e0 | 7b 0a 63 61 73 65 20 73 65 6c 66 3a 3a 52 55 4c 45 5f 52 4f 4f 54 5f 52 45 51 55 49 52 45 3a 0a | {.case.self::RULE_ROOT_REQUIRE:. |
84700 | 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 67 65 74 52 65 61 73 6f 6e 44 61 74 61 28 29 5b 27 70 | return.$this->getReasonData()['p |
84720 | 61 63 6b 61 67 65 4e 61 6d 65 27 5d 3b 0a 63 61 73 65 20 73 65 6c 66 3a 3a 52 55 4c 45 5f 46 49 | ackageName'];.case.self::RULE_FI |
84740 | 58 45 44 3a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 67 65 74 52 65 61 73 6f 6e 44 61 74 61 | XED:.return.$this->getReasonData |
84760 | 28 29 5b 27 70 61 63 6b 61 67 65 27 5d 2d 3e 67 65 74 4e 61 6d 65 28 29 3b 0a 63 61 73 65 20 73 | ()['package']->getName();.case.s |
84780 | 65 6c 66 3a 3a 52 55 4c 45 5f 50 41 43 4b 41 47 45 5f 52 45 51 55 49 52 45 53 3a 0a 72 65 74 75 | elf::RULE_PACKAGE_REQUIRES:.retu |
847a0 | 72 6e 20 24 74 68 69 73 2d 3e 67 65 74 52 65 61 73 6f 6e 44 61 74 61 28 29 2d 3e 67 65 74 54 61 | rn.$this->getReasonData()->getTa |
847c0 | 72 67 65 74 28 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0a 7d 0a 0a 0a 0a 0a 70 75 | rget();.}..return.null;.}.....pu |
847e0 | 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 54 79 70 65 28 24 74 79 70 65 29 3a 20 76 6f | blic.function.setType($type):.vo |
84800 | 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 62 69 74 66 69 65 6c 64 20 3d 20 28 24 74 68 69 73 2d 3e 62 | id.{.$this->bitfield.=.($this->b |
84820 | 69 74 66 69 65 6c 64 20 26 20 7e 28 32 35 35 20 3c 3c 20 73 65 6c 66 3a 3a 42 49 54 46 49 45 4c | itfield.&.~(255.<<.self::BITFIEL |
84840 | 44 5f 54 59 50 45 29 29 20 7c 20 28 28 32 35 35 20 26 20 24 74 79 70 65 29 20 3c 3c 20 73 65 6c | D_TYPE)).|.((255.&.$type).<<.sel |
84860 | 66 3a 3a 42 49 54 46 49 45 4c 44 5f 54 59 50 45 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e | f::BITFIELD_TYPE);.}..public.fun |
84880 | 63 74 69 6f 6e 20 67 65 74 54 79 70 65 28 29 3a 20 69 6e 74 0a 7b 0a 72 65 74 75 72 6e 20 28 24 | ction.getType():.int.{.return.($ |
848a0 | 74 68 69 73 2d 3e 62 69 74 66 69 65 6c 64 20 26 20 28 32 35 35 20 3c 3c 20 73 65 6c 66 3a 3a 42 | this->bitfield.&.(255.<<.self::B |
848c0 | 49 54 46 49 45 4c 44 5f 54 59 50 45 29 29 20 3e 3e 20 73 65 6c 66 3a 3a 42 49 54 46 49 45 4c 44 | ITFIELD_TYPE)).>>.self::BITFIELD |
848e0 | 5f 54 59 50 45 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 64 69 73 61 62 6c | _TYPE;.}..public.function.disabl |
84900 | 65 28 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 62 69 74 66 69 65 6c 64 20 3d 20 28 24 | e():.void.{.$this->bitfield.=.($ |
84920 | 74 68 69 73 2d 3e 62 69 74 66 69 65 6c 64 20 26 20 7e 28 32 35 35 20 3c 3c 20 73 65 6c 66 3a 3a | this->bitfield.&.~(255.<<.self:: |
84940 | 42 49 54 46 49 45 4c 44 5f 44 49 53 41 42 4c 45 44 29 29 20 7c 20 28 31 20 3c 3c 20 73 65 6c 66 | BITFIELD_DISABLED)).|.(1.<<.self |
84960 | 3a 3a 42 49 54 46 49 45 4c 44 5f 44 49 53 41 42 4c 45 44 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 | ::BITFIELD_DISABLED);.}..public. |
84980 | 66 75 6e 63 74 69 6f 6e 20 65 6e 61 62 6c 65 28 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d | function.enable():.void.{.$this- |
849a0 | 3e 62 69 74 66 69 65 6c 64 20 26 3d 20 7e 28 32 35 35 20 3c 3c 20 73 65 6c 66 3a 3a 42 49 54 46 | >bitfield.&=.~(255.<<.self::BITF |
849c0 | 49 45 4c 44 5f 44 49 53 41 42 4c 45 44 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 | IELD_DISABLED);.}..public.functi |
849e0 | 6f 6e 20 69 73 44 69 73 61 62 6c 65 64 28 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 28 | on.isDisabled():.bool.{.return.( |
84a00 | 62 6f 6f 6c 29 20 28 28 24 74 68 69 73 2d 3e 62 69 74 66 69 65 6c 64 20 26 20 28 32 35 35 20 3c | bool).(($this->bitfield.&.(255.< |
84a20 | 3c 20 73 65 6c 66 3a 3a 42 49 54 46 49 45 4c 44 5f 44 49 53 41 42 4c 45 44 29 29 20 3e 3e 20 73 | <.self::BITFIELD_DISABLED)).>>.s |
84a40 | 65 6c 66 3a 3a 42 49 54 46 49 45 4c 44 5f 44 49 53 41 42 4c 45 44 29 3b 0a 7d 0a 0a 70 75 62 6c | elf::BITFIELD_DISABLED);.}..publ |
84a60 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 45 6e 61 62 6c 65 64 28 29 3a 20 62 6f 6f 6c 0a 7b 0a | ic.function.isEnabled():.bool.{. |
84a80 | 72 65 74 75 72 6e 20 21 28 28 24 74 68 69 73 2d 3e 62 69 74 66 69 65 6c 64 20 26 20 28 32 35 35 | return.!(($this->bitfield.&.(255 |
84aa0 | 20 3c 3c 20 73 65 6c 66 3a 3a 42 49 54 46 49 45 4c 44 5f 44 49 53 41 42 4c 45 44 29 29 20 3e 3e | .<<.self::BITFIELD_DISABLED)).>> |
84ac0 | 20 73 65 6c 66 3a 3a 42 49 54 46 49 45 4c 44 5f 44 49 53 41 42 4c 45 44 29 3b 0a 7d 0a 0a 61 62 | .self::BITFIELD_DISABLED);.}..ab |
84ae0 | 73 74 72 61 63 74 20 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 41 73 73 65 72 74 69 | stract.public.function.isAsserti |
84b00 | 6f 6e 28 29 3a 20 62 6f 6f 6c 3b 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 43 | on():.bool;..public.function.isC |
84b20 | 61 75 73 65 64 42 79 4c 6f 63 6b 28 52 65 70 6f 73 69 74 6f 72 79 53 65 74 20 24 72 65 70 6f 73 | ausedByLock(RepositorySet.$repos |
84b40 | 69 74 6f 72 79 53 65 74 2c 20 52 65 71 75 65 73 74 20 24 72 65 71 75 65 73 74 2c 20 50 6f 6f 6c | itorySet,.Request.$request,.Pool |
84b60 | 20 24 70 6f 6f 6c 29 3a 20 62 6f 6f 6c 0a 7b 0a 69 66 20 28 24 74 68 69 73 2d 3e 67 65 74 52 65 | .$pool):.bool.{.if.($this->getRe |
84b80 | 61 73 6f 6e 28 29 20 3d 3d 3d 20 73 65 6c 66 3a 3a 52 55 4c 45 5f 50 41 43 4b 41 47 45 5f 52 45 | ason().===.self::RULE_PACKAGE_RE |
84ba0 | 51 55 49 52 45 53 29 20 7b 0a 69 66 20 28 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 | QUIRES).{.if.(PlatformRepository |
84bc0 | 3a 3a 69 73 50 6c 61 74 66 6f 72 6d 50 61 63 6b 61 67 65 28 24 74 68 69 73 2d 3e 67 65 74 52 65 | ::isPlatformPackage($this->getRe |
84be0 | 61 73 6f 6e 44 61 74 61 28 29 2d 3e 67 65 74 54 61 72 67 65 74 28 29 29 29 20 7b 0a 72 65 74 75 | asonData()->getTarget())).{.retu |
84c00 | 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 69 66 20 28 24 72 65 71 75 65 73 74 2d 3e 67 65 74 4c 6f 63 | rn.false;.}.if.($request->getLoc |
84c20 | 6b 65 64 52 65 70 6f 73 69 74 6f 72 79 28 29 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 72 65 71 | kedRepository()).{.foreach.($req |
84c40 | 75 65 73 74 2d 3e 67 65 74 4c 6f 63 6b 65 64 52 65 70 6f 73 69 74 6f 72 79 28 29 2d 3e 67 65 74 | uest->getLockedRepository()->get |
84c60 | 50 61 63 6b 61 67 65 73 28 29 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 69 66 20 28 24 70 | Packages().as.$package).{.if.($p |
84c80 | 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 20 3d 3d 3d 20 24 74 68 69 73 2d 3e 67 65 74 | ackage->getName().===.$this->get |
84ca0 | 52 65 61 73 6f 6e 44 61 74 61 28 29 2d 3e 67 65 74 54 61 72 67 65 74 28 29 29 20 7b 0a 69 66 20 | ReasonData()->getTarget()).{.if. |
84cc0 | 28 24 70 6f 6f 6c 2d 3e 69 73 55 6e 61 63 63 65 70 74 61 62 6c 65 46 69 78 65 64 4f 72 4c 6f 63 | ($pool->isUnacceptableFixedOrLoc |
84ce0 | 6b 65 64 50 61 63 6b 61 67 65 28 24 70 61 63 6b 61 67 65 29 29 20 7b 0a 72 65 74 75 72 6e 20 74 | kedPackage($package)).{.return.t |
84d00 | 72 75 65 3b 0a 7d 0a 69 66 20 28 21 24 74 68 69 73 2d 3e 67 65 74 52 65 61 73 6f 6e 44 61 74 61 | rue;.}.if.(!$this->getReasonData |
84d20 | 28 29 2d 3e 67 65 74 43 6f 6e 73 74 72 61 69 6e 74 28 29 2d 3e 6d 61 74 63 68 65 73 28 6e 65 77 | ()->getConstraint()->matches(new |
84d40 | 20 43 6f 6e 73 74 72 61 69 6e 74 28 27 3d 27 2c 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 56 65 | .Constraint('=',.$package->getVe |
84d60 | 72 73 69 6f 6e 28 29 29 29 29 20 7b 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 0a 69 66 20 | rsion()))).{.return.true;.}..if. |
84d80 | 28 21 24 72 65 71 75 65 73 74 2d 3e 69 73 4c 6f 63 6b 65 64 50 61 63 6b 61 67 65 28 24 70 61 63 | (!$request->isLockedPackage($pac |
84da0 | 6b 61 67 65 29 29 20 7b 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 62 72 65 61 6b 3b 0a 7d | kage)).{.return.true;.}.break;.} |
84dc0 | 0a 7d 0a 7d 0a 7d 0a 0a 69 66 20 28 24 74 68 69 73 2d 3e 67 65 74 52 65 61 73 6f 6e 28 29 20 3d | .}.}.}..if.($this->getReason().= |
84de0 | 3d 3d 20 73 65 6c 66 3a 3a 52 55 4c 45 5f 52 4f 4f 54 5f 52 45 51 55 49 52 45 29 20 7b 0a 69 66 | ==.self::RULE_ROOT_REQUIRE).{.if |
84e00 | 20 28 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 3a 3a 69 73 50 6c 61 74 66 6f 72 6d | .(PlatformRepository::isPlatform |
84e20 | 50 61 63 6b 61 67 65 28 24 74 68 69 73 2d 3e 67 65 74 52 65 61 73 6f 6e 44 61 74 61 28 29 5b 27 | Package($this->getReasonData()[' |
84e40 | 70 61 63 6b 61 67 65 4e 61 6d 65 27 5d 29 29 20 7b 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a | packageName'])).{.return.false;. |
84e60 | 7d 0a 69 66 20 28 24 72 65 71 75 65 73 74 2d 3e 67 65 74 4c 6f 63 6b 65 64 52 65 70 6f 73 69 74 | }.if.($request->getLockedReposit |
84e80 | 6f 72 79 28 29 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 72 65 71 75 65 73 74 2d 3e 67 65 74 4c | ory()).{.foreach.($request->getL |
84ea0 | 6f 63 6b 65 64 52 65 70 6f 73 69 74 6f 72 79 28 29 2d 3e 67 65 74 50 61 63 6b 61 67 65 73 28 29 | ockedRepository()->getPackages() |
84ec0 | 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 69 66 20 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 | .as.$package).{.if.($package->ge |
84ee0 | 74 4e 61 6d 65 28 29 20 3d 3d 3d 20 24 74 68 69 73 2d 3e 67 65 74 52 65 61 73 6f 6e 44 61 74 61 | tName().===.$this->getReasonData |
84f00 | 28 29 5b 27 70 61 63 6b 61 67 65 4e 61 6d 65 27 5d 29 20 7b 0a 69 66 20 28 24 70 6f 6f 6c 2d 3e | ()['packageName']).{.if.($pool-> |
84f20 | 69 73 55 6e 61 63 63 65 70 74 61 62 6c 65 46 69 78 65 64 4f 72 4c 6f 63 6b 65 64 50 61 63 6b 61 | isUnacceptableFixedOrLockedPacka |
84f40 | 67 65 28 24 70 61 63 6b 61 67 65 29 29 20 7b 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 69 | ge($package)).{.return.true;.}.i |
84f60 | 66 20 28 21 24 74 68 69 73 2d 3e 67 65 74 52 65 61 73 6f 6e 44 61 74 61 28 29 5b 27 63 6f 6e 73 | f.(!$this->getReasonData()['cons |
84f80 | 74 72 61 69 6e 74 27 5d 2d 3e 6d 61 74 63 68 65 73 28 6e 65 77 20 43 6f 6e 73 74 72 61 69 6e 74 | traint']->matches(new.Constraint |
84fa0 | 28 27 3d 27 2c 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 29 29 29 20 | ('=',.$package->getVersion()))). |
84fc0 | 7b 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 62 72 65 61 6b 3b 0a 7d 0a 7d 0a 7d 0a 7d 0a | {.return.true;.}.break;.}.}.}.}. |
84fe0 | 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 | .return.false;.}.....public.func |
85000 | 74 69 6f 6e 20 67 65 74 53 6f 75 72 63 65 50 61 63 6b 61 67 65 28 50 6f 6f 6c 20 24 70 6f 6f 6c | tion.getSourcePackage(Pool.$pool |
85020 | 29 3a 20 42 61 73 65 50 61 63 6b 61 67 65 0a 7b 0a 24 6c 69 74 65 72 61 6c 73 20 3d 20 24 74 68 | ):.BasePackage.{.$literals.=.$th |
85040 | 69 73 2d 3e 67 65 74 4c 69 74 65 72 61 6c 73 28 29 3b 0a 0a 73 77 69 74 63 68 20 28 24 74 68 69 | is->getLiterals();..switch.($thi |
85060 | 73 2d 3e 67 65 74 52 65 61 73 6f 6e 28 29 29 20 7b 0a 63 61 73 65 20 73 65 6c 66 3a 3a 52 55 4c | s->getReason()).{.case.self::RUL |
85080 | 45 5f 50 41 43 4b 41 47 45 5f 43 4f 4e 46 4c 49 43 54 3a 0a 24 70 61 63 6b 61 67 65 31 20 3d 20 | E_PACKAGE_CONFLICT:.$package1.=. |
850a0 | 24 74 68 69 73 2d 3e 64 65 64 75 70 6c 69 63 61 74 65 44 65 66 61 75 6c 74 42 72 61 6e 63 68 41 | $this->deduplicateDefaultBranchA |
850c0 | 6c 69 61 73 28 24 70 6f 6f 6c 2d 3e 6c 69 74 65 72 61 6c 54 6f 50 61 63 6b 61 67 65 28 24 6c 69 | lias($pool->literalToPackage($li |
850e0 | 74 65 72 61 6c 73 5b 30 5d 29 29 3b 0a 24 70 61 63 6b 61 67 65 32 20 3d 20 24 74 68 69 73 2d 3e | terals[0]));.$package2.=.$this-> |
85100 | 64 65 64 75 70 6c 69 63 61 74 65 44 65 66 61 75 6c 74 42 72 61 6e 63 68 41 6c 69 61 73 28 24 70 | deduplicateDefaultBranchAlias($p |
85120 | 6f 6f 6c 2d 3e 6c 69 74 65 72 61 6c 54 6f 50 61 63 6b 61 67 65 28 24 6c 69 74 65 72 61 6c 73 5b | ool->literalToPackage($literals[ |
85140 | 31 5d 29 29 3b 0a 0a 24 72 65 61 73 6f 6e 44 61 74 61 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 52 | 1]));..$reasonData.=.$this->getR |
85160 | 65 61 73 6f 6e 44 61 74 61 28 29 3b 0a 0a 69 66 20 28 24 72 65 61 73 6f 6e 44 61 74 61 2d 3e 67 | easonData();..if.($reasonData->g |
85180 | 65 74 53 6f 75 72 63 65 28 29 20 3d 3d 3d 20 24 70 61 63 6b 61 67 65 31 2d 3e 67 65 74 4e 61 6d | etSource().===.$package1->getNam |
851a0 | 65 28 29 29 20 7b 0a 5b 24 70 61 63 6b 61 67 65 32 2c 20 24 70 61 63 6b 61 67 65 31 5d 20 3d 20 | e()).{.[$package2,.$package1].=. |
851c0 | 5b 24 70 61 63 6b 61 67 65 31 2c 20 24 70 61 63 6b 61 67 65 32 5d 3b 0a 7d 0a 0a 72 65 74 75 72 | [$package1,.$package2];.}..retur |
851e0 | 6e 20 24 70 61 63 6b 61 67 65 32 3b 0a 0a 63 61 73 65 20 73 65 6c 66 3a 3a 52 55 4c 45 5f 50 41 | n.$package2;..case.self::RULE_PA |
85200 | 43 4b 41 47 45 5f 52 45 51 55 49 52 45 53 3a 0a 24 73 6f 75 72 63 65 4c 69 74 65 72 61 6c 20 3d | CKAGE_REQUIRES:.$sourceLiteral.= |
85220 | 20 61 72 72 61 79 5f 73 68 69 66 74 28 24 6c 69 74 65 72 61 6c 73 29 3b 0a 24 73 6f 75 72 63 65 | .array_shift($literals);.$source |
85240 | 50 61 63 6b 61 67 65 20 3d 20 24 74 68 69 73 2d 3e 64 65 64 75 70 6c 69 63 61 74 65 44 65 66 61 | Package.=.$this->deduplicateDefa |
85260 | 75 6c 74 42 72 61 6e 63 68 41 6c 69 61 73 28 24 70 6f 6f 6c 2d 3e 6c 69 74 65 72 61 6c 54 6f 50 | ultBranchAlias($pool->literalToP |
85280 | 61 63 6b 61 67 65 28 24 73 6f 75 72 63 65 4c 69 74 65 72 61 6c 29 29 3b 0a 0a 72 65 74 75 72 6e | ackage($sourceLiteral));..return |
852a0 | 20 24 73 6f 75 72 63 65 50 61 63 6b 61 67 65 3b 0a 0a 64 65 66 61 75 6c 74 3a 0a 74 68 72 6f 77 | .$sourcePackage;..default:.throw |
852c0 | 20 6e 65 77 20 5c 4c 6f 67 69 63 45 78 63 65 70 74 69 6f 6e 28 27 4e 6f 74 20 69 6d 70 6c 65 6d | .new.\LogicException('Not.implem |
852e0 | 65 6e 74 65 64 27 29 3b 0a 7d 0a 7d 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f | ented');.}.}......public.functio |
85300 | 6e 20 67 65 74 50 72 65 74 74 79 53 74 72 69 6e 67 28 52 65 70 6f 73 69 74 6f 72 79 53 65 74 20 | n.getPrettyString(RepositorySet. |
85320 | 24 72 65 70 6f 73 69 74 6f 72 79 53 65 74 2c 20 52 65 71 75 65 73 74 20 24 72 65 71 75 65 73 74 | $repositorySet,.Request.$request |
85340 | 2c 20 50 6f 6f 6c 20 24 70 6f 6f 6c 2c 20 62 6f 6f 6c 20 24 69 73 56 65 72 62 6f 73 65 2c 20 61 | ,.Pool.$pool,.bool.$isVerbose,.a |
85360 | 72 72 61 79 20 24 69 6e 73 74 61 6c 6c 65 64 4d 61 70 20 3d 20 5b 5d 2c 20 61 72 72 61 79 20 24 | rray.$installedMap.=.[],.array.$ |
85380 | 6c 65 61 72 6e 65 64 50 6f 6f 6c 20 3d 20 5b 5d 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 24 6c 69 74 | learnedPool.=.[]):.string.{.$lit |
853a0 | 65 72 61 6c 73 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 4c 69 74 65 72 61 6c 73 28 29 3b 0a 0a 73 | erals.=.$this->getLiterals();..s |
853c0 | 77 69 74 63 68 20 28 24 74 68 69 73 2d 3e 67 65 74 52 65 61 73 6f 6e 28 29 29 20 7b 0a 63 61 73 | witch.($this->getReason()).{.cas |
853e0 | 65 20 73 65 6c 66 3a 3a 52 55 4c 45 5f 52 4f 4f 54 5f 52 45 51 55 49 52 45 3a 0a 24 72 65 61 73 | e.self::RULE_ROOT_REQUIRE:.$reas |
85400 | 6f 6e 44 61 74 61 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 52 65 61 73 6f 6e 44 61 74 61 28 29 3b | onData.=.$this->getReasonData(); |
85420 | 0a 24 70 61 63 6b 61 67 65 4e 61 6d 65 20 3d 20 24 72 65 61 73 6f 6e 44 61 74 61 5b 27 70 61 63 | .$packageName.=.$reasonData['pac |
85440 | 6b 61 67 65 4e 61 6d 65 27 5d 3b 0a 24 63 6f 6e 73 74 72 61 69 6e 74 20 3d 20 24 72 65 61 73 6f | kageName'];.$constraint.=.$reaso |
85460 | 6e 44 61 74 61 5b 27 63 6f 6e 73 74 72 61 69 6e 74 27 5d 3b 0a 0a 24 70 61 63 6b 61 67 65 73 20 | nData['constraint'];..$packages. |
85480 | 3d 20 24 70 6f 6f 6c 2d 3e 77 68 61 74 50 72 6f 76 69 64 65 73 28 24 70 61 63 6b 61 67 65 4e 61 | =.$pool->whatProvides($packageNa |
854a0 | 6d 65 2c 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 3b 0a 69 66 20 28 21 24 70 61 63 6b 61 67 65 73 | me,.$constraint);.if.(!$packages |
854c0 | 29 20 7b 0a 72 65 74 75 72 6e 20 27 4e 6f 20 70 61 63 6b 61 67 65 20 66 6f 75 6e 64 20 74 6f 20 | ).{.return.'No.package.found.to. |
854e0 | 73 61 74 69 73 66 79 20 72 6f 6f 74 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 20 72 65 71 75 69 | satisfy.root.composer.json.requi |
85500 | 72 65 20 27 2e 24 70 61 63 6b 61 67 65 4e 61 6d 65 2e 27 20 27 2e 24 63 6f 6e 73 74 72 61 69 6e | re.'.$packageName.'.'.$constrain |
85520 | 74 2d 3e 67 65 74 50 72 65 74 74 79 53 74 72 69 6e 67 28 29 3b 0a 7d 0a 0a 24 70 61 63 6b 61 67 | t->getPrettyString();.}..$packag |
85540 | 65 73 4e 6f 6e 41 6c 69 61 73 20 3d 20 61 72 72 61 79 5f 76 61 6c 75 65 73 28 61 72 72 61 79 5f | esNonAlias.=.array_values(array_ |
85560 | 66 69 6c 74 65 72 28 24 70 61 63 6b 61 67 65 73 2c 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f | filter($packages,.static.functio |
85580 | 6e 20 28 24 70 29 3a 20 62 6f 6f 6c 20 7b 0a 72 65 74 75 72 6e 20 21 28 24 70 20 69 6e 73 74 61 | n.($p):.bool.{.return.!($p.insta |
855a0 | 6e 63 65 6f 66 20 41 6c 69 61 73 50 61 63 6b 61 67 65 29 3b 0a 7d 29 29 3b 0a 69 66 20 28 63 6f | nceof.AliasPackage);.}));.if.(co |
855c0 | 75 6e 74 28 24 70 61 63 6b 61 67 65 73 4e 6f 6e 41 6c 69 61 73 29 20 3d 3d 3d 20 31 29 20 7b 0a | unt($packagesNonAlias).===.1).{. |
855e0 | 24 70 61 63 6b 61 67 65 20 3d 20 24 70 61 63 6b 61 67 65 73 4e 6f 6e 41 6c 69 61 73 5b 30 5d 3b | $package.=.$packagesNonAlias[0]; |
85600 | 0a 69 66 20 28 24 72 65 71 75 65 73 74 2d 3e 69 73 4c 6f 63 6b 65 64 50 61 63 6b 61 67 65 28 24 | .if.($request->isLockedPackage($ |
85620 | 70 61 63 6b 61 67 65 29 29 20 7b 0a 72 65 74 75 72 6e 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 | package)).{.return.$package->get |
85640 | 50 72 65 74 74 79 4e 61 6d 65 28 29 2e 27 20 69 73 20 6c 6f 63 6b 65 64 20 74 6f 20 76 65 72 73 | PrettyName().'.is.locked.to.vers |
85660 | 69 6f 6e 20 27 2e 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 56 65 72 73 69 6f 6e | ion.'.$package->getPrettyVersion |
85680 | 28 29 2e 22 20 61 6e 64 20 61 6e 20 75 70 64 61 74 65 20 6f 66 20 74 68 69 73 20 70 61 63 6b 61 | ().".and.an.update.of.this.packa |
856a0 | 67 65 20 77 61 73 20 6e 6f 74 20 72 65 71 75 65 73 74 65 64 2e 22 3b 0a 7d 0a 7d 0a 0a 72 65 74 | ge.was.not.requested.";.}.}..ret |
856c0 | 75 72 6e 20 27 52 6f 6f 74 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 20 72 65 71 75 69 72 65 73 | urn.'Root.composer.json.requires |
856e0 | 20 27 2e 24 70 61 63 6b 61 67 65 4e 61 6d 65 2e 27 20 27 2e 24 63 6f 6e 73 74 72 61 69 6e 74 2d | .'.$packageName.'.'.$constraint- |
85700 | 3e 67 65 74 50 72 65 74 74 79 53 74 72 69 6e 67 28 29 2e 27 20 2d 3e 20 73 61 74 69 73 66 69 61 | >getPrettyString().'.->.satisfia |
85720 | 62 6c 65 20 62 79 20 27 2e 24 74 68 69 73 2d 3e 66 6f 72 6d 61 74 50 61 63 6b 61 67 65 73 55 6e | ble.by.'.$this->formatPackagesUn |
85740 | 69 71 75 65 28 24 70 6f 6f 6c 2c 20 24 70 61 63 6b 61 67 65 73 2c 20 24 69 73 56 65 72 62 6f 73 | ique($pool,.$packages,.$isVerbos |
85760 | 65 2c 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 2e 27 2e 27 3b 0a 0a 63 61 73 65 20 73 65 6c 66 3a | e,.$constraint).'.';..case.self: |
85780 | 3a 52 55 4c 45 5f 46 49 58 45 44 3a 0a 24 70 61 63 6b 61 67 65 20 3d 20 24 74 68 69 73 2d 3e 64 | :RULE_FIXED:.$package.=.$this->d |
857a0 | 65 64 75 70 6c 69 63 61 74 65 44 65 66 61 75 6c 74 42 72 61 6e 63 68 41 6c 69 61 73 28 24 74 68 | eduplicateDefaultBranchAlias($th |
857c0 | 69 73 2d 3e 67 65 74 52 65 61 73 6f 6e 44 61 74 61 28 29 5b 27 70 61 63 6b 61 67 65 27 5d 29 3b | is->getReasonData()['package']); |
857e0 | 0a 0a 69 66 20 28 24 72 65 71 75 65 73 74 2d 3e 69 73 4c 6f 63 6b 65 64 50 61 63 6b 61 67 65 28 | ..if.($request->isLockedPackage( |
85800 | 24 70 61 63 6b 61 67 65 29 29 20 7b 0a 72 65 74 75 72 6e 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 | $package)).{.return.$package->ge |
85820 | 74 50 72 65 74 74 79 4e 61 6d 65 28 29 2e 27 20 69 73 20 6c 6f 63 6b 65 64 20 74 6f 20 76 65 72 | tPrettyName().'.is.locked.to.ver |
85840 | 73 69 6f 6e 20 27 2e 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 56 65 72 73 69 6f | sion.'.$package->getPrettyVersio |
85860 | 6e 28 29 2e 27 20 61 6e 64 20 61 6e 20 75 70 64 61 74 65 20 6f 66 20 74 68 69 73 20 70 61 63 6b | n().'.and.an.update.of.this.pack |
85880 | 61 67 65 20 77 61 73 20 6e 6f 74 20 72 65 71 75 65 73 74 65 64 2e 27 3b 0a 7d 0a 0a 72 65 74 75 | age.was.not.requested.';.}..retu |
858a0 | 72 6e 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 4e 61 6d 65 28 29 2e 27 20 69 | rn.$package->getPrettyName().'.i |
858c0 | 73 20 70 72 65 73 65 6e 74 20 61 74 20 76 65 72 73 69 6f 6e 20 27 2e 24 70 61 63 6b 61 67 65 2d | s.present.at.version.'.$package- |
858e0 | 3e 67 65 74 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 20 2e 20 27 20 61 6e 64 20 63 61 6e 6e | >getPrettyVersion()...'.and.cann |
85900 | 6f 74 20 62 65 20 6d 6f 64 69 66 69 65 64 20 62 79 20 43 6f 6d 70 6f 73 65 72 27 3b 0a 0a 63 61 | ot.be.modified.by.Composer';..ca |
85920 | 73 65 20 73 65 6c 66 3a 3a 52 55 4c 45 5f 50 41 43 4b 41 47 45 5f 43 4f 4e 46 4c 49 43 54 3a 0a | se.self::RULE_PACKAGE_CONFLICT:. |
85940 | 24 70 61 63 6b 61 67 65 31 20 3d 20 24 74 68 69 73 2d 3e 64 65 64 75 70 6c 69 63 61 74 65 44 65 | $package1.=.$this->deduplicateDe |
85960 | 66 61 75 6c 74 42 72 61 6e 63 68 41 6c 69 61 73 28 24 70 6f 6f 6c 2d 3e 6c 69 74 65 72 61 6c 54 | faultBranchAlias($pool->literalT |
85980 | 6f 50 61 63 6b 61 67 65 28 24 6c 69 74 65 72 61 6c 73 5b 30 5d 29 29 3b 0a 24 70 61 63 6b 61 67 | oPackage($literals[0]));.$packag |
859a0 | 65 32 20 3d 20 24 74 68 69 73 2d 3e 64 65 64 75 70 6c 69 63 61 74 65 44 65 66 61 75 6c 74 42 72 | e2.=.$this->deduplicateDefaultBr |
859c0 | 61 6e 63 68 41 6c 69 61 73 28 24 70 6f 6f 6c 2d 3e 6c 69 74 65 72 61 6c 54 6f 50 61 63 6b 61 67 | anchAlias($pool->literalToPackag |
859e0 | 65 28 24 6c 69 74 65 72 61 6c 73 5b 31 5d 29 29 3b 0a 0a 24 63 6f 6e 66 6c 69 63 74 54 61 72 67 | e($literals[1]));..$conflictTarg |
85a00 | 65 74 20 3d 20 24 70 61 63 6b 61 67 65 31 2d 3e 67 65 74 50 72 65 74 74 79 53 74 72 69 6e 67 28 | et.=.$package1->getPrettyString( |
85a20 | 29 3b 0a 24 72 65 61 73 6f 6e 44 61 74 61 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 52 65 61 73 6f | );.$reasonData.=.$this->getReaso |
85a40 | 6e 44 61 74 61 28 29 3b 0a 0a 0a 69 66 20 28 24 72 65 61 73 6f 6e 44 61 74 61 2d 3e 67 65 74 53 | nData();...if.($reasonData->getS |
85a60 | 6f 75 72 63 65 28 29 20 3d 3d 3d 20 24 70 61 63 6b 61 67 65 31 2d 3e 67 65 74 4e 61 6d 65 28 29 | ource().===.$package1->getName() |
85a80 | 29 20 7b 0a 5b 24 70 61 63 6b 61 67 65 32 2c 20 24 70 61 63 6b 61 67 65 31 5d 20 3d 20 5b 24 70 | ).{.[$package2,.$package1].=.[$p |
85aa0 | 61 63 6b 61 67 65 31 2c 20 24 70 61 63 6b 61 67 65 32 5d 3b 0a 24 63 6f 6e 66 6c 69 63 74 54 61 | ackage1,.$package2];.$conflictTa |
85ac0 | 72 67 65 74 20 3d 20 24 70 61 63 6b 61 67 65 31 2d 3e 67 65 74 50 72 65 74 74 79 4e 61 6d 65 28 | rget.=.$package1->getPrettyName( |
85ae0 | 29 2e 27 20 27 2e 24 72 65 61 73 6f 6e 44 61 74 61 2d 3e 67 65 74 50 72 65 74 74 79 43 6f 6e 73 | ).'.'.$reasonData->getPrettyCons |
85b00 | 74 72 61 69 6e 74 28 29 3b 0a 7d 0a 0a 0a 0a 69 66 20 28 24 72 65 61 73 6f 6e 44 61 74 61 2d 3e | traint();.}....if.($reasonData-> |
85b20 | 67 65 74 54 61 72 67 65 74 28 29 20 21 3d 3d 20 24 70 61 63 6b 61 67 65 31 2d 3e 67 65 74 4e 61 | getTarget().!==.$package1->getNa |
85b40 | 6d 65 28 29 29 20 7b 0a 24 70 72 6f 76 69 64 65 54 79 70 65 20 3d 20 6e 75 6c 6c 3b 0a 24 70 72 | me()).{.$provideType.=.null;.$pr |
85b60 | 6f 76 69 64 65 64 20 3d 20 6e 75 6c 6c 3b 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 | ovided.=.null;.foreach.($package |
85b80 | 31 2d 3e 67 65 74 50 72 6f 76 69 64 65 73 28 29 20 61 73 20 24 70 72 6f 76 69 64 65 29 20 7b 0a | 1->getProvides().as.$provide).{. |
85ba0 | 69 66 20 28 24 70 72 6f 76 69 64 65 2d 3e 67 65 74 54 61 72 67 65 74 28 29 20 3d 3d 3d 20 24 72 | if.($provide->getTarget().===.$r |
85bc0 | 65 61 73 6f 6e 44 61 74 61 2d 3e 67 65 74 54 61 72 67 65 74 28 29 29 20 7b 0a 24 70 72 6f 76 69 | easonData->getTarget()).{.$provi |
85be0 | 64 65 54 79 70 65 20 3d 20 27 70 72 6f 76 69 64 65 73 27 3b 0a 24 70 72 6f 76 69 64 65 64 20 3d | deType.=.'provides';.$provided.= |
85c00 | 20 24 70 72 6f 76 69 64 65 2d 3e 67 65 74 50 72 65 74 74 79 43 6f 6e 73 74 72 61 69 6e 74 28 29 | .$provide->getPrettyConstraint() |
85c20 | 3b 0a 62 72 65 61 6b 3b 0a 7d 0a 7d 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 31 2d | ;.break;.}.}.foreach.($package1- |
85c40 | 3e 67 65 74 52 65 70 6c 61 63 65 73 28 29 20 61 73 20 24 72 65 70 6c 61 63 65 29 20 7b 0a 69 66 | >getReplaces().as.$replace).{.if |
85c60 | 20 28 24 72 65 70 6c 61 63 65 2d 3e 67 65 74 54 61 72 67 65 74 28 29 20 3d 3d 3d 20 24 72 65 61 | .($replace->getTarget().===.$rea |
85c80 | 73 6f 6e 44 61 74 61 2d 3e 67 65 74 54 61 72 67 65 74 28 29 29 20 7b 0a 24 70 72 6f 76 69 64 65 | sonData->getTarget()).{.$provide |
85ca0 | 54 79 70 65 20 3d 20 27 72 65 70 6c 61 63 65 73 27 3b 0a 24 70 72 6f 76 69 64 65 64 20 3d 20 24 | Type.=.'replaces';.$provided.=.$ |
85cc0 | 72 65 70 6c 61 63 65 2d 3e 67 65 74 50 72 65 74 74 79 43 6f 6e 73 74 72 61 69 6e 74 28 29 3b 0a | replace->getPrettyConstraint();. |
85ce0 | 62 72 65 61 6b 3b 0a 7d 0a 7d 0a 69 66 20 28 6e 75 6c 6c 20 21 3d 3d 20 24 70 72 6f 76 69 64 65 | break;.}.}.if.(null.!==.$provide |
85d00 | 54 79 70 65 29 20 7b 0a 24 63 6f 6e 66 6c 69 63 74 54 61 72 67 65 74 20 3d 20 24 72 65 61 73 6f | Type).{.$conflictTarget.=.$reaso |
85d20 | 6e 44 61 74 61 2d 3e 67 65 74 54 61 72 67 65 74 28 29 2e 27 20 27 2e 24 72 65 61 73 6f 6e 44 61 | nData->getTarget().'.'.$reasonDa |
85d40 | 74 61 2d 3e 67 65 74 50 72 65 74 74 79 43 6f 6e 73 74 72 61 69 6e 74 28 29 2e 27 20 28 27 2e 24 | ta->getPrettyConstraint().'.('.$ |
85d60 | 70 61 63 6b 61 67 65 31 2d 3e 67 65 74 50 72 65 74 74 79 53 74 72 69 6e 67 28 29 2e 27 20 27 2e | package1->getPrettyString().'.'. |
85d80 | 24 70 72 6f 76 69 64 65 54 79 70 65 2e 27 20 27 2e 24 72 65 61 73 6f 6e 44 61 74 61 2d 3e 67 65 | $provideType.'.'.$reasonData->ge |
85da0 | 74 54 61 72 67 65 74 28 29 2e 27 20 27 2e 24 70 72 6f 76 69 64 65 64 2e 27 29 27 3b 0a 7d 0a 7d | tTarget().'.'.$provided.')';.}.} |
85dc0 | 0a 0a 72 65 74 75 72 6e 20 24 70 61 63 6b 61 67 65 32 2d 3e 67 65 74 50 72 65 74 74 79 53 74 72 | ..return.$package2->getPrettyStr |
85de0 | 69 6e 67 28 29 2e 27 20 63 6f 6e 66 6c 69 63 74 73 20 77 69 74 68 20 27 2e 24 63 6f 6e 66 6c 69 | ing().'.conflicts.with.'.$confli |
85e00 | 63 74 54 61 72 67 65 74 2e 27 2e 27 3b 0a 0a 63 61 73 65 20 73 65 6c 66 3a 3a 52 55 4c 45 5f 50 | ctTarget.'.';..case.self::RULE_P |
85e20 | 41 43 4b 41 47 45 5f 52 45 51 55 49 52 45 53 3a 0a 24 73 6f 75 72 63 65 4c 69 74 65 72 61 6c 20 | ACKAGE_REQUIRES:.$sourceLiteral. |
85e40 | 3d 20 61 72 72 61 79 5f 73 68 69 66 74 28 24 6c 69 74 65 72 61 6c 73 29 3b 0a 24 73 6f 75 72 63 | =.array_shift($literals);.$sourc |
85e60 | 65 50 61 63 6b 61 67 65 20 3d 20 24 74 68 69 73 2d 3e 64 65 64 75 70 6c 69 63 61 74 65 44 65 66 | ePackage.=.$this->deduplicateDef |
85e80 | 61 75 6c 74 42 72 61 6e 63 68 41 6c 69 61 73 28 24 70 6f 6f 6c 2d 3e 6c 69 74 65 72 61 6c 54 6f | aultBranchAlias($pool->literalTo |
85ea0 | 50 61 63 6b 61 67 65 28 24 73 6f 75 72 63 65 4c 69 74 65 72 61 6c 29 29 3b 0a 24 72 65 61 73 6f | Package($sourceLiteral));.$reaso |
85ec0 | 6e 44 61 74 61 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 52 65 61 73 6f 6e 44 61 74 61 28 29 3b 0a | nData.=.$this->getReasonData();. |
85ee0 | 0a 24 72 65 71 75 69 72 65 73 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 6c 69 74 65 72 | .$requires.=.[];.foreach.($liter |
85f00 | 61 6c 73 20 61 73 20 24 6c 69 74 65 72 61 6c 29 20 7b 0a 24 72 65 71 75 69 72 65 73 5b 5d 20 3d | als.as.$literal).{.$requires[].= |
85f20 | 20 24 70 6f 6f 6c 2d 3e 6c 69 74 65 72 61 6c 54 6f 50 61 63 6b 61 67 65 28 24 6c 69 74 65 72 61 | .$pool->literalToPackage($litera |
85f40 | 6c 29 3b 0a 7d 0a 0a 24 74 65 78 74 20 3d 20 24 72 65 61 73 6f 6e 44 61 74 61 2d 3e 67 65 74 50 | l);.}..$text.=.$reasonData->getP |
85f60 | 72 65 74 74 79 53 74 72 69 6e 67 28 24 73 6f 75 72 63 65 50 61 63 6b 61 67 65 29 3b 0a 69 66 20 | rettyString($sourcePackage);.if. |
85f80 | 28 24 72 65 71 75 69 72 65 73 29 20 7b 0a 24 74 65 78 74 20 2e 3d 20 27 20 2d 3e 20 73 61 74 69 | ($requires).{.$text..=.'.->.sati |
85fa0 | 73 66 69 61 62 6c 65 20 62 79 20 27 20 2e 20 24 74 68 69 73 2d 3e 66 6f 72 6d 61 74 50 61 63 6b | sfiable.by.'...$this->formatPack |
85fc0 | 61 67 65 73 55 6e 69 71 75 65 28 24 70 6f 6f 6c 2c 20 24 72 65 71 75 69 72 65 73 2c 20 24 69 73 | agesUnique($pool,.$requires,.$is |
85fe0 | 56 65 72 62 6f 73 65 2c 20 24 72 65 61 73 6f 6e 44 61 74 61 2d 3e 67 65 74 43 6f 6e 73 74 72 61 | Verbose,.$reasonData->getConstra |
86000 | 69 6e 74 28 29 29 20 2e 20 27 2e 27 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 74 61 72 67 65 74 4e 61 | int())...'.';.}.else.{.$targetNa |
86020 | 6d 65 20 3d 20 24 72 65 61 73 6f 6e 44 61 74 61 2d 3e 67 65 74 54 61 72 67 65 74 28 29 3b 0a 0a | me.=.$reasonData->getTarget();.. |
86040 | 24 72 65 61 73 6f 6e 20 3d 20 50 72 6f 62 6c 65 6d 3a 3a 67 65 74 4d 69 73 73 69 6e 67 50 61 63 | $reason.=.Problem::getMissingPac |
86060 | 6b 61 67 65 52 65 61 73 6f 6e 28 24 72 65 70 6f 73 69 74 6f 72 79 53 65 74 2c 20 24 72 65 71 75 | kageReason($repositorySet,.$requ |
86080 | 65 73 74 2c 20 24 70 6f 6f 6c 2c 20 24 69 73 56 65 72 62 6f 73 65 2c 20 24 74 61 72 67 65 74 4e | est,.$pool,.$isVerbose,.$targetN |
860a0 | 61 6d 65 2c 20 24 72 65 61 73 6f 6e 44 61 74 61 2d 3e 67 65 74 43 6f 6e 73 74 72 61 69 6e 74 28 | ame,.$reasonData->getConstraint( |
860c0 | 29 29 3b 0a 0a 72 65 74 75 72 6e 20 24 74 65 78 74 20 2e 20 27 20 2d 3e 20 27 20 2e 20 24 72 65 | ));..return.$text...'.->.'...$re |
860e0 | 61 73 6f 6e 5b 31 5d 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 74 65 78 74 3b 0a 0a 63 61 73 65 20 | ason[1];.}..return.$text;..case. |
86100 | 73 65 6c 66 3a 3a 52 55 4c 45 5f 50 41 43 4b 41 47 45 5f 53 41 4d 45 5f 4e 41 4d 45 3a 0a 24 70 | self::RULE_PACKAGE_SAME_NAME:.$p |
86120 | 61 63 6b 61 67 65 4e 61 6d 65 73 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 6c 69 74 65 | ackageNames.=.[];.foreach.($lite |
86140 | 72 61 6c 73 20 61 73 20 24 6c 69 74 65 72 61 6c 29 20 7b 0a 24 70 61 63 6b 61 67 65 20 3d 20 24 | rals.as.$literal).{.$package.=.$ |
86160 | 70 6f 6f 6c 2d 3e 6c 69 74 65 72 61 6c 54 6f 50 61 63 6b 61 67 65 28 24 6c 69 74 65 72 61 6c 29 | pool->literalToPackage($literal) |
86180 | 3b 0a 24 70 61 63 6b 61 67 65 4e 61 6d 65 73 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d | ;.$packageNames[$package->getNam |
861a0 | 65 28 29 5d 20 3d 20 74 72 75 65 3b 0a 7d 0a 24 72 65 70 6c 61 63 65 64 4e 61 6d 65 20 3d 20 24 | e()].=.true;.}.$replacedName.=.$ |
861c0 | 74 68 69 73 2d 3e 67 65 74 52 65 61 73 6f 6e 44 61 74 61 28 29 3b 0a 0a 69 66 20 28 63 6f 75 6e | this->getReasonData();..if.(coun |
861e0 | 74 28 24 70 61 63 6b 61 67 65 4e 61 6d 65 73 29 20 3e 20 31 29 20 7b 0a 24 72 65 61 73 6f 6e 20 | t($packageNames).>.1).{.$reason. |
86200 | 3d 20 6e 75 6c 6c 3b 0a 0a 69 66 20 28 21 69 73 73 65 74 28 24 70 61 63 6b 61 67 65 4e 61 6d 65 | =.null;..if.(!isset($packageName |
86220 | 73 5b 24 72 65 70 6c 61 63 65 64 4e 61 6d 65 5d 29 29 20 7b 0a 24 72 65 61 73 6f 6e 20 3d 20 27 | s[$replacedName])).{.$reason.=.' |
86240 | 54 68 65 79 20 27 2e 28 63 6f 75 6e 74 28 24 6c 69 74 65 72 61 6c 73 29 20 3d 3d 3d 20 32 20 3f | They.'.(count($literals).===.2.? |
86260 | 20 27 62 6f 74 68 27 20 3a 20 27 61 6c 6c 27 29 2e 27 20 72 65 70 6c 61 63 65 20 27 2e 24 72 65 | .'both'.:.'all').'.replace.'.$re |
86280 | 70 6c 61 63 65 64 4e 61 6d 65 2e 27 20 61 6e 64 20 74 68 75 73 20 63 61 6e 6e 6f 74 20 63 6f 65 | placedName.'.and.thus.cannot.coe |
862a0 | 78 69 73 74 2e 27 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 72 65 70 6c 61 63 65 72 4e 61 6d 65 73 20 | xist.';.}.else.{.$replacerNames. |
862c0 | 3d 20 24 70 61 63 6b 61 67 65 4e 61 6d 65 73 3b 0a 75 6e 73 65 74 28 24 72 65 70 6c 61 63 65 72 | =.$packageNames;.unset($replacer |
862e0 | 4e 61 6d 65 73 5b 24 72 65 70 6c 61 63 65 64 4e 61 6d 65 5d 29 3b 0a 24 72 65 70 6c 61 63 65 72 | Names[$replacedName]);.$replacer |
86300 | 4e 61 6d 65 73 20 3d 20 61 72 72 61 79 5f 6b 65 79 73 28 24 72 65 70 6c 61 63 65 72 4e 61 6d 65 | Names.=.array_keys($replacerName |
86320 | 73 29 3b 0a 0a 69 66 20 28 63 6f 75 6e 74 28 24 72 65 70 6c 61 63 65 72 4e 61 6d 65 73 29 20 3d | s);..if.(count($replacerNames).= |
86340 | 3d 3d 20 31 29 20 7b 0a 24 72 65 61 73 6f 6e 20 3d 20 24 72 65 70 6c 61 63 65 72 4e 61 6d 65 73 | ==.1).{.$reason.=.$replacerNames |
86360 | 5b 30 5d 20 2e 20 27 20 72 65 70 6c 61 63 65 73 20 27 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 72 65 | [0]...'.replaces.';.}.else.{.$re |
86380 | 61 73 6f 6e 20 3d 20 27 5b 27 2e 69 6d 70 6c 6f 64 65 28 27 2c 20 27 2c 20 24 72 65 70 6c 61 63 | ason.=.'['.implode(',.',.$replac |
863a0 | 65 72 4e 61 6d 65 73 29 2e 27 5d 20 72 65 70 6c 61 63 65 20 27 3b 0a 7d 0a 24 72 65 61 73 6f 6e | erNames).'].replace.';.}.$reason |
863c0 | 20 2e 3d 20 24 72 65 70 6c 61 63 65 64 4e 61 6d 65 2e 27 20 61 6e 64 20 74 68 75 73 20 63 61 6e | ..=.$replacedName.'.and.thus.can |
863e0 | 6e 6f 74 20 63 6f 65 78 69 73 74 20 77 69 74 68 20 69 74 2e 27 3b 0a 7d 0a 0a 24 69 6e 73 74 61 | not.coexist.with.it.';.}..$insta |
86400 | 6c 6c 65 64 50 61 63 6b 61 67 65 73 20 3d 20 5b 5d 3b 0a 24 72 65 6d 6f 76 61 62 6c 65 50 61 63 | lledPackages.=.[];.$removablePac |
86420 | 6b 61 67 65 73 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 6c 69 74 65 72 61 6c 73 20 61 | kages.=.[];.foreach.($literals.a |
86440 | 73 20 24 6c 69 74 65 72 61 6c 29 20 7b 0a 69 66 20 28 69 73 73 65 74 28 24 69 6e 73 74 61 6c 6c | s.$literal).{.if.(isset($install |
86460 | 65 64 4d 61 70 5b 61 62 73 28 24 6c 69 74 65 72 61 6c 29 5d 29 29 20 7b 0a 24 69 6e 73 74 61 6c | edMap[abs($literal)])).{.$instal |
86480 | 6c 65 64 50 61 63 6b 61 67 65 73 5b 5d 20 3d 20 24 70 6f 6f 6c 2d 3e 6c 69 74 65 72 61 6c 54 6f | ledPackages[].=.$pool->literalTo |
864a0 | 50 61 63 6b 61 67 65 28 24 6c 69 74 65 72 61 6c 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 72 65 6d | Package($literal);.}.else.{.$rem |
864c0 | 6f 76 61 62 6c 65 50 61 63 6b 61 67 65 73 5b 5d 20 3d 20 24 70 6f 6f 6c 2d 3e 6c 69 74 65 72 61 | ovablePackages[].=.$pool->litera |
864e0 | 6c 54 6f 50 61 63 6b 61 67 65 28 24 6c 69 74 65 72 61 6c 29 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 24 | lToPackage($literal);.}.}..if.($ |
86500 | 69 6e 73 74 61 6c 6c 65 64 50 61 63 6b 61 67 65 73 20 26 26 20 24 72 65 6d 6f 76 61 62 6c 65 50 | installedPackages.&&.$removableP |
86520 | 61 63 6b 61 67 65 73 29 20 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 66 6f 72 6d 61 74 50 | ackages).{.return.$this->formatP |
86540 | 61 63 6b 61 67 65 73 55 6e 69 71 75 65 28 24 70 6f 6f 6c 2c 20 24 72 65 6d 6f 76 61 62 6c 65 50 | ackagesUnique($pool,.$removableP |
86560 | 61 63 6b 61 67 65 73 2c 20 24 69 73 56 65 72 62 6f 73 65 2c 20 6e 75 6c 6c 2c 20 74 72 75 65 29 | ackages,.$isVerbose,.null,.true) |
86580 | 2e 27 20 63 61 6e 6e 6f 74 20 62 65 20 69 6e 73 74 61 6c 6c 65 64 20 61 73 20 74 68 61 74 20 77 | .'.cannot.be.installed.as.that.w |
865a0 | 6f 75 6c 64 20 72 65 71 75 69 72 65 20 72 65 6d 6f 76 69 6e 67 20 27 2e 24 74 68 69 73 2d 3e 66 | ould.require.removing.'.$this->f |
865c0 | 6f 72 6d 61 74 50 61 63 6b 61 67 65 73 55 6e 69 71 75 65 28 24 70 6f 6f 6c 2c 20 24 69 6e 73 74 | ormatPackagesUnique($pool,.$inst |
865e0 | 61 6c 6c 65 64 50 61 63 6b 61 67 65 73 2c 20 24 69 73 56 65 72 62 6f 73 65 2c 20 6e 75 6c 6c 2c | alledPackages,.$isVerbose,.null, |
86600 | 20 74 72 75 65 29 2e 27 2e 20 27 2e 24 72 65 61 73 6f 6e 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 27 | .true).'..'.$reason;.}..return.' |
86620 | 4f 6e 6c 79 20 6f 6e 65 20 6f 66 20 74 68 65 73 65 20 63 61 6e 20 62 65 20 69 6e 73 74 61 6c 6c | Only.one.of.these.can.be.install |
86640 | 65 64 3a 20 27 2e 24 74 68 69 73 2d 3e 66 6f 72 6d 61 74 50 61 63 6b 61 67 65 73 55 6e 69 71 75 | ed:.'.$this->formatPackagesUniqu |
86660 | 65 28 24 70 6f 6f 6c 2c 20 24 6c 69 74 65 72 61 6c 73 2c 20 24 69 73 56 65 72 62 6f 73 65 2c 20 | e($pool,.$literals,.$isVerbose,. |
86680 | 6e 75 6c 6c 2c 20 74 72 75 65 29 2e 27 2e 20 27 2e 24 72 65 61 73 6f 6e 3b 0a 7d 0a 0a 72 65 74 | null,.true).'..'.$reason;.}..ret |
866a0 | 75 72 6e 20 27 59 6f 75 20 63 61 6e 20 6f 6e 6c 79 20 69 6e 73 74 61 6c 6c 20 6f 6e 65 20 76 65 | urn.'You.can.only.install.one.ve |
866c0 | 72 73 69 6f 6e 20 6f 66 20 61 20 70 61 63 6b 61 67 65 2c 20 73 6f 20 6f 6e 6c 79 20 6f 6e 65 20 | rsion.of.a.package,.so.only.one. |
866e0 | 6f 66 20 74 68 65 73 65 20 63 61 6e 20 62 65 20 69 6e 73 74 61 6c 6c 65 64 3a 20 27 20 2e 20 24 | of.these.can.be.installed:.'...$ |
86700 | 74 68 69 73 2d 3e 66 6f 72 6d 61 74 50 61 63 6b 61 67 65 73 55 6e 69 71 75 65 28 24 70 6f 6f 6c | this->formatPackagesUnique($pool |
86720 | 2c 20 24 6c 69 74 65 72 61 6c 73 2c 20 24 69 73 56 65 72 62 6f 73 65 2c 20 6e 75 6c 6c 2c 20 74 | ,.$literals,.$isVerbose,.null,.t |
86740 | 72 75 65 29 20 2e 20 27 2e 27 3b 0a 63 61 73 65 20 73 65 6c 66 3a 3a 52 55 4c 45 5f 4c 45 41 52 | rue)...'.';.case.self::RULE_LEAR |
86760 | 4e 45 44 3a 0a 0a 0a 0a 0a 0a 0a 0a 24 6c 65 61 72 6e 65 64 53 74 72 69 6e 67 20 3d 20 27 20 28 | NED:........$learnedString.=.'.( |
86780 | 63 6f 6e 66 6c 69 63 74 20 61 6e 61 6c 79 73 69 73 20 72 65 73 75 6c 74 29 27 3b 0a 0a 69 66 20 | conflict.analysis.result)';..if. |
867a0 | 28 63 6f 75 6e 74 28 24 6c 69 74 65 72 61 6c 73 29 20 3d 3d 3d 20 31 29 20 7b 0a 24 72 75 6c 65 | (count($literals).===.1).{.$rule |
867c0 | 54 65 78 74 20 3d 20 24 70 6f 6f 6c 2d 3e 6c 69 74 65 72 61 6c 54 6f 50 72 65 74 74 79 53 74 72 | Text.=.$pool->literalToPrettyStr |
867e0 | 69 6e 67 28 24 6c 69 74 65 72 61 6c 73 5b 30 5d 2c 20 24 69 6e 73 74 61 6c 6c 65 64 4d 61 70 29 | ing($literals[0],.$installedMap) |
86800 | 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 67 72 6f 75 70 73 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 | ;.}.else.{.$groups.=.[];.foreach |
86820 | 20 28 24 6c 69 74 65 72 61 6c 73 20 61 73 20 24 6c 69 74 65 72 61 6c 29 20 7b 0a 24 70 61 63 6b | .($literals.as.$literal).{.$pack |
86840 | 61 67 65 20 3d 20 24 70 6f 6f 6c 2d 3e 6c 69 74 65 72 61 6c 54 6f 50 61 63 6b 61 67 65 28 24 6c | age.=.$pool->literalToPackage($l |
86860 | 69 74 65 72 61 6c 29 3b 0a 69 66 20 28 69 73 73 65 74 28 24 69 6e 73 74 61 6c 6c 65 64 4d 61 70 | iteral);.if.(isset($installedMap |
86880 | 5b 24 70 61 63 6b 61 67 65 2d 3e 69 64 5d 29 29 20 7b 0a 24 67 72 6f 75 70 20 3d 20 24 6c 69 74 | [$package->id])).{.$group.=.$lit |
868a0 | 65 72 61 6c 20 3e 20 30 20 3f 20 27 6b 65 65 70 27 20 3a 20 27 72 65 6d 6f 76 65 27 3b 0a 7d 20 | eral.>.0.?.'keep'.:.'remove';.}. |
868c0 | 65 6c 73 65 20 7b 0a 24 67 72 6f 75 70 20 3d 20 24 6c 69 74 65 72 61 6c 20 3e 20 30 20 3f 20 27 | else.{.$group.=.$literal.>.0.?.' |
868e0 | 69 6e 73 74 61 6c 6c 27 20 3a 20 27 64 6f 6e 5c 27 74 20 69 6e 73 74 61 6c 6c 27 3b 0a 7d 0a 0a | install'.:.'don\'t.install';.}.. |
86900 | 24 67 72 6f 75 70 73 5b 24 67 72 6f 75 70 5d 5b 5d 20 3d 20 24 74 68 69 73 2d 3e 64 65 64 75 70 | $groups[$group][].=.$this->dedup |
86920 | 6c 69 63 61 74 65 44 65 66 61 75 6c 74 42 72 61 6e 63 68 41 6c 69 61 73 28 24 70 61 63 6b 61 67 | licateDefaultBranchAlias($packag |
86940 | 65 29 3b 0a 7d 0a 24 72 75 6c 65 54 65 78 74 73 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 | e);.}.$ruleTexts.=.[];.foreach.( |
86960 | 24 67 72 6f 75 70 73 20 61 73 20 24 67 72 6f 75 70 20 3d 3e 20 24 70 61 63 6b 61 67 65 73 29 20 | $groups.as.$group.=>.$packages). |
86980 | 7b 0a 24 72 75 6c 65 54 65 78 74 73 5b 5d 20 3d 20 24 67 72 6f 75 70 20 2e 20 28 63 6f 75 6e 74 | {.$ruleTexts[].=.$group...(count |
869a0 | 28 24 70 61 63 6b 61 67 65 73 29 20 3e 20 31 20 3f 20 27 20 6f 6e 65 20 6f 66 27 20 3a 20 27 27 | ($packages).>.1.?.'.one.of'.:.'' |
869c0 | 29 2e 27 20 27 20 2e 20 24 74 68 69 73 2d 3e 66 6f 72 6d 61 74 50 61 63 6b 61 67 65 73 55 6e 69 | ).'.'...$this->formatPackagesUni |
869e0 | 71 75 65 28 24 70 6f 6f 6c 2c 20 24 70 61 63 6b 61 67 65 73 2c 20 24 69 73 56 65 72 62 6f 73 65 | que($pool,.$packages,.$isVerbose |
86a00 | 29 3b 0a 7d 0a 0a 24 72 75 6c 65 54 65 78 74 20 3d 20 69 6d 70 6c 6f 64 65 28 27 20 7c 20 27 2c | );.}..$ruleText.=.implode('.|.', |
86a20 | 20 24 72 75 6c 65 54 65 78 74 73 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 27 43 6f 6e 63 6c 75 73 | .$ruleTexts);.}..return.'Conclus |
86a40 | 69 6f 6e 3a 20 27 2e 24 72 75 6c 65 54 65 78 74 2e 24 6c 65 61 72 6e 65 64 53 74 72 69 6e 67 3b | ion:.'.$ruleText.$learnedString; |
86a60 | 0a 63 61 73 65 20 73 65 6c 66 3a 3a 52 55 4c 45 5f 50 41 43 4b 41 47 45 5f 41 4c 49 41 53 3a 0a | .case.self::RULE_PACKAGE_ALIAS:. |
86a80 | 24 61 6c 69 61 73 50 61 63 6b 61 67 65 20 3d 20 24 70 6f 6f 6c 2d 3e 6c 69 74 65 72 61 6c 54 6f | $aliasPackage.=.$pool->literalTo |
86aa0 | 50 61 63 6b 61 67 65 28 24 6c 69 74 65 72 61 6c 73 5b 30 5d 29 3b 0a 0a 0a 69 66 20 28 24 61 6c | Package($literals[0]);...if.($al |
86ac0 | 69 61 73 50 61 63 6b 61 67 65 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 20 3d 3d 3d 20 56 65 72 | iasPackage->getVersion().===.Ver |
86ae0 | 73 69 6f 6e 50 61 72 73 65 72 3a 3a 44 45 46 41 55 4c 54 5f 42 52 41 4e 43 48 5f 41 4c 49 41 53 | sionParser::DEFAULT_BRANCH_ALIAS |
86b00 | 29 20 7b 0a 72 65 74 75 72 6e 20 27 27 3b 0a 7d 0a 24 70 61 63 6b 61 67 65 20 3d 20 24 74 68 69 | ).{.return.'';.}.$package.=.$thi |
86b20 | 73 2d 3e 64 65 64 75 70 6c 69 63 61 74 65 44 65 66 61 75 6c 74 42 72 61 6e 63 68 41 6c 69 61 73 | s->deduplicateDefaultBranchAlias |
86b40 | 28 24 70 6f 6f 6c 2d 3e 6c 69 74 65 72 61 6c 54 6f 50 61 63 6b 61 67 65 28 24 6c 69 74 65 72 61 | ($pool->literalToPackage($litera |
86b60 | 6c 73 5b 31 5d 29 29 3b 0a 0a 72 65 74 75 72 6e 20 24 61 6c 69 61 73 50 61 63 6b 61 67 65 2d 3e | ls[1]));..return.$aliasPackage-> |
86b80 | 67 65 74 50 72 65 74 74 79 53 74 72 69 6e 67 28 29 20 2e 27 20 69 73 20 61 6e 20 61 6c 69 61 73 | getPrettyString()..'.is.an.alias |
86ba0 | 20 6f 66 20 27 2e 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 53 74 72 69 6e 67 28 | .of.'.$package->getPrettyString( |
86bc0 | 29 2e 27 20 61 6e 64 20 74 68 75 73 20 72 65 71 75 69 72 65 73 20 69 74 20 74 6f 20 62 65 20 69 | ).'.and.thus.requires.it.to.be.i |
86be0 | 6e 73 74 61 6c 6c 65 64 20 74 6f 6f 2e 27 3b 0a 63 61 73 65 20 73 65 6c 66 3a 3a 52 55 4c 45 5f | nstalled.too.';.case.self::RULE_ |
86c00 | 50 41 43 4b 41 47 45 5f 49 4e 56 45 52 53 45 5f 41 4c 49 41 53 3a 0a 0a 24 61 6c 69 61 73 50 61 | PACKAGE_INVERSE_ALIAS:..$aliasPa |
86c20 | 63 6b 61 67 65 20 3d 20 24 70 6f 6f 6c 2d 3e 6c 69 74 65 72 61 6c 54 6f 50 61 63 6b 61 67 65 28 | ckage.=.$pool->literalToPackage( |
86c40 | 24 6c 69 74 65 72 61 6c 73 5b 31 5d 29 3b 0a 0a 0a 69 66 20 28 24 61 6c 69 61 73 50 61 63 6b 61 | $literals[1]);...if.($aliasPacka |
86c60 | 67 65 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 20 3d 3d 3d 20 56 65 72 73 69 6f 6e 50 61 72 73 | ge->getVersion().===.VersionPars |
86c80 | 65 72 3a 3a 44 45 46 41 55 4c 54 5f 42 52 41 4e 43 48 5f 41 4c 49 41 53 29 20 7b 0a 72 65 74 75 | er::DEFAULT_BRANCH_ALIAS).{.retu |
86ca0 | 72 6e 20 27 27 3b 0a 7d 0a 24 70 61 63 6b 61 67 65 20 3d 20 24 74 68 69 73 2d 3e 64 65 64 75 70 | rn.'';.}.$package.=.$this->dedup |
86cc0 | 6c 69 63 61 74 65 44 65 66 61 75 6c 74 42 72 61 6e 63 68 41 6c 69 61 73 28 24 70 6f 6f 6c 2d 3e | licateDefaultBranchAlias($pool-> |
86ce0 | 6c 69 74 65 72 61 6c 54 6f 50 61 63 6b 61 67 65 28 24 6c 69 74 65 72 61 6c 73 5b 30 5d 29 29 3b | literalToPackage($literals[0])); |
86d00 | 0a 0a 72 65 74 75 72 6e 20 24 61 6c 69 61 73 50 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 | ..return.$aliasPackage->getPrett |
86d20 | 79 53 74 72 69 6e 67 28 29 20 2e 27 20 69 73 20 61 6e 20 61 6c 69 61 73 20 6f 66 20 27 2e 24 70 | yString()..'.is.an.alias.of.'.$p |
86d40 | 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 53 74 72 69 6e 67 28 29 2e 27 20 61 6e 64 20 | ackage->getPrettyString().'.and. |
86d60 | 6d 75 73 74 20 62 65 20 69 6e 73 74 61 6c 6c 65 64 20 77 69 74 68 20 69 74 2e 27 3b 0a 64 65 66 | must.be.installed.with.it.';.def |
86d80 | 61 75 6c 74 3a 0a 24 72 75 6c 65 54 65 78 74 20 3d 20 27 27 3b 0a 66 6f 72 65 61 63 68 20 28 24 | ault:.$ruleText.=.'';.foreach.($ |
86da0 | 6c 69 74 65 72 61 6c 73 20 61 73 20 24 69 20 3d 3e 20 24 6c 69 74 65 72 61 6c 29 20 7b 0a 69 66 | literals.as.$i.=>.$literal).{.if |
86dc0 | 20 28 24 69 20 21 3d 3d 20 30 29 20 7b 0a 24 72 75 6c 65 54 65 78 74 20 2e 3d 20 27 7c 27 3b 0a | .($i.!==.0).{.$ruleText..=.'|';. |
86de0 | 7d 0a 24 72 75 6c 65 54 65 78 74 20 2e 3d 20 24 70 6f 6f 6c 2d 3e 6c 69 74 65 72 61 6c 54 6f 50 | }.$ruleText..=.$pool->literalToP |
86e00 | 72 65 74 74 79 53 74 72 69 6e 67 28 24 6c 69 74 65 72 61 6c 2c 20 24 69 6e 73 74 61 6c 6c 65 64 | rettyString($literal,.$installed |
86e20 | 4d 61 70 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 27 28 27 2e 24 72 75 6c 65 54 65 78 74 2e 27 29 | Map);.}..return.'('.$ruleText.') |
86e40 | 27 3b 0a 7d 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 66 6f | ';.}.}.....protected.function.fo |
86e60 | 72 6d 61 74 50 61 63 6b 61 67 65 73 55 6e 69 71 75 65 28 50 6f 6f 6c 20 24 70 6f 6f 6c 2c 20 61 | rmatPackagesUnique(Pool.$pool,.a |
86e80 | 72 72 61 79 20 24 70 61 63 6b 61 67 65 73 2c 20 62 6f 6f 6c 20 24 69 73 56 65 72 62 6f 73 65 2c | rray.$packages,.bool.$isVerbose, |
86ea0 | 20 3f 43 6f 6e 73 74 72 61 69 6e 74 49 6e 74 65 72 66 61 63 65 20 24 63 6f 6e 73 74 72 61 69 6e | .?ConstraintInterface.$constrain |
86ec0 | 74 20 3d 20 6e 75 6c 6c 2c 20 62 6f 6f 6c 20 24 75 73 65 52 65 6d 6f 76 65 64 56 65 72 73 69 6f | t.=.null,.bool.$useRemovedVersio |
86ee0 | 6e 47 72 6f 75 70 20 3d 20 66 61 6c 73 65 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 66 6f 72 65 61 63 | nGroup.=.false):.string.{.foreac |
86f00 | 68 20 28 24 70 61 63 6b 61 67 65 73 20 61 73 20 24 69 6e 64 65 78 20 3d 3e 20 24 70 61 63 6b 61 | h.($packages.as.$index.=>.$packa |
86f20 | 67 65 29 20 7b 0a 69 66 20 28 21 5c 69 73 5f 6f 62 6a 65 63 74 28 24 70 61 63 6b 61 67 65 29 29 | ge).{.if.(!\is_object($package)) |
86f40 | 20 7b 0a 24 70 61 63 6b 61 67 65 73 5b 24 69 6e 64 65 78 5d 20 3d 20 24 70 6f 6f 6c 2d 3e 6c 69 | .{.$packages[$index].=.$pool->li |
86f60 | 74 65 72 61 6c 54 6f 50 61 63 6b 61 67 65 28 24 70 61 63 6b 61 67 65 29 3b 0a 7d 0a 7d 0a 0a 72 | teralToPackage($package);.}.}..r |
86f80 | 65 74 75 72 6e 20 50 72 6f 62 6c 65 6d 3a 3a 67 65 74 50 61 63 6b 61 67 65 4c 69 73 74 28 24 70 | eturn.Problem::getPackageList($p |
86fa0 | 61 63 6b 61 67 65 73 2c 20 24 69 73 56 65 72 62 6f 73 65 2c 20 24 70 6f 6f 6c 2c 20 24 63 6f 6e | ackages,.$isVerbose,.$pool,.$con |
86fc0 | 73 74 72 61 69 6e 74 2c 20 24 75 73 65 52 65 6d 6f 76 65 64 56 65 72 73 69 6f 6e 47 72 6f 75 70 | straint,.$useRemovedVersionGroup |
86fe0 | 29 3b 0a 7d 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 64 65 64 75 70 6c 69 63 61 | );.}..private.function.deduplica |
87000 | 74 65 44 65 66 61 75 6c 74 42 72 61 6e 63 68 41 6c 69 61 73 28 42 61 73 65 50 61 63 6b 61 67 65 | teDefaultBranchAlias(BasePackage |
87020 | 20 24 70 61 63 6b 61 67 65 29 3a 20 42 61 73 65 50 61 63 6b 61 67 65 0a 7b 0a 69 66 20 28 24 70 | .$package):.BasePackage.{.if.($p |
87040 | 61 63 6b 61 67 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 41 6c 69 61 73 50 61 63 6b 61 67 65 20 26 | ackage.instanceof.AliasPackage.& |
87060 | 26 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 20 3d | &.$package->getPrettyVersion().= |
87080 | 3d 3d 20 56 65 72 73 69 6f 6e 50 61 72 73 65 72 3a 3a 44 45 46 41 55 4c 54 5f 42 52 41 4e 43 48 | ==.VersionParser::DEFAULT_BRANCH |
870a0 | 5f 41 4c 49 41 53 29 20 7b 0a 24 70 61 63 6b 61 67 65 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 | _ALIAS).{.$package.=.$package->g |
870c0 | 65 74 41 6c 69 61 73 4f 66 28 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 70 61 63 6b 61 67 65 3b | etAliasOf();.}..return.$package; |
870e0 | 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d | .}.}.<?php.declare(strict_types= |
87100 | 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 | 1);............namespace.Compose |
87120 | 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 3b 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 | r\DependencyResolver;......class |
87140 | 20 52 75 6c 65 32 4c 69 74 65 72 61 6c 73 20 65 78 74 65 6e 64 73 20 52 75 6c 65 0a 7b 0a 0a 70 | .Rule2Literals.extends.Rule.{..p |
87160 | 72 6f 74 65 63 74 65 64 20 24 6c 69 74 65 72 61 6c 31 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 | rotected.$literal1;..protected.$ |
87180 | 6c 69 74 65 72 61 6c 32 3b 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e | literal2;........public.function |
871a0 | 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 69 6e 74 20 24 6c 69 74 65 72 61 6c 31 2c 20 69 6e 74 20 | .__construct(int.$literal1,.int. |
871c0 | 24 6c 69 74 65 72 61 6c 32 2c 20 24 72 65 61 73 6f 6e 2c 20 24 72 65 61 73 6f 6e 44 61 74 61 29 | $literal2,.$reason,.$reasonData) |
871e0 | 0a 7b 0a 70 61 72 65 6e 74 3a 3a 5f 5f 63 6f 6e 73 74 72 75 63 74 28 24 72 65 61 73 6f 6e 2c 20 | .{.parent::__construct($reason,. |
87200 | 24 72 65 61 73 6f 6e 44 61 74 61 29 3b 0a 0a 69 66 20 28 24 6c 69 74 65 72 61 6c 31 20 3c 20 24 | $reasonData);..if.($literal1.<.$ |
87220 | 6c 69 74 65 72 61 6c 32 29 20 7b 0a 24 74 68 69 73 2d 3e 6c 69 74 65 72 61 6c 31 20 3d 20 24 6c | literal2).{.$this->literal1.=.$l |
87240 | 69 74 65 72 61 6c 31 3b 0a 24 74 68 69 73 2d 3e 6c 69 74 65 72 61 6c 32 20 3d 20 24 6c 69 74 65 | iteral1;.$this->literal2.=.$lite |
87260 | 72 61 6c 32 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 74 68 69 73 2d 3e 6c 69 74 65 72 61 6c 31 20 3d | ral2;.}.else.{.$this->literal1.= |
87280 | 20 24 6c 69 74 65 72 61 6c 32 3b 0a 24 74 68 69 73 2d 3e 6c 69 74 65 72 61 6c 32 20 3d 20 24 6c | .$literal2;.$this->literal2.=.$l |
872a0 | 69 74 65 72 61 6c 31 3b 0a 7d 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e | iteral1;.}.}.....public.function |
872c0 | 20 67 65 74 4c 69 74 65 72 61 6c 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 5b | .getLiterals():.array.{.return.[ |
872e0 | 24 74 68 69 73 2d 3e 6c 69 74 65 72 61 6c 31 2c 20 24 74 68 69 73 2d 3e 6c 69 74 65 72 61 6c 32 | $this->literal1,.$this->literal2 |
87300 | 5d 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 48 61 73 68 | ];.}.....public.function.getHash |
87320 | 28 29 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 6c 69 74 65 72 61 6c 31 2e 27 2c 27 2e | ().{.return.$this->literal1.','. |
87340 | 24 74 68 69 73 2d 3e 6c 69 74 65 72 61 6c 32 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c | $this->literal2;.}..........publ |
87360 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 65 71 75 61 6c 73 28 52 75 6c 65 20 24 72 75 6c 65 29 3a 20 | ic.function.equals(Rule.$rule):. |
87380 | 62 6f 6f 6c 0a 7b 0a 0a 69 66 20 28 24 72 75 6c 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 73 65 6c | bool.{..if.($rule.instanceof.sel |
873a0 | 66 29 20 7b 0a 69 66 20 28 24 74 68 69 73 2d 3e 6c 69 74 65 72 61 6c 31 20 21 3d 3d 20 24 72 75 | f).{.if.($this->literal1.!==.$ru |
873c0 | 6c 65 2d 3e 6c 69 74 65 72 61 6c 31 29 20 7b 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a | le->literal1).{.return.false;.}. |
873e0 | 0a 69 66 20 28 24 74 68 69 73 2d 3e 6c 69 74 65 72 61 6c 32 20 21 3d 3d 20 24 72 75 6c 65 2d 3e | .if.($this->literal2.!==.$rule-> |
87400 | 6c 69 74 65 72 61 6c 32 29 20 7b 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 72 65 74 | literal2).{.return.false;.}..ret |
87420 | 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 0a 24 6c 69 74 65 72 61 6c 73 20 3d 20 24 72 75 6c 65 2d 3e | urn.true;.}..$literals.=.$rule-> |
87440 | 67 65 74 4c 69 74 65 72 61 6c 73 28 29 3b 0a 69 66 20 28 32 20 21 3d 3d 20 5c 63 6f 75 6e 74 28 | getLiterals();.if.(2.!==.\count( |
87460 | 24 6c 69 74 65 72 61 6c 73 29 29 20 7b 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 69 | $literals)).{.return.false;.}..i |
87480 | 66 20 28 24 74 68 69 73 2d 3e 6c 69 74 65 72 61 6c 31 20 21 3d 3d 20 24 6c 69 74 65 72 61 6c 73 | f.($this->literal1.!==.$literals |
874a0 | 5b 30 5d 29 20 7b 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 69 66 20 28 24 74 68 69 | [0]).{.return.false;.}..if.($thi |
874c0 | 73 2d 3e 6c 69 74 65 72 61 6c 32 20 21 3d 3d 20 24 6c 69 74 65 72 61 6c 73 5b 31 5d 29 20 7b 0a | s->literal2.!==.$literals[1]).{. |
874e0 | 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a | return.false;.}..return.true;.}. |
87500 | 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 41 73 73 65 72 74 69 6f 6e 28 29 3a | ..public.function.isAssertion(): |
87520 | 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c | .bool.{.return.false;.}.....publ |
87540 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 74 6f 53 74 72 69 6e 67 28 29 3a 20 73 74 72 69 6e 67 | ic.function.__toString():.string |
87560 | 0a 7b 0a 24 72 65 73 75 6c 74 20 3d 20 24 74 68 69 73 2d 3e 69 73 44 69 73 61 62 6c 65 64 28 29 | .{.$result.=.$this->isDisabled() |
87580 | 20 3f 20 27 64 69 73 61 62 6c 65 64 28 27 20 3a 20 27 28 27 3b 0a 0a 24 72 65 73 75 6c 74 20 2e | .?.'disabled('.:.'(';..$result.. |
875a0 | 3d 20 24 74 68 69 73 2d 3e 6c 69 74 65 72 61 6c 31 20 2e 20 27 7c 27 20 2e 20 24 74 68 69 73 2d | =.$this->literal1...'|'...$this- |
875c0 | 3e 6c 69 74 65 72 61 6c 32 20 2e 20 27 29 27 3b 0a 0a 72 65 74 75 72 6e 20 24 72 65 73 75 6c 74 | >literal2...')';..return.$result |
875e0 | 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 | ;.}.}.<?php.declare(strict_types |
87600 | 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 | =1);............namespace.Compos |
87620 | 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 3b 0a 0a 75 73 65 20 43 6f 6d 70 | er\DependencyResolver;..use.Comp |
87640 | 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 52 65 70 6f 73 69 74 6f 72 79 53 65 74 3b 0a 0a | oser\Repository\RepositorySet;.. |
87660 | 0a 0a 0a 0a 63 6c 61 73 73 20 52 75 6c 65 53 65 74 20 69 6d 70 6c 65 6d 65 6e 74 73 20 5c 49 74 | ....class.RuleSet.implements.\It |
87680 | 65 72 61 74 6f 72 41 67 67 72 65 67 61 74 65 2c 20 5c 43 6f 75 6e 74 61 62 6c 65 0a 7b 0a 0a 70 | eratorAggregate,.\Countable.{..p |
876a0 | 75 62 6c 69 63 20 63 6f 6e 73 74 20 54 59 50 45 5f 50 41 43 4b 41 47 45 20 3d 20 30 3b 0a 70 75 | ublic.const.TYPE_PACKAGE.=.0;.pu |
876c0 | 62 6c 69 63 20 63 6f 6e 73 74 20 54 59 50 45 5f 52 45 51 55 45 53 54 20 3d 20 31 3b 0a 70 75 62 | blic.const.TYPE_REQUEST.=.1;.pub |
876e0 | 6c 69 63 20 63 6f 6e 73 74 20 54 59 50 45 5f 4c 45 41 52 4e 45 44 20 3d 20 34 3b 0a 0a 0a 0a 0a | lic.const.TYPE_LEARNED.=.4;..... |
87700 | 0a 0a 70 75 62 6c 69 63 20 24 72 75 6c 65 42 79 49 64 20 3d 20 5b 5d 3b 0a 0a 0a 70 72 6f 74 65 | ..public.$ruleById.=.[];...prote |
87720 | 63 74 65 64 20 73 74 61 74 69 63 20 24 74 79 70 65 73 20 3d 20 5b 0a 73 65 6c 66 3a 3a 54 59 50 | cted.static.$types.=.[.self::TYP |
87740 | 45 5f 50 41 43 4b 41 47 45 20 3d 3e 20 27 50 41 43 4b 41 47 45 27 2c 0a 73 65 6c 66 3a 3a 54 59 | E_PACKAGE.=>.'PACKAGE',.self::TY |
87760 | 50 45 5f 52 45 51 55 45 53 54 20 3d 3e 20 27 52 45 51 55 45 53 54 27 2c 0a 73 65 6c 66 3a 3a 54 | PE_REQUEST.=>.'REQUEST',.self::T |
87780 | 59 50 45 5f 4c 45 41 52 4e 45 44 20 3d 3e 20 27 4c 45 41 52 4e 45 44 27 2c 0a 5d 3b 0a 0a 0a 70 | YPE_LEARNED.=>.'LEARNED',.];...p |
877a0 | 72 6f 74 65 63 74 65 64 20 24 72 75 6c 65 73 3b 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 6e 65 | rotected.$rules;...protected.$ne |
877c0 | 78 74 52 75 6c 65 49 64 20 3d 20 30 3b 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 72 75 6c 65 73 | xtRuleId.=.0;...protected.$rules |
877e0 | 42 79 48 61 73 68 20 3d 20 5b 5d 3b 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f | ByHash.=.[];..public.function.__ |
87800 | 63 6f 6e 73 74 72 75 63 74 28 29 0a 7b 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 67 65 | construct().{.foreach.($this->ge |
87820 | 74 54 79 70 65 73 28 29 20 61 73 20 24 74 79 70 65 29 20 7b 0a 24 74 68 69 73 2d 3e 72 75 6c 65 | tTypes().as.$type).{.$this->rule |
87840 | 73 5b 24 74 79 70 65 5d 20 3d 20 5b 5d 3b 0a 7d 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 | s[$type].=.[];.}.}.....public.fu |
87860 | 6e 63 74 69 6f 6e 20 61 64 64 28 52 75 6c 65 20 24 72 75 6c 65 2c 20 24 74 79 70 65 29 3a 20 76 | nction.add(Rule.$rule,.$type):.v |
87880 | 6f 69 64 0a 7b 0a 69 66 20 28 21 69 73 73 65 74 28 73 65 6c 66 3a 3a 24 74 79 70 65 73 5b 24 74 | oid.{.if.(!isset(self::$types[$t |
878a0 | 79 70 65 5d 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 4f 75 74 4f 66 42 6f 75 6e 64 73 45 | ype])).{.throw.new.\OutOfBoundsE |
878c0 | 78 63 65 70 74 69 6f 6e 28 27 55 6e 6b 6e 6f 77 6e 20 72 75 6c 65 20 74 79 70 65 3a 20 27 20 2e | xception('Unknown.rule.type:.'.. |
878e0 | 20 24 74 79 70 65 29 3b 0a 7d 0a 0a 24 68 61 73 68 20 3d 20 24 72 75 6c 65 2d 3e 67 65 74 48 61 | .$type);.}..$hash.=.$rule->getHa |
87900 | 73 68 28 29 3b 0a 0a 0a 69 66 20 28 69 73 73 65 74 28 24 74 68 69 73 2d 3e 72 75 6c 65 73 42 79 | sh();...if.(isset($this->rulesBy |
87920 | 48 61 73 68 5b 24 68 61 73 68 5d 29 29 20 7b 0a 24 70 6f 74 65 6e 74 69 61 6c 44 75 70 6c 69 63 | Hash[$hash])).{.$potentialDuplic |
87940 | 61 74 65 73 20 3d 20 24 74 68 69 73 2d 3e 72 75 6c 65 73 42 79 48 61 73 68 5b 24 68 61 73 68 5d | ates.=.$this->rulesByHash[$hash] |
87960 | 3b 0a 69 66 20 28 5c 69 73 5f 61 72 72 61 79 28 24 70 6f 74 65 6e 74 69 61 6c 44 75 70 6c 69 63 | ;.if.(\is_array($potentialDuplic |
87980 | 61 74 65 73 29 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 70 6f 74 65 6e 74 69 61 6c 44 75 70 6c | ates)).{.foreach.($potentialDupl |
879a0 | 69 63 61 74 65 73 20 61 73 20 24 70 6f 74 65 6e 74 69 61 6c 44 75 70 6c 69 63 61 74 65 29 20 7b | icates.as.$potentialDuplicate).{ |
879c0 | 0a 69 66 20 28 24 72 75 6c 65 2d 3e 65 71 75 61 6c 73 28 24 70 6f 74 65 6e 74 69 61 6c 44 75 70 | .if.($rule->equals($potentialDup |
879e0 | 6c 69 63 61 74 65 29 29 20 7b 0a 72 65 74 75 72 6e 3b 0a 7d 0a 7d 0a 7d 20 65 6c 73 65 20 7b 0a | licate)).{.return;.}.}.}.else.{. |
87a00 | 69 66 20 28 24 72 75 6c 65 2d 3e 65 71 75 61 6c 73 28 24 70 6f 74 65 6e 74 69 61 6c 44 75 70 6c | if.($rule->equals($potentialDupl |
87a20 | 69 63 61 74 65 73 29 29 20 7b 0a 72 65 74 75 72 6e 3b 0a 7d 0a 7d 0a 7d 0a 0a 69 66 20 28 21 69 | icates)).{.return;.}.}.}..if.(!i |
87a40 | 73 73 65 74 28 24 74 68 69 73 2d 3e 72 75 6c 65 73 5b 24 74 79 70 65 5d 29 29 20 7b 0a 24 74 68 | sset($this->rules[$type])).{.$th |
87a60 | 69 73 2d 3e 72 75 6c 65 73 5b 24 74 79 70 65 5d 20 3d 20 5b 5d 3b 0a 7d 0a 0a 24 74 68 69 73 2d | is->rules[$type].=.[];.}..$this- |
87a80 | 3e 72 75 6c 65 73 5b 24 74 79 70 65 5d 5b 5d 20 3d 20 24 72 75 6c 65 3b 0a 24 74 68 69 73 2d 3e | >rules[$type][].=.$rule;.$this-> |
87aa0 | 72 75 6c 65 42 79 49 64 5b 24 74 68 69 73 2d 3e 6e 65 78 74 52 75 6c 65 49 64 5d 20 3d 20 24 72 | ruleById[$this->nextRuleId].=.$r |
87ac0 | 75 6c 65 3b 0a 24 72 75 6c 65 2d 3e 73 65 74 54 79 70 65 28 24 74 79 70 65 29 3b 0a 0a 24 74 68 | ule;.$rule->setType($type);..$th |
87ae0 | 69 73 2d 3e 6e 65 78 74 52 75 6c 65 49 64 2b 2b 3b 0a 0a 69 66 20 28 21 69 73 73 65 74 28 24 74 | is->nextRuleId++;..if.(!isset($t |
87b00 | 68 69 73 2d 3e 72 75 6c 65 73 42 79 48 61 73 68 5b 24 68 61 73 68 5d 29 29 20 7b 0a 24 74 68 69 | his->rulesByHash[$hash])).{.$thi |
87b20 | 73 2d 3e 72 75 6c 65 73 42 79 48 61 73 68 5b 24 68 61 73 68 5d 20 3d 20 24 72 75 6c 65 3b 0a 7d | s->rulesByHash[$hash].=.$rule;.} |
87b40 | 20 65 6c 73 65 69 66 20 28 5c 69 73 5f 61 72 72 61 79 28 24 74 68 69 73 2d 3e 72 75 6c 65 73 42 | .elseif.(\is_array($this->rulesB |
87b60 | 79 48 61 73 68 5b 24 68 61 73 68 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 72 75 6c 65 73 42 79 48 | yHash[$hash])).{.$this->rulesByH |
87b80 | 61 73 68 5b 24 68 61 73 68 5d 5b 5d 20 3d 20 24 72 75 6c 65 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 | ash[$hash][].=.$rule;.}.else.{.$ |
87ba0 | 6f 72 69 67 69 6e 61 6c 52 75 6c 65 20 3d 20 24 74 68 69 73 2d 3e 72 75 6c 65 73 42 79 48 61 73 | originalRule.=.$this->rulesByHas |
87bc0 | 68 5b 24 68 61 73 68 5d 3b 0a 24 74 68 69 73 2d 3e 72 75 6c 65 73 42 79 48 61 73 68 5b 24 68 61 | h[$hash];.$this->rulesByHash[$ha |
87be0 | 73 68 5d 20 3d 20 5b 24 6f 72 69 67 69 6e 61 6c 52 75 6c 65 2c 20 24 72 75 6c 65 5d 3b 0a 7d 0a | sh].=.[$originalRule,.$rule];.}. |
87c00 | 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 63 6f 75 6e 74 28 29 3a 20 69 6e 74 0a | }..public.function.count():.int. |
87c20 | 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 6e 65 78 74 52 75 6c 65 49 64 3b 0a 7d 0a 0a 70 | {.return.$this->nextRuleId;.}..p |
87c40 | 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 72 75 6c 65 42 79 49 64 28 69 6e 74 20 24 69 64 29 | ublic.function.ruleById(int.$id) |
87c60 | 3a 20 52 75 6c 65 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 72 75 6c 65 42 79 49 64 5b | :.Rule.{.return.$this->ruleById[ |
87c80 | 24 69 64 5d 3b 0a 7d 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 52 75 6c | $id];.}...public.function.getRul |
87ca0 | 65 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 72 75 6c 65 | es():.array.{.return.$this->rule |
87cc0 | 73 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 49 74 65 72 61 74 6f | s;.}..public.function.getIterato |
87ce0 | 72 28 29 3a 20 52 75 6c 65 53 65 74 49 74 65 72 61 74 6f 72 0a 7b 0a 72 65 74 75 72 6e 20 6e 65 | r():.RuleSetIterator.{.return.ne |
87d00 | 77 20 52 75 6c 65 53 65 74 49 74 65 72 61 74 6f 72 28 24 74 68 69 73 2d 3e 67 65 74 52 75 6c 65 | w.RuleSetIterator($this->getRule |
87d20 | 73 28 29 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 49 | s());.}.....public.function.getI |
87d40 | 74 65 72 61 74 6f 72 46 6f 72 28 24 74 79 70 65 73 29 3a 20 52 75 6c 65 53 65 74 49 74 65 72 61 | teratorFor($types):.RuleSetItera |
87d60 | 74 6f 72 0a 7b 0a 69 66 20 28 21 5c 69 73 5f 61 72 72 61 79 28 24 74 79 70 65 73 29 29 20 7b 0a | tor.{.if.(!\is_array($types)).{. |
87d80 | 24 74 79 70 65 73 20 3d 20 5b 24 74 79 70 65 73 5d 3b 0a 7d 0a 0a 24 61 6c 6c 52 75 6c 65 73 20 | $types.=.[$types];.}..$allRules. |
87da0 | 3d 20 24 74 68 69 73 2d 3e 67 65 74 52 75 6c 65 73 28 29 3b 0a 0a 0a 24 72 75 6c 65 73 20 3d 20 | =.$this->getRules();...$rules.=. |
87dc0 | 5b 5d 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 74 79 70 65 73 20 61 73 20 24 74 79 70 65 29 20 7b | [];..foreach.($types.as.$type).{ |
87de0 | 0a 24 72 75 6c 65 73 5b 24 74 79 70 65 5d 20 3d 20 24 61 6c 6c 52 75 6c 65 73 5b 24 74 79 70 65 | .$rules[$type].=.$allRules[$type |
87e00 | 5d 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 6e 65 77 20 52 75 6c 65 53 65 74 49 74 65 72 61 74 6f 72 | ];.}..return.new.RuleSetIterator |
87e20 | 28 24 72 75 6c 65 73 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 | ($rules);.}.....public.function. |
87e40 | 67 65 74 49 74 65 72 61 74 6f 72 57 69 74 68 6f 75 74 28 24 74 79 70 65 73 29 3a 20 52 75 6c 65 | getIteratorWithout($types):.Rule |
87e60 | 53 65 74 49 74 65 72 61 74 6f 72 0a 7b 0a 69 66 20 28 21 5c 69 73 5f 61 72 72 61 79 28 24 74 79 | SetIterator.{.if.(!\is_array($ty |
87e80 | 70 65 73 29 29 20 7b 0a 24 74 79 70 65 73 20 3d 20 5b 24 74 79 70 65 73 5d 3b 0a 7d 0a 0a 24 72 | pes)).{.$types.=.[$types];.}..$r |
87ea0 | 75 6c 65 73 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 52 75 6c 65 73 28 29 3b 0a 0a 66 6f 72 65 61 | ules.=.$this->getRules();..forea |
87ec0 | 63 68 20 28 24 74 79 70 65 73 20 61 73 20 24 74 79 70 65 29 20 7b 0a 75 6e 73 65 74 28 24 72 75 | ch.($types.as.$type).{.unset($ru |
87ee0 | 6c 65 73 5b 24 74 79 70 65 5d 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 6e 65 77 20 52 75 6c 65 53 | les[$type]);.}..return.new.RuleS |
87f00 | 65 74 49 74 65 72 61 74 6f 72 28 24 72 75 6c 65 73 29 3b 0a 7d 0a 0a 0a 70 75 62 6c 69 63 20 66 | etIterator($rules);.}...public.f |
87f20 | 75 6e 63 74 69 6f 6e 20 67 65 74 54 79 70 65 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 24 74 79 70 | unction.getTypes():.array.{.$typ |
87f40 | 65 73 20 3d 20 73 65 6c 66 3a 3a 24 74 79 70 65 73 3b 0a 0a 72 65 74 75 72 6e 20 61 72 72 61 79 | es.=.self::$types;..return.array |
87f60 | 5f 6b 65 79 73 28 24 74 79 70 65 73 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f | _keys($types);.}..public.functio |
87f80 | 6e 20 67 65 74 50 72 65 74 74 79 53 74 72 69 6e 67 28 3f 52 65 70 6f 73 69 74 6f 72 79 53 65 74 | n.getPrettyString(?RepositorySet |
87fa0 | 20 24 72 65 70 6f 73 69 74 6f 72 79 53 65 74 20 3d 20 6e 75 6c 6c 2c 20 3f 52 65 71 75 65 73 74 | .$repositorySet.=.null,.?Request |
87fc0 | 20 24 72 65 71 75 65 73 74 20 3d 20 6e 75 6c 6c 2c 20 3f 50 6f 6f 6c 20 24 70 6f 6f 6c 20 3d 20 | .$request.=.null,.?Pool.$pool.=. |
87fe0 | 6e 75 6c 6c 2c 20 62 6f 6f 6c 20 24 69 73 56 65 72 62 6f 73 65 20 3d 20 66 61 6c 73 65 29 3a 20 | null,.bool.$isVerbose.=.false):. |
88000 | 73 74 72 69 6e 67 0a 7b 0a 24 73 74 72 69 6e 67 20 3d 20 22 5c 6e 22 3b 0a 66 6f 72 65 61 63 68 | string.{.$string.=."\n";.foreach |
88020 | 20 28 24 74 68 69 73 2d 3e 72 75 6c 65 73 20 61 73 20 24 74 79 70 65 20 3d 3e 20 24 72 75 6c 65 | .($this->rules.as.$type.=>.$rule |
88040 | 73 29 20 7b 0a 24 73 74 72 69 6e 67 20 2e 3d 20 73 74 72 5f 70 61 64 28 73 65 6c 66 3a 3a 24 74 | s).{.$string..=.str_pad(self::$t |
88060 | 79 70 65 73 5b 24 74 79 70 65 5d 2c 20 38 2c 20 27 20 27 29 20 2e 20 22 3a 20 22 3b 0a 66 6f 72 | ypes[$type],.8,.'.')...":.";.for |
88080 | 65 61 63 68 20 28 24 72 75 6c 65 73 20 61 73 20 24 72 75 6c 65 29 20 7b 0a 24 73 74 72 69 6e 67 | each.($rules.as.$rule).{.$string |
880a0 | 20 2e 3d 20 28 24 72 65 70 6f 73 69 74 6f 72 79 53 65 74 20 26 26 20 24 72 65 71 75 65 73 74 20 | ..=.($repositorySet.&&.$request. |
880c0 | 26 26 20 24 70 6f 6f 6c 20 3f 20 24 72 75 6c 65 2d 3e 67 65 74 50 72 65 74 74 79 53 74 72 69 6e | &&.$pool.?.$rule->getPrettyStrin |
880e0 | 67 28 24 72 65 70 6f 73 69 74 6f 72 79 53 65 74 2c 20 24 72 65 71 75 65 73 74 2c 20 24 70 6f 6f | g($repositorySet,.$request,.$poo |
88100 | 6c 2c 20 24 69 73 56 65 72 62 6f 73 65 29 20 3a 20 24 72 75 6c 65 29 2e 22 5c 6e 22 3b 0a 7d 0a | l,.$isVerbose).:.$rule)."\n";.}. |
88120 | 24 73 74 72 69 6e 67 20 2e 3d 20 22 5c 6e 5c 6e 22 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 73 74 | $string..=."\n\n";.}..return.$st |
88140 | 72 69 6e 67 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 74 6f 53 74 72 | ring;.}..public.function.__toStr |
88160 | 69 6e 67 28 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 67 65 | ing():.string.{.return.$this->ge |
88180 | 74 50 72 65 74 74 79 53 74 72 69 6e 67 28 29 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 | tPrettyString();.}.}.<?php.decla |
881a0 | 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e | re(strict_types=1);............n |
881c0 | 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f | amespace.Composer\DependencyReso |
881e0 | 6c 76 65 72 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 46 69 6c 74 65 72 5c 50 6c 61 74 66 | lver;..use.Composer\Filter\Platf |
88200 | 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 5c 49 67 6e 6f 72 65 4c 69 73 74 50 | ormRequirementFilter\IgnoreListP |
88220 | 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 3b 0a 75 73 65 20 43 6f | latformRequirementFilter;.use.Co |
88240 | 6d 70 6f 73 65 72 5c 46 69 6c 74 65 72 5c 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e | mposer\Filter\PlatformRequiremen |
88260 | 74 46 69 6c 74 65 72 5c 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 | tFilter\PlatformRequirementFilte |
88280 | 72 46 61 63 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 46 69 6c 74 65 72 5c 50 6c | rFactory;.use.Composer\Filter\Pl |
882a0 | 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 5c 50 6c 61 74 66 6f 72 6d | atformRequirementFilter\Platform |
882c0 | 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 | RequirementFilterInterface;.use. |
882e0 | 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 42 61 73 65 50 61 63 6b 61 67 65 3b 0a 75 73 | Composer\Package\BasePackage;.us |
88300 | 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 41 6c 69 61 73 50 61 63 6b 61 67 65 3b | e.Composer\Package\AliasPackage; |
88320 | 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 52 75 6c 65 53 65 74 47 65 6e 65 72 61 74 6f 72 0a 7b 0a 0a | ......class.RuleSetGenerator.{.. |
88340 | 70 72 6f 74 65 63 74 65 64 20 24 70 6f 6c 69 63 79 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 70 | protected.$policy;..protected.$p |
88360 | 6f 6f 6c 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 72 75 6c 65 73 3b 0a 0a 70 72 6f 74 65 63 74 | ool;..protected.$rules;..protect |
88380 | 65 64 20 24 61 64 64 65 64 4d 61 70 20 3d 20 5b 5d 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 61 | ed.$addedMap.=.[];..protected.$a |
883a0 | 64 64 65 64 50 61 63 6b 61 67 65 73 42 79 4e 61 6d 65 73 20 3d 20 5b 5d 3b 0a 0a 70 75 62 6c 69 | ddedPackagesByNames.=.[];..publi |
883c0 | 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 50 6f 6c 69 63 79 49 6e 74 | c.function.__construct(PolicyInt |
883e0 | 65 72 66 61 63 65 20 24 70 6f 6c 69 63 79 2c 20 50 6f 6f 6c 20 24 70 6f 6f 6c 29 0a 7b 0a 24 74 | erface.$policy,.Pool.$pool).{.$t |
88400 | 68 69 73 2d 3e 70 6f 6c 69 63 79 20 3d 20 24 70 6f 6c 69 63 79 3b 0a 24 74 68 69 73 2d 3e 70 6f | his->policy.=.$policy;.$this->po |
88420 | 6f 6c 20 3d 20 24 70 6f 6f 6c 3b 0a 24 74 68 69 73 2d 3e 72 75 6c 65 73 20 3d 20 6e 65 77 20 52 | ol.=.$pool;.$this->rules.=.new.R |
88440 | 75 6c 65 53 65 74 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 | uleSet;.}................protect |
88460 | 65 64 20 66 75 6e 63 74 69 6f 6e 20 63 72 65 61 74 65 52 65 71 75 69 72 65 52 75 6c 65 28 42 61 | ed.function.createRequireRule(Ba |
88480 | 73 65 50 61 63 6b 61 67 65 20 24 70 61 63 6b 61 67 65 2c 20 61 72 72 61 79 20 24 70 72 6f 76 69 | sePackage.$package,.array.$provi |
884a0 | 64 65 72 73 2c 20 24 72 65 61 73 6f 6e 2c 20 24 72 65 61 73 6f 6e 44 61 74 61 20 3d 20 6e 75 6c | ders,.$reason,.$reasonData.=.nul |
884c0 | 6c 29 3a 20 3f 52 75 6c 65 0a 7b 0a 24 6c 69 74 65 72 61 6c 73 20 3d 20 5b 2d 24 70 61 63 6b 61 | l):.?Rule.{.$literals.=.[-$packa |
884e0 | 67 65 2d 3e 69 64 5d 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 70 72 6f 76 69 64 65 72 73 20 61 73 | ge->id];..foreach.($providers.as |
88500 | 20 24 70 72 6f 76 69 64 65 72 29 20 7b 0a 0a 69 66 20 28 24 70 72 6f 76 69 64 65 72 20 3d 3d 3d | .$provider).{..if.($provider.=== |
88520 | 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0a 7d 0a 24 6c 69 74 | .$package).{.return.null;.}.$lit |
88540 | 65 72 61 6c 73 5b 5d 20 3d 20 24 70 72 6f 76 69 64 65 72 2d 3e 69 64 3b 0a 7d 0a 0a 72 65 74 75 | erals[].=.$provider->id;.}..retu |
88560 | 72 6e 20 6e 65 77 20 47 65 6e 65 72 69 63 52 75 6c 65 28 24 6c 69 74 65 72 61 6c 73 2c 20 24 72 | rn.new.GenericRule($literals,.$r |
88580 | 65 61 73 6f 6e 2c 20 24 72 65 61 73 6f 6e 44 61 74 61 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a | eason,.$reasonData);.}.......... |
885a0 | 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 63 72 65 61 74 65 49 | ......protected.function.createI |
885c0 | 6e 73 74 61 6c 6c 4f 6e 65 4f 66 52 75 6c 65 28 61 72 72 61 79 20 24 70 61 63 6b 61 67 65 73 2c | nstallOneOfRule(array.$packages, |
885e0 | 20 24 72 65 61 73 6f 6e 2c 20 24 72 65 61 73 6f 6e 44 61 74 61 29 3a 20 52 75 6c 65 0a 7b 0a 24 | .$reason,.$reasonData):.Rule.{.$ |
88600 | 6c 69 74 65 72 61 6c 73 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 | literals.=.[];.foreach.($package |
88620 | 73 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 24 6c 69 74 65 72 61 6c 73 5b 5d 20 3d 20 24 | s.as.$package).{.$literals[].=.$ |
88640 | 70 61 63 6b 61 67 65 2d 3e 69 64 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 6e 65 77 20 47 65 6e 65 72 | package->id;.}..return.new.Gener |
88660 | 69 63 52 75 6c 65 28 24 6c 69 74 65 72 61 6c 73 2c 20 24 72 65 61 73 6f 6e 2c 20 24 72 65 61 73 | icRule($literals,.$reason,.$reas |
88680 | 6f 6e 44 61 74 61 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 | onData);.}................protec |
886a0 | 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 63 72 65 61 74 65 52 75 6c 65 32 4c 69 74 65 72 61 6c 73 | ted.function.createRule2Literals |
886c0 | 28 42 61 73 65 50 61 63 6b 61 67 65 20 24 69 73 73 75 65 72 2c 20 42 61 73 65 50 61 63 6b 61 67 | (BasePackage.$issuer,.BasePackag |
886e0 | 65 20 24 70 72 6f 76 69 64 65 72 2c 20 24 72 65 61 73 6f 6e 2c 20 24 72 65 61 73 6f 6e 44 61 74 | e.$provider,.$reason,.$reasonDat |
88700 | 61 20 3d 20 6e 75 6c 6c 29 3a 20 3f 52 75 6c 65 0a 7b 0a 0a 69 66 20 28 24 69 73 73 75 65 72 20 | a.=.null):.?Rule.{..if.($issuer. |
88720 | 3d 3d 3d 20 24 70 72 6f 76 69 64 65 72 29 20 7b 0a 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0a 7d 0a | ===.$provider).{.return.null;.}. |
88740 | 0a 72 65 74 75 72 6e 20 6e 65 77 20 52 75 6c 65 32 4c 69 74 65 72 61 6c 73 28 2d 24 69 73 73 75 | .return.new.Rule2Literals(-$issu |
88760 | 65 72 2d 3e 69 64 2c 20 2d 24 70 72 6f 76 69 64 65 72 2d 3e 69 64 2c 20 24 72 65 61 73 6f 6e 2c | er->id,.-$provider->id,.$reason, |
88780 | 20 24 72 65 61 73 6f 6e 44 61 74 61 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 | .$reasonData);.}.........protect |
887a0 | 65 64 20 66 75 6e 63 74 69 6f 6e 20 63 72 65 61 74 65 4d 75 6c 74 69 43 6f 6e 66 6c 69 63 74 52 | ed.function.createMultiConflictR |
887c0 | 75 6c 65 28 61 72 72 61 79 20 24 70 61 63 6b 61 67 65 73 2c 20 24 72 65 61 73 6f 6e 2c 20 24 72 | ule(array.$packages,.$reason,.$r |
887e0 | 65 61 73 6f 6e 44 61 74 61 29 3a 20 52 75 6c 65 0a 7b 0a 24 6c 69 74 65 72 61 6c 73 20 3d 20 5b | easonData):.Rule.{.$literals.=.[ |
88800 | 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 73 20 61 73 20 24 70 61 63 6b 61 67 | ];.foreach.($packages.as.$packag |
88820 | 65 29 20 7b 0a 24 6c 69 74 65 72 61 6c 73 5b 5d 20 3d 20 2d 24 70 61 63 6b 61 67 65 2d 3e 69 64 | e).{.$literals[].=.-$package->id |
88840 | 3b 0a 7d 0a 0a 69 66 20 28 5c 63 6f 75 6e 74 28 24 6c 69 74 65 72 61 6c 73 29 20 3d 3d 3d 20 32 | ;.}..if.(\count($literals).===.2 |
88860 | 29 20 7b 0a 72 65 74 75 72 6e 20 6e 65 77 20 52 75 6c 65 32 4c 69 74 65 72 61 6c 73 28 24 6c 69 | ).{.return.new.Rule2Literals($li |
88880 | 74 65 72 61 6c 73 5b 30 5d 2c 20 24 6c 69 74 65 72 61 6c 73 5b 31 5d 2c 20 24 72 65 61 73 6f 6e | terals[0],.$literals[1],.$reason |
888a0 | 2c 20 24 72 65 61 73 6f 6e 44 61 74 61 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 6e 65 77 20 4d 75 | ,.$reasonData);.}..return.new.Mu |
888c0 | 6c 74 69 43 6f 6e 66 6c 69 63 74 52 75 6c 65 28 24 6c 69 74 65 72 61 6c 73 2c 20 24 72 65 61 73 | ltiConflictRule($literals,.$reas |
888e0 | 6f 6e 2c 20 24 72 65 61 73 6f 6e 44 61 74 61 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 72 | on,.$reasonData);.}...........pr |
88900 | 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 61 64 64 52 75 6c 65 28 24 74 79 70 65 2c 20 3f 52 | ivate.function.addRule($type,.?R |
88920 | 75 6c 65 20 24 6e 65 77 52 75 6c 65 20 3d 20 6e 75 6c 6c 29 3a 20 76 6f 69 64 0a 7b 0a 69 66 20 | ule.$newRule.=.null):.void.{.if. |
88940 | 28 21 24 6e 65 77 52 75 6c 65 29 20 7b 0a 72 65 74 75 72 6e 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e | (!$newRule).{.return;.}..$this-> |
88960 | 72 75 6c 65 73 2d 3e 61 64 64 28 24 6e 65 77 52 75 6c 65 2c 20 24 74 79 70 65 29 3b 0a 7d 0a 0a | rules->add($newRule,.$type);.}.. |
88980 | 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 61 64 64 52 75 6c 65 73 46 6f 72 50 61 | protected.function.addRulesForPa |
889a0 | 63 6b 61 67 65 28 42 61 73 65 50 61 63 6b 61 67 65 20 24 70 61 63 6b 61 67 65 2c 20 50 6c 61 74 | ckage(BasePackage.$package,.Plat |
889c0 | 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 49 6e 74 65 72 66 61 63 65 20 24 | formRequirementFilterInterface.$ |
889e0 | 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 29 3a 20 76 6f 69 64 | platformRequirementFilter):.void |
88a00 | 0a 7b 0a 0a 24 77 6f 72 6b 51 75 65 75 65 20 3d 20 6e 65 77 20 5c 53 70 6c 51 75 65 75 65 3b 0a | .{..$workQueue.=.new.\SplQueue;. |
88a20 | 24 77 6f 72 6b 51 75 65 75 65 2d 3e 65 6e 71 75 65 75 65 28 24 70 61 63 6b 61 67 65 29 3b 0a 0a | $workQueue->enqueue($package);.. |
88a40 | 77 68 69 6c 65 20 28 21 24 77 6f 72 6b 51 75 65 75 65 2d 3e 69 73 45 6d 70 74 79 28 29 29 20 7b | while.(!$workQueue->isEmpty()).{ |
88a60 | 0a 24 70 61 63 6b 61 67 65 20 3d 20 24 77 6f 72 6b 51 75 65 75 65 2d 3e 64 65 71 75 65 75 65 28 | .$package.=.$workQueue->dequeue( |
88a80 | 29 3b 0a 69 66 20 28 69 73 73 65 74 28 24 74 68 69 73 2d 3e 61 64 64 65 64 4d 61 70 5b 24 70 61 | );.if.(isset($this->addedMap[$pa |
88aa0 | 63 6b 61 67 65 2d 3e 69 64 5d 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 24 74 68 69 | ckage->id])).{.continue;.}..$thi |
88ac0 | 73 2d 3e 61 64 64 65 64 4d 61 70 5b 24 70 61 63 6b 61 67 65 2d 3e 69 64 5d 20 3d 20 24 70 61 63 | s->addedMap[$package->id].=.$pac |
88ae0 | 6b 61 67 65 3b 0a 0a 69 66 20 28 21 24 70 61 63 6b 61 67 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 | kage;..if.(!$package.instanceof. |
88b00 | 41 6c 69 61 73 50 61 63 6b 61 67 65 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 | AliasPackage).{.foreach.($packag |
88b20 | 65 2d 3e 67 65 74 4e 61 6d 65 73 28 66 61 6c 73 65 29 20 61 73 20 24 6e 61 6d 65 29 20 7b 0a 24 | e->getNames(false).as.$name).{.$ |
88b40 | 74 68 69 73 2d 3e 61 64 64 65 64 50 61 63 6b 61 67 65 73 42 79 4e 61 6d 65 73 5b 24 6e 61 6d 65 | this->addedPackagesByNames[$name |
88b60 | 5d 5b 5d 20 3d 20 24 70 61 63 6b 61 67 65 3b 0a 7d 0a 7d 20 65 6c 73 65 20 7b 0a 24 77 6f 72 6b | ][].=.$package;.}.}.else.{.$work |
88b80 | 51 75 65 75 65 2d 3e 65 6e 71 75 65 75 65 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 41 6c 69 61 | Queue->enqueue($package->getAlia |
88ba0 | 73 4f 66 28 29 29 3b 0a 24 74 68 69 73 2d 3e 61 64 64 52 75 6c 65 28 52 75 6c 65 53 65 74 3a 3a | sOf());.$this->addRule(RuleSet:: |
88bc0 | 54 59 50 45 5f 50 41 43 4b 41 47 45 2c 20 24 74 68 69 73 2d 3e 63 72 65 61 74 65 52 65 71 75 69 | TYPE_PACKAGE,.$this->createRequi |
88be0 | 72 65 52 75 6c 65 28 24 70 61 63 6b 61 67 65 2c 20 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 41 | reRule($package,.[$package->getA |
88c00 | 6c 69 61 73 4f 66 28 29 5d 2c 20 52 75 6c 65 3a 3a 52 55 4c 45 5f 50 41 43 4b 41 47 45 5f 41 4c | liasOf()],.Rule::RULE_PACKAGE_AL |
88c20 | 49 41 53 2c 20 24 70 61 63 6b 61 67 65 29 29 3b 0a 0a 0a 24 74 68 69 73 2d 3e 61 64 64 52 75 6c | IAS,.$package));...$this->addRul |
88c40 | 65 28 52 75 6c 65 53 65 74 3a 3a 54 59 50 45 5f 50 41 43 4b 41 47 45 2c 20 24 74 68 69 73 2d 3e | e(RuleSet::TYPE_PACKAGE,.$this-> |
88c60 | 63 72 65 61 74 65 52 65 71 75 69 72 65 52 75 6c 65 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 41 | createRequireRule($package->getA |
88c80 | 6c 69 61 73 4f 66 28 29 2c 20 5b 24 70 61 63 6b 61 67 65 5d 2c 20 52 75 6c 65 3a 3a 52 55 4c 45 | liasOf(),.[$package],.Rule::RULE |
88ca0 | 5f 50 41 43 4b 41 47 45 5f 49 4e 56 45 52 53 45 5f 41 4c 49 41 53 2c 20 24 70 61 63 6b 61 67 65 | _PACKAGE_INVERSE_ALIAS,.$package |
88cc0 | 2d 3e 67 65 74 41 6c 69 61 73 4f 66 28 29 29 29 3b 0a 0a 0a 0a 69 66 20 28 21 24 70 61 63 6b 61 | ->getAliasOf()));....if.(!$packa |
88ce0 | 67 65 2d 3e 68 61 73 53 65 6c 66 56 65 72 73 69 6f 6e 52 65 71 75 69 72 65 73 28 29 29 20 7b 0a | ge->hasSelfVersionRequires()).{. |
88d00 | 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 7d 0a 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 | continue;.}.}..foreach.($package |
88d20 | 2d 3e 67 65 74 52 65 71 75 69 72 65 73 28 29 20 61 73 20 24 6c 69 6e 6b 29 20 7b 0a 24 63 6f 6e | ->getRequires().as.$link).{.$con |
88d40 | 73 74 72 61 69 6e 74 20 3d 20 24 6c 69 6e 6b 2d 3e 67 65 74 43 6f 6e 73 74 72 61 69 6e 74 28 29 | straint.=.$link->getConstraint() |
88d60 | 3b 0a 69 66 20 28 24 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 | ;.if.($platformRequirementFilter |
88d80 | 2d 3e 69 73 49 67 6e 6f 72 65 64 28 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 74 28 29 29 29 | ->isIgnored($link->getTarget())) |
88da0 | 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 70 6c 61 74 66 6f 72 6d | .{.continue;.}.elseif.($platform |
88dc0 | 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 20 69 6e 73 74 61 6e 63 65 6f 66 20 49 67 6e | RequirementFilter.instanceof.Ign |
88de0 | 6f 72 65 4c 69 73 74 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 | oreListPlatformRequirementFilter |
88e00 | 29 20 7b 0a 24 63 6f 6e 73 74 72 61 69 6e 74 20 3d 20 24 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 | ).{.$constraint.=.$platformRequi |
88e20 | 72 65 6d 65 6e 74 46 69 6c 74 65 72 2d 3e 66 69 6c 74 65 72 43 6f 6e 73 74 72 61 69 6e 74 28 24 | rementFilter->filterConstraint($ |
88e40 | 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 74 28 29 2c 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 3b | link->getTarget(),.$constraint); |
88e60 | 0a 7d 0a 0a 24 70 6f 73 73 69 62 6c 65 52 65 71 75 69 72 65 73 20 3d 20 24 74 68 69 73 2d 3e 70 | .}..$possibleRequires.=.$this->p |
88e80 | 6f 6f 6c 2d 3e 77 68 61 74 50 72 6f 76 69 64 65 73 28 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 | ool->whatProvides($link->getTarg |
88ea0 | 65 74 28 29 2c 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 3b 0a 0a 24 74 68 69 73 2d 3e 61 64 64 52 | et(),.$constraint);..$this->addR |
88ec0 | 75 6c 65 28 52 75 6c 65 53 65 74 3a 3a 54 59 50 45 5f 50 41 43 4b 41 47 45 2c 20 24 74 68 69 73 | ule(RuleSet::TYPE_PACKAGE,.$this |
88ee0 | 2d 3e 63 72 65 61 74 65 52 65 71 75 69 72 65 52 75 6c 65 28 24 70 61 63 6b 61 67 65 2c 20 24 70 | ->createRequireRule($package,.$p |
88f00 | 6f 73 73 69 62 6c 65 52 65 71 75 69 72 65 73 2c 20 52 75 6c 65 3a 3a 52 55 4c 45 5f 50 41 43 4b | ossibleRequires,.Rule::RULE_PACK |
88f20 | 41 47 45 5f 52 45 51 55 49 52 45 53 2c 20 24 6c 69 6e 6b 29 29 3b 0a 0a 66 6f 72 65 61 63 68 20 | AGE_REQUIRES,.$link));..foreach. |
88f40 | 28 24 70 6f 73 73 69 62 6c 65 52 65 71 75 69 72 65 73 20 61 73 20 24 72 65 71 75 69 72 65 29 20 | ($possibleRequires.as.$require). |
88f60 | 7b 0a 24 77 6f 72 6b 51 75 65 75 65 2d 3e 65 6e 71 75 65 75 65 28 24 72 65 71 75 69 72 65 29 3b | {.$workQueue->enqueue($require); |
88f80 | 0a 7d 0a 7d 0a 7d 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 61 64 64 | .}.}.}.}..protected.function.add |
88fa0 | 43 6f 6e 66 6c 69 63 74 52 75 6c 65 73 28 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e | ConflictRules(PlatformRequiremen |
88fc0 | 74 46 69 6c 74 65 72 49 6e 74 65 72 66 61 63 65 20 24 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 | tFilterInterface.$platformRequir |
88fe0 | 65 6d 65 6e 74 46 69 6c 74 65 72 29 3a 20 76 6f 69 64 0a 7b 0a 0a 66 6f 72 65 61 63 68 20 28 24 | ementFilter):.void.{..foreach.($ |
89000 | 74 68 69 73 2d 3e 61 64 64 65 64 4d 61 70 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 66 6f | this->addedMap.as.$package).{.fo |
89020 | 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 43 6f 6e 66 6c 69 63 74 73 28 29 20 | reach.($package->getConflicts(). |
89040 | 61 73 20 24 6c 69 6e 6b 29 20 7b 0a 0a 69 66 20 28 21 69 73 73 65 74 28 24 74 68 69 73 2d 3e 61 | as.$link).{..if.(!isset($this->a |
89060 | 64 64 65 64 50 61 63 6b 61 67 65 73 42 79 4e 61 6d 65 73 5b 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 | ddedPackagesByNames[$link->getTa |
89080 | 72 67 65 74 28 29 5d 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 24 63 6f 6e 73 74 72 | rget()])).{.continue;.}..$constr |
890a0 | 61 69 6e 74 20 3d 20 24 6c 69 6e 6b 2d 3e 67 65 74 43 6f 6e 73 74 72 61 69 6e 74 28 29 3b 0a 69 | aint.=.$link->getConstraint();.i |
890c0 | 66 20 28 24 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 2d 3e 69 | f.($platformRequirementFilter->i |
890e0 | 73 49 67 6e 6f 72 65 64 28 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 74 28 29 29 29 20 7b 0a | sIgnored($link->getTarget())).{. |
89100 | 63 6f 6e 74 69 6e 75 65 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 70 6c 61 74 66 6f 72 6d 52 65 71 | continue;.}.elseif.($platformReq |
89120 | 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 20 69 6e 73 74 61 6e 63 65 6f 66 20 49 67 6e 6f 72 65 | uirementFilter.instanceof.Ignore |
89140 | 4c 69 73 74 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 29 20 7b | ListPlatformRequirementFilter).{ |
89160 | 0a 24 63 6f 6e 73 74 72 61 69 6e 74 20 3d 20 24 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d | .$constraint.=.$platformRequirem |
89180 | 65 6e 74 46 69 6c 74 65 72 2d 3e 66 69 6c 74 65 72 43 6f 6e 73 74 72 61 69 6e 74 28 24 6c 69 6e | entFilter->filterConstraint($lin |
891a0 | 6b 2d 3e 67 65 74 54 61 72 67 65 74 28 29 2c 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 3b 0a 7d 0a | k->getTarget(),.$constraint);.}. |
891c0 | 0a 24 63 6f 6e 66 6c 69 63 74 73 20 3d 20 24 74 68 69 73 2d 3e 70 6f 6f 6c 2d 3e 77 68 61 74 50 | .$conflicts.=.$this->pool->whatP |
891e0 | 72 6f 76 69 64 65 73 28 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 74 28 29 2c 20 24 63 6f 6e | rovides($link->getTarget(),.$con |
89200 | 73 74 72 61 69 6e 74 29 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 63 6f 6e 66 6c 69 63 74 73 20 61 | straint);..foreach.($conflicts.a |
89220 | 73 20 24 63 6f 6e 66 6c 69 63 74 29 20 7b 0a 0a 0a 0a 69 66 20 28 21 24 63 6f 6e 66 6c 69 63 74 | s.$conflict).{....if.(!$conflict |
89240 | 20 69 6e 73 74 61 6e 63 65 6f 66 20 41 6c 69 61 73 50 61 63 6b 61 67 65 20 7c 7c 20 24 63 6f 6e | .instanceof.AliasPackage.||.$con |
89260 | 66 6c 69 63 74 2d 3e 67 65 74 4e 61 6d 65 28 29 20 3d 3d 3d 20 24 6c 69 6e 6b 2d 3e 67 65 74 54 | flict->getName().===.$link->getT |
89280 | 61 72 67 65 74 28 29 29 20 7b 0a 24 74 68 69 73 2d 3e 61 64 64 52 75 6c 65 28 52 75 6c 65 53 65 | arget()).{.$this->addRule(RuleSe |
892a0 | 74 3a 3a 54 59 50 45 5f 50 41 43 4b 41 47 45 2c 20 24 74 68 69 73 2d 3e 63 72 65 61 74 65 52 75 | t::TYPE_PACKAGE,.$this->createRu |
892c0 | 6c 65 32 4c 69 74 65 72 61 6c 73 28 24 70 61 63 6b 61 67 65 2c 20 24 63 6f 6e 66 6c 69 63 74 2c | le2Literals($package,.$conflict, |
892e0 | 20 52 75 6c 65 3a 3a 52 55 4c 45 5f 50 41 43 4b 41 47 45 5f 43 4f 4e 46 4c 49 43 54 2c 20 24 6c | .Rule::RULE_PACKAGE_CONFLICT,.$l |
89300 | 69 6e 6b 29 29 3b 0a 7d 0a 7d 0a 7d 0a 7d 0a 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e | ink));.}.}.}.}..foreach.($this-> |
89320 | 61 64 64 65 64 50 61 63 6b 61 67 65 73 42 79 4e 61 6d 65 73 20 61 73 20 24 6e 61 6d 65 20 3d 3e | addedPackagesByNames.as.$name.=> |
89340 | 20 24 70 61 63 6b 61 67 65 73 29 20 7b 0a 69 66 20 28 5c 63 6f 75 6e 74 28 24 70 61 63 6b 61 67 | .$packages).{.if.(\count($packag |
89360 | 65 73 29 20 3e 20 31 29 20 7b 0a 24 72 65 61 73 6f 6e 20 3d 20 52 75 6c 65 3a 3a 52 55 4c 45 5f | es).>.1).{.$reason.=.Rule::RULE_ |
89380 | 50 41 43 4b 41 47 45 5f 53 41 4d 45 5f 4e 41 4d 45 3b 0a 24 74 68 69 73 2d 3e 61 64 64 52 75 6c | PACKAGE_SAME_NAME;.$this->addRul |
893a0 | 65 28 52 75 6c 65 53 65 74 3a 3a 54 59 50 45 5f 50 41 43 4b 41 47 45 2c 20 24 74 68 69 73 2d 3e | e(RuleSet::TYPE_PACKAGE,.$this-> |
893c0 | 63 72 65 61 74 65 4d 75 6c 74 69 43 6f 6e 66 6c 69 63 74 52 75 6c 65 28 24 70 61 63 6b 61 67 65 | createMultiConflictRule($package |
893e0 | 73 2c 20 24 72 65 61 73 6f 6e 2c 20 24 6e 61 6d 65 29 29 3b 0a 7d 0a 7d 0a 7d 0a 0a 70 72 6f 74 | s,.$reason,.$name));.}.}.}..prot |
89400 | 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 61 64 64 52 75 6c 65 73 46 6f 72 52 65 71 75 65 73 | ected.function.addRulesForReques |
89420 | 74 28 52 65 71 75 65 73 74 20 24 72 65 71 75 65 73 74 2c 20 50 6c 61 74 66 6f 72 6d 52 65 71 75 | t(Request.$request,.PlatformRequ |
89440 | 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 49 6e 74 65 72 66 61 63 65 20 24 70 6c 61 74 66 6f 72 6d | irementFilterInterface.$platform |
89460 | 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 29 3a 20 76 6f 69 64 0a 7b 0a 66 6f 72 65 61 | RequirementFilter):.void.{.forea |
89480 | 63 68 20 28 24 72 65 71 75 65 73 74 2d 3e 67 65 74 46 69 78 65 64 50 61 63 6b 61 67 65 73 28 29 | ch.($request->getFixedPackages() |
894a0 | 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 69 66 20 28 24 70 61 63 6b 61 67 65 2d 3e 69 64 | .as.$package).{.if.($package->id |
894c0 | 20 3d 3d 3d 20 2d 31 29 20 7b 0a 0a 69 66 20 28 24 74 68 69 73 2d 3e 70 6f 6f 6c 2d 3e 69 73 55 | .===.-1).{..if.($this->pool->isU |
894e0 | 6e 61 63 63 65 70 74 61 62 6c 65 46 69 78 65 64 4f 72 4c 6f 63 6b 65 64 50 61 63 6b 61 67 65 28 | nacceptableFixedOrLockedPackage( |
89500 | 24 70 61 63 6b 61 67 65 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 0a 74 68 72 6f 77 | $package)).{.continue;.}...throw |
89520 | 20 6e 65 77 20 5c 4c 6f 67 69 63 45 78 63 65 70 74 69 6f 6e 28 22 46 69 78 65 64 20 70 61 63 6b | .new.\LogicException("Fixed.pack |
89540 | 61 67 65 20 22 2e 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 53 74 72 69 6e 67 28 | age.".$package->getPrettyString( |
89560 | 29 2e 22 20 77 61 73 20 6e 6f 74 20 61 64 64 65 64 20 74 6f 20 73 6f 6c 76 65 72 20 70 6f 6f 6c | ).".was.not.added.to.solver.pool |
89580 | 2e 22 29 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 61 64 64 52 75 6c 65 73 46 6f 72 50 61 63 6b 61 67 | .");.}..$this->addRulesForPackag |
895a0 | 65 28 24 70 61 63 6b 61 67 65 2c 20 24 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 | e($package,.$platformRequirement |
895c0 | 46 69 6c 74 65 72 29 3b 0a 0a 24 72 75 6c 65 20 3d 20 24 74 68 69 73 2d 3e 63 72 65 61 74 65 49 | Filter);..$rule.=.$this->createI |
895e0 | 6e 73 74 61 6c 6c 4f 6e 65 4f 66 52 75 6c 65 28 5b 24 70 61 63 6b 61 67 65 5d 2c 20 52 75 6c 65 | nstallOneOfRule([$package],.Rule |
89600 | 3a 3a 52 55 4c 45 5f 46 49 58 45 44 2c 20 5b 0a 27 70 61 63 6b 61 67 65 27 20 3d 3e 20 24 70 61 | ::RULE_FIXED,.[.'package'.=>.$pa |
89620 | 63 6b 61 67 65 2c 0a 5d 29 3b 0a 24 74 68 69 73 2d 3e 61 64 64 52 75 6c 65 28 52 75 6c 65 53 65 | ckage,.]);.$this->addRule(RuleSe |
89640 | 74 3a 3a 54 59 50 45 5f 52 45 51 55 45 53 54 2c 20 24 72 75 6c 65 29 3b 0a 7d 0a 0a 66 6f 72 65 | t::TYPE_REQUEST,.$rule);.}..fore |
89660 | 61 63 68 20 28 24 72 65 71 75 65 73 74 2d 3e 67 65 74 52 65 71 75 69 72 65 73 28 29 20 61 73 20 | ach.($request->getRequires().as. |
89680 | 24 70 61 63 6b 61 67 65 4e 61 6d 65 20 3d 3e 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 20 7b 0a 69 | $packageName.=>.$constraint).{.i |
896a0 | 66 20 28 24 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 2d 3e 69 | f.($platformRequirementFilter->i |
896c0 | 73 49 67 6e 6f 72 65 64 28 24 70 61 63 6b 61 67 65 4e 61 6d 65 29 29 20 7b 0a 63 6f 6e 74 69 6e | sIgnored($packageName)).{.contin |
896e0 | 75 65 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 | ue;.}.elseif.($platformRequireme |
89700 | 6e 74 46 69 6c 74 65 72 20 69 6e 73 74 61 6e 63 65 6f 66 20 49 67 6e 6f 72 65 4c 69 73 74 50 6c | ntFilter.instanceof.IgnoreListPl |
89720 | 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 29 20 7b 0a 24 63 6f 6e 73 | atformRequirementFilter).{.$cons |
89740 | 74 72 61 69 6e 74 20 3d 20 24 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c | traint.=.$platformRequirementFil |
89760 | 74 65 72 2d 3e 66 69 6c 74 65 72 43 6f 6e 73 74 72 61 69 6e 74 28 24 70 61 63 6b 61 67 65 4e 61 | ter->filterConstraint($packageNa |
89780 | 6d 65 2c 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 3b 0a 7d 0a 0a 24 70 61 63 6b 61 67 65 73 20 3d | me,.$constraint);.}..$packages.= |
897a0 | 20 24 74 68 69 73 2d 3e 70 6f 6f 6c 2d 3e 77 68 61 74 50 72 6f 76 69 64 65 73 28 24 70 61 63 6b | .$this->pool->whatProvides($pack |
897c0 | 61 67 65 4e 61 6d 65 2c 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 3b 0a 69 66 20 28 24 70 61 63 6b | ageName,.$constraint);.if.($pack |
897e0 | 61 67 65 73 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 73 20 61 73 20 24 70 | ages).{.foreach.($packages.as.$p |
89800 | 61 63 6b 61 67 65 29 20 7b 0a 24 74 68 69 73 2d 3e 61 64 64 52 75 6c 65 73 46 6f 72 50 61 63 6b | ackage).{.$this->addRulesForPack |
89820 | 61 67 65 28 24 70 61 63 6b 61 67 65 2c 20 24 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 | age($package,.$platformRequireme |
89840 | 6e 74 46 69 6c 74 65 72 29 3b 0a 7d 0a 0a 24 72 75 6c 65 20 3d 20 24 74 68 69 73 2d 3e 63 72 65 | ntFilter);.}..$rule.=.$this->cre |
89860 | 61 74 65 49 6e 73 74 61 6c 6c 4f 6e 65 4f 66 52 75 6c 65 28 24 70 61 63 6b 61 67 65 73 2c 20 52 | ateInstallOneOfRule($packages,.R |
89880 | 75 6c 65 3a 3a 52 55 4c 45 5f 52 4f 4f 54 5f 52 45 51 55 49 52 45 2c 20 5b 0a 27 70 61 63 6b 61 | ule::RULE_ROOT_REQUIRE,.[.'packa |
898a0 | 67 65 4e 61 6d 65 27 20 3d 3e 20 24 70 61 63 6b 61 67 65 4e 61 6d 65 2c 0a 27 63 6f 6e 73 74 72 | geName'.=>.$packageName,.'constr |
898c0 | 61 69 6e 74 27 20 3d 3e 20 24 63 6f 6e 73 74 72 61 69 6e 74 2c 0a 5d 29 3b 0a 24 74 68 69 73 2d | aint'.=>.$constraint,.]);.$this- |
898e0 | 3e 61 64 64 52 75 6c 65 28 52 75 6c 65 53 65 74 3a 3a 54 59 50 45 5f 52 45 51 55 45 53 54 2c 20 | >addRule(RuleSet::TYPE_REQUEST,. |
89900 | 24 72 75 6c 65 29 3b 0a 7d 0a 7d 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f | $rule);.}.}.}..protected.functio |
89920 | 6e 20 61 64 64 52 75 6c 65 73 46 6f 72 52 6f 6f 74 41 6c 69 61 73 65 73 28 50 6c 61 74 66 6f 72 | n.addRulesForRootAliases(Platfor |
89940 | 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 49 6e 74 65 72 66 61 63 65 20 24 70 6c 61 | mRequirementFilterInterface.$pla |
89960 | 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 29 3a 20 76 6f 69 64 0a 7b 0a | tformRequirementFilter):.void.{. |
89980 | 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 70 6f 6f 6c 2d 3e 67 65 74 50 61 63 6b 61 67 65 | foreach.($this->pool->getPackage |
899a0 | 73 28 29 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 0a 0a 0a 69 66 20 28 21 69 73 73 65 74 | s().as.$package).{....if.(!isset |
899c0 | 28 24 74 68 69 73 2d 3e 61 64 64 65 64 4d 61 70 5b 24 70 61 63 6b 61 67 65 2d 3e 69 64 5d 29 20 | ($this->addedMap[$package->id]). |
899e0 | 26 26 0a 24 70 61 63 6b 61 67 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 41 6c 69 61 73 50 61 63 6b | &&.$package.instanceof.AliasPack |
89a00 | 61 67 65 20 26 26 0a 28 24 70 61 63 6b 61 67 65 2d 3e 69 73 52 6f 6f 74 50 61 63 6b 61 67 65 41 | age.&&.($package->isRootPackageA |
89a20 | 6c 69 61 73 28 29 20 7c 7c 20 69 73 73 65 74 28 24 74 68 69 73 2d 3e 61 64 64 65 64 4d 61 70 5b | lias().||.isset($this->addedMap[ |
89a40 | 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 41 6c 69 61 73 4f 66 28 29 2d 3e 69 64 5d 29 29 0a 29 20 | $package->getAliasOf()->id])).). |
89a60 | 7b 0a 24 74 68 69 73 2d 3e 61 64 64 52 75 6c 65 73 46 6f 72 50 61 63 6b 61 67 65 28 24 70 61 63 | {.$this->addRulesForPackage($pac |
89a80 | 6b 61 67 65 2c 20 24 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 | kage,.$platformRequirementFilter |
89aa0 | 29 3b 0a 7d 0a 7d 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 52 75 6c | );.}.}.}..public.function.getRul |
89ac0 | 65 73 46 6f 72 28 52 65 71 75 65 73 74 20 24 72 65 71 75 65 73 74 2c 20 3f 50 6c 61 74 66 6f 72 | esFor(Request.$request,.?Platfor |
89ae0 | 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 49 6e 74 65 72 66 61 63 65 20 24 70 6c 61 | mRequirementFilterInterface.$pla |
89b00 | 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 20 3d 20 6e 75 6c 6c 29 3a 20 | tformRequirementFilter.=.null):. |
89b20 | 52 75 6c 65 53 65 74 0a 7b 0a 24 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 | RuleSet.{.$platformRequirementFi |
89b40 | 6c 74 65 72 20 3d 20 24 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 | lter.=.$platformRequirementFilte |
89b60 | 72 20 3f 3a 20 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 46 61 | r.?:.PlatformRequirementFilterFa |
89b80 | 63 74 6f 72 79 3a 3a 69 67 6e 6f 72 65 4e 6f 74 68 69 6e 67 28 29 3b 0a 0a 24 74 68 69 73 2d 3e | ctory::ignoreNothing();..$this-> |
89ba0 | 61 64 64 52 75 6c 65 73 46 6f 72 52 65 71 75 65 73 74 28 24 72 65 71 75 65 73 74 2c 20 24 70 6c | addRulesForRequest($request,.$pl |
89bc0 | 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 29 3b 0a 0a 24 74 68 69 73 | atformRequirementFilter);..$this |
89be0 | 2d 3e 61 64 64 52 75 6c 65 73 46 6f 72 52 6f 6f 74 41 6c 69 61 73 65 73 28 24 70 6c 61 74 66 6f | ->addRulesForRootAliases($platfo |
89c00 | 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 29 3b 0a 0a 24 74 68 69 73 2d 3e 61 64 | rmRequirementFilter);..$this->ad |
89c20 | 64 43 6f 6e 66 6c 69 63 74 52 75 6c 65 73 28 24 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d | dConflictRules($platformRequirem |
89c40 | 65 6e 74 46 69 6c 74 65 72 29 3b 0a 0a 0a 24 74 68 69 73 2d 3e 61 64 64 65 64 4d 61 70 20 3d 20 | entFilter);...$this->addedMap.=. |
89c60 | 24 74 68 69 73 2d 3e 61 64 64 65 64 50 61 63 6b 61 67 65 73 42 79 4e 61 6d 65 73 20 3d 20 5b 5d | $this->addedPackagesByNames.=.[] |
89c80 | 3b 0a 0a 24 72 75 6c 65 73 20 3d 20 24 74 68 69 73 2d 3e 72 75 6c 65 73 3b 0a 0a 24 74 68 69 73 | ;..$rules.=.$this->rules;..$this |
89ca0 | 2d 3e 72 75 6c 65 73 20 3d 20 6e 65 77 20 52 75 6c 65 53 65 74 3b 0a 0a 72 65 74 75 72 6e 20 24 | ->rules.=.new.RuleSet;..return.$ |
89cc0 | 72 75 6c 65 73 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f | rules;.}.}.<?php.declare(strict_ |
89ce0 | 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 | types=1);............namespace.C |
89d00 | 6f 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 3b 0a 0a 0a 0a 0a | omposer\DependencyResolver;..... |
89d20 | 0a 63 6c 61 73 73 20 52 75 6c 65 53 65 74 49 74 65 72 61 74 6f 72 20 69 6d 70 6c 65 6d 65 6e 74 | .class.RuleSetIterator.implement |
89d40 | 73 20 5c 49 74 65 72 61 74 6f 72 0a 7b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 72 75 6c 65 73 3b | s.\Iterator.{..protected.$rules; |
89d60 | 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 74 79 70 65 73 3b 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 | ..protected.$types;...protected. |
89d80 | 24 63 75 72 72 65 6e 74 4f 66 66 73 65 74 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 63 75 72 72 | $currentOffset;..protected.$curr |
89da0 | 65 6e 74 54 79 70 65 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 63 75 72 72 65 6e 74 54 79 70 65 | entType;..protected.$currentType |
89dc0 | 4f 66 66 73 65 74 3b 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f | Offset;.....public.function.__co |
89de0 | 6e 73 74 72 75 63 74 28 61 72 72 61 79 20 24 72 75 6c 65 73 29 0a 7b 0a 24 74 68 69 73 2d 3e 72 | nstruct(array.$rules).{.$this->r |
89e00 | 75 6c 65 73 20 3d 20 24 72 75 6c 65 73 3b 0a 24 74 68 69 73 2d 3e 74 79 70 65 73 20 3d 20 61 72 | ules.=.$rules;.$this->types.=.ar |
89e20 | 72 61 79 5f 6b 65 79 73 28 24 72 75 6c 65 73 29 3b 0a 73 6f 72 74 28 24 74 68 69 73 2d 3e 74 79 | ray_keys($rules);.sort($this->ty |
89e40 | 70 65 73 29 3b 0a 0a 24 74 68 69 73 2d 3e 72 65 77 69 6e 64 28 29 3b 0a 7d 0a 0a 70 75 62 6c 69 | pes);..$this->rewind();.}..publi |
89e60 | 63 20 66 75 6e 63 74 69 6f 6e 20 63 75 72 72 65 6e 74 28 29 3a 20 52 75 6c 65 0a 7b 0a 72 65 74 | c.function.current():.Rule.{.ret |
89e80 | 75 72 6e 20 24 74 68 69 73 2d 3e 72 75 6c 65 73 5b 24 74 68 69 73 2d 3e 63 75 72 72 65 6e 74 54 | urn.$this->rules[$this->currentT |
89ea0 | 79 70 65 5d 5b 24 74 68 69 73 2d 3e 63 75 72 72 65 6e 74 4f 66 66 73 65 74 5d 3b 0a 7d 0a 0a 0a | ype][$this->currentOffset];.}... |
89ec0 | 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 6b 65 79 28 29 3a 20 69 6e 74 0a 7b 0a 72 | ..public.function.key():.int.{.r |
89ee0 | 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 63 75 72 72 65 6e 74 54 79 70 65 3b 0a 7d 0a 0a 70 75 62 | eturn.$this->currentType;.}..pub |
89f00 | 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 6e 65 78 74 28 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 | lic.function.next():.void.{.$thi |
89f20 | 73 2d 3e 63 75 72 72 65 6e 74 4f 66 66 73 65 74 2b 2b 3b 0a 0a 69 66 20 28 21 69 73 73 65 74 28 | s->currentOffset++;..if.(!isset( |
89f40 | 24 74 68 69 73 2d 3e 72 75 6c 65 73 5b 24 74 68 69 73 2d 3e 63 75 72 72 65 6e 74 54 79 70 65 5d | $this->rules[$this->currentType] |
89f60 | 29 29 20 7b 0a 72 65 74 75 72 6e 3b 0a 7d 0a 0a 69 66 20 28 24 74 68 69 73 2d 3e 63 75 72 72 65 | )).{.return;.}..if.($this->curre |
89f80 | 6e 74 4f 66 66 73 65 74 20 3e 3d 20 5c 63 6f 75 6e 74 28 24 74 68 69 73 2d 3e 72 75 6c 65 73 5b | ntOffset.>=.\count($this->rules[ |
89fa0 | 24 74 68 69 73 2d 3e 63 75 72 72 65 6e 74 54 79 70 65 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 63 | $this->currentType])).{.$this->c |
89fc0 | 75 72 72 65 6e 74 4f 66 66 73 65 74 20 3d 20 30 3b 0a 0a 64 6f 20 7b 0a 24 74 68 69 73 2d 3e 63 | urrentOffset.=.0;..do.{.$this->c |
89fe0 | 75 72 72 65 6e 74 54 79 70 65 4f 66 66 73 65 74 2b 2b 3b 0a 0a 69 66 20 28 21 69 73 73 65 74 28 | urrentTypeOffset++;..if.(!isset( |
8a000 | 24 74 68 69 73 2d 3e 74 79 70 65 73 5b 24 74 68 69 73 2d 3e 63 75 72 72 65 6e 74 54 79 70 65 4f | $this->types[$this->currentTypeO |
8a020 | 66 66 73 65 74 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 63 75 72 72 65 6e 74 54 79 70 65 20 3d 20 | ffset])).{.$this->currentType.=. |
8a040 | 2d 31 3b 0a 62 72 65 61 6b 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 63 75 72 72 65 6e 74 54 79 70 65 | -1;.break;.}..$this->currentType |
8a060 | 20 3d 20 24 74 68 69 73 2d 3e 74 79 70 65 73 5b 24 74 68 69 73 2d 3e 63 75 72 72 65 6e 74 54 79 | .=.$this->types[$this->currentTy |
8a080 | 70 65 4f 66 66 73 65 74 5d 3b 0a 7d 20 77 68 69 6c 65 20 28 30 20 3d 3d 3d 20 5c 63 6f 75 6e 74 | peOffset];.}.while.(0.===.\count |
8a0a0 | 28 24 74 68 69 73 2d 3e 72 75 6c 65 73 5b 24 74 68 69 73 2d 3e 63 75 72 72 65 6e 74 54 79 70 65 | ($this->rules[$this->currentType |
8a0c0 | 5d 29 29 3b 0a 7d 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 72 65 77 69 6e 64 | ]));.}.}..public.function.rewind |
8a0e0 | 28 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 63 75 72 72 65 6e 74 4f 66 66 73 65 74 20 | ():.void.{.$this->currentOffset. |
8a100 | 3d 20 30 3b 0a 0a 24 74 68 69 73 2d 3e 63 75 72 72 65 6e 74 54 79 70 65 4f 66 66 73 65 74 20 3d | =.0;..$this->currentTypeOffset.= |
8a120 | 20 2d 31 3b 0a 24 74 68 69 73 2d 3e 63 75 72 72 65 6e 74 54 79 70 65 20 3d 20 2d 31 3b 0a 0a 64 | .-1;.$this->currentType.=.-1;..d |
8a140 | 6f 20 7b 0a 24 74 68 69 73 2d 3e 63 75 72 72 65 6e 74 54 79 70 65 4f 66 66 73 65 74 2b 2b 3b 0a | o.{.$this->currentTypeOffset++;. |
8a160 | 0a 69 66 20 28 21 69 73 73 65 74 28 24 74 68 69 73 2d 3e 74 79 70 65 73 5b 24 74 68 69 73 2d 3e | .if.(!isset($this->types[$this-> |
8a180 | 63 75 72 72 65 6e 74 54 79 70 65 4f 66 66 73 65 74 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 63 75 | currentTypeOffset])).{.$this->cu |
8a1a0 | 72 72 65 6e 74 54 79 70 65 20 3d 20 2d 31 3b 0a 62 72 65 61 6b 3b 0a 7d 0a 0a 24 74 68 69 73 2d | rrentType.=.-1;.break;.}..$this- |
8a1c0 | 3e 63 75 72 72 65 6e 74 54 79 70 65 20 3d 20 24 74 68 69 73 2d 3e 74 79 70 65 73 5b 24 74 68 69 | >currentType.=.$this->types[$thi |
8a1e0 | 73 2d 3e 63 75 72 72 65 6e 74 54 79 70 65 4f 66 66 73 65 74 5d 3b 0a 7d 20 77 68 69 6c 65 20 28 | s->currentTypeOffset];.}.while.( |
8a200 | 30 20 3d 3d 3d 20 5c 63 6f 75 6e 74 28 24 74 68 69 73 2d 3e 72 75 6c 65 73 5b 24 74 68 69 73 2d | 0.===.\count($this->rules[$this- |
8a220 | 3e 63 75 72 72 65 6e 74 54 79 70 65 5d 29 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 | >currentType]));.}..public.funct |
8a240 | 69 6f 6e 20 76 61 6c 69 64 28 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 69 73 73 65 74 | ion.valid():.bool.{.return.isset |
8a260 | 28 24 74 68 69 73 2d 3e 72 75 6c 65 73 5b 24 74 68 69 73 2d 3e 63 75 72 72 65 6e 74 54 79 70 65 | ($this->rules[$this->currentType |
8a280 | 5d 2c 20 24 74 68 69 73 2d 3e 72 75 6c 65 73 5b 24 74 68 69 73 2d 3e 63 75 72 72 65 6e 74 54 79 | ],.$this->rules[$this->currentTy |
8a2a0 | 70 65 5d 5b 24 74 68 69 73 2d 3e 63 75 72 72 65 6e 74 4f 66 66 73 65 74 5d 29 3b 0a 7d 0a 7d 0a | pe][$this->currentOffset]);.}.}. |
8a2c0 | 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a | <?php.declare(strict_types=1);.. |
8a2e0 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 44 65 70 | ..........namespace.Composer\Dep |
8a300 | 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 | endencyResolver;...........class |
8a320 | 20 52 75 6c 65 57 61 74 63 68 43 68 61 69 6e 20 65 78 74 65 6e 64 73 20 5c 53 70 6c 44 6f 75 62 | .RuleWatchChain.extends.\SplDoub |
8a340 | 6c 79 4c 69 6e 6b 65 64 4c 69 73 74 0a 7b 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 | lyLinkedList.{......public.funct |
8a360 | 69 6f 6e 20 73 65 65 6b 28 69 6e 74 20 24 6f 66 66 73 65 74 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 | ion.seek(int.$offset):.void.{.$t |
8a380 | 68 69 73 2d 3e 72 65 77 69 6e 64 28 29 3b 0a 66 6f 72 20 28 24 69 20 3d 20 30 3b 20 24 69 20 3c | his->rewind();.for.($i.=.0;.$i.< |
8a3a0 | 20 24 6f 66 66 73 65 74 3b 20 24 69 2b 2b 2c 20 24 74 68 69 73 2d 3e 6e 65 78 74 28 29 29 3b 0a | .$offset;.$i++,.$this->next());. |
8a3c0 | 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 72 65 6d 6f 76 | }..........public.function.remov |
8a3e0 | 65 28 29 3a 20 76 6f 69 64 0a 7b 0a 24 6f 66 66 73 65 74 20 3d 20 24 74 68 69 73 2d 3e 6b 65 79 | e():.void.{.$offset.=.$this->key |
8a400 | 28 29 3b 0a 24 74 68 69 73 2d 3e 6f 66 66 73 65 74 55 6e 73 65 74 28 24 6f 66 66 73 65 74 29 3b | ();.$this->offsetUnset($offset); |
8a420 | 0a 24 74 68 69 73 2d 3e 73 65 65 6b 28 24 6f 66 66 73 65 74 29 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 | .$this->seek($offset);.}.}.<?php |
8a440 | 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a | .declare(strict_types=1);....... |
8a460 | 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e | .....namespace.Composer\Dependen |
8a480 | 63 79 52 65 73 6f 6c 76 65 72 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 52 75 6c | cyResolver;............class.Rul |
8a4a0 | 65 57 61 74 63 68 47 72 61 70 68 0a 7b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 77 61 74 63 68 43 | eWatchGraph.{..protected.$watchC |
8a4c0 | 68 61 69 6e 73 20 3d 20 5b 5d 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 | hains.=.[];..............public. |
8a4e0 | 66 75 6e 63 74 69 6f 6e 20 69 6e 73 65 72 74 28 52 75 6c 65 57 61 74 63 68 4e 6f 64 65 20 24 6e | function.insert(RuleWatchNode.$n |
8a500 | 6f 64 65 29 3a 20 76 6f 69 64 0a 7b 0a 69 66 20 28 24 6e 6f 64 65 2d 3e 67 65 74 52 75 6c 65 28 | ode):.void.{.if.($node->getRule( |
8a520 | 29 2d 3e 69 73 41 73 73 65 72 74 69 6f 6e 28 29 29 20 7b 0a 72 65 74 75 72 6e 3b 0a 7d 0a 0a 69 | )->isAssertion()).{.return;.}..i |
8a540 | 66 20 28 21 24 6e 6f 64 65 2d 3e 67 65 74 52 75 6c 65 28 29 20 69 6e 73 74 61 6e 63 65 6f 66 20 | f.(!$node->getRule().instanceof. |
8a560 | 4d 75 6c 74 69 43 6f 6e 66 6c 69 63 74 52 75 6c 65 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 5b 24 | MultiConflictRule).{.foreach.([$ |
8a580 | 6e 6f 64 65 2d 3e 77 61 74 63 68 31 2c 20 24 6e 6f 64 65 2d 3e 77 61 74 63 68 32 5d 20 61 73 20 | node->watch1,.$node->watch2].as. |
8a5a0 | 24 6c 69 74 65 72 61 6c 29 20 7b 0a 69 66 20 28 21 69 73 73 65 74 28 24 74 68 69 73 2d 3e 77 61 | $literal).{.if.(!isset($this->wa |
8a5c0 | 74 63 68 43 68 61 69 6e 73 5b 24 6c 69 74 65 72 61 6c 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 77 | tchChains[$literal])).{.$this->w |
8a5e0 | 61 74 63 68 43 68 61 69 6e 73 5b 24 6c 69 74 65 72 61 6c 5d 20 3d 20 6e 65 77 20 52 75 6c 65 57 | atchChains[$literal].=.new.RuleW |
8a600 | 61 74 63 68 43 68 61 69 6e 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 77 61 74 63 68 43 68 61 69 6e 73 | atchChain;.}..$this->watchChains |
8a620 | 5b 24 6c 69 74 65 72 61 6c 5d 2d 3e 75 6e 73 68 69 66 74 28 24 6e 6f 64 65 29 3b 0a 7d 0a 7d 20 | [$literal]->unshift($node);.}.}. |
8a640 | 65 6c 73 65 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 6e 6f 64 65 2d 3e 67 65 74 52 75 6c 65 28 29 | else.{.foreach.($node->getRule() |
8a660 | 2d 3e 67 65 74 4c 69 74 65 72 61 6c 73 28 29 20 61 73 20 24 6c 69 74 65 72 61 6c 29 20 7b 0a 69 | ->getLiterals().as.$literal).{.i |
8a680 | 66 20 28 21 69 73 73 65 74 28 24 74 68 69 73 2d 3e 77 61 74 63 68 43 68 61 69 6e 73 5b 24 6c 69 | f.(!isset($this->watchChains[$li |
8a6a0 | 74 65 72 61 6c 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 77 61 74 63 68 43 68 61 69 6e 73 5b 24 6c | teral])).{.$this->watchChains[$l |
8a6c0 | 69 74 65 72 61 6c 5d 20 3d 20 6e 65 77 20 52 75 6c 65 57 61 74 63 68 43 68 61 69 6e 3b 0a 7d 0a | iteral].=.new.RuleWatchChain;.}. |
8a6e0 | 0a 24 74 68 69 73 2d 3e 77 61 74 63 68 43 68 61 69 6e 73 5b 24 6c 69 74 65 72 61 6c 5d 2d 3e 75 | .$this->watchChains[$literal]->u |
8a700 | 6e 73 68 69 66 74 28 24 6e 6f 64 65 29 3b 0a 7d 0a 7d 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a | nshift($node);.}.}.}............ |
8a720 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 70 72 6f | .............public.function.pro |
8a740 | 70 61 67 61 74 65 4c 69 74 65 72 61 6c 28 69 6e 74 20 24 64 65 63 69 64 65 64 4c 69 74 65 72 61 | pagateLiteral(int.$decidedLitera |
8a760 | 6c 2c 20 69 6e 74 20 24 6c 65 76 65 6c 2c 20 44 65 63 69 73 69 6f 6e 73 20 24 64 65 63 69 73 69 | l,.int.$level,.Decisions.$decisi |
8a780 | 6f 6e 73 29 3a 20 3f 52 75 6c 65 0a 7b 0a 0a 0a 0a 24 6c 69 74 65 72 61 6c 20 3d 20 2d 24 64 65 | ons):.?Rule.{....$literal.=.-$de |
8a7a0 | 63 69 64 65 64 4c 69 74 65 72 61 6c 3b 0a 0a 69 66 20 28 21 69 73 73 65 74 28 24 74 68 69 73 2d | cidedLiteral;..if.(!isset($this- |
8a7c0 | 3e 77 61 74 63 68 43 68 61 69 6e 73 5b 24 6c 69 74 65 72 61 6c 5d 29 29 20 7b 0a 72 65 74 75 72 | >watchChains[$literal])).{.retur |
8a7e0 | 6e 20 6e 75 6c 6c 3b 0a 7d 0a 0a 24 63 68 61 69 6e 20 3d 20 24 74 68 69 73 2d 3e 77 61 74 63 68 | n.null;.}..$chain.=.$this->watch |
8a800 | 43 68 61 69 6e 73 5b 24 6c 69 74 65 72 61 6c 5d 3b 0a 0a 24 63 68 61 69 6e 2d 3e 72 65 77 69 6e | Chains[$literal];..$chain->rewin |
8a820 | 64 28 29 3b 0a 77 68 69 6c 65 20 28 24 63 68 61 69 6e 2d 3e 76 61 6c 69 64 28 29 29 20 7b 0a 24 | d();.while.($chain->valid()).{.$ |
8a840 | 6e 6f 64 65 20 3d 20 24 63 68 61 69 6e 2d 3e 63 75 72 72 65 6e 74 28 29 3b 0a 69 66 20 28 21 24 | node.=.$chain->current();.if.(!$ |
8a860 | 6e 6f 64 65 2d 3e 67 65 74 52 75 6c 65 28 29 20 69 6e 73 74 61 6e 63 65 6f 66 20 4d 75 6c 74 69 | node->getRule().instanceof.Multi |
8a880 | 43 6f 6e 66 6c 69 63 74 52 75 6c 65 29 20 7b 0a 24 6f 74 68 65 72 57 61 74 63 68 20 3d 20 24 6e | ConflictRule).{.$otherWatch.=.$n |
8a8a0 | 6f 64 65 2d 3e 67 65 74 4f 74 68 65 72 57 61 74 63 68 28 24 6c 69 74 65 72 61 6c 29 3b 0a 0a 69 | ode->getOtherWatch($literal);..i |
8a8c0 | 66 20 28 21 24 6e 6f 64 65 2d 3e 67 65 74 52 75 6c 65 28 29 2d 3e 69 73 44 69 73 61 62 6c 65 64 | f.(!$node->getRule()->isDisabled |
8a8e0 | 28 29 20 26 26 20 21 24 64 65 63 69 73 69 6f 6e 73 2d 3e 73 61 74 69 73 66 79 28 24 6f 74 68 65 | ().&&.!$decisions->satisfy($othe |
8a900 | 72 57 61 74 63 68 29 29 20 7b 0a 24 72 75 6c 65 4c 69 74 65 72 61 6c 73 20 3d 20 24 6e 6f 64 65 | rWatch)).{.$ruleLiterals.=.$node |
8a920 | 2d 3e 67 65 74 52 75 6c 65 28 29 2d 3e 67 65 74 4c 69 74 65 72 61 6c 73 28 29 3b 0a 0a 24 61 6c | ->getRule()->getLiterals();..$al |
8a940 | 74 65 72 6e 61 74 69 76 65 4c 69 74 65 72 61 6c 73 20 3d 20 61 72 72 61 79 5f 66 69 6c 74 65 72 | ternativeLiterals.=.array_filter |
8a960 | 28 24 72 75 6c 65 4c 69 74 65 72 61 6c 73 2c 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 | ($ruleLiterals,.static.function. |
8a980 | 28 24 72 75 6c 65 4c 69 74 65 72 61 6c 29 20 75 73 65 20 28 24 6c 69 74 65 72 61 6c 2c 20 24 6f | ($ruleLiteral).use.($literal,.$o |
8a9a0 | 74 68 65 72 57 61 74 63 68 2c 20 24 64 65 63 69 73 69 6f 6e 73 29 3a 20 62 6f 6f 6c 20 7b 0a 72 | therWatch,.$decisions):.bool.{.r |
8a9c0 | 65 74 75 72 6e 20 24 6c 69 74 65 72 61 6c 20 21 3d 3d 20 24 72 75 6c 65 4c 69 74 65 72 61 6c 20 | eturn.$literal.!==.$ruleLiteral. |
8a9e0 | 26 26 0a 24 6f 74 68 65 72 57 61 74 63 68 20 21 3d 3d 20 24 72 75 6c 65 4c 69 74 65 72 61 6c 20 | &&.$otherWatch.!==.$ruleLiteral. |
8aa00 | 26 26 0a 21 24 64 65 63 69 73 69 6f 6e 73 2d 3e 63 6f 6e 66 6c 69 63 74 28 24 72 75 6c 65 4c 69 | &&.!$decisions->conflict($ruleLi |
8aa20 | 74 65 72 61 6c 29 3b 0a 7d 29 3b 0a 0a 69 66 20 28 5c 63 6f 75 6e 74 28 24 61 6c 74 65 72 6e 61 | teral);.});..if.(\count($alterna |
8aa40 | 74 69 76 65 4c 69 74 65 72 61 6c 73 29 20 3e 20 30 29 20 7b 0a 72 65 73 65 74 28 24 61 6c 74 65 | tiveLiterals).>.0).{.reset($alte |
8aa60 | 72 6e 61 74 69 76 65 4c 69 74 65 72 61 6c 73 29 3b 0a 24 74 68 69 73 2d 3e 6d 6f 76 65 57 61 74 | rnativeLiterals);.$this->moveWat |
8aa80 | 63 68 28 24 6c 69 74 65 72 61 6c 2c 20 63 75 72 72 65 6e 74 28 24 61 6c 74 65 72 6e 61 74 69 76 | ch($literal,.current($alternativ |
8aaa0 | 65 4c 69 74 65 72 61 6c 73 29 2c 20 24 6e 6f 64 65 29 3b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a | eLiterals),.$node);.continue;.}. |
8aac0 | 0a 69 66 20 28 24 64 65 63 69 73 69 6f 6e 73 2d 3e 63 6f 6e 66 6c 69 63 74 28 24 6f 74 68 65 72 | .if.($decisions->conflict($other |
8aae0 | 57 61 74 63 68 29 29 20 7b 0a 72 65 74 75 72 6e 20 24 6e 6f 64 65 2d 3e 67 65 74 52 75 6c 65 28 | Watch)).{.return.$node->getRule( |
8ab00 | 29 3b 0a 7d 0a 0a 24 64 65 63 69 73 69 6f 6e 73 2d 3e 64 65 63 69 64 65 28 24 6f 74 68 65 72 57 | );.}..$decisions->decide($otherW |
8ab20 | 61 74 63 68 2c 20 24 6c 65 76 65 6c 2c 20 24 6e 6f 64 65 2d 3e 67 65 74 52 75 6c 65 28 29 29 3b | atch,.$level,.$node->getRule()); |
8ab40 | 0a 7d 0a 7d 20 65 6c 73 65 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 6e 6f 64 65 2d 3e 67 65 74 52 | .}.}.else.{.foreach.($node->getR |
8ab60 | 75 6c 65 28 29 2d 3e 67 65 74 4c 69 74 65 72 61 6c 73 28 29 20 61 73 20 24 6f 74 68 65 72 4c 69 | ule()->getLiterals().as.$otherLi |
8ab80 | 74 65 72 61 6c 29 20 7b 0a 69 66 20 28 24 6c 69 74 65 72 61 6c 20 21 3d 3d 20 24 6f 74 68 65 72 | teral).{.if.($literal.!==.$other |
8aba0 | 4c 69 74 65 72 61 6c 20 26 26 20 21 24 64 65 63 69 73 69 6f 6e 73 2d 3e 73 61 74 69 73 66 79 28 | Literal.&&.!$decisions->satisfy( |
8abc0 | 24 6f 74 68 65 72 4c 69 74 65 72 61 6c 29 29 20 7b 0a 69 66 20 28 24 64 65 63 69 73 69 6f 6e 73 | $otherLiteral)).{.if.($decisions |
8abe0 | 2d 3e 63 6f 6e 66 6c 69 63 74 28 24 6f 74 68 65 72 4c 69 74 65 72 61 6c 29 29 20 7b 0a 72 65 74 | ->conflict($otherLiteral)).{.ret |
8ac00 | 75 72 6e 20 24 6e 6f 64 65 2d 3e 67 65 74 52 75 6c 65 28 29 3b 0a 7d 0a 0a 24 64 65 63 69 73 69 | urn.$node->getRule();.}..$decisi |
8ac20 | 6f 6e 73 2d 3e 64 65 63 69 64 65 28 24 6f 74 68 65 72 4c 69 74 65 72 61 6c 2c 20 24 6c 65 76 65 | ons->decide($otherLiteral,.$leve |
8ac40 | 6c 2c 20 24 6e 6f 64 65 2d 3e 67 65 74 52 75 6c 65 28 29 29 3b 0a 7d 0a 7d 0a 7d 0a 0a 24 63 68 | l,.$node->getRule());.}.}.}..$ch |
8ac60 | 61 69 6e 2d 3e 6e 65 78 74 28 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0a 7d 0a 0a | ain->next();.}..return.null;.}.. |
8ac80 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 6d 6f 76 65 | .........protected.function.move |
8aca0 | 57 61 74 63 68 28 69 6e 74 20 24 66 72 6f 6d 4c 69 74 65 72 61 6c 2c 20 69 6e 74 20 24 74 6f 4c | Watch(int.$fromLiteral,.int.$toL |
8acc0 | 69 74 65 72 61 6c 2c 20 52 75 6c 65 57 61 74 63 68 4e 6f 64 65 20 24 6e 6f 64 65 29 3a 20 76 6f | iteral,.RuleWatchNode.$node):.vo |
8ace0 | 69 64 0a 7b 0a 69 66 20 28 21 69 73 73 65 74 28 24 74 68 69 73 2d 3e 77 61 74 63 68 43 68 61 69 | id.{.if.(!isset($this->watchChai |
8ad00 | 6e 73 5b 24 74 6f 4c 69 74 65 72 61 6c 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 77 61 74 63 68 43 | ns[$toLiteral])).{.$this->watchC |
8ad20 | 68 61 69 6e 73 5b 24 74 6f 4c 69 74 65 72 61 6c 5d 20 3d 20 6e 65 77 20 52 75 6c 65 57 61 74 63 | hains[$toLiteral].=.new.RuleWatc |
8ad40 | 68 43 68 61 69 6e 3b 0a 7d 0a 0a 24 6e 6f 64 65 2d 3e 6d 6f 76 65 57 61 74 63 68 28 24 66 72 6f | hChain;.}..$node->moveWatch($fro |
8ad60 | 6d 4c 69 74 65 72 61 6c 2c 20 24 74 6f 4c 69 74 65 72 61 6c 29 3b 0a 24 74 68 69 73 2d 3e 77 61 | mLiteral,.$toLiteral);.$this->wa |
8ad80 | 74 63 68 43 68 61 69 6e 73 5b 24 66 72 6f 6d 4c 69 74 65 72 61 6c 5d 2d 3e 72 65 6d 6f 76 65 28 | tchChains[$fromLiteral]->remove( |
8ada0 | 29 3b 0a 24 74 68 69 73 2d 3e 77 61 74 63 68 43 68 61 69 6e 73 5b 24 74 6f 4c 69 74 65 72 61 6c | );.$this->watchChains[$toLiteral |
8adc0 | 5d 2d 3e 75 6e 73 68 69 66 74 28 24 6e 6f 64 65 29 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 | ]->unshift($node);.}.}.<?php.dec |
8ade0 | 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a | lare(strict_types=1);........... |
8ae00 | 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 | .namespace.Composer\DependencyRe |
8ae20 | 73 6f 6c 76 65 72 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 52 75 6c 65 57 61 74 63 68 4e | solver;.........class.RuleWatchN |
8ae40 | 6f 64 65 0a 7b 0a 0a 70 75 62 6c 69 63 20 24 77 61 74 63 68 31 3b 0a 0a 70 75 62 6c 69 63 20 24 | ode.{..public.$watch1;..public.$ |
8ae60 | 77 61 74 63 68 32 3b 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 72 75 6c 65 3b 0a 0a 0a 0a 0a 0a | watch2;...protected.$rule;...... |
8ae80 | 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 52 75 6c | .public.function.__construct(Rul |
8aea0 | 65 20 24 72 75 6c 65 29 0a 7b 0a 24 74 68 69 73 2d 3e 72 75 6c 65 20 3d 20 24 72 75 6c 65 3b 0a | e.$rule).{.$this->rule.=.$rule;. |
8aec0 | 0a 24 6c 69 74 65 72 61 6c 73 20 3d 20 24 72 75 6c 65 2d 3e 67 65 74 4c 69 74 65 72 61 6c 73 28 | .$literals.=.$rule->getLiterals( |
8aee0 | 29 3b 0a 0a 24 6c 69 74 65 72 61 6c 43 6f 75 6e 74 20 3d 20 5c 63 6f 75 6e 74 28 24 6c 69 74 65 | );..$literalCount.=.\count($lite |
8af00 | 72 61 6c 73 29 3b 0a 24 74 68 69 73 2d 3e 77 61 74 63 68 31 20 3d 20 24 6c 69 74 65 72 61 6c 43 | rals);.$this->watch1.=.$literalC |
8af20 | 6f 75 6e 74 20 3e 20 30 20 3f 20 24 6c 69 74 65 72 61 6c 73 5b 30 5d 20 3a 20 30 3b 0a 24 74 68 | ount.>.0.?.$literals[0].:.0;.$th |
8af40 | 69 73 2d 3e 77 61 74 63 68 32 20 3d 20 24 6c 69 74 65 72 61 6c 43 6f 75 6e 74 20 3e 20 31 20 3f | is->watch2.=.$literalCount.>.1.? |
8af60 | 20 24 6c 69 74 65 72 61 6c 73 5b 31 5d 20 3a 20 30 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 | .$literals[1].:.0;.}..........pu |
8af80 | 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 77 61 74 63 68 32 4f 6e 48 69 67 68 65 73 74 28 44 65 | blic.function.watch2OnHighest(De |
8afa0 | 63 69 73 69 6f 6e 73 20 24 64 65 63 69 73 69 6f 6e 73 29 3a 20 76 6f 69 64 0a 7b 0a 24 6c 69 74 | cisions.$decisions):.void.{.$lit |
8afc0 | 65 72 61 6c 73 20 3d 20 24 74 68 69 73 2d 3e 72 75 6c 65 2d 3e 67 65 74 4c 69 74 65 72 61 6c 73 | erals.=.$this->rule->getLiterals |
8afe0 | 28 29 3b 0a 0a 0a 69 66 20 28 5c 63 6f 75 6e 74 28 24 6c 69 74 65 72 61 6c 73 29 20 3c 20 33 20 | ();...if.(\count($literals).<.3. |
8b000 | 7c 7c 20 24 74 68 69 73 2d 3e 72 75 6c 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 4d 75 6c 74 69 43 | ||.$this->rule.instanceof.MultiC |
8b020 | 6f 6e 66 6c 69 63 74 52 75 6c 65 29 20 7b 0a 72 65 74 75 72 6e 3b 0a 7d 0a 0a 24 77 61 74 63 68 | onflictRule).{.return;.}..$watch |
8b040 | 4c 65 76 65 6c 20 3d 20 30 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 6c 69 74 65 72 61 6c 73 20 61 | Level.=.0;..foreach.($literals.a |
8b060 | 73 20 24 6c 69 74 65 72 61 6c 29 20 7b 0a 24 6c 65 76 65 6c 20 3d 20 24 64 65 63 69 73 69 6f 6e | s.$literal).{.$level.=.$decision |
8b080 | 73 2d 3e 64 65 63 69 73 69 6f 6e 4c 65 76 65 6c 28 24 6c 69 74 65 72 61 6c 29 3b 0a 0a 69 66 20 | s->decisionLevel($literal);..if. |
8b0a0 | 28 24 6c 65 76 65 6c 20 3e 20 24 77 61 74 63 68 4c 65 76 65 6c 29 20 7b 0a 24 74 68 69 73 2d 3e | ($level.>.$watchLevel).{.$this-> |
8b0c0 | 77 61 74 63 68 32 20 3d 20 24 6c 69 74 65 72 61 6c 3b 0a 24 77 61 74 63 68 4c 65 76 65 6c 20 3d | watch2.=.$literal;.$watchLevel.= |
8b0e0 | 20 24 6c 65 76 65 6c 3b 0a 7d 0a 7d 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 | .$level;.}.}.}.....public.functi |
8b100 | 6f 6e 20 67 65 74 52 75 6c 65 28 29 3a 20 52 75 6c 65 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 | on.getRule():.Rule.{.return.$thi |
8b120 | 73 2d 3e 72 75 6c 65 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f | s->rule;.}........public.functio |
8b140 | 6e 20 67 65 74 4f 74 68 65 72 57 61 74 63 68 28 69 6e 74 20 24 6c 69 74 65 72 61 6c 29 3a 20 69 | n.getOtherWatch(int.$literal):.i |
8b160 | 6e 74 0a 7b 0a 69 66 20 28 24 74 68 69 73 2d 3e 77 61 74 63 68 31 20 3d 3d 3d 20 24 6c 69 74 65 | nt.{.if.($this->watch1.===.$lite |
8b180 | 72 61 6c 29 20 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 77 61 74 63 68 32 3b 0a 7d 0a 0a | ral).{.return.$this->watch2;.}.. |
8b1a0 | 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 77 61 74 63 68 31 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 | return.$this->watch1;.}........p |
8b1c0 | 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 6d 6f 76 65 57 61 74 63 68 28 69 6e 74 20 24 66 72 | ublic.function.moveWatch(int.$fr |
8b1e0 | 6f 6d 2c 20 69 6e 74 20 24 74 6f 29 3a 20 76 6f 69 64 0a 7b 0a 69 66 20 28 24 74 68 69 73 2d 3e | om,.int.$to):.void.{.if.($this-> |
8b200 | 77 61 74 63 68 31 20 3d 3d 3d 20 24 66 72 6f 6d 29 20 7b 0a 24 74 68 69 73 2d 3e 77 61 74 63 68 | watch1.===.$from).{.$this->watch |
8b220 | 31 20 3d 20 24 74 6f 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 74 68 69 73 2d 3e 77 61 74 63 68 32 20 | 1.=.$to;.}.else.{.$this->watch2. |
8b240 | 3d 20 24 74 6f 3b 0a 7d 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 | =.$to;.}.}.}.<?php.declare(stric |
8b260 | 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 | t_types=1);............namespace |
8b280 | 20 43 6f 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 3b 0a 0a 75 | .Composer\DependencyResolver;..u |
8b2a0 | 73 65 20 43 6f 6d 70 6f 73 65 72 5c 46 69 6c 74 65 72 5c 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 | se.Composer\Filter\PlatformRequi |
8b2c0 | 72 65 6d 65 6e 74 46 69 6c 74 65 72 5c 49 67 6e 6f 72 65 4c 69 73 74 50 6c 61 74 66 6f 72 6d 52 | rementFilter\IgnoreListPlatformR |
8b2e0 | 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 46 | equirementFilter;.use.Composer\F |
8b300 | 69 6c 74 65 72 5c 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 5c | ilter\PlatformRequirementFilter\ |
8b320 | 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 46 61 63 74 6f 72 79 | PlatformRequirementFilterFactory |
8b340 | 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 46 69 6c 74 65 72 5c 50 6c 61 74 66 6f 72 6d 52 65 | ;.use.Composer\Filter\PlatformRe |
8b360 | 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 5c 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d | quirementFilter\PlatformRequirem |
8b380 | 65 6e 74 46 69 6c 74 65 72 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 | entFilterInterface;.use.Composer |
8b3a0 | 5c 49 4f 5c 49 4f 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 | \IO\IOInterface;.use.Composer\Pa |
8b3c0 | 63 6b 61 67 65 5c 42 61 73 65 50 61 63 6b 61 67 65 3b 0a 0a 0a 0a 0a 63 6c 61 73 73 20 53 6f 6c | ckage\BasePackage;.....class.Sol |
8b3e0 | 76 65 72 0a 7b 0a 70 72 69 76 61 74 65 20 63 6f 6e 73 74 20 42 52 41 4e 43 48 5f 4c 49 54 45 52 | ver.{.private.const.BRANCH_LITER |
8b400 | 41 4c 53 20 3d 20 30 3b 0a 70 72 69 76 61 74 65 20 63 6f 6e 73 74 20 42 52 41 4e 43 48 5f 4c 45 | ALS.=.0;.private.const.BRANCH_LE |
8b420 | 56 45 4c 20 3d 20 31 3b 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 70 6f 6c 69 63 79 3b 0a 0a 70 | VEL.=.1;...protected.$policy;..p |
8b440 | 72 6f 74 65 63 74 65 64 20 24 70 6f 6f 6c 3b 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 72 75 6c | rotected.$pool;...protected.$rul |
8b460 | 65 73 3b 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 77 61 74 63 68 47 72 61 70 68 3b 0a 0a 70 72 | es;...protected.$watchGraph;..pr |
8b480 | 6f 74 65 63 74 65 64 20 24 64 65 63 69 73 69 6f 6e 73 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 | otected.$decisions;..protected.$ |
8b4a0 | 66 69 78 65 64 4d 61 70 3b 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 70 72 6f 70 61 67 61 74 65 | fixedMap;...protected.$propagate |
8b4c0 | 49 6e 64 65 78 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 62 72 61 6e 63 68 65 73 20 3d 20 5b 5d | Index;..protected.$branches.=.[] |
8b4e0 | 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 70 72 6f 62 6c 65 6d 73 20 3d 20 5b 5d 3b 0a 0a 70 72 | ;..protected.$problems.=.[];..pr |
8b500 | 6f 74 65 63 74 65 64 20 24 6c 65 61 72 6e 65 64 50 6f 6f 6c 20 3d 20 5b 5d 3b 0a 0a 70 72 6f 74 | otected.$learnedPool.=.[];..prot |
8b520 | 65 63 74 65 64 20 24 6c 65 61 72 6e 65 64 57 68 79 20 3d 20 5b 5d 3b 0a 0a 0a 70 75 62 6c 69 63 | ected.$learnedWhy.=.[];...public |
8b540 | 20 24 74 65 73 74 46 6c 61 67 4c 65 61 72 6e 65 64 50 6f 73 69 74 69 76 65 4c 69 74 65 72 61 6c | .$testFlagLearnedPositiveLiteral |
8b560 | 20 3d 20 66 61 6c 73 65 3b 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 69 6f 3b 0a 0a 70 75 62 6c | .=.false;...protected.$io;..publ |
8b580 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 50 6f 6c 69 63 79 49 6e | ic.function.__construct(PolicyIn |
8b5a0 | 74 65 72 66 61 63 65 20 24 70 6f 6c 69 63 79 2c 20 50 6f 6f 6c 20 24 70 6f 6f 6c 2c 20 49 4f 49 | terface.$policy,.Pool.$pool,.IOI |
8b5c0 | 6e 74 65 72 66 61 63 65 20 24 69 6f 29 0a 7b 0a 24 74 68 69 73 2d 3e 69 6f 20 3d 20 24 69 6f 3b | nterface.$io).{.$this->io.=.$io; |
8b5e0 | 0a 24 74 68 69 73 2d 3e 70 6f 6c 69 63 79 20 3d 20 24 70 6f 6c 69 63 79 3b 0a 24 74 68 69 73 2d | .$this->policy.=.$policy;.$this- |
8b600 | 3e 70 6f 6f 6c 20 3d 20 24 70 6f 6f 6c 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f | >pool.=.$pool;.}..public.functio |
8b620 | 6e 20 67 65 74 52 75 6c 65 53 65 74 53 69 7a 65 28 29 3a 20 69 6e 74 0a 7b 0a 72 65 74 75 72 6e | n.getRuleSetSize():.int.{.return |
8b640 | 20 5c 63 6f 75 6e 74 28 24 74 68 69 73 2d 3e 72 75 6c 65 73 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 | .\count($this->rules);.}..public |
8b660 | 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 50 6f 6f 6c 28 29 3a 20 50 6f 6f 6c 0a 7b 0a 72 65 74 75 | .function.getPool():.Pool.{.retu |
8b680 | 72 6e 20 24 74 68 69 73 2d 3e 70 6f 6f 6c 3b 0a 7d 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e | rn.$this->pool;.}....private.fun |
8b6a0 | 63 74 69 6f 6e 20 6d 61 6b 65 41 73 73 65 72 74 69 6f 6e 52 75 6c 65 44 65 63 69 73 69 6f 6e 73 | ction.makeAssertionRuleDecisions |
8b6c0 | 28 29 3a 20 76 6f 69 64 0a 7b 0a 24 64 65 63 69 73 69 6f 6e 53 74 61 72 74 20 3d 20 5c 63 6f 75 | ():.void.{.$decisionStart.=.\cou |
8b6e0 | 6e 74 28 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 73 29 20 2d 20 31 3b 0a 0a 24 72 75 6c 65 | nt($this->decisions).-.1;..$rule |
8b700 | 73 43 6f 75 6e 74 20 3d 20 5c 63 6f 75 6e 74 28 24 74 68 69 73 2d 3e 72 75 6c 65 73 29 3b 0a 66 | sCount.=.\count($this->rules);.f |
8b720 | 6f 72 20 28 24 72 75 6c 65 49 6e 64 65 78 20 3d 20 30 3b 20 24 72 75 6c 65 49 6e 64 65 78 20 3c | or.($ruleIndex.=.0;.$ruleIndex.< |
8b740 | 20 24 72 75 6c 65 73 43 6f 75 6e 74 3b 20 24 72 75 6c 65 49 6e 64 65 78 2b 2b 29 20 7b 0a 24 72 | .$rulesCount;.$ruleIndex++).{.$r |
8b760 | 75 6c 65 20 3d 20 24 74 68 69 73 2d 3e 72 75 6c 65 73 2d 3e 72 75 6c 65 42 79 49 64 5b 24 72 75 | ule.=.$this->rules->ruleById[$ru |
8b780 | 6c 65 49 6e 64 65 78 5d 3b 0a 0a 69 66 20 28 21 24 72 75 6c 65 2d 3e 69 73 41 73 73 65 72 74 69 | leIndex];..if.(!$rule->isAsserti |
8b7a0 | 6f 6e 28 29 20 7c 7c 20 24 72 75 6c 65 2d 3e 69 73 44 69 73 61 62 6c 65 64 28 29 29 20 7b 0a 63 | on().||.$rule->isDisabled()).{.c |
8b7c0 | 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 24 6c 69 74 65 72 61 6c 73 20 3d 20 24 72 75 6c 65 2d 3e 67 | ontinue;.}..$literals.=.$rule->g |
8b7e0 | 65 74 4c 69 74 65 72 61 6c 73 28 29 3b 0a 24 6c 69 74 65 72 61 6c 20 3d 20 24 6c 69 74 65 72 61 | etLiterals();.$literal.=.$litera |
8b800 | 6c 73 5b 30 5d 3b 0a 0a 69 66 20 28 21 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 73 2d 3e 64 | ls[0];..if.(!$this->decisions->d |
8b820 | 65 63 69 64 65 64 28 24 6c 69 74 65 72 61 6c 29 29 20 7b 0a 24 74 68 69 73 2d 3e 64 65 63 69 73 | ecided($literal)).{.$this->decis |
8b840 | 69 6f 6e 73 2d 3e 64 65 63 69 64 65 28 24 6c 69 74 65 72 61 6c 2c 20 31 2c 20 24 72 75 6c 65 29 | ions->decide($literal,.1,.$rule) |
8b860 | 3b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 69 66 20 28 24 74 68 69 73 2d 3e 64 65 63 69 73 69 | ;.continue;.}..if.($this->decisi |
8b880 | 6f 6e 73 2d 3e 73 61 74 69 73 66 79 28 24 6c 69 74 65 72 61 6c 29 29 20 7b 0a 63 6f 6e 74 69 6e | ons->satisfy($literal)).{.contin |
8b8a0 | 75 65 3b 0a 7d 0a 0a 0a 69 66 20 28 52 75 6c 65 53 65 74 3a 3a 54 59 50 45 5f 4c 45 41 52 4e 45 | ue;.}...if.(RuleSet::TYPE_LEARNE |
8b8c0 | 44 20 3d 3d 3d 20 24 72 75 6c 65 2d 3e 67 65 74 54 79 70 65 28 29 29 20 7b 0a 24 72 75 6c 65 2d | D.===.$rule->getType()).{.$rule- |
8b8e0 | 3e 64 69 73 61 62 6c 65 28 29 3b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 24 63 6f 6e 66 6c 69 | >disable();.continue;.}..$confli |
8b900 | 63 74 20 3d 20 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 73 2d 3e 64 65 63 69 73 69 6f 6e 52 | ct.=.$this->decisions->decisionR |
8b920 | 75 6c 65 28 24 6c 69 74 65 72 61 6c 29 3b 0a 0a 69 66 20 28 24 63 6f 6e 66 6c 69 63 74 20 26 26 | ule($literal);..if.($conflict.&& |
8b940 | 20 52 75 6c 65 53 65 74 3a 3a 54 59 50 45 5f 50 41 43 4b 41 47 45 20 3d 3d 3d 20 24 63 6f 6e 66 | .RuleSet::TYPE_PACKAGE.===.$conf |
8b960 | 6c 69 63 74 2d 3e 67 65 74 54 79 70 65 28 29 29 20 7b 0a 24 70 72 6f 62 6c 65 6d 20 3d 20 6e 65 | lict->getType()).{.$problem.=.ne |
8b980 | 77 20 50 72 6f 62 6c 65 6d 28 29 3b 0a 0a 24 70 72 6f 62 6c 65 6d 2d 3e 61 64 64 52 75 6c 65 28 | w.Problem();..$problem->addRule( |
8b9a0 | 24 72 75 6c 65 29 3b 0a 24 70 72 6f 62 6c 65 6d 2d 3e 61 64 64 52 75 6c 65 28 24 63 6f 6e 66 6c | $rule);.$problem->addRule($confl |
8b9c0 | 69 63 74 29 3b 0a 24 72 75 6c 65 2d 3e 64 69 73 61 62 6c 65 28 29 3b 0a 24 74 68 69 73 2d 3e 70 | ict);.$rule->disable();.$this->p |
8b9e0 | 72 6f 62 6c 65 6d 73 5b 5d 20 3d 20 24 70 72 6f 62 6c 65 6d 3b 0a 63 6f 6e 74 69 6e 75 65 3b 0a | roblems[].=.$problem;.continue;. |
8ba00 | 7d 0a 0a 0a 24 70 72 6f 62 6c 65 6d 20 3d 20 6e 65 77 20 50 72 6f 62 6c 65 6d 28 29 3b 0a 24 70 | }...$problem.=.new.Problem();.$p |
8ba20 | 72 6f 62 6c 65 6d 2d 3e 61 64 64 52 75 6c 65 28 24 72 75 6c 65 29 3b 0a 24 70 72 6f 62 6c 65 6d | roblem->addRule($rule);.$problem |
8ba40 | 2d 3e 61 64 64 52 75 6c 65 28 24 63 6f 6e 66 6c 69 63 74 29 3b 0a 0a 0a 0a 66 6f 72 65 61 63 68 | ->addRule($conflict);....foreach |
8ba60 | 20 28 24 74 68 69 73 2d 3e 72 75 6c 65 73 2d 3e 67 65 74 49 74 65 72 61 74 6f 72 46 6f 72 28 52 | .($this->rules->getIteratorFor(R |
8ba80 | 75 6c 65 53 65 74 3a 3a 54 59 50 45 5f 52 45 51 55 45 53 54 29 20 61 73 20 24 61 73 73 65 72 74 | uleSet::TYPE_REQUEST).as.$assert |
8baa0 | 52 75 6c 65 29 20 7b 0a 69 66 20 28 24 61 73 73 65 72 74 52 75 6c 65 2d 3e 69 73 44 69 73 61 62 | Rule).{.if.($assertRule->isDisab |
8bac0 | 6c 65 64 28 29 20 7c 7c 20 21 24 61 73 73 65 72 74 52 75 6c 65 2d 3e 69 73 41 73 73 65 72 74 69 | led().||.!$assertRule->isAsserti |
8bae0 | 6f 6e 28 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 24 61 73 73 65 72 74 52 75 6c 65 | on()).{.continue;.}..$assertRule |
8bb00 | 4c 69 74 65 72 61 6c 73 20 3d 20 24 61 73 73 65 72 74 52 75 6c 65 2d 3e 67 65 74 4c 69 74 65 72 | Literals.=.$assertRule->getLiter |
8bb20 | 61 6c 73 28 29 3b 0a 24 61 73 73 65 72 74 52 75 6c 65 4c 69 74 65 72 61 6c 20 3d 20 24 61 73 73 | als();.$assertRuleLiteral.=.$ass |
8bb40 | 65 72 74 52 75 6c 65 4c 69 74 65 72 61 6c 73 5b 30 5d 3b 0a 0a 69 66 20 28 61 62 73 28 24 6c 69 | ertRuleLiterals[0];..if.(abs($li |
8bb60 | 74 65 72 61 6c 29 20 21 3d 3d 20 61 62 73 28 24 61 73 73 65 72 74 52 75 6c 65 4c 69 74 65 72 61 | teral).!==.abs($assertRuleLitera |
8bb80 | 6c 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 24 70 72 6f 62 6c 65 6d 2d 3e 61 64 64 52 | l)).{.continue;.}.$problem->addR |
8bba0 | 75 6c 65 28 24 61 73 73 65 72 74 52 75 6c 65 29 3b 0a 24 61 73 73 65 72 74 52 75 6c 65 2d 3e 64 | ule($assertRule);.$assertRule->d |
8bbc0 | 69 73 61 62 6c 65 28 29 3b 0a 7d 0a 24 74 68 69 73 2d 3e 70 72 6f 62 6c 65 6d 73 5b 5d 20 3d 20 | isable();.}.$this->problems[].=. |
8bbe0 | 24 70 72 6f 62 6c 65 6d 3b 0a 0a 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 73 2d 3e 72 65 73 | $problem;..$this->decisions->res |
8bc00 | 65 74 54 6f 4f 66 66 73 65 74 28 24 64 65 63 69 73 69 6f 6e 53 74 61 72 74 29 3b 0a 24 72 75 6c | etToOffset($decisionStart);.$rul |
8bc20 | 65 49 6e 64 65 78 20 3d 20 2d 31 3b 0a 7d 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 | eIndex.=.-1;.}.}..protected.func |
8bc40 | 74 69 6f 6e 20 73 65 74 75 70 46 69 78 65 64 4d 61 70 28 52 65 71 75 65 73 74 20 24 72 65 71 75 | tion.setupFixedMap(Request.$requ |
8bc60 | 65 73 74 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 66 69 78 65 64 4d 61 70 20 3d 20 5b | est):.void.{.$this->fixedMap.=.[ |
8bc80 | 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 72 65 71 75 65 73 74 2d 3e 67 65 74 46 69 78 65 64 50 61 | ];.foreach.($request->getFixedPa |
8bca0 | 63 6b 61 67 65 73 28 29 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 24 74 68 69 73 2d 3e 66 | ckages().as.$package).{.$this->f |
8bcc0 | 69 78 65 64 4d 61 70 5b 24 70 61 63 6b 61 67 65 2d 3e 69 64 5d 20 3d 20 24 70 61 63 6b 61 67 65 | ixedMap[$package->id].=.$package |
8bce0 | 3b 0a 7d 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 63 68 65 63 6b 46 | ;.}.}..protected.function.checkF |
8bd00 | 6f 72 52 6f 6f 74 52 65 71 75 69 72 65 50 72 6f 62 6c 65 6d 73 28 52 65 71 75 65 73 74 20 24 72 | orRootRequireProblems(Request.$r |
8bd20 | 65 71 75 65 73 74 2c 20 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 | equest,.PlatformRequirementFilte |
8bd40 | 72 49 6e 74 65 72 66 61 63 65 20 24 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 | rInterface.$platformRequirementF |
8bd60 | 69 6c 74 65 72 29 3a 20 76 6f 69 64 0a 7b 0a 66 6f 72 65 61 63 68 20 28 24 72 65 71 75 65 73 74 | ilter):.void.{.foreach.($request |
8bd80 | 2d 3e 67 65 74 52 65 71 75 69 72 65 73 28 29 20 61 73 20 24 70 61 63 6b 61 67 65 4e 61 6d 65 20 | ->getRequires().as.$packageName. |
8bda0 | 3d 3e 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 20 7b 0a 69 66 20 28 24 70 6c 61 74 66 6f 72 6d 52 | =>.$constraint).{.if.($platformR |
8bdc0 | 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 2d 3e 69 73 49 67 6e 6f 72 65 64 28 24 70 61 63 | equirementFilter->isIgnored($pac |
8bde0 | 6b 61 67 65 4e 61 6d 65 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 20 65 6c 73 65 69 66 20 | kageName)).{.continue;.}.elseif. |
8be00 | 28 24 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 20 69 6e 73 74 | ($platformRequirementFilter.inst |
8be20 | 61 6e 63 65 6f 66 20 49 67 6e 6f 72 65 4c 69 73 74 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 | anceof.IgnoreListPlatformRequire |
8be40 | 6d 65 6e 74 46 69 6c 74 65 72 29 20 7b 0a 24 63 6f 6e 73 74 72 61 69 6e 74 20 3d 20 24 70 6c 61 | mentFilter).{.$constraint.=.$pla |
8be60 | 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 2d 3e 66 69 6c 74 65 72 43 6f | tformRequirementFilter->filterCo |
8be80 | 6e 73 74 72 61 69 6e 74 28 24 70 61 63 6b 61 67 65 4e 61 6d 65 2c 20 24 63 6f 6e 73 74 72 61 69 | nstraint($packageName,.$constrai |
8bea0 | 6e 74 29 3b 0a 7d 0a 0a 69 66 20 28 21 24 74 68 69 73 2d 3e 70 6f 6f 6c 2d 3e 77 68 61 74 50 72 | nt);.}..if.(!$this->pool->whatPr |
8bec0 | 6f 76 69 64 65 73 28 24 70 61 63 6b 61 67 65 4e 61 6d 65 2c 20 24 63 6f 6e 73 74 72 61 69 6e 74 | ovides($packageName,.$constraint |
8bee0 | 29 29 20 7b 0a 24 70 72 6f 62 6c 65 6d 20 3d 20 6e 65 77 20 50 72 6f 62 6c 65 6d 28 29 3b 0a 24 | )).{.$problem.=.new.Problem();.$ |
8bf00 | 70 72 6f 62 6c 65 6d 2d 3e 61 64 64 52 75 6c 65 28 6e 65 77 20 47 65 6e 65 72 69 63 52 75 6c 65 | problem->addRule(new.GenericRule |
8bf20 | 28 5b 5d 2c 20 52 75 6c 65 3a 3a 52 55 4c 45 5f 52 4f 4f 54 5f 52 45 51 55 49 52 45 2c 20 5b 27 | ([],.Rule::RULE_ROOT_REQUIRE,.[' |
8bf40 | 70 61 63 6b 61 67 65 4e 61 6d 65 27 20 3d 3e 20 24 70 61 63 6b 61 67 65 4e 61 6d 65 2c 20 27 63 | packageName'.=>.$packageName,.'c |
8bf60 | 6f 6e 73 74 72 61 69 6e 74 27 20 3d 3e 20 24 63 6f 6e 73 74 72 61 69 6e 74 5d 29 29 3b 0a 24 74 | onstraint'.=>.$constraint]));.$t |
8bf80 | 68 69 73 2d 3e 70 72 6f 62 6c 65 6d 73 5b 5d 20 3d 20 24 70 72 6f 62 6c 65 6d 3b 0a 7d 0a 7d 0a | his->problems[].=.$problem;.}.}. |
8bfa0 | 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 6f 6c 76 65 28 52 65 71 75 65 73 74 | }..public.function.solve(Request |
8bfc0 | 20 24 72 65 71 75 65 73 74 2c 20 3f 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 | .$request,.?PlatformRequirementF |
8bfe0 | 69 6c 74 65 72 49 6e 74 65 72 66 61 63 65 20 24 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d | ilterInterface.$platformRequirem |
8c000 | 65 6e 74 46 69 6c 74 65 72 20 3d 20 6e 75 6c 6c 29 3a 20 4c 6f 63 6b 54 72 61 6e 73 61 63 74 69 | entFilter.=.null):.LockTransacti |
8c020 | 6f 6e 0a 7b 0a 24 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 20 | on.{.$platformRequirementFilter. |
8c040 | 3d 20 24 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 20 3f 3a 20 | =.$platformRequirementFilter.?:. |
8c060 | 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 46 61 63 74 6f 72 79 | PlatformRequirementFilterFactory |
8c080 | 3a 3a 69 67 6e 6f 72 65 4e 6f 74 68 69 6e 67 28 29 3b 0a 0a 24 74 68 69 73 2d 3e 73 65 74 75 70 | ::ignoreNothing();..$this->setup |
8c0a0 | 46 69 78 65 64 4d 61 70 28 24 72 65 71 75 65 73 74 29 3b 0a 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e | FixedMap($request);..$this->io-> |
8c0c0 | 77 72 69 74 65 45 72 72 6f 72 28 27 47 65 6e 65 72 61 74 69 6e 67 20 72 75 6c 65 73 27 2c 20 74 | writeError('Generating.rules',.t |
8c0e0 | 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 3a 3a 44 45 42 55 47 29 3b 0a 24 72 75 6c 65 53 | rue,.IOInterface::DEBUG);.$ruleS |
8c100 | 65 74 47 65 6e 65 72 61 74 6f 72 20 3d 20 6e 65 77 20 52 75 6c 65 53 65 74 47 65 6e 65 72 61 74 | etGenerator.=.new.RuleSetGenerat |
8c120 | 6f 72 28 24 74 68 69 73 2d 3e 70 6f 6c 69 63 79 2c 20 24 74 68 69 73 2d 3e 70 6f 6f 6c 29 3b 0a | or($this->policy,.$this->pool);. |
8c140 | 24 74 68 69 73 2d 3e 72 75 6c 65 73 20 3d 20 24 72 75 6c 65 53 65 74 47 65 6e 65 72 61 74 6f 72 | $this->rules.=.$ruleSetGenerator |
8c160 | 2d 3e 67 65 74 52 75 6c 65 73 46 6f 72 28 24 72 65 71 75 65 73 74 2c 20 24 70 6c 61 74 66 6f 72 | ->getRulesFor($request,.$platfor |
8c180 | 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 29 3b 0a 75 6e 73 65 74 28 24 72 75 6c 65 | mRequirementFilter);.unset($rule |
8c1a0 | 53 65 74 47 65 6e 65 72 61 74 6f 72 29 3b 0a 24 74 68 69 73 2d 3e 63 68 65 63 6b 46 6f 72 52 6f | SetGenerator);.$this->checkForRo |
8c1c0 | 6f 74 52 65 71 75 69 72 65 50 72 6f 62 6c 65 6d 73 28 24 72 65 71 75 65 73 74 2c 20 24 70 6c 61 | otRequireProblems($request,.$pla |
8c1e0 | 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 29 3b 0a 24 74 68 69 73 2d 3e | tformRequirementFilter);.$this-> |
8c200 | 64 65 63 69 73 69 6f 6e 73 20 3d 20 6e 65 77 20 44 65 63 69 73 69 6f 6e 73 28 24 74 68 69 73 2d | decisions.=.new.Decisions($this- |
8c220 | 3e 70 6f 6f 6c 29 3b 0a 24 74 68 69 73 2d 3e 77 61 74 63 68 47 72 61 70 68 20 3d 20 6e 65 77 20 | >pool);.$this->watchGraph.=.new. |
8c240 | 52 75 6c 65 57 61 74 63 68 47 72 61 70 68 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d | RuleWatchGraph;..foreach.($this- |
8c260 | 3e 72 75 6c 65 73 20 61 73 20 24 72 75 6c 65 29 20 7b 0a 24 74 68 69 73 2d 3e 77 61 74 63 68 47 | >rules.as.$rule).{.$this->watchG |
8c280 | 72 61 70 68 2d 3e 69 6e 73 65 72 74 28 6e 65 77 20 52 75 6c 65 57 61 74 63 68 4e 6f 64 65 28 24 | raph->insert(new.RuleWatchNode($ |
8c2a0 | 72 75 6c 65 29 29 3b 0a 7d 0a 0a 0a 24 74 68 69 73 2d 3e 6d 61 6b 65 41 73 73 65 72 74 69 6f 6e | rule));.}...$this->makeAssertion |
8c2c0 | 52 75 6c 65 44 65 63 69 73 69 6f 6e 73 28 29 3b 0a 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 | RuleDecisions();..$this->io->wri |
8c2e0 | 74 65 45 72 72 6f 72 28 27 52 65 73 6f 6c 76 69 6e 67 20 64 65 70 65 6e 64 65 6e 63 69 65 73 20 | teError('Resolving.dependencies. |
8c300 | 74 68 72 6f 75 67 68 20 53 41 54 27 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 3a | through.SAT',.true,.IOInterface: |
8c320 | 3a 44 45 42 55 47 29 3b 0a 24 62 65 66 6f 72 65 20 3d 20 6d 69 63 72 6f 74 69 6d 65 28 74 72 75 | :DEBUG);.$before.=.microtime(tru |
8c340 | 65 29 3b 0a 24 74 68 69 73 2d 3e 72 75 6e 53 61 74 28 29 3b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e | e);.$this->runSat();.$this->io-> |
8c360 | 77 72 69 74 65 45 72 72 6f 72 28 27 27 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 | writeError('',.true,.IOInterface |
8c380 | 3a 3a 44 45 42 55 47 29 3b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 | ::DEBUG);.$this->io->writeError( |
8c3a0 | 73 70 72 69 6e 74 66 28 27 44 65 70 65 6e 64 65 6e 63 79 20 72 65 73 6f 6c 75 74 69 6f 6e 20 63 | sprintf('Dependency.resolution.c |
8c3c0 | 6f 6d 70 6c 65 74 65 64 20 69 6e 20 25 2e 33 66 20 73 65 63 6f 6e 64 73 27 2c 20 6d 69 63 72 6f | ompleted.in.%.3f.seconds',.micro |
8c3e0 | 74 69 6d 65 28 74 72 75 65 29 20 2d 20 24 62 65 66 6f 72 65 29 2c 20 74 72 75 65 2c 20 49 4f 49 | time(true).-.$before),.true,.IOI |
8c400 | 6e 74 65 72 66 61 63 65 3a 3a 56 45 52 42 4f 53 45 29 3b 0a 0a 69 66 20 28 24 74 68 69 73 2d 3e | nterface::VERBOSE);..if.($this-> |
8c420 | 70 72 6f 62 6c 65 6d 73 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 53 6f 6c 76 65 72 50 72 6f 62 | problems).{.throw.new.SolverProb |
8c440 | 6c 65 6d 73 45 78 63 65 70 74 69 6f 6e 28 24 74 68 69 73 2d 3e 70 72 6f 62 6c 65 6d 73 2c 20 24 | lemsException($this->problems,.$ |
8c460 | 74 68 69 73 2d 3e 6c 65 61 72 6e 65 64 50 6f 6f 6c 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 6e 65 | this->learnedPool);.}..return.ne |
8c480 | 77 20 4c 6f 63 6b 54 72 61 6e 73 61 63 74 69 6f 6e 28 24 74 68 69 73 2d 3e 70 6f 6f 6c 2c 20 24 | w.LockTransaction($this->pool,.$ |
8c4a0 | 72 65 71 75 65 73 74 2d 3e 67 65 74 50 72 65 73 65 6e 74 4d 61 70 28 29 2c 20 24 72 65 71 75 65 | request->getPresentMap(),.$reque |
8c4c0 | 73 74 2d 3e 67 65 74 46 69 78 65 64 50 61 63 6b 61 67 65 73 4d 61 70 28 29 2c 20 24 74 68 69 73 | st->getFixedPackagesMap(),.$this |
8c4e0 | 2d 3e 64 65 63 69 73 69 6f 6e 73 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 | ->decisions);.}..........protect |
8c500 | 65 64 20 66 75 6e 63 74 69 6f 6e 20 70 72 6f 70 61 67 61 74 65 28 69 6e 74 20 24 6c 65 76 65 6c | ed.function.propagate(int.$level |
8c520 | 29 3a 20 3f 52 75 6c 65 0a 7b 0a 77 68 69 6c 65 20 28 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f | ):.?Rule.{.while.($this->decisio |
8c540 | 6e 73 2d 3e 76 61 6c 69 64 4f 66 66 73 65 74 28 24 74 68 69 73 2d 3e 70 72 6f 70 61 67 61 74 65 | ns->validOffset($this->propagate |
8c560 | 49 6e 64 65 78 29 29 20 7b 0a 24 64 65 63 69 73 69 6f 6e 20 3d 20 24 74 68 69 73 2d 3e 64 65 63 | Index)).{.$decision.=.$this->dec |
8c580 | 69 73 69 6f 6e 73 2d 3e 61 74 4f 66 66 73 65 74 28 24 74 68 69 73 2d 3e 70 72 6f 70 61 67 61 74 | isions->atOffset($this->propagat |
8c5a0 | 65 49 6e 64 65 78 29 3b 0a 0a 24 63 6f 6e 66 6c 69 63 74 20 3d 20 24 74 68 69 73 2d 3e 77 61 74 | eIndex);..$conflict.=.$this->wat |
8c5c0 | 63 68 47 72 61 70 68 2d 3e 70 72 6f 70 61 67 61 74 65 4c 69 74 65 72 61 6c 28 0a 24 64 65 63 69 | chGraph->propagateLiteral(.$deci |
8c5e0 | 73 69 6f 6e 5b 44 65 63 69 73 69 6f 6e 73 3a 3a 44 45 43 49 53 49 4f 4e 5f 4c 49 54 45 52 41 4c | sion[Decisions::DECISION_LITERAL |
8c600 | 5d 2c 0a 24 6c 65 76 65 6c 2c 0a 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 73 0a 29 3b 0a 0a | ],.$level,.$this->decisions.);.. |
8c620 | 24 74 68 69 73 2d 3e 70 72 6f 70 61 67 61 74 65 49 6e 64 65 78 2b 2b 3b 0a 0a 69 66 20 28 24 63 | $this->propagateIndex++;..if.($c |
8c640 | 6f 6e 66 6c 69 63 74 29 20 7b 0a 72 65 74 75 72 6e 20 24 63 6f 6e 66 6c 69 63 74 3b 0a 7d 0a 7d | onflict).{.return.$conflict;.}.} |
8c660 | 0a 0a 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e | ..return.null;.}.....private.fun |
8c680 | 63 74 69 6f 6e 20 72 65 76 65 72 74 28 69 6e 74 20 24 6c 65 76 65 6c 29 3a 20 76 6f 69 64 0a 7b | ction.revert(int.$level):.void.{ |
8c6a0 | 0a 77 68 69 6c 65 20 28 21 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 73 2d 3e 69 73 45 6d 70 | .while.(!$this->decisions->isEmp |
8c6c0 | 74 79 28 29 29 20 7b 0a 24 6c 69 74 65 72 61 6c 20 3d 20 24 74 68 69 73 2d 3e 64 65 63 69 73 69 | ty()).{.$literal.=.$this->decisi |
8c6e0 | 6f 6e 73 2d 3e 6c 61 73 74 4c 69 74 65 72 61 6c 28 29 3b 0a 0a 69 66 20 28 24 74 68 69 73 2d 3e | ons->lastLiteral();..if.($this-> |
8c700 | 64 65 63 69 73 69 6f 6e 73 2d 3e 75 6e 64 65 63 69 64 65 64 28 24 6c 69 74 65 72 61 6c 29 29 20 | decisions->undecided($literal)). |
8c720 | 7b 0a 62 72 65 61 6b 3b 0a 7d 0a 0a 24 64 65 63 69 73 69 6f 6e 4c 65 76 65 6c 20 3d 20 24 74 68 | {.break;.}..$decisionLevel.=.$th |
8c740 | 69 73 2d 3e 64 65 63 69 73 69 6f 6e 73 2d 3e 64 65 63 69 73 69 6f 6e 4c 65 76 65 6c 28 24 6c 69 | is->decisions->decisionLevel($li |
8c760 | 74 65 72 61 6c 29 3b 0a 0a 69 66 20 28 24 64 65 63 69 73 69 6f 6e 4c 65 76 65 6c 20 3c 3d 20 24 | teral);..if.($decisionLevel.<=.$ |
8c780 | 6c 65 76 65 6c 29 20 7b 0a 62 72 65 61 6b 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 64 65 63 69 73 69 | level).{.break;.}..$this->decisi |
8c7a0 | 6f 6e 73 2d 3e 72 65 76 65 72 74 4c 61 73 74 28 29 3b 0a 24 74 68 69 73 2d 3e 70 72 6f 70 61 67 | ons->revertLast();.$this->propag |
8c7c0 | 61 74 65 49 6e 64 65 78 20 3d 20 5c 63 6f 75 6e 74 28 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f | ateIndex.=.\count($this->decisio |
8c7e0 | 6e 73 29 3b 0a 7d 0a 0a 77 68 69 6c 65 20 28 21 65 6d 70 74 79 28 24 74 68 69 73 2d 3e 62 72 61 | ns);.}..while.(!empty($this->bra |
8c800 | 6e 63 68 65 73 29 20 26 26 20 24 74 68 69 73 2d 3e 62 72 61 6e 63 68 65 73 5b 5c 63 6f 75 6e 74 | nches).&&.$this->branches[\count |
8c820 | 28 24 74 68 69 73 2d 3e 62 72 61 6e 63 68 65 73 29 20 2d 20 31 5d 5b 73 65 6c 66 3a 3a 42 52 41 | ($this->branches).-.1][self::BRA |
8c840 | 4e 43 48 5f 4c 45 56 45 4c 5d 20 3e 3d 20 24 6c 65 76 65 6c 29 20 7b 0a 61 72 72 61 79 5f 70 6f | NCH_LEVEL].>=.$level).{.array_po |
8c860 | 70 28 24 74 68 69 73 2d 3e 62 72 61 6e 63 68 65 73 29 3b 0a 7d 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a | p($this->branches);.}.}......... |
8c880 | 0a 0a 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 50 72 6f 70 | ........private.function.setProp |
8c8a0 | 61 67 61 74 65 4c 65 61 72 6e 28 69 6e 74 20 24 6c 65 76 65 6c 2c 20 24 6c 69 74 65 72 61 6c 2c | agateLearn(int.$level,.$literal, |
8c8c0 | 20 52 75 6c 65 20 24 72 75 6c 65 29 3a 20 69 6e 74 0a 7b 0a 24 6c 65 76 65 6c 2b 2b 3b 0a 0a 24 | .Rule.$rule):.int.{.$level++;..$ |
8c8e0 | 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 73 2d 3e 64 65 63 69 64 65 28 24 6c 69 74 65 72 61 6c | this->decisions->decide($literal |
8c900 | 2c 20 24 6c 65 76 65 6c 2c 20 24 72 75 6c 65 29 3b 0a 0a 77 68 69 6c 65 20 28 74 72 75 65 29 20 | ,.$level,.$rule);..while.(true). |
8c920 | 7b 0a 24 72 75 6c 65 20 3d 20 24 74 68 69 73 2d 3e 70 72 6f 70 61 67 61 74 65 28 24 6c 65 76 65 | {.$rule.=.$this->propagate($leve |
8c940 | 6c 29 3b 0a 0a 69 66 20 28 6e 75 6c 6c 20 3d 3d 3d 20 24 72 75 6c 65 29 20 7b 0a 62 72 65 61 6b | l);..if.(null.===.$rule).{.break |
8c960 | 3b 0a 7d 0a 0a 69 66 20 28 24 6c 65 76 65 6c 20 3d 3d 3d 20 31 29 20 7b 0a 72 65 74 75 72 6e 20 | ;.}..if.($level.===.1).{.return. |
8c980 | 24 74 68 69 73 2d 3e 61 6e 61 6c 79 7a 65 55 6e 73 6f 6c 76 61 62 6c 65 28 24 72 75 6c 65 29 3b | $this->analyzeUnsolvable($rule); |
8c9a0 | 0a 7d 0a 0a 0a 5b 24 6c 65 61 72 6e 4c 69 74 65 72 61 6c 2c 20 24 6e 65 77 4c 65 76 65 6c 2c 20 | .}...[$learnLiteral,.$newLevel,. |
8c9c0 | 24 6e 65 77 52 75 6c 65 2c 20 24 77 68 79 5d 20 3d 20 24 74 68 69 73 2d 3e 61 6e 61 6c 79 7a 65 | $newRule,.$why].=.$this->analyze |
8c9e0 | 28 24 6c 65 76 65 6c 2c 20 24 72 75 6c 65 29 3b 0a 0a 69 66 20 28 24 6e 65 77 4c 65 76 65 6c 20 | ($level,.$rule);..if.($newLevel. |
8ca00 | 3c 3d 20 30 20 7c 7c 20 24 6e 65 77 4c 65 76 65 6c 20 3e 3d 20 24 6c 65 76 65 6c 29 20 7b 0a 74 | <=.0.||.$newLevel.>=.$level).{.t |
8ca20 | 68 72 6f 77 20 6e 65 77 20 53 6f 6c 76 65 72 42 75 67 45 78 63 65 70 74 69 6f 6e 28 0a 22 54 72 | hrow.new.SolverBugException(."Tr |
8ca40 | 79 69 6e 67 20 74 6f 20 72 65 76 65 72 74 20 74 6f 20 69 6e 76 61 6c 69 64 20 6c 65 76 65 6c 20 | ying.to.revert.to.invalid.level. |
8ca60 | 22 2e 24 6e 65 77 4c 65 76 65 6c 2e 22 20 66 72 6f 6d 20 6c 65 76 65 6c 20 22 2e 24 6c 65 76 65 | ".$newLevel.".from.level.".$leve |
8ca80 | 6c 2e 22 2e 22 0a 29 3b 0a 7d 0a 0a 24 6c 65 76 65 6c 20 3d 20 24 6e 65 77 4c 65 76 65 6c 3b 0a | l.".".);.}..$level.=.$newLevel;. |
8caa0 | 0a 24 74 68 69 73 2d 3e 72 65 76 65 72 74 28 24 6c 65 76 65 6c 29 3b 0a 0a 24 74 68 69 73 2d 3e | .$this->revert($level);..$this-> |
8cac0 | 72 75 6c 65 73 2d 3e 61 64 64 28 24 6e 65 77 52 75 6c 65 2c 20 52 75 6c 65 53 65 74 3a 3a 54 59 | rules->add($newRule,.RuleSet::TY |
8cae0 | 50 45 5f 4c 45 41 52 4e 45 44 29 3b 0a 0a 24 74 68 69 73 2d 3e 6c 65 61 72 6e 65 64 57 68 79 5b | PE_LEARNED);..$this->learnedWhy[ |
8cb00 | 73 70 6c 5f 6f 62 6a 65 63 74 5f 68 61 73 68 28 24 6e 65 77 52 75 6c 65 29 5d 20 3d 20 24 77 68 | spl_object_hash($newRule)].=.$wh |
8cb20 | 79 3b 0a 0a 24 72 75 6c 65 4e 6f 64 65 20 3d 20 6e 65 77 20 52 75 6c 65 57 61 74 63 68 4e 6f 64 | y;..$ruleNode.=.new.RuleWatchNod |
8cb40 | 65 28 24 6e 65 77 52 75 6c 65 29 3b 0a 24 72 75 6c 65 4e 6f 64 65 2d 3e 77 61 74 63 68 32 4f 6e | e($newRule);.$ruleNode->watch2On |
8cb60 | 48 69 67 68 65 73 74 28 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 73 29 3b 0a 24 74 68 69 73 | Highest($this->decisions);.$this |
8cb80 | 2d 3e 77 61 74 63 68 47 72 61 70 68 2d 3e 69 6e 73 65 72 74 28 24 72 75 6c 65 4e 6f 64 65 29 3b | ->watchGraph->insert($ruleNode); |
8cba0 | 0a 0a 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 73 2d 3e 64 65 63 69 64 65 28 24 6c 65 61 72 | ..$this->decisions->decide($lear |
8cbc0 | 6e 4c 69 74 65 72 61 6c 2c 20 24 6c 65 76 65 6c 2c 20 24 6e 65 77 52 75 6c 65 29 3b 0a 7d 0a 0a | nLiteral,.$level,.$newRule);.}.. |
8cbe0 | 72 65 74 75 72 6e 20 24 6c 65 76 65 6c 3b 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e | return.$level;.}.....private.fun |
8cc00 | 63 74 69 6f 6e 20 73 65 6c 65 63 74 41 6e 64 49 6e 73 74 61 6c 6c 28 69 6e 74 20 24 6c 65 76 65 | ction.selectAndInstall(int.$leve |
8cc20 | 6c 2c 20 61 72 72 61 79 20 24 64 65 63 69 73 69 6f 6e 51 75 65 75 65 2c 20 52 75 6c 65 20 24 72 | l,.array.$decisionQueue,.Rule.$r |
8cc40 | 75 6c 65 29 3a 20 69 6e 74 0a 7b 0a 0a 24 6c 69 74 65 72 61 6c 73 20 3d 20 24 74 68 69 73 2d 3e | ule):.int.{..$literals.=.$this-> |
8cc60 | 70 6f 6c 69 63 79 2d 3e 73 65 6c 65 63 74 50 72 65 66 65 72 72 65 64 50 61 63 6b 61 67 65 73 28 | policy->selectPreferredPackages( |
8cc80 | 24 74 68 69 73 2d 3e 70 6f 6f 6c 2c 20 24 64 65 63 69 73 69 6f 6e 51 75 65 75 65 2c 20 24 72 75 | $this->pool,.$decisionQueue,.$ru |
8cca0 | 6c 65 2d 3e 67 65 74 52 65 71 75 69 72 65 64 50 61 63 6b 61 67 65 28 29 29 3b 0a 0a 24 73 65 6c | le->getRequiredPackage());..$sel |
8ccc0 | 65 63 74 65 64 4c 69 74 65 72 61 6c 20 3d 20 61 72 72 61 79 5f 73 68 69 66 74 28 24 6c 69 74 65 | ectedLiteral.=.array_shift($lite |
8cce0 | 72 61 6c 73 29 3b 0a 0a 0a 69 66 20 28 5c 63 6f 75 6e 74 28 24 6c 69 74 65 72 61 6c 73 29 29 20 | rals);...if.(\count($literals)). |
8cd00 | 7b 0a 24 74 68 69 73 2d 3e 62 72 61 6e 63 68 65 73 5b 5d 20 3d 20 5b 24 6c 69 74 65 72 61 6c 73 | {.$this->branches[].=.[$literals |
8cd20 | 2c 20 24 6c 65 76 65 6c 5d 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 73 65 74 50 | ,.$level];.}..return.$this->setP |
8cd40 | 72 6f 70 61 67 61 74 65 4c 65 61 72 6e 28 24 6c 65 76 65 6c 2c 20 24 73 65 6c 65 63 74 65 64 4c | ropagateLearn($level,.$selectedL |
8cd60 | 69 74 65 72 61 6c 2c 20 24 72 75 6c 65 29 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 | iteral,.$rule);.}.....protected. |
8cd80 | 66 75 6e 63 74 69 6f 6e 20 61 6e 61 6c 79 7a 65 28 69 6e 74 20 24 6c 65 76 65 6c 2c 20 52 75 6c | function.analyze(int.$level,.Rul |
8cda0 | 65 20 24 72 75 6c 65 29 3a 20 61 72 72 61 79 0a 7b 0a 24 61 6e 61 6c 79 7a 65 64 52 75 6c 65 20 | e.$rule):.array.{.$analyzedRule. |
8cdc0 | 3d 20 24 72 75 6c 65 3b 0a 24 72 75 6c 65 4c 65 76 65 6c 20 3d 20 31 3b 0a 24 6e 75 6d 20 3d 20 | =.$rule;.$ruleLevel.=.1;.$num.=. |
8cde0 | 30 3b 0a 24 6c 31 6e 75 6d 20 3d 20 30 3b 0a 24 73 65 65 6e 20 3d 20 5b 5d 3b 0a 24 6c 65 61 72 | 0;.$l1num.=.0;.$seen.=.[];.$lear |
8ce00 | 6e 65 64 4c 69 74 65 72 61 6c 73 20 3d 20 5b 6e 75 6c 6c 5d 3b 0a 0a 24 64 65 63 69 73 69 6f 6e | nedLiterals.=.[null];..$decision |
8ce20 | 49 64 20 3d 20 5c 63 6f 75 6e 74 28 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 73 29 3b 0a 0a | Id.=.\count($this->decisions);.. |
8ce40 | 24 74 68 69 73 2d 3e 6c 65 61 72 6e 65 64 50 6f 6f 6c 5b 5d 20 3d 20 5b 5d 3b 0a 0a 77 68 69 6c | $this->learnedPool[].=.[];..whil |
8ce60 | 65 20 28 74 72 75 65 29 20 7b 0a 24 74 68 69 73 2d 3e 6c 65 61 72 6e 65 64 50 6f 6f 6c 5b 5c 63 | e.(true).{.$this->learnedPool[\c |
8ce80 | 6f 75 6e 74 28 24 74 68 69 73 2d 3e 6c 65 61 72 6e 65 64 50 6f 6f 6c 29 20 2d 20 31 5d 5b 5d 20 | ount($this->learnedPool).-.1][]. |
8cea0 | 3d 20 24 72 75 6c 65 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 72 75 6c 65 2d 3e 67 65 74 4c 69 74 | =.$rule;..foreach.($rule->getLit |
8cec0 | 65 72 61 6c 73 28 29 20 61 73 20 24 6c 69 74 65 72 61 6c 29 20 7b 0a 0a 69 66 20 28 24 72 75 6c | erals().as.$literal).{..if.($rul |
8cee0 | 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 4d 75 6c 74 69 43 6f 6e 66 6c 69 63 74 52 75 6c 65 20 26 | e.instanceof.MultiConflictRule.& |
8cf00 | 26 20 21 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 73 2d 3e 64 65 63 69 64 65 64 28 24 6c 69 | &.!$this->decisions->decided($li |
8cf20 | 74 65 72 61 6c 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 0a 69 66 20 28 24 74 68 69 | teral)).{.continue;.}...if.($thi |
8cf40 | 73 2d 3e 64 65 63 69 73 69 6f 6e 73 2d 3e 73 61 74 69 73 66 79 28 24 6c 69 74 65 72 61 6c 29 29 | s->decisions->satisfy($literal)) |
8cf60 | 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 69 66 20 28 69 73 73 65 74 28 24 73 65 65 6e 5b | .{.continue;.}..if.(isset($seen[ |
8cf80 | 61 62 73 28 24 6c 69 74 65 72 61 6c 29 5d 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 24 | abs($literal)])).{.continue;.}.$ |
8cfa0 | 73 65 65 6e 5b 61 62 73 28 24 6c 69 74 65 72 61 6c 29 5d 20 3d 20 74 72 75 65 3b 0a 0a 24 6c 20 | seen[abs($literal)].=.true;..$l. |
8cfc0 | 3d 20 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 73 2d 3e 64 65 63 69 73 69 6f 6e 4c 65 76 65 | =.$this->decisions->decisionLeve |
8cfe0 | 6c 28 24 6c 69 74 65 72 61 6c 29 3b 0a 0a 69 66 20 28 31 20 3d 3d 3d 20 24 6c 29 20 7b 0a 24 6c | l($literal);..if.(1.===.$l).{.$l |
8d000 | 31 6e 75 6d 2b 2b 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 6c 65 76 65 6c 20 3d 3d 3d 20 24 6c 29 | 1num++;.}.elseif.($level.===.$l) |
8d020 | 20 7b 0a 24 6e 75 6d 2b 2b 3b 0a 7d 20 65 6c 73 65 20 7b 0a 0a 24 6c 65 61 72 6e 65 64 4c 69 74 | .{.$num++;.}.else.{..$learnedLit |
8d040 | 65 72 61 6c 73 5b 5d 20 3d 20 24 6c 69 74 65 72 61 6c 3b 0a 0a 69 66 20 28 24 6c 20 3e 20 24 72 | erals[].=.$literal;..if.($l.>.$r |
8d060 | 75 6c 65 4c 65 76 65 6c 29 20 7b 0a 24 72 75 6c 65 4c 65 76 65 6c 20 3d 20 24 6c 3b 0a 7d 0a 7d | uleLevel).{.$ruleLevel.=.$l;.}.} |
8d080 | 0a 7d 0a 75 6e 73 65 74 28 24 6c 69 74 65 72 61 6c 29 3b 0a 0a 24 6c 31 72 65 74 72 79 20 3d 20 | .}.unset($literal);..$l1retry.=. |
8d0a0 | 74 72 75 65 3b 0a 77 68 69 6c 65 20 28 24 6c 31 72 65 74 72 79 29 20 7b 0a 24 6c 31 72 65 74 72 | true;.while.($l1retry).{.$l1retr |
8d0c0 | 79 20 3d 20 66 61 6c 73 65 3b 0a 0a 69 66 20 28 30 20 3d 3d 3d 20 24 6e 75 6d 20 26 26 20 30 20 | y.=.false;..if.(0.===.$num.&&.0. |
8d0e0 | 3d 3d 3d 20 2d 2d 24 6c 31 6e 75 6d 29 20 7b 0a 0a 62 72 65 61 6b 20 32 3b 0a 7d 0a 0a 77 68 69 | ===.--$l1num).{..break.2;.}..whi |
8d100 | 6c 65 20 28 74 72 75 65 29 20 7b 0a 69 66 20 28 24 64 65 63 69 73 69 6f 6e 49 64 20 3c 3d 20 30 | le.(true).{.if.($decisionId.<=.0 |
8d120 | 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 53 6f 6c 76 65 72 42 75 67 45 78 63 65 70 74 69 6f 6e | ).{.throw.new.SolverBugException |
8d140 | 28 0a 22 52 65 61 63 68 65 64 20 69 6e 76 61 6c 69 64 20 64 65 63 69 73 69 6f 6e 20 69 64 20 24 | (."Reached.invalid.decision.id.$ |
8d160 | 64 65 63 69 73 69 6f 6e 49 64 20 77 68 69 6c 65 20 6c 6f 6f 6b 69 6e 67 20 74 68 72 6f 75 67 68 | decisionId.while.looking.through |
8d180 | 20 24 72 75 6c 65 20 66 6f 72 20 61 20 6c 69 74 65 72 61 6c 20 70 72 65 73 65 6e 74 20 69 6e 20 | .$rule.for.a.literal.present.in. |
8d1a0 | 74 68 65 20 61 6e 61 6c 79 7a 65 64 20 72 75 6c 65 20 24 61 6e 61 6c 79 7a 65 64 52 75 6c 65 2e | the.analyzed.rule.$analyzedRule. |
8d1c0 | 22 0a 29 3b 0a 7d 0a 0a 24 64 65 63 69 73 69 6f 6e 49 64 2d 2d 3b 0a 0a 24 64 65 63 69 73 69 6f | ".);.}..$decisionId--;..$decisio |
8d1e0 | 6e 20 3d 20 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 73 2d 3e 61 74 4f 66 66 73 65 74 28 24 | n.=.$this->decisions->atOffset($ |
8d200 | 64 65 63 69 73 69 6f 6e 49 64 29 3b 0a 24 6c 69 74 65 72 61 6c 20 3d 20 24 64 65 63 69 73 69 6f | decisionId);.$literal.=.$decisio |
8d220 | 6e 5b 44 65 63 69 73 69 6f 6e 73 3a 3a 44 45 43 49 53 49 4f 4e 5f 4c 49 54 45 52 41 4c 5d 3b 0a | n[Decisions::DECISION_LITERAL];. |
8d240 | 0a 69 66 20 28 69 73 73 65 74 28 24 73 65 65 6e 5b 61 62 73 28 24 6c 69 74 65 72 61 6c 29 5d 29 | .if.(isset($seen[abs($literal)]) |
8d260 | 29 20 7b 0a 62 72 65 61 6b 3b 0a 7d 0a 7d 0a 0a 75 6e 73 65 74 28 24 73 65 65 6e 5b 61 62 73 28 | ).{.break;.}.}..unset($seen[abs( |
8d280 | 24 6c 69 74 65 72 61 6c 29 5d 29 3b 0a 0a 69 66 20 28 30 20 21 3d 3d 20 24 6e 75 6d 20 26 26 20 | $literal)]);..if.(0.!==.$num.&&. |
8d2a0 | 30 20 3d 3d 3d 20 2d 2d 24 6e 75 6d 29 20 7b 0a 69 66 20 28 24 6c 69 74 65 72 61 6c 20 3c 20 30 | 0.===.--$num).{.if.($literal.<.0 |
8d2c0 | 29 20 7b 0a 24 74 68 69 73 2d 3e 74 65 73 74 46 6c 61 67 4c 65 61 72 6e 65 64 50 6f 73 69 74 69 | ).{.$this->testFlagLearnedPositi |
8d2e0 | 76 65 4c 69 74 65 72 61 6c 20 3d 20 74 72 75 65 3b 0a 7d 0a 24 6c 65 61 72 6e 65 64 4c 69 74 65 | veLiteral.=.true;.}.$learnedLite |
8d300 | 72 61 6c 73 5b 30 5d 20 3d 20 2d 24 6c 69 74 65 72 61 6c 3b 0a 0a 69 66 20 28 21 24 6c 31 6e 75 | rals[0].=.-$literal;..if.(!$l1nu |
8d320 | 6d 29 20 7b 0a 62 72 65 61 6b 20 32 3b 0a 7d 0a 0a 66 6f 72 65 61 63 68 20 28 24 6c 65 61 72 6e | m).{.break.2;.}..foreach.($learn |
8d340 | 65 64 4c 69 74 65 72 61 6c 73 20 61 73 20 24 69 20 3d 3e 20 24 6c 65 61 72 6e 65 64 4c 69 74 65 | edLiterals.as.$i.=>.$learnedLite |
8d360 | 72 61 6c 29 20 7b 0a 69 66 20 28 24 69 20 21 3d 3d 20 30 29 20 7b 0a 75 6e 73 65 74 28 24 73 65 | ral).{.if.($i.!==.0).{.unset($se |
8d380 | 65 6e 5b 61 62 73 28 24 6c 65 61 72 6e 65 64 4c 69 74 65 72 61 6c 29 5d 29 3b 0a 7d 0a 7d 0a 0a | en[abs($learnedLiteral)]);.}.}.. |
8d3a0 | 24 6c 31 6e 75 6d 2b 2b 3b 0a 24 6c 31 72 65 74 72 79 20 3d 20 74 72 75 65 3b 0a 7d 20 65 6c 73 | $l1num++;.$l1retry.=.true;.}.els |
8d3c0 | 65 20 7b 0a 24 64 65 63 69 73 69 6f 6e 20 3d 20 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 73 | e.{.$decision.=.$this->decisions |
8d3e0 | 2d 3e 61 74 4f 66 66 73 65 74 28 24 64 65 63 69 73 69 6f 6e 49 64 29 3b 0a 24 72 75 6c 65 20 3d | ->atOffset($decisionId);.$rule.= |
8d400 | 20 24 64 65 63 69 73 69 6f 6e 5b 44 65 63 69 73 69 6f 6e 73 3a 3a 44 45 43 49 53 49 4f 4e 5f 52 | .$decision[Decisions::DECISION_R |
8d420 | 45 41 53 4f 4e 5d 3b 0a 0a 69 66 20 28 24 72 75 6c 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 4d 75 | EASON];..if.($rule.instanceof.Mu |
8d440 | 6c 74 69 43 6f 6e 66 6c 69 63 74 52 75 6c 65 29 20 7b 0a 0a 66 6f 72 65 61 63 68 20 28 24 72 75 | ltiConflictRule).{..foreach.($ru |
8d460 | 6c 65 2d 3e 67 65 74 4c 69 74 65 72 61 6c 73 28 29 20 61 73 20 24 6c 69 74 65 72 61 6c 29 20 7b | le->getLiterals().as.$literal).{ |
8d480 | 0a 69 66 20 28 21 69 73 73 65 74 28 24 73 65 65 6e 5b 61 62 73 28 24 6c 69 74 65 72 61 6c 29 5d | .if.(!isset($seen[abs($literal)] |
8d4a0 | 29 20 26 26 20 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 73 2d 3e 73 61 74 69 73 66 79 28 2d | ).&&.$this->decisions->satisfy(- |
8d4c0 | 24 6c 69 74 65 72 61 6c 29 29 20 7b 0a 24 74 68 69 73 2d 3e 6c 65 61 72 6e 65 64 50 6f 6f 6c 5b | $literal)).{.$this->learnedPool[ |
8d4e0 | 5c 63 6f 75 6e 74 28 24 74 68 69 73 2d 3e 6c 65 61 72 6e 65 64 50 6f 6f 6c 29 20 2d 20 31 5d 5b | \count($this->learnedPool).-.1][ |
8d500 | 5d 20 3d 20 24 72 75 6c 65 3b 0a 24 6c 20 3d 20 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 73 | ].=.$rule;.$l.=.$this->decisions |
8d520 | 2d 3e 64 65 63 69 73 69 6f 6e 4c 65 76 65 6c 28 24 6c 69 74 65 72 61 6c 29 3b 0a 69 66 20 28 31 | ->decisionLevel($literal);.if.(1 |
8d540 | 20 3d 3d 3d 20 24 6c 29 20 7b 0a 24 6c 31 6e 75 6d 2b 2b 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 | .===.$l).{.$l1num++;.}.elseif.($ |
8d560 | 6c 65 76 65 6c 20 3d 3d 3d 20 24 6c 29 20 7b 0a 24 6e 75 6d 2b 2b 3b 0a 7d 20 65 6c 73 65 20 7b | level.===.$l).{.$num++;.}.else.{ |
8d580 | 0a 0a 24 6c 65 61 72 6e 65 64 4c 69 74 65 72 61 6c 73 5b 5d 20 3d 20 24 6c 69 74 65 72 61 6c 3b | ..$learnedLiterals[].=.$literal; |
8d5a0 | 0a 0a 69 66 20 28 24 6c 20 3e 20 24 72 75 6c 65 4c 65 76 65 6c 29 20 7b 0a 24 72 75 6c 65 4c 65 | ..if.($l.>.$ruleLevel).{.$ruleLe |
8d5c0 | 76 65 6c 20 3d 20 24 6c 3b 0a 7d 0a 7d 0a 24 73 65 65 6e 5b 61 62 73 28 24 6c 69 74 65 72 61 6c | vel.=.$l;.}.}.$seen[abs($literal |
8d5e0 | 29 5d 20 3d 20 74 72 75 65 3b 0a 62 72 65 61 6b 3b 0a 7d 0a 7d 0a 0a 24 6c 31 72 65 74 72 79 20 | )].=.true;.break;.}.}..$l1retry. |
8d600 | 3d 20 74 72 75 65 3b 0a 7d 0a 7d 0a 7d 0a 0a 24 64 65 63 69 73 69 6f 6e 20 3d 20 24 74 68 69 73 | =.true;.}.}.}..$decision.=.$this |
8d620 | 2d 3e 64 65 63 69 73 69 6f 6e 73 2d 3e 61 74 4f 66 66 73 65 74 28 24 64 65 63 69 73 69 6f 6e 49 | ->decisions->atOffset($decisionI |
8d640 | 64 29 3b 0a 24 72 75 6c 65 20 3d 20 24 64 65 63 69 73 69 6f 6e 5b 44 65 63 69 73 69 6f 6e 73 3a | d);.$rule.=.$decision[Decisions: |
8d660 | 3a 44 45 43 49 53 49 4f 4e 5f 52 45 41 53 4f 4e 5d 3b 0a 7d 0a 0a 24 77 68 79 20 3d 20 5c 63 6f | :DECISION_REASON];.}..$why.=.\co |
8d680 | 75 6e 74 28 24 74 68 69 73 2d 3e 6c 65 61 72 6e 65 64 50 6f 6f 6c 29 20 2d 20 31 3b 0a 0a 69 66 | unt($this->learnedPool).-.1;..if |
8d6a0 | 20 28 21 24 6c 65 61 72 6e 65 64 4c 69 74 65 72 61 6c 73 5b 30 5d 29 20 7b 0a 74 68 72 6f 77 20 | .(!$learnedLiterals[0]).{.throw. |
8d6c0 | 6e 65 77 20 53 6f 6c 76 65 72 42 75 67 45 78 63 65 70 74 69 6f 6e 28 0a 22 44 69 64 20 6e 6f 74 | new.SolverBugException(."Did.not |
8d6e0 | 20 66 69 6e 64 20 61 20 6c 65 61 72 6e 61 62 6c 65 20 6c 69 74 65 72 61 6c 20 69 6e 20 61 6e 61 | .find.a.learnable.literal.in.ana |
8d700 | 6c 79 7a 65 64 20 72 75 6c 65 20 24 61 6e 61 6c 79 7a 65 64 52 75 6c 65 2e 22 0a 29 3b 0a 7d 0a | lyzed.rule.$analyzedRule.".);.}. |
8d720 | 0a 24 6e 65 77 52 75 6c 65 20 3d 20 6e 65 77 20 47 65 6e 65 72 69 63 52 75 6c 65 28 24 6c 65 61 | .$newRule.=.new.GenericRule($lea |
8d740 | 72 6e 65 64 4c 69 74 65 72 61 6c 73 2c 20 52 75 6c 65 3a 3a 52 55 4c 45 5f 4c 45 41 52 4e 45 44 | rnedLiterals,.Rule::RULE_LEARNED |
8d760 | 2c 20 24 77 68 79 29 3b 0a 0a 72 65 74 75 72 6e 20 5b 24 6c 65 61 72 6e 65 64 4c 69 74 65 72 61 | ,.$why);..return.[$learnedLitera |
8d780 | 6c 73 5b 30 5d 2c 20 24 72 75 6c 65 4c 65 76 65 6c 2c 20 24 6e 65 77 52 75 6c 65 2c 20 24 77 68 | ls[0],.$ruleLevel,.$newRule,.$wh |
8d7a0 | 79 5d 3b 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 61 6e 61 6c 79 | y];.}.....private.function.analy |
8d7c0 | 7a 65 55 6e 73 6f 6c 76 61 62 6c 65 52 75 6c 65 28 50 72 6f 62 6c 65 6d 20 24 70 72 6f 62 6c 65 | zeUnsolvableRule(Problem.$proble |
8d7e0 | 6d 2c 20 52 75 6c 65 20 24 63 6f 6e 66 6c 69 63 74 52 75 6c 65 2c 20 61 72 72 61 79 20 26 24 72 | m,.Rule.$conflictRule,.array.&$r |
8d800 | 75 6c 65 53 65 65 6e 29 3a 20 76 6f 69 64 0a 7b 0a 24 77 68 79 20 3d 20 73 70 6c 5f 6f 62 6a 65 | uleSeen):.void.{.$why.=.spl_obje |
8d820 | 63 74 5f 68 61 73 68 28 24 63 6f 6e 66 6c 69 63 74 52 75 6c 65 29 3b 0a 24 72 75 6c 65 53 65 65 | ct_hash($conflictRule);.$ruleSee |
8d840 | 6e 5b 24 77 68 79 5d 20 3d 20 74 72 75 65 3b 0a 0a 69 66 20 28 24 63 6f 6e 66 6c 69 63 74 52 75 | n[$why].=.true;..if.($conflictRu |
8d860 | 6c 65 2d 3e 67 65 74 54 79 70 65 28 29 20 3d 3d 3d 20 52 75 6c 65 53 65 74 3a 3a 54 59 50 45 5f | le->getType().===.RuleSet::TYPE_ |
8d880 | 4c 45 41 52 4e 45 44 29 20 7b 0a 24 6c 65 61 72 6e 65 64 57 68 79 20 3d 20 24 74 68 69 73 2d 3e | LEARNED).{.$learnedWhy.=.$this-> |
8d8a0 | 6c 65 61 72 6e 65 64 57 68 79 5b 24 77 68 79 5d 3b 0a 24 70 72 6f 62 6c 65 6d 52 75 6c 65 73 20 | learnedWhy[$why];.$problemRules. |
8d8c0 | 3d 20 24 74 68 69 73 2d 3e 6c 65 61 72 6e 65 64 50 6f 6f 6c 5b 24 6c 65 61 72 6e 65 64 57 68 79 | =.$this->learnedPool[$learnedWhy |
8d8e0 | 5d 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 70 72 6f 62 6c 65 6d 52 75 6c 65 73 20 61 73 20 24 70 | ];..foreach.($problemRules.as.$p |
8d900 | 72 6f 62 6c 65 6d 52 75 6c 65 29 20 7b 0a 69 66 20 28 21 69 73 73 65 74 28 24 72 75 6c 65 53 65 | roblemRule).{.if.(!isset($ruleSe |
8d920 | 65 6e 5b 73 70 6c 5f 6f 62 6a 65 63 74 5f 68 61 73 68 28 24 70 72 6f 62 6c 65 6d 52 75 6c 65 29 | en[spl_object_hash($problemRule) |
8d940 | 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 61 6e 61 6c 79 7a 65 55 6e 73 6f 6c 76 61 62 6c 65 52 75 | ])).{.$this->analyzeUnsolvableRu |
8d960 | 6c 65 28 24 70 72 6f 62 6c 65 6d 2c 20 24 70 72 6f 62 6c 65 6d 52 75 6c 65 2c 20 24 72 75 6c 65 | le($problem,.$problemRule,.$rule |
8d980 | 53 65 65 6e 29 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 3b 0a 7d 0a 0a 69 66 20 28 24 63 6f 6e 66 | Seen);.}.}..return;.}..if.($conf |
8d9a0 | 6c 69 63 74 52 75 6c 65 2d 3e 67 65 74 54 79 70 65 28 29 20 3d 3d 3d 20 52 75 6c 65 53 65 74 3a | lictRule->getType().===.RuleSet: |
8d9c0 | 3a 54 59 50 45 5f 50 41 43 4b 41 47 45 29 20 7b 0a 0a 72 65 74 75 72 6e 3b 0a 7d 0a 0a 24 70 72 | :TYPE_PACKAGE).{..return;.}..$pr |
8d9e0 | 6f 62 6c 65 6d 2d 3e 6e 65 78 74 53 65 63 74 69 6f 6e 28 29 3b 0a 24 70 72 6f 62 6c 65 6d 2d 3e | oblem->nextSection();.$problem-> |
8da00 | 61 64 64 52 75 6c 65 28 24 63 6f 6e 66 6c 69 63 74 52 75 6c 65 29 3b 0a 7d 0a 0a 70 72 69 76 61 | addRule($conflictRule);.}..priva |
8da20 | 74 65 20 66 75 6e 63 74 69 6f 6e 20 61 6e 61 6c 79 7a 65 55 6e 73 6f 6c 76 61 62 6c 65 28 52 75 | te.function.analyzeUnsolvable(Ru |
8da40 | 6c 65 20 24 63 6f 6e 66 6c 69 63 74 52 75 6c 65 29 3a 20 69 6e 74 0a 7b 0a 24 70 72 6f 62 6c 65 | le.$conflictRule):.int.{.$proble |
8da60 | 6d 20 3d 20 6e 65 77 20 50 72 6f 62 6c 65 6d 28 29 3b 0a 24 70 72 6f 62 6c 65 6d 2d 3e 61 64 64 | m.=.new.Problem();.$problem->add |
8da80 | 52 75 6c 65 28 24 63 6f 6e 66 6c 69 63 74 52 75 6c 65 29 3b 0a 0a 24 72 75 6c 65 53 65 65 6e 20 | Rule($conflictRule);..$ruleSeen. |
8daa0 | 3d 20 5b 5d 3b 0a 0a 24 74 68 69 73 2d 3e 61 6e 61 6c 79 7a 65 55 6e 73 6f 6c 76 61 62 6c 65 52 | =.[];..$this->analyzeUnsolvableR |
8dac0 | 75 6c 65 28 24 70 72 6f 62 6c 65 6d 2c 20 24 63 6f 6e 66 6c 69 63 74 52 75 6c 65 2c 20 24 72 75 | ule($problem,.$conflictRule,.$ru |
8dae0 | 6c 65 53 65 65 6e 29 3b 0a 0a 24 74 68 69 73 2d 3e 70 72 6f 62 6c 65 6d 73 5b 5d 20 3d 20 24 70 | leSeen);..$this->problems[].=.$p |
8db00 | 72 6f 62 6c 65 6d 3b 0a 0a 24 73 65 65 6e 20 3d 20 5b 5d 3b 0a 24 6c 69 74 65 72 61 6c 73 20 3d | roblem;..$seen.=.[];.$literals.= |
8db20 | 20 24 63 6f 6e 66 6c 69 63 74 52 75 6c 65 2d 3e 67 65 74 4c 69 74 65 72 61 6c 73 28 29 3b 0a 0a | .$conflictRule->getLiterals();.. |
8db40 | 66 6f 72 65 61 63 68 20 28 24 6c 69 74 65 72 61 6c 73 20 61 73 20 24 6c 69 74 65 72 61 6c 29 20 | foreach.($literals.as.$literal). |
8db60 | 7b 0a 0a 69 66 20 28 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 73 2d 3e 73 61 74 69 73 66 79 | {..if.($this->decisions->satisfy |
8db80 | 28 24 6c 69 74 65 72 61 6c 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 24 73 65 65 6e 5b | ($literal)).{.continue;.}.$seen[ |
8dba0 | 61 62 73 28 24 6c 69 74 65 72 61 6c 29 5d 20 3d 20 74 72 75 65 3b 0a 7d 0a 0a 66 6f 72 65 61 63 | abs($literal)].=.true;.}..foreac |
8dbc0 | 68 20 28 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 73 20 61 73 20 24 64 65 63 69 73 69 6f 6e | h.($this->decisions.as.$decision |
8dbe0 | 29 20 7b 0a 24 6c 69 74 65 72 61 6c 20 3d 20 24 64 65 63 69 73 69 6f 6e 5b 44 65 63 69 73 69 6f | ).{.$literal.=.$decision[Decisio |
8dc00 | 6e 73 3a 3a 44 45 43 49 53 49 4f 4e 5f 4c 49 54 45 52 41 4c 5d 3b 0a 0a 0a 69 66 20 28 21 69 73 | ns::DECISION_LITERAL];...if.(!is |
8dc20 | 73 65 74 28 24 73 65 65 6e 5b 61 62 73 28 24 6c 69 74 65 72 61 6c 29 5d 29 29 20 7b 0a 63 6f 6e | set($seen[abs($literal)])).{.con |
8dc40 | 74 69 6e 75 65 3b 0a 7d 0a 0a 24 77 68 79 20 3d 20 24 64 65 63 69 73 69 6f 6e 5b 44 65 63 69 73 | tinue;.}..$why.=.$decision[Decis |
8dc60 | 69 6f 6e 73 3a 3a 44 45 43 49 53 49 4f 4e 5f 52 45 41 53 4f 4e 5d 3b 0a 0a 24 70 72 6f 62 6c 65 | ions::DECISION_REASON];..$proble |
8dc80 | 6d 2d 3e 61 64 64 52 75 6c 65 28 24 77 68 79 29 3b 0a 24 74 68 69 73 2d 3e 61 6e 61 6c 79 7a 65 | m->addRule($why);.$this->analyze |
8dca0 | 55 6e 73 6f 6c 76 61 62 6c 65 52 75 6c 65 28 24 70 72 6f 62 6c 65 6d 2c 20 24 77 68 79 2c 20 24 | UnsolvableRule($problem,.$why,.$ |
8dcc0 | 72 75 6c 65 53 65 65 6e 29 3b 0a 0a 24 6c 69 74 65 72 61 6c 73 20 3d 20 24 77 68 79 2d 3e 67 65 | ruleSeen);..$literals.=.$why->ge |
8dce0 | 74 4c 69 74 65 72 61 6c 73 28 29 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 6c 69 74 65 72 61 6c 73 | tLiterals();..foreach.($literals |
8dd00 | 20 61 73 20 24 6c 69 74 65 72 61 6c 29 20 7b 0a 0a 69 66 20 28 24 74 68 69 73 2d 3e 64 65 63 69 | .as.$literal).{..if.($this->deci |
8dd20 | 73 69 6f 6e 73 2d 3e 73 61 74 69 73 66 79 28 24 6c 69 74 65 72 61 6c 29 29 20 7b 0a 63 6f 6e 74 | sions->satisfy($literal)).{.cont |
8dd40 | 69 6e 75 65 3b 0a 7d 0a 24 73 65 65 6e 5b 61 62 73 28 24 6c 69 74 65 72 61 6c 29 5d 20 3d 20 74 | inue;.}.$seen[abs($literal)].=.t |
8dd60 | 72 75 65 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 72 | rue;.}.}..return.0;.}.........pr |
8dd80 | 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 65 6e 61 62 6c 65 44 69 73 61 62 6c 65 4c 65 61 72 | ivate.function.enableDisableLear |
8dda0 | 6e 65 64 52 75 6c 65 73 28 29 3a 20 76 6f 69 64 0a 7b 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 | nedRules():.void.{.foreach.($thi |
8ddc0 | 73 2d 3e 72 75 6c 65 73 2d 3e 67 65 74 49 74 65 72 61 74 6f 72 46 6f 72 28 52 75 6c 65 53 65 74 | s->rules->getIteratorFor(RuleSet |
8dde0 | 3a 3a 54 59 50 45 5f 4c 45 41 52 4e 45 44 29 20 61 73 20 24 72 75 6c 65 29 20 7b 0a 24 77 68 79 | ::TYPE_LEARNED).as.$rule).{.$why |
8de00 | 20 3d 20 24 74 68 69 73 2d 3e 6c 65 61 72 6e 65 64 57 68 79 5b 73 70 6c 5f 6f 62 6a 65 63 74 5f | .=.$this->learnedWhy[spl_object_ |
8de20 | 68 61 73 68 28 24 72 75 6c 65 29 5d 3b 0a 24 70 72 6f 62 6c 65 6d 52 75 6c 65 73 20 3d 20 24 74 | hash($rule)];.$problemRules.=.$t |
8de40 | 68 69 73 2d 3e 6c 65 61 72 6e 65 64 50 6f 6f 6c 5b 24 77 68 79 5d 3b 0a 0a 24 66 6f 75 6e 64 44 | his->learnedPool[$why];..$foundD |
8de60 | 69 73 61 62 6c 65 64 20 3d 20 66 61 6c 73 65 3b 0a 66 6f 72 65 61 63 68 20 28 24 70 72 6f 62 6c | isabled.=.false;.foreach.($probl |
8de80 | 65 6d 52 75 6c 65 73 20 61 73 20 24 70 72 6f 62 6c 65 6d 52 75 6c 65 29 20 7b 0a 69 66 20 28 24 | emRules.as.$problemRule).{.if.($ |
8dea0 | 70 72 6f 62 6c 65 6d 52 75 6c 65 2d 3e 69 73 44 69 73 61 62 6c 65 64 28 29 29 20 7b 0a 24 66 6f | problemRule->isDisabled()).{.$fo |
8dec0 | 75 6e 64 44 69 73 61 62 6c 65 64 20 3d 20 74 72 75 65 3b 0a 62 72 65 61 6b 3b 0a 7d 0a 7d 0a 0a | undDisabled.=.true;.break;.}.}.. |
8dee0 | 69 66 20 28 24 66 6f 75 6e 64 44 69 73 61 62 6c 65 64 20 26 26 20 24 72 75 6c 65 2d 3e 69 73 45 | if.($foundDisabled.&&.$rule->isE |
8df00 | 6e 61 62 6c 65 64 28 29 29 20 7b 0a 24 72 75 6c 65 2d 3e 64 69 73 61 62 6c 65 28 29 3b 0a 7d 20 | nabled()).{.$rule->disable();.}. |
8df20 | 65 6c 73 65 69 66 20 28 21 24 66 6f 75 6e 64 44 69 73 61 62 6c 65 64 20 26 26 20 24 72 75 6c 65 | elseif.(!$foundDisabled.&&.$rule |
8df40 | 2d 3e 69 73 44 69 73 61 62 6c 65 64 28 29 29 20 7b 0a 24 72 75 6c 65 2d 3e 65 6e 61 62 6c 65 28 | ->isDisabled()).{.$rule->enable( |
8df60 | 29 3b 0a 7d 0a 7d 0a 7d 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 72 75 6e 53 61 | );.}.}.}..private.function.runSa |
8df80 | 74 28 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 70 72 6f 70 61 67 61 74 65 49 6e 64 65 | t():.void.{.$this->propagateInde |
8dfa0 | 78 20 3d 20 30 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 24 6c 65 76 65 6c 20 3d 20 31 3b 0a 24 73 | x.=.0;............$level.=.1;.$s |
8dfc0 | 79 73 74 65 6d 4c 65 76 65 6c 20 3d 20 24 6c 65 76 65 6c 20 2b 20 31 3b 0a 0a 77 68 69 6c 65 20 | ystemLevel.=.$level.+.1;..while. |
8dfe0 | 28 74 72 75 65 29 20 7b 0a 69 66 20 28 31 20 3d 3d 3d 20 24 6c 65 76 65 6c 29 20 7b 0a 24 63 6f | (true).{.if.(1.===.$level).{.$co |
8e000 | 6e 66 6c 69 63 74 52 75 6c 65 20 3d 20 24 74 68 69 73 2d 3e 70 72 6f 70 61 67 61 74 65 28 24 6c | nflictRule.=.$this->propagate($l |
8e020 | 65 76 65 6c 29 3b 0a 69 66 20 28 6e 75 6c 6c 20 21 3d 3d 20 24 63 6f 6e 66 6c 69 63 74 52 75 6c | evel);.if.(null.!==.$conflictRul |
8e040 | 65 29 20 7b 0a 69 66 20 28 24 74 68 69 73 2d 3e 61 6e 61 6c 79 7a 65 55 6e 73 6f 6c 76 61 62 6c | e).{.if.($this->analyzeUnsolvabl |
8e060 | 65 28 24 63 6f 6e 66 6c 69 63 74 52 75 6c 65 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a | e($conflictRule)).{.continue;.}. |
8e080 | 0a 72 65 74 75 72 6e 3b 0a 7d 0a 7d 0a 0a 0a 69 66 20 28 24 6c 65 76 65 6c 20 3c 20 24 73 79 73 | .return;.}.}...if.($level.<.$sys |
8e0a0 | 74 65 6d 4c 65 76 65 6c 29 20 7b 0a 24 69 74 65 72 61 74 6f 72 20 3d 20 24 74 68 69 73 2d 3e 72 | temLevel).{.$iterator.=.$this->r |
8e0c0 | 75 6c 65 73 2d 3e 67 65 74 49 74 65 72 61 74 6f 72 46 6f 72 28 52 75 6c 65 53 65 74 3a 3a 54 59 | ules->getIteratorFor(RuleSet::TY |
8e0e0 | 50 45 5f 52 45 51 55 45 53 54 29 3b 0a 66 6f 72 65 61 63 68 20 28 24 69 74 65 72 61 74 6f 72 20 | PE_REQUEST);.foreach.($iterator. |
8e100 | 61 73 20 24 72 75 6c 65 29 20 7b 0a 69 66 20 28 24 72 75 6c 65 2d 3e 69 73 45 6e 61 62 6c 65 64 | as.$rule).{.if.($rule->isEnabled |
8e120 | 28 29 29 20 7b 0a 24 64 65 63 69 73 69 6f 6e 51 75 65 75 65 20 3d 20 5b 5d 3b 0a 24 6e 6f 6e 65 | ()).{.$decisionQueue.=.[];.$none |
8e140 | 53 61 74 69 73 66 69 65 64 20 3d 20 74 72 75 65 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 72 75 6c | Satisfied.=.true;..foreach.($rul |
8e160 | 65 2d 3e 67 65 74 4c 69 74 65 72 61 6c 73 28 29 20 61 73 20 24 6c 69 74 65 72 61 6c 29 20 7b 0a | e->getLiterals().as.$literal).{. |
8e180 | 69 66 20 28 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 73 2d 3e 73 61 74 69 73 66 79 28 24 6c | if.($this->decisions->satisfy($l |
8e1a0 | 69 74 65 72 61 6c 29 29 20 7b 0a 24 6e 6f 6e 65 53 61 74 69 73 66 69 65 64 20 3d 20 66 61 6c 73 | iteral)).{.$noneSatisfied.=.fals |
8e1c0 | 65 3b 0a 62 72 65 61 6b 3b 0a 7d 0a 69 66 20 28 24 6c 69 74 65 72 61 6c 20 3e 20 30 20 26 26 20 | e;.break;.}.if.($literal.>.0.&&. |
8e1e0 | 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 73 2d 3e 75 6e 64 65 63 69 64 65 64 28 24 6c 69 74 | $this->decisions->undecided($lit |
8e200 | 65 72 61 6c 29 29 20 7b 0a 24 64 65 63 69 73 69 6f 6e 51 75 65 75 65 5b 5d 20 3d 20 24 6c 69 74 | eral)).{.$decisionQueue[].=.$lit |
8e220 | 65 72 61 6c 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 24 6e 6f 6e 65 53 61 74 69 73 66 69 65 64 20 26 26 | eral;.}.}..if.($noneSatisfied.&& |
8e240 | 20 5c 63 6f 75 6e 74 28 24 64 65 63 69 73 69 6f 6e 51 75 65 75 65 29 29 20 7b 0a 0a 24 70 72 75 | .\count($decisionQueue)).{..$pru |
8e260 | 6e 65 64 51 75 65 75 65 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 64 65 63 69 73 69 6f | nedQueue.=.[];.foreach.($decisio |
8e280 | 6e 51 75 65 75 65 20 61 73 20 24 6c 69 74 65 72 61 6c 29 20 7b 0a 69 66 20 28 69 73 73 65 74 28 | nQueue.as.$literal).{.if.(isset( |
8e2a0 | 24 74 68 69 73 2d 3e 66 69 78 65 64 4d 61 70 5b 61 62 73 28 24 6c 69 74 65 72 61 6c 29 5d 29 29 | $this->fixedMap[abs($literal)])) |
8e2c0 | 20 7b 0a 24 70 72 75 6e 65 64 51 75 65 75 65 5b 5d 20 3d 20 24 6c 69 74 65 72 61 6c 3b 0a 7d 0a | .{.$prunedQueue[].=.$literal;.}. |
8e2e0 | 7d 0a 69 66 20 28 21 65 6d 70 74 79 28 24 70 72 75 6e 65 64 51 75 65 75 65 29 29 20 7b 0a 24 64 | }.if.(!empty($prunedQueue)).{.$d |
8e300 | 65 63 69 73 69 6f 6e 51 75 65 75 65 20 3d 20 24 70 72 75 6e 65 64 51 75 65 75 65 3b 0a 7d 0a 7d | ecisionQueue.=.$prunedQueue;.}.} |
8e320 | 0a 0a 69 66 20 28 24 6e 6f 6e 65 53 61 74 69 73 66 69 65 64 20 26 26 20 5c 63 6f 75 6e 74 28 24 | ..if.($noneSatisfied.&&.\count($ |
8e340 | 64 65 63 69 73 69 6f 6e 51 75 65 75 65 29 29 20 7b 0a 24 6f 4c 65 76 65 6c 20 3d 20 24 6c 65 76 | decisionQueue)).{.$oLevel.=.$lev |
8e360 | 65 6c 3b 0a 24 6c 65 76 65 6c 20 3d 20 24 74 68 69 73 2d 3e 73 65 6c 65 63 74 41 6e 64 49 6e 73 | el;.$level.=.$this->selectAndIns |
8e380 | 74 61 6c 6c 28 24 6c 65 76 65 6c 2c 20 24 64 65 63 69 73 69 6f 6e 51 75 65 75 65 2c 20 24 72 75 | tall($level,.$decisionQueue,.$ru |
8e3a0 | 6c 65 29 3b 0a 0a 69 66 20 28 30 20 3d 3d 3d 20 24 6c 65 76 65 6c 29 20 7b 0a 72 65 74 75 72 6e | le);..if.(0.===.$level).{.return |
8e3c0 | 3b 0a 7d 0a 69 66 20 28 24 6c 65 76 65 6c 20 3c 3d 20 24 6f 4c 65 76 65 6c 29 20 7b 0a 62 72 65 | ;.}.if.($level.<=.$oLevel).{.bre |
8e3e0 | 61 6b 3b 0a 7d 0a 7d 0a 7d 0a 7d 0a 0a 24 73 79 73 74 65 6d 4c 65 76 65 6c 20 3d 20 24 6c 65 76 | ak;.}.}.}.}..$systemLevel.=.$lev |
8e400 | 65 6c 20 2b 20 31 3b 0a 0a 0a 24 69 74 65 72 61 74 6f 72 2d 3e 6e 65 78 74 28 29 3b 0a 69 66 20 | el.+.1;...$iterator->next();.if. |
8e420 | 28 24 69 74 65 72 61 74 6f 72 2d 3e 76 61 6c 69 64 28 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b | ($iterator->valid()).{.continue; |
8e440 | 0a 7d 0a 7d 0a 0a 69 66 20 28 24 6c 65 76 65 6c 20 3c 20 24 73 79 73 74 65 6d 4c 65 76 65 6c 29 | .}.}..if.($level.<.$systemLevel) |
8e460 | 20 7b 0a 24 73 79 73 74 65 6d 4c 65 76 65 6c 20 3d 20 24 6c 65 76 65 6c 3b 0a 7d 0a 0a 24 72 75 | .{.$systemLevel.=.$level;.}..$ru |
8e480 | 6c 65 73 43 6f 75 6e 74 20 3d 20 5c 63 6f 75 6e 74 28 24 74 68 69 73 2d 3e 72 75 6c 65 73 29 3b | lesCount.=.\count($this->rules); |
8e4a0 | 0a 24 70 61 73 73 20 3d 20 31 3b 0a 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 | .$pass.=.1;..$this->io->writeErr |
8e4c0 | 6f 72 28 27 4c 6f 6f 6b 69 6e 67 20 61 74 20 61 6c 6c 20 72 75 6c 65 73 2e 27 2c 20 74 72 75 65 | or('Looking.at.all.rules.',.true |
8e4e0 | 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 3a 3a 44 45 42 55 47 29 3b 0a 66 6f 72 20 28 24 69 20 3d | ,.IOInterface::DEBUG);.for.($i.= |
8e500 | 20 30 2c 20 24 6e 20 3d 20 30 3b 20 24 6e 20 3c 20 24 72 75 6c 65 73 43 6f 75 6e 74 3b 20 24 69 | .0,.$n.=.0;.$n.<.$rulesCount;.$i |
8e520 | 2b 2b 2c 20 24 6e 2b 2b 29 20 7b 0a 69 66 20 28 24 69 20 3d 3d 3d 20 24 72 75 6c 65 73 43 6f 75 | ++,.$n++).{.if.($i.===.$rulesCou |
8e540 | 6e 74 29 20 7b 0a 69 66 20 28 31 20 3d 3d 3d 20 24 70 61 73 73 29 20 7b 0a 24 74 68 69 73 2d 3e | nt).{.if.(1.===.$pass).{.$this-> |
8e560 | 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 22 53 6f 6d 65 74 68 69 6e 67 27 73 20 63 68 61 6e | io->writeError("Something's.chan |
8e580 | 67 65 64 2c 20 6c 6f 6f 6b 69 6e 67 20 61 74 20 61 6c 6c 20 72 75 6c 65 73 20 61 67 61 69 6e 20 | ged,.looking.at.all.rules.again. |
8e5a0 | 28 70 61 73 73 20 23 24 70 61 73 73 29 22 2c 20 66 61 6c 73 65 2c 20 49 4f 49 6e 74 65 72 66 61 | (pass.#$pass)",.false,.IOInterfa |
8e5c0 | 63 65 3a 3a 44 45 42 55 47 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e | ce::DEBUG);.}.else.{.$this->io-> |
8e5e0 | 6f 76 65 72 77 72 69 74 65 45 72 72 6f 72 28 22 53 6f 6d 65 74 68 69 6e 67 27 73 20 63 68 61 6e | overwriteError("Something's.chan |
8e600 | 67 65 64 2c 20 6c 6f 6f 6b 69 6e 67 20 61 74 20 61 6c 6c 20 72 75 6c 65 73 20 61 67 61 69 6e 20 | ged,.looking.at.all.rules.again. |
8e620 | 28 70 61 73 73 20 23 24 70 61 73 73 29 22 2c 20 66 61 6c 73 65 2c 20 6e 75 6c 6c 2c 20 49 4f 49 | (pass.#$pass)",.false,.null,.IOI |
8e640 | 6e 74 65 72 66 61 63 65 3a 3a 44 45 42 55 47 29 3b 0a 7d 0a 0a 24 69 20 3d 20 30 3b 0a 24 70 61 | nterface::DEBUG);.}..$i.=.0;.$pa |
8e660 | 73 73 2b 2b 3b 0a 7d 0a 0a 24 72 75 6c 65 20 3d 20 24 74 68 69 73 2d 3e 72 75 6c 65 73 2d 3e 72 | ss++;.}..$rule.=.$this->rules->r |
8e680 | 75 6c 65 42 79 49 64 5b 24 69 5d 3b 0a 24 6c 69 74 65 72 61 6c 73 20 3d 20 24 72 75 6c 65 2d 3e | uleById[$i];.$literals.=.$rule-> |
8e6a0 | 67 65 74 4c 69 74 65 72 61 6c 73 28 29 3b 0a 0a 69 66 20 28 24 72 75 6c 65 2d 3e 69 73 44 69 73 | getLiterals();..if.($rule->isDis |
8e6c0 | 61 62 6c 65 64 28 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 24 64 65 63 69 73 69 6f | abled()).{.continue;.}..$decisio |
8e6e0 | 6e 51 75 65 75 65 20 3d 20 5b 5d 3b 0a 0a 0a 0a 0a 0a 0a 0a 66 6f 72 65 61 63 68 20 28 24 6c 69 | nQueue.=.[];........foreach.($li |
8e700 | 74 65 72 61 6c 73 20 61 73 20 24 6c 69 74 65 72 61 6c 29 20 7b 0a 69 66 20 28 24 6c 69 74 65 72 | terals.as.$literal).{.if.($liter |
8e720 | 61 6c 20 3c 3d 20 30 29 20 7b 0a 69 66 20 28 21 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 73 | al.<=.0).{.if.(!$this->decisions |
8e740 | 2d 3e 64 65 63 69 64 65 64 49 6e 73 74 61 6c 6c 28 24 6c 69 74 65 72 61 6c 29 29 20 7b 0a 63 6f | ->decidedInstall($literal)).{.co |
8e760 | 6e 74 69 6e 75 65 20 32 3b 20 0a 7d 0a 7d 20 65 6c 73 65 20 7b 0a 69 66 20 28 24 74 68 69 73 2d | ntinue.2;..}.}.else.{.if.($this- |
8e780 | 3e 64 65 63 69 73 69 6f 6e 73 2d 3e 64 65 63 69 64 65 64 49 6e 73 74 61 6c 6c 28 24 6c 69 74 65 | >decisions->decidedInstall($lite |
8e7a0 | 72 61 6c 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 20 32 3b 20 0a 7d 0a 69 66 20 28 24 74 68 69 73 | ral)).{.continue.2;..}.if.($this |
8e7c0 | 2d 3e 64 65 63 69 73 69 6f 6e 73 2d 3e 75 6e 64 65 63 69 64 65 64 28 24 6c 69 74 65 72 61 6c 29 | ->decisions->undecided($literal) |
8e7e0 | 29 20 7b 0a 24 64 65 63 69 73 69 6f 6e 51 75 65 75 65 5b 5d 20 3d 20 24 6c 69 74 65 72 61 6c 3b | ).{.$decisionQueue[].=.$literal; |
8e800 | 0a 7d 0a 7d 0a 7d 0a 0a 0a 69 66 20 28 5c 63 6f 75 6e 74 28 24 64 65 63 69 73 69 6f 6e 51 75 65 | .}.}.}...if.(\count($decisionQue |
8e820 | 75 65 29 20 3c 20 32 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 24 6c 65 76 65 6c 20 3d | ue).<.2).{.continue;.}..$level.= |
8e840 | 20 24 74 68 69 73 2d 3e 73 65 6c 65 63 74 41 6e 64 49 6e 73 74 61 6c 6c 28 24 6c 65 76 65 6c 2c | .$this->selectAndInstall($level, |
8e860 | 20 24 64 65 63 69 73 69 6f 6e 51 75 65 75 65 2c 20 24 72 75 6c 65 29 3b 0a 0a 69 66 20 28 30 20 | .$decisionQueue,.$rule);..if.(0. |
8e880 | 3d 3d 3d 20 24 6c 65 76 65 6c 29 20 7b 0a 72 65 74 75 72 6e 3b 0a 7d 0a 0a 0a 24 72 75 6c 65 73 | ===.$level).{.return;.}...$rules |
8e8a0 | 43 6f 75 6e 74 20 3d 20 5c 63 6f 75 6e 74 28 24 74 68 69 73 2d 3e 72 75 6c 65 73 29 3b 0a 24 6e | Count.=.\count($this->rules);.$n |
8e8c0 | 20 3d 20 2d 31 3b 0a 7d 0a 0a 69 66 20 28 24 6c 65 76 65 6c 20 3c 20 24 73 79 73 74 65 6d 4c 65 | .=.-1;.}..if.($level.<.$systemLe |
8e8e0 | 76 65 6c 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 0a 69 66 20 28 5c 63 6f 75 6e 74 28 | vel).{.continue;.}...if.(\count( |
8e900 | 24 74 68 69 73 2d 3e 62 72 61 6e 63 68 65 73 29 29 20 7b 0a 24 6c 61 73 74 4c 69 74 65 72 61 6c | $this->branches)).{.$lastLiteral |
8e920 | 20 3d 20 6e 75 6c 6c 3b 0a 24 6c 61 73 74 4c 65 76 65 6c 20 3d 20 6e 75 6c 6c 3b 0a 24 6c 61 73 | .=.null;.$lastLevel.=.null;.$las |
8e940 | 74 42 72 61 6e 63 68 49 6e 64 65 78 20 3d 20 30 3b 0a 24 6c 61 73 74 42 72 61 6e 63 68 4f 66 66 | tBranchIndex.=.0;.$lastBranchOff |
8e960 | 73 65 74 20 3d 20 30 3b 0a 0a 66 6f 72 20 28 24 69 20 3d 20 5c 63 6f 75 6e 74 28 24 74 68 69 73 | set.=.0;..for.($i.=.\count($this |
8e980 | 2d 3e 62 72 61 6e 63 68 65 73 29 20 2d 20 31 3b 20 24 69 20 3e 3d 20 30 3b 20 24 69 2d 2d 29 20 | ->branches).-.1;.$i.>=.0;.$i--). |
8e9a0 | 7b 0a 5b 24 6c 69 74 65 72 61 6c 73 2c 20 24 6c 5d 20 3d 20 24 74 68 69 73 2d 3e 62 72 61 6e 63 | {.[$literals,.$l].=.$this->branc |
8e9c0 | 68 65 73 5b 24 69 5d 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 6c 69 74 65 72 61 6c 73 20 61 73 20 | hes[$i];..foreach.($literals.as. |
8e9e0 | 24 6f 66 66 73 65 74 20 3d 3e 20 24 6c 69 74 65 72 61 6c 29 20 7b 0a 69 66 20 28 24 6c 69 74 65 | $offset.=>.$literal).{.if.($lite |
8ea00 | 72 61 6c 20 26 26 20 24 6c 69 74 65 72 61 6c 20 3e 20 30 20 26 26 20 24 74 68 69 73 2d 3e 64 65 | ral.&&.$literal.>.0.&&.$this->de |
8ea20 | 63 69 73 69 6f 6e 73 2d 3e 64 65 63 69 73 69 6f 6e 4c 65 76 65 6c 28 24 6c 69 74 65 72 61 6c 29 | cisions->decisionLevel($literal) |
8ea40 | 20 3e 20 24 6c 20 2b 20 31 29 20 7b 0a 24 6c 61 73 74 4c 69 74 65 72 61 6c 20 3d 20 24 6c 69 74 | .>.$l.+.1).{.$lastLiteral.=.$lit |
8ea60 | 65 72 61 6c 3b 0a 24 6c 61 73 74 42 72 61 6e 63 68 49 6e 64 65 78 20 3d 20 24 69 3b 0a 24 6c 61 | eral;.$lastBranchIndex.=.$i;.$la |
8ea80 | 73 74 42 72 61 6e 63 68 4f 66 66 73 65 74 20 3d 20 24 6f 66 66 73 65 74 3b 0a 24 6c 61 73 74 4c | stBranchOffset.=.$offset;.$lastL |
8eaa0 | 65 76 65 6c 20 3d 20 24 6c 3b 0a 7d 0a 7d 0a 7d 0a 0a 69 66 20 28 24 6c 61 73 74 4c 69 74 65 72 | evel.=.$l;.}.}.}..if.($lastLiter |
8eac0 | 61 6c 29 20 7b 0a 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 62 72 61 6e 63 68 65 73 5b 24 6c 61 73 | al).{.unset($this->branches[$las |
8eae0 | 74 42 72 61 6e 63 68 49 6e 64 65 78 5d 5b 73 65 6c 66 3a 3a 42 52 41 4e 43 48 5f 4c 49 54 45 52 | tBranchIndex][self::BRANCH_LITER |
8eb00 | 41 4c 53 5d 5b 24 6c 61 73 74 42 72 61 6e 63 68 4f 66 66 73 65 74 5d 29 3b 0a 0a 24 6c 65 76 65 | ALS][$lastBranchOffset]);..$leve |
8eb20 | 6c 20 3d 20 24 6c 61 73 74 4c 65 76 65 6c 3b 0a 24 74 68 69 73 2d 3e 72 65 76 65 72 74 28 24 6c | l.=.$lastLevel;.$this->revert($l |
8eb40 | 65 76 65 6c 29 3b 0a 0a 24 77 68 79 20 3d 20 24 74 68 69 73 2d 3e 64 65 63 69 73 69 6f 6e 73 2d | evel);..$why.=.$this->decisions- |
8eb60 | 3e 6c 61 73 74 52 65 61 73 6f 6e 28 29 3b 0a 0a 24 6c 65 76 65 6c 20 3d 20 24 74 68 69 73 2d 3e | >lastReason();..$level.=.$this-> |
8eb80 | 73 65 74 50 72 6f 70 61 67 61 74 65 4c 65 61 72 6e 28 24 6c 65 76 65 6c 2c 20 24 6c 61 73 74 4c | setPropagateLearn($level,.$lastL |
8eba0 | 69 74 65 72 61 6c 2c 20 24 77 68 79 29 3b 0a 0a 69 66 20 28 24 6c 65 76 65 6c 20 3d 3d 3d 20 30 | iteral,.$why);..if.($level.===.0 |
8ebc0 | 29 20 7b 0a 72 65 74 75 72 6e 3b 0a 7d 0a 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 7d 0a 0a 62 72 | ).{.return;.}..continue;.}.}..br |
8ebe0 | 65 61 6b 3b 0a 7d 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f | eak;.}.}.}.<?php.declare(strict_ |
8ec00 | 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 | types=1);............namespace.C |
8ec20 | 6f 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 3b 0a 0a 0a 0a 0a | omposer\DependencyResolver;..... |
8ec40 | 63 6c 61 73 73 20 53 6f 6c 76 65 72 42 75 67 45 78 63 65 70 74 69 6f 6e 20 65 78 74 65 6e 64 73 | class.SolverBugException.extends |
8ec60 | 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 0a 7b 0a 70 75 62 6c 69 63 20 66 75 6e 63 | .\RuntimeException.{.public.func |
8ec80 | 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 73 74 72 69 6e 67 20 24 6d 65 73 73 61 67 65 | tion.__construct(string.$message |
8eca0 | 29 0a 7b 0a 70 61 72 65 6e 74 3a 3a 5f 5f 63 6f 6e 73 74 72 75 63 74 28 0a 24 6d 65 73 73 61 67 | ).{.parent::__construct(.$messag |
8ecc0 | 65 2e 22 5c 6e 54 68 69 73 20 65 78 63 65 70 74 69 6f 6e 20 77 61 73 20 6d 6f 73 74 20 6c 69 6b | e."\nThis.exception.was.most.lik |
8ece0 | 65 6c 79 20 63 61 75 73 65 64 20 62 79 20 61 20 62 75 67 20 69 6e 20 43 6f 6d 70 6f 73 65 72 2e | ely.caused.by.a.bug.in.Composer. |
8ed00 | 5c 6e 22 2e 0a 22 50 6c 65 61 73 65 20 72 65 70 6f 72 74 20 74 68 65 20 63 6f 6d 6d 61 6e 64 20 | \n".."Please.report.the.command. |
8ed20 | 79 6f 75 20 72 61 6e 2c 20 74 68 65 20 65 78 61 63 74 20 65 72 72 6f 72 20 79 6f 75 20 72 65 63 | you.ran,.the.exact.error.you.rec |
8ed40 | 65 69 76 65 64 2c 20 61 6e 64 20 79 6f 75 72 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 20 6f 6e | eived,.and.your.composer.json.on |
8ed60 | 20 68 74 74 70 73 3a 2f 2f 67 69 74 68 75 62 2e 63 6f 6d 2f 63 6f 6d 70 6f 73 65 72 2f 63 6f 6d | .https://github.com/composer/com |
8ed80 | 70 6f 73 65 72 2f 69 73 73 75 65 73 20 2d 20 74 68 61 6e 6b 20 79 6f 75 21 5c 6e 22 0a 29 3b 0a | poser/issues.-.thank.you!\n".);. |
8eda0 | 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 | }.}.<?php.declare(strict_types=1 |
8edc0 | 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 | );............namespace.Composer |
8ede0 | 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 | \DependencyResolver;..use.Compos |
8ee00 | 65 72 5c 55 74 69 6c 5c 49 6e 69 48 65 6c 70 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c | er\Util\IniHelper;.use.Composer\ |
8ee20 | 52 65 70 6f 73 69 74 6f 72 79 5c 52 65 70 6f 73 69 74 6f 72 79 53 65 74 3b 0a 0a 0a 0a 0a 0a 0a | Repository\RepositorySet;....... |
8ee40 | 63 6c 61 73 73 20 53 6f 6c 76 65 72 50 72 6f 62 6c 65 6d 73 45 78 63 65 70 74 69 6f 6e 20 65 78 | class.SolverProblemsException.ex |
8ee60 | 74 65 6e 64 73 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 0a 7b 0a 70 75 62 6c 69 63 | tends.\RuntimeException.{.public |
8ee80 | 20 63 6f 6e 73 74 20 45 52 52 4f 52 5f 44 45 50 45 4e 44 45 4e 43 59 5f 52 45 53 4f 4c 55 54 49 | .const.ERROR_DEPENDENCY_RESOLUTI |
8eea0 | 4f 4e 5f 46 41 49 4c 45 44 20 3d 20 32 3b 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 70 72 6f 62 | ON_FAILED.=.2;...protected.$prob |
8eec0 | 6c 65 6d 73 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 6c 65 61 72 6e 65 64 50 6f 6f 6c 3b 0a 0a | lems;..protected.$learnedPool;.. |
8eee0 | 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 | ....public.function.__construct( |
8ef00 | 61 72 72 61 79 20 24 70 72 6f 62 6c 65 6d 73 2c 20 61 72 72 61 79 20 24 6c 65 61 72 6e 65 64 50 | array.$problems,.array.$learnedP |
8ef20 | 6f 6f 6c 29 0a 7b 0a 24 74 68 69 73 2d 3e 70 72 6f 62 6c 65 6d 73 20 3d 20 24 70 72 6f 62 6c 65 | ool).{.$this->problems.=.$proble |
8ef40 | 6d 73 3b 0a 24 74 68 69 73 2d 3e 6c 65 61 72 6e 65 64 50 6f 6f 6c 20 3d 20 24 6c 65 61 72 6e 65 | ms;.$this->learnedPool.=.$learne |
8ef60 | 64 50 6f 6f 6c 3b 0a 0a 70 61 72 65 6e 74 3a 3a 5f 5f 63 6f 6e 73 74 72 75 63 74 28 27 46 61 69 | dPool;..parent::__construct('Fai |
8ef80 | 6c 65 64 20 72 65 73 6f 6c 76 69 6e 67 20 64 65 70 65 6e 64 65 6e 63 69 65 73 20 77 69 74 68 20 | led.resolving.dependencies.with. |
8efa0 | 27 2e 63 6f 75 6e 74 28 24 70 72 6f 62 6c 65 6d 73 29 2e 27 20 70 72 6f 62 6c 65 6d 73 2c 20 63 | '.count($problems).'.problems,.c |
8efc0 | 61 6c 6c 20 67 65 74 50 72 65 74 74 79 53 74 72 69 6e 67 20 74 6f 20 67 65 74 20 66 6f 72 6d 61 | all.getPrettyString.to.get.forma |
8efe0 | 74 74 65 64 20 64 65 74 61 69 6c 73 27 2c 20 73 65 6c 66 3a 3a 45 52 52 4f 52 5f 44 45 50 45 4e | tted.details',.self::ERROR_DEPEN |
8f000 | 44 45 4e 43 59 5f 52 45 53 4f 4c 55 54 49 4f 4e 5f 46 41 49 4c 45 44 29 3b 0a 7d 0a 0a 70 75 62 | DENCY_RESOLUTION_FAILED);.}..pub |
8f020 | 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 50 72 65 74 74 79 53 74 72 69 6e 67 28 52 65 70 | lic.function.getPrettyString(Rep |
8f040 | 6f 73 69 74 6f 72 79 53 65 74 20 24 72 65 70 6f 73 69 74 6f 72 79 53 65 74 2c 20 52 65 71 75 65 | ositorySet.$repositorySet,.Reque |
8f060 | 73 74 20 24 72 65 71 75 65 73 74 2c 20 50 6f 6f 6c 20 24 70 6f 6f 6c 2c 20 62 6f 6f 6c 20 24 69 | st.$request,.Pool.$pool,.bool.$i |
8f080 | 73 56 65 72 62 6f 73 65 2c 20 62 6f 6f 6c 20 24 69 73 44 65 76 45 78 74 72 61 63 74 69 6f 6e 20 | sVerbose,.bool.$isDevExtraction. |
8f0a0 | 3d 20 66 61 6c 73 65 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 24 69 6e 73 74 61 6c 6c 65 64 4d 61 70 | =.false):.string.{.$installedMap |
8f0c0 | 20 3d 20 24 72 65 71 75 65 73 74 2d 3e 67 65 74 50 72 65 73 65 6e 74 4d 61 70 28 74 72 75 65 29 | .=.$request->getPresentMap(true) |
8f0e0 | 3b 0a 24 6d 69 73 73 69 6e 67 45 78 74 65 6e 73 69 6f 6e 73 20 3d 20 5b 5d 3b 0a 24 69 73 43 61 | ;.$missingExtensions.=.[];.$isCa |
8f100 | 75 73 65 64 42 79 4c 6f 63 6b 20 3d 20 66 61 6c 73 65 3b 0a 0a 24 70 72 6f 62 6c 65 6d 73 20 3d | usedByLock.=.false;..$problems.= |
8f120 | 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 70 72 6f 62 6c 65 6d 73 20 61 73 | .[];.foreach.($this->problems.as |
8f140 | 20 24 70 72 6f 62 6c 65 6d 29 20 7b 0a 24 70 72 6f 62 6c 65 6d 73 5b 5d 20 3d 20 24 70 72 6f 62 | .$problem).{.$problems[].=.$prob |
8f160 | 6c 65 6d 2d 3e 67 65 74 50 72 65 74 74 79 53 74 72 69 6e 67 28 24 72 65 70 6f 73 69 74 6f 72 79 | lem->getPrettyString($repository |
8f180 | 53 65 74 2c 20 24 72 65 71 75 65 73 74 2c 20 24 70 6f 6f 6c 2c 20 24 69 73 56 65 72 62 6f 73 65 | Set,.$request,.$pool,.$isVerbose |
8f1a0 | 2c 20 24 69 6e 73 74 61 6c 6c 65 64 4d 61 70 2c 20 24 74 68 69 73 2d 3e 6c 65 61 72 6e 65 64 50 | ,.$installedMap,.$this->learnedP |
8f1c0 | 6f 6f 6c 29 2e 22 5c 6e 22 3b 0a 0a 24 6d 69 73 73 69 6e 67 45 78 74 65 6e 73 69 6f 6e 73 20 3d | ool)."\n";..$missingExtensions.= |
8f1e0 | 20 61 72 72 61 79 5f 6d 65 72 67 65 28 24 6d 69 73 73 69 6e 67 45 78 74 65 6e 73 69 6f 6e 73 2c | .array_merge($missingExtensions, |
8f200 | 20 24 74 68 69 73 2d 3e 67 65 74 45 78 74 65 6e 73 69 6f 6e 50 72 6f 62 6c 65 6d 73 28 24 70 72 | .$this->getExtensionProblems($pr |
8f220 | 6f 62 6c 65 6d 2d 3e 67 65 74 52 65 61 73 6f 6e 73 28 29 29 29 3b 0a 0a 24 69 73 43 61 75 73 65 | oblem->getReasons()));..$isCause |
8f240 | 64 42 79 4c 6f 63 6b 20 3d 20 24 69 73 43 61 75 73 65 64 42 79 4c 6f 63 6b 20 7c 7c 20 24 70 72 | dByLock.=.$isCausedByLock.||.$pr |
8f260 | 6f 62 6c 65 6d 2d 3e 69 73 43 61 75 73 65 64 42 79 4c 6f 63 6b 28 24 72 65 70 6f 73 69 74 6f 72 | oblem->isCausedByLock($repositor |
8f280 | 79 53 65 74 2c 20 24 72 65 71 75 65 73 74 2c 20 24 70 6f 6f 6c 29 3b 0a 7d 0a 0a 24 69 20 3d 20 | ySet,.$request,.$pool);.}..$i.=. |
8f2a0 | 31 3b 0a 24 74 65 78 74 20 3d 20 22 5c 6e 22 3b 0a 66 6f 72 65 61 63 68 20 28 61 72 72 61 79 5f | 1;.$text.=."\n";.foreach.(array_ |
8f2c0 | 75 6e 69 71 75 65 28 24 70 72 6f 62 6c 65 6d 73 29 20 61 73 20 24 70 72 6f 62 6c 65 6d 29 20 7b | unique($problems).as.$problem).{ |
8f2e0 | 0a 24 74 65 78 74 20 2e 3d 20 22 20 20 50 72 6f 62 6c 65 6d 20 22 2e 28 24 69 2b 2b 29 2e 24 70 | .$text..=."..Problem.".($i++).$p |
8f300 | 72 6f 62 6c 65 6d 3b 0a 7d 0a 0a 24 68 69 6e 74 73 20 3d 20 5b 5d 3b 0a 69 66 20 28 21 24 69 73 | roblem;.}..$hints.=.[];.if.(!$is |
8f320 | 44 65 76 45 78 74 72 61 63 74 69 6f 6e 20 26 26 20 28 73 74 72 70 6f 73 28 24 74 65 78 74 2c 20 | DevExtraction.&&.(strpos($text,. |
8f340 | 27 63 6f 75 6c 64 20 6e 6f 74 20 62 65 20 66 6f 75 6e 64 27 29 20 7c 7c 20 73 74 72 70 6f 73 28 | 'could.not.be.found').||.strpos( |
8f360 | 24 74 65 78 74 2c 20 27 6e 6f 20 6d 61 74 63 68 69 6e 67 20 70 61 63 6b 61 67 65 20 66 6f 75 6e | $text,.'no.matching.package.foun |
8f380 | 64 27 29 29 29 20 7b 0a 24 68 69 6e 74 73 5b 5d 20 3d 20 22 50 6f 74 65 6e 74 69 61 6c 20 63 61 | d'))).{.$hints[].=."Potential.ca |
8f3a0 | 75 73 65 73 3a 5c 6e 20 2d 20 41 20 74 79 70 6f 20 69 6e 20 74 68 65 20 70 61 63 6b 61 67 65 20 | uses:\n.-.A.typo.in.the.package. |
8f3c0 | 6e 61 6d 65 5c 6e 20 2d 20 54 68 65 20 70 61 63 6b 61 67 65 20 69 73 20 6e 6f 74 20 61 76 61 69 | name\n.-.The.package.is.not.avai |
8f3e0 | 6c 61 62 6c 65 20 69 6e 20 61 20 73 74 61 62 6c 65 2d 65 6e 6f 75 67 68 20 76 65 72 73 69 6f 6e | lable.in.a.stable-enough.version |
8f400 | 20 61 63 63 6f 72 64 69 6e 67 20 74 6f 20 79 6f 75 72 20 6d 69 6e 69 6d 75 6d 2d 73 74 61 62 69 | .according.to.your.minimum-stabi |
8f420 | 6c 69 74 79 20 73 65 74 74 69 6e 67 5c 6e 20 20 20 73 65 65 20 3c 68 74 74 70 73 3a 2f 2f 67 65 | lity.setting\n...see.<https://ge |
8f440 | 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 67 2f 64 6f 63 2f 30 34 2d 73 63 68 65 6d 61 2e 6d 64 23 6d | tcomposer.org/doc/04-schema.md#m |
8f460 | 69 6e 69 6d 75 6d 2d 73 74 61 62 69 6c 69 74 79 3e 20 66 6f 72 20 6d 6f 72 65 20 64 65 74 61 69 | inimum-stability>.for.more.detai |
8f480 | 6c 73 2e 5c 6e 20 2d 20 49 74 27 73 20 61 20 70 72 69 76 61 74 65 20 70 61 63 6b 61 67 65 20 61 | ls.\n.-.It's.a.private.package.a |
8f4a0 | 6e 64 20 79 6f 75 20 66 6f 72 67 6f 74 20 74 6f 20 61 64 64 20 61 20 63 75 73 74 6f 6d 20 72 65 | nd.you.forgot.to.add.a.custom.re |
8f4c0 | 70 6f 73 69 74 6f 72 79 20 74 6f 20 66 69 6e 64 20 69 74 5c 6e 5c 6e 52 65 61 64 20 3c 68 74 74 | pository.to.find.it\n\nRead.<htt |
8f4e0 | 70 73 3a 2f 2f 67 65 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 67 2f 64 6f 63 2f 61 72 74 69 63 6c 65 | ps://getcomposer.org/doc/article |
8f500 | 73 2f 74 72 6f 75 62 6c 65 73 68 6f 6f 74 69 6e 67 2e 6d 64 3e 20 66 6f 72 20 66 75 72 74 68 65 | s/troubleshooting.md>.for.furthe |
8f520 | 72 20 63 6f 6d 6d 6f 6e 20 70 72 6f 62 6c 65 6d 73 2e 22 3b 0a 7d 0a 0a 69 66 20 28 21 65 6d 70 | r.common.problems.";.}..if.(!emp |
8f540 | 74 79 28 24 6d 69 73 73 69 6e 67 45 78 74 65 6e 73 69 6f 6e 73 29 29 20 7b 0a 24 68 69 6e 74 73 | ty($missingExtensions)).{.$hints |
8f560 | 5b 5d 20 3d 20 24 74 68 69 73 2d 3e 63 72 65 61 74 65 45 78 74 65 6e 73 69 6f 6e 48 69 6e 74 28 | [].=.$this->createExtensionHint( |
8f580 | 24 6d 69 73 73 69 6e 67 45 78 74 65 6e 73 69 6f 6e 73 29 3b 0a 7d 0a 0a 69 66 20 28 24 69 73 43 | $missingExtensions);.}..if.($isC |
8f5a0 | 61 75 73 65 64 42 79 4c 6f 63 6b 20 26 26 20 21 24 69 73 44 65 76 45 78 74 72 61 63 74 69 6f 6e | ausedByLock.&&.!$isDevExtraction |
8f5c0 | 20 26 26 20 21 24 72 65 71 75 65 73 74 2d 3e 67 65 74 55 70 64 61 74 65 41 6c 6c 6f 77 54 72 61 | .&&.!$request->getUpdateAllowTra |
8f5e0 | 6e 73 69 74 69 76 65 52 6f 6f 74 44 65 70 65 6e 64 65 6e 63 69 65 73 28 29 29 20 7b 0a 24 68 69 | nsitiveRootDependencies()).{.$hi |
8f600 | 6e 74 73 5b 5d 20 3d 20 22 55 73 65 20 74 68 65 20 6f 70 74 69 6f 6e 20 2d 2d 77 69 74 68 2d 61 | nts[].=."Use.the.option.--with-a |
8f620 | 6c 6c 2d 64 65 70 65 6e 64 65 6e 63 69 65 73 20 28 2d 57 29 20 74 6f 20 61 6c 6c 6f 77 20 75 70 | ll-dependencies.(-W).to.allow.up |
8f640 | 67 72 61 64 65 73 2c 20 64 6f 77 6e 67 72 61 64 65 73 20 61 6e 64 20 72 65 6d 6f 76 61 6c 73 20 | grades,.downgrades.and.removals. |
8f660 | 66 6f 72 20 70 61 63 6b 61 67 65 73 20 63 75 72 72 65 6e 74 6c 79 20 6c 6f 63 6b 65 64 20 74 6f | for.packages.currently.locked.to |
8f680 | 20 73 70 65 63 69 66 69 63 20 76 65 72 73 69 6f 6e 73 2e 22 3b 0a 7d 0a 0a 69 66 20 28 73 74 72 | .specific.versions.";.}..if.(str |
8f6a0 | 70 6f 73 28 24 74 65 78 74 2c 20 27 66 6f 75 6e 64 20 63 6f 6d 70 6f 73 65 72 2d 70 6c 75 67 69 | pos($text,.'found.composer-plugi |
8f6c0 | 6e 2d 61 70 69 5b 32 2e 30 2e 30 5d 20 62 75 74 20 69 74 20 64 6f 65 73 20 6e 6f 74 20 6d 61 74 | n-api[2.0.0].but.it.does.not.mat |
8f6e0 | 63 68 27 29 20 26 26 20 73 74 72 70 6f 73 28 24 74 65 78 74 2c 20 27 2d 20 6f 63 72 61 6d 69 75 | ch').&&.strpos($text,.'-.ocramiu |
8f700 | 73 2f 70 61 63 6b 61 67 65 2d 76 65 72 73 69 6f 6e 73 27 29 29 20 7b 0a 24 68 69 6e 74 73 5b 5d | s/package-versions')).{.$hints[] |
8f720 | 20 3d 20 22 3c 77 61 72 6e 69 6e 67 3e 6f 63 72 61 6d 69 75 73 2f 70 61 63 6b 61 67 65 2d 76 65 | .=."<warning>ocramius/package-ve |
8f740 | 72 73 69 6f 6e 73 20 6f 6e 6c 79 20 70 72 6f 76 69 64 65 73 20 73 75 70 70 6f 72 74 20 66 6f 72 | rsions.only.provides.support.for |
8f760 | 20 43 6f 6d 70 6f 73 65 72 20 32 20 69 6e 20 31 2e 38 2b 2c 20 77 68 69 63 68 20 72 65 71 75 69 | .Composer.2.in.1.8+,.which.requi |
8f780 | 72 65 73 20 50 48 50 20 37 2e 34 2e 3c 2f 77 61 72 6e 69 6e 67 3e 5c 6e 49 66 20 79 6f 75 20 63 | res.PHP.7.4.</warning>\nIf.you.c |
8f7a0 | 61 6e 20 6e 6f 74 20 75 70 67 72 61 64 65 20 50 48 50 20 79 6f 75 20 63 61 6e 20 72 65 71 75 69 | an.not.upgrade.PHP.you.can.requi |
8f7c0 | 72 65 20 3c 69 6e 66 6f 3e 63 6f 6d 70 6f 73 65 72 2f 70 61 63 6b 61 67 65 2d 76 65 72 73 69 6f | re.<info>composer/package-versio |
8f7e0 | 6e 73 2d 64 65 70 72 65 63 61 74 65 64 3c 2f 69 6e 66 6f 3e 20 74 6f 20 72 65 73 6f 6c 76 65 20 | ns-deprecated</info>.to.resolve. |
8f800 | 74 68 69 73 20 77 69 74 68 20 50 48 50 20 37 2e 30 2b 2e 22 3b 0a 7d 0a 0a 69 66 20 28 21 63 6c | this.with.PHP.7.0+.";.}..if.(!cl |
8f820 | 61 73 73 5f 65 78 69 73 74 73 28 27 50 48 50 55 6e 69 74 5c 46 72 61 6d 65 77 6f 72 6b 5c 54 65 | ass_exists('PHPUnit\Framework\Te |
8f840 | 73 74 43 61 73 65 27 2c 20 66 61 6c 73 65 29 29 20 7b 0a 69 66 20 28 73 74 72 70 6f 73 28 24 74 | stCase',.false)).{.if.(strpos($t |
8f860 | 65 78 74 2c 20 27 66 6f 75 6e 64 20 63 6f 6d 70 6f 73 65 72 2d 70 6c 75 67 69 6e 2d 61 70 69 5b | ext,.'found.composer-plugin-api[ |
8f880 | 32 2e 30 2e 30 5d 20 62 75 74 20 69 74 20 64 6f 65 73 20 6e 6f 74 20 6d 61 74 63 68 27 29 29 20 | 2.0.0].but.it.does.not.match')). |
8f8a0 | 7b 0a 24 68 69 6e 74 73 5b 5d 20 3d 20 22 59 6f 75 20 61 72 65 20 75 73 69 6e 67 20 43 6f 6d 70 | {.$hints[].=."You.are.using.Comp |
8f8c0 | 6f 73 65 72 20 32 2c 20 77 68 69 63 68 20 73 6f 6d 65 20 6f 66 20 79 6f 75 72 20 70 6c 75 67 69 | oser.2,.which.some.of.your.plugi |
8f8e0 | 6e 73 20 73 65 65 6d 20 74 6f 20 62 65 20 69 6e 63 6f 6d 70 61 74 69 62 6c 65 20 77 69 74 68 2e | ns.seem.to.be.incompatible.with. |
8f900 | 20 4d 61 6b 65 20 73 75 72 65 20 79 6f 75 20 75 70 64 61 74 65 20 79 6f 75 72 20 70 6c 75 67 69 | .Make.sure.you.update.your.plugi |
8f920 | 6e 73 20 6f 72 20 72 65 70 6f 72 74 20 61 20 70 6c 75 67 69 6e 2d 69 73 73 75 65 20 74 6f 20 61 | ns.or.report.a.plugin-issue.to.a |
8f940 | 73 6b 20 74 68 65 6d 20 74 6f 20 73 75 70 70 6f 72 74 20 43 6f 6d 70 6f 73 65 72 20 32 2e 22 3b | sk.them.to.support.Composer.2."; |
8f960 | 0a 7d 0a 7d 0a 0a 69 66 20 28 24 68 69 6e 74 73 29 20 7b 0a 24 74 65 78 74 20 2e 3d 20 22 5c 6e | .}.}..if.($hints).{.$text..=."\n |
8f980 | 22 20 2e 20 69 6d 70 6c 6f 64 65 28 22 5c 6e 5c 6e 22 2c 20 24 68 69 6e 74 73 29 3b 0a 7d 0a 0a | "...implode("\n\n",.$hints);.}.. |
8f9a0 | 72 65 74 75 72 6e 20 24 74 65 78 74 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 | return.$text;.}.....public.funct |
8f9c0 | 69 6f 6e 20 67 65 74 50 72 6f 62 6c 65 6d 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 | ion.getProblems():.array.{.retur |
8f9e0 | 6e 20 24 74 68 69 73 2d 3e 70 72 6f 62 6c 65 6d 73 3b 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 | n.$this->problems;.}.....private |
8fa00 | 20 66 75 6e 63 74 69 6f 6e 20 63 72 65 61 74 65 45 78 74 65 6e 73 69 6f 6e 48 69 6e 74 28 61 72 | .function.createExtensionHint(ar |
8fa20 | 72 61 79 20 24 6d 69 73 73 69 6e 67 45 78 74 65 6e 73 69 6f 6e 73 29 3a 20 73 74 72 69 6e 67 0a | ray.$missingExtensions):.string. |
8fa40 | 7b 0a 24 70 61 74 68 73 20 3d 20 49 6e 69 48 65 6c 70 65 72 3a 3a 67 65 74 41 6c 6c 28 29 3b 0a | {.$paths.=.IniHelper::getAll();. |
8fa60 | 0a 69 66 20 28 27 27 20 3d 3d 3d 20 24 70 61 74 68 73 5b 30 5d 29 20 7b 0a 69 66 20 28 63 6f 75 | .if.(''.===.$paths[0]).{.if.(cou |
8fa80 | 6e 74 28 24 70 61 74 68 73 29 20 3d 3d 3d 20 31 29 20 7b 0a 72 65 74 75 72 6e 20 27 27 3b 0a 7d | nt($paths).===.1).{.return.'';.} |
8faa0 | 0a 0a 61 72 72 61 79 5f 73 68 69 66 74 28 24 70 61 74 68 73 29 3b 0a 7d 0a 0a 24 69 67 6e 6f 72 | ..array_shift($paths);.}..$ignor |
8fac0 | 65 45 78 74 65 6e 73 69 6f 6e 73 41 72 67 75 6d 65 6e 74 73 20 3d 20 69 6d 70 6c 6f 64 65 28 22 | eExtensionsArguments.=.implode(" |
8fae0 | 20 22 2c 20 61 72 72 61 79 5f 6d 61 70 28 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 | .",.array_map(static.function.($ |
8fb00 | 65 78 74 65 6e 73 69 6f 6e 29 20 7b 0a 72 65 74 75 72 6e 20 22 2d 2d 69 67 6e 6f 72 65 2d 70 6c | extension).{.return."--ignore-pl |
8fb20 | 61 74 66 6f 72 6d 2d 72 65 71 3d 24 65 78 74 65 6e 73 69 6f 6e 22 3b 0a 7d 2c 20 61 72 72 61 79 | atform-req=$extension";.},.array |
8fb40 | 5f 75 6e 69 71 75 65 28 24 6d 69 73 73 69 6e 67 45 78 74 65 6e 73 69 6f 6e 73 29 29 29 3b 0a 0a | _unique($missingExtensions)));.. |
8fb60 | 24 74 65 78 74 20 3d 20 22 54 6f 20 65 6e 61 62 6c 65 20 65 78 74 65 6e 73 69 6f 6e 73 2c 20 76 | $text.=."To.enable.extensions,.v |
8fb80 | 65 72 69 66 79 20 74 68 61 74 20 74 68 65 79 20 61 72 65 20 65 6e 61 62 6c 65 64 20 69 6e 20 79 | erify.that.they.are.enabled.in.y |
8fba0 | 6f 75 72 20 2e 69 6e 69 20 66 69 6c 65 73 3a 5c 6e 20 20 20 20 2d 20 22 3b 0a 24 74 65 78 74 20 | our..ini.files:\n....-.";.$text. |
8fbc0 | 2e 3d 20 69 6d 70 6c 6f 64 65 28 22 5c 6e 20 20 20 20 2d 20 22 2c 20 24 70 61 74 68 73 29 3b 0a | .=.implode("\n....-.",.$paths);. |
8fbe0 | 24 74 65 78 74 20 2e 3d 20 22 5c 6e 59 6f 75 20 63 61 6e 20 61 6c 73 6f 20 72 75 6e 20 60 70 68 | $text..=."\nYou.can.also.run.`ph |
8fc00 | 70 20 2d 2d 69 6e 69 60 20 69 6e 20 61 20 74 65 72 6d 69 6e 61 6c 20 74 6f 20 73 65 65 20 77 68 | p.--ini`.in.a.terminal.to.see.wh |
8fc20 | 69 63 68 20 66 69 6c 65 73 20 61 72 65 20 75 73 65 64 20 62 79 20 50 48 50 20 69 6e 20 43 4c 49 | ich.files.are.used.by.PHP.in.CLI |
8fc40 | 20 6d 6f 64 65 2e 22 3b 0a 24 74 65 78 74 20 2e 3d 20 22 5c 6e 41 6c 74 65 72 6e 61 74 69 76 65 | .mode.";.$text..=."\nAlternative |
8fc60 | 6c 79 2c 20 79 6f 75 20 63 61 6e 20 72 75 6e 20 43 6f 6d 70 6f 73 65 72 20 77 69 74 68 20 60 24 | ly,.you.can.run.Composer.with.`$ |
8fc80 | 69 67 6e 6f 72 65 45 78 74 65 6e 73 69 6f 6e 73 41 72 67 75 6d 65 6e 74 73 60 20 74 6f 20 74 65 | ignoreExtensionsArguments`.to.te |
8fca0 | 6d 70 6f 72 61 72 69 6c 79 20 69 67 6e 6f 72 65 20 74 68 65 73 65 20 72 65 71 75 69 72 65 64 20 | mporarily.ignore.these.required. |
8fcc0 | 65 78 74 65 6e 73 69 6f 6e 73 2e 22 3b 0a 0a 72 65 74 75 72 6e 20 24 74 65 78 74 3b 0a 7d 0a 0a | extensions.";..return.$text;.}.. |
8fce0 | 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 45 78 74 65 6e 73 69 6f | ....private.function.getExtensio |
8fd00 | 6e 50 72 6f 62 6c 65 6d 73 28 61 72 72 61 79 20 24 72 65 61 73 6f 6e 53 65 74 73 29 3a 20 61 72 | nProblems(array.$reasonSets):.ar |
8fd20 | 72 61 79 0a 7b 0a 24 6d 69 73 73 69 6e 67 45 78 74 65 6e 73 69 6f 6e 73 20 3d 20 5b 5d 3b 0a 66 | ray.{.$missingExtensions.=.[];.f |
8fd40 | 6f 72 65 61 63 68 20 28 24 72 65 61 73 6f 6e 53 65 74 73 20 61 73 20 24 72 65 61 73 6f 6e 53 65 | oreach.($reasonSets.as.$reasonSe |
8fd60 | 74 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 72 65 61 73 6f 6e 53 65 74 20 61 73 20 24 72 75 6c | t).{.foreach.($reasonSet.as.$rul |
8fd80 | 65 29 20 7b 0a 24 72 65 71 75 69 72 65 64 20 3d 20 24 72 75 6c 65 2d 3e 67 65 74 52 65 71 75 69 | e).{.$required.=.$rule->getRequi |
8fda0 | 72 65 64 50 61 63 6b 61 67 65 28 29 3b 0a 69 66 20 28 6e 75 6c 6c 20 21 3d 3d 20 24 72 65 71 75 | redPackage();.if.(null.!==.$requ |
8fdc0 | 69 72 65 64 20 26 26 20 30 20 3d 3d 3d 20 73 74 72 70 6f 73 28 24 72 65 71 75 69 72 65 64 2c 20 | ired.&&.0.===.strpos($required,. |
8fde0 | 27 65 78 74 2d 27 29 29 20 7b 0a 24 6d 69 73 73 69 6e 67 45 78 74 65 6e 73 69 6f 6e 73 5b 24 72 | 'ext-')).{.$missingExtensions[$r |
8fe00 | 65 71 75 69 72 65 64 5d 20 3d 20 31 3b 0a 7d 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 61 72 72 61 | equired].=.1;.}.}.}..return.arra |
8fe20 | 79 5f 6b 65 79 73 28 24 6d 69 73 73 69 6e 67 45 78 74 65 6e 73 69 6f 6e 73 29 3b 0a 7d 0a 7d 0a | y_keys($missingExtensions);.}.}. |
8fe40 | 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a | <?php.declare(strict_types=1);.. |
8fe60 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 44 65 70 | ..........namespace.Composer\Dep |
8fe80 | 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 | endencyResolver;..use.Composer\P |
8fea0 | 61 63 6b 61 67 65 5c 41 6c 69 61 73 50 61 63 6b 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 | ackage\AliasPackage;.use.Compose |
8fec0 | 72 5c 50 61 63 6b 61 67 65 5c 4c 69 6e 6b 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 | r\Package\Link;.use.Composer\Pac |
8fee0 | 6b 61 67 65 5c 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f | kage\PackageInterface;.use.Compo |
8ff00 | 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 | ser\Repository\PlatformRepositor |
8ff20 | 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 | y;.use.Composer\DependencyResolv |
8ff40 | 65 72 5c 4f 70 65 72 61 74 69 6f 6e 5c 4f 70 65 72 61 74 69 6f 6e 49 6e 74 65 72 66 61 63 65 3b | er\Operation\OperationInterface; |
8ff60 | 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 54 72 61 6e 73 61 63 74 69 6f 6e 0a 7b 0a 0a 0a 0a 70 72 6f | ......class.Transaction.{....pro |
8ff80 | 74 65 63 74 65 64 20 24 6f 70 65 72 61 74 69 6f 6e 73 3b 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 | tected.$operations;......protect |
8ffa0 | 65 64 20 24 70 72 65 73 65 6e 74 50 61 63 6b 61 67 65 73 3b 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 | ed.$presentPackages;......protec |
8ffc0 | 74 65 64 20 24 72 65 73 75 6c 74 50 61 63 6b 61 67 65 4d 61 70 3b 0a 0a 0a 0a 0a 70 72 6f 74 65 | ted.$resultPackageMap;.....prote |
8ffe0 | 63 74 65 64 20 24 72 65 73 75 6c 74 50 61 63 6b 61 67 65 73 42 79 4e 61 6d 65 20 3d 20 5b 5d 3b | cted.$resultPackagesByName.=.[]; |
90000 | 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 | ......public.function.__construc |
90020 | 74 28 61 72 72 61 79 20 24 70 72 65 73 65 6e 74 50 61 63 6b 61 67 65 73 2c 20 61 72 72 61 79 20 | t(array.$presentPackages,.array. |
90040 | 24 72 65 73 75 6c 74 50 61 63 6b 61 67 65 73 29 0a 7b 0a 24 74 68 69 73 2d 3e 70 72 65 73 65 6e | $resultPackages).{.$this->presen |
90060 | 74 50 61 63 6b 61 67 65 73 20 3d 20 24 70 72 65 73 65 6e 74 50 61 63 6b 61 67 65 73 3b 0a 24 74 | tPackages.=.$presentPackages;.$t |
90080 | 68 69 73 2d 3e 73 65 74 52 65 73 75 6c 74 50 61 63 6b 61 67 65 4d 61 70 73 28 24 72 65 73 75 6c | his->setResultPackageMaps($resul |
900a0 | 74 50 61 63 6b 61 67 65 73 29 3b 0a 24 74 68 69 73 2d 3e 6f 70 65 72 61 74 69 6f 6e 73 20 3d 20 | tPackages);.$this->operations.=. |
900c0 | 24 74 68 69 73 2d 3e 63 61 6c 63 75 6c 61 74 65 4f 70 65 72 61 74 69 6f 6e 73 28 29 3b 0a 7d 0a | $this->calculateOperations();.}. |
900e0 | 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 4f 70 65 72 61 74 69 6f 6e | ....public.function.getOperation |
90100 | 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 6f 70 65 72 61 | s():.array.{.return.$this->opera |
90120 | 74 69 6f 6e 73 3b 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 73 65 | tions;.}.....private.function.se |
90140 | 74 52 65 73 75 6c 74 50 61 63 6b 61 67 65 4d 61 70 73 28 61 72 72 61 79 20 24 72 65 73 75 6c 74 | tResultPackageMaps(array.$result |
90160 | 50 61 63 6b 61 67 65 73 29 3a 20 76 6f 69 64 0a 7b 0a 24 70 61 63 6b 61 67 65 53 6f 72 74 20 3d | Packages):.void.{.$packageSort.= |
90180 | 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 | .static.function.(PackageInterfa |
901a0 | 63 65 20 24 61 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 62 29 3a 20 69 6e 74 | ce.$a,.PackageInterface.$b):.int |
901c0 | 20 7b 0a 0a 69 66 20 28 24 61 2d 3e 67 65 74 4e 61 6d 65 28 29 20 3d 3d 3d 20 24 62 2d 3e 67 65 | .{..if.($a->getName().===.$b->ge |
901e0 | 74 4e 61 6d 65 28 29 29 20 7b 0a 69 66 20 28 24 61 20 69 6e 73 74 61 6e 63 65 6f 66 20 41 6c 69 | tName()).{.if.($a.instanceof.Ali |
90200 | 61 73 50 61 63 6b 61 67 65 20 21 3d 3d 20 24 62 20 69 6e 73 74 61 6e 63 65 6f 66 20 41 6c 69 61 | asPackage.!==.$b.instanceof.Alia |
90220 | 73 50 61 63 6b 61 67 65 29 20 7b 0a 72 65 74 75 72 6e 20 24 61 20 69 6e 73 74 61 6e 63 65 6f 66 | sPackage).{.return.$a.instanceof |
90240 | 20 41 6c 69 61 73 50 61 63 6b 61 67 65 20 3f 20 2d 31 20 3a 20 31 3b 0a 7d 0a 0a 72 65 74 75 72 | .AliasPackage.?.-1.:.1;.}..retur |
90260 | 6e 20 73 74 72 63 6d 70 28 24 62 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 2c 20 24 61 2d 3e 67 | n.strcmp($b->getVersion(),.$a->g |
90280 | 65 74 56 65 72 73 69 6f 6e 28 29 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 73 74 72 63 6d 70 28 24 | etVersion());.}..return.strcmp($ |
902a0 | 62 2d 3e 67 65 74 4e 61 6d 65 28 29 2c 20 24 61 2d 3e 67 65 74 4e 61 6d 65 28 29 29 3b 0a 7d 3b | b->getName(),.$a->getName());.}; |
902c0 | 0a 0a 24 74 68 69 73 2d 3e 72 65 73 75 6c 74 50 61 63 6b 61 67 65 4d 61 70 20 3d 20 5b 5d 3b 0a | ..$this->resultPackageMap.=.[];. |
902e0 | 66 6f 72 65 61 63 68 20 28 24 72 65 73 75 6c 74 50 61 63 6b 61 67 65 73 20 61 73 20 24 70 61 63 | foreach.($resultPackages.as.$pac |
90300 | 6b 61 67 65 29 20 7b 0a 24 74 68 69 73 2d 3e 72 65 73 75 6c 74 50 61 63 6b 61 67 65 4d 61 70 5b | kage).{.$this->resultPackageMap[ |
90320 | 73 70 6c 5f 6f 62 6a 65 63 74 5f 68 61 73 68 28 24 70 61 63 6b 61 67 65 29 5d 20 3d 20 24 70 61 | spl_object_hash($package)].=.$pa |
90340 | 63 6b 61 67 65 3b 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d | ckage;.foreach.($package->getNam |
90360 | 65 73 28 29 20 61 73 20 24 6e 61 6d 65 29 20 7b 0a 24 74 68 69 73 2d 3e 72 65 73 75 6c 74 50 61 | es().as.$name).{.$this->resultPa |
90380 | 63 6b 61 67 65 73 42 79 4e 61 6d 65 5b 24 6e 61 6d 65 5d 5b 5d 20 3d 20 24 70 61 63 6b 61 67 65 | ckagesByName[$name][].=.$package |
903a0 | 3b 0a 7d 0a 7d 0a 0a 75 61 73 6f 72 74 28 24 74 68 69 73 2d 3e 72 65 73 75 6c 74 50 61 63 6b 61 | ;.}.}..uasort($this->resultPacka |
903c0 | 67 65 4d 61 70 2c 20 24 70 61 63 6b 61 67 65 53 6f 72 74 29 3b 0a 66 6f 72 65 61 63 68 20 28 24 | geMap,.$packageSort);.foreach.($ |
903e0 | 74 68 69 73 2d 3e 72 65 73 75 6c 74 50 61 63 6b 61 67 65 73 42 79 4e 61 6d 65 20 61 73 20 24 6e | this->resultPackagesByName.as.$n |
90400 | 61 6d 65 20 3d 3e 20 24 70 61 63 6b 61 67 65 73 29 20 7b 0a 75 61 73 6f 72 74 28 24 74 68 69 73 | ame.=>.$packages).{.uasort($this |
90420 | 2d 3e 72 65 73 75 6c 74 50 61 63 6b 61 67 65 73 42 79 4e 61 6d 65 5b 24 6e 61 6d 65 5d 2c 20 24 | ->resultPackagesByName[$name],.$ |
90440 | 70 61 63 6b 61 67 65 53 6f 72 74 29 3b 0a 7d 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 | packageSort);.}.}.....protected. |
90460 | 66 75 6e 63 74 69 6f 6e 20 63 61 6c 63 75 6c 61 74 65 4f 70 65 72 61 74 69 6f 6e 73 28 29 3a 20 | function.calculateOperations():. |
90480 | 61 72 72 61 79 0a 7b 0a 24 6f 70 65 72 61 74 69 6f 6e 73 20 3d 20 5b 5d 3b 0a 0a 24 70 72 65 73 | array.{.$operations.=.[];..$pres |
904a0 | 65 6e 74 50 61 63 6b 61 67 65 4d 61 70 20 3d 20 5b 5d 3b 0a 24 72 65 6d 6f 76 65 4d 61 70 20 3d | entPackageMap.=.[];.$removeMap.= |
904c0 | 20 5b 5d 3b 0a 24 70 72 65 73 65 6e 74 41 6c 69 61 73 4d 61 70 20 3d 20 5b 5d 3b 0a 24 72 65 6d | .[];.$presentAliasMap.=.[];.$rem |
904e0 | 6f 76 65 41 6c 69 61 73 4d 61 70 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 | oveAliasMap.=.[];.foreach.($this |
90500 | 2d 3e 70 72 65 73 65 6e 74 50 61 63 6b 61 67 65 73 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b | ->presentPackages.as.$package).{ |
90520 | 0a 69 66 20 28 24 70 61 63 6b 61 67 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 41 6c 69 61 73 50 61 | .if.($package.instanceof.AliasPa |
90540 | 63 6b 61 67 65 29 20 7b 0a 24 70 72 65 73 65 6e 74 41 6c 69 61 73 4d 61 70 5b 24 70 61 63 6b 61 | ckage).{.$presentAliasMap[$packa |
90560 | 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 2e 27 3a 3a 27 2e 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 | ge->getName().'::'.$package->get |
90580 | 56 65 72 73 69 6f 6e 28 29 5d 20 3d 20 24 70 61 63 6b 61 67 65 3b 0a 24 72 65 6d 6f 76 65 41 6c | Version()].=.$package;.$removeAl |
905a0 | 69 61 73 4d 61 70 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 2e 27 3a 3a 27 2e | iasMap[$package->getName().'::'. |
905c0 | 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 5d 20 3d 20 24 70 61 63 6b 61 | $package->getVersion()].=.$packa |
905e0 | 67 65 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 70 72 65 73 65 6e 74 50 61 63 6b 61 67 65 4d 61 70 5b | ge;.}.else.{.$presentPackageMap[ |
90600 | 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 20 3d 20 24 70 61 63 6b 61 67 65 3b | $package->getName()].=.$package; |
90620 | 0a 24 72 65 6d 6f 76 65 4d 61 70 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 5d | .$removeMap[$package->getName()] |
90640 | 20 3d 20 24 70 61 63 6b 61 67 65 3b 0a 7d 0a 7d 0a 0a 24 73 74 61 63 6b 20 3d 20 24 74 68 69 73 | .=.$package;.}.}..$stack.=.$this |
90660 | 2d 3e 67 65 74 52 6f 6f 74 50 61 63 6b 61 67 65 73 28 29 3b 0a 0a 24 76 69 73 69 74 65 64 20 3d | ->getRootPackages();..$visited.= |
90680 | 20 5b 5d 3b 0a 24 70 72 6f 63 65 73 73 65 64 20 3d 20 5b 5d 3b 0a 0a 77 68 69 6c 65 20 28 21 65 | .[];.$processed.=.[];..while.(!e |
906a0 | 6d 70 74 79 28 24 73 74 61 63 6b 29 29 20 7b 0a 24 70 61 63 6b 61 67 65 20 3d 20 61 72 72 61 79 | mpty($stack)).{.$package.=.array |
906c0 | 5f 70 6f 70 28 24 73 74 61 63 6b 29 3b 0a 0a 69 66 20 28 69 73 73 65 74 28 24 70 72 6f 63 65 73 | _pop($stack);..if.(isset($proces |
906e0 | 73 65 64 5b 73 70 6c 5f 6f 62 6a 65 63 74 5f 68 61 73 68 28 24 70 61 63 6b 61 67 65 29 5d 29 29 | sed[spl_object_hash($package)])) |
90700 | 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 69 66 20 28 21 69 73 73 65 74 28 24 76 69 73 69 | .{.continue;.}..if.(!isset($visi |
90720 | 74 65 64 5b 73 70 6c 5f 6f 62 6a 65 63 74 5f 68 61 73 68 28 24 70 61 63 6b 61 67 65 29 5d 29 29 | ted[spl_object_hash($package)])) |
90740 | 20 7b 0a 24 76 69 73 69 74 65 64 5b 73 70 6c 5f 6f 62 6a 65 63 74 5f 68 61 73 68 28 24 70 61 63 | .{.$visited[spl_object_hash($pac |
90760 | 6b 61 67 65 29 5d 20 3d 20 74 72 75 65 3b 0a 0a 24 73 74 61 63 6b 5b 5d 20 3d 20 24 70 61 63 6b | kage)].=.true;..$stack[].=.$pack |
90780 | 61 67 65 3b 0a 69 66 20 28 24 70 61 63 6b 61 67 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 41 6c 69 | age;.if.($package.instanceof.Ali |
907a0 | 61 73 50 61 63 6b 61 67 65 29 20 7b 0a 24 73 74 61 63 6b 5b 5d 20 3d 20 24 70 61 63 6b 61 67 65 | asPackage).{.$stack[].=.$package |
907c0 | 2d 3e 67 65 74 41 6c 69 61 73 4f 66 28 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 66 6f 72 65 61 63 68 | ->getAliasOf();.}.else.{.foreach |
907e0 | 20 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 52 65 71 75 69 72 65 73 28 29 20 61 73 20 24 6c 69 | .($package->getRequires().as.$li |
90800 | 6e 6b 29 20 7b 0a 24 70 6f 73 73 69 62 6c 65 52 65 71 75 69 72 65 73 20 3d 20 24 74 68 69 73 2d | nk).{.$possibleRequires.=.$this- |
90820 | 3e 67 65 74 50 72 6f 76 69 64 65 72 73 49 6e 52 65 73 75 6c 74 28 24 6c 69 6e 6b 29 3b 0a 0a 66 | >getProvidersInResult($link);..f |
90840 | 6f 72 65 61 63 68 20 28 24 70 6f 73 73 69 62 6c 65 52 65 71 75 69 72 65 73 20 61 73 20 24 72 65 | oreach.($possibleRequires.as.$re |
90860 | 71 75 69 72 65 29 20 7b 0a 24 73 74 61 63 6b 5b 5d 20 3d 20 24 72 65 71 75 69 72 65 3b 0a 7d 0a | quire).{.$stack[].=.$require;.}. |
90880 | 7d 0a 7d 0a 7d 20 65 6c 73 65 69 66 20 28 21 69 73 73 65 74 28 24 70 72 6f 63 65 73 73 65 64 5b | }.}.}.elseif.(!isset($processed[ |
908a0 | 73 70 6c 5f 6f 62 6a 65 63 74 5f 68 61 73 68 28 24 70 61 63 6b 61 67 65 29 5d 29 29 20 7b 0a 24 | spl_object_hash($package)])).{.$ |
908c0 | 70 72 6f 63 65 73 73 65 64 5b 73 70 6c 5f 6f 62 6a 65 63 74 5f 68 61 73 68 28 24 70 61 63 6b 61 | processed[spl_object_hash($packa |
908e0 | 67 65 29 5d 20 3d 20 74 72 75 65 3b 0a 0a 69 66 20 28 24 70 61 63 6b 61 67 65 20 69 6e 73 74 61 | ge)].=.true;..if.($package.insta |
90900 | 6e 63 65 6f 66 20 41 6c 69 61 73 50 61 63 6b 61 67 65 29 20 7b 0a 24 61 6c 69 61 73 4b 65 79 20 | nceof.AliasPackage).{.$aliasKey. |
90920 | 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 2e 27 3a 3a 27 2e 24 70 61 63 6b | =.$package->getName().'::'.$pack |
90940 | 61 67 65 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 3b 0a 69 66 20 28 69 73 73 65 74 28 24 70 72 | age->getVersion();.if.(isset($pr |
90960 | 65 73 65 6e 74 41 6c 69 61 73 4d 61 70 5b 24 61 6c 69 61 73 4b 65 79 5d 29 29 20 7b 0a 75 6e 73 | esentAliasMap[$aliasKey])).{.uns |
90980 | 65 74 28 24 72 65 6d 6f 76 65 41 6c 69 61 73 4d 61 70 5b 24 61 6c 69 61 73 4b 65 79 5d 29 3b 0a | et($removeAliasMap[$aliasKey]);. |
909a0 | 7d 20 65 6c 73 65 20 7b 0a 24 6f 70 65 72 61 74 69 6f 6e 73 5b 5d 20 3d 20 6e 65 77 20 4f 70 65 | }.else.{.$operations[].=.new.Ope |
909c0 | 72 61 74 69 6f 6e 5c 4d 61 72 6b 41 6c 69 61 73 49 6e 73 74 61 6c 6c 65 64 4f 70 65 72 61 74 69 | ration\MarkAliasInstalledOperati |
909e0 | 6f 6e 28 24 70 61 63 6b 61 67 65 29 3b 0a 7d 0a 7d 20 65 6c 73 65 20 7b 0a 69 66 20 28 69 73 73 | on($package);.}.}.else.{.if.(iss |
90a00 | 65 74 28 24 70 72 65 73 65 6e 74 50 61 63 6b 61 67 65 4d 61 70 5b 24 70 61 63 6b 61 67 65 2d 3e | et($presentPackageMap[$package-> |
90a20 | 67 65 74 4e 61 6d 65 28 29 5d 29 29 20 7b 0a 24 73 6f 75 72 63 65 20 3d 20 24 70 72 65 73 65 6e | getName()])).{.$source.=.$presen |
90a40 | 74 50 61 63 6b 61 67 65 4d 61 70 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 5d | tPackageMap[$package->getName()] |
90a60 | 3b 0a 0a 0a 0a 69 66 20 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 20 | ;....if.($package->getVersion(). |
90a80 | 21 3d 3d 20 24 70 72 65 73 65 6e 74 50 61 63 6b 61 67 65 4d 61 70 5b 24 70 61 63 6b 61 67 65 2d | !==.$presentPackageMap[$package- |
90aa0 | 3e 67 65 74 4e 61 6d 65 28 29 5d 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 20 7c 7c 0a 24 70 61 | >getName()]->getVersion().||.$pa |
90ac0 | 63 6b 61 67 65 2d 3e 67 65 74 44 69 73 74 52 65 66 65 72 65 6e 63 65 28 29 20 21 3d 3d 20 24 70 | ckage->getDistReference().!==.$p |
90ae0 | 72 65 73 65 6e 74 50 61 63 6b 61 67 65 4d 61 70 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 | resentPackageMap[$package->getNa |
90b00 | 6d 65 28 29 5d 2d 3e 67 65 74 44 69 73 74 52 65 66 65 72 65 6e 63 65 28 29 20 7c 7c 0a 24 70 61 | me()]->getDistReference().||.$pa |
90b20 | 63 6b 61 67 65 2d 3e 67 65 74 53 6f 75 72 63 65 52 65 66 65 72 65 6e 63 65 28 29 20 21 3d 3d 20 | ckage->getSourceReference().!==. |
90b40 | 24 70 72 65 73 65 6e 74 50 61 63 6b 61 67 65 4d 61 70 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 | $presentPackageMap[$package->get |
90b60 | 4e 61 6d 65 28 29 5d 2d 3e 67 65 74 53 6f 75 72 63 65 52 65 66 65 72 65 6e 63 65 28 29 0a 29 20 | Name()]->getSourceReference().). |
90b80 | 7b 0a 24 6f 70 65 72 61 74 69 6f 6e 73 5b 5d 20 3d 20 6e 65 77 20 4f 70 65 72 61 74 69 6f 6e 5c | {.$operations[].=.new.Operation\ |
90ba0 | 55 70 64 61 74 65 4f 70 65 72 61 74 69 6f 6e 28 24 73 6f 75 72 63 65 2c 20 24 70 61 63 6b 61 67 | UpdateOperation($source,.$packag |
90bc0 | 65 29 3b 0a 7d 0a 75 6e 73 65 74 28 24 72 65 6d 6f 76 65 4d 61 70 5b 24 70 61 63 6b 61 67 65 2d | e);.}.unset($removeMap[$package- |
90be0 | 3e 67 65 74 4e 61 6d 65 28 29 5d 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 6f 70 65 72 61 74 69 6f | >getName()]);.}.else.{.$operatio |
90c00 | 6e 73 5b 5d 20 3d 20 6e 65 77 20 4f 70 65 72 61 74 69 6f 6e 5c 49 6e 73 74 61 6c 6c 4f 70 65 72 | ns[].=.new.Operation\InstallOper |
90c20 | 61 74 69 6f 6e 28 24 70 61 63 6b 61 67 65 29 3b 0a 75 6e 73 65 74 28 24 72 65 6d 6f 76 65 4d 61 | ation($package);.unset($removeMa |
90c40 | 70 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 29 3b 0a 7d 0a 7d 0a 7d 0a 7d | p[$package->getName()]);.}.}.}.} |
90c60 | 0a 0a 66 6f 72 65 61 63 68 20 28 24 72 65 6d 6f 76 65 4d 61 70 20 61 73 20 24 6e 61 6d 65 20 3d | ..foreach.($removeMap.as.$name.= |
90c80 | 3e 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 61 72 72 61 79 5f 75 6e 73 68 69 66 74 28 24 6f 70 65 | >.$package).{.array_unshift($ope |
90ca0 | 72 61 74 69 6f 6e 73 2c 20 6e 65 77 20 4f 70 65 72 61 74 69 6f 6e 5c 55 6e 69 6e 73 74 61 6c 6c | rations,.new.Operation\Uninstall |
90cc0 | 4f 70 65 72 61 74 69 6f 6e 28 24 70 61 63 6b 61 67 65 29 29 3b 0a 7d 0a 66 6f 72 65 61 63 68 20 | Operation($package));.}.foreach. |
90ce0 | 28 24 72 65 6d 6f 76 65 41 6c 69 61 73 4d 61 70 20 61 73 20 24 6e 61 6d 65 56 65 72 73 69 6f 6e | ($removeAliasMap.as.$nameVersion |
90d00 | 20 3d 3e 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 24 6f 70 65 72 61 74 69 6f 6e 73 5b 5d 20 3d 20 | .=>.$package).{.$operations[].=. |
90d20 | 6e 65 77 20 4f 70 65 72 61 74 69 6f 6e 5c 4d 61 72 6b 41 6c 69 61 73 55 6e 69 6e 73 74 61 6c 6c | new.Operation\MarkAliasUninstall |
90d40 | 65 64 4f 70 65 72 61 74 69 6f 6e 28 24 70 61 63 6b 61 67 65 29 3b 0a 7d 0a 0a 24 6f 70 65 72 61 | edOperation($package);.}..$opera |
90d60 | 74 69 6f 6e 73 20 3d 20 24 74 68 69 73 2d 3e 6d 6f 76 65 50 6c 75 67 69 6e 73 54 6f 46 72 6f 6e | tions.=.$this->movePluginsToFron |
90d80 | 74 28 24 6f 70 65 72 61 74 69 6f 6e 73 29 3b 0a 0a 0a 24 6f 70 65 72 61 74 69 6f 6e 73 20 3d 20 | t($operations);...$operations.=. |
90da0 | 24 74 68 69 73 2d 3e 6d 6f 76 65 55 6e 69 6e 73 74 61 6c 6c 73 54 6f 46 72 6f 6e 74 28 24 6f 70 | $this->moveUninstallsToFront($op |
90dc0 | 65 72 61 74 69 6f 6e 73 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 72 65 | erations);....................re |
90de0 | 74 75 72 6e 20 24 74 68 69 73 2d 3e 6f 70 65 72 61 74 69 6f 6e 73 20 3d 20 24 6f 70 65 72 61 74 | turn.$this->operations.=.$operat |
90e00 | 69 6f 6e 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 | ions;.}..........protected.funct |
90e20 | 69 6f 6e 20 67 65 74 52 6f 6f 74 50 61 63 6b 61 67 65 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 24 | ion.getRootPackages():.array.{.$ |
90e40 | 72 6f 6f 74 73 20 3d 20 24 74 68 69 73 2d 3e 72 65 73 75 6c 74 50 61 63 6b 61 67 65 4d 61 70 3b | roots.=.$this->resultPackageMap; |
90e60 | 0a 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 72 65 73 75 6c 74 50 61 63 6b 61 67 65 4d | ..foreach.($this->resultPackageM |
90e80 | 61 70 20 61 73 20 24 70 61 63 6b 61 67 65 48 61 73 68 20 3d 3e 20 24 70 61 63 6b 61 67 65 29 20 | ap.as.$packageHash.=>.$package). |
90ea0 | 7b 0a 69 66 20 28 21 69 73 73 65 74 28 24 72 6f 6f 74 73 5b 24 70 61 63 6b 61 67 65 48 61 73 68 | {.if.(!isset($roots[$packageHash |
90ec0 | 5d 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 | ])).{.continue;.}..foreach.($pac |
90ee0 | 6b 61 67 65 2d 3e 67 65 74 52 65 71 75 69 72 65 73 28 29 20 61 73 20 24 6c 69 6e 6b 29 20 7b 0a | kage->getRequires().as.$link).{. |
90f00 | 24 70 6f 73 73 69 62 6c 65 52 65 71 75 69 72 65 73 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 50 72 | $possibleRequires.=.$this->getPr |
90f20 | 6f 76 69 64 65 72 73 49 6e 52 65 73 75 6c 74 28 24 6c 69 6e 6b 29 3b 0a 0a 66 6f 72 65 61 63 68 | ovidersInResult($link);..foreach |
90f40 | 20 28 24 70 6f 73 73 69 62 6c 65 52 65 71 75 69 72 65 73 20 61 73 20 24 72 65 71 75 69 72 65 29 | .($possibleRequires.as.$require) |
90f60 | 20 7b 0a 69 66 20 28 24 72 65 71 75 69 72 65 20 21 3d 3d 20 24 70 61 63 6b 61 67 65 29 20 7b 0a | .{.if.($require.!==.$package).{. |
90f80 | 75 6e 73 65 74 28 24 72 6f 6f 74 73 5b 73 70 6c 5f 6f 62 6a 65 63 74 5f 68 61 73 68 28 24 72 65 | unset($roots[spl_object_hash($re |
90fa0 | 71 75 69 72 65 29 5d 29 3b 0a 7d 0a 7d 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 72 6f 6f 74 73 | quire)]);.}.}.}.}..return.$roots |
90fc0 | 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 50 72 | ;.}.....protected.function.getPr |
90fe0 | 6f 76 69 64 65 72 73 49 6e 52 65 73 75 6c 74 28 4c 69 6e 6b 20 24 6c 69 6e 6b 29 3a 20 61 72 72 | ovidersInResult(Link.$link):.arr |
91000 | 61 79 0a 7b 0a 69 66 20 28 21 69 73 73 65 74 28 24 74 68 69 73 2d 3e 72 65 73 75 6c 74 50 61 63 | ay.{.if.(!isset($this->resultPac |
91020 | 6b 61 67 65 73 42 79 4e 61 6d 65 5b 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 74 28 29 5d 29 | kagesByName[$link->getTarget()]) |
91040 | 29 20 7b 0a 72 65 74 75 72 6e 20 5b 5d 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e | ).{.return.[];.}..return.$this-> |
91060 | 72 65 73 75 6c 74 50 61 63 6b 61 67 65 73 42 79 4e 61 6d 65 5b 24 6c 69 6e 6b 2d 3e 67 65 74 54 | resultPackagesByName[$link->getT |
91080 | 61 72 67 65 74 28 29 5d 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 | arget()];.}...............privat |
910a0 | 65 20 66 75 6e 63 74 69 6f 6e 20 6d 6f 76 65 50 6c 75 67 69 6e 73 54 6f 46 72 6f 6e 74 28 61 72 | e.function.movePluginsToFront(ar |
910c0 | 72 61 79 20 24 6f 70 65 72 61 74 69 6f 6e 73 29 3a 20 61 72 72 61 79 0a 7b 0a 24 64 6c 4d 6f 64 | ray.$operations):.array.{.$dlMod |
910e0 | 69 66 79 69 6e 67 50 6c 75 67 69 6e 73 4e 6f 44 65 70 73 20 3d 20 5b 5d 3b 0a 24 64 6c 4d 6f 64 | ifyingPluginsNoDeps.=.[];.$dlMod |
91100 | 69 66 79 69 6e 67 50 6c 75 67 69 6e 73 57 69 74 68 44 65 70 73 20 3d 20 5b 5d 3b 0a 24 64 6c 4d | ifyingPluginsWithDeps.=.[];.$dlM |
91120 | 6f 64 69 66 79 69 6e 67 50 6c 75 67 69 6e 52 65 71 75 69 72 65 73 20 3d 20 5b 5d 3b 0a 24 70 6c | odifyingPluginRequires.=.[];.$pl |
91140 | 75 67 69 6e 73 4e 6f 44 65 70 73 20 3d 20 5b 5d 3b 0a 24 70 6c 75 67 69 6e 73 57 69 74 68 44 65 | uginsNoDeps.=.[];.$pluginsWithDe |
91160 | 70 73 20 3d 20 5b 5d 3b 0a 24 70 6c 75 67 69 6e 52 65 71 75 69 72 65 73 20 3d 20 5b 5d 3b 0a 0a | ps.=.[];.$pluginRequires.=.[];.. |
91180 | 66 6f 72 65 61 63 68 20 28 61 72 72 61 79 5f 72 65 76 65 72 73 65 28 24 6f 70 65 72 61 74 69 6f | foreach.(array_reverse($operatio |
911a0 | 6e 73 2c 20 74 72 75 65 29 20 61 73 20 24 69 64 78 20 3d 3e 20 24 6f 70 29 20 7b 0a 69 66 20 28 | ns,.true).as.$idx.=>.$op).{.if.( |
911c0 | 24 6f 70 20 69 6e 73 74 61 6e 63 65 6f 66 20 4f 70 65 72 61 74 69 6f 6e 5c 49 6e 73 74 61 6c 6c | $op.instanceof.Operation\Install |
911e0 | 4f 70 65 72 61 74 69 6f 6e 29 20 7b 0a 24 70 61 63 6b 61 67 65 20 3d 20 24 6f 70 2d 3e 67 65 74 | Operation).{.$package.=.$op->get |
91200 | 50 61 63 6b 61 67 65 28 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 6f 70 20 69 6e 73 74 61 6e 63 | Package();.}.elseif.($op.instanc |
91220 | 65 6f 66 20 4f 70 65 72 61 74 69 6f 6e 5c 55 70 64 61 74 65 4f 70 65 72 61 74 69 6f 6e 29 20 7b | eof.Operation\UpdateOperation).{ |
91240 | 0a 24 70 61 63 6b 61 67 65 20 3d 20 24 6f 70 2d 3e 67 65 74 54 61 72 67 65 74 50 61 63 6b 61 67 | .$package.=.$op->getTargetPackag |
91260 | 65 28 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 24 69 73 44 6f | e();.}.else.{.continue;.}..$isDo |
91280 | 77 6e 6c 6f 61 64 73 4d 6f 64 69 66 79 69 6e 67 50 6c 75 67 69 6e 20 3d 20 24 70 61 63 6b 61 67 | wnloadsModifyingPlugin.=.$packag |
912a0 | 65 2d 3e 67 65 74 54 79 70 65 28 29 20 3d 3d 3d 20 27 63 6f 6d 70 6f 73 65 72 2d 70 6c 75 67 69 | e->getType().===.'composer-plugi |
912c0 | 6e 27 20 26 26 20 28 24 65 78 74 72 61 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 45 78 74 | n'.&&.($extra.=.$package->getExt |
912e0 | 72 61 28 29 29 20 26 26 20 69 73 73 65 74 28 24 65 78 74 72 61 5b 27 70 6c 75 67 69 6e 2d 6d 6f | ra()).&&.isset($extra['plugin-mo |
91300 | 64 69 66 69 65 73 2d 64 6f 77 6e 6c 6f 61 64 73 27 5d 29 20 26 26 20 24 65 78 74 72 61 5b 27 70 | difies-downloads']).&&.$extra['p |
91320 | 6c 75 67 69 6e 2d 6d 6f 64 69 66 69 65 73 2d 64 6f 77 6e 6c 6f 61 64 73 27 5d 20 3d 3d 3d 20 74 | lugin-modifies-downloads'].===.t |
91340 | 72 75 65 3b 0a 0a 0a 69 66 20 28 24 69 73 44 6f 77 6e 6c 6f 61 64 73 4d 6f 64 69 66 79 69 6e 67 | rue;...if.($isDownloadsModifying |
91360 | 50 6c 75 67 69 6e 20 7c 7c 20 63 6f 75 6e 74 28 61 72 72 61 79 5f 69 6e 74 65 72 73 65 63 74 28 | Plugin.||.count(array_intersect( |
91380 | 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 73 28 29 2c 20 24 64 6c 4d 6f 64 69 66 79 69 | $package->getNames(),.$dlModifyi |
913a0 | 6e 67 50 6c 75 67 69 6e 52 65 71 75 69 72 65 73 29 29 29 20 7b 0a 0a 24 72 65 71 75 69 72 65 73 | ngPluginRequires))).{..$requires |
913c0 | 20 3d 20 61 72 72 61 79 5f 66 69 6c 74 65 72 28 61 72 72 61 79 5f 6b 65 79 73 28 24 70 61 63 6b | .=.array_filter(array_keys($pack |
913e0 | 61 67 65 2d 3e 67 65 74 52 65 71 75 69 72 65 73 28 29 29 2c 20 73 74 61 74 69 63 20 66 75 6e 63 | age->getRequires()),.static.func |
91400 | 74 69 6f 6e 20 28 24 72 65 71 29 3a 20 62 6f 6f 6c 20 7b 0a 72 65 74 75 72 6e 20 21 50 6c 61 74 | tion.($req):.bool.{.return.!Plat |
91420 | 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 3a 3a 69 73 50 6c 61 74 66 6f 72 6d 50 61 63 6b 61 67 | formRepository::isPlatformPackag |
91440 | 65 28 24 72 65 71 29 3b 0a 7d 29 3b 0a 0a 0a 69 66 20 28 24 69 73 44 6f 77 6e 6c 6f 61 64 73 4d | e($req);.});...if.($isDownloadsM |
91460 | 6f 64 69 66 79 69 6e 67 50 6c 75 67 69 6e 20 26 26 20 21 63 6f 75 6e 74 28 24 72 65 71 75 69 72 | odifyingPlugin.&&.!count($requir |
91480 | 65 73 29 29 20 7b 0a 0a 61 72 72 61 79 5f 75 6e 73 68 69 66 74 28 24 64 6c 4d 6f 64 69 66 79 69 | es)).{..array_unshift($dlModifyi |
914a0 | 6e 67 50 6c 75 67 69 6e 73 4e 6f 44 65 70 73 2c 20 24 6f 70 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a | ngPluginsNoDeps,.$op);.}.else.{. |
914c0 | 0a 24 64 6c 4d 6f 64 69 66 79 69 6e 67 50 6c 75 67 69 6e 52 65 71 75 69 72 65 73 20 3d 20 61 72 | .$dlModifyingPluginRequires.=.ar |
914e0 | 72 61 79 5f 6d 65 72 67 65 28 24 64 6c 4d 6f 64 69 66 79 69 6e 67 50 6c 75 67 69 6e 52 65 71 75 | ray_merge($dlModifyingPluginRequ |
91500 | 69 72 65 73 2c 20 24 72 65 71 75 69 72 65 73 29 3b 0a 0a 61 72 72 61 79 5f 75 6e 73 68 69 66 74 | ires,.$requires);..array_unshift |
91520 | 28 24 64 6c 4d 6f 64 69 66 79 69 6e 67 50 6c 75 67 69 6e 73 57 69 74 68 44 65 70 73 2c 20 24 6f | ($dlModifyingPluginsWithDeps,.$o |
91540 | 70 29 3b 0a 7d 0a 0a 75 6e 73 65 74 28 24 6f 70 65 72 61 74 69 6f 6e 73 5b 24 69 64 78 5d 29 3b | p);.}..unset($operations[$idx]); |
91560 | 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 0a 24 69 73 50 6c 75 67 69 6e 20 3d 20 24 70 61 63 6b | .continue;.}...$isPlugin.=.$pack |
91580 | 61 67 65 2d 3e 67 65 74 54 79 70 65 28 29 20 3d 3d 3d 20 27 63 6f 6d 70 6f 73 65 72 2d 70 6c 75 | age->getType().===.'composer-plu |
915a0 | 67 69 6e 27 20 7c 7c 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 54 79 70 65 28 29 20 3d 3d 3d 20 | gin'.||.$package->getType().===. |
915c0 | 27 63 6f 6d 70 6f 73 65 72 2d 69 6e 73 74 61 6c 6c 65 72 27 3b 0a 0a 0a 69 66 20 28 24 69 73 50 | 'composer-installer';...if.($isP |
915e0 | 6c 75 67 69 6e 20 7c 7c 20 63 6f 75 6e 74 28 61 72 72 61 79 5f 69 6e 74 65 72 73 65 63 74 28 24 | lugin.||.count(array_intersect($ |
91600 | 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 73 28 29 2c 20 24 70 6c 75 67 69 6e 52 65 71 75 | package->getNames(),.$pluginRequ |
91620 | 69 72 65 73 29 29 29 20 7b 0a 0a 24 72 65 71 75 69 72 65 73 20 3d 20 61 72 72 61 79 5f 66 69 6c | ires))).{..$requires.=.array_fil |
91640 | 74 65 72 28 61 72 72 61 79 5f 6b 65 79 73 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 52 65 71 75 | ter(array_keys($package->getRequ |
91660 | 69 72 65 73 28 29 29 2c 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 72 65 71 29 3a | ires()),.static.function.($req): |
91680 | 20 62 6f 6f 6c 20 7b 0a 72 65 74 75 72 6e 20 21 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f | .bool.{.return.!PlatformReposito |
916a0 | 72 79 3a 3a 69 73 50 6c 61 74 66 6f 72 6d 50 61 63 6b 61 67 65 28 24 72 65 71 29 3b 0a 7d 29 3b | ry::isPlatformPackage($req);.}); |
916c0 | 0a 0a 0a 69 66 20 28 24 69 73 50 6c 75 67 69 6e 20 26 26 20 21 63 6f 75 6e 74 28 24 72 65 71 75 | ...if.($isPlugin.&&.!count($requ |
916e0 | 69 72 65 73 29 29 20 7b 0a 0a 61 72 72 61 79 5f 75 6e 73 68 69 66 74 28 24 70 6c 75 67 69 6e 73 | ires)).{..array_unshift($plugins |
91700 | 4e 6f 44 65 70 73 2c 20 24 6f 70 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 0a 24 70 6c 75 67 69 6e 52 | NoDeps,.$op);.}.else.{..$pluginR |
91720 | 65 71 75 69 72 65 73 20 3d 20 61 72 72 61 79 5f 6d 65 72 67 65 28 24 70 6c 75 67 69 6e 52 65 71 | equires.=.array_merge($pluginReq |
91740 | 75 69 72 65 73 2c 20 24 72 65 71 75 69 72 65 73 29 3b 0a 0a 61 72 72 61 79 5f 75 6e 73 68 69 66 | uires,.$requires);..array_unshif |
91760 | 74 28 24 70 6c 75 67 69 6e 73 57 69 74 68 44 65 70 73 2c 20 24 6f 70 29 3b 0a 7d 0a 0a 75 6e 73 | t($pluginsWithDeps,.$op);.}..uns |
91780 | 65 74 28 24 6f 70 65 72 61 74 69 6f 6e 73 5b 24 69 64 78 5d 29 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 | et($operations[$idx]);.}.}..retu |
917a0 | 72 6e 20 61 72 72 61 79 5f 6d 65 72 67 65 28 24 64 6c 4d 6f 64 69 66 79 69 6e 67 50 6c 75 67 69 | rn.array_merge($dlModifyingPlugi |
917c0 | 6e 73 4e 6f 44 65 70 73 2c 20 24 64 6c 4d 6f 64 69 66 79 69 6e 67 50 6c 75 67 69 6e 73 57 69 74 | nsNoDeps,.$dlModifyingPluginsWit |
917e0 | 68 44 65 70 73 2c 20 24 70 6c 75 67 69 6e 73 4e 6f 44 65 70 73 2c 20 24 70 6c 75 67 69 6e 73 57 | hDeps,.$pluginsNoDeps,.$pluginsW |
91800 | 69 74 68 44 65 70 73 2c 20 24 6f 70 65 72 61 74 69 6f 6e 73 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a | ithDeps,.$operations);.}........ |
91820 | 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 6d 6f 76 65 55 6e 69 6e 73 74 61 6c 6c 73 | .private.function.moveUninstalls |
91840 | 54 6f 46 72 6f 6e 74 28 61 72 72 61 79 20 24 6f 70 65 72 61 74 69 6f 6e 73 29 3a 20 61 72 72 61 | ToFront(array.$operations):.arra |
91860 | 79 0a 7b 0a 24 75 6e 69 6e 73 74 4f 70 73 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 6f | y.{.$uninstOps.=.[];.foreach.($o |
91880 | 70 65 72 61 74 69 6f 6e 73 20 61 73 20 24 69 64 78 20 3d 3e 20 24 6f 70 29 20 7b 0a 69 66 20 28 | perations.as.$idx.=>.$op).{.if.( |
918a0 | 24 6f 70 20 69 6e 73 74 61 6e 63 65 6f 66 20 4f 70 65 72 61 74 69 6f 6e 5c 55 6e 69 6e 73 74 61 | $op.instanceof.Operation\Uninsta |
918c0 | 6c 6c 4f 70 65 72 61 74 69 6f 6e 20 7c 7c 20 24 6f 70 20 69 6e 73 74 61 6e 63 65 6f 66 20 4f 70 | llOperation.||.$op.instanceof.Op |
918e0 | 65 72 61 74 69 6f 6e 5c 4d 61 72 6b 41 6c 69 61 73 55 6e 69 6e 73 74 61 6c 6c 65 64 4f 70 65 72 | eration\MarkAliasUninstalledOper |
91900 | 61 74 69 6f 6e 29 20 7b 0a 24 75 6e 69 6e 73 74 4f 70 73 5b 5d 20 3d 20 24 6f 70 3b 0a 75 6e 73 | ation).{.$uninstOps[].=.$op;.uns |
91920 | 65 74 28 24 6f 70 65 72 61 74 69 6f 6e 73 5b 24 69 64 78 5d 29 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 | et($operations[$idx]);.}.}..retu |
91940 | 72 6e 20 61 72 72 61 79 5f 6d 65 72 67 65 28 24 75 6e 69 6e 73 74 4f 70 73 2c 20 24 6f 70 65 72 | rn.array_merge($uninstOps,.$oper |
91960 | 61 74 69 6f 6e 73 29 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 | ations);.}.}.<?php.declare(stric |
91980 | 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 | t_types=1);............namespace |
919a0 | 20 43 6f 6d 70 6f 73 65 72 5c 44 6f 77 6e 6c 6f 61 64 65 72 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f | .Composer\Downloader;..use.Compo |
919c0 | 73 65 72 5c 50 61 63 6b 61 67 65 5c 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 | ser\Package\PackageInterface;.us |
919e0 | 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 6c 61 74 66 6f 72 6d 3b 0a 75 73 65 20 53 79 | e.Composer\Util\Platform;.use.Sy |
91a00 | 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 46 69 6e 64 65 72 5c 46 69 6e 64 65 72 3b 0a 75 | mfony\Component\Finder\Finder;.u |
91a20 | 73 65 20 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 | se.React\Promise\PromiseInterfac |
91a40 | 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 | e;.use.Composer\DependencyResolv |
91a60 | 65 72 5c 4f 70 65 72 61 74 69 6f 6e 5c 49 6e 73 74 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 3b 0a 0a | er\Operation\InstallOperation;.. |
91a80 | 0a 0a 0a 0a 0a 0a 0a 61 62 73 74 72 61 63 74 20 63 6c 61 73 73 20 41 72 63 68 69 76 65 44 6f 77 | .......abstract.class.ArchiveDow |
91aa0 | 6e 6c 6f 61 64 65 72 20 65 78 74 65 6e 64 73 20 46 69 6c 65 44 6f 77 6e 6c 6f 61 64 65 72 0a 7b | nloader.extends.FileDownloader.{ |
91ac0 | 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 63 6c 65 61 6e 75 70 45 78 65 63 75 74 65 64 20 3d | ....protected.$cleanupExecuted.= |
91ae0 | 20 5b 5d 3b 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 70 72 65 70 61 72 65 28 73 74 | .[];..public.function.prepare(st |
91b00 | 72 69 6e 67 20 24 74 79 70 65 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 | ring.$type,.PackageInterface.$pa |
91b20 | 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 2c 20 3f 50 61 63 6b 61 67 65 49 6e 74 | ckage,.string.$path,.?PackageInt |
91b40 | 65 72 66 61 63 65 20 24 70 72 65 76 50 61 63 6b 61 67 65 20 3d 20 6e 75 6c 6c 29 3a 20 50 72 6f | erface.$prevPackage.=.null):.Pro |
91b60 | 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 63 6c 65 | miseInterface.{.unset($this->cle |
91b80 | 61 6e 75 70 45 78 65 63 75 74 65 64 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 | anupExecuted[$package->getName() |
91ba0 | 5d 29 3b 0a 0a 72 65 74 75 72 6e 20 70 61 72 65 6e 74 3a 3a 70 72 65 70 61 72 65 28 24 74 79 70 | ]);..return.parent::prepare($typ |
91bc0 | 65 2c 20 24 70 61 63 6b 61 67 65 2c 20 24 70 61 74 68 2c 20 24 70 72 65 76 50 61 63 6b 61 67 65 | e,.$package,.$path,.$prevPackage |
91be0 | 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 63 6c 65 61 6e 75 70 28 73 74 | );.}..public.function.cleanup(st |
91c00 | 72 69 6e 67 20 24 74 79 70 65 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 | ring.$type,.PackageInterface.$pa |
91c20 | 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 2c 20 3f 50 61 63 6b 61 67 65 49 6e 74 | ckage,.string.$path,.?PackageInt |
91c40 | 65 72 66 61 63 65 20 24 70 72 65 76 50 61 63 6b 61 67 65 20 3d 20 6e 75 6c 6c 29 3a 20 50 72 6f | erface.$prevPackage.=.null):.Pro |
91c60 | 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 24 74 68 69 73 2d 3e 63 6c 65 61 6e 75 70 45 78 | miseInterface.{.$this->cleanupEx |
91c80 | 65 63 75 74 65 64 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 20 3d 20 74 72 | ecuted[$package->getName()].=.tr |
91ca0 | 75 65 3b 0a 0a 72 65 74 75 72 6e 20 70 61 72 65 6e 74 3a 3a 63 6c 65 61 6e 75 70 28 24 74 79 70 | ue;..return.parent::cleanup($typ |
91cc0 | 65 2c 20 24 70 61 63 6b 61 67 65 2c 20 24 70 61 74 68 2c 20 24 70 72 65 76 50 61 63 6b 61 67 65 | e,.$package,.$path,.$prevPackage |
91ce0 | 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 6e | );.}..........public.function.in |
91d00 | 73 74 61 6c 6c 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c | stall(PackageInterface.$package, |
91d20 | 20 73 74 72 69 6e 67 20 24 70 61 74 68 2c 20 62 6f 6f 6c 20 24 6f 75 74 70 75 74 20 3d 20 74 72 | .string.$path,.bool.$output.=.tr |
91d40 | 75 65 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 69 66 20 28 24 6f 75 74 | ue):.PromiseInterface.{.if.($out |
91d60 | 70 75 74 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 22 20 20 | put).{.$this->io->writeError(".. |
91d80 | 2d 20 22 20 2e 20 49 6e 73 74 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 3a 3a 66 6f 72 6d 61 74 28 24 | -."...InstallOperation::format($ |
91da0 | 70 61 63 6b 61 67 65 29 20 2e 20 24 74 68 69 73 2d 3e 67 65 74 49 6e 73 74 61 6c 6c 4f 70 65 72 | package)...$this->getInstallOper |
91dc0 | 61 74 69 6f 6e 41 70 70 65 6e 64 69 78 28 24 70 61 63 6b 61 67 65 2c 20 24 70 61 74 68 29 29 3b | ationAppendix($package,.$path)); |
91de0 | 0a 7d 0a 0a 24 76 65 6e 64 6f 72 44 69 72 20 3d 20 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 2d 3e | .}..$vendorDir.=.$this->config-> |
91e00 | 67 65 74 28 27 76 65 6e 64 6f 72 2d 64 69 72 27 29 3b 0a 0a 0a 0a 0a 69 66 20 28 66 61 6c 73 65 | get('vendor-dir');.....if.(false |
91e20 | 20 3d 3d 3d 20 73 74 72 70 6f 73 28 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 73 74 65 6d 2d 3e 6e | .===.strpos($this->filesystem->n |
91e40 | 6f 72 6d 61 6c 69 7a 65 50 61 74 68 28 24 76 65 6e 64 6f 72 44 69 72 29 2c 20 24 74 68 69 73 2d | ormalizePath($vendorDir),.$this- |
91e60 | 3e 66 69 6c 65 73 79 73 74 65 6d 2d 3e 6e 6f 72 6d 61 6c 69 7a 65 50 61 74 68 28 24 70 61 74 68 | >filesystem->normalizePath($path |
91e80 | 2e 44 49 52 45 43 54 4f 52 59 5f 53 45 50 41 52 41 54 4f 52 29 29 29 20 7b 0a 24 74 68 69 73 2d | .DIRECTORY_SEPARATOR))).{.$this- |
91ea0 | 3e 66 69 6c 65 73 79 73 74 65 6d 2d 3e 65 6d 70 74 79 44 69 72 65 63 74 6f 72 79 28 24 70 61 74 | >filesystem->emptyDirectory($pat |
91ec0 | 68 29 3b 0a 7d 0a 0a 64 6f 20 7b 0a 24 74 65 6d 70 6f 72 61 72 79 44 69 72 20 3d 20 24 76 65 6e | h);.}..do.{.$temporaryDir.=.$ven |
91ee0 | 64 6f 72 44 69 72 2e 27 2f 63 6f 6d 70 6f 73 65 72 2f 27 2e 73 75 62 73 74 72 28 6d 64 35 28 75 | dorDir.'/composer/'.substr(md5(u |
91f00 | 6e 69 71 69 64 28 27 27 2c 20 74 72 75 65 29 29 2c 20 30 2c 20 38 29 3b 0a 7d 20 77 68 69 6c 65 | niqid('',.true)),.0,.8);.}.while |
91f20 | 20 28 69 73 5f 64 69 72 28 24 74 65 6d 70 6f 72 61 72 79 44 69 72 29 29 3b 0a 0a 24 74 68 69 73 | .(is_dir($temporaryDir));..$this |
91f40 | 2d 3e 61 64 64 43 6c 65 61 6e 75 70 50 61 74 68 28 24 70 61 63 6b 61 67 65 2c 20 24 74 65 6d 70 | ->addCleanupPath($package,.$temp |
91f60 | 6f 72 61 72 79 44 69 72 29 3b 0a 0a 0a 69 66 20 28 21 69 73 5f 64 69 72 28 24 70 61 74 68 29 20 | oraryDir);...if.(!is_dir($path). |
91f80 | 7c 7c 20 72 65 61 6c 70 61 74 68 28 24 70 61 74 68 29 20 21 3d 3d 20 50 6c 61 74 66 6f 72 6d 3a | ||.realpath($path).!==.Platform: |
91fa0 | 3a 67 65 74 43 77 64 28 29 29 20 7b 0a 24 74 68 69 73 2d 3e 61 64 64 43 6c 65 61 6e 75 70 50 61 | :getCwd()).{.$this->addCleanupPa |
91fc0 | 74 68 28 24 70 61 63 6b 61 67 65 2c 20 24 70 61 74 68 29 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 66 | th($package,.$path);.}..$this->f |
91fe0 | 69 6c 65 73 79 73 74 65 6d 2d 3e 65 6e 73 75 72 65 44 69 72 65 63 74 6f 72 79 45 78 69 73 74 73 | ilesystem->ensureDirectoryExists |
92000 | 28 24 74 65 6d 70 6f 72 61 72 79 44 69 72 29 3b 0a 24 66 69 6c 65 4e 61 6d 65 20 3d 20 24 74 68 | ($temporaryDir);.$fileName.=.$th |
92020 | 69 73 2d 3e 67 65 74 46 69 6c 65 4e 61 6d 65 28 24 70 61 63 6b 61 67 65 2c 20 24 70 61 74 68 29 | is->getFileName($package,.$path) |
92040 | 3b 0a 0a 24 66 69 6c 65 73 79 73 74 65 6d 20 3d 20 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 73 74 | ;..$filesystem.=.$this->filesyst |
92060 | 65 6d 3b 0a 0a 24 63 6c 65 61 6e 75 70 20 3d 20 66 75 6e 63 74 69 6f 6e 20 28 29 20 75 73 65 20 | em;..$cleanup.=.function.().use. |
92080 | 28 24 70 61 74 68 2c 20 24 66 69 6c 65 73 79 73 74 65 6d 2c 20 24 74 65 6d 70 6f 72 61 72 79 44 | ($path,.$filesystem,.$temporaryD |
920a0 | 69 72 2c 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 0a 24 74 68 69 73 2d 3e 63 6c 65 61 72 4c 61 73 | ir,.$package).{..$this->clearLas |
920c0 | 74 43 61 63 68 65 57 72 69 74 65 28 24 70 61 63 6b 61 67 65 29 3b 0a 0a 0a 24 66 69 6c 65 73 79 | tCacheWrite($package);...$filesy |
920e0 | 73 74 65 6d 2d 3e 72 65 6d 6f 76 65 44 69 72 65 63 74 6f 72 79 28 24 74 65 6d 70 6f 72 61 72 79 | stem->removeDirectory($temporary |
92100 | 44 69 72 29 3b 0a 69 66 20 28 69 73 5f 64 69 72 28 24 70 61 74 68 29 20 26 26 20 72 65 61 6c 70 | Dir);.if.(is_dir($path).&&.realp |
92120 | 61 74 68 28 24 70 61 74 68 29 20 21 3d 3d 20 50 6c 61 74 66 6f 72 6d 3a 3a 67 65 74 43 77 64 28 | ath($path).!==.Platform::getCwd( |
92140 | 29 29 20 7b 0a 24 66 69 6c 65 73 79 73 74 65 6d 2d 3e 72 65 6d 6f 76 65 44 69 72 65 63 74 6f 72 | )).{.$filesystem->removeDirector |
92160 | 79 28 24 70 61 74 68 29 3b 0a 7d 0a 24 74 68 69 73 2d 3e 72 65 6d 6f 76 65 43 6c 65 61 6e 75 70 | y($path);.}.$this->removeCleanup |
92180 | 50 61 74 68 28 24 70 61 63 6b 61 67 65 2c 20 24 74 65 6d 70 6f 72 61 72 79 44 69 72 29 3b 0a 24 | Path($package,.$temporaryDir);.$ |
921a0 | 74 68 69 73 2d 3e 72 65 6d 6f 76 65 43 6c 65 61 6e 75 70 50 61 74 68 28 24 70 61 63 6b 61 67 65 | this->removeCleanupPath($package |
921c0 | 2c 20 72 65 61 6c 70 61 74 68 28 24 70 61 74 68 29 29 3b 0a 7d 3b 0a 0a 74 72 79 20 7b 0a 24 70 | ,.realpath($path));.};..try.{.$p |
921e0 | 72 6f 6d 69 73 65 20 3d 20 24 74 68 69 73 2d 3e 65 78 74 72 61 63 74 28 24 70 61 63 6b 61 67 65 | romise.=.$this->extract($package |
92200 | 2c 20 24 66 69 6c 65 4e 61 6d 65 2c 20 24 74 65 6d 70 6f 72 61 72 79 44 69 72 29 3b 0a 7d 20 63 | ,.$fileName,.$temporaryDir);.}.c |
92220 | 61 74 63 68 20 28 5c 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 24 63 6c 65 61 6e 75 70 28 | atch.(\Exception.$e).{.$cleanup( |
92240 | 29 3b 0a 74 68 72 6f 77 20 24 65 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 70 72 6f 6d 69 73 65 2d | );.throw.$e;.}..return.$promise- |
92260 | 3e 74 68 65 6e 28 66 75 6e 63 74 69 6f 6e 20 28 29 20 75 73 65 20 28 24 70 61 63 6b 61 67 65 2c | >then(function.().use.($package, |
92280 | 20 24 66 69 6c 65 73 79 73 74 65 6d 2c 20 24 66 69 6c 65 4e 61 6d 65 2c 20 24 74 65 6d 70 6f 72 | .$filesystem,.$fileName,.$tempor |
922a0 | 61 72 79 44 69 72 2c 20 24 70 61 74 68 29 3a 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 50 | aryDir,.$path):.\React\Promise\P |
922c0 | 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 20 7b 0a 69 66 20 28 66 69 6c 65 5f 65 78 69 73 74 | romiseInterface.{.if.(file_exist |
922e0 | 73 28 24 66 69 6c 65 4e 61 6d 65 29 29 20 7b 0a 24 66 69 6c 65 73 79 73 74 65 6d 2d 3e 75 6e 6c | s($fileName)).{.$filesystem->unl |
92300 | 69 6e 6b 28 24 66 69 6c 65 4e 61 6d 65 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 24 67 65 74 46 6f 6c | ink($fileName);.}........$getFol |
92320 | 64 65 72 43 6f 6e 74 65 6e 74 20 3d 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 64 | derContent.=.static.function.($d |
92340 | 69 72 29 3a 20 61 72 72 61 79 20 7b 0a 24 66 69 6e 64 65 72 20 3d 20 46 69 6e 64 65 72 3a 3a 63 | ir):.array.{.$finder.=.Finder::c |
92360 | 72 65 61 74 65 28 29 0a 2d 3e 69 67 6e 6f 72 65 56 43 53 28 66 61 6c 73 65 29 0a 2d 3e 69 67 6e | reate().->ignoreVCS(false).->ign |
92380 | 6f 72 65 44 6f 74 46 69 6c 65 73 28 66 61 6c 73 65 29 0a 2d 3e 6e 6f 74 4e 61 6d 65 28 27 2e 44 | oreDotFiles(false).->notName('.D |
923a0 | 53 5f 53 74 6f 72 65 27 29 0a 2d 3e 64 65 70 74 68 28 30 29 0a 2d 3e 69 6e 28 24 64 69 72 29 3b | S_Store').->depth(0).->in($dir); |
923c0 | 0a 0a 72 65 74 75 72 6e 20 69 74 65 72 61 74 6f 72 5f 74 6f 5f 61 72 72 61 79 28 24 66 69 6e 64 | ..return.iterator_to_array($find |
923e0 | 65 72 29 3b 0a 7d 3b 0a 24 72 65 6e 61 6d 65 52 65 63 75 72 73 69 76 65 6c 79 20 3d 20 6e 75 6c | er);.};.$renameRecursively.=.nul |
92400 | 6c 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 24 72 65 6e 61 6d 65 52 65 63 75 72 73 69 76 65 6c 79 | l;............$renameRecursively |
92420 | 20 3d 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 66 72 6f 6d 2c 20 24 74 6f 29 20 | .=.static.function.($from,.$to). |
92440 | 75 73 65 20 28 24 66 69 6c 65 73 79 73 74 65 6d 2c 20 24 67 65 74 46 6f 6c 64 65 72 43 6f 6e 74 | use.($filesystem,.$getFolderCont |
92460 | 65 6e 74 2c 20 24 70 61 63 6b 61 67 65 2c 20 26 24 72 65 6e 61 6d 65 52 65 63 75 72 73 69 76 65 | ent,.$package,.&$renameRecursive |
92480 | 6c 79 29 20 7b 0a 24 63 6f 6e 74 65 6e 74 44 69 72 20 3d 20 24 67 65 74 46 6f 6c 64 65 72 43 6f | ly).{.$contentDir.=.$getFolderCo |
924a0 | 6e 74 65 6e 74 28 24 66 72 6f 6d 29 3b 0a 0a 0a 66 6f 72 65 61 63 68 20 28 24 63 6f 6e 74 65 6e | ntent($from);...foreach.($conten |
924c0 | 74 44 69 72 20 61 73 20 24 66 69 6c 65 29 20 7b 0a 24 66 69 6c 65 20 3d 20 28 73 74 72 69 6e 67 | tDir.as.$file).{.$file.=.(string |
924e0 | 29 20 24 66 69 6c 65 3b 0a 69 66 20 28 69 73 5f 64 69 72 28 24 74 6f 20 2e 20 27 2f 27 20 2e 20 | ).$file;.if.(is_dir($to...'/'... |
92500 | 62 61 73 65 6e 61 6d 65 28 24 66 69 6c 65 29 29 29 20 7b 0a 69 66 20 28 21 69 73 5f 64 69 72 28 | basename($file))).{.if.(!is_dir( |
92520 | 24 66 69 6c 65 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 | $file)).{.throw.new.\RuntimeExce |
92540 | 70 74 69 6f 6e 28 27 49 6e 73 74 61 6c 6c 69 6e 67 20 27 2e 24 70 61 63 6b 61 67 65 2e 27 20 77 | ption('Installing.'.$package.'.w |
92560 | 6f 75 6c 64 20 6c 65 61 64 20 74 6f 20 6f 76 65 72 77 72 69 74 69 6e 67 20 74 68 65 20 27 2e 24 | ould.lead.to.overwriting.the.'.$ |
92580 | 74 6f 2e 27 2f 27 2e 62 61 73 65 6e 61 6d 65 28 24 66 69 6c 65 29 2e 27 20 64 69 72 65 63 74 6f | to.'/'.basename($file).'.directo |
925a0 | 72 79 20 77 69 74 68 20 61 20 66 69 6c 65 20 66 72 6f 6d 20 74 68 65 20 70 61 63 6b 61 67 65 2c | ry.with.a.file.from.the.package, |
925c0 | 20 69 6e 76 61 6c 69 64 20 6f 70 65 72 61 74 69 6f 6e 2e 27 29 3b 0a 7d 0a 24 72 65 6e 61 6d 65 | .invalid.operation.');.}.$rename |
925e0 | 52 65 63 75 72 73 69 76 65 6c 79 28 24 66 69 6c 65 2c 20 24 74 6f 20 2e 20 27 2f 27 20 2e 20 62 | Recursively($file,.$to...'/'...b |
92600 | 61 73 65 6e 61 6d 65 28 24 66 69 6c 65 29 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 66 69 6c 65 73 | asename($file));.}.else.{.$files |
92620 | 79 73 74 65 6d 2d 3e 72 65 6e 61 6d 65 28 24 66 69 6c 65 2c 20 24 74 6f 20 2e 20 27 2f 27 20 2e | ystem->rename($file,.$to...'/'.. |
92640 | 20 62 61 73 65 6e 61 6d 65 28 24 66 69 6c 65 29 29 3b 0a 7d 0a 7d 0a 7d 3b 0a 0a 24 72 65 6e 61 | .basename($file));.}.}.};..$rena |
92660 | 6d 65 41 73 4f 6e 65 20 3d 20 66 61 6c 73 65 3b 0a 69 66 20 28 21 66 69 6c 65 5f 65 78 69 73 74 | meAsOne.=.false;.if.(!file_exist |
92680 | 73 28 24 70 61 74 68 29 29 20 7b 0a 24 72 65 6e 61 6d 65 41 73 4f 6e 65 20 3d 20 74 72 75 65 3b | s($path)).{.$renameAsOne.=.true; |
926a0 | 0a 7d 20 65 6c 73 65 69 66 20 28 24 66 69 6c 65 73 79 73 74 65 6d 2d 3e 69 73 44 69 72 45 6d 70 | .}.elseif.($filesystem->isDirEmp |
926c0 | 74 79 28 24 70 61 74 68 29 29 20 7b 0a 74 72 79 20 7b 0a 69 66 20 28 24 66 69 6c 65 73 79 73 74 | ty($path)).{.try.{.if.($filesyst |
926e0 | 65 6d 2d 3e 72 65 6d 6f 76 65 44 69 72 65 63 74 6f 72 79 50 68 70 28 24 70 61 74 68 29 29 20 7b | em->removeDirectoryPhp($path)).{ |
92700 | 0a 24 72 65 6e 61 6d 65 41 73 4f 6e 65 20 3d 20 74 72 75 65 3b 0a 7d 0a 7d 20 63 61 74 63 68 20 | .$renameAsOne.=.true;.}.}.catch. |
92720 | 28 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 0a 7d 0a 7d 0a 0a 24 | (\RuntimeException.$e).{..}.}..$ |
92740 | 63 6f 6e 74 65 6e 74 44 69 72 20 3d 20 24 67 65 74 46 6f 6c 64 65 72 43 6f 6e 74 65 6e 74 28 24 | contentDir.=.$getFolderContent($ |
92760 | 74 65 6d 70 6f 72 61 72 79 44 69 72 29 3b 0a 24 73 69 6e 67 6c 65 44 69 72 41 74 54 6f 70 4c 65 | temporaryDir);.$singleDirAtTopLe |
92780 | 76 65 6c 20 3d 20 31 20 3d 3d 3d 20 63 6f 75 6e 74 28 24 63 6f 6e 74 65 6e 74 44 69 72 29 20 26 | vel.=.1.===.count($contentDir).& |
927a0 | 26 20 69 73 5f 64 69 72 28 28 73 74 72 69 6e 67 29 20 72 65 73 65 74 28 24 63 6f 6e 74 65 6e 74 | &.is_dir((string).reset($content |
927c0 | 44 69 72 29 29 3b 0a 0a 69 66 20 28 24 72 65 6e 61 6d 65 41 73 4f 6e 65 29 20 7b 0a 0a 69 66 20 | Dir));..if.($renameAsOne).{..if. |
927e0 | 28 24 73 69 6e 67 6c 65 44 69 72 41 74 54 6f 70 4c 65 76 65 6c 29 20 7b 0a 24 65 78 74 72 61 63 | ($singleDirAtTopLevel).{.$extrac |
92800 | 74 65 64 44 69 72 20 3d 20 28 73 74 72 69 6e 67 29 20 72 65 73 65 74 28 24 63 6f 6e 74 65 6e 74 | tedDir.=.(string).reset($content |
92820 | 44 69 72 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 65 78 74 72 61 63 74 65 64 44 69 72 20 3d 20 24 | Dir);.}.else.{.$extractedDir.=.$ |
92840 | 74 65 6d 70 6f 72 61 72 79 44 69 72 3b 0a 7d 0a 24 66 69 6c 65 73 79 73 74 65 6d 2d 3e 72 65 6e | temporaryDir;.}.$filesystem->ren |
92860 | 61 6d 65 28 24 65 78 74 72 61 63 74 65 64 44 69 72 2c 20 24 70 61 74 68 29 3b 0a 7d 20 65 6c 73 | ame($extractedDir,.$path);.}.els |
92880 | 65 20 7b 0a 0a 24 66 72 6f 6d 20 3d 20 24 74 65 6d 70 6f 72 61 72 79 44 69 72 3b 0a 69 66 20 28 | e.{..$from.=.$temporaryDir;.if.( |
928a0 | 24 73 69 6e 67 6c 65 44 69 72 41 74 54 6f 70 4c 65 76 65 6c 29 20 7b 0a 24 66 72 6f 6d 20 3d 20 | $singleDirAtTopLevel).{.$from.=. |
928c0 | 28 73 74 72 69 6e 67 29 20 72 65 73 65 74 28 24 63 6f 6e 74 65 6e 74 44 69 72 29 3b 0a 7d 0a 0a | (string).reset($contentDir);.}.. |
928e0 | 24 72 65 6e 61 6d 65 52 65 63 75 72 73 69 76 65 6c 79 28 24 66 72 6f 6d 2c 20 24 70 61 74 68 29 | $renameRecursively($from,.$path) |
92900 | 3b 0a 7d 0a 0a 24 70 72 6f 6d 69 73 65 20 3d 20 24 66 69 6c 65 73 79 73 74 65 6d 2d 3e 72 65 6d | ;.}..$promise.=.$filesystem->rem |
92920 | 6f 76 65 44 69 72 65 63 74 6f 72 79 41 73 79 6e 63 28 24 74 65 6d 70 6f 72 61 72 79 44 69 72 29 | oveDirectoryAsync($temporaryDir) |
92940 | 3b 0a 0a 72 65 74 75 72 6e 20 24 70 72 6f 6d 69 73 65 2d 3e 74 68 65 6e 28 66 75 6e 63 74 69 6f | ;..return.$promise->then(functio |
92960 | 6e 20 28 29 20 75 73 65 20 28 24 70 61 63 6b 61 67 65 2c 20 24 70 61 74 68 2c 20 24 74 65 6d 70 | n.().use.($package,.$path,.$temp |
92980 | 6f 72 61 72 79 44 69 72 29 20 7b 0a 24 74 68 69 73 2d 3e 72 65 6d 6f 76 65 43 6c 65 61 6e 75 70 | oraryDir).{.$this->removeCleanup |
929a0 | 50 61 74 68 28 24 70 61 63 6b 61 67 65 2c 20 24 74 65 6d 70 6f 72 61 72 79 44 69 72 29 3b 0a 24 | Path($package,.$temporaryDir);.$ |
929c0 | 74 68 69 73 2d 3e 72 65 6d 6f 76 65 43 6c 65 61 6e 75 70 50 61 74 68 28 24 70 61 63 6b 61 67 65 | this->removeCleanupPath($package |
929e0 | 2c 20 24 70 61 74 68 29 3b 0a 7d 29 3b 0a 7d 2c 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e | ,.$path);.});.},.static.function |
92a00 | 20 28 24 65 29 20 75 73 65 20 28 24 63 6c 65 61 6e 75 70 29 20 7b 0a 24 63 6c 65 61 6e 75 70 28 | .($e).use.($cleanup).{.$cleanup( |
92a20 | 29 3b 0a 0a 74 68 72 6f 77 20 24 65 3b 0a 7d 29 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 | );..throw.$e;.});.}.....protecte |
92a40 | 64 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 49 6e 73 74 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 41 70 | d.function.getInstallOperationAp |
92a60 | 70 65 6e 64 69 78 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 | pendix(PackageInterface.$package |
92a80 | 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e | ,.string.$path):.string.{.return |
92aa0 | 20 27 3a 20 45 78 74 72 61 63 74 69 6e 67 20 61 72 63 68 69 76 65 27 3b 0a 7d 0a 0a 0a 0a 0a 0a | .':.Extracting.archive';.}...... |
92ac0 | 0a 0a 0a 0a 61 62 73 74 72 61 63 74 20 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 | ....abstract.protected.function. |
92ae0 | 65 78 74 72 61 63 74 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 | extract(PackageInterface.$packag |
92b00 | 65 2c 20 73 74 72 69 6e 67 20 24 66 69 6c 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 29 3a 20 | e,.string.$file,.string.$path):. |
92b20 | 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 3b 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 | PromiseInterface;.}.<?php.declar |
92b40 | 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 | e(strict_types=1);............na |
92b60 | 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 44 6f 77 6e 6c 6f 61 64 65 72 3b 0a 0a 75 73 | mespace.Composer\Downloader;..us |
92b80 | 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 50 61 63 6b 61 67 65 49 6e 74 65 72 66 | e.Composer\Package\PackageInterf |
92ba0 | 61 63 65 3b 0a 0a 0a 0a 0a 0a 0a 69 6e 74 65 72 66 61 63 65 20 43 68 61 6e 67 65 52 65 70 6f 72 | ace;.......interface.ChangeRepor |
92bc0 | 74 49 6e 74 65 72 66 61 63 65 0a 7b 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 | tInterface.{........public.funct |
92be0 | 69 6f 6e 20 67 65 74 4c 6f 63 61 6c 43 68 61 6e 67 65 73 28 50 61 63 6b 61 67 65 49 6e 74 65 72 | ion.getLocalChanges(PackageInter |
92c00 | 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 29 3a 20 3f 73 | face.$package,.string.$path):.?s |
92c20 | 74 72 69 6e 67 3b 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 | tring;.}.<?php.declare(strict_ty |
92c40 | 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d | pes=1);............namespace.Com |
92c60 | 70 6f 73 65 72 5c 44 6f 77 6e 6c 6f 61 64 65 72 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c | poser\Downloader;..use.Composer\ |
92c80 | 50 61 63 6b 61 67 65 5c 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f | Package\PackageInterface;.use.Co |
92ca0 | 6d 70 6f 73 65 72 5c 49 4f 5c 49 4f 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f | mposer\IO\IOInterface;.use.Compo |
92cc0 | 73 65 72 5c 50 63 72 65 5c 50 72 65 67 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c | ser\Pcre\Preg;.use.Composer\Util |
92ce0 | 5c 46 69 6c 65 73 79 73 74 65 6d 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 45 78 63 65 70 74 | \Filesystem;.use.Composer\Except |
92d00 | 69 6f 6e 5c 49 72 72 65 63 6f 76 65 72 61 62 6c 65 44 6f 77 6e 6c 6f 61 64 45 78 63 65 70 74 69 | ion\IrrecoverableDownloadExcepti |
92d20 | 6f 6e 3b 0a 75 73 65 20 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 50 72 6f 6d 69 73 65 49 6e 74 | on;.use.React\Promise\PromiseInt |
92d40 | 65 72 66 61 63 65 3b 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 44 6f 77 6e 6c 6f 61 64 4d 61 6e 61 | erface;.......class.DownloadMana |
92d60 | 67 65 72 0a 7b 0a 0a 70 72 69 76 61 74 65 20 24 69 6f 3b 0a 0a 70 72 69 76 61 74 65 20 24 70 72 | ger.{..private.$io;..private.$pr |
92d80 | 65 66 65 72 44 69 73 74 20 3d 20 66 61 6c 73 65 3b 0a 0a 70 72 69 76 61 74 65 20 24 70 72 65 66 | eferDist.=.false;..private.$pref |
92da0 | 65 72 53 6f 75 72 63 65 3b 0a 0a 70 72 69 76 61 74 65 20 24 70 61 63 6b 61 67 65 50 72 65 66 65 | erSource;..private.$packagePrefe |
92dc0 | 72 65 6e 63 65 73 20 3d 20 5b 5d 3b 0a 0a 70 72 69 76 61 74 65 20 24 66 69 6c 65 73 79 73 74 65 | rences.=.[];..private.$filesyste |
92de0 | 6d 3b 0a 0a 70 72 69 76 61 74 65 20 24 64 6f 77 6e 6c 6f 61 64 65 72 73 20 3d 20 5b 5d 3b 0a 0a | m;..private.$downloaders.=.[];.. |
92e00 | 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 | .......public.function.__constru |
92e20 | 63 74 28 49 4f 49 6e 74 65 72 66 61 63 65 20 24 69 6f 2c 20 62 6f 6f 6c 20 24 70 72 65 66 65 72 | ct(IOInterface.$io,.bool.$prefer |
92e40 | 53 6f 75 72 63 65 20 3d 20 66 61 6c 73 65 2c 20 3f 46 69 6c 65 73 79 73 74 65 6d 20 24 66 69 6c | Source.=.false,.?Filesystem.$fil |
92e60 | 65 73 79 73 74 65 6d 20 3d 20 6e 75 6c 6c 29 0a 7b 0a 24 74 68 69 73 2d 3e 69 6f 20 3d 20 24 69 | esystem.=.null).{.$this->io.=.$i |
92e80 | 6f 3b 0a 24 74 68 69 73 2d 3e 70 72 65 66 65 72 53 6f 75 72 63 65 20 3d 20 24 70 72 65 66 65 72 | o;.$this->preferSource.=.$prefer |
92ea0 | 53 6f 75 72 63 65 3b 0a 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 73 74 65 6d 20 3d 20 24 66 69 6c | Source;.$this->filesystem.=.$fil |
92ec0 | 65 73 79 73 74 65 6d 20 3f 3a 20 6e 65 77 20 46 69 6c 65 73 79 73 74 65 6d 28 29 3b 0a 7d 0a 0a | esystem.?:.new.Filesystem();.}.. |
92ee0 | 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 50 72 65 66 65 72 53 | ......public.function.setPreferS |
92f00 | 6f 75 72 63 65 28 62 6f 6f 6c 20 24 70 72 65 66 65 72 53 6f 75 72 63 65 29 3a 20 73 65 6c 66 0a | ource(bool.$preferSource):.self. |
92f20 | 7b 0a 24 74 68 69 73 2d 3e 70 72 65 66 65 72 53 6f 75 72 63 65 20 3d 20 24 70 72 65 66 65 72 53 | {.$this->preferSource.=.$preferS |
92f40 | 6f 75 72 63 65 3b 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 | ource;..return.$this;.}........p |
92f60 | 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 50 72 65 66 65 72 44 69 73 74 28 62 6f 6f | ublic.function.setPreferDist(boo |
92f80 | 6c 20 24 70 72 65 66 65 72 44 69 73 74 29 3a 20 73 65 6c 66 0a 7b 0a 24 74 68 69 73 2d 3e 70 72 | l.$preferDist):.self.{.$this->pr |
92fa0 | 65 66 65 72 44 69 73 74 20 3d 20 24 70 72 65 66 65 72 44 69 73 74 3b 0a 0a 72 65 74 75 72 6e 20 | eferDist.=.$preferDist;..return. |
92fc0 | 24 74 68 69 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e | $this;.}.........public.function |
92fe0 | 20 73 65 74 50 72 65 66 65 72 65 6e 63 65 73 28 61 72 72 61 79 20 24 70 72 65 66 65 72 65 6e 63 | .setPreferences(array.$preferenc |
93000 | 65 73 29 3a 20 73 65 6c 66 0a 7b 0a 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 50 72 65 66 65 72 | es):.self.{.$this->packagePrefer |
93020 | 65 6e 63 65 73 20 3d 20 24 70 72 65 66 65 72 65 6e 63 65 73 3b 0a 0a 72 65 74 75 72 6e 20 24 74 | ences.=.$preferences;..return.$t |
93040 | 68 69 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 | his;.}.........public.function.s |
93060 | 65 74 44 6f 77 6e 6c 6f 61 64 65 72 28 73 74 72 69 6e 67 20 24 74 79 70 65 2c 20 44 6f 77 6e 6c | etDownloader(string.$type,.Downl |
93080 | 6f 61 64 65 72 49 6e 74 65 72 66 61 63 65 20 24 64 6f 77 6e 6c 6f 61 64 65 72 29 3a 20 73 65 6c | oaderInterface.$downloader):.sel |
930a0 | 66 0a 7b 0a 24 74 79 70 65 20 3d 20 73 74 72 74 6f 6c 6f 77 65 72 28 24 74 79 70 65 29 3b 0a 24 | f.{.$type.=.strtolower($type);.$ |
930c0 | 74 68 69 73 2d 3e 64 6f 77 6e 6c 6f 61 64 65 72 73 5b 24 74 79 70 65 5d 20 3d 20 24 64 6f 77 6e | this->downloaders[$type].=.$down |
930e0 | 6c 6f 61 64 65 72 3b 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a | loader;..return.$this;.}........ |
93100 | 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 44 6f 77 6e 6c 6f 61 64 65 72 28 73 74 | public.function.getDownloader(st |
93120 | 72 69 6e 67 20 24 74 79 70 65 29 3a 20 44 6f 77 6e 6c 6f 61 64 65 72 49 6e 74 65 72 66 61 63 65 | ring.$type):.DownloaderInterface |
93140 | 0a 7b 0a 24 74 79 70 65 20 3d 20 73 74 72 74 6f 6c 6f 77 65 72 28 24 74 79 70 65 29 3b 0a 69 66 | .{.$type.=.strtolower($type);.if |
93160 | 20 28 21 69 73 73 65 74 28 24 74 68 69 73 2d 3e 64 6f 77 6e 6c 6f 61 64 65 72 73 5b 24 74 79 70 | .(!isset($this->downloaders[$typ |
93180 | 65 5d 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e | e])).{.throw.new.\InvalidArgumen |
931a0 | 74 45 78 63 65 70 74 69 6f 6e 28 73 70 72 69 6e 74 66 28 27 55 6e 6b 6e 6f 77 6e 20 64 6f 77 6e | tException(sprintf('Unknown.down |
931c0 | 6c 6f 61 64 65 72 20 74 79 70 65 3a 20 25 73 2e 20 41 76 61 69 6c 61 62 6c 65 20 74 79 70 65 73 | loader.type:.%s..Available.types |
931e0 | 3a 20 25 73 2e 27 2c 20 24 74 79 70 65 2c 20 69 6d 70 6c 6f 64 65 28 27 2c 20 27 2c 20 61 72 72 | :.%s.',.$type,.implode(',.',.arr |
93200 | 61 79 5f 6b 65 79 73 28 24 74 68 69 73 2d 3e 64 6f 77 6e 6c 6f 61 64 65 72 73 29 29 29 29 3b 0a | ay_keys($this->downloaders))));. |
93220 | 7d 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 64 6f 77 6e 6c 6f 61 64 65 72 73 5b 24 74 79 | }..return.$this->downloaders[$ty |
93240 | 70 65 5d 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 | pe];.}..........public.function. |
93260 | 67 65 74 44 6f 77 6e 6c 6f 61 64 65 72 46 6f 72 50 61 63 6b 61 67 65 28 50 61 63 6b 61 67 65 49 | getDownloaderForPackage(PackageI |
93280 | 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 29 3a 20 3f 44 6f 77 6e 6c 6f 61 64 65 72 49 | nterface.$package):.?DownloaderI |
932a0 | 6e 74 65 72 66 61 63 65 0a 7b 0a 24 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 53 6f 75 72 63 65 20 3d | nterface.{.$installationSource.= |
932c0 | 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 53 6f 75 72 63 65 | .$package->getInstallationSource |
932e0 | 28 29 3b 0a 0a 69 66 20 28 27 6d 65 74 61 70 61 63 6b 61 67 65 27 20 3d 3d 3d 20 24 70 61 63 6b | ();..if.('metapackage'.===.$pack |
93300 | 61 67 65 2d 3e 67 65 74 54 79 70 65 28 29 29 20 7b 0a 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0a 7d | age->getType()).{.return.null;.} |
93320 | 0a 0a 69 66 20 28 27 64 69 73 74 27 20 3d 3d 3d 20 24 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 53 6f | ..if.('dist'.===.$installationSo |
93340 | 75 72 63 65 29 20 7b 0a 24 64 6f 77 6e 6c 6f 61 64 65 72 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 | urce).{.$downloader.=.$this->get |
93360 | 44 6f 77 6e 6c 6f 61 64 65 72 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 44 69 73 74 54 79 70 65 | Downloader($package->getDistType |
93380 | 28 29 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 27 73 6f 75 72 63 65 27 20 3d 3d 3d 20 24 69 6e 73 | ());.}.elseif.('source'.===.$ins |
933a0 | 74 61 6c 6c 61 74 69 6f 6e 53 6f 75 72 63 65 29 20 7b 0a 24 64 6f 77 6e 6c 6f 61 64 65 72 20 3d | tallationSource).{.$downloader.= |
933c0 | 20 24 74 68 69 73 2d 3e 67 65 74 44 6f 77 6e 6c 6f 61 64 65 72 28 24 70 61 63 6b 61 67 65 2d 3e | .$this->getDownloader($package-> |
933e0 | 67 65 74 53 6f 75 72 63 65 54 79 70 65 28 29 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 74 68 72 6f 77 | getSourceType());.}.else.{.throw |
93400 | 20 6e 65 77 20 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 0a | .new.\InvalidArgumentException(. |
93420 | 27 50 61 63 6b 61 67 65 20 27 2e 24 70 61 63 6b 61 67 65 2e 27 20 64 6f 65 73 20 6e 6f 74 20 68 | 'Package.'.$package.'.does.not.h |
93440 | 61 76 65 20 61 6e 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 73 6f 75 72 63 65 20 73 65 74 27 0a | ave.an.installation.source.set'. |
93460 | 29 3b 0a 7d 0a 0a 69 66 20 28 24 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 53 6f 75 72 63 65 20 21 3d | );.}..if.($installationSource.!= |
93480 | 3d 20 24 64 6f 77 6e 6c 6f 61 64 65 72 2d 3e 67 65 74 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 53 6f | =.$downloader->getInstallationSo |
934a0 | 75 72 63 65 28 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 4c 6f 67 69 63 45 78 63 65 70 74 | urce()).{.throw.new.\LogicExcept |
934c0 | 69 6f 6e 28 73 70 72 69 6e 74 66 28 0a 27 44 6f 77 6e 6c 6f 61 64 65 72 20 22 25 73 22 20 69 73 | ion(sprintf(.'Downloader."%s".is |
934e0 | 20 61 20 25 73 20 74 79 70 65 20 64 6f 77 6e 6c 6f 61 64 65 72 20 61 6e 64 20 63 61 6e 20 6e 6f | .a.%s.type.downloader.and.can.no |
93500 | 74 20 62 65 20 75 73 65 64 20 74 6f 20 64 6f 77 6e 6c 6f 61 64 20 25 73 20 66 6f 72 20 70 61 63 | t.be.used.to.download.%s.for.pac |
93520 | 6b 61 67 65 20 25 73 27 2c 0a 67 65 74 5f 63 6c 61 73 73 28 24 64 6f 77 6e 6c 6f 61 64 65 72 29 | kage.%s',.get_class($downloader) |
93540 | 2c 0a 24 64 6f 77 6e 6c 6f 61 64 65 72 2d 3e 67 65 74 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 53 6f | ,.$downloader->getInstallationSo |
93560 | 75 72 63 65 28 29 2c 0a 24 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 53 6f 75 72 63 65 2c 0a 24 70 61 | urce(),.$installationSource,.$pa |
93580 | 63 6b 61 67 65 0a 29 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 64 6f 77 6e 6c 6f 61 64 65 72 3b | ckage.));.}..return.$downloader; |
935a0 | 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 44 6f 77 6e 6c 6f 61 64 65 | .}..public.function.getDownloade |
935c0 | 72 54 79 70 65 28 44 6f 77 6e 6c 6f 61 64 65 72 49 6e 74 65 72 66 61 63 65 20 24 64 6f 77 6e 6c | rType(DownloaderInterface.$downl |
935e0 | 6f 61 64 65 72 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 61 72 72 61 79 5f 73 65 | oader):.string.{.return.array_se |
93600 | 61 72 63 68 28 24 64 6f 77 6e 6c 6f 61 64 65 72 2c 20 24 74 68 69 73 2d 3e 64 6f 77 6e 6c 6f 61 | arch($downloader,.$this->downloa |
93620 | 64 65 72 73 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 | ders);.}............public.funct |
93640 | 69 6f 6e 20 64 6f 77 6e 6c 6f 61 64 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 | ion.download(PackageInterface.$p |
93660 | 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 74 61 72 67 65 74 44 69 72 2c 20 3f 50 61 63 6b | ackage,.string.$targetDir,.?Pack |
93680 | 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 72 65 76 50 61 63 6b 61 67 65 20 3d 20 6e 75 6c 6c | ageInterface.$prevPackage.=.null |
936a0 | 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 24 74 61 72 67 65 74 44 69 72 | ):.PromiseInterface.{.$targetDir |
936c0 | 20 3d 20 24 74 68 69 73 2d 3e 6e 6f 72 6d 61 6c 69 7a 65 54 61 72 67 65 74 44 69 72 28 24 74 61 | .=.$this->normalizeTargetDir($ta |
936e0 | 72 67 65 74 44 69 72 29 3b 0a 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 73 74 65 6d 2d 3e 65 6e 73 | rgetDir);.$this->filesystem->ens |
93700 | 75 72 65 44 69 72 65 63 74 6f 72 79 45 78 69 73 74 73 28 64 69 72 6e 61 6d 65 28 24 74 61 72 67 | ureDirectoryExists(dirname($targ |
93720 | 65 74 44 69 72 29 29 3b 0a 0a 24 73 6f 75 72 63 65 73 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 41 | etDir));..$sources.=.$this->getA |
93740 | 76 61 69 6c 61 62 6c 65 53 6f 75 72 63 65 73 28 24 70 61 63 6b 61 67 65 2c 20 24 70 72 65 76 50 | vailableSources($package,.$prevP |
93760 | 61 63 6b 61 67 65 29 3b 0a 0a 24 69 6f 20 3d 20 24 74 68 69 73 2d 3e 69 6f 3b 0a 0a 24 64 6f 77 | ackage);..$io.=.$this->io;..$dow |
93780 | 6e 6c 6f 61 64 20 3d 20 66 75 6e 63 74 69 6f 6e 20 28 24 72 65 74 72 79 20 3d 20 66 61 6c 73 65 | nload.=.function.($retry.=.false |
937a0 | 29 20 75 73 65 20 28 26 24 73 6f 75 72 63 65 73 2c 20 24 69 6f 2c 20 24 70 61 63 6b 61 67 65 2c | ).use.(&$sources,.$io,.$package, |
937c0 | 20 24 74 61 72 67 65 74 44 69 72 2c 20 26 24 64 6f 77 6e 6c 6f 61 64 2c 20 24 70 72 65 76 50 61 | .$targetDir,.&$download,.$prevPa |
937e0 | 63 6b 61 67 65 29 20 7b 0a 24 73 6f 75 72 63 65 20 3d 20 61 72 72 61 79 5f 73 68 69 66 74 28 24 | ckage).{.$source.=.array_shift($ |
93800 | 73 6f 75 72 63 65 73 29 3b 0a 69 66 20 28 24 72 65 74 72 79 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 | sources);.if.($retry).{.$io->wri |
93820 | 74 65 45 72 72 6f 72 28 27 20 20 20 20 3c 77 61 72 6e 69 6e 67 3e 4e 6f 77 20 74 72 79 69 6e 67 | teError('....<warning>Now.trying |
93840 | 20 74 6f 20 64 6f 77 6e 6c 6f 61 64 20 66 72 6f 6d 20 27 20 2e 20 24 73 6f 75 72 63 65 20 2e 20 | .to.download.from.'...$source... |
93860 | 27 3c 2f 77 61 72 6e 69 6e 67 3e 27 29 3b 0a 7d 0a 24 70 61 63 6b 61 67 65 2d 3e 73 65 74 49 6e | '</warning>');.}.$package->setIn |
93880 | 73 74 61 6c 6c 61 74 69 6f 6e 53 6f 75 72 63 65 28 24 73 6f 75 72 63 65 29 3b 0a 0a 24 64 6f 77 | stallationSource($source);..$dow |
938a0 | 6e 6c 6f 61 64 65 72 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 44 6f 77 6e 6c 6f 61 64 65 72 46 6f | nloader.=.$this->getDownloaderFo |
938c0 | 72 50 61 63 6b 61 67 65 28 24 70 61 63 6b 61 67 65 29 3b 0a 69 66 20 28 21 24 64 6f 77 6e 6c 6f | rPackage($package);.if.(!$downlo |
938e0 | 61 64 65 72 29 20 7b 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 | ader).{.return.\React\Promise\re |
93900 | 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a 24 68 61 6e 64 6c 65 45 72 72 6f 72 20 3d 20 73 | solve(null);.}..$handleError.=.s |
93920 | 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 65 29 20 75 73 65 20 28 24 73 6f 75 72 63 65 | tatic.function.($e).use.($source |
93940 | 73 2c 20 24 73 6f 75 72 63 65 2c 20 24 70 61 63 6b 61 67 65 2c 20 24 69 6f 2c 20 24 64 6f 77 6e | s,.$source,.$package,.$io,.$down |
93960 | 6c 6f 61 64 29 20 7b 0a 69 66 20 28 24 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 5c 52 75 6e 74 69 | load).{.if.($e.instanceof.\Runti |
93980 | 6d 65 45 78 63 65 70 74 69 6f 6e 20 26 26 20 21 24 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 49 72 | meException.&&.!$e.instanceof.Ir |
939a0 | 72 65 63 6f 76 65 72 61 62 6c 65 44 6f 77 6e 6c 6f 61 64 45 78 63 65 70 74 69 6f 6e 29 20 7b 0a | recoverableDownloadException).{. |
939c0 | 69 66 20 28 21 24 73 6f 75 72 63 65 73 29 20 7b 0a 74 68 72 6f 77 20 24 65 3b 0a 7d 0a 0a 24 69 | if.(!$sources).{.throw.$e;.}..$i |
939e0 | 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 0a 27 20 20 20 20 3c 77 61 72 6e 69 6e 67 3e 46 61 69 | o->writeError(.'....<warning>Fai |
93a00 | 6c 65 64 20 74 6f 20 64 6f 77 6e 6c 6f 61 64 20 27 2e 0a 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 | led.to.download.'..$package->get |
93a20 | 50 72 65 74 74 79 4e 61 6d 65 28 29 2e 0a 27 20 66 72 6f 6d 20 27 20 2e 20 24 73 6f 75 72 63 65 | PrettyName()..'.from.'...$source |
93a40 | 20 2e 20 27 3a 20 27 2e 0a 24 65 2d 3e 67 65 74 4d 65 73 73 61 67 65 28 29 2e 27 3c 2f 77 61 72 | ...':.'..$e->getMessage().'</war |
93a60 | 6e 69 6e 67 3e 27 0a 29 3b 0a 0a 72 65 74 75 72 6e 20 24 64 6f 77 6e 6c 6f 61 64 28 74 72 75 65 | ning>'.);..return.$download(true |
93a80 | 29 3b 0a 7d 0a 0a 74 68 72 6f 77 20 24 65 3b 0a 7d 3b 0a 0a 74 72 79 20 7b 0a 24 72 65 73 75 6c | );.}..throw.$e;.};..try.{.$resul |
93aa0 | 74 20 3d 20 24 64 6f 77 6e 6c 6f 61 64 65 72 2d 3e 64 6f 77 6e 6c 6f 61 64 28 24 70 61 63 6b 61 | t.=.$downloader->download($packa |
93ac0 | 67 65 2c 20 24 74 61 72 67 65 74 44 69 72 2c 20 24 70 72 65 76 50 61 63 6b 61 67 65 29 3b 0a 7d | ge,.$targetDir,.$prevPackage);.} |
93ae0 | 20 63 61 74 63 68 20 28 5c 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 72 65 74 75 72 6e 20 | .catch.(\Exception.$e).{.return. |
93b00 | 24 68 61 6e 64 6c 65 45 72 72 6f 72 28 24 65 29 3b 0a 7d 0a 0a 24 72 65 73 20 3d 20 24 72 65 73 | $handleError($e);.}..$res.=.$res |
93b20 | 75 6c 74 2d 3e 74 68 65 6e 28 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 72 65 73 29 | ult->then(static.function.($res) |
93b40 | 20 7b 0a 72 65 74 75 72 6e 20 24 72 65 73 3b 0a 7d 2c 20 24 68 61 6e 64 6c 65 45 72 72 6f 72 29 | .{.return.$res;.},.$handleError) |
93b60 | 3b 0a 0a 72 65 74 75 72 6e 20 24 72 65 73 3b 0a 7d 3b 0a 0a 72 65 74 75 72 6e 20 24 64 6f 77 6e | ;..return.$res;.};..return.$down |
93b80 | 6c 6f 61 64 28 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 | load();.}..........public.functi |
93ba0 | 6f 6e 20 70 72 65 70 61 72 65 28 73 74 72 69 6e 67 20 24 74 79 70 65 2c 20 50 61 63 6b 61 67 65 | on.prepare(string.$type,.Package |
93bc0 | 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 74 61 72 67 | Interface.$package,.string.$targ |
93be0 | 65 74 44 69 72 2c 20 3f 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 72 65 76 50 61 | etDir,.?PackageInterface.$prevPa |
93c00 | 63 6b 61 67 65 20 3d 20 6e 75 6c 6c 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a | ckage.=.null):.PromiseInterface. |
93c20 | 7b 0a 24 74 61 72 67 65 74 44 69 72 20 3d 20 24 74 68 69 73 2d 3e 6e 6f 72 6d 61 6c 69 7a 65 54 | {.$targetDir.=.$this->normalizeT |
93c40 | 61 72 67 65 74 44 69 72 28 24 74 61 72 67 65 74 44 69 72 29 3b 0a 24 64 6f 77 6e 6c 6f 61 64 65 | argetDir($targetDir);.$downloade |
93c60 | 72 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 44 6f 77 6e 6c 6f 61 64 65 72 46 6f 72 50 61 63 6b 61 | r.=.$this->getDownloaderForPacka |
93c80 | 67 65 28 24 70 61 63 6b 61 67 65 29 3b 0a 69 66 20 28 24 64 6f 77 6e 6c 6f 61 64 65 72 29 20 7b | ge($package);.if.($downloader).{ |
93ca0 | 0a 72 65 74 75 72 6e 20 24 64 6f 77 6e 6c 6f 61 64 65 72 2d 3e 70 72 65 70 61 72 65 28 24 74 79 | .return.$downloader->prepare($ty |
93cc0 | 70 65 2c 20 24 70 61 63 6b 61 67 65 2c 20 24 74 61 72 67 65 74 44 69 72 2c 20 24 70 72 65 76 50 | pe,.$package,.$targetDir,.$prevP |
93ce0 | 61 63 6b 61 67 65 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 | ackage);.}..return.\React\Promis |
93d00 | 65 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 | e\resolve(null);.}...........pub |
93d20 | 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 6e 73 74 61 6c 6c 28 50 61 63 6b 61 67 65 49 6e 74 65 | lic.function.install(PackageInte |
93d40 | 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 74 61 72 67 65 74 44 69 | rface.$package,.string.$targetDi |
93d60 | 72 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 24 74 61 72 67 65 74 44 69 | r):.PromiseInterface.{.$targetDi |
93d80 | 72 20 3d 20 24 74 68 69 73 2d 3e 6e 6f 72 6d 61 6c 69 7a 65 54 61 72 67 65 74 44 69 72 28 24 74 | r.=.$this->normalizeTargetDir($t |
93da0 | 61 72 67 65 74 44 69 72 29 3b 0a 24 64 6f 77 6e 6c 6f 61 64 65 72 20 3d 20 24 74 68 69 73 2d 3e | argetDir);.$downloader.=.$this-> |
93dc0 | 67 65 74 44 6f 77 6e 6c 6f 61 64 65 72 46 6f 72 50 61 63 6b 61 67 65 28 24 70 61 63 6b 61 67 65 | getDownloaderForPackage($package |
93de0 | 29 3b 0a 69 66 20 28 24 64 6f 77 6e 6c 6f 61 64 65 72 29 20 7b 0a 72 65 74 75 72 6e 20 24 64 6f | );.if.($downloader).{.return.$do |
93e00 | 77 6e 6c 6f 61 64 65 72 2d 3e 69 6e 73 74 61 6c 6c 28 24 70 61 63 6b 61 67 65 2c 20 24 74 61 72 | wnloader->install($package,.$tar |
93e20 | 67 65 74 44 69 72 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 | getDir);.}..return.\React\Promis |
93e40 | 65 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 | e\resolve(null);.}...........pub |
93e60 | 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 75 70 64 61 74 65 28 50 61 63 6b 61 67 65 49 6e 74 65 72 | lic.function.update(PackageInter |
93e80 | 66 61 63 65 20 24 69 6e 69 74 69 61 6c 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 | face.$initial,.PackageInterface. |
93ea0 | 24 74 61 72 67 65 74 2c 20 73 74 72 69 6e 67 20 24 74 61 72 67 65 74 44 69 72 29 3a 20 50 72 6f | $target,.string.$targetDir):.Pro |
93ec0 | 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 24 74 61 72 67 65 74 44 69 72 20 3d 20 24 74 68 | miseInterface.{.$targetDir.=.$th |
93ee0 | 69 73 2d 3e 6e 6f 72 6d 61 6c 69 7a 65 54 61 72 67 65 74 44 69 72 28 24 74 61 72 67 65 74 44 69 | is->normalizeTargetDir($targetDi |
93f00 | 72 29 3b 0a 24 64 6f 77 6e 6c 6f 61 64 65 72 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 44 6f 77 6e | r);.$downloader.=.$this->getDown |
93f20 | 6c 6f 61 64 65 72 46 6f 72 50 61 63 6b 61 67 65 28 24 74 61 72 67 65 74 29 3b 0a 24 69 6e 69 74 | loaderForPackage($target);.$init |
93f40 | 69 61 6c 44 6f 77 6e 6c 6f 61 64 65 72 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 44 6f 77 6e 6c 6f | ialDownloader.=.$this->getDownlo |
93f60 | 61 64 65 72 46 6f 72 50 61 63 6b 61 67 65 28 24 69 6e 69 74 69 61 6c 29 3b 0a 0a 0a 69 66 20 28 | aderForPackage($initial);...if.( |
93f80 | 21 24 69 6e 69 74 69 61 6c 44 6f 77 6e 6c 6f 61 64 65 72 20 26 26 20 21 24 64 6f 77 6e 6c 6f 61 | !$initialDownloader.&&.!$downloa |
93fa0 | 64 65 72 29 20 7b 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 | der).{.return.\React\Promise\res |
93fc0 | 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a 0a 69 66 20 28 21 24 64 6f 77 6e 6c 6f 61 64 65 72 | olve(null);.}...if.(!$downloader |
93fe0 | 29 20 7b 0a 72 65 74 75 72 6e 20 24 69 6e 69 74 69 61 6c 44 6f 77 6e 6c 6f 61 64 65 72 2d 3e 72 | ).{.return.$initialDownloader->r |
94000 | 65 6d 6f 76 65 28 24 69 6e 69 74 69 61 6c 2c 20 24 74 61 72 67 65 74 44 69 72 29 3b 0a 7d 0a 0a | emove($initial,.$targetDir);.}.. |
94020 | 24 69 6e 69 74 69 61 6c 54 79 70 65 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 44 6f 77 6e 6c 6f 61 | $initialType.=.$this->getDownloa |
94040 | 64 65 72 54 79 70 65 28 24 69 6e 69 74 69 61 6c 44 6f 77 6e 6c 6f 61 64 65 72 29 3b 0a 24 74 61 | derType($initialDownloader);.$ta |
94060 | 72 67 65 74 54 79 70 65 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 44 6f 77 6e 6c 6f 61 64 65 72 54 | rgetType.=.$this->getDownloaderT |
94080 | 79 70 65 28 24 64 6f 77 6e 6c 6f 61 64 65 72 29 3b 0a 69 66 20 28 24 69 6e 69 74 69 61 6c 54 79 | ype($downloader);.if.($initialTy |
940a0 | 70 65 20 3d 3d 3d 20 24 74 61 72 67 65 74 54 79 70 65 29 20 7b 0a 74 72 79 20 7b 0a 72 65 74 75 | pe.===.$targetType).{.try.{.retu |
940c0 | 72 6e 20 24 64 6f 77 6e 6c 6f 61 64 65 72 2d 3e 75 70 64 61 74 65 28 24 69 6e 69 74 69 61 6c 2c | rn.$downloader->update($initial, |
940e0 | 20 24 74 61 72 67 65 74 2c 20 24 74 61 72 67 65 74 44 69 72 29 3b 0a 7d 20 63 61 74 63 68 20 28 | .$target,.$targetDir);.}.catch.( |
94100 | 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 69 66 20 28 21 24 74 68 | \RuntimeException.$e).{.if.(!$th |
94120 | 69 73 2d 3e 69 6f 2d 3e 69 73 49 6e 74 65 72 61 63 74 69 76 65 28 29 29 20 7b 0a 74 68 72 6f 77 | is->io->isInteractive()).{.throw |
94140 | 20 24 65 3b 0a 7d 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 65 | .$e;.}.$this->io->writeError('<e |
94160 | 72 72 6f 72 3e 20 20 20 20 55 70 64 61 74 65 20 66 61 69 6c 65 64 20 28 27 2e 24 65 2d 3e 67 65 | rror>....Update.failed.('.$e->ge |
94180 | 74 4d 65 73 73 61 67 65 28 29 2e 27 29 3c 2f 65 72 72 6f 72 3e 27 29 3b 0a 69 66 20 28 21 24 74 | tMessage().')</error>');.if.(!$t |
941a0 | 68 69 73 2d 3e 69 6f 2d 3e 61 73 6b 43 6f 6e 66 69 72 6d 61 74 69 6f 6e 28 27 20 20 20 20 57 6f | his->io->askConfirmation('....Wo |
941c0 | 75 6c 64 20 79 6f 75 20 6c 69 6b 65 20 74 6f 20 74 72 79 20 72 65 69 6e 73 74 61 6c 6c 69 6e 67 | uld.you.like.to.try.reinstalling |
941e0 | 20 74 68 65 20 70 61 63 6b 61 67 65 20 69 6e 73 74 65 61 64 20 5b 3c 63 6f 6d 6d 65 6e 74 3e 79 | .the.package.instead.[<comment>y |
94200 | 65 73 3c 2f 63 6f 6d 6d 65 6e 74 3e 5d 3f 20 27 29 29 20 7b 0a 74 68 72 6f 77 20 24 65 3b 0a 7d | es</comment>]?.')).{.throw.$e;.} |
94220 | 0a 7d 0a 7d 0a 0a 0a 0a 24 70 72 6f 6d 69 73 65 20 3d 20 24 69 6e 69 74 69 61 6c 44 6f 77 6e 6c | .}.}....$promise.=.$initialDownl |
94240 | 6f 61 64 65 72 2d 3e 72 65 6d 6f 76 65 28 24 69 6e 69 74 69 61 6c 2c 20 24 74 61 72 67 65 74 44 | oader->remove($initial,.$targetD |
94260 | 69 72 29 3b 0a 0a 72 65 74 75 72 6e 20 24 70 72 6f 6d 69 73 65 2d 3e 74 68 65 6e 28 66 75 6e 63 | ir);..return.$promise->then(func |
94280 | 74 69 6f 6e 20 28 24 72 65 73 29 20 75 73 65 20 28 24 74 61 72 67 65 74 2c 20 24 74 61 72 67 65 | tion.($res).use.($target,.$targe |
942a0 | 74 44 69 72 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 20 7b 0a 72 65 74 75 72 6e | tDir):.PromiseInterface.{.return |
942c0 | 20 24 74 68 69 73 2d 3e 69 6e 73 74 61 6c 6c 28 24 74 61 72 67 65 74 2c 20 24 74 61 72 67 65 74 | .$this->install($target,.$target |
942e0 | 44 69 72 29 3b 0a 7d 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 | Dir);.});.}........public.functi |
94300 | 6f 6e 20 72 65 6d 6f 76 65 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b | on.remove(PackageInterface.$pack |
94320 | 61 67 65 2c 20 73 74 72 69 6e 67 20 24 74 61 72 67 65 74 44 69 72 29 3a 20 50 72 6f 6d 69 73 65 | age,.string.$targetDir):.Promise |
94340 | 49 6e 74 65 72 66 61 63 65 0a 7b 0a 24 74 61 72 67 65 74 44 69 72 20 3d 20 24 74 68 69 73 2d 3e | Interface.{.$targetDir.=.$this-> |
94360 | 6e 6f 72 6d 61 6c 69 7a 65 54 61 72 67 65 74 44 69 72 28 24 74 61 72 67 65 74 44 69 72 29 3b 0a | normalizeTargetDir($targetDir);. |
94380 | 24 64 6f 77 6e 6c 6f 61 64 65 72 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 44 6f 77 6e 6c 6f 61 64 | $downloader.=.$this->getDownload |
943a0 | 65 72 46 6f 72 50 61 63 6b 61 67 65 28 24 70 61 63 6b 61 67 65 29 3b 0a 69 66 20 28 24 64 6f 77 | erForPackage($package);.if.($dow |
943c0 | 6e 6c 6f 61 64 65 72 29 20 7b 0a 72 65 74 75 72 6e 20 24 64 6f 77 6e 6c 6f 61 64 65 72 2d 3e 72 | nloader).{.return.$downloader->r |
943e0 | 65 6d 6f 76 65 28 24 70 61 63 6b 61 67 65 2c 20 24 74 61 72 67 65 74 44 69 72 29 3b 0a 7d 0a 0a | emove($package,.$targetDir);.}.. |
94400 | 72 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e 75 | return.\React\Promise\resolve(nu |
94420 | 6c 6c 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 | ll);.}..........public.function. |
94440 | 63 6c 65 61 6e 75 70 28 73 74 72 69 6e 67 20 24 74 79 70 65 2c 20 50 61 63 6b 61 67 65 49 6e 74 | cleanup(string.$type,.PackageInt |
94460 | 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 74 61 72 67 65 74 44 | erface.$package,.string.$targetD |
94480 | 69 72 2c 20 3f 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 72 65 76 50 61 63 6b 61 | ir,.?PackageInterface.$prevPacka |
944a0 | 67 65 20 3d 20 6e 75 6c 6c 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 24 | ge.=.null):.PromiseInterface.{.$ |
944c0 | 74 61 72 67 65 74 44 69 72 20 3d 20 24 74 68 69 73 2d 3e 6e 6f 72 6d 61 6c 69 7a 65 54 61 72 67 | targetDir.=.$this->normalizeTarg |
944e0 | 65 74 44 69 72 28 24 74 61 72 67 65 74 44 69 72 29 3b 0a 24 64 6f 77 6e 6c 6f 61 64 65 72 20 3d | etDir($targetDir);.$downloader.= |
94500 | 20 24 74 68 69 73 2d 3e 67 65 74 44 6f 77 6e 6c 6f 61 64 65 72 46 6f 72 50 61 63 6b 61 67 65 28 | .$this->getDownloaderForPackage( |
94520 | 24 70 61 63 6b 61 67 65 29 3b 0a 69 66 20 28 24 64 6f 77 6e 6c 6f 61 64 65 72 29 20 7b 0a 72 65 | $package);.if.($downloader).{.re |
94540 | 74 75 72 6e 20 24 64 6f 77 6e 6c 6f 61 64 65 72 2d 3e 63 6c 65 61 6e 75 70 28 24 74 79 70 65 2c | turn.$downloader->cleanup($type, |
94560 | 20 24 70 61 63 6b 61 67 65 2c 20 24 74 61 72 67 65 74 44 69 72 2c 20 24 70 72 65 76 50 61 63 6b | .$package,.$targetDir,.$prevPack |
94580 | 61 67 65 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 | age);.}..return.\React\Promise\r |
945a0 | 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 | esolve(null);.}.......protected. |
945c0 | 66 75 6e 63 74 69 6f 6e 20 72 65 73 6f 6c 76 65 50 61 63 6b 61 67 65 49 6e 73 74 61 6c 6c 50 72 | function.resolvePackageInstallPr |
945e0 | 65 66 65 72 65 6e 63 65 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 | eference(PackageInterface.$packa |
94600 | 67 65 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 70 61 | ge):.string.{.foreach.($this->pa |
94620 | 63 6b 61 67 65 50 72 65 66 65 72 65 6e 63 65 73 20 61 73 20 24 70 61 74 74 65 72 6e 20 3d 3e 20 | ckagePreferences.as.$pattern.=>. |
94640 | 24 70 72 65 66 65 72 65 6e 63 65 29 20 7b 0a 24 70 61 74 74 65 72 6e 20 3d 20 27 7b 5e 27 2e 73 | $preference).{.$pattern.=.'{^'.s |
94660 | 74 72 5f 72 65 70 6c 61 63 65 28 27 5c 5c 2a 27 2c 20 27 2e 2a 27 2c 20 70 72 65 67 5f 71 75 6f | tr_replace('\\*',.'.*',.preg_quo |
94680 | 74 65 28 24 70 61 74 74 65 72 6e 29 29 2e 27 24 7d 69 27 3b 0a 69 66 20 28 50 72 65 67 3a 3a 69 | te($pattern)).'$}i';.if.(Preg::i |
946a0 | 73 4d 61 74 63 68 28 24 70 61 74 74 65 72 6e 2c 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 | sMatch($pattern,.$package->getNa |
946c0 | 6d 65 28 29 29 29 20 7b 0a 69 66 20 28 27 64 69 73 74 27 20 3d 3d 3d 20 24 70 72 65 66 65 72 65 | me())).{.if.('dist'.===.$prefere |
946e0 | 6e 63 65 20 7c 7c 20 28 21 24 70 61 63 6b 61 67 65 2d 3e 69 73 44 65 76 28 29 20 26 26 20 27 61 | nce.||.(!$package->isDev().&&.'a |
94700 | 75 74 6f 27 20 3d 3d 3d 20 24 70 72 65 66 65 72 65 6e 63 65 29 29 20 7b 0a 72 65 74 75 72 6e 20 | uto'.===.$preference)).{.return. |
94720 | 27 64 69 73 74 27 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 27 73 6f 75 72 63 65 27 3b 0a 7d 0a 7d 0a | 'dist';.}..return.'source';.}.}. |
94740 | 0a 72 65 74 75 72 6e 20 24 70 61 63 6b 61 67 65 2d 3e 69 73 44 65 76 28 29 20 3f 20 27 73 6f 75 | .return.$package->isDev().?.'sou |
94760 | 72 63 65 27 20 3a 20 27 64 69 73 74 27 3b 0a 7d 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 | rce'.:.'dist';.}......private.fu |
94780 | 6e 63 74 69 6f 6e 20 67 65 74 41 76 61 69 6c 61 62 6c 65 53 6f 75 72 63 65 73 28 50 61 63 6b 61 | nction.getAvailableSources(Packa |
947a0 | 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 3f 50 61 63 6b 61 67 65 49 6e | geInterface.$package,.?PackageIn |
947c0 | 74 65 72 66 61 63 65 20 24 70 72 65 76 50 61 63 6b 61 67 65 20 3d 20 6e 75 6c 6c 29 3a 20 61 72 | terface.$prevPackage.=.null):.ar |
947e0 | 72 61 79 0a 7b 0a 24 73 6f 75 72 63 65 54 79 70 65 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 | ray.{.$sourceType.=.$package->ge |
94800 | 74 53 6f 75 72 63 65 54 79 70 65 28 29 3b 0a 24 64 69 73 74 54 79 70 65 20 3d 20 24 70 61 63 6b | tSourceType();.$distType.=.$pack |
94820 | 61 67 65 2d 3e 67 65 74 44 69 73 74 54 79 70 65 28 29 3b 0a 0a 0a 24 73 6f 75 72 63 65 73 20 3d | age->getDistType();...$sources.= |
94840 | 20 5b 5d 3b 0a 69 66 20 28 24 73 6f 75 72 63 65 54 79 70 65 29 20 7b 0a 24 73 6f 75 72 63 65 73 | .[];.if.($sourceType).{.$sources |
94860 | 5b 5d 20 3d 20 27 73 6f 75 72 63 65 27 3b 0a 7d 0a 69 66 20 28 24 64 69 73 74 54 79 70 65 29 20 | [].=.'source';.}.if.($distType). |
94880 | 7b 0a 24 73 6f 75 72 63 65 73 5b 5d 20 3d 20 27 64 69 73 74 27 3b 0a 7d 0a 0a 69 66 20 28 65 6d | {.$sources[].=.'dist';.}..if.(em |
948a0 | 70 74 79 28 24 73 6f 75 72 63 65 73 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e 76 61 | pty($sources)).{.throw.new.\Inva |
948c0 | 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 27 50 61 63 6b 61 67 65 20 27 2e | lidArgumentException('Package.'. |
948e0 | 24 70 61 63 6b 61 67 65 2e 27 20 6d 75 73 74 20 68 61 76 65 20 61 20 73 6f 75 72 63 65 20 6f 72 | $package.'.must.have.a.source.or |
94900 | 20 64 69 73 74 20 73 70 65 63 69 66 69 65 64 27 29 3b 0a 7d 0a 0a 69 66 20 28 0a 24 70 72 65 76 | .dist.specified');.}..if.(.$prev |
94920 | 50 61 63 6b 61 67 65 0a 0a 26 26 20 69 6e 5f 61 72 72 61 79 28 24 70 72 65 76 50 61 63 6b 61 67 | Package..&&.in_array($prevPackag |
94940 | 65 2d 3e 67 65 74 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 53 6f 75 72 63 65 28 29 2c 20 24 73 6f 75 | e->getInstallationSource(),.$sou |
94960 | 72 63 65 73 2c 20 74 72 75 65 29 0a 0a 26 26 20 21 28 21 24 70 72 65 76 50 61 63 6b 61 67 65 2d | rces,.true)..&&.!(!$prevPackage- |
94980 | 3e 69 73 44 65 76 28 29 20 26 26 20 24 70 72 65 76 50 61 63 6b 61 67 65 2d 3e 67 65 74 49 6e 73 | >isDev().&&.$prevPackage->getIns |
949a0 | 74 61 6c 6c 61 74 69 6f 6e 53 6f 75 72 63 65 28 29 20 3d 3d 3d 20 27 64 69 73 74 27 20 26 26 20 | tallationSource().===.'dist'.&&. |
949c0 | 24 70 61 63 6b 61 67 65 2d 3e 69 73 44 65 76 28 29 29 0a 29 20 7b 0a 24 70 72 65 76 53 6f 75 72 | $package->isDev()).).{.$prevSour |
949e0 | 63 65 20 3d 20 24 70 72 65 76 50 61 63 6b 61 67 65 2d 3e 67 65 74 49 6e 73 74 61 6c 6c 61 74 69 | ce.=.$prevPackage->getInstallati |
94a00 | 6f 6e 53 6f 75 72 63 65 28 29 3b 0a 75 73 6f 72 74 28 24 73 6f 75 72 63 65 73 2c 20 73 74 61 74 | onSource();.usort($sources,.stat |
94a20 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 61 2c 20 24 62 29 20 75 73 65 20 28 24 70 72 65 76 53 | ic.function.($a,.$b).use.($prevS |
94a40 | 6f 75 72 63 65 29 3a 20 69 6e 74 20 7b 0a 72 65 74 75 72 6e 20 24 61 20 3d 3d 3d 20 24 70 72 65 | ource):.int.{.return.$a.===.$pre |
94a60 | 76 53 6f 75 72 63 65 20 3f 20 2d 31 20 3a 20 31 3b 0a 7d 29 3b 0a 0a 72 65 74 75 72 6e 20 24 73 | vSource.?.-1.:.1;.});..return.$s |
94a80 | 6f 75 72 63 65 73 3b 0a 7d 0a 0a 0a 69 66 20 28 21 24 74 68 69 73 2d 3e 70 72 65 66 65 72 53 6f | ources;.}...if.(!$this->preferSo |
94aa0 | 75 72 63 65 20 26 26 20 28 24 74 68 69 73 2d 3e 70 72 65 66 65 72 44 69 73 74 20 7c 7c 20 27 64 | urce.&&.($this->preferDist.||.'d |
94ac0 | 69 73 74 27 20 3d 3d 3d 20 24 74 68 69 73 2d 3e 72 65 73 6f 6c 76 65 50 61 63 6b 61 67 65 49 6e | ist'.===.$this->resolvePackageIn |
94ae0 | 73 74 61 6c 6c 50 72 65 66 65 72 65 6e 63 65 28 24 70 61 63 6b 61 67 65 29 29 29 20 7b 0a 24 73 | stallPreference($package))).{.$s |
94b00 | 6f 75 72 63 65 73 20 3d 20 61 72 72 61 79 5f 72 65 76 65 72 73 65 28 24 73 6f 75 72 63 65 73 29 | ources.=.array_reverse($sources) |
94b20 | 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 73 6f 75 72 63 65 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 72 | ;.}..return.$sources;.}.......pr |
94b40 | 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 6e 6f 72 6d 61 6c 69 7a 65 54 61 72 67 65 74 44 69 | ivate.function.normalizeTargetDi |
94b60 | 72 28 73 74 72 69 6e 67 20 24 64 69 72 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 69 66 20 28 24 64 69 | r(string.$dir):.string.{.if.($di |
94b80 | 72 20 3d 3d 3d 20 27 5c 5c 27 20 7c 7c 20 24 64 69 72 20 3d 3d 3d 20 27 2f 27 29 20 7b 0a 72 65 | r.===.'\\'.||.$dir.===.'/').{.re |
94ba0 | 74 75 72 6e 20 24 64 69 72 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 72 74 72 69 6d 28 24 64 69 72 2c | turn.$dir;.}..return.rtrim($dir, |
94bc0 | 20 27 5c 5c 2f 27 29 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 | .'\\/');.}.}.<?php.declare(stric |
94be0 | 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 | t_types=1);............namespace |
94c00 | 20 43 6f 6d 70 6f 73 65 72 5c 44 6f 77 6e 6c 6f 61 64 65 72 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f | .Composer\Downloader;..use.Compo |
94c20 | 73 65 72 5c 50 61 63 6b 61 67 65 5c 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 | ser\Package\PackageInterface;.us |
94c40 | 65 20 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 | e.React\Promise\PromiseInterface |
94c60 | 3b 0a 0a 0a 0a 0a 0a 0a 0a 69 6e 74 65 72 66 61 63 65 20 44 6f 77 6e 6c 6f 61 64 65 72 49 6e 74 | ;........interface.DownloaderInt |
94c80 | 65 72 66 61 63 65 0a 7b 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 | erface.{......public.function.ge |
94ca0 | 74 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 53 6f 75 72 63 65 28 29 3a 20 73 74 72 69 6e 67 3b 0a 0a | tInstallationSource():.string;.. |
94cc0 | 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 64 6f 77 6e 6c 6f 61 64 28 50 61 | .....public.function.download(Pa |
94ce0 | 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 | ckageInterface.$package,.string. |
94d00 | 24 70 61 74 68 2c 20 3f 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 72 65 76 50 61 | $path,.?PackageInterface.$prevPa |
94d20 | 63 6b 61 67 65 20 3d 20 6e 75 6c 6c 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 3b | ckage.=.null):.PromiseInterface; |
94d40 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 70 | ...............public.function.p |
94d60 | 72 65 70 61 72 65 28 73 74 72 69 6e 67 20 24 74 79 70 65 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 | repare(string.$type,.PackageInte |
94d80 | 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 2c 20 3f 50 | rface.$package,.string.$path,.?P |
94da0 | 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 72 65 76 50 61 63 6b 61 67 65 20 3d 20 6e | ackageInterface.$prevPackage.=.n |
94dc0 | 75 6c 6c 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 3b 0a 0a 0a 0a 0a 0a 0a 0a 70 | ull):.PromiseInterface;........p |
94de0 | 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 6e 73 74 61 6c 6c 28 50 61 63 6b 61 67 65 49 6e | ublic.function.install(PackageIn |
94e00 | 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 29 3a | terface.$package,.string.$path): |
94e20 | 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 | .PromiseInterface;.........publi |
94e40 | 63 20 66 75 6e 63 74 69 6f 6e 20 75 70 64 61 74 65 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 | c.function.update(PackageInterfa |
94e60 | 63 65 20 24 69 6e 69 74 69 61 6c 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 74 | ce.$initial,.PackageInterface.$t |
94e80 | 61 72 67 65 74 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 | arget,.string.$path):.PromiseInt |
94ea0 | 65 72 66 61 63 65 3b 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 72 | erface;........public.function.r |
94ec0 | 65 6d 6f 76 65 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c | emove(PackageInterface.$package, |
94ee0 | 20 73 74 72 69 6e 67 20 24 70 61 74 68 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 | .string.$path):.PromiseInterface |
94f00 | 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 63 | ;..............public.function.c |
94f20 | 6c 65 61 6e 75 70 28 73 74 72 69 6e 67 20 24 74 79 70 65 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 | leanup(string.$type,.PackageInte |
94f40 | 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 2c 20 3f 50 | rface.$package,.string.$path,.?P |
94f60 | 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 72 65 76 50 61 63 6b 61 67 65 20 3d 20 6e | ackageInterface.$prevPackage.=.n |
94f80 | 75 6c 6c 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 3b 0a 7d 0a 3c 3f 70 68 70 20 | ull):.PromiseInterface;.}.<?php. |
94fa0 | 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a | declare(strict_types=1);........ |
94fc0 | 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 44 6f 77 6e 6c 6f 61 64 65 | ....namespace.Composer\Downloade |
94fe0 | 72 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 50 61 63 6b 61 67 65 | r;..use.Composer\Package\Package |
95000 | 49 6e 74 65 72 66 61 63 65 3b 0a 0a 0a 0a 0a 0a 0a 69 6e 74 65 72 66 61 63 65 20 44 76 63 73 44 | Interface;.......interface.DvcsD |
95020 | 6f 77 6e 6c 6f 61 64 65 72 49 6e 74 65 72 66 61 63 65 0a 7b 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c | ownloaderInterface.{........publ |
95040 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 55 6e 70 75 73 68 65 64 43 68 61 6e 67 65 73 28 50 | ic.function.getUnpushedChanges(P |
95060 | 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 | ackageInterface.$package,.string |
95080 | 20 24 70 61 74 68 29 3a 20 3f 73 74 72 69 6e 67 3b 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 | .$path):.?string;.}.<?php.declar |
950a0 | 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 | e(strict_types=1);............na |
950c0 | 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 44 6f 77 6e 6c 6f 61 64 65 72 3b 0a 0a 75 73 | mespace.Composer\Downloader;..us |
950e0 | 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 66 69 67 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c | e.Composer\Config;.use.Composer\ |
95100 | 43 61 63 68 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 4f 5c 49 4f 49 6e 74 65 72 66 61 | Cache;.use.Composer\IO\IOInterfa |
95120 | 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 4f 5c 4e 75 6c 6c 49 4f 3b 0a 75 73 65 20 | ce;.use.Composer\IO\NullIO;.use. |
95140 | 43 6f 6d 70 6f 73 65 72 5c 45 78 63 65 70 74 69 6f 6e 5c 49 72 72 65 63 6f 76 65 72 61 62 6c 65 | Composer\Exception\Irrecoverable |
95160 | 44 6f 77 6e 6c 6f 61 64 45 78 63 65 70 74 69 6f 6e 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c | DownloadException;.use.Composer\ |
95180 | 50 61 63 6b 61 67 65 5c 43 6f 6d 70 61 72 65 72 5c 43 6f 6d 70 61 72 65 72 3b 0a 75 73 65 20 43 | Package\Comparer\Comparer;.use.C |
951a0 | 6f 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 5c 4f 70 65 72 61 | omposer\DependencyResolver\Opera |
951c0 | 74 69 6f 6e 5c 55 70 64 61 74 65 4f 70 65 72 61 74 69 6f 6e 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 | tion\UpdateOperation;.use.Compos |
951e0 | 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 5c 4f 70 65 72 61 74 69 6f 6e 5c | er\DependencyResolver\Operation\ |
95200 | 49 6e 73 74 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 44 | InstallOperation;.use.Composer\D |
95220 | 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 5c 4f 70 65 72 61 74 69 6f 6e 5c 55 6e 69 6e | ependencyResolver\Operation\Unin |
95240 | 73 74 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 | stallOperation;.use.Composer\Pac |
95260 | 6b 61 67 65 5c 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f | kage\PackageInterface;.use.Compo |
95280 | 73 65 72 5c 50 6c 75 67 69 6e 5c 50 6c 75 67 69 6e 45 76 65 6e 74 73 3b 0a 75 73 65 20 43 6f 6d | ser\Plugin\PluginEvents;.use.Com |
952a0 | 70 6f 73 65 72 5c 50 6c 75 67 69 6e 5c 50 6f 73 74 46 69 6c 65 44 6f 77 6e 6c 6f 61 64 45 76 65 | poser\Plugin\PostFileDownloadEve |
952c0 | 6e 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 6c 75 67 69 6e 5c 50 72 65 46 69 6c 65 44 | nt;.use.Composer\Plugin\PreFileD |
952e0 | 6f 77 6e 6c 6f 61 64 45 76 65 6e 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 45 76 65 6e 74 | ownloadEvent;.use.Composer\Event |
95300 | 44 69 73 70 61 74 63 68 65 72 5c 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 3b 0a 75 73 65 20 | Dispatcher\EventDispatcher;.use. |
95320 | 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 46 69 6c 65 73 79 73 74 65 6d 3b 0a 75 73 65 20 43 6f | Composer\Util\Filesystem;.use.Co |
95340 | 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 6c 61 74 66 6f 72 6d 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 | mposer\Util\Platform;.use.Compos |
95360 | 65 72 5c 55 74 69 6c 5c 53 69 6c 65 6e 63 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 | er\Util\Silencer;.use.Composer\U |
95380 | 74 69 6c 5c 48 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 | til\HttpDownloader;.use.Composer |
953a0 | 5c 55 74 69 6c 5c 55 72 6c 20 61 73 20 55 72 6c 55 74 69 6c 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 | \Util\Url.as.UrlUtil;.use.Compos |
953c0 | 65 72 5c 55 74 69 6c 5c 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3b 0a 75 73 65 20 52 65 61 | er\Util\ProcessExecutor;.use.Rea |
953e0 | 63 74 5c 50 72 6f 6d 69 73 65 5c 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 3b 0a 0a 0a 0a | ct\Promise\PromiseInterface;.... |
95400 | 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 46 69 6c 65 44 6f 77 6e 6c 6f 61 64 65 72 20 69 6d 70 6c 65 | ......class.FileDownloader.imple |
95420 | 6d 65 6e 74 73 20 44 6f 77 6e 6c 6f 61 64 65 72 49 6e 74 65 72 66 61 63 65 2c 20 43 68 61 6e 67 | ments.DownloaderInterface,.Chang |
95440 | 65 52 65 70 6f 72 74 49 6e 74 65 72 66 61 63 65 0a 7b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 69 | eReportInterface.{..protected.$i |
95460 | 6f 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 63 6f 6e 66 69 67 3b 0a 0a 70 72 6f 74 65 63 74 65 | o;..protected.$config;..protecte |
95480 | 64 20 24 68 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 66 | d.$httpDownloader;..protected.$f |
954a0 | 69 6c 65 73 79 73 74 65 6d 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 63 61 63 68 65 3b 0a 0a 70 | ilesystem;..protected.$cache;..p |
954c0 | 72 6f 74 65 63 74 65 64 20 24 65 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 3b 0a 0a 70 72 6f 74 | rotected.$eventDispatcher;..prot |
954e0 | 65 63 74 65 64 20 24 70 72 6f 63 65 73 73 3b 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 73 74 61 74 | ected.$process;......public.stat |
95500 | 69 63 20 24 64 6f 77 6e 6c 6f 61 64 4d 65 74 61 64 61 74 61 20 3d 20 5b 5d 3b 0a 0a 0a 0a 0a 70 | ic.$downloadMetadata.=.[];.....p |
95520 | 72 69 76 61 74 65 20 24 6c 61 73 74 43 61 63 68 65 57 72 69 74 65 73 20 3d 20 5b 5d 3b 0a 0a 70 | rivate.$lastCacheWrites.=.[];..p |
95540 | 72 69 76 61 74 65 20 24 61 64 64 69 74 69 6f 6e 61 6c 43 6c 65 61 6e 75 70 50 61 74 68 73 20 3d | rivate.$additionalCleanupPaths.= |
95560 | 20 5b 5d 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 | .[];............public.function. |
95580 | 5f 5f 63 6f 6e 73 74 72 75 63 74 28 49 4f 49 6e 74 65 72 66 61 63 65 20 24 69 6f 2c 20 43 6f 6e | __construct(IOInterface.$io,.Con |
955a0 | 66 69 67 20 24 63 6f 6e 66 69 67 2c 20 48 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 20 24 68 74 74 | fig.$config,.HttpDownloader.$htt |
955c0 | 70 44 6f 77 6e 6c 6f 61 64 65 72 2c 20 3f 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 20 24 65 | pDownloader,.?EventDispatcher.$e |
955e0 | 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 20 3d 20 6e 75 6c 6c 2c 20 3f 43 61 63 68 65 20 24 63 | ventDispatcher.=.null,.?Cache.$c |
95600 | 61 63 68 65 20 3d 20 6e 75 6c 6c 2c 20 3f 46 69 6c 65 73 79 73 74 65 6d 20 24 66 69 6c 65 73 79 | ache.=.null,.?Filesystem.$filesy |
95620 | 73 74 65 6d 20 3d 20 6e 75 6c 6c 2c 20 3f 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 20 24 70 | stem.=.null,.?ProcessExecutor.$p |
95640 | 72 6f 63 65 73 73 20 3d 20 6e 75 6c 6c 29 0a 7b 0a 24 74 68 69 73 2d 3e 69 6f 20 3d 20 24 69 6f | rocess.=.null).{.$this->io.=.$io |
95660 | 3b 0a 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 20 3d 20 24 63 6f 6e 66 69 67 3b 0a 24 74 68 69 73 | ;.$this->config.=.$config;.$this |
95680 | 2d 3e 65 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 20 3d 20 24 65 76 65 6e 74 44 69 73 70 61 74 | ->eventDispatcher.=.$eventDispat |
956a0 | 63 68 65 72 3b 0a 24 74 68 69 73 2d 3e 68 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 20 3d 20 24 68 | cher;.$this->httpDownloader.=.$h |
956c0 | 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 3b 0a 24 74 68 69 73 2d 3e 63 61 63 68 65 20 3d 20 24 63 | ttpDownloader;.$this->cache.=.$c |
956e0 | 61 63 68 65 3b 0a 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 20 3d 20 24 70 72 6f 63 65 73 73 20 | ache;.$this->process.=.$process. |
95700 | 3f 3f 20 6e 65 77 20 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 28 24 69 6f 29 3b 0a 24 74 68 | ??.new.ProcessExecutor($io);.$th |
95720 | 69 73 2d 3e 66 69 6c 65 73 79 73 74 65 6d 20 3d 20 24 66 69 6c 65 73 79 73 74 65 6d 20 3f 3a 20 | is->filesystem.=.$filesystem.?:. |
95740 | 6e 65 77 20 46 69 6c 65 73 79 73 74 65 6d 28 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 29 3b 0a | new.Filesystem($this->process);. |
95760 | 0a 69 66 20 28 24 74 68 69 73 2d 3e 63 61 63 68 65 20 26 26 20 24 74 68 69 73 2d 3e 63 61 63 68 | .if.($this->cache.&&.$this->cach |
95780 | 65 2d 3e 67 63 49 73 4e 65 63 65 73 73 61 72 79 28 29 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d | e->gcIsNecessary()).{.$this->io- |
957a0 | 3e 77 72 69 74 65 45 72 72 6f 72 28 27 52 75 6e 6e 69 6e 67 20 63 61 63 68 65 20 67 61 72 62 61 | >writeError('Running.cache.garba |
957c0 | 67 65 20 63 6f 6c 6c 65 63 74 69 6f 6e 27 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 61 63 | ge.collection',.true,.IOInterfac |
957e0 | 65 3a 3a 56 45 52 59 5f 56 45 52 42 4f 53 45 29 3b 0a 24 74 68 69 73 2d 3e 63 61 63 68 65 2d 3e | e::VERY_VERBOSE);.$this->cache-> |
95800 | 67 63 28 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 63 61 63 68 65 2d 66 69 6c 65 73 2d 74 74 6c | gc($config->get('cache-files-ttl |
95820 | 27 29 2c 20 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 63 61 63 68 65 2d 66 69 6c 65 73 2d 6d 61 | '),.$config->get('cache-files-ma |
95840 | 78 73 69 7a 65 27 29 29 3b 0a 7d 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f | xsize'));.}.}.....public.functio |
95860 | 6e 20 67 65 74 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 53 6f 75 72 63 65 28 29 3a 20 73 74 72 69 6e | n.getInstallationSource():.strin |
95880 | 67 0a 7b 0a 72 65 74 75 72 6e 20 27 64 69 73 74 27 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 | g.{.return.'dist';.}.....public. |
958a0 | 66 75 6e 63 74 69 6f 6e 20 64 6f 77 6e 6c 6f 61 64 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 | function.download(PackageInterfa |
958c0 | 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 2c 20 3f 50 61 63 6b | ce.$package,.string.$path,.?Pack |
958e0 | 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 72 65 76 50 61 63 6b 61 67 65 20 3d 20 6e 75 6c 6c | ageInterface.$prevPackage.=.null |
95900 | 2c 20 62 6f 6f 6c 20 24 6f 75 74 70 75 74 20 3d 20 74 72 75 65 29 3a 20 50 72 6f 6d 69 73 65 49 | ,.bool.$output.=.true):.PromiseI |
95920 | 6e 74 65 72 66 61 63 65 0a 7b 0a 69 66 20 28 21 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 44 69 73 | nterface.{.if.(!$package->getDis |
95940 | 74 55 72 6c 28 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 64 41 72 67 75 | tUrl()).{.throw.new.\InvalidArgu |
95960 | 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 27 54 68 65 20 67 69 76 65 6e 20 70 61 63 6b 61 67 65 | mentException('The.given.package |
95980 | 20 69 73 20 6d 69 73 73 69 6e 67 20 75 72 6c 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 27 29 3b 0a 7d | .is.missing.url.information');.} |
959a0 | 0a 0a 24 63 61 63 68 65 4b 65 79 47 65 6e 65 72 61 74 6f 72 20 3d 20 73 74 61 74 69 63 20 66 75 | ..$cacheKeyGenerator.=.static.fu |
959c0 | 6e 63 74 69 6f 6e 20 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 | nction.(PackageInterface.$packag |
959e0 | 65 2c 20 24 6b 65 79 29 3a 20 73 74 72 69 6e 67 20 7b 0a 24 63 61 63 68 65 4b 65 79 20 3d 20 73 | e,.$key):.string.{.$cacheKey.=.s |
95a00 | 68 61 31 28 24 6b 65 79 29 3b 0a 0a 72 65 74 75 72 6e 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 | ha1($key);..return.$package->get |
95a20 | 4e 61 6d 65 28 29 2e 27 2f 27 2e 24 63 61 63 68 65 4b 65 79 2e 27 2e 27 2e 24 70 61 63 6b 61 67 | Name().'/'.$cacheKey.'.'.$packag |
95a40 | 65 2d 3e 67 65 74 44 69 73 74 54 79 70 65 28 29 3b 0a 7d 3b 0a 0a 24 72 65 74 72 69 65 73 20 3d | e->getDistType();.};..$retries.= |
95a60 | 20 33 3b 0a 24 64 69 73 74 55 72 6c 73 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 44 69 73 | .3;.$distUrls.=.$package->getDis |
95a80 | 74 55 72 6c 73 28 29 3b 0a 0a 24 75 72 6c 73 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 | tUrls();..$urls.=.[];.foreach.($ |
95aa0 | 64 69 73 74 55 72 6c 73 20 61 73 20 24 69 6e 64 65 78 20 3d 3e 20 24 75 72 6c 29 20 7b 0a 24 70 | distUrls.as.$index.=>.$url).{.$p |
95ac0 | 72 6f 63 65 73 73 65 64 55 72 6c 20 3d 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 55 72 6c 28 | rocessedUrl.=.$this->processUrl( |
95ae0 | 24 70 61 63 6b 61 67 65 2c 20 24 75 72 6c 29 3b 0a 24 75 72 6c 73 5b 24 69 6e 64 65 78 5d 20 3d | $package,.$url);.$urls[$index].= |
95b00 | 20 5b 0a 27 62 61 73 65 27 20 3d 3e 20 24 75 72 6c 2c 0a 27 70 72 6f 63 65 73 73 65 64 27 20 3d | .[.'base'.=>.$url,.'processed'.= |
95b20 | 3e 20 24 70 72 6f 63 65 73 73 65 64 55 72 6c 2c 0a 0a 0a 0a 0a 27 63 61 63 68 65 4b 65 79 27 20 | >.$processedUrl,.....'cacheKey'. |
95b40 | 3d 3e 20 24 63 61 63 68 65 4b 65 79 47 65 6e 65 72 61 74 6f 72 28 24 70 61 63 6b 61 67 65 2c 20 | =>.$cacheKeyGenerator($package,. |
95b60 | 24 70 72 6f 63 65 73 73 65 64 55 72 6c 29 2c 0a 5d 3b 0a 7d 0a 0a 24 66 69 6c 65 4e 61 6d 65 20 | $processedUrl),.];.}..$fileName. |
95b80 | 3d 20 24 74 68 69 73 2d 3e 67 65 74 46 69 6c 65 4e 61 6d 65 28 24 70 61 63 6b 61 67 65 2c 20 24 | =.$this->getFileName($package,.$ |
95ba0 | 70 61 74 68 29 3b 0a 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 73 74 65 6d 2d 3e 65 6e 73 75 72 65 | path);.$this->filesystem->ensure |
95bc0 | 44 69 72 65 63 74 6f 72 79 45 78 69 73 74 73 28 24 70 61 74 68 29 3b 0a 24 74 68 69 73 2d 3e 66 | DirectoryExists($path);.$this->f |
95be0 | 69 6c 65 73 79 73 74 65 6d 2d 3e 65 6e 73 75 72 65 44 69 72 65 63 74 6f 72 79 45 78 69 73 74 73 | ilesystem->ensureDirectoryExists |
95c00 | 28 64 69 72 6e 61 6d 65 28 24 66 69 6c 65 4e 61 6d 65 29 29 3b 0a 0a 24 69 6f 20 3d 20 24 74 68 | (dirname($fileName));..$io.=.$th |
95c20 | 69 73 2d 3e 69 6f 3b 0a 24 63 61 63 68 65 20 3d 20 24 74 68 69 73 2d 3e 63 61 63 68 65 3b 0a 24 | is->io;.$cache.=.$this->cache;.$ |
95c40 | 68 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 20 3d 20 24 74 68 69 73 2d 3e 68 74 74 70 44 6f 77 6e | httpDownloader.=.$this->httpDown |
95c60 | 6c 6f 61 64 65 72 3b 0a 24 65 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 20 3d 20 24 74 68 69 73 | loader;.$eventDispatcher.=.$this |
95c80 | 2d 3e 65 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 3b 0a 24 66 69 6c 65 73 79 73 74 65 6d 20 3d | ->eventDispatcher;.$filesystem.= |
95ca0 | 20 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 73 74 65 6d 3b 0a 0a 24 61 63 63 65 70 74 20 3d 20 6e | .$this->filesystem;..$accept.=.n |
95cc0 | 75 6c 6c 3b 0a 24 72 65 6a 65 63 74 20 3d 20 6e 75 6c 6c 3b 0a 24 64 6f 77 6e 6c 6f 61 64 20 3d | ull;.$reject.=.null;.$download.= |
95ce0 | 20 66 75 6e 63 74 69 6f 6e 20 28 29 20 75 73 65 20 28 24 69 6f 2c 20 24 6f 75 74 70 75 74 2c 20 | .function.().use.($io,.$output,. |
95d00 | 24 68 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 2c 20 24 63 61 63 68 65 2c 20 24 63 61 63 68 65 4b | $httpDownloader,.$cache,.$cacheK |
95d20 | 65 79 47 65 6e 65 72 61 74 6f 72 2c 20 24 65 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 2c 20 24 | eyGenerator,.$eventDispatcher,.$ |
95d40 | 70 61 63 6b 61 67 65 2c 20 24 66 69 6c 65 4e 61 6d 65 2c 20 26 24 75 72 6c 73 2c 20 26 24 61 63 | package,.$fileName,.&$urls,.&$ac |
95d60 | 63 65 70 74 2c 20 26 24 72 65 6a 65 63 74 29 20 7b 0a 0a 24 75 72 6c 20 3d 20 72 65 73 65 74 28 | cept,.&$reject).{..$url.=.reset( |
95d80 | 24 75 72 6c 73 29 3b 0a 24 69 6e 64 65 78 20 3d 20 6b 65 79 28 24 75 72 6c 73 29 3b 0a 0a 69 66 | $urls);.$index.=.key($urls);..if |
95da0 | 20 28 24 65 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 29 20 7b 0a 24 70 72 65 46 69 6c 65 44 6f | .($eventDispatcher).{.$preFileDo |
95dc0 | 77 6e 6c 6f 61 64 45 76 65 6e 74 20 3d 20 6e 65 77 20 50 72 65 46 69 6c 65 44 6f 77 6e 6c 6f 61 | wnloadEvent.=.new.PreFileDownloa |
95de0 | 64 45 76 65 6e 74 28 50 6c 75 67 69 6e 45 76 65 6e 74 73 3a 3a 50 52 45 5f 46 49 4c 45 5f 44 4f | dEvent(PluginEvents::PRE_FILE_DO |
95e00 | 57 4e 4c 4f 41 44 2c 20 24 68 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 2c 20 24 75 72 6c 5b 27 70 | WNLOAD,.$httpDownloader,.$url['p |
95e20 | 72 6f 63 65 73 73 65 64 27 5d 2c 20 27 70 61 63 6b 61 67 65 27 2c 20 24 70 61 63 6b 61 67 65 29 | rocessed'],.'package',.$package) |
95e40 | 3b 0a 24 65 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 2d 3e 64 69 73 70 61 74 63 68 28 24 70 72 | ;.$eventDispatcher->dispatch($pr |
95e60 | 65 46 69 6c 65 44 6f 77 6e 6c 6f 61 64 45 76 65 6e 74 2d 3e 67 65 74 4e 61 6d 65 28 29 2c 20 24 | eFileDownloadEvent->getName(),.$ |
95e80 | 70 72 65 46 69 6c 65 44 6f 77 6e 6c 6f 61 64 45 76 65 6e 74 29 3b 0a 69 66 20 28 24 70 72 65 46 | preFileDownloadEvent);.if.($preF |
95ea0 | 69 6c 65 44 6f 77 6e 6c 6f 61 64 45 76 65 6e 74 2d 3e 67 65 74 43 75 73 74 6f 6d 43 61 63 68 65 | ileDownloadEvent->getCustomCache |
95ec0 | 4b 65 79 28 29 20 21 3d 3d 20 6e 75 6c 6c 29 20 7b 0a 24 75 72 6c 5b 27 63 61 63 68 65 4b 65 79 | Key().!==.null).{.$url['cacheKey |
95ee0 | 27 5d 20 3d 20 24 63 61 63 68 65 4b 65 79 47 65 6e 65 72 61 74 6f 72 28 24 70 61 63 6b 61 67 65 | '].=.$cacheKeyGenerator($package |
95f00 | 2c 20 24 70 72 65 46 69 6c 65 44 6f 77 6e 6c 6f 61 64 45 76 65 6e 74 2d 3e 67 65 74 43 75 73 74 | ,.$preFileDownloadEvent->getCust |
95f20 | 6f 6d 43 61 63 68 65 4b 65 79 28 29 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 70 72 65 46 69 6c | omCacheKey());.}.elseif.($preFil |
95f40 | 65 44 6f 77 6e 6c 6f 61 64 45 76 65 6e 74 2d 3e 67 65 74 50 72 6f 63 65 73 73 65 64 55 72 6c 28 | eDownloadEvent->getProcessedUrl( |
95f60 | 29 20 21 3d 3d 20 24 75 72 6c 5b 27 70 72 6f 63 65 73 73 65 64 27 5d 29 20 7b 0a 24 75 72 6c 5b | ).!==.$url['processed']).{.$url[ |
95f80 | 27 63 61 63 68 65 4b 65 79 27 5d 20 3d 20 24 63 61 63 68 65 4b 65 79 47 65 6e 65 72 61 74 6f 72 | 'cacheKey'].=.$cacheKeyGenerator |
95fa0 | 28 24 70 61 63 6b 61 67 65 2c 20 24 70 72 65 46 69 6c 65 44 6f 77 6e 6c 6f 61 64 45 76 65 6e 74 | ($package,.$preFileDownloadEvent |
95fc0 | 2d 3e 67 65 74 50 72 6f 63 65 73 73 65 64 55 72 6c 28 29 29 3b 0a 7d 0a 24 75 72 6c 5b 27 70 72 | ->getProcessedUrl());.}.$url['pr |
95fe0 | 6f 63 65 73 73 65 64 27 5d 20 3d 20 24 70 72 65 46 69 6c 65 44 6f 77 6e 6c 6f 61 64 45 76 65 6e | ocessed'].=.$preFileDownloadEven |
96000 | 74 2d 3e 67 65 74 50 72 6f 63 65 73 73 65 64 55 72 6c 28 29 3b 0a 7d 0a 0a 24 75 72 6c 73 5b 24 | t->getProcessedUrl();.}..$urls[$ |
96020 | 69 6e 64 65 78 5d 20 3d 20 24 75 72 6c 3b 0a 0a 24 63 68 65 63 6b 73 75 6d 20 3d 20 24 70 61 63 | index].=.$url;..$checksum.=.$pac |
96040 | 6b 61 67 65 2d 3e 67 65 74 44 69 73 74 53 68 61 31 43 68 65 63 6b 73 75 6d 28 29 3b 0a 24 63 61 | kage->getDistSha1Checksum();.$ca |
96060 | 63 68 65 4b 65 79 20 3d 20 24 75 72 6c 5b 27 63 61 63 68 65 4b 65 79 27 5d 3b 0a 0a 0a 69 66 20 | cheKey.=.$url['cacheKey'];...if. |
96080 | 28 24 63 61 63 68 65 20 26 26 20 28 21 24 63 68 65 63 6b 73 75 6d 20 7c 7c 20 24 63 68 65 63 6b | ($cache.&&.(!$checksum.||.$check |
960a0 | 73 75 6d 20 3d 3d 3d 20 24 63 61 63 68 65 2d 3e 73 68 61 31 28 24 63 61 63 68 65 4b 65 79 29 29 | sum.===.$cache->sha1($cacheKey)) |
960c0 | 20 26 26 20 24 63 61 63 68 65 2d 3e 63 6f 70 79 54 6f 28 24 63 61 63 68 65 4b 65 79 2c 20 24 66 | .&&.$cache->copyTo($cacheKey,.$f |
960e0 | 69 6c 65 4e 61 6d 65 29 29 20 7b 0a 69 66 20 28 24 6f 75 74 70 75 74 29 20 7b 0a 24 69 6f 2d 3e | ileName)).{.if.($output).{.$io-> |
96100 | 77 72 69 74 65 45 72 72 6f 72 28 22 20 20 2d 20 4c 6f 61 64 69 6e 67 20 3c 69 6e 66 6f 3e 22 20 | writeError("..-.Loading.<info>". |
96120 | 2e 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 20 2e 20 22 3c 2f 69 6e 66 6f 3e | ..$package->getName()..."</info> |
96140 | 20 28 3c 63 6f 6d 6d 65 6e 74 3e 22 20 2e 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 46 75 6c 6c | .(<comment>"...$package->getFull |
96160 | 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 20 2e 20 22 3c 2f 63 6f 6d 6d 65 6e 74 3e 29 20 66 | PrettyVersion()..."</comment>).f |
96180 | 72 6f 6d 20 63 61 63 68 65 22 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 3a 3a 56 | rom.cache",.true,.IOInterface::V |
961a0 | 45 52 59 5f 56 45 52 42 4f 53 45 29 3b 0a 7d 0a 0a 0a 0a 69 66 20 28 21 24 63 61 63 68 65 2d 3e | ERY_VERBOSE);.}....if.(!$cache-> |
961c0 | 69 73 52 65 61 64 4f 6e 6c 79 28 29 29 20 7b 0a 24 74 68 69 73 2d 3e 6c 61 73 74 43 61 63 68 65 | isReadOnly()).{.$this->lastCache |
961e0 | 57 72 69 74 65 73 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 20 3d 20 24 63 | Writes[$package->getName()].=.$c |
96200 | 61 63 68 65 4b 65 79 3b 0a 7d 0a 24 72 65 73 75 6c 74 20 3d 20 5c 52 65 61 63 74 5c 50 72 6f 6d | acheKey;.}.$result.=.\React\Prom |
96220 | 69 73 65 5c 72 65 73 6f 6c 76 65 28 24 66 69 6c 65 4e 61 6d 65 29 3b 0a 7d 20 65 6c 73 65 20 7b | ise\resolve($fileName);.}.else.{ |
96240 | 0a 69 66 20 28 24 6f 75 74 70 75 74 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 | .if.($output).{.$io->writeError( |
96260 | 22 20 20 2d 20 44 6f 77 6e 6c 6f 61 64 69 6e 67 20 3c 69 6e 66 6f 3e 22 20 2e 20 24 70 61 63 6b | "..-.Downloading.<info>"...$pack |
96280 | 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 20 2e 20 22 3c 2f 69 6e 66 6f 3e 20 28 3c 63 6f 6d 6d | age->getName()..."</info>.(<comm |
962a0 | 65 6e 74 3e 22 20 2e 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 46 75 6c 6c 50 72 65 74 74 79 56 | ent>"...$package->getFullPrettyV |
962c0 | 65 72 73 69 6f 6e 28 29 20 2e 20 22 3c 2f 63 6f 6d 6d 65 6e 74 3e 29 22 29 3b 0a 7d 0a 0a 24 72 | ersion()..."</comment>)");.}..$r |
962e0 | 65 73 75 6c 74 20 3d 20 24 68 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 2d 3e 61 64 64 43 6f 70 79 | esult.=.$httpDownloader->addCopy |
96300 | 28 24 75 72 6c 5b 27 70 72 6f 63 65 73 73 65 64 27 5d 2c 20 24 66 69 6c 65 4e 61 6d 65 2c 20 24 | ($url['processed'],.$fileName,.$ |
96320 | 70 61 63 6b 61 67 65 2d 3e 67 65 74 54 72 61 6e 73 70 6f 72 74 4f 70 74 69 6f 6e 73 28 29 29 0a | package->getTransportOptions()). |
96340 | 2d 3e 74 68 65 6e 28 24 61 63 63 65 70 74 2c 20 24 72 65 6a 65 63 74 29 3b 0a 7d 0a 0a 72 65 74 | ->then($accept,.$reject);.}..ret |
96360 | 75 72 6e 20 24 72 65 73 75 6c 74 2d 3e 74 68 65 6e 28 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f | urn.$result->then(static.functio |
96380 | 6e 20 28 24 72 65 73 75 6c 74 29 20 75 73 65 20 28 24 66 69 6c 65 4e 61 6d 65 2c 20 24 63 68 65 | n.($result).use.($fileName,.$che |
963a0 | 63 6b 73 75 6d 2c 20 24 75 72 6c 2c 20 24 70 61 63 6b 61 67 65 2c 20 24 65 76 65 6e 74 44 69 73 | cksum,.$url,.$package,.$eventDis |
963c0 | 70 61 74 63 68 65 72 29 3a 20 73 74 72 69 6e 67 20 7b 0a 0a 0a 0a 69 66 20 28 6e 75 6c 6c 20 3d | patcher):.string.{....if.(null.= |
963e0 | 3d 3d 20 24 72 65 73 75 6c 74 29 20 7b 0a 72 65 74 75 72 6e 20 24 66 69 6c 65 4e 61 6d 65 3b 0a | ==.$result).{.return.$fileName;. |
96400 | 7d 0a 0a 69 66 20 28 21 66 69 6c 65 5f 65 78 69 73 74 73 28 24 66 69 6c 65 4e 61 6d 65 29 29 20 | }..if.(!file_exists($fileName)). |
96420 | 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 55 6e 65 78 70 65 63 74 65 64 56 61 6c 75 65 45 78 63 65 | {.throw.new.\UnexpectedValueExce |
96440 | 70 74 69 6f 6e 28 24 75 72 6c 5b 27 62 61 73 65 27 5d 2e 27 20 63 6f 75 6c 64 20 6e 6f 74 20 62 | ption($url['base'].'.could.not.b |
96460 | 65 20 73 61 76 65 64 20 74 6f 20 27 2e 24 66 69 6c 65 4e 61 6d 65 2e 27 2c 20 6d 61 6b 65 20 73 | e.saved.to.'.$fileName.',.make.s |
96480 | 75 72 65 20 74 68 65 27 0a 2e 27 20 64 69 72 65 63 74 6f 72 79 20 69 73 20 77 72 69 74 61 62 6c | ure.the'..'.directory.is.writabl |
964a0 | 65 20 61 6e 64 20 79 6f 75 20 68 61 76 65 20 69 6e 74 65 72 6e 65 74 20 63 6f 6e 6e 65 63 74 69 | e.and.you.have.internet.connecti |
964c0 | 76 69 74 79 27 29 3b 0a 7d 0a 0a 69 66 20 28 24 63 68 65 63 6b 73 75 6d 20 26 26 20 68 61 73 68 | vity');.}..if.($checksum.&&.hash |
964e0 | 5f 66 69 6c 65 28 27 73 68 61 31 27 2c 20 24 66 69 6c 65 4e 61 6d 65 29 20 21 3d 3d 20 24 63 68 | _file('sha1',.$fileName).!==.$ch |
96500 | 65 63 6b 73 75 6d 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 55 6e 65 78 70 65 63 74 65 64 56 | ecksum).{.throw.new.\UnexpectedV |
96520 | 61 6c 75 65 45 78 63 65 70 74 69 6f 6e 28 27 54 68 65 20 63 68 65 63 6b 73 75 6d 20 76 65 72 69 | alueException('The.checksum.veri |
96540 | 66 69 63 61 74 69 6f 6e 20 6f 66 20 74 68 65 20 66 69 6c 65 20 66 61 69 6c 65 64 20 28 64 6f 77 | fication.of.the.file.failed.(dow |
96560 | 6e 6c 6f 61 64 65 64 20 66 72 6f 6d 20 27 2e 24 75 72 6c 5b 27 62 61 73 65 27 5d 2e 27 29 27 29 | nloaded.from.'.$url['base'].')') |
96580 | 3b 0a 7d 0a 0a 69 66 20 28 24 65 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 29 20 7b 0a 24 70 6f | ;.}..if.($eventDispatcher).{.$po |
965a0 | 73 74 46 69 6c 65 44 6f 77 6e 6c 6f 61 64 45 76 65 6e 74 20 3d 20 6e 65 77 20 50 6f 73 74 46 69 | stFileDownloadEvent.=.new.PostFi |
965c0 | 6c 65 44 6f 77 6e 6c 6f 61 64 45 76 65 6e 74 28 50 6c 75 67 69 6e 45 76 65 6e 74 73 3a 3a 50 4f | leDownloadEvent(PluginEvents::PO |
965e0 | 53 54 5f 46 49 4c 45 5f 44 4f 57 4e 4c 4f 41 44 2c 20 24 66 69 6c 65 4e 61 6d 65 2c 20 24 63 68 | ST_FILE_DOWNLOAD,.$fileName,.$ch |
96600 | 65 63 6b 73 75 6d 2c 20 24 75 72 6c 5b 27 70 72 6f 63 65 73 73 65 64 27 5d 2c 20 27 70 61 63 6b | ecksum,.$url['processed'],.'pack |
96620 | 61 67 65 27 2c 20 24 70 61 63 6b 61 67 65 29 3b 0a 24 65 76 65 6e 74 44 69 73 70 61 74 63 68 65 | age',.$package);.$eventDispatche |
96640 | 72 2d 3e 64 69 73 70 61 74 63 68 28 24 70 6f 73 74 46 69 6c 65 44 6f 77 6e 6c 6f 61 64 45 76 65 | r->dispatch($postFileDownloadEve |
96660 | 6e 74 2d 3e 67 65 74 4e 61 6d 65 28 29 2c 20 24 70 6f 73 74 46 69 6c 65 44 6f 77 6e 6c 6f 61 64 | nt->getName(),.$postFileDownload |
96680 | 45 76 65 6e 74 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 66 69 6c 65 4e 61 6d 65 3b 0a 7d 29 3b | Event);.}..return.$fileName;.}); |
966a0 | 0a 7d 3b 0a 0a 24 61 63 63 65 70 74 20 3d 20 66 75 6e 63 74 69 6f 6e 20 28 24 72 65 73 70 6f 6e | .};..$accept.=.function.($respon |
966c0 | 73 65 29 20 75 73 65 20 28 24 63 61 63 68 65 2c 20 24 70 61 63 6b 61 67 65 2c 20 24 66 69 6c 65 | se).use.($cache,.$package,.$file |
966e0 | 4e 61 6d 65 2c 20 26 24 75 72 6c 73 29 3a 20 73 74 72 69 6e 67 20 7b 0a 24 75 72 6c 20 3d 20 72 | Name,.&$urls):.string.{.$url.=.r |
96700 | 65 73 65 74 28 24 75 72 6c 73 29 3b 0a 24 63 61 63 68 65 4b 65 79 20 3d 20 24 75 72 6c 5b 27 63 | eset($urls);.$cacheKey.=.$url['c |
96720 | 61 63 68 65 4b 65 79 27 5d 3b 0a 46 69 6c 65 44 6f 77 6e 6c 6f 61 64 65 72 3a 3a 24 64 6f 77 6e | acheKey'];.FileDownloader::$down |
96740 | 6c 6f 61 64 4d 65 74 61 64 61 74 61 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 | loadMetadata[$package->getName() |
96760 | 5d 20 3d 20 40 66 69 6c 65 73 69 7a 65 28 24 66 69 6c 65 4e 61 6d 65 29 20 3f 3a 20 24 72 65 73 | ].=.@filesize($fileName).?:.$res |
96780 | 70 6f 6e 73 65 2d 3e 67 65 74 48 65 61 64 65 72 28 27 43 6f 6e 74 65 6e 74 2d 4c 65 6e 67 74 68 | ponse->getHeader('Content-Length |
967a0 | 27 29 20 3f 3a 20 27 3f 27 3b 0a 0a 69 66 20 28 24 63 61 63 68 65 20 26 26 20 21 24 63 61 63 68 | ').?:.'?';..if.($cache.&&.!$cach |
967c0 | 65 2d 3e 69 73 52 65 61 64 4f 6e 6c 79 28 29 29 20 7b 0a 24 74 68 69 73 2d 3e 6c 61 73 74 43 61 | e->isReadOnly()).{.$this->lastCa |
967e0 | 63 68 65 57 72 69 74 65 73 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 20 3d | cheWrites[$package->getName()].= |
96800 | 20 24 63 61 63 68 65 4b 65 79 3b 0a 24 63 61 63 68 65 2d 3e 63 6f 70 79 46 72 6f 6d 28 24 63 61 | .$cacheKey;.$cache->copyFrom($ca |
96820 | 63 68 65 4b 65 79 2c 20 24 66 69 6c 65 4e 61 6d 65 29 3b 0a 7d 0a 0a 24 72 65 73 70 6f 6e 73 65 | cheKey,.$fileName);.}..$response |
96840 | 2d 3e 63 6f 6c 6c 65 63 74 28 29 3b 0a 0a 72 65 74 75 72 6e 20 24 66 69 6c 65 4e 61 6d 65 3b 0a | ->collect();..return.$fileName;. |
96860 | 7d 3b 0a 0a 24 72 65 6a 65 63 74 20 3d 20 66 75 6e 63 74 69 6f 6e 20 28 24 65 29 20 75 73 65 20 | };..$reject.=.function.($e).use. |
96880 | 28 24 69 6f 2c 20 26 24 75 72 6c 73 2c 20 24 64 6f 77 6e 6c 6f 61 64 2c 20 24 66 69 6c 65 4e 61 | ($io,.&$urls,.$download,.$fileNa |
968a0 | 6d 65 2c 20 24 70 61 63 6b 61 67 65 2c 20 26 24 72 65 74 72 69 65 73 2c 20 24 66 69 6c 65 73 79 | me,.$package,.&$retries,.$filesy |
968c0 | 73 74 65 6d 29 20 7b 0a 0a 69 66 20 28 66 69 6c 65 5f 65 78 69 73 74 73 28 24 66 69 6c 65 4e 61 | stem).{..if.(file_exists($fileNa |
968e0 | 6d 65 29 29 20 7b 0a 24 66 69 6c 65 73 79 73 74 65 6d 2d 3e 75 6e 6c 69 6e 6b 28 24 66 69 6c 65 | me)).{.$filesystem->unlink($file |
96900 | 4e 61 6d 65 29 3b 0a 7d 0a 24 74 68 69 73 2d 3e 63 6c 65 61 72 4c 61 73 74 43 61 63 68 65 57 72 | Name);.}.$this->clearLastCacheWr |
96920 | 69 74 65 28 24 70 61 63 6b 61 67 65 29 3b 0a 0a 69 66 20 28 24 65 20 69 6e 73 74 61 6e 63 65 6f | ite($package);..if.($e.instanceo |
96940 | 66 20 49 72 72 65 63 6f 76 65 72 61 62 6c 65 44 6f 77 6e 6c 6f 61 64 45 78 63 65 70 74 69 6f 6e | f.IrrecoverableDownloadException |
96960 | 29 20 7b 0a 74 68 72 6f 77 20 24 65 3b 0a 7d 0a 0a 69 66 20 28 24 65 20 69 6e 73 74 61 6e 63 65 | ).{.throw.$e;.}..if.($e.instance |
96980 | 6f 66 20 4d 61 78 46 69 6c 65 53 69 7a 65 45 78 63 65 65 64 65 64 45 78 63 65 70 74 69 6f 6e 29 | of.MaxFileSizeExceededException) |
969a0 | 20 7b 0a 74 68 72 6f 77 20 24 65 3b 0a 7d 0a 0a 69 66 20 28 24 65 20 69 6e 73 74 61 6e 63 65 6f | .{.throw.$e;.}..if.($e.instanceo |
969c0 | 66 20 54 72 61 6e 73 70 6f 72 74 45 78 63 65 70 74 69 6f 6e 29 20 7b 0a 0a 69 66 20 28 28 30 20 | f.TransportException).{..if.((0. |
969e0 | 21 3d 3d 20 24 65 2d 3e 67 65 74 43 6f 64 65 28 29 20 26 26 20 21 69 6e 5f 61 72 72 61 79 28 24 | !==.$e->getCode().&&.!in_array($ |
96a00 | 65 2d 3e 67 65 74 43 6f 64 65 28 29 2c 20 5b 35 30 30 2c 20 35 30 32 2c 20 35 30 33 2c 20 35 30 | e->getCode(),.[500,.502,.503,.50 |
96a20 | 34 5d 29 29 20 7c 7c 20 21 24 72 65 74 72 69 65 73 29 20 7b 0a 24 72 65 74 72 69 65 73 20 3d 20 | 4])).||.!$retries).{.$retries.=. |
96a40 | 30 3b 0a 7d 0a 7d 0a 0a 0a 69 66 20 28 24 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 54 72 61 6e 73 | 0;.}.}...if.($e.instanceof.Trans |
96a60 | 70 6f 72 74 45 78 63 65 70 74 69 6f 6e 20 26 26 20 24 65 2d 3e 67 65 74 53 74 61 74 75 73 43 6f | portException.&&.$e->getStatusCo |
96a80 | 64 65 28 29 20 3d 3d 3d 20 34 39 39 29 20 7b 0a 24 72 65 74 72 69 65 73 20 3d 20 30 3b 0a 24 75 | de().===.499).{.$retries.=.0;.$u |
96aa0 | 72 6c 73 20 3d 20 5b 5d 3b 0a 7d 0a 0a 69 66 20 28 24 72 65 74 72 69 65 73 29 20 7b 0a 75 73 6c | rls.=.[];.}..if.($retries).{.usl |
96ac0 | 65 65 70 28 35 30 30 30 30 30 29 3b 0a 24 72 65 74 72 69 65 73 2d 2d 3b 0a 0a 72 65 74 75 72 6e | eep(500000);.$retries--;..return |
96ae0 | 20 24 64 6f 77 6e 6c 6f 61 64 28 29 3b 0a 7d 0a 0a 61 72 72 61 79 5f 73 68 69 66 74 28 24 75 72 | .$download();.}..array_shift($ur |
96b00 | 6c 73 29 3b 0a 69 66 20 28 24 75 72 6c 73 29 20 7b 0a 69 66 20 28 24 69 6f 2d 3e 69 73 44 65 62 | ls);.if.($urls).{.if.($io->isDeb |
96b20 | 75 67 28 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 20 20 20 20 46 61 69 | ug()).{.$io->writeError('....Fai |
96b40 | 6c 65 64 20 64 6f 77 6e 6c 6f 61 64 69 6e 67 20 27 2e 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e | led.downloading.'.$package->getN |
96b60 | 61 6d 65 28 29 2e 27 3a 20 5b 27 2e 67 65 74 5f 63 6c 61 73 73 28 24 65 29 2e 27 5d 20 27 2e 24 | ame().':.['.get_class($e).'].'.$ |
96b80 | 65 2d 3e 67 65 74 43 6f 64 65 28 29 2e 27 3a 20 27 2e 24 65 2d 3e 67 65 74 4d 65 73 73 61 67 65 | e->getCode().':.'.$e->getMessage |
96ba0 | 28 29 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 20 20 20 20 54 72 79 69 6e 67 | ());.$io->writeError('....Trying |
96bc0 | 20 74 68 65 20 6e 65 78 74 20 55 52 4c 20 66 6f 72 20 27 2e 24 70 61 63 6b 61 67 65 2d 3e 67 65 | .the.next.URL.for.'.$package->ge |
96be0 | 74 4e 61 6d 65 28 29 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 | tName());.}.else.{.$io->writeErr |
96c00 | 6f 72 28 27 20 20 20 20 46 61 69 6c 65 64 20 64 6f 77 6e 6c 6f 61 64 69 6e 67 20 27 2e 24 70 61 | or('....Failed.downloading.'.$pa |
96c20 | 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 2e 27 2c 20 74 72 79 69 6e 67 20 74 68 65 20 6e | ckage->getName().',.trying.the.n |
96c40 | 65 78 74 20 55 52 4c 20 28 27 2e 24 65 2d 3e 67 65 74 43 6f 64 65 28 29 2e 27 3a 20 27 2e 24 65 | ext.URL.('.$e->getCode().':.'.$e |
96c60 | 2d 3e 67 65 74 4d 65 73 73 61 67 65 28 29 2e 27 29 27 29 3b 0a 7d 0a 0a 24 72 65 74 72 69 65 73 | ->getMessage().')');.}..$retries |
96c80 | 20 3d 20 33 3b 0a 75 73 6c 65 65 70 28 31 30 30 30 30 30 29 3b 0a 0a 72 65 74 75 72 6e 20 24 64 | .=.3;.usleep(100000);..return.$d |
96ca0 | 6f 77 6e 6c 6f 61 64 28 29 3b 0a 7d 0a 0a 74 68 72 6f 77 20 24 65 3b 0a 7d 3b 0a 0a 72 65 74 75 | ownload();.}..throw.$e;.};..retu |
96cc0 | 72 6e 20 24 64 6f 77 6e 6c 6f 61 64 28 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e | rn.$download();.}.....public.fun |
96ce0 | 63 74 69 6f 6e 20 70 72 65 70 61 72 65 28 73 74 72 69 6e 67 20 24 74 79 70 65 2c 20 50 61 63 6b | ction.prepare(string.$type,.Pack |
96d00 | 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 70 | ageInterface.$package,.string.$p |
96d20 | 61 74 68 2c 20 3f 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 72 65 76 50 61 63 6b | ath,.?PackageInterface.$prevPack |
96d40 | 61 67 65 20 3d 20 6e 75 6c 6c 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a | age.=.null):.PromiseInterface.{. |
96d60 | 72 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e 75 | return.\React\Promise\resolve(nu |
96d80 | 6c 6c 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 63 6c 65 61 6e | ll);.}.....public.function.clean |
96da0 | 75 70 28 73 74 72 69 6e 67 20 24 74 79 70 65 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 | up(string.$type,.PackageInterfac |
96dc0 | 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 2c 20 3f 50 61 63 6b 61 | e.$package,.string.$path,.?Packa |
96de0 | 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 72 65 76 50 61 63 6b 61 67 65 20 3d 20 6e 75 6c 6c 29 | geInterface.$prevPackage.=.null) |
96e00 | 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 24 66 69 6c 65 4e 61 6d 65 20 3d | :.PromiseInterface.{.$fileName.= |
96e20 | 20 24 74 68 69 73 2d 3e 67 65 74 46 69 6c 65 4e 61 6d 65 28 24 70 61 63 6b 61 67 65 2c 20 24 70 | .$this->getFileName($package,.$p |
96e40 | 61 74 68 29 3b 0a 69 66 20 28 66 69 6c 65 5f 65 78 69 73 74 73 28 24 66 69 6c 65 4e 61 6d 65 29 | ath);.if.(file_exists($fileName) |
96e60 | 29 20 7b 0a 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 73 74 65 6d 2d 3e 75 6e 6c 69 6e 6b 28 24 66 | ).{.$this->filesystem->unlink($f |
96e80 | 69 6c 65 4e 61 6d 65 29 3b 0a 7d 0a 0a 24 64 69 72 73 54 6f 43 6c 65 61 6e 55 70 20 3d 20 5b 0a | ileName);.}..$dirsToCleanUp.=.[. |
96ea0 | 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 76 65 6e 64 6f 72 2d 64 69 72 27 29 | $this->config->get('vendor-dir') |
96ec0 | 2e 27 2f 63 6f 6d 70 6f 73 65 72 2f 27 2c 0a 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 2d 3e 67 65 | .'/composer/',.$this->config->ge |
96ee0 | 74 28 27 76 65 6e 64 6f 72 2d 64 69 72 27 29 2c 0a 24 70 61 74 68 2c 0a 5d 3b 0a 0a 69 66 20 28 | t('vendor-dir'),.$path,.];..if.( |
96f00 | 69 73 73 65 74 28 24 74 68 69 73 2d 3e 61 64 64 69 74 69 6f 6e 61 6c 43 6c 65 61 6e 75 70 50 61 | isset($this->additionalCleanupPa |
96f20 | 74 68 73 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 29 29 20 7b 0a 66 6f 72 | ths[$package->getName()])).{.for |
96f40 | 65 61 63 68 20 28 24 74 68 69 73 2d 3e 61 64 64 69 74 69 6f 6e 61 6c 43 6c 65 61 6e 75 70 50 61 | each.($this->additionalCleanupPa |
96f60 | 74 68 73 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 20 61 73 20 24 70 61 74 | ths[$package->getName()].as.$pat |
96f80 | 68 29 20 7b 0a 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 73 74 65 6d 2d 3e 72 65 6d 6f 76 65 28 24 | h).{.$this->filesystem->remove($ |
96fa0 | 70 61 74 68 29 3b 0a 7d 0a 7d 0a 0a 66 6f 72 65 61 63 68 20 28 24 64 69 72 73 54 6f 43 6c 65 61 | path);.}.}..foreach.($dirsToClea |
96fc0 | 6e 55 70 20 61 73 20 24 64 69 72 29 20 7b 0a 69 66 20 28 69 73 5f 64 69 72 28 24 64 69 72 29 20 | nUp.as.$dir).{.if.(is_dir($dir). |
96fe0 | 26 26 20 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 73 74 65 6d 2d 3e 69 73 44 69 72 45 6d 70 74 79 | &&.$this->filesystem->isDirEmpty |
97000 | 28 24 64 69 72 29 20 26 26 20 72 65 61 6c 70 61 74 68 28 24 64 69 72 29 20 21 3d 3d 20 50 6c 61 | ($dir).&&.realpath($dir).!==.Pla |
97020 | 74 66 6f 72 6d 3a 3a 67 65 74 43 77 64 28 29 29 20 7b 0a 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 | tform::getCwd()).{.$this->filesy |
97040 | 73 74 65 6d 2d 3e 72 65 6d 6f 76 65 44 69 72 65 63 74 6f 72 79 50 68 70 28 24 64 69 72 29 3b 0a | stem->removeDirectoryPhp($dir);. |
97060 | 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c | }.}..return.\React\Promise\resol |
97080 | 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 | ve(null);.}.....public.function. |
970a0 | 69 6e 73 74 61 6c 6c 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 | install(PackageInterface.$packag |
970c0 | 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 2c 20 62 6f 6f 6c 20 24 6f 75 74 70 75 74 20 3d 20 | e,.string.$path,.bool.$output.=. |
970e0 | 74 72 75 65 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 69 66 20 28 24 6f | true):.PromiseInterface.{.if.($o |
97100 | 75 74 70 75 74 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 22 | utput).{.$this->io->writeError(" |
97120 | 20 20 2d 20 22 20 2e 20 49 6e 73 74 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 3a 3a 66 6f 72 6d 61 74 | ..-."...InstallOperation::format |
97140 | 28 24 70 61 63 6b 61 67 65 29 29 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 73 74 65 | ($package));.}..$this->filesyste |
97160 | 6d 2d 3e 65 6d 70 74 79 44 69 72 65 63 74 6f 72 79 28 24 70 61 74 68 29 3b 0a 24 74 68 69 73 2d | m->emptyDirectory($path);.$this- |
97180 | 3e 66 69 6c 65 73 79 73 74 65 6d 2d 3e 65 6e 73 75 72 65 44 69 72 65 63 74 6f 72 79 45 78 69 73 | >filesystem->ensureDirectoryExis |
971a0 | 74 73 28 24 70 61 74 68 29 3b 0a 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 73 74 65 6d 2d 3e 72 65 | ts($path);.$this->filesystem->re |
971c0 | 6e 61 6d 65 28 24 74 68 69 73 2d 3e 67 65 74 46 69 6c 65 4e 61 6d 65 28 24 70 61 63 6b 61 67 65 | name($this->getFileName($package |
971e0 | 2c 20 24 70 61 74 68 29 2c 20 24 70 61 74 68 20 2e 20 27 2f 27 20 2e 20 70 61 74 68 69 6e 66 6f | ,.$path),.$path...'/'...pathinfo |
97200 | 28 70 61 72 73 65 5f 75 72 6c 28 73 74 72 74 72 28 28 73 74 72 69 6e 67 29 20 24 70 61 63 6b 61 | (parse_url(strtr((string).$packa |
97220 | 67 65 2d 3e 67 65 74 44 69 73 74 55 72 6c 28 29 2c 20 27 5c 5c 27 2c 20 27 2f 27 29 2c 20 50 48 | ge->getDistUrl(),.'\\',.'/'),.PH |
97240 | 50 5f 55 52 4c 5f 50 41 54 48 29 2c 20 50 41 54 48 49 4e 46 4f 5f 42 41 53 45 4e 41 4d 45 29 29 | P_URL_PATH),.PATHINFO_BASENAME)) |
97260 | 3b 0a 0a 69 66 20 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 42 69 6e 61 72 69 65 73 28 29 29 20 | ;..if.($package->getBinaries()). |
97280 | 7b 0a 0a 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 42 69 6e 61 72 69 | {...foreach.($package->getBinari |
972a0 | 65 73 28 29 20 61 73 20 24 62 69 6e 29 20 7b 0a 69 66 20 28 66 69 6c 65 5f 65 78 69 73 74 73 28 | es().as.$bin).{.if.(file_exists( |
972c0 | 24 70 61 74 68 20 2e 20 27 2f 27 20 2e 20 24 62 69 6e 29 20 26 26 20 21 69 73 5f 65 78 65 63 75 | $path...'/'...$bin).&&.!is_execu |
972e0 | 74 61 62 6c 65 28 24 70 61 74 68 20 2e 20 27 2f 27 20 2e 20 24 62 69 6e 29 29 20 7b 0a 53 69 6c | table($path...'/'...$bin)).{.Sil |
97300 | 65 6e 63 65 72 3a 3a 63 61 6c 6c 28 27 63 68 6d 6f 64 27 2c 20 24 70 61 74 68 20 2e 20 27 2f 27 | encer::call('chmod',.$path...'/' |
97320 | 20 2e 20 24 62 69 6e 2c 20 30 37 37 37 20 26 20 7e 75 6d 61 73 6b 28 29 29 3b 0a 7d 0a 7d 0a 7d | ...$bin,.0777.&.~umask());.}.}.} |
97340 | 0a 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 | ..return.\React\Promise\resolve( |
97360 | 6e 75 6c 6c 29 3b 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 63 6c 65 | null);.}..protected.function.cle |
97380 | 61 72 4c 61 73 74 43 61 63 68 65 57 72 69 74 65 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 | arLastCacheWrite(PackageInterfac |
973a0 | 65 20 24 70 61 63 6b 61 67 65 29 3a 20 76 6f 69 64 0a 7b 0a 69 66 20 28 24 74 68 69 73 2d 3e 63 | e.$package):.void.{.if.($this->c |
973c0 | 61 63 68 65 20 26 26 20 69 73 73 65 74 28 24 74 68 69 73 2d 3e 6c 61 73 74 43 61 63 68 65 57 72 | ache.&&.isset($this->lastCacheWr |
973e0 | 69 74 65 73 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 29 29 20 7b 0a 24 74 | ites[$package->getName()])).{.$t |
97400 | 68 69 73 2d 3e 63 61 63 68 65 2d 3e 72 65 6d 6f 76 65 28 24 74 68 69 73 2d 3e 6c 61 73 74 43 61 | his->cache->remove($this->lastCa |
97420 | 63 68 65 57 72 69 74 65 73 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 29 3b | cheWrites[$package->getName()]); |
97440 | 0a 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 6c 61 73 74 43 61 63 68 65 57 72 69 74 65 73 5b 24 70 | .unset($this->lastCacheWrites[$p |
97460 | 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 29 3b 0a 7d 0a 7d 0a 0a 70 72 6f 74 65 63 | ackage->getName()]);.}.}..protec |
97480 | 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 61 64 64 43 6c 65 61 6e 75 70 50 61 74 68 28 50 61 63 6b | ted.function.addCleanupPath(Pack |
974a0 | 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 70 | ageInterface.$package,.string.$p |
974c0 | 61 74 68 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 61 64 64 69 74 69 6f 6e 61 6c 43 6c | ath):.void.{.$this->additionalCl |
974e0 | 65 61 6e 75 70 50 61 74 68 73 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 5b | eanupPaths[$package->getName()][ |
97500 | 5d 20 3d 20 24 70 61 74 68 3b 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e | ].=.$path;.}..protected.function |
97520 | 20 72 65 6d 6f 76 65 43 6c 65 61 6e 75 70 50 61 74 68 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 | .removeCleanupPath(PackageInterf |
97540 | 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 29 3a 20 76 6f 69 | ace.$package,.string.$path):.voi |
97560 | 64 0a 7b 0a 69 66 20 28 69 73 73 65 74 28 24 74 68 69 73 2d 3e 61 64 64 69 74 69 6f 6e 61 6c 43 | d.{.if.(isset($this->additionalC |
97580 | 6c 65 61 6e 75 70 50 61 74 68 73 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 5d | leanupPaths[$package->getName()] |
975a0 | 29 29 20 7b 0a 24 69 64 78 20 3d 20 61 72 72 61 79 5f 73 65 61 72 63 68 28 24 70 61 74 68 2c 20 | )).{.$idx.=.array_search($path,. |
975c0 | 24 74 68 69 73 2d 3e 61 64 64 69 74 69 6f 6e 61 6c 43 6c 65 61 6e 75 70 50 61 74 68 73 5b 24 70 | $this->additionalCleanupPaths[$p |
975e0 | 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 29 3b 0a 69 66 20 28 66 61 6c 73 65 20 21 | ackage->getName()]);.if.(false.! |
97600 | 3d 3d 20 24 69 64 78 29 20 7b 0a 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 61 64 64 69 74 69 6f 6e | ==.$idx).{.unset($this->addition |
97620 | 61 6c 43 6c 65 61 6e 75 70 50 61 74 68 73 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 | alCleanupPaths[$package->getName |
97640 | 28 29 5d 5b 24 69 64 78 5d 29 3b 0a 7d 0a 7d 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e | ()][$idx]);.}.}.}.....public.fun |
97660 | 63 74 69 6f 6e 20 75 70 64 61 74 65 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 69 | ction.update(PackageInterface.$i |
97680 | 6e 69 74 69 61 6c 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 74 61 72 67 65 74 | nitial,.PackageInterface.$target |
976a0 | 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 | ,.string.$path):.PromiseInterfac |
976c0 | 65 0a 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 22 20 20 2d 20 22 | e.{.$this->io->writeError("..-." |
976e0 | 20 2e 20 55 70 64 61 74 65 4f 70 65 72 61 74 69 6f 6e 3a 3a 66 6f 72 6d 61 74 28 24 69 6e 69 74 | ...UpdateOperation::format($init |
97700 | 69 61 6c 2c 20 24 74 61 72 67 65 74 29 20 2e 20 24 74 68 69 73 2d 3e 67 65 74 49 6e 73 74 61 6c | ial,.$target)...$this->getInstal |
97720 | 6c 4f 70 65 72 61 74 69 6f 6e 41 70 70 65 6e 64 69 78 28 24 74 61 72 67 65 74 2c 20 24 70 61 74 | lOperationAppendix($target,.$pat |
97740 | 68 29 29 3b 0a 0a 24 70 72 6f 6d 69 73 65 20 3d 20 24 74 68 69 73 2d 3e 72 65 6d 6f 76 65 28 24 | h));..$promise.=.$this->remove($ |
97760 | 69 6e 69 74 69 61 6c 2c 20 24 70 61 74 68 2c 20 66 61 6c 73 65 29 3b 0a 0a 72 65 74 75 72 6e 20 | initial,.$path,.false);..return. |
97780 | 24 70 72 6f 6d 69 73 65 2d 3e 74 68 65 6e 28 66 75 6e 63 74 69 6f 6e 20 28 29 20 75 73 65 20 28 | $promise->then(function.().use.( |
977a0 | 24 74 61 72 67 65 74 2c 20 24 70 61 74 68 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 | $target,.$path):.PromiseInterfac |
977c0 | 65 20 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 69 6e 73 74 61 6c 6c 28 24 74 61 72 67 65 | e.{.return.$this->install($targe |
977e0 | 74 2c 20 24 70 61 74 68 2c 20 66 61 6c 73 65 29 3b 0a 7d 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c | t,.$path,.false);.});.}.....publ |
97800 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 72 65 6d 6f 76 65 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 | ic.function.remove(PackageInterf |
97820 | 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 2c 20 62 6f 6f 6c | ace.$package,.string.$path,.bool |
97840 | 20 24 6f 75 74 70 75 74 20 3d 20 74 72 75 65 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 | .$output.=.true):.PromiseInterfa |
97860 | 63 65 0a 7b 0a 69 66 20 28 24 6f 75 74 70 75 74 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 | ce.{.if.($output).{.$this->io->w |
97880 | 72 69 74 65 45 72 72 6f 72 28 22 20 20 2d 20 22 20 2e 20 55 6e 69 6e 73 74 61 6c 6c 4f 70 65 72 | riteError("..-."...UninstallOper |
978a0 | 61 74 69 6f 6e 3a 3a 66 6f 72 6d 61 74 28 24 70 61 63 6b 61 67 65 29 29 3b 0a 7d 0a 24 70 72 6f | ation::format($package));.}.$pro |
978c0 | 6d 69 73 65 20 3d 20 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 73 74 65 6d 2d 3e 72 65 6d 6f 76 65 | mise.=.$this->filesystem->remove |
978e0 | 44 69 72 65 63 74 6f 72 79 41 73 79 6e 63 28 24 70 61 74 68 29 3b 0a 0a 72 65 74 75 72 6e 20 24 | DirectoryAsync($path);..return.$ |
97900 | 70 72 6f 6d 69 73 65 2d 3e 74 68 65 6e 28 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 | promise->then(static.function.($ |
97920 | 72 65 73 75 6c 74 29 20 75 73 65 20 28 24 70 61 74 68 29 3a 20 76 6f 69 64 20 7b 0a 69 66 20 28 | result).use.($path):.void.{.if.( |
97940 | 21 24 72 65 73 75 6c 74 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 | !$result).{.throw.new.\RuntimeEx |
97960 | 63 65 70 74 69 6f 6e 28 27 43 6f 75 6c 64 20 6e 6f 74 20 63 6f 6d 70 6c 65 74 65 6c 79 20 64 65 | ception('Could.not.completely.de |
97980 | 6c 65 74 65 20 27 2e 24 70 61 74 68 2e 27 2c 20 61 62 6f 72 74 69 6e 67 2e 27 29 3b 0a 7d 0a 7d | lete.'.$path.',.aborting.');.}.} |
979a0 | 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 | );.}.........protected.function. |
979c0 | 67 65 74 46 69 6c 65 4e 61 6d 65 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 | getFileName(PackageInterface.$pa |
979e0 | 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 | ckage,.string.$path):.string.{.r |
97a00 | 65 74 75 72 6e 20 72 74 72 69 6d 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 | eturn.rtrim($this->config->get(' |
97a20 | 76 65 6e 64 6f 72 2d 64 69 72 27 29 2e 27 2f 63 6f 6d 70 6f 73 65 72 2f 74 6d 70 2d 27 2e 6d 64 | vendor-dir').'/composer/tmp-'.md |
97a40 | 35 28 24 70 61 63 6b 61 67 65 2e 73 70 6c 5f 6f 62 6a 65 63 74 5f 68 61 73 68 28 24 70 61 63 6b | 5($package.spl_object_hash($pack |
97a60 | 61 67 65 29 29 2e 27 2e 27 2e 70 61 74 68 69 6e 66 6f 28 70 61 72 73 65 5f 75 72 6c 28 73 74 72 | age)).'.'.pathinfo(parse_url(str |
97a80 | 74 72 28 28 73 74 72 69 6e 67 29 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 44 69 73 74 55 72 6c | tr((string).$package->getDistUrl |
97aa0 | 28 29 2c 20 27 5c 5c 27 2c 20 27 2f 27 29 2c 20 50 48 50 5f 55 52 4c 5f 50 41 54 48 29 2c 20 50 | (),.'\\',.'/'),.PHP_URL_PATH),.P |
97ac0 | 41 54 48 49 4e 46 4f 5f 45 58 54 45 4e 53 49 4f 4e 29 2c 20 27 2e 27 29 3b 0a 7d 0a 0a 0a 0a 0a | ATHINFO_EXTENSION),.'.');.}..... |
97ae0 | 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 49 6e 73 74 61 6c 6c | ...protected.function.getInstall |
97b00 | 4f 70 65 72 61 74 69 6f 6e 41 70 70 65 6e 64 69 78 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 | OperationAppendix(PackageInterfa |
97b20 | 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 29 3a 20 73 74 72 69 | ce.$package,.string.$path):.stri |
97b40 | 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 27 27 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 | ng.{.return.'';.}..........prote |
97b60 | 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 70 72 6f 63 65 73 73 55 72 6c 28 50 61 63 6b 61 67 65 | cted.function.processUrl(Package |
97b80 | 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 75 72 6c 29 | Interface.$package,.string.$url) |
97ba0 | 3a 20 73 74 72 69 6e 67 0a 7b 0a 69 66 20 28 21 65 78 74 65 6e 73 69 6f 6e 5f 6c 6f 61 64 65 64 | :.string.{.if.(!extension_loaded |
97bc0 | 28 27 6f 70 65 6e 73 73 6c 27 29 20 26 26 20 30 20 3d 3d 3d 20 73 74 72 70 6f 73 28 24 75 72 6c | ('openssl').&&.0.===.strpos($url |
97be0 | 2c 20 27 68 74 74 70 73 3a 27 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d | ,.'https:')).{.throw.new.\Runtim |
97c00 | 65 45 78 63 65 70 74 69 6f 6e 28 27 59 6f 75 20 6d 75 73 74 20 65 6e 61 62 6c 65 20 74 68 65 20 | eException('You.must.enable.the. |
97c20 | 6f 70 65 6e 73 73 6c 20 65 78 74 65 6e 73 69 6f 6e 20 74 6f 20 64 6f 77 6e 6c 6f 61 64 20 66 69 | openssl.extension.to.download.fi |
97c40 | 6c 65 73 20 76 69 61 20 68 74 74 70 73 27 29 3b 0a 7d 0a 0a 69 66 20 28 24 70 61 63 6b 61 67 65 | les.via.https');.}..if.($package |
97c60 | 2d 3e 67 65 74 44 69 73 74 52 65 66 65 72 65 6e 63 65 28 29 29 20 7b 0a 24 75 72 6c 20 3d 20 55 | ->getDistReference()).{.$url.=.U |
97c80 | 72 6c 55 74 69 6c 3a 3a 75 70 64 61 74 65 44 69 73 74 52 65 66 65 72 65 6e 63 65 28 24 74 68 69 | rlUtil::updateDistReference($thi |
97ca0 | 73 2d 3e 63 6f 6e 66 69 67 2c 20 24 75 72 6c 2c 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 44 69 | s->config,.$url,.$package->getDi |
97cc0 | 73 74 52 65 66 65 72 65 6e 63 65 28 29 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 75 72 6c 3b 0a | stReference());.}..return.$url;. |
97ce0 | 7d 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 4c 6f 63 61 6c 43 | }......public.function.getLocalC |
97d00 | 68 61 6e 67 65 73 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 | hanges(PackageInterface.$package |
97d20 | 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 29 3a 20 3f 73 74 72 69 6e 67 0a 7b 0a 24 70 72 65 76 | ,.string.$path):.?string.{.$prev |
97d40 | 49 4f 20 3d 20 24 74 68 69 73 2d 3e 69 6f 3b 0a 0a 24 74 68 69 73 2d 3e 69 6f 20 3d 20 6e 65 77 | IO.=.$this->io;..$this->io.=.new |
97d60 | 20 4e 75 6c 6c 49 4f 3b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 6c 6f 61 64 43 6f 6e 66 69 67 75 72 | .NullIO;.$this->io->loadConfigur |
97d80 | 61 74 69 6f 6e 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 29 3b 0a 24 65 20 3d 20 6e 75 6c 6c 3b | ation($this->config);.$e.=.null; |
97da0 | 0a 24 6f 75 74 70 75 74 20 3d 20 27 27 3b 0a 0a 24 74 61 72 67 65 74 44 69 72 20 3d 20 46 69 6c | .$output.=.'';..$targetDir.=.Fil |
97dc0 | 65 73 79 73 74 65 6d 3a 3a 74 72 69 6d 54 72 61 69 6c 69 6e 67 53 6c 61 73 68 28 24 70 61 74 68 | esystem::trimTrailingSlash($path |
97de0 | 29 3b 0a 74 72 79 20 7b 0a 69 66 20 28 69 73 5f 64 69 72 28 24 74 61 72 67 65 74 44 69 72 2e 27 | );.try.{.if.(is_dir($targetDir.' |
97e00 | 5f 63 6f 6d 70 61 72 65 27 29 29 20 7b 0a 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 73 74 65 6d 2d | _compare')).{.$this->filesystem- |
97e20 | 3e 72 65 6d 6f 76 65 44 69 72 65 63 74 6f 72 79 28 24 74 61 72 67 65 74 44 69 72 2e 27 5f 63 6f | >removeDirectory($targetDir.'_co |
97e40 | 6d 70 61 72 65 27 29 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 64 6f 77 6e 6c 6f 61 64 28 24 70 61 63 | mpare');.}..$this->download($pac |
97e60 | 6b 61 67 65 2c 20 24 74 61 72 67 65 74 44 69 72 2e 27 5f 63 6f 6d 70 61 72 65 27 2c 20 6e 75 6c | kage,.$targetDir.'_compare',.nul |
97e80 | 6c 2c 20 66 61 6c 73 65 29 3b 0a 24 74 68 69 73 2d 3e 68 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 | l,.false);.$this->httpDownloader |
97ea0 | 2d 3e 77 61 69 74 28 29 3b 0a 24 74 68 69 73 2d 3e 69 6e 73 74 61 6c 6c 28 24 70 61 63 6b 61 67 | ->wait();.$this->install($packag |
97ec0 | 65 2c 20 24 74 61 72 67 65 74 44 69 72 2e 27 5f 63 6f 6d 70 61 72 65 27 2c 20 66 61 6c 73 65 29 | e,.$targetDir.'_compare',.false) |
97ee0 | 3b 0a 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 77 61 69 74 28 29 3b 0a 0a 24 63 6f 6d 70 | ;.$this->process->wait();..$comp |
97f00 | 61 72 65 72 20 3d 20 6e 65 77 20 43 6f 6d 70 61 72 65 72 28 29 3b 0a 24 63 6f 6d 70 61 72 65 72 | arer.=.new.Comparer();.$comparer |
97f20 | 2d 3e 73 65 74 53 6f 75 72 63 65 28 24 74 61 72 67 65 74 44 69 72 2e 27 5f 63 6f 6d 70 61 72 65 | ->setSource($targetDir.'_compare |
97f40 | 27 29 3b 0a 24 63 6f 6d 70 61 72 65 72 2d 3e 73 65 74 55 70 64 61 74 65 28 24 74 61 72 67 65 74 | ');.$comparer->setUpdate($target |
97f60 | 44 69 72 29 3b 0a 24 63 6f 6d 70 61 72 65 72 2d 3e 64 6f 43 6f 6d 70 61 72 65 28 29 3b 0a 24 6f | Dir);.$comparer->doCompare();.$o |
97f80 | 75 74 70 75 74 20 3d 20 24 63 6f 6d 70 61 72 65 72 2d 3e 67 65 74 43 68 61 6e 67 65 64 41 73 53 | utput.=.$comparer->getChangedAsS |
97fa0 | 74 72 69 6e 67 28 74 72 75 65 29 3b 0a 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 73 74 65 6d 2d 3e | tring(true);.$this->filesystem-> |
97fc0 | 72 65 6d 6f 76 65 44 69 72 65 63 74 6f 72 79 28 24 74 61 72 67 65 74 44 69 72 2e 27 5f 63 6f 6d | removeDirectory($targetDir.'_com |
97fe0 | 70 61 72 65 27 29 3b 0a 7d 20 63 61 74 63 68 20 28 5c 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 | pare');.}.catch.(\Exception.$e). |
98000 | 7b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 69 6f 20 3d 20 24 70 72 65 76 49 4f 3b 0a 0a 69 66 20 28 24 | {.}..$this->io.=.$prevIO;..if.($ |
98020 | 65 29 20 7b 0a 74 68 72 6f 77 20 24 65 3b 0a 7d 0a 0a 24 6f 75 74 70 75 74 20 3d 20 74 72 69 6d | e).{.throw.$e;.}..$output.=.trim |
98040 | 28 24 6f 75 74 70 75 74 29 3b 0a 0a 72 65 74 75 72 6e 20 73 74 72 6c 65 6e 28 24 6f 75 74 70 75 | ($output);..return.strlen($outpu |
98060 | 74 29 20 3e 20 30 20 3f 20 24 6f 75 74 70 75 74 20 3a 20 6e 75 6c 6c 3b 0a 7d 0a 7d 0a 3c 3f 70 | t).>.0.?.$output.:.null;.}.}.<?p |
98080 | 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a | hp.declare(strict_types=1);..... |
980a0 | 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 44 6f 77 6e 6c 6f | .......namespace.Composer\Downlo |
980c0 | 61 64 65 72 3b 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 46 69 6c 65 73 79 73 74 65 6d 45 78 63 65 | ader;.......class.FilesystemExce |
980e0 | 70 74 69 6f 6e 20 65 78 74 65 6e 64 73 20 5c 45 78 63 65 70 74 69 6f 6e 0a 7b 0a 70 75 62 6c 69 | ption.extends.\Exception.{.publi |
98100 | 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 73 74 72 69 6e 67 20 24 6d | c.function.__construct(string.$m |
98120 | 65 73 73 61 67 65 20 3d 20 27 27 2c 20 69 6e 74 20 24 63 6f 64 65 20 3d 20 30 2c 20 3f 5c 45 78 | essage.=.'',.int.$code.=.0,.?\Ex |
98140 | 63 65 70 74 69 6f 6e 20 24 70 72 65 76 69 6f 75 73 20 3d 20 6e 75 6c 6c 29 0a 7b 0a 70 61 72 65 | ception.$previous.=.null).{.pare |
98160 | 6e 74 3a 3a 5f 5f 63 6f 6e 73 74 72 75 63 74 28 22 46 69 6c 65 73 79 73 74 65 6d 20 65 78 63 65 | nt::__construct("Filesystem.exce |
98180 | 70 74 69 6f 6e 3a 20 5c 6e 22 2e 24 6d 65 73 73 61 67 65 2c 20 24 63 6f 64 65 2c 20 24 70 72 65 | ption:.\n".$message,.$code,.$pre |
981a0 | 76 69 6f 75 73 29 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 | vious);.}.}.<?php.declare(strict |
981c0 | 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 | _types=1);............namespace. |
981e0 | 43 6f 6d 70 6f 73 65 72 5c 44 6f 77 6e 6c 6f 61 64 65 72 3b 0a 0a 75 73 65 20 52 65 61 63 74 5c | Composer\Downloader;..use.React\ |
98200 | 50 72 6f 6d 69 73 65 5c 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f | Promise\PromiseInterface;.use.Co |
98220 | 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b | mposer\Package\PackageInterface; |
98240 | 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 63 72 65 5c 50 72 65 67 3b 0a 75 73 65 20 43 6f 6d | .use.Composer\Pcre\Preg;.use.Com |
98260 | 70 6f 73 65 72 5c 55 74 69 6c 5c 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3b 0a 0a 0a 0a 0a | poser\Util\ProcessExecutor;..... |
98280 | 63 6c 61 73 73 20 46 6f 73 73 69 6c 44 6f 77 6e 6c 6f 61 64 65 72 20 65 78 74 65 6e 64 73 20 56 | class.FossilDownloader.extends.V |
982a0 | 63 73 44 6f 77 6e 6c 6f 61 64 65 72 0a 7b 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 | csDownloader.{....protected.func |
982c0 | 74 69 6f 6e 20 64 6f 44 6f 77 6e 6c 6f 61 64 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 | tion.doDownload(PackageInterface |
982e0 | 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 2c 20 73 74 72 69 6e 67 20 | .$package,.string.$path,.string. |
98300 | 24 75 72 6c 2c 20 3f 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 72 65 76 50 61 63 | $url,.?PackageInterface.$prevPac |
98320 | 6b 61 67 65 20 3d 20 6e 75 6c 6c 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a 7b | kage.=.null):.PromiseInterface.{ |
98340 | 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e | .return.\React\Promise\resolve(n |
98360 | 75 6c 6c 29 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 64 | ull);.}.....protected.function.d |
98380 | 6f 49 6e 73 74 61 6c 6c 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 | oInstall(PackageInterface.$packa |
983a0 | 67 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 2c 20 73 74 72 69 6e 67 20 24 75 72 6c 29 3a 20 | ge,.string.$path,.string.$url):. |
983c0 | 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 0a 24 74 68 69 73 2d 3e 63 6f 6e 66 69 | PromiseInterface.{..$this->confi |
983e0 | 67 2d 3e 70 72 6f 68 69 62 69 74 55 72 6c 42 79 43 6f 6e 66 69 67 28 24 75 72 6c 2c 20 24 74 68 | g->prohibitUrlByConfig($url,.$th |
98400 | 69 73 2d 3e 69 6f 29 3b 0a 0a 24 75 72 6c 20 3d 20 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 | is->io);..$url.=.ProcessExecutor |
98420 | 3a 3a 65 73 63 61 70 65 28 24 75 72 6c 29 3b 0a 24 72 65 66 20 3d 20 50 72 6f 63 65 73 73 45 78 | ::escape($url);.$ref.=.ProcessEx |
98440 | 65 63 75 74 6f 72 3a 3a 65 73 63 61 70 65 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 53 6f 75 72 | ecutor::escape($package->getSour |
98460 | 63 65 52 65 66 65 72 65 6e 63 65 28 29 29 3b 0a 24 72 65 70 6f 46 69 6c 65 20 3d 20 24 70 61 74 | ceReference());.$repoFile.=.$pat |
98480 | 68 20 2e 20 27 2e 66 6f 73 73 69 6c 27 3b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 | h...'.fossil';.$this->io->writeE |
984a0 | 72 72 6f 72 28 22 43 6c 6f 6e 69 6e 67 20 22 2e 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 53 6f 75 | rror("Cloning.".$package->getSou |
984c0 | 72 63 65 52 65 66 65 72 65 6e 63 65 28 29 29 3b 0a 24 63 6f 6d 6d 61 6e 64 20 3d 20 73 70 72 69 | rceReference());.$command.=.spri |
984e0 | 6e 74 66 28 27 66 6f 73 73 69 6c 20 63 6c 6f 6e 65 20 2d 2d 20 25 73 20 25 73 27 2c 20 24 75 72 | ntf('fossil.clone.--.%s.%s',.$ur |
98500 | 6c 2c 20 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3a 3a 65 73 63 61 70 65 28 24 72 65 70 6f | l,.ProcessExecutor::escape($repo |
98520 | 46 69 6c 65 29 29 3b 0a 69 66 20 28 30 20 21 3d 3d 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 | File));.if.(0.!==.$this->process |
98540 | 2d 3e 65 78 65 63 75 74 65 28 24 63 6f 6d 6d 61 6e 64 2c 20 24 69 67 6e 6f 72 65 64 4f 75 74 70 | ->execute($command,.$ignoredOutp |
98560 | 75 74 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 | ut)).{.throw.new.\RuntimeExcepti |
98580 | 6f 6e 28 27 46 61 69 6c 65 64 20 74 6f 20 65 78 65 63 75 74 65 20 27 20 2e 20 24 63 6f 6d 6d 61 | on('Failed.to.execute.'...$comma |
985a0 | 6e 64 20 2e 20 22 5c 6e 5c 6e 22 20 2e 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 67 65 | nd..."\n\n"...$this->process->ge |
985c0 | 74 45 72 72 6f 72 4f 75 74 70 75 74 28 29 29 3b 0a 7d 0a 24 63 6f 6d 6d 61 6e 64 20 3d 20 73 70 | tErrorOutput());.}.$command.=.sp |
985e0 | 72 69 6e 74 66 28 27 66 6f 73 73 69 6c 20 6f 70 65 6e 20 2d 2d 6e 65 73 74 65 64 20 2d 2d 20 25 | rintf('fossil.open.--nested.--.% |
98600 | 73 27 2c 20 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3a 3a 65 73 63 61 70 65 28 24 72 65 70 | s',.ProcessExecutor::escape($rep |
98620 | 6f 46 69 6c 65 29 29 3b 0a 69 66 20 28 30 20 21 3d 3d 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 | oFile));.if.(0.!==.$this->proces |
98640 | 73 2d 3e 65 78 65 63 75 74 65 28 24 63 6f 6d 6d 61 6e 64 2c 20 24 69 67 6e 6f 72 65 64 4f 75 74 | s->execute($command,.$ignoredOut |
98660 | 70 75 74 2c 20 72 65 61 6c 70 61 74 68 28 24 70 61 74 68 29 29 29 20 7b 0a 74 68 72 6f 77 20 6e | put,.realpath($path))).{.throw.n |
98680 | 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 46 61 69 6c 65 64 20 74 6f 20 | ew.\RuntimeException('Failed.to. |
986a0 | 65 78 65 63 75 74 65 20 27 20 2e 20 24 63 6f 6d 6d 61 6e 64 20 2e 20 22 5c 6e 5c 6e 22 20 2e 20 | execute.'...$command..."\n\n"... |
986c0 | 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 67 65 74 45 72 72 6f 72 4f 75 74 70 75 74 28 29 | $this->process->getErrorOutput() |
986e0 | 29 3b 0a 7d 0a 24 63 6f 6d 6d 61 6e 64 20 3d 20 73 70 72 69 6e 74 66 28 27 66 6f 73 73 69 6c 20 | );.}.$command.=.sprintf('fossil. |
98700 | 75 70 64 61 74 65 20 2d 2d 20 25 73 27 2c 20 24 72 65 66 29 3b 0a 69 66 20 28 30 20 21 3d 3d 20 | update.--.%s',.$ref);.if.(0.!==. |
98720 | 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 65 78 65 63 75 74 65 28 24 63 6f 6d 6d 61 6e 64 | $this->process->execute($command |
98740 | 2c 20 24 69 67 6e 6f 72 65 64 4f 75 74 70 75 74 2c 20 72 65 61 6c 70 61 74 68 28 24 70 61 74 68 | ,.$ignoredOutput,.realpath($path |
98760 | 29 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f | ))).{.throw.new.\RuntimeExceptio |
98780 | 6e 28 27 46 61 69 6c 65 64 20 74 6f 20 65 78 65 63 75 74 65 20 27 20 2e 20 24 63 6f 6d 6d 61 6e | n('Failed.to.execute.'...$comman |
987a0 | 64 20 2e 20 22 5c 6e 5c 6e 22 20 2e 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 67 65 74 | d..."\n\n"...$this->process->get |
987c0 | 45 72 72 6f 72 4f 75 74 70 75 74 28 29 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 | ErrorOutput());.}..return.\React |
987e0 | 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a 0a 0a 0a 70 72 | \Promise\resolve(null);.}.....pr |
98800 | 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 64 6f 55 70 64 61 74 65 28 50 61 63 6b 61 67 | otected.function.doUpdate(Packag |
98820 | 65 49 6e 74 65 72 66 61 63 65 20 24 69 6e 69 74 69 61 6c 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 | eInterface.$initial,.PackageInte |
98840 | 72 66 61 63 65 20 24 74 61 72 67 65 74 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 2c 20 73 74 72 | rface.$target,.string.$path,.str |
98860 | 69 6e 67 20 24 75 72 6c 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 0a 24 | ing.$url):.PromiseInterface.{..$ |
98880 | 74 68 69 73 2d 3e 63 6f 6e 66 69 67 2d 3e 70 72 6f 68 69 62 69 74 55 72 6c 42 79 43 6f 6e 66 69 | this->config->prohibitUrlByConfi |
988a0 | 67 28 24 75 72 6c 2c 20 24 74 68 69 73 2d 3e 69 6f 29 3b 0a 0a 24 72 65 66 20 3d 20 50 72 6f 63 | g($url,.$this->io);..$ref.=.Proc |
988c0 | 65 73 73 45 78 65 63 75 74 6f 72 3a 3a 65 73 63 61 70 65 28 24 74 61 72 67 65 74 2d 3e 67 65 74 | essExecutor::escape($target->get |
988e0 | 53 6f 75 72 63 65 52 65 66 65 72 65 6e 63 65 28 29 29 3b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 | SourceReference());.$this->io->w |
98900 | 72 69 74 65 45 72 72 6f 72 28 22 20 55 70 64 61 74 69 6e 67 20 74 6f 20 22 2e 24 74 61 72 67 65 | riteError(".Updating.to.".$targe |
98920 | 74 2d 3e 67 65 74 53 6f 75 72 63 65 52 65 66 65 72 65 6e 63 65 28 29 29 3b 0a 0a 69 66 20 28 21 | t->getSourceReference());..if.(! |
98940 | 24 74 68 69 73 2d 3e 68 61 73 4d 65 74 61 64 61 74 61 52 65 70 6f 73 69 74 6f 72 79 28 24 70 61 | $this->hasMetadataRepository($pa |
98960 | 74 68 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 | th)).{.throw.new.\RuntimeExcepti |
98980 | 6f 6e 28 27 54 68 65 20 2e 66 73 6c 63 6b 6f 75 74 20 66 69 6c 65 20 69 73 20 6d 69 73 73 69 6e | on('The..fslckout.file.is.missin |
989a0 | 67 20 66 72 6f 6d 20 27 2e 24 70 61 74 68 2e 27 2c 20 73 65 65 20 68 74 74 70 73 3a 2f 2f 67 65 | g.from.'.$path.',.see.https://ge |
989c0 | 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 67 2f 63 6f 6d 6d 69 74 2d 64 65 70 73 20 66 6f 72 20 6d 6f | tcomposer.org/commit-deps.for.mo |
989e0 | 72 65 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 27 29 3b 0a 7d 0a 0a 24 63 6f 6d 6d 61 6e 64 20 3d 20 | re.information');.}..$command.=. |
98a00 | 73 70 72 69 6e 74 66 28 27 66 6f 73 73 69 6c 20 70 75 6c 6c 20 26 26 20 66 6f 73 73 69 6c 20 75 | sprintf('fossil.pull.&&.fossil.u |
98a20 | 70 20 25 73 27 2c 20 24 72 65 66 29 3b 0a 69 66 20 28 30 20 21 3d 3d 20 24 74 68 69 73 2d 3e 70 | p.%s',.$ref);.if.(0.!==.$this->p |
98a40 | 72 6f 63 65 73 73 2d 3e 65 78 65 63 75 74 65 28 24 63 6f 6d 6d 61 6e 64 2c 20 24 69 67 6e 6f 72 | rocess->execute($command,.$ignor |
98a60 | 65 64 4f 75 74 70 75 74 2c 20 72 65 61 6c 70 61 74 68 28 24 70 61 74 68 29 29 29 20 7b 0a 74 68 | edOutput,.realpath($path))).{.th |
98a80 | 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 46 61 69 6c 65 | row.new.\RuntimeException('Faile |
98aa0 | 64 20 74 6f 20 65 78 65 63 75 74 65 20 27 20 2e 20 24 63 6f 6d 6d 61 6e 64 20 2e 20 22 5c 6e 5c | d.to.execute.'...$command..."\n\ |
98ac0 | 6e 22 20 2e 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 67 65 74 45 72 72 6f 72 4f 75 74 | n"...$this->process->getErrorOut |
98ae0 | 70 75 74 28 29 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 | put());.}..return.\React\Promise |
98b00 | 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e | \resolve(null);.}.....public.fun |
98b20 | 63 74 69 6f 6e 20 67 65 74 4c 6f 63 61 6c 43 68 61 6e 67 65 73 28 50 61 63 6b 61 67 65 49 6e 74 | ction.getLocalChanges(PackageInt |
98b40 | 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 29 3a 20 | erface.$package,.string.$path):. |
98b60 | 3f 73 74 72 69 6e 67 0a 7b 0a 69 66 20 28 21 24 74 68 69 73 2d 3e 68 61 73 4d 65 74 61 64 61 74 | ?string.{.if.(!$this->hasMetadat |
98b80 | 61 52 65 70 6f 73 69 74 6f 72 79 28 24 70 61 74 68 29 29 20 7b 0a 72 65 74 75 72 6e 20 6e 75 6c | aRepository($path)).{.return.nul |
98ba0 | 6c 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 65 78 65 63 75 74 65 28 27 66 | l;.}..$this->process->execute('f |
98bc0 | 6f 73 73 69 6c 20 63 68 61 6e 67 65 73 27 2c 20 24 6f 75 74 70 75 74 2c 20 72 65 61 6c 70 61 74 | ossil.changes',.$output,.realpat |
98be0 | 68 28 24 70 61 74 68 29 29 3b 0a 0a 24 6f 75 74 70 75 74 20 3d 20 74 72 69 6d 28 24 6f 75 74 70 | h($path));..$output.=.trim($outp |
98c00 | 75 74 29 3b 0a 0a 72 65 74 75 72 6e 20 73 74 72 6c 65 6e 28 24 6f 75 74 70 75 74 29 20 3e 20 30 | ut);..return.strlen($output).>.0 |
98c20 | 20 3f 20 24 6f 75 74 70 75 74 20 3a 20 6e 75 6c 6c 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 | .?.$output.:.null;.}.....protect |
98c40 | 65 64 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 43 6f 6d 6d 69 74 4c 6f 67 73 28 73 74 72 69 6e 67 | ed.function.getCommitLogs(string |
98c60 | 20 24 66 72 6f 6d 52 65 66 65 72 65 6e 63 65 2c 20 73 74 72 69 6e 67 20 24 74 6f 52 65 66 65 72 | .$fromReference,.string.$toRefer |
98c80 | 65 6e 63 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 24 63 | ence,.string.$path):.string.{.$c |
98ca0 | 6f 6d 6d 61 6e 64 20 3d 20 73 70 72 69 6e 74 66 28 27 66 6f 73 73 69 6c 20 74 69 6d 65 6c 69 6e | ommand.=.sprintf('fossil.timelin |
98cc0 | 65 20 2d 74 20 63 69 20 2d 57 20 30 20 2d 6e 20 30 20 62 65 66 6f 72 65 20 25 73 27 2c 20 50 72 | e.-t.ci.-W.0.-n.0.before.%s',.Pr |
98ce0 | 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3a 3a 65 73 63 61 70 65 28 24 74 6f 52 65 66 65 72 65 6e | ocessExecutor::escape($toReferen |
98d00 | 63 65 29 29 3b 0a 0a 69 66 20 28 30 20 21 3d 3d 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d | ce));..if.(0.!==.$this->process- |
98d20 | 3e 65 78 65 63 75 74 65 28 24 63 6f 6d 6d 61 6e 64 2c 20 24 6f 75 74 70 75 74 2c 20 72 65 61 6c | >execute($command,.$output,.real |
98d40 | 70 61 74 68 28 24 70 61 74 68 29 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 | path($path))).{.throw.new.\Runti |
98d60 | 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 46 61 69 6c 65 64 20 74 6f 20 65 78 65 63 75 74 65 20 27 | meException('Failed.to.execute.' |
98d80 | 20 2e 20 24 63 6f 6d 6d 61 6e 64 20 2e 20 22 5c 6e 5c 6e 22 20 2e 20 24 74 68 69 73 2d 3e 70 72 | ...$command..."\n\n"...$this->pr |
98da0 | 6f 63 65 73 73 2d 3e 67 65 74 45 72 72 6f 72 4f 75 74 70 75 74 28 29 29 3b 0a 7d 0a 0a 24 6c 6f | ocess->getErrorOutput());.}..$lo |
98dc0 | 67 20 3d 20 27 27 3b 0a 24 6d 61 74 63 68 20 3d 20 27 2f 5c 64 5c 64 3a 5c 64 5c 64 3a 5c 64 5c | g.=.'';.$match.=.'/\d\d:\d\d:\d\ |
98de0 | 64 5c 73 2b 5c 5b 27 20 2e 20 24 74 6f 52 65 66 65 72 65 6e 63 65 20 2e 20 27 5c 5d 2f 27 3b 0a | d\s+\['...$toReference...'\]/';. |
98e00 | 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 73 70 6c 69 74 4c | .foreach.($this->process->splitL |
98e20 | 69 6e 65 73 28 24 6f 75 74 70 75 74 29 20 61 73 20 24 6c 69 6e 65 29 20 7b 0a 69 66 20 28 50 72 | ines($output).as.$line).{.if.(Pr |
98e40 | 65 67 3a 3a 69 73 4d 61 74 63 68 28 24 6d 61 74 63 68 2c 20 24 6c 69 6e 65 29 29 20 7b 0a 62 72 | eg::isMatch($match,.$line)).{.br |
98e60 | 65 61 6b 3b 0a 7d 0a 24 6c 6f 67 20 2e 3d 20 24 6c 69 6e 65 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 | eak;.}.$log..=.$line;.}..return. |
98e80 | 24 6c 6f 67 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 68 | $log;.}.....protected.function.h |
98ea0 | 61 73 4d 65 74 61 64 61 74 61 52 65 70 6f 73 69 74 6f 72 79 28 73 74 72 69 6e 67 20 24 70 61 74 | asMetadataRepository(string.$pat |
98ec0 | 68 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 69 73 5f 66 69 6c 65 28 24 70 61 74 68 20 | h):.bool.{.return.is_file($path. |
98ee0 | 2e 20 27 2f 2e 66 73 6c 63 6b 6f 75 74 27 29 20 7c 7c 20 69 73 5f 66 69 6c 65 28 24 70 61 74 68 | ..'/.fslckout').||.is_file($path |
98f00 | 20 2e 20 27 2f 5f 46 4f 53 53 49 4c 5f 27 29 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 | ...'/_FOSSIL_');.}.}.<?php.decla |
98f20 | 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e | re(strict_types=1);............n |
98f40 | 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 44 6f 77 6e 6c 6f 61 64 65 72 3b 0a 0a 75 | amespace.Composer\Downloader;..u |
98f60 | 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 66 69 67 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 | se.Composer\Config;.use.Composer |
98f80 | 5c 49 4f 5c 49 4f 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 | \IO\IOInterface;.use.Composer\Pa |
98fa0 | 63 6b 61 67 65 5c 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 | ckage\PackageInterface;.use.Comp |
98fc0 | 6f 73 65 72 5c 50 63 72 65 5c 50 72 65 67 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 | oser\Pcre\Preg;.use.Composer\Uti |
98fe0 | 6c 5c 46 69 6c 65 73 79 73 74 65 6d 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c | l\Filesystem;.use.Composer\Util\ |
99000 | 47 69 74 20 61 73 20 47 69 74 55 74 69 6c 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 | Git.as.GitUtil;.use.Composer\Uti |
99020 | 6c 5c 55 72 6c 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 6c 61 74 66 6f 72 | l\Url;.use.Composer\Util\Platfor |
99040 | 6d 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 72 6f 63 65 73 73 45 78 65 63 | m;.use.Composer\Util\ProcessExec |
99060 | 75 74 6f 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 61 63 68 65 3b 0a 75 73 65 20 52 65 | utor;.use.Composer\Cache;.use.Re |
99080 | 61 63 74 5c 50 72 6f 6d 69 73 65 5c 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 3b 0a 0a 0a | act\Promise\PromiseInterface;... |
990a0 | 0a 0a 63 6c 61 73 73 20 47 69 74 44 6f 77 6e 6c 6f 61 64 65 72 20 65 78 74 65 6e 64 73 20 56 63 | ..class.GitDownloader.extends.Vc |
990c0 | 73 44 6f 77 6e 6c 6f 61 64 65 72 20 69 6d 70 6c 65 6d 65 6e 74 73 20 44 76 63 73 44 6f 77 6e 6c | sDownloader.implements.DvcsDownl |
990e0 | 6f 61 64 65 72 49 6e 74 65 72 66 61 63 65 0a 7b 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 68 61 | oaderInterface.{.....private.$ha |
99100 | 73 53 74 61 73 68 65 64 43 68 61 6e 67 65 73 20 3d 20 5b 5d 3b 0a 0a 0a 0a 0a 70 72 69 76 61 74 | sStashedChanges.=.[];.....privat |
99120 | 65 20 24 68 61 73 44 69 73 63 61 72 64 65 64 43 68 61 6e 67 65 73 20 3d 20 5b 5d 3b 0a 0a 0a 0a | e.$hasDiscardedChanges.=.[];.... |
99140 | 70 72 69 76 61 74 65 20 24 67 69 74 55 74 69 6c 3b 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 63 | private.$gitUtil;.....private.$c |
99160 | 61 63 68 65 64 50 61 63 6b 61 67 65 73 20 3d 20 5b 5d 3b 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 | achedPackages.=.[];..public.func |
99180 | 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 49 4f 49 6e 74 65 72 66 61 63 65 20 24 69 6f | tion.__construct(IOInterface.$io |
991a0 | 2c 20 43 6f 6e 66 69 67 20 24 63 6f 6e 66 69 67 2c 20 3f 50 72 6f 63 65 73 73 45 78 65 63 75 74 | ,.Config.$config,.?ProcessExecut |
991c0 | 6f 72 20 24 70 72 6f 63 65 73 73 20 3d 20 6e 75 6c 6c 2c 20 3f 46 69 6c 65 73 79 73 74 65 6d 20 | or.$process.=.null,.?Filesystem. |
991e0 | 24 66 73 20 3d 20 6e 75 6c 6c 29 0a 7b 0a 70 61 72 65 6e 74 3a 3a 5f 5f 63 6f 6e 73 74 72 75 63 | $fs.=.null).{.parent::__construc |
99200 | 74 28 24 69 6f 2c 20 24 63 6f 6e 66 69 67 2c 20 24 70 72 6f 63 65 73 73 2c 20 24 66 73 29 3b 0a | t($io,.$config,.$process,.$fs);. |
99220 | 24 74 68 69 73 2d 3e 67 69 74 55 74 69 6c 20 3d 20 6e 65 77 20 47 69 74 55 74 69 6c 28 24 74 68 | $this->gitUtil.=.new.GitUtil($th |
99240 | 69 73 2d 3e 69 6f 2c 20 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 2c 20 24 74 68 69 73 2d 3e 70 72 | is->io,.$this->config,.$this->pr |
99260 | 6f 63 65 73 73 2c 20 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 73 74 65 6d 29 3b 0a 7d 0a 0a 0a 0a | ocess,.$this->filesystem);.}.... |
99280 | 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 64 6f 44 6f 77 6e 6c 6f 61 64 28 50 | .protected.function.doDownload(P |
992a0 | 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 | ackageInterface.$package,.string |
992c0 | 20 24 70 61 74 68 2c 20 73 74 72 69 6e 67 20 24 75 72 6c 2c 20 3f 50 61 63 6b 61 67 65 49 6e 74 | .$path,.string.$url,.?PackageInt |
992e0 | 65 72 66 61 63 65 20 24 70 72 65 76 50 61 63 6b 61 67 65 20 3d 20 6e 75 6c 6c 29 3a 20 50 72 6f | erface.$prevPackage.=.null):.Pro |
99300 | 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 0a 69 66 20 28 46 69 6c 65 73 79 73 74 65 6d 3a | miseInterface.{..if.(Filesystem: |
99320 | 3a 69 73 4c 6f 63 61 6c 50 61 74 68 28 24 75 72 6c 29 29 20 7b 0a 72 65 74 75 72 6e 20 5c 52 65 | :isLocalPath($url)).{.return.\Re |
99340 | 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a 47 69 | act\Promise\resolve(null);.}..Gi |
99360 | 74 55 74 69 6c 3a 3a 63 6c 65 61 6e 45 6e 76 28 29 3b 0a 0a 24 63 61 63 68 65 50 61 74 68 20 3d | tUtil::cleanEnv();..$cachePath.= |
99380 | 20 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 63 61 63 68 65 2d 76 63 73 2d 64 | .$this->config->get('cache-vcs-d |
993a0 | 69 72 27 29 2e 27 2f 27 2e 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 28 27 7b 5b 5e 61 2d 7a 30 2d | ir').'/'.Preg::replace('{[^a-z0- |
993c0 | 39 2e 5d 7d 69 27 2c 20 27 2d 27 2c 20 24 75 72 6c 29 2e 27 2f 27 3b 0a 24 67 69 74 56 65 72 73 | 9.]}i',.'-',.$url).'/';.$gitVers |
993e0 | 69 6f 6e 20 3d 20 47 69 74 55 74 69 6c 3a 3a 67 65 74 56 65 72 73 69 6f 6e 28 24 74 68 69 73 2d | ion.=.GitUtil::getVersion($this- |
99400 | 3e 70 72 6f 63 65 73 73 29 3b 0a 0a 0a 69 66 20 28 24 67 69 74 56 65 72 73 69 6f 6e 20 26 26 20 | >process);...if.($gitVersion.&&. |
99420 | 76 65 72 73 69 6f 6e 5f 63 6f 6d 70 61 72 65 28 24 67 69 74 56 65 72 73 69 6f 6e 2c 20 27 32 2e | version_compare($gitVersion,.'2. |
99440 | 33 2e 30 2d 72 63 30 27 2c 20 27 3e 3d 27 29 20 26 26 20 43 61 63 68 65 3a 3a 69 73 55 73 61 62 | 3.0-rc0',.'>=').&&.Cache::isUsab |
99460 | 6c 65 28 24 63 61 63 68 65 50 61 74 68 29 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 | le($cachePath)).{.$this->io->wri |
99480 | 74 65 45 72 72 6f 72 28 22 20 20 2d 20 53 79 6e 63 69 6e 67 20 3c 69 6e 66 6f 3e 22 20 2e 20 24 | teError("..-.Syncing.<info>"...$ |
994a0 | 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 20 2e 20 22 3c 2f 69 6e 66 6f 3e 20 28 3c | package->getName()..."</info>.(< |
994c0 | 63 6f 6d 6d 65 6e 74 3e 22 20 2e 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 46 75 6c 6c 50 72 65 | comment>"...$package->getFullPre |
994e0 | 74 74 79 56 65 72 73 69 6f 6e 28 29 20 2e 20 22 3c 2f 63 6f 6d 6d 65 6e 74 3e 29 20 69 6e 74 6f | ttyVersion()..."</comment>).into |
99500 | 20 63 61 63 68 65 22 29 3b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 | .cache");.$this->io->writeError( |
99520 | 73 70 72 69 6e 74 66 28 27 20 20 20 20 43 6c 6f 6e 69 6e 67 20 74 6f 20 63 61 63 68 65 20 61 74 | sprintf('....Cloning.to.cache.at |
99540 | 20 25 73 27 2c 20 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3a 3a 65 73 63 61 70 65 28 24 63 | .%s',.ProcessExecutor::escape($c |
99560 | 61 63 68 65 50 61 74 68 29 29 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 3a 3a 44 | achePath)),.true,.IOInterface::D |
99580 | 45 42 55 47 29 3b 0a 24 72 65 66 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 53 6f 75 72 63 | EBUG);.$ref.=.$package->getSourc |
995a0 | 65 52 65 66 65 72 65 6e 63 65 28 29 3b 0a 69 66 20 28 24 74 68 69 73 2d 3e 67 69 74 55 74 69 6c | eReference();.if.($this->gitUtil |
995c0 | 2d 3e 66 65 74 63 68 52 65 66 4f 72 53 79 6e 63 4d 69 72 72 6f 72 28 24 75 72 6c 2c 20 24 63 61 | ->fetchRefOrSyncMirror($url,.$ca |
995e0 | 63 68 65 50 61 74 68 2c 20 24 72 65 66 2c 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 | chePath,.$ref,.$package->getPret |
99600 | 74 79 56 65 72 73 69 6f 6e 28 29 29 20 26 26 20 69 73 5f 64 69 72 28 24 63 61 63 68 65 50 61 74 | tyVersion()).&&.is_dir($cachePat |
99620 | 68 29 29 20 7b 0a 24 74 68 69 73 2d 3e 63 61 63 68 65 64 50 61 63 6b 61 67 65 73 5b 24 70 61 63 | h)).{.$this->cachedPackages[$pac |
99640 | 6b 61 67 65 2d 3e 67 65 74 49 64 28 29 5d 5b 24 72 65 66 5d 20 3d 20 74 72 75 65 3b 0a 7d 0a 7d | kage->getId()][$ref].=.true;.}.} |
99660 | 20 65 6c 73 65 69 66 20 28 6e 75 6c 6c 20 3d 3d 3d 20 24 67 69 74 56 65 72 73 69 6f 6e 29 20 7b | .elseif.(null.===.$gitVersion).{ |
99680 | 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 67 69 | .throw.new.\RuntimeException('gi |
996a0 | 74 20 77 61 73 20 6e 6f 74 20 66 6f 75 6e 64 20 69 6e 20 79 6f 75 72 20 50 41 54 48 2c 20 73 6b | t.was.not.found.in.your.PATH,.sk |
996c0 | 69 70 70 69 6e 67 20 73 6f 75 72 63 65 20 64 6f 77 6e 6c 6f 61 64 27 29 3b 0a 7d 0a 0a 72 65 74 | ipping.source.download');.}..ret |
996e0 | 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 | urn.\React\Promise\resolve(null) |
99700 | 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 64 6f 49 6e 73 | ;.}.....protected.function.doIns |
99720 | 74 61 6c 6c 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 | tall(PackageInterface.$package,. |
99740 | 73 74 72 69 6e 67 20 24 70 61 74 68 2c 20 73 74 72 69 6e 67 20 24 75 72 6c 29 3a 20 50 72 6f 6d | string.$path,.string.$url):.Prom |
99760 | 69 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 47 69 74 55 74 69 6c 3a 3a 63 6c 65 61 6e 45 6e 76 | iseInterface.{.GitUtil::cleanEnv |
99780 | 28 29 3b 0a 24 70 61 74 68 20 3d 20 24 74 68 69 73 2d 3e 6e 6f 72 6d 61 6c 69 7a 65 50 61 74 68 | ();.$path.=.$this->normalizePath |
997a0 | 28 24 70 61 74 68 29 3b 0a 24 63 61 63 68 65 50 61 74 68 20 3d 20 24 74 68 69 73 2d 3e 63 6f 6e | ($path);.$cachePath.=.$this->con |
997c0 | 66 69 67 2d 3e 67 65 74 28 27 63 61 63 68 65 2d 76 63 73 2d 64 69 72 27 29 2e 27 2f 27 2e 50 72 | fig->get('cache-vcs-dir').'/'.Pr |
997e0 | 65 67 3a 3a 72 65 70 6c 61 63 65 28 27 7b 5b 5e 61 2d 7a 30 2d 39 2e 5d 7d 69 27 2c 20 27 2d 27 | eg::replace('{[^a-z0-9.]}i',.'-' |
99800 | 2c 20 24 75 72 6c 29 2e 27 2f 27 3b 0a 24 72 65 66 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 | ,.$url).'/';.$ref.=.$package->ge |
99820 | 74 53 6f 75 72 63 65 52 65 66 65 72 65 6e 63 65 28 29 3b 0a 24 66 6c 61 67 20 3d 20 50 6c 61 74 | tSourceReference();.$flag.=.Plat |
99840 | 66 6f 72 6d 3a 3a 69 73 57 69 6e 64 6f 77 73 28 29 20 3f 20 27 2f 44 20 27 20 3a 20 27 27 3b 0a | form::isWindows().?.'/D.'.:.'';. |
99860 | 0a 69 66 20 28 21 65 6d 70 74 79 28 24 74 68 69 73 2d 3e 63 61 63 68 65 64 50 61 63 6b 61 67 65 | .if.(!empty($this->cachedPackage |
99880 | 73 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 49 64 28 29 5d 5b 24 72 65 66 5d 29 29 20 7b 0a 24 | s[$package->getId()][$ref])).{.$ |
998a0 | 6d 73 67 20 3d 20 22 43 6c 6f 6e 69 6e 67 20 22 2e 24 74 68 69 73 2d 3e 67 65 74 53 68 6f 72 74 | msg.=."Cloning.".$this->getShort |
998c0 | 48 61 73 68 28 24 72 65 66 29 2e 27 20 66 72 6f 6d 20 63 61 63 68 65 27 3b 0a 0a 24 63 6c 6f 6e | Hash($ref).'.from.cache';..$clon |
998e0 | 65 46 6c 61 67 73 20 3d 20 27 2d 2d 64 69 73 73 6f 63 69 61 74 65 20 2d 2d 72 65 66 65 72 65 6e | eFlags.=.'--dissociate.--referen |
99900 | 63 65 20 25 63 61 63 68 65 50 61 74 68 25 20 27 3b 0a 24 74 72 61 6e 73 70 6f 72 74 4f 70 74 69 | ce.%cachePath%.';.$transportOpti |
99920 | 6f 6e 73 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 54 72 61 6e 73 70 6f 72 74 4f 70 74 69 | ons.=.$package->getTransportOpti |
99940 | 6f 6e 73 28 29 3b 0a 69 66 20 28 69 73 73 65 74 28 24 74 72 61 6e 73 70 6f 72 74 4f 70 74 69 6f | ons();.if.(isset($transportOptio |
99960 | 6e 73 5b 27 67 69 74 27 5d 5b 27 73 69 6e 67 6c 65 5f 75 73 65 5f 63 6c 6f 6e 65 27 5d 29 20 26 | ns['git']['single_use_clone']).& |
99980 | 26 20 24 74 72 61 6e 73 70 6f 72 74 4f 70 74 69 6f 6e 73 5b 27 67 69 74 27 5d 5b 27 73 69 6e 67 | &.$transportOptions['git']['sing |
999a0 | 6c 65 5f 75 73 65 5f 63 6c 6f 6e 65 27 5d 29 20 7b 0a 24 63 6c 6f 6e 65 46 6c 61 67 73 20 3d 20 | le_use_clone']).{.$cloneFlags.=. |
999c0 | 27 27 3b 0a 7d 0a 0a 24 63 6f 6d 6d 61 6e 64 20 3d 0a 27 67 69 74 20 63 6c 6f 6e 65 20 2d 2d 6e | '';.}..$command.=.'git.clone.--n |
999e0 | 6f 2d 63 68 65 63 6b 6f 75 74 20 25 63 61 63 68 65 50 61 74 68 25 20 25 70 61 74 68 25 20 27 20 | o-checkout.%cachePath%.%path%.'. |
99a00 | 2e 20 24 63 6c 6f 6e 65 46 6c 61 67 73 0a 2e 20 27 26 26 20 63 64 20 27 2e 24 66 6c 61 67 2e 27 | ..$cloneFlags...'&&.cd.'.$flag.' |
99a20 | 25 70 61 74 68 25 20 27 0a 2e 20 27 26 26 20 67 69 74 20 72 65 6d 6f 74 65 20 73 65 74 2d 75 72 | %path%.'...'&&.git.remote.set-ur |
99a40 | 6c 20 6f 72 69 67 69 6e 20 2d 2d 20 25 73 61 6e 69 74 69 7a 65 64 55 72 6c 25 20 26 26 20 67 69 | l.origin.--.%sanitizedUrl%.&&.gi |
99a60 | 74 20 72 65 6d 6f 74 65 20 61 64 64 20 63 6f 6d 70 6f 73 65 72 20 2d 2d 20 25 73 61 6e 69 74 69 | t.remote.add.composer.--.%saniti |
99a80 | 7a 65 64 55 72 6c 25 27 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 6d 73 67 20 3d 20 22 43 6c 6f 6e 69 | zedUrl%';.}.else.{.$msg.=."Cloni |
99aa0 | 6e 67 20 22 2e 24 74 68 69 73 2d 3e 67 65 74 53 68 6f 72 74 48 61 73 68 28 24 72 65 66 29 3b 0a | ng.".$this->getShortHash($ref);. |
99ac0 | 24 63 6f 6d 6d 61 6e 64 20 3d 20 27 67 69 74 20 63 6c 6f 6e 65 20 2d 2d 6e 6f 2d 63 68 65 63 6b | $command.=.'git.clone.--no-check |
99ae0 | 6f 75 74 20 2d 2d 20 25 75 72 6c 25 20 25 70 61 74 68 25 20 26 26 20 63 64 20 27 2e 24 66 6c 61 | out.--.%url%.%path%.&&.cd.'.$fla |
99b00 | 67 2e 27 25 70 61 74 68 25 20 26 26 20 67 69 74 20 72 65 6d 6f 74 65 20 61 64 64 20 63 6f 6d 70 | g.'%path%.&&.git.remote.add.comp |
99b20 | 6f 73 65 72 20 2d 2d 20 25 75 72 6c 25 20 26 26 20 67 69 74 20 66 65 74 63 68 20 63 6f 6d 70 6f | oser.--.%url%.&&.git.fetch.compo |
99b40 | 73 65 72 20 26 26 20 67 69 74 20 72 65 6d 6f 74 65 20 73 65 74 2d 75 72 6c 20 6f 72 69 67 69 6e | ser.&&.git.remote.set-url.origin |
99b60 | 20 2d 2d 20 25 73 61 6e 69 74 69 7a 65 64 55 72 6c 25 20 26 26 20 67 69 74 20 72 65 6d 6f 74 65 | .--.%sanitizedUrl%.&&.git.remote |
99b80 | 20 73 65 74 2d 75 72 6c 20 63 6f 6d 70 6f 73 65 72 20 2d 2d 20 25 73 61 6e 69 74 69 7a 65 64 55 | .set-url.composer.--.%sanitizedU |
99ba0 | 72 6c 25 27 3b 0a 69 66 20 28 50 6c 61 74 66 6f 72 6d 3a 3a 67 65 74 45 6e 76 28 27 43 4f 4d 50 | rl%';.if.(Platform::getEnv('COMP |
99bc0 | 4f 53 45 52 5f 44 49 53 41 42 4c 45 5f 4e 45 54 57 4f 52 4b 27 29 29 20 7b 0a 74 68 72 6f 77 20 | OSER_DISABLE_NETWORK')).{.throw. |
99be0 | 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 54 68 65 20 72 65 71 75 69 | new.\RuntimeException('The.requi |
99c00 | 72 65 64 20 67 69 74 20 72 65 66 65 72 65 6e 63 65 20 66 6f 72 20 27 2e 24 70 61 63 6b 61 67 65 | red.git.reference.for.'.$package |
99c20 | 2d 3e 67 65 74 4e 61 6d 65 28 29 2e 27 20 69 73 20 6e 6f 74 20 69 6e 20 63 61 63 68 65 20 61 6e | ->getName().'.is.not.in.cache.an |
99c40 | 64 20 6e 65 74 77 6f 72 6b 20 69 73 20 64 69 73 61 62 6c 65 64 2c 20 61 62 6f 72 74 69 6e 67 27 | d.network.is.disabled,.aborting' |
99c60 | 29 3b 0a 7d 0a 7d 0a 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 24 6d | );.}.}..$this->io->writeError($m |
99c80 | 73 67 29 3b 0a 0a 24 63 6f 6d 6d 61 6e 64 43 61 6c 6c 61 62 6c 65 20 3d 20 73 74 61 74 69 63 20 | sg);..$commandCallable.=.static. |
99ca0 | 66 75 6e 63 74 69 6f 6e 20 28 73 74 72 69 6e 67 20 24 75 72 6c 29 20 75 73 65 20 28 24 70 61 74 | function.(string.$url).use.($pat |
99cc0 | 68 2c 20 24 63 6f 6d 6d 61 6e 64 2c 20 24 63 61 63 68 65 50 61 74 68 29 3a 20 73 74 72 69 6e 67 | h,.$command,.$cachePath):.string |
99ce0 | 20 7b 0a 72 65 74 75 72 6e 20 73 74 72 5f 72 65 70 6c 61 63 65 28 0a 5b 27 25 75 72 6c 25 27 2c | .{.return.str_replace(.['%url%', |
99d00 | 20 27 25 70 61 74 68 25 27 2c 20 27 25 63 61 63 68 65 50 61 74 68 25 27 2c 20 27 25 73 61 6e 69 | .'%path%',.'%cachePath%',.'%sani |
99d20 | 74 69 7a 65 64 55 72 6c 25 27 5d 2c 0a 5b 0a 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3a 3a | tizedUrl%'],.[.ProcessExecutor:: |
99d40 | 65 73 63 61 70 65 28 24 75 72 6c 29 2c 0a 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3a 3a 65 | escape($url),.ProcessExecutor::e |
99d60 | 73 63 61 70 65 28 24 70 61 74 68 29 2c 0a 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3a 3a 65 | scape($path),.ProcessExecutor::e |
99d80 | 73 63 61 70 65 28 24 63 61 63 68 65 50 61 74 68 29 2c 0a 50 72 6f 63 65 73 73 45 78 65 63 75 74 | scape($cachePath),.ProcessExecut |
99da0 | 6f 72 3a 3a 65 73 63 61 70 65 28 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 28 27 7b 3a 2f 2f 28 5b | or::escape(Preg::replace('{://([ |
99dc0 | 5e 40 5d 2b 3f 29 3a 28 2e 2b 3f 29 40 7d 27 2c 20 27 3a 2f 2f 27 2c 20 24 75 72 6c 29 29 2c 0a | ^@]+?):(.+?)@}',.'://',.$url)),. |
99de0 | 5d 2c 0a 24 63 6f 6d 6d 61 6e 64 0a 29 3b 0a 7d 3b 0a 0a 24 74 68 69 73 2d 3e 67 69 74 55 74 69 | ],.$command.);.};..$this->gitUti |
99e00 | 6c 2d 3e 72 75 6e 43 6f 6d 6d 61 6e 64 28 24 63 6f 6d 6d 61 6e 64 43 61 6c 6c 61 62 6c 65 2c 20 | l->runCommand($commandCallable,. |
99e20 | 24 75 72 6c 2c 20 24 70 61 74 68 2c 20 74 72 75 65 29 3b 0a 24 73 6f 75 72 63 65 55 72 6c 20 3d | $url,.$path,.true);.$sourceUrl.= |
99e40 | 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 53 6f 75 72 63 65 55 72 6c 28 29 3b 0a 69 66 20 28 24 | .$package->getSourceUrl();.if.($ |
99e60 | 75 72 6c 20 21 3d 3d 20 24 73 6f 75 72 63 65 55 72 6c 20 26 26 20 24 73 6f 75 72 63 65 55 72 6c | url.!==.$sourceUrl.&&.$sourceUrl |
99e80 | 20 21 3d 3d 20 6e 75 6c 6c 29 20 7b 0a 24 74 68 69 73 2d 3e 75 70 64 61 74 65 4f 72 69 67 69 6e | .!==.null).{.$this->updateOrigin |
99ea0 | 55 72 6c 28 24 70 61 74 68 2c 20 24 73 6f 75 72 63 65 55 72 6c 29 3b 0a 7d 20 65 6c 73 65 20 7b | Url($path,.$sourceUrl);.}.else.{ |
99ec0 | 0a 24 74 68 69 73 2d 3e 73 65 74 50 75 73 68 55 72 6c 28 24 70 61 74 68 2c 20 24 75 72 6c 29 3b | .$this->setPushUrl($path,.$url); |
99ee0 | 0a 7d 0a 0a 69 66 20 28 24 6e 65 77 52 65 66 20 3d 20 24 74 68 69 73 2d 3e 75 70 64 61 74 65 54 | .}..if.($newRef.=.$this->updateT |
99f00 | 6f 43 6f 6d 6d 69 74 28 24 70 61 63 6b 61 67 65 2c 20 24 70 61 74 68 2c 20 28 73 74 72 69 6e 67 | oCommit($package,.$path,.(string |
99f20 | 29 20 24 72 65 66 2c 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 56 65 72 73 69 | ).$ref,.$package->getPrettyVersi |
99f40 | 6f 6e 28 29 29 29 20 7b 0a 69 66 20 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 44 69 73 74 52 65 | on())).{.if.($package->getDistRe |
99f60 | 66 65 72 65 6e 63 65 28 29 20 3d 3d 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 53 6f 75 72 63 | ference().===.$package->getSourc |
99f80 | 65 52 65 66 65 72 65 6e 63 65 28 29 29 20 7b 0a 24 70 61 63 6b 61 67 65 2d 3e 73 65 74 44 69 73 | eReference()).{.$package->setDis |
99fa0 | 74 52 65 66 65 72 65 6e 63 65 28 24 6e 65 77 52 65 66 29 3b 0a 7d 0a 24 70 61 63 6b 61 67 65 2d | tReference($newRef);.}.$package- |
99fc0 | 3e 73 65 74 53 6f 75 72 63 65 52 65 66 65 72 65 6e 63 65 28 24 6e 65 77 52 65 66 29 3b 0a 7d 0a | >setSourceReference($newRef);.}. |
99fe0 | 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e | .return.\React\Promise\resolve(n |
9a000 | 75 6c 6c 29 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 64 | ull);.}.....protected.function.d |
9a020 | 6f 55 70 64 61 74 65 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 69 6e 69 74 69 61 | oUpdate(PackageInterface.$initia |
9a040 | 6c 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 74 61 72 67 65 74 2c 20 73 74 72 | l,.PackageInterface.$target,.str |
9a060 | 69 6e 67 20 24 70 61 74 68 2c 20 73 74 72 69 6e 67 20 24 75 72 6c 29 3a 20 50 72 6f 6d 69 73 65 | ing.$path,.string.$url):.Promise |
9a080 | 49 6e 74 65 72 66 61 63 65 0a 7b 0a 47 69 74 55 74 69 6c 3a 3a 63 6c 65 61 6e 45 6e 76 28 29 3b | Interface.{.GitUtil::cleanEnv(); |
9a0a0 | 0a 24 70 61 74 68 20 3d 20 24 74 68 69 73 2d 3e 6e 6f 72 6d 61 6c 69 7a 65 50 61 74 68 28 24 70 | .$path.=.$this->normalizePath($p |
9a0c0 | 61 74 68 29 3b 0a 69 66 20 28 21 24 74 68 69 73 2d 3e 68 61 73 4d 65 74 61 64 61 74 61 52 65 70 | ath);.if.(!$this->hasMetadataRep |
9a0e0 | 6f 73 69 74 6f 72 79 28 24 70 61 74 68 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e | ository($path)).{.throw.new.\Run |
9a100 | 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 54 68 65 20 2e 67 69 74 20 64 69 72 65 63 74 6f 72 | timeException('The..git.director |
9a120 | 79 20 69 73 20 6d 69 73 73 69 6e 67 20 66 72 6f 6d 20 27 2e 24 70 61 74 68 2e 27 2c 20 73 65 65 | y.is.missing.from.'.$path.',.see |
9a140 | 20 68 74 74 70 73 3a 2f 2f 67 65 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 67 2f 63 6f 6d 6d 69 74 2d | .https://getcomposer.org/commit- |
9a160 | 64 65 70 73 20 66 6f 72 20 6d 6f 72 65 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 27 29 3b 0a 7d 0a 0a | deps.for.more.information');.}.. |
9a180 | 24 63 61 63 68 65 50 61 74 68 20 3d 20 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 2d 3e 67 65 74 28 | $cachePath.=.$this->config->get( |
9a1a0 | 27 63 61 63 68 65 2d 76 63 73 2d 64 69 72 27 29 2e 27 2f 27 2e 50 72 65 67 3a 3a 72 65 70 6c 61 | 'cache-vcs-dir').'/'.Preg::repla |
9a1c0 | 63 65 28 27 7b 5b 5e 61 2d 7a 30 2d 39 2e 5d 7d 69 27 2c 20 27 2d 27 2c 20 24 75 72 6c 29 2e 27 | ce('{[^a-z0-9.]}i',.'-',.$url).' |
9a1e0 | 2f 27 3b 0a 24 72 65 66 20 3d 20 24 74 61 72 67 65 74 2d 3e 67 65 74 53 6f 75 72 63 65 52 65 66 | /';.$ref.=.$target->getSourceRef |
9a200 | 65 72 65 6e 63 65 28 29 3b 0a 0a 69 66 20 28 21 65 6d 70 74 79 28 24 74 68 69 73 2d 3e 63 61 63 | erence();..if.(!empty($this->cac |
9a220 | 68 65 64 50 61 63 6b 61 67 65 73 5b 24 74 61 72 67 65 74 2d 3e 67 65 74 49 64 28 29 5d 5b 24 72 | hedPackages[$target->getId()][$r |
9a240 | 65 66 5d 29 29 20 7b 0a 24 6d 73 67 20 3d 20 22 43 68 65 63 6b 69 6e 67 20 6f 75 74 20 22 2e 24 | ef])).{.$msg.=."Checking.out.".$ |
9a260 | 74 68 69 73 2d 3e 67 65 74 53 68 6f 72 74 48 61 73 68 28 24 72 65 66 29 2e 27 20 66 72 6f 6d 20 | this->getShortHash($ref).'.from. |
9a280 | 63 61 63 68 65 27 3b 0a 24 63 6f 6d 6d 61 6e 64 20 3d 20 27 28 67 69 74 20 72 65 76 2d 70 61 72 | cache';.$command.=.'(git.rev-par |
9a2a0 | 73 65 20 2d 2d 71 75 69 65 74 20 2d 2d 76 65 72 69 66 79 20 25 72 65 66 25 20 7c 7c 20 28 67 69 | se.--quiet.--verify.%ref%.||.(gi |
9a2c0 | 74 20 72 65 6d 6f 74 65 20 73 65 74 2d 75 72 6c 20 63 6f 6d 70 6f 73 65 72 20 2d 2d 20 25 63 61 | t.remote.set-url.composer.--.%ca |
9a2e0 | 63 68 65 50 61 74 68 25 20 26 26 20 67 69 74 20 66 65 74 63 68 20 63 6f 6d 70 6f 73 65 72 20 26 | chePath%.&&.git.fetch.composer.& |
9a300 | 26 20 67 69 74 20 66 65 74 63 68 20 2d 2d 74 61 67 73 20 63 6f 6d 70 6f 73 65 72 29 29 20 26 26 | &.git.fetch.--tags.composer)).&& |
9a320 | 20 67 69 74 20 72 65 6d 6f 74 65 20 73 65 74 2d 75 72 6c 20 63 6f 6d 70 6f 73 65 72 20 2d 2d 20 | .git.remote.set-url.composer.--. |
9a340 | 25 73 61 6e 69 74 69 7a 65 64 55 72 6c 25 27 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 6d 73 67 20 3d | %sanitizedUrl%';.}.else.{.$msg.= |
9a360 | 20 22 43 68 65 63 6b 69 6e 67 20 6f 75 74 20 22 2e 24 74 68 69 73 2d 3e 67 65 74 53 68 6f 72 74 | ."Checking.out.".$this->getShort |
9a380 | 48 61 73 68 28 24 72 65 66 29 3b 0a 24 63 6f 6d 6d 61 6e 64 20 3d 20 27 28 67 69 74 20 72 65 6d | Hash($ref);.$command.=.'(git.rem |
9a3a0 | 6f 74 65 20 73 65 74 2d 75 72 6c 20 63 6f 6d 70 6f 73 65 72 20 2d 2d 20 25 75 72 6c 25 20 26 26 | ote.set-url.composer.--.%url%.&& |
9a3c0 | 20 67 69 74 20 72 65 76 2d 70 61 72 73 65 20 2d 2d 71 75 69 65 74 20 2d 2d 76 65 72 69 66 79 20 | .git.rev-parse.--quiet.--verify. |
9a3e0 | 25 72 65 66 25 20 7c 7c 20 28 67 69 74 20 66 65 74 63 68 20 63 6f 6d 70 6f 73 65 72 20 26 26 20 | %ref%.||.(git.fetch.composer.&&. |
9a400 | 67 69 74 20 66 65 74 63 68 20 2d 2d 74 61 67 73 20 63 6f 6d 70 6f 73 65 72 29 29 20 26 26 20 67 | git.fetch.--tags.composer)).&&.g |
9a420 | 69 74 20 72 65 6d 6f 74 65 20 73 65 74 2d 75 72 6c 20 63 6f 6d 70 6f 73 65 72 20 2d 2d 20 25 73 | it.remote.set-url.composer.--.%s |
9a440 | 61 6e 69 74 69 7a 65 64 55 72 6c 25 27 3b 0a 69 66 20 28 50 6c 61 74 66 6f 72 6d 3a 3a 67 65 74 | anitizedUrl%';.if.(Platform::get |
9a460 | 45 6e 76 28 27 43 4f 4d 50 4f 53 45 52 5f 44 49 53 41 42 4c 45 5f 4e 45 54 57 4f 52 4b 27 29 29 | Env('COMPOSER_DISABLE_NETWORK')) |
9a480 | 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 | .{.throw.new.\RuntimeException(' |
9a4a0 | 54 68 65 20 72 65 71 75 69 72 65 64 20 67 69 74 20 72 65 66 65 72 65 6e 63 65 20 66 6f 72 20 27 | The.required.git.reference.for.' |
9a4c0 | 2e 24 74 61 72 67 65 74 2d 3e 67 65 74 4e 61 6d 65 28 29 2e 27 20 69 73 20 6e 6f 74 20 69 6e 20 | .$target->getName().'.is.not.in. |
9a4e0 | 63 61 63 68 65 20 61 6e 64 20 6e 65 74 77 6f 72 6b 20 69 73 20 64 69 73 61 62 6c 65 64 2c 20 61 | cache.and.network.is.disabled,.a |
9a500 | 62 6f 72 74 69 6e 67 27 29 3b 0a 7d 0a 7d 0a 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 | borting');.}.}..$this->io->write |
9a520 | 45 72 72 6f 72 28 24 6d 73 67 29 3b 0a 0a 24 63 6f 6d 6d 61 6e 64 43 61 6c 6c 61 62 6c 65 20 3d | Error($msg);..$commandCallable.= |
9a540 | 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 75 72 6c 29 20 75 73 65 20 28 24 72 65 | .static.function.($url).use.($re |
9a560 | 66 2c 20 24 63 6f 6d 6d 61 6e 64 2c 20 24 63 61 63 68 65 50 61 74 68 29 3a 20 73 74 72 69 6e 67 | f,.$command,.$cachePath):.string |
9a580 | 20 7b 0a 72 65 74 75 72 6e 20 73 74 72 5f 72 65 70 6c 61 63 65 28 0a 5b 27 25 75 72 6c 25 27 2c | .{.return.str_replace(.['%url%', |
9a5a0 | 20 27 25 72 65 66 25 27 2c 20 27 25 63 61 63 68 65 50 61 74 68 25 27 2c 20 27 25 73 61 6e 69 74 | .'%ref%',.'%cachePath%',.'%sanit |
9a5c0 | 69 7a 65 64 55 72 6c 25 27 5d 2c 0a 5b 0a 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3a 3a 65 | izedUrl%'],.[.ProcessExecutor::e |
9a5e0 | 73 63 61 70 65 28 24 75 72 6c 29 2c 0a 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3a 3a 65 73 | scape($url),.ProcessExecutor::es |
9a600 | 63 61 70 65 28 24 72 65 66 2e 27 5e 7b 63 6f 6d 6d 69 74 7d 27 29 2c 0a 50 72 6f 63 65 73 73 45 | cape($ref.'^{commit}'),.ProcessE |
9a620 | 78 65 63 75 74 6f 72 3a 3a 65 73 63 61 70 65 28 24 63 61 63 68 65 50 61 74 68 29 2c 0a 50 72 6f | xecutor::escape($cachePath),.Pro |
9a640 | 63 65 73 73 45 78 65 63 75 74 6f 72 3a 3a 65 73 63 61 70 65 28 50 72 65 67 3a 3a 72 65 70 6c 61 | cessExecutor::escape(Preg::repla |
9a660 | 63 65 28 27 7b 3a 2f 2f 28 5b 5e 40 5d 2b 3f 29 3a 28 2e 2b 3f 29 40 7d 27 2c 20 27 3a 2f 2f 27 | ce('{://([^@]+?):(.+?)@}',.'://' |
9a680 | 2c 20 24 75 72 6c 29 29 2c 0a 5d 2c 0a 24 63 6f 6d 6d 61 6e 64 0a 29 3b 0a 7d 3b 0a 0a 24 74 68 | ,.$url)),.],.$command.);.};..$th |
9a6a0 | 69 73 2d 3e 67 69 74 55 74 69 6c 2d 3e 72 75 6e 43 6f 6d 6d 61 6e 64 28 24 63 6f 6d 6d 61 6e 64 | is->gitUtil->runCommand($command |
9a6c0 | 43 61 6c 6c 61 62 6c 65 2c 20 24 75 72 6c 2c 20 24 70 61 74 68 29 3b 0a 69 66 20 28 24 6e 65 77 | Callable,.$url,.$path);.if.($new |
9a6e0 | 52 65 66 20 3d 20 24 74 68 69 73 2d 3e 75 70 64 61 74 65 54 6f 43 6f 6d 6d 69 74 28 24 74 61 72 | Ref.=.$this->updateToCommit($tar |
9a700 | 67 65 74 2c 20 24 70 61 74 68 2c 20 28 73 74 72 69 6e 67 29 20 24 72 65 66 2c 20 24 74 61 72 67 | get,.$path,.(string).$ref,.$targ |
9a720 | 65 74 2d 3e 67 65 74 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 29 29 20 7b 0a 69 66 20 28 24 | et->getPrettyVersion())).{.if.($ |
9a740 | 74 61 72 67 65 74 2d 3e 67 65 74 44 69 73 74 52 65 66 65 72 65 6e 63 65 28 29 20 3d 3d 3d 20 24 | target->getDistReference().===.$ |
9a760 | 74 61 72 67 65 74 2d 3e 67 65 74 53 6f 75 72 63 65 52 65 66 65 72 65 6e 63 65 28 29 29 20 7b 0a | target->getSourceReference()).{. |
9a780 | 24 74 61 72 67 65 74 2d 3e 73 65 74 44 69 73 74 52 65 66 65 72 65 6e 63 65 28 24 6e 65 77 52 65 | $target->setDistReference($newRe |
9a7a0 | 66 29 3b 0a 7d 0a 24 74 61 72 67 65 74 2d 3e 73 65 74 53 6f 75 72 63 65 52 65 66 65 72 65 6e 63 | f);.}.$target->setSourceReferenc |
9a7c0 | 65 28 24 6e 65 77 52 65 66 29 3b 0a 7d 0a 0a 24 75 70 64 61 74 65 4f 72 69 67 69 6e 55 72 6c 20 | e($newRef);.}..$updateOriginUrl. |
9a7e0 | 3d 20 66 61 6c 73 65 3b 0a 69 66 20 28 0a 30 20 3d 3d 3d 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 | =.false;.if.(.0.===.$this->proce |
9a800 | 73 73 2d 3e 65 78 65 63 75 74 65 28 27 67 69 74 20 72 65 6d 6f 74 65 20 2d 76 27 2c 20 24 6f 75 | ss->execute('git.remote.-v',.$ou |
9a820 | 74 70 75 74 2c 20 24 70 61 74 68 29 0a 26 26 20 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b | tput,.$path).&&.Preg::isMatch('{ |
9a840 | 5e 6f 72 69 67 69 6e 5c 73 2b 28 3f 50 3c 75 72 6c 3e 5c 53 2b 29 7d 6d 27 2c 20 24 6f 75 74 70 | ^origin\s+(?P<url>\S+)}m',.$outp |
9a860 | 75 74 2c 20 24 6f 72 69 67 69 6e 4d 61 74 63 68 29 0a 26 26 20 50 72 65 67 3a 3a 69 73 4d 61 74 | ut,.$originMatch).&&.Preg::isMat |
9a880 | 63 68 28 27 7b 5e 63 6f 6d 70 6f 73 65 72 5c 73 2b 28 3f 50 3c 75 72 6c 3e 5c 53 2b 29 7d 6d 27 | ch('{^composer\s+(?P<url>\S+)}m' |
9a8a0 | 2c 20 24 6f 75 74 70 75 74 2c 20 24 63 6f 6d 70 6f 73 65 72 4d 61 74 63 68 29 0a 29 20 7b 0a 69 | ,.$output,.$composerMatch).).{.i |
9a8c0 | 66 20 28 24 6f 72 69 67 69 6e 4d 61 74 63 68 5b 27 75 72 6c 27 5d 20 3d 3d 3d 20 24 63 6f 6d 70 | f.($originMatch['url'].===.$comp |
9a8e0 | 6f 73 65 72 4d 61 74 63 68 5b 27 75 72 6c 27 5d 20 26 26 20 24 63 6f 6d 70 6f 73 65 72 4d 61 74 | oserMatch['url'].&&.$composerMat |
9a900 | 63 68 5b 27 75 72 6c 27 5d 20 21 3d 3d 20 24 74 61 72 67 65 74 2d 3e 67 65 74 53 6f 75 72 63 65 | ch['url'].!==.$target->getSource |
9a920 | 55 72 6c 28 29 29 20 7b 0a 24 75 70 64 61 74 65 4f 72 69 67 69 6e 55 72 6c 20 3d 20 74 72 75 65 | Url()).{.$updateOriginUrl.=.true |
9a940 | 3b 0a 7d 0a 7d 0a 69 66 20 28 24 75 70 64 61 74 65 4f 72 69 67 69 6e 55 72 6c 20 26 26 20 24 74 | ;.}.}.if.($updateOriginUrl.&&.$t |
9a960 | 61 72 67 65 74 2d 3e 67 65 74 53 6f 75 72 63 65 55 72 6c 28 29 20 21 3d 3d 20 6e 75 6c 6c 29 20 | arget->getSourceUrl().!==.null). |
9a980 | 7b 0a 24 74 68 69 73 2d 3e 75 70 64 61 74 65 4f 72 69 67 69 6e 55 72 6c 28 24 70 61 74 68 2c 20 | {.$this->updateOriginUrl($path,. |
9a9a0 | 24 74 61 72 67 65 74 2d 3e 67 65 74 53 6f 75 72 63 65 55 72 6c 28 29 29 3b 0a 7d 0a 0a 72 65 74 | $target->getSourceUrl());.}..ret |
9a9c0 | 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 | urn.\React\Promise\resolve(null) |
9a9e0 | 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 4c 6f 63 61 6c | ;.}.....public.function.getLocal |
9aa00 | 43 68 61 6e 67 65 73 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 | Changes(PackageInterface.$packag |
9aa20 | 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 29 3a 20 3f 73 74 72 69 6e 67 0a 7b 0a 47 69 74 55 | e,.string.$path):.?string.{.GitU |
9aa40 | 74 69 6c 3a 3a 63 6c 65 61 6e 45 6e 76 28 29 3b 0a 69 66 20 28 21 24 74 68 69 73 2d 3e 68 61 73 | til::cleanEnv();.if.(!$this->has |
9aa60 | 4d 65 74 61 64 61 74 61 52 65 70 6f 73 69 74 6f 72 79 28 24 70 61 74 68 29 29 20 7b 0a 72 65 74 | MetadataRepository($path)).{.ret |
9aa80 | 75 72 6e 20 6e 75 6c 6c 3b 0a 7d 0a 0a 24 63 6f 6d 6d 61 6e 64 20 3d 20 27 67 69 74 20 73 74 61 | urn.null;.}..$command.=.'git.sta |
9aaa0 | 74 75 73 20 2d 2d 70 6f 72 63 65 6c 61 69 6e 20 2d 2d 75 6e 74 72 61 63 6b 65 64 2d 66 69 6c 65 | tus.--porcelain.--untracked-file |
9aac0 | 73 3d 6e 6f 27 3b 0a 69 66 20 28 30 20 21 3d 3d 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d | s=no';.if.(0.!==.$this->process- |
9aae0 | 3e 65 78 65 63 75 74 65 28 24 63 6f 6d 6d 61 6e 64 2c 20 24 6f 75 74 70 75 74 2c 20 24 70 61 74 | >execute($command,.$output,.$pat |
9ab00 | 68 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f | h)).{.throw.new.\RuntimeExceptio |
9ab20 | 6e 28 27 46 61 69 6c 65 64 20 74 6f 20 65 78 65 63 75 74 65 20 27 20 2e 20 24 63 6f 6d 6d 61 6e | n('Failed.to.execute.'...$comman |
9ab40 | 64 20 2e 20 22 5c 6e 5c 6e 22 20 2e 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 67 65 74 | d..."\n\n"...$this->process->get |
9ab60 | 45 72 72 6f 72 4f 75 74 70 75 74 28 29 29 3b 0a 7d 0a 0a 24 6f 75 74 70 75 74 20 3d 20 74 72 69 | ErrorOutput());.}..$output.=.tri |
9ab80 | 6d 28 24 6f 75 74 70 75 74 29 3b 0a 0a 72 65 74 75 72 6e 20 73 74 72 6c 65 6e 28 24 6f 75 74 70 | m($output);..return.strlen($outp |
9aba0 | 75 74 29 20 3e 20 30 20 3f 20 24 6f 75 74 70 75 74 20 3a 20 6e 75 6c 6c 3b 0a 7d 0a 0a 70 75 62 | ut).>.0.?.$output.:.null;.}..pub |
9abc0 | 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 55 6e 70 75 73 68 65 64 43 68 61 6e 67 65 73 28 | lic.function.getUnpushedChanges( |
9abe0 | 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e | PackageInterface.$package,.strin |
9ac00 | 67 20 24 70 61 74 68 29 3a 20 3f 73 74 72 69 6e 67 0a 7b 0a 47 69 74 55 74 69 6c 3a 3a 63 6c 65 | g.$path):.?string.{.GitUtil::cle |
9ac20 | 61 6e 45 6e 76 28 29 3b 0a 24 70 61 74 68 20 3d 20 24 74 68 69 73 2d 3e 6e 6f 72 6d 61 6c 69 7a | anEnv();.$path.=.$this->normaliz |
9ac40 | 65 50 61 74 68 28 24 70 61 74 68 29 3b 0a 69 66 20 28 21 24 74 68 69 73 2d 3e 68 61 73 4d 65 74 | ePath($path);.if.(!$this->hasMet |
9ac60 | 61 64 61 74 61 52 65 70 6f 73 69 74 6f 72 79 28 24 70 61 74 68 29 29 20 7b 0a 72 65 74 75 72 6e | adataRepository($path)).{.return |
9ac80 | 20 6e 75 6c 6c 3b 0a 7d 0a 0a 24 63 6f 6d 6d 61 6e 64 20 3d 20 27 67 69 74 20 73 68 6f 77 2d 72 | .null;.}..$command.=.'git.show-r |
9aca0 | 65 66 20 2d 2d 68 65 61 64 20 2d 64 27 3b 0a 69 66 20 28 30 20 21 3d 3d 20 24 74 68 69 73 2d 3e | ef.--head.-d';.if.(0.!==.$this-> |
9acc0 | 70 72 6f 63 65 73 73 2d 3e 65 78 65 63 75 74 65 28 24 63 6f 6d 6d 61 6e 64 2c 20 24 6f 75 74 70 | process->execute($command,.$outp |
9ace0 | 75 74 2c 20 24 70 61 74 68 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 | ut,.$path)).{.throw.new.\Runtime |
9ad00 | 45 78 63 65 70 74 69 6f 6e 28 27 46 61 69 6c 65 64 20 74 6f 20 65 78 65 63 75 74 65 20 27 20 2e | Exception('Failed.to.execute.'.. |
9ad20 | 20 24 63 6f 6d 6d 61 6e 64 20 2e 20 22 5c 6e 5c 6e 22 20 2e 20 24 74 68 69 73 2d 3e 70 72 6f 63 | .$command..."\n\n"...$this->proc |
9ad40 | 65 73 73 2d 3e 67 65 74 45 72 72 6f 72 4f 75 74 70 75 74 28 29 29 3b 0a 7d 0a 0a 24 72 65 66 73 | ess->getErrorOutput());.}..$refs |
9ad60 | 20 3d 20 74 72 69 6d 28 24 6f 75 74 70 75 74 29 3b 0a 69 66 20 28 21 50 72 65 67 3a 3a 69 73 4d | .=.trim($output);.if.(!Preg::isM |
9ad80 | 61 74 63 68 28 27 7b 5e 28 5b 61 2d 66 30 2d 39 5d 2b 29 20 48 45 41 44 24 7d 6d 69 27 2c 20 24 | atch('{^([a-f0-9]+).HEAD$}mi',.$ |
9ada0 | 72 65 66 73 2c 20 24 6d 61 74 63 68 29 29 20 7b 0a 0a 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0a 7d | refs,.$match)).{..return.null;.} |
9adc0 | 0a 0a 24 68 65 61 64 52 65 66 20 3d 20 24 6d 61 74 63 68 5b 31 5d 3b 0a 69 66 20 28 21 50 72 65 | ..$headRef.=.$match[1];.if.(!Pre |
9ade0 | 67 3a 3a 69 73 4d 61 74 63 68 41 6c 6c 28 27 7b 5e 27 2e 24 68 65 61 64 52 65 66 2e 27 20 72 65 | g::isMatchAll('{^'.$headRef.'.re |
9ae00 | 66 73 2f 68 65 61 64 73 2f 28 2e 2b 29 24 7d 6d 69 27 2c 20 24 72 65 66 73 2c 20 24 6d 61 74 63 | fs/heads/(.+)$}mi',.$refs,.$matc |
9ae20 | 68 65 73 29 29 20 7b 0a 0a 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0a 7d 0a 0a 24 63 61 6e 64 69 64 | hes)).{..return.null;.}..$candid |
9ae40 | 61 74 65 42 72 61 6e 63 68 65 73 20 3d 20 24 6d 61 74 63 68 65 73 5b 31 5d 3b 0a 0a 24 62 72 61 | ateBranches.=.$matches[1];..$bra |
9ae60 | 6e 63 68 20 3d 20 24 63 61 6e 64 69 64 61 74 65 42 72 61 6e 63 68 65 73 5b 30 5d 3b 0a 24 75 6e | nch.=.$candidateBranches[0];.$un |
9ae80 | 70 75 73 68 65 64 43 68 61 6e 67 65 73 20 3d 20 6e 75 6c 6c 3b 0a 24 62 72 61 6e 63 68 4e 6f 74 | pushedChanges.=.null;.$branchNot |
9aea0 | 46 6f 75 6e 64 45 72 72 6f 72 20 3d 20 66 61 6c 73 65 3b 0a 0a 0a 66 6f 72 20 28 24 69 20 3d 20 | FoundError.=.false;...for.($i.=. |
9aec0 | 30 3b 20 24 69 20 3c 3d 20 31 3b 20 24 69 2b 2b 29 20 7b 0a 24 72 65 6d 6f 74 65 42 72 61 6e 63 | 0;.$i.<=.1;.$i++).{.$remoteBranc |
9aee0 | 68 65 73 20 3d 20 5b 5d 3b 0a 0a 0a 66 6f 72 65 61 63 68 20 28 24 63 61 6e 64 69 64 61 74 65 42 | hes.=.[];...foreach.($candidateB |
9af00 | 72 61 6e 63 68 65 73 20 61 73 20 24 63 61 6e 64 69 64 61 74 65 29 20 7b 0a 69 66 20 28 50 72 65 | ranches.as.$candidate).{.if.(Pre |
9af20 | 67 3a 3a 69 73 4d 61 74 63 68 41 6c 6c 28 27 7b 5e 5b 61 2d 66 30 2d 39 5d 2b 20 72 65 66 73 2f | g::isMatchAll('{^[a-f0-9]+.refs/ |
9af40 | 72 65 6d 6f 74 65 73 2f 28 28 3f 3a 5b 5e 2f 5d 2b 29 2f 27 2e 70 72 65 67 5f 71 75 6f 74 65 28 | remotes/((?:[^/]+)/'.preg_quote( |
9af60 | 24 63 61 6e 64 69 64 61 74 65 29 2e 27 29 24 7d 6d 69 27 2c 20 24 72 65 66 73 2c 20 24 6d 61 74 | $candidate).')$}mi',.$refs,.$mat |
9af80 | 63 68 65 73 29 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 6d 61 74 63 68 65 73 5b 31 5d 20 61 73 | ches)).{.foreach.($matches[1].as |
9afa0 | 20 24 6d 61 74 63 68 29 20 7b 0a 24 62 72 61 6e 63 68 20 3d 20 24 63 61 6e 64 69 64 61 74 65 3b | .$match).{.$branch.=.$candidate; |
9afc0 | 0a 24 72 65 6d 6f 74 65 42 72 61 6e 63 68 65 73 5b 5d 20 3d 20 24 6d 61 74 63 68 3b 0a 7d 0a 62 | .$remoteBranches[].=.$match;.}.b |
9afe0 | 72 65 61 6b 3b 0a 7d 0a 7d 0a 0a 0a 0a 0a 69 66 20 28 21 24 72 65 6d 6f 74 65 42 72 61 6e 63 68 | reak;.}.}.....if.(!$remoteBranch |
9b000 | 65 73 29 20 7b 0a 24 75 6e 70 75 73 68 65 64 43 68 61 6e 67 65 73 20 3d 20 27 42 72 61 6e 63 68 | es).{.$unpushedChanges.=.'Branch |
9b020 | 20 27 20 2e 20 24 62 72 61 6e 63 68 20 2e 20 27 20 63 6f 75 6c 64 20 6e 6f 74 20 62 65 20 66 6f | .'...$branch...'.could.not.be.fo |
9b040 | 75 6e 64 20 6f 6e 20 61 6e 79 20 72 65 6d 6f 74 65 20 61 6e 64 20 61 70 70 65 61 72 73 20 74 6f | und.on.any.remote.and.appears.to |
9b060 | 20 62 65 20 75 6e 70 75 73 68 65 64 27 3b 0a 24 62 72 61 6e 63 68 4e 6f 74 46 6f 75 6e 64 45 72 | .be.unpushed';.$branchNotFoundEr |
9b080 | 72 6f 72 20 3d 20 74 72 75 65 3b 0a 7d 20 65 6c 73 65 20 7b 0a 0a 0a 69 66 20 28 24 62 72 61 6e | ror.=.true;.}.else.{...if.($bran |
9b0a0 | 63 68 4e 6f 74 46 6f 75 6e 64 45 72 72 6f 72 29 20 7b 0a 24 75 6e 70 75 73 68 65 64 43 68 61 6e | chNotFoundError).{.$unpushedChan |
9b0c0 | 67 65 73 20 3d 20 6e 75 6c 6c 3b 0a 7d 0a 66 6f 72 65 61 63 68 20 28 24 72 65 6d 6f 74 65 42 72 | ges.=.null;.}.foreach.($remoteBr |
9b0e0 | 61 6e 63 68 65 73 20 61 73 20 24 72 65 6d 6f 74 65 42 72 61 6e 63 68 29 20 7b 0a 24 63 6f 6d 6d | anches.as.$remoteBranch).{.$comm |
9b100 | 61 6e 64 20 3d 20 73 70 72 69 6e 74 66 28 27 67 69 74 20 64 69 66 66 20 2d 2d 6e 61 6d 65 2d 73 | and.=.sprintf('git.diff.--name-s |
9b120 | 74 61 74 75 73 20 25 73 2e 2e 2e 25 73 20 2d 2d 27 2c 20 24 72 65 6d 6f 74 65 42 72 61 6e 63 68 | tatus.%s...%s.--',.$remoteBranch |
9b140 | 2c 20 24 62 72 61 6e 63 68 29 3b 0a 69 66 20 28 30 20 21 3d 3d 20 24 74 68 69 73 2d 3e 70 72 6f | ,.$branch);.if.(0.!==.$this->pro |
9b160 | 63 65 73 73 2d 3e 65 78 65 63 75 74 65 28 24 63 6f 6d 6d 61 6e 64 2c 20 24 6f 75 74 70 75 74 2c | cess->execute($command,.$output, |
9b180 | 20 24 70 61 74 68 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 | .$path)).{.throw.new.\RuntimeExc |
9b1a0 | 65 70 74 69 6f 6e 28 27 46 61 69 6c 65 64 20 74 6f 20 65 78 65 63 75 74 65 20 27 20 2e 20 24 63 | eption('Failed.to.execute.'...$c |
9b1c0 | 6f 6d 6d 61 6e 64 20 2e 20 22 5c 6e 5c 6e 22 20 2e 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 | ommand..."\n\n"...$this->process |
9b1e0 | 2d 3e 67 65 74 45 72 72 6f 72 4f 75 74 70 75 74 28 29 29 3b 0a 7d 0a 0a 24 6f 75 74 70 75 74 20 | ->getErrorOutput());.}..$output. |
9b200 | 3d 20 74 72 69 6d 28 24 6f 75 74 70 75 74 29 3b 0a 0a 69 66 20 28 24 75 6e 70 75 73 68 65 64 43 | =.trim($output);..if.($unpushedC |
9b220 | 68 61 6e 67 65 73 20 3d 3d 3d 20 6e 75 6c 6c 20 7c 7c 20 73 74 72 6c 65 6e 28 24 6f 75 74 70 75 | hanges.===.null.||.strlen($outpu |
9b240 | 74 29 20 3c 20 73 74 72 6c 65 6e 28 24 75 6e 70 75 73 68 65 64 43 68 61 6e 67 65 73 29 29 20 7b | t).<.strlen($unpushedChanges)).{ |
9b260 | 0a 24 75 6e 70 75 73 68 65 64 43 68 61 6e 67 65 73 20 3d 20 24 6f 75 74 70 75 74 3b 0a 7d 0a 7d | .$unpushedChanges.=.$output;.}.} |
9b280 | 0a 7d 0a 0a 0a 0a 69 66 20 28 24 75 6e 70 75 73 68 65 64 43 68 61 6e 67 65 73 20 26 26 20 24 69 | .}....if.($unpushedChanges.&&.$i |
9b2a0 | 20 3d 3d 3d 20 30 29 20 7b 0a 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 65 78 65 63 75 74 | .===.0).{.$this->process->execut |
9b2c0 | 65 28 27 67 69 74 20 66 65 74 63 68 20 2d 2d 61 6c 6c 27 2c 20 24 6f 75 74 70 75 74 2c 20 24 70 | e('git.fetch.--all',.$output,.$p |
9b2e0 | 61 74 68 29 3b 0a 0a 0a 24 63 6f 6d 6d 61 6e 64 20 3d 20 27 67 69 74 20 73 68 6f 77 2d 72 65 66 | ath);...$command.=.'git.show-ref |
9b300 | 20 2d 2d 68 65 61 64 20 2d 64 27 3b 0a 69 66 20 28 30 20 21 3d 3d 20 24 74 68 69 73 2d 3e 70 72 | .--head.-d';.if.(0.!==.$this->pr |
9b320 | 6f 63 65 73 73 2d 3e 65 78 65 63 75 74 65 28 24 63 6f 6d 6d 61 6e 64 2c 20 24 6f 75 74 70 75 74 | ocess->execute($command,.$output |
9b340 | 2c 20 24 70 61 74 68 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 | ,.$path)).{.throw.new.\RuntimeEx |
9b360 | 63 65 70 74 69 6f 6e 28 27 46 61 69 6c 65 64 20 74 6f 20 65 78 65 63 75 74 65 20 27 20 2e 20 24 | ception('Failed.to.execute.'...$ |
9b380 | 63 6f 6d 6d 61 6e 64 20 2e 20 22 5c 6e 5c 6e 22 20 2e 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 | command..."\n\n"...$this->proces |
9b3a0 | 73 2d 3e 67 65 74 45 72 72 6f 72 4f 75 74 70 75 74 28 29 29 3b 0a 7d 0a 24 72 65 66 73 20 3d 20 | s->getErrorOutput());.}.$refs.=. |
9b3c0 | 74 72 69 6d 28 24 6f 75 74 70 75 74 29 3b 0a 7d 0a 0a 0a 69 66 20 28 21 24 75 6e 70 75 73 68 65 | trim($output);.}...if.(!$unpushe |
9b3e0 | 64 43 68 61 6e 67 65 73 29 20 7b 0a 62 72 65 61 6b 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 | dChanges).{.break;.}.}..return.$ |
9b400 | 75 6e 70 75 73 68 65 64 43 68 61 6e 67 65 73 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 | unpushedChanges;.}.....protected |
9b420 | 20 66 75 6e 63 74 69 6f 6e 20 63 6c 65 61 6e 43 68 61 6e 67 65 73 28 50 61 63 6b 61 67 65 49 6e | .function.cleanChanges(PackageIn |
9b440 | 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 2c 20 | terface.$package,.string.$path,. |
9b460 | 62 6f 6f 6c 20 24 75 70 64 61 74 65 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a | bool.$update):.PromiseInterface. |
9b480 | 7b 0a 47 69 74 55 74 69 6c 3a 3a 63 6c 65 61 6e 45 6e 76 28 29 3b 0a 24 70 61 74 68 20 3d 20 24 | {.GitUtil::cleanEnv();.$path.=.$ |
9b4a0 | 74 68 69 73 2d 3e 6e 6f 72 6d 61 6c 69 7a 65 50 61 74 68 28 24 70 61 74 68 29 3b 0a 0a 24 75 6e | this->normalizePath($path);..$un |
9b4c0 | 70 75 73 68 65 64 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 55 6e 70 75 73 68 65 64 43 68 61 6e 67 | pushed.=.$this->getUnpushedChang |
9b4e0 | 65 73 28 24 70 61 63 6b 61 67 65 2c 20 24 70 61 74 68 29 3b 0a 69 66 20 28 24 75 6e 70 75 73 68 | es($package,.$path);.if.($unpush |
9b500 | 65 64 20 26 26 20 28 24 74 68 69 73 2d 3e 69 6f 2d 3e 69 73 49 6e 74 65 72 61 63 74 69 76 65 28 | ed.&&.($this->io->isInteractive( |
9b520 | 29 20 7c 7c 20 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 64 69 73 63 61 72 64 | ).||.$this->config->get('discard |
9b540 | 2d 63 68 61 6e 67 65 73 27 29 20 21 3d 3d 20 74 72 75 65 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 | -changes').!==.true)).{.throw.ne |
9b560 | 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 53 6f 75 72 63 65 20 64 69 72 65 | w.\RuntimeException('Source.dire |
9b580 | 63 74 6f 72 79 20 27 20 2e 20 24 70 61 74 68 20 2e 20 27 20 68 61 73 20 75 6e 70 75 73 68 65 64 | ctory.'...$path...'.has.unpushed |
9b5a0 | 20 63 68 61 6e 67 65 73 20 6f 6e 20 74 68 65 20 63 75 72 72 65 6e 74 20 62 72 61 6e 63 68 3a 20 | .changes.on.the.current.branch:. |
9b5c0 | 27 2e 22 5c 6e 22 2e 24 75 6e 70 75 73 68 65 64 29 3b 0a 7d 0a 0a 69 66 20 28 6e 75 6c 6c 20 3d | '."\n".$unpushed);.}..if.(null.= |
9b5e0 | 3d 3d 20 28 24 63 68 61 6e 67 65 73 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 4c 6f 63 61 6c 43 68 | ==.($changes.=.$this->getLocalCh |
9b600 | 61 6e 67 65 73 28 24 70 61 63 6b 61 67 65 2c 20 24 70 61 74 68 29 29 29 20 7b 0a 72 65 74 75 72 | anges($package,.$path))).{.retur |
9b620 | 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a | n.\React\Promise\resolve(null);. |
9b640 | 7d 0a 0a 69 66 20 28 21 24 74 68 69 73 2d 3e 69 6f 2d 3e 69 73 49 6e 74 65 72 61 63 74 69 76 65 | }..if.(!$this->io->isInteractive |
9b660 | 28 29 29 20 7b 0a 24 64 69 73 63 61 72 64 43 68 61 6e 67 65 73 20 3d 20 24 74 68 69 73 2d 3e 63 | ()).{.$discardChanges.=.$this->c |
9b680 | 6f 6e 66 69 67 2d 3e 67 65 74 28 27 64 69 73 63 61 72 64 2d 63 68 61 6e 67 65 73 27 29 3b 0a 69 | onfig->get('discard-changes');.i |
9b6a0 | 66 20 28 74 72 75 65 20 3d 3d 3d 20 24 64 69 73 63 61 72 64 43 68 61 6e 67 65 73 29 20 7b 0a 72 | f.(true.===.$discardChanges).{.r |
9b6c0 | 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 64 69 73 63 61 72 64 43 68 61 6e 67 65 73 28 24 70 61 74 | eturn.$this->discardChanges($pat |
9b6e0 | 68 29 3b 0a 7d 0a 69 66 20 28 27 73 74 61 73 68 27 20 3d 3d 3d 20 24 64 69 73 63 61 72 64 43 68 | h);.}.if.('stash'.===.$discardCh |
9b700 | 61 6e 67 65 73 29 20 7b 0a 69 66 20 28 21 24 75 70 64 61 74 65 29 20 7b 0a 72 65 74 75 72 6e 20 | anges).{.if.(!$update).{.return. |
9b720 | 70 61 72 65 6e 74 3a 3a 63 6c 65 61 6e 43 68 61 6e 67 65 73 28 24 70 61 63 6b 61 67 65 2c 20 24 | parent::cleanChanges($package,.$ |
9b740 | 70 61 74 68 2c 20 24 75 70 64 61 74 65 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d | path,.$update);.}..return.$this- |
9b760 | 3e 73 74 61 73 68 43 68 61 6e 67 65 73 28 24 70 61 74 68 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 | >stashChanges($path);.}..return. |
9b780 | 70 61 72 65 6e 74 3a 3a 63 6c 65 61 6e 43 68 61 6e 67 65 73 28 24 70 61 63 6b 61 67 65 2c 20 24 | parent::cleanChanges($package,.$ |
9b7a0 | 70 61 74 68 2c 20 24 75 70 64 61 74 65 29 3b 0a 7d 0a 0a 24 63 68 61 6e 67 65 73 20 3d 20 61 72 | path,.$update);.}..$changes.=.ar |
9b7c0 | 72 61 79 5f 6d 61 70 28 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 65 6c 65 6d 29 3a | ray_map(static.function.($elem): |
9b7e0 | 20 73 74 72 69 6e 67 20 7b 0a 72 65 74 75 72 6e 20 27 20 20 20 20 27 2e 24 65 6c 65 6d 3b 0a 7d | .string.{.return.'....'.$elem;.} |
9b800 | 2c 20 50 72 65 67 3a 3a 73 70 6c 69 74 28 27 7b 5c 73 2a 5c 72 3f 5c 6e 5c 73 2a 7d 27 2c 20 24 | ,.Preg::split('{\s*\r?\n\s*}',.$ |
9b820 | 63 68 61 6e 67 65 73 29 29 3b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 | changes));.$this->io->writeError |
9b840 | 28 27 20 20 20 20 3c 65 72 72 6f 72 3e 27 2e 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 | ('....<error>'.$package->getPret |
9b860 | 74 79 4e 61 6d 65 28 29 2e 27 20 68 61 73 20 6d 6f 64 69 66 69 65 64 20 66 69 6c 65 73 3a 3c 2f | tyName().'.has.modified.files:</ |
9b880 | 65 72 72 6f 72 3e 27 29 3b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 | error>');.$this->io->writeError( |
9b8a0 | 61 72 72 61 79 5f 73 6c 69 63 65 28 24 63 68 61 6e 67 65 73 2c 20 30 2c 20 31 30 29 29 3b 0a 69 | array_slice($changes,.0,.10));.i |
9b8c0 | 66 20 28 63 6f 75 6e 74 28 24 63 68 61 6e 67 65 73 29 20 3e 20 31 30 29 20 7b 0a 24 74 68 69 73 | f.(count($changes).>.10).{.$this |
9b8e0 | 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 20 20 20 20 3c 69 6e 66 6f 3e 27 20 2e 20 | ->io->writeError('....<info>'... |
9b900 | 28 63 6f 75 6e 74 28 24 63 68 61 6e 67 65 73 29 20 2d 20 31 30 29 20 2e 20 27 20 6d 6f 72 65 20 | (count($changes).-.10)...'.more. |
9b920 | 66 69 6c 65 73 20 6d 6f 64 69 66 69 65 64 2c 20 63 68 6f 6f 73 65 20 22 76 22 20 74 6f 20 76 69 | files.modified,.choose."v".to.vi |
9b940 | 65 77 20 74 68 65 20 66 75 6c 6c 20 6c 69 73 74 3c 2f 69 6e 66 6f 3e 27 29 3b 0a 7d 0a 0a 77 68 | ew.the.full.list</info>');.}..wh |
9b960 | 69 6c 65 20 28 74 72 75 65 29 20 7b 0a 73 77 69 74 63 68 20 28 24 74 68 69 73 2d 3e 69 6f 2d 3e | ile.(true).{.switch.($this->io-> |
9b980 | 61 73 6b 28 27 20 20 20 20 3c 69 6e 66 6f 3e 44 69 73 63 61 72 64 20 63 68 61 6e 67 65 73 20 5b | ask('....<info>Discard.changes.[ |
9b9a0 | 79 2c 6e 2c 76 2c 64 2c 27 2e 28 24 75 70 64 61 74 65 20 3f 20 27 73 2c 27 20 3a 20 27 27 29 2e | y,n,v,d,'.($update.?.'s,'.:.''). |
9b9c0 | 27 3f 5d 3f 3c 2f 69 6e 66 6f 3e 20 27 2c 20 27 3f 27 29 29 20 7b 0a 63 61 73 65 20 27 79 27 3a | '?]?</info>.',.'?')).{.case.'y': |
9b9e0 | 0a 24 74 68 69 73 2d 3e 64 69 73 63 61 72 64 43 68 61 6e 67 65 73 28 24 70 61 74 68 29 3b 0a 62 | .$this->discardChanges($path);.b |
9ba00 | 72 65 61 6b 20 32 3b 0a 0a 63 61 73 65 20 27 73 27 3a 0a 69 66 20 28 21 24 75 70 64 61 74 65 29 | reak.2;..case.'s':.if.(!$update) |
9ba20 | 20 7b 0a 67 6f 74 6f 20 68 65 6c 70 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 73 74 61 73 68 43 68 61 | .{.goto.help;.}..$this->stashCha |
9ba40 | 6e 67 65 73 28 24 70 61 74 68 29 3b 0a 62 72 65 61 6b 20 32 3b 0a 0a 63 61 73 65 20 27 6e 27 3a | nges($path);.break.2;..case.'n': |
9ba60 | 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 55 70 | .throw.new.\RuntimeException('Up |
9ba80 | 64 61 74 65 20 61 62 6f 72 74 65 64 27 29 3b 0a 0a 63 61 73 65 20 27 76 27 3a 0a 24 74 68 69 73 | date.aborted');..case.'v':.$this |
9baa0 | 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 24 63 68 61 6e 67 65 73 29 3b 0a 62 72 65 61 | ->io->writeError($changes);.brea |
9bac0 | 6b 3b 0a 0a 63 61 73 65 20 27 64 27 3a 0a 24 74 68 69 73 2d 3e 76 69 65 77 44 69 66 66 28 24 70 | k;..case.'d':.$this->viewDiff($p |
9bae0 | 61 74 68 29 3b 0a 62 72 65 61 6b 3b 0a 0a 63 61 73 65 20 27 3f 27 3a 0a 64 65 66 61 75 6c 74 3a | ath);.break;..case.'?':.default: |
9bb00 | 0a 68 65 6c 70 20 3a 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 5b 0a | .help.:.$this->io->writeError([. |
9bb20 | 27 20 20 20 20 79 20 2d 20 64 69 73 63 61 72 64 20 63 68 61 6e 67 65 73 20 61 6e 64 20 61 70 70 | '....y.-.discard.changes.and.app |
9bb40 | 6c 79 20 74 68 65 20 27 2e 28 24 75 70 64 61 74 65 20 3f 20 27 75 70 64 61 74 65 27 20 3a 20 27 | ly.the.'.($update.?.'update'.:.' |
9bb60 | 75 6e 69 6e 73 74 61 6c 6c 27 29 2c 0a 27 20 20 20 20 6e 20 2d 20 61 62 6f 72 74 20 74 68 65 20 | uninstall'),.'....n.-.abort.the. |
9bb80 | 27 2e 28 24 75 70 64 61 74 65 20 3f 20 27 75 70 64 61 74 65 27 20 3a 20 27 75 6e 69 6e 73 74 61 | '.($update.?.'update'.:.'uninsta |
9bba0 | 6c 6c 27 29 2e 27 20 61 6e 64 20 6c 65 74 20 79 6f 75 20 6d 61 6e 75 61 6c 6c 79 20 63 6c 65 61 | ll').'.and.let.you.manually.clea |
9bbc0 | 6e 20 74 68 69 6e 67 73 20 75 70 27 2c 0a 27 20 20 20 20 76 20 2d 20 76 69 65 77 20 6d 6f 64 69 | n.things.up',.'....v.-.view.modi |
9bbe0 | 66 69 65 64 20 66 69 6c 65 73 27 2c 0a 27 20 20 20 20 64 20 2d 20 76 69 65 77 20 6c 6f 63 61 6c | fied.files',.'....d.-.view.local |
9bc00 | 20 6d 6f 64 69 66 69 63 61 74 69 6f 6e 73 20 28 64 69 66 66 29 27 2c 0a 5d 29 3b 0a 69 66 20 28 | .modifications.(diff)',.]);.if.( |
9bc20 | 24 75 70 64 61 74 65 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 | $update).{.$this->io->writeError |
9bc40 | 28 27 20 20 20 20 73 20 2d 20 73 74 61 73 68 20 63 68 61 6e 67 65 73 20 61 6e 64 20 74 72 79 20 | ('....s.-.stash.changes.and.try. |
9bc60 | 74 6f 20 72 65 61 70 70 6c 79 20 74 68 65 6d 20 61 66 74 65 72 20 74 68 65 20 75 70 64 61 74 65 | to.reapply.them.after.the.update |
9bc80 | 27 29 3b 0a 7d 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 20 20 20 | ');.}.$this->io->writeError('... |
9bca0 | 20 3f 20 2d 20 70 72 69 6e 74 20 68 65 6c 70 27 29 3b 0a 62 72 65 61 6b 3b 0a 7d 0a 7d 0a 0a 72 | .?.-.print.help');.break;.}.}..r |
9bcc0 | 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e 75 6c | eturn.\React\Promise\resolve(nul |
9bce0 | 6c 29 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 72 65 61 | l);.}.....protected.function.rea |
9bd00 | 70 70 6c 79 43 68 61 6e 67 65 73 28 73 74 72 69 6e 67 20 24 70 61 74 68 29 3a 20 76 6f 69 64 0a | pplyChanges(string.$path):.void. |
9bd20 | 7b 0a 24 70 61 74 68 20 3d 20 24 74 68 69 73 2d 3e 6e 6f 72 6d 61 6c 69 7a 65 50 61 74 68 28 24 | {.$path.=.$this->normalizePath($ |
9bd40 | 70 61 74 68 29 3b 0a 69 66 20 28 21 65 6d 70 74 79 28 24 74 68 69 73 2d 3e 68 61 73 53 74 61 73 | path);.if.(!empty($this->hasStas |
9bd60 | 68 65 64 43 68 61 6e 67 65 73 5b 24 70 61 74 68 5d 29 29 20 7b 0a 75 6e 73 65 74 28 24 74 68 69 | hedChanges[$path])).{.unset($thi |
9bd80 | 73 2d 3e 68 61 73 53 74 61 73 68 65 64 43 68 61 6e 67 65 73 5b 24 70 61 74 68 5d 29 3b 0a 24 74 | s->hasStashedChanges[$path]);.$t |
9bda0 | 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 20 20 20 20 3c 69 6e 66 6f 3e 52 | his->io->writeError('....<info>R |
9bdc0 | 65 2d 61 70 70 6c 79 69 6e 67 20 73 74 61 73 68 65 64 20 63 68 61 6e 67 65 73 3c 2f 69 6e 66 6f | e-applying.stashed.changes</info |
9bde0 | 3e 27 29 3b 0a 69 66 20 28 30 20 21 3d 3d 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 65 | >');.if.(0.!==.$this->process->e |
9be00 | 78 65 63 75 74 65 28 27 67 69 74 20 73 74 61 73 68 20 70 6f 70 27 2c 20 24 6f 75 74 70 75 74 2c | xecute('git.stash.pop',.$output, |
9be20 | 20 24 70 61 74 68 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 | .$path)).{.throw.new.\RuntimeExc |
9be40 | 65 70 74 69 6f 6e 28 22 46 61 69 6c 65 64 20 74 6f 20 61 70 70 6c 79 20 73 74 61 73 68 65 64 20 | eption("Failed.to.apply.stashed. |
9be60 | 63 68 61 6e 67 65 73 3a 5c 6e 5c 6e 22 2e 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 67 65 | changes:\n\n".$this->process->ge |
9be80 | 74 45 72 72 6f 72 4f 75 74 70 75 74 28 29 29 3b 0a 7d 0a 7d 0a 0a 75 6e 73 65 74 28 24 74 68 69 | tErrorOutput());.}.}..unset($thi |
9bea0 | 73 2d 3e 68 61 73 44 69 73 63 61 72 64 65 64 43 68 61 6e 67 65 73 5b 24 70 61 74 68 5d 29 3b 0a | s->hasDiscardedChanges[$path]);. |
9bec0 | 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 75 70 64 61 | }........protected.function.upda |
9bee0 | 74 65 54 6f 43 6f 6d 6d 69 74 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 | teToCommit(PackageInterface.$pac |
9bf00 | 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 2c 20 73 74 72 69 6e 67 20 24 72 65 66 65 | kage,.string.$path,.string.$refe |
9bf20 | 72 65 6e 63 65 2c 20 73 74 72 69 6e 67 20 24 70 72 65 74 74 79 56 65 72 73 69 6f 6e 29 3a 20 3f | rence,.string.$prettyVersion):.? |
9bf40 | 73 74 72 69 6e 67 0a 7b 0a 24 66 6f 72 63 65 20 3d 20 21 65 6d 70 74 79 28 24 74 68 69 73 2d 3e | string.{.$force.=.!empty($this-> |
9bf60 | 68 61 73 44 69 73 63 61 72 64 65 64 43 68 61 6e 67 65 73 5b 24 70 61 74 68 5d 29 20 7c 7c 20 21 | hasDiscardedChanges[$path]).||.! |
9bf80 | 65 6d 70 74 79 28 24 74 68 69 73 2d 3e 68 61 73 53 74 61 73 68 65 64 43 68 61 6e 67 65 73 5b 24 | empty($this->hasStashedChanges[$ |
9bfa0 | 70 61 74 68 5d 29 20 3f 20 27 2d 66 20 27 20 3a 20 27 27 3b 0a 0a 0a 0a 0a 0a 0a 24 74 65 6d 70 | path]).?.'-f.'.:.'';.......$temp |
9bfc0 | 6c 61 74 65 20 3d 20 27 67 69 74 20 63 68 65 63 6b 6f 75 74 20 27 2e 24 66 6f 72 63 65 2e 27 25 | late.=.'git.checkout.'.$force.'% |
9bfe0 | 73 20 2d 2d 20 26 26 20 67 69 74 20 72 65 73 65 74 20 2d 2d 68 61 72 64 20 25 31 24 73 20 2d 2d | s.--.&&.git.reset.--hard.%1$s.-- |
9c000 | 27 3b 0a 24 62 72 61 6e 63 68 20 3d 20 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 28 27 7b 28 3f 3a | ';.$branch.=.Preg::replace('{(?: |
9c020 | 5e 64 65 76 2d 7c 28 3f 3a 5c 2e 78 29 3f 2d 64 65 76 24 29 7d 69 27 2c 20 27 27 2c 20 24 70 72 | ^dev-|(?:\.x)?-dev$)}i',.'',.$pr |
9c040 | 65 74 74 79 56 65 72 73 69 6f 6e 29 3b 0a 0a 24 62 72 61 6e 63 68 65 73 20 3d 20 6e 75 6c 6c 3b | ettyVersion);..$branches.=.null; |
9c060 | 0a 69 66 20 28 30 20 3d 3d 3d 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 65 78 65 63 75 | .if.(0.===.$this->process->execu |
9c080 | 74 65 28 27 67 69 74 20 62 72 61 6e 63 68 20 2d 72 27 2c 20 24 6f 75 74 70 75 74 2c 20 24 70 61 | te('git.branch.-r',.$output,.$pa |
9c0a0 | 74 68 29 29 20 7b 0a 24 62 72 61 6e 63 68 65 73 20 3d 20 24 6f 75 74 70 75 74 3b 0a 7d 0a 0a 0a | th)).{.$branches.=.$output;.}... |
9c0c0 | 24 67 69 74 52 65 66 20 3d 20 24 72 65 66 65 72 65 6e 63 65 3b 0a 69 66 20 28 21 50 72 65 67 3a | $gitRef.=.$reference;.if.(!Preg: |
9c0e0 | 3a 69 73 4d 61 74 63 68 28 27 7b 5e 5b 61 2d 66 30 2d 39 5d 7b 34 30 7d 24 7d 27 2c 20 24 72 65 | :isMatch('{^[a-f0-9]{40}$}',.$re |
9c100 | 66 65 72 65 6e 63 65 29 0a 26 26 20 6e 75 6c 6c 20 21 3d 3d 20 24 62 72 61 6e 63 68 65 73 0a 26 | ference).&&.null.!==.$branches.& |
9c120 | 26 20 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b 5e 5c 73 2b 63 6f 6d 70 6f 73 65 72 2f 27 | &.Preg::isMatch('{^\s+composer/' |
9c140 | 2e 70 72 65 67 5f 71 75 6f 74 65 28 24 72 65 66 65 72 65 6e 63 65 29 2e 27 24 7d 6d 27 2c 20 24 | .preg_quote($reference).'$}m',.$ |
9c160 | 62 72 61 6e 63 68 65 73 29 0a 29 20 7b 0a 24 63 6f 6d 6d 61 6e 64 20 3d 20 73 70 72 69 6e 74 66 | branches).).{.$command.=.sprintf |
9c180 | 28 27 67 69 74 20 63 68 65 63 6b 6f 75 74 20 27 2e 24 66 6f 72 63 65 2e 27 2d 42 20 25 73 20 25 | ('git.checkout.'.$force.'-B.%s.% |
9c1a0 | 73 20 2d 2d 20 26 26 20 67 69 74 20 72 65 73 65 74 20 2d 2d 68 61 72 64 20 25 32 24 73 20 2d 2d | s.--.&&.git.reset.--hard.%2$s.-- |
9c1c0 | 27 2c 20 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3a 3a 65 73 63 61 70 65 28 24 62 72 61 6e | ',.ProcessExecutor::escape($bran |
9c1e0 | 63 68 29 2c 20 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3a 3a 65 73 63 61 70 65 28 27 63 6f | ch),.ProcessExecutor::escape('co |
9c200 | 6d 70 6f 73 65 72 2f 27 2e 24 72 65 66 65 72 65 6e 63 65 29 29 3b 0a 69 66 20 28 30 20 3d 3d 3d | mposer/'.$reference));.if.(0.=== |
9c220 | 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 65 78 65 63 75 74 65 28 24 63 6f 6d 6d 61 6e | .$this->process->execute($comman |
9c240 | 64 2c 20 24 6f 75 74 70 75 74 2c 20 24 70 61 74 68 29 29 20 7b 0a 72 65 74 75 72 6e 20 6e 75 6c | d,.$output,.$path)).{.return.nul |
9c260 | 6c 3b 0a 7d 0a 7d 0a 0a 0a 69 66 20 28 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b 5e 5b 61 | l;.}.}...if.(Preg::isMatch('{^[a |
9c280 | 2d 66 30 2d 39 5d 7b 34 30 7d 24 7d 27 2c 20 24 72 65 66 65 72 65 6e 63 65 29 29 20 7b 0a 0a 69 | -f0-9]{40}$}',.$reference)).{..i |
9c2a0 | 66 20 28 6e 75 6c 6c 20 21 3d 3d 20 24 62 72 61 6e 63 68 65 73 20 26 26 20 21 50 72 65 67 3a 3a | f.(null.!==.$branches.&&.!Preg:: |
9c2c0 | 69 73 4d 61 74 63 68 28 27 7b 5e 5c 73 2b 63 6f 6d 70 6f 73 65 72 2f 27 2e 70 72 65 67 5f 71 75 | isMatch('{^\s+composer/'.preg_qu |
9c2e0 | 6f 74 65 28 24 62 72 61 6e 63 68 29 2e 27 24 7d 6d 27 2c 20 24 62 72 61 6e 63 68 65 73 29 20 26 | ote($branch).'$}m',.$branches).& |
9c300 | 26 20 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b 5e 5c 73 2b 63 6f 6d 70 6f 73 65 72 2f 76 | &.Preg::isMatch('{^\s+composer/v |
9c320 | 27 2e 70 72 65 67 5f 71 75 6f 74 65 28 24 62 72 61 6e 63 68 29 2e 27 24 7d 6d 27 2c 20 24 62 72 | '.preg_quote($branch).'$}m',.$br |
9c340 | 61 6e 63 68 65 73 29 29 20 7b 0a 24 62 72 61 6e 63 68 20 3d 20 27 76 27 20 2e 20 24 62 72 61 6e | anches)).{.$branch.=.'v'...$bran |
9c360 | 63 68 3b 0a 7d 0a 0a 24 63 6f 6d 6d 61 6e 64 20 3d 20 73 70 72 69 6e 74 66 28 27 67 69 74 20 63 | ch;.}..$command.=.sprintf('git.c |
9c380 | 68 65 63 6b 6f 75 74 20 25 73 20 2d 2d 27 2c 20 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3a | heckout.%s.--',.ProcessExecutor: |
9c3a0 | 3a 65 73 63 61 70 65 28 24 62 72 61 6e 63 68 29 29 3b 0a 24 66 61 6c 6c 62 61 63 6b 43 6f 6d 6d | :escape($branch));.$fallbackComm |
9c3c0 | 61 6e 64 20 3d 20 73 70 72 69 6e 74 66 28 27 67 69 74 20 63 68 65 63 6b 6f 75 74 20 27 2e 24 66 | and.=.sprintf('git.checkout.'.$f |
9c3e0 | 6f 72 63 65 2e 27 2d 42 20 25 73 20 25 73 20 2d 2d 27 2c 20 50 72 6f 63 65 73 73 45 78 65 63 75 | orce.'-B.%s.%s.--',.ProcessExecu |
9c400 | 74 6f 72 3a 3a 65 73 63 61 70 65 28 24 62 72 61 6e 63 68 29 2c 20 50 72 6f 63 65 73 73 45 78 65 | tor::escape($branch),.ProcessExe |
9c420 | 63 75 74 6f 72 3a 3a 65 73 63 61 70 65 28 27 63 6f 6d 70 6f 73 65 72 2f 27 2e 24 62 72 61 6e 63 | cutor::escape('composer/'.$branc |
9c440 | 68 29 29 3b 0a 24 72 65 73 65 74 43 6f 6d 6d 61 6e 64 20 3d 20 73 70 72 69 6e 74 66 28 27 67 69 | h));.$resetCommand.=.sprintf('gi |
9c460 | 74 20 72 65 73 65 74 20 2d 2d 68 61 72 64 20 25 73 20 2d 2d 27 2c 20 50 72 6f 63 65 73 73 45 78 | t.reset.--hard.%s.--',.ProcessEx |
9c480 | 65 63 75 74 6f 72 3a 3a 65 73 63 61 70 65 28 24 72 65 66 65 72 65 6e 63 65 29 29 3b 0a 0a 69 66 | ecutor::escape($reference));..if |
9c4a0 | 20 28 30 20 3d 3d 3d 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 65 78 65 63 75 74 65 28 | .(0.===.$this->process->execute( |
9c4c0 | 22 28 24 63 6f 6d 6d 61 6e 64 20 7c 7c 20 24 66 61 6c 6c 62 61 63 6b 43 6f 6d 6d 61 6e 64 29 20 | "($command.||.$fallbackCommand). |
9c4e0 | 26 26 20 24 72 65 73 65 74 43 6f 6d 6d 61 6e 64 22 2c 20 24 6f 75 74 70 75 74 2c 20 24 70 61 74 | &&.$resetCommand",.$output,.$pat |
9c500 | 68 29 29 20 7b 0a 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0a 7d 0a 7d 0a 0a 24 63 6f 6d 6d 61 6e 64 | h)).{.return.null;.}.}..$command |
9c520 | 20 3d 20 73 70 72 69 6e 74 66 28 24 74 65 6d 70 6c 61 74 65 2c 20 50 72 6f 63 65 73 73 45 78 65 | .=.sprintf($template,.ProcessExe |
9c540 | 63 75 74 6f 72 3a 3a 65 73 63 61 70 65 28 24 67 69 74 52 65 66 29 29 3b 0a 69 66 20 28 30 20 3d | cutor::escape($gitRef));.if.(0.= |
9c560 | 3d 3d 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 65 78 65 63 75 74 65 28 24 63 6f 6d 6d | ==.$this->process->execute($comm |
9c580 | 61 6e 64 2c 20 24 6f 75 74 70 75 74 2c 20 24 70 61 74 68 29 29 20 7b 0a 72 65 74 75 72 6e 20 6e | and,.$output,.$path)).{.return.n |
9c5a0 | 75 6c 6c 3b 0a 7d 0a 0a 24 65 78 63 65 70 74 69 6f 6e 45 78 74 72 61 20 3d 20 27 27 3b 0a 0a 0a | ull;.}..$exceptionExtra.=.'';... |
9c5c0 | 69 66 20 28 66 61 6c 73 65 20 21 3d 3d 20 73 74 72 70 6f 73 28 24 74 68 69 73 2d 3e 70 72 6f 63 | if.(false.!==.strpos($this->proc |
9c5e0 | 65 73 73 2d 3e 67 65 74 45 72 72 6f 72 4f 75 74 70 75 74 28 29 2c 20 24 72 65 66 65 72 65 6e 63 | ess->getErrorOutput(),.$referenc |
9c600 | 65 29 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 20 20 20 | e)).{.$this->io->writeError('... |
9c620 | 20 3c 77 61 72 6e 69 6e 67 3e 27 2e 24 72 65 66 65 72 65 6e 63 65 2e 27 20 69 73 20 67 6f 6e 65 | .<warning>'.$reference.'.is.gone |
9c640 | 20 28 68 69 73 74 6f 72 79 20 77 61 73 20 72 65 77 72 69 74 74 65 6e 3f 29 3c 2f 77 61 72 6e 69 | .(history.was.rewritten?)</warni |
9c660 | 6e 67 3e 27 29 3b 0a 24 65 78 63 65 70 74 69 6f 6e 45 78 74 72 61 20 3d 20 22 5c 6e 49 74 20 6c | ng>');.$exceptionExtra.=."\nIt.l |
9c680 | 6f 6f 6b 73 20 6c 69 6b 65 20 74 68 65 20 63 6f 6d 6d 69 74 20 68 61 73 68 20 69 73 20 6e 6f 74 | ooks.like.the.commit.hash.is.not |
9c6a0 | 20 61 76 61 69 6c 61 62 6c 65 20 69 6e 20 74 68 65 20 72 65 70 6f 73 69 74 6f 72 79 2c 20 6d 61 | .available.in.the.repository,.ma |
9c6c0 | 79 62 65 20 22 2e 28 24 70 61 63 6b 61 67 65 2d 3e 69 73 44 65 76 28 29 20 3f 20 27 74 68 65 20 | ybe.".($package->isDev().?.'the. |
9c6e0 | 63 6f 6d 6d 69 74 20 77 61 73 20 72 65 6d 6f 76 65 64 20 66 72 6f 6d 20 74 68 65 20 62 72 61 6e | commit.was.removed.from.the.bran |
9c700 | 63 68 27 20 3a 20 27 74 68 65 20 74 61 67 20 77 61 73 20 72 65 63 72 65 61 74 65 64 27 29 2e 27 | ch'.:.'the.tag.was.recreated').' |
9c720 | 3f 20 52 75 6e 20 22 63 6f 6d 70 6f 73 65 72 20 75 70 64 61 74 65 20 27 2e 24 70 61 63 6b 61 67 | ?.Run."composer.update.'.$packag |
9c740 | 65 2d 3e 67 65 74 50 72 65 74 74 79 4e 61 6d 65 28 29 2e 27 22 20 74 6f 20 72 65 73 6f 6c 76 65 | e->getPrettyName().'".to.resolve |
9c760 | 20 74 68 69 73 2e 27 3b 0a 7d 0a 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 | .this.';.}..throw.new.\RuntimeEx |
9c780 | 63 65 70 74 69 6f 6e 28 55 72 6c 3a 3a 73 61 6e 69 74 69 7a 65 28 27 46 61 69 6c 65 64 20 74 6f | ception(Url::sanitize('Failed.to |
9c7a0 | 20 65 78 65 63 75 74 65 20 27 20 2e 20 24 63 6f 6d 6d 61 6e 64 20 2e 20 22 5c 6e 5c 6e 22 20 2e | .execute.'...$command..."\n\n".. |
9c7c0 | 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 67 65 74 45 72 72 6f 72 4f 75 74 70 75 74 28 | .$this->process->getErrorOutput( |
9c7e0 | 29 20 2e 20 24 65 78 63 65 70 74 69 6f 6e 45 78 74 72 61 29 29 3b 0a 7d 0a 0a 70 72 6f 74 65 63 | )...$exceptionExtra));.}..protec |
9c800 | 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 75 70 64 61 74 65 4f 72 69 67 69 6e 55 72 6c 28 73 74 72 | ted.function.updateOriginUrl(str |
9c820 | 69 6e 67 20 24 70 61 74 68 2c 20 73 74 72 69 6e 67 20 24 75 72 6c 29 3a 20 76 6f 69 64 0a 7b 0a | ing.$path,.string.$url):.void.{. |
9c840 | 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 65 78 65 63 75 74 65 28 73 70 72 69 6e 74 66 28 | $this->process->execute(sprintf( |
9c860 | 27 67 69 74 20 72 65 6d 6f 74 65 20 73 65 74 2d 75 72 6c 20 6f 72 69 67 69 6e 20 2d 2d 20 25 73 | 'git.remote.set-url.origin.--.%s |
9c880 | 27 2c 20 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3a 3a 65 73 63 61 70 65 28 24 75 72 6c 29 | ',.ProcessExecutor::escape($url) |
9c8a0 | 29 2c 20 24 6f 75 74 70 75 74 2c 20 24 70 61 74 68 29 3b 0a 24 74 68 69 73 2d 3e 73 65 74 50 75 | ),.$output,.$path);.$this->setPu |
9c8c0 | 73 68 55 72 6c 28 24 70 61 74 68 2c 20 24 75 72 6c 29 3b 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 | shUrl($path,.$url);.}..protected |
9c8e0 | 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 50 75 73 68 55 72 6c 28 73 74 72 69 6e 67 20 24 70 61 74 | .function.setPushUrl(string.$pat |
9c900 | 68 2c 20 73 74 72 69 6e 67 20 24 75 72 6c 29 3a 20 76 6f 69 64 0a 7b 0a 0a 69 66 20 28 50 72 65 | h,.string.$url):.void.{..if.(Pre |
9c920 | 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b 5e 28 3f 3a 68 74 74 70 73 3f 7c 67 69 74 29 3a 2f 2f 27 | g::isMatch('{^(?:https?|git)://' |
9c940 | 2e 47 69 74 55 74 69 6c 3a 3a 67 65 74 47 69 74 48 75 62 44 6f 6d 61 69 6e 73 52 65 67 65 78 28 | .GitUtil::getGitHubDomainsRegex( |
9c960 | 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 29 2e 27 2f 28 5b 5e 2f 5d 2b 29 2f 28 5b 5e 2f 5d 2b 3f | $this->config).'/([^/]+)/([^/]+? |
9c980 | 29 28 3f 3a 5c 2e 67 69 74 29 3f 24 7d 27 2c 20 24 75 72 6c 2c 20 24 6d 61 74 63 68 29 29 20 7b | )(?:\.git)?$}',.$url,.$match)).{ |
9c9a0 | 0a 24 70 72 6f 74 6f 63 6f 6c 73 20 3d 20 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 2d 3e 67 65 74 | .$protocols.=.$this->config->get |
9c9c0 | 28 27 67 69 74 68 75 62 2d 70 72 6f 74 6f 63 6f 6c 73 27 29 3b 0a 24 70 75 73 68 55 72 6c 20 3d | ('github-protocols');.$pushUrl.= |
9c9e0 | 20 27 67 69 74 40 27 2e 24 6d 61 74 63 68 5b 31 5d 2e 27 3a 27 2e 24 6d 61 74 63 68 5b 32 5d 2e | .'git@'.$match[1].':'.$match[2]. |
9ca00 | 27 2f 27 2e 24 6d 61 74 63 68 5b 33 5d 2e 27 2e 67 69 74 27 3b 0a 69 66 20 28 21 69 6e 5f 61 72 | '/'.$match[3].'.git';.if.(!in_ar |
9ca20 | 72 61 79 28 27 73 73 68 27 2c 20 24 70 72 6f 74 6f 63 6f 6c 73 2c 20 74 72 75 65 29 29 20 7b 0a | ray('ssh',.$protocols,.true)).{. |
9ca40 | 24 70 75 73 68 55 72 6c 20 3d 20 27 68 74 74 70 73 3a 2f 2f 27 20 2e 20 24 6d 61 74 63 68 5b 31 | $pushUrl.=.'https://'...$match[1 |
9ca60 | 5d 20 2e 20 27 2f 27 2e 24 6d 61 74 63 68 5b 32 5d 2e 27 2f 27 2e 24 6d 61 74 63 68 5b 33 5d 2e | ]...'/'.$match[2].'/'.$match[3]. |
9ca80 | 27 2e 67 69 74 27 3b 0a 7d 0a 24 63 6d 64 20 3d 20 73 70 72 69 6e 74 66 28 27 67 69 74 20 72 65 | '.git';.}.$cmd.=.sprintf('git.re |
9caa0 | 6d 6f 74 65 20 73 65 74 2d 75 72 6c 20 2d 2d 70 75 73 68 20 6f 72 69 67 69 6e 20 2d 2d 20 25 73 | mote.set-url.--push.origin.--.%s |
9cac0 | 27 2c 20 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3a 3a 65 73 63 61 70 65 28 24 70 75 73 68 | ',.ProcessExecutor::escape($push |
9cae0 | 55 72 6c 29 29 3b 0a 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 65 78 65 63 75 74 65 28 24 | Url));.$this->process->execute($ |
9cb00 | 63 6d 64 2c 20 24 69 67 6e 6f 72 65 64 4f 75 74 70 75 74 2c 20 24 70 61 74 68 29 3b 0a 7d 0a 7d | cmd,.$ignoredOutput,.$path);.}.} |
9cb20 | 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 43 6f 6d 6d 69 | .....protected.function.getCommi |
9cb40 | 74 4c 6f 67 73 28 73 74 72 69 6e 67 20 24 66 72 6f 6d 52 65 66 65 72 65 6e 63 65 2c 20 73 74 72 | tLogs(string.$fromReference,.str |
9cb60 | 69 6e 67 20 24 74 6f 52 65 66 65 72 65 6e 63 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 29 3a | ing.$toReference,.string.$path): |
9cb80 | 20 73 74 72 69 6e 67 0a 7b 0a 24 70 61 74 68 20 3d 20 24 74 68 69 73 2d 3e 6e 6f 72 6d 61 6c 69 | .string.{.$path.=.$this->normali |
9cba0 | 7a 65 50 61 74 68 28 24 70 61 74 68 29 3b 0a 24 63 6f 6d 6d 61 6e 64 20 3d 20 73 70 72 69 6e 74 | zePath($path);.$command.=.sprint |
9cbc0 | 66 28 27 67 69 74 20 6c 6f 67 20 25 73 2e 2e 25 73 20 2d 2d 70 72 65 74 74 79 3d 66 6f 72 6d 61 | f('git.log.%s..%s.--pretty=forma |
9cbe0 | 74 3a 22 25 25 68 20 2d 20 25 25 61 6e 3a 20 25 25 73 22 27 2e 47 69 74 55 74 69 6c 3a 3a 67 65 | t:"%%h.-.%%an:.%%s"'.GitUtil::ge |
9cc00 | 74 4e 6f 53 68 6f 77 53 69 67 6e 61 74 75 72 65 46 6c 61 67 28 24 74 68 69 73 2d 3e 70 72 6f 63 | tNoShowSignatureFlag($this->proc |
9cc20 | 65 73 73 29 2c 20 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3a 3a 65 73 63 61 70 65 28 24 66 | ess),.ProcessExecutor::escape($f |
9cc40 | 72 6f 6d 52 65 66 65 72 65 6e 63 65 29 2c 20 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3a 3a | romReference),.ProcessExecutor:: |
9cc60 | 65 73 63 61 70 65 28 24 74 6f 52 65 66 65 72 65 6e 63 65 29 29 3b 0a 0a 69 66 20 28 30 20 21 3d | escape($toReference));..if.(0.!= |
9cc80 | 3d 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 65 78 65 63 75 74 65 28 24 63 6f 6d 6d 61 | =.$this->process->execute($comma |
9cca0 | 6e 64 2c 20 24 6f 75 74 70 75 74 2c 20 24 70 61 74 68 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 | nd,.$output,.$path)).{.throw.new |
9ccc0 | 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 46 61 69 6c 65 64 20 74 6f 20 65 78 | .\RuntimeException('Failed.to.ex |
9cce0 | 65 63 75 74 65 20 27 20 2e 20 24 63 6f 6d 6d 61 6e 64 20 2e 20 22 5c 6e 5c 6e 22 20 2e 20 24 74 | ecute.'...$command..."\n\n"...$t |
9cd00 | 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 67 65 74 45 72 72 6f 72 4f 75 74 70 75 74 28 29 29 3b | his->process->getErrorOutput()); |
9cd20 | 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 6f 75 74 70 75 74 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 | .}..return.$output;.}.....protec |
9cd40 | 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 64 69 73 63 61 72 64 43 68 61 6e 67 65 73 28 73 74 72 69 | ted.function.discardChanges(stri |
9cd60 | 6e 67 20 24 70 61 74 68 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 24 70 | ng.$path):.PromiseInterface.{.$p |
9cd80 | 61 74 68 20 3d 20 24 74 68 69 73 2d 3e 6e 6f 72 6d 61 6c 69 7a 65 50 61 74 68 28 24 70 61 74 68 | ath.=.$this->normalizePath($path |
9cda0 | 29 3b 0a 69 66 20 28 30 20 21 3d 3d 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 65 78 65 | );.if.(0.!==.$this->process->exe |
9cdc0 | 63 75 74 65 28 27 67 69 74 20 63 6c 65 61 6e 20 2d 64 66 20 26 26 20 67 69 74 20 72 65 73 65 74 | cute('git.clean.-df.&&.git.reset |
9cde0 | 20 2d 2d 68 61 72 64 27 2c 20 24 6f 75 74 70 75 74 2c 20 24 70 61 74 68 29 29 20 7b 0a 74 68 72 | .--hard',.$output,.$path)).{.thr |
9ce00 | 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 22 43 6f 75 6c 64 20 | ow.new.\RuntimeException("Could. |
9ce20 | 6e 6f 74 20 72 65 73 65 74 20 63 68 61 6e 67 65 73 5c 6e 5c 6e 3a 22 2e 24 6f 75 74 70 75 74 29 | not.reset.changes\n\n:".$output) |
9ce40 | 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 68 61 73 44 69 73 63 61 72 64 65 64 43 68 61 6e 67 65 73 5b | ;.}..$this->hasDiscardedChanges[ |
9ce60 | 24 70 61 74 68 5d 20 3d 20 74 72 75 65 3b 0a 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 | $path].=.true;..return.\React\Pr |
9ce80 | 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 | omise\resolve(null);.}.....prote |
9cea0 | 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 73 74 61 73 68 43 68 61 6e 67 65 73 28 73 74 72 69 6e | cted.function.stashChanges(strin |
9cec0 | 67 20 24 70 61 74 68 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 24 70 61 | g.$path):.PromiseInterface.{.$pa |
9cee0 | 74 68 20 3d 20 24 74 68 69 73 2d 3e 6e 6f 72 6d 61 6c 69 7a 65 50 61 74 68 28 24 70 61 74 68 29 | th.=.$this->normalizePath($path) |
9cf00 | 3b 0a 69 66 20 28 30 20 21 3d 3d 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 65 78 65 63 | ;.if.(0.!==.$this->process->exec |
9cf20 | 75 74 65 28 27 67 69 74 20 73 74 61 73 68 20 2d 2d 69 6e 63 6c 75 64 65 2d 75 6e 74 72 61 63 6b | ute('git.stash.--include-untrack |
9cf40 | 65 64 27 2c 20 24 6f 75 74 70 75 74 2c 20 24 70 61 74 68 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 | ed',.$output,.$path)).{.throw.ne |
9cf60 | 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 22 43 6f 75 6c 64 20 6e 6f 74 20 73 | w.\RuntimeException("Could.not.s |
9cf80 | 74 61 73 68 20 63 68 61 6e 67 65 73 5c 6e 5c 6e 3a 22 2e 24 6f 75 74 70 75 74 29 3b 0a 7d 0a 0a | tash.changes\n\n:".$output);.}.. |
9cfa0 | 24 74 68 69 73 2d 3e 68 61 73 53 74 61 73 68 65 64 43 68 61 6e 67 65 73 5b 24 70 61 74 68 5d 20 | $this->hasStashedChanges[$path]. |
9cfc0 | 3d 20 74 72 75 65 3b 0a 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 | =.true;..return.\React\Promise\r |
9cfe0 | 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 | esolve(null);.}.....protected.fu |
9d000 | 6e 63 74 69 6f 6e 20 76 69 65 77 44 69 66 66 28 73 74 72 69 6e 67 20 24 70 61 74 68 29 3a 20 76 | nction.viewDiff(string.$path):.v |
9d020 | 6f 69 64 0a 7b 0a 24 70 61 74 68 20 3d 20 24 74 68 69 73 2d 3e 6e 6f 72 6d 61 6c 69 7a 65 50 61 | oid.{.$path.=.$this->normalizePa |
9d040 | 74 68 28 24 70 61 74 68 29 3b 0a 69 66 20 28 30 20 21 3d 3d 20 24 74 68 69 73 2d 3e 70 72 6f 63 | th($path);.if.(0.!==.$this->proc |
9d060 | 65 73 73 2d 3e 65 78 65 63 75 74 65 28 27 67 69 74 20 64 69 66 66 20 48 45 41 44 27 2c 20 24 6f | ess->execute('git.diff.HEAD',.$o |
9d080 | 75 74 70 75 74 2c 20 24 70 61 74 68 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 | utput,.$path)).{.throw.new.\Runt |
9d0a0 | 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 22 43 6f 75 6c 64 20 6e 6f 74 20 76 69 65 77 20 64 69 66 | imeException("Could.not.view.dif |
9d0c0 | 66 5c 6e 5c 6e 3a 22 2e 24 6f 75 74 70 75 74 29 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e | f\n\n:".$output);.}..$this->io-> |
9d0e0 | 77 72 69 74 65 45 72 72 6f 72 28 24 6f 75 74 70 75 74 29 3b 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 | writeError($output);.}..protecte |
9d100 | 64 20 66 75 6e 63 74 69 6f 6e 20 6e 6f 72 6d 61 6c 69 7a 65 50 61 74 68 28 73 74 72 69 6e 67 20 | d.function.normalizePath(string. |
9d120 | 24 70 61 74 68 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 69 66 20 28 50 6c 61 74 66 6f 72 6d 3a 3a 69 | $path):.string.{.if.(Platform::i |
9d140 | 73 57 69 6e 64 6f 77 73 28 29 20 26 26 20 73 74 72 6c 65 6e 28 24 70 61 74 68 29 20 3e 20 30 29 | sWindows().&&.strlen($path).>.0) |
9d160 | 20 7b 0a 24 62 61 73 65 50 61 74 68 20 3d 20 24 70 61 74 68 3b 0a 24 72 65 6d 6f 76 65 64 20 3d | .{.$basePath.=.$path;.$removed.= |
9d180 | 20 5b 5d 3b 0a 0a 77 68 69 6c 65 20 28 21 69 73 5f 64 69 72 28 24 62 61 73 65 50 61 74 68 29 20 | .[];..while.(!is_dir($basePath). |
9d1a0 | 26 26 20 24 62 61 73 65 50 61 74 68 20 21 3d 3d 20 27 5c 5c 27 29 20 7b 0a 61 72 72 61 79 5f 75 | &&.$basePath.!==.'\\').{.array_u |
9d1c0 | 6e 73 68 69 66 74 28 24 72 65 6d 6f 76 65 64 2c 20 62 61 73 65 6e 61 6d 65 28 24 62 61 73 65 50 | nshift($removed,.basename($baseP |
9d1e0 | 61 74 68 29 29 3b 0a 24 62 61 73 65 50 61 74 68 20 3d 20 64 69 72 6e 61 6d 65 28 24 62 61 73 65 | ath));.$basePath.=.dirname($base |
9d200 | 50 61 74 68 29 3b 0a 7d 0a 0a 69 66 20 28 24 62 61 73 65 50 61 74 68 20 3d 3d 3d 20 27 5c 5c 27 | Path);.}..if.($basePath.===.'\\' |
9d220 | 29 20 7b 0a 72 65 74 75 72 6e 20 24 70 61 74 68 3b 0a 7d 0a 0a 24 70 61 74 68 20 3d 20 72 74 72 | ).{.return.$path;.}..$path.=.rtr |
9d240 | 69 6d 28 72 65 61 6c 70 61 74 68 28 24 62 61 73 65 50 61 74 68 29 20 2e 20 27 2f 27 20 2e 20 69 | im(realpath($basePath)...'/'...i |
9d260 | 6d 70 6c 6f 64 65 28 27 2f 27 2c 20 24 72 65 6d 6f 76 65 64 29 2c 20 27 2f 27 29 3b 0a 7d 0a 0a | mplode('/',.$removed),.'/');.}.. |
9d280 | 72 65 74 75 72 6e 20 24 70 61 74 68 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 | return.$path;.}.....protected.fu |
9d2a0 | 6e 63 74 69 6f 6e 20 68 61 73 4d 65 74 61 64 61 74 61 52 65 70 6f 73 69 74 6f 72 79 28 73 74 72 | nction.hasMetadataRepository(str |
9d2c0 | 69 6e 67 20 24 70 61 74 68 29 3a 20 62 6f 6f 6c 0a 7b 0a 24 70 61 74 68 20 3d 20 24 74 68 69 73 | ing.$path):.bool.{.$path.=.$this |
9d2e0 | 2d 3e 6e 6f 72 6d 61 6c 69 7a 65 50 61 74 68 28 24 70 61 74 68 29 3b 0a 0a 72 65 74 75 72 6e 20 | ->normalizePath($path);..return. |
9d300 | 69 73 5f 64 69 72 28 24 70 61 74 68 2e 27 2f 2e 67 69 74 27 29 3b 0a 7d 0a 0a 70 72 6f 74 65 63 | is_dir($path.'/.git');.}..protec |
9d320 | 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 53 68 6f 72 74 48 61 73 68 28 73 74 72 69 6e 67 | ted.function.getShortHash(string |
9d340 | 20 24 72 65 66 65 72 65 6e 63 65 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 69 66 20 28 21 24 74 68 69 | .$reference):.string.{.if.(!$thi |
9d360 | 73 2d 3e 69 6f 2d 3e 69 73 56 65 72 62 6f 73 65 28 29 20 26 26 20 50 72 65 67 3a 3a 69 73 4d 61 | s->io->isVerbose().&&.Preg::isMa |
9d380 | 74 63 68 28 27 7b 5e 5b 30 2d 39 61 2d 66 5d 7b 34 30 7d 24 7d 27 2c 20 24 72 65 66 65 72 65 6e | tch('{^[0-9a-f]{40}$}',.$referen |
9d3a0 | 63 65 29 29 20 7b 0a 72 65 74 75 72 6e 20 73 75 62 73 74 72 28 24 72 65 66 65 72 65 6e 63 65 2c | ce)).{.return.substr($reference, |
9d3c0 | 20 30 2c 20 31 30 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 72 65 66 65 72 65 6e 63 65 3b 0a 7d | .0,.10);.}..return.$reference;.} |
9d3e0 | 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 | .}.<?php.declare(strict_types=1) |
9d400 | 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c | ;............namespace.Composer\ |
9d420 | 44 6f 77 6e 6c 6f 61 64 65 72 3b 0a 0a 75 73 65 20 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 50 | Downloader;..use.React\Promise\P |
9d440 | 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 | romiseInterface;.use.Composer\Pa |
9d460 | 63 6b 61 67 65 5c 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 | ckage\PackageInterface;.use.Comp |
9d480 | 6f 73 65 72 5c 55 74 69 6c 5c 50 6c 61 74 66 6f 72 6d 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 | oser\Util\Platform;.use.Composer |
9d4a0 | 5c 55 74 69 6c 5c 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3b 0a 0a 0a 0a 0a 0a 0a 63 6c 61 | \Util\ProcessExecutor;.......cla |
9d4c0 | 73 73 20 47 7a 69 70 44 6f 77 6e 6c 6f 61 64 65 72 20 65 78 74 65 6e 64 73 20 41 72 63 68 69 76 | ss.GzipDownloader.extends.Archiv |
9d4e0 | 65 44 6f 77 6e 6c 6f 61 64 65 72 0a 7b 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e | eDownloader.{.protected.function |
9d500 | 20 65 78 74 72 61 63 74 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 | .extract(PackageInterface.$packa |
9d520 | 67 65 2c 20 73 74 72 69 6e 67 20 24 66 69 6c 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 29 3a | ge,.string.$file,.string.$path): |
9d540 | 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 24 66 69 6c 65 6e 61 6d 65 20 3d 20 | .PromiseInterface.{.$filename.=. |
9d560 | 70 61 74 68 69 6e 66 6f 28 70 61 72 73 65 5f 75 72 6c 28 73 74 72 74 72 28 28 73 74 72 69 6e 67 | pathinfo(parse_url(strtr((string |
9d580 | 29 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 44 69 73 74 55 72 6c 28 29 2c 20 27 5c 5c 27 2c 20 | ).$package->getDistUrl(),.'\\',. |
9d5a0 | 27 2f 27 29 2c 20 50 48 50 5f 55 52 4c 5f 50 41 54 48 29 2c 20 50 41 54 48 49 4e 46 4f 5f 46 49 | '/'),.PHP_URL_PATH),.PATHINFO_FI |
9d5c0 | 4c 45 4e 41 4d 45 29 3b 0a 24 74 61 72 67 65 74 46 69 6c 65 70 61 74 68 20 3d 20 24 70 61 74 68 | LENAME);.$targetFilepath.=.$path |
9d5e0 | 20 2e 20 44 49 52 45 43 54 4f 52 59 5f 53 45 50 41 52 41 54 4f 52 20 2e 20 24 66 69 6c 65 6e 61 | ...DIRECTORY_SEPARATOR...$filena |
9d600 | 6d 65 3b 0a 0a 0a 69 66 20 28 21 50 6c 61 74 66 6f 72 6d 3a 3a 69 73 57 69 6e 64 6f 77 73 28 29 | me;...if.(!Platform::isWindows() |
9d620 | 29 20 7b 0a 24 63 6f 6d 6d 61 6e 64 20 3d 20 27 67 7a 69 70 20 2d 63 64 20 2d 2d 20 27 20 2e 20 | ).{.$command.=.'gzip.-cd.--.'... |
9d640 | 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3a 3a 65 73 63 61 70 65 28 24 66 69 6c 65 29 20 2e | ProcessExecutor::escape($file).. |
9d660 | 20 27 20 3e 20 27 20 2e 20 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3a 3a 65 73 63 61 70 65 | .'.>.'...ProcessExecutor::escape |
9d680 | 28 24 74 61 72 67 65 74 46 69 6c 65 70 61 74 68 29 3b 0a 0a 69 66 20 28 30 20 3d 3d 3d 20 24 74 | ($targetFilepath);..if.(0.===.$t |
9d6a0 | 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 65 78 65 63 75 74 65 28 24 63 6f 6d 6d 61 6e 64 2c 20 | his->process->execute($command,. |
9d6c0 | 24 69 67 6e 6f 72 65 64 4f 75 74 70 75 74 29 29 20 7b 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 | $ignoredOutput)).{.return.\React |
9d6e0 | 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a 69 66 20 28 65 | \Promise\resolve(null);.}..if.(e |
9d700 | 78 74 65 6e 73 69 6f 6e 5f 6c 6f 61 64 65 64 28 27 7a 6c 69 62 27 29 29 20 7b 0a 0a 24 74 68 69 | xtension_loaded('zlib')).{..$thi |
9d720 | 73 2d 3e 65 78 74 72 61 63 74 55 73 69 6e 67 45 78 74 28 24 66 69 6c 65 2c 20 24 74 61 72 67 65 | s->extractUsingExt($file,.$targe |
9d740 | 74 46 69 6c 65 70 61 74 68 29 3b 0a 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 | tFilepath);..return.\React\Promi |
9d760 | 73 65 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a 24 70 72 6f 63 65 73 73 45 72 72 | se\resolve(null);.}..$processErr |
9d780 | 6f 72 20 3d 20 27 46 61 69 6c 65 64 20 74 6f 20 65 78 65 63 75 74 65 20 27 20 2e 20 24 63 6f 6d | or.=.'Failed.to.execute.'...$com |
9d7a0 | 6d 61 6e 64 20 2e 20 22 5c 6e 5c 6e 22 20 2e 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e | mand..."\n\n"...$this->process-> |
9d7c0 | 67 65 74 45 72 72 6f 72 4f 75 74 70 75 74 28 29 3b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e | getErrorOutput();.throw.new.\Run |
9d7e0 | 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 24 70 72 6f 63 65 73 73 45 72 72 6f 72 29 3b 0a 7d 0a | timeException($processError);.}. |
9d800 | 0a 0a 24 74 68 69 73 2d 3e 65 78 74 72 61 63 74 55 73 69 6e 67 45 78 74 28 24 66 69 6c 65 2c 20 | ..$this->extractUsingExt($file,. |
9d820 | 24 74 61 72 67 65 74 46 69 6c 65 70 61 74 68 29 3b 0a 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 | $targetFilepath);..return.\React |
9d840 | 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a 70 72 69 76 61 | \Promise\resolve(null);.}..priva |
9d860 | 74 65 20 66 75 6e 63 74 69 6f 6e 20 65 78 74 72 61 63 74 55 73 69 6e 67 45 78 74 28 73 74 72 69 | te.function.extractUsingExt(stri |
9d880 | 6e 67 20 24 66 69 6c 65 2c 20 73 74 72 69 6e 67 20 24 74 61 72 67 65 74 46 69 6c 65 70 61 74 68 | ng.$file,.string.$targetFilepath |
9d8a0 | 29 3a 20 76 6f 69 64 0a 7b 0a 24 61 72 63 68 69 76 65 46 69 6c 65 20 3d 20 67 7a 6f 70 65 6e 28 | ):.void.{.$archiveFile.=.gzopen( |
9d8c0 | 24 66 69 6c 65 2c 20 27 72 62 27 29 3b 0a 24 74 61 72 67 65 74 46 69 6c 65 20 3d 20 66 6f 70 65 | $file,.'rb');.$targetFile.=.fope |
9d8e0 | 6e 28 24 74 61 72 67 65 74 46 69 6c 65 70 61 74 68 2c 20 27 77 62 27 29 3b 0a 77 68 69 6c 65 20 | n($targetFilepath,.'wb');.while. |
9d900 | 28 24 73 74 72 69 6e 67 20 3d 20 67 7a 72 65 61 64 28 24 61 72 63 68 69 76 65 46 69 6c 65 2c 20 | ($string.=.gzread($archiveFile,. |
9d920 | 34 30 39 36 29 29 20 7b 0a 66 77 72 69 74 65 28 24 74 61 72 67 65 74 46 69 6c 65 2c 20 24 73 74 | 4096)).{.fwrite($targetFile,.$st |
9d940 | 72 69 6e 67 2c 20 50 6c 61 74 66 6f 72 6d 3a 3a 73 74 72 6c 65 6e 28 24 73 74 72 69 6e 67 29 29 | ring,.Platform::strlen($string)) |
9d960 | 3b 0a 7d 0a 67 7a 63 6c 6f 73 65 28 24 61 72 63 68 69 76 65 46 69 6c 65 29 3b 0a 66 63 6c 6f 73 | ;.}.gzclose($archiveFile);.fclos |
9d980 | 65 28 24 74 61 72 67 65 74 46 69 6c 65 29 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 | e($targetFile);.}.}.<?php.declar |
9d9a0 | 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 | e(strict_types=1);............na |
9d9c0 | 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 44 6f 77 6e 6c 6f 61 64 65 72 3b 0a 0a 75 73 | mespace.Composer\Downloader;..us |
9d9e0 | 65 20 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 | e.React\Promise\PromiseInterface |
9da00 | 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 50 61 63 6b 61 67 65 49 6e | ;.use.Composer\Package\PackageIn |
9da20 | 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 72 6f 63 65 | terface;.use.Composer\Util\Proce |
9da40 | 73 73 45 78 65 63 75 74 6f 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 48 67 | ssExecutor;.use.Composer\Util\Hg |
9da60 | 20 61 73 20 48 67 55 74 69 6c 73 3b 0a 0a 0a 0a 0a 63 6c 61 73 73 20 48 67 44 6f 77 6e 6c 6f 61 | .as.HgUtils;.....class.HgDownloa |
9da80 | 64 65 72 20 65 78 74 65 6e 64 73 20 56 63 73 44 6f 77 6e 6c 6f 61 64 65 72 0a 7b 0a 0a 0a 0a 70 | der.extends.VcsDownloader.{....p |
9daa0 | 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 64 6f 44 6f 77 6e 6c 6f 61 64 28 50 61 63 | rotected.function.doDownload(Pac |
9dac0 | 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 | kageInterface.$package,.string.$ |
9dae0 | 70 61 74 68 2c 20 73 74 72 69 6e 67 20 24 75 72 6c 2c 20 3f 50 61 63 6b 61 67 65 49 6e 74 65 72 | path,.string.$url,.?PackageInter |
9db00 | 66 61 63 65 20 24 70 72 65 76 50 61 63 6b 61 67 65 20 3d 20 6e 75 6c 6c 29 3a 20 50 72 6f 6d 69 | face.$prevPackage.=.null):.Promi |
9db20 | 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 69 66 20 28 6e 75 6c 6c 20 3d 3d 3d 20 48 67 55 74 69 | seInterface.{.if.(null.===.HgUti |
9db40 | 6c 73 3a 3a 67 65 74 56 65 72 73 69 6f 6e 28 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 29 29 20 | ls::getVersion($this->process)). |
9db60 | 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 68 | {.throw.new.\RuntimeException('h |
9db80 | 67 20 77 61 73 20 6e 6f 74 20 66 6f 75 6e 64 20 69 6e 20 79 6f 75 72 20 50 41 54 48 2c 20 73 6b | g.was.not.found.in.your.PATH,.sk |
9dba0 | 69 70 70 69 6e 67 20 73 6f 75 72 63 65 20 64 6f 77 6e 6c 6f 61 64 27 29 3b 0a 7d 0a 0a 72 65 74 | ipping.source.download');.}..ret |
9dbc0 | 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 | urn.\React\Promise\resolve(null) |
9dbe0 | 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 64 6f 49 6e 73 | ;.}.....protected.function.doIns |
9dc00 | 74 61 6c 6c 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 | tall(PackageInterface.$package,. |
9dc20 | 73 74 72 69 6e 67 20 24 70 61 74 68 2c 20 73 74 72 69 6e 67 20 24 75 72 6c 29 3a 20 50 72 6f 6d | string.$path,.string.$url):.Prom |
9dc40 | 69 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 24 68 67 55 74 69 6c 73 20 3d 20 6e 65 77 20 48 67 | iseInterface.{.$hgUtils.=.new.Hg |
9dc60 | 55 74 69 6c 73 28 24 74 68 69 73 2d 3e 69 6f 2c 20 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 2c 20 | Utils($this->io,.$this->config,. |
9dc80 | 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 29 3b 0a 0a 24 63 6c 6f 6e 65 43 6f 6d 6d 61 6e 64 20 | $this->process);..$cloneCommand. |
9dca0 | 3d 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 73 74 72 69 6e 67 20 24 75 72 6c 29 20 | =.static.function.(string.$url). |
9dcc0 | 75 73 65 20 28 24 70 61 74 68 29 3a 20 73 74 72 69 6e 67 20 7b 0a 72 65 74 75 72 6e 20 73 70 72 | use.($path):.string.{.return.spr |
9dce0 | 69 6e 74 66 28 27 68 67 20 63 6c 6f 6e 65 20 2d 2d 20 25 73 20 25 73 27 2c 20 50 72 6f 63 65 73 | intf('hg.clone.--.%s.%s',.Proces |
9dd00 | 73 45 78 65 63 75 74 6f 72 3a 3a 65 73 63 61 70 65 28 24 75 72 6c 29 2c 20 50 72 6f 63 65 73 73 | sExecutor::escape($url),.Process |
9dd20 | 45 78 65 63 75 74 6f 72 3a 3a 65 73 63 61 70 65 28 24 70 61 74 68 29 29 3b 0a 7d 3b 0a 0a 24 68 | Executor::escape($path));.};..$h |
9dd40 | 67 55 74 69 6c 73 2d 3e 72 75 6e 43 6f 6d 6d 61 6e 64 28 24 63 6c 6f 6e 65 43 6f 6d 6d 61 6e 64 | gUtils->runCommand($cloneCommand |
9dd60 | 2c 20 24 75 72 6c 2c 20 24 70 61 74 68 29 3b 0a 0a 24 72 65 66 20 3d 20 50 72 6f 63 65 73 73 45 | ,.$url,.$path);..$ref.=.ProcessE |
9dd80 | 78 65 63 75 74 6f 72 3a 3a 65 73 63 61 70 65 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 53 6f 75 | xecutor::escape($package->getSou |
9dda0 | 72 63 65 52 65 66 65 72 65 6e 63 65 28 29 29 3b 0a 24 63 6f 6d 6d 61 6e 64 20 3d 20 73 70 72 69 | rceReference());.$command.=.spri |
9ddc0 | 6e 74 66 28 27 68 67 20 75 70 20 2d 2d 20 25 73 27 2c 20 24 72 65 66 29 3b 0a 69 66 20 28 30 20 | ntf('hg.up.--.%s',.$ref);.if.(0. |
9dde0 | 21 3d 3d 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 65 78 65 63 75 74 65 28 24 63 6f 6d | !==.$this->process->execute($com |
9de00 | 6d 61 6e 64 2c 20 24 69 67 6e 6f 72 65 64 4f 75 74 70 75 74 2c 20 72 65 61 6c 70 61 74 68 28 24 | mand,.$ignoredOutput,.realpath($ |
9de20 | 70 61 74 68 29 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 | path))).{.throw.new.\RuntimeExce |
9de40 | 70 74 69 6f 6e 28 27 46 61 69 6c 65 64 20 74 6f 20 65 78 65 63 75 74 65 20 27 20 2e 20 24 63 6f | ption('Failed.to.execute.'...$co |
9de60 | 6d 6d 61 6e 64 20 2e 20 22 5c 6e 5c 6e 22 20 2e 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d | mmand..."\n\n"...$this->process- |
9de80 | 3e 67 65 74 45 72 72 6f 72 4f 75 74 70 75 74 28 29 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 5c 52 | >getErrorOutput());.}..return.\R |
9dea0 | 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a 0a | eact\Promise\resolve(null);.}... |
9dec0 | 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 64 6f 55 70 64 61 74 65 28 50 61 | ..protected.function.doUpdate(Pa |
9dee0 | 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 69 6e 69 74 69 61 6c 2c 20 50 61 63 6b 61 67 65 | ckageInterface.$initial,.Package |
9df00 | 49 6e 74 65 72 66 61 63 65 20 24 74 61 72 67 65 74 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 2c | Interface.$target,.string.$path, |
9df20 | 20 73 74 72 69 6e 67 20 24 75 72 6c 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a | .string.$url):.PromiseInterface. |
9df40 | 7b 0a 24 68 67 55 74 69 6c 73 20 3d 20 6e 65 77 20 48 67 55 74 69 6c 73 28 24 74 68 69 73 2d 3e | {.$hgUtils.=.new.HgUtils($this-> |
9df60 | 69 6f 2c 20 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 2c 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 | io,.$this->config,.$this->proces |
9df80 | 73 29 3b 0a 0a 24 72 65 66 20 3d 20 24 74 61 72 67 65 74 2d 3e 67 65 74 53 6f 75 72 63 65 52 65 | s);..$ref.=.$target->getSourceRe |
9dfa0 | 66 65 72 65 6e 63 65 28 29 3b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 | ference();.$this->io->writeError |
9dfc0 | 28 22 20 55 70 64 61 74 69 6e 67 20 74 6f 20 22 2e 24 74 61 72 67 65 74 2d 3e 67 65 74 53 6f 75 | (".Updating.to.".$target->getSou |
9dfe0 | 72 63 65 52 65 66 65 72 65 6e 63 65 28 29 29 3b 0a 0a 69 66 20 28 21 24 74 68 69 73 2d 3e 68 61 | rceReference());..if.(!$this->ha |
9e000 | 73 4d 65 74 61 64 61 74 61 52 65 70 6f 73 69 74 6f 72 79 28 24 70 61 74 68 29 29 20 7b 0a 74 68 | sMetadataRepository($path)).{.th |
9e020 | 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 54 68 65 20 2e | row.new.\RuntimeException('The.. |
9e040 | 68 67 20 64 69 72 65 63 74 6f 72 79 20 69 73 20 6d 69 73 73 69 6e 67 20 66 72 6f 6d 20 27 2e 24 | hg.directory.is.missing.from.'.$ |
9e060 | 70 61 74 68 2e 27 2c 20 73 65 65 20 68 74 74 70 73 3a 2f 2f 67 65 74 63 6f 6d 70 6f 73 65 72 2e | path.',.see.https://getcomposer. |
9e080 | 6f 72 67 2f 63 6f 6d 6d 69 74 2d 64 65 70 73 20 66 6f 72 20 6d 6f 72 65 20 69 6e 66 6f 72 6d 61 | org/commit-deps.for.more.informa |
9e0a0 | 74 69 6f 6e 27 29 3b 0a 7d 0a 0a 24 63 6f 6d 6d 61 6e 64 20 3d 20 73 74 61 74 69 63 20 66 75 6e | tion');.}..$command.=.static.fun |
9e0c0 | 63 74 69 6f 6e 20 28 24 75 72 6c 29 20 75 73 65 20 28 24 72 65 66 29 3a 20 73 74 72 69 6e 67 20 | ction.($url).use.($ref):.string. |
9e0e0 | 7b 0a 72 65 74 75 72 6e 20 73 70 72 69 6e 74 66 28 27 68 67 20 70 75 6c 6c 20 2d 2d 20 25 73 20 | {.return.sprintf('hg.pull.--.%s. |
9e100 | 26 26 20 68 67 20 75 70 20 2d 2d 20 25 73 27 2c 20 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 | &&.hg.up.--.%s',.ProcessExecutor |
9e120 | 3a 3a 65 73 63 61 70 65 28 24 75 72 6c 29 2c 20 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3a | ::escape($url),.ProcessExecutor: |
9e140 | 3a 65 73 63 61 70 65 28 24 72 65 66 29 29 3b 0a 7d 3b 0a 0a 24 68 67 55 74 69 6c 73 2d 3e 72 75 | :escape($ref));.};..$hgUtils->ru |
9e160 | 6e 43 6f 6d 6d 61 6e 64 28 24 63 6f 6d 6d 61 6e 64 2c 20 24 75 72 6c 2c 20 24 70 61 74 68 29 3b | nCommand($command,.$url,.$path); |
9e180 | 0a 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 | ..return.\React\Promise\resolve( |
9e1a0 | 6e 75 6c 6c 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 | null);.}.....public.function.get |
9e1c0 | 4c 6f 63 61 6c 43 68 61 6e 67 65 73 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 | LocalChanges(PackageInterface.$p |
9e1e0 | 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 29 3a 20 3f 73 74 72 69 6e 67 0a 7b | ackage,.string.$path):.?string.{ |
9e200 | 0a 69 66 20 28 21 69 73 5f 64 69 72 28 24 70 61 74 68 2e 27 2f 2e 68 67 27 29 29 20 7b 0a 72 65 | .if.(!is_dir($path.'/.hg')).{.re |
9e220 | 74 75 72 6e 20 6e 75 6c 6c 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 65 78 | turn.null;.}..$this->process->ex |
9e240 | 65 63 75 74 65 28 27 68 67 20 73 74 27 2c 20 24 6f 75 74 70 75 74 2c 20 72 65 61 6c 70 61 74 68 | ecute('hg.st',.$output,.realpath |
9e260 | 28 24 70 61 74 68 29 29 3b 0a 0a 24 6f 75 74 70 75 74 20 3d 20 74 72 69 6d 28 24 6f 75 74 70 75 | ($path));..$output.=.trim($outpu |
9e280 | 74 29 3b 0a 0a 72 65 74 75 72 6e 20 73 74 72 6c 65 6e 28 24 6f 75 74 70 75 74 29 20 3e 20 30 20 | t);..return.strlen($output).>.0. |
9e2a0 | 3f 20 24 6f 75 74 70 75 74 20 3a 20 6e 75 6c 6c 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 | ?.$output.:.null;.}.....protecte |
9e2c0 | 64 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 43 6f 6d 6d 69 74 4c 6f 67 73 28 73 74 72 69 6e 67 20 | d.function.getCommitLogs(string. |
9e2e0 | 24 66 72 6f 6d 52 65 66 65 72 65 6e 63 65 2c 20 73 74 72 69 6e 67 20 24 74 6f 52 65 66 65 72 65 | $fromReference,.string.$toRefere |
9e300 | 6e 63 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 24 63 6f | nce,.string.$path):.string.{.$co |
9e320 | 6d 6d 61 6e 64 20 3d 20 73 70 72 69 6e 74 66 28 27 68 67 20 6c 6f 67 20 2d 72 20 25 73 3a 25 73 | mmand.=.sprintf('hg.log.-r.%s:%s |
9e340 | 20 2d 2d 73 74 79 6c 65 20 63 6f 6d 70 61 63 74 27 2c 20 50 72 6f 63 65 73 73 45 78 65 63 75 74 | .--style.compact',.ProcessExecut |
9e360 | 6f 72 3a 3a 65 73 63 61 70 65 28 24 66 72 6f 6d 52 65 66 65 72 65 6e 63 65 29 2c 20 50 72 6f 63 | or::escape($fromReference),.Proc |
9e380 | 65 73 73 45 78 65 63 75 74 6f 72 3a 3a 65 73 63 61 70 65 28 24 74 6f 52 65 66 65 72 65 6e 63 65 | essExecutor::escape($toReference |
9e3a0 | 29 29 3b 0a 0a 69 66 20 28 30 20 21 3d 3d 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 65 | ));..if.(0.!==.$this->process->e |
9e3c0 | 78 65 63 75 74 65 28 24 63 6f 6d 6d 61 6e 64 2c 20 24 6f 75 74 70 75 74 2c 20 72 65 61 6c 70 61 | xecute($command,.$output,.realpa |
9e3e0 | 74 68 28 24 70 61 74 68 29 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 | th($path))).{.throw.new.\Runtime |
9e400 | 45 78 63 65 70 74 69 6f 6e 28 27 46 61 69 6c 65 64 20 74 6f 20 65 78 65 63 75 74 65 20 27 20 2e | Exception('Failed.to.execute.'.. |
9e420 | 20 24 63 6f 6d 6d 61 6e 64 20 2e 20 22 5c 6e 5c 6e 22 20 2e 20 24 74 68 69 73 2d 3e 70 72 6f 63 | .$command..."\n\n"...$this->proc |
9e440 | 65 73 73 2d 3e 67 65 74 45 72 72 6f 72 4f 75 74 70 75 74 28 29 29 3b 0a 7d 0a 0a 72 65 74 75 72 | ess->getErrorOutput());.}..retur |
9e460 | 6e 20 24 6f 75 74 70 75 74 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 | n.$output;.}.....protected.funct |
9e480 | 69 6f 6e 20 68 61 73 4d 65 74 61 64 61 74 61 52 65 70 6f 73 69 74 6f 72 79 28 73 74 72 69 6e 67 | ion.hasMetadataRepository(string |
9e4a0 | 20 24 70 61 74 68 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 69 73 5f 64 69 72 28 24 70 | .$path):.bool.{.return.is_dir($p |
9e4c0 | 61 74 68 20 2e 20 27 2f 2e 68 67 27 29 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 | ath...'/.hg');.}.}.<?php.declare |
9e4e0 | 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d | (strict_types=1);............nam |
9e500 | 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 44 6f 77 6e 6c 6f 61 64 65 72 3b 0a 0a 63 6c 61 | espace.Composer\Downloader;..cla |
9e520 | 73 73 20 4d 61 78 46 69 6c 65 53 69 7a 65 45 78 63 65 65 64 65 64 45 78 63 65 70 74 69 6f 6e 20 | ss.MaxFileSizeExceededException. |
9e540 | 65 78 74 65 6e 64 73 20 54 72 61 6e 73 70 6f 72 74 45 78 63 65 70 74 69 6f 6e 0a 7b 0a 7d 0a 3c | extends.TransportException.{.}.< |
9e560 | 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a | ?php.declare(strict_types=1);... |
9e580 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 44 6f 77 6e | .........namespace.Composer\Down |
9e5a0 | 6c 6f 61 64 65 72 3b 0a 0a 75 73 65 20 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 50 72 6f 6d 69 | loader;..use.React\Promise\Promi |
9e5c0 | 73 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 | seInterface;.use.Composer\Packag |
9e5e0 | 65 5c 41 72 63 68 69 76 65 72 5c 41 72 63 68 69 76 61 62 6c 65 46 69 6c 65 73 46 69 6e 64 65 72 | e\Archiver\ArchivableFilesFinder |
9e600 | 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 44 75 6d 70 65 72 5c 41 72 | ;.use.Composer\Package\Dumper\Ar |
9e620 | 72 61 79 44 75 6d 70 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c | rayDumper;.use.Composer\Package\ |
9e640 | 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 | PackageInterface;.use.Composer\P |
9e660 | 61 63 6b 61 67 65 5c 56 65 72 73 69 6f 6e 5c 56 65 72 73 69 6f 6e 47 75 65 73 73 65 72 3b 0a 75 | ackage\Version\VersionGuesser;.u |
9e680 | 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 56 65 72 73 69 6f 6e 5c 56 65 72 73 | se.Composer\Package\Version\Vers |
9e6a0 | 69 6f 6e 50 61 72 73 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 6c 61 | ionParser;.use.Composer\Util\Pla |
9e6c0 | 74 66 6f 72 6d 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 46 69 6c 65 73 79 73 | tform;.use.Composer\Util\Filesys |
9e6e0 | 74 65 6d 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 46 69 6c 65 73 | tem;.use.Symfony\Component\Files |
9e700 | 79 73 74 65 6d 5c 45 78 63 65 70 74 69 6f 6e 5c 49 4f 45 78 63 65 70 74 69 6f 6e 3b 0a 75 73 65 | ystem\Exception\IOException;.use |
9e720 | 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 46 69 6c 65 73 79 73 74 65 6d 5c 46 69 | .Symfony\Component\Filesystem\Fi |
9e740 | 6c 65 73 79 73 74 65 6d 20 61 73 20 53 79 6d 66 6f 6e 79 46 69 6c 65 73 79 73 74 65 6d 3b 0a 75 | lesystem.as.SymfonyFilesystem;.u |
9e760 | 73 65 20 43 6f 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 5c 4f | se.Composer\DependencyResolver\O |
9e780 | 70 65 72 61 74 69 6f 6e 5c 49 6e 73 74 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 3b 0a 75 73 65 20 43 | peration\InstallOperation;.use.C |
9e7a0 | 6f 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 5c 4f 70 65 72 61 | omposer\DependencyResolver\Opera |
9e7c0 | 74 69 6f 6e 5c 55 6e 69 6e 73 74 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 3b 0a 0a 0a 0a 0a 0a 0a 0a | tion\UninstallOperation;........ |
9e7e0 | 63 6c 61 73 73 20 50 61 74 68 44 6f 77 6e 6c 6f 61 64 65 72 20 65 78 74 65 6e 64 73 20 46 69 6c | class.PathDownloader.extends.Fil |
9e800 | 65 44 6f 77 6e 6c 6f 61 64 65 72 20 69 6d 70 6c 65 6d 65 6e 74 73 20 56 63 73 43 61 70 61 62 6c | eDownloader.implements.VcsCapabl |
9e820 | 65 44 6f 77 6e 6c 6f 61 64 65 72 49 6e 74 65 72 66 61 63 65 0a 7b 0a 70 72 69 76 61 74 65 20 63 | eDownloaderInterface.{.private.c |
9e840 | 6f 6e 73 74 20 53 54 52 41 54 45 47 59 5f 53 59 4d 4c 49 4e 4b 20 3d 20 31 30 3b 0a 70 72 69 76 | onst.STRATEGY_SYMLINK.=.10;.priv |
9e860 | 61 74 65 20 63 6f 6e 73 74 20 53 54 52 41 54 45 47 59 5f 4d 49 52 52 4f 52 20 3d 20 32 30 3b 0a | ate.const.STRATEGY_MIRROR.=.20;. |
9e880 | 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 64 6f 77 6e 6c 6f 61 64 28 50 61 63 | ....public.function.download(Pac |
9e8a0 | 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 | kageInterface.$package,.string.$ |
9e8c0 | 70 61 74 68 2c 20 3f 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 72 65 76 50 61 63 | path,.?PackageInterface.$prevPac |
9e8e0 | 6b 61 67 65 20 3d 20 6e 75 6c 6c 2c 20 62 6f 6f 6c 20 24 6f 75 74 70 75 74 20 3d 20 74 72 75 65 | kage.=.null,.bool.$output.=.true |
9e900 | 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 24 70 61 74 68 20 3d 20 46 69 | ):.PromiseInterface.{.$path.=.Fi |
9e920 | 6c 65 73 79 73 74 65 6d 3a 3a 74 72 69 6d 54 72 61 69 6c 69 6e 67 53 6c 61 73 68 28 24 70 61 74 | lesystem::trimTrailingSlash($pat |
9e940 | 68 29 3b 0a 24 75 72 6c 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 44 69 73 74 55 72 6c 28 | h);.$url.=.$package->getDistUrl( |
9e960 | 29 3b 0a 24 72 65 61 6c 55 72 6c 20 3d 20 72 65 61 6c 70 61 74 68 28 24 75 72 6c 29 3b 0a 69 66 | );.$realUrl.=.realpath($url);.if |
9e980 | 20 28 66 61 6c 73 65 20 3d 3d 3d 20 24 72 65 61 6c 55 72 6c 20 7c 7c 20 21 66 69 6c 65 5f 65 78 | .(false.===.$realUrl.||.!file_ex |
9e9a0 | 69 73 74 73 28 24 72 65 61 6c 55 72 6c 29 20 7c 7c 20 21 69 73 5f 64 69 72 28 24 72 65 61 6c 55 | ists($realUrl).||.!is_dir($realU |
9e9c0 | 72 6c 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 | rl)).{.throw.new.\RuntimeExcepti |
9e9e0 | 6f 6e 28 73 70 72 69 6e 74 66 28 0a 27 53 6f 75 72 63 65 20 70 61 74 68 20 22 25 73 22 20 69 73 | on(sprintf(.'Source.path."%s".is |
9ea00 | 20 6e 6f 74 20 66 6f 75 6e 64 20 66 6f 72 20 70 61 63 6b 61 67 65 20 25 73 27 2c 0a 24 75 72 6c | .not.found.for.package.%s',.$url |
9ea20 | 2c 0a 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 0a 29 29 3b 0a 7d 0a 0a 69 66 20 | ,.$package->getName().));.}..if. |
9ea40 | 28 72 65 61 6c 70 61 74 68 28 24 70 61 74 68 29 20 3d 3d 3d 20 24 72 65 61 6c 55 72 6c 29 20 7b | (realpath($path).===.$realUrl).{ |
9ea60 | 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e | .return.\React\Promise\resolve(n |
9ea80 | 75 6c 6c 29 3b 0a 7d 0a 0a 69 66 20 28 73 74 72 70 6f 73 28 72 65 61 6c 70 61 74 68 28 24 70 61 | ull);.}..if.(strpos(realpath($pa |
9eaa0 | 74 68 29 20 2e 20 44 49 52 45 43 54 4f 52 59 5f 53 45 50 41 52 41 54 4f 52 2c 20 24 72 65 61 6c | th)...DIRECTORY_SEPARATOR,.$real |
9eac0 | 55 72 6c 20 2e 20 44 49 52 45 43 54 4f 52 59 5f 53 45 50 41 52 41 54 4f 52 29 20 3d 3d 3d 20 30 | Url...DIRECTORY_SEPARATOR).===.0 |
9eae0 | 29 20 7b 0a 0a 0a 0a 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 | ).{.....throw.new.\RuntimeExcept |
9eb00 | 69 6f 6e 28 73 70 72 69 6e 74 66 28 0a 27 50 61 63 6b 61 67 65 20 25 73 20 63 61 6e 6e 6f 74 20 | ion(sprintf(.'Package.%s.cannot. |
9eb20 | 69 6e 73 74 61 6c 6c 20 74 6f 20 22 25 73 22 20 69 6e 73 69 64 65 20 69 74 73 20 73 6f 75 72 63 | install.to."%s".inside.its.sourc |
9eb40 | 65 20 61 74 20 22 25 73 22 27 2c 0a 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 2c | e.at."%s"',.$package->getName(), |
9eb60 | 0a 72 65 61 6c 70 61 74 68 28 24 70 61 74 68 29 2c 0a 24 72 65 61 6c 55 72 6c 0a 29 29 3b 0a 7d | .realpath($path),.$realUrl.));.} |
9eb80 | 0a 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 | ..return.\React\Promise\resolve( |
9eba0 | 6e 75 6c 6c 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 6e 73 | null);.}.....public.function.ins |
9ebc0 | 74 61 6c 6c 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 | tall(PackageInterface.$package,. |
9ebe0 | 73 74 72 69 6e 67 20 24 70 61 74 68 2c 20 62 6f 6f 6c 20 24 6f 75 74 70 75 74 20 3d 20 74 72 75 | string.$path,.bool.$output.=.tru |
9ec00 | 65 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 24 70 61 74 68 20 3d 20 46 | e):.PromiseInterface.{.$path.=.F |
9ec20 | 69 6c 65 73 79 73 74 65 6d 3a 3a 74 72 69 6d 54 72 61 69 6c 69 6e 67 53 6c 61 73 68 28 24 70 61 | ilesystem::trimTrailingSlash($pa |
9ec40 | 74 68 29 3b 0a 24 75 72 6c 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 44 69 73 74 55 72 6c | th);.$url.=.$package->getDistUrl |
9ec60 | 28 29 3b 0a 24 72 65 61 6c 55 72 6c 20 3d 20 72 65 61 6c 70 61 74 68 28 24 75 72 6c 29 3b 0a 0a | ();.$realUrl.=.realpath($url);.. |
9ec80 | 69 66 20 28 72 65 61 6c 70 61 74 68 28 24 70 61 74 68 29 20 3d 3d 3d 20 24 72 65 61 6c 55 72 6c | if.(realpath($path).===.$realUrl |
9eca0 | 29 20 7b 0a 69 66 20 28 24 6f 75 74 70 75 74 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 | ).{.if.($output).{.$this->io->wr |
9ecc0 | 69 74 65 45 72 72 6f 72 28 22 20 20 2d 20 22 20 2e 20 49 6e 73 74 61 6c 6c 4f 70 65 72 61 74 69 | iteError("..-."...InstallOperati |
9ece0 | 6f 6e 3a 3a 66 6f 72 6d 61 74 28 24 70 61 63 6b 61 67 65 29 20 2e 20 24 74 68 69 73 2d 3e 67 65 | on::format($package)...$this->ge |
9ed00 | 74 49 6e 73 74 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 41 70 70 65 6e 64 69 78 28 24 70 61 63 6b 61 | tInstallOperationAppendix($packa |
9ed20 | 67 65 2c 20 24 70 61 74 68 29 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 | ge,.$path));.}..return.\React\Pr |
9ed40 | 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a 0a 24 74 72 61 6e 73 70 | omise\resolve(null);.}...$transp |
9ed60 | 6f 72 74 4f 70 74 69 6f 6e 73 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 54 72 61 6e 73 70 | ortOptions.=.$package->getTransp |
9ed80 | 6f 72 74 4f 70 74 69 6f 6e 73 28 29 20 2b 20 5b 27 72 65 6c 61 74 69 76 65 27 20 3d 3e 20 74 72 | ortOptions().+.['relative'.=>.tr |
9eda0 | 75 65 5d 3b 0a 0a 5b 24 63 75 72 72 65 6e 74 53 74 72 61 74 65 67 79 2c 20 24 61 6c 6c 6f 77 65 | ue];..[$currentStrategy,.$allowe |
9edc0 | 64 53 74 72 61 74 65 67 69 65 73 5d 20 3d 20 24 74 68 69 73 2d 3e 63 6f 6d 70 75 74 65 41 6c 6c | dStrategies].=.$this->computeAll |
9ede0 | 6f 77 65 64 53 74 72 61 74 65 67 69 65 73 28 24 74 72 61 6e 73 70 6f 72 74 4f 70 74 69 6f 6e 73 | owedStrategies($transportOptions |
9ee00 | 29 3b 0a 0a 24 73 79 6d 66 6f 6e 79 46 69 6c 65 73 79 73 74 65 6d 20 3d 20 6e 65 77 20 53 79 6d | );..$symfonyFilesystem.=.new.Sym |
9ee20 | 66 6f 6e 79 46 69 6c 65 73 79 73 74 65 6d 28 29 3b 0a 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 73 | fonyFilesystem();.$this->filesys |
9ee40 | 74 65 6d 2d 3e 72 65 6d 6f 76 65 44 69 72 65 63 74 6f 72 79 28 24 70 61 74 68 29 3b 0a 0a 69 66 | tem->removeDirectory($path);..if |
9ee60 | 20 28 24 6f 75 74 70 75 74 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 | .($output).{.$this->io->writeErr |
9ee80 | 6f 72 28 22 20 20 2d 20 22 20 2e 20 49 6e 73 74 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 3a 3a 66 6f | or("..-."...InstallOperation::fo |
9eea0 | 72 6d 61 74 28 24 70 61 63 6b 61 67 65 29 2e 27 3a 20 27 2c 20 66 61 6c 73 65 29 3b 0a 7d 0a 0a | rmat($package).':.',.false);.}.. |
9eec0 | 24 69 73 46 61 6c 6c 62 61 63 6b 20 3d 20 66 61 6c 73 65 3b 0a 69 66 20 28 73 65 6c 66 3a 3a 53 | $isFallback.=.false;.if.(self::S |
9eee0 | 54 52 41 54 45 47 59 5f 53 59 4d 4c 49 4e 4b 20 3d 3d 3d 20 24 63 75 72 72 65 6e 74 53 74 72 61 | TRATEGY_SYMLINK.===.$currentStra |
9ef00 | 74 65 67 79 29 20 7b 0a 74 72 79 20 7b 0a 69 66 20 28 50 6c 61 74 66 6f 72 6d 3a 3a 69 73 57 69 | tegy).{.try.{.if.(Platform::isWi |
9ef20 | 6e 64 6f 77 73 28 29 29 20 7b 0a 0a 69 66 20 28 24 6f 75 74 70 75 74 29 20 7b 0a 24 74 68 69 73 | ndows()).{..if.($output).{.$this |
9ef40 | 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 73 70 72 69 6e 74 66 28 27 4a 75 6e 63 74 69 | ->io->writeError(sprintf('Juncti |
9ef60 | 6f 6e 69 6e 67 20 66 72 6f 6d 20 25 73 27 2c 20 24 75 72 6c 29 2c 20 66 61 6c 73 65 29 3b 0a 7d | oning.from.%s',.$url),.false);.} |
9ef80 | 0a 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 73 74 65 6d 2d 3e 6a 75 6e 63 74 69 6f 6e 28 24 72 65 | .$this->filesystem->junction($re |
9efa0 | 61 6c 55 72 6c 2c 20 24 70 61 74 68 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 61 62 73 6f 6c 75 74 | alUrl,.$path);.}.else.{.$absolut |
9efc0 | 65 50 61 74 68 20 3d 20 24 70 61 74 68 3b 0a 69 66 20 28 21 24 74 68 69 73 2d 3e 66 69 6c 65 73 | ePath.=.$path;.if.(!$this->files |
9efe0 | 79 73 74 65 6d 2d 3e 69 73 41 62 73 6f 6c 75 74 65 50 61 74 68 28 24 61 62 73 6f 6c 75 74 65 50 | ystem->isAbsolutePath($absoluteP |
9f000 | 61 74 68 29 29 20 7b 0a 24 61 62 73 6f 6c 75 74 65 50 61 74 68 20 3d 20 50 6c 61 74 66 6f 72 6d | ath)).{.$absolutePath.=.Platform |
9f020 | 3a 3a 67 65 74 43 77 64 28 29 20 2e 20 44 49 52 45 43 54 4f 52 59 5f 53 45 50 41 52 41 54 4f 52 | ::getCwd()...DIRECTORY_SEPARATOR |
9f040 | 20 2e 20 24 70 61 74 68 3b 0a 7d 0a 24 73 68 6f 72 74 65 73 74 50 61 74 68 20 3d 20 24 74 68 69 | ...$path;.}.$shortestPath.=.$thi |
9f060 | 73 2d 3e 66 69 6c 65 73 79 73 74 65 6d 2d 3e 66 69 6e 64 53 68 6f 72 74 65 73 74 50 61 74 68 28 | s->filesystem->findShortestPath( |
9f080 | 24 61 62 73 6f 6c 75 74 65 50 61 74 68 2c 20 24 72 65 61 6c 55 72 6c 29 3b 0a 24 70 61 74 68 20 | $absolutePath,.$realUrl);.$path. |
9f0a0 | 3d 20 72 74 72 69 6d 28 24 70 61 74 68 2c 20 22 2f 22 29 3b 0a 69 66 20 28 24 6f 75 74 70 75 74 | =.rtrim($path,."/");.if.($output |
9f0c0 | 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 73 70 72 69 6e 74 | ).{.$this->io->writeError(sprint |
9f0e0 | 66 28 27 53 79 6d 6c 69 6e 6b 69 6e 67 20 66 72 6f 6d 20 25 73 27 2c 20 24 75 72 6c 29 2c 20 66 | f('Symlinking.from.%s',.$url),.f |
9f100 | 61 6c 73 65 29 3b 0a 7d 0a 69 66 20 28 24 74 72 61 6e 73 70 6f 72 74 4f 70 74 69 6f 6e 73 5b 27 | alse);.}.if.($transportOptions[' |
9f120 | 72 65 6c 61 74 69 76 65 27 5d 29 20 7b 0a 24 73 79 6d 66 6f 6e 79 46 69 6c 65 73 79 73 74 65 6d | relative']).{.$symfonyFilesystem |
9f140 | 2d 3e 73 79 6d 6c 69 6e 6b 28 24 73 68 6f 72 74 65 73 74 50 61 74 68 2e 27 2f 27 2c 20 24 70 61 | ->symlink($shortestPath.'/',.$pa |
9f160 | 74 68 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 73 79 6d 66 6f 6e 79 46 69 6c 65 73 79 73 74 65 6d | th);.}.else.{.$symfonyFilesystem |
9f180 | 2d 3e 73 79 6d 6c 69 6e 6b 28 24 72 65 61 6c 55 72 6c 2e 27 2f 27 2c 20 24 70 61 74 68 29 3b 0a | ->symlink($realUrl.'/',.$path);. |
9f1a0 | 7d 0a 7d 0a 7d 20 63 61 74 63 68 20 28 49 4f 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 69 | }.}.}.catch.(IOException.$e).{.i |
9f1c0 | 66 20 28 69 6e 5f 61 72 72 61 79 28 73 65 6c 66 3a 3a 53 54 52 41 54 45 47 59 5f 4d 49 52 52 4f | f.(in_array(self::STRATEGY_MIRRO |
9f1e0 | 52 2c 20 24 61 6c 6c 6f 77 65 64 53 74 72 61 74 65 67 69 65 73 2c 20 74 72 75 65 29 29 20 7b 0a | R,.$allowedStrategies,.true)).{. |
9f200 | 69 66 20 28 24 6f 75 74 70 75 74 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 | if.($output).{.$this->io->writeE |
9f220 | 72 72 6f 72 28 27 27 29 3b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 | rror('');.$this->io->writeError( |
9f240 | 27 20 20 20 20 3c 65 72 72 6f 72 3e 53 79 6d 6c 69 6e 6b 20 66 61 69 6c 65 64 2c 20 66 61 6c 6c | '....<error>Symlink.failed,.fall |
9f260 | 62 61 63 6b 20 74 6f 20 75 73 65 20 6d 69 72 72 6f 72 69 6e 67 21 3c 2f 65 72 72 6f 72 3e 27 29 | back.to.use.mirroring!</error>') |
9f280 | 3b 0a 7d 0a 24 63 75 72 72 65 6e 74 53 74 72 61 74 65 67 79 20 3d 20 73 65 6c 66 3a 3a 53 54 52 | ;.}.$currentStrategy.=.self::STR |
9f2a0 | 41 54 45 47 59 5f 4d 49 52 52 4f 52 3b 0a 24 69 73 46 61 6c 6c 62 61 63 6b 20 3d 20 74 72 75 65 | ATEGY_MIRROR;.$isFallback.=.true |
9f2c0 | 3b 0a 7d 20 65 6c 73 65 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 | ;.}.else.{.throw.new.\RuntimeExc |
9f2e0 | 65 70 74 69 6f 6e 28 73 70 72 69 6e 74 66 28 27 53 79 6d 6c 69 6e 6b 20 66 72 6f 6d 20 22 25 73 | eption(sprintf('Symlink.from."%s |
9f300 | 22 20 74 6f 20 22 25 73 22 20 66 61 69 6c 65 64 21 27 2c 20 24 72 65 61 6c 55 72 6c 2c 20 24 70 | ".to."%s".failed!',.$realUrl,.$p |
9f320 | 61 74 68 29 29 3b 0a 7d 0a 7d 0a 7d 0a 0a 0a 69 66 20 28 73 65 6c 66 3a 3a 53 54 52 41 54 45 47 | ath));.}.}.}...if.(self::STRATEG |
9f340 | 59 5f 4d 49 52 52 4f 52 20 3d 3d 3d 20 24 63 75 72 72 65 6e 74 53 74 72 61 74 65 67 79 29 20 7b | Y_MIRROR.===.$currentStrategy).{ |
9f360 | 0a 24 72 65 61 6c 55 72 6c 20 3d 20 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 73 74 65 6d 2d 3e 6e | .$realUrl.=.$this->filesystem->n |
9f380 | 6f 72 6d 61 6c 69 7a 65 50 61 74 68 28 24 72 65 61 6c 55 72 6c 29 3b 0a 0a 69 66 20 28 24 6f 75 | ormalizePath($realUrl);..if.($ou |
9f3a0 | 74 70 75 74 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 73 70 | tput).{.$this->io->writeError(sp |
9f3c0 | 72 69 6e 74 66 28 27 25 73 4d 69 72 72 6f 72 69 6e 67 20 66 72 6f 6d 20 25 73 27 2c 20 24 69 73 | rintf('%sMirroring.from.%s',.$is |
9f3e0 | 46 61 6c 6c 62 61 63 6b 20 3f 20 27 20 20 20 20 27 20 3a 20 27 27 2c 20 24 75 72 6c 29 2c 20 66 | Fallback.?.'....'.:.'',.$url),.f |
9f400 | 61 6c 73 65 29 3b 0a 7d 0a 24 69 74 65 72 61 74 6f 72 20 3d 20 6e 65 77 20 41 72 63 68 69 76 61 | alse);.}.$iterator.=.new.Archiva |
9f420 | 62 6c 65 46 69 6c 65 73 46 69 6e 64 65 72 28 24 72 65 61 6c 55 72 6c 2c 20 5b 5d 29 3b 0a 24 73 | bleFilesFinder($realUrl,.[]);.$s |
9f440 | 79 6d 66 6f 6e 79 46 69 6c 65 73 79 73 74 65 6d 2d 3e 6d 69 72 72 6f 72 28 24 72 65 61 6c 55 72 | ymfonyFilesystem->mirror($realUr |
9f460 | 6c 2c 20 24 70 61 74 68 2c 20 24 69 74 65 72 61 74 6f 72 29 3b 0a 7d 0a 0a 69 66 20 28 24 6f 75 | l,.$path,.$iterator);.}..if.($ou |
9f480 | 74 70 75 74 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 27 | tput).{.$this->io->writeError('' |
9f4a0 | 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f | );.}..return.\React\Promise\reso |
9f4c0 | 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e | lve(null);.}.....public.function |
9f4e0 | 20 72 65 6d 6f 76 65 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 | .remove(PackageInterface.$packag |
9f500 | 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 2c 20 62 6f 6f 6c 20 24 6f 75 74 70 75 74 20 3d 20 | e,.string.$path,.bool.$output.=. |
9f520 | 74 72 75 65 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 24 70 61 74 68 20 | true):.PromiseInterface.{.$path. |
9f540 | 3d 20 46 69 6c 65 73 79 73 74 65 6d 3a 3a 74 72 69 6d 54 72 61 69 6c 69 6e 67 53 6c 61 73 68 28 | =.Filesystem::trimTrailingSlash( |
9f560 | 24 70 61 74 68 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 69 66 20 28 50 6c 61 74 66 6f 72 6d 3a 3a 69 | $path);..........if.(Platform::i |
9f580 | 73 57 69 6e 64 6f 77 73 28 29 20 26 26 20 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 73 74 65 6d 2d | sWindows().&&.$this->filesystem- |
9f5a0 | 3e 69 73 4a 75 6e 63 74 69 6f 6e 28 24 70 61 74 68 29 29 20 7b 0a 69 66 20 28 24 6f 75 74 70 75 | >isJunction($path)).{.if.($outpu |
9f5c0 | 74 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 22 20 20 2d 20 | t).{.$this->io->writeError("..-. |
9f5e0 | 22 20 2e 20 55 6e 69 6e 73 74 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 3a 3a 66 6f 72 6d 61 74 28 24 | "...UninstallOperation::format($ |
9f600 | 70 61 63 6b 61 67 65 29 2e 22 2c 20 73 6f 75 72 63 65 20 69 73 20 73 74 69 6c 6c 20 70 72 65 73 | package).",.source.is.still.pres |
9f620 | 65 6e 74 20 69 6e 20 24 70 61 74 68 22 29 3b 0a 7d 0a 69 66 20 28 21 24 74 68 69 73 2d 3e 66 69 | ent.in.$path");.}.if.(!$this->fi |
9f640 | 6c 65 73 79 73 74 65 6d 2d 3e 72 65 6d 6f 76 65 4a 75 6e 63 74 69 6f 6e 28 24 70 61 74 68 29 29 | lesystem->removeJunction($path)) |
9f660 | 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 22 20 20 20 20 3c 77 | .{.$this->io->writeError("....<w |
9f680 | 61 72 6e 69 6e 67 3e 43 6f 75 6c 64 20 6e 6f 74 20 72 65 6d 6f 76 65 20 6a 75 6e 63 74 69 6f 6e | arning>Could.not.remove.junction |
9f6a0 | 20 61 74 20 22 20 2e 20 24 70 61 74 68 20 2e 20 22 20 2d 20 69 73 20 61 6e 6f 74 68 65 72 20 70 | .at."...$path...".-.is.another.p |
9f6c0 | 72 6f 63 65 73 73 20 6c 6f 63 6b 69 6e 67 20 69 74 3f 3c 2f 77 61 72 6e 69 6e 67 3e 22 29 3b 0a | rocess.locking.it?</warning>");. |
9f6e0 | 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 43 6f 75 | throw.new.\RuntimeException('Cou |
9f700 | 6c 64 20 6e 6f 74 20 72 65 6c 69 61 62 6c 79 20 72 65 6d 6f 76 65 20 6a 75 6e 63 74 69 6f 6e 20 | ld.not.reliably.remove.junction. |
9f720 | 66 6f 72 20 70 61 63 6b 61 67 65 20 27 20 2e 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d | for.package.'...$package->getNam |
9f740 | 65 28 29 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 | e());.}..return.\React\Promise\r |
9f760 | 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 24 66 73 20 3d 20 6e 65 77 20 46 | esolve(null);.}......$fs.=.new.F |
9f780 | 69 6c 65 73 79 73 74 65 6d 3b 0a 24 61 62 73 50 61 74 68 20 3d 20 24 66 73 2d 3e 69 73 41 62 73 | ilesystem;.$absPath.=.$fs->isAbs |
9f7a0 | 6f 6c 75 74 65 50 61 74 68 28 24 70 61 74 68 29 20 3f 20 24 70 61 74 68 20 3a 20 50 6c 61 74 66 | olutePath($path).?.$path.:.Platf |
9f7c0 | 6f 72 6d 3a 3a 67 65 74 43 77 64 28 29 20 2e 20 27 2f 27 20 2e 20 24 70 61 74 68 3b 0a 24 61 62 | orm::getCwd()...'/'...$path;.$ab |
9f7e0 | 73 44 69 73 74 55 72 6c 20 3d 20 24 66 73 2d 3e 69 73 41 62 73 6f 6c 75 74 65 50 61 74 68 28 24 | sDistUrl.=.$fs->isAbsolutePath($ |
9f800 | 70 61 63 6b 61 67 65 2d 3e 67 65 74 44 69 73 74 55 72 6c 28 29 29 20 3f 20 24 70 61 63 6b 61 67 | package->getDistUrl()).?.$packag |
9f820 | 65 2d 3e 67 65 74 44 69 73 74 55 72 6c 28 29 20 3a 20 50 6c 61 74 66 6f 72 6d 3a 3a 67 65 74 43 | e->getDistUrl().:.Platform::getC |
9f840 | 77 64 28 29 20 2e 20 27 2f 27 20 2e 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 44 69 73 74 55 72 | wd()...'/'...$package->getDistUr |
9f860 | 6c 28 29 3b 0a 69 66 20 28 24 66 73 2d 3e 6e 6f 72 6d 61 6c 69 7a 65 50 61 74 68 28 24 61 62 73 | l();.if.($fs->normalizePath($abs |
9f880 | 50 61 74 68 29 20 3d 3d 3d 20 24 66 73 2d 3e 6e 6f 72 6d 61 6c 69 7a 65 50 61 74 68 28 24 61 62 | Path).===.$fs->normalizePath($ab |
9f8a0 | 73 44 69 73 74 55 72 6c 29 29 20 7b 0a 69 66 20 28 24 6f 75 74 70 75 74 29 20 7b 0a 24 74 68 69 | sDistUrl)).{.if.($output).{.$thi |
9f8c0 | 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 22 20 20 2d 20 22 20 2e 20 55 6e 69 6e 73 | s->io->writeError("..-."...Unins |
9f8e0 | 74 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 3a 3a 66 6f 72 6d 61 74 28 24 70 61 63 6b 61 67 65 29 2e | tallOperation::format($package). |
9f900 | 22 2c 20 73 6f 75 72 63 65 20 69 73 20 73 74 69 6c 6c 20 70 72 65 73 65 6e 74 20 69 6e 20 24 70 | ",.source.is.still.present.in.$p |
9f920 | 61 74 68 22 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c | ath");.}..return.\React\Promise\ |
9f940 | 72 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 70 61 72 65 6e 74 3a | resolve(null);.}..return.parent: |
9f960 | 3a 72 65 6d 6f 76 65 28 24 70 61 63 6b 61 67 65 2c 20 24 70 61 74 68 2c 20 24 6f 75 74 70 75 74 | :remove($package,.$path,.$output |
9f980 | 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 56 63 73 52 | );.}.....public.function.getVcsR |
9f9a0 | 65 66 65 72 65 6e 63 65 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 | eference(PackageInterface.$packa |
9f9c0 | 67 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 29 3a 20 3f 73 74 72 69 6e 67 0a 7b 0a 24 70 61 | ge,.string.$path):.?string.{.$pa |
9f9e0 | 74 68 20 3d 20 46 69 6c 65 73 79 73 74 65 6d 3a 3a 74 72 69 6d 54 72 61 69 6c 69 6e 67 53 6c 61 | th.=.Filesystem::trimTrailingSla |
9fa00 | 73 68 28 24 70 61 74 68 29 3b 0a 24 70 61 72 73 65 72 20 3d 20 6e 65 77 20 56 65 72 73 69 6f 6e | sh($path);.$parser.=.new.Version |
9fa20 | 50 61 72 73 65 72 3b 0a 24 67 75 65 73 73 65 72 20 3d 20 6e 65 77 20 56 65 72 73 69 6f 6e 47 75 | Parser;.$guesser.=.new.VersionGu |
9fa40 | 65 73 73 65 72 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 2c 20 24 74 68 69 73 2d 3e 70 72 6f 63 | esser($this->config,.$this->proc |
9fa60 | 65 73 73 2c 20 24 70 61 72 73 65 72 29 3b 0a 24 64 75 6d 70 65 72 20 3d 20 6e 65 77 20 41 72 72 | ess,.$parser);.$dumper.=.new.Arr |
9fa80 | 61 79 44 75 6d 70 65 72 3b 0a 0a 24 70 61 63 6b 61 67 65 43 6f 6e 66 69 67 20 3d 20 24 64 75 6d | ayDumper;..$packageConfig.=.$dum |
9faa0 | 70 65 72 2d 3e 64 75 6d 70 28 24 70 61 63 6b 61 67 65 29 3b 0a 69 66 20 28 24 70 61 63 6b 61 67 | per->dump($package);.if.($packag |
9fac0 | 65 56 65 72 73 69 6f 6e 20 3d 20 24 67 75 65 73 73 65 72 2d 3e 67 75 65 73 73 56 65 72 73 69 6f | eVersion.=.$guesser->guessVersio |
9fae0 | 6e 28 24 70 61 63 6b 61 67 65 43 6f 6e 66 69 67 2c 20 24 70 61 74 68 29 29 20 7b 0a 72 65 74 75 | n($packageConfig,.$path)).{.retu |
9fb00 | 72 6e 20 24 70 61 63 6b 61 67 65 56 65 72 73 69 6f 6e 5b 27 63 6f 6d 6d 69 74 27 5d 3b 0a 7d 0a | rn.$packageVersion['commit'];.}. |
9fb20 | 0a 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 | .return.null;.}.....protected.fu |
9fb40 | 6e 63 74 69 6f 6e 20 67 65 74 49 6e 73 74 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 41 70 70 65 6e 64 | nction.getInstallOperationAppend |
9fb60 | 69 78 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 | ix(PackageInterface.$package,.st |
9fb80 | 72 69 6e 67 20 24 70 61 74 68 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 24 72 65 61 6c 55 72 6c 20 3d | ring.$path):.string.{.$realUrl.= |
9fba0 | 20 72 65 61 6c 70 61 74 68 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 44 69 73 74 55 72 6c 28 29 | .realpath($package->getDistUrl() |
9fbc0 | 29 3b 0a 0a 69 66 20 28 72 65 61 6c 70 61 74 68 28 24 70 61 74 68 29 20 3d 3d 3d 20 24 72 65 61 | );..if.(realpath($path).===.$rea |
9fbe0 | 6c 55 72 6c 29 20 7b 0a 72 65 74 75 72 6e 20 27 3a 20 53 6f 75 72 63 65 20 61 6c 72 65 61 64 79 | lUrl).{.return.':.Source.already |
9fc00 | 20 70 72 65 73 65 6e 74 27 3b 0a 7d 0a 0a 5b 24 63 75 72 72 65 6e 74 53 74 72 61 74 65 67 79 5d | .present';.}..[$currentStrategy] |
9fc20 | 20 3d 20 24 74 68 69 73 2d 3e 63 6f 6d 70 75 74 65 41 6c 6c 6f 77 65 64 53 74 72 61 74 65 67 69 | .=.$this->computeAllowedStrategi |
9fc40 | 65 73 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 54 72 61 6e 73 70 6f 72 74 4f 70 74 69 6f 6e 73 | es($package->getTransportOptions |
9fc60 | 28 29 29 3b 0a 0a 69 66 20 28 24 63 75 72 72 65 6e 74 53 74 72 61 74 65 67 79 20 3d 3d 3d 20 73 | ());..if.($currentStrategy.===.s |
9fc80 | 65 6c 66 3a 3a 53 54 52 41 54 45 47 59 5f 53 59 4d 4c 49 4e 4b 29 20 7b 0a 69 66 20 28 50 6c 61 | elf::STRATEGY_SYMLINK).{.if.(Pla |
9fca0 | 74 66 6f 72 6d 3a 3a 69 73 57 69 6e 64 6f 77 73 28 29 29 20 7b 0a 72 65 74 75 72 6e 20 27 3a 20 | tform::isWindows()).{.return.':. |
9fcc0 | 4a 75 6e 63 74 69 6f 6e 69 6e 67 20 66 72 6f 6d 20 27 2e 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 | Junctioning.from.'.$package->get |
9fce0 | 44 69 73 74 55 72 6c 28 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 27 3a 20 53 79 6d 6c 69 6e 6b 69 | DistUrl();.}..return.':.Symlinki |
9fd00 | 6e 67 20 66 72 6f 6d 20 27 2e 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 44 69 73 74 55 72 6c 28 29 | ng.from.'.$package->getDistUrl() |
9fd20 | 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 27 3a 20 4d 69 72 72 6f 72 69 6e 67 20 66 72 6f 6d 20 27 2e | ;.}..return.':.Mirroring.from.'. |
9fd40 | 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 44 69 73 74 55 72 6c 28 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a | $package->getDistUrl();.}....... |
9fd60 | 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 63 6f 6d 70 75 74 65 41 6c 6c 6f 77 65 64 53 | private.function.computeAllowedS |
9fd80 | 74 72 61 74 65 67 69 65 73 28 61 72 72 61 79 20 24 74 72 61 6e 73 70 6f 72 74 4f 70 74 69 6f 6e | trategies(array.$transportOption |
9fda0 | 73 29 3a 20 61 72 72 61 79 0a 7b 0a 0a 24 63 75 72 72 65 6e 74 53 74 72 61 74 65 67 79 20 3d 20 | s):.array.{..$currentStrategy.=. |
9fdc0 | 73 65 6c 66 3a 3a 53 54 52 41 54 45 47 59 5f 53 59 4d 4c 49 4e 4b 3b 0a 24 61 6c 6c 6f 77 65 64 | self::STRATEGY_SYMLINK;.$allowed |
9fde0 | 53 74 72 61 74 65 67 69 65 73 20 3d 20 5b 73 65 6c 66 3a 3a 53 54 52 41 54 45 47 59 5f 53 59 4d | Strategies.=.[self::STRATEGY_SYM |
9fe00 | 4c 49 4e 4b 2c 20 73 65 6c 66 3a 3a 53 54 52 41 54 45 47 59 5f 4d 49 52 52 4f 52 5d 3b 0a 0a 24 | LINK,.self::STRATEGY_MIRROR];..$ |
9fe20 | 6d 69 72 72 6f 72 50 61 74 68 52 65 70 6f 73 20 3d 20 50 6c 61 74 66 6f 72 6d 3a 3a 67 65 74 45 | mirrorPathRepos.=.Platform::getE |
9fe40 | 6e 76 28 27 43 4f 4d 50 4f 53 45 52 5f 4d 49 52 52 4f 52 5f 50 41 54 48 5f 52 45 50 4f 53 27 29 | nv('COMPOSER_MIRROR_PATH_REPOS') |
9fe60 | 3b 0a 69 66 20 28 24 6d 69 72 72 6f 72 50 61 74 68 52 65 70 6f 73 29 20 7b 0a 24 63 75 72 72 65 | ;.if.($mirrorPathRepos).{.$curre |
9fe80 | 6e 74 53 74 72 61 74 65 67 79 20 3d 20 73 65 6c 66 3a 3a 53 54 52 41 54 45 47 59 5f 4d 49 52 52 | ntStrategy.=.self::STRATEGY_MIRR |
9fea0 | 4f 52 3b 0a 7d 0a 0a 24 73 79 6d 6c 69 6e 6b 4f 70 74 69 6f 6e 20 3d 20 24 74 72 61 6e 73 70 6f | OR;.}..$symlinkOption.=.$transpo |
9fec0 | 72 74 4f 70 74 69 6f 6e 73 5b 27 73 79 6d 6c 69 6e 6b 27 5d 20 3f 3f 20 6e 75 6c 6c 3b 0a 0a 69 | rtOptions['symlink'].??.null;..i |
9fee0 | 66 20 28 74 72 75 65 20 3d 3d 3d 20 24 73 79 6d 6c 69 6e 6b 4f 70 74 69 6f 6e 29 20 7b 0a 24 63 | f.(true.===.$symlinkOption).{.$c |
9ff00 | 75 72 72 65 6e 74 53 74 72 61 74 65 67 79 20 3d 20 73 65 6c 66 3a 3a 53 54 52 41 54 45 47 59 5f | urrentStrategy.=.self::STRATEGY_ |
9ff20 | 53 59 4d 4c 49 4e 4b 3b 0a 24 61 6c 6c 6f 77 65 64 53 74 72 61 74 65 67 69 65 73 20 3d 20 5b 73 | SYMLINK;.$allowedStrategies.=.[s |
9ff40 | 65 6c 66 3a 3a 53 54 52 41 54 45 47 59 5f 53 59 4d 4c 49 4e 4b 5d 3b 0a 7d 20 65 6c 73 65 69 66 | elf::STRATEGY_SYMLINK];.}.elseif |
9ff60 | 20 28 66 61 6c 73 65 20 3d 3d 3d 20 24 73 79 6d 6c 69 6e 6b 4f 70 74 69 6f 6e 29 20 7b 0a 24 63 | .(false.===.$symlinkOption).{.$c |
9ff80 | 75 72 72 65 6e 74 53 74 72 61 74 65 67 79 20 3d 20 73 65 6c 66 3a 3a 53 54 52 41 54 45 47 59 5f | urrentStrategy.=.self::STRATEGY_ |
9ffa0 | 4d 49 52 52 4f 52 3b 0a 24 61 6c 6c 6f 77 65 64 53 74 72 61 74 65 67 69 65 73 20 3d 20 5b 73 65 | MIRROR;.$allowedStrategies.=.[se |
9ffc0 | 6c 66 3a 3a 53 54 52 41 54 45 47 59 5f 4d 49 52 52 4f 52 5d 3b 0a 7d 0a 0a 0a 69 66 20 28 50 6c | lf::STRATEGY_MIRROR];.}...if.(Pl |
9ffe0 | 61 74 66 6f 72 6d 3a 3a 69 73 57 69 6e 64 6f 77 73 28 29 20 26 26 20 73 65 6c 66 3a 3a 53 54 52 | atform::isWindows().&&.self::STR |
a0000 | 41 54 45 47 59 5f 53 59 4d 4c 49 4e 4b 20 3d 3d 3d 20 24 63 75 72 72 65 6e 74 53 74 72 61 74 65 | ATEGY_SYMLINK.===.$currentStrate |
a0020 | 67 79 20 26 26 20 21 24 74 68 69 73 2d 3e 73 61 66 65 4a 75 6e 63 74 69 6f 6e 73 28 29 29 20 7b | gy.&&.!$this->safeJunctions()).{ |
a0040 | 0a 69 66 20 28 21 69 6e 5f 61 72 72 61 79 28 73 65 6c 66 3a 3a 53 54 52 41 54 45 47 59 5f 4d 49 | .if.(!in_array(self::STRATEGY_MI |
a0060 | 52 52 4f 52 2c 20 24 61 6c 6c 6f 77 65 64 53 74 72 61 74 65 67 69 65 73 2c 20 74 72 75 65 29 29 | RROR,.$allowedStrategies,.true)) |
a0080 | 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 | .{.throw.new.\RuntimeException(' |
a00a0 | 59 6f 75 20 61 72 65 20 6f 6e 20 61 6e 20 6f 6c 64 20 57 69 6e 64 6f 77 73 20 2f 20 6f 6c 64 20 | You.are.on.an.old.Windows./.old. |
a00c0 | 50 48 50 20 63 6f 6d 62 6f 20 77 68 69 63 68 20 64 6f 65 73 20 6e 6f 74 20 61 6c 6c 6f 77 20 43 | PHP.combo.which.does.not.allow.C |
a00e0 | 6f 6d 70 6f 73 65 72 20 74 6f 20 75 73 65 20 6a 75 6e 63 74 69 6f 6e 73 2f 73 79 6d 6c 69 6e 6b | omposer.to.use.junctions/symlink |
a0100 | 73 20 61 6e 64 20 74 68 69 73 20 70 61 74 68 20 72 65 70 6f 73 69 74 6f 72 79 20 68 61 73 20 73 | s.and.this.path.repository.has.s |
a0120 | 79 6d 6c 69 6e 6b 3a 74 72 75 65 20 69 6e 20 69 74 73 20 6f 70 74 69 6f 6e 73 20 73 6f 20 63 6f | ymlink:true.in.its.options.so.co |
a0140 | 70 79 69 6e 67 20 69 73 20 6e 6f 74 20 61 6c 6c 6f 77 65 64 27 29 3b 0a 7d 0a 24 63 75 72 72 65 | pying.is.not.allowed');.}.$curre |
a0160 | 6e 74 53 74 72 61 74 65 67 79 20 3d 20 73 65 6c 66 3a 3a 53 54 52 41 54 45 47 59 5f 4d 49 52 52 | ntStrategy.=.self::STRATEGY_MIRR |
a0180 | 4f 52 3b 0a 24 61 6c 6c 6f 77 65 64 53 74 72 61 74 65 67 69 65 73 20 3d 20 5b 73 65 6c 66 3a 3a | OR;.$allowedStrategies.=.[self:: |
a01a0 | 53 54 52 41 54 45 47 59 5f 4d 49 52 52 4f 52 5d 3b 0a 7d 0a 0a 0a 69 66 20 28 21 50 6c 61 74 66 | STRATEGY_MIRROR];.}...if.(!Platf |
a01c0 | 6f 72 6d 3a 3a 69 73 57 69 6e 64 6f 77 73 28 29 20 26 26 20 73 65 6c 66 3a 3a 53 54 52 41 54 45 | orm::isWindows().&&.self::STRATE |
a01e0 | 47 59 5f 53 59 4d 4c 49 4e 4b 20 3d 3d 3d 20 24 63 75 72 72 65 6e 74 53 74 72 61 74 65 67 79 20 | GY_SYMLINK.===.$currentStrategy. |
a0200 | 26 26 20 21 66 75 6e 63 74 69 6f 6e 5f 65 78 69 73 74 73 28 27 73 79 6d 6c 69 6e 6b 27 29 29 20 | &&.!function_exists('symlink')). |
a0220 | 7b 0a 69 66 20 28 21 69 6e 5f 61 72 72 61 79 28 73 65 6c 66 3a 3a 53 54 52 41 54 45 47 59 5f 4d | {.if.(!in_array(self::STRATEGY_M |
a0240 | 49 52 52 4f 52 2c 20 24 61 6c 6c 6f 77 65 64 53 74 72 61 74 65 67 69 65 73 2c 20 74 72 75 65 29 | IRROR,.$allowedStrategies,.true) |
a0260 | 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 | ).{.throw.new.\RuntimeException( |
a0280 | 27 59 6f 75 72 20 50 48 50 20 68 61 73 20 74 68 65 20 73 79 6d 6c 69 6e 6b 28 29 20 66 75 6e 63 | 'Your.PHP.has.the.symlink().func |
a02a0 | 74 69 6f 6e 20 64 69 73 61 62 6c 65 64 20 77 68 69 63 68 20 64 6f 65 73 20 6e 6f 74 20 61 6c 6c | tion.disabled.which.does.not.all |
a02c0 | 6f 77 20 43 6f 6d 70 6f 73 65 72 20 74 6f 20 75 73 65 20 73 79 6d 6c 69 6e 6b 73 20 61 6e 64 20 | ow.Composer.to.use.symlinks.and. |
a02e0 | 74 68 69 73 20 70 61 74 68 20 72 65 70 6f 73 69 74 6f 72 79 20 68 61 73 20 73 79 6d 6c 69 6e 6b | this.path.repository.has.symlink |
a0300 | 3a 74 72 75 65 20 69 6e 20 69 74 73 20 6f 70 74 69 6f 6e 73 20 73 6f 20 63 6f 70 79 69 6e 67 20 | :true.in.its.options.so.copying. |
a0320 | 69 73 20 6e 6f 74 20 61 6c 6c 6f 77 65 64 27 29 3b 0a 7d 0a 24 63 75 72 72 65 6e 74 53 74 72 61 | is.not.allowed');.}.$currentStra |
a0340 | 74 65 67 79 20 3d 20 73 65 6c 66 3a 3a 53 54 52 41 54 45 47 59 5f 4d 49 52 52 4f 52 3b 0a 24 61 | tegy.=.self::STRATEGY_MIRROR;.$a |
a0360 | 6c 6c 6f 77 65 64 53 74 72 61 74 65 67 69 65 73 20 3d 20 5b 73 65 6c 66 3a 3a 53 54 52 41 54 45 | llowedStrategies.=.[self::STRATE |
a0380 | 47 59 5f 4d 49 52 52 4f 52 5d 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 5b 24 63 75 72 72 65 6e 74 53 | GY_MIRROR];.}..return.[$currentS |
a03a0 | 74 72 61 74 65 67 79 2c 20 24 61 6c 6c 6f 77 65 64 53 74 72 61 74 65 67 69 65 73 5d 3b 0a 7d 0a | trategy,.$allowedStrategies];.}. |
a03c0 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 73 61 66 | ............private.function.saf |
a03e0 | 65 4a 75 6e 63 74 69 6f 6e 73 28 29 3a 20 62 6f 6f 6c 0a 7b 0a 0a 72 65 74 75 72 6e 20 66 75 6e | eJunctions():.bool.{..return.fun |
a0400 | 63 74 69 6f 6e 5f 65 78 69 73 74 73 28 27 70 72 6f 63 5f 6f 70 65 6e 27 29 20 26 26 0a 28 50 48 | ction_exists('proc_open').&&.(PH |
a0420 | 50 5f 57 49 4e 44 4f 57 53 5f 56 45 52 53 49 4f 4e 5f 4d 41 4a 4f 52 20 3e 20 36 20 7c 7c 0a 28 | P_WINDOWS_VERSION_MAJOR.>.6.||.( |
a0440 | 50 48 50 5f 57 49 4e 44 4f 57 53 5f 56 45 52 53 49 4f 4e 5f 4d 41 4a 4f 52 20 3d 3d 3d 20 36 20 | PHP_WINDOWS_VERSION_MAJOR.===.6. |
a0460 | 26 26 20 50 48 50 5f 57 49 4e 44 4f 57 53 5f 56 45 52 53 49 4f 4e 5f 4d 49 4e 4f 52 20 3e 3d 20 | &&.PHP_WINDOWS_VERSION_MINOR.>=. |
a0480 | 31 29 29 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 | 1));.}.}.<?php.declare(strict_ty |
a04a0 | 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d | pes=1);............namespace.Com |
a04c0 | 70 6f 73 65 72 5c 44 6f 77 6e 6c 6f 61 64 65 72 3b 0a 0a 75 73 65 20 52 65 61 63 74 5c 50 72 6f | poser\Downloader;..use.React\Pro |
a04e0 | 6d 69 73 65 5c 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f | mise\PromiseInterface;.use.Compo |
a0500 | 73 65 72 5c 50 61 63 6b 61 67 65 5c 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 | ser\Package\PackageInterface;.us |
a0520 | 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 56 63 73 52 65 70 6f 73 69 74 | e.Composer\Repository\VcsReposit |
a0540 | 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 65 72 66 6f 72 63 65 3b | ory;.use.Composer\Util\Perforce; |
a0560 | 0a 0a 0a 0a 0a 63 6c 61 73 73 20 50 65 72 66 6f 72 63 65 44 6f 77 6e 6c 6f 61 64 65 72 20 65 78 | .....class.PerforceDownloader.ex |
a0580 | 74 65 6e 64 73 20 56 63 73 44 6f 77 6e 6c 6f 61 64 65 72 0a 7b 0a 0a 70 72 6f 74 65 63 74 65 64 | tends.VcsDownloader.{..protected |
a05a0 | 20 24 70 65 72 66 6f 72 63 65 3b 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 | .$perforce;.....protected.functi |
a05c0 | 6f 6e 20 64 6f 44 6f 77 6e 6c 6f 61 64 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 | on.doDownload(PackageInterface.$ |
a05e0 | 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 2c 20 73 74 72 69 6e 67 20 24 75 | package,.string.$path,.string.$u |
a0600 | 72 6c 2c 20 3f 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 72 65 76 50 61 63 6b 61 | rl,.?PackageInterface.$prevPacka |
a0620 | 67 65 20 3d 20 6e 75 6c 6c 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 72 | ge.=.null):.PromiseInterface.{.r |
a0640 | 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e 75 6c | eturn.\React\Promise\resolve(nul |
a0660 | 6c 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 64 6f 49 6e 73 74 | l);.}.....public.function.doInst |
a0680 | 61 6c 6c 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 | all(PackageInterface.$package,.s |
a06a0 | 74 72 69 6e 67 20 24 70 61 74 68 2c 20 73 74 72 69 6e 67 20 24 75 72 6c 29 3a 20 50 72 6f 6d 69 | tring.$path,.string.$url):.Promi |
a06c0 | 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 24 72 65 66 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 | seInterface.{.$ref.=.$package->g |
a06e0 | 65 74 53 6f 75 72 63 65 52 65 66 65 72 65 6e 63 65 28 29 3b 0a 24 6c 61 62 65 6c 20 3d 20 24 74 | etSourceReference();.$label.=.$t |
a0700 | 68 69 73 2d 3e 67 65 74 4c 61 62 65 6c 46 72 6f 6d 53 6f 75 72 63 65 52 65 66 65 72 65 6e 63 65 | his->getLabelFromSourceReference |
a0720 | 28 28 73 74 72 69 6e 67 29 20 24 72 65 66 29 3b 0a 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 | ((string).$ref);..$this->io->wri |
a0740 | 74 65 45 72 72 6f 72 28 27 43 6c 6f 6e 69 6e 67 20 27 20 2e 20 24 72 65 66 29 3b 0a 24 74 68 69 | teError('Cloning.'...$ref);.$thi |
a0760 | 73 2d 3e 69 6e 69 74 50 65 72 66 6f 72 63 65 28 24 70 61 63 6b 61 67 65 2c 20 24 70 61 74 68 2c | s->initPerforce($package,.$path, |
a0780 | 20 24 75 72 6c 29 3b 0a 24 74 68 69 73 2d 3e 70 65 72 66 6f 72 63 65 2d 3e 73 65 74 53 74 72 65 | .$url);.$this->perforce->setStre |
a07a0 | 61 6d 28 24 72 65 66 29 3b 0a 24 74 68 69 73 2d 3e 70 65 72 66 6f 72 63 65 2d 3e 70 34 4c 6f 67 | am($ref);.$this->perforce->p4Log |
a07c0 | 69 6e 28 29 3b 0a 24 74 68 69 73 2d 3e 70 65 72 66 6f 72 63 65 2d 3e 77 72 69 74 65 50 34 43 6c | in();.$this->perforce->writeP4Cl |
a07e0 | 69 65 6e 74 53 70 65 63 28 29 3b 0a 24 74 68 69 73 2d 3e 70 65 72 66 6f 72 63 65 2d 3e 63 6f 6e | ientSpec();.$this->perforce->con |
a0800 | 6e 65 63 74 43 6c 69 65 6e 74 28 29 3b 0a 24 74 68 69 73 2d 3e 70 65 72 66 6f 72 63 65 2d 3e 73 | nectClient();.$this->perforce->s |
a0820 | 79 6e 63 43 6f 64 65 42 61 73 65 28 24 6c 61 62 65 6c 29 3b 0a 24 74 68 69 73 2d 3e 70 65 72 66 | yncCodeBase($label);.$this->perf |
a0840 | 6f 72 63 65 2d 3e 63 6c 65 61 6e 75 70 43 6c 69 65 6e 74 53 70 65 63 28 29 3b 0a 0a 72 65 74 75 | orce->cleanupClientSpec();..retu |
a0860 | 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b | rn.\React\Promise\resolve(null); |
a0880 | 0a 7d 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 4c 61 62 65 6c 46 72 6f | .}..private.function.getLabelFro |
a08a0 | 6d 53 6f 75 72 63 65 52 65 66 65 72 65 6e 63 65 28 73 74 72 69 6e 67 20 24 72 65 66 29 3a 20 3f | mSourceReference(string.$ref):.? |
a08c0 | 73 74 72 69 6e 67 0a 7b 0a 24 70 6f 73 20 3d 20 73 74 72 70 6f 73 28 24 72 65 66 2c 20 27 40 27 | string.{.$pos.=.strpos($ref,.'@' |
a08e0 | 29 3b 0a 69 66 20 28 66 61 6c 73 65 20 21 3d 3d 20 24 70 6f 73 29 20 7b 0a 72 65 74 75 72 6e 20 | );.if.(false.!==.$pos).{.return. |
a0900 | 73 75 62 73 74 72 28 24 72 65 66 2c 20 24 70 6f 73 20 2b 20 31 29 3b 0a 7d 0a 0a 72 65 74 75 72 | substr($ref,.$pos.+.1);.}..retur |
a0920 | 6e 20 6e 75 6c 6c 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 6e 69 74 50 | n.null;.}..public.function.initP |
a0940 | 65 72 66 6f 72 63 65 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 | erforce(PackageInterface.$packag |
a0960 | 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 2c 20 73 74 72 69 6e 67 20 24 75 72 6c 29 3a 20 76 | e,.string.$path,.string.$url):.v |
a0980 | 6f 69 64 0a 7b 0a 69 66 20 28 21 65 6d 70 74 79 28 24 74 68 69 73 2d 3e 70 65 72 66 6f 72 63 65 | oid.{.if.(!empty($this->perforce |
a09a0 | 29 29 20 7b 0a 24 74 68 69 73 2d 3e 70 65 72 66 6f 72 63 65 2d 3e 69 6e 69 74 69 61 6c 69 7a 65 | )).{.$this->perforce->initialize |
a09c0 | 50 61 74 68 28 24 70 61 74 68 29 3b 0a 0a 72 65 74 75 72 6e 3b 0a 7d 0a 0a 24 72 65 70 6f 73 69 | Path($path);..return;.}..$reposi |
a09e0 | 74 6f 72 79 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 79 28 29 | tory.=.$package->getRepository() |
a0a00 | 3b 0a 24 72 65 70 6f 43 6f 6e 66 69 67 20 3d 20 6e 75 6c 6c 3b 0a 69 66 20 28 24 72 65 70 6f 73 | ;.$repoConfig.=.null;.if.($repos |
a0a20 | 69 74 6f 72 79 20 69 6e 73 74 61 6e 63 65 6f 66 20 56 63 73 52 65 70 6f 73 69 74 6f 72 79 29 20 | itory.instanceof.VcsRepository). |
a0a40 | 7b 0a 24 72 65 70 6f 43 6f 6e 66 69 67 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 52 65 70 6f 43 6f | {.$repoConfig.=.$this->getRepoCo |
a0a60 | 6e 66 69 67 28 24 72 65 70 6f 73 69 74 6f 72 79 29 3b 0a 7d 0a 24 74 68 69 73 2d 3e 70 65 72 66 | nfig($repository);.}.$this->perf |
a0a80 | 6f 72 63 65 20 3d 20 50 65 72 66 6f 72 63 65 3a 3a 63 72 65 61 74 65 28 24 72 65 70 6f 43 6f 6e | orce.=.Perforce::create($repoCon |
a0aa0 | 66 69 67 2c 20 24 75 72 6c 2c 20 24 70 61 74 68 2c 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 | fig,.$url,.$path,.$this->process |
a0ac0 | 2c 20 24 74 68 69 73 2d 3e 69 6f 29 3b 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 | ,.$this->io);.}.....private.func |
a0ae0 | 74 69 6f 6e 20 67 65 74 52 65 70 6f 43 6f 6e 66 69 67 28 56 63 73 52 65 70 6f 73 69 74 6f 72 79 | tion.getRepoConfig(VcsRepository |
a0b00 | 20 24 72 65 70 6f 73 69 74 6f 72 79 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 72 | .$repository):.array.{.return.$r |
a0b20 | 65 70 6f 73 69 74 6f 72 79 2d 3e 67 65 74 52 65 70 6f 43 6f 6e 66 69 67 28 29 3b 0a 7d 0a 0a 0a | epository->getRepoConfig();.}... |
a0b40 | 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 64 6f 55 70 64 61 74 65 28 50 61 | ..protected.function.doUpdate(Pa |
a0b60 | 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 69 6e 69 74 69 61 6c 2c 20 50 61 63 6b 61 67 65 | ckageInterface.$initial,.Package |
a0b80 | 49 6e 74 65 72 66 61 63 65 20 24 74 61 72 67 65 74 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 2c | Interface.$target,.string.$path, |
a0ba0 | 20 73 74 72 69 6e 67 20 24 75 72 6c 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a | .string.$url):.PromiseInterface. |
a0bc0 | 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 64 6f 49 6e 73 74 61 6c 6c 28 24 74 61 72 67 65 | {.return.$this->doInstall($targe |
a0be0 | 74 2c 20 24 70 61 74 68 2c 20 24 75 72 6c 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 | t,.$path,.$url);.}.....public.fu |
a0c00 | 6e 63 74 69 6f 6e 20 67 65 74 4c 6f 63 61 6c 43 68 61 6e 67 65 73 28 50 61 63 6b 61 67 65 49 6e | nction.getLocalChanges(PackageIn |
a0c20 | 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 29 3a | terface.$package,.string.$path): |
a0c40 | 20 3f 73 74 72 69 6e 67 0a 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 | .?string.{.$this->io->writeError |
a0c60 | 28 27 50 65 72 66 6f 72 63 65 20 64 72 69 76 65 72 20 64 6f 65 73 20 6e 6f 74 20 63 68 65 63 6b | ('Perforce.driver.does.not.check |
a0c80 | 20 66 6f 72 20 6c 6f 63 61 6c 20 63 68 61 6e 67 65 73 20 62 65 66 6f 72 65 20 6f 76 65 72 72 69 | .for.local.changes.before.overri |
a0ca0 | 64 69 6e 67 27 29 3b 0a 0a 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 | ding');..return.null;.}.....prot |
a0cc0 | 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 43 6f 6d 6d 69 74 4c 6f 67 73 28 73 74 72 | ected.function.getCommitLogs(str |
a0ce0 | 69 6e 67 20 24 66 72 6f 6d 52 65 66 65 72 65 6e 63 65 2c 20 73 74 72 69 6e 67 20 24 74 6f 52 65 | ing.$fromReference,.string.$toRe |
a0d00 | 66 65 72 65 6e 63 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 29 3a 20 73 74 72 69 6e 67 0a 7b | ference,.string.$path):.string.{ |
a0d20 | 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 70 65 72 66 6f 72 63 65 2d 3e 67 65 74 43 6f 6d 6d | .return.$this->perforce->getComm |
a0d40 | 69 74 4c 6f 67 73 28 24 66 72 6f 6d 52 65 66 65 72 65 6e 63 65 2c 20 24 74 6f 52 65 66 65 72 65 | itLogs($fromReference,.$toRefere |
a0d60 | 6e 63 65 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 50 65 72 66 | nce);.}..public.function.setPerf |
a0d80 | 6f 72 63 65 28 50 65 72 66 6f 72 63 65 20 24 70 65 72 66 6f 72 63 65 29 3a 20 76 6f 69 64 0a 7b | orce(Perforce.$perforce):.void.{ |
a0da0 | 0a 24 74 68 69 73 2d 3e 70 65 72 66 6f 72 63 65 20 3d 20 24 70 65 72 66 6f 72 63 65 3b 0a 7d 0a | .$this->perforce.=.$perforce;.}. |
a0dc0 | 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 68 61 73 4d 65 74 61 64 61 | ....protected.function.hasMetada |
a0de0 | 74 61 52 65 70 6f 73 69 74 6f 72 79 28 73 74 72 69 6e 67 20 24 70 61 74 68 29 3a 20 62 6f 6f 6c | taRepository(string.$path):.bool |
a0e00 | 0a 7b 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 | .{.return.true;.}.}.<?php.declar |
a0e20 | 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 | e(strict_types=1);............na |
a0e40 | 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 44 6f 77 6e 6c 6f 61 64 65 72 3b 0a 0a 75 73 | mespace.Composer\Downloader;..us |
a0e60 | 65 20 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 | e.React\Promise\PromiseInterface |
a0e80 | 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 50 61 63 6b 61 67 65 49 6e | ;.use.Composer\Package\PackageIn |
a0ea0 | 74 65 72 66 61 63 65 3b 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 50 68 61 72 44 6f 77 6e 6c 6f 61 | terface;.......class.PharDownloa |
a0ec0 | 64 65 72 20 65 78 74 65 6e 64 73 20 41 72 63 68 69 76 65 44 6f 77 6e 6c 6f 61 64 65 72 0a 7b 0a | der.extends.ArchiveDownloader.{. |
a0ee0 | 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 65 78 74 72 61 63 74 28 50 61 | ...protected.function.extract(Pa |
a0f00 | 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 | ckageInterface.$package,.string. |
a0f20 | 24 66 69 6c 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 | $file,.string.$path):.PromiseInt |
a0f40 | 65 72 66 61 63 65 0a 7b 0a 0a 24 61 72 63 68 69 76 65 20 3d 20 6e 65 77 20 5c 50 68 61 72 28 24 | erface.{..$archive.=.new.\Phar($ |
a0f60 | 66 69 6c 65 29 3b 0a 24 61 72 63 68 69 76 65 2d 3e 65 78 74 72 61 63 74 54 6f 28 24 70 61 74 68 | file);.$archive->extractTo($path |
a0f80 | 2c 20 6e 75 6c 6c 2c 20 74 72 75 65 29 3b 0a 0a 0a 0a 0a 0a 0a 72 65 74 75 72 6e 20 5c 52 65 61 | ,.null,.true);.......return.\Rea |
a0fa0 | 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 7d 0a 3c 3f | ct\Promise\resolve(null);.}.}.<? |
a0fc0 | 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a | php.declare(strict_types=1);.... |
a0fe0 | 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 44 6f 77 6e 6c | ........namespace.Composer\Downl |
a1000 | 6f 61 64 65 72 3b 0a 0a 75 73 65 20 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 50 72 6f 6d 69 73 | oader;..use.React\Promise\Promis |
a1020 | 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 49 6e | eInterface;.use.Composer\Util\In |
a1040 | 69 48 65 6c 70 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 6c 61 74 66 | iHelper;.use.Composer\Util\Platf |
a1060 | 6f 72 6d 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 72 6f 63 65 73 73 45 78 | orm;.use.Composer\Util\ProcessEx |
a1080 | 65 63 75 74 6f 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 50 61 63 | ecutor;.use.Composer\Package\Pac |
a10a0 | 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 52 61 72 41 72 63 68 69 76 65 3b 0a 0a | kageInterface;.use.RarArchive;.. |
a10c0 | 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 52 61 72 44 6f 77 6e 6c 6f 61 64 65 72 20 65 78 74 65 6e | .......class.RarDownloader.exten |
a10e0 | 64 73 20 41 72 63 68 69 76 65 44 6f 77 6e 6c 6f 61 64 65 72 0a 7b 0a 70 72 6f 74 65 63 74 65 64 | ds.ArchiveDownloader.{.protected |
a1100 | 20 66 75 6e 63 74 69 6f 6e 20 65 78 74 72 61 63 74 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 | .function.extract(PackageInterfa |
a1120 | 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 66 69 6c 65 2c 20 73 74 72 69 6e | ce.$package,.string.$file,.strin |
a1140 | 67 20 24 70 61 74 68 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 24 70 72 | g.$path):.PromiseInterface.{.$pr |
a1160 | 6f 63 65 73 73 45 72 72 6f 72 20 3d 20 6e 75 6c 6c 3b 0a 0a 0a 69 66 20 28 21 50 6c 61 74 66 6f | ocessError.=.null;...if.(!Platfo |
a1180 | 72 6d 3a 3a 69 73 57 69 6e 64 6f 77 73 28 29 29 20 7b 0a 24 63 6f 6d 6d 61 6e 64 20 3d 20 27 75 | rm::isWindows()).{.$command.=.'u |
a11a0 | 6e 72 61 72 20 78 20 2d 2d 20 27 20 2e 20 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3a 3a 65 | nrar.x.--.'...ProcessExecutor::e |
a11c0 | 73 63 61 70 65 28 24 66 69 6c 65 29 20 2e 20 27 20 27 20 2e 20 50 72 6f 63 65 73 73 45 78 65 63 | scape($file)...'.'...ProcessExec |
a11e0 | 75 74 6f 72 3a 3a 65 73 63 61 70 65 28 24 70 61 74 68 29 20 2e 20 27 20 3e 2f 64 65 76 2f 6e 75 | utor::escape($path)...'.>/dev/nu |
a1200 | 6c 6c 20 26 26 20 63 68 6d 6f 64 20 2d 52 20 75 2b 77 20 27 20 2e 20 50 72 6f 63 65 73 73 45 78 | ll.&&.chmod.-R.u+w.'...ProcessEx |
a1220 | 65 63 75 74 6f 72 3a 3a 65 73 63 61 70 65 28 24 70 61 74 68 29 3b 0a 0a 69 66 20 28 30 20 3d 3d | ecutor::escape($path);..if.(0.== |
a1240 | 3d 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 65 78 65 63 75 74 65 28 24 63 6f 6d 6d 61 | =.$this->process->execute($comma |
a1260 | 6e 64 2c 20 24 69 67 6e 6f 72 65 64 4f 75 74 70 75 74 29 29 20 7b 0a 72 65 74 75 72 6e 20 5c 52 | nd,.$ignoredOutput)).{.return.\R |
a1280 | 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a 24 | eact\Promise\resolve(null);.}..$ |
a12a0 | 70 72 6f 63 65 73 73 45 72 72 6f 72 20 3d 20 27 46 61 69 6c 65 64 20 74 6f 20 65 78 65 63 75 74 | processError.=.'Failed.to.execut |
a12c0 | 65 20 27 20 2e 20 24 63 6f 6d 6d 61 6e 64 20 2e 20 22 5c 6e 5c 6e 22 20 2e 20 24 74 68 69 73 2d | e.'...$command..."\n\n"...$this- |
a12e0 | 3e 70 72 6f 63 65 73 73 2d 3e 67 65 74 45 72 72 6f 72 4f 75 74 70 75 74 28 29 3b 0a 7d 0a 0a 69 | >process->getErrorOutput();.}..i |
a1300 | 66 20 28 21 63 6c 61 73 73 5f 65 78 69 73 74 73 28 27 52 61 72 41 72 63 68 69 76 65 27 29 29 20 | f.(!class_exists('RarArchive')). |
a1320 | 7b 0a 0a 24 69 6e 69 4d 65 73 73 61 67 65 20 3d 20 49 6e 69 48 65 6c 70 65 72 3a 3a 67 65 74 4d | {..$iniMessage.=.IniHelper::getM |
a1340 | 65 73 73 61 67 65 28 29 3b 0a 0a 24 65 72 72 6f 72 20 3d 20 22 43 6f 75 6c 64 20 6e 6f 74 20 64 | essage();..$error.=."Could.not.d |
a1360 | 65 63 6f 6d 70 72 65 73 73 20 74 68 65 20 61 72 63 68 69 76 65 2c 20 65 6e 61 62 6c 65 20 74 68 | ecompress.the.archive,.enable.th |
a1380 | 65 20 50 48 50 20 72 61 72 20 65 78 74 65 6e 73 69 6f 6e 20 6f 72 20 69 6e 73 74 61 6c 6c 20 75 | e.PHP.rar.extension.or.install.u |
a13a0 | 6e 72 61 72 2e 5c 6e 22 0a 2e 20 24 69 6e 69 4d 65 73 73 61 67 65 20 2e 20 22 5c 6e 22 20 2e 20 | nrar.\n"...$iniMessage..."\n"... |
a13c0 | 24 70 72 6f 63 65 73 73 45 72 72 6f 72 3b 0a 0a 69 66 20 28 21 50 6c 61 74 66 6f 72 6d 3a 3a 69 | $processError;..if.(!Platform::i |
a13e0 | 73 57 69 6e 64 6f 77 73 28 29 29 20 7b 0a 24 65 72 72 6f 72 20 3d 20 22 43 6f 75 6c 64 20 6e 6f | sWindows()).{.$error.=."Could.no |
a1400 | 74 20 64 65 63 6f 6d 70 72 65 73 73 20 74 68 65 20 61 72 63 68 69 76 65 2c 20 65 6e 61 62 6c 65 | t.decompress.the.archive,.enable |
a1420 | 20 74 68 65 20 50 48 50 20 72 61 72 20 65 78 74 65 6e 73 69 6f 6e 2e 5c 6e 22 20 2e 20 24 69 6e | .the.PHP.rar.extension.\n"...$in |
a1440 | 69 4d 65 73 73 61 67 65 3b 0a 7d 0a 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 | iMessage;.}..throw.new.\RuntimeE |
a1460 | 78 63 65 70 74 69 6f 6e 28 24 65 72 72 6f 72 29 3b 0a 7d 0a 0a 24 72 61 72 41 72 63 68 69 76 65 | xception($error);.}..$rarArchive |
a1480 | 20 3d 20 52 61 72 41 72 63 68 69 76 65 3a 3a 6f 70 65 6e 28 24 66 69 6c 65 29 3b 0a 0a 69 66 20 | .=.RarArchive::open($file);..if. |
a14a0 | 28 66 61 6c 73 65 20 3d 3d 3d 20 24 72 61 72 41 72 63 68 69 76 65 29 20 7b 0a 74 68 72 6f 77 20 | (false.===.$rarArchive).{.throw. |
a14c0 | 6e 65 77 20 5c 55 6e 65 78 70 65 63 74 65 64 56 61 6c 75 65 45 78 63 65 70 74 69 6f 6e 28 27 43 | new.\UnexpectedValueException('C |
a14e0 | 6f 75 6c 64 20 6e 6f 74 20 6f 70 65 6e 20 52 41 52 20 61 72 63 68 69 76 65 3a 20 27 20 2e 20 24 | ould.not.open.RAR.archive:.'...$ |
a1500 | 66 69 6c 65 29 3b 0a 7d 0a 0a 24 65 6e 74 72 69 65 73 20 3d 20 24 72 61 72 41 72 63 68 69 76 65 | file);.}..$entries.=.$rarArchive |
a1520 | 2d 3e 67 65 74 45 6e 74 72 69 65 73 28 29 3b 0a 0a 69 66 20 28 66 61 6c 73 65 20 3d 3d 3d 20 24 | ->getEntries();..if.(false.===.$ |
a1540 | 65 6e 74 72 69 65 73 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 | entries).{.throw.new.\RuntimeExc |
a1560 | 65 70 74 69 6f 6e 28 27 43 6f 75 6c 64 20 6e 6f 74 20 72 65 74 72 69 65 76 65 20 52 41 52 20 61 | eption('Could.not.retrieve.RAR.a |
a1580 | 72 63 68 69 76 65 20 65 6e 74 72 69 65 73 27 29 3b 0a 7d 0a 0a 66 6f 72 65 61 63 68 20 28 24 65 | rchive.entries');.}..foreach.($e |
a15a0 | 6e 74 72 69 65 73 20 61 73 20 24 65 6e 74 72 79 29 20 7b 0a 69 66 20 28 66 61 6c 73 65 20 3d 3d | ntries.as.$entry).{.if.(false.== |
a15c0 | 3d 20 24 65 6e 74 72 79 2d 3e 65 78 74 72 61 63 74 28 24 70 61 74 68 29 29 20 7b 0a 74 68 72 6f | =.$entry->extract($path)).{.thro |
a15e0 | 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 43 6f 75 6c 64 20 6e | w.new.\RuntimeException('Could.n |
a1600 | 6f 74 20 65 78 74 72 61 63 74 20 65 6e 74 72 79 27 29 3b 0a 7d 0a 7d 0a 0a 24 72 61 72 41 72 63 | ot.extract.entry');.}.}..$rarArc |
a1620 | 68 69 76 65 2d 3e 63 6c 6f 73 65 28 29 3b 0a 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 | hive->close();..return.\React\Pr |
a1640 | 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 | omise\resolve(null);.}.}.<?php.d |
a1660 | 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a | eclare(strict_types=1);......... |
a1680 | 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 44 6f 77 6e 6c 6f 61 64 65 72 | ...namespace.Composer\Downloader |
a16a0 | 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 50 61 63 6b 61 67 65 49 | ;..use.Composer\Package\PackageI |
a16c0 | 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 63 72 65 5c 50 72 65 67 | nterface;.use.Composer\Pcre\Preg |
a16e0 | 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 53 76 6e 20 61 73 20 53 76 6e 55 74 | ;.use.Composer\Util\Svn.as.SvnUt |
a1700 | 69 6c 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 56 63 73 52 | il;.use.Composer\Repository\VcsR |
a1720 | 65 70 6f 73 69 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 72 6f | epository;.use.Composer\Util\Pro |
a1740 | 63 65 73 73 45 78 65 63 75 74 6f 72 3b 0a 75 73 65 20 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c | cessExecutor;.use.React\Promise\ |
a1760 | 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 3b 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 53 76 6e | PromiseInterface;......class.Svn |
a1780 | 44 6f 77 6e 6c 6f 61 64 65 72 20 65 78 74 65 6e 64 73 20 56 63 73 44 6f 77 6e 6c 6f 61 64 65 72 | Downloader.extends.VcsDownloader |
a17a0 | 0a 7b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 63 61 63 68 65 43 72 65 64 65 6e 74 69 61 6c 73 20 | .{..protected.$cacheCredentials. |
a17c0 | 3d 20 74 72 75 65 3b 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 64 | =.true;.....protected.function.d |
a17e0 | 6f 44 6f 77 6e 6c 6f 61 64 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b | oDownload(PackageInterface.$pack |
a1800 | 61 67 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 2c 20 73 74 72 69 6e 67 20 24 75 72 6c 2c 20 | age,.string.$path,.string.$url,. |
a1820 | 3f 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 72 65 76 50 61 63 6b 61 67 65 20 3d | ?PackageInterface.$prevPackage.= |
a1840 | 20 6e 75 6c 6c 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 53 76 6e 55 74 | .null):.PromiseInterface.{.SvnUt |
a1860 | 69 6c 3a 3a 63 6c 65 61 6e 45 6e 76 28 29 3b 0a 24 75 74 69 6c 20 3d 20 6e 65 77 20 53 76 6e 55 | il::cleanEnv();.$util.=.new.SvnU |
a1880 | 74 69 6c 28 24 75 72 6c 2c 20 24 74 68 69 73 2d 3e 69 6f 2c 20 24 74 68 69 73 2d 3e 63 6f 6e 66 | til($url,.$this->io,.$this->conf |
a18a0 | 69 67 2c 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 29 3b 0a 69 66 20 28 6e 75 6c 6c 20 3d 3d | ig,.$this->process);.if.(null.== |
a18c0 | 3d 20 24 75 74 69 6c 2d 3e 62 69 6e 61 72 79 56 65 72 73 69 6f 6e 28 29 29 20 7b 0a 74 68 72 6f | =.$util->binaryVersion()).{.thro |
a18e0 | 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 73 76 6e 20 77 61 73 | w.new.\RuntimeException('svn.was |
a1900 | 20 6e 6f 74 20 66 6f 75 6e 64 20 69 6e 20 79 6f 75 72 20 50 41 54 48 2c 20 73 6b 69 70 70 69 6e | .not.found.in.your.PATH,.skippin |
a1920 | 67 20 73 6f 75 72 63 65 20 64 6f 77 6e 6c 6f 61 64 27 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 5c | g.source.download');.}..return.\ |
a1940 | 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a | React\Promise\resolve(null);.}.. |
a1960 | 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 64 6f 49 6e 73 74 61 6c 6c 28 | ...protected.function.doInstall( |
a1980 | 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e | PackageInterface.$package,.strin |
a19a0 | 67 20 24 70 61 74 68 2c 20 73 74 72 69 6e 67 20 24 75 72 6c 29 3a 20 50 72 6f 6d 69 73 65 49 6e | g.$path,.string.$url):.PromiseIn |
a19c0 | 74 65 72 66 61 63 65 0a 7b 0a 53 76 6e 55 74 69 6c 3a 3a 63 6c 65 61 6e 45 6e 76 28 29 3b 0a 24 | terface.{.SvnUtil::cleanEnv();.$ |
a19e0 | 72 65 66 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 53 6f 75 72 63 65 52 65 66 65 72 65 6e | ref.=.$package->getSourceReferen |
a1a00 | 63 65 28 29 3b 0a 0a 24 72 65 70 6f 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 52 65 70 6f | ce();..$repo.=.$package->getRepo |
a1a20 | 73 69 74 6f 72 79 28 29 3b 0a 69 66 20 28 24 72 65 70 6f 20 69 6e 73 74 61 6e 63 65 6f 66 20 56 | sitory();.if.($repo.instanceof.V |
a1a40 | 63 73 52 65 70 6f 73 69 74 6f 72 79 29 20 7b 0a 24 72 65 70 6f 43 6f 6e 66 69 67 20 3d 20 24 72 | csRepository).{.$repoConfig.=.$r |
a1a60 | 65 70 6f 2d 3e 67 65 74 52 65 70 6f 43 6f 6e 66 69 67 28 29 3b 0a 69 66 20 28 61 72 72 61 79 5f | epo->getRepoConfig();.if.(array_ |
a1a80 | 6b 65 79 5f 65 78 69 73 74 73 28 27 73 76 6e 2d 63 61 63 68 65 2d 63 72 65 64 65 6e 74 69 61 6c | key_exists('svn-cache-credential |
a1aa0 | 73 27 2c 20 24 72 65 70 6f 43 6f 6e 66 69 67 29 29 20 7b 0a 24 74 68 69 73 2d 3e 63 61 63 68 65 | s',.$repoConfig)).{.$this->cache |
a1ac0 | 43 72 65 64 65 6e 74 69 61 6c 73 20 3d 20 28 62 6f 6f 6c 29 20 24 72 65 70 6f 43 6f 6e 66 69 67 | Credentials.=.(bool).$repoConfig |
a1ae0 | 5b 27 73 76 6e 2d 63 61 63 68 65 2d 63 72 65 64 65 6e 74 69 61 6c 73 27 5d 3b 0a 7d 0a 7d 0a 0a | ['svn-cache-credentials'];.}.}.. |
a1b00 | 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 22 20 43 68 65 63 6b 69 6e 67 | $this->io->writeError(".Checking |
a1b20 | 20 6f 75 74 20 22 2e 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 53 6f 75 72 63 65 52 65 66 65 72 65 | .out.".$package->getSourceRefere |
a1b40 | 6e 63 65 28 29 29 3b 0a 24 74 68 69 73 2d 3e 65 78 65 63 75 74 65 28 24 70 61 63 6b 61 67 65 2c | nce());.$this->execute($package, |
a1b60 | 20 24 75 72 6c 2c 20 22 73 76 6e 20 63 6f 22 2c 20 73 70 72 69 6e 74 66 28 22 25 73 2f 25 73 22 | .$url,."svn.co",.sprintf("%s/%s" |
a1b80 | 2c 20 24 75 72 6c 2c 20 24 72 65 66 29 2c 20 6e 75 6c 6c 2c 20 24 70 61 74 68 29 3b 0a 0a 72 65 | ,.$url,.$ref),.null,.$path);..re |
a1ba0 | 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c | turn.\React\Promise\resolve(null |
a1bc0 | 29 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 64 6f 55 70 | );.}.....protected.function.doUp |
a1be0 | 64 61 74 65 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 69 6e 69 74 69 61 6c 2c 20 | date(PackageInterface.$initial,. |
a1c00 | 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 74 61 72 67 65 74 2c 20 73 74 72 69 6e 67 | PackageInterface.$target,.string |
a1c20 | 20 24 70 61 74 68 2c 20 73 74 72 69 6e 67 20 24 75 72 6c 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 | .$path,.string.$url):.PromiseInt |
a1c40 | 65 72 66 61 63 65 0a 7b 0a 53 76 6e 55 74 69 6c 3a 3a 63 6c 65 61 6e 45 6e 76 28 29 3b 0a 24 72 | erface.{.SvnUtil::cleanEnv();.$r |
a1c60 | 65 66 20 3d 20 24 74 61 72 67 65 74 2d 3e 67 65 74 53 6f 75 72 63 65 52 65 66 65 72 65 6e 63 65 | ef.=.$target->getSourceReference |
a1c80 | 28 29 3b 0a 0a 69 66 20 28 21 24 74 68 69 73 2d 3e 68 61 73 4d 65 74 61 64 61 74 61 52 65 70 6f | ();..if.(!$this->hasMetadataRepo |
a1ca0 | 73 69 74 6f 72 79 28 24 70 61 74 68 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 | sitory($path)).{.throw.new.\Runt |
a1cc0 | 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 54 68 65 20 2e 73 76 6e 20 64 69 72 65 63 74 6f 72 79 | imeException('The..svn.directory |
a1ce0 | 20 69 73 20 6d 69 73 73 69 6e 67 20 66 72 6f 6d 20 27 2e 24 70 61 74 68 2e 27 2c 20 73 65 65 20 | .is.missing.from.'.$path.',.see. |
a1d00 | 68 74 74 70 73 3a 2f 2f 67 65 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 67 2f 63 6f 6d 6d 69 74 2d 64 | https://getcomposer.org/commit-d |
a1d20 | 65 70 73 20 66 6f 72 20 6d 6f 72 65 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 27 29 3b 0a 7d 0a 0a 24 | eps.for.more.information');.}..$ |
a1d40 | 75 74 69 6c 20 3d 20 6e 65 77 20 53 76 6e 55 74 69 6c 28 24 75 72 6c 2c 20 24 74 68 69 73 2d 3e | util.=.new.SvnUtil($url,.$this-> |
a1d60 | 69 6f 2c 20 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 2c 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 | io,.$this->config,.$this->proces |
a1d80 | 73 29 3b 0a 24 66 6c 61 67 73 20 3d 20 22 22 3b 0a 69 66 20 28 76 65 72 73 69 6f 6e 5f 63 6f 6d | s);.$flags.=."";.if.(version_com |
a1da0 | 70 61 72 65 28 24 75 74 69 6c 2d 3e 62 69 6e 61 72 79 56 65 72 73 69 6f 6e 28 29 2c 20 27 31 2e | pare($util->binaryVersion(),.'1. |
a1dc0 | 37 2e 30 27 2c 20 27 3e 3d 27 29 29 20 7b 0a 24 66 6c 61 67 73 20 2e 3d 20 27 20 2d 2d 69 67 6e | 7.0',.'>=')).{.$flags..=.'.--ign |
a1de0 | 6f 72 65 2d 61 6e 63 65 73 74 72 79 27 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 | ore-ancestry';.}..$this->io->wri |
a1e00 | 74 65 45 72 72 6f 72 28 22 20 43 68 65 63 6b 69 6e 67 20 6f 75 74 20 22 20 2e 20 24 72 65 66 29 | teError(".Checking.out."...$ref) |
a1e20 | 3b 0a 24 74 68 69 73 2d 3e 65 78 65 63 75 74 65 28 24 74 61 72 67 65 74 2c 20 24 75 72 6c 2c 20 | ;.$this->execute($target,.$url,. |
a1e40 | 22 73 76 6e 20 73 77 69 74 63 68 22 20 2e 20 24 66 6c 61 67 73 2c 20 73 70 72 69 6e 74 66 28 22 | "svn.switch"...$flags,.sprintf(" |
a1e60 | 25 73 2f 25 73 22 2c 20 24 75 72 6c 2c 20 24 72 65 66 29 2c 20 24 70 61 74 68 29 3b 0a 0a 72 65 | %s/%s",.$url,.$ref),.$path);..re |
a1e80 | 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c | turn.\React\Promise\resolve(null |
a1ea0 | 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 4c 6f 63 61 | );.}.....public.function.getLoca |
a1ec0 | 6c 43 68 61 6e 67 65 73 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 | lChanges(PackageInterface.$packa |
a1ee0 | 67 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 29 3a 20 3f 73 74 72 69 6e 67 0a 7b 0a 69 66 20 | ge,.string.$path):.?string.{.if. |
a1f00 | 28 21 24 74 68 69 73 2d 3e 68 61 73 4d 65 74 61 64 61 74 61 52 65 70 6f 73 69 74 6f 72 79 28 24 | (!$this->hasMetadataRepository($ |
a1f20 | 70 61 74 68 29 29 20 7b 0a 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e | path)).{.return.null;.}..$this-> |
a1f40 | 70 72 6f 63 65 73 73 2d 3e 65 78 65 63 75 74 65 28 27 73 76 6e 20 73 74 61 74 75 73 20 2d 2d 69 | process->execute('svn.status.--i |
a1f60 | 67 6e 6f 72 65 2d 65 78 74 65 72 6e 61 6c 73 27 2c 20 24 6f 75 74 70 75 74 2c 20 24 70 61 74 68 | gnore-externals',.$output,.$path |
a1f80 | 29 3b 0a 0a 72 65 74 75 72 6e 20 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b 5e 20 2a 5b 5e | );..return.Preg::isMatch('{^.*[^ |
a1fa0 | 58 20 5d 20 2b 7d 6d 27 2c 20 24 6f 75 74 70 75 74 29 20 3f 20 24 6f 75 74 70 75 74 20 3a 20 6e | X.].+}m',.$output).?.$output.:.n |
a1fc0 | 75 6c 6c 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e | ull;.}.............protected.fun |
a1fe0 | 63 74 69 6f 6e 20 65 78 65 63 75 74 65 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 | ction.execute(PackageInterface.$ |
a2000 | 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 62 61 73 65 55 72 6c 2c 20 73 74 72 69 6e 67 | package,.string.$baseUrl,.string |
a2020 | 20 24 63 6f 6d 6d 61 6e 64 2c 20 73 74 72 69 6e 67 20 24 75 72 6c 2c 20 3f 73 74 72 69 6e 67 20 | .$command,.string.$url,.?string. |
a2040 | 24 63 77 64 20 3d 20 6e 75 6c 6c 2c 20 3f 73 74 72 69 6e 67 20 24 70 61 74 68 20 3d 20 6e 75 6c | $cwd.=.null,.?string.$path.=.nul |
a2060 | 6c 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 24 75 74 69 6c 20 3d 20 6e 65 77 20 53 76 6e 55 74 69 6c | l):.string.{.$util.=.new.SvnUtil |
a2080 | 28 24 62 61 73 65 55 72 6c 2c 20 24 74 68 69 73 2d 3e 69 6f 2c 20 24 74 68 69 73 2d 3e 63 6f 6e | ($baseUrl,.$this->io,.$this->con |
a20a0 | 66 69 67 2c 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 29 3b 0a 24 75 74 69 6c 2d 3e 73 65 74 | fig,.$this->process);.$util->set |
a20c0 | 43 61 63 68 65 43 72 65 64 65 6e 74 69 61 6c 73 28 24 74 68 69 73 2d 3e 63 61 63 68 65 43 72 65 | CacheCredentials($this->cacheCre |
a20e0 | 64 65 6e 74 69 61 6c 73 29 3b 0a 74 72 79 20 7b 0a 72 65 74 75 72 6e 20 24 75 74 69 6c 2d 3e 65 | dentials);.try.{.return.$util->e |
a2100 | 78 65 63 75 74 65 28 24 63 6f 6d 6d 61 6e 64 2c 20 24 75 72 6c 2c 20 24 63 77 64 2c 20 24 70 61 | xecute($command,.$url,.$cwd,.$pa |
a2120 | 74 68 2c 20 24 74 68 69 73 2d 3e 69 6f 2d 3e 69 73 56 65 72 62 6f 73 65 28 29 29 3b 0a 7d 20 63 | th,.$this->io->isVerbose());.}.c |
a2140 | 61 74 63 68 20 28 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 74 68 | atch.(\RuntimeException.$e).{.th |
a2160 | 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 0a 24 70 61 63 6b | row.new.\RuntimeException(.$pack |
a2180 | 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 4e 61 6d 65 28 29 2e 27 20 63 6f 75 6c 64 20 6e 6f 74 | age->getPrettyName().'.could.not |
a21a0 | 20 62 65 20 64 6f 77 6e 6c 6f 61 64 65 64 2c 20 27 2e 24 65 2d 3e 67 65 74 4d 65 73 73 61 67 65 | .be.downloaded,.'.$e->getMessage |
a21c0 | 28 29 0a 29 3b 0a 7d 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e | ().);.}.}.....protected.function |
a21e0 | 20 63 6c 65 61 6e 43 68 61 6e 67 65 73 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 | .cleanChanges(PackageInterface.$ |
a2200 | 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 2c 20 62 6f 6f 6c 20 24 75 70 64 | package,.string.$path,.bool.$upd |
a2220 | 61 74 65 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 69 66 20 28 6e 75 6c | ate):.PromiseInterface.{.if.(nul |
a2240 | 6c 20 3d 3d 3d 20 28 24 63 68 61 6e 67 65 73 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 4c 6f 63 61 | l.===.($changes.=.$this->getLoca |
a2260 | 6c 43 68 61 6e 67 65 73 28 24 70 61 63 6b 61 67 65 2c 20 24 70 61 74 68 29 29 29 20 7b 0a 72 65 | lChanges($package,.$path))).{.re |
a2280 | 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c | turn.\React\Promise\resolve(null |
a22a0 | 29 3b 0a 7d 0a 0a 69 66 20 28 21 24 74 68 69 73 2d 3e 69 6f 2d 3e 69 73 49 6e 74 65 72 61 63 74 | );.}..if.(!$this->io->isInteract |
a22c0 | 69 76 65 28 29 29 20 7b 0a 69 66 20 28 74 72 75 65 20 3d 3d 3d 20 24 74 68 69 73 2d 3e 63 6f 6e | ive()).{.if.(true.===.$this->con |
a22e0 | 66 69 67 2d 3e 67 65 74 28 27 64 69 73 63 61 72 64 2d 63 68 61 6e 67 65 73 27 29 29 20 7b 0a 72 | fig->get('discard-changes')).{.r |
a2300 | 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 64 69 73 63 61 72 64 43 68 61 6e 67 65 73 28 24 70 61 74 | eturn.$this->discardChanges($pat |
a2320 | 68 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 70 61 72 65 6e 74 3a 3a 63 6c 65 61 6e 43 68 61 6e 67 | h);.}..return.parent::cleanChang |
a2340 | 65 73 28 24 70 61 63 6b 61 67 65 2c 20 24 70 61 74 68 2c 20 24 75 70 64 61 74 65 29 3b 0a 7d 0a | es($package,.$path,.$update);.}. |
a2360 | 0a 24 63 68 61 6e 67 65 73 20 3d 20 61 72 72 61 79 5f 6d 61 70 28 73 74 61 74 69 63 20 66 75 6e | .$changes.=.array_map(static.fun |
a2380 | 63 74 69 6f 6e 20 28 24 65 6c 65 6d 29 3a 20 73 74 72 69 6e 67 20 7b 0a 72 65 74 75 72 6e 20 27 | ction.($elem):.string.{.return.' |
a23a0 | 20 20 20 20 27 2e 24 65 6c 65 6d 3b 0a 7d 2c 20 50 72 65 67 3a 3a 73 70 6c 69 74 28 27 7b 5c 73 | ....'.$elem;.},.Preg::split('{\s |
a23c0 | 2a 5c 72 3f 5c 6e 5c 73 2a 7d 27 2c 20 24 63 68 61 6e 67 65 73 29 29 3b 0a 24 63 6f 75 6e 74 43 | *\r?\n\s*}',.$changes));.$countC |
a23e0 | 68 61 6e 67 65 73 20 3d 20 63 6f 75 6e 74 28 24 63 68 61 6e 67 65 73 29 3b 0a 24 74 68 69 73 2d | hanges.=.count($changes);.$this- |
a2400 | 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 73 70 72 69 6e 74 66 28 27 20 20 20 20 3c 65 72 | >io->writeError(sprintf('....<er |
a2420 | 72 6f 72 3e 27 2e 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 4e 61 6d 65 28 29 2e | ror>'.$package->getPrettyName(). |
a2440 | 27 20 68 61 73 20 6d 6f 64 69 66 69 65 64 20 66 69 6c 65 25 73 3a 3c 2f 65 72 72 6f 72 3e 27 2c | '.has.modified.file%s:</error>', |
a2460 | 20 24 63 6f 75 6e 74 43 68 61 6e 67 65 73 20 3d 3d 3d 20 31 20 3f 20 27 27 20 3a 20 27 73 27 29 | .$countChanges.===.1.?.''.:.'s') |
a2480 | 29 3b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 61 72 72 61 79 5f 73 | );.$this->io->writeError(array_s |
a24a0 | 6c 69 63 65 28 24 63 68 61 6e 67 65 73 2c 20 30 2c 20 31 30 29 29 3b 0a 69 66 20 28 24 63 6f 75 | lice($changes,.0,.10));.if.($cou |
a24c0 | 6e 74 43 68 61 6e 67 65 73 20 3e 20 31 30 29 20 7b 0a 24 72 65 6d 61 69 6e 69 6e 67 43 68 61 6e | ntChanges.>.10).{.$remainingChan |
a24e0 | 67 65 73 20 3d 20 24 63 6f 75 6e 74 43 68 61 6e 67 65 73 20 2d 20 31 30 3b 0a 24 74 68 69 73 2d | ges.=.$countChanges.-.10;.$this- |
a2500 | 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 0a 73 70 72 69 6e 74 66 28 0a 27 20 20 20 20 3c | >io->writeError(.sprintf(.'....< |
a2520 | 69 6e 66 6f 3e 27 2e 24 72 65 6d 61 69 6e 69 6e 67 43 68 61 6e 67 65 73 2e 27 20 6d 6f 72 65 20 | info>'.$remainingChanges.'.more. |
a2540 | 66 69 6c 65 25 73 20 6d 6f 64 69 66 69 65 64 2c 20 63 68 6f 6f 73 65 20 22 76 22 20 74 6f 20 76 | file%s.modified,.choose."v".to.v |
a2560 | 69 65 77 20 74 68 65 20 66 75 6c 6c 20 6c 69 73 74 3c 2f 69 6e 66 6f 3e 27 2c 0a 24 72 65 6d 61 | iew.the.full.list</info>',.$rema |
a2580 | 69 6e 69 6e 67 43 68 61 6e 67 65 73 20 3d 3d 3d 20 31 20 3f 20 27 27 20 3a 20 27 73 27 0a 29 0a | iningChanges.===.1.?.''.:.'s'.). |
a25a0 | 29 3b 0a 7d 0a 0a 77 68 69 6c 65 20 28 74 72 75 65 29 20 7b 0a 73 77 69 74 63 68 20 28 24 74 68 | );.}..while.(true).{.switch.($th |
a25c0 | 69 73 2d 3e 69 6f 2d 3e 61 73 6b 28 27 20 20 20 20 3c 69 6e 66 6f 3e 44 69 73 63 61 72 64 20 63 | is->io->ask('....<info>Discard.c |
a25e0 | 68 61 6e 67 65 73 20 5b 79 2c 6e 2c 76 2c 3f 5d 3f 3c 2f 69 6e 66 6f 3e 20 27 2c 20 27 3f 27 29 | hanges.[y,n,v,?]?</info>.',.'?') |
a2600 | 29 20 7b 0a 63 61 73 65 20 27 79 27 3a 0a 24 74 68 69 73 2d 3e 64 69 73 63 61 72 64 43 68 61 6e | ).{.case.'y':.$this->discardChan |
a2620 | 67 65 73 28 24 70 61 74 68 29 3b 0a 62 72 65 61 6b 20 32 3b 0a 0a 63 61 73 65 20 27 6e 27 3a 0a | ges($path);.break.2;..case.'n':. |
a2640 | 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 55 70 64 | throw.new.\RuntimeException('Upd |
a2660 | 61 74 65 20 61 62 6f 72 74 65 64 27 29 3b 0a 0a 63 61 73 65 20 27 76 27 3a 0a 24 74 68 69 73 2d | ate.aborted');..case.'v':.$this- |
a2680 | 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 24 63 68 61 6e 67 65 73 29 3b 0a 62 72 65 61 6b | >io->writeError($changes);.break |
a26a0 | 3b 0a 0a 63 61 73 65 20 27 3f 27 3a 0a 64 65 66 61 75 6c 74 3a 0a 24 74 68 69 73 2d 3e 69 6f 2d | ;..case.'?':.default:.$this->io- |
a26c0 | 3e 77 72 69 74 65 45 72 72 6f 72 28 5b 0a 27 20 20 20 20 79 20 2d 20 64 69 73 63 61 72 64 20 63 | >writeError([.'....y.-.discard.c |
a26e0 | 68 61 6e 67 65 73 20 61 6e 64 20 61 70 70 6c 79 20 74 68 65 20 27 2e 28 24 75 70 64 61 74 65 20 | hanges.and.apply.the.'.($update. |
a2700 | 3f 20 27 75 70 64 61 74 65 27 20 3a 20 27 75 6e 69 6e 73 74 61 6c 6c 27 29 2c 0a 27 20 20 20 20 | ?.'update'.:.'uninstall'),.'.... |
a2720 | 6e 20 2d 20 61 62 6f 72 74 20 74 68 65 20 27 2e 28 24 75 70 64 61 74 65 20 3f 20 27 75 70 64 61 | n.-.abort.the.'.($update.?.'upda |
a2740 | 74 65 27 20 3a 20 27 75 6e 69 6e 73 74 61 6c 6c 27 29 2e 27 20 61 6e 64 20 6c 65 74 20 79 6f 75 | te'.:.'uninstall').'.and.let.you |
a2760 | 20 6d 61 6e 75 61 6c 6c 79 20 63 6c 65 61 6e 20 74 68 69 6e 67 73 20 75 70 27 2c 0a 27 20 20 20 | .manually.clean.things.up',.'... |
a2780 | 20 76 20 2d 20 76 69 65 77 20 6d 6f 64 69 66 69 65 64 20 66 69 6c 65 73 27 2c 0a 27 20 20 20 20 | .v.-.view.modified.files',.'.... |
a27a0 | 3f 20 2d 20 70 72 69 6e 74 20 68 65 6c 70 27 2c 0a 5d 29 3b 0a 62 72 65 61 6b 3b 0a 7d 0a 7d 0a | ?.-.print.help',.]);.break;.}.}. |
a27c0 | 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e | .return.\React\Promise\resolve(n |
a27e0 | 75 6c 6c 29 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 67 | ull);.}.....protected.function.g |
a2800 | 65 74 43 6f 6d 6d 69 74 4c 6f 67 73 28 73 74 72 69 6e 67 20 24 66 72 6f 6d 52 65 66 65 72 65 6e | etCommitLogs(string.$fromReferen |
a2820 | 63 65 2c 20 73 74 72 69 6e 67 20 24 74 6f 52 65 66 65 72 65 6e 63 65 2c 20 73 74 72 69 6e 67 20 | ce,.string.$toReference,.string. |
a2840 | 24 70 61 74 68 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 69 66 20 28 50 72 65 67 3a 3a 69 73 4d 61 74 | $path):.string.{.if.(Preg::isMat |
a2860 | 63 68 28 27 7b 40 28 5c 64 2b 29 24 7d 27 2c 20 24 66 72 6f 6d 52 65 66 65 72 65 6e 63 65 29 20 | ch('{@(\d+)$}',.$fromReference). |
a2880 | 26 26 20 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b 40 28 5c 64 2b 29 24 7d 27 2c 20 24 74 | &&.Preg::isMatch('{@(\d+)$}',.$t |
a28a0 | 6f 52 65 66 65 72 65 6e 63 65 29 29 20 7b 0a 0a 24 63 6f 6d 6d 61 6e 64 20 3d 20 73 70 72 69 6e | oReference)).{..$command.=.sprin |
a28c0 | 74 66 28 27 73 76 6e 20 69 6e 66 6f 20 2d 2d 6e 6f 6e 2d 69 6e 74 65 72 61 63 74 69 76 65 20 2d | tf('svn.info.--non-interactive.- |
a28e0 | 2d 78 6d 6c 20 2d 2d 20 25 73 27 2c 20 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3a 3a 65 73 | -xml.--.%s',.ProcessExecutor::es |
a2900 | 63 61 70 65 28 24 70 61 74 68 29 29 3b 0a 69 66 20 28 30 20 21 3d 3d 20 24 74 68 69 73 2d 3e 70 | cape($path));.if.(0.!==.$this->p |
a2920 | 72 6f 63 65 73 73 2d 3e 65 78 65 63 75 74 65 28 24 63 6f 6d 6d 61 6e 64 2c 20 24 6f 75 74 70 75 | rocess->execute($command,.$outpu |
a2940 | 74 2c 20 24 70 61 74 68 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 | t,.$path)).{.throw.new.\RuntimeE |
a2960 | 78 63 65 70 74 69 6f 6e 28 0a 27 46 61 69 6c 65 64 20 74 6f 20 65 78 65 63 75 74 65 20 27 20 2e | xception(.'Failed.to.execute.'.. |
a2980 | 20 24 63 6f 6d 6d 61 6e 64 20 2e 20 22 5c 6e 5c 6e 22 20 2e 20 24 74 68 69 73 2d 3e 70 72 6f 63 | .$command..."\n\n"...$this->proc |
a29a0 | 65 73 73 2d 3e 67 65 74 45 72 72 6f 72 4f 75 74 70 75 74 28 29 0a 29 3b 0a 7d 0a 0a 24 75 72 6c | ess->getErrorOutput().);.}..$url |
a29c0 | 50 61 74 74 65 72 6e 20 3d 20 27 23 3c 75 72 6c 3e 28 2e 2a 29 3c 2f 75 72 6c 3e 23 27 3b 0a 69 | Pattern.=.'#<url>(.*)</url>#';.i |
a29e0 | 66 20 28 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 24 75 72 6c 50 61 74 74 65 72 6e 2c 20 24 6f | f.(Preg::isMatch($urlPattern,.$o |
a2a00 | 75 74 70 75 74 2c 20 24 6d 61 74 63 68 65 73 29 29 20 7b 0a 24 62 61 73 65 55 72 6c 20 3d 20 24 | utput,.$matches)).{.$baseUrl.=.$ |
a2a20 | 6d 61 74 63 68 65 73 5b 31 5d 3b 0a 7d 20 65 6c 73 65 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c | matches[1];.}.else.{.throw.new.\ |
a2a40 | 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 0a 27 55 6e 61 62 6c 65 20 74 6f 20 64 65 74 | RuntimeException(.'Unable.to.det |
a2a60 | 65 72 6d 69 6e 65 20 73 76 6e 20 75 72 6c 20 66 6f 72 20 70 61 74 68 20 27 2e 20 24 70 61 74 68 | ermine.svn.url.for.path.'..$path |
a2a80 | 0a 29 3b 0a 7d 0a 0a 0a 24 66 72 6f 6d 52 65 76 69 73 69 6f 6e 20 3d 20 50 72 65 67 3a 3a 72 65 | .);.}...$fromRevision.=.Preg::re |
a2aa0 | 70 6c 61 63 65 28 27 7b 2e 2a 40 28 5c 64 2b 29 24 7d 27 2c 20 27 24 31 27 2c 20 24 66 72 6f 6d | place('{.*@(\d+)$}',.'$1',.$from |
a2ac0 | 52 65 66 65 72 65 6e 63 65 29 3b 0a 24 74 6f 52 65 76 69 73 69 6f 6e 20 3d 20 50 72 65 67 3a 3a | Reference);.$toRevision.=.Preg:: |
a2ae0 | 72 65 70 6c 61 63 65 28 27 7b 2e 2a 40 28 5c 64 2b 29 24 7d 27 2c 20 27 24 31 27 2c 20 24 74 6f | replace('{.*@(\d+)$}',.'$1',.$to |
a2b00 | 52 65 66 65 72 65 6e 63 65 29 3b 0a 0a 24 63 6f 6d 6d 61 6e 64 20 3d 20 73 70 72 69 6e 74 66 28 | Reference);..$command.=.sprintf( |
a2b20 | 27 73 76 6e 20 6c 6f 67 20 2d 72 25 73 3a 25 73 20 2d 2d 69 6e 63 72 65 6d 65 6e 74 61 6c 27 2c | 'svn.log.-r%s:%s.--incremental', |
a2b40 | 20 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3a 3a 65 73 63 61 70 65 28 24 66 72 6f 6d 52 65 | .ProcessExecutor::escape($fromRe |
a2b60 | 76 69 73 69 6f 6e 29 2c 20 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3a 3a 65 73 63 61 70 65 | vision),.ProcessExecutor::escape |
a2b80 | 28 24 74 6f 52 65 76 69 73 69 6f 6e 29 29 3b 0a 0a 24 75 74 69 6c 20 3d 20 6e 65 77 20 53 76 6e | ($toRevision));..$util.=.new.Svn |
a2ba0 | 55 74 69 6c 28 24 62 61 73 65 55 72 6c 2c 20 24 74 68 69 73 2d 3e 69 6f 2c 20 24 74 68 69 73 2d | Util($baseUrl,.$this->io,.$this- |
a2bc0 | 3e 63 6f 6e 66 69 67 2c 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 29 3b 0a 24 75 74 69 6c 2d | >config,.$this->process);.$util- |
a2be0 | 3e 73 65 74 43 61 63 68 65 43 72 65 64 65 6e 74 69 61 6c 73 28 24 74 68 69 73 2d 3e 63 61 63 68 | >setCacheCredentials($this->cach |
a2c00 | 65 43 72 65 64 65 6e 74 69 61 6c 73 29 3b 0a 74 72 79 20 7b 0a 72 65 74 75 72 6e 20 24 75 74 69 | eCredentials);.try.{.return.$uti |
a2c20 | 6c 2d 3e 65 78 65 63 75 74 65 4c 6f 63 61 6c 28 24 63 6f 6d 6d 61 6e 64 2c 20 24 70 61 74 68 2c | l->executeLocal($command,.$path, |
a2c40 | 20 6e 75 6c 6c 2c 20 24 74 68 69 73 2d 3e 69 6f 2d 3e 69 73 56 65 72 62 6f 73 65 28 29 29 3b 0a | .null,.$this->io->isVerbose());. |
a2c60 | 7d 20 63 61 74 63 68 20 28 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b | }.catch.(\RuntimeException.$e).{ |
a2c80 | 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 0a 27 46 | .throw.new.\RuntimeException(.'F |
a2ca0 | 61 69 6c 65 64 20 74 6f 20 65 78 65 63 75 74 65 20 27 20 2e 20 24 63 6f 6d 6d 61 6e 64 20 2e 20 | ailed.to.execute.'...$command... |
a2cc0 | 22 5c 6e 5c 6e 22 2e 24 65 2d 3e 67 65 74 4d 65 73 73 61 67 65 28 29 0a 29 3b 0a 7d 0a 7d 0a 0a | "\n\n".$e->getMessage().);.}.}.. |
a2ce0 | 72 65 74 75 72 6e 20 22 43 6f 75 6c 64 20 6e 6f 74 20 72 65 74 72 69 65 76 65 20 63 68 61 6e 67 | return."Could.not.retrieve.chang |
a2d00 | 65 73 20 62 65 74 77 65 65 6e 20 24 66 72 6f 6d 52 65 66 65 72 65 6e 63 65 20 61 6e 64 20 24 74 | es.between.$fromReference.and.$t |
a2d20 | 6f 52 65 66 65 72 65 6e 63 65 20 64 75 65 20 74 6f 20 6d 69 73 73 69 6e 67 20 72 65 76 69 73 69 | oReference.due.to.missing.revisi |
a2d40 | 6f 6e 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 22 3b 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 | on.information";.}..protected.fu |
a2d60 | 6e 63 74 69 6f 6e 20 64 69 73 63 61 72 64 43 68 61 6e 67 65 73 28 73 74 72 69 6e 67 20 24 70 61 | nction.discardChanges(string.$pa |
a2d80 | 74 68 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 69 66 20 28 30 20 21 3d | th):.PromiseInterface.{.if.(0.!= |
a2da0 | 3d 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 65 78 65 63 75 74 65 28 27 73 76 6e 20 72 | =.$this->process->execute('svn.r |
a2dc0 | 65 76 65 72 74 20 2d 52 20 2e 27 2c 20 24 6f 75 74 70 75 74 2c 20 24 70 61 74 68 29 29 20 7b 0a | evert.-R..',.$output,.$path)).{. |
a2de0 | 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 22 43 6f 75 | throw.new.\RuntimeException("Cou |
a2e00 | 6c 64 20 6e 6f 74 20 72 65 73 65 74 20 63 68 61 6e 67 65 73 5c 6e 5c 6e 3a 22 2e 24 74 68 69 73 | ld.not.reset.changes\n\n:".$this |
a2e20 | 2d 3e 70 72 6f 63 65 73 73 2d 3e 67 65 74 45 72 72 6f 72 4f 75 74 70 75 74 28 29 29 3b 0a 7d 0a | ->process->getErrorOutput());.}. |
a2e40 | 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e | .return.\React\Promise\resolve(n |
a2e60 | 75 6c 6c 29 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 68 | ull);.}.....protected.function.h |
a2e80 | 61 73 4d 65 74 61 64 61 74 61 52 65 70 6f 73 69 74 6f 72 79 28 73 74 72 69 6e 67 20 24 70 61 74 | asMetadataRepository(string.$pat |
a2ea0 | 68 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 69 73 5f 64 69 72 28 24 70 61 74 68 2e 27 | h):.bool.{.return.is_dir($path.' |
a2ec0 | 2f 2e 73 76 6e 27 29 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 | /.svn');.}.}.<?php.declare(stric |
a2ee0 | 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 | t_types=1);............namespace |
a2f00 | 20 43 6f 6d 70 6f 73 65 72 5c 44 6f 77 6e 6c 6f 61 64 65 72 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f | .Composer\Downloader;..use.Compo |
a2f20 | 73 65 72 5c 50 61 63 6b 61 67 65 5c 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 | ser\Package\PackageInterface;.us |
a2f40 | 65 20 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 | e.React\Promise\PromiseInterface |
a2f60 | 3b 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 54 61 72 44 6f 77 6e 6c 6f 61 64 65 72 20 65 78 74 65 | ;.......class.TarDownloader.exte |
a2f80 | 6e 64 73 20 41 72 63 68 69 76 65 44 6f 77 6e 6c 6f 61 64 65 72 0a 7b 0a 0a 0a 0a 70 72 6f 74 65 | nds.ArchiveDownloader.{....prote |
a2fa0 | 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 65 78 74 72 61 63 74 28 50 61 63 6b 61 67 65 49 6e 74 | cted.function.extract(PackageInt |
a2fc0 | 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 66 69 6c 65 2c 20 73 | erface.$package,.string.$file,.s |
a2fe0 | 74 72 69 6e 67 20 24 70 61 74 68 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a 7b | tring.$path):.PromiseInterface.{ |
a3000 | 0a 0a 24 61 72 63 68 69 76 65 20 3d 20 6e 65 77 20 5c 50 68 61 72 44 61 74 61 28 24 66 69 6c 65 | ..$archive.=.new.\PharData($file |
a3020 | 29 3b 0a 24 61 72 63 68 69 76 65 2d 3e 65 78 74 72 61 63 74 54 6f 28 24 70 61 74 68 2c 20 6e 75 | );.$archive->extractTo($path,.nu |
a3040 | 6c 6c 2c 20 74 72 75 65 29 3b 0a 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 | ll,.true);..return.\React\Promis |
a3060 | 65 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 | e\resolve(null);.}.}.<?php.decla |
a3080 | 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e | re(strict_types=1);............n |
a30a0 | 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 44 6f 77 6e 6c 6f 61 64 65 72 3b 0a 0a 0a | amespace.Composer\Downloader;... |
a30c0 | 0a 0a 63 6c 61 73 73 20 54 72 61 6e 73 70 6f 72 74 45 78 63 65 70 74 69 6f 6e 20 65 78 74 65 6e | ..class.TransportException.exten |
a30e0 | 64 73 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 0a 7b 0a 0a 70 72 6f 74 65 63 74 65 | ds.\RuntimeException.{..protecte |
a3100 | 64 20 24 68 65 61 64 65 72 73 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 72 65 73 70 6f 6e 73 65 | d.$headers;..protected.$response |
a3120 | 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 73 74 61 74 75 73 43 6f 64 65 3b 0a 0a 70 72 6f 74 65 | ;..protected.$statusCode;..prote |
a3140 | 63 74 65 64 20 24 72 65 73 70 6f 6e 73 65 49 6e 66 6f 20 3d 20 5b 5d 3b 0a 0a 0a 0a 0a 70 75 62 | cted.$responseInfo.=.[];.....pub |
a3160 | 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 48 65 61 64 65 72 73 28 61 72 72 61 79 20 24 68 | lic.function.setHeaders(array.$h |
a3180 | 65 61 64 65 72 73 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 68 65 61 64 65 72 73 20 3d | eaders):.void.{.$this->headers.= |
a31a0 | 20 24 68 65 61 64 65 72 73 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e | .$headers;.}.....public.function |
a31c0 | 20 67 65 74 48 65 61 64 65 72 73 28 29 3a 20 3f 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 | .getHeaders():.?array.{.return.$ |
a31e0 | 74 68 69 73 2d 3e 68 65 61 64 65 72 73 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f | this->headers;.}..public.functio |
a3200 | 6e 20 73 65 74 52 65 73 70 6f 6e 73 65 28 3f 73 74 72 69 6e 67 20 24 72 65 73 70 6f 6e 73 65 29 | n.setResponse(?string.$response) |
a3220 | 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 72 65 73 70 6f 6e 73 65 20 3d 20 24 72 65 73 70 | :.void.{.$this->response.=.$resp |
a3240 | 6f 6e 73 65 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 52 | onse;.}.....public.function.getR |
a3260 | 65 73 70 6f 6e 73 65 28 29 3a 20 3f 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 | esponse():.?string.{.return.$thi |
a3280 | 73 2d 3e 72 65 73 70 6f 6e 73 65 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 | s->response;.}.....public.functi |
a32a0 | 6f 6e 20 73 65 74 53 74 61 74 75 73 43 6f 64 65 28 24 73 74 61 74 75 73 43 6f 64 65 29 3a 20 76 | on.setStatusCode($statusCode):.v |
a32c0 | 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 73 74 61 74 75 73 43 6f 64 65 20 3d 20 24 73 74 61 74 75 | oid.{.$this->statusCode.=.$statu |
a32e0 | 73 43 6f 64 65 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 | sCode;.}.....public.function.get |
a3300 | 53 74 61 74 75 73 43 6f 64 65 28 29 3a 20 3f 69 6e 74 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 | StatusCode():.?int.{.return.$thi |
a3320 | 73 2d 3e 73 74 61 74 75 73 43 6f 64 65 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 | s->statusCode;.}.....public.func |
a3340 | 74 69 6f 6e 20 67 65 74 52 65 73 70 6f 6e 73 65 49 6e 66 6f 28 29 3a 20 61 72 72 61 79 0a 7b 0a | tion.getResponseInfo():.array.{. |
a3360 | 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 72 65 73 70 6f 6e 73 65 49 6e 66 6f 3b 0a 7d 0a 0a 0a | return.$this->responseInfo;.}... |
a3380 | 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 52 65 73 70 6f 6e 73 65 49 6e 66 | ..public.function.setResponseInf |
a33a0 | 6f 28 61 72 72 61 79 20 24 72 65 73 70 6f 6e 73 65 49 6e 66 6f 29 3a 20 76 6f 69 64 0a 7b 0a 24 | o(array.$responseInfo):.void.{.$ |
a33c0 | 74 68 69 73 2d 3e 72 65 73 70 6f 6e 73 65 49 6e 66 6f 20 3d 20 24 72 65 73 70 6f 6e 73 65 49 6e | this->responseInfo.=.$responseIn |
a33e0 | 66 6f 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 | fo;.}.}.<?php.declare(strict_typ |
a3400 | 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 | es=1);............namespace.Comp |
a3420 | 6f 73 65 72 5c 44 6f 77 6e 6c 6f 61 64 65 72 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 | oser\Downloader;..use.Composer\P |
a3440 | 61 63 6b 61 67 65 5c 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 0a 0a 0a 0a 0a 0a 69 | ackage\PackageInterface;.......i |
a3460 | 6e 74 65 72 66 61 63 65 20 56 63 73 43 61 70 61 62 6c 65 44 6f 77 6e 6c 6f 61 64 65 72 49 6e 74 | nterface.VcsCapableDownloaderInt |
a3480 | 65 72 66 61 63 65 0a 7b 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 | erface.{........public.function. |
a34a0 | 67 65 74 56 63 73 52 65 66 65 72 65 6e 63 65 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 | getVcsReference(PackageInterface |
a34c0 | 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 29 3a 20 3f 73 74 72 69 6e | .$package,.string.$path):.?strin |
a34e0 | 67 3b 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d | g;.}.<?php.declare(strict_types= |
a3500 | 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 | 1);............namespace.Compose |
a3520 | 72 5c 44 6f 77 6e 6c 6f 61 64 65 72 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 66 | r\Downloader;..use.Composer\Conf |
a3540 | 69 67 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 44 75 6d 70 65 72 5c | ig;.use.Composer\Package\Dumper\ |
a3560 | 41 72 72 61 79 44 75 6d 70 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 | ArrayDumper;.use.Composer\Packag |
a3580 | 65 5c 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 | e\PackageInterface;.use.Composer |
a35a0 | 5c 50 61 63 6b 61 67 65 5c 56 65 72 73 69 6f 6e 5c 56 65 72 73 69 6f 6e 47 75 65 73 73 65 72 3b | \Package\Version\VersionGuesser; |
a35c0 | 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 56 65 72 73 69 6f 6e 5c 56 65 | .use.Composer\Package\Version\Ve |
a35e0 | 72 73 69 6f 6e 50 61 72 73 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 | rsionParser;.use.Composer\Util\P |
a3600 | 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 4f 5c | rocessExecutor;.use.Composer\IO\ |
a3620 | 49 4f 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 46 | IOInterface;.use.Composer\Util\F |
a3640 | 69 6c 65 73 79 73 74 65 6d 3b 0a 75 73 65 20 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 50 72 6f | ilesystem;.use.React\Promise\Pro |
a3660 | 6d 69 73 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 44 65 70 65 | miseInterface;.use.Composer\Depe |
a3680 | 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 5c 4f 70 65 72 61 74 69 6f 6e 5c 55 70 64 61 74 65 4f | ndencyResolver\Operation\UpdateO |
a36a0 | 70 65 72 61 74 69 6f 6e 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 | peration;.use.Composer\Dependenc |
a36c0 | 79 52 65 73 6f 6c 76 65 72 5c 4f 70 65 72 61 74 69 6f 6e 5c 49 6e 73 74 61 6c 6c 4f 70 65 72 61 | yResolver\Operation\InstallOpera |
a36e0 | 74 69 6f 6e 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 | tion;.use.Composer\DependencyRes |
a3700 | 6f 6c 76 65 72 5c 4f 70 65 72 61 74 69 6f 6e 5c 55 6e 69 6e 73 74 61 6c 6c 4f 70 65 72 61 74 69 | olver\Operation\UninstallOperati |
a3720 | 6f 6e 3b 0a 0a 0a 0a 0a 61 62 73 74 72 61 63 74 20 63 6c 61 73 73 20 56 63 73 44 6f 77 6e 6c 6f | on;.....abstract.class.VcsDownlo |
a3740 | 61 64 65 72 20 69 6d 70 6c 65 6d 65 6e 74 73 20 44 6f 77 6e 6c 6f 61 64 65 72 49 6e 74 65 72 66 | ader.implements.DownloaderInterf |
a3760 | 61 63 65 2c 20 43 68 61 6e 67 65 52 65 70 6f 72 74 49 6e 74 65 72 66 61 63 65 2c 20 56 63 73 43 | ace,.ChangeReportInterface,.VcsC |
a3780 | 61 70 61 62 6c 65 44 6f 77 6e 6c 6f 61 64 65 72 49 6e 74 65 72 66 61 63 65 0a 7b 0a 0a 70 72 6f | apableDownloaderInterface.{..pro |
a37a0 | 74 65 63 74 65 64 20 24 69 6f 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 63 6f 6e 66 69 67 3b 0a | tected.$io;..protected.$config;. |
a37c0 | 0a 70 72 6f 74 65 63 74 65 64 20 24 70 72 6f 63 65 73 73 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 | .protected.$process;..protected. |
a37e0 | 24 66 69 6c 65 73 79 73 74 65 6d 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 68 61 73 43 6c 65 61 | $filesystem;..protected.$hasClea |
a3800 | 6e 65 64 43 68 61 6e 67 65 73 20 3d 20 5b 5d 3b 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f | nedChanges.=.[];..public.functio |
a3820 | 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 49 4f 49 6e 74 65 72 66 61 63 65 20 24 69 6f 2c 20 43 | n.__construct(IOInterface.$io,.C |
a3840 | 6f 6e 66 69 67 20 24 63 6f 6e 66 69 67 2c 20 3f 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 20 | onfig.$config,.?ProcessExecutor. |
a3860 | 24 70 72 6f 63 65 73 73 20 3d 20 6e 75 6c 6c 2c 20 3f 46 69 6c 65 73 79 73 74 65 6d 20 24 66 73 | $process.=.null,.?Filesystem.$fs |
a3880 | 20 3d 20 6e 75 6c 6c 29 0a 7b 0a 24 74 68 69 73 2d 3e 69 6f 20 3d 20 24 69 6f 3b 0a 24 74 68 69 | .=.null).{.$this->io.=.$io;.$thi |
a38a0 | 73 2d 3e 63 6f 6e 66 69 67 20 3d 20 24 63 6f 6e 66 69 67 3b 0a 24 74 68 69 73 2d 3e 70 72 6f 63 | s->config.=.$config;.$this->proc |
a38c0 | 65 73 73 20 3d 20 24 70 72 6f 63 65 73 73 20 3f 3f 20 6e 65 77 20 50 72 6f 63 65 73 73 45 78 65 | ess.=.$process.??.new.ProcessExe |
a38e0 | 63 75 74 6f 72 28 24 69 6f 29 3b 0a 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 73 74 65 6d 20 3d 20 | cutor($io);.$this->filesystem.=. |
a3900 | 24 66 73 20 3f 3f 20 6e 65 77 20 46 69 6c 65 73 79 73 74 65 6d 28 24 74 68 69 73 2d 3e 70 72 6f | $fs.??.new.Filesystem($this->pro |
a3920 | 63 65 73 73 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 | cess);.}.....public.function.get |
a3940 | 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 53 6f 75 72 63 65 28 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 | InstallationSource():.string.{.r |
a3960 | 65 74 75 72 6e 20 27 73 6f 75 72 63 65 27 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e | eturn.'source';.}.....public.fun |
a3980 | 63 74 69 6f 6e 20 64 6f 77 6e 6c 6f 61 64 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 | ction.download(PackageInterface. |
a39a0 | 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 2c 20 3f 50 61 63 6b 61 67 65 | $package,.string.$path,.?Package |
a39c0 | 49 6e 74 65 72 66 61 63 65 20 24 70 72 65 76 50 61 63 6b 61 67 65 20 3d 20 6e 75 6c 6c 29 3a 20 | Interface.$prevPackage.=.null):. |
a39e0 | 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 69 66 20 28 21 24 70 61 63 6b 61 67 65 | PromiseInterface.{.if.(!$package |
a3a00 | 2d 3e 67 65 74 53 6f 75 72 63 65 52 65 66 65 72 65 6e 63 65 28 29 29 20 7b 0a 74 68 72 6f 77 20 | ->getSourceReference()).{.throw. |
a3a20 | 6e 65 77 20 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 27 50 | new.\InvalidArgumentException('P |
a3a40 | 61 63 6b 61 67 65 20 27 2e 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 4e 61 6d 65 | ackage.'.$package->getPrettyName |
a3a60 | 28 29 2e 27 20 69 73 20 6d 69 73 73 69 6e 67 20 72 65 66 65 72 65 6e 63 65 20 69 6e 66 6f 72 6d | ().'.is.missing.reference.inform |
a3a80 | 61 74 69 6f 6e 27 29 3b 0a 7d 0a 0a 24 75 72 6c 73 20 3d 20 24 74 68 69 73 2d 3e 70 72 65 70 61 | ation');.}..$urls.=.$this->prepa |
a3aa0 | 72 65 55 72 6c 73 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 53 6f 75 72 63 65 55 72 6c 73 28 29 | reUrls($package->getSourceUrls() |
a3ac0 | 29 3b 0a 0a 77 68 69 6c 65 20 28 24 75 72 6c 20 3d 20 61 72 72 61 79 5f 73 68 69 66 74 28 24 75 | );..while.($url.=.array_shift($u |
a3ae0 | 72 6c 73 29 29 20 7b 0a 74 72 79 20 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 64 6f 44 6f | rls)).{.try.{.return.$this->doDo |
a3b00 | 77 6e 6c 6f 61 64 28 24 70 61 63 6b 61 67 65 2c 20 24 70 61 74 68 2c 20 24 75 72 6c 2c 20 24 70 | wnload($package,.$path,.$url,.$p |
a3b20 | 72 65 76 50 61 63 6b 61 67 65 29 3b 0a 7d 20 63 61 74 63 68 20 28 5c 45 78 63 65 70 74 69 6f 6e | revPackage);.}.catch.(\Exception |
a3b40 | 20 24 65 29 20 7b 0a 0a 69 66 20 28 24 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 5c 50 48 50 55 6e | .$e).{..if.($e.instanceof.\PHPUn |
a3b60 | 69 74 5c 46 72 61 6d 65 77 6f 72 6b 5c 45 78 63 65 70 74 69 6f 6e 29 20 7b 0a 74 68 72 6f 77 20 | it\Framework\Exception).{.throw. |
a3b80 | 24 65 3b 0a 7d 0a 69 66 20 28 24 74 68 69 73 2d 3e 69 6f 2d 3e 69 73 44 65 62 75 67 28 29 29 20 | $e;.}.if.($this->io->isDebug()). |
a3ba0 | 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 46 61 69 6c 65 64 3a | {.$this->io->writeError('Failed: |
a3bc0 | 20 5b 27 2e 67 65 74 5f 63 6c 61 73 73 28 24 65 29 2e 27 5d 20 27 2e 24 65 2d 3e 67 65 74 4d 65 | .['.get_class($e).'].'.$e->getMe |
a3be0 | 73 73 61 67 65 28 29 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 63 6f 75 6e 74 28 24 75 72 6c 73 29 | ssage());.}.elseif.(count($urls) |
a3c00 | 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 20 20 20 20 46 | ).{.$this->io->writeError('....F |
a3c20 | 61 69 6c 65 64 2c 20 74 72 79 69 6e 67 20 74 68 65 20 6e 65 78 74 20 55 52 4c 27 29 3b 0a 7d 0a | ailed,.trying.the.next.URL');.}. |
a3c40 | 69 66 20 28 21 63 6f 75 6e 74 28 24 75 72 6c 73 29 29 20 7b 0a 74 68 72 6f 77 20 24 65 3b 0a 7d | if.(!count($urls)).{.throw.$e;.} |
a3c60 | 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f | .}.}..return.\React\Promise\reso |
a3c80 | 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e | lve(null);.}.....public.function |
a3ca0 | 20 70 72 65 70 61 72 65 28 73 74 72 69 6e 67 20 24 74 79 70 65 2c 20 50 61 63 6b 61 67 65 49 6e | .prepare(string.$type,.PackageIn |
a3cc0 | 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 2c 20 | terface.$package,.string.$path,. |
a3ce0 | 3f 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 72 65 76 50 61 63 6b 61 67 65 20 3d | ?PackageInterface.$prevPackage.= |
a3d00 | 20 6e 75 6c 6c 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 69 66 20 28 24 | .null):.PromiseInterface.{.if.($ |
a3d20 | 74 79 70 65 20 3d 3d 3d 20 27 75 70 64 61 74 65 27 29 20 7b 0a 24 74 68 69 73 2d 3e 63 6c 65 61 | type.===.'update').{.$this->clea |
a3d40 | 6e 43 68 61 6e 67 65 73 28 24 70 72 65 76 50 61 63 6b 61 67 65 2c 20 24 70 61 74 68 2c 20 74 72 | nChanges($prevPackage,.$path,.tr |
a3d60 | 75 65 29 3b 0a 24 74 68 69 73 2d 3e 68 61 73 43 6c 65 61 6e 65 64 43 68 61 6e 67 65 73 5b 24 70 | ue);.$this->hasCleanedChanges[$p |
a3d80 | 72 65 76 50 61 63 6b 61 67 65 2d 3e 67 65 74 55 6e 69 71 75 65 4e 61 6d 65 28 29 5d 20 3d 20 74 | revPackage->getUniqueName()].=.t |
a3da0 | 72 75 65 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 74 79 70 65 20 3d 3d 3d 20 27 69 6e 73 74 61 6c | rue;.}.elseif.($type.===.'instal |
a3dc0 | 6c 27 29 20 7b 0a 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 73 74 65 6d 2d 3e 65 6d 70 74 79 44 69 | l').{.$this->filesystem->emptyDi |
a3de0 | 72 65 63 74 6f 72 79 28 24 70 61 74 68 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 74 79 70 65 20 | rectory($path);.}.elseif.($type. |
a3e00 | 3d 3d 3d 20 27 75 6e 69 6e 73 74 61 6c 6c 27 29 20 7b 0a 24 74 68 69 73 2d 3e 63 6c 65 61 6e 43 | ===.'uninstall').{.$this->cleanC |
a3e20 | 68 61 6e 67 65 73 28 24 70 61 63 6b 61 67 65 2c 20 24 70 61 74 68 2c 20 66 61 6c 73 65 29 3b 0a | hanges($package,.$path,.false);. |
a3e40 | 7d 0a 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 | }..return.\React\Promise\resolve |
a3e60 | 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 63 6c | (null);.}.....public.function.cl |
a3e80 | 65 61 6e 75 70 28 73 74 72 69 6e 67 20 24 74 79 70 65 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 | eanup(string.$type,.PackageInter |
a3ea0 | 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 2c 20 3f 50 61 | face.$package,.string.$path,.?Pa |
a3ec0 | 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 72 65 76 50 61 63 6b 61 67 65 20 3d 20 6e 75 | ckageInterface.$prevPackage.=.nu |
a3ee0 | 6c 6c 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 69 66 20 28 24 74 79 70 | ll):.PromiseInterface.{.if.($typ |
a3f00 | 65 20 3d 3d 3d 20 27 75 70 64 61 74 65 27 20 26 26 20 69 73 73 65 74 28 24 74 68 69 73 2d 3e 68 | e.===.'update'.&&.isset($this->h |
a3f20 | 61 73 43 6c 65 61 6e 65 64 43 68 61 6e 67 65 73 5b 24 70 72 65 76 50 61 63 6b 61 67 65 2d 3e 67 | asCleanedChanges[$prevPackage->g |
a3f40 | 65 74 55 6e 69 71 75 65 4e 61 6d 65 28 29 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 72 65 61 70 70 | etUniqueName()])).{.$this->reapp |
a3f60 | 6c 79 43 68 61 6e 67 65 73 28 24 70 61 74 68 29 3b 0a 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 68 | lyChanges($path);.unset($this->h |
a3f80 | 61 73 43 6c 65 61 6e 65 64 43 68 61 6e 67 65 73 5b 24 70 72 65 76 50 61 63 6b 61 67 65 2d 3e 67 | asCleanedChanges[$prevPackage->g |
a3fa0 | 65 74 55 6e 69 71 75 65 4e 61 6d 65 28 29 5d 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 5c 52 65 61 | etUniqueName()]);.}..return.\Rea |
a3fc0 | 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a 0a 0a 0a | ct\Promise\resolve(null);.}..... |
a3fe0 | 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 6e 73 74 61 6c 6c 28 50 61 63 6b 61 67 65 49 | public.function.install(PackageI |
a4000 | 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 29 | nterface.$package,.string.$path) |
a4020 | 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 69 66 20 28 21 24 70 61 63 6b 61 | :.PromiseInterface.{.if.(!$packa |
a4040 | 67 65 2d 3e 67 65 74 53 6f 75 72 63 65 52 65 66 65 72 65 6e 63 65 28 29 29 20 7b 0a 74 68 72 6f | ge->getSourceReference()).{.thro |
a4060 | 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 | w.new.\InvalidArgumentException( |
a4080 | 27 50 61 63 6b 61 67 65 20 27 2e 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 4e 61 | 'Package.'.$package->getPrettyNa |
a40a0 | 6d 65 28 29 2e 27 20 69 73 20 6d 69 73 73 69 6e 67 20 72 65 66 65 72 65 6e 63 65 20 69 6e 66 6f | me().'.is.missing.reference.info |
a40c0 | 72 6d 61 74 69 6f 6e 27 29 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 | rmation');.}..$this->io->writeEr |
a40e0 | 72 6f 72 28 22 20 20 2d 20 22 20 2e 20 49 6e 73 74 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 3a 3a 66 | ror("..-."...InstallOperation::f |
a4100 | 6f 72 6d 61 74 28 24 70 61 63 6b 61 67 65 29 2e 27 3a 20 27 2c 20 66 61 6c 73 65 29 3b 0a 0a 24 | ormat($package).':.',.false);..$ |
a4120 | 75 72 6c 73 20 3d 20 24 74 68 69 73 2d 3e 70 72 65 70 61 72 65 55 72 6c 73 28 24 70 61 63 6b 61 | urls.=.$this->prepareUrls($packa |
a4140 | 67 65 2d 3e 67 65 74 53 6f 75 72 63 65 55 72 6c 73 28 29 29 3b 0a 77 68 69 6c 65 20 28 24 75 72 | ge->getSourceUrls());.while.($ur |
a4160 | 6c 20 3d 20 61 72 72 61 79 5f 73 68 69 66 74 28 24 75 72 6c 73 29 29 20 7b 0a 74 72 79 20 7b 0a | l.=.array_shift($urls)).{.try.{. |
a4180 | 24 74 68 69 73 2d 3e 64 6f 49 6e 73 74 61 6c 6c 28 24 70 61 63 6b 61 67 65 2c 20 24 70 61 74 68 | $this->doInstall($package,.$path |
a41a0 | 2c 20 24 75 72 6c 29 3b 0a 62 72 65 61 6b 3b 0a 7d 20 63 61 74 63 68 20 28 5c 45 78 63 65 70 74 | ,.$url);.break;.}.catch.(\Except |
a41c0 | 69 6f 6e 20 24 65 29 20 7b 0a 0a 69 66 20 28 24 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 5c 50 48 | ion.$e).{..if.($e.instanceof.\PH |
a41e0 | 50 55 6e 69 74 5c 46 72 61 6d 65 77 6f 72 6b 5c 45 78 63 65 70 74 69 6f 6e 29 20 7b 0a 74 68 72 | PUnit\Framework\Exception).{.thr |
a4200 | 6f 77 20 24 65 3b 0a 7d 0a 69 66 20 28 24 74 68 69 73 2d 3e 69 6f 2d 3e 69 73 44 65 62 75 67 28 | ow.$e;.}.if.($this->io->isDebug( |
a4220 | 29 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 46 61 69 6c | )).{.$this->io->writeError('Fail |
a4240 | 65 64 3a 20 5b 27 2e 67 65 74 5f 63 6c 61 73 73 28 24 65 29 2e 27 5d 20 27 2e 24 65 2d 3e 67 65 | ed:.['.get_class($e).'].'.$e->ge |
a4260 | 74 4d 65 73 73 61 67 65 28 29 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 63 6f 75 6e 74 28 24 75 72 | tMessage());.}.elseif.(count($ur |
a4280 | 6c 73 29 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 20 20 | ls)).{.$this->io->writeError('.. |
a42a0 | 20 20 46 61 69 6c 65 64 2c 20 74 72 79 69 6e 67 20 74 68 65 20 6e 65 78 74 20 55 52 4c 27 29 3b | ..Failed,.trying.the.next.URL'); |
a42c0 | 0a 7d 0a 69 66 20 28 21 63 6f 75 6e 74 28 24 75 72 6c 73 29 29 20 7b 0a 74 68 72 6f 77 20 24 65 | .}.if.(!count($urls)).{.throw.$e |
a42e0 | 3b 0a 7d 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 | ;.}.}.}..return.\React\Promise\r |
a4300 | 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 | esolve(null);.}.....public.funct |
a4320 | 69 6f 6e 20 75 70 64 61 74 65 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 69 6e 69 | ion.update(PackageInterface.$ini |
a4340 | 74 69 61 6c 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 74 61 72 67 65 74 2c 20 | tial,.PackageInterface.$target,. |
a4360 | 73 74 72 69 6e 67 20 24 70 61 74 68 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a | string.$path):.PromiseInterface. |
a4380 | 7b 0a 69 66 20 28 21 24 74 61 72 67 65 74 2d 3e 67 65 74 53 6f 75 72 63 65 52 65 66 65 72 65 6e | {.if.(!$target->getSourceReferen |
a43a0 | 63 65 28 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 | ce()).{.throw.new.\InvalidArgume |
a43c0 | 6e 74 45 78 63 65 70 74 69 6f 6e 28 27 50 61 63 6b 61 67 65 20 27 2e 24 74 61 72 67 65 74 2d 3e | ntException('Package.'.$target-> |
a43e0 | 67 65 74 50 72 65 74 74 79 4e 61 6d 65 28 29 2e 27 20 69 73 20 6d 69 73 73 69 6e 67 20 72 65 66 | getPrettyName().'.is.missing.ref |
a4400 | 65 72 65 6e 63 65 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 27 29 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e | erence.information');.}..$this-> |
a4420 | 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 22 20 20 2d 20 22 20 2e 20 55 70 64 61 74 65 4f 70 | io->writeError("..-."...UpdateOp |
a4440 | 65 72 61 74 69 6f 6e 3a 3a 66 6f 72 6d 61 74 28 24 69 6e 69 74 69 61 6c 2c 20 24 74 61 72 67 65 | eration::format($initial,.$targe |
a4460 | 74 29 2e 27 3a 20 27 2c 20 66 61 6c 73 65 29 3b 0a 0a 24 75 72 6c 73 20 3d 20 24 74 68 69 73 2d | t).':.',.false);..$urls.=.$this- |
a4480 | 3e 70 72 65 70 61 72 65 55 72 6c 73 28 24 74 61 72 67 65 74 2d 3e 67 65 74 53 6f 75 72 63 65 55 | >prepareUrls($target->getSourceU |
a44a0 | 72 6c 73 28 29 29 3b 0a 0a 24 65 78 63 65 70 74 69 6f 6e 20 3d 20 6e 75 6c 6c 3b 0a 77 68 69 6c | rls());..$exception.=.null;.whil |
a44c0 | 65 20 28 24 75 72 6c 20 3d 20 61 72 72 61 79 5f 73 68 69 66 74 28 24 75 72 6c 73 29 29 20 7b 0a | e.($url.=.array_shift($urls)).{. |
a44e0 | 74 72 79 20 7b 0a 24 74 68 69 73 2d 3e 64 6f 55 70 64 61 74 65 28 24 69 6e 69 74 69 61 6c 2c 20 | try.{.$this->doUpdate($initial,. |
a4500 | 24 74 61 72 67 65 74 2c 20 24 70 61 74 68 2c 20 24 75 72 6c 29 3b 0a 0a 24 65 78 63 65 70 74 69 | $target,.$path,.$url);..$excepti |
a4520 | 6f 6e 20 3d 20 6e 75 6c 6c 3b 0a 62 72 65 61 6b 3b 0a 7d 20 63 61 74 63 68 20 28 5c 45 78 63 65 | on.=.null;.break;.}.catch.(\Exce |
a4540 | 70 74 69 6f 6e 20 24 65 78 63 65 70 74 69 6f 6e 29 20 7b 0a 0a 69 66 20 28 24 65 78 63 65 70 74 | ption.$exception).{..if.($except |
a4560 | 69 6f 6e 20 69 6e 73 74 61 6e 63 65 6f 66 20 5c 50 48 50 55 6e 69 74 5c 46 72 61 6d 65 77 6f 72 | ion.instanceof.\PHPUnit\Framewor |
a4580 | 6b 5c 45 78 63 65 70 74 69 6f 6e 29 20 7b 0a 74 68 72 6f 77 20 24 65 78 63 65 70 74 69 6f 6e 3b | k\Exception).{.throw.$exception; |
a45a0 | 0a 7d 0a 69 66 20 28 24 74 68 69 73 2d 3e 69 6f 2d 3e 69 73 44 65 62 75 67 28 29 29 20 7b 0a 24 | .}.if.($this->io->isDebug()).{.$ |
a45c0 | 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 46 61 69 6c 65 64 3a 20 5b 27 | this->io->writeError('Failed:.[' |
a45e0 | 2e 67 65 74 5f 63 6c 61 73 73 28 24 65 78 63 65 70 74 69 6f 6e 29 2e 27 5d 20 27 2e 24 65 78 63 | .get_class($exception).'].'.$exc |
a4600 | 65 70 74 69 6f 6e 2d 3e 67 65 74 4d 65 73 73 61 67 65 28 29 29 3b 0a 7d 20 65 6c 73 65 69 66 20 | eption->getMessage());.}.elseif. |
a4620 | 28 63 6f 75 6e 74 28 24 75 72 6c 73 29 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 | (count($urls)).{.$this->io->writ |
a4640 | 65 45 72 72 6f 72 28 27 20 20 20 20 46 61 69 6c 65 64 2c 20 74 72 79 69 6e 67 20 74 68 65 20 6e | eError('....Failed,.trying.the.n |
a4660 | 65 78 74 20 55 52 4c 27 29 3b 0a 7d 0a 7d 0a 7d 0a 0a 0a 0a 69 66 20 28 21 24 65 78 63 65 70 74 | ext.URL');.}.}.}....if.(!$except |
a4680 | 69 6f 6e 20 26 26 20 24 74 68 69 73 2d 3e 69 6f 2d 3e 69 73 56 65 72 62 6f 73 65 28 29 20 26 26 | ion.&&.$this->io->isVerbose().&& |
a46a0 | 20 24 74 68 69 73 2d 3e 68 61 73 4d 65 74 61 64 61 74 61 52 65 70 6f 73 69 74 6f 72 79 28 24 70 | .$this->hasMetadataRepository($p |
a46c0 | 61 74 68 29 29 20 7b 0a 24 6d 65 73 73 61 67 65 20 3d 20 27 50 75 6c 6c 69 6e 67 20 69 6e 20 63 | ath)).{.$message.=.'Pulling.in.c |
a46e0 | 68 61 6e 67 65 73 3a 27 3b 0a 24 6c 6f 67 73 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 43 6f 6d 6d | hanges:';.$logs.=.$this->getComm |
a4700 | 69 74 4c 6f 67 73 28 24 69 6e 69 74 69 61 6c 2d 3e 67 65 74 53 6f 75 72 63 65 52 65 66 65 72 65 | itLogs($initial->getSourceRefere |
a4720 | 6e 63 65 28 29 2c 20 24 74 61 72 67 65 74 2d 3e 67 65 74 53 6f 75 72 63 65 52 65 66 65 72 65 6e | nce(),.$target->getSourceReferen |
a4740 | 63 65 28 29 2c 20 24 70 61 74 68 29 3b 0a 0a 69 66 20 28 27 27 20 3d 3d 3d 20 74 72 69 6d 28 24 | ce(),.$path);..if.(''.===.trim($ |
a4760 | 6c 6f 67 73 29 29 20 7b 0a 24 6d 65 73 73 61 67 65 20 3d 20 27 52 6f 6c 6c 69 6e 67 20 62 61 63 | logs)).{.$message.=.'Rolling.bac |
a4780 | 6b 20 63 68 61 6e 67 65 73 3a 27 3b 0a 24 6c 6f 67 73 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 43 | k.changes:';.$logs.=.$this->getC |
a47a0 | 6f 6d 6d 69 74 4c 6f 67 73 28 24 74 61 72 67 65 74 2d 3e 67 65 74 53 6f 75 72 63 65 52 65 66 65 | ommitLogs($target->getSourceRefe |
a47c0 | 72 65 6e 63 65 28 29 2c 20 24 69 6e 69 74 69 61 6c 2d 3e 67 65 74 53 6f 75 72 63 65 52 65 66 65 | rence(),.$initial->getSourceRefe |
a47e0 | 72 65 6e 63 65 28 29 2c 20 24 70 61 74 68 29 3b 0a 7d 0a 0a 69 66 20 28 27 27 20 21 3d 3d 20 74 | rence(),.$path);.}..if.(''.!==.t |
a4800 | 72 69 6d 28 24 6c 6f 67 73 29 29 20 7b 0a 24 6c 6f 67 73 20 3d 20 69 6d 70 6c 6f 64 65 28 22 5c | rim($logs)).{.$logs.=.implode("\ |
a4820 | 6e 22 2c 20 61 72 72 61 79 5f 6d 61 70 28 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 | n",.array_map(static.function.($ |
a4840 | 6c 69 6e 65 29 3a 20 73 74 72 69 6e 67 20 7b 0a 72 65 74 75 72 6e 20 27 20 20 20 20 20 20 27 20 | line):.string.{.return.'......'. |
a4860 | 2e 20 24 6c 69 6e 65 3b 0a 7d 2c 20 65 78 70 6c 6f 64 65 28 22 5c 6e 22 2c 20 24 6c 6f 67 73 29 | ..$line;.},.explode("\n",.$logs) |
a4880 | 29 29 3b 0a 0a 0a 24 6c 6f 67 73 20 3d 20 73 74 72 5f 72 65 70 6c 61 63 65 28 27 3c 27 2c 20 27 | ));...$logs.=.str_replace('<',.' |
a48a0 | 5c 3c 27 2c 20 24 6c 6f 67 73 29 3b 0a 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 | \<',.$logs);..$this->io->writeEr |
a48c0 | 72 6f 72 28 27 20 20 20 20 27 2e 24 6d 65 73 73 61 67 65 29 3b 0a 24 74 68 69 73 2d 3e 69 6f 2d | ror('....'.$message);.$this->io- |
a48e0 | 3e 77 72 69 74 65 45 72 72 6f 72 28 24 6c 6f 67 73 29 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 21 24 75 | >writeError($logs);.}.}..if.(!$u |
a4900 | 72 6c 73 20 26 26 20 24 65 78 63 65 70 74 69 6f 6e 29 20 7b 0a 74 68 72 6f 77 20 24 65 78 63 65 | rls.&&.$exception).{.throw.$exce |
a4920 | 70 74 69 6f 6e 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c | ption;.}..return.\React\Promise\ |
a4940 | 72 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 | resolve(null);.}.....public.func |
a4960 | 74 69 6f 6e 20 72 65 6d 6f 76 65 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 | tion.remove(PackageInterface.$pa |
a4980 | 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 | ckage,.string.$path):.PromiseInt |
a49a0 | 65 72 66 61 63 65 0a 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 22 | erface.{.$this->io->writeError(" |
a49c0 | 20 20 2d 20 22 20 2e 20 55 6e 69 6e 73 74 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 3a 3a 66 6f 72 6d | ..-."...UninstallOperation::form |
a49e0 | 61 74 28 24 70 61 63 6b 61 67 65 29 29 3b 0a 0a 24 70 72 6f 6d 69 73 65 20 3d 20 24 74 68 69 73 | at($package));..$promise.=.$this |
a4a00 | 2d 3e 66 69 6c 65 73 79 73 74 65 6d 2d 3e 72 65 6d 6f 76 65 44 69 72 65 63 74 6f 72 79 41 73 79 | ->filesystem->removeDirectoryAsy |
a4a20 | 6e 63 28 24 70 61 74 68 29 3b 0a 0a 72 65 74 75 72 6e 20 24 70 72 6f 6d 69 73 65 2d 3e 74 68 65 | nc($path);..return.$promise->the |
a4a40 | 6e 28 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 62 6f 6f 6c 20 24 72 65 73 75 6c 74 29 | n(static.function.(bool.$result) |
a4a60 | 20 75 73 65 20 28 24 70 61 74 68 29 20 7b 0a 69 66 20 28 21 24 72 65 73 75 6c 74 29 20 7b 0a 74 | .use.($path).{.if.(!$result).{.t |
a4a80 | 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 43 6f 75 6c | hrow.new.\RuntimeException('Coul |
a4aa0 | 64 20 6e 6f 74 20 63 6f 6d 70 6c 65 74 65 6c 79 20 64 65 6c 65 74 65 20 27 2e 24 70 61 74 68 2e | d.not.completely.delete.'.$path. |
a4ac0 | 27 2c 20 61 62 6f 72 74 69 6e 67 2e 27 29 3b 0a 7d 0a 7d 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c | ',.aborting.');.}.});.}.....publ |
a4ae0 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 56 63 73 52 65 66 65 72 65 6e 63 65 28 50 61 63 6b | ic.function.getVcsReference(Pack |
a4b00 | 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 70 | ageInterface.$package,.string.$p |
a4b20 | 61 74 68 29 3a 20 3f 73 74 72 69 6e 67 0a 7b 0a 24 70 61 72 73 65 72 20 3d 20 6e 65 77 20 56 65 | ath):.?string.{.$parser.=.new.Ve |
a4b40 | 72 73 69 6f 6e 50 61 72 73 65 72 3b 0a 24 67 75 65 73 73 65 72 20 3d 20 6e 65 77 20 56 65 72 73 | rsionParser;.$guesser.=.new.Vers |
a4b60 | 69 6f 6e 47 75 65 73 73 65 72 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 2c 20 24 74 68 69 73 2d | ionGuesser($this->config,.$this- |
a4b80 | 3e 70 72 6f 63 65 73 73 2c 20 24 70 61 72 73 65 72 29 3b 0a 24 64 75 6d 70 65 72 20 3d 20 6e 65 | >process,.$parser);.$dumper.=.ne |
a4ba0 | 77 20 41 72 72 61 79 44 75 6d 70 65 72 3b 0a 0a 24 70 61 63 6b 61 67 65 43 6f 6e 66 69 67 20 3d | w.ArrayDumper;..$packageConfig.= |
a4bc0 | 20 24 64 75 6d 70 65 72 2d 3e 64 75 6d 70 28 24 70 61 63 6b 61 67 65 29 3b 0a 69 66 20 28 24 70 | .$dumper->dump($package);.if.($p |
a4be0 | 61 63 6b 61 67 65 56 65 72 73 69 6f 6e 20 3d 20 24 67 75 65 73 73 65 72 2d 3e 67 75 65 73 73 56 | ackageVersion.=.$guesser->guessV |
a4c00 | 65 72 73 69 6f 6e 28 24 70 61 63 6b 61 67 65 43 6f 6e 66 69 67 2c 20 24 70 61 74 68 29 29 20 7b | ersion($packageConfig,.$path)).{ |
a4c20 | 0a 72 65 74 75 72 6e 20 24 70 61 63 6b 61 67 65 56 65 72 73 69 6f 6e 5b 27 63 6f 6d 6d 69 74 27 | .return.$packageVersion['commit' |
a4c40 | 5d 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 | ];.}..return.null;.}...........p |
a4c60 | 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 63 6c 65 61 6e 43 68 61 6e 67 65 73 28 50 | rotected.function.cleanChanges(P |
a4c80 | 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 | ackageInterface.$package,.string |
a4ca0 | 20 24 70 61 74 68 2c 20 62 6f 6f 6c 20 24 75 70 64 61 74 65 29 3a 20 50 72 6f 6d 69 73 65 49 6e | .$path,.bool.$update):.PromiseIn |
a4cc0 | 74 65 72 66 61 63 65 0a 7b 0a 0a 69 66 20 28 6e 75 6c 6c 20 21 3d 3d 20 24 74 68 69 73 2d 3e 67 | terface.{..if.(null.!==.$this->g |
a4ce0 | 65 74 4c 6f 63 61 6c 43 68 61 6e 67 65 73 28 24 70 61 63 6b 61 67 65 2c 20 24 70 61 74 68 29 29 | etLocalChanges($package,.$path)) |
a4d00 | 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 | .{.throw.new.\RuntimeException(' |
a4d20 | 53 6f 75 72 63 65 20 64 69 72 65 63 74 6f 72 79 20 27 20 2e 20 24 70 61 74 68 20 2e 20 27 20 68 | Source.directory.'...$path...'.h |
a4d40 | 61 73 20 75 6e 63 6f 6d 6d 69 74 74 65 64 20 63 68 61 6e 67 65 73 2e 27 29 3b 0a 7d 0a 0a 72 65 | as.uncommitted.changes.');.}..re |
a4d60 | 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c | turn.\React\Promise\resolve(null |
a4d80 | 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 | );.}.........protected.function. |
a4da0 | 72 65 61 70 70 6c 79 43 68 61 6e 67 65 73 28 73 74 72 69 6e 67 20 24 70 61 74 68 29 3a 20 76 6f | reapplyChanges(string.$path):.vo |
a4dc0 | 69 64 0a 7b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 61 62 73 74 72 61 63 74 20 70 72 6f 74 65 63 74 | id.{.}..........abstract.protect |
a4de0 | 65 64 20 66 75 6e 63 74 69 6f 6e 20 64 6f 44 6f 77 6e 6c 6f 61 64 28 50 61 63 6b 61 67 65 49 6e | ed.function.doDownload(PackageIn |
a4e00 | 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 2c 20 | terface.$package,.string.$path,. |
a4e20 | 73 74 72 69 6e 67 20 24 75 72 6c 2c 20 3f 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 | string.$url,.?PackageInterface.$ |
a4e40 | 70 72 65 76 50 61 63 6b 61 67 65 20 3d 20 6e 75 6c 6c 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 | prevPackage.=.null):.PromiseInte |
a4e60 | 72 66 61 63 65 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 61 62 73 74 72 61 63 74 20 70 72 6f 74 65 63 74 65 | rface;.........abstract.protecte |
a4e80 | 64 20 66 75 6e 63 74 69 6f 6e 20 64 6f 49 6e 73 74 61 6c 6c 28 50 61 63 6b 61 67 65 49 6e 74 65 | d.function.doInstall(PackageInte |
a4ea0 | 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 2c 20 73 74 | rface.$package,.string.$path,.st |
a4ec0 | 72 69 6e 67 20 24 75 72 6c 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 3b 0a 0a 0a | ring.$url):.PromiseInterface;... |
a4ee0 | 0a 0a 0a 0a 0a 0a 0a 61 62 73 74 72 61 63 74 20 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 | .......abstract.protected.functi |
a4f00 | 6f 6e 20 64 6f 55 70 64 61 74 65 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 69 6e | on.doUpdate(PackageInterface.$in |
a4f20 | 69 74 69 61 6c 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 74 61 72 67 65 74 2c | itial,.PackageInterface.$target, |
a4f40 | 20 73 74 72 69 6e 67 20 24 70 61 74 68 2c 20 73 74 72 69 6e 67 20 24 75 72 6c 29 3a 20 50 72 6f | .string.$path,.string.$url):.Pro |
a4f60 | 6d 69 73 65 49 6e 74 65 72 66 61 63 65 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 61 62 73 74 72 61 63 74 20 | miseInterface;.........abstract. |
a4f80 | 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 43 6f 6d 6d 69 74 4c 6f 67 73 | protected.function.getCommitLogs |
a4fa0 | 28 73 74 72 69 6e 67 20 24 66 72 6f 6d 52 65 66 65 72 65 6e 63 65 2c 20 73 74 72 69 6e 67 20 24 | (string.$fromReference,.string.$ |
a4fc0 | 74 6f 52 65 66 65 72 65 6e 63 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 29 3a 20 73 74 72 69 | toReference,.string.$path):.stri |
a4fe0 | 6e 67 3b 0a 0a 0a 0a 0a 0a 61 62 73 74 72 61 63 74 20 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 | ng;......abstract.protected.func |
a5000 | 74 69 6f 6e 20 68 61 73 4d 65 74 61 64 61 74 61 52 65 70 6f 73 69 74 6f 72 79 28 73 74 72 69 6e | tion.hasMetadataRepository(strin |
a5020 | 67 20 24 70 61 74 68 29 3a 20 62 6f 6f 6c 3b 0a 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 | g.$path):.bool;.......private.fu |
a5040 | 6e 63 74 69 6f 6e 20 70 72 65 70 61 72 65 55 72 6c 73 28 61 72 72 61 79 20 24 75 72 6c 73 29 3a | nction.prepareUrls(array.$urls): |
a5060 | 20 61 72 72 61 79 0a 7b 0a 66 6f 72 65 61 63 68 20 28 24 75 72 6c 73 20 61 73 20 24 69 6e 64 65 | .array.{.foreach.($urls.as.$inde |
a5080 | 78 20 3d 3e 20 24 75 72 6c 29 20 7b 0a 69 66 20 28 46 69 6c 65 73 79 73 74 65 6d 3a 3a 69 73 4c | x.=>.$url).{.if.(Filesystem::isL |
a50a0 | 6f 63 61 6c 50 61 74 68 28 24 75 72 6c 29 29 20 7b 0a 0a 0a 24 66 69 6c 65 50 72 6f 74 6f 63 6f | ocalPath($url)).{...$fileProtoco |
a50c0 | 6c 20 3d 20 27 66 69 6c 65 3a 2f 2f 27 3b 0a 24 69 73 46 69 6c 65 50 72 6f 74 6f 63 6f 6c 20 3d | l.=.'file://';.$isFileProtocol.= |
a50e0 | 20 66 61 6c 73 65 3b 0a 69 66 20 28 30 20 3d 3d 3d 20 73 74 72 70 6f 73 28 24 75 72 6c 2c 20 24 | .false;.if.(0.===.strpos($url,.$ |
a5100 | 66 69 6c 65 50 72 6f 74 6f 63 6f 6c 29 29 20 7b 0a 24 75 72 6c 20 3d 20 73 75 62 73 74 72 28 24 | fileProtocol)).{.$url.=.substr($ |
a5120 | 75 72 6c 2c 20 73 74 72 6c 65 6e 28 24 66 69 6c 65 50 72 6f 74 6f 63 6f 6c 29 29 3b 0a 24 69 73 | url,.strlen($fileProtocol));.$is |
a5140 | 46 69 6c 65 50 72 6f 74 6f 63 6f 6c 20 3d 20 74 72 75 65 3b 0a 7d 0a 0a 0a 69 66 20 28 66 61 6c | FileProtocol.=.true;.}...if.(fal |
a5160 | 73 65 20 21 3d 3d 20 73 74 72 70 6f 73 28 24 75 72 6c 2c 20 27 25 27 29 29 20 7b 0a 24 75 72 6c | se.!==.strpos($url,.'%')).{.$url |
a5180 | 20 3d 20 72 61 77 75 72 6c 64 65 63 6f 64 65 28 24 75 72 6c 29 3b 0a 7d 0a 0a 24 75 72 6c 73 5b | .=.rawurldecode($url);.}..$urls[ |
a51a0 | 24 69 6e 64 65 78 5d 20 3d 20 72 65 61 6c 70 61 74 68 28 24 75 72 6c 29 3b 0a 0a 69 66 20 28 24 | $index].=.realpath($url);..if.($ |
a51c0 | 69 73 46 69 6c 65 50 72 6f 74 6f 63 6f 6c 29 20 7b 0a 24 75 72 6c 73 5b 24 69 6e 64 65 78 5d 20 | isFileProtocol).{.$urls[$index]. |
a51e0 | 3d 20 24 66 69 6c 65 50 72 6f 74 6f 63 6f 6c 20 2e 20 24 75 72 6c 73 5b 24 69 6e 64 65 78 5d 3b | =.$fileProtocol...$urls[$index]; |
a5200 | 0a 7d 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 75 72 6c 73 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 | .}.}.}..return.$urls;.}.}.<?php. |
a5220 | 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a | declare(strict_types=1);........ |
a5240 | 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 44 6f 77 6e 6c 6f 61 64 65 | ....namespace.Composer\Downloade |
a5260 | 72 3b 0a 0a 75 73 65 20 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 50 72 6f 6d 69 73 65 49 6e 74 | r;..use.React\Promise\PromiseInt |
a5280 | 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 50 61 63 | erface;.use.Composer\Package\Pac |
a52a0 | 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c | kageInterface;.use.Composer\Util |
a52c0 | 5c 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3b 0a 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 58 | \ProcessExecutor;........class.X |
a52e0 | 7a 44 6f 77 6e 6c 6f 61 64 65 72 20 65 78 74 65 6e 64 73 20 41 72 63 68 69 76 65 44 6f 77 6e 6c | zDownloader.extends.ArchiveDownl |
a5300 | 6f 61 64 65 72 0a 7b 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 65 78 74 72 61 | oader.{.protected.function.extra |
a5320 | 63 74 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 | ct(PackageInterface.$package,.st |
a5340 | 72 69 6e 67 20 24 66 69 6c 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 29 3a 20 50 72 6f 6d 69 | ring.$file,.string.$path):.Promi |
a5360 | 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 24 63 6f 6d 6d 61 6e 64 20 3d 20 27 74 61 72 20 2d 78 | seInterface.{.$command.=.'tar.-x |
a5380 | 4a 66 20 27 20 2e 20 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3a 3a 65 73 63 61 70 65 28 24 | Jf.'...ProcessExecutor::escape($ |
a53a0 | 66 69 6c 65 29 20 2e 20 27 20 2d 43 20 27 20 2e 20 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 | file)...'.-C.'...ProcessExecutor |
a53c0 | 3a 3a 65 73 63 61 70 65 28 24 70 61 74 68 29 3b 0a 0a 69 66 20 28 30 20 3d 3d 3d 20 24 74 68 69 | ::escape($path);..if.(0.===.$thi |
a53e0 | 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 65 78 65 63 75 74 65 28 24 63 6f 6d 6d 61 6e 64 2c 20 24 69 | s->process->execute($command,.$i |
a5400 | 67 6e 6f 72 65 64 4f 75 74 70 75 74 29 29 20 7b 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 | gnoredOutput)).{.return.\React\P |
a5420 | 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a 24 70 72 6f 63 65 73 | romise\resolve(null);.}..$proces |
a5440 | 73 45 72 72 6f 72 20 3d 20 27 46 61 69 6c 65 64 20 74 6f 20 65 78 65 63 75 74 65 20 27 20 2e 20 | sError.=.'Failed.to.execute.'... |
a5460 | 24 63 6f 6d 6d 61 6e 64 20 2e 20 22 5c 6e 5c 6e 22 20 2e 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 | $command..."\n\n"...$this->proce |
a5480 | 73 73 2d 3e 67 65 74 45 72 72 6f 72 4f 75 74 70 75 74 28 29 3b 0a 0a 74 68 72 6f 77 20 6e 65 77 | ss->getErrorOutput();..throw.new |
a54a0 | 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 24 70 72 6f 63 65 73 73 45 72 72 6f 72 | .\RuntimeException($processError |
a54c0 | 29 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 | );.}.}.<?php.declare(strict_type |
a54e0 | 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f | s=1);............namespace.Compo |
a5500 | 73 65 72 5c 44 6f 77 6e 6c 6f 61 64 65 72 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 | ser\Downloader;..use.Composer\Pa |
a5520 | 63 6b 61 67 65 5c 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 | ckage\PackageInterface;.use.Comp |
a5540 | 6f 73 65 72 5c 50 63 72 65 5c 50 72 65 67 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 | oser\Pcre\Preg;.use.Composer\Uti |
a5560 | 6c 5c 49 6e 69 48 65 6c 70 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 | l\IniHelper;.use.Composer\Util\P |
a5580 | 6c 61 74 66 6f 72 6d 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 72 6f 63 65 | latform;.use.Composer\Util\Proce |
a55a0 | 73 73 45 78 65 63 75 74 6f 72 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e | ssExecutor;.use.Symfony\Componen |
a55c0 | 74 5c 50 72 6f 63 65 73 73 5c 45 78 65 63 75 74 61 62 6c 65 46 69 6e 64 65 72 3b 0a 75 73 65 20 | t\Process\ExecutableFinder;.use. |
a55e0 | 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 50 72 6f 63 65 73 73 5c 50 72 6f 63 65 73 | Symfony\Component\Process\Proces |
a5600 | 73 3b 0a 75 73 65 20 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 50 72 6f 6d 69 73 65 49 6e 74 65 | s;.use.React\Promise\PromiseInte |
a5620 | 72 66 61 63 65 3b 0a 75 73 65 20 5a 69 70 41 72 63 68 69 76 65 3b 0a 0a 0a 0a 0a 63 6c 61 73 73 | rface;.use.ZipArchive;.....class |
a5640 | 20 5a 69 70 44 6f 77 6e 6c 6f 61 64 65 72 20 65 78 74 65 6e 64 73 20 41 72 63 68 69 76 65 44 6f | .ZipDownloader.extends.ArchiveDo |
a5660 | 77 6e 6c 6f 61 64 65 72 0a 7b 0a 0a 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 24 75 6e 7a 69 | wnloader.{..private.static.$unzi |
a5680 | 70 43 6f 6d 6d 61 6e 64 73 3b 0a 0a 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 24 68 61 73 5a | pCommands;..private.static.$hasZ |
a56a0 | 69 70 41 72 63 68 69 76 65 3b 0a 0a 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 24 69 73 57 69 | ipArchive;..private.static.$isWi |
a56c0 | 6e 64 6f 77 73 3b 0a 0a 0a 70 72 69 76 61 74 65 20 24 7a 69 70 41 72 63 68 69 76 65 4f 62 6a 65 | ndows;...private.$zipArchiveObje |
a56e0 | 63 74 3b 20 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 64 6f 77 6e 6c 6f 61 | ct;......public.function.downloa |
a5700 | 64 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 | d(PackageInterface.$package,.str |
a5720 | 69 6e 67 20 24 70 61 74 68 2c 20 3f 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 72 | ing.$path,.?PackageInterface.$pr |
a5740 | 65 76 50 61 63 6b 61 67 65 20 3d 20 6e 75 6c 6c 2c 20 62 6f 6f 6c 20 24 6f 75 74 70 75 74 20 3d | evPackage.=.null,.bool.$output.= |
a5760 | 20 74 72 75 65 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 69 66 20 28 6e | .true):.PromiseInterface.{.if.(n |
a5780 | 75 6c 6c 20 3d 3d 3d 20 73 65 6c 66 3a 3a 24 75 6e 7a 69 70 43 6f 6d 6d 61 6e 64 73 29 20 7b 0a | ull.===.self::$unzipCommands).{. |
a57a0 | 73 65 6c 66 3a 3a 24 75 6e 7a 69 70 43 6f 6d 6d 61 6e 64 73 20 3d 20 5b 5d 3b 0a 24 66 69 6e 64 | self::$unzipCommands.=.[];.$find |
a57c0 | 65 72 20 3d 20 6e 65 77 20 45 78 65 63 75 74 61 62 6c 65 46 69 6e 64 65 72 3b 0a 69 66 20 28 50 | er.=.new.ExecutableFinder;.if.(P |
a57e0 | 6c 61 74 66 6f 72 6d 3a 3a 69 73 57 69 6e 64 6f 77 73 28 29 20 26 26 20 28 24 63 6d 64 20 3d 20 | latform::isWindows().&&.($cmd.=. |
a5800 | 24 66 69 6e 64 65 72 2d 3e 66 69 6e 64 28 27 37 7a 27 2c 20 6e 75 6c 6c 2c 20 5b 27 43 3a 5c 50 | $finder->find('7z',.null,.['C:\P |
a5820 | 72 6f 67 72 61 6d 20 46 69 6c 65 73 5c 37 2d 5a 69 70 27 5d 29 29 29 20 7b 0a 73 65 6c 66 3a 3a | rogram.Files\7-Zip']))).{.self:: |
a5840 | 24 75 6e 7a 69 70 43 6f 6d 6d 61 6e 64 73 5b 5d 20 3d 20 5b 27 37 7a 27 2c 20 50 72 6f 63 65 73 | $unzipCommands[].=.['7z',.Proces |
a5860 | 73 45 78 65 63 75 74 6f 72 3a 3a 65 73 63 61 70 65 28 24 63 6d 64 29 2e 27 20 78 20 2d 62 62 30 | sExecutor::escape($cmd).'.x.-bb0 |
a5880 | 20 2d 79 20 25 73 20 2d 6f 25 73 27 5d 3b 0a 7d 0a 69 66 20 28 24 63 6d 64 20 3d 20 24 66 69 6e | .-y.%s.-o%s'];.}.if.($cmd.=.$fin |
a58a0 | 64 65 72 2d 3e 66 69 6e 64 28 27 75 6e 7a 69 70 27 29 29 20 7b 0a 73 65 6c 66 3a 3a 24 75 6e 7a | der->find('unzip')).{.self::$unz |
a58c0 | 69 70 43 6f 6d 6d 61 6e 64 73 5b 5d 20 3d 20 5b 27 75 6e 7a 69 70 27 2c 20 50 72 6f 63 65 73 73 | ipCommands[].=.['unzip',.Process |
a58e0 | 45 78 65 63 75 74 6f 72 3a 3a 65 73 63 61 70 65 28 24 63 6d 64 29 2e 27 20 2d 71 71 20 25 73 20 | Executor::escape($cmd).'.-qq.%s. |
a5900 | 2d 64 20 25 73 27 5d 3b 0a 7d 0a 69 66 20 28 21 50 6c 61 74 66 6f 72 6d 3a 3a 69 73 57 69 6e 64 | -d.%s'];.}.if.(!Platform::isWind |
a5920 | 6f 77 73 28 29 20 26 26 20 28 24 63 6d 64 20 3d 20 24 66 69 6e 64 65 72 2d 3e 66 69 6e 64 28 27 | ows().&&.($cmd.=.$finder->find(' |
a5940 | 37 7a 27 29 29 29 20 7b 20 0a 73 65 6c 66 3a 3a 24 75 6e 7a 69 70 43 6f 6d 6d 61 6e 64 73 5b 5d | 7z'))).{..self::$unzipCommands[] |
a5960 | 20 3d 20 5b 27 37 7a 27 2c 20 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3a 3a 65 73 63 61 70 | .=.['7z',.ProcessExecutor::escap |
a5980 | 65 28 24 63 6d 64 29 2e 27 20 78 20 2d 62 62 30 20 2d 79 20 25 73 20 2d 6f 25 73 27 5d 3b 0a 7d | e($cmd).'.x.-bb0.-y.%s.-o%s'];.} |
a59a0 | 0a 69 66 20 28 21 50 6c 61 74 66 6f 72 6d 3a 3a 69 73 57 69 6e 64 6f 77 73 28 29 20 26 26 20 28 | .if.(!Platform::isWindows().&&.( |
a59c0 | 24 63 6d 64 20 3d 20 24 66 69 6e 64 65 72 2d 3e 66 69 6e 64 28 27 37 7a 7a 27 29 29 29 20 7b 20 | $cmd.=.$finder->find('7zz'))).{. |
a59e0 | 0a 73 65 6c 66 3a 3a 24 75 6e 7a 69 70 43 6f 6d 6d 61 6e 64 73 5b 5d 20 3d 20 5b 27 37 7a 7a 27 | .self::$unzipCommands[].=.['7zz' |
a5a00 | 2c 20 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3a 3a 65 73 63 61 70 65 28 24 63 6d 64 29 2e | ,.ProcessExecutor::escape($cmd). |
a5a20 | 27 20 78 20 2d 62 62 30 20 2d 79 20 25 73 20 2d 6f 25 73 27 5d 3b 0a 7d 0a 7d 0a 0a 24 70 72 6f | '.x.-bb0.-y.%s.-o%s'];.}.}..$pro |
a5a40 | 63 4f 70 65 6e 4d 69 73 73 69 6e 67 20 3d 20 66 61 6c 73 65 3b 0a 69 66 20 28 21 66 75 6e 63 74 | cOpenMissing.=.false;.if.(!funct |
a5a60 | 69 6f 6e 5f 65 78 69 73 74 73 28 27 70 72 6f 63 5f 6f 70 65 6e 27 29 29 20 7b 0a 73 65 6c 66 3a | ion_exists('proc_open')).{.self: |
a5a80 | 3a 24 75 6e 7a 69 70 43 6f 6d 6d 61 6e 64 73 20 3d 20 5b 5d 3b 0a 24 70 72 6f 63 4f 70 65 6e 4d | :$unzipCommands.=.[];.$procOpenM |
a5aa0 | 69 73 73 69 6e 67 20 3d 20 74 72 75 65 3b 0a 7d 0a 0a 69 66 20 28 6e 75 6c 6c 20 3d 3d 3d 20 73 | issing.=.true;.}..if.(null.===.s |
a5ac0 | 65 6c 66 3a 3a 24 68 61 73 5a 69 70 41 72 63 68 69 76 65 29 20 7b 0a 73 65 6c 66 3a 3a 24 68 61 | elf::$hasZipArchive).{.self::$ha |
a5ae0 | 73 5a 69 70 41 72 63 68 69 76 65 20 3d 20 63 6c 61 73 73 5f 65 78 69 73 74 73 28 27 5a 69 70 41 | sZipArchive.=.class_exists('ZipA |
a5b00 | 72 63 68 69 76 65 27 29 3b 0a 7d 0a 0a 69 66 20 28 21 73 65 6c 66 3a 3a 24 68 61 73 5a 69 70 41 | rchive');.}..if.(!self::$hasZipA |
a5b20 | 72 63 68 69 76 65 20 26 26 20 21 73 65 6c 66 3a 3a 24 75 6e 7a 69 70 43 6f 6d 6d 61 6e 64 73 29 | rchive.&&.!self::$unzipCommands) |
a5b40 | 20 7b 0a 0a 24 69 6e 69 4d 65 73 73 61 67 65 20 3d 20 49 6e 69 48 65 6c 70 65 72 3a 3a 67 65 74 | .{..$iniMessage.=.IniHelper::get |
a5b60 | 4d 65 73 73 61 67 65 28 29 3b 0a 69 66 20 28 24 70 72 6f 63 4f 70 65 6e 4d 69 73 73 69 6e 67 29 | Message();.if.($procOpenMissing) |
a5b80 | 20 7b 0a 24 65 72 72 6f 72 20 3d 20 22 54 68 65 20 7a 69 70 20 65 78 74 65 6e 73 69 6f 6e 20 69 | .{.$error.=."The.zip.extension.i |
a5ba0 | 73 20 6d 69 73 73 69 6e 67 20 61 6e 64 20 75 6e 7a 69 70 2f 37 7a 20 63 6f 6d 6d 61 6e 64 73 20 | s.missing.and.unzip/7z.commands. |
a5bc0 | 63 61 6e 6e 6f 74 20 62 65 20 63 61 6c 6c 65 64 20 61 73 20 70 72 6f 63 5f 6f 70 65 6e 20 69 73 | cannot.be.called.as.proc_open.is |
a5be0 | 20 64 69 73 61 62 6c 65 64 2c 20 73 6b 69 70 70 69 6e 67 2e 5c 6e 22 20 2e 20 24 69 6e 69 4d 65 | .disabled,.skipping.\n"...$iniMe |
a5c00 | 73 73 61 67 65 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 65 72 72 6f 72 20 3d 20 22 54 68 65 20 7a 69 | ssage;.}.else.{.$error.=."The.zi |
a5c20 | 70 20 65 78 74 65 6e 73 69 6f 6e 20 61 6e 64 20 75 6e 7a 69 70 2f 37 7a 20 63 6f 6d 6d 61 6e 64 | p.extension.and.unzip/7z.command |
a5c40 | 73 20 61 72 65 20 62 6f 74 68 20 6d 69 73 73 69 6e 67 2c 20 73 6b 69 70 70 69 6e 67 2e 5c 6e 22 | s.are.both.missing,.skipping.\n" |
a5c60 | 20 2e 20 24 69 6e 69 4d 65 73 73 61 67 65 3b 0a 7d 0a 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 | ...$iniMessage;.}..throw.new.\Ru |
a5c80 | 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 24 65 72 72 6f 72 29 3b 0a 7d 0a 0a 69 66 20 28 6e | ntimeException($error);.}..if.(n |
a5ca0 | 75 6c 6c 20 3d 3d 3d 20 73 65 6c 66 3a 3a 24 69 73 57 69 6e 64 6f 77 73 29 20 7b 0a 73 65 6c 66 | ull.===.self::$isWindows).{.self |
a5cc0 | 3a 3a 24 69 73 57 69 6e 64 6f 77 73 20 3d 20 50 6c 61 74 66 6f 72 6d 3a 3a 69 73 57 69 6e 64 6f | ::$isWindows.=.Platform::isWindo |
a5ce0 | 77 73 28 29 3b 0a 0a 69 66 20 28 21 73 65 6c 66 3a 3a 24 69 73 57 69 6e 64 6f 77 73 20 26 26 20 | ws();..if.(!self::$isWindows.&&. |
a5d00 | 21 73 65 6c 66 3a 3a 24 75 6e 7a 69 70 43 6f 6d 6d 61 6e 64 73 29 20 7b 0a 69 66 20 28 24 70 72 | !self::$unzipCommands).{.if.($pr |
a5d20 | 6f 63 4f 70 65 6e 4d 69 73 73 69 6e 67 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 | ocOpenMissing).{.$this->io->writ |
a5d40 | 65 45 72 72 6f 72 28 22 3c 77 61 72 6e 69 6e 67 3e 70 72 6f 63 5f 6f 70 65 6e 20 69 73 20 64 69 | eError("<warning>proc_open.is.di |
a5d60 | 73 61 62 6c 65 64 20 73 6f 20 27 75 6e 7a 69 70 27 20 61 6e 64 20 27 37 7a 27 20 63 6f 6d 6d 61 | sabled.so.'unzip'.and.'7z'.comma |
a5d80 | 6e 64 73 20 63 61 6e 6e 6f 74 20 62 65 20 75 73 65 64 2c 20 7a 69 70 20 66 69 6c 65 73 20 61 72 | nds.cannot.be.used,.zip.files.ar |
a5da0 | 65 20 62 65 69 6e 67 20 75 6e 70 61 63 6b 65 64 20 75 73 69 6e 67 20 74 68 65 20 50 48 50 20 7a | e.being.unpacked.using.the.PHP.z |
a5dc0 | 69 70 20 65 78 74 65 6e 73 69 6f 6e 2e 3c 2f 77 61 72 6e 69 6e 67 3e 22 29 3b 0a 24 74 68 69 73 | ip.extension.</warning>");.$this |
a5de0 | 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 22 3c 77 61 72 6e 69 6e 67 3e 54 68 69 73 20 | ->io->writeError("<warning>This. |
a5e00 | 6d 61 79 20 63 61 75 73 65 20 69 6e 76 61 6c 69 64 20 72 65 70 6f 72 74 73 20 6f 66 20 63 6f 72 | may.cause.invalid.reports.of.cor |
a5e20 | 72 75 70 74 65 64 20 61 72 63 68 69 76 65 73 2e 20 42 65 73 69 64 65 73 2c 20 61 6e 79 20 55 4e | rupted.archives..Besides,.any.UN |
a5e40 | 49 58 20 70 65 72 6d 69 73 73 69 6f 6e 73 20 28 65 2e 67 2e 20 65 78 65 63 75 74 61 62 6c 65 29 | IX.permissions.(e.g..executable) |
a5e60 | 20 64 65 66 69 6e 65 64 20 69 6e 20 74 68 65 20 61 72 63 68 69 76 65 73 20 77 69 6c 6c 20 62 65 | .defined.in.the.archives.will.be |
a5e80 | 20 6c 6f 73 74 2e 3c 2f 77 61 72 6e 69 6e 67 3e 22 29 3b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 | .lost.</warning>");.$this->io->w |
a5ea0 | 72 69 74 65 45 72 72 6f 72 28 22 3c 77 61 72 6e 69 6e 67 3e 45 6e 61 62 6c 69 6e 67 20 70 72 6f | riteError("<warning>Enabling.pro |
a5ec0 | 63 5f 6f 70 65 6e 20 61 6e 64 20 69 6e 73 74 61 6c 6c 69 6e 67 20 27 75 6e 7a 69 70 27 20 6f 72 | c_open.and.installing.'unzip'.or |
a5ee0 | 20 27 37 7a 27 20 28 32 31 2e 30 31 2b 29 20 6d 61 79 20 72 65 6d 65 64 69 61 74 65 20 74 68 65 | .'7z'.(21.01+).may.remediate.the |
a5f00 | 6d 2e 3c 2f 77 61 72 6e 69 6e 67 3e 22 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 74 68 69 73 2d 3e | m.</warning>");.}.else.{.$this-> |
a5f20 | 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 22 3c 77 61 72 6e 69 6e 67 3e 41 73 20 74 68 65 72 | io->writeError("<warning>As.ther |
a5f40 | 65 20 69 73 20 6e 6f 20 27 75 6e 7a 69 70 27 20 6e 6f 72 20 27 37 7a 27 20 63 6f 6d 6d 61 6e 64 | e.is.no.'unzip'.nor.'7z'.command |
a5f60 | 20 69 6e 73 74 61 6c 6c 65 64 20 7a 69 70 20 66 69 6c 65 73 20 61 72 65 20 62 65 69 6e 67 20 75 | .installed.zip.files.are.being.u |
a5f80 | 6e 70 61 63 6b 65 64 20 75 73 69 6e 67 20 74 68 65 20 50 48 50 20 7a 69 70 20 65 78 74 65 6e 73 | npacked.using.the.PHP.zip.extens |
a5fa0 | 69 6f 6e 2e 3c 2f 77 61 72 6e 69 6e 67 3e 22 29 3b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 | ion.</warning>");.$this->io->wri |
a5fc0 | 74 65 45 72 72 6f 72 28 22 3c 77 61 72 6e 69 6e 67 3e 54 68 69 73 20 6d 61 79 20 63 61 75 73 65 | teError("<warning>This.may.cause |
a5fe0 | 20 69 6e 76 61 6c 69 64 20 72 65 70 6f 72 74 73 20 6f 66 20 63 6f 72 72 75 70 74 65 64 20 61 72 | .invalid.reports.of.corrupted.ar |
a6000 | 63 68 69 76 65 73 2e 20 42 65 73 69 64 65 73 2c 20 61 6e 79 20 55 4e 49 58 20 70 65 72 6d 69 73 | chives..Besides,.any.UNIX.permis |
a6020 | 73 69 6f 6e 73 20 28 65 2e 67 2e 20 65 78 65 63 75 74 61 62 6c 65 29 20 64 65 66 69 6e 65 64 20 | sions.(e.g..executable).defined. |
a6040 | 69 6e 20 74 68 65 20 61 72 63 68 69 76 65 73 20 77 69 6c 6c 20 62 65 20 6c 6f 73 74 2e 3c 2f 77 | in.the.archives.will.be.lost.</w |
a6060 | 61 72 6e 69 6e 67 3e 22 29 3b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 | arning>");.$this->io->writeError |
a6080 | 28 22 3c 77 61 72 6e 69 6e 67 3e 49 6e 73 74 61 6c 6c 69 6e 67 20 27 75 6e 7a 69 70 27 20 6f 72 | ("<warning>Installing.'unzip'.or |
a60a0 | 20 27 37 7a 27 20 28 32 31 2e 30 31 2b 29 20 6d 61 79 20 72 65 6d 65 64 69 61 74 65 20 74 68 65 | .'7z'.(21.01+).may.remediate.the |
a60c0 | 6d 2e 3c 2f 77 61 72 6e 69 6e 67 3e 22 29 3b 0a 7d 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 70 61 | m.</warning>");.}.}.}..return.pa |
a60e0 | 72 65 6e 74 3a 3a 64 6f 77 6e 6c 6f 61 64 28 24 70 61 63 6b 61 67 65 2c 20 24 70 61 74 68 2c 20 | rent::download($package,.$path,. |
a6100 | 24 70 72 65 76 50 61 63 6b 61 67 65 2c 20 24 6f 75 74 70 75 74 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a | $prevPackage,.$output);.}....... |
a6120 | 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 65 78 74 72 61 63 74 57 69 74 68 53 79 73 | .private.function.extractWithSys |
a6140 | 74 65 6d 55 6e 7a 69 70 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 | temUnzip(PackageInterface.$packa |
a6160 | 67 65 2c 20 73 74 72 69 6e 67 20 24 66 69 6c 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 29 3a | ge,.string.$file,.string.$path): |
a6180 | 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 73 74 61 74 69 63 20 24 77 61 72 6e | .PromiseInterface.{.static.$warn |
a61a0 | 65 64 37 5a 69 70 4c 69 6e 75 78 20 3d 20 66 61 6c 73 65 3b 0a 0a 0a 24 69 73 4c 61 73 74 43 68 | ed7ZipLinux.=.false;...$isLastCh |
a61c0 | 61 6e 63 65 20 3d 20 21 73 65 6c 66 3a 3a 24 68 61 73 5a 69 70 41 72 63 68 69 76 65 3b 0a 0a 69 | ance.=.!self::$hasZipArchive;..i |
a61e0 | 66 20 28 21 73 65 6c 66 3a 3a 24 75 6e 7a 69 70 43 6f 6d 6d 61 6e 64 73 29 20 7b 0a 0a 0a 72 65 | f.(!self::$unzipCommands).{...re |
a6200 | 74 75 72 6e 20 24 74 68 69 73 2d 3e 65 78 74 72 61 63 74 57 69 74 68 5a 69 70 41 72 63 68 69 76 | turn.$this->extractWithZipArchiv |
a6220 | 65 28 24 70 61 63 6b 61 67 65 2c 20 24 66 69 6c 65 2c 20 24 70 61 74 68 29 3b 0a 7d 0a 0a 24 63 | e($package,.$file,.$path);.}..$c |
a6240 | 6f 6d 6d 61 6e 64 53 70 65 63 20 3d 20 72 65 73 65 74 28 73 65 6c 66 3a 3a 24 75 6e 7a 69 70 43 | ommandSpec.=.reset(self::$unzipC |
a6260 | 6f 6d 6d 61 6e 64 73 29 3b 0a 24 63 6f 6d 6d 61 6e 64 20 3d 20 73 70 72 69 6e 74 66 28 24 63 6f | ommands);.$command.=.sprintf($co |
a6280 | 6d 6d 61 6e 64 53 70 65 63 5b 31 5d 2c 20 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3a 3a 65 | mmandSpec[1],.ProcessExecutor::e |
a62a0 | 73 63 61 70 65 28 24 66 69 6c 65 29 2c 20 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3a 3a 65 | scape($file),.ProcessExecutor::e |
a62c0 | 73 63 61 70 65 28 24 70 61 74 68 29 29 3b 0a 0a 0a 69 66 20 28 50 6c 61 74 66 6f 72 6d 3a 3a 69 | scape($path));...if.(Platform::i |
a62e0 | 73 57 69 6e 64 6f 77 73 28 29 29 20 7b 0a 24 63 6f 6d 6d 61 6e 64 20 3d 20 73 70 72 69 6e 74 66 | sWindows()).{.$command.=.sprintf |
a6300 | 28 24 63 6f 6d 6d 61 6e 64 53 70 65 63 5b 31 5d 2c 20 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f | ($commandSpec[1],.ProcessExecuto |
a6320 | 72 3a 3a 65 73 63 61 70 65 28 73 74 72 74 72 28 24 66 69 6c 65 2c 20 27 2f 27 2c 20 27 5c 5c 27 | r::escape(strtr($file,.'/',.'\\' |
a6340 | 29 29 2c 20 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3a 3a 65 73 63 61 70 65 28 73 74 72 74 | )),.ProcessExecutor::escape(strt |
a6360 | 72 28 24 70 61 74 68 2c 20 27 2f 27 2c 20 27 5c 5c 27 29 29 29 3b 0a 7d 0a 0a 24 65 78 65 63 75 | r($path,.'/',.'\\')));.}..$execu |
a6380 | 74 61 62 6c 65 20 3d 20 24 63 6f 6d 6d 61 6e 64 53 70 65 63 5b 30 5d 3b 0a 69 66 20 28 21 24 77 | table.=.$commandSpec[0];.if.(!$w |
a63a0 | 61 72 6e 65 64 37 5a 69 70 4c 69 6e 75 78 20 26 26 20 21 50 6c 61 74 66 6f 72 6d 3a 3a 69 73 57 | arned7ZipLinux.&&.!Platform::isW |
a63c0 | 69 6e 64 6f 77 73 28 29 20 26 26 20 69 6e 5f 61 72 72 61 79 28 24 65 78 65 63 75 74 61 62 6c 65 | indows().&&.in_array($executable |
a63e0 | 2c 20 5b 27 37 7a 27 2c 20 27 37 7a 7a 27 5d 2c 20 74 72 75 65 29 29 20 7b 0a 24 77 61 72 6e 65 | ,.['7z',.'7zz'],.true)).{.$warne |
a6400 | 64 37 5a 69 70 4c 69 6e 75 78 20 3d 20 74 72 75 65 3b 0a 69 66 20 28 30 20 3d 3d 3d 20 24 74 68 | d7ZipLinux.=.true;.if.(0.===.$th |
a6420 | 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 65 78 65 63 75 74 65 28 24 65 78 65 63 75 74 61 62 6c 65 | is->process->execute($executable |
a6440 | 2c 20 24 6f 75 74 70 75 74 29 29 20 7b 0a 69 66 20 28 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 | ,.$output)).{.if.(Preg::isMatch( |
a6460 | 27 7b 5e 5c 73 2a 37 2d 5a 69 70 28 3f 3a 20 5c 5b 36 34 5c 5d 29 3f 20 28 5b 30 2d 39 2e 5d 2b | '{^\s*7-Zip(?:.\[64\])?.([0-9.]+ |
a6480 | 29 7d 27 2c 20 24 6f 75 74 70 75 74 2c 20 24 6d 61 74 63 68 29 20 26 26 20 76 65 72 73 69 6f 6e | )}',.$output,.$match).&&.version |
a64a0 | 5f 63 6f 6d 70 61 72 65 28 24 6d 61 74 63 68 5b 31 5d 2c 20 27 32 31 2e 30 31 27 2c 20 27 3c 27 | _compare($match[1],.'21.01',.'<' |
a64c0 | 29 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 20 20 20 20 | )).{.$this->io->writeError('.... |
a64e0 | 3c 77 61 72 6e 69 6e 67 3e 55 6e 7a 69 70 70 69 6e 67 20 75 73 69 6e 67 20 27 2e 24 65 78 65 63 | <warning>Unzipping.using.'.$exec |
a6500 | 75 74 61 62 6c 65 2e 27 20 27 2e 24 6d 61 74 63 68 5b 31 5d 2e 27 20 6d 61 79 20 72 65 73 75 6c | utable.'.'.$match[1].'.may.resul |
a6520 | 74 20 69 6e 20 69 6e 63 6f 72 72 65 63 74 20 66 69 6c 65 20 70 65 72 6d 69 73 73 69 6f 6e 73 2e | t.in.incorrect.file.permissions. |
a6540 | 20 49 6e 73 74 61 6c 6c 20 27 2e 24 65 78 65 63 75 74 61 62 6c 65 2e 27 20 32 31 2e 30 31 2b 20 | .Install.'.$executable.'.21.01+. |
a6560 | 6f 72 20 75 6e 7a 69 70 20 74 6f 20 65 6e 73 75 72 65 20 79 6f 75 20 67 65 74 20 63 6f 72 72 65 | or.unzip.to.ensure.you.get.corre |
a6580 | 63 74 20 70 65 72 6d 69 73 73 69 6f 6e 73 2e 3c 2f 77 61 72 6e 69 6e 67 3e 27 29 3b 0a 7d 0a 7d | ct.permissions.</warning>');.}.} |
a65a0 | 0a 7d 0a 0a 24 69 6f 20 3d 20 24 74 68 69 73 2d 3e 69 6f 3b 0a 24 74 72 79 46 61 6c 6c 62 61 63 | .}..$io.=.$this->io;.$tryFallbac |
a65c0 | 6b 20 3d 20 66 75 6e 63 74 69 6f 6e 20 28 5c 54 68 72 6f 77 61 62 6c 65 20 24 70 72 6f 63 65 73 | k.=.function.(\Throwable.$proces |
a65e0 | 73 45 72 72 6f 72 29 20 75 73 65 20 28 24 69 73 4c 61 73 74 43 68 61 6e 63 65 2c 20 24 69 6f 2c | sError).use.($isLastChance,.$io, |
a6600 | 20 24 66 69 6c 65 2c 20 24 70 61 74 68 2c 20 24 70 61 63 6b 61 67 65 2c 20 24 65 78 65 63 75 74 | .$file,.$path,.$package,.$execut |
a6620 | 61 62 6c 65 29 3a 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 50 72 6f 6d 69 73 65 49 6e 74 | able):.\React\Promise\PromiseInt |
a6640 | 65 72 66 61 63 65 20 7b 0a 69 66 20 28 24 69 73 4c 61 73 74 43 68 61 6e 63 65 29 20 7b 0a 74 68 | erface.{.if.($isLastChance).{.th |
a6660 | 72 6f 77 20 24 70 72 6f 63 65 73 73 45 72 72 6f 72 3b 0a 7d 0a 0a 69 66 20 28 21 69 73 5f 66 69 | row.$processError;.}..if.(!is_fi |
a6680 | 6c 65 28 24 66 69 6c 65 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 20 20 | le($file)).{.$io->writeError('.. |
a66a0 | 20 20 3c 77 61 72 6e 69 6e 67 3e 27 2e 24 70 72 6f 63 65 73 73 45 72 72 6f 72 2d 3e 67 65 74 4d | ..<warning>'.$processError->getM |
a66c0 | 65 73 73 61 67 65 28 29 2e 27 3c 2f 77 61 72 6e 69 6e 67 3e 27 29 3b 0a 24 69 6f 2d 3e 77 72 69 | essage().'</warning>');.$io->wri |
a66e0 | 74 65 45 72 72 6f 72 28 27 20 20 20 20 3c 77 61 72 6e 69 6e 67 3e 54 68 69 73 20 6d 6f 73 74 20 | teError('....<warning>This.most. |
a6700 | 6c 69 6b 65 6c 79 20 69 73 20 64 75 65 20 74 6f 20 61 20 63 75 73 74 6f 6d 20 69 6e 73 74 61 6c | likely.is.due.to.a.custom.instal |
a6720 | 6c 65 72 20 70 6c 75 67 69 6e 20 6e 6f 74 20 68 61 6e 64 6c 69 6e 67 20 74 68 65 20 72 65 74 75 | ler.plugin.not.handling.the.retu |
a6740 | 72 6e 65 64 20 50 72 6f 6d 69 73 65 20 66 72 6f 6d 20 74 68 65 20 64 6f 77 6e 6c 6f 61 64 65 72 | rned.Promise.from.the.downloader |
a6760 | 3c 2f 77 61 72 6e 69 6e 67 3e 27 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 20 | </warning>');.$io->writeError('. |
a6780 | 20 20 20 3c 77 61 72 6e 69 6e 67 3e 53 65 65 20 68 74 74 70 73 3a 2f 2f 67 69 74 68 75 62 2e 63 | ...<warning>See.https://github.c |
a67a0 | 6f 6d 2f 63 6f 6d 70 6f 73 65 72 2f 69 6e 73 74 61 6c 6c 65 72 73 2f 63 6f 6d 6d 69 74 2f 35 30 | om/composer/installers/commit/50 |
a67c0 | 30 36 64 30 63 32 38 37 33 30 61 64 65 32 33 33 61 38 66 34 32 65 63 33 31 61 63 36 38 66 62 31 | 06d0c28730ade233a8f42ec31ac68fb1 |
a67e0 | 63 35 63 39 62 62 20 66 6f 72 20 61 6e 20 65 78 61 6d 70 6c 65 20 66 69 78 3c 2f 77 61 72 6e 69 | c5c9bb.for.an.example.fix</warni |
a6800 | 6e 67 3e 27 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 | ng>');.}.else.{.$io->writeError( |
a6820 | 27 20 20 20 20 3c 77 61 72 6e 69 6e 67 3e 27 2e 24 70 72 6f 63 65 73 73 45 72 72 6f 72 2d 3e 67 | '....<warning>'.$processError->g |
a6840 | 65 74 4d 65 73 73 61 67 65 28 29 2e 27 3c 2f 77 61 72 6e 69 6e 67 3e 27 29 3b 0a 24 69 6f 2d 3e | etMessage().'</warning>');.$io-> |
a6860 | 77 72 69 74 65 45 72 72 6f 72 28 27 20 20 20 20 54 68 65 20 61 72 63 68 69 76 65 20 6d 61 79 20 | writeError('....The.archive.may. |
a6880 | 63 6f 6e 74 61 69 6e 20 69 64 65 6e 74 69 63 61 6c 20 66 69 6c 65 20 6e 61 6d 65 73 20 77 69 74 | contain.identical.file.names.wit |
a68a0 | 68 20 64 69 66 66 65 72 65 6e 74 20 63 61 70 69 74 61 6c 69 7a 61 74 69 6f 6e 20 28 77 68 69 63 | h.different.capitalization.(whic |
a68c0 | 68 20 66 61 69 6c 73 20 6f 6e 20 63 61 73 65 20 69 6e 73 65 6e 73 69 74 69 76 65 20 66 69 6c 65 | h.fails.on.case.insensitive.file |
a68e0 | 73 79 73 74 65 6d 73 29 27 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 20 20 20 | systems)');.$io->writeError('... |
a6900 | 20 55 6e 7a 69 70 20 77 69 74 68 20 27 2e 24 65 78 65 63 75 74 61 62 6c 65 2e 27 20 63 6f 6d 6d | .Unzip.with.'.$executable.'.comm |
a6920 | 61 6e 64 20 66 61 69 6c 65 64 2c 20 66 61 6c 6c 69 6e 67 20 62 61 63 6b 20 74 6f 20 5a 69 70 41 | and.failed,.falling.back.to.ZipA |
a6940 | 72 63 68 69 76 65 20 63 6c 61 73 73 27 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d | rchive.class');.}..return.$this- |
a6960 | 3e 65 78 74 72 61 63 74 57 69 74 68 5a 69 70 41 72 63 68 69 76 65 28 24 70 61 63 6b 61 67 65 2c | >extractWithZipArchive($package, |
a6980 | 20 24 66 69 6c 65 2c 20 24 70 61 74 68 29 3b 0a 7d 3b 0a 0a 74 72 79 20 7b 0a 24 70 72 6f 6d 69 | .$file,.$path);.};..try.{.$promi |
a69a0 | 73 65 20 3d 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 65 78 65 63 75 74 65 41 73 79 6e | se.=.$this->process->executeAsyn |
a69c0 | 63 28 24 63 6f 6d 6d 61 6e 64 29 3b 0a 0a 72 65 74 75 72 6e 20 24 70 72 6f 6d 69 73 65 2d 3e 74 | c($command);..return.$promise->t |
a69e0 | 68 65 6e 28 66 75 6e 63 74 69 6f 6e 20 28 50 72 6f 63 65 73 73 20 24 70 72 6f 63 65 73 73 29 20 | hen(function.(Process.$process). |
a6a00 | 75 73 65 20 28 24 74 72 79 46 61 6c 6c 62 61 63 6b 2c 20 24 63 6f 6d 6d 61 6e 64 2c 20 24 70 61 | use.($tryFallback,.$command,.$pa |
a6a20 | 63 6b 61 67 65 2c 20 24 66 69 6c 65 29 20 7b 0a 69 66 20 28 21 24 70 72 6f 63 65 73 73 2d 3e 69 | ckage,.$file).{.if.(!$process->i |
a6a40 | 73 53 75 63 63 65 73 73 66 75 6c 28 29 29 20 7b 0a 69 66 20 28 69 73 73 65 74 28 24 74 68 69 73 | sSuccessful()).{.if.(isset($this |
a6a60 | 2d 3e 63 6c 65 61 6e 75 70 45 78 65 63 75 74 65 64 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e | ->cleanupExecuted[$package->getN |
a6a80 | 61 6d 65 28 29 5d 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 | ame()])).{.throw.new.\RuntimeExc |
a6aa0 | 65 70 74 69 6f 6e 28 27 46 61 69 6c 65 64 20 74 6f 20 65 78 74 72 61 63 74 20 27 2e 24 70 61 63 | eption('Failed.to.extract.'.$pac |
a6ac0 | 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 2e 27 20 61 73 20 74 68 65 20 69 6e 73 74 61 6c 6c | kage->getName().'.as.the.install |
a6ae0 | 61 74 69 6f 6e 20 77 61 73 20 61 62 6f 72 74 65 64 20 62 79 20 61 6e 6f 74 68 65 72 20 70 61 63 | ation.was.aborted.by.another.pac |
a6b00 | 6b 61 67 65 20 6f 70 65 72 61 74 69 6f 6e 2e 27 29 3b 0a 7d 0a 0a 24 6f 75 74 70 75 74 20 3d 20 | kage.operation.');.}..$output.=. |
a6b20 | 24 70 72 6f 63 65 73 73 2d 3e 67 65 74 45 72 72 6f 72 4f 75 74 70 75 74 28 29 3b 0a 24 6f 75 74 | $process->getErrorOutput();.$out |
a6b40 | 70 75 74 20 3d 20 73 74 72 5f 72 65 70 6c 61 63 65 28 27 2c 20 27 2e 24 66 69 6c 65 2e 27 2e 7a | put.=.str_replace(',.'.$file.'.z |
a6b60 | 69 70 20 6f 72 20 27 2e 24 66 69 6c 65 2e 27 2e 5a 49 50 27 2c 20 27 27 2c 20 24 6f 75 74 70 75 | ip.or.'.$file.'.ZIP',.'',.$outpu |
a6b80 | 74 29 3b 0a 0a 72 65 74 75 72 6e 20 24 74 72 79 46 61 6c 6c 62 61 63 6b 28 6e 65 77 20 5c 52 75 | t);..return.$tryFallback(new.\Ru |
a6ba0 | 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 46 61 69 6c 65 64 20 74 6f 20 65 78 74 72 61 63 | ntimeException('Failed.to.extrac |
a6bc0 | 74 20 27 2e 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 2e 27 3a 20 28 27 2e 24 70 | t.'.$package->getName().':.('.$p |
a6be0 | 72 6f 63 65 73 73 2d 3e 67 65 74 45 78 69 74 43 6f 64 65 28 29 2e 27 29 20 27 2e 24 63 6f 6d 6d | rocess->getExitCode().').'.$comm |
a6c00 | 61 6e 64 2e 22 5c 6e 5c 6e 22 2e 24 6f 75 74 70 75 74 29 29 3b 0a 7d 0a 7d 29 3b 0a 7d 20 63 61 | and."\n\n".$output));.}.});.}.ca |
a6c20 | 74 63 68 20 28 5c 54 68 72 6f 77 61 62 6c 65 20 24 65 29 20 7b 0a 72 65 74 75 72 6e 20 24 74 72 | tch.(\Throwable.$e).{.return.$tr |
a6c40 | 79 46 61 6c 6c 62 61 63 6b 28 24 65 29 3b 0a 7d 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 | yFallback($e);.}.}........privat |
a6c60 | 65 20 66 75 6e 63 74 69 6f 6e 20 65 78 74 72 61 63 74 57 69 74 68 5a 69 70 41 72 63 68 69 76 65 | e.function.extractWithZipArchive |
a6c80 | 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 | (PackageInterface.$package,.stri |
a6ca0 | 6e 67 20 24 66 69 6c 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 29 3a 20 50 72 6f 6d 69 73 65 | ng.$file,.string.$path):.Promise |
a6cc0 | 49 6e 74 65 72 66 61 63 65 0a 7b 0a 24 70 72 6f 63 65 73 73 45 72 72 6f 72 20 3d 20 6e 75 6c 6c | Interface.{.$processError.=.null |
a6ce0 | 3b 0a 24 7a 69 70 41 72 63 68 69 76 65 20 3d 20 24 74 68 69 73 2d 3e 7a 69 70 41 72 63 68 69 76 | ;.$zipArchive.=.$this->zipArchiv |
a6d00 | 65 4f 62 6a 65 63 74 20 3f 3a 20 6e 65 77 20 5a 69 70 41 72 63 68 69 76 65 28 29 3b 0a 0a 74 72 | eObject.?:.new.ZipArchive();..tr |
a6d20 | 79 20 7b 0a 69 66 20 28 21 66 69 6c 65 5f 65 78 69 73 74 73 28 24 66 69 6c 65 29 20 7c 7c 20 28 | y.{.if.(!file_exists($file).||.( |
a6d40 | 24 66 69 6c 65 73 69 7a 65 20 3d 20 66 69 6c 65 73 69 7a 65 28 24 66 69 6c 65 29 29 20 3d 3d 3d | $filesize.=.filesize($file)).=== |
a6d60 | 20 66 61 6c 73 65 20 7c 7c 20 24 66 69 6c 65 73 69 7a 65 20 3d 3d 3d 20 30 29 20 7b 0a 24 72 65 | .false.||.$filesize.===.0).{.$re |
a6d80 | 74 76 61 6c 20 3d 20 2d 31 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 72 65 74 76 61 6c 20 3d 20 24 7a | tval.=.-1;.}.else.{.$retval.=.$z |
a6da0 | 69 70 41 72 63 68 69 76 65 2d 3e 6f 70 65 6e 28 24 66 69 6c 65 29 3b 0a 7d 0a 69 66 20 28 74 72 | ipArchive->open($file);.}.if.(tr |
a6dc0 | 75 65 20 3d 3d 3d 20 24 72 65 74 76 61 6c 29 20 7b 0a 24 65 78 74 72 61 63 74 52 65 73 75 6c 74 | ue.===.$retval).{.$extractResult |
a6de0 | 20 3d 20 24 7a 69 70 41 72 63 68 69 76 65 2d 3e 65 78 74 72 61 63 74 54 6f 28 24 70 61 74 68 29 | .=.$zipArchive->extractTo($path) |
a6e00 | 3b 0a 0a 69 66 20 28 74 72 75 65 20 3d 3d 3d 20 24 65 78 74 72 61 63 74 52 65 73 75 6c 74 29 20 | ;..if.(true.===.$extractResult). |
a6e20 | 7b 0a 24 7a 69 70 41 72 63 68 69 76 65 2d 3e 63 6c 6f 73 65 28 29 3b 0a 0a 72 65 74 75 72 6e 20 | {.$zipArchive->close();..return. |
a6e40 | 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a | \React\Promise\resolve(null);.}. |
a6e60 | 0a 24 70 72 6f 63 65 73 73 45 72 72 6f 72 20 3d 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 | .$processError.=.new.\RuntimeExc |
a6e80 | 65 70 74 69 6f 6e 28 72 74 72 69 6d 28 22 54 68 65 72 65 20 77 61 73 20 61 6e 20 65 72 72 6f 72 | eption(rtrim("There.was.an.error |
a6ea0 | 20 65 78 74 72 61 63 74 69 6e 67 20 74 68 65 20 5a 49 50 20 66 69 6c 65 2c 20 69 74 20 69 73 20 | .extracting.the.ZIP.file,.it.is. |
a6ec0 | 65 69 74 68 65 72 20 63 6f 72 72 75 70 74 65 64 20 6f 72 20 75 73 69 6e 67 20 61 6e 20 69 6e 76 | either.corrupted.or.using.an.inv |
a6ee0 | 61 6c 69 64 20 66 6f 72 6d 61 74 2e 5c 6e 22 29 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 70 72 6f | alid.format.\n"));.}.else.{.$pro |
a6f00 | 63 65 73 73 45 72 72 6f 72 20 3d 20 6e 65 77 20 5c 55 6e 65 78 70 65 63 74 65 64 56 61 6c 75 65 | cessError.=.new.\UnexpectedValue |
a6f20 | 45 78 63 65 70 74 69 6f 6e 28 72 74 72 69 6d 28 24 74 68 69 73 2d 3e 67 65 74 45 72 72 6f 72 4d | Exception(rtrim($this->getErrorM |
a6f40 | 65 73 73 61 67 65 28 24 72 65 74 76 61 6c 2c 20 24 66 69 6c 65 29 2e 22 5c 6e 22 29 2c 20 24 72 | essage($retval,.$file)."\n"),.$r |
a6f60 | 65 74 76 61 6c 29 3b 0a 7d 0a 7d 20 63 61 74 63 68 20 28 5c 45 72 72 6f 72 45 78 63 65 70 74 69 | etval);.}.}.catch.(\ErrorExcepti |
a6f80 | 6f 6e 20 24 65 29 20 7b 0a 24 70 72 6f 63 65 73 73 45 72 72 6f 72 20 3d 20 6e 65 77 20 5c 52 75 | on.$e).{.$processError.=.new.\Ru |
a6fa0 | 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 54 68 65 20 61 72 63 68 69 76 65 20 6d 61 79 20 | ntimeException('The.archive.may. |
a6fc0 | 63 6f 6e 74 61 69 6e 20 69 64 65 6e 74 69 63 61 6c 20 66 69 6c 65 20 6e 61 6d 65 73 20 77 69 74 | contain.identical.file.names.wit |
a6fe0 | 68 20 64 69 66 66 65 72 65 6e 74 20 63 61 70 69 74 61 6c 69 7a 61 74 69 6f 6e 20 28 77 68 69 63 | h.different.capitalization.(whic |
a7000 | 68 20 66 61 69 6c 73 20 6f 6e 20 63 61 73 65 20 69 6e 73 65 6e 73 69 74 69 76 65 20 66 69 6c 65 | h.fails.on.case.insensitive.file |
a7020 | 73 79 73 74 65 6d 73 29 3a 20 27 2e 24 65 2d 3e 67 65 74 4d 65 73 73 61 67 65 28 29 2c 20 30 2c | systems):.'.$e->getMessage(),.0, |
a7040 | 20 24 65 29 3b 0a 7d 20 63 61 74 63 68 20 28 5c 54 68 72 6f 77 61 62 6c 65 20 24 65 29 20 7b 0a | .$e);.}.catch.(\Throwable.$e).{. |
a7060 | 24 70 72 6f 63 65 73 73 45 72 72 6f 72 20 3d 20 24 65 3b 0a 7d 0a 0a 74 68 72 6f 77 20 24 70 72 | $processError.=.$e;.}..throw.$pr |
a7080 | 6f 63 65 73 73 45 72 72 6f 72 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 | ocessError;.}........protected.f |
a70a0 | 75 6e 63 74 69 6f 6e 20 65 78 74 72 61 63 74 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 | unction.extract(PackageInterface |
a70c0 | 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 66 69 6c 65 2c 20 73 74 72 69 6e 67 20 | .$package,.string.$file,.string. |
a70e0 | 24 70 61 74 68 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 72 65 74 75 72 | $path):.PromiseInterface.{.retur |
a7100 | 6e 20 24 74 68 69 73 2d 3e 65 78 74 72 61 63 74 57 69 74 68 53 79 73 74 65 6d 55 6e 7a 69 70 28 | n.$this->extractWithSystemUnzip( |
a7120 | 24 70 61 63 6b 61 67 65 2c 20 24 66 69 6c 65 2c 20 24 70 61 74 68 29 3b 0a 7d 0a 0a 0a 0a 0a 70 | $package,.$file,.$path);.}.....p |
a7140 | 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 45 72 72 6f 72 4d 65 73 73 61 67 | rotected.function.getErrorMessag |
a7160 | 65 28 69 6e 74 20 24 72 65 74 76 61 6c 2c 20 73 74 72 69 6e 67 20 24 66 69 6c 65 29 3a 20 73 74 | e(int.$retval,.string.$file):.st |
a7180 | 72 69 6e 67 0a 7b 0a 73 77 69 74 63 68 20 28 24 72 65 74 76 61 6c 29 20 7b 0a 63 61 73 65 20 5a | ring.{.switch.($retval).{.case.Z |
a71a0 | 69 70 41 72 63 68 69 76 65 3a 3a 45 52 5f 45 58 49 53 54 53 3a 0a 72 65 74 75 72 6e 20 73 70 72 | ipArchive::ER_EXISTS:.return.spr |
a71c0 | 69 6e 74 66 28 22 46 69 6c 65 20 27 25 73 27 20 61 6c 72 65 61 64 79 20 65 78 69 73 74 73 2e 22 | intf("File.'%s'.already.exists." |
a71e0 | 2c 20 24 66 69 6c 65 29 3b 0a 63 61 73 65 20 5a 69 70 41 72 63 68 69 76 65 3a 3a 45 52 5f 49 4e | ,.$file);.case.ZipArchive::ER_IN |
a7200 | 43 4f 4e 53 3a 0a 72 65 74 75 72 6e 20 73 70 72 69 6e 74 66 28 22 5a 69 70 20 61 72 63 68 69 76 | CONS:.return.sprintf("Zip.archiv |
a7220 | 65 20 27 25 73 27 20 69 73 20 69 6e 63 6f 6e 73 69 73 74 65 6e 74 2e 22 2c 20 24 66 69 6c 65 29 | e.'%s'.is.inconsistent.",.$file) |
a7240 | 3b 0a 63 61 73 65 20 5a 69 70 41 72 63 68 69 76 65 3a 3a 45 52 5f 49 4e 56 41 4c 3a 0a 72 65 74 | ;.case.ZipArchive::ER_INVAL:.ret |
a7260 | 75 72 6e 20 73 70 72 69 6e 74 66 28 22 49 6e 76 61 6c 69 64 20 61 72 67 75 6d 65 6e 74 20 28 25 | urn.sprintf("Invalid.argument.(% |
a7280 | 73 29 22 2c 20 24 66 69 6c 65 29 3b 0a 63 61 73 65 20 5a 69 70 41 72 63 68 69 76 65 3a 3a 45 52 | s)",.$file);.case.ZipArchive::ER |
a72a0 | 5f 4d 45 4d 4f 52 59 3a 0a 72 65 74 75 72 6e 20 73 70 72 69 6e 74 66 28 22 4d 61 6c 6c 6f 63 20 | _MEMORY:.return.sprintf("Malloc. |
a72c0 | 66 61 69 6c 75 72 65 20 28 25 73 29 22 2c 20 24 66 69 6c 65 29 3b 0a 63 61 73 65 20 5a 69 70 41 | failure.(%s)",.$file);.case.ZipA |
a72e0 | 72 63 68 69 76 65 3a 3a 45 52 5f 4e 4f 45 4e 54 3a 0a 72 65 74 75 72 6e 20 73 70 72 69 6e 74 66 | rchive::ER_NOENT:.return.sprintf |
a7300 | 28 22 4e 6f 20 73 75 63 68 20 7a 69 70 20 66 69 6c 65 3a 20 27 25 73 27 22 2c 20 24 66 69 6c 65 | ("No.such.zip.file:.'%s'",.$file |
a7320 | 29 3b 0a 63 61 73 65 20 5a 69 70 41 72 63 68 69 76 65 3a 3a 45 52 5f 4e 4f 5a 49 50 3a 0a 72 65 | );.case.ZipArchive::ER_NOZIP:.re |
a7340 | 74 75 72 6e 20 73 70 72 69 6e 74 66 28 22 27 25 73 27 20 69 73 20 6e 6f 74 20 61 20 7a 69 70 20 | turn.sprintf("'%s'.is.not.a.zip. |
a7360 | 61 72 63 68 69 76 65 2e 22 2c 20 24 66 69 6c 65 29 3b 0a 63 61 73 65 20 5a 69 70 41 72 63 68 69 | archive.",.$file);.case.ZipArchi |
a7380 | 76 65 3a 3a 45 52 5f 4f 50 45 4e 3a 0a 72 65 74 75 72 6e 20 73 70 72 69 6e 74 66 28 22 43 61 6e | ve::ER_OPEN:.return.sprintf("Can |
a73a0 | 27 74 20 6f 70 65 6e 20 7a 69 70 20 66 69 6c 65 3a 20 25 73 22 2c 20 24 66 69 6c 65 29 3b 0a 63 | 't.open.zip.file:.%s",.$file);.c |
a73c0 | 61 73 65 20 5a 69 70 41 72 63 68 69 76 65 3a 3a 45 52 5f 52 45 41 44 3a 0a 72 65 74 75 72 6e 20 | ase.ZipArchive::ER_READ:.return. |
a73e0 | 73 70 72 69 6e 74 66 28 22 5a 69 70 20 72 65 61 64 20 65 72 72 6f 72 20 28 25 73 29 22 2c 20 24 | sprintf("Zip.read.error.(%s)",.$ |
a7400 | 66 69 6c 65 29 3b 0a 63 61 73 65 20 5a 69 70 41 72 63 68 69 76 65 3a 3a 45 52 5f 53 45 45 4b 3a | file);.case.ZipArchive::ER_SEEK: |
a7420 | 0a 72 65 74 75 72 6e 20 73 70 72 69 6e 74 66 28 22 5a 69 70 20 73 65 65 6b 20 65 72 72 6f 72 20 | .return.sprintf("Zip.seek.error. |
a7440 | 28 25 73 29 22 2c 20 24 66 69 6c 65 29 3b 0a 63 61 73 65 20 2d 31 3a 0a 72 65 74 75 72 6e 20 73 | (%s)",.$file);.case.-1:.return.s |
a7460 | 70 72 69 6e 74 66 28 22 27 25 73 27 20 69 73 20 61 20 63 6f 72 72 75 70 74 65 64 20 7a 69 70 20 | printf("'%s'.is.a.corrupted.zip. |
a7480 | 61 72 63 68 69 76 65 20 28 30 20 62 79 74 65 73 29 2c 20 74 72 79 20 61 67 61 69 6e 2e 22 2c 20 | archive.(0.bytes),.try.again.",. |
a74a0 | 24 66 69 6c 65 29 3b 0a 64 65 66 61 75 6c 74 3a 0a 72 65 74 75 72 6e 20 73 70 72 69 6e 74 66 28 | $file);.default:.return.sprintf( |
a74c0 | 22 27 25 73 27 20 69 73 20 6e 6f 74 20 61 20 76 61 6c 69 64 20 7a 69 70 20 61 72 63 68 69 76 65 | "'%s'.is.not.a.valid.zip.archive |
a74e0 | 2c 20 67 6f 74 20 65 72 72 6f 72 20 63 6f 64 65 3a 20 25 73 22 2c 20 24 66 69 6c 65 2c 20 24 72 | ,.got.error.code:.%s",.$file,.$r |
a7500 | 65 74 76 61 6c 29 3b 0a 7d 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 | etval);.}.}.}.<?php.declare(stri |
a7520 | 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 | ct_types=1);............namespac |
a7540 | 65 20 43 6f 6d 70 6f 73 65 72 5c 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 3b 0a 0a 0a 0a 0a | e.Composer\EventDispatcher;..... |
a7560 | 0a 0a 63 6c 61 73 73 20 45 76 65 6e 74 0a 7b 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 6e 61 | ..class.Event.{....protected.$na |
a7580 | 6d 65 3b 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 61 72 67 73 3b 0a 0a 0a 0a 0a 70 72 6f | me;.....protected.$args;.....pro |
a75a0 | 74 65 63 74 65 64 20 24 66 6c 61 67 73 3b 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 70 72 6f 70 | tected.$flags;.....private.$prop |
a75c0 | 61 67 61 74 69 6f 6e 53 74 6f 70 70 65 64 20 3d 20 66 61 6c 73 65 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a | agationStopped.=.false;......... |
a75e0 | 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 73 74 72 69 | public.function.__construct(stri |
a7600 | 6e 67 20 24 6e 61 6d 65 2c 20 61 72 72 61 79 20 24 61 72 67 73 20 3d 20 5b 5d 2c 20 61 72 72 61 | ng.$name,.array.$args.=.[],.arra |
a7620 | 79 20 24 66 6c 61 67 73 20 3d 20 5b 5d 29 0a 7b 0a 24 74 68 69 73 2d 3e 6e 61 6d 65 20 3d 20 24 | y.$flags.=.[]).{.$this->name.=.$ |
a7640 | 6e 61 6d 65 3b 0a 24 74 68 69 73 2d 3e 61 72 67 73 20 3d 20 24 61 72 67 73 3b 0a 24 74 68 69 73 | name;.$this->args.=.$args;.$this |
a7660 | 2d 3e 66 6c 61 67 73 20 3d 20 24 66 6c 61 67 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 | ->flags.=.$flags;.}.......public |
a7680 | 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 4e 61 6d 65 28 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 65 | .function.getName():.string.{.re |
a76a0 | 74 75 72 6e 20 24 74 68 69 73 2d 3e 6e 61 6d 65 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 | turn.$this->name;.}.......public |
a76c0 | 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 41 72 67 75 6d 65 6e 74 73 28 29 3a 20 61 72 72 61 79 0a | .function.getArguments():.array. |
a76e0 | 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 61 72 67 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 75 | {.return.$this->args;.}.......pu |
a7700 | 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 46 6c 61 67 73 28 29 3a 20 61 72 72 61 79 0a | blic.function.getFlags():.array. |
a7720 | 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 66 6c 61 67 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 | {.return.$this->flags;.}.......p |
a7740 | 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 50 72 6f 70 61 67 61 74 69 6f 6e 53 74 6f 70 | ublic.function.isPropagationStop |
a7760 | 70 65 64 28 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 70 72 6f 70 | ped():.bool.{.return.$this->prop |
a7780 | 61 67 61 74 69 6f 6e 53 74 6f 70 70 65 64 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e | agationStopped;.}.....public.fun |
a77a0 | 63 74 69 6f 6e 20 73 74 6f 70 50 72 6f 70 61 67 61 74 69 6f 6e 28 29 3a 20 76 6f 69 64 0a 7b 0a | ction.stopPropagation():.void.{. |
a77c0 | 24 74 68 69 73 2d 3e 70 72 6f 70 61 67 61 74 69 6f 6e 53 74 6f 70 70 65 64 20 3d 20 74 72 75 65 | $this->propagationStopped.=.true |
a77e0 | 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 | ;.}.}.<?php.declare(strict_types |
a7800 | 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 | =1);............namespace.Compos |
a7820 | 65 72 5c 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 | er\EventDispatcher;..use.Compose |
a7840 | 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 5c 54 72 61 6e 73 61 63 74 69 6f 6e | r\DependencyResolver\Transaction |
a7860 | 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 6e 73 74 61 6c 6c 65 72 5c 49 6e 73 74 61 6c 6c | ;.use.Composer\Installer\Install |
a7880 | 65 72 45 76 65 6e 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 4f 5c 49 4f 49 6e 74 65 72 | erEvent;.use.Composer\IO\IOInter |
a78a0 | 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6d 70 6f 73 65 72 3b 0a 75 73 65 | face;.use.Composer\Composer;.use |
a78c0 | 20 43 6f 6d 70 6f 73 65 72 5c 50 61 72 74 69 61 6c 43 6f 6d 70 6f 73 65 72 3b 0a 75 73 65 20 43 | .Composer\PartialComposer;.use.C |
a78e0 | 6f 6d 70 6f 73 65 72 5c 50 63 72 65 5c 50 72 65 67 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c | omposer\Pcre\Preg;.use.Composer\ |
a7900 | 55 74 69 6c 5c 50 6c 61 74 66 6f 72 6d 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 44 65 70 65 | Util\Platform;.use.Composer\Depe |
a7920 | 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 5c 4f 70 65 72 61 74 69 6f 6e 5c 4f 70 65 72 61 74 69 | ndencyResolver\Operation\Operati |
a7940 | 6f 6e 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 | onInterface;.use.Composer\Reposi |
a7960 | 74 6f 72 79 5c 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f | tory\RepositoryInterface;.use.Co |
a7980 | 6d 70 6f 73 65 72 5c 53 63 72 69 70 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 6e 73 74 | mposer\Script;.use.Composer\Inst |
a79a0 | 61 6c 6c 65 72 5c 50 61 63 6b 61 67 65 45 76 65 6e 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 | aller\PackageEvent;.use.Composer |
a79c0 | 5c 49 6e 73 74 61 6c 6c 65 72 5c 42 69 6e 61 72 79 49 6e 73 74 61 6c 6c 65 72 3b 0a 75 73 65 20 | \Installer\BinaryInstaller;.use. |
a79e0 | 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3b 0a 75 | Composer\Util\ProcessExecutor;.u |
a7a00 | 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 63 72 69 70 74 5c 45 76 65 6e 74 20 61 73 20 53 63 72 69 | se.Composer\Script\Event.as.Scri |
a7a20 | 70 74 45 76 65 6e 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 41 75 74 6f 6c 6f 61 64 5c 43 | ptEvent;.use.Composer\Autoload\C |
a7a40 | 6c 61 73 73 4c 6f 61 64 65 72 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e | lassLoader;.use.Symfony\Componen |
a7a60 | 74 5c 50 72 6f 63 65 73 73 5c 50 68 70 45 78 65 63 75 74 61 62 6c 65 46 69 6e 64 65 72 3b 0a 75 | t\Process\PhpExecutableFinder;.u |
a7a80 | 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 50 72 6f 63 65 73 73 5c 45 78 65 | se.Symfony\Component\Process\Exe |
a7aa0 | 63 75 74 61 62 6c 65 46 69 6e 64 65 72 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 63 6c 61 | cutableFinder;...............cla |
a7ac0 | 73 73 20 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 0a 7b 0a 0a 70 72 6f 74 65 63 74 65 64 20 | ss.EventDispatcher.{..protected. |
a7ae0 | 24 63 6f 6d 70 6f 73 65 72 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 69 6f 3b 0a 0a 70 72 6f 74 | $composer;..protected.$io;..prot |
a7b00 | 65 63 74 65 64 20 24 6c 6f 61 64 65 72 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 70 72 6f 63 65 | ected.$loader;..protected.$proce |
a7b20 | 73 73 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 6c 69 73 74 65 6e 65 72 73 20 3d 20 5b 5d 3b 0a | ss;..protected.$listeners.=.[];. |
a7b40 | 0a 70 72 6f 74 65 63 74 65 64 20 24 72 75 6e 53 63 72 69 70 74 73 20 3d 20 74 72 75 65 3b 0a 0a | .protected.$runScripts.=.true;.. |
a7b60 | 70 72 69 76 61 74 65 20 24 65 76 65 6e 74 53 74 61 63 6b 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 | private.$eventStack;.........pub |
a7b80 | 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 50 61 72 74 69 61 6c | lic.function.__construct(Partial |
a7ba0 | 43 6f 6d 70 6f 73 65 72 20 24 63 6f 6d 70 6f 73 65 72 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 20 | Composer.$composer,.IOInterface. |
a7bc0 | 24 69 6f 2c 20 3f 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 20 24 70 72 6f 63 65 73 73 20 3d | $io,.?ProcessExecutor.$process.= |
a7be0 | 20 6e 75 6c 6c 29 0a 7b 0a 24 74 68 69 73 2d 3e 63 6f 6d 70 6f 73 65 72 20 3d 20 24 63 6f 6d 70 | .null).{.$this->composer.=.$comp |
a7c00 | 6f 73 65 72 3b 0a 24 74 68 69 73 2d 3e 69 6f 20 3d 20 24 69 6f 3b 0a 24 74 68 69 73 2d 3e 70 72 | oser;.$this->io.=.$io;.$this->pr |
a7c20 | 6f 63 65 73 73 20 3d 20 24 70 72 6f 63 65 73 73 20 3f 3f 20 6e 65 77 20 50 72 6f 63 65 73 73 45 | ocess.=.$process.??.new.ProcessE |
a7c40 | 78 65 63 75 74 6f 72 28 24 69 6f 29 3b 0a 24 74 68 69 73 2d 3e 65 76 65 6e 74 53 74 61 63 6b 20 | xecutor($io);.$this->eventStack. |
a7c60 | 3d 20 5b 5d 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 | =.[];.}.......public.function.se |
a7c80 | 74 52 75 6e 53 63 72 69 70 74 73 28 62 6f 6f 6c 20 24 72 75 6e 53 63 72 69 70 74 73 20 3d 20 74 | tRunScripts(bool.$runScripts.=.t |
a7ca0 | 72 75 65 29 3a 20 73 65 6c 66 0a 7b 0a 24 74 68 69 73 2d 3e 72 75 6e 53 63 72 69 70 74 73 20 3d | rue):.self.{.$this->runScripts.= |
a7cc0 | 20 28 62 6f 6f 6c 29 20 24 72 75 6e 53 63 72 69 70 74 73 3b 0a 0a 72 65 74 75 72 6e 20 24 74 68 | .(bool).$runScripts;..return.$th |
a7ce0 | 69 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 64 | is;.}..........public.function.d |
a7d00 | 69 73 70 61 74 63 68 28 3f 73 74 72 69 6e 67 20 24 65 76 65 6e 74 4e 61 6d 65 2c 20 3f 45 76 65 | ispatch(?string.$eventName,.?Eve |
a7d20 | 6e 74 20 24 65 76 65 6e 74 20 3d 20 6e 75 6c 6c 29 3a 20 69 6e 74 0a 7b 0a 69 66 20 28 6e 75 6c | nt.$event.=.null):.int.{.if.(nul |
a7d40 | 6c 20 3d 3d 3d 20 24 65 76 65 6e 74 29 20 7b 0a 69 66 20 28 6e 75 6c 6c 20 3d 3d 3d 20 24 65 76 | l.===.$event).{.if.(null.===.$ev |
a7d60 | 65 6e 74 4e 61 6d 65 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 64 41 72 67 | entName).{.throw.new.\InvalidArg |
a7d80 | 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 27 49 66 20 6e 6f 20 24 65 76 65 6e 74 20 69 73 20 | umentException('If.no.$event.is. |
a7da0 | 70 61 73 73 65 64 20 69 6e 20 74 6f 20 27 2e 5f 5f 4d 45 54 48 4f 44 5f 5f 2e 27 20 79 6f 75 20 | passed.in.to.'.__METHOD__.'.you. |
a7dc0 | 68 61 76 65 20 74 6f 20 70 61 73 73 20 69 6e 20 61 6e 20 24 65 76 65 6e 74 4e 61 6d 65 2c 20 67 | have.to.pass.in.an.$eventName,.g |
a7de0 | 6f 74 20 6e 75 6c 6c 2e 27 29 3b 0a 7d 0a 24 65 76 65 6e 74 20 3d 20 6e 65 77 20 45 76 65 6e 74 | ot.null.');.}.$event.=.new.Event |
a7e00 | 28 24 65 76 65 6e 74 4e 61 6d 65 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 64 | ($eventName);.}..return.$this->d |
a7e20 | 6f 44 69 73 70 61 74 63 68 28 24 65 76 65 6e 74 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 | oDispatch($event);.}...........p |
a7e40 | 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 64 69 73 70 61 74 63 68 53 63 72 69 70 74 28 73 74 | ublic.function.dispatchScript(st |
a7e60 | 72 69 6e 67 20 24 65 76 65 6e 74 4e 61 6d 65 2c 20 62 6f 6f 6c 20 24 64 65 76 4d 6f 64 65 20 3d | ring.$eventName,.bool.$devMode.= |
a7e80 | 20 66 61 6c 73 65 2c 20 61 72 72 61 79 20 24 61 64 64 69 74 69 6f 6e 61 6c 41 72 67 73 20 3d 20 | .false,.array.$additionalArgs.=. |
a7ea0 | 5b 5d 2c 20 61 72 72 61 79 20 24 66 6c 61 67 73 20 3d 20 5b 5d 29 3a 20 69 6e 74 0a 7b 0a 61 73 | [],.array.$flags.=.[]):.int.{.as |
a7ec0 | 73 65 72 74 28 24 74 68 69 73 2d 3e 63 6f 6d 70 6f 73 65 72 20 69 6e 73 74 61 6e 63 65 6f 66 20 | sert($this->composer.instanceof. |
a7ee0 | 43 6f 6d 70 6f 73 65 72 2c 20 6e 65 77 20 5c 4c 6f 67 69 63 45 78 63 65 70 74 69 6f 6e 28 27 54 | Composer,.new.\LogicException('T |
a7f00 | 68 69 73 20 73 68 6f 75 6c 64 20 6f 6e 6c 79 20 62 65 20 72 65 61 63 68 65 64 20 77 69 74 68 20 | his.should.only.be.reached.with. |
a7f20 | 61 20 66 75 6c 6c 79 20 6c 6f 61 64 65 64 20 43 6f 6d 70 6f 73 65 72 27 29 29 3b 0a 0a 72 65 74 | a.fully.loaded.Composer'));..ret |
a7f40 | 75 72 6e 20 24 74 68 69 73 2d 3e 64 6f 44 69 73 70 61 74 63 68 28 6e 65 77 20 53 63 72 69 70 74 | urn.$this->doDispatch(new.Script |
a7f60 | 5c 45 76 65 6e 74 28 24 65 76 65 6e 74 4e 61 6d 65 2c 20 24 74 68 69 73 2d 3e 63 6f 6d 70 6f 73 | \Event($eventName,.$this->compos |
a7f80 | 65 72 2c 20 24 74 68 69 73 2d 3e 69 6f 2c 20 24 64 65 76 4d 6f 64 65 2c 20 24 61 64 64 69 74 69 | er,.$this->io,.$devMode,.$additi |
a7fa0 | 6f 6e 61 6c 41 72 67 73 2c 20 24 66 6c 61 67 73 29 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a | onalArgs,.$flags));.}........... |
a7fc0 | 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 64 69 73 70 61 74 63 68 50 61 63 6b 61 | ...public.function.dispatchPacka |
a7fe0 | 67 65 45 76 65 6e 74 28 73 74 72 69 6e 67 20 24 65 76 65 6e 74 4e 61 6d 65 2c 20 62 6f 6f 6c 20 | geEvent(string.$eventName,.bool. |
a8000 | 24 64 65 76 4d 6f 64 65 2c 20 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 20 24 6c | $devMode,.RepositoryInterface.$l |
a8020 | 6f 63 61 6c 52 65 70 6f 2c 20 61 72 72 61 79 20 24 6f 70 65 72 61 74 69 6f 6e 73 2c 20 4f 70 65 | ocalRepo,.array.$operations,.Ope |
a8040 | 72 61 74 69 6f 6e 49 6e 74 65 72 66 61 63 65 20 24 6f 70 65 72 61 74 69 6f 6e 29 3a 20 69 6e 74 | rationInterface.$operation):.int |
a8060 | 0a 7b 0a 61 73 73 65 72 74 28 24 74 68 69 73 2d 3e 63 6f 6d 70 6f 73 65 72 20 69 6e 73 74 61 6e | .{.assert($this->composer.instan |
a8080 | 63 65 6f 66 20 43 6f 6d 70 6f 73 65 72 2c 20 6e 65 77 20 5c 4c 6f 67 69 63 45 78 63 65 70 74 69 | ceof.Composer,.new.\LogicExcepti |
a80a0 | 6f 6e 28 27 54 68 69 73 20 73 68 6f 75 6c 64 20 6f 6e 6c 79 20 62 65 20 72 65 61 63 68 65 64 20 | on('This.should.only.be.reached. |
a80c0 | 77 69 74 68 20 61 20 66 75 6c 6c 79 20 6c 6f 61 64 65 64 20 43 6f 6d 70 6f 73 65 72 27 29 29 3b | with.a.fully.loaded.Composer')); |
a80e0 | 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 64 6f 44 69 73 70 61 74 63 68 28 6e 65 77 20 50 | ..return.$this->doDispatch(new.P |
a8100 | 61 63 6b 61 67 65 45 76 65 6e 74 28 24 65 76 65 6e 74 4e 61 6d 65 2c 20 24 74 68 69 73 2d 3e 63 | ackageEvent($eventName,.$this->c |
a8120 | 6f 6d 70 6f 73 65 72 2c 20 24 74 68 69 73 2d 3e 69 6f 2c 20 24 64 65 76 4d 6f 64 65 2c 20 24 6c | omposer,.$this->io,.$devMode,.$l |
a8140 | 6f 63 61 6c 52 65 70 6f 2c 20 24 6f 70 65 72 61 74 69 6f 6e 73 2c 20 24 6f 70 65 72 61 74 69 6f | ocalRepo,.$operations,.$operatio |
a8160 | 6e 29 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 | n));.}.............public.functi |
a8180 | 6f 6e 20 64 69 73 70 61 74 63 68 49 6e 73 74 61 6c 6c 65 72 45 76 65 6e 74 28 73 74 72 69 6e 67 | on.dispatchInstallerEvent(string |
a81a0 | 20 24 65 76 65 6e 74 4e 61 6d 65 2c 20 62 6f 6f 6c 20 24 64 65 76 4d 6f 64 65 2c 20 62 6f 6f 6c | .$eventName,.bool.$devMode,.bool |
a81c0 | 20 24 65 78 65 63 75 74 65 4f 70 65 72 61 74 69 6f 6e 73 2c 20 54 72 61 6e 73 61 63 74 69 6f 6e | .$executeOperations,.Transaction |
a81e0 | 20 24 74 72 61 6e 73 61 63 74 69 6f 6e 29 3a 20 69 6e 74 0a 7b 0a 61 73 73 65 72 74 28 24 74 68 | .$transaction):.int.{.assert($th |
a8200 | 69 73 2d 3e 63 6f 6d 70 6f 73 65 72 20 69 6e 73 74 61 6e 63 65 6f 66 20 43 6f 6d 70 6f 73 65 72 | is->composer.instanceof.Composer |
a8220 | 2c 20 6e 65 77 20 5c 4c 6f 67 69 63 45 78 63 65 70 74 69 6f 6e 28 27 54 68 69 73 20 73 68 6f 75 | ,.new.\LogicException('This.shou |
a8240 | 6c 64 20 6f 6e 6c 79 20 62 65 20 72 65 61 63 68 65 64 20 77 69 74 68 20 61 20 66 75 6c 6c 79 20 | ld.only.be.reached.with.a.fully. |
a8260 | 6c 6f 61 64 65 64 20 43 6f 6d 70 6f 73 65 72 27 29 29 3b 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 | loaded.Composer'));..return.$thi |
a8280 | 73 2d 3e 64 6f 44 69 73 70 61 74 63 68 28 6e 65 77 20 49 6e 73 74 61 6c 6c 65 72 45 76 65 6e 74 | s->doDispatch(new.InstallerEvent |
a82a0 | 28 24 65 76 65 6e 74 4e 61 6d 65 2c 20 24 74 68 69 73 2d 3e 63 6f 6d 70 6f 73 65 72 2c 20 24 74 | ($eventName,.$this->composer,.$t |
a82c0 | 68 69 73 2d 3e 69 6f 2c 20 24 64 65 76 4d 6f 64 65 2c 20 24 65 78 65 63 75 74 65 4f 70 65 72 61 | his->io,.$devMode,.$executeOpera |
a82e0 | 74 69 6f 6e 73 2c 20 24 74 72 61 6e 73 61 63 74 69 6f 6e 29 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a | tions,.$transaction));.}........ |
a8300 | 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 64 6f 44 69 73 70 61 74 63 68 28 | ..protected.function.doDispatch( |
a8320 | 45 76 65 6e 74 20 24 65 76 65 6e 74 29 0a 7b 0a 69 66 20 28 50 6c 61 74 66 6f 72 6d 3a 3a 67 65 | Event.$event).{.if.(Platform::ge |
a8340 | 74 45 6e 76 28 27 43 4f 4d 50 4f 53 45 52 5f 44 45 42 55 47 5f 45 56 45 4e 54 53 27 29 29 20 7b | tEnv('COMPOSER_DEBUG_EVENTS')).{ |
a8360 | 0a 24 64 65 74 61 69 6c 73 20 3d 20 6e 75 6c 6c 3b 0a 69 66 20 28 24 65 76 65 6e 74 20 69 6e 73 | .$details.=.null;.if.($event.ins |
a8380 | 74 61 6e 63 65 6f 66 20 50 61 63 6b 61 67 65 45 76 65 6e 74 29 20 7b 0a 24 64 65 74 61 69 6c 73 | tanceof.PackageEvent).{.$details |
a83a0 | 20 3d 20 28 73 74 72 69 6e 67 29 20 24 65 76 65 6e 74 2d 3e 67 65 74 4f 70 65 72 61 74 69 6f 6e | .=.(string).$event->getOperation |
a83c0 | 28 29 3b 0a 7d 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 44 69 73 | ();.}.$this->io->writeError('Dis |
a83e0 | 70 61 74 63 68 69 6e 67 20 3c 69 6e 66 6f 3e 27 2e 24 65 76 65 6e 74 2d 3e 67 65 74 4e 61 6d 65 | patching.<info>'.$event->getName |
a8400 | 28 29 2e 27 3c 2f 69 6e 66 6f 3e 27 2e 28 24 64 65 74 61 69 6c 73 20 3f 20 27 20 28 27 2e 24 64 | ().'</info>'.($details.?.'.('.$d |
a8420 | 65 74 61 69 6c 73 2e 27 29 27 20 3a 20 27 27 29 2e 27 20 65 76 65 6e 74 27 29 3b 0a 7d 0a 0a 24 | etails.')'.:.'').'.event');.}..$ |
a8440 | 6c 69 73 74 65 6e 65 72 73 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 4c 69 73 74 65 6e 65 72 73 28 | listeners.=.$this->getListeners( |
a8460 | 24 65 76 65 6e 74 29 3b 0a 0a 24 74 68 69 73 2d 3e 70 75 73 68 45 76 65 6e 74 28 24 65 76 65 6e | $event);..$this->pushEvent($even |
a8480 | 74 29 3b 0a 0a 74 72 79 20 7b 0a 24 72 65 74 75 72 6e 4d 61 78 20 3d 20 30 3b 0a 66 6f 72 65 61 | t);..try.{.$returnMax.=.0;.forea |
a84a0 | 63 68 20 28 24 6c 69 73 74 65 6e 65 72 73 20 61 73 20 24 63 61 6c 6c 61 62 6c 65 29 20 7b 0a 24 | ch.($listeners.as.$callable).{.$ |
a84c0 | 72 65 74 75 72 6e 20 3d 20 30 3b 0a 24 74 68 69 73 2d 3e 65 6e 73 75 72 65 42 69 6e 44 69 72 49 | return.=.0;.$this->ensureBinDirI |
a84e0 | 73 49 6e 50 61 74 68 28 29 3b 0a 0a 69 66 20 28 21 69 73 5f 73 74 72 69 6e 67 28 24 63 61 6c 6c | sInPath();..if.(!is_string($call |
a8500 | 61 62 6c 65 29 29 20 7b 0a 69 66 20 28 21 69 73 5f 63 61 6c 6c 61 62 6c 65 28 24 63 61 6c 6c 61 | able)).{.if.(!is_callable($calla |
a8520 | 62 6c 65 29 29 20 7b 0a 24 63 6c 61 73 73 4e 61 6d 65 20 3d 20 69 73 5f 6f 62 6a 65 63 74 28 24 | ble)).{.$className.=.is_object($ |
a8540 | 63 61 6c 6c 61 62 6c 65 5b 30 5d 29 20 3f 20 67 65 74 5f 63 6c 61 73 73 28 24 63 61 6c 6c 61 62 | callable[0]).?.get_class($callab |
a8560 | 6c 65 5b 30 5d 29 20 3a 20 24 63 61 6c 6c 61 62 6c 65 5b 30 5d 3b 0a 0a 74 68 72 6f 77 20 6e 65 | le[0]).:.$callable[0];..throw.ne |
a8580 | 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 53 75 62 73 63 72 69 62 65 72 20 | w.\RuntimeException('Subscriber. |
a85a0 | 27 2e 24 63 6c 61 73 73 4e 61 6d 65 2e 27 3a 3a 27 2e 24 63 61 6c 6c 61 62 6c 65 5b 31 5d 2e 27 | '.$className.'::'.$callable[1].' |
a85c0 | 20 66 6f 72 20 65 76 65 6e 74 20 27 2e 24 65 76 65 6e 74 2d 3e 67 65 74 4e 61 6d 65 28 29 2e 27 | .for.event.'.$event->getName().' |
a85e0 | 20 69 73 20 6e 6f 74 20 63 61 6c 6c 61 62 6c 65 2c 20 6d 61 6b 65 20 73 75 72 65 20 74 68 65 20 | .is.not.callable,.make.sure.the. |
a8600 | 66 75 6e 63 74 69 6f 6e 20 69 73 20 64 65 66 69 6e 65 64 20 61 6e 64 20 70 75 62 6c 69 63 27 29 | function.is.defined.and.public') |
a8620 | 3b 0a 7d 0a 69 66 20 28 69 73 5f 61 72 72 61 79 28 24 63 61 6c 6c 61 62 6c 65 29 20 26 26 20 28 | ;.}.if.(is_array($callable).&&.( |
a8640 | 69 73 5f 73 74 72 69 6e 67 28 24 63 61 6c 6c 61 62 6c 65 5b 30 5d 29 20 7c 7c 20 69 73 5f 6f 62 | is_string($callable[0]).||.is_ob |
a8660 | 6a 65 63 74 28 24 63 61 6c 6c 61 62 6c 65 5b 30 5d 29 29 20 26 26 20 69 73 5f 73 74 72 69 6e 67 | ject($callable[0])).&&.is_string |
a8680 | 28 24 63 61 6c 6c 61 62 6c 65 5b 31 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 | ($callable[1])).{.$this->io->wri |
a86a0 | 74 65 45 72 72 6f 72 28 73 70 72 69 6e 74 66 28 27 3e 20 25 73 3a 20 25 73 27 2c 20 24 65 76 65 | teError(sprintf('>.%s:.%s',.$eve |
a86c0 | 6e 74 2d 3e 67 65 74 4e 61 6d 65 28 29 2c 20 28 69 73 5f 6f 62 6a 65 63 74 28 24 63 61 6c 6c 61 | nt->getName(),.(is_object($calla |
a86e0 | 62 6c 65 5b 30 5d 29 20 3f 20 67 65 74 5f 63 6c 61 73 73 28 24 63 61 6c 6c 61 62 6c 65 5b 30 5d | ble[0]).?.get_class($callable[0] |
a8700 | 29 20 3a 20 24 63 61 6c 6c 61 62 6c 65 5b 30 5d 29 2e 27 2d 3e 27 2e 24 63 61 6c 6c 61 62 6c 65 | ).:.$callable[0]).'->'.$callable |
a8720 | 5b 31 5d 29 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 3a 3a 56 45 52 42 4f 53 45 | [1]),.true,.IOInterface::VERBOSE |
a8740 | 29 3b 0a 7d 0a 24 72 65 74 75 72 6e 20 3d 20 66 61 6c 73 65 20 3d 3d 3d 20 24 63 61 6c 6c 61 62 | );.}.$return.=.false.===.$callab |
a8760 | 6c 65 28 24 65 76 65 6e 74 29 20 3f 20 31 20 3a 20 30 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 74 | le($event).?.1.:.0;.}.elseif.($t |
a8780 | 68 69 73 2d 3e 69 73 43 6f 6d 70 6f 73 65 72 53 63 72 69 70 74 28 24 63 61 6c 6c 61 62 6c 65 29 | his->isComposerScript($callable) |
a87a0 | 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 73 70 72 69 6e 74 | ).{.$this->io->writeError(sprint |
a87c0 | 66 28 27 3e 20 25 73 3a 20 25 73 27 2c 20 24 65 76 65 6e 74 2d 3e 67 65 74 4e 61 6d 65 28 29 2c | f('>.%s:.%s',.$event->getName(), |
a87e0 | 20 24 63 61 6c 6c 61 62 6c 65 29 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 3a 3a | .$callable),.true,.IOInterface:: |
a8800 | 56 45 52 42 4f 53 45 29 3b 0a 0a 24 73 63 72 69 70 74 20 3d 20 65 78 70 6c 6f 64 65 28 27 20 27 | VERBOSE);..$script.=.explode('.' |
a8820 | 2c 20 73 75 62 73 74 72 28 24 63 61 6c 6c 61 62 6c 65 2c 20 31 29 29 3b 0a 24 73 63 72 69 70 74 | ,.substr($callable,.1));.$script |
a8840 | 4e 61 6d 65 20 3d 20 24 73 63 72 69 70 74 5b 30 5d 3b 0a 75 6e 73 65 74 28 24 73 63 72 69 70 74 | Name.=.$script[0];.unset($script |
a8860 | 5b 30 5d 29 3b 0a 0a 24 61 72 67 73 20 3d 20 61 72 72 61 79 5f 6d 65 72 67 65 28 24 73 63 72 69 | [0]);..$args.=.array_merge($scri |
a8880 | 70 74 2c 20 24 65 76 65 6e 74 2d 3e 67 65 74 41 72 67 75 6d 65 6e 74 73 28 29 29 3b 0a 24 66 6c | pt,.$event->getArguments());.$fl |
a88a0 | 61 67 73 20 3d 20 24 65 76 65 6e 74 2d 3e 67 65 74 46 6c 61 67 73 28 29 3b 0a 69 66 20 28 73 74 | ags.=.$event->getFlags();.if.(st |
a88c0 | 72 70 6f 73 28 24 63 61 6c 6c 61 62 6c 65 2c 20 27 40 63 6f 6d 70 6f 73 65 72 20 27 29 20 3d 3d | rpos($callable,.'@composer.').== |
a88e0 | 3d 20 30 29 20 7b 0a 24 65 78 65 63 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 50 68 70 45 78 65 63 | =.0).{.$exec.=.$this->getPhpExec |
a8900 | 43 6f 6d 6d 61 6e 64 28 29 20 2e 20 27 20 27 20 2e 20 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f | Command()...'.'...ProcessExecuto |
a8920 | 72 3a 3a 65 73 63 61 70 65 28 50 6c 61 74 66 6f 72 6d 3a 3a 67 65 74 45 6e 76 28 27 43 4f 4d 50 | r::escape(Platform::getEnv('COMP |
a8940 | 4f 53 45 52 5f 42 49 4e 41 52 59 27 29 29 20 2e 20 27 20 27 20 2e 20 69 6d 70 6c 6f 64 65 28 27 | OSER_BINARY'))...'.'...implode(' |
a8960 | 20 27 2c 20 24 61 72 67 73 29 3b 0a 69 66 20 28 30 20 21 3d 3d 20 28 24 65 78 69 74 43 6f 64 65 | .',.$args);.if.(0.!==.($exitCode |
a8980 | 20 3d 20 24 74 68 69 73 2d 3e 65 78 65 63 75 74 65 54 74 79 28 24 65 78 65 63 29 29 29 20 7b 0a | .=.$this->executeTty($exec))).{. |
a89a0 | 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 73 70 72 69 6e 74 66 28 27 3c | $this->io->writeError(sprintf('< |
a89c0 | 65 72 72 6f 72 3e 53 63 72 69 70 74 20 25 73 20 68 61 6e 64 6c 69 6e 67 20 74 68 65 20 25 73 20 | error>Script.%s.handling.the.%s. |
a89e0 | 65 76 65 6e 74 20 72 65 74 75 72 6e 65 64 20 77 69 74 68 20 65 72 72 6f 72 20 63 6f 64 65 20 27 | event.returned.with.error.code.' |
a8a00 | 2e 24 65 78 69 74 43 6f 64 65 2e 27 3c 2f 65 72 72 6f 72 3e 27 2c 20 24 63 61 6c 6c 61 62 6c 65 | .$exitCode.'</error>',.$callable |
a8a20 | 2c 20 24 65 76 65 6e 74 2d 3e 67 65 74 4e 61 6d 65 28 29 29 2c 20 74 72 75 65 2c 20 49 4f 49 6e | ,.$event->getName()),.true,.IOIn |
a8a40 | 74 65 72 66 61 63 65 3a 3a 51 55 49 45 54 29 3b 0a 0a 74 68 72 6f 77 20 6e 65 77 20 53 63 72 69 | terface::QUIET);..throw.new.Scri |
a8a60 | 70 74 45 78 65 63 75 74 69 6f 6e 45 78 63 65 70 74 69 6f 6e 28 27 45 72 72 6f 72 20 4f 75 74 70 | ptExecutionException('Error.Outp |
a8a80 | 75 74 3a 20 27 2e 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 67 65 74 45 72 72 6f 72 4f 75 | ut:.'.$this->process->getErrorOu |
a8aa0 | 74 70 75 74 28 29 2c 20 24 65 78 69 74 43 6f 64 65 29 3b 0a 7d 0a 7d 20 65 6c 73 65 20 7b 0a 69 | tput(),.$exitCode);.}.}.else.{.i |
a8ac0 | 66 20 28 21 24 74 68 69 73 2d 3e 67 65 74 4c 69 73 74 65 6e 65 72 73 28 6e 65 77 20 45 76 65 6e | f.(!$this->getListeners(new.Even |
a8ae0 | 74 28 24 73 63 72 69 70 74 4e 61 6d 65 29 29 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 | t($scriptName))).{.$this->io->wr |
a8b00 | 69 74 65 45 72 72 6f 72 28 73 70 72 69 6e 74 66 28 27 3c 77 61 72 6e 69 6e 67 3e 59 6f 75 20 6d | iteError(sprintf('<warning>You.m |
a8b20 | 61 64 65 20 61 20 72 65 66 65 72 65 6e 63 65 20 74 6f 20 61 20 6e 6f 6e 2d 65 78 69 73 74 65 6e | ade.a.reference.to.a.non-existen |
a8b40 | 74 20 73 63 72 69 70 74 20 25 73 3c 2f 77 61 72 6e 69 6e 67 3e 27 2c 20 24 63 61 6c 6c 61 62 6c | t.script.%s</warning>',.$callabl |
a8b60 | 65 29 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 3a 3a 51 55 49 45 54 29 3b 0a 7d | e),.true,.IOInterface::QUIET);.} |
a8b80 | 0a 0a 74 72 79 20 7b 0a 0a 24 73 63 72 69 70 74 45 76 65 6e 74 20 3d 20 6e 65 77 20 53 63 72 69 | ..try.{..$scriptEvent.=.new.Scri |
a8ba0 | 70 74 5c 45 76 65 6e 74 28 24 73 63 72 69 70 74 4e 61 6d 65 2c 20 24 65 76 65 6e 74 2d 3e 67 65 | pt\Event($scriptName,.$event->ge |
a8bc0 | 74 43 6f 6d 70 6f 73 65 72 28 29 2c 20 24 65 76 65 6e 74 2d 3e 67 65 74 49 4f 28 29 2c 20 24 65 | tComposer(),.$event->getIO(),.$e |
a8be0 | 76 65 6e 74 2d 3e 69 73 44 65 76 4d 6f 64 65 28 29 2c 20 24 61 72 67 73 2c 20 24 66 6c 61 67 73 | vent->isDevMode(),.$args,.$flags |
a8c00 | 29 3b 0a 24 73 63 72 69 70 74 45 76 65 6e 74 2d 3e 73 65 74 4f 72 69 67 69 6e 61 74 69 6e 67 45 | );.$scriptEvent->setOriginatingE |
a8c20 | 76 65 6e 74 28 24 65 76 65 6e 74 29 3b 0a 24 72 65 74 75 72 6e 20 3d 20 24 74 68 69 73 2d 3e 64 | vent($event);.$return.=.$this->d |
a8c40 | 69 73 70 61 74 63 68 28 24 73 63 72 69 70 74 4e 61 6d 65 2c 20 24 73 63 72 69 70 74 45 76 65 6e | ispatch($scriptName,.$scriptEven |
a8c60 | 74 29 3b 0a 7d 20 63 61 74 63 68 20 28 53 63 72 69 70 74 45 78 65 63 75 74 69 6f 6e 45 78 63 65 | t);.}.catch.(ScriptExecutionExce |
a8c80 | 70 74 69 6f 6e 20 24 65 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f | ption.$e).{.$this->io->writeErro |
a8ca0 | 72 28 73 70 72 69 6e 74 66 28 27 3c 65 72 72 6f 72 3e 53 63 72 69 70 74 20 25 73 20 77 61 73 20 | r(sprintf('<error>Script.%s.was. |
a8cc0 | 63 61 6c 6c 65 64 20 76 69 61 20 25 73 3c 2f 65 72 72 6f 72 3e 27 2c 20 24 63 61 6c 6c 61 62 6c | called.via.%s</error>',.$callabl |
a8ce0 | 65 2c 20 24 65 76 65 6e 74 2d 3e 67 65 74 4e 61 6d 65 28 29 29 2c 20 74 72 75 65 2c 20 49 4f 49 | e,.$event->getName()),.true,.IOI |
a8d00 | 6e 74 65 72 66 61 63 65 3a 3a 51 55 49 45 54 29 3b 0a 74 68 72 6f 77 20 24 65 3b 0a 7d 0a 7d 0a | nterface::QUIET);.throw.$e;.}.}. |
a8d20 | 7d 20 65 6c 73 65 69 66 20 28 24 74 68 69 73 2d 3e 69 73 50 68 70 53 63 72 69 70 74 28 24 63 61 | }.elseif.($this->isPhpScript($ca |
a8d40 | 6c 6c 61 62 6c 65 29 29 20 7b 0a 24 63 6c 61 73 73 4e 61 6d 65 20 3d 20 73 75 62 73 74 72 28 24 | llable)).{.$className.=.substr($ |
a8d60 | 63 61 6c 6c 61 62 6c 65 2c 20 30 2c 20 73 74 72 70 6f 73 28 24 63 61 6c 6c 61 62 6c 65 2c 20 27 | callable,.0,.strpos($callable,.' |
a8d80 | 3a 3a 27 29 29 3b 0a 24 6d 65 74 68 6f 64 4e 61 6d 65 20 3d 20 73 75 62 73 74 72 28 24 63 61 6c | ::'));.$methodName.=.substr($cal |
a8da0 | 6c 61 62 6c 65 2c 20 73 74 72 70 6f 73 28 24 63 61 6c 6c 61 62 6c 65 2c 20 27 3a 3a 27 29 20 2b | lable,.strpos($callable,.'::').+ |
a8dc0 | 20 32 29 3b 0a 0a 69 66 20 28 21 63 6c 61 73 73 5f 65 78 69 73 74 73 28 24 63 6c 61 73 73 4e 61 | .2);..if.(!class_exists($classNa |
a8de0 | 6d 65 29 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 77 | me)).{.$this->io->writeError('<w |
a8e00 | 61 72 6e 69 6e 67 3e 43 6c 61 73 73 20 27 2e 24 63 6c 61 73 73 4e 61 6d 65 2e 27 20 69 73 20 6e | arning>Class.'.$className.'.is.n |
a8e20 | 6f 74 20 61 75 74 6f 6c 6f 61 64 61 62 6c 65 2c 20 63 61 6e 20 6e 6f 74 20 63 61 6c 6c 20 27 2e | ot.autoloadable,.can.not.call.'. |
a8e40 | 24 65 76 65 6e 74 2d 3e 67 65 74 4e 61 6d 65 28 29 2e 27 20 73 63 72 69 70 74 3c 2f 77 61 72 6e | $event->getName().'.script</warn |
a8e60 | 69 6e 67 3e 27 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 3a 3a 51 55 49 45 54 29 | ing>',.true,.IOInterface::QUIET) |
a8e80 | 3b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 69 66 20 28 21 69 73 5f 63 61 6c 6c 61 62 6c 65 28 24 | ;.continue;.}.if.(!is_callable($ |
a8ea0 | 63 61 6c 6c 61 62 6c 65 29 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 | callable)).{.$this->io->writeErr |
a8ec0 | 6f 72 28 27 3c 77 61 72 6e 69 6e 67 3e 4d 65 74 68 6f 64 20 27 2e 24 63 61 6c 6c 61 62 6c 65 2e | or('<warning>Method.'.$callable. |
a8ee0 | 27 20 69 73 20 6e 6f 74 20 63 61 6c 6c 61 62 6c 65 2c 20 63 61 6e 20 6e 6f 74 20 63 61 6c 6c 20 | '.is.not.callable,.can.not.call. |
a8f00 | 27 2e 24 65 76 65 6e 74 2d 3e 67 65 74 4e 61 6d 65 28 29 2e 27 20 73 63 72 69 70 74 3c 2f 77 61 | '.$event->getName().'.script</wa |
a8f20 | 72 6e 69 6e 67 3e 27 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 3a 3a 51 55 49 45 | rning>',.true,.IOInterface::QUIE |
a8f40 | 54 29 3b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 74 72 79 20 7b 0a 24 72 65 74 75 72 6e 20 3d | T);.continue;.}..try.{.$return.= |
a8f60 | 20 66 61 6c 73 65 20 3d 3d 3d 20 24 74 68 69 73 2d 3e 65 78 65 63 75 74 65 45 76 65 6e 74 50 68 | .false.===.$this->executeEventPh |
a8f80 | 70 53 63 72 69 70 74 28 24 63 6c 61 73 73 4e 61 6d 65 2c 20 24 6d 65 74 68 6f 64 4e 61 6d 65 2c | pScript($className,.$methodName, |
a8fa0 | 20 24 65 76 65 6e 74 29 20 3f 20 31 20 3a 20 30 3b 0a 7d 20 63 61 74 63 68 20 28 5c 45 78 63 65 | .$event).?.1.:.0;.}.catch.(\Exce |
a8fc0 | 70 74 69 6f 6e 20 24 65 29 20 7b 0a 24 6d 65 73 73 61 67 65 20 3d 20 22 53 63 72 69 70 74 20 25 | ption.$e).{.$message.=."Script.% |
a8fe0 | 73 20 68 61 6e 64 6c 69 6e 67 20 74 68 65 20 25 73 20 65 76 65 6e 74 20 74 65 72 6d 69 6e 61 74 | s.handling.the.%s.event.terminat |
a9000 | 65 64 20 77 69 74 68 20 61 6e 20 65 78 63 65 70 74 69 6f 6e 22 3b 0a 24 74 68 69 73 2d 3e 69 6f | ed.with.an.exception";.$this->io |
a9020 | 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 65 72 72 6f 72 3e 27 2e 73 70 72 69 6e 74 66 28 24 | ->writeError('<error>'.sprintf($ |
a9040 | 6d 65 73 73 61 67 65 2c 20 24 63 61 6c 6c 61 62 6c 65 2c 20 24 65 76 65 6e 74 2d 3e 67 65 74 4e | message,.$callable,.$event->getN |
a9060 | 61 6d 65 28 29 29 2e 27 3c 2f 65 72 72 6f 72 3e 27 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 | ame()).'</error>',.true,.IOInter |
a9080 | 66 61 63 65 3a 3a 51 55 49 45 54 29 3b 0a 74 68 72 6f 77 20 24 65 3b 0a 7d 0a 7d 20 65 6c 73 65 | face::QUIET);.throw.$e;.}.}.else |
a90a0 | 20 7b 0a 24 61 72 67 73 20 3d 20 69 6d 70 6c 6f 64 65 28 27 20 27 2c 20 61 72 72 61 79 5f 6d 61 | .{.$args.=.implode('.',.array_ma |
a90c0 | 70 28 5b 27 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f | p(['Composer\Util\ProcessExecuto |
a90e0 | 72 27 2c 20 27 65 73 63 61 70 65 27 5d 2c 20 24 65 76 65 6e 74 2d 3e 67 65 74 41 72 67 75 6d 65 | r',.'escape'],.$event->getArgume |
a9100 | 6e 74 73 28 29 29 29 3b 0a 0a 0a 69 66 20 28 73 74 72 70 6f 73 28 24 63 61 6c 6c 61 62 6c 65 2c | nts()));...if.(strpos($callable, |
a9120 | 20 27 40 70 75 74 65 6e 76 20 27 29 20 3d 3d 3d 20 30 29 20 7b 0a 24 65 78 65 63 20 3d 20 24 63 | .'@putenv.').===.0).{.$exec.=.$c |
a9140 | 61 6c 6c 61 62 6c 65 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 65 78 65 63 20 3d 20 24 63 61 6c 6c 61 | allable;.}.else.{.$exec.=.$calla |
a9160 | 62 6c 65 20 2e 20 28 24 61 72 67 73 20 3d 3d 3d 20 27 27 20 3f 20 27 27 20 3a 20 27 20 27 2e 24 | ble...($args.===.''.?.''.:.'.'.$ |
a9180 | 61 72 67 73 29 3b 0a 7d 0a 0a 69 66 20 28 24 74 68 69 73 2d 3e 69 6f 2d 3e 69 73 56 65 72 62 6f | args);.}..if.($this->io->isVerbo |
a91a0 | 73 65 28 29 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 73 70 | se()).{.$this->io->writeError(sp |
a91c0 | 72 69 6e 74 66 28 27 3e 20 25 73 3a 20 25 73 27 2c 20 24 65 76 65 6e 74 2d 3e 67 65 74 4e 61 6d | rintf('>.%s:.%s',.$event->getNam |
a91e0 | 65 28 29 2c 20 24 65 78 65 63 29 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 65 76 65 6e 74 2d 3e | e(),.$exec));.}.elseif.($event-> |
a9200 | 67 65 74 4e 61 6d 65 28 29 20 21 3d 3d 20 27 5f 5f 65 78 65 63 5f 63 6f 6d 6d 61 6e 64 27 29 20 | getName().!==.'__exec_command'). |
a9220 | 7b 0a 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 73 70 72 69 6e 74 66 | {..$this->io->writeError(sprintf |
a9240 | 28 27 3e 20 25 73 27 2c 20 24 65 78 65 63 29 29 3b 0a 7d 0a 0a 24 70 6f 73 73 69 62 6c 65 4c 6f | ('>.%s',.$exec));.}..$possibleLo |
a9260 | 63 61 6c 42 69 6e 61 72 69 65 73 20 3d 20 24 74 68 69 73 2d 3e 63 6f 6d 70 6f 73 65 72 2d 3e 67 | calBinaries.=.$this->composer->g |
a9280 | 65 74 50 61 63 6b 61 67 65 28 29 2d 3e 67 65 74 42 69 6e 61 72 69 65 73 28 29 3b 0a 69 66 20 28 | etPackage()->getBinaries();.if.( |
a92a0 | 24 70 6f 73 73 69 62 6c 65 4c 6f 63 61 6c 42 69 6e 61 72 69 65 73 29 20 7b 0a 66 6f 72 65 61 63 | $possibleLocalBinaries).{.foreac |
a92c0 | 68 20 28 24 70 6f 73 73 69 62 6c 65 4c 6f 63 61 6c 42 69 6e 61 72 69 65 73 20 61 73 20 24 6c 6f | h.($possibleLocalBinaries.as.$lo |
a92e0 | 63 61 6c 45 78 65 63 29 20 7b 0a 69 66 20 28 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b 5c | calExec).{.if.(Preg::isMatch('{\ |
a9300 | 62 27 2e 70 72 65 67 5f 71 75 6f 74 65 28 24 63 61 6c 6c 61 62 6c 65 29 2e 27 24 7d 27 2c 20 24 | b'.preg_quote($callable).'$}',.$ |
a9320 | 6c 6f 63 61 6c 45 78 65 63 29 29 20 7b 0a 24 63 61 6c 6c 65 72 20 3d 20 42 69 6e 61 72 79 49 6e | localExec)).{.$caller.=.BinaryIn |
a9340 | 73 74 61 6c 6c 65 72 3a 3a 64 65 74 65 72 6d 69 6e 65 42 69 6e 61 72 79 43 61 6c 6c 65 72 28 24 | staller::determineBinaryCaller($ |
a9360 | 6c 6f 63 61 6c 45 78 65 63 29 3b 0a 24 65 78 65 63 20 3d 20 50 72 65 67 3a 3a 72 65 70 6c 61 63 | localExec);.$exec.=.Preg::replac |
a9380 | 65 28 27 7b 5e 27 2e 70 72 65 67 5f 71 75 6f 74 65 28 24 63 61 6c 6c 61 62 6c 65 29 2e 27 7d 27 | e('{^'.preg_quote($callable).'}' |
a93a0 | 2c 20 24 63 61 6c 6c 65 72 20 2e 20 27 20 27 20 2e 20 24 6c 6f 63 61 6c 45 78 65 63 2c 20 24 65 | ,.$caller...'.'...$localExec,.$e |
a93c0 | 78 65 63 29 3b 0a 62 72 65 61 6b 3b 0a 7d 0a 7d 0a 7d 0a 0a 69 66 20 28 73 74 72 70 6f 73 28 24 | xec);.break;.}.}.}..if.(strpos($ |
a93e0 | 65 78 65 63 2c 20 27 40 70 75 74 65 6e 76 20 27 29 20 3d 3d 3d 20 30 29 20 7b 0a 69 66 20 28 66 | exec,.'@putenv.').===.0).{.if.(f |
a9400 | 61 6c 73 65 20 3d 3d 3d 20 73 74 72 70 6f 73 28 24 65 78 65 63 2c 20 27 3d 27 29 29 20 7b 0a 50 | alse.===.strpos($exec,.'=')).{.P |
a9420 | 6c 61 74 66 6f 72 6d 3a 3a 63 6c 65 61 72 45 6e 76 28 73 75 62 73 74 72 28 24 65 78 65 63 2c 20 | latform::clearEnv(substr($exec,. |
a9440 | 38 29 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 5b 24 76 61 72 2c 20 24 76 61 6c 75 65 5d 20 3d 20 65 | 8));.}.else.{.[$var,.$value].=.e |
a9460 | 78 70 6c 6f 64 65 28 27 3d 27 2c 20 73 75 62 73 74 72 28 24 65 78 65 63 2c 20 38 29 2c 20 32 29 | xplode('=',.substr($exec,.8),.2) |
a9480 | 3b 0a 50 6c 61 74 66 6f 72 6d 3a 3a 70 75 74 45 6e 76 28 24 76 61 72 2c 20 24 76 61 6c 75 65 29 | ;.Platform::putEnv($var,.$value) |
a94a0 | 3b 0a 7d 0a 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 69 66 20 28 73 74 72 70 6f 73 28 24 65 78 65 | ;.}..continue;.}.if.(strpos($exe |
a94c0 | 63 2c 20 27 40 70 68 70 20 27 29 20 3d 3d 3d 20 30 29 20 7b 0a 24 70 61 74 68 41 6e 64 41 72 67 | c,.'@php.').===.0).{.$pathAndArg |
a94e0 | 73 20 3d 20 73 75 62 73 74 72 28 24 65 78 65 63 2c 20 35 29 3b 0a 69 66 20 28 50 6c 61 74 66 6f | s.=.substr($exec,.5);.if.(Platfo |
a9500 | 72 6d 3a 3a 69 73 57 69 6e 64 6f 77 73 28 29 29 20 7b 0a 24 70 61 74 68 41 6e 64 41 72 67 73 20 | rm::isWindows()).{.$pathAndArgs. |
a9520 | 3d 20 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 43 61 6c 6c 62 61 63 6b 28 27 7b 5e 5c 53 2b 7d 27 | =.Preg::replaceCallback('{^\S+}' |
a9540 | 2c 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 70 61 74 68 29 20 7b 0a 72 65 74 75 | ,.static.function.($path).{.retu |
a9560 | 72 6e 20 73 74 72 5f 72 65 70 6c 61 63 65 28 27 2f 27 2c 20 27 5c 5c 27 2c 20 24 70 61 74 68 5b | rn.str_replace('/',.'\\',.$path[ |
a9580 | 30 5d 29 3b 0a 7d 2c 20 24 70 61 74 68 41 6e 64 41 72 67 73 29 3b 0a 7d 0a 0a 0a 24 6d 61 74 63 | 0]);.},.$pathAndArgs);.}...$matc |
a95a0 | 68 65 64 20 3d 20 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b 5e 5b 5e 5c 27 22 5c 73 2f 5c | hed.=.Preg::isMatch('{^[^\'"\s/\ |
a95c0 | 5c 5c 5c 5d 2b 7d 27 2c 20 24 70 61 74 68 41 6e 64 41 72 67 73 2c 20 24 6d 61 74 63 68 29 3b 0a | \\\]+}',.$pathAndArgs,.$match);. |
a95e0 | 69 66 20 28 24 6d 61 74 63 68 65 64 20 26 26 20 21 66 69 6c 65 5f 65 78 69 73 74 73 28 24 6d 61 | if.($matched.&&.!file_exists($ma |
a9600 | 74 63 68 5b 30 5d 29 29 20 7b 0a 24 66 69 6e 64 65 72 20 3d 20 6e 65 77 20 45 78 65 63 75 74 61 | tch[0])).{.$finder.=.new.Executa |
a9620 | 62 6c 65 46 69 6e 64 65 72 3b 0a 69 66 20 28 24 70 61 74 68 54 6f 45 78 65 63 20 3d 20 24 66 69 | bleFinder;.if.($pathToExec.=.$fi |
a9640 | 6e 64 65 72 2d 3e 66 69 6e 64 28 24 6d 61 74 63 68 5b 30 5d 29 29 20 7b 0a 24 70 61 74 68 41 6e | nder->find($match[0])).{.$pathAn |
a9660 | 64 41 72 67 73 20 3d 20 24 70 61 74 68 54 6f 45 78 65 63 20 2e 20 73 75 62 73 74 72 28 24 70 61 | dArgs.=.$pathToExec...substr($pa |
a9680 | 74 68 41 6e 64 41 72 67 73 2c 20 73 74 72 6c 65 6e 28 24 6d 61 74 63 68 5b 30 5d 29 29 3b 0a 7d | thAndArgs,.strlen($match[0]));.} |
a96a0 | 0a 7d 0a 24 65 78 65 63 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 50 68 70 45 78 65 63 43 6f 6d 6d | .}.$exec.=.$this->getPhpExecComm |
a96c0 | 61 6e 64 28 29 20 2e 20 27 20 27 20 2e 20 24 70 61 74 68 41 6e 64 41 72 67 73 3b 0a 7d 20 65 6c | and()...'.'...$pathAndArgs;.}.el |
a96e0 | 73 65 20 7b 0a 24 66 69 6e 64 65 72 20 3d 20 6e 65 77 20 50 68 70 45 78 65 63 75 74 61 62 6c 65 | se.{.$finder.=.new.PhpExecutable |
a9700 | 46 69 6e 64 65 72 28 29 3b 0a 24 70 68 70 50 61 74 68 20 3d 20 24 66 69 6e 64 65 72 2d 3e 66 69 | Finder();.$phpPath.=.$finder->fi |
a9720 | 6e 64 28 66 61 6c 73 65 29 3b 0a 69 66 20 28 24 70 68 70 50 61 74 68 29 20 7b 0a 50 6c 61 74 66 | nd(false);.if.($phpPath).{.Platf |
a9740 | 6f 72 6d 3a 3a 70 75 74 45 6e 76 28 27 50 48 50 5f 42 49 4e 41 52 59 27 2c 20 24 70 68 70 50 61 | orm::putEnv('PHP_BINARY',.$phpPa |
a9760 | 74 68 29 3b 0a 7d 0a 0a 69 66 20 28 50 6c 61 74 66 6f 72 6d 3a 3a 69 73 57 69 6e 64 6f 77 73 28 | th);.}..if.(Platform::isWindows( |
a9780 | 29 29 20 7b 0a 24 65 78 65 63 20 3d 20 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 43 61 6c 6c 62 61 | )).{.$exec.=.Preg::replaceCallba |
a97a0 | 63 6b 28 27 7b 5e 5c 53 2b 7d 27 2c 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 70 | ck('{^\S+}',.static.function.($p |
a97c0 | 61 74 68 29 20 7b 0a 72 65 74 75 72 6e 20 73 74 72 5f 72 65 70 6c 61 63 65 28 27 2f 27 2c 20 27 | ath).{.return.str_replace('/',.' |
a97e0 | 5c 5c 27 2c 20 24 70 61 74 68 5b 30 5d 29 3b 0a 7d 2c 20 24 65 78 65 63 29 3b 0a 7d 0a 7d 0a 0a | \\',.$path[0]);.},.$exec);.}.}.. |
a9800 | 0a 0a 0a 69 66 20 28 73 74 72 70 6f 73 28 24 65 78 65 63 2c 20 27 63 6f 6d 70 6f 73 65 72 20 27 | ...if.(strpos($exec,.'composer.' |
a9820 | 29 20 3d 3d 3d 20 30 29 20 7b 0a 24 65 78 65 63 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 50 68 70 | ).===.0).{.$exec.=.$this->getPhp |
a9840 | 45 78 65 63 43 6f 6d 6d 61 6e 64 28 29 20 2e 20 27 20 27 20 2e 20 50 72 6f 63 65 73 73 45 78 65 | ExecCommand()...'.'...ProcessExe |
a9860 | 63 75 74 6f 72 3a 3a 65 73 63 61 70 65 28 50 6c 61 74 66 6f 72 6d 3a 3a 67 65 74 45 6e 76 28 27 | cutor::escape(Platform::getEnv(' |
a9880 | 43 4f 4d 50 4f 53 45 52 5f 42 49 4e 41 52 59 27 29 29 20 2e 20 73 75 62 73 74 72 28 24 65 78 65 | COMPOSER_BINARY'))...substr($exe |
a98a0 | 63 2c 20 38 29 3b 0a 7d 0a 0a 69 66 20 28 30 20 21 3d 3d 20 28 24 65 78 69 74 43 6f 64 65 20 3d | c,.8);.}..if.(0.!==.($exitCode.= |
a98c0 | 20 24 74 68 69 73 2d 3e 65 78 65 63 75 74 65 54 74 79 28 24 65 78 65 63 29 29 29 20 7b 0a 24 74 | .$this->executeTty($exec))).{.$t |
a98e0 | 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 73 70 72 69 6e 74 66 28 27 3c 65 72 | his->io->writeError(sprintf('<er |
a9900 | 72 6f 72 3e 53 63 72 69 70 74 20 25 73 20 68 61 6e 64 6c 69 6e 67 20 74 68 65 20 25 73 20 65 76 | ror>Script.%s.handling.the.%s.ev |
a9920 | 65 6e 74 20 72 65 74 75 72 6e 65 64 20 77 69 74 68 20 65 72 72 6f 72 20 63 6f 64 65 20 27 2e 24 | ent.returned.with.error.code.'.$ |
a9940 | 65 78 69 74 43 6f 64 65 2e 27 3c 2f 65 72 72 6f 72 3e 27 2c 20 24 63 61 6c 6c 61 62 6c 65 2c 20 | exitCode.'</error>',.$callable,. |
a9960 | 24 65 76 65 6e 74 2d 3e 67 65 74 4e 61 6d 65 28 29 29 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 | $event->getName()),.true,.IOInte |
a9980 | 72 66 61 63 65 3a 3a 51 55 49 45 54 29 3b 0a 0a 74 68 72 6f 77 20 6e 65 77 20 53 63 72 69 70 74 | rface::QUIET);..throw.new.Script |
a99a0 | 45 78 65 63 75 74 69 6f 6e 45 78 63 65 70 74 69 6f 6e 28 27 45 72 72 6f 72 20 4f 75 74 70 75 74 | ExecutionException('Error.Output |
a99c0 | 3a 20 27 2e 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 67 65 74 45 72 72 6f 72 4f 75 74 70 | :.'.$this->process->getErrorOutp |
a99e0 | 75 74 28 29 2c 20 24 65 78 69 74 43 6f 64 65 29 3b 0a 7d 0a 7d 0a 0a 24 72 65 74 75 72 6e 4d 61 | ut(),.$exitCode);.}.}..$returnMa |
a9a00 | 78 20 3d 20 6d 61 78 28 24 72 65 74 75 72 6e 4d 61 78 2c 20 24 72 65 74 75 72 6e 29 3b 0a 0a 69 | x.=.max($returnMax,.$return);..i |
a9a20 | 66 20 28 24 65 76 65 6e 74 2d 3e 69 73 50 72 6f 70 61 67 61 74 69 6f 6e 53 74 6f 70 70 65 64 28 | f.($event->isPropagationStopped( |
a9a40 | 29 29 20 7b 0a 62 72 65 61 6b 3b 0a 7d 0a 7d 0a 7d 20 66 69 6e 61 6c 6c 79 20 7b 0a 24 74 68 69 | )).{.break;.}.}.}.finally.{.$thi |
a9a60 | 73 2d 3e 70 6f 70 45 76 65 6e 74 28 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 72 65 74 75 72 6e | s->popEvent();.}..return.$return |
a9a80 | 4d 61 78 3b 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 65 78 65 63 75 | Max;.}..protected.function.execu |
a9aa0 | 74 65 54 74 79 28 73 74 72 69 6e 67 20 24 65 78 65 63 29 3a 20 69 6e 74 0a 7b 0a 69 66 20 28 24 | teTty(string.$exec):.int.{.if.($ |
a9ac0 | 74 68 69 73 2d 3e 69 6f 2d 3e 69 73 49 6e 74 65 72 61 63 74 69 76 65 28 29 29 20 7b 0a 72 65 74 | this->io->isInteractive()).{.ret |
a9ae0 | 75 72 6e 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 65 78 65 63 75 74 65 54 74 79 28 24 | urn.$this->process->executeTty($ |
a9b00 | 65 78 65 63 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d | exec);.}..return.$this->process- |
a9b20 | 3e 65 78 65 63 75 74 65 28 24 65 78 65 63 29 3b 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 | >execute($exec);.}..protected.fu |
a9b40 | 6e 63 74 69 6f 6e 20 67 65 74 50 68 70 45 78 65 63 43 6f 6d 6d 61 6e 64 28 29 3a 20 73 74 72 69 | nction.getPhpExecCommand():.stri |
a9b60 | 6e 67 0a 7b 0a 24 66 69 6e 64 65 72 20 3d 20 6e 65 77 20 50 68 70 45 78 65 63 75 74 61 62 6c 65 | ng.{.$finder.=.new.PhpExecutable |
a9b80 | 46 69 6e 64 65 72 28 29 3b 0a 24 70 68 70 50 61 74 68 20 3d 20 24 66 69 6e 64 65 72 2d 3e 66 69 | Finder();.$phpPath.=.$finder->fi |
a9ba0 | 6e 64 28 66 61 6c 73 65 29 3b 0a 69 66 20 28 21 24 70 68 70 50 61 74 68 29 20 7b 0a 74 68 72 6f | nd(false);.if.(!$phpPath).{.thro |
a9bc0 | 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 46 61 69 6c 65 64 20 | w.new.\RuntimeException('Failed. |
a9be0 | 74 6f 20 6c 6f 63 61 74 65 20 50 48 50 20 62 69 6e 61 72 79 20 74 6f 20 65 78 65 63 75 74 65 20 | to.locate.PHP.binary.to.execute. |
a9c00 | 27 2e 24 70 68 70 50 61 74 68 29 3b 0a 7d 0a 24 70 68 70 41 72 67 73 20 3d 20 24 66 69 6e 64 65 | '.$phpPath);.}.$phpArgs.=.$finde |
a9c20 | 72 2d 3e 66 69 6e 64 41 72 67 75 6d 65 6e 74 73 28 29 3b 0a 24 70 68 70 41 72 67 73 20 3d 20 24 | r->findArguments();.$phpArgs.=.$ |
a9c40 | 70 68 70 41 72 67 73 20 3f 20 27 20 27 20 2e 20 69 6d 70 6c 6f 64 65 28 27 20 27 2c 20 24 70 68 | phpArgs.?.'.'...implode('.',.$ph |
a9c60 | 70 41 72 67 73 29 20 3a 20 27 27 3b 0a 24 61 6c 6c 6f 77 55 72 6c 46 4f 70 65 6e 46 6c 61 67 20 | pArgs).:.'';.$allowUrlFOpenFlag. |
a9c80 | 3d 20 27 20 2d 64 20 61 6c 6c 6f 77 5f 75 72 6c 5f 66 6f 70 65 6e 3d 27 20 2e 20 50 72 6f 63 65 | =.'.-d.allow_url_fopen='...Proce |
a9ca0 | 73 73 45 78 65 63 75 74 6f 72 3a 3a 65 73 63 61 70 65 28 69 6e 69 5f 67 65 74 28 27 61 6c 6c 6f | ssExecutor::escape(ini_get('allo |
a9cc0 | 77 5f 75 72 6c 5f 66 6f 70 65 6e 27 29 29 3b 0a 24 64 69 73 61 62 6c 65 46 75 6e 63 74 69 6f 6e | w_url_fopen'));.$disableFunction |
a9ce0 | 73 46 6c 61 67 20 3d 20 27 20 2d 64 20 64 69 73 61 62 6c 65 5f 66 75 6e 63 74 69 6f 6e 73 3d 27 | sFlag.=.'.-d.disable_functions=' |
a9d00 | 20 2e 20 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3a 3a 65 73 63 61 70 65 28 69 6e 69 5f 67 | ...ProcessExecutor::escape(ini_g |
a9d20 | 65 74 28 27 64 69 73 61 62 6c 65 5f 66 75 6e 63 74 69 6f 6e 73 27 29 29 3b 0a 24 6d 65 6d 6f 72 | et('disable_functions'));.$memor |
a9d40 | 79 4c 69 6d 69 74 46 6c 61 67 20 3d 20 27 20 2d 64 20 6d 65 6d 6f 72 79 5f 6c 69 6d 69 74 3d 27 | yLimitFlag.=.'.-d.memory_limit=' |
a9d60 | 20 2e 20 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3a 3a 65 73 63 61 70 65 28 69 6e 69 5f 67 | ...ProcessExecutor::escape(ini_g |
a9d80 | 65 74 28 27 6d 65 6d 6f 72 79 5f 6c 69 6d 69 74 27 29 29 3b 0a 0a 72 65 74 75 72 6e 20 50 72 6f | et('memory_limit'));..return.Pro |
a9da0 | 63 65 73 73 45 78 65 63 75 74 6f 72 3a 3a 65 73 63 61 70 65 28 24 70 68 70 50 61 74 68 29 20 2e | cessExecutor::escape($phpPath).. |
a9dc0 | 20 24 70 68 70 41 72 67 73 20 2e 20 24 61 6c 6c 6f 77 55 72 6c 46 4f 70 65 6e 46 6c 61 67 20 2e | .$phpArgs...$allowUrlFOpenFlag.. |
a9de0 | 20 24 64 69 73 61 62 6c 65 46 75 6e 63 74 69 6f 6e 73 46 6c 61 67 20 2e 20 24 6d 65 6d 6f 72 79 | .$disableFunctionsFlag...$memory |
a9e00 | 4c 69 6d 69 74 46 6c 61 67 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e | LimitFlag;.}.......protected.fun |
a9e20 | 63 74 69 6f 6e 20 65 78 65 63 75 74 65 45 76 65 6e 74 50 68 70 53 63 72 69 70 74 28 73 74 72 69 | ction.executeEventPhpScript(stri |
a9e40 | 6e 67 20 24 63 6c 61 73 73 4e 61 6d 65 2c 20 73 74 72 69 6e 67 20 24 6d 65 74 68 6f 64 4e 61 6d | ng.$className,.string.$methodNam |
a9e60 | 65 2c 20 45 76 65 6e 74 20 24 65 76 65 6e 74 29 0a 7b 0a 69 66 20 28 24 74 68 69 73 2d 3e 69 6f | e,.Event.$event).{.if.($this->io |
a9e80 | 2d 3e 69 73 56 65 72 62 6f 73 65 28 29 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 | ->isVerbose()).{.$this->io->writ |
a9ea0 | 65 45 72 72 6f 72 28 73 70 72 69 6e 74 66 28 27 3e 20 25 73 3a 20 25 73 3a 3a 25 73 27 2c 20 24 | eError(sprintf('>.%s:.%s::%s',.$ |
a9ec0 | 65 76 65 6e 74 2d 3e 67 65 74 4e 61 6d 65 28 29 2c 20 24 63 6c 61 73 73 4e 61 6d 65 2c 20 24 6d | event->getName(),.$className,.$m |
a9ee0 | 65 74 68 6f 64 4e 61 6d 65 29 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d | ethodName));.}.else.{.$this->io- |
a9f00 | 3e 77 72 69 74 65 45 72 72 6f 72 28 73 70 72 69 6e 74 66 28 27 3e 20 25 73 3a 3a 25 73 27 2c 20 | >writeError(sprintf('>.%s::%s',. |
a9f20 | 24 63 6c 61 73 73 4e 61 6d 65 2c 20 24 6d 65 74 68 6f 64 4e 61 6d 65 29 29 3b 0a 7d 0a 0a 72 65 | $className,.$methodName));.}..re |
a9f40 | 74 75 72 6e 20 24 63 6c 61 73 73 4e 61 6d 65 3a 3a 24 6d 65 74 68 6f 64 4e 61 6d 65 28 24 65 76 | turn.$className::$methodName($ev |
a9f60 | 65 6e 74 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 | ent);.}.........public.function. |
a9f80 | 61 64 64 4c 69 73 74 65 6e 65 72 28 73 74 72 69 6e 67 20 24 65 76 65 6e 74 4e 61 6d 65 2c 20 24 | addListener(string.$eventName,.$ |
a9fa0 | 6c 69 73 74 65 6e 65 72 2c 20 69 6e 74 20 24 70 72 69 6f 72 69 74 79 20 3d 20 30 29 3a 20 76 6f | listener,.int.$priority.=.0):.vo |
a9fc0 | 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 6c 69 73 74 65 6e 65 72 73 5b 24 65 76 65 6e 74 4e 61 6d 65 | id.{.$this->listeners[$eventName |
a9fe0 | 5d 5b 24 70 72 69 6f 72 69 74 79 5d 5b 5d 20 3d 20 24 6c 69 73 74 65 6e 65 72 3b 0a 7d 0a 0a 0a | ][$priority][].=.$listener;.}... |
aa000 | 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 72 65 6d 6f 76 65 4c 69 73 74 65 6e 65 72 | ..public.function.removeListener |
aa020 | 28 24 6c 69 73 74 65 6e 65 72 29 3a 20 76 6f 69 64 0a 7b 0a 66 6f 72 65 61 63 68 20 28 24 74 68 | ($listener):.void.{.foreach.($th |
aa040 | 69 73 2d 3e 6c 69 73 74 65 6e 65 72 73 20 61 73 20 24 65 76 65 6e 74 4e 61 6d 65 20 3d 3e 20 24 | is->listeners.as.$eventName.=>.$ |
aa060 | 70 72 69 6f 72 69 74 69 65 73 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 70 72 69 6f 72 69 74 69 | priorities).{.foreach.($prioriti |
aa080 | 65 73 20 61 73 20 24 70 72 69 6f 72 69 74 79 20 3d 3e 20 24 6c 69 73 74 65 6e 65 72 73 29 20 7b | es.as.$priority.=>.$listeners).{ |
aa0a0 | 0a 66 6f 72 65 61 63 68 20 28 24 6c 69 73 74 65 6e 65 72 73 20 61 73 20 24 69 6e 64 65 78 20 3d | .foreach.($listeners.as.$index.= |
aa0c0 | 3e 20 24 63 61 6e 64 69 64 61 74 65 29 20 7b 0a 69 66 20 28 24 6c 69 73 74 65 6e 65 72 20 3d 3d | >.$candidate).{.if.($listener.== |
aa0e0 | 3d 20 24 63 61 6e 64 69 64 61 74 65 20 7c 7c 20 28 69 73 5f 61 72 72 61 79 28 24 63 61 6e 64 69 | =.$candidate.||.(is_array($candi |
aa100 | 64 61 74 65 29 20 26 26 20 69 73 5f 6f 62 6a 65 63 74 28 24 6c 69 73 74 65 6e 65 72 29 20 26 26 | date).&&.is_object($listener).&& |
aa120 | 20 24 63 61 6e 64 69 64 61 74 65 5b 30 5d 20 3d 3d 3d 20 24 6c 69 73 74 65 6e 65 72 29 29 20 7b | .$candidate[0].===.$listener)).{ |
aa140 | 0a 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 6c 69 73 74 65 6e 65 72 73 5b 24 65 76 65 6e 74 4e 61 | .unset($this->listeners[$eventNa |
aa160 | 6d 65 5d 5b 24 70 72 69 6f 72 69 74 79 5d 5b 24 69 6e 64 65 78 5d 29 3b 0a 7d 0a 7d 0a 7d 0a 7d | me][$priority][$index]);.}.}.}.} |
aa180 | 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 61 64 64 53 75 62 73 | .}.......public.function.addSubs |
aa1a0 | 63 72 69 62 65 72 28 45 76 65 6e 74 53 75 62 73 63 72 69 62 65 72 49 6e 74 65 72 66 61 63 65 20 | criber(EventSubscriberInterface. |
aa1c0 | 24 73 75 62 73 63 72 69 62 65 72 29 3a 20 76 6f 69 64 0a 7b 0a 66 6f 72 65 61 63 68 20 28 24 73 | $subscriber):.void.{.foreach.($s |
aa1e0 | 75 62 73 63 72 69 62 65 72 2d 3e 67 65 74 53 75 62 73 63 72 69 62 65 64 45 76 65 6e 74 73 28 29 | ubscriber->getSubscribedEvents() |
aa200 | 20 61 73 20 24 65 76 65 6e 74 4e 61 6d 65 20 3d 3e 20 24 70 61 72 61 6d 73 29 20 7b 0a 69 66 20 | .as.$eventName.=>.$params).{.if. |
aa220 | 28 69 73 5f 73 74 72 69 6e 67 28 24 70 61 72 61 6d 73 29 29 20 7b 0a 24 74 68 69 73 2d 3e 61 64 | (is_string($params)).{.$this->ad |
aa240 | 64 4c 69 73 74 65 6e 65 72 28 24 65 76 65 6e 74 4e 61 6d 65 2c 20 5b 24 73 75 62 73 63 72 69 62 | dListener($eventName,.[$subscrib |
aa260 | 65 72 2c 20 24 70 61 72 61 6d 73 5d 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 69 73 5f 73 74 72 69 | er,.$params]);.}.elseif.(is_stri |
aa280 | 6e 67 28 24 70 61 72 61 6d 73 5b 30 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 61 64 64 4c 69 73 74 | ng($params[0])).{.$this->addList |
aa2a0 | 65 6e 65 72 28 24 65 76 65 6e 74 4e 61 6d 65 2c 20 5b 24 73 75 62 73 63 72 69 62 65 72 2c 20 24 | ener($eventName,.[$subscriber,.$ |
aa2c0 | 70 61 72 61 6d 73 5b 30 5d 5d 2c 20 24 70 61 72 61 6d 73 5b 31 5d 20 3f 3f 20 30 29 3b 0a 7d 20 | params[0]],.$params[1].??.0);.}. |
aa2e0 | 65 6c 73 65 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 70 61 72 61 6d 73 20 61 73 20 24 6c 69 73 74 | else.{.foreach.($params.as.$list |
aa300 | 65 6e 65 72 29 20 7b 0a 24 74 68 69 73 2d 3e 61 64 64 4c 69 73 74 65 6e 65 72 28 24 65 76 65 6e | ener).{.$this->addListener($even |
aa320 | 74 4e 61 6d 65 2c 20 5b 24 73 75 62 73 63 72 69 62 65 72 2c 20 24 6c 69 73 74 65 6e 65 72 5b 30 | tName,.[$subscriber,.$listener[0 |
aa340 | 5d 5d 2c 20 24 6c 69 73 74 65 6e 65 72 5b 31 5d 20 3f 3f 20 30 29 3b 0a 7d 0a 7d 0a 7d 0a 7d 0a | ]],.$listener[1].??.0);.}.}.}.}. |
aa360 | 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 4c 69 73 74 | ......protected.function.getList |
aa380 | 65 6e 65 72 73 28 45 76 65 6e 74 20 24 65 76 65 6e 74 29 3a 20 61 72 72 61 79 0a 7b 0a 24 73 63 | eners(Event.$event):.array.{.$sc |
aa3a0 | 72 69 70 74 4c 69 73 74 65 6e 65 72 73 20 3d 20 24 74 68 69 73 2d 3e 72 75 6e 53 63 72 69 70 74 | riptListeners.=.$this->runScript |
aa3c0 | 73 20 3f 20 24 74 68 69 73 2d 3e 67 65 74 53 63 72 69 70 74 4c 69 73 74 65 6e 65 72 73 28 24 65 | s.?.$this->getScriptListeners($e |
aa3e0 | 76 65 6e 74 29 20 3a 20 5b 5d 3b 0a 0a 69 66 20 28 21 69 73 73 65 74 28 24 74 68 69 73 2d 3e 6c | vent).:.[];..if.(!isset($this->l |
aa400 | 69 73 74 65 6e 65 72 73 5b 24 65 76 65 6e 74 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 5b 30 5d 29 29 | isteners[$event->getName()][0])) |
aa420 | 20 7b 0a 24 74 68 69 73 2d 3e 6c 69 73 74 65 6e 65 72 73 5b 24 65 76 65 6e 74 2d 3e 67 65 74 4e | .{.$this->listeners[$event->getN |
aa440 | 61 6d 65 28 29 5d 5b 30 5d 20 3d 20 5b 5d 3b 0a 7d 0a 6b 72 73 6f 72 74 28 24 74 68 69 73 2d 3e | ame()][0].=.[];.}.krsort($this-> |
aa460 | 6c 69 73 74 65 6e 65 72 73 5b 24 65 76 65 6e 74 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 29 3b 0a 0a | listeners[$event->getName()]);.. |
aa480 | 24 6c 69 73 74 65 6e 65 72 73 20 3d 20 24 74 68 69 73 2d 3e 6c 69 73 74 65 6e 65 72 73 3b 0a 24 | $listeners.=.$this->listeners;.$ |
aa4a0 | 6c 69 73 74 65 6e 65 72 73 5b 24 65 76 65 6e 74 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 5b 30 5d 20 | listeners[$event->getName()][0]. |
aa4c0 | 3d 20 61 72 72 61 79 5f 6d 65 72 67 65 28 24 6c 69 73 74 65 6e 65 72 73 5b 24 65 76 65 6e 74 2d | =.array_merge($listeners[$event- |
aa4e0 | 3e 67 65 74 4e 61 6d 65 28 29 5d 5b 30 5d 2c 20 24 73 63 72 69 70 74 4c 69 73 74 65 6e 65 72 73 | >getName()][0],.$scriptListeners |
aa500 | 29 3b 0a 0a 72 65 74 75 72 6e 20 61 72 72 61 79 5f 6d 65 72 67 65 28 2e 2e 2e 24 6c 69 73 74 65 | );..return.array_merge(...$liste |
aa520 | 6e 65 72 73 5b 24 65 76 65 6e 74 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 29 3b 0a 7d 0a 0a 0a 0a 0a | ners[$event->getName()]);.}..... |
aa540 | 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 68 61 73 45 76 65 6e 74 4c 69 73 74 65 6e 65 72 | public.function.hasEventListener |
aa560 | 73 28 45 76 65 6e 74 20 24 65 76 65 6e 74 29 3a 20 62 6f 6f 6c 0a 7b 0a 24 6c 69 73 74 65 6e 65 | s(Event.$event):.bool.{.$listene |
aa580 | 72 73 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 4c 69 73 74 65 6e 65 72 73 28 24 65 76 65 6e 74 29 | rs.=.$this->getListeners($event) |
aa5a0 | 3b 0a 0a 72 65 74 75 72 6e 20 63 6f 75 6e 74 28 24 6c 69 73 74 65 6e 65 72 73 29 20 3e 20 30 3b | ;..return.count($listeners).>.0; |
aa5c0 | 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 | .}........protected.function.get |
aa5e0 | 53 63 72 69 70 74 4c 69 73 74 65 6e 65 72 73 28 45 76 65 6e 74 20 24 65 76 65 6e 74 29 3a 20 61 | ScriptListeners(Event.$event):.a |
aa600 | 72 72 61 79 0a 7b 0a 24 70 61 63 6b 61 67 65 20 3d 20 24 74 68 69 73 2d 3e 63 6f 6d 70 6f 73 65 | rray.{.$package.=.$this->compose |
aa620 | 72 2d 3e 67 65 74 50 61 63 6b 61 67 65 28 29 3b 0a 24 73 63 72 69 70 74 73 20 3d 20 24 70 61 63 | r->getPackage();.$scripts.=.$pac |
aa640 | 6b 61 67 65 2d 3e 67 65 74 53 63 72 69 70 74 73 28 29 3b 0a 0a 69 66 20 28 65 6d 70 74 79 28 24 | kage->getScripts();..if.(empty($ |
aa660 | 73 63 72 69 70 74 73 5b 24 65 76 65 6e 74 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 29 29 20 7b 0a 72 | scripts[$event->getName()])).{.r |
aa680 | 65 74 75 72 6e 20 5b 5d 3b 0a 7d 0a 0a 61 73 73 65 72 74 28 24 74 68 69 73 2d 3e 63 6f 6d 70 6f | eturn.[];.}..assert($this->compo |
aa6a0 | 73 65 72 20 69 6e 73 74 61 6e 63 65 6f 66 20 43 6f 6d 70 6f 73 65 72 2c 20 6e 65 77 20 5c 4c 6f | ser.instanceof.Composer,.new.\Lo |
aa6c0 | 67 69 63 45 78 63 65 70 74 69 6f 6e 28 27 54 68 69 73 20 73 68 6f 75 6c 64 20 6f 6e 6c 79 20 62 | gicException('This.should.only.b |
aa6e0 | 65 20 72 65 61 63 68 65 64 20 77 69 74 68 20 61 20 66 75 6c 6c 79 20 6c 6f 61 64 65 64 20 43 6f | e.reached.with.a.fully.loaded.Co |
aa700 | 6d 70 6f 73 65 72 27 29 29 3b 0a 0a 69 66 20 28 24 74 68 69 73 2d 3e 6c 6f 61 64 65 72 29 20 7b | mposer'));..if.($this->loader).{ |
aa720 | 0a 24 74 68 69 73 2d 3e 6c 6f 61 64 65 72 2d 3e 75 6e 72 65 67 69 73 74 65 72 28 29 3b 0a 7d 0a | .$this->loader->unregister();.}. |
aa740 | 0a 24 67 65 6e 65 72 61 74 6f 72 20 3d 20 24 74 68 69 73 2d 3e 63 6f 6d 70 6f 73 65 72 2d 3e 67 | .$generator.=.$this->composer->g |
aa760 | 65 74 41 75 74 6f 6c 6f 61 64 47 65 6e 65 72 61 74 6f 72 28 29 3b 0a 69 66 20 28 24 65 76 65 6e | etAutoloadGenerator();.if.($even |
aa780 | 74 20 69 6e 73 74 61 6e 63 65 6f 66 20 53 63 72 69 70 74 45 76 65 6e 74 29 20 7b 0a 24 67 65 6e | t.instanceof.ScriptEvent).{.$gen |
aa7a0 | 65 72 61 74 6f 72 2d 3e 73 65 74 44 65 76 4d 6f 64 65 28 24 65 76 65 6e 74 2d 3e 69 73 44 65 76 | erator->setDevMode($event->isDev |
aa7c0 | 4d 6f 64 65 28 29 29 3b 0a 7d 0a 0a 24 70 61 63 6b 61 67 65 73 20 3d 20 24 74 68 69 73 2d 3e 63 | Mode());.}..$packages.=.$this->c |
aa7e0 | 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 79 4d 61 6e 61 67 65 72 28 29 2d | omposer->getRepositoryManager()- |
aa800 | 3e 67 65 74 4c 6f 63 61 6c 52 65 70 6f 73 69 74 6f 72 79 28 29 2d 3e 67 65 74 43 61 6e 6f 6e 69 | >getLocalRepository()->getCanoni |
aa820 | 63 61 6c 50 61 63 6b 61 67 65 73 28 29 3b 0a 24 70 61 63 6b 61 67 65 4d 61 70 20 3d 20 24 67 65 | calPackages();.$packageMap.=.$ge |
aa840 | 6e 65 72 61 74 6f 72 2d 3e 62 75 69 6c 64 50 61 63 6b 61 67 65 4d 61 70 28 24 74 68 69 73 2d 3e | nerator->buildPackageMap($this-> |
aa860 | 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 72 | composer->getInstallationManager |
aa880 | 28 29 2c 20 24 70 61 63 6b 61 67 65 2c 20 24 70 61 63 6b 61 67 65 73 29 3b 0a 24 6d 61 70 20 3d | (),.$package,.$packages);.$map.= |
aa8a0 | 20 24 67 65 6e 65 72 61 74 6f 72 2d 3e 70 61 72 73 65 41 75 74 6f 6c 6f 61 64 73 28 24 70 61 63 | .$generator->parseAutoloads($pac |
aa8c0 | 6b 61 67 65 4d 61 70 2c 20 24 70 61 63 6b 61 67 65 29 3b 0a 24 74 68 69 73 2d 3e 6c 6f 61 64 65 | kageMap,.$package);.$this->loade |
aa8e0 | 72 20 3d 20 24 67 65 6e 65 72 61 74 6f 72 2d 3e 63 72 65 61 74 65 4c 6f 61 64 65 72 28 24 6d 61 | r.=.$generator->createLoader($ma |
aa900 | 70 2c 20 24 74 68 69 73 2d 3e 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 43 6f 6e 66 69 67 28 29 2d | p,.$this->composer->getConfig()- |
aa920 | 3e 67 65 74 28 27 76 65 6e 64 6f 72 2d 64 69 72 27 29 29 3b 0a 24 74 68 69 73 2d 3e 6c 6f 61 64 | >get('vendor-dir'));.$this->load |
aa940 | 65 72 2d 3e 72 65 67 69 73 74 65 72 28 66 61 6c 73 65 29 3b 0a 0a 72 65 74 75 72 6e 20 24 73 63 | er->register(false);..return.$sc |
aa960 | 72 69 70 74 73 5b 24 65 76 65 6e 74 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 3b 0a 7d 0a 0a 0a 0a 0a | ripts[$event->getName()];.}..... |
aa980 | 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 69 73 50 68 70 53 63 72 69 70 74 28 73 | protected.function.isPhpScript(s |
aa9a0 | 74 72 69 6e 67 20 24 63 61 6c 6c 61 62 6c 65 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 | tring.$callable):.bool.{.return. |
aa9c0 | 66 61 6c 73 65 20 3d 3d 3d 20 73 74 72 70 6f 73 28 24 63 61 6c 6c 61 62 6c 65 2c 20 27 20 27 29 | false.===.strpos($callable,.'.') |
aa9e0 | 20 26 26 20 66 61 6c 73 65 20 21 3d 3d 20 73 74 72 70 6f 73 28 24 63 61 6c 6c 61 62 6c 65 2c 20 | .&&.false.!==.strpos($callable,. |
aaa00 | 27 3a 3a 27 29 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 | '::');.}.....protected.function. |
aaa20 | 69 73 43 6f 6d 70 6f 73 65 72 53 63 72 69 70 74 28 73 74 72 69 6e 67 20 24 63 61 6c 6c 61 62 6c | isComposerScript(string.$callabl |
aaa40 | 65 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 73 74 72 70 6f 73 28 24 63 61 6c 6c 61 62 | e):.bool.{.return.strpos($callab |
aaa60 | 6c 65 2c 20 27 40 27 29 20 3d 3d 3d 20 30 20 26 26 20 73 74 72 70 6f 73 28 24 63 61 6c 6c 61 62 | le,.'@').===.0.&&.strpos($callab |
aaa80 | 6c 65 2c 20 27 40 70 68 70 20 27 29 20 21 3d 3d 20 30 20 26 26 20 73 74 72 70 6f 73 28 24 63 61 | le,.'@php.').!==.0.&&.strpos($ca |
aaaa0 | 6c 6c 61 62 6c 65 2c 20 27 40 70 75 74 65 6e 76 20 27 29 20 21 3d 3d 20 30 3b 0a 7d 0a 0a 0a 0a | llable,.'@putenv.').!==.0;.}.... |
aaac0 | 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 70 75 73 68 45 76 65 6e 74 28 | ...protected.function.pushEvent( |
aaae0 | 45 76 65 6e 74 20 24 65 76 65 6e 74 29 3a 20 69 6e 74 0a 7b 0a 24 65 76 65 6e 74 4e 61 6d 65 20 | Event.$event):.int.{.$eventName. |
aab00 | 3d 20 24 65 76 65 6e 74 2d 3e 67 65 74 4e 61 6d 65 28 29 3b 0a 69 66 20 28 69 6e 5f 61 72 72 61 | =.$event->getName();.if.(in_arra |
aab20 | 79 28 24 65 76 65 6e 74 4e 61 6d 65 2c 20 24 74 68 69 73 2d 3e 65 76 65 6e 74 53 74 61 63 6b 29 | y($eventName,.$this->eventStack) |
aab40 | 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 | ).{.throw.new.\RuntimeException( |
aab60 | 73 70 72 69 6e 74 66 28 22 43 69 72 63 75 6c 61 72 20 63 61 6c 6c 20 74 6f 20 73 63 72 69 70 74 | sprintf("Circular.call.to.script |
aab80 | 20 68 61 6e 64 6c 65 72 20 27 25 73 27 20 64 65 74 65 63 74 65 64 22 2c 20 24 65 76 65 6e 74 4e | .handler.'%s'.detected",.$eventN |
aaba0 | 61 6d 65 29 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 61 72 72 61 79 5f 70 75 73 68 28 24 74 68 69 | ame));.}..return.array_push($thi |
aabc0 | 73 2d 3e 65 76 65 6e 74 53 74 61 63 6b 2c 20 24 65 76 65 6e 74 4e 61 6d 65 29 3b 0a 7d 0a 0a 0a | s->eventStack,.$eventName);.}... |
aabe0 | 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 70 6f 70 45 76 65 6e 74 28 29 3a | ..protected.function.popEvent(): |
aac00 | 20 3f 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 61 72 72 61 79 5f 70 6f 70 28 24 74 68 69 | .?string.{.return.array_pop($thi |
aac20 | 73 2d 3e 65 76 65 6e 74 53 74 61 63 6b 29 3b 0a 7d 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 | s->eventStack);.}..private.funct |
aac40 | 69 6f 6e 20 65 6e 73 75 72 65 42 69 6e 44 69 72 49 73 49 6e 50 61 74 68 28 29 3a 20 76 6f 69 64 | ion.ensureBinDirIsInPath():.void |
aac60 | 0a 7b 0a 24 70 61 74 68 45 6e 76 20 3d 20 27 50 41 54 48 27 3b 0a 0a 0a 0a 0a 69 66 20 28 21 69 | .{.$pathEnv.=.'PATH';.....if.(!i |
aac80 | 73 73 65 74 28 24 5f 53 45 52 56 45 52 5b 24 70 61 74 68 45 6e 76 5d 29 20 26 26 20 69 73 73 65 | sset($_SERVER[$pathEnv]).&&.isse |
aaca0 | 74 28 24 5f 53 45 52 56 45 52 5b 27 50 61 74 68 27 5d 29 29 20 7b 0a 24 70 61 74 68 45 6e 76 20 | t($_SERVER['Path'])).{.$pathEnv. |
aacc0 | 3d 20 27 50 61 74 68 27 3b 0a 7d 0a 0a 0a 24 62 69 6e 44 69 72 20 3d 20 24 74 68 69 73 2d 3e 63 | =.'Path';.}...$binDir.=.$this->c |
aace0 | 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 43 6f 6e 66 69 67 28 29 2d 3e 67 65 74 28 27 62 69 6e 2d 64 | omposer->getConfig()->get('bin-d |
aad00 | 69 72 27 29 3b 0a 69 66 20 28 69 73 5f 64 69 72 28 24 62 69 6e 44 69 72 29 29 20 7b 0a 24 62 69 | ir');.if.(is_dir($binDir)).{.$bi |
aad20 | 6e 44 69 72 20 3d 20 72 65 61 6c 70 61 74 68 28 24 62 69 6e 44 69 72 29 3b 0a 24 70 61 74 68 56 | nDir.=.realpath($binDir);.$pathV |
aad40 | 61 6c 75 65 20 3d 20 28 73 74 72 69 6e 67 29 20 50 6c 61 74 66 6f 72 6d 3a 3a 67 65 74 45 6e 76 | alue.=.(string).Platform::getEnv |
aad60 | 28 24 70 61 74 68 45 6e 76 29 3b 0a 69 66 20 28 21 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 | ($pathEnv);.if.(!Preg::isMatch(' |
aad80 | 7b 28 5e 7c 27 2e 50 41 54 48 5f 53 45 50 41 52 41 54 4f 52 2e 27 29 27 2e 70 72 65 67 5f 71 75 | {(^|'.PATH_SEPARATOR.')'.preg_qu |
aada0 | 6f 74 65 28 24 62 69 6e 44 69 72 29 2e 27 28 24 7c 27 2e 50 41 54 48 5f 53 45 50 41 52 41 54 4f | ote($binDir).'($|'.PATH_SEPARATO |
aadc0 | 52 2e 27 29 7d 27 2c 20 24 70 61 74 68 56 61 6c 75 65 29 29 20 7b 0a 50 6c 61 74 66 6f 72 6d 3a | R.')}',.$pathValue)).{.Platform: |
aade0 | 3a 70 75 74 45 6e 76 28 24 70 61 74 68 45 6e 76 2c 20 24 62 69 6e 44 69 72 2e 50 41 54 48 5f 53 | :putEnv($pathEnv,.$binDir.PATH_S |
aae00 | 45 50 41 52 41 54 4f 52 2e 24 70 61 74 68 56 61 6c 75 65 29 3b 0a 7d 0a 7d 0a 7d 0a 7d 0a 3c 3f | EPARATOR.$pathValue);.}.}.}.}.<? |
aae20 | 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a | php.declare(strict_types=1);.... |
aae40 | 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 45 76 65 6e 74 | ........namespace.Composer\Event |
aae60 | 44 69 73 70 61 74 63 68 65 72 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 69 6e 74 65 72 66 61 | Dispatcher;..............interfa |
aae80 | 63 65 20 45 76 65 6e 74 53 75 62 73 63 72 69 62 65 72 49 6e 74 65 72 66 61 63 65 0a 7b 0a 0a 0a | ce.EventSubscriberInterface.{... |
aaea0 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 66 75 | ................public.static.fu |
aaec0 | 6e 63 74 69 6f 6e 20 67 65 74 53 75 62 73 63 72 69 62 65 64 45 76 65 6e 74 73 28 29 3b 0a 7d 0a | nction.getSubscribedEvents();.}. |
aaee0 | 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a | <?php.declare(strict_types=1);.. |
aaf00 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 45 76 65 | ..........namespace.Composer\Eve |
aaf20 | 6e 74 44 69 73 70 61 74 63 68 65 72 3b 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 53 63 72 69 70 74 | ntDispatcher;.......class.Script |
aaf40 | 45 78 65 63 75 74 69 6f 6e 45 78 63 65 70 74 69 6f 6e 20 65 78 74 65 6e 64 73 20 5c 52 75 6e 74 | ExecutionException.extends.\Runt |
aaf60 | 69 6d 65 45 78 63 65 70 74 69 6f 6e 0a 7b 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 | imeException.{.}.<?php.declare(s |
aaf80 | 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 | trict_types=1);............names |
aafa0 | 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 45 78 63 65 70 74 69 6f 6e 3b 0a 0a 0a 0a 0a 63 6c 61 | pace.Composer\Exception;.....cla |
aafc0 | 73 73 20 49 72 72 65 63 6f 76 65 72 61 62 6c 65 44 6f 77 6e 6c 6f 61 64 45 78 63 65 70 74 69 6f | ss.IrrecoverableDownloadExceptio |
aafe0 | 6e 20 65 78 74 65 6e 64 73 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 0a 7b 0a 7d 0a | n.extends.\RuntimeException.{.}. |
ab000 | 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a | <?php.declare(strict_types=1);.. |
ab020 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 45 78 63 | ..........namespace.Composer\Exc |
ab040 | 65 70 74 69 6f 6e 3b 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 4e 6f 53 73 6c 45 78 63 65 70 74 69 | eption;.......class.NoSslExcepti |
ab060 | 6f 6e 20 65 78 74 65 6e 64 73 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 0a 7b 0a 7d | on.extends.\RuntimeException.{.} |
ab080 | 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a | .<?php.declare(strict_types=1);. |
ab0a0 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 3b 0a 0a | ...........namespace.Composer;.. |
ab0c0 | 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 66 69 67 5c 4a 73 6f 6e 43 6f 6e 66 69 67 53 6f | use.Composer\Config\JsonConfigSo |
ab0e0 | 75 72 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 4a 73 6f 6e 5c 4a 73 6f 6e 46 69 6c 65 | urce;.use.Composer\Json\JsonFile |
ab100 | 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 4f 5c 49 4f 49 6e 74 65 72 66 61 63 65 3b 0a 75 | ;.use.Composer\IO\IOInterface;.u |
ab120 | 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 41 72 63 68 69 76 65 72 3b 0a 75 73 | se.Composer\Package\Archiver;.us |
ab140 | 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 56 65 72 73 69 6f 6e 5c 56 65 72 73 69 | e.Composer\Package\Version\Versi |
ab160 | 6f 6e 47 75 65 73 73 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c | onGuesser;.use.Composer\Package\ |
ab180 | 52 6f 6f 74 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 | RootPackageInterface;.use.Compos |
ab1a0 | 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 52 65 70 6f 73 69 74 6f 72 79 4d 61 6e 61 67 65 72 3b | er\Repository\RepositoryManager; |
ab1c0 | 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 52 65 70 6f 73 69 74 | .use.Composer\Repository\Reposit |
ab1e0 | 6f 72 79 46 61 63 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 46 69 | oryFactory;.use.Composer\Util\Fi |
ab200 | 6c 65 73 79 73 74 65 6d 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 6c 61 74 | lesystem;.use.Composer\Util\Plat |
ab220 | 66 6f 72 6d 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 72 6f 63 65 73 73 45 | form;.use.Composer\Util\ProcessE |
ab240 | 78 65 63 75 74 6f 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 48 74 74 70 44 | xecutor;.use.Composer\Util\HttpD |
ab260 | 6f 77 6e 6c 6f 61 64 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 4c 6f 6f | ownloader;.use.Composer\Util\Loo |
ab280 | 70 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 53 69 6c 65 6e 63 65 72 3b 0a 75 | p;.use.Composer\Util\Silencer;.u |
ab2a0 | 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 6c 75 67 69 6e 5c 50 6c 75 67 69 6e 45 76 65 6e 74 73 3b | se.Composer\Plugin\PluginEvents; |
ab2c0 | 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 5c 45 76 | .use.Composer\EventDispatcher\Ev |
ab2e0 | 65 6e 74 3b 0a 75 73 65 20 50 68 61 72 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f | ent;.use.Phar;.use.Symfony\Compo |
ab300 | 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 46 6f 72 6d 61 74 74 65 72 5c 4f 75 74 70 75 74 46 6f 72 | nent\Console\Formatter\OutputFor |
ab320 | 6d 61 74 74 65 72 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f | matter;.use.Symfony\Component\Co |
ab340 | 6e 73 6f 6c 65 5c 46 6f 72 6d 61 74 74 65 72 5c 4f 75 74 70 75 74 46 6f 72 6d 61 74 74 65 72 53 | nsole\Formatter\OutputFormatterS |
ab360 | 74 79 6c 65 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 | tyle;.use.Symfony\Component\Cons |
ab380 | 6f 6c 65 5c 4f 75 74 70 75 74 5c 43 6f 6e 73 6f 6c 65 4f 75 74 70 75 74 3b 0a 75 73 65 20 43 6f | ole\Output\ConsoleOutput;.use.Co |
ab3a0 | 6d 70 6f 73 65 72 5c 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 5c 45 76 65 6e 74 44 69 73 70 | mposer\EventDispatcher\EventDisp |
ab3c0 | 61 74 63 68 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 41 75 74 6f 6c 6f 61 64 5c 41 75 | atcher;.use.Composer\Autoload\Au |
ab3e0 | 74 6f 6c 6f 61 64 47 65 6e 65 72 61 74 6f 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 | toloadGenerator;.use.Composer\Pa |
ab400 | 63 6b 61 67 65 5c 56 65 72 73 69 6f 6e 5c 56 65 72 73 69 6f 6e 50 61 72 73 65 72 3b 0a 75 73 65 | ckage\Version\VersionParser;.use |
ab420 | 20 43 6f 6d 70 6f 73 65 72 5c 44 6f 77 6e 6c 6f 61 64 65 72 5c 54 72 61 6e 73 70 6f 72 74 45 78 | .Composer\Downloader\TransportEx |
ab440 | 63 65 70 74 69 6f 6e 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 4a 73 6f 6e 5c 4a 73 6f 6e 56 | ception;.use.Composer\Json\JsonV |
ab460 | 61 6c 69 64 61 74 69 6f 6e 45 78 63 65 70 74 69 6f 6e 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 | alidationException;.use.Composer |
ab480 | 5c 52 65 70 6f 73 69 74 6f 72 79 5c 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 49 | \Repository\InstalledRepositoryI |
ab4a0 | 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 55 6e 65 78 70 65 63 74 65 64 56 61 6c 75 65 45 78 63 | nterface;.use.UnexpectedValueExc |
ab4c0 | 65 70 74 69 6f 6e 3b 0a 75 73 65 20 5a 69 70 41 72 63 68 69 76 65 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a | eption;.use.ZipArchive;......... |
ab4e0 | 0a 63 6c 61 73 73 20 46 61 63 74 6f 72 79 0a 7b 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 73 74 | .class.Factory.{....protected.st |
ab500 | 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 48 6f 6d 65 44 69 72 28 29 3a 20 73 74 72 69 | atic.function.getHomeDir():.stri |
ab520 | 6e 67 0a 7b 0a 24 68 6f 6d 65 20 3d 20 50 6c 61 74 66 6f 72 6d 3a 3a 67 65 74 45 6e 76 28 27 43 | ng.{.$home.=.Platform::getEnv('C |
ab540 | 4f 4d 50 4f 53 45 52 5f 48 4f 4d 45 27 29 3b 0a 69 66 20 28 24 68 6f 6d 65 29 20 7b 0a 72 65 74 | OMPOSER_HOME');.if.($home).{.ret |
ab560 | 75 72 6e 20 24 68 6f 6d 65 3b 0a 7d 0a 0a 69 66 20 28 50 6c 61 74 66 6f 72 6d 3a 3a 69 73 57 69 | urn.$home;.}..if.(Platform::isWi |
ab580 | 6e 64 6f 77 73 28 29 29 20 7b 0a 69 66 20 28 21 50 6c 61 74 66 6f 72 6d 3a 3a 67 65 74 45 6e 76 | ndows()).{.if.(!Platform::getEnv |
ab5a0 | 28 27 41 50 50 44 41 54 41 27 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d | ('APPDATA')).{.throw.new.\Runtim |
ab5c0 | 65 45 78 63 65 70 74 69 6f 6e 28 27 54 68 65 20 41 50 50 44 41 54 41 20 6f 72 20 43 4f 4d 50 4f | eException('The.APPDATA.or.COMPO |
ab5e0 | 53 45 52 5f 48 4f 4d 45 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 20 6d 75 | SER_HOME.environment.variable.mu |
ab600 | 73 74 20 62 65 20 73 65 74 20 66 6f 72 20 63 6f 6d 70 6f 73 65 72 20 74 6f 20 72 75 6e 20 63 6f | st.be.set.for.composer.to.run.co |
ab620 | 72 72 65 63 74 6c 79 27 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 72 74 72 69 6d 28 73 74 72 74 72 | rrectly');.}..return.rtrim(strtr |
ab640 | 28 50 6c 61 74 66 6f 72 6d 3a 3a 67 65 74 45 6e 76 28 27 41 50 50 44 41 54 41 27 29 2c 20 27 5c | (Platform::getEnv('APPDATA'),.'\ |
ab660 | 5c 27 2c 20 27 2f 27 29 2c 20 27 2f 27 29 20 2e 20 27 2f 43 6f 6d 70 6f 73 65 72 27 3b 0a 7d 0a | \',.'/'),.'/')...'/Composer';.}. |
ab680 | 0a 24 75 73 65 72 44 69 72 20 3d 20 73 65 6c 66 3a 3a 67 65 74 55 73 65 72 44 69 72 28 29 3b 0a | .$userDir.=.self::getUserDir();. |
ab6a0 | 24 64 69 72 73 20 3d 20 5b 5d 3b 0a 0a 69 66 20 28 73 65 6c 66 3a 3a 75 73 65 58 64 67 28 29 29 | $dirs.=.[];..if.(self::useXdg()) |
ab6c0 | 20 7b 0a 0a 24 78 64 67 43 6f 6e 66 69 67 20 3d 20 50 6c 61 74 66 6f 72 6d 3a 3a 67 65 74 45 6e | .{..$xdgConfig.=.Platform::getEn |
ab6e0 | 76 28 27 58 44 47 5f 43 4f 4e 46 49 47 5f 48 4f 4d 45 27 29 3b 0a 69 66 20 28 21 24 78 64 67 43 | v('XDG_CONFIG_HOME');.if.(!$xdgC |
ab700 | 6f 6e 66 69 67 29 20 7b 0a 24 78 64 67 43 6f 6e 66 69 67 20 3d 20 24 75 73 65 72 44 69 72 20 2e | onfig).{.$xdgConfig.=.$userDir.. |
ab720 | 20 27 2f 2e 63 6f 6e 66 69 67 27 3b 0a 7d 0a 0a 24 64 69 72 73 5b 5d 20 3d 20 24 78 64 67 43 6f | .'/.config';.}..$dirs[].=.$xdgCo |
ab740 | 6e 66 69 67 20 2e 20 27 2f 63 6f 6d 70 6f 73 65 72 27 3b 0a 7d 0a 0a 24 64 69 72 73 5b 5d 20 3d | nfig...'/composer';.}..$dirs[].= |
ab760 | 20 24 75 73 65 72 44 69 72 20 2e 20 27 2f 2e 63 6f 6d 70 6f 73 65 72 27 3b 0a 0a 0a 66 6f 72 65 | .$userDir...'/.composer';...fore |
ab780 | 61 63 68 20 28 24 64 69 72 73 20 61 73 20 24 64 69 72 29 20 7b 0a 69 66 20 28 53 69 6c 65 6e 63 | ach.($dirs.as.$dir).{.if.(Silenc |
ab7a0 | 65 72 3a 3a 63 61 6c 6c 28 27 69 73 5f 64 69 72 27 2c 20 24 64 69 72 29 29 20 7b 0a 72 65 74 75 | er::call('is_dir',.$dir)).{.retu |
ab7c0 | 72 6e 20 24 64 69 72 3b 0a 7d 0a 7d 0a 0a 0a 72 65 74 75 72 6e 20 24 64 69 72 73 5b 30 5d 3b 0a | rn.$dir;.}.}...return.$dirs[0];. |
ab7e0 | 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 | }..protected.static.function.get |
ab800 | 43 61 63 68 65 44 69 72 28 73 74 72 69 6e 67 20 24 68 6f 6d 65 29 3a 20 73 74 72 69 6e 67 0a 7b | CacheDir(string.$home):.string.{ |
ab820 | 0a 24 63 61 63 68 65 44 69 72 20 3d 20 50 6c 61 74 66 6f 72 6d 3a 3a 67 65 74 45 6e 76 28 27 43 | .$cacheDir.=.Platform::getEnv('C |
ab840 | 4f 4d 50 4f 53 45 52 5f 43 41 43 48 45 5f 44 49 52 27 29 3b 0a 69 66 20 28 24 63 61 63 68 65 44 | OMPOSER_CACHE_DIR');.if.($cacheD |
ab860 | 69 72 29 20 7b 0a 72 65 74 75 72 6e 20 24 63 61 63 68 65 44 69 72 3b 0a 7d 0a 0a 24 68 6f 6d 65 | ir).{.return.$cacheDir;.}..$home |
ab880 | 45 6e 76 20 3d 20 50 6c 61 74 66 6f 72 6d 3a 3a 67 65 74 45 6e 76 28 27 43 4f 4d 50 4f 53 45 52 | Env.=.Platform::getEnv('COMPOSER |
ab8a0 | 5f 48 4f 4d 45 27 29 3b 0a 69 66 20 28 24 68 6f 6d 65 45 6e 76 29 20 7b 0a 72 65 74 75 72 6e 20 | _HOME');.if.($homeEnv).{.return. |
ab8c0 | 24 68 6f 6d 65 45 6e 76 20 2e 20 27 2f 63 61 63 68 65 27 3b 0a 7d 0a 0a 69 66 20 28 50 6c 61 74 | $homeEnv...'/cache';.}..if.(Plat |
ab8e0 | 66 6f 72 6d 3a 3a 69 73 57 69 6e 64 6f 77 73 28 29 29 20 7b 0a 69 66 20 28 24 63 61 63 68 65 44 | form::isWindows()).{.if.($cacheD |
ab900 | 69 72 20 3d 20 50 6c 61 74 66 6f 72 6d 3a 3a 67 65 74 45 6e 76 28 27 4c 4f 43 41 4c 41 50 50 44 | ir.=.Platform::getEnv('LOCALAPPD |
ab920 | 41 54 41 27 29 29 20 7b 0a 24 63 61 63 68 65 44 69 72 20 2e 3d 20 27 2f 43 6f 6d 70 6f 73 65 72 | ATA')).{.$cacheDir..=.'/Composer |
ab940 | 27 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 63 61 63 68 65 44 69 72 20 3d 20 24 68 6f 6d 65 20 2e 20 | ';.}.else.{.$cacheDir.=.$home... |
ab960 | 27 2f 63 61 63 68 65 27 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 72 74 72 69 6d 28 73 74 72 74 72 28 | '/cache';.}..return.rtrim(strtr( |
ab980 | 24 63 61 63 68 65 44 69 72 2c 20 27 5c 5c 27 2c 20 27 2f 27 29 2c 20 27 2f 27 29 3b 0a 7d 0a 0a | $cacheDir,.'\\',.'/'),.'/');.}.. |
ab9a0 | 24 75 73 65 72 44 69 72 20 3d 20 73 65 6c 66 3a 3a 67 65 74 55 73 65 72 44 69 72 28 29 3b 0a 69 | $userDir.=.self::getUserDir();.i |
ab9c0 | 66 20 28 50 48 50 5f 4f 53 20 3d 3d 3d 20 27 44 61 72 77 69 6e 27 29 20 7b 0a 0a 69 66 20 28 69 | f.(PHP_OS.===.'Darwin').{..if.(i |
ab9e0 | 73 5f 64 69 72 28 24 68 6f 6d 65 20 2e 20 27 2f 63 61 63 68 65 27 29 20 26 26 20 21 69 73 5f 64 | s_dir($home...'/cache').&&.!is_d |
aba00 | 69 72 28 24 75 73 65 72 44 69 72 20 2e 20 27 2f 4c 69 62 72 61 72 79 2f 43 61 63 68 65 73 2f 63 | ir($userDir...'/Library/Caches/c |
aba20 | 6f 6d 70 6f 73 65 72 27 29 29 20 7b 0a 53 69 6c 65 6e 63 65 72 3a 3a 63 61 6c 6c 28 27 72 65 6e | omposer')).{.Silencer::call('ren |
aba40 | 61 6d 65 27 2c 20 24 68 6f 6d 65 20 2e 20 27 2f 63 61 63 68 65 27 2c 20 24 75 73 65 72 44 69 72 | ame',.$home...'/cache',.$userDir |
aba60 | 20 2e 20 27 2f 4c 69 62 72 61 72 79 2f 43 61 63 68 65 73 2f 63 6f 6d 70 6f 73 65 72 27 29 3b 0a | ...'/Library/Caches/composer');. |
aba80 | 7d 0a 0a 72 65 74 75 72 6e 20 24 75 73 65 72 44 69 72 20 2e 20 27 2f 4c 69 62 72 61 72 79 2f 43 | }..return.$userDir...'/Library/C |
abaa0 | 61 63 68 65 73 2f 63 6f 6d 70 6f 73 65 72 27 3b 0a 7d 0a 0a 69 66 20 28 24 68 6f 6d 65 20 3d 3d | aches/composer';.}..if.($home.== |
abac0 | 3d 20 24 75 73 65 72 44 69 72 20 2e 20 27 2f 2e 63 6f 6d 70 6f 73 65 72 27 20 26 26 20 69 73 5f | =.$userDir...'/.composer'.&&.is_ |
abae0 | 64 69 72 28 24 68 6f 6d 65 20 2e 20 27 2f 63 61 63 68 65 27 29 29 20 7b 0a 72 65 74 75 72 6e 20 | dir($home...'/cache')).{.return. |
abb00 | 24 68 6f 6d 65 20 2e 20 27 2f 63 61 63 68 65 27 3b 0a 7d 0a 0a 69 66 20 28 73 65 6c 66 3a 3a 75 | $home...'/cache';.}..if.(self::u |
abb20 | 73 65 58 64 67 28 29 29 20 7b 0a 24 78 64 67 43 61 63 68 65 20 3d 20 50 6c 61 74 66 6f 72 6d 3a | seXdg()).{.$xdgCache.=.Platform: |
abb40 | 3a 67 65 74 45 6e 76 28 27 58 44 47 5f 43 41 43 48 45 5f 48 4f 4d 45 27 29 20 3f 3a 20 24 75 73 | :getEnv('XDG_CACHE_HOME').?:.$us |
abb60 | 65 72 44 69 72 20 2e 20 27 2f 2e 63 61 63 68 65 27 3b 0a 0a 72 65 74 75 72 6e 20 24 78 64 67 43 | erDir...'/.cache';..return.$xdgC |
abb80 | 61 63 68 65 20 2e 20 27 2f 63 6f 6d 70 6f 73 65 72 27 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 68 | ache...'/composer';.}..return.$h |
abba0 | 6f 6d 65 20 2e 20 27 2f 63 61 63 68 65 27 3b 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 73 74 61 | ome...'/cache';.}..protected.sta |
abbc0 | 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 44 61 74 61 44 69 72 28 73 74 72 69 6e 67 20 24 | tic.function.getDataDir(string.$ |
abbe0 | 68 6f 6d 65 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 24 68 6f 6d 65 45 6e 76 20 3d 20 50 6c 61 74 66 | home):.string.{.$homeEnv.=.Platf |
abc00 | 6f 72 6d 3a 3a 67 65 74 45 6e 76 28 27 43 4f 4d 50 4f 53 45 52 5f 48 4f 4d 45 27 29 3b 0a 69 66 | orm::getEnv('COMPOSER_HOME');.if |
abc20 | 20 28 24 68 6f 6d 65 45 6e 76 29 20 7b 0a 72 65 74 75 72 6e 20 24 68 6f 6d 65 45 6e 76 3b 0a 7d | .($homeEnv).{.return.$homeEnv;.} |
abc40 | 0a 0a 69 66 20 28 50 6c 61 74 66 6f 72 6d 3a 3a 69 73 57 69 6e 64 6f 77 73 28 29 29 20 7b 0a 72 | ..if.(Platform::isWindows()).{.r |
abc60 | 65 74 75 72 6e 20 73 74 72 74 72 28 24 68 6f 6d 65 2c 20 27 5c 5c 27 2c 20 27 2f 27 29 3b 0a 7d | eturn.strtr($home,.'\\',.'/');.} |
abc80 | 0a 0a 24 75 73 65 72 44 69 72 20 3d 20 73 65 6c 66 3a 3a 67 65 74 55 73 65 72 44 69 72 28 29 3b | ..$userDir.=.self::getUserDir(); |
abca0 | 0a 69 66 20 28 24 68 6f 6d 65 20 21 3d 3d 20 24 75 73 65 72 44 69 72 20 2e 20 27 2f 2e 63 6f 6d | .if.($home.!==.$userDir...'/.com |
abcc0 | 70 6f 73 65 72 27 20 26 26 20 73 65 6c 66 3a 3a 75 73 65 58 64 67 28 29 29 20 7b 0a 24 78 64 67 | poser'.&&.self::useXdg()).{.$xdg |
abce0 | 44 61 74 61 20 3d 20 50 6c 61 74 66 6f 72 6d 3a 3a 67 65 74 45 6e 76 28 27 58 44 47 5f 44 41 54 | Data.=.Platform::getEnv('XDG_DAT |
abd00 | 41 5f 48 4f 4d 45 27 29 20 3f 3a 20 24 75 73 65 72 44 69 72 20 2e 20 27 2f 2e 6c 6f 63 61 6c 2f | A_HOME').?:.$userDir...'/.local/ |
abd20 | 73 68 61 72 65 27 3b 0a 0a 72 65 74 75 72 6e 20 24 78 64 67 44 61 74 61 20 2e 20 27 2f 63 6f 6d | share';..return.$xdgData...'/com |
abd40 | 70 6f 73 65 72 27 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 68 6f 6d 65 3b 0a 7d 0a 0a 70 75 62 6c | poser';.}..return.$home;.}..publ |
abd60 | 69 63 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 63 72 65 61 74 65 43 6f 6e 66 69 67 28 | ic.static.function.createConfig( |
abd80 | 3f 49 4f 49 6e 74 65 72 66 61 63 65 20 24 69 6f 20 3d 20 6e 75 6c 6c 2c 20 3f 73 74 72 69 6e 67 | ?IOInterface.$io.=.null,.?string |
abda0 | 20 24 63 77 64 20 3d 20 6e 75 6c 6c 29 3a 20 43 6f 6e 66 69 67 0a 7b 0a 24 63 77 64 20 3d 20 24 | .$cwd.=.null):.Config.{.$cwd.=.$ |
abdc0 | 63 77 64 20 3f 3f 20 50 6c 61 74 66 6f 72 6d 3a 3a 67 65 74 43 77 64 28 74 72 75 65 29 3b 0a 0a | cwd.??.Platform::getCwd(true);.. |
abde0 | 24 63 6f 6e 66 69 67 20 3d 20 6e 65 77 20 43 6f 6e 66 69 67 28 74 72 75 65 2c 20 24 63 77 64 29 | $config.=.new.Config(true,.$cwd) |
abe00 | 3b 0a 0a 0a 24 68 6f 6d 65 20 3d 20 73 65 6c 66 3a 3a 67 65 74 48 6f 6d 65 44 69 72 28 29 3b 0a | ;...$home.=.self::getHomeDir();. |
abe20 | 24 63 6f 6e 66 69 67 2d 3e 6d 65 72 67 65 28 5b 0a 27 63 6f 6e 66 69 67 27 20 3d 3e 20 5b 0a 27 | $config->merge([.'config'.=>.[.' |
abe40 | 68 6f 6d 65 27 20 3d 3e 20 24 68 6f 6d 65 2c 0a 27 63 61 63 68 65 2d 64 69 72 27 20 3d 3e 20 73 | home'.=>.$home,.'cache-dir'.=>.s |
abe60 | 65 6c 66 3a 3a 67 65 74 43 61 63 68 65 44 69 72 28 24 68 6f 6d 65 29 2c 0a 27 64 61 74 61 2d 64 | elf::getCacheDir($home),.'data-d |
abe80 | 69 72 27 20 3d 3e 20 73 65 6c 66 3a 3a 67 65 74 44 61 74 61 44 69 72 28 24 68 6f 6d 65 29 2c 0a | ir'.=>.self::getDataDir($home),. |
abea0 | 5d 2c 0a 5d 2c 20 43 6f 6e 66 69 67 3a 3a 53 4f 55 52 43 45 5f 44 45 46 41 55 4c 54 29 3b 0a 0a | ],.],.Config::SOURCE_DEFAULT);.. |
abec0 | 0a 24 66 69 6c 65 20 3d 20 6e 65 77 20 4a 73 6f 6e 46 69 6c 65 28 24 63 6f 6e 66 69 67 2d 3e 67 | .$file.=.new.JsonFile($config->g |
abee0 | 65 74 28 27 68 6f 6d 65 27 29 2e 27 2f 63 6f 6e 66 69 67 2e 6a 73 6f 6e 27 29 3b 0a 69 66 20 28 | et('home').'/config.json');.if.( |
abf00 | 24 66 69 6c 65 2d 3e 65 78 69 73 74 73 28 29 29 20 7b 0a 69 66 20 28 24 69 6f 20 69 6e 73 74 61 | $file->exists()).{.if.($io.insta |
abf20 | 6e 63 65 6f 66 20 49 4f 49 6e 74 65 72 66 61 63 65 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 | nceof.IOInterface).{.$io->writeE |
abf40 | 72 72 6f 72 28 27 4c 6f 61 64 69 6e 67 20 63 6f 6e 66 69 67 20 66 69 6c 65 20 27 20 2e 20 24 66 | rror('Loading.config.file.'...$f |
abf60 | 69 6c 65 2d 3e 67 65 74 50 61 74 68 28 29 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 61 63 | ile->getPath(),.true,.IOInterfac |
abf80 | 65 3a 3a 44 45 42 55 47 29 3b 0a 7d 0a 73 65 6c 66 3a 3a 76 61 6c 69 64 61 74 65 4a 73 6f 6e 53 | e::DEBUG);.}.self::validateJsonS |
abfa0 | 63 68 65 6d 61 28 24 69 6f 2c 20 24 66 69 6c 65 29 3b 0a 24 63 6f 6e 66 69 67 2d 3e 6d 65 72 67 | chema($io,.$file);.$config->merg |
abfc0 | 65 28 24 66 69 6c 65 2d 3e 72 65 61 64 28 29 2c 20 24 66 69 6c 65 2d 3e 67 65 74 50 61 74 68 28 | e($file->read(),.$file->getPath( |
abfe0 | 29 29 3b 0a 7d 0a 24 63 6f 6e 66 69 67 2d 3e 73 65 74 43 6f 6e 66 69 67 53 6f 75 72 63 65 28 6e | ));.}.$config->setConfigSource(n |
ac000 | 65 77 20 4a 73 6f 6e 43 6f 6e 66 69 67 53 6f 75 72 63 65 28 24 66 69 6c 65 29 29 3b 0a 0a 24 68 | ew.JsonConfigSource($file));..$h |
ac020 | 74 61 63 63 65 73 73 50 72 6f 74 65 63 74 20 3d 20 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 68 | taccessProtect.=.$config->get('h |
ac040 | 74 61 63 63 65 73 73 2d 70 72 6f 74 65 63 74 27 29 3b 0a 69 66 20 28 24 68 74 61 63 63 65 73 73 | taccess-protect');.if.($htaccess |
ac060 | 50 72 6f 74 65 63 74 29 20 7b 0a 0a 0a 0a 24 64 69 72 73 20 3d 20 5b 24 63 6f 6e 66 69 67 2d 3e | Protect).{....$dirs.=.[$config-> |
ac080 | 67 65 74 28 27 68 6f 6d 65 27 29 2c 20 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 63 61 63 68 65 | get('home'),.$config->get('cache |
ac0a0 | 2d 64 69 72 27 29 2c 20 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 64 61 74 61 2d 64 69 72 27 29 | -dir'),.$config->get('data-dir') |
ac0c0 | 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 64 69 72 73 20 61 73 20 24 64 69 72 29 20 7b 0a 69 66 20 | ];.foreach.($dirs.as.$dir).{.if. |
ac0e0 | 28 21 66 69 6c 65 5f 65 78 69 73 74 73 28 24 64 69 72 20 2e 20 27 2f 2e 68 74 61 63 63 65 73 73 | (!file_exists($dir...'/.htaccess |
ac100 | 27 29 29 20 7b 0a 69 66 20 28 21 69 73 5f 64 69 72 28 24 64 69 72 29 29 20 7b 0a 53 69 6c 65 6e | ')).{.if.(!is_dir($dir)).{.Silen |
ac120 | 63 65 72 3a 3a 63 61 6c 6c 28 27 6d 6b 64 69 72 27 2c 20 24 64 69 72 2c 20 30 37 37 37 2c 20 74 | cer::call('mkdir',.$dir,.0777,.t |
ac140 | 72 75 65 29 3b 0a 7d 0a 53 69 6c 65 6e 63 65 72 3a 3a 63 61 6c 6c 28 27 66 69 6c 65 5f 70 75 74 | rue);.}.Silencer::call('file_put |
ac160 | 5f 63 6f 6e 74 65 6e 74 73 27 2c 20 24 64 69 72 20 2e 20 27 2f 2e 68 74 61 63 63 65 73 73 27 2c | _contents',.$dir...'/.htaccess', |
ac180 | 20 27 44 65 6e 79 20 66 72 6f 6d 20 61 6c 6c 27 29 3b 0a 7d 0a 7d 0a 7d 0a 0a 0a 24 66 69 6c 65 | .'Deny.from.all');.}.}.}...$file |
ac1a0 | 20 3d 20 6e 65 77 20 4a 73 6f 6e 46 69 6c 65 28 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 68 6f | .=.new.JsonFile($config->get('ho |
ac1c0 | 6d 65 27 29 2e 27 2f 61 75 74 68 2e 6a 73 6f 6e 27 29 3b 0a 69 66 20 28 24 66 69 6c 65 2d 3e 65 | me').'/auth.json');.if.($file->e |
ac1e0 | 78 69 73 74 73 28 29 29 20 7b 0a 69 66 20 28 24 69 6f 20 69 6e 73 74 61 6e 63 65 6f 66 20 49 4f | xists()).{.if.($io.instanceof.IO |
ac200 | 49 6e 74 65 72 66 61 63 65 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 4c 6f | Interface).{.$io->writeError('Lo |
ac220 | 61 64 69 6e 67 20 63 6f 6e 66 69 67 20 66 69 6c 65 20 27 20 2e 20 24 66 69 6c 65 2d 3e 67 65 74 | ading.config.file.'...$file->get |
ac240 | 50 61 74 68 28 29 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 3a 3a 44 45 42 55 47 | Path(),.true,.IOInterface::DEBUG |
ac260 | 29 3b 0a 7d 0a 73 65 6c 66 3a 3a 76 61 6c 69 64 61 74 65 4a 73 6f 6e 53 63 68 65 6d 61 28 24 69 | );.}.self::validateJsonSchema($i |
ac280 | 6f 2c 20 24 66 69 6c 65 2c 20 4a 73 6f 6e 46 69 6c 65 3a 3a 41 55 54 48 5f 53 43 48 45 4d 41 29 | o,.$file,.JsonFile::AUTH_SCHEMA) |
ac2a0 | 3b 0a 24 63 6f 6e 66 69 67 2d 3e 6d 65 72 67 65 28 5b 27 63 6f 6e 66 69 67 27 20 3d 3e 20 24 66 | ;.$config->merge(['config'.=>.$f |
ac2c0 | 69 6c 65 2d 3e 72 65 61 64 28 29 5d 2c 20 24 66 69 6c 65 2d 3e 67 65 74 50 61 74 68 28 29 29 3b | ile->read()],.$file->getPath()); |
ac2e0 | 0a 7d 0a 24 63 6f 6e 66 69 67 2d 3e 73 65 74 41 75 74 68 43 6f 6e 66 69 67 53 6f 75 72 63 65 28 | .}.$config->setAuthConfigSource( |
ac300 | 6e 65 77 20 4a 73 6f 6e 43 6f 6e 66 69 67 53 6f 75 72 63 65 28 24 66 69 6c 65 2c 20 74 72 75 65 | new.JsonConfigSource($file,.true |
ac320 | 29 29 3b 0a 0a 0a 69 66 20 28 24 63 6f 6d 70 6f 73 65 72 41 75 74 68 45 6e 76 20 3d 20 50 6c 61 | ));...if.($composerAuthEnv.=.Pla |
ac340 | 74 66 6f 72 6d 3a 3a 67 65 74 45 6e 76 28 27 43 4f 4d 50 4f 53 45 52 5f 41 55 54 48 27 29 29 20 | tform::getEnv('COMPOSER_AUTH')). |
ac360 | 7b 0a 24 61 75 74 68 44 61 74 61 20 3d 20 6a 73 6f 6e 5f 64 65 63 6f 64 65 28 24 63 6f 6d 70 6f | {.$authData.=.json_decode($compo |
ac380 | 73 65 72 41 75 74 68 45 6e 76 29 3b 0a 69 66 20 28 6e 75 6c 6c 20 3d 3d 3d 20 24 61 75 74 68 44 | serAuthEnv);.if.(null.===.$authD |
ac3a0 | 61 74 61 29 20 7b 0a 69 66 20 28 24 69 6f 20 69 6e 73 74 61 6e 63 65 6f 66 20 49 4f 49 6e 74 65 | ata).{.if.($io.instanceof.IOInte |
ac3c0 | 72 66 61 63 65 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 65 72 72 6f 72 | rface).{.$io->writeError('<error |
ac3e0 | 3e 43 4f 4d 50 4f 53 45 52 5f 41 55 54 48 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 | >COMPOSER_AUTH.environment.varia |
ac400 | 62 6c 65 20 69 73 20 6d 61 6c 66 6f 72 6d 65 64 2c 20 73 68 6f 75 6c 64 20 62 65 20 61 20 76 61 | ble.is.malformed,.should.be.a.va |
ac420 | 6c 69 64 20 4a 53 4f 4e 20 6f 62 6a 65 63 74 3c 2f 65 72 72 6f 72 3e 27 29 3b 0a 7d 0a 7d 20 65 | lid.JSON.object</error>');.}.}.e |
ac440 | 6c 73 65 20 7b 0a 69 66 20 28 24 69 6f 20 69 6e 73 74 61 6e 63 65 6f 66 20 49 4f 49 6e 74 65 72 | lse.{.if.($io.instanceof.IOInter |
ac460 | 66 61 63 65 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 4c 6f 61 64 69 6e 67 | face).{.$io->writeError('Loading |
ac480 | 20 61 75 74 68 20 63 6f 6e 66 69 67 20 66 72 6f 6d 20 43 4f 4d 50 4f 53 45 52 5f 41 55 54 48 27 | .auth.config.from.COMPOSER_AUTH' |
ac4a0 | 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 3a 3a 44 45 42 55 47 29 3b 0a 7d 0a 73 | ,.true,.IOInterface::DEBUG);.}.s |
ac4c0 | 65 6c 66 3a 3a 76 61 6c 69 64 61 74 65 4a 73 6f 6e 53 63 68 65 6d 61 28 24 69 6f 2c 20 24 61 75 | elf::validateJsonSchema($io,.$au |
ac4e0 | 74 68 44 61 74 61 2c 20 4a 73 6f 6e 46 69 6c 65 3a 3a 41 55 54 48 5f 53 43 48 45 4d 41 2c 20 27 | thData,.JsonFile::AUTH_SCHEMA,.' |
ac500 | 43 4f 4d 50 4f 53 45 52 5f 41 55 54 48 27 29 3b 0a 24 61 75 74 68 44 61 74 61 20 3d 20 6a 73 6f | COMPOSER_AUTH');.$authData.=.jso |
ac520 | 6e 5f 64 65 63 6f 64 65 28 24 63 6f 6d 70 6f 73 65 72 41 75 74 68 45 6e 76 2c 20 74 72 75 65 29 | n_decode($composerAuthEnv,.true) |
ac540 | 3b 0a 69 66 20 28 6e 75 6c 6c 20 21 3d 3d 20 24 61 75 74 68 44 61 74 61 29 20 7b 0a 24 63 6f 6e | ;.if.(null.!==.$authData).{.$con |
ac560 | 66 69 67 2d 3e 6d 65 72 67 65 28 5b 27 63 6f 6e 66 69 67 27 20 3d 3e 20 24 61 75 74 68 44 61 74 | fig->merge(['config'.=>.$authDat |
ac580 | 61 5d 2c 20 27 43 4f 4d 50 4f 53 45 52 5f 41 55 54 48 27 29 3b 0a 7d 0a 7d 0a 7d 0a 0a 72 65 74 | a],.'COMPOSER_AUTH');.}.}.}..ret |
ac5a0 | 75 72 6e 20 24 63 6f 6e 66 69 67 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 66 75 | urn.$config;.}..public.static.fu |
ac5c0 | 6e 63 74 69 6f 6e 20 67 65 74 43 6f 6d 70 6f 73 65 72 46 69 6c 65 28 29 3a 20 73 74 72 69 6e 67 | nction.getComposerFile():.string |
ac5e0 | 0a 7b 0a 72 65 74 75 72 6e 20 74 72 69 6d 28 28 73 74 72 69 6e 67 29 20 50 6c 61 74 66 6f 72 6d | .{.return.trim((string).Platform |
ac600 | 3a 3a 67 65 74 45 6e 76 28 27 43 4f 4d 50 4f 53 45 52 27 29 29 20 3f 3a 20 27 2e 2f 63 6f 6d 70 | ::getEnv('COMPOSER')).?:.'./comp |
ac620 | 6f 73 65 72 2e 6a 73 6f 6e 27 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 66 75 6e | oser.json';.}..public.static.fun |
ac640 | 63 74 69 6f 6e 20 67 65 74 4c 6f 63 6b 46 69 6c 65 28 73 74 72 69 6e 67 20 24 63 6f 6d 70 6f 73 | ction.getLockFile(string.$compos |
ac660 | 65 72 46 69 6c 65 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 22 6a 73 6f 6e 22 20 | erFile):.string.{.return."json". |
ac680 | 3d 3d 3d 20 70 61 74 68 69 6e 66 6f 28 24 63 6f 6d 70 6f 73 65 72 46 69 6c 65 2c 20 50 41 54 48 | ===.pathinfo($composerFile,.PATH |
ac6a0 | 49 4e 46 4f 5f 45 58 54 45 4e 53 49 4f 4e 29 0a 3f 20 73 75 62 73 74 72 28 24 63 6f 6d 70 6f 73 | INFO_EXTENSION).?.substr($compos |
ac6c0 | 65 72 46 69 6c 65 2c 20 30 2c 20 2d 34 29 2e 27 6c 6f 63 6b 27 0a 3a 20 24 63 6f 6d 70 6f 73 65 | erFile,.0,.-4).'lock'.:.$compose |
ac6e0 | 72 46 69 6c 65 20 2e 20 27 2e 6c 6f 63 6b 27 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 73 74 | rFile...'.lock';.}.....public.st |
ac700 | 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 63 72 65 61 74 65 41 64 64 69 74 69 6f 6e 61 6c 53 74 | atic.function.createAdditionalSt |
ac720 | 79 6c 65 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 5b 0a 27 68 69 67 68 6c 69 | yles():.array.{.return.[.'highli |
ac740 | 67 68 74 27 20 3d 3e 20 6e 65 77 20 4f 75 74 70 75 74 46 6f 72 6d 61 74 74 65 72 53 74 79 6c 65 | ght'.=>.new.OutputFormatterStyle |
ac760 | 28 27 72 65 64 27 29 2c 0a 27 77 61 72 6e 69 6e 67 27 20 3d 3e 20 6e 65 77 20 4f 75 74 70 75 74 | ('red'),.'warning'.=>.new.Output |
ac780 | 46 6f 72 6d 61 74 74 65 72 53 74 79 6c 65 28 27 62 6c 61 63 6b 27 2c 20 27 79 65 6c 6c 6f 77 27 | FormatterStyle('black',.'yellow' |
ac7a0 | 29 2c 0a 5d 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 | ),.];.}..public.static.function. |
ac7c0 | 63 72 65 61 74 65 4f 75 74 70 75 74 28 29 3a 20 43 6f 6e 73 6f 6c 65 4f 75 74 70 75 74 0a 7b 0a | createOutput():.ConsoleOutput.{. |
ac7e0 | 24 73 74 79 6c 65 73 20 3d 20 73 65 6c 66 3a 3a 63 72 65 61 74 65 41 64 64 69 74 69 6f 6e 61 6c | $styles.=.self::createAdditional |
ac800 | 53 74 79 6c 65 73 28 29 3b 0a 24 66 6f 72 6d 61 74 74 65 72 20 3d 20 6e 65 77 20 4f 75 74 70 75 | Styles();.$formatter.=.new.Outpu |
ac820 | 74 46 6f 72 6d 61 74 74 65 72 28 66 61 6c 73 65 2c 20 24 73 74 79 6c 65 73 29 3b 0a 0a 72 65 74 | tFormatter(false,.$styles);..ret |
ac840 | 75 72 6e 20 6e 65 77 20 43 6f 6e 73 6f 6c 65 4f 75 74 70 75 74 28 43 6f 6e 73 6f 6c 65 4f 75 74 | urn.new.ConsoleOutput(ConsoleOut |
ac860 | 70 75 74 3a 3a 56 45 52 42 4f 53 49 54 59 5f 4e 4f 52 4d 41 4c 2c 20 6e 75 6c 6c 2c 20 24 66 6f | put::VERBOSITY_NORMAL,.null,.$fo |
ac880 | 72 6d 61 74 74 65 72 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 | rmatter);.}................publi |
ac8a0 | 63 20 66 75 6e 63 74 69 6f 6e 20 63 72 65 61 74 65 43 6f 6d 70 6f 73 65 72 28 49 4f 49 6e 74 65 | c.function.createComposer(IOInte |
ac8c0 | 72 66 61 63 65 20 24 69 6f 2c 20 24 6c 6f 63 61 6c 43 6f 6e 66 69 67 20 3d 20 6e 75 6c 6c 2c 20 | rface.$io,.$localConfig.=.null,. |
ac8e0 | 24 64 69 73 61 62 6c 65 50 6c 75 67 69 6e 73 20 3d 20 66 61 6c 73 65 2c 20 3f 73 74 72 69 6e 67 | $disablePlugins.=.false,.?string |
ac900 | 20 24 63 77 64 20 3d 20 6e 75 6c 6c 2c 20 62 6f 6f 6c 20 24 66 75 6c 6c 4c 6f 61 64 20 3d 20 74 | .$cwd.=.null,.bool.$fullLoad.=.t |
ac920 | 72 75 65 2c 20 62 6f 6f 6c 20 24 64 69 73 61 62 6c 65 53 63 72 69 70 74 73 20 3d 20 66 61 6c 73 | rue,.bool.$disableScripts.=.fals |
ac940 | 65 29 0a 7b 0a 0a 69 66 20 28 69 73 5f 73 74 72 69 6e 67 28 24 6c 6f 63 61 6c 43 6f 6e 66 69 67 | e).{..if.(is_string($localConfig |
ac960 | 29 20 26 26 20 69 73 5f 66 69 6c 65 28 24 6c 6f 63 61 6c 43 6f 6e 66 69 67 29 20 26 26 20 6e 75 | ).&&.is_file($localConfig).&&.nu |
ac980 | 6c 6c 20 3d 3d 3d 20 24 63 77 64 29 20 7b 0a 24 63 77 64 20 3d 20 64 69 72 6e 61 6d 65 28 24 6c | ll.===.$cwd).{.$cwd.=.dirname($l |
ac9a0 | 6f 63 61 6c 43 6f 6e 66 69 67 29 3b 0a 7d 0a 0a 24 63 77 64 20 3d 20 24 63 77 64 20 3f 3f 20 50 | ocalConfig);.}..$cwd.=.$cwd.??.P |
ac9c0 | 6c 61 74 66 6f 72 6d 3a 3a 67 65 74 43 77 64 28 74 72 75 65 29 3b 0a 0a 0a 69 66 20 28 6e 75 6c | latform::getCwd(true);...if.(nul |
ac9e0 | 6c 20 3d 3d 3d 20 24 6c 6f 63 61 6c 43 6f 6e 66 69 67 29 20 7b 0a 24 6c 6f 63 61 6c 43 6f 6e 66 | l.===.$localConfig).{.$localConf |
aca00 | 69 67 20 3d 20 73 74 61 74 69 63 3a 3a 67 65 74 43 6f 6d 70 6f 73 65 72 46 69 6c 65 28 29 3b 0a | ig.=.static::getComposerFile();. |
aca20 | 7d 0a 0a 24 6c 6f 63 61 6c 43 6f 6e 66 69 67 53 6f 75 72 63 65 20 3d 20 43 6f 6e 66 69 67 3a 3a | }..$localConfigSource.=.Config:: |
aca40 | 53 4f 55 52 43 45 5f 55 4e 4b 4e 4f 57 4e 3b 0a 69 66 20 28 69 73 5f 73 74 72 69 6e 67 28 24 6c | SOURCE_UNKNOWN;.if.(is_string($l |
aca60 | 6f 63 61 6c 43 6f 6e 66 69 67 29 29 20 7b 0a 24 63 6f 6d 70 6f 73 65 72 46 69 6c 65 20 3d 20 24 | ocalConfig)).{.$composerFile.=.$ |
aca80 | 6c 6f 63 61 6c 43 6f 6e 66 69 67 3b 0a 0a 24 66 69 6c 65 20 3d 20 6e 65 77 20 4a 73 6f 6e 46 69 | localConfig;..$file.=.new.JsonFi |
acaa0 | 6c 65 28 24 6c 6f 63 61 6c 43 6f 6e 66 69 67 2c 20 6e 75 6c 6c 2c 20 24 69 6f 29 3b 0a 0a 69 66 | le($localConfig,.null,.$io);..if |
acac0 | 20 28 21 24 66 69 6c 65 2d 3e 65 78 69 73 74 73 28 29 29 20 7b 0a 69 66 20 28 24 6c 6f 63 61 6c | .(!$file->exists()).{.if.($local |
acae0 | 43 6f 6e 66 69 67 20 3d 3d 3d 20 27 2e 2f 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 27 20 7c 7c 20 | Config.===.'./composer.json'.||. |
acb00 | 24 6c 6f 63 61 6c 43 6f 6e 66 69 67 20 3d 3d 3d 20 27 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 27 | $localConfig.===.'composer.json' |
acb20 | 29 20 7b 0a 24 6d 65 73 73 61 67 65 20 3d 20 27 43 6f 6d 70 6f 73 65 72 20 63 6f 75 6c 64 20 6e | ).{.$message.=.'Composer.could.n |
acb40 | 6f 74 20 66 69 6e 64 20 61 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 20 66 69 6c 65 20 69 6e 20 | ot.find.a.composer.json.file.in. |
acb60 | 27 2e 24 63 77 64 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 6d 65 73 73 61 67 65 20 3d 20 27 43 6f 6d | '.$cwd;.}.else.{.$message.=.'Com |
acb80 | 70 6f 73 65 72 20 63 6f 75 6c 64 20 6e 6f 74 20 66 69 6e 64 20 74 68 65 20 63 6f 6e 66 69 67 20 | poser.could.not.find.the.config. |
acba0 | 66 69 6c 65 3a 20 27 2e 24 6c 6f 63 61 6c 43 6f 6e 66 69 67 3b 0a 7d 0a 24 69 6e 73 74 72 75 63 | file:.'.$localConfig;.}.$instruc |
acbc0 | 74 69 6f 6e 73 20 3d 20 24 66 75 6c 6c 4c 6f 61 64 20 3f 20 27 54 6f 20 69 6e 69 74 69 61 6c 69 | tions.=.$fullLoad.?.'To.initiali |
acbe0 | 7a 65 20 61 20 70 72 6f 6a 65 63 74 2c 20 70 6c 65 61 73 65 20 63 72 65 61 74 65 20 61 20 63 6f | ze.a.project,.please.create.a.co |
acc00 | 6d 70 6f 73 65 72 2e 6a 73 6f 6e 20 66 69 6c 65 2e 20 53 65 65 20 68 74 74 70 73 3a 2f 2f 67 65 | mposer.json.file..See.https://ge |
acc20 | 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 67 2f 62 61 73 69 63 2d 75 73 61 67 65 27 20 3a 20 27 27 3b | tcomposer.org/basic-usage'.:.''; |
acc40 | 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 | .throw.new.\InvalidArgumentExcep |
acc60 | 74 69 6f 6e 28 24 6d 65 73 73 61 67 65 2e 50 48 50 5f 45 4f 4c 2e 24 69 6e 73 74 72 75 63 74 69 | tion($message.PHP_EOL.$instructi |
acc80 | 6f 6e 73 29 3b 0a 7d 0a 0a 69 66 20 28 21 50 6c 61 74 66 6f 72 6d 3a 3a 69 73 49 6e 70 75 74 43 | ons);.}..if.(!Platform::isInputC |
acca0 | 6f 6d 70 6c 65 74 69 6f 6e 50 72 6f 63 65 73 73 28 29 29 20 7b 0a 74 72 79 20 7b 0a 24 66 69 6c | ompletionProcess()).{.try.{.$fil |
accc0 | 65 2d 3e 76 61 6c 69 64 61 74 65 53 63 68 65 6d 61 28 4a 73 6f 6e 46 69 6c 65 3a 3a 4c 41 58 5f | e->validateSchema(JsonFile::LAX_ |
acce0 | 53 43 48 45 4d 41 29 3b 0a 7d 20 63 61 74 63 68 20 28 4a 73 6f 6e 56 61 6c 69 64 61 74 69 6f 6e | SCHEMA);.}.catch.(JsonValidation |
acd00 | 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 24 65 72 72 6f 72 73 20 3d 20 27 20 2d 20 27 20 | Exception.$e).{.$errors.=.'.-.'. |
acd20 | 2e 20 69 6d 70 6c 6f 64 65 28 50 48 50 5f 45 4f 4c 20 2e 20 27 20 2d 20 27 2c 20 24 65 2d 3e 67 | ..implode(PHP_EOL...'.-.',.$e->g |
acd40 | 65 74 45 72 72 6f 72 73 28 29 29 3b 0a 24 6d 65 73 73 61 67 65 20 3d 20 24 65 2d 3e 67 65 74 4d | etErrors());.$message.=.$e->getM |
acd60 | 65 73 73 61 67 65 28 29 20 2e 20 27 3a 27 20 2e 20 50 48 50 5f 45 4f 4c 20 2e 20 24 65 72 72 6f | essage()...':'...PHP_EOL...$erro |
acd80 | 72 73 3b 0a 74 68 72 6f 77 20 6e 65 77 20 4a 73 6f 6e 56 61 6c 69 64 61 74 69 6f 6e 45 78 63 65 | rs;.throw.new.JsonValidationExce |
acda0 | 70 74 69 6f 6e 28 24 6d 65 73 73 61 67 65 29 3b 0a 7d 0a 7d 0a 0a 24 6c 6f 63 61 6c 43 6f 6e 66 | ption($message);.}.}..$localConf |
acdc0 | 69 67 20 3d 20 24 66 69 6c 65 2d 3e 72 65 61 64 28 29 3b 0a 24 6c 6f 63 61 6c 43 6f 6e 66 69 67 | ig.=.$file->read();.$localConfig |
acde0 | 53 6f 75 72 63 65 20 3d 20 24 66 69 6c 65 2d 3e 67 65 74 50 61 74 68 28 29 3b 0a 7d 0a 0a 0a 24 | Source.=.$file->getPath();.}...$ |
ace00 | 63 6f 6e 66 69 67 20 3d 20 73 74 61 74 69 63 3a 3a 63 72 65 61 74 65 43 6f 6e 66 69 67 28 24 69 | config.=.static::createConfig($i |
ace20 | 6f 2c 20 24 63 77 64 29 3b 0a 24 63 6f 6e 66 69 67 2d 3e 6d 65 72 67 65 28 24 6c 6f 63 61 6c 43 | o,.$cwd);.$config->merge($localC |
ace40 | 6f 6e 66 69 67 2c 20 24 6c 6f 63 61 6c 43 6f 6e 66 69 67 53 6f 75 72 63 65 29 3b 0a 69 66 20 28 | onfig,.$localConfigSource);.if.( |
ace60 | 69 73 73 65 74 28 24 63 6f 6d 70 6f 73 65 72 46 69 6c 65 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 | isset($composerFile)).{.$io->wri |
ace80 | 74 65 45 72 72 6f 72 28 27 4c 6f 61 64 69 6e 67 20 63 6f 6e 66 69 67 20 66 69 6c 65 20 27 20 2e | teError('Loading.config.file.'.. |
acea0 | 20 24 63 6f 6d 70 6f 73 65 72 46 69 6c 65 20 2e 27 20 28 27 2e 72 65 61 6c 70 61 74 68 28 24 63 | .$composerFile..'.('.realpath($c |
acec0 | 6f 6d 70 6f 73 65 72 46 69 6c 65 29 2e 27 29 27 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 | omposerFile).')',.true,.IOInterf |
acee0 | 61 63 65 3a 3a 44 45 42 55 47 29 3b 0a 24 63 6f 6e 66 69 67 2d 3e 73 65 74 43 6f 6e 66 69 67 53 | ace::DEBUG);.$config->setConfigS |
acf00 | 6f 75 72 63 65 28 6e 65 77 20 4a 73 6f 6e 43 6f 6e 66 69 67 53 6f 75 72 63 65 28 6e 65 77 20 4a | ource(new.JsonConfigSource(new.J |
acf20 | 73 6f 6e 46 69 6c 65 28 72 65 61 6c 70 61 74 68 28 24 63 6f 6d 70 6f 73 65 72 46 69 6c 65 29 2c | sonFile(realpath($composerFile), |
acf40 | 20 6e 75 6c 6c 2c 20 24 69 6f 29 29 29 3b 0a 0a 24 6c 6f 63 61 6c 41 75 74 68 46 69 6c 65 20 3d | .null,.$io)));..$localAuthFile.= |
acf60 | 20 6e 65 77 20 4a 73 6f 6e 46 69 6c 65 28 64 69 72 6e 61 6d 65 28 72 65 61 6c 70 61 74 68 28 24 | .new.JsonFile(dirname(realpath($ |
acf80 | 63 6f 6d 70 6f 73 65 72 46 69 6c 65 29 29 20 2e 20 27 2f 61 75 74 68 2e 6a 73 6f 6e 27 2c 20 6e | composerFile))...'/auth.json',.n |
acfa0 | 75 6c 6c 2c 20 24 69 6f 29 3b 0a 69 66 20 28 24 6c 6f 63 61 6c 41 75 74 68 46 69 6c 65 2d 3e 65 | ull,.$io);.if.($localAuthFile->e |
acfc0 | 78 69 73 74 73 28 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 4c 6f 61 64 | xists()).{.$io->writeError('Load |
acfe0 | 69 6e 67 20 63 6f 6e 66 69 67 20 66 69 6c 65 20 27 20 2e 20 24 6c 6f 63 61 6c 41 75 74 68 46 69 | ing.config.file.'...$localAuthFi |
ad000 | 6c 65 2d 3e 67 65 74 50 61 74 68 28 29 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 | le->getPath(),.true,.IOInterface |
ad020 | 3a 3a 44 45 42 55 47 29 3b 0a 73 65 6c 66 3a 3a 76 61 6c 69 64 61 74 65 4a 73 6f 6e 53 63 68 65 | ::DEBUG);.self::validateJsonSche |
ad040 | 6d 61 28 24 69 6f 2c 20 24 6c 6f 63 61 6c 41 75 74 68 46 69 6c 65 2c 20 4a 73 6f 6e 46 69 6c 65 | ma($io,.$localAuthFile,.JsonFile |
ad060 | 3a 3a 41 55 54 48 5f 53 43 48 45 4d 41 29 3b 0a 24 63 6f 6e 66 69 67 2d 3e 6d 65 72 67 65 28 5b | ::AUTH_SCHEMA);.$config->merge([ |
ad080 | 27 63 6f 6e 66 69 67 27 20 3d 3e 20 24 6c 6f 63 61 6c 41 75 74 68 46 69 6c 65 2d 3e 72 65 61 64 | 'config'.=>.$localAuthFile->read |
ad0a0 | 28 29 5d 2c 20 24 6c 6f 63 61 6c 41 75 74 68 46 69 6c 65 2d 3e 67 65 74 50 61 74 68 28 29 29 3b | ()],.$localAuthFile->getPath()); |
ad0c0 | 0a 24 63 6f 6e 66 69 67 2d 3e 73 65 74 41 75 74 68 43 6f 6e 66 69 67 53 6f 75 72 63 65 28 6e 65 | .$config->setAuthConfigSource(ne |
ad0e0 | 77 20 4a 73 6f 6e 43 6f 6e 66 69 67 53 6f 75 72 63 65 28 24 6c 6f 63 61 6c 41 75 74 68 46 69 6c | w.JsonConfigSource($localAuthFil |
ad100 | 65 2c 20 74 72 75 65 29 29 3b 0a 7d 0a 7d 0a 0a 24 76 65 6e 64 6f 72 44 69 72 20 3d 20 24 63 6f | e,.true));.}.}..$vendorDir.=.$co |
ad120 | 6e 66 69 67 2d 3e 67 65 74 28 27 76 65 6e 64 6f 72 2d 64 69 72 27 29 3b 0a 0a 0a 24 63 6f 6d 70 | nfig->get('vendor-dir');...$comp |
ad140 | 6f 73 65 72 20 3d 20 24 66 75 6c 6c 4c 6f 61 64 20 3f 20 6e 65 77 20 43 6f 6d 70 6f 73 65 72 28 | oser.=.$fullLoad.?.new.Composer( |
ad160 | 29 20 3a 20 6e 65 77 20 50 61 72 74 69 61 6c 43 6f 6d 70 6f 73 65 72 28 29 3b 0a 24 63 6f 6d 70 | ).:.new.PartialComposer();.$comp |
ad180 | 6f 73 65 72 2d 3e 73 65 74 43 6f 6e 66 69 67 28 24 63 6f 6e 66 69 67 29 3b 0a 0a 69 66 20 28 24 | oser->setConfig($config);..if.($ |
ad1a0 | 66 75 6c 6c 4c 6f 61 64 29 20 7b 0a 0a 24 69 6f 2d 3e 6c 6f 61 64 43 6f 6e 66 69 67 75 72 61 74 | fullLoad).{..$io->loadConfigurat |
ad1c0 | 69 6f 6e 28 24 63 6f 6e 66 69 67 29 3b 0a 0a 0a 69 66 20 28 21 63 6c 61 73 73 5f 65 78 69 73 74 | ion($config);...if.(!class_exist |
ad1e0 | 73 28 27 43 6f 6d 70 6f 73 65 72 5c 49 6e 73 74 61 6c 6c 65 64 56 65 72 73 69 6f 6e 73 27 2c 20 | s('Composer\InstalledVersions',. |
ad200 | 66 61 6c 73 65 29 20 26 26 20 66 69 6c 65 5f 65 78 69 73 74 73 28 24 69 6e 73 74 61 6c 6c 65 64 | false).&&.file_exists($installed |
ad220 | 56 65 72 73 69 6f 6e 73 50 61 74 68 20 3d 20 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 76 65 6e | VersionsPath.=.$config->get('ven |
ad240 | 64 6f 72 2d 64 69 72 27 29 2e 27 2f 63 6f 6d 70 6f 73 65 72 2f 49 6e 73 74 61 6c 6c 65 64 56 65 | dor-dir').'/composer/InstalledVe |
ad260 | 72 73 69 6f 6e 73 2e 70 68 70 27 29 29 20 7b 0a 69 6e 63 6c 75 64 65 20 24 69 6e 73 74 61 6c 6c | rsions.php')).{.include.$install |
ad280 | 65 64 56 65 72 73 69 6f 6e 73 50 61 74 68 3b 0a 7d 0a 7d 0a 0a 24 68 74 74 70 44 6f 77 6e 6c 6f | edVersionsPath;.}.}..$httpDownlo |
ad2a0 | 61 64 65 72 20 3d 20 73 65 6c 66 3a 3a 63 72 65 61 74 65 48 74 74 70 44 6f 77 6e 6c 6f 61 64 65 | ader.=.self::createHttpDownloade |
ad2c0 | 72 28 24 69 6f 2c 20 24 63 6f 6e 66 69 67 29 3b 0a 24 70 72 6f 63 65 73 73 20 3d 20 6e 65 77 20 | r($io,.$config);.$process.=.new. |
ad2e0 | 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 28 24 69 6f 29 3b 0a 24 6c 6f 6f 70 20 3d 20 6e 65 | ProcessExecutor($io);.$loop.=.ne |
ad300 | 77 20 4c 6f 6f 70 28 24 68 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 2c 20 24 70 72 6f 63 65 73 73 | w.Loop($httpDownloader,.$process |
ad320 | 29 3b 0a 24 63 6f 6d 70 6f 73 65 72 2d 3e 73 65 74 4c 6f 6f 70 28 24 6c 6f 6f 70 29 3b 0a 0a 0a | );.$composer->setLoop($loop);... |
ad340 | 24 64 69 73 70 61 74 63 68 65 72 20 3d 20 6e 65 77 20 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 | $dispatcher.=.new.EventDispatche |
ad360 | 72 28 24 63 6f 6d 70 6f 73 65 72 2c 20 24 69 6f 2c 20 24 70 72 6f 63 65 73 73 29 3b 0a 24 64 69 | r($composer,.$io,.$process);.$di |
ad380 | 73 70 61 74 63 68 65 72 2d 3e 73 65 74 52 75 6e 53 63 72 69 70 74 73 28 21 24 64 69 73 61 62 6c | spatcher->setRunScripts(!$disabl |
ad3a0 | 65 53 63 72 69 70 74 73 29 3b 0a 24 63 6f 6d 70 6f 73 65 72 2d 3e 73 65 74 45 76 65 6e 74 44 69 | eScripts);.$composer->setEventDi |
ad3c0 | 73 70 61 74 63 68 65 72 28 24 64 69 73 70 61 74 63 68 65 72 29 3b 0a 0a 0a 24 72 6d 20 3d 20 52 | spatcher($dispatcher);...$rm.=.R |
ad3e0 | 65 70 6f 73 69 74 6f 72 79 46 61 63 74 6f 72 79 3a 3a 6d 61 6e 61 67 65 72 28 24 69 6f 2c 20 24 | epositoryFactory::manager($io,.$ |
ad400 | 63 6f 6e 66 69 67 2c 20 24 68 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 2c 20 24 64 69 73 70 61 74 | config,.$httpDownloader,.$dispat |
ad420 | 63 68 65 72 2c 20 24 70 72 6f 63 65 73 73 29 3b 0a 24 63 6f 6d 70 6f 73 65 72 2d 3e 73 65 74 52 | cher,.$process);.$composer->setR |
ad440 | 65 70 6f 73 69 74 6f 72 79 4d 61 6e 61 67 65 72 28 24 72 6d 29 3b 0a 0a 0a 0a 69 66 20 28 21 24 | epositoryManager($rm);....if.(!$ |
ad460 | 66 75 6c 6c 4c 6f 61 64 20 26 26 20 21 69 73 73 65 74 28 24 6c 6f 63 61 6c 43 6f 6e 66 69 67 5b | fullLoad.&&.!isset($localConfig[ |
ad480 | 27 76 65 72 73 69 6f 6e 27 5d 29 29 20 7b 0a 24 6c 6f 63 61 6c 43 6f 6e 66 69 67 5b 27 76 65 72 | 'version'])).{.$localConfig['ver |
ad4a0 | 73 69 6f 6e 27 5d 20 3d 20 27 31 2e 30 2e 30 27 3b 0a 7d 0a 0a 0a 24 70 61 72 73 65 72 20 3d 20 | sion'].=.'1.0.0';.}...$parser.=. |
ad4c0 | 6e 65 77 20 56 65 72 73 69 6f 6e 50 61 72 73 65 72 3b 0a 24 67 75 65 73 73 65 72 20 3d 20 6e 65 | new.VersionParser;.$guesser.=.ne |
ad4e0 | 77 20 56 65 72 73 69 6f 6e 47 75 65 73 73 65 72 28 24 63 6f 6e 66 69 67 2c 20 24 70 72 6f 63 65 | w.VersionGuesser($config,.$proce |
ad500 | 73 73 2c 20 24 70 61 72 73 65 72 29 3b 0a 24 6c 6f 61 64 65 72 20 3d 20 24 74 68 69 73 2d 3e 6c | ss,.$parser);.$loader.=.$this->l |
ad520 | 6f 61 64 52 6f 6f 74 50 61 63 6b 61 67 65 28 24 72 6d 2c 20 24 63 6f 6e 66 69 67 2c 20 24 70 61 | oadRootPackage($rm,.$config,.$pa |
ad540 | 72 73 65 72 2c 20 24 67 75 65 73 73 65 72 2c 20 24 69 6f 29 3b 0a 24 70 61 63 6b 61 67 65 20 3d | rser,.$guesser,.$io);.$package.= |
ad560 | 20 24 6c 6f 61 64 65 72 2d 3e 6c 6f 61 64 28 24 6c 6f 63 61 6c 43 6f 6e 66 69 67 2c 20 27 43 6f | .$loader->load($localConfig,.'Co |
ad580 | 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 52 6f 6f 74 50 61 63 6b 61 67 65 27 2c 20 24 63 77 | mposer\Package\RootPackage',.$cw |
ad5a0 | 64 29 3b 0a 24 63 6f 6d 70 6f 73 65 72 2d 3e 73 65 74 50 61 63 6b 61 67 65 28 24 70 61 63 6b 61 | d);.$composer->setPackage($packa |
ad5c0 | 67 65 29 3b 0a 0a 0a 24 74 68 69 73 2d 3e 61 64 64 4c 6f 63 61 6c 52 65 70 6f 73 69 74 6f 72 79 | ge);...$this->addLocalRepository |
ad5e0 | 28 24 69 6f 2c 20 24 72 6d 2c 20 24 76 65 6e 64 6f 72 44 69 72 2c 20 24 70 61 63 6b 61 67 65 2c | ($io,.$rm,.$vendorDir,.$package, |
ad600 | 20 24 70 72 6f 63 65 73 73 29 3b 0a 0a 0a 24 69 6d 20 3d 20 24 74 68 69 73 2d 3e 63 72 65 61 74 | .$process);...$im.=.$this->creat |
ad620 | 65 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 72 28 24 6c 6f 6f 70 2c 20 24 69 6f 2c | eInstallationManager($loop,.$io, |
ad640 | 20 24 64 69 73 70 61 74 63 68 65 72 29 3b 0a 24 63 6f 6d 70 6f 73 65 72 2d 3e 73 65 74 49 6e 73 | .$dispatcher);.$composer->setIns |
ad660 | 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 72 28 24 69 6d 29 3b 0a 0a 69 66 20 28 24 63 6f 6d | tallationManager($im);..if.($com |
ad680 | 70 6f 73 65 72 20 69 6e 73 74 61 6e 63 65 6f 66 20 43 6f 6d 70 6f 73 65 72 29 20 7b 0a 0a 24 64 | poser.instanceof.Composer).{..$d |
ad6a0 | 6d 20 3d 20 24 74 68 69 73 2d 3e 63 72 65 61 74 65 44 6f 77 6e 6c 6f 61 64 4d 61 6e 61 67 65 72 | m.=.$this->createDownloadManager |
ad6c0 | 28 24 69 6f 2c 20 24 63 6f 6e 66 69 67 2c 20 24 68 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 2c 20 | ($io,.$config,.$httpDownloader,. |
ad6e0 | 24 70 72 6f 63 65 73 73 2c 20 24 64 69 73 70 61 74 63 68 65 72 29 3b 0a 24 63 6f 6d 70 6f 73 65 | $process,.$dispatcher);.$compose |
ad700 | 72 2d 3e 73 65 74 44 6f 77 6e 6c 6f 61 64 4d 61 6e 61 67 65 72 28 24 64 6d 29 3b 0a 0a 0a 24 67 | r->setDownloadManager($dm);...$g |
ad720 | 65 6e 65 72 61 74 6f 72 20 3d 20 6e 65 77 20 41 75 74 6f 6c 6f 61 64 47 65 6e 65 72 61 74 6f 72 | enerator.=.new.AutoloadGenerator |
ad740 | 28 24 64 69 73 70 61 74 63 68 65 72 2c 20 24 69 6f 29 3b 0a 24 63 6f 6d 70 6f 73 65 72 2d 3e 73 | ($dispatcher,.$io);.$composer->s |
ad760 | 65 74 41 75 74 6f 6c 6f 61 64 47 65 6e 65 72 61 74 6f 72 28 24 67 65 6e 65 72 61 74 6f 72 29 3b | etAutoloadGenerator($generator); |
ad780 | 0a 0a 0a 24 61 6d 20 3d 20 24 74 68 69 73 2d 3e 63 72 65 61 74 65 41 72 63 68 69 76 65 4d 61 6e | ...$am.=.$this->createArchiveMan |
ad7a0 | 61 67 65 72 28 24 63 6f 6e 66 69 67 2c 20 24 64 6d 2c 20 24 6c 6f 6f 70 29 3b 0a 24 63 6f 6d 70 | ager($config,.$dm,.$loop);.$comp |
ad7c0 | 6f 73 65 72 2d 3e 73 65 74 41 72 63 68 69 76 65 4d 61 6e 61 67 65 72 28 24 61 6d 29 3b 0a 7d 0a | oser->setArchiveManager($am);.}. |
ad7e0 | 0a 0a 24 74 68 69 73 2d 3e 63 72 65 61 74 65 44 65 66 61 75 6c 74 49 6e 73 74 61 6c 6c 65 72 73 | ..$this->createDefaultInstallers |
ad800 | 28 24 69 6d 2c 20 24 63 6f 6d 70 6f 73 65 72 2c 20 24 69 6f 2c 20 24 70 72 6f 63 65 73 73 29 3b | ($im,.$composer,.$io,.$process); |
ad820 | 0a 0a 0a 69 66 20 28 24 63 6f 6d 70 6f 73 65 72 20 69 6e 73 74 61 6e 63 65 6f 66 20 43 6f 6d 70 | ...if.($composer.instanceof.Comp |
ad840 | 6f 73 65 72 20 26 26 20 69 73 73 65 74 28 24 63 6f 6d 70 6f 73 65 72 46 69 6c 65 29 29 20 7b 0a | oser.&&.isset($composerFile)).{. |
ad860 | 24 6c 6f 63 6b 46 69 6c 65 20 3d 20 73 65 6c 66 3a 3a 67 65 74 4c 6f 63 6b 46 69 6c 65 28 24 63 | $lockFile.=.self::getLockFile($c |
ad880 | 6f 6d 70 6f 73 65 72 46 69 6c 65 29 3b 0a 69 66 20 28 21 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 | omposerFile);.if.(!$config->get( |
ad8a0 | 27 6c 6f 63 6b 27 29 20 26 26 20 66 69 6c 65 5f 65 78 69 73 74 73 28 24 6c 6f 63 6b 46 69 6c 65 | 'lock').&&.file_exists($lockFile |
ad8c0 | 29 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 77 61 72 6e 69 6e 67 3e 27 | )).{.$io->writeError('<warning>' |
ad8e0 | 2e 24 6c 6f 63 6b 46 69 6c 65 2e 27 20 69 73 20 70 72 65 73 65 6e 74 20 62 75 74 20 69 67 6e 6f | .$lockFile.'.is.present.but.igno |
ad900 | 72 65 64 20 61 73 20 74 68 65 20 22 6c 6f 63 6b 22 20 63 6f 6e 66 69 67 20 6f 70 74 69 6f 6e 20 | red.as.the."lock".config.option. |
ad920 | 69 73 20 64 69 73 61 62 6c 65 64 2e 3c 2f 77 61 72 6e 69 6e 67 3e 27 29 3b 0a 7d 0a 0a 24 6c 6f | is.disabled.</warning>');.}..$lo |
ad940 | 63 6b 65 72 20 3d 20 6e 65 77 20 50 61 63 6b 61 67 65 5c 4c 6f 63 6b 65 72 28 24 69 6f 2c 20 6e | cker.=.new.Package\Locker($io,.n |
ad960 | 65 77 20 4a 73 6f 6e 46 69 6c 65 28 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 6c 6f 63 6b 27 29 | ew.JsonFile($config->get('lock') |
ad980 | 20 3f 20 24 6c 6f 63 6b 46 69 6c 65 20 3a 20 50 6c 61 74 66 6f 72 6d 3a 3a 67 65 74 44 65 76 4e | .?.$lockFile.:.Platform::getDevN |
ad9a0 | 75 6c 6c 28 29 2c 20 6e 75 6c 6c 2c 20 24 69 6f 29 2c 20 24 69 6d 2c 20 66 69 6c 65 5f 67 65 74 | ull(),.null,.$io),.$im,.file_get |
ad9c0 | 5f 63 6f 6e 74 65 6e 74 73 28 24 63 6f 6d 70 6f 73 65 72 46 69 6c 65 29 2c 20 24 70 72 6f 63 65 | _contents($composerFile),.$proce |
ad9e0 | 73 73 29 3b 0a 24 63 6f 6d 70 6f 73 65 72 2d 3e 73 65 74 4c 6f 63 6b 65 72 28 24 6c 6f 63 6b 65 | ss);.$composer->setLocker($locke |
ada00 | 72 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 63 6f 6d 70 6f 73 65 72 20 69 6e 73 74 61 6e 63 65 | r);.}.elseif.($composer.instance |
ada20 | 6f 66 20 43 6f 6d 70 6f 73 65 72 29 20 7b 0a 24 6c 6f 63 6b 65 72 20 3d 20 6e 65 77 20 50 61 63 | of.Composer).{.$locker.=.new.Pac |
ada40 | 6b 61 67 65 5c 4c 6f 63 6b 65 72 28 24 69 6f 2c 20 6e 65 77 20 4a 73 6f 6e 46 69 6c 65 28 50 6c | kage\Locker($io,.new.JsonFile(Pl |
ada60 | 61 74 66 6f 72 6d 3a 3a 67 65 74 44 65 76 4e 75 6c 6c 28 29 2c 20 6e 75 6c 6c 2c 20 24 69 6f 29 | atform::getDevNull(),.null,.$io) |
ada80 | 2c 20 24 69 6d 2c 20 4a 73 6f 6e 46 69 6c 65 3a 3a 65 6e 63 6f 64 65 28 24 6c 6f 63 61 6c 43 6f | ,.$im,.JsonFile::encode($localCo |
adaa0 | 6e 66 69 67 29 2c 20 24 70 72 6f 63 65 73 73 29 3b 0a 24 63 6f 6d 70 6f 73 65 72 2d 3e 73 65 74 | nfig),.$process);.$composer->set |
adac0 | 4c 6f 63 6b 65 72 28 24 6c 6f 63 6b 65 72 29 3b 0a 7d 0a 0a 69 66 20 28 24 63 6f 6d 70 6f 73 65 | Locker($locker);.}..if.($compose |
adae0 | 72 20 69 6e 73 74 61 6e 63 65 6f 66 20 43 6f 6d 70 6f 73 65 72 29 20 7b 0a 24 67 6c 6f 62 61 6c | r.instanceof.Composer).{.$global |
adb00 | 43 6f 6d 70 6f 73 65 72 20 3d 20 6e 75 6c 6c 3b 0a 69 66 20 28 72 65 61 6c 70 61 74 68 28 24 63 | Composer.=.null;.if.(realpath($c |
adb20 | 6f 6e 66 69 67 2d 3e 67 65 74 28 27 68 6f 6d 65 27 29 29 20 21 3d 3d 20 24 63 77 64 29 20 7b 0a | onfig->get('home')).!==.$cwd).{. |
adb40 | 24 67 6c 6f 62 61 6c 43 6f 6d 70 6f 73 65 72 20 3d 20 24 74 68 69 73 2d 3e 63 72 65 61 74 65 47 | $globalComposer.=.$this->createG |
adb60 | 6c 6f 62 61 6c 43 6f 6d 70 6f 73 65 72 28 24 69 6f 2c 20 24 63 6f 6e 66 69 67 2c 20 24 64 69 73 | lobalComposer($io,.$config,.$dis |
adb80 | 61 62 6c 65 50 6c 75 67 69 6e 73 2c 20 24 64 69 73 61 62 6c 65 53 63 72 69 70 74 73 29 3b 0a 7d | ablePlugins,.$disableScripts);.} |
adba0 | 0a 0a 24 70 6d 20 3d 20 24 74 68 69 73 2d 3e 63 72 65 61 74 65 50 6c 75 67 69 6e 4d 61 6e 61 67 | ..$pm.=.$this->createPluginManag |
adbc0 | 65 72 28 24 69 6f 2c 20 24 63 6f 6d 70 6f 73 65 72 2c 20 24 67 6c 6f 62 61 6c 43 6f 6d 70 6f 73 | er($io,.$composer,.$globalCompos |
adbe0 | 65 72 2c 20 24 64 69 73 61 62 6c 65 50 6c 75 67 69 6e 73 29 3b 0a 24 63 6f 6d 70 6f 73 65 72 2d | er,.$disablePlugins);.$composer- |
adc00 | 3e 73 65 74 50 6c 75 67 69 6e 4d 61 6e 61 67 65 72 28 24 70 6d 29 3b 0a 0a 69 66 20 28 72 65 61 | >setPluginManager($pm);..if.(rea |
adc20 | 6c 70 61 74 68 28 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 68 6f 6d 65 27 29 29 20 3d 3d 3d 20 | lpath($config->get('home')).===. |
adc40 | 24 63 77 64 29 20 7b 0a 24 70 6d 2d 3e 73 65 74 52 75 6e 6e 69 6e 67 49 6e 47 6c 6f 62 61 6c 44 | $cwd).{.$pm->setRunningInGlobalD |
adc60 | 69 72 28 74 72 75 65 29 3b 0a 7d 0a 0a 24 70 6d 2d 3e 6c 6f 61 64 49 6e 73 74 61 6c 6c 65 64 50 | ir(true);.}..$pm->loadInstalledP |
adc80 | 6c 75 67 69 6e 73 28 29 3b 0a 7d 0a 0a 69 66 20 28 24 66 75 6c 6c 4c 6f 61 64 29 20 7b 0a 24 69 | lugins();.}..if.($fullLoad).{.$i |
adca0 | 6e 69 74 45 76 65 6e 74 20 3d 20 6e 65 77 20 45 76 65 6e 74 28 50 6c 75 67 69 6e 45 76 65 6e 74 | nitEvent.=.new.Event(PluginEvent |
adcc0 | 73 3a 3a 49 4e 49 54 29 3b 0a 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 45 76 65 6e 74 44 69 73 | s::INIT);.$composer->getEventDis |
adce0 | 70 61 74 63 68 65 72 28 29 2d 3e 64 69 73 70 61 74 63 68 28 24 69 6e 69 74 45 76 65 6e 74 2d 3e | patcher()->dispatch($initEvent-> |
add00 | 67 65 74 4e 61 6d 65 28 29 2c 20 24 69 6e 69 74 45 76 65 6e 74 29 3b 0a 0a 0a 0a 24 74 68 69 73 | getName(),.$initEvent);....$this |
add20 | 2d 3e 70 75 72 67 65 50 61 63 6b 61 67 65 73 28 24 72 6d 2d 3e 67 65 74 4c 6f 63 61 6c 52 65 70 | ->purgePackages($rm->getLocalRep |
add40 | 6f 73 69 74 6f 72 79 28 29 2c 20 24 69 6d 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 63 6f 6d 70 | ository(),.$im);.}..return.$comp |
add60 | 6f 73 65 72 3b 0a 7d 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 66 75 6e 63 74 | oser;.}......public.static.funct |
add80 | 69 6f 6e 20 63 72 65 61 74 65 47 6c 6f 62 61 6c 28 49 4f 49 6e 74 65 72 66 61 63 65 20 24 69 6f | ion.createGlobal(IOInterface.$io |
adda0 | 2c 20 62 6f 6f 6c 20 24 64 69 73 61 62 6c 65 50 6c 75 67 69 6e 73 20 3d 20 66 61 6c 73 65 2c 20 | ,.bool.$disablePlugins.=.false,. |
addc0 | 62 6f 6f 6c 20 24 64 69 73 61 62 6c 65 53 63 72 69 70 74 73 20 3d 20 66 61 6c 73 65 29 3a 20 3f | bool.$disableScripts.=.false):.? |
adde0 | 43 6f 6d 70 6f 73 65 72 0a 7b 0a 24 66 61 63 74 6f 72 79 20 3d 20 6e 65 77 20 73 74 61 74 69 63 | Composer.{.$factory.=.new.static |
ade00 | 28 29 3b 0a 0a 72 65 74 75 72 6e 20 24 66 61 63 74 6f 72 79 2d 3e 63 72 65 61 74 65 47 6c 6f 62 | ();..return.$factory->createGlob |
ade20 | 61 6c 43 6f 6d 70 6f 73 65 72 28 24 69 6f 2c 20 73 74 61 74 69 63 3a 3a 63 72 65 61 74 65 43 6f | alComposer($io,.static::createCo |
ade40 | 6e 66 69 67 28 24 69 6f 29 2c 20 24 64 69 73 61 62 6c 65 50 6c 75 67 69 6e 73 2c 20 24 64 69 73 | nfig($io),.$disablePlugins,.$dis |
ade60 | 61 62 6c 65 53 63 72 69 70 74 73 2c 20 74 72 75 65 29 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 | ableScripts,.true);.}.....protec |
ade80 | 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 61 64 64 4c 6f 63 61 6c 52 65 70 6f 73 69 74 6f 72 79 28 | ted.function.addLocalRepository( |
adea0 | 49 4f 49 6e 74 65 72 66 61 63 65 20 24 69 6f 2c 20 52 65 70 6f 73 69 74 6f 72 79 4d 61 6e 61 67 | IOInterface.$io,.RepositoryManag |
adec0 | 65 72 20 24 72 6d 2c 20 73 74 72 69 6e 67 20 24 76 65 6e 64 6f 72 44 69 72 2c 20 52 6f 6f 74 50 | er.$rm,.string.$vendorDir,.RootP |
adee0 | 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 72 6f 6f 74 50 61 63 6b 61 67 65 2c 20 3f 50 | ackageInterface.$rootPackage,.?P |
adf00 | 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 20 24 70 72 6f 63 65 73 73 20 3d 20 6e 75 6c 6c 29 3a | rocessExecutor.$process.=.null): |
adf20 | 20 76 6f 69 64 0a 7b 0a 24 66 73 20 3d 20 6e 75 6c 6c 3b 0a 69 66 20 28 24 70 72 6f 63 65 73 73 | .void.{.$fs.=.null;.if.($process |
adf40 | 29 20 7b 0a 24 66 73 20 3d 20 6e 65 77 20 46 69 6c 65 73 79 73 74 65 6d 28 24 70 72 6f 63 65 73 | ).{.$fs.=.new.Filesystem($proces |
adf60 | 73 29 3b 0a 7d 0a 0a 24 72 6d 2d 3e 73 65 74 4c 6f 63 61 6c 52 65 70 6f 73 69 74 6f 72 79 28 6e | s);.}..$rm->setLocalRepository(n |
adf80 | 65 77 20 52 65 70 6f 73 69 74 6f 72 79 5c 49 6e 73 74 61 6c 6c 65 64 46 69 6c 65 73 79 73 74 65 | ew.Repository\InstalledFilesyste |
adfa0 | 6d 52 65 70 6f 73 69 74 6f 72 79 28 6e 65 77 20 4a 73 6f 6e 46 69 6c 65 28 24 76 65 6e 64 6f 72 | mRepository(new.JsonFile($vendor |
adfc0 | 44 69 72 2e 27 2f 63 6f 6d 70 6f 73 65 72 2f 69 6e 73 74 61 6c 6c 65 64 2e 6a 73 6f 6e 27 2c 20 | Dir.'/composer/installed.json',. |
adfe0 | 6e 75 6c 6c 2c 20 24 69 6f 29 2c 20 74 72 75 65 2c 20 24 72 6f 6f 74 50 61 63 6b 61 67 65 2c 20 | null,.$io),.true,.$rootPackage,. |
ae000 | 24 66 73 29 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f | $fs));.}.......protected.functio |
ae020 | 6e 20 63 72 65 61 74 65 47 6c 6f 62 61 6c 43 6f 6d 70 6f 73 65 72 28 49 4f 49 6e 74 65 72 66 61 | n.createGlobalComposer(IOInterfa |
ae040 | 63 65 20 24 69 6f 2c 20 43 6f 6e 66 69 67 20 24 63 6f 6e 66 69 67 2c 20 24 64 69 73 61 62 6c 65 | ce.$io,.Config.$config,.$disable |
ae060 | 50 6c 75 67 69 6e 73 2c 20 62 6f 6f 6c 20 24 64 69 73 61 62 6c 65 53 63 72 69 70 74 73 2c 20 62 | Plugins,.bool.$disableScripts,.b |
ae080 | 6f 6f 6c 20 24 66 75 6c 6c 4c 6f 61 64 20 3d 20 66 61 6c 73 65 29 3a 20 3f 50 61 72 74 69 61 6c | ool.$fullLoad.=.false):.?Partial |
ae0a0 | 43 6f 6d 70 6f 73 65 72 0a 7b 0a 0a 24 64 69 73 61 62 6c 65 50 6c 75 67 69 6e 73 20 3d 20 24 64 | Composer.{..$disablePlugins.=.$d |
ae0c0 | 69 73 61 62 6c 65 50 6c 75 67 69 6e 73 20 3d 3d 3d 20 27 67 6c 6f 62 61 6c 27 20 7c 7c 20 24 64 | isablePlugins.===.'global'.||.$d |
ae0e0 | 69 73 61 62 6c 65 50 6c 75 67 69 6e 73 20 3d 3d 3d 20 74 72 75 65 3b 0a 0a 24 63 6f 6d 70 6f 73 | isablePlugins.===.true;..$compos |
ae100 | 65 72 20 3d 20 6e 75 6c 6c 3b 0a 74 72 79 20 7b 0a 24 63 6f 6d 70 6f 73 65 72 20 3d 20 24 74 68 | er.=.null;.try.{.$composer.=.$th |
ae120 | 69 73 2d 3e 63 72 65 61 74 65 43 6f 6d 70 6f 73 65 72 28 24 69 6f 2c 20 24 63 6f 6e 66 69 67 2d | is->createComposer($io,.$config- |
ae140 | 3e 67 65 74 28 27 68 6f 6d 65 27 29 20 2e 20 27 2f 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 27 2c | >get('home')...'/composer.json', |
ae160 | 20 24 64 69 73 61 62 6c 65 50 6c 75 67 69 6e 73 2c 20 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 | .$disablePlugins,.$config->get(' |
ae180 | 68 6f 6d 65 27 29 2c 20 24 66 75 6c 6c 4c 6f 61 64 2c 20 24 64 69 73 61 62 6c 65 53 63 72 69 70 | home'),.$fullLoad,.$disableScrip |
ae1a0 | 74 73 29 3b 0a 7d 20 63 61 74 63 68 20 28 5c 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 24 | ts);.}.catch.(\Exception.$e).{.$ |
ae1c0 | 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 46 61 69 6c 65 64 20 74 6f 20 69 6e 69 74 69 61 | io->writeError('Failed.to.initia |
ae1e0 | 6c 69 7a 65 20 67 6c 6f 62 61 6c 20 63 6f 6d 70 6f 73 65 72 3a 20 27 2e 24 65 2d 3e 67 65 74 4d | lize.global.composer:.'.$e->getM |
ae200 | 65 73 73 61 67 65 28 29 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 3a 3a 44 45 42 | essage(),.true,.IOInterface::DEB |
ae220 | 55 47 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 63 6f 6d 70 6f 73 65 72 3b 0a 7d 0a 0a 0a 0a 0a | UG);.}..return.$composer;.}..... |
ae240 | 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 63 72 65 61 74 65 44 6f 77 6e 6c 6f 61 64 4d | .public.function.createDownloadM |
ae260 | 61 6e 61 67 65 72 28 49 4f 49 6e 74 65 72 66 61 63 65 20 24 69 6f 2c 20 43 6f 6e 66 69 67 20 24 | anager(IOInterface.$io,.Config.$ |
ae280 | 63 6f 6e 66 69 67 2c 20 48 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 20 24 68 74 74 70 44 6f 77 6e | config,.HttpDownloader.$httpDown |
ae2a0 | 6c 6f 61 64 65 72 2c 20 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 20 24 70 72 6f 63 65 73 73 | loader,.ProcessExecutor.$process |
ae2c0 | 2c 20 3f 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 20 24 65 76 65 6e 74 44 69 73 70 61 74 63 | ,.?EventDispatcher.$eventDispatc |
ae2e0 | 68 65 72 20 3d 20 6e 75 6c 6c 29 3a 20 44 6f 77 6e 6c 6f 61 64 65 72 5c 44 6f 77 6e 6c 6f 61 64 | her.=.null):.Downloader\Download |
ae300 | 4d 61 6e 61 67 65 72 0a 7b 0a 24 63 61 63 68 65 20 3d 20 6e 75 6c 6c 3b 0a 69 66 20 28 24 63 6f | Manager.{.$cache.=.null;.if.($co |
ae320 | 6e 66 69 67 2d 3e 67 65 74 28 27 63 61 63 68 65 2d 66 69 6c 65 73 2d 74 74 6c 27 29 20 3e 20 30 | nfig->get('cache-files-ttl').>.0 |
ae340 | 29 20 7b 0a 24 63 61 63 68 65 20 3d 20 6e 65 77 20 43 61 63 68 65 28 24 69 6f 2c 20 24 63 6f 6e | ).{.$cache.=.new.Cache($io,.$con |
ae360 | 66 69 67 2d 3e 67 65 74 28 27 63 61 63 68 65 2d 66 69 6c 65 73 2d 64 69 72 27 29 2c 20 27 61 2d | fig->get('cache-files-dir'),.'a- |
ae380 | 7a 30 2d 39 5f 2e 2f 27 29 3b 0a 24 63 61 63 68 65 2d 3e 73 65 74 52 65 61 64 4f 6e 6c 79 28 24 | z0-9_./');.$cache->setReadOnly($ |
ae3a0 | 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 63 61 63 68 65 2d 72 65 61 64 2d 6f 6e 6c 79 27 29 29 3b | config->get('cache-read-only')); |
ae3c0 | 0a 7d 0a 0a 24 66 73 20 3d 20 6e 65 77 20 46 69 6c 65 73 79 73 74 65 6d 28 24 70 72 6f 63 65 73 | .}..$fs.=.new.Filesystem($proces |
ae3e0 | 73 29 3b 0a 0a 24 64 6d 20 3d 20 6e 65 77 20 44 6f 77 6e 6c 6f 61 64 65 72 5c 44 6f 77 6e 6c 6f | s);..$dm.=.new.Downloader\Downlo |
ae400 | 61 64 4d 61 6e 61 67 65 72 28 24 69 6f 2c 20 66 61 6c 73 65 2c 20 24 66 73 29 3b 0a 73 77 69 74 | adManager($io,.false,.$fs);.swit |
ae420 | 63 68 20 28 24 70 72 65 66 65 72 72 65 64 20 3d 20 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 70 | ch.($preferred.=.$config->get('p |
ae440 | 72 65 66 65 72 72 65 64 2d 69 6e 73 74 61 6c 6c 27 29 29 20 7b 0a 63 61 73 65 20 27 64 69 73 74 | referred-install')).{.case.'dist |
ae460 | 27 3a 0a 24 64 6d 2d 3e 73 65 74 50 72 65 66 65 72 44 69 73 74 28 74 72 75 65 29 3b 0a 62 72 65 | ':.$dm->setPreferDist(true);.bre |
ae480 | 61 6b 3b 0a 63 61 73 65 20 27 73 6f 75 72 63 65 27 3a 0a 24 64 6d 2d 3e 73 65 74 50 72 65 66 65 | ak;.case.'source':.$dm->setPrefe |
ae4a0 | 72 53 6f 75 72 63 65 28 74 72 75 65 29 3b 0a 62 72 65 61 6b 3b 0a 63 61 73 65 20 27 61 75 74 6f | rSource(true);.break;.case.'auto |
ae4c0 | 27 3a 0a 64 65 66 61 75 6c 74 3a 0a 0a 62 72 65 61 6b 3b 0a 7d 0a 0a 69 66 20 28 69 73 5f 61 72 | ':.default:..break;.}..if.(is_ar |
ae4e0 | 72 61 79 28 24 70 72 65 66 65 72 72 65 64 29 29 20 7b 0a 24 64 6d 2d 3e 73 65 74 50 72 65 66 65 | ray($preferred)).{.$dm->setPrefe |
ae500 | 72 65 6e 63 65 73 28 24 70 72 65 66 65 72 72 65 64 29 3b 0a 7d 0a 0a 24 64 6d 2d 3e 73 65 74 44 | rences($preferred);.}..$dm->setD |
ae520 | 6f 77 6e 6c 6f 61 64 65 72 28 27 67 69 74 27 2c 20 6e 65 77 20 44 6f 77 6e 6c 6f 61 64 65 72 5c | ownloader('git',.new.Downloader\ |
ae540 | 47 69 74 44 6f 77 6e 6c 6f 61 64 65 72 28 24 69 6f 2c 20 24 63 6f 6e 66 69 67 2c 20 24 70 72 6f | GitDownloader($io,.$config,.$pro |
ae560 | 63 65 73 73 2c 20 24 66 73 29 29 3b 0a 24 64 6d 2d 3e 73 65 74 44 6f 77 6e 6c 6f 61 64 65 72 28 | cess,.$fs));.$dm->setDownloader( |
ae580 | 27 73 76 6e 27 2c 20 6e 65 77 20 44 6f 77 6e 6c 6f 61 64 65 72 5c 53 76 6e 44 6f 77 6e 6c 6f 61 | 'svn',.new.Downloader\SvnDownloa |
ae5a0 | 64 65 72 28 24 69 6f 2c 20 24 63 6f 6e 66 69 67 2c 20 24 70 72 6f 63 65 73 73 2c 20 24 66 73 29 | der($io,.$config,.$process,.$fs) |
ae5c0 | 29 3b 0a 24 64 6d 2d 3e 73 65 74 44 6f 77 6e 6c 6f 61 64 65 72 28 27 66 6f 73 73 69 6c 27 2c 20 | );.$dm->setDownloader('fossil',. |
ae5e0 | 6e 65 77 20 44 6f 77 6e 6c 6f 61 64 65 72 5c 46 6f 73 73 69 6c 44 6f 77 6e 6c 6f 61 64 65 72 28 | new.Downloader\FossilDownloader( |
ae600 | 24 69 6f 2c 20 24 63 6f 6e 66 69 67 2c 20 24 70 72 6f 63 65 73 73 2c 20 24 66 73 29 29 3b 0a 24 | $io,.$config,.$process,.$fs));.$ |
ae620 | 64 6d 2d 3e 73 65 74 44 6f 77 6e 6c 6f 61 64 65 72 28 27 68 67 27 2c 20 6e 65 77 20 44 6f 77 6e | dm->setDownloader('hg',.new.Down |
ae640 | 6c 6f 61 64 65 72 5c 48 67 44 6f 77 6e 6c 6f 61 64 65 72 28 24 69 6f 2c 20 24 63 6f 6e 66 69 67 | loader\HgDownloader($io,.$config |
ae660 | 2c 20 24 70 72 6f 63 65 73 73 2c 20 24 66 73 29 29 3b 0a 24 64 6d 2d 3e 73 65 74 44 6f 77 6e 6c | ,.$process,.$fs));.$dm->setDownl |
ae680 | 6f 61 64 65 72 28 27 70 65 72 66 6f 72 63 65 27 2c 20 6e 65 77 20 44 6f 77 6e 6c 6f 61 64 65 72 | oader('perforce',.new.Downloader |
ae6a0 | 5c 50 65 72 66 6f 72 63 65 44 6f 77 6e 6c 6f 61 64 65 72 28 24 69 6f 2c 20 24 63 6f 6e 66 69 67 | \PerforceDownloader($io,.$config |
ae6c0 | 2c 20 24 70 72 6f 63 65 73 73 2c 20 24 66 73 29 29 3b 0a 24 64 6d 2d 3e 73 65 74 44 6f 77 6e 6c | ,.$process,.$fs));.$dm->setDownl |
ae6e0 | 6f 61 64 65 72 28 27 7a 69 70 27 2c 20 6e 65 77 20 44 6f 77 6e 6c 6f 61 64 65 72 5c 5a 69 70 44 | oader('zip',.new.Downloader\ZipD |
ae700 | 6f 77 6e 6c 6f 61 64 65 72 28 24 69 6f 2c 20 24 63 6f 6e 66 69 67 2c 20 24 68 74 74 70 44 6f 77 | ownloader($io,.$config,.$httpDow |
ae720 | 6e 6c 6f 61 64 65 72 2c 20 24 65 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 2c 20 24 63 61 63 68 | nloader,.$eventDispatcher,.$cach |
ae740 | 65 2c 20 24 66 73 2c 20 24 70 72 6f 63 65 73 73 29 29 3b 0a 24 64 6d 2d 3e 73 65 74 44 6f 77 6e | e,.$fs,.$process));.$dm->setDown |
ae760 | 6c 6f 61 64 65 72 28 27 72 61 72 27 2c 20 6e 65 77 20 44 6f 77 6e 6c 6f 61 64 65 72 5c 52 61 72 | loader('rar',.new.Downloader\Rar |
ae780 | 44 6f 77 6e 6c 6f 61 64 65 72 28 24 69 6f 2c 20 24 63 6f 6e 66 69 67 2c 20 24 68 74 74 70 44 6f | Downloader($io,.$config,.$httpDo |
ae7a0 | 77 6e 6c 6f 61 64 65 72 2c 20 24 65 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 2c 20 24 63 61 63 | wnloader,.$eventDispatcher,.$cac |
ae7c0 | 68 65 2c 20 24 66 73 2c 20 24 70 72 6f 63 65 73 73 29 29 3b 0a 24 64 6d 2d 3e 73 65 74 44 6f 77 | he,.$fs,.$process));.$dm->setDow |
ae7e0 | 6e 6c 6f 61 64 65 72 28 27 74 61 72 27 2c 20 6e 65 77 20 44 6f 77 6e 6c 6f 61 64 65 72 5c 54 61 | nloader('tar',.new.Downloader\Ta |
ae800 | 72 44 6f 77 6e 6c 6f 61 64 65 72 28 24 69 6f 2c 20 24 63 6f 6e 66 69 67 2c 20 24 68 74 74 70 44 | rDownloader($io,.$config,.$httpD |
ae820 | 6f 77 6e 6c 6f 61 64 65 72 2c 20 24 65 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 2c 20 24 63 61 | ownloader,.$eventDispatcher,.$ca |
ae840 | 63 68 65 2c 20 24 66 73 2c 20 24 70 72 6f 63 65 73 73 29 29 3b 0a 24 64 6d 2d 3e 73 65 74 44 6f | che,.$fs,.$process));.$dm->setDo |
ae860 | 77 6e 6c 6f 61 64 65 72 28 27 67 7a 69 70 27 2c 20 6e 65 77 20 44 6f 77 6e 6c 6f 61 64 65 72 5c | wnloader('gzip',.new.Downloader\ |
ae880 | 47 7a 69 70 44 6f 77 6e 6c 6f 61 64 65 72 28 24 69 6f 2c 20 24 63 6f 6e 66 69 67 2c 20 24 68 74 | GzipDownloader($io,.$config,.$ht |
ae8a0 | 74 70 44 6f 77 6e 6c 6f 61 64 65 72 2c 20 24 65 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 2c 20 | tpDownloader,.$eventDispatcher,. |
ae8c0 | 24 63 61 63 68 65 2c 20 24 66 73 2c 20 24 70 72 6f 63 65 73 73 29 29 3b 0a 24 64 6d 2d 3e 73 65 | $cache,.$fs,.$process));.$dm->se |
ae8e0 | 74 44 6f 77 6e 6c 6f 61 64 65 72 28 27 78 7a 27 2c 20 6e 65 77 20 44 6f 77 6e 6c 6f 61 64 65 72 | tDownloader('xz',.new.Downloader |
ae900 | 5c 58 7a 44 6f 77 6e 6c 6f 61 64 65 72 28 24 69 6f 2c 20 24 63 6f 6e 66 69 67 2c 20 24 68 74 74 | \XzDownloader($io,.$config,.$htt |
ae920 | 70 44 6f 77 6e 6c 6f 61 64 65 72 2c 20 24 65 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 2c 20 24 | pDownloader,.$eventDispatcher,.$ |
ae940 | 63 61 63 68 65 2c 20 24 66 73 2c 20 24 70 72 6f 63 65 73 73 29 29 3b 0a 24 64 6d 2d 3e 73 65 74 | cache,.$fs,.$process));.$dm->set |
ae960 | 44 6f 77 6e 6c 6f 61 64 65 72 28 27 70 68 61 72 27 2c 20 6e 65 77 20 44 6f 77 6e 6c 6f 61 64 65 | Downloader('phar',.new.Downloade |
ae980 | 72 5c 50 68 61 72 44 6f 77 6e 6c 6f 61 64 65 72 28 24 69 6f 2c 20 24 63 6f 6e 66 69 67 2c 20 24 | r\PharDownloader($io,.$config,.$ |
ae9a0 | 68 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 2c 20 24 65 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 | httpDownloader,.$eventDispatcher |
ae9c0 | 2c 20 24 63 61 63 68 65 2c 20 24 66 73 2c 20 24 70 72 6f 63 65 73 73 29 29 3b 0a 24 64 6d 2d 3e | ,.$cache,.$fs,.$process));.$dm-> |
ae9e0 | 73 65 74 44 6f 77 6e 6c 6f 61 64 65 72 28 27 66 69 6c 65 27 2c 20 6e 65 77 20 44 6f 77 6e 6c 6f | setDownloader('file',.new.Downlo |
aea00 | 61 64 65 72 5c 46 69 6c 65 44 6f 77 6e 6c 6f 61 64 65 72 28 24 69 6f 2c 20 24 63 6f 6e 66 69 67 | ader\FileDownloader($io,.$config |
aea20 | 2c 20 24 68 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 2c 20 24 65 76 65 6e 74 44 69 73 70 61 74 63 | ,.$httpDownloader,.$eventDispatc |
aea40 | 68 65 72 2c 20 24 63 61 63 68 65 2c 20 24 66 73 2c 20 24 70 72 6f 63 65 73 73 29 29 3b 0a 24 64 | her,.$cache,.$fs,.$process));.$d |
aea60 | 6d 2d 3e 73 65 74 44 6f 77 6e 6c 6f 61 64 65 72 28 27 70 61 74 68 27 2c 20 6e 65 77 20 44 6f 77 | m->setDownloader('path',.new.Dow |
aea80 | 6e 6c 6f 61 64 65 72 5c 50 61 74 68 44 6f 77 6e 6c 6f 61 64 65 72 28 24 69 6f 2c 20 24 63 6f 6e | nloader\PathDownloader($io,.$con |
aeaa0 | 66 69 67 2c 20 24 68 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 2c 20 24 65 76 65 6e 74 44 69 73 70 | fig,.$httpDownloader,.$eventDisp |
aeac0 | 61 74 63 68 65 72 2c 20 24 63 61 63 68 65 2c 20 24 66 73 2c 20 24 70 72 6f 63 65 73 73 29 29 3b | atcher,.$cache,.$fs,.$process)); |
aeae0 | 0a 0a 72 65 74 75 72 6e 20 24 64 6d 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e | ..return.$dm;.}.......public.fun |
aeb00 | 63 74 69 6f 6e 20 63 72 65 61 74 65 41 72 63 68 69 76 65 4d 61 6e 61 67 65 72 28 43 6f 6e 66 69 | ction.createArchiveManager(Confi |
aeb20 | 67 20 24 63 6f 6e 66 69 67 2c 20 44 6f 77 6e 6c 6f 61 64 65 72 5c 44 6f 77 6e 6c 6f 61 64 4d 61 | g.$config,.Downloader\DownloadMa |
aeb40 | 6e 61 67 65 72 20 24 64 6d 2c 20 4c 6f 6f 70 20 24 6c 6f 6f 70 29 0a 7b 0a 24 61 6d 20 3d 20 6e | nager.$dm,.Loop.$loop).{.$am.=.n |
aeb60 | 65 77 20 41 72 63 68 69 76 65 72 5c 41 72 63 68 69 76 65 4d 61 6e 61 67 65 72 28 24 64 6d 2c 20 | ew.Archiver\ArchiveManager($dm,. |
aeb80 | 24 6c 6f 6f 70 29 3b 0a 69 66 20 28 63 6c 61 73 73 5f 65 78 69 73 74 73 28 5a 69 70 41 72 63 68 | $loop);.if.(class_exists(ZipArch |
aeba0 | 69 76 65 3a 3a 63 6c 61 73 73 29 29 20 7b 0a 24 61 6d 2d 3e 61 64 64 41 72 63 68 69 76 65 72 28 | ive::class)).{.$am->addArchiver( |
aebc0 | 6e 65 77 20 41 72 63 68 69 76 65 72 5c 5a 69 70 41 72 63 68 69 76 65 72 29 3b 0a 7d 0a 69 66 20 | new.Archiver\ZipArchiver);.}.if. |
aebe0 | 28 63 6c 61 73 73 5f 65 78 69 73 74 73 28 50 68 61 72 3a 3a 63 6c 61 73 73 29 29 20 7b 0a 24 61 | (class_exists(Phar::class)).{.$a |
aec00 | 6d 2d 3e 61 64 64 41 72 63 68 69 76 65 72 28 6e 65 77 20 41 72 63 68 69 76 65 72 5c 50 68 61 72 | m->addArchiver(new.Archiver\Phar |
aec20 | 41 72 63 68 69 76 65 72 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 61 6d 3b 0a 7d 0a 0a 0a 0a 0a | Archiver);.}..return.$am;.}..... |
aec40 | 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 63 72 65 61 74 65 50 6c 75 67 69 6e 4d | protected.function.createPluginM |
aec60 | 61 6e 61 67 65 72 28 49 4f 49 6e 74 65 72 66 61 63 65 20 24 69 6f 2c 20 43 6f 6d 70 6f 73 65 72 | anager(IOInterface.$io,.Composer |
aec80 | 20 24 63 6f 6d 70 6f 73 65 72 2c 20 3f 50 61 72 74 69 61 6c 43 6f 6d 70 6f 73 65 72 20 24 67 6c | .$composer,.?PartialComposer.$gl |
aeca0 | 6f 62 61 6c 43 6f 6d 70 6f 73 65 72 20 3d 20 6e 75 6c 6c 2c 20 24 64 69 73 61 62 6c 65 50 6c 75 | obalComposer.=.null,.$disablePlu |
aecc0 | 67 69 6e 73 20 3d 20 66 61 6c 73 65 29 3a 20 50 6c 75 67 69 6e 5c 50 6c 75 67 69 6e 4d 61 6e 61 | gins.=.false):.Plugin\PluginMana |
aece0 | 67 65 72 0a 7b 0a 72 65 74 75 72 6e 20 6e 65 77 20 50 6c 75 67 69 6e 5c 50 6c 75 67 69 6e 4d 61 | ger.{.return.new.Plugin\PluginMa |
aed00 | 6e 61 67 65 72 28 24 69 6f 2c 20 24 63 6f 6d 70 6f 73 65 72 2c 20 24 67 6c 6f 62 61 6c 43 6f 6d | nager($io,.$composer,.$globalCom |
aed20 | 70 6f 73 65 72 2c 20 24 64 69 73 61 62 6c 65 50 6c 75 67 69 6e 73 29 3b 0a 7d 0a 0a 70 75 62 6c | poser,.$disablePlugins);.}..publ |
aed40 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 63 72 65 61 74 65 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 | ic.function.createInstallationMa |
aed60 | 6e 61 67 65 72 28 4c 6f 6f 70 20 24 6c 6f 6f 70 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 20 24 69 | nager(Loop.$loop,.IOInterface.$i |
aed80 | 6f 2c 20 3f 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 20 24 65 76 65 6e 74 44 69 73 70 61 74 | o,.?EventDispatcher.$eventDispat |
aeda0 | 63 68 65 72 20 3d 20 6e 75 6c 6c 29 3a 20 49 6e 73 74 61 6c 6c 65 72 5c 49 6e 73 74 61 6c 6c 61 | cher.=.null):.Installer\Installa |
aedc0 | 74 69 6f 6e 4d 61 6e 61 67 65 72 0a 7b 0a 72 65 74 75 72 6e 20 6e 65 77 20 49 6e 73 74 61 6c 6c | tionManager.{.return.new.Install |
aede0 | 65 72 5c 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 72 28 24 6c 6f 6f 70 2c 20 24 69 | er\InstallationManager($loop,.$i |
aee00 | 6f 2c 20 24 65 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 29 3b 0a 7d 0a 0a 70 72 6f 74 65 63 74 | o,.$eventDispatcher);.}..protect |
aee20 | 65 64 20 66 75 6e 63 74 69 6f 6e 20 63 72 65 61 74 65 44 65 66 61 75 6c 74 49 6e 73 74 61 6c 6c | ed.function.createDefaultInstall |
aee40 | 65 72 73 28 49 6e 73 74 61 6c 6c 65 72 5c 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 | ers(Installer\InstallationManage |
aee60 | 72 20 24 69 6d 2c 20 50 61 72 74 69 61 6c 43 6f 6d 70 6f 73 65 72 20 24 63 6f 6d 70 6f 73 65 72 | r.$im,.PartialComposer.$composer |
aee80 | 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 20 24 69 6f 2c 20 3f 50 72 6f 63 65 73 73 45 78 65 63 75 | ,.IOInterface.$io,.?ProcessExecu |
aeea0 | 74 6f 72 20 24 70 72 6f 63 65 73 73 20 3d 20 6e 75 6c 6c 29 3a 20 76 6f 69 64 0a 7b 0a 24 66 73 | tor.$process.=.null):.void.{.$fs |
aeec0 | 20 3d 20 6e 65 77 20 46 69 6c 65 73 79 73 74 65 6d 28 24 70 72 6f 63 65 73 73 29 3b 0a 24 62 69 | .=.new.Filesystem($process);.$bi |
aeee0 | 6e 61 72 79 49 6e 73 74 61 6c 6c 65 72 20 3d 20 6e 65 77 20 49 6e 73 74 61 6c 6c 65 72 5c 42 69 | naryInstaller.=.new.Installer\Bi |
aef00 | 6e 61 72 79 49 6e 73 74 61 6c 6c 65 72 28 24 69 6f 2c 20 72 74 72 69 6d 28 24 63 6f 6d 70 6f 73 | naryInstaller($io,.rtrim($compos |
aef20 | 65 72 2d 3e 67 65 74 43 6f 6e 66 69 67 28 29 2d 3e 67 65 74 28 27 62 69 6e 2d 64 69 72 27 29 2c | er->getConfig()->get('bin-dir'), |
aef40 | 20 27 2f 27 29 2c 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 43 6f 6e 66 69 67 28 29 2d 3e 67 | .'/'),.$composer->getConfig()->g |
aef60 | 65 74 28 27 62 69 6e 2d 63 6f 6d 70 61 74 27 29 2c 20 24 66 73 2c 20 72 74 72 69 6d 28 24 63 6f | et('bin-compat'),.$fs,.rtrim($co |
aef80 | 6d 70 6f 73 65 72 2d 3e 67 65 74 43 6f 6e 66 69 67 28 29 2d 3e 67 65 74 28 27 76 65 6e 64 6f 72 | mposer->getConfig()->get('vendor |
aefa0 | 2d 64 69 72 27 29 2c 20 27 2f 27 29 29 3b 0a 0a 24 69 6d 2d 3e 61 64 64 49 6e 73 74 61 6c 6c 65 | -dir'),.'/'));..$im->addInstalle |
aefc0 | 72 28 6e 65 77 20 49 6e 73 74 61 6c 6c 65 72 5c 4c 69 62 72 61 72 79 49 6e 73 74 61 6c 6c 65 72 | r(new.Installer\LibraryInstaller |
aefe0 | 28 24 69 6f 2c 20 24 63 6f 6d 70 6f 73 65 72 2c 20 6e 75 6c 6c 2c 20 24 66 73 2c 20 24 62 69 6e | ($io,.$composer,.null,.$fs,.$bin |
af000 | 61 72 79 49 6e 73 74 61 6c 6c 65 72 29 29 3b 0a 24 69 6d 2d 3e 61 64 64 49 6e 73 74 61 6c 6c 65 | aryInstaller));.$im->addInstalle |
af020 | 72 28 6e 65 77 20 49 6e 73 74 61 6c 6c 65 72 5c 50 6c 75 67 69 6e 49 6e 73 74 61 6c 6c 65 72 28 | r(new.Installer\PluginInstaller( |
af040 | 24 69 6f 2c 20 24 63 6f 6d 70 6f 73 65 72 2c 20 24 66 73 2c 20 24 62 69 6e 61 72 79 49 6e 73 74 | $io,.$composer,.$fs,.$binaryInst |
af060 | 61 6c 6c 65 72 29 29 3b 0a 24 69 6d 2d 3e 61 64 64 49 6e 73 74 61 6c 6c 65 72 28 6e 65 77 20 49 | aller));.$im->addInstaller(new.I |
af080 | 6e 73 74 61 6c 6c 65 72 5c 4d 65 74 61 70 61 63 6b 61 67 65 49 6e 73 74 61 6c 6c 65 72 28 24 69 | nstaller\MetapackageInstaller($i |
af0a0 | 6f 29 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 70 | o));.}......protected.function.p |
af0c0 | 75 72 67 65 50 61 63 6b 61 67 65 73 28 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 | urgePackages(InstalledRepository |
af0e0 | 49 6e 74 65 72 66 61 63 65 20 24 72 65 70 6f 2c 20 49 6e 73 74 61 6c 6c 65 72 5c 49 6e 73 74 61 | Interface.$repo,.Installer\Insta |
af100 | 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 72 20 24 69 6d 29 3a 20 76 6f 69 64 0a 7b 0a 66 6f 72 65 | llationManager.$im):.void.{.fore |
af120 | 61 63 68 20 28 24 72 65 70 6f 2d 3e 67 65 74 50 61 63 6b 61 67 65 73 28 29 20 61 73 20 24 70 61 | ach.($repo->getPackages().as.$pa |
af140 | 63 6b 61 67 65 29 20 7b 0a 69 66 20 28 21 24 69 6d 2d 3e 69 73 50 61 63 6b 61 67 65 49 6e 73 74 | ckage).{.if.(!$im->isPackageInst |
af160 | 61 6c 6c 65 64 28 24 72 65 70 6f 2c 20 24 70 61 63 6b 61 67 65 29 29 20 7b 0a 24 72 65 70 6f 2d | alled($repo,.$package)).{.$repo- |
af180 | 3e 72 65 6d 6f 76 65 50 61 63 6b 61 67 65 28 24 70 61 63 6b 61 67 65 29 3b 0a 7d 0a 7d 0a 7d 0a | >removePackage($package);.}.}.}. |
af1a0 | 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 6c 6f 61 64 52 6f 6f 74 50 61 63 6b | .protected.function.loadRootPack |
af1c0 | 61 67 65 28 52 65 70 6f 73 69 74 6f 72 79 4d 61 6e 61 67 65 72 20 24 72 6d 2c 20 43 6f 6e 66 69 | age(RepositoryManager.$rm,.Confi |
af1e0 | 67 20 24 63 6f 6e 66 69 67 2c 20 56 65 72 73 69 6f 6e 50 61 72 73 65 72 20 24 70 61 72 73 65 72 | g.$config,.VersionParser.$parser |
af200 | 2c 20 56 65 72 73 69 6f 6e 47 75 65 73 73 65 72 20 24 67 75 65 73 73 65 72 2c 20 49 4f 49 6e 74 | ,.VersionGuesser.$guesser,.IOInt |
af220 | 65 72 66 61 63 65 20 24 69 6f 29 3a 20 50 61 63 6b 61 67 65 5c 4c 6f 61 64 65 72 5c 52 6f 6f 74 | erface.$io):.Package\Loader\Root |
af240 | 50 61 63 6b 61 67 65 4c 6f 61 64 65 72 0a 7b 0a 72 65 74 75 72 6e 20 6e 65 77 20 50 61 63 6b 61 | PackageLoader.{.return.new.Packa |
af260 | 67 65 5c 4c 6f 61 64 65 72 5c 52 6f 6f 74 50 61 63 6b 61 67 65 4c 6f 61 64 65 72 28 24 72 6d 2c | ge\Loader\RootPackageLoader($rm, |
af280 | 20 24 63 6f 6e 66 69 67 2c 20 24 70 61 72 73 65 72 2c 20 24 67 75 65 73 73 65 72 2c 20 24 69 6f | .$config,.$parser,.$guesser,.$io |
af2a0 | 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 66 75 6e 63 74 | );.}.........public.static.funct |
af2c0 | 69 6f 6e 20 63 72 65 61 74 65 28 49 4f 49 6e 74 65 72 66 61 63 65 20 24 69 6f 2c 20 24 63 6f 6e | ion.create(IOInterface.$io,.$con |
af2e0 | 66 69 67 20 3d 20 6e 75 6c 6c 2c 20 24 64 69 73 61 62 6c 65 50 6c 75 67 69 6e 73 20 3d 20 66 61 | fig.=.null,.$disablePlugins.=.fa |
af300 | 6c 73 65 2c 20 62 6f 6f 6c 20 24 64 69 73 61 62 6c 65 53 63 72 69 70 74 73 20 3d 20 66 61 6c 73 | lse,.bool.$disableScripts.=.fals |
af320 | 65 29 3a 20 43 6f 6d 70 6f 73 65 72 0a 7b 0a 24 66 61 63 74 6f 72 79 20 3d 20 6e 65 77 20 73 74 | e):.Composer.{.$factory.=.new.st |
af340 | 61 74 69 63 28 29 3b 0a 0a 0a 0a 0a 0a 69 66 20 28 24 63 6f 6e 66 69 67 20 21 3d 3d 20 6e 75 6c | atic();......if.($config.!==.nul |
af360 | 6c 20 26 26 20 24 63 6f 6e 66 69 67 20 21 3d 3d 20 73 65 6c 66 3a 3a 67 65 74 43 6f 6d 70 6f 73 | l.&&.$config.!==.self::getCompos |
af380 | 65 72 46 69 6c 65 28 29 20 26 26 20 24 64 69 73 61 62 6c 65 50 6c 75 67 69 6e 73 20 3d 3d 3d 20 | erFile().&&.$disablePlugins.===. |
af3a0 | 66 61 6c 73 65 29 20 7b 0a 24 64 69 73 61 62 6c 65 50 6c 75 67 69 6e 73 20 3d 20 27 6c 6f 63 61 | false).{.$disablePlugins.=.'loca |
af3c0 | 6c 27 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 66 61 63 74 6f 72 79 2d 3e 63 72 65 61 74 65 43 6f | l';.}..return.$factory->createCo |
af3e0 | 6d 70 6f 73 65 72 28 24 69 6f 2c 20 24 63 6f 6e 66 69 67 2c 20 24 64 69 73 61 62 6c 65 50 6c 75 | mposer($io,.$config,.$disablePlu |
af400 | 67 69 6e 73 2c 20 6e 75 6c 6c 2c 20 74 72 75 65 2c 20 24 64 69 73 61 62 6c 65 53 63 72 69 70 74 | gins,.null,.true,.$disableScript |
af420 | 73 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 66 75 6e 63 | s);.}.........public.static.func |
af440 | 74 69 6f 6e 20 63 72 65 61 74 65 48 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 28 49 4f 49 6e 74 65 | tion.createHttpDownloader(IOInte |
af460 | 72 66 61 63 65 20 24 69 6f 2c 20 43 6f 6e 66 69 67 20 24 63 6f 6e 66 69 67 2c 20 61 72 72 61 79 | rface.$io,.Config.$config,.array |
af480 | 20 24 6f 70 74 69 6f 6e 73 20 3d 20 5b 5d 29 3a 20 48 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 0a | .$options.=.[]):.HttpDownloader. |
af4a0 | 7b 0a 73 74 61 74 69 63 20 24 77 61 72 6e 65 64 20 3d 20 66 61 6c 73 65 3b 0a 24 64 69 73 61 62 | {.static.$warned.=.false;.$disab |
af4c0 | 6c 65 54 6c 73 20 3d 20 66 61 6c 73 65 3b 0a 0a 69 66 20 28 69 73 73 65 74 28 24 5f 53 45 52 56 | leTls.=.false;..if.(isset($_SERV |
af4e0 | 45 52 5b 27 61 72 67 76 27 5d 29 20 26 26 20 69 6e 5f 61 72 72 61 79 28 27 64 69 73 61 62 6c 65 | ER['argv']).&&.in_array('disable |
af500 | 2d 74 6c 73 27 2c 20 24 5f 53 45 52 56 45 52 5b 27 61 72 67 76 27 5d 29 20 26 26 20 28 69 6e 5f | -tls',.$_SERVER['argv']).&&.(in_ |
af520 | 61 72 72 61 79 28 27 63 6f 6e 66 27 2c 20 24 5f 53 45 52 56 45 52 5b 27 61 72 67 76 27 5d 29 20 | array('conf',.$_SERVER['argv']). |
af540 | 7c 7c 20 69 6e 5f 61 72 72 61 79 28 27 63 6f 6e 66 69 67 27 2c 20 24 5f 53 45 52 56 45 52 5b 27 | ||.in_array('config',.$_SERVER[' |
af560 | 61 72 67 76 27 5d 29 29 29 20 7b 0a 24 77 61 72 6e 65 64 20 3d 20 74 72 75 65 3b 0a 24 64 69 73 | argv']))).{.$warned.=.true;.$dis |
af580 | 61 62 6c 65 54 6c 73 20 3d 20 21 65 78 74 65 6e 73 69 6f 6e 5f 6c 6f 61 64 65 64 28 27 6f 70 65 | ableTls.=.!extension_loaded('ope |
af5a0 | 6e 73 73 6c 27 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 | nssl');.}.elseif.($config->get(' |
af5c0 | 64 69 73 61 62 6c 65 2d 74 6c 73 27 29 20 3d 3d 3d 20 74 72 75 65 29 20 7b 0a 69 66 20 28 21 24 | disable-tls').===.true).{.if.(!$ |
af5e0 | 77 61 72 6e 65 64 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 77 61 72 6e | warned).{.$io->writeError('<warn |
af600 | 69 6e 67 3e 59 6f 75 20 61 72 65 20 72 75 6e 6e 69 6e 67 20 43 6f 6d 70 6f 73 65 72 20 77 69 74 | ing>You.are.running.Composer.wit |
af620 | 68 20 53 53 4c 2f 54 4c 53 20 70 72 6f 74 65 63 74 69 6f 6e 20 64 69 73 61 62 6c 65 64 2e 3c 2f | h.SSL/TLS.protection.disabled.</ |
af640 | 77 61 72 6e 69 6e 67 3e 27 29 3b 0a 7d 0a 24 77 61 72 6e 65 64 20 3d 20 74 72 75 65 3b 0a 24 64 | warning>');.}.$warned.=.true;.$d |
af660 | 69 73 61 62 6c 65 54 6c 73 20 3d 20 74 72 75 65 3b 0a 7d 20 65 6c 73 65 69 66 20 28 21 65 78 74 | isableTls.=.true;.}.elseif.(!ext |
af680 | 65 6e 73 69 6f 6e 5f 6c 6f 61 64 65 64 28 27 6f 70 65 6e 73 73 6c 27 29 29 20 7b 0a 74 68 72 6f | ension_loaded('openssl')).{.thro |
af6a0 | 77 20 6e 65 77 20 45 78 63 65 70 74 69 6f 6e 5c 4e 6f 53 73 6c 45 78 63 65 70 74 69 6f 6e 28 27 | w.new.Exception\NoSslException(' |
af6c0 | 54 68 65 20 6f 70 65 6e 73 73 6c 20 65 78 74 65 6e 73 69 6f 6e 20 69 73 20 72 65 71 75 69 72 65 | The.openssl.extension.is.require |
af6e0 | 64 20 66 6f 72 20 53 53 4c 2f 54 4c 53 20 70 72 6f 74 65 63 74 69 6f 6e 20 62 75 74 20 69 73 20 | d.for.SSL/TLS.protection.but.is. |
af700 | 6e 6f 74 20 61 76 61 69 6c 61 62 6c 65 2e 20 27 0a 2e 20 27 49 66 20 79 6f 75 20 63 61 6e 20 6e | not.available..'...'If.you.can.n |
af720 | 6f 74 20 65 6e 61 62 6c 65 20 74 68 65 20 6f 70 65 6e 73 73 6c 20 65 78 74 65 6e 73 69 6f 6e 2c | ot.enable.the.openssl.extension, |
af740 | 20 79 6f 75 20 63 61 6e 20 64 69 73 61 62 6c 65 20 74 68 69 73 20 65 72 72 6f 72 2c 20 61 74 20 | .you.can.disable.this.error,.at. |
af760 | 79 6f 75 72 20 6f 77 6e 20 72 69 73 6b 2c 20 62 79 20 73 65 74 74 69 6e 67 20 74 68 65 20 5c 27 | your.own.risk,.by.setting.the.\' |
af780 | 64 69 73 61 62 6c 65 2d 74 6c 73 5c 27 20 6f 70 74 69 6f 6e 20 74 6f 20 74 72 75 65 2e 27 29 3b | disable-tls\'.option.to.true.'); |
af7a0 | 0a 7d 0a 24 68 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 4f 70 74 69 6f 6e 73 20 3d 20 5b 5d 3b 0a | .}.$httpDownloaderOptions.=.[];. |
af7c0 | 69 66 20 28 24 64 69 73 61 62 6c 65 54 6c 73 20 3d 3d 3d 20 66 61 6c 73 65 29 20 7b 0a 69 66 20 | if.($disableTls.===.false).{.if. |
af7e0 | 28 27 27 20 21 3d 3d 20 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 63 61 66 69 6c 65 27 29 29 20 | (''.!==.$config->get('cafile')). |
af800 | 7b 0a 24 68 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 4f 70 74 69 6f 6e 73 5b 27 73 73 6c 27 5d 5b | {.$httpDownloaderOptions['ssl'][ |
af820 | 27 63 61 66 69 6c 65 27 5d 20 3d 20 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 63 61 66 69 6c 65 | 'cafile'].=.$config->get('cafile |
af840 | 27 29 3b 0a 7d 0a 69 66 20 28 27 27 20 21 3d 3d 20 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 63 | ');.}.if.(''.!==.$config->get('c |
af860 | 61 70 61 74 68 27 29 29 20 7b 0a 24 68 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 4f 70 74 69 6f 6e | apath')).{.$httpDownloaderOption |
af880 | 73 5b 27 73 73 6c 27 5d 5b 27 63 61 70 61 74 68 27 5d 20 3d 20 24 63 6f 6e 66 69 67 2d 3e 67 65 | s['ssl']['capath'].=.$config->ge |
af8a0 | 74 28 27 63 61 70 61 74 68 27 29 3b 0a 7d 0a 24 68 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 4f 70 | t('capath');.}.$httpDownloaderOp |
af8c0 | 74 69 6f 6e 73 20 3d 20 61 72 72 61 79 5f 72 65 70 6c 61 63 65 5f 72 65 63 75 72 73 69 76 65 28 | tions.=.array_replace_recursive( |
af8e0 | 24 68 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 4f 70 74 69 6f 6e 73 2c 20 24 6f 70 74 69 6f 6e 73 | $httpDownloaderOptions,.$options |
af900 | 29 3b 0a 7d 0a 74 72 79 20 7b 0a 24 68 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 20 3d 20 6e 65 77 | );.}.try.{.$httpDownloader.=.new |
af920 | 20 48 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 28 24 69 6f 2c 20 24 63 6f 6e 66 69 67 2c 20 24 68 | .HttpDownloader($io,.$config,.$h |
af940 | 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 4f 70 74 69 6f 6e 73 2c 20 24 64 69 73 61 62 6c 65 54 6c | ttpDownloaderOptions,.$disableTl |
af960 | 73 29 3b 0a 7d 20 63 61 74 63 68 20 28 54 72 61 6e 73 70 6f 72 74 45 78 63 65 70 74 69 6f 6e 20 | s);.}.catch.(TransportException. |
af980 | 24 65 29 20 7b 0a 69 66 20 28 66 61 6c 73 65 20 21 3d 3d 20 73 74 72 70 6f 73 28 24 65 2d 3e 67 | $e).{.if.(false.!==.strpos($e->g |
af9a0 | 65 74 4d 65 73 73 61 67 65 28 29 2c 20 27 63 61 66 69 6c 65 27 29 29 20 7b 0a 24 69 6f 2d 3e 77 | etMessage(),.'cafile')).{.$io->w |
af9c0 | 72 69 74 65 28 27 3c 65 72 72 6f 72 3e 55 6e 61 62 6c 65 20 74 6f 20 6c 6f 63 61 74 65 20 61 20 | rite('<error>Unable.to.locate.a. |
af9e0 | 76 61 6c 69 64 20 43 41 20 63 65 72 74 69 66 69 63 61 74 65 20 66 69 6c 65 2e 20 59 6f 75 20 6d | valid.CA.certificate.file..You.m |
afa00 | 75 73 74 20 73 65 74 20 61 20 76 61 6c 69 64 20 5c 27 63 61 66 69 6c 65 5c 27 20 6f 70 74 69 6f | ust.set.a.valid.\'cafile\'.optio |
afa20 | 6e 2e 3c 2f 65 72 72 6f 72 3e 27 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 3c 65 72 72 6f 72 | n.</error>');.$io->write('<error |
afa40 | 3e 41 20 76 61 6c 69 64 20 43 41 20 63 65 72 74 69 66 69 63 61 74 65 20 66 69 6c 65 20 69 73 20 | >A.valid.CA.certificate.file.is. |
afa60 | 72 65 71 75 69 72 65 64 20 66 6f 72 20 53 53 4c 2f 54 4c 53 20 70 72 6f 74 65 63 74 69 6f 6e 2e | required.for.SSL/TLS.protection. |
afa80 | 3c 2f 65 72 72 6f 72 3e 27 29 3b 0a 24 69 6f 2d 3e 77 72 69 74 65 28 27 3c 65 72 72 6f 72 3e 59 | </error>');.$io->write('<error>Y |
afaa0 | 6f 75 20 63 61 6e 20 64 69 73 61 62 6c 65 20 74 68 69 73 20 65 72 72 6f 72 2c 20 61 74 20 79 6f | ou.can.disable.this.error,.at.yo |
afac0 | 75 72 20 6f 77 6e 20 72 69 73 6b 2c 20 62 79 20 73 65 74 74 69 6e 67 20 74 68 65 20 5c 27 64 69 | ur.own.risk,.by.setting.the.\'di |
afae0 | 73 61 62 6c 65 2d 74 6c 73 5c 27 20 6f 70 74 69 6f 6e 20 74 6f 20 74 72 75 65 2e 3c 2f 65 72 72 | sable-tls\'.option.to.true.</err |
afb00 | 6f 72 3e 27 29 3b 0a 7d 0a 74 68 72 6f 77 20 24 65 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 68 74 | or>');.}.throw.$e;.}..return.$ht |
afb20 | 74 70 44 6f 77 6e 6c 6f 61 64 65 72 3b 0a 7d 0a 0a 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 | tpDownloader;.}..private.static. |
afb40 | 66 75 6e 63 74 69 6f 6e 20 75 73 65 58 64 67 28 29 3a 20 62 6f 6f 6c 0a 7b 0a 66 6f 72 65 61 63 | function.useXdg():.bool.{.foreac |
afb60 | 68 20 28 61 72 72 61 79 5f 6b 65 79 73 28 24 5f 53 45 52 56 45 52 29 20 61 73 20 24 6b 65 79 29 | h.(array_keys($_SERVER).as.$key) |
afb80 | 20 7b 0a 69 66 20 28 73 74 72 70 6f 73 28 24 6b 65 79 2c 20 27 58 44 47 5f 27 29 20 3d 3d 3d 20 | .{.if.(strpos($key,.'XDG_').===. |
afba0 | 30 29 20 7b 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 53 69 6c 65 6e | 0).{.return.true;.}.}..if.(Silen |
afbc0 | 63 65 72 3a 3a 63 61 6c 6c 28 27 69 73 5f 64 69 72 27 2c 20 27 2f 65 74 63 2f 78 64 67 27 29 29 | cer::call('is_dir',.'/etc/xdg')) |
afbe0 | 20 7b 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b | .{.return.true;.}..return.false; |
afc00 | 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 | .}.....private.static.function.g |
afc20 | 65 74 55 73 65 72 44 69 72 28 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 24 68 6f 6d 65 20 3d 20 50 6c | etUserDir():.string.{.$home.=.Pl |
afc40 | 61 74 66 6f 72 6d 3a 3a 67 65 74 45 6e 76 28 27 48 4f 4d 45 27 29 3b 0a 69 66 20 28 21 24 68 6f | atform::getEnv('HOME');.if.(!$ho |
afc60 | 6d 65 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f | me).{.throw.new.\RuntimeExceptio |
afc80 | 6e 28 27 54 68 65 20 48 4f 4d 45 20 6f 72 20 43 4f 4d 50 4f 53 45 52 5f 48 4f 4d 45 20 65 6e 76 | n('The.HOME.or.COMPOSER_HOME.env |
afca0 | 69 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 20 6d 75 73 74 20 62 65 20 73 65 74 20 66 6f | ironment.variable.must.be.set.fo |
afcc0 | 72 20 63 6f 6d 70 6f 73 65 72 20 74 6f 20 72 75 6e 20 63 6f 72 72 65 63 74 6c 79 27 29 3b 0a 7d | r.composer.to.run.correctly');.} |
afce0 | 0a 0a 72 65 74 75 72 6e 20 72 74 72 69 6d 28 73 74 72 74 72 28 24 68 6f 6d 65 2c 20 27 5c 5c 27 | ..return.rtrim(strtr($home,.'\\' |
afd00 | 2c 20 27 2f 27 29 2c 20 27 2f 27 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 73 74 61 | ,.'/'),.'/');.}......private.sta |
afd20 | 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 76 61 6c 69 64 61 74 65 4a 73 6f 6e 53 63 68 65 6d 61 28 | tic.function.validateJsonSchema( |
afd40 | 3f 49 4f 49 6e 74 65 72 66 61 63 65 20 24 69 6f 2c 20 24 66 69 6c 65 4f 72 44 61 74 61 2c 20 69 | ?IOInterface.$io,.$fileOrData,.i |
afd60 | 6e 74 20 24 73 63 68 65 6d 61 20 3d 20 4a 73 6f 6e 46 69 6c 65 3a 3a 4c 41 58 5f 53 43 48 45 4d | nt.$schema.=.JsonFile::LAX_SCHEM |
afd80 | 41 2c 20 3f 73 74 72 69 6e 67 20 24 73 6f 75 72 63 65 20 3d 20 6e 75 6c 6c 29 3a 20 76 6f 69 64 | A,.?string.$source.=.null):.void |
afda0 | 0a 7b 0a 69 66 20 28 50 6c 61 74 66 6f 72 6d 3a 3a 69 73 49 6e 70 75 74 43 6f 6d 70 6c 65 74 69 | .{.if.(Platform::isInputCompleti |
afdc0 | 6f 6e 50 72 6f 63 65 73 73 28 29 29 20 7b 0a 72 65 74 75 72 6e 3b 0a 7d 0a 0a 74 72 79 20 7b 0a | onProcess()).{.return;.}..try.{. |
afde0 | 69 66 20 28 24 66 69 6c 65 4f 72 44 61 74 61 20 69 6e 73 74 61 6e 63 65 6f 66 20 4a 73 6f 6e 46 | if.($fileOrData.instanceof.JsonF |
afe00 | 69 6c 65 29 20 7b 0a 24 66 69 6c 65 4f 72 44 61 74 61 2d 3e 76 61 6c 69 64 61 74 65 53 63 68 65 | ile).{.$fileOrData->validateSche |
afe20 | 6d 61 28 24 73 63 68 65 6d 61 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 69 66 20 28 6e 75 6c 6c 20 3d | ma($schema);.}.else.{.if.(null.= |
afe40 | 3d 3d 20 24 73 6f 75 72 63 65 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 64 | ==.$source).{.throw.new.\Invalid |
afe60 | 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 27 24 73 6f 75 72 63 65 20 69 73 20 72 65 | ArgumentException('$source.is.re |
afe80 | 71 75 69 72 65 64 20 74 6f 20 62 65 20 70 72 6f 76 69 64 65 64 20 69 66 20 24 66 69 6c 65 4f 72 | quired.to.be.provided.if.$fileOr |
afea0 | 44 61 74 61 20 69 73 20 61 72 62 69 74 72 61 72 79 20 64 61 74 61 27 29 3b 0a 7d 0a 4a 73 6f 6e | Data.is.arbitrary.data');.}.Json |
afec0 | 46 69 6c 65 3a 3a 76 61 6c 69 64 61 74 65 4a 73 6f 6e 53 63 68 65 6d 61 28 24 73 6f 75 72 63 65 | File::validateJsonSchema($source |
afee0 | 2c 20 24 66 69 6c 65 4f 72 44 61 74 61 2c 20 24 73 63 68 65 6d 61 29 3b 0a 7d 0a 7d 20 63 61 74 | ,.$fileOrData,.$schema);.}.}.cat |
aff00 | 63 68 20 28 4a 73 6f 6e 56 61 6c 69 64 61 74 69 6f 6e 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 | ch.(JsonValidationException.$e). |
aff20 | 7b 0a 24 6d 73 67 20 3d 20 24 65 2d 3e 67 65 74 4d 65 73 73 61 67 65 28 29 2e 27 2c 20 74 68 69 | {.$msg.=.$e->getMessage().',.thi |
aff40 | 73 20 6d 61 79 20 72 65 73 75 6c 74 20 69 6e 20 65 72 72 6f 72 73 20 61 6e 64 20 73 68 6f 75 6c | s.may.result.in.errors.and.shoul |
aff60 | 64 20 62 65 20 72 65 73 6f 6c 76 65 64 3a 27 2e 50 48 50 5f 45 4f 4c 2e 27 20 2d 20 27 2e 69 6d | d.be.resolved:'.PHP_EOL.'.-.'.im |
aff80 | 70 6c 6f 64 65 28 50 48 50 5f 45 4f 4c 2e 27 20 2d 20 27 2c 20 24 65 2d 3e 67 65 74 45 72 72 6f | plode(PHP_EOL.'.-.',.$e->getErro |
affa0 | 72 73 28 29 29 3b 0a 69 66 20 28 24 69 6f 20 69 6e 73 74 61 6e 63 65 6f 66 20 49 4f 49 6e 74 65 | rs());.if.($io.instanceof.IOInte |
affc0 | 72 66 61 63 65 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 77 61 72 6e 69 | rface).{.$io->writeError('<warni |
affe0 | 6e 67 3e 27 2e 24 6d 73 67 2e 27 3c 2f 3e 27 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 74 68 72 6f 77 | ng>'.$msg.'</>');.}.else.{.throw |
b0000 | 20 6e 65 77 20 55 6e 65 78 70 65 63 74 65 64 56 61 6c 75 65 45 78 63 65 70 74 69 6f 6e 28 24 6d | .new.UnexpectedValueException($m |
b0020 | 73 67 29 3b 0a 7d 0a 7d 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 | sg);.}.}.}.}.<?php.declare(stric |
b0040 | 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 | t_types=1);............namespace |
b0060 | 20 43 6f 6d 70 6f 73 65 72 5c 46 69 6c 74 65 72 5c 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 | .Composer\Filter\PlatformRequire |
b0080 | 6d 65 6e 74 46 69 6c 74 65 72 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 | mentFilter;..use.Composer\Reposi |
b00a0 | 74 6f 72 79 5c 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 3b 0a 0a 66 69 6e 61 6c 20 | tory\PlatformRepository;..final. |
b00c0 | 63 6c 61 73 73 20 49 67 6e 6f 72 65 41 6c 6c 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 | class.IgnoreAllPlatformRequireme |
b00e0 | 6e 74 46 69 6c 74 65 72 20 69 6d 70 6c 65 6d 65 6e 74 73 20 50 6c 61 74 66 6f 72 6d 52 65 71 75 | ntFilter.implements.PlatformRequ |
b0100 | 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 49 6e 74 65 72 66 61 63 65 0a 7b 0a 70 75 62 6c 69 63 20 | irementFilterInterface.{.public. |
b0120 | 66 75 6e 63 74 69 6f 6e 20 69 73 49 67 6e 6f 72 65 64 28 73 74 72 69 6e 67 20 24 72 65 71 29 3a | function.isIgnored(string.$req): |
b0140 | 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 | .bool.{.return.PlatformRepositor |
b0160 | 79 3a 3a 69 73 50 6c 61 74 66 6f 72 6d 50 61 63 6b 61 67 65 28 24 72 65 71 29 3b 0a 7d 0a 7d 0a | y::isPlatformPackage($req);.}.}. |
b0180 | 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a | <?php.declare(strict_types=1);.. |
b01a0 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 46 69 6c | ..........namespace.Composer\Fil |
b01c0 | 74 65 72 5c 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 3b 0a 0a | ter\PlatformRequirementFilter;.. |
b01e0 | 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 42 61 73 65 50 61 63 6b 61 67 65 | use.Composer\Package\BasePackage |
b0200 | 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 63 72 65 5c 50 72 65 67 3b 0a 75 73 65 20 43 6f | ;.use.Composer\Pcre\Preg;.use.Co |
b0220 | 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 | mposer\Repository\PlatformReposi |
b0240 | 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 65 6d 76 65 72 5c 43 6f 6e 73 74 72 | tory;.use.Composer\Semver\Constr |
b0260 | 61 69 6e 74 5c 43 6f 6e 73 74 72 61 69 6e 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 65 | aint\Constraint;.use.Composer\Se |
b0280 | 6d 76 65 72 5c 43 6f 6e 73 74 72 61 69 6e 74 5c 43 6f 6e 73 74 72 61 69 6e 74 49 6e 74 65 72 66 | mver\Constraint\ConstraintInterf |
b02a0 | 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 65 6d 76 65 72 5c 43 6f 6e 73 74 72 61 | ace;.use.Composer\Semver\Constra |
b02c0 | 69 6e 74 5c 4d 61 74 63 68 41 6c 6c 43 6f 6e 73 74 72 61 69 6e 74 3b 0a 75 73 65 20 43 6f 6d 70 | int\MatchAllConstraint;.use.Comp |
b02e0 | 6f 73 65 72 5c 53 65 6d 76 65 72 5c 43 6f 6e 73 74 72 61 69 6e 74 5c 4d 75 6c 74 69 43 6f 6e 73 | oser\Semver\Constraint\MultiCons |
b0300 | 74 72 61 69 6e 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 65 6d 76 65 72 5c 49 6e 74 65 | traint;.use.Composer\Semver\Inte |
b0320 | 72 76 61 6c 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 65 6d 76 65 72 5c 49 6e 74 65 72 76 | rval;.use.Composer\Semver\Interv |
b0340 | 61 6c 73 3b 0a 0a 66 69 6e 61 6c 20 63 6c 61 73 73 20 49 67 6e 6f 72 65 4c 69 73 74 50 6c 61 74 | als;..final.class.IgnoreListPlat |
b0360 | 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 20 69 6d 70 6c 65 6d 65 6e 74 73 | formRequirementFilter.implements |
b0380 | 20 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 49 6e 74 65 72 66 | .PlatformRequirementFilterInterf |
b03a0 | 61 63 65 0a 7b 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 69 67 6e 6f 72 65 52 65 67 65 78 3b 0a 0a | ace.{....private.$ignoreRegex;.. |
b03c0 | 0a 0a 0a 70 72 69 76 61 74 65 20 24 69 67 6e 6f 72 65 55 70 70 65 72 42 6f 75 6e 64 52 65 67 65 | ...private.$ignoreUpperBoundRege |
b03e0 | 78 3b 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 | x;.....public.function.__constru |
b0400 | 63 74 28 61 72 72 61 79 20 24 72 65 71 4c 69 73 74 29 0a 7b 0a 24 69 67 6e 6f 72 65 41 6c 6c 20 | ct(array.$reqList).{.$ignoreAll. |
b0420 | 3d 20 24 69 67 6e 6f 72 65 55 70 70 65 72 42 6f 75 6e 64 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 | =.$ignoreUpperBound.=.[];.foreac |
b0440 | 68 20 28 24 72 65 71 4c 69 73 74 20 61 73 20 24 72 65 71 29 20 7b 0a 69 66 20 28 73 75 62 73 74 | h.($reqList.as.$req).{.if.(subst |
b0460 | 72 28 24 72 65 71 2c 20 2d 31 29 20 3d 3d 3d 20 27 2b 27 29 20 7b 0a 24 69 67 6e 6f 72 65 55 70 | r($req,.-1).===.'+').{.$ignoreUp |
b0480 | 70 65 72 42 6f 75 6e 64 5b 5d 20 3d 20 73 75 62 73 74 72 28 24 72 65 71 2c 20 30 2c 20 2d 31 29 | perBound[].=.substr($req,.0,.-1) |
b04a0 | 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 69 67 6e 6f 72 65 41 6c 6c 5b 5d 20 3d 20 24 72 65 71 3b 0a | ;.}.else.{.$ignoreAll[].=.$req;. |
b04c0 | 7d 0a 7d 0a 24 74 68 69 73 2d 3e 69 67 6e 6f 72 65 52 65 67 65 78 20 3d 20 42 61 73 65 50 61 63 | }.}.$this->ignoreRegex.=.BasePac |
b04e0 | 6b 61 67 65 3a 3a 70 61 63 6b 61 67 65 4e 61 6d 65 73 54 6f 52 65 67 65 78 70 28 24 69 67 6e 6f | kage::packageNamesToRegexp($igno |
b0500 | 72 65 41 6c 6c 29 3b 0a 24 74 68 69 73 2d 3e 69 67 6e 6f 72 65 55 70 70 65 72 42 6f 75 6e 64 52 | reAll);.$this->ignoreUpperBoundR |
b0520 | 65 67 65 78 20 3d 20 42 61 73 65 50 61 63 6b 61 67 65 3a 3a 70 61 63 6b 61 67 65 4e 61 6d 65 73 | egex.=.BasePackage::packageNames |
b0540 | 54 6f 52 65 67 65 78 70 28 24 69 67 6e 6f 72 65 55 70 70 65 72 42 6f 75 6e 64 29 3b 0a 7d 0a 0a | ToRegexp($ignoreUpperBound);.}.. |
b0560 | 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 49 67 6e 6f 72 65 64 28 73 74 72 69 6e 67 | public.function.isIgnored(string |
b0580 | 20 24 72 65 71 29 3a 20 62 6f 6f 6c 0a 7b 0a 69 66 20 28 21 50 6c 61 74 66 6f 72 6d 52 65 70 6f | .$req):.bool.{.if.(!PlatformRepo |
b05a0 | 73 69 74 6f 72 79 3a 3a 69 73 50 6c 61 74 66 6f 72 6d 50 61 63 6b 61 67 65 28 24 72 65 71 29 29 | sitory::isPlatformPackage($req)) |
b05c0 | 20 7b 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 50 72 65 67 3a | .{.return.false;.}..return.Preg: |
b05e0 | 3a 69 73 4d 61 74 63 68 28 24 74 68 69 73 2d 3e 69 67 6e 6f 72 65 52 65 67 65 78 2c 20 24 72 65 | :isMatch($this->ignoreRegex,.$re |
b0600 | 71 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 66 69 6c 74 65 72 43 6f 6e | q);.}..public.function.filterCon |
b0620 | 73 74 72 61 69 6e 74 28 73 74 72 69 6e 67 20 24 72 65 71 2c 20 43 6f 6e 73 74 72 61 69 6e 74 49 | straint(string.$req,.ConstraintI |
b0640 | 6e 74 65 72 66 61 63 65 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 3a 20 43 6f 6e 73 74 72 61 69 6e | nterface.$constraint):.Constrain |
b0660 | 74 49 6e 74 65 72 66 61 63 65 0a 7b 0a 69 66 20 28 21 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 | tInterface.{.if.(!PlatformReposi |
b0680 | 74 6f 72 79 3a 3a 69 73 50 6c 61 74 66 6f 72 6d 50 61 63 6b 61 67 65 28 24 72 65 71 29 29 20 7b | tory::isPlatformPackage($req)).{ |
b06a0 | 0a 72 65 74 75 72 6e 20 24 63 6f 6e 73 74 72 61 69 6e 74 3b 0a 7d 0a 0a 69 66 20 28 21 50 72 65 | .return.$constraint;.}..if.(!Pre |
b06c0 | 67 3a 3a 69 73 4d 61 74 63 68 28 24 74 68 69 73 2d 3e 69 67 6e 6f 72 65 55 70 70 65 72 42 6f 75 | g::isMatch($this->ignoreUpperBou |
b06e0 | 6e 64 52 65 67 65 78 2c 20 24 72 65 71 29 29 20 7b 0a 72 65 74 75 72 6e 20 24 63 6f 6e 73 74 72 | ndRegex,.$req)).{.return.$constr |
b0700 | 61 69 6e 74 3b 0a 7d 0a 0a 69 66 20 28 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 24 74 68 69 73 | aint;.}..if.(Preg::isMatch($this |
b0720 | 2d 3e 69 67 6e 6f 72 65 52 65 67 65 78 2c 20 24 72 65 71 29 29 20 7b 0a 72 65 74 75 72 6e 20 6e | ->ignoreRegex,.$req)).{.return.n |
b0740 | 65 77 20 4d 61 74 63 68 41 6c 6c 43 6f 6e 73 74 72 61 69 6e 74 3b 0a 7d 0a 0a 24 69 6e 74 65 72 | ew.MatchAllConstraint;.}..$inter |
b0760 | 76 61 6c 73 20 3d 20 49 6e 74 65 72 76 61 6c 73 3a 3a 67 65 74 28 24 63 6f 6e 73 74 72 61 69 6e | vals.=.Intervals::get($constrain |
b0780 | 74 29 3b 0a 24 6c 61 73 74 20 3d 20 65 6e 64 28 24 69 6e 74 65 72 76 61 6c 73 5b 27 6e 75 6d 65 | t);.$last.=.end($intervals['nume |
b07a0 | 72 69 63 27 5d 29 3b 0a 69 66 20 28 24 6c 61 73 74 20 21 3d 3d 20 66 61 6c 73 65 20 26 26 20 28 | ric']);.if.($last.!==.false.&&.( |
b07c0 | 73 74 72 69 6e 67 29 20 24 6c 61 73 74 2d 3e 67 65 74 45 6e 64 28 29 20 21 3d 3d 20 28 73 74 72 | string).$last->getEnd().!==.(str |
b07e0 | 69 6e 67 29 20 49 6e 74 65 72 76 61 6c 3a 3a 75 6e 74 69 6c 50 6f 73 69 74 69 76 65 49 6e 66 69 | ing).Interval::untilPositiveInfi |
b0800 | 6e 69 74 79 28 29 29 20 7b 0a 24 63 6f 6e 73 74 72 61 69 6e 74 20 3d 20 6e 65 77 20 4d 75 6c 74 | nity()).{.$constraint.=.new.Mult |
b0820 | 69 43 6f 6e 73 74 72 61 69 6e 74 28 5b 24 63 6f 6e 73 74 72 61 69 6e 74 2c 20 6e 65 77 20 43 6f | iConstraint([$constraint,.new.Co |
b0840 | 6e 73 74 72 61 69 6e 74 28 27 3e 3d 27 2c 20 24 6c 61 73 74 2d 3e 67 65 74 45 6e 64 28 29 2d 3e | nstraint('>=',.$last->getEnd()-> |
b0860 | 67 65 74 56 65 72 73 69 6f 6e 28 29 29 5d 2c 20 66 61 6c 73 65 29 3b 0a 7d 0a 0a 72 65 74 75 72 | getVersion())],.false);.}..retur |
b0880 | 6e 20 24 63 6f 6e 73 74 72 61 69 6e 74 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 | n.$constraint;.}.}.<?php.declare |
b08a0 | 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d | (strict_types=1);............nam |
b08c0 | 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 46 69 6c 74 65 72 5c 50 6c 61 74 66 6f 72 6d 52 | espace.Composer\Filter\PlatformR |
b08e0 | 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 3b 0a 0a 66 69 6e 61 6c 20 63 6c 61 73 73 20 49 | equirementFilter;..final.class.I |
b0900 | 67 6e 6f 72 65 4e 6f 74 68 69 6e 67 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 | gnoreNothingPlatformRequirementF |
b0920 | 69 6c 74 65 72 20 69 6d 70 6c 65 6d 65 6e 74 73 20 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 | ilter.implements.PlatformRequire |
b0940 | 6d 65 6e 74 46 69 6c 74 65 72 49 6e 74 65 72 66 61 63 65 0a 7b 0a 0a 0a 0a 70 75 62 6c 69 63 20 | mentFilterInterface.{....public. |
b0960 | 66 75 6e 63 74 69 6f 6e 20 69 73 49 67 6e 6f 72 65 64 28 73 74 72 69 6e 67 20 24 72 65 71 29 3a | function.isIgnored(string.$req): |
b0980 | 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 | .bool.{.return.false;.}.}.<?php. |
b09a0 | 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a | declare(strict_types=1);........ |
b09c0 | 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 46 69 6c 74 65 72 5c 50 6c | ....namespace.Composer\Filter\Pl |
b09e0 | 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 3b 0a 0a 66 69 6e 61 6c 20 | atformRequirementFilter;..final. |
b0a00 | 63 6c 61 73 73 20 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 46 | class.PlatformRequirementFilterF |
b0a20 | 61 63 74 6f 72 79 0a 7b 0a 0a 0a 0a 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 | actory.{....public.static.functi |
b0a40 | 6f 6e 20 66 72 6f 6d 42 6f 6f 6c 4f 72 4c 69 73 74 28 24 62 6f 6f 6c 4f 72 4c 69 73 74 29 3a 20 | on.fromBoolOrList($boolOrList):. |
b0a60 | 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 49 6e 74 65 72 66 61 | PlatformRequirementFilterInterfa |
b0a80 | 63 65 0a 7b 0a 69 66 20 28 69 73 5f 62 6f 6f 6c 28 24 62 6f 6f 6c 4f 72 4c 69 73 74 29 29 20 7b | ce.{.if.(is_bool($boolOrList)).{ |
b0aa0 | 0a 72 65 74 75 72 6e 20 24 62 6f 6f 6c 4f 72 4c 69 73 74 20 3f 20 73 65 6c 66 3a 3a 69 67 6e 6f | .return.$boolOrList.?.self::igno |
b0ac0 | 72 65 41 6c 6c 28 29 20 3a 20 73 65 6c 66 3a 3a 69 67 6e 6f 72 65 4e 6f 74 68 69 6e 67 28 29 3b | reAll().:.self::ignoreNothing(); |
b0ae0 | 0a 7d 0a 0a 69 66 20 28 69 73 5f 61 72 72 61 79 28 24 62 6f 6f 6c 4f 72 4c 69 73 74 29 29 20 7b | .}..if.(is_array($boolOrList)).{ |
b0b00 | 0a 72 65 74 75 72 6e 20 6e 65 77 20 49 67 6e 6f 72 65 4c 69 73 74 50 6c 61 74 66 6f 72 6d 52 65 | .return.new.IgnoreListPlatformRe |
b0b20 | 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 28 24 62 6f 6f 6c 4f 72 4c 69 73 74 29 3b 0a 7d 0a | quirementFilter($boolOrList);.}. |
b0b40 | 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 | .throw.new.\InvalidArgumentExcep |
b0b60 | 74 69 6f 6e 28 0a 73 70 72 69 6e 74 66 28 0a 27 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d | tion(.sprintf(.'PlatformRequirem |
b0b80 | 65 6e 74 46 69 6c 74 65 72 3a 20 55 6e 6b 6e 6f 77 6e 20 24 62 6f 6f 6c 4f 72 4c 69 73 74 20 70 | entFilter:.Unknown.$boolOrList.p |
b0ba0 | 61 72 61 6d 65 74 65 72 20 25 73 2e 20 50 6c 65 61 73 65 20 72 65 70 6f 72 74 20 61 74 20 68 74 | arameter.%s..Please.report.at.ht |
b0bc0 | 74 70 73 3a 2f 2f 67 69 74 68 75 62 2e 63 6f 6d 2f 63 6f 6d 70 6f 73 65 72 2f 63 6f 6d 70 6f 73 | tps://github.com/composer/compos |
b0be0 | 65 72 2f 69 73 73 75 65 73 2f 6e 65 77 2e 27 2c 0a 67 65 74 74 79 70 65 28 24 62 6f 6f 6c 4f 72 | er/issues/new.',.gettype($boolOr |
b0c00 | 4c 69 73 74 29 0a 29 0a 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 66 75 6e 63 | List).).);.}..public.static.func |
b0c20 | 74 69 6f 6e 20 69 67 6e 6f 72 65 41 6c 6c 28 29 3a 20 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 | tion.ignoreAll():.PlatformRequir |
b0c40 | 65 6d 65 6e 74 46 69 6c 74 65 72 49 6e 74 65 72 66 61 63 65 0a 7b 0a 72 65 74 75 72 6e 20 6e 65 | ementFilterInterface.{.return.ne |
b0c60 | 77 20 49 67 6e 6f 72 65 41 6c 6c 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 | w.IgnoreAllPlatformRequirementFi |
b0c80 | 6c 74 65 72 28 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f | lter();.}..public.static.functio |
b0ca0 | 6e 20 69 67 6e 6f 72 65 4e 6f 74 68 69 6e 67 28 29 3a 20 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 | n.ignoreNothing():.PlatformRequi |
b0cc0 | 72 65 6d 65 6e 74 46 69 6c 74 65 72 49 6e 74 65 72 66 61 63 65 0a 7b 0a 72 65 74 75 72 6e 20 6e | rementFilterInterface.{.return.n |
b0ce0 | 65 77 20 49 67 6e 6f 72 65 4e 6f 74 68 69 6e 67 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d | ew.IgnoreNothingPlatformRequirem |
b0d00 | 65 6e 74 46 69 6c 74 65 72 28 29 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 | entFilter();.}.}.<?php.declare(s |
b0d20 | 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 | trict_types=1);............names |
b0d40 | 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 46 69 6c 74 65 72 5c 50 6c 61 74 66 6f 72 6d 52 65 71 | pace.Composer\Filter\PlatformReq |
b0d60 | 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 3b 0a 0a 69 6e 74 65 72 66 61 63 65 20 50 6c 61 74 66 | uirementFilter;..interface.Platf |
b0d80 | 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 49 6e 74 65 72 66 61 63 65 0a 7b 0a | ormRequirementFilterInterface.{. |
b0da0 | 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 49 67 6e 6f 72 65 64 28 73 74 72 69 6e 67 | public.function.isIgnored(string |
b0dc0 | 20 24 72 65 71 29 3a 20 62 6f 6f 6c 3b 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 | .$req):.bool;.}.<?php.declare(st |
b0de0 | 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 | rict_types=1);............namesp |
b0e00 | 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 49 4f 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 | ace.Composer\IO;..use.Composer\C |
b0e20 | 6f 6e 66 69 67 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 63 72 65 5c 50 72 65 67 3b 0a 75 | onfig;.use.Composer\Pcre\Preg;.u |
b0e40 | 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 | se.Composer\Util\ProcessExecutor |
b0e60 | 3b 0a 75 73 65 20 50 73 72 5c 4c 6f 67 5c 4c 6f 67 4c 65 76 65 6c 3b 0a 0a 61 62 73 74 72 61 63 | ;.use.Psr\Log\LogLevel;..abstrac |
b0e80 | 74 20 63 6c 61 73 73 20 42 61 73 65 49 4f 20 69 6d 70 6c 65 6d 65 6e 74 73 20 49 4f 49 6e 74 65 | t.class.BaseIO.implements.IOInte |
b0ea0 | 72 66 61 63 65 0a 7b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 61 75 74 68 65 6e 74 69 63 61 74 69 | rface.{..protected.$authenticati |
b0ec0 | 6f 6e 73 20 3d 20 5b 5d 3b 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 | ons.=.[];.....public.function.ge |
b0ee0 | 74 41 75 74 68 65 6e 74 69 63 61 74 69 6f 6e 73 28 29 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 | tAuthentications().{.return.$thi |
b0f00 | 73 2d 3e 61 75 74 68 65 6e 74 69 63 61 74 69 6f 6e 73 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 | s->authentications;.}.....public |
b0f20 | 20 66 75 6e 63 74 69 6f 6e 20 72 65 73 65 74 41 75 74 68 65 6e 74 69 63 61 74 69 6f 6e 73 28 29 | .function.resetAuthentications() |
b0f40 | 0a 7b 0a 24 74 68 69 73 2d 3e 61 75 74 68 65 6e 74 69 63 61 74 69 6f 6e 73 20 3d 20 5b 5d 3b 0a | .{.$this->authentications.=.[];. |
b0f60 | 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 68 61 73 41 75 74 68 65 6e 74 | }.....public.function.hasAuthent |
b0f80 | 69 63 61 74 69 6f 6e 28 24 72 65 70 6f 73 69 74 6f 72 79 4e 61 6d 65 29 0a 7b 0a 72 65 74 75 72 | ication($repositoryName).{.retur |
b0fa0 | 6e 20 69 73 73 65 74 28 24 74 68 69 73 2d 3e 61 75 74 68 65 6e 74 69 63 61 74 69 6f 6e 73 5b 24 | n.isset($this->authentications[$ |
b0fc0 | 72 65 70 6f 73 69 74 6f 72 79 4e 61 6d 65 5d 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 | repositoryName]);.}.....public.f |
b0fe0 | 75 6e 63 74 69 6f 6e 20 67 65 74 41 75 74 68 65 6e 74 69 63 61 74 69 6f 6e 28 24 72 65 70 6f 73 | unction.getAuthentication($repos |
b1000 | 69 74 6f 72 79 4e 61 6d 65 29 0a 7b 0a 69 66 20 28 69 73 73 65 74 28 24 74 68 69 73 2d 3e 61 75 | itoryName).{.if.(isset($this->au |
b1020 | 74 68 65 6e 74 69 63 61 74 69 6f 6e 73 5b 24 72 65 70 6f 73 69 74 6f 72 79 4e 61 6d 65 5d 29 29 | thentications[$repositoryName])) |
b1040 | 20 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 61 75 74 68 65 6e 74 69 63 61 74 69 6f 6e 73 | .{.return.$this->authentications |
b1060 | 5b 24 72 65 70 6f 73 69 74 6f 72 79 4e 61 6d 65 5d 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 5b 27 75 | [$repositoryName];.}..return.['u |
b1080 | 73 65 72 6e 61 6d 65 27 20 3d 3e 20 6e 75 6c 6c 2c 20 27 70 61 73 73 77 6f 72 64 27 20 3d 3e 20 | sername'.=>.null,.'password'.=>. |
b10a0 | 6e 75 6c 6c 5d 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 | null];.}.....public.function.set |
b10c0 | 41 75 74 68 65 6e 74 69 63 61 74 69 6f 6e 28 24 72 65 70 6f 73 69 74 6f 72 79 4e 61 6d 65 2c 20 | Authentication($repositoryName,. |
b10e0 | 24 75 73 65 72 6e 61 6d 65 2c 20 24 70 61 73 73 77 6f 72 64 20 3d 20 6e 75 6c 6c 29 0a 7b 0a 24 | $username,.$password.=.null).{.$ |
b1100 | 74 68 69 73 2d 3e 61 75 74 68 65 6e 74 69 63 61 74 69 6f 6e 73 5b 24 72 65 70 6f 73 69 74 6f 72 | this->authentications[$repositor |
b1120 | 79 4e 61 6d 65 5d 20 3d 20 5b 27 75 73 65 72 6e 61 6d 65 27 20 3d 3e 20 24 75 73 65 72 6e 61 6d | yName].=.['username'.=>.$usernam |
b1140 | 65 2c 20 27 70 61 73 73 77 6f 72 64 27 20 3d 3e 20 24 70 61 73 73 77 6f 72 64 5d 3b 0a 7d 0a 0a | e,.'password'.=>.$password];.}.. |
b1160 | 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 77 72 69 74 65 52 61 77 28 24 6d 65 73 | ...public.function.writeRaw($mes |
b1180 | 73 61 67 65 73 2c 20 62 6f 6f 6c 20 24 6e 65 77 6c 69 6e 65 20 3d 20 74 72 75 65 2c 20 69 6e 74 | sages,.bool.$newline.=.true,.int |
b11a0 | 20 24 76 65 72 62 6f 73 69 74 79 20 3d 20 73 65 6c 66 3a 3a 4e 4f 52 4d 41 4c 29 0a 7b 0a 24 74 | .$verbosity.=.self::NORMAL).{.$t |
b11c0 | 68 69 73 2d 3e 77 72 69 74 65 28 24 6d 65 73 73 61 67 65 73 2c 20 24 6e 65 77 6c 69 6e 65 2c 20 | his->write($messages,.$newline,. |
b11e0 | 24 76 65 72 62 6f 73 69 74 79 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 | $verbosity);.}.....public.functi |
b1200 | 6f 6e 20 77 72 69 74 65 45 72 72 6f 72 52 61 77 28 24 6d 65 73 73 61 67 65 73 2c 20 62 6f 6f 6c | on.writeErrorRaw($messages,.bool |
b1220 | 20 24 6e 65 77 6c 69 6e 65 20 3d 20 74 72 75 65 2c 20 69 6e 74 20 24 76 65 72 62 6f 73 69 74 79 | .$newline.=.true,.int.$verbosity |
b1240 | 20 3d 20 73 65 6c 66 3a 3a 4e 4f 52 4d 41 4c 29 0a 7b 0a 24 74 68 69 73 2d 3e 77 72 69 74 65 45 | .=.self::NORMAL).{.$this->writeE |
b1260 | 72 72 6f 72 28 24 6d 65 73 73 61 67 65 73 2c 20 24 6e 65 77 6c 69 6e 65 2c 20 24 76 65 72 62 6f | rror($messages,.$newline,.$verbo |
b1280 | 73 69 74 79 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e | sity);.}...........protected.fun |
b12a0 | 63 74 69 6f 6e 20 63 68 65 63 6b 41 6e 64 53 65 74 41 75 74 68 65 6e 74 69 63 61 74 69 6f 6e 28 | ction.checkAndSetAuthentication( |
b12c0 | 73 74 72 69 6e 67 20 24 72 65 70 6f 73 69 74 6f 72 79 4e 61 6d 65 2c 20 73 74 72 69 6e 67 20 24 | string.$repositoryName,.string.$ |
b12e0 | 75 73 65 72 6e 61 6d 65 2c 20 3f 73 74 72 69 6e 67 20 24 70 61 73 73 77 6f 72 64 20 3d 20 6e 75 | username,.?string.$password.=.nu |
b1300 | 6c 6c 29 0a 7b 0a 69 66 20 28 24 74 68 69 73 2d 3e 68 61 73 41 75 74 68 65 6e 74 69 63 61 74 69 | ll).{.if.($this->hasAuthenticati |
b1320 | 6f 6e 28 24 72 65 70 6f 73 69 74 6f 72 79 4e 61 6d 65 29 29 20 7b 0a 24 61 75 74 68 20 3d 20 24 | on($repositoryName)).{.$auth.=.$ |
b1340 | 74 68 69 73 2d 3e 67 65 74 41 75 74 68 65 6e 74 69 63 61 74 69 6f 6e 28 24 72 65 70 6f 73 69 74 | this->getAuthentication($reposit |
b1360 | 6f 72 79 4e 61 6d 65 29 3b 0a 69 66 20 28 24 61 75 74 68 5b 27 75 73 65 72 6e 61 6d 65 27 5d 20 | oryName);.if.($auth['username']. |
b1380 | 3d 3d 3d 20 24 75 73 65 72 6e 61 6d 65 20 26 26 20 24 61 75 74 68 5b 27 70 61 73 73 77 6f 72 64 | ===.$username.&&.$auth['password |
b13a0 | 27 5d 20 3d 3d 3d 20 24 70 61 73 73 77 6f 72 64 29 20 7b 0a 72 65 74 75 72 6e 3b 0a 7d 0a 0a 24 | '].===.$password).{.return;.}..$ |
b13c0 | 74 68 69 73 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 0a 73 70 72 69 6e 74 66 28 0a 22 3c 77 61 72 | this->writeError(.sprintf(."<war |
b13e0 | 6e 69 6e 67 3e 57 61 72 6e 69 6e 67 3a 20 59 6f 75 20 73 68 6f 75 6c 64 20 61 76 6f 69 64 20 6f | ning>Warning:.You.should.avoid.o |
b1400 | 76 65 72 77 72 69 74 69 6e 67 20 61 6c 72 65 61 64 79 20 64 65 66 69 6e 65 64 20 61 75 74 68 20 | verwriting.already.defined.auth. |
b1420 | 73 65 74 74 69 6e 67 73 20 66 6f 72 20 25 73 2e 3c 2f 77 61 72 6e 69 6e 67 3e 22 2c 0a 24 72 65 | settings.for.%s.</warning>",.$re |
b1440 | 70 6f 73 69 74 6f 72 79 4e 61 6d 65 0a 29 0a 29 3b 0a 7d 0a 24 74 68 69 73 2d 3e 73 65 74 41 75 | positoryName.).);.}.$this->setAu |
b1460 | 74 68 65 6e 74 69 63 61 74 69 6f 6e 28 24 72 65 70 6f 73 69 74 6f 72 79 4e 61 6d 65 2c 20 24 75 | thentication($repositoryName,.$u |
b1480 | 73 65 72 6e 61 6d 65 2c 20 24 70 61 73 73 77 6f 72 64 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 | sername,.$password);.}.....publi |
b14a0 | 63 20 66 75 6e 63 74 69 6f 6e 20 6c 6f 61 64 43 6f 6e 66 69 67 75 72 61 74 69 6f 6e 28 43 6f 6e | c.function.loadConfiguration(Con |
b14c0 | 66 69 67 20 24 63 6f 6e 66 69 67 29 0a 7b 0a 24 62 69 74 62 75 63 6b 65 74 4f 61 75 74 68 20 3d | fig.$config).{.$bitbucketOauth.= |
b14e0 | 20 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 62 69 74 62 75 63 6b 65 74 2d 6f 61 75 74 68 27 29 | .$config->get('bitbucket-oauth') |
b1500 | 3b 0a 24 67 69 74 68 75 62 4f 61 75 74 68 20 3d 20 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 67 | ;.$githubOauth.=.$config->get('g |
b1520 | 69 74 68 75 62 2d 6f 61 75 74 68 27 29 3b 0a 24 67 69 74 6c 61 62 4f 61 75 74 68 20 3d 20 24 63 | ithub-oauth');.$gitlabOauth.=.$c |
b1540 | 6f 6e 66 69 67 2d 3e 67 65 74 28 27 67 69 74 6c 61 62 2d 6f 61 75 74 68 27 29 3b 0a 24 67 69 74 | onfig->get('gitlab-oauth');.$git |
b1560 | 6c 61 62 54 6f 6b 65 6e 20 3d 20 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 67 69 74 6c 61 62 2d | labToken.=.$config->get('gitlab- |
b1580 | 74 6f 6b 65 6e 27 29 3b 0a 24 68 74 74 70 42 61 73 69 63 20 3d 20 24 63 6f 6e 66 69 67 2d 3e 67 | token');.$httpBasic.=.$config->g |
b15a0 | 65 74 28 27 68 74 74 70 2d 62 61 73 69 63 27 29 3b 0a 24 62 65 61 72 65 72 54 6f 6b 65 6e 20 3d | et('http-basic');.$bearerToken.= |
b15c0 | 20 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 62 65 61 72 65 72 27 29 3b 0a 0a 0a 0a 66 6f 72 65 | .$config->get('bearer');....fore |
b15e0 | 61 63 68 20 28 24 62 69 74 62 75 63 6b 65 74 4f 61 75 74 68 20 61 73 20 24 64 6f 6d 61 69 6e 20 | ach.($bitbucketOauth.as.$domain. |
b1600 | 3d 3e 20 24 63 72 65 64 29 20 7b 0a 24 74 68 69 73 2d 3e 63 68 65 63 6b 41 6e 64 53 65 74 41 75 | =>.$cred).{.$this->checkAndSetAu |
b1620 | 74 68 65 6e 74 69 63 61 74 69 6f 6e 28 24 64 6f 6d 61 69 6e 2c 20 24 63 72 65 64 5b 27 63 6f 6e | thentication($domain,.$cred['con |
b1640 | 73 75 6d 65 72 2d 6b 65 79 27 5d 2c 20 24 63 72 65 64 5b 27 63 6f 6e 73 75 6d 65 72 2d 73 65 63 | sumer-key'],.$cred['consumer-sec |
b1660 | 72 65 74 27 5d 29 3b 0a 7d 0a 0a 66 6f 72 65 61 63 68 20 28 24 67 69 74 68 75 62 4f 61 75 74 68 | ret']);.}..foreach.($githubOauth |
b1680 | 20 61 73 20 24 64 6f 6d 61 69 6e 20 3d 3e 20 24 74 6f 6b 65 6e 29 20 7b 0a 0a 0a 69 66 20 28 21 | .as.$domain.=>.$token).{...if.(! |
b16a0 | 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b 5e 5b 2e 41 2d 5a 61 2d 7a 30 2d 39 5f 5d 2b 24 | Preg::isMatch('{^[.A-Za-z0-9_]+$ |
b16c0 | 7d 27 2c 20 24 74 6f 6b 65 6e 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 55 6e 65 78 70 65 | }',.$token)).{.throw.new.\Unexpe |
b16e0 | 63 74 65 64 56 61 6c 75 65 45 78 63 65 70 74 69 6f 6e 28 27 59 6f 75 72 20 67 69 74 68 75 62 20 | ctedValueException('Your.github. |
b1700 | 6f 61 75 74 68 20 74 6f 6b 65 6e 20 66 6f 72 20 27 2e 24 64 6f 6d 61 69 6e 2e 27 20 63 6f 6e 74 | oauth.token.for.'.$domain.'.cont |
b1720 | 61 69 6e 73 20 69 6e 76 61 6c 69 64 20 63 68 61 72 61 63 74 65 72 73 3a 20 22 27 2e 24 74 6f 6b | ains.invalid.characters:."'.$tok |
b1740 | 65 6e 2e 27 22 27 29 3b 0a 7d 0a 24 74 68 69 73 2d 3e 63 68 65 63 6b 41 6e 64 53 65 74 41 75 74 | en.'"');.}.$this->checkAndSetAut |
b1760 | 68 65 6e 74 69 63 61 74 69 6f 6e 28 24 64 6f 6d 61 69 6e 2c 20 24 74 6f 6b 65 6e 2c 20 27 78 2d | hentication($domain,.$token,.'x- |
b1780 | 6f 61 75 74 68 2d 62 61 73 69 63 27 29 3b 0a 7d 0a 0a 66 6f 72 65 61 63 68 20 28 24 67 69 74 6c | oauth-basic');.}..foreach.($gitl |
b17a0 | 61 62 4f 61 75 74 68 20 61 73 20 24 64 6f 6d 61 69 6e 20 3d 3e 20 24 74 6f 6b 65 6e 29 20 7b 0a | abOauth.as.$domain.=>.$token).{. |
b17c0 | 24 74 6f 6b 65 6e 20 3d 20 69 73 5f 61 72 72 61 79 28 24 74 6f 6b 65 6e 29 20 3f 20 24 74 6f 6b | $token.=.is_array($token).?.$tok |
b17e0 | 65 6e 5b 22 74 6f 6b 65 6e 22 5d 20 3a 20 24 74 6f 6b 65 6e 3b 0a 24 74 68 69 73 2d 3e 63 68 65 | en["token"].:.$token;.$this->che |
b1800 | 63 6b 41 6e 64 53 65 74 41 75 74 68 65 6e 74 69 63 61 74 69 6f 6e 28 24 64 6f 6d 61 69 6e 2c 20 | ckAndSetAuthentication($domain,. |
b1820 | 24 74 6f 6b 65 6e 2c 20 27 6f 61 75 74 68 32 27 29 3b 0a 7d 0a 0a 66 6f 72 65 61 63 68 20 28 24 | $token,.'oauth2');.}..foreach.($ |
b1840 | 67 69 74 6c 61 62 54 6f 6b 65 6e 20 61 73 20 24 64 6f 6d 61 69 6e 20 3d 3e 20 24 74 6f 6b 65 6e | gitlabToken.as.$domain.=>.$token |
b1860 | 29 20 7b 0a 24 75 73 65 72 6e 61 6d 65 20 3d 20 69 73 5f 61 72 72 61 79 28 24 74 6f 6b 65 6e 29 | ).{.$username.=.is_array($token) |
b1880 | 20 3f 20 24 74 6f 6b 65 6e 5b 22 75 73 65 72 6e 61 6d 65 22 5d 20 3a 20 24 74 6f 6b 65 6e 3b 0a | .?.$token["username"].:.$token;. |
b18a0 | 24 70 61 73 73 77 6f 72 64 20 3d 20 69 73 5f 61 72 72 61 79 28 24 74 6f 6b 65 6e 29 20 3f 20 24 | $password.=.is_array($token).?.$ |
b18c0 | 74 6f 6b 65 6e 5b 22 74 6f 6b 65 6e 22 5d 20 3a 20 27 70 72 69 76 61 74 65 2d 74 6f 6b 65 6e 27 | token["token"].:.'private-token' |
b18e0 | 3b 0a 24 74 68 69 73 2d 3e 63 68 65 63 6b 41 6e 64 53 65 74 41 75 74 68 65 6e 74 69 63 61 74 69 | ;.$this->checkAndSetAuthenticati |
b1900 | 6f 6e 28 24 64 6f 6d 61 69 6e 2c 20 24 75 73 65 72 6e 61 6d 65 2c 20 24 70 61 73 73 77 6f 72 64 | on($domain,.$username,.$password |
b1920 | 29 3b 0a 7d 0a 0a 0a 66 6f 72 65 61 63 68 20 28 24 68 74 74 70 42 61 73 69 63 20 61 73 20 24 64 | );.}...foreach.($httpBasic.as.$d |
b1940 | 6f 6d 61 69 6e 20 3d 3e 20 24 63 72 65 64 29 20 7b 0a 24 74 68 69 73 2d 3e 63 68 65 63 6b 41 6e | omain.=>.$cred).{.$this->checkAn |
b1960 | 64 53 65 74 41 75 74 68 65 6e 74 69 63 61 74 69 6f 6e 28 24 64 6f 6d 61 69 6e 2c 20 24 63 72 65 | dSetAuthentication($domain,.$cre |
b1980 | 64 5b 27 75 73 65 72 6e 61 6d 65 27 5d 2c 20 24 63 72 65 64 5b 27 70 61 73 73 77 6f 72 64 27 5d | d['username'],.$cred['password'] |
b19a0 | 29 3b 0a 7d 0a 0a 66 6f 72 65 61 63 68 20 28 24 62 65 61 72 65 72 54 6f 6b 65 6e 20 61 73 20 24 | );.}..foreach.($bearerToken.as.$ |
b19c0 | 64 6f 6d 61 69 6e 20 3d 3e 20 24 74 6f 6b 65 6e 29 20 7b 0a 24 74 68 69 73 2d 3e 63 68 65 63 6b | domain.=>.$token).{.$this->check |
b19e0 | 41 6e 64 53 65 74 41 75 74 68 65 6e 74 69 63 61 74 69 6f 6e 28 24 64 6f 6d 61 69 6e 2c 20 24 74 | AndSetAuthentication($domain,.$t |
b1a00 | 6f 6b 65 6e 2c 20 27 62 65 61 72 65 72 27 29 3b 0a 7d 0a 0a 0a 50 72 6f 63 65 73 73 45 78 65 63 | oken,.'bearer');.}...ProcessExec |
b1a20 | 75 74 6f 72 3a 3a 73 65 74 54 69 6d 65 6f 75 74 28 24 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 70 | utor::setTimeout($config->get('p |
b1a40 | 72 6f 63 65 73 73 2d 74 69 6d 65 6f 75 74 27 29 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e | rocess-timeout'));.}..public.fun |
b1a60 | 63 74 69 6f 6e 20 65 6d 65 72 67 65 6e 63 79 28 24 6d 65 73 73 61 67 65 2c 20 61 72 72 61 79 20 | ction.emergency($message,.array. |
b1a80 | 24 63 6f 6e 74 65 78 74 20 3d 20 5b 5d 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 6c 6f | $context.=.[]):.void.{.$this->lo |
b1aa0 | 67 28 4c 6f 67 4c 65 76 65 6c 3a 3a 45 4d 45 52 47 45 4e 43 59 2c 20 24 6d 65 73 73 61 67 65 2c | g(LogLevel::EMERGENCY,.$message, |
b1ac0 | 20 24 63 6f 6e 74 65 78 74 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 61 | .$context);.}..public.function.a |
b1ae0 | 6c 65 72 74 28 24 6d 65 73 73 61 67 65 2c 20 61 72 72 61 79 20 24 63 6f 6e 74 65 78 74 20 3d 20 | lert($message,.array.$context.=. |
b1b00 | 5b 5d 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 6c 6f 67 28 4c 6f 67 4c 65 76 65 6c 3a | []):.void.{.$this->log(LogLevel: |
b1b20 | 3a 41 4c 45 52 54 2c 20 24 6d 65 73 73 61 67 65 2c 20 24 63 6f 6e 74 65 78 74 29 3b 0a 7d 0a 0a | :ALERT,.$message,.$context);.}.. |
b1b40 | 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 63 72 69 74 69 63 61 6c 28 24 6d 65 73 73 61 67 | public.function.critical($messag |
b1b60 | 65 2c 20 61 72 72 61 79 20 24 63 6f 6e 74 65 78 74 20 3d 20 5b 5d 29 3a 20 76 6f 69 64 0a 7b 0a | e,.array.$context.=.[]):.void.{. |
b1b80 | 24 74 68 69 73 2d 3e 6c 6f 67 28 4c 6f 67 4c 65 76 65 6c 3a 3a 43 52 49 54 49 43 41 4c 2c 20 24 | $this->log(LogLevel::CRITICAL,.$ |
b1ba0 | 6d 65 73 73 61 67 65 2c 20 24 63 6f 6e 74 65 78 74 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 | message,.$context);.}..public.fu |
b1bc0 | 6e 63 74 69 6f 6e 20 65 72 72 6f 72 28 24 6d 65 73 73 61 67 65 2c 20 61 72 72 61 79 20 24 63 6f | nction.error($message,.array.$co |
b1be0 | 6e 74 65 78 74 20 3d 20 5b 5d 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 6c 6f 67 28 4c | ntext.=.[]):.void.{.$this->log(L |
b1c00 | 6f 67 4c 65 76 65 6c 3a 3a 45 52 52 4f 52 2c 20 24 6d 65 73 73 61 67 65 2c 20 24 63 6f 6e 74 65 | ogLevel::ERROR,.$message,.$conte |
b1c20 | 78 74 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 77 61 72 6e 69 6e 67 28 | xt);.}..public.function.warning( |
b1c40 | 24 6d 65 73 73 61 67 65 2c 20 61 72 72 61 79 20 24 63 6f 6e 74 65 78 74 20 3d 20 5b 5d 29 3a 20 | $message,.array.$context.=.[]):. |
b1c60 | 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 6c 6f 67 28 4c 6f 67 4c 65 76 65 6c 3a 3a 57 41 52 4e | void.{.$this->log(LogLevel::WARN |
b1c80 | 49 4e 47 2c 20 24 6d 65 73 73 61 67 65 2c 20 24 63 6f 6e 74 65 78 74 29 3b 0a 7d 0a 0a 70 75 62 | ING,.$message,.$context);.}..pub |
b1ca0 | 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 6e 6f 74 69 63 65 28 24 6d 65 73 73 61 67 65 2c 20 61 72 | lic.function.notice($message,.ar |
b1cc0 | 72 61 79 20 24 63 6f 6e 74 65 78 74 20 3d 20 5b 5d 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 | ray.$context.=.[]):.void.{.$this |
b1ce0 | 2d 3e 6c 6f 67 28 4c 6f 67 4c 65 76 65 6c 3a 3a 4e 4f 54 49 43 45 2c 20 24 6d 65 73 73 61 67 65 | ->log(LogLevel::NOTICE,.$message |
b1d00 | 2c 20 24 63 6f 6e 74 65 78 74 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 | ,.$context);.}..public.function. |
b1d20 | 69 6e 66 6f 28 24 6d 65 73 73 61 67 65 2c 20 61 72 72 61 79 20 24 63 6f 6e 74 65 78 74 20 3d 20 | info($message,.array.$context.=. |
b1d40 | 5b 5d 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 6c 6f 67 28 4c 6f 67 4c 65 76 65 6c 3a | []):.void.{.$this->log(LogLevel: |
b1d60 | 3a 49 4e 46 4f 2c 20 24 6d 65 73 73 61 67 65 2c 20 24 63 6f 6e 74 65 78 74 29 3b 0a 7d 0a 0a 70 | :INFO,.$message,.$context);.}..p |
b1d80 | 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 64 65 62 75 67 28 24 6d 65 73 73 61 67 65 2c 20 61 | ublic.function.debug($message,.a |
b1da0 | 72 72 61 79 20 24 63 6f 6e 74 65 78 74 20 3d 20 5b 5d 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 | rray.$context.=.[]):.void.{.$thi |
b1dc0 | 73 2d 3e 6c 6f 67 28 4c 6f 67 4c 65 76 65 6c 3a 3a 44 45 42 55 47 2c 20 24 6d 65 73 73 61 67 65 | s->log(LogLevel::DEBUG,.$message |
b1de0 | 2c 20 24 63 6f 6e 74 65 78 74 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 | ,.$context);.}..public.function. |
b1e00 | 6c 6f 67 28 24 6c 65 76 65 6c 2c 20 24 6d 65 73 73 61 67 65 2c 20 61 72 72 61 79 20 24 63 6f 6e | log($level,.$message,.array.$con |
b1e20 | 74 65 78 74 20 3d 20 5b 5d 29 3a 20 76 6f 69 64 0a 7b 0a 24 6d 65 73 73 61 67 65 20 3d 20 28 73 | text.=.[]):.void.{.$message.=.(s |
b1e40 | 74 72 69 6e 67 29 20 24 6d 65 73 73 61 67 65 3b 0a 0a 69 66 20 28 69 6e 5f 61 72 72 61 79 28 24 | tring).$message;..if.(in_array($ |
b1e60 | 6c 65 76 65 6c 2c 20 5b 4c 6f 67 4c 65 76 65 6c 3a 3a 45 4d 45 52 47 45 4e 43 59 2c 20 4c 6f 67 | level,.[LogLevel::EMERGENCY,.Log |
b1e80 | 4c 65 76 65 6c 3a 3a 41 4c 45 52 54 2c 20 4c 6f 67 4c 65 76 65 6c 3a 3a 43 52 49 54 49 43 41 4c | Level::ALERT,.LogLevel::CRITICAL |
b1ea0 | 2c 20 4c 6f 67 4c 65 76 65 6c 3a 3a 45 52 52 4f 52 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 77 72 | ,.LogLevel::ERROR])).{.$this->wr |
b1ec0 | 69 74 65 45 72 72 6f 72 28 27 3c 65 72 72 6f 72 3e 27 2e 24 6d 65 73 73 61 67 65 2e 27 3c 2f 65 | iteError('<error>'.$message.'</e |
b1ee0 | 72 72 6f 72 3e 27 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 6c 65 76 65 6c 20 3d 3d 3d 20 4c 6f | rror>');.}.elseif.($level.===.Lo |
b1f00 | 67 4c 65 76 65 6c 3a 3a 57 41 52 4e 49 4e 47 29 20 7b 0a 24 74 68 69 73 2d 3e 77 72 69 74 65 45 | gLevel::WARNING).{.$this->writeE |
b1f20 | 72 72 6f 72 28 27 3c 77 61 72 6e 69 6e 67 3e 27 2e 24 6d 65 73 73 61 67 65 2e 27 3c 2f 77 61 72 | rror('<warning>'.$message.'</war |
b1f40 | 6e 69 6e 67 3e 27 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 6c 65 76 65 6c 20 3d 3d 3d 20 4c 6f | ning>');.}.elseif.($level.===.Lo |
b1f60 | 67 4c 65 76 65 6c 3a 3a 4e 4f 54 49 43 45 29 20 7b 0a 24 74 68 69 73 2d 3e 77 72 69 74 65 45 72 | gLevel::NOTICE).{.$this->writeEr |
b1f80 | 72 6f 72 28 27 3c 69 6e 66 6f 3e 27 2e 24 6d 65 73 73 61 67 65 2e 27 3c 2f 69 6e 66 6f 3e 27 2c | ror('<info>'.$message.'</info>', |
b1fa0 | 20 74 72 75 65 2c 20 73 65 6c 66 3a 3a 56 45 52 42 4f 53 45 29 3b 0a 7d 20 65 6c 73 65 69 66 20 | .true,.self::VERBOSE);.}.elseif. |
b1fc0 | 28 24 6c 65 76 65 6c 20 3d 3d 3d 20 4c 6f 67 4c 65 76 65 6c 3a 3a 49 4e 46 4f 29 20 7b 0a 24 74 | ($level.===.LogLevel::INFO).{.$t |
b1fe0 | 68 69 73 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 69 6e 66 6f 3e 27 2e 24 6d 65 73 73 61 67 | his->writeError('<info>'.$messag |
b2000 | 65 2e 27 3c 2f 69 6e 66 6f 3e 27 2c 20 74 72 75 65 2c 20 73 65 6c 66 3a 3a 56 45 52 59 5f 56 45 | e.'</info>',.true,.self::VERY_VE |
b2020 | 52 42 4f 53 45 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 74 68 69 73 2d 3e 77 72 69 74 65 45 72 72 | RBOSE);.}.else.{.$this->writeErr |
b2040 | 6f 72 28 24 6d 65 73 73 61 67 65 2c 20 74 72 75 65 2c 20 73 65 6c 66 3a 3a 44 45 42 55 47 29 3b | or($message,.true,.self::DEBUG); |
b2060 | 0a 7d 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 | .}.}.}.<?php.declare(strict_type |
b2080 | 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f | s=1);............namespace.Compo |
b20a0 | 73 65 72 5c 49 4f 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 63 72 65 5c 50 72 65 67 3b | ser\IO;..use.Composer\Pcre\Preg; |
b20c0 | 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 48 | .use.Symfony\Component\Console\H |
b20e0 | 65 6c 70 65 72 5c 51 75 65 73 74 69 6f 6e 48 65 6c 70 65 72 3b 0a 75 73 65 20 53 79 6d 66 6f 6e | elper\QuestionHelper;.use.Symfon |
b2100 | 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 4f 75 74 70 75 74 5c 53 74 72 65 61 | y\Component\Console\Output\Strea |
b2120 | 6d 4f 75 74 70 75 74 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 | mOutput;.use.Symfony\Component\C |
b2140 | 6f 6e 73 6f 6c 65 5c 46 6f 72 6d 61 74 74 65 72 5c 4f 75 74 70 75 74 46 6f 72 6d 61 74 74 65 72 | onsole\Formatter\OutputFormatter |
b2160 | 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 | Interface;.use.Symfony\Component |
b2180 | 5c 43 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 53 74 72 65 61 6d 61 62 6c 65 49 6e 70 75 74 49 6e | \Console\Input\StreamableInputIn |
b21a0 | 74 65 72 66 61 63 65 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 | terface;.use.Symfony\Component\C |
b21c0 | 6f 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 53 74 72 69 6e 67 49 6e 70 75 74 3b 0a 75 73 65 20 53 79 | onsole\Input\StringInput;.use.Sy |
b21e0 | 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 48 65 6c 70 65 72 5c 48 | mfony\Component\Console\Helper\H |
b2200 | 65 6c 70 65 72 53 65 74 3b 0a 0a 0a 0a 0a 63 6c 61 73 73 20 42 75 66 66 65 72 49 4f 20 65 78 74 | elperSet;.....class.BufferIO.ext |
b2220 | 65 6e 64 73 20 43 6f 6e 73 6f 6c 65 49 4f 0a 7b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 69 6e 70 | ends.ConsoleIO.{..protected.$inp |
b2240 | 75 74 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 6f 75 74 70 75 74 3b 0a 0a 70 75 62 6c 69 63 20 | ut;..protected.$output;..public. |
b2260 | 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 73 74 72 69 6e 67 20 24 69 6e 70 | function.__construct(string.$inp |
b2280 | 75 74 20 3d 20 27 27 2c 20 69 6e 74 20 24 76 65 72 62 6f 73 69 74 79 20 3d 20 53 74 72 65 61 6d | ut.=.'',.int.$verbosity.=.Stream |
b22a0 | 4f 75 74 70 75 74 3a 3a 56 45 52 42 4f 53 49 54 59 5f 4e 4f 52 4d 41 4c 2c 20 3f 4f 75 74 70 75 | Output::VERBOSITY_NORMAL,.?Outpu |
b22c0 | 74 46 6f 72 6d 61 74 74 65 72 49 6e 74 65 72 66 61 63 65 20 24 66 6f 72 6d 61 74 74 65 72 20 3d | tFormatterInterface.$formatter.= |
b22e0 | 20 6e 75 6c 6c 29 0a 7b 0a 24 69 6e 70 75 74 20 3d 20 6e 65 77 20 53 74 72 69 6e 67 49 6e 70 75 | .null).{.$input.=.new.StringInpu |
b2300 | 74 28 24 69 6e 70 75 74 29 3b 0a 24 69 6e 70 75 74 2d 3e 73 65 74 49 6e 74 65 72 61 63 74 69 76 | t($input);.$input->setInteractiv |
b2320 | 65 28 66 61 6c 73 65 29 3b 0a 0a 24 6f 75 74 70 75 74 20 3d 20 6e 65 77 20 53 74 72 65 61 6d 4f | e(false);..$output.=.new.StreamO |
b2340 | 75 74 70 75 74 28 66 6f 70 65 6e 28 27 70 68 70 3a 2f 2f 6d 65 6d 6f 72 79 27 2c 20 27 72 77 27 | utput(fopen('php://memory',.'rw' |
b2360 | 29 2c 20 24 76 65 72 62 6f 73 69 74 79 2c 20 24 66 6f 72 6d 61 74 74 65 72 20 3f 20 24 66 6f 72 | ),.$verbosity,.$formatter.?.$for |
b2380 | 6d 61 74 74 65 72 2d 3e 69 73 44 65 63 6f 72 61 74 65 64 28 29 20 3a 20 66 61 6c 73 65 2c 20 24 | matter->isDecorated().:.false,.$ |
b23a0 | 66 6f 72 6d 61 74 74 65 72 29 3b 0a 0a 70 61 72 65 6e 74 3a 3a 5f 5f 63 6f 6e 73 74 72 75 63 74 | formatter);..parent::__construct |
b23c0 | 28 24 69 6e 70 75 74 2c 20 24 6f 75 74 70 75 74 2c 20 6e 65 77 20 48 65 6c 70 65 72 53 65 74 28 | ($input,.$output,.new.HelperSet( |
b23e0 | 5b 0a 6e 65 77 20 51 75 65 73 74 69 6f 6e 48 65 6c 70 65 72 28 29 2c 0a 5d 29 29 3b 0a 7d 0a 0a | [.new.QuestionHelper(),.]));.}.. |
b2400 | 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 4f 75 74 70 75 74 28 29 3a 20 | ...public.function.getOutput():. |
b2420 | 73 74 72 69 6e 67 0a 7b 0a 66 73 65 65 6b 28 24 74 68 69 73 2d 3e 6f 75 74 70 75 74 2d 3e 67 65 | string.{.fseek($this->output->ge |
b2440 | 74 53 74 72 65 61 6d 28 29 2c 20 30 29 3b 0a 0a 24 6f 75 74 70 75 74 20 3d 20 73 74 72 65 61 6d | tStream(),.0);..$output.=.stream |
b2460 | 5f 67 65 74 5f 63 6f 6e 74 65 6e 74 73 28 24 74 68 69 73 2d 3e 6f 75 74 70 75 74 2d 3e 67 65 74 | _get_contents($this->output->get |
b2480 | 53 74 72 65 61 6d 28 29 29 3b 0a 0a 24 6f 75 74 70 75 74 20 3d 20 50 72 65 67 3a 3a 72 65 70 6c | Stream());..$output.=.Preg::repl |
b24a0 | 61 63 65 43 61 6c 6c 62 61 63 6b 28 22 7b 28 3f 3c 3d 5e 7c 5c 6e 7c 5c 78 30 38 29 28 2e 2b 3f | aceCallback("{(?<=^|\n|\x08)(.+? |
b24c0 | 29 28 5c 78 30 38 2b 29 7d 22 2c 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 6d 61 | )(\x08+)}",.static.function.($ma |
b24e0 | 74 63 68 65 73 29 3a 20 73 74 72 69 6e 67 20 7b 0a 24 70 72 65 20 3d 20 73 74 72 69 70 5f 74 61 | tches):.string.{.$pre.=.strip_ta |
b2500 | 67 73 28 24 6d 61 74 63 68 65 73 5b 31 5d 29 3b 0a 0a 69 66 20 28 73 74 72 6c 65 6e 28 24 70 72 | gs($matches[1]);..if.(strlen($pr |
b2520 | 65 29 20 3d 3d 3d 20 73 74 72 6c 65 6e 28 24 6d 61 74 63 68 65 73 5b 32 5d 29 29 20 7b 0a 72 65 | e).===.strlen($matches[2])).{.re |
b2540 | 74 75 72 6e 20 27 27 3b 0a 7d 0a 0a 0a 72 65 74 75 72 6e 20 72 74 72 69 6d 28 24 6d 61 74 63 68 | turn.'';.}...return.rtrim($match |
b2560 | 65 73 5b 31 5d 29 2e 22 5c 6e 22 3b 0a 7d 2c 20 24 6f 75 74 70 75 74 29 3b 0a 0a 72 65 74 75 72 | es[1])."\n";.},.$output);..retur |
b2580 | 6e 20 24 6f 75 74 70 75 74 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 | n.$output;.}.......public.functi |
b25a0 | 6f 6e 20 73 65 74 55 73 65 72 49 6e 70 75 74 73 28 61 72 72 61 79 20 24 69 6e 70 75 74 73 29 3a | on.setUserInputs(array.$inputs): |
b25c0 | 20 76 6f 69 64 0a 7b 0a 69 66 20 28 21 24 74 68 69 73 2d 3e 69 6e 70 75 74 20 69 6e 73 74 61 6e | .void.{.if.(!$this->input.instan |
b25e0 | 63 65 6f 66 20 53 74 72 65 61 6d 61 62 6c 65 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 29 20 7b | ceof.StreamableInputInterface).{ |
b2600 | 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 53 65 | .throw.new.\RuntimeException('Se |
b2620 | 74 74 69 6e 67 20 74 68 65 20 75 73 65 72 20 69 6e 70 75 74 73 20 72 65 71 75 69 72 65 73 20 61 | tting.the.user.inputs.requires.a |
b2640 | 74 20 6c 65 61 73 74 20 74 68 65 20 76 65 72 73 69 6f 6e 20 33 2e 32 20 6f 66 20 74 68 65 20 73 | t.least.the.version.3.2.of.the.s |
b2660 | 79 6d 66 6f 6e 79 2f 63 6f 6e 73 6f 6c 65 20 63 6f 6d 70 6f 6e 65 6e 74 2e 27 29 3b 0a 7d 0a 0a | ymfony/console.component.');.}.. |
b2680 | 24 74 68 69 73 2d 3e 69 6e 70 75 74 2d 3e 73 65 74 53 74 72 65 61 6d 28 24 74 68 69 73 2d 3e 63 | $this->input->setStream($this->c |
b26a0 | 72 65 61 74 65 53 74 72 65 61 6d 28 24 69 6e 70 75 74 73 29 29 3b 0a 24 74 68 69 73 2d 3e 69 6e | reateStream($inputs));.$this->in |
b26c0 | 70 75 74 2d 3e 73 65 74 49 6e 74 65 72 61 63 74 69 76 65 28 74 72 75 65 29 3b 0a 7d 0a 0a 0a 0a | put->setInteractive(true);.}.... |
b26e0 | 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 63 72 65 61 74 65 53 74 72 65 61 6d | ...private.function.createStream |
b2700 | 28 61 72 72 61 79 20 24 69 6e 70 75 74 73 29 0a 7b 0a 24 73 74 72 65 61 6d 20 3d 20 66 6f 70 65 | (array.$inputs).{.$stream.=.fope |
b2720 | 6e 28 27 70 68 70 3a 2f 2f 6d 65 6d 6f 72 79 27 2c 20 27 72 2b 27 29 3b 0a 0a 66 6f 72 65 61 63 | n('php://memory',.'r+');..foreac |
b2740 | 68 20 28 24 69 6e 70 75 74 73 20 61 73 20 24 69 6e 70 75 74 29 20 7b 0a 66 77 72 69 74 65 28 24 | h.($inputs.as.$input).{.fwrite($ |
b2760 | 73 74 72 65 61 6d 2c 20 24 69 6e 70 75 74 2e 50 48 50 5f 45 4f 4c 29 3b 0a 7d 0a 0a 72 65 77 69 | stream,.$input.PHP_EOL);.}..rewi |
b2780 | 6e 64 28 24 73 74 72 65 61 6d 29 3b 0a 0a 72 65 74 75 72 6e 20 24 73 74 72 65 61 6d 3b 0a 7d 0a | nd($stream);..return.$stream;.}. |
b27a0 | 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b | }.<?php.declare(strict_types=1); |
b27c0 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 49 | ............namespace.Composer\I |
b27e0 | 4f 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 51 75 65 73 74 69 6f 6e 5c 53 74 72 69 63 74 | O;..use.Composer\Question\Strict |
b2800 | 43 6f 6e 66 69 72 6d 61 74 69 6f 6e 51 75 65 73 74 69 6f 6e 3b 0a 75 73 65 20 53 79 6d 66 6f 6e | ConfirmationQuestion;.use.Symfon |
b2820 | 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 48 65 6c 70 65 72 5c 48 65 6c 70 65 | y\Component\Console\Helper\Helpe |
b2840 | 72 53 65 74 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 | rSet;.use.Symfony\Component\Cons |
b2860 | 6f 6c 65 5c 48 65 6c 70 65 72 5c 50 72 6f 67 72 65 73 73 42 61 72 3b 0a 75 73 65 20 53 79 6d 66 | ole\Helper\ProgressBar;.use.Symf |
b2880 | 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 48 65 6c 70 65 72 5c 54 61 62 | ony\Component\Console\Helper\Tab |
b28a0 | 6c 65 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c | le;.use.Symfony\Component\Consol |
b28c0 | 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 53 79 6d 66 | e\Input\InputInterface;.use.Symf |
b28e0 | 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 4f 75 74 70 75 74 5c 43 6f 6e | ony\Component\Console\Output\Con |
b2900 | 73 6f 6c 65 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 | soleOutputInterface;.use.Symfony |
b2920 | 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 4f 75 74 70 75 74 5c 4f 75 74 70 75 74 | \Component\Console\Output\Output |
b2940 | 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 | Interface;.use.Symfony\Component |
b2960 | 5c 43 6f 6e 73 6f 6c 65 5c 51 75 65 73 74 69 6f 6e 5c 43 68 6f 69 63 65 51 75 65 73 74 69 6f 6e | \Console\Question\ChoiceQuestion |
b2980 | 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c | ;.use.Symfony\Component\Console\ |
b29a0 | 51 75 65 73 74 69 6f 6e 5c 51 75 65 73 74 69 6f 6e 3b 0a 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 | Question\Question;........class. |
b29c0 | 43 6f 6e 73 6f 6c 65 49 4f 20 65 78 74 65 6e 64 73 20 42 61 73 65 49 4f 0a 7b 0a 0a 70 72 6f 74 | ConsoleIO.extends.BaseIO.{..prot |
b29e0 | 65 63 74 65 64 20 24 69 6e 70 75 74 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 6f 75 74 70 75 74 | ected.$input;..protected.$output |
b2a00 | 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 68 65 6c 70 65 72 53 65 74 3b 0a 0a 70 72 6f 74 65 63 | ;..protected.$helperSet;..protec |
b2a20 | 74 65 64 20 24 6c 61 73 74 4d 65 73 73 61 67 65 20 3d 20 27 27 3b 0a 0a 70 72 6f 74 65 63 74 65 | ted.$lastMessage.=.'';..protecte |
b2a40 | 64 20 24 6c 61 73 74 4d 65 73 73 61 67 65 45 72 72 20 3d 20 27 27 3b 0a 0a 0a 70 72 69 76 61 74 | d.$lastMessageErr.=.'';...privat |
b2a60 | 65 20 24 73 74 61 72 74 54 69 6d 65 3b 0a 0a 70 72 69 76 61 74 65 20 24 76 65 72 62 6f 73 69 74 | e.$startTime;..private.$verbosit |
b2a80 | 79 4d 61 70 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f | yMap;.........public.function.__ |
b2aa0 | 63 6f 6e 73 74 72 75 63 74 28 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 69 6e 70 75 74 2c | construct(InputInterface.$input, |
b2ac0 | 20 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 6f 75 74 70 75 74 2c 20 48 65 6c 70 65 72 | .OutputInterface.$output,.Helper |
b2ae0 | 53 65 74 20 24 68 65 6c 70 65 72 53 65 74 29 0a 7b 0a 24 74 68 69 73 2d 3e 69 6e 70 75 74 20 3d | Set.$helperSet).{.$this->input.= |
b2b00 | 20 24 69 6e 70 75 74 3b 0a 24 74 68 69 73 2d 3e 6f 75 74 70 75 74 20 3d 20 24 6f 75 74 70 75 74 | .$input;.$this->output.=.$output |
b2b20 | 3b 0a 24 74 68 69 73 2d 3e 68 65 6c 70 65 72 53 65 74 20 3d 20 24 68 65 6c 70 65 72 53 65 74 3b | ;.$this->helperSet.=.$helperSet; |
b2b40 | 0a 24 74 68 69 73 2d 3e 76 65 72 62 6f 73 69 74 79 4d 61 70 20 3d 20 5b 0a 73 65 6c 66 3a 3a 51 | .$this->verbosityMap.=.[.self::Q |
b2b60 | 55 49 45 54 20 3d 3e 20 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 3a 3a 56 45 52 42 4f 53 49 | UIET.=>.OutputInterface::VERBOSI |
b2b80 | 54 59 5f 51 55 49 45 54 2c 0a 73 65 6c 66 3a 3a 4e 4f 52 4d 41 4c 20 3d 3e 20 4f 75 74 70 75 74 | TY_QUIET,.self::NORMAL.=>.Output |
b2ba0 | 49 6e 74 65 72 66 61 63 65 3a 3a 56 45 52 42 4f 53 49 54 59 5f 4e 4f 52 4d 41 4c 2c 0a 73 65 6c | Interface::VERBOSITY_NORMAL,.sel |
b2bc0 | 66 3a 3a 56 45 52 42 4f 53 45 20 3d 3e 20 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 3a 3a 56 | f::VERBOSE.=>.OutputInterface::V |
b2be0 | 45 52 42 4f 53 49 54 59 5f 56 45 52 42 4f 53 45 2c 0a 73 65 6c 66 3a 3a 56 45 52 59 5f 56 45 52 | ERBOSITY_VERBOSE,.self::VERY_VER |
b2c00 | 42 4f 53 45 20 3d 3e 20 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 3a 3a 56 45 52 42 4f 53 49 | BOSE.=>.OutputInterface::VERBOSI |
b2c20 | 54 59 5f 56 45 52 59 5f 56 45 52 42 4f 53 45 2c 0a 73 65 6c 66 3a 3a 44 45 42 55 47 20 3d 3e 20 | TY_VERY_VERBOSE,.self::DEBUG.=>. |
b2c40 | 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 3a 3a 56 45 52 42 4f 53 49 54 59 5f 44 45 42 55 47 | OutputInterface::VERBOSITY_DEBUG |
b2c60 | 2c 0a 5d 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 65 6e 61 62 6c | ,.];.}.....public.function.enabl |
b2c80 | 65 44 65 62 75 67 67 69 6e 67 28 66 6c 6f 61 74 20 24 73 74 61 72 74 54 69 6d 65 29 0a 7b 0a 24 | eDebugging(float.$startTime).{.$ |
b2ca0 | 74 68 69 73 2d 3e 73 74 61 72 74 54 69 6d 65 20 3d 20 24 73 74 61 72 74 54 69 6d 65 3b 0a 7d 0a | this->startTime.=.$startTime;.}. |
b2cc0 | 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 49 6e 74 65 72 61 63 74 69 76 | ....public.function.isInteractiv |
b2ce0 | 65 28 29 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 69 6e 70 75 74 2d 3e 69 73 49 6e 74 | e().{.return.$this->input->isInt |
b2d00 | 65 72 61 63 74 69 76 65 28 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f | eractive();.}.....public.functio |
b2d20 | 6e 20 69 73 44 65 63 6f 72 61 74 65 64 28 29 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e | n.isDecorated().{.return.$this-> |
b2d40 | 6f 75 74 70 75 74 2d 3e 69 73 44 65 63 6f 72 61 74 65 64 28 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 | output->isDecorated();.}.....pub |
b2d60 | 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 56 65 72 62 6f 73 65 28 29 0a 7b 0a 72 65 74 75 72 | lic.function.isVerbose().{.retur |
b2d80 | 6e 20 24 74 68 69 73 2d 3e 6f 75 74 70 75 74 2d 3e 69 73 56 65 72 62 6f 73 65 28 29 3b 0a 7d 0a | n.$this->output->isVerbose();.}. |
b2da0 | 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 56 65 72 79 56 65 72 62 6f 73 | ....public.function.isVeryVerbos |
b2dc0 | 65 28 29 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 6f 75 74 70 75 74 2d 3e 69 73 56 65 | e().{.return.$this->output->isVe |
b2de0 | 72 79 56 65 72 62 6f 73 65 28 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 | ryVerbose();.}.....public.functi |
b2e00 | 6f 6e 20 69 73 44 65 62 75 67 28 29 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 6f 75 74 | on.isDebug().{.return.$this->out |
b2e20 | 70 75 74 2d 3e 69 73 44 65 62 75 67 28 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e | put->isDebug();.}.....public.fun |
b2e40 | 63 74 69 6f 6e 20 77 72 69 74 65 28 24 6d 65 73 73 61 67 65 73 2c 20 62 6f 6f 6c 20 24 6e 65 77 | ction.write($messages,.bool.$new |
b2e60 | 6c 69 6e 65 20 3d 20 74 72 75 65 2c 20 69 6e 74 20 24 76 65 72 62 6f 73 69 74 79 20 3d 20 73 65 | line.=.true,.int.$verbosity.=.se |
b2e80 | 6c 66 3a 3a 4e 4f 52 4d 41 4c 29 0a 7b 0a 24 74 68 69 73 2d 3e 64 6f 57 72 69 74 65 28 24 6d 65 | lf::NORMAL).{.$this->doWrite($me |
b2ea0 | 73 73 61 67 65 73 2c 20 24 6e 65 77 6c 69 6e 65 2c 20 66 61 6c 73 65 2c 20 24 76 65 72 62 6f 73 | ssages,.$newline,.false,.$verbos |
b2ec0 | 69 74 79 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 77 72 69 74 | ity);.}.....public.function.writ |
b2ee0 | 65 45 72 72 6f 72 28 24 6d 65 73 73 61 67 65 73 2c 20 62 6f 6f 6c 20 24 6e 65 77 6c 69 6e 65 20 | eError($messages,.bool.$newline. |
b2f00 | 3d 20 74 72 75 65 2c 20 69 6e 74 20 24 76 65 72 62 6f 73 69 74 79 20 3d 20 73 65 6c 66 3a 3a 4e | =.true,.int.$verbosity.=.self::N |
b2f20 | 4f 52 4d 41 4c 29 0a 7b 0a 24 74 68 69 73 2d 3e 64 6f 57 72 69 74 65 28 24 6d 65 73 73 61 67 65 | ORMAL).{.$this->doWrite($message |
b2f40 | 73 2c 20 24 6e 65 77 6c 69 6e 65 2c 20 74 72 75 65 2c 20 24 76 65 72 62 6f 73 69 74 79 29 3b 0a | s,.$newline,.true,.$verbosity);. |
b2f60 | 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 77 72 69 74 65 52 61 77 28 24 | }.....public.function.writeRaw($ |
b2f80 | 6d 65 73 73 61 67 65 73 2c 20 62 6f 6f 6c 20 24 6e 65 77 6c 69 6e 65 20 3d 20 74 72 75 65 2c 20 | messages,.bool.$newline.=.true,. |
b2fa0 | 69 6e 74 20 24 76 65 72 62 6f 73 69 74 79 20 3d 20 73 65 6c 66 3a 3a 4e 4f 52 4d 41 4c 29 0a 7b | int.$verbosity.=.self::NORMAL).{ |
b2fc0 | 0a 24 74 68 69 73 2d 3e 64 6f 57 72 69 74 65 28 24 6d 65 73 73 61 67 65 73 2c 20 24 6e 65 77 6c | .$this->doWrite($messages,.$newl |
b2fe0 | 69 6e 65 2c 20 66 61 6c 73 65 2c 20 24 76 65 72 62 6f 73 69 74 79 2c 20 74 72 75 65 29 3b 0a 7d | ine,.false,.$verbosity,.true);.} |
b3000 | 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 77 72 69 74 65 45 72 72 6f 72 52 | .....public.function.writeErrorR |
b3020 | 61 77 28 24 6d 65 73 73 61 67 65 73 2c 20 62 6f 6f 6c 20 24 6e 65 77 6c 69 6e 65 20 3d 20 74 72 | aw($messages,.bool.$newline.=.tr |
b3040 | 75 65 2c 20 69 6e 74 20 24 76 65 72 62 6f 73 69 74 79 20 3d 20 73 65 6c 66 3a 3a 4e 4f 52 4d 41 | ue,.int.$verbosity.=.self::NORMA |
b3060 | 4c 29 0a 7b 0a 24 74 68 69 73 2d 3e 64 6f 57 72 69 74 65 28 24 6d 65 73 73 61 67 65 73 2c 20 24 | L).{.$this->doWrite($messages,.$ |
b3080 | 6e 65 77 6c 69 6e 65 2c 20 74 72 75 65 2c 20 24 76 65 72 62 6f 73 69 74 79 2c 20 74 72 75 65 29 | newline,.true,.$verbosity,.true) |
b30a0 | 3b 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 64 6f 57 72 69 74 65 | ;.}.....private.function.doWrite |
b30c0 | 28 24 6d 65 73 73 61 67 65 73 2c 20 62 6f 6f 6c 20 24 6e 65 77 6c 69 6e 65 2c 20 62 6f 6f 6c 20 | ($messages,.bool.$newline,.bool. |
b30e0 | 24 73 74 64 65 72 72 2c 20 69 6e 74 20 24 76 65 72 62 6f 73 69 74 79 2c 20 62 6f 6f 6c 20 24 72 | $stderr,.int.$verbosity,.bool.$r |
b3100 | 61 77 20 3d 20 66 61 6c 73 65 29 3a 20 76 6f 69 64 0a 7b 0a 24 73 66 56 65 72 62 6f 73 69 74 79 | aw.=.false):.void.{.$sfVerbosity |
b3120 | 20 3d 20 24 74 68 69 73 2d 3e 76 65 72 62 6f 73 69 74 79 4d 61 70 5b 24 76 65 72 62 6f 73 69 74 | .=.$this->verbosityMap[$verbosit |
b3140 | 79 5d 3b 0a 69 66 20 28 24 73 66 56 65 72 62 6f 73 69 74 79 20 3e 20 24 74 68 69 73 2d 3e 6f 75 | y];.if.($sfVerbosity.>.$this->ou |
b3160 | 74 70 75 74 2d 3e 67 65 74 56 65 72 62 6f 73 69 74 79 28 29 29 20 7b 0a 72 65 74 75 72 6e 3b 0a | tput->getVerbosity()).{.return;. |
b3180 | 7d 0a 0a 69 66 20 28 24 72 61 77 29 20 7b 0a 24 73 66 56 65 72 62 6f 73 69 74 79 20 7c 3d 20 4f | }..if.($raw).{.$sfVerbosity.|=.O |
b31a0 | 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 3a 3a 4f 55 54 50 55 54 5f 52 41 57 3b 0a 7d 0a 0a 69 | utputInterface::OUTPUT_RAW;.}..i |
b31c0 | 66 20 28 6e 75 6c 6c 20 21 3d 3d 20 24 74 68 69 73 2d 3e 73 74 61 72 74 54 69 6d 65 29 20 7b 0a | f.(null.!==.$this->startTime).{. |
b31e0 | 24 6d 65 6d 6f 72 79 55 73 61 67 65 20 3d 20 6d 65 6d 6f 72 79 5f 67 65 74 5f 75 73 61 67 65 28 | $memoryUsage.=.memory_get_usage( |
b3200 | 29 20 2f 20 31 30 32 34 20 2f 20 31 30 32 34 3b 0a 24 74 69 6d 65 53 70 65 6e 74 20 3d 20 6d 69 | )./.1024./.1024;.$timeSpent.=.mi |
b3220 | 63 72 6f 74 69 6d 65 28 74 72 75 65 29 20 2d 20 24 74 68 69 73 2d 3e 73 74 61 72 74 54 69 6d 65 | crotime(true).-.$this->startTime |
b3240 | 3b 0a 24 6d 65 73 73 61 67 65 73 20 3d 20 61 72 72 61 79 5f 6d 61 70 28 73 74 61 74 69 63 20 66 | ;.$messages.=.array_map(static.f |
b3260 | 75 6e 63 74 69 6f 6e 20 28 24 6d 65 73 73 61 67 65 29 20 75 73 65 20 28 24 6d 65 6d 6f 72 79 55 | unction.($message).use.($memoryU |
b3280 | 73 61 67 65 2c 20 24 74 69 6d 65 53 70 65 6e 74 29 3a 20 73 74 72 69 6e 67 20 7b 0a 72 65 74 75 | sage,.$timeSpent):.string.{.retu |
b32a0 | 72 6e 20 73 70 72 69 6e 74 66 28 27 5b 25 2e 31 66 4d 69 42 2f 25 2e 32 66 73 5d 20 25 73 27 2c | rn.sprintf('[%.1fMiB/%.2fs].%s', |
b32c0 | 20 24 6d 65 6d 6f 72 79 55 73 61 67 65 2c 20 24 74 69 6d 65 53 70 65 6e 74 2c 20 24 6d 65 73 73 | .$memoryUsage,.$timeSpent,.$mess |
b32e0 | 61 67 65 29 3b 0a 7d 2c 20 28 61 72 72 61 79 29 20 24 6d 65 73 73 61 67 65 73 29 3b 0a 7d 0a 0a | age);.},.(array).$messages);.}.. |
b3300 | 69 66 20 28 74 72 75 65 20 3d 3d 3d 20 24 73 74 64 65 72 72 20 26 26 20 24 74 68 69 73 2d 3e 6f | if.(true.===.$stderr.&&.$this->o |
b3320 | 75 74 70 75 74 20 69 6e 73 74 61 6e 63 65 6f 66 20 43 6f 6e 73 6f 6c 65 4f 75 74 70 75 74 49 6e | utput.instanceof.ConsoleOutputIn |
b3340 | 74 65 72 66 61 63 65 29 20 7b 0a 24 74 68 69 73 2d 3e 6f 75 74 70 75 74 2d 3e 67 65 74 45 72 72 | terface).{.$this->output->getErr |
b3360 | 6f 72 4f 75 74 70 75 74 28 29 2d 3e 77 72 69 74 65 28 24 6d 65 73 73 61 67 65 73 2c 20 24 6e 65 | orOutput()->write($messages,.$ne |
b3380 | 77 6c 69 6e 65 2c 20 24 73 66 56 65 72 62 6f 73 69 74 79 29 3b 0a 24 74 68 69 73 2d 3e 6c 61 73 | wline,.$sfVerbosity);.$this->las |
b33a0 | 74 4d 65 73 73 61 67 65 45 72 72 20 3d 20 69 6d 70 6c 6f 64 65 28 24 6e 65 77 6c 69 6e 65 20 3f | tMessageErr.=.implode($newline.? |
b33c0 | 20 22 5c 6e 22 20 3a 20 27 27 2c 20 28 61 72 72 61 79 29 20 24 6d 65 73 73 61 67 65 73 29 3b 0a | ."\n".:.'',.(array).$messages);. |
b33e0 | 0a 72 65 74 75 72 6e 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 6f 75 74 70 75 74 2d 3e 77 72 69 74 65 | .return;.}..$this->output->write |
b3400 | 28 24 6d 65 73 73 61 67 65 73 2c 20 24 6e 65 77 6c 69 6e 65 2c 20 24 73 66 56 65 72 62 6f 73 69 | ($messages,.$newline,.$sfVerbosi |
b3420 | 74 79 29 3b 0a 24 74 68 69 73 2d 3e 6c 61 73 74 4d 65 73 73 61 67 65 20 3d 20 69 6d 70 6c 6f 64 | ty);.$this->lastMessage.=.implod |
b3440 | 65 28 24 6e 65 77 6c 69 6e 65 20 3f 20 22 5c 6e 22 20 3a 20 27 27 2c 20 28 61 72 72 61 79 29 20 | e($newline.?."\n".:.'',.(array). |
b3460 | 24 6d 65 73 73 61 67 65 73 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f | $messages);.}.....public.functio |
b3480 | 6e 20 6f 76 65 72 77 72 69 74 65 28 24 6d 65 73 73 61 67 65 73 2c 20 62 6f 6f 6c 20 24 6e 65 77 | n.overwrite($messages,.bool.$new |
b34a0 | 6c 69 6e 65 20 3d 20 74 72 75 65 2c 20 3f 69 6e 74 20 24 73 69 7a 65 20 3d 20 6e 75 6c 6c 2c 20 | line.=.true,.?int.$size.=.null,. |
b34c0 | 69 6e 74 20 24 76 65 72 62 6f 73 69 74 79 20 3d 20 73 65 6c 66 3a 3a 4e 4f 52 4d 41 4c 29 0a 7b | int.$verbosity.=.self::NORMAL).{ |
b34e0 | 0a 24 74 68 69 73 2d 3e 64 6f 4f 76 65 72 77 72 69 74 65 28 24 6d 65 73 73 61 67 65 73 2c 20 24 | .$this->doOverwrite($messages,.$ |
b3500 | 6e 65 77 6c 69 6e 65 2c 20 24 73 69 7a 65 2c 20 66 61 6c 73 65 2c 20 24 76 65 72 62 6f 73 69 74 | newline,.$size,.false,.$verbosit |
b3520 | 79 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 6f 76 65 72 77 72 | y);.}.....public.function.overwr |
b3540 | 69 74 65 45 72 72 6f 72 28 24 6d 65 73 73 61 67 65 73 2c 20 62 6f 6f 6c 20 24 6e 65 77 6c 69 6e | iteError($messages,.bool.$newlin |
b3560 | 65 20 3d 20 74 72 75 65 2c 20 3f 69 6e 74 20 24 73 69 7a 65 20 3d 20 6e 75 6c 6c 2c 20 69 6e 74 | e.=.true,.?int.$size.=.null,.int |
b3580 | 20 24 76 65 72 62 6f 73 69 74 79 20 3d 20 73 65 6c 66 3a 3a 4e 4f 52 4d 41 4c 29 0a 7b 0a 24 74 | .$verbosity.=.self::NORMAL).{.$t |
b35a0 | 68 69 73 2d 3e 64 6f 4f 76 65 72 77 72 69 74 65 28 24 6d 65 73 73 61 67 65 73 2c 20 24 6e 65 77 | his->doOverwrite($messages,.$new |
b35c0 | 6c 69 6e 65 2c 20 24 73 69 7a 65 2c 20 74 72 75 65 2c 20 24 76 65 72 62 6f 73 69 74 79 29 3b 0a | line,.$size,.true,.$verbosity);. |
b35e0 | 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 64 6f 4f 76 65 72 77 72 69 | }.....private.function.doOverwri |
b3600 | 74 65 28 24 6d 65 73 73 61 67 65 73 2c 20 62 6f 6f 6c 20 24 6e 65 77 6c 69 6e 65 2c 20 3f 69 6e | te($messages,.bool.$newline,.?in |
b3620 | 74 20 24 73 69 7a 65 2c 20 62 6f 6f 6c 20 24 73 74 64 65 72 72 2c 20 69 6e 74 20 24 76 65 72 62 | t.$size,.bool.$stderr,.int.$verb |
b3640 | 6f 73 69 74 79 29 3a 20 76 6f 69 64 0a 7b 0a 0a 24 6d 65 73 73 61 67 65 73 20 3d 20 69 6d 70 6c | osity):.void.{..$messages.=.impl |
b3660 | 6f 64 65 28 24 6e 65 77 6c 69 6e 65 20 3f 20 22 5c 6e 22 20 3a 20 27 27 2c 20 28 61 72 72 61 79 | ode($newline.?."\n".:.'',.(array |
b3680 | 29 20 24 6d 65 73 73 61 67 65 73 29 3b 0a 0a 0a 69 66 20 28 21 69 73 73 65 74 28 24 73 69 7a 65 | ).$messages);...if.(!isset($size |
b36a0 | 29 29 20 7b 0a 0a 24 73 69 7a 65 20 3d 20 73 74 72 6c 65 6e 28 73 74 72 69 70 5f 74 61 67 73 28 | )).{..$size.=.strlen(strip_tags( |
b36c0 | 24 73 74 64 65 72 72 20 3f 20 24 74 68 69 73 2d 3e 6c 61 73 74 4d 65 73 73 61 67 65 45 72 72 20 | $stderr.?.$this->lastMessageErr. |
b36e0 | 3a 20 24 74 68 69 73 2d 3e 6c 61 73 74 4d 65 73 73 61 67 65 29 29 3b 0a 7d 0a 0a 24 74 68 69 73 | :.$this->lastMessage));.}..$this |
b3700 | 2d 3e 64 6f 57 72 69 74 65 28 73 74 72 5f 72 65 70 65 61 74 28 22 5c 78 30 38 22 2c 20 24 73 69 | ->doWrite(str_repeat("\x08",.$si |
b3720 | 7a 65 29 2c 20 66 61 6c 73 65 2c 20 24 73 74 64 65 72 72 2c 20 24 76 65 72 62 6f 73 69 74 79 29 | ze),.false,.$stderr,.$verbosity) |
b3740 | 3b 0a 0a 0a 24 74 68 69 73 2d 3e 64 6f 57 72 69 74 65 28 24 6d 65 73 73 61 67 65 73 2c 20 66 61 | ;...$this->doWrite($messages,.fa |
b3760 | 6c 73 65 2c 20 24 73 74 64 65 72 72 2c 20 24 76 65 72 62 6f 73 69 74 79 29 3b 0a 0a 0a 0a 0a 24 | lse,.$stderr,.$verbosity);.....$ |
b3780 | 66 69 6c 6c 20 3d 20 24 73 69 7a 65 20 2d 20 73 74 72 6c 65 6e 28 73 74 72 69 70 5f 74 61 67 73 | fill.=.$size.-.strlen(strip_tags |
b37a0 | 28 24 6d 65 73 73 61 67 65 73 29 29 3b 0a 69 66 20 28 24 66 69 6c 6c 20 3e 20 30 29 20 7b 0a 0a | ($messages));.if.($fill.>.0).{.. |
b37c0 | 24 74 68 69 73 2d 3e 64 6f 57 72 69 74 65 28 73 74 72 5f 72 65 70 65 61 74 28 27 20 27 2c 20 24 | $this->doWrite(str_repeat('.',.$ |
b37e0 | 66 69 6c 6c 29 2c 20 66 61 6c 73 65 2c 20 24 73 74 64 65 72 72 2c 20 24 76 65 72 62 6f 73 69 74 | fill),.false,.$stderr,.$verbosit |
b3800 | 79 29 3b 0a 0a 24 74 68 69 73 2d 3e 64 6f 57 72 69 74 65 28 73 74 72 5f 72 65 70 65 61 74 28 22 | y);..$this->doWrite(str_repeat(" |
b3820 | 5c 78 30 38 22 2c 20 24 66 69 6c 6c 29 2c 20 66 61 6c 73 65 2c 20 24 73 74 64 65 72 72 2c 20 24 | \x08",.$fill),.false,.$stderr,.$ |
b3840 | 76 65 72 62 6f 73 69 74 79 29 3b 0a 7d 0a 0a 69 66 20 28 24 6e 65 77 6c 69 6e 65 29 20 7b 0a 24 | verbosity);.}..if.($newline).{.$ |
b3860 | 74 68 69 73 2d 3e 64 6f 57 72 69 74 65 28 27 27 2c 20 74 72 75 65 2c 20 24 73 74 64 65 72 72 2c | this->doWrite('',.true,.$stderr, |
b3880 | 20 24 76 65 72 62 6f 73 69 74 79 29 3b 0a 7d 0a 0a 69 66 20 28 24 73 74 64 65 72 72 29 20 7b 0a | .$verbosity);.}..if.($stderr).{. |
b38a0 | 24 74 68 69 73 2d 3e 6c 61 73 74 4d 65 73 73 61 67 65 45 72 72 20 3d 20 24 6d 65 73 73 61 67 65 | $this->lastMessageErr.=.$message |
b38c0 | 73 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 74 68 69 73 2d 3e 6c 61 73 74 4d 65 73 73 61 67 65 20 3d | s;.}.else.{.$this->lastMessage.= |
b38e0 | 20 24 6d 65 73 73 61 67 65 73 3b 0a 7d 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 | .$messages;.}.}.....public.funct |
b3900 | 69 6f 6e 20 67 65 74 50 72 6f 67 72 65 73 73 42 61 72 28 69 6e 74 20 24 6d 61 78 20 3d 20 30 29 | ion.getProgressBar(int.$max.=.0) |
b3920 | 0a 7b 0a 72 65 74 75 72 6e 20 6e 65 77 20 50 72 6f 67 72 65 73 73 42 61 72 28 24 74 68 69 73 2d | .{.return.new.ProgressBar($this- |
b3940 | 3e 67 65 74 45 72 72 6f 72 4f 75 74 70 75 74 28 29 2c 20 24 6d 61 78 29 3b 0a 7d 0a 0a 0a 0a 0a | >getErrorOutput(),.$max);.}..... |
b3960 | 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 61 73 6b 28 24 71 75 65 73 74 69 6f 6e 2c 20 24 | public.function.ask($question,.$ |
b3980 | 64 65 66 61 75 6c 74 20 3d 20 6e 75 6c 6c 29 0a 7b 0a 0a 24 68 65 6c 70 65 72 20 3d 20 24 74 68 | default.=.null).{..$helper.=.$th |
b39a0 | 69 73 2d 3e 68 65 6c 70 65 72 53 65 74 2d 3e 67 65 74 28 27 71 75 65 73 74 69 6f 6e 27 29 3b 0a | is->helperSet->get('question');. |
b39c0 | 24 71 75 65 73 74 69 6f 6e 20 3d 20 6e 65 77 20 51 75 65 73 74 69 6f 6e 28 24 71 75 65 73 74 69 | $question.=.new.Question($questi |
b39e0 | 6f 6e 2c 20 24 64 65 66 61 75 6c 74 29 3b 0a 0a 72 65 74 75 72 6e 20 24 68 65 6c 70 65 72 2d 3e | on,.$default);..return.$helper-> |
b3a00 | 61 73 6b 28 24 74 68 69 73 2d 3e 69 6e 70 75 74 2c 20 24 74 68 69 73 2d 3e 67 65 74 45 72 72 6f | ask($this->input,.$this->getErro |
b3a20 | 72 4f 75 74 70 75 74 28 29 2c 20 24 71 75 65 73 74 69 6f 6e 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 | rOutput(),.$question);.}.....pub |
b3a40 | 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 61 73 6b 43 6f 6e 66 69 72 6d 61 74 69 6f 6e 28 24 71 75 | lic.function.askConfirmation($qu |
b3a60 | 65 73 74 69 6f 6e 2c 20 24 64 65 66 61 75 6c 74 20 3d 20 74 72 75 65 29 0a 7b 0a 0a 24 68 65 6c | estion,.$default.=.true).{..$hel |
b3a80 | 70 65 72 20 3d 20 24 74 68 69 73 2d 3e 68 65 6c 70 65 72 53 65 74 2d 3e 67 65 74 28 27 71 75 65 | per.=.$this->helperSet->get('que |
b3aa0 | 73 74 69 6f 6e 27 29 3b 0a 24 71 75 65 73 74 69 6f 6e 20 3d 20 6e 65 77 20 53 74 72 69 63 74 43 | stion');.$question.=.new.StrictC |
b3ac0 | 6f 6e 66 69 72 6d 61 74 69 6f 6e 51 75 65 73 74 69 6f 6e 28 24 71 75 65 73 74 69 6f 6e 2c 20 24 | onfirmationQuestion($question,.$ |
b3ae0 | 64 65 66 61 75 6c 74 29 3b 0a 0a 72 65 74 75 72 6e 20 24 68 65 6c 70 65 72 2d 3e 61 73 6b 28 24 | default);..return.$helper->ask($ |
b3b00 | 74 68 69 73 2d 3e 69 6e 70 75 74 2c 20 24 74 68 69 73 2d 3e 67 65 74 45 72 72 6f 72 4f 75 74 70 | this->input,.$this->getErrorOutp |
b3b20 | 75 74 28 29 2c 20 24 71 75 65 73 74 69 6f 6e 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 | ut(),.$question);.}.....public.f |
b3b40 | 75 6e 63 74 69 6f 6e 20 61 73 6b 41 6e 64 56 61 6c 69 64 61 74 65 28 24 71 75 65 73 74 69 6f 6e | unction.askAndValidate($question |
b3b60 | 2c 20 24 76 61 6c 69 64 61 74 6f 72 2c 20 24 61 74 74 65 6d 70 74 73 20 3d 20 6e 75 6c 6c 2c 20 | ,.$validator,.$attempts.=.null,. |
b3b80 | 24 64 65 66 61 75 6c 74 20 3d 20 6e 75 6c 6c 29 0a 7b 0a 0a 24 68 65 6c 70 65 72 20 3d 20 24 74 | $default.=.null).{..$helper.=.$t |
b3ba0 | 68 69 73 2d 3e 68 65 6c 70 65 72 53 65 74 2d 3e 67 65 74 28 27 71 75 65 73 74 69 6f 6e 27 29 3b | his->helperSet->get('question'); |
b3bc0 | 0a 24 71 75 65 73 74 69 6f 6e 20 3d 20 6e 65 77 20 51 75 65 73 74 69 6f 6e 28 24 71 75 65 73 74 | .$question.=.new.Question($quest |
b3be0 | 69 6f 6e 2c 20 24 64 65 66 61 75 6c 74 29 3b 0a 24 71 75 65 73 74 69 6f 6e 2d 3e 73 65 74 56 61 | ion,.$default);.$question->setVa |
b3c00 | 6c 69 64 61 74 6f 72 28 24 76 61 6c 69 64 61 74 6f 72 29 3b 0a 24 71 75 65 73 74 69 6f 6e 2d 3e | lidator($validator);.$question-> |
b3c20 | 73 65 74 4d 61 78 41 74 74 65 6d 70 74 73 28 24 61 74 74 65 6d 70 74 73 29 3b 0a 0a 72 65 74 75 | setMaxAttempts($attempts);..retu |
b3c40 | 72 6e 20 24 68 65 6c 70 65 72 2d 3e 61 73 6b 28 24 74 68 69 73 2d 3e 69 6e 70 75 74 2c 20 24 74 | rn.$helper->ask($this->input,.$t |
b3c60 | 68 69 73 2d 3e 67 65 74 45 72 72 6f 72 4f 75 74 70 75 74 28 29 2c 20 24 71 75 65 73 74 69 6f 6e | his->getErrorOutput(),.$question |
b3c80 | 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 61 73 6b 41 6e 64 48 | );.}.....public.function.askAndH |
b3ca0 | 69 64 65 41 6e 73 77 65 72 28 24 71 75 65 73 74 69 6f 6e 29 0a 7b 0a 0a 24 68 65 6c 70 65 72 20 | ideAnswer($question).{..$helper. |
b3cc0 | 3d 20 24 74 68 69 73 2d 3e 68 65 6c 70 65 72 53 65 74 2d 3e 67 65 74 28 27 71 75 65 73 74 69 6f | =.$this->helperSet->get('questio |
b3ce0 | 6e 27 29 3b 0a 24 71 75 65 73 74 69 6f 6e 20 3d 20 6e 65 77 20 51 75 65 73 74 69 6f 6e 28 24 71 | n');.$question.=.new.Question($q |
b3d00 | 75 65 73 74 69 6f 6e 29 3b 0a 24 71 75 65 73 74 69 6f 6e 2d 3e 73 65 74 48 69 64 64 65 6e 28 74 | uestion);.$question->setHidden(t |
b3d20 | 72 75 65 29 3b 0a 0a 72 65 74 75 72 6e 20 24 68 65 6c 70 65 72 2d 3e 61 73 6b 28 24 74 68 69 73 | rue);..return.$helper->ask($this |
b3d40 | 2d 3e 69 6e 70 75 74 2c 20 24 74 68 69 73 2d 3e 67 65 74 45 72 72 6f 72 4f 75 74 70 75 74 28 29 | ->input,.$this->getErrorOutput() |
b3d60 | 2c 20 24 71 75 65 73 74 69 6f 6e 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 | ,.$question);.}.....public.funct |
b3d80 | 69 6f 6e 20 73 65 6c 65 63 74 28 24 71 75 65 73 74 69 6f 6e 2c 20 24 63 68 6f 69 63 65 73 2c 20 | ion.select($question,.$choices,. |
b3da0 | 24 64 65 66 61 75 6c 74 2c 20 24 61 74 74 65 6d 70 74 73 20 3d 20 66 61 6c 73 65 2c 20 24 65 72 | $default,.$attempts.=.false,.$er |
b3dc0 | 72 6f 72 4d 65 73 73 61 67 65 20 3d 20 27 56 61 6c 75 65 20 22 25 73 22 20 69 73 20 69 6e 76 61 | rorMessage.=.'Value."%s".is.inva |
b3de0 | 6c 69 64 27 2c 20 24 6d 75 6c 74 69 73 65 6c 65 63 74 20 3d 20 66 61 6c 73 65 29 0a 7b 0a 0a 24 | lid',.$multiselect.=.false).{..$ |
b3e00 | 68 65 6c 70 65 72 20 3d 20 24 74 68 69 73 2d 3e 68 65 6c 70 65 72 53 65 74 2d 3e 67 65 74 28 27 | helper.=.$this->helperSet->get(' |
b3e20 | 71 75 65 73 74 69 6f 6e 27 29 3b 0a 24 71 75 65 73 74 69 6f 6e 20 3d 20 6e 65 77 20 43 68 6f 69 | question');.$question.=.new.Choi |
b3e40 | 63 65 51 75 65 73 74 69 6f 6e 28 24 71 75 65 73 74 69 6f 6e 2c 20 24 63 68 6f 69 63 65 73 2c 20 | ceQuestion($question,.$choices,. |
b3e60 | 24 64 65 66 61 75 6c 74 29 3b 0a 24 71 75 65 73 74 69 6f 6e 2d 3e 73 65 74 4d 61 78 41 74 74 65 | $default);.$question->setMaxAtte |
b3e80 | 6d 70 74 73 28 24 61 74 74 65 6d 70 74 73 20 3f 3a 20 6e 75 6c 6c 29 3b 20 0a 24 71 75 65 73 74 | mpts($attempts.?:.null);..$quest |
b3ea0 | 69 6f 6e 2d 3e 73 65 74 45 72 72 6f 72 4d 65 73 73 61 67 65 28 24 65 72 72 6f 72 4d 65 73 73 61 | ion->setErrorMessage($errorMessa |
b3ec0 | 67 65 29 3b 0a 24 71 75 65 73 74 69 6f 6e 2d 3e 73 65 74 4d 75 6c 74 69 73 65 6c 65 63 74 28 24 | ge);.$question->setMultiselect($ |
b3ee0 | 6d 75 6c 74 69 73 65 6c 65 63 74 29 3b 0a 0a 24 72 65 73 75 6c 74 20 3d 20 24 68 65 6c 70 65 72 | multiselect);..$result.=.$helper |
b3f00 | 2d 3e 61 73 6b 28 24 74 68 69 73 2d 3e 69 6e 70 75 74 2c 20 24 74 68 69 73 2d 3e 67 65 74 45 72 | ->ask($this->input,.$this->getEr |
b3f20 | 72 6f 72 4f 75 74 70 75 74 28 29 2c 20 24 71 75 65 73 74 69 6f 6e 29 3b 0a 0a 69 66 20 28 21 69 | rorOutput(),.$question);..if.(!i |
b3f40 | 73 5f 61 72 72 61 79 28 24 72 65 73 75 6c 74 29 29 20 7b 0a 72 65 74 75 72 6e 20 28 73 74 72 69 | s_array($result)).{.return.(stri |
b3f60 | 6e 67 29 20 61 72 72 61 79 5f 73 65 61 72 63 68 28 24 72 65 73 75 6c 74 2c 20 24 63 68 6f 69 63 | ng).array_search($result,.$choic |
b3f80 | 65 73 2c 20 74 72 75 65 29 3b 0a 7d 0a 0a 24 72 65 73 75 6c 74 73 20 3d 20 5b 5d 3b 0a 66 6f 72 | es,.true);.}..$results.=.[];.for |
b3fa0 | 65 61 63 68 20 28 24 63 68 6f 69 63 65 73 20 61 73 20 24 69 6e 64 65 78 20 3d 3e 20 24 63 68 6f | each.($choices.as.$index.=>.$cho |
b3fc0 | 69 63 65 29 20 7b 0a 69 66 20 28 69 6e 5f 61 72 72 61 79 28 24 63 68 6f 69 63 65 2c 20 24 72 65 | ice).{.if.(in_array($choice,.$re |
b3fe0 | 73 75 6c 74 2c 20 74 72 75 65 29 29 20 7b 0a 24 72 65 73 75 6c 74 73 5b 5d 20 3d 20 28 73 74 72 | sult,.true)).{.$results[].=.(str |
b4000 | 69 6e 67 29 20 24 69 6e 64 65 78 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 72 65 73 75 6c 74 | ing).$index;.}.}..return.$result |
b4020 | 73 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 54 61 62 6c 65 28 29 | s;.}..public.function.getTable() |
b4040 | 3a 20 54 61 62 6c 65 0a 7b 0a 72 65 74 75 72 6e 20 6e 65 77 20 54 61 62 6c 65 28 24 74 68 69 73 | :.Table.{.return.new.Table($this |
b4060 | 2d 3e 6f 75 74 70 75 74 29 3b 0a 7d 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 67 | ->output);.}..private.function.g |
b4080 | 65 74 45 72 72 6f 72 4f 75 74 70 75 74 28 29 3a 20 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 | etErrorOutput():.OutputInterface |
b40a0 | 0a 7b 0a 69 66 20 28 24 74 68 69 73 2d 3e 6f 75 74 70 75 74 20 69 6e 73 74 61 6e 63 65 6f 66 20 | .{.if.($this->output.instanceof. |
b40c0 | 43 6f 6e 73 6f 6c 65 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 29 20 7b 0a 72 65 74 75 72 6e | ConsoleOutputInterface).{.return |
b40e0 | 20 24 74 68 69 73 2d 3e 6f 75 74 70 75 74 2d 3e 67 65 74 45 72 72 6f 72 4f 75 74 70 75 74 28 29 | .$this->output->getErrorOutput() |
b4100 | 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 6f 75 74 70 75 74 3b 0a 7d 0a 7d 0a 3c | ;.}..return.$this->output;.}.}.< |
b4120 | 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a | ?php.declare(strict_types=1);... |
b4140 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 49 4f 3b 0a | .........namespace.Composer\IO;. |
b4160 | 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 66 69 67 3b 0a 75 73 65 20 50 73 72 5c 4c 6f | .use.Composer\Config;.use.Psr\Lo |
b4180 | 67 5c 4c 6f 67 67 65 72 49 6e 74 65 72 66 61 63 65 3b 0a 0a 0a 0a 0a 0a 0a 69 6e 74 65 72 66 61 | g\LoggerInterface;.......interfa |
b41a0 | 63 65 20 49 4f 49 6e 74 65 72 66 61 63 65 20 65 78 74 65 6e 64 73 20 4c 6f 67 67 65 72 49 6e 74 | ce.IOInterface.extends.LoggerInt |
b41c0 | 65 72 66 61 63 65 0a 7b 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 51 55 49 45 54 20 3d 20 31 3b | erface.{.public.const.QUIET.=.1; |
b41e0 | 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 4e 4f 52 4d 41 4c 20 3d 20 32 3b 0a 70 75 62 6c 69 63 | .public.const.NORMAL.=.2;.public |
b4200 | 20 63 6f 6e 73 74 20 56 45 52 42 4f 53 45 20 3d 20 34 3b 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 | .const.VERBOSE.=.4;.public.const |
b4220 | 20 56 45 52 59 5f 56 45 52 42 4f 53 45 20 3d 20 38 3b 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 | .VERY_VERBOSE.=.8;.public.const. |
b4240 | 44 45 42 55 47 20 3d 20 31 36 3b 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f | DEBUG.=.16;.......public.functio |
b4260 | 6e 20 69 73 49 6e 74 65 72 61 63 74 69 76 65 28 29 3b 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 | n.isInteractive();.......public. |
b4280 | 66 75 6e 63 74 69 6f 6e 20 69 73 56 65 72 62 6f 73 65 28 29 3b 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c | function.isVerbose();.......publ |
b42a0 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 56 65 72 79 56 65 72 62 6f 73 65 28 29 3b 0a 0a 0a 0a | ic.function.isVeryVerbose();.... |
b42c0 | 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 44 65 62 75 67 28 29 3b 0a 0a 0a | ...public.function.isDebug();... |
b42e0 | 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 44 65 63 6f 72 61 74 65 64 28 | ....public.function.isDecorated( |
b4300 | 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 77 72 69 | );...........public.function.wri |
b4320 | 74 65 28 24 6d 65 73 73 61 67 65 73 2c 20 62 6f 6f 6c 20 24 6e 65 77 6c 69 6e 65 20 3d 20 74 72 | te($messages,.bool.$newline.=.tr |
b4340 | 75 65 2c 20 69 6e 74 20 24 76 65 72 62 6f 73 69 74 79 20 3d 20 73 65 6c 66 3a 3a 4e 4f 52 4d 41 | ue,.int.$verbosity.=.self::NORMA |
b4360 | 4c 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 77 72 | L);...........public.function.wr |
b4380 | 69 74 65 45 72 72 6f 72 28 24 6d 65 73 73 61 67 65 73 2c 20 62 6f 6f 6c 20 24 6e 65 77 6c 69 6e | iteError($messages,.bool.$newlin |
b43a0 | 65 20 3d 20 74 72 75 65 2c 20 69 6e 74 20 24 76 65 72 62 6f 73 69 74 79 20 3d 20 73 65 6c 66 3a | e.=.true,.int.$verbosity.=.self: |
b43c0 | 3a 4e 4f 52 4d 41 4c 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 | :NORMAL);...........public.funct |
b43e0 | 69 6f 6e 20 77 72 69 74 65 52 61 77 28 24 6d 65 73 73 61 67 65 73 2c 20 62 6f 6f 6c 20 24 6e 65 | ion.writeRaw($messages,.bool.$ne |
b4400 | 77 6c 69 6e 65 20 3d 20 74 72 75 65 2c 20 69 6e 74 20 24 76 65 72 62 6f 73 69 74 79 20 3d 20 73 | wline.=.true,.int.$verbosity.=.s |
b4420 | 65 6c 66 3a 3a 4e 4f 52 4d 41 4c 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 | elf::NORMAL);...........public.f |
b4440 | 75 6e 63 74 69 6f 6e 20 77 72 69 74 65 45 72 72 6f 72 52 61 77 28 24 6d 65 73 73 61 67 65 73 2c | unction.writeErrorRaw($messages, |
b4460 | 20 62 6f 6f 6c 20 24 6e 65 77 6c 69 6e 65 20 3d 20 74 72 75 65 2c 20 69 6e 74 20 24 76 65 72 62 | .bool.$newline.=.true,.int.$verb |
b4480 | 6f 73 69 74 79 20 3d 20 73 65 6c 66 3a 3a 4e 4f 52 4d 41 4c 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a | osity.=.self::NORMAL);.......... |
b44a0 | 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 6f 76 65 72 77 72 69 74 65 28 24 6d 65 73 | ..public.function.overwrite($mes |
b44c0 | 73 61 67 65 73 2c 20 62 6f 6f 6c 20 24 6e 65 77 6c 69 6e 65 20 3d 20 74 72 75 65 2c 20 3f 69 6e | sages,.bool.$newline.=.true,.?in |
b44e0 | 74 20 24 73 69 7a 65 20 3d 20 6e 75 6c 6c 2c 20 69 6e 74 20 24 76 65 72 62 6f 73 69 74 79 20 3d | t.$size.=.null,.int.$verbosity.= |
b4500 | 20 73 65 6c 66 3a 3a 4e 4f 52 4d 41 4c 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 | .self::NORMAL);............publi |
b4520 | 63 20 66 75 6e 63 74 69 6f 6e 20 6f 76 65 72 77 72 69 74 65 45 72 72 6f 72 28 24 6d 65 73 73 61 | c.function.overwriteError($messa |
b4540 | 67 65 73 2c 20 62 6f 6f 6c 20 24 6e 65 77 6c 69 6e 65 20 3d 20 74 72 75 65 2c 20 3f 69 6e 74 20 | ges,.bool.$newline.=.true,.?int. |
b4560 | 24 73 69 7a 65 20 3d 20 6e 75 6c 6c 2c 20 69 6e 74 20 24 76 65 72 62 6f 73 69 74 79 20 3d 20 73 | $size.=.null,.int.$verbosity.=.s |
b4580 | 65 6c 66 3a 3a 4e 4f 52 4d 41 4c 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 | elf::NORMAL);...........public.f |
b45a0 | 75 6e 63 74 69 6f 6e 20 61 73 6b 28 73 74 72 69 6e 67 20 24 71 75 65 73 74 69 6f 6e 2c 20 24 64 | unction.ask(string.$question,.$d |
b45c0 | 65 66 61 75 6c 74 20 3d 20 6e 75 6c 6c 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 | efault.=.null);............publi |
b45e0 | 63 20 66 75 6e 63 74 69 6f 6e 20 61 73 6b 43 6f 6e 66 69 72 6d 61 74 69 6f 6e 28 73 74 72 69 6e | c.function.askConfirmation(strin |
b4600 | 67 20 24 71 75 65 73 74 69 6f 6e 2c 20 62 6f 6f 6c 20 24 64 65 66 61 75 6c 74 20 3d 20 74 72 75 | g.$question,.bool.$default.=.tru |
b4620 | 65 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 | e);.................public.funct |
b4640 | 69 6f 6e 20 61 73 6b 41 6e 64 56 61 6c 69 64 61 74 65 28 73 74 72 69 6e 67 20 24 71 75 65 73 74 | ion.askAndValidate(string.$quest |
b4660 | 69 6f 6e 2c 20 63 61 6c 6c 61 62 6c 65 20 24 76 61 6c 69 64 61 74 6f 72 2c 20 3f 69 6e 74 20 24 | ion,.callable.$validator,.?int.$ |
b4680 | 61 74 74 65 6d 70 74 73 20 3d 20 6e 75 6c 6c 2c 20 24 64 65 66 61 75 6c 74 20 3d 20 6e 75 6c 6c | attempts.=.null,.$default.=.null |
b46a0 | 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 61 73 6b 41 6e | );.........public.function.askAn |
b46c0 | 64 48 69 64 65 41 6e 73 77 65 72 28 73 74 72 69 6e 67 20 24 71 75 65 73 74 69 6f 6e 29 3b 0a 0a | dHideAnswer(string.$question);.. |
b46e0 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 6c | .............public.function.sel |
b4700 | 65 63 74 28 73 74 72 69 6e 67 20 24 71 75 65 73 74 69 6f 6e 2c 20 61 72 72 61 79 20 24 63 68 6f | ect(string.$question,.array.$cho |
b4720 | 69 63 65 73 2c 20 24 64 65 66 61 75 6c 74 2c 20 24 61 74 74 65 6d 70 74 73 20 3d 20 66 61 6c 73 | ices,.$default,.$attempts.=.fals |
b4740 | 65 2c 20 73 74 72 69 6e 67 20 24 65 72 72 6f 72 4d 65 73 73 61 67 65 20 3d 20 27 56 61 6c 75 65 | e,.string.$errorMessage.=.'Value |
b4760 | 20 22 25 73 22 20 69 73 20 69 6e 76 61 6c 69 64 27 2c 20 62 6f 6f 6c 20 24 6d 75 6c 74 69 73 65 | ."%s".is.invalid',.bool.$multise |
b4780 | 6c 65 63 74 20 3d 20 66 61 6c 73 65 29 3b 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 | lect.=.false);.......public.func |
b47a0 | 74 69 6f 6e 20 67 65 74 41 75 74 68 65 6e 74 69 63 61 74 69 6f 6e 73 28 29 3b 0a 0a 0a 0a 0a 0a | tion.getAuthentications();...... |
b47c0 | 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 68 61 73 41 75 74 68 65 6e 74 69 63 61 | ...public.function.hasAuthentica |
b47e0 | 74 69 6f 6e 28 73 74 72 69 6e 67 20 24 72 65 70 6f 73 69 74 6f 72 79 4e 61 6d 65 29 3b 0a 0a 0a | tion(string.$repositoryName);... |
b4800 | 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 41 75 74 68 65 6e 74 | ......public.function.getAuthent |
b4820 | 69 63 61 74 69 6f 6e 28 73 74 72 69 6e 67 20 24 72 65 70 6f 73 69 74 6f 72 79 4e 61 6d 65 29 3b | ication(string.$repositoryName); |
b4840 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 41 75 | ...........public.function.setAu |
b4860 | 74 68 65 6e 74 69 63 61 74 69 6f 6e 28 73 74 72 69 6e 67 20 24 72 65 70 6f 73 69 74 6f 72 79 4e | thentication(string.$repositoryN |
b4880 | 61 6d 65 2c 20 73 74 72 69 6e 67 20 24 75 73 65 72 6e 61 6d 65 2c 20 3f 73 74 72 69 6e 67 20 24 | ame,.string.$username,.?string.$ |
b48a0 | 70 61 73 73 77 6f 72 64 20 3d 20 6e 75 6c 6c 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 | password.=.null);........public. |
b48c0 | 66 75 6e 63 74 69 6f 6e 20 6c 6f 61 64 43 6f 6e 66 69 67 75 72 61 74 69 6f 6e 28 43 6f 6e 66 69 | function.loadConfiguration(Confi |
b48e0 | 67 20 24 63 6f 6e 66 69 67 29 3b 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 | g.$config);.}.<?php.declare(stri |
b4900 | 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 | ct_types=1);............namespac |
b4920 | 65 20 43 6f 6d 70 6f 73 65 72 5c 49 4f 3b 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 4e 75 6c 6c 49 | e.Composer\IO;.......class.NullI |
b4940 | 4f 20 65 78 74 65 6e 64 73 20 42 61 73 65 49 4f 0a 7b 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e | O.extends.BaseIO.{....public.fun |
b4960 | 63 74 69 6f 6e 20 69 73 49 6e 74 65 72 61 63 74 69 76 65 28 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 65 | ction.isInteractive():.bool.{.re |
b4980 | 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f | turn.false;.}.....public.functio |
b49a0 | 6e 20 69 73 56 65 72 62 6f 73 65 28 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 66 61 6c | n.isVerbose():.bool.{.return.fal |
b49c0 | 73 65 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 56 65 72 79 | se;.}.....public.function.isVery |
b49e0 | 56 65 72 62 6f 73 65 28 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a | Verbose():.bool.{.return.false;. |
b4a00 | 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 44 65 62 75 67 28 29 3a | }.....public.function.isDebug(): |
b4a20 | 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c | .bool.{.return.false;.}.....publ |
b4a40 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 44 65 63 6f 72 61 74 65 64 28 29 3a 20 62 6f 6f 6c 0a | ic.function.isDecorated():.bool. |
b4a60 | 7b 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e | {.return.false;.}.....public.fun |
b4a80 | 63 74 69 6f 6e 20 77 72 69 74 65 28 24 6d 65 73 73 61 67 65 73 2c 20 62 6f 6f 6c 20 24 6e 65 77 | ction.write($messages,.bool.$new |
b4aa0 | 6c 69 6e 65 20 3d 20 74 72 75 65 2c 20 69 6e 74 20 24 76 65 72 62 6f 73 69 74 79 20 3d 20 73 65 | line.=.true,.int.$verbosity.=.se |
b4ac0 | 6c 66 3a 3a 4e 4f 52 4d 41 4c 29 3a 20 76 6f 69 64 0a 7b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 | lf::NORMAL):.void.{.}.....public |
b4ae0 | 20 66 75 6e 63 74 69 6f 6e 20 77 72 69 74 65 45 72 72 6f 72 28 24 6d 65 73 73 61 67 65 73 2c 20 | .function.writeError($messages,. |
b4b00 | 62 6f 6f 6c 20 24 6e 65 77 6c 69 6e 65 20 3d 20 74 72 75 65 2c 20 69 6e 74 20 24 76 65 72 62 6f | bool.$newline.=.true,.int.$verbo |
b4b20 | 73 69 74 79 20 3d 20 73 65 6c 66 3a 3a 4e 4f 52 4d 41 4c 29 3a 20 76 6f 69 64 0a 7b 0a 7d 0a 0a | sity.=.self::NORMAL):.void.{.}.. |
b4b40 | 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 6f 76 65 72 77 72 69 74 65 28 24 6d 65 | ...public.function.overwrite($me |
b4b60 | 73 73 61 67 65 73 2c 20 62 6f 6f 6c 20 24 6e 65 77 6c 69 6e 65 20 3d 20 74 72 75 65 2c 20 3f 69 | ssages,.bool.$newline.=.true,.?i |
b4b80 | 6e 74 20 24 73 69 7a 65 20 3d 20 6e 75 6c 6c 2c 20 69 6e 74 20 24 76 65 72 62 6f 73 69 74 79 20 | nt.$size.=.null,.int.$verbosity. |
b4ba0 | 3d 20 73 65 6c 66 3a 3a 4e 4f 52 4d 41 4c 29 3a 20 76 6f 69 64 0a 7b 0a 7d 0a 0a 0a 0a 0a 70 75 | =.self::NORMAL):.void.{.}.....pu |
b4bc0 | 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 6f 76 65 72 77 72 69 74 65 45 72 72 6f 72 28 24 6d 65 | blic.function.overwriteError($me |
b4be0 | 73 73 61 67 65 73 2c 20 62 6f 6f 6c 20 24 6e 65 77 6c 69 6e 65 20 3d 20 74 72 75 65 2c 20 3f 69 | ssages,.bool.$newline.=.true,.?i |
b4c00 | 6e 74 20 24 73 69 7a 65 20 3d 20 6e 75 6c 6c 2c 20 69 6e 74 20 24 76 65 72 62 6f 73 69 74 79 20 | nt.$size.=.null,.int.$verbosity. |
b4c20 | 3d 20 73 65 6c 66 3a 3a 4e 4f 52 4d 41 4c 29 3a 20 76 6f 69 64 0a 7b 0a 7d 0a 0a 0a 0a 0a 70 75 | =.self::NORMAL):.void.{.}.....pu |
b4c40 | 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 61 73 6b 28 24 71 75 65 73 74 69 6f 6e 2c 20 24 64 65 | blic.function.ask($question,.$de |
b4c60 | 66 61 75 6c 74 20 3d 20 6e 75 6c 6c 29 0a 7b 0a 72 65 74 75 72 6e 20 24 64 65 66 61 75 6c 74 3b | fault.=.null).{.return.$default; |
b4c80 | 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 61 73 6b 43 6f 6e 66 69 72 | .}.....public.function.askConfir |
b4ca0 | 6d 61 74 69 6f 6e 28 24 71 75 65 73 74 69 6f 6e 2c 20 24 64 65 66 61 75 6c 74 20 3d 20 74 72 75 | mation($question,.$default.=.tru |
b4cc0 | 65 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 24 64 65 66 61 75 6c 74 3b 0a 7d 0a 0a 0a | e):.bool.{.return.$default;.}... |
b4ce0 | 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 61 73 6b 41 6e 64 56 61 6c 69 64 61 74 65 | ..public.function.askAndValidate |
b4d00 | 28 24 71 75 65 73 74 69 6f 6e 2c 20 24 76 61 6c 69 64 61 74 6f 72 2c 20 24 61 74 74 65 6d 70 74 | ($question,.$validator,.$attempt |
b4d20 | 73 20 3d 20 6e 75 6c 6c 2c 20 24 64 65 66 61 75 6c 74 20 3d 20 6e 75 6c 6c 29 0a 7b 0a 72 65 74 | s.=.null,.$default.=.null).{.ret |
b4d40 | 75 72 6e 20 24 64 65 66 61 75 6c 74 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 | urn.$default;.}.....public.funct |
b4d60 | 69 6f 6e 20 61 73 6b 41 6e 64 48 69 64 65 41 6e 73 77 65 72 28 24 71 75 65 73 74 69 6f 6e 29 3a | ion.askAndHideAnswer($question): |
b4d80 | 20 3f 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0a 7d 0a 0a 0a 0a 0a 70 75 | .?string.{.return.null;.}.....pu |
b4da0 | 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 6c 65 63 74 28 24 71 75 65 73 74 69 6f 6e 2c 20 | blic.function.select($question,. |
b4dc0 | 24 63 68 6f 69 63 65 73 2c 20 24 64 65 66 61 75 6c 74 2c 20 24 61 74 74 65 6d 70 74 73 20 3d 20 | $choices,.$default,.$attempts.=. |
b4de0 | 66 61 6c 73 65 2c 20 24 65 72 72 6f 72 4d 65 73 73 61 67 65 20 3d 20 27 56 61 6c 75 65 20 22 25 | false,.$errorMessage.=.'Value."% |
b4e00 | 73 22 20 69 73 20 69 6e 76 61 6c 69 64 27 2c 20 24 6d 75 6c 74 69 73 65 6c 65 63 74 20 3d 20 66 | s".is.invalid',.$multiselect.=.f |
b4e20 | 61 6c 73 65 29 0a 7b 0a 72 65 74 75 72 6e 20 24 64 65 66 61 75 6c 74 3b 0a 7d 0a 7d 0a 3c 3f 70 | alse).{.return.$default;.}.}.<?p |
b4e40 | 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a | hp.declare(strict_types=1);..... |
b4e60 | 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 3b 0a 0a 75 73 65 20 | .......namespace.Composer;..use. |
b4e80 | 43 6f 6d 70 6f 73 65 72 5c 41 75 74 6f 6c 6f 61 64 5c 41 75 74 6f 6c 6f 61 64 47 65 6e 65 72 61 | Composer\Autoload\AutoloadGenera |
b4ea0 | 74 6f 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 73 6f 6c 65 5c 47 69 74 68 75 62 | tor;.use.Composer\Console\Github |
b4ec0 | 41 63 74 69 6f 6e 45 72 72 6f 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 | ActionError;.use.Composer\Depend |
b4ee0 | 65 6e 63 79 52 65 73 6f 6c 76 65 72 5c 44 65 66 61 75 6c 74 50 6f 6c 69 63 79 3b 0a 75 73 65 20 | encyResolver\DefaultPolicy;.use. |
b4f00 | 43 6f 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 5c 4c 6f 63 61 | Composer\DependencyResolver\Loca |
b4f20 | 6c 52 65 70 6f 54 72 61 6e 73 61 63 74 69 6f 6e 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 44 | lRepoTransaction;.use.Composer\D |
b4f40 | 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 5c 4c 6f 63 6b 54 72 61 6e 73 61 63 74 69 6f | ependencyResolver\LockTransactio |
b4f60 | 6e 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 | n;.use.Composer\DependencyResolv |
b4f80 | 65 72 5c 4f 70 65 72 61 74 69 6f 6e 5c 55 70 64 61 74 65 4f 70 65 72 61 74 69 6f 6e 3b 0a 75 73 | er\Operation\UpdateOperation;.us |
b4fa0 | 65 20 43 6f 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 5c 4f 70 | e.Composer\DependencyResolver\Op |
b4fc0 | 65 72 61 74 69 6f 6e 5c 49 6e 73 74 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 3b 0a 75 73 65 20 43 6f | eration\InstallOperation;.use.Co |
b4fe0 | 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 5c 4f 70 65 72 61 74 | mposer\DependencyResolver\Operat |
b5000 | 69 6f 6e 5c 55 6e 69 6e 73 74 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 3b 0a 75 73 65 20 43 6f 6d 70 | ion\UninstallOperation;.use.Comp |
b5020 | 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 5c 50 6f 6f 6c 4f 70 74 69 | oser\DependencyResolver\PoolOpti |
b5040 | 6d 69 7a 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 | mizer;.use.Composer\DependencyRe |
b5060 | 73 6f 6c 76 65 72 5c 50 6f 6f 6c 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 | solver\Pool;.use.Composer\Depend |
b5080 | 65 6e 63 79 52 65 73 6f 6c 76 65 72 5c 52 65 71 75 65 73 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 | encyResolver\Request;.use.Compos |
b50a0 | 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 5c 53 6f 6c 76 65 72 3b 0a 75 73 | er\DependencyResolver\Solver;.us |
b50c0 | 65 20 43 6f 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 5c 53 6f | e.Composer\DependencyResolver\So |
b50e0 | 6c 76 65 72 50 72 6f 62 6c 65 6d 73 45 78 63 65 70 74 69 6f 6e 3b 0a 75 73 65 20 43 6f 6d 70 6f | lverProblemsException;.use.Compo |
b5100 | 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 5c 50 6f 6c 69 63 79 49 6e 74 | ser\DependencyResolver\PolicyInt |
b5120 | 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 44 6f 77 6e 6c 6f 61 64 65 72 5c | erface;.use.Composer\Downloader\ |
b5140 | 44 6f 77 6e 6c 6f 61 64 4d 61 6e 61 67 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 44 6f | DownloadManager;.use.Composer\Do |
b5160 | 77 6e 6c 6f 61 64 65 72 5c 54 72 61 6e 73 70 6f 72 74 45 78 63 65 70 74 69 6f 6e 3b 0a 75 73 65 | wnloader\TransportException;.use |
b5180 | 20 43 6f 6d 70 6f 73 65 72 5c 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 5c 45 76 65 6e 74 44 | .Composer\EventDispatcher\EventD |
b51a0 | 69 73 70 61 74 63 68 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 46 69 6c 74 65 72 5c 50 | ispatcher;.use.Composer\Filter\P |
b51c0 | 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 5c 49 67 6e 6f 72 65 4c | latformRequirementFilter\IgnoreL |
b51e0 | 69 73 74 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 3b 0a 75 73 | istPlatformRequirementFilter;.us |
b5200 | 65 20 43 6f 6d 70 6f 73 65 72 5c 46 69 6c 74 65 72 5c 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 | e.Composer\Filter\PlatformRequir |
b5220 | 65 6d 65 6e 74 46 69 6c 74 65 72 5c 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 | ementFilter\PlatformRequirementF |
b5240 | 69 6c 74 65 72 46 61 63 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 46 69 6c 74 65 | ilterFactory;.use.Composer\Filte |
b5260 | 72 5c 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 5c 50 6c 61 74 | r\PlatformRequirementFilter\Plat |
b5280 | 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 49 6e 74 65 72 66 61 63 65 3b 0a | formRequirementFilterInterface;. |
b52a0 | 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 6e 73 74 61 6c 6c 65 72 5c 49 6e 73 74 61 6c 6c 61 74 | use.Composer\Installer\Installat |
b52c0 | 69 6f 6e 4d 61 6e 61 67 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 6e 73 74 61 6c 6c | ionManager;.use.Composer\Install |
b52e0 | 65 72 5c 49 6e 73 74 61 6c 6c 65 72 45 76 65 6e 74 73 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 | er\InstallerEvents;.use.Composer |
b5300 | 5c 49 6e 73 74 61 6c 6c 65 72 5c 53 75 67 67 65 73 74 65 64 50 61 63 6b 61 67 65 73 52 65 70 6f | \Installer\SuggestedPackagesRepo |
b5320 | 72 74 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 4f 5c 49 4f 49 6e 74 65 72 66 61 63 | rter;.use.Composer\IO\IOInterfac |
b5340 | 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 41 6c 69 61 73 50 61 63 | e;.use.Composer\Package\AliasPac |
b5360 | 6b 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 52 6f 6f 74 41 | kage;.use.Composer\Package\RootA |
b5380 | 6c 69 61 73 50 61 63 6b 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 | liasPackage;.use.Composer\Packag |
b53a0 | 65 5c 42 61 73 65 50 61 63 6b 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b | e\BasePackage;.use.Composer\Pack |
b53c0 | 61 67 65 5c 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 | age\CompletePackage;.use.Compose |
b53e0 | 72 5c 50 61 63 6b 61 67 65 5c 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 | r\Package\CompletePackageInterfa |
b5400 | 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 4c 69 6e 6b 3b 0a 75 | ce;.use.Composer\Package\Link;.u |
b5420 | 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 4c 6f 61 64 65 72 5c 41 72 72 61 79 | se.Composer\Package\Loader\Array |
b5440 | 4c 6f 61 64 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 44 75 6d | Loader;.use.Composer\Package\Dum |
b5460 | 70 65 72 5c 41 72 72 61 79 44 75 6d 70 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 | per\ArrayDumper;.use.Composer\Pa |
b5480 | 63 6b 61 67 65 5c 56 65 72 73 69 6f 6e 5c 56 65 72 73 69 6f 6e 50 61 72 73 65 72 3b 0a 75 73 65 | ckage\Version\VersionParser;.use |
b54a0 | 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 50 61 63 6b 61 67 65 3b 0a 75 73 65 20 43 | .Composer\Package\Package;.use.C |
b54c0 | 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 41 72 72 61 79 52 65 70 6f 73 69 74 6f | omposer\Repository\ArrayReposito |
b54e0 | 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 52 65 70 6f | ry;.use.Composer\Repository\Repo |
b5500 | 73 69 74 6f 72 79 53 65 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f | sitorySet;.use.Composer\Reposito |
b5520 | 72 79 5c 43 6f 6d 70 6f 73 69 74 65 52 65 70 6f 73 69 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 | ry\CompositeRepository;.use.Comp |
b5540 | 6f 73 65 72 5c 53 65 6d 76 65 72 5c 43 6f 6e 73 74 72 61 69 6e 74 5c 43 6f 6e 73 74 72 61 69 6e | oser\Semver\Constraint\Constrain |
b5560 | 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 4c 6f 63 6b 65 72 3b 0a | t;.use.Composer\Package\Locker;. |
b5580 | 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 52 6f 6f 74 50 61 63 6b 61 67 65 | use.Composer\Package\RootPackage |
b55a0 | 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f | Interface;.use.Composer\Reposito |
b55c0 | 72 79 5c 49 6e 73 74 61 6c 6c 65 64 41 72 72 61 79 52 65 70 6f 73 69 74 6f 72 79 3b 0a 75 73 65 | ry\InstalledArrayRepository;.use |
b55e0 | 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 49 6e 73 74 61 6c 6c 65 64 52 65 | .Composer\Repository\InstalledRe |
b5600 | 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c | positoryInterface;.use.Composer\ |
b5620 | 52 65 70 6f 73 69 74 6f 72 79 5c 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 3b 0a | Repository\InstalledRepository;. |
b5640 | 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 52 6f 6f 74 50 61 63 6b | use.Composer\Repository\RootPack |
b5660 | 61 67 65 52 65 70 6f 73 69 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f | ageRepository;.use.Composer\Repo |
b5680 | 73 69 74 6f 72 79 5c 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 3b 0a 75 73 65 20 43 | sitory\PlatformRepository;.use.C |
b56a0 | 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 | omposer\Repository\RepositoryInt |
b56c0 | 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c | erface;.use.Composer\Repository\ |
b56e0 | 52 65 70 6f 73 69 74 6f 72 79 4d 61 6e 61 67 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c | RepositoryManager;.use.Composer\ |
b5700 | 52 65 70 6f 73 69 74 6f 72 79 5c 4c 6f 63 6b 41 72 72 61 79 52 65 70 6f 73 69 74 6f 72 79 3b 0a | Repository\LockArrayRepository;. |
b5720 | 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 63 72 69 70 74 5c 53 63 72 69 70 74 45 76 65 6e 74 73 | use.Composer\Script\ScriptEvents |
b5740 | 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 65 6d 76 65 72 5c 43 6f 6e 73 74 72 61 69 6e 74 | ;.use.Composer\Semver\Constraint |
b5760 | 5c 43 6f 6e 73 74 72 61 69 6e 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 | \ConstraintInterface;.use.Compos |
b5780 | 65 72 5c 41 64 76 69 73 6f 72 79 5c 41 75 64 69 74 6f 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 | er\Advisory\Auditor;.use.Compose |
b57a0 | 72 5c 55 74 69 6c 5c 50 6c 61 74 66 6f 72 6d 3b 0a 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 49 6e | r\Util\Platform;........class.In |
b57c0 | 73 74 61 6c 6c 65 72 0a 7b 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 45 52 52 4f 52 5f 4e 4f 4e | staller.{.public.const.ERROR_NON |
b57e0 | 45 20 3d 20 30 3b 20 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 45 52 52 4f 52 5f 47 45 4e 45 52 | E.=.0;..public.const.ERROR_GENER |
b5800 | 49 43 5f 46 41 49 4c 55 52 45 20 3d 20 31 3b 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 45 52 52 | IC_FAILURE.=.1;.public.const.ERR |
b5820 | 4f 52 5f 4e 4f 5f 4c 4f 43 4b 5f 46 49 4c 45 5f 46 4f 52 5f 50 41 52 54 49 41 4c 5f 55 50 44 41 | OR_NO_LOCK_FILE_FOR_PARTIAL_UPDA |
b5840 | 54 45 20 3d 20 33 3b 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 45 52 52 4f 52 5f 4c 4f 43 4b 5f | TE.=.3;.public.const.ERROR_LOCK_ |
b5860 | 46 49 4c 45 5f 49 4e 56 41 4c 49 44 20 3d 20 34 3b 0a 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 | FILE_INVALID.=.4;..public.const. |
b5880 | 45 52 52 4f 52 5f 44 45 50 45 4e 44 45 4e 43 59 5f 52 45 53 4f 4c 55 54 49 4f 4e 5f 46 41 49 4c | ERROR_DEPENDENCY_RESOLUTION_FAIL |
b58a0 | 45 44 20 3d 20 32 3b 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 69 6f 3b 0a 0a 0a 0a 0a 70 | ED.=.2;.....protected.$io;.....p |
b58c0 | 72 6f 74 65 63 74 65 64 20 24 63 6f 6e 66 69 67 3b 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 | rotected.$config;.....protected. |
b58e0 | 24 70 61 63 6b 61 67 65 3b 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 66 69 78 65 64 52 | $package;......protected.$fixedR |
b5900 | 6f 6f 74 50 61 63 6b 61 67 65 3b 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 64 6f 77 6e 6c | ootPackage;.....protected.$downl |
b5920 | 6f 61 64 4d 61 6e 61 67 65 72 3b 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 72 65 70 6f 73 | oadManager;.....protected.$repos |
b5940 | 69 74 6f 72 79 4d 61 6e 61 67 65 72 3b 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 6c 6f 63 | itoryManager;.....protected.$loc |
b5960 | 6b 65 72 3b 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 69 6e 73 74 61 6c 6c 61 74 69 6f 6e | ker;.....protected.$installation |
b5980 | 4d 61 6e 61 67 65 72 3b 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 65 76 65 6e 74 44 69 73 | Manager;.....protected.$eventDis |
b59a0 | 70 61 74 63 68 65 72 3b 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 61 75 74 6f 6c 6f 61 64 | patcher;.....protected.$autoload |
b59c0 | 47 65 6e 65 72 61 74 6f 72 3b 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 70 72 65 66 65 72 53 6f | Generator;...protected.$preferSo |
b59e0 | 75 72 63 65 20 3d 20 66 61 6c 73 65 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 70 72 65 66 65 72 | urce.=.false;..protected.$prefer |
b5a00 | 44 69 73 74 20 3d 20 66 61 6c 73 65 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 6f 70 74 69 6d 69 | Dist.=.false;..protected.$optimi |
b5a20 | 7a 65 41 75 74 6f 6c 6f 61 64 65 72 20 3d 20 66 61 6c 73 65 3b 0a 0a 70 72 6f 74 65 63 74 65 64 | zeAutoloader.=.false;..protected |
b5a40 | 20 24 63 6c 61 73 73 4d 61 70 41 75 74 68 6f 72 69 74 61 74 69 76 65 20 3d 20 66 61 6c 73 65 3b | .$classMapAuthoritative.=.false; |
b5a60 | 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 61 70 63 75 41 75 74 6f 6c 6f 61 64 65 72 20 3d 20 66 61 | ..protected.$apcuAutoloader.=.fa |
b5a80 | 6c 73 65 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 61 70 63 75 41 75 74 6f 6c 6f 61 64 65 72 50 | lse;..protected.$apcuAutoloaderP |
b5aa0 | 72 65 66 69 78 20 3d 20 6e 75 6c 6c 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 64 65 76 4d 6f 64 | refix.=.null;..protected.$devMod |
b5ac0 | 65 20 3d 20 66 61 6c 73 65 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 64 72 79 52 75 6e 20 3d 20 | e.=.false;..protected.$dryRun.=. |
b5ae0 | 66 61 6c 73 65 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 76 65 72 62 6f 73 65 20 3d 20 66 61 6c | false;..protected.$verbose.=.fal |
b5b00 | 73 65 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 75 70 64 61 74 65 20 3d 20 66 61 6c 73 65 3b 0a | se;..protected.$update.=.false;. |
b5b20 | 0a 70 72 6f 74 65 63 74 65 64 20 24 69 6e 73 74 61 6c 6c 20 3d 20 74 72 75 65 3b 0a 0a 70 72 6f | .protected.$install.=.true;..pro |
b5b40 | 74 65 63 74 65 64 20 24 64 75 6d 70 41 75 74 6f 6c 6f 61 64 65 72 20 3d 20 74 72 75 65 3b 0a 0a | tected.$dumpAutoloader.=.true;.. |
b5b60 | 70 72 6f 74 65 63 74 65 64 20 24 72 75 6e 53 63 72 69 70 74 73 20 3d 20 74 72 75 65 3b 0a 0a 70 | protected.$runScripts.=.true;..p |
b5b80 | 72 6f 74 65 63 74 65 64 20 24 70 72 65 66 65 72 53 74 61 62 6c 65 20 3d 20 66 61 6c 73 65 3b 0a | rotected.$preferStable.=.false;. |
b5ba0 | 0a 70 72 6f 74 65 63 74 65 64 20 24 70 72 65 66 65 72 4c 6f 77 65 73 74 20 3d 20 66 61 6c 73 65 | .protected.$preferLowest.=.false |
b5bc0 | 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 77 72 69 74 65 4c 6f 63 6b 3b 0a 0a 70 72 6f 74 65 63 | ;..protected.$writeLock;..protec |
b5be0 | 74 65 64 20 24 65 78 65 63 75 74 65 4f 70 65 72 61 74 69 6f 6e 73 20 3d 20 74 72 75 65 3b 0a 0a | ted.$executeOperations.=.true;.. |
b5c00 | 70 72 6f 74 65 63 74 65 64 20 24 61 75 64 69 74 20 3d 20 74 72 75 65 3b 0a 0a 70 72 6f 74 65 63 | protected.$audit.=.true;..protec |
b5c20 | 74 65 64 20 24 61 75 64 69 74 46 6f 72 6d 61 74 20 3d 20 41 75 64 69 74 6f 72 3a 3a 46 4f 52 4d | ted.$auditFormat.=.Auditor::FORM |
b5c40 | 41 54 5f 53 55 4d 4d 41 52 59 3b 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 75 70 64 61 74 65 4d | AT_SUMMARY;...protected.$updateM |
b5c60 | 69 72 72 6f 72 73 20 3d 20 66 61 6c 73 65 3b 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 | irrors.=.false;......protected.$ |
b5c80 | 75 70 64 61 74 65 41 6c 6c 6f 77 4c 69 73 74 20 3d 20 6e 75 6c 6c 3b 0a 0a 70 72 6f 74 65 63 74 | updateAllowList.=.null;..protect |
b5ca0 | 65 64 20 24 75 70 64 61 74 65 41 6c 6c 6f 77 54 72 61 6e 73 69 74 69 76 65 44 65 70 65 6e 64 65 | ed.$updateAllowTransitiveDepende |
b5cc0 | 6e 63 69 65 73 20 3d 20 52 65 71 75 65 73 74 3a 3a 55 50 44 41 54 45 5f 4f 4e 4c 59 5f 4c 49 53 | ncies.=.Request::UPDATE_ONLY_LIS |
b5ce0 | 54 45 44 3b 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 73 75 67 67 65 73 74 65 64 50 61 63 | TED;.....protected.$suggestedPac |
b5d00 | 6b 61 67 65 73 52 65 70 6f 72 74 65 72 3b 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 70 6c | kagesReporter;.....protected.$pl |
b5d20 | 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 3b 0a 0a 0a 0a 0a 70 72 6f | atformRequirementFilter;.....pro |
b5d40 | 74 65 63 74 65 64 20 24 61 64 64 69 74 69 6f 6e 61 6c 46 69 78 65 64 52 65 70 6f 73 69 74 6f 72 | tected.$additionalFixedRepositor |
b5d60 | 79 3b 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 74 65 6d 70 6f 72 61 72 79 43 6f 6e 73 74 72 61 | y;...protected.$temporaryConstra |
b5d80 | 69 6e 74 73 20 3d 20 5b 5d 3b 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e | ints.=.[];.......public.function |
b5da0 | 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 49 4f 49 6e 74 65 72 66 61 63 65 20 24 69 6f 2c 20 43 6f | .__construct(IOInterface.$io,.Co |
b5dc0 | 6e 66 69 67 20 24 63 6f 6e 66 69 67 2c 20 52 6f 6f 74 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 | nfig.$config,.RootPackageInterfa |
b5de0 | 63 65 20 24 70 61 63 6b 61 67 65 2c 20 44 6f 77 6e 6c 6f 61 64 4d 61 6e 61 67 65 72 20 24 64 6f | ce.$package,.DownloadManager.$do |
b5e00 | 77 6e 6c 6f 61 64 4d 61 6e 61 67 65 72 2c 20 52 65 70 6f 73 69 74 6f 72 79 4d 61 6e 61 67 65 72 | wnloadManager,.RepositoryManager |
b5e20 | 20 24 72 65 70 6f 73 69 74 6f 72 79 4d 61 6e 61 67 65 72 2c 20 4c 6f 63 6b 65 72 20 24 6c 6f 63 | .$repositoryManager,.Locker.$loc |
b5e40 | 6b 65 72 2c 20 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 72 20 24 69 6e 73 74 61 6c | ker,.InstallationManager.$instal |
b5e60 | 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 72 2c 20 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 20 24 | lationManager,.EventDispatcher.$ |
b5e80 | 65 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 2c 20 41 75 74 6f 6c 6f 61 64 47 65 6e 65 72 61 74 | eventDispatcher,.AutoloadGenerat |
b5ea0 | 6f 72 20 24 61 75 74 6f 6c 6f 61 64 47 65 6e 65 72 61 74 6f 72 29 0a 7b 0a 24 74 68 69 73 2d 3e | or.$autoloadGenerator).{.$this-> |
b5ec0 | 69 6f 20 3d 20 24 69 6f 3b 0a 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 20 3d 20 24 63 6f 6e 66 69 | io.=.$io;.$this->config.=.$confi |
b5ee0 | 67 3b 0a 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 20 3d 20 24 70 61 63 6b 61 67 65 3b 0a 24 74 | g;.$this->package.=.$package;.$t |
b5f00 | 68 69 73 2d 3e 64 6f 77 6e 6c 6f 61 64 4d 61 6e 61 67 65 72 20 3d 20 24 64 6f 77 6e 6c 6f 61 64 | his->downloadManager.=.$download |
b5f20 | 4d 61 6e 61 67 65 72 3b 0a 24 74 68 69 73 2d 3e 72 65 70 6f 73 69 74 6f 72 79 4d 61 6e 61 67 65 | Manager;.$this->repositoryManage |
b5f40 | 72 20 3d 20 24 72 65 70 6f 73 69 74 6f 72 79 4d 61 6e 61 67 65 72 3b 0a 24 74 68 69 73 2d 3e 6c | r.=.$repositoryManager;.$this->l |
b5f60 | 6f 63 6b 65 72 20 3d 20 24 6c 6f 63 6b 65 72 3b 0a 24 74 68 69 73 2d 3e 69 6e 73 74 61 6c 6c 61 | ocker.=.$locker;.$this->installa |
b5f80 | 74 69 6f 6e 4d 61 6e 61 67 65 72 20 3d 20 24 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 | tionManager.=.$installationManag |
b5fa0 | 65 72 3b 0a 24 74 68 69 73 2d 3e 65 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 20 3d 20 24 65 76 | er;.$this->eventDispatcher.=.$ev |
b5fc0 | 65 6e 74 44 69 73 70 61 74 63 68 65 72 3b 0a 24 74 68 69 73 2d 3e 61 75 74 6f 6c 6f 61 64 47 65 | entDispatcher;.$this->autoloadGe |
b5fe0 | 6e 65 72 61 74 6f 72 20 3d 20 24 61 75 74 6f 6c 6f 61 64 47 65 6e 65 72 61 74 6f 72 3b 0a 24 74 | nerator.=.$autoloadGenerator;.$t |
b6000 | 68 69 73 2d 3e 73 75 67 67 65 73 74 65 64 50 61 63 6b 61 67 65 73 52 65 70 6f 72 74 65 72 20 3d | his->suggestedPackagesReporter.= |
b6020 | 20 6e 65 77 20 53 75 67 67 65 73 74 65 64 50 61 63 6b 61 67 65 73 52 65 70 6f 72 74 65 72 28 24 | .new.SuggestedPackagesReporter($ |
b6040 | 74 68 69 73 2d 3e 69 6f 29 3b 0a 24 74 68 69 73 2d 3e 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 | this->io);.$this->platformRequir |
b6060 | 65 6d 65 6e 74 46 69 6c 74 65 72 20 3d 20 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e | ementFilter.=.PlatformRequiremen |
b6080 | 74 46 69 6c 74 65 72 46 61 63 74 6f 72 79 3a 3a 69 67 6e 6f 72 65 4e 6f 74 68 69 6e 67 28 29 3b | tFilterFactory::ignoreNothing(); |
b60a0 | 0a 0a 24 74 68 69 73 2d 3e 77 72 69 74 65 4c 6f 63 6b 20 3d 20 24 63 6f 6e 66 69 67 2d 3e 67 65 | ..$this->writeLock.=.$config->ge |
b60c0 | 74 28 27 6c 6f 63 6b 27 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 | t('lock');.}.........public.func |
b60e0 | 74 69 6f 6e 20 72 75 6e 28 29 3a 20 69 6e 74 0a 7b 0a 0a 0a 0a 0a 67 63 5f 63 6f 6c 6c 65 63 74 | tion.run():.int.{.....gc_collect |
b6100 | 5f 63 79 63 6c 65 73 28 29 3b 0a 67 63 5f 64 69 73 61 62 6c 65 28 29 3b 0a 0a 69 66 20 28 24 74 | _cycles();.gc_disable();..if.($t |
b6120 | 68 69 73 2d 3e 75 70 64 61 74 65 41 6c 6c 6f 77 4c 69 73 74 20 26 26 20 24 74 68 69 73 2d 3e 75 | his->updateAllowList.&&.$this->u |
b6140 | 70 64 61 74 65 4d 69 72 72 6f 72 73 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 | pdateMirrors).{.throw.new.\Runti |
b6160 | 6d 65 45 78 63 65 70 74 69 6f 6e 28 22 54 68 65 20 69 6e 73 74 61 6c 6c 65 72 20 6f 70 74 69 6f | meException("The.installer.optio |
b6180 | 6e 73 20 75 70 64 61 74 65 4d 69 72 72 6f 72 73 20 61 6e 64 20 75 70 64 61 74 65 41 6c 6c 6f 77 | ns.updateMirrors.and.updateAllow |
b61a0 | 4c 69 73 74 20 61 72 65 20 6d 75 74 75 61 6c 6c 79 20 65 78 63 6c 75 73 69 76 65 2e 22 29 3b 0a | List.are.mutually.exclusive.");. |
b61c0 | 7d 0a 0a 24 69 73 46 72 65 73 68 49 6e 73 74 61 6c 6c 20 3d 20 24 74 68 69 73 2d 3e 72 65 70 6f | }..$isFreshInstall.=.$this->repo |
b61e0 | 73 69 74 6f 72 79 4d 61 6e 61 67 65 72 2d 3e 67 65 74 4c 6f 63 61 6c 52 65 70 6f 73 69 74 6f 72 | sitoryManager->getLocalRepositor |
b6200 | 79 28 29 2d 3e 69 73 46 72 65 73 68 28 29 3b 0a 0a 0a 69 66 20 28 21 24 74 68 69 73 2d 3e 75 70 | y()->isFresh();...if.(!$this->up |
b6220 | 64 61 74 65 20 26 26 20 21 24 74 68 69 73 2d 3e 6c 6f 63 6b 65 72 2d 3e 69 73 4c 6f 63 6b 65 64 | date.&&.!$this->locker->isLocked |
b6240 | 28 29 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 77 61 | ()).{.$this->io->writeError('<wa |
b6260 | 72 6e 69 6e 67 3e 4e 6f 20 63 6f 6d 70 6f 73 65 72 2e 6c 6f 63 6b 20 66 69 6c 65 20 70 72 65 73 | rning>No.composer.lock.file.pres |
b6280 | 65 6e 74 2e 20 55 70 64 61 74 69 6e 67 20 64 65 70 65 6e 64 65 6e 63 69 65 73 20 74 6f 20 6c 61 | ent..Updating.dependencies.to.la |
b62a0 | 74 65 73 74 20 69 6e 73 74 65 61 64 20 6f 66 20 69 6e 73 74 61 6c 6c 69 6e 67 20 66 72 6f 6d 20 | test.instead.of.installing.from. |
b62c0 | 6c 6f 63 6b 20 66 69 6c 65 2e 20 53 65 65 20 68 74 74 70 73 3a 2f 2f 67 65 74 63 6f 6d 70 6f 73 | lock.file..See.https://getcompos |
b62e0 | 65 72 2e 6f 72 67 2f 69 6e 73 74 61 6c 6c 20 66 6f 72 20 6d 6f 72 65 20 69 6e 66 6f 72 6d 61 74 | er.org/install.for.more.informat |
b6300 | 69 6f 6e 2e 3c 2f 77 61 72 6e 69 6e 67 3e 27 29 3b 0a 24 74 68 69 73 2d 3e 75 70 64 61 74 65 20 | ion.</warning>');.$this->update. |
b6320 | 3d 20 74 72 75 65 3b 0a 7d 0a 0a 69 66 20 28 24 74 68 69 73 2d 3e 64 72 79 52 75 6e 29 20 7b 0a | =.true;.}..if.($this->dryRun).{. |
b6340 | 24 74 68 69 73 2d 3e 76 65 72 62 6f 73 65 20 3d 20 74 72 75 65 3b 0a 24 74 68 69 73 2d 3e 72 75 | $this->verbose.=.true;.$this->ru |
b6360 | 6e 53 63 72 69 70 74 73 20 3d 20 66 61 6c 73 65 3b 0a 24 74 68 69 73 2d 3e 65 78 65 63 75 74 65 | nScripts.=.false;.$this->execute |
b6380 | 4f 70 65 72 61 74 69 6f 6e 73 20 3d 20 66 61 6c 73 65 3b 0a 24 74 68 69 73 2d 3e 77 72 69 74 65 | Operations.=.false;.$this->write |
b63a0 | 4c 6f 63 6b 20 3d 20 66 61 6c 73 65 3b 0a 24 74 68 69 73 2d 3e 64 75 6d 70 41 75 74 6f 6c 6f 61 | Lock.=.false;.$this->dumpAutoloa |
b63c0 | 64 65 72 20 3d 20 66 61 6c 73 65 3b 0a 24 74 68 69 73 2d 3e 6d 6f 63 6b 4c 6f 63 61 6c 52 65 70 | der.=.false;.$this->mockLocalRep |
b63e0 | 6f 73 69 74 6f 72 69 65 73 28 24 74 68 69 73 2d 3e 72 65 70 6f 73 69 74 6f 72 79 4d 61 6e 61 67 | ositories($this->repositoryManag |
b6400 | 65 72 29 3b 0a 7d 0a 0a 69 66 20 28 24 74 68 69 73 2d 3e 75 70 64 61 74 65 20 26 26 20 21 24 74 | er);.}..if.($this->update.&&.!$t |
b6420 | 68 69 73 2d 3e 69 6e 73 74 61 6c 6c 29 20 7b 0a 24 74 68 69 73 2d 3e 64 75 6d 70 41 75 74 6f 6c | his->install).{.$this->dumpAutol |
b6440 | 6f 61 64 65 72 20 3d 20 66 61 6c 73 65 3b 0a 7d 0a 0a 69 66 20 28 24 74 68 69 73 2d 3e 72 75 6e | oader.=.false;.}..if.($this->run |
b6460 | 53 63 72 69 70 74 73 29 20 7b 0a 50 6c 61 74 66 6f 72 6d 3a 3a 70 75 74 45 6e 76 28 27 43 4f 4d | Scripts).{.Platform::putEnv('COM |
b6480 | 50 4f 53 45 52 5f 44 45 56 5f 4d 4f 44 45 27 2c 20 24 74 68 69 73 2d 3e 64 65 76 4d 6f 64 65 20 | POSER_DEV_MODE',.$this->devMode. |
b64a0 | 3f 20 27 31 27 20 3a 20 27 30 27 29 3b 0a 0a 0a 0a 24 65 76 65 6e 74 4e 61 6d 65 20 3d 20 24 74 | ?.'1'.:.'0');....$eventName.=.$t |
b64c0 | 68 69 73 2d 3e 75 70 64 61 74 65 20 3f 20 53 63 72 69 70 74 45 76 65 6e 74 73 3a 3a 50 52 45 5f | his->update.?.ScriptEvents::PRE_ |
b64e0 | 55 50 44 41 54 45 5f 43 4d 44 20 3a 20 53 63 72 69 70 74 45 76 65 6e 74 73 3a 3a 50 52 45 5f 49 | UPDATE_CMD.:.ScriptEvents::PRE_I |
b6500 | 4e 53 54 41 4c 4c 5f 43 4d 44 3b 0a 24 74 68 69 73 2d 3e 65 76 65 6e 74 44 69 73 70 61 74 63 68 | NSTALL_CMD;.$this->eventDispatch |
b6520 | 65 72 2d 3e 64 69 73 70 61 74 63 68 53 63 72 69 70 74 28 24 65 76 65 6e 74 4e 61 6d 65 2c 20 24 | er->dispatchScript($eventName,.$ |
b6540 | 74 68 69 73 2d 3e 64 65 76 4d 6f 64 65 29 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 64 6f 77 6e 6c 6f | this->devMode);.}..$this->downlo |
b6560 | 61 64 4d 61 6e 61 67 65 72 2d 3e 73 65 74 50 72 65 66 65 72 53 6f 75 72 63 65 28 24 74 68 69 73 | adManager->setPreferSource($this |
b6580 | 2d 3e 70 72 65 66 65 72 53 6f 75 72 63 65 29 3b 0a 24 74 68 69 73 2d 3e 64 6f 77 6e 6c 6f 61 64 | ->preferSource);.$this->download |
b65a0 | 4d 61 6e 61 67 65 72 2d 3e 73 65 74 50 72 65 66 65 72 44 69 73 74 28 24 74 68 69 73 2d 3e 70 72 | Manager->setPreferDist($this->pr |
b65c0 | 65 66 65 72 44 69 73 74 29 3b 0a 0a 24 6c 6f 63 61 6c 52 65 70 6f 20 3d 20 24 74 68 69 73 2d 3e | eferDist);..$localRepo.=.$this-> |
b65e0 | 72 65 70 6f 73 69 74 6f 72 79 4d 61 6e 61 67 65 72 2d 3e 67 65 74 4c 6f 63 61 6c 52 65 70 6f 73 | repositoryManager->getLocalRepos |
b6600 | 69 74 6f 72 79 28 29 3b 0a 0a 74 72 79 20 7b 0a 69 66 20 28 24 74 68 69 73 2d 3e 75 70 64 61 74 | itory();..try.{.if.($this->updat |
b6620 | 65 29 20 7b 0a 24 72 65 73 20 3d 20 24 74 68 69 73 2d 3e 64 6f 55 70 64 61 74 65 28 24 6c 6f 63 | e).{.$res.=.$this->doUpdate($loc |
b6640 | 61 6c 52 65 70 6f 2c 20 24 74 68 69 73 2d 3e 69 6e 73 74 61 6c 6c 29 3b 0a 7d 20 65 6c 73 65 20 | alRepo,.$this->install);.}.else. |
b6660 | 7b 0a 24 72 65 73 20 3d 20 24 74 68 69 73 2d 3e 64 6f 49 6e 73 74 61 6c 6c 28 24 6c 6f 63 61 6c | {.$res.=.$this->doInstall($local |
b6680 | 52 65 70 6f 29 3b 0a 7d 0a 69 66 20 28 24 72 65 73 20 21 3d 3d 20 30 29 20 7b 0a 72 65 74 75 72 | Repo);.}.if.($res.!==.0).{.retur |
b66a0 | 6e 20 24 72 65 73 3b 0a 7d 0a 7d 20 63 61 74 63 68 20 28 5c 45 78 63 65 70 74 69 6f 6e 20 24 65 | n.$res;.}.}.catch.(\Exception.$e |
b66c0 | 29 20 7b 0a 69 66 20 28 24 74 68 69 73 2d 3e 65 78 65 63 75 74 65 4f 70 65 72 61 74 69 6f 6e 73 | ).{.if.($this->executeOperations |
b66e0 | 20 26 26 20 24 74 68 69 73 2d 3e 69 6e 73 74 61 6c 6c 20 26 26 20 24 74 68 69 73 2d 3e 63 6f 6e | .&&.$this->install.&&.$this->con |
b6700 | 66 69 67 2d 3e 67 65 74 28 27 6e 6f 74 69 66 79 2d 6f 6e 2d 69 6e 73 74 61 6c 6c 27 29 29 20 7b | fig->get('notify-on-install')).{ |
b6720 | 0a 24 74 68 69 73 2d 3e 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 72 2d 3e 6e 6f 74 | .$this->installationManager->not |
b6740 | 69 66 79 49 6e 73 74 61 6c 6c 73 28 24 74 68 69 73 2d 3e 69 6f 29 3b 0a 7d 0a 0a 74 68 72 6f 77 | ifyInstalls($this->io);.}..throw |
b6760 | 20 24 65 3b 0a 7d 0a 69 66 20 28 24 74 68 69 73 2d 3e 65 78 65 63 75 74 65 4f 70 65 72 61 74 69 | .$e;.}.if.($this->executeOperati |
b6780 | 6f 6e 73 20 26 26 20 24 74 68 69 73 2d 3e 69 6e 73 74 61 6c 6c 20 26 26 20 24 74 68 69 73 2d 3e | ons.&&.$this->install.&&.$this-> |
b67a0 | 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 6e 6f 74 69 66 79 2d 6f 6e 2d 69 6e 73 74 61 6c 6c 27 29 | config->get('notify-on-install') |
b67c0 | 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 72 2d 3e | ).{.$this->installationManager-> |
b67e0 | 6e 6f 74 69 66 79 49 6e 73 74 61 6c 6c 73 28 24 74 68 69 73 2d 3e 69 6f 29 3b 0a 7d 0a 0a 69 66 | notifyInstalls($this->io);.}..if |
b6800 | 20 28 24 74 68 69 73 2d 3e 75 70 64 61 74 65 29 20 7b 0a 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 | .($this->update).{.$installedRep |
b6820 | 6f 20 3d 20 6e 65 77 20 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 28 5b 0a 24 74 | o.=.new.InstalledRepository([.$t |
b6840 | 68 69 73 2d 3e 6c 6f 63 6b 65 72 2d 3e 67 65 74 4c 6f 63 6b 65 64 52 65 70 6f 73 69 74 6f 72 79 | his->locker->getLockedRepository |
b6860 | 28 24 74 68 69 73 2d 3e 64 65 76 4d 6f 64 65 29 2c 0a 24 74 68 69 73 2d 3e 63 72 65 61 74 65 50 | ($this->devMode),.$this->createP |
b6880 | 6c 61 74 66 6f 72 6d 52 65 70 6f 28 66 61 6c 73 65 29 2c 0a 6e 65 77 20 52 6f 6f 74 50 61 63 6b | latformRepo(false),.new.RootPack |
b68a0 | 61 67 65 52 65 70 6f 73 69 74 6f 72 79 28 63 6c 6f 6e 65 20 24 74 68 69 73 2d 3e 70 61 63 6b 61 | ageRepository(clone.$this->packa |
b68c0 | 67 65 29 2c 0a 5d 29 3b 0a 69 66 20 28 24 69 73 46 72 65 73 68 49 6e 73 74 61 6c 6c 29 20 7b 0a | ge),.]);.if.($isFreshInstall).{. |
b68e0 | 24 74 68 69 73 2d 3e 73 75 67 67 65 73 74 65 64 50 61 63 6b 61 67 65 73 52 65 70 6f 72 74 65 72 | $this->suggestedPackagesReporter |
b6900 | 2d 3e 61 64 64 53 75 67 67 65 73 74 69 6f 6e 73 46 72 6f 6d 50 61 63 6b 61 67 65 28 24 74 68 69 | ->addSuggestionsFromPackage($thi |
b6920 | 73 2d 3e 70 61 63 6b 61 67 65 29 3b 0a 7d 0a 24 74 68 69 73 2d 3e 73 75 67 67 65 73 74 65 64 50 | s->package);.}.$this->suggestedP |
b6940 | 61 63 6b 61 67 65 73 52 65 70 6f 72 74 65 72 2d 3e 6f 75 74 70 75 74 4d 69 6e 69 6d 61 6c 69 73 | ackagesReporter->outputMinimalis |
b6960 | 74 69 63 28 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 29 3b 0a 7d 0a 0a 0a 24 6c 6f 63 6b 65 64 | tic($installedRepo);.}...$locked |
b6980 | 52 65 70 6f 73 69 74 6f 72 79 20 3d 20 24 74 68 69 73 2d 3e 6c 6f 63 6b 65 72 2d 3e 67 65 74 4c | Repository.=.$this->locker->getL |
b69a0 | 6f 63 6b 65 64 52 65 70 6f 73 69 74 6f 72 79 28 74 72 75 65 29 3b 0a 66 6f 72 65 61 63 68 20 28 | ockedRepository(true);.foreach.( |
b69c0 | 24 6c 6f 63 6b 65 64 52 65 70 6f 73 69 74 6f 72 79 2d 3e 67 65 74 50 61 63 6b 61 67 65 73 28 29 | $lockedRepository->getPackages() |
b69e0 | 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 69 66 20 28 21 24 70 61 63 6b 61 67 65 20 69 6e | .as.$package).{.if.(!$package.in |
b6a00 | 73 74 61 6e 63 65 6f 66 20 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 20 7c 7c 20 21 24 70 61 | stanceof.CompletePackage.||.!$pa |
b6a20 | 63 6b 61 67 65 2d 3e 69 73 41 62 61 6e 64 6f 6e 65 64 28 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 | ckage->isAbandoned()).{.continue |
b6a40 | 3b 0a 7d 0a 0a 24 72 65 70 6c 61 63 65 6d 65 6e 74 20 3d 20 69 73 5f 73 74 72 69 6e 67 28 24 70 | ;.}..$replacement.=.is_string($p |
b6a60 | 61 63 6b 61 67 65 2d 3e 67 65 74 52 65 70 6c 61 63 65 6d 65 6e 74 50 61 63 6b 61 67 65 28 29 29 | ackage->getReplacementPackage()) |
b6a80 | 0a 3f 20 27 55 73 65 20 27 20 2e 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 52 65 70 6c 61 63 65 | .?.'Use.'...$package->getReplace |
b6aa0 | 6d 65 6e 74 50 61 63 6b 61 67 65 28 29 20 2e 20 27 20 69 6e 73 74 65 61 64 27 0a 3a 20 27 4e 6f | mentPackage()...'.instead'.:.'No |
b6ac0 | 20 72 65 70 6c 61 63 65 6d 65 6e 74 20 77 61 73 20 73 75 67 67 65 73 74 65 64 27 3b 0a 0a 24 74 | .replacement.was.suggested';..$t |
b6ae0 | 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 0a 73 70 72 69 6e 74 66 28 0a 22 3c | his->io->writeError(.sprintf(."< |
b6b00 | 77 61 72 6e 69 6e 67 3e 50 61 63 6b 61 67 65 20 25 73 20 69 73 20 61 62 61 6e 64 6f 6e 65 64 2c | warning>Package.%s.is.abandoned, |
b6b20 | 20 79 6f 75 20 73 68 6f 75 6c 64 20 61 76 6f 69 64 20 75 73 69 6e 67 20 69 74 2e 20 25 73 2e 3c | .you.should.avoid.using.it..%s.< |
b6b40 | 2f 77 61 72 6e 69 6e 67 3e 22 2c 0a 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 4e | /warning>",.$package->getPrettyN |
b6b60 | 61 6d 65 28 29 2c 0a 24 72 65 70 6c 61 63 65 6d 65 6e 74 0a 29 0a 29 3b 0a 7d 0a 0a 69 66 20 28 | ame(),.$replacement.).);.}..if.( |
b6b80 | 24 74 68 69 73 2d 3e 64 75 6d 70 41 75 74 6f 6c 6f 61 64 65 72 29 20 7b 0a 0a 69 66 20 28 24 74 | $this->dumpAutoloader).{..if.($t |
b6ba0 | 68 69 73 2d 3e 6f 70 74 69 6d 69 7a 65 41 75 74 6f 6c 6f 61 64 65 72 29 20 7b 0a 24 74 68 69 73 | his->optimizeAutoloader).{.$this |
b6bc0 | 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 69 6e 66 6f 3e 47 65 6e 65 72 61 74 69 | ->io->writeError('<info>Generati |
b6be0 | 6e 67 20 6f 70 74 69 6d 69 7a 65 64 20 61 75 74 6f 6c 6f 61 64 20 66 69 6c 65 73 3c 2f 69 6e 66 | ng.optimized.autoload.files</inf |
b6c00 | 6f 3e 27 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 | o>');.}.else.{.$this->io->writeE |
b6c20 | 72 72 6f 72 28 27 3c 69 6e 66 6f 3e 47 65 6e 65 72 61 74 69 6e 67 20 61 75 74 6f 6c 6f 61 64 20 | rror('<info>Generating.autoload. |
b6c40 | 66 69 6c 65 73 3c 2f 69 6e 66 6f 3e 27 29 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 61 75 74 6f 6c 6f | files</info>');.}..$this->autolo |
b6c60 | 61 64 47 65 6e 65 72 61 74 6f 72 2d 3e 73 65 74 43 6c 61 73 73 4d 61 70 41 75 74 68 6f 72 69 74 | adGenerator->setClassMapAuthorit |
b6c80 | 61 74 69 76 65 28 24 74 68 69 73 2d 3e 63 6c 61 73 73 4d 61 70 41 75 74 68 6f 72 69 74 61 74 69 | ative($this->classMapAuthoritati |
b6ca0 | 76 65 29 3b 0a 24 74 68 69 73 2d 3e 61 75 74 6f 6c 6f 61 64 47 65 6e 65 72 61 74 6f 72 2d 3e 73 | ve);.$this->autoloadGenerator->s |
b6cc0 | 65 74 41 70 63 75 28 24 74 68 69 73 2d 3e 61 70 63 75 41 75 74 6f 6c 6f 61 64 65 72 2c 20 24 74 | etApcu($this->apcuAutoloader,.$t |
b6ce0 | 68 69 73 2d 3e 61 70 63 75 41 75 74 6f 6c 6f 61 64 65 72 50 72 65 66 69 78 29 3b 0a 24 74 68 69 | his->apcuAutoloaderPrefix);.$thi |
b6d00 | 73 2d 3e 61 75 74 6f 6c 6f 61 64 47 65 6e 65 72 61 74 6f 72 2d 3e 73 65 74 52 75 6e 53 63 72 69 | s->autoloadGenerator->setRunScri |
b6d20 | 70 74 73 28 24 74 68 69 73 2d 3e 72 75 6e 53 63 72 69 70 74 73 29 3b 0a 24 74 68 69 73 2d 3e 61 | pts($this->runScripts);.$this->a |
b6d40 | 75 74 6f 6c 6f 61 64 47 65 6e 65 72 61 74 6f 72 2d 3e 73 65 74 50 6c 61 74 66 6f 72 6d 52 65 71 | utoloadGenerator->setPlatformReq |
b6d60 | 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 28 24 74 68 69 73 2d 3e 70 6c 61 74 66 6f 72 6d 52 65 | uirementFilter($this->platformRe |
b6d80 | 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 29 3b 0a 24 74 68 69 73 2d 3e 61 75 74 6f 6c 6f 61 | quirementFilter);.$this->autoloa |
b6da0 | 64 47 65 6e 65 72 61 74 6f 72 2d 3e 64 75 6d 70 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 2c 20 | dGenerator->dump($this->config,. |
b6dc0 | 24 6c 6f 63 61 6c 52 65 70 6f 2c 20 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 2c 20 24 74 68 69 | $localRepo,.$this->package,.$thi |
b6de0 | 73 2d 3e 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 72 2c 20 27 63 6f 6d 70 6f 73 65 | s->installationManager,.'compose |
b6e00 | 72 27 2c 20 24 74 68 69 73 2d 3e 6f 70 74 69 6d 69 7a 65 41 75 74 6f 6c 6f 61 64 65 72 29 3b 0a | r',.$this->optimizeAutoloader);. |
b6e20 | 7d 0a 0a 69 66 20 28 24 74 68 69 73 2d 3e 69 6e 73 74 61 6c 6c 20 26 26 20 24 74 68 69 73 2d 3e | }..if.($this->install.&&.$this-> |
b6e40 | 65 78 65 63 75 74 65 4f 70 65 72 61 74 69 6f 6e 73 29 20 7b 0a 0a 66 6f 72 65 61 63 68 20 28 24 | executeOperations).{..foreach.($ |
b6e60 | 6c 6f 63 61 6c 52 65 70 6f 2d 3e 67 65 74 50 61 63 6b 61 67 65 73 28 29 20 61 73 20 24 70 61 63 | localRepo->getPackages().as.$pac |
b6e80 | 6b 61 67 65 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 | kage).{.$this->installationManag |
b6ea0 | 65 72 2d 3e 65 6e 73 75 72 65 42 69 6e 61 72 69 65 73 50 72 65 73 65 6e 63 65 28 24 70 61 63 6b | er->ensureBinariesPresence($pack |
b6ec0 | 61 67 65 29 3b 0a 7d 0a 7d 0a 0a 24 66 75 6e 64 69 6e 67 43 6f 75 6e 74 20 3d 20 30 3b 0a 66 6f | age);.}.}..$fundingCount.=.0;.fo |
b6ee0 | 72 65 61 63 68 20 28 24 6c 6f 63 61 6c 52 65 70 6f 2d 3e 67 65 74 50 61 63 6b 61 67 65 73 28 29 | reach.($localRepo->getPackages() |
b6f00 | 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 69 66 20 28 24 70 61 63 6b 61 67 65 20 69 6e 73 | .as.$package).{.if.($package.ins |
b6f20 | 74 61 6e 63 65 6f 66 20 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 | tanceof.CompletePackageInterface |
b6f40 | 20 26 26 20 21 24 70 61 63 6b 61 67 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 41 6c 69 61 73 50 61 | .&&.!$package.instanceof.AliasPa |
b6f60 | 63 6b 61 67 65 20 26 26 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 46 75 6e 64 69 6e 67 28 29 29 | ckage.&&.$package->getFunding()) |
b6f80 | 20 7b 0a 24 66 75 6e 64 69 6e 67 43 6f 75 6e 74 2b 2b 3b 0a 7d 0a 7d 0a 69 66 20 28 24 66 75 6e | .{.$fundingCount++;.}.}.if.($fun |
b6fa0 | 64 69 6e 67 43 6f 75 6e 74 20 3e 20 30 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 | dingCount.>.0).{.$this->io->writ |
b6fc0 | 65 45 72 72 6f 72 28 5b 0a 73 70 72 69 6e 74 66 28 0a 22 3c 69 6e 66 6f 3e 25 64 20 70 61 63 6b | eError([.sprintf(."<info>%d.pack |
b6fe0 | 61 67 65 25 73 20 79 6f 75 20 61 72 65 20 75 73 69 6e 67 20 25 73 20 6c 6f 6f 6b 69 6e 67 20 66 | age%s.you.are.using.%s.looking.f |
b7000 | 6f 72 20 66 75 6e 64 69 6e 67 2e 3c 2f 69 6e 66 6f 3e 22 2c 0a 24 66 75 6e 64 69 6e 67 43 6f 75 | or.funding.</info>",.$fundingCou |
b7020 | 6e 74 2c 0a 31 20 3d 3d 3d 20 24 66 75 6e 64 69 6e 67 43 6f 75 6e 74 20 3f 20 27 27 20 3a 20 27 | nt,.1.===.$fundingCount.?.''.:.' |
b7040 | 73 27 2c 0a 31 20 3d 3d 3d 20 24 66 75 6e 64 69 6e 67 43 6f 75 6e 74 20 3f 20 27 69 73 27 20 3a | s',.1.===.$fundingCount.?.'is'.: |
b7060 | 20 27 61 72 65 27 0a 29 2c 0a 27 3c 69 6e 66 6f 3e 55 73 65 20 74 68 65 20 60 63 6f 6d 70 6f 73 | .'are'.),.'<info>Use.the.`compos |
b7080 | 65 72 20 66 75 6e 64 60 20 63 6f 6d 6d 61 6e 64 20 74 6f 20 66 69 6e 64 20 6f 75 74 20 6d 6f 72 | er.fund`.command.to.find.out.mor |
b70a0 | 65 21 3c 2f 69 6e 66 6f 3e 27 2c 0a 5d 29 3b 0a 7d 0a 0a 69 66 20 28 24 74 68 69 73 2d 3e 72 75 | e!</info>',.]);.}..if.($this->ru |
b70c0 | 6e 53 63 72 69 70 74 73 29 20 7b 0a 0a 24 65 76 65 6e 74 4e 61 6d 65 20 3d 20 24 74 68 69 73 2d | nScripts).{..$eventName.=.$this- |
b70e0 | 3e 75 70 64 61 74 65 20 3f 20 53 63 72 69 70 74 45 76 65 6e 74 73 3a 3a 50 4f 53 54 5f 55 50 44 | >update.?.ScriptEvents::POST_UPD |
b7100 | 41 54 45 5f 43 4d 44 20 3a 20 53 63 72 69 70 74 45 76 65 6e 74 73 3a 3a 50 4f 53 54 5f 49 4e 53 | ATE_CMD.:.ScriptEvents::POST_INS |
b7120 | 54 41 4c 4c 5f 43 4d 44 3b 0a 24 74 68 69 73 2d 3e 65 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 | TALL_CMD;.$this->eventDispatcher |
b7140 | 2d 3e 64 69 73 70 61 74 63 68 53 63 72 69 70 74 28 24 65 76 65 6e 74 4e 61 6d 65 2c 20 24 74 68 | ->dispatchScript($eventName,.$th |
b7160 | 69 73 2d 3e 64 65 76 4d 6f 64 65 29 3b 0a 7d 0a 0a 0a 69 66 20 28 21 64 65 66 69 6e 65 64 28 27 | is->devMode);.}...if.(!defined(' |
b7180 | 48 48 56 4d 5f 56 45 52 53 49 4f 4e 27 29 29 20 7b 0a 67 63 5f 65 6e 61 62 6c 65 28 29 3b 0a 7d | HHVM_VERSION')).{.gc_enable();.} |
b71a0 | 0a 0a 69 66 20 28 24 74 68 69 73 2d 3e 61 75 64 69 74 29 20 7b 0a 69 66 20 28 24 74 68 69 73 2d | ..if.($this->audit).{.if.($this- |
b71c0 | 3e 75 70 64 61 74 65 20 26 26 20 21 24 74 68 69 73 2d 3e 69 6e 73 74 61 6c 6c 29 20 7b 0a 24 70 | >update.&&.!$this->install).{.$p |
b71e0 | 61 63 6b 61 67 65 73 20 3d 20 24 6c 6f 63 6b 65 64 52 65 70 6f 73 69 74 6f 72 79 2d 3e 67 65 74 | ackages.=.$lockedRepository->get |
b7200 | 43 61 6e 6f 6e 69 63 61 6c 50 61 63 6b 61 67 65 73 28 29 3b 0a 24 74 61 72 67 65 74 20 3d 20 27 | CanonicalPackages();.$target.=.' |
b7220 | 6c 6f 63 6b 65 64 27 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 70 61 63 6b 61 67 65 73 20 3d 20 24 6c | locked';.}.else.{.$packages.=.$l |
b7240 | 6f 63 61 6c 52 65 70 6f 2d 3e 67 65 74 43 61 6e 6f 6e 69 63 61 6c 50 61 63 6b 61 67 65 73 28 29 | ocalRepo->getCanonicalPackages() |
b7260 | 3b 0a 24 74 61 72 67 65 74 20 3d 20 27 69 6e 73 74 61 6c 6c 65 64 27 3b 0a 7d 0a 69 66 20 28 63 | ;.$target.=.'installed';.}.if.(c |
b7280 | 6f 75 6e 74 28 24 70 61 63 6b 61 67 65 73 29 20 3e 20 30 29 20 7b 0a 74 72 79 20 7b 0a 24 61 75 | ount($packages).>.0).{.try.{.$au |
b72a0 | 64 69 74 6f 72 20 3d 20 6e 65 77 20 41 75 64 69 74 6f 72 28 29 3b 0a 24 72 65 70 6f 53 65 74 20 | ditor.=.new.Auditor();.$repoSet. |
b72c0 | 3d 20 6e 65 77 20 52 65 70 6f 73 69 74 6f 72 79 53 65 74 28 29 3b 0a 66 6f 72 65 61 63 68 20 28 | =.new.RepositorySet();.foreach.( |
b72e0 | 24 74 68 69 73 2d 3e 72 65 70 6f 73 69 74 6f 72 79 4d 61 6e 61 67 65 72 2d 3e 67 65 74 52 65 70 | $this->repositoryManager->getRep |
b7300 | 6f 73 69 74 6f 72 69 65 73 28 29 20 61 73 20 24 72 65 70 6f 29 20 7b 0a 24 72 65 70 6f 53 65 74 | ositories().as.$repo).{.$repoSet |
b7320 | 2d 3e 61 64 64 52 65 70 6f 73 69 74 6f 72 79 28 24 72 65 70 6f 29 3b 0a 7d 0a 24 61 75 64 69 74 | ->addRepository($repo);.}.$audit |
b7340 | 6f 72 2d 3e 61 75 64 69 74 28 24 74 68 69 73 2d 3e 69 6f 2c 20 24 72 65 70 6f 53 65 74 2c 20 24 | or->audit($this->io,.$repoSet,.$ |
b7360 | 70 61 63 6b 61 67 65 73 2c 20 24 74 68 69 73 2d 3e 61 75 64 69 74 46 6f 72 6d 61 74 29 3b 0a 7d | packages,.$this->auditFormat);.} |
b7380 | 20 63 61 74 63 68 20 28 54 72 61 6e 73 70 6f 72 74 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b | .catch.(TransportException.$e).{ |
b73a0 | 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 65 72 72 6f 72 28 27 46 61 69 6c 65 64 20 74 6f 20 61 75 64 | .$this->io->error('Failed.to.aud |
b73c0 | 69 74 20 27 2e 24 74 61 72 67 65 74 2e 27 20 70 61 63 6b 61 67 65 73 2e 27 29 3b 0a 69 66 20 28 | it.'.$target.'.packages.');.if.( |
b73e0 | 24 74 68 69 73 2d 3e 69 6f 2d 3e 69 73 56 65 72 62 6f 73 65 28 29 29 20 7b 0a 24 74 68 69 73 2d | $this->io->isVerbose()).{.$this- |
b7400 | 3e 69 6f 2d 3e 65 72 72 6f 72 28 27 5b 27 2e 67 65 74 5f 63 6c 61 73 73 28 24 65 29 2e 27 5d 20 | >io->error('['.get_class($e).']. |
b7420 | 27 2e 24 65 2d 3e 67 65 74 4d 65 73 73 61 67 65 28 29 29 3b 0a 7d 0a 7d 0a 7d 20 65 6c 73 65 20 | '.$e->getMessage());.}.}.}.else. |
b7440 | 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 4e 6f 20 27 2e 24 74 | {.$this->io->writeError('No.'.$t |
b7460 | 61 72 67 65 74 2e 27 20 70 61 63 6b 61 67 65 73 20 2d 20 73 6b 69 70 70 69 6e 67 20 61 75 64 69 | arget.'.packages.-.skipping.audi |
b7480 | 74 2e 27 29 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 | t.');.}.}..return.0;.}.....prote |
b74a0 | 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 64 6f 55 70 64 61 74 65 28 49 6e 73 74 61 6c 6c 65 64 | cted.function.doUpdate(Installed |
b74c0 | 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 20 24 6c 6f 63 61 6c 52 65 70 6f 2c 20 | RepositoryInterface.$localRepo,. |
b74e0 | 62 6f 6f 6c 20 24 64 6f 49 6e 73 74 61 6c 6c 29 3a 20 69 6e 74 0a 7b 0a 24 70 6c 61 74 66 6f 72 | bool.$doInstall):.int.{.$platfor |
b7500 | 6d 52 65 70 6f 20 3d 20 24 74 68 69 73 2d 3e 63 72 65 61 74 65 50 6c 61 74 66 6f 72 6d 52 65 70 | mRepo.=.$this->createPlatformRep |
b7520 | 6f 28 74 72 75 65 29 3b 0a 24 61 6c 69 61 73 65 73 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 52 6f | o(true);.$aliases.=.$this->getRo |
b7540 | 6f 74 41 6c 69 61 73 65 73 28 74 72 75 65 29 3b 0a 0a 24 6c 6f 63 6b 65 64 52 65 70 6f 73 69 74 | otAliases(true);..$lockedReposit |
b7560 | 6f 72 79 20 3d 20 6e 75 6c 6c 3b 0a 0a 74 72 79 20 7b 0a 69 66 20 28 24 74 68 69 73 2d 3e 6c 6f | ory.=.null;..try.{.if.($this->lo |
b7580 | 63 6b 65 72 2d 3e 69 73 4c 6f 63 6b 65 64 28 29 29 20 7b 0a 24 6c 6f 63 6b 65 64 52 65 70 6f 73 | cker->isLocked()).{.$lockedRepos |
b75a0 | 69 74 6f 72 79 20 3d 20 24 74 68 69 73 2d 3e 6c 6f 63 6b 65 72 2d 3e 67 65 74 4c 6f 63 6b 65 64 | itory.=.$this->locker->getLocked |
b75c0 | 52 65 70 6f 73 69 74 6f 72 79 28 74 72 75 65 29 3b 0a 7d 0a 7d 20 63 61 74 63 68 20 28 5c 53 65 | Repository(true);.}.}.catch.(\Se |
b75e0 | 6c 64 5c 4a 73 6f 6e 4c 69 6e 74 5c 50 61 72 73 69 6e 67 45 78 63 65 70 74 69 6f 6e 20 24 65 29 | ld\JsonLint\ParsingException.$e) |
b7600 | 20 7b 0a 69 66 20 28 24 74 68 69 73 2d 3e 75 70 64 61 74 65 41 6c 6c 6f 77 4c 69 73 74 20 7c 7c | .{.if.($this->updateAllowList.|| |
b7620 | 20 24 74 68 69 73 2d 3e 75 70 64 61 74 65 4d 69 72 72 6f 72 73 29 20 7b 0a 0a 74 68 72 6f 77 20 | .$this->updateMirrors).{..throw. |
b7640 | 24 65 3b 0a 7d 0a 0a 0a 7d 0a 0a 69 66 20 28 28 24 74 68 69 73 2d 3e 75 70 64 61 74 65 41 6c 6c | $e;.}...}..if.(($this->updateAll |
b7660 | 6f 77 4c 69 73 74 20 7c 7c 20 24 74 68 69 73 2d 3e 75 70 64 61 74 65 4d 69 72 72 6f 72 73 29 20 | owList.||.$this->updateMirrors). |
b7680 | 26 26 20 21 24 6c 6f 63 6b 65 64 52 65 70 6f 73 69 74 6f 72 79 29 20 7b 0a 24 74 68 69 73 2d 3e | &&.!$lockedRepository).{.$this-> |
b76a0 | 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 65 72 72 6f 72 3e 43 61 6e 6e 6f 74 20 75 70 | io->writeError('<error>Cannot.up |
b76c0 | 64 61 74 65 20 27 20 2e 20 28 24 74 68 69 73 2d 3e 75 70 64 61 74 65 4d 69 72 72 6f 72 73 20 3f | date.'...($this->updateMirrors.? |
b76e0 | 20 27 6c 6f 63 6b 20 66 69 6c 65 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 27 20 3a 20 27 6f 6e 6c 79 | .'lock.file.information'.:.'only |
b7700 | 20 61 20 70 61 72 74 69 61 6c 20 73 65 74 20 6f 66 20 70 61 63 6b 61 67 65 73 27 29 20 2e 20 27 | .a.partial.set.of.packages')...' |
b7720 | 20 77 69 74 68 6f 75 74 20 61 20 6c 6f 63 6b 20 66 69 6c 65 20 70 72 65 73 65 6e 74 2e 20 52 75 | .without.a.lock.file.present..Ru |
b7740 | 6e 20 60 63 6f 6d 70 6f 73 65 72 20 75 70 64 61 74 65 60 20 74 6f 20 67 65 6e 65 72 61 74 65 20 | n.`composer.update`.to.generate. |
b7760 | 61 20 6c 6f 63 6b 20 66 69 6c 65 2e 3c 2f 65 72 72 6f 72 3e 27 2c 20 74 72 75 65 2c 20 49 4f 49 | a.lock.file.</error>',.true,.IOI |
b7780 | 6e 74 65 72 66 61 63 65 3a 3a 51 55 49 45 54 29 3b 0a 0a 72 65 74 75 72 6e 20 73 65 6c 66 3a 3a | nterface::QUIET);..return.self:: |
b77a0 | 45 52 52 4f 52 5f 4e 4f 5f 4c 4f 43 4b 5f 46 49 4c 45 5f 46 4f 52 5f 50 41 52 54 49 41 4c 5f 55 | ERROR_NO_LOCK_FILE_FOR_PARTIAL_U |
b77c0 | 50 44 41 54 45 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 | PDATE;.}..$this->io->writeError( |
b77e0 | 27 3c 69 6e 66 6f 3e 4c 6f 61 64 69 6e 67 20 63 6f 6d 70 6f 73 65 72 20 72 65 70 6f 73 69 74 6f | '<info>Loading.composer.reposito |
b7800 | 72 69 65 73 20 77 69 74 68 20 70 61 63 6b 61 67 65 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 3c 2f 69 | ries.with.package.information</i |
b7820 | 6e 66 6f 3e 27 29 3b 0a 0a 0a 24 70 6f 6c 69 63 79 20 3d 20 24 74 68 69 73 2d 3e 63 72 65 61 74 | nfo>');...$policy.=.$this->creat |
b7840 | 65 50 6f 6c 69 63 79 28 74 72 75 65 29 3b 0a 24 72 65 70 6f 73 69 74 6f 72 79 53 65 74 20 3d 20 | ePolicy(true);.$repositorySet.=. |
b7860 | 24 74 68 69 73 2d 3e 63 72 65 61 74 65 52 65 70 6f 73 69 74 6f 72 79 53 65 74 28 74 72 75 65 2c | $this->createRepositorySet(true, |
b7880 | 20 24 70 6c 61 74 66 6f 72 6d 52 65 70 6f 2c 20 24 61 6c 69 61 73 65 73 29 3b 0a 24 72 65 70 6f | .$platformRepo,.$aliases);.$repo |
b78a0 | 73 69 74 6f 72 69 65 73 20 3d 20 24 74 68 69 73 2d 3e 72 65 70 6f 73 69 74 6f 72 79 4d 61 6e 61 | sitories.=.$this->repositoryMana |
b78c0 | 67 65 72 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 69 65 73 28 29 3b 0a 66 6f 72 65 61 63 68 20 | ger->getRepositories();.foreach. |
b78e0 | 28 24 72 65 70 6f 73 69 74 6f 72 69 65 73 20 61 73 20 24 72 65 70 6f 73 69 74 6f 72 79 29 20 7b | ($repositories.as.$repository).{ |
b7900 | 0a 24 72 65 70 6f 73 69 74 6f 72 79 53 65 74 2d 3e 61 64 64 52 65 70 6f 73 69 74 6f 72 79 28 24 | .$repositorySet->addRepository($ |
b7920 | 72 65 70 6f 73 69 74 6f 72 79 29 3b 0a 7d 0a 69 66 20 28 24 6c 6f 63 6b 65 64 52 65 70 6f 73 69 | repository);.}.if.($lockedReposi |
b7940 | 74 6f 72 79 29 20 7b 0a 24 72 65 70 6f 73 69 74 6f 72 79 53 65 74 2d 3e 61 64 64 52 65 70 6f 73 | tory).{.$repositorySet->addRepos |
b7960 | 69 74 6f 72 79 28 24 6c 6f 63 6b 65 64 52 65 70 6f 73 69 74 6f 72 79 29 3b 0a 7d 0a 0a 24 72 65 | itory($lockedRepository);.}..$re |
b7980 | 71 75 65 73 74 20 3d 20 24 74 68 69 73 2d 3e 63 72 65 61 74 65 52 65 71 75 65 73 74 28 24 74 68 | quest.=.$this->createRequest($th |
b79a0 | 69 73 2d 3e 66 69 78 65 64 52 6f 6f 74 50 61 63 6b 61 67 65 2c 20 24 70 6c 61 74 66 6f 72 6d 52 | is->fixedRootPackage,.$platformR |
b79c0 | 65 70 6f 2c 20 24 6c 6f 63 6b 65 64 52 65 70 6f 73 69 74 6f 72 79 29 3b 0a 24 74 68 69 73 2d 3e | epo,.$lockedRepository);.$this-> |
b79e0 | 72 65 71 75 69 72 65 50 61 63 6b 61 67 65 73 46 6f 72 55 70 64 61 74 65 28 24 72 65 71 75 65 73 | requirePackagesForUpdate($reques |
b7a00 | 74 2c 20 24 6c 6f 63 6b 65 64 52 65 70 6f 73 69 74 6f 72 79 2c 20 74 72 75 65 29 3b 0a 0a 0a 69 | t,.$lockedRepository,.true);...i |
b7a20 | 66 20 28 24 74 68 69 73 2d 3e 75 70 64 61 74 65 41 6c 6c 6f 77 4c 69 73 74 29 20 7b 0a 24 72 65 | f.($this->updateAllowList).{.$re |
b7a40 | 71 75 65 73 74 2d 3e 73 65 74 55 70 64 61 74 65 41 6c 6c 6f 77 4c 69 73 74 28 24 74 68 69 73 2d | quest->setUpdateAllowList($this- |
b7a60 | 3e 75 70 64 61 74 65 41 6c 6c 6f 77 4c 69 73 74 2c 20 24 74 68 69 73 2d 3e 75 70 64 61 74 65 41 | >updateAllowList,.$this->updateA |
b7a80 | 6c 6c 6f 77 54 72 61 6e 73 69 74 69 76 65 44 65 70 65 6e 64 65 6e 63 69 65 73 29 3b 0a 7d 0a 0a | llowTransitiveDependencies);.}.. |
b7aa0 | 24 70 6f 6f 6c 20 3d 20 24 72 65 70 6f 73 69 74 6f 72 79 53 65 74 2d 3e 63 72 65 61 74 65 50 6f | $pool.=.$repositorySet->createPo |
b7ac0 | 6f 6c 28 24 72 65 71 75 65 73 74 2c 20 24 74 68 69 73 2d 3e 69 6f 2c 20 24 74 68 69 73 2d 3e 65 | ol($request,.$this->io,.$this->e |
b7ae0 | 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 2c 20 24 74 68 69 73 2d 3e 63 72 65 61 74 65 50 6f 6f | ventDispatcher,.$this->createPoo |
b7b00 | 6c 4f 70 74 69 6d 69 7a 65 72 28 24 70 6f 6c 69 63 79 29 29 3b 0a 0a 24 74 68 69 73 2d 3e 69 6f | lOptimizer($policy));..$this->io |
b7b20 | 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 69 6e 66 6f 3e 55 70 64 61 74 69 6e 67 20 64 65 70 | ->writeError('<info>Updating.dep |
b7b40 | 65 6e 64 65 6e 63 69 65 73 3c 2f 69 6e 66 6f 3e 27 29 3b 0a 0a 0a 24 73 6f 6c 76 65 72 20 3d 20 | endencies</info>');...$solver.=. |
b7b60 | 6e 65 77 20 53 6f 6c 76 65 72 28 24 70 6f 6c 69 63 79 2c 20 24 70 6f 6f 6c 2c 20 24 74 68 69 73 | new.Solver($policy,.$pool,.$this |
b7b80 | 2d 3e 69 6f 29 3b 0a 74 72 79 20 7b 0a 24 6c 6f 63 6b 54 72 61 6e 73 61 63 74 69 6f 6e 20 3d 20 | ->io);.try.{.$lockTransaction.=. |
b7ba0 | 24 73 6f 6c 76 65 72 2d 3e 73 6f 6c 76 65 28 24 72 65 71 75 65 73 74 2c 20 24 74 68 69 73 2d 3e | $solver->solve($request,.$this-> |
b7bc0 | 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 29 3b 0a 24 72 75 6c | platformRequirementFilter);.$rul |
b7be0 | 65 53 65 74 53 69 7a 65 20 3d 20 24 73 6f 6c 76 65 72 2d 3e 67 65 74 52 75 6c 65 53 65 74 53 69 | eSetSize.=.$solver->getRuleSetSi |
b7c00 | 7a 65 28 29 3b 0a 24 73 6f 6c 76 65 72 20 3d 20 6e 75 6c 6c 3b 0a 7d 20 63 61 74 63 68 20 28 53 | ze();.$solver.=.null;.}.catch.(S |
b7c20 | 6f 6c 76 65 72 50 72 6f 62 6c 65 6d 73 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 24 65 72 | olverProblemsException.$e).{.$er |
b7c40 | 72 20 3d 20 27 59 6f 75 72 20 72 65 71 75 69 72 65 6d 65 6e 74 73 20 63 6f 75 6c 64 20 6e 6f 74 | r.=.'Your.requirements.could.not |
b7c60 | 20 62 65 20 72 65 73 6f 6c 76 65 64 20 74 6f 20 61 6e 20 69 6e 73 74 61 6c 6c 61 62 6c 65 20 73 | .be.resolved.to.an.installable.s |
b7c80 | 65 74 20 6f 66 20 70 61 63 6b 61 67 65 73 2e 27 3b 0a 24 70 72 65 74 74 79 50 72 6f 62 6c 65 6d | et.of.packages.';.$prettyProblem |
b7ca0 | 20 3d 20 24 65 2d 3e 67 65 74 50 72 65 74 74 79 53 74 72 69 6e 67 28 24 72 65 70 6f 73 69 74 6f | .=.$e->getPrettyString($reposito |
b7cc0 | 72 79 53 65 74 2c 20 24 72 65 71 75 65 73 74 2c 20 24 70 6f 6f 6c 2c 20 24 74 68 69 73 2d 3e 69 | rySet,.$request,.$pool,.$this->i |
b7ce0 | 6f 2d 3e 69 73 56 65 72 62 6f 73 65 28 29 29 3b 0a 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 | o->isVerbose());..$this->io->wri |
b7d00 | 74 65 45 72 72 6f 72 28 27 3c 65 72 72 6f 72 3e 27 2e 20 24 65 72 72 20 2e 27 3c 2f 65 72 72 6f | teError('<error>'..$err..'</erro |
b7d20 | 72 3e 27 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 3a 3a 51 55 49 45 54 29 3b 0a | r>',.true,.IOInterface::QUIET);. |
b7d40 | 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 24 70 72 65 74 74 79 50 72 6f | $this->io->writeError($prettyPro |
b7d60 | 62 6c 65 6d 29 3b 0a 69 66 20 28 21 24 74 68 69 73 2d 3e 64 65 76 4d 6f 64 65 29 20 7b 0a 24 74 | blem);.if.(!$this->devMode).{.$t |
b7d80 | 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 77 61 72 6e 69 6e 67 3e 52 75 | his->io->writeError('<warning>Ru |
b7da0 | 6e 6e 69 6e 67 20 75 70 64 61 74 65 20 77 69 74 68 20 2d 2d 6e 6f 2d 64 65 76 20 64 6f 65 73 20 | nning.update.with.--no-dev.does. |
b7dc0 | 6e 6f 74 20 6d 65 61 6e 20 72 65 71 75 69 72 65 2d 64 65 76 20 69 73 20 69 67 6e 6f 72 65 64 2c | not.mean.require-dev.is.ignored, |
b7de0 | 20 69 74 20 6a 75 73 74 20 6d 65 61 6e 73 20 74 68 65 20 70 61 63 6b 61 67 65 73 20 77 69 6c 6c | .it.just.means.the.packages.will |
b7e00 | 20 6e 6f 74 20 62 65 20 69 6e 73 74 61 6c 6c 65 64 2e 20 49 66 20 64 65 76 20 72 65 71 75 69 72 | .not.be.installed..If.dev.requir |
b7e20 | 65 6d 65 6e 74 73 20 61 72 65 20 62 6c 6f 63 6b 69 6e 67 20 74 68 65 20 75 70 64 61 74 65 20 79 | ements.are.blocking.the.update.y |
b7e40 | 6f 75 20 68 61 76 65 20 74 6f 20 72 65 73 6f 6c 76 65 20 74 68 6f 73 65 20 70 72 6f 62 6c 65 6d | ou.have.to.resolve.those.problem |
b7e60 | 73 2e 3c 2f 77 61 72 6e 69 6e 67 3e 27 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 | s.</warning>',.true,.IOInterface |
b7e80 | 3a 3a 51 55 49 45 54 29 3b 0a 7d 0a 0a 24 67 68 65 20 3d 20 6e 65 77 20 47 69 74 68 75 62 41 63 | ::QUIET);.}..$ghe.=.new.GithubAc |
b7ea0 | 74 69 6f 6e 45 72 72 6f 72 28 24 74 68 69 73 2d 3e 69 6f 29 3b 0a 24 67 68 65 2d 3e 65 6d 69 74 | tionError($this->io);.$ghe->emit |
b7ec0 | 28 24 65 72 72 2e 22 5c 6e 22 2e 24 70 72 65 74 74 79 50 72 6f 62 6c 65 6d 29 3b 0a 0a 72 65 74 | ($err."\n".$prettyProblem);..ret |
b7ee0 | 75 72 6e 20 6d 61 78 28 73 65 6c 66 3a 3a 45 52 52 4f 52 5f 47 45 4e 45 52 49 43 5f 46 41 49 4c | urn.max(self::ERROR_GENERIC_FAIL |
b7f00 | 55 52 45 2c 20 24 65 2d 3e 67 65 74 43 6f 64 65 28 29 29 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 69 | URE,.$e->getCode());.}..$this->i |
b7f20 | 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 22 41 6e 61 6c 79 7a 65 64 20 22 2e 63 6f 75 6e 74 28 | o->writeError("Analyzed.".count( |
b7f40 | 24 70 6f 6f 6c 29 2e 22 20 70 61 63 6b 61 67 65 73 20 74 6f 20 72 65 73 6f 6c 76 65 20 64 65 70 | $pool).".packages.to.resolve.dep |
b7f60 | 65 6e 64 65 6e 63 69 65 73 22 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 3a 3a 56 | endencies",.true,.IOInterface::V |
b7f80 | 45 52 42 4f 53 45 29 3b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 22 | ERBOSE);.$this->io->writeError(" |
b7fa0 | 41 6e 61 6c 79 7a 65 64 20 22 2e 24 72 75 6c 65 53 65 74 53 69 7a 65 2e 22 20 72 75 6c 65 73 20 | Analyzed.".$ruleSetSize.".rules. |
b7fc0 | 74 6f 20 72 65 73 6f 6c 76 65 20 64 65 70 65 6e 64 65 6e 63 69 65 73 22 2c 20 74 72 75 65 2c 20 | to.resolve.dependencies",.true,. |
b7fe0 | 49 4f 49 6e 74 65 72 66 61 63 65 3a 3a 56 45 52 42 4f 53 45 29 3b 0a 0a 24 70 6f 6f 6c 20 3d 20 | IOInterface::VERBOSE);..$pool.=. |
b8000 | 6e 75 6c 6c 3b 0a 0a 69 66 20 28 21 24 6c 6f 63 6b 54 72 61 6e 73 61 63 74 69 6f 6e 2d 3e 67 65 | null;..if.(!$lockTransaction->ge |
b8020 | 74 4f 70 65 72 61 74 69 6f 6e 73 28 29 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 | tOperations()).{.$this->io->writ |
b8040 | 65 45 72 72 6f 72 28 27 4e 6f 74 68 69 6e 67 20 74 6f 20 6d 6f 64 69 66 79 20 69 6e 20 6c 6f 63 | eError('Nothing.to.modify.in.loc |
b8060 | 6b 20 66 69 6c 65 27 29 3b 0a 7d 0a 0a 24 65 78 69 74 43 6f 64 65 20 3d 20 24 74 68 69 73 2d 3e | k.file');.}..$exitCode.=.$this-> |
b8080 | 65 78 74 72 61 63 74 44 65 76 50 61 63 6b 61 67 65 73 28 24 6c 6f 63 6b 54 72 61 6e 73 61 63 74 | extractDevPackages($lockTransact |
b80a0 | 69 6f 6e 2c 20 24 70 6c 61 74 66 6f 72 6d 52 65 70 6f 2c 20 24 61 6c 69 61 73 65 73 2c 20 24 70 | ion,.$platformRepo,.$aliases,.$p |
b80c0 | 6f 6c 69 63 79 2c 20 24 6c 6f 63 6b 65 64 52 65 70 6f 73 69 74 6f 72 79 29 3b 0a 69 66 20 28 24 | olicy,.$lockedRepository);.if.($ |
b80e0 | 65 78 69 74 43 6f 64 65 20 21 3d 3d 20 30 29 20 7b 0a 72 65 74 75 72 6e 20 24 65 78 69 74 43 6f | exitCode.!==.0).{.return.$exitCo |
b8100 | 64 65 3b 0a 7d 0a 0a 0a 69 66 20 28 6d 65 74 68 6f 64 5f 65 78 69 73 74 73 28 27 43 6f 6d 70 6f | de;.}...if.(method_exists('Compo |
b8120 | 73 65 72 5c 53 65 6d 76 65 72 5c 43 6f 6d 70 69 6c 69 6e 67 4d 61 74 63 68 65 72 27 2c 20 27 63 | ser\Semver\CompilingMatcher',.'c |
b8140 | 6c 65 61 72 27 29 29 20 7b 20 0a 5c 43 6f 6d 70 6f 73 65 72 5c 53 65 6d 76 65 72 5c 43 6f 6d 70 | lear')).{..\Composer\Semver\Comp |
b8160 | 69 6c 69 6e 67 4d 61 74 63 68 65 72 3a 3a 63 6c 65 61 72 28 29 3b 0a 7d 0a 0a 0a 24 70 6c 61 74 | ilingMatcher::clear();.}...$plat |
b8180 | 66 6f 72 6d 52 65 71 73 20 3d 20 24 74 68 69 73 2d 3e 65 78 74 72 61 63 74 50 6c 61 74 66 6f 72 | formReqs.=.$this->extractPlatfor |
b81a0 | 6d 52 65 71 75 69 72 65 6d 65 6e 74 73 28 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 2d 3e 67 65 | mRequirements($this->package->ge |
b81c0 | 74 52 65 71 75 69 72 65 73 28 29 29 3b 0a 24 70 6c 61 74 66 6f 72 6d 44 65 76 52 65 71 73 20 3d | tRequires());.$platformDevReqs.= |
b81e0 | 20 24 74 68 69 73 2d 3e 65 78 74 72 61 63 74 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 | .$this->extractPlatformRequireme |
b8200 | 6e 74 73 28 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 2d 3e 67 65 74 44 65 76 52 65 71 75 69 72 | nts($this->package->getDevRequir |
b8220 | 65 73 28 29 29 3b 0a 0a 24 69 6e 73 74 61 6c 6c 73 55 70 64 61 74 65 73 20 3d 20 24 75 6e 69 6e | es());..$installsUpdates.=.$unin |
b8240 | 73 74 61 6c 6c 73 20 3d 20 5b 5d 3b 0a 69 66 20 28 24 6c 6f 63 6b 54 72 61 6e 73 61 63 74 69 6f | stalls.=.[];.if.($lockTransactio |
b8260 | 6e 2d 3e 67 65 74 4f 70 65 72 61 74 69 6f 6e 73 28 29 29 20 7b 0a 24 69 6e 73 74 61 6c 6c 4e 61 | n->getOperations()).{.$installNa |
b8280 | 6d 65 73 20 3d 20 24 75 70 64 61 74 65 4e 61 6d 65 73 20 3d 20 24 75 6e 69 6e 73 74 61 6c 6c 4e | mes.=.$updateNames.=.$uninstallN |
b82a0 | 61 6d 65 73 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 6c 6f 63 6b 54 72 61 6e 73 61 63 | ames.=.[];.foreach.($lockTransac |
b82c0 | 74 69 6f 6e 2d 3e 67 65 74 4f 70 65 72 61 74 69 6f 6e 73 28 29 20 61 73 20 24 6f 70 65 72 61 74 | tion->getOperations().as.$operat |
b82e0 | 69 6f 6e 29 20 7b 0a 69 66 20 28 24 6f 70 65 72 61 74 69 6f 6e 20 69 6e 73 74 61 6e 63 65 6f 66 | ion).{.if.($operation.instanceof |
b8300 | 20 49 6e 73 74 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 29 20 7b 0a 24 69 6e 73 74 61 6c 6c 73 55 70 | .InstallOperation).{.$installsUp |
b8320 | 64 61 74 65 73 5b 5d 20 3d 20 24 6f 70 65 72 61 74 69 6f 6e 3b 0a 24 69 6e 73 74 61 6c 6c 4e 61 | dates[].=.$operation;.$installNa |
b8340 | 6d 65 73 5b 5d 20 3d 20 24 6f 70 65 72 61 74 69 6f 6e 2d 3e 67 65 74 50 61 63 6b 61 67 65 28 29 | mes[].=.$operation->getPackage() |
b8360 | 2d 3e 67 65 74 50 72 65 74 74 79 4e 61 6d 65 28 29 2e 27 3a 27 2e 24 6f 70 65 72 61 74 69 6f 6e | ->getPrettyName().':'.$operation |
b8380 | 2d 3e 67 65 74 50 61 63 6b 61 67 65 28 29 2d 3e 67 65 74 46 75 6c 6c 50 72 65 74 74 79 56 65 72 | ->getPackage()->getFullPrettyVer |
b83a0 | 73 69 6f 6e 28 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 6f 70 65 72 61 74 69 6f 6e 20 69 6e 73 | sion();.}.elseif.($operation.ins |
b83c0 | 74 61 6e 63 65 6f 66 20 55 70 64 61 74 65 4f 70 65 72 61 74 69 6f 6e 29 20 7b 0a 0a 0a 69 66 20 | tanceof.UpdateOperation).{...if. |
b83e0 | 28 24 74 68 69 73 2d 3e 75 70 64 61 74 65 4d 69 72 72 6f 72 73 0a 26 26 20 24 6f 70 65 72 61 74 | ($this->updateMirrors.&&.$operat |
b8400 | 69 6f 6e 2d 3e 67 65 74 49 6e 69 74 69 61 6c 50 61 63 6b 61 67 65 28 29 2d 3e 67 65 74 4e 61 6d | ion->getInitialPackage()->getNam |
b8420 | 65 28 29 20 3d 3d 3d 20 24 6f 70 65 72 61 74 69 6f 6e 2d 3e 67 65 74 54 61 72 67 65 74 50 61 63 | e().===.$operation->getTargetPac |
b8440 | 6b 61 67 65 28 29 2d 3e 67 65 74 4e 61 6d 65 28 29 0a 26 26 20 24 6f 70 65 72 61 74 69 6f 6e 2d | kage()->getName().&&.$operation- |
b8460 | 3e 67 65 74 49 6e 69 74 69 61 6c 50 61 63 6b 61 67 65 28 29 2d 3e 67 65 74 56 65 72 73 69 6f 6e | >getInitialPackage()->getVersion |
b8480 | 28 29 20 3d 3d 3d 20 24 6f 70 65 72 61 74 69 6f 6e 2d 3e 67 65 74 54 61 72 67 65 74 50 61 63 6b | ().===.$operation->getTargetPack |
b84a0 | 61 67 65 28 29 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 0a 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 | age()->getVersion().).{.continue |
b84c0 | 3b 0a 7d 0a 0a 24 69 6e 73 74 61 6c 6c 73 55 70 64 61 74 65 73 5b 5d 20 3d 20 24 6f 70 65 72 61 | ;.}..$installsUpdates[].=.$opera |
b84e0 | 74 69 6f 6e 3b 0a 24 75 70 64 61 74 65 4e 61 6d 65 73 5b 5d 20 3d 20 24 6f 70 65 72 61 74 69 6f | tion;.$updateNames[].=.$operatio |
b8500 | 6e 2d 3e 67 65 74 54 61 72 67 65 74 50 61 63 6b 61 67 65 28 29 2d 3e 67 65 74 50 72 65 74 74 79 | n->getTargetPackage()->getPretty |
b8520 | 4e 61 6d 65 28 29 2e 27 3a 27 2e 24 6f 70 65 72 61 74 69 6f 6e 2d 3e 67 65 74 54 61 72 67 65 74 | Name().':'.$operation->getTarget |
b8540 | 50 61 63 6b 61 67 65 28 29 2d 3e 67 65 74 46 75 6c 6c 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 | Package()->getFullPrettyVersion( |
b8560 | 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 6f 70 65 72 61 74 69 6f 6e 20 69 6e 73 74 61 6e 63 65 | );.}.elseif.($operation.instance |
b8580 | 6f 66 20 55 6e 69 6e 73 74 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 29 20 7b 0a 24 75 6e 69 6e 73 74 | of.UninstallOperation).{.$uninst |
b85a0 | 61 6c 6c 73 5b 5d 20 3d 20 24 6f 70 65 72 61 74 69 6f 6e 3b 0a 24 75 6e 69 6e 73 74 61 6c 6c 4e | alls[].=.$operation;.$uninstallN |
b85c0 | 61 6d 65 73 5b 5d 20 3d 20 24 6f 70 65 72 61 74 69 6f 6e 2d 3e 67 65 74 50 61 63 6b 61 67 65 28 | ames[].=.$operation->getPackage( |
b85e0 | 29 2d 3e 67 65 74 50 72 65 74 74 79 4e 61 6d 65 28 29 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 24 74 68 | )->getPrettyName();.}.}..if.($th |
b8600 | 69 73 2d 3e 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 6c 6f 63 6b 27 29 29 20 7b 0a 24 74 68 69 73 | is->config->get('lock')).{.$this |
b8620 | 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 73 70 72 69 6e 74 66 28 0a 22 3c 69 6e 66 6f | ->io->writeError(sprintf(."<info |
b8640 | 3e 4c 6f 63 6b 20 66 69 6c 65 20 6f 70 65 72 61 74 69 6f 6e 73 3a 20 25 64 20 69 6e 73 74 61 6c | >Lock.file.operations:.%d.instal |
b8660 | 6c 25 73 2c 20 25 64 20 75 70 64 61 74 65 25 73 2c 20 25 64 20 72 65 6d 6f 76 61 6c 25 73 3c 2f | l%s,.%d.update%s,.%d.removal%s</ |
b8680 | 69 6e 66 6f 3e 22 2c 0a 63 6f 75 6e 74 28 24 69 6e 73 74 61 6c 6c 4e 61 6d 65 73 29 2c 0a 31 20 | info>",.count($installNames),.1. |
b86a0 | 3d 3d 3d 20 63 6f 75 6e 74 28 24 69 6e 73 74 61 6c 6c 4e 61 6d 65 73 29 20 3f 20 27 27 20 3a 20 | ===.count($installNames).?.''.:. |
b86c0 | 27 73 27 2c 0a 63 6f 75 6e 74 28 24 75 70 64 61 74 65 4e 61 6d 65 73 29 2c 0a 31 20 3d 3d 3d 20 | 's',.count($updateNames),.1.===. |
b86e0 | 63 6f 75 6e 74 28 24 75 70 64 61 74 65 4e 61 6d 65 73 29 20 3f 20 27 27 20 3a 20 27 73 27 2c 0a | count($updateNames).?.''.:.'s',. |
b8700 | 63 6f 75 6e 74 28 24 75 6e 69 6e 73 74 61 6c 6c 73 29 2c 0a 31 20 3d 3d 3d 20 63 6f 75 6e 74 28 | count($uninstalls),.1.===.count( |
b8720 | 24 75 6e 69 6e 73 74 61 6c 6c 73 29 20 3f 20 27 27 20 3a 20 27 73 27 0a 29 29 3b 0a 69 66 20 28 | $uninstalls).?.''.:.'s'.));.if.( |
b8740 | 24 69 6e 73 74 61 6c 6c 4e 61 6d 65 73 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 | $installNames).{.$this->io->writ |
b8760 | 65 45 72 72 6f 72 28 22 49 6e 73 74 61 6c 6c 73 3a 20 22 2e 69 6d 70 6c 6f 64 65 28 27 2c 20 27 | eError("Installs:.".implode(',.' |
b8780 | 2c 20 24 69 6e 73 74 61 6c 6c 4e 61 6d 65 73 29 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 | ,.$installNames),.true,.IOInterf |
b87a0 | 61 63 65 3a 3a 56 45 52 42 4f 53 45 29 3b 0a 7d 0a 69 66 20 28 24 75 70 64 61 74 65 4e 61 6d 65 | ace::VERBOSE);.}.if.($updateName |
b87c0 | 73 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 22 55 70 64 61 | s).{.$this->io->writeError("Upda |
b87e0 | 74 65 73 3a 20 22 2e 69 6d 70 6c 6f 64 65 28 27 2c 20 27 2c 20 24 75 70 64 61 74 65 4e 61 6d 65 | tes:.".implode(',.',.$updateName |
b8800 | 73 29 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 3a 3a 56 45 52 42 4f 53 45 29 3b | s),.true,.IOInterface::VERBOSE); |
b8820 | 0a 7d 0a 69 66 20 28 24 75 6e 69 6e 73 74 61 6c 6c 73 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d | .}.if.($uninstalls).{.$this->io- |
b8840 | 3e 77 72 69 74 65 45 72 72 6f 72 28 22 52 65 6d 6f 76 61 6c 73 3a 20 22 2e 69 6d 70 6c 6f 64 65 | >writeError("Removals:.".implode |
b8860 | 28 27 2c 20 27 2c 20 24 75 6e 69 6e 73 74 61 6c 6c 4e 61 6d 65 73 29 2c 20 74 72 75 65 2c 20 49 | (',.',.$uninstallNames),.true,.I |
b8880 | 4f 49 6e 74 65 72 66 61 63 65 3a 3a 56 45 52 42 4f 53 45 29 3b 0a 7d 0a 7d 0a 7d 0a 0a 24 73 6f | OInterface::VERBOSE);.}.}.}..$so |
b88a0 | 72 74 42 79 4e 61 6d 65 20 3d 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 61 2c 20 | rtByName.=.static.function.($a,. |
b88c0 | 24 62 29 3a 20 69 6e 74 20 7b 0a 69 66 20 28 24 61 20 69 6e 73 74 61 6e 63 65 6f 66 20 55 70 64 | $b):.int.{.if.($a.instanceof.Upd |
b88e0 | 61 74 65 4f 70 65 72 61 74 69 6f 6e 29 20 7b 0a 24 61 20 3d 20 24 61 2d 3e 67 65 74 54 61 72 67 | ateOperation).{.$a.=.$a->getTarg |
b8900 | 65 74 50 61 63 6b 61 67 65 28 29 2d 3e 67 65 74 4e 61 6d 65 28 29 3b 0a 7d 20 65 6c 73 65 20 7b | etPackage()->getName();.}.else.{ |
b8920 | 0a 24 61 20 3d 20 24 61 2d 3e 67 65 74 50 61 63 6b 61 67 65 28 29 2d 3e 67 65 74 4e 61 6d 65 28 | .$a.=.$a->getPackage()->getName( |
b8940 | 29 3b 0a 7d 0a 69 66 20 28 24 62 20 69 6e 73 74 61 6e 63 65 6f 66 20 55 70 64 61 74 65 4f 70 65 | );.}.if.($b.instanceof.UpdateOpe |
b8960 | 72 61 74 69 6f 6e 29 20 7b 0a 24 62 20 3d 20 24 62 2d 3e 67 65 74 54 61 72 67 65 74 50 61 63 6b | ration).{.$b.=.$b->getTargetPack |
b8980 | 61 67 65 28 29 2d 3e 67 65 74 4e 61 6d 65 28 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 62 20 3d 20 | age()->getName();.}.else.{.$b.=. |
b89a0 | 24 62 2d 3e 67 65 74 50 61 63 6b 61 67 65 28 29 2d 3e 67 65 74 4e 61 6d 65 28 29 3b 0a 7d 0a 0a | $b->getPackage()->getName();.}.. |
b89c0 | 72 65 74 75 72 6e 20 73 74 72 63 6d 70 28 24 61 2c 20 24 62 29 3b 0a 7d 3b 0a 75 73 6f 72 74 28 | return.strcmp($a,.$b);.};.usort( |
b89e0 | 24 75 6e 69 6e 73 74 61 6c 6c 73 2c 20 24 73 6f 72 74 42 79 4e 61 6d 65 29 3b 0a 75 73 6f 72 74 | $uninstalls,.$sortByName);.usort |
b8a00 | 28 24 69 6e 73 74 61 6c 6c 73 55 70 64 61 74 65 73 2c 20 24 73 6f 72 74 42 79 4e 61 6d 65 29 3b | ($installsUpdates,.$sortByName); |
b8a20 | 0a 0a 66 6f 72 65 61 63 68 20 28 61 72 72 61 79 5f 6d 65 72 67 65 28 24 75 6e 69 6e 73 74 61 6c | ..foreach.(array_merge($uninstal |
b8a40 | 6c 73 2c 20 24 69 6e 73 74 61 6c 6c 73 55 70 64 61 74 65 73 29 20 61 73 20 24 6f 70 65 72 61 74 | ls,.$installsUpdates).as.$operat |
b8a60 | 69 6f 6e 29 20 7b 0a 0a 69 66 20 28 24 6f 70 65 72 61 74 69 6f 6e 20 69 6e 73 74 61 6e 63 65 6f | ion).{..if.($operation.instanceo |
b8a80 | 66 20 49 6e 73 74 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 29 20 7b 0a 24 74 68 69 73 2d 3e 73 75 67 | f.InstallOperation).{.$this->sug |
b8aa0 | 67 65 73 74 65 64 50 61 63 6b 61 67 65 73 52 65 70 6f 72 74 65 72 2d 3e 61 64 64 53 75 67 67 65 | gestedPackagesReporter->addSugge |
b8ac0 | 73 74 69 6f 6e 73 46 72 6f 6d 50 61 63 6b 61 67 65 28 24 6f 70 65 72 61 74 69 6f 6e 2d 3e 67 65 | stionsFromPackage($operation->ge |
b8ae0 | 74 50 61 63 6b 61 67 65 28 29 29 3b 0a 7d 0a 0a 0a 69 66 20 28 24 74 68 69 73 2d 3e 63 6f 6e 66 | tPackage());.}...if.($this->conf |
b8b00 | 69 67 2d 3e 67 65 74 28 27 6c 6f 63 6b 27 29 20 26 26 20 28 66 61 6c 73 65 20 3d 3d 3d 20 73 74 | ig->get('lock').&&.(false.===.st |
b8b20 | 72 70 6f 73 28 24 6f 70 65 72 61 74 69 6f 6e 2d 3e 67 65 74 4f 70 65 72 61 74 69 6f 6e 54 79 70 | rpos($operation->getOperationTyp |
b8b40 | 65 28 29 2c 20 27 41 6c 69 61 73 27 29 20 7c 7c 20 24 74 68 69 73 2d 3e 69 6f 2d 3e 69 73 44 65 | e(),.'Alias').||.$this->io->isDe |
b8b60 | 62 75 67 28 29 29 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 | bug())).{.$this->io->writeError( |
b8b80 | 27 20 20 2d 20 27 20 2e 20 24 6f 70 65 72 61 74 69 6f 6e 2d 3e 73 68 6f 77 28 74 72 75 65 29 29 | '..-.'...$operation->show(true)) |
b8ba0 | 3b 0a 7d 0a 7d 0a 0a 24 75 70 64 61 74 65 64 4c 6f 63 6b 20 3d 20 24 74 68 69 73 2d 3e 6c 6f 63 | ;.}.}..$updatedLock.=.$this->loc |
b8bc0 | 6b 65 72 2d 3e 73 65 74 4c 6f 63 6b 44 61 74 61 28 0a 24 6c 6f 63 6b 54 72 61 6e 73 61 63 74 69 | ker->setLockData(.$lockTransacti |
b8be0 | 6f 6e 2d 3e 67 65 74 4e 65 77 4c 6f 63 6b 50 61 63 6b 61 67 65 73 28 66 61 6c 73 65 2c 20 24 74 | on->getNewLockPackages(false,.$t |
b8c00 | 68 69 73 2d 3e 75 70 64 61 74 65 4d 69 72 72 6f 72 73 29 2c 0a 24 6c 6f 63 6b 54 72 61 6e 73 61 | his->updateMirrors),.$lockTransa |
b8c20 | 63 74 69 6f 6e 2d 3e 67 65 74 4e 65 77 4c 6f 63 6b 50 61 63 6b 61 67 65 73 28 74 72 75 65 2c 20 | ction->getNewLockPackages(true,. |
b8c40 | 24 74 68 69 73 2d 3e 75 70 64 61 74 65 4d 69 72 72 6f 72 73 29 2c 0a 24 70 6c 61 74 66 6f 72 6d | $this->updateMirrors),.$platform |
b8c60 | 52 65 71 73 2c 0a 24 70 6c 61 74 66 6f 72 6d 44 65 76 52 65 71 73 2c 0a 24 6c 6f 63 6b 54 72 61 | Reqs,.$platformDevReqs,.$lockTra |
b8c80 | 6e 73 61 63 74 69 6f 6e 2d 3e 67 65 74 41 6c 69 61 73 65 73 28 24 61 6c 69 61 73 65 73 29 2c 0a | nsaction->getAliases($aliases),. |
b8ca0 | 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 2d 3e 67 65 74 4d 69 6e 69 6d 75 6d 53 74 61 62 69 6c | $this->package->getMinimumStabil |
b8cc0 | 69 74 79 28 29 2c 0a 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 2d 3e 67 65 74 53 74 61 62 69 6c | ity(),.$this->package->getStabil |
b8ce0 | 69 74 79 46 6c 61 67 73 28 29 2c 0a 24 74 68 69 73 2d 3e 70 72 65 66 65 72 53 74 61 62 6c 65 20 | ityFlags(),.$this->preferStable. |
b8d00 | 7c 7c 20 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 66 65 72 53 74 61 62 | ||.$this->package->getPreferStab |
b8d20 | 6c 65 28 29 2c 0a 24 74 68 69 73 2d 3e 70 72 65 66 65 72 4c 6f 77 65 73 74 2c 0a 24 74 68 69 73 | le(),.$this->preferLowest,.$this |
b8d40 | 2d 3e 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 70 6c 61 74 66 6f 72 6d 27 29 20 3f 3a 20 5b 5d 2c | ->config->get('platform').?:.[], |
b8d60 | 0a 24 74 68 69 73 2d 3e 77 72 69 74 65 4c 6f 63 6b 20 26 26 20 24 74 68 69 73 2d 3e 65 78 65 63 | .$this->writeLock.&&.$this->exec |
b8d80 | 75 74 65 4f 70 65 72 61 74 69 6f 6e 73 0a 29 3b 0a 69 66 20 28 24 75 70 64 61 74 65 64 4c 6f 63 | uteOperations.);.if.($updatedLoc |
b8da0 | 6b 20 26 26 20 24 74 68 69 73 2d 3e 77 72 69 74 65 4c 6f 63 6b 20 26 26 20 24 74 68 69 73 2d 3e | k.&&.$this->writeLock.&&.$this-> |
b8dc0 | 65 78 65 63 75 74 65 4f 70 65 72 61 74 69 6f 6e 73 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e | executeOperations).{.$this->io-> |
b8de0 | 77 72 69 74 65 45 72 72 6f 72 28 27 3c 69 6e 66 6f 3e 57 72 69 74 69 6e 67 20 6c 6f 63 6b 20 66 | writeError('<info>Writing.lock.f |
b8e00 | 69 6c 65 3c 2f 69 6e 66 6f 3e 27 29 3b 0a 7d 0a 0a 0a 69 66 20 28 24 74 68 69 73 2d 3e 65 78 65 | ile</info>');.}...if.($this->exe |
b8e20 | 63 75 74 65 4f 70 65 72 61 74 69 6f 6e 73 20 26 26 20 63 6f 75 6e 74 28 24 6c 6f 63 6b 54 72 61 | cuteOperations.&&.count($lockTra |
b8e40 | 6e 73 61 63 74 69 6f 6e 2d 3e 67 65 74 4f 70 65 72 61 74 69 6f 6e 73 28 29 29 20 3e 20 30 29 20 | nsaction->getOperations()).>.0). |
b8e60 | 7b 0a 24 76 65 6e 64 6f 72 44 69 72 20 3d 20 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 2d 3e 67 65 | {.$vendorDir.=.$this->config->ge |
b8e80 | 74 28 27 76 65 6e 64 6f 72 2d 64 69 72 27 29 3b 0a 69 66 20 28 69 73 5f 64 69 72 28 24 76 65 6e | t('vendor-dir');.if.(is_dir($ven |
b8ea0 | 64 6f 72 44 69 72 29 29 20 7b 0a 0a 0a 40 74 6f 75 63 68 28 24 76 65 6e 64 6f 72 44 69 72 29 3b | dorDir)).{...@touch($vendorDir); |
b8ec0 | 0a 7d 0a 7d 0a 0a 69 66 20 28 24 64 6f 49 6e 73 74 61 6c 6c 29 20 7b 0a 0a 72 65 74 75 72 6e 20 | .}.}..if.($doInstall).{..return. |
b8ee0 | 24 74 68 69 73 2d 3e 64 6f 49 6e 73 74 61 6c 6c 28 24 6c 6f 63 61 6c 52 65 70 6f 2c 20 74 72 75 | $this->doInstall($localRepo,.tru |
b8f00 | 65 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 72 | e);.}..return.0;.}............pr |
b8f20 | 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 65 78 74 72 61 63 74 44 65 76 50 61 63 6b 61 | otected.function.extractDevPacka |
b8f40 | 67 65 73 28 4c 6f 63 6b 54 72 61 6e 73 61 63 74 69 6f 6e 20 24 6c 6f 63 6b 54 72 61 6e 73 61 63 | ges(LockTransaction.$lockTransac |
b8f60 | 74 69 6f 6e 2c 20 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 20 24 70 6c 61 74 66 6f | tion,.PlatformRepository.$platfo |
b8f80 | 72 6d 52 65 70 6f 2c 20 61 72 72 61 79 20 24 61 6c 69 61 73 65 73 2c 20 50 6f 6c 69 63 79 49 6e | rmRepo,.array.$aliases,.PolicyIn |
b8fa0 | 74 65 72 66 61 63 65 20 24 70 6f 6c 69 63 79 2c 20 3f 4c 6f 63 6b 41 72 72 61 79 52 65 70 6f 73 | terface.$policy,.?LockArrayRepos |
b8fc0 | 69 74 6f 72 79 20 24 6c 6f 63 6b 65 64 52 65 70 6f 73 69 74 6f 72 79 20 3d 20 6e 75 6c 6c 29 3a | itory.$lockedRepository.=.null): |
b8fe0 | 20 69 6e 74 0a 7b 0a 69 66 20 28 21 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 2d 3e 67 65 74 44 | .int.{.if.(!$this->package->getD |
b9000 | 65 76 52 65 71 75 69 72 65 73 28 29 29 20 7b 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 0a 24 72 65 | evRequires()).{.return.0;.}..$re |
b9020 | 73 75 6c 74 52 65 70 6f 20 3d 20 6e 65 77 20 41 72 72 61 79 52 65 70 6f 73 69 74 6f 72 79 28 5b | sultRepo.=.new.ArrayRepository([ |
b9040 | 5d 29 3b 0a 24 6c 6f 61 64 65 72 20 3d 20 6e 65 77 20 41 72 72 61 79 4c 6f 61 64 65 72 28 6e 75 | ]);.$loader.=.new.ArrayLoader(nu |
b9060 | 6c 6c 2c 20 74 72 75 65 29 3b 0a 24 64 75 6d 70 65 72 20 3d 20 6e 65 77 20 41 72 72 61 79 44 75 | ll,.true);.$dumper.=.new.ArrayDu |
b9080 | 6d 70 65 72 28 29 3b 0a 66 6f 72 65 61 63 68 20 28 24 6c 6f 63 6b 54 72 61 6e 73 61 63 74 69 6f | mper();.foreach.($lockTransactio |
b90a0 | 6e 2d 3e 67 65 74 4e 65 77 4c 6f 63 6b 50 61 63 6b 61 67 65 73 28 66 61 6c 73 65 29 20 61 73 20 | n->getNewLockPackages(false).as. |
b90c0 | 24 70 6b 67 29 20 7b 0a 24 72 65 73 75 6c 74 52 65 70 6f 2d 3e 61 64 64 50 61 63 6b 61 67 65 28 | $pkg).{.$resultRepo->addPackage( |
b90e0 | 24 6c 6f 61 64 65 72 2d 3e 6c 6f 61 64 28 24 64 75 6d 70 65 72 2d 3e 64 75 6d 70 28 24 70 6b 67 | $loader->load($dumper->dump($pkg |
b9100 | 29 29 29 3b 0a 7d 0a 0a 24 72 65 70 6f 73 69 74 6f 72 79 53 65 74 20 3d 20 24 74 68 69 73 2d 3e | )));.}..$repositorySet.=.$this-> |
b9120 | 63 72 65 61 74 65 52 65 70 6f 73 69 74 6f 72 79 53 65 74 28 74 72 75 65 2c 20 24 70 6c 61 74 66 | createRepositorySet(true,.$platf |
b9140 | 6f 72 6d 52 65 70 6f 2c 20 24 61 6c 69 61 73 65 73 29 3b 0a 24 72 65 70 6f 73 69 74 6f 72 79 53 | ormRepo,.$aliases);.$repositoryS |
b9160 | 65 74 2d 3e 61 64 64 52 65 70 6f 73 69 74 6f 72 79 28 24 72 65 73 75 6c 74 52 65 70 6f 29 3b 0a | et->addRepository($resultRepo);. |
b9180 | 0a 24 72 65 71 75 65 73 74 20 3d 20 24 74 68 69 73 2d 3e 63 72 65 61 74 65 52 65 71 75 65 73 74 | .$request.=.$this->createRequest |
b91a0 | 28 24 74 68 69 73 2d 3e 66 69 78 65 64 52 6f 6f 74 50 61 63 6b 61 67 65 2c 20 24 70 6c 61 74 66 | ($this->fixedRootPackage,.$platf |
b91c0 | 6f 72 6d 52 65 70 6f 29 3b 0a 24 74 68 69 73 2d 3e 72 65 71 75 69 72 65 50 61 63 6b 61 67 65 73 | ormRepo);.$this->requirePackages |
b91e0 | 46 6f 72 55 70 64 61 74 65 28 24 72 65 71 75 65 73 74 2c 20 24 6c 6f 63 6b 65 64 52 65 70 6f 73 | ForUpdate($request,.$lockedRepos |
b9200 | 69 74 6f 72 79 2c 20 66 61 6c 73 65 29 3b 0a 0a 24 70 6f 6f 6c 20 3d 20 24 72 65 70 6f 73 69 74 | itory,.false);..$pool.=.$reposit |
b9220 | 6f 72 79 53 65 74 2d 3e 63 72 65 61 74 65 50 6f 6f 6c 57 69 74 68 41 6c 6c 50 61 63 6b 61 67 65 | orySet->createPoolWithAllPackage |
b9240 | 73 28 29 3b 0a 0a 24 73 6f 6c 76 65 72 20 3d 20 6e 65 77 20 53 6f 6c 76 65 72 28 24 70 6f 6c 69 | s();..$solver.=.new.Solver($poli |
b9260 | 63 79 2c 20 24 70 6f 6f 6c 2c 20 24 74 68 69 73 2d 3e 69 6f 29 3b 0a 74 72 79 20 7b 0a 24 6e 6f | cy,.$pool,.$this->io);.try.{.$no |
b9280 | 6e 44 65 76 4c 6f 63 6b 54 72 61 6e 73 61 63 74 69 6f 6e 20 3d 20 24 73 6f 6c 76 65 72 2d 3e 73 | nDevLockTransaction.=.$solver->s |
b92a0 | 6f 6c 76 65 28 24 72 65 71 75 65 73 74 2c 20 24 74 68 69 73 2d 3e 70 6c 61 74 66 6f 72 6d 52 65 | olve($request,.$this->platformRe |
b92c0 | 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 29 3b 0a 24 73 6f 6c 76 65 72 20 3d 20 6e 75 6c 6c | quirementFilter);.$solver.=.null |
b92e0 | 3b 0a 7d 20 63 61 74 63 68 20 28 53 6f 6c 76 65 72 50 72 6f 62 6c 65 6d 73 45 78 63 65 70 74 69 | ;.}.catch.(SolverProblemsExcepti |
b9300 | 6f 6e 20 24 65 29 20 7b 0a 24 65 72 72 20 3d 20 27 55 6e 61 62 6c 65 20 74 6f 20 66 69 6e 64 20 | on.$e).{.$err.=.'Unable.to.find. |
b9320 | 61 20 63 6f 6d 70 61 74 69 62 6c 65 20 73 65 74 20 6f 66 20 70 61 63 6b 61 67 65 73 20 62 61 73 | a.compatible.set.of.packages.bas |
b9340 | 65 64 20 6f 6e 20 79 6f 75 72 20 6e 6f 6e 2d 64 65 76 20 72 65 71 75 69 72 65 6d 65 6e 74 73 20 | ed.on.your.non-dev.requirements. |
b9360 | 61 6c 6f 6e 65 2e 27 3b 0a 24 70 72 65 74 74 79 50 72 6f 62 6c 65 6d 20 3d 20 24 65 2d 3e 67 65 | alone.';.$prettyProblem.=.$e->ge |
b9380 | 74 50 72 65 74 74 79 53 74 72 69 6e 67 28 24 72 65 70 6f 73 69 74 6f 72 79 53 65 74 2c 20 24 72 | tPrettyString($repositorySet,.$r |
b93a0 | 65 71 75 65 73 74 2c 20 24 70 6f 6f 6c 2c 20 24 74 68 69 73 2d 3e 69 6f 2d 3e 69 73 56 65 72 62 | equest,.$pool,.$this->io->isVerb |
b93c0 | 6f 73 65 28 29 2c 20 74 72 75 65 29 3b 0a 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 | ose(),.true);..$this->io->writeE |
b93e0 | 72 72 6f 72 28 27 3c 65 72 72 6f 72 3e 27 2e 20 24 65 72 72 20 2e 27 3c 2f 65 72 72 6f 72 3e 27 | rror('<error>'..$err..'</error>' |
b9400 | 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 3a 3a 51 55 49 45 54 29 3b 0a 24 74 68 | ,.true,.IOInterface::QUIET);.$th |
b9420 | 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 59 6f 75 72 20 72 65 71 75 69 72 65 | is->io->writeError('Your.require |
b9440 | 6d 65 6e 74 73 20 63 61 6e 20 62 65 20 72 65 73 6f 6c 76 65 64 20 73 75 63 63 65 73 73 66 75 6c | ments.can.be.resolved.successful |
b9460 | 6c 79 20 77 68 65 6e 20 72 65 71 75 69 72 65 2d 64 65 76 20 70 61 63 6b 61 67 65 73 20 61 72 65 | ly.when.require-dev.packages.are |
b9480 | 20 70 72 65 73 65 6e 74 2e 27 29 3b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 | .present.');.$this->io->writeErr |
b94a0 | 6f 72 28 27 59 6f 75 20 6d 61 79 20 6e 65 65 64 20 74 6f 20 6d 6f 76 65 20 70 61 63 6b 61 67 65 | or('You.may.need.to.move.package |
b94c0 | 73 20 66 72 6f 6d 20 72 65 71 75 69 72 65 2d 64 65 76 20 6f 72 20 73 6f 6d 65 20 6f 66 20 74 68 | s.from.require-dev.or.some.of.th |
b94e0 | 65 69 72 20 64 65 70 65 6e 64 65 6e 63 69 65 73 20 74 6f 20 72 65 71 75 69 72 65 2e 27 29 3b 0a | eir.dependencies.to.require.');. |
b9500 | 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 24 70 72 65 74 74 79 50 72 6f | $this->io->writeError($prettyPro |
b9520 | 62 6c 65 6d 29 3b 0a 0a 24 67 68 65 20 3d 20 6e 65 77 20 47 69 74 68 75 62 41 63 74 69 6f 6e 45 | blem);..$ghe.=.new.GithubActionE |
b9540 | 72 72 6f 72 28 24 74 68 69 73 2d 3e 69 6f 29 3b 0a 24 67 68 65 2d 3e 65 6d 69 74 28 24 65 72 72 | rror($this->io);.$ghe->emit($err |
b9560 | 2e 22 5c 6e 22 2e 24 70 72 65 74 74 79 50 72 6f 62 6c 65 6d 29 3b 0a 0a 72 65 74 75 72 6e 20 24 | ."\n".$prettyProblem);..return.$ |
b9580 | 65 2d 3e 67 65 74 43 6f 64 65 28 29 3b 0a 7d 0a 0a 24 6c 6f 63 6b 54 72 61 6e 73 61 63 74 69 6f | e->getCode();.}..$lockTransactio |
b95a0 | 6e 2d 3e 73 65 74 4e 6f 6e 44 65 76 50 61 63 6b 61 67 65 73 28 24 6e 6f 6e 44 65 76 4c 6f 63 6b | n->setNonDevPackages($nonDevLock |
b95c0 | 54 72 61 6e 73 61 63 74 69 6f 6e 29 3b 0a 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 0a 0a 0a 0a 0a | Transaction);..return.0;.}...... |
b95e0 | 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 64 6f 49 6e 73 74 61 6c 6c 28 49 6e | .protected.function.doInstall(In |
b9600 | 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 20 24 6c 6f 63 61 | stalledRepositoryInterface.$loca |
b9620 | 6c 52 65 70 6f 2c 20 62 6f 6f 6c 20 24 61 6c 72 65 61 64 79 53 6f 6c 76 65 64 20 3d 20 66 61 6c | lRepo,.bool.$alreadySolved.=.fal |
b9640 | 73 65 29 3a 20 69 6e 74 0a 7b 0a 69 66 20 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 2d 3e 67 65 | se):.int.{.if.($this->config->ge |
b9660 | 74 28 27 6c 6f 63 6b 27 29 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 | t('lock')).{.$this->io->writeErr |
b9680 | 6f 72 28 27 3c 69 6e 66 6f 3e 49 6e 73 74 61 6c 6c 69 6e 67 20 64 65 70 65 6e 64 65 6e 63 69 65 | or('<info>Installing.dependencie |
b96a0 | 73 20 66 72 6f 6d 20 6c 6f 63 6b 20 66 69 6c 65 27 2e 28 24 74 68 69 73 2d 3e 64 65 76 4d 6f 64 | s.from.lock.file'.($this->devMod |
b96c0 | 65 20 3f 20 27 20 28 69 6e 63 6c 75 64 69 6e 67 20 72 65 71 75 69 72 65 2d 64 65 76 29 27 20 3a | e.?.'.(including.require-dev)'.: |
b96e0 | 20 27 27 29 2e 27 3c 2f 69 6e 66 6f 3e 27 29 3b 0a 7d 0a 0a 24 6c 6f 63 6b 65 64 52 65 70 6f 73 | .'').'</info>');.}..$lockedRepos |
b9700 | 69 74 6f 72 79 20 3d 20 24 74 68 69 73 2d 3e 6c 6f 63 6b 65 72 2d 3e 67 65 74 4c 6f 63 6b 65 64 | itory.=.$this->locker->getLocked |
b9720 | 52 65 70 6f 73 69 74 6f 72 79 28 24 74 68 69 73 2d 3e 64 65 76 4d 6f 64 65 29 3b 0a 0a 0a 0a 69 | Repository($this->devMode);....i |
b9740 | 66 20 28 21 24 61 6c 72 65 61 64 79 53 6f 6c 76 65 64 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d | f.(!$alreadySolved).{.$this->io- |
b9760 | 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 69 6e 66 6f 3e 56 65 72 69 66 79 69 6e 67 20 6c 6f 63 | >writeError('<info>Verifying.loc |
b9780 | 6b 20 66 69 6c 65 20 63 6f 6e 74 65 6e 74 73 20 63 61 6e 20 62 65 20 69 6e 73 74 61 6c 6c 65 64 | k.file.contents.can.be.installed |
b97a0 | 20 6f 6e 20 63 75 72 72 65 6e 74 20 70 6c 61 74 66 6f 72 6d 2e 3c 2f 69 6e 66 6f 3e 27 29 3b 0a | .on.current.platform.</info>');. |
b97c0 | 0a 24 70 6c 61 74 66 6f 72 6d 52 65 70 6f 20 3d 20 24 74 68 69 73 2d 3e 63 72 65 61 74 65 50 6c | .$platformRepo.=.$this->createPl |
b97e0 | 61 74 66 6f 72 6d 52 65 70 6f 28 66 61 6c 73 65 29 3b 0a 0a 24 70 6f 6c 69 63 79 20 3d 20 24 74 | atformRepo(false);..$policy.=.$t |
b9800 | 68 69 73 2d 3e 63 72 65 61 74 65 50 6f 6c 69 63 79 28 66 61 6c 73 65 29 3b 0a 0a 24 72 65 70 6f | his->createPolicy(false);..$repo |
b9820 | 73 69 74 6f 72 79 53 65 74 20 3d 20 24 74 68 69 73 2d 3e 63 72 65 61 74 65 52 65 70 6f 73 69 74 | sitorySet.=.$this->createReposit |
b9840 | 6f 72 79 53 65 74 28 66 61 6c 73 65 2c 20 24 70 6c 61 74 66 6f 72 6d 52 65 70 6f 2c 20 5b 5d 2c | orySet(false,.$platformRepo,.[], |
b9860 | 20 24 6c 6f 63 6b 65 64 52 65 70 6f 73 69 74 6f 72 79 29 3b 0a 24 72 65 70 6f 73 69 74 6f 72 79 | .$lockedRepository);.$repository |
b9880 | 53 65 74 2d 3e 61 64 64 52 65 70 6f 73 69 74 6f 72 79 28 24 6c 6f 63 6b 65 64 52 65 70 6f 73 69 | Set->addRepository($lockedReposi |
b98a0 | 74 6f 72 79 29 3b 0a 0a 0a 24 72 65 71 75 65 73 74 20 3d 20 24 74 68 69 73 2d 3e 63 72 65 61 74 | tory);...$request.=.$this->creat |
b98c0 | 65 52 65 71 75 65 73 74 28 24 74 68 69 73 2d 3e 66 69 78 65 64 52 6f 6f 74 50 61 63 6b 61 67 65 | eRequest($this->fixedRootPackage |
b98e0 | 2c 20 24 70 6c 61 74 66 6f 72 6d 52 65 70 6f 2c 20 24 6c 6f 63 6b 65 64 52 65 70 6f 73 69 74 6f | ,.$platformRepo,.$lockedReposito |
b9900 | 72 79 29 3b 0a 0a 69 66 20 28 21 24 74 68 69 73 2d 3e 6c 6f 63 6b 65 72 2d 3e 69 73 46 72 65 73 | ry);..if.(!$this->locker->isFres |
b9920 | 68 28 29 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 77 | h()).{.$this->io->writeError('<w |
b9940 | 61 72 6e 69 6e 67 3e 57 61 72 6e 69 6e 67 3a 20 54 68 65 20 6c 6f 63 6b 20 66 69 6c 65 20 69 73 | arning>Warning:.The.lock.file.is |
b9960 | 20 6e 6f 74 20 75 70 20 74 6f 20 64 61 74 65 20 77 69 74 68 20 74 68 65 20 6c 61 74 65 73 74 20 | .not.up.to.date.with.the.latest. |
b9980 | 63 68 61 6e 67 65 73 20 69 6e 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 2e 20 59 6f 75 20 6d 61 | changes.in.composer.json..You.ma |
b99a0 | 79 20 62 65 20 67 65 74 74 69 6e 67 20 6f 75 74 64 61 74 65 64 20 64 65 70 65 6e 64 65 6e 63 69 | y.be.getting.outdated.dependenci |
b99c0 | 65 73 2e 20 49 74 20 69 73 20 72 65 63 6f 6d 6d 65 6e 64 65 64 20 74 68 61 74 20 79 6f 75 20 72 | es..It.is.recommended.that.you.r |
b99e0 | 75 6e 20 60 63 6f 6d 70 6f 73 65 72 20 75 70 64 61 74 65 60 20 6f 72 20 60 63 6f 6d 70 6f 73 65 | un.`composer.update`.or.`compose |
b9a00 | 72 20 75 70 64 61 74 65 20 3c 70 61 63 6b 61 67 65 20 6e 61 6d 65 3e 60 2e 3c 2f 77 61 72 6e 69 | r.update.<package.name>`.</warni |
b9a20 | 6e 67 3e 27 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 3a 3a 51 55 49 45 54 29 3b | ng>',.true,.IOInterface::QUIET); |
b9a40 | 0a 7d 0a 0a 66 6f 72 65 61 63 68 20 28 24 6c 6f 63 6b 65 64 52 65 70 6f 73 69 74 6f 72 79 2d 3e | .}..foreach.($lockedRepository-> |
b9a60 | 67 65 74 50 61 63 6b 61 67 65 73 28 29 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 24 72 65 | getPackages().as.$package).{.$re |
b9a80 | 71 75 65 73 74 2d 3e 66 69 78 4c 6f 63 6b 65 64 50 61 63 6b 61 67 65 28 24 70 61 63 6b 61 67 65 | quest->fixLockedPackage($package |
b9aa0 | 29 3b 0a 7d 0a 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 6c 6f 63 6b 65 72 2d 3e 67 65 | );.}..foreach.($this->locker->ge |
b9ac0 | 74 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 73 28 24 74 68 69 73 2d 3e 64 65 76 | tPlatformRequirements($this->dev |
b9ae0 | 4d 6f 64 65 29 20 61 73 20 24 6c 69 6e 6b 29 20 7b 0a 24 72 65 71 75 65 73 74 2d 3e 72 65 71 75 | Mode).as.$link).{.$request->requ |
b9b00 | 69 72 65 4e 61 6d 65 28 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 74 28 29 2c 20 24 6c 69 6e | ireName($link->getTarget(),.$lin |
b9b20 | 6b 2d 3e 67 65 74 43 6f 6e 73 74 72 61 69 6e 74 28 29 29 3b 0a 7d 0a 0a 24 70 6f 6f 6c 20 3d 20 | k->getConstraint());.}..$pool.=. |
b9b40 | 24 72 65 70 6f 73 69 74 6f 72 79 53 65 74 2d 3e 63 72 65 61 74 65 50 6f 6f 6c 28 24 72 65 71 75 | $repositorySet->createPool($requ |
b9b60 | 65 73 74 2c 20 24 74 68 69 73 2d 3e 69 6f 2c 20 24 74 68 69 73 2d 3e 65 76 65 6e 74 44 69 73 70 | est,.$this->io,.$this->eventDisp |
b9b80 | 61 74 63 68 65 72 29 3b 0a 0a 0a 24 73 6f 6c 76 65 72 20 3d 20 6e 65 77 20 53 6f 6c 76 65 72 28 | atcher);...$solver.=.new.Solver( |
b9ba0 | 24 70 6f 6c 69 63 79 2c 20 24 70 6f 6f 6c 2c 20 24 74 68 69 73 2d 3e 69 6f 29 3b 0a 74 72 79 20 | $policy,.$pool,.$this->io);.try. |
b9bc0 | 7b 0a 24 6c 6f 63 6b 54 72 61 6e 73 61 63 74 69 6f 6e 20 3d 20 24 73 6f 6c 76 65 72 2d 3e 73 6f | {.$lockTransaction.=.$solver->so |
b9be0 | 6c 76 65 28 24 72 65 71 75 65 73 74 2c 20 24 74 68 69 73 2d 3e 70 6c 61 74 66 6f 72 6d 52 65 71 | lve($request,.$this->platformReq |
b9c00 | 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 29 3b 0a 24 73 6f 6c 76 65 72 20 3d 20 6e 75 6c 6c 3b | uirementFilter);.$solver.=.null; |
b9c20 | 0a 0a 0a 69 66 20 28 30 20 21 3d 3d 20 63 6f 75 6e 74 28 24 6c 6f 63 6b 54 72 61 6e 73 61 63 74 | ...if.(0.!==.count($lockTransact |
b9c40 | 69 6f 6e 2d 3e 67 65 74 4f 70 65 72 61 74 69 6f 6e 73 28 29 29 29 20 7b 0a 24 74 68 69 73 2d 3e | ion->getOperations())).{.$this-> |
b9c60 | 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 65 72 72 6f 72 3e 59 6f 75 72 20 6c 6f 63 6b | io->writeError('<error>Your.lock |
b9c80 | 20 66 69 6c 65 20 63 61 6e 6e 6f 74 20 62 65 20 69 6e 73 74 61 6c 6c 65 64 20 6f 6e 20 74 68 69 | .file.cannot.be.installed.on.thi |
b9ca0 | 73 20 73 79 73 74 65 6d 20 77 69 74 68 6f 75 74 20 63 68 61 6e 67 65 73 2e 20 50 6c 65 61 73 65 | s.system.without.changes..Please |
b9cc0 | 20 72 75 6e 20 63 6f 6d 70 6f 73 65 72 20 75 70 64 61 74 65 2e 3c 2f 65 72 72 6f 72 3e 27 2c 20 | .run.composer.update.</error>',. |
b9ce0 | 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 3a 3a 51 55 49 45 54 29 3b 0a 0a 72 65 74 75 | true,.IOInterface::QUIET);..retu |
b9d00 | 72 6e 20 73 65 6c 66 3a 3a 45 52 52 4f 52 5f 4c 4f 43 4b 5f 46 49 4c 45 5f 49 4e 56 41 4c 49 44 | rn.self::ERROR_LOCK_FILE_INVALID |
b9d20 | 3b 0a 7d 0a 7d 20 63 61 74 63 68 20 28 53 6f 6c 76 65 72 50 72 6f 62 6c 65 6d 73 45 78 63 65 70 | ;.}.}.catch.(SolverProblemsExcep |
b9d40 | 74 69 6f 6e 20 24 65 29 20 7b 0a 24 65 72 72 20 3d 20 27 59 6f 75 72 20 6c 6f 63 6b 20 66 69 6c | tion.$e).{.$err.=.'Your.lock.fil |
b9d60 | 65 20 64 6f 65 73 20 6e 6f 74 20 63 6f 6e 74 61 69 6e 20 61 20 63 6f 6d 70 61 74 69 62 6c 65 20 | e.does.not.contain.a.compatible. |
b9d80 | 73 65 74 20 6f 66 20 70 61 63 6b 61 67 65 73 2e 20 50 6c 65 61 73 65 20 72 75 6e 20 63 6f 6d 70 | set.of.packages..Please.run.comp |
b9da0 | 6f 73 65 72 20 75 70 64 61 74 65 2e 27 3b 0a 24 70 72 65 74 74 79 50 72 6f 62 6c 65 6d 20 3d 20 | oser.update.';.$prettyProblem.=. |
b9dc0 | 24 65 2d 3e 67 65 74 50 72 65 74 74 79 53 74 72 69 6e 67 28 24 72 65 70 6f 73 69 74 6f 72 79 53 | $e->getPrettyString($repositoryS |
b9de0 | 65 74 2c 20 24 72 65 71 75 65 73 74 2c 20 24 70 6f 6f 6c 2c 20 24 74 68 69 73 2d 3e 69 6f 2d 3e | et,.$request,.$pool,.$this->io-> |
b9e00 | 69 73 56 65 72 62 6f 73 65 28 29 29 3b 0a 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 | isVerbose());..$this->io->writeE |
b9e20 | 72 72 6f 72 28 27 3c 65 72 72 6f 72 3e 27 2e 20 24 65 72 72 20 2e 27 3c 2f 65 72 72 6f 72 3e 27 | rror('<error>'..$err..'</error>' |
b9e40 | 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 3a 3a 51 55 49 45 54 29 3b 0a 24 74 68 | ,.true,.IOInterface::QUIET);.$th |
b9e60 | 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 24 70 72 65 74 74 79 50 72 6f 62 6c 65 | is->io->writeError($prettyProble |
b9e80 | 6d 29 3b 0a 0a 24 67 68 65 20 3d 20 6e 65 77 20 47 69 74 68 75 62 41 63 74 69 6f 6e 45 72 72 6f | m);..$ghe.=.new.GithubActionErro |
b9ea0 | 72 28 24 74 68 69 73 2d 3e 69 6f 29 3b 0a 24 67 68 65 2d 3e 65 6d 69 74 28 24 65 72 72 2e 22 5c | r($this->io);.$ghe->emit($err."\ |
b9ec0 | 6e 22 2e 24 70 72 65 74 74 79 50 72 6f 62 6c 65 6d 29 3b 0a 0a 72 65 74 75 72 6e 20 6d 61 78 28 | n".$prettyProblem);..return.max( |
b9ee0 | 73 65 6c 66 3a 3a 45 52 52 4f 52 5f 47 45 4e 45 52 49 43 5f 46 41 49 4c 55 52 45 2c 20 24 65 2d | self::ERROR_GENERIC_FAILURE,.$e- |
b9f00 | 3e 67 65 74 43 6f 64 65 28 29 29 3b 0a 7d 0a 7d 0a 0a 0a 24 6c 6f 63 61 6c 52 65 70 6f 54 72 61 | >getCode());.}.}...$localRepoTra |
b9f20 | 6e 73 61 63 74 69 6f 6e 20 3d 20 6e 65 77 20 4c 6f 63 61 6c 52 65 70 6f 54 72 61 6e 73 61 63 74 | nsaction.=.new.LocalRepoTransact |
b9f40 | 69 6f 6e 28 24 6c 6f 63 6b 65 64 52 65 70 6f 73 69 74 6f 72 79 2c 20 24 6c 6f 63 61 6c 52 65 70 | ion($lockedRepository,.$localRep |
b9f60 | 6f 29 3b 0a 24 74 68 69 73 2d 3e 65 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 2d 3e 64 69 73 70 | o);.$this->eventDispatcher->disp |
b9f80 | 61 74 63 68 49 6e 73 74 61 6c 6c 65 72 45 76 65 6e 74 28 49 6e 73 74 61 6c 6c 65 72 45 76 65 6e | atchInstallerEvent(InstallerEven |
b9fa0 | 74 73 3a 3a 50 52 45 5f 4f 50 45 52 41 54 49 4f 4e 53 5f 45 58 45 43 2c 20 24 74 68 69 73 2d 3e | ts::PRE_OPERATIONS_EXEC,.$this-> |
b9fc0 | 64 65 76 4d 6f 64 65 2c 20 24 74 68 69 73 2d 3e 65 78 65 63 75 74 65 4f 70 65 72 61 74 69 6f 6e | devMode,.$this->executeOperation |
b9fe0 | 73 2c 20 24 6c 6f 63 61 6c 52 65 70 6f 54 72 61 6e 73 61 63 74 69 6f 6e 29 3b 0a 0a 69 66 20 28 | s,.$localRepoTransaction);..if.( |
ba000 | 21 24 6c 6f 63 61 6c 52 65 70 6f 54 72 61 6e 73 61 63 74 69 6f 6e 2d 3e 67 65 74 4f 70 65 72 61 | !$localRepoTransaction->getOpera |
ba020 | 74 69 6f 6e 73 28 29 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 | tions()).{.$this->io->writeError |
ba040 | 28 27 4e 6f 74 68 69 6e 67 20 74 6f 20 69 6e 73 74 61 6c 6c 2c 20 75 70 64 61 74 65 20 6f 72 20 | ('Nothing.to.install,.update.or. |
ba060 | 72 65 6d 6f 76 65 27 29 3b 0a 7d 0a 0a 69 66 20 28 24 6c 6f 63 61 6c 52 65 70 6f 54 72 61 6e 73 | remove');.}..if.($localRepoTrans |
ba080 | 61 63 74 69 6f 6e 2d 3e 67 65 74 4f 70 65 72 61 74 69 6f 6e 73 28 29 29 20 7b 0a 24 69 6e 73 74 | action->getOperations()).{.$inst |
ba0a0 | 61 6c 6c 73 20 3d 20 24 75 70 64 61 74 65 73 20 3d 20 24 75 6e 69 6e 73 74 61 6c 6c 73 20 3d 20 | alls.=.$updates.=.$uninstalls.=. |
ba0c0 | 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 6c 6f 63 61 6c 52 65 70 6f 54 72 61 6e 73 61 63 74 69 | [];.foreach.($localRepoTransacti |
ba0e0 | 6f 6e 2d 3e 67 65 74 4f 70 65 72 61 74 69 6f 6e 73 28 29 20 61 73 20 24 6f 70 65 72 61 74 69 6f | on->getOperations().as.$operatio |
ba100 | 6e 29 20 7b 0a 69 66 20 28 24 6f 70 65 72 61 74 69 6f 6e 20 69 6e 73 74 61 6e 63 65 6f 66 20 49 | n).{.if.($operation.instanceof.I |
ba120 | 6e 73 74 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 29 20 7b 0a 24 69 6e 73 74 61 6c 6c 73 5b 5d 20 3d | nstallOperation).{.$installs[].= |
ba140 | 20 24 6f 70 65 72 61 74 69 6f 6e 2d 3e 67 65 74 50 61 63 6b 61 67 65 28 29 2d 3e 67 65 74 50 72 | .$operation->getPackage()->getPr |
ba160 | 65 74 74 79 4e 61 6d 65 28 29 2e 27 3a 27 2e 24 6f 70 65 72 61 74 69 6f 6e 2d 3e 67 65 74 50 61 | ettyName().':'.$operation->getPa |
ba180 | 63 6b 61 67 65 28 29 2d 3e 67 65 74 46 75 6c 6c 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 3b | ckage()->getFullPrettyVersion(); |
ba1a0 | 0a 7d 20 65 6c 73 65 69 66 20 28 24 6f 70 65 72 61 74 69 6f 6e 20 69 6e 73 74 61 6e 63 65 6f 66 | .}.elseif.($operation.instanceof |
ba1c0 | 20 55 70 64 61 74 65 4f 70 65 72 61 74 69 6f 6e 29 20 7b 0a 24 75 70 64 61 74 65 73 5b 5d 20 3d | .UpdateOperation).{.$updates[].= |
ba1e0 | 20 24 6f 70 65 72 61 74 69 6f 6e 2d 3e 67 65 74 54 61 72 67 65 74 50 61 63 6b 61 67 65 28 29 2d | .$operation->getTargetPackage()- |
ba200 | 3e 67 65 74 50 72 65 74 74 79 4e 61 6d 65 28 29 2e 27 3a 27 2e 24 6f 70 65 72 61 74 69 6f 6e 2d | >getPrettyName().':'.$operation- |
ba220 | 3e 67 65 74 54 61 72 67 65 74 50 61 63 6b 61 67 65 28 29 2d 3e 67 65 74 46 75 6c 6c 50 72 65 74 | >getTargetPackage()->getFullPret |
ba240 | 74 79 56 65 72 73 69 6f 6e 28 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 6f 70 65 72 61 74 69 6f | tyVersion();.}.elseif.($operatio |
ba260 | 6e 20 69 6e 73 74 61 6e 63 65 6f 66 20 55 6e 69 6e 73 74 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 29 | n.instanceof.UninstallOperation) |
ba280 | 20 7b 0a 24 75 6e 69 6e 73 74 61 6c 6c 73 5b 5d 20 3d 20 24 6f 70 65 72 61 74 69 6f 6e 2d 3e 67 | .{.$uninstalls[].=.$operation->g |
ba2a0 | 65 74 50 61 63 6b 61 67 65 28 29 2d 3e 67 65 74 50 72 65 74 74 79 4e 61 6d 65 28 29 3b 0a 7d 0a | etPackage()->getPrettyName();.}. |
ba2c0 | 7d 0a 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 73 70 72 69 6e 74 66 | }..$this->io->writeError(sprintf |
ba2e0 | 28 0a 22 3c 69 6e 66 6f 3e 50 61 63 6b 61 67 65 20 6f 70 65 72 61 74 69 6f 6e 73 3a 20 25 64 20 | (."<info>Package.operations:.%d. |
ba300 | 69 6e 73 74 61 6c 6c 25 73 2c 20 25 64 20 75 70 64 61 74 65 25 73 2c 20 25 64 20 72 65 6d 6f 76 | install%s,.%d.update%s,.%d.remov |
ba320 | 61 6c 25 73 3c 2f 69 6e 66 6f 3e 22 2c 0a 63 6f 75 6e 74 28 24 69 6e 73 74 61 6c 6c 73 29 2c 0a | al%s</info>",.count($installs),. |
ba340 | 31 20 3d 3d 3d 20 63 6f 75 6e 74 28 24 69 6e 73 74 61 6c 6c 73 29 20 3f 20 27 27 20 3a 20 27 73 | 1.===.count($installs).?.''.:.'s |
ba360 | 27 2c 0a 63 6f 75 6e 74 28 24 75 70 64 61 74 65 73 29 2c 0a 31 20 3d 3d 3d 20 63 6f 75 6e 74 28 | ',.count($updates),.1.===.count( |
ba380 | 24 75 70 64 61 74 65 73 29 20 3f 20 27 27 20 3a 20 27 73 27 2c 0a 63 6f 75 6e 74 28 24 75 6e 69 | $updates).?.''.:.'s',.count($uni |
ba3a0 | 6e 73 74 61 6c 6c 73 29 2c 0a 31 20 3d 3d 3d 20 63 6f 75 6e 74 28 24 75 6e 69 6e 73 74 61 6c 6c | nstalls),.1.===.count($uninstall |
ba3c0 | 73 29 20 3f 20 27 27 20 3a 20 27 73 27 0a 29 29 3b 0a 69 66 20 28 24 69 6e 73 74 61 6c 6c 73 29 | s).?.''.:.'s'.));.if.($installs) |
ba3e0 | 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 22 49 6e 73 74 61 6c | .{.$this->io->writeError("Instal |
ba400 | 6c 73 3a 20 22 2e 69 6d 70 6c 6f 64 65 28 27 2c 20 27 2c 20 24 69 6e 73 74 61 6c 6c 73 29 2c 20 | ls:.".implode(',.',.$installs),. |
ba420 | 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 3a 3a 56 45 52 42 4f 53 45 29 3b 0a 7d 0a 69 | true,.IOInterface::VERBOSE);.}.i |
ba440 | 66 20 28 24 75 70 64 61 74 65 73 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 | f.($updates).{.$this->io->writeE |
ba460 | 72 72 6f 72 28 22 55 70 64 61 74 65 73 3a 20 22 2e 69 6d 70 6c 6f 64 65 28 27 2c 20 27 2c 20 24 | rror("Updates:.".implode(',.',.$ |
ba480 | 75 70 64 61 74 65 73 29 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 3a 3a 56 45 52 | updates),.true,.IOInterface::VER |
ba4a0 | 42 4f 53 45 29 3b 0a 7d 0a 69 66 20 28 24 75 6e 69 6e 73 74 61 6c 6c 73 29 20 7b 0a 24 74 68 69 | BOSE);.}.if.($uninstalls).{.$thi |
ba4c0 | 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 22 52 65 6d 6f 76 61 6c 73 3a 20 22 2e 69 | s->io->writeError("Removals:.".i |
ba4e0 | 6d 70 6c 6f 64 65 28 27 2c 20 27 2c 20 24 75 6e 69 6e 73 74 61 6c 6c 73 29 2c 20 74 72 75 65 2c | mplode(',.',.$uninstalls),.true, |
ba500 | 20 49 4f 49 6e 74 65 72 66 61 63 65 3a 3a 56 45 52 42 4f 53 45 29 3b 0a 7d 0a 7d 0a 0a 69 66 20 | .IOInterface::VERBOSE);.}.}..if. |
ba520 | 28 24 74 68 69 73 2d 3e 65 78 65 63 75 74 65 4f 70 65 72 61 74 69 6f 6e 73 29 20 7b 0a 24 6c 6f | ($this->executeOperations).{.$lo |
ba540 | 63 61 6c 52 65 70 6f 2d 3e 73 65 74 44 65 76 50 61 63 6b 61 67 65 4e 61 6d 65 73 28 24 74 68 69 | calRepo->setDevPackageNames($thi |
ba560 | 73 2d 3e 6c 6f 63 6b 65 72 2d 3e 67 65 74 44 65 76 50 61 63 6b 61 67 65 4e 61 6d 65 73 28 29 29 | s->locker->getDevPackageNames()) |
ba580 | 3b 0a 24 74 68 69 73 2d 3e 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 72 2d 3e 65 78 | ;.$this->installationManager->ex |
ba5a0 | 65 63 75 74 65 28 24 6c 6f 63 61 6c 52 65 70 6f 2c 20 24 6c 6f 63 61 6c 52 65 70 6f 54 72 61 6e | ecute($localRepo,.$localRepoTran |
ba5c0 | 73 61 63 74 69 6f 6e 2d 3e 67 65 74 4f 70 65 72 61 74 69 6f 6e 73 28 29 2c 20 24 74 68 69 73 2d | saction->getOperations(),.$this- |
ba5e0 | 3e 64 65 76 4d 6f 64 65 2c 20 24 74 68 69 73 2d 3e 72 75 6e 53 63 72 69 70 74 73 29 3b 0a 7d 20 | >devMode,.$this->runScripts);.}. |
ba600 | 65 6c 73 65 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 6c 6f 63 61 6c 52 65 70 6f 54 72 61 6e 73 61 | else.{.foreach.($localRepoTransa |
ba620 | 63 74 69 6f 6e 2d 3e 67 65 74 4f 70 65 72 61 74 69 6f 6e 73 28 29 20 61 73 20 24 6f 70 65 72 61 | ction->getOperations().as.$opera |
ba640 | 74 69 6f 6e 29 20 7b 0a 0a 69 66 20 28 66 61 6c 73 65 20 3d 3d 3d 20 73 74 72 70 6f 73 28 24 6f | tion).{..if.(false.===.strpos($o |
ba660 | 70 65 72 61 74 69 6f 6e 2d 3e 67 65 74 4f 70 65 72 61 74 69 6f 6e 54 79 70 65 28 29 2c 20 27 41 | peration->getOperationType(),.'A |
ba680 | 6c 69 61 73 27 29 20 7c 7c 20 24 74 68 69 73 2d 3e 69 6f 2d 3e 69 73 44 65 62 75 67 28 29 29 20 | lias').||.$this->io->isDebug()). |
ba6a0 | 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 20 20 2d 20 27 20 2e | {.$this->io->writeError('..-.'.. |
ba6c0 | 20 24 6f 70 65 72 61 74 69 6f 6e 2d 3e 73 68 6f 77 28 66 61 6c 73 65 29 29 3b 0a 7d 0a 7d 0a 7d | .$operation->show(false));.}.}.} |
ba6e0 | 0a 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f | ..return.0;.}..protected.functio |
ba700 | 6e 20 63 72 65 61 74 65 50 6c 61 74 66 6f 72 6d 52 65 70 6f 28 62 6f 6f 6c 20 24 66 6f 72 55 70 | n.createPlatformRepo(bool.$forUp |
ba720 | 64 61 74 65 29 3a 20 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 0a 7b 0a 69 66 20 28 | date):.PlatformRepository.{.if.( |
ba740 | 24 66 6f 72 55 70 64 61 74 65 29 20 7b 0a 24 70 6c 61 74 66 6f 72 6d 4f 76 65 72 72 69 64 65 73 | $forUpdate).{.$platformOverrides |
ba760 | 20 3d 20 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 2d 3e 67 65 74 28 27 70 6c 61 74 66 6f 72 6d 27 | .=.$this->config->get('platform' |
ba780 | 29 20 3f 3a 20 5b 5d 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 70 6c 61 74 66 6f 72 6d 4f 76 65 72 72 | ).?:.[];.}.else.{.$platformOverr |
ba7a0 | 69 64 65 73 20 3d 20 24 74 68 69 73 2d 3e 6c 6f 63 6b 65 72 2d 3e 67 65 74 50 6c 61 74 66 6f 72 | ides.=.$this->locker->getPlatfor |
ba7c0 | 6d 4f 76 65 72 72 69 64 65 73 28 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 6e 65 77 20 50 6c 61 74 | mOverrides();.}..return.new.Plat |
ba7e0 | 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 28 5b 5d 2c 20 24 70 6c 61 74 66 6f 72 6d 4f 76 65 72 | formRepository([],.$platformOver |
ba800 | 72 69 64 65 73 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f | rides);.}........private.functio |
ba820 | 6e 20 63 72 65 61 74 65 52 65 70 6f 73 69 74 6f 72 79 53 65 74 28 62 6f 6f 6c 20 24 66 6f 72 55 | n.createRepositorySet(bool.$forU |
ba840 | 70 64 61 74 65 2c 20 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 20 24 70 6c 61 74 66 | pdate,.PlatformRepository.$platf |
ba860 | 6f 72 6d 52 65 70 6f 2c 20 61 72 72 61 79 20 24 72 6f 6f 74 41 6c 69 61 73 65 73 20 3d 20 5b 5d | ormRepo,.array.$rootAliases.=.[] |
ba880 | 2c 20 3f 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 20 24 6c 6f 63 6b 65 64 52 65 | ,.?RepositoryInterface.$lockedRe |
ba8a0 | 70 6f 73 69 74 6f 72 79 20 3d 20 6e 75 6c 6c 29 3a 20 52 65 70 6f 73 69 74 6f 72 79 53 65 74 0a | pository.=.null):.RepositorySet. |
ba8c0 | 7b 0a 69 66 20 28 24 66 6f 72 55 70 64 61 74 65 29 20 7b 0a 24 6d 69 6e 69 6d 75 6d 53 74 61 62 | {.if.($forUpdate).{.$minimumStab |
ba8e0 | 69 6c 69 74 79 20 3d 20 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 2d 3e 67 65 74 4d 69 6e 69 6d | ility.=.$this->package->getMinim |
ba900 | 75 6d 53 74 61 62 69 6c 69 74 79 28 29 3b 0a 24 73 74 61 62 69 6c 69 74 79 46 6c 61 67 73 20 3d | umStability();.$stabilityFlags.= |
ba920 | 20 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 2d 3e 67 65 74 53 74 61 62 69 6c 69 74 79 46 6c 61 | .$this->package->getStabilityFla |
ba940 | 67 73 28 29 3b 0a 0a 24 72 65 71 75 69 72 65 73 20 3d 20 61 72 72 61 79 5f 6d 65 72 67 65 28 24 | gs();..$requires.=.array_merge($ |
ba960 | 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 2d 3e 67 65 74 52 65 71 75 69 72 65 73 28 29 2c 20 24 74 | this->package->getRequires(),.$t |
ba980 | 68 69 73 2d 3e 70 61 63 6b 61 67 65 2d 3e 67 65 74 44 65 76 52 65 71 75 69 72 65 73 28 29 29 3b | his->package->getDevRequires()); |
ba9a0 | 0a 7d 20 65 6c 73 65 20 7b 0a 24 6d 69 6e 69 6d 75 6d 53 74 61 62 69 6c 69 74 79 20 3d 20 24 74 | .}.else.{.$minimumStability.=.$t |
ba9c0 | 68 69 73 2d 3e 6c 6f 63 6b 65 72 2d 3e 67 65 74 4d 69 6e 69 6d 75 6d 53 74 61 62 69 6c 69 74 79 | his->locker->getMinimumStability |
ba9e0 | 28 29 3b 0a 24 73 74 61 62 69 6c 69 74 79 46 6c 61 67 73 20 3d 20 24 74 68 69 73 2d 3e 6c 6f 63 | ();.$stabilityFlags.=.$this->loc |
baa00 | 6b 65 72 2d 3e 67 65 74 53 74 61 62 69 6c 69 74 79 46 6c 61 67 73 28 29 3b 0a 0a 24 72 65 71 75 | ker->getStabilityFlags();..$requ |
baa20 | 69 72 65 73 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 6c 6f 63 6b 65 64 52 65 70 6f 73 | ires.=.[];.foreach.($lockedRepos |
baa40 | 69 74 6f 72 79 2d 3e 67 65 74 50 61 63 6b 61 67 65 73 28 29 20 61 73 20 24 70 61 63 6b 61 67 65 | itory->getPackages().as.$package |
baa60 | 29 20 7b 0a 24 63 6f 6e 73 74 72 61 69 6e 74 20 3d 20 6e 65 77 20 43 6f 6e 73 74 72 61 69 6e 74 | ).{.$constraint.=.new.Constraint |
baa80 | 28 27 3d 27 2c 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 29 3b 0a 24 | ('=',.$package->getVersion());.$ |
baaa0 | 63 6f 6e 73 74 72 61 69 6e 74 2d 3e 73 65 74 50 72 65 74 74 79 53 74 72 69 6e 67 28 24 70 61 63 | constraint->setPrettyString($pac |
baac0 | 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 29 3b 0a 24 72 65 71 75 | kage->getPrettyVersion());.$requ |
baae0 | 69 72 65 73 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 20 3d 20 24 63 6f 6e | ires[$package->getName()].=.$con |
bab00 | 73 74 72 61 69 6e 74 3b 0a 7d 0a 7d 0a 0a 24 72 6f 6f 74 52 65 71 75 69 72 65 73 20 3d 20 5b 5d | straint;.}.}..$rootRequires.=.[] |
bab20 | 3b 0a 66 6f 72 65 61 63 68 20 28 24 72 65 71 75 69 72 65 73 20 61 73 20 24 72 65 71 20 3d 3e 20 | ;.foreach.($requires.as.$req.=>. |
bab40 | 24 63 6f 6e 73 74 72 61 69 6e 74 29 20 7b 0a 69 66 20 28 24 63 6f 6e 73 74 72 61 69 6e 74 20 69 | $constraint).{.if.($constraint.i |
bab60 | 6e 73 74 61 6e 63 65 6f 66 20 4c 69 6e 6b 29 20 7b 0a 24 63 6f 6e 73 74 72 61 69 6e 74 20 3d 20 | nstanceof.Link).{.$constraint.=. |
bab80 | 24 63 6f 6e 73 74 72 61 69 6e 74 2d 3e 67 65 74 43 6f 6e 73 74 72 61 69 6e 74 28 29 3b 0a 7d 0a | $constraint->getConstraint();.}. |
baba0 | 0a 69 66 20 28 24 74 68 69 73 2d 3e 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 | .if.($this->platformRequirementF |
babc0 | 69 6c 74 65 72 2d 3e 69 73 49 67 6e 6f 72 65 64 28 24 72 65 71 29 29 20 7b 0a 63 6f 6e 74 69 6e | ilter->isIgnored($req)).{.contin |
babe0 | 75 65 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 74 68 69 73 2d 3e 70 6c 61 74 66 6f 72 6d 52 65 71 | ue;.}.elseif.($this->platformReq |
bac00 | 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 20 69 6e 73 74 61 6e 63 65 6f 66 20 49 67 6e 6f 72 65 | uirementFilter.instanceof.Ignore |
bac20 | 4c 69 73 74 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 29 20 7b | ListPlatformRequirementFilter).{ |
bac40 | 0a 24 63 6f 6e 73 74 72 61 69 6e 74 20 3d 20 24 74 68 69 73 2d 3e 70 6c 61 74 66 6f 72 6d 52 65 | .$constraint.=.$this->platformRe |
bac60 | 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 2d 3e 66 69 6c 74 65 72 43 6f 6e 73 74 72 61 69 6e | quirementFilter->filterConstrain |
bac80 | 74 28 24 72 65 71 2c 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 3b 0a 7d 0a 24 72 6f 6f 74 52 65 71 | t($req,.$constraint);.}.$rootReq |
baca0 | 75 69 72 65 73 5b 24 72 65 71 5d 20 3d 20 24 63 6f 6e 73 74 72 61 69 6e 74 3b 0a 7d 0a 0a 24 74 | uires[$req].=.$constraint;.}..$t |
bacc0 | 68 69 73 2d 3e 66 69 78 65 64 52 6f 6f 74 50 61 63 6b 61 67 65 20 3d 20 63 6c 6f 6e 65 20 24 74 | his->fixedRootPackage.=.clone.$t |
bace0 | 68 69 73 2d 3e 70 61 63 6b 61 67 65 3b 0a 24 74 68 69 73 2d 3e 66 69 78 65 64 52 6f 6f 74 50 61 | his->package;.$this->fixedRootPa |
bad00 | 63 6b 61 67 65 2d 3e 73 65 74 52 65 71 75 69 72 65 73 28 5b 5d 29 3b 0a 24 74 68 69 73 2d 3e 66 | ckage->setRequires([]);.$this->f |
bad20 | 69 78 65 64 52 6f 6f 74 50 61 63 6b 61 67 65 2d 3e 73 65 74 44 65 76 52 65 71 75 69 72 65 73 28 | ixedRootPackage->setDevRequires( |
bad40 | 5b 5d 29 3b 0a 0a 24 73 74 61 62 69 6c 69 74 79 46 6c 61 67 73 5b 24 74 68 69 73 2d 3e 70 61 63 | []);..$stabilityFlags[$this->pac |
bad60 | 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 20 3d 20 42 61 73 65 50 61 63 6b 61 67 65 3a 3a | kage->getName()].=.BasePackage:: |
bad80 | 24 73 74 61 62 69 6c 69 74 69 65 73 5b 56 65 72 73 69 6f 6e 50 61 72 73 65 72 3a 3a 70 61 72 73 | $stabilities[VersionParser::pars |
bada0 | 65 53 74 61 62 69 6c 69 74 79 28 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 2d 3e 67 65 74 56 65 | eStability($this->package->getVe |
badc0 | 72 73 69 6f 6e 28 29 29 5d 3b 0a 0a 24 72 65 70 6f 73 69 74 6f 72 79 53 65 74 20 3d 20 6e 65 77 | rsion())];..$repositorySet.=.new |
bade0 | 20 52 65 70 6f 73 69 74 6f 72 79 53 65 74 28 24 6d 69 6e 69 6d 75 6d 53 74 61 62 69 6c 69 74 79 | .RepositorySet($minimumStability |
bae00 | 2c 20 24 73 74 61 62 69 6c 69 74 79 46 6c 61 67 73 2c 20 24 72 6f 6f 74 41 6c 69 61 73 65 73 2c | ,.$stabilityFlags,.$rootAliases, |
bae20 | 20 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 2d 3e 67 65 74 52 65 66 65 72 65 6e 63 65 73 28 29 | .$this->package->getReferences() |
bae40 | 2c 20 24 72 6f 6f 74 52 65 71 75 69 72 65 73 2c 20 24 74 68 69 73 2d 3e 74 65 6d 70 6f 72 61 72 | ,.$rootRequires,.$this->temporar |
bae60 | 79 43 6f 6e 73 74 72 61 69 6e 74 73 29 3b 0a 24 72 65 70 6f 73 69 74 6f 72 79 53 65 74 2d 3e 61 | yConstraints);.$repositorySet->a |
bae80 | 64 64 52 65 70 6f 73 69 74 6f 72 79 28 6e 65 77 20 52 6f 6f 74 50 61 63 6b 61 67 65 52 65 70 6f | ddRepository(new.RootPackageRepo |
baea0 | 73 69 74 6f 72 79 28 24 74 68 69 73 2d 3e 66 69 78 65 64 52 6f 6f 74 50 61 63 6b 61 67 65 29 29 | sitory($this->fixedRootPackage)) |
baec0 | 3b 0a 24 72 65 70 6f 73 69 74 6f 72 79 53 65 74 2d 3e 61 64 64 52 65 70 6f 73 69 74 6f 72 79 28 | ;.$repositorySet->addRepository( |
baee0 | 24 70 6c 61 74 66 6f 72 6d 52 65 70 6f 29 3b 0a 69 66 20 28 24 74 68 69 73 2d 3e 61 64 64 69 74 | $platformRepo);.if.($this->addit |
baf00 | 69 6f 6e 61 6c 46 69 78 65 64 52 65 70 6f 73 69 74 6f 72 79 29 20 7b 0a 0a 0a 24 61 64 64 69 74 | ionalFixedRepository).{...$addit |
baf20 | 69 6f 6e 61 6c 46 69 78 65 64 52 65 70 6f 73 69 74 6f 72 69 65 73 20 3d 20 24 74 68 69 73 2d 3e | ionalFixedRepositories.=.$this-> |
baf40 | 61 64 64 69 74 69 6f 6e 61 6c 46 69 78 65 64 52 65 70 6f 73 69 74 6f 72 79 3b 0a 69 66 20 28 24 | additionalFixedRepository;.if.($ |
baf60 | 61 64 64 69 74 69 6f 6e 61 6c 46 69 78 65 64 52 65 70 6f 73 69 74 6f 72 69 65 73 20 69 6e 73 74 | additionalFixedRepositories.inst |
baf80 | 61 6e 63 65 6f 66 20 43 6f 6d 70 6f 73 69 74 65 52 65 70 6f 73 69 74 6f 72 79 29 20 7b 0a 24 61 | anceof.CompositeRepository).{.$a |
bafa0 | 64 64 69 74 69 6f 6e 61 6c 46 69 78 65 64 52 65 70 6f 73 69 74 6f 72 69 65 73 20 3d 20 24 61 64 | dditionalFixedRepositories.=.$ad |
bafc0 | 64 69 74 69 6f 6e 61 6c 46 69 78 65 64 52 65 70 6f 73 69 74 6f 72 69 65 73 2d 3e 67 65 74 52 65 | ditionalFixedRepositories->getRe |
bafe0 | 70 6f 73 69 74 6f 72 69 65 73 28 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 61 64 64 69 74 69 6f 6e | positories();.}.else.{.$addition |
bb000 | 61 6c 46 69 78 65 64 52 65 70 6f 73 69 74 6f 72 69 65 73 20 3d 20 5b 24 61 64 64 69 74 69 6f 6e | alFixedRepositories.=.[$addition |
bb020 | 61 6c 46 69 78 65 64 52 65 70 6f 73 69 74 6f 72 69 65 73 5d 3b 0a 7d 0a 66 6f 72 65 61 63 68 20 | alFixedRepositories];.}.foreach. |
bb040 | 28 24 61 64 64 69 74 69 6f 6e 61 6c 46 69 78 65 64 52 65 70 6f 73 69 74 6f 72 69 65 73 20 61 73 | ($additionalFixedRepositories.as |
bb060 | 20 24 61 64 64 69 74 69 6f 6e 61 6c 46 69 78 65 64 52 65 70 6f 73 69 74 6f 72 79 29 20 7b 0a 69 | .$additionalFixedRepository).{.i |
bb080 | 66 20 28 24 61 64 64 69 74 69 6f 6e 61 6c 46 69 78 65 64 52 65 70 6f 73 69 74 6f 72 79 20 69 6e | f.($additionalFixedRepository.in |
bb0a0 | 73 74 61 6e 63 65 6f 66 20 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 20 7c 7c 20 | stanceof.InstalledRepository.||. |
bb0c0 | 24 61 64 64 69 74 69 6f 6e 61 6c 46 69 78 65 64 52 65 70 6f 73 69 74 6f 72 79 20 69 6e 73 74 61 | $additionalFixedRepository.insta |
bb0e0 | 6e 63 65 6f 66 20 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 | nceof.InstalledRepositoryInterfa |
bb100 | 63 65 29 20 7b 0a 24 72 65 70 6f 73 69 74 6f 72 79 53 65 74 2d 3e 61 6c 6c 6f 77 49 6e 73 74 61 | ce).{.$repositorySet->allowInsta |
bb120 | 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 69 65 73 28 29 3b 0a 62 72 65 61 6b 3b 0a 7d 0a 7d 0a 0a | lledRepositories();.break;.}.}.. |
bb140 | 24 72 65 70 6f 73 69 74 6f 72 79 53 65 74 2d 3e 61 64 64 52 65 70 6f 73 69 74 6f 72 79 28 24 74 | $repositorySet->addRepository($t |
bb160 | 68 69 73 2d 3e 61 64 64 69 74 69 6f 6e 61 6c 46 69 78 65 64 52 65 70 6f 73 69 74 6f 72 79 29 3b | his->additionalFixedRepository); |
bb180 | 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 72 65 70 6f 73 69 74 6f 72 79 53 65 74 3b 0a 7d 0a 0a 70 72 | .}..return.$repositorySet;.}..pr |
bb1a0 | 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 63 72 65 61 74 65 50 6f 6c 69 63 79 28 62 6f 6f 6c | ivate.function.createPolicy(bool |
bb1c0 | 20 24 66 6f 72 55 70 64 61 74 65 29 3a 20 44 65 66 61 75 6c 74 50 6f 6c 69 63 79 0a 7b 0a 24 70 | .$forUpdate):.DefaultPolicy.{.$p |
bb1e0 | 72 65 66 65 72 53 74 61 62 6c 65 20 3d 20 6e 75 6c 6c 3b 0a 24 70 72 65 66 65 72 4c 6f 77 65 73 | referStable.=.null;.$preferLowes |
bb200 | 74 20 3d 20 6e 75 6c 6c 3b 0a 69 66 20 28 21 24 66 6f 72 55 70 64 61 74 65 29 20 7b 0a 24 70 72 | t.=.null;.if.(!$forUpdate).{.$pr |
bb220 | 65 66 65 72 53 74 61 62 6c 65 20 3d 20 24 74 68 69 73 2d 3e 6c 6f 63 6b 65 72 2d 3e 67 65 74 50 | eferStable.=.$this->locker->getP |
bb240 | 72 65 66 65 72 53 74 61 62 6c 65 28 29 3b 0a 24 70 72 65 66 65 72 4c 6f 77 65 73 74 20 3d 20 24 | referStable();.$preferLowest.=.$ |
bb260 | 74 68 69 73 2d 3e 6c 6f 63 6b 65 72 2d 3e 67 65 74 50 72 65 66 65 72 4c 6f 77 65 73 74 28 29 3b | this->locker->getPreferLowest(); |
bb280 | 0a 7d 0a 0a 0a 69 66 20 28 6e 75 6c 6c 20 3d 3d 3d 20 24 70 72 65 66 65 72 53 74 61 62 6c 65 29 | .}...if.(null.===.$preferStable) |
bb2a0 | 20 7b 0a 24 70 72 65 66 65 72 53 74 61 62 6c 65 20 3d 20 24 74 68 69 73 2d 3e 70 72 65 66 65 72 | .{.$preferStable.=.$this->prefer |
bb2c0 | 53 74 61 62 6c 65 20 7c 7c 20 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 | Stable.||.$this->package->getPre |
bb2e0 | 66 65 72 53 74 61 62 6c 65 28 29 3b 0a 7d 0a 69 66 20 28 6e 75 6c 6c 20 3d 3d 3d 20 24 70 72 65 | ferStable();.}.if.(null.===.$pre |
bb300 | 66 65 72 4c 6f 77 65 73 74 29 20 7b 0a 24 70 72 65 66 65 72 4c 6f 77 65 73 74 20 3d 20 24 74 68 | ferLowest).{.$preferLowest.=.$th |
bb320 | 69 73 2d 3e 70 72 65 66 65 72 4c 6f 77 65 73 74 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 6e 65 77 20 | is->preferLowest;.}..return.new. |
bb340 | 44 65 66 61 75 6c 74 50 6f 6c 69 63 79 28 24 70 72 65 66 65 72 53 74 61 62 6c 65 2c 20 24 70 72 | DefaultPolicy($preferStable,.$pr |
bb360 | 65 66 65 72 4c 6f 77 65 73 74 29 3b 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 | eferLowest);.}.....private.funct |
bb380 | 69 6f 6e 20 63 72 65 61 74 65 52 65 71 75 65 73 74 28 52 6f 6f 74 50 61 63 6b 61 67 65 49 6e 74 | ion.createRequest(RootPackageInt |
bb3a0 | 65 72 66 61 63 65 20 24 72 6f 6f 74 50 61 63 6b 61 67 65 2c 20 50 6c 61 74 66 6f 72 6d 52 65 70 | erface.$rootPackage,.PlatformRep |
bb3c0 | 6f 73 69 74 6f 72 79 20 24 70 6c 61 74 66 6f 72 6d 52 65 70 6f 2c 20 3f 4c 6f 63 6b 41 72 72 61 | ository.$platformRepo,.?LockArra |
bb3e0 | 79 52 65 70 6f 73 69 74 6f 72 79 20 24 6c 6f 63 6b 65 64 52 65 70 6f 73 69 74 6f 72 79 20 3d 20 | yRepository.$lockedRepository.=. |
bb400 | 6e 75 6c 6c 29 3a 20 52 65 71 75 65 73 74 0a 7b 0a 24 72 65 71 75 65 73 74 20 3d 20 6e 65 77 20 | null):.Request.{.$request.=.new. |
bb420 | 52 65 71 75 65 73 74 28 24 6c 6f 63 6b 65 64 52 65 70 6f 73 69 74 6f 72 79 29 3b 0a 0a 24 72 65 | Request($lockedRepository);..$re |
bb440 | 71 75 65 73 74 2d 3e 66 69 78 50 61 63 6b 61 67 65 28 24 72 6f 6f 74 50 61 63 6b 61 67 65 29 3b | quest->fixPackage($rootPackage); |
bb460 | 0a 69 66 20 28 24 72 6f 6f 74 50 61 63 6b 61 67 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 52 6f 6f | .if.($rootPackage.instanceof.Roo |
bb480 | 74 41 6c 69 61 73 50 61 63 6b 61 67 65 29 20 7b 0a 24 72 65 71 75 65 73 74 2d 3e 66 69 78 50 61 | tAliasPackage).{.$request->fixPa |
bb4a0 | 63 6b 61 67 65 28 24 72 6f 6f 74 50 61 63 6b 61 67 65 2d 3e 67 65 74 41 6c 69 61 73 4f 66 28 29 | ckage($rootPackage->getAliasOf() |
bb4c0 | 29 3b 0a 7d 0a 0a 24 66 69 78 65 64 50 61 63 6b 61 67 65 73 20 3d 20 24 70 6c 61 74 66 6f 72 6d | );.}..$fixedPackages.=.$platform |
bb4e0 | 52 65 70 6f 2d 3e 67 65 74 50 61 63 6b 61 67 65 73 28 29 3b 0a 69 66 20 28 24 74 68 69 73 2d 3e | Repo->getPackages();.if.($this-> |
bb500 | 61 64 64 69 74 69 6f 6e 61 6c 46 69 78 65 64 52 65 70 6f 73 69 74 6f 72 79 29 20 7b 0a 24 66 69 | additionalFixedRepository).{.$fi |
bb520 | 78 65 64 50 61 63 6b 61 67 65 73 20 3d 20 61 72 72 61 79 5f 6d 65 72 67 65 28 24 66 69 78 65 64 | xedPackages.=.array_merge($fixed |
bb540 | 50 61 63 6b 61 67 65 73 2c 20 24 74 68 69 73 2d 3e 61 64 64 69 74 69 6f 6e 61 6c 46 69 78 65 64 | Packages,.$this->additionalFixed |
bb560 | 52 65 70 6f 73 69 74 6f 72 79 2d 3e 67 65 74 50 61 63 6b 61 67 65 73 28 29 29 3b 0a 7d 0a 0a 0a | Repository->getPackages());.}... |
bb580 | 0a 0a 24 70 72 6f 76 69 64 65 64 20 3d 20 24 72 6f 6f 74 50 61 63 6b 61 67 65 2d 3e 67 65 74 50 | ..$provided.=.$rootPackage->getP |
bb5a0 | 72 6f 76 69 64 65 73 28 29 3b 0a 66 6f 72 65 61 63 68 20 28 24 66 69 78 65 64 50 61 63 6b 61 67 | rovides();.foreach.($fixedPackag |
bb5c0 | 65 73 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 0a 69 66 20 28 24 70 61 63 6b 61 67 65 2d | es.as.$package).{..if.($package- |
bb5e0 | 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 79 28 29 20 21 3d 3d 20 24 70 6c 61 74 66 6f 72 6d 52 65 | >getRepository().!==.$platformRe |
bb600 | 70 6f 0a 7c 7c 20 21 69 73 73 65 74 28 24 70 72 6f 76 69 64 65 64 5b 24 70 61 63 6b 61 67 65 2d | po.||.!isset($provided[$package- |
bb620 | 3e 67 65 74 4e 61 6d 65 28 29 5d 29 0a 7c 7c 20 21 24 70 72 6f 76 69 64 65 64 5b 24 70 61 63 6b | >getName()]).||.!$provided[$pack |
bb640 | 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 2d 3e 67 65 74 43 6f 6e 73 74 72 61 69 6e 74 28 29 | age->getName()]->getConstraint() |
bb660 | 2d 3e 6d 61 74 63 68 65 73 28 6e 65 77 20 43 6f 6e 73 74 72 61 69 6e 74 28 27 3d 27 2c 20 24 70 | ->matches(new.Constraint('=',.$p |
bb680 | 61 63 6b 61 67 65 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 29 29 0a 29 20 7b 0a 24 72 65 71 75 | ackage->getVersion())).).{.$requ |
bb6a0 | 65 73 74 2d 3e 66 69 78 50 61 63 6b 61 67 65 28 24 70 61 63 6b 61 67 65 29 3b 0a 7d 0a 7d 0a 0a | est->fixPackage($package);.}.}.. |
bb6c0 | 72 65 74 75 72 6e 20 24 72 65 71 75 65 73 74 3b 0a 7d 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 | return.$request;.}..private.func |
bb6e0 | 74 69 6f 6e 20 72 65 71 75 69 72 65 50 61 63 6b 61 67 65 73 46 6f 72 55 70 64 61 74 65 28 52 65 | tion.requirePackagesForUpdate(Re |
bb700 | 71 75 65 73 74 20 24 72 65 71 75 65 73 74 2c 20 3f 4c 6f 63 6b 41 72 72 61 79 52 65 70 6f 73 69 | quest.$request,.?LockArrayReposi |
bb720 | 74 6f 72 79 20 24 6c 6f 63 6b 65 64 52 65 70 6f 73 69 74 6f 72 79 20 3d 20 6e 75 6c 6c 2c 20 62 | tory.$lockedRepository.=.null,.b |
bb740 | 6f 6f 6c 20 24 69 6e 63 6c 75 64 65 44 65 76 52 65 71 75 69 72 65 73 20 3d 20 74 72 75 65 29 3a | ool.$includeDevRequires.=.true): |
bb760 | 20 76 6f 69 64 0a 7b 0a 0a 69 66 20 28 24 74 68 69 73 2d 3e 75 70 64 61 74 65 4d 69 72 72 6f 72 | .void.{..if.($this->updateMirror |
bb780 | 73 29 20 7b 0a 24 65 78 63 6c 75 64 65 64 50 61 63 6b 61 67 65 73 20 3d 20 5b 5d 3b 0a 69 66 20 | s).{.$excludedPackages.=.[];.if. |
bb7a0 | 28 21 24 69 6e 63 6c 75 64 65 44 65 76 52 65 71 75 69 72 65 73 29 20 7b 0a 24 65 78 63 6c 75 64 | (!$includeDevRequires).{.$exclud |
bb7c0 | 65 64 50 61 63 6b 61 67 65 73 20 3d 20 61 72 72 61 79 5f 66 6c 69 70 28 24 74 68 69 73 2d 3e 6c | edPackages.=.array_flip($this->l |
bb7e0 | 6f 63 6b 65 72 2d 3e 67 65 74 44 65 76 50 61 63 6b 61 67 65 4e 61 6d 65 73 28 29 29 3b 0a 7d 0a | ocker->getDevPackageNames());.}. |
bb800 | 0a 66 6f 72 65 61 63 68 20 28 24 6c 6f 63 6b 65 64 52 65 70 6f 73 69 74 6f 72 79 2d 3e 67 65 74 | .foreach.($lockedRepository->get |
bb820 | 50 61 63 6b 61 67 65 73 28 29 20 61 73 20 24 6c 6f 63 6b 65 64 50 61 63 6b 61 67 65 29 20 7b 0a | Packages().as.$lockedPackage).{. |
bb840 | 0a 0a 69 66 20 28 21 24 6c 6f 63 6b 65 64 50 61 63 6b 61 67 65 20 69 6e 73 74 61 6e 63 65 6f 66 | ..if.(!$lockedPackage.instanceof |
bb860 | 20 41 6c 69 61 73 50 61 63 6b 61 67 65 20 26 26 20 21 69 73 73 65 74 28 24 65 78 63 6c 75 64 65 | .AliasPackage.&&.!isset($exclude |
bb880 | 64 50 61 63 6b 61 67 65 73 5b 24 6c 6f 63 6b 65 64 50 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d | dPackages[$lockedPackage->getNam |
bb8a0 | 65 28 29 5d 29 29 20 7b 0a 24 72 65 71 75 65 73 74 2d 3e 72 65 71 75 69 72 65 4e 61 6d 65 28 24 | e()])).{.$request->requireName($ |
bb8c0 | 6c 6f 63 6b 65 64 50 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 2c 20 6e 65 77 20 43 6f | lockedPackage->getName(),.new.Co |
bb8e0 | 6e 73 74 72 61 69 6e 74 28 27 3d 3d 27 2c 20 24 6c 6f 63 6b 65 64 50 61 63 6b 61 67 65 2d 3e 67 | nstraint('==',.$lockedPackage->g |
bb900 | 65 74 56 65 72 73 69 6f 6e 28 29 29 29 3b 0a 7d 0a 7d 0a 7d 20 65 6c 73 65 20 7b 0a 24 6c 69 6e | etVersion()));.}.}.}.else.{.$lin |
bb920 | 6b 73 20 3d 20 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 2d 3e 67 65 74 52 65 71 75 69 72 65 73 | ks.=.$this->package->getRequires |
bb940 | 28 29 3b 0a 69 66 20 28 24 69 6e 63 6c 75 64 65 44 65 76 52 65 71 75 69 72 65 73 29 20 7b 0a 24 | ();.if.($includeDevRequires).{.$ |
bb960 | 6c 69 6e 6b 73 20 3d 20 61 72 72 61 79 5f 6d 65 72 67 65 28 24 6c 69 6e 6b 73 2c 20 24 74 68 69 | links.=.array_merge($links,.$thi |
bb980 | 73 2d 3e 70 61 63 6b 61 67 65 2d 3e 67 65 74 44 65 76 52 65 71 75 69 72 65 73 28 29 29 3b 0a 7d | s->package->getDevRequires());.} |
bb9a0 | 0a 66 6f 72 65 61 63 68 20 28 24 6c 69 6e 6b 73 20 61 73 20 24 6c 69 6e 6b 29 20 7b 0a 24 72 65 | .foreach.($links.as.$link).{.$re |
bb9c0 | 71 75 65 73 74 2d 3e 72 65 71 75 69 72 65 4e 61 6d 65 28 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 | quest->requireName($link->getTar |
bb9e0 | 67 65 74 28 29 2c 20 24 6c 69 6e 6b 2d 3e 67 65 74 43 6f 6e 73 74 72 61 69 6e 74 28 29 29 3b 0a | get(),.$link->getConstraint());. |
bba00 | 7d 0a 7d 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 | }.}.}.......private.function.get |
bba20 | 52 6f 6f 74 41 6c 69 61 73 65 73 28 62 6f 6f 6c 20 24 66 6f 72 55 70 64 61 74 65 29 3a 20 61 72 | RootAliases(bool.$forUpdate):.ar |
bba40 | 72 61 79 0a 7b 0a 69 66 20 28 24 66 6f 72 55 70 64 61 74 65 29 20 7b 0a 24 61 6c 69 61 73 65 73 | ray.{.if.($forUpdate).{.$aliases |
bba60 | 20 3d 20 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 2d 3e 67 65 74 41 6c 69 61 73 65 73 28 29 3b | .=.$this->package->getAliases(); |
bba80 | 0a 7d 20 65 6c 73 65 20 7b 0a 24 61 6c 69 61 73 65 73 20 3d 20 24 74 68 69 73 2d 3e 6c 6f 63 6b | .}.else.{.$aliases.=.$this->lock |
bbaa0 | 65 72 2d 3e 67 65 74 41 6c 69 61 73 65 73 28 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 61 6c 69 | er->getAliases();.}..return.$ali |
bbac0 | 61 73 65 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 65 | ases;.}.......private.function.e |
bbae0 | 78 74 72 61 63 74 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 73 28 61 72 72 61 79 | xtractPlatformRequirements(array |
bbb00 | 20 24 6c 69 6e 6b 73 29 3a 20 61 72 72 61 79 0a 7b 0a 24 70 6c 61 74 66 6f 72 6d 52 65 71 73 20 | .$links):.array.{.$platformReqs. |
bbb20 | 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 6c 69 6e 6b 73 20 61 73 20 24 6c 69 6e 6b 29 20 | =.[];.foreach.($links.as.$link). |
bbb40 | 7b 0a 69 66 20 28 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 3a 3a 69 73 50 6c 61 74 | {.if.(PlatformRepository::isPlat |
bbb60 | 66 6f 72 6d 50 61 63 6b 61 67 65 28 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 74 28 29 29 29 | formPackage($link->getTarget())) |
bbb80 | 20 7b 0a 24 70 6c 61 74 66 6f 72 6d 52 65 71 73 5b 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 | .{.$platformReqs[$link->getTarge |
bbba0 | 74 28 29 5d 20 3d 20 24 6c 69 6e 6b 2d 3e 67 65 74 50 72 65 74 74 79 43 6f 6e 73 74 72 61 69 6e | t()].=.$link->getPrettyConstrain |
bbbc0 | 74 28 29 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 70 6c 61 74 66 6f 72 6d 52 65 71 73 3b 0a | t();.}.}..return.$platformReqs;. |
bbbe0 | 7d 0a 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 6d 6f 63 6b 4c 6f 63 | }.......private.function.mockLoc |
bbc00 | 61 6c 52 65 70 6f 73 69 74 6f 72 69 65 73 28 52 65 70 6f 73 69 74 6f 72 79 4d 61 6e 61 67 65 72 | alRepositories(RepositoryManager |
bbc20 | 20 24 72 6d 29 3a 20 76 6f 69 64 0a 7b 0a 24 70 61 63 6b 61 67 65 73 20 3d 20 5b 5d 3b 0a 66 6f | .$rm):.void.{.$packages.=.[];.fo |
bbc40 | 72 65 61 63 68 20 28 24 72 6d 2d 3e 67 65 74 4c 6f 63 61 6c 52 65 70 6f 73 69 74 6f 72 79 28 29 | reach.($rm->getLocalRepository() |
bbc60 | 2d 3e 67 65 74 50 61 63 6b 61 67 65 73 28 29 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 24 | ->getPackages().as.$package).{.$ |
bbc80 | 70 61 63 6b 61 67 65 73 5b 28 73 74 72 69 6e 67 29 20 24 70 61 63 6b 61 67 65 5d 20 3d 20 63 6c | packages[(string).$package].=.cl |
bbca0 | 6f 6e 65 20 24 70 61 63 6b 61 67 65 3b 0a 7d 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 | one.$package;.}.foreach.($packag |
bbcc0 | 65 73 20 61 73 20 24 6b 65 79 20 3d 3e 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 69 66 20 28 24 70 | es.as.$key.=>.$package).{.if.($p |
bbce0 | 61 63 6b 61 67 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 41 6c 69 61 73 50 61 63 6b 61 67 65 29 20 | ackage.instanceof.AliasPackage). |
bbd00 | 7b 0a 24 61 6c 69 61 73 20 3d 20 28 73 74 72 69 6e 67 29 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 | {.$alias.=.(string).$package->ge |
bbd20 | 74 41 6c 69 61 73 4f 66 28 29 3b 0a 24 63 6c 61 73 73 4e 61 6d 65 20 3d 20 67 65 74 5f 63 6c 61 | tAliasOf();.$className.=.get_cla |
bbd40 | 73 73 28 24 70 61 63 6b 61 67 65 29 3b 0a 24 70 61 63 6b 61 67 65 73 5b 24 6b 65 79 5d 20 3d 20 | ss($package);.$packages[$key].=. |
bbd60 | 6e 65 77 20 24 63 6c 61 73 73 4e 61 6d 65 28 24 70 61 63 6b 61 67 65 73 5b 24 61 6c 69 61 73 5d | new.$className($packages[$alias] |
bbd80 | 2c 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 2c 20 24 70 61 63 6b 61 | ,.$package->getVersion(),.$packa |
bbda0 | 67 65 2d 3e 67 65 74 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 29 3b 0a 7d 0a 7d 0a 24 72 6d | ge->getPrettyVersion());.}.}.$rm |
bbdc0 | 2d 3e 73 65 74 4c 6f 63 61 6c 52 65 70 6f 73 69 74 6f 72 79 28 0a 6e 65 77 20 49 6e 73 74 61 6c | ->setLocalRepository(.new.Instal |
bbde0 | 6c 65 64 41 72 72 61 79 52 65 70 6f 73 69 74 6f 72 79 28 24 70 61 63 6b 61 67 65 73 29 0a 29 3b | ledArrayRepository($packages).); |
bbe00 | 0a 7d 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 63 72 65 61 74 65 50 6f 6f 6c 4f | .}..private.function.createPoolO |
bbe20 | 70 74 69 6d 69 7a 65 72 28 50 6f 6c 69 63 79 49 6e 74 65 72 66 61 63 65 20 24 70 6f 6c 69 63 79 | ptimizer(PolicyInterface.$policy |
bbe40 | 29 3a 20 3f 50 6f 6f 6c 4f 70 74 69 6d 69 7a 65 72 0a 7b 0a 0a 0a 0a 69 66 20 28 27 30 27 20 3d | ):.?PoolOptimizer.{....if.('0'.= |
bbe60 | 3d 3d 20 50 6c 61 74 66 6f 72 6d 3a 3a 67 65 74 45 6e 76 28 27 43 4f 4d 50 4f 53 45 52 5f 50 4f | ==.Platform::getEnv('COMPOSER_PO |
bbe80 | 4f 4c 5f 4f 50 54 49 4d 49 5a 45 52 27 29 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 | OL_OPTIMIZER')).{.$this->io->wri |
bbea0 | 74 65 28 27 50 6f 6f 6c 20 4f 70 74 69 6d 69 7a 65 72 20 77 61 73 20 64 69 73 61 62 6c 65 64 20 | te('Pool.Optimizer.was.disabled. |
bbec0 | 66 6f 72 20 64 65 62 75 67 67 69 6e 67 20 70 75 72 70 6f 73 65 73 2e 27 2c 20 74 72 75 65 2c 20 | for.debugging.purposes.',.true,. |
bbee0 | 49 4f 49 6e 74 65 72 66 61 63 65 3a 3a 44 45 42 55 47 29 3b 0a 0a 72 65 74 75 72 6e 20 6e 75 6c | IOInterface::DEBUG);..return.nul |
bbf00 | 6c 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 6e 65 77 20 50 6f 6f 6c 4f 70 74 69 6d 69 7a 65 72 28 24 | l;.}..return.new.PoolOptimizer($ |
bbf20 | 70 6f 6c 69 63 79 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 66 | policy);.}.......public.static.f |
bbf40 | 75 6e 63 74 69 6f 6e 20 63 72 65 61 74 65 28 49 4f 49 6e 74 65 72 66 61 63 65 20 24 69 6f 2c 20 | unction.create(IOInterface.$io,. |
bbf60 | 43 6f 6d 70 6f 73 65 72 20 24 63 6f 6d 70 6f 73 65 72 29 3a 20 73 65 6c 66 0a 7b 0a 72 65 74 75 | Composer.$composer):.self.{.retu |
bbf80 | 72 6e 20 6e 65 77 20 73 74 61 74 69 63 28 0a 24 69 6f 2c 0a 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 | rn.new.static(.$io,.$composer->g |
bbfa0 | 65 74 43 6f 6e 66 69 67 28 29 2c 0a 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 50 61 63 6b 61 67 | etConfig(),.$composer->getPackag |
bbfc0 | 65 28 29 2c 0a 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 44 6f 77 6e 6c 6f 61 64 4d 61 6e 61 67 | e(),.$composer->getDownloadManag |
bbfe0 | 65 72 28 29 2c 0a 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 79 4d 61 | er(),.$composer->getRepositoryMa |
bc000 | 6e 61 67 65 72 28 29 2c 0a 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 4c 6f 63 6b 65 72 28 29 2c | nager(),.$composer->getLocker(), |
bc020 | 0a 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 | .$composer->getInstallationManag |
bc040 | 65 72 28 29 2c 0a 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 45 76 65 6e 74 44 69 73 70 61 74 63 | er(),.$composer->getEventDispatc |
bc060 | 68 65 72 28 29 2c 0a 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 41 75 74 6f 6c 6f 61 64 47 65 6e | her(),.$composer->getAutoloadGen |
bc080 | 65 72 61 74 6f 72 28 29 0a 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f | erator().);.}.....public.functio |
bc0a0 | 6e 20 73 65 74 41 64 64 69 74 69 6f 6e 61 6c 46 69 78 65 64 52 65 70 6f 73 69 74 6f 72 79 28 52 | n.setAdditionalFixedRepository(R |
bc0c0 | 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 20 24 61 64 64 69 74 69 6f 6e 61 6c 46 69 | epositoryInterface.$additionalFi |
bc0e0 | 78 65 64 52 65 70 6f 73 69 74 6f 72 79 29 3a 20 73 65 6c 66 0a 7b 0a 24 74 68 69 73 2d 3e 61 64 | xedRepository):.self.{.$this->ad |
bc100 | 64 69 74 69 6f 6e 61 6c 46 69 78 65 64 52 65 70 6f 73 69 74 6f 72 79 20 3d 20 24 61 64 64 69 74 | ditionalFixedRepository.=.$addit |
bc120 | 69 6f 6e 61 6c 46 69 78 65 64 52 65 70 6f 73 69 74 6f 72 79 3b 0a 0a 72 65 74 75 72 6e 20 24 74 | ionalFixedRepository;..return.$t |
bc140 | 68 69 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 54 | his;.}......public.function.setT |
bc160 | 65 6d 70 6f 72 61 72 79 43 6f 6e 73 74 72 61 69 6e 74 73 28 61 72 72 61 79 20 24 63 6f 6e 73 74 | emporaryConstraints(array.$const |
bc180 | 72 61 69 6e 74 73 29 3a 20 73 65 6c 66 0a 7b 0a 24 74 68 69 73 2d 3e 74 65 6d 70 6f 72 61 72 79 | raints):.self.{.$this->temporary |
bc1a0 | 43 6f 6e 73 74 72 61 69 6e 74 73 20 3d 20 24 63 6f 6e 73 74 72 61 69 6e 74 73 3b 0a 0a 72 65 74 | Constraints.=.$constraints;..ret |
bc1c0 | 75 72 6e 20 24 74 68 69 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 | urn.$this;.}.......public.functi |
bc1e0 | 6f 6e 20 73 65 74 44 72 79 52 75 6e 28 62 6f 6f 6c 20 24 64 72 79 52 75 6e 20 3d 20 74 72 75 65 | on.setDryRun(bool.$dryRun.=.true |
bc200 | 29 3a 20 73 65 6c 66 0a 7b 0a 24 74 68 69 73 2d 3e 64 72 79 52 75 6e 20 3d 20 28 62 6f 6f 6c 29 | ):.self.{.$this->dryRun.=.(bool) |
bc220 | 20 24 64 72 79 52 75 6e 3b 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 3b 0a 7d 0a 0a 0a 0a 0a 70 | .$dryRun;..return.$this;.}.....p |
bc240 | 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 44 72 79 52 75 6e 28 29 3a 20 62 6f 6f 6c 0a | ublic.function.isDryRun():.bool. |
bc260 | 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 64 72 79 52 75 6e 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a | {.return.$this->dryRun;.}....... |
bc280 | 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 50 72 65 66 65 72 53 6f 75 72 63 65 28 | public.function.setPreferSource( |
bc2a0 | 62 6f 6f 6c 20 24 70 72 65 66 65 72 53 6f 75 72 63 65 20 3d 20 74 72 75 65 29 3a 20 73 65 6c 66 | bool.$preferSource.=.true):.self |
bc2c0 | 0a 7b 0a 24 74 68 69 73 2d 3e 70 72 65 66 65 72 53 6f 75 72 63 65 20 3d 20 28 62 6f 6f 6c 29 20 | .{.$this->preferSource.=.(bool). |
bc2e0 | 24 70 72 65 66 65 72 53 6f 75 72 63 65 3b 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 3b 0a 7d 0a | $preferSource;..return.$this;.}. |
bc300 | 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 50 72 65 66 65 72 44 | ......public.function.setPreferD |
bc320 | 69 73 74 28 62 6f 6f 6c 20 24 70 72 65 66 65 72 44 69 73 74 20 3d 20 74 72 75 65 29 3a 20 73 65 | ist(bool.$preferDist.=.true):.se |
bc340 | 6c 66 0a 7b 0a 24 74 68 69 73 2d 3e 70 72 65 66 65 72 44 69 73 74 20 3d 20 28 62 6f 6f 6c 29 20 | lf.{.$this->preferDist.=.(bool). |
bc360 | 24 70 72 65 66 65 72 44 69 73 74 3b 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 3b 0a 7d 0a 0a 0a | $preferDist;..return.$this;.}... |
bc380 | 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 4f 70 74 69 6d 69 7a 65 41 | ....public.function.setOptimizeA |
bc3a0 | 75 74 6f 6c 6f 61 64 65 72 28 62 6f 6f 6c 20 24 6f 70 74 69 6d 69 7a 65 41 75 74 6f 6c 6f 61 64 | utoloader(bool.$optimizeAutoload |
bc3c0 | 65 72 29 3a 20 73 65 6c 66 0a 7b 0a 24 74 68 69 73 2d 3e 6f 70 74 69 6d 69 7a 65 41 75 74 6f 6c | er):.self.{.$this->optimizeAutol |
bc3e0 | 6f 61 64 65 72 20 3d 20 28 62 6f 6f 6c 29 20 24 6f 70 74 69 6d 69 7a 65 41 75 74 6f 6c 6f 61 64 | oader.=.(bool).$optimizeAutoload |
bc400 | 65 72 3b 0a 69 66 20 28 21 24 74 68 69 73 2d 3e 6f 70 74 69 6d 69 7a 65 41 75 74 6f 6c 6f 61 64 | er;.if.(!$this->optimizeAutoload |
bc420 | 65 72 29 20 7b 0a 0a 0a 24 74 68 69 73 2d 3e 73 65 74 43 6c 61 73 73 4d 61 70 41 75 74 68 6f 72 | er).{...$this->setClassMapAuthor |
bc440 | 69 74 61 74 69 76 65 28 66 61 6c 73 65 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 3b | itative(false);.}..return.$this; |
bc460 | 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 43 6c 61 | .}........public.function.setCla |
bc480 | 73 73 4d 61 70 41 75 74 68 6f 72 69 74 61 74 69 76 65 28 62 6f 6f 6c 20 24 63 6c 61 73 73 4d 61 | ssMapAuthoritative(bool.$classMa |
bc4a0 | 70 41 75 74 68 6f 72 69 74 61 74 69 76 65 29 3a 20 73 65 6c 66 0a 7b 0a 24 74 68 69 73 2d 3e 63 | pAuthoritative):.self.{.$this->c |
bc4c0 | 6c 61 73 73 4d 61 70 41 75 74 68 6f 72 69 74 61 74 69 76 65 20 3d 20 28 62 6f 6f 6c 29 20 24 63 | lassMapAuthoritative.=.(bool).$c |
bc4e0 | 6c 61 73 73 4d 61 70 41 75 74 68 6f 72 69 74 61 74 69 76 65 3b 0a 69 66 20 28 24 74 68 69 73 2d | lassMapAuthoritative;.if.($this- |
bc500 | 3e 63 6c 61 73 73 4d 61 70 41 75 74 68 6f 72 69 74 61 74 69 76 65 29 20 7b 0a 0a 24 74 68 69 73 | >classMapAuthoritative).{..$this |
bc520 | 2d 3e 73 65 74 4f 70 74 69 6d 69 7a 65 41 75 74 6f 6c 6f 61 64 65 72 28 74 72 75 65 29 3b 0a 7d | ->setOptimizeAutoloader(true);.} |
bc540 | 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 | ..return.$this;.}.......public.f |
bc560 | 75 6e 63 74 69 6f 6e 20 73 65 74 41 70 63 75 41 75 74 6f 6c 6f 61 64 65 72 28 62 6f 6f 6c 20 24 | unction.setApcuAutoloader(bool.$ |
bc580 | 61 70 63 75 41 75 74 6f 6c 6f 61 64 65 72 2c 20 3f 73 74 72 69 6e 67 20 24 61 70 63 75 41 75 74 | apcuAutoloader,.?string.$apcuAut |
bc5a0 | 6f 6c 6f 61 64 65 72 50 72 65 66 69 78 20 3d 20 6e 75 6c 6c 29 3a 20 73 65 6c 66 0a 7b 0a 24 74 | oloaderPrefix.=.null):.self.{.$t |
bc5c0 | 68 69 73 2d 3e 61 70 63 75 41 75 74 6f 6c 6f 61 64 65 72 20 3d 20 24 61 70 63 75 41 75 74 6f 6c | his->apcuAutoloader.=.$apcuAutol |
bc5e0 | 6f 61 64 65 72 3b 0a 24 74 68 69 73 2d 3e 61 70 63 75 41 75 74 6f 6c 6f 61 64 65 72 50 72 65 66 | oader;.$this->apcuAutoloaderPref |
bc600 | 69 78 20 3d 20 24 61 70 63 75 41 75 74 6f 6c 6f 61 64 65 72 50 72 65 66 69 78 3b 0a 0a 72 65 74 | ix.=.$apcuAutoloaderPrefix;..ret |
bc620 | 75 72 6e 20 24 74 68 69 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 | urn.$this;.}.......public.functi |
bc640 | 6f 6e 20 73 65 74 55 70 64 61 74 65 28 62 6f 6f 6c 20 24 75 70 64 61 74 65 29 3a 20 73 65 6c 66 | on.setUpdate(bool.$update):.self |
bc660 | 0a 7b 0a 24 74 68 69 73 2d 3e 75 70 64 61 74 65 20 3d 20 28 62 6f 6f 6c 29 20 24 75 70 64 61 74 | .{.$this->update.=.(bool).$updat |
bc680 | 65 3b 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 | e;..return.$this;.}.......public |
bc6a0 | 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 49 6e 73 74 61 6c 6c 28 62 6f 6f 6c 20 24 69 6e 73 74 61 | .function.setInstall(bool.$insta |
bc6c0 | 6c 6c 29 3a 20 73 65 6c 66 0a 7b 0a 24 74 68 69 73 2d 3e 69 6e 73 74 61 6c 6c 20 3d 20 28 62 6f | ll):.self.{.$this->install.=.(bo |
bc6e0 | 6f 6c 29 20 24 69 6e 73 74 61 6c 6c 3b 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 3b 0a 7d 0a 0a | ol).$install;..return.$this;.}.. |
bc700 | 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 44 65 76 4d 6f 64 65 28 | .....public.function.setDevMode( |
bc720 | 62 6f 6f 6c 20 24 64 65 76 4d 6f 64 65 20 3d 20 74 72 75 65 29 3a 20 73 65 6c 66 0a 7b 0a 24 74 | bool.$devMode.=.true):.self.{.$t |
bc740 | 68 69 73 2d 3e 64 65 76 4d 6f 64 65 20 3d 20 28 62 6f 6f 6c 29 20 24 64 65 76 4d 6f 64 65 3b 0a | his->devMode.=.(bool).$devMode;. |
bc760 | 0a 72 65 74 75 72 6e 20 24 74 68 69 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 | .return.$this;.}.........public. |
bc780 | 66 75 6e 63 74 69 6f 6e 20 73 65 74 44 75 6d 70 41 75 74 6f 6c 6f 61 64 65 72 28 62 6f 6f 6c 20 | function.setDumpAutoloader(bool. |
bc7a0 | 24 64 75 6d 70 41 75 74 6f 6c 6f 61 64 65 72 20 3d 20 74 72 75 65 29 3a 20 73 65 6c 66 0a 7b 0a | $dumpAutoloader.=.true):.self.{. |
bc7c0 | 24 74 68 69 73 2d 3e 64 75 6d 70 41 75 74 6f 6c 6f 61 64 65 72 20 3d 20 28 62 6f 6f 6c 29 20 24 | $this->dumpAutoloader.=.(bool).$ |
bc7e0 | 64 75 6d 70 41 75 74 6f 6c 6f 61 64 65 72 3b 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 3b 0a 7d | dumpAutoloader;..return.$this;.} |
bc800 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 52 75 6e | ..........public.function.setRun |
bc820 | 53 63 72 69 70 74 73 28 62 6f 6f 6c 20 24 72 75 6e 53 63 72 69 70 74 73 20 3d 20 74 72 75 65 29 | Scripts(bool.$runScripts.=.true) |
bc840 | 3a 20 73 65 6c 66 0a 7b 0a 24 74 68 69 73 2d 3e 72 75 6e 53 63 72 69 70 74 73 20 3d 20 28 62 6f | :.self.{.$this->runScripts.=.(bo |
bc860 | 6f 6c 29 20 24 72 75 6e 53 63 72 69 70 74 73 3b 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 3b 0a | ol).$runScripts;..return.$this;. |
bc880 | 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 43 6f 6e 66 69 | }.......public.function.setConfi |
bc8a0 | 67 28 43 6f 6e 66 69 67 20 24 63 6f 6e 66 69 67 29 3a 20 73 65 6c 66 0a 7b 0a 24 74 68 69 73 2d | g(Config.$config):.self.{.$this- |
bc8c0 | 3e 63 6f 6e 66 69 67 20 3d 20 24 63 6f 6e 66 69 67 3b 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 | >config.=.$config;..return.$this |
bc8e0 | 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 56 65 72 | ;.}.......public.function.setVer |
bc900 | 62 6f 73 65 28 62 6f 6f 6c 20 24 76 65 72 62 6f 73 65 20 3d 20 74 72 75 65 29 3a 20 73 65 6c 66 | bose(bool.$verbose.=.true):.self |
bc920 | 0a 7b 0a 24 74 68 69 73 2d 3e 76 65 72 62 6f 73 65 20 3d 20 28 62 6f 6f 6c 29 20 24 76 65 72 62 | .{.$this->verbose.=.(bool).$verb |
bc940 | 6f 73 65 3b 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 | ose;..return.$this;.}.....public |
bc960 | 20 66 75 6e 63 74 69 6f 6e 20 69 73 56 65 72 62 6f 73 65 28 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 65 | .function.isVerbose():.bool.{.re |
bc980 | 74 75 72 6e 20 24 74 68 69 73 2d 3e 76 65 72 62 6f 73 65 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a | turn.$this->verbose;.}.......... |
bc9a0 | 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 49 67 6e 6f 72 65 50 6c | .....public.function.setIgnorePl |
bc9c0 | 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 73 28 24 69 67 6e 6f 72 65 50 6c 61 74 66 6f | atformRequirements($ignorePlatfo |
bc9e0 | 72 6d 52 65 71 73 29 3a 20 73 65 6c 66 0a 7b 0a 74 72 69 67 67 65 72 5f 65 72 72 6f 72 28 27 49 | rmReqs):.self.{.trigger_error('I |
bca00 | 6e 73 74 61 6c 6c 65 72 3a 3a 73 65 74 49 67 6e 6f 72 65 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 | nstaller::setIgnorePlatformRequi |
bca20 | 72 65 6d 65 6e 74 73 20 69 73 20 64 65 70 72 65 63 61 74 65 64 20 73 69 6e 63 65 20 43 6f 6d 70 | rements.is.deprecated.since.Comp |
bca40 | 6f 73 65 72 20 32 2e 32 2c 20 75 73 65 20 73 65 74 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 | oser.2.2,.use.setPlatformRequire |
bca60 | 6d 65 6e 74 46 69 6c 74 65 72 20 69 6e 73 74 65 61 64 2e 27 2c 20 45 5f 55 53 45 52 5f 44 45 50 | mentFilter.instead.',.E_USER_DEP |
bca80 | 52 45 43 41 54 45 44 29 3b 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 73 65 74 50 6c 61 74 | RECATED);..return.$this->setPlat |
bcaa0 | 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 28 50 6c 61 74 66 6f 72 6d 52 65 | formRequirementFilter(PlatformRe |
bcac0 | 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 46 61 63 74 6f 72 79 3a 3a 66 72 6f 6d 42 6f 6f 6c | quirementFilterFactory::fromBool |
bcae0 | 4f 72 4c 69 73 74 28 24 69 67 6e 6f 72 65 50 6c 61 74 66 6f 72 6d 52 65 71 73 29 29 3b 0a 7d 0a | OrList($ignorePlatformReqs));.}. |
bcb00 | 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 50 6c 61 74 66 6f 72 6d 52 | ....public.function.setPlatformR |
bcb20 | 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 28 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 | equirementFilter(PlatformRequire |
bcb40 | 6d 65 6e 74 46 69 6c 74 65 72 49 6e 74 65 72 66 61 63 65 20 24 70 6c 61 74 66 6f 72 6d 52 65 71 | mentFilterInterface.$platformReq |
bcb60 | 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 29 3a 20 73 65 6c 66 0a 7b 0a 24 74 68 69 73 2d 3e 70 | uirementFilter):.self.{.$this->p |
bcb80 | 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 20 3d 20 24 70 6c 61 74 | latformRequirementFilter.=.$plat |
bcba0 | 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 3b 0a 0a 72 65 74 75 72 6e 20 24 | formRequirementFilter;..return.$ |
bcbc0 | 74 68 69 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 | this;.}.......public.function.se |
bcbe0 | 74 55 70 64 61 74 65 4d 69 72 72 6f 72 73 28 62 6f 6f 6c 20 24 75 70 64 61 74 65 4d 69 72 72 6f | tUpdateMirrors(bool.$updateMirro |
bcc00 | 72 73 29 3a 20 73 65 6c 66 0a 7b 0a 24 74 68 69 73 2d 3e 75 70 64 61 74 65 4d 69 72 72 6f 72 73 | rs):.self.{.$this->updateMirrors |
bcc20 | 20 3d 20 24 75 70 64 61 74 65 4d 69 72 72 6f 72 73 3b 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 | .=.$updateMirrors;..return.$this |
bcc40 | 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 | ;.}..........public.function.set |
bcc60 | 55 70 64 61 74 65 41 6c 6c 6f 77 4c 69 73 74 28 61 72 72 61 79 20 24 70 61 63 6b 61 67 65 73 29 | UpdateAllowList(array.$packages) |
bcc80 | 3a 20 73 65 6c 66 0a 7b 0a 24 74 68 69 73 2d 3e 75 70 64 61 74 65 41 6c 6c 6f 77 4c 69 73 74 20 | :.self.{.$this->updateAllowList. |
bcca0 | 3d 20 61 72 72 61 79 5f 66 6c 69 70 28 61 72 72 61 79 5f 6d 61 70 28 27 73 74 72 74 6f 6c 6f 77 | =.array_flip(array_map('strtolow |
bccc0 | 65 72 27 2c 20 24 70 61 63 6b 61 67 65 73 29 29 3b 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 3b | er',.$packages));..return.$this; |
bcce0 | 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 | .}...........public.function.set |
bcd00 | 55 70 64 61 74 65 41 6c 6c 6f 77 54 72 61 6e 73 69 74 69 76 65 44 65 70 65 6e 64 65 6e 63 69 65 | UpdateAllowTransitiveDependencie |
bcd20 | 73 28 69 6e 74 20 24 75 70 64 61 74 65 41 6c 6c 6f 77 54 72 61 6e 73 69 74 69 76 65 44 65 70 65 | s(int.$updateAllowTransitiveDepe |
bcd40 | 6e 64 65 6e 63 69 65 73 29 3a 20 73 65 6c 66 0a 7b 0a 69 66 20 28 21 69 6e 5f 61 72 72 61 79 28 | ndencies):.self.{.if.(!in_array( |
bcd60 | 24 75 70 64 61 74 65 41 6c 6c 6f 77 54 72 61 6e 73 69 74 69 76 65 44 65 70 65 6e 64 65 6e 63 69 | $updateAllowTransitiveDependenci |
bcd80 | 65 73 2c 20 5b 52 65 71 75 65 73 74 3a 3a 55 50 44 41 54 45 5f 4f 4e 4c 59 5f 4c 49 53 54 45 44 | es,.[Request::UPDATE_ONLY_LISTED |
bcda0 | 2c 20 52 65 71 75 65 73 74 3a 3a 55 50 44 41 54 45 5f 4c 49 53 54 45 44 5f 57 49 54 48 5f 54 52 | ,.Request::UPDATE_LISTED_WITH_TR |
bcdc0 | 41 4e 53 49 54 49 56 45 5f 44 45 50 53 5f 4e 4f 5f 52 4f 4f 54 5f 52 45 51 55 49 52 45 2c 20 52 | ANSITIVE_DEPS_NO_ROOT_REQUIRE,.R |
bcde0 | 65 71 75 65 73 74 3a 3a 55 50 44 41 54 45 5f 4c 49 53 54 45 44 5f 57 49 54 48 5f 54 52 41 4e 53 | equest::UPDATE_LISTED_WITH_TRANS |
bce00 | 49 54 49 56 45 5f 44 45 50 53 5d 2c 20 74 72 75 65 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 | ITIVE_DEPS],.true)).{.throw.new. |
bce20 | 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 22 49 6e 76 61 6c 69 64 20 76 61 6c 75 65 | \RuntimeException("Invalid.value |
bce40 | 20 66 6f 72 20 75 70 64 61 74 65 41 6c 6c 6f 77 54 72 61 6e 73 69 74 69 76 65 44 65 70 65 6e 64 | .for.updateAllowTransitiveDepend |
bce60 | 65 6e 63 69 65 73 20 73 75 70 70 6c 69 65 64 22 29 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 75 70 64 | encies.supplied");.}..$this->upd |
bce80 | 61 74 65 41 6c 6c 6f 77 54 72 61 6e 73 69 74 69 76 65 44 65 70 65 6e 64 65 6e 63 69 65 73 20 3d | ateAllowTransitiveDependencies.= |
bcea0 | 20 24 75 70 64 61 74 65 41 6c 6c 6f 77 54 72 61 6e 73 69 74 69 76 65 44 65 70 65 6e 64 65 6e 63 | .$updateAllowTransitiveDependenc |
bcec0 | 69 65 73 3b 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c | ies;..return.$this;.}.......publ |
bcee0 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 50 72 65 66 65 72 53 74 61 62 6c 65 28 62 6f 6f 6c | ic.function.setPreferStable(bool |
bcf00 | 20 24 70 72 65 66 65 72 53 74 61 62 6c 65 20 3d 20 74 72 75 65 29 3a 20 73 65 6c 66 0a 7b 0a 24 | .$preferStable.=.true):.self.{.$ |
bcf20 | 74 68 69 73 2d 3e 70 72 65 66 65 72 53 74 61 62 6c 65 20 3d 20 28 62 6f 6f 6c 29 20 24 70 72 65 | this->preferStable.=.(bool).$pre |
bcf40 | 66 65 72 53 74 61 62 6c 65 3b 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 3b 0a 7d 0a 0a 0a 0a 0a | ferStable;..return.$this;.}..... |
bcf60 | 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 50 72 65 66 65 72 4c 6f 77 65 73 | ..public.function.setPreferLowes |
bcf80 | 74 28 62 6f 6f 6c 20 24 70 72 65 66 65 72 4c 6f 77 65 73 74 20 3d 20 74 72 75 65 29 3a 20 73 65 | t(bool.$preferLowest.=.true):.se |
bcfa0 | 6c 66 0a 7b 0a 24 74 68 69 73 2d 3e 70 72 65 66 65 72 4c 6f 77 65 73 74 20 3d 20 28 62 6f 6f 6c | lf.{.$this->preferLowest.=.(bool |
bcfc0 | 29 20 24 70 72 65 66 65 72 4c 6f 77 65 73 74 3b 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 3b 0a | ).$preferLowest;..return.$this;. |
bcfe0 | 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 57 72 69 | }.........public.function.setWri |
bd000 | 74 65 4c 6f 63 6b 28 62 6f 6f 6c 20 24 77 72 69 74 65 4c 6f 63 6b 20 3d 20 74 72 75 65 29 3a 20 | teLock(bool.$writeLock.=.true):. |
bd020 | 73 65 6c 66 0a 7b 0a 24 74 68 69 73 2d 3e 77 72 69 74 65 4c 6f 63 6b 20 3d 20 28 62 6f 6f 6c 29 | self.{.$this->writeLock.=.(bool) |
bd040 | 20 24 77 72 69 74 65 4c 6f 63 6b 3b 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 3b 0a 7d 0a 0a 0a | .$writeLock;..return.$this;.}... |
bd060 | 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 45 78 65 63 75 74 65 | ......public.function.setExecute |
bd080 | 4f 70 65 72 61 74 69 6f 6e 73 28 62 6f 6f 6c 20 24 65 78 65 63 75 74 65 4f 70 65 72 61 74 69 6f | Operations(bool.$executeOperatio |
bd0a0 | 6e 73 20 3d 20 74 72 75 65 29 3a 20 73 65 6c 66 0a 7b 0a 24 74 68 69 73 2d 3e 65 78 65 63 75 74 | ns.=.true):.self.{.$this->execut |
bd0c0 | 65 4f 70 65 72 61 74 69 6f 6e 73 20 3d 20 28 62 6f 6f 6c 29 20 24 65 78 65 63 75 74 65 4f 70 65 | eOperations.=.(bool).$executeOpe |
bd0e0 | 72 61 74 69 6f 6e 73 3b 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a | rations;..return.$this;.}....... |
bd100 | 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 41 75 64 69 74 28 62 6f 6f 6c 20 24 61 | public.function.setAudit(bool.$a |
bd120 | 75 64 69 74 29 3a 20 73 65 6c 66 0a 7b 0a 24 74 68 69 73 2d 3e 61 75 64 69 74 20 3d 20 24 61 75 | udit):.self.{.$this->audit.=.$au |
bd140 | 64 69 74 3b 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 | dit;..return.$this;.}........pub |
bd160 | 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 41 75 64 69 74 46 6f 72 6d 61 74 28 73 74 72 69 | lic.function.setAuditFormat(stri |
bd180 | 6e 67 20 24 61 75 64 69 74 46 6f 72 6d 61 74 29 3a 20 73 65 6c 66 0a 7b 0a 24 74 68 69 73 2d 3e | ng.$auditFormat):.self.{.$this-> |
bd1a0 | 61 75 64 69 74 46 6f 72 6d 61 74 20 3d 20 24 61 75 64 69 74 46 6f 72 6d 61 74 3b 0a 0a 72 65 74 | auditFormat.=.$auditFormat;..ret |
bd1c0 | 75 72 6e 20 24 74 68 69 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 | urn.$this;.}...........public.fu |
bd1e0 | 6e 63 74 69 6f 6e 20 64 69 73 61 62 6c 65 50 6c 75 67 69 6e 73 28 29 3a 20 73 65 6c 66 0a 7b 0a | nction.disablePlugins():.self.{. |
bd200 | 24 74 68 69 73 2d 3e 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 72 2d 3e 64 69 73 61 | $this->installationManager->disa |
bd220 | 62 6c 65 50 6c 75 67 69 6e 73 28 29 3b 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 3b 0a 7d 0a 0a | blePlugins();..return.$this;.}.. |
bd240 | 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 53 75 67 67 65 73 74 65 64 50 | ...public.function.setSuggestedP |
bd260 | 61 63 6b 61 67 65 73 52 65 70 6f 72 74 65 72 28 53 75 67 67 65 73 74 65 64 50 61 63 6b 61 67 65 | ackagesReporter(SuggestedPackage |
bd280 | 73 52 65 70 6f 72 74 65 72 20 24 73 75 67 67 65 73 74 65 64 50 61 63 6b 61 67 65 73 52 65 70 6f | sReporter.$suggestedPackagesRepo |
bd2a0 | 72 74 65 72 29 3a 20 73 65 6c 66 0a 7b 0a 24 74 68 69 73 2d 3e 73 75 67 67 65 73 74 65 64 50 61 | rter):.self.{.$this->suggestedPa |
bd2c0 | 63 6b 61 67 65 73 52 65 70 6f 72 74 65 72 20 3d 20 24 73 75 67 67 65 73 74 65 64 50 61 63 6b 61 | ckagesReporter.=.$suggestedPacka |
bd2e0 | 67 65 73 52 65 70 6f 72 74 65 72 3b 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 3b 0a 7d 0a 7d 0a | gesReporter;..return.$this;.}.}. |
bd300 | 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a | <?php.declare(strict_types=1);.. |
bd320 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 49 6e 73 | ..........namespace.Composer\Ins |
bd340 | 74 61 6c 6c 65 72 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 4f 5c 49 4f 49 6e 74 65 72 | taller;..use.Composer\IO\IOInter |
bd360 | 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 50 61 63 6b 61 | face;.use.Composer\Package\Packa |
bd380 | 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 63 72 65 5c 50 | geInterface;.use.Composer\Pcre\P |
bd3a0 | 72 65 67 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 46 69 6c 65 73 79 73 74 65 | reg;.use.Composer\Util\Filesyste |
bd3c0 | 6d 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 6c 61 74 66 6f 72 6d 3b 0a 75 | m;.use.Composer\Util\Platform;.u |
bd3e0 | 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 | se.Composer\Util\ProcessExecutor |
bd400 | 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 53 69 6c 65 6e 63 65 72 3b 0a 0a 0a | ;.use.Composer\Util\Silencer;... |
bd420 | 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 42 69 6e 61 72 79 49 6e 73 74 61 6c 6c 65 72 0a 7b 0a 0a 70 | ......class.BinaryInstaller.{..p |
bd440 | 72 6f 74 65 63 74 65 64 20 24 62 69 6e 44 69 72 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 62 69 | rotected.$binDir;..protected.$bi |
bd460 | 6e 43 6f 6d 70 61 74 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 69 6f 3b 0a 0a 70 72 6f 74 65 63 | nCompat;..protected.$io;..protec |
bd480 | 74 65 64 20 24 66 69 6c 65 73 79 73 74 65 6d 3b 0a 0a 70 72 69 76 61 74 65 20 24 76 65 6e 64 6f | ted.$filesystem;..private.$vendo |
bd4a0 | 72 44 69 72 3b 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 | rDir;.....public.function.__cons |
bd4c0 | 74 72 75 63 74 28 49 4f 49 6e 74 65 72 66 61 63 65 20 24 69 6f 2c 20 73 74 72 69 6e 67 20 24 62 | truct(IOInterface.$io,.string.$b |
bd4e0 | 69 6e 44 69 72 2c 20 73 74 72 69 6e 67 20 24 62 69 6e 43 6f 6d 70 61 74 2c 20 3f 46 69 6c 65 73 | inDir,.string.$binCompat,.?Files |
bd500 | 79 73 74 65 6d 20 24 66 69 6c 65 73 79 73 74 65 6d 20 3d 20 6e 75 6c 6c 2c 20 3f 73 74 72 69 6e | ystem.$filesystem.=.null,.?strin |
bd520 | 67 20 24 76 65 6e 64 6f 72 44 69 72 20 3d 20 6e 75 6c 6c 29 0a 7b 0a 24 74 68 69 73 2d 3e 62 69 | g.$vendorDir.=.null).{.$this->bi |
bd540 | 6e 44 69 72 20 3d 20 24 62 69 6e 44 69 72 3b 0a 24 74 68 69 73 2d 3e 62 69 6e 43 6f 6d 70 61 74 | nDir.=.$binDir;.$this->binCompat |
bd560 | 20 3d 20 24 62 69 6e 43 6f 6d 70 61 74 3b 0a 24 74 68 69 73 2d 3e 69 6f 20 3d 20 24 69 6f 3b 0a | .=.$binCompat;.$this->io.=.$io;. |
bd580 | 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 73 74 65 6d 20 3d 20 24 66 69 6c 65 73 79 73 74 65 6d 20 | $this->filesystem.=.$filesystem. |
bd5a0 | 3f 3a 20 6e 65 77 20 46 69 6c 65 73 79 73 74 65 6d 28 29 3b 0a 24 74 68 69 73 2d 3e 76 65 6e 64 | ?:.new.Filesystem();.$this->vend |
bd5c0 | 6f 72 44 69 72 20 3d 20 24 76 65 6e 64 6f 72 44 69 72 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 | orDir.=.$vendorDir;.}..public.fu |
bd5e0 | 6e 63 74 69 6f 6e 20 69 6e 73 74 61 6c 6c 42 69 6e 61 72 69 65 73 28 50 61 63 6b 61 67 65 49 6e | nction.installBinaries(PackageIn |
bd600 | 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 69 6e 73 74 61 6c | terface.$package,.string.$instal |
bd620 | 6c 50 61 74 68 2c 20 62 6f 6f 6c 20 24 77 61 72 6e 4f 6e 4f 76 65 72 77 72 69 74 65 20 3d 20 74 | lPath,.bool.$warnOnOverwrite.=.t |
bd640 | 72 75 65 29 3a 20 76 6f 69 64 0a 7b 0a 24 62 69 6e 61 72 69 65 73 20 3d 20 24 74 68 69 73 2d 3e | rue):.void.{.$binaries.=.$this-> |
bd660 | 67 65 74 42 69 6e 61 72 69 65 73 28 24 70 61 63 6b 61 67 65 29 3b 0a 69 66 20 28 21 24 62 69 6e | getBinaries($package);.if.(!$bin |
bd680 | 61 72 69 65 73 29 20 7b 0a 72 65 74 75 72 6e 3b 0a 7d 0a 0a 50 6c 61 74 66 6f 72 6d 3a 3a 77 6f | aries).{.return;.}..Platform::wo |
bd6a0 | 72 6b 61 72 6f 75 6e 64 46 69 6c 65 73 79 73 74 65 6d 49 73 73 75 65 73 28 29 3b 0a 0a 66 6f 72 | rkaroundFilesystemIssues();..for |
bd6c0 | 65 61 63 68 20 28 24 62 69 6e 61 72 69 65 73 20 61 73 20 24 62 69 6e 29 20 7b 0a 24 62 69 6e 50 | each.($binaries.as.$bin).{.$binP |
bd6e0 | 61 74 68 20 3d 20 24 69 6e 73 74 61 6c 6c 50 61 74 68 2e 27 2f 27 2e 24 62 69 6e 3b 0a 69 66 20 | ath.=.$installPath.'/'.$bin;.if. |
bd700 | 28 21 66 69 6c 65 5f 65 78 69 73 74 73 28 24 62 69 6e 50 61 74 68 29 29 20 7b 0a 24 74 68 69 73 | (!file_exists($binPath)).{.$this |
bd720 | 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 20 20 20 20 3c 77 61 72 6e 69 6e 67 3e 53 | ->io->writeError('....<warning>S |
bd740 | 6b 69 70 70 65 64 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 6f 66 20 62 69 6e 20 27 2e 24 62 69 | kipped.installation.of.bin.'.$bi |
bd760 | 6e 2e 27 20 66 6f 72 20 70 61 63 6b 61 67 65 20 27 2e 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e | n.'.for.package.'.$package->getN |
bd780 | 61 6d 65 28 29 2e 27 3a 20 66 69 6c 65 20 6e 6f 74 20 66 6f 75 6e 64 20 69 6e 20 70 61 63 6b 61 | ame().':.file.not.found.in.packa |
bd7a0 | 67 65 3c 2f 77 61 72 6e 69 6e 67 3e 27 29 3b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 69 66 20 28 | ge</warning>');.continue;.}.if.( |
bd7c0 | 69 73 5f 64 69 72 28 24 62 69 6e 50 61 74 68 29 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 | is_dir($binPath)).{.$this->io->w |
bd7e0 | 72 69 74 65 45 72 72 6f 72 28 27 20 20 20 20 3c 77 61 72 6e 69 6e 67 3e 53 6b 69 70 70 65 64 20 | riteError('....<warning>Skipped. |
bd800 | 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 6f 66 20 62 69 6e 20 27 2e 24 62 69 6e 2e 27 20 66 6f 72 | installation.of.bin.'.$bin.'.for |
bd820 | 20 70 61 63 6b 61 67 65 20 27 2e 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 2e 27 | .package.'.$package->getName().' |
bd840 | 3a 20 66 6f 75 6e 64 20 61 20 64 69 72 65 63 74 6f 72 79 20 61 74 20 74 68 61 74 20 70 61 74 68 | :.found.a.directory.at.that.path |
bd860 | 3c 2f 77 61 72 6e 69 6e 67 3e 27 29 3b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 69 66 20 28 21 24 | </warning>');.continue;.}.if.(!$ |
bd880 | 74 68 69 73 2d 3e 66 69 6c 65 73 79 73 74 65 6d 2d 3e 69 73 41 62 73 6f 6c 75 74 65 50 61 74 68 | this->filesystem->isAbsolutePath |
bd8a0 | 28 24 62 69 6e 50 61 74 68 29 29 20 7b 0a 0a 0a 0a 0a 24 62 69 6e 50 61 74 68 20 3d 20 72 65 61 | ($binPath)).{.....$binPath.=.rea |
bd8c0 | 6c 70 61 74 68 28 24 62 69 6e 50 61 74 68 29 3b 0a 7d 0a 24 74 68 69 73 2d 3e 69 6e 69 74 69 61 | lpath($binPath);.}.$this->initia |
bd8e0 | 6c 69 7a 65 42 69 6e 44 69 72 28 29 3b 0a 24 6c 69 6e 6b 20 3d 20 24 74 68 69 73 2d 3e 62 69 6e | lizeBinDir();.$link.=.$this->bin |
bd900 | 44 69 72 2e 27 2f 27 2e 62 61 73 65 6e 61 6d 65 28 24 62 69 6e 29 3b 0a 69 66 20 28 66 69 6c 65 | Dir.'/'.basename($bin);.if.(file |
bd920 | 5f 65 78 69 73 74 73 28 24 6c 69 6e 6b 29 29 20 7b 0a 69 66 20 28 21 69 73 5f 6c 69 6e 6b 28 24 | _exists($link)).{.if.(!is_link($ |
bd940 | 6c 69 6e 6b 29 29 20 7b 0a 69 66 20 28 24 77 61 72 6e 4f 6e 4f 76 65 72 77 72 69 74 65 29 20 7b | link)).{.if.($warnOnOverwrite).{ |
bd960 | 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 20 20 20 20 53 6b 69 70 | .$this->io->writeError('....Skip |
bd980 | 70 65 64 20 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 6f 66 20 62 69 6e 20 27 2e 24 62 69 6e 2e 27 | ped.installation.of.bin.'.$bin.' |
bd9a0 | 20 66 6f 72 20 70 61 63 6b 61 67 65 20 27 2e 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 | .for.package.'.$package->getName |
bd9c0 | 28 29 2e 27 3a 20 6e 61 6d 65 20 63 6f 6e 66 6c 69 63 74 73 20 77 69 74 68 20 61 6e 20 65 78 69 | ().':.name.conflicts.with.an.exi |
bd9e0 | 73 74 69 6e 67 20 66 69 6c 65 27 29 3b 0a 7d 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 69 66 20 28 | sting.file');.}.continue;.}.if.( |
bda00 | 72 65 61 6c 70 61 74 68 28 24 6c 69 6e 6b 29 20 3d 3d 3d 20 72 65 61 6c 70 61 74 68 28 24 62 69 | realpath($link).===.realpath($bi |
bda20 | 6e 50 61 74 68 29 29 20 7b 0a 0a 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 73 74 65 6d 2d 3e 75 6e | nPath)).{..$this->filesystem->un |
bda40 | 6c 69 6e 6b 28 24 6c 69 6e 6b 29 3b 0a 7d 0a 7d 0a 0a 24 62 69 6e 43 6f 6d 70 61 74 20 3d 20 24 | link($link);.}.}..$binCompat.=.$ |
bda60 | 74 68 69 73 2d 3e 62 69 6e 43 6f 6d 70 61 74 3b 0a 69 66 20 28 24 62 69 6e 43 6f 6d 70 61 74 20 | this->binCompat;.if.($binCompat. |
bda80 | 3d 3d 3d 20 22 61 75 74 6f 22 20 26 26 20 28 50 6c 61 74 66 6f 72 6d 3a 3a 69 73 57 69 6e 64 6f | ===."auto".&&.(Platform::isWindo |
bdaa0 | 77 73 28 29 20 7c 7c 20 50 6c 61 74 66 6f 72 6d 3a 3a 69 73 57 69 6e 64 6f 77 73 53 75 62 73 79 | ws().||.Platform::isWindowsSubsy |
bdac0 | 73 74 65 6d 46 6f 72 4c 69 6e 75 78 28 29 29 29 20 7b 0a 24 62 69 6e 43 6f 6d 70 61 74 20 3d 20 | stemForLinux())).{.$binCompat.=. |
bdae0 | 27 66 75 6c 6c 27 3b 0a 7d 0a 0a 69 66 20 28 24 62 69 6e 43 6f 6d 70 61 74 20 3d 3d 3d 20 22 66 | 'full';.}..if.($binCompat.===."f |
bdb00 | 75 6c 6c 22 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6e 73 74 61 6c 6c 46 75 6c 6c 42 69 6e 61 72 69 | ull").{.$this->installFullBinari |
bdb20 | 65 73 28 24 62 69 6e 50 61 74 68 2c 20 24 6c 69 6e 6b 2c 20 24 62 69 6e 2c 20 24 70 61 63 6b 61 | es($binPath,.$link,.$bin,.$packa |
bdb40 | 67 65 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 74 68 69 73 2d 3e 69 6e 73 74 61 6c 6c 55 6e 69 78 | ge);.}.else.{.$this->installUnix |
bdb60 | 79 50 72 6f 78 79 42 69 6e 61 72 69 65 73 28 24 62 69 6e 50 61 74 68 2c 20 24 6c 69 6e 6b 29 3b | yProxyBinaries($binPath,.$link); |
bdb80 | 0a 7d 0a 53 69 6c 65 6e 63 65 72 3a 3a 63 61 6c 6c 28 27 63 68 6d 6f 64 27 2c 20 24 62 69 6e 50 | .}.Silencer::call('chmod',.$binP |
bdba0 | 61 74 68 2c 20 30 37 37 37 20 26 20 7e 75 6d 61 73 6b 28 29 29 3b 0a 7d 0a 7d 0a 0a 70 75 62 6c | ath,.0777.&.~umask());.}.}..publ |
bdbc0 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 72 65 6d 6f 76 65 42 69 6e 61 72 69 65 73 28 50 61 63 6b 61 | ic.function.removeBinaries(Packa |
bdbe0 | 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 | geInterface.$package):.void.{.$t |
bdc00 | 68 69 73 2d 3e 69 6e 69 74 69 61 6c 69 7a 65 42 69 6e 44 69 72 28 29 3b 0a 0a 24 62 69 6e 61 72 | his->initializeBinDir();..$binar |
bdc20 | 69 65 73 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 42 69 6e 61 72 69 65 73 28 24 70 61 63 6b 61 67 | ies.=.$this->getBinaries($packag |
bdc40 | 65 29 3b 0a 69 66 20 28 21 24 62 69 6e 61 72 69 65 73 29 20 7b 0a 72 65 74 75 72 6e 3b 0a 7d 0a | e);.if.(!$binaries).{.return;.}. |
bdc60 | 66 6f 72 65 61 63 68 20 28 24 62 69 6e 61 72 69 65 73 20 61 73 20 24 62 69 6e 29 20 7b 0a 24 6c | foreach.($binaries.as.$bin).{.$l |
bdc80 | 69 6e 6b 20 3d 20 24 74 68 69 73 2d 3e 62 69 6e 44 69 72 2e 27 2f 27 2e 62 61 73 65 6e 61 6d 65 | ink.=.$this->binDir.'/'.basename |
bdca0 | 28 24 62 69 6e 29 3b 0a 69 66 20 28 69 73 5f 6c 69 6e 6b 28 24 6c 69 6e 6b 29 20 7c 7c 20 66 69 | ($bin);.if.(is_link($link).||.fi |
bdcc0 | 6c 65 5f 65 78 69 73 74 73 28 24 6c 69 6e 6b 29 29 20 7b 20 0a 24 74 68 69 73 2d 3e 66 69 6c 65 | le_exists($link)).{..$this->file |
bdce0 | 73 79 73 74 65 6d 2d 3e 75 6e 6c 69 6e 6b 28 24 6c 69 6e 6b 29 3b 0a 7d 0a 69 66 20 28 69 73 5f | system->unlink($link);.}.if.(is_ |
bdd00 | 66 69 6c 65 28 24 6c 69 6e 6b 2e 27 2e 62 61 74 27 29 29 20 7b 0a 24 74 68 69 73 2d 3e 66 69 6c | file($link.'.bat')).{.$this->fil |
bdd20 | 65 73 79 73 74 65 6d 2d 3e 75 6e 6c 69 6e 6b 28 24 6c 69 6e 6b 2e 27 2e 62 61 74 27 29 3b 0a 7d | esystem->unlink($link.'.bat');.} |
bdd40 | 0a 7d 0a 0a 0a 69 66 20 28 69 73 5f 64 69 72 28 24 74 68 69 73 2d 3e 62 69 6e 44 69 72 29 20 26 | .}...if.(is_dir($this->binDir).& |
bdd60 | 26 20 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 73 74 65 6d 2d 3e 69 73 44 69 72 45 6d 70 74 79 28 | &.$this->filesystem->isDirEmpty( |
bdd80 | 24 74 68 69 73 2d 3e 62 69 6e 44 69 72 29 29 20 7b 0a 53 69 6c 65 6e 63 65 72 3a 3a 63 61 6c 6c | $this->binDir)).{.Silencer::call |
bdda0 | 28 27 72 6d 64 69 72 27 2c 20 24 74 68 69 73 2d 3e 62 69 6e 44 69 72 29 3b 0a 7d 0a 7d 0a 0a 70 | ('rmdir',.$this->binDir);.}.}..p |
bddc0 | 75 62 6c 69 63 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 64 65 74 65 72 6d 69 6e 65 42 | ublic.static.function.determineB |
bdde0 | 69 6e 61 72 79 43 61 6c 6c 65 72 28 73 74 72 69 6e 67 20 24 62 69 6e 29 3a 20 73 74 72 69 6e 67 | inaryCaller(string.$bin):.string |
bde00 | 0a 7b 0a 69 66 20 28 27 2e 62 61 74 27 20 3d 3d 3d 20 73 75 62 73 74 72 28 24 62 69 6e 2c 20 2d | .{.if.('.bat'.===.substr($bin,.- |
bde20 | 34 29 20 7c 7c 20 27 2e 65 78 65 27 20 3d 3d 3d 20 73 75 62 73 74 72 28 24 62 69 6e 2c 20 2d 34 | 4).||.'.exe'.===.substr($bin,.-4 |
bde40 | 29 29 20 7b 0a 72 65 74 75 72 6e 20 27 63 61 6c 6c 27 3b 0a 7d 0a 0a 24 68 61 6e 64 6c 65 20 3d | )).{.return.'call';.}..$handle.= |
bde60 | 20 66 6f 70 65 6e 28 24 62 69 6e 2c 20 27 72 27 29 3b 0a 24 6c 69 6e 65 20 3d 20 66 67 65 74 73 | .fopen($bin,.'r');.$line.=.fgets |
bde80 | 28 24 68 61 6e 64 6c 65 29 3b 0a 66 63 6c 6f 73 65 28 24 68 61 6e 64 6c 65 29 3b 0a 69 66 20 28 | ($handle);.fclose($handle);.if.( |
bdea0 | 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b 5e 23 21 2f 28 3f 3a 75 73 72 2f 62 69 6e 2f 65 | Preg::isMatch('{^#!/(?:usr/bin/e |
bdec0 | 6e 76 20 29 3f 28 3f 3a 5b 5e 2f 5d 2b 2f 29 2a 28 2e 2b 29 24 7d 6d 27 2c 20 24 6c 69 6e 65 2c | nv.)?(?:[^/]+/)*(.+)$}m',.$line, |
bdee0 | 20 24 6d 61 74 63 68 29 29 20 7b 0a 72 65 74 75 72 6e 20 74 72 69 6d 28 24 6d 61 74 63 68 5b 31 | .$match)).{.return.trim($match[1 |
bdf00 | 5d 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 27 70 68 70 27 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 | ]);.}..return.'php';.}.....prote |
bdf20 | 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 42 69 6e 61 72 69 65 73 28 50 61 63 6b 61 67 | cted.function.getBinaries(Packag |
bdf40 | 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 | eInterface.$package):.array.{.re |
bdf60 | 74 75 72 6e 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 42 69 6e 61 72 69 65 73 28 29 3b 0a 7d 0a | turn.$package->getBinaries();.}. |
bdf80 | 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 69 6e 73 74 61 6c 6c 46 75 6c 6c 42 | .protected.function.installFullB |
bdfa0 | 69 6e 61 72 69 65 73 28 73 74 72 69 6e 67 20 24 62 69 6e 50 61 74 68 2c 20 73 74 72 69 6e 67 20 | inaries(string.$binPath,.string. |
bdfc0 | 24 6c 69 6e 6b 2c 20 73 74 72 69 6e 67 20 24 62 69 6e 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 | $link,.string.$bin,.PackageInter |
bdfe0 | 66 61 63 65 20 24 70 61 63 6b 61 67 65 29 3a 20 76 6f 69 64 0a 7b 0a 0a 69 66 20 28 27 2e 62 61 | face.$package):.void.{..if.('.ba |
be000 | 74 27 20 21 3d 3d 20 73 75 62 73 74 72 28 24 62 69 6e 50 61 74 68 2c 20 2d 34 29 29 20 7b 0a 24 | t'.!==.substr($binPath,.-4)).{.$ |
be020 | 74 68 69 73 2d 3e 69 6e 73 74 61 6c 6c 55 6e 69 78 79 50 72 6f 78 79 42 69 6e 61 72 69 65 73 28 | this->installUnixyProxyBinaries( |
be040 | 24 62 69 6e 50 61 74 68 2c 20 24 6c 69 6e 6b 29 3b 0a 24 6c 69 6e 6b 20 2e 3d 20 27 2e 62 61 74 | $binPath,.$link);.$link..=.'.bat |
be060 | 27 3b 0a 69 66 20 28 66 69 6c 65 5f 65 78 69 73 74 73 28 24 6c 69 6e 6b 29 29 20 7b 0a 24 74 68 | ';.if.(file_exists($link)).{.$th |
be080 | 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 20 20 20 20 53 6b 69 70 70 65 64 20 | is->io->writeError('....Skipped. |
be0a0 | 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 20 6f 66 20 62 69 6e 20 27 2e 24 62 69 6e 2e 27 2e 62 61 74 | installation.of.bin.'.$bin.'.bat |
be0c0 | 20 70 72 6f 78 79 20 66 6f 72 20 70 61 63 6b 61 67 65 20 27 2e 24 70 61 63 6b 61 67 65 2d 3e 67 | .proxy.for.package.'.$package->g |
be0e0 | 65 74 4e 61 6d 65 28 29 2e 27 3a 20 61 20 2e 62 61 74 20 70 72 6f 78 79 20 77 61 73 20 61 6c 72 | etName().':.a..bat.proxy.was.alr |
be100 | 65 61 64 79 20 69 6e 73 74 61 6c 6c 65 64 27 29 3b 0a 7d 0a 7d 0a 69 66 20 28 21 66 69 6c 65 5f | eady.installed');.}.}.if.(!file_ |
be120 | 65 78 69 73 74 73 28 24 6c 69 6e 6b 29 29 20 7b 0a 66 69 6c 65 5f 70 75 74 5f 63 6f 6e 74 65 6e | exists($link)).{.file_put_conten |
be140 | 74 73 28 24 6c 69 6e 6b 2c 20 24 74 68 69 73 2d 3e 67 65 6e 65 72 61 74 65 57 69 6e 64 6f 77 73 | ts($link,.$this->generateWindows |
be160 | 50 72 6f 78 79 43 6f 64 65 28 24 62 69 6e 50 61 74 68 2c 20 24 6c 69 6e 6b 29 29 3b 0a 53 69 6c | ProxyCode($binPath,.$link));.Sil |
be180 | 65 6e 63 65 72 3a 3a 63 61 6c 6c 28 27 63 68 6d 6f 64 27 2c 20 24 6c 69 6e 6b 2c 20 30 37 37 37 | encer::call('chmod',.$link,.0777 |
be1a0 | 20 26 20 7e 75 6d 61 73 6b 28 29 29 3b 0a 7d 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e | .&.~umask());.}.}..protected.fun |
be1c0 | 63 74 69 6f 6e 20 69 6e 73 74 61 6c 6c 55 6e 69 78 79 50 72 6f 78 79 42 69 6e 61 72 69 65 73 28 | ction.installUnixyProxyBinaries( |
be1e0 | 73 74 72 69 6e 67 20 24 62 69 6e 50 61 74 68 2c 20 73 74 72 69 6e 67 20 24 6c 69 6e 6b 29 3a 20 | string.$binPath,.string.$link):. |
be200 | 76 6f 69 64 0a 7b 0a 66 69 6c 65 5f 70 75 74 5f 63 6f 6e 74 65 6e 74 73 28 24 6c 69 6e 6b 2c 20 | void.{.file_put_contents($link,. |
be220 | 24 74 68 69 73 2d 3e 67 65 6e 65 72 61 74 65 55 6e 69 78 79 50 72 6f 78 79 43 6f 64 65 28 24 62 | $this->generateUnixyProxyCode($b |
be240 | 69 6e 50 61 74 68 2c 20 24 6c 69 6e 6b 29 29 3b 0a 53 69 6c 65 6e 63 65 72 3a 3a 63 61 6c 6c 28 | inPath,.$link));.Silencer::call( |
be260 | 27 63 68 6d 6f 64 27 2c 20 24 6c 69 6e 6b 2c 20 30 37 37 37 20 26 20 7e 75 6d 61 73 6b 28 29 29 | 'chmod',.$link,.0777.&.~umask()) |
be280 | 3b 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 69 6e 69 74 69 61 6c 69 | ;.}..protected.function.initiali |
be2a0 | 7a 65 42 69 6e 44 69 72 28 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 | zeBinDir():.void.{.$this->filesy |
be2c0 | 73 74 65 6d 2d 3e 65 6e 73 75 72 65 44 69 72 65 63 74 6f 72 79 45 78 69 73 74 73 28 24 74 68 69 | stem->ensureDirectoryExists($thi |
be2e0 | 73 2d 3e 62 69 6e 44 69 72 29 3b 0a 24 74 68 69 73 2d 3e 62 69 6e 44 69 72 20 3d 20 72 65 61 6c | s->binDir);.$this->binDir.=.real |
be300 | 70 61 74 68 28 24 74 68 69 73 2d 3e 62 69 6e 44 69 72 29 3b 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 | path($this->binDir);.}..protecte |
be320 | 64 20 66 75 6e 63 74 69 6f 6e 20 67 65 6e 65 72 61 74 65 57 69 6e 64 6f 77 73 50 72 6f 78 79 43 | d.function.generateWindowsProxyC |
be340 | 6f 64 65 28 73 74 72 69 6e 67 20 24 62 69 6e 2c 20 73 74 72 69 6e 67 20 24 6c 69 6e 6b 29 3a 20 | ode(string.$bin,.string.$link):. |
be360 | 73 74 72 69 6e 67 0a 7b 0a 24 62 69 6e 50 61 74 68 20 3d 20 24 74 68 69 73 2d 3e 66 69 6c 65 73 | string.{.$binPath.=.$this->files |
be380 | 79 73 74 65 6d 2d 3e 66 69 6e 64 53 68 6f 72 74 65 73 74 50 61 74 68 28 24 6c 69 6e 6b 2c 20 24 | ystem->findShortestPath($link,.$ |
be3a0 | 62 69 6e 29 3b 0a 24 63 61 6c 6c 65 72 20 3d 20 73 65 6c 66 3a 3a 64 65 74 65 72 6d 69 6e 65 42 | bin);.$caller.=.self::determineB |
be3c0 | 69 6e 61 72 79 43 61 6c 6c 65 72 28 24 62 69 6e 29 3b 0a 0a 0a 0a 0a 69 66 20 28 24 63 61 6c 6c | inaryCaller($bin);.....if.($call |
be3e0 | 65 72 20 3d 3d 3d 20 27 70 68 70 27 29 20 7b 0a 72 65 74 75 72 6e 20 22 40 45 43 48 4f 20 4f 46 | er.===.'php').{.return."@ECHO.OF |
be400 | 46 5c 72 5c 6e 22 2e 0a 22 73 65 74 6c 6f 63 61 6c 20 44 49 53 41 42 4c 45 44 45 4c 41 59 45 44 | F\r\n".."setlocal.DISABLEDELAYED |
be420 | 45 58 50 41 4e 53 49 4f 4e 5c 72 5c 6e 22 2e 0a 22 53 45 54 20 42 49 4e 5f 54 41 52 47 45 54 3d | EXPANSION\r\n".."SET.BIN_TARGET= |
be440 | 25 7e 64 70 30 2f 22 2e 74 72 69 6d 28 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3a 3a 65 73 | %~dp0/".trim(ProcessExecutor::es |
be460 | 63 61 70 65 28 62 61 73 65 6e 61 6d 65 28 24 6c 69 6e 6b 2c 20 27 2e 62 61 74 27 29 29 2c 20 27 | cape(basename($link,.'.bat')),.' |
be480 | 22 5c 27 27 29 2e 22 5c 72 5c 6e 22 2e 0a 22 53 45 54 20 43 4f 4d 50 4f 53 45 52 5f 52 55 4e 54 | "\'')."\r\n".."SET.COMPOSER_RUNT |
be4a0 | 49 4d 45 5f 42 49 4e 5f 44 49 52 3d 25 7e 64 70 30 5c 72 5c 6e 22 2e 0a 22 7b 24 63 61 6c 6c 65 | IME_BIN_DIR=%~dp0\r\n".."{$calle |
be4c0 | 72 7d 20 5c 22 25 42 49 4e 5f 54 41 52 47 45 54 25 5c 22 20 25 2a 5c 72 5c 6e 22 3b 0a 7d 0a 0a | r}.\"%BIN_TARGET%\".%*\r\n";.}.. |
be4e0 | 72 65 74 75 72 6e 20 22 40 45 43 48 4f 20 4f 46 46 5c 72 5c 6e 22 2e 0a 22 73 65 74 6c 6f 63 61 | return."@ECHO.OFF\r\n".."setloca |
be500 | 6c 20 44 49 53 41 42 4c 45 44 45 4c 41 59 45 44 45 58 50 41 4e 53 49 4f 4e 5c 72 5c 6e 22 2e 0a | l.DISABLEDELAYEDEXPANSION\r\n".. |
be520 | 22 53 45 54 20 42 49 4e 5f 54 41 52 47 45 54 3d 25 7e 64 70 30 2f 22 2e 74 72 69 6d 28 50 72 6f | "SET.BIN_TARGET=%~dp0/".trim(Pro |
be540 | 63 65 73 73 45 78 65 63 75 74 6f 72 3a 3a 65 73 63 61 70 65 28 24 62 69 6e 50 61 74 68 29 2c 20 | cessExecutor::escape($binPath),. |
be560 | 27 22 5c 27 27 29 2e 22 5c 72 5c 6e 22 2e 0a 22 53 45 54 20 43 4f 4d 50 4f 53 45 52 5f 52 55 4e | '"\'')."\r\n".."SET.COMPOSER_RUN |
be580 | 54 49 4d 45 5f 42 49 4e 5f 44 49 52 3d 25 7e 64 70 30 5c 72 5c 6e 22 2e 0a 22 7b 24 63 61 6c 6c | TIME_BIN_DIR=%~dp0\r\n".."{$call |
be5a0 | 65 72 7d 20 5c 22 25 42 49 4e 5f 54 41 52 47 45 54 25 5c 22 20 25 2a 5c 72 5c 6e 22 3b 0a 7d 0a | er}.\"%BIN_TARGET%\".%*\r\n";.}. |
be5c0 | 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 67 65 6e 65 72 61 74 65 55 6e 69 78 | .protected.function.generateUnix |
be5e0 | 79 50 72 6f 78 79 43 6f 64 65 28 73 74 72 69 6e 67 20 24 62 69 6e 2c 20 73 74 72 69 6e 67 20 24 | yProxyCode(string.$bin,.string.$ |
be600 | 6c 69 6e 6b 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 24 62 69 6e 50 61 74 68 20 3d 20 24 74 68 69 73 | link):.string.{.$binPath.=.$this |
be620 | 2d 3e 66 69 6c 65 73 79 73 74 65 6d 2d 3e 66 69 6e 64 53 68 6f 72 74 65 73 74 50 61 74 68 28 24 | ->filesystem->findShortestPath($ |
be640 | 6c 69 6e 6b 2c 20 24 62 69 6e 29 3b 0a 0a 24 62 69 6e 44 69 72 20 3d 20 50 72 6f 63 65 73 73 45 | link,.$bin);..$binDir.=.ProcessE |
be660 | 78 65 63 75 74 6f 72 3a 3a 65 73 63 61 70 65 28 64 69 72 6e 61 6d 65 28 24 62 69 6e 50 61 74 68 | xecutor::escape(dirname($binPath |
be680 | 29 29 3b 0a 24 62 69 6e 46 69 6c 65 20 3d 20 62 61 73 65 6e 61 6d 65 28 24 62 69 6e 50 61 74 68 | ));.$binFile.=.basename($binPath |
be6a0 | 29 3b 0a 0a 24 62 69 6e 43 6f 6e 74 65 6e 74 73 20 3d 20 66 69 6c 65 5f 67 65 74 5f 63 6f 6e 74 | );..$binContents.=.file_get_cont |
be6c0 | 65 6e 74 73 28 24 62 69 6e 29 3b 0a 0a 0a 69 66 20 28 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 | ents($bin);...if.(Preg::isMatch( |
be6e0 | 27 7b 5e 28 23 21 2e 2a 5c 72 3f 5c 6e 29 3f 5b 5c 72 5c 6e 5c 74 20 5d 2a 3c 5c 3f 70 68 70 7d | '{^(#!.*\r?\n)?[\r\n\t.]*<\?php} |
be700 | 27 2c 20 24 62 69 6e 43 6f 6e 74 65 6e 74 73 2c 20 24 6d 61 74 63 68 29 29 20 7b 0a 0a 24 70 72 | ',.$binContents,.$match)).{..$pr |
be720 | 6f 78 79 43 6f 64 65 20 3d 20 65 6d 70 74 79 28 24 6d 61 74 63 68 5b 31 5d 29 20 3f 20 27 23 21 | oxyCode.=.empty($match[1]).?.'#! |
be740 | 2f 75 73 72 2f 62 69 6e 2f 65 6e 76 20 70 68 70 27 20 3a 20 74 72 69 6d 28 24 6d 61 74 63 68 5b | /usr/bin/env.php'.:.trim($match[ |
be760 | 31 5d 29 3b 0a 24 62 69 6e 50 61 74 68 45 78 70 6f 72 74 65 64 20 3d 20 24 74 68 69 73 2d 3e 66 | 1]);.$binPathExported.=.$this->f |
be780 | 69 6c 65 73 79 73 74 65 6d 2d 3e 66 69 6e 64 53 68 6f 72 74 65 73 74 50 61 74 68 43 6f 64 65 28 | ilesystem->findShortestPathCode( |
be7a0 | 24 6c 69 6e 6b 2c 20 24 62 69 6e 2c 20 66 61 6c 73 65 2c 20 74 72 75 65 29 3b 0a 24 73 74 72 65 | $link,.$bin,.false,.true);.$stre |
be7c0 | 61 6d 50 72 6f 78 79 43 6f 64 65 20 3d 20 24 73 74 72 65 61 6d 48 69 6e 74 20 3d 20 27 27 3b 0a | amProxyCode.=.$streamHint.=.'';. |
be7e0 | 24 67 6c 6f 62 61 6c 73 43 6f 64 65 20 3d 20 27 24 47 4c 4f 42 41 4c 53 5b 5c 27 5f 63 6f 6d 70 | $globalsCode.=.'$GLOBALS[\'_comp |
be800 | 6f 73 65 72 5f 62 69 6e 5f 64 69 72 5c 27 5d 20 3d 20 5f 5f 44 49 52 5f 5f 3b 27 2e 22 5c 6e 22 | oser_bin_dir\'].=.__DIR__;'."\n" |
be820 | 3b 0a 24 70 68 70 75 6e 69 74 48 61 63 6b 31 20 3d 20 24 70 68 70 75 6e 69 74 48 61 63 6b 32 20 | ;.$phpunitHack1.=.$phpunitHack2. |
be840 | 3d 20 27 27 3b 0a 0a 69 66 20 28 24 74 68 69 73 2d 3e 76 65 6e 64 6f 72 44 69 72 29 20 7b 0a 24 | =.'';..if.($this->vendorDir).{.$ |
be860 | 67 6c 6f 62 61 6c 73 43 6f 64 65 20 2e 3d 20 27 24 47 4c 4f 42 41 4c 53 5b 5c 27 5f 63 6f 6d 70 | globalsCode..=.'$GLOBALS[\'_comp |
be880 | 6f 73 65 72 5f 61 75 74 6f 6c 6f 61 64 5f 70 61 74 68 5c 27 5d 20 3d 20 27 20 2e 20 24 74 68 69 | oser_autoload_path\'].=.'...$thi |
be8a0 | 73 2d 3e 66 69 6c 65 73 79 73 74 65 6d 2d 3e 66 69 6e 64 53 68 6f 72 74 65 73 74 50 61 74 68 43 | s->filesystem->findShortestPathC |
be8c0 | 6f 64 65 28 24 6c 69 6e 6b 2c 20 24 74 68 69 73 2d 3e 76 65 6e 64 6f 72 44 69 72 20 2e 20 27 2f | ode($link,.$this->vendorDir...'/ |
be8e0 | 61 75 74 6f 6c 6f 61 64 2e 70 68 70 27 2c 20 66 61 6c 73 65 2c 20 74 72 75 65 29 2e 22 3b 5c 6e | autoload.php',.false,.true).";\n |
be900 | 22 3b 0a 7d 0a 0a 69 66 20 28 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 73 74 65 6d 2d 3e 6e 6f 72 | ";.}..if.($this->filesystem->nor |
be920 | 6d 61 6c 69 7a 65 50 61 74 68 28 24 62 69 6e 29 20 3d 3d 3d 20 24 74 68 69 73 2d 3e 66 69 6c 65 | malizePath($bin).===.$this->file |
be940 | 73 79 73 74 65 6d 2d 3e 6e 6f 72 6d 61 6c 69 7a 65 50 61 74 68 28 24 74 68 69 73 2d 3e 76 65 6e | system->normalizePath($this->ven |
be960 | 64 6f 72 44 69 72 2e 27 2f 70 68 70 75 6e 69 74 2f 70 68 70 75 6e 69 74 2f 70 68 70 75 6e 69 74 | dorDir.'/phpunit/phpunit/phpunit |
be980 | 27 29 29 20 7b 0a 0a 24 67 6c 6f 62 61 6c 73 43 6f 64 65 20 2e 3d 20 27 24 47 4c 4f 42 41 4c 53 | ')).{..$globalsCode..=.'$GLOBALS |
be9a0 | 5b 5c 27 5f 5f 50 48 50 55 4e 49 54 5f 49 53 4f 4c 41 54 49 4f 4e 5f 45 58 43 4c 55 44 45 5f 4c | [\'__PHPUNIT_ISOLATION_EXCLUDE_L |
be9c0 | 49 53 54 5c 27 5d 20 3d 20 24 47 4c 4f 42 41 4c 53 5b 5c 27 5f 5f 50 48 50 55 4e 49 54 5f 49 53 | IST\'].=.$GLOBALS[\'__PHPUNIT_IS |
be9e0 | 4f 4c 41 54 49 4f 4e 5f 42 4c 41 43 4b 4c 49 53 54 5c 27 5d 20 3d 20 61 72 72 61 79 28 72 65 61 | OLATION_BLACKLIST\'].=.array(rea |
bea00 | 6c 70 61 74 68 28 27 2e 24 62 69 6e 50 61 74 68 45 78 70 6f 72 74 65 64 2e 27 29 29 3b 27 2e 22 | lpath('.$binPathExported.'));'." |
bea20 | 5c 6e 22 3b 0a 0a 24 70 68 70 75 6e 69 74 48 61 63 6b 31 20 3d 20 22 27 70 68 70 76 66 73 63 6f | \n";..$phpunitHack1.=."'phpvfsco |
bea40 | 6d 70 6f 73 65 72 3a 2f 2f 27 2e 22 3b 0a 24 70 68 70 75 6e 69 74 48 61 63 6b 32 20 3d 20 27 0a | mposer://'.";.$phpunitHack2.=.'. |
bea60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 64 61 74 61 20 3d 20 73 74 72 5f 72 65 70 6c | ................$data.=.str_repl |
bea80 | 61 63 65 28 5c 27 5f 5f 44 49 52 5f 5f 5c 27 2c 20 76 61 72 5f 65 78 70 6f 72 74 28 64 69 72 6e | ace(\'__DIR__\',.var_export(dirn |
beaa0 | 61 6d 65 28 24 74 68 69 73 2d 3e 72 65 61 6c 70 61 74 68 29 2c 20 74 72 75 65 29 2c 20 24 64 61 | ame($this->realpath),.true),.$da |
beac0 | 74 61 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 64 61 74 61 20 3d 20 73 74 72 | ta);.................$data.=.str |
beae0 | 5f 72 65 70 6c 61 63 65 28 5c 27 5f 5f 46 49 4c 45 5f 5f 5c 27 2c 20 76 61 72 5f 65 78 70 6f 72 | _replace(\'__FILE__\',.var_expor |
beb00 | 74 28 24 74 68 69 73 2d 3e 72 65 61 6c 70 61 74 68 2c 20 74 72 75 65 29 2c 20 24 64 61 74 61 29 | t($this->realpath,.true),.$data) |
beb20 | 3b 27 3b 0a 7d 0a 69 66 20 28 74 72 69 6d 28 24 6d 61 74 63 68 5b 30 5d 29 20 21 3d 3d 20 27 3c | ;';.}.if.(trim($match[0]).!==.'< |
beb40 | 3f 70 68 70 27 29 20 7b 0a 24 73 74 72 65 61 6d 48 69 6e 74 20 3d 20 27 20 75 73 69 6e 67 20 61 | ?php').{.$streamHint.=.'.using.a |
beb60 | 20 73 74 72 65 61 6d 20 77 72 61 70 70 65 72 20 74 6f 20 70 72 65 76 65 6e 74 20 74 68 65 20 73 | .stream.wrapper.to.prevent.the.s |
beb80 | 68 65 62 61 6e 67 20 66 72 6f 6d 20 62 65 69 6e 67 20 6f 75 74 70 75 74 20 6f 6e 20 50 48 50 3c | hebang.from.being.output.on.PHP< |
beba0 | 38 27 2e 22 5c 6e 20 2a 22 3b 0a 24 73 74 72 65 61 6d 50 72 6f 78 79 43 6f 64 65 20 3d 20 3c 3c | 8'."\n.*";.$streamProxyCode.=.<< |
bebc0 | 3c 53 54 52 45 41 4d 50 52 4f 58 59 0a 69 66 20 28 50 48 50 5f 56 45 52 53 49 4f 4e 5f 49 44 20 | <STREAMPROXY.if.(PHP_VERSION_ID. |
bebe0 | 3c 20 38 30 30 30 30 29 20 7b 0a 20 20 20 20 69 66 20 28 21 63 6c 61 73 73 5f 65 78 69 73 74 73 | <.80000).{.....if.(!class_exists |
bec00 | 28 27 43 6f 6d 70 6f 73 65 72 5c 42 69 6e 50 72 6f 78 79 57 72 61 70 70 65 72 27 29 29 20 7b 0a | ('Composer\BinProxyWrapper')).{. |
bec20 | 20 20 20 20 20 20 20 20 2f 2a 2a 0a 20 20 20 20 20 20 20 20 20 2a 20 40 69 6e 74 65 72 6e 61 6c | ......../**..........*.@internal |
bec40 | 0a 20 20 20 20 20 20 20 20 20 2a 2f 0a 20 20 20 20 20 20 20 20 66 69 6e 61 6c 20 63 6c 61 73 73 | ..........*/.........final.class |
bec60 | 20 42 69 6e 50 72 6f 78 79 57 72 61 70 70 65 72 0a 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 | .BinProxyWrapper.........{...... |
bec80 | 20 20 20 20 20 20 20 70 72 69 76 61 74 65 20 5c 24 68 61 6e 64 6c 65 3b 0a 20 20 20 20 20 20 20 | .......private.\$handle;........ |
beca0 | 20 20 20 20 20 70 72 69 76 61 74 65 20 5c 24 70 6f 73 69 74 69 6f 6e 3b 0a 20 20 20 20 20 20 20 | .....private.\$position;........ |
becc0 | 20 20 20 20 20 70 72 69 76 61 74 65 20 5c 24 72 65 61 6c 70 61 74 68 3b 0a 0a 20 20 20 20 20 20 | .....private.\$realpath;........ |
bece0 | 20 20 20 20 20 20 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 74 72 65 61 6d 5f 6f 70 65 | ......public.function.stream_ope |
bed00 | 6e 28 5c 24 70 61 74 68 2c 20 5c 24 6d 6f 64 65 2c 20 5c 24 6f 70 74 69 6f 6e 73 2c 20 26 5c 24 | n(\$path,.\$mode,.\$options,.&\$ |
bed20 | 6f 70 65 6e 65 64 5f 70 61 74 68 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 | opened_path).............{...... |
bed40 | 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 67 65 74 20 72 69 64 20 6f 66 20 70 68 70 76 66 73 63 | ...........//.get.rid.of.phpvfsc |
bed60 | 6f 6d 70 6f 73 65 72 3a 2f 2f 20 70 72 65 66 69 78 20 66 6f 72 20 5f 5f 46 49 4c 45 5f 5f 20 26 | omposer://.prefix.for.__FILE__.& |
bed80 | 20 5f 5f 44 49 52 5f 5f 20 72 65 73 6f 6c 75 74 69 6f 6e 0a 20 20 20 20 20 20 20 20 20 20 20 20 | .__DIR__.resolution............. |
beda0 | 20 20 20 20 5c 24 6f 70 65 6e 65 64 5f 70 61 74 68 20 3d 20 73 75 62 73 74 72 28 5c 24 70 61 74 | ....\$opened_path.=.substr(\$pat |
bedc0 | 68 2c 20 31 37 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 5c 24 74 68 69 73 2d 3e | h,.17);.................\$this-> |
bede0 | 72 65 61 6c 70 61 74 68 20 3d 20 72 65 61 6c 70 61 74 68 28 5c 24 6f 70 65 6e 65 64 5f 70 61 74 | realpath.=.realpath(\$opened_pat |
bee00 | 68 29 20 3f 3a 20 5c 24 6f 70 65 6e 65 64 5f 70 61 74 68 3b 0a 20 20 20 20 20 20 20 20 20 20 20 | h).?:.\$opened_path;............ |
bee20 | 20 20 20 20 20 5c 24 6f 70 65 6e 65 64 5f 70 61 74 68 20 3d 20 24 70 68 70 75 6e 69 74 48 61 63 | .....\$opened_path.=.$phpunitHac |
bee40 | 6b 31 5c 24 74 68 69 73 2d 3e 72 65 61 6c 70 61 74 68 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 | k1\$this->realpath;............. |
bee60 | 20 20 20 20 5c 24 74 68 69 73 2d 3e 68 61 6e 64 6c 65 20 3d 20 66 6f 70 65 6e 28 5c 24 74 68 69 | ....\$this->handle.=.fopen(\$thi |
bee80 | 73 2d 3e 72 65 61 6c 70 61 74 68 2c 20 5c 24 6d 6f 64 65 29 3b 0a 20 20 20 20 20 20 20 20 20 20 | s->realpath,.\$mode);........... |
beea0 | 20 20 20 20 20 20 5c 24 74 68 69 73 2d 3e 70 6f 73 69 74 69 6f 6e 20 3d 20 30 3b 0a 0a 20 20 20 | ......\$this->position.=.0;..... |
beec0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 28 62 6f 6f 6c 29 20 5c 24 74 68 69 | .............return.(bool).\$thi |
beee0 | 73 2d 3e 68 61 6e 64 6c 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 | s->handle;.............}........ |
bef00 | 20 20 20 20 20 20 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 74 72 65 61 6d 5f 72 65 61 | ......public.function.stream_rea |
bef20 | 64 28 5c 24 63 6f 75 6e 74 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 | d(\$count).............{........ |
bef40 | 20 20 20 20 20 20 20 20 20 5c 24 64 61 74 61 20 3d 20 66 72 65 61 64 28 5c 24 74 68 69 73 2d 3e | .........\$data.=.fread(\$this-> |
bef60 | 68 61 6e 64 6c 65 2c 20 5c 24 63 6f 75 6e 74 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | handle,.\$count);............... |
bef80 | 20 20 20 69 66 20 28 5c 24 74 68 69 73 2d 3e 70 6f 73 69 74 69 6f 6e 20 3d 3d 3d 20 30 29 20 7b | ...if.(\$this->position.===.0).{ |
befa0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 5c 24 64 61 74 61 20 3d 20 70 72 | .....................\$data.=.pr |
befc0 | 65 67 5f 72 65 70 6c 61 63 65 28 27 7b 5e 23 21 2e 2a 5c 5c 72 3f 5c 5c 6e 7d 27 2c 20 27 27 2c | eg_replace('{^#!.*\\r?\\n}',.'', |
befe0 | 20 5c 24 64 61 74 61 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 24 70 68 70 75 | .\$data);.................}$phpu |
bf000 | 6e 69 74 48 61 63 6b 32 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 5c 24 74 68 69 73 | nitHack2..................\$this |
bf020 | 2d 3e 70 6f 73 69 74 69 6f 6e 20 2b 3d 20 73 74 72 6c 65 6e 28 5c 24 64 61 74 61 29 3b 0a 0a 20 | ->position.+=.strlen(\$data);... |
bf040 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 5c 24 64 61 74 61 3b 0a 20 20 | ...............return.\$data;... |
bf060 | 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 | ..........}..............public. |
bf080 | 66 75 6e 63 74 69 6f 6e 20 73 74 72 65 61 6d 5f 63 61 73 74 28 5c 24 63 61 73 74 41 73 29 0a 20 | function.stream_cast(\$castAs).. |
bf0a0 | 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 | ...........{.................ret |
bf0c0 | 75 72 6e 20 5c 24 74 68 69 73 2d 3e 68 61 6e 64 6c 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 | urn.\$this->handle;............. |
bf0e0 | 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 | }..............public.function.s |
bf100 | 74 72 65 61 6d 5f 63 6c 6f 73 65 28 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 | tream_close().............{..... |
bf120 | 20 20 20 20 20 20 20 20 20 20 20 20 66 63 6c 6f 73 65 28 5c 24 74 68 69 73 2d 3e 68 61 6e 64 6c | ............fclose(\$this->handl |
bf140 | 65 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 | e);.............}..............p |
bf160 | 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 74 72 65 61 6d 5f 6c 6f 63 6b 28 5c 24 6f 70 65 | ublic.function.stream_lock(\$ope |
bf180 | 72 61 74 69 6f 6e 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 | ration).............{........... |
bf1a0 | 20 20 20 20 20 20 72 65 74 75 72 6e 20 5c 24 6f 70 65 72 61 74 69 6f 6e 20 3f 20 66 6c 6f 63 6b | ......return.\$operation.?.flock |
bf1c0 | 28 5c 24 74 68 69 73 2d 3e 68 61 6e 64 6c 65 2c 20 5c 24 6f 70 65 72 61 74 69 6f 6e 29 20 3a 20 | (\$this->handle,.\$operation).:. |
bf1e0 | 74 72 75 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 | true;.............}............. |
bf200 | 20 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 74 72 65 61 6d 5f 73 65 65 6b 28 5c 24 6f | .public.function.stream_seek(\$o |
bf220 | 66 66 73 65 74 2c 20 5c 24 77 68 65 6e 63 65 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 | ffset,.\$whence).............{.. |
bf240 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 30 20 3d 3d 3d 20 66 73 65 65 6b 28 5c | ...............if.(0.===.fseek(\ |
bf260 | 24 74 68 69 73 2d 3e 68 61 6e 64 6c 65 2c 20 5c 24 6f 66 66 73 65 74 2c 20 5c 24 77 68 65 6e 63 | $this->handle,.\$offset,.\$whenc |
bf280 | 65 29 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 5c 24 74 68 69 73 | e)).{.....................\$this |
bf2a0 | 2d 3e 70 6f 73 69 74 69 6f 6e 20 3d 20 66 74 65 6c 6c 28 5c 24 74 68 69 73 2d 3e 68 61 6e 64 6c | ->position.=.ftell(\$this->handl |
bf2c0 | 65 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 | e);.....................return.t |
bf2e0 | 72 75 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 | rue;.................}.......... |
bf300 | 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 20 20 20 20 20 20 20 20 20 20 | ........return.false;........... |
bf320 | 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e | ..}..............public.function |
bf340 | 20 73 74 72 65 61 6d 5f 74 65 6c 6c 28 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 | .stream_tell().............{.... |
bf360 | 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 5c 24 74 68 69 73 2d 3e 70 6f 73 69 | .............return.\$this->posi |
bf380 | 74 69 6f 6e 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 | tion;.............}............. |
bf3a0 | 20 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 74 72 65 61 6d 5f 65 6f 66 28 29 0a 20 20 | .public.function.stream_eof()... |
bf3c0 | 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 | ..........{.................retu |
bf3e0 | 72 6e 20 66 65 6f 66 28 5c 24 74 68 69 73 2d 3e 68 61 6e 64 6c 65 29 3b 0a 20 20 20 20 20 20 20 | rn.feof(\$this->handle);........ |
bf400 | 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 63 20 66 75 6e 63 74 | .....}..............public.funct |
bf420 | 69 6f 6e 20 73 74 72 65 61 6d 5f 73 74 61 74 28 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a | ion.stream_stat().............{. |
bf440 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 61 72 72 61 79 28 29 3b 0a | ................return.array();. |
bf460 | 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 6c 69 | ............}..............publi |
bf480 | 63 20 66 75 6e 63 74 69 6f 6e 20 73 74 72 65 61 6d 5f 73 65 74 5f 6f 70 74 69 6f 6e 28 5c 24 6f | c.function.stream_set_option(\$o |
bf4a0 | 70 74 69 6f 6e 2c 20 5c 24 61 72 67 31 2c 20 5c 24 61 72 67 32 29 0a 20 20 20 20 20 20 20 20 20 | ption,.\$arg1,.\$arg2).......... |
bf4c0 | 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 | ...{.................return.true |
bf4e0 | 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 75 62 | ;.............}..............pub |
bf500 | 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 75 72 6c 5f 73 74 61 74 28 5c 24 70 61 74 68 2c 20 5c 24 | lic.function.url_stat(\$path,.\$ |
bf520 | 66 6c 61 67 73 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 | flags).............{............ |
bf540 | 20 20 20 20 20 5c 24 70 61 74 68 20 3d 20 73 75 62 73 74 72 28 5c 24 70 61 74 68 2c 20 31 37 29 | .....\$path.=.substr(\$path,.17) |
bf560 | 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 66 69 6c 65 5f 65 78 69 73 74 | ;.................if.(file_exist |
bf580 | 73 28 5c 24 70 61 74 68 29 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | s(\$path)).{.................... |
bf5a0 | 20 72 65 74 75 72 6e 20 73 74 61 74 28 5c 24 70 61 74 68 29 3b 0a 20 20 20 20 20 20 20 20 20 20 | .return.stat(\$path);........... |
bf5c0 | 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 | ......}..................return. |
bf5e0 | 66 61 6c 73 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 7d 0a 20 | false;.............}.........}.. |
bf600 | 20 20 20 7d 0a 0a 20 20 20 20 69 66 20 28 0a 20 20 20 20 20 20 20 20 28 66 75 6e 63 74 69 6f 6e | ...}......if.(.........(function |
bf620 | 5f 65 78 69 73 74 73 28 27 73 74 72 65 61 6d 5f 67 65 74 5f 77 72 61 70 70 65 72 73 27 29 20 26 | _exists('stream_get_wrappers').& |
bf640 | 26 20 69 6e 5f 61 72 72 61 79 28 27 70 68 70 76 66 73 63 6f 6d 70 6f 73 65 72 27 2c 20 73 74 72 | &.in_array('phpvfscomposer',.str |
bf660 | 65 61 6d 5f 67 65 74 5f 77 72 61 70 70 65 72 73 28 29 2c 20 74 72 75 65 29 29 0a 20 20 20 20 20 | eam_get_wrappers(),.true))...... |
bf680 | 20 20 20 7c 7c 20 28 66 75 6e 63 74 69 6f 6e 5f 65 78 69 73 74 73 28 27 73 74 72 65 61 6d 5f 77 | ...||.(function_exists('stream_w |
bf6a0 | 72 61 70 70 65 72 5f 72 65 67 69 73 74 65 72 27 29 20 26 26 20 73 74 72 65 61 6d 5f 77 72 61 70 | rapper_register').&&.stream_wrap |
bf6c0 | 70 65 72 5f 72 65 67 69 73 74 65 72 28 27 70 68 70 76 66 73 63 6f 6d 70 6f 73 65 72 27 2c 20 27 | per_register('phpvfscomposer',.' |
bf6e0 | 43 6f 6d 70 6f 73 65 72 5c 42 69 6e 50 72 6f 78 79 57 72 61 70 70 65 72 27 29 29 0a 20 20 20 20 | Composer\BinProxyWrapper'))..... |
bf700 | 29 20 7b 0a 20 20 20 20 20 20 20 20 69 6e 63 6c 75 64 65 28 22 70 68 70 76 66 73 63 6f 6d 70 6f | ).{.........include("phpvfscompo |
bf720 | 73 65 72 3a 2f 2f 22 20 2e 20 24 62 69 6e 50 61 74 68 45 78 70 6f 72 74 65 64 29 3b 0a 20 20 20 | ser://"...$binPathExported);.... |
bf740 | 20 20 20 20 20 65 78 69 74 28 30 29 3b 0a 20 20 20 20 7d 0a 7d 0a 0a 53 54 52 45 41 4d 50 52 4f | .....exit(0);.....}.}..STREAMPRO |
bf760 | 58 59 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 70 72 6f 78 79 43 6f 64 65 20 2e 20 22 5c 6e 22 20 | XY;.}..return.$proxyCode..."\n". |
bf780 | 2e 20 3c 3c 3c 50 52 4f 58 59 0a 3c 3f 70 68 70 0a 0a 2f 2a 2a 0a 20 2a 20 50 72 6f 78 79 20 50 | ..<<<PROXY.<?php../**..*.Proxy.P |
bf7a0 | 48 50 20 66 69 6c 65 20 67 65 6e 65 72 61 74 65 64 20 62 79 20 43 6f 6d 70 6f 73 65 72 0a 20 2a | HP.file.generated.by.Composer..* |
bf7c0 | 0a 20 2a 20 54 68 69 73 20 66 69 6c 65 20 69 6e 63 6c 75 64 65 73 20 74 68 65 20 72 65 66 65 72 | ..*.This.file.includes.the.refer |
bf7e0 | 65 6e 63 65 64 20 62 69 6e 20 70 61 74 68 20 28 24 62 69 6e 50 61 74 68 29 0a 20 2a 24 73 74 72 | enced.bin.path.($binPath)..*$str |
bf800 | 65 61 6d 48 69 6e 74 0a 20 2a 20 40 67 65 6e 65 72 61 74 65 64 0a 20 2a 2f 0a 0a 6e 61 6d 65 73 | eamHint..*.@generated..*/..names |
bf820 | 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 3b 0a 0a 24 67 6c 6f 62 61 6c 73 43 6f 64 65 0a 24 73 74 | pace.Composer;..$globalsCode.$st |
bf840 | 72 65 61 6d 50 72 6f 78 79 43 6f 64 65 0a 69 6e 63 6c 75 64 65 20 24 62 69 6e 50 61 74 68 45 78 | reamProxyCode.include.$binPathEx |
bf860 | 70 6f 72 74 65 64 3b 0a 0a 50 52 4f 58 59 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 3c 3c 3c 50 52 4f | ported;..PROXY;.}..return.<<<PRO |
bf880 | 58 59 0a 23 21 2f 75 73 72 2f 62 69 6e 2f 65 6e 76 20 73 68 0a 0a 23 20 53 75 70 70 6f 72 74 20 | XY.#!/usr/bin/env.sh..#.Support. |
bf8a0 | 62 61 73 68 20 74 6f 20 73 75 70 70 6f 72 74 20 60 73 6f 75 72 63 65 60 20 77 69 74 68 20 66 61 | bash.to.support.`source`.with.fa |
bf8c0 | 6c 6c 62 61 63 6b 20 6f 6e 20 24 30 20 69 66 20 74 68 69 73 20 64 6f 65 73 20 6e 6f 74 20 72 75 | llback.on.$0.if.this.does.not.ru |
bf8e0 | 6e 20 77 69 74 68 20 62 61 73 68 0a 23 20 68 74 74 70 73 3a 2f 2f 73 74 61 63 6b 6f 76 65 72 66 | n.with.bash.#.https://stackoverf |
bf900 | 6c 6f 77 2e 63 6f 6d 2f 61 2f 33 35 30 30 36 35 30 35 2f 36 35 31 32 0a 73 65 6c 66 41 72 67 3d | low.com/a/35006505/6512.selfArg= |
bf920 | 22 5c 24 42 41 53 48 5f 53 4f 55 52 43 45 22 0a 69 66 20 5b 20 2d 7a 20 22 5c 24 73 65 6c 66 41 | "\$BASH_SOURCE".if.[.-z."\$selfA |
bf940 | 72 67 22 20 5d 3b 20 74 68 65 6e 0a 20 20 20 20 73 65 6c 66 41 72 67 3d 22 5c 24 30 22 0a 66 69 | rg".];.then.....selfArg="\$0".fi |
bf960 | 0a 0a 73 65 6c 66 3d 5c 24 28 72 65 61 6c 70 61 74 68 20 5c 24 73 65 6c 66 41 72 67 20 32 3e 20 | ..self=\$(realpath.\$selfArg.2>. |
bf980 | 2f 64 65 76 2f 6e 75 6c 6c 29 0a 69 66 20 5b 20 2d 7a 20 22 5c 24 73 65 6c 66 22 20 5d 3b 20 74 | /dev/null).if.[.-z."\$self".];.t |
bf9a0 | 68 65 6e 0a 20 20 20 20 73 65 6c 66 3d 22 5c 24 73 65 6c 66 41 72 67 22 0a 66 69 0a 0a 64 69 72 | hen.....self="\$selfArg".fi..dir |
bf9c0 | 3d 5c 24 28 63 64 20 22 5c 24 7b 73 65 6c 66 25 5b 2f 5c 5c 5c 5c 5d 2a 7d 22 20 3e 20 2f 64 65 | =\$(cd."\${self%[/\\\\]*}".>./de |
bf9e0 | 76 2f 6e 75 6c 6c 3b 20 63 64 20 24 62 69 6e 44 69 72 20 26 26 20 70 77 64 29 0a 0a 69 66 20 5b | v/null;.cd.$binDir.&&.pwd)..if.[ |
bfa00 | 20 2d 64 20 2f 70 72 6f 63 2f 63 79 67 64 72 69 76 65 20 5d 3b 20 74 68 65 6e 0a 20 20 20 20 63 | .-d./proc/cygdrive.];.then.....c |
bfa20 | 61 73 65 20 5c 24 28 77 68 69 63 68 20 70 68 70 29 20 69 6e 0a 20 20 20 20 20 20 20 20 5c 24 28 | ase.\$(which.php).in.........\$( |
bfa40 | 72 65 61 64 6c 69 6e 6b 20 2d 6e 20 2f 70 72 6f 63 2f 63 79 67 64 72 69 76 65 29 2f 2a 29 0a 20 | readlink.-n./proc/cygdrive)/*).. |
bfa60 | 20 20 20 20 20 20 20 20 20 20 20 23 20 57 65 20 61 72 65 20 69 6e 20 43 79 67 77 69 6e 20 75 73 | ...........#.We.are.in.Cygwin.us |
bfa80 | 69 6e 67 20 57 69 6e 64 6f 77 73 20 70 68 70 2c 20 73 6f 20 74 68 65 20 70 61 74 68 20 6d 75 73 | ing.Windows.php,.so.the.path.mus |
bfaa0 | 74 20 62 65 20 74 72 61 6e 73 6c 61 74 65 64 0a 20 20 20 20 20 20 20 20 20 20 20 20 64 69 72 3d | t.be.translated.............dir= |
bfac0 | 5c 24 28 63 79 67 70 61 74 68 20 2d 6d 20 22 5c 24 64 69 72 22 29 3b 0a 20 20 20 20 20 20 20 20 | \$(cygpath.-m."\$dir");......... |
bfae0 | 20 20 20 20 3b 3b 0a 20 20 20 20 65 73 61 63 0a 66 69 0a 0a 65 78 70 6f 72 74 20 43 4f 4d 50 4f | ....;;.....esac.fi..export.COMPO |
bfb00 | 53 45 52 5f 52 55 4e 54 49 4d 45 5f 42 49 4e 5f 44 49 52 3d 22 5c 24 28 63 64 20 22 5c 24 7b 73 | SER_RUNTIME_BIN_DIR="\$(cd."\${s |
bfb20 | 65 6c 66 25 5b 2f 5c 5c 5c 5c 5d 2a 7d 22 20 3e 20 2f 64 65 76 2f 6e 75 6c 6c 3b 20 70 77 64 29 | elf%[/\\\\]*}".>./dev/null;.pwd) |
bfb40 | 22 0a 0a 23 20 49 66 20 62 61 73 68 20 69 73 20 73 6f 75 72 63 69 6e 67 20 74 68 69 73 20 66 69 | "..#.If.bash.is.sourcing.this.fi |
bfb60 | 6c 65 2c 20 77 65 20 68 61 76 65 20 74 6f 20 73 6f 75 72 63 65 20 74 68 65 20 74 61 72 67 65 74 | le,.we.have.to.source.the.target |
bfb80 | 20 61 73 20 77 65 6c 6c 0a 62 61 73 68 53 6f 75 72 63 65 3d 22 5c 24 42 41 53 48 5f 53 4f 55 52 | .as.well.bashSource="\$BASH_SOUR |
bfba0 | 43 45 22 0a 69 66 20 5b 20 2d 6e 20 22 5c 24 62 61 73 68 53 6f 75 72 63 65 22 20 5d 3b 20 74 68 | CE".if.[.-n."\$bashSource".];.th |
bfbc0 | 65 6e 0a 20 20 20 20 69 66 20 5b 20 22 5c 24 62 61 73 68 53 6f 75 72 63 65 22 20 21 3d 20 22 5c | en.....if.[."\$bashSource".!=."\ |
bfbe0 | 24 30 22 20 5d 3b 20 74 68 65 6e 0a 20 20 20 20 20 20 20 20 73 6f 75 72 63 65 20 22 5c 24 7b 64 | $0".];.then.........source."\${d |
bfc00 | 69 72 7d 2f 24 62 69 6e 46 69 6c 65 22 20 22 5c 24 40 22 0a 20 20 20 20 20 20 20 20 72 65 74 75 | ir}/$binFile"."\$@".........retu |
bfc20 | 72 6e 0a 20 20 20 20 66 69 0a 66 69 0a 0a 22 5c 24 7b 64 69 72 7d 2f 24 62 69 6e 46 69 6c 65 22 | rn.....fi.fi.."\${dir}/$binFile" |
bfc40 | 20 22 5c 24 40 22 0a 0a 50 52 4f 58 59 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 | ."\$@"..PROXY;.}.}.<?php.declare |
bfc60 | 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d | (strict_types=1);............nam |
bfc80 | 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 49 6e 73 74 61 6c 6c 65 72 3b 0a 0a 75 73 65 20 | espace.Composer\Installer;..use. |
bfca0 | 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 | Composer\Package\PackageInterfac |
bfcc0 | 65 3b 0a 0a 0a 0a 0a 0a 0a 69 6e 74 65 72 66 61 63 65 20 42 69 6e 61 72 79 50 72 65 73 65 6e 63 | e;.......interface.BinaryPresenc |
bfce0 | 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 | eInterface.{........public.funct |
bfd00 | 69 6f 6e 20 65 6e 73 75 72 65 42 69 6e 61 72 69 65 73 50 72 65 73 65 6e 63 65 28 50 61 63 6b 61 | ion.ensureBinariesPresence(Packa |
bfd20 | 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 29 3b 0a 7d 0a 3c 3f 70 68 70 20 64 | geInterface.$package);.}.<?php.d |
bfd40 | 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a | eclare(strict_types=1);......... |
bfd60 | 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 49 6e 73 74 61 6c 6c 65 72 3b | ...namespace.Composer\Installer; |
bfd80 | 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 4f 5c 49 4f 49 6e 74 65 72 66 61 63 65 3b 0a 75 | ..use.Composer\IO\IOInterface;.u |
bfda0 | 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 4f 5c 43 6f 6e 73 6f 6c 65 49 4f 3b 0a 75 73 65 20 43 6f | se.Composer\IO\ConsoleIO;.use.Co |
bfdc0 | 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b | mposer\Package\PackageInterface; |
bfde0 | 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 41 6c 69 61 73 50 61 63 6b 61 | .use.Composer\Package\AliasPacka |
bfe00 | 67 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 49 6e 73 74 | ge;.use.Composer\Repository\Inst |
bfe20 | 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f | alledRepositoryInterface;.use.Co |
bfe40 | 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 5c 4f 70 65 72 61 74 | mposer\DependencyResolver\Operat |
bfe60 | 69 6f 6e 5c 4f 70 65 72 61 74 69 6f 6e 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 | ion\OperationInterface;.use.Comp |
bfe80 | 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 5c 4f 70 65 72 61 74 69 6f | oser\DependencyResolver\Operatio |
bfea0 | 6e 5c 49 6e 73 74 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 | n\InstallOperation;.use.Composer |
bfec0 | 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 5c 4f 70 65 72 61 74 69 6f 6e 5c 55 70 | \DependencyResolver\Operation\Up |
bfee0 | 64 61 74 65 4f 70 65 72 61 74 69 6f 6e 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 44 65 70 65 | dateOperation;.use.Composer\Depe |
bff00 | 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 5c 4f 70 65 72 61 74 69 6f 6e 5c 55 6e 69 6e 73 74 61 | ndencyResolver\Operation\Uninsta |
bff20 | 6c 6c 4f 70 65 72 61 74 69 6f 6e 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 | llOperation;.use.Composer\Depend |
bff40 | 65 6e 63 79 52 65 73 6f 6c 76 65 72 5c 4f 70 65 72 61 74 69 6f 6e 5c 4d 61 72 6b 41 6c 69 61 73 | encyResolver\Operation\MarkAlias |
bff60 | 49 6e 73 74 61 6c 6c 65 64 4f 70 65 72 61 74 69 6f 6e 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 | InstalledOperation;.use.Composer |
bff80 | 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 5c 4f 70 65 72 61 74 69 6f 6e 5c 4d 61 | \DependencyResolver\Operation\Ma |
bffa0 | 72 6b 41 6c 69 61 73 55 6e 69 6e 73 74 61 6c 6c 65 64 4f 70 65 72 61 74 69 6f 6e 3b 0a 75 73 65 | rkAliasUninstalledOperation;.use |
bffc0 | 20 43 6f 6d 70 6f 73 65 72 5c 44 6f 77 6e 6c 6f 61 64 65 72 5c 46 69 6c 65 44 6f 77 6e 6c 6f 61 | .Composer\Downloader\FileDownloa |
bffe0 | 64 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 | der;.use.Composer\EventDispatche |
c0000 | 72 5c 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c | r\EventDispatcher;.use.Composer\ |
c0020 | 55 74 69 6c 5c 4c 6f 6f 70 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 6c 61 | Util\Loop;.use.Composer\Util\Pla |
c0040 | 74 66 6f 72 6d 3b 0a 75 73 65 20 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 50 72 6f 6d 69 73 65 | tform;.use.React\Promise\Promise |
c0060 | 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 53 65 6c 64 5c 53 69 67 6e 61 6c 5c 53 69 67 6e 61 | Interface;.use.Seld\Signal\Signa |
c0080 | 6c 48 61 6e 64 6c 65 72 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 49 6e 73 74 61 6c 6c 61 | lHandler;.........class.Installa |
c00a0 | 74 69 6f 6e 4d 61 6e 61 67 65 72 0a 7b 0a 0a 70 72 69 76 61 74 65 20 24 69 6e 73 74 61 6c 6c 65 | tionManager.{..private.$installe |
c00c0 | 72 73 20 3d 20 5b 5d 3b 0a 0a 70 72 69 76 61 74 65 20 24 63 61 63 68 65 20 3d 20 5b 5d 3b 0a 0a | rs.=.[];..private.$cache.=.[];.. |
c00e0 | 70 72 69 76 61 74 65 20 24 6e 6f 74 69 66 69 61 62 6c 65 50 61 63 6b 61 67 65 73 20 3d 20 5b 5d | private.$notifiablePackages.=.[] |
c0100 | 3b 0a 0a 70 72 69 76 61 74 65 20 24 6c 6f 6f 70 3b 0a 0a 70 72 69 76 61 74 65 20 24 69 6f 3b 0a | ;..private.$loop;..private.$io;. |
c0120 | 0a 70 72 69 76 61 74 65 20 24 65 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 3b 0a 0a 70 72 69 76 | .private.$eventDispatcher;..priv |
c0140 | 61 74 65 20 24 6f 75 74 70 75 74 50 72 6f 67 72 65 73 73 3b 0a 0a 70 75 62 6c 69 63 20 66 75 6e | ate.$outputProgress;..public.fun |
c0160 | 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 4c 6f 6f 70 20 24 6c 6f 6f 70 2c 20 49 4f | ction.__construct(Loop.$loop,.IO |
c0180 | 49 6e 74 65 72 66 61 63 65 20 24 69 6f 2c 20 3f 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 20 | Interface.$io,.?EventDispatcher. |
c01a0 | 24 65 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 20 3d 20 6e 75 6c 6c 29 0a 7b 0a 24 74 68 69 73 | $eventDispatcher.=.null).{.$this |
c01c0 | 2d 3e 6c 6f 6f 70 20 3d 20 24 6c 6f 6f 70 3b 0a 24 74 68 69 73 2d 3e 69 6f 20 3d 20 24 69 6f 3b | ->loop.=.$loop;.$this->io.=.$io; |
c01e0 | 0a 24 74 68 69 73 2d 3e 65 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 20 3d 20 24 65 76 65 6e 74 | .$this->eventDispatcher.=.$event |
c0200 | 44 69 73 70 61 74 63 68 65 72 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 72 | Dispatcher;.}..public.function.r |
c0220 | 65 73 65 74 28 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 6e 6f 74 69 66 69 61 62 6c 65 | eset():.void.{.$this->notifiable |
c0240 | 50 61 63 6b 61 67 65 73 20 3d 20 5b 5d 3b 0a 46 69 6c 65 44 6f 77 6e 6c 6f 61 64 65 72 3a 3a 24 | Packages.=.[];.FileDownloader::$ |
c0260 | 64 6f 77 6e 6c 6f 61 64 4d 65 74 61 64 61 74 61 20 3d 20 5b 5d 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 | downloadMetadata.=.[];.}.......p |
c0280 | 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 61 64 64 49 6e 73 74 61 6c 6c 65 72 28 49 6e 73 74 | ublic.function.addInstaller(Inst |
c02a0 | 61 6c 6c 65 72 49 6e 74 65 72 66 61 63 65 20 24 69 6e 73 74 61 6c 6c 65 72 29 3a 20 76 6f 69 64 | allerInterface.$installer):.void |
c02c0 | 0a 7b 0a 61 72 72 61 79 5f 75 6e 73 68 69 66 74 28 24 74 68 69 73 2d 3e 69 6e 73 74 61 6c 6c 65 | .{.array_unshift($this->installe |
c02e0 | 72 73 2c 20 24 69 6e 73 74 61 6c 6c 65 72 29 3b 0a 24 74 68 69 73 2d 3e 63 61 63 68 65 20 3d 20 | rs,.$installer);.$this->cache.=. |
c0300 | 5b 5d 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 72 65 6d 6f | [];.}.......public.function.remo |
c0320 | 76 65 49 6e 73 74 61 6c 6c 65 72 28 49 6e 73 74 61 6c 6c 65 72 49 6e 74 65 72 66 61 63 65 20 24 | veInstaller(InstallerInterface.$ |
c0340 | 69 6e 73 74 61 6c 6c 65 72 29 3a 20 76 6f 69 64 0a 7b 0a 69 66 20 28 66 61 6c 73 65 20 21 3d 3d | installer):.void.{.if.(false.!== |
c0360 | 20 28 24 6b 65 79 20 3d 20 61 72 72 61 79 5f 73 65 61 72 63 68 28 24 69 6e 73 74 61 6c 6c 65 72 | .($key.=.array_search($installer |
c0380 | 2c 20 24 74 68 69 73 2d 3e 69 6e 73 74 61 6c 6c 65 72 73 2c 20 74 72 75 65 29 29 29 20 7b 0a 61 | ,.$this->installers,.true))).{.a |
c03a0 | 72 72 61 79 5f 73 70 6c 69 63 65 28 24 74 68 69 73 2d 3e 69 6e 73 74 61 6c 6c 65 72 73 2c 20 24 | rray_splice($this->installers,.$ |
c03c0 | 6b 65 79 2c 20 31 29 3b 0a 24 74 68 69 73 2d 3e 63 61 63 68 65 20 3d 20 5b 5d 3b 0a 7d 0a 7d 0a | key,.1);.$this->cache.=.[];.}.}. |
c03e0 | 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 64 69 73 61 62 6c 65 50 | ........public.function.disableP |
c0400 | 6c 75 67 69 6e 73 28 29 3a 20 76 6f 69 64 0a 7b 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d | lugins():.void.{.foreach.($this- |
c0420 | 3e 69 6e 73 74 61 6c 6c 65 72 73 20 61 73 20 24 69 20 3d 3e 20 24 69 6e 73 74 61 6c 6c 65 72 29 | >installers.as.$i.=>.$installer) |
c0440 | 20 7b 0a 69 66 20 28 21 24 69 6e 73 74 61 6c 6c 65 72 20 69 6e 73 74 61 6e 63 65 6f 66 20 50 6c | .{.if.(!$installer.instanceof.Pl |
c0460 | 75 67 69 6e 49 6e 73 74 61 6c 6c 65 72 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 75 6e | uginInstaller).{.continue;.}..un |
c0480 | 73 65 74 28 24 74 68 69 73 2d 3e 69 6e 73 74 61 6c 6c 65 72 73 5b 24 69 5d 29 3b 0a 7d 0a 7d 0a | set($this->installers[$i]);.}.}. |
c04a0 | 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 49 6e 73 74 61 | ........public.function.getInsta |
c04c0 | 6c 6c 65 72 28 73 74 72 69 6e 67 20 24 74 79 70 65 29 3a 20 49 6e 73 74 61 6c 6c 65 72 49 6e 74 | ller(string.$type):.InstallerInt |
c04e0 | 65 72 66 61 63 65 0a 7b 0a 24 74 79 70 65 20 3d 20 73 74 72 74 6f 6c 6f 77 65 72 28 24 74 79 70 | erface.{.$type.=.strtolower($typ |
c0500 | 65 29 3b 0a 0a 69 66 20 28 69 73 73 65 74 28 24 74 68 69 73 2d 3e 63 61 63 68 65 5b 24 74 79 70 | e);..if.(isset($this->cache[$typ |
c0520 | 65 5d 29 29 20 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 63 61 63 68 65 5b 24 74 79 70 65 | e])).{.return.$this->cache[$type |
c0540 | 5d 3b 0a 7d 0a 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 69 6e 73 74 61 6c 6c 65 72 73 | ];.}..foreach.($this->installers |
c0560 | 20 61 73 20 24 69 6e 73 74 61 6c 6c 65 72 29 20 7b 0a 69 66 20 28 24 69 6e 73 74 61 6c 6c 65 72 | .as.$installer).{.if.($installer |
c0580 | 2d 3e 73 75 70 70 6f 72 74 73 28 24 74 79 70 65 29 29 20 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 | ->supports($type)).{.return.$thi |
c05a0 | 73 2d 3e 63 61 63 68 65 5b 24 74 79 70 65 5d 20 3d 20 24 69 6e 73 74 61 6c 6c 65 72 3b 0a 7d 0a | s->cache[$type].=.$installer;.}. |
c05c0 | 7d 0a 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 | }..throw.new.\InvalidArgumentExc |
c05e0 | 65 70 74 69 6f 6e 28 27 55 6e 6b 6e 6f 77 6e 20 69 6e 73 74 61 6c 6c 65 72 20 74 79 70 65 3a 20 | eption('Unknown.installer.type:. |
c0600 | 27 2e 24 74 79 70 65 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 | '.$type);.}........public.functi |
c0620 | 6f 6e 20 69 73 50 61 63 6b 61 67 65 49 6e 73 74 61 6c 6c 65 64 28 49 6e 73 74 61 6c 6c 65 64 52 | on.isPackageInstalled(InstalledR |
c0640 | 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 20 24 72 65 70 6f 2c 20 50 61 63 6b 61 67 | epositoryInterface.$repo,.Packag |
c0660 | 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 29 3a 20 62 6f 6f 6c 0a 7b 0a 69 66 20 | eInterface.$package):.bool.{.if. |
c0680 | 28 24 70 61 63 6b 61 67 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 41 6c 69 61 73 50 61 63 6b 61 67 | ($package.instanceof.AliasPackag |
c06a0 | 65 29 20 7b 0a 72 65 74 75 72 6e 20 24 72 65 70 6f 2d 3e 68 61 73 50 61 63 6b 61 67 65 28 24 70 | e).{.return.$repo->hasPackage($p |
c06c0 | 61 63 6b 61 67 65 29 20 26 26 20 24 74 68 69 73 2d 3e 69 73 50 61 63 6b 61 67 65 49 6e 73 74 61 | ackage).&&.$this->isPackageInsta |
c06e0 | 6c 6c 65 64 28 24 72 65 70 6f 2c 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 41 6c 69 61 73 4f 66 | lled($repo,.$package->getAliasOf |
c0700 | 28 29 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 67 65 74 49 6e 73 74 61 6c 6c | ());.}..return.$this->getInstall |
c0720 | 65 72 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 54 79 70 65 28 29 29 2d 3e 69 73 49 6e 73 74 61 | er($package->getType())->isInsta |
c0740 | 6c 6c 65 64 28 24 72 65 70 6f 2c 20 24 70 61 63 6b 61 67 65 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a | lled($repo,.$package);.}........ |
c0760 | 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 65 6e 73 75 72 65 42 69 6e 61 72 69 65 73 50 72 | public.function.ensureBinariesPr |
c0780 | 65 73 65 6e 63 65 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 | esence(PackageInterface.$package |
c07a0 | 29 3a 20 76 6f 69 64 0a 7b 0a 74 72 79 20 7b 0a 24 69 6e 73 74 61 6c 6c 65 72 20 3d 20 24 74 68 | ):.void.{.try.{.$installer.=.$th |
c07c0 | 69 73 2d 3e 67 65 74 49 6e 73 74 61 6c 6c 65 72 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 54 79 | is->getInstaller($package->getTy |
c07e0 | 70 65 28 29 29 3b 0a 7d 20 63 61 74 63 68 20 28 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 | pe());.}.catch.(\InvalidArgument |
c0800 | 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 0a 72 65 74 75 72 6e 3b 0a 7d 0a 0a 0a 69 66 20 | Exception.$e).{..return;.}...if. |
c0820 | 28 24 69 6e 73 74 61 6c 6c 65 72 20 69 6e 73 74 61 6e 63 65 6f 66 20 42 69 6e 61 72 79 50 72 65 | ($installer.instanceof.BinaryPre |
c0840 | 73 65 6e 63 65 49 6e 74 65 72 66 61 63 65 29 20 7b 0a 24 69 6e 73 74 61 6c 6c 65 72 2d 3e 65 6e | senceInterface).{.$installer->en |
c0860 | 73 75 72 65 42 69 6e 61 72 69 65 73 50 72 65 73 65 6e 63 65 28 24 70 61 63 6b 61 67 65 29 3b 0a | sureBinariesPresence($package);. |
c0880 | 7d 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 65 78 65 | }.}..........public.function.exe |
c08a0 | 63 75 74 65 28 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 | cute(InstalledRepositoryInterfac |
c08c0 | 65 20 24 72 65 70 6f 2c 20 61 72 72 61 79 20 24 6f 70 65 72 61 74 69 6f 6e 73 2c 20 62 6f 6f 6c | e.$repo,.array.$operations,.bool |
c08e0 | 20 24 64 65 76 4d 6f 64 65 20 3d 20 74 72 75 65 2c 20 62 6f 6f 6c 20 24 72 75 6e 53 63 72 69 70 | .$devMode.=.true,.bool.$runScrip |
c0900 | 74 73 20 3d 20 74 72 75 65 29 3a 20 76 6f 69 64 0a 7b 0a 0a 24 63 6c 65 61 6e 75 70 50 72 6f 6d | ts.=.true):.void.{..$cleanupProm |
c0920 | 69 73 65 73 20 3d 20 5b 5d 3b 0a 0a 24 6c 6f 6f 70 20 3d 20 24 74 68 69 73 2d 3e 6c 6f 6f 70 3b | ises.=.[];..$loop.=.$this->loop; |
c0940 | 0a 24 69 6f 20 3d 20 24 74 68 69 73 2d 3e 69 6f 3b 0a 24 72 75 6e 43 6c 65 61 6e 75 70 20 3d 20 | .$io.=.$this->io;.$runCleanup.=. |
c0960 | 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 29 20 75 73 65 20 28 26 24 63 6c 65 61 6e 75 | static.function.().use.(&$cleanu |
c0980 | 70 50 72 6f 6d 69 73 65 73 2c 20 24 6c 6f 6f 70 29 3a 20 76 6f 69 64 20 7b 0a 24 70 72 6f 6d 69 | pPromises,.$loop):.void.{.$promi |
c09a0 | 73 65 73 20 3d 20 5b 5d 3b 0a 0a 24 6c 6f 6f 70 2d 3e 61 62 6f 72 74 4a 6f 62 73 28 29 3b 0a 0a | ses.=.[];..$loop->abortJobs();.. |
c09c0 | 66 6f 72 65 61 63 68 20 28 24 63 6c 65 61 6e 75 70 50 72 6f 6d 69 73 65 73 20 61 73 20 24 63 6c | foreach.($cleanupPromises.as.$cl |
c09e0 | 65 61 6e 75 70 29 20 7b 0a 24 70 72 6f 6d 69 73 65 73 5b 5d 20 3d 20 6e 65 77 20 5c 52 65 61 63 | eanup).{.$promises[].=.new.\Reac |
c0a00 | 74 5c 50 72 6f 6d 69 73 65 5c 50 72 6f 6d 69 73 65 28 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f | t\Promise\Promise(static.functio |
c0a20 | 6e 20 28 24 72 65 73 6f 6c 76 65 2c 20 24 72 65 6a 65 63 74 29 20 75 73 65 20 28 24 63 6c 65 61 | n.($resolve,.$reject).use.($clea |
c0a40 | 6e 75 70 29 3a 20 76 6f 69 64 20 7b 0a 24 70 72 6f 6d 69 73 65 20 3d 20 24 63 6c 65 61 6e 75 70 | nup):.void.{.$promise.=.$cleanup |
c0a60 | 28 29 3b 0a 69 66 20 28 21 24 70 72 6f 6d 69 73 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 50 72 6f | ();.if.(!$promise.instanceof.Pro |
c0a80 | 6d 69 73 65 49 6e 74 65 72 66 61 63 65 29 20 7b 0a 24 72 65 73 6f 6c 76 65 28 29 3b 0a 7d 20 65 | miseInterface).{.$resolve();.}.e |
c0aa0 | 6c 73 65 20 7b 0a 24 70 72 6f 6d 69 73 65 2d 3e 74 68 65 6e 28 73 74 61 74 69 63 20 66 75 6e 63 | lse.{.$promise->then(static.func |
c0ac0 | 74 69 6f 6e 20 28 29 20 75 73 65 20 28 24 72 65 73 6f 6c 76 65 29 3a 20 76 6f 69 64 20 7b 0a 24 | tion.().use.($resolve):.void.{.$ |
c0ae0 | 72 65 73 6f 6c 76 65 28 29 3b 0a 7d 29 3b 0a 7d 0a 7d 29 3b 0a 7d 0a 0a 69 66 20 28 21 65 6d 70 | resolve();.});.}.});.}..if.(!emp |
c0b00 | 74 79 28 24 70 72 6f 6d 69 73 65 73 29 29 20 7b 0a 24 6c 6f 6f 70 2d 3e 77 61 69 74 28 24 70 72 | ty($promises)).{.$loop->wait($pr |
c0b20 | 6f 6d 69 73 65 73 29 3b 0a 7d 0a 7d 3b 0a 0a 24 73 69 67 6e 61 6c 48 61 6e 64 6c 65 72 20 3d 20 | omises);.}.};..$signalHandler.=. |
c0b40 | 53 69 67 6e 61 6c 48 61 6e 64 6c 65 72 3a 3a 63 72 65 61 74 65 28 5b 53 69 67 6e 61 6c 48 61 6e | SignalHandler::create([SignalHan |
c0b60 | 64 6c 65 72 3a 3a 53 49 47 49 4e 54 2c 20 53 69 67 6e 61 6c 48 61 6e 64 6c 65 72 3a 3a 53 49 47 | dler::SIGINT,.SignalHandler::SIG |
c0b80 | 54 45 52 4d 2c 20 53 69 67 6e 61 6c 48 61 6e 64 6c 65 72 3a 3a 53 49 47 48 55 50 5d 2c 20 73 74 | TERM,.SignalHandler::SIGHUP],.st |
c0ba0 | 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 73 74 72 69 6e 67 20 24 73 69 67 6e 61 6c 2c 20 53 | atic.function.(string.$signal,.S |
c0bc0 | 69 67 6e 61 6c 48 61 6e 64 6c 65 72 20 24 68 61 6e 64 6c 65 72 29 20 75 73 65 20 28 24 69 6f 2c | ignalHandler.$handler).use.($io, |
c0be0 | 20 24 72 75 6e 43 6c 65 61 6e 75 70 29 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 | .$runCleanup).{.$io->writeError( |
c0c00 | 27 52 65 63 65 69 76 65 64 20 27 2e 24 73 69 67 6e 61 6c 2e 27 2c 20 61 62 6f 72 74 69 6e 67 27 | 'Received.'.$signal.',.aborting' |
c0c20 | 2c 20 74 72 75 65 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 3a 3a 44 45 42 55 47 29 3b 0a 24 72 75 | ,.true,.IOInterface::DEBUG);.$ru |
c0c40 | 6e 43 6c 65 61 6e 75 70 28 29 3b 0a 24 68 61 6e 64 6c 65 72 2d 3e 65 78 69 74 57 69 74 68 4c 61 | nCleanup();.$handler->exitWithLa |
c0c60 | 73 74 53 69 67 6e 61 6c 28 29 3b 0a 7d 29 3b 0a 0a 74 72 79 20 7b 0a 0a 0a 24 62 61 74 63 68 65 | stSignal();.});..try.{...$batche |
c0c80 | 73 20 3d 20 5b 5d 3b 0a 24 62 61 74 63 68 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 6f | s.=.[];.$batch.=.[];.foreach.($o |
c0ca0 | 70 65 72 61 74 69 6f 6e 73 20 61 73 20 24 69 6e 64 65 78 20 3d 3e 20 24 6f 70 65 72 61 74 69 6f | perations.as.$index.=>.$operatio |
c0cc0 | 6e 29 20 7b 0a 69 66 20 28 24 6f 70 65 72 61 74 69 6f 6e 20 69 6e 73 74 61 6e 63 65 6f 66 20 55 | n).{.if.($operation.instanceof.U |
c0ce0 | 70 64 61 74 65 4f 70 65 72 61 74 69 6f 6e 20 7c 7c 20 24 6f 70 65 72 61 74 69 6f 6e 20 69 6e 73 | pdateOperation.||.$operation.ins |
c0d00 | 74 61 6e 63 65 6f 66 20 49 6e 73 74 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 29 20 7b 0a 24 70 61 63 | tanceof.InstallOperation).{.$pac |
c0d20 | 6b 61 67 65 20 3d 20 24 6f 70 65 72 61 74 69 6f 6e 20 69 6e 73 74 61 6e 63 65 6f 66 20 55 70 64 | kage.=.$operation.instanceof.Upd |
c0d40 | 61 74 65 4f 70 65 72 61 74 69 6f 6e 20 3f 20 24 6f 70 65 72 61 74 69 6f 6e 2d 3e 67 65 74 54 61 | ateOperation.?.$operation->getTa |
c0d60 | 72 67 65 74 50 61 63 6b 61 67 65 28 29 20 3a 20 24 6f 70 65 72 61 74 69 6f 6e 2d 3e 67 65 74 50 | rgetPackage().:.$operation->getP |
c0d80 | 61 63 6b 61 67 65 28 29 3b 0a 69 66 20 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 54 79 70 65 28 | ackage();.if.($package->getType( |
c0da0 | 29 20 3d 3d 3d 20 27 63 6f 6d 70 6f 73 65 72 2d 70 6c 75 67 69 6e 27 20 26 26 20 28 24 65 78 74 | ).===.'composer-plugin'.&&.($ext |
c0dc0 | 72 61 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 45 78 74 72 61 28 29 29 20 26 26 20 69 73 | ra.=.$package->getExtra()).&&.is |
c0de0 | 73 65 74 28 24 65 78 74 72 61 5b 27 70 6c 75 67 69 6e 2d 6d 6f 64 69 66 69 65 73 2d 64 6f 77 6e | set($extra['plugin-modifies-down |
c0e00 | 6c 6f 61 64 73 27 5d 29 20 26 26 20 24 65 78 74 72 61 5b 27 70 6c 75 67 69 6e 2d 6d 6f 64 69 66 | loads']).&&.$extra['plugin-modif |
c0e20 | 69 65 73 2d 64 6f 77 6e 6c 6f 61 64 73 27 5d 20 3d 3d 3d 20 74 72 75 65 29 20 7b 0a 69 66 20 28 | ies-downloads'].===.true).{.if.( |
c0e40 | 24 62 61 74 63 68 29 20 7b 0a 24 62 61 74 63 68 65 73 5b 5d 20 3d 20 24 62 61 74 63 68 3b 0a 7d | $batch).{.$batches[].=.$batch;.} |
c0e60 | 0a 24 62 61 74 63 68 65 73 5b 5d 20 3d 20 5b 24 69 6e 64 65 78 20 3d 3e 20 24 6f 70 65 72 61 74 | .$batches[].=.[$index.=>.$operat |
c0e80 | 69 6f 6e 5d 3b 0a 24 62 61 74 63 68 20 3d 20 5b 5d 3b 0a 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a | ion];.$batch.=.[];..continue;.}. |
c0ea0 | 7d 0a 24 62 61 74 63 68 5b 24 69 6e 64 65 78 5d 20 3d 20 24 6f 70 65 72 61 74 69 6f 6e 3b 0a 7d | }.$batch[$index].=.$operation;.} |
c0ec0 | 0a 0a 69 66 20 28 24 62 61 74 63 68 29 20 7b 0a 24 62 61 74 63 68 65 73 5b 5d 20 3d 20 24 62 61 | ..if.($batch).{.$batches[].=.$ba |
c0ee0 | 74 63 68 3b 0a 7d 0a 0a 66 6f 72 65 61 63 68 20 28 24 62 61 74 63 68 65 73 20 61 73 20 24 62 61 | tch;.}..foreach.($batches.as.$ba |
c0f00 | 74 63 68 29 20 7b 0a 24 74 68 69 73 2d 3e 64 6f 77 6e 6c 6f 61 64 41 6e 64 45 78 65 63 75 74 65 | tch).{.$this->downloadAndExecute |
c0f20 | 42 61 74 63 68 28 24 72 65 70 6f 2c 20 24 62 61 74 63 68 2c 20 24 63 6c 65 61 6e 75 70 50 72 6f | Batch($repo,.$batch,.$cleanupPro |
c0f40 | 6d 69 73 65 73 2c 20 24 64 65 76 4d 6f 64 65 2c 20 24 72 75 6e 53 63 72 69 70 74 73 2c 20 24 6f | mises,.$devMode,.$runScripts,.$o |
c0f60 | 70 65 72 61 74 69 6f 6e 73 29 3b 0a 7d 0a 7d 20 63 61 74 63 68 20 28 5c 45 78 63 65 70 74 69 6f | perations);.}.}.catch.(\Exceptio |
c0f80 | 6e 20 24 65 29 20 7b 0a 24 72 75 6e 43 6c 65 61 6e 75 70 28 29 3b 0a 0a 74 68 72 6f 77 20 24 65 | n.$e).{.$runCleanup();..throw.$e |
c0fa0 | 3b 0a 7d 20 66 69 6e 61 6c 6c 79 20 7b 0a 24 73 69 67 6e 61 6c 48 61 6e 64 6c 65 72 2d 3e 75 6e | ;.}.finally.{.$signalHandler->un |
c0fc0 | 72 65 67 69 73 74 65 72 28 29 3b 0a 7d 0a 0a 0a 0a 0a 24 72 65 70 6f 2d 3e 77 72 69 74 65 28 24 | register();.}.....$repo->write($ |
c0fe0 | 64 65 76 4d 6f 64 65 2c 20 24 74 68 69 73 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 | devMode,.$this);.}.......private |
c1000 | 20 66 75 6e 63 74 69 6f 6e 20 64 6f 77 6e 6c 6f 61 64 41 6e 64 45 78 65 63 75 74 65 42 61 74 63 | .function.downloadAndExecuteBatc |
c1020 | 68 28 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 20 24 | h(InstalledRepositoryInterface.$ |
c1040 | 72 65 70 6f 2c 20 61 72 72 61 79 20 24 6f 70 65 72 61 74 69 6f 6e 73 2c 20 61 72 72 61 79 20 26 | repo,.array.$operations,.array.& |
c1060 | 24 63 6c 65 61 6e 75 70 50 72 6f 6d 69 73 65 73 2c 20 62 6f 6f 6c 20 24 64 65 76 4d 6f 64 65 2c | $cleanupPromises,.bool.$devMode, |
c1080 | 20 62 6f 6f 6c 20 24 72 75 6e 53 63 72 69 70 74 73 2c 20 61 72 72 61 79 20 24 61 6c 6c 4f 70 65 | .bool.$runScripts,.array.$allOpe |
c10a0 | 72 61 74 69 6f 6e 73 29 3a 20 76 6f 69 64 0a 7b 0a 24 70 72 6f 6d 69 73 65 73 20 3d 20 5b 5d 3b | rations):.void.{.$promises.=.[]; |
c10c0 | 0a 0a 66 6f 72 65 61 63 68 20 28 24 6f 70 65 72 61 74 69 6f 6e 73 20 61 73 20 24 69 6e 64 65 78 | ..foreach.($operations.as.$index |
c10e0 | 20 3d 3e 20 24 6f 70 65 72 61 74 69 6f 6e 29 20 7b 0a 24 6f 70 54 79 70 65 20 3d 20 24 6f 70 65 | .=>.$operation).{.$opType.=.$ope |
c1100 | 72 61 74 69 6f 6e 2d 3e 67 65 74 4f 70 65 72 61 74 69 6f 6e 54 79 70 65 28 29 3b 0a 0a 0a 69 66 | ration->getOperationType();...if |
c1120 | 20 28 21 69 6e 5f 61 72 72 61 79 28 24 6f 70 54 79 70 65 2c 20 5b 27 75 70 64 61 74 65 27 2c 20 | .(!in_array($opType,.['update',. |
c1140 | 27 69 6e 73 74 61 6c 6c 27 2c 20 27 75 6e 69 6e 73 74 61 6c 6c 27 5d 29 29 20 7b 0a 63 6f 6e 74 | 'install',.'uninstall'])).{.cont |
c1160 | 69 6e 75 65 3b 0a 7d 0a 0a 69 66 20 28 24 6f 70 54 79 70 65 20 3d 3d 3d 20 27 75 70 64 61 74 65 | inue;.}..if.($opType.===.'update |
c1180 | 27 29 20 7b 0a 0a 24 70 61 63 6b 61 67 65 20 3d 20 24 6f 70 65 72 61 74 69 6f 6e 2d 3e 67 65 74 | ').{..$package.=.$operation->get |
c11a0 | 54 61 72 67 65 74 50 61 63 6b 61 67 65 28 29 3b 0a 24 69 6e 69 74 69 61 6c 50 61 63 6b 61 67 65 | TargetPackage();.$initialPackage |
c11c0 | 20 3d 20 24 6f 70 65 72 61 74 69 6f 6e 2d 3e 67 65 74 49 6e 69 74 69 61 6c 50 61 63 6b 61 67 65 | .=.$operation->getInitialPackage |
c11e0 | 28 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 0a 24 70 61 63 6b 61 67 65 20 3d 20 24 6f 70 65 72 61 74 | ();.}.else.{..$package.=.$operat |
c1200 | 69 6f 6e 2d 3e 67 65 74 50 61 63 6b 61 67 65 28 29 3b 0a 24 69 6e 69 74 69 61 6c 50 61 63 6b 61 | ion->getPackage();.$initialPacka |
c1220 | 67 65 20 3d 20 6e 75 6c 6c 3b 0a 7d 0a 24 69 6e 73 74 61 6c 6c 65 72 20 3d 20 24 74 68 69 73 2d | ge.=.null;.}.$installer.=.$this- |
c1240 | 3e 67 65 74 49 6e 73 74 61 6c 6c 65 72 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 54 79 70 65 28 | >getInstaller($package->getType( |
c1260 | 29 29 3b 0a 0a 24 63 6c 65 61 6e 75 70 50 72 6f 6d 69 73 65 73 5b 24 69 6e 64 65 78 5d 20 3d 20 | ));..$cleanupPromises[$index].=. |
c1280 | 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 29 20 75 73 65 20 28 24 6f 70 54 79 70 65 2c | static.function.().use.($opType, |
c12a0 | 20 24 69 6e 73 74 61 6c 6c 65 72 2c 20 24 70 61 63 6b 61 67 65 2c 20 24 69 6e 69 74 69 61 6c 50 | .$installer,.$package,.$initialP |
c12c0 | 61 63 6b 61 67 65 29 20 7b 0a 0a 0a 69 66 20 28 21 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 49 6e | ackage).{...if.(!$package->getIn |
c12e0 | 73 74 61 6c 6c 61 74 69 6f 6e 53 6f 75 72 63 65 28 29 29 20 7b 0a 72 65 74 75 72 6e 3b 0a 7d 0a | stallationSource()).{.return;.}. |
c1300 | 0a 72 65 74 75 72 6e 20 24 69 6e 73 74 61 6c 6c 65 72 2d 3e 63 6c 65 61 6e 75 70 28 24 6f 70 54 | .return.$installer->cleanup($opT |
c1320 | 79 70 65 2c 20 24 70 61 63 6b 61 67 65 2c 20 24 69 6e 69 74 69 61 6c 50 61 63 6b 61 67 65 29 3b | ype,.$package,.$initialPackage); |
c1340 | 0a 7d 3b 0a 0a 69 66 20 28 24 6f 70 54 79 70 65 20 21 3d 3d 20 27 75 6e 69 6e 73 74 61 6c 6c 27 | .};..if.($opType.!==.'uninstall' |
c1360 | 29 20 7b 0a 24 70 72 6f 6d 69 73 65 20 3d 20 24 69 6e 73 74 61 6c 6c 65 72 2d 3e 64 6f 77 6e 6c | ).{.$promise.=.$installer->downl |
c1380 | 6f 61 64 28 24 70 61 63 6b 61 67 65 2c 20 24 69 6e 69 74 69 61 6c 50 61 63 6b 61 67 65 29 3b 0a | oad($package,.$initialPackage);. |
c13a0 | 69 66 20 28 24 70 72 6f 6d 69 73 65 29 20 7b 0a 24 70 72 6f 6d 69 73 65 73 5b 5d 20 3d 20 24 70 | if.($promise).{.$promises[].=.$p |
c13c0 | 72 6f 6d 69 73 65 3b 0a 7d 0a 7d 0a 7d 0a 0a 0a 69 66 20 28 63 6f 75 6e 74 28 24 70 72 6f 6d 69 | romise;.}.}.}...if.(count($promi |
c13e0 | 73 65 73 29 29 20 7b 0a 24 74 68 69 73 2d 3e 77 61 69 74 4f 6e 50 72 6f 6d 69 73 65 73 28 24 70 | ses)).{.$this->waitOnPromises($p |
c1400 | 72 6f 6d 69 73 65 73 29 3b 0a 7d 0a 0a 0a 0a 24 62 61 74 63 68 65 73 20 3d 20 5b 5d 3b 0a 24 62 | romises);.}....$batches.=.[];.$b |
c1420 | 61 74 63 68 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 6f 70 65 72 61 74 69 6f 6e 73 20 | atch.=.[];.foreach.($operations. |
c1440 | 61 73 20 24 69 6e 64 65 78 20 3d 3e 20 24 6f 70 65 72 61 74 69 6f 6e 29 20 7b 0a 69 66 20 28 24 | as.$index.=>.$operation).{.if.($ |
c1460 | 6f 70 65 72 61 74 69 6f 6e 20 69 6e 73 74 61 6e 63 65 6f 66 20 49 6e 73 74 61 6c 6c 4f 70 65 72 | operation.instanceof.InstallOper |
c1480 | 61 74 69 6f 6e 20 7c 7c 20 24 6f 70 65 72 61 74 69 6f 6e 20 69 6e 73 74 61 6e 63 65 6f 66 20 55 | ation.||.$operation.instanceof.U |
c14a0 | 70 64 61 74 65 4f 70 65 72 61 74 69 6f 6e 29 20 7b 0a 24 70 61 63 6b 61 67 65 20 3d 20 24 6f 70 | pdateOperation).{.$package.=.$op |
c14c0 | 65 72 61 74 69 6f 6e 20 69 6e 73 74 61 6e 63 65 6f 66 20 55 70 64 61 74 65 4f 70 65 72 61 74 69 | eration.instanceof.UpdateOperati |
c14e0 | 6f 6e 20 3f 20 24 6f 70 65 72 61 74 69 6f 6e 2d 3e 67 65 74 54 61 72 67 65 74 50 61 63 6b 61 67 | on.?.$operation->getTargetPackag |
c1500 | 65 28 29 20 3a 20 24 6f 70 65 72 61 74 69 6f 6e 2d 3e 67 65 74 50 61 63 6b 61 67 65 28 29 3b 0a | e().:.$operation->getPackage();. |
c1520 | 69 66 20 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 54 79 70 65 28 29 20 3d 3d 3d 20 27 63 6f 6d | if.($package->getType().===.'com |
c1540 | 70 6f 73 65 72 2d 70 6c 75 67 69 6e 27 20 7c 7c 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 54 79 | poser-plugin'.||.$package->getTy |
c1560 | 70 65 28 29 20 3d 3d 3d 20 27 63 6f 6d 70 6f 73 65 72 2d 69 6e 73 74 61 6c 6c 65 72 27 29 20 7b | pe().===.'composer-installer').{ |
c1580 | 0a 69 66 20 28 24 62 61 74 63 68 29 20 7b 0a 24 62 61 74 63 68 65 73 5b 5d 20 3d 20 24 62 61 74 | .if.($batch).{.$batches[].=.$bat |
c15a0 | 63 68 3b 0a 7d 0a 24 62 61 74 63 68 65 73 5b 5d 20 3d 20 5b 24 69 6e 64 65 78 20 3d 3e 20 24 6f | ch;.}.$batches[].=.[$index.=>.$o |
c15c0 | 70 65 72 61 74 69 6f 6e 5d 3b 0a 24 62 61 74 63 68 20 3d 20 5b 5d 3b 0a 0a 63 6f 6e 74 69 6e 75 | peration];.$batch.=.[];..continu |
c15e0 | 65 3b 0a 7d 0a 7d 0a 24 62 61 74 63 68 5b 24 69 6e 64 65 78 5d 20 3d 20 24 6f 70 65 72 61 74 69 | e;.}.}.$batch[$index].=.$operati |
c1600 | 6f 6e 3b 0a 7d 0a 0a 69 66 20 28 24 62 61 74 63 68 29 20 7b 0a 24 62 61 74 63 68 65 73 5b 5d 20 | on;.}..if.($batch).{.$batches[]. |
c1620 | 3d 20 24 62 61 74 63 68 3b 0a 7d 0a 0a 66 6f 72 65 61 63 68 20 28 24 62 61 74 63 68 65 73 20 61 | =.$batch;.}..foreach.($batches.a |
c1640 | 73 20 24 62 61 74 63 68 29 20 7b 0a 24 74 68 69 73 2d 3e 65 78 65 63 75 74 65 42 61 74 63 68 28 | s.$batch).{.$this->executeBatch( |
c1660 | 24 72 65 70 6f 2c 20 24 62 61 74 63 68 2c 20 24 63 6c 65 61 6e 75 70 50 72 6f 6d 69 73 65 73 2c | $repo,.$batch,.$cleanupPromises, |
c1680 | 20 24 64 65 76 4d 6f 64 65 2c 20 24 72 75 6e 53 63 72 69 70 74 73 2c 20 24 61 6c 6c 4f 70 65 72 | .$devMode,.$runScripts,.$allOper |
c16a0 | 61 74 69 6f 6e 73 29 3b 0a 7d 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 | ations);.}.}.......private.funct |
c16c0 | 69 6f 6e 20 65 78 65 63 75 74 65 42 61 74 63 68 28 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 | ion.executeBatch(InstalledReposi |
c16e0 | 74 6f 72 79 49 6e 74 65 72 66 61 63 65 20 24 72 65 70 6f 2c 20 61 72 72 61 79 20 24 6f 70 65 72 | toryInterface.$repo,.array.$oper |
c1700 | 61 74 69 6f 6e 73 2c 20 61 72 72 61 79 20 24 63 6c 65 61 6e 75 70 50 72 6f 6d 69 73 65 73 2c 20 | ations,.array.$cleanupPromises,. |
c1720 | 62 6f 6f 6c 20 24 64 65 76 4d 6f 64 65 2c 20 62 6f 6f 6c 20 24 72 75 6e 53 63 72 69 70 74 73 2c | bool.$devMode,.bool.$runScripts, |
c1740 | 20 61 72 72 61 79 20 24 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 73 29 3a 20 76 6f 69 64 0a 7b 0a 24 | .array.$allOperations):.void.{.$ |
c1760 | 70 72 6f 6d 69 73 65 73 20 3d 20 5b 5d 3b 0a 24 70 6f 73 74 45 78 65 63 43 61 6c 6c 62 61 63 6b | promises.=.[];.$postExecCallback |
c1780 | 73 20 3d 20 5b 5d 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 6f 70 65 72 61 74 69 6f 6e 73 20 61 73 | s.=.[];..foreach.($operations.as |
c17a0 | 20 24 69 6e 64 65 78 20 3d 3e 20 24 6f 70 65 72 61 74 69 6f 6e 29 20 7b 0a 24 6f 70 54 79 70 65 | .$index.=>.$operation).{.$opType |
c17c0 | 20 3d 20 24 6f 70 65 72 61 74 69 6f 6e 2d 3e 67 65 74 4f 70 65 72 61 74 69 6f 6e 54 79 70 65 28 | .=.$operation->getOperationType( |
c17e0 | 29 3b 0a 0a 0a 69 66 20 28 21 69 6e 5f 61 72 72 61 79 28 24 6f 70 54 79 70 65 2c 20 5b 27 75 70 | );...if.(!in_array($opType,.['up |
c1800 | 64 61 74 65 27 2c 20 27 69 6e 73 74 61 6c 6c 27 2c 20 27 75 6e 69 6e 73 74 61 6c 6c 27 5d 29 29 | date',.'install',.'uninstall'])) |
c1820 | 20 7b 0a 0a 69 66 20 28 24 74 68 69 73 2d 3e 69 6f 2d 3e 69 73 44 65 62 75 67 28 29 29 20 7b 0a | .{..if.($this->io->isDebug()).{. |
c1840 | 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 20 20 2d 20 27 20 2e 20 24 | $this->io->writeError('..-.'...$ |
c1860 | 6f 70 65 72 61 74 69 6f 6e 2d 3e 73 68 6f 77 28 66 61 6c 73 65 29 29 3b 0a 7d 0a 24 74 68 69 73 | operation->show(false));.}.$this |
c1880 | 2d 3e 7b 24 6f 70 54 79 70 65 7d 28 24 72 65 70 6f 2c 20 24 6f 70 65 72 61 74 69 6f 6e 29 3b 0a | ->{$opType}($repo,.$operation);. |
c18a0 | 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 69 66 20 28 24 6f 70 54 79 70 65 20 3d 3d 3d 20 27 75 | .continue;.}..if.($opType.===.'u |
c18c0 | 70 64 61 74 65 27 29 20 7b 0a 0a 24 70 61 63 6b 61 67 65 20 3d 20 24 6f 70 65 72 61 74 69 6f 6e | pdate').{..$package.=.$operation |
c18e0 | 2d 3e 67 65 74 54 61 72 67 65 74 50 61 63 6b 61 67 65 28 29 3b 0a 24 69 6e 69 74 69 61 6c 50 61 | ->getTargetPackage();.$initialPa |
c1900 | 63 6b 61 67 65 20 3d 20 24 6f 70 65 72 61 74 69 6f 6e 2d 3e 67 65 74 49 6e 69 74 69 61 6c 50 61 | ckage.=.$operation->getInitialPa |
c1920 | 63 6b 61 67 65 28 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 0a 24 70 61 63 6b 61 67 65 20 3d 20 24 6f | ckage();.}.else.{..$package.=.$o |
c1940 | 70 65 72 61 74 69 6f 6e 2d 3e 67 65 74 50 61 63 6b 61 67 65 28 29 3b 0a 24 69 6e 69 74 69 61 6c | peration->getPackage();.$initial |
c1960 | 50 61 63 6b 61 67 65 20 3d 20 6e 75 6c 6c 3b 0a 7d 0a 24 69 6e 73 74 61 6c 6c 65 72 20 3d 20 24 | Package.=.null;.}.$installer.=.$ |
c1980 | 74 68 69 73 2d 3e 67 65 74 49 6e 73 74 61 6c 6c 65 72 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 | this->getInstaller($package->get |
c19a0 | 54 79 70 65 28 29 29 3b 0a 0a 24 65 76 65 6e 74 4e 61 6d 65 20 3d 20 5b 0a 27 69 6e 73 74 61 6c | Type());..$eventName.=.[.'instal |
c19c0 | 6c 27 20 3d 3e 20 50 61 63 6b 61 67 65 45 76 65 6e 74 73 3a 3a 50 52 45 5f 50 41 43 4b 41 47 45 | l'.=>.PackageEvents::PRE_PACKAGE |
c19e0 | 5f 49 4e 53 54 41 4c 4c 2c 0a 27 75 70 64 61 74 65 27 20 3d 3e 20 50 61 63 6b 61 67 65 45 76 65 | _INSTALL,.'update'.=>.PackageEve |
c1a00 | 6e 74 73 3a 3a 50 52 45 5f 50 41 43 4b 41 47 45 5f 55 50 44 41 54 45 2c 0a 27 75 6e 69 6e 73 74 | nts::PRE_PACKAGE_UPDATE,.'uninst |
c1a20 | 61 6c 6c 27 20 3d 3e 20 50 61 63 6b 61 67 65 45 76 65 6e 74 73 3a 3a 50 52 45 5f 50 41 43 4b 41 | all'.=>.PackageEvents::PRE_PACKA |
c1a40 | 47 45 5f 55 4e 49 4e 53 54 41 4c 4c 2c 0a 5d 5b 24 6f 70 54 79 70 65 5d 20 3f 3f 20 6e 75 6c 6c | GE_UNINSTALL,.][$opType].??.null |
c1a60 | 3b 0a 0a 69 66 20 28 6e 75 6c 6c 20 21 3d 3d 20 24 65 76 65 6e 74 4e 61 6d 65 20 26 26 20 24 72 | ;..if.(null.!==.$eventName.&&.$r |
c1a80 | 75 6e 53 63 72 69 70 74 73 20 26 26 20 24 74 68 69 73 2d 3e 65 76 65 6e 74 44 69 73 70 61 74 63 | unScripts.&&.$this->eventDispatc |
c1aa0 | 68 65 72 29 20 7b 0a 24 74 68 69 73 2d 3e 65 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 2d 3e 64 | her).{.$this->eventDispatcher->d |
c1ac0 | 69 73 70 61 74 63 68 50 61 63 6b 61 67 65 45 76 65 6e 74 28 24 65 76 65 6e 74 4e 61 6d 65 2c 20 | ispatchPackageEvent($eventName,. |
c1ae0 | 24 64 65 76 4d 6f 64 65 2c 20 24 72 65 70 6f 2c 20 24 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 73 2c | $devMode,.$repo,.$allOperations, |
c1b00 | 20 24 6f 70 65 72 61 74 69 6f 6e 29 3b 0a 7d 0a 0a 24 64 69 73 70 61 74 63 68 65 72 20 3d 20 24 | .$operation);.}..$dispatcher.=.$ |
c1b20 | 74 68 69 73 2d 3e 65 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 3b 0a 24 69 6f 20 3d 20 24 74 68 | this->eventDispatcher;.$io.=.$th |
c1b40 | 69 73 2d 3e 69 6f 3b 0a 0a 24 70 72 6f 6d 69 73 65 20 3d 20 24 69 6e 73 74 61 6c 6c 65 72 2d 3e | is->io;..$promise.=.$installer-> |
c1b60 | 70 72 65 70 61 72 65 28 24 6f 70 54 79 70 65 2c 20 24 70 61 63 6b 61 67 65 2c 20 24 69 6e 69 74 | prepare($opType,.$package,.$init |
c1b80 | 69 61 6c 50 61 63 6b 61 67 65 29 3b 0a 69 66 20 28 21 24 70 72 6f 6d 69 73 65 20 69 6e 73 74 61 | ialPackage);.if.(!$promise.insta |
c1ba0 | 6e 63 65 6f 66 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 29 20 7b 0a 24 70 72 6f 6d 69 | nceof.PromiseInterface).{.$promi |
c1bc0 | 73 65 20 3d 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c | se.=.\React\Promise\resolve(null |
c1be0 | 29 3b 0a 7d 0a 0a 24 70 72 6f 6d 69 73 65 20 3d 20 24 70 72 6f 6d 69 73 65 2d 3e 74 68 65 6e 28 | );.}..$promise.=.$promise->then( |
c1c00 | 66 75 6e 63 74 69 6f 6e 20 28 29 20 75 73 65 20 28 24 6f 70 54 79 70 65 2c 20 24 72 65 70 6f 2c | function.().use.($opType,.$repo, |
c1c20 | 20 24 6f 70 65 72 61 74 69 6f 6e 29 20 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 7b 24 6f | .$operation).{.return.$this->{$o |
c1c40 | 70 54 79 70 65 7d 28 24 72 65 70 6f 2c 20 24 6f 70 65 72 61 74 69 6f 6e 29 3b 0a 7d 29 2d 3e 74 | pType}($repo,.$operation);.})->t |
c1c60 | 68 65 6e 28 24 63 6c 65 61 6e 75 70 50 72 6f 6d 69 73 65 73 5b 24 69 6e 64 65 78 5d 29 0a 2d 3e | hen($cleanupPromises[$index]).-> |
c1c80 | 74 68 65 6e 28 66 75 6e 63 74 69 6f 6e 20 28 29 20 75 73 65 20 28 24 64 65 76 4d 6f 64 65 2c 20 | then(function.().use.($devMode,. |
c1ca0 | 24 72 65 70 6f 29 3a 20 76 6f 69 64 20 7b 0a 24 72 65 70 6f 2d 3e 77 72 69 74 65 28 24 64 65 76 | $repo):.void.{.$repo->write($dev |
c1cc0 | 4d 6f 64 65 2c 20 24 74 68 69 73 29 3b 0a 7d 2c 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e | Mode,.$this);.},.static.function |
c1ce0 | 20 28 24 65 29 20 75 73 65 20 28 24 6f 70 54 79 70 65 2c 20 24 70 61 63 6b 61 67 65 2c 20 24 69 | .($e).use.($opType,.$package,.$i |
c1d00 | 6f 29 3a 20 76 6f 69 64 20 7b 0a 24 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 20 20 20 20 | o):.void.{.$io->writeError('.... |
c1d20 | 3c 65 72 72 6f 72 3e 27 20 2e 20 75 63 66 69 72 73 74 28 24 6f 70 54 79 70 65 29 20 2e 27 20 6f | <error>'...ucfirst($opType)..'.o |
c1d40 | 66 20 27 2e 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 4e 61 6d 65 28 29 2e 27 20 | f.'.$package->getPrettyName().'. |
c1d60 | 66 61 69 6c 65 64 3c 2f 65 72 72 6f 72 3e 27 29 3b 0a 0a 74 68 72 6f 77 20 24 65 3b 0a 7d 29 3b | failed</error>');..throw.$e;.}); |
c1d80 | 0a 0a 24 65 76 65 6e 74 4e 61 6d 65 20 3d 20 5b 0a 27 69 6e 73 74 61 6c 6c 27 20 3d 3e 20 50 61 | ..$eventName.=.[.'install'.=>.Pa |
c1da0 | 63 6b 61 67 65 45 76 65 6e 74 73 3a 3a 50 4f 53 54 5f 50 41 43 4b 41 47 45 5f 49 4e 53 54 41 4c | ckageEvents::POST_PACKAGE_INSTAL |
c1dc0 | 4c 2c 0a 27 75 70 64 61 74 65 27 20 3d 3e 20 50 61 63 6b 61 67 65 45 76 65 6e 74 73 3a 3a 50 4f | L,.'update'.=>.PackageEvents::PO |
c1de0 | 53 54 5f 50 41 43 4b 41 47 45 5f 55 50 44 41 54 45 2c 0a 27 75 6e 69 6e 73 74 61 6c 6c 27 20 3d | ST_PACKAGE_UPDATE,.'uninstall'.= |
c1e00 | 3e 20 50 61 63 6b 61 67 65 45 76 65 6e 74 73 3a 3a 50 4f 53 54 5f 50 41 43 4b 41 47 45 5f 55 4e | >.PackageEvents::POST_PACKAGE_UN |
c1e20 | 49 4e 53 54 41 4c 4c 2c 0a 5d 5b 24 6f 70 54 79 70 65 5d 20 3f 3f 20 6e 75 6c 6c 3b 0a 0a 69 66 | INSTALL,.][$opType].??.null;..if |
c1e40 | 20 28 6e 75 6c 6c 20 21 3d 3d 20 24 65 76 65 6e 74 4e 61 6d 65 20 26 26 20 24 72 75 6e 53 63 72 | .(null.!==.$eventName.&&.$runScr |
c1e60 | 69 70 74 73 20 26 26 20 24 64 69 73 70 61 74 63 68 65 72 29 20 7b 0a 24 70 6f 73 74 45 78 65 63 | ipts.&&.$dispatcher).{.$postExec |
c1e80 | 43 61 6c 6c 62 61 63 6b 73 5b 5d 20 3d 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 29 | Callbacks[].=.static.function.() |
c1ea0 | 20 75 73 65 20 28 24 64 69 73 70 61 74 63 68 65 72 2c 20 24 65 76 65 6e 74 4e 61 6d 65 2c 20 24 | .use.($dispatcher,.$eventName,.$ |
c1ec0 | 64 65 76 4d 6f 64 65 2c 20 24 72 65 70 6f 2c 20 24 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 73 2c 20 | devMode,.$repo,.$allOperations,. |
c1ee0 | 24 6f 70 65 72 61 74 69 6f 6e 29 3a 20 76 6f 69 64 20 7b 0a 24 64 69 73 70 61 74 63 68 65 72 2d | $operation):.void.{.$dispatcher- |
c1f00 | 3e 64 69 73 70 61 74 63 68 50 61 63 6b 61 67 65 45 76 65 6e 74 28 24 65 76 65 6e 74 4e 61 6d 65 | >dispatchPackageEvent($eventName |
c1f20 | 2c 20 24 64 65 76 4d 6f 64 65 2c 20 24 72 65 70 6f 2c 20 24 61 6c 6c 4f 70 65 72 61 74 69 6f 6e | ,.$devMode,.$repo,.$allOperation |
c1f40 | 73 2c 20 24 6f 70 65 72 61 74 69 6f 6e 29 3b 0a 7d 3b 0a 7d 0a 0a 24 70 72 6f 6d 69 73 65 73 5b | s,.$operation);.};.}..$promises[ |
c1f60 | 5d 20 3d 20 24 70 72 6f 6d 69 73 65 3b 0a 7d 0a 0a 0a 69 66 20 28 63 6f 75 6e 74 28 24 70 72 6f | ].=.$promise;.}...if.(count($pro |
c1f80 | 6d 69 73 65 73 29 29 20 7b 0a 24 74 68 69 73 2d 3e 77 61 69 74 4f 6e 50 72 6f 6d 69 73 65 73 28 | mises)).{.$this->waitOnPromises( |
c1fa0 | 24 70 72 6f 6d 69 73 65 73 29 3b 0a 7d 0a 0a 50 6c 61 74 66 6f 72 6d 3a 3a 77 6f 72 6b 61 72 6f | $promises);.}..Platform::workaro |
c1fc0 | 75 6e 64 46 69 6c 65 73 79 73 74 65 6d 49 73 73 75 65 73 28 29 3b 0a 0a 66 6f 72 65 61 63 68 20 | undFilesystemIssues();..foreach. |
c1fe0 | 28 24 70 6f 73 74 45 78 65 63 43 61 6c 6c 62 61 63 6b 73 20 61 73 20 24 63 62 29 20 7b 0a 24 63 | ($postExecCallbacks.as.$cb).{.$c |
c2000 | 62 28 29 3b 0a 7d 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 77 61 | b();.}.}.....private.function.wa |
c2020 | 69 74 4f 6e 50 72 6f 6d 69 73 65 73 28 61 72 72 61 79 20 24 70 72 6f 6d 69 73 65 73 29 3a 20 76 | itOnPromises(array.$promises):.v |
c2040 | 6f 69 64 0a 7b 0a 24 70 72 6f 67 72 65 73 73 20 3d 20 6e 75 6c 6c 3b 0a 69 66 20 28 0a 24 74 68 | oid.{.$progress.=.null;.if.(.$th |
c2060 | 69 73 2d 3e 6f 75 74 70 75 74 50 72 6f 67 72 65 73 73 0a 26 26 20 24 74 68 69 73 2d 3e 69 6f 20 | is->outputProgress.&&.$this->io. |
c2080 | 69 6e 73 74 61 6e 63 65 6f 66 20 43 6f 6e 73 6f 6c 65 49 4f 0a 26 26 20 21 50 6c 61 74 66 6f 72 | instanceof.ConsoleIO.&&.!Platfor |
c20a0 | 6d 3a 3a 67 65 74 45 6e 76 28 27 43 49 27 29 0a 26 26 20 21 24 74 68 69 73 2d 3e 69 6f 2d 3e 69 | m::getEnv('CI').&&.!$this->io->i |
c20c0 | 73 44 65 62 75 67 28 29 0a 26 26 20 63 6f 75 6e 74 28 24 70 72 6f 6d 69 73 65 73 29 20 3e 20 31 | sDebug().&&.count($promises).>.1 |
c20e0 | 0a 29 20 7b 0a 24 70 72 6f 67 72 65 73 73 20 3d 20 24 74 68 69 73 2d 3e 69 6f 2d 3e 67 65 74 50 | .).{.$progress.=.$this->io->getP |
c2100 | 72 6f 67 72 65 73 73 42 61 72 28 29 3b 0a 7d 0a 24 74 68 69 73 2d 3e 6c 6f 6f 70 2d 3e 77 61 69 | rogressBar();.}.$this->loop->wai |
c2120 | 74 28 24 70 72 6f 6d 69 73 65 73 2c 20 24 70 72 6f 67 72 65 73 73 29 3b 0a 69 66 20 28 24 70 72 | t($promises,.$progress);.if.($pr |
c2140 | 6f 67 72 65 73 73 29 20 7b 0a 24 70 72 6f 67 72 65 73 73 2d 3e 63 6c 65 61 72 28 29 3b 0a 0a 69 | ogress).{.$progress->clear();..i |
c2160 | 66 20 28 21 24 74 68 69 73 2d 3e 69 6f 2d 3e 69 73 44 65 63 6f 72 61 74 65 64 28 29 29 20 7b 0a | f.(!$this->io->isDecorated()).{. |
c2180 | 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 27 29 3b 0a 7d 0a 7d 0a 7d | $this->io->writeError('');.}.}.} |
c21a0 | 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 6e 73 74 61 6c 6c 28 | ........public.function.install( |
c21c0 | 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 20 24 72 65 | InstalledRepositoryInterface.$re |
c21e0 | 70 6f 2c 20 49 6e 73 74 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 20 24 6f 70 65 72 61 74 69 6f 6e 29 | po,.InstallOperation.$operation) |
c2200 | 3a 20 3f 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 24 70 61 63 6b 61 67 65 20 3d | :.?PromiseInterface.{.$package.= |
c2220 | 20 24 6f 70 65 72 61 74 69 6f 6e 2d 3e 67 65 74 50 61 63 6b 61 67 65 28 29 3b 0a 24 69 6e 73 74 | .$operation->getPackage();.$inst |
c2240 | 61 6c 6c 65 72 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 49 6e 73 74 61 6c 6c 65 72 28 24 70 61 63 | aller.=.$this->getInstaller($pac |
c2260 | 6b 61 67 65 2d 3e 67 65 74 54 79 70 65 28 29 29 3b 0a 24 70 72 6f 6d 69 73 65 20 3d 20 24 69 6e | kage->getType());.$promise.=.$in |
c2280 | 73 74 61 6c 6c 65 72 2d 3e 69 6e 73 74 61 6c 6c 28 24 72 65 70 6f 2c 20 24 70 61 63 6b 61 67 65 | staller->install($repo,.$package |
c22a0 | 29 3b 0a 24 74 68 69 73 2d 3e 6d 61 72 6b 46 6f 72 4e 6f 74 69 66 69 63 61 74 69 6f 6e 28 24 70 | );.$this->markForNotification($p |
c22c0 | 61 63 6b 61 67 65 29 3b 0a 0a 72 65 74 75 72 6e 20 24 70 72 6f 6d 69 73 65 3b 0a 7d 0a 0a 0a 0a | ackage);..return.$promise;.}.... |
c22e0 | 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 75 70 64 61 74 65 28 49 6e 73 74 61 | ....public.function.update(Insta |
c2300 | 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 20 24 72 65 70 6f 2c 20 55 | lledRepositoryInterface.$repo,.U |
c2320 | 70 64 61 74 65 4f 70 65 72 61 74 69 6f 6e 20 24 6f 70 65 72 61 74 69 6f 6e 29 3a 20 3f 50 72 6f | pdateOperation.$operation):.?Pro |
c2340 | 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 24 69 6e 69 74 69 61 6c 20 3d 20 24 6f 70 65 72 | miseInterface.{.$initial.=.$oper |
c2360 | 61 74 69 6f 6e 2d 3e 67 65 74 49 6e 69 74 69 61 6c 50 61 63 6b 61 67 65 28 29 3b 0a 24 74 61 72 | ation->getInitialPackage();.$tar |
c2380 | 67 65 74 20 3d 20 24 6f 70 65 72 61 74 69 6f 6e 2d 3e 67 65 74 54 61 72 67 65 74 50 61 63 6b 61 | get.=.$operation->getTargetPacka |
c23a0 | 67 65 28 29 3b 0a 0a 24 69 6e 69 74 69 61 6c 54 79 70 65 20 3d 20 24 69 6e 69 74 69 61 6c 2d 3e | ge();..$initialType.=.$initial-> |
c23c0 | 67 65 74 54 79 70 65 28 29 3b 0a 24 74 61 72 67 65 74 54 79 70 65 20 3d 20 24 74 61 72 67 65 74 | getType();.$targetType.=.$target |
c23e0 | 2d 3e 67 65 74 54 79 70 65 28 29 3b 0a 0a 69 66 20 28 24 69 6e 69 74 69 61 6c 54 79 70 65 20 3d | ->getType();..if.($initialType.= |
c2400 | 3d 3d 20 24 74 61 72 67 65 74 54 79 70 65 29 20 7b 0a 24 69 6e 73 74 61 6c 6c 65 72 20 3d 20 24 | ==.$targetType).{.$installer.=.$ |
c2420 | 74 68 69 73 2d 3e 67 65 74 49 6e 73 74 61 6c 6c 65 72 28 24 69 6e 69 74 69 61 6c 54 79 70 65 29 | this->getInstaller($initialType) |
c2440 | 3b 0a 24 70 72 6f 6d 69 73 65 20 3d 20 24 69 6e 73 74 61 6c 6c 65 72 2d 3e 75 70 64 61 74 65 28 | ;.$promise.=.$installer->update( |
c2460 | 24 72 65 70 6f 2c 20 24 69 6e 69 74 69 61 6c 2c 20 24 74 61 72 67 65 74 29 3b 0a 24 74 68 69 73 | $repo,.$initial,.$target);.$this |
c2480 | 2d 3e 6d 61 72 6b 46 6f 72 4e 6f 74 69 66 69 63 61 74 69 6f 6e 28 24 74 61 72 67 65 74 29 3b 0a | ->markForNotification($target);. |
c24a0 | 7d 20 65 6c 73 65 20 7b 0a 24 70 72 6f 6d 69 73 65 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 49 6e | }.else.{.$promise.=.$this->getIn |
c24c0 | 73 74 61 6c 6c 65 72 28 24 69 6e 69 74 69 61 6c 54 79 70 65 29 2d 3e 75 6e 69 6e 73 74 61 6c 6c | staller($initialType)->uninstall |
c24e0 | 28 24 72 65 70 6f 2c 20 24 69 6e 69 74 69 61 6c 29 3b 0a 69 66 20 28 21 24 70 72 6f 6d 69 73 65 | ($repo,.$initial);.if.(!$promise |
c2500 | 20 69 6e 73 74 61 6e 63 65 6f 66 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 29 20 7b 0a | .instanceof.PromiseInterface).{. |
c2520 | 24 70 72 6f 6d 69 73 65 20 3d 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 | $promise.=.\React\Promise\resolv |
c2540 | 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a 24 69 6e 73 74 61 6c 6c 65 72 20 3d 20 24 74 68 69 73 2d 3e | e(null);.}..$installer.=.$this-> |
c2560 | 67 65 74 49 6e 73 74 61 6c 6c 65 72 28 24 74 61 72 67 65 74 54 79 70 65 29 3b 0a 24 70 72 6f 6d | getInstaller($targetType);.$prom |
c2580 | 69 73 65 20 3d 20 24 70 72 6f 6d 69 73 65 2d 3e 74 68 65 6e 28 73 74 61 74 69 63 20 66 75 6e 63 | ise.=.$promise->then(static.func |
c25a0 | 74 69 6f 6e 20 28 29 20 75 73 65 20 28 24 69 6e 73 74 61 6c 6c 65 72 2c 20 24 72 65 70 6f 2c 20 | tion.().use.($installer,.$repo,. |
c25c0 | 24 74 61 72 67 65 74 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 20 7b 0a 24 70 72 | $target):.PromiseInterface.{.$pr |
c25e0 | 6f 6d 69 73 65 20 3d 20 24 69 6e 73 74 61 6c 6c 65 72 2d 3e 69 6e 73 74 61 6c 6c 28 24 72 65 70 | omise.=.$installer->install($rep |
c2600 | 6f 2c 20 24 74 61 72 67 65 74 29 3b 0a 69 66 20 28 24 70 72 6f 6d 69 73 65 20 69 6e 73 74 61 6e | o,.$target);.if.($promise.instan |
c2620 | 63 65 6f 66 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 29 20 7b 0a 72 65 74 75 72 6e 20 | ceof.PromiseInterface).{.return. |
c2640 | 24 70 72 6f 6d 69 73 65 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 | $promise;.}..return.\React\Promi |
c2660 | 73 65 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 | se\resolve(null);.});.}..return. |
c2680 | 24 70 72 6f 6d 69 73 65 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 | $promise;.}........public.functi |
c26a0 | 6f 6e 20 75 6e 69 6e 73 74 61 6c 6c 28 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 | on.uninstall(InstalledRepository |
c26c0 | 49 6e 74 65 72 66 61 63 65 20 24 72 65 70 6f 2c 20 55 6e 69 6e 73 74 61 6c 6c 4f 70 65 72 61 74 | Interface.$repo,.UninstallOperat |
c26e0 | 69 6f 6e 20 24 6f 70 65 72 61 74 69 6f 6e 29 3a 20 3f 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 | ion.$operation):.?PromiseInterfa |
c2700 | 63 65 0a 7b 0a 24 70 61 63 6b 61 67 65 20 3d 20 24 6f 70 65 72 61 74 69 6f 6e 2d 3e 67 65 74 50 | ce.{.$package.=.$operation->getP |
c2720 | 61 63 6b 61 67 65 28 29 3b 0a 24 69 6e 73 74 61 6c 6c 65 72 20 3d 20 24 74 68 69 73 2d 3e 67 65 | ackage();.$installer.=.$this->ge |
c2740 | 74 49 6e 73 74 61 6c 6c 65 72 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 54 79 70 65 28 29 29 3b | tInstaller($package->getType()); |
c2760 | 0a 0a 72 65 74 75 72 6e 20 24 69 6e 73 74 61 6c 6c 65 72 2d 3e 75 6e 69 6e 73 74 61 6c 6c 28 24 | ..return.$installer->uninstall($ |
c2780 | 72 65 70 6f 2c 20 24 70 61 63 6b 61 67 65 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 | repo,.$package);.}........public |
c27a0 | 20 66 75 6e 63 74 69 6f 6e 20 6d 61 72 6b 41 6c 69 61 73 49 6e 73 74 61 6c 6c 65 64 28 49 6e 73 | .function.markAliasInstalled(Ins |
c27c0 | 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 20 24 72 65 70 6f 2c | talledRepositoryInterface.$repo, |
c27e0 | 20 4d 61 72 6b 41 6c 69 61 73 49 6e 73 74 61 6c 6c 65 64 4f 70 65 72 61 74 69 6f 6e 20 24 6f 70 | .MarkAliasInstalledOperation.$op |
c2800 | 65 72 61 74 69 6f 6e 29 3a 20 76 6f 69 64 0a 7b 0a 24 70 61 63 6b 61 67 65 20 3d 20 24 6f 70 65 | eration):.void.{.$package.=.$ope |
c2820 | 72 61 74 69 6f 6e 2d 3e 67 65 74 50 61 63 6b 61 67 65 28 29 3b 0a 0a 69 66 20 28 21 24 72 65 70 | ration->getPackage();..if.(!$rep |
c2840 | 6f 2d 3e 68 61 73 50 61 63 6b 61 67 65 28 24 70 61 63 6b 61 67 65 29 29 20 7b 0a 24 72 65 70 6f | o->hasPackage($package)).{.$repo |
c2860 | 2d 3e 61 64 64 50 61 63 6b 61 67 65 28 63 6c 6f 6e 65 20 24 70 61 63 6b 61 67 65 29 3b 0a 7d 0a | ->addPackage(clone.$package);.}. |
c2880 | 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 6d 61 72 6b 41 6c 69 | }........public.function.markAli |
c28a0 | 61 73 55 6e 69 6e 73 74 61 6c 6c 65 64 28 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 | asUninstalled(InstalledRepositor |
c28c0 | 79 49 6e 74 65 72 66 61 63 65 20 24 72 65 70 6f 2c 20 4d 61 72 6b 41 6c 69 61 73 55 6e 69 6e 73 | yInterface.$repo,.MarkAliasUnins |
c28e0 | 74 61 6c 6c 65 64 4f 70 65 72 61 74 69 6f 6e 20 24 6f 70 65 72 61 74 69 6f 6e 29 3a 20 76 6f 69 | talledOperation.$operation):.voi |
c2900 | 64 0a 7b 0a 24 70 61 63 6b 61 67 65 20 3d 20 24 6f 70 65 72 61 74 69 6f 6e 2d 3e 67 65 74 50 61 | d.{.$package.=.$operation->getPa |
c2920 | 63 6b 61 67 65 28 29 3b 0a 0a 24 72 65 70 6f 2d 3e 72 65 6d 6f 76 65 50 61 63 6b 61 67 65 28 24 | ckage();..$repo->removePackage($ |
c2940 | 70 61 63 6b 61 67 65 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f | package);.}.......public.functio |
c2960 | 6e 20 67 65 74 49 6e 73 74 61 6c 6c 50 61 74 68 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 | n.getInstallPath(PackageInterfac |
c2980 | 65 20 24 70 61 63 6b 61 67 65 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 24 69 6e 73 74 61 6c 6c 65 72 | e.$package):.string.{.$installer |
c29a0 | 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 49 6e 73 74 61 6c 6c 65 72 28 24 70 61 63 6b 61 67 65 2d | .=.$this->getInstaller($package- |
c29c0 | 3e 67 65 74 54 79 70 65 28 29 29 3b 0a 0a 72 65 74 75 72 6e 20 24 69 6e 73 74 61 6c 6c 65 72 2d | >getType());..return.$installer- |
c29e0 | 3e 67 65 74 49 6e 73 74 61 6c 6c 50 61 74 68 28 24 70 61 63 6b 61 67 65 29 3b 0a 7d 0a 0a 70 75 | >getInstallPath($package);.}..pu |
c2a00 | 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 4f 75 74 70 75 74 50 72 6f 67 72 65 73 73 28 | blic.function.setOutputProgress( |
c2a20 | 62 6f 6f 6c 20 24 6f 75 74 70 75 74 50 72 6f 67 72 65 73 73 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 | bool.$outputProgress):.void.{.$t |
c2a40 | 68 69 73 2d 3e 6f 75 74 70 75 74 50 72 6f 67 72 65 73 73 20 3d 20 24 6f 75 74 70 75 74 50 72 6f | his->outputProgress.=.$outputPro |
c2a60 | 67 72 65 73 73 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 6e 6f 74 69 66 79 | gress;.}..public.function.notify |
c2a80 | 49 6e 73 74 61 6c 6c 73 28 49 4f 49 6e 74 65 72 66 61 63 65 20 24 69 6f 29 3a 20 76 6f 69 64 0a | Installs(IOInterface.$io):.void. |
c2aa0 | 7b 0a 24 70 72 6f 6d 69 73 65 73 20 3d 20 5b 5d 3b 0a 0a 74 72 79 20 7b 0a 66 6f 72 65 61 63 68 | {.$promises.=.[];..try.{.foreach |
c2ac0 | 20 28 24 74 68 69 73 2d 3e 6e 6f 74 69 66 69 61 62 6c 65 50 61 63 6b 61 67 65 73 20 61 73 20 24 | .($this->notifiablePackages.as.$ |
c2ae0 | 72 65 70 6f 55 72 6c 20 3d 3e 20 24 70 61 63 6b 61 67 65 73 29 20 7b 0a 0a 69 66 20 28 73 74 72 | repoUrl.=>.$packages).{..if.(str |
c2b00 | 70 6f 73 28 24 72 65 70 6f 55 72 6c 2c 20 27 25 70 61 63 6b 61 67 65 25 27 29 29 20 7b 0a 66 6f | pos($repoUrl,.'%package%')).{.fo |
c2b20 | 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 73 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a | reach.($packages.as.$package).{. |
c2b40 | 24 75 72 6c 20 3d 20 73 74 72 5f 72 65 70 6c 61 63 65 28 27 25 70 61 63 6b 61 67 65 25 27 2c 20 | $url.=.str_replace('%package%',. |
c2b60 | 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 4e 61 6d 65 28 29 2c 20 24 72 65 70 6f | $package->getPrettyName(),.$repo |
c2b80 | 55 72 6c 29 3b 0a 0a 24 70 61 72 61 6d 73 20 3d 20 5b 0a 27 76 65 72 73 69 6f 6e 27 20 3d 3e 20 | Url);..$params.=.[.'version'.=>. |
c2ba0 | 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 2c 0a 27 76 | $package->getPrettyVersion(),.'v |
c2bc0 | 65 72 73 69 6f 6e 5f 6e 6f 72 6d 61 6c 69 7a 65 64 27 20 3d 3e 20 24 70 61 63 6b 61 67 65 2d 3e | ersion_normalized'.=>.$package-> |
c2be0 | 67 65 74 56 65 72 73 69 6f 6e 28 29 2c 0a 5d 3b 0a 24 6f 70 74 73 20 3d 20 5b 0a 27 72 65 74 72 | getVersion(),.];.$opts.=.[.'retr |
c2c00 | 79 2d 61 75 74 68 2d 66 61 69 6c 75 72 65 27 20 3d 3e 20 66 61 6c 73 65 2c 0a 27 68 74 74 70 27 | y-auth-failure'.=>.false,.'http' |
c2c20 | 20 3d 3e 20 5b 0a 27 6d 65 74 68 6f 64 27 20 3d 3e 20 27 50 4f 53 54 27 2c 0a 27 68 65 61 64 65 | .=>.[.'method'.=>.'POST',.'heade |
c2c40 | 72 27 20 3d 3e 20 5b 27 43 6f 6e 74 65 6e 74 2d 74 79 70 65 3a 20 61 70 70 6c 69 63 61 74 69 6f | r'.=>.['Content-type:.applicatio |
c2c60 | 6e 2f 78 2d 77 77 77 2d 66 6f 72 6d 2d 75 72 6c 65 6e 63 6f 64 65 64 27 5d 2c 0a 27 63 6f 6e 74 | n/x-www-form-urlencoded'],.'cont |
c2c80 | 65 6e 74 27 20 3d 3e 20 68 74 74 70 5f 62 75 69 6c 64 5f 71 75 65 72 79 28 24 70 61 72 61 6d 73 | ent'.=>.http_build_query($params |
c2ca0 | 2c 20 27 27 2c 20 27 26 27 29 2c 0a 27 74 69 6d 65 6f 75 74 27 20 3d 3e 20 33 2c 0a 5d 2c 0a 5d | ,.'',.'&'),.'timeout'.=>.3,.],.] |
c2cc0 | 3b 0a 0a 24 70 72 6f 6d 69 73 65 73 5b 5d 20 3d 20 24 74 68 69 73 2d 3e 6c 6f 6f 70 2d 3e 67 65 | ;..$promises[].=.$this->loop->ge |
c2ce0 | 74 48 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 28 29 2d 3e 61 64 64 28 24 75 72 6c 2c 20 24 6f 70 | tHttpDownloader()->add($url,.$op |
c2d00 | 74 73 29 3b 0a 7d 0a 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 24 70 6f 73 74 44 61 74 61 20 3d | ts);.}..continue;.}..$postData.= |
c2d20 | 20 5b 27 64 6f 77 6e 6c 6f 61 64 73 27 20 3d 3e 20 5b 5d 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 | .['downloads'.=>.[]];.foreach.($ |
c2d40 | 70 61 63 6b 61 67 65 73 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 24 70 61 63 6b 61 67 65 | packages.as.$package).{.$package |
c2d60 | 4e 6f 74 69 66 69 63 61 74 69 6f 6e 20 3d 20 5b 0a 27 6e 61 6d 65 27 20 3d 3e 20 24 70 61 63 6b | Notification.=.[.'name'.=>.$pack |
c2d80 | 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 4e 61 6d 65 28 29 2c 0a 27 76 65 72 73 69 6f 6e 27 20 | age->getPrettyName(),.'version'. |
c2da0 | 3d 3e 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 2c 0a 5d 3b 0a 69 66 | =>.$package->getVersion(),.];.if |
c2dc0 | 20 28 73 74 72 70 6f 73 28 24 72 65 70 6f 55 72 6c 2c 20 27 70 61 63 6b 61 67 69 73 74 2e 6f 72 | .(strpos($repoUrl,.'packagist.or |
c2de0 | 67 2f 27 29 20 21 3d 3d 20 66 61 6c 73 65 29 20 7b 0a 69 66 20 28 69 73 73 65 74 28 46 69 6c 65 | g/').!==.false).{.if.(isset(File |
c2e00 | 44 6f 77 6e 6c 6f 61 64 65 72 3a 3a 24 64 6f 77 6e 6c 6f 61 64 4d 65 74 61 64 61 74 61 5b 24 70 | Downloader::$downloadMetadata[$p |
c2e20 | 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 29 29 20 7b 0a 24 70 61 63 6b 61 67 65 4e | ackage->getName()])).{.$packageN |
c2e40 | 6f 74 69 66 69 63 61 74 69 6f 6e 5b 27 64 6f 77 6e 6c 6f 61 64 65 64 27 5d 20 3d 20 46 69 6c 65 | otification['downloaded'].=.File |
c2e60 | 44 6f 77 6e 6c 6f 61 64 65 72 3a 3a 24 64 6f 77 6e 6c 6f 61 64 4d 65 74 61 64 61 74 61 5b 24 70 | Downloader::$downloadMetadata[$p |
c2e80 | 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 70 61 | ackage->getName()];.}.else.{.$pa |
c2ea0 | 63 6b 61 67 65 4e 6f 74 69 66 69 63 61 74 69 6f 6e 5b 27 64 6f 77 6e 6c 6f 61 64 65 64 27 5d 20 | ckageNotification['downloaded']. |
c2ec0 | 3d 20 66 61 6c 73 65 3b 0a 7d 0a 7d 0a 24 70 6f 73 74 44 61 74 61 5b 27 64 6f 77 6e 6c 6f 61 64 | =.false;.}.}.$postData['download |
c2ee0 | 73 27 5d 5b 5d 20 3d 20 24 70 61 63 6b 61 67 65 4e 6f 74 69 66 69 63 61 74 69 6f 6e 3b 0a 7d 0a | s'][].=.$packageNotification;.}. |
c2f00 | 0a 24 6f 70 74 73 20 3d 20 5b 0a 27 72 65 74 72 79 2d 61 75 74 68 2d 66 61 69 6c 75 72 65 27 20 | .$opts.=.[.'retry-auth-failure'. |
c2f20 | 3d 3e 20 66 61 6c 73 65 2c 0a 27 68 74 74 70 27 20 3d 3e 20 5b 0a 27 6d 65 74 68 6f 64 27 20 3d | =>.false,.'http'.=>.[.'method'.= |
c2f40 | 3e 20 27 50 4f 53 54 27 2c 0a 27 68 65 61 64 65 72 27 20 3d 3e 20 5b 27 43 6f 6e 74 65 6e 74 2d | >.'POST',.'header'.=>.['Content- |
c2f60 | 54 79 70 65 3a 20 61 70 70 6c 69 63 61 74 69 6f 6e 2f 6a 73 6f 6e 27 5d 2c 0a 27 63 6f 6e 74 65 | Type:.application/json'],.'conte |
c2f80 | 6e 74 27 20 3d 3e 20 6a 73 6f 6e 5f 65 6e 63 6f 64 65 28 24 70 6f 73 74 44 61 74 61 29 2c 0a 27 | nt'.=>.json_encode($postData),.' |
c2fa0 | 74 69 6d 65 6f 75 74 27 20 3d 3e 20 36 2c 0a 5d 2c 0a 5d 3b 0a 0a 24 70 72 6f 6d 69 73 65 73 5b | timeout'.=>.6,.],.];..$promises[ |
c2fc0 | 5d 20 3d 20 24 74 68 69 73 2d 3e 6c 6f 6f 70 2d 3e 67 65 74 48 74 74 70 44 6f 77 6e 6c 6f 61 64 | ].=.$this->loop->getHttpDownload |
c2fe0 | 65 72 28 29 2d 3e 61 64 64 28 24 72 65 70 6f 55 72 6c 2c 20 24 6f 70 74 73 29 3b 0a 7d 0a 0a 24 | er()->add($repoUrl,.$opts);.}..$ |
c3000 | 74 68 69 73 2d 3e 6c 6f 6f 70 2d 3e 77 61 69 74 28 24 70 72 6f 6d 69 73 65 73 29 3b 0a 7d 20 63 | this->loop->wait($promises);.}.c |
c3020 | 61 74 63 68 20 28 5c 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 7d 0a 0a 24 74 68 69 73 2d | atch.(\Exception.$e).{.}..$this- |
c3040 | 3e 72 65 73 65 74 28 29 3b 0a 7d 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 6d 61 | >reset();.}..private.function.ma |
c3060 | 72 6b 46 6f 72 4e 6f 74 69 66 69 63 61 74 69 6f 6e 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 | rkForNotification(PackageInterfa |
c3080 | 63 65 20 24 70 61 63 6b 61 67 65 29 3a 20 76 6f 69 64 0a 7b 0a 69 66 20 28 24 70 61 63 6b 61 67 | ce.$package):.void.{.if.($packag |
c30a0 | 65 2d 3e 67 65 74 4e 6f 74 69 66 69 63 61 74 69 6f 6e 55 72 6c 28 29 29 20 7b 0a 24 74 68 69 73 | e->getNotificationUrl()).{.$this |
c30c0 | 2d 3e 6e 6f 74 69 66 69 61 62 6c 65 50 61 63 6b 61 67 65 73 5b 24 70 61 63 6b 61 67 65 2d 3e 67 | ->notifiablePackages[$package->g |
c30e0 | 65 74 4e 6f 74 69 66 69 63 61 74 69 6f 6e 55 72 6c 28 29 5d 5b 24 70 61 63 6b 61 67 65 2d 3e 67 | etNotificationUrl()][$package->g |
c3100 | 65 74 4e 61 6d 65 28 29 5d 20 3d 20 24 70 61 63 6b 61 67 65 3b 0a 7d 0a 7d 0a 7d 0a 3c 3f 70 68 | etName()].=.$package;.}.}.}.<?ph |
c3120 | 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a | p.declare(strict_types=1);...... |
c3140 | 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 49 6e 73 74 61 6c 6c | ......namespace.Composer\Install |
c3160 | 65 72 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6d 70 6f 73 65 72 3b 0a 75 73 65 20 | er;..use.Composer\Composer;.use. |
c3180 | 43 6f 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 5c 54 72 61 6e | Composer\DependencyResolver\Tran |
c31a0 | 73 61 63 74 69 6f 6e 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 45 76 65 6e 74 44 69 73 70 61 | saction;.use.Composer\EventDispa |
c31c0 | 74 63 68 65 72 5c 45 76 65 6e 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 4f 5c 49 4f 49 | tcher\Event;.use.Composer\IO\IOI |
c31e0 | 6e 74 65 72 66 61 63 65 3b 0a 0a 63 6c 61 73 73 20 49 6e 73 74 61 6c 6c 65 72 45 76 65 6e 74 20 | nterface;..class.InstallerEvent. |
c3200 | 65 78 74 65 6e 64 73 20 45 76 65 6e 74 0a 7b 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 63 6f 6d 70 | extends.Event.{....private.$comp |
c3220 | 6f 73 65 72 3b 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 69 6f 3b 0a 0a 0a 0a 0a 70 72 69 76 61 | oser;.....private.$io;.....priva |
c3240 | 74 65 20 24 64 65 76 4d 6f 64 65 3b 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 65 78 65 63 75 74 | te.$devMode;.....private.$execut |
c3260 | 65 4f 70 65 72 61 74 69 6f 6e 73 3b 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 74 72 61 6e 73 61 | eOperations;.....private.$transa |
c3280 | 63 74 69 6f 6e 3b 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e | ction;.....public.function.__con |
c32a0 | 73 74 72 75 63 74 28 73 74 72 69 6e 67 20 24 65 76 65 6e 74 4e 61 6d 65 2c 20 43 6f 6d 70 6f 73 | struct(string.$eventName,.Compos |
c32c0 | 65 72 20 24 63 6f 6d 70 6f 73 65 72 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 20 24 69 6f 2c 20 62 | er.$composer,.IOInterface.$io,.b |
c32e0 | 6f 6f 6c 20 24 64 65 76 4d 6f 64 65 2c 20 62 6f 6f 6c 20 24 65 78 65 63 75 74 65 4f 70 65 72 61 | ool.$devMode,.bool.$executeOpera |
c3300 | 74 69 6f 6e 73 2c 20 54 72 61 6e 73 61 63 74 69 6f 6e 20 24 74 72 61 6e 73 61 63 74 69 6f 6e 29 | tions,.Transaction.$transaction) |
c3320 | 0a 7b 0a 70 61 72 65 6e 74 3a 3a 5f 5f 63 6f 6e 73 74 72 75 63 74 28 24 65 76 65 6e 74 4e 61 6d | .{.parent::__construct($eventNam |
c3340 | 65 29 3b 0a 0a 24 74 68 69 73 2d 3e 63 6f 6d 70 6f 73 65 72 20 3d 20 24 63 6f 6d 70 6f 73 65 72 | e);..$this->composer.=.$composer |
c3360 | 3b 0a 24 74 68 69 73 2d 3e 69 6f 20 3d 20 24 69 6f 3b 0a 24 74 68 69 73 2d 3e 64 65 76 4d 6f 64 | ;.$this->io.=.$io;.$this->devMod |
c3380 | 65 20 3d 20 24 64 65 76 4d 6f 64 65 3b 0a 24 74 68 69 73 2d 3e 65 78 65 63 75 74 65 4f 70 65 72 | e.=.$devMode;.$this->executeOper |
c33a0 | 61 74 69 6f 6e 73 20 3d 20 24 65 78 65 63 75 74 65 4f 70 65 72 61 74 69 6f 6e 73 3b 0a 24 74 68 | ations.=.$executeOperations;.$th |
c33c0 | 69 73 2d 3e 74 72 61 6e 73 61 63 74 69 6f 6e 20 3d 20 24 74 72 61 6e 73 61 63 74 69 6f 6e 3b 0a | is->transaction.=.$transaction;. |
c33e0 | 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 43 6f 6d 70 6f 73 65 72 28 29 | }..public.function.getComposer() |
c3400 | 3a 20 43 6f 6d 70 6f 73 65 72 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 63 6f 6d 70 6f | :.Composer.{.return.$this->compo |
c3420 | 73 65 72 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 49 4f 28 29 3a | ser;.}..public.function.getIO(): |
c3440 | 20 49 4f 49 6e 74 65 72 66 61 63 65 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 69 6f 3b | .IOInterface.{.return.$this->io; |
c3460 | 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 44 65 76 4d 6f 64 65 28 29 3a | .}..public.function.isDevMode(): |
c3480 | 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 64 65 76 4d 6f 64 65 3b 0a 7d | .bool.{.return.$this->devMode;.} |
c34a0 | 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 45 78 65 63 75 74 69 6e 67 4f 70 65 | ..public.function.isExecutingOpe |
c34c0 | 72 61 74 69 6f 6e 73 28 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e | rations():.bool.{.return.$this-> |
c34e0 | 65 78 65 63 75 74 65 4f 70 65 72 61 74 69 6f 6e 73 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e | executeOperations;.}..public.fun |
c3500 | 63 74 69 6f 6e 20 67 65 74 54 72 61 6e 73 61 63 74 69 6f 6e 28 29 3a 20 3f 54 72 61 6e 73 61 63 | ction.getTransaction():.?Transac |
c3520 | 74 69 6f 6e 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 74 72 61 6e 73 61 63 74 69 6f 6e | tion.{.return.$this->transaction |
c3540 | 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 | ;.}.}.<?php.declare(strict_types |
c3560 | 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 | =1);............namespace.Compos |
c3580 | 65 72 5c 49 6e 73 74 61 6c 6c 65 72 3b 0a 0a 63 6c 61 73 73 20 49 6e 73 74 61 6c 6c 65 72 45 76 | er\Installer;..class.InstallerEv |
c35a0 | 65 6e 74 73 0a 7b 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 50 52 45 5f | ents.{.........public.const.PRE_ |
c35c0 | 4f 50 45 52 41 54 49 4f 4e 53 5f 45 58 45 43 20 3d 20 27 70 72 65 2d 6f 70 65 72 61 74 69 6f 6e | OPERATIONS_EXEC.=.'pre-operation |
c35e0 | 73 2d 65 78 65 63 27 3b 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f | s-exec';.}.<?php.declare(strict_ |
c3600 | 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 | types=1);............namespace.C |
c3620 | 6f 6d 70 6f 73 65 72 5c 49 6e 73 74 61 6c 6c 65 72 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 | omposer\Installer;..use.Composer |
c3640 | 5c 50 61 63 6b 61 67 65 5c 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 | \Package\PackageInterface;.use.C |
c3660 | 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f | omposer\Repository\InstalledRepo |
c3680 | 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 49 6e 76 61 6c 69 64 41 72 67 75 | sitoryInterface;.use.InvalidArgu |
c36a0 | 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 3b 0a 75 73 65 20 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 | mentException;.use.React\Promise |
c36c0 | 5c 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 3b 0a 0a 0a 0a 0a 0a 0a 0a 69 6e 74 65 72 66 | \PromiseInterface;........interf |
c36e0 | 61 63 65 20 49 6e 73 74 61 6c 6c 65 72 49 6e 74 65 72 66 61 63 65 0a 7b 0a 0a 0a 0a 0a 0a 70 75 | ace.InstallerInterface.{......pu |
c3700 | 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 75 70 70 6f 72 74 73 28 73 74 72 69 6e 67 20 24 70 | blic.function.supports(string.$p |
c3720 | 61 63 6b 61 67 65 54 79 70 65 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e | ackageType);..........public.fun |
c3740 | 63 74 69 6f 6e 20 69 73 49 6e 73 74 61 6c 6c 65 64 28 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 | ction.isInstalled(InstalledRepos |
c3760 | 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 20 24 72 65 70 6f 2c 20 50 61 63 6b 61 67 65 49 6e 74 | itoryInterface.$repo,.PackageInt |
c3780 | 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 | erface.$package);.........public |
c37a0 | 20 66 75 6e 63 74 69 6f 6e 20 64 6f 77 6e 6c 6f 61 64 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 | .function.download(PackageInterf |
c37c0 | 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 3f 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 | ace.$package,.?PackageInterface. |
c37e0 | 24 70 72 65 76 50 61 63 6b 61 67 65 20 3d 20 6e 75 6c 6c 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a | $prevPackage.=.null);........... |
c3800 | 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 70 72 65 70 61 72 65 28 73 74 72 69 | ....public.function.prepare(stri |
c3820 | 6e 67 20 24 74 79 70 65 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b | ng.$type,.PackageInterface.$pack |
c3840 | 61 67 65 2c 20 3f 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 72 65 76 50 61 63 6b | age,.?PackageInterface.$prevPack |
c3860 | 61 67 65 20 3d 20 6e 75 6c 6c 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 | age.=.null);.........public.func |
c3880 | 74 69 6f 6e 20 69 6e 73 74 61 6c 6c 28 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 | tion.install(InstalledRepository |
c38a0 | 49 6e 74 65 72 66 61 63 65 20 24 72 65 70 6f 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 | Interface.$repo,.PackageInterfac |
c38c0 | 65 20 24 70 61 63 6b 61 67 65 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 | e.$package);...........public.fu |
c38e0 | 6e 63 74 69 6f 6e 20 75 70 64 61 74 65 28 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 | nction.update(InstalledRepositor |
c3900 | 79 49 6e 74 65 72 66 61 63 65 20 24 72 65 70 6f 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 | yInterface.$repo,.PackageInterfa |
c3920 | 63 65 20 24 69 6e 69 74 69 61 6c 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 74 | ce.$initial,.PackageInterface.$t |
c3940 | 61 72 67 65 74 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 | arget);.........public.function. |
c3960 | 75 6e 69 6e 73 74 61 6c 6c 28 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 | uninstall(InstalledRepositoryInt |
c3980 | 65 72 66 61 63 65 20 24 72 65 70 6f 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 | erface.$repo,.PackageInterface.$ |
c39a0 | 70 61 63 6b 61 67 65 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 | package);..............public.fu |
c39c0 | 6e 63 74 69 6f 6e 20 63 6c 65 61 6e 75 70 28 73 74 72 69 6e 67 20 24 74 79 70 65 2c 20 50 61 63 | nction.cleanup(string.$type,.Pac |
c39e0 | 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 3f 50 61 63 6b 61 67 65 | kageInterface.$package,.?Package |
c3a00 | 49 6e 74 65 72 66 61 63 65 20 24 70 72 65 76 50 61 63 6b 61 67 65 20 3d 20 6e 75 6c 6c 29 3b 0a | Interface.$prevPackage.=.null);. |
c3a20 | 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 49 6e 73 74 61 6c 6c | ......public.function.getInstall |
c3a40 | 50 61 74 68 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 29 3b | Path(PackageInterface.$package); |
c3a60 | 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 | .}.<?php.declare(strict_types=1) |
c3a80 | 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c | ;............namespace.Composer\ |
c3aa0 | 49 6e 73 74 61 6c 6c 65 72 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6d 70 6f 73 65 | Installer;..use.Composer\Compose |
c3ac0 | 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 4f 5c 49 4f 49 6e 74 65 72 66 61 63 65 3b 0a | r;.use.Composer\IO\IOInterface;. |
c3ae0 | 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 72 74 69 61 6c 43 6f 6d 70 6f 73 65 72 3b 0a 75 73 | use.Composer\PartialComposer;.us |
c3b00 | 65 20 43 6f 6d 70 6f 73 65 72 5c 50 63 72 65 5c 50 72 65 67 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 | e.Composer\Pcre\Preg;.use.Compos |
c3b20 | 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 | er\Repository\InstalledRepositor |
c3b40 | 79 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 | yInterface;.use.Composer\Package |
c3b60 | 5c 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c | \PackageInterface;.use.Composer\ |
c3b80 | 55 74 69 6c 5c 46 69 6c 65 73 79 73 74 65 6d 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 | Util\Filesystem;.use.Composer\Ut |
c3ba0 | 69 6c 5c 53 69 6c 65 6e 63 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 | il\Silencer;.use.Composer\Util\P |
c3bc0 | 6c 61 74 66 6f 72 6d 3b 0a 75 73 65 20 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 50 72 6f 6d 69 | latform;.use.React\Promise\Promi |
c3be0 | 73 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 44 6f 77 6e 6c 6f | seInterface;.use.Composer\Downlo |
c3c00 | 61 64 65 72 5c 44 6f 77 6e 6c 6f 61 64 4d 61 6e 61 67 65 72 3b 0a 0a 0a 0a 0a 0a 0a 0a 63 6c 61 | ader\DownloadManager;........cla |
c3c20 | 73 73 20 4c 69 62 72 61 72 79 49 6e 73 74 61 6c 6c 65 72 20 69 6d 70 6c 65 6d 65 6e 74 73 20 49 | ss.LibraryInstaller.implements.I |
c3c40 | 6e 73 74 61 6c 6c 65 72 49 6e 74 65 72 66 61 63 65 2c 20 42 69 6e 61 72 79 50 72 65 73 65 6e 63 | nstallerInterface,.BinaryPresenc |
c3c60 | 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 63 6f 6d 70 6f 73 65 | eInterface.{..protected.$compose |
c3c80 | 72 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 76 65 6e 64 6f 72 44 69 72 3b 0a 0a 70 72 6f 74 65 | r;..protected.$vendorDir;..prote |
c3ca0 | 63 74 65 64 20 24 64 6f 77 6e 6c 6f 61 64 4d 61 6e 61 67 65 72 3b 0a 0a 70 72 6f 74 65 63 74 65 | cted.$downloadManager;..protecte |
c3cc0 | 64 20 24 69 6f 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 74 79 70 65 3b 0a 0a 70 72 6f 74 65 63 | d.$io;..protected.$type;..protec |
c3ce0 | 74 65 64 20 24 66 69 6c 65 73 79 73 74 65 6d 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 62 69 6e | ted.$filesystem;..protected.$bin |
c3d00 | 61 72 79 49 6e 73 74 61 6c 6c 65 72 3b 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 | aryInstaller;........public.func |
c3d20 | 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 49 4f 49 6e 74 65 72 66 61 63 65 20 24 69 6f | tion.__construct(IOInterface.$io |
c3d40 | 2c 20 50 61 72 74 69 61 6c 43 6f 6d 70 6f 73 65 72 20 24 63 6f 6d 70 6f 73 65 72 2c 20 3f 73 74 | ,.PartialComposer.$composer,.?st |
c3d60 | 72 69 6e 67 20 24 74 79 70 65 20 3d 20 27 6c 69 62 72 61 72 79 27 2c 20 3f 46 69 6c 65 73 79 73 | ring.$type.=.'library',.?Filesys |
c3d80 | 74 65 6d 20 24 66 69 6c 65 73 79 73 74 65 6d 20 3d 20 6e 75 6c 6c 2c 20 3f 42 69 6e 61 72 79 49 | tem.$filesystem.=.null,.?BinaryI |
c3da0 | 6e 73 74 61 6c 6c 65 72 20 24 62 69 6e 61 72 79 49 6e 73 74 61 6c 6c 65 72 20 3d 20 6e 75 6c 6c | nstaller.$binaryInstaller.=.null |
c3dc0 | 29 0a 7b 0a 24 74 68 69 73 2d 3e 63 6f 6d 70 6f 73 65 72 20 3d 20 24 63 6f 6d 70 6f 73 65 72 3b | ).{.$this->composer.=.$composer; |
c3de0 | 0a 24 74 68 69 73 2d 3e 64 6f 77 6e 6c 6f 61 64 4d 61 6e 61 67 65 72 20 3d 20 24 63 6f 6d 70 6f | .$this->downloadManager.=.$compo |
c3e00 | 73 65 72 20 69 6e 73 74 61 6e 63 65 6f 66 20 43 6f 6d 70 6f 73 65 72 20 3f 20 24 63 6f 6d 70 6f | ser.instanceof.Composer.?.$compo |
c3e20 | 73 65 72 2d 3e 67 65 74 44 6f 77 6e 6c 6f 61 64 4d 61 6e 61 67 65 72 28 29 20 3a 20 6e 75 6c 6c | ser->getDownloadManager().:.null |
c3e40 | 3b 0a 24 74 68 69 73 2d 3e 69 6f 20 3d 20 24 69 6f 3b 0a 24 74 68 69 73 2d 3e 74 79 70 65 20 3d | ;.$this->io.=.$io;.$this->type.= |
c3e60 | 20 24 74 79 70 65 3b 0a 0a 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 73 74 65 6d 20 3d 20 24 66 69 | .$type;..$this->filesystem.=.$fi |
c3e80 | 6c 65 73 79 73 74 65 6d 20 3f 3a 20 6e 65 77 20 46 69 6c 65 73 79 73 74 65 6d 28 29 3b 0a 24 74 | lesystem.?:.new.Filesystem();.$t |
c3ea0 | 68 69 73 2d 3e 76 65 6e 64 6f 72 44 69 72 20 3d 20 72 74 72 69 6d 28 24 63 6f 6d 70 6f 73 65 72 | his->vendorDir.=.rtrim($composer |
c3ec0 | 2d 3e 67 65 74 43 6f 6e 66 69 67 28 29 2d 3e 67 65 74 28 27 76 65 6e 64 6f 72 2d 64 69 72 27 29 | ->getConfig()->get('vendor-dir') |
c3ee0 | 2c 20 27 2f 27 29 3b 0a 24 74 68 69 73 2d 3e 62 69 6e 61 72 79 49 6e 73 74 61 6c 6c 65 72 20 3d | ,.'/');.$this->binaryInstaller.= |
c3f00 | 20 24 62 69 6e 61 72 79 49 6e 73 74 61 6c 6c 65 72 20 3f 3a 20 6e 65 77 20 42 69 6e 61 72 79 49 | .$binaryInstaller.?:.new.BinaryI |
c3f20 | 6e 73 74 61 6c 6c 65 72 28 24 74 68 69 73 2d 3e 69 6f 2c 20 72 74 72 69 6d 28 24 63 6f 6d 70 6f | nstaller($this->io,.rtrim($compo |
c3f40 | 73 65 72 2d 3e 67 65 74 43 6f 6e 66 69 67 28 29 2d 3e 67 65 74 28 27 62 69 6e 2d 64 69 72 27 29 | ser->getConfig()->get('bin-dir') |
c3f60 | 2c 20 27 2f 27 29 2c 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 43 6f 6e 66 69 67 28 29 2d 3e | ,.'/'),.$composer->getConfig()-> |
c3f80 | 67 65 74 28 27 62 69 6e 2d 63 6f 6d 70 61 74 27 29 2c 20 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 | get('bin-compat'),.$this->filesy |
c3fa0 | 73 74 65 6d 2c 20 24 74 68 69 73 2d 3e 76 65 6e 64 6f 72 44 69 72 29 3b 0a 7d 0a 0a 0a 0a 0a 70 | stem,.$this->vendorDir);.}.....p |
c3fc0 | 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 75 70 70 6f 72 74 73 28 73 74 72 69 6e 67 20 24 | ublic.function.supports(string.$ |
c3fe0 | 70 61 63 6b 61 67 65 54 79 70 65 29 0a 7b 0a 72 65 74 75 72 6e 20 24 70 61 63 6b 61 67 65 54 79 | packageType).{.return.$packageTy |
c4000 | 70 65 20 3d 3d 3d 20 24 74 68 69 73 2d 3e 74 79 70 65 20 7c 7c 20 6e 75 6c 6c 20 3d 3d 3d 20 24 | pe.===.$this->type.||.null.===.$ |
c4020 | 74 68 69 73 2d 3e 74 79 70 65 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f | this->type;.}.....public.functio |
c4040 | 6e 20 69 73 49 6e 73 74 61 6c 6c 65 64 28 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 | n.isInstalled(InstalledRepositor |
c4060 | 79 49 6e 74 65 72 66 61 63 65 20 24 72 65 70 6f 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 | yInterface.$repo,.PackageInterfa |
c4080 | 63 65 20 24 70 61 63 6b 61 67 65 29 0a 7b 0a 69 66 20 28 21 24 72 65 70 6f 2d 3e 68 61 73 50 61 | ce.$package).{.if.(!$repo->hasPa |
c40a0 | 63 6b 61 67 65 28 24 70 61 63 6b 61 67 65 29 29 20 7b 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b | ckage($package)).{.return.false; |
c40c0 | 0a 7d 0a 0a 24 69 6e 73 74 61 6c 6c 50 61 74 68 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 49 6e 73 | .}..$installPath.=.$this->getIns |
c40e0 | 74 61 6c 6c 50 61 74 68 28 24 70 61 63 6b 61 67 65 29 3b 0a 0a 69 66 20 28 46 69 6c 65 73 79 73 | tallPath($package);..if.(Filesys |
c4100 | 74 65 6d 3a 3a 69 73 52 65 61 64 61 62 6c 65 28 24 69 6e 73 74 61 6c 6c 50 61 74 68 29 29 20 7b | tem::isReadable($installPath)).{ |
c4120 | 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 0a 69 66 20 28 50 6c 61 74 66 6f 72 6d 3a 3a 69 | .return.true;.}..if.(Platform::i |
c4140 | 73 57 69 6e 64 6f 77 73 28 29 20 26 26 20 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 73 74 65 6d 2d | sWindows().&&.$this->filesystem- |
c4160 | 3e 69 73 4a 75 6e 63 74 69 6f 6e 28 24 69 6e 73 74 61 6c 6c 50 61 74 68 29 29 20 7b 0a 72 65 74 | >isJunction($installPath)).{.ret |
c4180 | 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 0a 69 66 20 28 69 73 5f 6c 69 6e 6b 28 24 69 6e 73 74 61 6c | urn.true;.}..if.(is_link($instal |
c41a0 | 6c 50 61 74 68 29 29 20 7b 0a 69 66 20 28 72 65 61 6c 70 61 74 68 28 24 69 6e 73 74 61 6c 6c 50 | lPath)).{.if.(realpath($installP |
c41c0 | 61 74 68 29 20 3d 3d 3d 20 66 61 6c 73 65 29 20 7b 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a | ath).===.false).{.return.false;. |
c41e0 | 7d 0a 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b | }..return.true;.}..return.false; |
c4200 | 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 64 6f 77 6e 6c 6f 61 64 28 | .}.....public.function.download( |
c4220 | 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 3f 50 61 63 6b | PackageInterface.$package,.?Pack |
c4240 | 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 72 65 76 50 61 63 6b 61 67 65 20 3d 20 6e 75 6c 6c | ageInterface.$prevPackage.=.null |
c4260 | 29 0a 7b 0a 24 74 68 69 73 2d 3e 69 6e 69 74 69 61 6c 69 7a 65 56 65 6e 64 6f 72 44 69 72 28 29 | ).{.$this->initializeVendorDir() |
c4280 | 3b 0a 24 64 6f 77 6e 6c 6f 61 64 50 61 74 68 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 49 6e 73 74 | ;.$downloadPath.=.$this->getInst |
c42a0 | 61 6c 6c 50 61 74 68 28 24 70 61 63 6b 61 67 65 29 3b 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 | allPath($package);..return.$this |
c42c0 | 2d 3e 67 65 74 44 6f 77 6e 6c 6f 61 64 4d 61 6e 61 67 65 72 28 29 2d 3e 64 6f 77 6e 6c 6f 61 64 | ->getDownloadManager()->download |
c42e0 | 28 24 70 61 63 6b 61 67 65 2c 20 24 64 6f 77 6e 6c 6f 61 64 50 61 74 68 2c 20 24 70 72 65 76 50 | ($package,.$downloadPath,.$prevP |
c4300 | 61 63 6b 61 67 65 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 70 | ackage);.}.....public.function.p |
c4320 | 72 65 70 61 72 65 28 24 74 79 70 65 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 | repare($type,.PackageInterface.$ |
c4340 | 70 61 63 6b 61 67 65 2c 20 3f 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 72 65 76 | package,.?PackageInterface.$prev |
c4360 | 50 61 63 6b 61 67 65 20 3d 20 6e 75 6c 6c 29 0a 7b 0a 24 74 68 69 73 2d 3e 69 6e 69 74 69 61 6c | Package.=.null).{.$this->initial |
c4380 | 69 7a 65 56 65 6e 64 6f 72 44 69 72 28 29 3b 0a 24 64 6f 77 6e 6c 6f 61 64 50 61 74 68 20 3d 20 | izeVendorDir();.$downloadPath.=. |
c43a0 | 24 74 68 69 73 2d 3e 67 65 74 49 6e 73 74 61 6c 6c 50 61 74 68 28 24 70 61 63 6b 61 67 65 29 3b | $this->getInstallPath($package); |
c43c0 | 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 67 65 74 44 6f 77 6e 6c 6f 61 64 4d 61 6e 61 67 | ..return.$this->getDownloadManag |
c43e0 | 65 72 28 29 2d 3e 70 72 65 70 61 72 65 28 24 74 79 70 65 2c 20 24 70 61 63 6b 61 67 65 2c 20 24 | er()->prepare($type,.$package,.$ |
c4400 | 64 6f 77 6e 6c 6f 61 64 50 61 74 68 2c 20 24 70 72 65 76 50 61 63 6b 61 67 65 29 3b 0a 7d 0a 0a | downloadPath,.$prevPackage);.}.. |
c4420 | 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 63 6c 65 61 6e 75 70 28 24 74 79 70 65 | ...public.function.cleanup($type |
c4440 | 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 3f 50 61 | ,.PackageInterface.$package,.?Pa |
c4460 | 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 72 65 76 50 61 63 6b 61 67 65 20 3d 20 6e 75 | ckageInterface.$prevPackage.=.nu |
c4480 | 6c 6c 29 0a 7b 0a 24 74 68 69 73 2d 3e 69 6e 69 74 69 61 6c 69 7a 65 56 65 6e 64 6f 72 44 69 72 | ll).{.$this->initializeVendorDir |
c44a0 | 28 29 3b 0a 24 64 6f 77 6e 6c 6f 61 64 50 61 74 68 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 49 6e | ();.$downloadPath.=.$this->getIn |
c44c0 | 73 74 61 6c 6c 50 61 74 68 28 24 70 61 63 6b 61 67 65 29 3b 0a 0a 72 65 74 75 72 6e 20 24 74 68 | stallPath($package);..return.$th |
c44e0 | 69 73 2d 3e 67 65 74 44 6f 77 6e 6c 6f 61 64 4d 61 6e 61 67 65 72 28 29 2d 3e 63 6c 65 61 6e 75 | is->getDownloadManager()->cleanu |
c4500 | 70 28 24 74 79 70 65 2c 20 24 70 61 63 6b 61 67 65 2c 20 24 64 6f 77 6e 6c 6f 61 64 50 61 74 68 | p($type,.$package,.$downloadPath |
c4520 | 2c 20 24 70 72 65 76 50 61 63 6b 61 67 65 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 | ,.$prevPackage);.}.....public.fu |
c4540 | 6e 63 74 69 6f 6e 20 69 6e 73 74 61 6c 6c 28 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f | nction.install(InstalledReposito |
c4560 | 72 79 49 6e 74 65 72 66 61 63 65 20 24 72 65 70 6f 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 | ryInterface.$repo,.PackageInterf |
c4580 | 61 63 65 20 24 70 61 63 6b 61 67 65 29 0a 7b 0a 24 74 68 69 73 2d 3e 69 6e 69 74 69 61 6c 69 7a | ace.$package).{.$this->initializ |
c45a0 | 65 56 65 6e 64 6f 72 44 69 72 28 29 3b 0a 24 64 6f 77 6e 6c 6f 61 64 50 61 74 68 20 3d 20 24 74 | eVendorDir();.$downloadPath.=.$t |
c45c0 | 68 69 73 2d 3e 67 65 74 49 6e 73 74 61 6c 6c 50 61 74 68 28 24 70 61 63 6b 61 67 65 29 3b 0a 0a | his->getInstallPath($package);.. |
c45e0 | 0a 69 66 20 28 21 46 69 6c 65 73 79 73 74 65 6d 3a 3a 69 73 52 65 61 64 61 62 6c 65 28 24 64 6f | .if.(!Filesystem::isReadable($do |
c4600 | 77 6e 6c 6f 61 64 50 61 74 68 29 20 26 26 20 24 72 65 70 6f 2d 3e 68 61 73 50 61 63 6b 61 67 65 | wnloadPath).&&.$repo->hasPackage |
c4620 | 28 24 70 61 63 6b 61 67 65 29 29 20 7b 0a 24 74 68 69 73 2d 3e 62 69 6e 61 72 79 49 6e 73 74 61 | ($package)).{.$this->binaryInsta |
c4640 | 6c 6c 65 72 2d 3e 72 65 6d 6f 76 65 42 69 6e 61 72 69 65 73 28 24 70 61 63 6b 61 67 65 29 3b 0a | ller->removeBinaries($package);. |
c4660 | 7d 0a 0a 24 70 72 6f 6d 69 73 65 20 3d 20 24 74 68 69 73 2d 3e 69 6e 73 74 61 6c 6c 43 6f 64 65 | }..$promise.=.$this->installCode |
c4680 | 28 24 70 61 63 6b 61 67 65 29 3b 0a 69 66 20 28 21 24 70 72 6f 6d 69 73 65 20 69 6e 73 74 61 6e | ($package);.if.(!$promise.instan |
c46a0 | 63 65 6f 66 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 29 20 7b 0a 24 70 72 6f 6d 69 73 | ceof.PromiseInterface).{.$promis |
c46c0 | 65 20 3d 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 | e.=.\React\Promise\resolve(null) |
c46e0 | 3b 0a 7d 0a 0a 24 62 69 6e 61 72 79 49 6e 73 74 61 6c 6c 65 72 20 3d 20 24 74 68 69 73 2d 3e 62 | ;.}..$binaryInstaller.=.$this->b |
c4700 | 69 6e 61 72 79 49 6e 73 74 61 6c 6c 65 72 3b 0a 24 69 6e 73 74 61 6c 6c 50 61 74 68 20 3d 20 24 | inaryInstaller;.$installPath.=.$ |
c4720 | 74 68 69 73 2d 3e 67 65 74 49 6e 73 74 61 6c 6c 50 61 74 68 28 24 70 61 63 6b 61 67 65 29 3b 0a | this->getInstallPath($package);. |
c4740 | 0a 72 65 74 75 72 6e 20 24 70 72 6f 6d 69 73 65 2d 3e 74 68 65 6e 28 73 74 61 74 69 63 20 66 75 | .return.$promise->then(static.fu |
c4760 | 6e 63 74 69 6f 6e 20 28 29 20 75 73 65 20 28 24 62 69 6e 61 72 79 49 6e 73 74 61 6c 6c 65 72 2c | nction.().use.($binaryInstaller, |
c4780 | 20 24 69 6e 73 74 61 6c 6c 50 61 74 68 2c 20 24 70 61 63 6b 61 67 65 2c 20 24 72 65 70 6f 29 3a | .$installPath,.$package,.$repo): |
c47a0 | 20 76 6f 69 64 20 7b 0a 24 62 69 6e 61 72 79 49 6e 73 74 61 6c 6c 65 72 2d 3e 69 6e 73 74 61 6c | .void.{.$binaryInstaller->instal |
c47c0 | 6c 42 69 6e 61 72 69 65 73 28 24 70 61 63 6b 61 67 65 2c 20 24 69 6e 73 74 61 6c 6c 50 61 74 68 | lBinaries($package,.$installPath |
c47e0 | 29 3b 0a 69 66 20 28 21 24 72 65 70 6f 2d 3e 68 61 73 50 61 63 6b 61 67 65 28 24 70 61 63 6b 61 | );.if.(!$repo->hasPackage($packa |
c4800 | 67 65 29 29 20 7b 0a 24 72 65 70 6f 2d 3e 61 64 64 50 61 63 6b 61 67 65 28 63 6c 6f 6e 65 20 24 | ge)).{.$repo->addPackage(clone.$ |
c4820 | 70 61 63 6b 61 67 65 29 3b 0a 7d 0a 7d 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e | package);.}.});.}.....public.fun |
c4840 | 63 74 69 6f 6e 20 75 70 64 61 74 65 28 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 | ction.update(InstalledRepository |
c4860 | 49 6e 74 65 72 66 61 63 65 20 24 72 65 70 6f 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 | Interface.$repo,.PackageInterfac |
c4880 | 65 20 24 69 6e 69 74 69 61 6c 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 74 61 | e.$initial,.PackageInterface.$ta |
c48a0 | 72 67 65 74 29 0a 7b 0a 69 66 20 28 21 24 72 65 70 6f 2d 3e 68 61 73 50 61 63 6b 61 67 65 28 24 | rget).{.if.(!$repo->hasPackage($ |
c48c0 | 69 6e 69 74 69 61 6c 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 64 41 72 | initial)).{.throw.new.\InvalidAr |
c48e0 | 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 27 50 61 63 6b 61 67 65 20 69 73 20 6e 6f 74 20 | gumentException('Package.is.not. |
c4900 | 69 6e 73 74 61 6c 6c 65 64 3a 20 27 2e 24 69 6e 69 74 69 61 6c 29 3b 0a 7d 0a 0a 24 74 68 69 73 | installed:.'.$initial);.}..$this |
c4920 | 2d 3e 69 6e 69 74 69 61 6c 69 7a 65 56 65 6e 64 6f 72 44 69 72 28 29 3b 0a 0a 24 74 68 69 73 2d | ->initializeVendorDir();..$this- |
c4940 | 3e 62 69 6e 61 72 79 49 6e 73 74 61 6c 6c 65 72 2d 3e 72 65 6d 6f 76 65 42 69 6e 61 72 69 65 73 | >binaryInstaller->removeBinaries |
c4960 | 28 24 69 6e 69 74 69 61 6c 29 3b 0a 24 70 72 6f 6d 69 73 65 20 3d 20 24 74 68 69 73 2d 3e 75 70 | ($initial);.$promise.=.$this->up |
c4980 | 64 61 74 65 43 6f 64 65 28 24 69 6e 69 74 69 61 6c 2c 20 24 74 61 72 67 65 74 29 3b 0a 69 66 20 | dateCode($initial,.$target);.if. |
c49a0 | 28 21 24 70 72 6f 6d 69 73 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 50 72 6f 6d 69 73 65 49 6e 74 | (!$promise.instanceof.PromiseInt |
c49c0 | 65 72 66 61 63 65 29 20 7b 0a 24 70 72 6f 6d 69 73 65 20 3d 20 5c 52 65 61 63 74 5c 50 72 6f 6d | erface).{.$promise.=.\React\Prom |
c49e0 | 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a 24 62 69 6e 61 72 79 49 6e 73 | ise\resolve(null);.}..$binaryIns |
c4a00 | 74 61 6c 6c 65 72 20 3d 20 24 74 68 69 73 2d 3e 62 69 6e 61 72 79 49 6e 73 74 61 6c 6c 65 72 3b | taller.=.$this->binaryInstaller; |
c4a20 | 0a 24 69 6e 73 74 61 6c 6c 50 61 74 68 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 49 6e 73 74 61 6c | .$installPath.=.$this->getInstal |
c4a40 | 6c 50 61 74 68 28 24 74 61 72 67 65 74 29 3b 0a 0a 72 65 74 75 72 6e 20 24 70 72 6f 6d 69 73 65 | lPath($target);..return.$promise |
c4a60 | 2d 3e 74 68 65 6e 28 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 29 20 75 73 65 20 28 24 | ->then(static.function.().use.($ |
c4a80 | 62 69 6e 61 72 79 49 6e 73 74 61 6c 6c 65 72 2c 20 24 69 6e 73 74 61 6c 6c 50 61 74 68 2c 20 24 | binaryInstaller,.$installPath,.$ |
c4aa0 | 74 61 72 67 65 74 2c 20 24 69 6e 69 74 69 61 6c 2c 20 24 72 65 70 6f 29 3a 20 76 6f 69 64 20 7b | target,.$initial,.$repo):.void.{ |
c4ac0 | 0a 24 62 69 6e 61 72 79 49 6e 73 74 61 6c 6c 65 72 2d 3e 69 6e 73 74 61 6c 6c 42 69 6e 61 72 69 | .$binaryInstaller->installBinari |
c4ae0 | 65 73 28 24 74 61 72 67 65 74 2c 20 24 69 6e 73 74 61 6c 6c 50 61 74 68 29 3b 0a 24 72 65 70 6f | es($target,.$installPath);.$repo |
c4b00 | 2d 3e 72 65 6d 6f 76 65 50 61 63 6b 61 67 65 28 24 69 6e 69 74 69 61 6c 29 3b 0a 69 66 20 28 21 | ->removePackage($initial);.if.(! |
c4b20 | 24 72 65 70 6f 2d 3e 68 61 73 50 61 63 6b 61 67 65 28 24 74 61 72 67 65 74 29 29 20 7b 0a 24 72 | $repo->hasPackage($target)).{.$r |
c4b40 | 65 70 6f 2d 3e 61 64 64 50 61 63 6b 61 67 65 28 63 6c 6f 6e 65 20 24 74 61 72 67 65 74 29 3b 0a | epo->addPackage(clone.$target);. |
c4b60 | 7d 0a 7d 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 75 6e 69 6e | }.});.}.....public.function.unin |
c4b80 | 73 74 61 6c 6c 28 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 | stall(InstalledRepositoryInterfa |
c4ba0 | 63 65 20 24 72 65 70 6f 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b | ce.$repo,.PackageInterface.$pack |
c4bc0 | 61 67 65 29 0a 7b 0a 69 66 20 28 21 24 72 65 70 6f 2d 3e 68 61 73 50 61 63 6b 61 67 65 28 24 70 | age).{.if.(!$repo->hasPackage($p |
c4be0 | 61 63 6b 61 67 65 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 64 41 72 67 | ackage)).{.throw.new.\InvalidArg |
c4c00 | 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 27 50 61 63 6b 61 67 65 20 69 73 20 6e 6f 74 20 69 | umentException('Package.is.not.i |
c4c20 | 6e 73 74 61 6c 6c 65 64 3a 20 27 2e 24 70 61 63 6b 61 67 65 29 3b 0a 7d 0a 0a 24 70 72 6f 6d 69 | nstalled:.'.$package);.}..$promi |
c4c40 | 73 65 20 3d 20 24 74 68 69 73 2d 3e 72 65 6d 6f 76 65 43 6f 64 65 28 24 70 61 63 6b 61 67 65 29 | se.=.$this->removeCode($package) |
c4c60 | 3b 0a 69 66 20 28 21 24 70 72 6f 6d 69 73 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 50 72 6f 6d 69 | ;.if.(!$promise.instanceof.Promi |
c4c80 | 73 65 49 6e 74 65 72 66 61 63 65 29 20 7b 0a 24 70 72 6f 6d 69 73 65 20 3d 20 5c 52 65 61 63 74 | seInterface).{.$promise.=.\React |
c4ca0 | 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a 24 62 69 6e 61 | \Promise\resolve(null);.}..$bina |
c4cc0 | 72 79 49 6e 73 74 61 6c 6c 65 72 20 3d 20 24 74 68 69 73 2d 3e 62 69 6e 61 72 79 49 6e 73 74 61 | ryInstaller.=.$this->binaryInsta |
c4ce0 | 6c 6c 65 72 3b 0a 24 64 6f 77 6e 6c 6f 61 64 50 61 74 68 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 | ller;.$downloadPath.=.$this->get |
c4d00 | 50 61 63 6b 61 67 65 42 61 73 65 50 61 74 68 28 24 70 61 63 6b 61 67 65 29 3b 0a 24 66 69 6c 65 | PackageBasePath($package);.$file |
c4d20 | 73 79 73 74 65 6d 20 3d 20 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 73 74 65 6d 3b 0a 0a 72 65 74 | system.=.$this->filesystem;..ret |
c4d40 | 75 72 6e 20 24 70 72 6f 6d 69 73 65 2d 3e 74 68 65 6e 28 73 74 61 74 69 63 20 66 75 6e 63 74 69 | urn.$promise->then(static.functi |
c4d60 | 6f 6e 20 28 29 20 75 73 65 20 28 24 62 69 6e 61 72 79 49 6e 73 74 61 6c 6c 65 72 2c 20 24 66 69 | on.().use.($binaryInstaller,.$fi |
c4d80 | 6c 65 73 79 73 74 65 6d 2c 20 24 64 6f 77 6e 6c 6f 61 64 50 61 74 68 2c 20 24 70 61 63 6b 61 67 | lesystem,.$downloadPath,.$packag |
c4da0 | 65 2c 20 24 72 65 70 6f 29 3a 20 76 6f 69 64 20 7b 0a 24 62 69 6e 61 72 79 49 6e 73 74 61 6c 6c | e,.$repo):.void.{.$binaryInstall |
c4dc0 | 65 72 2d 3e 72 65 6d 6f 76 65 42 69 6e 61 72 69 65 73 28 24 70 61 63 6b 61 67 65 29 3b 0a 24 72 | er->removeBinaries($package);.$r |
c4de0 | 65 70 6f 2d 3e 72 65 6d 6f 76 65 50 61 63 6b 61 67 65 28 24 70 61 63 6b 61 67 65 29 3b 0a 0a 69 | epo->removePackage($package);..i |
c4e00 | 66 20 28 73 74 72 70 6f 73 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 2c 20 27 | f.(strpos($package->getName(),.' |
c4e20 | 2f 27 29 29 20 7b 0a 24 70 61 63 6b 61 67 65 56 65 6e 64 6f 72 44 69 72 20 3d 20 64 69 72 6e 61 | /')).{.$packageVendorDir.=.dirna |
c4e40 | 6d 65 28 24 64 6f 77 6e 6c 6f 61 64 50 61 74 68 29 3b 0a 69 66 20 28 69 73 5f 64 69 72 28 24 70 | me($downloadPath);.if.(is_dir($p |
c4e60 | 61 63 6b 61 67 65 56 65 6e 64 6f 72 44 69 72 29 20 26 26 20 24 66 69 6c 65 73 79 73 74 65 6d 2d | ackageVendorDir).&&.$filesystem- |
c4e80 | 3e 69 73 44 69 72 45 6d 70 74 79 28 24 70 61 63 6b 61 67 65 56 65 6e 64 6f 72 44 69 72 29 29 20 | >isDirEmpty($packageVendorDir)). |
c4ea0 | 7b 0a 53 69 6c 65 6e 63 65 72 3a 3a 63 61 6c 6c 28 27 72 6d 64 69 72 27 2c 20 24 70 61 63 6b 61 | {.Silencer::call('rmdir',.$packa |
c4ec0 | 67 65 56 65 6e 64 6f 72 44 69 72 29 3b 0a 7d 0a 7d 0a 7d 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c | geVendorDir);.}.}.});.}.....publ |
c4ee0 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 49 6e 73 74 61 6c 6c 50 61 74 68 28 50 61 63 6b 61 | ic.function.getInstallPath(Packa |
c4f00 | 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 29 0a 7b 0a 24 74 68 69 73 2d 3e 69 | geInterface.$package).{.$this->i |
c4f20 | 6e 69 74 69 61 6c 69 7a 65 56 65 6e 64 6f 72 44 69 72 28 29 3b 0a 0a 24 62 61 73 65 50 61 74 68 | nitializeVendorDir();..$basePath |
c4f40 | 20 3d 20 28 24 74 68 69 73 2d 3e 76 65 6e 64 6f 72 44 69 72 20 3f 20 24 74 68 69 73 2d 3e 76 65 | .=.($this->vendorDir.?.$this->ve |
c4f60 | 6e 64 6f 72 44 69 72 2e 27 2f 27 20 3a 20 27 27 29 20 2e 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 | ndorDir.'/'.:.'')...$package->ge |
c4f80 | 74 50 72 65 74 74 79 4e 61 6d 65 28 29 3b 0a 24 74 61 72 67 65 74 44 69 72 20 3d 20 24 70 61 63 | tPrettyName();.$targetDir.=.$pac |
c4fa0 | 6b 61 67 65 2d 3e 67 65 74 54 61 72 67 65 74 44 69 72 28 29 3b 0a 0a 72 65 74 75 72 6e 20 24 62 | kage->getTargetDir();..return.$b |
c4fc0 | 61 73 65 50 61 74 68 20 2e 20 28 24 74 61 72 67 65 74 44 69 72 20 3f 20 27 2f 27 2e 24 74 61 72 | asePath...($targetDir.?.'/'.$tar |
c4fe0 | 67 65 74 44 69 72 20 3a 20 27 27 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e | getDir.:.'');.}.......public.fun |
c5000 | 63 74 69 6f 6e 20 65 6e 73 75 72 65 42 69 6e 61 72 69 65 73 50 72 65 73 65 6e 63 65 28 50 61 63 | ction.ensureBinariesPresence(Pac |
c5020 | 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 29 0a 7b 0a 24 74 68 69 73 2d | kageInterface.$package).{.$this- |
c5040 | 3e 62 69 6e 61 72 79 49 6e 73 74 61 6c 6c 65 72 2d 3e 69 6e 73 74 61 6c 6c 42 69 6e 61 72 69 65 | >binaryInstaller->installBinarie |
c5060 | 73 28 24 70 61 63 6b 61 67 65 2c 20 24 74 68 69 73 2d 3e 67 65 74 49 6e 73 74 61 6c 6c 50 61 74 | s($package,.$this->getInstallPat |
c5080 | 68 28 24 70 61 63 6b 61 67 65 29 2c 20 66 61 6c 73 65 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a | h($package),.false);.}.......... |
c50a0 | 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 50 61 63 6b 61 67 65 42 61 73 | protected.function.getPackageBas |
c50c0 | 65 50 61 74 68 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 29 | ePath(PackageInterface.$package) |
c50e0 | 0a 7b 0a 24 69 6e 73 74 61 6c 6c 50 61 74 68 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 49 6e 73 74 | .{.$installPath.=.$this->getInst |
c5100 | 61 6c 6c 50 61 74 68 28 24 70 61 63 6b 61 67 65 29 3b 0a 24 74 61 72 67 65 74 44 69 72 20 3d 20 | allPath($package);.$targetDir.=. |
c5120 | 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 54 61 72 67 65 74 44 69 72 28 29 3b 0a 0a 69 66 20 28 24 | $package->getTargetDir();..if.($ |
c5140 | 74 61 72 67 65 74 44 69 72 29 20 7b 0a 72 65 74 75 72 6e 20 50 72 65 67 3a 3a 72 65 70 6c 61 63 | targetDir).{.return.Preg::replac |
c5160 | 65 28 27 7b 2f 2a 27 2e 73 74 72 5f 72 65 70 6c 61 63 65 28 27 2f 27 2c 20 27 2f 2b 27 2c 20 70 | e('{/*'.str_replace('/',.'/+',.p |
c5180 | 72 65 67 5f 71 75 6f 74 65 28 24 74 61 72 67 65 74 44 69 72 29 29 2e 27 2f 3f 24 7d 27 2c 20 27 | reg_quote($targetDir)).'/?$}',.' |
c51a0 | 27 2c 20 24 69 6e 73 74 61 6c 6c 50 61 74 68 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 69 6e 73 | ',.$installPath);.}..return.$ins |
c51c0 | 74 61 6c 6c 50 61 74 68 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 | tallPath;.}.....protected.functi |
c51e0 | 6f 6e 20 69 6e 73 74 61 6c 6c 43 6f 64 65 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 | on.installCode(PackageInterface. |
c5200 | 24 70 61 63 6b 61 67 65 29 0a 7b 0a 24 64 6f 77 6e 6c 6f 61 64 50 61 74 68 20 3d 20 24 74 68 69 | $package).{.$downloadPath.=.$thi |
c5220 | 73 2d 3e 67 65 74 49 6e 73 74 61 6c 6c 50 61 74 68 28 24 70 61 63 6b 61 67 65 29 3b 0a 0a 72 65 | s->getInstallPath($package);..re |
c5240 | 74 75 72 6e 20 24 74 68 69 73 2d 3e 67 65 74 44 6f 77 6e 6c 6f 61 64 4d 61 6e 61 67 65 72 28 29 | turn.$this->getDownloadManager() |
c5260 | 2d 3e 69 6e 73 74 61 6c 6c 28 24 70 61 63 6b 61 67 65 2c 20 24 64 6f 77 6e 6c 6f 61 64 50 61 74 | ->install($package,.$downloadPat |
c5280 | 68 29 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 75 70 64 | h);.}.....protected.function.upd |
c52a0 | 61 74 65 43 6f 64 65 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 69 6e 69 74 69 61 | ateCode(PackageInterface.$initia |
c52c0 | 6c 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 74 61 72 67 65 74 29 0a 7b 0a 24 | l,.PackageInterface.$target).{.$ |
c52e0 | 69 6e 69 74 69 61 6c 44 6f 77 6e 6c 6f 61 64 50 61 74 68 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 | initialDownloadPath.=.$this->get |
c5300 | 49 6e 73 74 61 6c 6c 50 61 74 68 28 24 69 6e 69 74 69 61 6c 29 3b 0a 24 74 61 72 67 65 74 44 6f | InstallPath($initial);.$targetDo |
c5320 | 77 6e 6c 6f 61 64 50 61 74 68 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 49 6e 73 74 61 6c 6c 50 61 | wnloadPath.=.$this->getInstallPa |
c5340 | 74 68 28 24 74 61 72 67 65 74 29 3b 0a 69 66 20 28 24 74 61 72 67 65 74 44 6f 77 6e 6c 6f 61 64 | th($target);.if.($targetDownload |
c5360 | 50 61 74 68 20 21 3d 3d 20 24 69 6e 69 74 69 61 6c 44 6f 77 6e 6c 6f 61 64 50 61 74 68 29 20 7b | Path.!==.$initialDownloadPath).{ |
c5380 | 0a 0a 0a 69 66 20 28 73 74 72 70 6f 73 28 24 69 6e 69 74 69 61 6c 44 6f 77 6e 6c 6f 61 64 50 61 | ...if.(strpos($initialDownloadPa |
c53a0 | 74 68 2c 20 24 74 61 72 67 65 74 44 6f 77 6e 6c 6f 61 64 50 61 74 68 29 20 3d 3d 3d 20 30 0a 7c | th,.$targetDownloadPath).===.0.| |
c53c0 | 7c 20 73 74 72 70 6f 73 28 24 74 61 72 67 65 74 44 6f 77 6e 6c 6f 61 64 50 61 74 68 2c 20 24 69 | |.strpos($targetDownloadPath,.$i |
c53e0 | 6e 69 74 69 61 6c 44 6f 77 6e 6c 6f 61 64 50 61 74 68 29 20 3d 3d 3d 20 30 0a 29 20 7b 0a 24 70 | nitialDownloadPath).===.0.).{.$p |
c5400 | 72 6f 6d 69 73 65 20 3d 20 24 74 68 69 73 2d 3e 72 65 6d 6f 76 65 43 6f 64 65 28 24 69 6e 69 74 | romise.=.$this->removeCode($init |
c5420 | 69 61 6c 29 3b 0a 69 66 20 28 21 24 70 72 6f 6d 69 73 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 50 | ial);.if.(!$promise.instanceof.P |
c5440 | 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 29 20 7b 0a 24 70 72 6f 6d 69 73 65 20 3d 20 5c 52 | romiseInterface).{.$promise.=.\R |
c5460 | 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a 72 | eact\Promise\resolve(null);.}..r |
c5480 | 65 74 75 72 6e 20 24 70 72 6f 6d 69 73 65 2d 3e 74 68 65 6e 28 66 75 6e 63 74 69 6f 6e 20 28 29 | eturn.$promise->then(function.() |
c54a0 | 20 75 73 65 20 28 24 74 61 72 67 65 74 29 3a 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 | .use.($target):.PromiseInterface |
c54c0 | 20 7b 0a 24 70 72 6f 6d 69 73 65 20 3d 20 24 74 68 69 73 2d 3e 69 6e 73 74 61 6c 6c 43 6f 64 65 | .{.$promise.=.$this->installCode |
c54e0 | 28 24 74 61 72 67 65 74 29 3b 0a 69 66 20 28 24 70 72 6f 6d 69 73 65 20 69 6e 73 74 61 6e 63 65 | ($target);.if.($promise.instance |
c5500 | 6f 66 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 29 20 7b 0a 72 65 74 75 72 6e 20 24 70 | of.PromiseInterface).{.return.$p |
c5520 | 72 6f 6d 69 73 65 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 | romise;.}..return.\React\Promise |
c5540 | 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 29 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 66 69 | \resolve(null);.});.}..$this->fi |
c5560 | 6c 65 73 79 73 74 65 6d 2d 3e 72 65 6e 61 6d 65 28 24 69 6e 69 74 69 61 6c 44 6f 77 6e 6c 6f 61 | lesystem->rename($initialDownloa |
c5580 | 64 50 61 74 68 2c 20 24 74 61 72 67 65 74 44 6f 77 6e 6c 6f 61 64 50 61 74 68 29 3b 0a 7d 0a 0a | dPath,.$targetDownloadPath);.}.. |
c55a0 | 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 67 65 74 44 6f 77 6e 6c 6f 61 64 4d 61 6e 61 67 65 72 | return.$this->getDownloadManager |
c55c0 | 28 29 2d 3e 75 70 64 61 74 65 28 24 69 6e 69 74 69 61 6c 2c 20 24 74 61 72 67 65 74 2c 20 24 74 | ()->update($initial,.$target,.$t |
c55e0 | 61 72 67 65 74 44 6f 77 6e 6c 6f 61 64 50 61 74 68 29 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 | argetDownloadPath);.}.....protec |
c5600 | 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 72 65 6d 6f 76 65 43 6f 64 65 28 50 61 63 6b 61 67 65 49 | ted.function.removeCode(PackageI |
c5620 | 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 29 0a 7b 0a 24 64 6f 77 6e 6c 6f 61 64 50 61 | nterface.$package).{.$downloadPa |
c5640 | 74 68 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 50 61 63 6b 61 67 65 42 61 73 65 50 61 74 68 28 24 | th.=.$this->getPackageBasePath($ |
c5660 | 70 61 63 6b 61 67 65 29 3b 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 67 65 74 44 6f 77 6e | package);..return.$this->getDown |
c5680 | 6c 6f 61 64 4d 61 6e 61 67 65 72 28 29 2d 3e 72 65 6d 6f 76 65 28 24 70 61 63 6b 61 67 65 2c 20 | loadManager()->remove($package,. |
c56a0 | 24 64 6f 77 6e 6c 6f 61 64 50 61 74 68 29 3b 0a 7d 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 | $downloadPath);.}.....protected. |
c56c0 | 66 75 6e 63 74 69 6f 6e 20 69 6e 69 74 69 61 6c 69 7a 65 56 65 6e 64 6f 72 44 69 72 28 29 0a 7b | function.initializeVendorDir().{ |
c56e0 | 0a 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 73 74 65 6d 2d 3e 65 6e 73 75 72 65 44 69 72 65 63 74 | .$this->filesystem->ensureDirect |
c5700 | 6f 72 79 45 78 69 73 74 73 28 24 74 68 69 73 2d 3e 76 65 6e 64 6f 72 44 69 72 29 3b 0a 24 74 68 | oryExists($this->vendorDir);.$th |
c5720 | 69 73 2d 3e 76 65 6e 64 6f 72 44 69 72 20 3d 20 72 65 61 6c 70 61 74 68 28 24 74 68 69 73 2d 3e | is->vendorDir.=.realpath($this-> |
c5740 | 76 65 6e 64 6f 72 44 69 72 29 3b 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f | vendorDir);.}..protected.functio |
c5760 | 6e 20 67 65 74 44 6f 77 6e 6c 6f 61 64 4d 61 6e 61 67 65 72 28 29 3a 20 44 6f 77 6e 6c 6f 61 64 | n.getDownloadManager():.Download |
c5780 | 4d 61 6e 61 67 65 72 0a 7b 0a 61 73 73 65 72 74 28 24 74 68 69 73 2d 3e 64 6f 77 6e 6c 6f 61 64 | Manager.{.assert($this->download |
c57a0 | 4d 61 6e 61 67 65 72 20 69 6e 73 74 61 6e 63 65 6f 66 20 44 6f 77 6e 6c 6f 61 64 4d 61 6e 61 67 | Manager.instanceof.DownloadManag |
c57c0 | 65 72 2c 20 6e 65 77 20 5c 4c 6f 67 69 63 45 78 63 65 70 74 69 6f 6e 28 73 65 6c 66 3a 3a 63 6c | er,.new.\LogicException(self::cl |
c57e0 | 61 73 73 2e 27 20 73 68 6f 75 6c 64 20 62 65 20 69 6e 69 74 69 61 6c 69 7a 65 64 20 77 69 74 68 | ass.'.should.be.initialized.with |
c5800 | 20 61 20 66 75 6c 6c 79 20 6c 6f 61 64 65 64 20 43 6f 6d 70 6f 73 65 72 20 69 6e 73 74 61 6e 63 | .a.fully.loaded.Composer.instanc |
c5820 | 65 20 74 6f 20 62 65 20 61 62 6c 65 20 74 6f 20 69 6e 73 74 61 6c 6c 2f 2e 2e 2e 20 70 61 63 6b | e.to.be.able.to.install/....pack |
c5840 | 61 67 65 73 27 29 29 3b 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 64 6f 77 6e 6c 6f 61 64 | ages'));..return.$this->download |
c5860 | 4d 61 6e 61 67 65 72 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 | Manager;.}.}.<?php.declare(stric |
c5880 | 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 | t_types=1);............namespace |
c58a0 | 20 43 6f 6d 70 6f 73 65 72 5c 49 6e 73 74 61 6c 6c 65 72 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 | .Composer\Installer;..use.Compos |
c58c0 | 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 | er\Repository\InstalledRepositor |
c58e0 | 79 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 | yInterface;.use.Composer\Package |
c5900 | 5c 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c | \PackageInterface;.use.Composer\ |
c5920 | 49 4f 5c 49 4f 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 44 65 70 | IO\IOInterface;.use.Composer\Dep |
c5940 | 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 5c 4f 70 65 72 61 74 69 6f 6e 5c 55 70 64 61 74 65 | endencyResolver\Operation\Update |
c5960 | 4f 70 65 72 61 74 69 6f 6e 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e | Operation;.use.Composer\Dependen |
c5980 | 63 79 52 65 73 6f 6c 76 65 72 5c 4f 70 65 72 61 74 69 6f 6e 5c 49 6e 73 74 61 6c 6c 4f 70 65 72 | cyResolver\Operation\InstallOper |
c59a0 | 61 74 69 6f 6e 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 | ation;.use.Composer\DependencyRe |
c59c0 | 73 6f 6c 76 65 72 5c 4f 70 65 72 61 74 69 6f 6e 5c 55 6e 69 6e 73 74 61 6c 6c 4f 70 65 72 61 74 | solver\Operation\UninstallOperat |
c59e0 | 69 6f 6e 3b 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 4d 65 74 61 70 61 63 6b 61 67 65 49 6e 73 74 | ion;.......class.MetapackageInst |
c5a00 | 61 6c 6c 65 72 20 69 6d 70 6c 65 6d 65 6e 74 73 20 49 6e 73 74 61 6c 6c 65 72 49 6e 74 65 72 66 | aller.implements.InstallerInterf |
c5a20 | 61 63 65 0a 7b 0a 0a 70 72 69 76 61 74 65 20 24 69 6f 3b 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 | ace.{..private.$io;..public.func |
c5a40 | 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 49 4f 49 6e 74 65 72 66 61 63 65 20 24 69 6f | tion.__construct(IOInterface.$io |
c5a60 | 29 0a 7b 0a 24 74 68 69 73 2d 3e 69 6f 20 3d 20 24 69 6f 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 | ).{.$this->io.=.$io;.}.....publi |
c5a80 | 63 20 66 75 6e 63 74 69 6f 6e 20 73 75 70 70 6f 72 74 73 28 73 74 72 69 6e 67 20 24 70 61 63 6b | c.function.supports(string.$pack |
c5aa0 | 61 67 65 54 79 70 65 29 0a 7b 0a 72 65 74 75 72 6e 20 24 70 61 63 6b 61 67 65 54 79 70 65 20 3d | ageType).{.return.$packageType.= |
c5ac0 | 3d 3d 20 27 6d 65 74 61 70 61 63 6b 61 67 65 27 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 | ==.'metapackage';.}.....public.f |
c5ae0 | 75 6e 63 74 69 6f 6e 20 69 73 49 6e 73 74 61 6c 6c 65 64 28 49 6e 73 74 61 6c 6c 65 64 52 65 70 | unction.isInstalled(InstalledRep |
c5b00 | 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 20 24 72 65 70 6f 2c 20 50 61 63 6b 61 67 65 49 | ositoryInterface.$repo,.PackageI |
c5b20 | 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 29 0a 7b 0a 72 65 74 75 72 6e 20 24 72 65 70 | nterface.$package).{.return.$rep |
c5b40 | 6f 2d 3e 68 61 73 50 61 63 6b 61 67 65 28 24 70 61 63 6b 61 67 65 29 3b 0a 7d 0a 0a 0a 0a 0a 70 | o->hasPackage($package);.}.....p |
c5b60 | 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 64 6f 77 6e 6c 6f 61 64 28 50 61 63 6b 61 67 65 49 | ublic.function.download(PackageI |
c5b80 | 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 3f 50 61 63 6b 61 67 65 49 6e 74 65 72 | nterface.$package,.?PackageInter |
c5ba0 | 66 61 63 65 20 24 70 72 65 76 50 61 63 6b 61 67 65 20 3d 20 6e 75 6c 6c 29 0a 7b 0a 0a 72 65 74 | face.$prevPackage.=.null).{..ret |
c5bc0 | 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 | urn.\React\Promise\resolve(null) |
c5be0 | 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 70 72 65 70 61 72 65 28 | ;.}.....public.function.prepare( |
c5c00 | 24 74 79 70 65 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 | $type,.PackageInterface.$package |
c5c20 | 2c 20 3f 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 72 65 76 50 61 63 6b 61 67 65 | ,.?PackageInterface.$prevPackage |
c5c40 | 20 3d 20 6e 75 6c 6c 29 0a 7b 0a 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 | .=.null).{..return.\React\Promis |
c5c60 | 65 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 | e\resolve(null);.}.....public.fu |
c5c80 | 6e 63 74 69 6f 6e 20 63 6c 65 61 6e 75 70 28 24 74 79 70 65 2c 20 50 61 63 6b 61 67 65 49 6e 74 | nction.cleanup($type,.PackageInt |
c5ca0 | 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 3f 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 | erface.$package,.?PackageInterfa |
c5cc0 | 63 65 20 24 70 72 65 76 50 61 63 6b 61 67 65 20 3d 20 6e 75 6c 6c 29 0a 7b 0a 0a 72 65 74 75 72 | ce.$prevPackage.=.null).{..retur |
c5ce0 | 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a | n.\React\Promise\resolve(null);. |
c5d00 | 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 6e 73 74 61 6c 6c 28 49 6e | }.....public.function.install(In |
c5d20 | 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 20 24 72 65 70 6f | stalledRepositoryInterface.$repo |
c5d40 | 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 29 0a 7b 0a 24 | ,.PackageInterface.$package).{.$ |
c5d60 | 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 22 20 20 2d 20 22 20 2e 20 49 6e | this->io->writeError("..-."...In |
c5d80 | 73 74 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 3a 3a 66 6f 72 6d 61 74 28 24 70 61 63 6b 61 67 65 29 | stallOperation::format($package) |
c5da0 | 29 3b 0a 0a 24 72 65 70 6f 2d 3e 61 64 64 50 61 63 6b 61 67 65 28 63 6c 6f 6e 65 20 24 70 61 63 | );..$repo->addPackage(clone.$pac |
c5dc0 | 6b 61 67 65 29 3b 0a 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 | kage);..return.\React\Promise\re |
c5de0 | 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 | solve(null);.}.....public.functi |
c5e00 | 6f 6e 20 75 70 64 61 74 65 28 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 | on.update(InstalledRepositoryInt |
c5e20 | 65 72 66 61 63 65 20 24 72 65 70 6f 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 | erface.$repo,.PackageInterface.$ |
c5e40 | 69 6e 69 74 69 61 6c 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 74 61 72 67 65 | initial,.PackageInterface.$targe |
c5e60 | 74 29 0a 7b 0a 69 66 20 28 21 24 72 65 70 6f 2d 3e 68 61 73 50 61 63 6b 61 67 65 28 24 69 6e 69 | t).{.if.(!$repo->hasPackage($ini |
c5e80 | 74 69 61 6c 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d | tial)).{.throw.new.\InvalidArgum |
c5ea0 | 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 27 50 61 63 6b 61 67 65 20 69 73 20 6e 6f 74 20 69 6e 73 | entException('Package.is.not.ins |
c5ec0 | 74 61 6c 6c 65 64 3a 20 27 2e 24 69 6e 69 74 69 61 6c 29 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 69 | talled:.'.$initial);.}..$this->i |
c5ee0 | 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 22 20 20 2d 20 22 20 2e 20 55 70 64 61 74 65 4f 70 65 | o->writeError("..-."...UpdateOpe |
c5f00 | 72 61 74 69 6f 6e 3a 3a 66 6f 72 6d 61 74 28 24 69 6e 69 74 69 61 6c 2c 20 24 74 61 72 67 65 74 | ration::format($initial,.$target |
c5f20 | 29 29 3b 0a 0a 24 72 65 70 6f 2d 3e 72 65 6d 6f 76 65 50 61 63 6b 61 67 65 28 24 69 6e 69 74 69 | ));..$repo->removePackage($initi |
c5f40 | 61 6c 29 3b 0a 24 72 65 70 6f 2d 3e 61 64 64 50 61 63 6b 61 67 65 28 63 6c 6f 6e 65 20 24 74 61 | al);.$repo->addPackage(clone.$ta |
c5f60 | 72 67 65 74 29 3b 0a 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 | rget);..return.\React\Promise\re |
c5f80 | 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 | solve(null);.}.....public.functi |
c5fa0 | 6f 6e 20 75 6e 69 6e 73 74 61 6c 6c 28 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 | on.uninstall(InstalledRepository |
c5fc0 | 49 6e 74 65 72 66 61 63 65 20 24 72 65 70 6f 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 | Interface.$repo,.PackageInterfac |
c5fe0 | 65 20 24 70 61 63 6b 61 67 65 29 0a 7b 0a 69 66 20 28 21 24 72 65 70 6f 2d 3e 68 61 73 50 61 63 | e.$package).{.if.(!$repo->hasPac |
c6000 | 6b 61 67 65 28 24 70 61 63 6b 61 67 65 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e 76 | kage($package)).{.throw.new.\Inv |
c6020 | 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 27 50 61 63 6b 61 67 65 20 69 | alidArgumentException('Package.i |
c6040 | 73 20 6e 6f 74 20 69 6e 73 74 61 6c 6c 65 64 3a 20 27 2e 24 70 61 63 6b 61 67 65 29 3b 0a 7d 0a | s.not.installed:.'.$package);.}. |
c6060 | 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 22 20 20 2d 20 22 20 2e 20 | .$this->io->writeError("..-."... |
c6080 | 55 6e 69 6e 73 74 61 6c 6c 4f 70 65 72 61 74 69 6f 6e 3a 3a 66 6f 72 6d 61 74 28 24 70 61 63 6b | UninstallOperation::format($pack |
c60a0 | 61 67 65 29 29 3b 0a 0a 24 72 65 70 6f 2d 3e 72 65 6d 6f 76 65 50 61 63 6b 61 67 65 28 24 70 61 | age));..$repo->removePackage($pa |
c60c0 | 63 6b 61 67 65 29 3b 0a 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 | ckage);..return.\React\Promise\r |
c60e0 | 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 | esolve(null);.}.....public.funct |
c6100 | 69 6f 6e 20 67 65 74 49 6e 73 74 61 6c 6c 50 61 74 68 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 | ion.getInstallPath(PackageInterf |
c6120 | 61 63 65 20 24 70 61 63 6b 61 67 65 29 0a 7b 0a 72 65 74 75 72 6e 20 27 27 3b 0a 7d 0a 7d 0a 3c | ace.$package).{.return.'';.}.}.< |
c6140 | 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a | ?php.declare(strict_types=1);... |
c6160 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 49 6e 73 74 | .........namespace.Composer\Inst |
c6180 | 61 6c 6c 65 72 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c | aller;..use.Composer\Repository\ |
c61a0 | 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 | InstalledRepositoryInterface;.us |
c61c0 | 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 50 61 63 6b 61 67 65 49 6e 74 65 72 66 | e.Composer\Package\PackageInterf |
c61e0 | 61 63 65 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 4e 6f 6f 70 49 6e 73 74 61 6c 6c 65 72 | ace;.........class.NoopInstaller |
c6200 | 20 69 6d 70 6c 65 6d 65 6e 74 73 20 49 6e 73 74 61 6c 6c 65 72 49 6e 74 65 72 66 61 63 65 0a 7b | .implements.InstallerInterface.{ |
c6220 | 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 75 70 70 6f 72 74 73 28 73 74 72 | ....public.function.supports(str |
c6240 | 69 6e 67 20 24 70 61 63 6b 61 67 65 54 79 70 65 29 0a 7b 0a 72 65 74 75 72 6e 20 74 72 75 65 3b | ing.$packageType).{.return.true; |
c6260 | 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 49 6e 73 74 61 6c 6c | .}.....public.function.isInstall |
c6280 | 65 64 28 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 20 | ed(InstalledRepositoryInterface. |
c62a0 | 24 72 65 70 6f 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 | $repo,.PackageInterface.$package |
c62c0 | 29 0a 7b 0a 72 65 74 75 72 6e 20 24 72 65 70 6f 2d 3e 68 61 73 50 61 63 6b 61 67 65 28 24 70 61 | ).{.return.$repo->hasPackage($pa |
c62e0 | 63 6b 61 67 65 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 64 6f | ckage);.}.....public.function.do |
c6300 | 77 6e 6c 6f 61 64 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 | wnload(PackageInterface.$package |
c6320 | 2c 20 3f 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 72 65 76 50 61 63 6b 61 67 65 | ,.?PackageInterface.$prevPackage |
c6340 | 20 3d 20 6e 75 6c 6c 29 0a 7b 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 | .=.null).{.return.\React\Promise |
c6360 | 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e | \resolve(null);.}.....public.fun |
c6380 | 63 74 69 6f 6e 20 70 72 65 70 61 72 65 28 24 74 79 70 65 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 | ction.prepare($type,.PackageInte |
c63a0 | 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 3f 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 | rface.$package,.?PackageInterfac |
c63c0 | 65 20 24 70 72 65 76 50 61 63 6b 61 67 65 20 3d 20 6e 75 6c 6c 29 0a 7b 0a 72 65 74 75 72 6e 20 | e.$prevPackage.=.null).{.return. |
c63e0 | 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a | \React\Promise\resolve(null);.}. |
c6400 | 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 63 6c 65 61 6e 75 70 28 24 74 79 70 | ....public.function.cleanup($typ |
c6420 | 65 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 3f 50 | e,.PackageInterface.$package,.?P |
c6440 | 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 72 65 76 50 61 63 6b 61 67 65 20 3d 20 6e | ackageInterface.$prevPackage.=.n |
c6460 | 75 6c 6c 29 0a 7b 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 | ull).{.return.\React\Promise\res |
c6480 | 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f | olve(null);.}.....public.functio |
c64a0 | 6e 20 69 6e 73 74 61 6c 6c 28 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 | n.install(InstalledRepositoryInt |
c64c0 | 65 72 66 61 63 65 20 24 72 65 70 6f 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 | erface.$repo,.PackageInterface.$ |
c64e0 | 70 61 63 6b 61 67 65 29 0a 7b 0a 69 66 20 28 21 24 72 65 70 6f 2d 3e 68 61 73 50 61 63 6b 61 67 | package).{.if.(!$repo->hasPackag |
c6500 | 65 28 24 70 61 63 6b 61 67 65 29 29 20 7b 0a 24 72 65 70 6f 2d 3e 61 64 64 50 61 63 6b 61 67 65 | e($package)).{.$repo->addPackage |
c6520 | 28 63 6c 6f 6e 65 20 24 70 61 63 6b 61 67 65 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 5c 52 65 61 | (clone.$package);.}..return.\Rea |
c6540 | 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a 0a 0a 0a | ct\Promise\resolve(null);.}..... |
c6560 | 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 75 70 64 61 74 65 28 49 6e 73 74 61 6c 6c 65 64 | public.function.update(Installed |
c6580 | 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 20 24 72 65 70 6f 2c 20 50 61 63 6b 61 | RepositoryInterface.$repo,.Packa |
c65a0 | 67 65 49 6e 74 65 72 66 61 63 65 20 24 69 6e 69 74 69 61 6c 2c 20 50 61 63 6b 61 67 65 49 6e 74 | geInterface.$initial,.PackageInt |
c65c0 | 65 72 66 61 63 65 20 24 74 61 72 67 65 74 29 0a 7b 0a 69 66 20 28 21 24 72 65 70 6f 2d 3e 68 61 | erface.$target).{.if.(!$repo->ha |
c65e0 | 73 50 61 63 6b 61 67 65 28 24 69 6e 69 74 69 61 6c 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 | sPackage($initial)).{.throw.new. |
c6600 | 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 27 50 61 63 6b 61 | \InvalidArgumentException('Packa |
c6620 | 67 65 20 69 73 20 6e 6f 74 20 69 6e 73 74 61 6c 6c 65 64 3a 20 27 2e 24 69 6e 69 74 69 61 6c 29 | ge.is.not.installed:.'.$initial) |
c6640 | 3b 0a 7d 0a 0a 24 72 65 70 6f 2d 3e 72 65 6d 6f 76 65 50 61 63 6b 61 67 65 28 24 69 6e 69 74 69 | ;.}..$repo->removePackage($initi |
c6660 | 61 6c 29 3b 0a 69 66 20 28 21 24 72 65 70 6f 2d 3e 68 61 73 50 61 63 6b 61 67 65 28 24 74 61 72 | al);.if.(!$repo->hasPackage($tar |
c6680 | 67 65 74 29 29 20 7b 0a 24 72 65 70 6f 2d 3e 61 64 64 50 61 63 6b 61 67 65 28 63 6c 6f 6e 65 20 | get)).{.$repo->addPackage(clone. |
c66a0 | 24 74 61 72 67 65 74 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 | $target);.}..return.\React\Promi |
c66c0 | 73 65 5c 72 65 73 6f 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 | se\resolve(null);.}.....public.f |
c66e0 | 75 6e 63 74 69 6f 6e 20 75 6e 69 6e 73 74 61 6c 6c 28 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 | unction.uninstall(InstalledRepos |
c6700 | 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 20 24 72 65 70 6f 2c 20 50 61 63 6b 61 67 65 49 6e 74 | itoryInterface.$repo,.PackageInt |
c6720 | 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 29 0a 7b 0a 69 66 20 28 21 24 72 65 70 6f 2d 3e 68 | erface.$package).{.if.(!$repo->h |
c6740 | 61 73 50 61 63 6b 61 67 65 28 24 70 61 63 6b 61 67 65 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 | asPackage($package)).{.throw.new |
c6760 | 20 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 27 50 61 63 6b | .\InvalidArgumentException('Pack |
c6780 | 61 67 65 20 69 73 20 6e 6f 74 20 69 6e 73 74 61 6c 6c 65 64 3a 20 27 2e 24 70 61 63 6b 61 67 65 | age.is.not.installed:.'.$package |
c67a0 | 29 3b 0a 7d 0a 24 72 65 70 6f 2d 3e 72 65 6d 6f 76 65 50 61 63 6b 61 67 65 28 24 70 61 63 6b 61 | );.}.$repo->removePackage($packa |
c67c0 | 67 65 29 3b 0a 0a 72 65 74 75 72 6e 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f | ge);..return.\React\Promise\reso |
c67e0 | 6c 76 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e | lve(null);.}.....public.function |
c6800 | 20 67 65 74 49 6e 73 74 61 6c 6c 50 61 74 68 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 | .getInstallPath(PackageInterface |
c6820 | 20 24 70 61 63 6b 61 67 65 29 0a 7b 0a 24 74 61 72 67 65 74 44 69 72 20 3d 20 24 70 61 63 6b 61 | .$package).{.$targetDir.=.$packa |
c6840 | 67 65 2d 3e 67 65 74 54 61 72 67 65 74 44 69 72 28 29 3b 0a 0a 72 65 74 75 72 6e 20 24 70 61 63 | ge->getTargetDir();..return.$pac |
c6860 | 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 4e 61 6d 65 28 29 20 2e 20 28 24 74 61 72 67 65 74 | kage->getPrettyName()...($target |
c6880 | 44 69 72 20 3f 20 27 2f 27 2e 24 74 61 72 67 65 74 44 69 72 20 3a 20 27 27 29 3b 0a 7d 0a 7d 0a | Dir.?.'/'.$targetDir.:.'');.}.}. |
c68a0 | 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a | <?php.declare(strict_types=1);.. |
c68c0 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 49 6e 73 | ..........namespace.Composer\Ins |
c68e0 | 74 61 6c 6c 65 72 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6d 70 6f 73 65 72 3b 0a | taller;..use.Composer\Composer;. |
c6900 | 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 4f 5c 49 4f 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 | use.Composer\IO\IOInterface;.use |
c6920 | 20 43 6f 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 73 6f 6c 76 65 72 5c 4f 70 65 | .Composer\DependencyResolver\Ope |
c6940 | 72 61 74 69 6f 6e 5c 4f 70 65 72 61 74 69 6f 6e 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 | ration\OperationInterface;.use.C |
c6960 | 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 | omposer\Repository\RepositoryInt |
c6980 | 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 45 76 65 6e 74 44 69 73 70 61 74 | erface;.use.Composer\EventDispat |
c69a0 | 63 68 65 72 5c 45 76 65 6e 74 3b 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 50 61 63 6b 61 67 65 45 | cher\Event;.......class.PackageE |
c69c0 | 76 65 6e 74 20 65 78 74 65 6e 64 73 20 45 76 65 6e 74 0a 7b 0a 0a 0a 0a 70 72 69 76 61 74 65 20 | vent.extends.Event.{....private. |
c69e0 | 24 63 6f 6d 70 6f 73 65 72 3b 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 69 6f 3b 0a 0a 0a 0a 0a | $composer;.....private.$io;..... |
c6a00 | 70 72 69 76 61 74 65 20 24 64 65 76 4d 6f 64 65 3b 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 6c | private.$devMode;.....private.$l |
c6a20 | 6f 63 61 6c 52 65 70 6f 3b 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 6f 70 65 72 61 74 69 6f 6e | ocalRepo;.....private.$operation |
c6a40 | 73 3b 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 6f 70 65 72 61 74 69 6f 6e 3b 0a 0a 0a 0a 0a 0a | s;.....private.$operation;...... |
c6a60 | 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 73 74 72 | .public.function.__construct(str |
c6a80 | 69 6e 67 20 24 65 76 65 6e 74 4e 61 6d 65 2c 20 43 6f 6d 70 6f 73 65 72 20 24 63 6f 6d 70 6f 73 | ing.$eventName,.Composer.$compos |
c6aa0 | 65 72 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 20 24 69 6f 2c 20 62 6f 6f 6c 20 24 64 65 76 4d 6f | er,.IOInterface.$io,.bool.$devMo |
c6ac0 | 64 65 2c 20 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 20 24 6c 6f 63 61 6c 52 65 | de,.RepositoryInterface.$localRe |
c6ae0 | 70 6f 2c 20 61 72 72 61 79 20 24 6f 70 65 72 61 74 69 6f 6e 73 2c 20 4f 70 65 72 61 74 69 6f 6e | po,.array.$operations,.Operation |
c6b00 | 49 6e 74 65 72 66 61 63 65 20 24 6f 70 65 72 61 74 69 6f 6e 29 0a 7b 0a 70 61 72 65 6e 74 3a 3a | Interface.$operation).{.parent:: |
c6b20 | 5f 5f 63 6f 6e 73 74 72 75 63 74 28 24 65 76 65 6e 74 4e 61 6d 65 29 3b 0a 0a 24 74 68 69 73 2d | __construct($eventName);..$this- |
c6b40 | 3e 63 6f 6d 70 6f 73 65 72 20 3d 20 24 63 6f 6d 70 6f 73 65 72 3b 0a 24 74 68 69 73 2d 3e 69 6f | >composer.=.$composer;.$this->io |
c6b60 | 20 3d 20 24 69 6f 3b 0a 24 74 68 69 73 2d 3e 64 65 76 4d 6f 64 65 20 3d 20 24 64 65 76 4d 6f 64 | .=.$io;.$this->devMode.=.$devMod |
c6b80 | 65 3b 0a 24 74 68 69 73 2d 3e 6c 6f 63 61 6c 52 65 70 6f 20 3d 20 24 6c 6f 63 61 6c 52 65 70 6f | e;.$this->localRepo.=.$localRepo |
c6ba0 | 3b 0a 24 74 68 69 73 2d 3e 6f 70 65 72 61 74 69 6f 6e 73 20 3d 20 24 6f 70 65 72 61 74 69 6f 6e | ;.$this->operations.=.$operation |
c6bc0 | 73 3b 0a 24 74 68 69 73 2d 3e 6f 70 65 72 61 74 69 6f 6e 20 3d 20 24 6f 70 65 72 61 74 69 6f 6e | s;.$this->operation.=.$operation |
c6be0 | 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 43 6f 6d 70 6f 73 65 72 | ;.}..public.function.getComposer |
c6c00 | 28 29 3a 20 43 6f 6d 70 6f 73 65 72 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 63 6f 6d | ():.Composer.{.return.$this->com |
c6c20 | 70 6f 73 65 72 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 49 4f 28 | poser;.}..public.function.getIO( |
c6c40 | 29 3a 20 49 4f 49 6e 74 65 72 66 61 63 65 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 69 | ):.IOInterface.{.return.$this->i |
c6c60 | 6f 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 44 65 76 4d 6f 64 65 28 | o;.}..public.function.isDevMode( |
c6c80 | 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 64 65 76 4d 6f 64 65 3b | ):.bool.{.return.$this->devMode; |
c6ca0 | 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 4c 6f 63 61 6c 52 65 70 6f | .}..public.function.getLocalRepo |
c6cc0 | 28 29 3a 20 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 0a 7b 0a 72 65 74 75 72 6e | ():.RepositoryInterface.{.return |
c6ce0 | 20 24 74 68 69 73 2d 3e 6c 6f 63 61 6c 52 65 70 6f 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 | .$this->localRepo;.}.....public. |
c6d00 | 66 75 6e 63 74 69 6f 6e 20 67 65 74 4f 70 65 72 61 74 69 6f 6e 73 28 29 3a 20 61 72 72 61 79 0a | function.getOperations():.array. |
c6d20 | 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 6f 70 65 72 61 74 69 6f 6e 73 3b 0a 7d 0a 0a 0a | {.return.$this->operations;.}... |
c6d40 | 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 4f 70 65 72 61 74 69 6f 6e 28 29 | ..public.function.getOperation() |
c6d60 | 3a 20 4f 70 65 72 61 74 69 6f 6e 49 6e 74 65 72 66 61 63 65 0a 7b 0a 72 65 74 75 72 6e 20 24 74 | :.OperationInterface.{.return.$t |
c6d80 | 68 69 73 2d 3e 6f 70 65 72 61 74 69 6f 6e 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 | his->operation;.}.}.<?php.declar |
c6da0 | 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 | e(strict_types=1);............na |
c6dc0 | 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 49 6e 73 74 61 6c 6c 65 72 3b 0a 0a 0a 0a 0a | mespace.Composer\Installer;..... |
c6de0 | 0a 0a 63 6c 61 73 73 20 50 61 63 6b 61 67 65 45 76 65 6e 74 73 0a 7b 0a 0a 0a 0a 0a 0a 0a 0a 70 | ..class.PackageEvents.{........p |
c6e00 | 75 62 6c 69 63 20 63 6f 6e 73 74 20 50 52 45 5f 50 41 43 4b 41 47 45 5f 49 4e 53 54 41 4c 4c 20 | ublic.const.PRE_PACKAGE_INSTALL. |
c6e20 | 3d 20 27 70 72 65 2d 70 61 63 6b 61 67 65 2d 69 6e 73 74 61 6c 6c 27 3b 0a 0a 0a 0a 0a 0a 0a 0a | =.'pre-package-install';........ |
c6e40 | 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 50 4f 53 54 5f 50 41 43 4b 41 47 45 5f 49 4e 53 54 41 | .public.const.POST_PACKAGE_INSTA |
c6e60 | 4c 4c 20 3d 20 27 70 6f 73 74 2d 70 61 63 6b 61 67 65 2d 69 6e 73 74 61 6c 6c 27 3b 0a 0a 0a 0a | LL.=.'post-package-install';.... |
c6e80 | 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 50 52 45 5f 50 41 43 4b 41 47 45 5f 55 50 | .....public.const.PRE_PACKAGE_UP |
c6ea0 | 44 41 54 45 20 3d 20 27 70 72 65 2d 70 61 63 6b 61 67 65 2d 75 70 64 61 74 65 27 3b 0a 0a 0a 0a | DATE.=.'pre-package-update';.... |
c6ec0 | 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 50 4f 53 54 5f 50 41 43 4b 41 47 45 5f 55 | .....public.const.POST_PACKAGE_U |
c6ee0 | 50 44 41 54 45 20 3d 20 27 70 6f 73 74 2d 70 61 63 6b 61 67 65 2d 75 70 64 61 74 65 27 3b 0a 0a | PDATE.=.'post-package-update';.. |
c6f00 | 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 50 52 45 5f 50 41 43 4b 41 47 45 5f | .......public.const.PRE_PACKAGE_ |
c6f20 | 55 4e 49 4e 53 54 41 4c 4c 20 3d 20 27 70 72 65 2d 70 61 63 6b 61 67 65 2d 75 6e 69 6e 73 74 61 | UNINSTALL.=.'pre-package-uninsta |
c6f40 | 6c 6c 27 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 50 4f 53 54 5f 50 | ll';.........public.const.POST_P |
c6f60 | 41 43 4b 41 47 45 5f 55 4e 49 4e 53 54 41 4c 4c 20 3d 20 27 70 6f 73 74 2d 70 61 63 6b 61 67 65 | ACKAGE_UNINSTALL.=.'post-package |
c6f80 | 2d 75 6e 69 6e 73 74 61 6c 6c 27 3b 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 | -uninstall';.}.<?php.declare(str |
c6fa0 | 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 | ict_types=1);............namespa |
c6fc0 | 63 65 20 43 6f 6d 70 6f 73 65 72 5c 49 6e 73 74 61 6c 6c 65 72 3b 0a 0a 75 73 65 20 43 6f 6d 70 | ce.Composer\Installer;..use.Comp |
c6fe0 | 6f 73 65 72 5c 43 6f 6d 70 6f 73 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 4f 5c 49 | oser\Composer;.use.Composer\IO\I |
c7000 | 4f 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 72 74 69 61 6c | OInterface;.use.Composer\Partial |
c7020 | 43 6f 6d 70 6f 73 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 | Composer;.use.Composer\Repositor |
c7040 | 79 5c 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 3b 0a | y\InstalledRepositoryInterface;. |
c7060 | 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 50 61 63 6b 61 67 65 49 6e 74 65 | use.Composer\Package\PackageInte |
c7080 | 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 6c 75 67 69 6e 5c 50 6c 75 67 69 | rface;.use.Composer\Plugin\Plugi |
c70a0 | 6e 4d 61 6e 61 67 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 46 69 6c 65 | nManager;.use.Composer\Util\File |
c70c0 | 73 79 73 74 65 6d 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 6c 61 74 66 6f | system;.use.Composer\Util\Platfo |
c70e0 | 72 6d 3b 0a 75 73 65 20 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 50 72 6f 6d 69 73 65 49 6e 74 | rm;.use.React\Promise\PromiseInt |
c7100 | 65 72 66 61 63 65 3b 0a 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 50 6c 75 67 69 6e 49 6e 73 74 61 | erface;........class.PluginInsta |
c7120 | 6c 6c 65 72 20 65 78 74 65 6e 64 73 20 4c 69 62 72 61 72 79 49 6e 73 74 61 6c 6c 65 72 0a 7b 0a | ller.extends.LibraryInstaller.{. |
c7140 | 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 49 4f 49 6e | public.function.__construct(IOIn |
c7160 | 74 65 72 66 61 63 65 20 24 69 6f 2c 20 50 61 72 74 69 61 6c 43 6f 6d 70 6f 73 65 72 20 24 63 6f | terface.$io,.PartialComposer.$co |
c7180 | 6d 70 6f 73 65 72 2c 20 3f 46 69 6c 65 73 79 73 74 65 6d 20 24 66 73 20 3d 20 6e 75 6c 6c 2c 20 | mposer,.?Filesystem.$fs.=.null,. |
c71a0 | 3f 42 69 6e 61 72 79 49 6e 73 74 61 6c 6c 65 72 20 24 62 69 6e 61 72 79 49 6e 73 74 61 6c 6c 65 | ?BinaryInstaller.$binaryInstalle |
c71c0 | 72 20 3d 20 6e 75 6c 6c 29 0a 7b 0a 70 61 72 65 6e 74 3a 3a 5f 5f 63 6f 6e 73 74 72 75 63 74 28 | r.=.null).{.parent::__construct( |
c71e0 | 24 69 6f 2c 20 24 63 6f 6d 70 6f 73 65 72 2c 20 27 63 6f 6d 70 6f 73 65 72 2d 70 6c 75 67 69 6e | $io,.$composer,.'composer-plugin |
c7200 | 27 2c 20 24 66 73 2c 20 24 62 69 6e 61 72 79 49 6e 73 74 61 6c 6c 65 72 29 3b 0a 7d 0a 0a 0a 0a | ',.$fs,.$binaryInstaller);.}.... |
c7220 | 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 75 70 70 6f 72 74 73 28 73 74 72 69 6e 67 | .public.function.supports(string |
c7240 | 20 24 70 61 63 6b 61 67 65 54 79 70 65 29 0a 7b 0a 72 65 74 75 72 6e 20 24 70 61 63 6b 61 67 65 | .$packageType).{.return.$package |
c7260 | 54 79 70 65 20 3d 3d 3d 20 27 63 6f 6d 70 6f 73 65 72 2d 70 6c 75 67 69 6e 27 20 7c 7c 20 24 70 | Type.===.'composer-plugin'.||.$p |
c7280 | 61 63 6b 61 67 65 54 79 70 65 20 3d 3d 3d 20 27 63 6f 6d 70 6f 73 65 72 2d 69 6e 73 74 61 6c 6c | ackageType.===.'composer-install |
c72a0 | 65 72 27 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 70 72 65 70 61 | er';.}.....public.function.prepa |
c72c0 | 72 65 28 24 74 79 70 65 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b | re($type,.PackageInterface.$pack |
c72e0 | 61 67 65 2c 20 3f 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 72 65 76 50 61 63 6b | age,.?PackageInterface.$prevPack |
c7300 | 61 67 65 20 3d 20 6e 75 6c 6c 29 0a 7b 0a 0a 69 66 20 28 28 24 74 79 70 65 20 3d 3d 3d 20 27 69 | age.=.null).{..if.(($type.===.'i |
c7320 | 6e 73 74 61 6c 6c 27 20 7c 7c 20 24 74 79 70 65 20 3d 3d 3d 20 27 75 70 64 61 74 65 27 29 20 26 | nstall'.||.$type.===.'update').& |
c7340 | 26 20 21 24 74 68 69 73 2d 3e 67 65 74 50 6c 75 67 69 6e 4d 61 6e 61 67 65 72 28 29 2d 3e 61 72 | &.!$this->getPluginManager()->ar |
c7360 | 65 50 6c 75 67 69 6e 73 44 69 73 61 62 6c 65 64 28 27 6c 6f 63 61 6c 27 29 29 20 7b 0a 24 74 68 | ePluginsDisabled('local')).{.$th |
c7380 | 69 73 2d 3e 67 65 74 50 6c 75 67 69 6e 4d 61 6e 61 67 65 72 28 29 2d 3e 69 73 50 6c 75 67 69 6e | is->getPluginManager()->isPlugin |
c73a0 | 41 6c 6c 6f 77 65 64 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 2c 20 66 61 6c | Allowed($package->getName(),.fal |
c73c0 | 73 65 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 70 61 72 65 6e 74 3a 3a 70 72 65 70 61 72 65 28 24 | se);.}..return.parent::prepare($ |
c73e0 | 74 79 70 65 2c 20 24 70 61 63 6b 61 67 65 2c 20 24 70 72 65 76 50 61 63 6b 61 67 65 29 3b 0a 7d | type,.$package,.$prevPackage);.} |
c7400 | 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 64 6f 77 6e 6c 6f 61 64 28 50 61 | .....public.function.download(Pa |
c7420 | 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 3f 50 61 63 6b 61 67 | ckageInterface.$package,.?Packag |
c7440 | 65 49 6e 74 65 72 66 61 63 65 20 24 70 72 65 76 50 61 63 6b 61 67 65 20 3d 20 6e 75 6c 6c 29 0a | eInterface.$prevPackage.=.null). |
c7460 | 7b 0a 24 65 78 74 72 61 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 45 78 74 72 61 28 29 3b | {.$extra.=.$package->getExtra(); |
c7480 | 0a 69 66 20 28 65 6d 70 74 79 28 24 65 78 74 72 61 5b 27 63 6c 61 73 73 27 5d 29 29 20 7b 0a 74 | .if.(empty($extra['class'])).{.t |
c74a0 | 68 72 6f 77 20 6e 65 77 20 5c 55 6e 65 78 70 65 63 74 65 64 56 61 6c 75 65 45 78 63 65 70 74 69 | hrow.new.\UnexpectedValueExcepti |
c74c0 | 6f 6e 28 27 45 72 72 6f 72 20 77 68 69 6c 65 20 69 6e 73 74 61 6c 6c 69 6e 67 20 27 2e 24 70 61 | on('Error.while.installing.'.$pa |
c74e0 | 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 4e 61 6d 65 28 29 2e 27 2c 20 63 6f 6d 70 6f 73 | ckage->getPrettyName().',.compos |
c7500 | 65 72 2d 70 6c 75 67 69 6e 20 70 61 63 6b 61 67 65 73 20 73 68 6f 75 6c 64 20 68 61 76 65 20 61 | er-plugin.packages.should.have.a |
c7520 | 20 63 6c 61 73 73 20 64 65 66 69 6e 65 64 20 69 6e 20 74 68 65 69 72 20 65 78 74 72 61 20 6b 65 | .class.defined.in.their.extra.ke |
c7540 | 79 20 74 6f 20 62 65 20 75 73 61 62 6c 65 2e 27 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 70 61 72 | y.to.be.usable.');.}..return.par |
c7560 | 65 6e 74 3a 3a 64 6f 77 6e 6c 6f 61 64 28 24 70 61 63 6b 61 67 65 2c 20 24 70 72 65 76 50 61 63 | ent::download($package,.$prevPac |
c7580 | 6b 61 67 65 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 6e 73 | kage);.}.....public.function.ins |
c75a0 | 74 61 6c 6c 28 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 | tall(InstalledRepositoryInterfac |
c75c0 | 65 20 24 72 65 70 6f 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 | e.$repo,.PackageInterface.$packa |
c75e0 | 67 65 29 0a 7b 0a 24 70 72 6f 6d 69 73 65 20 3d 20 70 61 72 65 6e 74 3a 3a 69 6e 73 74 61 6c 6c | ge).{.$promise.=.parent::install |
c7600 | 28 24 72 65 70 6f 2c 20 24 70 61 63 6b 61 67 65 29 3b 0a 69 66 20 28 21 24 70 72 6f 6d 69 73 65 | ($repo,.$package);.if.(!$promise |
c7620 | 20 69 6e 73 74 61 6e 63 65 6f 66 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 29 20 7b 0a | .instanceof.PromiseInterface).{. |
c7640 | 24 70 72 6f 6d 69 73 65 20 3d 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 | $promise.=.\React\Promise\resolv |
c7660 | 65 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 70 72 6f 6d 69 73 65 2d 3e 74 68 65 | e(null);.}..return.$promise->the |
c7680 | 6e 28 66 75 6e 63 74 69 6f 6e 20 28 29 20 75 73 65 20 28 24 70 61 63 6b 61 67 65 2c 20 24 72 65 | n(function.().use.($package,.$re |
c76a0 | 70 6f 29 3a 20 76 6f 69 64 20 7b 0a 74 72 79 20 7b 0a 50 6c 61 74 66 6f 72 6d 3a 3a 77 6f 72 6b | po):.void.{.try.{.Platform::work |
c76c0 | 61 72 6f 75 6e 64 46 69 6c 65 73 79 73 74 65 6d 49 73 73 75 65 73 28 29 3b 0a 24 74 68 69 73 2d | aroundFilesystemIssues();.$this- |
c76e0 | 3e 67 65 74 50 6c 75 67 69 6e 4d 61 6e 61 67 65 72 28 29 2d 3e 72 65 67 69 73 74 65 72 50 61 63 | >getPluginManager()->registerPac |
c7700 | 6b 61 67 65 28 24 70 61 63 6b 61 67 65 2c 20 74 72 75 65 29 3b 0a 7d 20 63 61 74 63 68 20 28 5c | kage($package,.true);.}.catch.(\ |
c7720 | 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 24 74 68 69 73 2d 3e 72 6f 6c 6c 62 61 63 6b 49 | Exception.$e).{.$this->rollbackI |
c7740 | 6e 73 74 61 6c 6c 28 24 65 2c 20 24 72 65 70 6f 2c 20 24 70 61 63 6b 61 67 65 29 3b 0a 7d 0a 7d | nstall($e,.$repo,.$package);.}.} |
c7760 | 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 75 70 64 61 74 65 28 | );.}.....public.function.update( |
c7780 | 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 20 24 72 65 | InstalledRepositoryInterface.$re |
c77a0 | 70 6f 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 69 6e 69 74 69 61 6c 2c 20 50 | po,.PackageInterface.$initial,.P |
c77c0 | 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 74 61 72 67 65 74 29 0a 7b 0a 24 70 72 6f 6d | ackageInterface.$target).{.$prom |
c77e0 | 69 73 65 20 3d 20 70 61 72 65 6e 74 3a 3a 75 70 64 61 74 65 28 24 72 65 70 6f 2c 20 24 69 6e 69 | ise.=.parent::update($repo,.$ini |
c7800 | 74 69 61 6c 2c 20 24 74 61 72 67 65 74 29 3b 0a 69 66 20 28 21 24 70 72 6f 6d 69 73 65 20 69 6e | tial,.$target);.if.(!$promise.in |
c7820 | 73 74 61 6e 63 65 6f 66 20 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 29 20 7b 0a 24 70 72 | stanceof.PromiseInterface).{.$pr |
c7840 | 6f 6d 69 73 65 20 3d 20 5c 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 72 65 73 6f 6c 76 65 28 6e | omise.=.\React\Promise\resolve(n |
c7860 | 75 6c 6c 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 70 72 6f 6d 69 73 65 2d 3e 74 68 65 6e 28 66 | ull);.}..return.$promise->then(f |
c7880 | 75 6e 63 74 69 6f 6e 20 28 29 20 75 73 65 20 28 24 69 6e 69 74 69 61 6c 2c 20 24 74 61 72 67 65 | unction.().use.($initial,.$targe |
c78a0 | 74 2c 20 24 72 65 70 6f 29 3a 20 76 6f 69 64 20 7b 0a 74 72 79 20 7b 0a 50 6c 61 74 66 6f 72 6d | t,.$repo):.void.{.try.{.Platform |
c78c0 | 3a 3a 77 6f 72 6b 61 72 6f 75 6e 64 46 69 6c 65 73 79 73 74 65 6d 49 73 73 75 65 73 28 29 3b 0a | ::workaroundFilesystemIssues();. |
c78e0 | 24 74 68 69 73 2d 3e 67 65 74 50 6c 75 67 69 6e 4d 61 6e 61 67 65 72 28 29 2d 3e 64 65 61 63 74 | $this->getPluginManager()->deact |
c7900 | 69 76 61 74 65 50 61 63 6b 61 67 65 28 24 69 6e 69 74 69 61 6c 29 3b 0a 24 74 68 69 73 2d 3e 67 | ivatePackage($initial);.$this->g |
c7920 | 65 74 50 6c 75 67 69 6e 4d 61 6e 61 67 65 72 28 29 2d 3e 72 65 67 69 73 74 65 72 50 61 63 6b 61 | etPluginManager()->registerPacka |
c7940 | 67 65 28 24 74 61 72 67 65 74 2c 20 74 72 75 65 29 3b 0a 7d 20 63 61 74 63 68 20 28 5c 45 78 63 | ge($target,.true);.}.catch.(\Exc |
c7960 | 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 24 74 68 69 73 2d 3e 72 6f 6c 6c 62 61 63 6b 49 6e 73 74 | eption.$e).{.$this->rollbackInst |
c7980 | 61 6c 6c 28 24 65 2c 20 24 72 65 70 6f 2c 20 24 74 61 72 67 65 74 29 3b 0a 7d 0a 7d 29 3b 0a 7d | all($e,.$repo,.$target);.}.});.} |
c79a0 | 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 75 6e 69 6e 73 74 61 6c 6c 28 49 6e 73 74 | ..public.function.uninstall(Inst |
c79c0 | 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 20 24 72 65 70 6f 2c 20 | alledRepositoryInterface.$repo,. |
c79e0 | 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 29 0a 7b 0a 24 74 68 | PackageInterface.$package).{.$th |
c7a00 | 69 73 2d 3e 67 65 74 50 6c 75 67 69 6e 4d 61 6e 61 67 65 72 28 29 2d 3e 75 6e 69 6e 73 74 61 6c | is->getPluginManager()->uninstal |
c7a20 | 6c 50 61 63 6b 61 67 65 28 24 70 61 63 6b 61 67 65 29 3b 0a 0a 72 65 74 75 72 6e 20 70 61 72 65 | lPackage($package);..return.pare |
c7a40 | 6e 74 3a 3a 75 6e 69 6e 73 74 61 6c 6c 28 24 72 65 70 6f 2c 20 24 70 61 63 6b 61 67 65 29 3b 0a | nt::uninstall($repo,.$package);. |
c7a60 | 7d 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 72 6f 6c 6c 62 61 63 6b 49 6e 73 74 | }..private.function.rollbackInst |
c7a80 | 61 6c 6c 28 5c 45 78 63 65 70 74 69 6f 6e 20 24 65 2c 20 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f | all(\Exception.$e,.InstalledRepo |
c7aa0 | 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 20 24 72 65 70 6f 2c 20 50 61 63 6b 61 67 65 49 6e | sitoryInterface.$repo,.PackageIn |
c7ac0 | 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d | terface.$package):.void.{.$this- |
c7ae0 | 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 50 6c 75 67 69 6e 20 69 6e 69 74 69 61 6c 69 | >io->writeError('Plugin.initiali |
c7b00 | 7a 61 74 69 6f 6e 20 66 61 69 6c 65 64 20 28 27 2e 24 65 2d 3e 67 65 74 4d 65 73 73 61 67 65 28 | zation.failed.('.$e->getMessage( |
c7b20 | 29 2e 27 29 2c 20 75 6e 69 6e 73 74 61 6c 6c 69 6e 67 20 70 6c 75 67 69 6e 27 29 3b 0a 70 61 72 | ).'),.uninstalling.plugin');.par |
c7b40 | 65 6e 74 3a 3a 75 6e 69 6e 73 74 61 6c 6c 28 24 72 65 70 6f 2c 20 24 70 61 63 6b 61 67 65 29 3b | ent::uninstall($repo,.$package); |
c7b60 | 0a 74 68 72 6f 77 20 24 65 3b 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e | .throw.$e;.}..protected.function |
c7b80 | 20 67 65 74 50 6c 75 67 69 6e 4d 61 6e 61 67 65 72 28 29 3a 20 50 6c 75 67 69 6e 4d 61 6e 61 67 | .getPluginManager():.PluginManag |
c7ba0 | 65 72 0a 7b 0a 61 73 73 65 72 74 28 24 74 68 69 73 2d 3e 63 6f 6d 70 6f 73 65 72 20 69 6e 73 74 | er.{.assert($this->composer.inst |
c7bc0 | 61 6e 63 65 6f 66 20 43 6f 6d 70 6f 73 65 72 2c 20 6e 65 77 20 5c 4c 6f 67 69 63 45 78 63 65 70 | anceof.Composer,.new.\LogicExcep |
c7be0 | 74 69 6f 6e 28 73 65 6c 66 3a 3a 63 6c 61 73 73 2e 27 20 73 68 6f 75 6c 64 20 62 65 20 69 6e 69 | tion(self::class.'.should.be.ini |
c7c00 | 74 69 61 6c 69 7a 65 64 20 77 69 74 68 20 61 20 66 75 6c 6c 79 20 6c 6f 61 64 65 64 20 43 6f 6d | tialized.with.a.fully.loaded.Com |
c7c20 | 70 6f 73 65 72 20 69 6e 73 74 61 6e 63 65 2e 27 29 29 3b 0a 24 70 6c 75 67 69 6e 4d 61 6e 61 67 | poser.instance.'));.$pluginManag |
c7c40 | 65 72 20 3d 20 24 74 68 69 73 2d 3e 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 50 6c 75 67 69 6e 4d | er.=.$this->composer->getPluginM |
c7c60 | 61 6e 61 67 65 72 28 29 3b 0a 0a 72 65 74 75 72 6e 20 24 70 6c 75 67 69 6e 4d 61 6e 61 67 65 72 | anager();..return.$pluginManager |
c7c80 | 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 | ;.}.}.<?php.declare(strict_types |
c7ca0 | 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 | =1);............namespace.Compos |
c7cc0 | 65 72 5c 49 6e 73 74 61 6c 6c 65 72 3b 0a 0a 75 73 65 20 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 | er\Installer;..use.React\Promise |
c7ce0 | 5c 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c | \PromiseInterface;.use.Composer\ |
c7d00 | 50 61 63 6b 61 67 65 5c 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f | Package\PackageInterface;.use.Co |
c7d20 | 6d 70 6f 73 65 72 5c 44 6f 77 6e 6c 6f 61 64 65 72 5c 44 6f 77 6e 6c 6f 61 64 4d 61 6e 61 67 65 | mposer\Downloader\DownloadManage |
c7d40 | 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 49 6e 73 74 61 | r;.use.Composer\Repository\Insta |
c7d60 | 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d | lledRepositoryInterface;.use.Com |
c7d80 | 70 6f 73 65 72 5c 55 74 69 6c 5c 46 69 6c 65 73 79 73 74 65 6d 3b 0a 0a 0a 0a 0a 0a 0a 0a 63 6c | poser\Util\Filesystem;........cl |
c7da0 | 61 73 73 20 50 72 6f 6a 65 63 74 49 6e 73 74 61 6c 6c 65 72 20 69 6d 70 6c 65 6d 65 6e 74 73 20 | ass.ProjectInstaller.implements. |
c7dc0 | 49 6e 73 74 61 6c 6c 65 72 49 6e 74 65 72 66 61 63 65 0a 7b 0a 0a 70 72 69 76 61 74 65 20 24 69 | InstallerInterface.{..private.$i |
c7de0 | 6e 73 74 61 6c 6c 50 61 74 68 3b 0a 0a 70 72 69 76 61 74 65 20 24 64 6f 77 6e 6c 6f 61 64 4d 61 | nstallPath;..private.$downloadMa |
c7e00 | 6e 61 67 65 72 3b 0a 0a 70 72 69 76 61 74 65 20 24 66 69 6c 65 73 79 73 74 65 6d 3b 0a 0a 70 75 | nager;..private.$filesystem;..pu |
c7e20 | 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 73 74 72 69 6e 67 | blic.function.__construct(string |
c7e40 | 20 24 69 6e 73 74 61 6c 6c 50 61 74 68 2c 20 44 6f 77 6e 6c 6f 61 64 4d 61 6e 61 67 65 72 20 24 | .$installPath,.DownloadManager.$ |
c7e60 | 64 6d 2c 20 46 69 6c 65 73 79 73 74 65 6d 20 24 66 73 29 0a 7b 0a 24 74 68 69 73 2d 3e 69 6e 73 | dm,.Filesystem.$fs).{.$this->ins |
c7e80 | 74 61 6c 6c 50 61 74 68 20 3d 20 72 74 72 69 6d 28 73 74 72 74 72 28 24 69 6e 73 74 61 6c 6c 50 | tallPath.=.rtrim(strtr($installP |
c7ea0 | 61 74 68 2c 20 27 5c 5c 27 2c 20 27 2f 27 29 2c 20 27 2f 27 29 2e 27 2f 27 3b 0a 24 74 68 69 73 | ath,.'\\',.'/'),.'/').'/';.$this |
c7ec0 | 2d 3e 64 6f 77 6e 6c 6f 61 64 4d 61 6e 61 67 65 72 20 3d 20 24 64 6d 3b 0a 24 74 68 69 73 2d 3e | ->downloadManager.=.$dm;.$this-> |
c7ee0 | 66 69 6c 65 73 79 73 74 65 6d 20 3d 20 24 66 73 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 | filesystem.=.$fs;.}.....public.f |
c7f00 | 75 6e 63 74 69 6f 6e 20 73 75 70 70 6f 72 74 73 28 73 74 72 69 6e 67 20 24 70 61 63 6b 61 67 65 | unction.supports(string.$package |
c7f20 | 54 79 70 65 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 0a 0a 0a | Type):.bool.{.return.true;.}.... |
c7f40 | 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 49 6e 73 74 61 6c 6c 65 64 28 49 6e 73 | .public.function.isInstalled(Ins |
c7f60 | 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 20 24 72 65 70 6f 2c | talledRepositoryInterface.$repo, |
c7f80 | 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 29 3a 20 62 6f 6f | .PackageInterface.$package):.boo |
c7fa0 | 6c 0a 7b 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 | l.{.return.false;.}.....public.f |
c7fc0 | 75 6e 63 74 69 6f 6e 20 64 6f 77 6e 6c 6f 61 64 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 | unction.download(PackageInterfac |
c7fe0 | 65 20 24 70 61 63 6b 61 67 65 2c 20 3f 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 | e.$package,.?PackageInterface.$p |
c8000 | 72 65 76 50 61 63 6b 61 67 65 20 3d 20 6e 75 6c 6c 29 3a 20 3f 50 72 6f 6d 69 73 65 49 6e 74 65 | revPackage.=.null):.?PromiseInte |
c8020 | 72 66 61 63 65 0a 7b 0a 24 69 6e 73 74 61 6c 6c 50 61 74 68 20 3d 20 24 74 68 69 73 2d 3e 69 6e | rface.{.$installPath.=.$this->in |
c8040 | 73 74 61 6c 6c 50 61 74 68 3b 0a 69 66 20 28 66 69 6c 65 5f 65 78 69 73 74 73 28 24 69 6e 73 74 | stallPath;.if.(file_exists($inst |
c8060 | 61 6c 6c 50 61 74 68 29 20 26 26 20 21 24 74 68 69 73 2d 3e 66 69 6c 65 73 79 73 74 65 6d 2d 3e | allPath).&&.!$this->filesystem-> |
c8080 | 69 73 44 69 72 45 6d 70 74 79 28 24 69 6e 73 74 61 6c 6c 50 61 74 68 29 29 20 7b 0a 74 68 72 6f | isDirEmpty($installPath)).{.thro |
c80a0 | 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 | w.new.\InvalidArgumentException( |
c80c0 | 22 50 72 6f 6a 65 63 74 20 64 69 72 65 63 74 6f 72 79 20 24 69 6e 73 74 61 6c 6c 50 61 74 68 20 | "Project.directory.$installPath. |
c80e0 | 69 73 20 6e 6f 74 20 65 6d 70 74 79 2e 22 29 3b 0a 7d 0a 69 66 20 28 21 69 73 5f 64 69 72 28 24 | is.not.empty.");.}.if.(!is_dir($ |
c8100 | 69 6e 73 74 61 6c 6c 50 61 74 68 29 29 20 7b 0a 6d 6b 64 69 72 28 24 69 6e 73 74 61 6c 6c 50 61 | installPath)).{.mkdir($installPa |
c8120 | 74 68 2c 20 30 37 37 37 2c 20 74 72 75 65 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 | th,.0777,.true);.}..return.$this |
c8140 | 2d 3e 64 6f 77 6e 6c 6f 61 64 4d 61 6e 61 67 65 72 2d 3e 64 6f 77 6e 6c 6f 61 64 28 24 70 61 63 | ->downloadManager->download($pac |
c8160 | 6b 61 67 65 2c 20 24 69 6e 73 74 61 6c 6c 50 61 74 68 2c 20 24 70 72 65 76 50 61 63 6b 61 67 65 | kage,.$installPath,.$prevPackage |
c8180 | 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 70 72 65 70 61 72 65 | );.}.....public.function.prepare |
c81a0 | 28 24 74 79 70 65 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 | ($type,.PackageInterface.$packag |
c81c0 | 65 2c 20 3f 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 72 65 76 50 61 63 6b 61 67 | e,.?PackageInterface.$prevPackag |
c81e0 | 65 20 3d 20 6e 75 6c 6c 29 3a 20 3f 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 72 | e.=.null):.?PromiseInterface.{.r |
c8200 | 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 64 6f 77 6e 6c 6f 61 64 4d 61 6e 61 67 65 72 2d 3e 70 72 | eturn.$this->downloadManager->pr |
c8220 | 65 70 61 72 65 28 24 74 79 70 65 2c 20 24 70 61 63 6b 61 67 65 2c 20 24 74 68 69 73 2d 3e 69 6e | epare($type,.$package,.$this->in |
c8240 | 73 74 61 6c 6c 50 61 74 68 2c 20 24 70 72 65 76 50 61 63 6b 61 67 65 29 3b 0a 7d 0a 0a 0a 0a 0a | stallPath,.$prevPackage);.}..... |
c8260 | 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 63 6c 65 61 6e 75 70 28 24 74 79 70 65 2c 20 50 | public.function.cleanup($type,.P |
c8280 | 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 3f 50 61 63 6b 61 | ackageInterface.$package,.?Packa |
c82a0 | 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 72 65 76 50 61 63 6b 61 67 65 20 3d 20 6e 75 6c 6c 29 | geInterface.$prevPackage.=.null) |
c82c0 | 3a 20 3f 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 | :.?PromiseInterface.{.return.$th |
c82e0 | 69 73 2d 3e 64 6f 77 6e 6c 6f 61 64 4d 61 6e 61 67 65 72 2d 3e 63 6c 65 61 6e 75 70 28 24 74 79 | is->downloadManager->cleanup($ty |
c8300 | 70 65 2c 20 24 70 61 63 6b 61 67 65 2c 20 24 74 68 69 73 2d 3e 69 6e 73 74 61 6c 6c 50 61 74 68 | pe,.$package,.$this->installPath |
c8320 | 2c 20 24 70 72 65 76 50 61 63 6b 61 67 65 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 | ,.$prevPackage);.}.....public.fu |
c8340 | 6e 63 74 69 6f 6e 20 69 6e 73 74 61 6c 6c 28 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f | nction.install(InstalledReposito |
c8360 | 72 79 49 6e 74 65 72 66 61 63 65 20 24 72 65 70 6f 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 | ryInterface.$repo,.PackageInterf |
c8380 | 61 63 65 20 24 70 61 63 6b 61 67 65 29 3a 20 3f 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 | ace.$package):.?PromiseInterface |
c83a0 | 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 64 6f 77 6e 6c 6f 61 64 4d 61 6e 61 67 65 72 | .{.return.$this->downloadManager |
c83c0 | 2d 3e 69 6e 73 74 61 6c 6c 28 24 70 61 63 6b 61 67 65 2c 20 24 74 68 69 73 2d 3e 69 6e 73 74 61 | ->install($package,.$this->insta |
c83e0 | 6c 6c 50 61 74 68 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 75 | llPath);.}.....public.function.u |
c8400 | 70 64 61 74 65 28 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 | pdate(InstalledRepositoryInterfa |
c8420 | 63 65 20 24 72 65 70 6f 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 69 6e 69 74 | ce.$repo,.PackageInterface.$init |
c8440 | 69 61 6c 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 74 61 72 67 65 74 29 3a 20 | ial,.PackageInterface.$target):. |
c8460 | 3f 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 | ?PromiseInterface.{.throw.new.\I |
c8480 | 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 22 6e 6f 74 20 73 75 70 | nvalidArgumentException("not.sup |
c84a0 | 70 6f 72 74 65 64 22 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 | ported");.}.....public.function. |
c84c0 | 75 6e 69 6e 73 74 61 6c 6c 28 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 | uninstall(InstalledRepositoryInt |
c84e0 | 65 72 66 61 63 65 20 24 72 65 70 6f 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 | erface.$repo,.PackageInterface.$ |
c8500 | 70 61 63 6b 61 67 65 29 3a 20 3f 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 74 68 | package):.?PromiseInterface.{.th |
c8520 | 72 6f 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f | row.new.\InvalidArgumentExceptio |
c8540 | 6e 28 22 6e 6f 74 20 73 75 70 70 6f 72 74 65 64 22 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c | n("not.supported");.}.......publ |
c8560 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 49 6e 73 74 61 6c 6c 50 61 74 68 28 50 61 63 6b 61 | ic.function.getInstallPath(Packa |
c8580 | 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 29 3a 20 73 74 72 69 6e 67 0a 7b 0a | geInterface.$package):.string.{. |
c85a0 | 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 69 6e 73 74 61 6c 6c 50 61 74 68 3b 0a 7d 0a 7d 0a 3c | return.$this->installPath;.}.}.< |
c85c0 | 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a | ?php.declare(strict_types=1);... |
c85e0 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 49 6e 73 74 | .........namespace.Composer\Inst |
c8600 | 61 6c 6c 65 72 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 4f 5c 49 4f 49 6e 74 65 72 66 | aller;..use.Composer\IO\IOInterf |
c8620 | 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 50 61 63 6b 61 67 | ace;.use.Composer\Package\Packag |
c8640 | 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 63 72 65 5c 50 72 | eInterface;.use.Composer\Pcre\Pr |
c8660 | 65 67 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 49 6e 73 74 | eg;.use.Composer\Repository\Inst |
c8680 | 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d | alledRepository;.use.Symfony\Com |
c86a0 | 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 46 6f 72 6d 61 74 74 65 72 5c 4f 75 74 70 75 74 46 | ponent\Console\Formatter\OutputF |
c86c0 | 6f 72 6d 61 74 74 65 72 3b 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 53 75 67 67 65 73 74 65 64 50 | ormatter;.......class.SuggestedP |
c86e0 | 61 63 6b 61 67 65 73 52 65 70 6f 72 74 65 72 0a 7b 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 4d | ackagesReporter.{.public.const.M |
c8700 | 4f 44 45 5f 4c 49 53 54 20 3d 20 31 3b 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 4d 4f 44 45 5f | ODE_LIST.=.1;.public.const.MODE_ |
c8720 | 42 59 5f 50 41 43 4b 41 47 45 20 3d 20 32 3b 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 4d 4f 44 | BY_PACKAGE.=.2;.public.const.MOD |
c8740 | 45 5f 42 59 5f 53 55 47 47 45 53 54 49 4f 4e 20 3d 20 34 3b 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 | E_BY_SUGGESTION.=.4;.....protect |
c8760 | 65 64 20 24 73 75 67 67 65 73 74 65 64 50 61 63 6b 61 67 65 73 20 3d 20 5b 5d 3b 0a 0a 0a 0a 0a | ed.$suggestedPackages.=.[];..... |
c8780 | 70 72 69 76 61 74 65 20 24 69 6f 3b 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f | private.$io;..public.function.__ |
c87a0 | 63 6f 6e 73 74 72 75 63 74 28 49 4f 49 6e 74 65 72 66 61 63 65 20 24 69 6f 29 0a 7b 0a 24 74 68 | construct(IOInterface.$io).{.$th |
c87c0 | 69 73 2d 3e 69 6f 20 3d 20 24 69 6f 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 | is->io.=.$io;.}.....public.funct |
c87e0 | 69 6f 6e 20 67 65 74 50 61 63 6b 61 67 65 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 | ion.getPackages():.array.{.retur |
c8800 | 6e 20 24 74 68 69 73 2d 3e 73 75 67 67 65 73 74 65 64 50 61 63 6b 61 67 65 73 3b 0a 7d 0a 0a 0a | n.$this->suggestedPackages;.}... |
c8820 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 61 64 64 50 61 63 6b | .........public.function.addPack |
c8840 | 61 67 65 28 73 74 72 69 6e 67 20 24 73 6f 75 72 63 65 2c 20 73 74 72 69 6e 67 20 24 74 61 72 67 | age(string.$source,.string.$targ |
c8860 | 65 74 2c 20 73 74 72 69 6e 67 20 24 72 65 61 73 6f 6e 29 3a 20 53 75 67 67 65 73 74 65 64 50 61 | et,.string.$reason):.SuggestedPa |
c8880 | 63 6b 61 67 65 73 52 65 70 6f 72 74 65 72 0a 7b 0a 24 74 68 69 73 2d 3e 73 75 67 67 65 73 74 65 | ckagesReporter.{.$this->suggeste |
c88a0 | 64 50 61 63 6b 61 67 65 73 5b 5d 20 3d 20 5b 0a 27 73 6f 75 72 63 65 27 20 3d 3e 20 24 73 6f 75 | dPackages[].=.[.'source'.=>.$sou |
c88c0 | 72 63 65 2c 0a 27 74 61 72 67 65 74 27 20 3d 3e 20 24 74 61 72 67 65 74 2c 0a 27 72 65 61 73 6f | rce,.'target'.=>.$target,.'reaso |
c88e0 | 6e 27 20 3d 3e 20 24 72 65 61 73 6f 6e 2c 0a 5d 3b 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 3b | n'.=>.$reason,.];..return.$this; |
c8900 | 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 61 64 64 53 75 67 67 65 73 | .}.....public.function.addSugges |
c8920 | 74 69 6f 6e 73 46 72 6f 6d 50 61 63 6b 61 67 65 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 | tionsFromPackage(PackageInterfac |
c8940 | 65 20 24 70 61 63 6b 61 67 65 29 3a 20 53 75 67 67 65 73 74 65 64 50 61 63 6b 61 67 65 73 52 65 | e.$package):.SuggestedPackagesRe |
c8960 | 70 6f 72 74 65 72 0a 7b 0a 24 73 6f 75 72 63 65 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 | porter.{.$source.=.$package->get |
c8980 | 50 72 65 74 74 79 4e 61 6d 65 28 29 3b 0a 66 6f 72 65 61 63 68 20 28 24 70 61 63 6b 61 67 65 2d | PrettyName();.foreach.($package- |
c89a0 | 3e 67 65 74 53 75 67 67 65 73 74 73 28 29 20 61 73 20 24 74 61 72 67 65 74 20 3d 3e 20 24 72 65 | >getSuggests().as.$target.=>.$re |
c89c0 | 61 73 6f 6e 29 20 7b 0a 24 74 68 69 73 2d 3e 61 64 64 50 61 63 6b 61 67 65 28 0a 24 73 6f 75 72 | ason).{.$this->addPackage(.$sour |
c89e0 | 63 65 2c 0a 24 74 61 72 67 65 74 2c 0a 24 72 65 61 73 6f 6e 0a 29 3b 0a 7d 0a 0a 72 65 74 75 72 | ce,.$target,.$reason.);.}..retur |
c8a00 | 6e 20 24 74 68 69 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 | n.$this;.}...........public.func |
c8a20 | 74 69 6f 6e 20 6f 75 74 70 75 74 28 69 6e 74 20 24 6d 6f 64 65 2c 20 3f 49 6e 73 74 61 6c 6c 65 | tion.output(int.$mode,.?Installe |
c8a40 | 64 52 65 70 6f 73 69 74 6f 72 79 20 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 20 3d 20 6e 75 6c | dRepository.$installedRepo.=.nul |
c8a60 | 6c 2c 20 3f 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 6f 6e 6c 79 44 65 70 65 6e 64 | l,.?PackageInterface.$onlyDepend |
c8a80 | 65 6e 74 73 4f 66 20 3d 20 6e 75 6c 6c 29 3a 20 76 6f 69 64 0a 7b 0a 24 73 75 67 67 65 73 74 65 | entsOf.=.null):.void.{.$suggeste |
c8aa0 | 64 50 61 63 6b 61 67 65 73 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 46 69 6c 74 65 72 65 64 53 75 | dPackages.=.$this->getFilteredSu |
c8ac0 | 67 67 65 73 74 69 6f 6e 73 28 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 2c 20 24 6f 6e 6c 79 44 | ggestions($installedRepo,.$onlyD |
c8ae0 | 65 70 65 6e 64 65 6e 74 73 4f 66 29 3b 0a 0a 24 73 75 67 67 65 73 74 65 72 73 20 3d 20 5b 5d 3b | ependentsOf);..$suggesters.=.[]; |
c8b00 | 0a 24 73 75 67 67 65 73 74 65 64 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 73 75 67 67 | .$suggested.=.[];.foreach.($sugg |
c8b20 | 65 73 74 65 64 50 61 63 6b 61 67 65 73 20 61 73 20 24 73 75 67 67 65 73 74 69 6f 6e 29 20 7b 0a | estedPackages.as.$suggestion).{. |
c8b40 | 24 73 75 67 67 65 73 74 65 72 73 5b 24 73 75 67 67 65 73 74 69 6f 6e 5b 27 73 6f 75 72 63 65 27 | $suggesters[$suggestion['source' |
c8b60 | 5d 5d 5b 24 73 75 67 67 65 73 74 69 6f 6e 5b 27 74 61 72 67 65 74 27 5d 5d 20 3d 20 24 73 75 67 | ]][$suggestion['target']].=.$sug |
c8b80 | 67 65 73 74 69 6f 6e 5b 27 72 65 61 73 6f 6e 27 5d 3b 0a 24 73 75 67 67 65 73 74 65 64 5b 24 73 | gestion['reason'];.$suggested[$s |
c8ba0 | 75 67 67 65 73 74 69 6f 6e 5b 27 74 61 72 67 65 74 27 5d 5d 5b 24 73 75 67 67 65 73 74 69 6f 6e | uggestion['target']][$suggestion |
c8bc0 | 5b 27 73 6f 75 72 63 65 27 5d 5d 20 3d 20 24 73 75 67 67 65 73 74 69 6f 6e 5b 27 72 65 61 73 6f | ['source']].=.$suggestion['reaso |
c8be0 | 6e 27 5d 3b 0a 7d 0a 6b 73 6f 72 74 28 24 73 75 67 67 65 73 74 65 72 73 29 3b 0a 6b 73 6f 72 74 | n'];.}.ksort($suggesters);.ksort |
c8c00 | 28 24 73 75 67 67 65 73 74 65 64 29 3b 0a 0a 0a 69 66 20 28 24 6d 6f 64 65 20 26 20 73 65 6c 66 | ($suggested);...if.($mode.&.self |
c8c20 | 3a 3a 4d 4f 44 45 5f 4c 49 53 54 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 61 72 72 61 79 5f 6b 65 | ::MODE_LIST).{.foreach.(array_ke |
c8c40 | 79 73 28 24 73 75 67 67 65 73 74 65 64 29 20 61 73 20 24 6e 61 6d 65 29 20 7b 0a 24 74 68 69 73 | ys($suggested).as.$name).{.$this |
c8c60 | 2d 3e 69 6f 2d 3e 77 72 69 74 65 28 73 70 72 69 6e 74 66 28 27 3c 69 6e 66 6f 3e 25 73 3c 2f 69 | ->io->write(sprintf('<info>%s</i |
c8c80 | 6e 66 6f 3e 27 2c 20 24 6e 61 6d 65 29 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 3b 0a 7d 0a 0a 0a 69 | nfo>',.$name));.}..return;.}...i |
c8ca0 | 66 20 28 24 6d 6f 64 65 20 26 20 73 65 6c 66 3a 3a 4d 4f 44 45 5f 42 59 5f 50 41 43 4b 41 47 45 | f.($mode.&.self::MODE_BY_PACKAGE |
c8cc0 | 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 73 75 67 67 65 73 74 65 72 73 20 61 73 20 24 73 75 67 | ).{.foreach.($suggesters.as.$sug |
c8ce0 | 67 65 73 74 65 72 20 3d 3e 20 24 73 75 67 67 65 73 74 69 6f 6e 73 29 20 7b 0a 24 74 68 69 73 2d | gester.=>.$suggestions).{.$this- |
c8d00 | 3e 69 6f 2d 3e 77 72 69 74 65 28 73 70 72 69 6e 74 66 28 27 3c 63 6f 6d 6d 65 6e 74 3e 25 73 3c | >io->write(sprintf('<comment>%s< |
c8d20 | 2f 63 6f 6d 6d 65 6e 74 3e 20 73 75 67 67 65 73 74 73 3a 27 2c 20 24 73 75 67 67 65 73 74 65 72 | /comment>.suggests:',.$suggester |
c8d40 | 29 29 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 73 75 67 67 65 73 74 69 6f 6e 73 20 61 73 20 24 73 | ));..foreach.($suggestions.as.$s |
c8d60 | 75 67 67 65 73 74 69 6f 6e 20 3d 3e 20 24 72 65 61 73 6f 6e 29 20 7b 0a 24 74 68 69 73 2d 3e 69 | uggestion.=>.$reason).{.$this->i |
c8d80 | 6f 2d 3e 77 72 69 74 65 28 73 70 72 69 6e 74 66 28 27 20 2d 20 3c 69 6e 66 6f 3e 25 73 3c 2f 69 | o->write(sprintf('.-.<info>%s</i |
c8da0 | 6e 66 6f 3e 27 20 2e 20 28 24 72 65 61 73 6f 6e 20 3f 20 27 3a 20 25 73 27 20 3a 20 27 27 29 2c | nfo>'...($reason.?.':.%s'.:.''), |
c8dc0 | 20 24 73 75 67 67 65 73 74 69 6f 6e 2c 20 24 74 68 69 73 2d 3e 65 73 63 61 70 65 4f 75 74 70 75 | .$suggestion,.$this->escapeOutpu |
c8de0 | 74 28 24 72 65 61 73 6f 6e 29 29 29 3b 0a 7d 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 | t($reason)));.}.$this->io->write |
c8e00 | 28 27 27 29 3b 0a 7d 0a 7d 0a 0a 0a 69 66 20 28 24 6d 6f 64 65 20 26 20 73 65 6c 66 3a 3a 4d 4f | ('');.}.}...if.($mode.&.self::MO |
c8e20 | 44 45 5f 42 59 5f 53 55 47 47 45 53 54 49 4f 4e 29 20 7b 0a 0a 69 66 20 28 24 6d 6f 64 65 20 26 | DE_BY_SUGGESTION).{..if.($mode.& |
c8e40 | 20 73 65 6c 66 3a 3a 4d 4f 44 45 5f 42 59 5f 50 41 43 4b 41 47 45 29 20 7b 0a 24 74 68 69 73 2d | .self::MODE_BY_PACKAGE).{.$this- |
c8e60 | 3e 69 6f 2d 3e 77 72 69 74 65 28 73 74 72 5f 72 65 70 65 61 74 28 27 2d 27 2c 20 37 38 29 29 3b | >io->write(str_repeat('-',.78)); |
c8e80 | 0a 7d 0a 66 6f 72 65 61 63 68 20 28 24 73 75 67 67 65 73 74 65 64 20 61 73 20 24 73 75 67 67 65 | .}.foreach.($suggested.as.$sugge |
c8ea0 | 73 74 69 6f 6e 20 3d 3e 20 24 73 75 67 67 65 73 74 65 72 73 29 20 7b 0a 24 74 68 69 73 2d 3e 69 | stion.=>.$suggesters).{.$this->i |
c8ec0 | 6f 2d 3e 77 72 69 74 65 28 73 70 72 69 6e 74 66 28 27 3c 63 6f 6d 6d 65 6e 74 3e 25 73 3c 2f 63 | o->write(sprintf('<comment>%s</c |
c8ee0 | 6f 6d 6d 65 6e 74 3e 20 69 73 20 73 75 67 67 65 73 74 65 64 20 62 79 3a 27 2c 20 24 73 75 67 67 | omment>.is.suggested.by:',.$sugg |
c8f00 | 65 73 74 69 6f 6e 29 29 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 73 75 67 67 65 73 74 65 72 73 20 | estion));..foreach.($suggesters. |
c8f20 | 61 73 20 24 73 75 67 67 65 73 74 65 72 20 3d 3e 20 24 72 65 61 73 6f 6e 29 20 7b 0a 24 74 68 69 | as.$suggester.=>.$reason).{.$thi |
c8f40 | 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 28 73 70 72 69 6e 74 66 28 27 20 2d 20 3c 69 6e 66 6f 3e 25 | s->io->write(sprintf('.-.<info>% |
c8f60 | 73 3c 2f 69 6e 66 6f 3e 27 20 2e 20 28 24 72 65 61 73 6f 6e 20 3f 20 27 3a 20 25 73 27 20 3a 20 | s</info>'...($reason.?.':.%s'.:. |
c8f80 | 27 27 29 2c 20 24 73 75 67 67 65 73 74 65 72 2c 20 24 74 68 69 73 2d 3e 65 73 63 61 70 65 4f 75 | ''),.$suggester,.$this->escapeOu |
c8fa0 | 74 70 75 74 28 24 72 65 61 73 6f 6e 29 29 29 3b 0a 7d 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 | tput($reason)));.}.$this->io->wr |
c8fc0 | 69 74 65 28 27 27 29 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 24 6f 6e 6c 79 44 65 70 65 6e 64 65 6e 74 | ite('');.}.}..if.($onlyDependent |
c8fe0 | 73 4f 66 29 20 7b 0a 24 61 6c 6c 53 75 67 67 65 73 74 65 64 50 61 63 6b 61 67 65 73 20 3d 20 24 | sOf).{.$allSuggestedPackages.=.$ |
c9000 | 74 68 69 73 2d 3e 67 65 74 46 69 6c 74 65 72 65 64 53 75 67 67 65 73 74 69 6f 6e 73 28 24 69 6e | this->getFilteredSuggestions($in |
c9020 | 73 74 61 6c 6c 65 64 52 65 70 6f 29 3b 0a 24 64 69 66 66 20 3d 20 63 6f 75 6e 74 28 24 61 6c 6c | stalledRepo);.$diff.=.count($all |
c9040 | 53 75 67 67 65 73 74 65 64 50 61 63 6b 61 67 65 73 29 20 2d 20 63 6f 75 6e 74 28 24 73 75 67 67 | SuggestedPackages).-.count($sugg |
c9060 | 65 73 74 65 64 50 61 63 6b 61 67 65 73 29 3b 0a 69 66 20 28 24 64 69 66 66 29 20 7b 0a 24 74 68 | estedPackages);.if.($diff).{.$th |
c9080 | 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 28 27 3c 69 6e 66 6f 3e 27 2e 24 64 69 66 66 2e 27 20 61 | is->io->write('<info>'.$diff.'.a |
c90a0 | 64 64 69 74 69 6f 6e 61 6c 20 73 75 67 67 65 73 74 69 6f 6e 73 3c 2f 69 6e 66 6f 3e 20 62 79 20 | dditional.suggestions</info>.by. |
c90c0 | 74 72 61 6e 73 69 74 69 76 65 20 64 65 70 65 6e 64 65 6e 63 69 65 73 20 63 61 6e 20 62 65 20 73 | transitive.dependencies.can.be.s |
c90e0 | 68 6f 77 6e 20 77 69 74 68 20 3c 69 6e 66 6f 3e 2d 2d 61 6c 6c 3c 2f 69 6e 66 6f 3e 27 29 3b 0a | hown.with.<info>--all</info>');. |
c9100 | 7d 0a 7d 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 6f 75 74 | }.}.}........public.function.out |
c9120 | 70 75 74 4d 69 6e 69 6d 61 6c 69 73 74 69 63 28 3f 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 | putMinimalistic(?InstalledReposi |
c9140 | 74 6f 72 79 20 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 20 3d 20 6e 75 6c 6c 2c 20 3f 50 61 63 | tory.$installedRepo.=.null,.?Pac |
c9160 | 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 6f 6e 6c 79 44 65 70 65 6e 64 65 6e 74 73 4f 66 20 | kageInterface.$onlyDependentsOf. |
c9180 | 3d 20 6e 75 6c 6c 29 3a 20 76 6f 69 64 0a 7b 0a 24 73 75 67 67 65 73 74 65 64 50 61 63 6b 61 67 | =.null):.void.{.$suggestedPackag |
c91a0 | 65 73 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 46 69 6c 74 65 72 65 64 53 75 67 67 65 73 74 69 6f | es.=.$this->getFilteredSuggestio |
c91c0 | 6e 73 28 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 2c 20 24 6f 6e 6c 79 44 65 70 65 6e 64 65 6e | ns($installedRepo,.$onlyDependen |
c91e0 | 74 73 4f 66 29 3b 0a 69 66 20 28 24 73 75 67 67 65 73 74 65 64 50 61 63 6b 61 67 65 73 29 20 7b | tsOf);.if.($suggestedPackages).{ |
c9200 | 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 3c 69 6e 66 6f 3e 27 2e | .$this->io->writeError('<info>'. |
c9220 | 63 6f 75 6e 74 28 24 73 75 67 67 65 73 74 65 64 50 61 63 6b 61 67 65 73 29 2e 27 20 70 61 63 6b | count($suggestedPackages).'.pack |
c9240 | 61 67 65 20 73 75 67 67 65 73 74 69 6f 6e 73 20 77 65 72 65 20 61 64 64 65 64 20 62 79 20 6e 65 | age.suggestions.were.added.by.ne |
c9260 | 77 20 64 65 70 65 6e 64 65 6e 63 69 65 73 2c 20 75 73 65 20 60 63 6f 6d 70 6f 73 65 72 20 73 75 | w.dependencies,.use.`composer.su |
c9280 | 67 67 65 73 74 60 20 74 6f 20 73 65 65 20 64 65 74 61 69 6c 73 2e 3c 2f 69 6e 66 6f 3e 27 29 3b | ggest`.to.see.details.</info>'); |
c92a0 | 0a 7d 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 46 | .}.}.......private.function.getF |
c92c0 | 69 6c 74 65 72 65 64 53 75 67 67 65 73 74 69 6f 6e 73 28 3f 49 6e 73 74 61 6c 6c 65 64 52 65 70 | ilteredSuggestions(?InstalledRep |
c92e0 | 6f 73 69 74 6f 72 79 20 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 20 3d 20 6e 75 6c 6c 2c 20 3f | ository.$installedRepo.=.null,.? |
c9300 | 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 6f 6e 6c 79 44 65 70 65 6e 64 65 6e 74 73 | PackageInterface.$onlyDependents |
c9320 | 4f 66 20 3d 20 6e 75 6c 6c 29 3a 20 61 72 72 61 79 0a 7b 0a 24 73 75 67 67 65 73 74 65 64 50 61 | Of.=.null):.array.{.$suggestedPa |
c9340 | 63 6b 61 67 65 73 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 50 61 63 6b 61 67 65 73 28 29 3b 0a 24 | ckages.=.$this->getPackages();.$ |
c9360 | 69 6e 73 74 61 6c 6c 65 64 4e 61 6d 65 73 20 3d 20 5b 5d 3b 0a 69 66 20 28 6e 75 6c 6c 20 21 3d | installedNames.=.[];.if.(null.!= |
c9380 | 3d 20 24 69 6e 73 74 61 6c 6c 65 64 52 65 70 6f 20 26 26 20 21 65 6d 70 74 79 28 24 73 75 67 67 | =.$installedRepo.&&.!empty($sugg |
c93a0 | 65 73 74 65 64 50 61 63 6b 61 67 65 73 29 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 69 6e 73 74 | estedPackages)).{.foreach.($inst |
c93c0 | 61 6c 6c 65 64 52 65 70 6f 2d 3e 67 65 74 50 61 63 6b 61 67 65 73 28 29 20 61 73 20 24 70 61 63 | alledRepo->getPackages().as.$pac |
c93e0 | 6b 61 67 65 29 20 7b 0a 24 69 6e 73 74 61 6c 6c 65 64 4e 61 6d 65 73 20 3d 20 61 72 72 61 79 5f | kage).{.$installedNames.=.array_ |
c9400 | 6d 65 72 67 65 28 0a 24 69 6e 73 74 61 6c 6c 65 64 4e 61 6d 65 73 2c 0a 24 70 61 63 6b 61 67 65 | merge(.$installedNames,.$package |
c9420 | 2d 3e 67 65 74 4e 61 6d 65 73 28 29 0a 29 3b 0a 7d 0a 7d 0a 0a 24 73 6f 75 72 63 65 46 69 6c 74 | ->getNames().);.}.}..$sourceFilt |
c9440 | 65 72 20 3d 20 5b 5d 3b 0a 69 66 20 28 24 6f 6e 6c 79 44 65 70 65 6e 64 65 6e 74 73 4f 66 29 20 | er.=.[];.if.($onlyDependentsOf). |
c9460 | 7b 0a 24 73 6f 75 72 63 65 46 69 6c 74 65 72 20 3d 20 61 72 72 61 79 5f 6d 61 70 28 73 74 61 74 | {.$sourceFilter.=.array_map(stat |
c9480 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 6c 69 6e 6b 29 3a 20 73 74 72 69 6e 67 20 7b 0a 72 65 | ic.function.($link):.string.{.re |
c94a0 | 74 75 72 6e 20 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 74 28 29 3b 0a 7d 2c 20 61 72 72 61 | turn.$link->getTarget();.},.arra |
c94c0 | 79 5f 6d 65 72 67 65 28 24 6f 6e 6c 79 44 65 70 65 6e 64 65 6e 74 73 4f 66 2d 3e 67 65 74 52 65 | y_merge($onlyDependentsOf->getRe |
c94e0 | 71 75 69 72 65 73 28 29 2c 20 24 6f 6e 6c 79 44 65 70 65 6e 64 65 6e 74 73 4f 66 2d 3e 67 65 74 | quires(),.$onlyDependentsOf->get |
c9500 | 44 65 76 52 65 71 75 69 72 65 73 28 29 29 29 3b 0a 24 73 6f 75 72 63 65 46 69 6c 74 65 72 5b 5d | DevRequires()));.$sourceFilter[] |
c9520 | 20 3d 20 24 6f 6e 6c 79 44 65 70 65 6e 64 65 6e 74 73 4f 66 2d 3e 67 65 74 4e 61 6d 65 28 29 3b | .=.$onlyDependentsOf->getName(); |
c9540 | 0a 7d 0a 0a 24 73 75 67 67 65 73 74 69 6f 6e 73 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 | .}..$suggestions.=.[];.foreach.( |
c9560 | 24 73 75 67 67 65 73 74 65 64 50 61 63 6b 61 67 65 73 20 61 73 20 24 73 75 67 67 65 73 74 69 6f | $suggestedPackages.as.$suggestio |
c9580 | 6e 29 20 7b 0a 69 66 20 28 69 6e 5f 61 72 72 61 79 28 24 73 75 67 67 65 73 74 69 6f 6e 5b 27 74 | n).{.if.(in_array($suggestion['t |
c95a0 | 61 72 67 65 74 27 5d 2c 20 24 69 6e 73 74 61 6c 6c 65 64 4e 61 6d 65 73 29 20 7c 7c 20 28 24 73 | arget'],.$installedNames).||.($s |
c95c0 | 6f 75 72 63 65 46 69 6c 74 65 72 20 26 26 20 21 69 6e 5f 61 72 72 61 79 28 24 73 75 67 67 65 73 | ourceFilter.&&.!in_array($sugges |
c95e0 | 74 69 6f 6e 5b 27 73 6f 75 72 63 65 27 5d 2c 20 24 73 6f 75 72 63 65 46 69 6c 74 65 72 29 29 29 | tion['source'],.$sourceFilter))) |
c9600 | 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 24 73 75 67 67 65 73 74 69 6f 6e 73 5b 5d 20 3d | .{.continue;.}..$suggestions[].= |
c9620 | 20 24 73 75 67 67 65 73 74 69 6f 6e 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 73 75 67 67 65 73 74 | .$suggestion;.}..return.$suggest |
c9640 | 69 6f 6e 73 3b 0a 7d 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 65 73 63 61 70 65 | ions;.}..private.function.escape |
c9660 | 4f 75 74 70 75 74 28 73 74 72 69 6e 67 20 24 73 74 72 69 6e 67 29 3a 20 73 74 72 69 6e 67 0a 7b | Output(string.$string):.string.{ |
c9680 | 0a 72 65 74 75 72 6e 20 4f 75 74 70 75 74 46 6f 72 6d 61 74 74 65 72 3a 3a 65 73 63 61 70 65 28 | .return.OutputFormatter::escape( |
c96a0 | 0a 24 74 68 69 73 2d 3e 72 65 6d 6f 76 65 43 6f 6e 74 72 6f 6c 43 68 61 72 61 63 74 65 72 73 28 | .$this->removeControlCharacters( |
c96c0 | 24 73 74 72 69 6e 67 29 0a 29 3b 0a 7d 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 | $string).);.}..private.function. |
c96e0 | 72 65 6d 6f 76 65 43 6f 6e 74 72 6f 6c 43 68 61 72 61 63 74 65 72 73 28 73 74 72 69 6e 67 20 24 | removeControlCharacters(string.$ |
c9700 | 73 74 72 69 6e 67 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 50 72 65 67 3a 3a 72 | string):.string.{.return.Preg::r |
c9720 | 65 70 6c 61 63 65 28 0a 27 2f 5b 5b 3a 63 6e 74 72 6c 3a 5d 5d 2f 27 2c 0a 27 27 2c 0a 73 74 72 | eplace(.'/[[:cntrl:]]/',.'',.str |
c9740 | 5f 72 65 70 6c 61 63 65 28 22 5c 6e 22 2c 20 27 20 27 2c 20 24 73 74 72 69 6e 67 29 0a 29 3b 0a | _replace("\n",.'.',.$string).);. |
c9760 | 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 | }.}.<?php.declare(strict_types=1 |
c9780 | 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 | );............namespace.Composer |
c97a0 | 5c 4a 73 6f 6e 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 63 72 65 5c 50 72 65 67 3b 0a | \Json;..use.Composer\Pcre\Preg;. |
c97c0 | 75 73 65 20 4a 73 6f 6e 53 63 68 65 6d 61 5c 56 61 6c 69 64 61 74 6f 72 3b 0a 75 73 65 20 53 65 | use.JsonSchema\Validator;.use.Se |
c97e0 | 6c 64 5c 4a 73 6f 6e 4c 69 6e 74 5c 4a 73 6f 6e 50 61 72 73 65 72 3b 0a 75 73 65 20 53 65 6c 64 | ld\JsonLint\JsonParser;.use.Seld |
c9800 | 5c 4a 73 6f 6e 4c 69 6e 74 5c 50 61 72 73 69 6e 67 45 78 63 65 70 74 69 6f 6e 3b 0a 75 73 65 20 | \JsonLint\ParsingException;.use. |
c9820 | 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 48 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 3b 0a 75 73 | Composer\Util\HttpDownloader;.us |
c9840 | 65 20 43 6f 6d 70 6f 73 65 72 5c 49 4f 5c 49 4f 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 | e.Composer\IO\IOInterface;.use.C |
c9860 | 6f 6d 70 6f 73 65 72 5c 44 6f 77 6e 6c 6f 61 64 65 72 5c 54 72 61 6e 73 70 6f 72 74 45 78 63 65 | omposer\Downloader\TransportExce |
c9880 | 70 74 69 6f 6e 3b 0a 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 4a 73 6f 6e 46 69 6c 65 0a 7b 0a 70 | ption;........class.JsonFile.{.p |
c98a0 | 75 62 6c 69 63 20 63 6f 6e 73 74 20 4c 41 58 5f 53 43 48 45 4d 41 20 3d 20 31 3b 0a 70 75 62 6c | ublic.const.LAX_SCHEMA.=.1;.publ |
c98c0 | 69 63 20 63 6f 6e 73 74 20 53 54 52 49 43 54 5f 53 43 48 45 4d 41 20 3d 20 32 3b 0a 70 75 62 6c | ic.const.STRICT_SCHEMA.=.2;.publ |
c98e0 | 69 63 20 63 6f 6e 73 74 20 41 55 54 48 5f 53 43 48 45 4d 41 20 3d 20 33 3b 0a 0a 0a 70 75 62 6c | ic.const.AUTH_SCHEMA.=.3;...publ |
c9900 | 69 63 20 63 6f 6e 73 74 20 4a 53 4f 4e 5f 55 4e 45 53 43 41 50 45 44 5f 53 4c 41 53 48 45 53 20 | ic.const.JSON_UNESCAPED_SLASHES. |
c9920 | 3d 20 36 34 3b 0a 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 4a 53 4f 4e 5f 50 52 45 54 54 59 5f | =.64;..public.const.JSON_PRETTY_ |
c9940 | 50 52 49 4e 54 20 3d 20 31 32 38 3b 0a 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 4a 53 4f 4e 5f | PRINT.=.128;..public.const.JSON_ |
c9960 | 55 4e 45 53 43 41 50 45 44 5f 55 4e 49 43 4f 44 45 20 3d 20 32 35 36 3b 0a 0a 70 75 62 6c 69 63 | UNESCAPED_UNICODE.=.256;..public |
c9980 | 20 63 6f 6e 73 74 20 43 4f 4d 50 4f 53 45 52 5f 53 43 48 45 4d 41 5f 50 41 54 48 20 3d 20 5f 5f | .const.COMPOSER_SCHEMA_PATH.=.__ |
c99a0 | 44 49 52 5f 5f 20 2e 20 27 2f 2e 2e 2f 2e 2e 2f 2e 2e 2f 72 65 73 2f 63 6f 6d 70 6f 73 65 72 2d | DIR__...'/../../../res/composer- |
c99c0 | 73 63 68 65 6d 61 2e 6a 73 6f 6e 27 3b 0a 0a 0a 70 72 69 76 61 74 65 20 24 70 61 74 68 3b 0a 0a | schema.json';...private.$path;.. |
c99e0 | 70 72 69 76 61 74 65 20 24 68 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 3b 0a 0a 70 72 69 76 61 74 | private.$httpDownloader;..privat |
c9a00 | 65 20 24 69 6f 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 | e.$io;..........public.function. |
c9a20 | 5f 5f 63 6f 6e 73 74 72 75 63 74 28 73 74 72 69 6e 67 20 24 70 61 74 68 2c 20 3f 48 74 74 70 44 | __construct(string.$path,.?HttpD |
c9a40 | 6f 77 6e 6c 6f 61 64 65 72 20 24 68 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 20 3d 20 6e 75 6c 6c | ownloader.$httpDownloader.=.null |
c9a60 | 2c 20 3f 49 4f 49 6e 74 65 72 66 61 63 65 20 24 69 6f 20 3d 20 6e 75 6c 6c 29 0a 7b 0a 24 74 68 | ,.?IOInterface.$io.=.null).{.$th |
c9a80 | 69 73 2d 3e 70 61 74 68 20 3d 20 24 70 61 74 68 3b 0a 0a 69 66 20 28 6e 75 6c 6c 20 3d 3d 3d 20 | is->path.=.$path;..if.(null.===. |
c9aa0 | 24 68 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 20 26 26 20 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 | $httpDownloader.&&.Preg::isMatch |
c9ac0 | 28 27 7b 5e 68 74 74 70 73 3f 3a 2f 2f 7d 69 27 2c 20 24 70 61 74 68 29 29 20 7b 0a 74 68 72 6f | ('{^https?://}i',.$path)).{.thro |
c9ae0 | 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 | w.new.\InvalidArgumentException( |
c9b00 | 27 68 74 74 70 20 75 72 6c 73 20 72 65 71 75 69 72 65 20 61 20 48 74 74 70 44 6f 77 6e 6c 6f 61 | 'http.urls.require.a.HttpDownloa |
c9b20 | 64 65 72 20 69 6e 73 74 61 6e 63 65 20 74 6f 20 62 65 20 70 61 73 73 65 64 27 29 3b 0a 7d 0a 24 | der.instance.to.be.passed');.}.$ |
c9b40 | 74 68 69 73 2d 3e 68 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 20 3d 20 24 68 74 74 70 44 6f 77 6e | this->httpDownloader.=.$httpDown |
c9b60 | 6c 6f 61 64 65 72 3b 0a 24 74 68 69 73 2d 3e 69 6f 20 3d 20 24 69 6f 3b 0a 7d 0a 0a 70 75 62 6c | loader;.$this->io.=.$io;.}..publ |
c9b80 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 50 61 74 68 28 29 3a 20 73 74 72 69 6e 67 0a 7b 0a | ic.function.getPath():.string.{. |
c9ba0 | 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 70 61 74 68 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 | return.$this->path;.}.....public |
c9bc0 | 20 66 75 6e 63 74 69 6f 6e 20 65 78 69 73 74 73 28 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 | .function.exists():.bool.{.retur |
c9be0 | 6e 20 69 73 5f 66 69 6c 65 28 24 74 68 69 73 2d 3e 70 61 74 68 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a | n.is_file($this->path);.}....... |
c9c00 | 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 72 65 61 64 28 29 0a 7b 0a 74 72 79 20 7b | ..public.function.read().{.try.{ |
c9c20 | 0a 69 66 20 28 24 74 68 69 73 2d 3e 68 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 29 20 7b 0a 24 6a | .if.($this->httpDownloader).{.$j |
c9c40 | 73 6f 6e 20 3d 20 24 74 68 69 73 2d 3e 68 74 74 70 44 6f 77 6e 6c 6f 61 64 65 72 2d 3e 67 65 74 | son.=.$this->httpDownloader->get |
c9c60 | 28 24 74 68 69 73 2d 3e 70 61 74 68 29 2d 3e 67 65 74 42 6f 64 79 28 29 3b 0a 7d 20 65 6c 73 65 | ($this->path)->getBody();.}.else |
c9c80 | 20 7b 0a 69 66 20 28 24 74 68 69 73 2d 3e 69 6f 20 26 26 20 24 74 68 69 73 2d 3e 69 6f 2d 3e 69 | .{.if.($this->io.&&.$this->io->i |
c9ca0 | 73 44 65 62 75 67 28 29 29 20 7b 0a 24 72 65 61 6c 70 61 74 68 49 6e 66 6f 20 3d 20 27 27 3b 0a | sDebug()).{.$realpathInfo.=.'';. |
c9cc0 | 24 72 65 61 6c 70 61 74 68 20 3d 20 72 65 61 6c 70 61 74 68 28 24 74 68 69 73 2d 3e 70 61 74 68 | $realpath.=.realpath($this->path |
c9ce0 | 29 3b 0a 69 66 20 28 66 61 6c 73 65 20 21 3d 3d 20 24 72 65 61 6c 70 61 74 68 20 26 26 20 24 72 | );.if.(false.!==.$realpath.&&.$r |
c9d00 | 65 61 6c 70 61 74 68 20 21 3d 3d 20 24 74 68 69 73 2d 3e 70 61 74 68 29 20 7b 0a 24 72 65 61 6c | ealpath.!==.$this->path).{.$real |
c9d20 | 70 61 74 68 49 6e 66 6f 20 3d 20 27 20 28 27 20 2e 20 24 72 65 61 6c 70 61 74 68 20 2e 20 27 29 | pathInfo.=.'.('...$realpath...') |
c9d40 | 27 3b 0a 7d 0a 24 74 68 69 73 2d 3e 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 27 52 65 61 64 | ';.}.$this->io->writeError('Read |
c9d60 | 69 6e 67 20 27 20 2e 20 24 74 68 69 73 2d 3e 70 61 74 68 20 2e 20 24 72 65 61 6c 70 61 74 68 49 | ing.'...$this->path...$realpathI |
c9d80 | 6e 66 6f 29 3b 0a 7d 0a 24 6a 73 6f 6e 20 3d 20 66 69 6c 65 5f 67 65 74 5f 63 6f 6e 74 65 6e 74 | nfo);.}.$json.=.file_get_content |
c9da0 | 73 28 24 74 68 69 73 2d 3e 70 61 74 68 29 3b 0a 7d 0a 7d 20 63 61 74 63 68 20 28 54 72 61 6e 73 | s($this->path);.}.}.catch.(Trans |
c9dc0 | 70 6f 72 74 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 | portException.$e).{.throw.new.\R |
c9de0 | 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 24 65 2d 3e 67 65 74 4d 65 73 73 61 67 65 28 29 | untimeException($e->getMessage() |
c9e00 | 2c 20 30 2c 20 24 65 29 3b 0a 7d 20 63 61 74 63 68 20 28 5c 45 78 63 65 70 74 69 6f 6e 20 24 65 | ,.0,.$e);.}.catch.(\Exception.$e |
c9e20 | 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 | ).{.throw.new.\RuntimeException( |
c9e40 | 27 43 6f 75 6c 64 20 6e 6f 74 20 72 65 61 64 20 27 2e 24 74 68 69 73 2d 3e 70 61 74 68 2e 22 5c | 'Could.not.read.'.$this->path."\ |
c9e60 | 6e 5c 6e 22 2e 24 65 2d 3e 67 65 74 4d 65 73 73 61 67 65 28 29 29 3b 0a 7d 0a 0a 69 66 20 28 24 | n\n".$e->getMessage());.}..if.($ |
c9e80 | 6a 73 6f 6e 20 3d 3d 3d 20 66 61 6c 73 65 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e | json.===.false).{.throw.new.\Run |
c9ea0 | 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 43 6f 75 6c 64 20 6e 6f 74 20 72 65 61 64 20 27 2e | timeException('Could.not.read.'. |
c9ec0 | 24 74 68 69 73 2d 3e 70 61 74 68 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 73 74 61 74 69 63 3a 3a | $this->path);.}..return.static:: |
c9ee0 | 70 61 72 73 65 4a 73 6f 6e 28 24 6a 73 6f 6e 2c 20 24 74 68 69 73 2d 3e 70 61 74 68 29 3b 0a 7d | parseJson($json,.$this->path);.} |
c9f00 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 77 72 69 74 65 28 | ..........public.function.write( |
c9f20 | 61 72 72 61 79 20 24 68 61 73 68 2c 20 69 6e 74 20 24 6f 70 74 69 6f 6e 73 20 3d 20 4a 53 4f 4e | array.$hash,.int.$options.=.JSON |
c9f40 | 5f 55 4e 45 53 43 41 50 45 44 5f 53 4c 41 53 48 45 53 20 7c 20 4a 53 4f 4e 5f 50 52 45 54 54 59 | _UNESCAPED_SLASHES.|.JSON_PRETTY |
c9f60 | 5f 50 52 49 4e 54 20 7c 20 4a 53 4f 4e 5f 55 4e 45 53 43 41 50 45 44 5f 55 4e 49 43 4f 44 45 29 | _PRINT.|.JSON_UNESCAPED_UNICODE) |
c9f80 | 0a 7b 0a 69 66 20 28 24 74 68 69 73 2d 3e 70 61 74 68 20 3d 3d 3d 20 27 70 68 70 3a 2f 2f 6d 65 | .{.if.($this->path.===.'php://me |
c9fa0 | 6d 6f 72 79 27 29 20 7b 0a 66 69 6c 65 5f 70 75 74 5f 63 6f 6e 74 65 6e 74 73 28 24 74 68 69 73 | mory').{.file_put_contents($this |
c9fc0 | 2d 3e 70 61 74 68 2c 20 73 74 61 74 69 63 3a 3a 65 6e 63 6f 64 65 28 24 68 61 73 68 2c 20 24 6f | ->path,.static::encode($hash,.$o |
c9fe0 | 70 74 69 6f 6e 73 29 29 3b 0a 0a 72 65 74 75 72 6e 3b 0a 7d 0a 0a 24 64 69 72 20 3d 20 64 69 72 | ptions));..return;.}..$dir.=.dir |
ca000 | 6e 61 6d 65 28 24 74 68 69 73 2d 3e 70 61 74 68 29 3b 0a 69 66 20 28 21 69 73 5f 64 69 72 28 24 | name($this->path);.if.(!is_dir($ |
ca020 | 64 69 72 29 29 20 7b 0a 69 66 20 28 66 69 6c 65 5f 65 78 69 73 74 73 28 24 64 69 72 29 29 20 7b | dir)).{.if.(file_exists($dir)).{ |
ca040 | 0a 74 68 72 6f 77 20 6e 65 77 20 5c 55 6e 65 78 70 65 63 74 65 64 56 61 6c 75 65 45 78 63 65 70 | .throw.new.\UnexpectedValueExcep |
ca060 | 74 69 6f 6e 28 0a 72 65 61 6c 70 61 74 68 28 24 64 69 72 29 2e 27 20 65 78 69 73 74 73 20 61 6e | tion(.realpath($dir).'.exists.an |
ca080 | 64 20 69 73 20 6e 6f 74 20 61 20 64 69 72 65 63 74 6f 72 79 2e 27 0a 29 3b 0a 7d 0a 69 66 20 28 | d.is.not.a.directory.'.);.}.if.( |
ca0a0 | 21 40 6d 6b 64 69 72 28 24 64 69 72 2c 20 30 37 37 37 2c 20 74 72 75 65 29 29 20 7b 0a 74 68 72 | !@mkdir($dir,.0777,.true)).{.thr |
ca0c0 | 6f 77 20 6e 65 77 20 5c 55 6e 65 78 70 65 63 74 65 64 56 61 6c 75 65 45 78 63 65 70 74 69 6f 6e | ow.new.\UnexpectedValueException |
ca0e0 | 28 0a 24 64 69 72 2e 27 20 64 6f 65 73 20 6e 6f 74 20 65 78 69 73 74 20 61 6e 64 20 63 6f 75 6c | (.$dir.'.does.not.exist.and.coul |
ca100 | 64 20 6e 6f 74 20 62 65 20 63 72 65 61 74 65 64 2e 27 0a 29 3b 0a 7d 0a 7d 0a 0a 24 72 65 74 72 | d.not.be.created.'.);.}.}..$retr |
ca120 | 69 65 73 20 3d 20 33 3b 0a 77 68 69 6c 65 20 28 24 72 65 74 72 69 65 73 2d 2d 29 20 7b 0a 74 72 | ies.=.3;.while.($retries--).{.tr |
ca140 | 79 20 7b 0a 24 74 68 69 73 2d 3e 66 69 6c 65 50 75 74 43 6f 6e 74 65 6e 74 73 49 66 4d 6f 64 69 | y.{.$this->filePutContentsIfModi |
ca160 | 66 69 65 64 28 24 74 68 69 73 2d 3e 70 61 74 68 2c 20 73 74 61 74 69 63 3a 3a 65 6e 63 6f 64 65 | fied($this->path,.static::encode |
ca180 | 28 24 68 61 73 68 2c 20 24 6f 70 74 69 6f 6e 73 29 2e 20 28 24 6f 70 74 69 6f 6e 73 20 26 20 4a | ($hash,.$options)..($options.&.J |
ca1a0 | 53 4f 4e 5f 50 52 45 54 54 59 5f 50 52 49 4e 54 20 3f 20 22 5c 6e 22 20 3a 20 27 27 29 29 3b 0a | SON_PRETTY_PRINT.?."\n".:.''));. |
ca1c0 | 62 72 65 61 6b 3b 0a 7d 20 63 61 74 63 68 20 28 5c 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b | break;.}.catch.(\Exception.$e).{ |
ca1e0 | 0a 69 66 20 28 24 72 65 74 72 69 65 73 20 3e 20 30 29 20 7b 0a 75 73 6c 65 65 70 28 35 30 30 30 | .if.($retries.>.0).{.usleep(5000 |
ca200 | 30 30 29 3b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 74 68 72 6f 77 20 24 65 3b 0a 7d 0a 7d 0a | 00);.continue;.}..throw.$e;.}.}. |
ca220 | 7d 0a 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 66 69 6c 65 50 75 74 | }.......private.function.filePut |
ca240 | 43 6f 6e 74 65 6e 74 73 49 66 4d 6f 64 69 66 69 65 64 28 73 74 72 69 6e 67 20 24 70 61 74 68 2c | ContentsIfModified(string.$path, |
ca260 | 20 73 74 72 69 6e 67 20 24 63 6f 6e 74 65 6e 74 29 0a 7b 0a 24 63 75 72 72 65 6e 74 43 6f 6e 74 | .string.$content).{.$currentCont |
ca280 | 65 6e 74 20 3d 20 40 66 69 6c 65 5f 67 65 74 5f 63 6f 6e 74 65 6e 74 73 28 24 70 61 74 68 29 3b | ent.=.@file_get_contents($path); |
ca2a0 | 0a 69 66 20 28 66 61 6c 73 65 20 3d 3d 3d 20 24 63 75 72 72 65 6e 74 43 6f 6e 74 65 6e 74 20 7c | .if.(false.===.$currentContent.| |
ca2c0 | 7c 20 24 63 75 72 72 65 6e 74 43 6f 6e 74 65 6e 74 20 21 3d 3d 20 24 63 6f 6e 74 65 6e 74 29 20 | |.$currentContent.!==.$content). |
ca2e0 | 7b 0a 72 65 74 75 72 6e 20 66 69 6c 65 5f 70 75 74 5f 63 6f 6e 74 65 6e 74 73 28 24 70 61 74 68 | {.return.file_put_contents($path |
ca300 | 2c 20 24 63 6f 6e 74 65 6e 74 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 30 3b 0a 7d 0a 0a 0a 0a 0a | ,.$content);.}..return.0;.}..... |
ca320 | 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 76 61 6c 69 64 61 74 65 | ........public.function.validate |
ca340 | 53 63 68 65 6d 61 28 69 6e 74 20 24 73 63 68 65 6d 61 20 3d 20 73 65 6c 66 3a 3a 53 54 52 49 43 | Schema(int.$schema.=.self::STRIC |
ca360 | 54 5f 53 43 48 45 4d 41 2c 20 3f 73 74 72 69 6e 67 20 24 73 63 68 65 6d 61 46 69 6c 65 20 3d 20 | T_SCHEMA,.?string.$schemaFile.=. |
ca380 | 6e 75 6c 6c 29 3a 20 62 6f 6f 6c 0a 7b 0a 24 63 6f 6e 74 65 6e 74 20 3d 20 66 69 6c 65 5f 67 65 | null):.bool.{.$content.=.file_ge |
ca3a0 | 74 5f 63 6f 6e 74 65 6e 74 73 28 24 74 68 69 73 2d 3e 70 61 74 68 29 3b 0a 24 64 61 74 61 20 3d | t_contents($this->path);.$data.= |
ca3c0 | 20 6a 73 6f 6e 5f 64 65 63 6f 64 65 28 24 63 6f 6e 74 65 6e 74 29 3b 0a 0a 69 66 20 28 6e 75 6c | .json_decode($content);..if.(nul |
ca3e0 | 6c 20 3d 3d 3d 20 24 64 61 74 61 20 26 26 20 27 6e 75 6c 6c 27 20 21 3d 3d 20 24 63 6f 6e 74 65 | l.===.$data.&&.'null'.!==.$conte |
ca400 | 6e 74 29 20 7b 0a 73 65 6c 66 3a 3a 76 61 6c 69 64 61 74 65 53 79 6e 74 61 78 28 24 63 6f 6e 74 | nt).{.self::validateSyntax($cont |
ca420 | 65 6e 74 2c 20 24 74 68 69 73 2d 3e 70 61 74 68 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 73 65 6c | ent,.$this->path);.}..return.sel |
ca440 | 66 3a 3a 76 61 6c 69 64 61 74 65 4a 73 6f 6e 53 63 68 65 6d 61 28 24 74 68 69 73 2d 3e 70 61 74 | f::validateJsonSchema($this->pat |
ca460 | 68 2c 20 24 64 61 74 61 2c 20 24 73 63 68 65 6d 61 2c 20 24 73 63 68 65 6d 61 46 69 6c 65 29 3b | h,.$data,.$schema,.$schemaFile); |
ca480 | 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 66 75 6e | .}.............public.static.fun |
ca4a0 | 63 74 69 6f 6e 20 76 61 6c 69 64 61 74 65 4a 73 6f 6e 53 63 68 65 6d 61 28 73 74 72 69 6e 67 20 | ction.validateJsonSchema(string. |
ca4c0 | 24 73 6f 75 72 63 65 2c 20 24 64 61 74 61 2c 20 69 6e 74 20 24 73 63 68 65 6d 61 2c 20 3f 73 74 | $source,.$data,.int.$schema,.?st |
ca4e0 | 72 69 6e 67 20 24 73 63 68 65 6d 61 46 69 6c 65 20 3d 20 6e 75 6c 6c 29 3a 20 62 6f 6f 6c 0a 7b | ring.$schemaFile.=.null):.bool.{ |
ca500 | 0a 24 69 73 43 6f 6d 70 6f 73 65 72 53 63 68 65 6d 61 46 69 6c 65 20 3d 20 66 61 6c 73 65 3b 0a | .$isComposerSchemaFile.=.false;. |
ca520 | 69 66 20 28 6e 75 6c 6c 20 3d 3d 3d 20 24 73 63 68 65 6d 61 46 69 6c 65 29 20 7b 0a 24 69 73 43 | if.(null.===.$schemaFile).{.$isC |
ca540 | 6f 6d 70 6f 73 65 72 53 63 68 65 6d 61 46 69 6c 65 20 3d 20 74 72 75 65 3b 0a 24 73 63 68 65 6d | omposerSchemaFile.=.true;.$schem |
ca560 | 61 46 69 6c 65 20 3d 20 73 65 6c 66 3a 3a 43 4f 4d 50 4f 53 45 52 5f 53 43 48 45 4d 41 5f 50 41 | aFile.=.self::COMPOSER_SCHEMA_PA |
ca580 | 54 48 3b 0a 7d 0a 0a 0a 69 66 20 28 66 61 6c 73 65 20 3d 3d 3d 20 73 74 72 70 6f 73 28 24 73 63 | TH;.}...if.(false.===.strpos($sc |
ca5a0 | 68 65 6d 61 46 69 6c 65 2c 20 27 3a 2f 2f 27 29 29 20 7b 0a 24 73 63 68 65 6d 61 46 69 6c 65 20 | hemaFile,.'://')).{.$schemaFile. |
ca5c0 | 3d 20 27 66 69 6c 65 3a 2f 2f 27 20 2e 20 24 73 63 68 65 6d 61 46 69 6c 65 3b 0a 7d 0a 0a 24 73 | =.'file://'...$schemaFile;.}..$s |
ca5e0 | 63 68 65 6d 61 44 61 74 61 20 3d 20 28 6f 62 6a 65 63 74 29 20 5b 27 24 72 65 66 27 20 3d 3e 20 | chemaData.=.(object).['$ref'.=>. |
ca600 | 24 73 63 68 65 6d 61 46 69 6c 65 5d 3b 0a 0a 69 66 20 28 24 73 63 68 65 6d 61 20 3d 3d 3d 20 73 | $schemaFile];..if.($schema.===.s |
ca620 | 65 6c 66 3a 3a 4c 41 58 5f 53 43 48 45 4d 41 29 20 7b 0a 24 73 63 68 65 6d 61 44 61 74 61 2d 3e | elf::LAX_SCHEMA).{.$schemaData-> |
ca640 | 61 64 64 69 74 69 6f 6e 61 6c 50 72 6f 70 65 72 74 69 65 73 20 3d 20 74 72 75 65 3b 0a 24 73 63 | additionalProperties.=.true;.$sc |
ca660 | 68 65 6d 61 44 61 74 61 2d 3e 72 65 71 75 69 72 65 64 20 3d 20 5b 5d 3b 0a 7d 20 65 6c 73 65 69 | hemaData->required.=.[];.}.elsei |
ca680 | 66 20 28 24 73 63 68 65 6d 61 20 3d 3d 3d 20 73 65 6c 66 3a 3a 53 54 52 49 43 54 5f 53 43 48 45 | f.($schema.===.self::STRICT_SCHE |
ca6a0 | 4d 41 20 26 26 20 24 69 73 43 6f 6d 70 6f 73 65 72 53 63 68 65 6d 61 46 69 6c 65 29 20 7b 0a 24 | MA.&&.$isComposerSchemaFile).{.$ |
ca6c0 | 73 63 68 65 6d 61 44 61 74 61 2d 3e 61 64 64 69 74 69 6f 6e 61 6c 50 72 6f 70 65 72 74 69 65 73 | schemaData->additionalProperties |
ca6e0 | 20 3d 20 66 61 6c 73 65 3b 0a 24 73 63 68 65 6d 61 44 61 74 61 2d 3e 72 65 71 75 69 72 65 64 20 | .=.false;.$schemaData->required. |
ca700 | 3d 20 5b 27 6e 61 6d 65 27 2c 20 27 64 65 73 63 72 69 70 74 69 6f 6e 27 5d 3b 0a 7d 20 65 6c 73 | =.['name',.'description'];.}.els |
ca720 | 65 69 66 20 28 24 73 63 68 65 6d 61 20 3d 3d 3d 20 73 65 6c 66 3a 3a 41 55 54 48 5f 53 43 48 45 | eif.($schema.===.self::AUTH_SCHE |
ca740 | 4d 41 20 26 26 20 24 69 73 43 6f 6d 70 6f 73 65 72 53 63 68 65 6d 61 46 69 6c 65 29 20 7b 0a 24 | MA.&&.$isComposerSchemaFile).{.$ |
ca760 | 73 63 68 65 6d 61 44 61 74 61 20 3d 20 28 6f 62 6a 65 63 74 29 20 5b 27 24 72 65 66 27 20 3d 3e | schemaData.=.(object).['$ref'.=> |
ca780 | 20 24 73 63 68 65 6d 61 46 69 6c 65 2e 27 23 2f 70 72 6f 70 65 72 74 69 65 73 2f 63 6f 6e 66 69 | .$schemaFile.'#/properties/confi |
ca7a0 | 67 27 2c 20 27 24 73 63 68 65 6d 61 27 20 3d 3e 20 22 68 74 74 70 73 3a 2f 2f 6a 73 6f 6e 2d 73 | g',.'$schema'.=>."https://json-s |
ca7c0 | 63 68 65 6d 61 2e 6f 72 67 2f 64 72 61 66 74 2d 30 34 2f 73 63 68 65 6d 61 23 22 5d 3b 0a 7d 0a | chema.org/draft-04/schema#"];.}. |
ca7e0 | 0a 24 76 61 6c 69 64 61 74 6f 72 20 3d 20 6e 65 77 20 56 61 6c 69 64 61 74 6f 72 28 29 3b 0a 24 | .$validator.=.new.Validator();.$ |
ca800 | 76 61 6c 69 64 61 74 6f 72 2d 3e 63 68 65 63 6b 28 24 64 61 74 61 2c 20 24 73 63 68 65 6d 61 44 | validator->check($data,.$schemaD |
ca820 | 61 74 61 29 3b 0a 0a 69 66 20 28 21 24 76 61 6c 69 64 61 74 6f 72 2d 3e 69 73 56 61 6c 69 64 28 | ata);..if.(!$validator->isValid( |
ca840 | 29 29 20 7b 0a 24 65 72 72 6f 72 73 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 28 61 72 72 | )).{.$errors.=.[];.foreach.((arr |
ca860 | 61 79 29 20 24 76 61 6c 69 64 61 74 6f 72 2d 3e 67 65 74 45 72 72 6f 72 73 28 29 20 61 73 20 24 | ay).$validator->getErrors().as.$ |
ca880 | 65 72 72 6f 72 29 20 7b 0a 24 65 72 72 6f 72 73 5b 5d 20 3d 20 28 24 65 72 72 6f 72 5b 27 70 72 | error).{.$errors[].=.($error['pr |
ca8a0 | 6f 70 65 72 74 79 27 5d 20 3f 20 24 65 72 72 6f 72 5b 27 70 72 6f 70 65 72 74 79 27 5d 2e 27 20 | operty'].?.$error['property'].'. |
ca8c0 | 3a 20 27 20 3a 20 27 27 29 2e 24 65 72 72 6f 72 5b 27 6d 65 73 73 61 67 65 27 5d 3b 0a 7d 0a 74 | :.'.:.'').$error['message'];.}.t |
ca8e0 | 68 72 6f 77 20 6e 65 77 20 4a 73 6f 6e 56 61 6c 69 64 61 74 69 6f 6e 45 78 63 65 70 74 69 6f 6e | hrow.new.JsonValidationException |
ca900 | 28 27 22 27 2e 24 73 6f 75 72 63 65 2e 27 22 20 64 6f 65 73 20 6e 6f 74 20 6d 61 74 63 68 20 74 | ('"'.$source.'".does.not.match.t |
ca920 | 68 65 20 65 78 70 65 63 74 65 64 20 4a 53 4f 4e 20 73 63 68 65 6d 61 27 2c 20 24 65 72 72 6f 72 | he.expected.JSON.schema',.$error |
ca940 | 73 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 | s);.}..return.true;.}.........pu |
ca960 | 62 6c 69 63 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 65 6e 63 6f 64 65 28 24 64 61 74 | blic.static.function.encode($dat |
ca980 | 61 2c 20 69 6e 74 20 24 6f 70 74 69 6f 6e 73 20 3d 20 34 34 38 29 0a 7b 0a 24 6a 73 6f 6e 20 3d | a,.int.$options.=.448).{.$json.= |
ca9a0 | 20 6a 73 6f 6e 5f 65 6e 63 6f 64 65 28 24 64 61 74 61 2c 20 24 6f 70 74 69 6f 6e 73 29 3b 0a 69 | .json_encode($data,.$options);.i |
ca9c0 | 66 20 28 66 61 6c 73 65 20 3d 3d 3d 20 24 6a 73 6f 6e 29 20 7b 0a 73 65 6c 66 3a 3a 74 68 72 6f | f.(false.===.$json).{.self::thro |
ca9e0 | 77 45 6e 63 6f 64 65 45 72 72 6f 72 28 6a 73 6f 6e 5f 6c 61 73 74 5f 65 72 72 6f 72 28 29 29 3b | wEncodeError(json_last_error()); |
caa00 | 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 6a 73 6f 6e 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 72 69 76 61 | .}..return.$json;.}........priva |
caa20 | 74 65 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 74 68 72 6f 77 45 6e 63 6f 64 65 45 72 | te.static.function.throwEncodeEr |
caa40 | 72 6f 72 28 69 6e 74 20 24 63 6f 64 65 29 3a 20 76 6f 69 64 0a 7b 0a 73 77 69 74 63 68 20 28 24 | ror(int.$code):.void.{.switch.($ |
caa60 | 63 6f 64 65 29 20 7b 0a 63 61 73 65 20 4a 53 4f 4e 5f 45 52 52 4f 52 5f 44 45 50 54 48 3a 0a 24 | code).{.case.JSON_ERROR_DEPTH:.$ |
caa80 | 6d 73 67 20 3d 20 27 4d 61 78 69 6d 75 6d 20 73 74 61 63 6b 20 64 65 70 74 68 20 65 78 63 65 65 | msg.=.'Maximum.stack.depth.excee |
caaa0 | 64 65 64 27 3b 0a 62 72 65 61 6b 3b 0a 63 61 73 65 20 4a 53 4f 4e 5f 45 52 52 4f 52 5f 53 54 41 | ded';.break;.case.JSON_ERROR_STA |
caac0 | 54 45 5f 4d 49 53 4d 41 54 43 48 3a 0a 24 6d 73 67 20 3d 20 27 55 6e 64 65 72 66 6c 6f 77 20 6f | TE_MISMATCH:.$msg.=.'Underflow.o |
caae0 | 72 20 74 68 65 20 6d 6f 64 65 73 20 6d 69 73 6d 61 74 63 68 27 3b 0a 62 72 65 61 6b 3b 0a 63 61 | r.the.modes.mismatch';.break;.ca |
cab00 | 73 65 20 4a 53 4f 4e 5f 45 52 52 4f 52 5f 43 54 52 4c 5f 43 48 41 52 3a 0a 24 6d 73 67 20 3d 20 | se.JSON_ERROR_CTRL_CHAR:.$msg.=. |
cab20 | 27 55 6e 65 78 70 65 63 74 65 64 20 63 6f 6e 74 72 6f 6c 20 63 68 61 72 61 63 74 65 72 20 66 6f | 'Unexpected.control.character.fo |
cab40 | 75 6e 64 27 3b 0a 62 72 65 61 6b 3b 0a 63 61 73 65 20 4a 53 4f 4e 5f 45 52 52 4f 52 5f 55 54 46 | und';.break;.case.JSON_ERROR_UTF |
cab60 | 38 3a 0a 24 6d 73 67 20 3d 20 27 4d 61 6c 66 6f 72 6d 65 64 20 55 54 46 2d 38 20 63 68 61 72 61 | 8:.$msg.=.'Malformed.UTF-8.chara |
cab80 | 63 74 65 72 73 2c 20 70 6f 73 73 69 62 6c 79 20 69 6e 63 6f 72 72 65 63 74 6c 79 20 65 6e 63 6f | cters,.possibly.incorrectly.enco |
caba0 | 64 65 64 27 3b 0a 62 72 65 61 6b 3b 0a 64 65 66 61 75 6c 74 3a 0a 24 6d 73 67 20 3d 20 27 55 6e | ded';.break;.default:.$msg.=.'Un |
cabc0 | 6b 6e 6f 77 6e 20 65 72 72 6f 72 27 3b 0a 7d 0a 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 | known.error';.}..throw.new.\Runt |
cabe0 | 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 4a 53 4f 4e 20 65 6e 63 6f 64 69 6e 67 20 66 61 69 6c | imeException('JSON.encoding.fail |
cac00 | 65 64 3a 20 27 2e 24 6d 73 67 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 | ed:.'.$msg);.}...........public. |
cac20 | 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 70 61 72 73 65 4a 73 6f 6e 28 3f 73 74 72 69 6e | static.function.parseJson(?strin |
cac40 | 67 20 24 6a 73 6f 6e 2c 20 3f 73 74 72 69 6e 67 20 24 66 69 6c 65 20 3d 20 6e 75 6c 6c 29 0a 7b | g.$json,.?string.$file.=.null).{ |
cac60 | 0a 69 66 20 28 6e 75 6c 6c 20 3d 3d 3d 20 24 6a 73 6f 6e 29 20 7b 0a 72 65 74 75 72 6e 20 6e 75 | .if.(null.===.$json).{.return.nu |
cac80 | 6c 6c 3b 0a 7d 0a 24 64 61 74 61 20 3d 20 6a 73 6f 6e 5f 64 65 63 6f 64 65 28 24 6a 73 6f 6e 2c | ll;.}.$data.=.json_decode($json, |
caca0 | 20 74 72 75 65 29 3b 0a 69 66 20 28 6e 75 6c 6c 20 3d 3d 3d 20 24 64 61 74 61 20 26 26 20 4a 53 | .true);.if.(null.===.$data.&&.JS |
cacc0 | 4f 4e 5f 45 52 52 4f 52 5f 4e 4f 4e 45 20 21 3d 3d 20 6a 73 6f 6e 5f 6c 61 73 74 5f 65 72 72 6f | ON_ERROR_NONE.!==.json_last_erro |
cace0 | 72 28 29 29 20 7b 0a 73 65 6c 66 3a 3a 76 61 6c 69 64 61 74 65 53 79 6e 74 61 78 28 24 6a 73 6f | r()).{.self::validateSyntax($jso |
cad00 | 6e 2c 20 24 66 69 6c 65 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 64 61 74 61 3b 0a 7d 0a 0a 0a | n,.$file);.}..return.$data;.}... |
cad20 | 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e | .......protected.static.function |
cad40 | 20 76 61 6c 69 64 61 74 65 53 79 6e 74 61 78 28 73 74 72 69 6e 67 20 24 6a 73 6f 6e 2c 20 3f 73 | .validateSyntax(string.$json,.?s |
cad60 | 74 72 69 6e 67 20 24 66 69 6c 65 20 3d 20 6e 75 6c 6c 29 3a 20 62 6f 6f 6c 0a 7b 0a 24 70 61 72 | tring.$file.=.null):.bool.{.$par |
cad80 | 73 65 72 20 3d 20 6e 65 77 20 4a 73 6f 6e 50 61 72 73 65 72 28 29 3b 0a 24 72 65 73 75 6c 74 20 | ser.=.new.JsonParser();.$result. |
cada0 | 3d 20 24 70 61 72 73 65 72 2d 3e 6c 69 6e 74 28 24 6a 73 6f 6e 29 3b 0a 69 66 20 28 6e 75 6c 6c | =.$parser->lint($json);.if.(null |
cadc0 | 20 3d 3d 3d 20 24 72 65 73 75 6c 74 29 20 7b 0a 69 66 20 28 64 65 66 69 6e 65 64 28 27 4a 53 4f | .===.$result).{.if.(defined('JSO |
cade0 | 4e 5f 45 52 52 4f 52 5f 55 54 46 38 27 29 20 26 26 20 4a 53 4f 4e 5f 45 52 52 4f 52 5f 55 54 46 | N_ERROR_UTF8').&&.JSON_ERROR_UTF |
cae00 | 38 20 3d 3d 3d 20 6a 73 6f 6e 5f 6c 61 73 74 5f 65 72 72 6f 72 28 29 29 20 7b 0a 74 68 72 6f 77 | 8.===.json_last_error()).{.throw |
cae20 | 20 6e 65 77 20 5c 55 6e 65 78 70 65 63 74 65 64 56 61 6c 75 65 45 78 63 65 70 74 69 6f 6e 28 27 | .new.\UnexpectedValueException(' |
cae40 | 22 27 2e 24 66 69 6c 65 2e 27 22 20 69 73 20 6e 6f 74 20 55 54 46 2d 38 2c 20 63 6f 75 6c 64 20 | "'.$file.'".is.not.UTF-8,.could. |
cae60 | 6e 6f 74 20 70 61 72 73 65 20 61 73 20 4a 53 4f 4e 27 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 74 | not.parse.as.JSON');.}..return.t |
cae80 | 72 75 65 3b 0a 7d 0a 0a 74 68 72 6f 77 20 6e 65 77 20 50 61 72 73 69 6e 67 45 78 63 65 70 74 69 | rue;.}..throw.new.ParsingExcepti |
caea0 | 6f 6e 28 27 22 27 2e 24 66 69 6c 65 2e 27 22 20 64 6f 65 73 20 6e 6f 74 20 63 6f 6e 74 61 69 6e | on('"'.$file.'".does.not.contain |
caec0 | 20 76 61 6c 69 64 20 4a 53 4f 4e 27 2e 22 5c 6e 22 2e 24 72 65 73 75 6c 74 2d 3e 67 65 74 4d 65 | .valid.JSON'."\n".$result->getMe |
caee0 | 73 73 61 67 65 28 29 2c 20 24 72 65 73 75 6c 74 2d 3e 67 65 74 44 65 74 61 69 6c 73 28 29 29 3b | ssage(),.$result->getDetails()); |
caf00 | 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d | .}.}.<?php.declare(strict_types= |
caf20 | 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 | 1);............namespace.Compose |
caf40 | 72 5c 4a 73 6f 6e 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 63 72 65 5c 50 72 65 67 3b | r\Json;..use.Composer\Pcre\Preg; |
caf60 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 4a 73 6f 6e 46 6f 72 6d 61 74 74 65 72 0a | ............class.JsonFormatter. |
caf80 | 7b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 | {...........public.static.functi |
cafa0 | 6f 6e 20 66 6f 72 6d 61 74 28 73 74 72 69 6e 67 20 24 6a 73 6f 6e 2c 20 62 6f 6f 6c 20 24 75 6e | on.format(string.$json,.bool.$un |
cafc0 | 65 73 63 61 70 65 55 6e 69 63 6f 64 65 2c 20 62 6f 6f 6c 20 24 75 6e 65 73 63 61 70 65 53 6c 61 | escapeUnicode,.bool.$unescapeSla |
cafe0 | 73 68 65 73 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 24 72 65 73 75 6c 74 20 3d 20 27 27 3b 0a 24 70 | shes):.string.{.$result.=.'';.$p |
cb000 | 6f 73 20 3d 20 30 3b 0a 24 73 74 72 4c 65 6e 20 3d 20 73 74 72 6c 65 6e 28 24 6a 73 6f 6e 29 3b | os.=.0;.$strLen.=.strlen($json); |
cb020 | 0a 24 69 6e 64 65 6e 74 53 74 72 20 3d 20 27 20 20 20 20 27 3b 0a 24 6e 65 77 4c 69 6e 65 20 3d | .$indentStr.=.'....';.$newLine.= |
cb040 | 20 22 5c 6e 22 3b 0a 24 6f 75 74 4f 66 51 75 6f 74 65 73 20 3d 20 74 72 75 65 3b 0a 24 62 75 66 | ."\n";.$outOfQuotes.=.true;.$buf |
cb060 | 66 65 72 20 3d 20 27 27 3b 0a 24 6e 6f 65 73 63 61 70 65 20 3d 20 74 72 75 65 3b 0a 0a 66 6f 72 | fer.=.'';.$noescape.=.true;..for |
cb080 | 20 28 24 69 20 3d 20 30 3b 20 24 69 20 3c 20 24 73 74 72 4c 65 6e 3b 20 24 69 2b 2b 29 20 7b 0a | .($i.=.0;.$i.<.$strLen;.$i++).{. |
cb0a0 | 0a 24 63 68 61 72 20 3d 20 73 75 62 73 74 72 28 24 6a 73 6f 6e 2c 20 24 69 2c 20 31 29 3b 0a 0a | .$char.=.substr($json,.$i,.1);.. |
cb0c0 | 0a 69 66 20 28 27 22 27 20 3d 3d 3d 20 24 63 68 61 72 20 26 26 20 24 6e 6f 65 73 63 61 70 65 29 | .if.('"'.===.$char.&&.$noescape) |
cb0e0 | 20 7b 0a 24 6f 75 74 4f 66 51 75 6f 74 65 73 20 3d 20 21 24 6f 75 74 4f 66 51 75 6f 74 65 73 3b | .{.$outOfQuotes.=.!$outOfQuotes; |
cb100 | 0a 7d 0a 0a 69 66 20 28 21 24 6f 75 74 4f 66 51 75 6f 74 65 73 29 20 7b 0a 24 62 75 66 66 65 72 | .}..if.(!$outOfQuotes).{.$buffer |
cb120 | 20 2e 3d 20 24 63 68 61 72 3b 0a 24 6e 6f 65 73 63 61 70 65 20 3d 20 27 5c 5c 27 20 3d 3d 3d 20 | ..=.$char;.$noescape.=.'\\'.===. |
cb140 | 24 63 68 61 72 20 3f 20 21 24 6e 6f 65 73 63 61 70 65 20 3a 20 74 72 75 65 3b 0a 63 6f 6e 74 69 | $char.?.!$noescape.:.true;.conti |
cb160 | 6e 75 65 3b 0a 7d 0a 69 66 20 28 27 27 20 21 3d 3d 20 24 62 75 66 66 65 72 29 20 7b 0a 69 66 20 | nue;.}.if.(''.!==.$buffer).{.if. |
cb180 | 28 24 75 6e 65 73 63 61 70 65 53 6c 61 73 68 65 73 29 20 7b 0a 24 62 75 66 66 65 72 20 3d 20 73 | ($unescapeSlashes).{.$buffer.=.s |
cb1a0 | 74 72 5f 72 65 70 6c 61 63 65 28 27 5c 5c 2f 27 2c 20 27 2f 27 2c 20 24 62 75 66 66 65 72 29 3b | tr_replace('\\/',.'/',.$buffer); |
cb1c0 | 0a 7d 0a 0a 69 66 20 28 24 75 6e 65 73 63 61 70 65 55 6e 69 63 6f 64 65 20 26 26 20 66 75 6e 63 | .}..if.($unescapeUnicode.&&.func |
cb1e0 | 74 69 6f 6e 5f 65 78 69 73 74 73 28 27 6d 62 5f 63 6f 6e 76 65 72 74 5f 65 6e 63 6f 64 69 6e 67 | tion_exists('mb_convert_encoding |
cb200 | 27 29 29 20 7b 0a 0a 24 62 75 66 66 65 72 20 3d 20 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 43 61 | ')).{..$buffer.=.Preg::replaceCa |
cb220 | 6c 6c 62 61 63 6b 28 27 2f 28 5c 5c 5c 5c 2b 29 75 28 5b 30 2d 39 61 2d 66 5d 7b 34 7d 29 2f 69 | llback('/(\\\\+)u([0-9a-f]{4})/i |
cb240 | 27 2c 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 6d 61 74 63 68 29 20 7b 0a 24 6c | ',.static.function.($match).{.$l |
cb260 | 20 3d 20 73 74 72 6c 65 6e 28 24 6d 61 74 63 68 5b 31 5d 29 3b 0a 0a 69 66 20 28 24 6c 20 25 20 | .=.strlen($match[1]);..if.($l.%. |
cb280 | 32 29 20 7b 0a 24 63 6f 64 65 20 3d 20 68 65 78 64 65 63 28 24 6d 61 74 63 68 5b 32 5d 29 3b 0a | 2).{.$code.=.hexdec($match[2]);. |
cb2a0 | 0a 0a 69 66 20 28 30 78 44 38 30 30 20 3c 3d 20 24 63 6f 64 65 20 26 26 20 30 78 44 46 46 46 20 | ..if.(0xD800.<=.$code.&&.0xDFFF. |
cb2c0 | 3e 3d 20 24 63 6f 64 65 29 20 7b 0a 72 65 74 75 72 6e 20 24 6d 61 74 63 68 5b 30 5d 3b 0a 7d 0a | >=.$code).{.return.$match[0];.}. |
cb2e0 | 0a 72 65 74 75 72 6e 20 73 74 72 5f 72 65 70 65 61 74 28 27 5c 5c 27 2c 20 24 6c 20 2d 20 31 29 | .return.str_repeat('\\',.$l.-.1) |
cb300 | 20 2e 20 6d 62 5f 63 6f 6e 76 65 72 74 5f 65 6e 63 6f 64 69 6e 67 28 0a 70 61 63 6b 28 27 48 2a | ...mb_convert_encoding(.pack('H* |
cb320 | 27 2c 20 24 6d 61 74 63 68 5b 32 5d 29 2c 0a 27 55 54 46 2d 38 27 2c 0a 27 55 43 53 2d 32 42 45 | ',.$match[2]),.'UTF-8',.'UCS-2BE |
cb340 | 27 0a 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 6d 61 74 63 68 5b 30 5d 3b 0a 7d 2c 20 24 62 75 | '.);.}..return.$match[0];.},.$bu |
cb360 | 66 66 65 72 29 3b 0a 7d 0a 0a 24 72 65 73 75 6c 74 20 2e 3d 20 24 62 75 66 66 65 72 2e 24 63 68 | ffer);.}..$result..=.$buffer.$ch |
cb380 | 61 72 3b 0a 24 62 75 66 66 65 72 20 3d 20 27 27 3b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 69 | ar;.$buffer.=.'';.continue;.}..i |
cb3a0 | 66 20 28 27 3a 27 20 3d 3d 3d 20 24 63 68 61 72 29 20 7b 0a 0a 24 63 68 61 72 20 2e 3d 20 27 20 | f.(':'.===.$char).{..$char..=.'. |
cb3c0 | 27 3b 0a 7d 20 65 6c 73 65 69 66 20 28 27 7d 27 20 3d 3d 3d 20 24 63 68 61 72 20 7c 7c 20 27 5d | ';.}.elseif.('}'.===.$char.||.'] |
cb3e0 | 27 20 3d 3d 3d 20 24 63 68 61 72 29 20 7b 0a 24 70 6f 73 2d 2d 3b 0a 24 70 72 65 76 43 68 61 72 | '.===.$char).{.$pos--;.$prevChar |
cb400 | 20 3d 20 73 75 62 73 74 72 28 24 6a 73 6f 6e 2c 20 24 69 20 2d 20 31 2c 20 31 29 3b 0a 0a 69 66 | .=.substr($json,.$i.-.1,.1);..if |
cb420 | 20 28 27 7b 27 20 21 3d 3d 20 24 70 72 65 76 43 68 61 72 20 26 26 20 27 5b 27 20 21 3d 3d 20 24 | .('{'.!==.$prevChar.&&.'['.!==.$ |
cb440 | 70 72 65 76 43 68 61 72 29 20 7b 0a 0a 0a 24 72 65 73 75 6c 74 20 2e 3d 20 24 6e 65 77 4c 69 6e | prevChar).{...$result..=.$newLin |
cb460 | 65 3b 0a 24 72 65 73 75 6c 74 20 2e 3d 20 73 74 72 5f 72 65 70 65 61 74 28 24 69 6e 64 65 6e 74 | e;.$result..=.str_repeat($indent |
cb480 | 53 74 72 2c 20 24 70 6f 73 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 0a 24 72 65 73 75 6c 74 20 3d 20 | Str,.$pos);.}.else.{..$result.=. |
cb4a0 | 72 74 72 69 6d 28 24 72 65 73 75 6c 74 29 3b 0a 7d 0a 7d 0a 0a 24 72 65 73 75 6c 74 20 2e 3d 20 | rtrim($result);.}.}..$result..=. |
cb4c0 | 24 63 68 61 72 3b 0a 0a 0a 0a 69 66 20 28 27 2c 27 20 3d 3d 3d 20 24 63 68 61 72 20 7c 7c 20 27 | $char;....if.(','.===.$char.||.' |
cb4e0 | 7b 27 20 3d 3d 3d 20 24 63 68 61 72 20 7c 7c 20 27 5b 27 20 3d 3d 3d 20 24 63 68 61 72 29 20 7b | {'.===.$char.||.'['.===.$char).{ |
cb500 | 0a 24 72 65 73 75 6c 74 20 2e 3d 20 24 6e 65 77 4c 69 6e 65 3b 0a 0a 69 66 20 28 27 7b 27 20 3d | .$result..=.$newLine;..if.('{'.= |
cb520 | 3d 3d 20 24 63 68 61 72 20 7c 7c 20 27 5b 27 20 3d 3d 3d 20 24 63 68 61 72 29 20 7b 0a 24 70 6f | ==.$char.||.'['.===.$char).{.$po |
cb540 | 73 2b 2b 3b 0a 7d 0a 0a 24 72 65 73 75 6c 74 20 2e 3d 20 73 74 72 5f 72 65 70 65 61 74 28 24 69 | s++;.}..$result..=.str_repeat($i |
cb560 | 6e 64 65 6e 74 53 74 72 2c 20 24 70 6f 73 29 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 72 65 | ndentStr,.$pos);.}.}..return.$re |
cb580 | 73 75 6c 74 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 | sult;.}.}.<?php.declare(strict_t |
cb5a0 | 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f | ypes=1);............namespace.Co |
cb5c0 | 6d 70 6f 73 65 72 5c 4a 73 6f 6e 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 63 72 65 5c | mposer\Json;..use.Composer\Pcre\ |
cb5e0 | 50 72 65 67 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 50 6c | Preg;.use.Composer\Repository\Pl |
cb600 | 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 3b 0a 0a 0a 0a 0a 63 6c 61 73 73 20 4a 73 6f 6e | atformRepository;.....class.Json |
cb620 | 4d 61 6e 69 70 75 6c 61 74 6f 72 0a 7b 0a 0a 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 24 44 | Manipulator.{..private.static.$D |
cb640 | 45 46 49 4e 45 53 20 3d 20 27 28 3f 28 44 45 46 49 4e 45 29 0a 20 20 20 20 20 20 20 28 3f 3c 6e | EFINES.=.'(?(DEFINE)........(?<n |
cb660 | 75 6d 62 65 72 3e 20 20 20 20 2d 3f 20 28 3f 3d 20 5b 31 2d 39 5d 7c 30 28 3f 21 5c 64 29 20 29 | umber>....-?.(?=.[1-9]|0(?!\d).) |
cb680 | 20 5c 64 2b 2b 20 28 5c 2e 5c 64 2b 2b 29 3f 20 28 5b 65 45 5d 20 5b 2b 2d 5d 3f 2b 20 5c 64 2b | .\d++.(\.\d++)?.([eE].[+-]?+.\d+ |
cb6a0 | 2b 29 3f 20 29 0a 20 20 20 20 20 20 20 28 3f 3c 62 6f 6f 6c 65 61 6e 3e 20 20 20 74 72 75 65 20 | +)?.)........(?<boolean>...true. |
cb6c0 | 7c 20 66 61 6c 73 65 20 7c 20 6e 75 6c 6c 20 29 0a 20 20 20 20 20 20 20 28 3f 3c 73 74 72 69 6e | |.false.|.null.)........(?<strin |
cb6e0 | 67 3e 20 20 20 20 22 20 28 5b 5e 22 5c 5c 5c 5c 5d 2a 2b 20 7c 20 5c 5c 5c 5c 20 5b 22 5c 5c 5c | g>....".([^"\\\\]*+.|.\\\\.["\\\ |
cb700 | 5c 62 66 6e 72 74 5c 2f 5d 20 7c 20 5c 5c 5c 5c 20 75 20 5b 30 2d 39 41 2d 46 61 2d 66 5d 7b 34 | \bfnrt\/].|.\\\\.u.[0-9A-Fa-f]{4 |
cb720 | 7d 20 29 2a 20 22 20 29 0a 20 20 20 20 20 20 20 28 3f 3c 61 72 72 61 79 3e 20 20 20 20 20 5c 5b | }.)*.".)........(?<array>.....\[ |
cb740 | 20 20 28 3f 3a 20 20 28 3f 26 6a 73 6f 6e 29 20 5c 73 2a 2b 20 28 3f 3a 20 2c 20 28 3f 26 6a 73 | ..(?:..(?&json).\s*+.(?:.,.(?&js |
cb760 | 6f 6e 29 20 5c 73 2a 2b 20 29 2a 2b 20 20 29 3f 2b 20 20 5c 73 2a 2b 20 5c 5d 20 29 0a 20 20 20 | on).\s*+.)*+..)?+..\s*+.\].).... |
cb780 | 20 20 20 20 28 3f 3c 70 61 69 72 3e 20 20 20 20 20 20 5c 73 2a 2b 20 28 3f 26 73 74 72 69 6e 67 | ....(?<pair>......\s*+.(?&string |
cb7a0 | 29 20 5c 73 2a 2b 20 3a 20 28 3f 26 6a 73 6f 6e 29 20 5c 73 2a 2b 20 29 0a 20 20 20 20 20 20 20 | ).\s*+.:.(?&json).\s*+.)........ |
cb7c0 | 28 3f 3c 6f 62 6a 65 63 74 3e 20 20 20 20 5c 7b 20 20 28 3f 3a 20 20 28 3f 26 70 61 69 72 29 20 | (?<object>....\{..(?:..(?&pair). |
cb7e0 | 20 28 3f 3a 20 2c 20 28 3f 26 70 61 69 72 29 20 20 29 2a 2b 20 20 29 3f 2b 20 20 5c 73 2a 2b 20 | .(?:.,.(?&pair)..)*+..)?+..\s*+. |
cb800 | 5c 7d 20 29 0a 20 20 20 20 20 20 20 28 3f 3c 6a 73 6f 6e 3e 20 20 20 20 20 20 5c 73 2a 2b 20 28 | \}.)........(?<json>......\s*+.( |
cb820 | 3f 3a 20 28 3f 26 6e 75 6d 62 65 72 29 20 7c 20 28 3f 26 62 6f 6f 6c 65 61 6e 29 20 7c 20 28 3f | ?:.(?&number).|.(?&boolean).|.(? |
cb840 | 26 73 74 72 69 6e 67 29 20 7c 20 28 3f 26 61 72 72 61 79 29 20 7c 20 28 3f 26 6f 62 6a 65 63 74 | &string).|.(?&array).|.(?&object |
cb860 | 29 20 29 20 29 0a 20 20 20 20 29 27 3b 0a 0a 0a 70 72 69 76 61 74 65 20 24 63 6f 6e 74 65 6e 74 | ).).).....)';...private.$content |
cb880 | 73 3b 0a 0a 70 72 69 76 61 74 65 20 24 6e 65 77 6c 69 6e 65 3b 0a 0a 70 72 69 76 61 74 65 20 24 | s;..private.$newline;..private.$ |
cb8a0 | 69 6e 64 65 6e 74 3b 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 | indent;..public.function.__const |
cb8c0 | 72 75 63 74 28 73 74 72 69 6e 67 20 24 63 6f 6e 74 65 6e 74 73 29 0a 7b 0a 24 63 6f 6e 74 65 6e | ruct(string.$contents).{.$conten |
cb8e0 | 74 73 20 3d 20 74 72 69 6d 28 24 63 6f 6e 74 65 6e 74 73 29 3b 0a 69 66 20 28 24 63 6f 6e 74 65 | ts.=.trim($contents);.if.($conte |
cb900 | 6e 74 73 20 3d 3d 3d 20 27 27 29 20 7b 0a 24 63 6f 6e 74 65 6e 74 73 20 3d 20 27 7b 7d 27 3b 0a | nts.===.'').{.$contents.=.'{}';. |
cb920 | 7d 0a 69 66 20 28 21 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 23 5e 5c 7b 28 2e 2a 29 5c 7d | }.if.(!Preg::isMatch('#^\{(.*)\} |
cb940 | 24 23 73 27 2c 20 24 63 6f 6e 74 65 6e 74 73 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 | $#s',.$contents)).{.throw.new.\I |
cb960 | 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 27 54 68 65 20 6a 73 6f | nvalidArgumentException('The.jso |
cb980 | 6e 20 66 69 6c 65 20 6d 75 73 74 20 62 65 20 61 6e 20 6f 62 6a 65 63 74 20 28 7b 7d 29 27 29 3b | n.file.must.be.an.object.({})'); |
cb9a0 | 0a 7d 0a 24 74 68 69 73 2d 3e 6e 65 77 6c 69 6e 65 20 3d 20 66 61 6c 73 65 20 21 3d 3d 20 73 74 | .}.$this->newline.=.false.!==.st |
cb9c0 | 72 70 6f 73 28 24 63 6f 6e 74 65 6e 74 73 2c 20 22 5c 72 5c 6e 22 29 20 3f 20 22 5c 72 5c 6e 22 | rpos($contents,."\r\n").?."\r\n" |
cb9e0 | 20 3a 20 22 5c 6e 22 3b 0a 24 74 68 69 73 2d 3e 63 6f 6e 74 65 6e 74 73 20 3d 20 24 63 6f 6e 74 | .:."\n";.$this->contents.=.$cont |
cba00 | 65 6e 74 73 20 3d 3d 3d 20 27 7b 7d 27 20 3f 20 27 7b 27 20 2e 20 24 74 68 69 73 2d 3e 6e 65 77 | ents.===.'{}'.?.'{'...$this->new |
cba20 | 6c 69 6e 65 20 2e 20 27 7d 27 20 3a 20 24 63 6f 6e 74 65 6e 74 73 3b 0a 24 74 68 69 73 2d 3e 64 | line...'}'.:.$contents;.$this->d |
cba40 | 65 74 65 63 74 49 6e 64 65 6e 74 69 6e 67 28 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 | etectIndenting();.}..public.func |
cba60 | 74 69 6f 6e 20 67 65 74 43 6f 6e 74 65 6e 74 73 28 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 65 74 | tion.getContents():.string.{.ret |
cba80 | 75 72 6e 20 24 74 68 69 73 2d 3e 63 6f 6e 74 65 6e 74 73 20 2e 20 24 74 68 69 73 2d 3e 6e 65 77 | urn.$this->contents...$this->new |
cbaa0 | 6c 69 6e 65 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 61 64 64 4c 69 6e 6b | line;.}..public.function.addLink |
cbac0 | 28 73 74 72 69 6e 67 20 24 74 79 70 65 2c 20 73 74 72 69 6e 67 20 24 70 61 63 6b 61 67 65 2c 20 | (string.$type,.string.$package,. |
cbae0 | 73 74 72 69 6e 67 20 24 63 6f 6e 73 74 72 61 69 6e 74 2c 20 62 6f 6f 6c 20 24 73 6f 72 74 50 61 | string.$constraint,.bool.$sortPa |
cbb00 | 63 6b 61 67 65 73 20 3d 20 66 61 6c 73 65 29 3a 20 62 6f 6f 6c 0a 7b 0a 24 64 65 63 6f 64 65 64 | ckages.=.false):.bool.{.$decoded |
cbb20 | 20 3d 20 4a 73 6f 6e 46 69 6c 65 3a 3a 70 61 72 73 65 4a 73 6f 6e 28 24 74 68 69 73 2d 3e 63 6f | .=.JsonFile::parseJson($this->co |
cbb40 | 6e 74 65 6e 74 73 29 3b 0a 0a 0a 69 66 20 28 21 69 73 73 65 74 28 24 64 65 63 6f 64 65 64 5b 24 | ntents);...if.(!isset($decoded[$ |
cbb60 | 74 79 70 65 5d 29 29 20 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 61 64 64 4d 61 69 6e 4b | type])).{.return.$this->addMainK |
cbb80 | 65 79 28 24 74 79 70 65 2c 20 5b 24 70 61 63 6b 61 67 65 20 3d 3e 20 24 63 6f 6e 73 74 72 61 69 | ey($type,.[$package.=>.$constrai |
cbba0 | 6e 74 5d 29 3b 0a 7d 0a 0a 24 72 65 67 65 78 20 3d 20 27 7b 27 2e 73 65 6c 66 3a 3a 24 44 45 46 | nt]);.}..$regex.=.'{'.self::$DEF |
cbbc0 | 49 4e 45 53 2e 27 5e 28 3f 50 3c 73 74 61 72 74 3e 5c 73 2a 5c 7b 5c 73 2a 28 3f 3a 28 3f 26 73 | INES.'^(?P<start>\s*\{\s*(?:(?&s |
cbbe0 | 74 72 69 6e 67 29 5c 73 2a 3a 5c 73 2a 28 3f 26 6a 73 6f 6e 29 5c 73 2a 2c 5c 73 2a 29 2a 3f 29 | tring)\s*:\s*(?&json)\s*,\s*)*?) |
cbc00 | 27 2e 0a 27 28 3f 50 3c 70 72 6f 70 65 72 74 79 3e 27 2e 70 72 65 67 5f 71 75 6f 74 65 28 4a 73 | '..'(?P<property>'.preg_quote(Js |
cbc20 | 6f 6e 46 69 6c 65 3a 3a 65 6e 63 6f 64 65 28 24 74 79 70 65 29 29 2e 27 5c 73 2a 3a 5c 73 2a 29 | onFile::encode($type)).'\s*:\s*) |
cbc40 | 28 3f 50 3c 76 61 6c 75 65 3e 28 3f 26 6a 73 6f 6e 29 29 28 3f 50 3c 65 6e 64 3e 2e 2a 29 7d 73 | (?P<value>(?&json))(?P<end>.*)}s |
cbc60 | 78 27 3b 0a 69 66 20 28 21 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 24 72 65 67 65 78 2c 20 24 | x';.if.(!Preg::isMatch($regex,.$ |
cbc80 | 74 68 69 73 2d 3e 63 6f 6e 74 65 6e 74 73 2c 20 24 6d 61 74 63 68 65 73 29 29 20 7b 0a 72 65 74 | this->contents,.$matches)).{.ret |
cbca0 | 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 24 6c 69 6e 6b 73 20 3d 20 24 6d 61 74 63 68 65 73 5b | urn.false;.}..$links.=.$matches[ |
cbcc0 | 27 76 61 6c 75 65 27 5d 3b 0a 0a 0a 24 70 61 63 6b 61 67 65 52 65 67 65 78 20 3d 20 73 74 72 5f | 'value'];...$packageRegex.=.str_ |
cbce0 | 72 65 70 6c 61 63 65 28 27 2f 27 2c 20 27 5c 5c 5c 5c 3f 2f 27 2c 20 70 72 65 67 5f 71 75 6f 74 | replace('/',.'\\\\?/',.preg_quot |
cbd00 | 65 28 24 70 61 63 6b 61 67 65 29 29 3b 0a 24 72 65 67 65 78 20 3d 20 27 7b 27 2e 73 65 6c 66 3a | e($package));.$regex.=.'{'.self: |
cbd20 | 3a 24 44 45 46 49 4e 45 53 2e 27 22 28 3f 50 3c 70 61 63 6b 61 67 65 3e 27 2e 24 70 61 63 6b 61 | :$DEFINES.'"(?P<package>'.$packa |
cbd40 | 67 65 52 65 67 65 78 2e 27 29 22 28 5c 73 2a 3a 5c 73 2a 29 28 3f 26 73 74 72 69 6e 67 29 7d 69 | geRegex.')"(\s*:\s*)(?&string)}i |
cbd60 | 78 27 3b 0a 69 66 20 28 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 24 72 65 67 65 78 2c 20 24 6c | x';.if.(Preg::isMatch($regex,.$l |
cbd80 | 69 6e 6b 73 2c 20 24 70 61 63 6b 61 67 65 4d 61 74 63 68 65 73 29 29 20 7b 0a 0a 24 65 78 69 73 | inks,.$packageMatches)).{..$exis |
cbda0 | 74 69 6e 67 50 61 63 6b 61 67 65 20 3d 20 24 70 61 63 6b 61 67 65 4d 61 74 63 68 65 73 5b 27 70 | tingPackage.=.$packageMatches['p |
cbdc0 | 61 63 6b 61 67 65 27 5d 3b 0a 24 70 61 63 6b 61 67 65 52 65 67 65 78 20 3d 20 73 74 72 5f 72 65 | ackage'];.$packageRegex.=.str_re |
cbde0 | 70 6c 61 63 65 28 27 2f 27 2c 20 27 5c 5c 5c 5c 3f 2f 27 2c 20 70 72 65 67 5f 71 75 6f 74 65 28 | place('/',.'\\\\?/',.preg_quote( |
cbe00 | 24 65 78 69 73 74 69 6e 67 50 61 63 6b 61 67 65 29 29 3b 0a 24 6c 69 6e 6b 73 20 3d 20 50 72 65 | $existingPackage));.$links.=.Pre |
cbe20 | 67 3a 3a 72 65 70 6c 61 63 65 43 61 6c 6c 62 61 63 6b 28 27 7b 27 2e 73 65 6c 66 3a 3a 24 44 45 | g::replaceCallback('{'.self::$DE |
cbe40 | 46 49 4e 45 53 2e 27 22 27 2e 24 70 61 63 6b 61 67 65 52 65 67 65 78 2e 27 22 28 3f 50 3c 73 65 | FINES.'"'.$packageRegex.'"(?P<se |
cbe60 | 70 61 72 61 74 6f 72 3e 5c 73 2a 3a 5c 73 2a 29 28 3f 26 73 74 72 69 6e 67 29 7d 69 78 27 2c 20 | parator>\s*:\s*)(?&string)}ix',. |
cbe80 | 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 6d 29 20 75 73 65 20 28 24 65 78 69 73 74 | static.function.($m).use.($exist |
cbea0 | 69 6e 67 50 61 63 6b 61 67 65 2c 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 3a 20 73 74 72 69 6e 67 | ingPackage,.$constraint):.string |
cbec0 | 20 7b 0a 72 65 74 75 72 6e 20 4a 73 6f 6e 46 69 6c 65 3a 3a 65 6e 63 6f 64 65 28 73 74 72 5f 72 | .{.return.JsonFile::encode(str_r |
cbee0 | 65 70 6c 61 63 65 28 27 5c 5c 2f 27 2c 20 27 2f 27 2c 20 24 65 78 69 73 74 69 6e 67 50 61 63 6b | eplace('\\/',.'/',.$existingPack |
cbf00 | 61 67 65 29 29 20 2e 20 24 6d 5b 27 73 65 70 61 72 61 74 6f 72 27 5d 20 2e 20 27 22 27 20 2e 20 | age))...$m['separator']...'"'... |
cbf20 | 24 63 6f 6e 73 74 72 61 69 6e 74 20 2e 20 27 22 27 3b 0a 7d 2c 20 24 6c 69 6e 6b 73 29 3b 0a 7d | $constraint...'"';.},.$links);.} |
cbf40 | 20 65 6c 73 65 20 7b 0a 69 66 20 28 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 23 5e 5c 73 2a | .else.{.if.(Preg::isMatch('#^\s* |
cbf60 | 5c 7b 5c 73 2a 5c 53 2b 2e 2a 3f 28 5c 73 2a 5c 7d 5c 73 2a 29 24 23 73 27 2c 20 24 6c 69 6e 6b | \{\s*\S+.*?(\s*\}\s*)$#s',.$link |
cbf80 | 73 2c 20 24 6d 61 74 63 68 29 29 20 7b 0a 0a 24 6c 69 6e 6b 73 20 3d 20 50 72 65 67 3a 3a 72 65 | s,.$match)).{..$links.=.Preg::re |
cbfa0 | 70 6c 61 63 65 28 0a 27 7b 27 2e 70 72 65 67 5f 71 75 6f 74 65 28 24 6d 61 74 63 68 5b 31 5d 29 | place(.'{'.preg_quote($match[1]) |
cbfc0 | 2e 27 24 7d 27 2c 0a 0a 61 64 64 63 73 6c 61 73 68 65 73 28 27 2c 27 20 2e 20 24 74 68 69 73 2d | .'$}',..addcslashes(','...$this- |
cbfe0 | 3e 6e 65 77 6c 69 6e 65 20 2e 20 24 74 68 69 73 2d 3e 69 6e 64 65 6e 74 20 2e 20 24 74 68 69 73 | >newline...$this->indent...$this |
cc000 | 2d 3e 69 6e 64 65 6e 74 20 2e 20 4a 73 6f 6e 46 69 6c 65 3a 3a 65 6e 63 6f 64 65 28 24 70 61 63 | ->indent...JsonFile::encode($pac |
cc020 | 6b 61 67 65 29 2e 27 3a 20 27 2e 4a 73 6f 6e 46 69 6c 65 3a 3a 65 6e 63 6f 64 65 28 24 63 6f 6e | kage).':.'.JsonFile::encode($con |
cc040 | 73 74 72 61 69 6e 74 29 20 2e 20 24 6d 61 74 63 68 5b 31 5d 2c 20 27 5c 5c 24 27 29 2c 0a 24 6c | straint)...$match[1],.'\\$'),.$l |
cc060 | 69 6e 6b 73 0a 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 0a 24 6c 69 6e 6b 73 20 3d 20 27 7b 27 20 2e | inks.);.}.else.{..$links.=.'{'.. |
cc080 | 20 24 74 68 69 73 2d 3e 6e 65 77 6c 69 6e 65 20 2e 0a 24 74 68 69 73 2d 3e 69 6e 64 65 6e 74 20 | .$this->newline...$this->indent. |
cc0a0 | 2e 20 24 74 68 69 73 2d 3e 69 6e 64 65 6e 74 20 2e 20 4a 73 6f 6e 46 69 6c 65 3a 3a 65 6e 63 6f | ..$this->indent...JsonFile::enco |
cc0c0 | 64 65 28 24 70 61 63 6b 61 67 65 29 2e 27 3a 20 27 2e 4a 73 6f 6e 46 69 6c 65 3a 3a 65 6e 63 6f | de($package).':.'.JsonFile::enco |
cc0e0 | 64 65 28 24 63 6f 6e 73 74 72 61 69 6e 74 29 20 2e 20 24 74 68 69 73 2d 3e 6e 65 77 6c 69 6e 65 | de($constraint)...$this->newline |
cc100 | 20 2e 0a 24 74 68 69 73 2d 3e 69 6e 64 65 6e 74 20 2e 20 27 7d 27 3b 0a 7d 0a 7d 0a 0a 69 66 20 | ...$this->indent...'}';.}.}..if. |
cc120 | 28 74 72 75 65 20 3d 3d 3d 20 24 73 6f 72 74 50 61 63 6b 61 67 65 73 29 20 7b 0a 24 72 65 71 75 | (true.===.$sortPackages).{.$requ |
cc140 | 69 72 65 6d 65 6e 74 73 20 3d 20 6a 73 6f 6e 5f 64 65 63 6f 64 65 28 24 6c 69 6e 6b 73 2c 20 74 | irements.=.json_decode($links,.t |
cc160 | 72 75 65 29 3b 0a 24 74 68 69 73 2d 3e 73 6f 72 74 50 61 63 6b 61 67 65 73 28 24 72 65 71 75 69 | rue);.$this->sortPackages($requi |
cc180 | 72 65 6d 65 6e 74 73 29 3b 0a 24 6c 69 6e 6b 73 20 3d 20 24 74 68 69 73 2d 3e 66 6f 72 6d 61 74 | rements);.$links.=.$this->format |
cc1a0 | 28 24 72 65 71 75 69 72 65 6d 65 6e 74 73 29 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 63 6f 6e 74 65 | ($requirements);.}..$this->conte |
cc1c0 | 6e 74 73 20 3d 20 24 6d 61 74 63 68 65 73 5b 27 73 74 61 72 74 27 5d 20 2e 20 24 6d 61 74 63 68 | nts.=.$matches['start']...$match |
cc1e0 | 65 73 5b 27 70 72 6f 70 65 72 74 79 27 5d 20 2e 20 24 6c 69 6e 6b 73 20 2e 20 24 6d 61 74 63 68 | es['property']...$links...$match |
cc200 | 65 73 5b 27 65 6e 64 27 5d 3b 0a 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 0a 0a 0a 0a 0a | es['end'];..return.true;.}...... |
cc220 | 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 73 6f 72 74 50 61 63 6b 61 67 65 73 | ...private.function.sortPackages |
cc240 | 28 61 72 72 61 79 20 26 24 70 61 63 6b 61 67 65 73 20 3d 20 5b 5d 29 3a 20 76 6f 69 64 0a 7b 0a | (array.&$packages.=.[]):.void.{. |
cc260 | 24 70 72 65 66 69 78 20 3d 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 72 65 71 75 | $prefix.=.static.function.($requ |
cc280 | 69 72 65 6d 65 6e 74 29 3a 20 73 74 72 69 6e 67 20 7b 0a 69 66 20 28 50 6c 61 74 66 6f 72 6d 52 | irement):.string.{.if.(PlatformR |
cc2a0 | 65 70 6f 73 69 74 6f 72 79 3a 3a 69 73 50 6c 61 74 66 6f 72 6d 50 61 63 6b 61 67 65 28 24 72 65 | epository::isPlatformPackage($re |
cc2c0 | 71 75 69 72 65 6d 65 6e 74 29 29 20 7b 0a 72 65 74 75 72 6e 20 50 72 65 67 3a 3a 72 65 70 6c 61 | quirement)).{.return.Preg::repla |
cc2e0 | 63 65 28 0a 5b 0a 27 2f 5e 70 68 70 2f 27 2c 0a 27 2f 5e 68 68 76 6d 2f 27 2c 0a 27 2f 5e 65 78 | ce(.[.'/^php/',.'/^hhvm/',.'/^ex |
cc300 | 74 2f 27 2c 0a 27 2f 5e 6c 69 62 2f 27 2c 0a 27 2f 5e 5c 44 2f 27 2c 0a 5d 2c 0a 5b 0a 27 30 2d | t/',.'/^lib/',.'/^\D/',.],.[.'0- |
cc320 | 24 30 27 2c 0a 27 31 2d 24 30 27 2c 0a 27 32 2d 24 30 27 2c 0a 27 33 2d 24 30 27 2c 0a 27 34 2d | $0',.'1-$0',.'2-$0',.'3-$0',.'4- |
cc340 | 24 30 27 2c 0a 5d 2c 0a 24 72 65 71 75 69 72 65 6d 65 6e 74 0a 29 3b 0a 7d 0a 0a 72 65 74 75 72 | $0',.],.$requirement.);.}..retur |
cc360 | 6e 20 27 35 2d 27 2e 24 72 65 71 75 69 72 65 6d 65 6e 74 3b 0a 7d 3b 0a 0a 75 6b 73 6f 72 74 28 | n.'5-'.$requirement;.};..uksort( |
cc380 | 24 70 61 63 6b 61 67 65 73 2c 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 61 2c 20 | $packages,.static.function.($a,. |
cc3a0 | 24 62 29 20 75 73 65 20 28 24 70 72 65 66 69 78 29 3a 20 69 6e 74 20 7b 0a 72 65 74 75 72 6e 20 | $b).use.($prefix):.int.{.return. |
cc3c0 | 73 74 72 6e 61 74 63 6d 70 28 24 70 72 65 66 69 78 28 24 61 29 2c 20 24 70 72 65 66 69 78 28 24 | strnatcmp($prefix($a),.$prefix($ |
cc3e0 | 62 29 29 3b 0a 7d 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 61 | b));.});.}.....public.function.a |
cc400 | 64 64 52 65 70 6f 73 69 74 6f 72 79 28 73 74 72 69 6e 67 20 24 6e 61 6d 65 2c 20 24 63 6f 6e 66 | ddRepository(string.$name,.$conf |
cc420 | 69 67 2c 20 62 6f 6f 6c 20 24 61 70 70 65 6e 64 20 3d 20 74 72 75 65 29 3a 20 62 6f 6f 6c 0a 7b | ig,.bool.$append.=.true):.bool.{ |
cc440 | 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 61 64 64 53 75 62 4e 6f 64 65 28 27 72 65 70 6f 73 | .return.$this->addSubNode('repos |
cc460 | 69 74 6f 72 69 65 73 27 2c 20 24 6e 61 6d 65 2c 20 24 63 6f 6e 66 69 67 2c 20 24 61 70 70 65 6e | itories',.$name,.$config,.$appen |
cc480 | 64 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 72 65 6d 6f 76 65 52 65 70 | d);.}..public.function.removeRep |
cc4a0 | 6f 73 69 74 6f 72 79 28 73 74 72 69 6e 67 20 24 6e 61 6d 65 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 65 | ository(string.$name):.bool.{.re |
cc4c0 | 74 75 72 6e 20 24 74 68 69 73 2d 3e 72 65 6d 6f 76 65 53 75 62 4e 6f 64 65 28 27 72 65 70 6f 73 | turn.$this->removeSubNode('repos |
cc4e0 | 69 74 6f 72 69 65 73 27 2c 20 24 6e 61 6d 65 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 | itories',.$name);.}.....public.f |
cc500 | 75 6e 63 74 69 6f 6e 20 61 64 64 43 6f 6e 66 69 67 53 65 74 74 69 6e 67 28 73 74 72 69 6e 67 20 | unction.addConfigSetting(string. |
cc520 | 24 6e 61 6d 65 2c 20 24 76 61 6c 75 65 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 24 74 | $name,.$value):.bool.{.return.$t |
cc540 | 68 69 73 2d 3e 61 64 64 53 75 62 4e 6f 64 65 28 27 63 6f 6e 66 69 67 27 2c 20 24 6e 61 6d 65 2c | his->addSubNode('config',.$name, |
cc560 | 20 24 76 61 6c 75 65 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 72 65 6d | .$value);.}..public.function.rem |
cc580 | 6f 76 65 43 6f 6e 66 69 67 53 65 74 74 69 6e 67 28 73 74 72 69 6e 67 20 24 6e 61 6d 65 29 3a 20 | oveConfigSetting(string.$name):. |
cc5a0 | 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 72 65 6d 6f 76 65 53 75 62 4e 6f | bool.{.return.$this->removeSubNo |
cc5c0 | 64 65 28 27 63 6f 6e 66 69 67 27 2c 20 24 6e 61 6d 65 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 | de('config',.$name);.}.....publi |
cc5e0 | 63 20 66 75 6e 63 74 69 6f 6e 20 61 64 64 50 72 6f 70 65 72 74 79 28 73 74 72 69 6e 67 20 24 6e | c.function.addProperty(string.$n |
cc600 | 61 6d 65 2c 20 24 76 61 6c 75 65 29 3a 20 62 6f 6f 6c 0a 7b 0a 69 66 20 28 73 74 72 70 6f 73 28 | ame,.$value):.bool.{.if.(strpos( |
cc620 | 24 6e 61 6d 65 2c 20 27 73 75 67 67 65 73 74 2e 27 29 20 3d 3d 3d 20 30 29 20 7b 0a 72 65 74 75 | $name,.'suggest.').===.0).{.retu |
cc640 | 72 6e 20 24 74 68 69 73 2d 3e 61 64 64 53 75 62 4e 6f 64 65 28 27 73 75 67 67 65 73 74 27 2c 20 | rn.$this->addSubNode('suggest',. |
cc660 | 73 75 62 73 74 72 28 24 6e 61 6d 65 2c 20 38 29 2c 20 24 76 61 6c 75 65 29 3b 0a 7d 0a 0a 69 66 | substr($name,.8),.$value);.}..if |
cc680 | 20 28 73 74 72 70 6f 73 28 24 6e 61 6d 65 2c 20 27 65 78 74 72 61 2e 27 29 20 3d 3d 3d 20 30 29 | .(strpos($name,.'extra.').===.0) |
cc6a0 | 20 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 61 64 64 53 75 62 4e 6f 64 65 28 27 65 78 74 | .{.return.$this->addSubNode('ext |
cc6c0 | 72 61 27 2c 20 73 75 62 73 74 72 28 24 6e 61 6d 65 2c 20 36 29 2c 20 24 76 61 6c 75 65 29 3b 0a | ra',.substr($name,.6),.$value);. |
cc6e0 | 7d 0a 0a 69 66 20 28 73 74 72 70 6f 73 28 24 6e 61 6d 65 2c 20 27 73 63 72 69 70 74 73 2e 27 29 | }..if.(strpos($name,.'scripts.') |
cc700 | 20 3d 3d 3d 20 30 29 20 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 61 64 64 53 75 62 4e 6f | .===.0).{.return.$this->addSubNo |
cc720 | 64 65 28 27 73 63 72 69 70 74 73 27 2c 20 73 75 62 73 74 72 28 24 6e 61 6d 65 2c 20 38 29 2c 20 | de('scripts',.substr($name,.8),. |
cc740 | 24 76 61 6c 75 65 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 61 64 64 4d 61 69 | $value);.}..return.$this->addMai |
cc760 | 6e 4b 65 79 28 24 6e 61 6d 65 2c 20 24 76 61 6c 75 65 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 | nKey($name,.$value);.}..public.f |
cc780 | 75 6e 63 74 69 6f 6e 20 72 65 6d 6f 76 65 50 72 6f 70 65 72 74 79 28 73 74 72 69 6e 67 20 24 6e | unction.removeProperty(string.$n |
cc7a0 | 61 6d 65 29 3a 20 62 6f 6f 6c 0a 7b 0a 69 66 20 28 73 74 72 70 6f 73 28 24 6e 61 6d 65 2c 20 27 | ame):.bool.{.if.(strpos($name,.' |
cc7c0 | 73 75 67 67 65 73 74 2e 27 29 20 3d 3d 3d 20 30 29 20 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 | suggest.').===.0).{.return.$this |
cc7e0 | 2d 3e 72 65 6d 6f 76 65 53 75 62 4e 6f 64 65 28 27 73 75 67 67 65 73 74 27 2c 20 73 75 62 73 74 | ->removeSubNode('suggest',.subst |
cc800 | 72 28 24 6e 61 6d 65 2c 20 38 29 29 3b 0a 7d 0a 0a 69 66 20 28 73 74 72 70 6f 73 28 24 6e 61 6d | r($name,.8));.}..if.(strpos($nam |
cc820 | 65 2c 20 27 65 78 74 72 61 2e 27 29 20 3d 3d 3d 20 30 29 20 7b 0a 72 65 74 75 72 6e 20 24 74 68 | e,.'extra.').===.0).{.return.$th |
cc840 | 69 73 2d 3e 72 65 6d 6f 76 65 53 75 62 4e 6f 64 65 28 27 65 78 74 72 61 27 2c 20 73 75 62 73 74 | is->removeSubNode('extra',.subst |
cc860 | 72 28 24 6e 61 6d 65 2c 20 36 29 29 3b 0a 7d 0a 0a 69 66 20 28 73 74 72 70 6f 73 28 24 6e 61 6d | r($name,.6));.}..if.(strpos($nam |
cc880 | 65 2c 20 27 73 63 72 69 70 74 73 2e 27 29 20 3d 3d 3d 20 30 29 20 7b 0a 72 65 74 75 72 6e 20 24 | e,.'scripts.').===.0).{.return.$ |
cc8a0 | 74 68 69 73 2d 3e 72 65 6d 6f 76 65 53 75 62 4e 6f 64 65 28 27 73 63 72 69 70 74 73 27 2c 20 73 | this->removeSubNode('scripts',.s |
cc8c0 | 75 62 73 74 72 28 24 6e 61 6d 65 2c 20 38 29 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 | ubstr($name,.8));.}..return.$thi |
cc8e0 | 73 2d 3e 72 65 6d 6f 76 65 4d 61 69 6e 4b 65 79 28 24 6e 61 6d 65 29 3b 0a 7d 0a 0a 0a 0a 0a 70 | s->removeMainKey($name);.}.....p |
cc900 | 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 61 64 64 53 75 62 4e 6f 64 65 28 73 74 72 69 6e 67 | ublic.function.addSubNode(string |
cc920 | 20 24 6d 61 69 6e 4e 6f 64 65 2c 20 73 74 72 69 6e 67 20 24 6e 61 6d 65 2c 20 24 76 61 6c 75 65 | .$mainNode,.string.$name,.$value |
cc940 | 2c 20 62 6f 6f 6c 20 24 61 70 70 65 6e 64 20 3d 20 74 72 75 65 29 3a 20 62 6f 6f 6c 0a 7b 0a 24 | ,.bool.$append.=.true):.bool.{.$ |
cc960 | 64 65 63 6f 64 65 64 20 3d 20 4a 73 6f 6e 46 69 6c 65 3a 3a 70 61 72 73 65 4a 73 6f 6e 28 24 74 | decoded.=.JsonFile::parseJson($t |
cc980 | 68 69 73 2d 3e 63 6f 6e 74 65 6e 74 73 29 3b 0a 0a 24 73 75 62 4e 61 6d 65 20 3d 20 6e 75 6c 6c | his->contents);..$subName.=.null |
cc9a0 | 3b 0a 69 66 20 28 69 6e 5f 61 72 72 61 79 28 24 6d 61 69 6e 4e 6f 64 65 2c 20 5b 27 63 6f 6e 66 | ;.if.(in_array($mainNode,.['conf |
cc9c0 | 69 67 27 2c 20 27 65 78 74 72 61 27 2c 20 27 73 63 72 69 70 74 73 27 5d 29 20 26 26 20 66 61 6c | ig',.'extra',.'scripts']).&&.fal |
cc9e0 | 73 65 20 21 3d 3d 20 73 74 72 70 6f 73 28 24 6e 61 6d 65 2c 20 27 2e 27 29 29 20 7b 0a 5b 24 6e | se.!==.strpos($name,.'.')).{.[$n |
cca00 | 61 6d 65 2c 20 24 73 75 62 4e 61 6d 65 5d 20 3d 20 65 78 70 6c 6f 64 65 28 27 2e 27 2c 20 24 6e | ame,.$subName].=.explode('.',.$n |
cca20 | 61 6d 65 2c 20 32 29 3b 0a 7d 0a 0a 0a 69 66 20 28 21 69 73 73 65 74 28 24 64 65 63 6f 64 65 64 | ame,.2);.}...if.(!isset($decoded |
cca40 | 5b 24 6d 61 69 6e 4e 6f 64 65 5d 29 29 20 7b 0a 69 66 20 28 24 73 75 62 4e 61 6d 65 20 21 3d 3d | [$mainNode])).{.if.($subName.!== |
cca60 | 20 6e 75 6c 6c 29 20 7b 0a 24 74 68 69 73 2d 3e 61 64 64 4d 61 69 6e 4b 65 79 28 24 6d 61 69 6e | .null).{.$this->addMainKey($main |
cca80 | 4e 6f 64 65 2c 20 5b 24 6e 61 6d 65 20 3d 3e 20 5b 24 73 75 62 4e 61 6d 65 20 3d 3e 20 24 76 61 | Node,.[$name.=>.[$subName.=>.$va |
ccaa0 | 6c 75 65 5d 5d 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 74 68 69 73 2d 3e 61 64 64 4d 61 69 6e 4b | lue]]);.}.else.{.$this->addMainK |
ccac0 | 65 79 28 24 6d 61 69 6e 4e 6f 64 65 2c 20 5b 24 6e 61 6d 65 20 3d 3e 20 24 76 61 6c 75 65 5d 29 | ey($mainNode,.[$name.=>.$value]) |
ccae0 | 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 0a 0a 24 6e 6f 64 65 52 65 67 65 78 | ;.}..return.true;.}...$nodeRegex |
ccb00 | 20 3d 20 27 7b 27 2e 73 65 6c 66 3a 3a 24 44 45 46 49 4e 45 53 2e 27 5e 28 3f 50 3c 73 74 61 72 | .=.'{'.self::$DEFINES.'^(?P<star |
ccb20 | 74 3e 20 5c 73 2a 20 5c 7b 20 5c 73 2a 20 28 3f 3a 20 28 3f 26 73 74 72 69 6e 67 29 20 5c 73 2a | t>.\s*.\{.\s*.(?:.(?&string).\s* |
ccb40 | 20 3a 20 28 3f 26 6a 73 6f 6e 29 20 5c 73 2a 20 2c 20 5c 73 2a 20 29 2a 3f 27 2e 0a 70 72 65 67 | .:.(?&json).\s*.,.\s*.)*?'..preg |
ccb60 | 5f 71 75 6f 74 65 28 4a 73 6f 6e 46 69 6c 65 3a 3a 65 6e 63 6f 64 65 28 24 6d 61 69 6e 4e 6f 64 | _quote(JsonFile::encode($mainNod |
ccb80 | 65 29 29 2e 27 5c 73 2a 3a 5c 73 2a 29 28 3f 50 3c 63 6f 6e 74 65 6e 74 3e 28 3f 26 6f 62 6a 65 | e)).'\s*:\s*)(?P<content>(?&obje |
ccba0 | 63 74 29 29 28 3f 50 3c 65 6e 64 3e 2e 2a 29 7d 73 78 27 3b 0a 0a 74 72 79 20 7b 0a 69 66 20 28 | ct))(?P<end>.*)}sx';..try.{.if.( |
ccbc0 | 21 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 24 6e 6f 64 65 52 65 67 65 78 2c 20 24 74 68 69 73 | !Preg::isMatch($nodeRegex,.$this |
ccbe0 | 2d 3e 63 6f 6e 74 65 6e 74 73 2c 20 24 6d 61 74 63 68 29 29 20 7b 0a 72 65 74 75 72 6e 20 66 61 | ->contents,.$match)).{.return.fa |
ccc00 | 6c 73 65 3b 0a 7d 0a 7d 20 63 61 74 63 68 20 28 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f | lse;.}.}.catch.(\RuntimeExceptio |
ccc20 | 6e 20 24 65 29 20 7b 0a 69 66 20 28 24 65 2d 3e 67 65 74 43 6f 64 65 28 29 20 3d 3d 3d 20 50 52 | n.$e).{.if.($e->getCode().===.PR |
ccc40 | 45 47 5f 42 41 43 4b 54 52 41 43 4b 5f 4c 49 4d 49 54 5f 45 52 52 4f 52 29 20 7b 0a 72 65 74 75 | EG_BACKTRACK_LIMIT_ERROR).{.retu |
ccc60 | 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 74 68 72 6f 77 20 24 65 3b 0a 7d 0a 0a 24 63 68 69 6c 64 72 | rn.false;.}.throw.$e;.}..$childr |
ccc80 | 65 6e 20 3d 20 24 6d 61 74 63 68 5b 27 63 6f 6e 74 65 6e 74 27 5d 3b 0a 0a 69 66 20 28 21 40 6a | en.=.$match['content'];..if.(!@j |
ccca0 | 73 6f 6e 5f 64 65 63 6f 64 65 28 24 63 68 69 6c 64 72 65 6e 29 29 20 7b 0a 72 65 74 75 72 6e 20 | son_decode($children)).{.return. |
cccc0 | 66 61 6c 73 65 3b 0a 7d 0a 0a 0a 24 63 68 69 6c 64 52 65 67 65 78 20 3d 20 27 7b 27 2e 73 65 6c | false;.}...$childRegex.=.'{'.sel |
ccce0 | 66 3a 3a 24 44 45 46 49 4e 45 53 2e 27 28 3f 50 3c 73 74 61 72 74 3e 22 27 2e 70 72 65 67 5f 71 | f::$DEFINES.'(?P<start>"'.preg_q |
ccd00 | 75 6f 74 65 28 24 6e 61 6d 65 29 2e 27 22 5c 73 2a 3a 5c 73 2a 29 28 3f 50 3c 63 6f 6e 74 65 6e | uote($name).'"\s*:\s*)(?P<conten |
ccd20 | 74 3e 28 3f 26 6a 73 6f 6e 29 29 28 3f 50 3c 65 6e 64 3e 2c 3f 29 7d 78 27 3b 0a 69 66 20 28 50 | t>(?&json))(?P<end>,?)}x';.if.(P |
ccd40 | 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 24 63 68 69 6c 64 52 65 67 65 78 2c 20 24 63 68 69 6c 64 | reg::isMatch($childRegex,.$child |
ccd60 | 72 65 6e 2c 20 24 6d 61 74 63 68 65 73 29 29 20 7b 0a 24 63 68 69 6c 64 72 65 6e 20 3d 20 50 72 | ren,.$matches)).{.$children.=.Pr |
ccd80 | 65 67 3a 3a 72 65 70 6c 61 63 65 43 61 6c 6c 62 61 63 6b 28 24 63 68 69 6c 64 52 65 67 65 78 2c | eg::replaceCallback($childRegex, |
ccda0 | 20 66 75 6e 63 74 69 6f 6e 20 28 24 6d 61 74 63 68 65 73 29 20 75 73 65 20 28 24 73 75 62 4e 61 | .function.($matches).use.($subNa |
ccdc0 | 6d 65 2c 20 24 76 61 6c 75 65 29 3a 20 73 74 72 69 6e 67 20 7b 0a 69 66 20 28 24 73 75 62 4e 61 | me,.$value):.string.{.if.($subNa |
ccde0 | 6d 65 20 21 3d 3d 20 6e 75 6c 6c 29 20 7b 0a 24 63 75 72 56 61 6c 20 3d 20 6a 73 6f 6e 5f 64 65 | me.!==.null).{.$curVal.=.json_de |
cce00 | 63 6f 64 65 28 24 6d 61 74 63 68 65 73 5b 27 63 6f 6e 74 65 6e 74 27 5d 2c 20 74 72 75 65 29 3b | code($matches['content'],.true); |
cce20 | 0a 69 66 20 28 21 69 73 5f 61 72 72 61 79 28 24 63 75 72 56 61 6c 29 29 20 7b 0a 24 63 75 72 56 | .if.(!is_array($curVal)).{.$curV |
cce40 | 61 6c 20 3d 20 5b 5d 3b 0a 7d 0a 24 63 75 72 56 61 6c 5b 24 73 75 62 4e 61 6d 65 5d 20 3d 20 24 | al.=.[];.}.$curVal[$subName].=.$ |
cce60 | 76 61 6c 75 65 3b 0a 24 76 61 6c 75 65 20 3d 20 24 63 75 72 56 61 6c 3b 0a 7d 0a 0a 72 65 74 75 | value;.$value.=.$curVal;.}..retu |
cce80 | 72 6e 20 24 6d 61 74 63 68 65 73 5b 27 73 74 61 72 74 27 5d 20 2e 20 24 74 68 69 73 2d 3e 66 6f | rn.$matches['start']...$this->fo |
ccea0 | 72 6d 61 74 28 24 76 61 6c 75 65 2c 20 31 29 20 2e 20 24 6d 61 74 63 68 65 73 5b 27 65 6e 64 27 | rmat($value,.1)...$matches['end' |
ccec0 | 5d 3b 0a 7d 2c 20 24 63 68 69 6c 64 72 65 6e 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 50 72 65 67 3a | ];.},.$children);.}.else.{.Preg: |
ccee0 | 3a 6d 61 74 63 68 28 27 23 5e 7b 20 28 3f 50 3c 6c 65 61 64 69 6e 67 73 70 61 63 65 3e 5c 73 2a | :match('#^{.(?P<leadingspace>\s* |
ccf00 | 3f 29 20 28 3f 50 3c 63 6f 6e 74 65 6e 74 3e 5c 53 2b 2e 2a 3f 29 3f 20 28 3f 50 3c 74 72 61 69 | ?).(?P<content>\S+.*?)?.(?P<trai |
ccf20 | 6c 69 6e 67 73 70 61 63 65 3e 5c 73 2a 29 20 7d 24 23 73 78 27 2c 20 24 63 68 69 6c 64 72 65 6e | lingspace>\s*).}$#sx',.$children |
ccf40 | 2c 20 24 6d 61 74 63 68 29 3b 0a 0a 24 77 68 69 74 65 73 70 61 63 65 20 3d 20 27 27 3b 0a 69 66 | ,.$match);..$whitespace.=.'';.if |
ccf60 | 20 28 21 65 6d 70 74 79 28 24 6d 61 74 63 68 5b 27 74 72 61 69 6c 69 6e 67 73 70 61 63 65 27 5d | .(!empty($match['trailingspace'] |
ccf80 | 29 29 20 7b 0a 24 77 68 69 74 65 73 70 61 63 65 20 3d 20 24 6d 61 74 63 68 5b 27 74 72 61 69 6c | )).{.$whitespace.=.$match['trail |
ccfa0 | 69 6e 67 73 70 61 63 65 27 5d 3b 0a 7d 0a 0a 69 66 20 28 21 65 6d 70 74 79 28 24 6d 61 74 63 68 | ingspace'];.}..if.(!empty($match |
ccfc0 | 5b 27 63 6f 6e 74 65 6e 74 27 5d 29 29 20 7b 0a 69 66 20 28 24 73 75 62 4e 61 6d 65 20 21 3d 3d | ['content'])).{.if.($subName.!== |
ccfe0 | 20 6e 75 6c 6c 29 20 7b 0a 24 76 61 6c 75 65 20 3d 20 5b 24 73 75 62 4e 61 6d 65 20 3d 3e 20 24 | .null).{.$value.=.[$subName.=>.$ |
cd000 | 76 61 6c 75 65 5d 3b 0a 7d 0a 0a 0a 69 66 20 28 24 61 70 70 65 6e 64 29 20 7b 0a 24 63 68 69 6c | value];.}...if.($append).{.$chil |
cd020 | 64 72 65 6e 20 3d 20 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 28 0a 27 23 27 2e 24 77 68 69 74 65 | dren.=.Preg::replace(.'#'.$white |
cd040 | 73 70 61 63 65 2e 27 7d 24 23 27 2c 0a 61 64 64 63 73 6c 61 73 68 65 73 28 27 2c 27 20 2e 20 24 | space.'}$#',.addcslashes(','...$ |
cd060 | 74 68 69 73 2d 3e 6e 65 77 6c 69 6e 65 20 2e 20 24 74 68 69 73 2d 3e 69 6e 64 65 6e 74 20 2e 20 | this->newline...$this->indent... |
cd080 | 24 74 68 69 73 2d 3e 69 6e 64 65 6e 74 20 2e 20 4a 73 6f 6e 46 69 6c 65 3a 3a 65 6e 63 6f 64 65 | $this->indent...JsonFile::encode |
cd0a0 | 28 24 6e 61 6d 65 29 2e 27 3a 20 27 2e 24 74 68 69 73 2d 3e 66 6f 72 6d 61 74 28 24 76 61 6c 75 | ($name).':.'.$this->format($valu |
cd0c0 | 65 2c 20 31 29 20 2e 20 24 77 68 69 74 65 73 70 61 63 65 20 2e 20 27 7d 27 2c 20 27 5c 5c 24 27 | e,.1)...$whitespace...'}',.'\\$' |
cd0e0 | 29 2c 0a 24 63 68 69 6c 64 72 65 6e 0a 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 77 68 69 74 65 73 | ),.$children.);.}.else.{.$whites |
cd100 | 70 61 63 65 20 3d 20 27 27 3b 0a 69 66 20 28 21 65 6d 70 74 79 28 24 6d 61 74 63 68 5b 27 6c 65 | pace.=.'';.if.(!empty($match['le |
cd120 | 61 64 69 6e 67 73 70 61 63 65 27 5d 29 29 20 7b 0a 24 77 68 69 74 65 73 70 61 63 65 20 3d 20 24 | adingspace'])).{.$whitespace.=.$ |
cd140 | 6d 61 74 63 68 5b 27 6c 65 61 64 69 6e 67 73 70 61 63 65 27 5d 3b 0a 7d 0a 0a 24 63 68 69 6c 64 | match['leadingspace'];.}..$child |
cd160 | 72 65 6e 20 3d 20 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 28 0a 27 23 5e 7b 27 2e 24 77 68 69 74 | ren.=.Preg::replace(.'#^{'.$whit |
cd180 | 65 73 70 61 63 65 2e 27 23 27 2c 0a 61 64 64 63 73 6c 61 73 68 65 73 28 27 7b 27 20 2e 20 24 77 | espace.'#',.addcslashes('{'...$w |
cd1a0 | 68 69 74 65 73 70 61 63 65 20 2e 20 4a 73 6f 6e 46 69 6c 65 3a 3a 65 6e 63 6f 64 65 28 24 6e 61 | hitespace...JsonFile::encode($na |
cd1c0 | 6d 65 29 2e 27 3a 20 27 2e 24 74 68 69 73 2d 3e 66 6f 72 6d 61 74 28 24 76 61 6c 75 65 2c 20 31 | me).':.'.$this->format($value,.1 |
cd1e0 | 29 20 2e 20 27 2c 27 20 2e 20 24 74 68 69 73 2d 3e 6e 65 77 6c 69 6e 65 20 2e 20 24 74 68 69 73 | )...','...$this->newline...$this |
cd200 | 2d 3e 69 6e 64 65 6e 74 20 2e 20 24 74 68 69 73 2d 3e 69 6e 64 65 6e 74 2c 20 27 5c 5c 24 27 29 | ->indent...$this->indent,.'\\$') |
cd220 | 2c 0a 24 63 68 69 6c 64 72 65 6e 0a 29 3b 0a 7d 0a 7d 20 65 6c 73 65 20 7b 0a 69 66 20 28 24 73 | ,.$children.);.}.}.else.{.if.($s |
cd240 | 75 62 4e 61 6d 65 20 21 3d 3d 20 6e 75 6c 6c 29 20 7b 0a 24 76 61 6c 75 65 20 3d 20 5b 24 73 75 | ubName.!==.null).{.$value.=.[$su |
cd260 | 62 4e 61 6d 65 20 3d 3e 20 24 76 61 6c 75 65 5d 3b 0a 7d 0a 0a 0a 24 63 68 69 6c 64 72 65 6e 20 | bName.=>.$value];.}...$children. |
cd280 | 3d 20 27 7b 27 20 2e 20 24 74 68 69 73 2d 3e 6e 65 77 6c 69 6e 65 20 2e 20 24 74 68 69 73 2d 3e | =.'{'...$this->newline...$this-> |
cd2a0 | 69 6e 64 65 6e 74 20 2e 20 24 74 68 69 73 2d 3e 69 6e 64 65 6e 74 20 2e 20 4a 73 6f 6e 46 69 6c | indent...$this->indent...JsonFil |
cd2c0 | 65 3a 3a 65 6e 63 6f 64 65 28 24 6e 61 6d 65 29 2e 27 3a 20 27 2e 24 74 68 69 73 2d 3e 66 6f 72 | e::encode($name).':.'.$this->for |
cd2e0 | 6d 61 74 28 24 76 61 6c 75 65 2c 20 31 29 20 2e 20 24 77 68 69 74 65 73 70 61 63 65 20 2e 20 27 | mat($value,.1)...$whitespace...' |
cd300 | 7d 27 3b 0a 7d 0a 7d 0a 0a 24 74 68 69 73 2d 3e 63 6f 6e 74 65 6e 74 73 20 3d 20 50 72 65 67 3a | }';.}.}..$this->contents.=.Preg: |
cd320 | 3a 72 65 70 6c 61 63 65 43 61 6c 6c 62 61 63 6b 28 24 6e 6f 64 65 52 65 67 65 78 2c 20 73 74 61 | :replaceCallback($nodeRegex,.sta |
cd340 | 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 6d 29 20 75 73 65 20 28 24 63 68 69 6c 64 72 65 6e | tic.function.($m).use.($children |
cd360 | 29 3a 20 73 74 72 69 6e 67 20 7b 0a 72 65 74 75 72 6e 20 24 6d 5b 27 73 74 61 72 74 27 5d 20 2e | ):.string.{.return.$m['start'].. |
cd380 | 20 24 63 68 69 6c 64 72 65 6e 20 2e 20 24 6d 5b 27 65 6e 64 27 5d 3b 0a 7d 2c 20 24 74 68 69 73 | .$children...$m['end'];.},.$this |
cd3a0 | 2d 3e 63 6f 6e 74 65 6e 74 73 29 3b 0a 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 0a 70 75 | ->contents);..return.true;.}..pu |
cd3c0 | 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 72 65 6d 6f 76 65 53 75 62 4e 6f 64 65 28 73 74 72 69 | blic.function.removeSubNode(stri |
cd3e0 | 6e 67 20 24 6d 61 69 6e 4e 6f 64 65 2c 20 73 74 72 69 6e 67 20 24 6e 61 6d 65 29 3a 20 62 6f 6f | ng.$mainNode,.string.$name):.boo |
cd400 | 6c 0a 7b 0a 24 64 65 63 6f 64 65 64 20 3d 20 4a 73 6f 6e 46 69 6c 65 3a 3a 70 61 72 73 65 4a 73 | l.{.$decoded.=.JsonFile::parseJs |
cd420 | 6f 6e 28 24 74 68 69 73 2d 3e 63 6f 6e 74 65 6e 74 73 29 3b 0a 0a 0a 69 66 20 28 65 6d 70 74 79 | on($this->contents);...if.(empty |
cd440 | 28 24 64 65 63 6f 64 65 64 5b 24 6d 61 69 6e 4e 6f 64 65 5d 29 29 20 7b 0a 72 65 74 75 72 6e 20 | ($decoded[$mainNode])).{.return. |
cd460 | 74 72 75 65 3b 0a 7d 0a 0a 0a 24 6e 6f 64 65 52 65 67 65 78 20 3d 20 27 7b 27 2e 73 65 6c 66 3a | true;.}...$nodeRegex.=.'{'.self: |
cd480 | 3a 24 44 45 46 49 4e 45 53 2e 27 5e 28 3f 50 3c 73 74 61 72 74 3e 20 5c 73 2a 20 5c 7b 20 5c 73 | :$DEFINES.'^(?P<start>.\s*.\{.\s |
cd4a0 | 2a 20 28 3f 3a 20 28 3f 26 73 74 72 69 6e 67 29 20 5c 73 2a 20 3a 20 28 3f 26 6a 73 6f 6e 29 20 | *.(?:.(?&string).\s*.:.(?&json). |
cd4c0 | 5c 73 2a 20 2c 20 5c 73 2a 20 29 2a 3f 27 2e 0a 70 72 65 67 5f 71 75 6f 74 65 28 4a 73 6f 6e 46 | \s*.,.\s*.)*?'..preg_quote(JsonF |
cd4e0 | 69 6c 65 3a 3a 65 6e 63 6f 64 65 28 24 6d 61 69 6e 4e 6f 64 65 29 29 2e 27 5c 73 2a 3a 5c 73 2a | ile::encode($mainNode)).'\s*:\s* |
cd500 | 29 28 3f 50 3c 63 6f 6e 74 65 6e 74 3e 28 3f 26 6f 62 6a 65 63 74 29 29 28 3f 50 3c 65 6e 64 3e | )(?P<content>(?&object))(?P<end> |
cd520 | 2e 2a 29 7d 73 78 27 3b 0a 74 72 79 20 7b 0a 69 66 20 28 21 50 72 65 67 3a 3a 69 73 4d 61 74 63 | .*)}sx';.try.{.if.(!Preg::isMatc |
cd540 | 68 28 24 6e 6f 64 65 52 65 67 65 78 2c 20 24 74 68 69 73 2d 3e 63 6f 6e 74 65 6e 74 73 2c 20 24 | h($nodeRegex,.$this->contents,.$ |
cd560 | 6d 61 74 63 68 29 29 20 7b 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 7d 20 63 61 74 63 | match)).{.return.false;.}.}.catc |
cd580 | 68 20 28 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 69 66 20 28 24 | h.(\RuntimeException.$e).{.if.($ |
cd5a0 | 65 2d 3e 67 65 74 43 6f 64 65 28 29 20 3d 3d 3d 20 50 52 45 47 5f 42 41 43 4b 54 52 41 43 4b 5f | e->getCode().===.PREG_BACKTRACK_ |
cd5c0 | 4c 49 4d 49 54 5f 45 52 52 4f 52 29 20 7b 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 74 | LIMIT_ERROR).{.return.false;.}.t |
cd5e0 | 68 72 6f 77 20 24 65 3b 0a 7d 0a 0a 24 63 68 69 6c 64 72 65 6e 20 3d 20 24 6d 61 74 63 68 5b 27 | hrow.$e;.}..$children.=.$match[' |
cd600 | 63 6f 6e 74 65 6e 74 27 5d 3b 0a 0a 0a 69 66 20 28 21 40 6a 73 6f 6e 5f 64 65 63 6f 64 65 28 24 | content'];...if.(!@json_decode($ |
cd620 | 63 68 69 6c 64 72 65 6e 2c 20 74 72 75 65 29 29 20 7b 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b | children,.true)).{.return.false; |
cd640 | 0a 7d 0a 0a 24 73 75 62 4e 61 6d 65 20 3d 20 6e 75 6c 6c 3b 0a 69 66 20 28 69 6e 5f 61 72 72 61 | .}..$subName.=.null;.if.(in_arra |
cd660 | 79 28 24 6d 61 69 6e 4e 6f 64 65 2c 20 5b 27 63 6f 6e 66 69 67 27 2c 20 27 65 78 74 72 61 27 2c | y($mainNode,.['config',.'extra', |
cd680 | 20 27 73 63 72 69 70 74 73 27 5d 29 20 26 26 20 66 61 6c 73 65 20 21 3d 3d 20 73 74 72 70 6f 73 | .'scripts']).&&.false.!==.strpos |
cd6a0 | 28 24 6e 61 6d 65 2c 20 27 2e 27 29 29 20 7b 0a 5b 24 6e 61 6d 65 2c 20 24 73 75 62 4e 61 6d 65 | ($name,.'.')).{.[$name,.$subName |
cd6c0 | 5d 20 3d 20 65 78 70 6c 6f 64 65 28 27 2e 27 2c 20 24 6e 61 6d 65 2c 20 32 29 3b 0a 7d 0a 0a 0a | ].=.explode('.',.$name,.2);.}... |
cd6e0 | 69 66 20 28 21 69 73 73 65 74 28 24 64 65 63 6f 64 65 64 5b 24 6d 61 69 6e 4e 6f 64 65 5d 5b 24 | if.(!isset($decoded[$mainNode][$ |
cd700 | 6e 61 6d 65 5d 29 20 7c 7c 20 28 24 73 75 62 4e 61 6d 65 20 26 26 20 21 69 73 73 65 74 28 24 64 | name]).||.($subName.&&.!isset($d |
cd720 | 65 63 6f 64 65 64 5b 24 6d 61 69 6e 4e 6f 64 65 5d 5b 24 6e 61 6d 65 5d 5b 24 73 75 62 4e 61 6d | ecoded[$mainNode][$name][$subNam |
cd740 | 65 5d 29 29 29 20 7b 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 0a 0a 24 6b 65 79 52 65 67 | e]))).{.return.true;.}...$keyReg |
cd760 | 65 78 20 3d 20 73 74 72 5f 72 65 70 6c 61 63 65 28 27 2f 27 2c 20 27 5c 5c 5c 5c 3f 2f 27 2c 20 | ex.=.str_replace('/',.'\\\\?/',. |
cd780 | 70 72 65 67 5f 71 75 6f 74 65 28 24 6e 61 6d 65 29 29 3b 0a 69 66 20 28 50 72 65 67 3a 3a 69 73 | preg_quote($name));.if.(Preg::is |
cd7a0 | 4d 61 74 63 68 28 27 7b 22 27 2e 24 6b 65 79 52 65 67 65 78 2e 27 22 5c 73 2a 3a 7d 69 27 2c 20 | Match('{"'.$keyRegex.'"\s*:}i',. |
cd7c0 | 24 63 68 69 6c 64 72 65 6e 29 29 20 7b 0a 0a 69 66 20 28 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 | $children)).{..if.(Preg::isMatch |
cd7e0 | 41 6c 6c 28 27 7b 27 2e 73 65 6c 66 3a 3a 24 44 45 46 49 4e 45 53 2e 27 22 27 2e 24 6b 65 79 52 | All('{'.self::$DEFINES.'"'.$keyR |
cd800 | 65 67 65 78 2e 27 22 5c 73 2a 3a 5c 73 2a 28 3f 3a 28 3f 26 6a 73 6f 6e 29 29 7d 78 27 2c 20 24 | egex.'"\s*:\s*(?:(?&json))}x',.$ |
cd820 | 63 68 69 6c 64 72 65 6e 2c 20 24 6d 61 74 63 68 65 73 29 29 20 7b 0a 24 62 65 73 74 4d 61 74 63 | children,.$matches)).{.$bestMatc |
cd840 | 68 20 3d 20 27 27 3b 0a 66 6f 72 65 61 63 68 20 28 24 6d 61 74 63 68 65 73 5b 30 5d 20 61 73 20 | h.=.'';.foreach.($matches[0].as. |
cd860 | 24 6d 61 74 63 68 29 20 7b 0a 69 66 20 28 73 74 72 6c 65 6e 28 24 62 65 73 74 4d 61 74 63 68 29 | $match).{.if.(strlen($bestMatch) |
cd880 | 20 3c 20 73 74 72 6c 65 6e 28 24 6d 61 74 63 68 29 29 20 7b 0a 24 62 65 73 74 4d 61 74 63 68 20 | .<.strlen($match)).{.$bestMatch. |
cd8a0 | 3d 20 24 6d 61 74 63 68 3b 0a 7d 0a 7d 0a 24 63 68 69 6c 64 72 65 6e 43 6c 65 61 6e 20 3d 20 50 | =.$match;.}.}.$childrenClean.=.P |
cd8c0 | 72 65 67 3a 3a 72 65 70 6c 61 63 65 28 27 7b 2c 5c 73 2a 27 2e 70 72 65 67 5f 71 75 6f 74 65 28 | reg::replace('{,\s*'.preg_quote( |
cd8e0 | 24 62 65 73 74 4d 61 74 63 68 29 2e 27 7d 69 27 2c 20 27 27 2c 20 24 63 68 69 6c 64 72 65 6e 2c | $bestMatch).'}i',.'',.$children, |
cd900 | 20 2d 31 2c 20 24 63 6f 75 6e 74 29 3b 0a 69 66 20 28 31 20 21 3d 3d 20 24 63 6f 75 6e 74 29 20 | .-1,.$count);.if.(1.!==.$count). |
cd920 | 7b 0a 24 63 68 69 6c 64 72 65 6e 43 6c 65 61 6e 20 3d 20 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 | {.$childrenClean.=.Preg::replace |
cd940 | 28 27 7b 27 2e 70 72 65 67 5f 71 75 6f 74 65 28 24 62 65 73 74 4d 61 74 63 68 29 2e 27 5c 73 2a | ('{'.preg_quote($bestMatch).'\s* |
cd960 | 2c 3f 5c 73 2a 7d 69 27 2c 20 27 27 2c 20 24 63 68 69 6c 64 72 65 6e 43 6c 65 61 6e 2c 20 2d 31 | ,?\s*}i',.'',.$childrenClean,.-1 |
cd980 | 2c 20 24 63 6f 75 6e 74 29 3b 0a 69 66 20 28 31 20 21 3d 3d 20 24 63 6f 75 6e 74 29 20 7b 0a 72 | ,.$count);.if.(1.!==.$count).{.r |
cd9a0 | 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 7d 0a 7d 0a 7d 20 65 6c 73 65 20 7b 0a 24 63 68 69 | eturn.false;.}.}.}.}.else.{.$chi |
cd9c0 | 6c 64 72 65 6e 43 6c 65 61 6e 20 3d 20 24 63 68 69 6c 64 72 65 6e 3b 0a 7d 0a 0a 69 66 20 28 21 | ldrenClean.=.$children;.}..if.(! |
cd9e0 | 69 73 73 65 74 28 24 63 68 69 6c 64 72 65 6e 43 6c 65 61 6e 29 29 20 7b 0a 74 68 72 6f 77 20 6e | isset($childrenClean)).{.throw.n |
cda00 | 65 77 20 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 22 4a 73 | ew.\InvalidArgumentException("Js |
cda20 | 6f 6e 4d 61 6e 69 70 75 6c 61 74 6f 72 3a 20 5c 24 63 68 69 6c 64 72 65 6e 43 6c 65 61 6e 20 69 | onManipulator:.\$childrenClean.i |
cda40 | 73 20 6e 6f 74 20 64 65 66 69 6e 65 64 2e 20 50 6c 65 61 73 65 20 72 65 70 6f 72 74 20 61 74 20 | s.not.defined..Please.report.at. |
cda60 | 68 74 74 70 73 3a 2f 2f 67 69 74 68 75 62 2e 63 6f 6d 2f 63 6f 6d 70 6f 73 65 72 2f 63 6f 6d 70 | https://github.com/composer/comp |
cda80 | 6f 73 65 72 2f 69 73 73 75 65 73 2f 6e 65 77 2e 22 29 3b 0a 7d 0a 0a 0a 75 6e 73 65 74 28 24 6d | oser/issues/new.");.}...unset($m |
cdaa0 | 61 74 63 68 29 3b 0a 50 72 65 67 3a 3a 6d 61 74 63 68 28 27 23 5e 7b 20 5c 73 2a 3f 20 28 3f 50 | atch);.Preg::match('#^{.\s*?.(?P |
cdac0 | 3c 63 6f 6e 74 65 6e 74 3e 5c 53 2b 2e 2a 3f 29 3f 20 28 3f 50 3c 74 72 61 69 6c 69 6e 67 73 70 | <content>\S+.*?)?.(?P<trailingsp |
cdae0 | 61 63 65 3e 5c 73 2a 29 20 7d 24 23 73 78 27 2c 20 24 63 68 69 6c 64 72 65 6e 43 6c 65 61 6e 2c | ace>\s*).}$#sx',.$childrenClean, |
cdb00 | 20 24 6d 61 74 63 68 29 3b 0a 69 66 20 28 65 6d 70 74 79 28 24 6d 61 74 63 68 5b 27 63 6f 6e 74 | .$match);.if.(empty($match['cont |
cdb20 | 65 6e 74 27 5d 29 29 20 7b 0a 24 6e 65 77 6c 69 6e 65 20 3d 20 24 74 68 69 73 2d 3e 6e 65 77 6c | ent'])).{.$newline.=.$this->newl |
cdb40 | 69 6e 65 3b 0a 24 69 6e 64 65 6e 74 20 3d 20 24 74 68 69 73 2d 3e 69 6e 64 65 6e 74 3b 0a 0a 24 | ine;.$indent.=.$this->indent;..$ |
cdb60 | 74 68 69 73 2d 3e 63 6f 6e 74 65 6e 74 73 20 3d 20 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 43 61 | this->contents.=.Preg::replaceCa |
cdb80 | 6c 6c 62 61 63 6b 28 24 6e 6f 64 65 52 65 67 65 78 2c 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 | llback($nodeRegex,.static.functi |
cdba0 | 6f 6e 20 28 24 6d 61 74 63 68 65 73 29 20 75 73 65 20 28 24 69 6e 64 65 6e 74 2c 20 24 6e 65 77 | on.($matches).use.($indent,.$new |
cdbc0 | 6c 69 6e 65 29 3a 20 73 74 72 69 6e 67 20 7b 0a 72 65 74 75 72 6e 20 24 6d 61 74 63 68 65 73 5b | line):.string.{.return.$matches[ |
cdbe0 | 27 73 74 61 72 74 27 5d 20 2e 20 27 7b 27 20 2e 20 24 6e 65 77 6c 69 6e 65 20 2e 20 24 69 6e 64 | 'start']...'{'...$newline...$ind |
cdc00 | 65 6e 74 20 2e 20 27 7d 27 20 2e 20 24 6d 61 74 63 68 65 73 5b 27 65 6e 64 27 5d 3b 0a 7d 2c 20 | ent...'}'...$matches['end'];.},. |
cdc20 | 24 74 68 69 73 2d 3e 63 6f 6e 74 65 6e 74 73 29 3b 0a 0a 0a 69 66 20 28 24 73 75 62 4e 61 6d 65 | $this->contents);...if.($subName |
cdc40 | 20 21 3d 3d 20 6e 75 6c 6c 29 20 7b 0a 24 63 75 72 56 61 6c 20 3d 20 6a 73 6f 6e 5f 64 65 63 6f | .!==.null).{.$curVal.=.json_deco |
cdc60 | 64 65 28 24 63 68 69 6c 64 72 65 6e 2c 20 74 72 75 65 29 3b 0a 75 6e 73 65 74 28 24 63 75 72 56 | de($children,.true);.unset($curV |
cdc80 | 61 6c 5b 24 6e 61 6d 65 5d 5b 24 73 75 62 4e 61 6d 65 5d 29 3b 0a 24 74 68 69 73 2d 3e 61 64 64 | al[$name][$subName]);.$this->add |
cdca0 | 53 75 62 4e 6f 64 65 28 24 6d 61 69 6e 4e 6f 64 65 2c 20 24 6e 61 6d 65 2c 20 24 63 75 72 56 61 | SubNode($mainNode,.$name,.$curVa |
cdcc0 | 6c 5b 24 6e 61 6d 65 5d 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 0a 24 74 | l[$name]);.}..return.true;.}..$t |
cdce0 | 68 69 73 2d 3e 63 6f 6e 74 65 6e 74 73 20 3d 20 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 43 61 6c | his->contents.=.Preg::replaceCal |
cdd00 | 6c 62 61 63 6b 28 24 6e 6f 64 65 52 65 67 65 78 2c 20 66 75 6e 63 74 69 6f 6e 20 28 24 6d 61 74 | lback($nodeRegex,.function.($mat |
cdd20 | 63 68 65 73 29 20 75 73 65 20 28 24 6e 61 6d 65 2c 20 24 73 75 62 4e 61 6d 65 2c 20 24 63 68 69 | ches).use.($name,.$subName,.$chi |
cdd40 | 6c 64 72 65 6e 43 6c 65 61 6e 29 3a 20 73 74 72 69 6e 67 20 7b 0a 69 66 20 28 24 73 75 62 4e 61 | ldrenClean):.string.{.if.($subNa |
cdd60 | 6d 65 20 21 3d 3d 20 6e 75 6c 6c 29 20 7b 0a 24 63 75 72 56 61 6c 20 3d 20 6a 73 6f 6e 5f 64 65 | me.!==.null).{.$curVal.=.json_de |
cdd80 | 63 6f 64 65 28 24 6d 61 74 63 68 65 73 5b 27 63 6f 6e 74 65 6e 74 27 5d 2c 20 74 72 75 65 29 3b | code($matches['content'],.true); |
cdda0 | 0a 75 6e 73 65 74 28 24 63 75 72 56 61 6c 5b 24 6e 61 6d 65 5d 5b 24 73 75 62 4e 61 6d 65 5d 29 | .unset($curVal[$name][$subName]) |
cddc0 | 3b 0a 24 63 68 69 6c 64 72 65 6e 43 6c 65 61 6e 20 3d 20 24 74 68 69 73 2d 3e 66 6f 72 6d 61 74 | ;.$childrenClean.=.$this->format |
cdde0 | 28 24 63 75 72 56 61 6c 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 6d 61 74 63 68 65 73 5b 27 73 | ($curVal);.}..return.$matches['s |
cde00 | 74 61 72 74 27 5d 20 2e 20 24 63 68 69 6c 64 72 65 6e 43 6c 65 61 6e 20 2e 20 24 6d 61 74 63 68 | tart']...$childrenClean...$match |
cde20 | 65 73 5b 27 65 6e 64 27 5d 3b 0a 7d 2c 20 24 74 68 69 73 2d 3e 63 6f 6e 74 65 6e 74 73 29 3b 0a | es['end'];.},.$this->contents);. |
cde40 | 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 | .return.true;.}.....public.funct |
cde60 | 69 6f 6e 20 61 64 64 4d 61 69 6e 4b 65 79 28 73 74 72 69 6e 67 20 24 6b 65 79 2c 20 24 63 6f 6e | ion.addMainKey(string.$key,.$con |
cde80 | 74 65 6e 74 29 3a 20 62 6f 6f 6c 0a 7b 0a 24 64 65 63 6f 64 65 64 20 3d 20 4a 73 6f 6e 46 69 6c | tent):.bool.{.$decoded.=.JsonFil |
cdea0 | 65 3a 3a 70 61 72 73 65 4a 73 6f 6e 28 24 74 68 69 73 2d 3e 63 6f 6e 74 65 6e 74 73 29 3b 0a 24 | e::parseJson($this->contents);.$ |
cdec0 | 63 6f 6e 74 65 6e 74 20 3d 20 24 74 68 69 73 2d 3e 66 6f 72 6d 61 74 28 24 63 6f 6e 74 65 6e 74 | content.=.$this->format($content |
cdee0 | 29 3b 0a 0a 0a 24 72 65 67 65 78 20 3d 20 27 7b 27 2e 73 65 6c 66 3a 3a 24 44 45 46 49 4e 45 53 | );...$regex.=.'{'.self::$DEFINES |
cdf00 | 2e 27 5e 28 3f 50 3c 73 74 61 72 74 3e 5c 73 2a 5c 7b 5c 73 2a 28 3f 3a 28 3f 26 73 74 72 69 6e | .'^(?P<start>\s*\{\s*(?:(?&strin |
cdf20 | 67 29 5c 73 2a 3a 5c 73 2a 28 3f 26 6a 73 6f 6e 29 5c 73 2a 2c 5c 73 2a 29 2a 3f 29 27 2e 0a 27 | g)\s*:\s*(?&json)\s*,\s*)*?)'..' |
cdf40 | 28 3f 50 3c 6b 65 79 3e 27 2e 70 72 65 67 5f 71 75 6f 74 65 28 4a 73 6f 6e 46 69 6c 65 3a 3a 65 | (?P<key>'.preg_quote(JsonFile::e |
cdf60 | 6e 63 6f 64 65 28 24 6b 65 79 29 29 2e 27 5c 73 2a 3a 5c 73 2a 28 3f 26 6a 73 6f 6e 29 29 28 3f | ncode($key)).'\s*:\s*(?&json))(? |
cdf80 | 50 3c 65 6e 64 3e 2e 2a 29 7d 73 78 27 3b 0a 69 66 20 28 69 73 73 65 74 28 24 64 65 63 6f 64 65 | P<end>.*)}sx';.if.(isset($decode |
cdfa0 | 64 5b 24 6b 65 79 5d 29 20 26 26 20 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 24 72 65 67 65 78 | d[$key]).&&.Preg::isMatch($regex |
cdfc0 | 2c 20 24 74 68 69 73 2d 3e 63 6f 6e 74 65 6e 74 73 2c 20 24 6d 61 74 63 68 65 73 29 29 20 7b 0a | ,.$this->contents,.$matches)).{. |
cdfe0 | 0a 69 66 20 28 21 40 6a 73 6f 6e 5f 64 65 63 6f 64 65 28 27 7b 27 2e 24 6d 61 74 63 68 65 73 5b | .if.(!@json_decode('{'.$matches[ |
ce000 | 27 6b 65 79 27 5d 2e 27 7d 27 29 29 20 7b 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a | 'key'].'}')).{.return.false;.}.. |
ce020 | 24 74 68 69 73 2d 3e 63 6f 6e 74 65 6e 74 73 20 3d 20 24 6d 61 74 63 68 65 73 5b 27 73 74 61 72 | $this->contents.=.$matches['star |
ce040 | 74 27 5d 20 2e 20 4a 73 6f 6e 46 69 6c 65 3a 3a 65 6e 63 6f 64 65 28 24 6b 65 79 29 2e 27 3a 20 | t']...JsonFile::encode($key).':. |
ce060 | 27 2e 24 63 6f 6e 74 65 6e 74 20 2e 20 24 6d 61 74 63 68 65 73 5b 27 65 6e 64 27 5d 3b 0a 0a 72 | '.$content...$matches['end'];..r |
ce080 | 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 0a 0a 69 66 20 28 50 72 65 67 3a 3a 69 73 4d 61 74 63 | eturn.true;.}...if.(Preg::isMatc |
ce0a0 | 68 28 27 23 5b 5e 7b 5c 73 5d 28 5c 73 2a 29 5c 7d 24 23 27 2c 20 24 74 68 69 73 2d 3e 63 6f 6e | h('#[^{\s](\s*)\}$#',.$this->con |
ce0c0 | 74 65 6e 74 73 2c 20 24 6d 61 74 63 68 29 29 20 7b 0a 24 74 68 69 73 2d 3e 63 6f 6e 74 65 6e 74 | tents,.$match)).{.$this->content |
ce0e0 | 73 20 3d 20 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 28 0a 27 23 27 2e 24 6d 61 74 63 68 5b 31 5d | s.=.Preg::replace(.'#'.$match[1] |
ce100 | 2e 27 5c 7d 24 23 27 2c 0a 61 64 64 63 73 6c 61 73 68 65 73 28 27 2c 27 20 2e 20 24 74 68 69 73 | .'\}$#',.addcslashes(','...$this |
ce120 | 2d 3e 6e 65 77 6c 69 6e 65 20 2e 20 24 74 68 69 73 2d 3e 69 6e 64 65 6e 74 20 2e 20 4a 73 6f 6e | ->newline...$this->indent...Json |
ce140 | 46 69 6c 65 3a 3a 65 6e 63 6f 64 65 28 24 6b 65 79 29 2e 20 27 3a 20 27 2e 20 24 63 6f 6e 74 65 | File::encode($key)..':.'..$conte |
ce160 | 6e 74 20 2e 20 24 74 68 69 73 2d 3e 6e 65 77 6c 69 6e 65 20 2e 20 27 7d 27 2c 20 27 5c 5c 24 27 | nt...$this->newline...'}',.'\\$' |
ce180 | 29 2c 0a 24 74 68 69 73 2d 3e 63 6f 6e 74 65 6e 74 73 0a 29 3b 0a 0a 72 65 74 75 72 6e 20 74 72 | ),.$this->contents.);..return.tr |
ce1a0 | 75 65 3b 0a 7d 0a 0a 0a 24 74 68 69 73 2d 3e 63 6f 6e 74 65 6e 74 73 20 3d 20 50 72 65 67 3a 3a | ue;.}...$this->contents.=.Preg:: |
ce1c0 | 72 65 70 6c 61 63 65 28 0a 27 23 5c 7d 24 23 27 2c 0a 61 64 64 63 73 6c 61 73 68 65 73 28 24 74 | replace(.'#\}$#',.addcslashes($t |
ce1e0 | 68 69 73 2d 3e 69 6e 64 65 6e 74 20 2e 20 4a 73 6f 6e 46 69 6c 65 3a 3a 65 6e 63 6f 64 65 28 24 | his->indent...JsonFile::encode($ |
ce200 | 6b 65 79 29 2e 20 27 3a 20 27 2e 24 63 6f 6e 74 65 6e 74 20 2e 20 24 74 68 69 73 2d 3e 6e 65 77 | key)..':.'.$content...$this->new |
ce220 | 6c 69 6e 65 20 2e 20 27 7d 27 2c 20 27 5c 5c 24 27 29 2c 0a 24 74 68 69 73 2d 3e 63 6f 6e 74 65 | line...'}',.'\\$'),.$this->conte |
ce240 | 6e 74 73 0a 29 3b 0a 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 | nts.);..return.true;.}..public.f |
ce260 | 75 6e 63 74 69 6f 6e 20 72 65 6d 6f 76 65 4d 61 69 6e 4b 65 79 28 73 74 72 69 6e 67 20 24 6b 65 | unction.removeMainKey(string.$ke |
ce280 | 79 29 3a 20 62 6f 6f 6c 0a 7b 0a 24 64 65 63 6f 64 65 64 20 3d 20 4a 73 6f 6e 46 69 6c 65 3a 3a | y):.bool.{.$decoded.=.JsonFile:: |
ce2a0 | 70 61 72 73 65 4a 73 6f 6e 28 24 74 68 69 73 2d 3e 63 6f 6e 74 65 6e 74 73 29 3b 0a 0a 69 66 20 | parseJson($this->contents);..if. |
ce2c0 | 28 21 61 72 72 61 79 5f 6b 65 79 5f 65 78 69 73 74 73 28 24 6b 65 79 2c 20 24 64 65 63 6f 64 65 | (!array_key_exists($key,.$decode |
ce2e0 | 64 29 29 20 7b 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 0a 0a 24 72 65 67 65 78 20 3d 20 | d)).{.return.true;.}...$regex.=. |
ce300 | 27 7b 27 2e 73 65 6c 66 3a 3a 24 44 45 46 49 4e 45 53 2e 27 5e 28 3f 50 3c 73 74 61 72 74 3e 5c | '{'.self::$DEFINES.'^(?P<start>\ |
ce320 | 73 2a 5c 7b 5c 73 2a 28 3f 3a 28 3f 26 73 74 72 69 6e 67 29 5c 73 2a 3a 5c 73 2a 28 3f 26 6a 73 | s*\{\s*(?:(?&string)\s*:\s*(?&js |
ce340 | 6f 6e 29 5c 73 2a 2c 5c 73 2a 29 2a 3f 29 27 2e 0a 27 28 3f 50 3c 72 65 6d 6f 76 61 6c 3e 27 2e | on)\s*,\s*)*?)'..'(?P<removal>'. |
ce360 | 70 72 65 67 5f 71 75 6f 74 65 28 4a 73 6f 6e 46 69 6c 65 3a 3a 65 6e 63 6f 64 65 28 24 6b 65 79 | preg_quote(JsonFile::encode($key |
ce380 | 29 29 2e 27 5c 73 2a 3a 5c 73 2a 28 3f 26 6a 73 6f 6e 29 29 5c 73 2a 2c 3f 5c 73 2a 28 3f 50 3c | )).'\s*:\s*(?&json))\s*,?\s*(?P< |
ce3a0 | 65 6e 64 3e 2e 2a 29 7d 73 78 27 3b 0a 69 66 20 28 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 24 | end>.*)}sx';.if.(Preg::isMatch($ |
ce3c0 | 72 65 67 65 78 2c 20 24 74 68 69 73 2d 3e 63 6f 6e 74 65 6e 74 73 2c 20 24 6d 61 74 63 68 65 73 | regex,.$this->contents,.$matches |
ce3e0 | 29 29 20 7b 0a 0a 69 66 20 28 21 40 6a 73 6f 6e 5f 64 65 63 6f 64 65 28 27 7b 27 2e 24 6d 61 74 | )).{..if.(!@json_decode('{'.$mat |
ce400 | 63 68 65 73 5b 27 72 65 6d 6f 76 61 6c 27 5d 2e 27 7d 27 29 29 20 7b 0a 72 65 74 75 72 6e 20 66 | ches['removal'].'}')).{.return.f |
ce420 | 61 6c 73 65 3b 0a 7d 0a 0a 0a 69 66 20 28 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 23 2c 5c | alse;.}...if.(Preg::isMatch('#,\ |
ce440 | 73 2a 24 23 27 2c 20 24 6d 61 74 63 68 65 73 5b 27 73 74 61 72 74 27 5d 29 20 26 26 20 50 72 65 | s*$#',.$matches['start']).&&.Pre |
ce460 | 67 3a 3a 69 73 4d 61 74 63 68 28 27 23 5e 5c 7d 24 23 27 2c 20 24 6d 61 74 63 68 65 73 5b 27 65 | g::isMatch('#^\}$#',.$matches['e |
ce480 | 6e 64 27 5d 29 29 20 7b 0a 24 6d 61 74 63 68 65 73 5b 27 73 74 61 72 74 27 5d 20 3d 20 72 74 72 | nd'])).{.$matches['start'].=.rtr |
ce4a0 | 69 6d 28 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 28 27 23 2c 28 5c 73 2a 29 24 23 27 2c 20 27 24 | im(Preg::replace('#,(\s*)$#',.'$ |
ce4c0 | 31 27 2c 20 24 6d 61 74 63 68 65 73 5b 27 73 74 61 72 74 27 5d 29 2c 20 24 74 68 69 73 2d 3e 69 | 1',.$matches['start']),.$this->i |
ce4e0 | 6e 64 65 6e 74 29 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 63 6f 6e 74 65 6e 74 73 20 3d 20 24 6d 61 | ndent);.}..$this->contents.=.$ma |
ce500 | 74 63 68 65 73 5b 27 73 74 61 72 74 27 5d 20 2e 20 24 6d 61 74 63 68 65 73 5b 27 65 6e 64 27 5d | tches['start']...$matches['end'] |
ce520 | 3b 0a 69 66 20 28 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 23 5e 5c 7b 5c 73 2a 5c 7d 5c 73 | ;.if.(Preg::isMatch('#^\{\s*\}\s |
ce540 | 2a 24 23 27 2c 20 24 74 68 69 73 2d 3e 63 6f 6e 74 65 6e 74 73 29 29 20 7b 0a 24 74 68 69 73 2d | *$#',.$this->contents)).{.$this- |
ce560 | 3e 63 6f 6e 74 65 6e 74 73 20 3d 20 22 7b 5c 6e 7d 22 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 74 72 | >contents.=."{\n}";.}..return.tr |
ce580 | 75 65 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 | ue;.}..return.false;.}..public.f |
ce5a0 | 75 6e 63 74 69 6f 6e 20 72 65 6d 6f 76 65 4d 61 69 6e 4b 65 79 49 66 45 6d 70 74 79 28 73 74 72 | unction.removeMainKeyIfEmpty(str |
ce5c0 | 69 6e 67 20 24 6b 65 79 29 3a 20 62 6f 6f 6c 0a 7b 0a 24 64 65 63 6f 64 65 64 20 3d 20 4a 73 6f | ing.$key):.bool.{.$decoded.=.Jso |
ce5e0 | 6e 46 69 6c 65 3a 3a 70 61 72 73 65 4a 73 6f 6e 28 24 74 68 69 73 2d 3e 63 6f 6e 74 65 6e 74 73 | nFile::parseJson($this->contents |
ce600 | 29 3b 0a 0a 69 66 20 28 21 61 72 72 61 79 5f 6b 65 79 5f 65 78 69 73 74 73 28 24 6b 65 79 2c 20 | );..if.(!array_key_exists($key,. |
ce620 | 24 64 65 63 6f 64 65 64 29 29 20 7b 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 0a 69 66 20 | $decoded)).{.return.true;.}..if. |
ce640 | 28 69 73 5f 61 72 72 61 79 28 24 64 65 63 6f 64 65 64 5b 24 6b 65 79 5d 29 20 26 26 20 63 6f 75 | (is_array($decoded[$key]).&&.cou |
ce660 | 6e 74 28 24 64 65 63 6f 64 65 64 5b 24 6b 65 79 5d 29 20 3d 3d 3d 20 30 29 20 7b 0a 72 65 74 75 | nt($decoded[$key]).===.0).{.retu |
ce680 | 72 6e 20 24 74 68 69 73 2d 3e 72 65 6d 6f 76 65 4d 61 69 6e 4b 65 79 28 24 6b 65 79 29 3b 0a 7d | rn.$this->removeMainKey($key);.} |
ce6a0 | 0a 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 | ..return.true;.}.....public.func |
ce6c0 | 74 69 6f 6e 20 66 6f 72 6d 61 74 28 24 64 61 74 61 2c 20 69 6e 74 20 24 64 65 70 74 68 20 3d 20 | tion.format($data,.int.$depth.=. |
ce6e0 | 30 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 69 66 20 28 69 73 5f 61 72 72 61 79 28 24 64 61 74 61 29 | 0):.string.{.if.(is_array($data) |
ce700 | 29 20 7b 0a 72 65 73 65 74 28 24 64 61 74 61 29 3b 0a 0a 69 66 20 28 69 73 5f 6e 75 6d 65 72 69 | ).{.reset($data);..if.(is_numeri |
ce720 | 63 28 6b 65 79 28 24 64 61 74 61 29 29 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 64 61 74 61 20 | c(key($data))).{.foreach.($data. |
ce740 | 61 73 20 24 6b 65 79 20 3d 3e 20 24 76 61 6c 29 20 7b 0a 24 64 61 74 61 5b 24 6b 65 79 5d 20 3d | as.$key.=>.$val).{.$data[$key].= |
ce760 | 20 24 74 68 69 73 2d 3e 66 6f 72 6d 61 74 28 24 76 61 6c 2c 20 24 64 65 70 74 68 20 2b 20 31 29 | .$this->format($val,.$depth.+.1) |
ce780 | 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 27 5b 27 2e 69 6d 70 6c 6f 64 65 28 27 2c 20 27 2c 20 24 64 | ;.}..return.'['.implode(',.',.$d |
ce7a0 | 61 74 61 29 2e 27 5d 27 3b 0a 7d 0a 0a 24 6f 75 74 20 3d 20 27 7b 27 20 2e 20 24 74 68 69 73 2d | ata).']';.}..$out.=.'{'...$this- |
ce7c0 | 3e 6e 65 77 6c 69 6e 65 3b 0a 24 65 6c 65 6d 73 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 | >newline;.$elems.=.[];.foreach.( |
ce7e0 | 24 64 61 74 61 20 61 73 20 24 6b 65 79 20 3d 3e 20 24 76 61 6c 29 20 7b 0a 24 65 6c 65 6d 73 5b | $data.as.$key.=>.$val).{.$elems[ |
ce800 | 5d 20 3d 20 73 74 72 5f 72 65 70 65 61 74 28 24 74 68 69 73 2d 3e 69 6e 64 65 6e 74 2c 20 24 64 | ].=.str_repeat($this->indent,.$d |
ce820 | 65 70 74 68 20 2b 20 32 29 20 2e 20 4a 73 6f 6e 46 69 6c 65 3a 3a 65 6e 63 6f 64 65 28 24 6b 65 | epth.+.2)...JsonFile::encode($ke |
ce840 | 79 29 2e 20 27 3a 20 27 2e 24 74 68 69 73 2d 3e 66 6f 72 6d 61 74 28 24 76 61 6c 2c 20 24 64 65 | y)..':.'.$this->format($val,.$de |
ce860 | 70 74 68 20 2b 20 31 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 6f 75 74 20 2e 20 69 6d 70 6c 6f | pth.+.1);.}..return.$out...implo |
ce880 | 64 65 28 27 2c 27 2e 24 74 68 69 73 2d 3e 6e 65 77 6c 69 6e 65 2c 20 24 65 6c 65 6d 73 29 20 2e | de(','.$this->newline,.$elems).. |
ce8a0 | 20 24 74 68 69 73 2d 3e 6e 65 77 6c 69 6e 65 20 2e 20 73 74 72 5f 72 65 70 65 61 74 28 24 74 68 | .$this->newline...str_repeat($th |
ce8c0 | 69 73 2d 3e 69 6e 64 65 6e 74 2c 20 24 64 65 70 74 68 20 2b 20 31 29 20 2e 20 27 7d 27 3b 0a 7d | is->indent,.$depth.+.1)...'}';.} |
ce8e0 | 0a 0a 72 65 74 75 72 6e 20 4a 73 6f 6e 46 69 6c 65 3a 3a 65 6e 63 6f 64 65 28 24 64 61 74 61 29 | ..return.JsonFile::encode($data) |
ce900 | 3b 0a 7d 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 64 65 74 65 63 74 49 6e | ;.}..protected.function.detectIn |
ce920 | 64 65 6e 74 69 6e 67 28 29 3a 20 76 6f 69 64 0a 7b 0a 69 66 20 28 50 72 65 67 3a 3a 69 73 4d 61 | denting():.void.{.if.(Preg::isMa |
ce940 | 74 63 68 28 27 7b 5e 28 5b 20 5c 74 5d 2b 29 22 7d 6d 27 2c 20 24 74 68 69 73 2d 3e 63 6f 6e 74 | tch('{^([.\t]+)"}m',.$this->cont |
ce960 | 65 6e 74 73 2c 20 24 6d 61 74 63 68 29 29 20 7b 0a 24 74 68 69 73 2d 3e 69 6e 64 65 6e 74 20 3d | ents,.$match)).{.$this->indent.= |
ce980 | 20 24 6d 61 74 63 68 5b 31 5d 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 74 68 69 73 2d 3e 69 6e 64 65 | .$match[1];.}.else.{.$this->inde |
ce9a0 | 6e 74 20 3d 20 27 20 20 20 20 27 3b 0a 7d 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 | nt.=.'....';.}.}.}.<?php.declare |
ce9c0 | 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d | (strict_types=1);............nam |
ce9e0 | 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 4a 73 6f 6e 3b 0a 0a 75 73 65 20 45 78 63 65 70 | espace.Composer\Json;..use.Excep |
cea00 | 74 69 6f 6e 3b 0a 0a 0a 0a 0a 63 6c 61 73 73 20 4a 73 6f 6e 56 61 6c 69 64 61 74 69 6f 6e 45 78 | tion;.....class.JsonValidationEx |
cea20 | 63 65 70 74 69 6f 6e 20 65 78 74 65 6e 64 73 20 45 78 63 65 70 74 69 6f 6e 0a 7b 0a 0a 0a 0a 70 | ception.extends.Exception.{....p |
cea40 | 72 6f 74 65 63 74 65 64 20 24 65 72 72 6f 72 73 3b 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e | rotected.$errors;.....public.fun |
cea60 | 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 73 74 72 69 6e 67 20 24 6d 65 73 73 61 67 | ction.__construct(string.$messag |
cea80 | 65 2c 20 61 72 72 61 79 20 24 65 72 72 6f 72 73 20 3d 20 5b 5d 2c 20 3f 45 78 63 65 70 74 69 6f | e,.array.$errors.=.[],.?Exceptio |
ceaa0 | 6e 20 24 70 72 65 76 69 6f 75 73 20 3d 20 6e 75 6c 6c 29 0a 7b 0a 24 74 68 69 73 2d 3e 65 72 72 | n.$previous.=.null).{.$this->err |
ceac0 | 6f 72 73 20 3d 20 24 65 72 72 6f 72 73 3b 0a 70 61 72 65 6e 74 3a 3a 5f 5f 63 6f 6e 73 74 72 75 | ors.=.$errors;.parent::__constru |
ceae0 | 63 74 28 28 73 74 72 69 6e 67 29 20 24 6d 65 73 73 61 67 65 2c 20 30 2c 20 24 70 72 65 76 69 6f | ct((string).$message,.0,.$previo |
ceb00 | 75 73 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 45 72 | us);.}.....public.function.getEr |
ceb20 | 72 6f 72 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 65 72 | rors():.array.{.return.$this->er |
ceb40 | 72 6f 72 73 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 | rors;.}.}.<?php.declare(strict_t |
ceb60 | 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f | ypes=1);............namespace.Co |
ceb80 | 6d 70 6f 73 65 72 5c 50 48 50 53 74 61 6e 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f | mposer\PHPStan;..use.Composer\Co |
ceba0 | 6e 66 69 67 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 4a 73 6f 6e 5c 4a 73 6f 6e 46 69 6c 65 | nfig;.use.Composer\Json\JsonFile |
cebc0 | 3b 0a 75 73 65 20 50 68 70 50 61 72 73 65 72 5c 4e 6f 64 65 5c 45 78 70 72 5c 4d 65 74 68 6f 64 | ;.use.PhpParser\Node\Expr\Method |
cebe0 | 43 61 6c 6c 3b 0a 75 73 65 20 50 48 50 53 74 61 6e 5c 41 6e 61 6c 79 73 65 72 5c 53 63 6f 70 65 | Call;.use.PHPStan\Analyser\Scope |
cec00 | 3b 0a 75 73 65 20 50 48 50 53 74 61 6e 5c 52 65 66 6c 65 63 74 69 6f 6e 5c 4d 65 74 68 6f 64 52 | ;.use.PHPStan\Reflection\MethodR |
cec20 | 65 66 6c 65 63 74 69 6f 6e 3b 0a 75 73 65 20 50 48 50 53 74 61 6e 5c 52 65 66 6c 65 63 74 69 6f | eflection;.use.PHPStan\Reflectio |
cec40 | 6e 5c 50 61 72 61 6d 65 74 65 72 73 41 63 63 65 70 74 6f 72 53 65 6c 65 63 74 6f 72 3b 0a 75 73 | n\ParametersAcceptorSelector;.us |
cec60 | 65 20 50 48 50 53 74 61 6e 5c 54 79 70 65 5c 41 72 72 61 79 54 79 70 65 3b 0a 75 73 65 20 50 48 | e.PHPStan\Type\ArrayType;.use.PH |
cec80 | 50 53 74 61 6e 5c 54 79 70 65 5c 42 6f 6f 6c 65 61 6e 54 79 70 65 3b 0a 75 73 65 20 50 48 50 53 | PStan\Type\BooleanType;.use.PHPS |
ceca0 | 74 61 6e 5c 54 79 70 65 5c 43 6f 6e 73 74 61 6e 74 5c 43 6f 6e 73 74 61 6e 74 41 72 72 61 79 54 | tan\Type\Constant\ConstantArrayT |
cecc0 | 79 70 65 3b 0a 75 73 65 20 50 48 50 53 74 61 6e 5c 54 79 70 65 5c 43 6f 6e 73 74 61 6e 74 5c 43 | ype;.use.PHPStan\Type\Constant\C |
cece0 | 6f 6e 73 74 61 6e 74 42 6f 6f 6c 65 61 6e 54 79 70 65 3b 0a 75 73 65 20 50 48 50 53 74 61 6e 5c | onstantBooleanType;.use.PHPStan\ |
ced00 | 54 79 70 65 5c 43 6f 6e 73 74 61 6e 74 5c 43 6f 6e 73 74 61 6e 74 53 74 72 69 6e 67 54 79 70 65 | Type\Constant\ConstantStringType |
ced20 | 3b 0a 75 73 65 20 50 48 50 53 74 61 6e 5c 54 79 70 65 5c 44 79 6e 61 6d 69 63 4d 65 74 68 6f 64 | ;.use.PHPStan\Type\DynamicMethod |
ced40 | 52 65 74 75 72 6e 54 79 70 65 45 78 74 65 6e 73 69 6f 6e 3b 0a 75 73 65 20 50 48 50 53 74 61 6e | ReturnTypeExtension;.use.PHPStan |
ced60 | 5c 54 79 70 65 5c 49 6e 74 65 67 65 72 52 61 6e 67 65 54 79 70 65 3b 0a 75 73 65 20 50 48 50 53 | \Type\IntegerRangeType;.use.PHPS |
ced80 | 74 61 6e 5c 54 79 70 65 5c 49 6e 74 65 67 65 72 54 79 70 65 3b 0a 75 73 65 20 50 48 50 53 74 61 | tan\Type\IntegerType;.use.PHPSta |
ceda0 | 6e 5c 54 79 70 65 5c 4d 69 78 65 64 54 79 70 65 3b 0a 75 73 65 20 50 48 50 53 74 61 6e 5c 54 79 | n\Type\MixedType;.use.PHPStan\Ty |
cedc0 | 70 65 5c 53 74 72 69 6e 67 54 79 70 65 3b 0a 75 73 65 20 50 48 50 53 74 61 6e 5c 54 79 70 65 5c | pe\StringType;.use.PHPStan\Type\ |
cede0 | 54 79 70 65 3b 0a 75 73 65 20 50 48 50 53 74 61 6e 5c 54 79 70 65 5c 54 79 70 65 43 6f 6d 62 69 | Type;.use.PHPStan\Type\TypeCombi |
cee00 | 6e 61 74 6f 72 3b 0a 75 73 65 20 50 48 50 53 74 61 6e 5c 54 79 70 65 5c 55 6e 69 6f 6e 54 79 70 | nator;.use.PHPStan\Type\UnionTyp |
cee20 | 65 3b 0a 0a 66 69 6e 61 6c 20 63 6c 61 73 73 20 43 6f 6e 66 69 67 52 65 74 75 72 6e 54 79 70 65 | e;..final.class.ConfigReturnType |
cee40 | 45 78 74 65 6e 73 69 6f 6e 20 69 6d 70 6c 65 6d 65 6e 74 73 20 44 79 6e 61 6d 69 63 4d 65 74 68 | Extension.implements.DynamicMeth |
cee60 | 6f 64 52 65 74 75 72 6e 54 79 70 65 45 78 74 65 6e 73 69 6f 6e 0a 7b 0a 0a 70 72 69 76 61 74 65 | odReturnTypeExtension.{..private |
cee80 | 20 24 70 72 6f 70 65 72 74 69 65 73 20 3d 20 5b 5d 3b 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 | .$properties.=.[];..public.funct |
ceea0 | 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 29 0a 7b 0a 24 73 63 68 65 6d 61 20 3d 20 4a 73 | ion.__construct().{.$schema.=.Js |
ceec0 | 6f 6e 46 69 6c 65 3a 3a 70 61 72 73 65 4a 73 6f 6e 28 28 73 74 72 69 6e 67 29 20 66 69 6c 65 5f | onFile::parseJson((string).file_ |
ceee0 | 67 65 74 5f 63 6f 6e 74 65 6e 74 73 28 5f 5f 44 49 52 5f 5f 2e 27 2f 2e 2e 2f 2e 2e 2f 2e 2e 2f | get_contents(__DIR__.'/../../../ |
cef00 | 72 65 73 2f 63 6f 6d 70 6f 73 65 72 2d 73 63 68 65 6d 61 2e 6a 73 6f 6e 27 29 29 3b 0a 0a 0a 0a | res/composer-schema.json'));.... |
cef20 | 66 6f 72 65 61 63 68 20 28 24 73 63 68 65 6d 61 5b 27 70 72 6f 70 65 72 74 69 65 73 27 5d 5b 27 | foreach.($schema['properties'][' |
cef40 | 63 6f 6e 66 69 67 27 5d 5b 27 70 72 6f 70 65 72 74 69 65 73 27 5d 20 61 73 20 24 70 72 6f 70 20 | config']['properties'].as.$prop. |
cef60 | 3d 3e 20 24 63 6f 6e 66 29 20 7b 0a 24 74 79 70 65 20 3d 20 24 74 68 69 73 2d 3e 70 61 72 73 65 | =>.$conf).{.$type.=.$this->parse |
cef80 | 54 79 70 65 28 24 63 6f 6e 66 2c 20 24 70 72 6f 70 29 3b 0a 0a 24 74 68 69 73 2d 3e 70 72 6f 70 | Type($conf,.$prop);..$this->prop |
cefa0 | 65 72 74 69 65 73 5b 24 70 72 6f 70 5d 20 3d 20 24 74 79 70 65 3b 0a 7d 0a 7d 0a 0a 70 75 62 6c | erties[$prop].=.$type;.}.}..publ |
cefc0 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 43 6c 61 73 73 28 29 3a 20 73 74 72 69 6e 67 0a 7b | ic.function.getClass():.string.{ |
cefe0 | 0a 72 65 74 75 72 6e 20 43 6f 6e 66 69 67 3a 3a 63 6c 61 73 73 3b 0a 7d 0a 0a 70 75 62 6c 69 63 | .return.Config::class;.}..public |
cf000 | 20 66 75 6e 63 74 69 6f 6e 20 69 73 4d 65 74 68 6f 64 53 75 70 70 6f 72 74 65 64 28 4d 65 74 68 | .function.isMethodSupported(Meth |
cf020 | 6f 64 52 65 66 6c 65 63 74 69 6f 6e 20 24 6d 65 74 68 6f 64 52 65 66 6c 65 63 74 69 6f 6e 29 3a | odReflection.$methodReflection): |
cf040 | 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 73 74 72 74 6f 6c 6f 77 65 72 28 24 6d 65 74 68 6f | .bool.{.return.strtolower($metho |
cf060 | 64 52 65 66 6c 65 63 74 69 6f 6e 2d 3e 67 65 74 4e 61 6d 65 28 29 29 20 3d 3d 3d 20 27 67 65 74 | dReflection->getName()).===.'get |
cf080 | 27 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 54 79 70 65 46 72 6f | ';.}..public.function.getTypeFro |
cf0a0 | 6d 4d 65 74 68 6f 64 43 61 6c 6c 28 4d 65 74 68 6f 64 52 65 66 6c 65 63 74 69 6f 6e 20 24 6d 65 | mMethodCall(MethodReflection.$me |
cf0c0 | 74 68 6f 64 52 65 66 6c 65 63 74 69 6f 6e 2c 20 4d 65 74 68 6f 64 43 61 6c 6c 20 24 6d 65 74 68 | thodReflection,.MethodCall.$meth |
cf0e0 | 6f 64 43 61 6c 6c 2c 20 53 63 6f 70 65 20 24 73 63 6f 70 65 29 3a 20 54 79 70 65 0a 7b 0a 24 61 | odCall,.Scope.$scope):.Type.{.$a |
cf100 | 72 67 73 20 3d 20 24 6d 65 74 68 6f 64 43 61 6c 6c 2d 3e 67 65 74 41 72 67 73 28 29 3b 0a 0a 69 | rgs.=.$methodCall->getArgs();..i |
cf120 | 66 20 28 63 6f 75 6e 74 28 24 61 72 67 73 29 20 3c 20 31 29 20 7b 0a 72 65 74 75 72 6e 20 50 61 | f.(count($args).<.1).{.return.Pa |
cf140 | 72 61 6d 65 74 65 72 73 41 63 63 65 70 74 6f 72 53 65 6c 65 63 74 6f 72 3a 3a 73 65 6c 65 63 74 | rametersAcceptorSelector::select |
cf160 | 53 69 6e 67 6c 65 28 24 6d 65 74 68 6f 64 52 65 66 6c 65 63 74 69 6f 6e 2d 3e 67 65 74 56 61 72 | Single($methodReflection->getVar |
cf180 | 69 61 6e 74 73 28 29 29 2d 3e 67 65 74 52 65 74 75 72 6e 54 79 70 65 28 29 3b 0a 7d 0a 0a 24 6b | iants())->getReturnType();.}..$k |
cf1a0 | 65 79 54 79 70 65 20 3d 20 24 73 63 6f 70 65 2d 3e 67 65 74 54 79 70 65 28 24 61 72 67 73 5b 30 | eyType.=.$scope->getType($args[0 |
cf1c0 | 5d 2d 3e 76 61 6c 75 65 29 3b 0a 69 66 20 28 24 6b 65 79 54 79 70 65 20 69 6e 73 74 61 6e 63 65 | ]->value);.if.($keyType.instance |
cf1e0 | 6f 66 20 43 6f 6e 73 74 61 6e 74 53 74 72 69 6e 67 54 79 70 65 29 20 7b 0a 69 66 20 28 69 73 73 | of.ConstantStringType).{.if.(iss |
cf200 | 65 74 28 24 74 68 69 73 2d 3e 70 72 6f 70 65 72 74 69 65 73 5b 24 6b 65 79 54 79 70 65 2d 3e 67 | et($this->properties[$keyType->g |
cf220 | 65 74 56 61 6c 75 65 28 29 5d 29 29 20 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 70 72 6f | etValue()])).{.return.$this->pro |
cf240 | 70 65 72 74 69 65 73 5b 24 6b 65 79 54 79 70 65 2d 3e 67 65 74 56 61 6c 75 65 28 29 5d 3b 0a 7d | perties[$keyType->getValue()];.} |
cf260 | 0a 7d 0a 0a 72 65 74 75 72 6e 20 50 61 72 61 6d 65 74 65 72 73 41 63 63 65 70 74 6f 72 53 65 6c | .}..return.ParametersAcceptorSel |
cf280 | 65 63 74 6f 72 3a 3a 73 65 6c 65 63 74 53 69 6e 67 6c 65 28 24 6d 65 74 68 6f 64 52 65 66 6c 65 | ector::selectSingle($methodRefle |
cf2a0 | 63 74 69 6f 6e 2d 3e 67 65 74 56 61 72 69 61 6e 74 73 28 29 29 2d 3e 67 65 74 52 65 74 75 72 6e | ction->getVariants())->getReturn |
cf2c0 | 54 79 70 65 28 29 3b 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 70 | Type();.}.....private.function.p |
cf2e0 | 61 72 73 65 54 79 70 65 28 61 72 72 61 79 20 24 64 65 66 2c 20 73 74 72 69 6e 67 20 24 70 61 74 | arseType(array.$def,.string.$pat |
cf300 | 68 29 3a 20 54 79 70 65 0a 7b 0a 69 66 20 28 69 73 73 65 74 28 24 64 65 66 5b 27 74 79 70 65 27 | h):.Type.{.if.(isset($def['type' |
cf320 | 5d 29 29 20 7b 0a 24 74 79 70 65 73 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 28 61 72 72 | ])).{.$types.=.[];.foreach.((arr |
cf340 | 61 79 29 20 24 64 65 66 5b 27 74 79 70 65 27 5d 20 61 73 20 24 74 79 70 65 29 20 7b 0a 73 77 69 | ay).$def['type'].as.$type).{.swi |
cf360 | 74 63 68 20 28 24 74 79 70 65 29 20 7b 0a 63 61 73 65 20 27 69 6e 74 65 67 65 72 27 3a 0a 69 66 | tch.($type).{.case.'integer':.if |
cf380 | 20 28 69 6e 5f 61 72 72 61 79 28 24 70 61 74 68 2c 20 5b 27 70 72 6f 63 65 73 73 2d 74 69 6d 65 | .(in_array($path,.['process-time |
cf3a0 | 6f 75 74 27 2c 20 27 63 61 63 68 65 2d 74 74 6c 27 2c 20 27 63 61 63 68 65 2d 66 69 6c 65 73 2d | out',.'cache-ttl',.'cache-files- |
cf3c0 | 74 74 6c 27 2c 20 27 63 61 63 68 65 2d 66 69 6c 65 73 2d 6d 61 78 73 69 7a 65 27 5d 2c 20 74 72 | ttl',.'cache-files-maxsize'],.tr |
cf3e0 | 75 65 29 29 20 7b 0a 24 74 79 70 65 73 5b 5d 20 3d 20 49 6e 74 65 67 65 72 52 61 6e 67 65 54 79 | ue)).{.$types[].=.IntegerRangeTy |
cf400 | 70 65 3a 3a 63 72 65 61 74 65 41 6c 6c 47 72 65 61 74 65 72 54 68 61 6e 4f 72 45 71 75 61 6c 54 | pe::createAllGreaterThanOrEqualT |
cf420 | 6f 28 30 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 74 79 70 65 73 5b 5d 20 3d 20 6e 65 77 20 49 6e | o(0);.}.else.{.$types[].=.new.In |
cf440 | 74 65 67 65 72 54 79 70 65 28 29 3b 0a 7d 0a 62 72 65 61 6b 3b 0a 0a 63 61 73 65 20 27 73 74 72 | tegerType();.}.break;..case.'str |
cf460 | 69 6e 67 27 3a 0a 69 66 20 28 24 70 61 74 68 20 3d 3d 3d 20 27 63 61 63 68 65 2d 66 69 6c 65 73 | ing':.if.($path.===.'cache-files |
cf480 | 2d 6d 61 78 73 69 7a 65 27 29 20 7b 0a 0a 7d 20 65 6c 73 65 69 66 20 28 24 70 61 74 68 20 3d 3d | -maxsize').{..}.elseif.($path.== |
cf4a0 | 3d 20 27 64 69 73 63 61 72 64 2d 63 68 61 6e 67 65 73 27 29 20 7b 0a 24 74 79 70 65 73 5b 5d 20 | =.'discard-changes').{.$types[]. |
cf4c0 | 3d 20 6e 65 77 20 43 6f 6e 73 74 61 6e 74 53 74 72 69 6e 67 54 79 70 65 28 27 73 74 61 73 68 27 | =.new.ConstantStringType('stash' |
cf4e0 | 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 70 61 74 68 20 3d 3d 3d 20 27 75 73 65 2d 70 61 72 65 | );.}.elseif.($path.===.'use-pare |
cf500 | 6e 74 2d 64 69 72 27 29 20 7b 0a 24 74 79 70 65 73 5b 5d 20 3d 20 6e 65 77 20 43 6f 6e 73 74 61 | nt-dir').{.$types[].=.new.Consta |
cf520 | 6e 74 53 74 72 69 6e 67 54 79 70 65 28 27 70 72 6f 6d 70 74 27 29 3b 0a 7d 20 65 6c 73 65 69 66 | ntStringType('prompt');.}.elseif |
cf540 | 20 28 24 70 61 74 68 20 3d 3d 3d 20 27 73 74 6f 72 65 2d 61 75 74 68 73 27 29 20 7b 0a 24 74 79 | .($path.===.'store-auths').{.$ty |
cf560 | 70 65 73 5b 5d 20 3d 20 6e 65 77 20 43 6f 6e 73 74 61 6e 74 53 74 72 69 6e 67 54 79 70 65 28 27 | pes[].=.new.ConstantStringType(' |
cf580 | 70 72 6f 6d 70 74 27 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 70 61 74 68 20 3d 3d 3d 20 27 70 | prompt');.}.elseif.($path.===.'p |
cf5a0 | 6c 61 74 66 6f 72 6d 2d 63 68 65 63 6b 27 29 20 7b 0a 24 74 79 70 65 73 5b 5d 20 3d 20 6e 65 77 | latform-check').{.$types[].=.new |
cf5c0 | 20 43 6f 6e 73 74 61 6e 74 53 74 72 69 6e 67 54 79 70 65 28 27 70 68 70 2d 6f 6e 6c 79 27 29 3b | .ConstantStringType('php-only'); |
cf5e0 | 0a 7d 20 65 6c 73 65 69 66 20 28 24 70 61 74 68 20 3d 3d 3d 20 27 67 69 74 68 75 62 2d 70 72 6f | .}.elseif.($path.===.'github-pro |
cf600 | 74 6f 63 6f 6c 73 27 29 20 7b 0a 24 74 79 70 65 73 5b 5d 20 3d 20 6e 65 77 20 55 6e 69 6f 6e 54 | tocols').{.$types[].=.new.UnionT |
cf620 | 79 70 65 28 5b 6e 65 77 20 43 6f 6e 73 74 61 6e 74 53 74 72 69 6e 67 54 79 70 65 28 27 67 69 74 | ype([new.ConstantStringType('git |
cf640 | 27 29 2c 20 6e 65 77 20 43 6f 6e 73 74 61 6e 74 53 74 72 69 6e 67 54 79 70 65 28 27 68 74 74 70 | '),.new.ConstantStringType('http |
cf660 | 73 27 29 2c 20 6e 65 77 20 43 6f 6e 73 74 61 6e 74 53 74 72 69 6e 67 54 79 70 65 28 27 73 73 68 | s'),.new.ConstantStringType('ssh |
cf680 | 27 29 2c 20 6e 65 77 20 43 6f 6e 73 74 61 6e 74 53 74 72 69 6e 67 54 79 70 65 28 27 68 74 74 70 | '),.new.ConstantStringType('http |
cf6a0 | 27 29 5d 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 73 74 72 5f 73 74 61 72 74 73 5f 77 69 74 68 28 | ')]);.}.elseif.(str_starts_with( |
cf6c0 | 24 70 61 74 68 2c 20 27 70 72 65 66 65 72 72 65 64 2d 69 6e 73 74 61 6c 6c 27 29 29 20 7b 0a 24 | $path,.'preferred-install')).{.$ |
cf6e0 | 74 79 70 65 73 5b 5d 20 3d 20 6e 65 77 20 55 6e 69 6f 6e 54 79 70 65 28 5b 6e 65 77 20 43 6f 6e | types[].=.new.UnionType([new.Con |
cf700 | 73 74 61 6e 74 53 74 72 69 6e 67 54 79 70 65 28 27 73 6f 75 72 63 65 27 29 2c 20 6e 65 77 20 43 | stantStringType('source'),.new.C |
cf720 | 6f 6e 73 74 61 6e 74 53 74 72 69 6e 67 54 79 70 65 28 27 64 69 73 74 27 29 2c 20 6e 65 77 20 43 | onstantStringType('dist'),.new.C |
cf740 | 6f 6e 73 74 61 6e 74 53 74 72 69 6e 67 54 79 70 65 28 27 61 75 74 6f 27 29 5d 29 3b 0a 7d 20 65 | onstantStringType('auto')]);.}.e |
cf760 | 6c 73 65 20 7b 0a 24 74 79 70 65 73 5b 5d 20 3d 20 6e 65 77 20 53 74 72 69 6e 67 54 79 70 65 28 | lse.{.$types[].=.new.StringType( |
cf780 | 29 3b 0a 7d 0a 62 72 65 61 6b 3b 0a 0a 63 61 73 65 20 27 62 6f 6f 6c 65 61 6e 27 3a 0a 69 66 20 | );.}.break;..case.'boolean':.if. |
cf7a0 | 28 24 70 61 74 68 20 3d 3d 3d 20 27 70 6c 61 74 66 6f 72 6d 2e 61 64 64 69 74 69 6f 6e 61 6c 50 | ($path.===.'platform.additionalP |
cf7c0 | 72 6f 70 65 72 74 69 65 73 27 29 20 7b 0a 24 74 79 70 65 73 5b 5d 20 3d 20 6e 65 77 20 43 6f 6e | roperties').{.$types[].=.new.Con |
cf7e0 | 73 74 61 6e 74 42 6f 6f 6c 65 61 6e 54 79 70 65 28 66 61 6c 73 65 29 3b 0a 7d 20 65 6c 73 65 20 | stantBooleanType(false);.}.else. |
cf800 | 7b 0a 24 74 79 70 65 73 5b 5d 20 3d 20 6e 65 77 20 42 6f 6f 6c 65 61 6e 54 79 70 65 28 29 3b 0a | {.$types[].=.new.BooleanType();. |
cf820 | 7d 0a 62 72 65 61 6b 3b 0a 0a 63 61 73 65 20 27 6f 62 6a 65 63 74 27 3a 0a 24 61 64 64 6c 50 72 | }.break;..case.'object':.$addlPr |
cf840 | 6f 70 54 79 70 65 20 3d 20 6e 75 6c 6c 3b 0a 69 66 20 28 69 73 73 65 74 28 24 64 65 66 5b 27 61 | opType.=.null;.if.(isset($def['a |
cf860 | 64 64 69 74 69 6f 6e 61 6c 50 72 6f 70 65 72 74 69 65 73 27 5d 29 29 20 7b 0a 24 61 64 64 6c 50 | dditionalProperties'])).{.$addlP |
cf880 | 72 6f 70 54 79 70 65 20 3d 20 24 74 68 69 73 2d 3e 70 61 72 73 65 54 79 70 65 28 24 64 65 66 5b | ropType.=.$this->parseType($def[ |
cf8a0 | 27 61 64 64 69 74 69 6f 6e 61 6c 50 72 6f 70 65 72 74 69 65 73 27 5d 2c 20 24 70 61 74 68 2e 27 | 'additionalProperties'],.$path.' |
cf8c0 | 2e 61 64 64 69 74 69 6f 6e 61 6c 50 72 6f 70 65 72 74 69 65 73 27 29 3b 0a 7d 0a 0a 69 66 20 28 | .additionalProperties');.}..if.( |
cf8e0 | 69 73 73 65 74 28 24 64 65 66 5b 27 70 72 6f 70 65 72 74 69 65 73 27 5d 29 29 20 7b 0a 24 6b 65 | isset($def['properties'])).{.$ke |
cf900 | 79 4e 61 6d 65 73 20 3d 20 5b 5d 3b 0a 24 76 61 6c 54 79 70 65 73 20 3d 20 5b 5d 3b 0a 24 6f 70 | yNames.=.[];.$valTypes.=.[];.$op |
cf920 | 74 69 6f 6e 61 6c 4b 65 79 73 20 3d 20 5b 5d 3b 0a 24 70 72 6f 70 49 6e 64 65 78 20 3d 20 30 3b | tionalKeys.=.[];.$propIndex.=.0; |
cf940 | 0a 66 6f 72 65 61 63 68 20 28 24 64 65 66 5b 27 70 72 6f 70 65 72 74 69 65 73 27 5d 20 61 73 20 | .foreach.($def['properties'].as. |
cf960 | 24 70 72 6f 70 4e 61 6d 65 20 3d 3e 20 24 70 72 6f 70 64 65 66 29 20 7b 0a 24 6b 65 79 4e 61 6d | $propName.=>.$propdef).{.$keyNam |
cf980 | 65 73 5b 5d 20 3d 20 6e 65 77 20 43 6f 6e 73 74 61 6e 74 53 74 72 69 6e 67 54 79 70 65 28 24 70 | es[].=.new.ConstantStringType($p |
cf9a0 | 72 6f 70 4e 61 6d 65 29 3b 0a 24 76 61 6c 54 79 70 65 20 3d 20 24 74 68 69 73 2d 3e 70 61 72 73 | ropName);.$valType.=.$this->pars |
cf9c0 | 65 54 79 70 65 28 24 70 72 6f 70 64 65 66 2c 20 24 70 61 74 68 2e 27 2e 27 2e 24 70 72 6f 70 4e | eType($propdef,.$path.'.'.$propN |
cf9e0 | 61 6d 65 29 3b 0a 69 66 20 28 21 69 73 73 65 74 28 24 64 65 66 5b 27 72 65 71 75 69 72 65 64 27 | ame);.if.(!isset($def['required' |
cfa00 | 5d 29 20 7c 7c 20 21 69 6e 5f 61 72 72 61 79 28 24 70 72 6f 70 4e 61 6d 65 2c 20 24 64 65 66 5b | ]).||.!in_array($propName,.$def[ |
cfa20 | 27 72 65 71 75 69 72 65 64 27 5d 2c 20 74 72 75 65 29 29 20 7b 0a 24 76 61 6c 54 79 70 65 20 3d | 'required'],.true)).{.$valType.= |
cfa40 | 20 54 79 70 65 43 6f 6d 62 69 6e 61 74 6f 72 3a 3a 61 64 64 4e 75 6c 6c 28 24 76 61 6c 54 79 70 | .TypeCombinator::addNull($valTyp |
cfa60 | 65 29 3b 0a 24 6f 70 74 69 6f 6e 61 6c 4b 65 79 73 5b 5d 20 3d 20 24 70 72 6f 70 49 6e 64 65 78 | e);.$optionalKeys[].=.$propIndex |
cfa80 | 3b 0a 7d 0a 24 76 61 6c 54 79 70 65 73 5b 5d 20 3d 20 24 76 61 6c 54 79 70 65 3b 0a 24 70 72 6f | ;.}.$valTypes[].=.$valType;.$pro |
cfaa0 | 70 49 6e 64 65 78 2b 2b 3b 0a 7d 0a 0a 69 66 20 28 24 61 64 64 6c 50 72 6f 70 54 79 70 65 20 21 | pIndex++;.}..if.($addlPropType.! |
cfac0 | 3d 3d 20 6e 75 6c 6c 29 20 7b 0a 24 74 79 70 65 73 5b 5d 20 3d 20 6e 65 77 20 41 72 72 61 79 54 | ==.null).{.$types[].=.new.ArrayT |
cfae0 | 79 70 65 28 54 79 70 65 43 6f 6d 62 69 6e 61 74 6f 72 3a 3a 75 6e 69 6f 6e 28 6e 65 77 20 53 74 | ype(TypeCombinator::union(new.St |
cfb00 | 72 69 6e 67 54 79 70 65 28 29 2c 20 2e 2e 2e 24 6b 65 79 4e 61 6d 65 73 29 2c 20 54 79 70 65 43 | ringType(),....$keyNames),.TypeC |
cfb20 | 6f 6d 62 69 6e 61 74 6f 72 3a 3a 75 6e 69 6f 6e 28 24 61 64 64 6c 50 72 6f 70 54 79 70 65 2c 20 | ombinator::union($addlPropType,. |
cfb40 | 2e 2e 2e 24 76 61 6c 54 79 70 65 73 29 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 74 79 70 65 73 5b | ...$valTypes));.}.else.{.$types[ |
cfb60 | 5d 20 3d 20 6e 65 77 20 43 6f 6e 73 74 61 6e 74 41 72 72 61 79 54 79 70 65 28 24 6b 65 79 4e 61 | ].=.new.ConstantArrayType($keyNa |
cfb80 | 6d 65 73 2c 20 24 76 61 6c 54 79 70 65 73 2c 20 5b 30 5d 2c 20 24 6f 70 74 69 6f 6e 61 6c 4b 65 | mes,.$valTypes,.[0],.$optionalKe |
cfba0 | 79 73 29 3b 0a 7d 0a 7d 20 65 6c 73 65 20 7b 0a 24 74 79 70 65 73 5b 5d 20 3d 20 6e 65 77 20 41 | ys);.}.}.else.{.$types[].=.new.A |
cfbc0 | 72 72 61 79 54 79 70 65 28 6e 65 77 20 53 74 72 69 6e 67 54 79 70 65 28 29 2c 20 24 61 64 64 6c | rrayType(new.StringType(),.$addl |
cfbe0 | 50 72 6f 70 54 79 70 65 20 3f 3f 20 6e 65 77 20 4d 69 78 65 64 54 79 70 65 28 29 29 3b 0a 7d 0a | PropType.??.new.MixedType());.}. |
cfc00 | 62 72 65 61 6b 3b 0a 0a 63 61 73 65 20 27 61 72 72 61 79 27 3a 0a 69 66 20 28 69 73 73 65 74 28 | break;..case.'array':.if.(isset( |
cfc20 | 24 64 65 66 5b 27 69 74 65 6d 73 27 5d 29 29 20 7b 0a 24 76 61 6c 54 79 70 65 20 3d 20 24 74 68 | $def['items'])).{.$valType.=.$th |
cfc40 | 69 73 2d 3e 70 61 72 73 65 54 79 70 65 28 24 64 65 66 5b 27 69 74 65 6d 73 27 5d 2c 20 24 70 61 | is->parseType($def['items'],.$pa |
cfc60 | 74 68 2e 27 2e 69 74 65 6d 73 27 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 76 61 6c 54 79 70 65 20 | th.'.items');.}.else.{.$valType. |
cfc80 | 3d 20 6e 65 77 20 4d 69 78 65 64 54 79 70 65 28 29 3b 0a 7d 0a 0a 24 74 79 70 65 73 5b 5d 20 3d | =.new.MixedType();.}..$types[].= |
cfca0 | 20 6e 65 77 20 41 72 72 61 79 54 79 70 65 28 6e 65 77 20 49 6e 74 65 67 65 72 54 79 70 65 28 29 | .new.ArrayType(new.IntegerType() |
cfcc0 | 2c 20 24 76 61 6c 54 79 70 65 29 3b 0a 62 72 65 61 6b 3b 0a 0a 64 65 66 61 75 6c 74 3a 0a 24 74 | ,.$valType);.break;..default:.$t |
cfce0 | 79 70 65 73 5b 5d 20 3d 20 6e 65 77 20 4d 69 78 65 64 54 79 70 65 28 29 3b 0a 7d 0a 7d 0a 0a 24 | ypes[].=.new.MixedType();.}.}..$ |
cfd00 | 74 79 70 65 20 3d 20 54 79 70 65 43 6f 6d 62 69 6e 61 74 6f 72 3a 3a 75 6e 69 6f 6e 28 2e 2e 2e | type.=.TypeCombinator::union(... |
cfd20 | 24 74 79 70 65 73 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 69 73 73 65 74 28 24 64 65 66 5b 27 65 | $types);.}.elseif.(isset($def['e |
cfd40 | 6e 75 6d 27 5d 29 29 20 7b 0a 24 74 79 70 65 20 3d 20 54 79 70 65 43 6f 6d 62 69 6e 61 74 6f 72 | num'])).{.$type.=.TypeCombinator |
cfd60 | 3a 3a 75 6e 69 6f 6e 28 2e 2e 2e 61 72 72 61 79 5f 6d 61 70 28 73 74 61 74 69 63 20 66 75 6e 63 | ::union(...array_map(static.func |
cfd80 | 74 69 6f 6e 20 28 73 74 72 69 6e 67 20 24 76 61 6c 75 65 29 3a 20 43 6f 6e 73 74 61 6e 74 53 74 | tion.(string.$value):.ConstantSt |
cfda0 | 72 69 6e 67 54 79 70 65 20 7b 0a 72 65 74 75 72 6e 20 6e 65 77 20 43 6f 6e 73 74 61 6e 74 53 74 | ringType.{.return.new.ConstantSt |
cfdc0 | 72 69 6e 67 54 79 70 65 28 24 76 61 6c 75 65 29 3b 0a 7d 2c 20 24 64 65 66 5b 27 65 6e 75 6d 27 | ringType($value);.},.$def['enum' |
cfde0 | 5d 29 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 74 79 70 65 20 3d 20 6e 65 77 20 4d 69 78 65 64 54 | ]));.}.else.{.$type.=.new.MixedT |
cfe00 | 79 70 65 28 29 3b 0a 7d 0a 0a 0a 69 66 20 28 24 70 61 74 68 20 3d 3d 3d 20 27 61 6c 6c 6f 77 2d | ype();.}...if.($path.===.'allow- |
cfe20 | 70 6c 75 67 69 6e 73 27 20 26 26 20 74 69 6d 65 28 29 20 3c 20 73 74 72 74 6f 74 69 6d 65 28 27 | plugins'.&&.time().<.strtotime(' |
cfe40 | 32 30 32 32 2d 30 37 2d 30 31 27 29 29 20 7b 0a 24 74 79 70 65 20 3d 20 54 79 70 65 43 6f 6d 62 | 2022-07-01')).{.$type.=.TypeComb |
cfe60 | 69 6e 61 74 6f 72 3a 3a 61 64 64 4e 75 6c 6c 28 24 74 79 70 65 29 3b 0a 7d 0a 0a 0a 69 66 20 28 | inator::addNull($type);.}...if.( |
cfe80 | 69 6e 5f 61 72 72 61 79 28 24 70 61 74 68 2c 20 5b 27 61 75 74 6f 6c 6f 61 64 65 72 2d 73 75 66 | in_array($path,.['autoloader-suf |
cfea0 | 66 69 78 27 2c 20 27 67 69 74 6c 61 62 2d 70 72 6f 74 6f 63 6f 6c 27 5d 2c 20 74 72 75 65 29 29 | fix',.'gitlab-protocol'],.true)) |
cfec0 | 20 7b 0a 24 74 79 70 65 20 3d 20 54 79 70 65 43 6f 6d 62 69 6e 61 74 6f 72 3a 3a 61 64 64 4e 75 | .{.$type.=.TypeCombinator::addNu |
cfee0 | 6c 6c 28 24 74 79 70 65 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 74 79 70 65 3b 0a 7d 0a 7d 0a | ll($type);.}..return.$type;.}.}. |
cff00 | 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a | <?php.declare(strict_types=1);.. |
cff20 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 50 48 50 | ..........namespace.Composer\PHP |
cff40 | 53 74 61 6e 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 44 65 70 65 6e 64 65 6e 63 79 52 65 | Stan;..use.Composer\DependencyRe |
cff60 | 73 6f 6c 76 65 72 5c 52 75 6c 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 | solver\Rule;.use.Composer\Packag |
cff80 | 65 5c 42 61 73 65 50 61 63 6b 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b | e\BasePackage;.use.Composer\Pack |
cffa0 | 61 67 65 5c 4c 69 6e 6b 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 65 6d 76 65 72 5c 43 6f | age\Link;.use.Composer\Semver\Co |
cffc0 | 6e 73 74 72 61 69 6e 74 5c 43 6f 6e 73 74 72 61 69 6e 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 | nstraint\ConstraintInterface;.us |
cffe0 | 65 20 50 68 70 50 61 72 73 65 72 5c 4e 6f 64 65 5c 45 78 70 72 5c 4d 65 74 68 6f 64 43 61 6c 6c | e.PhpParser\Node\Expr\MethodCall |
d0000 | 3b 0a 75 73 65 20 50 48 50 53 74 61 6e 5c 41 6e 61 6c 79 73 65 72 5c 53 63 6f 70 65 3b 0a 75 73 | ;.use.PHPStan\Analyser\Scope;.us |
d0020 | 65 20 50 48 50 53 74 61 6e 5c 52 65 66 6c 65 63 74 69 6f 6e 5c 4d 65 74 68 6f 64 52 65 66 6c 65 | e.PHPStan\Reflection\MethodRefle |
d0040 | 63 74 69 6f 6e 3b 0a 75 73 65 20 50 48 50 53 74 61 6e 5c 54 79 70 65 5c 41 63 63 65 73 73 6f 72 | ction;.use.PHPStan\Type\Accessor |
d0060 | 79 5c 41 63 63 65 73 73 6f 72 79 4e 6f 6e 45 6d 70 74 79 53 74 72 69 6e 67 54 79 70 65 3b 0a 75 | y\AccessoryNonEmptyStringType;.u |
d0080 | 73 65 20 50 48 50 53 74 61 6e 5c 54 79 70 65 5c 43 6f 6e 73 74 61 6e 74 5c 43 6f 6e 73 74 61 6e | se.PHPStan\Type\Constant\Constan |
d00a0 | 74 41 72 72 61 79 54 79 70 65 3b 0a 75 73 65 20 50 48 50 53 74 61 6e 5c 54 79 70 65 5c 43 6f 6e | tArrayType;.use.PHPStan\Type\Con |
d00c0 | 73 74 61 6e 74 5c 43 6f 6e 73 74 61 6e 74 53 74 72 69 6e 67 54 79 70 65 3b 0a 75 73 65 20 50 48 | stant\ConstantStringType;.use.PH |
d00e0 | 50 53 74 61 6e 5c 54 79 70 65 5c 43 6f 6e 73 74 61 6e 74 5c 43 6f 6e 73 74 61 6e 74 49 6e 74 65 | PStan\Type\Constant\ConstantInte |
d0100 | 67 65 72 54 79 70 65 3b 0a 75 73 65 20 50 48 50 53 74 61 6e 5c 54 79 70 65 5c 44 79 6e 61 6d 69 | gerType;.use.PHPStan\Type\Dynami |
d0120 | 63 4d 65 74 68 6f 64 52 65 74 75 72 6e 54 79 70 65 45 78 74 65 6e 73 69 6f 6e 3b 0a 75 73 65 20 | cMethodReturnTypeExtension;.use. |
d0140 | 50 48 50 53 74 61 6e 5c 54 79 70 65 5c 49 6e 74 65 67 65 72 54 79 70 65 3b 0a 75 73 65 20 50 48 | PHPStan\Type\IntegerType;.use.PH |
d0160 | 50 53 74 61 6e 5c 54 79 70 65 5c 53 74 72 69 6e 67 54 79 70 65 3b 0a 75 73 65 20 50 48 50 53 74 | PStan\Type\StringType;.use.PHPSt |
d0180 | 61 6e 5c 54 79 70 65 5c 54 79 70 65 3b 0a 75 73 65 20 50 48 50 53 74 61 6e 5c 54 79 70 65 5c 4f | an\Type\Type;.use.PHPStan\Type\O |
d01a0 | 62 6a 65 63 74 54 79 70 65 3b 0a 75 73 65 20 50 48 50 53 74 61 6e 5c 54 79 70 65 5c 54 79 70 65 | bjectType;.use.PHPStan\Type\Type |
d01c0 | 43 6f 6d 62 69 6e 61 74 6f 72 3b 0a 75 73 65 20 50 68 70 50 61 72 73 65 72 5c 4e 6f 64 65 5c 49 | Combinator;.use.PhpParser\Node\I |
d01e0 | 64 65 6e 74 69 66 69 65 72 3b 0a 0a 66 69 6e 61 6c 20 63 6c 61 73 73 20 52 75 6c 65 52 65 61 73 | dentifier;..final.class.RuleReas |
d0200 | 6f 6e 44 61 74 61 52 65 74 75 72 6e 54 79 70 65 45 78 74 65 6e 73 69 6f 6e 20 69 6d 70 6c 65 6d | onDataReturnTypeExtension.implem |
d0220 | 65 6e 74 73 20 44 79 6e 61 6d 69 63 4d 65 74 68 6f 64 52 65 74 75 72 6e 54 79 70 65 45 78 74 65 | ents.DynamicMethodReturnTypeExte |
d0240 | 6e 73 69 6f 6e 0a 7b 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 43 6c 61 73 73 | nsion.{.public.function.getClass |
d0260 | 28 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 52 75 6c 65 3a 3a 63 6c 61 73 73 3b | ():.string.{.return.Rule::class; |
d0280 | 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 4d 65 74 68 6f 64 53 75 70 70 | .}..public.function.isMethodSupp |
d02a0 | 6f 72 74 65 64 28 4d 65 74 68 6f 64 52 65 66 6c 65 63 74 69 6f 6e 20 24 6d 65 74 68 6f 64 52 65 | orted(MethodReflection.$methodRe |
d02c0 | 66 6c 65 63 74 69 6f 6e 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 73 74 72 74 6f 6c 6f | flection):.bool.{.return.strtolo |
d02e0 | 77 65 72 28 24 6d 65 74 68 6f 64 52 65 66 6c 65 63 74 69 6f 6e 2d 3e 67 65 74 4e 61 6d 65 28 29 | wer($methodReflection->getName() |
d0300 | 29 20 3d 3d 3d 20 27 67 65 74 72 65 61 73 6f 6e 64 61 74 61 27 3b 0a 7d 0a 0a 70 75 62 6c 69 63 | ).===.'getreasondata';.}..public |
d0320 | 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 54 79 70 65 46 72 6f 6d 4d 65 74 68 6f 64 43 61 6c 6c 28 | .function.getTypeFromMethodCall( |
d0340 | 4d 65 74 68 6f 64 52 65 66 6c 65 63 74 69 6f 6e 20 24 6d 65 74 68 6f 64 52 65 66 6c 65 63 74 69 | MethodReflection.$methodReflecti |
d0360 | 6f 6e 2c 20 4d 65 74 68 6f 64 43 61 6c 6c 20 24 6d 65 74 68 6f 64 43 61 6c 6c 2c 20 53 63 6f 70 | on,.MethodCall.$methodCall,.Scop |
d0380 | 65 20 24 73 63 6f 70 65 29 3a 20 54 79 70 65 0a 7b 0a 24 72 65 61 73 6f 6e 54 79 70 65 20 3d 20 | e.$scope):.Type.{.$reasonType.=. |
d03a0 | 24 73 63 6f 70 65 2d 3e 67 65 74 54 79 70 65 28 6e 65 77 20 4d 65 74 68 6f 64 43 61 6c 6c 28 24 | $scope->getType(new.MethodCall($ |
d03c0 | 6d 65 74 68 6f 64 43 61 6c 6c 2d 3e 76 61 72 2c 20 6e 65 77 20 49 64 65 6e 74 69 66 69 65 72 28 | methodCall->var,.new.Identifier( |
d03e0 | 27 67 65 74 52 65 61 73 6f 6e 27 29 29 29 3b 0a 0a 24 74 79 70 65 73 20 3d 20 5b 0a 52 75 6c 65 | 'getReason')));..$types.=.[.Rule |
d0400 | 3a 3a 52 55 4c 45 5f 52 4f 4f 54 5f 52 45 51 55 49 52 45 20 3d 3e 20 6e 65 77 20 43 6f 6e 73 74 | ::RULE_ROOT_REQUIRE.=>.new.Const |
d0420 | 61 6e 74 41 72 72 61 79 54 79 70 65 28 5b 6e 65 77 20 43 6f 6e 73 74 61 6e 74 53 74 72 69 6e 67 | antArrayType([new.ConstantString |
d0440 | 54 79 70 65 28 27 70 61 63 6b 61 67 65 4e 61 6d 65 27 29 2c 20 6e 65 77 20 43 6f 6e 73 74 61 6e | Type('packageName'),.new.Constan |
d0460 | 74 53 74 72 69 6e 67 54 79 70 65 28 27 63 6f 6e 73 74 72 61 69 6e 74 27 29 5d 2c 20 5b 6e 65 77 | tStringType('constraint')],.[new |
d0480 | 20 53 74 72 69 6e 67 54 79 70 65 2c 20 6e 65 77 20 4f 62 6a 65 63 74 54 79 70 65 28 43 6f 6e 73 | .StringType,.new.ObjectType(Cons |
d04a0 | 74 72 61 69 6e 74 49 6e 74 65 72 66 61 63 65 3a 3a 63 6c 61 73 73 29 5d 29 2c 0a 52 75 6c 65 3a | traintInterface::class)]),.Rule: |
d04c0 | 3a 52 55 4c 45 5f 46 49 58 45 44 20 3d 3e 20 6e 65 77 20 43 6f 6e 73 74 61 6e 74 41 72 72 61 79 | :RULE_FIXED.=>.new.ConstantArray |
d04e0 | 54 79 70 65 28 5b 6e 65 77 20 43 6f 6e 73 74 61 6e 74 53 74 72 69 6e 67 54 79 70 65 28 27 70 61 | Type([new.ConstantStringType('pa |
d0500 | 63 6b 61 67 65 27 29 5d 2c 20 5b 6e 65 77 20 4f 62 6a 65 63 74 54 79 70 65 28 42 61 73 65 50 61 | ckage')],.[new.ObjectType(BasePa |
d0520 | 63 6b 61 67 65 3a 3a 63 6c 61 73 73 29 5d 29 2c 0a 52 75 6c 65 3a 3a 52 55 4c 45 5f 50 41 43 4b | ckage::class)]),.Rule::RULE_PACK |
d0540 | 41 47 45 5f 43 4f 4e 46 4c 49 43 54 20 3d 3e 20 6e 65 77 20 4f 62 6a 65 63 74 54 79 70 65 28 4c | AGE_CONFLICT.=>.new.ObjectType(L |
d0560 | 69 6e 6b 3a 3a 63 6c 61 73 73 29 2c 0a 52 75 6c 65 3a 3a 52 55 4c 45 5f 50 41 43 4b 41 47 45 5f | ink::class),.Rule::RULE_PACKAGE_ |
d0580 | 52 45 51 55 49 52 45 53 20 3d 3e 20 6e 65 77 20 4f 62 6a 65 63 74 54 79 70 65 28 4c 69 6e 6b 3a | REQUIRES.=>.new.ObjectType(Link: |
d05a0 | 3a 63 6c 61 73 73 29 2c 0a 52 75 6c 65 3a 3a 52 55 4c 45 5f 50 41 43 4b 41 47 45 5f 53 41 4d 45 | :class),.Rule::RULE_PACKAGE_SAME |
d05c0 | 5f 4e 41 4d 45 20 3d 3e 20 54 79 70 65 43 6f 6d 62 69 6e 61 74 6f 72 3a 3a 69 6e 74 65 72 73 65 | _NAME.=>.TypeCombinator::interse |
d05e0 | 63 74 28 6e 65 77 20 53 74 72 69 6e 67 54 79 70 65 2c 20 6e 65 77 20 41 63 63 65 73 73 6f 72 79 | ct(new.StringType,.new.Accessory |
d0600 | 4e 6f 6e 45 6d 70 74 79 53 74 72 69 6e 67 54 79 70 65 28 29 29 2c 0a 52 75 6c 65 3a 3a 52 55 4c | NonEmptyStringType()),.Rule::RUL |
d0620 | 45 5f 4c 45 41 52 4e 45 44 20 3d 3e 20 6e 65 77 20 49 6e 74 65 67 65 72 54 79 70 65 28 29 2c 0a | E_LEARNED.=>.new.IntegerType(),. |
d0640 | 52 75 6c 65 3a 3a 52 55 4c 45 5f 50 41 43 4b 41 47 45 5f 41 4c 49 41 53 20 3d 3e 20 6e 65 77 20 | Rule::RULE_PACKAGE_ALIAS.=>.new. |
d0660 | 4f 62 6a 65 63 74 54 79 70 65 28 42 61 73 65 50 61 63 6b 61 67 65 3a 3a 63 6c 61 73 73 29 2c 0a | ObjectType(BasePackage::class),. |
d0680 | 52 75 6c 65 3a 3a 52 55 4c 45 5f 50 41 43 4b 41 47 45 5f 49 4e 56 45 52 53 45 5f 41 4c 49 41 53 | Rule::RULE_PACKAGE_INVERSE_ALIAS |
d06a0 | 20 3d 3e 20 6e 65 77 20 4f 62 6a 65 63 74 54 79 70 65 28 42 61 73 65 50 61 63 6b 61 67 65 3a 3a | .=>.new.ObjectType(BasePackage:: |
d06c0 | 63 6c 61 73 73 29 2c 0a 5d 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 74 79 70 65 73 20 61 73 20 24 | class),.];..foreach.($types.as.$ |
d06e0 | 63 6f 6e 73 74 20 3d 3e 20 24 74 79 70 65 29 20 7b 0a 69 66 20 28 28 6e 65 77 20 43 6f 6e 73 74 | const.=>.$type).{.if.((new.Const |
d0700 | 61 6e 74 49 6e 74 65 67 65 72 54 79 70 65 28 24 63 6f 6e 73 74 29 29 2d 3e 69 73 53 75 70 65 72 | antIntegerType($const))->isSuper |
d0720 | 54 79 70 65 4f 66 28 24 72 65 61 73 6f 6e 54 79 70 65 29 2d 3e 79 65 73 28 29 29 20 7b 0a 72 65 | TypeOf($reasonType)->yes()).{.re |
d0740 | 74 75 72 6e 20 24 74 79 70 65 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 54 79 70 65 43 6f 6d 62 | turn.$type;.}.}..return.TypeComb |
d0760 | 69 6e 61 74 6f 72 3a 3a 75 6e 69 6f 6e 28 2e 2e 2e 24 74 79 70 65 73 29 3b 0a 7d 0a 7d 0a 3c 3f | inator::union(...$types);.}.}.<? |
d0780 | 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a | php.declare(strict_types=1);.... |
d07a0 | 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 | ........namespace.Composer\Packa |
d07c0 | 67 65 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 65 6d 76 65 72 5c 43 6f 6e 73 74 72 61 | ge;..use.Composer\Semver\Constra |
d07e0 | 69 6e 74 5c 43 6f 6e 73 74 72 61 69 6e 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 | int\Constraint;.use.Composer\Pac |
d0800 | 6b 61 67 65 5c 56 65 72 73 69 6f 6e 5c 56 65 72 73 69 6f 6e 50 61 72 73 65 72 3b 0a 0a 0a 0a 0a | kage\Version\VersionParser;..... |
d0820 | 63 6c 61 73 73 20 41 6c 69 61 73 50 61 63 6b 61 67 65 20 65 78 74 65 6e 64 73 20 42 61 73 65 50 | class.AliasPackage.extends.BaseP |
d0840 | 61 63 6b 61 67 65 0a 7b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 76 65 72 73 69 6f 6e 3b 0a 0a 70 | ackage.{..protected.$version;..p |
d0860 | 72 6f 74 65 63 74 65 64 20 24 70 72 65 74 74 79 56 65 72 73 69 6f 6e 3b 0a 0a 70 72 6f 74 65 63 | rotected.$prettyVersion;..protec |
d0880 | 74 65 64 20 24 64 65 76 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 72 6f 6f 74 50 61 63 6b 61 67 | ted.$dev;..protected.$rootPackag |
d08a0 | 65 41 6c 69 61 73 20 3d 20 66 61 6c 73 65 3b 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 73 | eAlias.=.false;.....protected.$s |
d08c0 | 74 61 62 69 6c 69 74 79 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 68 61 73 53 65 6c 66 56 65 72 | tability;..protected.$hasSelfVer |
d08e0 | 73 69 6f 6e 52 65 71 75 69 72 65 73 20 3d 20 66 61 6c 73 65 3b 0a 0a 0a 70 72 6f 74 65 63 74 65 | sionRequires.=.false;...protecte |
d0900 | 64 20 24 61 6c 69 61 73 4f 66 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 72 65 71 75 69 72 65 73 | d.$aliasOf;..protected.$requires |
d0920 | 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 64 65 76 52 65 71 75 69 72 65 73 3b 0a 0a 70 72 6f 74 | ;..protected.$devRequires;..prot |
d0940 | 65 63 74 65 64 20 24 63 6f 6e 66 6c 69 63 74 73 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 70 72 | ected.$conflicts;..protected.$pr |
d0960 | 6f 76 69 64 65 73 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 72 65 70 6c 61 63 65 73 3b 0a 0a 0a | ovides;..protected.$replaces;... |
d0980 | 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 | ......public.function.__construc |
d09a0 | 74 28 42 61 73 65 50 61 63 6b 61 67 65 20 24 61 6c 69 61 73 4f 66 2c 20 73 74 72 69 6e 67 20 24 | t(BasePackage.$aliasOf,.string.$ |
d09c0 | 76 65 72 73 69 6f 6e 2c 20 73 74 72 69 6e 67 20 24 70 72 65 74 74 79 56 65 72 73 69 6f 6e 29 0a | version,.string.$prettyVersion). |
d09e0 | 7b 0a 70 61 72 65 6e 74 3a 3a 5f 5f 63 6f 6e 73 74 72 75 63 74 28 24 61 6c 69 61 73 4f 66 2d 3e | {.parent::__construct($aliasOf-> |
d0a00 | 67 65 74 4e 61 6d 65 28 29 29 3b 0a 0a 24 74 68 69 73 2d 3e 76 65 72 73 69 6f 6e 20 3d 20 24 76 | getName());..$this->version.=.$v |
d0a20 | 65 72 73 69 6f 6e 3b 0a 24 74 68 69 73 2d 3e 70 72 65 74 74 79 56 65 72 73 69 6f 6e 20 3d 20 24 | ersion;.$this->prettyVersion.=.$ |
d0a40 | 70 72 65 74 74 79 56 65 72 73 69 6f 6e 3b 0a 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 20 3d 20 | prettyVersion;.$this->aliasOf.=. |
d0a60 | 24 61 6c 69 61 73 4f 66 3b 0a 24 74 68 69 73 2d 3e 73 74 61 62 69 6c 69 74 79 20 3d 20 56 65 72 | $aliasOf;.$this->stability.=.Ver |
d0a80 | 73 69 6f 6e 50 61 72 73 65 72 3a 3a 70 61 72 73 65 53 74 61 62 69 6c 69 74 79 28 24 76 65 72 73 | sionParser::parseStability($vers |
d0aa0 | 69 6f 6e 29 3b 0a 24 74 68 69 73 2d 3e 64 65 76 20 3d 20 24 74 68 69 73 2d 3e 73 74 61 62 69 6c | ion);.$this->dev.=.$this->stabil |
d0ac0 | 69 74 79 20 3d 3d 3d 20 27 64 65 76 27 3b 0a 0a 66 6f 72 65 61 63 68 20 28 4c 69 6e 6b 3a 3a 24 | ity.===.'dev';..foreach.(Link::$ |
d0ae0 | 54 59 50 45 53 20 61 73 20 24 74 79 70 65 29 20 7b 0a 24 6c 69 6e 6b 73 20 3d 20 24 61 6c 69 61 | TYPES.as.$type).{.$links.=.$alia |
d0b00 | 73 4f 66 2d 3e 7b 27 67 65 74 27 20 2e 20 75 63 66 69 72 73 74 28 24 74 79 70 65 29 7d 28 29 3b | sOf->{'get'...ucfirst($type)}(); |
d0b20 | 0a 24 74 68 69 73 2d 3e 7b 24 74 79 70 65 7d 20 3d 20 24 74 68 69 73 2d 3e 72 65 70 6c 61 63 65 | .$this->{$type}.=.$this->replace |
d0b40 | 53 65 6c 66 56 65 72 73 69 6f 6e 44 65 70 65 6e 64 65 6e 63 69 65 73 28 24 6c 69 6e 6b 73 2c 20 | SelfVersionDependencies($links,. |
d0b60 | 24 74 79 70 65 29 3b 0a 7d 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 | $type);.}.}.....public.function. |
d0b80 | 67 65 74 41 6c 69 61 73 4f 66 28 29 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 61 6c 69 | getAliasOf().{.return.$this->ali |
d0ba0 | 61 73 4f 66 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 56 | asOf;.}.....public.function.getV |
d0bc0 | 65 72 73 69 6f 6e 28 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d | ersion():.string.{.return.$this- |
d0be0 | 3e 76 65 72 73 69 6f 6e 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 | >version;.}.....public.function. |
d0c00 | 67 65 74 53 74 61 62 69 6c 69 74 79 28 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 | getStability():.string.{.return. |
d0c20 | 24 74 68 69 73 2d 3e 73 74 61 62 69 6c 69 74 79 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 | $this->stability;.}.....public.f |
d0c40 | 75 6e 63 74 69 6f 6e 20 67 65 74 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 3a 20 73 74 72 69 | unction.getPrettyVersion():.stri |
d0c60 | 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 70 72 65 74 74 79 56 65 72 73 69 6f 6e | ng.{.return.$this->prettyVersion |
d0c80 | 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 44 65 76 28 29 3a | ;.}.....public.function.isDev(): |
d0ca0 | 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 64 65 76 3b 0a 7d 0a 0a 0a 0a | .bool.{.return.$this->dev;.}.... |
d0cc0 | 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 52 65 71 75 69 72 65 73 28 29 3a 20 | .public.function.getRequires():. |
d0ce0 | 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 72 65 71 75 69 72 65 73 3b 0a | array.{.return.$this->requires;. |
d0d00 | 7d 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 43 6f 6e 66 6c 69 | }......public.function.getConfli |
d0d20 | 63 74 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 63 6f 6e | cts():.array.{.return.$this->con |
d0d40 | 66 6c 69 63 74 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 | flicts;.}......public.function.g |
d0d60 | 65 74 50 72 6f 76 69 64 65 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 | etProvides():.array.{.return.$th |
d0d80 | 69 73 2d 3e 70 72 6f 76 69 64 65 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 | is->provides;.}......public.func |
d0da0 | 74 69 6f 6e 20 67 65 74 52 65 70 6c 61 63 65 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 | tion.getReplaces():.array.{.retu |
d0dc0 | 72 6e 20 24 74 68 69 73 2d 3e 72 65 70 6c 61 63 65 73 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 | rn.$this->replaces;.}.....public |
d0de0 | 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 44 65 76 52 65 71 75 69 72 65 73 28 29 3a 20 61 72 72 61 | .function.getDevRequires():.arra |
d0e00 | 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 64 65 76 52 65 71 75 69 72 65 73 3b 0a 7d | y.{.return.$this->devRequires;.} |
d0e20 | 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 52 6f 6f 74 50 61 | .......public.function.setRootPa |
d0e40 | 63 6b 61 67 65 41 6c 69 61 73 28 62 6f 6f 6c 20 24 76 61 6c 75 65 29 3a 20 76 6f 69 64 0a 7b 0a | ckageAlias(bool.$value):.void.{. |
d0e60 | 24 74 68 69 73 2d 3e 72 6f 6f 74 50 61 63 6b 61 67 65 41 6c 69 61 73 20 3d 20 24 76 61 6c 75 65 | $this->rootPackageAlias.=.$value |
d0e80 | 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 52 6f 6f 74 50 61 | ;.}.....public.function.isRootPa |
d0ea0 | 63 6b 61 67 65 41 6c 69 61 73 28 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 | ckageAlias():.bool.{.return.$thi |
d0ec0 | 73 2d 3e 72 6f 6f 74 50 61 63 6b 61 67 65 41 6c 69 61 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 72 | s->rootPackageAlias;.}........pr |
d0ee0 | 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 72 65 70 6c 61 63 65 53 65 6c 66 56 65 72 73 | otected.function.replaceSelfVers |
d0f00 | 69 6f 6e 44 65 70 65 6e 64 65 6e 63 69 65 73 28 61 72 72 61 79 20 24 6c 69 6e 6b 73 2c 20 24 6c | ionDependencies(array.$links,.$l |
d0f20 | 69 6e 6b 54 79 70 65 29 3a 20 61 72 72 61 79 0a 7b 0a 0a 24 70 72 65 74 74 79 56 65 72 73 69 6f | inkType):.array.{..$prettyVersio |
d0f40 | 6e 20 3d 20 24 74 68 69 73 2d 3e 70 72 65 74 74 79 56 65 72 73 69 6f 6e 3b 0a 69 66 20 28 24 70 | n.=.$this->prettyVersion;.if.($p |
d0f60 | 72 65 74 74 79 56 65 72 73 69 6f 6e 20 3d 3d 3d 20 56 65 72 73 69 6f 6e 50 61 72 73 65 72 3a 3a | rettyVersion.===.VersionParser:: |
d0f80 | 44 45 46 41 55 4c 54 5f 42 52 41 4e 43 48 5f 41 4c 49 41 53 29 20 7b 0a 24 70 72 65 74 74 79 56 | DEFAULT_BRANCH_ALIAS).{.$prettyV |
d0fa0 | 65 72 73 69 6f 6e 20 3d 20 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 67 65 74 50 72 65 74 | ersion.=.$this->aliasOf->getPret |
d0fc0 | 74 79 56 65 72 73 69 6f 6e 28 29 3b 0a 7d 0a 0a 69 66 20 28 5c 69 6e 5f 61 72 72 61 79 28 24 6c | tyVersion();.}..if.(\in_array($l |
d0fe0 | 69 6e 6b 54 79 70 65 2c 20 5b 4c 69 6e 6b 3a 3a 54 59 50 45 5f 43 4f 4e 46 4c 49 43 54 2c 20 4c | inkType,.[Link::TYPE_CONFLICT,.L |
d1000 | 69 6e 6b 3a 3a 54 59 50 45 5f 50 52 4f 56 49 44 45 2c 20 4c 69 6e 6b 3a 3a 54 59 50 45 5f 52 45 | ink::TYPE_PROVIDE,.Link::TYPE_RE |
d1020 | 50 4c 41 43 45 5d 2c 20 74 72 75 65 29 29 20 7b 0a 24 6e 65 77 4c 69 6e 6b 73 20 3d 20 5b 5d 3b | PLACE],.true)).{.$newLinks.=.[]; |
d1040 | 0a 66 6f 72 65 61 63 68 20 28 24 6c 69 6e 6b 73 20 61 73 20 24 6c 69 6e 6b 29 20 7b 0a 0a 69 66 | .foreach.($links.as.$link).{..if |
d1060 | 20 28 27 73 65 6c 66 2e 76 65 72 73 69 6f 6e 27 20 3d 3d 3d 20 24 6c 69 6e 6b 2d 3e 67 65 74 50 | .('self.version'.===.$link->getP |
d1080 | 72 65 74 74 79 43 6f 6e 73 74 72 61 69 6e 74 28 29 29 20 7b 0a 24 6e 65 77 4c 69 6e 6b 73 5b 5d | rettyConstraint()).{.$newLinks[] |
d10a0 | 20 3d 20 6e 65 77 20 4c 69 6e 6b 28 24 6c 69 6e 6b 2d 3e 67 65 74 53 6f 75 72 63 65 28 29 2c 20 | .=.new.Link($link->getSource(),. |
d10c0 | 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 74 28 29 2c 20 24 63 6f 6e 73 74 72 61 69 6e 74 20 | $link->getTarget(),.$constraint. |
d10e0 | 3d 20 6e 65 77 20 43 6f 6e 73 74 72 61 69 6e 74 28 27 3d 27 2c 20 24 74 68 69 73 2d 3e 76 65 72 | =.new.Constraint('=',.$this->ver |
d1100 | 73 69 6f 6e 29 2c 20 24 6c 69 6e 6b 54 79 70 65 2c 20 24 70 72 65 74 74 79 56 65 72 73 69 6f 6e | sion),.$linkType,.$prettyVersion |
d1120 | 29 3b 0a 24 63 6f 6e 73 74 72 61 69 6e 74 2d 3e 73 65 74 50 72 65 74 74 79 53 74 72 69 6e 67 28 | );.$constraint->setPrettyString( |
d1140 | 24 70 72 65 74 74 79 56 65 72 73 69 6f 6e 29 3b 0a 7d 0a 7d 0a 24 6c 69 6e 6b 73 20 3d 20 61 72 | $prettyVersion);.}.}.$links.=.ar |
d1160 | 72 61 79 5f 6d 65 72 67 65 28 24 6c 69 6e 6b 73 2c 20 24 6e 65 77 4c 69 6e 6b 73 29 3b 0a 7d 20 | ray_merge($links,.$newLinks);.}. |
d1180 | 65 6c 73 65 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 6c 69 6e 6b 73 20 61 73 20 24 69 6e 64 65 78 | else.{.foreach.($links.as.$index |
d11a0 | 20 3d 3e 20 24 6c 69 6e 6b 29 20 7b 0a 69 66 20 28 27 73 65 6c 66 2e 76 65 72 73 69 6f 6e 27 20 | .=>.$link).{.if.('self.version'. |
d11c0 | 3d 3d 3d 20 24 6c 69 6e 6b 2d 3e 67 65 74 50 72 65 74 74 79 43 6f 6e 73 74 72 61 69 6e 74 28 29 | ===.$link->getPrettyConstraint() |
d11e0 | 29 20 7b 0a 69 66 20 28 24 6c 69 6e 6b 54 79 70 65 20 3d 3d 3d 20 4c 69 6e 6b 3a 3a 54 59 50 45 | ).{.if.($linkType.===.Link::TYPE |
d1200 | 5f 52 45 51 55 49 52 45 29 20 7b 0a 24 74 68 69 73 2d 3e 68 61 73 53 65 6c 66 56 65 72 73 69 6f | _REQUIRE).{.$this->hasSelfVersio |
d1220 | 6e 52 65 71 75 69 72 65 73 20 3d 20 74 72 75 65 3b 0a 7d 0a 24 6c 69 6e 6b 73 5b 24 69 6e 64 65 | nRequires.=.true;.}.$links[$inde |
d1240 | 78 5d 20 3d 20 6e 65 77 20 4c 69 6e 6b 28 24 6c 69 6e 6b 2d 3e 67 65 74 53 6f 75 72 63 65 28 29 | x].=.new.Link($link->getSource() |
d1260 | 2c 20 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 74 28 29 2c 20 24 63 6f 6e 73 74 72 61 69 6e | ,.$link->getTarget(),.$constrain |
d1280 | 74 20 3d 20 6e 65 77 20 43 6f 6e 73 74 72 61 69 6e 74 28 27 3d 27 2c 20 24 74 68 69 73 2d 3e 76 | t.=.new.Constraint('=',.$this->v |
d12a0 | 65 72 73 69 6f 6e 29 2c 20 24 6c 69 6e 6b 54 79 70 65 2c 20 24 70 72 65 74 74 79 56 65 72 73 69 | ersion),.$linkType,.$prettyVersi |
d12c0 | 6f 6e 29 3b 0a 24 63 6f 6e 73 74 72 61 69 6e 74 2d 3e 73 65 74 50 72 65 74 74 79 53 74 72 69 6e | on);.$constraint->setPrettyStrin |
d12e0 | 67 28 24 70 72 65 74 74 79 56 65 72 73 69 6f 6e 29 3b 0a 7d 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e | g($prettyVersion);.}.}.}..return |
d1300 | 20 24 6c 69 6e 6b 73 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 68 61 73 53 | .$links;.}..public.function.hasS |
d1320 | 65 6c 66 56 65 72 73 69 6f 6e 52 65 71 75 69 72 65 73 28 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 65 74 | elfVersionRequires():.bool.{.ret |
d1340 | 75 72 6e 20 24 74 68 69 73 2d 3e 68 61 73 53 65 6c 66 56 65 72 73 69 6f 6e 52 65 71 75 69 72 65 | urn.$this->hasSelfVersionRequire |
d1360 | 73 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 74 6f 53 74 72 69 6e 67 | s;.}..public.function.__toString |
d1380 | 28 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 70 61 72 65 6e 74 3a 3a 5f 5f 74 6f | ():.string.{.return.parent::__to |
d13a0 | 53 74 72 69 6e 67 28 29 2e 27 20 28 27 2e 28 24 74 68 69 73 2d 3e 72 6f 6f 74 50 61 63 6b 61 67 | String().'.('.($this->rootPackag |
d13c0 | 65 41 6c 69 61 73 20 3f 20 27 72 6f 6f 74 20 27 20 3a 20 27 27 29 2e 20 27 61 6c 69 61 73 20 6f | eAlias.?.'root.'.:.'')..'alias.o |
d13e0 | 66 20 27 2e 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 | f.'.$this->aliasOf->getVersion() |
d1400 | 2e 27 29 27 3b 0a 7d 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 | .')';.}......public.function.get |
d1420 | 54 79 70 65 28 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 61 | Type():.string.{.return.$this->a |
d1440 | 6c 69 61 73 4f 66 2d 3e 67 65 74 54 79 70 65 28 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e | liasOf->getType();.}..public.fun |
d1460 | 63 74 69 6f 6e 20 67 65 74 54 61 72 67 65 74 44 69 72 28 29 3a 20 3f 73 74 72 69 6e 67 0a 7b 0a | ction.getTargetDir():.?string.{. |
d1480 | 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 67 65 74 54 61 72 67 65 74 | return.$this->aliasOf->getTarget |
d14a0 | 44 69 72 28 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 45 78 74 | Dir();.}..public.function.getExt |
d14c0 | 72 61 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 61 6c 69 61 | ra():.array.{.return.$this->alia |
d14e0 | 73 4f 66 2d 3e 67 65 74 45 78 74 72 61 28 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 | sOf->getExtra();.}..public.funct |
d1500 | 69 6f 6e 20 73 65 74 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 53 6f 75 72 63 65 28 3f 73 74 72 69 6e | ion.setInstallationSource(?strin |
d1520 | 67 20 24 74 79 70 65 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d | g.$type):.void.{.$this->aliasOf- |
d1540 | 3e 73 65 74 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 53 6f 75 72 63 65 28 24 74 79 70 65 29 3b 0a 7d | >setInstallationSource($type);.} |
d1560 | 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 49 6e 73 74 61 6c 6c 61 74 69 6f | ..public.function.getInstallatio |
d1580 | 6e 53 6f 75 72 63 65 28 29 3a 20 3f 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 | nSource():.?string.{.return.$thi |
d15a0 | 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 67 65 74 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 53 6f 75 72 63 | s->aliasOf->getInstallationSourc |
d15c0 | 65 28 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 53 6f 75 72 63 | e();.}..public.function.getSourc |
d15e0 | 65 54 79 70 65 28 29 3a 20 3f 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d | eType():.?string.{.return.$this- |
d1600 | 3e 61 6c 69 61 73 4f 66 2d 3e 67 65 74 53 6f 75 72 63 65 54 79 70 65 28 29 3b 0a 7d 0a 0a 70 75 | >aliasOf->getSourceType();.}..pu |
d1620 | 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 53 6f 75 72 63 65 55 72 6c 28 29 3a 20 3f 73 | blic.function.getSourceUrl():.?s |
d1640 | 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 67 | tring.{.return.$this->aliasOf->g |
d1660 | 65 74 53 6f 75 72 63 65 55 72 6c 28 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f | etSourceUrl();.}..public.functio |
d1680 | 6e 20 67 65 74 53 6f 75 72 63 65 55 72 6c 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 | n.getSourceUrls():.array.{.retur |
d16a0 | 6e 20 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 67 65 74 53 6f 75 72 63 65 55 72 6c 73 28 | n.$this->aliasOf->getSourceUrls( |
d16c0 | 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 53 6f 75 72 63 65 52 | );.}..public.function.getSourceR |
d16e0 | 65 66 65 72 65 6e 63 65 28 29 3a 20 3f 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 | eference():.?string.{.return.$th |
d1700 | 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 67 65 74 53 6f 75 72 63 65 52 65 66 65 72 65 6e 63 65 28 | is->aliasOf->getSourceReference( |
d1720 | 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 53 6f 75 72 63 65 52 | );.}..public.function.setSourceR |
d1740 | 65 66 65 72 65 6e 63 65 28 3f 73 74 72 69 6e 67 20 24 72 65 66 65 72 65 6e 63 65 29 3a 20 76 6f | eference(?string.$reference):.vo |
d1760 | 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 73 65 74 53 6f 75 72 63 65 52 65 | id.{.$this->aliasOf->setSourceRe |
d1780 | 66 65 72 65 6e 63 65 28 24 72 65 66 65 72 65 6e 63 65 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 | ference($reference);.}..public.f |
d17a0 | 75 6e 63 74 69 6f 6e 20 73 65 74 53 6f 75 72 63 65 4d 69 72 72 6f 72 73 28 3f 61 72 72 61 79 20 | unction.setSourceMirrors(?array. |
d17c0 | 24 6d 69 72 72 6f 72 73 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 | $mirrors):.void.{.$this->aliasOf |
d17e0 | 2d 3e 73 65 74 53 6f 75 72 63 65 4d 69 72 72 6f 72 73 28 24 6d 69 72 72 6f 72 73 29 3b 0a 7d 0a | ->setSourceMirrors($mirrors);.}. |
d1800 | 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 53 6f 75 72 63 65 4d 69 72 72 6f 72 | .public.function.getSourceMirror |
d1820 | 73 28 29 3a 20 3f 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 61 6c 69 61 | s():.?array.{.return.$this->alia |
d1840 | 73 4f 66 2d 3e 67 65 74 53 6f 75 72 63 65 4d 69 72 72 6f 72 73 28 29 3b 0a 7d 0a 0a 70 75 62 6c | sOf->getSourceMirrors();.}..publ |
d1860 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 44 69 73 74 54 79 70 65 28 29 3a 20 3f 73 74 72 69 | ic.function.getDistType():.?stri |
d1880 | 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 67 65 74 44 | ng.{.return.$this->aliasOf->getD |
d18a0 | 69 73 74 54 79 70 65 28 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 | istType();.}..public.function.ge |
d18c0 | 74 44 69 73 74 55 72 6c 28 29 3a 20 3f 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 | tDistUrl():.?string.{.return.$th |
d18e0 | 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 67 65 74 44 69 73 74 55 72 6c 28 29 3b 0a 7d 0a 0a 70 75 | is->aliasOf->getDistUrl();.}..pu |
d1900 | 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 44 69 73 74 55 72 6c 73 28 29 3a 20 61 72 72 | blic.function.getDistUrls():.arr |
d1920 | 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 67 65 74 44 | ay.{.return.$this->aliasOf->getD |
d1940 | 69 73 74 55 72 6c 73 28 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 | istUrls();.}..public.function.ge |
d1960 | 74 44 69 73 74 52 65 66 65 72 65 6e 63 65 28 29 3a 20 3f 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 | tDistReference():.?string.{.retu |
d1980 | 72 6e 20 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 67 65 74 44 69 73 74 52 65 66 65 72 65 | rn.$this->aliasOf->getDistRefere |
d19a0 | 6e 63 65 28 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 44 69 73 | nce();.}..public.function.setDis |
d19c0 | 74 52 65 66 65 72 65 6e 63 65 28 3f 73 74 72 69 6e 67 20 24 72 65 66 65 72 65 6e 63 65 29 3a 20 | tReference(?string.$reference):. |
d19e0 | 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 73 65 74 44 69 73 74 52 65 | void.{.$this->aliasOf->setDistRe |
d1a00 | 66 65 72 65 6e 63 65 28 24 72 65 66 65 72 65 6e 63 65 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 | ference($reference);.}..public.f |
d1a20 | 75 6e 63 74 69 6f 6e 20 67 65 74 44 69 73 74 53 68 61 31 43 68 65 63 6b 73 75 6d 28 29 3a 20 3f | unction.getDistSha1Checksum():.? |
d1a40 | 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e | string.{.return.$this->aliasOf-> |
d1a60 | 67 65 74 44 69 73 74 53 68 61 31 43 68 65 63 6b 73 75 6d 28 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 | getDistSha1Checksum();.}..public |
d1a80 | 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 54 72 61 6e 73 70 6f 72 74 4f 70 74 69 6f 6e 73 28 61 72 | .function.setTransportOptions(ar |
d1aa0 | 72 61 79 20 24 6f 70 74 69 6f 6e 73 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 61 6c 69 | ray.$options):.void.{.$this->ali |
d1ac0 | 61 73 4f 66 2d 3e 73 65 74 54 72 61 6e 73 70 6f 72 74 4f 70 74 69 6f 6e 73 28 24 6f 70 74 69 6f | asOf->setTransportOptions($optio |
d1ae0 | 6e 73 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 54 72 61 6e 73 | ns);.}..public.function.getTrans |
d1b00 | 70 6f 72 74 4f 70 74 69 6f 6e 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 | portOptions():.array.{.return.$t |
d1b20 | 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 67 65 74 54 72 61 6e 73 70 6f 72 74 4f 70 74 69 6f 6e | his->aliasOf->getTransportOption |
d1b40 | 73 28 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 44 69 73 74 4d | s();.}..public.function.setDistM |
d1b60 | 69 72 72 6f 72 73 28 3f 61 72 72 61 79 20 24 6d 69 72 72 6f 72 73 29 3a 20 76 6f 69 64 0a 7b 0a | irrors(?array.$mirrors):.void.{. |
d1b80 | 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 73 65 74 44 69 73 74 4d 69 72 72 6f 72 73 28 24 | $this->aliasOf->setDistMirrors($ |
d1ba0 | 6d 69 72 72 6f 72 73 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 | mirrors);.}..public.function.get |
d1bc0 | 44 69 73 74 4d 69 72 72 6f 72 73 28 29 3a 20 3f 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 | DistMirrors():.?array.{.return.$ |
d1be0 | 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 67 65 74 44 69 73 74 4d 69 72 72 6f 72 73 28 29 3b | this->aliasOf->getDistMirrors(); |
d1c00 | 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 41 75 74 6f 6c 6f 61 64 28 | .}..public.function.getAutoload( |
d1c20 | 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 | ):.array.{.return.$this->aliasOf |
d1c40 | 2d 3e 67 65 74 41 75 74 6f 6c 6f 61 64 28 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 | ->getAutoload();.}..public.funct |
d1c60 | 69 6f 6e 20 67 65 74 44 65 76 41 75 74 6f 6c 6f 61 64 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 | ion.getDevAutoload():.array.{.re |
d1c80 | 74 75 72 6e 20 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 67 65 74 44 65 76 41 75 74 6f 6c | turn.$this->aliasOf->getDevAutol |
d1ca0 | 6f 61 64 28 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 49 6e 63 | oad();.}..public.function.getInc |
d1cc0 | 6c 75 64 65 50 61 74 68 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 | ludePaths():.array.{.return.$thi |
d1ce0 | 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 67 65 74 49 6e 63 6c 75 64 65 50 61 74 68 73 28 29 3b 0a 7d | s->aliasOf->getIncludePaths();.} |
d1d00 | 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 52 65 6c 65 61 73 65 44 61 74 65 | ..public.function.getReleaseDate |
d1d20 | 28 29 3a 20 3f 5c 44 61 74 65 54 69 6d 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 72 65 74 75 72 6e | ():.?\DateTimeInterface.{.return |
d1d40 | 20 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 67 65 74 52 65 6c 65 61 73 65 44 61 74 65 28 | .$this->aliasOf->getReleaseDate( |
d1d60 | 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 42 69 6e 61 72 69 65 | );.}..public.function.getBinarie |
d1d80 | 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 61 6c 69 61 73 | s():.array.{.return.$this->alias |
d1da0 | 4f 66 2d 3e 67 65 74 42 69 6e 61 72 69 65 73 28 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e | Of->getBinaries();.}..public.fun |
d1dc0 | 63 74 69 6f 6e 20 67 65 74 53 75 67 67 65 73 74 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 | ction.getSuggests():.array.{.ret |
d1de0 | 75 72 6e 20 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 67 65 74 53 75 67 67 65 73 74 73 28 | urn.$this->aliasOf->getSuggests( |
d1e00 | 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 4e 6f 74 69 66 69 63 | );.}..public.function.getNotific |
d1e20 | 61 74 69 6f 6e 55 72 6c 28 29 3a 20 3f 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 | ationUrl():.?string.{.return.$th |
d1e40 | 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 67 65 74 4e 6f 74 69 66 69 63 61 74 69 6f 6e 55 72 6c 28 | is->aliasOf->getNotificationUrl( |
d1e60 | 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 44 65 66 61 75 6c 74 42 | );.}..public.function.isDefaultB |
d1e80 | 72 61 6e 63 68 28 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 61 6c | ranch():.bool.{.return.$this->al |
d1ea0 | 69 61 73 4f 66 2d 3e 69 73 44 65 66 61 75 6c 74 42 72 61 6e 63 68 28 29 3b 0a 7d 0a 0a 70 75 62 | iasOf->isDefaultBranch();.}..pub |
d1ec0 | 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 44 69 73 74 55 72 6c 28 3f 73 74 72 69 6e 67 20 | lic.function.setDistUrl(?string. |
d1ee0 | 24 75 72 6c 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 73 65 | $url):.void.{.$this->aliasOf->se |
d1f00 | 74 44 69 73 74 55 72 6c 28 24 75 72 6c 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 | tDistUrl($url);.}..public.functi |
d1f20 | 6f 6e 20 73 65 74 44 69 73 74 54 79 70 65 28 3f 73 74 72 69 6e 67 20 24 74 79 70 65 29 3a 20 76 | on.setDistType(?string.$type):.v |
d1f40 | 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 73 65 74 44 69 73 74 54 79 70 | oid.{.$this->aliasOf->setDistTyp |
d1f60 | 65 28 24 74 79 70 65 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 | e($type);.}..public.function.set |
d1f80 | 53 6f 75 72 63 65 44 69 73 74 52 65 66 65 72 65 6e 63 65 73 28 73 74 72 69 6e 67 20 24 72 65 66 | SourceDistReferences(string.$ref |
d1fa0 | 65 72 65 6e 63 65 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e | erence):.void.{.$this->aliasOf-> |
d1fc0 | 73 65 74 53 6f 75 72 63 65 44 69 73 74 52 65 66 65 72 65 6e 63 65 73 28 24 72 65 66 65 72 65 6e | setSourceDistReferences($referen |
d1fe0 | 63 65 29 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 | ce);.}.}.<?php.declare(strict_ty |
d2000 | 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d | pes=1);............namespace.Com |
d2020 | 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 41 72 63 68 69 76 65 72 3b 0a 0a 75 73 65 20 46 69 6c | poser\Package\Archiver;..use.Fil |
d2040 | 74 65 72 49 74 65 72 61 74 6f 72 3b 0a 75 73 65 20 50 68 61 72 44 61 74 61 3b 0a 0a 63 6c 61 73 | terIterator;.use.PharData;..clas |
d2060 | 73 20 41 72 63 68 69 76 61 62 6c 65 46 69 6c 65 73 46 69 6c 74 65 72 20 65 78 74 65 6e 64 73 20 | s.ArchivableFilesFilter.extends. |
d2080 | 46 69 6c 74 65 72 49 74 65 72 61 74 6f 72 0a 7b 0a 0a 70 72 69 76 61 74 65 20 24 64 69 72 73 20 | FilterIterator.{..private.$dirs. |
d20a0 | 3d 20 5b 5d 3b 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 61 63 63 65 70 74 | =.[];.....public.function.accept |
d20c0 | 28 29 3a 20 62 6f 6f 6c 0a 7b 0a 24 66 69 6c 65 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 49 6e 6e | ():.bool.{.$file.=.$this->getInn |
d20e0 | 65 72 49 74 65 72 61 74 6f 72 28 29 2d 3e 63 75 72 72 65 6e 74 28 29 3b 0a 69 66 20 28 24 66 69 | erIterator()->current();.if.($fi |
d2100 | 6c 65 2d 3e 69 73 44 69 72 28 29 29 20 7b 0a 24 74 68 69 73 2d 3e 64 69 72 73 5b 5d 20 3d 20 28 | le->isDir()).{.$this->dirs[].=.( |
d2120 | 73 74 72 69 6e 67 29 20 24 66 69 6c 65 3b 0a 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a | string).$file;..return.false;.}. |
d2140 | 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e | .return.true;.}..public.function |
d2160 | 20 61 64 64 45 6d 70 74 79 44 69 72 28 50 68 61 72 44 61 74 61 20 24 70 68 61 72 2c 20 73 74 72 | .addEmptyDir(PharData.$phar,.str |
d2180 | 69 6e 67 20 24 73 6f 75 72 63 65 73 29 3a 20 76 6f 69 64 0a 7b 0a 66 6f 72 65 61 63 68 20 28 24 | ing.$sources):.void.{.foreach.($ |
d21a0 | 74 68 69 73 2d 3e 64 69 72 73 20 61 73 20 24 66 69 6c 65 70 61 74 68 29 20 7b 0a 24 6c 6f 63 61 | this->dirs.as.$filepath).{.$loca |
d21c0 | 6c 6e 61 6d 65 20 3d 20 73 74 72 5f 72 65 70 6c 61 63 65 28 24 73 6f 75 72 63 65 73 20 2e 20 22 | lname.=.str_replace($sources..." |
d21e0 | 2f 22 2c 20 27 27 2c 20 24 66 69 6c 65 70 61 74 68 29 3b 0a 24 70 68 61 72 2d 3e 61 64 64 45 6d | /",.'',.$filepath);.$phar->addEm |
d2200 | 70 74 79 44 69 72 28 24 6c 6f 63 61 6c 6e 61 6d 65 29 3b 0a 7d 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 | ptyDir($localname);.}.}.}.<?php. |
d2220 | 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a | declare(strict_types=1);........ |
d2240 | 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 41 | ....namespace.Composer\Package\A |
d2260 | 72 63 68 69 76 65 72 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 63 72 65 5c 50 72 65 67 | rchiver;..use.Composer\Pcre\Preg |
d2280 | 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 46 69 6c 65 73 79 73 74 65 6d 3b 0a | ;.use.Composer\Util\Filesystem;. |
d22a0 | 75 73 65 20 46 69 6c 65 73 79 73 74 65 6d 49 74 65 72 61 74 6f 72 3b 0a 75 73 65 20 53 79 6d 66 | use.FilesystemIterator;.use.Symf |
d22c0 | 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 46 69 6e 64 65 72 5c 46 69 6e 64 65 72 3b 0a 75 73 65 | ony\Component\Finder\Finder;.use |
d22e0 | 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 46 69 6e 64 65 72 5c 53 70 6c 46 69 6c | .Symfony\Component\Finder\SplFil |
d2300 | 65 49 6e 66 6f 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 41 72 63 68 69 76 61 62 6c 65 | eInfo;..........class.Archivable |
d2320 | 46 69 6c 65 73 46 69 6e 64 65 72 20 65 78 74 65 6e 64 73 20 5c 46 69 6c 74 65 72 49 74 65 72 61 | FilesFinder.extends.\FilterItera |
d2340 | 74 6f 72 0a 7b 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 66 69 6e 64 65 72 3b 0a 0a 0a 0a 0a | tor.{....protected.$finder;..... |
d2360 | 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 | ....public.function.__construct( |
d2380 | 73 74 72 69 6e 67 20 24 73 6f 75 72 63 65 73 2c 20 61 72 72 61 79 20 24 65 78 63 6c 75 64 65 73 | string.$sources,.array.$excludes |
d23a0 | 2c 20 62 6f 6f 6c 20 24 69 67 6e 6f 72 65 46 69 6c 74 65 72 73 20 3d 20 66 61 6c 73 65 29 0a 7b | ,.bool.$ignoreFilters.=.false).{ |
d23c0 | 0a 24 66 73 20 3d 20 6e 65 77 20 46 69 6c 65 73 79 73 74 65 6d 28 29 3b 0a 0a 24 73 6f 75 72 63 | .$fs.=.new.Filesystem();..$sourc |
d23e0 | 65 73 20 3d 20 24 66 73 2d 3e 6e 6f 72 6d 61 6c 69 7a 65 50 61 74 68 28 72 65 61 6c 70 61 74 68 | es.=.$fs->normalizePath(realpath |
d2400 | 28 24 73 6f 75 72 63 65 73 29 29 3b 0a 0a 69 66 20 28 24 69 67 6e 6f 72 65 46 69 6c 74 65 72 73 | ($sources));..if.($ignoreFilters |
d2420 | 29 20 7b 0a 24 66 69 6c 74 65 72 73 20 3d 20 5b 5d 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 66 69 6c | ).{.$filters.=.[];.}.else.{.$fil |
d2440 | 74 65 72 73 20 3d 20 5b 0a 6e 65 77 20 47 69 74 45 78 63 6c 75 64 65 46 69 6c 74 65 72 28 24 73 | ters.=.[.new.GitExcludeFilter($s |
d2460 | 6f 75 72 63 65 73 29 2c 0a 6e 65 77 20 43 6f 6d 70 6f 73 65 72 45 78 63 6c 75 64 65 46 69 6c 74 | ources),.new.ComposerExcludeFilt |
d2480 | 65 72 28 24 73 6f 75 72 63 65 73 2c 20 24 65 78 63 6c 75 64 65 73 29 2c 0a 5d 3b 0a 7d 0a 0a 24 | er($sources,.$excludes),.];.}..$ |
d24a0 | 74 68 69 73 2d 3e 66 69 6e 64 65 72 20 3d 20 6e 65 77 20 46 69 6e 64 65 72 28 29 3b 0a 0a 24 66 | this->finder.=.new.Finder();..$f |
d24c0 | 69 6c 74 65 72 20 3d 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 5c 53 70 6c 46 69 6c | ilter.=.static.function.(\SplFil |
d24e0 | 65 49 6e 66 6f 20 24 66 69 6c 65 29 20 75 73 65 20 28 24 73 6f 75 72 63 65 73 2c 20 24 66 69 6c | eInfo.$file).use.($sources,.$fil |
d2500 | 74 65 72 73 2c 20 24 66 73 29 3a 20 62 6f 6f 6c 20 7b 0a 69 66 20 28 24 66 69 6c 65 2d 3e 69 73 | ters,.$fs):.bool.{.if.($file->is |
d2520 | 4c 69 6e 6b 28 29 20 26 26 20 28 24 66 69 6c 65 2d 3e 67 65 74 52 65 61 6c 50 61 74 68 28 29 20 | Link().&&.($file->getRealPath(). |
d2540 | 3d 3d 3d 20 66 61 6c 73 65 20 7c 7c 20 73 74 72 70 6f 73 28 24 66 69 6c 65 2d 3e 67 65 74 52 65 | ===.false.||.strpos($file->getRe |
d2560 | 61 6c 50 61 74 68 28 29 2c 20 24 73 6f 75 72 63 65 73 29 20 21 3d 3d 20 30 29 29 20 7b 0a 72 65 | alPath(),.$sources).!==.0)).{.re |
d2580 | 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 24 72 65 6c 61 74 69 76 65 50 61 74 68 20 3d 20 50 | turn.false;.}..$relativePath.=.P |
d25a0 | 72 65 67 3a 3a 72 65 70 6c 61 63 65 28 0a 27 23 5e 27 2e 70 72 65 67 5f 71 75 6f 74 65 28 24 73 | reg::replace(.'#^'.preg_quote($s |
d25c0 | 6f 75 72 63 65 73 2c 20 27 23 27 29 2e 27 23 27 2c 0a 27 27 2c 0a 24 66 73 2d 3e 6e 6f 72 6d 61 | ources,.'#').'#',.'',.$fs->norma |
d25e0 | 6c 69 7a 65 50 61 74 68 28 24 66 69 6c 65 2d 3e 67 65 74 52 65 61 6c 50 61 74 68 28 29 29 0a 29 | lizePath($file->getRealPath()).) |
d2600 | 3b 0a 0a 24 65 78 63 6c 75 64 65 20 3d 20 66 61 6c 73 65 3b 0a 66 6f 72 65 61 63 68 20 28 24 66 | ;..$exclude.=.false;.foreach.($f |
d2620 | 69 6c 74 65 72 73 20 61 73 20 24 66 69 6c 74 65 72 29 20 7b 0a 24 65 78 63 6c 75 64 65 20 3d 20 | ilters.as.$filter).{.$exclude.=. |
d2640 | 24 66 69 6c 74 65 72 2d 3e 66 69 6c 74 65 72 28 24 72 65 6c 61 74 69 76 65 50 61 74 68 2c 20 24 | $filter->filter($relativePath,.$ |
d2660 | 65 78 63 6c 75 64 65 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 21 24 65 78 63 6c 75 64 65 3b 0a 7d | exclude);.}..return.!$exclude;.} |
d2680 | 3b 0a 0a 69 66 20 28 6d 65 74 68 6f 64 5f 65 78 69 73 74 73 28 24 66 69 6c 74 65 72 2c 20 27 62 | ;..if.(method_exists($filter,.'b |
d26a0 | 69 6e 64 54 6f 27 29 29 20 7b 0a 24 66 69 6c 74 65 72 20 3d 20 24 66 69 6c 74 65 72 2d 3e 62 69 | indTo')).{.$filter.=.$filter->bi |
d26c0 | 6e 64 54 6f 28 6e 75 6c 6c 29 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 66 69 6e 64 65 72 0a 2d 3e 69 | ndTo(null);.}..$this->finder.->i |
d26e0 | 6e 28 24 73 6f 75 72 63 65 73 29 0a 2d 3e 66 69 6c 74 65 72 28 24 66 69 6c 74 65 72 29 0a 2d 3e | n($sources).->filter($filter).-> |
d2700 | 69 67 6e 6f 72 65 56 43 53 28 74 72 75 65 29 0a 2d 3e 69 67 6e 6f 72 65 44 6f 74 46 69 6c 65 73 | ignoreVCS(true).->ignoreDotFiles |
d2720 | 28 66 61 6c 73 65 29 0a 2d 3e 73 6f 72 74 42 79 4e 61 6d 65 28 29 3b 0a 0a 70 61 72 65 6e 74 3a | (false).->sortByName();..parent: |
d2740 | 3a 5f 5f 63 6f 6e 73 74 72 75 63 74 28 24 74 68 69 73 2d 3e 66 69 6e 64 65 72 2d 3e 67 65 74 49 | :__construct($this->finder->getI |
d2760 | 74 65 72 61 74 6f 72 28 29 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 61 | terator());.}..public.function.a |
d2780 | 63 63 65 70 74 28 29 3a 20 62 6f 6f 6c 0a 7b 0a 0a 24 63 75 72 72 65 6e 74 20 3d 20 24 74 68 69 | ccept():.bool.{..$current.=.$thi |
d27a0 | 73 2d 3e 67 65 74 49 6e 6e 65 72 49 74 65 72 61 74 6f 72 28 29 2d 3e 63 75 72 72 65 6e 74 28 29 | s->getInnerIterator()->current() |
d27c0 | 3b 0a 0a 69 66 20 28 21 24 63 75 72 72 65 6e 74 2d 3e 69 73 44 69 72 28 29 29 20 7b 0a 72 65 74 | ;..if.(!$current->isDir()).{.ret |
d27e0 | 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 0a 24 69 74 65 72 61 74 6f 72 20 3d 20 6e 65 77 20 46 69 6c | urn.true;.}..$iterator.=.new.Fil |
d2800 | 65 73 79 73 74 65 6d 49 74 65 72 61 74 6f 72 28 28 73 74 72 69 6e 67 29 20 24 63 75 72 72 65 6e | esystemIterator((string).$curren |
d2820 | 74 2c 20 46 69 6c 65 73 79 73 74 65 6d 49 74 65 72 61 74 6f 72 3a 3a 53 4b 49 50 5f 44 4f 54 53 | t,.FilesystemIterator::SKIP_DOTS |
d2840 | 29 3b 0a 0a 72 65 74 75 72 6e 20 21 24 69 74 65 72 61 74 6f 72 2d 3e 76 61 6c 69 64 28 29 3b 0a | );..return.!$iterator->valid();. |
d2860 | 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 | }.}.<?php.declare(strict_types=1 |
d2880 | 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 | );............namespace.Composer |
d28a0 | 5c 50 61 63 6b 61 67 65 5c 41 72 63 68 69 76 65 72 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 | \Package\Archiver;..use.Composer |
d28c0 | 5c 44 6f 77 6e 6c 6f 61 64 65 72 5c 44 6f 77 6e 6c 6f 61 64 4d 61 6e 61 67 65 72 3b 0a 75 73 65 | \Downloader\DownloadManager;.use |
d28e0 | 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 52 6f 6f 74 50 61 63 6b 61 67 65 49 6e 74 | .Composer\Package\RootPackageInt |
d2900 | 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 63 72 65 5c 50 72 65 67 3b 0a | erface;.use.Composer\Pcre\Preg;. |
d2920 | 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 46 69 6c 65 73 79 73 74 65 6d 3b 0a 75 73 | use.Composer\Util\Filesystem;.us |
d2940 | 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 4c 6f 6f 70 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 | e.Composer\Util\Loop;.use.Compos |
d2960 | 65 72 5c 55 74 69 6c 5c 53 79 6e 63 48 65 6c 70 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 | er\Util\SyncHelper;.use.Composer |
d2980 | 5c 4a 73 6f 6e 5c 4a 73 6f 6e 46 69 6c 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 | \Json\JsonFile;.use.Composer\Pac |
d29a0 | 6b 61 67 65 5c 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 0a | kage\CompletePackageInterface;.. |
d29c0 | 0a 0a 0a 0a 63 6c 61 73 73 20 41 72 63 68 69 76 65 4d 61 6e 61 67 65 72 0a 7b 0a 0a 70 72 6f 74 | ....class.ArchiveManager.{..prot |
d29e0 | 65 63 74 65 64 20 24 64 6f 77 6e 6c 6f 61 64 4d 61 6e 61 67 65 72 3b 0a 0a 70 72 6f 74 65 63 74 | ected.$downloadManager;..protect |
d2a00 | 65 64 20 24 6c 6f 6f 70 3b 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 61 72 63 68 69 76 65 | ed.$loop;.....protected.$archive |
d2a20 | 72 73 20 3d 20 5b 5d 3b 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 6f 76 65 72 77 72 69 74 | rs.=.[];.....protected.$overwrit |
d2a40 | 65 46 69 6c 65 73 20 3d 20 74 72 75 65 3b 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 | eFiles.=.true;.....public.functi |
d2a60 | 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 44 6f 77 6e 6c 6f 61 64 4d 61 6e 61 67 65 72 20 24 | on.__construct(DownloadManager.$ |
d2a80 | 64 6f 77 6e 6c 6f 61 64 4d 61 6e 61 67 65 72 2c 20 4c 6f 6f 70 20 24 6c 6f 6f 70 29 0a 7b 0a 24 | downloadManager,.Loop.$loop).{.$ |
d2aa0 | 74 68 69 73 2d 3e 64 6f 77 6e 6c 6f 61 64 4d 61 6e 61 67 65 72 20 3d 20 24 64 6f 77 6e 6c 6f 61 | this->downloadManager.=.$downloa |
d2ac0 | 64 4d 61 6e 61 67 65 72 3b 0a 24 74 68 69 73 2d 3e 6c 6f 6f 70 20 3d 20 24 6c 6f 6f 70 3b 0a 7d | dManager;.$this->loop.=.$loop;.} |
d2ae0 | 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 61 64 64 41 72 63 68 69 76 65 72 28 41 72 | ..public.function.addArchiver(Ar |
d2b00 | 63 68 69 76 65 72 49 6e 74 65 72 66 61 63 65 20 24 61 72 63 68 69 76 65 72 29 3a 20 76 6f 69 64 | chiverInterface.$archiver):.void |
d2b20 | 0a 7b 0a 24 74 68 69 73 2d 3e 61 72 63 68 69 76 65 72 73 5b 5d 20 3d 20 24 61 72 63 68 69 76 65 | .{.$this->archivers[].=.$archive |
d2b40 | 72 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 | r;.}.........public.function.set |
d2b60 | 4f 76 65 72 77 72 69 74 65 46 69 6c 65 73 28 62 6f 6f 6c 20 24 6f 76 65 72 77 72 69 74 65 46 69 | OverwriteFiles(bool.$overwriteFi |
d2b80 | 6c 65 73 29 3a 20 73 65 6c 66 0a 7b 0a 24 74 68 69 73 2d 3e 6f 76 65 72 77 72 69 74 65 46 69 6c | les):.self.{.$this->overwriteFil |
d2ba0 | 65 73 20 3d 20 24 6f 76 65 72 77 72 69 74 65 46 69 6c 65 73 3b 0a 0a 72 65 74 75 72 6e 20 24 74 | es.=.$overwriteFiles;..return.$t |
d2bc0 | 68 69 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 | his;.}.........public.function.g |
d2be0 | 65 74 50 61 63 6b 61 67 65 46 69 6c 65 6e 61 6d 65 28 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 | etPackageFilename(CompletePackag |
d2c00 | 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 69 | eInterface.$package):.string.{.i |
d2c20 | 66 20 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 41 72 63 68 69 76 65 4e 61 6d 65 28 29 29 20 7b | f.($package->getArchiveName()).{ |
d2c40 | 0a 24 62 61 73 65 4e 61 6d 65 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 41 72 63 68 69 76 | .$baseName.=.$package->getArchiv |
d2c60 | 65 4e 61 6d 65 28 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 62 61 73 65 4e 61 6d 65 20 3d 20 50 72 | eName();.}.else.{.$baseName.=.Pr |
d2c80 | 65 67 3a 3a 72 65 70 6c 61 63 65 28 27 23 5b 5e 61 2d 7a 30 2d 39 2d 5f 5d 23 69 27 2c 20 27 2d | eg::replace('#[^a-z0-9-_]#i',.'- |
d2ca0 | 27 2c 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 29 3b 0a 7d 0a 24 6e 61 6d 65 | ',.$package->getName());.}.$name |
d2cc0 | 50 61 72 74 73 20 3d 20 5b 24 62 61 73 65 4e 61 6d 65 5d 3b 0a 0a 69 66 20 28 6e 75 6c 6c 20 21 | Parts.=.[$baseName];..if.(null.! |
d2ce0 | 3d 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 44 69 73 74 52 65 66 65 72 65 6e 63 65 28 29 20 | ==.$package->getDistReference(). |
d2d00 | 26 26 20 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b 5e 5b 61 2d 66 30 2d 39 5d 7b 34 30 7d | &&.Preg::isMatch('{^[a-f0-9]{40} |
d2d20 | 24 7d 27 2c 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 44 69 73 74 52 65 66 65 72 65 6e 63 65 28 | $}',.$package->getDistReference( |
d2d40 | 29 29 29 20 7b 0a 61 72 72 61 79 5f 70 75 73 68 28 24 6e 61 6d 65 50 61 72 74 73 2c 20 24 70 61 | ))).{.array_push($nameParts,.$pa |
d2d60 | 63 6b 61 67 65 2d 3e 67 65 74 44 69 73 74 52 65 66 65 72 65 6e 63 65 28 29 2c 20 24 70 61 63 6b | ckage->getDistReference(),.$pack |
d2d80 | 61 67 65 2d 3e 67 65 74 44 69 73 74 54 79 70 65 28 29 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 61 72 | age->getDistType());.}.else.{.ar |
d2da0 | 72 61 79 5f 70 75 73 68 28 24 6e 61 6d 65 50 61 72 74 73 2c 20 24 70 61 63 6b 61 67 65 2d 3e 67 | ray_push($nameParts,.$package->g |
d2dc0 | 65 74 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 2c 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 | etPrettyVersion(),.$package->get |
d2de0 | 44 69 73 74 52 65 66 65 72 65 6e 63 65 28 29 29 3b 0a 7d 0a 0a 69 66 20 28 24 70 61 63 6b 61 67 | DistReference());.}..if.($packag |
d2e00 | 65 2d 3e 67 65 74 53 6f 75 72 63 65 52 65 66 65 72 65 6e 63 65 28 29 29 20 7b 0a 24 6e 61 6d 65 | e->getSourceReference()).{.$name |
d2e20 | 50 61 72 74 73 5b 5d 20 3d 20 73 75 62 73 74 72 28 73 68 61 31 28 24 70 61 63 6b 61 67 65 2d 3e | Parts[].=.substr(sha1($package-> |
d2e40 | 67 65 74 53 6f 75 72 63 65 52 65 66 65 72 65 6e 63 65 28 29 29 2c 20 30 2c 20 36 29 3b 0a 7d 0a | getSourceReference()),.0,.6);.}. |
d2e60 | 0a 24 6e 61 6d 65 20 3d 20 69 6d 70 6c 6f 64 65 28 27 2d 27 2c 20 61 72 72 61 79 5f 66 69 6c 74 | .$name.=.implode('-',.array_filt |
d2e80 | 65 72 28 24 6e 61 6d 65 50 61 72 74 73 2c 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 | er($nameParts,.static.function.( |
d2ea0 | 24 70 29 3a 20 62 6f 6f 6c 20 7b 0a 72 65 74 75 72 6e 20 21 65 6d 70 74 79 28 24 70 29 3b 0a 7d | $p):.bool.{.return.!empty($p);.} |
d2ec0 | 29 29 3b 0a 0a 72 65 74 75 72 6e 20 73 74 72 5f 72 65 70 6c 61 63 65 28 27 2f 27 2c 20 27 2d 27 | ));..return.str_replace('/',.'-' |
d2ee0 | 2c 20 24 6e 61 6d 65 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 | ,.$name);.}...............public |
d2f00 | 20 66 75 6e 63 74 69 6f 6e 20 61 72 63 68 69 76 65 28 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 | .function.archive(CompletePackag |
d2f20 | 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 73 74 72 69 6e 67 20 24 66 6f 72 | eInterface.$package,.string.$for |
d2f40 | 6d 61 74 2c 20 73 74 72 69 6e 67 20 24 74 61 72 67 65 74 44 69 72 2c 20 3f 73 74 72 69 6e 67 20 | mat,.string.$targetDir,.?string. |
d2f60 | 24 66 69 6c 65 4e 61 6d 65 20 3d 20 6e 75 6c 6c 2c 20 62 6f 6f 6c 20 24 69 67 6e 6f 72 65 46 69 | $fileName.=.null,.bool.$ignoreFi |
d2f80 | 6c 74 65 72 73 20 3d 20 66 61 6c 73 65 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 69 66 20 28 65 6d 70 | lters.=.false):.string.{.if.(emp |
d2fa0 | 74 79 28 24 66 6f 72 6d 61 74 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 49 6e 76 61 6c 69 | ty($format)).{.throw.new.\Invali |
d2fc0 | 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 27 46 6f 72 6d 61 74 20 6d 75 73 74 20 | dArgumentException('Format.must. |
d2fe0 | 62 65 20 73 70 65 63 69 66 69 65 64 27 29 3b 0a 7d 0a 0a 0a 24 75 73 61 62 6c 65 41 72 63 68 69 | be.specified');.}...$usableArchi |
d3000 | 76 65 72 20 3d 20 6e 75 6c 6c 3b 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 61 72 63 68 | ver.=.null;.foreach.($this->arch |
d3020 | 69 76 65 72 73 20 61 73 20 24 61 72 63 68 69 76 65 72 29 20 7b 0a 69 66 20 28 24 61 72 63 68 69 | ivers.as.$archiver).{.if.($archi |
d3040 | 76 65 72 2d 3e 73 75 70 70 6f 72 74 73 28 24 66 6f 72 6d 61 74 2c 20 24 70 61 63 6b 61 67 65 2d | ver->supports($format,.$package- |
d3060 | 3e 67 65 74 53 6f 75 72 63 65 54 79 70 65 28 29 29 29 20 7b 0a 24 75 73 61 62 6c 65 41 72 63 68 | >getSourceType())).{.$usableArch |
d3080 | 69 76 65 72 20 3d 20 24 61 72 63 68 69 76 65 72 3b 0a 62 72 65 61 6b 3b 0a 7d 0a 7d 0a 0a 0a 69 | iver.=.$archiver;.break;.}.}...i |
d30a0 | 66 20 28 6e 75 6c 6c 20 3d 3d 3d 20 24 75 73 61 62 6c 65 41 72 63 68 69 76 65 72 29 20 7b 0a 74 | f.(null.===.$usableArchiver).{.t |
d30c0 | 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 73 70 72 69 6e | hrow.new.\RuntimeException(sprin |
d30e0 | 74 66 28 27 4e 6f 20 61 72 63 68 69 76 65 72 20 66 6f 75 6e 64 20 74 6f 20 73 75 70 70 6f 72 74 | tf('No.archiver.found.to.support |
d3100 | 20 25 73 20 66 6f 72 6d 61 74 27 2c 20 24 66 6f 72 6d 61 74 29 29 3b 0a 7d 0a 0a 24 66 69 6c 65 | .%s.format',.$format));.}..$file |
d3120 | 73 79 73 74 65 6d 20 3d 20 6e 65 77 20 46 69 6c 65 73 79 73 74 65 6d 28 29 3b 0a 0a 69 66 20 28 | system.=.new.Filesystem();..if.( |
d3140 | 24 70 61 63 6b 61 67 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 52 6f 6f 74 50 61 63 6b 61 67 65 49 | $package.instanceof.RootPackageI |
d3160 | 6e 74 65 72 66 61 63 65 29 20 7b 0a 24 73 6f 75 72 63 65 50 61 74 68 20 3d 20 72 65 61 6c 70 61 | nterface).{.$sourcePath.=.realpa |
d3180 | 74 68 28 27 2e 27 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 0a 24 73 6f 75 72 63 65 50 61 74 68 20 3d | th('.');.}.else.{..$sourcePath.= |
d31a0 | 20 73 79 73 5f 67 65 74 5f 74 65 6d 70 5f 64 69 72 28 29 2e 27 2f 63 6f 6d 70 6f 73 65 72 5f 61 | .sys_get_temp_dir().'/composer_a |
d31c0 | 72 63 68 69 76 65 27 2e 75 6e 69 71 69 64 28 29 3b 0a 24 66 69 6c 65 73 79 73 74 65 6d 2d 3e 65 | rchive'.uniqid();.$filesystem->e |
d31e0 | 6e 73 75 72 65 44 69 72 65 63 74 6f 72 79 45 78 69 73 74 73 28 24 73 6f 75 72 63 65 50 61 74 68 | nsureDirectoryExists($sourcePath |
d3200 | 29 3b 0a 0a 74 72 79 20 7b 0a 0a 24 70 72 6f 6d 69 73 65 20 3d 20 24 74 68 69 73 2d 3e 64 6f 77 | );..try.{..$promise.=.$this->dow |
d3220 | 6e 6c 6f 61 64 4d 61 6e 61 67 65 72 2d 3e 64 6f 77 6e 6c 6f 61 64 28 24 70 61 63 6b 61 67 65 2c | nloadManager->download($package, |
d3240 | 20 24 73 6f 75 72 63 65 50 61 74 68 29 3b 0a 53 79 6e 63 48 65 6c 70 65 72 3a 3a 61 77 61 69 74 | .$sourcePath);.SyncHelper::await |
d3260 | 28 24 74 68 69 73 2d 3e 6c 6f 6f 70 2c 20 24 70 72 6f 6d 69 73 65 29 3b 0a 24 70 72 6f 6d 69 73 | ($this->loop,.$promise);.$promis |
d3280 | 65 20 3d 20 24 74 68 69 73 2d 3e 64 6f 77 6e 6c 6f 61 64 4d 61 6e 61 67 65 72 2d 3e 69 6e 73 74 | e.=.$this->downloadManager->inst |
d32a0 | 61 6c 6c 28 24 70 61 63 6b 61 67 65 2c 20 24 73 6f 75 72 63 65 50 61 74 68 29 3b 0a 53 79 6e 63 | all($package,.$sourcePath);.Sync |
d32c0 | 48 65 6c 70 65 72 3a 3a 61 77 61 69 74 28 24 74 68 69 73 2d 3e 6c 6f 6f 70 2c 20 24 70 72 6f 6d | Helper::await($this->loop,.$prom |
d32e0 | 69 73 65 29 3b 0a 7d 20 63 61 74 63 68 20 28 5c 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a | ise);.}.catch.(\Exception.$e).{. |
d3300 | 24 66 69 6c 65 73 79 73 74 65 6d 2d 3e 72 65 6d 6f 76 65 44 69 72 65 63 74 6f 72 79 28 24 73 6f | $filesystem->removeDirectory($so |
d3320 | 75 72 63 65 50 61 74 68 29 3b 0a 74 68 72 6f 77 20 24 65 3b 0a 7d 0a 0a 0a 69 66 20 28 66 69 6c | urcePath);.throw.$e;.}...if.(fil |
d3340 | 65 5f 65 78 69 73 74 73 28 24 63 6f 6d 70 6f 73 65 72 4a 73 6f 6e 50 61 74 68 20 3d 20 24 73 6f | e_exists($composerJsonPath.=.$so |
d3360 | 75 72 63 65 50 61 74 68 2e 27 2f 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e 27 29 29 20 7b 0a 24 6a | urcePath.'/composer.json')).{.$j |
d3380 | 73 6f 6e 46 69 6c 65 20 3d 20 6e 65 77 20 4a 73 6f 6e 46 69 6c 65 28 24 63 6f 6d 70 6f 73 65 72 | sonFile.=.new.JsonFile($composer |
d33a0 | 4a 73 6f 6e 50 61 74 68 29 3b 0a 24 6a 73 6f 6e 44 61 74 61 20 3d 20 24 6a 73 6f 6e 46 69 6c 65 | JsonPath);.$jsonData.=.$jsonFile |
d33c0 | 2d 3e 72 65 61 64 28 29 3b 0a 69 66 20 28 21 65 6d 70 74 79 28 24 6a 73 6f 6e 44 61 74 61 5b 27 | ->read();.if.(!empty($jsonData[' |
d33e0 | 61 72 63 68 69 76 65 27 5d 5b 27 6e 61 6d 65 27 5d 29 29 20 7b 0a 24 70 61 63 6b 61 67 65 2d 3e | archive']['name'])).{.$package-> |
d3400 | 73 65 74 41 72 63 68 69 76 65 4e 61 6d 65 28 24 6a 73 6f 6e 44 61 74 61 5b 27 61 72 63 68 69 76 | setArchiveName($jsonData['archiv |
d3420 | 65 27 5d 5b 27 6e 61 6d 65 27 5d 29 3b 0a 7d 0a 69 66 20 28 21 65 6d 70 74 79 28 24 6a 73 6f 6e | e']['name']);.}.if.(!empty($json |
d3440 | 44 61 74 61 5b 27 61 72 63 68 69 76 65 27 5d 5b 27 65 78 63 6c 75 64 65 27 5d 29 29 20 7b 0a 24 | Data['archive']['exclude'])).{.$ |
d3460 | 70 61 63 6b 61 67 65 2d 3e 73 65 74 41 72 63 68 69 76 65 45 78 63 6c 75 64 65 73 28 24 6a 73 6f | package->setArchiveExcludes($jso |
d3480 | 6e 44 61 74 61 5b 27 61 72 63 68 69 76 65 27 5d 5b 27 65 78 63 6c 75 64 65 27 5d 29 3b 0a 7d 0a | nData['archive']['exclude']);.}. |
d34a0 | 7d 0a 7d 0a 0a 69 66 20 28 6e 75 6c 6c 20 3d 3d 3d 20 24 66 69 6c 65 4e 61 6d 65 29 20 7b 0a 24 | }.}..if.(null.===.$fileName).{.$ |
d34c0 | 70 61 63 6b 61 67 65 4e 61 6d 65 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 50 61 63 6b 61 67 65 46 | packageName.=.$this->getPackageF |
d34e0 | 69 6c 65 6e 61 6d 65 28 24 70 61 63 6b 61 67 65 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 70 61 63 | ilename($package);.}.else.{.$pac |
d3500 | 6b 61 67 65 4e 61 6d 65 20 3d 20 24 66 69 6c 65 4e 61 6d 65 3b 0a 7d 0a 0a 0a 24 66 69 6c 65 73 | kageName.=.$fileName;.}...$files |
d3520 | 79 73 74 65 6d 2d 3e 65 6e 73 75 72 65 44 69 72 65 63 74 6f 72 79 45 78 69 73 74 73 28 24 74 61 | ystem->ensureDirectoryExists($ta |
d3540 | 72 67 65 74 44 69 72 29 3b 0a 24 74 61 72 67 65 74 20 3d 20 72 65 61 6c 70 61 74 68 28 24 74 61 | rgetDir);.$target.=.realpath($ta |
d3560 | 72 67 65 74 44 69 72 29 2e 27 2f 27 2e 24 70 61 63 6b 61 67 65 4e 61 6d 65 2e 27 2e 27 2e 24 66 | rgetDir).'/'.$packageName.'.'.$f |
d3580 | 6f 72 6d 61 74 3b 0a 24 66 69 6c 65 73 79 73 74 65 6d 2d 3e 65 6e 73 75 72 65 44 69 72 65 63 74 | ormat;.$filesystem->ensureDirect |
d35a0 | 6f 72 79 45 78 69 73 74 73 28 64 69 72 6e 61 6d 65 28 24 74 61 72 67 65 74 29 29 3b 0a 0a 69 66 | oryExists(dirname($target));..if |
d35c0 | 20 28 21 24 74 68 69 73 2d 3e 6f 76 65 72 77 72 69 74 65 46 69 6c 65 73 20 26 26 20 66 69 6c 65 | .(!$this->overwriteFiles.&&.file |
d35e0 | 5f 65 78 69 73 74 73 28 24 74 61 72 67 65 74 29 29 20 7b 0a 72 65 74 75 72 6e 20 24 74 61 72 67 | _exists($target)).{.return.$targ |
d3600 | 65 74 3b 0a 7d 0a 0a 0a 24 74 65 6d 70 54 61 72 67 65 74 20 3d 20 73 79 73 5f 67 65 74 5f 74 65 | et;.}...$tempTarget.=.sys_get_te |
d3620 | 6d 70 5f 64 69 72 28 29 2e 27 2f 63 6f 6d 70 6f 73 65 72 5f 61 72 63 68 69 76 65 27 2e 75 6e 69 | mp_dir().'/composer_archive'.uni |
d3640 | 71 69 64 28 29 2e 27 2e 27 2e 24 66 6f 72 6d 61 74 3b 0a 24 66 69 6c 65 73 79 73 74 65 6d 2d 3e | qid().'.'.$format;.$filesystem-> |
d3660 | 65 6e 73 75 72 65 44 69 72 65 63 74 6f 72 79 45 78 69 73 74 73 28 64 69 72 6e 61 6d 65 28 24 74 | ensureDirectoryExists(dirname($t |
d3680 | 65 6d 70 54 61 72 67 65 74 29 29 3b 0a 0a 24 61 72 63 68 69 76 65 50 61 74 68 20 3d 20 24 75 73 | empTarget));..$archivePath.=.$us |
d36a0 | 61 62 6c 65 41 72 63 68 69 76 65 72 2d 3e 61 72 63 68 69 76 65 28 24 73 6f 75 72 63 65 50 61 74 | ableArchiver->archive($sourcePat |
d36c0 | 68 2c 20 24 74 65 6d 70 54 61 72 67 65 74 2c 20 24 66 6f 72 6d 61 74 2c 20 24 70 61 63 6b 61 67 | h,.$tempTarget,.$format,.$packag |
d36e0 | 65 2d 3e 67 65 74 41 72 63 68 69 76 65 45 78 63 6c 75 64 65 73 28 29 2c 20 24 69 67 6e 6f 72 65 | e->getArchiveExcludes(),.$ignore |
d3700 | 46 69 6c 74 65 72 73 29 3b 0a 24 66 69 6c 65 73 79 73 74 65 6d 2d 3e 72 65 6e 61 6d 65 28 24 61 | Filters);.$filesystem->rename($a |
d3720 | 72 63 68 69 76 65 50 61 74 68 2c 20 24 74 61 72 67 65 74 29 3b 0a 0a 0a 69 66 20 28 21 24 70 61 | rchivePath,.$target);...if.(!$pa |
d3740 | 63 6b 61 67 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 52 6f 6f 74 50 61 63 6b 61 67 65 49 6e 74 65 | ckage.instanceof.RootPackageInte |
d3760 | 72 66 61 63 65 29 20 7b 0a 24 66 69 6c 65 73 79 73 74 65 6d 2d 3e 72 65 6d 6f 76 65 44 69 72 65 | rface).{.$filesystem->removeDire |
d3780 | 63 74 6f 72 79 28 24 73 6f 75 72 63 65 50 61 74 68 29 3b 0a 7d 0a 24 66 69 6c 65 73 79 73 74 65 | ctory($sourcePath);.}.$filesyste |
d37a0 | 6d 2d 3e 72 65 6d 6f 76 65 28 24 74 65 6d 70 54 61 72 67 65 74 29 3b 0a 0a 72 65 74 75 72 6e 20 | m->remove($tempTarget);..return. |
d37c0 | 24 74 61 72 67 65 74 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 | $target;.}.}.<?php.declare(stric |
d37e0 | 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 | t_types=1);............namespace |
d3800 | 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 41 72 63 68 69 76 65 72 3b 0a 0a 0a 0a 0a | .Composer\Package\Archiver;..... |
d3820 | 0a 0a 69 6e 74 65 72 66 61 63 65 20 41 72 63 68 69 76 65 72 49 6e 74 65 72 66 61 63 65 0a 7b 0a | ..interface.ArchiverInterface.{. |
d3840 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 61 72 63 68 69 | ...........public.function.archi |
d3860 | 76 65 28 73 74 72 69 6e 67 20 24 73 6f 75 72 63 65 73 2c 20 73 74 72 69 6e 67 20 24 74 61 72 67 | ve(string.$sources,.string.$targ |
d3880 | 65 74 2c 20 73 74 72 69 6e 67 20 24 66 6f 72 6d 61 74 2c 20 61 72 72 61 79 20 24 65 78 63 6c 75 | et,.string.$format,.array.$exclu |
d38a0 | 64 65 73 20 3d 20 5b 5d 2c 20 62 6f 6f 6c 20 24 69 67 6e 6f 72 65 46 69 6c 74 65 72 73 20 3d 20 | des.=.[],.bool.$ignoreFilters.=. |
d38c0 | 66 61 6c 73 65 29 3a 20 73 74 72 69 6e 67 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 | false):.string;..........public. |
d38e0 | 66 75 6e 63 74 69 6f 6e 20 73 75 70 70 6f 72 74 73 28 73 74 72 69 6e 67 20 24 66 6f 72 6d 61 74 | function.supports(string.$format |
d3900 | 2c 20 3f 73 74 72 69 6e 67 20 24 73 6f 75 72 63 65 54 79 70 65 29 3a 20 62 6f 6f 6c 3b 0a 7d 0a | ,.?string.$sourceType):.bool;.}. |
d3920 | 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a | <?php.declare(strict_types=1);.. |
d3940 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 | ..........namespace.Composer\Pac |
d3960 | 6b 61 67 65 5c 41 72 63 68 69 76 65 72 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 63 72 | kage\Archiver;..use.Composer\Pcr |
d3980 | 65 5c 50 72 65 67 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 46 69 | e\Preg;.use.Symfony\Component\Fi |
d39a0 | 6e 64 65 72 3b 0a 0a 0a 0a 0a 61 62 73 74 72 61 63 74 20 63 6c 61 73 73 20 42 61 73 65 45 78 63 | nder;.....abstract.class.BaseExc |
d39c0 | 6c 75 64 65 46 69 6c 74 65 72 0a 7b 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 73 6f 75 72 63 | ludeFilter.{....protected.$sourc |
d39e0 | 65 50 61 74 68 3b 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 65 78 63 6c 75 64 65 50 61 74 | ePath;.....protected.$excludePat |
d3a00 | 74 65 72 6e 73 3b 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e | terns;.....public.function.__con |
d3a20 | 73 74 72 75 63 74 28 73 74 72 69 6e 67 20 24 73 6f 75 72 63 65 50 61 74 68 29 0a 7b 0a 24 74 68 | struct(string.$sourcePath).{.$th |
d3a40 | 69 73 2d 3e 73 6f 75 72 63 65 50 61 74 68 20 3d 20 24 73 6f 75 72 63 65 50 61 74 68 3b 0a 24 74 | is->sourcePath.=.$sourcePath;.$t |
d3a60 | 68 69 73 2d 3e 65 78 63 6c 75 64 65 50 61 74 74 65 72 6e 73 20 3d 20 5b 5d 3b 0a 7d 0a 0a 0a 0a | his->excludePatterns.=.[];.}.... |
d3a80 | 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 66 69 6c 74 65 72 28 73 | ........public.function.filter(s |
d3aa0 | 74 72 69 6e 67 20 24 72 65 6c 61 74 69 76 65 50 61 74 68 2c 20 62 6f 6f 6c 20 24 65 78 63 6c 75 | tring.$relativePath,.bool.$exclu |
d3ac0 | 64 65 29 3a 20 62 6f 6f 6c 0a 7b 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 65 78 63 6c | de):.bool.{.foreach.($this->excl |
d3ae0 | 75 64 65 50 61 74 74 65 72 6e 73 20 61 73 20 24 70 61 74 74 65 72 6e 44 61 74 61 29 20 7b 0a 5b | udePatterns.as.$patternData).{.[ |
d3b00 | 24 70 61 74 74 65 72 6e 2c 20 24 6e 65 67 61 74 65 2c 20 24 73 74 72 69 70 4c 65 61 64 69 6e 67 | $pattern,.$negate,.$stripLeading |
d3b20 | 53 6c 61 73 68 5d 20 3d 20 24 70 61 74 74 65 72 6e 44 61 74 61 3b 0a 0a 69 66 20 28 24 73 74 72 | Slash].=.$patternData;..if.($str |
d3b40 | 69 70 4c 65 61 64 69 6e 67 53 6c 61 73 68 29 20 7b 0a 24 70 61 74 68 20 3d 20 73 75 62 73 74 72 | ipLeadingSlash).{.$path.=.substr |
d3b60 | 28 24 72 65 6c 61 74 69 76 65 50 61 74 68 2c 20 31 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 70 61 | ($relativePath,.1);.}.else.{.$pa |
d3b80 | 74 68 20 3d 20 24 72 65 6c 61 74 69 76 65 50 61 74 68 3b 0a 7d 0a 0a 74 72 79 20 7b 0a 69 66 20 | th.=.$relativePath;.}..try.{.if. |
d3ba0 | 28 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 24 70 61 74 74 65 72 6e 2c 20 24 70 61 74 68 29 29 | (Preg::isMatch($pattern,.$path)) |
d3bc0 | 20 7b 0a 24 65 78 63 6c 75 64 65 20 3d 20 21 24 6e 65 67 61 74 65 3b 0a 7d 0a 7d 20 63 61 74 63 | .{.$exclude.=.!$negate;.}.}.catc |
d3be0 | 68 20 28 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 0a 7d 0a 7d 0a | h.(\RuntimeException.$e).{..}.}. |
d3c00 | 0a 72 65 74 75 72 6e 20 24 65 78 63 6c 75 64 65 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 72 6f | .return.$exclude;.}..........pro |
d3c20 | 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 70 61 72 73 65 4c 69 6e 65 73 28 61 72 72 61 79 | tected.function.parseLines(array |
d3c40 | 20 24 6c 69 6e 65 73 2c 20 63 61 6c 6c 61 62 6c 65 20 24 6c 69 6e 65 50 61 72 73 65 72 29 3a 20 | .$lines,.callable.$lineParser):. |
d3c60 | 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 61 72 72 61 79 5f 66 69 6c 74 65 72 28 0a 61 72 72 | array.{.return.array_filter(.arr |
d3c80 | 61 79 5f 6d 61 70 28 0a 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 6c 69 6e 65 29 20 | ay_map(.static.function.($line). |
d3ca0 | 75 73 65 20 28 24 6c 69 6e 65 50 61 72 73 65 72 29 20 7b 0a 24 6c 69 6e 65 20 3d 20 74 72 69 6d | use.($lineParser).{.$line.=.trim |
d3cc0 | 28 24 6c 69 6e 65 29 3b 0a 0a 69 66 20 28 21 24 6c 69 6e 65 20 7c 7c 20 30 20 3d 3d 3d 20 73 74 | ($line);..if.(!$line.||.0.===.st |
d3ce0 | 72 70 6f 73 28 24 6c 69 6e 65 2c 20 27 23 27 29 29 20 7b 0a 72 65 74 75 72 6e 20 6e 75 6c 6c 3b | rpos($line,.'#')).{.return.null; |
d3d00 | 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 6c 69 6e 65 50 61 72 73 65 72 28 24 6c 69 6e 65 29 3b 0a 7d | .}..return.$lineParser($line);.} |
d3d20 | 2c 0a 24 6c 69 6e 65 73 0a 29 2c 0a 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 70 61 | ,.$lines.),.static.function.($pa |
d3d40 | 74 74 65 72 6e 29 3a 20 62 6f 6f 6c 20 7b 0a 72 65 74 75 72 6e 20 24 70 61 74 74 65 72 6e 20 21 | ttern):.bool.{.return.$pattern.! |
d3d60 | 3d 3d 20 6e 75 6c 6c 3b 0a 7d 0a 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 | ==.null;.}.);.}.........protecte |
d3d80 | 64 20 66 75 6e 63 74 69 6f 6e 20 67 65 6e 65 72 61 74 65 50 61 74 74 65 72 6e 73 28 61 72 72 61 | d.function.generatePatterns(arra |
d3da0 | 79 20 24 72 75 6c 65 73 29 3a 20 61 72 72 61 79 0a 7b 0a 24 70 61 74 74 65 72 6e 73 20 3d 20 5b | y.$rules):.array.{.$patterns.=.[ |
d3dc0 | 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 72 75 6c 65 73 20 61 73 20 24 72 75 6c 65 29 20 7b 0a 24 | ];.foreach.($rules.as.$rule).{.$ |
d3de0 | 70 61 74 74 65 72 6e 73 5b 5d 20 3d 20 24 74 68 69 73 2d 3e 67 65 6e 65 72 61 74 65 50 61 74 74 | patterns[].=.$this->generatePatt |
d3e00 | 65 72 6e 28 24 72 75 6c 65 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 70 61 74 74 65 72 6e 73 3b | ern($rule);.}..return.$patterns; |
d3e20 | 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 67 65 | .}.........protected.function.ge |
d3e40 | 6e 65 72 61 74 65 50 61 74 74 65 72 6e 28 73 74 72 69 6e 67 20 24 72 75 6c 65 29 3a 20 61 72 72 | neratePattern(string.$rule):.arr |
d3e60 | 61 79 0a 7b 0a 24 6e 65 67 61 74 65 20 3d 20 66 61 6c 73 65 3b 0a 24 70 61 74 74 65 72 6e 20 3d | ay.{.$negate.=.false;.$pattern.= |
d3e80 | 20 27 27 3b 0a 0a 69 66 20 28 24 72 75 6c 65 20 21 3d 3d 20 27 27 20 26 26 20 24 72 75 6c 65 5b | .'';..if.($rule.!==.''.&&.$rule[ |
d3ea0 | 30 5d 20 3d 3d 3d 20 27 21 27 29 20 7b 0a 24 6e 65 67 61 74 65 20 3d 20 74 72 75 65 3b 0a 24 72 | 0].===.'!').{.$negate.=.true;.$r |
d3ec0 | 75 6c 65 20 3d 20 6c 74 72 69 6d 28 24 72 75 6c 65 2c 20 27 21 27 29 3b 0a 7d 0a 0a 24 66 69 72 | ule.=.ltrim($rule,.'!');.}..$fir |
d3ee0 | 73 74 53 6c 61 73 68 50 6f 73 69 74 69 6f 6e 20 3d 20 73 74 72 70 6f 73 28 24 72 75 6c 65 2c 20 | stSlashPosition.=.strpos($rule,. |
d3f00 | 27 2f 27 29 3b 0a 69 66 20 28 30 20 3d 3d 3d 20 24 66 69 72 73 74 53 6c 61 73 68 50 6f 73 69 74 | '/');.if.(0.===.$firstSlashPosit |
d3f20 | 69 6f 6e 29 20 7b 0a 24 70 61 74 74 65 72 6e 20 3d 20 27 5e 2f 27 3b 0a 7d 20 65 6c 73 65 69 66 | ion).{.$pattern.=.'^/';.}.elseif |
d3f40 | 20 28 66 61 6c 73 65 20 3d 3d 3d 20 24 66 69 72 73 74 53 6c 61 73 68 50 6f 73 69 74 69 6f 6e 20 | .(false.===.$firstSlashPosition. |
d3f60 | 7c 7c 20 73 74 72 6c 65 6e 28 24 72 75 6c 65 29 20 2d 20 31 20 3d 3d 3d 20 24 66 69 72 73 74 53 | ||.strlen($rule).-.1.===.$firstS |
d3f80 | 6c 61 73 68 50 6f 73 69 74 69 6f 6e 29 20 7b 0a 24 70 61 74 74 65 72 6e 20 3d 20 27 2f 27 3b 0a | lashPosition).{.$pattern.=.'/';. |
d3fa0 | 7d 0a 0a 24 72 75 6c 65 20 3d 20 74 72 69 6d 28 24 72 75 6c 65 2c 20 27 2f 27 29 3b 0a 0a 0a 24 | }..$rule.=.trim($rule,.'/');...$ |
d3fc0 | 72 75 6c 65 20 3d 20 73 75 62 73 74 72 28 46 69 6e 64 65 72 5c 47 6c 6f 62 3a 3a 74 6f 52 65 67 | rule.=.substr(Finder\Glob::toReg |
d3fe0 | 65 78 28 24 72 75 6c 65 29 2c 20 32 2c 20 2d 32 29 3b 0a 0a 72 65 74 75 72 6e 20 5b 27 7b 27 2e | ex($rule),.2,.-2);..return.['{'. |
d4000 | 24 70 61 74 74 65 72 6e 2e 24 72 75 6c 65 2e 27 28 3f 3d 24 7c 2f 29 7d 27 2c 20 24 6e 65 67 61 | $pattern.$rule.'(?=$|/)}',.$nega |
d4020 | 74 65 2c 20 66 61 6c 73 65 5d 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 | te,.false];.}.}.<?php.declare(st |
d4040 | 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 | rict_types=1);............namesp |
d4060 | 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 41 72 63 68 69 76 65 72 3b 0a 0a | ace.Composer\Package\Archiver;.. |
d4080 | 0a 0a 0a 0a 0a 63 6c 61 73 73 20 43 6f 6d 70 6f 73 65 72 45 78 63 6c 75 64 65 46 69 6c 74 65 72 | .....class.ComposerExcludeFilter |
d40a0 | 20 65 78 74 65 6e 64 73 20 42 61 73 65 45 78 63 6c 75 64 65 46 69 6c 74 65 72 0a 7b 0a 0a 0a 0a | .extends.BaseExcludeFilter.{.... |
d40c0 | 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 73 74 72 | .public.function.__construct(str |
d40e0 | 69 6e 67 20 24 73 6f 75 72 63 65 50 61 74 68 2c 20 61 72 72 61 79 20 24 65 78 63 6c 75 64 65 52 | ing.$sourcePath,.array.$excludeR |
d4100 | 75 6c 65 73 29 0a 7b 0a 70 61 72 65 6e 74 3a 3a 5f 5f 63 6f 6e 73 74 72 75 63 74 28 24 73 6f 75 | ules).{.parent::__construct($sou |
d4120 | 72 63 65 50 61 74 68 29 3b 0a 24 74 68 69 73 2d 3e 65 78 63 6c 75 64 65 50 61 74 74 65 72 6e 73 | rcePath);.$this->excludePatterns |
d4140 | 20 3d 20 24 74 68 69 73 2d 3e 67 65 6e 65 72 61 74 65 50 61 74 74 65 72 6e 73 28 24 65 78 63 6c | .=.$this->generatePatterns($excl |
d4160 | 75 64 65 52 75 6c 65 73 29 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 | udeRules);.}.}.<?php.declare(str |
d4180 | 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 | ict_types=1);............namespa |
d41a0 | 63 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 41 72 63 68 69 76 65 72 3b 0a 0a 75 | ce.Composer\Package\Archiver;..u |
d41c0 | 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 63 72 65 5c 50 72 65 67 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 63 | se.Composer\Pcre\Preg;.........c |
d41e0 | 6c 61 73 73 20 47 69 74 45 78 63 6c 75 64 65 46 69 6c 74 65 72 20 65 78 74 65 6e 64 73 20 42 61 | lass.GitExcludeFilter.extends.Ba |
d4200 | 73 65 45 78 63 6c 75 64 65 46 69 6c 74 65 72 0a 7b 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 | seExcludeFilter.{....public.func |
d4220 | 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 73 74 72 69 6e 67 20 24 73 6f 75 72 63 65 50 | tion.__construct(string.$sourceP |
d4240 | 61 74 68 29 0a 7b 0a 70 61 72 65 6e 74 3a 3a 5f 5f 63 6f 6e 73 74 72 75 63 74 28 24 73 6f 75 72 | ath).{.parent::__construct($sour |
d4260 | 63 65 50 61 74 68 29 3b 0a 0a 69 66 20 28 66 69 6c 65 5f 65 78 69 73 74 73 28 24 73 6f 75 72 63 | cePath);..if.(file_exists($sourc |
d4280 | 65 50 61 74 68 2e 27 2f 2e 67 69 74 61 74 74 72 69 62 75 74 65 73 27 29 29 20 7b 0a 24 74 68 69 | ePath.'/.gitattributes')).{.$thi |
d42a0 | 73 2d 3e 65 78 63 6c 75 64 65 50 61 74 74 65 72 6e 73 20 3d 20 61 72 72 61 79 5f 6d 65 72 67 65 | s->excludePatterns.=.array_merge |
d42c0 | 28 0a 24 74 68 69 73 2d 3e 65 78 63 6c 75 64 65 50 61 74 74 65 72 6e 73 2c 0a 24 74 68 69 73 2d | (.$this->excludePatterns,.$this- |
d42e0 | 3e 70 61 72 73 65 4c 69 6e 65 73 28 0a 66 69 6c 65 28 24 73 6f 75 72 63 65 50 61 74 68 2e 27 2f | >parseLines(.file($sourcePath.'/ |
d4300 | 2e 67 69 74 61 74 74 72 69 62 75 74 65 73 27 29 2c 0a 5b 24 74 68 69 73 2c 20 27 70 61 72 73 65 | .gitattributes'),.[$this,.'parse |
d4320 | 47 69 74 41 74 74 72 69 62 75 74 65 73 4c 69 6e 65 27 5d 0a 29 0a 29 3b 0a 7d 0a 7d 0a 0a 0a 0a | GitAttributesLine'].).);.}.}.... |
d4340 | 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 70 61 72 73 65 47 69 74 41 74 74 | .....public.function.parseGitAtt |
d4360 | 72 69 62 75 74 65 73 4c 69 6e 65 28 73 74 72 69 6e 67 20 24 6c 69 6e 65 29 3a 20 3f 61 72 72 61 | ributesLine(string.$line):.?arra |
d4380 | 79 0a 7b 0a 24 70 61 72 74 73 20 3d 20 50 72 65 67 3a 3a 73 70 6c 69 74 28 27 23 5c 73 2b 23 27 | y.{.$parts.=.Preg::split('#\s+#' |
d43a0 | 2c 20 24 6c 69 6e 65 29 3b 0a 0a 69 66 20 28 63 6f 75 6e 74 28 24 70 61 72 74 73 29 20 3d 3d 3d | ,.$line);..if.(count($parts).=== |
d43c0 | 20 32 20 26 26 20 24 70 61 72 74 73 5b 31 5d 20 3d 3d 3d 20 27 65 78 70 6f 72 74 2d 69 67 6e 6f | .2.&&.$parts[1].===.'export-igno |
d43e0 | 72 65 27 29 20 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 67 65 6e 65 72 61 74 65 50 61 74 | re').{.return.$this->generatePat |
d4400 | 74 65 72 6e 28 24 70 61 72 74 73 5b 30 5d 29 3b 0a 7d 0a 0a 69 66 20 28 63 6f 75 6e 74 28 24 70 | tern($parts[0]);.}..if.(count($p |
d4420 | 61 72 74 73 29 20 3d 3d 3d 20 32 20 26 26 20 24 70 61 72 74 73 5b 31 5d 20 3d 3d 3d 20 27 2d 65 | arts).===.2.&&.$parts[1].===.'-e |
d4440 | 78 70 6f 72 74 2d 69 67 6e 6f 72 65 27 29 20 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 67 | xport-ignore').{.return.$this->g |
d4460 | 65 6e 65 72 61 74 65 50 61 74 74 65 72 6e 28 27 21 27 2e 24 70 61 72 74 73 5b 30 5d 29 3b 0a 7d | eneratePattern('!'.$parts[0]);.} |
d4480 | 0a 0a 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 | ..return.null;.}.}.<?php.declare |
d44a0 | 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d | (strict_types=1);............nam |
d44c0 | 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 41 72 63 68 69 76 65 72 | espace.Composer\Package\Archiver |
d44e0 | 3b 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 50 68 61 72 41 72 63 68 69 76 65 72 20 69 6d 70 6c 65 | ;.......class.PharArchiver.imple |
d4500 | 6d 65 6e 74 73 20 41 72 63 68 69 76 65 72 49 6e 74 65 72 66 61 63 65 0a 7b 0a 0a 70 72 6f 74 65 | ments.ArchiverInterface.{..prote |
d4520 | 63 74 65 64 20 73 74 61 74 69 63 20 24 66 6f 72 6d 61 74 73 20 3d 20 5b 0a 27 7a 69 70 27 20 3d | cted.static.$formats.=.[.'zip'.= |
d4540 | 3e 20 5c 50 68 61 72 3a 3a 5a 49 50 2c 0a 27 74 61 72 27 20 3d 3e 20 5c 50 68 61 72 3a 3a 54 41 | >.\Phar::ZIP,.'tar'.=>.\Phar::TA |
d4560 | 52 2c 0a 27 74 61 72 2e 67 7a 27 20 3d 3e 20 5c 50 68 61 72 3a 3a 54 41 52 2c 0a 27 74 61 72 2e | R,.'tar.gz'.=>.\Phar::TAR,.'tar. |
d4580 | 62 7a 32 27 20 3d 3e 20 5c 50 68 61 72 3a 3a 54 41 52 2c 0a 5d 3b 0a 0a 0a 70 72 6f 74 65 63 74 | bz2'.=>.\Phar::TAR,.];...protect |
d45a0 | 65 64 20 73 74 61 74 69 63 20 24 63 6f 6d 70 72 65 73 73 46 6f 72 6d 61 74 73 20 3d 20 5b 0a 27 | ed.static.$compressFormats.=.[.' |
d45c0 | 74 61 72 2e 67 7a 27 20 3d 3e 20 5c 50 68 61 72 3a 3a 47 5a 2c 0a 27 74 61 72 2e 62 7a 32 27 20 | tar.gz'.=>.\Phar::GZ,.'tar.bz2'. |
d45e0 | 3d 3e 20 5c 50 68 61 72 3a 3a 42 5a 32 2c 0a 5d 3b 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e | =>.\Phar::BZ2,.];.....public.fun |
d4600 | 63 74 69 6f 6e 20 61 72 63 68 69 76 65 28 73 74 72 69 6e 67 20 24 73 6f 75 72 63 65 73 2c 20 73 | ction.archive(string.$sources,.s |
d4620 | 74 72 69 6e 67 20 24 74 61 72 67 65 74 2c 20 73 74 72 69 6e 67 20 24 66 6f 72 6d 61 74 2c 20 61 | tring.$target,.string.$format,.a |
d4640 | 72 72 61 79 20 24 65 78 63 6c 75 64 65 73 20 3d 20 5b 5d 2c 20 62 6f 6f 6c 20 24 69 67 6e 6f 72 | rray.$excludes.=.[],.bool.$ignor |
d4660 | 65 46 69 6c 74 65 72 73 20 3d 20 66 61 6c 73 65 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 24 73 6f 75 | eFilters.=.false):.string.{.$sou |
d4680 | 72 63 65 73 20 3d 20 72 65 61 6c 70 61 74 68 28 24 73 6f 75 72 63 65 73 29 3b 0a 0a 0a 69 66 20 | rces.=.realpath($sources);...if. |
d46a0 | 28 66 69 6c 65 5f 65 78 69 73 74 73 28 24 74 61 72 67 65 74 29 29 20 7b 0a 75 6e 6c 69 6e 6b 28 | (file_exists($target)).{.unlink( |
d46c0 | 24 74 61 72 67 65 74 29 3b 0a 7d 0a 0a 74 72 79 20 7b 0a 24 66 69 6c 65 6e 61 6d 65 20 3d 20 73 | $target);.}..try.{.$filename.=.s |
d46e0 | 75 62 73 74 72 28 24 74 61 72 67 65 74 2c 20 30 2c 20 73 74 72 72 70 6f 73 28 24 74 61 72 67 65 | ubstr($target,.0,.strrpos($targe |
d4700 | 74 2c 20 24 66 6f 72 6d 61 74 29 20 2d 20 31 29 3b 0a 0a 0a 69 66 20 28 69 73 73 65 74 28 73 74 | t,.$format).-.1);...if.(isset(st |
d4720 | 61 74 69 63 3a 3a 24 63 6f 6d 70 72 65 73 73 46 6f 72 6d 61 74 73 5b 24 66 6f 72 6d 61 74 5d 29 | atic::$compressFormats[$format]) |
d4740 | 29 20 7b 0a 0a 24 74 61 72 67 65 74 20 3d 20 24 66 69 6c 65 6e 61 6d 65 20 2e 20 27 2e 74 61 72 | ).{..$target.=.$filename...'.tar |
d4760 | 27 3b 0a 7d 0a 0a 24 70 68 61 72 20 3d 20 6e 65 77 20 5c 50 68 61 72 44 61 74 61 28 0a 24 74 61 | ';.}..$phar.=.new.\PharData(.$ta |
d4780 | 72 67 65 74 2c 0a 5c 46 69 6c 65 73 79 73 74 65 6d 49 74 65 72 61 74 6f 72 3a 3a 4b 45 59 5f 41 | rget,.\FilesystemIterator::KEY_A |
d47a0 | 53 5f 50 41 54 48 4e 41 4d 45 20 7c 20 5c 46 69 6c 65 73 79 73 74 65 6d 49 74 65 72 61 74 6f 72 | S_PATHNAME.|.\FilesystemIterator |
d47c0 | 3a 3a 43 55 52 52 45 4e 54 5f 41 53 5f 46 49 4c 45 49 4e 46 4f 2c 0a 27 27 2c 0a 73 74 61 74 69 | ::CURRENT_AS_FILEINFO,.'',.stati |
d47e0 | 63 3a 3a 24 66 6f 72 6d 61 74 73 5b 24 66 6f 72 6d 61 74 5d 0a 29 3b 0a 24 66 69 6c 65 73 20 3d | c::$formats[$format].);.$files.= |
d4800 | 20 6e 65 77 20 41 72 63 68 69 76 61 62 6c 65 46 69 6c 65 73 46 69 6e 64 65 72 28 24 73 6f 75 72 | .new.ArchivableFilesFinder($sour |
d4820 | 63 65 73 2c 20 24 65 78 63 6c 75 64 65 73 2c 20 24 69 67 6e 6f 72 65 46 69 6c 74 65 72 73 29 3b | ces,.$excludes,.$ignoreFilters); |
d4840 | 0a 24 66 69 6c 65 73 4f 6e 6c 79 20 3d 20 6e 65 77 20 41 72 63 68 69 76 61 62 6c 65 46 69 6c 65 | .$filesOnly.=.new.ArchivableFile |
d4860 | 73 46 69 6c 74 65 72 28 24 66 69 6c 65 73 29 3b 0a 24 70 68 61 72 2d 3e 62 75 69 6c 64 46 72 6f | sFilter($files);.$phar->buildFro |
d4880 | 6d 49 74 65 72 61 74 6f 72 28 24 66 69 6c 65 73 4f 6e 6c 79 2c 20 24 73 6f 75 72 63 65 73 29 3b | mIterator($filesOnly,.$sources); |
d48a0 | 0a 24 66 69 6c 65 73 4f 6e 6c 79 2d 3e 61 64 64 45 6d 70 74 79 44 69 72 28 24 70 68 61 72 2c 20 | .$filesOnly->addEmptyDir($phar,. |
d48c0 | 24 73 6f 75 72 63 65 73 29 3b 0a 0a 69 66 20 28 69 73 73 65 74 28 73 74 61 74 69 63 3a 3a 24 63 | $sources);..if.(isset(static::$c |
d48e0 | 6f 6d 70 72 65 73 73 46 6f 72 6d 61 74 73 5b 24 66 6f 72 6d 61 74 5d 29 29 20 7b 0a 0a 69 66 20 | ompressFormats[$format])).{..if. |
d4900 | 28 21 24 70 68 61 72 2d 3e 63 61 6e 43 6f 6d 70 72 65 73 73 28 73 74 61 74 69 63 3a 3a 24 63 6f | (!$phar->canCompress(static::$co |
d4920 | 6d 70 72 65 73 73 46 6f 72 6d 61 74 73 5b 24 66 6f 72 6d 61 74 5d 29 29 20 7b 0a 74 68 72 6f 77 | mpressFormats[$format])).{.throw |
d4940 | 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 73 70 72 69 6e 74 66 28 27 | .new.\RuntimeException(sprintf(' |
d4960 | 43 61 6e 20 6e 6f 74 20 63 6f 6d 70 72 65 73 73 20 74 6f 20 25 73 20 66 6f 72 6d 61 74 27 2c 20 | Can.not.compress.to.%s.format',. |
d4980 | 24 66 6f 72 6d 61 74 29 29 3b 0a 7d 0a 0a 0a 75 6e 6c 69 6e 6b 28 24 74 61 72 67 65 74 29 3b 0a | $format));.}...unlink($target);. |
d49a0 | 0a 0a 24 70 68 61 72 2d 3e 63 6f 6d 70 72 65 73 73 28 73 74 61 74 69 63 3a 3a 24 63 6f 6d 70 72 | ..$phar->compress(static::$compr |
d49c0 | 65 73 73 46 6f 72 6d 61 74 73 5b 24 66 6f 72 6d 61 74 5d 29 3b 0a 0a 0a 24 74 61 72 67 65 74 20 | essFormats[$format]);...$target. |
d49e0 | 3d 20 24 66 69 6c 65 6e 61 6d 65 20 2e 20 27 2e 27 20 2e 20 24 66 6f 72 6d 61 74 3b 0a 7d 0a 0a | =.$filename...'.'...$format;.}.. |
d4a00 | 72 65 74 75 72 6e 20 24 74 61 72 67 65 74 3b 0a 7d 20 63 61 74 63 68 20 28 5c 55 6e 65 78 70 65 | return.$target;.}.catch.(\Unexpe |
d4a20 | 63 74 65 64 56 61 6c 75 65 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 24 6d 65 73 73 61 67 | ctedValueException.$e).{.$messag |
d4a40 | 65 20 3d 20 73 70 72 69 6e 74 66 28 0a 22 43 6f 75 6c 64 20 6e 6f 74 20 63 72 65 61 74 65 20 61 | e.=.sprintf(."Could.not.create.a |
d4a60 | 72 63 68 69 76 65 20 27 25 73 27 20 66 72 6f 6d 20 27 25 73 27 3a 20 25 73 22 2c 0a 24 74 61 72 | rchive.'%s'.from.'%s':.%s",.$tar |
d4a80 | 67 65 74 2c 0a 24 73 6f 75 72 63 65 73 2c 0a 24 65 2d 3e 67 65 74 4d 65 73 73 61 67 65 28 29 0a | get,.$sources,.$e->getMessage(). |
d4aa0 | 29 3b 0a 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 | );..throw.new.\RuntimeException( |
d4ac0 | 24 6d 65 73 73 61 67 65 2c 20 24 65 2d 3e 67 65 74 43 6f 64 65 28 29 2c 20 24 65 29 3b 0a 7d 0a | $message,.$e->getCode(),.$e);.}. |
d4ae0 | 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 75 70 70 6f 72 74 73 28 73 | }.....public.function.supports(s |
d4b00 | 74 72 69 6e 67 20 24 66 6f 72 6d 61 74 2c 20 3f 73 74 72 69 6e 67 20 24 73 6f 75 72 63 65 54 79 | tring.$format,.?string.$sourceTy |
d4b20 | 70 65 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 69 73 73 65 74 28 73 74 61 74 69 63 3a | pe):.bool.{.return.isset(static: |
d4b40 | 3a 24 66 6f 72 6d 61 74 73 5b 24 66 6f 72 6d 61 74 5d 29 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 | :$formats[$format]);.}.}.<?php.d |
d4b60 | 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a | eclare(strict_types=1);......... |
d4b80 | 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 41 72 | ...namespace.Composer\Package\Ar |
d4ba0 | 63 68 69 76 65 72 3b 0a 0a 75 73 65 20 5a 69 70 41 72 63 68 69 76 65 3b 0a 75 73 65 20 43 6f 6d | chiver;..use.ZipArchive;.use.Com |
d4bc0 | 70 6f 73 65 72 5c 55 74 69 6c 5c 46 69 6c 65 73 79 73 74 65 6d 3b 0a 0a 0a 0a 0a 63 6c 61 73 73 | poser\Util\Filesystem;.....class |
d4be0 | 20 5a 69 70 41 72 63 68 69 76 65 72 20 69 6d 70 6c 65 6d 65 6e 74 73 20 41 72 63 68 69 76 65 72 | .ZipArchiver.implements.Archiver |
d4c00 | 49 6e 74 65 72 66 61 63 65 0a 7b 0a 0a 70 72 6f 74 65 63 74 65 64 20 73 74 61 74 69 63 20 24 66 | Interface.{..protected.static.$f |
d4c20 | 6f 72 6d 61 74 73 20 3d 20 5b 0a 27 7a 69 70 27 20 3d 3e 20 74 72 75 65 2c 0a 5d 3b 0a 0a 0a 0a | ormats.=.[.'zip'.=>.true,.];.... |
d4c40 | 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 61 72 63 68 69 76 65 28 73 74 72 69 6e 67 20 | .public.function.archive(string. |
d4c60 | 24 73 6f 75 72 63 65 73 2c 20 73 74 72 69 6e 67 20 24 74 61 72 67 65 74 2c 20 73 74 72 69 6e 67 | $sources,.string.$target,.string |
d4c80 | 20 24 66 6f 72 6d 61 74 2c 20 61 72 72 61 79 20 24 65 78 63 6c 75 64 65 73 20 3d 20 5b 5d 2c 20 | .$format,.array.$excludes.=.[],. |
d4ca0 | 62 6f 6f 6c 20 24 69 67 6e 6f 72 65 46 69 6c 74 65 72 73 20 3d 20 66 61 6c 73 65 29 3a 20 73 74 | bool.$ignoreFilters.=.false):.st |
d4cc0 | 72 69 6e 67 0a 7b 0a 24 66 73 20 3d 20 6e 65 77 20 46 69 6c 65 73 79 73 74 65 6d 28 29 3b 0a 24 | ring.{.$fs.=.new.Filesystem();.$ |
d4ce0 | 73 6f 75 72 63 65 73 20 3d 20 24 66 73 2d 3e 6e 6f 72 6d 61 6c 69 7a 65 50 61 74 68 28 24 73 6f | sources.=.$fs->normalizePath($so |
d4d00 | 75 72 63 65 73 29 3b 0a 0a 24 7a 69 70 20 3d 20 6e 65 77 20 5a 69 70 41 72 63 68 69 76 65 28 29 | urces);..$zip.=.new.ZipArchive() |
d4d20 | 3b 0a 24 72 65 73 20 3d 20 24 7a 69 70 2d 3e 6f 70 65 6e 28 24 74 61 72 67 65 74 2c 20 5a 69 70 | ;.$res.=.$zip->open($target,.Zip |
d4d40 | 41 72 63 68 69 76 65 3a 3a 43 52 45 41 54 45 29 3b 0a 69 66 20 28 24 72 65 73 20 3d 3d 3d 20 74 | Archive::CREATE);.if.($res.===.t |
d4d60 | 72 75 65 29 20 7b 0a 24 66 69 6c 65 73 20 3d 20 6e 65 77 20 41 72 63 68 69 76 61 62 6c 65 46 69 | rue).{.$files.=.new.ArchivableFi |
d4d80 | 6c 65 73 46 69 6e 64 65 72 28 24 73 6f 75 72 63 65 73 2c 20 24 65 78 63 6c 75 64 65 73 2c 20 24 | lesFinder($sources,.$excludes,.$ |
d4da0 | 69 67 6e 6f 72 65 46 69 6c 74 65 72 73 29 3b 0a 66 6f 72 65 61 63 68 20 28 24 66 69 6c 65 73 20 | ignoreFilters);.foreach.($files. |
d4dc0 | 61 73 20 24 66 69 6c 65 29 20 7b 0a 0a 24 66 69 6c 65 70 61 74 68 20 3d 20 73 74 72 74 72 28 24 | as.$file).{..$filepath.=.strtr($ |
d4de0 | 66 69 6c 65 2d 3e 67 65 74 50 61 74 68 28 29 2e 22 2f 22 2e 24 66 69 6c 65 2d 3e 67 65 74 46 69 | file->getPath()."/".$file->getFi |
d4e00 | 6c 65 6e 61 6d 65 28 29 2c 20 27 5c 5c 27 2c 20 27 2f 27 29 3b 0a 24 6c 6f 63 61 6c 6e 61 6d 65 | lename(),.'\\',.'/');.$localname |
d4e20 | 20 3d 20 24 66 69 6c 65 70 61 74 68 3b 0a 69 66 20 28 73 74 72 70 6f 73 28 24 6c 6f 63 61 6c 6e | .=.$filepath;.if.(strpos($localn |
d4e40 | 61 6d 65 2c 20 24 73 6f 75 72 63 65 73 20 2e 20 27 2f 27 29 20 3d 3d 3d 20 30 29 20 7b 0a 24 6c | ame,.$sources...'/').===.0).{.$l |
d4e60 | 6f 63 61 6c 6e 61 6d 65 20 3d 20 73 75 62 73 74 72 28 24 6c 6f 63 61 6c 6e 61 6d 65 2c 20 73 74 | ocalname.=.substr($localname,.st |
d4e80 | 72 6c 65 6e 28 24 73 6f 75 72 63 65 73 20 2e 20 27 2f 27 29 29 3b 0a 7d 0a 69 66 20 28 24 66 69 | rlen($sources...'/'));.}.if.($fi |
d4ea0 | 6c 65 2d 3e 69 73 44 69 72 28 29 29 20 7b 0a 24 7a 69 70 2d 3e 61 64 64 45 6d 70 74 79 44 69 72 | le->isDir()).{.$zip->addEmptyDir |
d4ec0 | 28 24 6c 6f 63 61 6c 6e 61 6d 65 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 7a 69 70 2d 3e 61 64 64 | ($localname);.}.else.{.$zip->add |
d4ee0 | 46 69 6c 65 28 24 66 69 6c 65 70 61 74 68 2c 20 24 6c 6f 63 61 6c 6e 61 6d 65 29 3b 0a 7d 0a 0a | File($filepath,.$localname);.}.. |
d4f00 | 0a 0a 0a 69 66 20 28 6d 65 74 68 6f 64 5f 65 78 69 73 74 73 28 24 7a 69 70 2c 20 27 73 65 74 45 | ...if.(method_exists($zip,.'setE |
d4f20 | 78 74 65 72 6e 61 6c 41 74 74 72 69 62 75 74 65 73 4e 61 6d 65 27 29 29 20 7b 0a 24 70 65 72 6d | xternalAttributesName')).{.$perm |
d4f40 | 73 20 3d 20 66 69 6c 65 70 65 72 6d 73 28 24 66 69 6c 65 70 61 74 68 29 3b 0a 0a 0a 0a 0a 24 7a | s.=.fileperms($filepath);.....$z |
d4f60 | 69 70 2d 3e 73 65 74 45 78 74 65 72 6e 61 6c 41 74 74 72 69 62 75 74 65 73 4e 61 6d 65 28 24 6c | ip->setExternalAttributesName($l |
d4f80 | 6f 63 61 6c 6e 61 6d 65 2c 20 5a 69 70 41 72 63 68 69 76 65 3a 3a 4f 50 53 59 53 5f 55 4e 49 58 | ocalname,.ZipArchive::OPSYS_UNIX |
d4fa0 | 2c 20 24 70 65 72 6d 73 20 3c 3c 20 31 36 29 3b 0a 7d 0a 7d 0a 69 66 20 28 24 7a 69 70 2d 3e 63 | ,.$perms.<<.16);.}.}.if.($zip->c |
d4fc0 | 6c 6f 73 65 28 29 29 20 7b 0a 72 65 74 75 72 6e 20 24 74 61 72 67 65 74 3b 0a 7d 0a 7d 0a 24 6d | lose()).{.return.$target;.}.}.$m |
d4fe0 | 65 73 73 61 67 65 20 3d 20 73 70 72 69 6e 74 66 28 0a 22 43 6f 75 6c 64 20 6e 6f 74 20 63 72 65 | essage.=.sprintf(."Could.not.cre |
d5000 | 61 74 65 20 61 72 63 68 69 76 65 20 27 25 73 27 20 66 72 6f 6d 20 27 25 73 27 3a 20 25 73 22 2c | ate.archive.'%s'.from.'%s':.%s", |
d5020 | 0a 24 74 61 72 67 65 74 2c 0a 24 73 6f 75 72 63 65 73 2c 0a 24 7a 69 70 2d 3e 67 65 74 53 74 61 | .$target,.$sources,.$zip->getSta |
d5040 | 74 75 73 53 74 72 69 6e 67 28 29 0a 29 3b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d | tusString().);.throw.new.\Runtim |
d5060 | 65 45 78 63 65 70 74 69 6f 6e 28 24 6d 65 73 73 61 67 65 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c | eException($message);.}.....publ |
d5080 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 75 70 70 6f 72 74 73 28 73 74 72 69 6e 67 20 24 66 6f 72 | ic.function.supports(string.$for |
d50a0 | 6d 61 74 2c 20 3f 73 74 72 69 6e 67 20 24 73 6f 75 72 63 65 54 79 70 65 29 3a 20 62 6f 6f 6c 0a | mat,.?string.$sourceType):.bool. |
d50c0 | 7b 0a 72 65 74 75 72 6e 20 69 73 73 65 74 28 73 74 61 74 69 63 3a 3a 24 66 6f 72 6d 61 74 73 5b | {.return.isset(static::$formats[ |
d50e0 | 24 66 6f 72 6d 61 74 5d 29 20 26 26 20 24 74 68 69 73 2d 3e 63 6f 6d 70 72 65 73 73 69 6f 6e 41 | $format]).&&.$this->compressionA |
d5100 | 76 61 69 6c 61 62 6c 65 28 29 3b 0a 7d 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 | vailable();.}..private.function. |
d5120 | 63 6f 6d 70 72 65 73 73 69 6f 6e 41 76 61 69 6c 61 62 6c 65 28 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 | compressionAvailable():.bool.{.r |
d5140 | 65 74 75 72 6e 20 63 6c 61 73 73 5f 65 78 69 73 74 73 28 27 5a 69 70 41 72 63 68 69 76 65 27 29 | eturn.class_exists('ZipArchive') |
d5160 | 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 | ;.}.}.<?php.declare(strict_types |
d5180 | 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 | =1);............namespace.Compos |
d51a0 | 65 72 5c 50 61 63 6b 61 67 65 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 | er\Package;..use.Composer\Reposi |
d51c0 | 74 6f 72 79 5c 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f | tory\RepositoryInterface;.use.Co |
d51e0 | 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 | mposer\Repository\PlatformReposi |
d5200 | 74 6f 72 79 3b 0a 0a 0a 0a 0a 0a 0a 61 62 73 74 72 61 63 74 20 63 6c 61 73 73 20 42 61 73 65 50 | tory;.......abstract.class.BaseP |
d5220 | 61 63 6b 61 67 65 20 69 6d 70 6c 65 6d 65 6e 74 73 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 | ackage.implements.PackageInterfa |
d5240 | 63 65 0a 7b 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 24 73 75 70 70 6f 72 74 65 | ce.{.....public.static.$supporte |
d5260 | 64 4c 69 6e 6b 54 79 70 65 73 20 3d 20 5b 0a 27 72 65 71 75 69 72 65 27 20 3d 3e 20 5b 27 64 65 | dLinkTypes.=.[.'require'.=>.['de |
d5280 | 73 63 72 69 70 74 69 6f 6e 27 20 3d 3e 20 27 72 65 71 75 69 72 65 73 27 2c 20 27 6d 65 74 68 6f | scription'.=>.'requires',.'metho |
d52a0 | 64 27 20 3d 3e 20 4c 69 6e 6b 3a 3a 54 59 50 45 5f 52 45 51 55 49 52 45 5d 2c 0a 27 63 6f 6e 66 | d'.=>.Link::TYPE_REQUIRE],.'conf |
d52c0 | 6c 69 63 74 27 20 3d 3e 20 5b 27 64 65 73 63 72 69 70 74 69 6f 6e 27 20 3d 3e 20 27 63 6f 6e 66 | lict'.=>.['description'.=>.'conf |
d52e0 | 6c 69 63 74 73 27 2c 20 27 6d 65 74 68 6f 64 27 20 3d 3e 20 4c 69 6e 6b 3a 3a 54 59 50 45 5f 43 | licts',.'method'.=>.Link::TYPE_C |
d5300 | 4f 4e 46 4c 49 43 54 5d 2c 0a 27 70 72 6f 76 69 64 65 27 20 3d 3e 20 5b 27 64 65 73 63 72 69 70 | ONFLICT],.'provide'.=>.['descrip |
d5320 | 74 69 6f 6e 27 20 3d 3e 20 27 70 72 6f 76 69 64 65 73 27 2c 20 27 6d 65 74 68 6f 64 27 20 3d 3e | tion'.=>.'provides',.'method'.=> |
d5340 | 20 4c 69 6e 6b 3a 3a 54 59 50 45 5f 50 52 4f 56 49 44 45 5d 2c 0a 27 72 65 70 6c 61 63 65 27 20 | .Link::TYPE_PROVIDE],.'replace'. |
d5360 | 3d 3e 20 5b 27 64 65 73 63 72 69 70 74 69 6f 6e 27 20 3d 3e 20 27 72 65 70 6c 61 63 65 73 27 2c | =>.['description'.=>.'replaces', |
d5380 | 20 27 6d 65 74 68 6f 64 27 20 3d 3e 20 4c 69 6e 6b 3a 3a 54 59 50 45 5f 52 45 50 4c 41 43 45 5d | .'method'.=>.Link::TYPE_REPLACE] |
d53a0 | 2c 0a 27 72 65 71 75 69 72 65 2d 64 65 76 27 20 3d 3e 20 5b 27 64 65 73 63 72 69 70 74 69 6f 6e | ,.'require-dev'.=>.['description |
d53c0 | 27 20 3d 3e 20 27 72 65 71 75 69 72 65 73 20 28 66 6f 72 20 64 65 76 65 6c 6f 70 6d 65 6e 74 29 | '.=>.'requires.(for.development) |
d53e0 | 27 2c 20 27 6d 65 74 68 6f 64 27 20 3d 3e 20 4c 69 6e 6b 3a 3a 54 59 50 45 5f 44 45 56 5f 52 45 | ',.'method'.=>.Link::TYPE_DEV_RE |
d5400 | 51 55 49 52 45 5d 2c 0a 5d 3b 0a 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 53 54 41 42 49 4c 49 | QUIRE],.];..public.const.STABILI |
d5420 | 54 59 5f 53 54 41 42 4c 45 20 3d 20 30 3b 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 53 54 41 42 | TY_STABLE.=.0;.public.const.STAB |
d5440 | 49 4c 49 54 59 5f 52 43 20 3d 20 35 3b 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 53 54 41 42 49 | ILITY_RC.=.5;.public.const.STABI |
d5460 | 4c 49 54 59 5f 42 45 54 41 20 3d 20 31 30 3b 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 53 54 41 | LITY_BETA.=.10;.public.const.STA |
d5480 | 42 49 4c 49 54 59 5f 41 4c 50 48 41 20 3d 20 31 35 3b 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 | BILITY_ALPHA.=.15;.public.const. |
d54a0 | 53 54 41 42 49 4c 49 54 59 5f 44 45 56 20 3d 20 32 30 3b 0a 0a 0a 70 75 62 6c 69 63 20 73 74 61 | STABILITY_DEV.=.20;...public.sta |
d54c0 | 74 69 63 20 24 73 74 61 62 69 6c 69 74 69 65 73 20 3d 20 5b 0a 27 73 74 61 62 6c 65 27 20 3d 3e | tic.$stabilities.=.[.'stable'.=> |
d54e0 | 20 73 65 6c 66 3a 3a 53 54 41 42 49 4c 49 54 59 5f 53 54 41 42 4c 45 2c 0a 27 52 43 27 20 3d 3e | .self::STABILITY_STABLE,.'RC'.=> |
d5500 | 20 73 65 6c 66 3a 3a 53 54 41 42 49 4c 49 54 59 5f 52 43 2c 0a 27 62 65 74 61 27 20 3d 3e 20 73 | .self::STABILITY_RC,.'beta'.=>.s |
d5520 | 65 6c 66 3a 3a 53 54 41 42 49 4c 49 54 59 5f 42 45 54 41 2c 0a 27 61 6c 70 68 61 27 20 3d 3e 20 | elf::STABILITY_BETA,.'alpha'.=>. |
d5540 | 73 65 6c 66 3a 3a 53 54 41 42 49 4c 49 54 59 5f 41 4c 50 48 41 2c 0a 27 64 65 76 27 20 3d 3e 20 | self::STABILITY_ALPHA,.'dev'.=>. |
d5560 | 73 65 6c 66 3a 3a 53 54 41 42 49 4c 49 54 59 5f 44 45 56 2c 0a 5d 3b 0a 0a 0a 0a 0a 0a 0a 70 75 | self::STABILITY_DEV,.];.......pu |
d5580 | 62 6c 69 63 20 24 69 64 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 6e 61 6d 65 3b 0a 0a 70 72 6f | blic.$id;..protected.$name;..pro |
d55a0 | 74 65 63 74 65 64 20 24 70 72 65 74 74 79 4e 61 6d 65 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 | tected.$prettyName;..protected.$ |
d55c0 | 72 65 70 6f 73 69 74 6f 72 79 20 3d 20 6e 75 6c 6c 3b 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 | repository.=.null;.......public. |
d55e0 | 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 73 74 72 69 6e 67 20 24 6e 61 6d | function.__construct(string.$nam |
d5600 | 65 29 0a 7b 0a 24 74 68 69 73 2d 3e 70 72 65 74 74 79 4e 61 6d 65 20 3d 20 24 6e 61 6d 65 3b 0a | e).{.$this->prettyName.=.$name;. |
d5620 | 24 74 68 69 73 2d 3e 6e 61 6d 65 20 3d 20 73 74 72 74 6f 6c 6f 77 65 72 28 24 6e 61 6d 65 29 3b | $this->name.=.strtolower($name); |
d5640 | 0a 24 74 68 69 73 2d 3e 69 64 20 3d 20 2d 31 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 | .$this->id.=.-1;.}.....public.fu |
d5660 | 6e 63 74 69 6f 6e 20 67 65 74 4e 61 6d 65 28 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 | nction.getName():.string.{.retur |
d5680 | 6e 20 24 74 68 69 73 2d 3e 6e 61 6d 65 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 | n.$this->name;.}.....public.func |
d56a0 | 74 69 6f 6e 20 67 65 74 50 72 65 74 74 79 4e 61 6d 65 28 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 | tion.getPrettyName():.string.{.r |
d56c0 | 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 70 72 65 74 74 79 4e 61 6d 65 3b 0a 7d 0a 0a 0a 0a 0a 70 | eturn.$this->prettyName;.}.....p |
d56e0 | 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 4e 61 6d 65 73 28 24 70 72 6f 76 69 64 65 | ublic.function.getNames($provide |
d5700 | 73 20 3d 20 74 72 75 65 29 3a 20 61 72 72 61 79 0a 7b 0a 24 6e 61 6d 65 73 20 3d 20 5b 0a 24 74 | s.=.true):.array.{.$names.=.[.$t |
d5720 | 68 69 73 2d 3e 67 65 74 4e 61 6d 65 28 29 20 3d 3e 20 74 72 75 65 2c 0a 5d 3b 0a 0a 69 66 20 28 | his->getName().=>.true,.];..if.( |
d5740 | 24 70 72 6f 76 69 64 65 73 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 67 65 74 | $provides).{.foreach.($this->get |
d5760 | 50 72 6f 76 69 64 65 73 28 29 20 61 73 20 24 6c 69 6e 6b 29 20 7b 0a 24 6e 61 6d 65 73 5b 24 6c | Provides().as.$link).{.$names[$l |
d5780 | 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 74 28 29 5d 20 3d 20 74 72 75 65 3b 0a 7d 0a 7d 0a 0a 66 | ink->getTarget()].=.true;.}.}..f |
d57a0 | 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 67 65 74 52 65 70 6c 61 63 65 73 28 29 20 61 73 20 | oreach.($this->getReplaces().as. |
d57c0 | 24 6c 69 6e 6b 29 20 7b 0a 24 6e 61 6d 65 73 5b 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 74 | $link).{.$names[$link->getTarget |
d57e0 | 28 29 5d 20 3d 20 74 72 75 65 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 61 72 72 61 79 5f 6b 65 79 73 | ()].=.true;.}..return.array_keys |
d5800 | 28 24 6e 61 6d 65 73 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 | ($names);.}.....public.function. |
d5820 | 73 65 74 49 64 28 69 6e 74 20 24 69 64 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 69 64 | setId(int.$id):.void.{.$this->id |
d5840 | 20 3d 20 24 69 64 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 | .=.$id;.}.....public.function.ge |
d5860 | 74 49 64 28 29 3a 20 69 6e 74 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 69 64 3b 0a 7d | tId():.int.{.return.$this->id;.} |
d5880 | 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 52 65 70 6f 73 69 74 6f | .....public.function.setReposito |
d58a0 | 72 79 28 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 20 24 72 65 70 6f 73 69 74 6f | ry(RepositoryInterface.$reposito |
d58c0 | 72 79 29 3a 20 76 6f 69 64 0a 7b 0a 69 66 20 28 24 74 68 69 73 2d 3e 72 65 70 6f 73 69 74 6f 72 | ry):.void.{.if.($this->repositor |
d58e0 | 79 20 26 26 20 24 72 65 70 6f 73 69 74 6f 72 79 20 21 3d 3d 20 24 74 68 69 73 2d 3e 72 65 70 6f | y.&&.$repository.!==.$this->repo |
d5900 | 73 69 74 6f 72 79 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 4c 6f 67 69 63 45 78 63 65 70 74 | sitory).{.throw.new.\LogicExcept |
d5920 | 69 6f 6e 28 73 70 72 69 6e 74 66 28 0a 27 50 61 63 6b 61 67 65 20 22 25 73 22 20 63 61 6e 6e 6f | ion(sprintf(.'Package."%s".canno |
d5940 | 74 20 62 65 20 61 64 64 65 64 20 74 6f 20 72 65 70 6f 73 69 74 6f 72 79 20 22 25 73 22 20 61 73 | t.be.added.to.repository."%s".as |
d5960 | 20 69 74 20 69 73 20 61 6c 72 65 61 64 79 20 69 6e 20 72 65 70 6f 73 69 74 6f 72 79 20 22 25 73 | .it.is.already.in.repository."%s |
d5980 | 22 2e 27 2c 0a 24 74 68 69 73 2d 3e 67 65 74 50 72 65 74 74 79 4e 61 6d 65 28 29 2c 0a 24 72 65 | ".',.$this->getPrettyName(),.$re |
d59a0 | 70 6f 73 69 74 6f 72 79 2d 3e 67 65 74 52 65 70 6f 4e 61 6d 65 28 29 2c 0a 24 74 68 69 73 2d 3e | pository->getRepoName(),.$this-> |
d59c0 | 72 65 70 6f 73 69 74 6f 72 79 2d 3e 67 65 74 52 65 70 6f 4e 61 6d 65 28 29 0a 29 29 3b 0a 7d 0a | repository->getRepoName().));.}. |
d59e0 | 24 74 68 69 73 2d 3e 72 65 70 6f 73 69 74 6f 72 79 20 3d 20 24 72 65 70 6f 73 69 74 6f 72 79 3b | $this->repository.=.$repository; |
d5a00 | 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 52 65 70 6f 73 69 | .}.....public.function.getReposi |
d5a20 | 74 6f 72 79 28 29 3a 20 3f 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 0a 7b 0a 72 | tory():.?RepositoryInterface.{.r |
d5a40 | 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 72 65 70 6f 73 69 74 6f 72 79 3b 0a 7d 0a 0a 0a 0a 0a 70 | eturn.$this->repository;.}.....p |
d5a60 | 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 50 6c 61 74 66 6f 72 6d 28 29 3a 20 62 6f 6f | ublic.function.isPlatform():.boo |
d5a80 | 6c 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 79 28 | l.{.return.$this->getRepository( |
d5aa0 | 29 20 69 6e 73 74 61 6e 63 65 6f 66 20 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 3b | ).instanceof.PlatformRepository; |
d5ac0 | 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 55 6e 69 71 75 65 | .}.....public.function.getUnique |
d5ae0 | 4e 61 6d 65 28 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 67 | Name():.string.{.return.$this->g |
d5b00 | 65 74 4e 61 6d 65 28 29 2e 27 2d 27 2e 24 74 68 69 73 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 | etName().'-'.$this->getVersion() |
d5b20 | 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 65 71 75 61 6c 73 28 50 61 63 6b | ;.}..public.function.equals(Pack |
d5b40 | 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 29 3a 20 62 6f 6f 6c 0a 7b 0a 24 | ageInterface.$package):.bool.{.$ |
d5b60 | 73 65 6c 66 20 3d 20 24 74 68 69 73 3b 0a 69 66 20 28 24 74 68 69 73 20 69 6e 73 74 61 6e 63 65 | self.=.$this;.if.($this.instance |
d5b80 | 6f 66 20 41 6c 69 61 73 50 61 63 6b 61 67 65 29 20 7b 0a 24 73 65 6c 66 20 3d 20 24 74 68 69 73 | of.AliasPackage).{.$self.=.$this |
d5ba0 | 2d 3e 67 65 74 41 6c 69 61 73 4f 66 28 29 3b 0a 7d 0a 69 66 20 28 24 70 61 63 6b 61 67 65 20 69 | ->getAliasOf();.}.if.($package.i |
d5bc0 | 6e 73 74 61 6e 63 65 6f 66 20 41 6c 69 61 73 50 61 63 6b 61 67 65 29 20 7b 0a 24 70 61 63 6b 61 | nstanceof.AliasPackage).{.$packa |
d5be0 | 67 65 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 41 6c 69 61 73 4f 66 28 29 3b 0a 7d 0a 0a | ge.=.$package->getAliasOf();.}.. |
d5c00 | 72 65 74 75 72 6e 20 24 70 61 63 6b 61 67 65 20 3d 3d 3d 20 24 73 65 6c 66 3b 0a 7d 0a 0a 0a 0a | return.$package.===.$self;.}.... |
d5c20 | 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 74 6f 53 74 72 69 6e 67 28 29 3a 20 73 | .public.function.__toString():.s |
d5c40 | 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 67 65 74 55 6e 69 71 75 65 4e | tring.{.return.$this->getUniqueN |
d5c60 | 61 6d 65 28 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 50 72 65 | ame();.}..public.function.getPre |
d5c80 | 74 74 79 53 74 72 69 6e 67 28 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 | ttyString():.string.{.return.$th |
d5ca0 | 69 73 2d 3e 67 65 74 50 72 65 74 74 79 4e 61 6d 65 28 29 2e 27 20 27 2e 24 74 68 69 73 2d 3e 67 | is->getPrettyName().'.'.$this->g |
d5cc0 | 65 74 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 | etPrettyVersion();.}.....public. |
d5ce0 | 66 75 6e 63 74 69 6f 6e 20 67 65 74 46 75 6c 6c 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 62 6f | function.getFullPrettyVersion(bo |
d5d00 | 6f 6c 20 24 74 72 75 6e 63 61 74 65 20 3d 20 74 72 75 65 2c 20 69 6e 74 20 24 64 69 73 70 6c 61 | ol.$truncate.=.true,.int.$displa |
d5d20 | 79 4d 6f 64 65 20 3d 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3a 3a 44 49 53 50 4c 41 | yMode.=.PackageInterface::DISPLA |
d5d40 | 59 5f 53 4f 55 52 43 45 5f 52 45 46 5f 49 46 5f 44 45 56 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 69 | Y_SOURCE_REF_IF_DEV):.string.{.i |
d5d60 | 66 20 28 24 64 69 73 70 6c 61 79 4d 6f 64 65 20 3d 3d 3d 20 50 61 63 6b 61 67 65 49 6e 74 65 72 | f.($displayMode.===.PackageInter |
d5d80 | 66 61 63 65 3a 3a 44 49 53 50 4c 41 59 5f 53 4f 55 52 43 45 5f 52 45 46 5f 49 46 5f 44 45 56 20 | face::DISPLAY_SOURCE_REF_IF_DEV. |
d5da0 | 26 26 0a 28 21 24 74 68 69 73 2d 3e 69 73 44 65 76 28 29 20 7c 7c 20 21 5c 69 6e 5f 61 72 72 61 | &&.(!$this->isDev().||.!\in_arra |
d5dc0 | 79 28 24 74 68 69 73 2d 3e 67 65 74 53 6f 75 72 63 65 54 79 70 65 28 29 2c 20 5b 27 68 67 27 2c | y($this->getSourceType(),.['hg', |
d5de0 | 20 27 67 69 74 27 5d 29 29 0a 29 20 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 67 65 74 50 | .'git'])).).{.return.$this->getP |
d5e00 | 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 3b 0a 7d 0a 0a 73 77 69 74 63 68 20 28 24 64 69 73 70 | rettyVersion();.}..switch.($disp |
d5e20 | 6c 61 79 4d 6f 64 65 29 20 7b 0a 63 61 73 65 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 | layMode).{.case.PackageInterface |
d5e40 | 3a 3a 44 49 53 50 4c 41 59 5f 53 4f 55 52 43 45 5f 52 45 46 5f 49 46 5f 44 45 56 3a 0a 63 61 73 | ::DISPLAY_SOURCE_REF_IF_DEV:.cas |
d5e60 | 65 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3a 3a 44 49 53 50 4c 41 59 5f 53 4f 55 52 | e.PackageInterface::DISPLAY_SOUR |
d5e80 | 43 45 5f 52 45 46 3a 0a 24 72 65 66 65 72 65 6e 63 65 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 53 | CE_REF:.$reference.=.$this->getS |
d5ea0 | 6f 75 72 63 65 52 65 66 65 72 65 6e 63 65 28 29 3b 0a 62 72 65 61 6b 3b 0a 63 61 73 65 20 50 61 | ourceReference();.break;.case.Pa |
d5ec0 | 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3a 3a 44 49 53 50 4c 41 59 5f 44 49 53 54 5f 52 45 46 | ckageInterface::DISPLAY_DIST_REF |
d5ee0 | 3a 0a 24 72 65 66 65 72 65 6e 63 65 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 44 69 73 74 52 65 66 | :.$reference.=.$this->getDistRef |
d5f00 | 65 72 65 6e 63 65 28 29 3b 0a 62 72 65 61 6b 3b 0a 64 65 66 61 75 6c 74 3a 0a 74 68 72 6f 77 20 | erence();.break;.default:.throw. |
d5f20 | 6e 65 77 20 5c 55 6e 65 78 70 65 63 74 65 64 56 61 6c 75 65 45 78 63 65 70 74 69 6f 6e 28 27 44 | new.\UnexpectedValueException('D |
d5f40 | 69 73 70 6c 61 79 20 6d 6f 64 65 20 27 2e 24 64 69 73 70 6c 61 79 4d 6f 64 65 2e 27 20 69 73 20 | isplay.mode.'.$displayMode.'.is. |
d5f60 | 6e 6f 74 20 73 75 70 70 6f 72 74 65 64 27 29 3b 0a 7d 0a 0a 69 66 20 28 6e 75 6c 6c 20 3d 3d 3d | not.supported');.}..if.(null.=== |
d5f80 | 20 24 72 65 66 65 72 65 6e 63 65 29 20 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 67 65 74 | .$reference).{.return.$this->get |
d5fa0 | 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 3b 0a 7d 0a 0a 0a 69 66 20 28 24 74 72 75 6e 63 61 | PrettyVersion();.}...if.($trunca |
d5fc0 | 74 65 20 26 26 20 5c 73 74 72 6c 65 6e 28 24 72 65 66 65 72 65 6e 63 65 29 20 3d 3d 3d 20 34 30 | te.&&.\strlen($reference).===.40 |
d5fe0 | 20 26 26 20 24 74 68 69 73 2d 3e 67 65 74 53 6f 75 72 63 65 54 79 70 65 28 29 20 21 3d 3d 20 27 | .&&.$this->getSourceType().!==.' |
d6000 | 73 76 6e 27 29 20 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 67 65 74 50 72 65 74 74 79 56 | svn').{.return.$this->getPrettyV |
d6020 | 65 72 73 69 6f 6e 28 29 20 2e 20 27 20 27 20 2e 20 73 75 62 73 74 72 28 24 72 65 66 65 72 65 6e | ersion()...'.'...substr($referen |
d6040 | 63 65 2c 20 30 2c 20 37 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 67 65 74 50 | ce,.0,.7);.}..return.$this->getP |
d6060 | 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 20 2e 20 27 20 27 20 2e 20 24 72 65 66 65 72 65 6e 63 | rettyVersion()...'.'...$referenc |
d6080 | 65 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 53 74 61 62 | e;.}.....public.function.getStab |
d60a0 | 69 6c 69 74 79 50 72 69 6f 72 69 74 79 28 29 3a 20 69 6e 74 0a 7b 0a 72 65 74 75 72 6e 20 73 65 | ilityPriority():.int.{.return.se |
d60c0 | 6c 66 3a 3a 24 73 74 61 62 69 6c 69 74 69 65 73 5b 24 74 68 69 73 2d 3e 67 65 74 53 74 61 62 69 | lf::$stabilities[$this->getStabi |
d60e0 | 6c 69 74 79 28 29 5d 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6c | lity()];.}..public.function.__cl |
d6100 | 6f 6e 65 28 29 0a 7b 0a 24 74 68 69 73 2d 3e 72 65 70 6f 73 69 74 6f 72 79 20 3d 20 6e 75 6c 6c | one().{.$this->repository.=.null |
d6120 | 3b 0a 24 74 68 69 73 2d 3e 69 64 20 3d 20 2d 31 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 | ;.$this->id.=.-1;.}........publi |
d6140 | 63 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 70 61 63 6b 61 67 65 4e 61 6d 65 54 6f 52 | c.static.function.packageNameToR |
d6160 | 65 67 65 78 70 28 73 74 72 69 6e 67 20 24 61 6c 6c 6f 77 50 61 74 74 65 72 6e 2c 20 73 74 72 69 | egexp(string.$allowPattern,.stri |
d6180 | 6e 67 20 24 77 72 61 70 20 3d 20 27 7b 5e 25 73 24 7d 69 27 29 3a 20 73 74 72 69 6e 67 0a 7b 0a | ng.$wrap.=.'{^%s$}i'):.string.{. |
d61a0 | 24 63 6c 65 61 6e 65 64 41 6c 6c 6f 77 50 61 74 74 65 72 6e 20 3d 20 73 74 72 5f 72 65 70 6c 61 | $cleanedAllowPattern.=.str_repla |
d61c0 | 63 65 28 27 5c 5c 2a 27 2c 20 27 2e 2a 27 2c 20 70 72 65 67 5f 71 75 6f 74 65 28 24 61 6c 6c 6f | ce('\\*',.'.*',.preg_quote($allo |
d61e0 | 77 50 61 74 74 65 72 6e 29 29 3b 0a 0a 72 65 74 75 72 6e 20 73 70 72 69 6e 74 66 28 24 77 72 61 | wPattern));..return.sprintf($wra |
d6200 | 70 2c 20 24 63 6c 65 61 6e 65 64 41 6c 6c 6f 77 50 61 74 74 65 72 6e 29 3b 0a 7d 0a 0a 0a 0a 0a | p,.$cleanedAllowPattern);.}..... |
d6220 | 0a 0a 0a 0a 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 70 61 63 6b 61 | ....public.static.function.packa |
d6240 | 67 65 4e 61 6d 65 73 54 6f 52 65 67 65 78 70 28 61 72 72 61 79 20 24 70 61 63 6b 61 67 65 4e 61 | geNamesToRegexp(array.$packageNa |
d6260 | 6d 65 73 2c 20 73 74 72 69 6e 67 20 24 77 72 61 70 20 3d 20 27 7b 5e 28 3f 3a 25 73 29 24 7d 69 | mes,.string.$wrap.=.'{^(?:%s)$}i |
d6280 | 44 27 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 24 70 61 63 6b 61 67 65 4e 61 6d 65 73 20 3d 20 61 72 | D'):.string.{.$packageNames.=.ar |
d62a0 | 72 61 79 5f 6d 61 70 28 0a 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 70 61 63 6b 61 | ray_map(.static.function.($packa |
d62c0 | 67 65 4e 61 6d 65 29 3a 20 73 74 72 69 6e 67 20 7b 0a 72 65 74 75 72 6e 20 42 61 73 65 50 61 63 | geName):.string.{.return.BasePac |
d62e0 | 6b 61 67 65 3a 3a 70 61 63 6b 61 67 65 4e 61 6d 65 54 6f 52 65 67 65 78 70 28 24 70 61 63 6b 61 | kage::packageNameToRegexp($packa |
d6300 | 67 65 4e 61 6d 65 2c 20 27 25 73 27 29 3b 0a 7d 2c 0a 24 70 61 63 6b 61 67 65 4e 61 6d 65 73 0a | geName,.'%s');.},.$packageNames. |
d6320 | 29 3b 0a 0a 72 65 74 75 72 6e 20 73 70 72 69 6e 74 66 28 24 77 72 61 70 2c 20 69 6d 70 6c 6f 64 | );..return.sprintf($wrap,.implod |
d6340 | 65 28 27 7c 27 2c 20 24 70 61 63 6b 61 67 65 4e 61 6d 65 73 29 29 3b 0a 7d 0a 7d 0a 3c 3f 70 68 | e('|',.$packageNames));.}.}.<?ph |
d6360 | 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a | p.declare(strict_types=1);...... |
d6380 | 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 | ......namespace.Composer\Package |
d63a0 | 5c 43 6f 6d 70 61 72 65 72 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 6c | \Comparer;..use.Composer\Util\Pl |
d63c0 | 61 74 66 6f 72 6d 3b 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 43 6f 6d 70 61 72 65 72 0a 7b 0a 0a | atform;.......class.Comparer.{.. |
d63e0 | 70 72 69 76 61 74 65 20 24 73 6f 75 72 63 65 3b 0a 0a 70 72 69 76 61 74 65 20 24 75 70 64 61 74 | private.$source;..private.$updat |
d6400 | 65 3b 0a 0a 70 72 69 76 61 74 65 20 24 63 68 61 6e 67 65 64 3b 0a 0a 70 75 62 6c 69 63 20 66 75 | e;..private.$changed;..public.fu |
d6420 | 6e 63 74 69 6f 6e 20 73 65 74 53 6f 75 72 63 65 28 73 74 72 69 6e 67 20 24 73 6f 75 72 63 65 29 | nction.setSource(string.$source) |
d6440 | 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 73 6f 75 72 63 65 20 3d 20 24 73 6f 75 72 63 65 | :.void.{.$this->source.=.$source |
d6460 | 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 55 70 64 61 74 65 28 73 | ;.}..public.function.setUpdate(s |
d6480 | 74 72 69 6e 67 20 24 75 70 64 61 74 65 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 75 70 | tring.$update):.void.{.$this->up |
d64a0 | 64 61 74 65 20 3d 20 24 75 70 64 61 74 65 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e | date.=.$update;.}.....public.fun |
d64c0 | 63 74 69 6f 6e 20 67 65 74 43 68 61 6e 67 65 64 28 62 6f 6f 6c 20 24 65 78 70 6c 69 63 61 74 65 | ction.getChanged(bool.$explicate |
d64e0 | 64 20 3d 20 66 61 6c 73 65 29 0a 7b 0a 24 63 68 61 6e 67 65 64 20 3d 20 24 74 68 69 73 2d 3e 63 | d.=.false).{.$changed.=.$this->c |
d6500 | 68 61 6e 67 65 64 3b 0a 69 66 20 28 21 63 6f 75 6e 74 28 24 63 68 61 6e 67 65 64 29 29 20 7b 0a | hanged;.if.(!count($changed)).{. |
d6520 | 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 69 66 20 28 24 65 78 70 6c 69 63 61 74 65 64 29 | return.false;.}.if.($explicated) |
d6540 | 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 63 68 61 6e 67 65 64 20 61 73 20 24 73 65 63 74 69 6f 6e | .{.foreach.($changed.as.$section |
d6560 | 4b 65 79 20 3d 3e 20 24 69 74 65 6d 53 65 63 74 69 6f 6e 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 | Key.=>.$itemSection).{.foreach.( |
d6580 | 24 69 74 65 6d 53 65 63 74 69 6f 6e 20 61 73 20 24 69 74 65 6d 4b 65 79 20 3d 3e 20 24 69 74 65 | $itemSection.as.$itemKey.=>.$ite |
d65a0 | 6d 29 20 7b 0a 24 63 68 61 6e 67 65 64 5b 24 73 65 63 74 69 6f 6e 4b 65 79 5d 5b 24 69 74 65 6d | m).{.$changed[$sectionKey][$item |
d65c0 | 4b 65 79 5d 20 3d 20 24 69 74 65 6d 2e 27 20 28 27 2e 24 73 65 63 74 69 6f 6e 4b 65 79 2e 27 29 | Key].=.$item.'.('.$sectionKey.') |
d65e0 | 27 3b 0a 7d 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 63 68 61 6e 67 65 64 3b 0a 7d 0a 0a 0a 0a | ';.}.}.}..return.$changed;.}.... |
d6600 | 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 43 68 61 6e 67 65 64 41 73 53 74 72 | .public.function.getChangedAsStr |
d6620 | 69 6e 67 28 62 6f 6f 6c 20 24 74 6f 53 74 72 69 6e 67 20 3d 20 66 61 6c 73 65 2c 20 62 6f 6f 6c | ing(bool.$toString.=.false,.bool |
d6640 | 20 24 65 78 70 6c 69 63 61 74 65 64 20 3d 20 66 61 6c 73 65 29 3a 20 73 74 72 69 6e 67 0a 7b 0a | .$explicated.=.false):.string.{. |
d6660 | 24 63 68 61 6e 67 65 64 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 43 68 61 6e 67 65 64 28 24 65 78 | $changed.=.$this->getChanged($ex |
d6680 | 70 6c 69 63 61 74 65 64 29 3b 0a 69 66 20 28 66 61 6c 73 65 20 3d 3d 3d 20 24 63 68 61 6e 67 65 | plicated);.if.(false.===.$change |
d66a0 | 64 29 20 7b 0a 72 65 74 75 72 6e 20 27 27 3b 0a 7d 0a 0a 24 73 74 72 69 6e 67 73 20 3d 20 5b 5d | d).{.return.'';.}..$strings.=.[] |
d66c0 | 3b 0a 66 6f 72 65 61 63 68 20 28 24 63 68 61 6e 67 65 64 20 61 73 20 24 73 65 63 74 69 6f 6e 4b | ;.foreach.($changed.as.$sectionK |
d66e0 | 65 79 20 3d 3e 20 24 69 74 65 6d 53 65 63 74 69 6f 6e 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 | ey.=>.$itemSection).{.foreach.($ |
d6700 | 69 74 65 6d 53 65 63 74 69 6f 6e 20 61 73 20 24 69 74 65 6d 4b 65 79 20 3d 3e 20 24 69 74 65 6d | itemSection.as.$itemKey.=>.$item |
d6720 | 29 20 7b 0a 24 73 74 72 69 6e 67 73 5b 5d 20 3d 20 24 69 74 65 6d 2e 22 5c 72 5c 6e 22 3b 0a 7d | ).{.$strings[].=.$item."\r\n";.} |
d6740 | 0a 7d 0a 0a 72 65 74 75 72 6e 20 74 72 69 6d 28 69 6d 70 6c 6f 64 65 28 22 5c 72 5c 6e 22 2c 20 | .}..return.trim(implode("\r\n",. |
d6760 | 24 73 74 72 69 6e 67 73 29 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 64 | $strings));.}..public.function.d |
d6780 | 6f 43 6f 6d 70 61 72 65 28 29 3a 20 76 6f 69 64 0a 7b 0a 24 73 6f 75 72 63 65 20 3d 20 5b 5d 3b | oCompare():.void.{.$source.=.[]; |
d67a0 | 0a 24 64 65 73 74 69 6e 61 74 69 6f 6e 20 3d 20 5b 5d 3b 0a 24 74 68 69 73 2d 3e 63 68 61 6e 67 | .$destination.=.[];.$this->chang |
d67c0 | 65 64 20 3d 20 5b 5d 3b 0a 24 63 75 72 72 65 6e 74 44 69 72 65 63 74 6f 72 79 20 3d 20 50 6c 61 | ed.=.[];.$currentDirectory.=.Pla |
d67e0 | 74 66 6f 72 6d 3a 3a 67 65 74 43 77 64 28 29 3b 0a 63 68 64 69 72 28 24 74 68 69 73 2d 3e 73 6f | tform::getCwd();.chdir($this->so |
d6800 | 75 72 63 65 29 3b 0a 24 73 6f 75 72 63 65 20 3d 20 24 74 68 69 73 2d 3e 64 6f 54 72 65 65 28 27 | urce);.$source.=.$this->doTree(' |
d6820 | 2e 27 2c 20 24 73 6f 75 72 63 65 29 3b 0a 69 66 20 28 21 69 73 5f 61 72 72 61 79 28 24 73 6f 75 | .',.$source);.if.(!is_array($sou |
d6840 | 72 63 65 29 29 20 7b 0a 72 65 74 75 72 6e 3b 0a 7d 0a 63 68 64 69 72 28 24 63 75 72 72 65 6e 74 | rce)).{.return;.}.chdir($current |
d6860 | 44 69 72 65 63 74 6f 72 79 29 3b 0a 63 68 64 69 72 28 24 74 68 69 73 2d 3e 75 70 64 61 74 65 29 | Directory);.chdir($this->update) |
d6880 | 3b 0a 24 64 65 73 74 69 6e 61 74 69 6f 6e 20 3d 20 24 74 68 69 73 2d 3e 64 6f 54 72 65 65 28 27 | ;.$destination.=.$this->doTree(' |
d68a0 | 2e 27 2c 20 24 64 65 73 74 69 6e 61 74 69 6f 6e 29 3b 0a 69 66 20 28 21 69 73 5f 61 72 72 61 79 | .',.$destination);.if.(!is_array |
d68c0 | 28 24 64 65 73 74 69 6e 61 74 69 6f 6e 29 29 20 7b 0a 65 78 69 74 3b 0a 7d 0a 63 68 64 69 72 28 | ($destination)).{.exit;.}.chdir( |
d68e0 | 24 63 75 72 72 65 6e 74 44 69 72 65 63 74 6f 72 79 29 3b 0a 66 6f 72 65 61 63 68 20 28 24 73 6f | $currentDirectory);.foreach.($so |
d6900 | 75 72 63 65 20 61 73 20 24 64 69 72 20 3d 3e 20 24 76 61 6c 75 65 29 20 7b 0a 66 6f 72 65 61 63 | urce.as.$dir.=>.$value).{.foreac |
d6920 | 68 20 28 24 76 61 6c 75 65 20 61 73 20 24 66 69 6c 65 20 3d 3e 20 24 68 61 73 68 29 20 7b 0a 69 | h.($value.as.$file.=>.$hash).{.i |
d6940 | 66 20 28 69 73 73 65 74 28 24 64 65 73 74 69 6e 61 74 69 6f 6e 5b 24 64 69 72 5d 5b 24 66 69 6c | f.(isset($destination[$dir][$fil |
d6960 | 65 5d 29 29 20 7b 0a 69 66 20 28 24 68 61 73 68 20 21 3d 3d 20 24 64 65 73 74 69 6e 61 74 69 6f | e])).{.if.($hash.!==.$destinatio |
d6980 | 6e 5b 24 64 69 72 5d 5b 24 66 69 6c 65 5d 29 20 7b 0a 24 74 68 69 73 2d 3e 63 68 61 6e 67 65 64 | n[$dir][$file]).{.$this->changed |
d69a0 | 5b 27 63 68 61 6e 67 65 64 27 5d 5b 5d 20 3d 20 24 64 69 72 2e 27 2f 27 2e 24 66 69 6c 65 3b 0a | ['changed'][].=.$dir.'/'.$file;. |
d69c0 | 7d 0a 7d 20 65 6c 73 65 20 7b 0a 24 74 68 69 73 2d 3e 63 68 61 6e 67 65 64 5b 27 72 65 6d 6f 76 | }.}.else.{.$this->changed['remov |
d69e0 | 65 64 27 5d 5b 5d 20 3d 20 24 64 69 72 2e 27 2f 27 2e 24 66 69 6c 65 3b 0a 7d 0a 7d 0a 7d 0a 66 | ed'][].=.$dir.'/'.$file;.}.}.}.f |
d6a00 | 6f 72 65 61 63 68 20 28 24 64 65 73 74 69 6e 61 74 69 6f 6e 20 61 73 20 24 64 69 72 20 3d 3e 20 | oreach.($destination.as.$dir.=>. |
d6a20 | 24 76 61 6c 75 65 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 76 61 6c 75 65 20 61 73 20 24 66 69 | $value).{.foreach.($value.as.$fi |
d6a40 | 6c 65 20 3d 3e 20 24 68 61 73 68 29 20 7b 0a 69 66 20 28 21 69 73 73 65 74 28 24 73 6f 75 72 63 | le.=>.$hash).{.if.(!isset($sourc |
d6a60 | 65 5b 24 64 69 72 5d 5b 24 66 69 6c 65 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 63 68 61 6e 67 65 | e[$dir][$file])).{.$this->change |
d6a80 | 64 5b 27 61 64 64 65 64 27 5d 5b 5d 20 3d 20 24 64 69 72 2e 27 2f 27 2e 24 66 69 6c 65 3b 0a 7d | d['added'][].=.$dir.'/'.$file;.} |
d6aa0 | 0a 7d 0a 7d 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 64 6f | .}.}.}.......private.function.do |
d6ac0 | 54 72 65 65 28 73 74 72 69 6e 67 20 24 64 69 72 2c 20 61 72 72 61 79 20 26 24 61 72 72 61 79 29 | Tree(string.$dir,.array.&$array) |
d6ae0 | 0a 7b 0a 69 66 20 28 24 64 68 20 3d 20 6f 70 65 6e 64 69 72 28 24 64 69 72 29 29 20 7b 0a 77 68 | .{.if.($dh.=.opendir($dir)).{.wh |
d6b00 | 69 6c 65 20 28 24 66 69 6c 65 20 3d 20 72 65 61 64 64 69 72 28 24 64 68 29 29 20 7b 0a 69 66 20 | ile.($file.=.readdir($dh)).{.if. |
d6b20 | 28 24 66 69 6c 65 20 21 3d 3d 20 27 2e 27 20 26 26 20 24 66 69 6c 65 20 21 3d 3d 20 27 2e 2e 27 | ($file.!==.'.'.&&.$file.!==.'..' |
d6b40 | 29 20 7b 0a 69 66 20 28 69 73 5f 6c 69 6e 6b 28 24 64 69 72 2e 27 2f 27 2e 24 66 69 6c 65 29 29 | ).{.if.(is_link($dir.'/'.$file)) |
d6b60 | 20 7b 0a 24 61 72 72 61 79 5b 24 64 69 72 5d 5b 24 66 69 6c 65 5d 20 3d 20 72 65 61 64 6c 69 6e | .{.$array[$dir][$file].=.readlin |
d6b80 | 6b 28 24 64 69 72 2e 27 2f 27 2e 24 66 69 6c 65 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 69 73 5f | k($dir.'/'.$file);.}.elseif.(is_ |
d6ba0 | 64 69 72 28 24 64 69 72 2e 27 2f 27 2e 24 66 69 6c 65 29 29 20 7b 0a 69 66 20 28 21 63 6f 75 6e | dir($dir.'/'.$file)).{.if.(!coun |
d6bc0 | 74 28 24 61 72 72 61 79 29 29 20 7b 0a 24 61 72 72 61 79 5b 30 5d 20 3d 20 27 54 65 6d 70 27 3b | t($array)).{.$array[0].=.'Temp'; |
d6be0 | 0a 7d 0a 69 66 20 28 21 24 74 68 69 73 2d 3e 64 6f 54 72 65 65 28 24 64 69 72 2e 27 2f 27 2e 24 | .}.if.(!$this->doTree($dir.'/'.$ |
d6c00 | 66 69 6c 65 2c 20 24 61 72 72 61 79 29 29 20 7b 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d | file,.$array)).{.return.false;.} |
d6c20 | 0a 7d 20 65 6c 73 65 69 66 20 28 69 73 5f 66 69 6c 65 28 24 64 69 72 2e 27 2f 27 2e 24 66 69 6c | .}.elseif.(is_file($dir.'/'.$fil |
d6c40 | 65 29 20 26 26 20 66 69 6c 65 73 69 7a 65 28 24 64 69 72 2e 27 2f 27 2e 24 66 69 6c 65 29 29 20 | e).&&.filesize($dir.'/'.$file)). |
d6c60 | 7b 0a 24 61 72 72 61 79 5b 24 64 69 72 5d 5b 24 66 69 6c 65 5d 20 3d 20 6d 64 35 5f 66 69 6c 65 | {.$array[$dir][$file].=.md5_file |
d6c80 | 28 24 64 69 72 2e 27 2f 27 2e 24 66 69 6c 65 29 3b 0a 7d 0a 7d 0a 7d 0a 69 66 20 28 63 6f 75 6e | ($dir.'/'.$file);.}.}.}.if.(coun |
d6ca0 | 74 28 24 61 72 72 61 79 29 20 3e 20 31 20 26 26 20 69 73 73 65 74 28 24 61 72 72 61 79 5b 27 30 | t($array).>.1.&&.isset($array['0 |
d6cc0 | 27 5d 29 29 20 7b 0a 75 6e 73 65 74 28 24 61 72 72 61 79 5b 27 30 27 5d 29 3b 0a 7d 0a 0a 72 65 | '])).{.unset($array['0']);.}..re |
d6ce0 | 74 75 72 6e 20 24 61 72 72 61 79 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a | turn.$array;.}..return.false;.}. |
d6d00 | 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b | }.<?php.declare(strict_types=1); |
d6d20 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 50 | ............namespace.Composer\P |
d6d40 | 61 63 6b 61 67 65 3b 0a 0a 0a 0a 0a 63 6c 61 73 73 20 43 6f 6d 70 6c 65 74 65 41 6c 69 61 73 50 | ackage;.....class.CompleteAliasP |
d6d60 | 61 63 6b 61 67 65 20 65 78 74 65 6e 64 73 20 41 6c 69 61 73 50 61 63 6b 61 67 65 20 69 6d 70 6c | ackage.extends.AliasPackage.impl |
d6d80 | 65 6d 65 6e 74 73 20 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 0a | ements.CompletePackageInterface. |
d6da0 | 7b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 61 6c 69 61 73 4f 66 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 | {..protected.$aliasOf;.........p |
d6dc0 | 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 43 6f 6d 70 6c | ublic.function.__construct(Compl |
d6de0 | 65 74 65 50 61 63 6b 61 67 65 20 24 61 6c 69 61 73 4f 66 2c 20 73 74 72 69 6e 67 20 24 76 65 72 | etePackage.$aliasOf,.string.$ver |
d6e00 | 73 69 6f 6e 2c 20 73 74 72 69 6e 67 20 24 70 72 65 74 74 79 56 65 72 73 69 6f 6e 29 0a 7b 0a 70 | sion,.string.$prettyVersion).{.p |
d6e20 | 61 72 65 6e 74 3a 3a 5f 5f 63 6f 6e 73 74 72 75 63 74 28 24 61 6c 69 61 73 4f 66 2c 20 24 76 65 | arent::__construct($aliasOf,.$ve |
d6e40 | 72 73 69 6f 6e 2c 20 24 70 72 65 74 74 79 56 65 72 73 69 6f 6e 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 | rsion,.$prettyVersion);.}.....pu |
d6e60 | 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 41 6c 69 61 73 4f 66 28 29 0a 7b 0a 72 65 74 | blic.function.getAliasOf().{.ret |
d6e80 | 75 72 6e 20 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 | urn.$this->aliasOf;.}..public.fu |
d6ea0 | 6e 63 74 69 6f 6e 20 67 65 74 53 63 72 69 70 74 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 | nction.getScripts():.array.{.ret |
d6ec0 | 75 72 6e 20 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 67 65 74 53 63 72 69 70 74 73 28 29 | urn.$this->aliasOf->getScripts() |
d6ee0 | 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 53 63 72 69 70 74 73 28 | ;.}..public.function.setScripts( |
d6f00 | 61 72 72 61 79 20 24 73 63 72 69 70 74 73 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 61 | array.$scripts):.void.{.$this->a |
d6f20 | 6c 69 61 73 4f 66 2d 3e 73 65 74 53 63 72 69 70 74 73 28 24 73 63 72 69 70 74 73 29 3b 0a 7d 0a | liasOf->setScripts($scripts);.}. |
d6f40 | 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 52 65 70 6f 73 69 74 6f 72 69 65 73 | .public.function.getRepositories |
d6f60 | 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f | ():.array.{.return.$this->aliasO |
d6f80 | 66 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 69 65 73 28 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 | f->getRepositories();.}..public. |
d6fa0 | 66 75 6e 63 74 69 6f 6e 20 73 65 74 52 65 70 6f 73 69 74 6f 72 69 65 73 28 61 72 72 61 79 20 24 | function.setRepositories(array.$ |
d6fc0 | 72 65 70 6f 73 69 74 6f 72 69 65 73 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 61 6c 69 | repositories):.void.{.$this->ali |
d6fe0 | 61 73 4f 66 2d 3e 73 65 74 52 65 70 6f 73 69 74 6f 72 69 65 73 28 24 72 65 70 6f 73 69 74 6f 72 | asOf->setRepositories($repositor |
d7000 | 69 65 73 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 4c 69 63 65 | ies);.}..public.function.getLice |
d7020 | 6e 73 65 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 61 6c 69 | nse():.array.{.return.$this->ali |
d7040 | 61 73 4f 66 2d 3e 67 65 74 4c 69 63 65 6e 73 65 28 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 | asOf->getLicense();.}..public.fu |
d7060 | 6e 63 74 69 6f 6e 20 73 65 74 4c 69 63 65 6e 73 65 28 61 72 72 61 79 20 24 6c 69 63 65 6e 73 65 | nction.setLicense(array.$license |
d7080 | 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 73 65 74 4c 69 63 | ):.void.{.$this->aliasOf->setLic |
d70a0 | 65 6e 73 65 28 24 6c 69 63 65 6e 73 65 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 | ense($license);.}..public.functi |
d70c0 | 6f 6e 20 67 65 74 4b 65 79 77 6f 72 64 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e | on.getKeywords():.array.{.return |
d70e0 | 20 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 67 65 74 4b 65 79 77 6f 72 64 73 28 29 3b 0a | .$this->aliasOf->getKeywords();. |
d7100 | 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 4b 65 79 77 6f 72 64 73 28 61 | }..public.function.setKeywords(a |
d7120 | 72 72 61 79 20 24 6b 65 79 77 6f 72 64 73 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 61 | rray.$keywords):.void.{.$this->a |
d7140 | 6c 69 61 73 4f 66 2d 3e 73 65 74 4b 65 79 77 6f 72 64 73 28 24 6b 65 79 77 6f 72 64 73 29 3b 0a | liasOf->setKeywords($keywords);. |
d7160 | 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 44 65 73 63 72 69 70 74 69 6f | }..public.function.getDescriptio |
d7180 | 6e 28 29 3a 20 3f 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 61 6c 69 | n():.?string.{.return.$this->ali |
d71a0 | 61 73 4f 66 2d 3e 67 65 74 44 65 73 63 72 69 70 74 69 6f 6e 28 29 3b 0a 7d 0a 0a 70 75 62 6c 69 | asOf->getDescription();.}..publi |
d71c0 | 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 44 65 73 63 72 69 70 74 69 6f 6e 28 3f 73 74 72 69 6e | c.function.setDescription(?strin |
d71e0 | 67 20 24 64 65 73 63 72 69 70 74 69 6f 6e 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 61 | g.$description):.void.{.$this->a |
d7200 | 6c 69 61 73 4f 66 2d 3e 73 65 74 44 65 73 63 72 69 70 74 69 6f 6e 28 24 64 65 73 63 72 69 70 74 | liasOf->setDescription($descript |
d7220 | 69 6f 6e 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 48 6f 6d 65 | ion);.}..public.function.getHome |
d7240 | 70 61 67 65 28 29 3a 20 3f 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e | page():.?string.{.return.$this-> |
d7260 | 61 6c 69 61 73 4f 66 2d 3e 67 65 74 48 6f 6d 65 70 61 67 65 28 29 3b 0a 7d 0a 0a 70 75 62 6c 69 | aliasOf->getHomepage();.}..publi |
d7280 | 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 48 6f 6d 65 70 61 67 65 28 3f 73 74 72 69 6e 67 20 24 | c.function.setHomepage(?string.$ |
d72a0 | 68 6f 6d 65 70 61 67 65 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 | homepage):.void.{.$this->aliasOf |
d72c0 | 2d 3e 73 65 74 48 6f 6d 65 70 61 67 65 28 24 68 6f 6d 65 70 61 67 65 29 3b 0a 7d 0a 0a 70 75 62 | ->setHomepage($homepage);.}..pub |
d72e0 | 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 41 75 74 68 6f 72 73 28 29 3a 20 61 72 72 61 79 | lic.function.getAuthors():.array |
d7300 | 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 67 65 74 41 75 74 | .{.return.$this->aliasOf->getAut |
d7320 | 68 6f 72 73 28 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 41 75 | hors();.}..public.function.setAu |
d7340 | 74 68 6f 72 73 28 61 72 72 61 79 20 24 61 75 74 68 6f 72 73 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 | thors(array.$authors):.void.{.$t |
d7360 | 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 73 65 74 41 75 74 68 6f 72 73 28 24 61 75 74 68 6f 72 | his->aliasOf->setAuthors($author |
d7380 | 73 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 53 75 70 70 6f 72 | s);.}..public.function.getSuppor |
d73a0 | 74 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 61 6c 69 61 73 | t():.array.{.return.$this->alias |
d73c0 | 4f 66 2d 3e 67 65 74 53 75 70 70 6f 72 74 28 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 | Of->getSupport();.}..public.func |
d73e0 | 74 69 6f 6e 20 73 65 74 53 75 70 70 6f 72 74 28 61 72 72 61 79 20 24 73 75 70 70 6f 72 74 29 3a | tion.setSupport(array.$support): |
d7400 | 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 73 65 74 53 75 70 70 6f | .void.{.$this->aliasOf->setSuppo |
d7420 | 72 74 28 24 73 75 70 70 6f 72 74 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e | rt($support);.}..public.function |
d7440 | 20 67 65 74 46 75 6e 64 69 6e 67 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 | .getFunding():.array.{.return.$t |
d7460 | 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 67 65 74 46 75 6e 64 69 6e 67 28 29 3b 0a 7d 0a 0a 70 | his->aliasOf->getFunding();.}..p |
d7480 | 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 46 75 6e 64 69 6e 67 28 61 72 72 61 79 20 | ublic.function.setFunding(array. |
d74a0 | 24 66 75 6e 64 69 6e 67 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 | $funding):.void.{.$this->aliasOf |
d74c0 | 2d 3e 73 65 74 46 75 6e 64 69 6e 67 28 24 66 75 6e 64 69 6e 67 29 3b 0a 7d 0a 0a 70 75 62 6c 69 | ->setFunding($funding);.}..publi |
d74e0 | 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 41 62 61 6e 64 6f 6e 65 64 28 29 3a 20 62 6f 6f 6c 0a 7b | c.function.isAbandoned():.bool.{ |
d7500 | 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 69 73 41 62 61 6e 64 6f | .return.$this->aliasOf->isAbando |
d7520 | 6e 65 64 28 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 52 65 70 | ned();.}..public.function.getRep |
d7540 | 6c 61 63 65 6d 65 6e 74 50 61 63 6b 61 67 65 28 29 3a 20 3f 73 74 72 69 6e 67 0a 7b 0a 72 65 74 | lacementPackage():.?string.{.ret |
d7560 | 75 72 6e 20 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 67 65 74 52 65 70 6c 61 63 65 6d 65 | urn.$this->aliasOf->getReplaceme |
d7580 | 6e 74 50 61 63 6b 61 67 65 28 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 | ntPackage();.}..public.function. |
d75a0 | 73 65 74 41 62 61 6e 64 6f 6e 65 64 28 24 61 62 61 6e 64 6f 6e 65 64 29 3a 20 76 6f 69 64 0a 7b | setAbandoned($abandoned):.void.{ |
d75c0 | 0a 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 73 65 74 41 62 61 6e 64 6f 6e 65 64 28 24 61 | .$this->aliasOf->setAbandoned($a |
d75e0 | 62 61 6e 64 6f 6e 65 64 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 | bandoned);.}..public.function.ge |
d7600 | 74 41 72 63 68 69 76 65 4e 61 6d 65 28 29 3a 20 3f 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e | tArchiveName():.?string.{.return |
d7620 | 20 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 67 65 74 41 72 63 68 69 76 65 4e 61 6d 65 28 | .$this->aliasOf->getArchiveName( |
d7640 | 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 41 72 63 68 69 76 65 | );.}..public.function.setArchive |
d7660 | 4e 61 6d 65 28 3f 73 74 72 69 6e 67 20 24 6e 61 6d 65 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 | Name(?string.$name):.void.{.$thi |
d7680 | 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 73 65 74 41 72 63 68 69 76 65 4e 61 6d 65 28 24 6e 61 6d 65 | s->aliasOf->setArchiveName($name |
d76a0 | 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 41 72 63 68 69 76 65 | );.}..public.function.getArchive |
d76c0 | 45 78 63 6c 75 64 65 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 | Excludes():.array.{.return.$this |
d76e0 | 2d 3e 61 6c 69 61 73 4f 66 2d 3e 67 65 74 41 72 63 68 69 76 65 45 78 63 6c 75 64 65 73 28 29 3b | ->aliasOf->getArchiveExcludes(); |
d7700 | 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 41 72 63 68 69 76 65 45 78 | .}..public.function.setArchiveEx |
d7720 | 63 6c 75 64 65 73 28 61 72 72 61 79 20 24 65 78 63 6c 75 64 65 73 29 3a 20 76 6f 69 64 0a 7b 0a | cludes(array.$excludes):.void.{. |
d7740 | 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 73 65 74 41 72 63 68 69 76 65 45 78 63 6c 75 64 | $this->aliasOf->setArchiveExclud |
d7760 | 65 73 28 24 65 78 63 6c 75 64 65 73 29 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 | es($excludes);.}.}.<?php.declare |
d7780 | 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d | (strict_types=1);............nam |
d77a0 | 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 3b 0a 0a 0a 0a 0a 0a 0a 63 | espace.Composer\Package;.......c |
d77c0 | 6c 61 73 73 20 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 20 65 78 74 65 6e 64 73 20 50 61 63 | lass.CompletePackage.extends.Pac |
d77e0 | 6b 61 67 65 20 69 6d 70 6c 65 6d 65 6e 74 73 20 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 49 | kage.implements.CompletePackageI |
d7800 | 6e 74 65 72 66 61 63 65 0a 7b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 72 65 70 6f 73 69 74 6f 72 | nterface.{..protected.$repositor |
d7820 | 69 65 73 20 3d 20 5b 5d 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 6c 69 63 65 6e 73 65 20 3d 20 | ies.=.[];..protected.$license.=. |
d7840 | 5b 5d 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 6b 65 79 77 6f 72 64 73 20 3d 20 5b 5d 3b 0a 0a | [];..protected.$keywords.=.[];.. |
d7860 | 70 72 6f 74 65 63 74 65 64 20 24 61 75 74 68 6f 72 73 20 3d 20 5b 5d 3b 0a 0a 70 72 6f 74 65 63 | protected.$authors.=.[];..protec |
d7880 | 74 65 64 20 24 64 65 73 63 72 69 70 74 69 6f 6e 20 3d 20 6e 75 6c 6c 3b 0a 0a 70 72 6f 74 65 63 | ted.$description.=.null;..protec |
d78a0 | 74 65 64 20 24 68 6f 6d 65 70 61 67 65 20 3d 20 6e 75 6c 6c 3b 0a 0a 70 72 6f 74 65 63 74 65 64 | ted.$homepage.=.null;..protected |
d78c0 | 20 24 73 63 72 69 70 74 73 20 3d 20 5b 5d 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 73 75 70 70 | .$scripts.=.[];..protected.$supp |
d78e0 | 6f 72 74 20 3d 20 5b 5d 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 66 75 6e 64 69 6e 67 20 3d 20 | ort.=.[];..protected.$funding.=. |
d7900 | 5b 5d 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 61 62 61 6e 64 6f 6e 65 64 20 3d 20 66 61 6c 73 | [];..protected.$abandoned.=.fals |
d7920 | 65 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 61 72 63 68 69 76 65 4e 61 6d 65 20 3d 20 6e 75 6c | e;..protected.$archiveName.=.nul |
d7940 | 6c 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 61 72 63 68 69 76 65 45 78 63 6c 75 64 65 73 20 3d | l;..protected.$archiveExcludes.= |
d7960 | 20 5b 5d 3b 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 53 63 72 69 | .[];.....public.function.setScri |
d7980 | 70 74 73 28 61 72 72 61 79 20 24 73 63 72 69 70 74 73 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 | pts(array.$scripts):.void.{.$thi |
d79a0 | 73 2d 3e 73 63 72 69 70 74 73 20 3d 20 24 73 63 72 69 70 74 73 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 | s->scripts.=.$scripts;.}.....pub |
d79c0 | 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 53 63 72 69 70 74 73 28 29 3a 20 61 72 72 61 79 | lic.function.getScripts():.array |
d79e0 | 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 73 63 72 69 70 74 73 3b 0a 7d 0a 0a 0a 0a 0a | .{.return.$this->scripts;.}..... |
d7a00 | 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 52 65 70 6f 73 69 74 6f 72 69 65 73 28 | public.function.setRepositories( |
d7a20 | 61 72 72 61 79 20 24 72 65 70 6f 73 69 74 6f 72 69 65 73 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 | array.$repositories):.void.{.$th |
d7a40 | 69 73 2d 3e 72 65 70 6f 73 69 74 6f 72 69 65 73 20 3d 20 24 72 65 70 6f 73 69 74 6f 72 69 65 73 | is->repositories.=.$repositories |
d7a60 | 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 52 65 70 6f 73 | ;.}.....public.function.getRepos |
d7a80 | 69 74 6f 72 69 65 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d | itories():.array.{.return.$this- |
d7aa0 | 3e 72 65 70 6f 73 69 74 6f 72 69 65 73 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 | >repositories;.}.....public.func |
d7ac0 | 74 69 6f 6e 20 73 65 74 4c 69 63 65 6e 73 65 28 61 72 72 61 79 20 24 6c 69 63 65 6e 73 65 29 3a | tion.setLicense(array.$license): |
d7ae0 | 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 6c 69 63 65 6e 73 65 20 3d 20 24 6c 69 63 65 6e 73 | .void.{.$this->license.=.$licens |
d7b00 | 65 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 4c 69 63 65 | e;.}.....public.function.getLice |
d7b20 | 6e 73 65 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 6c 69 63 | nse():.array.{.return.$this->lic |
d7b40 | 65 6e 73 65 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 4b | ense;.}.....public.function.setK |
d7b60 | 65 79 77 6f 72 64 73 28 61 72 72 61 79 20 24 6b 65 79 77 6f 72 64 73 29 3a 20 76 6f 69 64 0a 7b | eywords(array.$keywords):.void.{ |
d7b80 | 0a 24 74 68 69 73 2d 3e 6b 65 79 77 6f 72 64 73 20 3d 20 24 6b 65 79 77 6f 72 64 73 3b 0a 7d 0a | .$this->keywords.=.$keywords;.}. |
d7ba0 | 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 4b 65 79 77 6f 72 64 73 28 | ....public.function.getKeywords( |
d7bc0 | 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 6b 65 79 77 6f 72 64 | ):.array.{.return.$this->keyword |
d7be0 | 73 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 41 75 74 68 | s;.}.....public.function.setAuth |
d7c00 | 6f 72 73 28 61 72 72 61 79 20 24 61 75 74 68 6f 72 73 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 | ors(array.$authors):.void.{.$thi |
d7c20 | 73 2d 3e 61 75 74 68 6f 72 73 20 3d 20 24 61 75 74 68 6f 72 73 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 | s->authors.=.$authors;.}.....pub |
d7c40 | 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 41 75 74 68 6f 72 73 28 29 3a 20 61 72 72 61 79 | lic.function.getAuthors():.array |
d7c60 | 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 61 75 74 68 6f 72 73 3b 0a 7d 0a 0a 0a 0a 0a | .{.return.$this->authors;.}..... |
d7c80 | 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 44 65 73 63 72 69 70 74 69 6f 6e 28 3f | public.function.setDescription(? |
d7ca0 | 73 74 72 69 6e 67 20 24 64 65 73 63 72 69 70 74 69 6f 6e 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 | string.$description):.void.{.$th |
d7cc0 | 69 73 2d 3e 64 65 73 63 72 69 70 74 69 6f 6e 20 3d 20 24 64 65 73 63 72 69 70 74 69 6f 6e 3b 0a | is->description.=.$description;. |
d7ce0 | 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 44 65 73 63 72 69 70 | }.....public.function.getDescrip |
d7d00 | 74 69 6f 6e 28 29 3a 20 3f 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e | tion():.?string.{.return.$this-> |
d7d20 | 64 65 73 63 72 69 70 74 69 6f 6e 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 | description;.}.....public.functi |
d7d40 | 6f 6e 20 73 65 74 48 6f 6d 65 70 61 67 65 28 3f 73 74 72 69 6e 67 20 24 68 6f 6d 65 70 61 67 65 | on.setHomepage(?string.$homepage |
d7d60 | 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 68 6f 6d 65 70 61 67 65 20 3d 20 24 68 6f 6d | ):.void.{.$this->homepage.=.$hom |
d7d80 | 65 70 61 67 65 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 | epage;.}.....public.function.get |
d7da0 | 48 6f 6d 65 70 61 67 65 28 29 3a 20 3f 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 | Homepage():.?string.{.return.$th |
d7dc0 | 69 73 2d 3e 68 6f 6d 65 70 61 67 65 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 | is->homepage;.}.....public.funct |
d7de0 | 69 6f 6e 20 73 65 74 53 75 70 70 6f 72 74 28 61 72 72 61 79 20 24 73 75 70 70 6f 72 74 29 3a 20 | ion.setSupport(array.$support):. |
d7e00 | 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 73 75 70 70 6f 72 74 20 3d 20 24 73 75 70 70 6f 72 74 | void.{.$this->support.=.$support |
d7e20 | 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 53 75 70 70 6f | ;.}.....public.function.getSuppo |
d7e40 | 72 74 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 73 75 70 70 | rt():.array.{.return.$this->supp |
d7e60 | 6f 72 74 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 46 75 | ort;.}.....public.function.setFu |
d7e80 | 6e 64 69 6e 67 28 61 72 72 61 79 20 24 66 75 6e 64 69 6e 67 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 | nding(array.$funding):.void.{.$t |
d7ea0 | 68 69 73 2d 3e 66 75 6e 64 69 6e 67 20 3d 20 24 66 75 6e 64 69 6e 67 3b 0a 7d 0a 0a 0a 0a 0a 70 | his->funding.=.$funding;.}.....p |
d7ec0 | 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 46 75 6e 64 69 6e 67 28 29 3a 20 61 72 72 | ublic.function.getFunding():.arr |
d7ee0 | 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 66 75 6e 64 69 6e 67 3b 0a 7d 0a 0a 0a | ay.{.return.$this->funding;.}... |
d7f00 | 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 41 62 61 6e 64 6f 6e 65 64 28 29 3a | ..public.function.isAbandoned(): |
d7f20 | 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 28 62 6f 6f 6c 29 20 24 74 68 69 73 2d 3e 61 62 61 | .bool.{.return.(bool).$this->aba |
d7f40 | 6e 64 6f 6e 65 64 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 | ndoned;.}.....public.function.se |
d7f60 | 74 41 62 61 6e 64 6f 6e 65 64 28 24 61 62 61 6e 64 6f 6e 65 64 29 3a 20 76 6f 69 64 0a 7b 0a 24 | tAbandoned($abandoned):.void.{.$ |
d7f80 | 74 68 69 73 2d 3e 61 62 61 6e 64 6f 6e 65 64 20 3d 20 24 61 62 61 6e 64 6f 6e 65 64 3b 0a 7d 0a | this->abandoned.=.$abandoned;.}. |
d7fa0 | 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 52 65 70 6c 61 63 65 6d 65 | ....public.function.getReplaceme |
d7fc0 | 6e 74 50 61 63 6b 61 67 65 28 29 3a 20 3f 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 5c 69 | ntPackage():.?string.{.return.\i |
d7fe0 | 73 5f 73 74 72 69 6e 67 28 24 74 68 69 73 2d 3e 61 62 61 6e 64 6f 6e 65 64 29 20 3f 20 24 74 68 | s_string($this->abandoned).?.$th |
d8000 | 69 73 2d 3e 61 62 61 6e 64 6f 6e 65 64 20 3a 20 6e 75 6c 6c 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c | is->abandoned.:.null;.}.....publ |
d8020 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 41 72 63 68 69 76 65 4e 61 6d 65 28 3f 73 74 72 69 | ic.function.setArchiveName(?stri |
d8040 | 6e 67 20 24 6e 61 6d 65 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 61 72 63 68 69 76 65 | ng.$name):.void.{.$this->archive |
d8060 | 4e 61 6d 65 20 3d 20 24 6e 61 6d 65 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 | Name.=.$name;.}.....public.funct |
d8080 | 69 6f 6e 20 67 65 74 41 72 63 68 69 76 65 4e 61 6d 65 28 29 3a 20 3f 73 74 72 69 6e 67 0a 7b 0a | ion.getArchiveName():.?string.{. |
d80a0 | 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 61 72 63 68 69 76 65 4e 61 6d 65 3b 0a 7d 0a 0a 0a 0a | return.$this->archiveName;.}.... |
d80c0 | 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 41 72 63 68 69 76 65 45 78 63 6c 75 | .public.function.setArchiveExclu |
d80e0 | 64 65 73 28 61 72 72 61 79 20 24 65 78 63 6c 75 64 65 73 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 | des(array.$excludes):.void.{.$th |
d8100 | 69 73 2d 3e 61 72 63 68 69 76 65 45 78 63 6c 75 64 65 73 20 3d 20 24 65 78 63 6c 75 64 65 73 3b | is->archiveExcludes.=.$excludes; |
d8120 | 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 41 72 63 68 69 76 | .}.....public.function.getArchiv |
d8140 | 65 45 78 63 6c 75 64 65 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 | eExcludes():.array.{.return.$thi |
d8160 | 73 2d 3e 61 72 63 68 69 76 65 45 78 63 6c 75 64 65 73 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 | s->archiveExcludes;.}.}.<?php.de |
d8180 | 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a | clare(strict_types=1);.......... |
d81a0 | 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 3b 0a 0a 0a | ..namespace.Composer\Package;... |
d81c0 | 0a 0a 0a 0a 0a 0a 69 6e 74 65 72 66 61 63 65 20 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 49 | ......interface.CompletePackageI |
d81e0 | 6e 74 65 72 66 61 63 65 20 65 78 74 65 6e 64 73 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 | nterface.extends.PackageInterfac |
d8200 | 65 0a 7b 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 53 63 72 69 | e.{......public.function.getScri |
d8220 | 70 74 73 28 29 3a 20 61 72 72 61 79 3b 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f | pts():.array;.....public.functio |
d8240 | 6e 20 73 65 74 53 63 72 69 70 74 73 28 61 72 72 61 79 20 24 73 63 72 69 70 74 73 29 3a 20 76 6f | n.setScripts(array.$scripts):.vo |
d8260 | 69 64 3b 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 52 65 70 | id;.......public.function.getRep |
d8280 | 6f 73 69 74 6f 72 69 65 73 28 29 3a 20 61 72 72 61 79 3b 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 | ositories():.array;.......public |
d82a0 | 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 52 65 70 6f 73 69 74 6f 72 69 65 73 28 61 72 72 61 79 20 | .function.setRepositories(array. |
d82c0 | 24 72 65 70 6f 73 69 74 6f 72 69 65 73 29 3a 20 76 6f 69 64 3b 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c | $repositories):.void;.......publ |
d82e0 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 4c 69 63 65 6e 73 65 28 29 3a 20 61 72 72 61 79 3b | ic.function.getLicense():.array; |
d8300 | 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 4c 69 63 65 6e 73 | .......public.function.setLicens |
d8320 | 65 28 61 72 72 61 79 20 24 6c 69 63 65 6e 73 65 29 3a 20 76 6f 69 64 3b 0a 0a 0a 0a 0a 0a 0a 70 | e(array.$license):.void;.......p |
d8340 | 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 4b 65 79 77 6f 72 64 73 28 29 3a 20 61 72 | ublic.function.getKeywords():.ar |
d8360 | 72 61 79 3b 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 4b 65 | ray;.......public.function.setKe |
d8380 | 79 77 6f 72 64 73 28 61 72 72 61 79 20 24 6b 65 79 77 6f 72 64 73 29 3a 20 76 6f 69 64 3b 0a 0a | ywords(array.$keywords):.void;.. |
d83a0 | 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 44 65 73 63 72 69 70 74 | .....public.function.getDescript |
d83c0 | 69 6f 6e 28 29 3a 20 3f 73 74 72 69 6e 67 3b 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 | ion():.?string;.....public.funct |
d83e0 | 69 6f 6e 20 73 65 74 44 65 73 63 72 69 70 74 69 6f 6e 28 73 74 72 69 6e 67 20 24 64 65 73 63 72 | ion.setDescription(string.$descr |
d8400 | 69 70 74 69 6f 6e 29 3a 20 76 6f 69 64 3b 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 | iption):.void;.......public.func |
d8420 | 74 69 6f 6e 20 67 65 74 48 6f 6d 65 70 61 67 65 28 29 3a 20 3f 73 74 72 69 6e 67 3b 0a 0a 0a 0a | tion.getHomepage():.?string;.... |
d8440 | 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 48 6f 6d 65 70 61 67 65 28 73 74 72 | .public.function.setHomepage(str |
d8460 | 69 6e 67 20 24 68 6f 6d 65 70 61 67 65 29 3a 20 76 6f 69 64 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 | ing.$homepage):.void;.........pu |
d8480 | 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 41 75 74 68 6f 72 73 28 29 3a 20 61 72 72 61 | blic.function.getAuthors():.arra |
d84a0 | 79 3b 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 41 75 74 68 | y;.......public.function.setAuth |
d84c0 | 6f 72 73 28 61 72 72 61 79 20 24 61 75 74 68 6f 72 73 29 3a 20 76 6f 69 64 3b 0a 0a 0a 0a 0a 0a | ors(array.$authors):.void;...... |
d84e0 | 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 53 75 70 70 6f 72 74 28 29 3a 20 61 | .public.function.getSupport():.a |
d8500 | 72 72 61 79 3b 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 53 | rray;.......public.function.setS |
d8520 | 75 70 70 6f 72 74 28 61 72 72 61 79 20 24 73 75 70 70 6f 72 74 29 3a 20 76 6f 69 64 3b 0a 0a 0a | upport(array.$support):.void;... |
d8540 | 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 46 75 6e 64 69 6e 67 | ......public.function.getFunding |
d8560 | 28 29 3a 20 61 72 72 61 79 3b 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e | ():.array;.......public.function |
d8580 | 20 73 65 74 46 75 6e 64 69 6e 67 28 61 72 72 61 79 20 24 66 75 6e 64 69 6e 67 29 3a 20 76 6f 69 | .setFunding(array.$funding):.voi |
d85a0 | 64 3b 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 41 62 61 6e 64 6f 6e | d;.....public.function.isAbandon |
d85c0 | 65 64 28 29 3a 20 62 6f 6f 6c 3b 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 | ed():.bool;.....public.function. |
d85e0 | 67 65 74 52 65 70 6c 61 63 65 6d 65 6e 74 50 61 63 6b 61 67 65 28 29 3a 20 3f 73 74 72 69 6e 67 | getReplacementPackage():.?string |
d8600 | 3b 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 41 62 61 6e 64 6f 6e | ;.....public.function.setAbandon |
d8620 | 65 64 28 24 61 62 61 6e 64 6f 6e 65 64 29 3a 20 76 6f 69 64 3b 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c | ed($abandoned):.void;.......publ |
d8640 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 41 72 63 68 69 76 65 4e 61 6d 65 28 29 3a 20 3f 73 | ic.function.getArchiveName():.?s |
d8660 | 74 72 69 6e 67 3b 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 41 72 | tring;.....public.function.setAr |
d8680 | 63 68 69 76 65 4e 61 6d 65 28 73 74 72 69 6e 67 20 24 6e 61 6d 65 29 3a 20 76 6f 69 64 3b 0a 0a | chiveName(string.$name):.void;.. |
d86a0 | 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 41 72 63 68 69 76 65 45 | .....public.function.getArchiveE |
d86c0 | 78 63 6c 75 64 65 73 28 29 3a 20 61 72 72 61 79 3b 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 | xcludes():.array;.......public.f |
d86e0 | 75 6e 63 74 69 6f 6e 20 73 65 74 41 72 63 68 69 76 65 45 78 63 6c 75 64 65 73 28 61 72 72 61 79 | unction.setArchiveExcludes(array |
d8700 | 20 24 65 78 63 6c 75 64 65 73 29 3a 20 76 6f 69 64 3b 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 | .$excludes):.void;.}.<?php.decla |
d8720 | 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e | re(strict_types=1);............n |
d8740 | 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 44 75 6d 70 65 72 | amespace.Composer\Package\Dumper |
d8760 | 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 42 61 73 65 50 61 63 6b | ;..use.Composer\Package\BasePack |
d8780 | 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 50 61 63 6b 61 67 | age;.use.Composer\Package\Packag |
d87a0 | 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 | eInterface;.use.Composer\Package |
d87c0 | 5c 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 | \CompletePackageInterface;.use.C |
d87e0 | 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 52 6f 6f 74 50 61 63 6b 61 67 65 49 6e 74 65 72 | omposer\Package\RootPackageInter |
d8800 | 66 61 63 65 3b 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 41 72 72 61 79 44 75 6d 70 65 72 0a 7b 0a 0a | face;......class.ArrayDumper.{.. |
d8820 | 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 64 75 6d 70 28 50 61 63 6b 61 67 65 49 6e | ..public.function.dump(PackageIn |
d8840 | 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 29 3a 20 61 72 72 61 79 0a 7b 0a 24 6b 65 79 73 | terface.$package):.array.{.$keys |
d8860 | 20 3d 20 5b 0a 27 62 69 6e 61 72 69 65 73 27 20 3d 3e 20 27 62 69 6e 27 2c 0a 27 74 79 70 65 27 | .=.[.'binaries'.=>.'bin',.'type' |
d8880 | 2c 0a 27 65 78 74 72 61 27 2c 0a 27 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 53 6f 75 72 63 65 27 20 | ,.'extra',.'installationSource'. |
d88a0 | 3d 3e 20 27 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 2d 73 6f 75 72 63 65 27 2c 0a 27 61 75 74 6f 6c | =>.'installation-source',.'autol |
d88c0 | 6f 61 64 27 2c 0a 27 64 65 76 41 75 74 6f 6c 6f 61 64 27 20 3d 3e 20 27 61 75 74 6f 6c 6f 61 64 | oad',.'devAutoload'.=>.'autoload |
d88e0 | 2d 64 65 76 27 2c 0a 27 6e 6f 74 69 66 69 63 61 74 69 6f 6e 55 72 6c 27 20 3d 3e 20 27 6e 6f 74 | -dev',.'notificationUrl'.=>.'not |
d8900 | 69 66 69 63 61 74 69 6f 6e 2d 75 72 6c 27 2c 0a 27 69 6e 63 6c 75 64 65 50 61 74 68 73 27 20 3d | ification-url',.'includePaths'.= |
d8920 | 3e 20 27 69 6e 63 6c 75 64 65 2d 70 61 74 68 27 2c 0a 5d 3b 0a 0a 24 64 61 74 61 20 3d 20 5b 5d | >.'include-path',.];..$data.=.[] |
d8940 | 3b 0a 24 64 61 74 61 5b 27 6e 61 6d 65 27 5d 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 | ;.$data['name'].=.$package->getP |
d8960 | 72 65 74 74 79 4e 61 6d 65 28 29 3b 0a 24 64 61 74 61 5b 27 76 65 72 73 69 6f 6e 27 5d 20 3d 20 | rettyName();.$data['version'].=. |
d8980 | 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 3b 0a 24 64 | $package->getPrettyVersion();.$d |
d89a0 | 61 74 61 5b 27 76 65 72 73 69 6f 6e 5f 6e 6f 72 6d 61 6c 69 7a 65 64 27 5d 20 3d 20 24 70 61 63 | ata['version_normalized'].=.$pac |
d89c0 | 6b 61 67 65 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 3b 0a 0a 69 66 20 28 24 70 61 63 6b 61 67 | kage->getVersion();..if.($packag |
d89e0 | 65 2d 3e 67 65 74 54 61 72 67 65 74 44 69 72 28 29 29 20 7b 0a 24 64 61 74 61 5b 27 74 61 72 67 | e->getTargetDir()).{.$data['targ |
d8a00 | 65 74 2d 64 69 72 27 5d 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 54 61 72 67 65 74 44 69 | et-dir'].=.$package->getTargetDi |
d8a20 | 72 28 29 3b 0a 7d 0a 0a 69 66 20 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 53 6f 75 72 63 65 54 | r();.}..if.($package->getSourceT |
d8a40 | 79 70 65 28 29 29 20 7b 0a 24 64 61 74 61 5b 27 73 6f 75 72 63 65 27 5d 5b 27 74 79 70 65 27 5d | ype()).{.$data['source']['type'] |
d8a60 | 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 53 6f 75 72 63 65 54 79 70 65 28 29 3b 0a 24 64 | .=.$package->getSourceType();.$d |
d8a80 | 61 74 61 5b 27 73 6f 75 72 63 65 27 5d 5b 27 75 72 6c 27 5d 20 3d 20 24 70 61 63 6b 61 67 65 2d | ata['source']['url'].=.$package- |
d8aa0 | 3e 67 65 74 53 6f 75 72 63 65 55 72 6c 28 29 3b 0a 69 66 20 28 6e 75 6c 6c 20 21 3d 3d 20 28 24 | >getSourceUrl();.if.(null.!==.($ |
d8ac0 | 76 61 6c 75 65 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 53 6f 75 72 63 65 52 65 66 65 72 | value.=.$package->getSourceRefer |
d8ae0 | 65 6e 63 65 28 29 29 29 20 7b 0a 24 64 61 74 61 5b 27 73 6f 75 72 63 65 27 5d 5b 27 72 65 66 65 | ence())).{.$data['source']['refe |
d8b00 | 72 65 6e 63 65 27 5d 20 3d 20 24 76 61 6c 75 65 3b 0a 7d 0a 69 66 20 28 24 6d 69 72 72 6f 72 73 | rence'].=.$value;.}.if.($mirrors |
d8b20 | 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 53 6f 75 72 63 65 4d 69 72 72 6f 72 73 28 29 29 | .=.$package->getSourceMirrors()) |
d8b40 | 20 7b 0a 24 64 61 74 61 5b 27 73 6f 75 72 63 65 27 5d 5b 27 6d 69 72 72 6f 72 73 27 5d 20 3d 20 | .{.$data['source']['mirrors'].=. |
d8b60 | 24 6d 69 72 72 6f 72 73 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 | $mirrors;.}.}..if.($package->get |
d8b80 | 44 69 73 74 54 79 70 65 28 29 29 20 7b 0a 24 64 61 74 61 5b 27 64 69 73 74 27 5d 5b 27 74 79 70 | DistType()).{.$data['dist']['typ |
d8ba0 | 65 27 5d 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 44 69 73 74 54 79 70 65 28 29 3b 0a 24 | e'].=.$package->getDistType();.$ |
d8bc0 | 64 61 74 61 5b 27 64 69 73 74 27 5d 5b 27 75 72 6c 27 5d 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e | data['dist']['url'].=.$package-> |
d8be0 | 67 65 74 44 69 73 74 55 72 6c 28 29 3b 0a 69 66 20 28 6e 75 6c 6c 20 21 3d 3d 20 28 24 76 61 6c | getDistUrl();.if.(null.!==.($val |
d8c00 | 75 65 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 44 69 73 74 52 65 66 65 72 65 6e 63 65 28 | ue.=.$package->getDistReference( |
d8c20 | 29 29 29 20 7b 0a 24 64 61 74 61 5b 27 64 69 73 74 27 5d 5b 27 72 65 66 65 72 65 6e 63 65 27 5d | ))).{.$data['dist']['reference'] |
d8c40 | 20 3d 20 24 76 61 6c 75 65 3b 0a 7d 0a 69 66 20 28 6e 75 6c 6c 20 21 3d 3d 20 28 24 76 61 6c 75 | .=.$value;.}.if.(null.!==.($valu |
d8c60 | 65 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 44 69 73 74 53 68 61 31 43 68 65 63 6b 73 75 | e.=.$package->getDistSha1Checksu |
d8c80 | 6d 28 29 29 29 20 7b 0a 24 64 61 74 61 5b 27 64 69 73 74 27 5d 5b 27 73 68 61 73 75 6d 27 5d 20 | m())).{.$data['dist']['shasum']. |
d8ca0 | 3d 20 24 76 61 6c 75 65 3b 0a 7d 0a 69 66 20 28 24 6d 69 72 72 6f 72 73 20 3d 20 24 70 61 63 6b | =.$value;.}.if.($mirrors.=.$pack |
d8cc0 | 61 67 65 2d 3e 67 65 74 44 69 73 74 4d 69 72 72 6f 72 73 28 29 29 20 7b 0a 24 64 61 74 61 5b 27 | age->getDistMirrors()).{.$data[' |
d8ce0 | 64 69 73 74 27 5d 5b 27 6d 69 72 72 6f 72 73 27 5d 20 3d 20 24 6d 69 72 72 6f 72 73 3b 0a 7d 0a | dist']['mirrors'].=.$mirrors;.}. |
d8d00 | 7d 0a 0a 66 6f 72 65 61 63 68 20 28 42 61 73 65 50 61 63 6b 61 67 65 3a 3a 24 73 75 70 70 6f 72 | }..foreach.(BasePackage::$suppor |
d8d20 | 74 65 64 4c 69 6e 6b 54 79 70 65 73 20 61 73 20 24 74 79 70 65 20 3d 3e 20 24 6f 70 74 73 29 20 | tedLinkTypes.as.$type.=>.$opts). |
d8d40 | 7b 0a 69 66 20 28 24 6c 69 6e 6b 73 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 7b 27 67 65 74 27 2e | {.if.($links.=.$package->{'get'. |
d8d60 | 75 63 66 69 72 73 74 28 24 6f 70 74 73 5b 27 6d 65 74 68 6f 64 27 5d 29 7d 28 29 29 20 7b 0a 66 | ucfirst($opts['method'])}()).{.f |
d8d80 | 6f 72 65 61 63 68 20 28 24 6c 69 6e 6b 73 20 61 73 20 24 6c 69 6e 6b 29 20 7b 0a 24 64 61 74 61 | oreach.($links.as.$link).{.$data |
d8da0 | 5b 24 74 79 70 65 5d 5b 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 74 28 29 5d 20 3d 20 24 6c | [$type][$link->getTarget()].=.$l |
d8dc0 | 69 6e 6b 2d 3e 67 65 74 50 72 65 74 74 79 43 6f 6e 73 74 72 61 69 6e 74 28 29 3b 0a 7d 0a 6b 73 | ink->getPrettyConstraint();.}.ks |
d8de0 | 6f 72 74 28 24 64 61 74 61 5b 24 74 79 70 65 5d 29 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 24 70 61 63 | ort($data[$type]);.}.}..if.($pac |
d8e00 | 6b 61 67 65 73 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 53 75 67 67 65 73 74 73 28 29 29 | kages.=.$package->getSuggests()) |
d8e20 | 20 7b 0a 6b 73 6f 72 74 28 24 70 61 63 6b 61 67 65 73 29 3b 0a 24 64 61 74 61 5b 27 73 75 67 67 | .{.ksort($packages);.$data['sugg |
d8e40 | 65 73 74 27 5d 20 3d 20 24 70 61 63 6b 61 67 65 73 3b 0a 7d 0a 0a 69 66 20 28 24 70 61 63 6b 61 | est'].=.$packages;.}..if.($packa |
d8e60 | 67 65 2d 3e 67 65 74 52 65 6c 65 61 73 65 44 61 74 65 28 29 20 69 6e 73 74 61 6e 63 65 6f 66 20 | ge->getReleaseDate().instanceof. |
d8e80 | 5c 44 61 74 65 54 69 6d 65 49 6e 74 65 72 66 61 63 65 29 20 7b 0a 24 64 61 74 61 5b 27 74 69 6d | \DateTimeInterface).{.$data['tim |
d8ea0 | 65 27 5d 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 52 65 6c 65 61 73 65 44 61 74 65 28 29 | e'].=.$package->getReleaseDate() |
d8ec0 | 2d 3e 66 6f 72 6d 61 74 28 44 41 54 45 5f 52 46 43 33 33 33 39 29 3b 0a 7d 0a 0a 69 66 20 28 24 | ->format(DATE_RFC3339);.}..if.($ |
d8ee0 | 70 61 63 6b 61 67 65 2d 3e 69 73 44 65 66 61 75 6c 74 42 72 61 6e 63 68 28 29 29 20 7b 0a 24 64 | package->isDefaultBranch()).{.$d |
d8f00 | 61 74 61 5b 27 64 65 66 61 75 6c 74 2d 62 72 61 6e 63 68 27 5d 20 3d 20 74 72 75 65 3b 0a 7d 0a | ata['default-branch'].=.true;.}. |
d8f20 | 0a 24 64 61 74 61 20 3d 20 24 74 68 69 73 2d 3e 64 75 6d 70 56 61 6c 75 65 73 28 24 70 61 63 6b | .$data.=.$this->dumpValues($pack |
d8f40 | 61 67 65 2c 20 24 6b 65 79 73 2c 20 24 64 61 74 61 29 3b 0a 0a 69 66 20 28 24 70 61 63 6b 61 67 | age,.$keys,.$data);..if.($packag |
d8f60 | 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 49 6e 74 65 | e.instanceof.CompletePackageInte |
d8f80 | 72 66 61 63 65 29 20 7b 0a 69 66 20 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 41 72 63 68 69 76 | rface).{.if.($package->getArchiv |
d8fa0 | 65 4e 61 6d 65 28 29 29 20 7b 0a 24 64 61 74 61 5b 27 61 72 63 68 69 76 65 27 5d 5b 27 6e 61 6d | eName()).{.$data['archive']['nam |
d8fc0 | 65 27 5d 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 41 72 63 68 69 76 65 4e 61 6d 65 28 29 | e'].=.$package->getArchiveName() |
d8fe0 | 3b 0a 7d 0a 69 66 20 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 41 72 63 68 69 76 65 45 78 63 6c | ;.}.if.($package->getArchiveExcl |
d9000 | 75 64 65 73 28 29 29 20 7b 0a 24 64 61 74 61 5b 27 61 72 63 68 69 76 65 27 5d 5b 27 65 78 63 6c | udes()).{.$data['archive']['excl |
d9020 | 75 64 65 27 5d 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 41 72 63 68 69 76 65 45 78 63 6c | ude'].=.$package->getArchiveExcl |
d9040 | 75 64 65 73 28 29 3b 0a 7d 0a 0a 24 6b 65 79 73 20 3d 20 5b 0a 27 73 63 72 69 70 74 73 27 2c 0a | udes();.}..$keys.=.[.'scripts',. |
d9060 | 27 6c 69 63 65 6e 73 65 27 2c 0a 27 61 75 74 68 6f 72 73 27 2c 0a 27 64 65 73 63 72 69 70 74 69 | 'license',.'authors',.'descripti |
d9080 | 6f 6e 27 2c 0a 27 68 6f 6d 65 70 61 67 65 27 2c 0a 27 6b 65 79 77 6f 72 64 73 27 2c 0a 27 72 65 | on',.'homepage',.'keywords',.'re |
d90a0 | 70 6f 73 69 74 6f 72 69 65 73 27 2c 0a 27 73 75 70 70 6f 72 74 27 2c 0a 27 66 75 6e 64 69 6e 67 | positories',.'support',.'funding |
d90c0 | 27 2c 0a 5d 3b 0a 0a 24 64 61 74 61 20 3d 20 24 74 68 69 73 2d 3e 64 75 6d 70 56 61 6c 75 65 73 | ',.];..$data.=.$this->dumpValues |
d90e0 | 28 24 70 61 63 6b 61 67 65 2c 20 24 6b 65 79 73 2c 20 24 64 61 74 61 29 3b 0a 0a 69 66 20 28 69 | ($package,.$keys,.$data);..if.(i |
d9100 | 73 73 65 74 28 24 64 61 74 61 5b 27 6b 65 79 77 6f 72 64 73 27 5d 29 20 26 26 20 5c 69 73 5f 61 | sset($data['keywords']).&&.\is_a |
d9120 | 72 72 61 79 28 24 64 61 74 61 5b 27 6b 65 79 77 6f 72 64 73 27 5d 29 29 20 7b 0a 73 6f 72 74 28 | rray($data['keywords'])).{.sort( |
d9140 | 24 64 61 74 61 5b 27 6b 65 79 77 6f 72 64 73 27 5d 29 3b 0a 7d 0a 0a 69 66 20 28 24 70 61 63 6b | $data['keywords']);.}..if.($pack |
d9160 | 61 67 65 2d 3e 69 73 41 62 61 6e 64 6f 6e 65 64 28 29 29 20 7b 0a 24 64 61 74 61 5b 27 61 62 61 | age->isAbandoned()).{.$data['aba |
d9180 | 6e 64 6f 6e 65 64 27 5d 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 52 65 70 6c 61 63 65 6d | ndoned'].=.$package->getReplacem |
d91a0 | 65 6e 74 50 61 63 6b 61 67 65 28 29 20 3f 3a 20 74 72 75 65 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 24 | entPackage().?:.true;.}.}..if.($ |
d91c0 | 70 61 63 6b 61 67 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 52 6f 6f 74 50 61 63 6b 61 67 65 49 6e | package.instanceof.RootPackageIn |
d91e0 | 74 65 72 66 61 63 65 29 20 7b 0a 24 6d 69 6e 69 6d 75 6d 53 74 61 62 69 6c 69 74 79 20 3d 20 24 | terface).{.$minimumStability.=.$ |
d9200 | 70 61 63 6b 61 67 65 2d 3e 67 65 74 4d 69 6e 69 6d 75 6d 53 74 61 62 69 6c 69 74 79 28 29 3b 0a | package->getMinimumStability();. |
d9220 | 69 66 20 28 24 6d 69 6e 69 6d 75 6d 53 74 61 62 69 6c 69 74 79 29 20 7b 0a 24 64 61 74 61 5b 27 | if.($minimumStability).{.$data[' |
d9240 | 6d 69 6e 69 6d 75 6d 2d 73 74 61 62 69 6c 69 74 79 27 5d 20 3d 20 24 6d 69 6e 69 6d 75 6d 53 74 | minimum-stability'].=.$minimumSt |
d9260 | 61 62 69 6c 69 74 79 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 5c 63 6f 75 6e 74 28 24 70 61 63 6b 61 67 | ability;.}.}..if.(\count($packag |
d9280 | 65 2d 3e 67 65 74 54 72 61 6e 73 70 6f 72 74 4f 70 74 69 6f 6e 73 28 29 29 20 3e 20 30 29 20 7b | e->getTransportOptions()).>.0).{ |
d92a0 | 0a 24 64 61 74 61 5b 27 74 72 61 6e 73 70 6f 72 74 2d 6f 70 74 69 6f 6e 73 27 5d 20 3d 20 24 70 | .$data['transport-options'].=.$p |
d92c0 | 61 63 6b 61 67 65 2d 3e 67 65 74 54 72 61 6e 73 70 6f 72 74 4f 70 74 69 6f 6e 73 28 29 3b 0a 7d | ackage->getTransportOptions();.} |
d92e0 | 0a 0a 72 65 74 75 72 6e 20 24 64 61 74 61 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 | ..return.$data;.}........private |
d9300 | 20 66 75 6e 63 74 69 6f 6e 20 64 75 6d 70 56 61 6c 75 65 73 28 50 61 63 6b 61 67 65 49 6e 74 65 | .function.dumpValues(PackageInte |
d9320 | 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 61 72 72 61 79 20 24 6b 65 79 73 2c 20 61 72 72 | rface.$package,.array.$keys,.arr |
d9340 | 61 79 20 24 64 61 74 61 29 3a 20 61 72 72 61 79 0a 7b 0a 66 6f 72 65 61 63 68 20 28 24 6b 65 79 | ay.$data):.array.{.foreach.($key |
d9360 | 73 20 61 73 20 24 6d 65 74 68 6f 64 20 3d 3e 20 24 6b 65 79 29 20 7b 0a 69 66 20 28 69 73 5f 6e | s.as.$method.=>.$key).{.if.(is_n |
d9380 | 75 6d 65 72 69 63 28 24 6d 65 74 68 6f 64 29 29 20 7b 0a 24 6d 65 74 68 6f 64 20 3d 20 24 6b 65 | umeric($method)).{.$method.=.$ke |
d93a0 | 79 3b 0a 7d 0a 0a 24 67 65 74 74 65 72 20 3d 20 27 67 65 74 27 2e 75 63 66 69 72 73 74 28 24 6d | y;.}..$getter.=.'get'.ucfirst($m |
d93c0 | 65 74 68 6f 64 29 3b 0a 24 76 61 6c 75 65 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 7b 24 67 65 74 | ethod);.$value.=.$package->{$get |
d93e0 | 74 65 72 7d 28 29 3b 0a 0a 69 66 20 28 6e 75 6c 6c 20 21 3d 3d 20 24 76 61 6c 75 65 20 26 26 20 | ter}();..if.(null.!==.$value.&&. |
d9400 | 21 28 5c 69 73 5f 61 72 72 61 79 28 24 76 61 6c 75 65 29 20 26 26 20 30 20 3d 3d 3d 20 5c 63 6f | !(\is_array($value).&&.0.===.\co |
d9420 | 75 6e 74 28 24 76 61 6c 75 65 29 29 29 20 7b 0a 24 64 61 74 61 5b 24 6b 65 79 5d 20 3d 20 24 76 | unt($value))).{.$data[$key].=.$v |
d9440 | 61 6c 75 65 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 64 61 74 61 3b 0a 7d 0a 7d 0a 3c 3f 70 | alue;.}.}..return.$data;.}.}.<?p |
d9460 | 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a | hp.declare(strict_types=1);..... |
d9480 | 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 | .......namespace.Composer\Packag |
d94a0 | 65 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 65 6d 76 65 72 5c 43 6f 6e 73 74 72 61 69 | e;..use.Composer\Semver\Constrai |
d94c0 | 6e 74 5c 43 6f 6e 73 74 72 61 69 6e 74 49 6e 74 65 72 66 61 63 65 3b 0a 0a 0a 0a 0a 0a 0a 63 6c | nt\ConstraintInterface;.......cl |
d94e0 | 61 73 73 20 4c 69 6e 6b 0a 7b 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 54 59 50 45 5f 52 45 51 | ass.Link.{.public.const.TYPE_REQ |
d9500 | 55 49 52 45 20 3d 20 27 72 65 71 75 69 72 65 73 27 3b 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 | UIRE.=.'requires';.public.const. |
d9520 | 54 59 50 45 5f 44 45 56 5f 52 45 51 55 49 52 45 20 3d 20 27 64 65 76 52 65 71 75 69 72 65 73 27 | TYPE_DEV_REQUIRE.=.'devRequires' |
d9540 | 3b 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 54 59 50 45 5f 50 52 4f 56 49 44 45 20 3d 20 27 70 | ;.public.const.TYPE_PROVIDE.=.'p |
d9560 | 72 6f 76 69 64 65 73 27 3b 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 54 59 50 45 5f 43 4f 4e 46 | rovides';.public.const.TYPE_CONF |
d9580 | 4c 49 43 54 20 3d 20 27 63 6f 6e 66 6c 69 63 74 73 27 3b 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 | LICT.=.'conflicts';.public.const |
d95a0 | 20 54 59 50 45 5f 52 45 50 4c 41 43 45 20 3d 20 27 72 65 70 6c 61 63 65 73 27 3b 0a 0a 0a 0a 0a | .TYPE_REPLACE.=.'replaces';..... |
d95c0 | 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 54 59 50 45 5f 44 4f 45 53 5f 4e 4f 54 5f 52 45 51 55 | .public.const.TYPE_DOES_NOT_REQU |
d95e0 | 49 52 45 20 3d 20 27 64 6f 65 73 20 6e 6f 74 20 72 65 71 75 69 72 65 27 3b 0a 0a 70 72 69 76 61 | IRE.=.'does.not.require';..priva |
d9600 | 74 65 20 63 6f 6e 73 74 20 54 59 50 45 5f 55 4e 4b 4e 4f 57 4e 20 3d 20 27 72 65 6c 61 74 65 73 | te.const.TYPE_UNKNOWN.=.'relates |
d9620 | 20 74 6f 27 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 24 54 59 50 | .to';.........public.static.$TYP |
d9640 | 45 53 20 3d 20 5b 0a 73 65 6c 66 3a 3a 54 59 50 45 5f 52 45 51 55 49 52 45 2c 0a 73 65 6c 66 3a | ES.=.[.self::TYPE_REQUIRE,.self: |
d9660 | 3a 54 59 50 45 5f 44 45 56 5f 52 45 51 55 49 52 45 2c 0a 73 65 6c 66 3a 3a 54 59 50 45 5f 50 52 | :TYPE_DEV_REQUIRE,.self::TYPE_PR |
d9680 | 4f 56 49 44 45 2c 0a 73 65 6c 66 3a 3a 54 59 50 45 5f 43 4f 4e 46 4c 49 43 54 2c 0a 73 65 6c 66 | OVIDE,.self::TYPE_CONFLICT,.self |
d96a0 | 3a 3a 54 59 50 45 5f 52 45 50 4c 41 43 45 2c 0a 5d 3b 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 | ::TYPE_REPLACE,.];.....protected |
d96c0 | 20 24 73 6f 75 72 63 65 3b 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 74 61 72 67 65 74 3b | .$source;.....protected.$target; |
d96e0 | 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 63 6f 6e 73 74 72 61 69 6e 74 3b 0a 0a 0a 0a 0a | .....protected.$constraint;..... |
d9700 | 0a 70 72 6f 74 65 63 74 65 64 20 24 64 65 73 63 72 69 70 74 69 6f 6e 3b 0a 0a 0a 0a 0a 70 72 6f | .protected.$description;.....pro |
d9720 | 74 65 63 74 65 64 20 24 70 72 65 74 74 79 43 6f 6e 73 74 72 61 69 6e 74 3b 0a 0a 0a 0a 0a 0a 0a | tected.$prettyConstraint;....... |
d9740 | 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 0a 73 74 | .public.function.__construct(.st |
d9760 | 72 69 6e 67 20 24 73 6f 75 72 63 65 2c 0a 73 74 72 69 6e 67 20 24 74 61 72 67 65 74 2c 0a 43 6f | ring.$source,.string.$target,.Co |
d9780 | 6e 73 74 72 61 69 6e 74 49 6e 74 65 72 66 61 63 65 20 24 63 6f 6e 73 74 72 61 69 6e 74 2c 0a 24 | nstraintInterface.$constraint,.$ |
d97a0 | 64 65 73 63 72 69 70 74 69 6f 6e 20 3d 20 73 65 6c 66 3a 3a 54 59 50 45 5f 55 4e 4b 4e 4f 57 4e | description.=.self::TYPE_UNKNOWN |
d97c0 | 2c 0a 3f 73 74 72 69 6e 67 20 24 70 72 65 74 74 79 43 6f 6e 73 74 72 61 69 6e 74 20 3d 20 6e 75 | ,.?string.$prettyConstraint.=.nu |
d97e0 | 6c 6c 0a 29 20 7b 0a 24 74 68 69 73 2d 3e 73 6f 75 72 63 65 20 3d 20 73 74 72 74 6f 6c 6f 77 65 | ll.).{.$this->source.=.strtolowe |
d9800 | 72 28 24 73 6f 75 72 63 65 29 3b 0a 24 74 68 69 73 2d 3e 74 61 72 67 65 74 20 3d 20 73 74 72 74 | r($source);.$this->target.=.strt |
d9820 | 6f 6c 6f 77 65 72 28 24 74 61 72 67 65 74 29 3b 0a 24 74 68 69 73 2d 3e 63 6f 6e 73 74 72 61 69 | olower($target);.$this->constrai |
d9840 | 6e 74 20 3d 20 24 63 6f 6e 73 74 72 61 69 6e 74 3b 0a 24 74 68 69 73 2d 3e 64 65 73 63 72 69 70 | nt.=.$constraint;.$this->descrip |
d9860 | 74 69 6f 6e 20 3d 20 73 65 6c 66 3a 3a 54 59 50 45 5f 44 45 56 5f 52 45 51 55 49 52 45 20 3d 3d | tion.=.self::TYPE_DEV_REQUIRE.== |
d9880 | 3d 20 24 64 65 73 63 72 69 70 74 69 6f 6e 20 3f 20 27 72 65 71 75 69 72 65 73 20 28 66 6f 72 20 | =.$description.?.'requires.(for. |
d98a0 | 64 65 76 65 6c 6f 70 6d 65 6e 74 29 27 20 3a 20 24 64 65 73 63 72 69 70 74 69 6f 6e 3b 0a 24 74 | development)'.:.$description;.$t |
d98c0 | 68 69 73 2d 3e 70 72 65 74 74 79 43 6f 6e 73 74 72 61 69 6e 74 20 3d 20 24 70 72 65 74 74 79 43 | his->prettyConstraint.=.$prettyC |
d98e0 | 6f 6e 73 74 72 61 69 6e 74 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 | onstraint;.}..public.function.ge |
d9900 | 74 44 65 73 63 72 69 70 74 69 6f 6e 28 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 | tDescription():.string.{.return. |
d9920 | 24 74 68 69 73 2d 3e 64 65 73 63 72 69 70 74 69 6f 6e 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 | $this->description;.}..public.fu |
d9940 | 6e 63 74 69 6f 6e 20 67 65 74 53 6f 75 72 63 65 28 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 65 74 | nction.getSource():.string.{.ret |
d9960 | 75 72 6e 20 24 74 68 69 73 2d 3e 73 6f 75 72 63 65 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e | urn.$this->source;.}..public.fun |
d9980 | 63 74 69 6f 6e 20 67 65 74 54 61 72 67 65 74 28 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 | ction.getTarget():.string.{.retu |
d99a0 | 72 6e 20 24 74 68 69 73 2d 3e 74 61 72 67 65 74 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 | rn.$this->target;.}..public.func |
d99c0 | 74 69 6f 6e 20 67 65 74 43 6f 6e 73 74 72 61 69 6e 74 28 29 3a 20 43 6f 6e 73 74 72 61 69 6e 74 | tion.getConstraint():.Constraint |
d99e0 | 49 6e 74 65 72 66 61 63 65 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 63 6f 6e 73 74 72 | Interface.{.return.$this->constr |
d9a00 | 61 69 6e 74 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 50 | aint;.}.....public.function.getP |
d9a20 | 72 65 74 74 79 43 6f 6e 73 74 72 61 69 6e 74 28 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 69 66 20 28 | rettyConstraint():.string.{.if.( |
d9a40 | 6e 75 6c 6c 20 3d 3d 3d 20 24 74 68 69 73 2d 3e 70 72 65 74 74 79 43 6f 6e 73 74 72 61 69 6e 74 | null.===.$this->prettyConstraint |
d9a60 | 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 55 6e 65 78 70 65 63 74 65 64 56 61 6c 75 65 45 78 | ).{.throw.new.\UnexpectedValueEx |
d9a80 | 63 65 70 74 69 6f 6e 28 73 70 72 69 6e 74 66 28 27 4c 69 6e 6b 20 25 73 20 68 61 73 20 62 65 65 | ception(sprintf('Link.%s.has.bee |
d9aa0 | 6e 20 6d 69 73 63 6f 6e 66 69 67 75 72 65 64 20 61 6e 64 20 68 61 64 20 6e 6f 20 70 72 65 74 74 | n.misconfigured.and.had.no.prett |
d9ac0 | 79 43 6f 6e 73 74 72 61 69 6e 74 20 67 69 76 65 6e 2e 27 2c 20 24 74 68 69 73 29 29 3b 0a 7d 0a | yConstraint.given.',.$this));.}. |
d9ae0 | 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 70 72 65 74 74 79 43 6f 6e 73 74 72 61 69 6e 74 3b | .return.$this->prettyConstraint; |
d9b00 | 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 74 6f 53 74 72 69 6e 67 28 29 | .}..public.function.__toString() |
d9b20 | 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 73 6f 75 72 63 65 2e | :.string.{.return.$this->source. |
d9b40 | 27 20 27 2e 24 74 68 69 73 2d 3e 64 65 73 63 72 69 70 74 69 6f 6e 2e 27 20 27 2e 24 74 68 69 73 | '.'.$this->description.'.'.$this |
d9b60 | 2d 3e 74 61 72 67 65 74 2e 27 20 28 27 2e 24 74 68 69 73 2d 3e 63 6f 6e 73 74 72 61 69 6e 74 2e | ->target.'.('.$this->constraint. |
d9b80 | 27 29 27 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 50 72 65 74 74 | ')';.}..public.function.getPrett |
d9ba0 | 79 53 74 72 69 6e 67 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 73 6f 75 72 63 65 | yString(PackageInterface.$source |
d9bc0 | 50 61 63 6b 61 67 65 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 24 73 6f 75 72 63 | Package):.string.{.return.$sourc |
d9be0 | 65 50 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 53 74 72 69 6e 67 28 29 2e 27 20 27 2e | ePackage->getPrettyString().'.'. |
d9c00 | 24 74 68 69 73 2d 3e 64 65 73 63 72 69 70 74 69 6f 6e 2e 27 20 27 2e 24 74 68 69 73 2d 3e 74 61 | $this->description.'.'.$this->ta |
d9c20 | 72 67 65 74 2e 27 20 27 2e 24 74 68 69 73 2d 3e 63 6f 6e 73 74 72 61 69 6e 74 2d 3e 67 65 74 50 | rget.'.'.$this->constraint->getP |
d9c40 | 72 65 74 74 79 53 74 72 69 6e 67 28 29 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 | rettyString();.}.}.<?php.declare |
d9c60 | 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d | (strict_types=1);............nam |
d9c80 | 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 4c 6f 61 64 65 72 3b 0a | espace.Composer\Package\Loader;. |
d9ca0 | 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 42 61 73 65 50 61 63 6b 61 67 | .use.Composer\Package\BasePackag |
d9cc0 | 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 43 6f 6d 70 6c 65 74 65 | e;.use.Composer\Package\Complete |
d9ce0 | 41 6c 69 61 73 50 61 63 6b 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 | AliasPackage;.use.Composer\Packa |
d9d00 | 67 65 5c 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 | ge\CompletePackage;.use.Composer |
d9d20 | 5c 50 61 63 6b 61 67 65 5c 52 6f 6f 74 50 61 63 6b 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 | \Package\RootPackage;.use.Compos |
d9d40 | 65 72 5c 50 61 63 6b 61 67 65 5c 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 | er\Package\PackageInterface;.use |
d9d60 | 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 | .Composer\Package\CompletePackag |
d9d80 | 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 | eInterface;.use.Composer\Package |
d9da0 | 5c 4c 69 6e 6b 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 52 6f 6f 74 | \Link;.use.Composer\Package\Root |
d9dc0 | 41 6c 69 61 73 50 61 63 6b 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 | AliasPackage;.use.Composer\Packa |
d9de0 | 67 65 5c 56 65 72 73 69 6f 6e 5c 56 65 72 73 69 6f 6e 50 61 72 73 65 72 3b 0a 75 73 65 20 43 6f | ge\Version\VersionParser;.use.Co |
d9e00 | 6d 70 6f 73 65 72 5c 50 63 72 65 5c 50 72 65 67 3b 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 41 72 72 | mposer\Pcre\Preg;......class.Arr |
d9e20 | 61 79 4c 6f 61 64 65 72 20 69 6d 70 6c 65 6d 65 6e 74 73 20 4c 6f 61 64 65 72 49 6e 74 65 72 66 | ayLoader.implements.LoaderInterf |
d9e40 | 61 63 65 0a 7b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 76 65 72 73 69 6f 6e 50 61 72 73 65 72 3b | ace.{..protected.$versionParser; |
d9e60 | 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 6c 6f 61 64 4f 70 74 69 6f 6e 73 3b 0a 0a 70 75 62 6c 69 | ..protected.$loadOptions;..publi |
d9e80 | 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 3f 56 65 72 73 69 6f 6e 50 | c.function.__construct(?VersionP |
d9ea0 | 61 72 73 65 72 20 24 70 61 72 73 65 72 20 3d 20 6e 75 6c 6c 2c 20 62 6f 6f 6c 20 24 6c 6f 61 64 | arser.$parser.=.null,.bool.$load |
d9ec0 | 4f 70 74 69 6f 6e 73 20 3d 20 66 61 6c 73 65 29 0a 7b 0a 69 66 20 28 21 24 70 61 72 73 65 72 29 | Options.=.false).{.if.(!$parser) |
d9ee0 | 20 7b 0a 24 70 61 72 73 65 72 20 3d 20 6e 65 77 20 56 65 72 73 69 6f 6e 50 61 72 73 65 72 3b 0a | .{.$parser.=.new.VersionParser;. |
d9f00 | 7d 0a 24 74 68 69 73 2d 3e 76 65 72 73 69 6f 6e 50 61 72 73 65 72 20 3d 20 24 70 61 72 73 65 72 | }.$this->versionParser.=.$parser |
d9f20 | 3b 0a 24 74 68 69 73 2d 3e 6c 6f 61 64 4f 70 74 69 6f 6e 73 20 3d 20 24 6c 6f 61 64 4f 70 74 69 | ;.$this->loadOptions.=.$loadOpti |
d9f40 | 6f 6e 73 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 6c 6f 61 64 28 | ons;.}.....public.function.load( |
d9f60 | 61 72 72 61 79 20 24 63 6f 6e 66 69 67 2c 20 73 74 72 69 6e 67 20 24 63 6c 61 73 73 20 3d 20 27 | array.$config,.string.$class.=.' |
d9f80 | 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 | Composer\Package\CompletePackage |
d9fa0 | 27 29 3a 20 42 61 73 65 50 61 63 6b 61 67 65 0a 7b 0a 69 66 20 28 24 63 6c 61 73 73 20 21 3d 3d | '):.BasePackage.{.if.($class.!== |
d9fc0 | 20 27 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 | .'Composer\Package\CompletePacka |
d9fe0 | 67 65 27 20 26 26 20 24 63 6c 61 73 73 20 21 3d 3d 20 27 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b | ge'.&&.$class.!==.'Composer\Pack |
da000 | 61 67 65 5c 52 6f 6f 74 50 61 63 6b 61 67 65 27 29 20 7b 0a 74 72 69 67 67 65 72 5f 65 72 72 6f | age\RootPackage').{.trigger_erro |
da020 | 72 28 27 54 68 65 20 24 63 6c 61 73 73 20 61 72 67 20 69 73 20 64 65 70 72 65 63 61 74 65 64 2c | r('The.$class.arg.is.deprecated, |
da040 | 20 70 6c 65 61 73 65 20 72 65 61 63 68 20 6f 75 74 20 74 6f 20 43 6f 6d 70 6f 73 65 72 20 6d 61 | .please.reach.out.to.Composer.ma |
da060 | 69 6e 74 61 69 6e 65 72 73 20 41 53 41 50 20 69 66 20 79 6f 75 20 73 74 69 6c 6c 20 6e 65 65 64 | intainers.ASAP.if.you.still.need |
da080 | 20 74 68 69 73 2e 27 2c 20 45 5f 55 53 45 52 5f 44 45 50 52 45 43 41 54 45 44 29 3b 0a 7d 0a 0a | .this.',.E_USER_DEPRECATED);.}.. |
da0a0 | 24 70 61 63 6b 61 67 65 20 3d 20 24 74 68 69 73 2d 3e 63 72 65 61 74 65 4f 62 6a 65 63 74 28 24 | $package.=.$this->createObject($ |
da0c0 | 63 6f 6e 66 69 67 2c 20 24 63 6c 61 73 73 29 3b 0a 0a 66 6f 72 65 61 63 68 20 28 42 61 73 65 50 | config,.$class);..foreach.(BaseP |
da0e0 | 61 63 6b 61 67 65 3a 3a 24 73 75 70 70 6f 72 74 65 64 4c 69 6e 6b 54 79 70 65 73 20 61 73 20 24 | ackage::$supportedLinkTypes.as.$ |
da100 | 74 79 70 65 20 3d 3e 20 24 6f 70 74 73 29 20 7b 0a 69 66 20 28 21 69 73 73 65 74 28 24 63 6f 6e | type.=>.$opts).{.if.(!isset($con |
da120 | 66 69 67 5b 24 74 79 70 65 5d 29 20 7c 7c 20 21 69 73 5f 61 72 72 61 79 28 24 63 6f 6e 66 69 67 | fig[$type]).||.!is_array($config |
da140 | 5b 24 74 79 70 65 5d 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 24 6d 65 74 68 6f 64 20 | [$type])).{.continue;.}.$method. |
da160 | 3d 20 27 73 65 74 27 2e 75 63 66 69 72 73 74 28 24 6f 70 74 73 5b 27 6d 65 74 68 6f 64 27 5d 29 | =.'set'.ucfirst($opts['method']) |
da180 | 3b 0a 24 70 61 63 6b 61 67 65 2d 3e 7b 24 6d 65 74 68 6f 64 7d 28 0a 24 74 68 69 73 2d 3e 70 61 | ;.$package->{$method}(.$this->pa |
da1a0 | 72 73 65 4c 69 6e 6b 73 28 0a 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 2c 0a 24 | rseLinks(.$package->getName(),.$ |
da1c0 | 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 2c 0a 24 6f 70 | package->getPrettyVersion(),.$op |
da1e0 | 74 73 5b 27 6d 65 74 68 6f 64 27 5d 2c 0a 24 63 6f 6e 66 69 67 5b 24 74 79 70 65 5d 0a 29 0a 29 | ts['method'],.$config[$type].).) |
da200 | 3b 0a 7d 0a 0a 24 70 61 63 6b 61 67 65 20 3d 20 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 75 72 65 | ;.}..$package.=.$this->configure |
da220 | 4f 62 6a 65 63 74 28 24 70 61 63 6b 61 67 65 2c 20 24 63 6f 6e 66 69 67 29 3b 0a 0a 72 65 74 75 | Object($package,.$config);..retu |
da240 | 72 6e 20 24 70 61 63 6b 61 67 65 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 | rn.$package;.}.......public.func |
da260 | 74 69 6f 6e 20 6c 6f 61 64 50 61 63 6b 61 67 65 73 28 61 72 72 61 79 20 24 76 65 72 73 69 6f 6e | tion.loadPackages(array.$version |
da280 | 73 29 3a 20 61 72 72 61 79 0a 7b 0a 24 70 61 63 6b 61 67 65 73 20 3d 20 5b 5d 3b 0a 24 6c 69 6e | s):.array.{.$packages.=.[];.$lin |
da2a0 | 6b 43 61 63 68 65 20 3d 20 5b 5d 3b 0a 0a 66 6f 72 65 61 63 68 20 28 24 76 65 72 73 69 6f 6e 73 | kCache.=.[];..foreach.($versions |
da2c0 | 20 61 73 20 24 76 65 72 73 69 6f 6e 29 20 7b 0a 24 70 61 63 6b 61 67 65 20 3d 20 24 74 68 69 73 | .as.$version).{.$package.=.$this |
da2e0 | 2d 3e 63 72 65 61 74 65 4f 62 6a 65 63 74 28 24 76 65 72 73 69 6f 6e 2c 20 27 43 6f 6d 70 6f 73 | ->createObject($version,.'Compos |
da300 | 65 72 5c 50 61 63 6b 61 67 65 5c 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 27 29 3b 0a 0a 24 | er\Package\CompletePackage');..$ |
da320 | 74 68 69 73 2d 3e 63 6f 6e 66 69 67 75 72 65 43 61 63 68 65 64 4c 69 6e 6b 73 28 24 6c 69 6e 6b | this->configureCachedLinks($link |
da340 | 43 61 63 68 65 2c 20 24 70 61 63 6b 61 67 65 2c 20 24 76 65 72 73 69 6f 6e 29 3b 0a 24 70 61 63 | Cache,.$package,.$version);.$pac |
da360 | 6b 61 67 65 20 3d 20 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 75 72 65 4f 62 6a 65 63 74 28 24 70 | kage.=.$this->configureObject($p |
da380 | 61 63 6b 61 67 65 2c 20 24 76 65 72 73 69 6f 6e 29 3b 0a 0a 24 70 61 63 6b 61 67 65 73 5b 5d 20 | ackage,.$version);..$packages[]. |
da3a0 | 3d 20 24 70 61 63 6b 61 67 65 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 70 61 63 6b 61 67 65 73 3b | =.$package;.}..return.$packages; |
da3c0 | 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 63 | .}............private.function.c |
da3e0 | 72 65 61 74 65 4f 62 6a 65 63 74 28 61 72 72 61 79 20 24 63 6f 6e 66 69 67 2c 20 73 74 72 69 6e | reateObject(array.$config,.strin |
da400 | 67 20 24 63 6c 61 73 73 29 3a 20 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 0a 7b 0a 69 66 20 | g.$class):.CompletePackage.{.if. |
da420 | 28 21 69 73 73 65 74 28 24 63 6f 6e 66 69 67 5b 27 6e 61 6d 65 27 5d 29 29 20 7b 0a 74 68 72 6f | (!isset($config['name'])).{.thro |
da440 | 77 20 6e 65 77 20 5c 55 6e 65 78 70 65 63 74 65 64 56 61 6c 75 65 45 78 63 65 70 74 69 6f 6e 28 | w.new.\UnexpectedValueException( |
da460 | 27 55 6e 6b 6e 6f 77 6e 20 70 61 63 6b 61 67 65 20 68 61 73 20 6e 6f 20 6e 61 6d 65 20 64 65 66 | 'Unknown.package.has.no.name.def |
da480 | 69 6e 65 64 20 28 27 2e 6a 73 6f 6e 5f 65 6e 63 6f 64 65 28 24 63 6f 6e 66 69 67 29 2e 27 29 2e | ined.('.json_encode($config).'). |
da4a0 | 27 29 3b 0a 7d 0a 69 66 20 28 21 69 73 73 65 74 28 24 63 6f 6e 66 69 67 5b 27 76 65 72 73 69 6f | ');.}.if.(!isset($config['versio |
da4c0 | 6e 27 5d 29 20 7c 7c 20 21 69 73 5f 73 63 61 6c 61 72 28 24 63 6f 6e 66 69 67 5b 27 76 65 72 73 | n']).||.!is_scalar($config['vers |
da4e0 | 69 6f 6e 27 5d 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 55 6e 65 78 70 65 63 74 65 64 56 | ion'])).{.throw.new.\UnexpectedV |
da500 | 61 6c 75 65 45 78 63 65 70 74 69 6f 6e 28 27 50 61 63 6b 61 67 65 20 27 2e 24 63 6f 6e 66 69 67 | alueException('Package.'.$config |
da520 | 5b 27 6e 61 6d 65 27 5d 2e 27 20 68 61 73 20 6e 6f 20 76 65 72 73 69 6f 6e 20 64 65 66 69 6e 65 | ['name'].'.has.no.version.define |
da540 | 64 2e 27 29 3b 0a 7d 0a 69 66 20 28 21 69 73 5f 73 74 72 69 6e 67 28 24 63 6f 6e 66 69 67 5b 27 | d.');.}.if.(!is_string($config[' |
da560 | 76 65 72 73 69 6f 6e 27 5d 29 29 20 7b 0a 24 63 6f 6e 66 69 67 5b 27 76 65 72 73 69 6f 6e 27 5d | version'])).{.$config['version'] |
da580 | 20 3d 20 28 73 74 72 69 6e 67 29 20 24 63 6f 6e 66 69 67 5b 27 76 65 72 73 69 6f 6e 27 5d 3b 0a | .=.(string).$config['version'];. |
da5a0 | 7d 0a 0a 0a 69 66 20 28 69 73 73 65 74 28 24 63 6f 6e 66 69 67 5b 27 76 65 72 73 69 6f 6e 5f 6e | }...if.(isset($config['version_n |
da5c0 | 6f 72 6d 61 6c 69 7a 65 64 27 5d 29 20 26 26 20 69 73 5f 73 74 72 69 6e 67 28 24 63 6f 6e 66 69 | ormalized']).&&.is_string($confi |
da5e0 | 67 5b 27 76 65 72 73 69 6f 6e 5f 6e 6f 72 6d 61 6c 69 7a 65 64 27 5d 29 29 20 7b 0a 24 76 65 72 | g['version_normalized'])).{.$ver |
da600 | 73 69 6f 6e 20 3d 20 24 63 6f 6e 66 69 67 5b 27 76 65 72 73 69 6f 6e 5f 6e 6f 72 6d 61 6c 69 7a | sion.=.$config['version_normaliz |
da620 | 65 64 27 5d 3b 0a 0a 0a 69 66 20 28 24 76 65 72 73 69 6f 6e 20 3d 3d 3d 20 56 65 72 73 69 6f 6e | ed'];...if.($version.===.Version |
da640 | 50 61 72 73 65 72 3a 3a 44 45 46 41 55 4c 54 5f 42 52 41 4e 43 48 5f 41 4c 49 41 53 29 20 7b 0a | Parser::DEFAULT_BRANCH_ALIAS).{. |
da660 | 24 76 65 72 73 69 6f 6e 20 3d 20 24 74 68 69 73 2d 3e 76 65 72 73 69 6f 6e 50 61 72 73 65 72 2d | $version.=.$this->versionParser- |
da680 | 3e 6e 6f 72 6d 61 6c 69 7a 65 28 24 63 6f 6e 66 69 67 5b 27 76 65 72 73 69 6f 6e 27 5d 29 3b 0a | >normalize($config['version']);. |
da6a0 | 7d 0a 7d 20 65 6c 73 65 20 7b 0a 24 76 65 72 73 69 6f 6e 20 3d 20 24 74 68 69 73 2d 3e 76 65 72 | }.}.else.{.$version.=.$this->ver |
da6c0 | 73 69 6f 6e 50 61 72 73 65 72 2d 3e 6e 6f 72 6d 61 6c 69 7a 65 28 24 63 6f 6e 66 69 67 5b 27 76 | sionParser->normalize($config['v |
da6e0 | 65 72 73 69 6f 6e 27 5d 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 6e 65 77 20 24 63 6c 61 73 73 28 | ersion']);.}..return.new.$class( |
da700 | 24 63 6f 6e 66 69 67 5b 27 6e 61 6d 65 27 5d 2c 20 24 76 65 72 73 69 6f 6e 2c 20 24 63 6f 6e 66 | $config['name'],.$version,.$conf |
da720 | 69 67 5b 27 76 65 72 73 69 6f 6e 27 5d 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 | ig['version']);.}........private |
da740 | 20 66 75 6e 63 74 69 6f 6e 20 63 6f 6e 66 69 67 75 72 65 4f 62 6a 65 63 74 28 50 61 63 6b 61 67 | .function.configureObject(Packag |
da760 | 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 2c 20 61 72 72 61 79 20 24 63 6f 6e 66 | eInterface.$package,.array.$conf |
da780 | 69 67 29 3a 20 42 61 73 65 50 61 63 6b 61 67 65 0a 7b 0a 69 66 20 28 21 24 70 61 63 6b 61 67 65 | ig):.BasePackage.{.if.(!$package |
da7a0 | 20 69 6e 73 74 61 6e 63 65 6f 66 20 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 29 20 7b 0a 74 | .instanceof.CompletePackage).{.t |
da7c0 | 68 72 6f 77 20 6e 65 77 20 5c 4c 6f 67 69 63 45 78 63 65 70 74 69 6f 6e 28 27 41 72 72 61 79 4c | hrow.new.\LogicException('ArrayL |
da7e0 | 6f 61 64 65 72 20 65 78 70 65 63 74 73 20 69 6e 73 74 61 6e 63 65 73 20 6f 66 20 74 68 65 20 43 | oader.expects.instances.of.the.C |
da800 | 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 20 | omposer\Package\CompletePackage. |
da820 | 63 6c 61 73 73 20 74 6f 20 66 75 6e 63 74 69 6f 6e 20 63 6f 72 72 65 63 74 6c 79 27 29 3b 0a 7d | class.to.function.correctly');.} |
da840 | 0a 0a 24 70 61 63 6b 61 67 65 2d 3e 73 65 74 54 79 70 65 28 69 73 73 65 74 28 24 63 6f 6e 66 69 | ..$package->setType(isset($confi |
da860 | 67 5b 27 74 79 70 65 27 5d 29 20 3f 20 73 74 72 74 6f 6c 6f 77 65 72 28 24 63 6f 6e 66 69 67 5b | g['type']).?.strtolower($config[ |
da880 | 27 74 79 70 65 27 5d 29 20 3a 20 27 6c 69 62 72 61 72 79 27 29 3b 0a 0a 69 66 20 28 69 73 73 65 | 'type']).:.'library');..if.(isse |
da8a0 | 74 28 24 63 6f 6e 66 69 67 5b 27 74 61 72 67 65 74 2d 64 69 72 27 5d 29 29 20 7b 0a 24 70 61 63 | t($config['target-dir'])).{.$pac |
da8c0 | 6b 61 67 65 2d 3e 73 65 74 54 61 72 67 65 74 44 69 72 28 24 63 6f 6e 66 69 67 5b 27 74 61 72 67 | kage->setTargetDir($config['targ |
da8e0 | 65 74 2d 64 69 72 27 5d 29 3b 0a 7d 0a 0a 69 66 20 28 69 73 73 65 74 28 24 63 6f 6e 66 69 67 5b | et-dir']);.}..if.(isset($config[ |
da900 | 27 65 78 74 72 61 27 5d 29 20 26 26 20 5c 69 73 5f 61 72 72 61 79 28 24 63 6f 6e 66 69 67 5b 27 | 'extra']).&&.\is_array($config[' |
da920 | 65 78 74 72 61 27 5d 29 29 20 7b 0a 24 70 61 63 6b 61 67 65 2d 3e 73 65 74 45 78 74 72 61 28 24 | extra'])).{.$package->setExtra($ |
da940 | 63 6f 6e 66 69 67 5b 27 65 78 74 72 61 27 5d 29 3b 0a 7d 0a 0a 69 66 20 28 69 73 73 65 74 28 24 | config['extra']);.}..if.(isset($ |
da960 | 63 6f 6e 66 69 67 5b 27 62 69 6e 27 5d 29 29 20 7b 0a 69 66 20 28 21 5c 69 73 5f 61 72 72 61 79 | config['bin'])).{.if.(!\is_array |
da980 | 28 24 63 6f 6e 66 69 67 5b 27 62 69 6e 27 5d 29 29 20 7b 0a 24 63 6f 6e 66 69 67 5b 27 62 69 6e | ($config['bin'])).{.$config['bin |
da9a0 | 27 5d 20 3d 20 5b 24 63 6f 6e 66 69 67 5b 27 62 69 6e 27 5d 5d 3b 0a 7d 0a 66 6f 72 65 61 63 68 | '].=.[$config['bin']];.}.foreach |
da9c0 | 20 28 24 63 6f 6e 66 69 67 5b 27 62 69 6e 27 5d 20 61 73 20 24 6b 65 79 20 3d 3e 20 24 62 69 6e | .($config['bin'].as.$key.=>.$bin |
da9e0 | 29 20 7b 0a 24 63 6f 6e 66 69 67 5b 27 62 69 6e 27 5d 5b 24 6b 65 79 5d 20 3d 20 6c 74 72 69 6d | ).{.$config['bin'][$key].=.ltrim |
daa00 | 28 24 62 69 6e 2c 20 27 2f 27 29 3b 0a 7d 0a 24 70 61 63 6b 61 67 65 2d 3e 73 65 74 42 69 6e 61 | ($bin,.'/');.}.$package->setBina |
daa20 | 72 69 65 73 28 24 63 6f 6e 66 69 67 5b 27 62 69 6e 27 5d 29 3b 0a 7d 0a 0a 69 66 20 28 69 73 73 | ries($config['bin']);.}..if.(iss |
daa40 | 65 74 28 24 63 6f 6e 66 69 67 5b 27 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 2d 73 6f 75 72 63 65 27 | et($config['installation-source' |
daa60 | 5d 29 29 20 7b 0a 24 70 61 63 6b 61 67 65 2d 3e 73 65 74 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 53 | ])).{.$package->setInstallationS |
daa80 | 6f 75 72 63 65 28 24 63 6f 6e 66 69 67 5b 27 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 2d 73 6f 75 72 | ource($config['installation-sour |
daaa0 | 63 65 27 5d 29 3b 0a 7d 0a 0a 69 66 20 28 69 73 73 65 74 28 24 63 6f 6e 66 69 67 5b 27 64 65 66 | ce']);.}..if.(isset($config['def |
daac0 | 61 75 6c 74 2d 62 72 61 6e 63 68 27 5d 29 20 26 26 20 24 63 6f 6e 66 69 67 5b 27 64 65 66 61 75 | ault-branch']).&&.$config['defau |
daae0 | 6c 74 2d 62 72 61 6e 63 68 27 5d 20 3d 3d 3d 20 74 72 75 65 29 20 7b 0a 24 70 61 63 6b 61 67 65 | lt-branch'].===.true).{.$package |
dab00 | 2d 3e 73 65 74 49 73 44 65 66 61 75 6c 74 42 72 61 6e 63 68 28 74 72 75 65 29 3b 0a 7d 0a 0a 69 | ->setIsDefaultBranch(true);.}..i |
dab20 | 66 20 28 69 73 73 65 74 28 24 63 6f 6e 66 69 67 5b 27 73 6f 75 72 63 65 27 5d 29 29 20 7b 0a 69 | f.(isset($config['source'])).{.i |
dab40 | 66 20 28 21 69 73 73 65 74 28 24 63 6f 6e 66 69 67 5b 27 73 6f 75 72 63 65 27 5d 5b 27 74 79 70 | f.(!isset($config['source']['typ |
dab60 | 65 27 5d 2c 20 24 63 6f 6e 66 69 67 5b 27 73 6f 75 72 63 65 27 5d 5b 27 75 72 6c 27 5d 2c 20 24 | e'],.$config['source']['url'],.$ |
dab80 | 63 6f 6e 66 69 67 5b 27 73 6f 75 72 63 65 27 5d 5b 27 72 65 66 65 72 65 6e 63 65 27 5d 29 29 20 | config['source']['reference'])). |
daba0 | 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 55 6e 65 78 70 65 63 74 65 64 56 61 6c 75 65 45 78 63 65 | {.throw.new.\UnexpectedValueExce |
dabc0 | 70 74 69 6f 6e 28 73 70 72 69 6e 74 66 28 0a 22 50 61 63 6b 61 67 65 20 25 73 27 73 20 73 6f 75 | ption(sprintf(."Package.%s's.sou |
dabe0 | 72 63 65 20 6b 65 79 20 73 68 6f 75 6c 64 20 62 65 20 73 70 65 63 69 66 69 65 64 20 61 73 20 7b | rce.key.should.be.specified.as.{ |
dac00 | 5c 22 74 79 70 65 5c 22 3a 20 2e 2e 2e 2c 20 5c 22 75 72 6c 5c 22 3a 20 2e 2e 2e 2c 20 5c 22 72 | \"type\":....,.\"url\":....,.\"r |
dac20 | 65 66 65 72 65 6e 63 65 5c 22 3a 20 2e 2e 2e 7d 2c 5c 6e 25 73 20 67 69 76 65 6e 2e 22 2c 0a 24 | eference\":....},\n%s.given.",.$ |
dac40 | 63 6f 6e 66 69 67 5b 27 6e 61 6d 65 27 5d 2c 0a 6a 73 6f 6e 5f 65 6e 63 6f 64 65 28 24 63 6f 6e | config['name'],.json_encode($con |
dac60 | 66 69 67 5b 27 73 6f 75 72 63 65 27 5d 29 0a 29 29 3b 0a 7d 0a 24 70 61 63 6b 61 67 65 2d 3e 73 | fig['source']).));.}.$package->s |
dac80 | 65 74 53 6f 75 72 63 65 54 79 70 65 28 24 63 6f 6e 66 69 67 5b 27 73 6f 75 72 63 65 27 5d 5b 27 | etSourceType($config['source'][' |
daca0 | 74 79 70 65 27 5d 29 3b 0a 24 70 61 63 6b 61 67 65 2d 3e 73 65 74 53 6f 75 72 63 65 55 72 6c 28 | type']);.$package->setSourceUrl( |
dacc0 | 24 63 6f 6e 66 69 67 5b 27 73 6f 75 72 63 65 27 5d 5b 27 75 72 6c 27 5d 29 3b 0a 24 70 61 63 6b | $config['source']['url']);.$pack |
dace0 | 61 67 65 2d 3e 73 65 74 53 6f 75 72 63 65 52 65 66 65 72 65 6e 63 65 28 69 73 73 65 74 28 24 63 | age->setSourceReference(isset($c |
dad00 | 6f 6e 66 69 67 5b 27 73 6f 75 72 63 65 27 5d 5b 27 72 65 66 65 72 65 6e 63 65 27 5d 29 20 3f 20 | onfig['source']['reference']).?. |
dad20 | 28 73 74 72 69 6e 67 29 20 24 63 6f 6e 66 69 67 5b 27 73 6f 75 72 63 65 27 5d 5b 27 72 65 66 65 | (string).$config['source']['refe |
dad40 | 72 65 6e 63 65 27 5d 20 3a 20 6e 75 6c 6c 29 3b 0a 69 66 20 28 69 73 73 65 74 28 24 63 6f 6e 66 | rence'].:.null);.if.(isset($conf |
dad60 | 69 67 5b 27 73 6f 75 72 63 65 27 5d 5b 27 6d 69 72 72 6f 72 73 27 5d 29 29 20 7b 0a 24 70 61 63 | ig['source']['mirrors'])).{.$pac |
dad80 | 6b 61 67 65 2d 3e 73 65 74 53 6f 75 72 63 65 4d 69 72 72 6f 72 73 28 24 63 6f 6e 66 69 67 5b 27 | kage->setSourceMirrors($config[' |
dada0 | 73 6f 75 72 63 65 27 5d 5b 27 6d 69 72 72 6f 72 73 27 5d 29 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 69 | source']['mirrors']);.}.}..if.(i |
dadc0 | 73 73 65 74 28 24 63 6f 6e 66 69 67 5b 27 64 69 73 74 27 5d 29 29 20 7b 0a 69 66 20 28 21 69 73 | sset($config['dist'])).{.if.(!is |
dade0 | 73 65 74 28 24 63 6f 6e 66 69 67 5b 27 64 69 73 74 27 5d 5b 27 74 79 70 65 27 5d 2c 20 24 63 6f | set($config['dist']['type'],.$co |
dae00 | 6e 66 69 67 5b 27 64 69 73 74 27 5d 5b 27 75 72 6c 27 5d 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 | nfig['dist']['url'])).{.throw.ne |
dae20 | 77 20 5c 55 6e 65 78 70 65 63 74 65 64 56 61 6c 75 65 45 78 63 65 70 74 69 6f 6e 28 73 70 72 69 | w.\UnexpectedValueException(spri |
dae40 | 6e 74 66 28 0a 22 50 61 63 6b 61 67 65 20 25 73 27 73 20 64 69 73 74 20 6b 65 79 20 73 68 6f 75 | ntf(."Package.%s's.dist.key.shou |
dae60 | 6c 64 20 62 65 20 73 70 65 63 69 66 69 65 64 20 61 73 20 22 2e 0a 22 7b 5c 22 74 79 70 65 5c 22 | ld.be.specified.as.".."{\"type\" |
dae80 | 3a 20 2e 2e 2e 2c 20 5c 22 75 72 6c 5c 22 3a 20 2e 2e 2e 2c 20 5c 22 72 65 66 65 72 65 6e 63 65 | :....,.\"url\":....,.\"reference |
daea0 | 5c 22 3a 20 2e 2e 2e 2c 20 5c 22 73 68 61 73 75 6d 5c 22 3a 20 2e 2e 2e 7d 2c 5c 6e 25 73 20 67 | \":....,.\"shasum\":....},\n%s.g |
daec0 | 69 76 65 6e 2e 22 2c 0a 24 63 6f 6e 66 69 67 5b 27 6e 61 6d 65 27 5d 2c 0a 6a 73 6f 6e 5f 65 6e | iven.",.$config['name'],.json_en |
daee0 | 63 6f 64 65 28 24 63 6f 6e 66 69 67 5b 27 64 69 73 74 27 5d 29 0a 29 29 3b 0a 7d 0a 24 70 61 63 | code($config['dist']).));.}.$pac |
daf00 | 6b 61 67 65 2d 3e 73 65 74 44 69 73 74 54 79 70 65 28 24 63 6f 6e 66 69 67 5b 27 64 69 73 74 27 | kage->setDistType($config['dist' |
daf20 | 5d 5b 27 74 79 70 65 27 5d 29 3b 0a 24 70 61 63 6b 61 67 65 2d 3e 73 65 74 44 69 73 74 55 72 6c | ]['type']);.$package->setDistUrl |
daf40 | 28 24 63 6f 6e 66 69 67 5b 27 64 69 73 74 27 5d 5b 27 75 72 6c 27 5d 29 3b 0a 24 70 61 63 6b 61 | ($config['dist']['url']);.$packa |
daf60 | 67 65 2d 3e 73 65 74 44 69 73 74 52 65 66 65 72 65 6e 63 65 28 69 73 73 65 74 28 24 63 6f 6e 66 | ge->setDistReference(isset($conf |
daf80 | 69 67 5b 27 64 69 73 74 27 5d 5b 27 72 65 66 65 72 65 6e 63 65 27 5d 29 20 3f 20 28 73 74 72 69 | ig['dist']['reference']).?.(stri |
dafa0 | 6e 67 29 20 24 63 6f 6e 66 69 67 5b 27 64 69 73 74 27 5d 5b 27 72 65 66 65 72 65 6e 63 65 27 5d | ng).$config['dist']['reference'] |
dafc0 | 20 3a 20 6e 75 6c 6c 29 3b 0a 24 70 61 63 6b 61 67 65 2d 3e 73 65 74 44 69 73 74 53 68 61 31 43 | .:.null);.$package->setDistSha1C |
dafe0 | 68 65 63 6b 73 75 6d 28 24 63 6f 6e 66 69 67 5b 27 64 69 73 74 27 5d 5b 27 73 68 61 73 75 6d 27 | hecksum($config['dist']['shasum' |
db000 | 5d 20 3f 3f 20 6e 75 6c 6c 29 3b 0a 69 66 20 28 69 73 73 65 74 28 24 63 6f 6e 66 69 67 5b 27 64 | ].??.null);.if.(isset($config['d |
db020 | 69 73 74 27 5d 5b 27 6d 69 72 72 6f 72 73 27 5d 29 29 20 7b 0a 24 70 61 63 6b 61 67 65 2d 3e 73 | ist']['mirrors'])).{.$package->s |
db040 | 65 74 44 69 73 74 4d 69 72 72 6f 72 73 28 24 63 6f 6e 66 69 67 5b 27 64 69 73 74 27 5d 5b 27 6d | etDistMirrors($config['dist']['m |
db060 | 69 72 72 6f 72 73 27 5d 29 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 69 73 73 65 74 28 24 63 6f 6e 66 69 | irrors']);.}.}..if.(isset($confi |
db080 | 67 5b 27 73 75 67 67 65 73 74 27 5d 29 20 26 26 20 5c 69 73 5f 61 72 72 61 79 28 24 63 6f 6e 66 | g['suggest']).&&.\is_array($conf |
db0a0 | 69 67 5b 27 73 75 67 67 65 73 74 27 5d 29 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 63 6f 6e 66 | ig['suggest'])).{.foreach.($conf |
db0c0 | 69 67 5b 27 73 75 67 67 65 73 74 27 5d 20 61 73 20 24 74 61 72 67 65 74 20 3d 3e 20 24 72 65 61 | ig['suggest'].as.$target.=>.$rea |
db0e0 | 73 6f 6e 29 20 7b 0a 69 66 20 28 27 73 65 6c 66 2e 76 65 72 73 69 6f 6e 27 20 3d 3d 3d 20 74 72 | son).{.if.('self.version'.===.tr |
db100 | 69 6d 28 24 72 65 61 73 6f 6e 29 29 20 7b 0a 24 63 6f 6e 66 69 67 5b 27 73 75 67 67 65 73 74 27 | im($reason)).{.$config['suggest' |
db120 | 5d 5b 24 74 61 72 67 65 74 5d 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 | ][$target].=.$package->getPretty |
db140 | 56 65 72 73 69 6f 6e 28 29 3b 0a 7d 0a 7d 0a 24 70 61 63 6b 61 67 65 2d 3e 73 65 74 53 75 67 67 | Version();.}.}.$package->setSugg |
db160 | 65 73 74 73 28 24 63 6f 6e 66 69 67 5b 27 73 75 67 67 65 73 74 27 5d 29 3b 0a 7d 0a 0a 69 66 20 | ests($config['suggest']);.}..if. |
db180 | 28 69 73 73 65 74 28 24 63 6f 6e 66 69 67 5b 27 61 75 74 6f 6c 6f 61 64 27 5d 29 29 20 7b 0a 24 | (isset($config['autoload'])).{.$ |
db1a0 | 70 61 63 6b 61 67 65 2d 3e 73 65 74 41 75 74 6f 6c 6f 61 64 28 24 63 6f 6e 66 69 67 5b 27 61 75 | package->setAutoload($config['au |
db1c0 | 74 6f 6c 6f 61 64 27 5d 29 3b 0a 7d 0a 0a 69 66 20 28 69 73 73 65 74 28 24 63 6f 6e 66 69 67 5b | toload']);.}..if.(isset($config[ |
db1e0 | 27 61 75 74 6f 6c 6f 61 64 2d 64 65 76 27 5d 29 29 20 7b 0a 24 70 61 63 6b 61 67 65 2d 3e 73 65 | 'autoload-dev'])).{.$package->se |
db200 | 74 44 65 76 41 75 74 6f 6c 6f 61 64 28 24 63 6f 6e 66 69 67 5b 27 61 75 74 6f 6c 6f 61 64 2d 64 | tDevAutoload($config['autoload-d |
db220 | 65 76 27 5d 29 3b 0a 7d 0a 0a 69 66 20 28 69 73 73 65 74 28 24 63 6f 6e 66 69 67 5b 27 69 6e 63 | ev']);.}..if.(isset($config['inc |
db240 | 6c 75 64 65 2d 70 61 74 68 27 5d 29 29 20 7b 0a 24 70 61 63 6b 61 67 65 2d 3e 73 65 74 49 6e 63 | lude-path'])).{.$package->setInc |
db260 | 6c 75 64 65 50 61 74 68 73 28 24 63 6f 6e 66 69 67 5b 27 69 6e 63 6c 75 64 65 2d 70 61 74 68 27 | ludePaths($config['include-path' |
db280 | 5d 29 3b 0a 7d 0a 0a 69 66 20 28 21 65 6d 70 74 79 28 24 63 6f 6e 66 69 67 5b 27 74 69 6d 65 27 | ]);.}..if.(!empty($config['time' |
db2a0 | 5d 29 29 20 7b 0a 24 74 69 6d 65 20 3d 20 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 2f 5e 5c | ])).{.$time.=.Preg::isMatch('/^\ |
db2c0 | 64 2b 2b 24 2f 44 27 2c 20 24 63 6f 6e 66 69 67 5b 27 74 69 6d 65 27 5d 29 20 3f 20 27 40 27 2e | d++$/D',.$config['time']).?.'@'. |
db2e0 | 24 63 6f 6e 66 69 67 5b 27 74 69 6d 65 27 5d 20 3a 20 24 63 6f 6e 66 69 67 5b 27 74 69 6d 65 27 | $config['time'].:.$config['time' |
db300 | 5d 3b 0a 0a 74 72 79 20 7b 0a 24 64 61 74 65 20 3d 20 6e 65 77 20 5c 44 61 74 65 54 69 6d 65 28 | ];..try.{.$date.=.new.\DateTime( |
db320 | 24 74 69 6d 65 2c 20 6e 65 77 20 5c 44 61 74 65 54 69 6d 65 5a 6f 6e 65 28 27 55 54 43 27 29 29 | $time,.new.\DateTimeZone('UTC')) |
db340 | 3b 0a 24 70 61 63 6b 61 67 65 2d 3e 73 65 74 52 65 6c 65 61 73 65 44 61 74 65 28 24 64 61 74 65 | ;.$package->setReleaseDate($date |
db360 | 29 3b 0a 7d 20 63 61 74 63 68 20 28 5c 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 7d 0a 7d | );.}.catch.(\Exception.$e).{.}.} |
db380 | 0a 0a 69 66 20 28 21 65 6d 70 74 79 28 24 63 6f 6e 66 69 67 5b 27 6e 6f 74 69 66 69 63 61 74 69 | ..if.(!empty($config['notificati |
db3a0 | 6f 6e 2d 75 72 6c 27 5d 29 29 20 7b 0a 24 70 61 63 6b 61 67 65 2d 3e 73 65 74 4e 6f 74 69 66 69 | on-url'])).{.$package->setNotifi |
db3c0 | 63 61 74 69 6f 6e 55 72 6c 28 24 63 6f 6e 66 69 67 5b 27 6e 6f 74 69 66 69 63 61 74 69 6f 6e 2d | cationUrl($config['notification- |
db3e0 | 75 72 6c 27 5d 29 3b 0a 7d 0a 0a 69 66 20 28 24 70 61 63 6b 61 67 65 20 69 6e 73 74 61 6e 63 65 | url']);.}..if.($package.instance |
db400 | 6f 66 20 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 29 20 7b 0a 69 | of.CompletePackageInterface).{.i |
db420 | 66 20 28 21 65 6d 70 74 79 28 24 63 6f 6e 66 69 67 5b 27 61 72 63 68 69 76 65 27 5d 5b 27 6e 61 | f.(!empty($config['archive']['na |
db440 | 6d 65 27 5d 29 29 20 7b 0a 24 70 61 63 6b 61 67 65 2d 3e 73 65 74 41 72 63 68 69 76 65 4e 61 6d | me'])).{.$package->setArchiveNam |
db460 | 65 28 24 63 6f 6e 66 69 67 5b 27 61 72 63 68 69 76 65 27 5d 5b 27 6e 61 6d 65 27 5d 29 3b 0a 7d | e($config['archive']['name']);.} |
db480 | 0a 69 66 20 28 21 65 6d 70 74 79 28 24 63 6f 6e 66 69 67 5b 27 61 72 63 68 69 76 65 27 5d 5b 27 | .if.(!empty($config['archive'][' |
db4a0 | 65 78 63 6c 75 64 65 27 5d 29 29 20 7b 0a 24 70 61 63 6b 61 67 65 2d 3e 73 65 74 41 72 63 68 69 | exclude'])).{.$package->setArchi |
db4c0 | 76 65 45 78 63 6c 75 64 65 73 28 24 63 6f 6e 66 69 67 5b 27 61 72 63 68 69 76 65 27 5d 5b 27 65 | veExcludes($config['archive']['e |
db4e0 | 78 63 6c 75 64 65 27 5d 29 3b 0a 7d 0a 0a 69 66 20 28 69 73 73 65 74 28 24 63 6f 6e 66 69 67 5b | xclude']);.}..if.(isset($config[ |
db500 | 27 73 63 72 69 70 74 73 27 5d 29 20 26 26 20 5c 69 73 5f 61 72 72 61 79 28 24 63 6f 6e 66 69 67 | 'scripts']).&&.\is_array($config |
db520 | 5b 27 73 63 72 69 70 74 73 27 5d 29 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 63 6f 6e 66 69 67 | ['scripts'])).{.foreach.($config |
db540 | 5b 27 73 63 72 69 70 74 73 27 5d 20 61 73 20 24 65 76 65 6e 74 20 3d 3e 20 24 6c 69 73 74 65 6e | ['scripts'].as.$event.=>.$listen |
db560 | 65 72 73 29 20 7b 0a 24 63 6f 6e 66 69 67 5b 27 73 63 72 69 70 74 73 27 5d 5b 24 65 76 65 6e 74 | ers).{.$config['scripts'][$event |
db580 | 5d 20 3d 20 28 61 72 72 61 79 29 20 24 6c 69 73 74 65 6e 65 72 73 3b 0a 7d 0a 66 6f 72 65 61 63 | ].=.(array).$listeners;.}.foreac |
db5a0 | 68 20 28 5b 27 63 6f 6d 70 6f 73 65 72 27 2c 20 27 70 68 70 27 2c 20 27 70 75 74 65 6e 76 27 5d | h.(['composer',.'php',.'putenv'] |
db5c0 | 20 61 73 20 24 72 65 73 65 72 76 65 64 29 20 7b 0a 69 66 20 28 69 73 73 65 74 28 24 63 6f 6e 66 | .as.$reserved).{.if.(isset($conf |
db5e0 | 69 67 5b 27 73 63 72 69 70 74 73 27 5d 5b 24 72 65 73 65 72 76 65 64 5d 29 29 20 7b 0a 74 72 69 | ig['scripts'][$reserved])).{.tri |
db600 | 67 67 65 72 5f 65 72 72 6f 72 28 27 54 68 65 20 60 27 2e 24 72 65 73 65 72 76 65 64 2e 27 60 20 | gger_error('The.`'.$reserved.'`. |
db620 | 73 63 72 69 70 74 20 6e 61 6d 65 20 69 73 20 72 65 73 65 72 76 65 64 20 66 6f 72 20 69 6e 74 65 | script.name.is.reserved.for.inte |
db640 | 72 6e 61 6c 20 75 73 65 2c 20 70 6c 65 61 73 65 20 61 76 6f 69 64 20 64 65 66 69 6e 69 6e 67 20 | rnal.use,.please.avoid.defining. |
db660 | 69 74 27 2c 20 45 5f 55 53 45 52 5f 44 45 50 52 45 43 41 54 45 44 29 3b 0a 7d 0a 7d 0a 24 70 61 | it',.E_USER_DEPRECATED);.}.}.$pa |
db680 | 63 6b 61 67 65 2d 3e 73 65 74 53 63 72 69 70 74 73 28 24 63 6f 6e 66 69 67 5b 27 73 63 72 69 70 | ckage->setScripts($config['scrip |
db6a0 | 74 73 27 5d 29 3b 0a 7d 0a 0a 69 66 20 28 21 65 6d 70 74 79 28 24 63 6f 6e 66 69 67 5b 27 64 65 | ts']);.}..if.(!empty($config['de |
db6c0 | 73 63 72 69 70 74 69 6f 6e 27 5d 29 20 26 26 20 5c 69 73 5f 73 74 72 69 6e 67 28 24 63 6f 6e 66 | scription']).&&.\is_string($conf |
db6e0 | 69 67 5b 27 64 65 73 63 72 69 70 74 69 6f 6e 27 5d 29 29 20 7b 0a 24 70 61 63 6b 61 67 65 2d 3e | ig['description'])).{.$package-> |
db700 | 73 65 74 44 65 73 63 72 69 70 74 69 6f 6e 28 24 63 6f 6e 66 69 67 5b 27 64 65 73 63 72 69 70 74 | setDescription($config['descript |
db720 | 69 6f 6e 27 5d 29 3b 0a 7d 0a 0a 69 66 20 28 21 65 6d 70 74 79 28 24 63 6f 6e 66 69 67 5b 27 68 | ion']);.}..if.(!empty($config['h |
db740 | 6f 6d 65 70 61 67 65 27 5d 29 20 26 26 20 5c 69 73 5f 73 74 72 69 6e 67 28 24 63 6f 6e 66 69 67 | omepage']).&&.\is_string($config |
db760 | 5b 27 68 6f 6d 65 70 61 67 65 27 5d 29 29 20 7b 0a 24 70 61 63 6b 61 67 65 2d 3e 73 65 74 48 6f | ['homepage'])).{.$package->setHo |
db780 | 6d 65 70 61 67 65 28 24 63 6f 6e 66 69 67 5b 27 68 6f 6d 65 70 61 67 65 27 5d 29 3b 0a 7d 0a 0a | mepage($config['homepage']);.}.. |
db7a0 | 69 66 20 28 21 65 6d 70 74 79 28 24 63 6f 6e 66 69 67 5b 27 6b 65 79 77 6f 72 64 73 27 5d 29 20 | if.(!empty($config['keywords']). |
db7c0 | 26 26 20 5c 69 73 5f 61 72 72 61 79 28 24 63 6f 6e 66 69 67 5b 27 6b 65 79 77 6f 72 64 73 27 5d | &&.\is_array($config['keywords'] |
db7e0 | 29 29 20 7b 0a 24 70 61 63 6b 61 67 65 2d 3e 73 65 74 4b 65 79 77 6f 72 64 73 28 24 63 6f 6e 66 | )).{.$package->setKeywords($conf |
db800 | 69 67 5b 27 6b 65 79 77 6f 72 64 73 27 5d 29 3b 0a 7d 0a 0a 69 66 20 28 21 65 6d 70 74 79 28 24 | ig['keywords']);.}..if.(!empty($ |
db820 | 63 6f 6e 66 69 67 5b 27 6c 69 63 65 6e 73 65 27 5d 29 29 20 7b 0a 24 70 61 63 6b 61 67 65 2d 3e | config['license'])).{.$package-> |
db840 | 73 65 74 4c 69 63 65 6e 73 65 28 5c 69 73 5f 61 72 72 61 79 28 24 63 6f 6e 66 69 67 5b 27 6c 69 | setLicense(\is_array($config['li |
db860 | 63 65 6e 73 65 27 5d 29 20 3f 20 24 63 6f 6e 66 69 67 5b 27 6c 69 63 65 6e 73 65 27 5d 20 3a 20 | cense']).?.$config['license'].:. |
db880 | 5b 24 63 6f 6e 66 69 67 5b 27 6c 69 63 65 6e 73 65 27 5d 5d 29 3b 0a 7d 0a 0a 69 66 20 28 21 65 | [$config['license']]);.}..if.(!e |
db8a0 | 6d 70 74 79 28 24 63 6f 6e 66 69 67 5b 27 61 75 74 68 6f 72 73 27 5d 29 20 26 26 20 5c 69 73 5f | mpty($config['authors']).&&.\is_ |
db8c0 | 61 72 72 61 79 28 24 63 6f 6e 66 69 67 5b 27 61 75 74 68 6f 72 73 27 5d 29 29 20 7b 0a 24 70 61 | array($config['authors'])).{.$pa |
db8e0 | 63 6b 61 67 65 2d 3e 73 65 74 41 75 74 68 6f 72 73 28 24 63 6f 6e 66 69 67 5b 27 61 75 74 68 6f | ckage->setAuthors($config['autho |
db900 | 72 73 27 5d 29 3b 0a 7d 0a 0a 69 66 20 28 69 73 73 65 74 28 24 63 6f 6e 66 69 67 5b 27 73 75 70 | rs']);.}..if.(isset($config['sup |
db920 | 70 6f 72 74 27 5d 29 29 20 7b 0a 24 70 61 63 6b 61 67 65 2d 3e 73 65 74 53 75 70 70 6f 72 74 28 | port'])).{.$package->setSupport( |
db940 | 24 63 6f 6e 66 69 67 5b 27 73 75 70 70 6f 72 74 27 5d 29 3b 0a 7d 0a 0a 69 66 20 28 21 65 6d 70 | $config['support']);.}..if.(!emp |
db960 | 74 79 28 24 63 6f 6e 66 69 67 5b 27 66 75 6e 64 69 6e 67 27 5d 29 20 26 26 20 5c 69 73 5f 61 72 | ty($config['funding']).&&.\is_ar |
db980 | 72 61 79 28 24 63 6f 6e 66 69 67 5b 27 66 75 6e 64 69 6e 67 27 5d 29 29 20 7b 0a 24 70 61 63 6b | ray($config['funding'])).{.$pack |
db9a0 | 61 67 65 2d 3e 73 65 74 46 75 6e 64 69 6e 67 28 24 63 6f 6e 66 69 67 5b 27 66 75 6e 64 69 6e 67 | age->setFunding($config['funding |
db9c0 | 27 5d 29 3b 0a 7d 0a 0a 69 66 20 28 69 73 73 65 74 28 24 63 6f 6e 66 69 67 5b 27 61 62 61 6e 64 | ']);.}..if.(isset($config['aband |
db9e0 | 6f 6e 65 64 27 5d 29 29 20 7b 0a 24 70 61 63 6b 61 67 65 2d 3e 73 65 74 41 62 61 6e 64 6f 6e 65 | oned'])).{.$package->setAbandone |
dba00 | 64 28 24 63 6f 6e 66 69 67 5b 27 61 62 61 6e 64 6f 6e 65 64 27 5d 29 3b 0a 7d 0a 7d 0a 0a 69 66 | d($config['abandoned']);.}.}..if |
dba20 | 20 28 24 74 68 69 73 2d 3e 6c 6f 61 64 4f 70 74 69 6f 6e 73 20 26 26 20 69 73 73 65 74 28 24 63 | .($this->loadOptions.&&.isset($c |
dba40 | 6f 6e 66 69 67 5b 27 74 72 61 6e 73 70 6f 72 74 2d 6f 70 74 69 6f 6e 73 27 5d 29 29 20 7b 0a 24 | onfig['transport-options'])).{.$ |
dba60 | 70 61 63 6b 61 67 65 2d 3e 73 65 74 54 72 61 6e 73 70 6f 72 74 4f 70 74 69 6f 6e 73 28 24 63 6f | package->setTransportOptions($co |
dba80 | 6e 66 69 67 5b 27 74 72 61 6e 73 70 6f 72 74 2d 6f 70 74 69 6f 6e 73 27 5d 29 3b 0a 7d 0a 0a 69 | nfig['transport-options']);.}..i |
dbaa0 | 66 20 28 24 61 6c 69 61 73 4e 6f 72 6d 61 6c 69 7a 65 64 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 | f.($aliasNormalized.=.$this->get |
dbac0 | 42 72 61 6e 63 68 41 6c 69 61 73 28 24 63 6f 6e 66 69 67 29 29 20 7b 0a 24 70 72 65 74 74 79 41 | BranchAlias($config)).{.$prettyA |
dbae0 | 6c 69 61 73 20 3d 20 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 28 27 7b 28 5c 2e 39 7b 37 7d 29 2b | lias.=.Preg::replace('{(\.9{7})+ |
dbb00 | 7d 27 2c 20 27 2e 78 27 2c 20 24 61 6c 69 61 73 4e 6f 72 6d 61 6c 69 7a 65 64 29 3b 0a 0a 69 66 | }',.'.x',.$aliasNormalized);..if |
dbb20 | 20 28 24 70 61 63 6b 61 67 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 52 6f 6f 74 50 61 63 6b 61 67 | .($package.instanceof.RootPackag |
dbb40 | 65 29 20 7b 0a 72 65 74 75 72 6e 20 6e 65 77 20 52 6f 6f 74 41 6c 69 61 73 50 61 63 6b 61 67 65 | e).{.return.new.RootAliasPackage |
dbb60 | 28 24 70 61 63 6b 61 67 65 2c 20 24 61 6c 69 61 73 4e 6f 72 6d 61 6c 69 7a 65 64 2c 20 24 70 72 | ($package,.$aliasNormalized,.$pr |
dbb80 | 65 74 74 79 41 6c 69 61 73 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 6e 65 77 20 43 6f 6d 70 6c 65 | ettyAlias);.}..return.new.Comple |
dbba0 | 74 65 41 6c 69 61 73 50 61 63 6b 61 67 65 28 24 70 61 63 6b 61 67 65 2c 20 24 61 6c 69 61 73 4e | teAliasPackage($package,.$aliasN |
dbbc0 | 6f 72 6d 61 6c 69 7a 65 64 2c 20 24 70 72 65 74 74 79 41 6c 69 61 73 29 3b 0a 7d 0a 0a 72 65 74 | ormalized,.$prettyAlias);.}..ret |
dbbe0 | 75 72 6e 20 24 70 61 63 6b 61 67 65 3b 0a 7d 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e | urn.$package;.}......private.fun |
dbc00 | 63 74 69 6f 6e 20 63 6f 6e 66 69 67 75 72 65 43 61 63 68 65 64 4c 69 6e 6b 73 28 61 72 72 61 79 | ction.configureCachedLinks(array |
dbc20 | 20 26 24 6c 69 6e 6b 43 61 63 68 65 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 | .&$linkCache,.PackageInterface.$ |
dbc40 | 70 61 63 6b 61 67 65 2c 20 61 72 72 61 79 20 24 63 6f 6e 66 69 67 29 3a 20 76 6f 69 64 0a 7b 0a | package,.array.$config):.void.{. |
dbc60 | 24 6e 61 6d 65 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 3b 0a 24 70 72 | $name.=.$package->getName();.$pr |
dbc80 | 65 74 74 79 56 65 72 73 69 6f 6e 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 | ettyVersion.=.$package->getPrett |
dbca0 | 79 56 65 72 73 69 6f 6e 28 29 3b 0a 0a 66 6f 72 65 61 63 68 20 28 42 61 73 65 50 61 63 6b 61 67 | yVersion();..foreach.(BasePackag |
dbcc0 | 65 3a 3a 24 73 75 70 70 6f 72 74 65 64 4c 69 6e 6b 54 79 70 65 73 20 61 73 20 24 74 79 70 65 20 | e::$supportedLinkTypes.as.$type. |
dbce0 | 3d 3e 20 24 6f 70 74 73 29 20 7b 0a 69 66 20 28 69 73 73 65 74 28 24 63 6f 6e 66 69 67 5b 24 74 | =>.$opts).{.if.(isset($config[$t |
dbd00 | 79 70 65 5d 29 29 20 7b 0a 24 6d 65 74 68 6f 64 20 3d 20 27 73 65 74 27 2e 75 63 66 69 72 73 74 | ype])).{.$method.=.'set'.ucfirst |
dbd20 | 28 24 6f 70 74 73 5b 27 6d 65 74 68 6f 64 27 5d 29 3b 0a 0a 24 6c 69 6e 6b 73 20 3d 20 5b 5d 3b | ($opts['method']);..$links.=.[]; |
dbd40 | 0a 66 6f 72 65 61 63 68 20 28 24 63 6f 6e 66 69 67 5b 24 74 79 70 65 5d 20 61 73 20 24 70 72 65 | .foreach.($config[$type].as.$pre |
dbd60 | 74 74 79 54 61 72 67 65 74 20 3d 3e 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 20 7b 0a 24 74 61 72 | ttyTarget.=>.$constraint).{.$tar |
dbd80 | 67 65 74 20 3d 20 73 74 72 74 6f 6c 6f 77 65 72 28 24 70 72 65 74 74 79 54 61 72 67 65 74 29 3b | get.=.strtolower($prettyTarget); |
dbda0 | 0a 0a 0a 69 66 20 28 24 74 61 72 67 65 74 20 3d 3d 3d 20 24 6e 61 6d 65 29 20 7b 0a 63 6f 6e 74 | ...if.($target.===.$name).{.cont |
dbdc0 | 69 6e 75 65 3b 0a 7d 0a 0a 69 66 20 28 24 63 6f 6e 73 74 72 61 69 6e 74 20 3d 3d 3d 20 27 73 65 | inue;.}..if.($constraint.===.'se |
dbde0 | 6c 66 2e 76 65 72 73 69 6f 6e 27 29 20 7b 0a 24 6c 69 6e 6b 73 5b 24 74 61 72 67 65 74 5d 20 3d | lf.version').{.$links[$target].= |
dbe00 | 20 24 74 68 69 73 2d 3e 63 72 65 61 74 65 4c 69 6e 6b 28 24 6e 61 6d 65 2c 20 24 70 72 65 74 74 | .$this->createLink($name,.$prett |
dbe20 | 79 56 65 72 73 69 6f 6e 2c 20 24 6f 70 74 73 5b 27 6d 65 74 68 6f 64 27 5d 2c 20 24 74 61 72 67 | yVersion,.$opts['method'],.$targ |
dbe40 | 65 74 2c 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 69 66 20 28 21 | et,.$constraint);.}.else.{.if.(! |
dbe60 | 69 73 73 65 74 28 24 6c 69 6e 6b 43 61 63 68 65 5b 24 6e 61 6d 65 5d 5b 24 74 79 70 65 5d 5b 24 | isset($linkCache[$name][$type][$ |
dbe80 | 74 61 72 67 65 74 5d 5b 24 63 6f 6e 73 74 72 61 69 6e 74 5d 29 29 20 7b 0a 24 6c 69 6e 6b 43 61 | target][$constraint])).{.$linkCa |
dbea0 | 63 68 65 5b 24 6e 61 6d 65 5d 5b 24 74 79 70 65 5d 5b 24 74 61 72 67 65 74 5d 5b 24 63 6f 6e 73 | che[$name][$type][$target][$cons |
dbec0 | 74 72 61 69 6e 74 5d 20 3d 20 5b 24 74 61 72 67 65 74 2c 20 24 74 68 69 73 2d 3e 63 72 65 61 74 | traint].=.[$target,.$this->creat |
dbee0 | 65 4c 69 6e 6b 28 24 6e 61 6d 65 2c 20 24 70 72 65 74 74 79 56 65 72 73 69 6f 6e 2c 20 24 6f 70 | eLink($name,.$prettyVersion,.$op |
dbf00 | 74 73 5b 27 6d 65 74 68 6f 64 27 5d 2c 20 24 74 61 72 67 65 74 2c 20 24 63 6f 6e 73 74 72 61 69 | ts['method'],.$target,.$constrai |
dbf20 | 6e 74 29 5d 3b 0a 7d 0a 0a 5b 24 74 61 72 67 65 74 2c 20 24 6c 69 6e 6b 5d 20 3d 20 24 6c 69 6e | nt)];.}..[$target,.$link].=.$lin |
dbf40 | 6b 43 61 63 68 65 5b 24 6e 61 6d 65 5d 5b 24 74 79 70 65 5d 5b 24 74 61 72 67 65 74 5d 5b 24 63 | kCache[$name][$type][$target][$c |
dbf60 | 6f 6e 73 74 72 61 69 6e 74 5d 3b 0a 24 6c 69 6e 6b 73 5b 24 74 61 72 67 65 74 5d 20 3d 20 24 6c | onstraint];.$links[$target].=.$l |
dbf80 | 69 6e 6b 3b 0a 7d 0a 7d 0a 0a 24 70 61 63 6b 61 67 65 2d 3e 7b 24 6d 65 74 68 6f 64 7d 28 24 6c | ink;.}.}..$package->{$method}($l |
dbfa0 | 69 6e 6b 73 29 3b 0a 7d 0a 7d 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 | inks);.}.}.}............public.f |
dbfc0 | 75 6e 63 74 69 6f 6e 20 70 61 72 73 65 4c 69 6e 6b 73 28 73 74 72 69 6e 67 20 24 73 6f 75 72 63 | unction.parseLinks(string.$sourc |
dbfe0 | 65 2c 20 73 74 72 69 6e 67 20 24 73 6f 75 72 63 65 56 65 72 73 69 6f 6e 2c 20 73 74 72 69 6e 67 | e,.string.$sourceVersion,.string |
dc000 | 20 24 64 65 73 63 72 69 70 74 69 6f 6e 2c 20 61 72 72 61 79 20 24 6c 69 6e 6b 73 29 3a 20 61 72 | .$description,.array.$links):.ar |
dc020 | 72 61 79 0a 7b 0a 24 72 65 73 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 6c 69 6e 6b 73 | ray.{.$res.=.[];.foreach.($links |
dc040 | 20 61 73 20 24 74 61 72 67 65 74 20 3d 3e 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 20 7b 0a 69 66 | .as.$target.=>.$constraint).{.if |
dc060 | 20 28 21 69 73 5f 73 74 72 69 6e 67 28 24 63 6f 6e 73 74 72 61 69 6e 74 29 29 20 7b 0a 63 6f 6e | .(!is_string($constraint)).{.con |
dc080 | 74 69 6e 75 65 3b 0a 7d 0a 24 74 61 72 67 65 74 20 3d 20 73 74 72 74 6f 6c 6f 77 65 72 28 28 73 | tinue;.}.$target.=.strtolower((s |
dc0a0 | 74 72 69 6e 67 29 20 24 74 61 72 67 65 74 29 3b 0a 24 72 65 73 5b 24 74 61 72 67 65 74 5d 20 3d | tring).$target);.$res[$target].= |
dc0c0 | 20 24 74 68 69 73 2d 3e 63 72 65 61 74 65 4c 69 6e 6b 28 24 73 6f 75 72 63 65 2c 20 24 73 6f 75 | .$this->createLink($source,.$sou |
dc0e0 | 72 63 65 56 65 72 73 69 6f 6e 2c 20 24 64 65 73 63 72 69 70 74 69 6f 6e 2c 20 24 74 61 72 67 65 | rceVersion,.$description,.$targe |
dc100 | 74 2c 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 72 65 73 3b | t,.$constraint);.}..return.$res; |
dc120 | 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 63 72 65 61 | .}.........private.function.crea |
dc140 | 74 65 4c 69 6e 6b 28 73 74 72 69 6e 67 20 24 73 6f 75 72 63 65 2c 20 73 74 72 69 6e 67 20 24 73 | teLink(string.$source,.string.$s |
dc160 | 6f 75 72 63 65 56 65 72 73 69 6f 6e 2c 20 73 74 72 69 6e 67 20 24 64 65 73 63 72 69 70 74 69 6f | ourceVersion,.string.$descriptio |
dc180 | 6e 2c 20 73 74 72 69 6e 67 20 24 74 61 72 67 65 74 2c 20 73 74 72 69 6e 67 20 24 70 72 65 74 74 | n,.string.$target,.string.$prett |
dc1a0 | 79 43 6f 6e 73 74 72 61 69 6e 74 29 3a 20 4c 69 6e 6b 0a 7b 0a 69 66 20 28 21 5c 69 73 5f 73 74 | yConstraint):.Link.{.if.(!\is_st |
dc1c0 | 72 69 6e 67 28 24 70 72 65 74 74 79 43 6f 6e 73 74 72 61 69 6e 74 29 29 20 7b 0a 74 68 72 6f 77 | ring($prettyConstraint)).{.throw |
dc1e0 | 20 6e 65 77 20 5c 55 6e 65 78 70 65 63 74 65 64 56 61 6c 75 65 45 78 63 65 70 74 69 6f 6e 28 27 | .new.\UnexpectedValueException(' |
dc200 | 4c 69 6e 6b 20 63 6f 6e 73 74 72 61 69 6e 74 20 69 6e 20 27 2e 24 73 6f 75 72 63 65 2e 27 20 27 | Link.constraint.in.'.$source.'.' |
dc220 | 2e 24 64 65 73 63 72 69 70 74 69 6f 6e 2e 27 20 3e 20 27 2e 24 74 61 72 67 65 74 2e 27 20 73 68 | .$description.'.>.'.$target.'.sh |
dc240 | 6f 75 6c 64 20 62 65 20 61 20 73 74 72 69 6e 67 2c 20 67 6f 74 20 27 2e 5c 67 65 74 74 79 70 65 | ould.be.a.string,.got.'.\gettype |
dc260 | 28 24 70 72 65 74 74 79 43 6f 6e 73 74 72 61 69 6e 74 29 20 2e 20 27 20 28 27 20 2e 20 76 61 72 | ($prettyConstraint)...'.('...var |
dc280 | 5f 65 78 70 6f 72 74 28 24 70 72 65 74 74 79 43 6f 6e 73 74 72 61 69 6e 74 2c 20 74 72 75 65 29 | _export($prettyConstraint,.true) |
dc2a0 | 20 2e 20 27 29 27 29 3b 0a 7d 0a 69 66 20 28 27 73 65 6c 66 2e 76 65 72 73 69 6f 6e 27 20 3d 3d | ...')');.}.if.('self.version'.== |
dc2c0 | 3d 20 24 70 72 65 74 74 79 43 6f 6e 73 74 72 61 69 6e 74 29 20 7b 0a 24 70 61 72 73 65 64 43 6f | =.$prettyConstraint).{.$parsedCo |
dc2e0 | 6e 73 74 72 61 69 6e 74 20 3d 20 24 74 68 69 73 2d 3e 76 65 72 73 69 6f 6e 50 61 72 73 65 72 2d | nstraint.=.$this->versionParser- |
dc300 | 3e 70 61 72 73 65 43 6f 6e 73 74 72 61 69 6e 74 73 28 24 73 6f 75 72 63 65 56 65 72 73 69 6f 6e | >parseConstraints($sourceVersion |
dc320 | 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 70 61 72 73 65 64 43 6f 6e 73 74 72 61 69 6e 74 20 3d 20 | );.}.else.{.$parsedConstraint.=. |
dc340 | 24 74 68 69 73 2d 3e 76 65 72 73 69 6f 6e 50 61 72 73 65 72 2d 3e 70 61 72 73 65 43 6f 6e 73 74 | $this->versionParser->parseConst |
dc360 | 72 61 69 6e 74 73 28 24 70 72 65 74 74 79 43 6f 6e 73 74 72 61 69 6e 74 29 3b 0a 7d 0a 0a 72 65 | raints($prettyConstraint);.}..re |
dc380 | 74 75 72 6e 20 6e 65 77 20 4c 69 6e 6b 28 24 73 6f 75 72 63 65 2c 20 24 74 61 72 67 65 74 2c 20 | turn.new.Link($source,.$target,. |
dc3a0 | 24 70 61 72 73 65 64 43 6f 6e 73 74 72 61 69 6e 74 2c 20 24 64 65 73 63 72 69 70 74 69 6f 6e 2c | $parsedConstraint,.$description, |
dc3c0 | 20 24 70 72 65 74 74 79 43 6f 6e 73 74 72 61 69 6e 74 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 | .$prettyConstraint);.}.........p |
dc3e0 | 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 42 72 61 6e 63 68 41 6c 69 61 73 28 61 72 | ublic.function.getBranchAlias(ar |
dc400 | 72 61 79 20 24 63 6f 6e 66 69 67 29 3a 20 3f 73 74 72 69 6e 67 0a 7b 0a 69 66 20 28 21 69 73 73 | ray.$config):.?string.{.if.(!iss |
dc420 | 65 74 28 24 63 6f 6e 66 69 67 5b 27 76 65 72 73 69 6f 6e 27 5d 29 20 7c 7c 20 21 69 73 5f 73 63 | et($config['version']).||.!is_sc |
dc440 | 61 6c 61 72 28 24 63 6f 6e 66 69 67 5b 27 76 65 72 73 69 6f 6e 27 5d 29 29 20 7b 0a 74 68 72 6f | alar($config['version'])).{.thro |
dc460 | 77 20 6e 65 77 20 5c 55 6e 65 78 70 65 63 74 65 64 56 61 6c 75 65 45 78 63 65 70 74 69 6f 6e 28 | w.new.\UnexpectedValueException( |
dc480 | 27 6e 6f 2f 69 6e 76 61 6c 69 64 20 76 65 72 73 69 6f 6e 20 64 65 66 69 6e 65 64 27 29 3b 0a 7d | 'no/invalid.version.defined');.} |
dc4a0 | 0a 69 66 20 28 21 69 73 5f 73 74 72 69 6e 67 28 24 63 6f 6e 66 69 67 5b 27 76 65 72 73 69 6f 6e | .if.(!is_string($config['version |
dc4c0 | 27 5d 29 29 20 7b 0a 24 63 6f 6e 66 69 67 5b 27 76 65 72 73 69 6f 6e 27 5d 20 3d 20 28 73 74 72 | '])).{.$config['version'].=.(str |
dc4e0 | 69 6e 67 29 20 24 63 6f 6e 66 69 67 5b 27 76 65 72 73 69 6f 6e 27 5d 3b 0a 7d 0a 0a 69 66 20 28 | ing).$config['version'];.}..if.( |
dc500 | 73 74 72 70 6f 73 28 24 63 6f 6e 66 69 67 5b 27 76 65 72 73 69 6f 6e 27 5d 2c 20 27 64 65 76 2d | strpos($config['version'],.'dev- |
dc520 | 27 29 20 21 3d 3d 20 30 20 26 26 20 27 2d 64 65 76 27 20 21 3d 3d 20 73 75 62 73 74 72 28 24 63 | ').!==.0.&&.'-dev'.!==.substr($c |
dc540 | 6f 6e 66 69 67 5b 27 76 65 72 73 69 6f 6e 27 5d 2c 20 2d 34 29 29 20 7b 0a 72 65 74 75 72 6e 20 | onfig['version'],.-4)).{.return. |
dc560 | 6e 75 6c 6c 3b 0a 7d 0a 0a 69 66 20 28 69 73 73 65 74 28 24 63 6f 6e 66 69 67 5b 27 65 78 74 72 | null;.}..if.(isset($config['extr |
dc580 | 61 27 5d 5b 27 62 72 61 6e 63 68 2d 61 6c 69 61 73 27 5d 29 20 26 26 20 5c 69 73 5f 61 72 72 61 | a']['branch-alias']).&&.\is_arra |
dc5a0 | 79 28 24 63 6f 6e 66 69 67 5b 27 65 78 74 72 61 27 5d 5b 27 62 72 61 6e 63 68 2d 61 6c 69 61 73 | y($config['extra']['branch-alias |
dc5c0 | 27 5d 29 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 63 6f 6e 66 69 67 5b 27 65 78 74 72 61 27 5d | '])).{.foreach.($config['extra'] |
dc5e0 | 5b 27 62 72 61 6e 63 68 2d 61 6c 69 61 73 27 5d 20 61 73 20 24 73 6f 75 72 63 65 42 72 61 6e 63 | ['branch-alias'].as.$sourceBranc |
dc600 | 68 20 3d 3e 20 24 74 61 72 67 65 74 42 72 61 6e 63 68 29 20 7b 0a 24 73 6f 75 72 63 65 42 72 61 | h.=>.$targetBranch).{.$sourceBra |
dc620 | 6e 63 68 20 3d 20 28 73 74 72 69 6e 67 29 20 24 73 6f 75 72 63 65 42 72 61 6e 63 68 3b 0a 0a 0a | nch.=.(string).$sourceBranch;... |
dc640 | 69 66 20 28 27 2d 64 65 76 27 20 21 3d 3d 20 73 75 62 73 74 72 28 24 74 61 72 67 65 74 42 72 61 | if.('-dev'.!==.substr($targetBra |
dc660 | 6e 63 68 2c 20 2d 34 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 0a 69 66 20 28 24 74 | nch,.-4)).{.continue;.}...if.($t |
dc680 | 61 72 67 65 74 42 72 61 6e 63 68 20 3d 3d 3d 20 56 65 72 73 69 6f 6e 50 61 72 73 65 72 3a 3a 44 | argetBranch.===.VersionParser::D |
dc6a0 | 45 46 41 55 4c 54 5f 42 52 41 4e 43 48 5f 41 4c 49 41 53 29 20 7b 0a 24 76 61 6c 69 64 61 74 65 | EFAULT_BRANCH_ALIAS).{.$validate |
dc6c0 | 64 54 61 72 67 65 74 42 72 61 6e 63 68 20 3d 20 56 65 72 73 69 6f 6e 50 61 72 73 65 72 3a 3a 44 | dTargetBranch.=.VersionParser::D |
dc6e0 | 45 46 41 55 4c 54 5f 42 52 41 4e 43 48 5f 41 4c 49 41 53 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 76 | EFAULT_BRANCH_ALIAS;.}.else.{.$v |
dc700 | 61 6c 69 64 61 74 65 64 54 61 72 67 65 74 42 72 61 6e 63 68 20 3d 20 24 74 68 69 73 2d 3e 76 65 | alidatedTargetBranch.=.$this->ve |
dc720 | 72 73 69 6f 6e 50 61 72 73 65 72 2d 3e 6e 6f 72 6d 61 6c 69 7a 65 42 72 61 6e 63 68 28 73 75 62 | rsionParser->normalizeBranch(sub |
dc740 | 73 74 72 28 24 74 61 72 67 65 74 42 72 61 6e 63 68 2c 20 30 2c 20 2d 34 29 29 3b 0a 7d 0a 69 66 | str($targetBranch,.0,.-4));.}.if |
dc760 | 20 28 27 2d 64 65 76 27 20 21 3d 3d 20 73 75 62 73 74 72 28 24 76 61 6c 69 64 61 74 65 64 54 61 | .('-dev'.!==.substr($validatedTa |
dc780 | 72 67 65 74 42 72 61 6e 63 68 2c 20 2d 34 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a | rgetBranch,.-4)).{.continue;.}.. |
dc7a0 | 0a 69 66 20 28 73 74 72 74 6f 6c 6f 77 65 72 28 24 63 6f 6e 66 69 67 5b 27 76 65 72 73 69 6f 6e | .if.(strtolower($config['version |
dc7c0 | 27 5d 29 20 21 3d 3d 20 73 74 72 74 6f 6c 6f 77 65 72 28 24 73 6f 75 72 63 65 42 72 61 6e 63 68 | ']).!==.strtolower($sourceBranch |
dc7e0 | 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 0a 69 66 20 28 28 24 73 6f 75 72 63 65 50 | )).{.continue;.}...if.(($sourceP |
dc800 | 72 65 66 69 78 20 3d 20 24 74 68 69 73 2d 3e 76 65 72 73 69 6f 6e 50 61 72 73 65 72 2d 3e 70 61 | refix.=.$this->versionParser->pa |
dc820 | 72 73 65 4e 75 6d 65 72 69 63 41 6c 69 61 73 50 72 65 66 69 78 28 24 73 6f 75 72 63 65 42 72 61 | rseNumericAliasPrefix($sourceBra |
dc840 | 6e 63 68 29 29 0a 26 26 20 28 24 74 61 72 67 65 74 50 72 65 66 69 78 20 3d 20 24 74 68 69 73 2d | nch)).&&.($targetPrefix.=.$this- |
dc860 | 3e 76 65 72 73 69 6f 6e 50 61 72 73 65 72 2d 3e 70 61 72 73 65 4e 75 6d 65 72 69 63 41 6c 69 61 | >versionParser->parseNumericAlia |
dc880 | 73 50 72 65 66 69 78 28 24 74 61 72 67 65 74 42 72 61 6e 63 68 29 29 0a 26 26 20 28 73 74 72 69 | sPrefix($targetBranch)).&&.(stri |
dc8a0 | 70 6f 73 28 24 74 61 72 67 65 74 50 72 65 66 69 78 2c 20 24 73 6f 75 72 63 65 50 72 65 66 69 78 | pos($targetPrefix,.$sourcePrefix |
dc8c0 | 29 20 21 3d 3d 20 30 29 0a 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 72 65 74 75 72 6e | ).!==.0).).{.continue;.}..return |
dc8e0 | 20 24 76 61 6c 69 64 61 74 65 64 54 61 72 67 65 74 42 72 61 6e 63 68 3b 0a 7d 0a 7d 0a 0a 69 66 | .$validatedTargetBranch;.}.}..if |
dc900 | 20 28 0a 69 73 73 65 74 28 24 63 6f 6e 66 69 67 5b 27 64 65 66 61 75 6c 74 2d 62 72 61 6e 63 68 | .(.isset($config['default-branch |
dc920 | 27 5d 29 0a 26 26 20 24 63 6f 6e 66 69 67 5b 27 64 65 66 61 75 6c 74 2d 62 72 61 6e 63 68 27 5d | ']).&&.$config['default-branch'] |
dc940 | 20 3d 3d 3d 20 74 72 75 65 0a 26 26 20 66 61 6c 73 65 20 3d 3d 3d 20 24 74 68 69 73 2d 3e 76 65 | .===.true.&&.false.===.$this->ve |
dc960 | 72 73 69 6f 6e 50 61 72 73 65 72 2d 3e 70 61 72 73 65 4e 75 6d 65 72 69 63 41 6c 69 61 73 50 72 | rsionParser->parseNumericAliasPr |
dc980 | 65 66 69 78 28 24 63 6f 6e 66 69 67 5b 27 76 65 72 73 69 6f 6e 27 5d 29 0a 29 20 7b 0a 72 65 74 | efix($config['version']).).{.ret |
dc9a0 | 75 72 6e 20 56 65 72 73 69 6f 6e 50 61 72 73 65 72 3a 3a 44 45 46 41 55 4c 54 5f 42 52 41 4e 43 | urn.VersionParser::DEFAULT_BRANC |
dc9c0 | 48 5f 41 4c 49 41 53 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0a 7d 0a 7d 0a 3c 3f 70 | H_ALIAS;.}..return.null;.}.}.<?p |
dc9e0 | 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a | hp.declare(strict_types=1);..... |
dca00 | 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 | .......namespace.Composer\Packag |
dca20 | 65 5c 4c 6f 61 64 65 72 3b 0a 0a 0a 0a 0a 63 6c 61 73 73 20 49 6e 76 61 6c 69 64 50 61 63 6b 61 | e\Loader;.....class.InvalidPacka |
dca40 | 67 65 45 78 63 65 70 74 69 6f 6e 20 65 78 74 65 6e 64 73 20 5c 45 78 63 65 70 74 69 6f 6e 0a 7b | geException.extends.\Exception.{ |
dca60 | 0a 0a 70 72 69 76 61 74 65 20 24 65 72 72 6f 72 73 3b 0a 0a 70 72 69 76 61 74 65 20 24 77 61 72 | ..private.$errors;..private.$war |
dca80 | 6e 69 6e 67 73 3b 0a 0a 70 72 69 76 61 74 65 20 24 64 61 74 61 3b 0a 0a 0a 0a 0a 0a 0a 70 75 62 | nings;..private.$data;.......pub |
dcaa0 | 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 61 72 72 61 79 20 24 | lic.function.__construct(array.$ |
dcac0 | 65 72 72 6f 72 73 2c 20 61 72 72 61 79 20 24 77 61 72 6e 69 6e 67 73 2c 20 61 72 72 61 79 20 24 | errors,.array.$warnings,.array.$ |
dcae0 | 64 61 74 61 29 0a 7b 0a 24 74 68 69 73 2d 3e 65 72 72 6f 72 73 20 3d 20 24 65 72 72 6f 72 73 3b | data).{.$this->errors.=.$errors; |
dcb00 | 0a 24 74 68 69 73 2d 3e 77 61 72 6e 69 6e 67 73 20 3d 20 24 77 61 72 6e 69 6e 67 73 3b 0a 24 74 | .$this->warnings.=.$warnings;.$t |
dcb20 | 68 69 73 2d 3e 64 61 74 61 20 3d 20 24 64 61 74 61 3b 0a 70 61 72 65 6e 74 3a 3a 5f 5f 63 6f 6e | his->data.=.$data;.parent::__con |
dcb40 | 73 74 72 75 63 74 28 22 49 6e 76 61 6c 69 64 20 70 61 63 6b 61 67 65 20 69 6e 66 6f 72 6d 61 74 | struct("Invalid.package.informat |
dcb60 | 69 6f 6e 3a 20 5c 6e 22 2e 69 6d 70 6c 6f 64 65 28 22 5c 6e 22 2c 20 61 72 72 61 79 5f 6d 65 72 | ion:.\n".implode("\n",.array_mer |
dcb80 | 67 65 28 24 65 72 72 6f 72 73 2c 20 24 77 61 72 6e 69 6e 67 73 29 29 29 3b 0a 7d 0a 0a 0a 0a 0a | ge($errors,.$warnings)));.}..... |
dcba0 | 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 44 61 74 61 28 29 3a 20 61 72 72 61 79 | public.function.getData():.array |
dcbc0 | 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 64 61 74 61 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 | .{.return.$this->data;.}.....pub |
dcbe0 | 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 45 72 72 6f 72 73 28 29 3a 20 61 72 72 61 79 0a | lic.function.getErrors():.array. |
dcc00 | 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 65 72 72 6f 72 73 3b 0a 7d 0a 0a 0a 0a 0a 70 75 | {.return.$this->errors;.}.....pu |
dcc20 | 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 57 61 72 6e 69 6e 67 73 28 29 3a 20 61 72 72 | blic.function.getWarnings():.arr |
dcc40 | 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 77 61 72 6e 69 6e 67 73 3b 0a 7d 0a 7d | ay.{.return.$this->warnings;.}.} |
dcc60 | 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a | .<?php.declare(strict_types=1);. |
dcc80 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 | ...........namespace.Composer\Pa |
dcca0 | 63 6b 61 67 65 5c 4c 6f 61 64 65 72 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 4a 73 6f 6e | ckage\Loader;..use.Composer\Json |
dccc0 | 5c 4a 73 6f 6e 46 69 6c 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c | \JsonFile;.use.Composer\Package\ |
dcce0 | 42 61 73 65 50 61 63 6b 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 | BasePackage;.use.Composer\Packag |
dcd00 | 65 5c 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c | e\CompletePackage;.use.Composer\ |
dcd20 | 50 61 63 6b 61 67 65 5c 43 6f 6d 70 6c 65 74 65 41 6c 69 61 73 50 61 63 6b 61 67 65 3b 0a 75 73 | Package\CompleteAliasPackage;.us |
dcd40 | 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 52 6f 6f 74 50 61 63 6b 61 67 65 3b 0a | e.Composer\Package\RootPackage;. |
dcd60 | 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 52 6f 6f 74 41 6c 69 61 73 50 61 | use.Composer\Package\RootAliasPa |
dcd80 | 63 6b 61 67 65 3b 0a 0a 0a 0a 0a 63 6c 61 73 73 20 4a 73 6f 6e 4c 6f 61 64 65 72 0a 7b 0a 0a 70 | ckage;.....class.JsonLoader.{..p |
dcda0 | 72 69 76 61 74 65 20 24 6c 6f 61 64 65 72 3b 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e | rivate.$loader;..public.function |
dcdc0 | 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 4c 6f 61 64 65 72 49 6e 74 65 72 66 61 63 65 20 24 6c 6f | .__construct(LoaderInterface.$lo |
dcde0 | 61 64 65 72 29 0a 7b 0a 24 74 68 69 73 2d 3e 6c 6f 61 64 65 72 20 3d 20 24 6c 6f 61 64 65 72 3b | ader).{.$this->loader.=.$loader; |
dce00 | 0a 7d 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 6c 6f 61 64 28 24 6a 73 | .}......public.function.load($js |
dce20 | 6f 6e 29 3a 20 42 61 73 65 50 61 63 6b 61 67 65 0a 7b 0a 69 66 20 28 24 6a 73 6f 6e 20 69 6e 73 | on):.BasePackage.{.if.($json.ins |
dce40 | 74 61 6e 63 65 6f 66 20 4a 73 6f 6e 46 69 6c 65 29 20 7b 0a 24 63 6f 6e 66 69 67 20 3d 20 24 6a | tanceof.JsonFile).{.$config.=.$j |
dce60 | 73 6f 6e 2d 3e 72 65 61 64 28 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 66 69 6c 65 5f 65 78 69 73 | son->read();.}.elseif.(file_exis |
dce80 | 74 73 28 24 6a 73 6f 6e 29 29 20 7b 0a 24 63 6f 6e 66 69 67 20 3d 20 4a 73 6f 6e 46 69 6c 65 3a | ts($json)).{.$config.=.JsonFile: |
dcea0 | 3a 70 61 72 73 65 4a 73 6f 6e 28 66 69 6c 65 5f 67 65 74 5f 63 6f 6e 74 65 6e 74 73 28 24 6a 73 | :parseJson(file_get_contents($js |
dcec0 | 6f 6e 29 2c 20 24 6a 73 6f 6e 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 69 73 5f 73 74 72 69 6e 67 | on),.$json);.}.elseif.(is_string |
dcee0 | 28 24 6a 73 6f 6e 29 29 20 7b 0a 24 63 6f 6e 66 69 67 20 3d 20 4a 73 6f 6e 46 69 6c 65 3a 3a 70 | ($json)).{.$config.=.JsonFile::p |
dcf00 | 61 72 73 65 4a 73 6f 6e 28 24 6a 73 6f 6e 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 74 68 72 6f 77 20 | arseJson($json);.}.else.{.throw. |
dcf20 | 6e 65 77 20 5c 49 6e 76 61 6c 69 64 41 72 67 75 6d 65 6e 74 45 78 63 65 70 74 69 6f 6e 28 73 70 | new.\InvalidArgumentException(sp |
dcf40 | 72 69 6e 74 66 28 0a 22 4a 73 6f 6e 4c 6f 61 64 65 72 3a 20 55 6e 6b 6e 6f 77 6e 20 5c 24 6a 73 | rintf(."JsonLoader:.Unknown.\$js |
dcf60 | 6f 6e 20 70 61 72 61 6d 65 74 65 72 20 25 73 2e 20 50 6c 65 61 73 65 20 72 65 70 6f 72 74 20 61 | on.parameter.%s..Please.report.a |
dcf80 | 74 20 68 74 74 70 73 3a 2f 2f 67 69 74 68 75 62 2e 63 6f 6d 2f 63 6f 6d 70 6f 73 65 72 2f 63 6f | t.https://github.com/composer/co |
dcfa0 | 6d 70 6f 73 65 72 2f 69 73 73 75 65 73 2f 6e 65 77 2e 22 2c 0a 67 65 74 74 79 70 65 28 24 6a 73 | mposer/issues/new.",.gettype($js |
dcfc0 | 6f 6e 29 0a 29 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 6c 6f 61 64 65 72 2d | on).));.}..return.$this->loader- |
dcfe0 | 3e 6c 6f 61 64 28 24 63 6f 6e 66 69 67 29 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 | >load($config);.}.}.<?php.declar |
dd000 | 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 | e(strict_types=1);............na |
dd020 | 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 4c 6f 61 64 65 72 3b | mespace.Composer\Package\Loader; |
dd040 | 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 43 6f 6d 70 6c 65 74 65 50 | ..use.Composer\Package\CompleteP |
dd060 | 61 63 6b 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 43 6f 6d | ackage;.use.Composer\Package\Com |
dd080 | 70 6c 65 74 65 41 6c 69 61 73 50 61 63 6b 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c | pleteAliasPackage;.use.Composer\ |
dd0a0 | 50 61 63 6b 61 67 65 5c 52 6f 6f 74 41 6c 69 61 73 50 61 63 6b 61 67 65 3b 0a 75 73 65 20 43 6f | Package\RootAliasPackage;.use.Co |
dd0c0 | 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 52 6f 6f 74 50 61 63 6b 61 67 65 3b 0a 75 73 65 20 | mposer\Package\RootPackage;.use. |
dd0e0 | 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 42 61 73 65 50 61 63 6b 61 67 65 3b 0a 0a 0a | Composer\Package\BasePackage;... |
dd100 | 0a 0a 0a 0a 69 6e 74 65 72 66 61 63 65 20 4c 6f 61 64 65 72 49 6e 74 65 72 66 61 63 65 0a 7b 0a | ....interface.LoaderInterface.{. |
dd120 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 6c 6f 61 64 28 61 | ..........public.function.load(a |
dd140 | 72 72 61 79 20 24 63 6f 6e 66 69 67 2c 20 73 74 72 69 6e 67 20 24 63 6c 61 73 73 20 3d 20 27 43 | rray.$config,.string.$class.=.'C |
dd160 | 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 27 | omposer\Package\CompletePackage' |
dd180 | 29 3a 20 42 61 73 65 50 61 63 6b 61 67 65 3b 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 | ):.BasePackage;.}.<?php.declare( |
dd1a0 | 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 | strict_types=1);............name |
dd1c0 | 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 4c 6f 61 64 65 72 3b 0a 0a | space.Composer\Package\Loader;.. |
dd1e0 | 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 42 61 73 65 50 61 63 6b 61 67 65 | use.Composer\Package\BasePackage |
dd200 | 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 66 69 67 3b 0a 75 73 65 20 43 6f 6d 70 6f | ;.use.Composer\Config;.use.Compo |
dd220 | 73 65 72 5c 49 4f 5c 49 4f 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 | ser\IO\IOInterface;.use.Composer |
dd240 | 5c 50 61 63 6b 61 67 65 5c 52 6f 6f 74 41 6c 69 61 73 50 61 63 6b 61 67 65 3b 0a 75 73 65 20 43 | \Package\RootAliasPackage;.use.C |
dd260 | 6f 6d 70 6f 73 65 72 5c 50 63 72 65 5c 50 72 65 67 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c | omposer\Pcre\Preg;.use.Composer\ |
dd280 | 52 65 70 6f 73 69 74 6f 72 79 5c 52 65 70 6f 73 69 74 6f 72 79 46 61 63 74 6f 72 79 3b 0a 75 73 | Repository\RepositoryFactory;.us |
dd2a0 | 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 56 65 72 73 69 6f 6e 5c 56 65 72 73 69 | e.Composer\Package\Version\Versi |
dd2c0 | 6f 6e 47 75 65 73 73 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c | onGuesser;.use.Composer\Package\ |
dd2e0 | 56 65 72 73 69 6f 6e 5c 56 65 72 73 69 6f 6e 50 61 72 73 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f | Version\VersionParser;.use.Compo |
dd300 | 73 65 72 5c 50 61 63 6b 61 67 65 5c 52 6f 6f 74 50 61 63 6b 61 67 65 3b 0a 75 73 65 20 43 6f 6d | ser\Package\RootPackage;.use.Com |
dd320 | 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 52 65 70 6f 73 69 74 6f 72 79 4d 61 6e 61 67 | poser\Repository\RepositoryManag |
dd340 | 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 6c 61 74 66 6f 72 6d 3b 0a | er;.use.Composer\Util\Platform;. |
dd360 | 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f | use.Composer\Util\ProcessExecuto |
dd380 | 72 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 52 6f 6f 74 50 61 63 6b 61 67 65 4c 6f 61 64 | r;.........class.RootPackageLoad |
dd3a0 | 65 72 20 65 78 74 65 6e 64 73 20 41 72 72 61 79 4c 6f 61 64 65 72 0a 7b 0a 0a 0a 0a 70 72 69 76 | er.extends.ArrayLoader.{....priv |
dd3c0 | 61 74 65 20 24 6d 61 6e 61 67 65 72 3b 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 63 6f 6e 66 69 | ate.$manager;.....private.$confi |
dd3e0 | 67 3b 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 76 65 72 73 69 6f 6e 47 75 65 73 73 65 72 3b 0a | g;.....private.$versionGuesser;. |
dd400 | 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 52 65 70 | .public.function.__construct(Rep |
dd420 | 6f 73 69 74 6f 72 79 4d 61 6e 61 67 65 72 20 24 6d 61 6e 61 67 65 72 2c 20 43 6f 6e 66 69 67 20 | ositoryManager.$manager,.Config. |
dd440 | 24 63 6f 6e 66 69 67 2c 20 3f 56 65 72 73 69 6f 6e 50 61 72 73 65 72 20 24 70 61 72 73 65 72 20 | $config,.?VersionParser.$parser. |
dd460 | 3d 20 6e 75 6c 6c 2c 20 3f 56 65 72 73 69 6f 6e 47 75 65 73 73 65 72 20 24 76 65 72 73 69 6f 6e | =.null,.?VersionGuesser.$version |
dd480 | 47 75 65 73 73 65 72 20 3d 20 6e 75 6c 6c 2c 20 3f 49 4f 49 6e 74 65 72 66 61 63 65 20 24 69 6f | Guesser.=.null,.?IOInterface.$io |
dd4a0 | 20 3d 20 6e 75 6c 6c 29 0a 7b 0a 70 61 72 65 6e 74 3a 3a 5f 5f 63 6f 6e 73 74 72 75 63 74 28 24 | .=.null).{.parent::__construct($ |
dd4c0 | 70 61 72 73 65 72 29 3b 0a 0a 24 74 68 69 73 2d 3e 6d 61 6e 61 67 65 72 20 3d 20 24 6d 61 6e 61 | parser);..$this->manager.=.$mana |
dd4e0 | 67 65 72 3b 0a 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 20 3d 20 24 63 6f 6e 66 69 67 3b 0a 24 74 | ger;.$this->config.=.$config;.$t |
dd500 | 68 69 73 2d 3e 76 65 72 73 69 6f 6e 47 75 65 73 73 65 72 20 3d 20 24 76 65 72 73 69 6f 6e 47 75 | his->versionGuesser.=.$versionGu |
dd520 | 65 73 73 65 72 20 3f 3a 20 6e 65 77 20 56 65 72 73 69 6f 6e 47 75 65 73 73 65 72 28 24 63 6f 6e | esser.?:.new.VersionGuesser($con |
dd540 | 66 69 67 2c 20 6e 65 77 20 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 28 24 69 6f 29 2c 20 24 | fig,.new.ProcessExecutor($io),.$ |
dd560 | 74 68 69 73 2d 3e 76 65 72 73 69 6f 6e 50 61 72 73 65 72 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a | this->versionParser);.}......... |
dd580 | 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 6c 6f 61 64 28 61 72 72 61 79 20 24 63 6f 6e | .public.function.load(array.$con |
dd5a0 | 66 69 67 2c 20 73 74 72 69 6e 67 20 24 63 6c 61 73 73 20 3d 20 27 43 6f 6d 70 6f 73 65 72 5c 50 | fig,.string.$class.=.'Composer\P |
dd5c0 | 61 63 6b 61 67 65 5c 52 6f 6f 74 50 61 63 6b 61 67 65 27 2c 20 3f 73 74 72 69 6e 67 20 24 63 77 | ackage\RootPackage',.?string.$cw |
dd5e0 | 64 20 3d 20 6e 75 6c 6c 29 3a 20 42 61 73 65 50 61 63 6b 61 67 65 0a 7b 0a 69 66 20 28 24 63 6c | d.=.null):.BasePackage.{.if.($cl |
dd600 | 61 73 73 20 21 3d 3d 20 27 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 52 6f 6f 74 50 61 | ass.!==.'Composer\Package\RootPa |
dd620 | 63 6b 61 67 65 27 29 20 7b 0a 74 72 69 67 67 65 72 5f 65 72 72 6f 72 28 27 54 68 65 20 24 63 6c | ckage').{.trigger_error('The.$cl |
dd640 | 61 73 73 20 61 72 67 20 69 73 20 64 65 70 72 65 63 61 74 65 64 2c 20 70 6c 65 61 73 65 20 72 65 | ass.arg.is.deprecated,.please.re |
dd660 | 61 63 68 20 6f 75 74 20 74 6f 20 43 6f 6d 70 6f 73 65 72 20 6d 61 69 6e 74 61 69 6e 65 72 73 20 | ach.out.to.Composer.maintainers. |
dd680 | 41 53 41 50 20 69 66 20 79 6f 75 20 73 74 69 6c 6c 20 6e 65 65 64 20 74 68 69 73 2e 27 2c 20 45 | ASAP.if.you.still.need.this.',.E |
dd6a0 | 5f 55 53 45 52 5f 44 45 50 52 45 43 41 54 45 44 29 3b 0a 7d 0a 0a 69 66 20 28 21 69 73 73 65 74 | _USER_DEPRECATED);.}..if.(!isset |
dd6c0 | 28 24 63 6f 6e 66 69 67 5b 27 6e 61 6d 65 27 5d 29 29 20 7b 0a 24 63 6f 6e 66 69 67 5b 27 6e 61 | ($config['name'])).{.$config['na |
dd6e0 | 6d 65 27 5d 20 3d 20 27 5f 5f 72 6f 6f 74 5f 5f 27 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 65 72 | me'].=.'__root__';.}.elseif.($er |
dd700 | 72 20 3d 20 56 61 6c 69 64 61 74 69 6e 67 41 72 72 61 79 4c 6f 61 64 65 72 3a 3a 68 61 73 50 61 | r.=.ValidatingArrayLoader::hasPa |
dd720 | 63 6b 61 67 65 4e 61 6d 69 6e 67 45 72 72 6f 72 28 24 63 6f 6e 66 69 67 5b 27 6e 61 6d 65 27 5d | ckageNamingError($config['name'] |
dd740 | 29 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e | )).{.throw.new.\RuntimeException |
dd760 | 28 27 59 6f 75 72 20 70 61 63 6b 61 67 65 20 6e 61 6d 65 20 27 2e 24 65 72 72 29 3b 0a 7d 0a 24 | ('Your.package.name.'.$err);.}.$ |
dd780 | 61 75 74 6f 56 65 72 73 69 6f 6e 65 64 20 3d 20 66 61 6c 73 65 3b 0a 69 66 20 28 21 69 73 73 65 | autoVersioned.=.false;.if.(!isse |
dd7a0 | 74 28 24 63 6f 6e 66 69 67 5b 27 76 65 72 73 69 6f 6e 27 5d 29 29 20 7b 0a 24 63 6f 6d 6d 69 74 | t($config['version'])).{.$commit |
dd7c0 | 20 3d 20 6e 75 6c 6c 3b 0a 0a 0a 69 66 20 28 50 6c 61 74 66 6f 72 6d 3a 3a 67 65 74 45 6e 76 28 | .=.null;...if.(Platform::getEnv( |
dd7e0 | 27 43 4f 4d 50 4f 53 45 52 5f 52 4f 4f 54 5f 56 45 52 53 49 4f 4e 27 29 29 20 7b 0a 24 63 6f 6e | 'COMPOSER_ROOT_VERSION')).{.$con |
dd800 | 66 69 67 5b 27 76 65 72 73 69 6f 6e 27 5d 20 3d 20 50 6c 61 74 66 6f 72 6d 3a 3a 67 65 74 45 6e | fig['version'].=.Platform::getEn |
dd820 | 76 28 27 43 4f 4d 50 4f 53 45 52 5f 52 4f 4f 54 5f 56 45 52 53 49 4f 4e 27 29 3b 0a 7d 20 65 6c | v('COMPOSER_ROOT_VERSION');.}.el |
dd840 | 73 65 20 7b 0a 24 76 65 72 73 69 6f 6e 44 61 74 61 20 3d 20 24 74 68 69 73 2d 3e 76 65 72 73 69 | se.{.$versionData.=.$this->versi |
dd860 | 6f 6e 47 75 65 73 73 65 72 2d 3e 67 75 65 73 73 56 65 72 73 69 6f 6e 28 24 63 6f 6e 66 69 67 2c | onGuesser->guessVersion($config, |
dd880 | 20 24 63 77 64 20 3f 3f 20 50 6c 61 74 66 6f 72 6d 3a 3a 67 65 74 43 77 64 28 74 72 75 65 29 29 | .$cwd.??.Platform::getCwd(true)) |
dd8a0 | 3b 0a 69 66 20 28 24 76 65 72 73 69 6f 6e 44 61 74 61 29 20 7b 0a 24 63 6f 6e 66 69 67 5b 27 76 | ;.if.($versionData).{.$config['v |
dd8c0 | 65 72 73 69 6f 6e 27 5d 20 3d 20 24 76 65 72 73 69 6f 6e 44 61 74 61 5b 27 70 72 65 74 74 79 5f | ersion'].=.$versionData['pretty_ |
dd8e0 | 76 65 72 73 69 6f 6e 27 5d 3b 0a 24 63 6f 6e 66 69 67 5b 27 76 65 72 73 69 6f 6e 5f 6e 6f 72 6d | version'];.$config['version_norm |
dd900 | 61 6c 69 7a 65 64 27 5d 20 3d 20 24 76 65 72 73 69 6f 6e 44 61 74 61 5b 27 76 65 72 73 69 6f 6e | alized'].=.$versionData['version |
dd920 | 27 5d 3b 0a 24 63 6f 6d 6d 69 74 20 3d 20 24 76 65 72 73 69 6f 6e 44 61 74 61 5b 27 63 6f 6d 6d | '];.$commit.=.$versionData['comm |
dd940 | 69 74 27 5d 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 21 69 73 73 65 74 28 24 63 6f 6e 66 69 67 5b 27 76 | it'];.}.}..if.(!isset($config['v |
dd960 | 65 72 73 69 6f 6e 27 5d 29 29 20 7b 0a 24 63 6f 6e 66 69 67 5b 27 76 65 72 73 69 6f 6e 27 5d 20 | ersion'])).{.$config['version']. |
dd980 | 3d 20 27 31 2e 30 2e 30 27 3b 0a 24 61 75 74 6f 56 65 72 73 69 6f 6e 65 64 20 3d 20 74 72 75 65 | =.'1.0.0';.$autoVersioned.=.true |
dd9a0 | 3b 0a 7d 0a 0a 69 66 20 28 24 63 6f 6d 6d 69 74 29 20 7b 0a 24 63 6f 6e 66 69 67 5b 27 73 6f 75 | ;.}..if.($commit).{.$config['sou |
dd9c0 | 72 63 65 27 5d 20 3d 20 5b 0a 27 74 79 70 65 27 20 3d 3e 20 27 27 2c 0a 27 75 72 6c 27 20 3d 3e | rce'].=.[.'type'.=>.'',.'url'.=> |
dd9e0 | 20 27 27 2c 0a 27 72 65 66 65 72 65 6e 63 65 27 20 3d 3e 20 24 63 6f 6d 6d 69 74 2c 0a 5d 3b 0a | .'',.'reference'.=>.$commit,.];. |
dda00 | 24 63 6f 6e 66 69 67 5b 27 64 69 73 74 27 5d 20 3d 20 5b 0a 27 74 79 70 65 27 20 3d 3e 20 27 27 | $config['dist'].=.[.'type'.=>.'' |
dda20 | 2c 0a 27 75 72 6c 27 20 3d 3e 20 27 27 2c 0a 27 72 65 66 65 72 65 6e 63 65 27 20 3d 3e 20 24 63 | ,.'url'.=>.'',.'reference'.=>.$c |
dda40 | 6f 6d 6d 69 74 2c 0a 5d 3b 0a 7d 0a 7d 0a 0a 0a 24 70 61 63 6b 61 67 65 20 3d 20 70 61 72 65 6e | ommit,.];.}.}...$package.=.paren |
dda60 | 74 3a 3a 6c 6f 61 64 28 24 63 6f 6e 66 69 67 2c 20 24 63 6c 61 73 73 29 3b 0a 69 66 20 28 24 70 | t::load($config,.$class);.if.($p |
dda80 | 61 63 6b 61 67 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 52 6f 6f 74 41 6c 69 61 73 50 61 63 6b 61 | ackage.instanceof.RootAliasPacka |
ddaa0 | 67 65 29 20 7b 0a 24 72 65 61 6c 50 61 63 6b 61 67 65 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 | ge).{.$realPackage.=.$package->g |
ddac0 | 65 74 41 6c 69 61 73 4f 66 28 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 72 65 61 6c 50 61 63 6b 61 | etAliasOf();.}.else.{.$realPacka |
ddae0 | 67 65 20 3d 20 24 70 61 63 6b 61 67 65 3b 0a 7d 0a 0a 69 66 20 28 21 24 72 65 61 6c 50 61 63 6b | ge.=.$package;.}..if.(!$realPack |
ddb00 | 61 67 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 52 6f 6f 74 50 61 63 6b 61 67 65 29 20 7b 0a 74 68 | age.instanceof.RootPackage).{.th |
ddb20 | 72 6f 77 20 6e 65 77 20 5c 4c 6f 67 69 63 45 78 63 65 70 74 69 6f 6e 28 27 45 78 70 65 63 74 69 | row.new.\LogicException('Expecti |
ddb40 | 6e 67 20 61 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 52 6f 6f 74 50 61 63 6b 61 67 | ng.a.Composer\Package\RootPackag |
ddb60 | 65 20 61 74 20 74 68 69 73 20 70 6f 69 6e 74 27 29 3b 0a 7d 0a 0a 69 66 20 28 24 61 75 74 6f 56 | e.at.this.point');.}..if.($autoV |
ddb80 | 65 72 73 69 6f 6e 65 64 29 20 7b 0a 24 72 65 61 6c 50 61 63 6b 61 67 65 2d 3e 72 65 70 6c 61 63 | ersioned).{.$realPackage->replac |
ddba0 | 65 56 65 72 73 69 6f 6e 28 24 72 65 61 6c 50 61 63 6b 61 67 65 2d 3e 67 65 74 56 65 72 73 69 6f | eVersion($realPackage->getVersio |
ddbc0 | 6e 28 29 2c 20 52 6f 6f 74 50 61 63 6b 61 67 65 3a 3a 44 45 46 41 55 4c 54 5f 50 52 45 54 54 59 | n(),.RootPackage::DEFAULT_PRETTY |
ddbe0 | 5f 56 45 52 53 49 4f 4e 29 3b 0a 7d 0a 0a 69 66 20 28 69 73 73 65 74 28 24 63 6f 6e 66 69 67 5b | _VERSION);.}..if.(isset($config[ |
ddc00 | 27 6d 69 6e 69 6d 75 6d 2d 73 74 61 62 69 6c 69 74 79 27 5d 29 29 20 7b 0a 24 72 65 61 6c 50 61 | 'minimum-stability'])).{.$realPa |
ddc20 | 63 6b 61 67 65 2d 3e 73 65 74 4d 69 6e 69 6d 75 6d 53 74 61 62 69 6c 69 74 79 28 56 65 72 73 69 | ckage->setMinimumStability(Versi |
ddc40 | 6f 6e 50 61 72 73 65 72 3a 3a 6e 6f 72 6d 61 6c 69 7a 65 53 74 61 62 69 6c 69 74 79 28 24 63 6f | onParser::normalizeStability($co |
ddc60 | 6e 66 69 67 5b 27 6d 69 6e 69 6d 75 6d 2d 73 74 61 62 69 6c 69 74 79 27 5d 29 29 3b 0a 7d 0a 0a | nfig['minimum-stability']));.}.. |
ddc80 | 24 61 6c 69 61 73 65 73 20 3d 20 5b 5d 3b 0a 24 73 74 61 62 69 6c 69 74 79 46 6c 61 67 73 20 3d | $aliases.=.[];.$stabilityFlags.= |
ddca0 | 20 5b 5d 3b 0a 24 72 65 66 65 72 65 6e 63 65 73 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 | .[];.$references.=.[];.foreach.( |
ddcc0 | 5b 27 72 65 71 75 69 72 65 27 2c 20 27 72 65 71 75 69 72 65 2d 64 65 76 27 5d 20 61 73 20 24 6c | ['require',.'require-dev'].as.$l |
ddce0 | 69 6e 6b 54 79 70 65 29 20 7b 0a 69 66 20 28 69 73 73 65 74 28 24 63 6f 6e 66 69 67 5b 24 6c 69 | inkType).{.if.(isset($config[$li |
ddd00 | 6e 6b 54 79 70 65 5d 29 29 20 7b 0a 24 6c 69 6e 6b 49 6e 66 6f 20 3d 20 42 61 73 65 50 61 63 6b | nkType])).{.$linkInfo.=.BasePack |
ddd20 | 61 67 65 3a 3a 24 73 75 70 70 6f 72 74 65 64 4c 69 6e 6b 54 79 70 65 73 5b 24 6c 69 6e 6b 54 79 | age::$supportedLinkTypes[$linkTy |
ddd40 | 70 65 5d 3b 0a 24 6d 65 74 68 6f 64 20 3d 20 27 67 65 74 27 2e 75 63 66 69 72 73 74 28 24 6c 69 | pe];.$method.=.'get'.ucfirst($li |
ddd60 | 6e 6b 49 6e 66 6f 5b 27 6d 65 74 68 6f 64 27 5d 29 3b 0a 24 6c 69 6e 6b 73 20 3d 20 5b 5d 3b 0a | nkInfo['method']);.$links.=.[];. |
ddd80 | 66 6f 72 65 61 63 68 20 28 24 72 65 61 6c 50 61 63 6b 61 67 65 2d 3e 7b 24 6d 65 74 68 6f 64 7d | foreach.($realPackage->{$method} |
ddda0 | 28 29 20 61 73 20 24 6c 69 6e 6b 29 20 7b 0a 24 6c 69 6e 6b 73 5b 24 6c 69 6e 6b 2d 3e 67 65 74 | ().as.$link).{.$links[$link->get |
dddc0 | 54 61 72 67 65 74 28 29 5d 20 3d 20 24 6c 69 6e 6b 2d 3e 67 65 74 43 6f 6e 73 74 72 61 69 6e 74 | Target()].=.$link->getConstraint |
ddde0 | 28 29 2d 3e 67 65 74 50 72 65 74 74 79 53 74 72 69 6e 67 28 29 3b 0a 7d 0a 24 61 6c 69 61 73 65 | ()->getPrettyString();.}.$aliase |
dde00 | 73 20 3d 20 24 74 68 69 73 2d 3e 65 78 74 72 61 63 74 41 6c 69 61 73 65 73 28 24 6c 69 6e 6b 73 | s.=.$this->extractAliases($links |
dde20 | 2c 20 24 61 6c 69 61 73 65 73 29 3b 0a 24 73 74 61 62 69 6c 69 74 79 46 6c 61 67 73 20 3d 20 73 | ,.$aliases);.$stabilityFlags.=.s |
dde40 | 65 6c 66 3a 3a 65 78 74 72 61 63 74 53 74 61 62 69 6c 69 74 79 46 6c 61 67 73 28 24 6c 69 6e 6b | elf::extractStabilityFlags($link |
dde60 | 73 2c 20 24 72 65 61 6c 50 61 63 6b 61 67 65 2d 3e 67 65 74 4d 69 6e 69 6d 75 6d 53 74 61 62 69 | s,.$realPackage->getMinimumStabi |
dde80 | 6c 69 74 79 28 29 2c 20 24 73 74 61 62 69 6c 69 74 79 46 6c 61 67 73 29 3b 0a 24 72 65 66 65 72 | lity(),.$stabilityFlags);.$refer |
ddea0 | 65 6e 63 65 73 20 3d 20 73 65 6c 66 3a 3a 65 78 74 72 61 63 74 52 65 66 65 72 65 6e 63 65 73 28 | ences.=.self::extractReferences( |
ddec0 | 24 6c 69 6e 6b 73 2c 20 24 72 65 66 65 72 65 6e 63 65 73 29 3b 0a 0a 69 66 20 28 69 73 73 65 74 | $links,.$references);..if.(isset |
ddee0 | 28 24 6c 69 6e 6b 73 5b 24 63 6f 6e 66 69 67 5b 27 6e 61 6d 65 27 5d 5d 29 29 20 7b 0a 74 68 72 | ($links[$config['name']])).{.thr |
ddf00 | 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 73 70 72 69 6e 74 66 | ow.new.\RuntimeException(sprintf |
ddf20 | 28 27 52 6f 6f 74 20 70 61 63 6b 61 67 65 20 5c 27 25 73 5c 27 20 63 61 6e 6e 6f 74 20 72 65 71 | ('Root.package.\'%s\'.cannot.req |
ddf40 | 75 69 72 65 20 69 74 73 65 6c 66 20 69 6e 20 69 74 73 20 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f 6e | uire.itself.in.its.composer.json |
ddf60 | 27 20 2e 20 50 48 50 5f 45 4f 4c 20 2e 0a 27 44 69 64 20 79 6f 75 20 61 63 63 69 64 65 6e 74 61 | '...PHP_EOL...'Did.you.accidenta |
ddf80 | 6c 6c 79 20 6e 61 6d 65 20 79 6f 75 72 20 72 6f 6f 74 20 70 61 63 6b 61 67 65 20 61 66 74 65 72 | lly.name.your.root.package.after |
ddfa0 | 20 61 6e 20 65 78 74 65 72 6e 61 6c 20 70 61 63 6b 61 67 65 3f 27 2c 20 24 63 6f 6e 66 69 67 5b | .an.external.package?',.$config[ |
ddfc0 | 27 6e 61 6d 65 27 5d 29 29 3b 0a 7d 0a 7d 0a 7d 0a 0a 66 6f 72 65 61 63 68 20 28 61 72 72 61 79 | 'name']));.}.}.}..foreach.(array |
ddfe0 | 5f 6b 65 79 73 28 42 61 73 65 50 61 63 6b 61 67 65 3a 3a 24 73 75 70 70 6f 72 74 65 64 4c 69 6e | _keys(BasePackage::$supportedLin |
de000 | 6b 54 79 70 65 73 29 20 61 73 20 24 6c 69 6e 6b 54 79 70 65 29 20 7b 0a 69 66 20 28 69 73 73 65 | kTypes).as.$linkType).{.if.(isse |
de020 | 74 28 24 63 6f 6e 66 69 67 5b 24 6c 69 6e 6b 54 79 70 65 5d 29 29 20 7b 0a 66 6f 72 65 61 63 68 | t($config[$linkType])).{.foreach |
de040 | 20 28 24 63 6f 6e 66 69 67 5b 24 6c 69 6e 6b 54 79 70 65 5d 20 61 73 20 24 6c 69 6e 6b 4e 61 6d | .($config[$linkType].as.$linkNam |
de060 | 65 20 3d 3e 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 20 7b 0a 69 66 20 28 24 65 72 72 20 3d 20 56 | e.=>.$constraint).{.if.($err.=.V |
de080 | 61 6c 69 64 61 74 69 6e 67 41 72 72 61 79 4c 6f 61 64 65 72 3a 3a 68 61 73 50 61 63 6b 61 67 65 | alidatingArrayLoader::hasPackage |
de0a0 | 4e 61 6d 69 6e 67 45 72 72 6f 72 28 24 6c 69 6e 6b 4e 61 6d 65 2c 20 74 72 75 65 29 29 20 7b 0a | NamingError($linkName,.true)).{. |
de0c0 | 74 68 72 6f 77 20 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 24 6c 69 6e | throw.new.\RuntimeException($lin |
de0e0 | 6b 54 79 70 65 2e 27 2e 27 2e 24 65 72 72 29 3b 0a 7d 0a 7d 0a 7d 0a 7d 0a 0a 24 72 65 61 6c 50 | kType.'.'.$err);.}.}.}.}..$realP |
de100 | 61 63 6b 61 67 65 2d 3e 73 65 74 41 6c 69 61 73 65 73 28 24 61 6c 69 61 73 65 73 29 3b 0a 24 72 | ackage->setAliases($aliases);.$r |
de120 | 65 61 6c 50 61 63 6b 61 67 65 2d 3e 73 65 74 53 74 61 62 69 6c 69 74 79 46 6c 61 67 73 28 24 73 | ealPackage->setStabilityFlags($s |
de140 | 74 61 62 69 6c 69 74 79 46 6c 61 67 73 29 3b 0a 24 72 65 61 6c 50 61 63 6b 61 67 65 2d 3e 73 65 | tabilityFlags);.$realPackage->se |
de160 | 74 52 65 66 65 72 65 6e 63 65 73 28 24 72 65 66 65 72 65 6e 63 65 73 29 3b 0a 0a 69 66 20 28 69 | tReferences($references);..if.(i |
de180 | 73 73 65 74 28 24 63 6f 6e 66 69 67 5b 27 70 72 65 66 65 72 2d 73 74 61 62 6c 65 27 5d 29 29 20 | sset($config['prefer-stable'])). |
de1a0 | 7b 0a 24 72 65 61 6c 50 61 63 6b 61 67 65 2d 3e 73 65 74 50 72 65 66 65 72 53 74 61 62 6c 65 28 | {.$realPackage->setPreferStable( |
de1c0 | 28 62 6f 6f 6c 29 20 24 63 6f 6e 66 69 67 5b 27 70 72 65 66 65 72 2d 73 74 61 62 6c 65 27 5d 29 | (bool).$config['prefer-stable']) |
de1e0 | 3b 0a 7d 0a 0a 69 66 20 28 69 73 73 65 74 28 24 63 6f 6e 66 69 67 5b 27 63 6f 6e 66 69 67 27 5d | ;.}..if.(isset($config['config'] |
de200 | 29 29 20 7b 0a 24 72 65 61 6c 50 61 63 6b 61 67 65 2d 3e 73 65 74 43 6f 6e 66 69 67 28 24 63 6f | )).{.$realPackage->setConfig($co |
de220 | 6e 66 69 67 5b 27 63 6f 6e 66 69 67 27 5d 29 3b 0a 7d 0a 0a 24 72 65 70 6f 73 20 3d 20 52 65 70 | nfig['config']);.}..$repos.=.Rep |
de240 | 6f 73 69 74 6f 72 79 46 61 63 74 6f 72 79 3a 3a 64 65 66 61 75 6c 74 52 65 70 6f 73 28 6e 75 6c | ositoryFactory::defaultRepos(nul |
de260 | 6c 2c 20 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 2c 20 24 74 68 69 73 2d 3e 6d 61 6e 61 67 65 72 | l,.$this->config,.$this->manager |
de280 | 29 3b 0a 66 6f 72 65 61 63 68 20 28 24 72 65 70 6f 73 20 61 73 20 24 72 65 70 6f 29 20 7b 0a 24 | );.foreach.($repos.as.$repo).{.$ |
de2a0 | 74 68 69 73 2d 3e 6d 61 6e 61 67 65 72 2d 3e 61 64 64 52 65 70 6f 73 69 74 6f 72 79 28 24 72 65 | this->manager->addRepository($re |
de2c0 | 70 6f 29 3b 0a 7d 0a 24 72 65 61 6c 50 61 63 6b 61 67 65 2d 3e 73 65 74 52 65 70 6f 73 69 74 6f | po);.}.$realPackage->setReposito |
de2e0 | 72 69 65 73 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 | ries($this->config->getRepositor |
de300 | 69 65 73 28 29 29 3b 0a 0a 72 65 74 75 72 6e 20 24 70 61 63 6b 61 67 65 3b 0a 7d 0a 0a 0a 0a 0a | ies());..return.$package;.}..... |
de320 | 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 65 78 74 72 61 63 74 41 6c 69 61 73 | ...private.function.extractAlias |
de340 | 65 73 28 61 72 72 61 79 20 24 72 65 71 75 69 72 65 73 2c 20 61 72 72 61 79 20 24 61 6c 69 61 73 | es(array.$requires,.array.$alias |
de360 | 65 73 29 3a 20 61 72 72 61 79 0a 7b 0a 66 6f 72 65 61 63 68 20 28 24 72 65 71 75 69 72 65 73 20 | es):.array.{.foreach.($requires. |
de380 | 61 73 20 24 72 65 71 4e 61 6d 65 20 3d 3e 20 24 72 65 71 56 65 72 73 69 6f 6e 29 20 7b 0a 69 66 | as.$reqName.=>.$reqVersion).{.if |
de3a0 | 20 28 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b 5e 28 5b 5e 2c 5c 73 23 5d 2b 29 28 3f 3a | .(Preg::isMatch('{^([^,\s#]+)(?: |
de3c0 | 23 5b 5e 20 5d 2b 29 3f 20 2b 61 73 20 2b 28 5b 5e 2c 5c 73 5d 2b 29 24 7d 27 2c 20 24 72 65 71 | #[^.]+)?.+as.+([^,\s]+)$}',.$req |
de3e0 | 56 65 72 73 69 6f 6e 2c 20 24 6d 61 74 63 68 29 29 20 7b 0a 24 61 6c 69 61 73 65 73 5b 5d 20 3d | Version,.$match)).{.$aliases[].= |
de400 | 20 5b 0a 27 70 61 63 6b 61 67 65 27 20 3d 3e 20 73 74 72 74 6f 6c 6f 77 65 72 28 24 72 65 71 4e | .[.'package'.=>.strtolower($reqN |
de420 | 61 6d 65 29 2c 0a 27 76 65 72 73 69 6f 6e 27 20 3d 3e 20 24 74 68 69 73 2d 3e 76 65 72 73 69 6f | ame),.'version'.=>.$this->versio |
de440 | 6e 50 61 72 73 65 72 2d 3e 6e 6f 72 6d 61 6c 69 7a 65 28 24 6d 61 74 63 68 5b 31 5d 2c 20 24 72 | nParser->normalize($match[1],.$r |
de460 | 65 71 56 65 72 73 69 6f 6e 29 2c 0a 27 61 6c 69 61 73 27 20 3d 3e 20 24 6d 61 74 63 68 5b 32 5d | eqVersion),.'alias'.=>.$match[2] |
de480 | 2c 0a 27 61 6c 69 61 73 5f 6e 6f 72 6d 61 6c 69 7a 65 64 27 20 3d 3e 20 24 74 68 69 73 2d 3e 76 | ,.'alias_normalized'.=>.$this->v |
de4a0 | 65 72 73 69 6f 6e 50 61 72 73 65 72 2d 3e 6e 6f 72 6d 61 6c 69 7a 65 28 24 6d 61 74 63 68 5b 32 | ersionParser->normalize($match[2 |
de4c0 | 5d 2c 20 24 72 65 71 56 65 72 73 69 6f 6e 29 2c 0a 5d 3b 0a 7d 20 65 6c 73 65 69 66 20 28 73 74 | ],.$reqVersion),.];.}.elseif.(st |
de4e0 | 72 70 6f 73 28 24 72 65 71 56 65 72 73 69 6f 6e 2c 20 27 20 61 73 20 27 29 20 21 3d 3d 20 66 61 | rpos($reqVersion,.'.as.').!==.fa |
de500 | 6c 73 65 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 55 6e 65 78 70 65 63 74 65 64 56 61 6c 75 | lse).{.throw.new.\UnexpectedValu |
de520 | 65 45 78 63 65 70 74 69 6f 6e 28 27 49 6e 76 61 6c 69 64 20 61 6c 69 61 73 20 64 65 66 69 6e 69 | eException('Invalid.alias.defini |
de540 | 74 69 6f 6e 20 69 6e 20 22 27 2e 24 72 65 71 4e 61 6d 65 2e 27 22 3a 20 22 27 2e 24 72 65 71 56 | tion.in."'.$reqName.'":."'.$reqV |
de560 | 65 72 73 69 6f 6e 2e 27 22 2e 20 41 6c 69 61 73 65 73 20 73 68 6f 75 6c 64 20 62 65 20 69 6e 20 | ersion.'"..Aliases.should.be.in. |
de580 | 74 68 65 20 66 6f 72 6d 20 22 65 78 61 63 74 2d 76 65 72 73 69 6f 6e 20 61 73 20 6f 74 68 65 72 | the.form."exact-version.as.other |
de5a0 | 2d 65 78 61 63 74 2d 76 65 72 73 69 6f 6e 22 2e 27 29 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 | -exact-version".');.}.}..return. |
de5c0 | 24 61 6c 69 61 73 65 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 73 | $aliases;.}.............public.s |
de5e0 | 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 65 78 74 72 61 63 74 53 74 61 62 69 6c 69 74 79 46 | tatic.function.extractStabilityF |
de600 | 6c 61 67 73 28 61 72 72 61 79 20 24 72 65 71 75 69 72 65 73 2c 20 73 74 72 69 6e 67 20 24 6d 69 | lags(array.$requires,.string.$mi |
de620 | 6e 69 6d 75 6d 53 74 61 62 69 6c 69 74 79 2c 20 61 72 72 61 79 20 24 73 74 61 62 69 6c 69 74 79 | nimumStability,.array.$stability |
de640 | 46 6c 61 67 73 29 3a 20 61 72 72 61 79 0a 7b 0a 24 73 74 61 62 69 6c 69 74 69 65 73 20 3d 20 42 | Flags):.array.{.$stabilities.=.B |
de660 | 61 73 65 50 61 63 6b 61 67 65 3a 3a 24 73 74 61 62 69 6c 69 74 69 65 73 3b 0a 0a 24 6d 69 6e 69 | asePackage::$stabilities;..$mini |
de680 | 6d 75 6d 53 74 61 62 69 6c 69 74 79 20 3d 20 24 73 74 61 62 69 6c 69 74 69 65 73 5b 24 6d 69 6e | mumStability.=.$stabilities[$min |
de6a0 | 69 6d 75 6d 53 74 61 62 69 6c 69 74 79 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 72 65 71 75 69 72 | imumStability];.foreach.($requir |
de6c0 | 65 73 20 61 73 20 24 72 65 71 4e 61 6d 65 20 3d 3e 20 24 72 65 71 56 65 72 73 69 6f 6e 29 20 7b | es.as.$reqName.=>.$reqVersion).{ |
de6e0 | 0a 24 63 6f 6e 73 74 72 61 69 6e 74 73 20 3d 20 5b 5d 3b 0a 0a 0a 24 6f 72 53 70 6c 69 74 20 3d | .$constraints.=.[];...$orSplit.= |
de700 | 20 50 72 65 67 3a 3a 73 70 6c 69 74 28 27 7b 5c 73 2a 5c 7c 5c 7c 3f 5c 73 2a 7d 27 2c 20 74 72 | .Preg::split('{\s*\|\|?\s*}',.tr |
de720 | 69 6d 28 24 72 65 71 56 65 72 73 69 6f 6e 29 29 3b 0a 66 6f 72 65 61 63 68 20 28 24 6f 72 53 70 | im($reqVersion));.foreach.($orSp |
de740 | 6c 69 74 20 61 73 20 24 6f 72 43 6f 6e 73 74 72 61 69 6e 74 29 20 7b 0a 24 61 6e 64 53 70 6c 69 | lit.as.$orConstraint).{.$andSpli |
de760 | 74 20 3d 20 50 72 65 67 3a 3a 73 70 6c 69 74 28 27 7b 28 3f 3c 21 5e 7c 61 73 7c 5b 3d 3e 3c 20 | t.=.Preg::split('{(?<!^|as|[=><. |
de780 | 2c 5d 29 20 2a 28 3f 3c 21 2d 29 5b 2c 20 5d 28 3f 21 2d 29 20 2a 28 3f 21 2c 7c 61 73 7c 24 29 | ,]).*(?<!-)[,.](?!-).*(?!,|as|$) |
de7a0 | 7d 27 2c 20 24 6f 72 43 6f 6e 73 74 72 61 69 6e 74 29 3b 0a 66 6f 72 65 61 63 68 20 28 24 61 6e | }',.$orConstraint);.foreach.($an |
de7c0 | 64 53 70 6c 69 74 20 61 73 20 24 61 6e 64 43 6f 6e 73 74 72 61 69 6e 74 29 20 7b 0a 24 63 6f 6e | dSplit.as.$andConstraint).{.$con |
de7e0 | 73 74 72 61 69 6e 74 73 5b 5d 20 3d 20 24 61 6e 64 43 6f 6e 73 74 72 61 69 6e 74 3b 0a 7d 0a 7d | straints[].=.$andConstraint;.}.} |
de800 | 0a 0a 0a 24 6d 61 74 63 68 65 64 20 3d 20 66 61 6c 73 65 3b 0a 66 6f 72 65 61 63 68 20 28 24 63 | ...$matched.=.false;.foreach.($c |
de820 | 6f 6e 73 74 72 61 69 6e 74 73 20 61 73 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 20 7b 0a 69 66 20 | onstraints.as.$constraint).{.if. |
de840 | 28 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b 5e 5b 5e 40 5d 2a 3f 40 28 27 2e 69 6d 70 6c | (Preg::isMatch('{^[^@]*?@('.impl |
de860 | 6f 64 65 28 27 7c 27 2c 20 61 72 72 61 79 5f 6b 65 79 73 28 24 73 74 61 62 69 6c 69 74 69 65 73 | ode('|',.array_keys($stabilities |
de880 | 29 29 2e 27 29 24 7d 69 27 2c 20 24 63 6f 6e 73 74 72 61 69 6e 74 2c 20 24 6d 61 74 63 68 29 29 | )).')$}i',.$constraint,.$match)) |
de8a0 | 20 7b 0a 24 6e 61 6d 65 20 3d 20 73 74 72 74 6f 6c 6f 77 65 72 28 24 72 65 71 4e 61 6d 65 29 3b | .{.$name.=.strtolower($reqName); |
de8c0 | 0a 24 73 74 61 62 69 6c 69 74 79 20 3d 20 24 73 74 61 62 69 6c 69 74 69 65 73 5b 56 65 72 73 69 | .$stability.=.$stabilities[Versi |
de8e0 | 6f 6e 50 61 72 73 65 72 3a 3a 6e 6f 72 6d 61 6c 69 7a 65 53 74 61 62 69 6c 69 74 79 28 24 6d 61 | onParser::normalizeStability($ma |
de900 | 74 63 68 5b 31 5d 29 5d 3b 0a 0a 69 66 20 28 69 73 73 65 74 28 24 73 74 61 62 69 6c 69 74 79 46 | tch[1])];..if.(isset($stabilityF |
de920 | 6c 61 67 73 5b 24 6e 61 6d 65 5d 29 20 26 26 20 24 73 74 61 62 69 6c 69 74 79 46 6c 61 67 73 5b | lags[$name]).&&.$stabilityFlags[ |
de940 | 24 6e 61 6d 65 5d 20 3e 20 24 73 74 61 62 69 6c 69 74 79 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b | $name].>.$stability).{.continue; |
de960 | 0a 7d 0a 24 73 74 61 62 69 6c 69 74 79 46 6c 61 67 73 5b 24 6e 61 6d 65 5d 20 3d 20 24 73 74 61 | .}.$stabilityFlags[$name].=.$sta |
de980 | 62 69 6c 69 74 79 3b 0a 24 6d 61 74 63 68 65 64 20 3d 20 74 72 75 65 3b 0a 7d 0a 7d 0a 0a 69 66 | bility;.$matched.=.true;.}.}..if |
de9a0 | 20 28 24 6d 61 74 63 68 65 64 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 66 6f 72 65 61 | .($matched).{.continue;.}..forea |
de9c0 | 63 68 20 28 24 63 6f 6e 73 74 72 61 69 6e 74 73 20 61 73 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 | ch.($constraints.as.$constraint) |
de9e0 | 20 7b 0a 0a 0a 24 72 65 71 56 65 72 73 69 6f 6e 20 3d 20 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 | .{...$reqVersion.=.Preg::replace |
dea00 | 28 27 7b 5e 28 5b 5e 2c 5c 73 40 5d 2b 29 20 61 73 20 2e 2b 24 7d 27 2c 20 27 24 31 27 2c 20 24 | ('{^([^,\s@]+).as..+$}',.'$1',.$ |
dea20 | 63 6f 6e 73 74 72 61 69 6e 74 29 3b 0a 69 66 20 28 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 | constraint);.if.(Preg::isMatch(' |
dea40 | 7b 5e 5b 5e 2c 5c 73 40 5d 2b 24 7d 27 2c 20 24 72 65 71 56 65 72 73 69 6f 6e 29 20 26 26 20 27 | {^[^,\s@]+$}',.$reqVersion).&&.' |
dea60 | 73 74 61 62 6c 65 27 20 21 3d 3d 20 28 24 73 74 61 62 69 6c 69 74 79 4e 61 6d 65 20 3d 20 56 65 | stable'.!==.($stabilityName.=.Ve |
dea80 | 72 73 69 6f 6e 50 61 72 73 65 72 3a 3a 70 61 72 73 65 53 74 61 62 69 6c 69 74 79 28 24 72 65 71 | rsionParser::parseStability($req |
deaa0 | 56 65 72 73 69 6f 6e 29 29 29 20 7b 0a 24 6e 61 6d 65 20 3d 20 73 74 72 74 6f 6c 6f 77 65 72 28 | Version))).{.$name.=.strtolower( |
deac0 | 24 72 65 71 4e 61 6d 65 29 3b 0a 24 73 74 61 62 69 6c 69 74 79 20 3d 20 24 73 74 61 62 69 6c 69 | $reqName);.$stability.=.$stabili |
deae0 | 74 69 65 73 5b 24 73 74 61 62 69 6c 69 74 79 4e 61 6d 65 5d 3b 0a 69 66 20 28 28 69 73 73 65 74 | ties[$stabilityName];.if.((isset |
deb00 | 28 24 73 74 61 62 69 6c 69 74 79 46 6c 61 67 73 5b 24 6e 61 6d 65 5d 29 20 26 26 20 24 73 74 61 | ($stabilityFlags[$name]).&&.$sta |
deb20 | 62 69 6c 69 74 79 46 6c 61 67 73 5b 24 6e 61 6d 65 5d 20 3e 20 24 73 74 61 62 69 6c 69 74 79 29 | bilityFlags[$name].>.$stability) |
deb40 | 20 7c 7c 20 28 24 6d 69 6e 69 6d 75 6d 53 74 61 62 69 6c 69 74 79 20 3e 20 24 73 74 61 62 69 6c | .||.($minimumStability.>.$stabil |
deb60 | 69 74 79 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 24 73 74 61 62 69 6c 69 74 79 46 6c | ity)).{.continue;.}.$stabilityFl |
deb80 | 61 67 73 5b 24 6e 61 6d 65 5d 20 3d 20 24 73 74 61 62 69 6c 69 74 79 3b 0a 7d 0a 7d 0a 7d 0a 0a | ags[$name].=.$stability;.}.}.}.. |
deba0 | 72 65 74 75 72 6e 20 24 73 74 61 62 69 6c 69 74 79 46 6c 61 67 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a | return.$stabilityFlags;.}....... |
debc0 | 0a 0a 0a 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 65 78 74 72 61 63 | ...public.static.function.extrac |
debe0 | 74 52 65 66 65 72 65 6e 63 65 73 28 61 72 72 61 79 20 24 72 65 71 75 69 72 65 73 2c 20 61 72 72 | tReferences(array.$requires,.arr |
dec00 | 61 79 20 24 72 65 66 65 72 65 6e 63 65 73 29 3a 20 61 72 72 61 79 0a 7b 0a 66 6f 72 65 61 63 68 | ay.$references):.array.{.foreach |
dec20 | 20 28 24 72 65 71 75 69 72 65 73 20 61 73 20 24 72 65 71 4e 61 6d 65 20 3d 3e 20 24 72 65 71 56 | .($requires.as.$reqName.=>.$reqV |
dec40 | 65 72 73 69 6f 6e 29 20 7b 0a 24 72 65 71 56 65 72 73 69 6f 6e 20 3d 20 50 72 65 67 3a 3a 72 65 | ersion).{.$reqVersion.=.Preg::re |
dec60 | 70 6c 61 63 65 28 27 7b 5e 28 5b 5e 2c 5c 73 40 5d 2b 29 20 61 73 20 2e 2b 24 7d 27 2c 20 27 24 | place('{^([^,\s@]+).as..+$}',.'$ |
dec80 | 31 27 2c 20 24 72 65 71 56 65 72 73 69 6f 6e 29 3b 0a 69 66 20 28 50 72 65 67 3a 3a 69 73 4d 61 | 1',.$reqVersion);.if.(Preg::isMa |
deca0 | 74 63 68 28 27 7b 5e 5b 5e 2c 5c 73 40 5d 2b 3f 23 28 5b 61 2d 66 30 2d 39 5d 2b 29 24 7d 27 2c | tch('{^[^,\s@]+?#([a-f0-9]+)$}', |
decc0 | 20 24 72 65 71 56 65 72 73 69 6f 6e 2c 20 24 6d 61 74 63 68 29 20 26 26 20 27 64 65 76 27 20 3d | .$reqVersion,.$match).&&.'dev'.= |
dece0 | 3d 3d 20 56 65 72 73 69 6f 6e 50 61 72 73 65 72 3a 3a 70 61 72 73 65 53 74 61 62 69 6c 69 74 79 | ==.VersionParser::parseStability |
ded00 | 28 24 72 65 71 56 65 72 73 69 6f 6e 29 29 20 7b 0a 24 6e 61 6d 65 20 3d 20 73 74 72 74 6f 6c 6f | ($reqVersion)).{.$name.=.strtolo |
ded20 | 77 65 72 28 24 72 65 71 4e 61 6d 65 29 3b 0a 24 72 65 66 65 72 65 6e 63 65 73 5b 24 6e 61 6d 65 | wer($reqName);.$references[$name |
ded40 | 5d 20 3d 20 24 6d 61 74 63 68 5b 31 5d 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 72 65 66 65 | ].=.$match[1];.}.}..return.$refe |
ded60 | 72 65 6e 63 65 73 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 | rences;.}.}.<?php.declare(strict |
ded80 | 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 | _types=1);............namespace. |
deda0 | 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 4c 6f 61 64 65 72 3b 0a 0a 75 73 65 20 43 6f | Composer\Package\Loader;..use.Co |
dedc0 | 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 42 61 73 65 50 61 63 6b 61 67 65 3b 0a 75 73 65 20 | mposer\Package\BasePackage;.use. |
dede0 | 43 6f 6d 70 6f 73 65 72 5c 50 63 72 65 5c 50 72 65 67 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 | Composer\Pcre\Preg;.use.Composer |
dee00 | 5c 53 65 6d 76 65 72 5c 43 6f 6e 73 74 72 61 69 6e 74 5c 43 6f 6e 73 74 72 61 69 6e 74 3b 0a 75 | \Semver\Constraint\Constraint;.u |
dee20 | 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 56 65 72 73 69 6f 6e 5c 56 65 72 73 | se.Composer\Package\Version\Vers |
dee40 | 69 6f 6e 50 61 72 73 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f | ionParser;.use.Composer\Reposito |
dee60 | 72 79 5c 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f | ry\PlatformRepository;.use.Compo |
dee80 | 73 65 72 5c 53 70 64 78 5c 53 70 64 78 4c 69 63 65 6e 73 65 73 3b 0a 0a 0a 0a 0a 63 6c 61 73 73 | ser\Spdx\SpdxLicenses;.....class |
deea0 | 20 56 61 6c 69 64 61 74 69 6e 67 41 72 72 61 79 4c 6f 61 64 65 72 20 69 6d 70 6c 65 6d 65 6e 74 | .ValidatingArrayLoader.implement |
deec0 | 73 20 4c 6f 61 64 65 72 49 6e 74 65 72 66 61 63 65 0a 7b 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 | s.LoaderInterface.{.public.const |
deee0 | 20 43 48 45 43 4b 5f 41 4c 4c 20 3d 20 33 3b 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 43 48 45 | .CHECK_ALL.=.3;.public.const.CHE |
def00 | 43 4b 5f 55 4e 42 4f 55 4e 44 5f 43 4f 4e 53 54 52 41 49 4e 54 53 20 3d 20 31 3b 0a 70 75 62 6c | CK_UNBOUND_CONSTRAINTS.=.1;.publ |
def20 | 69 63 20 63 6f 6e 73 74 20 43 48 45 43 4b 5f 53 54 52 49 43 54 5f 43 4f 4e 53 54 52 41 49 4e 54 | ic.const.CHECK_STRICT_CONSTRAINT |
def40 | 53 20 3d 20 32 3b 0a 0a 0a 70 72 69 76 61 74 65 20 24 6c 6f 61 64 65 72 3b 0a 0a 70 72 69 76 61 | S.=.2;...private.$loader;..priva |
def60 | 74 65 20 24 76 65 72 73 69 6f 6e 50 61 72 73 65 72 3b 0a 0a 70 72 69 76 61 74 65 20 24 65 72 72 | te.$versionParser;..private.$err |
def80 | 6f 72 73 3b 0a 0a 70 72 69 76 61 74 65 20 24 77 61 72 6e 69 6e 67 73 3b 0a 0a 70 72 69 76 61 74 | ors;..private.$warnings;..privat |
defa0 | 65 20 24 63 6f 6e 66 69 67 3b 0a 0a 70 72 69 76 61 74 65 20 24 66 6c 61 67 73 3b 0a 0a 0a 0a 0a | e.$config;..private.$flags;..... |
defc0 | 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 4c 6f 61 64 | public.function.__construct(Load |
defe0 | 65 72 49 6e 74 65 72 66 61 63 65 20 24 6c 6f 61 64 65 72 2c 20 62 6f 6f 6c 20 24 73 74 72 69 63 | erInterface.$loader,.bool.$stric |
df000 | 74 4e 61 6d 65 20 3d 20 74 72 75 65 2c 20 3f 56 65 72 73 69 6f 6e 50 61 72 73 65 72 20 24 70 61 | tName.=.true,.?VersionParser.$pa |
df020 | 72 73 65 72 20 3d 20 6e 75 6c 6c 2c 20 69 6e 74 20 24 66 6c 61 67 73 20 3d 20 30 29 0a 7b 0a 24 | rser.=.null,.int.$flags.=.0).{.$ |
df040 | 74 68 69 73 2d 3e 6c 6f 61 64 65 72 20 3d 20 24 6c 6f 61 64 65 72 3b 0a 24 74 68 69 73 2d 3e 76 | this->loader.=.$loader;.$this->v |
df060 | 65 72 73 69 6f 6e 50 61 72 73 65 72 20 3d 20 24 70 61 72 73 65 72 20 3f 3a 20 6e 65 77 20 56 65 | ersionParser.=.$parser.?:.new.Ve |
df080 | 72 73 69 6f 6e 50 61 72 73 65 72 28 29 3b 0a 24 74 68 69 73 2d 3e 66 6c 61 67 73 20 3d 20 24 66 | rsionParser();.$this->flags.=.$f |
df0a0 | 6c 61 67 73 3b 0a 0a 69 66 20 28 24 73 74 72 69 63 74 4e 61 6d 65 20 21 3d 3d 20 74 72 75 65 29 | lags;..if.($strictName.!==.true) |
df0c0 | 20 7b 20 0a 74 72 69 67 67 65 72 5f 65 72 72 6f 72 28 27 24 73 74 72 69 63 74 4e 61 6d 65 20 6d | .{..trigger_error('$strictName.m |
df0e0 | 75 73 74 20 62 65 20 73 65 74 20 74 6f 20 74 72 75 65 20 69 6e 20 56 61 6c 69 64 61 74 69 6e 67 | ust.be.set.to.true.in.Validating |
df100 | 41 72 72 61 79 4c 6f 61 64 65 72 5c 27 73 20 63 6f 6e 73 74 72 75 63 74 6f 72 20 61 73 20 6f 66 | ArrayLoader\'s.constructor.as.of |
df120 | 20 32 2e 32 2c 20 61 6e 64 20 69 74 20 77 69 6c 6c 20 62 65 20 72 65 6d 6f 76 65 64 20 69 6e 20 | .2.2,.and.it.will.be.removed.in. |
df140 | 33 2e 30 27 2c 20 45 5f 55 53 45 52 5f 44 45 50 52 45 43 41 54 45 44 29 3b 0a 7d 0a 7d 0a 0a 0a | 3.0',.E_USER_DEPRECATED);.}.}... |
df160 | 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 6c 6f 61 64 28 61 72 72 61 79 20 24 63 6f | ..public.function.load(array.$co |
df180 | 6e 66 69 67 2c 20 73 74 72 69 6e 67 20 24 63 6c 61 73 73 20 3d 20 27 43 6f 6d 70 6f 73 65 72 5c | nfig,.string.$class.=.'Composer\ |
df1a0 | 50 61 63 6b 61 67 65 5c 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 27 29 3a 20 42 61 73 65 50 | Package\CompletePackage'):.BaseP |
df1c0 | 61 63 6b 61 67 65 0a 7b 0a 24 74 68 69 73 2d 3e 65 72 72 6f 72 73 20 3d 20 5b 5d 3b 0a 24 74 68 | ackage.{.$this->errors.=.[];.$th |
df1e0 | 69 73 2d 3e 77 61 72 6e 69 6e 67 73 20 3d 20 5b 5d 3b 0a 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 | is->warnings.=.[];.$this->config |
df200 | 20 3d 20 24 63 6f 6e 66 69 67 3b 0a 0a 24 74 68 69 73 2d 3e 76 61 6c 69 64 61 74 65 53 74 72 69 | .=.$config;..$this->validateStri |
df220 | 6e 67 28 27 6e 61 6d 65 27 2c 20 74 72 75 65 29 3b 0a 69 66 20 28 24 65 72 72 20 3d 20 73 65 6c | ng('name',.true);.if.($err.=.sel |
df240 | 66 3a 3a 68 61 73 50 61 63 6b 61 67 65 4e 61 6d 69 6e 67 45 72 72 6f 72 28 24 63 6f 6e 66 69 67 | f::hasPackageNamingError($config |
df260 | 5b 27 6e 61 6d 65 27 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 65 72 72 6f 72 73 5b 5d 20 3d 20 27 | ['name'])).{.$this->errors[].=.' |
df280 | 6e 61 6d 65 20 3a 20 27 2e 24 65 72 72 3b 0a 7d 0a 0a 69 66 20 28 21 65 6d 70 74 79 28 24 74 68 | name.:.'.$err;.}..if.(!empty($th |
df2a0 | 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 76 65 72 73 69 6f 6e 27 5d 29 29 20 7b 0a 69 66 20 28 21 69 | is->config['version'])).{.if.(!i |
df2c0 | 73 5f 73 63 61 6c 61 72 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 76 65 72 73 69 6f 6e 27 | s_scalar($this->config['version' |
df2e0 | 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 76 61 6c 69 64 61 74 65 53 74 72 69 6e 67 28 27 76 65 72 | ])).{.$this->validateString('ver |
df300 | 73 69 6f 6e 27 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 69 66 20 28 21 69 73 5f 73 74 72 69 6e 67 28 | sion');.}.else.{.if.(!is_string( |
df320 | 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 76 65 72 73 69 6f 6e 27 5d 29 29 20 7b 0a 24 74 68 | $this->config['version'])).{.$th |
df340 | 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 76 65 72 73 69 6f 6e 27 5d 20 3d 20 28 73 74 72 69 6e 67 29 | is->config['version'].=.(string) |
df360 | 20 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 76 65 72 73 69 6f 6e 27 5d 3b 0a 7d 0a 74 72 79 | .$this->config['version'];.}.try |
df380 | 20 7b 0a 24 74 68 69 73 2d 3e 76 65 72 73 69 6f 6e 50 61 72 73 65 72 2d 3e 6e 6f 72 6d 61 6c 69 | .{.$this->versionParser->normali |
df3a0 | 7a 65 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 76 65 72 73 69 6f 6e 27 5d 29 3b 0a 7d 20 | ze($this->config['version']);.}. |
df3c0 | 63 61 74 63 68 20 28 5c 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 24 74 68 69 73 2d 3e 65 | catch.(\Exception.$e).{.$this->e |
df3e0 | 72 72 6f 72 73 5b 5d 20 3d 20 27 76 65 72 73 69 6f 6e 20 3a 20 69 6e 76 61 6c 69 64 20 76 61 6c | rrors[].=.'version.:.invalid.val |
df400 | 75 65 20 28 27 2e 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 76 65 72 73 69 6f 6e 27 5d 2e 27 | ue.('.$this->config['version'].' |
df420 | 29 3a 20 27 2e 24 65 2d 3e 67 65 74 4d 65 73 73 61 67 65 28 29 3b 0a 75 6e 73 65 74 28 24 74 68 | ):.'.$e->getMessage();.unset($th |
df440 | 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 76 65 72 73 69 6f 6e 27 5d 29 3b 0a 7d 0a 7d 0a 7d 0a 0a 69 | is->config['version']);.}.}.}..i |
df460 | 66 20 28 21 65 6d 70 74 79 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 63 6f 6e 66 69 67 27 | f.(!empty($this->config['config' |
df480 | 5d 5b 27 70 6c 61 74 66 6f 72 6d 27 5d 29 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 28 61 72 72 61 | ]['platform'])).{.foreach.((arra |
df4a0 | 79 29 20 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 63 6f 6e 66 69 67 27 5d 5b 27 70 6c 61 74 | y).$this->config['config']['plat |
df4c0 | 66 6f 72 6d 27 5d 20 61 73 20 24 6b 65 79 20 3d 3e 20 24 70 6c 61 74 66 6f 72 6d 29 20 7b 0a 69 | form'].as.$key.=>.$platform).{.i |
df4e0 | 66 20 28 66 61 6c 73 65 20 3d 3d 3d 20 24 70 6c 61 74 66 6f 72 6d 29 20 7b 0a 63 6f 6e 74 69 6e | f.(false.===.$platform).{.contin |
df500 | 75 65 3b 0a 7d 0a 69 66 20 28 21 69 73 5f 73 74 72 69 6e 67 28 24 70 6c 61 74 66 6f 72 6d 29 29 | ue;.}.if.(!is_string($platform)) |
df520 | 20 7b 0a 24 74 68 69 73 2d 3e 65 72 72 6f 72 73 5b 5d 20 3d 20 27 63 6f 6e 66 69 67 2e 70 6c 61 | .{.$this->errors[].=.'config.pla |
df540 | 74 66 6f 72 6d 2e 27 20 2e 20 24 6b 65 79 20 2e 20 27 20 3a 20 69 6e 76 61 6c 69 64 20 76 61 6c | tform.'...$key...'.:.invalid.val |
df560 | 75 65 20 28 27 2e 67 65 74 74 79 70 65 28 24 70 6c 61 74 66 6f 72 6d 29 2e 27 20 27 2e 76 61 72 | ue.('.gettype($platform).'.'.var |
df580 | 5f 65 78 70 6f 72 74 28 24 70 6c 61 74 66 6f 72 6d 2c 20 74 72 75 65 29 2e 27 29 3a 20 65 78 70 | _export($platform,.true).'):.exp |
df5a0 | 65 63 74 65 64 20 73 74 72 69 6e 67 20 6f 72 20 66 61 6c 73 65 27 3b 0a 63 6f 6e 74 69 6e 75 65 | ected.string.or.false';.continue |
df5c0 | 3b 0a 7d 0a 74 72 79 20 7b 0a 24 74 68 69 73 2d 3e 76 65 72 73 69 6f 6e 50 61 72 73 65 72 2d 3e | ;.}.try.{.$this->versionParser-> |
df5e0 | 6e 6f 72 6d 61 6c 69 7a 65 28 24 70 6c 61 74 66 6f 72 6d 29 3b 0a 7d 20 63 61 74 63 68 20 28 5c | normalize($platform);.}.catch.(\ |
df600 | 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 24 74 68 69 73 2d 3e 65 72 72 6f 72 73 5b 5d 20 | Exception.$e).{.$this->errors[]. |
df620 | 3d 20 27 63 6f 6e 66 69 67 2e 70 6c 61 74 66 6f 72 6d 2e 27 20 2e 20 24 6b 65 79 20 2e 20 27 20 | =.'config.platform.'...$key...'. |
df640 | 3a 20 69 6e 76 61 6c 69 64 20 76 61 6c 75 65 20 28 27 2e 24 70 6c 61 74 66 6f 72 6d 2e 27 29 3a | :.invalid.value.('.$platform.'): |
df660 | 20 27 2e 24 65 2d 3e 67 65 74 4d 65 73 73 61 67 65 28 29 3b 0a 7d 0a 7d 0a 7d 0a 0a 24 74 68 69 | .'.$e->getMessage();.}.}.}..$thi |
df680 | 73 2d 3e 76 61 6c 69 64 61 74 65 52 65 67 65 78 28 27 74 79 70 65 27 2c 20 27 5b 41 2d 5a 61 2d | s->validateRegex('type',.'[A-Za- |
df6a0 | 7a 30 2d 39 2d 5d 2b 27 29 3b 0a 24 74 68 69 73 2d 3e 76 61 6c 69 64 61 74 65 53 74 72 69 6e 67 | z0-9-]+');.$this->validateString |
df6c0 | 28 27 74 61 72 67 65 74 2d 64 69 72 27 29 3b 0a 24 74 68 69 73 2d 3e 76 61 6c 69 64 61 74 65 41 | ('target-dir');.$this->validateA |
df6e0 | 72 72 61 79 28 27 65 78 74 72 61 27 29 3b 0a 0a 69 66 20 28 69 73 73 65 74 28 24 74 68 69 73 2d | rray('extra');..if.(isset($this- |
df700 | 3e 63 6f 6e 66 69 67 5b 27 62 69 6e 27 5d 29 29 20 7b 0a 69 66 20 28 69 73 5f 73 74 72 69 6e 67 | >config['bin'])).{.if.(is_string |
df720 | 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 62 69 6e 27 5d 29 29 20 7b 0a 24 74 68 69 73 2d | ($this->config['bin'])).{.$this- |
df740 | 3e 76 61 6c 69 64 61 74 65 53 74 72 69 6e 67 28 27 62 69 6e 27 29 3b 0a 7d 20 65 6c 73 65 20 7b | >validateString('bin');.}.else.{ |
df760 | 0a 24 74 68 69 73 2d 3e 76 61 6c 69 64 61 74 65 46 6c 61 74 41 72 72 61 79 28 27 62 69 6e 27 29 | .$this->validateFlatArray('bin') |
df780 | 3b 0a 7d 0a 7d 0a 0a 24 74 68 69 73 2d 3e 76 61 6c 69 64 61 74 65 41 72 72 61 79 28 27 73 63 72 | ;.}.}..$this->validateArray('scr |
df7a0 | 69 70 74 73 27 29 3b 20 0a 24 74 68 69 73 2d 3e 76 61 6c 69 64 61 74 65 53 74 72 69 6e 67 28 27 | ipts');..$this->validateString(' |
df7c0 | 64 65 73 63 72 69 70 74 69 6f 6e 27 29 3b 0a 24 74 68 69 73 2d 3e 76 61 6c 69 64 61 74 65 55 72 | description');.$this->validateUr |
df7e0 | 6c 28 27 68 6f 6d 65 70 61 67 65 27 29 3b 0a 24 74 68 69 73 2d 3e 76 61 6c 69 64 61 74 65 46 6c | l('homepage');.$this->validateFl |
df800 | 61 74 41 72 72 61 79 28 27 6b 65 79 77 6f 72 64 73 27 2c 20 27 5b 5c 70 7b 4e 7d 5c 70 7b 4c 7d | atArray('keywords',.'[\p{N}\p{L} |
df820 | 20 2e 5f 2d 5d 2b 27 29 3b 0a 0a 24 72 65 6c 65 61 73 65 44 61 74 65 20 3d 20 6e 75 6c 6c 3b 0a | .._-]+');..$releaseDate.=.null;. |
df840 | 24 74 68 69 73 2d 3e 76 61 6c 69 64 61 74 65 53 74 72 69 6e 67 28 27 74 69 6d 65 27 29 3b 0a 69 | $this->validateString('time');.i |
df860 | 66 20 28 21 65 6d 70 74 79 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 74 69 6d 65 27 5d 29 | f.(!empty($this->config['time']) |
df880 | 29 20 7b 0a 74 72 79 20 7b 0a 24 72 65 6c 65 61 73 65 44 61 74 65 20 3d 20 6e 65 77 20 5c 44 61 | ).{.try.{.$releaseDate.=.new.\Da |
df8a0 | 74 65 54 69 6d 65 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 74 69 6d 65 27 5d 2c 20 6e 65 | teTime($this->config['time'],.ne |
df8c0 | 77 20 5c 44 61 74 65 54 69 6d 65 5a 6f 6e 65 28 27 55 54 43 27 29 29 3b 0a 7d 20 63 61 74 63 68 | w.\DateTimeZone('UTC'));.}.catch |
df8e0 | 20 28 5c 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 24 74 68 69 73 2d 3e 65 72 72 6f 72 73 | .(\Exception.$e).{.$this->errors |
df900 | 5b 5d 20 3d 20 27 74 69 6d 65 20 3a 20 69 6e 76 61 6c 69 64 20 76 61 6c 75 65 20 28 27 2e 24 74 | [].=.'time.:.invalid.value.('.$t |
df920 | 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 74 69 6d 65 27 5d 2e 27 29 3a 20 27 2e 24 65 2d 3e 67 65 | his->config['time'].'):.'.$e->ge |
df940 | 74 4d 65 73 73 61 67 65 28 29 3b 0a 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b | tMessage();.unset($this->config[ |
df960 | 27 74 69 6d 65 27 5d 29 3b 0a 7d 0a 7d 0a 0a 0a 69 66 20 28 69 73 73 65 74 28 24 74 68 69 73 2d | 'time']);.}.}...if.(isset($this- |
df980 | 3e 63 6f 6e 66 69 67 5b 27 6c 69 63 65 6e 73 65 27 5d 29 20 26 26 20 28 21 24 72 65 6c 65 61 73 | >config['license']).&&.(!$releas |
df9a0 | 65 44 61 74 65 20 7c 7c 20 24 72 65 6c 65 61 73 65 44 61 74 65 2d 3e 67 65 74 54 69 6d 65 73 74 | eDate.||.$releaseDate->getTimest |
df9c0 | 61 6d 70 28 29 20 3e 3d 20 73 74 72 74 6f 74 69 6d 65 28 27 2d 38 64 61 79 73 27 29 29 29 20 7b | amp().>=.strtotime('-8days'))).{ |
df9e0 | 0a 69 66 20 28 69 73 5f 61 72 72 61 79 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 6c 69 63 | .if.(is_array($this->config['lic |
dfa00 | 65 6e 73 65 27 5d 29 20 7c 7c 20 69 73 5f 73 74 72 69 6e 67 28 24 74 68 69 73 2d 3e 63 6f 6e 66 | ense']).||.is_string($this->conf |
dfa20 | 69 67 5b 27 6c 69 63 65 6e 73 65 27 5d 29 29 20 7b 0a 24 6c 69 63 65 6e 73 65 73 20 3d 20 28 61 | ig['license'])).{.$licenses.=.(a |
dfa40 | 72 72 61 79 29 20 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 6c 69 63 65 6e 73 65 27 5d 3b 0a | rray).$this->config['license'];. |
dfa60 | 0a 24 6c 69 63 65 6e 73 65 56 61 6c 69 64 61 74 6f 72 20 3d 20 6e 65 77 20 53 70 64 78 4c 69 63 | .$licenseValidator.=.new.SpdxLic |
dfa80 | 65 6e 73 65 73 28 29 3b 0a 66 6f 72 65 61 63 68 20 28 24 6c 69 63 65 6e 73 65 73 20 61 73 20 24 | enses();.foreach.($licenses.as.$ |
dfaa0 | 6c 69 63 65 6e 73 65 29 20 7b 0a 0a 69 66 20 28 27 70 72 6f 70 72 69 65 74 61 72 79 27 20 3d 3d | license).{..if.('proprietary'.== |
dfac0 | 3d 20 24 6c 69 63 65 6e 73 65 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 24 6c 69 63 65 6e | =.$license).{.continue;.}.$licen |
dfae0 | 73 65 54 6f 56 61 6c 69 64 61 74 65 20 3d 20 73 74 72 5f 72 65 70 6c 61 63 65 28 27 70 72 6f 70 | seToValidate.=.str_replace('prop |
dfb00 | 72 69 65 74 61 72 79 27 2c 20 27 4d 49 54 27 2c 20 24 6c 69 63 65 6e 73 65 29 3b 0a 69 66 20 28 | rietary',.'MIT',.$license);.if.( |
dfb20 | 21 24 6c 69 63 65 6e 73 65 56 61 6c 69 64 61 74 6f 72 2d 3e 76 61 6c 69 64 61 74 65 28 24 6c 69 | !$licenseValidator->validate($li |
dfb40 | 63 65 6e 73 65 54 6f 56 61 6c 69 64 61 74 65 29 29 20 7b 0a 69 66 20 28 24 6c 69 63 65 6e 73 65 | censeToValidate)).{.if.($license |
dfb60 | 56 61 6c 69 64 61 74 6f 72 2d 3e 76 61 6c 69 64 61 74 65 28 74 72 69 6d 28 24 6c 69 63 65 6e 73 | Validator->validate(trim($licens |
dfb80 | 65 54 6f 56 61 6c 69 64 61 74 65 29 29 29 20 7b 0a 24 74 68 69 73 2d 3e 77 61 72 6e 69 6e 67 73 | eToValidate))).{.$this->warnings |
dfba0 | 5b 5d 20 3d 20 73 70 72 69 6e 74 66 28 0a 27 4c 69 63 65 6e 73 65 20 25 73 20 6d 75 73 74 20 6e | [].=.sprintf(.'License.%s.must.n |
dfbc0 | 6f 74 20 63 6f 6e 74 61 69 6e 20 65 78 74 72 61 20 73 70 61 63 65 73 2c 20 6d 61 6b 65 20 73 75 | ot.contain.extra.spaces,.make.su |
dfbe0 | 72 65 20 74 6f 20 74 72 69 6d 20 69 74 2e 27 2c 0a 6a 73 6f 6e 5f 65 6e 63 6f 64 65 28 24 6c 69 | re.to.trim.it.',.json_encode($li |
dfc00 | 63 65 6e 73 65 29 0a 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 74 68 69 73 2d 3e 77 61 72 6e 69 6e | cense).);.}.else.{.$this->warnin |
dfc20 | 67 73 5b 5d 20 3d 20 73 70 72 69 6e 74 66 28 0a 27 4c 69 63 65 6e 73 65 20 25 73 20 69 73 20 6e | gs[].=.sprintf(.'License.%s.is.n |
dfc40 | 6f 74 20 61 20 76 61 6c 69 64 20 53 50 44 58 20 6c 69 63 65 6e 73 65 20 69 64 65 6e 74 69 66 69 | ot.a.valid.SPDX.license.identifi |
dfc60 | 65 72 2c 20 73 65 65 20 68 74 74 70 73 3a 2f 2f 73 70 64 78 2e 6f 72 67 2f 6c 69 63 65 6e 73 65 | er,.see.https://spdx.org/license |
dfc80 | 73 2f 20 69 66 20 79 6f 75 20 75 73 65 20 61 6e 20 6f 70 65 6e 20 6c 69 63 65 6e 73 65 2e 27 20 | s/.if.you.use.an.open.license.'. |
dfca0 | 2e 20 50 48 50 5f 45 4f 4c 20 2e 0a 27 49 66 20 74 68 65 20 73 6f 66 74 77 61 72 65 20 69 73 20 | ..PHP_EOL...'If.the.software.is. |
dfcc0 | 63 6c 6f 73 65 64 2d 73 6f 75 72 63 65 2c 20 79 6f 75 20 6d 61 79 20 75 73 65 20 22 70 72 6f 70 | closed-source,.you.may.use."prop |
dfce0 | 72 69 65 74 61 72 79 22 20 61 73 20 6c 69 63 65 6e 73 65 2e 27 2c 0a 6a 73 6f 6e 5f 65 6e 63 6f | rietary".as.license.',.json_enco |
dfd00 | 64 65 28 24 6c 69 63 65 6e 73 65 29 0a 29 3b 0a 7d 0a 7d 0a 7d 0a 7d 0a 7d 0a 0a 69 66 20 28 24 | de($license).);.}.}.}.}.}..if.($ |
dfd20 | 74 68 69 73 2d 3e 76 61 6c 69 64 61 74 65 41 72 72 61 79 28 27 61 75 74 68 6f 72 73 27 29 20 26 | this->validateArray('authors').& |
dfd40 | 26 20 21 65 6d 70 74 79 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 61 75 74 68 6f 72 73 27 | &.!empty($this->config['authors' |
dfd60 | 5d 29 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 61 75 | ])).{.foreach.($this->config['au |
dfd80 | 74 68 6f 72 73 27 5d 20 61 73 20 24 6b 65 79 20 3d 3e 20 24 61 75 74 68 6f 72 29 20 7b 0a 69 66 | thors'].as.$key.=>.$author).{.if |
dfda0 | 20 28 21 69 73 5f 61 72 72 61 79 28 24 61 75 74 68 6f 72 29 29 20 7b 0a 24 74 68 69 73 2d 3e 65 | .(!is_array($author)).{.$this->e |
dfdc0 | 72 72 6f 72 73 5b 5d 20 3d 20 27 61 75 74 68 6f 72 73 2e 27 2e 24 6b 65 79 2e 27 20 3a 20 73 68 | rrors[].=.'authors.'.$key.'.:.sh |
dfde0 | 6f 75 6c 64 20 62 65 20 61 6e 20 61 72 72 61 79 2c 20 27 2e 67 65 74 74 79 70 65 28 24 61 75 74 | ould.be.an.array,.'.gettype($aut |
dfe00 | 68 6f 72 29 2e 27 20 67 69 76 65 6e 27 3b 0a 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 63 6f 6e 66 | hor).'.given';.unset($this->conf |
dfe20 | 69 67 5b 27 61 75 74 68 6f 72 73 27 5d 5b 24 6b 65 79 5d 29 3b 0a 63 6f 6e 74 69 6e 75 65 3b 0a | ig['authors'][$key]);.continue;. |
dfe40 | 7d 0a 66 6f 72 65 61 63 68 20 28 5b 27 68 6f 6d 65 70 61 67 65 27 2c 20 27 65 6d 61 69 6c 27 2c | }.foreach.(['homepage',.'email', |
dfe60 | 20 27 6e 61 6d 65 27 2c 20 27 72 6f 6c 65 27 5d 20 61 73 20 24 61 75 74 68 6f 72 44 61 74 61 29 | .'name',.'role'].as.$authorData) |
dfe80 | 20 7b 0a 69 66 20 28 69 73 73 65 74 28 24 61 75 74 68 6f 72 5b 24 61 75 74 68 6f 72 44 61 74 61 | .{.if.(isset($author[$authorData |
dfea0 | 5d 29 20 26 26 20 21 69 73 5f 73 74 72 69 6e 67 28 24 61 75 74 68 6f 72 5b 24 61 75 74 68 6f 72 | ]).&&.!is_string($author[$author |
dfec0 | 44 61 74 61 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 65 72 72 6f 72 73 5b 5d 20 3d 20 27 61 75 74 | Data])).{.$this->errors[].=.'aut |
dfee0 | 68 6f 72 73 2e 27 2e 24 6b 65 79 2e 27 2e 27 2e 24 61 75 74 68 6f 72 44 61 74 61 2e 27 20 3a 20 | hors.'.$key.'.'.$authorData.'.:. |
dff00 | 69 6e 76 61 6c 69 64 20 76 61 6c 75 65 2c 20 6d 75 73 74 20 62 65 20 61 20 73 74 72 69 6e 67 27 | invalid.value,.must.be.a.string' |
dff20 | 3b 0a 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 61 75 74 68 6f 72 73 27 5d | ;.unset($this->config['authors'] |
dff40 | 5b 24 6b 65 79 5d 5b 24 61 75 74 68 6f 72 44 61 74 61 5d 29 3b 0a 7d 0a 7d 0a 69 66 20 28 69 73 | [$key][$authorData]);.}.}.if.(is |
dff60 | 73 65 74 28 24 61 75 74 68 6f 72 5b 27 68 6f 6d 65 70 61 67 65 27 5d 29 20 26 26 20 21 24 74 68 | set($author['homepage']).&&.!$th |
dff80 | 69 73 2d 3e 66 69 6c 74 65 72 55 72 6c 28 24 61 75 74 68 6f 72 5b 27 68 6f 6d 65 70 61 67 65 27 | is->filterUrl($author['homepage' |
dffa0 | 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 77 61 72 6e 69 6e 67 73 5b 5d 20 3d 20 27 61 75 74 68 6f | ])).{.$this->warnings[].=.'autho |
dffc0 | 72 73 2e 27 2e 24 6b 65 79 2e 27 2e 68 6f 6d 65 70 61 67 65 20 3a 20 69 6e 76 61 6c 69 64 20 76 | rs.'.$key.'.homepage.:.invalid.v |
dffe0 | 61 6c 75 65 20 28 27 2e 24 61 75 74 68 6f 72 5b 27 68 6f 6d 65 70 61 67 65 27 5d 2e 27 29 2c 20 | alue.('.$author['homepage'].'),. |
e0000 | 6d 75 73 74 20 62 65 20 61 6e 20 68 74 74 70 2f 68 74 74 70 73 20 55 52 4c 27 3b 0a 75 6e 73 65 | must.be.an.http/https.URL';.unse |
e0020 | 74 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 61 75 74 68 6f 72 73 27 5d 5b 24 6b 65 79 5d | t($this->config['authors'][$key] |
e0040 | 5b 27 68 6f 6d 65 70 61 67 65 27 5d 29 3b 0a 7d 0a 69 66 20 28 69 73 73 65 74 28 24 61 75 74 68 | ['homepage']);.}.if.(isset($auth |
e0060 | 6f 72 5b 27 65 6d 61 69 6c 27 5d 29 20 26 26 20 21 66 69 6c 74 65 72 5f 76 61 72 28 24 61 75 74 | or['email']).&&.!filter_var($aut |
e0080 | 68 6f 72 5b 27 65 6d 61 69 6c 27 5d 2c 20 46 49 4c 54 45 52 5f 56 41 4c 49 44 41 54 45 5f 45 4d | hor['email'],.FILTER_VALIDATE_EM |
e00a0 | 41 49 4c 29 29 20 7b 0a 24 74 68 69 73 2d 3e 77 61 72 6e 69 6e 67 73 5b 5d 20 3d 20 27 61 75 74 | AIL)).{.$this->warnings[].=.'aut |
e00c0 | 68 6f 72 73 2e 27 2e 24 6b 65 79 2e 27 2e 65 6d 61 69 6c 20 3a 20 69 6e 76 61 6c 69 64 20 76 61 | hors.'.$key.'.email.:.invalid.va |
e00e0 | 6c 75 65 20 28 27 2e 24 61 75 74 68 6f 72 5b 27 65 6d 61 69 6c 27 5d 2e 27 29 2c 20 6d 75 73 74 | lue.('.$author['email'].'),.must |
e0100 | 20 62 65 20 61 20 76 61 6c 69 64 20 65 6d 61 69 6c 20 61 64 64 72 65 73 73 27 3b 0a 75 6e 73 65 | .be.a.valid.email.address';.unse |
e0120 | 74 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 61 75 74 68 6f 72 73 27 5d 5b 24 6b 65 79 5d | t($this->config['authors'][$key] |
e0140 | 5b 27 65 6d 61 69 6c 27 5d 29 3b 0a 7d 0a 69 66 20 28 65 6d 70 74 79 28 24 74 68 69 73 2d 3e 63 | ['email']);.}.if.(empty($this->c |
e0160 | 6f 6e 66 69 67 5b 27 61 75 74 68 6f 72 73 27 5d 5b 24 6b 65 79 5d 29 29 20 7b 0a 75 6e 73 65 74 | onfig['authors'][$key])).{.unset |
e0180 | 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 61 75 74 68 6f 72 73 27 5d 5b 24 6b 65 79 5d 29 | ($this->config['authors'][$key]) |
e01a0 | 3b 0a 7d 0a 7d 0a 69 66 20 28 65 6d 70 74 79 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 61 | ;.}.}.if.(empty($this->config['a |
e01c0 | 75 74 68 6f 72 73 27 5d 29 29 20 7b 0a 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 | uthors'])).{.unset($this->config |
e01e0 | 5b 27 61 75 74 68 6f 72 73 27 5d 29 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 24 74 68 69 73 2d 3e 76 61 | ['authors']);.}.}..if.($this->va |
e0200 | 6c 69 64 61 74 65 41 72 72 61 79 28 27 73 75 70 70 6f 72 74 27 29 20 26 26 20 21 65 6d 70 74 79 | lidateArray('support').&&.!empty |
e0220 | 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 73 75 70 70 6f 72 74 27 5d 29 29 20 7b 0a 66 6f | ($this->config['support'])).{.fo |
e0240 | 72 65 61 63 68 20 28 5b 27 69 73 73 75 65 73 27 2c 20 27 66 6f 72 75 6d 27 2c 20 27 77 69 6b 69 | reach.(['issues',.'forum',.'wiki |
e0260 | 27 2c 20 27 73 6f 75 72 63 65 27 2c 20 27 65 6d 61 69 6c 27 2c 20 27 69 72 63 27 2c 20 27 64 6f | ',.'source',.'email',.'irc',.'do |
e0280 | 63 73 27 2c 20 27 72 73 73 27 2c 20 27 63 68 61 74 27 5d 20 61 73 20 24 6b 65 79 29 20 7b 0a 69 | cs',.'rss',.'chat'].as.$key).{.i |
e02a0 | 66 20 28 69 73 73 65 74 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 73 75 70 70 6f 72 74 27 | f.(isset($this->config['support' |
e02c0 | 5d 5b 24 6b 65 79 5d 29 20 26 26 20 21 69 73 5f 73 74 72 69 6e 67 28 24 74 68 69 73 2d 3e 63 6f | ][$key]).&&.!is_string($this->co |
e02e0 | 6e 66 69 67 5b 27 73 75 70 70 6f 72 74 27 5d 5b 24 6b 65 79 5d 29 29 20 7b 0a 24 74 68 69 73 2d | nfig['support'][$key])).{.$this- |
e0300 | 3e 65 72 72 6f 72 73 5b 5d 20 3d 20 27 73 75 70 70 6f 72 74 2e 27 2e 24 6b 65 79 2e 27 20 3a 20 | >errors[].=.'support.'.$key.'.:. |
e0320 | 69 6e 76 61 6c 69 64 20 76 61 6c 75 65 2c 20 6d 75 73 74 20 62 65 20 61 20 73 74 72 69 6e 67 27 | invalid.value,.must.be.a.string' |
e0340 | 3b 0a 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 73 75 70 70 6f 72 74 27 5d | ;.unset($this->config['support'] |
e0360 | 5b 24 6b 65 79 5d 29 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 69 73 73 65 74 28 24 74 68 69 73 2d 3e 63 | [$key]);.}.}..if.(isset($this->c |
e0380 | 6f 6e 66 69 67 5b 27 73 75 70 70 6f 72 74 27 5d 5b 27 65 6d 61 69 6c 27 5d 29 20 26 26 20 21 66 | onfig['support']['email']).&&.!f |
e03a0 | 69 6c 74 65 72 5f 76 61 72 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 73 75 70 70 6f 72 74 | ilter_var($this->config['support |
e03c0 | 27 5d 5b 27 65 6d 61 69 6c 27 5d 2c 20 46 49 4c 54 45 52 5f 56 41 4c 49 44 41 54 45 5f 45 4d 41 | ']['email'],.FILTER_VALIDATE_EMA |
e03e0 | 49 4c 29 29 20 7b 0a 24 74 68 69 73 2d 3e 77 61 72 6e 69 6e 67 73 5b 5d 20 3d 20 27 73 75 70 70 | IL)).{.$this->warnings[].=.'supp |
e0400 | 6f 72 74 2e 65 6d 61 69 6c 20 3a 20 69 6e 76 61 6c 69 64 20 76 61 6c 75 65 20 28 27 2e 24 74 68 | ort.email.:.invalid.value.('.$th |
e0420 | 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 73 75 70 70 6f 72 74 27 5d 5b 27 65 6d 61 69 6c 27 5d 2e 27 | is->config['support']['email'].' |
e0440 | 29 2c 20 6d 75 73 74 20 62 65 20 61 20 76 61 6c 69 64 20 65 6d 61 69 6c 20 61 64 64 72 65 73 73 | ),.must.be.a.valid.email.address |
e0460 | 27 3b 0a 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 73 75 70 70 6f 72 74 27 | ';.unset($this->config['support' |
e0480 | 5d 5b 27 65 6d 61 69 6c 27 5d 29 3b 0a 7d 0a 0a 69 66 20 28 69 73 73 65 74 28 24 74 68 69 73 2d | ]['email']);.}..if.(isset($this- |
e04a0 | 3e 63 6f 6e 66 69 67 5b 27 73 75 70 70 6f 72 74 27 5d 5b 27 69 72 63 27 5d 29 20 26 26 20 21 24 | >config['support']['irc']).&&.!$ |
e04c0 | 74 68 69 73 2d 3e 66 69 6c 74 65 72 55 72 6c 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 73 | this->filterUrl($this->config['s |
e04e0 | 75 70 70 6f 72 74 27 5d 5b 27 69 72 63 27 5d 2c 20 5b 27 69 72 63 27 2c 20 27 69 72 63 73 27 5d | upport']['irc'],.['irc',.'ircs'] |
e0500 | 29 29 20 7b 0a 24 74 68 69 73 2d 3e 77 61 72 6e 69 6e 67 73 5b 5d 20 3d 20 27 73 75 70 70 6f 72 | )).{.$this->warnings[].=.'suppor |
e0520 | 74 2e 69 72 63 20 3a 20 69 6e 76 61 6c 69 64 20 76 61 6c 75 65 20 28 27 2e 24 74 68 69 73 2d 3e | t.irc.:.invalid.value.('.$this-> |
e0540 | 63 6f 6e 66 69 67 5b 27 73 75 70 70 6f 72 74 27 5d 5b 27 69 72 63 27 5d 2e 27 29 2c 20 6d 75 73 | config['support']['irc'].'),.mus |
e0560 | 74 20 62 65 20 61 20 69 72 63 3a 2f 2f 3c 73 65 72 76 65 72 3e 2f 3c 63 68 61 6e 6e 65 6c 3e 20 | t.be.a.irc://<server>/<channel>. |
e0580 | 6f 72 20 69 72 63 73 3a 2f 2f 20 55 52 4c 27 3b 0a 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 63 6f | or.ircs://.URL';.unset($this->co |
e05a0 | 6e 66 69 67 5b 27 73 75 70 70 6f 72 74 27 5d 5b 27 69 72 63 27 5d 29 3b 0a 7d 0a 0a 66 6f 72 65 | nfig['support']['irc']);.}..fore |
e05c0 | 61 63 68 20 28 5b 27 69 73 73 75 65 73 27 2c 20 27 66 6f 72 75 6d 27 2c 20 27 77 69 6b 69 27 2c | ach.(['issues',.'forum',.'wiki', |
e05e0 | 20 27 73 6f 75 72 63 65 27 2c 20 27 64 6f 63 73 27 2c 20 27 63 68 61 74 27 5d 20 61 73 20 24 6b | .'source',.'docs',.'chat'].as.$k |
e0600 | 65 79 29 20 7b 0a 69 66 20 28 69 73 73 65 74 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 73 | ey).{.if.(isset($this->config['s |
e0620 | 75 70 70 6f 72 74 27 5d 5b 24 6b 65 79 5d 29 20 26 26 20 21 24 74 68 69 73 2d 3e 66 69 6c 74 65 | upport'][$key]).&&.!$this->filte |
e0640 | 72 55 72 6c 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 73 75 70 70 6f 72 74 27 5d 5b 24 6b | rUrl($this->config['support'][$k |
e0660 | 65 79 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 77 61 72 6e 69 6e 67 73 5b 5d 20 3d 20 27 73 75 70 | ey])).{.$this->warnings[].=.'sup |
e0680 | 70 6f 72 74 2e 27 2e 24 6b 65 79 2e 27 20 3a 20 69 6e 76 61 6c 69 64 20 76 61 6c 75 65 20 28 27 | port.'.$key.'.:.invalid.value.(' |
e06a0 | 2e 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 73 75 70 70 6f 72 74 27 5d 5b 24 6b 65 79 5d 2e | .$this->config['support'][$key]. |
e06c0 | 27 29 2c 20 6d 75 73 74 20 62 65 20 61 6e 20 68 74 74 70 2f 68 74 74 70 73 20 55 52 4c 27 3b 0a | '),.must.be.an.http/https.URL';. |
e06e0 | 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 73 75 70 70 6f 72 74 27 5d 5b 24 | unset($this->config['support'][$ |
e0700 | 6b 65 79 5d 29 3b 0a 7d 0a 7d 0a 69 66 20 28 65 6d 70 74 79 28 24 74 68 69 73 2d 3e 63 6f 6e 66 | key]);.}.}.if.(empty($this->conf |
e0720 | 69 67 5b 27 73 75 70 70 6f 72 74 27 5d 29 29 20 7b 0a 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 63 | ig['support'])).{.unset($this->c |
e0740 | 6f 6e 66 69 67 5b 27 73 75 70 70 6f 72 74 27 5d 29 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 24 74 68 69 | onfig['support']);.}.}..if.($thi |
e0760 | 73 2d 3e 76 61 6c 69 64 61 74 65 41 72 72 61 79 28 27 66 75 6e 64 69 6e 67 27 29 20 26 26 20 21 | s->validateArray('funding').&&.! |
e0780 | 65 6d 70 74 79 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 66 75 6e 64 69 6e 67 27 5d 29 29 | empty($this->config['funding'])) |
e07a0 | 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 66 75 6e 64 69 | .{.foreach.($this->config['fundi |
e07c0 | 6e 67 27 5d 20 61 73 20 24 6b 65 79 20 3d 3e 20 24 66 75 6e 64 69 6e 67 4f 70 74 69 6f 6e 29 20 | ng'].as.$key.=>.$fundingOption). |
e07e0 | 7b 0a 69 66 20 28 21 69 73 5f 61 72 72 61 79 28 24 66 75 6e 64 69 6e 67 4f 70 74 69 6f 6e 29 29 | {.if.(!is_array($fundingOption)) |
e0800 | 20 7b 0a 24 74 68 69 73 2d 3e 65 72 72 6f 72 73 5b 5d 20 3d 20 27 66 75 6e 64 69 6e 67 2e 27 2e | .{.$this->errors[].=.'funding.'. |
e0820 | 24 6b 65 79 2e 27 20 3a 20 73 68 6f 75 6c 64 20 62 65 20 61 6e 20 61 72 72 61 79 2c 20 27 2e 67 | $key.'.:.should.be.an.array,.'.g |
e0840 | 65 74 74 79 70 65 28 24 66 75 6e 64 69 6e 67 4f 70 74 69 6f 6e 29 2e 27 20 67 69 76 65 6e 27 3b | ettype($fundingOption).'.given'; |
e0860 | 0a 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 66 75 6e 64 69 6e 67 27 5d 5b | .unset($this->config['funding'][ |
e0880 | 24 6b 65 79 5d 29 3b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 66 6f 72 65 61 63 68 20 28 5b 27 74 | $key]);.continue;.}.foreach.(['t |
e08a0 | 79 70 65 27 2c 20 27 75 72 6c 27 5d 20 61 73 20 24 66 75 6e 64 69 6e 67 44 61 74 61 29 20 7b 0a | ype',.'url'].as.$fundingData).{. |
e08c0 | 69 66 20 28 69 73 73 65 74 28 24 66 75 6e 64 69 6e 67 4f 70 74 69 6f 6e 5b 24 66 75 6e 64 69 6e | if.(isset($fundingOption[$fundin |
e08e0 | 67 44 61 74 61 5d 29 20 26 26 20 21 69 73 5f 73 74 72 69 6e 67 28 24 66 75 6e 64 69 6e 67 4f 70 | gData]).&&.!is_string($fundingOp |
e0900 | 74 69 6f 6e 5b 24 66 75 6e 64 69 6e 67 44 61 74 61 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 65 72 | tion[$fundingData])).{.$this->er |
e0920 | 72 6f 72 73 5b 5d 20 3d 20 27 66 75 6e 64 69 6e 67 2e 27 2e 24 6b 65 79 2e 27 2e 27 2e 24 66 75 | rors[].=.'funding.'.$key.'.'.$fu |
e0940 | 6e 64 69 6e 67 44 61 74 61 2e 27 20 3a 20 69 6e 76 61 6c 69 64 20 76 61 6c 75 65 2c 20 6d 75 73 | ndingData.'.:.invalid.value,.mus |
e0960 | 74 20 62 65 20 61 20 73 74 72 69 6e 67 27 3b 0a 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 63 6f 6e | t.be.a.string';.unset($this->con |
e0980 | 66 69 67 5b 27 66 75 6e 64 69 6e 67 27 5d 5b 24 6b 65 79 5d 5b 24 66 75 6e 64 69 6e 67 44 61 74 | fig['funding'][$key][$fundingDat |
e09a0 | 61 5d 29 3b 0a 7d 0a 7d 0a 69 66 20 28 69 73 73 65 74 28 24 66 75 6e 64 69 6e 67 4f 70 74 69 6f | a]);.}.}.if.(isset($fundingOptio |
e09c0 | 6e 5b 27 75 72 6c 27 5d 29 20 26 26 20 21 24 74 68 69 73 2d 3e 66 69 6c 74 65 72 55 72 6c 28 24 | n['url']).&&.!$this->filterUrl($ |
e09e0 | 66 75 6e 64 69 6e 67 4f 70 74 69 6f 6e 5b 27 75 72 6c 27 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e | fundingOption['url'])).{.$this-> |
e0a00 | 77 61 72 6e 69 6e 67 73 5b 5d 20 3d 20 27 66 75 6e 64 69 6e 67 2e 27 2e 24 6b 65 79 2e 27 2e 75 | warnings[].=.'funding.'.$key.'.u |
e0a20 | 72 6c 20 3a 20 69 6e 76 61 6c 69 64 20 76 61 6c 75 65 20 28 27 2e 24 66 75 6e 64 69 6e 67 4f 70 | rl.:.invalid.value.('.$fundingOp |
e0a40 | 74 69 6f 6e 5b 27 75 72 6c 27 5d 2e 27 29 2c 20 6d 75 73 74 20 62 65 20 61 6e 20 68 74 74 70 2f | tion['url'].'),.must.be.an.http/ |
e0a60 | 68 74 74 70 73 20 55 52 4c 27 3b 0a 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b | https.URL';.unset($this->config[ |
e0a80 | 27 66 75 6e 64 69 6e 67 27 5d 5b 24 6b 65 79 5d 5b 27 75 72 6c 27 5d 29 3b 0a 7d 0a 69 66 20 28 | 'funding'][$key]['url']);.}.if.( |
e0aa0 | 65 6d 70 74 79 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 66 75 6e 64 69 6e 67 27 5d 5b 24 | empty($this->config['funding'][$ |
e0ac0 | 6b 65 79 5d 29 29 20 7b 0a 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 66 75 | key])).{.unset($this->config['fu |
e0ae0 | 6e 64 69 6e 67 27 5d 5b 24 6b 65 79 5d 29 3b 0a 7d 0a 7d 0a 69 66 20 28 65 6d 70 74 79 28 24 74 | nding'][$key]);.}.}.if.(empty($t |
e0b00 | 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 66 75 6e 64 69 6e 67 27 5d 29 29 20 7b 0a 75 6e 73 65 74 | his->config['funding'])).{.unset |
e0b20 | 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 66 75 6e 64 69 6e 67 27 5d 29 3b 0a 7d 0a 7d 0a | ($this->config['funding']);.}.}. |
e0b40 | 0a 24 75 6e 62 6f 75 6e 64 43 6f 6e 73 74 72 61 69 6e 74 20 3d 20 6e 65 77 20 43 6f 6e 73 74 72 | .$unboundConstraint.=.new.Constr |
e0b60 | 61 69 6e 74 28 27 3d 27 2c 20 27 31 30 30 30 30 30 30 30 2d 64 65 76 27 29 3b 0a 24 73 74 61 62 | aint('=',.'10000000-dev');.$stab |
e0b80 | 6c 65 43 6f 6e 73 74 72 61 69 6e 74 20 3d 20 6e 65 77 20 43 6f 6e 73 74 72 61 69 6e 74 28 27 3d | leConstraint.=.new.Constraint('= |
e0ba0 | 27 2c 20 27 31 2e 30 2e 30 27 29 3b 0a 0a 66 6f 72 65 61 63 68 20 28 61 72 72 61 79 5f 6b 65 79 | ',.'1.0.0');..foreach.(array_key |
e0bc0 | 73 28 42 61 73 65 50 61 63 6b 61 67 65 3a 3a 24 73 75 70 70 6f 72 74 65 64 4c 69 6e 6b 54 79 70 | s(BasePackage::$supportedLinkTyp |
e0be0 | 65 73 29 20 61 73 20 24 6c 69 6e 6b 54 79 70 65 29 20 7b 0a 69 66 20 28 24 74 68 69 73 2d 3e 76 | es).as.$linkType).{.if.($this->v |
e0c00 | 61 6c 69 64 61 74 65 41 72 72 61 79 28 24 6c 69 6e 6b 54 79 70 65 29 20 26 26 20 69 73 73 65 74 | alidateArray($linkType).&&.isset |
e0c20 | 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 6c 69 6e 6b 54 79 70 65 5d 29 29 20 7b 0a 66 6f | ($this->config[$linkType])).{.fo |
e0c40 | 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 6c 69 6e 6b 54 79 70 65 5d 20 | reach.($this->config[$linkType]. |
e0c60 | 61 73 20 24 70 61 63 6b 61 67 65 20 3d 3e 20 24 63 6f 6e 73 74 72 61 69 6e 74 29 20 7b 0a 24 70 | as.$package.=>.$constraint).{.$p |
e0c80 | 61 63 6b 61 67 65 20 3d 20 28 73 74 72 69 6e 67 29 20 24 70 61 63 6b 61 67 65 3b 0a 69 66 20 28 | ackage.=.(string).$package;.if.( |
e0ca0 | 30 20 3d 3d 3d 20 73 74 72 63 61 73 65 63 6d 70 28 24 70 61 63 6b 61 67 65 2c 20 24 74 68 69 73 | 0.===.strcasecmp($package,.$this |
e0cc0 | 2d 3e 63 6f 6e 66 69 67 5b 27 6e 61 6d 65 27 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 65 72 72 6f | ->config['name'])).{.$this->erro |
e0ce0 | 72 73 5b 5d 20 3d 20 24 6c 69 6e 6b 54 79 70 65 2e 27 2e 27 2e 24 70 61 63 6b 61 67 65 2e 27 20 | rs[].=.$linkType.'.'.$package.'. |
e0d00 | 3a 20 61 20 70 61 63 6b 61 67 65 20 63 61 6e 6e 6f 74 20 73 65 74 20 61 20 27 2e 24 6c 69 6e 6b | :.a.package.cannot.set.a.'.$link |
e0d20 | 54 79 70 65 2e 27 20 6f 6e 20 69 74 73 65 6c 66 27 3b 0a 75 6e 73 65 74 28 24 74 68 69 73 2d 3e | Type.'.on.itself';.unset($this-> |
e0d40 | 63 6f 6e 66 69 67 5b 24 6c 69 6e 6b 54 79 70 65 5d 5b 24 70 61 63 6b 61 67 65 5d 29 3b 0a 63 6f | config[$linkType][$package]);.co |
e0d60 | 6e 74 69 6e 75 65 3b 0a 7d 0a 69 66 20 28 24 65 72 72 20 3d 20 73 65 6c 66 3a 3a 68 61 73 50 61 | ntinue;.}.if.($err.=.self::hasPa |
e0d80 | 63 6b 61 67 65 4e 61 6d 69 6e 67 45 72 72 6f 72 28 24 70 61 63 6b 61 67 65 2c 20 74 72 75 65 29 | ckageNamingError($package,.true) |
e0da0 | 29 20 7b 0a 24 74 68 69 73 2d 3e 77 61 72 6e 69 6e 67 73 5b 5d 20 3d 20 24 6c 69 6e 6b 54 79 70 | ).{.$this->warnings[].=.$linkTyp |
e0dc0 | 65 2e 27 2e 27 2e 24 65 72 72 3b 0a 7d 20 65 6c 73 65 69 66 20 28 21 50 72 65 67 3a 3a 69 73 4d | e.'.'.$err;.}.elseif.(!Preg::isM |
e0de0 | 61 74 63 68 28 27 7b 5e 5b 41 2d 5a 61 2d 7a 30 2d 39 5f 2e 2f 2d 5d 2b 24 7d 27 2c 20 24 70 61 | atch('{^[A-Za-z0-9_./-]+$}',.$pa |
e0e00 | 63 6b 61 67 65 29 29 20 7b 0a 24 74 68 69 73 2d 3e 65 72 72 6f 72 73 5b 5d 20 3d 20 24 6c 69 6e | ckage)).{.$this->errors[].=.$lin |
e0e20 | 6b 54 79 70 65 2e 27 2e 27 2e 24 70 61 63 6b 61 67 65 2e 27 20 3a 20 69 6e 76 61 6c 69 64 20 6b | kType.'.'.$package.'.:.invalid.k |
e0e40 | 65 79 2c 20 70 61 63 6b 61 67 65 20 6e 61 6d 65 73 20 6d 75 73 74 20 62 65 20 73 74 72 69 6e 67 | ey,.package.names.must.be.string |
e0e60 | 73 20 63 6f 6e 74 61 69 6e 69 6e 67 20 6f 6e 6c 79 20 5b 41 2d 5a 61 2d 7a 30 2d 39 5f 2e 2f 2d | s.containing.only.[A-Za-z0-9_./- |
e0e80 | 5d 27 3b 0a 7d 0a 69 66 20 28 21 69 73 5f 73 74 72 69 6e 67 28 24 63 6f 6e 73 74 72 61 69 6e 74 | ]';.}.if.(!is_string($constraint |
e0ea0 | 29 29 20 7b 0a 24 74 68 69 73 2d 3e 65 72 72 6f 72 73 5b 5d 20 3d 20 24 6c 69 6e 6b 54 79 70 65 | )).{.$this->errors[].=.$linkType |
e0ec0 | 2e 27 2e 27 2e 24 70 61 63 6b 61 67 65 2e 27 20 3a 20 69 6e 76 61 6c 69 64 20 76 61 6c 75 65 2c | .'.'.$package.'.:.invalid.value, |
e0ee0 | 20 6d 75 73 74 20 62 65 20 61 20 73 74 72 69 6e 67 20 63 6f 6e 74 61 69 6e 69 6e 67 20 61 20 76 | .must.be.a.string.containing.a.v |
e0f00 | 65 72 73 69 6f 6e 20 63 6f 6e 73 74 72 61 69 6e 74 27 3b 0a 75 6e 73 65 74 28 24 74 68 69 73 2d | ersion.constraint';.unset($this- |
e0f20 | 3e 63 6f 6e 66 69 67 5b 24 6c 69 6e 6b 54 79 70 65 5d 5b 24 70 61 63 6b 61 67 65 5d 29 3b 0a 7d | >config[$linkType][$package]);.} |
e0f40 | 20 65 6c 73 65 69 66 20 28 27 73 65 6c 66 2e 76 65 72 73 69 6f 6e 27 20 21 3d 3d 20 24 63 6f 6e | .elseif.('self.version'.!==.$con |
e0f60 | 73 74 72 61 69 6e 74 29 20 7b 0a 74 72 79 20 7b 0a 24 6c 69 6e 6b 43 6f 6e 73 74 72 61 69 6e 74 | straint).{.try.{.$linkConstraint |
e0f80 | 20 3d 20 24 74 68 69 73 2d 3e 76 65 72 73 69 6f 6e 50 61 72 73 65 72 2d 3e 70 61 72 73 65 43 6f | .=.$this->versionParser->parseCo |
e0fa0 | 6e 73 74 72 61 69 6e 74 73 28 24 63 6f 6e 73 74 72 61 69 6e 74 29 3b 0a 7d 20 63 61 74 63 68 20 | nstraints($constraint);.}.catch. |
e0fc0 | 28 5c 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 24 74 68 69 73 2d 3e 65 72 72 6f 72 73 5b | (\Exception.$e).{.$this->errors[ |
e0fe0 | 5d 20 3d 20 24 6c 69 6e 6b 54 79 70 65 2e 27 2e 27 2e 24 70 61 63 6b 61 67 65 2e 27 20 3a 20 69 | ].=.$linkType.'.'.$package.'.:.i |
e1000 | 6e 76 61 6c 69 64 20 76 65 72 73 69 6f 6e 20 63 6f 6e 73 74 72 61 69 6e 74 20 28 27 2e 24 65 2d | nvalid.version.constraint.('.$e- |
e1020 | 3e 67 65 74 4d 65 73 73 61 67 65 28 29 2e 27 29 27 3b 0a 75 6e 73 65 74 28 24 74 68 69 73 2d 3e | >getMessage().')';.unset($this-> |
e1040 | 63 6f 6e 66 69 67 5b 24 6c 69 6e 6b 54 79 70 65 5d 5b 24 70 61 63 6b 61 67 65 5d 29 3b 0a 63 6f | config[$linkType][$package]);.co |
e1060 | 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 0a 69 66 20 28 0a 28 24 74 68 69 73 2d 3e 66 6c 61 67 73 20 26 | ntinue;.}...if.(.($this->flags.& |
e1080 | 20 73 65 6c 66 3a 3a 43 48 45 43 4b 5f 55 4e 42 4f 55 4e 44 5f 43 4f 4e 53 54 52 41 49 4e 54 53 | .self::CHECK_UNBOUND_CONSTRAINTS |
e10a0 | 29 0a 26 26 20 27 72 65 71 75 69 72 65 27 20 3d 3d 3d 20 24 6c 69 6e 6b 54 79 70 65 0a 26 26 20 | ).&&.'require'.===.$linkType.&&. |
e10c0 | 24 6c 69 6e 6b 43 6f 6e 73 74 72 61 69 6e 74 2d 3e 6d 61 74 63 68 65 73 28 24 75 6e 62 6f 75 6e | $linkConstraint->matches($unboun |
e10e0 | 64 43 6f 6e 73 74 72 61 69 6e 74 29 0a 26 26 20 21 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 | dConstraint).&&.!PlatformReposit |
e1100 | 6f 72 79 3a 3a 69 73 50 6c 61 74 66 6f 72 6d 50 61 63 6b 61 67 65 28 24 70 61 63 6b 61 67 65 29 | ory::isPlatformPackage($package) |
e1120 | 0a 29 20 7b 0a 24 74 68 69 73 2d 3e 77 61 72 6e 69 6e 67 73 5b 5d 20 3d 20 24 6c 69 6e 6b 54 79 | .).{.$this->warnings[].=.$linkTy |
e1140 | 70 65 2e 27 2e 27 2e 24 70 61 63 6b 61 67 65 2e 27 20 3a 20 75 6e 62 6f 75 6e 64 20 76 65 72 73 | pe.'.'.$package.'.:.unbound.vers |
e1160 | 69 6f 6e 20 63 6f 6e 73 74 72 61 69 6e 74 73 20 28 27 2e 24 63 6f 6e 73 74 72 61 69 6e 74 2e 27 | ion.constraints.('.$constraint.' |
e1180 | 29 20 73 68 6f 75 6c 64 20 62 65 20 61 76 6f 69 64 65 64 27 3b 0a 7d 20 65 6c 73 65 69 66 20 28 | ).should.be.avoided';.}.elseif.( |
e11a0 | 0a 0a 28 24 74 68 69 73 2d 3e 66 6c 61 67 73 20 26 20 73 65 6c 66 3a 3a 43 48 45 43 4b 5f 53 54 | ..($this->flags.&.self::CHECK_ST |
e11c0 | 52 49 43 54 5f 43 4f 4e 53 54 52 41 49 4e 54 53 29 0a 26 26 20 27 72 65 71 75 69 72 65 27 20 3d | RICT_CONSTRAINTS).&&.'require'.= |
e11e0 | 3d 3d 20 24 6c 69 6e 6b 54 79 70 65 0a 26 26 20 24 6c 69 6e 6b 43 6f 6e 73 74 72 61 69 6e 74 20 | ==.$linkType.&&.$linkConstraint. |
e1200 | 69 6e 73 74 61 6e 63 65 6f 66 20 43 6f 6e 73 74 72 61 69 6e 74 20 26 26 20 69 6e 5f 61 72 72 61 | instanceof.Constraint.&&.in_arra |
e1220 | 79 28 24 6c 69 6e 6b 43 6f 6e 73 74 72 61 69 6e 74 2d 3e 67 65 74 4f 70 65 72 61 74 6f 72 28 29 | y($linkConstraint->getOperator() |
e1240 | 2c 20 5b 27 3d 3d 27 2c 20 27 3d 27 5d 2c 20 74 72 75 65 29 0a 26 26 20 28 6e 65 77 20 43 6f 6e | ,.['==',.'='],.true).&&.(new.Con |
e1260 | 73 74 72 61 69 6e 74 28 27 3e 3d 27 2c 20 27 31 2e 30 2e 30 2e 30 2d 64 65 76 27 29 29 2d 3e 6d | straint('>=',.'1.0.0.0-dev'))->m |
e1280 | 61 74 63 68 65 73 28 24 6c 69 6e 6b 43 6f 6e 73 74 72 61 69 6e 74 29 0a 29 20 7b 0a 24 74 68 69 | atches($linkConstraint).).{.$thi |
e12a0 | 73 2d 3e 77 61 72 6e 69 6e 67 73 5b 5d 20 3d 20 24 6c 69 6e 6b 54 79 70 65 2e 27 2e 27 2e 24 70 | s->warnings[].=.$linkType.'.'.$p |
e12c0 | 61 63 6b 61 67 65 2e 27 20 3a 20 65 78 61 63 74 20 76 65 72 73 69 6f 6e 20 63 6f 6e 73 74 72 61 | ackage.'.:.exact.version.constra |
e12e0 | 69 6e 74 73 20 28 27 2e 24 63 6f 6e 73 74 72 61 69 6e 74 2e 27 29 20 73 68 6f 75 6c 64 20 62 65 | ints.('.$constraint.').should.be |
e1300 | 20 61 76 6f 69 64 65 64 20 69 66 20 74 68 65 20 70 61 63 6b 61 67 65 20 66 6f 6c 6c 6f 77 73 20 | .avoided.if.the.package.follows. |
e1320 | 73 65 6d 61 6e 74 69 63 20 76 65 72 73 69 6f 6e 69 6e 67 27 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 24 | semantic.versioning';.}.}..if.($ |
e1340 | 6c 69 6e 6b 54 79 70 65 20 3d 3d 3d 20 27 63 6f 6e 66 6c 69 63 74 27 20 26 26 20 69 73 73 65 74 | linkType.===.'conflict'.&&.isset |
e1360 | 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 72 65 70 6c 61 63 65 27 5d 29 20 26 26 20 24 6b | ($this->config['replace']).&&.$k |
e1380 | 65 79 73 20 3d 20 61 72 72 61 79 5f 69 6e 74 65 72 73 65 63 74 5f 6b 65 79 28 24 74 68 69 73 2d | eys.=.array_intersect_key($this- |
e13a0 | 3e 63 6f 6e 66 69 67 5b 27 72 65 70 6c 61 63 65 27 5d 2c 20 24 74 68 69 73 2d 3e 63 6f 6e 66 69 | >config['replace'],.$this->confi |
e13c0 | 67 5b 27 63 6f 6e 66 6c 69 63 74 27 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 65 72 72 6f 72 73 5b | g['conflict'])).{.$this->errors[ |
e13e0 | 5d 20 3d 20 24 6c 69 6e 6b 54 79 70 65 2e 27 2e 27 2e 24 70 61 63 6b 61 67 65 2e 27 20 3a 20 79 | ].=.$linkType.'.'.$package.'.:.y |
e1400 | 6f 75 20 63 61 6e 6e 6f 74 20 63 6f 6e 66 6c 69 63 74 20 77 69 74 68 20 61 20 70 61 63 6b 61 67 | ou.cannot.conflict.with.a.packag |
e1420 | 65 20 74 68 61 74 20 69 73 20 61 6c 73 6f 20 72 65 70 6c 61 63 65 64 2c 20 61 73 20 72 65 70 6c | e.that.is.also.replaced,.as.repl |
e1440 | 61 63 65 20 61 6c 72 65 61 64 79 20 63 72 65 61 74 65 73 20 61 6e 20 69 6d 70 6c 69 63 69 74 20 | ace.already.creates.an.implicit. |
e1460 | 63 6f 6e 66 6c 69 63 74 20 72 75 6c 65 27 3b 0a 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 63 6f 6e | conflict.rule';.unset($this->con |
e1480 | 66 69 67 5b 24 6c 69 6e 6b 54 79 70 65 5d 5b 24 70 61 63 6b 61 67 65 5d 29 3b 0a 7d 0a 7d 0a 7d | fig[$linkType][$package]);.}.}.} |
e14a0 | 0a 7d 0a 0a 69 66 20 28 24 74 68 69 73 2d 3e 76 61 6c 69 64 61 74 65 41 72 72 61 79 28 27 73 75 | .}..if.($this->validateArray('su |
e14c0 | 67 67 65 73 74 27 29 20 26 26 20 21 65 6d 70 74 79 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b | ggest').&&.!empty($this->config[ |
e14e0 | 27 73 75 67 67 65 73 74 27 5d 29 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 63 | 'suggest'])).{.foreach.($this->c |
e1500 | 6f 6e 66 69 67 5b 27 73 75 67 67 65 73 74 27 5d 20 61 73 20 24 70 61 63 6b 61 67 65 20 3d 3e 20 | onfig['suggest'].as.$package.=>. |
e1520 | 24 64 65 73 63 72 69 70 74 69 6f 6e 29 20 7b 0a 69 66 20 28 21 69 73 5f 73 74 72 69 6e 67 28 24 | $description).{.if.(!is_string($ |
e1540 | 64 65 73 63 72 69 70 74 69 6f 6e 29 29 20 7b 0a 24 74 68 69 73 2d 3e 65 72 72 6f 72 73 5b 5d 20 | description)).{.$this->errors[]. |
e1560 | 3d 20 27 73 75 67 67 65 73 74 2e 27 2e 24 70 61 63 6b 61 67 65 2e 27 20 3a 20 69 6e 76 61 6c 69 | =.'suggest.'.$package.'.:.invali |
e1580 | 64 20 76 61 6c 75 65 2c 20 6d 75 73 74 20 62 65 20 61 20 73 74 72 69 6e 67 20 64 65 73 63 72 69 | d.value,.must.be.a.string.descri |
e15a0 | 62 69 6e 67 20 77 68 79 20 74 68 65 20 70 61 63 6b 61 67 65 20 69 73 20 73 75 67 67 65 73 74 65 | bing.why.the.package.is.suggeste |
e15c0 | 64 27 3b 0a 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 73 75 67 67 65 73 74 | d';.unset($this->config['suggest |
e15e0 | 27 5d 5b 24 70 61 63 6b 61 67 65 5d 29 3b 0a 7d 0a 7d 0a 7d 0a 0a 69 66 20 28 24 74 68 69 73 2d | '][$package]);.}.}.}..if.($this- |
e1600 | 3e 76 61 6c 69 64 61 74 65 53 74 72 69 6e 67 28 27 6d 69 6e 69 6d 75 6d 2d 73 74 61 62 69 6c 69 | >validateString('minimum-stabili |
e1620 | 74 79 27 29 20 26 26 20 21 65 6d 70 74 79 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 6d 69 | ty').&&.!empty($this->config['mi |
e1640 | 6e 69 6d 75 6d 2d 73 74 61 62 69 6c 69 74 79 27 5d 29 29 20 7b 0a 69 66 20 28 21 69 73 73 65 74 | nimum-stability'])).{.if.(!isset |
e1660 | 28 42 61 73 65 50 61 63 6b 61 67 65 3a 3a 24 73 74 61 62 69 6c 69 74 69 65 73 5b 73 74 72 74 6f | (BasePackage::$stabilities[strto |
e1680 | 6c 6f 77 65 72 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 6d 69 6e 69 6d 75 6d 2d 73 74 61 | lower($this->config['minimum-sta |
e16a0 | 62 69 6c 69 74 79 27 5d 29 5d 29 20 26 26 20 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 6d 69 | bility'])]).&&.$this->config['mi |
e16c0 | 6e 69 6d 75 6d 2d 73 74 61 62 69 6c 69 74 79 27 5d 20 21 3d 3d 20 27 52 43 27 29 20 7b 0a 24 74 | nimum-stability'].!==.'RC').{.$t |
e16e0 | 68 69 73 2d 3e 65 72 72 6f 72 73 5b 5d 20 3d 20 27 6d 69 6e 69 6d 75 6d 2d 73 74 61 62 69 6c 69 | his->errors[].=.'minimum-stabili |
e1700 | 74 79 20 3a 20 69 6e 76 61 6c 69 64 20 76 61 6c 75 65 20 28 27 2e 24 74 68 69 73 2d 3e 63 6f 6e | ty.:.invalid.value.('.$this->con |
e1720 | 66 69 67 5b 27 6d 69 6e 69 6d 75 6d 2d 73 74 61 62 69 6c 69 74 79 27 5d 2e 27 29 2c 20 6d 75 73 | fig['minimum-stability'].'),.mus |
e1740 | 74 20 62 65 20 6f 6e 65 20 6f 66 20 27 2e 69 6d 70 6c 6f 64 65 28 27 2c 20 27 2c 20 61 72 72 61 | t.be.one.of.'.implode(',.',.arra |
e1760 | 79 5f 6b 65 79 73 28 42 61 73 65 50 61 63 6b 61 67 65 3a 3a 24 73 74 61 62 69 6c 69 74 69 65 73 | y_keys(BasePackage::$stabilities |
e1780 | 29 29 3b 0a 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 6d 69 6e 69 6d 75 6d | ));.unset($this->config['minimum |
e17a0 | 2d 73 74 61 62 69 6c 69 74 79 27 5d 29 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 24 74 68 69 73 2d 3e 76 | -stability']);.}.}..if.($this->v |
e17c0 | 61 6c 69 64 61 74 65 41 72 72 61 79 28 27 61 75 74 6f 6c 6f 61 64 27 29 20 26 26 20 21 65 6d 70 | alidateArray('autoload').&&.!emp |
e17e0 | 74 79 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 61 75 74 6f 6c 6f 61 64 27 5d 29 29 20 7b | ty($this->config['autoload'])).{ |
e1800 | 0a 24 74 79 70 65 73 20 3d 20 5b 27 70 73 72 2d 30 27 2c 20 27 70 73 72 2d 34 27 2c 20 27 63 6c | .$types.=.['psr-0',.'psr-4',.'cl |
e1820 | 61 73 73 6d 61 70 27 2c 20 27 66 69 6c 65 73 27 2c 20 27 65 78 63 6c 75 64 65 2d 66 72 6f 6d 2d | assmap',.'files',.'exclude-from- |
e1840 | 63 6c 61 73 73 6d 61 70 27 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 63 6f 6e 66 | classmap'];.foreach.($this->conf |
e1860 | 69 67 5b 27 61 75 74 6f 6c 6f 61 64 27 5d 20 61 73 20 24 74 79 70 65 20 3d 3e 20 24 74 79 70 65 | ig['autoload'].as.$type.=>.$type |
e1880 | 43 6f 6e 66 69 67 29 20 7b 0a 69 66 20 28 21 69 6e 5f 61 72 72 61 79 28 24 74 79 70 65 2c 20 24 | Config).{.if.(!in_array($type,.$ |
e18a0 | 74 79 70 65 73 29 29 20 7b 0a 24 74 68 69 73 2d 3e 65 72 72 6f 72 73 5b 5d 20 3d 20 27 61 75 74 | types)).{.$this->errors[].=.'aut |
e18c0 | 6f 6c 6f 61 64 20 3a 20 69 6e 76 61 6c 69 64 20 76 61 6c 75 65 20 28 27 2e 24 74 79 70 65 2e 27 | oload.:.invalid.value.('.$type.' |
e18e0 | 29 2c 20 6d 75 73 74 20 62 65 20 6f 6e 65 20 6f 66 20 27 2e 69 6d 70 6c 6f 64 65 28 27 2c 20 27 | ),.must.be.one.of.'.implode(',.' |
e1900 | 2c 20 24 74 79 70 65 73 29 3b 0a 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 | ,.$types);.unset($this->config[' |
e1920 | 61 75 74 6f 6c 6f 61 64 27 5d 5b 24 74 79 70 65 5d 29 3b 0a 7d 0a 69 66 20 28 24 74 79 70 65 20 | autoload'][$type]);.}.if.($type. |
e1940 | 3d 3d 3d 20 27 70 73 72 2d 34 27 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 74 79 70 65 43 6f 6e | ===.'psr-4').{.foreach.($typeCon |
e1960 | 66 69 67 20 61 73 20 24 6e 61 6d 65 73 70 61 63 65 20 3d 3e 20 24 64 69 72 73 29 20 7b 0a 69 66 | fig.as.$namespace.=>.$dirs).{.if |
e1980 | 20 28 24 6e 61 6d 65 73 70 61 63 65 20 21 3d 3d 20 27 27 20 26 26 20 27 5c 5c 27 20 21 3d 3d 20 | .($namespace.!==.''.&&.'\\'.!==. |
e19a0 | 73 75 62 73 74 72 28 24 6e 61 6d 65 73 70 61 63 65 2c 20 2d 31 29 29 20 7b 0a 24 74 68 69 73 2d | substr($namespace,.-1)).{.$this- |
e19c0 | 3e 65 72 72 6f 72 73 5b 5d 20 3d 20 27 61 75 74 6f 6c 6f 61 64 2e 70 73 72 2d 34 20 3a 20 69 6e | >errors[].=.'autoload.psr-4.:.in |
e19e0 | 76 61 6c 69 64 20 76 61 6c 75 65 20 28 27 2e 24 6e 61 6d 65 73 70 61 63 65 2e 27 29 2c 20 6e 61 | valid.value.('.$namespace.'),.na |
e1a00 | 6d 65 73 70 61 63 65 73 20 6d 75 73 74 20 65 6e 64 20 77 69 74 68 20 61 20 6e 61 6d 65 73 70 61 | mespaces.must.end.with.a.namespa |
e1a20 | 63 65 20 73 65 70 61 72 61 74 6f 72 2c 20 73 68 6f 75 6c 64 20 62 65 20 27 2e 24 6e 61 6d 65 73 | ce.separator,.should.be.'.$names |
e1a40 | 70 61 63 65 2e 27 5c 5c 5c 5c 27 3b 0a 7d 0a 7d 0a 7d 0a 7d 0a 7d 0a 0a 69 66 20 28 21 65 6d 70 | pace.'\\\\';.}.}.}.}.}..if.(!emp |
e1a60 | 74 79 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 61 75 74 6f 6c 6f 61 64 27 5d 5b 27 70 73 | ty($this->config['autoload']['ps |
e1a80 | 72 2d 34 27 5d 29 20 26 26 20 21 65 6d 70 74 79 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 | r-4']).&&.!empty($this->config[' |
e1aa0 | 74 61 72 67 65 74 2d 64 69 72 27 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 65 72 72 6f 72 73 5b 5d | target-dir'])).{.$this->errors[] |
e1ac0 | 20 3d 20 27 74 61 72 67 65 74 2d 64 69 72 20 3a 20 74 68 69 73 20 63 61 6e 20 6e 6f 74 20 62 65 | .=.'target-dir.:.this.can.not.be |
e1ae0 | 20 75 73 65 64 20 74 6f 67 65 74 68 65 72 20 77 69 74 68 20 74 68 65 20 61 75 74 6f 6c 6f 61 64 | .used.together.with.the.autoload |
e1b00 | 2e 70 73 72 2d 34 20 73 65 74 74 69 6e 67 2c 20 72 65 6d 6f 76 65 20 74 61 72 67 65 74 2d 64 69 | .psr-4.setting,.remove.target-di |
e1b20 | 72 20 74 6f 20 75 70 67 72 61 64 65 20 74 6f 20 70 73 72 2d 34 27 3b 0a 0a 0a 75 6e 73 65 74 28 | r.to.upgrade.to.psr-4';...unset( |
e1b40 | 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 61 75 74 6f 6c 6f 61 64 27 5d 5b 27 70 73 72 2d 34 | $this->config['autoload']['psr-4 |
e1b60 | 27 5d 29 3b 0a 7d 0a 0a 66 6f 72 65 61 63 68 20 28 5b 27 73 6f 75 72 63 65 27 2c 20 27 64 69 73 | ']);.}..foreach.(['source',.'dis |
e1b80 | 74 27 5d 20 61 73 20 24 73 72 63 54 79 70 65 29 20 7b 0a 69 66 20 28 24 74 68 69 73 2d 3e 76 61 | t'].as.$srcType).{.if.($this->va |
e1ba0 | 6c 69 64 61 74 65 41 72 72 61 79 28 24 73 72 63 54 79 70 65 29 20 26 26 20 21 65 6d 70 74 79 28 | lidateArray($srcType).&&.!empty( |
e1bc0 | 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 73 72 63 54 79 70 65 5d 29 29 20 7b 0a 69 66 20 28 | $this->config[$srcType])).{.if.( |
e1be0 | 21 69 73 73 65 74 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 73 72 63 54 79 70 65 5d 5b 27 | !isset($this->config[$srcType][' |
e1c00 | 74 79 70 65 27 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 65 72 72 6f 72 73 5b 5d 20 3d 20 24 73 72 | type'])).{.$this->errors[].=.$sr |
e1c20 | 63 54 79 70 65 20 2e 20 27 2e 74 79 70 65 20 3a 20 6d 75 73 74 20 62 65 20 70 72 65 73 65 6e 74 | cType...'.type.:.must.be.present |
e1c40 | 27 3b 0a 7d 0a 69 66 20 28 21 69 73 73 65 74 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 73 | ';.}.if.(!isset($this->config[$s |
e1c60 | 72 63 54 79 70 65 5d 5b 27 75 72 6c 27 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 65 72 72 6f 72 73 | rcType]['url'])).{.$this->errors |
e1c80 | 5b 5d 20 3d 20 24 73 72 63 54 79 70 65 20 2e 20 27 2e 75 72 6c 20 3a 20 6d 75 73 74 20 62 65 20 | [].=.$srcType...'.url.:.must.be. |
e1ca0 | 70 72 65 73 65 6e 74 27 3b 0a 7d 0a 69 66 20 28 24 73 72 63 54 79 70 65 20 3d 3d 3d 20 27 73 6f | present';.}.if.($srcType.===.'so |
e1cc0 | 75 72 63 65 27 20 26 26 20 21 69 73 73 65 74 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 73 | urce'.&&.!isset($this->config[$s |
e1ce0 | 72 63 54 79 70 65 5d 5b 27 72 65 66 65 72 65 6e 63 65 27 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e | rcType]['reference'])).{.$this-> |
e1d00 | 65 72 72 6f 72 73 5b 5d 20 3d 20 24 73 72 63 54 79 70 65 20 2e 20 27 2e 72 65 66 65 72 65 6e 63 | errors[].=.$srcType...'.referenc |
e1d20 | 65 20 3a 20 6d 75 73 74 20 62 65 20 70 72 65 73 65 6e 74 27 3b 0a 7d 0a 69 66 20 28 69 73 73 65 | e.:.must.be.present';.}.if.(isse |
e1d40 | 74 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 73 72 63 54 79 70 65 5d 5b 27 74 79 70 65 27 | t($this->config[$srcType]['type' |
e1d60 | 5d 29 20 26 26 20 21 69 73 5f 73 74 72 69 6e 67 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 | ]).&&.!is_string($this->config[$ |
e1d80 | 73 72 63 54 79 70 65 5d 5b 27 74 79 70 65 27 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 65 72 72 6f | srcType]['type'])).{.$this->erro |
e1da0 | 72 73 5b 5d 20 3d 20 24 73 72 63 54 79 70 65 20 2e 20 27 2e 74 79 70 65 20 3a 20 73 68 6f 75 6c | rs[].=.$srcType...'.type.:.shoul |
e1dc0 | 64 20 62 65 20 61 20 73 74 72 69 6e 67 2c 20 27 2e 67 65 74 74 79 70 65 28 24 74 68 69 73 2d 3e | d.be.a.string,.'.gettype($this-> |
e1de0 | 63 6f 6e 66 69 67 5b 24 73 72 63 54 79 70 65 5d 5b 27 74 79 70 65 27 5d 29 2e 27 20 67 69 76 65 | config[$srcType]['type']).'.give |
e1e00 | 6e 27 3b 0a 7d 0a 69 66 20 28 69 73 73 65 74 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 73 | n';.}.if.(isset($this->config[$s |
e1e20 | 72 63 54 79 70 65 5d 5b 27 75 72 6c 27 5d 29 20 26 26 20 21 69 73 5f 73 74 72 69 6e 67 28 24 74 | rcType]['url']).&&.!is_string($t |
e1e40 | 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 73 72 63 54 79 70 65 5d 5b 27 75 72 6c 27 5d 29 29 20 7b | his->config[$srcType]['url'])).{ |
e1e60 | 0a 24 74 68 69 73 2d 3e 65 72 72 6f 72 73 5b 5d 20 3d 20 24 73 72 63 54 79 70 65 20 2e 20 27 2e | .$this->errors[].=.$srcType...'. |
e1e80 | 75 72 6c 20 3a 20 73 68 6f 75 6c 64 20 62 65 20 61 20 73 74 72 69 6e 67 2c 20 27 2e 67 65 74 74 | url.:.should.be.a.string,.'.gett |
e1ea0 | 79 70 65 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 73 72 63 54 79 70 65 5d 5b 27 75 72 6c | ype($this->config[$srcType]['url |
e1ec0 | 27 5d 29 2e 27 20 67 69 76 65 6e 27 3b 0a 7d 0a 69 66 20 28 69 73 73 65 74 28 24 74 68 69 73 2d | ']).'.given';.}.if.(isset($this- |
e1ee0 | 3e 63 6f 6e 66 69 67 5b 24 73 72 63 54 79 70 65 5d 5b 27 72 65 66 65 72 65 6e 63 65 27 5d 29 20 | >config[$srcType]['reference']). |
e1f00 | 26 26 20 21 69 73 5f 73 74 72 69 6e 67 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 73 72 63 | &&.!is_string($this->config[$src |
e1f20 | 54 79 70 65 5d 5b 27 72 65 66 65 72 65 6e 63 65 27 5d 29 20 26 26 20 21 69 73 5f 69 6e 74 28 24 | Type]['reference']).&&.!is_int($ |
e1f40 | 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 73 72 63 54 79 70 65 5d 5b 27 72 65 66 65 72 65 6e 63 | this->config[$srcType]['referenc |
e1f60 | 65 27 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 65 72 72 6f 72 73 5b 5d 20 3d 20 24 73 72 63 54 79 | e'])).{.$this->errors[].=.$srcTy |
e1f80 | 70 65 20 2e 20 27 2e 72 65 66 65 72 65 6e 63 65 20 3a 20 73 68 6f 75 6c 64 20 62 65 20 61 20 73 | pe...'.reference.:.should.be.a.s |
e1fa0 | 74 72 69 6e 67 20 6f 72 20 69 6e 74 2c 20 27 2e 67 65 74 74 79 70 65 28 24 74 68 69 73 2d 3e 63 | tring.or.int,.'.gettype($this->c |
e1fc0 | 6f 6e 66 69 67 5b 24 73 72 63 54 79 70 65 5d 5b 27 72 65 66 65 72 65 6e 63 65 27 5d 29 2e 27 20 | onfig[$srcType]['reference']).'. |
e1fe0 | 67 69 76 65 6e 27 3b 0a 7d 0a 69 66 20 28 69 73 73 65 74 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 | given';.}.if.(isset($this->confi |
e2000 | 67 5b 24 73 72 63 54 79 70 65 5d 5b 27 72 65 66 65 72 65 6e 63 65 27 5d 29 20 26 26 20 50 72 65 | g[$srcType]['reference']).&&.Pre |
e2020 | 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b 5e 5c 73 2a 2d 7d 27 2c 20 28 73 74 72 69 6e 67 29 20 24 | g::isMatch('{^\s*-}',.(string).$ |
e2040 | 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 73 72 63 54 79 70 65 5d 5b 27 72 65 66 65 72 65 6e 63 | this->config[$srcType]['referenc |
e2060 | 65 27 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 65 72 72 6f 72 73 5b 5d 20 3d 20 24 73 72 63 54 79 | e'])).{.$this->errors[].=.$srcTy |
e2080 | 70 65 20 2e 20 27 2e 72 65 66 65 72 65 6e 63 65 20 3a 20 6d 75 73 74 20 6e 6f 74 20 73 74 61 72 | pe...'.reference.:.must.not.star |
e20a0 | 74 20 77 69 74 68 20 61 20 22 2d 22 2c 20 22 27 2e 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 | t.with.a."-",."'.$this->config[$ |
e20c0 | 73 72 63 54 79 70 65 5d 5b 27 72 65 66 65 72 65 6e 63 65 27 5d 2e 27 22 20 67 69 76 65 6e 27 3b | srcType]['reference'].'".given'; |
e20e0 | 0a 7d 0a 69 66 20 28 69 73 73 65 74 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 73 72 63 54 | .}.if.(isset($this->config[$srcT |
e2100 | 79 70 65 5d 5b 27 75 72 6c 27 5d 29 20 26 26 20 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b | ype]['url']).&&.Preg::isMatch('{ |
e2120 | 5e 5c 73 2a 2d 7d 27 2c 20 28 73 74 72 69 6e 67 29 20 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b | ^\s*-}',.(string).$this->config[ |
e2140 | 24 73 72 63 54 79 70 65 5d 5b 27 75 72 6c 27 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 65 72 72 6f | $srcType]['url'])).{.$this->erro |
e2160 | 72 73 5b 5d 20 3d 20 24 73 72 63 54 79 70 65 20 2e 20 27 2e 75 72 6c 20 3a 20 6d 75 73 74 20 6e | rs[].=.$srcType...'.url.:.must.n |
e2180 | 6f 74 20 73 74 61 72 74 20 77 69 74 68 20 61 20 22 2d 22 2c 20 22 27 2e 24 74 68 69 73 2d 3e 63 | ot.start.with.a."-",."'.$this->c |
e21a0 | 6f 6e 66 69 67 5b 24 73 72 63 54 79 70 65 5d 5b 27 75 72 6c 27 5d 2e 27 22 20 67 69 76 65 6e 27 | onfig[$srcType]['url'].'".given' |
e21c0 | 3b 0a 7d 0a 7d 0a 7d 0a 0a 0a 0a 0a 24 74 68 69 73 2d 3e 76 61 6c 69 64 61 74 65 46 6c 61 74 41 | ;.}.}.}.....$this->validateFlatA |
e21e0 | 72 72 61 79 28 27 69 6e 63 6c 75 64 65 2d 70 61 74 68 27 29 3b 0a 24 74 68 69 73 2d 3e 76 61 6c | rray('include-path');.$this->val |
e2200 | 69 64 61 74 65 41 72 72 61 79 28 27 74 72 61 6e 73 70 6f 72 74 2d 6f 70 74 69 6f 6e 73 27 29 3b | idateArray('transport-options'); |
e2220 | 0a 0a 0a 69 66 20 28 69 73 73 65 74 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 65 78 74 72 | ...if.(isset($this->config['extr |
e2240 | 61 27 5d 5b 27 62 72 61 6e 63 68 2d 61 6c 69 61 73 27 5d 29 29 20 7b 0a 69 66 20 28 21 69 73 5f | a']['branch-alias'])).{.if.(!is_ |
e2260 | 61 72 72 61 79 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 65 78 74 72 61 27 5d 5b 27 62 72 | array($this->config['extra']['br |
e2280 | 61 6e 63 68 2d 61 6c 69 61 73 27 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 65 72 72 6f 72 73 5b 5d | anch-alias'])).{.$this->errors[] |
e22a0 | 20 3d 20 27 65 78 74 72 61 2e 62 72 61 6e 63 68 2d 61 6c 69 61 73 20 3a 20 6d 75 73 74 20 62 65 | .=.'extra.branch-alias.:.must.be |
e22c0 | 20 61 6e 20 61 72 72 61 79 20 6f 66 20 76 65 72 73 69 6f 6e 73 20 3d 3e 20 61 6c 69 61 73 65 73 | .an.array.of.versions.=>.aliases |
e22e0 | 27 3b 0a 7d 20 65 6c 73 65 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 63 6f 6e 66 | ';.}.else.{.foreach.($this->conf |
e2300 | 69 67 5b 27 65 78 74 72 61 27 5d 5b 27 62 72 61 6e 63 68 2d 61 6c 69 61 73 27 5d 20 61 73 20 24 | ig['extra']['branch-alias'].as.$ |
e2320 | 73 6f 75 72 63 65 42 72 61 6e 63 68 20 3d 3e 20 24 74 61 72 67 65 74 42 72 61 6e 63 68 29 20 7b | sourceBranch.=>.$targetBranch).{ |
e2340 | 0a 69 66 20 28 21 69 73 5f 73 74 72 69 6e 67 28 24 74 61 72 67 65 74 42 72 61 6e 63 68 29 29 20 | .if.(!is_string($targetBranch)). |
e2360 | 7b 0a 24 74 68 69 73 2d 3e 77 61 72 6e 69 6e 67 73 5b 5d 20 3d 20 27 65 78 74 72 61 2e 62 72 61 | {.$this->warnings[].=.'extra.bra |
e2380 | 6e 63 68 2d 61 6c 69 61 73 2e 27 2e 24 73 6f 75 72 63 65 42 72 61 6e 63 68 2e 27 20 3a 20 74 68 | nch-alias.'.$sourceBranch.'.:.th |
e23a0 | 65 20 74 61 72 67 65 74 20 62 72 61 6e 63 68 20 28 27 2e 6a 73 6f 6e 5f 65 6e 63 6f 64 65 28 24 | e.target.branch.('.json_encode($ |
e23c0 | 74 61 72 67 65 74 42 72 61 6e 63 68 29 2e 27 29 20 6d 75 73 74 20 62 65 20 61 20 73 74 72 69 6e | targetBranch).').must.be.a.strin |
e23e0 | 67 2c 20 22 27 2e 67 65 74 74 79 70 65 28 24 74 61 72 67 65 74 42 72 61 6e 63 68 29 2e 27 22 20 | g,."'.gettype($targetBranch).'". |
e2400 | 72 65 63 65 69 76 65 64 2e 27 3b 0a 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b | received.';.unset($this->config[ |
e2420 | 27 65 78 74 72 61 27 5d 5b 27 62 72 61 6e 63 68 2d 61 6c 69 61 73 27 5d 5b 24 73 6f 75 72 63 65 | 'extra']['branch-alias'][$source |
e2440 | 42 72 61 6e 63 68 5d 29 3b 0a 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 0a 69 66 20 28 27 2d 64 | Branch]);..continue;.}...if.('-d |
e2460 | 65 76 27 20 21 3d 3d 20 73 75 62 73 74 72 28 24 74 61 72 67 65 74 42 72 61 6e 63 68 2c 20 2d 34 | ev'.!==.substr($targetBranch,.-4 |
e2480 | 29 29 20 7b 0a 24 74 68 69 73 2d 3e 77 61 72 6e 69 6e 67 73 5b 5d 20 3d 20 27 65 78 74 72 61 2e | )).{.$this->warnings[].=.'extra. |
e24a0 | 62 72 61 6e 63 68 2d 61 6c 69 61 73 2e 27 2e 24 73 6f 75 72 63 65 42 72 61 6e 63 68 2e 27 20 3a | branch-alias.'.$sourceBranch.'.: |
e24c0 | 20 74 68 65 20 74 61 72 67 65 74 20 62 72 61 6e 63 68 20 28 27 2e 24 74 61 72 67 65 74 42 72 61 | .the.target.branch.('.$targetBra |
e24e0 | 6e 63 68 2e 27 29 20 6d 75 73 74 20 65 6e 64 20 69 6e 20 2d 64 65 76 27 3b 0a 75 6e 73 65 74 28 | nch.').must.end.in.-dev';.unset( |
e2500 | 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 65 78 74 72 61 27 5d 5b 27 62 72 61 6e 63 68 2d 61 | $this->config['extra']['branch-a |
e2520 | 6c 69 61 73 27 5d 5b 24 73 6f 75 72 63 65 42 72 61 6e 63 68 5d 29 3b 0a 0a 63 6f 6e 74 69 6e 75 | lias'][$sourceBranch]);..continu |
e2540 | 65 3b 0a 7d 0a 0a 0a 24 76 61 6c 69 64 61 74 65 64 54 61 72 67 65 74 42 72 61 6e 63 68 20 3d 20 | e;.}...$validatedTargetBranch.=. |
e2560 | 24 74 68 69 73 2d 3e 76 65 72 73 69 6f 6e 50 61 72 73 65 72 2d 3e 6e 6f 72 6d 61 6c 69 7a 65 42 | $this->versionParser->normalizeB |
e2580 | 72 61 6e 63 68 28 73 75 62 73 74 72 28 24 74 61 72 67 65 74 42 72 61 6e 63 68 2c 20 30 2c 20 2d | ranch(substr($targetBranch,.0,.- |
e25a0 | 34 29 29 3b 0a 69 66 20 28 27 2d 64 65 76 27 20 21 3d 3d 20 73 75 62 73 74 72 28 24 76 61 6c 69 | 4));.if.('-dev'.!==.substr($vali |
e25c0 | 64 61 74 65 64 54 61 72 67 65 74 42 72 61 6e 63 68 2c 20 2d 34 29 29 20 7b 0a 24 74 68 69 73 2d | datedTargetBranch,.-4)).{.$this- |
e25e0 | 3e 77 61 72 6e 69 6e 67 73 5b 5d 20 3d 20 27 65 78 74 72 61 2e 62 72 61 6e 63 68 2d 61 6c 69 61 | >warnings[].=.'extra.branch-alia |
e2600 | 73 2e 27 2e 24 73 6f 75 72 63 65 42 72 61 6e 63 68 2e 27 20 3a 20 74 68 65 20 74 61 72 67 65 74 | s.'.$sourceBranch.'.:.the.target |
e2620 | 20 62 72 61 6e 63 68 20 28 27 2e 24 74 61 72 67 65 74 42 72 61 6e 63 68 2e 27 29 20 6d 75 73 74 | .branch.('.$targetBranch.').must |
e2640 | 20 62 65 20 61 20 70 61 72 73 65 61 62 6c 65 20 6e 75 6d 62 65 72 20 6c 69 6b 65 20 32 2e 30 2d | .be.a.parseable.number.like.2.0- |
e2660 | 64 65 76 27 3b 0a 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 65 78 74 72 61 | dev';.unset($this->config['extra |
e2680 | 27 5d 5b 27 62 72 61 6e 63 68 2d 61 6c 69 61 73 27 5d 5b 24 73 6f 75 72 63 65 42 72 61 6e 63 68 | ']['branch-alias'][$sourceBranch |
e26a0 | 5d 29 3b 0a 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 0a 69 66 20 28 28 24 73 6f 75 72 63 65 50 | ]);..continue;.}...if.(($sourceP |
e26c0 | 72 65 66 69 78 20 3d 20 24 74 68 69 73 2d 3e 76 65 72 73 69 6f 6e 50 61 72 73 65 72 2d 3e 70 61 | refix.=.$this->versionParser->pa |
e26e0 | 72 73 65 4e 75 6d 65 72 69 63 41 6c 69 61 73 50 72 65 66 69 78 28 24 73 6f 75 72 63 65 42 72 61 | rseNumericAliasPrefix($sourceBra |
e2700 | 6e 63 68 29 29 0a 26 26 20 28 24 74 61 72 67 65 74 50 72 65 66 69 78 20 3d 20 24 74 68 69 73 2d | nch)).&&.($targetPrefix.=.$this- |
e2720 | 3e 76 65 72 73 69 6f 6e 50 61 72 73 65 72 2d 3e 70 61 72 73 65 4e 75 6d 65 72 69 63 41 6c 69 61 | >versionParser->parseNumericAlia |
e2740 | 73 50 72 65 66 69 78 28 24 74 61 72 67 65 74 42 72 61 6e 63 68 29 29 0a 26 26 20 28 73 74 72 69 | sPrefix($targetBranch)).&&.(stri |
e2760 | 70 6f 73 28 24 74 61 72 67 65 74 50 72 65 66 69 78 2c 20 24 73 6f 75 72 63 65 50 72 65 66 69 78 | pos($targetPrefix,.$sourcePrefix |
e2780 | 29 20 21 3d 3d 20 30 29 0a 29 20 7b 0a 24 74 68 69 73 2d 3e 77 61 72 6e 69 6e 67 73 5b 5d 20 3d | ).!==.0).).{.$this->warnings[].= |
e27a0 | 20 27 65 78 74 72 61 2e 62 72 61 6e 63 68 2d 61 6c 69 61 73 2e 27 2e 24 73 6f 75 72 63 65 42 72 | .'extra.branch-alias.'.$sourceBr |
e27c0 | 61 6e 63 68 2e 27 20 3a 20 74 68 65 20 74 61 72 67 65 74 20 62 72 61 6e 63 68 20 28 27 2e 24 74 | anch.'.:.the.target.branch.('.$t |
e27e0 | 61 72 67 65 74 42 72 61 6e 63 68 2e 27 29 20 69 73 20 6e 6f 74 20 61 20 76 61 6c 69 64 20 6e 75 | argetBranch.').is.not.a.valid.nu |
e2800 | 6d 65 72 69 63 20 61 6c 69 61 73 20 66 6f 72 20 74 68 69 73 20 76 65 72 73 69 6f 6e 27 3b 0a 75 | meric.alias.for.this.version';.u |
e2820 | 6e 73 65 74 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 27 65 78 74 72 61 27 5d 5b 27 62 72 61 | nset($this->config['extra']['bra |
e2840 | 6e 63 68 2d 61 6c 69 61 73 27 5d 5b 24 73 6f 75 72 63 65 42 72 61 6e 63 68 5d 29 3b 0a 7d 0a 7d | nch-alias'][$sourceBranch]);.}.} |
e2860 | 0a 7d 0a 7d 0a 0a 69 66 20 28 24 74 68 69 73 2d 3e 65 72 72 6f 72 73 29 20 7b 0a 74 68 72 6f 77 | .}.}..if.($this->errors).{.throw |
e2880 | 20 6e 65 77 20 49 6e 76 61 6c 69 64 50 61 63 6b 61 67 65 45 78 63 65 70 74 69 6f 6e 28 24 74 68 | .new.InvalidPackageException($th |
e28a0 | 69 73 2d 3e 65 72 72 6f 72 73 2c 20 24 74 68 69 73 2d 3e 77 61 72 6e 69 6e 67 73 2c 20 24 63 6f | is->errors,.$this->warnings,.$co |
e28c0 | 6e 66 69 67 29 3b 0a 7d 0a 0a 24 70 61 63 6b 61 67 65 20 3d 20 24 74 68 69 73 2d 3e 6c 6f 61 64 | nfig);.}..$package.=.$this->load |
e28e0 | 65 72 2d 3e 6c 6f 61 64 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 2c 20 24 63 6c 61 73 73 29 3b | er->load($this->config,.$class); |
e2900 | 0a 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 20 3d 20 5b 5d 3b 0a 0a 72 65 74 75 72 6e 20 24 70 61 | .$this->config.=.[];..return.$pa |
e2920 | 63 6b 61 67 65 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 | ckage;.}.....public.function.get |
e2940 | 57 61 72 6e 69 6e 67 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 | Warnings():.array.{.return.$this |
e2960 | 2d 3e 77 61 72 6e 69 6e 67 73 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f | ->warnings;.}.....public.functio |
e2980 | 6e 20 67 65 74 45 72 72 6f 72 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 | n.getErrors():.array.{.return.$t |
e29a0 | 68 69 73 2d 3e 65 72 72 6f 72 73 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 66 75 | his->errors;.}..public.static.fu |
e29c0 | 6e 63 74 69 6f 6e 20 68 61 73 50 61 63 6b 61 67 65 4e 61 6d 69 6e 67 45 72 72 6f 72 28 73 74 72 | nction.hasPackageNamingError(str |
e29e0 | 69 6e 67 20 24 6e 61 6d 65 2c 20 62 6f 6f 6c 20 24 69 73 4c 69 6e 6b 20 3d 20 66 61 6c 73 65 29 | ing.$name,.bool.$isLink.=.false) |
e2a00 | 3a 20 3f 73 74 72 69 6e 67 0a 7b 0a 69 66 20 28 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f | :.?string.{.if.(PlatformReposito |
e2a20 | 72 79 3a 3a 69 73 50 6c 61 74 66 6f 72 6d 50 61 63 6b 61 67 65 28 24 6e 61 6d 65 29 29 20 7b 0a | ry::isPlatformPackage($name)).{. |
e2a40 | 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0a 7d 0a 0a 69 66 20 28 21 50 72 65 67 3a 3a 69 73 4d 61 74 | return.null;.}..if.(!Preg::isMat |
e2a60 | 63 68 28 27 7b 5e 5b 61 2d 7a 30 2d 39 5d 28 3f 3a 5b 5f 2e 2d 5d 3f 5b 61 2d 7a 30 2d 39 5d 2b | ch('{^[a-z0-9](?:[_.-]?[a-z0-9]+ |
e2a80 | 2b 29 2a 2b 2f 5b 61 2d 7a 30 2d 39 5d 28 3f 3a 28 3f 3a 5b 5f 2e 5d 7c 2d 7b 31 2c 32 7d 29 3f | +)*+/[a-z0-9](?:(?:[_.]|-{1,2})? |
e2aa0 | 5b 61 2d 7a 30 2d 39 5d 2b 2b 29 2a 2b 24 7d 69 44 27 2c 20 24 6e 61 6d 65 29 29 20 7b 0a 72 65 | [a-z0-9]++)*+$}iD',.$name)).{.re |
e2ac0 | 74 75 72 6e 20 24 6e 61 6d 65 2e 27 20 69 73 20 69 6e 76 61 6c 69 64 2c 20 69 74 20 73 68 6f 75 | turn.$name.'.is.invalid,.it.shou |
e2ae0 | 6c 64 20 68 61 76 65 20 61 20 76 65 6e 64 6f 72 20 6e 61 6d 65 2c 20 61 20 66 6f 72 77 61 72 64 | ld.have.a.vendor.name,.a.forward |
e2b00 | 20 73 6c 61 73 68 2c 20 61 6e 64 20 61 20 70 61 63 6b 61 67 65 20 6e 61 6d 65 2e 20 54 68 65 20 | .slash,.and.a.package.name..The. |
e2b20 | 76 65 6e 64 6f 72 20 61 6e 64 20 70 61 63 6b 61 67 65 20 6e 61 6d 65 20 63 61 6e 20 62 65 20 77 | vendor.and.package.name.can.be.w |
e2b40 | 6f 72 64 73 20 73 65 70 61 72 61 74 65 64 20 62 79 20 2d 2c 20 2e 20 6f 72 20 5f 2e 20 54 68 65 | ords.separated.by.-,...or._..The |
e2b60 | 20 63 6f 6d 70 6c 65 74 65 20 6e 61 6d 65 20 73 68 6f 75 6c 64 20 6d 61 74 63 68 20 22 5e 5b 61 | .complete.name.should.match."^[a |
e2b80 | 2d 7a 30 2d 39 5d 28 5b 5f 2e 2d 5d 3f 5b 61 2d 7a 30 2d 39 5d 2b 29 2a 2f 5b 61 2d 7a 30 2d 39 | -z0-9]([_.-]?[a-z0-9]+)*/[a-z0-9 |
e2ba0 | 5d 28 28 5b 5f 2e 5d 3f 7c 2d 7b 30 2c 32 7d 29 5b 61 2d 7a 30 2d 39 5d 2b 29 2a 24 22 2e 27 3b | ](([_.]?|-{0,2})[a-z0-9]+)*$".'; |
e2bc0 | 0a 7d 0a 0a 24 72 65 73 65 72 76 65 64 4e 61 6d 65 73 20 3d 20 5b 27 6e 75 6c 27 2c 20 27 63 6f | .}..$reservedNames.=.['nul',.'co |
e2be0 | 6e 27 2c 20 27 70 72 6e 27 2c 20 27 61 75 78 27 2c 20 27 63 6f 6d 31 27 2c 20 27 63 6f 6d 32 27 | n',.'prn',.'aux',.'com1',.'com2' |
e2c00 | 2c 20 27 63 6f 6d 33 27 2c 20 27 63 6f 6d 34 27 2c 20 27 63 6f 6d 35 27 2c 20 27 63 6f 6d 36 27 | ,.'com3',.'com4',.'com5',.'com6' |
e2c20 | 2c 20 27 63 6f 6d 37 27 2c 20 27 63 6f 6d 38 27 2c 20 27 63 6f 6d 39 27 2c 20 27 6c 70 74 31 27 | ,.'com7',.'com8',.'com9',.'lpt1' |
e2c40 | 2c 20 27 6c 70 74 32 27 2c 20 27 6c 70 74 33 27 2c 20 27 6c 70 74 34 27 2c 20 27 6c 70 74 35 27 | ,.'lpt2',.'lpt3',.'lpt4',.'lpt5' |
e2c60 | 2c 20 27 6c 70 74 36 27 2c 20 27 6c 70 74 37 27 2c 20 27 6c 70 74 38 27 2c 20 27 6c 70 74 39 27 | ,.'lpt6',.'lpt7',.'lpt8',.'lpt9' |
e2c80 | 5d 3b 0a 24 62 69 74 73 20 3d 20 65 78 70 6c 6f 64 65 28 27 2f 27 2c 20 73 74 72 74 6f 6c 6f 77 | ];.$bits.=.explode('/',.strtolow |
e2ca0 | 65 72 28 24 6e 61 6d 65 29 29 3b 0a 69 66 20 28 69 6e 5f 61 72 72 61 79 28 24 62 69 74 73 5b 30 | er($name));.if.(in_array($bits[0 |
e2cc0 | 5d 2c 20 24 72 65 73 65 72 76 65 64 4e 61 6d 65 73 2c 20 74 72 75 65 29 20 7c 7c 20 69 6e 5f 61 | ],.$reservedNames,.true).||.in_a |
e2ce0 | 72 72 61 79 28 24 62 69 74 73 5b 31 5d 2c 20 24 72 65 73 65 72 76 65 64 4e 61 6d 65 73 2c 20 74 | rray($bits[1],.$reservedNames,.t |
e2d00 | 72 75 65 29 29 20 7b 0a 72 65 74 75 72 6e 20 24 6e 61 6d 65 2e 27 20 69 73 20 72 65 73 65 72 76 | rue)).{.return.$name.'.is.reserv |
e2d20 | 65 64 2c 20 70 61 63 6b 61 67 65 20 61 6e 64 20 76 65 6e 64 6f 72 20 6e 61 6d 65 73 20 63 61 6e | ed,.package.and.vendor.names.can |
e2d40 | 20 6e 6f 74 20 6d 61 74 63 68 20 61 6e 79 20 6f 66 3a 20 27 2e 69 6d 70 6c 6f 64 65 28 27 2c 20 | .not.match.any.of:.'.implode(',. |
e2d60 | 27 2c 20 24 72 65 73 65 72 76 65 64 4e 61 6d 65 73 29 2e 27 2e 27 3b 0a 7d 0a 0a 69 66 20 28 50 | ',.$reservedNames).'.';.}..if.(P |
e2d80 | 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b 5c 2e 6a 73 6f 6e 24 7d 27 2c 20 24 6e 61 6d 65 29 | reg::isMatch('{\.json$}',.$name) |
e2da0 | 29 20 7b 0a 72 65 74 75 72 6e 20 24 6e 61 6d 65 2e 27 20 69 73 20 69 6e 76 61 6c 69 64 2c 20 70 | ).{.return.$name.'.is.invalid,.p |
e2dc0 | 61 63 6b 61 67 65 20 6e 61 6d 65 73 20 63 61 6e 20 6e 6f 74 20 65 6e 64 20 69 6e 20 2e 6a 73 6f | ackage.names.can.not.end.in..jso |
e2de0 | 6e 2c 20 63 6f 6e 73 69 64 65 72 20 72 65 6e 61 6d 69 6e 67 20 69 74 20 6f 72 20 70 65 72 68 61 | n,.consider.renaming.it.or.perha |
e2e00 | 70 73 20 75 73 69 6e 67 20 61 20 2d 6a 73 6f 6e 20 73 75 66 66 69 78 20 69 6e 73 74 65 61 64 2e | ps.using.a.-json.suffix.instead. |
e2e20 | 27 3b 0a 7d 0a 0a 69 66 20 28 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b 5b 41 2d 5a 5d 7d | ';.}..if.(Preg::isMatch('{[A-Z]} |
e2e40 | 27 2c 20 24 6e 61 6d 65 29 29 20 7b 0a 69 66 20 28 24 69 73 4c 69 6e 6b 29 20 7b 0a 72 65 74 75 | ',.$name)).{.if.($isLink).{.retu |
e2e60 | 72 6e 20 24 6e 61 6d 65 2e 27 20 69 73 20 69 6e 76 61 6c 69 64 2c 20 69 74 20 73 68 6f 75 6c 64 | rn.$name.'.is.invalid,.it.should |
e2e80 | 20 6e 6f 74 20 63 6f 6e 74 61 69 6e 20 75 70 70 65 72 63 61 73 65 20 63 68 61 72 61 63 74 65 72 | .not.contain.uppercase.character |
e2ea0 | 73 2e 20 50 6c 65 61 73 65 20 75 73 65 20 27 2e 73 74 72 74 6f 6c 6f 77 65 72 28 24 6e 61 6d 65 | s..Please.use.'.strtolower($name |
e2ec0 | 29 2e 27 20 69 6e 73 74 65 61 64 2e 27 3b 0a 7d 0a 0a 24 73 75 67 67 65 73 74 4e 61 6d 65 20 3d | ).'.instead.';.}..$suggestName.= |
e2ee0 | 20 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 28 27 7b 28 3f 3a 28 5b 61 2d 7a 5d 29 28 5b 41 2d 5a | .Preg::replace('{(?:([a-z])([A-Z |
e2f00 | 5d 29 7c 28 5b 41 2d 5a 5d 29 28 5b 41 2d 5a 5d 5b 61 2d 7a 5d 29 29 7d 27 2c 20 27 5c 5c 31 5c | ])|([A-Z])([A-Z][a-z]))}',.'\\1\ |
e2f20 | 5c 33 2d 5c 5c 32 5c 5c 34 27 2c 20 24 6e 61 6d 65 29 3b 0a 24 73 75 67 67 65 73 74 4e 61 6d 65 | \3-\\2\\4',.$name);.$suggestName |
e2f40 | 20 3d 20 73 74 72 74 6f 6c 6f 77 65 72 28 24 73 75 67 67 65 73 74 4e 61 6d 65 29 3b 0a 0a 72 65 | .=.strtolower($suggestName);..re |
e2f60 | 74 75 72 6e 20 24 6e 61 6d 65 2e 27 20 69 73 20 69 6e 76 61 6c 69 64 2c 20 69 74 20 73 68 6f 75 | turn.$name.'.is.invalid,.it.shou |
e2f80 | 6c 64 20 6e 6f 74 20 63 6f 6e 74 61 69 6e 20 75 70 70 65 72 63 61 73 65 20 63 68 61 72 61 63 74 | ld.not.contain.uppercase.charact |
e2fa0 | 65 72 73 2e 20 57 65 20 73 75 67 67 65 73 74 20 75 73 69 6e 67 20 27 2e 24 73 75 67 67 65 73 74 | ers..We.suggest.using.'.$suggest |
e2fc0 | 4e 61 6d 65 2e 27 20 69 6e 73 74 65 61 64 2e 27 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 6e 75 6c 6c | Name.'.instead.';.}..return.null |
e2fe0 | 3b 0a 7d 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 76 61 6c 69 64 61 | ;.}......private.function.valida |
e3000 | 74 65 52 65 67 65 78 28 73 74 72 69 6e 67 20 24 70 72 6f 70 65 72 74 79 2c 20 73 74 72 69 6e 67 | teRegex(string.$property,.string |
e3020 | 20 24 72 65 67 65 78 2c 20 62 6f 6f 6c 20 24 6d 61 6e 64 61 74 6f 72 79 20 3d 20 66 61 6c 73 65 | .$regex,.bool.$mandatory.=.false |
e3040 | 29 3a 20 62 6f 6f 6c 0a 7b 0a 69 66 20 28 21 24 74 68 69 73 2d 3e 76 61 6c 69 64 61 74 65 53 74 | ):.bool.{.if.(!$this->validateSt |
e3060 | 72 69 6e 67 28 24 70 72 6f 70 65 72 74 79 2c 20 24 6d 61 6e 64 61 74 6f 72 79 29 29 20 7b 0a 72 | ring($property,.$mandatory)).{.r |
e3080 | 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 69 66 20 28 21 50 72 65 67 3a 3a 69 73 4d 61 74 | eturn.false;.}..if.(!Preg::isMat |
e30a0 | 63 68 28 27 7b 5e 27 2e 24 72 65 67 65 78 2e 27 24 7d 75 27 2c 20 24 74 68 69 73 2d 3e 63 6f 6e | ch('{^'.$regex.'$}u',.$this->con |
e30c0 | 66 69 67 5b 24 70 72 6f 70 65 72 74 79 5d 29 29 20 7b 0a 24 6d 65 73 73 61 67 65 20 3d 20 24 70 | fig[$property])).{.$message.=.$p |
e30e0 | 72 6f 70 65 72 74 79 2e 27 20 3a 20 69 6e 76 61 6c 69 64 20 76 61 6c 75 65 20 28 27 2e 24 74 68 | roperty.'.:.invalid.value.('.$th |
e3100 | 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 70 72 6f 70 65 72 74 79 5d 2e 27 29 2c 20 6d 75 73 74 20 6d | is->config[$property].'),.must.m |
e3120 | 61 74 63 68 20 27 2e 24 72 65 67 65 78 3b 0a 69 66 20 28 24 6d 61 6e 64 61 74 6f 72 79 29 20 7b | atch.'.$regex;.if.($mandatory).{ |
e3140 | 0a 24 74 68 69 73 2d 3e 65 72 72 6f 72 73 5b 5d 20 3d 20 24 6d 65 73 73 61 67 65 3b 0a 7d 20 65 | .$this->errors[].=.$message;.}.e |
e3160 | 6c 73 65 20 7b 0a 24 74 68 69 73 2d 3e 77 61 72 6e 69 6e 67 73 5b 5d 20 3d 20 24 6d 65 73 73 61 | lse.{.$this->warnings[].=.$messa |
e3180 | 67 65 3b 0a 7d 0a 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 70 72 6f 70 65 | ge;.}.unset($this->config[$prope |
e31a0 | 72 74 79 5d 29 3b 0a 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 | rty]);..return.false;.}..return. |
e31c0 | 74 72 75 65 3b 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 76 61 6c | true;.}.....private.function.val |
e31e0 | 69 64 61 74 65 53 74 72 69 6e 67 28 73 74 72 69 6e 67 20 24 70 72 6f 70 65 72 74 79 2c 20 62 6f | idateString(string.$property,.bo |
e3200 | 6f 6c 20 24 6d 61 6e 64 61 74 6f 72 79 20 3d 20 66 61 6c 73 65 29 3a 20 62 6f 6f 6c 0a 7b 0a 69 | ol.$mandatory.=.false):.bool.{.i |
e3220 | 66 20 28 69 73 73 65 74 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 70 72 6f 70 65 72 74 79 | f.(isset($this->config[$property |
e3240 | 5d 29 20 26 26 20 21 69 73 5f 73 74 72 69 6e 67 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 | ]).&&.!is_string($this->config[$ |
e3260 | 70 72 6f 70 65 72 74 79 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 65 72 72 6f 72 73 5b 5d 20 3d 20 | property])).{.$this->errors[].=. |
e3280 | 24 70 72 6f 70 65 72 74 79 2e 27 20 3a 20 73 68 6f 75 6c 64 20 62 65 20 61 20 73 74 72 69 6e 67 | $property.'.:.should.be.a.string |
e32a0 | 2c 20 27 2e 67 65 74 74 79 70 65 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 70 72 6f 70 65 | ,.'.gettype($this->config[$prope |
e32c0 | 72 74 79 5d 29 2e 27 20 67 69 76 65 6e 27 3b 0a 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 63 6f 6e | rty]).'.given';.unset($this->con |
e32e0 | 66 69 67 5b 24 70 72 6f 70 65 72 74 79 5d 29 3b 0a 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a | fig[$property]);..return.false;. |
e3300 | 7d 0a 0a 69 66 20 28 21 69 73 73 65 74 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 70 72 6f | }..if.(!isset($this->config[$pro |
e3320 | 70 65 72 74 79 5d 29 20 7c 7c 20 74 72 69 6d 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 70 | perty]).||.trim($this->config[$p |
e3340 | 72 6f 70 65 72 74 79 5d 29 20 3d 3d 3d 20 27 27 29 20 7b 0a 69 66 20 28 24 6d 61 6e 64 61 74 6f | roperty]).===.'').{.if.($mandato |
e3360 | 72 79 29 20 7b 0a 24 74 68 69 73 2d 3e 65 72 72 6f 72 73 5b 5d 20 3d 20 24 70 72 6f 70 65 72 74 | ry).{.$this->errors[].=.$propert |
e3380 | 79 2e 27 20 3a 20 6d 75 73 74 20 62 65 20 70 72 65 73 65 6e 74 27 3b 0a 7d 0a 75 6e 73 65 74 28 | y.'.:.must.be.present';.}.unset( |
e33a0 | 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 70 72 6f 70 65 72 74 79 5d 29 3b 0a 0a 72 65 74 75 | $this->config[$property]);..retu |
e33c0 | 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 0a 0a 0a 0a | rn.false;.}..return.true;.}..... |
e33e0 | 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 76 61 6c 69 64 61 74 65 41 72 72 61 79 28 73 | private.function.validateArray(s |
e3400 | 74 72 69 6e 67 20 24 70 72 6f 70 65 72 74 79 2c 20 62 6f 6f 6c 20 24 6d 61 6e 64 61 74 6f 72 79 | tring.$property,.bool.$mandatory |
e3420 | 20 3d 20 66 61 6c 73 65 29 3a 20 62 6f 6f 6c 0a 7b 0a 69 66 20 28 69 73 73 65 74 28 24 74 68 69 | .=.false):.bool.{.if.(isset($thi |
e3440 | 73 2d 3e 63 6f 6e 66 69 67 5b 24 70 72 6f 70 65 72 74 79 5d 29 20 26 26 20 21 69 73 5f 61 72 72 | s->config[$property]).&&.!is_arr |
e3460 | 61 79 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 70 72 6f 70 65 72 74 79 5d 29 29 20 7b 0a | ay($this->config[$property])).{. |
e3480 | 24 74 68 69 73 2d 3e 65 72 72 6f 72 73 5b 5d 20 3d 20 24 70 72 6f 70 65 72 74 79 2e 27 20 3a 20 | $this->errors[].=.$property.'.:. |
e34a0 | 73 68 6f 75 6c 64 20 62 65 20 61 6e 20 61 72 72 61 79 2c 20 27 2e 67 65 74 74 79 70 65 28 24 74 | should.be.an.array,.'.gettype($t |
e34c0 | 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 70 72 6f 70 65 72 74 79 5d 29 2e 27 20 67 69 76 65 6e 27 | his->config[$property]).'.given' |
e34e0 | 3b 0a 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 70 72 6f 70 65 72 74 79 5d | ;.unset($this->config[$property] |
e3500 | 29 3b 0a 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 69 66 20 28 21 69 73 73 65 74 28 | );..return.false;.}..if.(!isset( |
e3520 | 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 70 72 6f 70 65 72 74 79 5d 29 20 7c 7c 20 21 63 6f | $this->config[$property]).||.!co |
e3540 | 75 6e 74 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 70 72 6f 70 65 72 74 79 5d 29 29 20 7b | unt($this->config[$property])).{ |
e3560 | 0a 69 66 20 28 24 6d 61 6e 64 61 74 6f 72 79 29 20 7b 0a 24 74 68 69 73 2d 3e 65 72 72 6f 72 73 | .if.($mandatory).{.$this->errors |
e3580 | 5b 5d 20 3d 20 24 70 72 6f 70 65 72 74 79 2e 27 20 3a 20 6d 75 73 74 20 62 65 20 70 72 65 73 65 | [].=.$property.'.:.must.be.prese |
e35a0 | 6e 74 20 61 6e 64 20 63 6f 6e 74 61 69 6e 20 61 74 20 6c 65 61 73 74 20 6f 6e 65 20 65 6c 65 6d | nt.and.contain.at.least.one.elem |
e35c0 | 65 6e 74 27 3b 0a 7d 0a 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 70 72 6f | ent';.}.unset($this->config[$pro |
e35e0 | 70 65 72 74 79 5d 29 3b 0a 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 72 65 74 75 72 | perty]);..return.false;.}..retur |
e3600 | 6e 20 74 72 75 65 3b 0a 7d 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 | n.true;.}......private.function. |
e3620 | 76 61 6c 69 64 61 74 65 46 6c 61 74 41 72 72 61 79 28 73 74 72 69 6e 67 20 24 70 72 6f 70 65 72 | validateFlatArray(string.$proper |
e3640 | 74 79 2c 20 3f 73 74 72 69 6e 67 20 24 72 65 67 65 78 20 3d 20 6e 75 6c 6c 2c 20 62 6f 6f 6c 20 | ty,.?string.$regex.=.null,.bool. |
e3660 | 24 6d 61 6e 64 61 74 6f 72 79 20 3d 20 66 61 6c 73 65 29 3a 20 62 6f 6f 6c 0a 7b 0a 69 66 20 28 | $mandatory.=.false):.bool.{.if.( |
e3680 | 21 24 74 68 69 73 2d 3e 76 61 6c 69 64 61 74 65 41 72 72 61 79 28 24 70 72 6f 70 65 72 74 79 2c | !$this->validateArray($property, |
e36a0 | 20 24 6d 61 6e 64 61 74 6f 72 79 29 29 20 7b 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a | .$mandatory)).{.return.false;.}. |
e36c0 | 0a 24 70 61 73 73 20 3d 20 74 72 75 65 3b 0a 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 63 | .$pass.=.true;.foreach.($this->c |
e36e0 | 6f 6e 66 69 67 5b 24 70 72 6f 70 65 72 74 79 5d 20 61 73 20 24 6b 65 79 20 3d 3e 20 24 76 61 6c | onfig[$property].as.$key.=>.$val |
e3700 | 75 65 29 20 7b 0a 69 66 20 28 21 69 73 5f 73 74 72 69 6e 67 28 24 76 61 6c 75 65 29 20 26 26 20 | ue).{.if.(!is_string($value).&&. |
e3720 | 21 69 73 5f 6e 75 6d 65 72 69 63 28 24 76 61 6c 75 65 29 29 20 7b 0a 24 74 68 69 73 2d 3e 65 72 | !is_numeric($value)).{.$this->er |
e3740 | 72 6f 72 73 5b 5d 20 3d 20 24 70 72 6f 70 65 72 74 79 2e 27 2e 27 2e 24 6b 65 79 2e 27 20 3a 20 | rors[].=.$property.'.'.$key.'.:. |
e3760 | 6d 75 73 74 20 62 65 20 61 20 73 74 72 69 6e 67 20 6f 72 20 69 6e 74 2c 20 27 2e 67 65 74 74 79 | must.be.a.string.or.int,.'.getty |
e3780 | 70 65 28 24 76 61 6c 75 65 29 2e 27 20 67 69 76 65 6e 27 3b 0a 75 6e 73 65 74 28 24 74 68 69 73 | pe($value).'.given';.unset($this |
e37a0 | 2d 3e 63 6f 6e 66 69 67 5b 24 70 72 6f 70 65 72 74 79 5d 5b 24 6b 65 79 5d 29 3b 0a 24 70 61 73 | ->config[$property][$key]);.$pas |
e37c0 | 73 20 3d 20 66 61 6c 73 65 3b 0a 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 69 66 20 28 24 72 65 | s.=.false;..continue;.}..if.($re |
e37e0 | 67 65 78 20 26 26 20 21 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b 5e 27 2e 24 72 65 67 65 | gex.&&.!Preg::isMatch('{^'.$rege |
e3800 | 78 2e 27 24 7d 75 27 2c 20 24 76 61 6c 75 65 29 29 20 7b 0a 24 74 68 69 73 2d 3e 77 61 72 6e 69 | x.'$}u',.$value)).{.$this->warni |
e3820 | 6e 67 73 5b 5d 20 3d 20 24 70 72 6f 70 65 72 74 79 2e 27 2e 27 2e 24 6b 65 79 2e 27 20 3a 20 69 | ngs[].=.$property.'.'.$key.'.:.i |
e3840 | 6e 76 61 6c 69 64 20 76 61 6c 75 65 20 28 27 2e 24 76 61 6c 75 65 2e 27 29 2c 20 6d 75 73 74 20 | nvalid.value.('.$value.'),.must. |
e3860 | 6d 61 74 63 68 20 27 2e 24 72 65 67 65 78 3b 0a 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 63 6f 6e | match.'.$regex;.unset($this->con |
e3880 | 66 69 67 5b 24 70 72 6f 70 65 72 74 79 5d 5b 24 6b 65 79 5d 29 3b 0a 24 70 61 73 73 20 3d 20 66 | fig[$property][$key]);.$pass.=.f |
e38a0 | 61 6c 73 65 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 70 61 73 73 3b 0a 7d 0a 0a 0a 0a 0a 70 | alse;.}.}..return.$pass;.}.....p |
e38c0 | 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 76 61 6c 69 64 61 74 65 55 72 6c 28 73 74 72 69 | rivate.function.validateUrl(stri |
e38e0 | 6e 67 20 24 70 72 6f 70 65 72 74 79 2c 20 62 6f 6f 6c 20 24 6d 61 6e 64 61 74 6f 72 79 20 3d 20 | ng.$property,.bool.$mandatory.=. |
e3900 | 66 61 6c 73 65 29 3a 20 62 6f 6f 6c 0a 7b 0a 69 66 20 28 21 24 74 68 69 73 2d 3e 76 61 6c 69 64 | false):.bool.{.if.(!$this->valid |
e3920 | 61 74 65 53 74 72 69 6e 67 28 24 70 72 6f 70 65 72 74 79 2c 20 24 6d 61 6e 64 61 74 6f 72 79 29 | ateString($property,.$mandatory) |
e3940 | 29 20 7b 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 69 66 20 28 21 24 74 68 69 73 2d | ).{.return.false;.}..if.(!$this- |
e3960 | 3e 66 69 6c 74 65 72 55 72 6c 28 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 5b 24 70 72 6f 70 65 72 | >filterUrl($this->config[$proper |
e3980 | 74 79 5d 29 29 20 7b 0a 24 74 68 69 73 2d 3e 77 61 72 6e 69 6e 67 73 5b 5d 20 3d 20 24 70 72 6f | ty])).{.$this->warnings[].=.$pro |
e39a0 | 70 65 72 74 79 2e 27 20 3a 20 69 6e 76 61 6c 69 64 20 76 61 6c 75 65 20 28 27 2e 24 74 68 69 73 | perty.'.:.invalid.value.('.$this |
e39c0 | 2d 3e 63 6f 6e 66 69 67 5b 24 70 72 6f 70 65 72 74 79 5d 2e 27 29 2c 20 6d 75 73 74 20 62 65 20 | ->config[$property].'),.must.be. |
e39e0 | 61 6e 20 68 74 74 70 2f 68 74 74 70 73 20 55 52 4c 27 3b 0a 75 6e 73 65 74 28 24 74 68 69 73 2d | an.http/https.URL';.unset($this- |
e3a00 | 3e 63 6f 6e 66 69 67 5b 24 70 72 6f 70 65 72 74 79 5d 29 3b 0a 0a 72 65 74 75 72 6e 20 66 61 6c | >config[$property]);..return.fal |
e3a20 | 73 65 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 0a 0a 0a 0a 0a 70 72 69 76 61 | se;.}..return.true;.}......priva |
e3a40 | 74 65 20 66 75 6e 63 74 69 6f 6e 20 66 69 6c 74 65 72 55 72 6c 28 24 76 61 6c 75 65 2c 20 61 72 | te.function.filterUrl($value,.ar |
e3a60 | 72 61 79 20 24 73 63 68 65 6d 65 73 20 3d 20 5b 27 68 74 74 70 27 2c 20 27 68 74 74 70 73 27 5d | ray.$schemes.=.['http',.'https'] |
e3a80 | 29 3a 20 62 6f 6f 6c 0a 7b 0a 69 66 20 28 24 76 61 6c 75 65 20 3d 3d 3d 20 27 27 29 20 7b 0a 72 | ):.bool.{.if.($value.===.'').{.r |
e3aa0 | 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 0a 24 62 69 74 73 20 3d 20 70 61 72 73 65 5f 75 72 6c | eturn.true;.}..$bits.=.parse_url |
e3ac0 | 28 24 76 61 6c 75 65 29 3b 0a 69 66 20 28 65 6d 70 74 79 28 24 62 69 74 73 5b 27 73 63 68 65 6d | ($value);.if.(empty($bits['schem |
e3ae0 | 65 27 5d 29 20 7c 7c 20 65 6d 70 74 79 28 24 62 69 74 73 5b 27 68 6f 73 74 27 5d 29 29 20 7b 0a | e']).||.empty($bits['host'])).{. |
e3b00 | 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 69 66 20 28 21 69 6e 5f 61 72 72 61 79 28 24 | return.false;.}..if.(!in_array($ |
e3b20 | 62 69 74 73 5b 27 73 63 68 65 6d 65 27 5d 2c 20 24 73 63 68 65 6d 65 73 2c 20 74 72 75 65 29 29 | bits['scheme'],.$schemes,.true)) |
e3b40 | 20 7b 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 74 72 75 65 3b | .{.return.false;.}..return.true; |
e3b60 | 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d | .}.}.<?php.declare(strict_types= |
e3b80 | 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 | 1);............namespace.Compose |
e3ba0 | 72 5c 50 61 63 6b 61 67 65 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 4a 73 6f 6e 5c 4a 73 | r\Package;..use.Composer\Json\Js |
e3bc0 | 6f 6e 46 69 6c 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 6e 73 74 61 6c 6c 65 72 5c 49 | onFile;.use.Composer\Installer\I |
e3be0 | 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 | nstallationManager;.use.Composer |
e3c00 | 5c 50 63 72 65 5c 50 72 65 67 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 | \Pcre\Preg;.use.Composer\Reposit |
e3c20 | 6f 72 79 5c 4c 6f 63 6b 41 72 72 61 79 52 65 70 6f 73 69 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d | ory\LockArrayRepository;.use.Com |
e3c40 | 70 6f 73 65 72 5c 55 74 69 6c 5c 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3b 0a 75 73 65 20 | poser\Util\ProcessExecutor;.use. |
e3c60 | 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 44 75 6d 70 65 72 5c 41 72 72 61 79 44 75 6d | Composer\Package\Dumper\ArrayDum |
e3c80 | 70 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 4c 6f 61 64 65 72 | per;.use.Composer\Package\Loader |
e3ca0 | 5c 41 72 72 61 79 4c 6f 61 64 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 | \ArrayLoader;.use.Composer\Packa |
e3cc0 | 67 65 5c 56 65 72 73 69 6f 6e 5c 56 65 72 73 69 6f 6e 50 61 72 73 65 72 3b 0a 75 73 65 20 43 6f | ge\Version\VersionParser;.use.Co |
e3ce0 | 6d 70 6f 73 65 72 5c 50 6c 75 67 69 6e 5c 50 6c 75 67 69 6e 49 6e 74 65 72 66 61 63 65 3b 0a 75 | mposer\Plugin\PluginInterface;.u |
e3d00 | 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 47 69 74 20 61 73 20 47 69 74 55 74 69 6c 3b | se.Composer\Util\Git.as.GitUtil; |
e3d20 | 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 4f 5c 49 4f 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 | .use.Composer\IO\IOInterface;.us |
e3d40 | 65 20 53 65 6c 64 5c 4a 73 6f 6e 4c 69 6e 74 5c 50 61 72 73 69 6e 67 45 78 63 65 70 74 69 6f 6e | e.Seld\JsonLint\ParsingException |
e3d60 | 3b 0a 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 4c 6f 63 6b 65 72 0a 7b 0a 0a 70 72 69 76 61 74 65 | ;........class.Locker.{..private |
e3d80 | 20 24 6c 6f 63 6b 46 69 6c 65 3b 0a 0a 70 72 69 76 61 74 65 20 24 69 6e 73 74 61 6c 6c 61 74 69 | .$lockFile;..private.$installati |
e3da0 | 6f 6e 4d 61 6e 61 67 65 72 3b 0a 0a 70 72 69 76 61 74 65 20 24 68 61 73 68 3b 0a 0a 70 72 69 76 | onManager;..private.$hash;..priv |
e3dc0 | 61 74 65 20 24 63 6f 6e 74 65 6e 74 48 61 73 68 3b 0a 0a 70 72 69 76 61 74 65 20 24 6c 6f 61 64 | ate.$contentHash;..private.$load |
e3de0 | 65 72 3b 0a 0a 70 72 69 76 61 74 65 20 24 64 75 6d 70 65 72 3b 0a 0a 70 72 69 76 61 74 65 20 24 | er;..private.$dumper;..private.$ |
e3e00 | 70 72 6f 63 65 73 73 3b 0a 0a 70 72 69 76 61 74 65 20 24 6c 6f 63 6b 44 61 74 61 43 61 63 68 65 | process;..private.$lockDataCache |
e3e20 | 20 3d 20 6e 75 6c 6c 3b 0a 0a 70 72 69 76 61 74 65 20 24 76 69 72 74 75 61 6c 46 69 6c 65 57 72 | .=.null;..private.$virtualFileWr |
e3e40 | 69 74 74 65 6e 20 3d 20 66 61 6c 73 65 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 | itten.=.false;.........public.fu |
e3e60 | 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 49 4f 49 6e 74 65 72 66 61 63 65 20 24 | nction.__construct(IOInterface.$ |
e3e80 | 69 6f 2c 20 4a 73 6f 6e 46 69 6c 65 20 24 6c 6f 63 6b 46 69 6c 65 2c 20 49 6e 73 74 61 6c 6c 61 | io,.JsonFile.$lockFile,.Installa |
e3ea0 | 74 69 6f 6e 4d 61 6e 61 67 65 72 20 24 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 72 | tionManager.$installationManager |
e3ec0 | 2c 20 73 74 72 69 6e 67 20 24 63 6f 6d 70 6f 73 65 72 46 69 6c 65 43 6f 6e 74 65 6e 74 73 2c 20 | ,.string.$composerFileContents,. |
e3ee0 | 3f 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 20 24 70 72 6f 63 65 73 73 20 3d 20 6e 75 6c 6c | ?ProcessExecutor.$process.=.null |
e3f00 | 29 0a 7b 0a 24 74 68 69 73 2d 3e 6c 6f 63 6b 46 69 6c 65 20 3d 20 24 6c 6f 63 6b 46 69 6c 65 3b | ).{.$this->lockFile.=.$lockFile; |
e3f20 | 0a 24 74 68 69 73 2d 3e 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 72 20 3d 20 24 69 | .$this->installationManager.=.$i |
e3f40 | 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 72 3b 0a 24 74 68 69 73 2d 3e 68 61 73 68 20 | nstallationManager;.$this->hash. |
e3f60 | 3d 20 6d 64 35 28 24 63 6f 6d 70 6f 73 65 72 46 69 6c 65 43 6f 6e 74 65 6e 74 73 29 3b 0a 24 74 | =.md5($composerFileContents);.$t |
e3f80 | 68 69 73 2d 3e 63 6f 6e 74 65 6e 74 48 61 73 68 20 3d 20 73 65 6c 66 3a 3a 67 65 74 43 6f 6e 74 | his->contentHash.=.self::getCont |
e3fa0 | 65 6e 74 48 61 73 68 28 24 63 6f 6d 70 6f 73 65 72 46 69 6c 65 43 6f 6e 74 65 6e 74 73 29 3b 0a | entHash($composerFileContents);. |
e3fc0 | 24 74 68 69 73 2d 3e 6c 6f 61 64 65 72 20 3d 20 6e 65 77 20 41 72 72 61 79 4c 6f 61 64 65 72 28 | $this->loader.=.new.ArrayLoader( |
e3fe0 | 6e 75 6c 6c 2c 20 74 72 75 65 29 3b 0a 24 74 68 69 73 2d 3e 64 75 6d 70 65 72 20 3d 20 6e 65 77 | null,.true);.$this->dumper.=.new |
e4000 | 20 41 72 72 61 79 44 75 6d 70 65 72 28 29 3b 0a 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 20 3d | .ArrayDumper();.$this->process.= |
e4020 | 20 24 70 72 6f 63 65 73 73 20 3f 3f 20 6e 65 77 20 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 | .$process.??.new.ProcessExecutor |
e4040 | 28 24 69 6f 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 66 75 6e | ($io);.}.......public.static.fun |
e4060 | 63 74 69 6f 6e 20 67 65 74 43 6f 6e 74 65 6e 74 48 61 73 68 28 73 74 72 69 6e 67 20 24 63 6f 6d | ction.getContentHash(string.$com |
e4080 | 70 6f 73 65 72 46 69 6c 65 43 6f 6e 74 65 6e 74 73 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 24 63 6f | poserFileContents):.string.{.$co |
e40a0 | 6e 74 65 6e 74 20 3d 20 4a 73 6f 6e 46 69 6c 65 3a 3a 70 61 72 73 65 4a 73 6f 6e 28 24 63 6f 6d | ntent.=.JsonFile::parseJson($com |
e40c0 | 70 6f 73 65 72 46 69 6c 65 43 6f 6e 74 65 6e 74 73 2c 20 27 63 6f 6d 70 6f 73 65 72 2e 6a 73 6f | poserFileContents,.'composer.jso |
e40e0 | 6e 27 29 3b 0a 0a 24 72 65 6c 65 76 61 6e 74 4b 65 79 73 20 3d 20 5b 0a 27 6e 61 6d 65 27 2c 0a | n');..$relevantKeys.=.[.'name',. |
e4100 | 27 76 65 72 73 69 6f 6e 27 2c 0a 27 72 65 71 75 69 72 65 27 2c 0a 27 72 65 71 75 69 72 65 2d 64 | 'version',.'require',.'require-d |
e4120 | 65 76 27 2c 0a 27 63 6f 6e 66 6c 69 63 74 27 2c 0a 27 72 65 70 6c 61 63 65 27 2c 0a 27 70 72 6f | ev',.'conflict',.'replace',.'pro |
e4140 | 76 69 64 65 27 2c 0a 27 6d 69 6e 69 6d 75 6d 2d 73 74 61 62 69 6c 69 74 79 27 2c 0a 27 70 72 65 | vide',.'minimum-stability',.'pre |
e4160 | 66 65 72 2d 73 74 61 62 6c 65 27 2c 0a 27 72 65 70 6f 73 69 74 6f 72 69 65 73 27 2c 0a 27 65 78 | fer-stable',.'repositories',.'ex |
e4180 | 74 72 61 27 2c 0a 5d 3b 0a 0a 24 72 65 6c 65 76 61 6e 74 43 6f 6e 74 65 6e 74 20 3d 20 5b 5d 3b | tra',.];..$relevantContent.=.[]; |
e41a0 | 0a 0a 66 6f 72 65 61 63 68 20 28 61 72 72 61 79 5f 69 6e 74 65 72 73 65 63 74 28 24 72 65 6c 65 | ..foreach.(array_intersect($rele |
e41c0 | 76 61 6e 74 4b 65 79 73 2c 20 61 72 72 61 79 5f 6b 65 79 73 28 24 63 6f 6e 74 65 6e 74 29 29 20 | vantKeys,.array_keys($content)). |
e41e0 | 61 73 20 24 6b 65 79 29 20 7b 0a 24 72 65 6c 65 76 61 6e 74 43 6f 6e 74 65 6e 74 5b 24 6b 65 79 | as.$key).{.$relevantContent[$key |
e4200 | 5d 20 3d 20 24 63 6f 6e 74 65 6e 74 5b 24 6b 65 79 5d 3b 0a 7d 0a 69 66 20 28 69 73 73 65 74 28 | ].=.$content[$key];.}.if.(isset( |
e4220 | 24 63 6f 6e 74 65 6e 74 5b 27 63 6f 6e 66 69 67 27 5d 5b 27 70 6c 61 74 66 6f 72 6d 27 5d 29 29 | $content['config']['platform'])) |
e4240 | 20 7b 0a 24 72 65 6c 65 76 61 6e 74 43 6f 6e 74 65 6e 74 5b 27 63 6f 6e 66 69 67 27 5d 5b 27 70 | .{.$relevantContent['config']['p |
e4260 | 6c 61 74 66 6f 72 6d 27 5d 20 3d 20 24 63 6f 6e 74 65 6e 74 5b 27 63 6f 6e 66 69 67 27 5d 5b 27 | latform'].=.$content['config'][' |
e4280 | 70 6c 61 74 66 6f 72 6d 27 5d 3b 0a 7d 0a 0a 6b 73 6f 72 74 28 24 72 65 6c 65 76 61 6e 74 43 6f | platform'];.}..ksort($relevantCo |
e42a0 | 6e 74 65 6e 74 29 3b 0a 0a 72 65 74 75 72 6e 20 6d 64 35 28 4a 73 6f 6e 46 69 6c 65 3a 3a 65 6e | ntent);..return.md5(JsonFile::en |
e42c0 | 63 6f 64 65 28 24 72 65 6c 65 76 61 6e 74 43 6f 6e 74 65 6e 74 2c 20 30 29 29 3b 0a 7d 0a 0a 0a | code($relevantContent,.0));.}... |
e42e0 | 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 4c 6f 63 6b 65 64 28 29 3a 20 62 6f | ..public.function.isLocked():.bo |
e4300 | 6f 6c 0a 7b 0a 69 66 20 28 21 24 74 68 69 73 2d 3e 76 69 72 74 75 61 6c 46 69 6c 65 57 72 69 74 | ol.{.if.(!$this->virtualFileWrit |
e4320 | 74 65 6e 20 26 26 20 21 24 74 68 69 73 2d 3e 6c 6f 63 6b 46 69 6c 65 2d 3e 65 78 69 73 74 73 28 | ten.&&.!$this->lockFile->exists( |
e4340 | 29 29 20 7b 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 24 64 61 74 61 20 3d 20 24 74 | )).{.return.false;.}..$data.=.$t |
e4360 | 68 69 73 2d 3e 67 65 74 4c 6f 63 6b 44 61 74 61 28 29 3b 0a 0a 72 65 74 75 72 6e 20 69 73 73 65 | his->getLockData();..return.isse |
e4380 | 74 28 24 64 61 74 61 5b 27 70 61 63 6b 61 67 65 73 27 5d 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c | t($data['packages']);.}.....publ |
e43a0 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 46 72 65 73 68 28 29 3a 20 62 6f 6f 6c 0a 7b 0a 24 6c | ic.function.isFresh():.bool.{.$l |
e43c0 | 6f 63 6b 20 3d 20 24 74 68 69 73 2d 3e 6c 6f 63 6b 46 69 6c 65 2d 3e 72 65 61 64 28 29 3b 0a 0a | ock.=.$this->lockFile->read();.. |
e43e0 | 69 66 20 28 21 65 6d 70 74 79 28 24 6c 6f 63 6b 5b 27 63 6f 6e 74 65 6e 74 2d 68 61 73 68 27 5d | if.(!empty($lock['content-hash'] |
e4400 | 29 29 20 7b 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 63 6f 6e 74 65 6e 74 48 61 73 68 20 | )).{..return.$this->contentHash. |
e4420 | 3d 3d 3d 20 24 6c 6f 63 6b 5b 27 63 6f 6e 74 65 6e 74 2d 68 61 73 68 27 5d 3b 0a 7d 0a 0a 0a 69 | ===.$lock['content-hash'];.}...i |
e4440 | 66 20 28 21 65 6d 70 74 79 28 24 6c 6f 63 6b 5b 27 68 61 73 68 27 5d 29 29 20 7b 0a 72 65 74 75 | f.(!empty($lock['hash'])).{.retu |
e4460 | 72 6e 20 24 74 68 69 73 2d 3e 68 61 73 68 20 3d 3d 3d 20 24 6c 6f 63 6b 5b 27 68 61 73 68 27 5d | rn.$this->hash.===.$lock['hash'] |
e4480 | 3b 0a 7d 0a 0a 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 | ;.}...return.false;.}........pub |
e44a0 | 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 4c 6f 63 6b 65 64 52 65 70 6f 73 69 74 6f 72 79 | lic.function.getLockedRepository |
e44c0 | 28 62 6f 6f 6c 20 24 77 69 74 68 44 65 76 52 65 71 73 20 3d 20 66 61 6c 73 65 29 3a 20 4c 6f 63 | (bool.$withDevReqs.=.false):.Loc |
e44e0 | 6b 41 72 72 61 79 52 65 70 6f 73 69 74 6f 72 79 0a 7b 0a 24 6c 6f 63 6b 44 61 74 61 20 3d 20 24 | kArrayRepository.{.$lockData.=.$ |
e4500 | 74 68 69 73 2d 3e 67 65 74 4c 6f 63 6b 44 61 74 61 28 29 3b 0a 24 70 61 63 6b 61 67 65 73 20 3d | this->getLockData();.$packages.= |
e4520 | 20 6e 65 77 20 4c 6f 63 6b 41 72 72 61 79 52 65 70 6f 73 69 74 6f 72 79 28 29 3b 0a 0a 24 6c 6f | .new.LockArrayRepository();..$lo |
e4540 | 63 6b 65 64 50 61 63 6b 61 67 65 73 20 3d 20 24 6c 6f 63 6b 44 61 74 61 5b 27 70 61 63 6b 61 67 | ckedPackages.=.$lockData['packag |
e4560 | 65 73 27 5d 3b 0a 69 66 20 28 24 77 69 74 68 44 65 76 52 65 71 73 29 20 7b 0a 69 66 20 28 69 73 | es'];.if.($withDevReqs).{.if.(is |
e4580 | 73 65 74 28 24 6c 6f 63 6b 44 61 74 61 5b 27 70 61 63 6b 61 67 65 73 2d 64 65 76 27 5d 29 29 20 | set($lockData['packages-dev'])). |
e45a0 | 7b 0a 24 6c 6f 63 6b 65 64 50 61 63 6b 61 67 65 73 20 3d 20 61 72 72 61 79 5f 6d 65 72 67 65 28 | {.$lockedPackages.=.array_merge( |
e45c0 | 24 6c 6f 63 6b 65 64 50 61 63 6b 61 67 65 73 2c 20 24 6c 6f 63 6b 44 61 74 61 5b 27 70 61 63 6b | $lockedPackages,.$lockData['pack |
e45e0 | 61 67 65 73 2d 64 65 76 27 5d 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 | ages-dev']);.}.else.{.throw.new. |
e4600 | 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 54 68 65 20 6c 6f 63 6b 20 66 69 6c 65 | \RuntimeException('The.lock.file |
e4620 | 20 64 6f 65 73 20 6e 6f 74 20 63 6f 6e 74 61 69 6e 20 72 65 71 75 69 72 65 2d 64 65 76 20 69 6e | .does.not.contain.require-dev.in |
e4640 | 66 6f 72 6d 61 74 69 6f 6e 2c 20 72 75 6e 20 69 6e 73 74 61 6c 6c 20 77 69 74 68 20 74 68 65 20 | formation,.run.install.with.the. |
e4660 | 2d 2d 6e 6f 2d 64 65 76 20 6f 70 74 69 6f 6e 20 6f 72 20 64 65 6c 65 74 65 20 69 74 20 61 6e 64 | --no-dev.option.or.delete.it.and |
e4680 | 20 72 75 6e 20 63 6f 6d 70 6f 73 65 72 20 75 70 64 61 74 65 20 74 6f 20 67 65 6e 65 72 61 74 65 | .run.composer.update.to.generate |
e46a0 | 20 61 20 6e 65 77 20 6c 6f 63 6b 20 66 69 6c 65 2e 27 29 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 65 6d | .a.new.lock.file.');.}.}..if.(em |
e46c0 | 70 74 79 28 24 6c 6f 63 6b 65 64 50 61 63 6b 61 67 65 73 29 29 20 7b 0a 72 65 74 75 72 6e 20 24 | pty($lockedPackages)).{.return.$ |
e46e0 | 70 61 63 6b 61 67 65 73 3b 0a 7d 0a 0a 69 66 20 28 69 73 73 65 74 28 24 6c 6f 63 6b 65 64 50 61 | packages;.}..if.(isset($lockedPa |
e4700 | 63 6b 61 67 65 73 5b 30 5d 5b 27 6e 61 6d 65 27 5d 29 29 20 7b 0a 24 70 61 63 6b 61 67 65 42 79 | ckages[0]['name'])).{.$packageBy |
e4720 | 4e 61 6d 65 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 6c 6f 63 6b 65 64 50 61 63 6b 61 | Name.=.[];.foreach.($lockedPacka |
e4740 | 67 65 73 20 61 73 20 24 69 6e 66 6f 29 20 7b 0a 24 70 61 63 6b 61 67 65 20 3d 20 24 74 68 69 73 | ges.as.$info).{.$package.=.$this |
e4760 | 2d 3e 6c 6f 61 64 65 72 2d 3e 6c 6f 61 64 28 24 69 6e 66 6f 29 3b 0a 24 70 61 63 6b 61 67 65 73 | ->loader->load($info);.$packages |
e4780 | 2d 3e 61 64 64 50 61 63 6b 61 67 65 28 24 70 61 63 6b 61 67 65 29 3b 0a 24 70 61 63 6b 61 67 65 | ->addPackage($package);.$package |
e47a0 | 42 79 4e 61 6d 65 5b 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 20 3d 20 24 70 | ByName[$package->getName()].=.$p |
e47c0 | 61 63 6b 61 67 65 3b 0a 0a 69 66 20 28 24 70 61 63 6b 61 67 65 20 69 6e 73 74 61 6e 63 65 6f 66 | ackage;..if.($package.instanceof |
e47e0 | 20 41 6c 69 61 73 50 61 63 6b 61 67 65 29 20 7b 0a 24 70 61 63 6b 61 67 65 42 79 4e 61 6d 65 5b | .AliasPackage).{.$packageByName[ |
e4800 | 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 41 6c 69 61 73 4f 66 28 29 2d 3e 67 65 74 4e 61 6d 65 28 | $package->getAliasOf()->getName( |
e4820 | 29 5d 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 41 6c 69 61 73 4f 66 28 29 3b 0a 7d 0a 7d | )].=.$package->getAliasOf();.}.} |
e4840 | 0a 0a 69 66 20 28 69 73 73 65 74 28 24 6c 6f 63 6b 44 61 74 61 5b 27 61 6c 69 61 73 65 73 27 5d | ..if.(isset($lockData['aliases'] |
e4860 | 29 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 6c 6f 63 6b 44 61 74 61 5b 27 61 6c 69 61 73 65 73 | )).{.foreach.($lockData['aliases |
e4880 | 27 5d 20 61 73 20 24 61 6c 69 61 73 29 20 7b 0a 69 66 20 28 69 73 73 65 74 28 24 70 61 63 6b 61 | '].as.$alias).{.if.(isset($packa |
e48a0 | 67 65 42 79 4e 61 6d 65 5b 24 61 6c 69 61 73 5b 27 70 61 63 6b 61 67 65 27 5d 5d 29 29 20 7b 0a | geByName[$alias['package']])).{. |
e48c0 | 24 61 6c 69 61 73 50 6b 67 20 3d 20 6e 65 77 20 43 6f 6d 70 6c 65 74 65 41 6c 69 61 73 50 61 63 | $aliasPkg.=.new.CompleteAliasPac |
e48e0 | 6b 61 67 65 28 24 70 61 63 6b 61 67 65 42 79 4e 61 6d 65 5b 24 61 6c 69 61 73 5b 27 70 61 63 6b | kage($packageByName[$alias['pack |
e4900 | 61 67 65 27 5d 5d 2c 20 24 61 6c 69 61 73 5b 27 61 6c 69 61 73 5f 6e 6f 72 6d 61 6c 69 7a 65 64 | age']],.$alias['alias_normalized |
e4920 | 27 5d 2c 20 24 61 6c 69 61 73 5b 27 61 6c 69 61 73 27 5d 29 3b 0a 24 61 6c 69 61 73 50 6b 67 2d | '],.$alias['alias']);.$aliasPkg- |
e4940 | 3e 73 65 74 52 6f 6f 74 50 61 63 6b 61 67 65 41 6c 69 61 73 28 74 72 75 65 29 3b 0a 24 70 61 63 | >setRootPackageAlias(true);.$pac |
e4960 | 6b 61 67 65 73 2d 3e 61 64 64 50 61 63 6b 61 67 65 28 24 61 6c 69 61 73 50 6b 67 29 3b 0a 7d 0a | kages->addPackage($aliasPkg);.}. |
e4980 | 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 70 61 63 6b 61 67 65 73 3b 0a 7d 0a 0a 74 68 72 6f 77 20 | }.}..return.$packages;.}..throw. |
e49a0 | 6e 65 77 20 5c 52 75 6e 74 69 6d 65 45 78 63 65 70 74 69 6f 6e 28 27 59 6f 75 72 20 63 6f 6d 70 | new.\RuntimeException('Your.comp |
e49c0 | 6f 73 65 72 2e 6c 6f 63 6b 20 69 73 20 69 6e 76 61 6c 69 64 2e 20 52 75 6e 20 22 63 6f 6d 70 6f | oser.lock.is.invalid..Run."compo |
e49e0 | 73 65 72 20 75 70 64 61 74 65 22 20 74 6f 20 67 65 6e 65 72 61 74 65 20 61 20 6e 65 77 20 6f 6e | ser.update".to.generate.a.new.on |
e4a00 | 65 2e 27 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 44 | e.');.}.....public.function.getD |
e4a20 | 65 76 50 61 63 6b 61 67 65 4e 61 6d 65 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 24 6e 61 6d 65 73 | evPackageNames():.array.{.$names |
e4a40 | 20 3d 20 5b 5d 3b 0a 24 6c 6f 63 6b 44 61 74 61 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 4c 6f 63 | .=.[];.$lockData.=.$this->getLoc |
e4a60 | 6b 44 61 74 61 28 29 3b 0a 69 66 20 28 69 73 73 65 74 28 24 6c 6f 63 6b 44 61 74 61 5b 27 70 61 | kData();.if.(isset($lockData['pa |
e4a80 | 63 6b 61 67 65 73 2d 64 65 76 27 5d 29 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 6c 6f 63 6b 44 | ckages-dev'])).{.foreach.($lockD |
e4aa0 | 61 74 61 5b 27 70 61 63 6b 61 67 65 73 2d 64 65 76 27 5d 20 61 73 20 24 70 61 63 6b 61 67 65 29 | ata['packages-dev'].as.$package) |
e4ac0 | 20 7b 0a 24 6e 61 6d 65 73 5b 5d 20 3d 20 73 74 72 74 6f 6c 6f 77 65 72 28 24 70 61 63 6b 61 67 | .{.$names[].=.strtolower($packag |
e4ae0 | 65 5b 27 6e 61 6d 65 27 5d 29 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 6e 61 6d 65 73 3b 0a | e['name']);.}.}..return.$names;. |
e4b00 | 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 50 6c 61 74 | }........public.function.getPlat |
e4b20 | 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 73 28 62 6f 6f 6c 20 24 77 69 74 68 44 65 76 52 65 | formRequirements(bool.$withDevRe |
e4b40 | 71 73 20 3d 20 66 61 6c 73 65 29 3a 20 61 72 72 61 79 0a 7b 0a 24 6c 6f 63 6b 44 61 74 61 20 3d | qs.=.false):.array.{.$lockData.= |
e4b60 | 20 24 74 68 69 73 2d 3e 67 65 74 4c 6f 63 6b 44 61 74 61 28 29 3b 0a 24 72 65 71 75 69 72 65 6d | .$this->getLockData();.$requirem |
e4b80 | 65 6e 74 73 20 3d 20 5b 5d 3b 0a 0a 69 66 20 28 21 65 6d 70 74 79 28 24 6c 6f 63 6b 44 61 74 61 | ents.=.[];..if.(!empty($lockData |
e4ba0 | 5b 27 70 6c 61 74 66 6f 72 6d 27 5d 29 29 20 7b 0a 24 72 65 71 75 69 72 65 6d 65 6e 74 73 20 3d | ['platform'])).{.$requirements.= |
e4bc0 | 20 24 74 68 69 73 2d 3e 6c 6f 61 64 65 72 2d 3e 70 61 72 73 65 4c 69 6e 6b 73 28 0a 27 5f 5f 72 | .$this->loader->parseLinks(.'__r |
e4be0 | 6f 6f 74 5f 5f 27 2c 0a 27 31 2e 30 2e 30 27 2c 0a 4c 69 6e 6b 3a 3a 54 59 50 45 5f 52 45 51 55 | oot__',.'1.0.0',.Link::TYPE_REQU |
e4c00 | 49 52 45 2c 0a 24 6c 6f 63 6b 44 61 74 61 5b 27 70 6c 61 74 66 6f 72 6d 27 5d 20 3f 3f 20 5b 5d | IRE,.$lockData['platform'].??.[] |
e4c20 | 0a 29 3b 0a 7d 0a 0a 69 66 20 28 24 77 69 74 68 44 65 76 52 65 71 73 20 26 26 20 21 65 6d 70 74 | .);.}..if.($withDevReqs.&&.!empt |
e4c40 | 79 28 24 6c 6f 63 6b 44 61 74 61 5b 27 70 6c 61 74 66 6f 72 6d 2d 64 65 76 27 5d 29 29 20 7b 0a | y($lockData['platform-dev'])).{. |
e4c60 | 24 64 65 76 52 65 71 75 69 72 65 6d 65 6e 74 73 20 3d 20 24 74 68 69 73 2d 3e 6c 6f 61 64 65 72 | $devRequirements.=.$this->loader |
e4c80 | 2d 3e 70 61 72 73 65 4c 69 6e 6b 73 28 0a 27 5f 5f 72 6f 6f 74 5f 5f 27 2c 0a 27 31 2e 30 2e 30 | ->parseLinks(.'__root__',.'1.0.0 |
e4ca0 | 27 2c 0a 4c 69 6e 6b 3a 3a 54 59 50 45 5f 52 45 51 55 49 52 45 2c 0a 24 6c 6f 63 6b 44 61 74 61 | ',.Link::TYPE_REQUIRE,.$lockData |
e4cc0 | 5b 27 70 6c 61 74 66 6f 72 6d 2d 64 65 76 27 5d 20 3f 3f 20 5b 5d 0a 29 3b 0a 0a 24 72 65 71 75 | ['platform-dev'].??.[].);..$requ |
e4ce0 | 69 72 65 6d 65 6e 74 73 20 3d 20 61 72 72 61 79 5f 6d 65 72 67 65 28 24 72 65 71 75 69 72 65 6d | irements.=.array_merge($requirem |
e4d00 | 65 6e 74 73 2c 20 24 64 65 76 52 65 71 75 69 72 65 6d 65 6e 74 73 29 3b 0a 7d 0a 0a 72 65 74 75 | ents,.$devRequirements);.}..retu |
e4d20 | 72 6e 20 24 72 65 71 75 69 72 65 6d 65 6e 74 73 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 | rn.$requirements;.}..public.func |
e4d40 | 74 69 6f 6e 20 67 65 74 4d 69 6e 69 6d 75 6d 53 74 61 62 69 6c 69 74 79 28 29 3a 20 73 74 72 69 | tion.getMinimumStability():.stri |
e4d60 | 6e 67 0a 7b 0a 24 6c 6f 63 6b 44 61 74 61 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 4c 6f 63 6b 44 | ng.{.$lockData.=.$this->getLockD |
e4d80 | 61 74 61 28 29 3b 0a 0a 72 65 74 75 72 6e 20 24 6c 6f 63 6b 44 61 74 61 5b 27 6d 69 6e 69 6d 75 | ata();..return.$lockData['minimu |
e4da0 | 6d 2d 73 74 61 62 69 6c 69 74 79 27 5d 20 3f 3f 20 27 73 74 61 62 6c 65 27 3b 0a 7d 0a 0a 0a 0a | m-stability'].??.'stable';.}.... |
e4dc0 | 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 53 74 61 62 69 6c 69 74 79 46 6c 61 | .public.function.getStabilityFla |
e4de0 | 67 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 24 6c 6f 63 6b 44 61 74 61 20 3d 20 24 74 68 69 73 2d | gs():.array.{.$lockData.=.$this- |
e4e00 | 3e 67 65 74 4c 6f 63 6b 44 61 74 61 28 29 3b 0a 0a 72 65 74 75 72 6e 20 24 6c 6f 63 6b 44 61 74 | >getLockData();..return.$lockDat |
e4e20 | 61 5b 27 73 74 61 62 69 6c 69 74 79 2d 66 6c 61 67 73 27 5d 20 3f 3f 20 5b 5d 3b 0a 7d 0a 0a 70 | a['stability-flags'].??.[];.}..p |
e4e40 | 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 50 72 65 66 65 72 53 74 61 62 6c 65 28 29 | ublic.function.getPreferStable() |
e4e60 | 3a 20 3f 62 6f 6f 6c 0a 7b 0a 24 6c 6f 63 6b 44 61 74 61 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 | :.?bool.{.$lockData.=.$this->get |
e4e80 | 4c 6f 63 6b 44 61 74 61 28 29 3b 0a 0a 0a 0a 72 65 74 75 72 6e 20 24 6c 6f 63 6b 44 61 74 61 5b | LockData();....return.$lockData[ |
e4ea0 | 27 70 72 65 66 65 72 2d 73 74 61 62 6c 65 27 5d 20 3f 3f 20 6e 75 6c 6c 3b 0a 7d 0a 0a 70 75 62 | 'prefer-stable'].??.null;.}..pub |
e4ec0 | 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 50 72 65 66 65 72 4c 6f 77 65 73 74 28 29 3a 20 | lic.function.getPreferLowest():. |
e4ee0 | 3f 62 6f 6f 6c 0a 7b 0a 24 6c 6f 63 6b 44 61 74 61 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 4c 6f | ?bool.{.$lockData.=.$this->getLo |
e4f00 | 63 6b 44 61 74 61 28 29 3b 0a 0a 0a 0a 72 65 74 75 72 6e 20 24 6c 6f 63 6b 44 61 74 61 5b 27 70 | ckData();....return.$lockData['p |
e4f20 | 72 65 66 65 72 2d 6c 6f 77 65 73 74 27 5d 20 3f 3f 20 6e 75 6c 6c 3b 0a 7d 0a 0a 0a 0a 0a 70 75 | refer-lowest'].??.null;.}.....pu |
e4f40 | 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 50 6c 61 74 66 6f 72 6d 4f 76 65 72 72 69 64 | blic.function.getPlatformOverrid |
e4f60 | 65 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 24 6c 6f 63 6b 44 61 74 61 20 3d 20 24 74 68 69 73 2d | es():.array.{.$lockData.=.$this- |
e4f80 | 3e 67 65 74 4c 6f 63 6b 44 61 74 61 28 29 3b 0a 0a 72 65 74 75 72 6e 20 24 6c 6f 63 6b 44 61 74 | >getLockData();..return.$lockDat |
e4fa0 | 61 5b 27 70 6c 61 74 66 6f 72 6d 2d 6f 76 65 72 72 69 64 65 73 27 5d 20 3f 3f 20 5b 5d 3b 0a 7d | a['platform-overrides'].??.[];.} |
e4fc0 | 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 41 6c 69 61 73 65 | .......public.function.getAliase |
e4fe0 | 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 24 6c 6f 63 6b 44 61 74 61 20 3d 20 24 74 68 69 73 2d 3e | s():.array.{.$lockData.=.$this-> |
e5000 | 67 65 74 4c 6f 63 6b 44 61 74 61 28 29 3b 0a 0a 72 65 74 75 72 6e 20 24 6c 6f 63 6b 44 61 74 61 | getLockData();..return.$lockData |
e5020 | 5b 27 61 6c 69 61 73 65 73 27 5d 20 3f 3f 20 5b 5d 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 | ['aliases'].??.[];.}.....public. |
e5040 | 66 75 6e 63 74 69 6f 6e 20 67 65 74 50 6c 75 67 69 6e 41 70 69 28 29 0a 7b 0a 24 6c 6f 63 6b 44 | function.getPluginApi().{.$lockD |
e5060 | 61 74 61 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 4c 6f 63 6b 44 61 74 61 28 29 3b 0a 0a 72 65 74 | ata.=.$this->getLockData();..ret |
e5080 | 75 72 6e 20 24 6c 6f 63 6b 44 61 74 61 5b 27 70 6c 75 67 69 6e 2d 61 70 69 2d 76 65 72 73 69 6f | urn.$lockData['plugin-api-versio |
e50a0 | 6e 27 5d 20 3f 3f 20 27 31 2e 31 2e 30 27 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e | n'].??.'1.1.0';.}.....public.fun |
e50c0 | 63 74 69 6f 6e 20 67 65 74 4c 6f 63 6b 44 61 74 61 28 29 3a 20 61 72 72 61 79 0a 7b 0a 69 66 20 | ction.getLockData():.array.{.if. |
e50e0 | 28 6e 75 6c 6c 20 21 3d 3d 20 24 74 68 69 73 2d 3e 6c 6f 63 6b 44 61 74 61 43 61 63 68 65 29 20 | (null.!==.$this->lockDataCache). |
e5100 | 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 6c 6f 63 6b 44 61 74 61 43 61 63 68 65 3b 0a 7d | {.return.$this->lockDataCache;.} |
e5120 | 0a 0a 69 66 20 28 21 24 74 68 69 73 2d 3e 6c 6f 63 6b 46 69 6c 65 2d 3e 65 78 69 73 74 73 28 29 | ..if.(!$this->lockFile->exists() |
e5140 | 29 20 7b 0a 74 68 72 6f 77 20 6e 65 77 20 5c 4c 6f 67 69 63 45 78 63 65 70 74 69 6f 6e 28 27 4e | ).{.throw.new.\LogicException('N |
e5160 | 6f 20 6c 6f 63 6b 66 69 6c 65 20 66 6f 75 6e 64 2e 20 55 6e 61 62 6c 65 20 74 6f 20 72 65 61 64 | o.lockfile.found..Unable.to.read |
e5180 | 20 6c 6f 63 6b 65 64 20 70 61 63 6b 61 67 65 73 27 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 74 | .locked.packages');.}..return.$t |
e51a0 | 68 69 73 2d 3e 6c 6f 63 6b 44 61 74 61 43 61 63 68 65 20 3d 20 24 74 68 69 73 2d 3e 6c 6f 63 6b | his->lockDataCache.=.$this->lock |
e51c0 | 46 69 6c 65 2d 3e 72 65 61 64 28 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a | File->read();.}................. |
e51e0 | 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 4c 6f 63 6b 44 61 74 61 28 61 72 72 61 | public.function.setLockData(arra |
e5200 | 79 20 24 70 61 63 6b 61 67 65 73 2c 20 3f 61 72 72 61 79 20 24 64 65 76 50 61 63 6b 61 67 65 73 | y.$packages,.?array.$devPackages |
e5220 | 2c 20 61 72 72 61 79 20 24 70 6c 61 74 66 6f 72 6d 52 65 71 73 2c 20 61 72 72 61 79 20 24 70 6c | ,.array.$platformReqs,.array.$pl |
e5240 | 61 74 66 6f 72 6d 44 65 76 52 65 71 73 2c 20 61 72 72 61 79 20 24 61 6c 69 61 73 65 73 2c 20 73 | atformDevReqs,.array.$aliases,.s |
e5260 | 74 72 69 6e 67 20 24 6d 69 6e 69 6d 75 6d 53 74 61 62 69 6c 69 74 79 2c 20 61 72 72 61 79 20 24 | tring.$minimumStability,.array.$ |
e5280 | 73 74 61 62 69 6c 69 74 79 46 6c 61 67 73 2c 20 62 6f 6f 6c 20 24 70 72 65 66 65 72 53 74 61 62 | stabilityFlags,.bool.$preferStab |
e52a0 | 6c 65 2c 20 62 6f 6f 6c 20 24 70 72 65 66 65 72 4c 6f 77 65 73 74 2c 20 61 72 72 61 79 20 24 70 | le,.bool.$preferLowest,.array.$p |
e52c0 | 6c 61 74 66 6f 72 6d 4f 76 65 72 72 69 64 65 73 2c 20 62 6f 6f 6c 20 24 77 72 69 74 65 20 3d 20 | latformOverrides,.bool.$write.=. |
e52e0 | 74 72 75 65 29 3a 20 62 6f 6f 6c 0a 7b 0a 0a 0a 24 61 6c 69 61 73 65 73 20 3d 20 61 72 72 61 79 | true):.bool.{...$aliases.=.array |
e5300 | 5f 6d 61 70 28 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 61 6c 69 61 73 29 3a 20 61 | _map(static.function.($alias):.a |
e5320 | 72 72 61 79 20 7b 0a 69 66 20 28 69 6e 5f 61 72 72 61 79 28 24 61 6c 69 61 73 5b 27 76 65 72 73 | rray.{.if.(in_array($alias['vers |
e5340 | 69 6f 6e 27 5d 2c 20 5b 27 64 65 76 2d 6d 61 73 74 65 72 27 2c 20 27 64 65 76 2d 74 72 75 6e 6b | ion'],.['dev-master',.'dev-trunk |
e5360 | 27 2c 20 27 64 65 76 2d 64 65 66 61 75 6c 74 27 5d 2c 20 74 72 75 65 29 29 20 7b 0a 24 61 6c 69 | ',.'dev-default'],.true)).{.$ali |
e5380 | 61 73 5b 27 76 65 72 73 69 6f 6e 27 5d 20 3d 20 56 65 72 73 69 6f 6e 50 61 72 73 65 72 3a 3a 44 | as['version'].=.VersionParser::D |
e53a0 | 45 46 41 55 4c 54 5f 42 52 41 4e 43 48 5f 41 4c 49 41 53 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 | EFAULT_BRANCH_ALIAS;.}..return.$ |
e53c0 | 61 6c 69 61 73 3b 0a 7d 2c 20 24 61 6c 69 61 73 65 73 29 3b 0a 0a 24 6c 6f 63 6b 20 3d 20 5b 0a | alias;.},.$aliases);..$lock.=.[. |
e53e0 | 27 5f 72 65 61 64 6d 65 27 20 3d 3e 20 5b 27 54 68 69 73 20 66 69 6c 65 20 6c 6f 63 6b 73 20 74 | '_readme'.=>.['This.file.locks.t |
e5400 | 68 65 20 64 65 70 65 6e 64 65 6e 63 69 65 73 20 6f 66 20 79 6f 75 72 20 70 72 6f 6a 65 63 74 20 | he.dependencies.of.your.project. |
e5420 | 74 6f 20 61 20 6b 6e 6f 77 6e 20 73 74 61 74 65 27 2c 0a 27 52 65 61 64 20 6d 6f 72 65 20 61 62 | to.a.known.state',.'Read.more.ab |
e5440 | 6f 75 74 20 69 74 20 61 74 20 68 74 74 70 73 3a 2f 2f 67 65 74 63 6f 6d 70 6f 73 65 72 2e 6f 72 | out.it.at.https://getcomposer.or |
e5460 | 67 2f 64 6f 63 2f 30 31 2d 62 61 73 69 63 2d 75 73 61 67 65 2e 6d 64 23 69 6e 73 74 61 6c 6c 69 | g/doc/01-basic-usage.md#installi |
e5480 | 6e 67 2d 64 65 70 65 6e 64 65 6e 63 69 65 73 27 2c 0a 27 54 68 69 73 20 66 69 6c 65 20 69 73 20 | ng-dependencies',.'This.file.is. |
e54a0 | 40 67 65 6e 65 72 27 2e 27 61 74 65 64 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 27 2c 20 5d 2c | @gener'.'ated.automatically',.], |
e54c0 | 0a 27 63 6f 6e 74 65 6e 74 2d 68 61 73 68 27 20 3d 3e 20 24 74 68 69 73 2d 3e 63 6f 6e 74 65 6e | .'content-hash'.=>.$this->conten |
e54e0 | 74 48 61 73 68 2c 0a 27 70 61 63 6b 61 67 65 73 27 20 3d 3e 20 6e 75 6c 6c 2c 0a 27 70 61 63 6b | tHash,.'packages'.=>.null,.'pack |
e5500 | 61 67 65 73 2d 64 65 76 27 20 3d 3e 20 6e 75 6c 6c 2c 0a 27 61 6c 69 61 73 65 73 27 20 3d 3e 20 | ages-dev'.=>.null,.'aliases'.=>. |
e5520 | 24 61 6c 69 61 73 65 73 2c 0a 27 6d 69 6e 69 6d 75 6d 2d 73 74 61 62 69 6c 69 74 79 27 20 3d 3e | $aliases,.'minimum-stability'.=> |
e5540 | 20 24 6d 69 6e 69 6d 75 6d 53 74 61 62 69 6c 69 74 79 2c 0a 27 73 74 61 62 69 6c 69 74 79 2d 66 | .$minimumStability,.'stability-f |
e5560 | 6c 61 67 73 27 20 3d 3e 20 24 73 74 61 62 69 6c 69 74 79 46 6c 61 67 73 2c 0a 27 70 72 65 66 65 | lags'.=>.$stabilityFlags,.'prefe |
e5580 | 72 2d 73 74 61 62 6c 65 27 20 3d 3e 20 24 70 72 65 66 65 72 53 74 61 62 6c 65 2c 0a 27 70 72 65 | r-stable'.=>.$preferStable,.'pre |
e55a0 | 66 65 72 2d 6c 6f 77 65 73 74 27 20 3d 3e 20 24 70 72 65 66 65 72 4c 6f 77 65 73 74 2c 0a 5d 3b | fer-lowest'.=>.$preferLowest,.]; |
e55c0 | 0a 0a 24 6c 6f 63 6b 5b 27 70 61 63 6b 61 67 65 73 27 5d 20 3d 20 24 74 68 69 73 2d 3e 6c 6f 63 | ..$lock['packages'].=.$this->loc |
e55e0 | 6b 50 61 63 6b 61 67 65 73 28 24 70 61 63 6b 61 67 65 73 29 3b 0a 69 66 20 28 6e 75 6c 6c 20 21 | kPackages($packages);.if.(null.! |
e5600 | 3d 3d 20 24 64 65 76 50 61 63 6b 61 67 65 73 29 20 7b 0a 24 6c 6f 63 6b 5b 27 70 61 63 6b 61 67 | ==.$devPackages).{.$lock['packag |
e5620 | 65 73 2d 64 65 76 27 5d 20 3d 20 24 74 68 69 73 2d 3e 6c 6f 63 6b 50 61 63 6b 61 67 65 73 28 24 | es-dev'].=.$this->lockPackages($ |
e5640 | 64 65 76 50 61 63 6b 61 67 65 73 29 3b 0a 7d 0a 0a 24 6c 6f 63 6b 5b 27 70 6c 61 74 66 6f 72 6d | devPackages);.}..$lock['platform |
e5660 | 27 5d 20 3d 20 24 70 6c 61 74 66 6f 72 6d 52 65 71 73 3b 0a 24 6c 6f 63 6b 5b 27 70 6c 61 74 66 | '].=.$platformReqs;.$lock['platf |
e5680 | 6f 72 6d 2d 64 65 76 27 5d 20 3d 20 24 70 6c 61 74 66 6f 72 6d 44 65 76 52 65 71 73 3b 0a 69 66 | orm-dev'].=.$platformDevReqs;.if |
e56a0 | 20 28 5c 63 6f 75 6e 74 28 24 70 6c 61 74 66 6f 72 6d 4f 76 65 72 72 69 64 65 73 29 20 3e 20 30 | .(\count($platformOverrides).>.0 |
e56c0 | 29 20 7b 0a 24 6c 6f 63 6b 5b 27 70 6c 61 74 66 6f 72 6d 2d 6f 76 65 72 72 69 64 65 73 27 5d 20 | ).{.$lock['platform-overrides']. |
e56e0 | 3d 20 24 70 6c 61 74 66 6f 72 6d 4f 76 65 72 72 69 64 65 73 3b 0a 7d 0a 24 6c 6f 63 6b 5b 27 70 | =.$platformOverrides;.}.$lock['p |
e5700 | 6c 75 67 69 6e 2d 61 70 69 2d 76 65 72 73 69 6f 6e 27 5d 20 3d 20 50 6c 75 67 69 6e 49 6e 74 65 | lugin-api-version'].=.PluginInte |
e5720 | 72 66 61 63 65 3a 3a 50 4c 55 47 49 4e 5f 41 50 49 5f 56 45 52 53 49 4f 4e 3b 0a 0a 74 72 79 20 | rface::PLUGIN_API_VERSION;..try. |
e5740 | 7b 0a 24 69 73 4c 6f 63 6b 65 64 20 3d 20 24 74 68 69 73 2d 3e 69 73 4c 6f 63 6b 65 64 28 29 3b | {.$isLocked.=.$this->isLocked(); |
e5760 | 0a 7d 20 63 61 74 63 68 20 28 50 61 72 73 69 6e 67 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b | .}.catch.(ParsingException.$e).{ |
e5780 | 0a 24 69 73 4c 6f 63 6b 65 64 20 3d 20 66 61 6c 73 65 3b 0a 7d 0a 69 66 20 28 21 24 69 73 4c 6f | .$isLocked.=.false;.}.if.(!$isLo |
e57a0 | 63 6b 65 64 20 7c 7c 20 24 6c 6f 63 6b 20 21 3d 3d 20 24 74 68 69 73 2d 3e 67 65 74 4c 6f 63 6b | cked.||.$lock.!==.$this->getLock |
e57c0 | 44 61 74 61 28 29 29 20 7b 0a 69 66 20 28 24 77 72 69 74 65 29 20 7b 0a 24 74 68 69 73 2d 3e 6c | Data()).{.if.($write).{.$this->l |
e57e0 | 6f 63 6b 46 69 6c 65 2d 3e 77 72 69 74 65 28 24 6c 6f 63 6b 29 3b 0a 24 74 68 69 73 2d 3e 6c 6f | ockFile->write($lock);.$this->lo |
e5800 | 63 6b 44 61 74 61 43 61 63 68 65 20 3d 20 6e 75 6c 6c 3b 0a 24 74 68 69 73 2d 3e 76 69 72 74 75 | ckDataCache.=.null;.$this->virtu |
e5820 | 61 6c 46 69 6c 65 57 72 69 74 74 65 6e 20 3d 20 66 61 6c 73 65 3b 0a 7d 20 65 6c 73 65 20 7b 0a | alFileWritten.=.false;.}.else.{. |
e5840 | 24 74 68 69 73 2d 3e 76 69 72 74 75 61 6c 46 69 6c 65 57 72 69 74 74 65 6e 20 3d 20 74 72 75 65 | $this->virtualFileWritten.=.true |
e5860 | 3b 0a 24 74 68 69 73 2d 3e 6c 6f 63 6b 44 61 74 61 43 61 63 68 65 20 3d 20 4a 73 6f 6e 46 69 6c | ;.$this->lockDataCache.=.JsonFil |
e5880 | 65 3a 3a 70 61 72 73 65 4a 73 6f 6e 28 4a 73 6f 6e 46 69 6c 65 3a 3a 65 6e 63 6f 64 65 28 24 6c | e::parseJson(JsonFile::encode($l |
e58a0 | 6f 63 6b 29 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 0a 72 65 74 75 72 6e | ock));.}..return.true;.}..return |
e58c0 | 20 66 61 6c 73 65 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 | .false;.}.........private.functi |
e58e0 | 6f 6e 20 6c 6f 63 6b 50 61 63 6b 61 67 65 73 28 61 72 72 61 79 20 24 70 61 63 6b 61 67 65 73 29 | on.lockPackages(array.$packages) |
e5900 | 3a 20 61 72 72 61 79 0a 7b 0a 24 6c 6f 63 6b 65 64 20 3d 20 5b 5d 3b 0a 0a 66 6f 72 65 61 63 68 | :.array.{.$locked.=.[];..foreach |
e5920 | 20 28 24 70 61 63 6b 61 67 65 73 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 69 66 20 28 24 | .($packages.as.$package).{.if.($ |
e5940 | 70 61 63 6b 61 67 65 20 69 6e 73 74 61 6e 63 65 6f 66 20 41 6c 69 61 73 50 61 63 6b 61 67 65 29 | package.instanceof.AliasPackage) |
e5960 | 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 24 6e 61 6d 65 20 3d 20 24 70 61 63 6b 61 67 65 | .{.continue;.}..$name.=.$package |
e5980 | 2d 3e 67 65 74 50 72 65 74 74 79 4e 61 6d 65 28 29 3b 0a 24 76 65 72 73 69 6f 6e 20 3d 20 24 70 | ->getPrettyName();.$version.=.$p |
e59a0 | 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 3b 0a 0a 69 66 20 | ackage->getPrettyVersion();..if. |
e59c0 | 28 21 24 6e 61 6d 65 20 7c 7c 20 21 24 76 65 72 73 69 6f 6e 29 20 7b 0a 74 68 72 6f 77 20 6e 65 | (!$name.||.!$version).{.throw.ne |
e59e0 | 77 20 5c 4c 6f 67 69 63 45 78 63 65 70 74 69 6f 6e 28 73 70 72 69 6e 74 66 28 0a 27 50 61 63 6b | w.\LogicException(sprintf(.'Pack |
e5a00 | 61 67 65 20 22 25 73 22 20 68 61 73 20 6e 6f 20 76 65 72 73 69 6f 6e 20 6f 72 20 6e 61 6d 65 20 | age."%s".has.no.version.or.name. |
e5a20 | 61 6e 64 20 63 61 6e 20 6e 6f 74 20 62 65 20 6c 6f 63 6b 65 64 27 2c 0a 24 70 61 63 6b 61 67 65 | and.can.not.be.locked',.$package |
e5a40 | 0a 29 29 3b 0a 7d 0a 0a 24 73 70 65 63 20 3d 20 24 74 68 69 73 2d 3e 64 75 6d 70 65 72 2d 3e 64 | .));.}..$spec.=.$this->dumper->d |
e5a60 | 75 6d 70 28 24 70 61 63 6b 61 67 65 29 3b 0a 75 6e 73 65 74 28 24 73 70 65 63 5b 27 76 65 72 73 | ump($package);.unset($spec['vers |
e5a80 | 69 6f 6e 5f 6e 6f 72 6d 61 6c 69 7a 65 64 27 5d 29 3b 0a 0a 0a 24 74 69 6d 65 20 3d 20 24 73 70 | ion_normalized']);...$time.=.$sp |
e5aa0 | 65 63 5b 27 74 69 6d 65 27 5d 20 3f 3f 20 6e 75 6c 6c 3b 0a 75 6e 73 65 74 28 24 73 70 65 63 5b | ec['time'].??.null;.unset($spec[ |
e5ac0 | 27 74 69 6d 65 27 5d 29 3b 0a 69 66 20 28 24 70 61 63 6b 61 67 65 2d 3e 69 73 44 65 76 28 29 20 | 'time']);.if.($package->isDev(). |
e5ae0 | 26 26 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 53 6f 75 72 | &&.$package->getInstallationSour |
e5b00 | 63 65 28 29 20 3d 3d 3d 20 27 73 6f 75 72 63 65 27 29 20 7b 0a 0a 24 74 69 6d 65 20 3d 20 24 74 | ce().===.'source').{..$time.=.$t |
e5b20 | 68 69 73 2d 3e 67 65 74 50 61 63 6b 61 67 65 54 69 6d 65 28 24 70 61 63 6b 61 67 65 29 20 3f 3a | his->getPackageTime($package).?: |
e5b40 | 20 24 74 69 6d 65 3b 0a 7d 0a 69 66 20 28 6e 75 6c 6c 20 21 3d 3d 20 24 74 69 6d 65 29 20 7b 0a | .$time;.}.if.(null.!==.$time).{. |
e5b60 | 24 73 70 65 63 5b 27 74 69 6d 65 27 5d 20 3d 20 24 74 69 6d 65 3b 0a 7d 0a 0a 75 6e 73 65 74 28 | $spec['time'].=.$time;.}..unset( |
e5b80 | 24 73 70 65 63 5b 27 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 2d 73 6f 75 72 63 65 27 5d 29 3b 0a 0a | $spec['installation-source']);.. |
e5ba0 | 24 6c 6f 63 6b 65 64 5b 5d 20 3d 20 24 73 70 65 63 3b 0a 7d 0a 0a 75 73 6f 72 74 28 24 6c 6f 63 | $locked[].=.$spec;.}..usort($loc |
e5bc0 | 6b 65 64 2c 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 61 2c 20 24 62 29 20 7b 0a | ked,.static.function.($a,.$b).{. |
e5be0 | 24 63 6f 6d 70 61 72 69 73 6f 6e 20 3d 20 73 74 72 63 6d 70 28 24 61 5b 27 6e 61 6d 65 27 5d 2c | $comparison.=.strcmp($a['name'], |
e5c00 | 20 24 62 5b 27 6e 61 6d 65 27 5d 29 3b 0a 0a 69 66 20 28 30 20 21 3d 3d 20 24 63 6f 6d 70 61 72 | .$b['name']);..if.(0.!==.$compar |
e5c20 | 69 73 6f 6e 29 20 7b 0a 72 65 74 75 72 6e 20 24 63 6f 6d 70 61 72 69 73 6f 6e 3b 0a 7d 0a 0a 0a | ison).{.return.$comparison;.}... |
e5c40 | 72 65 74 75 72 6e 20 73 74 72 63 6d 70 28 24 61 5b 27 76 65 72 73 69 6f 6e 27 5d 2c 20 24 62 5b | return.strcmp($a['version'],.$b[ |
e5c60 | 27 76 65 72 73 69 6f 6e 27 5d 29 3b 0a 7d 29 3b 0a 0a 72 65 74 75 72 6e 20 24 6c 6f 63 6b 65 64 | 'version']);.});..return.$locked |
e5c80 | 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 50 | ;.}........private.function.getP |
e5ca0 | 61 63 6b 61 67 65 54 69 6d 65 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 | ackageTime(PackageInterface.$pac |
e5cc0 | 6b 61 67 65 29 3a 20 3f 73 74 72 69 6e 67 0a 7b 0a 69 66 20 28 21 66 75 6e 63 74 69 6f 6e 5f 65 | kage):.?string.{.if.(!function_e |
e5ce0 | 78 69 73 74 73 28 27 70 72 6f 63 5f 6f 70 65 6e 27 29 29 20 7b 0a 72 65 74 75 72 6e 20 6e 75 6c | xists('proc_open')).{.return.nul |
e5d00 | 6c 3b 0a 7d 0a 0a 24 70 61 74 68 20 3d 20 72 65 61 6c 70 61 74 68 28 24 74 68 69 73 2d 3e 69 6e | l;.}..$path.=.realpath($this->in |
e5d20 | 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 72 2d 3e 67 65 74 49 6e 73 74 61 6c 6c 50 61 74 | stallationManager->getInstallPat |
e5d40 | 68 28 24 70 61 63 6b 61 67 65 29 29 3b 0a 24 73 6f 75 72 63 65 54 79 70 65 20 3d 20 24 70 61 63 | h($package));.$sourceType.=.$pac |
e5d60 | 6b 61 67 65 2d 3e 67 65 74 53 6f 75 72 63 65 54 79 70 65 28 29 3b 0a 24 64 61 74 65 74 69 6d 65 | kage->getSourceType();.$datetime |
e5d80 | 20 3d 20 6e 75 6c 6c 3b 0a 0a 69 66 20 28 24 70 61 74 68 20 26 26 20 69 6e 5f 61 72 72 61 79 28 | .=.null;..if.($path.&&.in_array( |
e5da0 | 24 73 6f 75 72 63 65 54 79 70 65 2c 20 5b 27 67 69 74 27 2c 20 27 68 67 27 5d 29 29 20 7b 0a 24 | $sourceType,.['git',.'hg'])).{.$ |
e5dc0 | 73 6f 75 72 63 65 52 65 66 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 53 6f 75 72 63 65 52 | sourceRef.=.$package->getSourceR |
e5de0 | 65 66 65 72 65 6e 63 65 28 29 20 3f 3a 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 44 69 73 74 52 | eference().?:.$package->getDistR |
e5e00 | 65 66 65 72 65 6e 63 65 28 29 3b 0a 73 77 69 74 63 68 20 28 24 73 6f 75 72 63 65 54 79 70 65 29 | eference();.switch.($sourceType) |
e5e20 | 20 7b 0a 63 61 73 65 20 27 67 69 74 27 3a 0a 47 69 74 55 74 69 6c 3a 3a 63 6c 65 61 6e 45 6e 76 | .{.case.'git':.GitUtil::cleanEnv |
e5e40 | 28 29 3b 0a 0a 69 66 20 28 30 20 3d 3d 3d 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 65 | ();..if.(0.===.$this->process->e |
e5e60 | 78 65 63 75 74 65 28 27 67 69 74 20 6c 6f 67 20 2d 6e 31 20 2d 2d 70 72 65 74 74 79 3d 25 63 74 | xecute('git.log.-n1.--pretty=%ct |
e5e80 | 20 27 2e 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3a 3a 65 73 63 61 70 65 28 24 73 6f 75 72 | .'.ProcessExecutor::escape($sour |
e5ea0 | 63 65 52 65 66 29 2e 47 69 74 55 74 69 6c 3a 3a 67 65 74 4e 6f 53 68 6f 77 53 69 67 6e 61 74 75 | ceRef).GitUtil::getNoShowSignatu |
e5ec0 | 72 65 46 6c 61 67 28 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 29 2c 20 24 6f 75 74 70 75 74 2c | reFlag($this->process),.$output, |
e5ee0 | 20 24 70 61 74 68 29 20 26 26 20 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b 5e 5c 73 2a 5c | .$path).&&.Preg::isMatch('{^\s*\ |
e5f00 | 64 2b 5c 73 2a 24 7d 27 2c 20 24 6f 75 74 70 75 74 29 29 20 7b 0a 24 64 61 74 65 74 69 6d 65 20 | d+\s*$}',.$output)).{.$datetime. |
e5f20 | 3d 20 6e 65 77 20 5c 44 61 74 65 54 69 6d 65 28 27 40 27 2e 74 72 69 6d 28 24 6f 75 74 70 75 74 | =.new.\DateTime('@'.trim($output |
e5f40 | 29 2c 20 6e 65 77 20 5c 44 61 74 65 54 69 6d 65 5a 6f 6e 65 28 27 55 54 43 27 29 29 3b 0a 7d 0a | ),.new.\DateTimeZone('UTC'));.}. |
e5f60 | 62 72 65 61 6b 3b 0a 0a 63 61 73 65 20 27 68 67 27 3a 0a 69 66 20 28 30 20 3d 3d 3d 20 24 74 68 | break;..case.'hg':.if.(0.===.$th |
e5f80 | 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 65 78 65 63 75 74 65 28 27 68 67 20 6c 6f 67 20 2d 2d 74 | is->process->execute('hg.log.--t |
e5fa0 | 65 6d 70 6c 61 74 65 20 22 7b 64 61 74 65 7c 68 67 64 61 74 65 7d 22 20 2d 72 20 27 2e 50 72 6f | emplate."{date|hgdate}".-r.'.Pro |
e5fc0 | 63 65 73 73 45 78 65 63 75 74 6f 72 3a 3a 65 73 63 61 70 65 28 24 73 6f 75 72 63 65 52 65 66 29 | cessExecutor::escape($sourceRef) |
e5fe0 | 2c 20 24 6f 75 74 70 75 74 2c 20 24 70 61 74 68 29 20 26 26 20 50 72 65 67 3a 3a 69 73 4d 61 74 | ,.$output,.$path).&&.Preg::isMat |
e6000 | 63 68 28 27 7b 5e 5c 73 2a 28 5c 64 2b 29 5c 73 2a 7d 27 2c 20 24 6f 75 74 70 75 74 2c 20 24 6d | ch('{^\s*(\d+)\s*}',.$output,.$m |
e6020 | 61 74 63 68 29 29 20 7b 0a 24 64 61 74 65 74 69 6d 65 20 3d 20 6e 65 77 20 5c 44 61 74 65 54 69 | atch)).{.$datetime.=.new.\DateTi |
e6040 | 6d 65 28 27 40 27 2e 24 6d 61 74 63 68 5b 31 5d 2c 20 6e 65 77 20 5c 44 61 74 65 54 69 6d 65 5a | me('@'.$match[1],.new.\DateTimeZ |
e6060 | 6f 6e 65 28 27 55 54 43 27 29 29 3b 0a 7d 0a 62 72 65 61 6b 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 | one('UTC'));.}.break;.}.}..retur |
e6080 | 6e 20 24 64 61 74 65 74 69 6d 65 20 3f 20 24 64 61 74 65 74 69 6d 65 2d 3e 66 6f 72 6d 61 74 28 | n.$datetime.?.$datetime->format( |
e60a0 | 44 41 54 45 5f 52 46 43 33 33 33 39 29 20 3a 20 6e 75 6c 6c 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 | DATE_RFC3339).:.null;.}.}.<?php. |
e60c0 | 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a | declare(strict_types=1);........ |
e60e0 | 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 3b 0a | ....namespace.Composer\Package;. |
e6100 | 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 56 65 72 73 69 6f 6e 5c 56 65 | .use.Composer\Package\Version\Ve |
e6120 | 72 73 69 6f 6e 50 61 72 73 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 63 72 65 5c 50 | rsionParser;.use.Composer\Pcre\P |
e6140 | 72 65 67 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 43 6f 6d 70 6f 73 65 72 4d | reg;.use.Composer\Util\ComposerM |
e6160 | 69 72 72 6f 72 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 50 61 63 6b 61 67 65 20 65 78 | irror;..........class.Package.ex |
e6180 | 74 65 6e 64 73 20 42 61 73 65 50 61 63 6b 61 67 65 0a 7b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 | tends.BasePackage.{..protected.$ |
e61a0 | 74 79 70 65 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 74 61 72 67 65 74 44 69 72 3b 0a 0a 70 72 | type;..protected.$targetDir;..pr |
e61c0 | 6f 74 65 63 74 65 64 20 24 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 53 6f 75 72 63 65 3b 0a 0a 70 72 | otected.$installationSource;..pr |
e61e0 | 6f 74 65 63 74 65 64 20 24 73 6f 75 72 63 65 54 79 70 65 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 | otected.$sourceType;..protected. |
e6200 | 24 73 6f 75 72 63 65 55 72 6c 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 73 6f 75 72 63 65 52 65 | $sourceUrl;..protected.$sourceRe |
e6220 | 66 65 72 65 6e 63 65 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 73 6f 75 72 63 65 4d 69 72 72 6f | ference;..protected.$sourceMirro |
e6240 | 72 73 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 64 69 73 74 54 79 70 65 3b 0a 0a 70 72 6f 74 65 | rs;..protected.$distType;..prote |
e6260 | 63 74 65 64 20 24 64 69 73 74 55 72 6c 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 64 69 73 74 52 | cted.$distUrl;..protected.$distR |
e6280 | 65 66 65 72 65 6e 63 65 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 64 69 73 74 53 68 61 31 43 68 | eference;..protected.$distSha1Ch |
e62a0 | 65 63 6b 73 75 6d 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 64 69 73 74 4d 69 72 72 6f 72 73 3b | ecksum;..protected.$distMirrors; |
e62c0 | 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 76 65 72 73 69 6f 6e 3b 0a 0a 70 72 6f 74 65 63 74 65 64 | ..protected.$version;..protected |
e62e0 | 20 24 70 72 65 74 74 79 56 65 72 73 69 6f 6e 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 72 65 6c | .$prettyVersion;..protected.$rel |
e6300 | 65 61 73 65 44 61 74 65 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 65 78 74 72 61 20 3d 20 5b 5d | easeDate;..protected.$extra.=.[] |
e6320 | 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 62 69 6e 61 72 69 65 73 20 3d 20 5b 5d 3b 0a 0a 70 72 | ;..protected.$binaries.=.[];..pr |
e6340 | 6f 74 65 63 74 65 64 20 24 64 65 76 3b 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 73 74 61 | otected.$dev;.....protected.$sta |
e6360 | 62 69 6c 69 74 79 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 6e 6f 74 69 66 69 63 61 74 69 6f 6e | bility;..protected.$notification |
e6380 | 55 72 6c 3b 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 72 65 71 75 69 72 65 73 20 3d 20 5b 5d 3b | Url;...protected.$requires.=.[]; |
e63a0 | 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 63 6f 6e 66 6c 69 63 74 73 20 3d 20 5b 5d 3b 0a 0a 70 72 | ..protected.$conflicts.=.[];..pr |
e63c0 | 6f 74 65 63 74 65 64 20 24 70 72 6f 76 69 64 65 73 20 3d 20 5b 5d 3b 0a 0a 70 72 6f 74 65 63 74 | otected.$provides.=.[];..protect |
e63e0 | 65 64 20 24 72 65 70 6c 61 63 65 73 20 3d 20 5b 5d 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 64 | ed.$replaces.=.[];..protected.$d |
e6400 | 65 76 52 65 71 75 69 72 65 73 20 3d 20 5b 5d 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 73 75 67 | evRequires.=.[];..protected.$sug |
e6420 | 67 65 73 74 73 20 3d 20 5b 5d 3b 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 61 75 74 6f 6c | gests.=.[];.....protected.$autol |
e6440 | 6f 61 64 20 3d 20 5b 5d 3b 0a 0a 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 64 65 76 41 75 74 6f | oad.=.[];.....protected.$devAuto |
e6460 | 6c 6f 61 64 20 3d 20 5b 5d 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 69 6e 63 6c 75 64 65 50 61 | load.=.[];..protected.$includePa |
e6480 | 74 68 73 20 3d 20 5b 5d 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 69 73 44 65 66 61 75 6c 74 42 | ths.=.[];..protected.$isDefaultB |
e64a0 | 72 61 6e 63 68 20 3d 20 66 61 6c 73 65 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 74 72 61 6e 73 | ranch.=.false;..protected.$trans |
e64c0 | 70 6f 72 74 4f 70 74 69 6f 6e 73 20 3d 20 5b 5d 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 | portOptions.=.[];.........public |
e64e0 | 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 73 74 72 69 6e 67 20 24 6e 61 | .function.__construct(string.$na |
e6500 | 6d 65 2c 20 73 74 72 69 6e 67 20 24 76 65 72 73 69 6f 6e 2c 20 73 74 72 69 6e 67 20 24 70 72 65 | me,.string.$version,.string.$pre |
e6520 | 74 74 79 56 65 72 73 69 6f 6e 29 0a 7b 0a 70 61 72 65 6e 74 3a 3a 5f 5f 63 6f 6e 73 74 72 75 63 | ttyVersion).{.parent::__construc |
e6540 | 74 28 24 6e 61 6d 65 29 3b 0a 0a 24 74 68 69 73 2d 3e 76 65 72 73 69 6f 6e 20 3d 20 24 76 65 72 | t($name);..$this->version.=.$ver |
e6560 | 73 69 6f 6e 3b 0a 24 74 68 69 73 2d 3e 70 72 65 74 74 79 56 65 72 73 69 6f 6e 20 3d 20 24 70 72 | sion;.$this->prettyVersion.=.$pr |
e6580 | 65 74 74 79 56 65 72 73 69 6f 6e 3b 0a 0a 24 74 68 69 73 2d 3e 73 74 61 62 69 6c 69 74 79 20 3d | ettyVersion;..$this->stability.= |
e65a0 | 20 56 65 72 73 69 6f 6e 50 61 72 73 65 72 3a 3a 70 61 72 73 65 53 74 61 62 69 6c 69 74 79 28 24 | .VersionParser::parseStability($ |
e65c0 | 76 65 72 73 69 6f 6e 29 3b 0a 24 74 68 69 73 2d 3e 64 65 76 20 3d 20 24 74 68 69 73 2d 3e 73 74 | version);.$this->dev.=.$this->st |
e65e0 | 61 62 69 6c 69 74 79 20 3d 3d 3d 20 27 64 65 76 27 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 | ability.===.'dev';.}.....public. |
e6600 | 66 75 6e 63 74 69 6f 6e 20 69 73 44 65 76 28 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 | function.isDev():.bool.{.return. |
e6620 | 24 74 68 69 73 2d 3e 64 65 76 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 | $this->dev;.}..public.function.s |
e6640 | 65 74 54 79 70 65 28 73 74 72 69 6e 67 20 24 74 79 70 65 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 | etType(string.$type):.void.{.$th |
e6660 | 69 73 2d 3e 74 79 70 65 20 3d 20 24 74 79 70 65 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 | is->type.=.$type;.}.....public.f |
e6680 | 75 6e 63 74 69 6f 6e 20 67 65 74 54 79 70 65 28 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 | unction.getType():.string.{.retu |
e66a0 | 72 6e 20 24 74 68 69 73 2d 3e 74 79 70 65 20 3f 3a 20 27 6c 69 62 72 61 72 79 27 3b 0a 7d 0a 0a | rn.$this->type.?:.'library';.}.. |
e66c0 | 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 53 74 61 62 69 6c 69 74 79 28 | ...public.function.getStability( |
e66e0 | 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 73 74 61 62 69 6c | ):.string.{.return.$this->stabil |
e6700 | 69 74 79 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 54 61 72 67 65 | ity;.}..public.function.setTarge |
e6720 | 74 44 69 72 28 3f 73 74 72 69 6e 67 20 24 74 61 72 67 65 74 44 69 72 29 3a 20 76 6f 69 64 0a 7b | tDir(?string.$targetDir):.void.{ |
e6740 | 0a 24 74 68 69 73 2d 3e 74 61 72 67 65 74 44 69 72 20 3d 20 24 74 61 72 67 65 74 44 69 72 3b 0a | .$this->targetDir.=.$targetDir;. |
e6760 | 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 54 61 72 67 65 74 44 | }.....public.function.getTargetD |
e6780 | 69 72 28 29 3a 20 3f 73 74 72 69 6e 67 0a 7b 0a 69 66 20 28 6e 75 6c 6c 20 3d 3d 3d 20 24 74 68 | ir():.?string.{.if.(null.===.$th |
e67a0 | 69 73 2d 3e 74 61 72 67 65 74 44 69 72 29 20 7b 0a 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0a 7d 0a | is->targetDir).{.return.null;.}. |
e67c0 | 0a 72 65 74 75 72 6e 20 6c 74 72 69 6d 28 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 28 27 7b 20 28 | .return.ltrim(Preg::replace('{.( |
e67e0 | 3f 3a 5e 7c 5b 5c 5c 5c 5c 2f 5d 2b 29 20 5c 2e 5c 2e 3f 20 28 3f 3a 5b 5c 5c 5c 5c 2f 5d 2b 7c | ?:^|[\\\\/]+).\.\.?.(?:[\\\\/]+| |
e6800 | 24 29 20 28 3f 3a 5c 2e 5c 2e 3f 20 28 3f 3a 5b 5c 5c 5c 5c 2f 5d 2b 7c 24 29 20 29 2a 7d 78 27 | $).(?:\.\.?.(?:[\\\\/]+|$).)*}x' |
e6820 | 2c 20 27 2f 27 2c 20 24 74 68 69 73 2d 3e 74 61 72 67 65 74 44 69 72 29 2c 20 27 2f 27 29 3b 0a | ,.'/',.$this->targetDir),.'/');. |
e6840 | 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 45 78 74 72 61 28 61 | }.....public.function.setExtra(a |
e6860 | 72 72 61 79 20 24 65 78 74 72 61 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 65 78 74 72 | rray.$extra):.void.{.$this->extr |
e6880 | 61 20 3d 20 24 65 78 74 72 61 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f | a.=.$extra;.}.....public.functio |
e68a0 | 6e 20 67 65 74 45 78 74 72 61 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 | n.getExtra():.array.{.return.$th |
e68c0 | 69 73 2d 3e 65 78 74 72 61 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e | is->extra;.}.....public.function |
e68e0 | 20 73 65 74 42 69 6e 61 72 69 65 73 28 61 72 72 61 79 20 24 62 69 6e 61 72 69 65 73 29 3a 20 76 | .setBinaries(array.$binaries):.v |
e6900 | 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 62 69 6e 61 72 69 65 73 20 3d 20 24 62 69 6e 61 72 69 65 | oid.{.$this->binaries.=.$binarie |
e6920 | 73 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 42 69 6e 61 | s;.}.....public.function.getBina |
e6940 | 72 69 65 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 62 69 | ries():.array.{.return.$this->bi |
e6960 | 6e 61 72 69 65 73 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 | naries;.}.....public.function.se |
e6980 | 74 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 53 6f 75 72 63 65 28 3f 73 74 72 69 6e 67 20 24 74 79 70 | tInstallationSource(?string.$typ |
e69a0 | 65 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 53 6f | e):.void.{.$this->installationSo |
e69c0 | 75 72 63 65 20 3d 20 24 74 79 70 65 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 | urce.=.$type;.}.....public.funct |
e69e0 | 69 6f 6e 20 67 65 74 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 53 6f 75 72 63 65 28 29 3a 20 3f 73 74 | ion.getInstallationSource():.?st |
e6a00 | 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 69 6e 73 74 61 6c 6c 61 74 69 6f | ring.{.return.$this->installatio |
e6a20 | 6e 53 6f 75 72 63 65 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 53 | nSource;.}..public.function.setS |
e6a40 | 6f 75 72 63 65 54 79 70 65 28 3f 73 74 72 69 6e 67 20 24 74 79 70 65 29 3a 20 76 6f 69 64 0a 7b | ourceType(?string.$type):.void.{ |
e6a60 | 0a 24 74 68 69 73 2d 3e 73 6f 75 72 63 65 54 79 70 65 20 3d 20 24 74 79 70 65 3b 0a 7d 0a 0a 0a | .$this->sourceType.=.$type;.}... |
e6a80 | 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 53 6f 75 72 63 65 54 79 70 65 28 | ..public.function.getSourceType( |
e6aa0 | 29 3a 20 3f 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 73 6f 75 72 63 | ):.?string.{.return.$this->sourc |
e6ac0 | 65 54 79 70 65 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 53 6f 75 | eType;.}..public.function.setSou |
e6ae0 | 72 63 65 55 72 6c 28 3f 73 74 72 69 6e 67 20 24 75 72 6c 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 | rceUrl(?string.$url):.void.{.$th |
e6b00 | 69 73 2d 3e 73 6f 75 72 63 65 55 72 6c 20 3d 20 24 75 72 6c 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c | is->sourceUrl.=.$url;.}.....publ |
e6b20 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 53 6f 75 72 63 65 55 72 6c 28 29 3a 20 3f 73 74 72 | ic.function.getSourceUrl():.?str |
e6b40 | 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 73 6f 75 72 63 65 55 72 6c 3b 0a 7d | ing.{.return.$this->sourceUrl;.} |
e6b60 | 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 53 6f 75 72 63 65 52 65 66 65 72 | ..public.function.setSourceRefer |
e6b80 | 65 6e 63 65 28 3f 73 74 72 69 6e 67 20 24 72 65 66 65 72 65 6e 63 65 29 3a 20 76 6f 69 64 0a 7b | ence(?string.$reference):.void.{ |
e6ba0 | 0a 24 74 68 69 73 2d 3e 73 6f 75 72 63 65 52 65 66 65 72 65 6e 63 65 20 3d 20 24 72 65 66 65 72 | .$this->sourceReference.=.$refer |
e6bc0 | 65 6e 63 65 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 53 | ence;.}.....public.function.getS |
e6be0 | 6f 75 72 63 65 52 65 66 65 72 65 6e 63 65 28 29 3a 20 3f 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 | ourceReference():.?string.{.retu |
e6c00 | 72 6e 20 24 74 68 69 73 2d 3e 73 6f 75 72 63 65 52 65 66 65 72 65 6e 63 65 3b 0a 7d 0a 0a 70 75 | rn.$this->sourceReference;.}..pu |
e6c20 | 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 53 6f 75 72 63 65 4d 69 72 72 6f 72 73 28 3f | blic.function.setSourceMirrors(? |
e6c40 | 61 72 72 61 79 20 24 6d 69 72 72 6f 72 73 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 73 | array.$mirrors):.void.{.$this->s |
e6c60 | 6f 75 72 63 65 4d 69 72 72 6f 72 73 20 3d 20 24 6d 69 72 72 6f 72 73 3b 0a 7d 0a 0a 0a 0a 0a 70 | ourceMirrors.=.$mirrors;.}.....p |
e6c80 | 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 53 6f 75 72 63 65 4d 69 72 72 6f 72 73 28 | ublic.function.getSourceMirrors( |
e6ca0 | 29 3a 20 3f 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 73 6f 75 72 63 65 | ):.?array.{.return.$this->source |
e6cc0 | 4d 69 72 72 6f 72 73 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 | Mirrors;.}.....public.function.g |
e6ce0 | 65 74 53 6f 75 72 63 65 55 72 6c 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 | etSourceUrls():.array.{.return.$ |
e6d00 | 74 68 69 73 2d 3e 67 65 74 55 72 6c 73 28 24 74 68 69 73 2d 3e 73 6f 75 72 63 65 55 72 6c 2c 20 | this->getUrls($this->sourceUrl,. |
e6d20 | 24 74 68 69 73 2d 3e 73 6f 75 72 63 65 4d 69 72 72 6f 72 73 2c 20 24 74 68 69 73 2d 3e 73 6f 75 | $this->sourceMirrors,.$this->sou |
e6d40 | 72 63 65 52 65 66 65 72 65 6e 63 65 2c 20 24 74 68 69 73 2d 3e 73 6f 75 72 63 65 54 79 70 65 2c | rceReference,.$this->sourceType, |
e6d60 | 20 27 73 6f 75 72 63 65 27 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f | .'source');.}.....public.functio |
e6d80 | 6e 20 73 65 74 44 69 73 74 54 79 70 65 28 3f 73 74 72 69 6e 67 20 24 74 79 70 65 29 3a 20 76 6f | n.setDistType(?string.$type):.vo |
e6da0 | 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 64 69 73 74 54 79 70 65 20 3d 20 24 74 79 70 65 3b 0a 7d 0a | id.{.$this->distType.=.$type;.}. |
e6dc0 | 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 44 69 73 74 54 79 70 65 28 | ....public.function.getDistType( |
e6de0 | 29 3a 20 3f 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 64 69 73 74 54 | ):.?string.{.return.$this->distT |
e6e00 | 79 70 65 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 44 69 | ype;.}.....public.function.setDi |
e6e20 | 73 74 55 72 6c 28 3f 73 74 72 69 6e 67 20 24 75 72 6c 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 | stUrl(?string.$url):.void.{.$thi |
e6e40 | 73 2d 3e 64 69 73 74 55 72 6c 20 3d 20 24 75 72 6c 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 | s->distUrl.=.$url;.}.....public. |
e6e60 | 66 75 6e 63 74 69 6f 6e 20 67 65 74 44 69 73 74 55 72 6c 28 29 3a 20 3f 73 74 72 69 6e 67 0a 7b | function.getDistUrl():.?string.{ |
e6e80 | 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 64 69 73 74 55 72 6c 3b 0a 7d 0a 0a 0a 0a 0a 70 75 | .return.$this->distUrl;.}.....pu |
e6ea0 | 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 44 69 73 74 52 65 66 65 72 65 6e 63 65 28 3f | blic.function.setDistReference(? |
e6ec0 | 73 74 72 69 6e 67 20 24 72 65 66 65 72 65 6e 63 65 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 | string.$reference):.void.{.$this |
e6ee0 | 2d 3e 64 69 73 74 52 65 66 65 72 65 6e 63 65 20 3d 20 24 72 65 66 65 72 65 6e 63 65 3b 0a 7d 0a | ->distReference.=.$reference;.}. |
e6f00 | 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 44 69 73 74 52 65 66 65 72 | ....public.function.getDistRefer |
e6f20 | 65 6e 63 65 28 29 3a 20 3f 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e | ence():.?string.{.return.$this-> |
e6f40 | 64 69 73 74 52 65 66 65 72 65 6e 63 65 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 | distReference;.}.....public.func |
e6f60 | 74 69 6f 6e 20 73 65 74 44 69 73 74 53 68 61 31 43 68 65 63 6b 73 75 6d 28 3f 73 74 72 69 6e 67 | tion.setDistSha1Checksum(?string |
e6f80 | 20 24 73 68 61 31 63 68 65 63 6b 73 75 6d 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 64 | .$sha1checksum):.void.{.$this->d |
e6fa0 | 69 73 74 53 68 61 31 43 68 65 63 6b 73 75 6d 20 3d 20 24 73 68 61 31 63 68 65 63 6b 73 75 6d 3b | istSha1Checksum.=.$sha1checksum; |
e6fc0 | 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 44 69 73 74 53 68 | .}.....public.function.getDistSh |
e6fe0 | 61 31 43 68 65 63 6b 73 75 6d 28 29 3a 20 3f 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 24 | a1Checksum():.?string.{.return.$ |
e7000 | 74 68 69 73 2d 3e 64 69 73 74 53 68 61 31 43 68 65 63 6b 73 75 6d 3b 0a 7d 0a 0a 70 75 62 6c 69 | this->distSha1Checksum;.}..publi |
e7020 | 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 44 69 73 74 4d 69 72 72 6f 72 73 28 3f 61 72 72 61 79 | c.function.setDistMirrors(?array |
e7040 | 20 24 6d 69 72 72 6f 72 73 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 64 69 73 74 4d 69 | .$mirrors):.void.{.$this->distMi |
e7060 | 72 72 6f 72 73 20 3d 20 24 6d 69 72 72 6f 72 73 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 | rrors.=.$mirrors;.}.....public.f |
e7080 | 75 6e 63 74 69 6f 6e 20 67 65 74 44 69 73 74 4d 69 72 72 6f 72 73 28 29 3a 20 3f 61 72 72 61 79 | unction.getDistMirrors():.?array |
e70a0 | 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 64 69 73 74 4d 69 72 72 6f 72 73 3b 0a 7d 0a | .{.return.$this->distMirrors;.}. |
e70c0 | 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 44 69 73 74 55 72 6c 73 28 | ....public.function.getDistUrls( |
e70e0 | 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 67 65 74 55 72 6c 73 | ):.array.{.return.$this->getUrls |
e7100 | 28 24 74 68 69 73 2d 3e 64 69 73 74 55 72 6c 2c 20 24 74 68 69 73 2d 3e 64 69 73 74 4d 69 72 72 | ($this->distUrl,.$this->distMirr |
e7120 | 6f 72 73 2c 20 24 74 68 69 73 2d 3e 64 69 73 74 52 65 66 65 72 65 6e 63 65 2c 20 24 74 68 69 73 | ors,.$this->distReference,.$this |
e7140 | 2d 3e 64 69 73 74 54 79 70 65 2c 20 27 64 69 73 74 27 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 | ->distType,.'dist');.}.....publi |
e7160 | 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 54 72 61 6e 73 70 6f 72 74 4f 70 74 69 6f 6e 73 28 29 | c.function.getTransportOptions() |
e7180 | 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 74 72 61 6e 73 70 6f 72 | :.array.{.return.$this->transpor |
e71a0 | 74 4f 70 74 69 6f 6e 73 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 | tOptions;.}.....public.function. |
e71c0 | 73 65 74 54 72 61 6e 73 70 6f 72 74 4f 70 74 69 6f 6e 73 28 61 72 72 61 79 20 24 6f 70 74 69 6f | setTransportOptions(array.$optio |
e71e0 | 6e 73 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 74 72 61 6e 73 70 6f 72 74 4f 70 74 69 | ns):.void.{.$this->transportOpti |
e7200 | 6f 6e 73 20 3d 20 24 6f 70 74 69 6f 6e 73 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e | ons.=.$options;.}.....public.fun |
e7220 | 63 74 69 6f 6e 20 67 65 74 56 65 72 73 69 6f 6e 28 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 65 74 | ction.getVersion():.string.{.ret |
e7240 | 75 72 6e 20 24 74 68 69 73 2d 3e 76 65 72 73 69 6f 6e 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 | urn.$this->version;.}.....public |
e7260 | 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 29 3a 20 73 74 | .function.getPrettyVersion():.st |
e7280 | 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 70 72 65 74 74 79 56 65 72 73 69 | ring.{.return.$this->prettyVersi |
e72a0 | 6f 6e 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 52 65 6c 65 61 73 | on;.}..public.function.setReleas |
e72c0 | 65 44 61 74 65 28 3f 5c 44 61 74 65 54 69 6d 65 49 6e 74 65 72 66 61 63 65 20 24 72 65 6c 65 61 | eDate(?\DateTimeInterface.$relea |
e72e0 | 73 65 44 61 74 65 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 72 65 6c 65 61 73 65 44 61 | seDate):.void.{.$this->releaseDa |
e7300 | 74 65 20 3d 20 24 72 65 6c 65 61 73 65 44 61 74 65 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 | te.=.$releaseDate;.}.....public. |
e7320 | 66 75 6e 63 74 69 6f 6e 20 67 65 74 52 65 6c 65 61 73 65 44 61 74 65 28 29 3a 20 3f 5c 44 61 74 | function.getReleaseDate():.?\Dat |
e7340 | 65 54 69 6d 65 49 6e 74 65 72 66 61 63 65 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 72 | eTimeInterface.{.return.$this->r |
e7360 | 65 6c 65 61 73 65 44 61 74 65 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 | eleaseDate;.}.......public.funct |
e7380 | 69 6f 6e 20 73 65 74 52 65 71 75 69 72 65 73 28 61 72 72 61 79 20 24 72 65 71 75 69 72 65 73 29 | ion.setRequires(array.$requires) |
e73a0 | 3a 20 76 6f 69 64 0a 7b 0a 69 66 20 28 69 73 73 65 74 28 24 72 65 71 75 69 72 65 73 5b 30 5d 29 | :.void.{.if.(isset($requires[0]) |
e73c0 | 29 20 7b 20 0a 24 72 65 71 75 69 72 65 73 20 3d 20 24 74 68 69 73 2d 3e 63 6f 6e 76 65 72 74 4c | ).{..$requires.=.$this->convertL |
e73e0 | 69 6e 6b 73 54 6f 4d 61 70 28 24 72 65 71 75 69 72 65 73 2c 20 27 73 65 74 52 65 71 75 69 72 65 | inksToMap($requires,.'setRequire |
e7400 | 73 27 29 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 72 65 71 75 69 72 65 73 20 3d 20 24 72 65 71 75 69 | s');.}..$this->requires.=.$requi |
e7420 | 72 65 73 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 52 65 | res;.}.....public.function.getRe |
e7440 | 71 75 69 72 65 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e | quires():.array.{.return.$this-> |
e7460 | 72 65 71 75 69 72 65 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f | requires;.}.......public.functio |
e7480 | 6e 20 73 65 74 43 6f 6e 66 6c 69 63 74 73 28 61 72 72 61 79 20 24 63 6f 6e 66 6c 69 63 74 73 29 | n.setConflicts(array.$conflicts) |
e74a0 | 3a 20 76 6f 69 64 0a 7b 0a 69 66 20 28 69 73 73 65 74 28 24 63 6f 6e 66 6c 69 63 74 73 5b 30 5d | :.void.{.if.(isset($conflicts[0] |
e74c0 | 29 29 20 7b 20 0a 24 63 6f 6e 66 6c 69 63 74 73 20 3d 20 24 74 68 69 73 2d 3e 63 6f 6e 76 65 72 | )).{..$conflicts.=.$this->conver |
e74e0 | 74 4c 69 6e 6b 73 54 6f 4d 61 70 28 24 63 6f 6e 66 6c 69 63 74 73 2c 20 27 73 65 74 43 6f 6e 66 | tLinksToMap($conflicts,.'setConf |
e7500 | 6c 69 63 74 73 27 29 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 63 6f 6e 66 6c 69 63 74 73 20 3d 20 24 | licts');.}..$this->conflicts.=.$ |
e7520 | 63 6f 6e 66 6c 69 63 74 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f | conflicts;.}......public.functio |
e7540 | 6e 20 67 65 74 43 6f 6e 66 6c 69 63 74 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e | n.getConflicts():.array.{.return |
e7560 | 20 24 74 68 69 73 2d 3e 63 6f 6e 66 6c 69 63 74 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 | .$this->conflicts;.}.......publi |
e7580 | 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 50 72 6f 76 69 64 65 73 28 61 72 72 61 79 20 24 70 72 | c.function.setProvides(array.$pr |
e75a0 | 6f 76 69 64 65 73 29 3a 20 76 6f 69 64 0a 7b 0a 69 66 20 28 69 73 73 65 74 28 24 70 72 6f 76 69 | ovides):.void.{.if.(isset($provi |
e75c0 | 64 65 73 5b 30 5d 29 29 20 7b 20 0a 24 70 72 6f 76 69 64 65 73 20 3d 20 24 74 68 69 73 2d 3e 63 | des[0])).{..$provides.=.$this->c |
e75e0 | 6f 6e 76 65 72 74 4c 69 6e 6b 73 54 6f 4d 61 70 28 24 70 72 6f 76 69 64 65 73 2c 20 27 73 65 74 | onvertLinksToMap($provides,.'set |
e7600 | 50 72 6f 76 69 64 65 73 27 29 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 70 72 6f 76 69 64 65 73 20 3d | Provides');.}..$this->provides.= |
e7620 | 20 24 70 72 6f 76 69 64 65 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 | .$provides;.}......public.functi |
e7640 | 6f 6e 20 67 65 74 50 72 6f 76 69 64 65 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e | on.getProvides():.array.{.return |
e7660 | 20 24 74 68 69 73 2d 3e 70 72 6f 76 69 64 65 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 | .$this->provides;.}.......public |
e7680 | 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 52 65 70 6c 61 63 65 73 28 61 72 72 61 79 20 24 72 65 70 | .function.setReplaces(array.$rep |
e76a0 | 6c 61 63 65 73 29 3a 20 76 6f 69 64 0a 7b 0a 69 66 20 28 69 73 73 65 74 28 24 72 65 70 6c 61 63 | laces):.void.{.if.(isset($replac |
e76c0 | 65 73 5b 30 5d 29 29 20 7b 20 0a 24 72 65 70 6c 61 63 65 73 20 3d 20 24 74 68 69 73 2d 3e 63 6f | es[0])).{..$replaces.=.$this->co |
e76e0 | 6e 76 65 72 74 4c 69 6e 6b 73 54 6f 4d 61 70 28 24 72 65 70 6c 61 63 65 73 2c 20 27 73 65 74 52 | nvertLinksToMap($replaces,.'setR |
e7700 | 65 70 6c 61 63 65 73 27 29 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 72 65 70 6c 61 63 65 73 20 3d 20 | eplaces');.}..$this->replaces.=. |
e7720 | 24 72 65 70 6c 61 63 65 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f | $replaces;.}......public.functio |
e7740 | 6e 20 67 65 74 52 65 70 6c 61 63 65 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 | n.getReplaces():.array.{.return. |
e7760 | 24 74 68 69 73 2d 3e 72 65 70 6c 61 63 65 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 | $this->replaces;.}.......public. |
e7780 | 66 75 6e 63 74 69 6f 6e 20 73 65 74 44 65 76 52 65 71 75 69 72 65 73 28 61 72 72 61 79 20 24 64 | function.setDevRequires(array.$d |
e77a0 | 65 76 52 65 71 75 69 72 65 73 29 3a 20 76 6f 69 64 0a 7b 0a 69 66 20 28 69 73 73 65 74 28 24 64 | evRequires):.void.{.if.(isset($d |
e77c0 | 65 76 52 65 71 75 69 72 65 73 5b 30 5d 29 29 20 7b 20 0a 24 64 65 76 52 65 71 75 69 72 65 73 20 | evRequires[0])).{..$devRequires. |
e77e0 | 3d 20 24 74 68 69 73 2d 3e 63 6f 6e 76 65 72 74 4c 69 6e 6b 73 54 6f 4d 61 70 28 24 64 65 76 52 | =.$this->convertLinksToMap($devR |
e7800 | 65 71 75 69 72 65 73 2c 20 27 73 65 74 44 65 76 52 65 71 75 69 72 65 73 27 29 3b 0a 7d 0a 0a 24 | equires,.'setDevRequires');.}..$ |
e7820 | 74 68 69 73 2d 3e 64 65 76 52 65 71 75 69 72 65 73 20 3d 20 24 64 65 76 52 65 71 75 69 72 65 73 | this->devRequires.=.$devRequires |
e7840 | 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 44 65 76 52 65 | ;.}.....public.function.getDevRe |
e7860 | 71 75 69 72 65 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e | quires():.array.{.return.$this-> |
e7880 | 64 65 76 52 65 71 75 69 72 65 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 | devRequires;.}.......public.func |
e78a0 | 74 69 6f 6e 20 73 65 74 53 75 67 67 65 73 74 73 28 61 72 72 61 79 20 24 73 75 67 67 65 73 74 73 | tion.setSuggests(array.$suggests |
e78c0 | 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 73 75 67 67 65 73 74 73 20 3d 20 24 73 75 67 | ):.void.{.$this->suggests.=.$sug |
e78e0 | 67 65 73 74 73 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 | gests;.}.....public.function.get |
e7900 | 53 75 67 67 65 73 74 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 | Suggests():.array.{.return.$this |
e7920 | 2d 3e 73 75 67 67 65 73 74 73 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 | ->suggests;.}..........public.fu |
e7940 | 6e 63 74 69 6f 6e 20 73 65 74 41 75 74 6f 6c 6f 61 64 28 61 72 72 61 79 20 24 61 75 74 6f 6c 6f | nction.setAutoload(array.$autolo |
e7960 | 61 64 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 61 75 74 6f 6c 6f 61 64 20 3d 20 24 61 | ad):.void.{.$this->autoload.=.$a |
e7980 | 75 74 6f 6c 6f 61 64 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 | utoload;.}.....public.function.g |
e79a0 | 65 74 41 75 74 6f 6c 6f 61 64 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 | etAutoload():.array.{.return.$th |
e79c0 | 69 73 2d 3e 61 75 74 6f 6c 6f 61 64 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 | is->autoload;.}..........public. |
e79e0 | 66 75 6e 63 74 69 6f 6e 20 73 65 74 44 65 76 41 75 74 6f 6c 6f 61 64 28 61 72 72 61 79 20 24 64 | function.setDevAutoload(array.$d |
e7a00 | 65 76 41 75 74 6f 6c 6f 61 64 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 64 65 76 41 75 | evAutoload):.void.{.$this->devAu |
e7a20 | 74 6f 6c 6f 61 64 20 3d 20 24 64 65 76 41 75 74 6f 6c 6f 61 64 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 | toload.=.$devAutoload;.}.....pub |
e7a40 | 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 44 65 76 41 75 74 6f 6c 6f 61 64 28 29 3a 20 61 | lic.function.getDevAutoload():.a |
e7a60 | 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 64 65 76 41 75 74 6f 6c 6f 61 64 | rray.{.return.$this->devAutoload |
e7a80 | 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 49 6e 63 | ;.}.......public.function.setInc |
e7aa0 | 6c 75 64 65 50 61 74 68 73 28 61 72 72 61 79 20 24 69 6e 63 6c 75 64 65 50 61 74 68 73 29 3a 20 | ludePaths(array.$includePaths):. |
e7ac0 | 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 69 6e 63 6c 75 64 65 50 61 74 68 73 20 3d 20 24 69 6e | void.{.$this->includePaths.=.$in |
e7ae0 | 63 6c 75 64 65 50 61 74 68 73 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f | cludePaths;.}.....public.functio |
e7b00 | 6e 20 67 65 74 49 6e 63 6c 75 64 65 50 61 74 68 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 | n.getIncludePaths():.array.{.ret |
e7b20 | 75 72 6e 20 24 74 68 69 73 2d 3e 69 6e 63 6c 75 64 65 50 61 74 68 73 3b 0a 7d 0a 0a 0a 0a 0a 70 | urn.$this->includePaths;.}.....p |
e7b40 | 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 4e 6f 74 69 66 69 63 61 74 69 6f 6e 55 72 | ublic.function.setNotificationUr |
e7b60 | 6c 28 73 74 72 69 6e 67 20 24 6e 6f 74 69 66 69 63 61 74 69 6f 6e 55 72 6c 29 3a 20 76 6f 69 64 | l(string.$notificationUrl):.void |
e7b80 | 0a 7b 0a 24 74 68 69 73 2d 3e 6e 6f 74 69 66 69 63 61 74 69 6f 6e 55 72 6c 20 3d 20 24 6e 6f 74 | .{.$this->notificationUrl.=.$not |
e7ba0 | 69 66 69 63 61 74 69 6f 6e 55 72 6c 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 | ificationUrl;.}.....public.funct |
e7bc0 | 69 6f 6e 20 67 65 74 4e 6f 74 69 66 69 63 61 74 69 6f 6e 55 72 6c 28 29 3a 20 3f 73 74 72 69 6e | ion.getNotificationUrl():.?strin |
e7be0 | 67 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 6e 6f 74 69 66 69 63 61 74 69 6f 6e 55 72 | g.{.return.$this->notificationUr |
e7c00 | 6c 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 49 73 44 65 66 61 75 | l;.}..public.function.setIsDefau |
e7c20 | 6c 74 42 72 61 6e 63 68 28 62 6f 6f 6c 20 24 64 65 66 61 75 6c 74 42 72 61 6e 63 68 29 3a 20 76 | ltBranch(bool.$defaultBranch):.v |
e7c40 | 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 69 73 44 65 66 61 75 6c 74 42 72 61 6e 63 68 20 3d 20 24 | oid.{.$this->isDefaultBranch.=.$ |
e7c60 | 64 65 66 61 75 6c 74 42 72 61 6e 63 68 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 | defaultBranch;.}.....public.func |
e7c80 | 74 69 6f 6e 20 69 73 44 65 66 61 75 6c 74 42 72 61 6e 63 68 28 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 | tion.isDefaultBranch():.bool.{.r |
e7ca0 | 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 69 73 44 65 66 61 75 6c 74 42 72 61 6e 63 68 3b 0a 7d 0a | eturn.$this->isDefaultBranch;.}. |
e7cc0 | 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 53 6f 75 72 63 65 44 69 73 | ....public.function.setSourceDis |
e7ce0 | 74 52 65 66 65 72 65 6e 63 65 73 28 73 74 72 69 6e 67 20 24 72 65 66 65 72 65 6e 63 65 29 3a 20 | tReferences(string.$reference):. |
e7d00 | 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 73 65 74 53 6f 75 72 63 65 52 65 66 65 72 65 6e 63 65 | void.{.$this->setSourceReference |
e7d20 | 28 24 72 65 66 65 72 65 6e 63 65 29 3b 0a 0a 0a 0a 69 66 20 28 0a 24 74 68 69 73 2d 3e 67 65 74 | ($reference);....if.(.$this->get |
e7d40 | 44 69 73 74 55 72 6c 28 29 20 21 3d 3d 20 6e 75 6c 6c 0a 26 26 20 50 72 65 67 3a 3a 69 73 4d 61 | DistUrl().!==.null.&&.Preg::isMa |
e7d60 | 74 63 68 28 27 7b 5e 68 74 74 70 73 3f 3a 2f 2f 28 3f 3a 28 3f 3a 77 77 77 5c 2e 29 3f 62 69 74 | tch('{^https?://(?:(?:www\.)?bit |
e7d80 | 62 75 63 6b 65 74 5c 2e 6f 72 67 7c 28 61 70 69 5c 2e 29 3f 67 69 74 68 75 62 5c 2e 63 6f 6d 7c | bucket\.org|(api\.)?github\.com| |
e7da0 | 28 3f 3a 77 77 77 5c 2e 29 3f 67 69 74 6c 61 62 5c 2e 63 6f 6d 29 2f 7d 69 27 2c 20 24 74 68 69 | (?:www\.)?gitlab\.com)/}i',.$thi |
e7dc0 | 73 2d 3e 67 65 74 44 69 73 74 55 72 6c 28 29 29 0a 29 20 7b 0a 24 74 68 69 73 2d 3e 73 65 74 44 | s->getDistUrl()).).{.$this->setD |
e7de0 | 69 73 74 52 65 66 65 72 65 6e 63 65 28 24 72 65 66 65 72 65 6e 63 65 29 3b 0a 24 74 68 69 73 2d | istReference($reference);.$this- |
e7e00 | 3e 73 65 74 44 69 73 74 55 72 6c 28 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 28 27 7b 28 3f 3c 3d | >setDistUrl(Preg::replace('{(?<= |
e7e20 | 2f 7c 73 68 61 3d 29 5b 61 2d 66 30 2d 39 5d 7b 34 30 7d 28 3f 3d 2f 7c 24 29 7d 69 27 2c 20 24 | /|sha=)[a-f0-9]{40}(?=/|$)}i',.$ |
e7e40 | 72 65 66 65 72 65 6e 63 65 2c 20 24 74 68 69 73 2d 3e 67 65 74 44 69 73 74 55 72 6c 28 29 29 29 | reference,.$this->getDistUrl())) |
e7e60 | 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 74 68 69 73 2d 3e 67 65 74 44 69 73 74 52 65 66 65 72 65 | ;.}.elseif.($this->getDistRefere |
e7e80 | 6e 63 65 28 29 29 20 7b 20 0a 24 74 68 69 73 2d 3e 73 65 74 44 69 73 74 52 65 66 65 72 65 6e 63 | nce()).{..$this->setDistReferenc |
e7ea0 | 65 28 24 72 65 66 65 72 65 6e 63 65 29 3b 0a 7d 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 | e($reference);.}.}.........publi |
e7ec0 | 63 20 66 75 6e 63 74 69 6f 6e 20 72 65 70 6c 61 63 65 56 65 72 73 69 6f 6e 28 73 74 72 69 6e 67 | c.function.replaceVersion(string |
e7ee0 | 20 24 76 65 72 73 69 6f 6e 2c 20 73 74 72 69 6e 67 20 24 70 72 65 74 74 79 56 65 72 73 69 6f 6e | .$version,.string.$prettyVersion |
e7f00 | 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 76 65 72 73 69 6f 6e 20 3d 20 24 76 65 72 73 | ):.void.{.$this->version.=.$vers |
e7f20 | 69 6f 6e 3b 0a 24 74 68 69 73 2d 3e 70 72 65 74 74 79 56 65 72 73 69 6f 6e 20 3d 20 24 70 72 65 | ion;.$this->prettyVersion.=.$pre |
e7f40 | 74 74 79 56 65 72 73 69 6f 6e 3b 0a 0a 24 74 68 69 73 2d 3e 73 74 61 62 69 6c 69 74 79 20 3d 20 | ttyVersion;..$this->stability.=. |
e7f60 | 56 65 72 73 69 6f 6e 50 61 72 73 65 72 3a 3a 70 61 72 73 65 53 74 61 62 69 6c 69 74 79 28 24 76 | VersionParser::parseStability($v |
e7f80 | 65 72 73 69 6f 6e 29 3b 0a 24 74 68 69 73 2d 3e 64 65 76 20 3d 20 24 74 68 69 73 2d 3e 73 74 61 | ersion);.$this->dev.=.$this->sta |
e7fa0 | 62 69 6c 69 74 79 20 3d 3d 3d 20 27 64 65 76 27 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 72 6f 74 | bility.===.'dev';.}.........prot |
e7fc0 | 65 63 74 65 64 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 55 72 6c 73 28 3f 73 74 72 69 6e 67 20 24 | ected.function.getUrls(?string.$ |
e7fe0 | 75 72 6c 2c 20 3f 61 72 72 61 79 20 24 6d 69 72 72 6f 72 73 2c 20 3f 73 74 72 69 6e 67 20 24 72 | url,.?array.$mirrors,.?string.$r |
e8000 | 65 66 2c 20 3f 73 74 72 69 6e 67 20 24 74 79 70 65 2c 20 73 74 72 69 6e 67 20 24 75 72 6c 54 79 | ef,.?string.$type,.string.$urlTy |
e8020 | 70 65 29 3a 20 61 72 72 61 79 0a 7b 0a 69 66 20 28 21 24 75 72 6c 29 20 7b 0a 72 65 74 75 72 6e | pe):.array.{.if.(!$url).{.return |
e8040 | 20 5b 5d 3b 0a 7d 0a 0a 69 66 20 28 24 75 72 6c 54 79 70 65 20 3d 3d 3d 20 27 64 69 73 74 27 20 | .[];.}..if.($urlType.===.'dist'. |
e8060 | 26 26 20 66 61 6c 73 65 20 21 3d 3d 20 73 74 72 70 6f 73 28 24 75 72 6c 2c 20 27 25 27 29 29 20 | &&.false.!==.strpos($url,.'%')). |
e8080 | 7b 0a 24 75 72 6c 20 3d 20 43 6f 6d 70 6f 73 65 72 4d 69 72 72 6f 72 3a 3a 70 72 6f 63 65 73 73 | {.$url.=.ComposerMirror::process |
e80a0 | 55 72 6c 28 24 75 72 6c 2c 20 24 74 68 69 73 2d 3e 6e 61 6d 65 2c 20 24 74 68 69 73 2d 3e 76 65 | Url($url,.$this->name,.$this->ve |
e80c0 | 72 73 69 6f 6e 2c 20 24 72 65 66 2c 20 24 74 79 70 65 2c 20 24 74 68 69 73 2d 3e 70 72 65 74 74 | rsion,.$ref,.$type,.$this->prett |
e80e0 | 79 56 65 72 73 69 6f 6e 29 3b 0a 7d 0a 0a 24 75 72 6c 73 20 3d 20 5b 24 75 72 6c 5d 3b 0a 69 66 | yVersion);.}..$urls.=.[$url];.if |
e8100 | 20 28 24 6d 69 72 72 6f 72 73 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 6d 69 72 72 6f 72 73 20 | .($mirrors).{.foreach.($mirrors. |
e8120 | 61 73 20 24 6d 69 72 72 6f 72 29 20 7b 0a 69 66 20 28 24 75 72 6c 54 79 70 65 20 3d 3d 3d 20 27 | as.$mirror).{.if.($urlType.===.' |
e8140 | 64 69 73 74 27 29 20 7b 0a 24 6d 69 72 72 6f 72 55 72 6c 20 3d 20 43 6f 6d 70 6f 73 65 72 4d 69 | dist').{.$mirrorUrl.=.ComposerMi |
e8160 | 72 72 6f 72 3a 3a 70 72 6f 63 65 73 73 55 72 6c 28 24 6d 69 72 72 6f 72 5b 27 75 72 6c 27 5d 2c | rror::processUrl($mirror['url'], |
e8180 | 20 24 74 68 69 73 2d 3e 6e 61 6d 65 2c 20 24 74 68 69 73 2d 3e 76 65 72 73 69 6f 6e 2c 20 24 72 | .$this->name,.$this->version,.$r |
e81a0 | 65 66 2c 20 24 74 79 70 65 2c 20 24 74 68 69 73 2d 3e 70 72 65 74 74 79 56 65 72 73 69 6f 6e 29 | ef,.$type,.$this->prettyVersion) |
e81c0 | 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 75 72 6c 54 79 70 65 20 3d 3d 3d 20 27 73 6f 75 72 63 65 | ;.}.elseif.($urlType.===.'source |
e81e0 | 27 20 26 26 20 24 74 79 70 65 20 3d 3d 3d 20 27 67 69 74 27 29 20 7b 0a 24 6d 69 72 72 6f 72 55 | '.&&.$type.===.'git').{.$mirrorU |
e8200 | 72 6c 20 3d 20 43 6f 6d 70 6f 73 65 72 4d 69 72 72 6f 72 3a 3a 70 72 6f 63 65 73 73 47 69 74 55 | rl.=.ComposerMirror::processGitU |
e8220 | 72 6c 28 24 6d 69 72 72 6f 72 5b 27 75 72 6c 27 5d 2c 20 24 74 68 69 73 2d 3e 6e 61 6d 65 2c 20 | rl($mirror['url'],.$this->name,. |
e8240 | 24 75 72 6c 2c 20 24 74 79 70 65 29 3b 0a 7d 20 65 6c 73 65 69 66 20 28 24 75 72 6c 54 79 70 65 | $url,.$type);.}.elseif.($urlType |
e8260 | 20 3d 3d 3d 20 27 73 6f 75 72 63 65 27 20 26 26 20 24 74 79 70 65 20 3d 3d 3d 20 27 68 67 27 29 | .===.'source'.&&.$type.===.'hg') |
e8280 | 20 7b 0a 24 6d 69 72 72 6f 72 55 72 6c 20 3d 20 43 6f 6d 70 6f 73 65 72 4d 69 72 72 6f 72 3a 3a | .{.$mirrorUrl.=.ComposerMirror:: |
e82a0 | 70 72 6f 63 65 73 73 48 67 55 72 6c 28 24 6d 69 72 72 6f 72 5b 27 75 72 6c 27 5d 2c 20 24 74 68 | processHgUrl($mirror['url'],.$th |
e82c0 | 69 73 2d 3e 6e 61 6d 65 2c 20 24 75 72 6c 2c 20 24 74 79 70 65 29 3b 0a 7d 20 65 6c 73 65 20 7b | is->name,.$url,.$type);.}.else.{ |
e82e0 | 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 69 66 20 28 21 5c 69 6e 5f 61 72 72 61 79 28 24 6d 69 72 | .continue;.}.if.(!\in_array($mir |
e8300 | 72 6f 72 55 72 6c 2c 20 24 75 72 6c 73 29 29 20 7b 0a 24 66 75 6e 63 20 3d 20 24 6d 69 72 72 6f | rorUrl,.$urls)).{.$func.=.$mirro |
e8320 | 72 5b 27 70 72 65 66 65 72 72 65 64 27 5d 20 3f 20 27 61 72 72 61 79 5f 75 6e 73 68 69 66 74 27 | r['preferred'].?.'array_unshift' |
e8340 | 20 3a 20 27 61 72 72 61 79 5f 70 75 73 68 27 3b 0a 24 66 75 6e 63 28 24 75 72 6c 73 2c 20 24 6d | .:.'array_push';.$func($urls,.$m |
e8360 | 69 72 72 6f 72 55 72 6c 29 3b 0a 7d 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 75 72 6c 73 3b 0a | irrorUrl);.}.}.}..return.$urls;. |
e8380 | 7d 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 63 6f 6e 76 65 72 74 4c | }......private.function.convertL |
e83a0 | 69 6e 6b 73 54 6f 4d 61 70 28 61 72 72 61 79 20 24 6c 69 6e 6b 73 2c 20 73 74 72 69 6e 67 20 24 | inksToMap(array.$links,.string.$ |
e83c0 | 73 6f 75 72 63 65 29 3a 20 61 72 72 61 79 0a 7b 0a 74 72 69 67 67 65 72 5f 65 72 72 6f 72 28 27 | source):.array.{.trigger_error(' |
e83e0 | 50 61 63 6b 61 67 65 3a 3a 27 2e 24 73 6f 75 72 63 65 2e 27 20 6d 75 73 74 20 62 65 20 63 61 6c | Package::'.$source.'.must.be.cal |
e8400 | 6c 65 64 20 77 69 74 68 20 61 20 6d 61 70 20 6f 66 20 6c 6f 77 65 72 63 61 73 65 64 20 70 61 63 | led.with.a.map.of.lowercased.pac |
e8420 | 6b 61 67 65 20 6e 61 6d 65 20 3d 3e 20 4c 69 6e 6b 20 6f 62 6a 65 63 74 2c 20 67 6f 74 20 61 20 | kage.name.=>.Link.object,.got.a. |
e8440 | 69 6e 64 65 78 65 64 20 61 72 72 61 79 2c 20 74 68 69 73 20 69 73 20 64 65 70 72 65 63 61 74 65 | indexed.array,.this.is.deprecate |
e8460 | 64 20 61 6e 64 20 79 6f 75 20 73 68 6f 75 6c 64 20 66 69 78 20 79 6f 75 72 20 75 73 61 67 65 2e | d.and.you.should.fix.your.usage. |
e8480 | 27 29 3b 0a 24 6e 65 77 4c 69 6e 6b 73 20 3d 20 5b 5d 3b 0a 66 6f 72 65 61 63 68 20 28 24 6c 69 | ');.$newLinks.=.[];.foreach.($li |
e84a0 | 6e 6b 73 20 61 73 20 24 6c 69 6e 6b 29 20 7b 0a 24 6e 65 77 4c 69 6e 6b 73 5b 24 6c 69 6e 6b 2d | nks.as.$link).{.$newLinks[$link- |
e84c0 | 3e 67 65 74 54 61 72 67 65 74 28 29 5d 20 3d 20 24 6c 69 6e 6b 3b 0a 7d 0a 0a 72 65 74 75 72 6e | >getTarget()].=.$link;.}..return |
e84e0 | 20 24 6e 65 77 4c 69 6e 6b 73 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 | .$newLinks;.}.}.<?php.declare(st |
e8500 | 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 | rict_types=1);............namesp |
e8520 | 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f | ace.Composer\Package;..use.Compo |
e8540 | 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 | ser\Repository\RepositoryInterfa |
e8560 | 63 65 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 69 6e 74 65 72 66 61 63 65 20 50 61 63 6b 61 67 65 | ce;............interface.Package |
e8580 | 49 6e 74 65 72 66 61 63 65 0a 7b 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 44 49 53 50 4c 41 59 | Interface.{.public.const.DISPLAY |
e85a0 | 5f 53 4f 55 52 43 45 5f 52 45 46 5f 49 46 5f 44 45 56 20 3d 20 30 3b 0a 70 75 62 6c 69 63 20 63 | _SOURCE_REF_IF_DEV.=.0;.public.c |
e85c0 | 6f 6e 73 74 20 44 49 53 50 4c 41 59 5f 53 4f 55 52 43 45 5f 52 45 46 20 3d 20 31 3b 0a 70 75 62 | onst.DISPLAY_SOURCE_REF.=.1;.pub |
e85e0 | 6c 69 63 20 63 6f 6e 73 74 20 44 49 53 50 4c 41 59 5f 44 49 53 54 5f 52 45 46 20 3d 20 32 3b 0a | lic.const.DISPLAY_DIST_REF.=.2;. |
e8600 | 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 4e 61 6d 65 28 29 3a | ......public.function.getName(): |
e8620 | 20 73 74 72 69 6e 67 3b 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 | .string;.......public.function.g |
e8640 | 65 74 50 72 65 74 74 79 4e 61 6d 65 28 29 3a 20 73 74 72 69 6e 67 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a | etPrettyName():.string;......... |
e8660 | 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 4e 61 6d 65 73 28 62 6f 6f 6c | ...public.function.getNames(bool |
e8680 | 20 24 70 72 6f 76 69 64 65 73 20 3d 20 74 72 75 65 29 3a 20 61 72 72 61 79 3b 0a 0a 0a 0a 0a 70 | .$provides.=.true):.array;.....p |
e86a0 | 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 49 64 28 69 6e 74 20 24 69 64 29 3a 20 76 | ublic.function.setId(int.$id):.v |
e86c0 | 6f 69 64 3b 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 49 64 | oid;.......public.function.getId |
e86e0 | 28 29 3a 20 69 6e 74 3b 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 44 | ():.int;.....public.function.isD |
e8700 | 65 76 28 29 3a 20 62 6f 6f 6c 3b 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f | ev():.bool;.......public.functio |
e8720 | 6e 20 67 65 74 54 79 70 65 28 29 3a 20 73 74 72 69 6e 67 3b 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 | n.getType():.string;.......publi |
e8740 | 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 54 61 72 67 65 74 44 69 72 28 29 3a 20 3f 73 74 72 69 | c.function.getTargetDir():.?stri |
e8760 | 6e 67 3b 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 45 78 74 | ng;.......public.function.getExt |
e8780 | 72 61 28 29 3a 20 61 72 72 61 79 3b 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 | ra():.array;........public.funct |
e87a0 | 69 6f 6e 20 73 65 74 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 53 6f 75 72 63 65 28 3f 73 74 72 69 6e | ion.setInstallationSource(?strin |
e87c0 | 67 20 24 74 79 70 65 29 3a 20 76 6f 69 64 3b 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 | g.$type):.void;........public.fu |
e87e0 | 6e 63 74 69 6f 6e 20 67 65 74 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 53 6f 75 72 63 65 28 29 3a 20 | nction.getInstallationSource():. |
e8800 | 3f 73 74 72 69 6e 67 3b 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 | ?string;.......public.function.g |
e8820 | 65 74 53 6f 75 72 63 65 54 79 70 65 28 29 3a 20 3f 73 74 72 69 6e 67 3b 0a 0a 0a 0a 0a 0a 0a 70 | etSourceType():.?string;.......p |
e8840 | 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 53 6f 75 72 63 65 55 72 6c 28 29 3a 20 3f | ublic.function.getSourceUrl():.? |
e8860 | 73 74 72 69 6e 67 3b 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 | string;.......public.function.ge |
e8880 | 74 53 6f 75 72 63 65 55 72 6c 73 28 29 3a 20 61 72 72 61 79 3b 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c | tSourceUrls():.array;.......publ |
e88a0 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 53 6f 75 72 63 65 52 65 66 65 72 65 6e 63 65 28 29 | ic.function.getSourceReference() |
e88c0 | 3a 20 3f 73 74 72 69 6e 67 3b 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e | :.?string;.......public.function |
e88e0 | 20 67 65 74 53 6f 75 72 63 65 4d 69 72 72 6f 72 73 28 29 3a 20 3f 61 72 72 61 79 3b 0a 0a 0a 0a | .getSourceMirrors():.?array;.... |
e8900 | 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 53 6f 75 72 63 65 4d 69 72 72 6f 72 | .public.function.setSourceMirror |
e8920 | 73 28 3f 61 72 72 61 79 20 24 6d 69 72 72 6f 72 73 29 3a 20 76 6f 69 64 3b 0a 0a 0a 0a 0a 0a 0a | s(?array.$mirrors):.void;....... |
e8940 | 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 44 69 73 74 54 79 70 65 28 29 3a 20 3f | public.function.getDistType():.? |
e8960 | 73 74 72 69 6e 67 3b 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 | string;.......public.function.ge |
e8980 | 74 44 69 73 74 55 72 6c 28 29 3a 20 3f 73 74 72 69 6e 67 3b 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 | tDistUrl():.?string;.......publi |
e89a0 | 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 44 69 73 74 55 72 6c 73 28 29 3a 20 61 72 72 61 79 3b | c.function.getDistUrls():.array; |
e89c0 | 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 44 69 73 74 52 65 | .......public.function.getDistRe |
e89e0 | 66 65 72 65 6e 63 65 28 29 3a 20 3f 73 74 72 69 6e 67 3b 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 | ference():.?string;.......public |
e8a00 | 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 44 69 73 74 53 68 61 31 43 68 65 63 6b 73 75 6d 28 29 3a | .function.getDistSha1Checksum(): |
e8a20 | 20 3f 73 74 72 69 6e 67 3b 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 | .?string;.......public.function. |
e8a40 | 67 65 74 44 69 73 74 4d 69 72 72 6f 72 73 28 29 3a 20 3f 61 72 72 61 79 3b 0a 0a 0a 0a 0a 70 75 | getDistMirrors():.?array;.....pu |
e8a60 | 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 44 69 73 74 4d 69 72 72 6f 72 73 28 3f 61 72 | blic.function.setDistMirrors(?ar |
e8a80 | 72 61 79 20 24 6d 69 72 72 6f 72 73 29 3a 20 76 6f 69 64 3b 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 | ray.$mirrors):.void;.......publi |
e8aa0 | 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 56 65 72 73 69 6f 6e 28 29 3a 20 73 74 72 69 6e 67 3b | c.function.getVersion():.string; |
e8ac0 | 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 50 72 65 74 74 79 | .......public.function.getPretty |
e8ae0 | 56 65 72 73 69 6f 6e 28 29 3a 20 73 74 72 69 6e 67 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 | Version():.string;.............p |
e8b00 | 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 46 75 6c 6c 50 72 65 74 74 79 56 65 72 73 | ublic.function.getFullPrettyVers |
e8b20 | 69 6f 6e 28 62 6f 6f 6c 20 24 74 72 75 6e 63 61 74 65 20 3d 20 74 72 75 65 2c 20 69 6e 74 20 24 | ion(bool.$truncate.=.true,.int.$ |
e8b40 | 64 69 73 70 6c 61 79 4d 6f 64 65 20 3d 20 73 65 6c 66 3a 3a 44 49 53 50 4c 41 59 5f 53 4f 55 52 | displayMode.=.self::DISPLAY_SOUR |
e8b60 | 43 45 5f 52 45 46 5f 49 46 5f 44 45 56 29 3a 20 73 74 72 69 6e 67 3b 0a 0a 0a 0a 0a 0a 0a 70 75 | CE_REF_IF_DEV):.string;.......pu |
e8b80 | 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 52 65 6c 65 61 73 65 44 61 74 65 28 29 3a 20 | blic.function.getReleaseDate():. |
e8ba0 | 3f 5c 44 61 74 65 54 69 6d 65 49 6e 74 65 72 66 61 63 65 3b 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c | ?\DateTimeInterface;........publ |
e8bc0 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 53 74 61 62 69 6c 69 74 79 28 29 3a 20 73 74 72 69 | ic.function.getStability():.stri |
e8be0 | 6e 67 3b 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 52 65 | ng;........public.function.getRe |
e8c00 | 71 75 69 72 65 73 28 29 3a 20 61 72 72 61 79 3b 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 | quires():.array;........public.f |
e8c20 | 75 6e 63 74 69 6f 6e 20 67 65 74 43 6f 6e 66 6c 69 63 74 73 28 29 3a 20 61 72 72 61 79 3b 0a 0a | unction.getConflicts():.array;.. |
e8c40 | 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 50 72 6f 76 69 64 65 | ......public.function.getProvide |
e8c60 | 73 28 29 3a 20 61 72 72 61 79 3b 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 | s():.array;........public.functi |
e8c80 | 6f 6e 20 67 65 74 52 65 70 6c 61 63 65 73 28 29 3a 20 61 72 72 61 79 3b 0a 0a 0a 0a 0a 0a 0a 0a | on.getReplaces():.array;........ |
e8ca0 | 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 44 65 76 52 65 71 75 69 72 65 73 28 29 | public.function.getDevRequires() |
e8cc0 | 3a 20 61 72 72 61 79 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e | :.array;.........public.function |
e8ce0 | 20 67 65 74 53 75 67 67 65 73 74 73 28 29 3a 20 61 72 72 61 79 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a | .getSuggests():.array;.......... |
e8d00 | 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 41 75 74 6f 6c 6f 61 64 28 29 | ...public.function.getAutoload() |
e8d20 | 3a 20 61 72 72 61 79 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 | :.array;.............public.func |
e8d40 | 74 69 6f 6e 20 67 65 74 44 65 76 41 75 74 6f 6c 6f 61 64 28 29 3a 20 61 72 72 61 79 3b 0a 0a 0a | tion.getDevAutoload():.array;... |
e8d60 | 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 49 6e 63 6c 75 64 65 50 | .....public.function.getIncludeP |
e8d80 | 61 74 68 73 28 29 3a 20 61 72 72 61 79 3b 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 | aths():.array;.....public.functi |
e8da0 | 6f 6e 20 73 65 74 52 65 70 6f 73 69 74 6f 72 79 28 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 | on.setRepository(RepositoryInter |
e8dc0 | 66 61 63 65 20 24 72 65 70 6f 73 69 74 6f 72 79 29 3a 20 76 6f 69 64 3b 0a 0a 0a 0a 0a 0a 0a 70 | face.$repository):.void;.......p |
e8de0 | 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 52 65 70 6f 73 69 74 6f 72 79 28 29 3a 20 | ublic.function.getRepository():. |
e8e00 | 3f 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 65 72 66 61 63 65 3b 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c | ?RepositoryInterface;.......publ |
e8e20 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 42 69 6e 61 72 69 65 73 28 29 3a 20 61 72 72 61 79 | ic.function.getBinaries():.array |
e8e40 | 3b 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 55 6e 69 71 75 65 4e | ;.....public.function.getUniqueN |
e8e60 | 61 6d 65 28 29 3a 20 73 74 72 69 6e 67 3b 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 | ame():.string;.......public.func |
e8e80 | 74 69 6f 6e 20 67 65 74 4e 6f 74 69 66 69 63 61 74 69 6f 6e 55 72 6c 28 29 3a 20 3f 73 74 72 69 | tion.getNotificationUrl():.?stri |
e8ea0 | 6e 67 3b 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 74 6f 53 74 72 69 | ng;.....public.function.__toStri |
e8ec0 | 6e 67 28 29 3a 20 73 74 72 69 6e 67 3b 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f | ng():.string;.....public.functio |
e8ee0 | 6e 20 67 65 74 50 72 65 74 74 79 53 74 72 69 6e 67 28 29 3a 20 73 74 72 69 6e 67 3b 0a 0a 70 75 | n.getPrettyString():.string;..pu |
e8f00 | 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 44 65 66 61 75 6c 74 42 72 61 6e 63 68 28 29 3a | blic.function.isDefaultBranch(): |
e8f20 | 20 62 6f 6f 6c 3b 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 | .bool;.......public.function.get |
e8f40 | 54 72 61 6e 73 70 6f 72 74 4f 70 74 69 6f 6e 73 28 29 3a 20 61 72 72 61 79 3b 0a 0a 0a 0a 0a 0a | TransportOptions():.array;...... |
e8f60 | 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 54 72 61 6e 73 70 6f 72 74 4f 70 74 | .public.function.setTransportOpt |
e8f80 | 69 6f 6e 73 28 61 72 72 61 79 20 24 6f 70 74 69 6f 6e 73 29 3a 20 76 6f 69 64 3b 0a 0a 70 75 62 | ions(array.$options):.void;..pub |
e8fa0 | 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 53 6f 75 72 63 65 52 65 66 65 72 65 6e 63 65 28 | lic.function.setSourceReference( |
e8fc0 | 3f 73 74 72 69 6e 67 20 24 72 65 66 65 72 65 6e 63 65 29 3a 20 76 6f 69 64 3b 0a 0a 70 75 62 6c | ?string.$reference):.void;..publ |
e8fe0 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 44 69 73 74 55 72 6c 28 3f 73 74 72 69 6e 67 20 24 | ic.function.setDistUrl(?string.$ |
e9000 | 75 72 6c 29 3a 20 76 6f 69 64 3b 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 | url):.void;..public.function.set |
e9020 | 44 69 73 74 54 79 70 65 28 3f 73 74 72 69 6e 67 20 24 74 79 70 65 29 3a 20 76 6f 69 64 3b 0a 0a | DistType(?string.$type):.void;.. |
e9040 | 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 44 69 73 74 52 65 66 65 72 65 6e 63 65 | public.function.setDistReference |
e9060 | 28 3f 73 74 72 69 6e 67 20 24 72 65 66 65 72 65 6e 63 65 29 3a 20 76 6f 69 64 3b 0a 0a 0a 0a 0a | (?string.$reference):.void;..... |
e9080 | 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 53 6f 75 72 63 65 44 69 73 74 52 65 66 | public.function.setSourceDistRef |
e90a0 | 65 72 65 6e 63 65 73 28 73 74 72 69 6e 67 20 24 72 65 66 65 72 65 6e 63 65 29 3a 20 76 6f 69 64 | erences(string.$reference):.void |
e90c0 | 3b 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 | ;.}.<?php.declare(strict_types=1 |
e90e0 | 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 | );............namespace.Composer |
e9100 | 5c 50 61 63 6b 61 67 65 3b 0a 0a 0a 0a 0a 63 6c 61 73 73 20 52 6f 6f 74 41 6c 69 61 73 50 61 63 | \Package;.....class.RootAliasPac |
e9120 | 6b 61 67 65 20 65 78 74 65 6e 64 73 20 43 6f 6d 70 6c 65 74 65 41 6c 69 61 73 50 61 63 6b 61 67 | kage.extends.CompleteAliasPackag |
e9140 | 65 20 69 6d 70 6c 65 6d 65 6e 74 73 20 52 6f 6f 74 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 | e.implements.RootPackageInterfac |
e9160 | 65 0a 7b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 61 6c 69 61 73 4f 66 3b 0a 0a 0a 0a 0a 0a 0a 0a | e.{..protected.$aliasOf;........ |
e9180 | 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 52 6f 6f | .public.function.__construct(Roo |
e91a0 | 74 50 61 63 6b 61 67 65 20 24 61 6c 69 61 73 4f 66 2c 20 73 74 72 69 6e 67 20 24 76 65 72 73 69 | tPackage.$aliasOf,.string.$versi |
e91c0 | 6f 6e 2c 20 73 74 72 69 6e 67 20 24 70 72 65 74 74 79 56 65 72 73 69 6f 6e 29 0a 7b 0a 70 61 72 | on,.string.$prettyVersion).{.par |
e91e0 | 65 6e 74 3a 3a 5f 5f 63 6f 6e 73 74 72 75 63 74 28 24 61 6c 69 61 73 4f 66 2c 20 24 76 65 72 73 | ent::__construct($aliasOf,.$vers |
e9200 | 69 6f 6e 2c 20 24 70 72 65 74 74 79 56 65 72 73 69 6f 6e 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c | ion,.$prettyVersion);.}.....publ |
e9220 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 41 6c 69 61 73 4f 66 28 29 0a 7b 0a 72 65 74 75 72 | ic.function.getAliasOf().{.retur |
e9240 | 6e 20 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 | n.$this->aliasOf;.}.....public.f |
e9260 | 75 6e 63 74 69 6f 6e 20 67 65 74 41 6c 69 61 73 65 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 | unction.getAliases():.array.{.re |
e9280 | 74 75 72 6e 20 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 67 65 74 41 6c 69 61 73 65 73 28 | turn.$this->aliasOf->getAliases( |
e92a0 | 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 4d 69 6e 69 | );.}.....public.function.getMini |
e92c0 | 6d 75 6d 53 74 61 62 69 6c 69 74 79 28 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 | mumStability():.string.{.return. |
e92e0 | 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 67 65 74 4d 69 6e 69 6d 75 6d 53 74 61 62 69 6c | $this->aliasOf->getMinimumStabil |
e9300 | 69 74 79 28 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 | ity();.}.....public.function.get |
e9320 | 53 74 61 62 69 6c 69 74 79 46 6c 61 67 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e | StabilityFlags():.array.{.return |
e9340 | 20 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 67 65 74 53 74 61 62 69 6c 69 74 79 46 6c 61 | .$this->aliasOf->getStabilityFla |
e9360 | 67 73 28 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 52 | gs();.}.....public.function.getR |
e9380 | 65 66 65 72 65 6e 63 65 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 | eferences():.array.{.return.$thi |
e93a0 | 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 67 65 74 52 65 66 65 72 65 6e 63 65 73 28 29 3b 0a 7d 0a 0a | s->aliasOf->getReferences();.}.. |
e93c0 | 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 50 72 65 66 65 72 53 74 61 62 | ...public.function.getPreferStab |
e93e0 | 6c 65 28 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 61 6c 69 61 73 | le():.bool.{.return.$this->alias |
e9400 | 4f 66 2d 3e 67 65 74 50 72 65 66 65 72 53 74 61 62 6c 65 28 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 | Of->getPreferStable();.}.....pub |
e9420 | 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 43 6f 6e 66 69 67 28 29 3a 20 61 72 72 61 79 0a | lic.function.getConfig():.array. |
e9440 | 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 67 65 74 43 6f 6e 66 | {.return.$this->aliasOf->getConf |
e9460 | 69 67 28 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 52 | ig();.}.....public.function.setR |
e9480 | 65 71 75 69 72 65 73 28 61 72 72 61 79 20 24 72 65 71 75 69 72 65 73 29 3a 20 76 6f 69 64 0a 7b | equires(array.$requires):.void.{ |
e94a0 | 0a 24 74 68 69 73 2d 3e 72 65 71 75 69 72 65 73 20 3d 20 24 74 68 69 73 2d 3e 72 65 70 6c 61 63 | .$this->requires.=.$this->replac |
e94c0 | 65 53 65 6c 66 56 65 72 73 69 6f 6e 44 65 70 65 6e 64 65 6e 63 69 65 73 28 24 72 65 71 75 69 72 | eSelfVersionDependencies($requir |
e94e0 | 65 73 2c 20 4c 69 6e 6b 3a 3a 54 59 50 45 5f 52 45 51 55 49 52 45 29 3b 0a 0a 24 74 68 69 73 2d | es,.Link::TYPE_REQUIRE);..$this- |
e9500 | 3e 61 6c 69 61 73 4f 66 2d 3e 73 65 74 52 65 71 75 69 72 65 73 28 24 72 65 71 75 69 72 65 73 29 | >aliasOf->setRequires($requires) |
e9520 | 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 44 65 76 52 65 | ;.}.....public.function.setDevRe |
e9540 | 71 75 69 72 65 73 28 61 72 72 61 79 20 24 64 65 76 52 65 71 75 69 72 65 73 29 3a 20 76 6f 69 64 | quires(array.$devRequires):.void |
e9560 | 0a 7b 0a 24 74 68 69 73 2d 3e 64 65 76 52 65 71 75 69 72 65 73 20 3d 20 24 74 68 69 73 2d 3e 72 | .{.$this->devRequires.=.$this->r |
e9580 | 65 70 6c 61 63 65 53 65 6c 66 56 65 72 73 69 6f 6e 44 65 70 65 6e 64 65 6e 63 69 65 73 28 24 64 | eplaceSelfVersionDependencies($d |
e95a0 | 65 76 52 65 71 75 69 72 65 73 2c 20 4c 69 6e 6b 3a 3a 54 59 50 45 5f 44 45 56 5f 52 45 51 55 49 | evRequires,.Link::TYPE_DEV_REQUI |
e95c0 | 52 45 29 3b 0a 0a 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 73 65 74 44 65 76 52 65 71 75 | RE);..$this->aliasOf->setDevRequ |
e95e0 | 69 72 65 73 28 24 64 65 76 52 65 71 75 69 72 65 73 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 | ires($devRequires);.}.....public |
e9600 | 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 43 6f 6e 66 6c 69 63 74 73 28 61 72 72 61 79 20 24 63 6f | .function.setConflicts(array.$co |
e9620 | 6e 66 6c 69 63 74 73 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 63 6f 6e 66 6c 69 63 74 | nflicts):.void.{.$this->conflict |
e9640 | 73 20 3d 20 24 74 68 69 73 2d 3e 72 65 70 6c 61 63 65 53 65 6c 66 56 65 72 73 69 6f 6e 44 65 70 | s.=.$this->replaceSelfVersionDep |
e9660 | 65 6e 64 65 6e 63 69 65 73 28 24 63 6f 6e 66 6c 69 63 74 73 2c 20 4c 69 6e 6b 3a 3a 54 59 50 45 | endencies($conflicts,.Link::TYPE |
e9680 | 5f 43 4f 4e 46 4c 49 43 54 29 3b 0a 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 73 65 74 43 | _CONFLICT);.$this->aliasOf->setC |
e96a0 | 6f 6e 66 6c 69 63 74 73 28 24 63 6f 6e 66 6c 69 63 74 73 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c | onflicts($conflicts);.}.....publ |
e96c0 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 50 72 6f 76 69 64 65 73 28 61 72 72 61 79 20 24 70 | ic.function.setProvides(array.$p |
e96e0 | 72 6f 76 69 64 65 73 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 70 72 6f 76 69 64 65 73 | rovides):.void.{.$this->provides |
e9700 | 20 3d 20 24 74 68 69 73 2d 3e 72 65 70 6c 61 63 65 53 65 6c 66 56 65 72 73 69 6f 6e 44 65 70 65 | .=.$this->replaceSelfVersionDepe |
e9720 | 6e 64 65 6e 63 69 65 73 28 24 70 72 6f 76 69 64 65 73 2c 20 4c 69 6e 6b 3a 3a 54 59 50 45 5f 50 | ndencies($provides,.Link::TYPE_P |
e9740 | 52 4f 56 49 44 45 29 3b 0a 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 73 65 74 50 72 6f 76 | ROVIDE);.$this->aliasOf->setProv |
e9760 | 69 64 65 73 28 24 70 72 6f 76 69 64 65 73 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 | ides($provides);.}.....public.fu |
e9780 | 6e 63 74 69 6f 6e 20 73 65 74 52 65 70 6c 61 63 65 73 28 61 72 72 61 79 20 24 72 65 70 6c 61 63 | nction.setReplaces(array.$replac |
e97a0 | 65 73 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 72 65 70 6c 61 63 65 73 20 3d 20 24 74 | es):.void.{.$this->replaces.=.$t |
e97c0 | 68 69 73 2d 3e 72 65 70 6c 61 63 65 53 65 6c 66 56 65 72 73 69 6f 6e 44 65 70 65 6e 64 65 6e 63 | his->replaceSelfVersionDependenc |
e97e0 | 69 65 73 28 24 72 65 70 6c 61 63 65 73 2c 20 4c 69 6e 6b 3a 3a 54 59 50 45 5f 52 45 50 4c 41 43 | ies($replaces,.Link::TYPE_REPLAC |
e9800 | 45 29 3b 0a 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 73 65 74 52 65 70 6c 61 63 65 73 28 | E);.$this->aliasOf->setReplaces( |
e9820 | 24 72 65 70 6c 61 63 65 73 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f | $replaces);.}.....public.functio |
e9840 | 6e 20 73 65 74 41 75 74 6f 6c 6f 61 64 28 61 72 72 61 79 20 24 61 75 74 6f 6c 6f 61 64 29 3a 20 | n.setAutoload(array.$autoload):. |
e9860 | 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 73 65 74 41 75 74 6f 6c 6f | void.{.$this->aliasOf->setAutolo |
e9880 | 61 64 28 24 61 75 74 6f 6c 6f 61 64 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 | ad($autoload);.}.....public.func |
e98a0 | 74 69 6f 6e 20 73 65 74 44 65 76 41 75 74 6f 6c 6f 61 64 28 61 72 72 61 79 20 24 64 65 76 41 75 | tion.setDevAutoload(array.$devAu |
e98c0 | 74 6f 6c 6f 61 64 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e | toload):.void.{.$this->aliasOf-> |
e98e0 | 73 65 74 44 65 76 41 75 74 6f 6c 6f 61 64 28 24 64 65 76 41 75 74 6f 6c 6f 61 64 29 3b 0a 7d 0a | setDevAutoload($devAutoload);.}. |
e9900 | 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 53 74 61 62 69 6c 69 74 79 | ....public.function.setStability |
e9920 | 46 6c 61 67 73 28 61 72 72 61 79 20 24 73 74 61 62 69 6c 69 74 79 46 6c 61 67 73 29 3a 20 76 6f | Flags(array.$stabilityFlags):.vo |
e9940 | 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 73 65 74 53 74 61 62 69 6c 69 74 | id.{.$this->aliasOf->setStabilit |
e9960 | 79 46 6c 61 67 73 28 24 73 74 61 62 69 6c 69 74 79 46 6c 61 67 73 29 3b 0a 7d 0a 0a 0a 0a 0a 70 | yFlags($stabilityFlags);.}.....p |
e9980 | 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 4d 69 6e 69 6d 75 6d 53 74 61 62 69 6c 69 | ublic.function.setMinimumStabili |
e99a0 | 74 79 28 73 74 72 69 6e 67 20 24 6d 69 6e 69 6d 75 6d 53 74 61 62 69 6c 69 74 79 29 3a 20 76 6f | ty(string.$minimumStability):.vo |
e99c0 | 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 73 65 74 4d 69 6e 69 6d 75 6d 53 | id.{.$this->aliasOf->setMinimumS |
e99e0 | 74 61 62 69 6c 69 74 79 28 24 6d 69 6e 69 6d 75 6d 53 74 61 62 69 6c 69 74 79 29 3b 0a 7d 0a 0a | tability($minimumStability);.}.. |
e9a00 | 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 50 72 65 66 65 72 53 74 61 62 | ...public.function.setPreferStab |
e9a20 | 6c 65 28 62 6f 6f 6c 20 24 70 72 65 66 65 72 53 74 61 62 6c 65 29 3a 20 76 6f 69 64 0a 7b 0a 24 | le(bool.$preferStable):.void.{.$ |
e9a40 | 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 73 65 74 50 72 65 66 65 72 53 74 61 62 6c 65 28 24 | this->aliasOf->setPreferStable($ |
e9a60 | 70 72 65 66 65 72 53 74 61 62 6c 65 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 | preferStable);.}.....public.func |
e9a80 | 74 69 6f 6e 20 73 65 74 43 6f 6e 66 69 67 28 61 72 72 61 79 20 24 63 6f 6e 66 69 67 29 3a 20 76 | tion.setConfig(array.$config):.v |
e9aa0 | 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 73 65 74 43 6f 6e 66 69 67 28 | oid.{.$this->aliasOf->setConfig( |
e9ac0 | 24 63 6f 6e 66 69 67 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 | $config);.}.....public.function. |
e9ae0 | 73 65 74 52 65 66 65 72 65 6e 63 65 73 28 61 72 72 61 79 20 24 72 65 66 65 72 65 6e 63 65 73 29 | setReferences(array.$references) |
e9b00 | 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 73 65 74 52 65 66 65 | :.void.{.$this->aliasOf->setRefe |
e9b20 | 72 65 6e 63 65 73 28 24 72 65 66 65 72 65 6e 63 65 73 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 | rences($references);.}.....publi |
e9b40 | 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 41 6c 69 61 73 65 73 28 61 72 72 61 79 20 24 61 6c 69 | c.function.setAliases(array.$ali |
e9b60 | 61 73 65 73 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 73 65 | ases):.void.{.$this->aliasOf->se |
e9b80 | 74 41 6c 69 61 73 65 73 28 24 61 6c 69 61 73 65 73 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 | tAliases($aliases);.}.....public |
e9ba0 | 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 53 75 67 67 65 73 74 73 28 61 72 72 61 79 20 24 73 75 67 | .function.setSuggests(array.$sug |
e9bc0 | 67 65 73 74 73 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 73 | gests):.void.{.$this->aliasOf->s |
e9be0 | 65 74 53 75 67 67 65 73 74 73 28 24 73 75 67 67 65 73 74 73 29 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 | etSuggests($suggests);.}.....pub |
e9c00 | 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 45 78 74 72 61 28 61 72 72 61 79 20 24 65 78 74 | lic.function.setExtra(array.$ext |
e9c20 | 72 61 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 2d 3e 73 65 74 45 | ra):.void.{.$this->aliasOf->setE |
e9c40 | 78 74 72 61 28 24 65 78 74 72 61 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e | xtra($extra);.}..public.function |
e9c60 | 20 5f 5f 63 6c 6f 6e 65 28 29 0a 7b 0a 70 61 72 65 6e 74 3a 3a 5f 5f 63 6c 6f 6e 65 28 29 3b 0a | .__clone().{.parent::__clone();. |
e9c80 | 24 74 68 69 73 2d 3e 61 6c 69 61 73 4f 66 20 3d 20 63 6c 6f 6e 65 20 24 74 68 69 73 2d 3e 61 6c | $this->aliasOf.=.clone.$this->al |
e9ca0 | 69 61 73 4f 66 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f | iasOf;.}.}.<?php.declare(strict_ |
e9cc0 | 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 | types=1);............namespace.C |
e9ce0 | 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 3b 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 52 6f 6f | omposer\Package;.......class.Roo |
e9d00 | 74 50 61 63 6b 61 67 65 20 65 78 74 65 6e 64 73 20 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 | tPackage.extends.CompletePackage |
e9d20 | 20 69 6d 70 6c 65 6d 65 6e 74 73 20 52 6f 6f 74 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 | .implements.RootPackageInterface |
e9d40 | 0a 7b 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 44 45 46 41 55 4c 54 5f 50 52 45 54 54 59 5f 56 | .{.public.const.DEFAULT_PRETTY_V |
e9d60 | 45 52 53 49 4f 4e 20 3d 20 27 31 2e 30 2e 30 2b 6e 6f 2d 76 65 72 73 69 6f 6e 2d 73 65 74 27 3b | ERSION.=.'1.0.0+no-version-set'; |
e9d80 | 0a 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 6d 69 6e 69 6d 75 6d 53 74 61 62 69 6c 69 74 79 20 3d | ...protected.$minimumStability.= |
e9da0 | 20 27 73 74 61 62 6c 65 27 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 70 72 65 66 65 72 53 74 61 | .'stable';..protected.$preferSta |
e9dc0 | 62 6c 65 20 3d 20 66 61 6c 73 65 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 73 74 61 62 69 6c 69 | ble.=.false;..protected.$stabili |
e9de0 | 74 79 46 6c 61 67 73 20 3d 20 5b 5d 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 63 6f 6e 66 69 67 | tyFlags.=.[];..protected.$config |
e9e00 | 20 3d 20 5b 5d 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 72 65 66 65 72 65 6e 63 65 73 20 3d 20 | .=.[];..protected.$references.=. |
e9e20 | 5b 5d 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 61 6c 69 61 73 65 73 20 3d 20 5b 5d 3b 0a 0a 0a | [];..protected.$aliases.=.[];... |
e9e40 | 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 4d 69 6e 69 6d 75 6d 53 74 61 62 | ..public.function.setMinimumStab |
e9e60 | 69 6c 69 74 79 28 73 74 72 69 6e 67 20 24 6d 69 6e 69 6d 75 6d 53 74 61 62 69 6c 69 74 79 29 3a | ility(string.$minimumStability): |
e9e80 | 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 6d 69 6e 69 6d 75 6d 53 74 61 62 69 6c 69 74 79 20 | .void.{.$this->minimumStability. |
e9ea0 | 3d 20 24 6d 69 6e 69 6d 75 6d 53 74 61 62 69 6c 69 74 79 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 | =.$minimumStability;.}.....publi |
e9ec0 | 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 4d 69 6e 69 6d 75 6d 53 74 61 62 69 6c 69 74 79 28 29 | c.function.getMinimumStability() |
e9ee0 | 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 6d 69 6e 69 6d 75 6d | :.string.{.return.$this->minimum |
e9f00 | 53 74 61 62 69 6c 69 74 79 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e | Stability;.}.....public.function |
e9f20 | 20 73 65 74 53 74 61 62 69 6c 69 74 79 46 6c 61 67 73 28 61 72 72 61 79 20 24 73 74 61 62 69 6c | .setStabilityFlags(array.$stabil |
e9f40 | 69 74 79 46 6c 61 67 73 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 73 74 61 62 69 6c 69 | ityFlags):.void.{.$this->stabili |
e9f60 | 74 79 46 6c 61 67 73 20 3d 20 24 73 74 61 62 69 6c 69 74 79 46 6c 61 67 73 3b 0a 7d 0a 0a 0a 0a | tyFlags.=.$stabilityFlags;.}.... |
e9f80 | 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 53 74 61 62 69 6c 69 74 79 46 6c 61 | .public.function.getStabilityFla |
e9fa0 | 67 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 73 74 61 62 | gs():.array.{.return.$this->stab |
e9fc0 | 69 6c 69 74 79 46 6c 61 67 73 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f | ilityFlags;.}.....public.functio |
e9fe0 | 6e 20 73 65 74 50 72 65 66 65 72 53 74 61 62 6c 65 28 62 6f 6f 6c 20 24 70 72 65 66 65 72 53 74 | n.setPreferStable(bool.$preferSt |
ea000 | 61 62 6c 65 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 70 72 65 66 65 72 53 74 61 62 6c | able):.void.{.$this->preferStabl |
ea020 | 65 20 3d 20 24 70 72 65 66 65 72 53 74 61 62 6c 65 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 | e.=.$preferStable;.}.....public. |
ea040 | 66 75 6e 63 74 69 6f 6e 20 67 65 74 50 72 65 66 65 72 53 74 61 62 6c 65 28 29 3a 20 62 6f 6f 6c | function.getPreferStable():.bool |
ea060 | 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 70 72 65 66 65 72 53 74 61 62 6c 65 3b 0a 7d | .{.return.$this->preferStable;.} |
ea080 | 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 43 6f 6e 66 69 67 28 61 | .....public.function.setConfig(a |
ea0a0 | 72 72 61 79 20 24 63 6f 6e 66 69 67 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 63 6f 6e | rray.$config):.void.{.$this->con |
ea0c0 | 66 69 67 20 3d 20 24 63 6f 6e 66 69 67 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 | fig.=.$config;.}.....public.func |
ea0e0 | 74 69 6f 6e 20 67 65 74 43 6f 6e 66 69 67 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e | tion.getConfig():.array.{.return |
ea100 | 20 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e | .$this->config;.}.....public.fun |
ea120 | 63 74 69 6f 6e 20 73 65 74 52 65 66 65 72 65 6e 63 65 73 28 61 72 72 61 79 20 24 72 65 66 65 72 | ction.setReferences(array.$refer |
ea140 | 65 6e 63 65 73 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 72 65 66 65 72 65 6e 63 65 73 | ences):.void.{.$this->references |
ea160 | 20 3d 20 24 72 65 66 65 72 65 6e 63 65 73 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e | .=.$references;.}.....public.fun |
ea180 | 63 74 69 6f 6e 20 67 65 74 52 65 66 65 72 65 6e 63 65 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 | ction.getReferences():.array.{.r |
ea1a0 | 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 72 65 66 65 72 65 6e 63 65 73 3b 0a 7d 0a 0a 0a 0a 0a 70 | eturn.$this->references;.}.....p |
ea1c0 | 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 41 6c 69 61 73 65 73 28 61 72 72 61 79 20 | ublic.function.setAliases(array. |
ea1e0 | 24 61 6c 69 61 73 65 73 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 61 6c 69 61 73 65 73 | $aliases):.void.{.$this->aliases |
ea200 | 20 3d 20 24 61 6c 69 61 73 65 73 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 | .=.$aliases;.}.....public.functi |
ea220 | 6f 6e 20 67 65 74 41 6c 69 61 73 65 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 | on.getAliases():.array.{.return. |
ea240 | 24 74 68 69 73 2d 3e 61 6c 69 61 73 65 73 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 | $this->aliases;.}.}.<?php.declar |
ea260 | 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 | e(strict_types=1);............na |
ea280 | 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 3b 0a 0a 0a 0a 0a 0a 0a | mespace.Composer\Package;....... |
ea2a0 | 0a 0a 0a 0a 0a 69 6e 74 65 72 66 61 63 65 20 52 6f 6f 74 50 61 63 6b 61 67 65 49 6e 74 65 72 66 | .....interface.RootPackageInterf |
ea2c0 | 61 63 65 20 65 78 74 65 6e 64 73 20 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 49 6e 74 65 72 | ace.extends.CompletePackageInter |
ea2e0 | 66 61 63 65 0a 7b 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 41 | face.{......public.function.getA |
ea300 | 6c 69 61 73 65 73 28 29 3a 20 61 72 72 61 79 3b 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 | liases():.array;.....public.func |
ea320 | 74 69 6f 6e 20 67 65 74 4d 69 6e 69 6d 75 6d 53 74 61 62 69 6c 69 74 79 28 29 3a 20 73 74 72 69 | tion.getMinimumStability():.stri |
ea340 | 6e 67 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 53 | ng;.........public.function.getS |
ea360 | 74 61 62 69 6c 69 74 79 46 6c 61 67 73 28 29 3a 20 61 72 72 61 79 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a | tabilityFlags():.array;......... |
ea380 | 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 52 65 66 65 72 65 6e 63 65 73 28 29 3a | public.function.getReferences(): |
ea3a0 | 20 61 72 72 61 79 3b 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 50 | .array;.....public.function.getP |
ea3c0 | 72 65 66 65 72 53 74 61 62 6c 65 28 29 3a 20 62 6f 6f 6c 3b 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 | referStable():.bool;.......publi |
ea3e0 | 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 43 6f 6e 66 69 67 28 29 3a 20 61 72 72 61 79 3b 0a 0a | c.function.getConfig():.array;.. |
ea400 | 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 52 65 71 75 69 72 65 73 | .....public.function.setRequires |
ea420 | 28 61 72 72 61 79 20 24 72 65 71 75 69 72 65 73 29 3a 20 76 6f 69 64 3b 0a 0a 0a 0a 0a 0a 0a 70 | (array.$requires):.void;.......p |
ea440 | 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 44 65 76 52 65 71 75 69 72 65 73 28 61 72 | ublic.function.setDevRequires(ar |
ea460 | 72 61 79 20 24 64 65 76 52 65 71 75 69 72 65 73 29 3a 20 76 6f 69 64 3b 0a 0a 0a 0a 0a 0a 0a 70 | ray.$devRequires):.void;.......p |
ea480 | 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 43 6f 6e 66 6c 69 63 74 73 28 61 72 72 61 | ublic.function.setConflicts(arra |
ea4a0 | 79 20 24 63 6f 6e 66 6c 69 63 74 73 29 3a 20 76 6f 69 64 3b 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 | y.$conflicts):.void;.......publi |
ea4c0 | 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 50 72 6f 76 69 64 65 73 28 61 72 72 61 79 20 24 70 72 | c.function.setProvides(array.$pr |
ea4e0 | 6f 76 69 64 65 73 29 3a 20 76 6f 69 64 3b 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 | ovides):.void;.......public.func |
ea500 | 74 69 6f 6e 20 73 65 74 52 65 70 6c 61 63 65 73 28 61 72 72 61 79 20 24 72 65 70 6c 61 63 65 73 | tion.setReplaces(array.$replaces |
ea520 | 29 3a 20 76 6f 69 64 3b 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 | ):.void;........public.function. |
ea540 | 73 65 74 41 75 74 6f 6c 6f 61 64 28 61 72 72 61 79 20 24 61 75 74 6f 6c 6f 61 64 29 3a 20 76 6f | setAutoload(array.$autoload):.vo |
ea560 | 69 64 3b 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 44 65 | id;........public.function.setDe |
ea580 | 76 41 75 74 6f 6c 6f 61 64 28 61 72 72 61 79 20 24 64 65 76 41 75 74 6f 6c 6f 61 64 29 3a 20 76 | vAutoload(array.$devAutoload):.v |
ea5a0 | 6f 69 64 3b 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 53 74 | oid;.......public.function.setSt |
ea5c0 | 61 62 69 6c 69 74 79 46 6c 61 67 73 28 61 72 72 61 79 20 24 73 74 61 62 69 6c 69 74 79 46 6c 61 | abilityFlags(array.$stabilityFla |
ea5e0 | 67 73 29 3a 20 76 6f 69 64 3b 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 | gs):.void;.....public.function.s |
ea600 | 65 74 4d 69 6e 69 6d 75 6d 53 74 61 62 69 6c 69 74 79 28 73 74 72 69 6e 67 20 24 6d 69 6e 69 6d | etMinimumStability(string.$minim |
ea620 | 75 6d 53 74 61 62 69 6c 69 74 79 29 3a 20 76 6f 69 64 3b 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 | umStability):.void;.....public.f |
ea640 | 75 6e 63 74 69 6f 6e 20 73 65 74 50 72 65 66 65 72 53 74 61 62 6c 65 28 62 6f 6f 6c 20 24 70 72 | unction.setPreferStable(bool.$pr |
ea660 | 65 66 65 72 53 74 61 62 6c 65 29 3a 20 76 6f 69 64 3b 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 | eferStable):.void;.......public. |
ea680 | 66 75 6e 63 74 69 6f 6e 20 73 65 74 43 6f 6e 66 69 67 28 61 72 72 61 79 20 24 63 6f 6e 66 69 67 | function.setConfig(array.$config |
ea6a0 | 29 3a 20 76 6f 69 64 3b 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 | ):.void;.......public.function.s |
ea6c0 | 65 74 52 65 66 65 72 65 6e 63 65 73 28 61 72 72 61 79 20 24 72 65 66 65 72 65 6e 63 65 73 29 3a | etReferences(array.$references): |
ea6e0 | 20 76 6f 69 64 3b 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 | .void;.......public.function.set |
ea700 | 41 6c 69 61 73 65 73 28 61 72 72 61 79 20 24 61 6c 69 61 73 65 73 29 3a 20 76 6f 69 64 3b 0a 0a | Aliases(array.$aliases):.void;.. |
ea720 | 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 53 75 67 67 65 73 74 73 | .....public.function.setSuggests |
ea740 | 28 61 72 72 61 79 20 24 73 75 67 67 65 73 74 73 29 3a 20 76 6f 69 64 3b 0a 0a 0a 0a 0a 70 75 62 | (array.$suggests):.void;.....pub |
ea760 | 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 45 78 74 72 61 28 61 72 72 61 79 20 24 65 78 74 | lic.function.setExtra(array.$ext |
ea780 | 72 61 29 3a 20 76 6f 69 64 3b 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 | ra):.void;.}.<?php.declare(stric |
ea7a0 | 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 | t_types=1);............namespace |
ea7c0 | 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 56 65 72 73 69 6f 6e 3b 0a 0a 75 73 65 20 | .Composer\Package\Version;..use. |
ea7e0 | 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 42 61 73 65 50 61 63 6b 61 67 65 3b 0a 0a 0a | Composer\Package\BasePackage;... |
ea800 | 0a 0a 63 6c 61 73 73 20 53 74 61 62 69 6c 69 74 79 46 69 6c 74 65 72 0a 7b 0a 0a 0a 0a 0a 0a 0a | ..class.StabilityFilter.{....... |
ea820 | 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 50 61 | .....public.static.function.isPa |
ea840 | 63 6b 61 67 65 41 63 63 65 70 74 61 62 6c 65 28 61 72 72 61 79 20 24 61 63 63 65 70 74 61 62 6c | ckageAcceptable(array.$acceptabl |
ea860 | 65 53 74 61 62 69 6c 69 74 69 65 73 2c 20 61 72 72 61 79 20 24 73 74 61 62 69 6c 69 74 79 46 6c | eStabilities,.array.$stabilityFl |
ea880 | 61 67 73 2c 20 61 72 72 61 79 20 24 6e 61 6d 65 73 2c 20 73 74 72 69 6e 67 20 24 73 74 61 62 69 | ags,.array.$names,.string.$stabi |
ea8a0 | 6c 69 74 79 29 3a 20 62 6f 6f 6c 0a 7b 0a 66 6f 72 65 61 63 68 20 28 24 6e 61 6d 65 73 20 61 73 | lity):.bool.{.foreach.($names.as |
ea8c0 | 20 24 6e 61 6d 65 29 20 7b 0a 0a 69 66 20 28 69 73 73 65 74 28 24 73 74 61 62 69 6c 69 74 79 46 | .$name).{..if.(isset($stabilityF |
ea8e0 | 6c 61 67 73 5b 24 6e 61 6d 65 5d 29 29 20 7b 0a 69 66 20 28 42 61 73 65 50 61 63 6b 61 67 65 3a | lags[$name])).{.if.(BasePackage: |
ea900 | 3a 24 73 74 61 62 69 6c 69 74 69 65 73 5b 24 73 74 61 62 69 6c 69 74 79 5d 20 3c 3d 20 24 73 74 | :$stabilities[$stability].<=.$st |
ea920 | 61 62 69 6c 69 74 79 46 6c 61 67 73 5b 24 6e 61 6d 65 5d 29 20 7b 0a 72 65 74 75 72 6e 20 74 72 | abilityFlags[$name]).{.return.tr |
ea940 | 75 65 3b 0a 7d 0a 7d 20 65 6c 73 65 69 66 20 28 69 73 73 65 74 28 24 61 63 63 65 70 74 61 62 6c | ue;.}.}.elseif.(isset($acceptabl |
ea960 | 65 53 74 61 62 69 6c 69 74 69 65 73 5b 24 73 74 61 62 69 6c 69 74 79 5d 29 29 20 7b 0a 0a 72 65 | eStabilities[$stability])).{..re |
ea980 | 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a | turn.true;.}.}..return.false;.}. |
ea9a0 | 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b | }.<?php.declare(strict_types=1); |
ea9c0 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 50 | ............namespace.Composer\P |
ea9e0 | 61 63 6b 61 67 65 5c 56 65 72 73 69 6f 6e 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 | ackage\Version;..use.Composer\Pa |
eaa00 | 63 6b 61 67 65 5c 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 | ckage\PackageInterface;.use.Comp |
eaa20 | 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 4c 6f 61 64 65 72 5c 41 72 72 61 79 4c 6f 61 64 65 72 3b | oser\Package\Loader\ArrayLoader; |
eaa40 | 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 44 75 6d 70 65 72 5c 41 72 72 | .use.Composer\Package\Dumper\Arr |
eaa60 | 61 79 44 75 6d 70 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 63 72 65 5c 50 72 65 67 | ayDumper;.use.Composer\Pcre\Preg |
eaa80 | 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 65 6d 76 65 72 5c 43 6f 6e 73 74 72 61 69 6e 74 | ;.use.Composer\Semver\Constraint |
eaaa0 | 5c 43 6f 6e 73 74 72 61 69 6e 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 65 6d 76 65 72 | \Constraint;.use.Composer\Semver |
eaac0 | 5c 43 6f 6e 73 74 72 61 69 6e 74 5c 43 6f 6e 73 74 72 61 69 6e 74 49 6e 74 65 72 66 61 63 65 3b | \Constraint\ConstraintInterface; |
eaae0 | 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 65 6d 76 65 72 5c 49 6e 74 65 72 76 61 6c 73 3b 0a | .use.Composer\Semver\Intervals;. |
eab00 | 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 6c 61 74 66 6f 72 6d 3b 0a 0a 0a 0a 0a | use.Composer\Util\Platform;..... |
eab20 | 0a 63 6c 61 73 73 20 56 65 72 73 69 6f 6e 42 75 6d 70 65 72 0a 7b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a | .class.VersionBumper.{.......... |
eab40 | 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 62 75 6d 70 52 65 71 75 69 72 65 6d | ....public.function.bumpRequirem |
eab60 | 65 6e 74 28 43 6f 6e 73 74 72 61 69 6e 74 49 6e 74 65 72 66 61 63 65 20 24 63 6f 6e 73 74 72 61 | ent(ConstraintInterface.$constra |
eab80 | 69 6e 74 2c 20 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 29 3a | int,.PackageInterface.$package): |
eaba0 | 20 73 74 72 69 6e 67 0a 7b 0a 24 70 61 72 73 65 72 20 3d 20 6e 65 77 20 56 65 72 73 69 6f 6e 50 | .string.{.$parser.=.new.VersionP |
eabc0 | 61 72 73 65 72 28 29 3b 0a 24 70 72 65 74 74 79 43 6f 6e 73 74 72 61 69 6e 74 20 3d 20 24 63 6f | arser();.$prettyConstraint.=.$co |
eabe0 | 6e 73 74 72 61 69 6e 74 2d 3e 67 65 74 50 72 65 74 74 79 53 74 72 69 6e 67 28 29 3b 0a 69 66 20 | nstraint->getPrettyString();.if. |
eac00 | 28 73 74 72 5f 73 74 61 72 74 73 5f 77 69 74 68 28 24 63 6f 6e 73 74 72 61 69 6e 74 2d 3e 67 65 | (str_starts_with($constraint->ge |
eac20 | 74 50 72 65 74 74 79 53 74 72 69 6e 67 28 29 2c 20 27 64 65 76 2d 27 29 29 20 7b 0a 72 65 74 75 | tPrettyString(),.'dev-')).{.retu |
eac40 | 72 6e 20 24 70 72 65 74 74 79 43 6f 6e 73 74 72 61 69 6e 74 3b 0a 7d 0a 0a 24 76 65 72 73 69 6f | rn.$prettyConstraint;.}..$versio |
eac60 | 6e 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 3b 0a 69 66 20 28 | n.=.$package->getVersion();.if.( |
eac80 | 73 74 72 5f 73 74 61 72 74 73 5f 77 69 74 68 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 56 65 72 | str_starts_with($package->getVer |
eaca0 | 73 69 6f 6e 28 29 2c 20 27 64 65 76 2d 27 29 29 20 7b 0a 24 6c 6f 61 64 65 72 20 3d 20 6e 65 77 | sion(),.'dev-')).{.$loader.=.new |
eacc0 | 20 41 72 72 61 79 4c 6f 61 64 65 72 28 24 70 61 72 73 65 72 29 3b 0a 24 64 75 6d 70 65 72 20 3d | .ArrayLoader($parser);.$dumper.= |
eace0 | 20 6e 65 77 20 41 72 72 61 79 44 75 6d 70 65 72 28 29 3b 0a 24 65 78 74 72 61 20 3d 20 24 6c 6f | .new.ArrayDumper();.$extra.=.$lo |
ead00 | 61 64 65 72 2d 3e 67 65 74 42 72 61 6e 63 68 41 6c 69 61 73 28 24 64 75 6d 70 65 72 2d 3e 64 75 | ader->getBranchAlias($dumper->du |
ead20 | 6d 70 28 24 70 61 63 6b 61 67 65 29 29 3b 0a 0a 0a 69 66 20 28 6e 75 6c 6c 20 3d 3d 3d 20 24 65 | mp($package));...if.(null.===.$e |
ead40 | 78 74 72 61 20 7c 7c 20 24 65 78 74 72 61 20 3d 3d 3d 20 56 65 72 73 69 6f 6e 50 61 72 73 65 72 | xtra.||.$extra.===.VersionParser |
ead60 | 3a 3a 44 45 46 41 55 4c 54 5f 42 52 41 4e 43 48 5f 41 4c 49 41 53 29 20 7b 0a 72 65 74 75 72 6e | ::DEFAULT_BRANCH_ALIAS).{.return |
ead80 | 20 24 70 72 65 74 74 79 43 6f 6e 73 74 72 61 69 6e 74 3b 0a 7d 0a 0a 24 76 65 72 73 69 6f 6e 20 | .$prettyConstraint;.}..$version. |
eada0 | 3d 20 24 65 78 74 72 61 3b 0a 7d 0a 0a 24 69 6e 74 65 72 76 61 6c 73 20 3d 20 49 6e 74 65 72 76 | =.$extra;.}..$intervals.=.Interv |
eadc0 | 61 6c 73 3a 3a 67 65 74 28 24 63 6f 6e 73 74 72 61 69 6e 74 29 3b 0a 0a 0a 69 66 20 28 5c 63 6f | als::get($constraint);...if.(\co |
eade0 | 75 6e 74 28 24 69 6e 74 65 72 76 61 6c 73 5b 27 62 72 61 6e 63 68 65 73 27 5d 5b 27 6e 61 6d 65 | unt($intervals['branches']['name |
eae00 | 73 27 5d 29 20 3e 20 30 29 20 7b 0a 72 65 74 75 72 6e 20 24 70 72 65 74 74 79 43 6f 6e 73 74 72 | s']).>.0).{.return.$prettyConstr |
eae20 | 61 69 6e 74 3b 0a 7d 0a 0a 24 6d 61 6a 6f 72 20 3d 20 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 28 | aint;.}..$major.=.Preg::replace( |
eae40 | 27 7b 5e 28 5c 64 2b 29 2e 2a 7d 27 2c 20 27 24 31 27 2c 20 24 76 65 72 73 69 6f 6e 29 3b 0a 24 | '{^(\d+).*}',.'$1',.$version);.$ |
eae60 | 6e 65 77 50 72 65 74 74 79 43 6f 6e 73 74 72 61 69 6e 74 20 3d 20 27 5e 27 2e 50 72 65 67 3a 3a | newPrettyConstraint.=.'^'.Preg:: |
eae80 | 72 65 70 6c 61 63 65 28 27 7b 28 3f 3a 5c 2e 28 3f 3a 30 7c 39 39 39 39 39 39 39 29 29 2b 28 2d | replace('{(?:\.(?:0|9999999))+(- |
eaea0 | 64 65 76 29 3f 24 7d 27 2c 20 27 27 2c 20 24 76 65 72 73 69 6f 6e 29 3b 0a 0a 0a 69 66 20 28 21 | dev)?$}',.'',.$version);...if.(! |
eaec0 | 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b 5e 5c 5e 5c 64 2b 28 5c 2e 5c 64 2b 29 2a 24 7d | Preg::isMatch('{^\^\d+(\.\d+)*$} |
eaee0 | 27 2c 20 24 6e 65 77 50 72 65 74 74 79 43 6f 6e 73 74 72 61 69 6e 74 29 29 20 7b 0a 72 65 74 75 | ',.$newPrettyConstraint)).{.retu |
eaf00 | 72 6e 20 24 70 72 65 74 74 79 43 6f 6e 73 74 72 61 69 6e 74 3b 0a 7d 0a 0a 24 70 61 74 74 65 72 | rn.$prettyConstraint;.}..$patter |
eaf20 | 6e 20 3d 20 27 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 28 3f 3c 3d 2c 7c 5c 20 7c 5c 7c 7c 5e | n.=.'{.............(?<=,|\.|\||^ |
eaf40 | 29 20 23 20 6c 65 61 64 69 6e 67 20 73 65 70 61 72 61 74 6f 72 0a 20 20 20 20 20 20 20 20 20 20 | ).#.leading.separator........... |
eaf60 | 20 20 28 3f 50 3c 63 6f 6e 73 74 72 61 69 6e 74 3e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ..(?P<constraint>............... |
eaf80 | 20 20 5c 5e 27 2e 24 6d 61 6a 6f 72 2e 27 28 3f 3a 5c 2e 5c 64 2b 29 2a 20 23 20 65 2e 67 2e 20 | ..\^'.$major.'(?:\.\d+)*.#.e.g.. |
eafa0 | 5e 32 2e 61 6e 79 74 68 69 6e 67 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7c 20 7e 27 | ^2.anything.................|.~' |
eafc0 | 2e 24 6d 61 6a 6f 72 2e 27 28 3f 3a 5c 2e 5c 64 2b 29 3f 20 23 20 65 2e 67 2e 20 7e 32 20 6f 72 | .$major.'(?:\.\d+)?.#.e.g..~2.or |
eafe0 | 20 7e 32 2e 32 20 62 75 74 20 6e 6f 20 6d 6f 72 65 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .~2.2.but.no.more............... |
eb000 | 20 20 7c 20 27 2e 24 6d 61 6a 6f 72 2e 27 28 3f 3a 5c 2e 5b 2a 78 5d 29 2b 20 23 20 65 2e 67 2e | ..|.'.$major.'(?:\.[*x])+.#.e.g. |
eb020 | 20 32 2e 2a 20 6f 72 20 32 2e 2a 2e 2a 20 6f 72 20 32 2e 78 2e 78 2e 78 20 65 74 63 0a 20 20 20 | .2.*.or.2.*.*.or.2.x.x.x.etc.... |
eb040 | 20 20 20 20 20 20 20 20 20 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 28 3f 3d 2c 7c 24 7c 5c 20 | .........).............(?=,|$|\. |
eb060 | 7c 5c 7c 7c 40 29 20 23 20 74 72 61 69 6c 69 6e 67 20 73 65 70 61 72 61 74 6f 72 0a 20 20 20 20 | |\||@).#.trailing.separator..... |
eb080 | 20 20 20 20 7d 78 27 3b 0a 69 66 20 28 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 41 6c 6c 57 69 74 | ....}x';.if.(Preg::isMatchAllWit |
eb0a0 | 68 4f 66 66 73 65 74 73 28 24 70 61 74 74 65 72 6e 2c 20 24 70 72 65 74 74 79 43 6f 6e 73 74 72 | hOffsets($pattern,.$prettyConstr |
eb0c0 | 61 69 6e 74 2c 20 24 6d 61 74 63 68 65 73 29 29 20 7b 0a 24 6d 6f 64 69 66 69 65 64 20 3d 20 24 | aint,.$matches)).{.$modified.=.$ |
eb0e0 | 70 72 65 74 74 79 43 6f 6e 73 74 72 61 69 6e 74 3b 0a 66 6f 72 65 61 63 68 20 28 61 72 72 61 79 | prettyConstraint;.foreach.(array |
eb100 | 5f 72 65 76 65 72 73 65 28 24 6d 61 74 63 68 65 73 5b 27 63 6f 6e 73 74 72 61 69 6e 74 27 5d 29 | _reverse($matches['constraint']) |
eb120 | 20 61 73 20 24 6d 61 74 63 68 29 20 7b 0a 24 6d 6f 64 69 66 69 65 64 20 3d 20 73 75 62 73 74 72 | .as.$match).{.$modified.=.substr |
eb140 | 5f 72 65 70 6c 61 63 65 28 24 6d 6f 64 69 66 69 65 64 2c 20 24 6e 65 77 50 72 65 74 74 79 43 6f | _replace($modified,.$newPrettyCo |
eb160 | 6e 73 74 72 61 69 6e 74 2c 20 24 6d 61 74 63 68 5b 31 5d 2c 20 50 6c 61 74 66 6f 72 6d 3a 3a 73 | nstraint,.$match[1],.Platform::s |
eb180 | 74 72 6c 65 6e 28 24 6d 61 74 63 68 5b 30 5d 29 29 3b 0a 7d 0a 0a 0a 24 6e 65 77 43 6f 6e 73 74 | trlen($match[0]));.}...$newConst |
eb1a0 | 72 61 69 6e 74 20 3d 20 24 70 61 72 73 65 72 2d 3e 70 61 72 73 65 43 6f 6e 73 74 72 61 69 6e 74 | raint.=.$parser->parseConstraint |
eb1c0 | 73 28 24 6d 6f 64 69 66 69 65 64 29 3b 0a 69 66 20 28 49 6e 74 65 72 76 61 6c 73 3a 3a 69 73 53 | s($modified);.if.(Intervals::isS |
eb1e0 | 75 62 73 65 74 4f 66 28 24 6e 65 77 43 6f 6e 73 74 72 61 69 6e 74 2c 20 24 63 6f 6e 73 74 72 61 | ubsetOf($newConstraint,.$constra |
eb200 | 69 6e 74 29 20 26 26 20 49 6e 74 65 72 76 61 6c 73 3a 3a 69 73 53 75 62 73 65 74 4f 66 28 24 63 | int).&&.Intervals::isSubsetOf($c |
eb220 | 6f 6e 73 74 72 61 69 6e 74 2c 20 24 6e 65 77 43 6f 6e 73 74 72 61 69 6e 74 29 29 20 7b 0a 72 65 | onstraint,.$newConstraint)).{.re |
eb240 | 74 75 72 6e 20 24 70 72 65 74 74 79 43 6f 6e 73 74 72 61 69 6e 74 3b 0a 7d 0a 0a 72 65 74 75 72 | turn.$prettyConstraint;.}..retur |
eb260 | 6e 20 24 6d 6f 64 69 66 69 65 64 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 70 72 65 74 74 79 43 6f | n.$modified;.}..return.$prettyCo |
eb280 | 6e 73 74 72 61 69 6e 74 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 | nstraint;.}.}.<?php.declare(stri |
eb2a0 | 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 | ct_types=1);............namespac |
eb2c0 | 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 56 65 72 73 69 6f 6e 3b 0a 0a 75 73 65 | e.Composer\Package\Version;..use |
eb2e0 | 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6e 66 69 67 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 | .Composer\Config;.use.Composer\P |
eb300 | 63 72 65 5c 50 72 65 67 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 | cre\Preg;.use.Composer\Repositor |
eb320 | 79 5c 56 63 73 5c 48 67 44 72 69 76 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 4f 5c | y\Vcs\HgDriver;.use.Composer\IO\ |
eb340 | 4e 75 6c 6c 49 4f 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 65 6d 76 65 72 5c 56 65 72 73 | NullIO;.use.Composer\Semver\Vers |
eb360 | 69 6f 6e 50 61 72 73 65 72 20 61 73 20 53 65 6d 76 65 72 56 65 72 73 69 6f 6e 50 61 72 73 65 72 | ionParser.as.SemverVersionParser |
eb380 | 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 47 69 74 20 61 73 20 47 69 74 55 74 | ;.use.Composer\Util\Git.as.GitUt |
eb3a0 | 69 6c 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 48 74 74 70 44 6f 77 6e 6c 6f | il;.use.Composer\Util\HttpDownlo |
eb3c0 | 61 64 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 6c 61 74 66 6f 72 6d | ader;.use.Composer\Util\Platform |
eb3e0 | 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 72 6f 63 65 73 73 45 78 65 63 75 | ;.use.Composer\Util\ProcessExecu |
eb400 | 74 6f 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 53 76 6e 20 61 73 20 53 76 | tor;.use.Composer\Util\Svn.as.Sv |
eb420 | 6e 55 74 69 6c 3b 0a 75 73 65 20 52 65 61 63 74 5c 50 72 6f 6d 69 73 65 5c 43 61 6e 63 65 6c 6c | nUtil;.use.React\Promise\Cancell |
eb440 | 61 62 6c 65 50 72 6f 6d 69 73 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 53 79 6d 66 6f 6e | ablePromiseInterface;.use.Symfon |
eb460 | 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 50 72 6f 63 65 73 73 5c 50 72 6f 63 65 73 73 3b 0a 0a 0a 0a | y\Component\Process\Process;.... |
eb480 | 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 56 65 72 73 69 6f 6e 47 75 65 73 73 65 72 0a 7b 0a 0a 0a 0a | ......class.VersionGuesser.{.... |
eb4a0 | 70 72 69 76 61 74 65 20 24 63 6f 6e 66 69 67 3b 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 70 72 | private.$config;.....private.$pr |
eb4c0 | 6f 63 65 73 73 3b 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 76 65 72 73 69 6f 6e 50 61 72 73 65 | ocess;.....private.$versionParse |
eb4e0 | 72 3b 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 | r;..public.function.__construct( |
eb500 | 43 6f 6e 66 69 67 20 24 63 6f 6e 66 69 67 2c 20 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 20 | Config.$config,.ProcessExecutor. |
eb520 | 24 70 72 6f 63 65 73 73 2c 20 53 65 6d 76 65 72 56 65 72 73 69 6f 6e 50 61 72 73 65 72 20 24 76 | $process,.SemverVersionParser.$v |
eb540 | 65 72 73 69 6f 6e 50 61 72 73 65 72 29 0a 7b 0a 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 20 3d 20 | ersionParser).{.$this->config.=. |
eb560 | 24 63 6f 6e 66 69 67 3b 0a 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 20 3d 20 24 70 72 6f 63 65 | $config;.$this->process.=.$proce |
eb580 | 73 73 3b 0a 24 74 68 69 73 2d 3e 76 65 72 73 69 6f 6e 50 61 72 73 65 72 20 3d 20 24 76 65 72 73 | ss;.$this->versionParser.=.$vers |
eb5a0 | 69 6f 6e 50 61 72 73 65 72 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 | ionParser;.}........public.funct |
eb5c0 | 69 6f 6e 20 67 75 65 73 73 56 65 72 73 69 6f 6e 28 61 72 72 61 79 20 24 70 61 63 6b 61 67 65 43 | ion.guessVersion(array.$packageC |
eb5e0 | 6f 6e 66 69 67 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 29 3a 20 3f 61 72 72 61 79 0a 7b 0a 69 | onfig,.string.$path):.?array.{.i |
eb600 | 66 20 28 21 66 75 6e 63 74 69 6f 6e 5f 65 78 69 73 74 73 28 27 70 72 6f 63 5f 6f 70 65 6e 27 29 | f.(!function_exists('proc_open') |
eb620 | 29 20 7b 0a 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0a 7d 0a 0a 0a 0a 69 66 20 28 50 6c 61 74 66 6f | ).{.return.null;.}....if.(Platfo |
eb640 | 72 6d 3a 3a 69 73 49 6e 70 75 74 43 6f 6d 70 6c 65 74 69 6f 6e 50 72 6f 63 65 73 73 28 29 29 20 | rm::isInputCompletionProcess()). |
eb660 | 7b 0a 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0a 7d 0a 0a 24 76 65 72 73 69 6f 6e 44 61 74 61 20 3d | {.return.null;.}..$versionData.= |
eb680 | 20 24 74 68 69 73 2d 3e 67 75 65 73 73 47 69 74 56 65 72 73 69 6f 6e 28 24 70 61 63 6b 61 67 65 | .$this->guessGitVersion($package |
eb6a0 | 43 6f 6e 66 69 67 2c 20 24 70 61 74 68 29 3b 0a 69 66 20 28 6e 75 6c 6c 20 21 3d 3d 20 24 76 65 | Config,.$path);.if.(null.!==.$ve |
eb6c0 | 72 73 69 6f 6e 44 61 74 61 20 26 26 20 6e 75 6c 6c 20 21 3d 3d 20 24 76 65 72 73 69 6f 6e 44 61 | rsionData.&&.null.!==.$versionDa |
eb6e0 | 74 61 5b 27 76 65 72 73 69 6f 6e 27 5d 29 20 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 70 | ta['version']).{.return.$this->p |
eb700 | 6f 73 74 70 72 6f 63 65 73 73 28 24 76 65 72 73 69 6f 6e 44 61 74 61 29 3b 0a 7d 0a 0a 24 76 65 | ostprocess($versionData);.}..$ve |
eb720 | 72 73 69 6f 6e 44 61 74 61 20 3d 20 24 74 68 69 73 2d 3e 67 75 65 73 73 48 67 56 65 72 73 69 6f | rsionData.=.$this->guessHgVersio |
eb740 | 6e 28 24 70 61 63 6b 61 67 65 43 6f 6e 66 69 67 2c 20 24 70 61 74 68 29 3b 0a 69 66 20 28 6e 75 | n($packageConfig,.$path);.if.(nu |
eb760 | 6c 6c 20 21 3d 3d 20 24 76 65 72 73 69 6f 6e 44 61 74 61 20 26 26 20 6e 75 6c 6c 20 21 3d 3d 20 | ll.!==.$versionData.&&.null.!==. |
eb780 | 24 76 65 72 73 69 6f 6e 44 61 74 61 5b 27 76 65 72 73 69 6f 6e 27 5d 29 20 7b 0a 72 65 74 75 72 | $versionData['version']).{.retur |
eb7a0 | 6e 20 24 74 68 69 73 2d 3e 70 6f 73 74 70 72 6f 63 65 73 73 28 24 76 65 72 73 69 6f 6e 44 61 74 | n.$this->postprocess($versionDat |
eb7c0 | 61 29 3b 0a 7d 0a 0a 24 76 65 72 73 69 6f 6e 44 61 74 61 20 3d 20 24 74 68 69 73 2d 3e 67 75 65 | a);.}..$versionData.=.$this->gue |
eb7e0 | 73 73 46 6f 73 73 69 6c 56 65 72 73 69 6f 6e 28 24 70 61 74 68 29 3b 0a 69 66 20 28 6e 75 6c 6c | ssFossilVersion($path);.if.(null |
eb800 | 20 21 3d 3d 20 24 76 65 72 73 69 6f 6e 44 61 74 61 20 26 26 20 6e 75 6c 6c 20 21 3d 3d 20 24 76 | .!==.$versionData.&&.null.!==.$v |
eb820 | 65 72 73 69 6f 6e 44 61 74 61 5b 27 76 65 72 73 69 6f 6e 27 5d 29 20 7b 0a 72 65 74 75 72 6e 20 | ersionData['version']).{.return. |
eb840 | 24 74 68 69 73 2d 3e 70 6f 73 74 70 72 6f 63 65 73 73 28 24 76 65 72 73 69 6f 6e 44 61 74 61 29 | $this->postprocess($versionData) |
eb860 | 3b 0a 7d 0a 0a 24 76 65 72 73 69 6f 6e 44 61 74 61 20 3d 20 24 74 68 69 73 2d 3e 67 75 65 73 73 | ;.}..$versionData.=.$this->guess |
eb880 | 53 76 6e 56 65 72 73 69 6f 6e 28 24 70 61 63 6b 61 67 65 43 6f 6e 66 69 67 2c 20 24 70 61 74 68 | SvnVersion($packageConfig,.$path |
eb8a0 | 29 3b 0a 69 66 20 28 6e 75 6c 6c 20 21 3d 3d 20 24 76 65 72 73 69 6f 6e 44 61 74 61 20 26 26 20 | );.if.(null.!==.$versionData.&&. |
eb8c0 | 6e 75 6c 6c 20 21 3d 3d 20 24 76 65 72 73 69 6f 6e 44 61 74 61 5b 27 76 65 72 73 69 6f 6e 27 5d | null.!==.$versionData['version'] |
eb8e0 | 29 20 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 70 6f 73 74 70 72 6f 63 65 73 73 28 24 76 | ).{.return.$this->postprocess($v |
eb900 | 65 72 73 69 6f 6e 44 61 74 61 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0a 7d 0a 0a | ersionData);.}..return.null;.}.. |
eb920 | 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 70 6f 73 74 70 72 6f 63 65 73 | .....private.function.postproces |
eb940 | 73 28 61 72 72 61 79 20 24 76 65 72 73 69 6f 6e 44 61 74 61 29 3a 20 61 72 72 61 79 0a 7b 0a 69 | s(array.$versionData):.array.{.i |
eb960 | 66 20 28 21 65 6d 70 74 79 28 24 76 65 72 73 69 6f 6e 44 61 74 61 5b 27 66 65 61 74 75 72 65 5f | f.(!empty($versionData['feature_ |
eb980 | 76 65 72 73 69 6f 6e 27 5d 29 20 26 26 20 24 76 65 72 73 69 6f 6e 44 61 74 61 5b 27 66 65 61 74 | version']).&&.$versionData['feat |
eb9a0 | 75 72 65 5f 76 65 72 73 69 6f 6e 27 5d 20 3d 3d 3d 20 24 76 65 72 73 69 6f 6e 44 61 74 61 5b 27 | ure_version'].===.$versionData[' |
eb9c0 | 76 65 72 73 69 6f 6e 27 5d 20 26 26 20 24 76 65 72 73 69 6f 6e 44 61 74 61 5b 27 66 65 61 74 75 | version'].&&.$versionData['featu |
eb9e0 | 72 65 5f 70 72 65 74 74 79 5f 76 65 72 73 69 6f 6e 27 5d 20 3d 3d 3d 20 24 76 65 72 73 69 6f 6e | re_pretty_version'].===.$version |
eba00 | 44 61 74 61 5b 27 70 72 65 74 74 79 5f 76 65 72 73 69 6f 6e 27 5d 29 20 7b 0a 75 6e 73 65 74 28 | Data['pretty_version']).{.unset( |
eba20 | 24 76 65 72 73 69 6f 6e 44 61 74 61 5b 27 66 65 61 74 75 72 65 5f 76 65 72 73 69 6f 6e 27 5d 2c | $versionData['feature_version'], |
eba40 | 20 24 76 65 72 73 69 6f 6e 44 61 74 61 5b 27 66 65 61 74 75 72 65 5f 70 72 65 74 74 79 5f 76 65 | .$versionData['feature_pretty_ve |
eba60 | 72 73 69 6f 6e 27 5d 29 3b 0a 7d 0a 0a 69 66 20 28 27 2d 64 65 76 27 20 3d 3d 3d 20 73 75 62 73 | rsion']);.}..if.('-dev'.===.subs |
eba80 | 74 72 28 24 76 65 72 73 69 6f 6e 44 61 74 61 5b 27 76 65 72 73 69 6f 6e 27 5d 2c 20 2d 34 29 20 | tr($versionData['version'],.-4). |
ebaa0 | 26 26 20 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b 5c 2e 39 7b 37 7d 7d 27 2c 20 24 76 65 | &&.Preg::isMatch('{\.9{7}}',.$ve |
ebac0 | 72 73 69 6f 6e 44 61 74 61 5b 27 76 65 72 73 69 6f 6e 27 5d 29 29 20 7b 0a 24 76 65 72 73 69 6f | rsionData['version'])).{.$versio |
ebae0 | 6e 44 61 74 61 5b 27 70 72 65 74 74 79 5f 76 65 72 73 69 6f 6e 27 5d 20 3d 20 50 72 65 67 3a 3a | nData['pretty_version'].=.Preg:: |
ebb00 | 72 65 70 6c 61 63 65 28 27 7b 28 5c 2e 39 7b 37 7d 29 2b 7d 27 2c 20 27 2e 78 27 2c 20 24 76 65 | replace('{(\.9{7})+}',.'.x',.$ve |
ebb20 | 72 73 69 6f 6e 44 61 74 61 5b 27 76 65 72 73 69 6f 6e 27 5d 29 3b 0a 7d 0a 0a 69 66 20 28 21 65 | rsionData['version']);.}..if.(!e |
ebb40 | 6d 70 74 79 28 24 76 65 72 73 69 6f 6e 44 61 74 61 5b 27 66 65 61 74 75 72 65 5f 76 65 72 73 69 | mpty($versionData['feature_versi |
ebb60 | 6f 6e 27 5d 29 20 26 26 20 27 2d 64 65 76 27 20 3d 3d 3d 20 73 75 62 73 74 72 28 24 76 65 72 73 | on']).&&.'-dev'.===.substr($vers |
ebb80 | 69 6f 6e 44 61 74 61 5b 27 66 65 61 74 75 72 65 5f 76 65 72 73 69 6f 6e 27 5d 2c 20 2d 34 29 20 | ionData['feature_version'],.-4). |
ebba0 | 26 26 20 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b 5c 2e 39 7b 37 7d 7d 27 2c 20 24 76 65 | &&.Preg::isMatch('{\.9{7}}',.$ve |
ebbc0 | 72 73 69 6f 6e 44 61 74 61 5b 27 66 65 61 74 75 72 65 5f 76 65 72 73 69 6f 6e 27 5d 29 29 20 7b | rsionData['feature_version'])).{ |
ebbe0 | 0a 24 76 65 72 73 69 6f 6e 44 61 74 61 5b 27 66 65 61 74 75 72 65 5f 70 72 65 74 74 79 5f 76 65 | .$versionData['feature_pretty_ve |
ebc00 | 72 73 69 6f 6e 27 5d 20 3d 20 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 28 27 7b 28 5c 2e 39 7b 37 | rsion'].=.Preg::replace('{(\.9{7 |
ebc20 | 7d 29 2b 7d 27 2c 20 27 2e 78 27 2c 20 24 76 65 72 73 69 6f 6e 44 61 74 61 5b 27 66 65 61 74 75 | })+}',.'.x',.$versionData['featu |
ebc40 | 72 65 5f 76 65 72 73 69 6f 6e 27 5d 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 76 65 72 73 69 6f | re_version']);.}..return.$versio |
ebc60 | 6e 44 61 74 61 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 | nData;.}.......private.function. |
ebc80 | 67 75 65 73 73 47 69 74 56 65 72 73 69 6f 6e 28 61 72 72 61 79 20 24 70 61 63 6b 61 67 65 43 6f | guessGitVersion(array.$packageCo |
ebca0 | 6e 66 69 67 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 29 3a 20 61 72 72 61 79 0a 7b 0a 47 69 74 | nfig,.string.$path):.array.{.Git |
ebcc0 | 55 74 69 6c 3a 3a 63 6c 65 61 6e 45 6e 76 28 29 3b 0a 24 63 6f 6d 6d 69 74 20 3d 20 6e 75 6c 6c | Util::cleanEnv();.$commit.=.null |
ebce0 | 3b 0a 24 76 65 72 73 69 6f 6e 20 3d 20 6e 75 6c 6c 3b 0a 24 70 72 65 74 74 79 56 65 72 73 69 6f | ;.$version.=.null;.$prettyVersio |
ebd00 | 6e 20 3d 20 6e 75 6c 6c 3b 0a 24 66 65 61 74 75 72 65 56 65 72 73 69 6f 6e 20 3d 20 6e 75 6c 6c | n.=.null;.$featureVersion.=.null |
ebd20 | 3b 0a 24 66 65 61 74 75 72 65 50 72 65 74 74 79 56 65 72 73 69 6f 6e 20 3d 20 6e 75 6c 6c 3b 0a | ;.$featurePrettyVersion.=.null;. |
ebd40 | 24 69 73 44 65 74 61 63 68 65 64 20 3d 20 66 61 6c 73 65 3b 0a 0a 0a 69 66 20 28 30 20 3d 3d 3d | $isDetached.=.false;...if.(0.=== |
ebd60 | 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 65 78 65 63 75 74 65 28 5b 27 67 69 74 27 2c | .$this->process->execute(['git', |
ebd80 | 20 27 62 72 61 6e 63 68 27 2c 20 27 2d 61 27 2c 20 27 2d 2d 6e 6f 2d 63 6f 6c 6f 72 27 2c 20 27 | .'branch',.'-a',.'--no-color',.' |
ebda0 | 2d 2d 6e 6f 2d 61 62 62 72 65 76 27 2c 20 27 2d 76 27 5d 2c 20 24 6f 75 74 70 75 74 2c 20 24 70 | --no-abbrev',.'-v'],.$output,.$p |
ebdc0 | 61 74 68 29 29 20 7b 0a 24 62 72 61 6e 63 68 65 73 20 3d 20 5b 5d 3b 0a 24 69 73 46 65 61 74 75 | ath)).{.$branches.=.[];.$isFeatu |
ebde0 | 72 65 42 72 61 6e 63 68 20 3d 20 66 61 6c 73 65 3b 0a 0a 0a 66 6f 72 65 61 63 68 20 28 24 74 68 | reBranch.=.false;...foreach.($th |
ebe00 | 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 73 70 6c 69 74 4c 69 6e 65 73 28 24 6f 75 74 70 75 74 29 | is->process->splitLines($output) |
ebe20 | 20 61 73 20 24 62 72 61 6e 63 68 29 20 7b 0a 69 66 20 28 24 62 72 61 6e 63 68 20 26 26 20 50 72 | .as.$branch).{.if.($branch.&&.Pr |
ebe40 | 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b 5e 28 3f 3a 5c 2a 20 29 20 2a 28 5c 28 6e 6f 20 62 72 | eg::isMatch('{^(?:\*.).*(\(no.br |
ebe60 | 61 6e 63 68 5c 29 7c 5c 28 64 65 74 61 63 68 65 64 20 66 72 6f 6d 20 5c 53 2b 5c 29 7c 5c 28 48 | anch\)|\(detached.from.\S+\)|\(H |
ebe80 | 45 41 44 20 64 65 74 61 63 68 65 64 20 61 74 20 5c 53 2b 5c 29 7c 5c 53 2b 29 20 2a 28 5b 61 2d | EAD.detached.at.\S+\)|\S+).*([a- |
ebea0 | 66 30 2d 39 5d 2b 29 20 2e 2a 24 7d 27 2c 20 24 62 72 61 6e 63 68 2c 20 24 6d 61 74 63 68 29 29 | f0-9]+)..*$}',.$branch,.$match)) |
ebec0 | 20 7b 0a 69 66 20 28 0a 24 6d 61 74 63 68 5b 31 5d 20 3d 3d 3d 20 27 28 6e 6f 20 62 72 61 6e 63 | .{.if.(.$match[1].===.'(no.branc |
ebee0 | 68 29 27 0a 7c 7c 20 73 74 72 70 6f 73 28 24 6d 61 74 63 68 5b 31 5d 2c 20 27 28 64 65 74 61 63 | h)'.||.strpos($match[1],.'(detac |
ebf00 | 68 65 64 20 27 29 20 3d 3d 3d 20 30 0a 7c 7c 20 73 74 72 70 6f 73 28 24 6d 61 74 63 68 5b 31 5d | hed.').===.0.||.strpos($match[1] |
ebf20 | 2c 20 27 28 48 45 41 44 20 64 65 74 61 63 68 65 64 20 61 74 27 29 20 3d 3d 3d 20 30 0a 29 20 7b | ,.'(HEAD.detached.at').===.0.).{ |
ebf40 | 0a 24 76 65 72 73 69 6f 6e 20 3d 20 27 64 65 76 2d 27 20 2e 20 24 6d 61 74 63 68 5b 32 5d 3b 0a | .$version.=.'dev-'...$match[2];. |
ebf60 | 24 70 72 65 74 74 79 56 65 72 73 69 6f 6e 20 3d 20 24 76 65 72 73 69 6f 6e 3b 0a 24 69 73 46 65 | $prettyVersion.=.$version;.$isFe |
ebf80 | 61 74 75 72 65 42 72 61 6e 63 68 20 3d 20 74 72 75 65 3b 0a 24 69 73 44 65 74 61 63 68 65 64 20 | atureBranch.=.true;.$isDetached. |
ebfa0 | 3d 20 74 72 75 65 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 76 65 72 73 69 6f 6e 20 3d 20 24 74 68 69 | =.true;.}.else.{.$version.=.$thi |
ebfc0 | 73 2d 3e 76 65 72 73 69 6f 6e 50 61 72 73 65 72 2d 3e 6e 6f 72 6d 61 6c 69 7a 65 42 72 61 6e 63 | s->versionParser->normalizeBranc |
ebfe0 | 68 28 24 6d 61 74 63 68 5b 31 5d 29 3b 0a 24 70 72 65 74 74 79 56 65 72 73 69 6f 6e 20 3d 20 27 | h($match[1]);.$prettyVersion.=.' |
ec000 | 64 65 76 2d 27 20 2e 20 24 6d 61 74 63 68 5b 31 5d 3b 0a 24 69 73 46 65 61 74 75 72 65 42 72 61 | dev-'...$match[1];.$isFeatureBra |
ec020 | 6e 63 68 20 3d 20 24 74 68 69 73 2d 3e 69 73 46 65 61 74 75 72 65 42 72 61 6e 63 68 28 24 70 61 | nch.=.$this->isFeatureBranch($pa |
ec040 | 63 6b 61 67 65 43 6f 6e 66 69 67 2c 20 24 6d 61 74 63 68 5b 31 5d 29 3b 0a 7d 0a 0a 69 66 20 28 | ckageConfig,.$match[1]);.}..if.( |
ec060 | 24 6d 61 74 63 68 5b 32 5d 29 20 7b 0a 24 63 6f 6d 6d 69 74 20 3d 20 24 6d 61 74 63 68 5b 32 5d | $match[2]).{.$commit.=.$match[2] |
ec080 | 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 24 62 72 61 6e 63 68 20 26 26 20 21 50 72 65 67 3a 3a 69 73 4d | ;.}.}..if.($branch.&&.!Preg::isM |
ec0a0 | 61 74 63 68 28 27 7b 5e 20 2a 2e 2b 2f 48 45 41 44 20 7d 27 2c 20 24 62 72 61 6e 63 68 29 29 20 | atch('{^.*.+/HEAD.}',.$branch)). |
ec0c0 | 7b 0a 69 66 20 28 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 7b 5e 28 3f 3a 5c 2a 20 29 3f 20 | {.if.(Preg::isMatch('{^(?:\*.)?. |
ec0e0 | 2a 28 28 3f 3a 72 65 6d 6f 74 65 73 2f 28 3f 3a 6f 72 69 67 69 6e 7c 75 70 73 74 72 65 61 6d 29 | *((?:remotes/(?:origin|upstream) |
ec100 | 2f 29 3f 5b 5e 5c 73 2f 5d 2b 29 20 2a 28 5b 61 2d 66 30 2d 39 5d 2b 29 20 2e 2a 24 7d 27 2c 20 | /)?[^\s/]+).*([a-f0-9]+)..*$}',. |
ec120 | 24 62 72 61 6e 63 68 2c 20 24 6d 61 74 63 68 29 29 20 7b 0a 24 62 72 61 6e 63 68 65 73 5b 5d 20 | $branch,.$match)).{.$branches[]. |
ec140 | 3d 20 24 6d 61 74 63 68 5b 31 5d 3b 0a 7d 0a 7d 0a 7d 0a 0a 69 66 20 28 24 69 73 46 65 61 74 75 | =.$match[1];.}.}.}..if.($isFeatu |
ec160 | 72 65 42 72 61 6e 63 68 29 20 7b 0a 24 66 65 61 74 75 72 65 56 65 72 73 69 6f 6e 20 3d 20 24 76 | reBranch).{.$featureVersion.=.$v |
ec180 | 65 72 73 69 6f 6e 3b 0a 24 66 65 61 74 75 72 65 50 72 65 74 74 79 56 65 72 73 69 6f 6e 20 3d 20 | ersion;.$featurePrettyVersion.=. |
ec1a0 | 24 70 72 65 74 74 79 56 65 72 73 69 6f 6e 3b 0a 0a 0a 24 72 65 73 75 6c 74 20 3d 20 24 74 68 69 | $prettyVersion;...$result.=.$thi |
ec1c0 | 73 2d 3e 67 75 65 73 73 46 65 61 74 75 72 65 56 65 72 73 69 6f 6e 28 24 70 61 63 6b 61 67 65 43 | s->guessFeatureVersion($packageC |
ec1e0 | 6f 6e 66 69 67 2c 20 24 76 65 72 73 69 6f 6e 2c 20 24 62 72 61 6e 63 68 65 73 2c 20 27 67 69 74 | onfig,.$version,.$branches,.'git |
ec200 | 20 72 65 76 2d 6c 69 73 74 20 25 63 61 6e 64 69 64 61 74 65 25 2e 2e 25 62 72 61 6e 63 68 25 27 | .rev-list.%candidate%..%branch%' |
ec220 | 2c 20 24 70 61 74 68 29 3b 0a 24 76 65 72 73 69 6f 6e 20 3d 20 24 72 65 73 75 6c 74 5b 27 76 65 | ,.$path);.$version.=.$result['ve |
ec240 | 72 73 69 6f 6e 27 5d 3b 0a 24 70 72 65 74 74 79 56 65 72 73 69 6f 6e 20 3d 20 24 72 65 73 75 6c | rsion'];.$prettyVersion.=.$resul |
ec260 | 74 5b 27 70 72 65 74 74 79 5f 76 65 72 73 69 6f 6e 27 5d 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 21 24 | t['pretty_version'];.}.}..if.(!$ |
ec280 | 76 65 72 73 69 6f 6e 20 7c 7c 20 24 69 73 44 65 74 61 63 68 65 64 29 20 7b 0a 24 72 65 73 75 6c | version.||.$isDetached).{.$resul |
ec2a0 | 74 20 3d 20 24 74 68 69 73 2d 3e 76 65 72 73 69 6f 6e 46 72 6f 6d 47 69 74 54 61 67 73 28 24 70 | t.=.$this->versionFromGitTags($p |
ec2c0 | 61 74 68 29 3b 0a 69 66 20 28 24 72 65 73 75 6c 74 29 20 7b 0a 24 76 65 72 73 69 6f 6e 20 3d 20 | ath);.if.($result).{.$version.=. |
ec2e0 | 24 72 65 73 75 6c 74 5b 27 76 65 72 73 69 6f 6e 27 5d 3b 0a 24 70 72 65 74 74 79 56 65 72 73 69 | $result['version'];.$prettyVersi |
ec300 | 6f 6e 20 3d 20 24 72 65 73 75 6c 74 5b 27 70 72 65 74 74 79 5f 76 65 72 73 69 6f 6e 27 5d 3b 0a | on.=.$result['pretty_version'];. |
ec320 | 24 66 65 61 74 75 72 65 56 65 72 73 69 6f 6e 20 3d 20 6e 75 6c 6c 3b 0a 24 66 65 61 74 75 72 65 | $featureVersion.=.null;.$feature |
ec340 | 50 72 65 74 74 79 56 65 72 73 69 6f 6e 20 3d 20 6e 75 6c 6c 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 21 | PrettyVersion.=.null;.}.}..if.(! |
ec360 | 24 63 6f 6d 6d 69 74 29 20 7b 0a 24 63 6f 6d 6d 61 6e 64 20 3d 20 27 67 69 74 20 6c 6f 67 20 2d | $commit).{.$command.=.'git.log.- |
ec380 | 2d 70 72 65 74 74 79 3d 22 25 48 22 20 2d 6e 31 20 48 45 41 44 27 2e 47 69 74 55 74 69 6c 3a 3a | -pretty="%H".-n1.HEAD'.GitUtil:: |
ec3a0 | 67 65 74 4e 6f 53 68 6f 77 53 69 67 6e 61 74 75 72 65 46 6c 61 67 28 24 74 68 69 73 2d 3e 70 72 | getNoShowSignatureFlag($this->pr |
ec3c0 | 6f 63 65 73 73 29 3b 0a 69 66 20 28 30 20 3d 3d 3d 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 | ocess);.if.(0.===.$this->process |
ec3e0 | 2d 3e 65 78 65 63 75 74 65 28 24 63 6f 6d 6d 61 6e 64 2c 20 24 6f 75 74 70 75 74 2c 20 24 70 61 | ->execute($command,.$output,.$pa |
ec400 | 74 68 29 29 20 7b 0a 24 63 6f 6d 6d 69 74 20 3d 20 74 72 69 6d 28 24 6f 75 74 70 75 74 29 20 3f | th)).{.$commit.=.trim($output).? |
ec420 | 3a 20 6e 75 6c 6c 3b 0a 7d 0a 7d 0a 0a 69 66 20 28 24 66 65 61 74 75 72 65 56 65 72 73 69 6f 6e | :.null;.}.}..if.($featureVersion |
ec440 | 29 20 7b 0a 72 65 74 75 72 6e 20 5b 27 76 65 72 73 69 6f 6e 27 20 3d 3e 20 24 76 65 72 73 69 6f | ).{.return.['version'.=>.$versio |
ec460 | 6e 2c 20 27 63 6f 6d 6d 69 74 27 20 3d 3e 20 24 63 6f 6d 6d 69 74 2c 20 27 70 72 65 74 74 79 5f | n,.'commit'.=>.$commit,.'pretty_ |
ec480 | 76 65 72 73 69 6f 6e 27 20 3d 3e 20 24 70 72 65 74 74 79 56 65 72 73 69 6f 6e 2c 20 27 66 65 61 | version'.=>.$prettyVersion,.'fea |
ec4a0 | 74 75 72 65 5f 76 65 72 73 69 6f 6e 27 20 3d 3e 20 24 66 65 61 74 75 72 65 56 65 72 73 69 6f 6e | ture_version'.=>.$featureVersion |
ec4c0 | 2c 20 27 66 65 61 74 75 72 65 5f 70 72 65 74 74 79 5f 76 65 72 73 69 6f 6e 27 20 3d 3e 20 24 66 | ,.'feature_pretty_version'.=>.$f |
ec4e0 | 65 61 74 75 72 65 50 72 65 74 74 79 56 65 72 73 69 6f 6e 5d 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 | eaturePrettyVersion];.}..return. |
ec500 | 5b 27 76 65 72 73 69 6f 6e 27 20 3d 3e 20 24 76 65 72 73 69 6f 6e 2c 20 27 63 6f 6d 6d 69 74 27 | ['version'.=>.$version,.'commit' |
ec520 | 20 3d 3e 20 24 63 6f 6d 6d 69 74 2c 20 27 70 72 65 74 74 79 5f 76 65 72 73 69 6f 6e 27 20 3d 3e | .=>.$commit,.'pretty_version'.=> |
ec540 | 20 24 70 72 65 74 74 79 56 65 72 73 69 6f 6e 5d 3b 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 | .$prettyVersion];.}.....private. |
ec560 | 66 75 6e 63 74 69 6f 6e 20 76 65 72 73 69 6f 6e 46 72 6f 6d 47 69 74 54 61 67 73 28 73 74 72 69 | function.versionFromGitTags(stri |
ec580 | 6e 67 20 24 70 61 74 68 29 3a 20 3f 61 72 72 61 79 0a 7b 0a 0a 69 66 20 28 30 20 3d 3d 3d 20 24 | ng.$path):.?array.{..if.(0.===.$ |
ec5a0 | 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 65 78 65 63 75 74 65 28 27 67 69 74 20 64 65 73 63 | this->process->execute('git.desc |
ec5c0 | 72 69 62 65 20 2d 2d 65 78 61 63 74 2d 6d 61 74 63 68 20 2d 2d 74 61 67 73 27 2c 20 24 6f 75 74 | ribe.--exact-match.--tags',.$out |
ec5e0 | 70 75 74 2c 20 24 70 61 74 68 29 29 20 7b 0a 74 72 79 20 7b 0a 24 76 65 72 73 69 6f 6e 20 3d 20 | put,.$path)).{.try.{.$version.=. |
ec600 | 24 74 68 69 73 2d 3e 76 65 72 73 69 6f 6e 50 61 72 73 65 72 2d 3e 6e 6f 72 6d 61 6c 69 7a 65 28 | $this->versionParser->normalize( |
ec620 | 74 72 69 6d 28 24 6f 75 74 70 75 74 29 29 3b 0a 0a 72 65 74 75 72 6e 20 5b 27 76 65 72 73 69 6f | trim($output));..return.['versio |
ec640 | 6e 27 20 3d 3e 20 24 76 65 72 73 69 6f 6e 2c 20 27 70 72 65 74 74 79 5f 76 65 72 73 69 6f 6e 27 | n'.=>.$version,.'pretty_version' |
ec660 | 20 3d 3e 20 74 72 69 6d 28 24 6f 75 74 70 75 74 29 5d 3b 0a 7d 20 63 61 74 63 68 20 28 5c 45 78 | .=>.trim($output)];.}.catch.(\Ex |
ec680 | 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0a | ception.$e).{.}.}..return.null;. |
ec6a0 | 7d 0a 0a 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 67 75 65 73 73 48 67 | }.......private.function.guessHg |
ec6c0 | 56 65 72 73 69 6f 6e 28 61 72 72 61 79 20 24 70 61 63 6b 61 67 65 43 6f 6e 66 69 67 2c 20 73 74 | Version(array.$packageConfig,.st |
ec6e0 | 72 69 6e 67 20 24 70 61 74 68 29 3a 20 3f 61 72 72 61 79 0a 7b 0a 0a 69 66 20 28 30 20 3d 3d 3d | ring.$path):.?array.{..if.(0.=== |
ec700 | 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 65 78 65 63 75 74 65 28 27 68 67 20 62 72 61 | .$this->process->execute('hg.bra |
ec720 | 6e 63 68 27 2c 20 24 6f 75 74 70 75 74 2c 20 24 70 61 74 68 29 29 20 7b 0a 24 62 72 61 6e 63 68 | nch',.$output,.$path)).{.$branch |
ec740 | 20 3d 20 74 72 69 6d 28 24 6f 75 74 70 75 74 29 3b 0a 24 76 65 72 73 69 6f 6e 20 3d 20 24 74 68 | .=.trim($output);.$version.=.$th |
ec760 | 69 73 2d 3e 76 65 72 73 69 6f 6e 50 61 72 73 65 72 2d 3e 6e 6f 72 6d 61 6c 69 7a 65 42 72 61 6e | is->versionParser->normalizeBran |
ec780 | 63 68 28 24 62 72 61 6e 63 68 29 3b 0a 24 69 73 46 65 61 74 75 72 65 42 72 61 6e 63 68 20 3d 20 | ch($branch);.$isFeatureBranch.=. |
ec7a0 | 30 20 3d 3d 3d 20 73 74 72 70 6f 73 28 24 76 65 72 73 69 6f 6e 2c 20 27 64 65 76 2d 27 29 3b 0a | 0.===.strpos($version,.'dev-');. |
ec7c0 | 0a 69 66 20 28 56 65 72 73 69 6f 6e 50 61 72 73 65 72 3a 3a 44 45 46 41 55 4c 54 5f 42 52 41 4e | .if.(VersionParser::DEFAULT_BRAN |
ec7e0 | 43 48 5f 41 4c 49 41 53 20 3d 3d 3d 20 24 76 65 72 73 69 6f 6e 29 20 7b 0a 72 65 74 75 72 6e 20 | CH_ALIAS.===.$version).{.return. |
ec800 | 5b 27 76 65 72 73 69 6f 6e 27 20 3d 3e 20 24 76 65 72 73 69 6f 6e 2c 20 27 63 6f 6d 6d 69 74 27 | ['version'.=>.$version,.'commit' |
ec820 | 20 3d 3e 20 6e 75 6c 6c 2c 20 27 70 72 65 74 74 79 5f 76 65 72 73 69 6f 6e 27 20 3d 3e 20 27 64 | .=>.null,.'pretty_version'.=>.'d |
ec840 | 65 76 2d 27 2e 24 62 72 61 6e 63 68 5d 3b 0a 7d 0a 0a 69 66 20 28 21 24 69 73 46 65 61 74 75 72 | ev-'.$branch];.}..if.(!$isFeatur |
ec860 | 65 42 72 61 6e 63 68 29 20 7b 0a 72 65 74 75 72 6e 20 5b 27 76 65 72 73 69 6f 6e 27 20 3d 3e 20 | eBranch).{.return.['version'.=>. |
ec880 | 24 76 65 72 73 69 6f 6e 2c 20 27 63 6f 6d 6d 69 74 27 20 3d 3e 20 6e 75 6c 6c 2c 20 27 70 72 65 | $version,.'commit'.=>.null,.'pre |
ec8a0 | 74 74 79 5f 76 65 72 73 69 6f 6e 27 20 3d 3e 20 24 76 65 72 73 69 6f 6e 5d 3b 0a 7d 0a 0a 0a 24 | tty_version'.=>.$version];.}...$ |
ec8c0 | 69 6f 20 3d 20 6e 65 77 20 4e 75 6c 6c 49 4f 28 29 3b 0a 24 64 72 69 76 65 72 20 3d 20 6e 65 77 | io.=.new.NullIO();.$driver.=.new |
ec8e0 | 20 48 67 44 72 69 76 65 72 28 5b 27 75 72 6c 27 20 3d 3e 20 24 70 61 74 68 5d 2c 20 24 69 6f 2c | .HgDriver(['url'.=>.$path],.$io, |
ec900 | 20 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 2c 20 6e 65 77 20 48 74 74 70 44 6f 77 6e 6c 6f 61 64 | .$this->config,.new.HttpDownload |
ec920 | 65 72 28 24 69 6f 2c 20 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 29 2c 20 24 74 68 69 73 2d 3e 70 | er($io,.$this->config),.$this->p |
ec940 | 72 6f 63 65 73 73 29 3b 0a 24 62 72 61 6e 63 68 65 73 20 3d 20 61 72 72 61 79 5f 6d 61 70 28 27 | rocess);.$branches.=.array_map(' |
ec960 | 73 74 72 76 61 6c 27 2c 20 61 72 72 61 79 5f 6b 65 79 73 28 24 64 72 69 76 65 72 2d 3e 67 65 74 | strval',.array_keys($driver->get |
ec980 | 42 72 61 6e 63 68 65 73 28 29 29 29 3b 0a 0a 0a 24 72 65 73 75 6c 74 20 3d 20 24 74 68 69 73 2d | Branches()));...$result.=.$this- |
ec9a0 | 3e 67 75 65 73 73 46 65 61 74 75 72 65 56 65 72 73 69 6f 6e 28 24 70 61 63 6b 61 67 65 43 6f 6e | >guessFeatureVersion($packageCon |
ec9c0 | 66 69 67 2c 20 24 76 65 72 73 69 6f 6e 2c 20 24 62 72 61 6e 63 68 65 73 2c 20 27 68 67 20 6c 6f | fig,.$version,.$branches,.'hg.lo |
ec9e0 | 67 20 2d 72 20 22 6e 6f 74 20 61 6e 63 65 73 74 6f 72 73 28 5c 27 25 63 61 6e 64 69 64 61 74 65 | g.-r."not.ancestors(\'%candidate |
eca00 | 25 5c 27 29 20 61 6e 64 20 61 6e 63 65 73 74 6f 72 73 28 5c 27 25 62 72 61 6e 63 68 25 5c 27 29 | %\').and.ancestors(\'%branch%\') |
eca20 | 22 20 2d 2d 74 65 6d 70 6c 61 74 65 20 22 7b 6e 6f 64 65 7d 5c 5c 6e 22 27 2c 20 24 70 61 74 68 | ".--template."{node}\\n"',.$path |
eca40 | 29 3b 0a 24 72 65 73 75 6c 74 5b 27 63 6f 6d 6d 69 74 27 5d 20 3d 20 27 27 3b 0a 24 72 65 73 75 | );.$result['commit'].=.'';.$resu |
eca60 | 6c 74 5b 27 66 65 61 74 75 72 65 5f 76 65 72 73 69 6f 6e 27 5d 20 3d 20 24 76 65 72 73 69 6f 6e | lt['feature_version'].=.$version |
eca80 | 3b 0a 24 72 65 73 75 6c 74 5b 27 66 65 61 74 75 72 65 5f 70 72 65 74 74 79 5f 76 65 72 73 69 6f | ;.$result['feature_pretty_versio |
ecaa0 | 6e 27 5d 20 3d 20 24 76 65 72 73 69 6f 6e 3b 0a 0a 72 65 74 75 72 6e 20 24 72 65 73 75 6c 74 3b | n'].=.$version;..return.$result; |
ecac0 | 0a 7d 0a 0a 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 72 69 76 | .}..return.null;.}..........priv |
ecae0 | 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 67 75 65 73 73 46 65 61 74 75 72 65 56 65 72 73 69 6f 6e | ate.function.guessFeatureVersion |
ecb00 | 28 61 72 72 61 79 20 24 70 61 63 6b 61 67 65 43 6f 6e 66 69 67 2c 20 3f 73 74 72 69 6e 67 20 24 | (array.$packageConfig,.?string.$ |
ecb20 | 76 65 72 73 69 6f 6e 2c 20 61 72 72 61 79 20 24 62 72 61 6e 63 68 65 73 2c 20 73 74 72 69 6e 67 | version,.array.$branches,.string |
ecb40 | 20 24 73 63 6d 43 6d 64 6c 69 6e 65 2c 20 73 74 72 69 6e 67 20 24 70 61 74 68 29 3a 20 61 72 72 | .$scmCmdline,.string.$path):.arr |
ecb60 | 61 79 0a 7b 0a 24 70 72 65 74 74 79 56 65 72 73 69 6f 6e 20 3d 20 24 76 65 72 73 69 6f 6e 3b 0a | ay.{.$prettyVersion.=.$version;. |
ecb80 | 0a 0a 0a 69 66 20 28 21 69 73 73 65 74 28 24 70 61 63 6b 61 67 65 43 6f 6e 66 69 67 5b 27 65 78 | ...if.(!isset($packageConfig['ex |
ecba0 | 74 72 61 27 5d 5b 27 62 72 61 6e 63 68 2d 61 6c 69 61 73 27 5d 5b 24 76 65 72 73 69 6f 6e 5d 29 | tra']['branch-alias'][$version]) |
ecbc0 | 0a 7c 7c 20 73 74 72 70 6f 73 28 6a 73 6f 6e 5f 65 6e 63 6f 64 65 28 24 70 61 63 6b 61 67 65 43 | .||.strpos(json_encode($packageC |
ecbe0 | 6f 6e 66 69 67 29 2c 20 27 22 73 65 6c 66 2e 76 65 72 73 69 6f 6e 22 27 29 0a 29 20 7b 0a 24 62 | onfig),.'"self.version"').).{.$b |
ecc00 | 72 61 6e 63 68 20 3d 20 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 28 27 7b 5e 64 65 76 2d 7d 27 2c | ranch.=.Preg::replace('{^dev-}', |
ecc20 | 20 27 27 2c 20 24 76 65 72 73 69 6f 6e 29 3b 0a 24 6c 65 6e 67 74 68 20 3d 20 50 48 50 5f 49 4e | .'',.$version);.$length.=.PHP_IN |
ecc40 | 54 5f 4d 41 58 3b 0a 0a 0a 69 66 20 28 21 24 74 68 69 73 2d 3e 69 73 46 65 61 74 75 72 65 42 72 | T_MAX;...if.(!$this->isFeatureBr |
ecc60 | 61 6e 63 68 28 24 70 61 63 6b 61 67 65 43 6f 6e 66 69 67 2c 20 24 62 72 61 6e 63 68 29 29 20 7b | anch($packageConfig,.$branch)).{ |
ecc80 | 0a 72 65 74 75 72 6e 20 5b 27 76 65 72 73 69 6f 6e 27 20 3d 3e 20 24 76 65 72 73 69 6f 6e 2c 20 | .return.['version'.=>.$version,. |
ecca0 | 27 70 72 65 74 74 79 5f 76 65 72 73 69 6f 6e 27 20 3d 3e 20 24 70 72 65 74 74 79 56 65 72 73 69 | 'pretty_version'.=>.$prettyVersi |
eccc0 | 6f 6e 5d 3b 0a 7d 0a 0a 0a 0a 0a 75 73 6f 72 74 28 24 62 72 61 6e 63 68 65 73 2c 20 73 74 61 74 | on];.}.....usort($branches,.stat |
ecce0 | 69 63 20 66 75 6e 63 74 69 6f 6e 20 28 24 61 2c 20 24 62 29 3a 20 69 6e 74 20 7b 0a 24 61 52 65 | ic.function.($a,.$b):.int.{.$aRe |
ecd00 | 6d 6f 74 65 20 3d 20 30 20 3d 3d 3d 20 73 74 72 70 6f 73 28 24 61 2c 20 27 72 65 6d 6f 74 65 73 | mote.=.0.===.strpos($a,.'remotes |
ecd20 | 2f 27 29 3b 0a 24 62 52 65 6d 6f 74 65 20 3d 20 30 20 3d 3d 3d 20 73 74 72 70 6f 73 28 24 62 2c | /');.$bRemote.=.0.===.strpos($b, |
ecd40 | 20 27 72 65 6d 6f 74 65 73 2f 27 29 3b 0a 0a 69 66 20 28 24 61 52 65 6d 6f 74 65 20 21 3d 3d 20 | .'remotes/');..if.($aRemote.!==. |
ecd60 | 24 62 52 65 6d 6f 74 65 29 20 7b 0a 72 65 74 75 72 6e 20 24 61 52 65 6d 6f 74 65 20 3f 20 31 20 | $bRemote).{.return.$aRemote.?.1. |
ecd80 | 3a 20 2d 31 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 73 74 72 6e 61 74 63 61 73 65 63 6d 70 28 24 62 | :.-1;.}..return.strnatcasecmp($b |
ecda0 | 2c 20 24 61 29 3b 0a 7d 29 3b 0a 0a 24 70 72 6f 6d 69 73 65 73 20 3d 20 5b 5d 3b 0a 24 74 68 69 | ,.$a);.});..$promises.=.[];.$thi |
ecdc0 | 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 73 65 74 4d 61 78 4a 6f 62 73 28 33 30 29 3b 0a 74 72 79 20 | s->process->setMaxJobs(30);.try. |
ecde0 | 7b 0a 66 6f 72 65 61 63 68 20 28 24 62 72 61 6e 63 68 65 73 20 61 73 20 24 63 61 6e 64 69 64 61 | {.foreach.($branches.as.$candida |
ece00 | 74 65 29 20 7b 0a 24 63 61 6e 64 69 64 61 74 65 56 65 72 73 69 6f 6e 20 3d 20 50 72 65 67 3a 3a | te).{.$candidateVersion.=.Preg:: |
ece20 | 72 65 70 6c 61 63 65 28 27 7b 5e 72 65 6d 6f 74 65 73 2f 5c 53 2b 2f 7d 27 2c 20 27 27 2c 20 24 | replace('{^remotes/\S+/}',.'',.$ |
ece40 | 63 61 6e 64 69 64 61 74 65 29 3b 0a 0a 0a 69 66 20 28 24 63 61 6e 64 69 64 61 74 65 20 3d 3d 3d | candidate);...if.($candidate.=== |
ece60 | 20 24 62 72 61 6e 63 68 20 7c 7c 20 24 74 68 69 73 2d 3e 69 73 46 65 61 74 75 72 65 42 72 61 6e | .$branch.||.$this->isFeatureBran |
ece80 | 63 68 28 24 70 61 63 6b 61 67 65 43 6f 6e 66 69 67 2c 20 24 63 61 6e 64 69 64 61 74 65 56 65 72 | ch($packageConfig,.$candidateVer |
ecea0 | 73 69 6f 6e 29 29 20 7b 0a 63 6f 6e 74 69 6e 75 65 3b 0a 7d 0a 0a 24 63 6d 64 4c 69 6e 65 20 3d | sion)).{.continue;.}..$cmdLine.= |
ecec0 | 20 73 74 72 5f 72 65 70 6c 61 63 65 28 5b 27 25 63 61 6e 64 69 64 61 74 65 25 27 2c 20 27 25 62 | .str_replace(['%candidate%',.'%b |
ecee0 | 72 61 6e 63 68 25 27 5d 2c 20 5b 24 63 61 6e 64 69 64 61 74 65 2c 20 24 62 72 61 6e 63 68 5d 2c | ranch%'],.[$candidate,.$branch], |
ecf00 | 20 24 73 63 6d 43 6d 64 6c 69 6e 65 29 3b 0a 24 70 72 6f 6d 69 73 65 73 5b 5d 20 3d 20 24 74 68 | .$scmCmdline);.$promises[].=.$th |
ecf20 | 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 65 78 65 63 75 74 65 41 73 79 6e 63 28 24 63 6d 64 4c 69 | is->process->executeAsync($cmdLi |
ecf40 | 6e 65 2c 20 24 70 61 74 68 29 2d 3e 74 68 65 6e 28 66 75 6e 63 74 69 6f 6e 20 28 50 72 6f 63 65 | ne,.$path)->then(function.(Proce |
ecf60 | 73 73 20 24 70 72 6f 63 65 73 73 29 20 75 73 65 20 28 26 24 6c 65 6e 67 74 68 2c 20 26 24 76 65 | ss.$process).use.(&$length,.&$ve |
ecf80 | 72 73 69 6f 6e 2c 20 26 24 70 72 65 74 74 79 56 65 72 73 69 6f 6e 2c 20 24 63 61 6e 64 69 64 61 | rsion,.&$prettyVersion,.$candida |
ecfa0 | 74 65 56 65 72 73 69 6f 6e 2c 20 26 24 70 72 6f 6d 69 73 65 73 29 3a 20 76 6f 69 64 20 7b 0a 69 | teVersion,.&$promises):.void.{.i |
ecfc0 | 66 20 28 21 24 70 72 6f 63 65 73 73 2d 3e 69 73 53 75 63 63 65 73 73 66 75 6c 28 29 29 20 7b 0a | f.(!$process->isSuccessful()).{. |
ecfe0 | 72 65 74 75 72 6e 3b 0a 7d 0a 0a 24 6f 75 74 70 75 74 20 3d 20 24 70 72 6f 63 65 73 73 2d 3e 67 | return;.}..$output.=.$process->g |
ed000 | 65 74 4f 75 74 70 75 74 28 29 3b 0a 69 66 20 28 73 74 72 6c 65 6e 28 24 6f 75 74 70 75 74 29 20 | etOutput();.if.(strlen($output). |
ed020 | 3c 20 24 6c 65 6e 67 74 68 29 20 7b 0a 24 6c 65 6e 67 74 68 20 3d 20 73 74 72 6c 65 6e 28 24 6f | <.$length).{.$length.=.strlen($o |
ed040 | 75 74 70 75 74 29 3b 0a 24 76 65 72 73 69 6f 6e 20 3d 20 24 74 68 69 73 2d 3e 76 65 72 73 69 6f | utput);.$version.=.$this->versio |
ed060 | 6e 50 61 72 73 65 72 2d 3e 6e 6f 72 6d 61 6c 69 7a 65 42 72 61 6e 63 68 28 24 63 61 6e 64 69 64 | nParser->normalizeBranch($candid |
ed080 | 61 74 65 56 65 72 73 69 6f 6e 29 3b 0a 24 70 72 65 74 74 79 56 65 72 73 69 6f 6e 20 3d 20 27 64 | ateVersion);.$prettyVersion.=.'d |
ed0a0 | 65 76 2d 27 20 2e 20 24 63 61 6e 64 69 64 61 74 65 56 65 72 73 69 6f 6e 3b 0a 69 66 20 28 24 6c | ev-'...$candidateVersion;.if.($l |
ed0c0 | 65 6e 67 74 68 20 3d 3d 3d 20 30 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 70 72 6f 6d 69 73 65 | ength.===.0).{.foreach.($promise |
ed0e0 | 73 20 61 73 20 24 70 72 6f 6d 69 73 65 29 20 7b 0a 69 66 20 28 24 70 72 6f 6d 69 73 65 20 69 6e | s.as.$promise).{.if.($promise.in |
ed100 | 73 74 61 6e 63 65 6f 66 20 43 61 6e 63 65 6c 6c 61 62 6c 65 50 72 6f 6d 69 73 65 49 6e 74 65 72 | stanceof.CancellablePromiseInter |
ed120 | 66 61 63 65 29 20 7b 0a 24 70 72 6f 6d 69 73 65 2d 3e 63 61 6e 63 65 6c 28 29 3b 0a 7d 0a 7d 0a | face).{.$promise->cancel();.}.}. |
ed140 | 7d 0a 7d 0a 7d 29 3b 0a 7d 0a 0a 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 77 61 69 74 28 | }.}.});.}..$this->process->wait( |
ed160 | 29 3b 0a 7d 20 66 69 6e 61 6c 6c 79 20 7b 0a 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 72 | );.}.finally.{.$this->process->r |
ed180 | 65 73 65 74 4d 61 78 4a 6f 62 73 28 29 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 5b 27 76 65 72 | esetMaxJobs();.}.}..return.['ver |
ed1a0 | 73 69 6f 6e 27 20 3d 3e 20 24 76 65 72 73 69 6f 6e 2c 20 27 70 72 65 74 74 79 5f 76 65 72 73 69 | sion'.=>.$version,.'pretty_versi |
ed1c0 | 6f 6e 27 20 3d 3e 20 24 70 72 65 74 74 79 56 65 72 73 69 6f 6e 5d 3b 0a 7d 0a 0a 0a 0a 0a 70 72 | on'.=>.$prettyVersion];.}.....pr |
ed1e0 | 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 69 73 46 65 61 74 75 72 65 42 72 61 6e 63 68 28 61 | ivate.function.isFeatureBranch(a |
ed200 | 72 72 61 79 20 24 70 61 63 6b 61 67 65 43 6f 6e 66 69 67 2c 20 3f 73 74 72 69 6e 67 20 24 62 72 | rray.$packageConfig,.?string.$br |
ed220 | 61 6e 63 68 4e 61 6d 65 29 3a 20 62 6f 6f 6c 0a 7b 0a 24 6e 6f 6e 46 65 61 74 75 72 65 42 72 61 | anchName):.bool.{.$nonFeatureBra |
ed240 | 6e 63 68 65 73 20 3d 20 27 27 3b 0a 69 66 20 28 21 65 6d 70 74 79 28 24 70 61 63 6b 61 67 65 43 | nches.=.'';.if.(!empty($packageC |
ed260 | 6f 6e 66 69 67 5b 27 6e 6f 6e 2d 66 65 61 74 75 72 65 2d 62 72 61 6e 63 68 65 73 27 5d 29 29 20 | onfig['non-feature-branches'])). |
ed280 | 7b 0a 24 6e 6f 6e 46 65 61 74 75 72 65 42 72 61 6e 63 68 65 73 20 3d 20 69 6d 70 6c 6f 64 65 28 | {.$nonFeatureBranches.=.implode( |
ed2a0 | 27 7c 27 2c 20 24 70 61 63 6b 61 67 65 43 6f 6e 66 69 67 5b 27 6e 6f 6e 2d 66 65 61 74 75 72 65 | '|',.$packageConfig['non-feature |
ed2c0 | 2d 62 72 61 6e 63 68 65 73 27 5d 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 21 50 72 65 67 3a 3a 69 | -branches']);.}..return.!Preg::i |
ed2e0 | 73 4d 61 74 63 68 28 27 7b 5e 28 27 20 2e 20 24 6e 6f 6e 46 65 61 74 75 72 65 42 72 61 6e 63 68 | sMatch('{^('...$nonFeatureBranch |
ed300 | 65 73 20 2e 20 27 7c 6d 61 73 74 65 72 7c 6d 61 69 6e 7c 6c 61 74 65 73 74 7c 6e 65 78 74 7c 63 | es...'|master|main|latest|next|c |
ed320 | 75 72 72 65 6e 74 7c 73 75 70 70 6f 72 74 7c 74 69 70 7c 74 72 75 6e 6b 7c 64 65 66 61 75 6c 74 | urrent|support|tip|trunk|default |
ed340 | 7c 64 65 76 65 6c 6f 70 7c 5c 64 2b 5c 2e 2e 2b 29 24 7d 27 2c 20 24 62 72 61 6e 63 68 4e 61 6d | |develop|\d+\..+)$}',.$branchNam |
ed360 | 65 2c 20 24 6d 61 74 63 68 29 3b 0a 7d 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 | e,.$match);.}.....private.functi |
ed380 | 6f 6e 20 67 75 65 73 73 46 6f 73 73 69 6c 56 65 72 73 69 6f 6e 28 73 74 72 69 6e 67 20 24 70 61 | on.guessFossilVersion(string.$pa |
ed3a0 | 74 68 29 3a 20 61 72 72 61 79 0a 7b 0a 24 76 65 72 73 69 6f 6e 20 3d 20 6e 75 6c 6c 3b 0a 24 70 | th):.array.{.$version.=.null;.$p |
ed3c0 | 72 65 74 74 79 56 65 72 73 69 6f 6e 20 3d 20 6e 75 6c 6c 3b 0a 0a 0a 69 66 20 28 30 20 3d 3d 3d | rettyVersion.=.null;...if.(0.=== |
ed3e0 | 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 65 78 65 63 75 74 65 28 27 66 6f 73 73 69 6c | .$this->process->execute('fossil |
ed400 | 20 62 72 61 6e 63 68 20 6c 69 73 74 27 2c 20 24 6f 75 74 70 75 74 2c 20 24 70 61 74 68 29 29 20 | .branch.list',.$output,.$path)). |
ed420 | 7b 0a 24 62 72 61 6e 63 68 20 3d 20 74 72 69 6d 28 24 6f 75 74 70 75 74 29 3b 0a 24 76 65 72 73 | {.$branch.=.trim($output);.$vers |
ed440 | 69 6f 6e 20 3d 20 24 74 68 69 73 2d 3e 76 65 72 73 69 6f 6e 50 61 72 73 65 72 2d 3e 6e 6f 72 6d | ion.=.$this->versionParser->norm |
ed460 | 61 6c 69 7a 65 42 72 61 6e 63 68 28 24 62 72 61 6e 63 68 29 3b 0a 24 70 72 65 74 74 79 56 65 72 | alizeBranch($branch);.$prettyVer |
ed480 | 73 69 6f 6e 20 3d 20 27 64 65 76 2d 27 20 2e 20 24 62 72 61 6e 63 68 3b 0a 7d 0a 0a 0a 69 66 20 | sion.=.'dev-'...$branch;.}...if. |
ed4a0 | 28 30 20 3d 3d 3d 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d 3e 65 78 65 63 75 74 65 28 27 | (0.===.$this->process->execute(' |
ed4c0 | 66 6f 73 73 69 6c 20 74 61 67 20 6c 69 73 74 27 2c 20 24 6f 75 74 70 75 74 2c 20 24 70 61 74 68 | fossil.tag.list',.$output,.$path |
ed4e0 | 29 29 20 7b 0a 74 72 79 20 7b 0a 24 76 65 72 73 69 6f 6e 20 3d 20 24 74 68 69 73 2d 3e 76 65 72 | )).{.try.{.$version.=.$this->ver |
ed500 | 73 69 6f 6e 50 61 72 73 65 72 2d 3e 6e 6f 72 6d 61 6c 69 7a 65 28 74 72 69 6d 28 24 6f 75 74 70 | sionParser->normalize(trim($outp |
ed520 | 75 74 29 29 3b 0a 24 70 72 65 74 74 79 56 65 72 73 69 6f 6e 20 3d 20 74 72 69 6d 28 24 6f 75 74 | ut));.$prettyVersion.=.trim($out |
ed540 | 70 75 74 29 3b 0a 7d 20 63 61 74 63 68 20 28 5c 45 78 63 65 70 74 69 6f 6e 20 24 65 29 20 7b 0a | put);.}.catch.(\Exception.$e).{. |
ed560 | 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 5b 27 76 65 72 73 69 6f 6e 27 20 3d 3e 20 24 76 65 72 73 69 | }.}..return.['version'.=>.$versi |
ed580 | 6f 6e 2c 20 27 63 6f 6d 6d 69 74 27 20 3d 3e 20 27 27 2c 20 27 70 72 65 74 74 79 5f 76 65 72 73 | on,.'commit'.=>.'',.'pretty_vers |
ed5a0 | 69 6f 6e 27 20 3d 3e 20 24 70 72 65 74 74 79 56 65 72 73 69 6f 6e 5d 3b 0a 7d 0a 0a 0a 0a 0a 0a | ion'.=>.$prettyVersion];.}...... |
ed5c0 | 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 67 75 65 73 73 53 76 6e 56 65 72 73 69 6f | .private.function.guessSvnVersio |
ed5e0 | 6e 28 61 72 72 61 79 20 24 70 61 63 6b 61 67 65 43 6f 6e 66 69 67 2c 20 73 74 72 69 6e 67 20 24 | n(array.$packageConfig,.string.$ |
ed600 | 70 61 74 68 29 3a 20 3f 61 72 72 61 79 0a 7b 0a 53 76 6e 55 74 69 6c 3a 3a 63 6c 65 61 6e 45 6e | path):.?array.{.SvnUtil::cleanEn |
ed620 | 76 28 29 3b 0a 0a 0a 69 66 20 28 30 20 3d 3d 3d 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 2d | v();...if.(0.===.$this->process- |
ed640 | 3e 65 78 65 63 75 74 65 28 27 73 76 6e 20 69 6e 66 6f 20 2d 2d 78 6d 6c 27 2c 20 24 6f 75 74 70 | >execute('svn.info.--xml',.$outp |
ed660 | 75 74 2c 20 24 70 61 74 68 29 29 20 7b 0a 24 74 72 75 6e 6b 50 61 74 68 20 3d 20 69 73 73 65 74 | ut,.$path)).{.$trunkPath.=.isset |
ed680 | 28 24 70 61 63 6b 61 67 65 43 6f 6e 66 69 67 5b 27 74 72 75 6e 6b 2d 70 61 74 68 27 5d 29 20 3f | ($packageConfig['trunk-path']).? |
ed6a0 | 20 70 72 65 67 5f 71 75 6f 74 65 28 24 70 61 63 6b 61 67 65 43 6f 6e 66 69 67 5b 27 74 72 75 6e | .preg_quote($packageConfig['trun |
ed6c0 | 6b 2d 70 61 74 68 27 5d 2c 20 27 23 27 29 20 3a 20 27 74 72 75 6e 6b 27 3b 0a 24 62 72 61 6e 63 | k-path'],.'#').:.'trunk';.$branc |
ed6e0 | 68 65 73 50 61 74 68 20 3d 20 69 73 73 65 74 28 24 70 61 63 6b 61 67 65 43 6f 6e 66 69 67 5b 27 | hesPath.=.isset($packageConfig[' |
ed700 | 62 72 61 6e 63 68 65 73 2d 70 61 74 68 27 5d 29 20 3f 20 70 72 65 67 5f 71 75 6f 74 65 28 24 70 | branches-path']).?.preg_quote($p |
ed720 | 61 63 6b 61 67 65 43 6f 6e 66 69 67 5b 27 62 72 61 6e 63 68 65 73 2d 70 61 74 68 27 5d 2c 20 27 | ackageConfig['branches-path'],.' |
ed740 | 23 27 29 20 3a 20 27 62 72 61 6e 63 68 65 73 27 3b 0a 24 74 61 67 73 50 61 74 68 20 3d 20 69 73 | #').:.'branches';.$tagsPath.=.is |
ed760 | 73 65 74 28 24 70 61 63 6b 61 67 65 43 6f 6e 66 69 67 5b 27 74 61 67 73 2d 70 61 74 68 27 5d 29 | set($packageConfig['tags-path']) |
ed780 | 20 3f 20 70 72 65 67 5f 71 75 6f 74 65 28 24 70 61 63 6b 61 67 65 43 6f 6e 66 69 67 5b 27 74 61 | .?.preg_quote($packageConfig['ta |
ed7a0 | 67 73 2d 70 61 74 68 27 5d 2c 20 27 23 27 29 20 3a 20 27 74 61 67 73 27 3b 0a 0a 24 75 72 6c 50 | gs-path'],.'#').:.'tags';..$urlP |
ed7c0 | 61 74 74 65 72 6e 20 3d 20 27 23 3c 75 72 6c 3e 2e 2a 2f 28 27 20 2e 20 24 74 72 75 6e 6b 50 61 | attern.=.'#<url>.*/('...$trunkPa |
ed7e0 | 74 68 20 2e 20 27 7c 28 27 20 2e 20 24 62 72 61 6e 63 68 65 73 50 61 74 68 20 2e 20 27 7c 27 20 | th...'|('...$branchesPath...'|'. |
ed800 | 2e 20 24 74 61 67 73 50 61 74 68 20 2e 20 27 29 2f 28 2e 2a 29 29 3c 2f 75 72 6c 3e 23 27 3b 0a | ..$tagsPath...')/(.*))</url>#';. |
ed820 | 0a 69 66 20 28 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 24 75 72 6c 50 61 74 74 65 72 6e 2c 20 | .if.(Preg::isMatch($urlPattern,. |
ed840 | 24 6f 75 74 70 75 74 2c 20 24 6d 61 74 63 68 65 73 29 29 20 7b 0a 69 66 20 28 69 73 73 65 74 28 | $output,.$matches)).{.if.(isset( |
ed860 | 24 6d 61 74 63 68 65 73 5b 32 5d 29 20 26 26 20 28 24 62 72 61 6e 63 68 65 73 50 61 74 68 20 3d | $matches[2]).&&.($branchesPath.= |
ed880 | 3d 3d 20 24 6d 61 74 63 68 65 73 5b 32 5d 20 7c 7c 20 24 74 61 67 73 50 61 74 68 20 3d 3d 3d 20 | ==.$matches[2].||.$tagsPath.===. |
ed8a0 | 24 6d 61 74 63 68 65 73 5b 32 5d 29 29 20 7b 0a 0a 24 76 65 72 73 69 6f 6e 20 3d 20 24 74 68 69 | $matches[2])).{..$version.=.$thi |
ed8c0 | 73 2d 3e 76 65 72 73 69 6f 6e 50 61 72 73 65 72 2d 3e 6e 6f 72 6d 61 6c 69 7a 65 42 72 61 6e 63 | s->versionParser->normalizeBranc |
ed8e0 | 68 28 24 6d 61 74 63 68 65 73 5b 33 5d 29 3b 0a 24 70 72 65 74 74 79 56 65 72 73 69 6f 6e 20 3d | h($matches[3]);.$prettyVersion.= |
ed900 | 20 27 64 65 76 2d 27 20 2e 20 24 6d 61 74 63 68 65 73 5b 33 5d 3b 0a 0a 72 65 74 75 72 6e 20 5b | .'dev-'...$matches[3];..return.[ |
ed920 | 27 76 65 72 73 69 6f 6e 27 20 3d 3e 20 24 76 65 72 73 69 6f 6e 2c 20 27 63 6f 6d 6d 69 74 27 20 | 'version'.=>.$version,.'commit'. |
ed940 | 3d 3e 20 27 27 2c 20 27 70 72 65 74 74 79 5f 76 65 72 73 69 6f 6e 27 20 3d 3e 20 24 70 72 65 74 | =>.'',.'pretty_version'.=>.$pret |
ed960 | 74 79 56 65 72 73 69 6f 6e 5d 3b 0a 7d 0a 0a 24 70 72 65 74 74 79 56 65 72 73 69 6f 6e 20 3d 20 | tyVersion];.}..$prettyVersion.=. |
ed980 | 74 72 69 6d 28 24 6d 61 74 63 68 65 73 5b 31 5d 29 3b 0a 69 66 20 28 24 70 72 65 74 74 79 56 65 | trim($matches[1]);.if.($prettyVe |
ed9a0 | 72 73 69 6f 6e 20 3d 3d 3d 20 27 74 72 75 6e 6b 27 29 20 7b 0a 24 76 65 72 73 69 6f 6e 20 3d 20 | rsion.===.'trunk').{.$version.=. |
ed9c0 | 27 64 65 76 2d 74 72 75 6e 6b 27 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 76 65 72 73 69 6f 6e 20 3d | 'dev-trunk';.}.else.{.$version.= |
ed9e0 | 20 24 74 68 69 73 2d 3e 76 65 72 73 69 6f 6e 50 61 72 73 65 72 2d 3e 6e 6f 72 6d 61 6c 69 7a 65 | .$this->versionParser->normalize |
eda00 | 28 24 70 72 65 74 74 79 56 65 72 73 69 6f 6e 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 5b 27 76 65 | ($prettyVersion);.}..return.['ve |
eda20 | 72 73 69 6f 6e 27 20 3d 3e 20 24 76 65 72 73 69 6f 6e 2c 20 27 63 6f 6d 6d 69 74 27 20 3d 3e 20 | rsion'.=>.$version,.'commit'.=>. |
eda40 | 27 27 2c 20 27 70 72 65 74 74 79 5f 76 65 72 73 69 6f 6e 27 20 3d 3e 20 24 70 72 65 74 74 79 56 | '',.'pretty_version'.=>.$prettyV |
eda60 | 65 72 73 69 6f 6e 5d 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0a 7d 0a 7d 0a 3c | ersion];.}.}..return.null;.}.}.< |
eda80 | 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a | ?php.declare(strict_types=1);... |
edaa0 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b | .........namespace.Composer\Pack |
edac0 | 61 67 65 5c 56 65 72 73 69 6f 6e 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 63 72 65 5c | age\Version;..use.Composer\Pcre\ |
edae0 | 50 72 65 67 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 50 6c | Preg;.use.Composer\Repository\Pl |
edb00 | 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 | atformRepository;.use.Composer\S |
edb20 | 65 6d 76 65 72 5c 56 65 72 73 69 6f 6e 50 61 72 73 65 72 20 61 73 20 53 65 6d 76 65 72 56 65 72 | emver\VersionParser.as.SemverVer |
edb40 | 73 69 6f 6e 50 61 72 73 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 65 6d 76 65 72 5c | sionParser;.use.Composer\Semver\ |
edb60 | 53 65 6d 76 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 65 6d 76 65 72 5c 43 6f 6e 73 | Semver;.use.Composer\Semver\Cons |
edb80 | 74 72 61 69 6e 74 5c 43 6f 6e 73 74 72 61 69 6e 74 49 6e 74 65 72 66 61 63 65 3b 0a 0a 63 6c 61 | traint\ConstraintInterface;..cla |
edba0 | 73 73 20 56 65 72 73 69 6f 6e 50 61 72 73 65 72 20 65 78 74 65 6e 64 73 20 53 65 6d 76 65 72 56 | ss.VersionParser.extends.SemverV |
edbc0 | 65 72 73 69 6f 6e 50 61 72 73 65 72 0a 7b 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 44 45 46 41 | ersionParser.{.public.const.DEFA |
edbe0 | 55 4c 54 5f 42 52 41 4e 43 48 5f 41 4c 49 41 53 20 3d 20 27 39 39 39 39 39 39 39 2d 64 65 76 27 | ULT_BRANCH_ALIAS.=.'9999999-dev' |
edc00 | 3b 0a 0a 0a 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 24 63 6f 6e 73 74 72 61 69 6e 74 73 20 | ;...private.static.$constraints. |
edc20 | 3d 20 5b 5d 3b 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 70 61 72 73 65 43 | =.[];.....public.function.parseC |
edc40 | 6f 6e 73 74 72 61 69 6e 74 73 28 24 63 6f 6e 73 74 72 61 69 6e 74 73 29 3a 20 43 6f 6e 73 74 72 | onstraints($constraints):.Constr |
edc60 | 61 69 6e 74 49 6e 74 65 72 66 61 63 65 0a 7b 0a 69 66 20 28 21 69 73 73 65 74 28 73 65 6c 66 3a | aintInterface.{.if.(!isset(self: |
edc80 | 3a 24 63 6f 6e 73 74 72 61 69 6e 74 73 5b 24 63 6f 6e 73 74 72 61 69 6e 74 73 5d 29 29 20 7b 0a | :$constraints[$constraints])).{. |
edca0 | 73 65 6c 66 3a 3a 24 63 6f 6e 73 74 72 61 69 6e 74 73 5b 24 63 6f 6e 73 74 72 61 69 6e 74 73 5d | self::$constraints[$constraints] |
edcc0 | 20 3d 20 70 61 72 65 6e 74 3a 3a 70 61 72 73 65 43 6f 6e 73 74 72 61 69 6e 74 73 28 24 63 6f 6e | .=.parent::parseConstraints($con |
edce0 | 73 74 72 61 69 6e 74 73 29 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 73 65 6c 66 3a 3a 24 63 6f 6e 73 | straints);.}..return.self::$cons |
edd00 | 74 72 61 69 6e 74 73 5b 24 63 6f 6e 73 74 72 61 69 6e 74 73 5d 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a | traints[$constraints];.}........ |
edd20 | 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 70 61 72 73 65 4e 61 6d 65 56 65 72 | ....public.function.parseNameVer |
edd40 | 73 69 6f 6e 50 61 69 72 73 28 61 72 72 61 79 20 24 70 61 69 72 73 29 3a 20 61 72 72 61 79 0a 7b | sionPairs(array.$pairs):.array.{ |
edd60 | 0a 24 70 61 69 72 73 20 3d 20 61 72 72 61 79 5f 76 61 6c 75 65 73 28 24 70 61 69 72 73 29 3b 0a | .$pairs.=.array_values($pairs);. |
edd80 | 24 72 65 73 75 6c 74 20 3d 20 5b 5d 3b 0a 0a 66 6f 72 20 28 24 69 20 3d 20 30 2c 20 24 63 6f 75 | $result.=.[];..for.($i.=.0,.$cou |
edda0 | 6e 74 20 3d 20 63 6f 75 6e 74 28 24 70 61 69 72 73 29 3b 20 24 69 20 3c 20 24 63 6f 75 6e 74 3b | nt.=.count($pairs);.$i.<.$count; |
eddc0 | 20 24 69 2b 2b 29 20 7b 0a 24 70 61 69 72 20 3d 20 50 72 65 67 3a 3a 72 65 70 6c 61 63 65 28 27 | .$i++).{.$pair.=.Preg::replace(' |
edde0 | 7b 5e 28 5b 5e 3d 3a 20 5d 2b 29 5b 3d 3a 20 5d 28 2e 2a 29 24 7d 27 2c 20 27 24 31 20 24 32 27 | {^([^=:.]+)[=:.](.*)$}',.'$1.$2' |
ede00 | 2c 20 74 72 69 6d 28 24 70 61 69 72 73 5b 24 69 5d 29 29 3b 0a 69 66 20 28 66 61 6c 73 65 20 3d | ,.trim($pairs[$i]));.if.(false.= |
ede20 | 3d 3d 20 73 74 72 70 6f 73 28 24 70 61 69 72 2c 20 27 20 27 29 20 26 26 20 69 73 73 65 74 28 24 | ==.strpos($pair,.'.').&&.isset($ |
ede40 | 70 61 69 72 73 5b 24 69 20 2b 20 31 5d 29 20 26 26 20 66 61 6c 73 65 20 3d 3d 3d 20 73 74 72 70 | pairs[$i.+.1]).&&.false.===.strp |
ede60 | 6f 73 28 24 70 61 69 72 73 5b 24 69 20 2b 20 31 5d 2c 20 27 2f 27 29 20 26 26 20 21 50 72 65 67 | os($pairs[$i.+.1],.'/').&&.!Preg |
ede80 | 3a 3a 69 73 4d 61 74 63 68 28 27 7b 28 3f 3c 3d 5b 61 2d 7a 30 2d 39 5f 2f 2d 5d 29 5c 2a 7c 5c | ::isMatch('{(?<=[a-z0-9_/-])\*|\ |
edea0 | 2a 28 3f 3d 5b 61 2d 7a 30 2d 39 5f 2f 2d 5d 29 7d 69 27 2c 20 24 70 61 69 72 73 5b 24 69 20 2b | *(?=[a-z0-9_/-])}i',.$pairs[$i.+ |
edec0 | 20 31 5d 29 20 26 26 20 21 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 3a 3a 69 73 50 | .1]).&&.!PlatformRepository::isP |
edee0 | 6c 61 74 66 6f 72 6d 50 61 63 6b 61 67 65 28 24 70 61 69 72 73 5b 24 69 20 2b 20 31 5d 29 29 20 | latformPackage($pairs[$i.+.1])). |
edf00 | 7b 0a 24 70 61 69 72 20 2e 3d 20 27 20 27 2e 24 70 61 69 72 73 5b 24 69 20 2b 20 31 5d 3b 0a 24 | {.$pair..=.'.'.$pairs[$i.+.1];.$ |
edf20 | 69 2b 2b 3b 0a 7d 0a 0a 69 66 20 28 73 74 72 70 6f 73 28 24 70 61 69 72 2c 20 27 20 27 29 29 20 | i++;.}..if.(strpos($pair,.'.')). |
edf40 | 7b 0a 5b 24 6e 61 6d 65 2c 20 24 76 65 72 73 69 6f 6e 5d 20 3d 20 65 78 70 6c 6f 64 65 28 27 20 | {.[$name,.$version].=.explode('. |
edf60 | 27 2c 20 24 70 61 69 72 2c 20 32 29 3b 0a 24 72 65 73 75 6c 74 5b 5d 20 3d 20 5b 27 6e 61 6d 65 | ',.$pair,.2);.$result[].=.['name |
edf80 | 27 20 3d 3e 20 24 6e 61 6d 65 2c 20 27 76 65 72 73 69 6f 6e 27 20 3d 3e 20 24 76 65 72 73 69 6f | '.=>.$name,.'version'.=>.$versio |
edfa0 | 6e 5d 3b 0a 7d 20 65 6c 73 65 20 7b 0a 24 72 65 73 75 6c 74 5b 5d 20 3d 20 5b 27 6e 61 6d 65 27 | n];.}.else.{.$result[].=.['name' |
edfc0 | 20 3d 3e 20 24 70 61 69 72 5d 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 72 65 73 75 6c 74 3b | .=>.$pair];.}.}..return.$result; |
edfe0 | 0a 7d 0a 0a 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 69 73 55 70 67 | .}..public.static.function.isUpg |
ee000 | 72 61 64 65 28 73 74 72 69 6e 67 20 24 6e 6f 72 6d 61 6c 69 7a 65 64 46 72 6f 6d 2c 20 73 74 72 | rade(string.$normalizedFrom,.str |
ee020 | 69 6e 67 20 24 6e 6f 72 6d 61 6c 69 7a 65 64 54 6f 29 3a 20 62 6f 6f 6c 0a 7b 0a 69 66 20 28 24 | ing.$normalizedTo):.bool.{.if.($ |
ee040 | 6e 6f 72 6d 61 6c 69 7a 65 64 46 72 6f 6d 20 3d 3d 3d 20 24 6e 6f 72 6d 61 6c 69 7a 65 64 54 6f | normalizedFrom.===.$normalizedTo |
ee060 | 29 20 7b 0a 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 0a 69 66 20 28 69 6e 5f 61 72 72 61 79 | ).{.return.true;.}..if.(in_array |
ee080 | 28 24 6e 6f 72 6d 61 6c 69 7a 65 64 46 72 6f 6d 2c 20 5b 27 64 65 76 2d 6d 61 73 74 65 72 27 2c | ($normalizedFrom,.['dev-master', |
ee0a0 | 20 27 64 65 76 2d 74 72 75 6e 6b 27 2c 20 27 64 65 76 2d 64 65 66 61 75 6c 74 27 5d 2c 20 74 72 | .'dev-trunk',.'dev-default'],.tr |
ee0c0 | 75 65 29 29 20 7b 0a 24 6e 6f 72 6d 61 6c 69 7a 65 64 46 72 6f 6d 20 3d 20 56 65 72 73 69 6f 6e | ue)).{.$normalizedFrom.=.Version |
ee0e0 | 50 61 72 73 65 72 3a 3a 44 45 46 41 55 4c 54 5f 42 52 41 4e 43 48 5f 41 4c 49 41 53 3b 0a 7d 0a | Parser::DEFAULT_BRANCH_ALIAS;.}. |
ee100 | 69 66 20 28 69 6e 5f 61 72 72 61 79 28 24 6e 6f 72 6d 61 6c 69 7a 65 64 54 6f 2c 20 5b 27 64 65 | if.(in_array($normalizedTo,.['de |
ee120 | 76 2d 6d 61 73 74 65 72 27 2c 20 27 64 65 76 2d 74 72 75 6e 6b 27 2c 20 27 64 65 76 2d 64 65 66 | v-master',.'dev-trunk',.'dev-def |
ee140 | 61 75 6c 74 27 5d 2c 20 74 72 75 65 29 29 20 7b 0a 24 6e 6f 72 6d 61 6c 69 7a 65 64 54 6f 20 3d | ault'],.true)).{.$normalizedTo.= |
ee160 | 20 56 65 72 73 69 6f 6e 50 61 72 73 65 72 3a 3a 44 45 46 41 55 4c 54 5f 42 52 41 4e 43 48 5f 41 | .VersionParser::DEFAULT_BRANCH_A |
ee180 | 4c 49 41 53 3b 0a 7d 0a 0a 69 66 20 28 73 74 72 70 6f 73 28 24 6e 6f 72 6d 61 6c 69 7a 65 64 46 | LIAS;.}..if.(strpos($normalizedF |
ee1a0 | 72 6f 6d 2c 20 27 64 65 76 2d 27 29 20 3d 3d 3d 20 30 20 7c 7c 20 73 74 72 70 6f 73 28 24 6e 6f | rom,.'dev-').===.0.||.strpos($no |
ee1c0 | 72 6d 61 6c 69 7a 65 64 54 6f 2c 20 27 64 65 76 2d 27 29 20 3d 3d 3d 20 30 29 20 7b 0a 72 65 74 | rmalizedTo,.'dev-').===.0).{.ret |
ee1e0 | 75 72 6e 20 74 72 75 65 3b 0a 7d 0a 0a 24 73 6f 72 74 65 64 20 3d 20 53 65 6d 76 65 72 3a 3a 73 | urn.true;.}..$sorted.=.Semver::s |
ee200 | 6f 72 74 28 5b 24 6e 6f 72 6d 61 6c 69 7a 65 64 54 6f 2c 20 24 6e 6f 72 6d 61 6c 69 7a 65 64 46 | ort([$normalizedTo,.$normalizedF |
ee220 | 72 6f 6d 5d 29 3b 0a 0a 72 65 74 75 72 6e 20 24 73 6f 72 74 65 64 5b 30 5d 20 3d 3d 3d 20 24 6e | rom]);..return.$sorted[0].===.$n |
ee240 | 6f 72 6d 61 6c 69 7a 65 64 46 72 6f 6d 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 | ormalizedFrom;.}.}.<?php.declare |
ee260 | 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d | (strict_types=1);............nam |
ee280 | 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 56 65 72 73 69 6f 6e 3b | espace.Composer\Package\Version; |
ee2a0 | 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 46 69 6c 74 65 72 5c 50 6c 61 74 66 6f 72 6d 52 65 | ..use.Composer\Filter\PlatformRe |
ee2c0 | 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 5c 49 67 6e 6f 72 65 41 6c 6c 50 6c 61 74 66 6f 72 | quirementFilter\IgnoreAllPlatfor |
ee2e0 | 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 | mRequirementFilter;.use.Composer |
ee300 | 5c 46 69 6c 74 65 72 5c 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 | \Filter\PlatformRequirementFilte |
ee320 | 72 5c 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 46 61 63 74 6f | r\PlatformRequirementFilterFacto |
ee340 | 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 46 69 6c 74 65 72 5c 50 6c 61 74 66 6f 72 6d | ry;.use.Composer\Filter\Platform |
ee360 | 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 5c 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 | RequirementFilter\PlatformRequir |
ee380 | 65 6d 65 6e 74 46 69 6c 74 65 72 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 | ementFilterInterface;.use.Compos |
ee3a0 | 65 72 5c 49 4f 5c 49 4f 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c | er\IO\IOInterface;.use.Composer\ |
ee3c0 | 50 61 63 6b 61 67 65 5c 42 61 73 65 50 61 63 6b 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 | Package\BasePackage;.use.Compose |
ee3e0 | 72 5c 50 61 63 6b 61 67 65 5c 41 6c 69 61 73 50 61 63 6b 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 | r\Package\AliasPackage;.use.Comp |
ee400 | 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 | oser\Package\PackageInterface;.u |
ee420 | 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6d 70 6f 73 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 | se.Composer\Composer;.use.Compos |
ee440 | 65 72 5c 50 61 63 6b 61 67 65 5c 4c 6f 61 64 65 72 5c 41 72 72 61 79 4c 6f 61 64 65 72 3b 0a 75 | er\Package\Loader\ArrayLoader;.u |
ee460 | 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 44 75 6d 70 65 72 5c 41 72 72 61 79 | se.Composer\Package\Dumper\Array |
ee480 | 44 75 6d 70 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 63 72 65 5c 50 72 65 67 3b 0a | Dumper;.use.Composer\Pcre\Preg;. |
ee4a0 | 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 52 65 70 6f 73 69 74 6f | use.Composer\Repository\Reposito |
ee4c0 | 72 79 53 65 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 50 | rySet;.use.Composer\Repository\P |
ee4e0 | 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c | latformRepository;.use.Composer\ |
ee500 | 53 65 6d 76 65 72 5c 43 6f 6e 73 74 72 61 69 6e 74 5c 43 6f 6e 73 74 72 61 69 6e 74 3b 0a 75 73 | Semver\Constraint\Constraint;.us |
ee520 | 65 20 43 6f 6d 70 6f 73 65 72 5c 53 65 6d 76 65 72 5c 43 6f 6e 73 74 72 61 69 6e 74 5c 43 6f 6e | e.Composer\Semver\Constraint\Con |
ee540 | 73 74 72 61 69 6e 74 49 6e 74 65 72 66 61 63 65 3b 0a 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 56 | straintInterface;........class.V |
ee560 | 65 72 73 69 6f 6e 53 65 6c 65 63 74 6f 72 0a 7b 0a 0a 70 72 69 76 61 74 65 20 24 72 65 70 6f 73 | ersionSelector.{..private.$repos |
ee580 | 69 74 6f 72 79 53 65 74 3b 0a 0a 0a 70 72 69 76 61 74 65 20 24 70 6c 61 74 66 6f 72 6d 43 6f 6e | itorySet;...private.$platformCon |
ee5a0 | 73 74 72 61 69 6e 74 73 20 3d 20 5b 5d 3b 0a 0a 0a 70 72 69 76 61 74 65 20 24 70 61 72 73 65 72 | straints.=.[];...private.$parser |
ee5c0 | 3b 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 | ;.....public.function.__construc |
ee5e0 | 74 28 52 65 70 6f 73 69 74 6f 72 79 53 65 74 20 24 72 65 70 6f 73 69 74 6f 72 79 53 65 74 2c 20 | t(RepositorySet.$repositorySet,. |
ee600 | 3f 50 6c 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 20 24 70 6c 61 74 66 6f 72 6d 52 65 70 | ?PlatformRepository.$platformRep |
ee620 | 6f 20 3d 20 6e 75 6c 6c 29 0a 7b 0a 24 74 68 69 73 2d 3e 72 65 70 6f 73 69 74 6f 72 79 53 65 74 | o.=.null).{.$this->repositorySet |
ee640 | 20 3d 20 24 72 65 70 6f 73 69 74 6f 72 79 53 65 74 3b 0a 69 66 20 28 24 70 6c 61 74 66 6f 72 6d | .=.$repositorySet;.if.($platform |
ee660 | 52 65 70 6f 29 20 7b 0a 66 6f 72 65 61 63 68 20 28 24 70 6c 61 74 66 6f 72 6d 52 65 70 6f 2d 3e | Repo).{.foreach.($platformRepo-> |
ee680 | 67 65 74 50 61 63 6b 61 67 65 73 28 29 20 61 73 20 24 70 61 63 6b 61 67 65 29 20 7b 0a 24 74 68 | getPackages().as.$package).{.$th |
ee6a0 | 69 73 2d 3e 70 6c 61 74 66 6f 72 6d 43 6f 6e 73 74 72 61 69 6e 74 73 5b 24 70 61 63 6b 61 67 65 | is->platformConstraints[$package |
ee6c0 | 2d 3e 67 65 74 4e 61 6d 65 28 29 5d 5b 5d 20 3d 20 6e 65 77 20 43 6f 6e 73 74 72 61 69 6e 74 28 | ->getName()][].=.new.Constraint( |
ee6e0 | 27 3d 3d 27 2c 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 29 3b 0a 7d | '==',.$package->getVersion());.} |
ee700 | 0a 7d 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 66 | .}.}...........public.function.f |
ee720 | 69 6e 64 42 65 73 74 43 61 6e 64 69 64 61 74 65 28 73 74 72 69 6e 67 20 24 70 61 63 6b 61 67 65 | indBestCandidate(string.$package |
ee740 | 4e 61 6d 65 2c 20 3f 73 74 72 69 6e 67 20 24 74 61 72 67 65 74 50 61 63 6b 61 67 65 56 65 72 73 | Name,.?string.$targetPackageVers |
ee760 | 69 6f 6e 20 3d 20 6e 75 6c 6c 2c 20 73 74 72 69 6e 67 20 24 70 72 65 66 65 72 72 65 64 53 74 61 | ion.=.null,.string.$preferredSta |
ee780 | 62 69 6c 69 74 79 20 3d 20 27 73 74 61 62 6c 65 27 2c 20 24 70 6c 61 74 66 6f 72 6d 52 65 71 75 | bility.=.'stable',.$platformRequ |
ee7a0 | 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 20 3d 20 6e 75 6c 6c 2c 20 69 6e 74 20 24 72 65 70 6f 53 | irementFilter.=.null,.int.$repoS |
ee7c0 | 65 74 46 6c 61 67 73 20 3d 20 30 2c 20 3f 49 4f 49 6e 74 65 72 66 61 63 65 20 24 69 6f 20 3d 20 | etFlags.=.0,.?IOInterface.$io.=. |
ee7e0 | 6e 75 6c 6c 29 0a 7b 0a 69 66 20 28 21 69 73 73 65 74 28 42 61 73 65 50 61 63 6b 61 67 65 3a 3a | null).{.if.(!isset(BasePackage:: |
ee800 | 24 73 74 61 62 69 6c 69 74 69 65 73 5b 24 70 72 65 66 65 72 72 65 64 53 74 61 62 69 6c 69 74 79 | $stabilities[$preferredStability |
ee820 | 5d 29 29 20 7b 0a 0a 74 68 72 6f 77 20 6e 65 77 20 5c 55 6e 65 78 70 65 63 74 65 64 56 61 6c 75 | ])).{..throw.new.\UnexpectedValu |
ee840 | 65 45 78 63 65 70 74 69 6f 6e 28 27 45 78 70 65 63 74 65 64 20 61 20 76 61 6c 69 64 20 73 74 61 | eException('Expected.a.valid.sta |
ee860 | 62 69 6c 69 74 79 20 6e 61 6d 65 20 61 73 20 33 72 64 20 61 72 67 75 6d 65 6e 74 2c 20 67 6f 74 | bility.name.as.3rd.argument,.got |
ee880 | 20 27 2e 24 70 72 65 66 65 72 72 65 64 53 74 61 62 69 6c 69 74 79 29 3b 0a 7d 0a 0a 69 66 20 28 | .'.$preferredStability);.}..if.( |
ee8a0 | 6e 75 6c 6c 20 3d 3d 3d 20 24 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c | null.===.$platformRequirementFil |
ee8c0 | 74 65 72 29 20 7b 0a 24 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 | ter).{.$platformRequirementFilte |
ee8e0 | 72 20 3d 20 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 46 61 63 | r.=.PlatformRequirementFilterFac |
ee900 | 74 6f 72 79 3a 3a 69 67 6e 6f 72 65 4e 6f 74 68 69 6e 67 28 29 3b 0a 7d 20 65 6c 73 65 69 66 20 | tory::ignoreNothing();.}.elseif. |
ee920 | 28 21 28 24 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 20 69 6e | (!($platformRequirementFilter.in |
ee940 | 73 74 61 6e 63 65 6f 66 20 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 | stanceof.PlatformRequirementFilt |
ee960 | 65 72 49 6e 74 65 72 66 61 63 65 29 29 20 7b 0a 74 72 69 67 67 65 72 5f 65 72 72 6f 72 28 27 56 | erInterface)).{.trigger_error('V |
ee980 | 65 72 73 69 6f 6e 53 65 6c 65 63 74 6f 72 3a 3a 66 69 6e 64 42 65 73 74 43 61 6e 64 69 64 61 74 | ersionSelector::findBestCandidat |
ee9a0 | 65 20 77 69 74 68 20 69 67 6e 6f 72 65 64 20 70 6c 61 74 66 6f 72 6d 20 72 65 71 73 20 61 73 20 | e.with.ignored.platform.reqs.as. |
ee9c0 | 62 6f 6f 6c 7c 61 72 72 61 79 20 69 73 20 64 65 70 72 65 63 61 74 65 64 20 73 69 6e 63 65 20 43 | bool|array.is.deprecated.since.C |
ee9e0 | 6f 6d 70 6f 73 65 72 20 32 2e 32 2c 20 75 73 65 20 61 6e 20 69 6e 73 74 61 6e 63 65 20 6f 66 20 | omposer.2.2,.use.an.instance.of. |
eea00 | 50 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 49 6e 74 65 72 66 61 | PlatformRequirementFilterInterfa |
eea20 | 63 65 20 69 6e 73 74 65 61 64 2e 27 2c 20 45 5f 55 53 45 52 5f 44 45 50 52 45 43 41 54 45 44 29 | ce.instead.',.E_USER_DEPRECATED) |
eea40 | 3b 0a 24 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 20 3d 20 50 | ;.$platformRequirementFilter.=.P |
eea60 | 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 46 61 63 74 6f 72 79 3a | latformRequirementFilterFactory: |
eea80 | 3a 66 72 6f 6d 42 6f 6f 6c 4f 72 4c 69 73 74 28 24 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 | :fromBoolOrList($platformRequire |
eeaa0 | 6d 65 6e 74 46 69 6c 74 65 72 29 3b 0a 7d 0a 0a 24 63 6f 6e 73 74 72 61 69 6e 74 20 3d 20 24 74 | mentFilter);.}..$constraint.=.$t |
eeac0 | 61 72 67 65 74 50 61 63 6b 61 67 65 56 65 72 73 69 6f 6e 20 3f 20 24 74 68 69 73 2d 3e 67 65 74 | argetPackageVersion.?.$this->get |
eeae0 | 50 61 72 73 65 72 28 29 2d 3e 70 61 72 73 65 43 6f 6e 73 74 72 61 69 6e 74 73 28 24 74 61 72 67 | Parser()->parseConstraints($targ |
eeb00 | 65 74 50 61 63 6b 61 67 65 56 65 72 73 69 6f 6e 29 20 3a 20 6e 75 6c 6c 3b 0a 24 63 61 6e 64 69 | etPackageVersion).:.null;.$candi |
eeb20 | 64 61 74 65 73 20 3d 20 24 74 68 69 73 2d 3e 72 65 70 6f 73 69 74 6f 72 79 53 65 74 2d 3e 66 69 | dates.=.$this->repositorySet->fi |
eeb40 | 6e 64 50 61 63 6b 61 67 65 73 28 73 74 72 74 6f 6c 6f 77 65 72 28 24 70 61 63 6b 61 67 65 4e 61 | ndPackages(strtolower($packageNa |
eeb60 | 6d 65 29 2c 20 24 63 6f 6e 73 74 72 61 69 6e 74 2c 20 24 72 65 70 6f 53 65 74 46 6c 61 67 73 29 | me),.$constraint,.$repoSetFlags) |
eeb80 | 3b 0a 0a 24 6d 69 6e 50 72 69 6f 72 69 74 79 20 3d 20 42 61 73 65 50 61 63 6b 61 67 65 3a 3a 24 | ;..$minPriority.=.BasePackage::$ |
eeba0 | 73 74 61 62 69 6c 69 74 69 65 73 5b 24 70 72 65 66 65 72 72 65 64 53 74 61 62 69 6c 69 74 79 5d | stabilities[$preferredStability] |
eebc0 | 3b 0a 75 73 6f 72 74 28 24 63 61 6e 64 69 64 61 74 65 73 2c 20 73 74 61 74 69 63 20 66 75 6e 63 | ;.usort($candidates,.static.func |
eebe0 | 74 69 6f 6e 20 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 20 24 61 2c 20 50 61 63 6b 61 | tion.(PackageInterface.$a,.Packa |
eec00 | 67 65 49 6e 74 65 72 66 61 63 65 20 24 62 29 20 75 73 65 20 28 24 6d 69 6e 50 72 69 6f 72 69 74 | geInterface.$b).use.($minPriorit |
eec20 | 79 29 20 7b 0a 24 61 50 72 69 6f 72 69 74 79 20 3d 20 24 61 2d 3e 67 65 74 53 74 61 62 69 6c 69 | y).{.$aPriority.=.$a->getStabili |
eec40 | 74 79 50 72 69 6f 72 69 74 79 28 29 3b 0a 24 62 50 72 69 6f 72 69 74 79 20 3d 20 24 62 2d 3e 67 | tyPriority();.$bPriority.=.$b->g |
eec60 | 65 74 53 74 61 62 69 6c 69 74 79 50 72 69 6f 72 69 74 79 28 29 3b 0a 0a 0a 0a 69 66 20 28 24 6d | etStabilityPriority();....if.($m |
eec80 | 69 6e 50 72 69 6f 72 69 74 79 20 3c 20 24 61 50 72 69 6f 72 69 74 79 20 26 26 20 24 62 50 72 69 | inPriority.<.$aPriority.&&.$bPri |
eeca0 | 6f 72 69 74 79 20 3c 20 24 61 50 72 69 6f 72 69 74 79 29 20 7b 0a 72 65 74 75 72 6e 20 31 3b 0a | ority.<.$aPriority).{.return.1;. |
eecc0 | 7d 0a 0a 0a 0a 69 66 20 28 24 6d 69 6e 50 72 69 6f 72 69 74 79 20 3c 20 24 61 50 72 69 6f 72 69 | }....if.($minPriority.<.$aPriori |
eece0 | 74 79 20 26 26 20 24 61 50 72 69 6f 72 69 74 79 20 3c 20 24 62 50 72 69 6f 72 69 74 79 29 20 7b | ty.&&.$aPriority.<.$bPriority).{ |
eed00 | 0a 72 65 74 75 72 6e 20 2d 31 3b 0a 7d 0a 0a 0a 0a 69 66 20 28 24 6d 69 6e 50 72 69 6f 72 69 74 | .return.-1;.}....if.($minPriorit |
eed20 | 79 20 3e 3d 20 24 61 50 72 69 6f 72 69 74 79 20 26 26 20 24 6d 69 6e 50 72 69 6f 72 69 74 79 20 | y.>=.$aPriority.&&.$minPriority. |
eed40 | 3c 20 24 62 50 72 69 6f 72 69 74 79 29 20 7b 0a 72 65 74 75 72 6e 20 2d 31 3b 0a 7d 0a 0a 0a 72 | <.$bPriority).{.return.-1;.}...r |
eed60 | 65 74 75 72 6e 20 76 65 72 73 69 6f 6e 5f 63 6f 6d 70 61 72 65 28 24 62 2d 3e 67 65 74 56 65 72 | eturn.version_compare($b->getVer |
eed80 | 73 69 6f 6e 28 29 2c 20 24 61 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 29 3b 0a 7d 29 3b 0a 0a | sion(),.$a->getVersion());.});.. |
eeda0 | 69 66 20 28 63 6f 75 6e 74 28 24 74 68 69 73 2d 3e 70 6c 61 74 66 6f 72 6d 43 6f 6e 73 74 72 61 | if.(count($this->platformConstra |
eedc0 | 69 6e 74 73 29 20 3e 20 30 20 26 26 20 21 28 24 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d | ints).>.0.&&.!($platformRequirem |
eede0 | 65 6e 74 46 69 6c 74 65 72 20 69 6e 73 74 61 6e 63 65 6f 66 20 49 67 6e 6f 72 65 41 6c 6c 50 6c | entFilter.instanceof.IgnoreAllPl |
eee00 | 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 6e 74 46 69 6c 74 65 72 29 29 20 7b 0a 0a 24 61 6c | atformRequirementFilter)).{..$al |
eee20 | 72 65 61 64 79 57 61 72 6e 65 64 4e 61 6d 65 73 20 3d 20 5b 5d 3b 0a 0a 66 6f 72 65 61 63 68 20 | readyWarnedNames.=.[];..foreach. |
eee40 | 28 24 63 61 6e 64 69 64 61 74 65 73 20 61 73 20 24 70 6b 67 29 20 7b 0a 24 72 65 71 73 20 3d 20 | ($candidates.as.$pkg).{.$reqs.=. |
eee60 | 24 70 6b 67 2d 3e 67 65 74 52 65 71 75 69 72 65 73 28 29 3b 0a 66 6f 72 65 61 63 68 20 28 24 72 | $pkg->getRequires();.foreach.($r |
eee80 | 65 71 73 20 61 73 20 24 6e 61 6d 65 20 3d 3e 20 24 6c 69 6e 6b 29 20 7b 0a 69 66 20 28 21 50 6c | eqs.as.$name.=>.$link).{.if.(!Pl |
eeea0 | 61 74 66 6f 72 6d 52 65 70 6f 73 69 74 6f 72 79 3a 3a 69 73 50 6c 61 74 66 6f 72 6d 50 61 63 6b | atformRepository::isPlatformPack |
eeec0 | 61 67 65 28 24 6e 61 6d 65 29 20 7c 7c 20 24 70 6c 61 74 66 6f 72 6d 52 65 71 75 69 72 65 6d 65 | age($name).||.$platformRequireme |
eeee0 | 6e 74 46 69 6c 74 65 72 2d 3e 69 73 49 67 6e 6f 72 65 64 28 24 6e 61 6d 65 29 29 20 7b 0a 63 6f | ntFilter->isIgnored($name)).{.co |
eef00 | 6e 74 69 6e 75 65 3b 0a 7d 0a 69 66 20 28 69 73 73 65 74 28 24 74 68 69 73 2d 3e 70 6c 61 74 66 | ntinue;.}.if.(isset($this->platf |
eef20 | 6f 72 6d 43 6f 6e 73 74 72 61 69 6e 74 73 5b 24 6e 61 6d 65 5d 29 29 20 7b 0a 66 6f 72 65 61 63 | ormConstraints[$name])).{.foreac |
eef40 | 68 20 28 24 74 68 69 73 2d 3e 70 6c 61 74 66 6f 72 6d 43 6f 6e 73 74 72 61 69 6e 74 73 5b 24 6e | h.($this->platformConstraints[$n |
eef60 | 61 6d 65 5d 20 61 73 20 24 70 72 6f 76 69 64 65 64 43 6f 6e 73 74 72 61 69 6e 74 29 20 7b 0a 69 | ame].as.$providedConstraint).{.i |
eef80 | 66 20 28 24 6c 69 6e 6b 2d 3e 67 65 74 43 6f 6e 73 74 72 61 69 6e 74 28 29 2d 3e 6d 61 74 63 68 | f.($link->getConstraint()->match |
eefa0 | 65 73 28 24 70 72 6f 76 69 64 65 64 43 6f 6e 73 74 72 61 69 6e 74 29 29 20 7b 0a 0a 63 6f 6e 74 | es($providedConstraint)).{..cont |
eefc0 | 69 6e 75 65 20 32 3b 0a 7d 0a 7d 0a 0a 0a 24 72 65 61 73 6f 6e 20 3d 20 27 69 73 20 6e 6f 74 20 | inue.2;.}.}...$reason.=.'is.not. |
eefe0 | 73 61 74 69 73 66 69 65 64 20 62 79 20 79 6f 75 72 20 70 6c 61 74 66 6f 72 6d 27 3b 0a 7d 20 65 | satisfied.by.your.platform';.}.e |
ef000 | 6c 73 65 20 7b 0a 0a 0a 24 72 65 61 73 6f 6e 20 3d 20 27 69 73 20 6d 69 73 73 69 6e 67 20 66 72 | lse.{...$reason.=.'is.missing.fr |
ef020 | 6f 6d 20 79 6f 75 72 20 70 6c 61 74 66 6f 72 6d 27 3b 0a 7d 0a 0a 69 66 20 28 24 69 6f 20 21 3d | om.your.platform';.}..if.($io.!= |
ef040 | 3d 20 6e 75 6c 6c 29 20 7b 0a 24 69 73 46 69 72 73 74 20 3d 20 21 69 73 73 65 74 28 24 61 6c 72 | =.null).{.$isFirst.=.!isset($alr |
ef060 | 65 61 64 79 57 61 72 6e 65 64 4e 61 6d 65 73 5b 24 70 6b 67 2d 3e 67 65 74 4e 61 6d 65 28 29 5d | eadyWarnedNames[$pkg->getName()] |
ef080 | 29 3b 0a 24 61 6c 72 65 61 64 79 57 61 72 6e 65 64 4e 61 6d 65 73 5b 24 70 6b 67 2d 3e 67 65 74 | );.$alreadyWarnedNames[$pkg->get |
ef0a0 | 4e 61 6d 65 28 29 5d 20 3d 20 74 72 75 65 3b 0a 24 6c 61 74 65 73 74 20 3d 20 24 69 73 46 69 72 | Name()].=.true;.$latest.=.$isFir |
ef0c0 | 73 74 20 3f 20 22 27 73 20 6c 61 74 65 73 74 20 76 65 72 73 69 6f 6e 22 20 3a 20 27 27 3b 0a 24 | st.?."'s.latest.version".:.'';.$ |
ef0e0 | 69 6f 2d 3e 77 72 69 74 65 45 72 72 6f 72 28 0a 27 3c 77 61 72 6e 69 6e 67 3e 43 61 6e 6e 6f 74 | io->writeError(.'<warning>Cannot |
ef100 | 20 75 73 65 20 27 2e 24 70 6b 67 2d 3e 67 65 74 50 72 65 74 74 79 4e 61 6d 65 28 29 2e 24 6c 61 | .use.'.$pkg->getPrettyName().$la |
ef120 | 74 65 73 74 2e 27 20 27 2e 24 70 6b 67 2d 3e 67 65 74 50 72 65 74 74 79 56 65 72 73 69 6f 6e 28 | test.'.'.$pkg->getPrettyVersion( |
ef140 | 29 2e 27 20 61 73 20 69 74 20 27 2e 24 6c 69 6e 6b 2d 3e 67 65 74 44 65 73 63 72 69 70 74 69 6f | ).'.as.it.'.$link->getDescriptio |
ef160 | 6e 28 29 2e 27 20 27 2e 24 6c 69 6e 6b 2d 3e 67 65 74 54 61 72 67 65 74 28 29 2e 27 20 27 2e 24 | n().'.'.$link->getTarget().'.'.$ |
ef180 | 6c 69 6e 6b 2d 3e 67 65 74 50 72 65 74 74 79 43 6f 6e 73 74 72 61 69 6e 74 28 29 2e 27 20 77 68 | link->getPrettyConstraint().'.wh |
ef1a0 | 69 63 68 20 27 2e 24 72 65 61 73 6f 6e 2e 27 2e 3c 2f 3e 27 2c 0a 74 72 75 65 2c 0a 24 69 73 46 | ich.'.$reason.'.</>',.true,.$isF |
ef1c0 | 69 72 73 74 20 3f 20 49 4f 49 6e 74 65 72 66 61 63 65 3a 3a 4e 4f 52 4d 41 4c 20 3a 20 49 4f 49 | irst.?.IOInterface::NORMAL.:.IOI |
ef1e0 | 6e 74 65 72 66 61 63 65 3a 3a 56 45 52 42 4f 53 45 0a 29 3b 0a 7d 0a 0a 0a 63 6f 6e 74 69 6e 75 | nterface::VERBOSE.);.}...continu |
ef200 | 65 20 32 3b 0a 7d 0a 0a 24 70 61 63 6b 61 67 65 20 3d 20 24 70 6b 67 3b 0a 62 72 65 61 6b 3b 0a | e.2;.}..$package.=.$pkg;.break;. |
ef220 | 7d 0a 7d 20 65 6c 73 65 20 7b 0a 24 70 61 63 6b 61 67 65 20 3d 20 63 6f 75 6e 74 28 24 63 61 6e | }.}.else.{.$package.=.count($can |
ef240 | 64 69 64 61 74 65 73 29 20 3e 20 30 20 3f 20 24 63 61 6e 64 69 64 61 74 65 73 5b 30 5d 20 3a 20 | didates).>.0.?.$candidates[0].:. |
ef260 | 6e 75 6c 6c 3b 0a 7d 0a 0a 69 66 20 28 21 69 73 73 65 74 28 24 70 61 63 6b 61 67 65 29 29 20 7b | null;.}..if.(!isset($package)).{ |
ef280 | 0a 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0a 7d 0a 0a 0a 69 66 20 28 24 70 61 63 6b 61 67 65 20 | .return.false;.}...if.($package. |
ef2a0 | 69 6e 73 74 61 6e 63 65 6f 66 20 41 6c 69 61 73 50 61 63 6b 61 67 65 20 26 26 20 24 70 61 63 6b | instanceof.AliasPackage.&&.$pack |
ef2c0 | 61 67 65 2d 3e 67 65 74 56 65 72 73 69 6f 6e 28 29 20 3d 3d 3d 20 56 65 72 73 69 6f 6e 50 61 72 | age->getVersion().===.VersionPar |
ef2e0 | 73 65 72 3a 3a 44 45 46 41 55 4c 54 5f 42 52 41 4e 43 48 5f 41 4c 49 41 53 29 20 7b 0a 24 70 61 | ser::DEFAULT_BRANCH_ALIAS).{.$pa |
ef300 | 63 6b 61 67 65 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 41 6c 69 61 73 4f 66 28 29 3b 0a | ckage.=.$package->getAliasOf();. |
ef320 | 7d 0a 0a 72 65 74 75 72 6e 20 24 70 61 63 6b 61 67 65 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a | }..return.$package;.}........... |
ef340 | 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 66 69 6e 64 52 65 63 6f 6d 6d 65 6e 64 | ...public.function.findRecommend |
ef360 | 65 64 52 65 71 75 69 72 65 56 65 72 73 69 6f 6e 28 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 | edRequireVersion(PackageInterfac |
ef380 | 65 20 24 70 61 63 6b 61 67 65 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 0a 0a 69 66 20 28 30 20 3d 3d | e.$package):.string.{...if.(0.== |
ef3a0 | 3d 20 73 74 72 70 6f 73 28 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 4e 61 6d 65 28 29 2c 20 27 65 | =.strpos($package->getName(),.'e |
ef3c0 | 78 74 2d 27 29 29 20 7b 0a 24 70 68 70 56 65 72 73 69 6f 6e 20 3d 20 50 48 50 5f 4d 41 4a 4f 52 | xt-')).{.$phpVersion.=.PHP_MAJOR |
ef3e0 | 5f 56 45 52 53 49 4f 4e 20 2e 20 27 2e 27 20 2e 20 50 48 50 5f 4d 49 4e 4f 52 5f 56 45 52 53 49 | _VERSION...'.'...PHP_MINOR_VERSI |
ef400 | 4f 4e 20 2e 20 27 2e 27 20 2e 20 50 48 50 5f 52 45 4c 45 41 53 45 5f 56 45 52 53 49 4f 4e 3b 0a | ON...'.'...PHP_RELEASE_VERSION;. |
ef420 | 24 65 78 74 56 65 72 73 69 6f 6e 20 3d 20 69 6d 70 6c 6f 64 65 28 27 2e 27 2c 20 61 72 72 61 79 | $extVersion.=.implode('.',.array |
ef440 | 5f 73 6c 69 63 65 28 65 78 70 6c 6f 64 65 28 27 2e 27 2c 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 | _slice(explode('.',.$package->ge |
ef460 | 74 56 65 72 73 69 6f 6e 28 29 29 2c 20 30 2c 20 33 29 29 3b 0a 69 66 20 28 24 70 68 70 56 65 72 | tVersion()),.0,.3));.if.($phpVer |
ef480 | 73 69 6f 6e 20 3d 3d 3d 20 24 65 78 74 56 65 72 73 69 6f 6e 29 20 7b 0a 72 65 74 75 72 6e 20 27 | sion.===.$extVersion).{.return.' |
ef4a0 | 2a 27 3b 0a 7d 0a 7d 0a 0a 24 76 65 72 73 69 6f 6e 20 3d 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 | *';.}.}..$version.=.$package->ge |
ef4c0 | 74 56 65 72 73 69 6f 6e 28 29 3b 0a 69 66 20 28 21 24 70 61 63 6b 61 67 65 2d 3e 69 73 44 65 76 | tVersion();.if.(!$package->isDev |
ef4e0 | 28 29 29 20 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 74 72 61 6e 73 66 6f 72 6d 56 65 72 | ()).{.return.$this->transformVer |
ef500 | 73 69 6f 6e 28 24 76 65 72 73 69 6f 6e 2c 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 | sion($version,.$package->getPret |
ef520 | 74 79 56 65 72 73 69 6f 6e 28 29 2c 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 53 74 61 62 69 6c | tyVersion(),.$package->getStabil |
ef540 | 69 74 79 28 29 29 3b 0a 7d 0a 0a 24 6c 6f 61 64 65 72 20 3d 20 6e 65 77 20 41 72 72 61 79 4c 6f | ity());.}..$loader.=.new.ArrayLo |
ef560 | 61 64 65 72 28 24 74 68 69 73 2d 3e 67 65 74 50 61 72 73 65 72 28 29 29 3b 0a 24 64 75 6d 70 65 | ader($this->getParser());.$dumpe |
ef580 | 72 20 3d 20 6e 65 77 20 41 72 72 61 79 44 75 6d 70 65 72 28 29 3b 0a 24 65 78 74 72 61 20 3d 20 | r.=.new.ArrayDumper();.$extra.=. |
ef5a0 | 24 6c 6f 61 64 65 72 2d 3e 67 65 74 42 72 61 6e 63 68 41 6c 69 61 73 28 24 64 75 6d 70 65 72 2d | $loader->getBranchAlias($dumper- |
ef5c0 | 3e 64 75 6d 70 28 24 70 61 63 6b 61 67 65 29 29 3b 0a 69 66 20 28 24 65 78 74 72 61 20 26 26 20 | >dump($package));.if.($extra.&&. |
ef5e0 | 24 65 78 74 72 61 20 21 3d 3d 20 56 65 72 73 69 6f 6e 50 61 72 73 65 72 3a 3a 44 45 46 41 55 4c | $extra.!==.VersionParser::DEFAUL |
ef600 | 54 5f 42 52 41 4e 43 48 5f 41 4c 49 41 53 29 20 7b 0a 24 65 78 74 72 61 20 3d 20 50 72 65 67 3a | T_BRANCH_ALIAS).{.$extra.=.Preg: |
ef620 | 3a 72 65 70 6c 61 63 65 28 27 7b 5e 28 5c 64 2b 5c 2e 5c 64 2b 5c 2e 5c 64 2b 29 28 5c 2e 39 39 | :replace('{^(\d+\.\d+\.\d+)(\.99 |
ef640 | 39 39 39 39 39 29 2d 64 65 76 24 7d 27 2c 20 27 24 31 2e 30 27 2c 20 24 65 78 74 72 61 2c 20 2d | 99999)-dev$}',.'$1.0',.$extra,.- |
ef660 | 31 2c 20 24 63 6f 75 6e 74 29 3b 0a 69 66 20 28 24 63 6f 75 6e 74 29 20 7b 0a 24 65 78 74 72 61 | 1,.$count);.if.($count).{.$extra |
ef680 | 20 3d 20 73 74 72 5f 72 65 70 6c 61 63 65 28 27 2e 39 39 39 39 39 39 39 27 2c 20 27 2e 30 27 2c | .=.str_replace('.9999999',.'.0', |
ef6a0 | 20 24 65 78 74 72 61 29 3b 0a 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 74 72 61 6e 73 66 6f | .$extra);..return.$this->transfo |
ef6c0 | 72 6d 56 65 72 73 69 6f 6e 28 24 65 78 74 72 61 2c 20 24 65 78 74 72 61 2c 20 27 64 65 76 27 29 | rmVersion($extra,.$extra,.'dev') |
ef6e0 | 3b 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 70 61 63 6b 61 67 65 2d 3e 67 65 74 50 72 65 74 74 | ;.}.}..return.$package->getPrett |
ef700 | 79 56 65 72 73 69 6f 6e 28 29 3b 0a 7d 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 | yVersion();.}..private.function. |
ef720 | 74 72 61 6e 73 66 6f 72 6d 56 65 72 73 69 6f 6e 28 73 74 72 69 6e 67 20 24 76 65 72 73 69 6f 6e | transformVersion(string.$version |
ef740 | 2c 20 73 74 72 69 6e 67 20 24 70 72 65 74 74 79 56 65 72 73 69 6f 6e 2c 20 73 74 72 69 6e 67 20 | ,.string.$prettyVersion,.string. |
ef760 | 24 73 74 61 62 69 6c 69 74 79 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 0a 0a 24 73 65 6d 61 6e 74 69 | $stability):.string.{...$semanti |
ef780 | 63 56 65 72 73 69 6f 6e 50 61 72 74 73 20 3d 20 65 78 70 6c 6f 64 65 28 27 2e 27 2c 20 24 76 65 | cVersionParts.=.explode('.',.$ve |
ef7a0 | 72 73 69 6f 6e 29 3b 0a 0a 0a 69 66 20 28 63 6f 75 6e 74 28 24 73 65 6d 61 6e 74 69 63 56 65 72 | rsion);...if.(count($semanticVer |
ef7c0 | 73 69 6f 6e 50 61 72 74 73 29 20 3d 3d 3d 20 34 20 26 26 20 50 72 65 67 3a 3a 69 73 4d 61 74 63 | sionParts).===.4.&&.Preg::isMatc |
ef7e0 | 68 28 27 7b 5e 30 5c 44 3f 7d 27 2c 20 24 73 65 6d 61 6e 74 69 63 56 65 72 73 69 6f 6e 50 61 72 | h('{^0\D?}',.$semanticVersionPar |
ef800 | 74 73 5b 33 5d 29 29 20 7b 0a 0a 69 66 20 28 24 73 65 6d 61 6e 74 69 63 56 65 72 73 69 6f 6e 50 | ts[3])).{..if.($semanticVersionP |
ef820 | 61 72 74 73 5b 30 5d 20 3d 3d 3d 20 27 30 27 29 20 7b 0a 75 6e 73 65 74 28 24 73 65 6d 61 6e 74 | arts[0].===.'0').{.unset($semant |
ef840 | 69 63 56 65 72 73 69 6f 6e 50 61 72 74 73 5b 33 5d 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 75 6e 73 | icVersionParts[3]);.}.else.{.uns |
ef860 | 65 74 28 24 73 65 6d 61 6e 74 69 63 56 65 72 73 69 6f 6e 50 61 72 74 73 5b 32 5d 2c 20 24 73 65 | et($semanticVersionParts[2],.$se |
ef880 | 6d 61 6e 74 69 63 56 65 72 73 69 6f 6e 50 61 72 74 73 5b 33 5d 29 3b 0a 7d 0a 24 76 65 72 73 69 | manticVersionParts[3]);.}.$versi |
ef8a0 | 6f 6e 20 3d 20 69 6d 70 6c 6f 64 65 28 27 2e 27 2c 20 24 73 65 6d 61 6e 74 69 63 56 65 72 73 69 | on.=.implode('.',.$semanticVersi |
ef8c0 | 6f 6e 50 61 72 74 73 29 3b 0a 7d 20 65 6c 73 65 20 7b 0a 72 65 74 75 72 6e 20 24 70 72 65 74 74 | onParts);.}.else.{.return.$prett |
ef8e0 | 79 56 65 72 73 69 6f 6e 3b 0a 7d 0a 0a 0a 69 66 20 28 24 73 74 61 62 69 6c 69 74 79 20 21 3d 3d | yVersion;.}...if.($stability.!== |
ef900 | 20 27 73 74 61 62 6c 65 27 29 20 7b 0a 24 76 65 72 73 69 6f 6e 20 2e 3d 20 27 40 27 2e 24 73 74 | .'stable').{.$version..=.'@'.$st |
ef920 | 61 62 69 6c 69 74 79 3b 0a 7d 0a 0a 0a 72 65 74 75 72 6e 20 27 5e 27 20 2e 20 24 76 65 72 73 69 | ability;.}...return.'^'...$versi |
ef940 | 6f 6e 3b 0a 7d 0a 0a 70 72 69 76 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 50 61 72 73 65 | on;.}..private.function.getParse |
ef960 | 72 28 29 3a 20 56 65 72 73 69 6f 6e 50 61 72 73 65 72 0a 7b 0a 69 66 20 28 24 74 68 69 73 2d 3e | r():.VersionParser.{.if.($this-> |
ef980 | 70 61 72 73 65 72 20 3d 3d 3d 20 6e 75 6c 6c 29 20 7b 0a 24 74 68 69 73 2d 3e 70 61 72 73 65 72 | parser.===.null).{.$this->parser |
ef9a0 | 20 3d 20 6e 65 77 20 56 65 72 73 69 6f 6e 50 61 72 73 65 72 28 29 3b 0a 7d 0a 0a 72 65 74 75 72 | .=.new.VersionParser();.}..retur |
ef9c0 | 6e 20 24 74 68 69 73 2d 3e 70 61 72 73 65 72 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 | n.$this->parser;.}.}.<?php.decla |
ef9e0 | 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e | re(strict_types=1);............n |
efa00 | 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 | amespace.Composer;..use.Composer |
efa20 | 5c 50 61 63 6b 61 67 65 5c 52 6f 6f 74 50 61 63 6b 61 67 65 49 6e 74 65 72 66 61 63 65 3b 0a 75 | \Package\RootPackageInterface;.u |
efa40 | 73 65 20 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 4c 6f 6f 70 3b 0a 75 73 65 20 43 6f 6d 70 6f | se.Composer\Util\Loop;.use.Compo |
efa60 | 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 52 65 70 6f 73 69 74 6f 72 79 4d 61 6e 61 67 65 72 | ser\Repository\RepositoryManager |
efa80 | 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 6e 73 74 61 6c 6c 65 72 5c 49 6e 73 74 61 6c 6c | ;.use.Composer\Installer\Install |
efaa0 | 61 74 69 6f 6e 4d 61 6e 61 67 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 45 76 65 6e 74 | ationManager;.use.Composer\Event |
efac0 | 44 69 73 70 61 74 63 68 65 72 5c 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 3b 0a 0a 0a 0a 0a | Dispatcher\EventDispatcher;..... |
efae0 | 63 6c 61 73 73 20 50 61 72 74 69 61 6c 43 6f 6d 70 6f 73 65 72 0a 7b 0a 0a 0a 0a 70 72 69 76 61 | class.PartialComposer.{....priva |
efb00 | 74 65 20 24 70 61 63 6b 61 67 65 3b 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 6c 6f 6f 70 3b 0a | te.$package;.....private.$loop;. |
efb20 | 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 72 65 70 6f 73 69 74 6f 72 79 4d 61 6e 61 67 65 72 3b 0a | ....private.$repositoryManager;. |
efb40 | 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 72 | ....private.$installationManager |
efb60 | 3b 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 63 6f 6e 66 69 67 3b 0a 0a 0a 0a 0a 70 72 69 76 61 | ;.....private.$config;.....priva |
efb80 | 74 65 20 24 65 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 3b 0a 0a 70 75 62 6c 69 63 20 66 75 6e | te.$eventDispatcher;..public.fun |
efba0 | 63 74 69 6f 6e 20 73 65 74 50 61 63 6b 61 67 65 28 52 6f 6f 74 50 61 63 6b 61 67 65 49 6e 74 65 | ction.setPackage(RootPackageInte |
efbc0 | 72 66 61 63 65 20 24 70 61 63 6b 61 67 65 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 70 | rface.$package):.void.{.$this->p |
efbe0 | 61 63 6b 61 67 65 20 3d 20 24 70 61 63 6b 61 67 65 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e | ackage.=.$package;.}..public.fun |
efc00 | 63 74 69 6f 6e 20 67 65 74 50 61 63 6b 61 67 65 28 29 3a 20 52 6f 6f 74 50 61 63 6b 61 67 65 49 | ction.getPackage():.RootPackageI |
efc20 | 6e 74 65 72 66 61 63 65 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 70 61 63 6b 61 67 65 | nterface.{.return.$this->package |
efc40 | 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 43 6f 6e 66 69 67 28 43 | ;.}..public.function.setConfig(C |
efc60 | 6f 6e 66 69 67 20 24 63 6f 6e 66 69 67 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 63 6f | onfig.$config):.void.{.$this->co |
efc80 | 6e 66 69 67 20 3d 20 24 63 6f 6e 66 69 67 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 | nfig.=.$config;.}..public.functi |
efca0 | 6f 6e 20 67 65 74 43 6f 6e 66 69 67 28 29 3a 20 43 6f 6e 66 69 67 0a 7b 0a 72 65 74 75 72 6e 20 | on.getConfig():.Config.{.return. |
efcc0 | 24 74 68 69 73 2d 3e 63 6f 6e 66 69 67 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f | $this->config;.}..public.functio |
efce0 | 6e 20 73 65 74 4c 6f 6f 70 28 4c 6f 6f 70 20 24 6c 6f 6f 70 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 | n.setLoop(Loop.$loop):.void.{.$t |
efd00 | 68 69 73 2d 3e 6c 6f 6f 70 20 3d 20 24 6c 6f 6f 70 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e | his->loop.=.$loop;.}..public.fun |
efd20 | 63 74 69 6f 6e 20 67 65 74 4c 6f 6f 70 28 29 3a 20 4c 6f 6f 70 0a 7b 0a 72 65 74 75 72 6e 20 24 | ction.getLoop():.Loop.{.return.$ |
efd40 | 74 68 69 73 2d 3e 6c 6f 6f 70 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 | this->loop;.}..public.function.s |
efd60 | 65 74 52 65 70 6f 73 69 74 6f 72 79 4d 61 6e 61 67 65 72 28 52 65 70 6f 73 69 74 6f 72 79 4d 61 | etRepositoryManager(RepositoryMa |
efd80 | 6e 61 67 65 72 20 24 6d 61 6e 61 67 65 72 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 72 | nager.$manager):.void.{.$this->r |
efda0 | 65 70 6f 73 69 74 6f 72 79 4d 61 6e 61 67 65 72 20 3d 20 24 6d 61 6e 61 67 65 72 3b 0a 7d 0a 0a | epositoryManager.=.$manager;.}.. |
efdc0 | 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 52 65 70 6f 73 69 74 6f 72 79 4d 61 6e | public.function.getRepositoryMan |
efde0 | 61 67 65 72 28 29 3a 20 52 65 70 6f 73 69 74 6f 72 79 4d 61 6e 61 67 65 72 0a 7b 0a 72 65 74 75 | ager():.RepositoryManager.{.retu |
efe00 | 72 6e 20 24 74 68 69 73 2d 3e 72 65 70 6f 73 69 74 6f 72 79 4d 61 6e 61 67 65 72 3b 0a 7d 0a 0a | rn.$this->repositoryManager;.}.. |
efe20 | 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d | public.function.setInstallationM |
efe40 | 61 6e 61 67 65 72 28 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 72 20 24 6d 61 6e 61 | anager(InstallationManager.$mana |
efe60 | 67 65 72 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 69 6e 73 74 61 6c 6c 61 74 69 6f 6e | ger):.void.{.$this->installation |
efe80 | 4d 61 6e 61 67 65 72 20 3d 20 24 6d 61 6e 61 67 65 72 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 | Manager.=.$manager;.}..public.fu |
efea0 | 6e 63 74 69 6f 6e 20 67 65 74 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 72 28 29 3a | nction.getInstallationManager(): |
efec0 | 20 49 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 72 0a 7b 0a 72 65 74 75 72 6e 20 24 74 | .InstallationManager.{.return.$t |
efee0 | 68 69 73 2d 3e 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 4d 61 6e 61 67 65 72 3b 0a 7d 0a 0a 70 75 62 | his->installationManager;.}..pub |
eff00 | 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 28 | lic.function.setEventDispatcher( |
eff20 | 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 20 24 65 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 | EventDispatcher.$eventDispatcher |
eff40 | 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 65 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 | ):.void.{.$this->eventDispatcher |
eff60 | 20 3d 20 24 65 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 | .=.$eventDispatcher;.}..public.f |
eff80 | 75 6e 63 74 69 6f 6e 20 67 65 74 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 28 29 3a 20 45 76 | unction.getEventDispatcher():.Ev |
effa0 | 65 6e 74 44 69 73 70 61 74 63 68 65 72 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 65 76 | entDispatcher.{.return.$this->ev |
effc0 | 65 6e 74 44 69 73 70 61 74 63 68 65 72 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 | entDispatcher;.}.}.<?php.declare |
effe0 | 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d | (strict_types=1);............nam |
f0000 | 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 50 6c 61 74 66 6f 72 6d 3b 0a 0a 75 73 65 20 43 | espace.Composer\Platform;..use.C |
f0020 | 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 6c 61 74 66 6f 72 6d 3b 0a 75 73 65 20 43 6f 6d 70 6f | omposer\Util\Platform;.use.Compo |
f0040 | 73 65 72 5c 55 74 69 6c 5c 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3b 0a 75 73 65 20 53 79 | ser\Util\ProcessExecutor;.use.Sy |
f0060 | 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 50 72 6f 63 65 73 73 5c 45 78 65 63 75 74 61 62 | mfony\Component\Process\Executab |
f0080 | 6c 65 46 69 6e 64 65 72 3b 0a 0a 63 6c 61 73 73 20 48 68 76 6d 44 65 74 65 63 74 6f 72 0a 7b 0a | leFinder;..class.HhvmDetector.{. |
f00a0 | 0a 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 24 68 68 76 6d 56 65 72 73 69 6f 6e 20 3d 20 6e | .private.static.$hhvmVersion.=.n |
f00c0 | 75 6c 6c 3b 0a 0a 70 72 69 76 61 74 65 20 24 65 78 65 63 75 74 61 62 6c 65 46 69 6e 64 65 72 3b | ull;..private.$executableFinder; |
f00e0 | 0a 0a 70 72 69 76 61 74 65 20 24 70 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3b 0a 0a 70 75 62 | ..private.$processExecutor;..pub |
f0100 | 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 74 28 3f 45 78 65 63 75 74 | lic.function.__construct(?Execut |
f0120 | 61 62 6c 65 46 69 6e 64 65 72 20 24 65 78 65 63 75 74 61 62 6c 65 46 69 6e 64 65 72 20 3d 20 6e | ableFinder.$executableFinder.=.n |
f0140 | 75 6c 6c 2c 20 3f 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 20 24 70 72 6f 63 65 73 73 45 78 | ull,.?ProcessExecutor.$processEx |
f0160 | 65 63 75 74 6f 72 20 3d 20 6e 75 6c 6c 29 0a 7b 0a 24 74 68 69 73 2d 3e 65 78 65 63 75 74 61 62 | ecutor.=.null).{.$this->executab |
f0180 | 6c 65 46 69 6e 64 65 72 20 3d 20 24 65 78 65 63 75 74 61 62 6c 65 46 69 6e 64 65 72 3b 0a 24 74 | leFinder.=.$executableFinder;.$t |
f01a0 | 68 69 73 2d 3e 70 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 20 3d 20 24 70 72 6f 63 65 73 73 45 | his->processExecutor.=.$processE |
f01c0 | 78 65 63 75 74 6f 72 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 72 65 73 65 | xecutor;.}..public.function.rese |
f01e0 | 74 28 29 3a 20 76 6f 69 64 0a 7b 0a 73 65 6c 66 3a 3a 24 68 68 76 6d 56 65 72 73 69 6f 6e 20 3d | t():.void.{.self::$hhvmVersion.= |
f0200 | 20 6e 75 6c 6c 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 56 65 72 | .null;.}..public.function.getVer |
f0220 | 73 69 6f 6e 28 29 3a 20 3f 73 74 72 69 6e 67 0a 7b 0a 69 66 20 28 6e 75 6c 6c 20 21 3d 3d 20 73 | sion():.?string.{.if.(null.!==.s |
f0240 | 65 6c 66 3a 3a 24 68 68 76 6d 56 65 72 73 69 6f 6e 29 20 7b 0a 72 65 74 75 72 6e 20 73 65 6c 66 | elf::$hhvmVersion).{.return.self |
f0260 | 3a 3a 24 68 68 76 6d 56 65 72 73 69 6f 6e 20 3f 3a 20 6e 75 6c 6c 3b 0a 7d 0a 0a 73 65 6c 66 3a | ::$hhvmVersion.?:.null;.}..self: |
f0280 | 3a 24 68 68 76 6d 56 65 72 73 69 6f 6e 20 3d 20 64 65 66 69 6e 65 64 28 27 48 48 56 4d 5f 56 45 | :$hhvmVersion.=.defined('HHVM_VE |
f02a0 | 52 53 49 4f 4e 27 29 20 3f 20 48 48 56 4d 5f 56 45 52 53 49 4f 4e 20 3a 20 6e 75 6c 6c 3b 0a 69 | RSION').?.HHVM_VERSION.:.null;.i |
f02c0 | 66 20 28 73 65 6c 66 3a 3a 24 68 68 76 6d 56 65 72 73 69 6f 6e 20 3d 3d 3d 20 6e 75 6c 6c 20 26 | f.(self::$hhvmVersion.===.null.& |
f02e0 | 26 20 21 50 6c 61 74 66 6f 72 6d 3a 3a 69 73 57 69 6e 64 6f 77 73 28 29 29 20 7b 0a 73 65 6c 66 | &.!Platform::isWindows()).{.self |
f0300 | 3a 3a 24 68 68 76 6d 56 65 72 73 69 6f 6e 20 3d 20 66 61 6c 73 65 3b 0a 24 74 68 69 73 2d 3e 65 | ::$hhvmVersion.=.false;.$this->e |
f0320 | 78 65 63 75 74 61 62 6c 65 46 69 6e 64 65 72 20 3d 20 24 74 68 69 73 2d 3e 65 78 65 63 75 74 61 | xecutableFinder.=.$this->executa |
f0340 | 62 6c 65 46 69 6e 64 65 72 20 3f 3a 20 6e 65 77 20 45 78 65 63 75 74 61 62 6c 65 46 69 6e 64 65 | bleFinder.?:.new.ExecutableFinde |
f0360 | 72 28 29 3b 0a 24 68 68 76 6d 50 61 74 68 20 3d 20 24 74 68 69 73 2d 3e 65 78 65 63 75 74 61 62 | r();.$hhvmPath.=.$this->executab |
f0380 | 6c 65 46 69 6e 64 65 72 2d 3e 66 69 6e 64 28 27 68 68 76 6d 27 29 3b 0a 69 66 20 28 24 68 68 76 | leFinder->find('hhvm');.if.($hhv |
f03a0 | 6d 50 61 74 68 20 21 3d 3d 20 6e 75 6c 6c 29 20 7b 0a 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 | mPath.!==.null).{.$this->process |
f03c0 | 45 78 65 63 75 74 6f 72 20 3d 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 45 78 65 63 75 74 6f | Executor.=.$this->processExecuto |
f03e0 | 72 20 3f 3f 20 6e 65 77 20 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 28 29 3b 0a 24 65 78 69 | r.??.new.ProcessExecutor();.$exi |
f0400 | 74 43 6f 64 65 20 3d 20 24 74 68 69 73 2d 3e 70 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 2d 3e | tCode.=.$this->processExecutor-> |
f0420 | 65 78 65 63 75 74 65 28 0a 50 72 6f 63 65 73 73 45 78 65 63 75 74 6f 72 3a 3a 65 73 63 61 70 65 | execute(.ProcessExecutor::escape |
f0440 | 28 24 68 68 76 6d 50 61 74 68 29 2e 0a 27 20 2d 2d 70 68 70 20 2d 64 20 68 68 76 6d 2e 6a 69 74 | ($hhvmPath)..'.--php.-d.hhvm.jit |
f0460 | 3d 30 20 2d 72 20 22 65 63 68 6f 20 48 48 56 4d 5f 56 45 52 53 49 4f 4e 3b 22 20 32 3e 2f 64 65 | =0.-r."echo.HHVM_VERSION;".2>/de |
f0480 | 76 2f 6e 75 6c 6c 27 2c 0a 73 65 6c 66 3a 3a 24 68 68 76 6d 56 65 72 73 69 6f 6e 0a 29 3b 0a 69 | v/null',.self::$hhvmVersion.);.i |
f04a0 | 66 20 28 24 65 78 69 74 43 6f 64 65 20 21 3d 3d 20 30 29 20 7b 0a 73 65 6c 66 3a 3a 24 68 68 76 | f.($exitCode.!==.0).{.self::$hhv |
f04c0 | 6d 56 65 72 73 69 6f 6e 20 3d 20 66 61 6c 73 65 3b 0a 7d 0a 7d 0a 7d 0a 0a 72 65 74 75 72 6e 20 | mVersion.=.false;.}.}.}..return. |
f04e0 | 73 65 6c 66 3a 3a 24 68 68 76 6d 56 65 72 73 69 6f 6e 20 3f 3a 20 6e 75 6c 6c 3b 0a 7d 0a 7d 0a | self::$hhvmVersion.?:.null;.}.}. |
f0500 | 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a | <?php.declare(strict_types=1);.. |
f0520 | 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 50 6c 61 | ..........namespace.Composer\Pla |
f0540 | 74 66 6f 72 6d 3b 0a 0a 63 6c 61 73 73 20 52 75 6e 74 69 6d 65 0a 7b 0a 0a 0a 0a 70 75 62 6c 69 | tform;..class.Runtime.{....publi |
f0560 | 63 20 66 75 6e 63 74 69 6f 6e 20 68 61 73 43 6f 6e 73 74 61 6e 74 28 73 74 72 69 6e 67 20 24 63 | c.function.hasConstant(string.$c |
f0580 | 6f 6e 73 74 61 6e 74 2c 20 3f 73 74 72 69 6e 67 20 24 63 6c 61 73 73 20 3d 20 6e 75 6c 6c 29 3a | onstant,.?string.$class.=.null): |
f05a0 | 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 64 65 66 69 6e 65 64 28 6c 74 72 69 6d 28 24 63 6c | .bool.{.return.defined(ltrim($cl |
f05c0 | 61 73 73 2e 27 3a 3a 27 2e 24 63 6f 6e 73 74 61 6e 74 2c 20 27 3a 27 29 29 3b 0a 7d 0a 0a 0a 0a | ass.'::'.$constant,.':'));.}.... |
f05e0 | 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 43 6f 6e 73 74 61 6e 74 28 73 | ...public.function.getConstant(s |
f0600 | 74 72 69 6e 67 20 24 63 6f 6e 73 74 61 6e 74 2c 20 3f 73 74 72 69 6e 67 20 24 63 6c 61 73 73 20 | tring.$constant,.?string.$class. |
f0620 | 3d 20 6e 75 6c 6c 29 0a 7b 0a 72 65 74 75 72 6e 20 63 6f 6e 73 74 61 6e 74 28 6c 74 72 69 6d 28 | =.null).{.return.constant(ltrim( |
f0640 | 24 63 6c 61 73 73 2e 27 3a 3a 27 2e 24 63 6f 6e 73 74 61 6e 74 2c 20 27 3a 27 29 29 3b 0a 7d 0a | $class.'::'.$constant,.':'));.}. |
f0660 | 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 68 61 73 46 75 6e 63 74 69 6f 6e 28 73 74 72 | .public.function.hasFunction(str |
f0680 | 69 6e 67 20 24 66 6e 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 66 75 6e 63 74 69 6f 6e | ing.$fn):.bool.{.return.function |
f06a0 | 5f 65 78 69 73 74 73 28 24 66 6e 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e | _exists($fn);.}.......public.fun |
f06c0 | 63 74 69 6f 6e 20 69 6e 76 6f 6b 65 28 63 61 6c 6c 61 62 6c 65 20 24 63 61 6c 6c 61 62 6c 65 2c | ction.invoke(callable.$callable, |
f06e0 | 20 61 72 72 61 79 20 24 61 72 67 75 6d 65 6e 74 73 20 3d 20 5b 5d 29 0a 7b 0a 72 65 74 75 72 6e | .array.$arguments.=.[]).{.return |
f0700 | 20 24 63 61 6c 6c 61 62 6c 65 28 2e 2e 2e 24 61 72 67 75 6d 65 6e 74 73 29 3b 0a 7d 0a 0a 0a 0a | .$callable(...$arguments);.}.... |
f0720 | 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 68 61 73 43 6c 61 73 73 28 73 74 72 69 6e 67 | .public.function.hasClass(string |
f0740 | 20 24 63 6c 61 73 73 29 3a 20 62 6f 6f 6c 0a 7b 0a 72 65 74 75 72 6e 20 63 6c 61 73 73 5f 65 78 | .$class):.bool.{.return.class_ex |
f0760 | 69 73 74 73 28 24 63 6c 61 73 73 2c 20 66 61 6c 73 65 29 3b 0a 7d 0a 0a 0a 0a 0a 0a 0a 0a 70 75 | ists($class,.false);.}........pu |
f0780 | 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 63 6f 6e 73 74 72 75 63 74 28 73 74 72 69 6e 67 20 24 | blic.function.construct(string.$ |
f07a0 | 63 6c 61 73 73 2c 20 61 72 72 61 79 20 24 61 72 67 75 6d 65 6e 74 73 20 3d 20 5b 5d 29 3a 20 6f | class,.array.$arguments.=.[]):.o |
f07c0 | 62 6a 65 63 74 0a 7b 0a 69 66 20 28 65 6d 70 74 79 28 24 61 72 67 75 6d 65 6e 74 73 29 29 20 7b | bject.{.if.(empty($arguments)).{ |
f07e0 | 0a 72 65 74 75 72 6e 20 6e 65 77 20 24 63 6c 61 73 73 3b 0a 7d 0a 0a 24 72 65 66 6c 20 3d 20 6e | .return.new.$class;.}..$refl.=.n |
f0800 | 65 77 20 5c 52 65 66 6c 65 63 74 69 6f 6e 43 6c 61 73 73 28 24 63 6c 61 73 73 29 3b 0a 0a 72 65 | ew.\ReflectionClass($class);..re |
f0820 | 74 75 72 6e 20 24 72 65 66 6c 2d 3e 6e 65 77 49 6e 73 74 61 6e 63 65 41 72 67 73 28 24 61 72 67 | turn.$refl->newInstanceArgs($arg |
f0840 | 75 6d 65 6e 74 73 29 3b 0a 7d 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 | uments);.}...public.function.get |
f0860 | 45 78 74 65 6e 73 69 6f 6e 73 28 29 3a 20 61 72 72 61 79 0a 7b 0a 72 65 74 75 72 6e 20 67 65 74 | Extensions():.array.{.return.get |
f0880 | 5f 6c 6f 61 64 65 64 5f 65 78 74 65 6e 73 69 6f 6e 73 28 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 | _loaded_extensions();.}..public. |
f08a0 | 66 75 6e 63 74 69 6f 6e 20 67 65 74 45 78 74 65 6e 73 69 6f 6e 56 65 72 73 69 6f 6e 28 73 74 72 | function.getExtensionVersion(str |
f08c0 | 69 6e 67 20 24 65 78 74 65 6e 73 69 6f 6e 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 24 76 65 72 73 69 | ing.$extension):.string.{.$versi |
f08e0 | 6f 6e 20 3d 20 70 68 70 76 65 72 73 69 6f 6e 28 24 65 78 74 65 6e 73 69 6f 6e 29 3b 0a 69 66 20 | on.=.phpversion($extension);.if. |
f0900 | 28 24 76 65 72 73 69 6f 6e 20 3d 3d 3d 20 66 61 6c 73 65 29 20 7b 0a 24 76 65 72 73 69 6f 6e 20 | ($version.===.false).{.$version. |
f0920 | 3d 20 27 30 27 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 76 65 72 73 69 6f 6e 3b 0a 7d 0a 0a 0a 0a | =.'0';.}..return.$version;.}.... |
f0940 | 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 45 78 74 65 6e 73 69 6f 6e 49 6e 66 | .public.function.getExtensionInf |
f0960 | 6f 28 73 74 72 69 6e 67 20 24 65 78 74 65 6e 73 69 6f 6e 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 24 | o(string.$extension):.string.{.$ |
f0980 | 72 65 66 6c 65 63 74 6f 72 20 3d 20 6e 65 77 20 5c 52 65 66 6c 65 63 74 69 6f 6e 45 78 74 65 6e | reflector.=.new.\ReflectionExten |
f09a0 | 73 69 6f 6e 28 24 65 78 74 65 6e 73 69 6f 6e 29 3b 0a 0a 6f 62 5f 73 74 61 72 74 28 29 3b 0a 24 | sion($extension);..ob_start();.$ |
f09c0 | 72 65 66 6c 65 63 74 6f 72 2d 3e 69 6e 66 6f 28 29 3b 0a 0a 72 65 74 75 72 6e 20 6f 62 5f 67 65 | reflector->info();..return.ob_ge |
f09e0 | 74 5f 63 6c 65 61 6e 28 29 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 | t_clean();.}.}.<?php.declare(str |
f0a00 | 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 | ict_types=1);............namespa |
f0a20 | 63 65 20 43 6f 6d 70 6f 73 65 72 5c 50 6c 61 74 66 6f 72 6d 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f | ce.Composer\Platform;..use.Compo |
f0a40 | 73 65 72 5c 50 63 72 65 5c 50 72 65 67 3b 0a 0a 0a 0a 0a 63 6c 61 73 73 20 56 65 72 73 69 6f 6e | ser\Pcre\Preg;.....class.Version |
f0a60 | 0a 7b 0a 0a 0a 0a 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 70 61 72 | .{....public.static.function.par |
f0a80 | 73 65 4f 70 65 6e 73 73 6c 28 73 74 72 69 6e 67 20 24 6f 70 65 6e 73 73 6c 56 65 72 73 69 6f 6e | seOpenssl(string.$opensslVersion |
f0aa0 | 2c 20 3f 62 6f 6f 6c 20 26 24 69 73 46 69 70 73 29 3a 20 3f 73 74 72 69 6e 67 0a 7b 0a 24 69 73 | ,.?bool.&$isFips):.?string.{.$is |
f0ac0 | 46 69 70 73 20 3d 20 66 61 6c 73 65 3b 0a 0a 69 66 20 28 21 50 72 65 67 3a 3a 69 73 4d 61 74 63 | Fips.=.false;..if.(!Preg::isMatc |
f0ae0 | 68 28 27 2f 5e 28 3f 3c 76 65 72 73 69 6f 6e 3e 5b 30 2d 39 2e 5d 2b 29 28 3f 3c 70 61 74 63 68 | h('/^(?<version>[0-9.]+)(?<patch |
f0b00 | 3e 5b 61 2d 7a 5d 7b 30 2c 32 7d 29 3f 28 3f 3c 73 75 66 66 69 78 3e 28 3f 3a 2d 3f 28 3f 3a 64 | >[a-z]{0,2})?(?<suffix>(?:-?(?:d |
f0b20 | 65 76 7c 70 72 65 7c 61 6c 70 68 61 7c 62 65 74 61 7c 72 63 7c 66 69 70 73 29 5b 5c 64 5d 2a 29 | ev|pre|alpha|beta|rc|fips)[\d]*) |
f0b40 | 2a 29 3f 28 3f 3c 67 61 72 62 61 67 65 3e 2d 5c 77 2b 29 3f 28 3f 3c 67 61 72 62 61 67 65 32 3e | *)?(?<garbage>-\w+)?(?<garbage2> |
f0b60 | 20 5c 28 2e 2b 3f 5c 29 29 3f 24 2f 27 2c 20 24 6f 70 65 6e 73 73 6c 56 65 72 73 69 6f 6e 2c 20 | .\(.+?\))?$/',.$opensslVersion,. |
f0b80 | 24 6d 61 74 63 68 65 73 29 29 20 7b 0a 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0a 7d 0a 0a 0a 24 70 | $matches)).{.return.null;.}...$p |
f0ba0 | 61 74 63 68 20 3d 20 27 27 3b 0a 69 66 20 28 76 65 72 73 69 6f 6e 5f 63 6f 6d 70 61 72 65 28 24 | atch.=.'';.if.(version_compare($ |
f0bc0 | 6d 61 74 63 68 65 73 5b 27 76 65 72 73 69 6f 6e 27 5d 2c 20 27 33 2e 30 2e 30 27 2c 20 27 3c 27 | matches['version'],.'3.0.0',.'<' |
f0be0 | 29 29 20 7b 0a 24 70 61 74 63 68 20 3d 20 27 2e 27 2e 73 65 6c 66 3a 3a 63 6f 6e 76 65 72 74 41 | )).{.$patch.=.'.'.self::convertA |
f0c00 | 6c 70 68 61 56 65 72 73 69 6f 6e 54 6f 49 6e 74 56 65 72 73 69 6f 6e 28 24 6d 61 74 63 68 65 73 | lphaVersionToIntVersion($matches |
f0c20 | 5b 27 70 61 74 63 68 27 5d 29 3b 0a 7d 0a 0a 24 69 73 46 69 70 73 20 3d 20 73 74 72 70 6f 73 28 | ['patch']);.}..$isFips.=.strpos( |
f0c40 | 24 6d 61 74 63 68 65 73 5b 27 73 75 66 66 69 78 27 5d 2c 20 27 66 69 70 73 27 29 20 21 3d 3d 20 | $matches['suffix'],.'fips').!==. |
f0c60 | 66 61 6c 73 65 3b 0a 24 73 75 66 66 69 78 20 3d 20 73 74 72 74 72 28 27 2d 27 2e 6c 74 72 69 6d | false;.$suffix.=.strtr('-'.ltrim |
f0c80 | 28 24 6d 61 74 63 68 65 73 5b 27 73 75 66 66 69 78 27 5d 2c 20 27 2d 27 29 2c 20 5b 27 2d 66 69 | ($matches['suffix'],.'-'),.['-fi |
f0ca0 | 70 73 27 20 3d 3e 20 27 27 2c 20 27 2d 70 72 65 27 20 3d 3e 20 27 2d 61 6c 70 68 61 27 5d 29 3b | ps'.=>.'',.'-pre'.=>.'-alpha']); |
f0cc0 | 0a 0a 72 65 74 75 72 6e 20 72 74 72 69 6d 28 24 6d 61 74 63 68 65 73 5b 27 76 65 72 73 69 6f 6e | ..return.rtrim($matches['version |
f0ce0 | 27 5d 2e 24 70 61 74 63 68 2e 24 73 75 66 66 69 78 2c 20 27 2d 27 29 3b 0a 7d 0a 0a 70 75 62 6c | '].$patch.$suffix,.'-');.}..publ |
f0d00 | 69 63 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 70 61 72 73 65 4c 69 62 6a 70 65 67 28 | ic.static.function.parseLibjpeg( |
f0d20 | 73 74 72 69 6e 67 20 24 6c 69 62 6a 70 65 67 56 65 72 73 69 6f 6e 29 3a 20 3f 73 74 72 69 6e 67 | string.$libjpegVersion):.?string |
f0d40 | 0a 7b 0a 69 66 20 28 21 50 72 65 67 3a 3a 69 73 4d 61 74 63 68 28 27 2f 5e 28 3f 3c 6d 61 6a 6f | .{.if.(!Preg::isMatch('/^(?<majo |
f0d60 | 72 3e 5c 64 2b 29 28 3f 3c 6d 69 6e 6f 72 3e 5b 61 2d 7a 5d 2a 29 24 2f 27 2c 20 24 6c 69 62 6a | r>\d+)(?<minor>[a-z]*)$/',.$libj |
f0d80 | 70 65 67 56 65 72 73 69 6f 6e 2c 20 24 6d 61 74 63 68 65 73 29 29 20 7b 0a 72 65 74 75 72 6e 20 | pegVersion,.$matches)).{.return. |
f0da0 | 6e 75 6c 6c 3b 0a 7d 0a 0a 72 65 74 75 72 6e 20 24 6d 61 74 63 68 65 73 5b 27 6d 61 6a 6f 72 27 | null;.}..return.$matches['major' |
f0dc0 | 5d 2e 27 2e 27 2e 73 65 6c 66 3a 3a 63 6f 6e 76 65 72 74 41 6c 70 68 61 56 65 72 73 69 6f 6e 54 | ].'.'.self::convertAlphaVersionT |
f0de0 | 6f 49 6e 74 56 65 72 73 69 6f 6e 28 24 6d 61 74 63 68 65 73 5b 27 6d 69 6e 6f 72 27 5d 29 3b 0a | oIntVersion($matches['minor']);. |
f0e00 | 7d 0a 0a 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 70 61 72 73 65 5a | }..public.static.function.parseZ |
f0e20 | 6f 6e 65 69 6e 66 6f 56 65 72 73 69 6f 6e 28 73 74 72 69 6e 67 20 24 7a 6f 6e 65 69 6e 66 6f 56 | oneinfoVersion(string.$zoneinfoV |
f0e40 | 65 72 73 69 6f 6e 29 3a 20 3f 73 74 72 69 6e 67 0a 7b 0a 69 66 20 28 21 50 72 65 67 3a 3a 69 73 | ersion):.?string.{.if.(!Preg::is |
f0e60 | 4d 61 74 63 68 28 27 2f 5e 28 3f 3c 79 65 61 72 3e 5c 64 7b 34 7d 29 28 3f 3c 72 65 76 69 73 69 | Match('/^(?<year>\d{4})(?<revisi |
f0e80 | 6f 6e 3e 5b 61 2d 7a 5d 2a 29 24 2f 27 2c 20 24 7a 6f 6e 65 69 6e 66 6f 56 65 72 73 69 6f 6e 2c | on>[a-z]*)$/',.$zoneinfoVersion, |
f0ea0 | 20 24 6d 61 74 63 68 65 73 29 29 20 7b 0a 72 65 74 75 72 6e 20 6e 75 6c 6c 3b 0a 7d 0a 0a 72 65 | .$matches)).{.return.null;.}..re |
f0ec0 | 74 75 72 6e 20 24 6d 61 74 63 68 65 73 5b 27 79 65 61 72 27 5d 2e 27 2e 27 2e 73 65 6c 66 3a 3a | turn.$matches['year'].'.'.self:: |
f0ee0 | 63 6f 6e 76 65 72 74 41 6c 70 68 61 56 65 72 73 69 6f 6e 54 6f 49 6e 74 56 65 72 73 69 6f 6e 28 | convertAlphaVersionToIntVersion( |
f0f00 | 24 6d 61 74 63 68 65 73 5b 27 72 65 76 69 73 69 6f 6e 27 5d 29 3b 0a 7d 0a 0a 0a 0a 0a 70 72 69 | $matches['revision']);.}.....pri |
f0f20 | 76 61 74 65 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 63 6f 6e 76 65 72 74 41 6c 70 68 | vate.static.function.convertAlph |
f0f40 | 61 56 65 72 73 69 6f 6e 54 6f 49 6e 74 56 65 72 73 69 6f 6e 28 73 74 72 69 6e 67 20 24 61 6c 70 | aVersionToIntVersion(string.$alp |
f0f60 | 68 61 29 3a 20 69 6e 74 0a 7b 0a 72 65 74 75 72 6e 20 73 74 72 6c 65 6e 28 24 61 6c 70 68 61 29 | ha):.int.{.return.strlen($alpha) |
f0f80 | 20 2a 20 28 2d 6f 72 64 28 27 61 27 29 20 2b 20 31 29 20 2b 20 61 72 72 61 79 5f 73 75 6d 28 61 | .*.(-ord('a').+.1).+.array_sum(a |
f0fa0 | 72 72 61 79 5f 6d 61 70 28 27 6f 72 64 27 2c 20 73 74 72 5f 73 70 6c 69 74 28 24 61 6c 70 68 61 | rray_map('ord',.str_split($alpha |
f0fc0 | 29 29 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 63 | )));.}..public.static.function.c |
f0fe0 | 6f 6e 76 65 72 74 4c 69 62 78 70 6d 56 65 72 73 69 6f 6e 49 64 28 69 6e 74 20 24 76 65 72 73 69 | onvertLibxpmVersionId(int.$versi |
f1000 | 6f 6e 49 64 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 73 65 6c 66 3a 3a 63 6f 6e | onId):.string.{.return.self::con |
f1020 | 76 65 72 74 56 65 72 73 69 6f 6e 49 64 28 24 76 65 72 73 69 6f 6e 49 64 2c 20 31 30 30 29 3b 0a | vertVersionId($versionId,.100);. |
f1040 | 7d 0a 0a 70 75 62 6c 69 63 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 63 6f 6e 76 65 72 | }..public.static.function.conver |
f1060 | 74 4f 70 65 6e 6c 64 61 70 56 65 72 73 69 6f 6e 49 64 28 69 6e 74 20 24 76 65 72 73 69 6f 6e 49 | tOpenldapVersionId(int.$versionI |
f1080 | 64 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 73 65 6c 66 3a 3a 63 6f 6e 76 65 72 | d):.string.{.return.self::conver |
f10a0 | 74 56 65 72 73 69 6f 6e 49 64 28 24 76 65 72 73 69 6f 6e 49 64 2c 20 31 30 30 29 3b 0a 7d 0a 0a | tVersionId($versionId,.100);.}.. |
f10c0 | 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 66 75 6e 63 74 69 6f 6e 20 63 6f 6e 76 65 72 74 56 | private.static.function.convertV |
f10e0 | 65 72 73 69 6f 6e 49 64 28 69 6e 74 20 24 76 65 72 73 69 6f 6e 49 64 2c 20 69 6e 74 20 24 62 61 | ersionId(int.$versionId,.int.$ba |
f1100 | 73 65 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 65 74 75 72 6e 20 73 70 72 69 6e 74 66 28 0a 27 25 | se):.string.{.return.sprintf(.'% |
f1120 | 64 2e 25 64 2e 25 64 27 2c 0a 24 76 65 72 73 69 6f 6e 49 64 20 2f 20 28 24 62 61 73 65 20 2a 20 | d.%d.%d',.$versionId./.($base.*. |
f1140 | 24 62 61 73 65 29 2c 0a 28 69 6e 74 29 20 28 24 76 65 72 73 69 6f 6e 49 64 20 2f 20 24 62 61 73 | $base),.(int).($versionId./.$bas |
f1160 | 65 29 20 25 20 24 62 61 73 65 2c 0a 24 76 65 72 73 69 6f 6e 49 64 20 25 20 24 62 61 73 65 0a 29 | e).%.$base,.$versionId.%.$base.) |
f1180 | 3b 0a 7d 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 | ;.}.}.<?php.declare(strict_types |
f11a0 | 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 | =1);............namespace.Compos |
f11c0 | 65 72 5c 50 6c 75 67 69 6e 5c 43 61 70 61 62 69 6c 69 74 79 3b 0a 0a 0a 0a 0a 0a 0a 0a 69 6e 74 | er\Plugin\Capability;........int |
f11e0 | 65 72 66 61 63 65 20 43 61 70 61 62 69 6c 69 74 79 0a 7b 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c | erface.Capability.{.}.<?php.decl |
f1200 | 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a | are(strict_types=1);............ |
f1220 | 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 50 6c 75 67 69 6e 5c 43 61 70 61 62 69 | namespace.Composer\Plugin\Capabi |
f1240 | 6c 69 74 79 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 69 6e 74 65 72 66 61 63 65 20 43 6f 6d 6d 61 | lity;............interface.Comma |
f1260 | 6e 64 50 72 6f 76 69 64 65 72 20 65 78 74 65 6e 64 73 20 43 61 70 61 62 69 6c 69 74 79 0a 7b 0a | ndProvider.extends.Capability.{. |
f1280 | 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 43 6f 6d 6d 61 6e 64 73 | .....public.function.getCommands |
f12a0 | 28 29 3b 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 | ();.}.<?php.declare(strict_types |
f12c0 | 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 | =1);............namespace.Compos |
f12e0 | 65 72 5c 50 6c 75 67 69 6e 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 69 6e 74 65 72 66 61 63 65 20 43 61 70 | er\Plugin;.........interface.Cap |
f1300 | 61 62 6c 65 0a 7b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 | able.{...................public. |
f1320 | 66 75 6e 63 74 69 6f 6e 20 67 65 74 43 61 70 61 62 69 6c 69 74 69 65 73 28 29 3b 0a 7d 0a 3c 3f | function.getCapabilities();.}.<? |
f1340 | 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a | php.declare(strict_types=1);.... |
f1360 | 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 50 6c 75 67 69 | ........namespace.Composer\Plugi |
f1380 | 6e 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 | n;..use.Composer\EventDispatcher |
f13a0 | 5c 45 76 65 6e 74 3b 0a 75 73 65 20 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f | \Event;.use.Symfony\Component\Co |
f13c0 | 6e 73 6f 6c 65 5c 49 6e 70 75 74 5c 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 | nsole\Input\InputInterface;.use. |
f13e0 | 53 79 6d 66 6f 6e 79 5c 43 6f 6d 70 6f 6e 65 6e 74 5c 43 6f 6e 73 6f 6c 65 5c 4f 75 74 70 75 74 | Symfony\Component\Console\Output |
f1400 | 5c 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 3b 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 43 6f | \OutputInterface;.......class.Co |
f1420 | 6d 6d 61 6e 64 45 76 65 6e 74 20 65 78 74 65 6e 64 73 20 45 76 65 6e 74 0a 7b 0a 0a 0a 0a 70 72 | mmandEvent.extends.Event.{....pr |
f1440 | 69 76 61 74 65 20 24 63 6f 6d 6d 61 6e 64 4e 61 6d 65 3b 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 | ivate.$commandName;.....private. |
f1460 | 24 69 6e 70 75 74 3b 0a 0a 0a 0a 0a 70 72 69 76 61 74 65 20 24 6f 75 74 70 75 74 3b 0a 0a 0a 0a | $input;.....private.$output;.... |
f1480 | 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 6f 6e 73 74 72 75 63 | ......public.function.__construc |
f14a0 | 74 28 73 74 72 69 6e 67 20 24 6e 61 6d 65 2c 20 73 74 72 69 6e 67 20 24 63 6f 6d 6d 61 6e 64 4e | t(string.$name,.string.$commandN |
f14c0 | 61 6d 65 2c 20 49 6e 70 75 74 49 6e 74 65 72 66 61 63 65 20 24 69 6e 70 75 74 2c 20 4f 75 74 70 | ame,.InputInterface.$input,.Outp |
f14e0 | 75 74 49 6e 74 65 72 66 61 63 65 20 24 6f 75 74 70 75 74 2c 20 61 72 72 61 79 20 24 61 72 67 73 | utInterface.$output,.array.$args |
f1500 | 20 3d 20 5b 5d 2c 20 61 72 72 61 79 20 24 66 6c 61 67 73 20 3d 20 5b 5d 29 0a 7b 0a 70 61 72 65 | .=.[],.array.$flags.=.[]).{.pare |
f1520 | 6e 74 3a 3a 5f 5f 63 6f 6e 73 74 72 75 63 74 28 24 6e 61 6d 65 2c 20 24 61 72 67 73 2c 20 24 66 | nt::__construct($name,.$args,.$f |
f1540 | 6c 61 67 73 29 3b 0a 24 74 68 69 73 2d 3e 63 6f 6d 6d 61 6e 64 4e 61 6d 65 20 3d 20 24 63 6f 6d | lags);.$this->commandName.=.$com |
f1560 | 6d 61 6e 64 4e 61 6d 65 3b 0a 24 74 68 69 73 2d 3e 69 6e 70 75 74 20 3d 20 24 69 6e 70 75 74 3b | mandName;.$this->input.=.$input; |
f1580 | 0a 24 74 68 69 73 2d 3e 6f 75 74 70 75 74 20 3d 20 24 6f 75 74 70 75 74 3b 0a 7d 0a 0a 0a 0a 0a | .$this->output.=.$output;.}..... |
f15a0 | 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 49 6e 70 75 74 28 29 3a 20 49 6e 70 75 | public.function.getInput():.Inpu |
f15c0 | 74 49 6e 74 65 72 66 61 63 65 0a 7b 0a 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 69 6e 70 75 74 | tInterface.{.return.$this->input |
f15e0 | 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 4f 75 74 70 75 | ;.}.....public.function.getOutpu |
f1600 | 74 28 29 3a 20 4f 75 74 70 75 74 49 6e 74 65 72 66 61 63 65 0a 7b 0a 72 65 74 75 72 6e 20 24 74 | t():.OutputInterface.{.return.$t |
f1620 | 68 69 73 2d 3e 6f 75 74 70 75 74 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 | his->output;.}.....public.functi |
f1640 | 6f 6e 20 67 65 74 43 6f 6d 6d 61 6e 64 4e 61 6d 65 28 29 3a 20 73 74 72 69 6e 67 0a 7b 0a 72 65 | on.getCommandName():.string.{.re |
f1660 | 74 75 72 6e 20 24 74 68 69 73 2d 3e 63 6f 6d 6d 61 6e 64 4e 61 6d 65 3b 0a 7d 0a 7d 0a 3c 3f 70 | turn.$this->commandName;.}.}.<?p |
f1680 | 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a | hp.declare(strict_types=1);..... |
f16a0 | 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 50 6c 75 67 69 6e | .......namespace.Composer\Plugin |
f16c0 | 3b 0a 0a 75 73 65 20 55 6e 65 78 70 65 63 74 65 64 56 61 6c 75 65 45 78 63 65 70 74 69 6f 6e 3b | ;..use.UnexpectedValueException; |
f16e0 | 0a 0a 63 6c 61 73 73 20 50 6c 75 67 69 6e 42 6c 6f 63 6b 65 64 45 78 63 65 70 74 69 6f 6e 20 65 | ..class.PluginBlockedException.e |
f1700 | 78 74 65 6e 64 73 20 55 6e 65 78 70 65 63 74 65 64 56 61 6c 75 65 45 78 63 65 70 74 69 6f 6e 0a | xtends.UnexpectedValueException. |
f1720 | 7b 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 | {.}.<?php.declare(strict_types=1 |
f1740 | 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 | );............namespace.Composer |
f1760 | 5c 50 6c 75 67 69 6e 3b 0a 0a 0a 0a 0a 0a 0a 63 6c 61 73 73 20 50 6c 75 67 69 6e 45 76 65 6e 74 | \Plugin;.......class.PluginEvent |
f1780 | 73 0a 7b 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 49 4e 49 54 20 3d 20 | s.{.........public.const.INIT.=. |
f17a0 | 27 69 6e 69 74 27 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 43 4f | 'init';..........public.const.CO |
f17c0 | 4d 4d 41 4e 44 20 3d 20 27 63 6f 6d 6d 61 6e 64 27 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c | MMAND.=.'command';..........publ |
f17e0 | 69 63 20 63 6f 6e 73 74 20 50 52 45 5f 46 49 4c 45 5f 44 4f 57 4e 4c 4f 41 44 20 3d 20 27 70 72 | ic.const.PRE_FILE_DOWNLOAD.=.'pr |
f1800 | 65 2d 66 69 6c 65 2d 64 6f 77 6e 6c 6f 61 64 27 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 | e-file-download';..........publi |
f1820 | 63 20 63 6f 6e 73 74 20 50 4f 53 54 5f 46 49 4c 45 5f 44 4f 57 4e 4c 4f 41 44 20 3d 20 27 70 6f | c.const.POST_FILE_DOWNLOAD.=.'po |
f1840 | 73 74 2d 66 69 6c 65 2d 64 6f 77 6e 6c 6f 61 64 27 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c | st-file-download';..........publ |
f1860 | 69 63 20 63 6f 6e 73 74 20 50 52 45 5f 43 4f 4d 4d 41 4e 44 5f 52 55 4e 20 3d 20 27 70 72 65 2d | ic.const.PRE_COMMAND_RUN.=.'pre- |
f1880 | 63 6f 6d 6d 61 6e 64 2d 72 75 6e 27 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 63 | command-run';...........public.c |
f18a0 | 6f 6e 73 74 20 50 52 45 5f 50 4f 4f 4c 5f 43 52 45 41 54 45 20 3d 20 27 70 72 65 2d 70 6f 6f 6c | onst.PRE_POOL_CREATE.=.'pre-pool |
f18c0 | 2d 63 72 65 61 74 65 27 3b 0a 7d 0a 3c 3f 70 68 70 20 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 | -create';.}.<?php.declare(strict |
f18e0 | 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 | _types=1);............namespace. |
f1900 | 43 6f 6d 70 6f 73 65 72 5c 50 6c 75 67 69 6e 3b 0a 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 | Composer\Plugin;..use.Composer\C |
f1920 | 6f 6d 70 6f 73 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 4f 5c 49 4f 49 6e 74 65 72 | omposer;.use.Composer\IO\IOInter |
f1940 | 66 61 63 65 3b 0a 0a 0a 0a 0a 0a 0a 69 6e 74 65 72 66 61 63 65 20 50 6c 75 67 69 6e 49 6e 74 65 | face;.......interface.PluginInte |
f1960 | 72 66 61 63 65 0a 7b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 63 6f 6e 73 74 20 50 | rface.{...........public.const.P |
f1980 | 4c 55 47 49 4e 5f 41 50 49 5f 56 45 52 53 49 4f 4e 20 3d 20 27 32 2e 33 2e 30 27 3b 0a 0a 0a 0a | LUGIN_API_VERSION.=.'2.3.0';.... |
f19a0 | 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 61 63 74 69 76 61 74 65 28 43 6f 6d | ....public.function.activate(Com |
f19c0 | 70 6f 73 65 72 20 24 63 6f 6d 70 6f 73 65 72 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 20 24 69 6f | poser.$composer,.IOInterface.$io |
f19e0 | 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 64 65 | );............public.function.de |
f1a00 | 61 63 74 69 76 61 74 65 28 43 6f 6d 70 6f 73 65 72 20 24 63 6f 6d 70 6f 73 65 72 2c 20 49 4f 49 | activate(Composer.$composer,.IOI |
f1a20 | 6e 74 65 72 66 61 63 65 20 24 69 6f 29 3b 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 | nterface.$io);..........public.f |
f1a40 | 75 6e 63 74 69 6f 6e 20 75 6e 69 6e 73 74 61 6c 6c 28 43 6f 6d 70 6f 73 65 72 20 24 63 6f 6d 70 | unction.uninstall(Composer.$comp |
f1a60 | 6f 73 65 72 2c 20 49 4f 49 6e 74 65 72 66 61 63 65 20 24 69 6f 29 3b 0a 7d 0a 3c 3f 70 68 70 20 | oser,.IOInterface.$io);.}.<?php. |
f1a80 | 64 65 63 6c 61 72 65 28 73 74 72 69 63 74 5f 74 79 70 65 73 3d 31 29 3b 0a 0a 0a 0a 0a 0a 0a 0a | declare(strict_types=1);........ |
f1aa0 | 0a 0a 0a 0a 6e 61 6d 65 73 70 61 63 65 20 43 6f 6d 70 6f 73 65 72 5c 50 6c 75 67 69 6e 3b 0a 0a | ....namespace.Composer\Plugin;.. |
f1ac0 | 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 43 6f 6d 70 6f 73 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f | use.Composer\Composer;.use.Compo |
f1ae0 | 73 65 72 5c 45 76 65 6e 74 44 69 73 70 61 74 63 68 65 72 5c 45 76 65 6e 74 53 75 62 73 63 72 69 | ser\EventDispatcher\EventSubscri |
f1b00 | 62 65 72 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 49 6e 73 74 61 | berInterface;.use.Composer\Insta |
f1b20 | 6c 6c 65 72 5c 49 6e 73 74 61 6c 6c 65 72 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d | ller\InstallerInterface;.use.Com |
f1b40 | 70 6f 73 65 72 5c 49 4f 5c 49 4f 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 | poser\IO\IOInterface;.use.Compos |
f1b60 | 65 72 5c 50 61 63 6b 61 67 65 5c 42 61 73 65 50 61 63 6b 61 67 65 3b 0a 75 73 65 20 43 6f 6d 70 | er\Package\BasePackage;.use.Comp |
f1b80 | 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 43 6f 6d 70 6c 65 74 65 50 61 63 6b 61 67 65 3b 0a 75 73 | oser\Package\CompletePackage;.us |
f1ba0 | 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 4c 6f 63 6b 65 72 3b 0a 75 73 65 20 43 | e.Composer\Package\Locker;.use.C |
f1bc0 | 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 50 61 63 6b 61 67 65 3b 0a 75 73 65 20 43 6f 6d | omposer\Package\Package;.use.Com |
f1be0 | 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 56 65 72 73 69 6f 6e 5c 56 65 72 73 69 6f 6e 50 61 72 | poser\Package\Version\VersionPar |
f1c00 | 73 65 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 72 74 69 61 6c 43 6f 6d 70 6f 73 65 | ser;.use.Composer\PartialCompose |
f1c20 | 72 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 63 72 65 5c 50 72 65 67 3b 0a 75 73 65 20 43 | r;.use.Composer\Pcre\Preg;.use.C |
f1c40 | 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 52 65 70 6f 73 69 74 6f 72 79 49 6e 74 | omposer\Repository\RepositoryInt |
f1c60 | 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c | erface;.use.Composer\Repository\ |
f1c80 | 49 6e 73 74 61 6c 6c 65 64 52 65 70 6f 73 69 74 6f 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 | InstalledRepository;.use.Compose |
f1ca0 | 72 5c 52 65 70 6f 73 69 74 6f 72 79 5c 52 6f 6f 74 50 61 63 6b 61 67 65 52 65 70 6f 73 69 74 6f | r\Repository\RootPackageReposito |
f1cc0 | 72 79 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c 50 61 63 6b 61 67 65 | ry;.use.Composer\Package\Package |
f1ce0 | 49 6e 74 65 72 66 61 63 65 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 61 63 6b 61 67 65 5c | Interface;.use.Composer\Package\ |
f1d00 | 4c 69 6e 6b 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 53 65 6d 76 65 72 5c 43 6f 6e 73 74 72 | Link;.use.Composer\Semver\Constr |
f1d20 | 61 69 6e 74 5c 43 6f 6e 73 74 72 61 69 6e 74 3b 0a 75 73 65 20 43 6f 6d 70 6f 73 65 72 5c 50 6c | aint\Constraint;.use.Composer\Pl |
f1d40 | 75 67 69 6e 5c 43 61 70 61 62 69 6c 69 74 79 5c 43 61 70 61 62 69 6c 69 74 79 3b 0a 75 73 65 20 | ugin\Capability\Capability;.use. |
f1d60 | 43 6f 6d 70 6f 73 65 72 5c 55 74 69 6c 5c 50 61 63 6b 61 67 65 53 6f 72 74 65 72 3b 0a 0a 0a 0a | Composer\Util\PackageSorter;.... |
f1d80 | 0a 0a 0a 0a 63 6c 61 73 73 20 50 6c 75 67 69 6e 4d 61 6e 61 67 65 72 0a 7b 0a 0a 70 72 6f 74 65 | ....class.PluginManager.{..prote |
f1da0 | 63 74 65 64 20 24 63 6f 6d 70 6f 73 65 72 3b 0a 0a 70 72 6f 74 65 63 74 65 64 20 24 69 6f 3b 0a | cted.$composer;..protected.$io;. |
f1dc0 | 0a 70 72 6f 74 65 63 74 65 64 20 24 67 6c 6f 62 61 6c 43 6f 6d 70 6f 73 65 72 3b 0a 0a 70 72 6f | .protected.$globalComposer;..pro |
f1de0 | 74 65 63 74 65 64 20 24 76 65 72 73 69 6f 6e 50 61 72 73 65 72 3b 0a 0a 70 72 6f 74 65 63 74 65 | tected.$versionParser;..protecte |
f1e00 | 64 20 24 64 69 73 61 62 6c 65 50 6c 75 67 69 6e 73 20 3d 20 66 61 6c 73 65 3b 0a 0a 0a 70 72 6f | d.$disablePlugins.=.false;...pro |
f1e20 | 74 65 63 74 65 64 20 24 70 6c 75 67 69 6e 73 20 3d 20 5b 5d 3b 0a 0a 70 72 6f 74 65 63 74 65 64 | tected.$plugins.=.[];..protected |
f1e40 | 20 24 72 65 67 69 73 74 65 72 65 64 50 6c 75 67 69 6e 73 20 3d 20 5b 5d 3b 0a 0a 0a 0a 0a 70 72 | .$registeredPlugins.=.[];.....pr |
f1e60 | 69 76 61 74 65 20 24 61 6c 6c 6f 77 50 6c 75 67 69 6e 52 75 6c 65 73 3b 0a 0a 0a 0a 0a 70 72 69 | ivate.$allowPluginRules;.....pri |
f1e80 | 76 61 74 65 20 24 61 6c 6c 6f 77 47 6c 6f 62 61 6c 50 6c 75 67 69 6e 52 75 6c 65 73 3b 0a 0a 0a | vate.$allowGlobalPluginRules;... |
f1ea0 | 70 72 69 76 61 74 65 20 24 72 75 6e 6e 69 6e 67 49 6e 47 6c 6f 62 61 6c 44 69 72 20 3d 20 66 61 | private.$runningInGlobalDir.=.fa |
f1ec0 | 6c 73 65 3b 0a 0a 0a 70 72 69 76 61 74 65 20 73 74 61 74 69 63 20 24 63 6c 61 73 73 43 6f 75 6e | lse;...private.static.$classCoun |
f1ee0 | 74 65 72 20 3d 20 30 3b 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 5f 5f 63 | ter.=.0;.....public.function.__c |
f1f00 | 6f 6e 73 74 72 75 63 74 28 49 4f 49 6e 74 65 72 66 61 63 65 20 24 69 6f 2c 20 43 6f 6d 70 6f 73 | onstruct(IOInterface.$io,.Compos |
f1f20 | 65 72 20 24 63 6f 6d 70 6f 73 65 72 2c 20 3f 50 61 72 74 69 61 6c 43 6f 6d 70 6f 73 65 72 20 24 | er.$composer,.?PartialComposer.$ |
f1f40 | 67 6c 6f 62 61 6c 43 6f 6d 70 6f 73 65 72 20 3d 20 6e 75 6c 6c 2c 20 24 64 69 73 61 62 6c 65 50 | globalComposer.=.null,.$disableP |
f1f60 | 6c 75 67 69 6e 73 20 3d 20 66 61 6c 73 65 29 0a 7b 0a 24 74 68 69 73 2d 3e 69 6f 20 3d 20 24 69 | lugins.=.false).{.$this->io.=.$i |
f1f80 | 6f 3b 0a 24 74 68 69 73 2d 3e 63 6f 6d 70 6f 73 65 72 20 3d 20 24 63 6f 6d 70 6f 73 65 72 3b 0a | o;.$this->composer.=.$composer;. |
f1fa0 | 24 74 68 69 73 2d 3e 67 6c 6f 62 61 6c 43 6f 6d 70 6f 73 65 72 20 3d 20 24 67 6c 6f 62 61 6c 43 | $this->globalComposer.=.$globalC |
f1fc0 | 6f 6d 70 6f 73 65 72 3b 0a 24 74 68 69 73 2d 3e 76 65 72 73 69 6f 6e 50 61 72 73 65 72 20 3d 20 | omposer;.$this->versionParser.=. |
f1fe0 | 6e 65 77 20 56 65 72 73 69 6f 6e 50 61 72 73 65 72 28 29 3b 0a 24 74 68 69 73 2d 3e 64 69 73 61 | new.VersionParser();.$this->disa |
f2000 | 62 6c 65 50 6c 75 67 69 6e 73 20 3d 20 24 64 69 73 61 62 6c 65 50 6c 75 67 69 6e 73 3b 0a 24 74 | blePlugins.=.$disablePlugins;.$t |
f2020 | 68 69 73 2d 3e 61 6c 6c 6f 77 50 6c 75 67 69 6e 52 75 6c 65 73 20 3d 20 24 74 68 69 73 2d 3e 70 | his->allowPluginRules.=.$this->p |
f2040 | 61 72 73 65 41 6c 6c 6f 77 65 64 50 6c 75 67 69 6e 73 28 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 | arseAllowedPlugins($composer->ge |
f2060 | 74 43 6f 6e 66 69 67 28 29 2d 3e 67 65 74 28 27 61 6c 6c 6f 77 2d 70 6c 75 67 69 6e 73 27 29 2c | tConfig()->get('allow-plugins'), |
f2080 | 20 24 63 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 4c 6f 63 6b 65 72 28 29 29 3b 0a 24 74 68 69 73 2d | .$composer->getLocker());.$this- |
f20a0 | 3e 61 6c 6c 6f 77 47 6c 6f 62 61 6c 50 6c 75 67 69 6e 52 75 6c 65 73 20 3d 20 24 74 68 69 73 2d | >allowGlobalPluginRules.=.$this- |
f20c0 | 3e 70 61 72 73 65 41 6c 6c 6f 77 65 64 50 6c 75 67 69 6e 73 28 24 67 6c 6f 62 61 6c 43 6f 6d 70 | >parseAllowedPlugins($globalComp |
f20e0 | 6f 73 65 72 20 21 3d 3d 20 6e 75 6c 6c 20 3f 20 24 67 6c 6f 62 61 6c 43 6f 6d 70 6f 73 65 72 2d | oser.!==.null.?.$globalComposer- |
f2100 | 3e 67 65 74 43 6f 6e 66 69 67 28 29 2d 3e 67 65 74 28 27 61 6c 6c 6f 77 2d 70 6c 75 67 69 6e 73 | >getConfig()->get('allow-plugins |
f2120 | 27 29 20 3a 20 66 61 6c 73 65 29 3b 0a 7d 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 | ').:.false);.}..public.function. |
f2140 | 73 65 74 52 75 6e 6e 69 6e 67 49 6e 47 6c 6f 62 61 6c 44 69 72 28 62 6f 6f 6c 20 24 72 75 6e 6e | setRunningInGlobalDir(bool.$runn |
f2160 | 69 6e 67 49 6e 47 6c 6f 62 61 6c 44 69 72 29 3a 20 76 6f 69 64 0a 7b 0a 24 74 68 69 73 2d 3e 72 | ingInGlobalDir):.void.{.$this->r |
f2180 | 75 6e 6e 69 6e 67 49 6e 47 6c 6f 62 61 6c 44 69 72 20 3d 20 24 72 75 6e 6e 69 6e 67 49 6e 47 6c | unningInGlobalDir.=.$runningInGl |
f21a0 | 6f 62 61 6c 44 69 72 3b 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 6c | obalDir;.}.....public.function.l |
f21c0 | 6f 61 64 49 6e 73 74 61 6c 6c 65 64 50 6c 75 67 69 6e 73 28 29 3a 20 76 6f 69 64 0a 7b 0a 69 66 | oadInstalledPlugins():.void.{.if |
f21e0 | 20 28 21 24 74 68 69 73 2d 3e 61 72 65 50 6c 75 67 69 6e 73 44 69 73 61 62 6c 65 64 28 27 6c 6f | .(!$this->arePluginsDisabled('lo |
f2200 | 63 61 6c 27 29 29 20 7b 0a 24 72 65 70 6f 20 3d 20 24 74 68 69 73 2d 3e 63 6f 6d 70 6f 73 65 72 | cal')).{.$repo.=.$this->composer |
f2220 | 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 79 4d 61 6e 61 67 65 72 28 29 2d 3e 67 65 74 4c 6f 63 | ->getRepositoryManager()->getLoc |
f2240 | 61 6c 52 65 70 6f 73 69 74 6f 72 79 28 29 3b 0a 24 74 68 69 73 2d 3e 6c 6f 61 64 52 65 70 6f 73 | alRepository();.$this->loadRepos |
f2260 | 69 74 6f 72 79 28 24 72 65 70 6f 2c 20 66 61 6c 73 65 29 3b 0a 7d 0a 0a 69 66 20 28 24 74 68 69 | itory($repo,.false);.}..if.($thi |
f2280 | 73 2d 3e 67 6c 6f 62 61 6c 43 6f 6d 70 6f 73 65 72 20 21 3d 3d 20 6e 75 6c 6c 20 26 26 20 21 24 | s->globalComposer.!==.null.&&.!$ |
f22a0 | 74 68 69 73 2d 3e 61 72 65 50 6c 75 67 69 6e 73 44 69 73 61 62 6c 65 64 28 27 67 6c 6f 62 61 6c | this->arePluginsDisabled('global |
f22c0 | 27 29 29 20 7b 0a 24 74 68 69 73 2d 3e 6c 6f 61 64 52 65 70 6f 73 69 74 6f 72 79 28 24 74 68 69 | ')).{.$this->loadRepository($thi |
f22e0 | 73 2d 3e 67 6c 6f 62 61 6c 43 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 79 | s->globalComposer->getRepository |
f2300 | 4d 61 6e 61 67 65 72 28 29 2d 3e 67 65 74 4c 6f 63 61 6c 52 65 70 6f 73 69 74 6f 72 79 28 29 2c | Manager()->getLocalRepository(), |
f2320 | 20 74 72 75 65 29 3b 0a 7d 0a 7d 0a 0a 0a 0a 0a 70 75 62 6c 69 63 20 66 75 6e 63 74 69 6f 6e 20 | .true);.}.}.....public.function. |
f2340 | 64 65 61 63 74 69 76 61 74 65 49 6e 73 74 61 6c 6c 65 64 50 6c 75 67 69 6e 73 28 29 3a 20 76 6f | deactivateInstalledPlugins():.vo |
f2360 | 69 64 0a 7b 0a 69 66 20 28 21 24 74 68 69 73 2d 3e 61 72 65 50 6c 75 67 69 6e 73 44 69 73 61 62 | id.{.if.(!$this->arePluginsDisab |
f2380 | 6c 65 64 28 27 6c 6f 63 61 6c 27 29 29 20 7b 0a 24 72 65 70 6f 20 3d 20 24 74 68 69 73 2d 3e 63 | led('local')).{.$repo.=.$this->c |
f23a0 | 6f 6d 70 6f 73 65 72 2d 3e 67 65 74 52 65 70 6f 73 69 74 6f 72 79 4d 61 6e 61 67 65 72 28 29 2d | omposer->getRepositoryManager()- |
f23c0 | 3e 67 65 74 4c 6f 63 61 6c 52 65 70 6f 73 69 74 6f 72 79 28 29 3b 0a 24 74 68 69 73 2d 3e 64 65 | >getLocalRepository();.$this->de |
f23e0 | 61 63 74 69 76 61 74 65 52 65 70 6f 73 69 74 6f 72 79 28 24 72 65 70 6f 2c 20 66 61 6c 73 65 29 | activateRepository($repo,.false) |
f2400 | 3b 0a 7d 0a 0a 69 66 20 28 24 74 68 69 73 2d 3e 67 6c 6f 62 61 6c 43 6f 6d 70 6f 73 65 72 20 21 | ;.}..if.($this->globalComposer.! |
f2420 | 3d 3d 20 6e 75 6c 6c 20 26 26 20 21 24 74 68 69 73 2d 3e 61 72 65 50 6c 75 67 69 6e 73 44 69 73 | ==.null.&&.!$this->arePluginsDis |
f2440 | 61 62 6c 65 64 28 27 67 6c 6f 62 61 6c 27 29 29 20 7b 0a 24 74 68 69 73 2d 3e 64 65 61 63 74 69 | abled('global')).{.$this->deacti |
f2460 | 76 61 74 65 52 65 70 6f 73 69 74 6f 72 79 28 24 74 68 69 73 2d 3e 67 6c 6f 62 61 6c 43 6f 6d 70 | vateRepository($this->globalComp |
f2480 | |