Skip to content
This repository has been archived by the owner on Feb 15, 2021. It is now read-only.

Adding Reset Command #35

Merged
merged 7 commits into from
Apr 18, 2019
Merged

Adding Reset Command #35

merged 7 commits into from
Apr 18, 2019

Conversation

dbpolito
Copy link
Member

No description provided.

@codecov-io
Copy link

codecov-io commented Apr 16, 2019

Codecov Report

Merging #35 into php will increase coverage by 4.19%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##                php      #35      +/-   ##
============================================
+ Coverage     78.13%   82.33%   +4.19%     
- Complexity       92      116      +24     
============================================
  Files            35       37       +2     
  Lines           279      351      +72     
============================================
+ Hits            218      289      +71     
- Misses           61       62       +1
Impacted Files Coverage Δ Complexity Δ
app/Process.php 47.16% <ø> (+3.16%) 16 <0> (+1) ⬆️
app/Commands/PrepareDusk.php 100% <100%> (ø) 1 <0> (ø) ⬇️
app/Commands/Reset.php 100% <100%> (ø) 21 <21> (?)
app/Environment.php 78.57% <0%> (-1.79%) 19% <0%> (ø)
app/Commands/Docker.php 100% <0%> (ø) 2% <0%> (?)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fcbc70f...a2f58b8. Read the comment docs.

$environment->overloadEnv($environment->getContextEnv($envFile));
}

return collect([
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a comment explaining this

Copy link
Contributor

@fabriciojs fabriciojs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool!

return $process->dockerRun(env('FWD_IMAGE_NODE'), 'yarn install');
},
function () use ($process) {
return $process->dockerRun(env('FWD_IMAGE_NODE'), 'yarn dev');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should use artisanCall

);
},
function () use ($process) {
return $process->dockerRun(env('FWD_IMAGE_NODE'), 'yarn install');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should use artisanCall


return collect([
function () use ($process) {
return $process->dockerComposeExec('app composer install');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should use artisanCall

function () use ($process) {
return $process->dockerRun(env('FWD_IMAGE_NODE'), 'yarn dev');
},
])->first(function ($command) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

first will return the closure in case of exit code different than 0, instead of the actual return code. We need to think in a different way maybe... a simple foreach

@fabriciojs
Copy link
Contributor

Other thing: instead of having all those closures, let's use callables like [$this, 'composerInstall'] so we move them to methods, and use call_user_func instead of the straight closure execution $closure(). Should make it more readable.

Copy link
Contributor

@gabrielboliveira gabrielboliveira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about cleaning logs, views, config, etc?

@dbpolito
Copy link
Member Author

What about cleaning logs, views, config, etc?

I like that, maybe a --clear flag, i wouldn't like it as default

@dbpolito
Copy link
Member Author

@gabrielboliveira @fabriciojs updated

@dbpolito dbpolito merged commit 7a8348f into fireworkweb:php Apr 18, 2019
@dbpolito dbpolito deleted the reset branch April 18, 2019 19:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants