totten / git-scan

CLI tool for scanning/updating git repos
33 stars 7 forks source link

Update Symfony to be 3.4 and also fix deprecated curly braces for arr… #17

Closed seamuslee001 closed 3 years ago

seamuslee001 commented 3 years ago

…ay access

ping @totten

totten commented 3 years ago

@seamuslee001 I updated the phpunit tests to work in v7/v8. With the old composer.json/composer.lock, they're passing. But with the updated Symfony packages, we get these failures:


[bknix-min:~/src/git-scan] phpunit8 tests/
PHPUnit 8.5.15 by Sebastian Bergmann and contributors.

.........E....F.F................................................ 65 / 72 ( 90%)
.......                                                           72 / 72 (100%)

Time: 10.98 seconds, Memory: 16.00 MB

There was 1 error:

1) GitScan\Command\DiffCommandTest::testDiff_empty_text
Symfony\Component\Console\Exception\InvalidArgumentException: The helper "table" is not defined.

/Users/totten/src/git-scan/vendor/symfony/console/Helper/HelperSet.php:80
/Users/totten/src/git-scan/src/GitScan/Command/DiffCommand.php:71
/Users/totten/src/git-scan/vendor/symfony/console/Command/Command.php:255
/Users/totten/src/git-scan/vendor/symfony/console/Tester/CommandTester.php:78
/Users/totten/src/git-scan/tests/GitScan/GitScanTestCase.php:89
/Users/totten/src/git-scan/tests/GitScan/Command/DiffCommandTest.php:29

--

There were 2 failures:

1) GitScan\Command\ForeachCommandTest::testForeach_output
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
 Array (
-    0 => 'found /private/var/folders/80/nxtr4q7527993kkdsmh53mxw0000gn/T/GitScanCommandForeachCommandTest_921550: example-1/repo-1/'
-    1 => 'found /private/var/folders/80/nxtr4q7527993kkdsmh53mxw0000gn/T/GitScanCommandForeachCommandTest_921550: example-1/repo-1/repo-1b/'
-    2 => 'found /private/var/folders/80/nxtr4q7527993kkdsmh53mxw0000gn/T/GitScanCommandForeachCommandTest_921550: example-2/repo-2/'
+    0 => 'found :'
+    1 => 'found : '
+    2 => 'found : '
 )

/Users/totten/src/git-scan/tests/GitScan/Command/ForeachCommandTest.php:84
/Users/totten/src/git-scan/tests/GitScan/Command/ForeachCommandTest.php:42

2) GitScan\Command\ForeachCommandTest::testForeach_singleError
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'found /private/var/folders/80/nxtr4q7527993kkdsmh53mxw0000gn/T/GitScanCommandForeachCommandTest_335597: example-1/repo-1/\n
-[[ /private/var/folders/80/nxtr4q7527993kkdsmh53mxw0000gn/T/GitScanCommandForeachCommandTest_335597/example-1/repo-1: exit code = 2 ]]'
+''

/Users/totten/src/git-scan/tests/GitScan/Command/ForeachCommandTest.php:76

ERRORS!
Tests: 72, Assertions: 333, Errors: 1, Failures: 2.