mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-13 02:46:29 +00:00
Merge branch '2.x' into 3.x
* 2.x: Try running all tests on nightly Minor fixes Fix Travis config
This commit is contained in:
+17
-15
@@ -18,24 +18,26 @@ before_install:
|
||||
|
||||
install:
|
||||
- travis_retry composer install
|
||||
- ./vendor/bin/simple-phpunit install
|
||||
- ([[ $TRAVIS_PHP_VERSION = "nightly" ]] || cd extra/cssinliner-extra && travis_retry composer install)
|
||||
- ([[ $TRAVIS_PHP_VERSION = "nightly" ]] || cd extra/html-extra && travis_retry composer install)
|
||||
- ([[ $TRAVIS_PHP_VERSION = "nightly" ]] || cd extra/inky-extra && travis_retry composer install)
|
||||
- ([[ $TRAVIS_PHP_VERSION = "nightly" ]] || cd extra/intl-extra && travis_retry composer install)
|
||||
- ([[ $TRAVIS_PHP_VERSION = "nightly" ]] || cd extra/markdown-extra && travis_retry composer install)
|
||||
- ([[ $TRAVIS_PHP_VERSION = "nightly" ]] || cd extra/string-extra && travis_retry composer install)
|
||||
- export PHPUNIT=$(readlink -f ./vendor/bin/simple-phpunit)
|
||||
- $PHPUNIT install
|
||||
- (cd extra/cssinliner-extra && travis_retry composer install)
|
||||
- (cd extra/html-extra && travis_retry composer install)
|
||||
- (cd extra/inky-extra && travis_retry composer install)
|
||||
- (cd extra/intl-extra && travis_retry composer install)
|
||||
- ([[ $TRAVIS_PHP_VERSION = nightly ]] && (cd extra/markdown-extra && composer config platform.php 7.4.99) || true)
|
||||
- (cd extra/markdown-extra && travis_retry composer install)
|
||||
- (cd extra/string-extra && travis_retry composer install)
|
||||
|
||||
script:
|
||||
- ./vendor/bin/simple-phpunit
|
||||
- ([[ $TRAVIS_PHP_VERSION = "nightly" ]] || cd extra/cssinliner-extra && ./vendor/bin/simple-phpunit)
|
||||
- ([[ $TRAVIS_PHP_VERSION = "nightly" ]] || cd extra/html-extra && ./vendor/bin/simple-phpunit)
|
||||
- ([[ $TRAVIS_PHP_VERSION = "nightly" ]] || cd extra/inky-extra && ./vendor/bin/simple-phpunit)
|
||||
- ([[ $TRAVIS_PHP_VERSION = "nightly" ]] || cd extra/intl-extra && ./vendor/bin/simple-phpunit)
|
||||
- ([[ $TRAVIS_PHP_VERSION = "nightly" ]] || cd extra/markdown-extra && ./vendor/bin/simple-phpunit)
|
||||
- ([[ $TRAVIS_PHP_VERSION = "nightly" ]] || cd extra/string-extra && ./vendor/bin/simple-phpunit)
|
||||
- $PHPUNIT
|
||||
- (cd extra/cssinliner-extra && $PHPUNIT)
|
||||
- (cd extra/html-extra && $PHPUNIT)
|
||||
- (cd extra/inky-extra && $PHPUNIT)
|
||||
- (cd extra/intl-extra && $PHPUNIT)
|
||||
- (cd extra/markdown-extra && $PHPUNIT)
|
||||
- (cd extra/string-extra && $PHPUNIT)
|
||||
|
||||
matrix:
|
||||
jobs:
|
||||
fast_finish: true
|
||||
include:
|
||||
- php: 7.2
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
"homepage": "https://twig.symfony.com",
|
||||
"license": "BSD-3-Clause",
|
||||
"minimum-stability": "dev",
|
||||
"prefer-stable": true,
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
|
||||
+3
-2
@@ -6,11 +6,12 @@ set -e
|
||||
REPO=`pwd`
|
||||
cd /tmp
|
||||
rm -rf drupal-twig-test
|
||||
composer create-project --no-interaction drupal-composer/drupal-project:8.x-dev drupal-twig-test
|
||||
composer create-project --no-install --no-interaction drupal-composer/drupal-project:8.x-dev drupal-twig-test
|
||||
cd drupal-twig-test
|
||||
composer require --no-update webflo/drupal-core-require-dev "egulias/email-validator:^2.0"
|
||||
composer update
|
||||
(cd vendor/twig && rm -rf twig && ln -sf $REPO twig)
|
||||
echo '$config["system.logging"]["error_level"] = "verbose";' >> web/sites/default/settings.php
|
||||
composer require drupal/core:8.7.x-dev webflo/drupal-core-require-dev:8.7.x-dev "egulias/email-validator:^2.0"
|
||||
php ./web/core/scripts/drupal install --no-interaction demo_umami > output
|
||||
perl -p -i -e 's/^([A-Za-z]+)\: (.+)$/export DRUPAL_\1=\2/' output
|
||||
source output
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
"homepage": "https://twig.symfony.com",
|
||||
"license": "MIT",
|
||||
"minimum-stability": "dev",
|
||||
"prefer-stable": true,
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
"homepage": "https://twig.symfony.com",
|
||||
"license": "MIT",
|
||||
"minimum-stability": "dev",
|
||||
"prefer-stable": true,
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
"homepage": "https://twig.symfony.com",
|
||||
"license": "MIT",
|
||||
"minimum-stability": "dev",
|
||||
"prefer-stable": true,
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
"homepage": "https://twig.symfony.com",
|
||||
"license": "MIT",
|
||||
"minimum-stability": "dev",
|
||||
"prefer-stable": true,
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
|
||||
@@ -307,7 +307,7 @@ final class IntlExtension extends AbstractExtension
|
||||
return $this->formatDateTime($env, $date, 'none', $timeFormat, $pattern, $timezone, $calendar, $locale);
|
||||
}
|
||||
|
||||
private function createDateFormatter(?string $locale, ?string $dateFormat, ?string $timeFormat, string $pattern = '', \DateTimeZone $timezone, string $calendar): \IntlDateFormatter
|
||||
private function createDateFormatter(?string $locale, ?string $dateFormat, ?string $timeFormat, string $pattern, \DateTimeZone $timezone, string $calendar): \IntlDateFormatter
|
||||
{
|
||||
if (null !== $dateFormat && !isset(self::DATE_FORMATS[$dateFormat])) {
|
||||
throw new RuntimeError(sprintf('The date format "%s" does not exist, known formats are: "%s".', $dateFormat, implode('", "', array_keys(self::DATE_FORMATS))));
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
"homepage": "https://twig.symfony.com",
|
||||
"license": "MIT",
|
||||
"minimum-stability": "dev",
|
||||
"prefer-stable": true,
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
"homepage": "https://twig.symfony.com",
|
||||
"license": "MIT",
|
||||
"minimum-stability": "dev",
|
||||
"prefer-stable": true,
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
"homepage": "https://twig.symfony.com",
|
||||
"license": "MIT",
|
||||
"minimum-stability": "dev",
|
||||
"prefer-stable": true,
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
|
||||
@@ -18,7 +18,7 @@ use Twig\Template;
|
||||
|
||||
class GetAttrExpression extends AbstractExpression
|
||||
{
|
||||
public function __construct(AbstractExpression $node, AbstractExpression $attribute, AbstractExpression $arguments = null, string $type, int $lineno)
|
||||
public function __construct(AbstractExpression $node, AbstractExpression $attribute, ?AbstractExpression $arguments, string $type, int $lineno)
|
||||
{
|
||||
$nodes = ['node' => $node, 'attribute' => $attribute];
|
||||
if (null !== $arguments) {
|
||||
|
||||
@@ -35,7 +35,7 @@ use Twig\Node\Node;
|
||||
*/
|
||||
class DefinedTest extends TestExpression
|
||||
{
|
||||
public function __construct(Node $node, string $name, Node $arguments = null, int $lineno)
|
||||
public function __construct(Node $node, string $name, ?Node $arguments, int $lineno)
|
||||
{
|
||||
if ($node instanceof NameExpression) {
|
||||
$node->setAttribute('is_defined_test', true);
|
||||
|
||||
@@ -16,7 +16,7 @@ use Twig\Node\Node;
|
||||
|
||||
class TestExpression extends CallExpression
|
||||
{
|
||||
public function __construct(Node $node, string $name, Node $arguments = null, int $lineno)
|
||||
public function __construct(Node $node, string $name, ?Node $arguments, int $lineno)
|
||||
{
|
||||
$nodes = ['node' => $node];
|
||||
if (null !== $arguments) {
|
||||
|
||||
@@ -28,7 +28,7 @@ use Twig\Source;
|
||||
*/
|
||||
final class ModuleNode extends Node
|
||||
{
|
||||
public function __construct(Node $body, AbstractExpression $parent = null, Node $blocks, Node $macros, Node $traits, $embeddedTemplates, Source $source)
|
||||
public function __construct(Node $body, ?AbstractExpression $parent, Node $blocks, Node $macros, Node $traits, $embeddedTemplates, Source $source)
|
||||
{
|
||||
$nodes = [
|
||||
'body' => $body,
|
||||
|
||||
@@ -135,7 +135,7 @@ class CallTest extends TestCase
|
||||
|
||||
class Node_Expression_Call extends CallExpression
|
||||
{
|
||||
public function getArguments($callable = null, $arguments)
|
||||
public function getArguments($callable, $arguments)
|
||||
{
|
||||
return parent::getArguments($callable, $arguments);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user