Skip to content

Commit 2e4d62a

Browse files
authored
Merge branch 'develop-feature-updatedDependencies' into develop-feature-update-nikic-php-parser
2 parents fb62130 + 7429ef9 commit 2e4d62a

16 files changed

Lines changed: 84 additions & 51 deletions

app/sprinkles/core/composer.json

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,27 +32,26 @@
3232
"illuminate/database": "5.8.*",
3333
"illuminate/events": "5.8.*",
3434
"illuminate/filesystem": "5.8.*",
35-
"league/csv": "^8.1",
35+
"league/csv": "^9.2.1",
3636
"league/flysystem": "~1.0",
3737
"league/flysystem-aws-s3-v3": "~1.0",
3838
"league/flysystem-cached-adapter": "~1.0",
3939
"league/flysystem-rackspace": "~1.0",
4040
"league/flysystem-sftp": "~1.0",
4141
"monolog/monolog": "^1",
4242
"phpmailer/phpmailer": "5.2.10",
43-
"rockettheme/toolbox": "1.3.1",
4443
"slim/csrf": "^0.8",
4544
"slim/slim": "^3",
46-
"slim/twig-view": "^1.2",
45+
"slim/twig-view": "^2.5",
4746
"symfony/http-foundation": "*",
48-
"twig/twig": "^1.18",
49-
"userfrosting/assets": "^5.0.4",
50-
"userfrosting/config": "~4.2.0",
51-
"userfrosting/cache": "~4.2.0",
52-
"userfrosting/fortress": "~4.2.0",
53-
"userfrosting/i18n": "~4.2.0",
54-
"userfrosting/session": "~4.2.2",
55-
"userfrosting/support": "~4.2.0",
47+
"twig/twig": "^2.11",
48+
"userfrosting/assets": "^6.0.0",
49+
"userfrosting/config": "~4.3.0",
50+
"userfrosting/cache": "~4.3.0",
51+
"userfrosting/fortress": "~4.3.0",
52+
"userfrosting/i18n": "~4.3.0",
53+
"userfrosting/session": "~4.3.0",
54+
"userfrosting/support": "~4.3.0",
5655
"vlucas/phpdotenv": "^2"
5756
},
5857
"autoload": {

app/sprinkles/core/src/Bakery/MigrateCommand.php

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Symfony\Component\Console\Input\InputOption;
1515
use Symfony\Component\Console\Output\OutputInterface;
1616
use UserFrosting\Sprinkle\Core\Bakery\Helper\ConfirmableTrait;
17+
use UserFrosting\Sprinkle\Core\Database\Migrator\Migrator;
1718
use UserFrosting\System\Bakery\BaseCommand;
1819

1920
/**
@@ -79,13 +80,13 @@ protected function execute(InputInterface $input, OutputInterface $output)
7980
try {
8081
$migrated = $migrator->run(['pretend' => $pretend, 'step' => $step]);
8182
} catch (\Exception $e) {
82-
$this->io->writeln($migrator->getNotes());
83+
$this->displayNotes($migrator);
8384
$this->io->error($e->getMessage());
8485
exit(1);
8586
}
8687

8788
// Get notes and display them
88-
$this->io->writeln($migrator->getNotes());
89+
$this->displayNotes($migrator);
8990

9091
// If all went well, there's no fatal errors and we have migrated
9192
// something, show some success
@@ -128,4 +129,16 @@ protected function setupMigrator(InputInterface $input)
128129

129130
return $migrator;
130131
}
132+
133+
/**
134+
* Display migrator notes.
135+
*
136+
* @param Migrator $migrator
137+
*/
138+
protected function displayNotes(Migrator $migrator)
139+
{
140+
if (!empty($notes = $migrator->getNotes())) {
141+
$this->io->writeln($notes);
142+
}
143+
}
131144
}

app/sprinkles/core/src/Bakery/MigrateRefreshCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@ protected function execute(InputInterface $input, OutputInterface $output)
7171
try {
7272
$rolledback = $migrator->rollback(['pretend' => false, 'steps' => $steps]);
7373
} catch (\Exception $e) {
74-
$this->io->writeln($migrator->getNotes());
74+
$this->displayNotes($migrator);
7575
$this->io->error($e->getMessage());
7676
exit(1);
7777
}
7878

7979
// Get notes and display them
80-
$this->io->writeln($migrator->getNotes());
80+
$this->displayNotes($migrator);
8181

8282
// Stop if nothing was rolledback
8383
if (empty($rolledback)) {
@@ -88,7 +88,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
8888

8989
// Run back up again
9090
$migrated = $migrator->run(['pretend' => false, 'step' => false]);
91-
$this->io->writeln($migrator->getNotes());
91+
$this->displayNotes($migrator);
9292

9393
// If all went well, there's no fatal errors and we have migrated
9494
// something, show some success

app/sprinkles/core/src/Bakery/MigrateResetCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,13 @@ protected function performReset(InputInterface $input)
8787
try {
8888
$resetted = $migrator->reset($pretend);
8989
} catch (\Exception $e) {
90-
$this->io->writeln($migrator->getNotes());
90+
$this->displayNotes($migrator);
9191
$this->io->error($e->getMessage());
9292
exit(1);
9393
}
9494

9595
// Get notes and display them
96-
$this->io->writeln($migrator->getNotes());
96+
$this->displayNotes($migrator);
9797

9898
// Delete the repository
9999
if (!$pretend && $migrator->repositoryExists()) {

app/sprinkles/core/src/Bakery/MigrateRollbackCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@ protected function execute(InputInterface $input, OutputInterface $output)
8080
$migrated = $migrator->rollback(['pretend' => $pretend, 'steps' => $steps]);
8181
}
8282
} catch (\Exception $e) {
83-
$this->io->writeln($migrator->getNotes());
83+
$this->displayNotes($migrator);
8484
$this->io->error($e->getMessage());
8585
exit(1);
8686
}
8787

8888
// Get notes and display them
89-
$this->io->writeln($migrator->getNotes());
89+
$this->displayNotes($migrator);
9090

9191
// If all went well, there's no fatal errors and we have migrated
9292
// something, show some success

app/sprinkles/core/tests/Integration/Bakery/BakeryMigrateCommandTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
namespace UserFrosting\Sprinkle\Core\Tests\Integration\Bakery;
1212

1313
use Mockery as m;
14+
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
1415
use Symfony\Component\Console\Application;
1516
use Symfony\Component\Console\Tester\CommandTester;
1617
use UserFrosting\Sprinkle\Core\Bakery\MigrateCommand;
@@ -21,6 +22,8 @@
2122
*/
2223
class BakeryMigrateCommandTest extends TestCase
2324
{
25+
use MockeryPHPUnitIntegration;
26+
2427
public function tearDown()
2528
{
2629
parent::tearDown();

app/sprinkles/core/tests/Integration/Bakery/BakeryMigrateRefreshCommandTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
namespace UserFrosting\Sprinkle\Core\Tests\Integration\Bakery;
1212

1313
use Mockery as m;
14+
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
1415
use Symfony\Component\Console\Application;
1516
use Symfony\Component\Console\Tester\CommandTester;
1617
use UserFrosting\Sprinkle\Core\Bakery\MigrateRefreshCommand;
@@ -21,6 +22,8 @@
2122
*/
2223
class BakeryMigrateRefreshCommandTest extends TestCase
2324
{
25+
use MockeryPHPUnitIntegration;
26+
2427
public function tearDown()
2528
{
2629
parent::tearDown();

app/sprinkles/core/tests/Integration/Bakery/BakeryMigrateResetCommandTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
namespace UserFrosting\Sprinkle\Core\Tests\Integration\Bakery;
1212

1313
use Mockery as m;
14+
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
1415
use Symfony\Component\Console\Application;
1516
use Symfony\Component\Console\Tester\CommandTester;
1617
use UserFrosting\Sprinkle\Core\Bakery\MigrateResetCommand;
@@ -21,6 +22,8 @@
2122
*/
2223
class BakeryMigrateResetCommandTest extends TestCase
2324
{
25+
use MockeryPHPUnitIntegration;
26+
2427
public function tearDown()
2528
{
2629
parent::tearDown();

app/sprinkles/core/tests/Integration/Bakery/BakeryMigrateRollbackCommandTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
namespace UserFrosting\Sprinkle\Core\Tests\Integration\Bakery;
1212

1313
use Mockery as m;
14+
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
1415
use Symfony\Component\Console\Application;
1516
use Symfony\Component\Console\Tester\CommandTester;
1617
use UserFrosting\Sprinkle\Core\Bakery\MigrateRollbackCommand;
@@ -21,6 +22,8 @@
2122
*/
2223
class BakeryMigrateRollbackCommandTest extends TestCase
2324
{
25+
use MockeryPHPUnitIntegration;
26+
2427
public function tearDown()
2528
{
2629
parent::tearDown();

app/sprinkles/core/tests/Integration/Bakery/BakeryMigrateStatusCommandTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
namespace UserFrosting\Sprinkle\Core\Tests\Integration\Bakery;
1212

1313
use Mockery as m;
14+
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
1415
use Symfony\Component\Console\Application;
1516
use Symfony\Component\Console\Tester\CommandTester;
1617
use UserFrosting\Sprinkle\Core\Bakery\MigrateStatusCommand;
@@ -21,6 +22,8 @@
2122
*/
2223
class BakeryMigrateStatusCommandTest extends TestCase
2324
{
25+
use MockeryPHPUnitIntegration;
26+
2427
public function tearDown()
2528
{
2629
parent::tearDown();

0 commit comments

Comments
 (0)