From 5cc4690faaae32a1caac3e15b649bfb8eaa2490a Mon Sep 17 00:00:00 2001 From: Kamil Kokot Date: Wed, 18 Dec 2019 16:51:24 +0100 Subject: [PATCH] Use Symfony CLI command to check security --- composer.json | 4 +-- .../suites/application/before_install.sh | 8 +++++ .../script/test-behat-with-javascript | 6 ---- .../script/validate-composer-security | 4 +-- symfony.lock | 33 ------------------- 5 files changed, 11 insertions(+), 44 deletions(-) diff --git a/composer.json b/composer.json index 5ff46e4e1d..605f40e7a8 100644 --- a/composer.json +++ b/composer.json @@ -124,7 +124,6 @@ "phpstan/phpstan-webmozart-assert": "0.12.0", "phpunit/phpunit": "^7.0", "psr/event-dispatcher": "^1.0", - "sensiolabs/security-checker": "^5.0", "sspooky13/yaml-standards": "^5.0", "stripe/stripe-php": "^4.1", "sylius-labs/coding-standard": "^3.0", @@ -245,8 +244,7 @@ "scripts": { "auto-scripts": { "cache:clear": "symfony-cmd", - "assets:install %PUBLIC_DIR%": "symfony-cmd", - "security-checker security:check": "script" + "assets:install %PUBLIC_DIR%": "symfony-cmd" }, "post-install-cmd": [ "@auto-scripts" diff --git a/etc/travis/suites/application/before_install.sh b/etc/travis/suites/application/before_install.sh index 221f8cb0ff..5c74fbac86 100755 --- a/etc/travis/suites/application/before_install.sh +++ b/etc/travis/suites/application/before_install.sh @@ -8,3 +8,11 @@ run_command "echo \"extension = memcached.so\" >> ~/.phpenv/versions/$(phpenv ve print_header "Updating Composer" "Sylius" run_command "composer self-update --preview" + +# Download and configure Symfony webserver +print_header "Downloading Symfony CLI" "Sylius" +if [ ! -f $SYLIUS_CACHE_DIR/symfony ]; then + run_command "wget https://get.symfony.com/cli/installer -O - | bash" + run_command "mv ~/.symfony/bin/symfony $SYLIUS_CACHE_DIR" +fi +run_command "$SYLIUS_CACHE_DIR/symfony version" diff --git a/etc/travis/suites/application/script/test-behat-with-javascript b/etc/travis/suites/application/script/test-behat-with-javascript index 69f45f3190..33fbbcef45 100755 --- a/etc/travis/suites/application/script/test-behat-with-javascript +++ b/etc/travis/suites/application/script/test-behat-with-javascript @@ -7,12 +7,6 @@ prepare_for_behat_with_js() { run_command "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 2880x1800x16" run_command "export DISPLAY=:99" - # Download and configure Symfony webserver - if [ ! -f $SYLIUS_CACHE_DIR/symfony ]; then - run_command "wget https://get.symfony.com/cli/installer -O - | bash" - run_command "mv ~/.symfony/bin/symfony $SYLIUS_CACHE_DIR" - fi - # Download and configure ChromeDriver if [ ! -f $SYLIUS_CACHE_DIR/chromedriver ] || [ "$($SYLIUS_CACHE_DIR/chromedriver --version | grep -c 2.34)" = "0" ]; then run_command "curl http://chromedriver.storage.googleapis.com/2.34/chromedriver_linux64.zip > chromedriver.zip" diff --git a/etc/travis/suites/application/script/validate-composer-security b/etc/travis/suites/application/script/validate-composer-security index 2cd2470188..a7324758d7 100755 --- a/etc/travis/suites/application/script/validate-composer-security +++ b/etc/travis/suites/application/script/validate-composer-security @@ -2,5 +2,5 @@ source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../../bash/common.lib.sh" -print_header "Validating (Symfony security checker)" "Sylius" -run_command "vendor/bin/security-checker security:check" +print_header "Validating (Symfony CLI security checker)" "Sylius" +run_command "$SYLIUS_CACHE_DIR/symfony security:check" diff --git a/symfony.lock b/symfony.lock index 7335b49426..86874b345f 100644 --- a/symfony.lock +++ b/symfony.lock @@ -1,7 +1,4 @@ { - "akeneo/phpspec-skip-example-extension": { - "version": "v4.0.0" - }, "amphp/amp": { "version": "v2.1.2" }, @@ -41,9 +38,6 @@ "coduo/php-to-string": { "version": "2.0.1" }, - "composer/ca-bundle": { - "version": "1.1.2" - }, "composer/semver": { "version": "1.4.2" }, @@ -308,27 +302,12 @@ "netresearch/jsonmapper": { "version": "v1.4.0" }, - "nette/bootstrap": { - "version": "v3.0.1" - }, - "nette/di": { - "version": "v3.0.1" - }, "nette/finder": { "version": "v2.4.2" }, - "nette/neon": { - "version": "v3.0.0" - }, - "nette/php-generator": { - "version": "v3.3.1" - }, "nette/robot-loader": { "version": "v3.0.4" }, - "nette/schema": { - "version": "v1.0.1" - }, "nette/utils": { "version": "v2.5.2" }, @@ -347,9 +326,6 @@ "pagerfanta/pagerfanta": { "version": "v2.0.1" }, - "pamil/phpspec-skip-example-extension": { - "version": "v4.0.0" - }, "pamil/prophecy-common": { "version": "v0.1.0" }, @@ -521,15 +497,6 @@ "sebastian/version": { "version": "2.0.1" }, - "sensiolabs/security-checker": { - "version": "4.0", - "recipe": { - "repo": "github.com/symfony/recipes", - "branch": "master", - "version": "4.0", - "ref": "421933bf8f0e75546ac8e00cb3eb12904fa2ac1a" - } - }, "slevomat/coding-standard": { "version": "4.6.3" },