Skip to content
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

Fix init command #114

Merged
merged 1 commit into from
May 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ matrix:
- php: 5.5
env:
- COMPOSER_FLAGS="--prefer-dist --no-interaction" # --prefer-lowest not possible in sulu 1.3
- ENABLE_SWAP=true
- php: 7.3
env:
- COMPOSER_FLAGS="--prefer-dist --no-interaction"
Expand All @@ -23,6 +24,14 @@ matrix:

before_install:
- phpenv config-add Tests/travis.php.ini
- | # enable swap
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks kind of hacky 🙈

Copy link
Member Author

@alexander-schranz alexander-schranz May 17, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes was and will ever be hacky ;)

https://github.com/sulu/SuluArticleBundle/blob/develop/.travis.yml#L35-L41

only solution currently to get around the travis memory limit

if [[ $ENABLE_SWAP == 'true' ]]; then
sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo sysctl vm.swappiness=10
fi
- composer self-update

install:
Expand Down
2 changes: 1 addition & 1 deletion Command/InitCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
/** @var Webspace $webspace */
foreach ($webspaceManager->getWebspaceCollection() as $webspace) {
$this->initWebspace($webspace, $output);
$this->entityManager->flush();
$entityManager->flush();
}
}

Expand Down