Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
breyta
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Thomas Flori
breyta
Commits
68acee7a
Unverified
Commit
68acee7a
authored
6 years ago
by
Thomas Flori
Browse files
Options
Downloads
Patches
Plain Diff
return full path from create migration interface
parent
f3461203
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/CallbackProgress.php
+6
-6
6 additions, 6 deletions
src/CallbackProgress.php
src/Migrations.php
+5
-3
5 additions, 3 deletions
src/Migrations.php
src/ProgressInterface.php
+4
-4
4 additions, 4 deletions
src/ProgressInterface.php
with
15 additions
and
13 deletions
src/CallbackProgress.php
+
6
−
6
View file @
68acee7a
...
...
@@ -73,11 +73,11 @@ class CallbackProgress implements ProgressInterface
/**
* Output information about the $statement (before it gets executed)
*
* @param Statement $
execution
* @param Statement $
statement
*/
public
function
beforeExecution
(
Statement
$
execution
)
public
function
beforeExecution
(
Statement
$
statement
)
{
!
$this
->
beforeExecutionCallback
||
call_user_func
(
$this
->
beforeExecutionCallback
,
$
execution
);
!
$this
->
beforeExecutionCallback
||
call_user_func
(
$this
->
beforeExecutionCallback
,
$
statement
);
}
public
function
onBeforeExecution
(
callable
$callback
):
self
...
...
@@ -89,11 +89,11 @@ class CallbackProgress implements ProgressInterface
/**
* Output information about the $statement (after it gets executed)
*
* @param Statement $
execution
* @param Statement $
statement
*/
public
function
afterExecution
(
Statement
$
execution
)
public
function
afterExecution
(
Statement
$
statement
)
{
!
$this
->
afterExecutionCallback
||
call_user_func
(
$this
->
afterExecutionCallback
,
$
execution
);
!
$this
->
afterExecutionCallback
||
call_user_func
(
$this
->
afterExecutionCallback
,
$
statement
);
}
public
function
onAfterExecution
(
callable
$callback
):
self
...
...
This diff is collapsed.
Click to expand it.
src/Migrations.php
+
5
−
3
View file @
68acee7a
...
...
@@ -315,10 +315,12 @@ class Migrations
*
* We recommend StudlyCase naming for PSR2 compatibility. Also the files will get a namespace.
*
* Returns the path to the generated migration.
*
* @param string $name
* @return
bool
* @return
string
*/
public
function
createMigration
(
string
$name
):
bool
public
function
createMigration
(
string
$name
):
string
{
static
$template
;
if
(
is_null
(
$template
))
{
...
...
@@ -341,7 +343,7 @@ class Migrations
'CLASS_NAME'
=>
$className
,
'FILE_NAME'
=>
$fileName
,
]));
return
true
;
return
$fullPath
;
}
/** @codeCoverageIgnore */
...
...
This diff is collapsed.
Click to expand it.
src/ProgressInterface.php
+
4
−
4
View file @
68acee7a
...
...
@@ -28,15 +28,15 @@ interface ProgressInterface
/**
* Output information about the $statement (before it gets executed)
* @param Statement $
execution
* @param Statement $
statement
*/
public
function
beforeExecution
(
Statement
$
execution
);
public
function
beforeExecution
(
Statement
$
statement
);
/**
* Output information about the $statement (after it gets executed)
* @param Statement $
execution
* @param Statement $
statement
*/
public
function
afterExecution
(
Statement
$
execution
);
public
function
afterExecution
(
Statement
$
statement
);
/**
* Output information about the $migration (after the migration)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment