Skip to content

Commit

Permalink
Update Composer Dist Package
Browse files Browse the repository at this point in the history
  • Loading branch information
BadPixxel committed Nov 9, 2020
1 parent 1a0b5c4 commit 5566a3f
Show file tree
Hide file tree
Showing 42 changed files with 355 additions and 549 deletions.
79 changes: 30 additions & 49 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,6 @@
# Define Test Matrix
matrix:
include:

# # Symfony 3.4 Branch
# - php: 7.2
# env: SF_VERSION="3.4.*"
#
# # Symfony 4.0 Branch
# - php: 7.1
# env: SF_VERSION="4.0.*"
# - php: 7.2
# env: SF_VERSION="4.0.*"
#
# # Symfony 4.2 Branch
# - php: 7.1
# env: SF_VERSION="4.2.*"
# - php: 7.3
# env: SF_VERSION="4.2.*"

# Symfony 4.4 Branch
- php: 7.2
env: SF_VERSION="4.4.*"
Expand All @@ -35,50 +18,48 @@ matrix:
fast_finish: true

################################################################################
# Prepare Test Environnement
before_install:
- echo "Configuring The Bundles"
- cp app/config/parameters.yml.dist app/config/parameters.yml
- ln -s public web

################################################################################
# GENERIC CONFIGURATION
# TEST SCRIPTS
################################################################################

################################################################################
# Install composer dependencies,
# Create database, schema and fixtures
install:
# Setup Travis
- bash src/Resources/travis/configure.sh
# Setup Symfony Version if Required
- bash src/Resources/travis/build_symfony.sh
# Configure For Phpstan vs PHP Versions
- bash src/Resources/travis/build_grumphp.sh
# Install Symfony
- bash src/Resources/travis/install.sh
# Install & Configure Environnement
install:
# Setup Travis
- curl -s https://raw.githubusercontent.com/BadPixxel/Php-Sdk/main/travis/configure.sh | sh
# Deploy Symfony Files
- curl -s https://raw.githubusercontent.com/BadPixxel/Php-Sdk/main/symfony/deploy.sh | sh
# Setup Symfony Version & Create Database
- curl -s https://raw.githubusercontent.com/BadPixxel/Php-Sdk/main/symfony/configure.sh | sh
# Install Symfony
- curl -s https://raw.githubusercontent.com/BadPixxel/Php-Sdk/main/symfony/install.sh | sh

################################################################################
# Run script
script:
# Execute Grump Travis Testsuite
- php vendor/bin/grumphp run -n --testsuite=travis
# With PHP > 7.0 => Execute CsFixer
- if [[ ${TRAVIS_PHP_VERSION:0:3} > "7.0" ]]; then php ./vendor/bin/grumphp run -n --testsuite=csfixer; fi
# With PHP > 7.0 => Execute Phpstan
- if [[ ${TRAVIS_PHP_VERSION:0:3} > "7.0" ]]; then php ./vendor/bin/grumphp run -n --testsuite=phpstan; fi
# Execute Grumphp Testsuite
- curl -s https://raw.githubusercontent.com/BadPixxel/Php-Sdk/main/travis/grumphp.sh | sh
# - php vendor/bin/grumphp run -n --testsuite=travis
# # With PHP > 7.0 => Execute CsFixer
# - if [[ ${TRAVIS_PHP_VERSION:0:3} > "7.0" ]]; then php ./vendor/bin/grumphp run -n --testsuite=csfixer; fi
# # With PHP > 7.0 => Execute Phpstan
# - if [[ ${TRAVIS_PHP_VERSION:0:3} > "7.0" ]]; then php ./vendor/bin/grumphp run -n --testsuite=phpstan; fi
# Execute PhpUnit Tests
- vendor/bin/phpunit
# Show Outdated Packages
- composer outdated -D

################################################################################
# Run After Script
after_script:
- curl -s https://raw.githubusercontent.com/BadPixxel/Php-Sdk/main/travis/after.sh | sh

################################################################################
# GENERIC CONFIGURATION
################################################################################

################################################################################
# Project language
language: php
# Allows use container-based infrastructure
sudo: false
#sudo: required
dist: trusty
language: php
os: linux
dist: trusty
################################################################################
# Start mysql service
services:
Expand Down
8 changes: 5 additions & 3 deletions app/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* This file is part of SplashSync Project.
*
* Copyright (C) 2015-2019 Splash Sync <www.splashsync.com>
* Copyright (C) 2015-2020 Splash Sync <www.splashsync.com>
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
Expand Down Expand Up @@ -58,8 +58,10 @@ public function registerBundles()
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
}

if (('dev' === $this->getEnvironment()) && class_exists('\\Symfony\\Bundle\\WebServerBundle\\WebServerBundle')) {
$bundles[] = new Symfony\Bundle\WebServerBundle\WebServerBundle();
if ('dev' === $this->getEnvironment()) {
if (class_exists('\\Symfony\\Bundle\\WebServerBundle\\WebServerBundle')) {
$bundles[] = new Symfony\Bundle\WebServerBundle\WebServerBundle();
}
}
}

Expand Down
41 changes: 6 additions & 35 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,19 @@
"src/Tests/KernelTestCase.php"
]
},



"require": {
"php": "^7.1",
"php": "^7.2",
"splash/phpcore": "dev-master"
},

"require-dev": {

"badpixxel/php-sdk": "dev-main",

"splash/faker": "dev-master",
"splash/console": "dev-master",

"phpunit/phpunit": "~7.0|~8.0|~9.0",

"symfony/symfony": "~4.0|~4.4",
"symfony/symfony": "~4.4",
"symfony/monolog-bundle": "*",
"symfony/phpunit-bridge": "*",
"psr/simple-cache": "*",
Expand All @@ -59,36 +57,9 @@
"doctrine/doctrine-bundle": "^1.9",

"monolog/monolog": "^1.0",
"sensio/framework-extra-bundle": "*",

"composer/composer": "^2.0",
"sensiolabs/security-checker": "^5.0",
"phpmd/phpmd": "^2.6",
"phpro/grumphp": "^0.19|^1.0",
"sebastian/phpcpd": ">3.0",
"squizlabs/php_codesniffer": "^3.2",
"php-parallel-lint/php-parallel-lint": "^1.0",
"sclable/xml-lint": "^0.2.4",
"seld/jsonlint": "^1.7",
"j13k/yaml-lint": "^1.1",
"escapestudios/symfony2-coding-standard": "^3.4",
"friendsofphp/php-cs-fixer": ">2.10",

"phpstan/phpstan": "^0.12",
"phpstan/phpstan-doctrine": "^0.12",
"phpstan/phpstan-phpunit": "^0.12",
"phpstan/phpstan-symfony": "^0.12"
"sensio/framework-extra-bundle": "*"
},

"scripts": {
"post-install-cmd": [
"php vendor/bin/grumphp git:deinit"
],
"post-update-cmd": [
"php vendor/bin/grumphp git:deinit"
]
},

"archive": {
"exclude": ["/app", "/bin", "/docs", "/tests"]
}
Expand Down
Loading

0 comments on commit 5566a3f

Please sign in to comment.