joselfonseca / laravel-tactician

Laravel Tactician is an implementation of the Command Bus Tactician by Ross Tuck.
MIT License
61 stars 12 forks source link

Versions issue #7

Closed jagarsoft closed 6 years ago

jagarsoft commented 6 years ago
$ vendor/bin/phpunit -v
PHPUnit 4.8.36 by Sebastian Bergmann and contributors.

Runtime:        PHP 5.6.33 with Xdebug 2.5.5
Configuration:  C:\Users\Usuario\GitHub\jagarsoft\laravel-tactician\phpunit.xml

......EEEEEEE.............

Time: 55.66 seconds, Memory: 11.25MB

There were 7 errors:

1) Joselfonseca\LaravelTactician\Tests\Generators\TestGenerators::test_it_creates_command
ErrorException: The Symfony\Component\Process\ProcessUtils::escapeArgument() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use a command line array or give env vars to the Process::start/run() method instead.

C:\Users\Usuario\GitHub\jagarsoft\laravel-tactician\vendor\symfony\process\ProcessUtils.php:43
C:\Users\Usuario\GitHub\jagarsoft\laravel-tactician\vendor\laravel\framework\src\Illuminate\Queue\Listener.php:87
C:\Users\Usuario\GitHub\jagarsoft\laravel-tactician\vendor\laravel\framework\src\Illuminate\Queue\Listener.php:75
C:\Users\Usuario\GitHub\jagarsoft\laravel-tactician\vendor\laravel\framework\src\Illuminate\Queue\Listener.php:63
C:\Users\Usuario\GitHub\jagarsoft\laravel-tactician\vendor\laravel\framework\src\Illuminate\Queue\QueueServiceProvider.php:185
C:\Users\Usuario\GitHub\jagarsoft\laravel-tactician\vendor\laravel\framework\src\Illuminate\Container\Container.php:726
C:\Users\Usuario\GitHub\jagarsoft\laravel-tactician\vendor\laravel\framework\src\Illuminate\Container\Container.php:608
C:\Users\Usuario\GitHub\jagarsoft\laravel-tactician\vendor\laravel\framework\src\Illuminate\Container\Container.php:575
C:\Users\Usuario\GitHub\jagarsoft\laravel-tactician\vendor\laravel\framework\src\Illuminate\Foundation\Application.php:728
C:\Users\Usuario\GitHub\jagarsoft\laravel-tactician\vendor\laravel\framework\src\Illuminate\Container\Container.php:1172
C:\Users\Usuario\GitHub\jagarsoft\laravel-tactician\vendor\laravel\framework\src\Illuminate\Foundation\Providers\ArtisanServiceProvider.php:596
C:\Users\Usuario\GitHub\jagarsoft\laravel-tactician\vendor\laravel\framework\src\Illuminate\Container\Container.php:726
C:\Users\Usuario\GitHub\jagarsoft\laravel-tactician\vendor\laravel\framework\src\Illuminate\Container\Container.php:608
C:\Users\Usuario\GitHub\jagarsoft\laravel-tactician\vendor\laravel\framework\src\Illuminate\Container\Container.php:575
C:\Users\Usuario\GitHub\jagarsoft\laravel-tactician\vendor\laravel\framework\src\Illuminate\Foundation\Application.php:728
C:\Users\Usuario\GitHub\jagarsoft\laravel-tactician\vendor\laravel\framework\src\Illuminate\Console\Application.php:192
C:\Users\Usuario\GitHub\jagarsoft\laravel-tactician\vendor\laravel\framework\src\Illuminate\Console\Application.php:206
C:\Users\Usuario\GitHub\jagarsoft\laravel-tactician\vendor\laravel\framework\src\Illuminate\Support\ServiceProvider.php:232
C:\Users\Usuario\GitHub\jagarsoft\laravel-tactician\vendor\laravel\framework\src\Illuminate\Console\Application.php:111
C:\Users\Usuario\GitHub\jagarsoft\laravel-tactician\vendor\laravel\framework\src\Illuminate\Console\Application.php:58
C:\Users\Usuario\GitHub\jagarsoft\laravel-tactician\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php:284
C:\Users\Usuario\GitHub\jagarsoft\laravel-tactician\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php:220
C:\Users\Usuario\GitHub\jagarsoft\laravel-tactician\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php:221
C:\Users\Usuario\GitHub\jagarsoft\laravel-tactician\tests\Generators\TestGenerators.php:56
C:\Users\Usuario\GitHub\jagarsoft\laravel-tactician\tests\Generators\TestGenerators.php:56
C:\Users\Usuario\GitHub\jagarsoft\laravel-tactician\tests\Generators\TestGenerators.php:88
jagarsoft commented 6 years ago

I think this issue comes from lacking of composer.lock in git Your dev environment is not exactly the same i have after I run composer install without composer.lock Please have a look at reference at the end of this blog: es-necesario-composer-json-siempre-no-basta-con-composer-lock PS: composer/composer/issues/4297 composer-its-all-about-the-lock-file

joselfonseca commented 6 years ago

Hey there! thanks for the issue. The problem was that testbench updated the folder for the laravel files. Also the phpunit requirement is higher now which means we have to drop support for php 5.6 and 7.0. i will tag a new release for that.

https://github.com/joselfonseca/laravel-tactician/commit/81d453291ba89c8731058babb72211d911f8c123

https://github.com/joselfonseca/laravel-tactician/commit/81d453291ba89c8731058babb72211d911f8c123

https://github.com/joselfonseca/laravel-tactician/commit/1ce5072012f6c1d704c048423ca569e038cfde41

Also composer.lock generally is left for complete projects like here https://github.com/joselfonseca/laravel-api as in a library is it discarded. For your library you may commit the composer.lock file if you want to. This can help your team to always test against the same dependency versions. However, this lock file will not have any effect on other projects that depend on it. It only has an effect on the main project. https://getcomposer.org/doc/02-libraries.md#lock-file since this is a library, we do not commit the lock file.

joselfonseca commented 6 years ago

https://github.com/joselfonseca/laravel-tactician/releases/tag/0.4.0

jagarsoft commented 6 years ago

Thanks for response

I finally fixed by myself just like this

diff --git a/tests/Generators/TestGenerators.php b/tests/Generators/TestGenerators.php
index 1c9b7b3..bbbd03a 100644
--- a/tests/Generators/TestGenerators.php
+++ b/tests/Generators/TestGenerators.php
@@ -69,7 +69,7 @@ class TestGenerators extends TestCase
  */
     protected function getExpectedCommandFile()
     {
-        return __DIR__ . '/../../vendor/orchestra/testbench/fixture/app/CommandBus/Commands/FooCommand.php';
+        return __DIR__ . '/../../vendor/orchestra/testbench-core/fixture/app/CommandBus/Commands/FooCommand.php';
     }

     /**
@@ -77,7 +77,7 @@ class TestGenerators extends TestCase
      */
     protected function getExpectedHandlerFile()
     {
-        return __DIR__ . '/../../vendor/orchestra/testbench/fixture/app/CommandBus/Handlers/FooHandler.php';
+        return __DIR__ . '/../../vendor/orchestra/testbench-core/fixture/app/CommandBus/Handlers/FooHandler.php';
     }

     /**

No need to update! Sorry for noise! PS: Great work!!!