dependabot-composer 0.127.1 → 0.129.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e841c24fd3c6b1b37ea06283f5e30900b7aa533eac45b6868a4af3a096351ce7
4
- data.tar.gz: dd2dc1cc95fe7d2ff6c5e7e4119ad300e5c234d52e833a70322a41f9859fd2fe
3
+ metadata.gz: 931d14a3a9a222959c3a3598607123335f9157a313fa40f7db9c83dc08a4b2bb
4
+ data.tar.gz: d5c0645abff9d914bdd61b2befca8c86a56740a1241d580d5f1c71db96940151
5
5
  SHA512:
6
- metadata.gz: 504c993fb08b3f21957193933097f6b13a938d2fef6b167df67c9ac729cf11135ed88798dafcfb24bc045ef35a936b3f89c77c50340ee67e733850426c979464
7
- data.tar.gz: 60444e4071fba31e1083523f0a0184b0ba082f49df506c59273b855173ca72b9b62e214f3e820e5b3ab096b79fc424da7b6b51307099088deceaedc2914c0361
6
+ metadata.gz: 27bb2ffe07e40f9321d9ee1beecca7d923d65de4f685f91011c3027d5aa4dd87b07a86bfeff5ef5c305250a8cb65d12f4b421e726517df8292ffe193459b3097
7
+ data.tar.gz: 3e7752f61e212b3e97daaaef8ef9fc85b22689eabe0245746ee948e8995b3b8dc6da0baf089bc1e2f2a418d35d4430958bc3e579601561f0ec15325023913390
File without changes
File without changes
@@ -0,0 +1,20 @@
1
+ #!/bin/bash
2
+
3
+ set -e
4
+
5
+ install_dir=$1
6
+ if [ -z "$install_dir" ]; then
7
+ echo "usage: $0 INSTALL_DIR"
8
+ exit 1
9
+ fi
10
+
11
+ helpers_dir="$(dirname "${BASH_SOURCE[0]}")"
12
+ cd "$helpers_dir"
13
+
14
+ composer1 validate --no-check-publish
15
+ composer1 install
16
+ composer1 run lint -- --dry-run
17
+ composer1 run stan
18
+
19
+ # Composer caches source zips and repo metadata, none of which is useful. Save space in this layer
20
+ rm -Rf ~/.composer/cache
@@ -78,16 +78,16 @@
78
78
  },
79
79
  {
80
80
  "name": "composer/composer",
81
- "version": "1.10.16",
81
+ "version": "1.10.19",
82
82
  "source": {
83
83
  "type": "git",
84
84
  "url": "https://github.com/composer/composer.git",
85
- "reference": "217f0272673c72087862c40cf91ac07eb438d778"
85
+ "reference": "196601d50c08c3fae389a417a7689367fcf37cef"
86
86
  },
87
87
  "dist": {
88
88
  "type": "zip",
89
- "url": "https://api.github.com/repos/composer/composer/zipball/217f0272673c72087862c40cf91ac07eb438d778",
90
- "reference": "217f0272673c72087862c40cf91ac07eb438d778",
89
+ "url": "https://api.github.com/repos/composer/composer/zipball/196601d50c08c3fae389a417a7689367fcf37cef",
90
+ "reference": "196601d50c08c3fae389a417a7689367fcf37cef",
91
91
  "shasum": ""
92
92
  },
93
93
  "require": {
@@ -96,7 +96,7 @@
96
96
  "composer/spdx-licenses": "^1.2",
97
97
  "composer/xdebug-handler": "^1.1",
98
98
  "justinrainbow/json-schema": "^5.2.10",
99
- "php": "^5.3.2 || ^7.0",
99
+ "php": "^5.3.2 || ^7.0 || ^8.0",
100
100
  "psr/log": "^1.0",
101
101
  "seld/jsonlint": "^1.4",
102
102
  "seld/phar-utils": "^1.0",
@@ -168,7 +168,7 @@
168
168
  "type": "tidelift"
169
169
  }
170
170
  ],
171
- "time": "2020-10-24T07:55:59+00:00"
171
+ "time": "2020-12-04T08:14:16+00:00"
172
172
  },
173
173
  {
174
174
  "name": "composer/semver",
@@ -247,16 +247,16 @@
247
247
  },
248
248
  {
249
249
  "name": "composer/spdx-licenses",
250
- "version": "1.5.4",
250
+ "version": "1.5.5",
251
251
  "source": {
252
252
  "type": "git",
253
253
  "url": "https://github.com/composer/spdx-licenses.git",
254
- "reference": "6946f785871e2314c60b4524851f3702ea4f2223"
254
+ "reference": "de30328a7af8680efdc03e396aad24befd513200"
255
255
  },
256
256
  "dist": {
257
257
  "type": "zip",
258
- "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/6946f785871e2314c60b4524851f3702ea4f2223",
259
- "reference": "6946f785871e2314c60b4524851f3702ea4f2223",
258
+ "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/de30328a7af8680efdc03e396aad24befd513200",
259
+ "reference": "de30328a7af8680efdc03e396aad24befd513200",
260
260
  "shasum": ""
261
261
  },
262
262
  "require": {
@@ -268,7 +268,7 @@
268
268
  "type": "library",
269
269
  "extra": {
270
270
  "branch-alias": {
271
- "dev-master": "1.x-dev"
271
+ "dev-main": "1.x-dev"
272
272
  }
273
273
  },
274
274
  "autoload": {
@@ -317,7 +317,7 @@
317
317
  "type": "tidelift"
318
318
  }
319
319
  ],
320
- "time": "2020-07-15T15:35:07+00:00"
320
+ "time": "2020-12-03T16:04:16+00:00"
321
321
  },
322
322
  {
323
323
  "name": "composer/xdebug-handler",
@@ -541,16 +541,16 @@
541
541
  },
542
542
  {
543
543
  "name": "seld/jsonlint",
544
- "version": "1.8.2",
544
+ "version": "1.8.3",
545
545
  "source": {
546
546
  "type": "git",
547
547
  "url": "https://github.com/Seldaek/jsonlint.git",
548
- "reference": "590cfec960b77fd55e39b7d9246659e95dd6d337"
548
+ "reference": "9ad6ce79c342fbd44df10ea95511a1b24dee5b57"
549
549
  },
550
550
  "dist": {
551
551
  "type": "zip",
552
- "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/590cfec960b77fd55e39b7d9246659e95dd6d337",
553
- "reference": "590cfec960b77fd55e39b7d9246659e95dd6d337",
552
+ "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/9ad6ce79c342fbd44df10ea95511a1b24dee5b57",
553
+ "reference": "9ad6ce79c342fbd44df10ea95511a1b24dee5b57",
554
554
  "shasum": ""
555
555
  },
556
556
  "require": {
@@ -596,7 +596,7 @@
596
596
  "type": "tidelift"
597
597
  }
598
598
  ],
599
- "time": "2020-08-25T06:56:57+00:00"
599
+ "time": "2020-11-11T09:19:24+00:00"
600
600
  },
601
601
  {
602
602
  "name": "seld/phar-utils",
@@ -644,16 +644,16 @@
644
644
  },
645
645
  {
646
646
  "name": "symfony/console",
647
- "version": "v5.2.0",
647
+ "version": "v5.2.1",
648
648
  "source": {
649
649
  "type": "git",
650
650
  "url": "https://github.com/symfony/console.git",
651
- "reference": "3e0564fb08d44a98bd5f1960204c958e57bd586b"
651
+ "reference": "47c02526c532fb381374dab26df05e7313978976"
652
652
  },
653
653
  "dist": {
654
654
  "type": "zip",
655
- "url": "https://api.github.com/repos/symfony/console/zipball/3e0564fb08d44a98bd5f1960204c958e57bd586b",
656
- "reference": "3e0564fb08d44a98bd5f1960204c958e57bd586b",
655
+ "url": "https://api.github.com/repos/symfony/console/zipball/47c02526c532fb381374dab26df05e7313978976",
656
+ "reference": "47c02526c532fb381374dab26df05e7313978976",
657
657
  "shasum": ""
658
658
  },
659
659
  "require": {
@@ -734,20 +734,20 @@
734
734
  "type": "tidelift"
735
735
  }
736
736
  ],
737
- "time": "2020-11-28T11:24:18+00:00"
737
+ "time": "2020-12-18T08:03:05+00:00"
738
738
  },
739
739
  {
740
740
  "name": "symfony/filesystem",
741
- "version": "v5.2.0",
741
+ "version": "v5.2.1",
742
742
  "source": {
743
743
  "type": "git",
744
744
  "url": "https://github.com/symfony/filesystem.git",
745
- "reference": "bb92ba7f38b037e531908590a858a04d85c0e238"
745
+ "reference": "fa8f8cab6b65e2d99a118e082935344c5ba8c60d"
746
746
  },
747
747
  "dist": {
748
748
  "type": "zip",
749
- "url": "https://api.github.com/repos/symfony/filesystem/zipball/bb92ba7f38b037e531908590a858a04d85c0e238",
750
- "reference": "bb92ba7f38b037e531908590a858a04d85c0e238",
749
+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/fa8f8cab6b65e2d99a118e082935344c5ba8c60d",
750
+ "reference": "fa8f8cab6b65e2d99a118e082935344c5ba8c60d",
751
751
  "shasum": ""
752
752
  },
753
753
  "require": {
@@ -793,20 +793,20 @@
793
793
  "type": "tidelift"
794
794
  }
795
795
  ],
796
- "time": "2020-11-12T09:58:18+00:00"
796
+ "time": "2020-11-30T17:05:38+00:00"
797
797
  },
798
798
  {
799
799
  "name": "symfony/finder",
800
- "version": "v5.2.0",
800
+ "version": "v5.2.1",
801
801
  "source": {
802
802
  "type": "git",
803
803
  "url": "https://github.com/symfony/finder.git",
804
- "reference": "fd8305521692f27eae3263895d1ef1571c71a78d"
804
+ "reference": "0b9231a5922fd7287ba5b411893c0ecd2733e5ba"
805
805
  },
806
806
  "dist": {
807
807
  "type": "zip",
808
- "url": "https://api.github.com/repos/symfony/finder/zipball/fd8305521692f27eae3263895d1ef1571c71a78d",
809
- "reference": "fd8305521692f27eae3263895d1ef1571c71a78d",
808
+ "url": "https://api.github.com/repos/symfony/finder/zipball/0b9231a5922fd7287ba5b411893c0ecd2733e5ba",
809
+ "reference": "0b9231a5922fd7287ba5b411893c0ecd2733e5ba",
810
810
  "shasum": ""
811
811
  },
812
812
  "require": {
@@ -851,7 +851,7 @@
851
851
  "type": "tidelift"
852
852
  }
853
853
  ],
854
- "time": "2020-11-18T09:42:36+00:00"
854
+ "time": "2020-12-08T17:02:38+00:00"
855
855
  },
856
856
  {
857
857
  "name": "symfony/polyfill-ctype",
@@ -1323,16 +1323,16 @@
1323
1323
  },
1324
1324
  {
1325
1325
  "name": "symfony/process",
1326
- "version": "v5.2.0",
1326
+ "version": "v5.2.1",
1327
1327
  "source": {
1328
1328
  "type": "git",
1329
1329
  "url": "https://github.com/symfony/process.git",
1330
- "reference": "240e74140d4d956265048f3025c0aecbbc302d54"
1330
+ "reference": "bd8815b8b6705298beaa384f04fabd459c10bedd"
1331
1331
  },
1332
1332
  "dist": {
1333
1333
  "type": "zip",
1334
- "url": "https://api.github.com/repos/symfony/process/zipball/240e74140d4d956265048f3025c0aecbbc302d54",
1335
- "reference": "240e74140d4d956265048f3025c0aecbbc302d54",
1334
+ "url": "https://api.github.com/repos/symfony/process/zipball/bd8815b8b6705298beaa384f04fabd459c10bedd",
1335
+ "reference": "bd8815b8b6705298beaa384f04fabd459c10bedd",
1336
1336
  "shasum": ""
1337
1337
  },
1338
1338
  "require": {
@@ -1378,7 +1378,7 @@
1378
1378
  "type": "tidelift"
1379
1379
  }
1380
1380
  ],
1381
- "time": "2020-11-02T15:47:15+00:00"
1381
+ "time": "2020-12-08T17:03:37+00:00"
1382
1382
  },
1383
1383
  {
1384
1384
  "name": "symfony/service-contracts",
@@ -1458,16 +1458,16 @@
1458
1458
  },
1459
1459
  {
1460
1460
  "name": "symfony/string",
1461
- "version": "v5.2.0",
1461
+ "version": "v5.2.1",
1462
1462
  "source": {
1463
1463
  "type": "git",
1464
1464
  "url": "https://github.com/symfony/string.git",
1465
- "reference": "40e975edadd4e32cd16f3753b3bad65d9ac48242"
1465
+ "reference": "5bd67751d2e3f7d6f770c9154b8fbcb2aa05f7ed"
1466
1466
  },
1467
1467
  "dist": {
1468
1468
  "type": "zip",
1469
- "url": "https://api.github.com/repos/symfony/string/zipball/40e975edadd4e32cd16f3753b3bad65d9ac48242",
1470
- "reference": "40e975edadd4e32cd16f3753b3bad65d9ac48242",
1469
+ "url": "https://api.github.com/repos/symfony/string/zipball/5bd67751d2e3f7d6f770c9154b8fbcb2aa05f7ed",
1470
+ "reference": "5bd67751d2e3f7d6f770c9154b8fbcb2aa05f7ed",
1471
1471
  "shasum": ""
1472
1472
  },
1473
1473
  "require": {
@@ -1534,7 +1534,7 @@
1534
1534
  "type": "tidelift"
1535
1535
  }
1536
1536
  ],
1537
- "time": "2020-10-24T12:08:07+00:00"
1537
+ "time": "2020-12-05T07:33:16+00:00"
1538
1538
  }
1539
1539
  ],
1540
1540
  "packages-dev": [
@@ -1687,16 +1687,16 @@
1687
1687
  },
1688
1688
  {
1689
1689
  "name": "friendsofphp/php-cs-fixer",
1690
- "version": "v2.17.1",
1690
+ "version": "v2.17.2",
1691
1691
  "source": {
1692
1692
  "type": "git",
1693
1693
  "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git",
1694
- "reference": "5198b7308ed63f26799387fd7f3901c3db6bd7fd"
1694
+ "reference": "aaee4f3d16a996fc0b570be0c69d3b80c909c507"
1695
1695
  },
1696
1696
  "dist": {
1697
1697
  "type": "zip",
1698
- "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/5198b7308ed63f26799387fd7f3901c3db6bd7fd",
1699
- "reference": "5198b7308ed63f26799387fd7f3901c3db6bd7fd",
1698
+ "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/aaee4f3d16a996fc0b570be0c69d3b80c909c507",
1699
+ "reference": "aaee4f3d16a996fc0b570be0c69d3b80c909c507",
1700
1700
  "shasum": ""
1701
1701
  },
1702
1702
  "require": {
@@ -1726,9 +1726,11 @@
1726
1726
  "php-cs-fixer/accessible-object": "^1.0",
1727
1727
  "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2",
1728
1728
  "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1",
1729
- "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.1",
1729
+ "phpspec/prophecy-phpunit": "^1.1 || ^2.0",
1730
+ "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.13 || ^9.4.4 <9.5",
1730
1731
  "phpunitgoodpractices/polyfill": "^1.5",
1731
1732
  "phpunitgoodpractices/traits": "^1.9.1",
1733
+ "sanmai/phpunit-legacy-adapter": "^6.4 || ^8.2.1",
1732
1734
  "symfony/phpunit-bridge": "^5.1",
1733
1735
  "symfony/yaml": "^3.0 || ^4.0 || ^5.0"
1734
1736
  },
@@ -1781,7 +1783,7 @@
1781
1783
  "type": "github"
1782
1784
  }
1783
1785
  ],
1784
- "time": "2020-12-08T13:47:02+00:00"
1786
+ "time": "2020-12-17T16:41:55+00:00"
1785
1787
  },
1786
1788
  {
1787
1789
  "name": "php-cs-fixer/diff",
@@ -1836,16 +1838,16 @@
1836
1838
  },
1837
1839
  {
1838
1840
  "name": "phpstan/phpstan",
1839
- "version": "0.12.59",
1841
+ "version": "0.12.63",
1840
1842
  "source": {
1841
1843
  "type": "git",
1842
1844
  "url": "https://github.com/phpstan/phpstan.git",
1843
- "reference": "cf4107257c8ca2ad967efdd6a00f12b21acbb779"
1845
+ "reference": "c97ec4754bd53099a06c24847bd2870b99966b6a"
1844
1846
  },
1845
1847
  "dist": {
1846
1848
  "type": "zip",
1847
- "url": "https://api.github.com/repos/phpstan/phpstan/zipball/cf4107257c8ca2ad967efdd6a00f12b21acbb779",
1848
- "reference": "cf4107257c8ca2ad967efdd6a00f12b21acbb779",
1849
+ "url": "https://api.github.com/repos/phpstan/phpstan/zipball/c97ec4754bd53099a06c24847bd2870b99966b6a",
1850
+ "reference": "c97ec4754bd53099a06c24847bd2870b99966b6a",
1849
1851
  "shasum": ""
1850
1852
  },
1851
1853
  "require": {
@@ -1888,7 +1890,7 @@
1888
1890
  "type": "tidelift"
1889
1891
  }
1890
1892
  ],
1891
- "time": "2020-12-07T14:46:03+00:00"
1893
+ "time": "2020-12-15T16:37:16+00:00"
1892
1894
  },
1893
1895
  {
1894
1896
  "name": "psr/event-dispatcher",
@@ -2002,16 +2004,16 @@
2002
2004
  },
2003
2005
  {
2004
2006
  "name": "symfony/event-dispatcher",
2005
- "version": "v5.2.0",
2007
+ "version": "v5.2.1",
2006
2008
  "source": {
2007
2009
  "type": "git",
2008
2010
  "url": "https://github.com/symfony/event-dispatcher.git",
2009
- "reference": "aa13a09811e6d2ad43f8fb336bebdb7691d85d3c"
2011
+ "reference": "1c93f7a1dff592c252574c79a8635a8a80856042"
2010
2012
  },
2011
2013
  "dist": {
2012
2014
  "type": "zip",
2013
- "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/aa13a09811e6d2ad43f8fb336bebdb7691d85d3c",
2014
- "reference": "aa13a09811e6d2ad43f8fb336bebdb7691d85d3c",
2015
+ "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/1c93f7a1dff592c252574c79a8635a8a80856042",
2016
+ "reference": "1c93f7a1dff592c252574c79a8635a8a80856042",
2015
2017
  "shasum": ""
2016
2018
  },
2017
2019
  "require": {
@@ -2080,7 +2082,7 @@
2080
2082
  "type": "tidelift"
2081
2083
  }
2082
2084
  ],
2083
- "time": "2020-11-01T16:14:45+00:00"
2085
+ "time": "2020-12-18T08:03:05+00:00"
2084
2086
  },
2085
2087
  {
2086
2088
  "name": "symfony/event-dispatcher-contracts",
@@ -2160,7 +2162,7 @@
2160
2162
  },
2161
2163
  {
2162
2164
  "name": "symfony/options-resolver",
2163
- "version": "v5.2.0",
2165
+ "version": "v5.2.1",
2164
2166
  "source": {
2165
2167
  "type": "git",
2166
2168
  "url": "https://github.com/symfony/options-resolver.git",
@@ -2364,7 +2366,7 @@
2364
2366
  },
2365
2367
  {
2366
2368
  "name": "symfony/stopwatch",
2367
- "version": "v5.2.0",
2369
+ "version": "v5.2.1",
2368
2370
  "source": {
2369
2371
  "type": "git",
2370
2372
  "url": "https://github.com/symfony/stopwatch.git",
File without changes
File without changes
File without changes
@@ -0,0 +1,32 @@
1
+ <?php
2
+ $finder = PhpCsFixer\Finder::create()
3
+ ->in(__DIR__ . '/src')
4
+ ->in(__DIR__ . '/bin');
5
+ return PhpCsFixer\Config::create()
6
+ ->setRules([
7
+ '@Symfony' => true,
8
+ 'array_syntax' => ['syntax' => 'short'],
9
+ 'blank_line_after_opening_tag' => true,
10
+ 'concat_space' => ['spacing' => 'one'],
11
+ 'declare_strict_types' => true,
12
+ 'increment_style' => ['style' => 'post'],
13
+ 'is_null' => ['use_yoda_style' => false],
14
+ 'list_syntax' => ['syntax' => 'short'],
15
+ 'method_argument_space' => ['ensure_fully_multiline' => true],
16
+ 'modernize_types_casting' => true,
17
+ 'no_multiline_whitespace_before_semicolons' => true,
18
+ 'no_useless_else' => true,
19
+ 'no_useless_return' => true,
20
+ 'ordered_imports' => true,
21
+ 'php_unit_construct' => true,
22
+ 'php_unit_dedicate_assert' => true,
23
+ 'phpdoc_align' => false,
24
+ 'phpdoc_order' => true,
25
+ 'single_line_comment_style' => true,
26
+ 'ternary_to_null_coalescing' => true,
27
+ 'void_return' => true,
28
+ 'yoda_style' => false,
29
+ ])
30
+ ->setFinder($finder)
31
+ ->setUsingCache(true)
32
+ ->setRiskyAllowed(true);
@@ -0,0 +1,86 @@
1
+ #!/usr/bin/env php
2
+ <?php
3
+
4
+ declare(strict_types=1);
5
+
6
+ namespace Dependabot\Composer;
7
+
8
+ require __DIR__ . '/../vendor/autoload.php';
9
+
10
+ // Get details of the process to run from STDIN. It will have a `function`
11
+ // and an `args` method, as passed in by UpdateCheckers::Php
12
+ $request = json_decode(file_get_contents('php://stdin'), true);
13
+
14
+ function memoryInBytes($value) {
15
+ $unit = strtolower(substr($value, -1, 1));
16
+ $value = (int) $value;
17
+ if ($unit == 'g') {
18
+ $value *= (1024 * 1024 * 1024);
19
+ } elseif ($unit == 'm') {
20
+ $value *= (1024 * 1024);
21
+ } elseif ($unit == 'k') {
22
+ $value *= 1024;
23
+ }
24
+
25
+ return $value;
26
+ }
27
+
28
+ // Increase the default memory limit the same way Composer does (but clearer)
29
+ if (function_exists('ini_set')) {
30
+ $memoryLimit = trim(ini_get('memory_limit'));
31
+ // Increase memory_limit if it is lower than 1900MB
32
+ if ($memoryLimit != -1 && memoryInBytes($memoryLimit) < 1024 * 1024 * 1900) {
33
+ @ini_set('memory_limit', '1900M');
34
+ }
35
+
36
+ // Set user defined memory limit
37
+ if ($memoryLimit = getenv('COMPOSER_MEMORY_LIMIT')) {
38
+ @ini_set('memory_limit', $memoryLimit);
39
+ }
40
+ unset($memoryInBytes, $memoryLimit);
41
+ }
42
+
43
+ date_default_timezone_set('Europe/London');
44
+
45
+ // This storage is freed on error (case of allowed memory exhausted)
46
+ $memory = str_repeat('*', 1024 * 1024);
47
+
48
+ register_shutdown_function(function (): void {
49
+ global $memory;
50
+ $memory = null;
51
+ $error = error_get_last();
52
+ if (null !== $error) {
53
+ fwrite(STDOUT, json_encode(['error' => $error['message']]));
54
+ }
55
+ });
56
+
57
+ if ($memoryAlloc = getenv('DEPENDABOT_TEST_MEMORY_ALLOCATION')) {
58
+ str_repeat('*', memoryInBytes($memoryAlloc));
59
+ }
60
+
61
+ try {
62
+ switch ($request['function']) {
63
+ case 'update':
64
+ $updatedFiles = Updater::update($request['args']);
65
+ fwrite(STDOUT, json_encode(['result' => $updatedFiles]));
66
+ error_clear_last();
67
+ break;
68
+ case 'get_latest_resolvable_version':
69
+ $latestVersion = UpdateChecker::getLatestResolvableVersion($request['args']);
70
+ fwrite(STDOUT, json_encode(['result' => $latestVersion]));
71
+ error_clear_last();
72
+ break;
73
+ case 'get_content_hash':
74
+ $content_hash = Hasher::getContentHash($request['args']);
75
+ fwrite(STDOUT, json_encode(['result' => $content_hash]));
76
+ error_clear_last();
77
+ break;
78
+ default:
79
+ fwrite(STDOUT, json_encode(['error' => "Invalid function {$request['function']}"]));
80
+ exit(1);
81
+ }
82
+ } catch (\Exception $e) {
83
+ fwrite(STDOUT, json_encode(['error' => $e->getMessage()]));
84
+ error_clear_last();
85
+ exit(1);
86
+ }