-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to Doctrine/Migrations 3.0 #205
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
82e09b5
Move existing migrations to Sylius\RefundPlugin\Migrations
pamil 2b97244
Set up Doctrine Migrations v3.0
pamil 876ca3f
Upgrade to Sylius 1.8
GSadee fc797bf
Allow for PHP 7.3 and 7.4
GSadee 0a4ff06
[Travis] Switch to bionic
GSadee dd26289
Remove unused bundles
GSadee 65c3487
Fix build
GSadee 52eeb2d
Fix errors after static analysis
GSadee 62ad4b9
[Composer] Update dependencies
GSadee b946e29
[Behat] Replace selenium + chromedriver with chrome headless
GSadee 502e690
Remove old migrations
GSadee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,111 +1,79 @@ | ||
language: php | ||
|
||
dist: trusty | ||
os: linux | ||
|
||
dist: bionic | ||
|
||
php: | ||
- 7.2 | ||
- '7.3' | ||
- '7.4' | ||
|
||
services: | ||
- mysql | ||
|
||
addons: | ||
apt: | ||
sources: | ||
- google-chrome | ||
packages: | ||
- google-chrome-stable | ||
chrome: stable | ||
|
||
cache: | ||
yarn: true | ||
directories: | ||
- ~/.composer/cache/files | ||
- $SYLIUS_CACHE_DIR | ||
|
||
env: | ||
global: | ||
- APP_ENV=test | ||
|
||
jobs: | ||
include: | ||
- &test | ||
stage: test | ||
name: "Build" | ||
|
||
sudo: false | ||
|
||
env: SYLIUS_CACHE_DIR=$HOME/.sylius-cache SYLIUS_BUILD_DIR=etc/build | ||
|
||
cache: | ||
yarn: true | ||
directories: | ||
- ~/.composer/cache/files | ||
- $SYLIUS_CACHE_DIR | ||
|
||
services: | ||
- memcached | ||
- mysql | ||
|
||
before_install: | ||
- phpenv config-rm xdebug.ini || true | ||
|
||
- echo "memory_limit=4096M" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini | ||
- echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini | ||
|
||
- mkdir -p tests/Application/public/media/image/ | ||
- cp migrations/* tests/Application/src/Migrations/ | ||
|
||
install: | ||
- composer update --no-interaction --prefer-dist | ||
- (cd tests/Application && yarn install) | ||
|
||
before_script: | ||
- (cd tests/Application && bin/console doctrine:database:create -vvv) | ||
- (cd tests/Application && bin/console doctrine:migrations:migrate -n -vvv -q) | ||
- (cd tests/Application && bin/console assets:install -vvv) | ||
- (cd tests/Application && bin/console cache:warmup -vvv) | ||
- (cd tests/Application && yarn build) | ||
|
||
# Configure display | ||
- /sbin/start-stop-daemon --start --quiet --pidfile /tmp/xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1680x1050x16 | ||
- export DISPLAY=:99 | ||
|
||
# Download Symfony command | ||
- wget https://get.symfony.com/cli/installer -O - | bash | ||
|
||
# Download and configure ChromeDriver | ||
- | | ||
if [ ! -f $SYLIUS_CACHE_DIR/chromedriver ] || [ "$($SYLIUS_CACHE_DIR/chromedriver --version | grep -c 2.34)" = "0" ]; then | ||
curl http://chromedriver.storage.googleapis.com/2.34/chromedriver_linux64.zip > chromedriver.zip | ||
unzip chromedriver.zip | ||
chmod +x chromedriver | ||
mv chromedriver $SYLIUS_CACHE_DIR | ||
fi | ||
# Run ChromeDriver | ||
- $SYLIUS_CACHE_DIR/chromedriver > /dev/null 2>&1 & | ||
|
||
# Download and configure Selenium | ||
- | | ||
if [ ! -f $SYLIUS_CACHE_DIR/selenium.jar ] || [ "$(java -jar $SYLIUS_CACHE_DIR/selenium.jar --version | grep -c 3.4.0)" = "0" ]; then | ||
curl http://selenium-release.storage.googleapis.com/3.4/selenium-server-standalone-3.4.0.jar > selenium.jar | ||
mv selenium.jar $SYLIUS_CACHE_DIR | ||
fi | ||
# Run Selenium | ||
- java -Dwebdriver.chrome.driver=$SYLIUS_CACHE_DIR/chromedriver -jar $SYLIUS_CACHE_DIR/selenium.jar > /dev/null 2>&1 & | ||
|
||
# Run webserver | ||
- (cd tests/Application && /home/travis/.symfony/bin/symfony server:start --port=8080 --dir=public --allow-http --no-tls --force-php-discovery --daemon) | ||
|
||
script: | ||
- composer validate --strict | ||
- composer analyse | ||
|
||
- vendor/bin/phpunit | ||
- vendor/bin/behat --strict -vvv --no-interaction --tags="~@todo" || vendor/bin/behat --strict -vvv --no-interaction --rerun --tags="~@todo" | ||
|
||
after_failure: | ||
- vendor/lakion/mink-debug-extension/travis/tools/upload-textfiles "${SYLIUS_BUILD_DIR}/*.log" | ||
|
||
- | ||
stage: test | ||
name: "PHPSpec (with code coverage)" | ||
|
||
sudo: false | ||
|
||
services: | ||
- memcached | ||
|
||
before_install: | ||
- phpenv config-rm xdebug.ini || true | ||
|
||
- echo "memory_limit=4096M" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini | ||
- echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini | ||
|
||
install: | ||
- composer update --no-interaction --prefer-dist | ||
|
||
script: | ||
- phpdbg -qrr vendor/bin/phpspec run | ||
- SYLIUS_CACHE_DIR=$HOME/.sylius-cache | ||
- SYLIUS_BUILD_DIR=etc/build | ||
|
||
before_install: | ||
- phpenv config-rm xdebug.ini | ||
- echo "memory_limit=4096M" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini | ||
- mkdir -p "${SYLIUS_CACHE_DIR}" | ||
|
||
install: | ||
- composer install --no-interaction --prefer-dist | ||
- (cd tests/Application && yarn install) | ||
|
||
before_script: | ||
- (cd tests/Application && bin/console doctrine:database:create -vvv) | ||
- (cd tests/Application && bin/console doctrine:migrations:migrate -n -vvv -q) | ||
- (cd tests/Application && bin/console assets:install public -vvv) | ||
- (cd tests/Application && bin/console cache:warmup -vvv) | ||
- (cd tests/Application && yarn build) | ||
|
||
# Running fixtures to be sure they're not failing | ||
- (cd tests/Application && bin/console sylius:fixtures:load -n --env test) | ||
|
||
# Download Symfony CLI | ||
- | | ||
if [ ! -f $SYLIUS_CACHE_DIR/symfony ]; then | ||
wget https://get.symfony.com/cli/installer -O - | bash | ||
mv ~/.symfony/bin/symfony $SYLIUS_CACHE_DIR | ||
fi | ||
php -v | head -n 1 | awk '{ print $2 }' > .php-version | ||
|
||
# Install certificates | ||
- $SYLIUS_CACHE_DIR/symfony server:ca:install | ||
|
||
# Run Chrome Headless | ||
- google-chrome-stable --enable-automation --disable-background-networking --no-default-browser-check --no-first-run --disable-popup-blocking --disable-default-apps --allow-insecure-localhost --disable-translate --disable-extensions --no-sandbox --enable-features=Metal --headless --remote-debugging-port=9222 --window-size=2880,1800 --proxy-server='direct://' --proxy-bypass-list='*' http://127.0.0.1 > /dev/null 2>&1 & | ||
|
||
# Run webserver | ||
- (cd tests/Application && $SYLIUS_CACHE_DIR/symfony server:start --port=8080 --dir=public --daemon) | ||
|
||
script: | ||
- composer validate --strict | ||
- composer analyse | ||
|
||
- vendor/bin/phpunit tests/ | ||
- phpdbg -qrr vendor/bin/phpspec run | ||
- vendor/bin/behat --strict -vvv --no-interaction || vendor/bin/behat --strict -vvv --no-interaction --rerun | ||
|
||
after_failure: | ||
- vendor/lakion/mink-debug-extension/travis/tools/upload-textfiles "${SYLIUS_BUILD_DIR}/*.log" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,5 +8,5 @@ | |
|
||
interface UnitRefundTotalCalculatorInterface | ||
{ | ||
public function calculateForUnitWithIdAndType(int $id, RefundType $refundType, ?float $amount = null); | ||
public function calculateForUnitWithIdAndType(int $id, RefundType $refundType, ?float $amount = null): int; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Small bc-break |
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small bc-break