-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8 to master #2373
8 to master #2373
Conversation
…its testing of tags based on the branches configuration.
commit 1c561dc Author: John Bickar <[email protected]> Date: Fri Feb 12 15:01:56 2016 -0800 Declare example-value for --target-dump and --source-dump commit 54a17d6 Author: John Bickar <[email protected]> Date: Fri Feb 12 14:30:07 2016 -0800 Update drush sql-sync --target-dump and --source-dump documentation. See #1435
It duplicates config-import --partial, and is buggy. A fix for --partial is coming in #2069
…st re-using some of its internals. Adds preview at end as well.
commit 0438baf Author: Moshe Weitzman <[email protected]> Date: Tue Mar 29 10:11:33 2016 -0400 A fix to the implode() of sanitize queries. commit 8ed8452 Author: Moshe Weitzman <[email protected]> Date: Mon Mar 28 08:59:03 2016 -0400 Fix #1869 and #1582. Better support for database prefixes during sql-sanitize ... Database prefixes are still discouraged by Drush maintainers.
…able when config module is enabled.
… not a .module file. Note that this would need rework for Drush8 since Drupal 6 did not use .info.yml files. A backport is welcome for 8.x.
…urce_path does not end with "/"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done with code review. Will poke around in the debugger next.
@@ -0,0 +1,173 @@ | |||
<?php |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have https://github.com/drush-ops/drush/blob/master/lib/Drush/CommandFiles/InitCommandFile.php. We should not add this old style file back in, I think.
@@ -155,7 +155,12 @@ function make_drush_command() { | |||
'makefile' => 'Filename of the makefile to convert.', | |||
), | |||
'options' => array( | |||
'format' => 'The format to which the make file should be converted. Accepted values include make, composer, and yml.' | |||
'format' => 'The format to which the make file should be converted. Accepted values include make, composer, and yml.', | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debug code? Why commented out?
} | ||
|
||
/** | ||
* Initialize and cache the command factory. Drush 9 uses dependency injection. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confusing reference to Drush 9, since this code is itself Drush 9.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll fix up the comment. This code will use more DI in the near future, but does not right now.
|
||
/** | ||
* This function is set as the $command['callback'] for Symfony Console commands | ||
* e.g. those provided by Drupal 8 modules. Note that Drush 9 calls these with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps this comment needs updating as this code is Drush 9.
@@ -0,0 +1,117 @@ | |||
<?php | |||
/** | |||
* This file was recommended at http://php.net/manual/en/function.array-column.php#refsect1-function.array-column-seealso |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is no longer needed since master branch wont support PHP 5.4
@@ -317,14 +331,55 @@ function _drush_invoke_hooks($command, $args) { | |||
} | |||
} | |||
|
|||
// We will adapt and call as many of the annotated command hooks as we can. | |||
// The following command hooks are not supported in Drush 8.x: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong Drush version mentioned.
@@ -183,6 +183,19 @@ public function selectReleaseBasedOnStrategy($request, $restrict_to = '', $selec | |||
} | |||
$releases = $project_release_info->filterReleases($filter, $version); | |||
|
|||
// Special checking: Drupal 6 is EOL, so there are no stable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this whole block is unneeded, as we dont support Drupal 6 in master.
@@ -130,6 +130,11 @@ function testCoreRequirements() { | |||
'ignore' => 'cron,http requests,update,update_core,trusted_host_patterns', // no network access when running in tests, so ignore these | |||
'strict' => 0, // invoke from script: do not verify options | |||
); | |||
// Drupal 6 has reached EOL, so we will always get errors for 'update_contrib'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed on master
@@ -68,6 +68,9 @@ public function setUp() { | |||
} | |||
|
|||
function testUpdateCode() { | |||
if (UNISH_DRUPAL_MAJOR_VERSION < 7) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed.
kk, did all of that; tests still green. |
Kind of an odd set of keys in there. I wonder if this is the most clear API to be handing our command callback authors.
The code comment and behavior look wrong. If I run
|
|
Could / should we just start |
I got a lot of the above comments cleared up, but there are a few open threads on this issue. Could we merge here, and discuss each of the open questions in separate issues / PRs? |
Thanks @greg-1-anderson. |
All of the commits here are an artifact of the fact that GitHub is confused about the merge that is happening. I think that all of those commits are everything on the 8.x branch that has been committed since it forked off of master, and all of the participants here are all the folks who made at least one of those commits. I'll merge with caution through the cli to ensure that what we end up with is rational. |
This epic PR has landed. Thanks @greg-1-anderson. |
So, I went ahead and added support for
@allow-additional-options
here. Truthfully, this might be difficult to support in Symfony. We can postpone removing it until later; however, we should consider whether there is a good use-case for allowing unvalidated options moving forward. Hooks can always declare their additional options explicitly with @option, and that is a validated pattern.php-eval
/php-script
seems to be the one place this might be helpful; however, it might be better to simply de-supportdrush_get_option()
in these sorts of scripts, and force folks to define an actual command if arguments and options are desired.Another area where I broke backwards compatibility is in
php-eval
output. The output-formatters library only outputs objects, arrays and strings. Booleans and integers are ignored. Again, I think that output of integers and booleans is not really important in most cases, withphp-eval
being a notable exception. I figure that we can force folks to usevar_export($foo);
instead ofreturn $foo;
if they wish to display booleans, though; perhaps this is good enough.Enough tests have passed that I think this test run will finish up all green.