Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

DevKit updates for 2.x branch #570

Merged
merged 2 commits into from Feb 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
63 changes: 63 additions & 0 deletions .github/workflows/lint.yml
@@ -0,0 +1,63 @@
on: [push, pull_request]

name: Lint

jobs:
php-cs-fixer:
name: PHP-CS-Fixer

runs-on: ubuntu-latest

steps:
- name: "Checkout"
uses: actions/checkout@v2

- name: "Run PHP-CS-Fixer"
uses: docker://oskarstark/php-cs-fixer-ga:2.16.1
with:
args: --ansi --verbose --diff --dry-run

composer-normalize:
name: composer-normalize

runs-on: ubuntu-latest

steps:
- name: "Checkout"
uses: actions/checkout@v2

- name: "Run composer-normalize"
uses: docker://localheinz/composer-normalize-action:0.5.2
with:
args: --dry-run

yaml-files:
name: YAML files

runs-on: ubuntu-latest

steps:
- name: "Checkout"
uses: actions/checkout@v2

- name: "Install Ruby 2.6"
uses: actions/setup-ruby@v1
with:
ruby-version: '2.6'
- run: gem install yaml-lint
- name: "Linting..."
run: make lint-yaml

xml-files:
name: XML files

runs-on: ubuntu-latest

steps:
- name: "Checkout"
uses: actions/checkout@v2

- run: sudo apt-get install libxml2-utils

- name: "Linting..."
run: make lint-xml
1 change: 1 addition & 0 deletions .php_cs.dist
Expand Up @@ -26,6 +26,7 @@ $rules = [
'header_comment' => [
'header' => $header,
],
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
'no_extra_blank_lines' => true,
'no_php4_constructor' => true,
'no_superfluous_phpdoc_tags' => ['allow_mixed' => true],
Expand Down
7 changes: 0 additions & 7 deletions .travis.yml
Expand Up @@ -17,11 +17,6 @@ php:

dist: xenial

addons:
apt:
packages:
- libxml2-utils

cache:
pip: true
directories:
Expand All @@ -38,8 +33,6 @@ env:
matrix:
fast_finish: true
include:
- php: '7.3'
env: TARGET=lint
- php: '7.2'
env: COMPOSER_FLAGS="--prefer-lowest"
- php: '7.3'
Expand Down
6 changes: 0 additions & 6 deletions .travis/check_relevant_lint.sh

This file was deleted.

11 changes: 0 additions & 11 deletions .travis/install_lint.sh

This file was deleted.

2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -6,7 +6,7 @@ all:
@echo "Please choose a task."
.PHONY: all

lint: lint-composer lint-yaml lint-composer lint-xml lint-php
lint: lint-composer lint-yaml lint-xml lint-php
.PHONY: lint

lint-composer:
Expand Down
3 changes: 2 additions & 1 deletion src/Builder/FormContractor.php
Expand Up @@ -105,7 +105,8 @@ public function getFormBuilder($name, array $options = [])
$name,
FormType::class,
null,
$options);
$options
);
}

/**
Expand Down
12 changes: 8 additions & 4 deletions tests/Unit/Filter/DateFilterTest.php
Expand Up @@ -100,19 +100,23 @@ public function testFilterEquals(): void

// FROM
$opDynamic = $this->qbTester->getNode(
'where.constraint.constraint.operand_dynamic');
'where.constraint.constraint.operand_dynamic'
);
$opStatic = $this->qbTester->getNode(
'where.constraint.constraint.operand_static');
'where.constraint.constraint.operand_static'
);

$this->assertSame('a', $opDynamic->getAlias());
$this->assertSame('somefield', $opDynamic->getField());
$this->assertSame($from->getTimestamp(), $opStatic->getValue()->getTimestamp());

// TO
$opDynamic = $this->qbTester->getNode(
'where.constraint.constraint[1].operand_dynamic');
'where.constraint.constraint[1].operand_dynamic'
);
$opStatic = $this->qbTester->getNode(
'where.constraint.constraint[1].operand_static');
'where.constraint.constraint[1].operand_static'
);

$this->assertSame('a', $opDynamic->getAlias());
$this->assertSame('somefield', $opDynamic->getField());
Expand Down