Skip to content

Commit

Permalink
Use Symfony CLI command instead of symfony/web-server-bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
pamil committed Dec 18, 2019
1 parent d3f5eec commit 3bb2b7c
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 16 deletions.
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@
/vendor/
###< symfony/framework-bundle ###

###> symfony/web-server-bundle ###
/.web-server-pid
###< symfony/web-server-bundle ###

###> friendsofphp/php-cs-fixer ###
/.php_cs
/.php_cs.cache
Expand Down
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@
"symfony/dotenv": "^4.2",
"symfony/flex": "^1.2",
"symfony/web-profiler-bundle": "^4.3",
"symfony/web-server-bundle": "^4.3",
"vimeo/psalm": "3.7.2"
},
"replace": {
Expand Down
1 change: 0 additions & 1 deletion config/bundles.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
Sylius\Bundle\FixturesBundle\SyliusFixturesBundle::class => ['all' => true],
Sylius\Bundle\PayumBundle\SyliusPayumBundle::class => ['all' => true],
Sylius\Bundle\ThemeBundle\SyliusThemeBundle::class => ['all' => true],
Symfony\Bundle\WebServerBundle\WebServerBundle::class => ['dev' => true, 'test' => true, 'test_cached' => true],
Sylius\Bundle\AdminBundle\SyliusAdminBundle::class => ['all' => true],
Sylius\Bundle\ShopBundle\SyliusShopBundle::class => ['all' => true],
FOS\OAuthServerBundle\FOSOAuthServerBundle::class => ['all' => true],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ 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"
Expand All @@ -28,7 +34,7 @@ prepare_for_behat_with_js() {
run_command "java -Dwebdriver.chrome.driver=$SYLIUS_CACHE_DIR/chromedriver -jar $SYLIUS_CACHE_DIR/selenium.jar > /dev/null 2>&1 &"

# Run webserver
run_command "bin/console server:run 127.0.0.1:8080 -d public --quiet > /dev/null 2>&1 &"
run_command "$SYLIUS_CACHE_DIR/symfony server:start --port=8080 --dir=public --allow-http --no-tls --force-php-discovery --daemon"
}

run_behat() {
Expand Down
3 changes: 3 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ parameters:
- '**MongoDB**'
- '**ODM**'

# Deprecated classes
- 'src/Sylius/Bundle/CoreBundle/Application/Kernel.php'

ignoreErrors:
# Magic calls
- '/Call to an undefined static method Webmozart\\Assert\\Assert::all/'
Expand Down
2 changes: 2 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
<projectFiles>
<directory name="src" />
<ignoreFiles>
<file name="src/Sylius/Bundle/CoreBundle/Application/Kernel.php" />

<directory name="src/Sylius/Behat" />

<directory name="src/Sylius/Bundle/AddressingBundle/spec" />
Expand Down
9 changes: 0 additions & 9 deletions symfony.lock
Original file line number Diff line number Diff line change
Expand Up @@ -851,15 +851,6 @@
"ref": "6bdfa1a95f6b2e677ab985cd1af2eae35d62e0f6"
}
},
"symfony/web-server-bundle": {
"version": "3.3",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "3.3",
"ref": "dae9b39fd6717970be7601101ce5aa960bf53d9a"
}
},
"symfony/yaml": {
"version": "v4.1.3"
},
Expand Down

0 comments on commit 3bb2b7c

Please sign in to comment.