Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a91d06b

Browse files
committed
add a build job for Symfony 3.4
1 parent 3ea4648 commit a91d06b

6 files changed

Lines changed: 14 additions & 2 deletions

File tree

.travis.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ matrix:
3636
env:
3737
- SYMFONY_VERSION="2.8.*"
3838
- ENABLE_CODE_COVERAGE="true"
39+
# Symfony 3 LTS
40+
- php: 7.1
41+
env:
42+
- SYMFONY_VERSION="3.4.*"
43+
- STABILITY=beta
44+
- SYMFONY_DEPRECATIONS_HELPER="strict"
3945
# legacy (oldest supported versions)
4046
- php: 5.3
4147
env:
@@ -59,6 +65,7 @@ before_install:
5965
- composer self-update
6066
- if [[ "$SYMFONY_VERSION" != "" ]]; then composer require "symfony/symfony:${SYMFONY_VERSION}" --no-update; fi;
6167
- if [[ "$TWIG_VERSION" != "" ]]; then composer require "twig/twig:${TWIG_VERSION}" --no-update; fi;
68+
- if [[ "$STABILITY" != "" ]]; then composer config minimum-stability $STABILITY; fi
6269

6370
install:
6471
- if [[ "$CHECK_PHP_SYNTAX" == "yes" ]]; then composer require --dev --no-update friendsofphp/php-cs-fixer; fi;

phpunit.xml.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
<php>
3030
<server name="KERNEL_DIR" value="./tests/Fixtures/App" />
31+
<server name="KERNEL_CLASS" value="\AppKernel" />
3132
<ini name="error_reporting" value="E_ALL" />
3233
<ini name="display_errors" value="1" />
3334
<ini name="display_startup_errors" value="1" />

src/Controller/AdminController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,13 +399,13 @@ protected function updateEntityProperty($entity, $property, $value)
399399
$entityConfig = $this->entity;
400400

401401
// the method_exists() check is needed because Symfony 2.3 doesn't have isWritable() method
402-
if (method_exists($this->get('property_accessor'), 'isWritable') && !$this->get('property_accessor')->isWritable($entity, $property)) {
402+
if (method_exists($this->get('easy_admin.property_accessor'), 'isWritable') && !$this->get('easy_admin.property_accessor')->isWritable($entity, $property)) {
403403
throw new \RuntimeException(sprintf('The "%s" property of the "%s" entity is not writable.', $property, $entityConfig['name']));
404404
}
405405

406406
$this->dispatch(EasyAdminEvents::PRE_UPDATE, array('entity' => $entity, 'newValue' => $value));
407407

408-
$this->get('property_accessor')->setValue($entity, $property, $value);
408+
$this->get('easy_admin.property_accessor')->setValue($entity, $property, $value);
409409
$this->executeDynamicMethod('preUpdate<EntityName>Entity', array($entity));
410410

411411
$this->em->persist($entity);

src/Resources/config/services.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,5 +122,7 @@
122122
<service id="easyadmin.configuration.default_config_pass" class="EasyCorp\Bundle\EasyAdminBundle\Configuration\DefaultConfigPass" public="false">
123123
<tag name="easyadmin.config_pass" priority="10" />
124124
</service>
125+
126+
<service id="easy_admin.property_accessor" alias="property_accessor" public="true" />
125127
</services>
126128
</container>

tests/Fixtures/App/config/config_custom_entity_controller_service.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ services:
1212
class: EasyCorp\Bundle\EasyAdminBundle\Tests\Fixtures\AppTestBundle\Admin\CustomCategoryControllerAsService
1313
# TODO: when Symfony 2.3 support is dropped, we can inject @reuqest_stack instead of the entire container
1414
arguments: ['@service_container']
15+
public: true

tests/Fixtures/App/config/config_customized_backend.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ security:
5151
users:
5252
admin:
5353
password: 'pa$$word'
54+
roles: [ROLE_USER]
5455
firewalls:
5556
main:
5657
pattern: ^/

0 commit comments

Comments
 (0)