Skip to content

Commit

Permalink
travis/CI
Browse files Browse the repository at this point in the history
  • Loading branch information
solverat committed Jul 13, 2019
1 parent 0dda65f commit 665f067
Show file tree
Hide file tree
Showing 64 changed files with 2,118 additions and 77 deletions.
61 changes: 61 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
sudo: true
language: php
addons:
mariadb: '10.2'
services:
- mysql
env:
global:
- PIMCORE_ENVIRONMENT=test
- DACHCOM_BUNDLE_TEST=1
- PIMCORE_TEST_URL=http://localhost
- PIMCORE_TEST_DB_DSN="mysql://root@localhost/dachcom_bundle_test"
- SYMFONY_DEPRECATIONS_HELPER=weak
- DACHCOM_TEST_SECTION=codeception
matrix:
include:
- name: "PHPStan Static Analysis (Pimcore 5.8.x, PHP 7.3)"
sudo: required
php: 7.3
env:
- PIMCORE_SKELETON_BRANCH="tags/v1.3.0"
- DACHCOM_TEST_SECTION=phpstan
- name: "PHP ECS (Pimcore 5.8.x, PHP 7.3)"
sudo: required
php: 7.3
env:
- PIMCORE_SKELETON_BRANCH="tags/v1.3.0"
- DACHCOM_TEST_SECTION=ecs
- name: "Codeception Tests ( Pimcore 5.8.x, PHP 7.2)"
sudo: required
php: 7.2
env:
- PIMCORE_SKELETON_BRANCH="tags/v1.3.0"
- name: "Codeception Tests ( Pimcore 5.8.x, PHP 7.3)"
sudo: required
php: 7.3
env:
- PIMCORE_SKELETON_BRANCH="tags/v1.3.0"
allow_failures:
- env:
- PIMCORE_SKELETON_BRANCH="tags/v1.3.0"
- DACHCOM_TEST_SECTION=ecs
fast_finish: true

cache:
directories:
- $HOME/.composer/cache

install:
- tests/_etc/travis/install

after_failure:
- cd $TRAVIS_BUILD_DIR
- cat ./lib/DynamicSearchBundle/tests/_output/*

script:
- _etc/travis/script

notifications:
email:
- [email protected]
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@
}
},
"require": {
"pimcore/pimcore": "^5.8.0"
}
}
108 changes: 108 additions & 0 deletions easy-coding-standard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
imports:
- { resource: '%vendor_dir%/symplify/easy-coding-standard/config/psr2.yml' }

services:
PhpCsFixer\Fixer\Basic\BracesFixer:
allow_single_line_closure: true
PhpCsFixer\Fixer\PhpTag\BlankLineAfterOpeningTagFixer: ~
PhpCsFixer\Fixer\Operator\ConcatSpaceFixer:
spacing: one
PhpCsFixer\Fixer\Operator\NewWithBracesFixer: ~
PhpCsFixer\Fixer\Phpdoc\PhpdocAlignFixer:
tags:
- method
- param
- property
- return
- throws
- type
- var
PhpCsFixer\Fixer\Operator\BinaryOperatorSpacesFixer:
align_double_arrow: true
PhpCsFixer\Fixer\Operator\IncrementStyleFixer:
style: post
PhpCsFixer\Fixer\Operator\UnaryOperatorSpacesFixer: ~
PhpCsFixer\Fixer\Whitespace\BlankLineBeforeStatementFixer: ~
PhpCsFixer\Fixer\CastNotation\CastSpacesFixer: ~
PhpCsFixer\Fixer\LanguageConstruct\DeclareEqualNormalizeFixer: ~
PhpCsFixer\Fixer\FunctionNotation\FunctionTypehintSpaceFixer: ~
PhpCsFixer\Fixer\Comment\SingleLineCommentStyleFixer:
comment_types:
- hash
PhpCsFixer\Fixer\ControlStructure\IncludeFixer: ~
PhpCsFixer\Fixer\CastNotation\LowercaseCastFixer: ~
PhpCsFixer\Fixer\ClassNotation\ClassAttributesSeparationFixer:
elements:
- method
PhpCsFixer\Fixer\Casing\NativeFunctionCasingFixer: ~
PhpCsFixer\Fixer\ClassNotation\NoBlankLinesAfterClassOpeningFixer: ~
PhpCsFixer\Fixer\Phpdoc\NoBlankLinesAfterPhpdocFixer: ~
PhpCsFixer\Fixer\Comment\NoEmptyCommentFixer: ~
PhpCsFixer\Fixer\Phpdoc\NoEmptyPhpdocFixer: ~
PhpCsFixer\Fixer\Phpdoc\PhpdocSeparationFixer: ~
PhpCsFixer\Fixer\Semicolon\NoEmptyStatementFixer: ~
PhpCsFixer\Fixer\Whitespace\ArrayIndentationFixer: ~
PhpCsFixer\Fixer\Whitespace\NoExtraBlankLinesFixer:
tokens:
- curly_brace_block
- extra
- parenthesis_brace_block
- square_brace_block
- throw
- use
PhpCsFixer\Fixer\NamespaceNotation\NoLeadingNamespaceWhitespaceFixer: ~
PhpCsFixer\Fixer\ArrayNotation\NoMultilineWhitespaceAroundDoubleArrowFixer: ~
PhpCsFixer\Fixer\CastNotation\NoShortBoolCastFixer: ~
PhpCsFixer\Fixer\Semicolon\NoSinglelineWhitespaceBeforeSemicolonsFixer: ~
PhpCsFixer\Fixer\Whitespace\NoSpacesAroundOffsetFixer: ~
PhpCsFixer\Fixer\ControlStructure\NoTrailingCommaInListCallFixer: ~
PhpCsFixer\Fixer\ControlStructure\NoUnneededControlParenthesesFixer: ~
PhpCsFixer\Fixer\ArrayNotation\NoWhitespaceBeforeCommaInArrayFixer: ~
PhpCsFixer\Fixer\Whitespace\NoWhitespaceInBlankLineFixer: ~
PhpCsFixer\Fixer\ArrayNotation\NormalizeIndexBraceFixer: ~
PhpCsFixer\Fixer\Operator\ObjectOperatorWithoutWhitespaceFixer: ~
PhpCsFixer\Fixer\Phpdoc\PhpdocAnnotationWithoutDotFixer: ~
PhpCsFixer\Fixer\Phpdoc\PhpdocIndentFixer: ~
PhpCsFixer\Fixer\Phpdoc\PhpdocInlineTagFixer: ~
PhpCsFixer\Fixer\Phpdoc\PhpdocNoAccessFixer: ~
PhpCsFixer\Fixer\Phpdoc\PhpdocNoEmptyReturnFixer: ~
PhpCsFixer\Fixer\Phpdoc\PhpdocNoPackageFixer: ~
PhpCsFixer\Fixer\Phpdoc\PhpdocNoUselessInheritdocFixer: ~
PhpCsFixer\Fixer\Phpdoc\PhpdocReturnSelfReferenceFixer: ~
PhpCsFixer\Fixer\Phpdoc\PhpdocScalarFixer: ~
PhpCsFixer\Fixer\Phpdoc\PhpdocSingleLineVarSpacingFixer: ~
PhpCsFixer\Fixer\Phpdoc\PhpdocSummaryFixer: ~
PhpCsFixer\Fixer\Phpdoc\PhpdocToCommentFixer: ~
PhpCsFixer\Fixer\Phpdoc\PhpdocTrimFixer: ~
PhpCsFixer\Fixer\Phpdoc\PhpdocTypesFixer: ~
PhpCsFixer\Fixer\Phpdoc\PhpdocVarWithoutNameFixer: ~
PhpCsFixer\Fixer\FunctionNotation\ReturnTypeDeclarationFixer: ~
PhpCsFixer\Fixer\ClassNotation\SelfAccessorFixer: ~
PhpCsFixer\Fixer\CastNotation\ShortScalarCastFixer: ~
PhpCsFixer\Fixer\StringNotation\SingleQuoteFixer: ~
PhpCsFixer\Fixer\Semicolon\SpaceAfterSemicolonFixer: ~
PhpCsFixer\Fixer\Operator\StandardizeNotEqualsFixer: ~
PhpCsFixer\Fixer\Operator\TernaryOperatorSpacesFixer: ~
PhpCsFixer\Fixer\ArrayNotation\TrimArraySpacesFixer: ~
PhpCsFixer\Fixer\ArrayNotation\WhitespaceAfterCommaInArrayFixer: ~
PhpCsFixer\Fixer\ClassNotation\ClassDefinitionFixer:
singleLine: true
PhpCsFixer\Fixer\Casing\MagicConstantCasingFixer: ~
PhpCsFixer\Fixer\FunctionNotation\MethodArgumentSpaceFixer: ~
PhpCsFixer\Fixer\Alias\NoMixedEchoPrintFixer:
use: echo
PhpCsFixer\Fixer\Import\NoLeadingImportSlashFixer: ~
PhpCsFixer\Fixer\Import\NoUnusedImportsFixer: ~
PhpCsFixer\Fixer\PhpUnit\PhpUnitFqcnAnnotationFixer: ~
PhpCsFixer\Fixer\Phpdoc\PhpdocNoAliasTagFixer: ~
PhpCsFixer\Fixer\ClassNotation\ProtectedToPrivateFixer: ~
PhpCsFixer\Fixer\NamespaceNotation\SingleBlankLineBeforeNamespaceFixer: ~
PhpCsFixer\Fixer\ClassNotation\SingleClassElementPerStatementFixer: ~

# new since PHP-CS-Fixer 2.6
PhpCsFixer\Fixer\ControlStructure\NoUnneededCurlyBracesFixer: ~
PhpCsFixer\Fixer\ClassNotation\NoUnneededFinalMethodFixer: ~
PhpCsFixer\Fixer\Semicolon\SemicolonAfterInstructionFixer: ~

# new since 2.11
PhpCsFixer\Fixer\Operator\StandardizeIncrementFixer: ~
13 changes: 13 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
includes:
- ../../vendor/phpstan/phpstan-symfony/extension.neon
parameters:
reportUnmatchedIgnoredErrors: false
autoload_files:
- %currentWorkingDirectory%/vendor/pimcore/pimcore/stubs/compatibility-v4.php
symfony:
container_xml_path: var/cache/dev/appDevDebugProjectContainer.xml
ignoreErrors:
# There is no global constants definition file we could include, ignore it:
- '#Constant PIMCORE_[A-Z\\_]+ not found\.#'
# Symfony DI (remove this line with symfony 4.2):
- '#Call to an undefined method Symfony\\Component\\Config\\Definition\\Builder\\NodeDefinition::children\(\)\.#'
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ public function process(ContainerBuilder $container)
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ public function getConfigTreeBuilder()

return $treeBuilder;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ public function load(array $configs, ContainerBuilder $container)
$configManagerDefinition = $container->getDefinition(BundleConfiguration::class);
$configManagerDefinition->addMethodCall('setConfig', [$config]);
}
}
}
3 changes: 1 addition & 2 deletions src/DsTrinityDataBundle/DsTrinityDataEvents.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@

final class DsTrinityDataEvents
{

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function __construct(
}

/**
* {@inheritDoc}
* {@inheritdoc}
*/
public function normalizeToResourceStack(ContextDataInterface $contextData, ResourceContainerInterface $resourceContainer): array
{
Expand All @@ -65,7 +65,6 @@ public function normalizeToResourceStack(ContextDataInterface $contextData, Reso
}

return [];

}

/**
Expand All @@ -74,22 +73,21 @@ public function normalizeToResourceStack(ContextDataInterface $contextData, Reso
*
* @return array
*/
protected abstract function normalizeDocument(ContextDataInterface $contextData, ResourceContainerInterface $resourceContainer);
abstract protected function normalizeDocument(ContextDataInterface $contextData, ResourceContainerInterface $resourceContainer);

/**
* @param ContextDataInterface $contextData
* @param ResourceContainerInterface $resourceContainer
*
* @return array
*/
protected abstract function normalizeAsset(ContextDataInterface $contextData, ResourceContainerInterface $resourceContainer);
abstract protected function normalizeAsset(ContextDataInterface $contextData, ResourceContainerInterface $resourceContainer);

/**
* @param ContextDataInterface $contextData
* @param ResourceContainerInterface $resourceContainer
*
* @return array
*/
protected abstract function normalizeDataObject(ContextDataInterface $contextData, ResourceContainerInterface $resourceContainer);

}
abstract protected function normalizeDataObject(ContextDataInterface $contextData, ResourceContainerInterface $resourceContainer);
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ class DefaultResourceNormalizer extends AbstractResourceNormalizer
protected $options;

/**
* {@inheritDoc}
* {@inheritdoc}
*/
public function configureOptions(OptionsResolver $resolver)
{
}

/**
* {@inheritDoc}
* {@inheritdoc}
*/
public function setOptions(array $options)
{
Expand All @@ -53,7 +53,6 @@ protected function normalizeDocument(ContextDataInterface $contextData, Resource
$returnResourceContainer = $contextData->getContextDispatchType() === ContextDataInterface::CONTEXT_DISPATCH_TYPE_DELETE ? null : $resourceContainer;

return [new NormalizedDataResource($returnResourceContainer, $resourceMeta)];

}

/**
Expand Down Expand Up @@ -91,4 +90,4 @@ protected function normalizeDataObject(ContextDataInterface $contextData, Resour

return [new NormalizedDataResource($returnResourceContainer, $resourceMeta)];
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class LocalizedResourceNormalizer extends AbstractResourceNormalizer
protected $options;

/**
* {@inheritDoc}
* {@inheritdoc}
*/
public function configureOptions(OptionsResolver $resolver)
{
Expand All @@ -34,7 +34,7 @@ public function configureOptions(OptionsResolver $resolver)
}

/**
* {@inheritDoc}
* {@inheritdoc}
*/
public function setOptions(array $options)
{
Expand All @@ -46,6 +46,7 @@ public function setOptions(array $options)
* @param ResourceContainerInterface $resourceContainer
*
* @return array
*
* @throws NormalizerException
*/
protected function normalizeDocument(ContextDataInterface $contextData, ResourceContainerInterface $resourceContainer)
Expand Down Expand Up @@ -75,7 +76,6 @@ protected function normalizeDocument(ContextDataInterface $contextData, Resource
$returnResourceContainer = $contextData->getContextDispatchType() === ContextDataInterface::CONTEXT_DISPATCH_TYPE_DELETE ? null : $resourceContainer;

return [new NormalizedDataResource($returnResourceContainer, $resourceMeta)];

}

/**
Expand Down Expand Up @@ -117,4 +117,4 @@ protected function normalizeDataObject(ContextDataInterface $contextData, Resour

return $normalizedResources;
}
}
}
Loading

0 comments on commit 665f067

Please sign in to comment.