This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Ad hoc functions to make the examples marginally prettier.*/ | |
function isWebRequest() | |
{ | |
return isset($_SERVER['HTTP_USER_AGENT']); | |
} | |
function pageHeader($title) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
require dirname(__DIR__) . '/vendor/autoload.php'; | |
if (php_sapi_name() != 'cli') { | |
throw new Exception('This application must be run on the command line.'); | |
} | |
$path_credentials = getenv('PUBLISH_CREDITS_CREDENTIALS') ?: 'credentials.json'; | |
$path_token = getenv('PUBLISH_CREDITS_TOKEN') ?: 'token.json'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Drupal\drush_empty_module\Bundle\node; | |
/** | |
* A bundle class for node entities. | |
*/ | |
class Article extends NodeBundleBase { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This release features significant new features and a major refactor of our site alias remote communication. If Drush had a marketing department, they would have insisted on the number 10.0. We don't, so 9.6.0 it is. We did our very best to preserve existing APIs - please report any breakage. | |
Highlights | |
============ | |
- Now 100% ✅ on Windows. All PRs tested for regressions (via Appveyor). | |
- Now 100% ✅ for sqlite and postgres databases. Mysql has always been ✅. Our test bots run these tests every night. | |
- Add --filter to many commands (#3718). You may now filter output from any tabular commands. An example: `drush pm:list --filter=ctools`. [See docs for details and general info about output formats](http://docs.drush.org/en/master/output-formats-filters/). | |
- Deprecate drush_invoke_process(), backend.inc and context.inc. These are no longer used by Drush core and commandfiles are encouraged to use their replacements like Drush::drush(). These APIs will be removed in Drush 10. This is a HUGE win for the maintaina |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> phpunit --debug --colors --bootstrap=src/bootstrap.php --printer '\Drupal\Tests\Listeners\HtmlOutputPrinter' tests | |
PHPUnit 6.5.13 by Sebastian Bergmann and contributors. | |
[snip errors] | |
ERRORS! | |
Tests: 10, Assertions: 20, Errors: 5. | |
HTML output was generated | |
http://drupal/sites/simpletest/browser_output/weitzman_DrupalTestTraits_Tests_Mail_MailCollectorTraitTest-1-dtt.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Use your module's testing namespace such as the one below. | |
namespace Drupal\Tests\moduleName\ExistingSite; | |
use Drupal\taxonomy\Entity\Vocabulary; | |
use Drupal\user\Entity\User; | |
use weitzman\DrupalTestTraits\ExistingSiteBase; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Builds a MySQL image with local data directory. See 'command' in docker-compose.yml | |
# Approach borrowed from https://about.zoosk.com/en/engineering-blog/test-databases-docker-containers/. | |
FROM mysql:5.6 | |
RUN ["mkdir", "–p", "/var/lib/mysql-image"] | |
RUN echo "[mysqld]" > /etc/mysql/conf.d/mass-vm.cnf \ | |
&& echo "datadir = /var/lib/mysql-image" >> /etc/mysql/conf.d/mass-vm.cnf | |
` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Host * | |
IdentityFile /run/secrets/mass_id_rsa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eval `ssh-agent -s` > /dev/null 2>&1 | |
ssh-add /var/run/secrets/mass_id_rsa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ahoyapi: v2 | |
commands: | |
exec: | |
# These env variables come from https://github.com/wodby/docker4drupal/issues/273 | |
cmd: docker-compose exec -e COLUMNS=$(tput cols) -e LINES=$(tput lines) -e TERM=$TERM drupal "$@" | |
usage: Run a command in the container | |
bash: | |
cmd: ahoy exec bash | |
usage: Open a shell inside the container. |
NewerOlder