Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Set up github token on travis #138

Closed
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea
tests/Fixtures/App/var/cache
tests/Fixtures/App/var/logs
!tests/Fixtures/App/var/.gitempty
Expand Down
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ env:
- KERNEL_CLASS=Symfony\Cmf\Bundle\SonataPhpcrAdminIntegrationBundle\Tests\Fixtures\App\Kernel
- SYMFONY_PHPUNIT_VERSION=5.7
- TEST_INSTALLATION=false
- GITHUB_TOKEN=50f7b2dd2c8b74e441a1da1010e1a45e6c2e69f9

matrix:
include:
Expand All @@ -53,10 +54,11 @@ before_install:
- phpenv config-rm xdebug.ini || true
- composer self-update
- if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; composer config prefer-stable true; fi;
- if [ "$GITHUB_TOKEN" != "" ]; then composer config github-oauth.github.com $GITHUB_TOKEN; fi
- if [ "$SYMFONY_VERSION" != "" ]; then composer require symfony/symfony:${SYMFONY_VERSION} --no-update; fi
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)

install: travis_wait composer update --prefer-dist $COMPOSER_FLAGS
install: COMPOSER_MEMORY_LIMIT=-1 travis_wait composer update --prefer-dist $COMPOSER_FLAGS

script:
- if [ "${TEST_INSTALLATION}" == true ]; then make test_installation; else make test; fi
Expand Down
8 changes: 5 additions & 3 deletions tests/Fixtures/App/Admin/BaseAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
use Sonata\AdminBundle\Datagrid\ListMapper;
use Sonata\AdminBundle\Form\FormMapper;
use Sonata\DoctrinePHPCRAdminBundle\Admin\Admin;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\Extension\Core\Type\TextType;

/**
* @author Maximilian Berghoff <[email protected]>
Expand All @@ -38,9 +40,9 @@ protected function configureFormFields(FormMapper $formMapper)
{
$formMapper
->with('form.group_general')
->add('name', 'text')
->add('title', 'text')
->add('body', 'textarea', ['required' => false])
->add('name', TextType::class)
->add('title', TextType::class)
->add('body', TextareaType::class, ['required' => false])
->end()
;
}
Expand Down
3 changes: 2 additions & 1 deletion tests/Fixtures/App/Admin/MenuContentAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use Sonata\AdminBundle\Datagrid\ListMapper;
use Sonata\AdminBundle\Form\FormMapper;
use Sonata\DoctrinePHPCRAdminBundle\Admin\Admin;
use Symfony\Component\Form\Extension\Core\Type\TextType;

/**
* Common base admin for Menu and MenuNode.
Expand Down Expand Up @@ -42,7 +43,7 @@ protected function configureFormFields(FormMapper $formMapper)
{
$formMapper
->with('form.group_general')
->add('title', 'text')
->add('title', TextType::class)
->end()
;
}
Expand Down